@acorex-platform/framework-client 0.0.10 → 0.0.14
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.
- package/fesm2022/acorex-platform-framework-client-auth.mjs +285 -50
- package/fesm2022/acorex-platform-framework-client-auth.mjs.map +1 -1
- package/fesm2022/{acorex-platform-framework-client-common-common-settings.provider-CbzOYCnI.mjs → acorex-platform-framework-client-common-common-settings.provider-Euotv9l0.mjs} +55 -36
- package/fesm2022/acorex-platform-framework-client-common-common-settings.provider-Euotv9l0.mjs.map +1 -0
- package/fesm2022/acorex-platform-framework-client-common-settings-dialog.helper-DQNOCRL6.mjs +29 -0
- package/fesm2022/acorex-platform-framework-client-common-settings-dialog.helper-DQNOCRL6.mjs.map +1 -0
- package/fesm2022/acorex-platform-framework-client-common.mjs +1576 -408
- package/fesm2022/acorex-platform-framework-client-common.mjs.map +1 -1
- package/fesm2022/acorex-platform-framework-client-core.mjs +561 -25
- package/fesm2022/acorex-platform-framework-client-core.mjs.map +1 -1
- package/fesm2022/acorex-platform-framework-client-layout-builder.mjs +154 -42
- package/fesm2022/acorex-platform-framework-client-layout-builder.mjs.map +1 -1
- package/fesm2022/{acorex-platform-framework-client-layout-components-binding-expression-editor-popup.component-CWVU3wXL.mjs → acorex-platform-framework-client-layout-components-binding-expression-editor-popup.component-CjnQ9hAJ.mjs} +7 -7
- package/fesm2022/acorex-platform-framework-client-layout-components-binding-expression-editor-popup.component-CjnQ9hAJ.mjs.map +1 -0
- package/fesm2022/acorex-platform-framework-client-layout-components-file-provider-picker.popup.component-fFen8w8M.mjs +77 -0
- package/fesm2022/acorex-platform-framework-client-layout-components-file-provider-picker.popup.component-fFen8w8M.mjs.map +1 -0
- package/fesm2022/acorex-platform-framework-client-layout-components.mjs +2378 -1274
- package/fesm2022/acorex-platform-framework-client-layout-components.mjs.map +1 -1
- package/fesm2022/acorex-platform-framework-client-layout-designer.mjs +92 -84
- package/fesm2022/acorex-platform-framework-client-layout-designer.mjs.map +1 -1
- package/fesm2022/{acorex-platform-framework-client-layout-entity-attachments-page.component-CxBxxpmA.mjs → acorex-platform-framework-client-layout-entity-attachments-page.component-BzUM-JMC.mjs} +3 -3
- package/fesm2022/{acorex-platform-framework-client-layout-entity-attachments-page.component-CxBxxpmA.mjs.map → acorex-platform-framework-client-layout-entity-attachments-page.component-BzUM-JMC.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-framework-client-layout-entity-file-list-popup.component-l0JAHKIH.mjs → acorex-platform-framework-client-layout-entity-file-list-popup.component-Ci_CTFtq.mjs} +6 -6
- package/fesm2022/acorex-platform-framework-client-layout-entity-file-list-popup.component-Ci_CTFtq.mjs.map +1 -0
- package/fesm2022/acorex-platform-framework-client-layout-entity-gallery-page.component-DmiB__JR.mjs +256 -0
- package/fesm2022/acorex-platform-framework-client-layout-entity-gallery-page.component-DmiB__JR.mjs.map +1 -0
- package/fesm2022/acorex-platform-framework-client-layout-entity.mjs +17599 -17114
- package/fesm2022/acorex-platform-framework-client-layout-entity.mjs.map +1 -1
- package/fesm2022/acorex-platform-framework-client-layout-views.mjs +120 -70
- package/fesm2022/acorex-platform-framework-client-layout-views.mjs.map +1 -1
- package/fesm2022/acorex-platform-framework-client-layout-widget-core.mjs +302 -263
- package/fesm2022/acorex-platform-framework-client-layout-widget-core.mjs.map +1 -1
- package/fesm2022/{acorex-platform-framework-client-layout-widgets-button-widget-designer.component-CpkWwygb.mjs → acorex-platform-framework-client-layout-widgets-button-widget-designer.component-CIwpAXbL.mjs} +2 -2
- package/fesm2022/acorex-platform-framework-client-layout-widgets-button-widget-designer.component-CIwpAXbL.mjs.map +1 -0
- package/fesm2022/{acorex-platform-framework-client-layout-widgets-image-preview.popup-C_EPAvCU.mjs → acorex-platform-framework-client-layout-widgets-image-preview.popup-CazpERbX.mjs} +3 -3
- package/fesm2022/acorex-platform-framework-client-layout-widgets-image-preview.popup-CazpERbX.mjs.map +1 -0
- package/fesm2022/{acorex-platform-framework-client-layout-widgets-page-widget-designer.component-CmtTq2Mt.mjs → acorex-platform-framework-client-layout-widgets-page-widget-designer.component-DKkJi40s.mjs} +5 -5
- package/fesm2022/{acorex-platform-framework-client-layout-widgets-page-widget-designer.component-CmtTq2Mt.mjs.map → acorex-platform-framework-client-layout-widgets-page-widget-designer.component-DKkJi40s.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-framework-client-layout-widgets-repeater-widget-column.component-DSx0E3NV.mjs → acorex-platform-framework-client-layout-widgets-repeater-widget-column.component-DtYZfA79.mjs} +3 -3
- package/fesm2022/{acorex-platform-framework-client-layout-widgets-repeater-widget-column.component-DSx0E3NV.mjs.map → acorex-platform-framework-client-layout-widgets-repeater-widget-column.component-DtYZfA79.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-framework-client-layout-widgets-tabular-data-edit-popup.component-DdfcGV1C.mjs → acorex-platform-framework-client-layout-widgets-tabular-data-edit-popup.component-nMUtxAyy.mjs} +10 -10
- package/fesm2022/acorex-platform-framework-client-layout-widgets-tabular-data-edit-popup.component-nMUtxAyy.mjs.map +1 -0
- package/fesm2022/{acorex-platform-framework-client-layout-widgets-tabular-data-view-popup.component-CntopmDS.mjs → acorex-platform-framework-client-layout-widgets-tabular-data-view-popup.component-DvUSZ4hJ.mjs} +5 -5
- package/fesm2022/acorex-platform-framework-client-layout-widgets-tabular-data-view-popup.component-DvUSZ4hJ.mjs.map +1 -0
- package/fesm2022/acorex-platform-framework-client-layout-widgets-text-block-widget-designer.component-BihIfkZW.mjs +61 -0
- package/fesm2022/acorex-platform-framework-client-layout-widgets-text-block-widget-designer.component-BihIfkZW.mjs.map +1 -0
- package/fesm2022/acorex-platform-framework-client-layout-widgets.mjs +2218 -1504
- package/fesm2022/acorex-platform-framework-client-layout-widgets.mjs.map +1 -1
- package/fesm2022/acorex-platform-framework-client-realtime.mjs +227 -0
- package/fesm2022/acorex-platform-framework-client-realtime.mjs.map +1 -0
- package/fesm2022/acorex-platform-framework-client-runtime.mjs +201 -13
- package/fesm2022/acorex-platform-framework-client-runtime.mjs.map +1 -1
- package/fesm2022/acorex-platform-framework-client-themes-default-entity-master-create-view.component-QIFX11dh.mjs +158 -0
- package/fesm2022/acorex-platform-framework-client-themes-default-entity-master-create-view.component-QIFX11dh.mjs.map +1 -0
- package/fesm2022/acorex-platform-framework-client-themes-default-entity-master-modify-view.component-BBdellyL.mjs +119 -0
- package/fesm2022/acorex-platform-framework-client-themes-default-entity-master-modify-view.component-BBdellyL.mjs.map +1 -0
- package/fesm2022/{acorex-platform-framework-client-themes-default-entity-master-single-view.component-D1a7UI71.mjs → acorex-platform-framework-client-themes-default-entity-master-single-view.component-CIf1VWNW.mjs} +5 -6
- package/fesm2022/acorex-platform-framework-client-themes-default-entity-master-single-view.component-CIf1VWNW.mjs.map +1 -0
- package/fesm2022/acorex-platform-framework-client-themes-default-error-401.component-C_czT_JC.mjs +48 -0
- package/fesm2022/acorex-platform-framework-client-themes-default-error-401.component-C_czT_JC.mjs.map +1 -0
- package/fesm2022/acorex-platform-framework-client-themes-default-error-404.component-C2Wu0YtF.mjs +42 -0
- package/fesm2022/acorex-platform-framework-client-themes-default-error-404.component-C2Wu0YtF.mjs.map +1 -0
- package/fesm2022/acorex-platform-framework-client-themes-default-error-offline.component-DRz-kVsT.mjs +19 -0
- package/fesm2022/acorex-platform-framework-client-themes-default-error-offline.component-DRz-kVsT.mjs.map +1 -0
- package/fesm2022/acorex-platform-framework-client-themes-default.mjs +123 -96
- package/fesm2022/acorex-platform-framework-client-themes-default.mjs.map +1 -1
- package/fesm2022/{acorex-platform-framework-client-themes-shared-icon-chooser-column.component-CXSGiTCK.mjs → acorex-platform-framework-client-themes-shared-icon-chooser-column.component-Ci_oH7NE.mjs} +3 -3
- package/fesm2022/acorex-platform-framework-client-themes-shared-icon-chooser-column.component-Ci_oH7NE.mjs.map +1 -0
- package/fesm2022/{acorex-platform-framework-client-themes-shared-icon-chooser-view.component-BY5clQ1J.mjs → acorex-platform-framework-client-themes-shared-icon-chooser-view.component-Lb1G2Xz7.mjs} +3 -3
- package/fesm2022/acorex-platform-framework-client-themes-shared-icon-chooser-view.component-Lb1G2Xz7.mjs.map +1 -0
- package/fesm2022/{acorex-platform-framework-client-themes-shared-settings.provider-DEL2YOTP.mjs → acorex-platform-framework-client-themes-shared-settings.provider-D2XPkc71.mjs} +11 -2
- package/fesm2022/acorex-platform-framework-client-themes-shared-settings.provider-D2XPkc71.mjs.map +1 -0
- package/fesm2022/{acorex-platform-framework-client-themes-shared-theme-color-chooser-column.component-BXl8u4Yp.mjs → acorex-platform-framework-client-themes-shared-theme-color-chooser-column.component-D4ubvFYf.mjs} +7 -7
- package/fesm2022/acorex-platform-framework-client-themes-shared-theme-color-chooser-column.component-D4ubvFYf.mjs.map +1 -0
- package/fesm2022/{acorex-platform-framework-client-themes-shared-theme-color-chooser-view.component-i2sOOkVj.mjs → acorex-platform-framework-client-themes-shared-theme-color-chooser-view.component-Br8j_BF_.mjs} +7 -7
- package/fesm2022/acorex-platform-framework-client-themes-shared-theme-color-chooser-view.component-Br8j_BF_.mjs.map +1 -0
- package/fesm2022/acorex-platform-framework-client-themes-shared.mjs +124 -112
- package/fesm2022/acorex-platform-framework-client-themes-shared.mjs.map +1 -1
- package/fesm2022/acorex-platform-framework-client-workflow.mjs +26 -483
- package/fesm2022/acorex-platform-framework-client-workflow.mjs.map +1 -1
- package/package.json +14 -9
- package/types/acorex-platform-framework-client-auth.d.ts +76 -5
- package/types/acorex-platform-framework-client-common.d.ts +499 -129
- package/types/acorex-platform-framework-client-core.d.ts +291 -10
- package/types/acorex-platform-framework-client-layout-builder.d.ts +81 -31
- package/types/acorex-platform-framework-client-layout-components.d.ts +295 -41
- package/types/acorex-platform-framework-client-layout-entity.d.ts +1895 -1743
- package/types/acorex-platform-framework-client-layout-views.d.ts +8 -18
- package/types/acorex-platform-framework-client-layout-widget-core.d.ts +20 -35
- package/types/acorex-platform-framework-client-layout-widgets.d.ts +167 -33
- package/types/acorex-platform-framework-client-realtime.d.ts +100 -0
- package/types/acorex-platform-framework-client-runtime.d.ts +60 -2
- package/types/acorex-platform-framework-client-themes-default.d.ts +4 -48
- package/types/acorex-platform-framework-client-workflow.d.ts +16 -127
- package/fesm2022/acorex-platform-framework-client-common-common-settings.provider-CbzOYCnI.mjs.map +0 -1
- package/fesm2022/acorex-platform-framework-client-layout-components-binding-expression-editor-popup.component-CWVU3wXL.mjs.map +0 -1
- package/fesm2022/acorex-platform-framework-client-layout-entity-file-list-popup.component-l0JAHKIH.mjs.map +0 -1
- package/fesm2022/acorex-platform-framework-client-layout-widgets-button-widget-designer.component-CpkWwygb.mjs.map +0 -1
- package/fesm2022/acorex-platform-framework-client-layout-widgets-image-preview.popup-C_EPAvCU.mjs.map +0 -1
- package/fesm2022/acorex-platform-framework-client-layout-widgets-tabular-data-edit-popup.component-DdfcGV1C.mjs.map +0 -1
- package/fesm2022/acorex-platform-framework-client-layout-widgets-tabular-data-view-popup.component-CntopmDS.mjs.map +0 -1
- package/fesm2022/acorex-platform-framework-client-layout-widgets-text-block-widget-designer.component-B5kSWxGk.mjs +0 -34
- package/fesm2022/acorex-platform-framework-client-layout-widgets-text-block-widget-designer.component-B5kSWxGk.mjs.map +0 -1
- package/fesm2022/acorex-platform-framework-client-themes-default-entity-master-create-view.component-DnTHwsDJ.mjs +0 -160
- package/fesm2022/acorex-platform-framework-client-themes-default-entity-master-create-view.component-DnTHwsDJ.mjs.map +0 -1
- package/fesm2022/acorex-platform-framework-client-themes-default-entity-master-modify-view.component-BpR9g6QS.mjs +0 -121
- package/fesm2022/acorex-platform-framework-client-themes-default-entity-master-modify-view.component-BpR9g6QS.mjs.map +0 -1
- package/fesm2022/acorex-platform-framework-client-themes-default-entity-master-single-view.component-D1a7UI71.mjs.map +0 -1
- package/fesm2022/acorex-platform-framework-client-themes-default-error-401.component-D--_MIar.mjs +0 -48
- package/fesm2022/acorex-platform-framework-client-themes-default-error-401.component-D--_MIar.mjs.map +0 -1
- package/fesm2022/acorex-platform-framework-client-themes-default-error-404.component-Byyqk8pH.mjs +0 -42
- package/fesm2022/acorex-platform-framework-client-themes-default-error-404.component-Byyqk8pH.mjs.map +0 -1
- package/fesm2022/acorex-platform-framework-client-themes-default-error-offline.component-DR6G8gPC.mjs +0 -19
- package/fesm2022/acorex-platform-framework-client-themes-default-error-offline.component-DR6G8gPC.mjs.map +0 -1
- package/fesm2022/acorex-platform-framework-client-themes-shared-icon-chooser-column.component-CXSGiTCK.mjs.map +0 -1
- package/fesm2022/acorex-platform-framework-client-themes-shared-icon-chooser-view.component-BY5clQ1J.mjs.map +0 -1
- package/fesm2022/acorex-platform-framework-client-themes-shared-settings.provider-DEL2YOTP.mjs.map +0 -1
- package/fesm2022/acorex-platform-framework-client-themes-shared-theme-color-chooser-column.component-BXl8u4Yp.mjs.map +0 -1
- package/fesm2022/acorex-platform-framework-client-themes-shared-theme-color-chooser-view.component-i2sOOkVj.mjs.map +0 -1
|
@@ -2,11 +2,12 @@ import * as i5 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
|
-
import { provideCommandSetups, AXPCommandService } from '@acorex-platform/framework-client/runtime';
|
|
6
|
-
import { AXPopupService } from '@acorex/components/popup';
|
|
7
5
|
import * as i4 from '@acorex-platform/framework-client/core';
|
|
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/framework-client/core';
|
|
6
|
+
import { AXPHookService, resolveDialogActionShortcuts, DEFAULT_CANCEL_DIALOG_ACTION_SHORTCUTS, DEFAULT_SUBMIT_DIALOG_ACTION_SHORTCUTS, AXP_SETTINGS_DEFINITION_DIALOG_OPENER, findOverlayContainerAncestor, getNestedVisibleOverlayPanes, getTopVisibleOverlayContainer, AXPExpressionEvaluatorService, AXPKeyboardShortcutRegistry, normalizeDialogActionShortcutChord, isDialogShortcutAllowedInEditableField, resolveConfiguredFooterActionShortcuts, AXPComponentSlotModule, AXPContextStore } from '@acorex-platform/framework-client/core';
|
|
9
7
|
export { DEFAULT_CANCEL_DIALOG_ACTION_SHORTCUTS, DEFAULT_SUBMIT_DIALOG_ACTION_SHORTCUTS } from '@acorex-platform/framework-client/core';
|
|
8
|
+
import { provideCommandSetups, AXPCommandService } from '@acorex-platform/framework-client/runtime';
|
|
9
|
+
import { AXP_PREVIEW_WIDGET_FIELD_COMMAND_KEY, AXPKeyboardShortcutPriority } from '@acorex-platform/framework-shared/core';
|
|
10
|
+
import { AXPopupService } from '@acorex/components/popup';
|
|
10
11
|
import * as i1 from '@acorex-platform/framework-client/layout/widget-core';
|
|
11
12
|
import { AXPWidgetSerializationHelper, AXPWidgetContainerComponent, AXPWidgetCoreModule, AXPWidgetRegistryService } from '@acorex-platform/framework-client/layout/widget-core';
|
|
12
13
|
import { cloneDeep, isNil, set, isEqual, merge } from 'lodash-es';
|
|
@@ -14,7 +15,6 @@ import { AXPPageStatus } from '@acorex-platform/framework-shared/widget-core';
|
|
|
14
15
|
import * as i2 from '@acorex/components/form';
|
|
15
16
|
import { AXFormComponent, AXFormModule } from '@acorex/components/form';
|
|
16
17
|
import { Subject, debounceTime, distinctUntilChanged, startWith } from 'rxjs';
|
|
17
|
-
import { AXP_PREVIEW_WIDGET_FIELD_COMMAND_KEY, AXPKeyboardShortcutPriority } from '@acorex-platform/framework-shared/core';
|
|
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';
|
|
@@ -2366,9 +2366,13 @@ class AXPLayoutRendererComponent {
|
|
|
2366
2366
|
[mode]="effectiveRenderMode()"
|
|
2367
2367
|
></ng-container>
|
|
2368
2368
|
}
|
|
2369
|
-
|
|
2369
|
+
</axp-widgets-container>
|
|
2370
|
+
<ax-validation-summary
|
|
2371
|
+
[displayMode]="'toast'"
|
|
2372
|
+
[autoHide]="true"
|
|
2373
|
+
></ax-validation-summary>
|
|
2370
2374
|
</ax-form>
|
|
2371
|
-
`, isInline: true, styles: [":host{display:block;width:100%}\n"], dependencies: [{ kind: "ngmodule", type: AXPWidgetCoreModule }, { kind: "component", type: i1.AXPWidgetContainerComponent, selector: "axp-widgets-container", inputs: ["context", "functions"], outputs: ["onContextChanged"] }, { kind: "directive", type: i1.AXPWidgetRendererDirective, selector: "[axp-widget-renderer]", inputs: ["parentNode", "index", "mode", "node"], outputs: ["onOptionsChanged", "onValueChanged", "onLoad"], exportAs: ["widgetRenderer"] }, { kind: "ngmodule", type: AXFormModule }, { kind: "component", type: i2.AXFormComponent, selector: "ax-form", inputs: ["disabled", "readonly", "labelMode", "look", "messageStyle", "updateOn", "inUserInteractionActive"], outputs: ["onValidate", "updateOnChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2375
|
+
`, isInline: true, styles: [":host{display:block;width:100%}\n"], dependencies: [{ kind: "ngmodule", type: AXPWidgetCoreModule }, { kind: "component", type: i1.AXPWidgetContainerComponent, selector: "axp-widgets-container", inputs: ["context", "functions"], outputs: ["onContextChanged"] }, { kind: "directive", type: i1.AXPWidgetRendererDirective, selector: "[axp-widget-renderer]", inputs: ["parentNode", "index", "mode", "node"], outputs: ["onOptionsChanged", "onValueChanged", "onLoad"], exportAs: ["widgetRenderer"] }, { kind: "ngmodule", type: AXFormModule }, { kind: "component", type: i2.AXFormComponent, selector: "ax-form", inputs: ["disabled", "readonly", "labelMode", "look", "messageStyle", "updateOn", "inUserInteractionActive"], outputs: ["onValidate", "updateOnChange"] }, { kind: "component", type: i2.AXValidationSummaryComponent, selector: "ax-validation-summary", inputs: ["title", "displayMode", "timeOut", "autoHide"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2372
2376
|
}
|
|
2373
2377
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPLayoutRendererComponent, decorators: [{
|
|
2374
2378
|
type: Component,
|
|
@@ -2382,16 +2386,99 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
2382
2386
|
[mode]="effectiveRenderMode()"
|
|
2383
2387
|
></ng-container>
|
|
2384
2388
|
}
|
|
2385
|
-
|
|
2389
|
+
</axp-widgets-container>
|
|
2390
|
+
<ax-validation-summary
|
|
2391
|
+
[displayMode]="'toast'"
|
|
2392
|
+
[autoHide]="true"
|
|
2393
|
+
></ax-validation-summary>
|
|
2386
2394
|
</ax-form>
|
|
2387
2395
|
`, styles: [":host{display:block;width:100%}\n"] }]
|
|
2388
2396
|
}], propDecorators: { layout: [{ type: i0.Input, args: [{ isSignal: true, alias: "layout", required: true }] }], context: [{ type: i0.Input, args: [{ isSignal: true, alias: "context", required: false }] }, { type: i0.Output, args: ["contextChange"] }], look: [{ type: i0.Input, args: [{ isSignal: true, alias: "look", required: false }] }], mode: [{ type: i0.Input, args: [{ isSignal: true, alias: "mode", required: false }] }], contextInitiated: [{ type: i0.Output, args: ["contextInitiated"] }], validityChange: [{ type: i0.Output, args: ["validityChange"] }], form: [{ type: i0.ViewChild, args: [i0.forwardRef(() => AXFormComponent), { isSignal: true }] }], container: [{ type: i0.ViewChild, args: [i0.forwardRef(() => AXPWidgetContainerComponent), { isSignal: true }] }] } });
|
|
2389
2397
|
|
|
2398
|
+
//#region ---- Settings definition dialog opener ----
|
|
2399
|
+
function appendSettingField(flex, setting) {
|
|
2400
|
+
flex.formField(setting.title, (formField) => {
|
|
2401
|
+
formField.path(setting.name);
|
|
2402
|
+
if (setting.description) {
|
|
2403
|
+
formField.setOptions({
|
|
2404
|
+
hint: setting.description,
|
|
2405
|
+
hintDisplayMode: 'note',
|
|
2406
|
+
});
|
|
2407
|
+
}
|
|
2408
|
+
formField.customWidget(setting.widget.type, {
|
|
2409
|
+
...(setting.widget.options ?? {}),
|
|
2410
|
+
...(setting.isRequired ? { validations: [{ rule: 'required' }] } : {}),
|
|
2411
|
+
});
|
|
2412
|
+
});
|
|
2413
|
+
}
|
|
2414
|
+
class AXPSettingsDefinitionDialogOpenerService {
|
|
2415
|
+
constructor() {
|
|
2416
|
+
this.layoutBuilder = inject(AXPLayoutBuilderService);
|
|
2417
|
+
}
|
|
2418
|
+
async open(request) {
|
|
2419
|
+
const { config, context, scope, settings } = request;
|
|
2420
|
+
try {
|
|
2421
|
+
const result = await this.layoutBuilder
|
|
2422
|
+
.create()
|
|
2423
|
+
.dialog((dialog) => {
|
|
2424
|
+
dialog
|
|
2425
|
+
.setTitle(config.title)
|
|
2426
|
+
.setMessage(config.description)
|
|
2427
|
+
.setSize(config.size ?? 'md')
|
|
2428
|
+
.setCloseButton(true)
|
|
2429
|
+
.setContext(context)
|
|
2430
|
+
.content((flex) => {
|
|
2431
|
+
flex.setDirection('column').setGap('16px');
|
|
2432
|
+
for (const section of config.sections) {
|
|
2433
|
+
for (const setting of section.settings) {
|
|
2434
|
+
appendSettingField(flex, setting);
|
|
2435
|
+
}
|
|
2436
|
+
}
|
|
2437
|
+
})
|
|
2438
|
+
.setActions((actions) => {
|
|
2439
|
+
actions.cancel('@general:actions.cancel.title').submit('@general:actions.apply.title');
|
|
2440
|
+
})
|
|
2441
|
+
.onAction(async (dialogRef) => {
|
|
2442
|
+
const action = dialogRef.action();
|
|
2443
|
+
if (action === 'cancel') {
|
|
2444
|
+
return { saved: false };
|
|
2445
|
+
}
|
|
2446
|
+
const ctx = dialogRef.context();
|
|
2447
|
+
if (!ctx) {
|
|
2448
|
+
return { saved: false };
|
|
2449
|
+
}
|
|
2450
|
+
const values = {};
|
|
2451
|
+
for (const setting of settings) {
|
|
2452
|
+
values[setting.name] = ctx[setting.name];
|
|
2453
|
+
}
|
|
2454
|
+
await scope.set(values, { flush: true });
|
|
2455
|
+
return { saved: true };
|
|
2456
|
+
});
|
|
2457
|
+
})
|
|
2458
|
+
.show();
|
|
2459
|
+
return Boolean(result?.saved);
|
|
2460
|
+
}
|
|
2461
|
+
catch {
|
|
2462
|
+
return false;
|
|
2463
|
+
}
|
|
2464
|
+
}
|
|
2465
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPSettingsDefinitionDialogOpenerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2466
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPSettingsDefinitionDialogOpenerService, providedIn: 'root' }); }
|
|
2467
|
+
}
|
|
2468
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPSettingsDefinitionDialogOpenerService, decorators: [{
|
|
2469
|
+
type: Injectable,
|
|
2470
|
+
args: [{ providedIn: 'root' }]
|
|
2471
|
+
}] });
|
|
2472
|
+
|
|
2390
2473
|
class LayoutBuilderModule {
|
|
2391
2474
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: LayoutBuilderModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
2392
2475
|
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.9", ngImport: i0, type: LayoutBuilderModule, imports: [CommonModule, AXPLayoutRendererComponent], exports: [AXPLayoutRendererComponent] }); }
|
|
2393
2476
|
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: LayoutBuilderModule, providers: [
|
|
2394
2477
|
AXPLayoutBuilderService,
|
|
2478
|
+
{
|
|
2479
|
+
provide: AXP_SETTINGS_DEFINITION_DIALOG_OPENER,
|
|
2480
|
+
useExisting: AXPSettingsDefinitionDialogOpenerService,
|
|
2481
|
+
},
|
|
2395
2482
|
provideCommandSetups([
|
|
2396
2483
|
{
|
|
2397
2484
|
key: AXP_PREVIEW_WIDGET_FIELD_COMMAND_KEY,
|
|
@@ -2406,6 +2493,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
2406
2493
|
imports: [CommonModule, AXPLayoutRendererComponent],
|
|
2407
2494
|
providers: [
|
|
2408
2495
|
AXPLayoutBuilderService,
|
|
2496
|
+
{
|
|
2497
|
+
provide: AXP_SETTINGS_DEFINITION_DIALOG_OPENER,
|
|
2498
|
+
useExisting: AXPSettingsDefinitionDialogOpenerService,
|
|
2499
|
+
},
|
|
2409
2500
|
provideCommandSetups([
|
|
2410
2501
|
{
|
|
2411
2502
|
key: AXP_PREVIEW_WIDGET_FIELD_COMMAND_KEY,
|
|
@@ -2417,6 +2508,50 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
2417
2508
|
}]
|
|
2418
2509
|
}] });
|
|
2419
2510
|
|
|
2511
|
+
/**
|
|
2512
|
+
* Maps `dialog().show()` result to a typed form payload or `null` when cancelled / closed.
|
|
2513
|
+
*
|
|
2514
|
+
* Footer cancel typically returns `null` from `onAction`. Header X / Esc resolves to an
|
|
2515
|
+
* {@link AXPDialogRef} with `action() === 'cancel'` and **does not** run `onAction` — callers must
|
|
2516
|
+
* use this helper (or the same check) before treating a truthy result as form data.
|
|
2517
|
+
*/
|
|
2518
|
+
function resolveLayoutBuilderDialogResult(result) {
|
|
2519
|
+
if (result == null) {
|
|
2520
|
+
return null;
|
|
2521
|
+
}
|
|
2522
|
+
const dialogRef = result;
|
|
2523
|
+
if (typeof dialogRef.action === 'function' && dialogRef.action() === 'cancel') {
|
|
2524
|
+
return null;
|
|
2525
|
+
}
|
|
2526
|
+
return result;
|
|
2527
|
+
}
|
|
2528
|
+
/**
|
|
2529
|
+
* Builds the `show()` resolve payload for layout-builder custom footer commands (fallback path).
|
|
2530
|
+
*/
|
|
2531
|
+
function buildLayoutBuilderCustomActionRef(createDialogRef, command) {
|
|
2532
|
+
return {
|
|
2533
|
+
...createDialogRef(command),
|
|
2534
|
+
action: () => command,
|
|
2535
|
+
};
|
|
2536
|
+
}
|
|
2537
|
+
/**
|
|
2538
|
+
* Keeps legacy popup `data.context` / `data.action` side fields in sync for custom footer commands.
|
|
2539
|
+
*/
|
|
2540
|
+
function syncLegacyDialogDataSideFields(data, context, action) {
|
|
2541
|
+
if (!data) {
|
|
2542
|
+
return;
|
|
2543
|
+
}
|
|
2544
|
+
data.context = context;
|
|
2545
|
+
data.action = action;
|
|
2546
|
+
}
|
|
2547
|
+
/**
|
|
2548
|
+
* Cancel from an `onAction` handler should route through the dirty-close gate only when configured.
|
|
2549
|
+
* Otherwise preserve the original resolve-then-close sequence.
|
|
2550
|
+
*/
|
|
2551
|
+
function shouldRouteOnActionCancelThroughDismissGate(confirmCloseWhenDirtyEnabled) {
|
|
2552
|
+
return confirmCloseWhenDirtyEnabled === true;
|
|
2553
|
+
}
|
|
2554
|
+
|
|
2420
2555
|
//#region ---- Contracts barrel ----
|
|
2421
2556
|
//#endregion
|
|
2422
2557
|
|
|
@@ -2476,33 +2611,6 @@ function shouldDeferDialogShortcutsToNestedOverlay(document, dialogHost, overlay
|
|
|
2476
2611
|
return shouldDeferEscapeToNestedOverlayFromDom(document, dialogHost);
|
|
2477
2612
|
}
|
|
2478
2613
|
|
|
2479
|
-
/**
|
|
2480
|
-
* Builds the `show()` resolve payload for layout-builder custom footer commands (fallback path).
|
|
2481
|
-
*/
|
|
2482
|
-
function buildLayoutBuilderCustomActionRef(createDialogRef, command) {
|
|
2483
|
-
return {
|
|
2484
|
-
...createDialogRef(command),
|
|
2485
|
-
action: () => command,
|
|
2486
|
-
};
|
|
2487
|
-
}
|
|
2488
|
-
/**
|
|
2489
|
-
* Keeps legacy popup `data.context` / `data.action` side fields in sync for custom footer commands.
|
|
2490
|
-
*/
|
|
2491
|
-
function syncLegacyDialogDataSideFields(data, context, action) {
|
|
2492
|
-
if (!data) {
|
|
2493
|
-
return;
|
|
2494
|
-
}
|
|
2495
|
-
data.context = context;
|
|
2496
|
-
data.action = action;
|
|
2497
|
-
}
|
|
2498
|
-
/**
|
|
2499
|
-
* Cancel from an `onAction` handler should route through the dirty-close gate only when configured.
|
|
2500
|
-
* Otherwise preserve the original resolve-then-close sequence.
|
|
2501
|
-
*/
|
|
2502
|
-
function shouldRouteOnActionCancelThroughDismissGate(confirmCloseWhenDirtyEnabled) {
|
|
2503
|
-
return confirmCloseWhenDirtyEnabled === true;
|
|
2504
|
-
}
|
|
2505
|
-
|
|
2506
2614
|
/** Debounce after widget count stabilizes before re-evaluating footer actions. */
|
|
2507
2615
|
const DIALOG_WIDGET_COUNT_STABLE_DELAY_MS = 350;
|
|
2508
2616
|
class AXPDialogRendererComponent extends AXBasePageComponent {
|
|
@@ -2804,6 +2912,7 @@ class AXPDialogRendererComponent extends AXBasePageComponent {
|
|
|
2804
2912
|
if (onAction) {
|
|
2805
2913
|
const dialogRef = this.createDialogRef(cmd);
|
|
2806
2914
|
try {
|
|
2915
|
+
this.isDialogLoading.set(true);
|
|
2807
2916
|
const result = await Promise.resolve(onAction(dialogRef));
|
|
2808
2917
|
if (this.shouldKeepDialogOpenAfterCommandResult(result)) {
|
|
2809
2918
|
return;
|
|
@@ -2945,14 +3054,15 @@ class AXPDialogRendererComponent extends AXBasePageComponent {
|
|
|
2945
3054
|
return { widgetName: rest.slice(0, dot), action: rest.slice(dot + 1) };
|
|
2946
3055
|
}
|
|
2947
3056
|
async invokeWidget(widgetName, apiMethod, opts) {
|
|
2948
|
-
if (!this.widgetCoreService)
|
|
2949
|
-
return;
|
|
3057
|
+
if (!this.widgetCoreService) {
|
|
3058
|
+
return undefined;
|
|
3059
|
+
}
|
|
2950
3060
|
try {
|
|
2951
3061
|
const widget = this.widgetCoreService.getWidget(widgetName);
|
|
2952
3062
|
const api = widget?.api?.();
|
|
2953
3063
|
const fn = api?.[apiMethod];
|
|
2954
3064
|
if (typeof fn === 'function') {
|
|
2955
|
-
await Promise.resolve(fn({
|
|
3065
|
+
const result = await Promise.resolve(fn({
|
|
2956
3066
|
close: (result) => {
|
|
2957
3067
|
void this.closeWithOptionalSkipValidate(result);
|
|
2958
3068
|
},
|
|
@@ -2963,11 +3073,13 @@ class AXPDialogRendererComponent extends AXBasePageComponent {
|
|
|
2963
3073
|
}));
|
|
2964
3074
|
// Footer predicates (e.g. wizard step) must refresh when the widget advances outside executeAction (e.g. dialogRef.invokeWidget after entity-form continue).
|
|
2965
3075
|
await this.aggregateAndEvaluateActions();
|
|
3076
|
+
return result;
|
|
2966
3077
|
}
|
|
2967
3078
|
}
|
|
2968
3079
|
catch {
|
|
2969
3080
|
//
|
|
2970
3081
|
}
|
|
3082
|
+
return undefined;
|
|
2971
3083
|
}
|
|
2972
3084
|
async close(result, options) {
|
|
2973
3085
|
if (options?.skipDirtyConfirm) {
|
|
@@ -3098,9 +3210,9 @@ class AXPDialogRendererComponent extends AXBasePageComponent {
|
|
|
3098
3210
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPDialogRendererComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
3099
3211
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: AXPDialogRendererComponent, isStandalone: true, selector: "axp-dialog-renderer", outputs: { result: "result" }, providers: [AXPContextStore], viewQueries: [{ propertyName: "layoutRenderer", first: true, predicate: AXPLayoutRendererComponent, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: `
|
|
3100
3212
|
<axp-component-slot name="dialog-header" [context]="context()"></axp-component-slot>
|
|
3101
|
-
<div class="
|
|
3213
|
+
<div class="p-4">
|
|
3102
3214
|
<!-- @if (config.message) {
|
|
3103
|
-
<p class="
|
|
3215
|
+
<p class="mb-4 leading-relaxed">{{ config.message | translate | async }}</p>
|
|
3104
3216
|
} -->
|
|
3105
3217
|
<axp-layout-renderer
|
|
3106
3218
|
[layout]="config.definition"
|
|
@@ -3179,9 +3291,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
3179
3291
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
3180
3292
|
template: `
|
|
3181
3293
|
<axp-component-slot name="dialog-header" [context]="context()"></axp-component-slot>
|
|
3182
|
-
<div class="
|
|
3294
|
+
<div class="p-4">
|
|
3183
3295
|
<!-- @if (config.message) {
|
|
3184
|
-
<p class="
|
|
3296
|
+
<p class="mb-4 leading-relaxed">{{ config.message | translate | async }}</p>
|
|
3185
3297
|
} -->
|
|
3186
3298
|
<axp-layout-renderer
|
|
3187
3299
|
[layout]="config.definition"
|
|
@@ -3435,5 +3547,5 @@ var previewWidgetField_command = /*#__PURE__*/Object.freeze({
|
|
|
3435
3547
|
* Generated bundle index. Do not edit.
|
|
3436
3548
|
*/
|
|
3437
3549
|
|
|
3438
|
-
export { AXPDialogRendererComponent, AXPLayoutBuilderService, AXPLayoutConversionService, AXPLayoutRendererComponent, AXPPreviewWidgetFieldCommand, AXP_LAYOUT_BUILDER_DIALOG_BEFORE_OPEN_HOOK_KEY, AXP_LAYOUT_BUILDER_DIALOG_CONFIG_HOOK_KEY, AXP_LAYOUT_BUILDER_DIALOG_CONTEXT_CHANGED_HOOK_KEY, LayoutBuilderModule, createDismissedDialogRef };
|
|
3550
|
+
export { AXPDialogRendererComponent, AXPLayoutBuilderService, AXPLayoutConversionService, AXPLayoutRendererComponent, AXPPreviewWidgetFieldCommand, AXPSettingsDefinitionDialogOpenerService, AXP_LAYOUT_BUILDER_DIALOG_BEFORE_OPEN_HOOK_KEY, AXP_LAYOUT_BUILDER_DIALOG_CONFIG_HOOK_KEY, AXP_LAYOUT_BUILDER_DIALOG_CONTEXT_CHANGED_HOOK_KEY, LayoutBuilderModule, buildLayoutBuilderCustomActionRef, createDismissedDialogRef, resolveLayoutBuilderDialogResult, shouldRouteOnActionCancelThroughDismissGate, syncLegacyDialogDataSideFields };
|
|
3439
3551
|
//# sourceMappingURL=acorex-platform-framework-client-layout-builder.mjs.map
|