@acorex/platform 20.9.46 → 20.9.48

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,10 +1,10 @@
1
- import * as i5 from '@angular/common';
1
+ import * as i6 from '@angular/common';
2
2
  import { CommonModule, DOCUMENT } from '@angular/common';
3
3
  import * as i0 from '@angular/core';
4
4
  import { Injectable, inject, input, model, signal, computed, effect, output, viewChild, ChangeDetectionStrategy, Component, NgModule, EventEmitter, ElementRef, DestroyRef, untracked, Output } from '@angular/core';
5
5
  import { provideCommandSetups, AXPCommandService } from '@acorex/platform/runtime';
6
6
  import { AXPopupService } from '@acorex/components/popup';
7
- import * as i4 from '@acorex/platform/core';
7
+ import * as i5 from '@acorex/platform/core';
8
8
  import { AXPHookService, resolveDialogActionShortcuts, DEFAULT_CANCEL_DIALOG_ACTION_SHORTCUTS, DEFAULT_SUBMIT_DIALOG_ACTION_SHORTCUTS, findOverlayContainerAncestor, getNestedVisibleOverlayPanes, getTopVisibleOverlayContainer, AXPExpressionEvaluatorService, AXPKeyboardShortcutRegistry, normalizeDialogActionShortcutChord, isDialogShortcutAllowedInEditableField, resolveConfiguredFooterActionShortcuts, AXPComponentSlotModule, AXPContextStore } from '@acorex/platform/core';
9
9
  export { DEFAULT_CANCEL_DIALOG_ACTION_SHORTCUTS, DEFAULT_SUBMIT_DIALOG_ACTION_SHORTCUTS } from '@acorex/platform/core';
10
10
  import * as i1 from '@acorex/platform/layout/widget-core';
@@ -18,12 +18,14 @@ import { AXP_PREVIEW_WIDGET_FIELD_COMMAND_KEY, AXPKeyboardShortcutPriority } fro
18
18
  import { AXOverlayService } from '@acorex/cdk/overlay';
19
19
  import * as i1$1 from '@acorex/components/button';
20
20
  import { AXButtonModule } from '@acorex/components/button';
21
- import * as i2$1 from '@acorex/components/decorators';
21
+ import * as i2$1 from '@acorex/components/dropdown-button';
22
+ import { AXDropdownButtonModule } from '@acorex/components/dropdown-button';
23
+ import * as i3 from '@acorex/components/decorators';
22
24
  import { AXDecoratorModule } from '@acorex/components/decorators';
23
- import * as i3 from '@acorex/components/loading';
25
+ import * as i4 from '@acorex/components/loading';
24
26
  import { AXLoadingModule } from '@acorex/components/loading';
25
27
  import { AXBasePageComponent } from '@acorex/components/page';
26
- import * as i6 from '@acorex/core/translation';
28
+ import * as i7 from '@acorex/core/translation';
27
29
  import { AXTranslationService, AXTranslationModule } from '@acorex/core/translation';
28
30
  import { AXPUnsavedChangesConfirmService } from '@acorex/platform/common';
29
31
  import { AXP_ENTITY_DEFINITION_CRUD_SERVICE } from '@acorex/platform/domain';
@@ -3032,6 +3034,7 @@ class AXPDialogRendererComponent extends AXBasePageComponent {
3032
3034
  scope: a.scope,
3033
3035
  predicateApiWidgetName: a.predicateApiWidgetName,
3034
3036
  shortcuts: resolveConfiguredFooterActionShortcuts(typeof a.command === 'string' ? a.command : a.command?.name, a.shortcuts),
3037
+ items: Array.isArray(a.items) ? a.items.map((child) => mapOne(child, placement)) : undefined,
3035
3038
  });
3036
3039
  const prefix = (footer?.prefix || []).map((a) => mapOne(a, 'prefix'));
3037
3040
  const suffix = (footer?.suffix || []).map((a) => mapOne(a, 'suffix'));
