@acorex/platform 20.8.4 → 21.0.0-beta.0
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-auth.mjs +121 -27
- package/fesm2022/acorex-platform-auth.mjs.map +1 -1
- package/fesm2022/{acorex-platform-common-common-settings.provider-41RhWqb4.mjs → acorex-platform-common-common-settings.provider-G9XcXXOG.mjs} +4 -4
- package/fesm2022/acorex-platform-common-common-settings.provider-G9XcXXOG.mjs.map +1 -0
- package/fesm2022/acorex-platform-common.mjs +669 -268
- package/fesm2022/acorex-platform-common.mjs.map +1 -1
- package/fesm2022/acorex-platform-core.mjs +333 -140
- package/fesm2022/acorex-platform-core.mjs.map +1 -1
- package/fesm2022/acorex-platform-domain.mjs +557 -826
- package/fesm2022/acorex-platform-domain.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-builder.mjs +539 -110
- package/fesm2022/acorex-platform-layout-builder.mjs.map +1 -1
- package/fesm2022/{acorex-platform-layout-components-binding-expression-editor-popup.component-CSxCnzwU.mjs → acorex-platform-layout-components-binding-expression-editor-popup.component-CWV4XD36.mjs} +15 -15
- package/fesm2022/acorex-platform-layout-components-binding-expression-editor-popup.component-CWV4XD36.mjs.map +1 -0
- package/fesm2022/acorex-platform-layout-components.mjs +3285 -1035
- package/fesm2022/acorex-platform-layout-components.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-designer.mjs +488 -284
- package/fesm2022/acorex-platform-layout-designer.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-entity.mjs +16484 -12485
- package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-views.mjs +410 -170
- package/fesm2022/acorex-platform-layout-views.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-widget-core.mjs +548 -474
- package/fesm2022/acorex-platform-layout-widget-core.mjs.map +1 -1
- package/fesm2022/{acorex-platform-layout-widgets-button-widget-designer.component-CPBzE96V.mjs → acorex-platform-layout-widgets-button-widget-designer.component-fLjWiSFE.mjs} +11 -11
- package/fesm2022/acorex-platform-layout-widgets-button-widget-designer.component-fLjWiSFE.mjs.map +1 -0
- package/fesm2022/{acorex-platform-layout-widgets-file-list-popup.component-Dtv6U3df.mjs → acorex-platform-layout-widgets-file-list-popup.component-3oRAKxTo.mjs} +22 -77
- package/fesm2022/acorex-platform-layout-widgets-file-list-popup.component-3oRAKxTo.mjs.map +1 -0
- package/fesm2022/{acorex-platform-layout-widgets-image-preview.popup-QxJfswhK.mjs → acorex-platform-layout-widgets-image-preview.popup-CazpERbX.mjs} +8 -9
- package/fesm2022/acorex-platform-layout-widgets-image-preview.popup-CazpERbX.mjs.map +1 -0
- package/fesm2022/{acorex-platform-layout-widgets-page-widget-designer.component-CVdssZBD.mjs → acorex-platform-layout-widgets-page-widget-designer.component-BQ4G6aYf.mjs} +17 -17
- package/fesm2022/acorex-platform-layout-widgets-page-widget-designer.component-BQ4G6aYf.mjs.map +1 -0
- package/fesm2022/acorex-platform-layout-widgets-repeater-widget-column.component-DWuWxUF_.mjs +116 -0
- package/fesm2022/acorex-platform-layout-widgets-repeater-widget-column.component-DWuWxUF_.mjs.map +1 -0
- package/fesm2022/{acorex-platform-layout-widgets-tabular-data-edit-popup.component-DVaZN9QN.mjs → acorex-platform-layout-widgets-tabular-data-edit-popup.component-fV94u3t2.mjs} +25 -19
- package/fesm2022/acorex-platform-layout-widgets-tabular-data-edit-popup.component-fV94u3t2.mjs.map +1 -0
- package/fesm2022/{acorex-platform-layout-widgets-tabular-data-view-popup.component-DPGHgXa6.mjs → acorex-platform-layout-widgets-tabular-data-view-popup.component-DyuvQhgN.mjs} +9 -9
- package/fesm2022/acorex-platform-layout-widgets-tabular-data-view-popup.component-DyuvQhgN.mjs.map +1 -0
- package/fesm2022/{acorex-platform-layout-widgets-text-block-widget-designer.component-CdiNW691.mjs → acorex-platform-layout-widgets-text-block-widget-designer.component-EJMMdpIs.mjs} +7 -7
- package/fesm2022/acorex-platform-layout-widgets-text-block-widget-designer.component-EJMMdpIs.mjs.map +1 -0
- package/fesm2022/acorex-platform-layout-widgets.mjs +6396 -4058
- package/fesm2022/acorex-platform-layout-widgets.mjs.map +1 -1
- package/fesm2022/acorex-platform-native.mjs +8 -7
- package/fesm2022/acorex-platform-native.mjs.map +1 -1
- package/fesm2022/acorex-platform-runtime.mjs +328 -166
- package/fesm2022/acorex-platform-runtime.mjs.map +1 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-CkptOSO3.mjs +160 -0
- package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-CkptOSO3.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-DXC2qtvK.mjs +120 -0
- package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-DXC2qtvK.mjs.map +1 -0
- package/fesm2022/{acorex-platform-themes-default-entity-master-single-view.component-rGsMVAZj.mjs → acorex-platform-themes-default-entity-master-single-view.component-DYyunzKZ.mjs} +16 -23
- package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-DYyunzKZ.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default-error-401.component-C5lQECDP.mjs +31 -0
- package/fesm2022/acorex-platform-themes-default-error-401.component-C5lQECDP.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default-error-404.component-D5wBXAB-.mjs +25 -0
- package/fesm2022/acorex-platform-themes-default-error-404.component-D5wBXAB-.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default-error-offline.component-AhDiY3DI.mjs +19 -0
- package/fesm2022/acorex-platform-themes-default-error-offline.component-AhDiY3DI.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default.mjs +1687 -69
- package/fesm2022/acorex-platform-themes-default.mjs.map +1 -1
- package/fesm2022/{acorex-platform-themes-shared-icon-chooser-column.component-TJ9PWHMY.mjs → acorex-platform-themes-shared-icon-chooser-column.component-QL2-ZUVg.mjs} +8 -8
- package/fesm2022/acorex-platform-themes-shared-icon-chooser-column.component-QL2-ZUVg.mjs.map +1 -0
- package/fesm2022/{acorex-platform-themes-shared-icon-chooser-view.component-BHcKkIx0.mjs → acorex-platform-themes-shared-icon-chooser-view.component-BXydqPt_.mjs} +8 -8
- package/fesm2022/acorex-platform-themes-shared-icon-chooser-view.component-BXydqPt_.mjs.map +1 -0
- package/fesm2022/{acorex-platform-themes-shared-settings.provider-DSs1o1M6.mjs → acorex-platform-themes-shared-settings.provider-D13QB3Hr.mjs} +2 -2
- package/fesm2022/acorex-platform-themes-shared-settings.provider-D13QB3Hr.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-column.component-Cb9iY6k9.mjs +88 -0
- package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-column.component-Cb9iY6k9.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-view.component-KP4-BND5.mjs +80 -0
- package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-view.component-KP4-BND5.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-shared.mjs +572 -465
- package/fesm2022/acorex-platform-themes-shared.mjs.map +1 -1
- package/fesm2022/acorex-platform-workflow.mjs +276 -98
- package/fesm2022/acorex-platform-workflow.mjs.map +1 -1
- package/fesm2022/acorex-platform.mjs.map +1 -1
- package/package.json +34 -34
- package/{auth/index.d.ts → types/acorex-platform-auth.d.ts} +14 -2
- package/{common/index.d.ts → types/acorex-platform-common.d.ts} +261 -24
- package/{core/index.d.ts → types/acorex-platform-core.d.ts} +163 -42
- package/{domain/index.d.ts → types/acorex-platform-domain.d.ts} +744 -412
- package/{layout/builder/index.d.ts → types/acorex-platform-layout-builder.d.ts} +137 -38
- package/{layout/components/index.d.ts → types/acorex-platform-layout-components.d.ts} +808 -131
- package/{layout/designer/index.d.ts → types/acorex-platform-layout-designer.d.ts} +96 -18
- package/{layout/entity/index.d.ts → types/acorex-platform-layout-entity.d.ts} +695 -61
- package/{layout/views/index.d.ts → types/acorex-platform-layout-views.d.ts} +80 -47
- package/{layout/widget-core/index.d.ts → types/acorex-platform-layout-widget-core.d.ts} +274 -197
- package/{layout/widgets/index.d.ts → types/acorex-platform-layout-widgets.d.ts} +583 -104
- package/{native/index.d.ts → types/acorex-platform-native.d.ts} +0 -7
- package/types/acorex-platform-runtime.d.ts +565 -0
- package/{themes/default/index.d.ts → types/acorex-platform-themes-default.d.ts} +105 -4
- package/{themes/shared/index.d.ts → types/acorex-platform-themes-shared.d.ts} +14 -5
- package/{workflow/index.d.ts → types/acorex-platform-workflow.d.ts} +96 -81
- package/fesm2022/acorex-platform-common-common-settings.provider-41RhWqb4.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-components-binding-expression-editor-popup.component-CSxCnzwU.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-button-widget-designer.component-CPBzE96V.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-file-list-popup.component-Dtv6U3df.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-image-preview.popup-QxJfswhK.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-page-widget-designer.component-CVdssZBD.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-repeater-widget-column.component-BCxE0RTB.mjs +0 -111
- package/fesm2022/acorex-platform-layout-widgets-repeater-widget-column.component-BCxE0RTB.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-tabular-data-edit-popup.component-DVaZN9QN.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-tabular-data-view-popup.component-DPGHgXa6.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-text-block-widget-designer.component-CdiNW691.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-D4hU2SCE.mjs +0 -160
- package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-D4hU2SCE.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-CLDoygoI.mjs +0 -1610
- package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-CLDoygoI.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-BVTklnzs.mjs +0 -120
- package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-BVTklnzs.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-rGsMVAZj.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-error-401.component-53VB-PS_.mjs +0 -31
- package/fesm2022/acorex-platform-themes-default-error-401.component-53VB-PS_.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-error-404.component-DVF9soT5.mjs +0 -25
- package/fesm2022/acorex-platform-themes-default-error-404.component-DVF9soT5.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-error-offline.component-CwNNHzZn.mjs +0 -19
- package/fesm2022/acorex-platform-themes-default-error-offline.component-CwNNHzZn.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-shared-icon-chooser-column.component-TJ9PWHMY.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-shared-icon-chooser-view.component-BHcKkIx0.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-shared-settings.provider-DSs1o1M6.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-column.component-BUPs84MI.mjs +0 -65
- package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-column.component-BUPs84MI.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-view.component-BotknoHn.mjs +0 -64
- package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-view.component-BotknoHn.mjs.map +0 -1
- package/runtime/index.d.ts +0 -307
- /package/{index.d.ts → types/acorex-platform.d.ts} +0 -0
|
@@ -12,22 +12,22 @@ import { computed, EventEmitter, HostBinding, ChangeDetectionStrategy, Component
|
|
|
12
12
|
class AXPButtonWidgetDesignerComponent extends AXPLayoutBaseWidgetComponent {
|
|
13
13
|
constructor() {
|
|
14
14
|
super(...arguments);
|
|
15
|
-
this.disabled = computed(() => this.options()['disabled'], ...(ngDevMode ? [{ debugName: "disabled" }] : []));
|
|
16
|
-
this.color = computed(() => this.options()['color']?.id ?? 'primary', ...(ngDevMode ? [{ debugName: "color" }] : []));
|
|
17
|
-
this.look = computed(() => this.options()['look']?.id ?? 'solid', ...(ngDevMode ? [{ debugName: "look" }] : []));
|
|
18
|
-
this.text = computed(() => this.options()['text'], ...(ngDevMode ? [{ debugName: "text" }] : []));
|
|
19
|
-
this.loading = computed(() => this.options()['loading'], ...(ngDevMode ? [{ debugName: "loading" }] : []));
|
|
20
|
-
this.icon = computed(() => this.options()['icon'], ...(ngDevMode ? [{ debugName: "icon" }] : []));
|
|
15
|
+
this.disabled = computed(() => this.options()['disabled'], ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
16
|
+
this.color = computed(() => this.options()['color']?.id ?? 'primary', ...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
|
|
17
|
+
this.look = computed(() => this.options()['look']?.id ?? 'solid', ...(ngDevMode ? [{ debugName: "look" }] : /* istanbul ignore next */ []));
|
|
18
|
+
this.text = computed(() => this.options()['text'], ...(ngDevMode ? [{ debugName: "text" }] : /* istanbul ignore next */ []));
|
|
19
|
+
this.loading = computed(() => this.options()['loading'], ...(ngDevMode ? [{ debugName: "loading" }] : /* istanbul ignore next */ []));
|
|
20
|
+
this.icon = computed(() => this.options()['icon'], ...(ngDevMode ? [{ debugName: "icon" }] : /* istanbul ignore next */ []));
|
|
21
21
|
this.onClick = new EventEmitter();
|
|
22
22
|
}
|
|
23
23
|
get __class() {
|
|
24
24
|
const cls = {};
|
|
25
25
|
//
|
|
26
|
-
cls['
|
|
26
|
+
cls['inline-block'] = true;
|
|
27
27
|
return cls;
|
|
28
28
|
}
|
|
29
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
30
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
29
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPButtonWidgetDesignerComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
30
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: AXPButtonWidgetDesignerComponent, isStandalone: true, selector: "axp-button-widget-designer", host: { properties: { "class": "this.__class" } }, usesInheritance: true, ngImport: i0, template: `
|
|
31
31
|
<ax-button [disabled]="disabled()" [color]="color()" [look]="look()" [text]="text()">
|
|
32
32
|
@if (icon() && text()) {
|
|
33
33
|
<ax-prefix
|
|
@@ -42,7 +42,7 @@ class AXPButtonWidgetDesignerComponent extends AXPLayoutBaseWidgetComponent {
|
|
|
42
42
|
</ax-button>
|
|
43
43
|
`, isInline: true, dependencies: [{ kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i1.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: AXLoadingModule }, { kind: "component", type: i2.AXLoadingComponent, selector: "ax-loading", inputs: ["visible", "type", "context"], outputs: ["visibleChange"] }, { 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: AXBadgeModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
44
44
|
}
|
|
45
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
45
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPButtonWidgetDesignerComponent, decorators: [{
|
|
46
46
|
type: Component,
|
|
47
47
|
args: [{
|
|
48
48
|
selector: 'axp-button-widget-designer',
|
|
@@ -69,4 +69,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImpo
|
|
|
69
69
|
}] } });
|
|
70
70
|
|
|
71
71
|
export { AXPButtonWidgetDesignerComponent };
|
|
72
|
-
//# sourceMappingURL=acorex-platform-layout-widgets-button-widget-designer.component-
|
|
72
|
+
//# sourceMappingURL=acorex-platform-layout-widgets-button-widget-designer.component-fLjWiSFE.mjs.map
|
package/fesm2022/acorex-platform-layout-widgets-button-widget-designer.component-fLjWiSFE.mjs.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acorex-platform-layout-widgets-button-widget-designer.component-fLjWiSFE.mjs","sources":["../../../../libs/platform/layout/widgets/src/lib/widgets/actions/button/button-widget-designer.component.ts"],"sourcesContent":["import { AXClickEvent, AXStyleColorType, AXStyleLookType } from '@acorex/cdk/common';\nimport { AXBadgeModule } from '@acorex/components/badge';\nimport { AXButtonModule } from '@acorex/components/button';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXLoadingModule } from '@acorex/components/loading';\nimport { AXPLayoutBaseWidgetComponent } from '@acorex/platform/layout/widget-core';\n\nimport { ChangeDetectionStrategy, Component, computed, EventEmitter, HostBinding } from '@angular/core';\n@Component({\n selector: 'axp-button-widget-designer',\n template: `\n <ax-button [disabled]=\"disabled()\" [color]=\"color()\" [look]=\"look()\" [text]=\"text()\">\n @if (icon() && text()) {\n <ax-prefix\n ><ax-icon> <i class=\"fa-solid\" [class]=\"icon()\"></i> </ax-icon\n ></ax-prefix>\n } @else if (icon() && !text()) {\n <ax-icon> <i class=\"fa-solid\" [class]=\"icon()\"></i> </ax-icon>\n }\n @if (loading()) {\n <ax-loading> </ax-loading>\n }\n </ax-button>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [AXButtonModule, AXLoadingModule, AXDecoratorModule, AXBadgeModule],\n})\nexport class AXPButtonWidgetDesignerComponent extends AXPLayoutBaseWidgetComponent {\n protected disabled = computed<boolean>(() => this.options()['disabled']);\n protected color = computed<AXStyleColorType>(() => this.options()['color']?.id ?? 'primary');\n protected look = computed<AXStyleLookType>(() => this.options()['look']?.id ?? 'solid');\n protected text = computed<string | undefined>(() => this.options()['text']);\n protected loading = computed<boolean>(() => this.options()['loading']);\n protected icon = computed<string | undefined>(() => this.options()['icon']);\n\n public onClick = new EventEmitter<AXClickEvent>();\n\n @HostBinding('class')\n private get __class(): string {\n const cls: any = {};\n //\n cls['inline-block'] = true;\n return cls;\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;AA2BM,MAAO,gCAAiC,SAAQ,4BAA4B,CAAA;AAnBlF,IAAA,WAAA,GAAA;;AAoBY,QAAA,IAAA,CAAA,QAAQ,GAAG,QAAQ,CAAU,MAAM,IAAI,CAAC,OAAO,EAAE,CAAC,UAAU,CAAC,+EAAC;AAC9D,QAAA,IAAA,CAAA,KAAK,GAAG,QAAQ,CAAmB,MAAM,IAAI,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,EAAE,EAAE,IAAI,SAAS,4EAAC;AAClF,QAAA,IAAA,CAAA,IAAI,GAAG,QAAQ,CAAkB,MAAM,IAAI,CAAC,OAAO,EAAE,CAAC,MAAM,CAAC,EAAE,EAAE,IAAI,OAAO,2EAAC;AAC7E,QAAA,IAAA,CAAA,IAAI,GAAG,QAAQ,CAAqB,MAAM,IAAI,CAAC,OAAO,EAAE,CAAC,MAAM,CAAC,2EAAC;AACjE,QAAA,IAAA,CAAA,OAAO,GAAG,QAAQ,CAAU,MAAM,IAAI,CAAC,OAAO,EAAE,CAAC,SAAS,CAAC,8EAAC;AAC5D,QAAA,IAAA,CAAA,IAAI,GAAG,QAA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AA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAE,eAAe,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,kBAAA,EAAA,QAAA,EAAA,YAAA,EAAA,MAAA,EAAA,CAAA,SAAA,EAAA,MAAA,EAAA,SAAA,CAAA,EAAA,OAAA,EAAA,CAAA,eAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAE,iBAAiB,0VAAE,aAAa,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAEhE,gCAAgC,EAAA,UAAA,EAAA,CAAA;kBAnB5C,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,4BAA4B;AACtC,oBAAA,QAAQ,EAAE;;;;;;;;;;;;;AAaT,EAAA,CAAA;oBACD,eAAe,EAAE,uBAAuB,CAAC,MAAM;oBAC/C,OAAO,EAAE,CAAC,cAAc,EAAE,eAAe,EAAE,iBAAiB,EAAE,aAAa,CAAC;AAC7E,iBAAA;;sBAWE,WAAW;uBAAC,OAAO;;;;;"}
|
|
@@ -10,47 +10,46 @@ import { AXTranslationModule } from '@acorex/core/translation';
|
|
|
10
10
|
import * as i1$2 from '@angular/common';
|
|
11
11
|
import { CommonModule } from '@angular/common';
|
|
12
12
|
import * as i0 from '@angular/core';
|
|
13
|
-
import {
|
|
13
|
+
import { input, computed, linkedSignal, Component } from '@angular/core';
|
|
14
14
|
import * as i1$1 from '@acorex/platform/layout/widget-core';
|
|
15
15
|
import { AXPWidgetCoreModule } from '@acorex/platform/layout/widget-core';
|
|
16
|
-
import { AXPFileStorageService } from '@acorex/platform/common';
|
|
17
16
|
|
|
18
17
|
class AXPFileListPopupComponent extends AXBasePageComponent {
|
|
19
18
|
constructor() {
|
|
20
19
|
super(...arguments);
|
|
21
|
-
this.fileService = inject(AXPFileStorageService);
|
|
22
20
|
//#region ---- Component Properties ----
|
|
23
|
-
|
|
21
|
+
/** Hydrated file rows only; storage prefixes are resolved in entity/mock middleware before UI. */
|
|
22
|
+
this.files = input([], ...(ngDevMode ? [{ debugName: "files" }] : /* istanbul ignore next */ []));
|
|
24
23
|
/**
|
|
25
24
|
* When true, same as file-uploader `options.readonly` (no add/upload, list actions download-only).
|
|
26
25
|
* Use property name `isReadonly` in popup `data` so host/popup binding resolves the input.
|
|
27
26
|
*/
|
|
28
|
-
this.isReadonly = input(false, ...(ngDevMode ? [{ debugName: "isReadonly" }] : []));
|
|
29
|
-
this.multiple = input(false, ...(ngDevMode ? [{ debugName: "multiple" }] : []));
|
|
30
|
-
this.fileEditable = input(true, ...(ngDevMode ? [{ debugName: "fileEditable" }] : []));
|
|
31
|
-
this.accept = input('*', ...(ngDevMode ? [{ debugName: "accept" }] : []));
|
|
32
|
-
this.maxFileSize = input(1024 * 1024 * 100, ...(ngDevMode ? [{ debugName: "maxFileSize" }] : []));
|
|
27
|
+
this.isReadonly = input(false, ...(ngDevMode ? [{ debugName: "isReadonly" }] : /* istanbul ignore next */ []));
|
|
28
|
+
this.multiple = input(false, ...(ngDevMode ? [{ debugName: "multiple" }] : /* istanbul ignore next */ []));
|
|
29
|
+
this.fileEditable = input(true, ...(ngDevMode ? [{ debugName: "fileEditable" }] : /* istanbul ignore next */ []));
|
|
30
|
+
this.accept = input('*', ...(ngDevMode ? [{ debugName: "accept" }] : /* istanbul ignore next */ []));
|
|
31
|
+
this.maxFileSize = input(1024 * 1024 * 100, ...(ngDevMode ? [{ debugName: "maxFileSize" }] : /* istanbul ignore next */ []));
|
|
33
32
|
/** Same as widget plugins (e.g. document) so hooks/actions run in popup too. */
|
|
34
|
-
this.plugins = input([], ...(ngDevMode ? [{ debugName: "plugins" }] : []));
|
|
35
|
-
this.excludePlugins = input([], ...(ngDevMode ? [{ debugName: "excludePlugins" }] : []));
|
|
33
|
+
this.plugins = input([], ...(ngDevMode ? [{ debugName: "plugins" }] : /* istanbul ignore next */ []));
|
|
34
|
+
this.excludePlugins = input([], ...(ngDevMode ? [{ debugName: "excludePlugins" }] : /* istanbul ignore next */ []));
|
|
36
35
|
/** When true, file edit dialog shows name, title and description fields. Default false. */
|
|
37
|
-
this.enableTitleDescription = input(false, ...(ngDevMode ? [{ debugName: "enableTitleDescription" }] : []));
|
|
36
|
+
this.enableTitleDescription = input(false, ...(ngDevMode ? [{ debugName: "enableTitleDescription" }] : /* istanbul ignore next */ []));
|
|
38
37
|
/** When true, show edit dialog (name/title/description + plugin hooks) after file select. Default false. */
|
|
39
|
-
this.showEditDialogAfterSelect = input(false, ...(ngDevMode ? [{ debugName: "showEditDialogAfterSelect" }] : []));
|
|
38
|
+
this.showEditDialogAfterSelect = input(false, ...(ngDevMode ? [{ debugName: "showEditDialogAfterSelect" }] : /* istanbul ignore next */ []));
|
|
40
39
|
//#endregion
|
|
41
40
|
//#region ---- Computed Properties ----
|
|
42
41
|
/**
|
|
43
42
|
* Always render the edit widget so `options` (readonly, plugins, enableTitleDescription, …) match the entity form.
|
|
44
43
|
* Readonly behavior comes from `node.options.readonly`, not from view mode.
|
|
45
44
|
*/
|
|
46
|
-
this.mode = computed(() => 'edit', ...(ngDevMode ? [{ debugName: "mode" }] : []));
|
|
45
|
+
this.mode = computed(() => 'edit', ...(ngDevMode ? [{ debugName: "mode" }] : /* istanbul ignore next */ []));
|
|
47
46
|
//#endregion
|
|
48
47
|
//#region ---- Context & Node Management ----
|
|
49
|
-
this.context = linkedSignal(() => ({}), ...(ngDevMode ? [{ debugName: "context" }] : []));
|
|
48
|
+
this.context = linkedSignal(() => ({}), ...(ngDevMode ? [{ debugName: "context" }] : /* istanbul ignore next */ []));
|
|
50
49
|
this.node = computed(() => ({
|
|
51
50
|
type: 'file-uploader',
|
|
52
51
|
path: 'files',
|
|
53
|
-
defaultValue: Array.isArray(this.files())
|
|
52
|
+
defaultValue: Array.isArray(this.files()) ? this.files() : [],
|
|
54
53
|
options: {
|
|
55
54
|
readonly: this.isReadonly(),
|
|
56
55
|
multiple: this.multiple(),
|
|
@@ -62,7 +61,7 @@ class AXPFileListPopupComponent extends AXBasePageComponent {
|
|
|
62
61
|
enableTitleDescription: this.enableTitleDescription(),
|
|
63
62
|
showEditDialogAfterSelect: this.resolveInput(this.showEditDialogAfterSelect(), false),
|
|
64
63
|
},
|
|
65
|
-
}), ...(ngDevMode ? [{ debugName: "node" }] : []));
|
|
64
|
+
}), ...(ngDevMode ? [{ debugName: "node" }] : /* istanbul ignore next */ []));
|
|
66
65
|
}
|
|
67
66
|
onContextChanged(event) {
|
|
68
67
|
this.context.set(event.data);
|
|
@@ -72,74 +71,20 @@ class AXPFileListPopupComponent extends AXBasePageComponent {
|
|
|
72
71
|
return typeof value === 'function' ? value() : (value ?? fallback);
|
|
73
72
|
}
|
|
74
73
|
//#endregion
|
|
75
|
-
//#region ---- Lifecycle Methods ----
|
|
76
|
-
async ngOnInit() {
|
|
77
|
-
if (Array.isArray(this.files()) && typeof this.files()[0] === 'string') {
|
|
78
|
-
this.isLoading = true;
|
|
79
|
-
// Convert string file IDs to AXPFileListItem objects using batch API
|
|
80
|
-
const prefixedIds = this.files();
|
|
81
|
-
const actualIds = prefixedIds.map((id) => this.removeFilePrefix(id));
|
|
82
|
-
let fileItems = [];
|
|
83
|
-
try {
|
|
84
|
-
const infos = await this.fileService.findMany(actualIds);
|
|
85
|
-
const infoMap = new Map(infos.map((i) => [i.fileId, i]));
|
|
86
|
-
fileItems = prefixedIds.map((prefixedId) => {
|
|
87
|
-
const actualId = this.removeFilePrefix(prefixedId);
|
|
88
|
-
const info = infoMap.get(actualId);
|
|
89
|
-
if (info) {
|
|
90
|
-
return {
|
|
91
|
-
id: info.fileId,
|
|
92
|
-
name: info.name || '',
|
|
93
|
-
size: info.size,
|
|
94
|
-
status: 'uploaded',
|
|
95
|
-
source: {
|
|
96
|
-
kind: 'fileId',
|
|
97
|
-
value: info.fileId,
|
|
98
|
-
},
|
|
99
|
-
};
|
|
100
|
-
}
|
|
101
|
-
return {
|
|
102
|
-
id: actualId,
|
|
103
|
-
name: 'Unknown File',
|
|
104
|
-
size: 0,
|
|
105
|
-
status: 'deleted',
|
|
106
|
-
source: { kind: 'none', value: '' },
|
|
107
|
-
};
|
|
108
|
-
});
|
|
109
|
-
}
|
|
110
|
-
catch (error) {
|
|
111
|
-
console.error('Failed to get file infos', error);
|
|
112
|
-
fileItems = prefixedIds.map((prefixedId) => ({
|
|
113
|
-
id: this.removeFilePrefix(prefixedId),
|
|
114
|
-
name: 'Unknown File',
|
|
115
|
-
size: 0,
|
|
116
|
-
status: 'deleted',
|
|
117
|
-
source: { kind: 'none', value: '' },
|
|
118
|
-
}));
|
|
119
|
-
}
|
|
120
|
-
this.isLoading = false;
|
|
121
|
-
// Update the context with the converted file items
|
|
122
|
-
this.context.set({ files: fileItems });
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
removeFilePrefix(fileId) {
|
|
126
|
-
return fileId.startsWith('file:') ? fileId.substring(5) : fileId;
|
|
127
|
-
}
|
|
128
|
-
//#endregion
|
|
129
74
|
//#region ---- UI Handlers ----
|
|
130
75
|
apply() {
|
|
131
76
|
this.close({
|
|
132
77
|
data: this.context(),
|
|
133
78
|
});
|
|
134
79
|
}
|
|
135
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
136
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
80
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPFileListPopupComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
81
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: AXPFileListPopupComponent, isStandalone: true, selector: "ng-component", inputs: { files: { classPropertyName: "files", publicName: "files", isSignal: true, isRequired: false, transformFunction: null }, isReadonly: { classPropertyName: "isReadonly", publicName: "isReadonly", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, fileEditable: { classPropertyName: "fileEditable", publicName: "fileEditable", isSignal: true, isRequired: false, transformFunction: null }, accept: { classPropertyName: "accept", publicName: "accept", isSignal: true, isRequired: false, transformFunction: null }, maxFileSize: { classPropertyName: "maxFileSize", publicName: "maxFileSize", isSignal: true, isRequired: false, transformFunction: null }, plugins: { classPropertyName: "plugins", publicName: "plugins", isSignal: true, isRequired: false, transformFunction: null }, excludePlugins: { classPropertyName: "excludePlugins", publicName: "excludePlugins", isSignal: true, isRequired: false, transformFunction: null }, enableTitleDescription: { classPropertyName: "enableTitleDescription", publicName: "enableTitleDescription", isSignal: true, isRequired: false, transformFunction: null }, showEditDialogAfterSelect: { classPropertyName: "showEditDialogAfterSelect", publicName: "showEditDialogAfterSelect", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0, template: "<div class=\"p-2\">\n <axp-widgets-container [context]=\"context()\" (onContextChanged)=\"onContextChanged($event)\">\n <ng-container axp-widget-renderer [node]=\"node()\" [mode]=\"mode()\"></ng-container>\n </axp-widgets-container>\n</div>\n<ax-footer>\n <ax-suffix>\n @if (isReadonly()) {\n <ax-button [text]=\"'@general:actions.close.title' | translate | async\" (click)=\"close()\"></ax-button>\n } @else {\n <ax-button [text]=\"'@general:actions.discard.title' | translate | async\" (click)=\"close()\"></ax-button>\n <ax-button\n [text]=\"'@general:actions.apply.title' | translate | async\"\n (click)=\"apply()\"\n [color]=\"'primary'\"\n ></ax-button>\n }\n </ax-suffix>\n</ax-footer>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type:
|
|
137
82
|
//
|
|
138
83
|
AXLabelModule }, { kind: "ngmodule", type: AXCheckBoxModule }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i2.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: AXButtonModule }, { kind: "component", type: i1.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: AXTranslationModule }, { kind: "ngmodule", type:
|
|
139
84
|
//
|
|
140
85
|
AXPWidgetCoreModule }, { kind: "component", type: i1$1.AXPWidgetContainerComponent, selector: "axp-widgets-container", inputs: ["context", "functions"], outputs: ["onContextChanged"] }, { kind: "directive", type: i1$1.AXPWidgetRendererDirective, selector: "[axp-widget-renderer]", inputs: ["parentNode", "index", "mode", "node"], outputs: ["onOptionsChanged", "onValueChanged", "onLoad"], exportAs: ["widgetRenderer"] }, { kind: "pipe", type: i1$2.AsyncPipe, name: "async" }, { kind: "pipe", type: i6.AXTranslatorPipe, name: "translate" }] }); }
|
|
141
86
|
}
|
|
142
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
87
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPFileListPopupComponent, decorators: [{
|
|
143
88
|
type: Component,
|
|
144
89
|
args: [{ imports: [
|
|
145
90
|
CommonModule,
|
|
@@ -150,9 +95,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImpo
|
|
|
150
95
|
AXButtonModule,
|
|
151
96
|
AXTranslationModule,
|
|
152
97
|
//
|
|
153
|
-
AXPWidgetCoreModule
|
|
154
|
-
], template: "<div class=\"
|
|
98
|
+
AXPWidgetCoreModule,
|
|
99
|
+
], template: "<div class=\"p-2\">\n <axp-widgets-container [context]=\"context()\" (onContextChanged)=\"onContextChanged($event)\">\n <ng-container axp-widget-renderer [node]=\"node()\" [mode]=\"mode()\"></ng-container>\n </axp-widgets-container>\n</div>\n<ax-footer>\n <ax-suffix>\n @if (isReadonly()) {\n <ax-button [text]=\"'@general:actions.close.title' | translate | async\" (click)=\"close()\"></ax-button>\n } @else {\n <ax-button [text]=\"'@general:actions.discard.title' | translate | async\" (click)=\"close()\"></ax-button>\n <ax-button\n [text]=\"'@general:actions.apply.title' | translate | async\"\n (click)=\"apply()\"\n [color]=\"'primary'\"\n ></ax-button>\n }\n </ax-suffix>\n</ax-footer>\n" }]
|
|
155
100
|
}], propDecorators: { files: [{ type: i0.Input, args: [{ isSignal: true, alias: "files", required: false }] }], isReadonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "isReadonly", required: false }] }], multiple: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiple", required: false }] }], fileEditable: [{ type: i0.Input, args: [{ isSignal: true, alias: "fileEditable", required: false }] }], accept: [{ type: i0.Input, args: [{ isSignal: true, alias: "accept", required: false }] }], maxFileSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxFileSize", required: false }] }], plugins: [{ type: i0.Input, args: [{ isSignal: true, alias: "plugins", required: false }] }], excludePlugins: [{ type: i0.Input, args: [{ isSignal: true, alias: "excludePlugins", required: false }] }], enableTitleDescription: [{ type: i0.Input, args: [{ isSignal: true, alias: "enableTitleDescription", required: false }] }], showEditDialogAfterSelect: [{ type: i0.Input, args: [{ isSignal: true, alias: "showEditDialogAfterSelect", required: false }] }] } });
|
|
156
101
|
|
|
157
102
|
export { AXPFileListPopupComponent };
|
|
158
|
-
//# sourceMappingURL=acorex-platform-layout-widgets-file-list-popup.component-
|
|
103
|
+
//# sourceMappingURL=acorex-platform-layout-widgets-file-list-popup.component-3oRAKxTo.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acorex-platform-layout-widgets-file-list-popup.component-3oRAKxTo.mjs","sources":["../../../../libs/platform/layout/widgets/src/lib/widgets/advance/file-uploader/file-list-popup/file-list-popup.component.ts","../../../../libs/platform/layout/widgets/src/lib/widgets/advance/file-uploader/file-list-popup/file-list-popup.component.html"],"sourcesContent":["import { AXButtonModule } from '@acorex/components/button';\nimport { AXCheckBoxModule } from '@acorex/components/check-box';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXLabelModule } from '@acorex/components/label';\nimport { AXBasePageComponent } from '@acorex/components/page';\nimport { AXTranslationModule } from '@acorex/core/translation';\nimport { AXPContextChangeEvent, AXPFileListItem } from '@acorex/platform/core';\nimport { CommonModule } from '@angular/common';\nimport { Component, computed, input, linkedSignal } from '@angular/core';\nimport { AXPWidgetCoreModule, AXPWidgetNode } from '@acorex/platform/layout/widget-core';\n\n@Component({\n imports: [\n CommonModule,\n //\n AXLabelModule,\n AXCheckBoxModule,\n AXDecoratorModule,\n AXButtonModule,\n AXTranslationModule,\n //\n AXPWidgetCoreModule,\n ],\n templateUrl: './file-list-popup.component.html',\n})\nexport class AXPFileListPopupComponent extends AXBasePageComponent {\n //#region ---- Component Properties ----\n\n /** Hydrated file rows only; storage prefixes are resolved in entity/mock middleware before UI. */\n files = input<AXPFileListItem[]>([]);\n /**\n * When true, same as file-uploader `options.readonly` (no add/upload, list actions download-only).\n * Use property name `isReadonly` in popup `data` so host/popup binding resolves the input.\n */\n isReadonly = input<boolean>(false);\n multiple = input<boolean>(false);\n fileEditable = input<boolean>(true);\n accept = input<string>('*');\n maxFileSize = input<number>(1024 * 1024 * 100);\n /** Same as widget plugins (e.g. document) so hooks/actions run in popup too. */\n plugins = input<{ name: string; options?: unknown }[]>([]);\n excludePlugins = input<string[]>([]);\n /** When true, file edit dialog shows name, title and description fields. Default false. */\n enableTitleDescription = input<boolean>(false);\n /** When true, show edit dialog (name/title/description + plugin hooks) after file select. Default false. */\n showEditDialogAfterSelect = input<boolean>(false);\n\n //#endregion\n\n //#region ---- Computed Properties ----\n\n /**\n * Always render the edit widget so `options` (readonly, plugins, enableTitleDescription, …) match the entity form.\n * Readonly behavior comes from `node.options.readonly`, not from view mode.\n */\n protected mode = computed(() => 'edit' as const);\n\n //#endregion\n\n //#region ---- Context & Node Management ----\n\n protected context = linkedSignal<{}>(() => ({}));\n\n protected onContextChanged(event: AXPContextChangeEvent) {\n this.context.set(event.data);\n }\n\n /** Resolves input that may be a signal (input()) or a raw value when popup injects data. */\n private resolveInput<T>(value: (() => T) | T, fallback: T): T {\n return typeof value === 'function' ? (value as () => T)() : (value ?? fallback);\n }\n\n protected node = computed<AXPWidgetNode>(() => ({\n type: 'file-uploader',\n path: 'files',\n defaultValue: Array.isArray(this.files()) ? this.files() : [],\n options: {\n readonly: this.isReadonly(),\n multiple: this.multiple(),\n accept: this.accept(),\n maxFileSize: this.maxFileSize(),\n fileEditable: this.fileEditable(),\n plugins: this.resolveInput(this.plugins, []),\n excludePlugins: this.resolveInput(this.excludePlugins, []),\n enableTitleDescription: this.enableTitleDescription(),\n showEditDialogAfterSelect: this.resolveInput(this.showEditDialogAfterSelect(), false),\n },\n }));\n\n //#endregion\n\n //#region ---- UI Handlers ----\n\n apply() {\n this.close({\n data: this.context(),\n });\n }\n\n //#endregion\n}\n","<div class=\"p-2\">\n <axp-widgets-container [context]=\"context()\" (onContextChanged)=\"onContextChanged($event)\">\n <ng-container axp-widget-renderer [node]=\"node()\" [mode]=\"mode()\"></ng-container>\n </axp-widgets-container>\n</div>\n<ax-footer>\n <ax-suffix>\n @if (isReadonly()) {\n <ax-button [text]=\"'@general:actions.close.title' | translate | async\" (click)=\"close()\"></ax-button>\n } @else {\n <ax-button [text]=\"'@general:actions.discard.title' | translate | async\" (click)=\"close()\"></ax-button>\n <ax-button\n [text]=\"'@general:actions.apply.title' | translate | async\"\n (click)=\"apply()\"\n [color]=\"'primary'\"\n ></ax-button>\n }\n </ax-suffix>\n</ax-footer>\n"],"names":["i1","i3","i4","i5"],"mappings":";;;;;;;;;;;;;;;;AAyBM,MAAO,yBAA0B,SAAQ,mBAAmB,CAAA;AAdl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A,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAAC,IAAA,CAAA,SAAA,EAAA,IAAA,EAAA,OAAA,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAAC,EAAA,CAAA,gBAAA,EAAA,IAAA,EAAA,WAAA,EAAA,CAAA,EAAA,CAAA,CAAA;;2FAIV,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBAdrC,SAAS;AACC,YAAA,IAAA,EAAA,CAAA,EAAA,OAAA,EAAA;wBACP,YAAY;;wBAEZ,aAAa;wBACb,gBAAgB;wBAChB,iBAAiB;wBACjB,cAAc;wBACd,mBAAmB;;wBAEnB,mBAAmB;AACpB,qBAAA,EAAA,QAAA,EAAA,ivBAAA,EAAA;;;;;"}
|
|
@@ -1,25 +1,24 @@
|
|
|
1
1
|
import { AXButtonModule } from '@acorex/components/button';
|
|
2
2
|
import { AXBasePageComponent } from '@acorex/components/page';
|
|
3
|
-
import { CommonModule } from '@angular/common';
|
|
4
3
|
import * as i0 from '@angular/core';
|
|
5
4
|
import { Component } from '@angular/core';
|
|
6
5
|
|
|
7
6
|
class AXPImagePreviewPopupComponent extends AXBasePageComponent {
|
|
8
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
9
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
10
|
-
<div class="
|
|
7
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPImagePreviewPopupComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
8
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.9", type: AXPImagePreviewPopupComponent, isStandalone: true, selector: "axp-image-preview-popup", usesInheritance: true, ngImport: i0, template: `
|
|
9
|
+
<div class="flex justify-center items-center p-4">
|
|
11
10
|
<img [src]="src" alt="Preview" />
|
|
12
11
|
</div>
|
|
13
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type:
|
|
12
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: AXButtonModule }] }); }
|
|
14
13
|
}
|
|
15
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
14
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPImagePreviewPopupComponent, decorators: [{
|
|
16
15
|
type: Component,
|
|
17
16
|
args: [{
|
|
18
17
|
standalone: true,
|
|
19
18
|
selector: 'axp-image-preview-popup',
|
|
20
|
-
imports: [
|
|
19
|
+
imports: [AXButtonModule],
|
|
21
20
|
template: `
|
|
22
|
-
<div class="
|
|
21
|
+
<div class="flex justify-center items-center p-4">
|
|
23
22
|
<img [src]="src" alt="Preview" />
|
|
24
23
|
</div>
|
|
25
24
|
`,
|
|
@@ -27,4 +26,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImpo
|
|
|
27
26
|
}] });
|
|
28
27
|
|
|
29
28
|
export { AXPImagePreviewPopupComponent };
|
|
30
|
-
//# sourceMappingURL=acorex-platform-layout-widgets-image-preview.popup-
|
|
29
|
+
//# sourceMappingURL=acorex-platform-layout-widgets-image-preview.popup-CazpERbX.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acorex-platform-layout-widgets-image-preview.popup-CazpERbX.mjs","sources":["../../../../libs/platform/layout/widgets/src/lib/widgets/advance/image/image-preview.popup.ts"],"sourcesContent":["import { AXButtonModule } from '@acorex/components/button';\nimport { AXBasePageComponent } from '@acorex/components/page';\n\nimport { Component } from '@angular/core';\n\n@Component({\n standalone: true,\n selector: 'axp-image-preview-popup',\n imports: [AXButtonModule],\n template: `\n <div class=\"flex justify-center items-center p-4\">\n <img [src]=\"src\" alt=\"Preview\" />\n </div>\n `,\n})\nexport class AXPImagePreviewPopupComponent extends AXBasePageComponent {\n src: string;\n}\n"],"names":[],"mappings":";;;;;AAeM,MAAO,6BAA8B,SAAQ,mBAAmB,CAAA;8GAAzD,6BAA6B,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAA7B,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,6BAA6B,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,yBAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAN9B;;;;AAIT,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EALS,cAAc,EAAA,CAAA,EAAA,CAAA,CAAA;;2FAOb,6BAA6B,EAAA,UAAA,EAAA,CAAA;kBAVzC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,QAAQ,EAAE,yBAAyB;oBACnC,OAAO,EAAE,CAAC,cAAc,CAAC;AACzB,oBAAA,QAAQ,EAAE;;;;AAIT,EAAA,CAAA;AACF,iBAAA;;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AXButtonModule } from '@acorex/components/button';
|
|
2
2
|
import { AXDecoratorModule } from '@acorex/components/decorators';
|
|
3
|
-
import { AXPLayoutBaseWidgetComponent, AXPWidgetCoreModule } from '@acorex/platform/layout/widget-core';
|
|
4
3
|
import { AXPDesignerService, AXPWidgetDesignerRendererDirective, AXPDesignerAddWidgetLineButtonComponent } from '@acorex/platform/layout/designer';
|
|
4
|
+
import { AXPLayoutBaseWidgetComponent, AXPWidgetCoreModule } from '@acorex/platform/layout/widget-core';
|
|
5
5
|
import * as i0 from '@angular/core';
|
|
6
6
|
import { inject, computed, HostBinding, ViewEncapsulation, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
7
7
|
|
|
@@ -9,14 +9,14 @@ class AXPPageWidgetDesignerComponent extends AXPLayoutBaseWidgetComponent {
|
|
|
9
9
|
constructor() {
|
|
10
10
|
super(...arguments);
|
|
11
11
|
this.designerService = inject(AXPDesignerService);
|
|
12
|
-
this.backgroundColor = computed(() => this.options()['backgroundColor'], ...(ngDevMode ? [{ debugName: "backgroundColor" }] : []));
|
|
13
|
-
this.theme = computed(() => this.options()['theme']?.id ?? 'default', ...(ngDevMode ? [{ debugName: "theme" }] : []));
|
|
14
|
-
this.hasHeader = computed(() => this.options()['hasHeader'], ...(ngDevMode ? [{ debugName: "hasHeader" }] : []));
|
|
15
|
-
this.hasFooter = computed(() => this.options()['hasFooter'], ...(ngDevMode ? [{ debugName: "hasFooter" }] : []));
|
|
16
|
-
this.direction = computed(() => this.options()['direction'], ...(ngDevMode ? [{ debugName: "direction" }] : []));
|
|
17
|
-
this.onlyChildren = computed(() => this.children().filter((c) => !c.meta?.['footer'] && !c.meta?.['header']), ...(ngDevMode ? [{ debugName: "onlyChildren" }] : []));
|
|
18
|
-
this.headerNodes = computed(() => this.children().filter((c) => c.meta?.['header']) ?? [], ...(ngDevMode ? [{ debugName: "headerNodes" }] : []));
|
|
19
|
-
this.footerNodes = computed(() => this.children().filter((c) => c.meta?.['footer']) ?? [], ...(ngDevMode ? [{ debugName: "footerNodes" }] : []));
|
|
12
|
+
this.backgroundColor = computed(() => this.options()['backgroundColor'], ...(ngDevMode ? [{ debugName: "backgroundColor" }] : /* istanbul ignore next */ []));
|
|
13
|
+
this.theme = computed(() => this.options()['theme']?.id ?? 'default', ...(ngDevMode ? [{ debugName: "theme" }] : /* istanbul ignore next */ []));
|
|
14
|
+
this.hasHeader = computed(() => this.options()['hasHeader'], ...(ngDevMode ? [{ debugName: "hasHeader" }] : /* istanbul ignore next */ []));
|
|
15
|
+
this.hasFooter = computed(() => this.options()['hasFooter'], ...(ngDevMode ? [{ debugName: "hasFooter" }] : /* istanbul ignore next */ []));
|
|
16
|
+
this.direction = computed(() => this.options()['direction'], ...(ngDevMode ? [{ debugName: "direction" }] : /* istanbul ignore next */ []));
|
|
17
|
+
this.onlyChildren = computed(() => this.children().filter((c) => !c.meta?.['footer'] && !c.meta?.['header']), ...(ngDevMode ? [{ debugName: "onlyChildren" }] : /* istanbul ignore next */ []));
|
|
18
|
+
this.headerNodes = computed(() => this.children().filter((c) => c.meta?.['header']) ?? [], ...(ngDevMode ? [{ debugName: "headerNodes" }] : /* istanbul ignore next */ []));
|
|
19
|
+
this.footerNodes = computed(() => this.children().filter((c) => c.meta?.['footer']) ?? [], ...(ngDevMode ? [{ debugName: "footerNodes" }] : /* istanbul ignore next */ []));
|
|
20
20
|
}
|
|
21
21
|
async handleAddHeader() {
|
|
22
22
|
const widgets = await this.designerService.showPicker(this.node);
|
|
@@ -39,14 +39,14 @@ class AXPPageWidgetDesignerComponent extends AXPLayoutBaseWidgetComponent {
|
|
|
39
39
|
'ax-widget-container': true,
|
|
40
40
|
'ax-dark': this.theme() == 'dark',
|
|
41
41
|
'ax-light': this.theme() == 'light',
|
|
42
|
-
|
|
43
|
-
'
|
|
44
|
-
'
|
|
45
|
-
|
|
42
|
+
block: true,
|
|
43
|
+
'w-full': true,
|
|
44
|
+
'overflow-auto': true,
|
|
45
|
+
rtl: this.direction() == 'rtl',
|
|
46
46
|
};
|
|
47
47
|
}
|
|
48
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
49
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
48
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPPageWidgetDesignerComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
49
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: AXPPageWidgetDesignerComponent, isStandalone: true, selector: "axp-page-widget-designer", host: { properties: { "style": "this.__style", "class": "this.__class" } }, providers: [
|
|
50
50
|
{
|
|
51
51
|
provide: AXPLayoutBaseWidgetComponent,
|
|
52
52
|
useExisting: AXPPageWidgetDesignerComponent,
|
|
@@ -96,7 +96,7 @@ class AXPPageWidgetDesignerComponent extends AXPLayoutBaseWidgetComponent {
|
|
|
96
96
|
}
|
|
97
97
|
`, isInline: true, dependencies: [{ kind: "ngmodule", type: AXPWidgetCoreModule }, { kind: "ngmodule", type: AXButtonModule }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "directive", type: AXPWidgetDesignerRendererDirective, selector: "[axp-widget-designer-renderer]", inputs: ["parentNode", "parentElement", "parentComponent", "index", "locked", "mode", "node"] }, { kind: "component", type: AXPDesignerAddWidgetLineButtonComponent, selector: "axp-designer-add-widget-line-button", inputs: ["text"], outputs: ["onClick"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
98
98
|
}
|
|
99
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
99
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPPageWidgetDesignerComponent, decorators: [{
|
|
100
100
|
type: Component,
|
|
101
101
|
args: [{
|
|
102
102
|
selector: 'axp-page-widget-designer',
|
|
@@ -169,4 +169,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImpo
|
|
|
169
169
|
}] } });
|
|
170
170
|
|
|
171
171
|
export { AXPPageWidgetDesignerComponent };
|
|
172
|
-
//# sourceMappingURL=acorex-platform-layout-widgets-page-widget-designer.component-
|
|
172
|
+
//# sourceMappingURL=acorex-platform-layout-widgets-page-widget-designer.component-BQ4G6aYf.mjs.map
|
package/fesm2022/acorex-platform-layout-widgets-page-widget-designer.component-BQ4G6aYf.mjs.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acorex-platform-layout-widgets-page-widget-designer.component-BQ4G6aYf.mjs","sources":["../../../../libs/platform/layout/widgets/src/lib/widgets/layout/page/page-widget-designer.component.ts"],"sourcesContent":["import { AXButtonModule } from '@acorex/components/button';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport {\n AXPDesignerAddWidgetLineButtonComponent,\n AXPDesignerService,\n AXPWidgetDesignerRendererDirective,\n} from '@acorex/platform/layout/designer';\nimport { AXPLayoutBaseWidgetComponent, AXPWidgetCoreModule, AXPWidgetNode } from '@acorex/platform/layout/widget-core';\n\nimport { ChangeDetectionStrategy, Component, computed, HostBinding, inject, ViewEncapsulation } from '@angular/core';\n\n@Component({\n selector: 'axp-page-widget-designer',\n template: `\n @if (hasHeader()) {\n @if (headerNodes().length) {\n <header class=\"axp-page-widget-header\">\n @for (node of headerNodes(); track $index) {\n <ng-container\n axp-widget-designer-renderer\n [node]=\"node\"\n [parentNode]=\"this\"\n [mode]=\"mode\"\n [locked]=\"this.locked\"\n ></ng-container>\n }\n </header>\n } @else {\n <axp-designer-add-widget-line-button\n [text]=\"'Page Header'\"\n (onClick)=\"handleAddHeader()\"\n ></axp-designer-add-widget-line-button>\n }\n }\n @for (node of onlyChildren(); track $index) {\n <ng-container axp-widget-designer-renderer [node]=\"node\" [parentNode]=\"this\" [mode]=\"mode\"></ng-container>\n }\n <!-- <axp-designer-add-widget-mini-button></axp-designer-add-widget-mini-button> -->\n <axp-designer-add-widget-line-button\n [text]=\"'Add Element'\"\n (onClick)=\"handleAddElement()\"\n ></axp-designer-add-widget-line-button>\n @if (hasFooter()) {\n @if (footerNodes().length) {\n <footer class=\"axp-page-widget-footer\">\n @for (node of footerNodes(); track $index) {\n <ng-container axp-widget-designer-renderer [node]=\"node\" [parentNode]=\"this\" [mode]=\"mode\"></ng-container>\n }\n </footer>\n } @else {\n <axp-designer-add-widget-line-button\n [text]=\"'Page Footer'\"\n (onClick)=\"handleAddFooter()\"\n ></axp-designer-add-widget-line-button>\n }\n }\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [\n AXPWidgetCoreModule,\n AXButtonModule,\n AXDecoratorModule,\n AXPWidgetDesignerRendererDirective,\n AXPDesignerAddWidgetLineButtonComponent,\n ],\n providers: [\n {\n provide: AXPLayoutBaseWidgetComponent,\n useExisting: AXPPageWidgetDesignerComponent,\n },\n ],\n})\nexport class AXPPageWidgetDesignerComponent extends AXPLayoutBaseWidgetComponent {\n protected designerService = inject(AXPDesignerService);\n\n protected backgroundColor = computed<string>(() => this.options()['backgroundColor'] as string);\n\n protected theme = computed<string>(() => (this.options()['theme']?.id as string) ?? 'default');\n protected hasHeader = computed<boolean>(() => this.options()['hasHeader']);\n protected hasFooter = computed<boolean>(() => this.options()['hasFooter']);\n protected direction = computed<string>(() => this.options()['direction']);\n\n protected onlyChildren = computed<AXPWidgetNode[]>(() =>\n this.children().filter((c) => !c.meta?.['footer'] && !c.meta?.['header']),\n );\n protected headerNodes = computed<AXPWidgetNode[]>(() => this.children().filter((c) => c.meta?.['header']) ?? []);\n protected footerNodes = computed<AXPWidgetNode[]>(() => this.children().filter((c) => c.meta?.['footer']) ?? []);\n\n protected async handleAddHeader() {\n const widgets = await this.designerService.showPicker(this.node);\n widgets.forEach((c) => (c.meta = { header: true }));\n }\n\n protected async handleAddFooter() {\n const widgets = await this.designerService.showPicker(this.node);\n widgets.forEach((c) => (c.meta = { footer: true }));\n }\n\n protected async handleAddElement() {\n await this.designerService.showPicker(this.node);\n }\n\n @HostBinding('style')\n private get __style(): any {\n return {\n 'background-color': this.backgroundColor(),\n };\n }\n\n @HostBinding('class')\n private get __class(): any {\n return {\n 'ax-widget-container': true,\n 'ax-dark': this.theme() == 'dark',\n 'ax-light': this.theme() == 'light',\n block: true,\n 'w-full': true,\n 'overflow-auto': true,\n rtl: this.direction() == 'rtl',\n };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AA2CT,EAAA,CAAA;oBACD,eAAe,EAAE,uBAAuB,CAAC,MAAM;oBAC/C,aAAa,EAAE,iBAAiB,CAAC,IAAI;AACrC,oBAAA,OAAO,EAAE;wBACP,mBAAmB;wBACnB,cAAc;wBACd,iBAAiB;wBACjB,kCAAkC;wBAClC,uCAAuC;AACxC,qBAAA;AACD,oBAAA,SAAS,EAAE;AACT,wBAAA;AACE,4BAAA,OAAO,EAAE,4BAA4B;AACrC,4BAAA,WAAW,EAAA,8BAAgC;AAC5C,yBAAA;AACF,qBAAA;AACF,iBAAA;;sBA+BE,WAAW;uBAAC,OAAO;;sBAOnB,WAAW;uBAAC,OAAO;;;;;"}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { AXBadgeModule } from '@acorex/components/badge';
|
|
2
|
+
import * as i1 from '@acorex/platform/layout/widget-core';
|
|
3
|
+
import { AXPColumnWidgetComponent, AXPWidgetCoreModule, AXPWidgetCoreService } from '@acorex/platform/layout/widget-core';
|
|
4
|
+
import { AXButtonModule } from '@acorex/components/button';
|
|
5
|
+
import * as i3 from '@acorex/components/popover';
|
|
6
|
+
import { AXPopoverModule } from '@acorex/components/popover';
|
|
7
|
+
import * as i0 from '@angular/core';
|
|
8
|
+
import { viewChild, signal, computed, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
9
|
+
import { isNil } from 'lodash-es';
|
|
10
|
+
import { AXPContextStore } from '@acorex/platform/core';
|
|
11
|
+
|
|
12
|
+
class AXPRepeaterWidgetColumnComponent extends AXPColumnWidgetComponent {
|
|
13
|
+
constructor() {
|
|
14
|
+
super(...arguments);
|
|
15
|
+
//#region ---- View Children ----
|
|
16
|
+
this.moreButton = viewChild('moreButton', ...(ngDevMode ? [{ debugName: "moreButton" }] : /* istanbul ignore next */ []));
|
|
17
|
+
this.morePopover = viewChild('morePopover', ...(ngDevMode ? [{ debugName: "morePopover" }] : /* istanbul ignore next */ []));
|
|
18
|
+
//#endregion
|
|
19
|
+
//#region ---- Properties ----
|
|
20
|
+
this.maxVisible = this.options['maxVisible'] ?? 2;
|
|
21
|
+
this.childWidgetNode = this.options['children']?.[0];
|
|
22
|
+
//#endregion
|
|
23
|
+
//#region ---- Signals ----
|
|
24
|
+
this.isMorePopoverOpen = signal(false, ...(ngDevMode ? [{ debugName: "isMorePopoverOpen" }] : /* istanbul ignore next */ []));
|
|
25
|
+
//#endregion
|
|
26
|
+
//#region ---- Node Cache ----
|
|
27
|
+
// Cache nodes by index to prevent recreation on every change detection
|
|
28
|
+
this.nodeCache = new Map();
|
|
29
|
+
this.lastItems = [];
|
|
30
|
+
//#endregion
|
|
31
|
+
//#region ---- Computed Properties ----
|
|
32
|
+
this.displayItems = computed(() => {
|
|
33
|
+
if (isNil(this.rawValue)) {
|
|
34
|
+
return [];
|
|
35
|
+
}
|
|
36
|
+
const items = Array.isArray(this.rawValue) ? this.rawValue : [this.rawValue];
|
|
37
|
+
return items.filter((item) => item != null);
|
|
38
|
+
}, ...(ngDevMode ? [{ debugName: "displayItems" }] : /* istanbul ignore next */ []));
|
|
39
|
+
this.allItems = computed(() => this.displayItems(), ...(ngDevMode ? [{ debugName: "allItems" }] : /* istanbul ignore next */ []));
|
|
40
|
+
this.visibleItems = computed(() => {
|
|
41
|
+
const items = this.allItems();
|
|
42
|
+
return items.slice(0, this.maxVisible);
|
|
43
|
+
}, ...(ngDevMode ? [{ debugName: "visibleItems" }] : /* istanbul ignore next */ []));
|
|
44
|
+
this.hasMoreItems = computed(() => {
|
|
45
|
+
return this.allItems().length > this.maxVisible;
|
|
46
|
+
}, ...(ngDevMode ? [{ debugName: "hasMoreItems" }] : /* istanbul ignore next */ []));
|
|
47
|
+
this.remainingItemsCount = computed(() => {
|
|
48
|
+
return this.allItems().length - this.maxVisible;
|
|
49
|
+
}, ...(ngDevMode ? [{ debugName: "remainingItemsCount" }] : /* istanbul ignore next */ []));
|
|
50
|
+
}
|
|
51
|
+
// Clear cache when items change
|
|
52
|
+
clearCacheIfNeeded() {
|
|
53
|
+
const currentItems = this.allItems();
|
|
54
|
+
if (currentItems.length !== this.lastItems.length ||
|
|
55
|
+
currentItems.some((item, idx) => item !== this.lastItems[idx])) {
|
|
56
|
+
this.nodeCache.clear();
|
|
57
|
+
this.lastItems = [...currentItems];
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
//#endregion
|
|
61
|
+
//#region ---- Public Methods ----
|
|
62
|
+
showMoreItems() {
|
|
63
|
+
this.openMorePopover();
|
|
64
|
+
}
|
|
65
|
+
onMorePopoverOpenChange(event) {
|
|
66
|
+
this.isMorePopoverOpen.set(event);
|
|
67
|
+
}
|
|
68
|
+
getItemNode(item, index) {
|
|
69
|
+
if (!this.childWidgetNode) {
|
|
70
|
+
return undefined;
|
|
71
|
+
}
|
|
72
|
+
// Clear cache if items changed
|
|
73
|
+
this.clearCacheIfNeeded();
|
|
74
|
+
// Return cached node if exists
|
|
75
|
+
const cachedNode = this.nodeCache.get(index);
|
|
76
|
+
if (cachedNode) {
|
|
77
|
+
return cachedNode;
|
|
78
|
+
}
|
|
79
|
+
const child = this.childWidgetNode;
|
|
80
|
+
const childBindingRaw = child.path ?? child.name;
|
|
81
|
+
const childBinding = childBindingRaw != null && String(childBindingRaw).trim() !== '' ? String(childBindingRaw).trim() : '';
|
|
82
|
+
const baseItemPath = `${this.path}[${index}]`;
|
|
83
|
+
const itemPath = childBinding ? `${baseItemPath}.${childBinding}` : baseItemPath;
|
|
84
|
+
// Create new node and cache it
|
|
85
|
+
const node = {
|
|
86
|
+
...child,
|
|
87
|
+
path: itemPath,
|
|
88
|
+
defaultValue: item,
|
|
89
|
+
options: {
|
|
90
|
+
...child.options,
|
|
91
|
+
rawValue: item,
|
|
92
|
+
rowData: this.rowData,
|
|
93
|
+
},
|
|
94
|
+
};
|
|
95
|
+
this.nodeCache.set(index, node);
|
|
96
|
+
return node;
|
|
97
|
+
}
|
|
98
|
+
//#endregion
|
|
99
|
+
//#region ---- Private Methods ----
|
|
100
|
+
openMorePopover() {
|
|
101
|
+
if (this.morePopover() && this.moreButton()) {
|
|
102
|
+
this.morePopover().target = this.moreButton().nativeElement;
|
|
103
|
+
this.morePopover().open();
|
|
104
|
+
this.isMorePopoverOpen.set(true);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPRepeaterWidgetColumnComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
108
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: AXPRepeaterWidgetColumnComponent, isStandalone: true, selector: "axp-repeater-widget-column", inputs: { rawValue: "rawValue", rowData: "rowData" }, providers: [AXPWidgetCoreService, AXPContextStore], viewQueries: [{ propertyName: "moreButton", first: true, predicate: ["moreButton"], descendants: true, isSignal: true }, { propertyName: "morePopover", first: true, predicate: ["morePopover"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"flex gap-1 items-center\">\n\n @for (item of visibleItems(); track $index) {\n @if (childWidgetNode) {\n <ng-container axp-widget-renderer [node]=\"getItemNode(item, $index)!\" [mode]=\"'view'\" [parentNode]=\"null\"\n [index]=\"$index\"></ng-container>\n }\n }@empty {\n <span class=\"text-muted\">---</span>\n }\n\n\n @if (hasMoreItems()) {\n <span\n class=\"absolute flex items-center end-0 px-1 cursor-pointer h-full hover:primary-lighter-surface\"\n (click)=\"showMoreItems()\" #moreButton>\n <i class=\"fa-light fa-ellipsis-vertical\"></i>\n </span>\n }\n</div>\n\n<!-- More Items Popover -->\n<ax-popover [openOn]=\"'manual'\" #morePopover (openChange)=\"onMorePopoverOpenChange($event)\">\n <div class=\"lightest-surface border rounded-lg shadow-lg p-4 min-w-[280px]\">\n <div class=\"mb-4 border-b pb-2\">\n <h3 class=\"text-base font-semibold\">All {{ allItems().length }} Items</h3>\n </div>\n <div class=\"max-h-64 flex flex-col gap-3 overflow-auto\" style=\"max-height: max(30dvh,10rem)\">\n @for (item of allItems(); track $index) {\n <div>\n @if (childWidgetNode) {\n <ng-container axp-widget-renderer [node]=\"getItemNode(item, $index)!\" [mode]=\"'view'\"\n [parentNode]=\"null\" [index]=\"$index\"></ng-container>\n }\n </div>\n }\n </div>\n </div>\n</ax-popover>", dependencies: [{ kind: "ngmodule", type: AXBadgeModule }, { kind: "ngmodule", type: AXButtonModule }, { kind: "ngmodule", type: AXPopoverModule }, { kind: "component", type: i3.AXPopoverComponent, selector: "ax-popover", inputs: ["width", "disablePanelClass", "disabled", "offsetX", "offsetY", "target", "placement", "content", "openOn", "closeOn", "hasBackdrop", "openAfter", "closeAfter", "closeOnScroll", "backdropClass", "panelClass", "adaptivityEnabled"], outputs: ["onOpened", "onClosed"] }, { kind: "ngmodule", type: AXPWidgetCoreModule }, { kind: "directive", type: i1.AXPWidgetRendererDirective, selector: "[axp-widget-renderer]", inputs: ["parentNode", "index", "mode", "node"], outputs: ["onOptionsChanged", "onValueChanged", "onLoad"], exportAs: ["widgetRenderer"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
109
|
+
}
|
|
110
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPRepeaterWidgetColumnComponent, decorators: [{
|
|
111
|
+
type: Component,
|
|
112
|
+
args: [{ selector: 'axp-repeater-widget-column', changeDetection: ChangeDetectionStrategy.OnPush, imports: [AXBadgeModule, AXButtonModule, AXPopoverModule, AXPWidgetCoreModule], providers: [AXPWidgetCoreService, AXPContextStore], inputs: ['rawValue', 'rowData'], template: "<div class=\"flex gap-1 items-center\">\n\n @for (item of visibleItems(); track $index) {\n @if (childWidgetNode) {\n <ng-container axp-widget-renderer [node]=\"getItemNode(item, $index)!\" [mode]=\"'view'\" [parentNode]=\"null\"\n [index]=\"$index\"></ng-container>\n }\n }@empty {\n <span class=\"text-muted\">---</span>\n }\n\n\n @if (hasMoreItems()) {\n <span\n class=\"absolute flex items-center end-0 px-1 cursor-pointer h-full hover:primary-lighter-surface\"\n (click)=\"showMoreItems()\" #moreButton>\n <i class=\"fa-light fa-ellipsis-vertical\"></i>\n </span>\n }\n</div>\n\n<!-- More Items Popover -->\n<ax-popover [openOn]=\"'manual'\" #morePopover (openChange)=\"onMorePopoverOpenChange($event)\">\n <div class=\"lightest-surface border rounded-lg shadow-lg p-4 min-w-[280px]\">\n <div class=\"mb-4 border-b pb-2\">\n <h3 class=\"text-base font-semibold\">All {{ allItems().length }} Items</h3>\n </div>\n <div class=\"max-h-64 flex flex-col gap-3 overflow-auto\" style=\"max-height: max(30dvh,10rem)\">\n @for (item of allItems(); track $index) {\n <div>\n @if (childWidgetNode) {\n <ng-container axp-widget-renderer [node]=\"getItemNode(item, $index)!\" [mode]=\"'view'\"\n [parentNode]=\"null\" [index]=\"$index\"></ng-container>\n }\n </div>\n }\n </div>\n </div>\n</ax-popover>" }]
|
|
113
|
+
}], propDecorators: { moreButton: [{ type: i0.ViewChild, args: ['moreButton', { isSignal: true }] }], morePopover: [{ type: i0.ViewChild, args: ['morePopover', { isSignal: true }] }] } });
|
|
114
|
+
|
|
115
|
+
export { AXPRepeaterWidgetColumnComponent };
|
|
116
|
+
//# sourceMappingURL=acorex-platform-layout-widgets-repeater-widget-column.component-DWuWxUF_.mjs.map
|
package/fesm2022/acorex-platform-layout-widgets-repeater-widget-column.component-DWuWxUF_.mjs.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acorex-platform-layout-widgets-repeater-widget-column.component-DWuWxUF_.mjs","sources":["../../../../libs/platform/layout/widgets/src/lib/widgets/layout/repeater/repeater-widget-column.component.ts","../../../../libs/platform/layout/widgets/src/lib/widgets/layout/repeater/repeater-widget-column.component.html"],"sourcesContent":["import { AXBadgeModule } from '@acorex/components/badge';\nimport { AXPColumnWidgetComponent, AXPWidgetNode, AXPWidgetCoreModule, AXPWidgetCoreService } from '@acorex/platform/layout/widget-core';\nimport { AXButtonModule } from '@acorex/components/button';\nimport { AXPopoverComponent, AXPopoverModule } from '@acorex/components/popover';\nimport { ChangeDetectionStrategy, Component, computed, ElementRef, signal, viewChild } from '@angular/core';\n\nimport { isNil } from 'lodash-es';\nimport { AXPContextStore } from '@acorex/platform/core';\n\n@Component({\n selector: 'axp-repeater-widget-column',\n templateUrl: './repeater-widget-column.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [AXBadgeModule, AXButtonModule, AXPopoverModule, AXPWidgetCoreModule],\n providers: [AXPWidgetCoreService, AXPContextStore],\n inputs: ['rawValue', 'rowData'],\n})\nexport class AXPRepeaterWidgetColumnComponent extends AXPColumnWidgetComponent<any[]> {\n //#region ---- View Children ----\n\n protected moreButton = viewChild<ElementRef>('moreButton');\n protected morePopover = viewChild<AXPopoverComponent>('morePopover');\n\n //#endregion\n\n //#region ---- Properties ----\n\n protected maxVisible: number = this.options['maxVisible'] ?? 2;\n protected childWidgetNode: AXPWidgetNode | undefined = this.options['children']?.[0];\n\n //#endregion\n\n //#region ---- Signals ----\n\n protected isMorePopoverOpen = signal(false);\n\n //#endregion\n\n //#region ---- Node Cache ----\n\n // Cache nodes by index to prevent recreation on every change detection\n private nodeCache = new Map<number, AXPWidgetNode>();\n private lastItems: any[] = [];\n\n // Clear cache when items change\n private clearCacheIfNeeded(): void {\n const currentItems = this.allItems();\n if (currentItems.length !== this.lastItems.length ||\n currentItems.some((item, idx) => item !== this.lastItems[idx])) {\n this.nodeCache.clear();\n this.lastItems = [...currentItems];\n }\n }\n\n //#endregion\n\n //#region ---- Computed Properties ----\n\n protected displayItems = computed(() => {\n if (isNil(this.rawValue)) {\n return [];\n }\n const items = Array.isArray(this.rawValue) ? this.rawValue : [this.rawValue];\n return items.filter((item) => item != null);\n });\n\n protected allItems = computed(() => this.displayItems());\n\n protected visibleItems = computed(() => {\n const items = this.allItems();\n return items.slice(0, this.maxVisible);\n });\n\n protected hasMoreItems = computed(() => {\n return this.allItems().length > this.maxVisible;\n });\n\n protected remainingItemsCount = computed(() => {\n return this.allItems().length - this.maxVisible;\n });\n\n //#endregion\n\n //#region ---- Public Methods ----\n\n protected showMoreItems(): void {\n this.openMorePopover();\n }\n\n protected onMorePopoverOpenChange(event: any): void {\n this.isMorePopoverOpen.set(event);\n }\n\n protected getItemNode(item: any, index: number): AXPWidgetNode | undefined {\n if (!this.childWidgetNode) {\n return undefined;\n }\n\n // Clear cache if items changed\n this.clearCacheIfNeeded();\n\n // Return cached node if exists\n const cachedNode = this.nodeCache.get(index);\n if (cachedNode) {\n return cachedNode;\n }\n\n const child = this.childWidgetNode;\n const childBindingRaw = child.path ?? child.name;\n const childBinding =\n childBindingRaw != null && String(childBindingRaw).trim() !== '' ? String(childBindingRaw).trim() : '';\n const baseItemPath = `${this.path}[${index}]`;\n const itemPath = childBinding ? `${baseItemPath}.${childBinding}` : baseItemPath;\n\n // Create new node and cache it\n const node: AXPWidgetNode = {\n ...child,\n path: itemPath,\n defaultValue: item,\n options: {\n ...child.options,\n rawValue: item,\n rowData: this.rowData,\n },\n };\n\n this.nodeCache.set(index, node);\n return node;\n }\n\n //#endregion\n\n //#region ---- Private Methods ----\n\n private openMorePopover(): void {\n if (this.morePopover() && this.moreButton()) {\n this.morePopover()!.target = this.moreButton()!.nativeElement;\n this.morePopover()!.open();\n this.isMorePopoverOpen.set(true);\n }\n }\n\n //#endregion\n}\n\n","<div class=\"flex gap-1 items-center\">\n\n @for (item of visibleItems(); track $index) {\n @if (childWidgetNode) {\n <ng-container axp-widget-renderer [node]=\"getItemNode(item, $index)!\" [mode]=\"'view'\" [parentNode]=\"null\"\n [index]=\"$index\"></ng-container>\n }\n }@empty {\n <span class=\"text-muted\">---</span>\n }\n\n\n @if (hasMoreItems()) {\n <span\n class=\"absolute flex items-center end-0 px-1 cursor-pointer h-full hover:primary-lighter-surface\"\n (click)=\"showMoreItems()\" #moreButton>\n <i class=\"fa-light fa-ellipsis-vertical\"></i>\n </span>\n }\n</div>\n\n<!-- More Items Popover -->\n<ax-popover [openOn]=\"'manual'\" #morePopover (openChange)=\"onMorePopoverOpenChange($event)\">\n <div class=\"lightest-surface border rounded-lg shadow-lg p-4 min-w-[280px]\">\n <div class=\"mb-4 border-b pb-2\">\n <h3 class=\"text-base font-semibold\">All {{ allItems().length }} Items</h3>\n </div>\n <div class=\"max-h-64 flex flex-col gap-3 overflow-auto\" style=\"max-height: max(30dvh,10rem)\">\n @for (item of allItems(); track $index) {\n <div>\n @if (childWidgetNode) {\n <ng-container axp-widget-renderer [node]=\"getItemNode(item, $index)!\" [mode]=\"'view'\"\n [parentNode]=\"null\" [index]=\"$index\"></ng-container>\n }\n </div>\n }\n </div>\n </div>\n</ax-popover>"],"names":["i2"],"mappings":";;;;;;;;;;;AAiBM,MAAO,gCAAiC,SAAQ,wBAA+B,CAAA;AARrF,IAAA,WAAA,GAAA;;;AAWc,QAAA,IAAA,CAAA,UAAU,GAAG,SAAS,CAAa,YAAY,iFAAC;AAChD,QAAA,IAAA,CAAA,WAAW,GAAG,SAAS,CAAqB,aAAa,kFAAC;;;QAM1D,IAAA,CAAA,UAAU,GAAW,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC;QACpD,IAAA,CAAA,eAAe,GAA8B,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;;;AAM1E,QAAA,IAAA,CAAA,iBAAiB,GAAG,MAAM,CAAC,KAAK,wFAAC;;;;AAOnC,QAAA,IAAA,CAAA,SAAS,GAAG,IAAI,GAAG,EAAyB;QAC5C,IAAA,CAAA,SAAS,GAAU,EAAE;;;AAgBnB,QAAA,IAAA,CAAA,YAAY,GAAG,QAAQ,CAAC,MAAK;AACnC,YAAA,IAAI,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE;AACtB,gBAAA,OAAO,EAAE;YACb;YACA,MAAM,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC,QAAQ,GAA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