1" ngbDropdown container="body" class="d-inline-block">
+@if (actionList.length > 1) {
+
diff --git a/npm/ng-packs/packages/components/extensible/src/lib/components/grid-actions/grid-actions.component.ts b/npm/ng-packs/packages/components/extensible/src/lib/components/grid-actions/grid-actions.component.ts
index ebccd6e163..6937b93d8a 100644
--- a/npm/ng-packs/packages/components/extensible/src/lib/components/grid-actions/grid-actions.component.ts
+++ b/npm/ng-packs/packages/components/extensible/src/lib/components/grid-actions/grid-actions.component.ts
@@ -9,13 +9,21 @@ import { EntityAction, EntityActionList } from '../../models/entity-actions';
import { EXTENSIONS_ACTION_TYPE } from '../../tokens/extensions.token';
import { AbstractActionsComponent } from '../abstract-actions/abstract-actions.component';
import { NgbDropdownModule } from '@ng-bootstrap/ng-bootstrap';
-import { CoreModule } from '@abp/ng.core';
-import {EllipsisDirective} from "@abp/ng.theme.shared";
+import { LocalizationModule, PermissionDirective } from '@abp/ng.core';
+import { EllipsisDirective } from '@abp/ng.theme.shared';
+import { NgClass, NgTemplateOutlet } from '@angular/common';
@Component({
exportAs: 'abpGridActions',
standalone: true,
- imports: [ CoreModule, NgbDropdownModule, EllipsisDirective],
+ imports: [
+ NgbDropdownModule,
+ EllipsisDirective,
+ PermissionDirective,
+ NgClass,
+ LocalizationModule,
+ NgTemplateOutlet,
+ ],
selector: 'abp-grid-actions',
templateUrl: './grid-actions.component.html',
providers: [
diff --git a/npm/ng-packs/packages/components/extensible/src/lib/components/page-toolbar/page-toolbar.component.html b/npm/ng-packs/packages/components/extensible/src/lib/components/page-toolbar/page-toolbar.component.html
index 285e0aa94b..c39bf59dd1 100644
--- a/npm/ng-packs/packages/components/extensible/src/lib/components/page-toolbar/page-toolbar.component.html
+++ b/npm/ng-packs/packages/components/extensible/src/lib/components/page-toolbar/page-toolbar.component.html
@@ -1,31 +1,29 @@
-
-
-
-
-
-
+ @for (action of actionList; track action.component || action.action; let last = $last) {
+
+ @if (action.visible(data)) {
+
+ @if (action.component; as component) {
+
-
-
-
-
-
-
+ }@else {
+ @if (asToolbarAction(action).value; as toolbarAction ) {
+
+ }
+ }
+ }
+ }
+
diff --git a/npm/ng-packs/packages/components/extensible/src/lib/components/page-toolbar/page-toolbar.component.ts b/npm/ng-packs/packages/components/extensible/src/lib/components/page-toolbar/page-toolbar.component.ts
index 85685cdee6..507064a54c 100644
--- a/npm/ng-packs/packages/components/extensible/src/lib/components/page-toolbar/page-toolbar.component.ts
+++ b/npm/ng-packs/packages/components/extensible/src/lib/components/page-toolbar/page-toolbar.component.ts
@@ -9,13 +9,20 @@ import {
import { EXTENSIONS_ACTION_TYPE } from '../../tokens/extensions.token';
import { AbstractActionsComponent } from '../abstract-actions/abstract-actions.component';
import { CreateInjectorPipe } from '../../pipes/create-injector.pipe';
-import { CoreModule } from '@abp/ng.core';
+import { LocalizationModule, PermissionDirective } from '@abp/ng.core';
+import { NgClass, NgComponentOutlet } from '@angular/common';
@Component({
exportAs: 'abpPageToolbar',
selector: 'abp-page-toolbar',
standalone: true,
- imports: [ CoreModule, CreateInjectorPipe],
+ imports: [
+ CreateInjectorPipe,
+ PermissionDirective,
+ LocalizationModule,
+ NgClass,
+ NgComponentOutlet,
+ ],
templateUrl: './page-toolbar.component.html',
providers: [
{
diff --git a/npm/ng-packs/packages/core/src/lib/core.module.ts b/npm/ng-packs/packages/core/src/lib/core.module.ts
index c4f7c78fa7..57133ab69e 100644
--- a/npm/ng-packs/packages/core/src/lib/core.module.ts
+++ b/npm/ng-packs/packages/core/src/lib/core.module.ts
@@ -40,6 +40,16 @@ import { DefaultQueueManager } from './utils/queue';
import { IncludeLocalizationResourcesProvider } from './providers/include-localization-resources.provider';
import { SORT_COMPARE_FUNC, compareFuncFactory } from './tokens/compare-func.token';
+const standaloneDirectives = [
+ AutofocusDirective,
+ InputEventDebounceDirective,
+ ForDirective,
+ FormSubmitDirective,
+ InitDirective,
+ PermissionDirective,
+ ReplaceableTemplateDirective,
+ StopPropagationDirective,
+];
/**
* BaseCoreModule is the module that holds
* all imports, declarations, exports, and entryComponents
@@ -55,23 +65,16 @@ import { SORT_COMPARE_FUNC, compareFuncFactory } from './tokens/compare-func.tok
RouterModule,
LocalizationModule,
AbstractNgModelComponent,
- AutofocusDirective,
DynamicLayoutComponent,
- ForDirective,
- FormSubmitDirective,
- InitDirective,
- InputEventDebounceDirective,
- PermissionDirective,
ReplaceableRouteContainerComponent,
- ReplaceableTemplateDirective,
RouterOutletComponent,
SortPipe,
SafeHtmlPipe,
- StopPropagationDirective,
ToInjectorPipe,
ShortDateTimePipe,
ShortTimePipe,
ShortDatePipe,
+ ...standaloneDirectives,
],
imports: [
CommonModule,
@@ -80,22 +83,15 @@ import { SORT_COMPARE_FUNC, compareFuncFactory } from './tokens/compare-func.tok
ReactiveFormsModule,
RouterModule,
LocalizationModule,
+ ...standaloneDirectives,
],
declarations: [
AbstractNgModelComponent,
- AutofocusDirective,
DynamicLayoutComponent,
- ForDirective,
- FormSubmitDirective,
- InitDirective,
- InputEventDebounceDirective,
- PermissionDirective,
ReplaceableRouteContainerComponent,
- ReplaceableTemplateDirective,
RouterOutletComponent,
SortPipe,
SafeHtmlPipe,
- StopPropagationDirective,
ToInjectorPipe,
ShortDateTimePipe,
ShortTimePipe,
@@ -179,7 +175,7 @@ export class CoreModule {
},
{
provide: SORT_COMPARE_FUNC,
- useFactory: compareFuncFactory
+ useFactory: compareFuncFactory,
},
{
provide: QUEUE_MANAGER,
diff --git a/npm/ng-packs/packages/core/src/lib/directives/autofocus.directive.ts b/npm/ng-packs/packages/core/src/lib/directives/autofocus.directive.ts
index 84703badcf..c092ee8a3a 100644
--- a/npm/ng-packs/packages/core/src/lib/directives/autofocus.directive.ts
+++ b/npm/ng-packs/packages/core/src/lib/directives/autofocus.directive.ts
@@ -1,7 +1,7 @@
import { AfterViewInit, Directive, ElementRef, Input } from '@angular/core';
@Directive({
- // eslint-disable-next-line @angular-eslint/directive-selector
+ standalone: true,
selector: '[autofocus]',
})
export class AutofocusDirective implements AfterViewInit {
diff --git a/npm/ng-packs/packages/core/src/lib/directives/debounce.directive.ts b/npm/ng-packs/packages/core/src/lib/directives/debounce.directive.ts
index 69a96f95f1..36df11ee88 100644
--- a/npm/ng-packs/packages/core/src/lib/directives/debounce.directive.ts
+++ b/npm/ng-packs/packages/core/src/lib/directives/debounce.directive.ts
@@ -4,7 +4,7 @@ import { debounceTime } from 'rxjs/operators';
import { SubscriptionService } from '../services/subscription.service';
@Directive({
- // eslint-disable-next-line @angular-eslint/directive-selector
+ standalone: true,
selector: '[input.debounce]',
providers: [SubscriptionService],
})
diff --git a/npm/ng-packs/packages/core/src/lib/directives/for.directive.ts b/npm/ng-packs/packages/core/src/lib/directives/for.directive.ts
index 1e37e1c908..387cfac844 100644
--- a/npm/ng-packs/packages/core/src/lib/directives/for.directive.ts
+++ b/npm/ng-packs/packages/core/src/lib/directives/for.directive.ts
@@ -33,6 +33,7 @@ class RecordView {
}
@Directive({
+ standalone: true,
selector: '[abpFor]',
})
export class ForDirective implements OnChanges {
diff --git a/npm/ng-packs/packages/core/src/lib/directives/form-submit.directive.ts b/npm/ng-packs/packages/core/src/lib/directives/form-submit.directive.ts
index 7562a1b7b7..2eb4fc11f4 100644
--- a/npm/ng-packs/packages/core/src/lib/directives/form-submit.directive.ts
+++ b/npm/ng-packs/packages/core/src/lib/directives/form-submit.directive.ts
@@ -18,7 +18,7 @@ type Controls = { [key: string]: UntypedFormControl } | UntypedFormGroup[];
* @deprecated FormSubmitDirective will be removed in V7.0.0. Use `ngSubmit` instead.
*/
@Directive({
- // eslint-disable-next-line @angular-eslint/directive-selector
+ standalone: true,
selector: 'form[ngSubmit][formGroup]',
providers: [SubscriptionService],
})
diff --git a/npm/ng-packs/packages/core/src/lib/directives/init.directive.ts b/npm/ng-packs/packages/core/src/lib/directives/init.directive.ts
index ba55523757..b885cb88cf 100644
--- a/npm/ng-packs/packages/core/src/lib/directives/init.directive.ts
+++ b/npm/ng-packs/packages/core/src/lib/directives/init.directive.ts
@@ -1,6 +1,9 @@
import { Directive, Output, EventEmitter, ElementRef, AfterViewInit } from '@angular/core';
-@Directive({ selector: '[abpInit]' })
+@Directive({
+ standalone: true,
+ selector: '[abpInit]',
+})
export class InitDirective implements AfterViewInit {
@Output('abpInit') readonly init = new EventEmitter
>();
diff --git a/npm/ng-packs/packages/core/src/lib/directives/permission.directive.ts b/npm/ng-packs/packages/core/src/lib/directives/permission.directive.ts
index f277bf50ee..420c5ff737 100644
--- a/npm/ng-packs/packages/core/src/lib/directives/permission.directive.ts
+++ b/npm/ng-packs/packages/core/src/lib/directives/permission.directive.ts
@@ -17,6 +17,7 @@ import { QUEUE_MANAGER } from '../tokens/queue.token';
import { QueueManager } from '../utils/queue';
@Directive({
+ standalone: true,
selector: '[abpPermission]',
})
export class PermissionDirective implements OnDestroy, OnChanges, AfterViewInit {
diff --git a/npm/ng-packs/packages/core/src/lib/directives/replaceable-template.directive.ts b/npm/ng-packs/packages/core/src/lib/directives/replaceable-template.directive.ts
index 9a1bedcd71..b7b70e5b82 100644
--- a/npm/ng-packs/packages/core/src/lib/directives/replaceable-template.directive.ts
+++ b/npm/ng-packs/packages/core/src/lib/directives/replaceable-template.directive.ts
@@ -18,6 +18,7 @@ import { ReplaceableComponentsService } from '../services/replaceable-components
import { SubscriptionService } from '../services/subscription.service';
@Directive({
+ standalone: true,
selector: '[abpReplaceableTemplate]',
providers: [SubscriptionService],
})
diff --git a/npm/ng-packs/packages/core/src/lib/directives/stop-propagation.directive.ts b/npm/ng-packs/packages/core/src/lib/directives/stop-propagation.directive.ts
index 0863d45e88..eab0210c7f 100644
--- a/npm/ng-packs/packages/core/src/lib/directives/stop-propagation.directive.ts
+++ b/npm/ng-packs/packages/core/src/lib/directives/stop-propagation.directive.ts
@@ -3,7 +3,7 @@ import { fromEvent } from 'rxjs';
import { SubscriptionService } from '../services/subscription.service';
@Directive({
- // eslint-disable-next-line @angular-eslint/directive-selector
+ standalone: true,
selector: '[click.stop]',
providers: [SubscriptionService],
})