@@ -3142,28 +3145,58 @@ class AXPDialogRendererComponent extends AXBasePageComponent {
3142
3145
  </ax-prefix>
3143
3146
  <ax-suffix>
3144
3147
  @for (action of footerSuffixActions(); track $index) {
3145
- <ax-button
3146
- [disabled]="action.disabled || isSubmitting()"
3147
- [text]="(action.title | translate | async)!"
3148
- [look]="'solid'"
3149
- [color]="action.color"
3150
- (onClick)="executeAction(action)"
3151
- >
3152
- @if (isFormLoading()) {
3153
- <ax-loading></ax-loading>
3154
- }
3155
- @if (action.icon) {
3156
- <ax-prefix>
3157
- <ax-icon [icon]="action.icon"></ax-icon>
3158
- </ax-prefix>
3159
- }
3160
- </ax-button>
3148
+ @if (action.items?.length) {
3149
+ <ax-dropdown-button
3150
+ [disabled]="action.disabled || isSubmitting()"
3151
+ [text]="(action.title | translate | async)!"
3152
+ [look]="'solid'"
3153
+ [color]="action.color"
3154
+ [mode]="'split'"
3155
+ (onClick)="executeAction(action)"
3156
+ >
3157
+ @if (isFormLoading()) {
3158
+ <ax-loading></ax-loading>
3159
+ }
3160
+ @if (action.icon) {
3161
+ <ax-prefix>
3162
+ <ax-icon [icon]="action.icon"></ax-icon>
3163
+ </ax-prefix>
3164
+ }
3165
+ <ax-button-item-list>
3166
+ @for (item of action.items; track $index) {
3167
+ <ax-button-item
3168
+ [text]="(item.title | translate | async)!"
3169
+ [disabled]="item.disabled || isSubmitting()"
3170
+ (onClick)="executeAction(item)"
3171
+ >
3172
+ </ax-button-item>
3173
+ }
3174
+ </ax-button-item-list>
3175
+ </ax-dropdown-button>
3176
+ } @else {
3177
+ <ax-button
3178
+ [disabled]="action.disabled || isSubmitting()"
3179
+ [text]="(action.title | translate | async)!"
3180
+ [look]="'solid'"
3181
+ [color]="action.color"
3182
+ (onClick)="executeAction(action)"
3183
+ >
3184
+ @if (isFormLoading()) {
3185
+ <ax-loading></ax-loading>
3186
+ }
3187
+ @if (action.icon) {
3188
+ <ax-prefix>
3189
+ <ax-icon [icon]="action.icon"></ax-icon>
3190
+ </ax-prefix>
3191
+ }
3192
+ </ax-button>
3193
+ }
3161
3194
  }
3162
3195
  <axp-component-slot name="dialog-footer-suffix" [context]="context()"></axp-component-slot>
3163
3196
  </ax-suffix>
3164
3197
  </ax-footer>
3165
3198
  }
3166
- `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: AXPLayoutRendererComponent, selector: "axp-layout-renderer", inputs: ["layout", "context", "look", "mode"], outputs: ["contextChange", "contextInitiated", "validityChange"] }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i1$1.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i2$1.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i2$1.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXLoadingModule }, { kind: "component", type: i3.AXLoadingComponent, selector: "ax-loading", inputs: ["visible", "type", "context"], outputs: ["visibleChange"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "ngmodule", type: AXPComponentSlotModule }, { kind: "directive", type: i4.AXPComponentSlotDirective, selector: "axp-component-slot", inputs: ["name", "host", "context"], exportAs: ["slot"] }, { kind: "pipe", type: i5.AsyncPipe, name: "async" }, { kind: "pipe", type: i6.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3199
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: AXPLayoutRendererComponent, selector: "axp-layout-renderer", inputs: ["layout", "context", "look", "mode"], outputs: ["contextChange", "contextInitiated", "validityChange"] }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i1$1.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "component", type: i1$1.AXButtonItemComponent, selector: "ax-button-item", inputs: ["color", "disabled", "text", "selected", "divided", "data", "name"], outputs: ["onClick", "onFocus", "onBlur", "disabledChange"] }, { kind: "component", type: i1$1.AXButtonItemListComponent, selector: "ax-button-item-list", inputs: ["items", "closeParentOnClick", "lockOnLoading"], outputs: ["onItemClick"] }, { kind: "ngmodule", type: AXDropdownButtonModule }, { kind: "component", type: i2$1.AXDropdownButtonComponent, selector: "ax-dropdown-button", inputs: ["disabled", "size", "color", "look", "text", "type", "mode"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "lookChange", "colorChange", "disabledChange"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i3.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i3.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXLoadingModule }, { kind: "component", type: i4.AXLoadingComponent, selector: "ax-loading", inputs: ["visible", "type", "context"], outputs: ["visibleChange"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "ngmodule", type: AXPComponentSlotModule }, { kind: "directive", type: i5.AXPComponentSlotDirective, selector: "axp-component-slot", inputs: ["name", "host", "context"], exportAs: ["slot"] }, { kind: "pipe", type: i6.AsyncPipe, name: "async" }, { kind: "pipe", type: i7.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3167
3200
  }
3168
3201
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPDialogRendererComponent, decorators: [{
3169
3202
  type: Component,
@@ -3174,6 +3207,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
3174
3207
  CommonModule,
3175
3208
  AXPLayoutRendererComponent,
3176
3209
  AXButtonModule,
3210
+ AXDropdownButtonModule,
3177
3211
  AXDecoratorModule,
3178
3212
  AXLoadingModule,
3179
3213
  AXTranslationModule,
@@ -3223,22 +3257,52 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
3223
3257
  </ax-prefix>
3224
3258
  <ax-suffix>
3225
3259
  @for (action of footerSuffixActions(); track $index) {
3226
- <ax-button
3227
- [disabled]="action.disabled || isSubmitting()"
3228
- [text]="(action.title | translate | async)!"
3229
- [look]="'solid'"
3230
- [color]="action.color"
3231
- (onClick)="executeAction(action)"
3232
- >
3233
- @if (isFormLoading()) {
3234
- <ax-loading></ax-loading>
3235
- }
3236
- @if (action.icon) {
3237
- <ax-prefix>
3238
- <ax-icon [icon]="action.icon"></ax-icon>
3239
- </ax-prefix>
3240
- }
3241
- </ax-button>
3260
+ @if (action.items?.length) {
3261
+ <ax-dropdown-button
3262
+ [disabled]="action.disabled || isSubmitting()"
3263
+ [text]="(action.title | translate | async)!"
3264
+ [look]="'solid'"
3265
+ [color]="action.color"
3266
+ [mode]="'split'"
3267
+ (onClick)="executeAction(action)"
3268
+ >
3269
+ @if (isFormLoading()) {
3270
+ <ax-loading></ax-loading>
3271
+ }
3272
+ @if (action.icon) {
3273
+ <ax-prefix>
3274
+ <ax-icon [icon]="action.icon"></ax-icon>
3275
+ </ax-prefix>
3276
+ }
3277
+ <ax-button-item-list>
3278
+ @for (item of action.items; track $index) {
3279
+ <ax-button-item
3280
+ [text]="(item.title | translate | async)!"
3281
+ [disabled]="item.disabled || isSubmitting()"
3282
+ (onClick)="executeAction(item)"
3283
+ >
3284
+ </ax-button-item>
3285
+ }
3286
+ </ax-button-item-list>
3287
+ </ax-dropdown-button>
3288
+ } @else {
3289
+ <ax-button
3290
+ [disabled]="action.disabled || isSubmitting()"
3291
+ [text]="(action.title | translate | async)!"
3292
+ [look]="'solid'"
3293
+ [color]="action.color"
3294
+ (onClick)="executeAction(action)"
3295
+ >
3296
+ @if (isFormLoading()) {
3297
+ <ax-loading></ax-loading>
3298
+ }
3299
+ @if (action.icon) {
3300
+ <ax-prefix>
3301
+ <ax-icon [icon]="action.icon"></ax-icon>
3302
+ </ax-prefix>
3303
+ }
3304
+ </ax-button>
3305
+ }
3242
3306
  }
3243
3307
  <axp-component-slot name="dialog-footer-suffix" [context]="context()"></axp-component-slot>
3244
3308
  </ax-suffix>