@acorex/platform 20.3.0-next.8 → 20.4.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/common/index.d.ts +643 -367
- package/core/index.d.ts +91 -66
- package/fesm2022/acorex-platform-auth.mjs +19 -19
- package/fesm2022/acorex-platform-auth.mjs.map +1 -1
- package/fesm2022/acorex-platform-common-common-settings.provider-9OHien_H.mjs +47 -0
- package/fesm2022/acorex-platform-common-common-settings.provider-9OHien_H.mjs.map +1 -0
- package/fesm2022/acorex-platform-common.mjs +678 -252
- package/fesm2022/acorex-platform-common.mjs.map +1 -1
- package/fesm2022/acorex-platform-core.mjs +173 -161
- package/fesm2022/acorex-platform-core.mjs.map +1 -1
- package/fesm2022/acorex-platform-domain.mjs +16 -16
- package/fesm2022/acorex-platform-domain.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-builder.mjs +1946 -1947
- package/fesm2022/acorex-platform-layout-builder.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-components.mjs +1902 -904
- package/fesm2022/acorex-platform-layout-components.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-designer.mjs +96 -89
- package/fesm2022/acorex-platform-layout-designer.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-entity-create-entity.command-DyXF9zAh.mjs +52 -0
- package/fesm2022/acorex-platform-layout-entity-create-entity.command-DyXF9zAh.mjs.map +1 -0
- package/fesm2022/acorex-platform-layout-entity.mjs +2237 -1834
- package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-views.mjs +64 -62
- package/fesm2022/acorex-platform-layout-views.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-widget-core.mjs +2758 -0
- package/fesm2022/acorex-platform-layout-widget-core.mjs.map +1 -0
- package/fesm2022/{acorex-platform-widgets-button-widget-designer.component-C2Qn1YAW.mjs → acorex-platform-layout-widgets-button-widget-designer.component-C_3IWNkj.mjs} +6 -6
- package/fesm2022/acorex-platform-layout-widgets-button-widget-designer.component-C_3IWNkj.mjs.map +1 -0
- package/fesm2022/{acorex-platform-widgets-extra-properties-schema-widget-edit.component-D9mf08rU.mjs → acorex-platform-layout-widgets-extra-properties-schema-widget-edit.component-CJltEgut.mjs} +5 -5
- package/fesm2022/acorex-platform-layout-widgets-extra-properties-schema-widget-edit.component-CJltEgut.mjs.map +1 -0
- package/fesm2022/{acorex-platform-widgets-extra-properties-schema-widget-view.component-D6GQ-eyr.mjs → acorex-platform-layout-widgets-extra-properties-schema-widget-view.component-pM-TIuk0.mjs} +5 -5
- package/fesm2022/acorex-platform-layout-widgets-extra-properties-schema-widget-view.component-pM-TIuk0.mjs.map +1 -0
- package/fesm2022/{acorex-platform-widgets-extra-properties-values-widget-edit.component-DVbIdVZ6.mjs → acorex-platform-layout-widgets-extra-properties-values-widget-edit.component-BqI96-fU.mjs} +5 -5
- package/fesm2022/acorex-platform-layout-widgets-extra-properties-values-widget-edit.component-BqI96-fU.mjs.map +1 -0
- package/fesm2022/{acorex-platform-widgets-extra-properties-values-widget-view.component-D-aM64Hu.mjs → acorex-platform-layout-widgets-extra-properties-values-widget-view.component-C-AhenaM.mjs} +5 -5
- package/fesm2022/acorex-platform-layout-widgets-extra-properties-values-widget-view.component-C-AhenaM.mjs.map +1 -0
- package/fesm2022/{acorex-platform-widgets-extra-properties-widget-edit.component-em2-aU8E.mjs → acorex-platform-layout-widgets-extra-properties-widget-edit.component-DCAya5ne.mjs} +5 -5
- package/fesm2022/acorex-platform-layout-widgets-extra-properties-widget-edit.component-DCAya5ne.mjs.map +1 -0
- package/fesm2022/{acorex-platform-widgets-extra-properties-widget-view.component-BeuIofdr.mjs → acorex-platform-layout-widgets-extra-properties-widget-view.component-D-PnBqLb.mjs} +5 -5
- package/fesm2022/acorex-platform-layout-widgets-extra-properties-widget-view.component-D-PnBqLb.mjs.map +1 -0
- package/fesm2022/{acorex-platform-widgets-file-list-popup.component-rW2RD35f.mjs → acorex-platform-layout-widgets-file-list-popup.component-DuuFHWvB.mjs} +10 -10
- package/fesm2022/acorex-platform-layout-widgets-file-list-popup.component-DuuFHWvB.mjs.map +1 -0
- package/fesm2022/{acorex-platform-widgets-page-widget-designer.component-DNvnQ4Mc.mjs → acorex-platform-layout-widgets-page-widget-designer.component-Bss0xUcu.mjs} +8 -8
- package/fesm2022/acorex-platform-layout-widgets-page-widget-designer.component-Bss0xUcu.mjs.map +1 -0
- package/fesm2022/{acorex-platform-widgets-tabular-data-edit-popup.component-CPVRbE8B.mjs → acorex-platform-layout-widgets-tabular-data-edit-popup.component-Cy9mHnNP.mjs} +14 -14
- package/fesm2022/acorex-platform-layout-widgets-tabular-data-edit-popup.component-Cy9mHnNP.mjs.map +1 -0
- package/fesm2022/{acorex-platform-widgets-tabular-data-view-popup.component-Dmg5DdX8.mjs → acorex-platform-layout-widgets-tabular-data-view-popup.component-DznLtuer.mjs} +6 -5
- package/fesm2022/acorex-platform-layout-widgets-tabular-data-view-popup.component-DznLtuer.mjs.map +1 -0
- package/fesm2022/{acorex-platform-widgets-text-block-widget-designer.component-yADN3Xji.mjs → acorex-platform-layout-widgets-text-block-widget-designer.component-ndOUSFi9.mjs} +6 -7
- package/fesm2022/acorex-platform-layout-widgets-text-block-widget-designer.component-ndOUSFi9.mjs.map +1 -0
- package/fesm2022/{acorex-platform-widgets.mjs → acorex-platform-layout-widgets.mjs} +9918 -8826
- package/fesm2022/acorex-platform-layout-widgets.mjs.map +1 -0
- package/fesm2022/acorex-platform-native.mjs +7 -7
- package/fesm2022/acorex-platform-native.mjs.map +1 -1
- package/fesm2022/acorex-platform-runtime.mjs +40 -40
- package/fesm2022/acorex-platform-runtime.mjs.map +1 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-B1PT6FtZ.mjs +115 -0
- package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-B1PT6FtZ.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-rdKxuMC_.mjs +742 -0
- package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-rdKxuMC_.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-4g19A3eI.mjs +101 -0
- package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-4g19A3eI.mjs.map +1 -0
- package/fesm2022/{acorex-platform-themes-default-entity-master-single-view.component-BExtm1JE.mjs → acorex-platform-themes-default-entity-master-single-view.component-B8gx5cG7.mjs} +17 -17
- package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-B8gx5cG7.mjs.map +1 -0
- package/fesm2022/{acorex-platform-themes-default-error-401.component-DrO1PEOH.mjs → acorex-platform-themes-default-error-401.component-CcvGfdhu.mjs} +4 -4
- package/fesm2022/{acorex-platform-themes-default-error-401.component-DrO1PEOH.mjs.map → acorex-platform-themes-default-error-401.component-CcvGfdhu.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-themes-default-error-404.component-DqVq0oHX.mjs → acorex-platform-themes-default-error-404.component-4-CaEsnV.mjs} +4 -4
- package/fesm2022/{acorex-platform-themes-default-error-404.component-DqVq0oHX.mjs.map → acorex-platform-themes-default-error-404.component-4-CaEsnV.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-themes-default-error-offline.component-Bt2PTL7_.mjs → acorex-platform-themes-default-error-offline.component-BNecbFEj.mjs} +4 -4
- package/fesm2022/{acorex-platform-themes-default-error-offline.component-Bt2PTL7_.mjs.map → acorex-platform-themes-default-error-offline.component-BNecbFEj.mjs.map} +1 -1
- package/fesm2022/acorex-platform-themes-default.mjs +117 -51
- package/fesm2022/acorex-platform-themes-default.mjs.map +1 -1
- package/fesm2022/{acorex-platform-themes-shared-icon-chooser-view.component-BgEh06Tn.mjs → acorex-platform-themes-shared-icon-chooser-view.component-Dc_Txe32.mjs} +5 -5
- package/fesm2022/acorex-platform-themes-shared-icon-chooser-view.component-Dc_Txe32.mjs.map +1 -0
- package/fesm2022/{acorex-platform-themes-shared-settings.provider-CXiRmniv.mjs → acorex-platform-themes-shared-settings.provider-DY2xFnrv.mjs} +9 -9
- package/fesm2022/acorex-platform-themes-shared-settings.provider-DY2xFnrv.mjs.map +1 -0
- package/fesm2022/{acorex-platform-themes-shared-theme-color-chooser-column.component-AeOQxjbS.mjs → acorex-platform-themes-shared-theme-color-chooser-column.component-hgWLhhle.mjs} +5 -5
- package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-column.component-hgWLhhle.mjs.map +1 -0
- package/fesm2022/{acorex-platform-themes-shared-theme-color-chooser-view.component-DEVzRd6-.mjs → acorex-platform-themes-shared-theme-color-chooser-view.component-CY3JZK_W.mjs} +5 -5
- package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-view.component-CY3JZK_W.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-shared.mjs +217 -75
- package/fesm2022/acorex-platform-themes-shared.mjs.map +1 -1
- package/fesm2022/acorex-platform-workflow.mjs +27 -39
- package/fesm2022/acorex-platform-workflow.mjs.map +1 -1
- package/layout/builder/README.md +1577 -3
- package/layout/builder/index.d.ts +735 -813
- package/layout/components/index.d.ts +384 -433
- package/layout/designer/index.d.ts +8 -6
- package/layout/entity/index.d.ts +953 -338
- package/layout/views/index.d.ts +13 -14
- package/layout/widget-core/README.md +4 -0
- package/layout/widget-core/index.d.ts +959 -0
- package/layout/widgets/README.md +4 -0
- package/{widgets → layout/widgets}/index.d.ts +768 -655
- package/package.json +14 -10
- package/themes/shared/index.d.ts +2 -2
- package/workflow/index.d.ts +3 -173
- package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-BXbkGGei.mjs +0 -115
- package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-BXbkGGei.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-gQIK6PIx.mjs +0 -706
- package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-gQIK6PIx.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-Bp1JLsj1.mjs +0 -101
- package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-Bp1JLsj1.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-BExtm1JE.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-shared-icon-chooser-view.component-BgEh06Tn.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-shared-settings.provider-CXiRmniv.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-column.component-AeOQxjbS.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-view.component-DEVzRd6-.mjs.map +0 -1
- package/fesm2022/acorex-platform-widgets-button-widget-designer.component-C2Qn1YAW.mjs.map +0 -1
- package/fesm2022/acorex-platform-widgets-checkbox-widget-column.component-CzEFmKWG.mjs +0 -84
- package/fesm2022/acorex-platform-widgets-checkbox-widget-column.component-CzEFmKWG.mjs.map +0 -1
- package/fesm2022/acorex-platform-widgets-checkbox-widget-designer.component-BXPrXy-h.mjs +0 -55
- package/fesm2022/acorex-platform-widgets-checkbox-widget-designer.component-BXPrXy-h.mjs.map +0 -1
- package/fesm2022/acorex-platform-widgets-checkbox-widget-view.component-KYCQ2qTJ.mjs +0 -92
- package/fesm2022/acorex-platform-widgets-checkbox-widget-view.component-KYCQ2qTJ.mjs.map +0 -1
- package/fesm2022/acorex-platform-widgets-color-box-widget-designer.component-BVZ7lWm9.mjs +0 -55
- package/fesm2022/acorex-platform-widgets-color-box-widget-designer.component-BVZ7lWm9.mjs.map +0 -1
- package/fesm2022/acorex-platform-widgets-extra-properties-schema-widget-edit.component-D9mf08rU.mjs.map +0 -1
- package/fesm2022/acorex-platform-widgets-extra-properties-schema-widget-view.component-D6GQ-eyr.mjs.map +0 -1
- package/fesm2022/acorex-platform-widgets-extra-properties-values-widget-edit.component-DVbIdVZ6.mjs.map +0 -1
- package/fesm2022/acorex-platform-widgets-extra-properties-values-widget-view.component-D-aM64Hu.mjs.map +0 -1
- package/fesm2022/acorex-platform-widgets-extra-properties-widget-edit.component-em2-aU8E.mjs.map +0 -1
- package/fesm2022/acorex-platform-widgets-extra-properties-widget-view.component-BeuIofdr.mjs.map +0 -1
- package/fesm2022/acorex-platform-widgets-file-list-popup.component-rW2RD35f.mjs.map +0 -1
- package/fesm2022/acorex-platform-widgets-page-widget-designer.component-DNvnQ4Mc.mjs.map +0 -1
- package/fesm2022/acorex-platform-widgets-rich-text-popup.component-Cydlpsat.mjs +0 -40
- package/fesm2022/acorex-platform-widgets-rich-text-popup.component-Cydlpsat.mjs.map +0 -1
- package/fesm2022/acorex-platform-widgets-tabular-data-edit-popup.component-CPVRbE8B.mjs.map +0 -1
- package/fesm2022/acorex-platform-widgets-tabular-data-view-popup.component-Dmg5DdX8.mjs.map +0 -1
- package/fesm2022/acorex-platform-widgets-text-block-widget-designer.component-yADN3Xji.mjs.map +0 -1
- package/fesm2022/acorex-platform-widgets.mjs.map +0 -1
- package/widgets/README.md +0 -4
|
@@ -1,77 +1,103 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as i5$1 from '@acorex/components/button';
|
|
2
2
|
import { AXButtonModule } from '@acorex/components/button';
|
|
3
3
|
import * as i1$1 from '@acorex/cdk/common';
|
|
4
4
|
import { AXCommonModule } from '@acorex/cdk/common';
|
|
5
|
-
import * as
|
|
5
|
+
import * as i2$1 from '@acorex/components/decorators';
|
|
6
6
|
import { AXDecoratorModule } from '@acorex/components/decorators';
|
|
7
7
|
import * as i5 from '@acorex/core/translation';
|
|
8
|
-
import {
|
|
9
|
-
import * as
|
|
8
|
+
import { AXTranslationModule, AXTranslationService } from '@acorex/core/translation';
|
|
9
|
+
import * as i2 from '@acorex/components/skeleton';
|
|
10
10
|
import { AXSkeletonModule } from '@acorex/components/skeleton';
|
|
11
|
-
import * as
|
|
11
|
+
import * as i4$1 from '@acorex/core/format';
|
|
12
12
|
import { AXFormatModule } from '@acorex/core/format';
|
|
13
|
-
import { getSystemActions, AXPExpressionEvaluatorService, AXPContextStore } from '@acorex/platform/core';
|
|
13
|
+
import { getSystemActions, AXPExpressionEvaluatorService, AXPContextStore, AXPGridLayoutDirective } from '@acorex/platform/core';
|
|
14
14
|
import { AXPWorkflowService } from '@acorex/platform/workflow';
|
|
15
15
|
import * as i4 from '@angular/common';
|
|
16
16
|
import { CommonModule } from '@angular/common';
|
|
17
17
|
import * as i0 from '@angular/core';
|
|
18
|
-
import {
|
|
18
|
+
import { input, ChangeDetectionStrategy, ViewEncapsulation, Component, inject, signal, effect, InjectionToken, computed, Injectable, Directive, viewChild, contentChild, ElementRef, output, model, Injector, ViewContainerRef, runInInjectionContext, Optional, Inject, NgModule, untracked, EventEmitter, Output, linkedSignal, ViewChildren, Input } from '@angular/core';
|
|
19
19
|
import { AXAccordionCdkModule } from '@acorex/cdk/accordion';
|
|
20
20
|
import { AXTagModule } from '@acorex/components/tag';
|
|
21
21
|
import { SIGNAL, signalSetFn } from '@angular/core/primitives/signals';
|
|
22
22
|
import * as i8 from '@acorex/components/badge';
|
|
23
23
|
import { AXBadgeComponent, AXBadgeModule } from '@acorex/components/badge';
|
|
24
|
-
import * as
|
|
24
|
+
import * as i4$2 from '@acorex/components/search-box';
|
|
25
|
+
import { AXSearchBoxModule } from '@acorex/components/search-box';
|
|
26
|
+
import * as i2$2 from '@acorex/components/tree-view';
|
|
27
|
+
import { AXTreeViewModule } from '@acorex/components/tree-view';
|
|
28
|
+
import * as i6 from '@acorex/components/dropdown';
|
|
29
|
+
import { AXDropdownModule } from '@acorex/components/dropdown';
|
|
30
|
+
import * as i3 from '@acorex/components/switch';
|
|
25
31
|
import { AXSwitchModule } from '@acorex/components/switch';
|
|
26
|
-
import * as
|
|
32
|
+
import * as i3$3 from '@angular/cdk/drag-drop';
|
|
27
33
|
import { moveItemInArray, CdkDropList, CdkDrag, CdkDragHandle, DragDropModule } from '@angular/cdk/drag-drop';
|
|
28
34
|
import * as i1 from '@angular/forms';
|
|
29
35
|
import { FormsModule } from '@angular/forms';
|
|
30
|
-
import { cloneDeep, sortBy, isEqual, camelCase, merge, capitalize, unionBy, isArray,
|
|
31
|
-
import * as i2$
|
|
32
|
-
import { AXFormModule
|
|
33
|
-
import * as i4$
|
|
36
|
+
import { cloneDeep, sortBy, isEmpty, isNil, isEqual, camelCase, merge, capitalize, unionBy, isArray, set } from 'lodash-es';
|
|
37
|
+
import * as i2$4 from '@acorex/components/form';
|
|
38
|
+
import { AXFormModule } from '@acorex/components/form';
|
|
39
|
+
import * as i4$4 from '@acorex/components/text-box';
|
|
34
40
|
import { AXTextBoxModule } from '@acorex/components/text-box';
|
|
35
|
-
import * as i2 from '@acorex/components/check-box';
|
|
41
|
+
import * as i2$3 from '@acorex/components/check-box';
|
|
36
42
|
import { AXCheckBoxModule } from '@acorex/components/check-box';
|
|
37
|
-
import * as i3$
|
|
38
|
-
import { AXLabelModule
|
|
39
|
-
import * as i3$
|
|
40
|
-
import {
|
|
41
|
-
import * as i4$
|
|
43
|
+
import * as i3$1 from '@acorex/components/label';
|
|
44
|
+
import { AXLabelModule } from '@acorex/components/label';
|
|
45
|
+
import * as i3$2 from '@acorex/platform/layout/widget-core';
|
|
46
|
+
import { AXPWidgetCoreModule, AXPWidgetRegistryService, AXPWidgetGroupEnum, AXPWidgetsCatalog } from '@acorex/platform/layout/widget-core';
|
|
47
|
+
import * as i4$3 from '@acorex/components/data-table';
|
|
42
48
|
import { AXDataTableModule } from '@acorex/components/data-table';
|
|
43
49
|
import { AXDropdownButtonModule } from '@acorex/components/dropdown-button';
|
|
44
50
|
import { AXBasePageComponent } from '@acorex/components/page';
|
|
45
|
-
import * as i5$2 from '@acorex/components/search-box';
|
|
46
|
-
import { AXSearchBoxModule } from '@acorex/components/search-box';
|
|
47
51
|
import { AXPopupService } from '@acorex/components/popup';
|
|
48
|
-
import {
|
|
49
|
-
import
|
|
50
|
-
import * as i3$5 from '@acorex/components/dropdown';
|
|
51
|
-
import { AXDropdownModule } from '@acorex/components/dropdown';
|
|
52
|
-
import * as i4$2 from '@acorex/components/loading';
|
|
53
|
-
import { AXLoadingModule } from '@acorex/components/loading';
|
|
54
|
-
import * as i5$3 from '@acorex/components/select-box';
|
|
52
|
+
import { AXPLayoutBuilderService } from '@acorex/platform/layout/builder';
|
|
53
|
+
import * as i5$2 from '@acorex/components/select-box';
|
|
55
54
|
import { AXSelectBoxModule } from '@acorex/components/select-box';
|
|
56
|
-
import * as i1$2 from '@acorex/components/
|
|
57
|
-
import {
|
|
58
|
-
import * as i2$
|
|
55
|
+
import * as i1$2 from '@acorex/components/accordion';
|
|
56
|
+
import { AXAccordionModule } from '@acorex/components/accordion';
|
|
57
|
+
import * as i2$5 from '@acorex/components/tabs';
|
|
59
58
|
import { AXTabsModule } from '@acorex/components/tabs';
|
|
60
59
|
import * as i7 from '@acorex/cdk/list-navigation';
|
|
61
60
|
import { AXListNavigationModule } from '@acorex/cdk/list-navigation';
|
|
62
|
-
import * as i4$
|
|
61
|
+
import * as i4$5 from '@acorex/components/popover';
|
|
63
62
|
import { AXPopoverModule } from '@acorex/components/popover';
|
|
64
63
|
import { AXSelectionListModule } from '@acorex/components/selection-list';
|
|
65
|
-
import * as i5$
|
|
64
|
+
import * as i5$3 from '@acorex/components/tag-box';
|
|
66
65
|
import { AXTagBoxModule } from '@acorex/components/tag-box';
|
|
67
66
|
import { AXCalendarService } from '@acorex/core/date-time';
|
|
67
|
+
import { AXPFilterOperatorMiddlewareService, ALL_DEFAULT_OPERATORS, AXPFileStorageService } from '@acorex/platform/common';
|
|
68
|
+
import * as i1$3 from '@acorex/components/image-editor';
|
|
69
|
+
import { AXImageEditorContainerComponent, AXImageEditorModule } from '@acorex/components/image-editor';
|
|
70
|
+
import * as i3$4 from '@acorex/components/toolbar';
|
|
71
|
+
import { AXToolBarModule } from '@acorex/components/toolbar';
|
|
68
72
|
import { BehaviorSubject, timer, Subject, takeUntil } from 'rxjs';
|
|
69
73
|
import { tap } from 'rxjs/operators';
|
|
70
|
-
import * as i1$
|
|
74
|
+
import * as i1$4 from '@acorex/components/avatar';
|
|
71
75
|
import { AXAvatarModule } from '@acorex/components/avatar';
|
|
72
|
-
import * as i3$
|
|
76
|
+
import * as i3$5 from '@acorex/components/image';
|
|
73
77
|
import { AXImageModule } from '@acorex/components/image';
|
|
74
78
|
|
|
79
|
+
//#endregion
|
|
80
|
+
//#region ---- Component Definition ----
|
|
81
|
+
//#endregion
|
|
82
|
+
//#region ---- Component Class ----
|
|
83
|
+
class AXPStateMessageComponent {
|
|
84
|
+
constructor() {
|
|
85
|
+
// Core properties
|
|
86
|
+
this.mode = input('empty', ...(ngDevMode ? [{ debugName: "mode" }] : []));
|
|
87
|
+
this.icon = input('', ...(ngDevMode ? [{ debugName: "icon" }] : []));
|
|
88
|
+
this.title = input('', ...(ngDevMode ? [{ debugName: "title" }] : []));
|
|
89
|
+
this.description = input('', ...(ngDevMode ? [{ debugName: "description" }] : []));
|
|
90
|
+
// Optional styling
|
|
91
|
+
this.variant = input('default', ...(ngDevMode ? [{ debugName: "variant" }] : []));
|
|
92
|
+
}
|
|
93
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPStateMessageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
94
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.4", type: AXPStateMessageComponent, isStandalone: true, selector: "axp-state-message", inputs: { mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, description: { classPropertyName: "description", publicName: "description", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div class=\"axp-state-message\" [attr.data-mode]=\"mode()\" [attr.data-variant]=\"variant()\">\n <div class=\"__icon\" *ngIf=\"icon()\">\n <i [class]=\"icon()\"></i>\n </div>\n <div class=\"__content\">\n <h3 class=\"__title\" *ngIf=\"title()\">{{ title() | translate | async }}</h3>\n <p class=\"__description\" *ngIf=\"description()\">{{ description() | translate | async }}</p>\n <div class=\"__actions\">\n <ng-content select=\"[slot=actions]\"></ng-content>\n </div>\n </div>\n</div>\n", styles: [".axp-state-message{display:flex;height:100%;flex-direction:column;align-items:center;justify-content:center;padding:3rem 1rem;text-align:center}.axp-state-message .__icon{margin-bottom:1rem}.axp-state-message .__icon i{opacity:74%;display:block;font-weight:400;font-size:2.25rem!important;line-height:2.5rem!important}.axp-state-message .__content{max-width:28rem}.axp-state-message .__title{margin-bottom:.5rem;font-size:1.125rem;line-height:1.75rem;font-weight:500}.axp-state-message .__description{margin-bottom:1rem;opacity:74%;display:block;font-weight:400;font-size:.875rem!important;line-height:1.25rem!important}.axp-state-message .__actions{display:flex;flex-direction:column;align-items:center;gap:.5rem}.axp-state-message[data-mode=empty] .__icon i{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.axp-state-message[data-mode=error] .__icon i{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}.axp-state-message[data-mode=error] .__title{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}.axp-state-message[data-mode=loading] .__icon i{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity, 1))}.axp-state-message[data-mode=loading] .__title{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity, 1))}.axp-state-message[data-mode=warning] .__icon i{--tw-text-opacity: 1;color:rgb(249 115 22 / var(--tw-text-opacity, 1))}.axp-state-message[data-mode=warning] .__title{--tw-text-opacity: 1;color:rgb(234 88 12 / var(--tw-text-opacity, 1))}.axp-state-message[data-mode=info] .__icon i{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity, 1))}.axp-state-message[data-mode=info] .__title{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity, 1))}.axp-state-message[data-mode=success] .__icon i{--tw-text-opacity: 1;color:rgb(34 197 94 / var(--tw-text-opacity, 1))}.axp-state-message[data-mode=success] .__title{--tw-text-opacity: 1;color:rgb(22 163 74 / var(--tw-text-opacity, 1))}.axp-state-message[data-variant=compact]{padding:1.5rem .75rem}.axp-state-message[data-variant=compact] .__icon{margin-bottom:.5rem}.axp-state-message[data-variant=compact] .__icon i{font-size:1.5rem!important;line-height:2rem!important}.axp-state-message[data-variant=compact] .__title{margin-bottom:.25rem;font-size:1rem;line-height:1.5rem}.axp-state-message[data-variant=compact] .__description{margin-bottom:.5rem;font-size:.75rem;line-height:1rem}.axp-state-message[data-variant=minimal]{padding:1rem .5rem}.axp-state-message[data-variant=minimal] .__icon{margin-bottom:.25rem}.axp-state-message[data-variant=minimal] .__icon i{font-size:1.25rem!important;line-height:1.75rem!important}.axp-state-message[data-variant=minimal] .__title{margin-bottom:.25rem;font-size:.875rem;line-height:1.25rem}.axp-state-message[data-variant=minimal] .__description{margin-bottom:.25rem;font-size:.75rem;line-height:1rem}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "pipe", type: i5.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
95
|
+
}
|
|
96
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPStateMessageComponent, decorators: [{
|
|
97
|
+
type: Component,
|
|
98
|
+
args: [{ selector: 'axp-state-message', standalone: true, imports: [CommonModule, AXTranslationModule], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"axp-state-message\" [attr.data-mode]=\"mode()\" [attr.data-variant]=\"variant()\">\n <div class=\"__icon\" *ngIf=\"icon()\">\n <i [class]=\"icon()\"></i>\n </div>\n <div class=\"__content\">\n <h3 class=\"__title\" *ngIf=\"title()\">{{ title() | translate | async }}</h3>\n <p class=\"__description\" *ngIf=\"description()\">{{ description() | translate | async }}</p>\n <div class=\"__actions\">\n <ng-content select=\"[slot=actions]\"></ng-content>\n </div>\n </div>\n</div>\n", styles: [".axp-state-message{display:flex;height:100%;flex-direction:column;align-items:center;justify-content:center;padding:3rem 1rem;text-align:center}.axp-state-message .__icon{margin-bottom:1rem}.axp-state-message .__icon i{opacity:74%;display:block;font-weight:400;font-size:2.25rem!important;line-height:2.5rem!important}.axp-state-message .__content{max-width:28rem}.axp-state-message .__title{margin-bottom:.5rem;font-size:1.125rem;line-height:1.75rem;font-weight:500}.axp-state-message .__description{margin-bottom:1rem;opacity:74%;display:block;font-weight:400;font-size:.875rem!important;line-height:1.25rem!important}.axp-state-message .__actions{display:flex;flex-direction:column;align-items:center;gap:.5rem}.axp-state-message[data-mode=empty] .__icon i{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.axp-state-message[data-mode=error] .__icon i{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}.axp-state-message[data-mode=error] .__title{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}.axp-state-message[data-mode=loading] .__icon i{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity, 1))}.axp-state-message[data-mode=loading] .__title{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity, 1))}.axp-state-message[data-mode=warning] .__icon i{--tw-text-opacity: 1;color:rgb(249 115 22 / var(--tw-text-opacity, 1))}.axp-state-message[data-mode=warning] .__title{--tw-text-opacity: 1;color:rgb(234 88 12 / var(--tw-text-opacity, 1))}.axp-state-message[data-mode=info] .__icon i{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity, 1))}.axp-state-message[data-mode=info] .__title{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity, 1))}.axp-state-message[data-mode=success] .__icon i{--tw-text-opacity: 1;color:rgb(34 197 94 / var(--tw-text-opacity, 1))}.axp-state-message[data-mode=success] .__title{--tw-text-opacity: 1;color:rgb(22 163 74 / var(--tw-text-opacity, 1))}.axp-state-message[data-variant=compact]{padding:1.5rem .75rem}.axp-state-message[data-variant=compact] .__icon{margin-bottom:.5rem}.axp-state-message[data-variant=compact] .__icon i{font-size:1.5rem!important;line-height:2rem!important}.axp-state-message[data-variant=compact] .__title{margin-bottom:.25rem;font-size:1rem;line-height:1.5rem}.axp-state-message[data-variant=compact] .__description{margin-bottom:.5rem;font-size:.75rem;line-height:1rem}.axp-state-message[data-variant=minimal]{padding:1rem .5rem}.axp-state-message[data-variant=minimal] .__icon{margin-bottom:.25rem}.axp-state-message[data-variant=minimal] .__icon i{font-size:1.25rem!important;line-height:1.75rem!important}.axp-state-message[data-variant=minimal] .__title{margin-bottom:.25rem;font-size:.875rem;line-height:1.25rem}.axp-state-message[data-variant=minimal] .__description{margin-bottom:.25rem;font-size:.75rem;line-height:1rem}\n"] }]
|
|
99
|
+
}] });
|
|
100
|
+
|
|
75
101
|
//#region ---- Component Definition ----
|
|
76
102
|
class AXPActivityLogComponent {
|
|
77
103
|
//#endregion
|
|
@@ -201,10 +227,10 @@ class AXPActivityLogComponent {
|
|
|
201
227
|
const currentIndex = this.activities().findIndex(a => a.id === activity.id);
|
|
202
228
|
return currentIndex > 0; // Can compare if not the first activity
|
|
203
229
|
}
|
|
204
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
205
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.8", type: AXPActivityLogComponent, isStandalone: true, selector: "axp-activity-log", inputs: { activities: { classPropertyName: "activities", publicName: "activities", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div class=\"axp-activity-log ax-accent2\" *translate=\"let t\">\n\n <!-- Activity Log Content -->\n <div class=\"__content\">\n\n <!-- Loading State -->\n @if (loading()) {\n <div class=\"__loading\">\n @for (item of [1,2,3,4]; track $index) {\n <div class=\"__item\">\n <ax-skeleton [animated]=\"true\" class=\"__avatar\"></ax-skeleton>\n <div class=\"__content\">\n <ax-skeleton [animated]=\"true\" class=\"__title\"></ax-skeleton>\n <ax-skeleton [animated]=\"true\" class=\"__subtitle\"></ax-skeleton>\n <ax-skeleton [animated]=\"true\" class=\"__description\"></ax-skeleton>\n <ax-skeleton [animated]=\"true\" class=\"__time\"></ax-skeleton>\n </div>\n </div>\n }\n </div>\n }\n\n <!-- Activity Feed -->\n @if (!loading() && activities().length > 0) {\n <div class=\"__feed\">\n @for (activity of activities(); track activity.id) {\n @let changeClasses = getChangeClasses(activity.changeType);\n @let isItemExpanded = isExpanded(activity.id);\n @let hasExpandableContentItem = hasExpandableContent(activity);\n <div class=\"__item\" [class.__collapsed]=\"!isItemExpanded\" [class.__expandable]=\"hasExpandableContentItem\">\n\n <div\n class=\"ax-size-10 ax-rounded-full ax-border ax-flex ax-items-center ax-justify-center ax-lightest-surface \">\n <i class=\"{{changeClasses.icon}} {{changeClasses.text}} fa-solid\"></i>\n </div>\n\n <!-- Activity Content -->\n <div class=\"__content\">\n <!-- Main Activity Info -->\n <div class=\"__main-info\">\n\n <!-- User and Action with Toggle Button -->\n <div class=\"__action-line __header-line\" (click)=\"toggleExpanded(activity.id)\">\n <span class=\"__user-name\">{{ activity.user.title }}</span>\n <span class=\"__action-type\">\n {{ t(`actions.${activity.changeType}.title`, {\n scope: 'general' }) | async }}\n </span>\n <span class=\"__action-text\">\n {{ activity.title | translate | async }}\n </span>\n\n <!-- Compare Button -->\n @if (canCompare(activity)) {\n <button type=\"button\" class=\"__compare-button\" (click)=\"handleCompare(activity, $event)\"\n [attr.aria-label]=\"t('compare.title', { scope: i18nScope }) | async\">\n <i class=\"fa-solid fa-code-compare\"></i>\n </button>\n }\n\n <!-- Toggle Button (only show if there's expandable content) -->\n @if (hasExpandableContentItem) {\n <button type=\"button\" class=\"__toggle-button\" [attr.aria-expanded]=\"isItemExpanded\"\n [attr.aria-label]=\"isItemExpanded ? 'Collapse details' : 'Expand details'\">\n <i class=\"fa-solid\" [class.fa-chevron-down]=\"!isItemExpanded\"\n [class.fa-chevron-up]=\"isItemExpanded\"></i>\n </button>\n }\n </div>\n\n <!-- Expandable Description/Changes -->\n @if (hasExpandableContentItem && isItemExpanded && activity.changes.length > 0) {\n <div class=\"__action-lines __expandable-content\"\n [class.__animated]=\"shouldAnimate(activity.id)\">\n @for (change of activity.changes; track $index) {\n @let changeClasses = getChangeClasses(change.type);\n <div class=\"__action-line\">\n <div class=\"ax-rounded-full ax-size-7 ax-grid ax-place-items-center\">\n <i class=\"{{changeClasses.icon}} {{changeClasses.text}}\"></i>\n </div>\n <span class=\"__action-text\">{{\n change.description | translate | async }}</span>\n </div>\n }\n </div>\n }\n </div>\n\n <!-- Time -->\n <div class=\"__time\">\n {{ activity.date | format: 'datetime' : 'short' | async }}\n </div>\n\n </div>\n\n </div>\n }\n </div>\n }\n\n <!-- Empty State -->\n @if (!loading() && activities().length === 0) {\n <div class=\"__empty\">\n <div class=\"__icon\">\n <ax-icon icon=\"fa-light fa-history\" class=\"__svg\"></ax-icon>\n </div>\n <div class=\"__content\">\n <h4 class=\"__title\">{{ t('no-history.title', { scope: i18nScope }) | async }}</h4>\n <p class=\"__message\">{{ t('no-history.message', { scope: i18nScope }) | async }}\n </p>\n </div>\n </div>\n }\n\n </div>\n</div>\n\n<!-- \n\nax-success-surface\nax-primary-surface\nax-danger-surface\nax-warning-surface\nax-info-surface\nax-muted-surface\nax-text-success\n\n -->", styles: [".axp-activity-log{height:100%;width:100%}.axp-activity-log .__content .__loading>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.axp-activity-log .__content .__loading .__item{display:flex;align-items:flex-start;gap:1rem}.axp-activity-log .__content .__loading .__item .__avatar{height:3rem;width:3rem;flex-shrink:0;border-radius:9999px}.axp-activity-log .__content .__loading .__item .__content{flex:1 1 0%}.axp-activity-log .__content .__loading .__item .__content>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.axp-activity-log .__content .__loading .__item .__content .__title{height:1rem;width:75%;border-radius:.25rem}.axp-activity-log .__content .__loading .__item .__content .__subtitle{height:.75rem;width:50%;border-radius:.25rem}.axp-activity-log .__content .__loading .__item .__content .__description{height:.75rem;width:83.333333%;border-radius:.25rem}.axp-activity-log .__content .__loading .__item .__content .__time{height:.75rem;width:25%;border-radius:.25rem}.axp-activity-log .__content .__feed{position:relative}.axp-activity-log .__content .__feed>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.axp-activity-log .__content .__feed:before{content:\"\";position:absolute;inset-inline-start:1.25rem;top:.5rem;bottom:.5rem;width:0px;border-left:1px solid rgba(var(--ax-sys-color-border-surface));z-index:0}.axp-activity-log .__content .__feed .__item{position:relative;display:flex;align-items:flex-start;gap:1rem}.axp-activity-log .__content .__feed .__item axp-user-avatar{position:relative;z-index:10}.axp-activity-log .__content .__feed .__item .__content{min-width:0px;flex:1 1 0%}.axp-activity-log .__content .__feed .__item .__content .__main-info{margin-bottom:.25rem}.axp-activity-log .__content .__feed .__item .__content .__main-info .__action-line{margin-top:.25rem;display:flex;flex-wrap:wrap;align-items:center;gap:.25rem;line-height:1.5}.axp-activity-log .__content .__feed .__item .__content .__main-info .__action-line .__user-name{font-weight:600}.axp-activity-log .__content .__feed .__item .__content .__main-info .__action-line .__action-type,.axp-activity-log .__content .__feed .__item .__content .__main-info .__action-line .__action-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.875rem;line-height:1.25rem;opacity:.85}.axp-activity-log .__content .__feed .__item .__content .__main-info .__action-line.__header-line{align-items:center;border-radius:.375rem;padding:.25rem .5rem}.axp-activity-log .__content .__feed .__item .__content .__main-info .__action-line.__header-line:hover{background-color:rgb(var(--ax-sys-color-lighter-surface));color:rgb(var(--ax-sys-color-on-lighter-surface));border-color:rgb(var(--ax-sys-color-border-lighter-surface))}.axp-activity-log .__content .__feed .__item .__content .__main-info .__action-line.__header-line .__compare-button{margin-left:.5rem;border-radius:9999px;padding:.25rem;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.2s;animation-duration:.2s;display:flex;width:1.5rem;height:1.5rem;align-items:center;justify-content:center;--tw-text-opacity: 1;color:rgba(var(--ax-sys-color-primary-500),var(--tw-text-opacity, 1))}.axp-activity-log .__content .__feed .__item .__content .__main-info .__action-line.__header-line .__compare-button:hover{background-color:rgb(var(--ax-sys-color-primary-surface));color:rgb(var(--ax-sys-color-on-primary-surface));border-color:rgb(var(--ax-sys-color-border-primary-surface))}.axp-activity-log .__content .__feed .__item .__content .__main-info .__action-line.__header-line .__compare-button:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000);--tw-ring-opacity: 1;--tw-ring-color: rgba(var(--ax-sys-color-primary-500), var(--tw-ring-opacity, 1));--tw-ring-offset-width: 1px}.axp-activity-log .__content .__feed .__item .__content .__main-info .__action-line.__header-line .__compare-button i{font-size:.75rem;line-height:1rem}.axp-activity-log .__content .__feed .__item .__content .__main-info .__action-line.__header-line .__toggle-button{margin-left:auto;border-radius:9999px;padding:.25rem;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.2s;animation-duration:.2s;display:flex;width:1.5rem;height:1.5rem;align-items:center;justify-content:center}.axp-activity-log .__content .__feed .__item .__content .__main-info .__action-line.__header-line .__toggle-button:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000);--tw-ring-opacity: 1;--tw-ring-color: rgba(var(--ax-sys-color-primary-500), var(--tw-ring-opacity, 1));--tw-ring-offset-width: 1px}.axp-activity-log .__content .__feed .__item .__content .__main-info .__action-line.__header-line .__toggle-button i{font-size:.75rem;line-height:1rem;transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.2s;animation-duration:.2s}.axp-activity-log .__content .__feed .__item .__content .__main-info .__action-lines{margin-top:.5rem;margin-bottom:.5rem;display:flex;flex-direction:column;font-size:.875rem;line-height:1.25rem}.axp-activity-log .__content .__feed .__item .__content .__main-info .__action-lines.__expandable-content{overflow:hidden}.axp-activity-log .__content .__feed .__item .__content .__main-info .__action-lines.__expandable-content.__animated{transition-property:all;transition-duration:.3s;transition-timing-function:cubic-bezier(.4,0,.2,1);animation-duration:.3s;animation-timing-function:cubic-bezier(.4,0,.2,1);animation:slideDown .3s ease-out}.axp-activity-log .__content .__feed .__item .__content .__main-info .__action-lines .__action-line{display:flex;align-items:center;gap:.5rem;padding-top:.25rem;padding-bottom:.25rem}.axp-activity-log .__content .__feed .__item .__content .__main-info .__action-lines .__action-line .__action-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.875rem;line-height:1.25rem;opacity:.85}.axp-activity-log .__content .__feed .__item .__content .__time{padding-left:.5rem;padding-right:.5rem;font-size:.75rem;line-height:1rem;opacity:.75}.axp-activity-log .__content .__feed .__item.__collapsed .__expandable-content{display:none}.axp-activity-log .__content .__feed .__item.__expandable .__header-line{cursor:pointer}.axp-activity-log .__content .__empty{display:flex;height:12rem;flex-direction:column;align-items:center;justify-content:center;padding:2rem;text-align:center}.axp-activity-log .__content .__empty .__icon{margin-bottom:1rem}.axp-activity-log .__content .__empty .__icon .__svg{font-size:2.25rem;line-height:2.5rem;--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.axp-activity-log .__content .__empty .__content .__title{margin-bottom:.5rem;font-size:1.125rem;line-height:1.75rem;font-weight:600;--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity, 1))}.axp-activity-log .__content .__empty .__content .__message{max-width:20rem;line-height:1.625;--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}@media (min-width: 640px){.axp-activity-log .__content .__feed .__item{gap:.625rem}.axp-activity-log .__content .__feed .__item .__content .__main-info .__action-line{flex-wrap:nowrap}}@keyframes slideDown{0%{opacity:0;max-height:0;transform:translateY(-10px)}to{opacity:1;max-height:200px;transform:translateY(0)}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXButtonModule }, { kind: "ngmodule", type: AXCommonModule }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i3.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "directive", type: i5.AXTranslatorDirective, selector: "[translate]" }, { kind: "ngmodule", type: AXSkeletonModule }, { kind: "component", type: i3$1.AXSkeletonComponent, selector: "ax-skeleton", inputs: ["animated"] }, { kind: "ngmodule", type: AXFormatModule }, { kind: "ngmodule", type: AXTagModule }, { kind: "ngmodule", type: AXAccordionCdkModule }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "pipe", type: i5.AXTranslatorPipe, name: "translate" }, { kind: "pipe", type: i5$1.AXFormatPipe, name: "format" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
230
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPActivityLogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
231
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.4", type: AXPActivityLogComponent, isStandalone: true, selector: "axp-activity-log", inputs: { activities: { classPropertyName: "activities", publicName: "activities", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div class=\"axp-activity-log ax-accent2\" *translate=\"let t\">\n <!-- Activity Log Content -->\n <div class=\"__content\">\n <!-- Loading State -->\n @if (loading()) {\n <div class=\"__loading\">\n @for (item of [1, 2, 3, 4]; track $index) {\n <div class=\"__item\">\n <ax-skeleton [animated]=\"true\" class=\"__avatar\"></ax-skeleton>\n <div class=\"__content\">\n <ax-skeleton [animated]=\"true\" class=\"__title\"></ax-skeleton>\n <ax-skeleton [animated]=\"true\" class=\"__subtitle\"></ax-skeleton>\n <ax-skeleton [animated]=\"true\" class=\"__description\"></ax-skeleton>\n <ax-skeleton [animated]=\"true\" class=\"__time\"></ax-skeleton>\n </div>\n </div>\n }\n </div>\n }\n\n <!-- Activity Feed -->\n @if (!loading() && activities().length > 0) {\n <div class=\"__feed\">\n @for (activity of activities(); track activity.id) {\n @let changeClasses = getChangeClasses(activity.changeType);\n @let isItemExpanded = isExpanded(activity.id);\n @let hasExpandableContentItem = hasExpandableContent(activity);\n <div class=\"__item\" [class.__collapsed]=\"!isItemExpanded\" [class.__expandable]=\"hasExpandableContentItem\">\n <div class=\"ax-size-10 ax-rounded-full ax-border ax-flex ax-items-center ax-justify-center ax-lightest-surface\">\n <i class=\"{{ changeClasses.icon }} {{ changeClasses.text }} fa-solid\"></i>\n </div>\n\n <!-- Activity Content -->\n <div class=\"__content\">\n <!-- Main Activity Info -->\n <div class=\"__main-info\">\n <!-- User and Action with Toggle Button -->\n <div class=\"__action-line __header-line\" (click)=\"toggleExpanded(activity.id)\">\n <span class=\"__user-name\">{{ activity.user.title }}</span>\n <span class=\"__action-type\">\n {{ t(`@general:actions.${activity.changeType}.title`) | async }}\n </span>\n <span class=\"__action-text\">\n {{ activity.title | translate | async }}\n </span>\n\n <!-- Compare Button -->\n @if (canCompare(activity)) {\n <button type=\"button\" class=\"__compare-button\" (click)=\"handleCompare(activity, $event)\"\n [attr.aria-label]=\"t('compare.title', { scope: i18nScope }) | async\">\n <i class=\"fa-solid fa-code-compare\"></i>\n </button>\n }\n\n <!-- Toggle Button (only show if there's expandable content) -->\n @if (hasExpandableContentItem) {\n <button type=\"button\" class=\"__toggle-button\" [attr.aria-expanded]=\"isItemExpanded\"\n [attr.aria-label]=\"isItemExpanded ? 'Collapse details' : 'Expand details'\">\n <i class=\"fa-solid\" [class.fa-chevron-down]=\"!isItemExpanded\"\n [class.fa-chevron-up]=\"isItemExpanded\"></i>\n </button>\n }\n </div>\n\n <!-- Expandable Description/Changes -->\n @if (hasExpandableContentItem && isItemExpanded && activity.changes.length > 0) {\n <div class=\"__action-lines __expandable-content\" [class.__animated]=\"shouldAnimate(activity.id)\">\n @for (change of activity.changes; track $index) {\n @let changeClasses = getChangeClasses(change.type);\n <div class=\"__action-line\">\n <div class=\"ax-rounded-full ax-size-7 ax-grid ax-place-items-center\">\n <i class=\"{{ changeClasses.icon }} {{ changeClasses.text }}\"></i>\n </div>\n <span class=\"__action-text\">{{ change.description | translate | async }}</span>\n </div>\n }\n </div>\n }\n </div>\n\n <!-- Time -->\n <div class=\"__time\">\n {{ activity.date | format: 'datetime' : 'short' | async }}\n </div>\n </div>\n </div>\n }\n </div>\n }\n\n <!-- Empty State -->\n @if (!loading() && activities().length === 0) {\n <axp-state-message icon=\"fa-light fa-history\" [title]=\"'@activity-log:state-message.no-history.title'\"\n [description]=\"'@activity-log:state-message.no-history.description'\">\n </axp-state-message>\n }\n </div>\n</div>\n\n<!-- \n\nax-success-surface\nax-primary-surface\nax-danger-surface\nax-warning-surface\nax-info-surface\nax-muted-surface\nax-text-success\n\n -->", styles: [".axp-activity-log{height:100%;width:100%}.axp-activity-log .__content .__loading>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.axp-activity-log .__content .__loading .__item{display:flex;align-items:flex-start;gap:1rem}.axp-activity-log .__content .__loading .__item .__avatar{height:3rem;width:3rem;flex-shrink:0;border-radius:9999px}.axp-activity-log .__content .__loading .__item .__content{flex:1 1 0%}.axp-activity-log .__content .__loading .__item .__content>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.axp-activity-log .__content .__loading .__item .__content .__title{height:1rem;width:75%;border-radius:.25rem}.axp-activity-log .__content .__loading .__item .__content .__subtitle{height:.75rem;width:50%;border-radius:.25rem}.axp-activity-log .__content .__loading .__item .__content .__description{height:.75rem;width:83.333333%;border-radius:.25rem}.axp-activity-log .__content .__loading .__item .__content .__time{height:.75rem;width:25%;border-radius:.25rem}.axp-activity-log .__content .__feed{position:relative}.axp-activity-log .__content .__feed>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.axp-activity-log .__content .__feed:before{content:\"\";position:absolute;inset-inline-start:1.25rem;top:.5rem;bottom:.5rem;width:0px;border-left:1px solid rgba(var(--ax-sys-color-border-surface));z-index:0}.axp-activity-log .__content .__feed .__item{position:relative;display:flex;align-items:flex-start;gap:1rem}.axp-activity-log .__content .__feed .__item axp-user-avatar{position:relative;z-index:10}.axp-activity-log .__content .__feed .__item .__content{min-width:0px;flex:1 1 0%}.axp-activity-log .__content .__feed .__item .__content .__main-info{margin-bottom:.25rem}.axp-activity-log .__content .__feed .__item .__content .__main-info .__action-line{margin-top:.25rem;display:flex;flex-wrap:wrap;align-items:center;gap:.25rem;line-height:1.5}.axp-activity-log .__content .__feed .__item .__content .__main-info .__action-line .__user-name{font-weight:600}.axp-activity-log .__content .__feed .__item .__content .__main-info .__action-line .__action-type,.axp-activity-log .__content .__feed .__item .__content .__main-info .__action-line .__action-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.875rem;line-height:1.25rem;opacity:.85}.axp-activity-log .__content .__feed .__item .__content .__main-info .__action-line.__header-line{align-items:center;border-radius:.375rem;padding:.25rem .5rem}.axp-activity-log .__content .__feed .__item .__content .__main-info .__action-line.__header-line:hover{background-color:rgb(var(--ax-sys-color-lighter-surface));color:rgb(var(--ax-sys-color-on-lighter-surface));border-color:rgb(var(--ax-sys-color-border-lighter-surface))}.axp-activity-log .__content .__feed .__item .__content .__main-info .__action-line.__header-line .__compare-button{margin-left:.5rem;border-radius:9999px;padding:.25rem;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.2s;animation-duration:.2s;display:flex;width:1.5rem;height:1.5rem;align-items:center;justify-content:center;--tw-text-opacity: 1;color:rgba(var(--ax-sys-color-primary-500),var(--tw-text-opacity, 1))}.axp-activity-log .__content .__feed .__item .__content .__main-info .__action-line.__header-line .__compare-button:hover{background-color:rgb(var(--ax-sys-color-primary-surface));color:rgb(var(--ax-sys-color-on-primary-surface));border-color:rgb(var(--ax-sys-color-border-primary-surface))}.axp-activity-log .__content .__feed .__item .__content .__main-info .__action-line.__header-line .__compare-button:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000);--tw-ring-opacity: 1;--tw-ring-color: rgba(var(--ax-sys-color-primary-500), var(--tw-ring-opacity, 1));--tw-ring-offset-width: 1px}.axp-activity-log .__content .__feed .__item .__content .__main-info .__action-line.__header-line .__compare-button i{font-size:.75rem;line-height:1rem}.axp-activity-log .__content .__feed .__item .__content .__main-info .__action-line.__header-line .__toggle-button{margin-left:auto;border-radius:9999px;padding:.25rem;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.2s;animation-duration:.2s;display:flex;width:1.5rem;height:1.5rem;align-items:center;justify-content:center}.axp-activity-log .__content .__feed .__item .__content .__main-info .__action-line.__header-line .__toggle-button:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000);--tw-ring-opacity: 1;--tw-ring-color: rgba(var(--ax-sys-color-primary-500), var(--tw-ring-opacity, 1));--tw-ring-offset-width: 1px}.axp-activity-log .__content .__feed .__item .__content .__main-info .__action-line.__header-line .__toggle-button i{font-size:.75rem;line-height:1rem;transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.2s;animation-duration:.2s}.axp-activity-log .__content .__feed .__item .__content .__main-info .__action-lines{margin-top:.5rem;margin-bottom:.5rem;display:flex;flex-direction:column;font-size:.875rem;line-height:1.25rem}.axp-activity-log .__content .__feed .__item .__content .__main-info .__action-lines.__expandable-content{overflow:hidden}.axp-activity-log .__content .__feed .__item .__content .__main-info .__action-lines.__expandable-content.__animated{transition-property:all;transition-duration:.3s;transition-timing-function:cubic-bezier(.4,0,.2,1);animation-duration:.3s;animation-timing-function:cubic-bezier(.4,0,.2,1);animation:slideDown .3s ease-out}.axp-activity-log .__content .__feed .__item .__content .__main-info .__action-lines .__action-line{display:flex;align-items:center;gap:.5rem;padding-top:.25rem;padding-bottom:.25rem}.axp-activity-log .__content .__feed .__item .__content .__main-info .__action-lines .__action-line .__action-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.875rem;line-height:1.25rem;opacity:.85}.axp-activity-log .__content .__feed .__item .__content .__time{padding-left:.5rem;padding-right:.5rem;font-size:.75rem;line-height:1rem;opacity:.75}.axp-activity-log .__content .__feed .__item.__collapsed .__expandable-content{display:none}.axp-activity-log .__content .__feed .__item.__expandable .__header-line{cursor:pointer}@media (min-width: 640px){.axp-activity-log .__content .__feed .__item{gap:.625rem}.axp-activity-log .__content .__feed .__item .__content .__main-info .__action-line{flex-wrap:nowrap}}@keyframes slideDown{0%{opacity:0;max-height:0;transform:translateY(-10px)}to{opacity:1;max-height:200px;transform:translateY(0)}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXButtonModule }, { kind: "ngmodule", type: AXCommonModule }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "directive", type: i5.AXTranslatorDirective, selector: "[translate]" }, { kind: "ngmodule", type: AXSkeletonModule }, { kind: "component", type: i2.AXSkeletonComponent, selector: "ax-skeleton", inputs: ["animated"] }, { kind: "ngmodule", type: AXFormatModule }, { kind: "ngmodule", type: AXTagModule }, { kind: "ngmodule", type: AXAccordionCdkModule }, { kind: "component", type: AXPStateMessageComponent, selector: "axp-state-message", inputs: ["mode", "icon", "title", "description", "variant"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "pipe", type: i5.AXTranslatorPipe, name: "translate" }, { kind: "pipe", type: i4$1.AXFormatPipe, name: "format" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
206
232
|
}
|
|
207
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
233
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPActivityLogComponent, decorators: [{
|
|
208
234
|
type: Component,
|
|
209
235
|
args: [{ selector: 'axp-activity-log', standalone: true, imports: [
|
|
210
236
|
CommonModule,
|
|
@@ -216,7 +242,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.8", ngImpor
|
|
|
216
242
|
AXFormatModule,
|
|
217
243
|
AXTagModule,
|
|
218
244
|
AXAccordionCdkModule,
|
|
219
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<div class=\"axp-activity-log ax-accent2\" *translate=\"let t\">\n\n <!-- Activity Log Content -->\n <div class=\"__content\">\n\n <!-- Loading State -->\n @if (loading()) {\n <div class=\"__loading\">\n @for (item of [1,2,3,4]; track $index) {\n <div class=\"__item\">\n <ax-skeleton [animated]=\"true\" class=\"__avatar\"></ax-skeleton>\n <div class=\"__content\">\n <ax-skeleton [animated]=\"true\" class=\"__title\"></ax-skeleton>\n <ax-skeleton [animated]=\"true\" class=\"__subtitle\"></ax-skeleton>\n <ax-skeleton [animated]=\"true\" class=\"__description\"></ax-skeleton>\n <ax-skeleton [animated]=\"true\" class=\"__time\"></ax-skeleton>\n </div>\n </div>\n }\n </div>\n }\n\n <!-- Activity Feed -->\n @if (!loading() && activities().length > 0) {\n <div class=\"__feed\">\n @for (activity of activities(); track activity.id) {\n @let changeClasses = getChangeClasses(activity.changeType);\n @let isItemExpanded = isExpanded(activity.id);\n @let hasExpandableContentItem = hasExpandableContent(activity);\n <div class=\"__item\" [class.__collapsed]=\"!isItemExpanded\" [class.__expandable]=\"hasExpandableContentItem\">\n\n <div\n class=\"ax-size-10 ax-rounded-full ax-border ax-flex ax-items-center ax-justify-center ax-lightest-surface \">\n <i class=\"{{changeClasses.icon}} {{changeClasses.text}} fa-solid\"></i>\n </div>\n\n <!-- Activity Content -->\n <div class=\"__content\">\n <!-- Main Activity Info -->\n <div class=\"__main-info\">\n\n <!-- User and Action with Toggle Button -->\n <div class=\"__action-line __header-line\" (click)=\"toggleExpanded(activity.id)\">\n <span class=\"__user-name\">{{ activity.user.title }}</span>\n <span class=\"__action-type\">\n {{ t(`actions.${activity.changeType}.title`, {\n scope: 'general' }) | async }}\n </span>\n <span class=\"__action-text\">\n {{ activity.title | translate | async }}\n </span>\n\n <!-- Compare Button -->\n @if (canCompare(activity)) {\n <button type=\"button\" class=\"__compare-button\" (click)=\"handleCompare(activity, $event)\"\n [attr.aria-label]=\"t('compare.title', { scope: i18nScope }) | async\">\n <i class=\"fa-solid fa-code-compare\"></i>\n </button>\n }\n\n <!-- Toggle Button (only show if there's expandable content) -->\n @if (hasExpandableContentItem) {\n <button type=\"button\" class=\"__toggle-button\" [attr.aria-expanded]=\"isItemExpanded\"\n [attr.aria-label]=\"isItemExpanded ? 'Collapse details' : 'Expand details'\">\n <i class=\"fa-solid\" [class.fa-chevron-down]=\"!isItemExpanded\"\n [class.fa-chevron-up]=\"isItemExpanded\"></i>\n </button>\n }\n </div>\n\n <!-- Expandable Description/Changes -->\n @if (hasExpandableContentItem && isItemExpanded && activity.changes.length > 0) {\n <div class=\"__action-lines __expandable-content\"\n [class.__animated]=\"shouldAnimate(activity.id)\">\n @for (change of activity.changes; track $index) {\n @let changeClasses = getChangeClasses(change.type);\n <div class=\"__action-line\">\n <div class=\"ax-rounded-full ax-size-7 ax-grid ax-place-items-center\">\n <i class=\"{{changeClasses.icon}} {{changeClasses.text}}\"></i>\n </div>\n <span class=\"__action-text\">{{\n change.description | translate | async }}</span>\n </div>\n }\n </div>\n }\n </div>\n\n <!-- Time -->\n <div class=\"__time\">\n {{ activity.date | format: 'datetime' : 'short' | async }}\n </div>\n\n </div>\n\n </div>\n }\n </div>\n }\n\n <!-- Empty State -->\n @if (!loading() && activities().length === 0) {\n <div class=\"__empty\">\n <div class=\"__icon\">\n <ax-icon icon=\"fa-light fa-history\" class=\"__svg\"></ax-icon>\n </div>\n <div class=\"__content\">\n <h4 class=\"__title\">{{ t('no-history.title', { scope: i18nScope }) | async }}</h4>\n <p class=\"__message\">{{ t('no-history.message', { scope: i18nScope }) | async }}\n </p>\n </div>\n </div>\n }\n\n </div>\n</div>\n\n<!-- \n\nax-success-surface\nax-primary-surface\nax-danger-surface\nax-warning-surface\nax-info-surface\nax-muted-surface\nax-text-success\n\n -->", styles: [".axp-activity-log{height:100%;width:100%}.axp-activity-log .__content .__loading>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.axp-activity-log .__content .__loading .__item{display:flex;align-items:flex-start;gap:1rem}.axp-activity-log .__content .__loading .__item .__avatar{height:3rem;width:3rem;flex-shrink:0;border-radius:9999px}.axp-activity-log .__content .__loading .__item .__content{flex:1 1 0%}.axp-activity-log .__content .__loading .__item .__content>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.axp-activity-log .__content .__loading .__item .__content .__title{height:1rem;width:75%;border-radius:.25rem}.axp-activity-log .__content .__loading .__item .__content .__subtitle{height:.75rem;width:50%;border-radius:.25rem}.axp-activity-log .__content .__loading .__item .__content .__description{height:.75rem;width:83.333333%;border-radius:.25rem}.axp-activity-log .__content .__loading .__item .__content .__time{height:.75rem;width:25%;border-radius:.25rem}.axp-activity-log .__content .__feed{position:relative}.axp-activity-log .__content .__feed>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.axp-activity-log .__content .__feed:before{content:\"\";position:absolute;inset-inline-start:1.25rem;top:.5rem;bottom:.5rem;width:0px;border-left:1px solid rgba(var(--ax-sys-color-border-surface));z-index:0}.axp-activity-log .__content .__feed .__item{position:relative;display:flex;align-items:flex-start;gap:1rem}.axp-activity-log .__content .__feed .__item axp-user-avatar{position:relative;z-index:10}.axp-activity-log .__content .__feed .__item .__content{min-width:0px;flex:1 1 0%}.axp-activity-log .__content .__feed .__item .__content .__main-info{margin-bottom:.25rem}.axp-activity-log .__content .__feed .__item .__content .__main-info .__action-line{margin-top:.25rem;display:flex;flex-wrap:wrap;align-items:center;gap:.25rem;line-height:1.5}.axp-activity-log .__content .__feed .__item .__content .__main-info .__action-line .__user-name{font-weight:600}.axp-activity-log .__content .__feed .__item .__content .__main-info .__action-line .__action-type,.axp-activity-log .__content .__feed .__item .__content .__main-info .__action-line .__action-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.875rem;line-height:1.25rem;opacity:.85}.axp-activity-log .__content .__feed .__item .__content .__main-info .__action-line.__header-line{align-items:center;border-radius:.375rem;padding:.25rem .5rem}.axp-activity-log .__content .__feed .__item .__content .__main-info .__action-line.__header-line:hover{background-color:rgb(var(--ax-sys-color-lighter-surface));color:rgb(var(--ax-sys-color-on-lighter-surface));border-color:rgb(var(--ax-sys-color-border-lighter-surface))}.axp-activity-log .__content .__feed .__item .__content .__main-info .__action-line.__header-line .__compare-button{margin-left:.5rem;border-radius:9999px;padding:.25rem;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.2s;animation-duration:.2s;display:flex;width:1.5rem;height:1.5rem;align-items:center;justify-content:center;--tw-text-opacity: 1;color:rgba(var(--ax-sys-color-primary-500),var(--tw-text-opacity, 1))}.axp-activity-log .__content .__feed .__item .__content .__main-info .__action-line.__header-line .__compare-button:hover{background-color:rgb(var(--ax-sys-color-primary-surface));color:rgb(var(--ax-sys-color-on-primary-surface));border-color:rgb(var(--ax-sys-color-border-primary-surface))}.axp-activity-log .__content .__feed .__item .__content .__main-info .__action-line.__header-line .__compare-button:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000);--tw-ring-opacity: 1;--tw-ring-color: rgba(var(--ax-sys-color-primary-500), var(--tw-ring-opacity, 1));--tw-ring-offset-width: 1px}.axp-activity-log .__content .__feed .__item .__content .__main-info .__action-line.__header-line .__compare-button i{font-size:.75rem;line-height:1rem}.axp-activity-log .__content .__feed .__item .__content .__main-info .__action-line.__header-line .__toggle-button{margin-left:auto;border-radius:9999px;padding:.25rem;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.2s;animation-duration:.2s;display:flex;width:1.5rem;height:1.5rem;align-items:center;justify-content:center}.axp-activity-log .__content .__feed .__item .__content .__main-info .__action-line.__header-line .__toggle-button:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000);--tw-ring-opacity: 1;--tw-ring-color: rgba(var(--ax-sys-color-primary-500), var(--tw-ring-opacity, 1));--tw-ring-offset-width: 1px}.axp-activity-log .__content .__feed .__item .__content .__main-info .__action-line.__header-line .__toggle-button i{font-size:.75rem;line-height:1rem;transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.2s;animation-duration:.2s}.axp-activity-log .__content .__feed .__item .__content .__main-info .__action-lines{margin-top:.5rem;margin-bottom:.5rem;display:flex;flex-direction:column;font-size:.875rem;line-height:1.25rem}.axp-activity-log .__content .__feed .__item .__content .__main-info .__action-lines.__expandable-content{overflow:hidden}.axp-activity-log .__content .__feed .__item .__content .__main-info .__action-lines.__expandable-content.__animated{transition-property:all;transition-duration:.3s;transition-timing-function:cubic-bezier(.4,0,.2,1);animation-duration:.3s;animation-timing-function:cubic-bezier(.4,0,.2,1);animation:slideDown .3s ease-out}.axp-activity-log .__content .__feed .__item .__content .__main-info .__action-lines .__action-line{display:flex;align-items:center;gap:.5rem;padding-top:.25rem;padding-bottom:.25rem}.axp-activity-log .__content .__feed .__item .__content .__main-info .__action-lines .__action-line .__action-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.875rem;line-height:1.25rem;opacity:.85}.axp-activity-log .__content .__feed .__item .__content .__time{padding-left:.5rem;padding-right:.5rem;font-size:.75rem;line-height:1rem;opacity:.75}.axp-activity-log .__content .__feed .__item.__collapsed .__expandable-content{display:none}.axp-activity-log .__content .__feed .__item.__expandable .__header-line{cursor:pointer}.axp-activity-log .__content .__empty{display:flex;height:12rem;flex-direction:column;align-items:center;justify-content:center;padding:2rem;text-align:center}.axp-activity-log .__content .__empty .__icon{margin-bottom:1rem}.axp-activity-log .__content .__empty .__icon .__svg{font-size:2.25rem;line-height:2.5rem;--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.axp-activity-log .__content .__empty .__content .__title{margin-bottom:.5rem;font-size:1.125rem;line-height:1.75rem;font-weight:600;--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity, 1))}.axp-activity-log .__content .__empty .__content .__message{max-width:20rem;line-height:1.625;--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}@media (min-width: 640px){.axp-activity-log .__content .__feed .__item{gap:.625rem}.axp-activity-log .__content .__feed .__item .__content .__main-info .__action-line{flex-wrap:nowrap}}@keyframes slideDown{0%{opacity:0;max-height:0;transform:translateY(-10px)}to{opacity:1;max-height:200px;transform:translateY(0)}}\n"] }]
|
|
245
|
+
AXPStateMessageComponent,
|
|
246
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<div class=\"axp-activity-log ax-accent2\" *translate=\"let t\">\n <!-- Activity Log Content -->\n <div class=\"__content\">\n <!-- Loading State -->\n @if (loading()) {\n <div class=\"__loading\">\n @for (item of [1, 2, 3, 4]; track $index) {\n <div class=\"__item\">\n <ax-skeleton [animated]=\"true\" class=\"__avatar\"></ax-skeleton>\n <div class=\"__content\">\n <ax-skeleton [animated]=\"true\" class=\"__title\"></ax-skeleton>\n <ax-skeleton [animated]=\"true\" class=\"__subtitle\"></ax-skeleton>\n <ax-skeleton [animated]=\"true\" class=\"__description\"></ax-skeleton>\n <ax-skeleton [animated]=\"true\" class=\"__time\"></ax-skeleton>\n </div>\n </div>\n }\n </div>\n }\n\n <!-- Activity Feed -->\n @if (!loading() && activities().length > 0) {\n <div class=\"__feed\">\n @for (activity of activities(); track activity.id) {\n @let changeClasses = getChangeClasses(activity.changeType);\n @let isItemExpanded = isExpanded(activity.id);\n @let hasExpandableContentItem = hasExpandableContent(activity);\n <div class=\"__item\" [class.__collapsed]=\"!isItemExpanded\" [class.__expandable]=\"hasExpandableContentItem\">\n <div class=\"ax-size-10 ax-rounded-full ax-border ax-flex ax-items-center ax-justify-center ax-lightest-surface\">\n <i class=\"{{ changeClasses.icon }} {{ changeClasses.text }} fa-solid\"></i>\n </div>\n\n <!-- Activity Content -->\n <div class=\"__content\">\n <!-- Main Activity Info -->\n <div class=\"__main-info\">\n <!-- User and Action with Toggle Button -->\n <div class=\"__action-line __header-line\" (click)=\"toggleExpanded(activity.id)\">\n <span class=\"__user-name\">{{ activity.user.title }}</span>\n <span class=\"__action-type\">\n {{ t(`@general:actions.${activity.changeType}.title`) | async }}\n </span>\n <span class=\"__action-text\">\n {{ activity.title | translate | async }}\n </span>\n\n <!-- Compare Button -->\n @if (canCompare(activity)) {\n <button type=\"button\" class=\"__compare-button\" (click)=\"handleCompare(activity, $event)\"\n [attr.aria-label]=\"t('compare.title', { scope: i18nScope }) | async\">\n <i class=\"fa-solid fa-code-compare\"></i>\n </button>\n }\n\n <!-- Toggle Button (only show if there's expandable content) -->\n @if (hasExpandableContentItem) {\n <button type=\"button\" class=\"__toggle-button\" [attr.aria-expanded]=\"isItemExpanded\"\n [attr.aria-label]=\"isItemExpanded ? 'Collapse details' : 'Expand details'\">\n <i class=\"fa-solid\" [class.fa-chevron-down]=\"!isItemExpanded\"\n [class.fa-chevron-up]=\"isItemExpanded\"></i>\n </button>\n }\n </div>\n\n <!-- Expandable Description/Changes -->\n @if (hasExpandableContentItem && isItemExpanded && activity.changes.length > 0) {\n <div class=\"__action-lines __expandable-content\" [class.__animated]=\"shouldAnimate(activity.id)\">\n @for (change of activity.changes; track $index) {\n @let changeClasses = getChangeClasses(change.type);\n <div class=\"__action-line\">\n <div class=\"ax-rounded-full ax-size-7 ax-grid ax-place-items-center\">\n <i class=\"{{ changeClasses.icon }} {{ changeClasses.text }}\"></i>\n </div>\n <span class=\"__action-text\">{{ change.description | translate | async }}</span>\n </div>\n }\n </div>\n }\n </div>\n\n <!-- Time -->\n <div class=\"__time\">\n {{ activity.date | format: 'datetime' : 'short' | async }}\n </div>\n </div>\n </div>\n }\n </div>\n }\n\n <!-- Empty State -->\n @if (!loading() && activities().length === 0) {\n <axp-state-message icon=\"fa-light fa-history\" [title]=\"'@activity-log:state-message.no-history.title'\"\n [description]=\"'@activity-log:state-message.no-history.description'\">\n </axp-state-message>\n }\n </div>\n</div>\n\n<!-- \n\nax-success-surface\nax-primary-surface\nax-danger-surface\nax-warning-surface\nax-info-surface\nax-muted-surface\nax-text-success\n\n -->", styles: [".axp-activity-log{height:100%;width:100%}.axp-activity-log .__content .__loading>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.axp-activity-log .__content .__loading .__item{display:flex;align-items:flex-start;gap:1rem}.axp-activity-log .__content .__loading .__item .__avatar{height:3rem;width:3rem;flex-shrink:0;border-radius:9999px}.axp-activity-log .__content .__loading .__item .__content{flex:1 1 0%}.axp-activity-log .__content .__loading .__item .__content>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.axp-activity-log .__content .__loading .__item .__content .__title{height:1rem;width:75%;border-radius:.25rem}.axp-activity-log .__content .__loading .__item .__content .__subtitle{height:.75rem;width:50%;border-radius:.25rem}.axp-activity-log .__content .__loading .__item .__content .__description{height:.75rem;width:83.333333%;border-radius:.25rem}.axp-activity-log .__content .__loading .__item .__content .__time{height:.75rem;width:25%;border-radius:.25rem}.axp-activity-log .__content .__feed{position:relative}.axp-activity-log .__content .__feed>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.axp-activity-log .__content .__feed:before{content:\"\";position:absolute;inset-inline-start:1.25rem;top:.5rem;bottom:.5rem;width:0px;border-left:1px solid rgba(var(--ax-sys-color-border-surface));z-index:0}.axp-activity-log .__content .__feed .__item{position:relative;display:flex;align-items:flex-start;gap:1rem}.axp-activity-log .__content .__feed .__item axp-user-avatar{position:relative;z-index:10}.axp-activity-log .__content .__feed .__item .__content{min-width:0px;flex:1 1 0%}.axp-activity-log .__content .__feed .__item .__content .__main-info{margin-bottom:.25rem}.axp-activity-log .__content .__feed .__item .__content .__main-info .__action-line{margin-top:.25rem;display:flex;flex-wrap:wrap;align-items:center;gap:.25rem;line-height:1.5}.axp-activity-log .__content .__feed .__item .__content .__main-info .__action-line .__user-name{font-weight:600}.axp-activity-log .__content .__feed .__item .__content .__main-info .__action-line .__action-type,.axp-activity-log .__content .__feed .__item .__content .__main-info .__action-line .__action-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.875rem;line-height:1.25rem;opacity:.85}.axp-activity-log .__content .__feed .__item .__content .__main-info .__action-line.__header-line{align-items:center;border-radius:.375rem;padding:.25rem .5rem}.axp-activity-log .__content .__feed .__item .__content .__main-info .__action-line.__header-line:hover{background-color:rgb(var(--ax-sys-color-lighter-surface));color:rgb(var(--ax-sys-color-on-lighter-surface));border-color:rgb(var(--ax-sys-color-border-lighter-surface))}.axp-activity-log .__content .__feed .__item .__content .__main-info .__action-line.__header-line .__compare-button{margin-left:.5rem;border-radius:9999px;padding:.25rem;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.2s;animation-duration:.2s;display:flex;width:1.5rem;height:1.5rem;align-items:center;justify-content:center;--tw-text-opacity: 1;color:rgba(var(--ax-sys-color-primary-500),var(--tw-text-opacity, 1))}.axp-activity-log .__content .__feed .__item .__content .__main-info .__action-line.__header-line .__compare-button:hover{background-color:rgb(var(--ax-sys-color-primary-surface));color:rgb(var(--ax-sys-color-on-primary-surface));border-color:rgb(var(--ax-sys-color-border-primary-surface))}.axp-activity-log .__content .__feed .__item .__content .__main-info .__action-line.__header-line .__compare-button:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000);--tw-ring-opacity: 1;--tw-ring-color: rgba(var(--ax-sys-color-primary-500), var(--tw-ring-opacity, 1));--tw-ring-offset-width: 1px}.axp-activity-log .__content .__feed .__item .__content .__main-info .__action-line.__header-line .__compare-button i{font-size:.75rem;line-height:1rem}.axp-activity-log .__content .__feed .__item .__content .__main-info .__action-line.__header-line .__toggle-button{margin-left:auto;border-radius:9999px;padding:.25rem;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.2s;animation-duration:.2s;display:flex;width:1.5rem;height:1.5rem;align-items:center;justify-content:center}.axp-activity-log .__content .__feed .__item .__content .__main-info .__action-line.__header-line .__toggle-button:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000);--tw-ring-opacity: 1;--tw-ring-color: rgba(var(--ax-sys-color-primary-500), var(--tw-ring-opacity, 1));--tw-ring-offset-width: 1px}.axp-activity-log .__content .__feed .__item .__content .__main-info .__action-line.__header-line .__toggle-button i{font-size:.75rem;line-height:1rem;transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.2s;animation-duration:.2s}.axp-activity-log .__content .__feed .__item .__content .__main-info .__action-lines{margin-top:.5rem;margin-bottom:.5rem;display:flex;flex-direction:column;font-size:.875rem;line-height:1.25rem}.axp-activity-log .__content .__feed .__item .__content .__main-info .__action-lines.__expandable-content{overflow:hidden}.axp-activity-log .__content .__feed .__item .__content .__main-info .__action-lines.__expandable-content.__animated{transition-property:all;transition-duration:.3s;transition-timing-function:cubic-bezier(.4,0,.2,1);animation-duration:.3s;animation-timing-function:cubic-bezier(.4,0,.2,1);animation:slideDown .3s ease-out}.axp-activity-log .__content .__feed .__item .__content .__main-info .__action-lines .__action-line{display:flex;align-items:center;gap:.5rem;padding-top:.25rem;padding-bottom:.25rem}.axp-activity-log .__content .__feed .__item .__content .__main-info .__action-lines .__action-line .__action-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.875rem;line-height:1.25rem;opacity:.85}.axp-activity-log .__content .__feed .__item .__content .__time{padding-left:.5rem;padding-right:.5rem;font-size:.75rem;line-height:1rem;opacity:.75}.axp-activity-log .__content .__feed .__item.__collapsed .__expandable-content{display:none}.axp-activity-log .__content .__feed .__item.__expandable .__header-line{cursor:pointer}@media (min-width: 640px){.axp-activity-log .__content .__feed .__item{gap:.625rem}.axp-activity-log .__content .__feed .__item .__content .__main-info .__action-line{flex-wrap:nowrap}}@keyframes slideDown{0%{opacity:0;max-height:0;transform:translateY(-10px)}to{opacity:1;max-height:200px;transform:translateY(0)}}\n"] }]
|
|
220
247
|
}], ctorParameters: () => [] });
|
|
221
248
|
|
|
222
249
|
const AXP_TASK_BADGE_PROVIDERS = new InjectionToken('AXP_TASK_BADGE_PROVIDERS');
|
|
@@ -244,10 +271,10 @@ class AXPTaskBadgeService {
|
|
|
244
271
|
this.computedCache.set(key, total);
|
|
245
272
|
return total;
|
|
246
273
|
}
|
|
247
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
248
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.
|
|
274
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPTaskBadgeService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
275
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPTaskBadgeService, providedIn: 'root' }); }
|
|
249
276
|
}
|
|
250
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
277
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPTaskBadgeService, decorators: [{
|
|
251
278
|
type: Injectable,
|
|
252
279
|
args: [{ providedIn: 'root' }]
|
|
253
280
|
}], ctorParameters: () => [] });
|
|
@@ -278,10 +305,10 @@ class AXPTaskBadgeDirective {
|
|
|
278
305
|
const node = signal[SIGNAL];
|
|
279
306
|
signalSetFn(node, value);
|
|
280
307
|
}
|
|
281
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
282
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.
|
|
308
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPTaskBadgeDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
309
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.4", type: AXPTaskBadgeDirective, isStandalone: true, selector: "[axp-task-badge]", inputs: { badgeKey: { classPropertyName: "badgeKey", publicName: "badgeKey", isSignal: true, isRequired: false, transformFunction: null }, count: { classPropertyName: "count", publicName: "axp-task-badge", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 }); }
|
|
283
310
|
}
|
|
284
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
311
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPTaskBadgeDirective, decorators: [{
|
|
285
312
|
type: Directive,
|
|
286
313
|
args: [{
|
|
287
314
|
selector: '[axp-task-badge]',
|
|
@@ -303,10 +330,10 @@ class AXPMenuBadgeHelper {
|
|
|
303
330
|
}
|
|
304
331
|
|
|
305
332
|
class AXPThemeLayoutPagePrimaryActionsComponent {
|
|
306
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
307
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.
|
|
333
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPThemeLayoutPagePrimaryActionsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
334
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.4", type: AXPThemeLayoutPagePrimaryActionsComponent, isStandalone: true, selector: "axp-layout-actions-primary", ngImport: i0, template: `<ng-content select="ax-button,ax-dropdown-button"></ng-content>`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
308
335
|
}
|
|
309
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
336
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPThemeLayoutPagePrimaryActionsComponent, decorators: [{
|
|
310
337
|
type: Component,
|
|
311
338
|
args: [{
|
|
312
339
|
standalone: true,
|
|
@@ -317,10 +344,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.8", ngImpor
|
|
|
317
344
|
}]
|
|
318
345
|
}] });
|
|
319
346
|
class AXPThemeLayoutPageSecondaryActionsComponent {
|
|
320
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
321
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.
|
|
347
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPThemeLayoutPageSecondaryActionsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
348
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.4", type: AXPThemeLayoutPageSecondaryActionsComponent, isStandalone: true, selector: "axp-layout-actions-secondary", ngImport: i0, template: `<ng-content select="ax-button-item,ax-divider,ng-container"></ng-content>`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
322
349
|
}
|
|
323
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
350
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPThemeLayoutPageSecondaryActionsComponent, decorators: [{
|
|
324
351
|
type: Component,
|
|
325
352
|
args: [{
|
|
326
353
|
standalone: true,
|
|
@@ -339,8 +366,8 @@ class AXPThemeLayoutActionsComponent {
|
|
|
339
366
|
this.secondaryContent = contentChild(AXPThemeLayoutPageSecondaryActionsComponent, ...(ngDevMode ? [{ debugName: "secondaryContent" }] : []));
|
|
340
367
|
this.hasSecondary = computed(() => this.secondaryContent() != null, ...(ngDevMode ? [{ debugName: "hasSecondary" }] : []));
|
|
341
368
|
}
|
|
342
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
343
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "20.
|
|
369
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPThemeLayoutActionsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
370
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "20.3.4", type: AXPThemeLayoutActionsComponent, isStandalone: true, selector: "axp-layout-actions", queries: [{ propertyName: "primaryContent", first: true, predicate: AXPThemeLayoutPagePrimaryActionsComponent, descendants: true, isSignal: true }, { propertyName: "secondaryContent", first: true, predicate: AXPThemeLayoutPageSecondaryActionsComponent, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "primaryTemplate", first: true, predicate: ["primary"], descendants: true, isSignal: true }, { propertyName: "secondaryTemplate", first: true, predicate: ["secondary"], descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
344
371
|
|
|
345
372
|
<ng-template #primary>
|
|
346
373
|
<ng-content select="axp-layout-actions-primary"></ng-content>
|
|
@@ -353,7 +380,7 @@ class AXPThemeLayoutActionsComponent {
|
|
|
353
380
|
<ng-content></ng-content>
|
|
354
381
|
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
355
382
|
}
|
|
356
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
383
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPThemeLayoutActionsComponent, decorators: [{
|
|
357
384
|
type: Component,
|
|
358
385
|
args: [{
|
|
359
386
|
imports: [],
|
|
@@ -381,10 +408,10 @@ class AXPThemeLayoutBlockComponent {
|
|
|
381
408
|
this.elementRef = inject(ElementRef);
|
|
382
409
|
this.hostElement = this.elementRef.nativeElement;
|
|
383
410
|
}
|
|
384
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
385
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.
|
|
411
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPThemeLayoutBlockComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
412
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.4", type: AXPThemeLayoutBlockComponent, isStandalone: true, selector: "\n\n axp-page-content, \n axp-page-footer-container,\n axp-page-footer,\n axp-page-header,\n axp-page-header-container,\n axp-page-toolbar,\n\n axp-layout-content, \n axp-layout-page-content, \n\n axp-layout-sections,\n axp-layout-body,\n axp-layout-page-body,\n axp-layout-prefix,\n axp-layout-suffix,\n axp-layout-title-bar,\n axp-layout-title, \n axp-layout-title-actions, \n axp-layout-nav-button, \n axp-layout-description, \n axp-layout-breadcrumbs,\n axp-layout-list-action,\n ", ngImport: i0, template: '<ng-content></ng-content>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
386
413
|
}
|
|
387
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
414
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPThemeLayoutBlockComponent, decorators: [{
|
|
388
415
|
type: Component,
|
|
389
416
|
args: [{
|
|
390
417
|
standalone: true,
|
|
@@ -420,14 +447,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.8", ngImpor
|
|
|
420
447
|
}] });
|
|
421
448
|
|
|
422
449
|
class AXPThemeLayoutFooterComponent {
|
|
423
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
424
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.
|
|
450
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPThemeLayoutFooterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
451
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.4", type: AXPThemeLayoutFooterComponent, isStandalone: true, selector: "axp-layout-footer, axp-layout-page-footer", ngImport: i0, template: `
|
|
425
452
|
<ng-content select="axp-layout-prefix"></ng-content>
|
|
426
453
|
<ng-content></ng-content>
|
|
427
454
|
<ng-content select="axp-layout-suffix"></ng-content>
|
|
428
455
|
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
429
456
|
}
|
|
430
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
457
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPThemeLayoutFooterComponent, decorators: [{
|
|
431
458
|
type: Component,
|
|
432
459
|
args: [{
|
|
433
460
|
imports: [],
|
|
@@ -452,8 +479,8 @@ class AXPThemeLayoutPageHeaderComponent {
|
|
|
452
479
|
this.breadcrumbs = viewChild('breadcrumbs', ...(ngDevMode ? [{ debugName: "breadcrumbs" }] : []));
|
|
453
480
|
this.navButton = viewChild('navButton', ...(ngDevMode ? [{ debugName: "navButton" }] : []));
|
|
454
481
|
}
|
|
455
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
456
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "20.
|
|
482
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPThemeLayoutPageHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
483
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "20.3.4", type: AXPThemeLayoutPageHeaderComponent, isStandalone: true, selector: "axp-layout-page-header", viewQueries: [{ propertyName: "title", first: true, predicate: ["title"], descendants: true, isSignal: true }, { propertyName: "description", first: true, predicate: ["description"], descendants: true, isSignal: true }, { propertyName: "actions", first: true, predicate: ["actions"], descendants: true, isSignal: true }, { propertyName: "navbar", first: true, predicate: ["navbar"], descendants: true, isSignal: true }, { propertyName: "breadcrumbs", first: true, predicate: ["breadcrumbs"], descendants: true, isSignal: true }, { propertyName: "navButton", first: true, predicate: ["navButton"], descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
457
484
|
<ng-template #breadcrumbs>
|
|
458
485
|
<ng-content select="axp-layout-breadcrumbs"></ng-content>
|
|
459
486
|
</ng-template>
|
|
@@ -478,7 +505,7 @@ class AXPThemeLayoutPageHeaderComponent {
|
|
|
478
505
|
</ng-template>
|
|
479
506
|
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
480
507
|
}
|
|
481
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
508
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPThemeLayoutPageHeaderComponent, decorators: [{
|
|
482
509
|
type: Component,
|
|
483
510
|
args: [{
|
|
484
511
|
imports: [],
|
|
@@ -513,14 +540,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.8", ngImpor
|
|
|
513
540
|
}]
|
|
514
541
|
}] });
|
|
515
542
|
class AXPThemeLayoutHeaderComponent {
|
|
516
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
517
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.
|
|
543
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPThemeLayoutHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
544
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.4", type: AXPThemeLayoutHeaderComponent, isStandalone: true, selector: "axp-layout-header", ngImport: i0, template: `
|
|
518
545
|
<ng-content select="axp-layout-prefix"></ng-content>
|
|
519
546
|
<ng-content></ng-content>
|
|
520
547
|
<ng-content select="axp-layout-suffix"></ng-content>
|
|
521
548
|
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
522
549
|
}
|
|
523
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
550
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPThemeLayoutHeaderComponent, decorators: [{
|
|
524
551
|
type: Component,
|
|
525
552
|
args: [{
|
|
526
553
|
imports: [],
|
|
@@ -537,10 +564,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.8", ngImpor
|
|
|
537
564
|
}] });
|
|
538
565
|
|
|
539
566
|
class AXPThemeLayoutListComponent {
|
|
540
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
541
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.
|
|
567
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPThemeLayoutListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
568
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.4", type: AXPThemeLayoutListComponent, isStandalone: true, selector: "axp-layout-list", ngImport: i0, template: `<ng-content select="axp-layout-list-item,axp-layout-list-group,ng-container"></ng-content>`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
542
569
|
}
|
|
543
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
570
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPThemeLayoutListComponent, decorators: [{
|
|
544
571
|
type: Component,
|
|
545
572
|
args: [{
|
|
546
573
|
standalone: true,
|
|
@@ -551,10 +578,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.8", ngImpor
|
|
|
551
578
|
}]
|
|
552
579
|
}] });
|
|
553
580
|
class AXPThemeLayoutListItemsGroupComponent {
|
|
554
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
555
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.
|
|
581
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPThemeLayoutListItemsGroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
582
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.4", type: AXPThemeLayoutListItemsGroupComponent, isStandalone: true, selector: "axp-layout-list-group", ngImport: i0, template: `<ng-content select="axp-layout-list-item, axp-layout-title, axp-layout-header ,ng-container"></ng-content>`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
556
583
|
}
|
|
557
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
584
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPThemeLayoutListItemsGroupComponent, decorators: [{
|
|
558
585
|
type: Component,
|
|
559
586
|
args: [{
|
|
560
587
|
standalone: true,
|
|
@@ -565,10 +592,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.8", ngImpor
|
|
|
565
592
|
}]
|
|
566
593
|
}] });
|
|
567
594
|
class AXPThemeLayoutListItemComponent {
|
|
568
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
569
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.
|
|
595
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPThemeLayoutListItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
596
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.4", type: AXPThemeLayoutListItemComponent, isStandalone: true, selector: "axp-layout-list-item", ngImport: i0, template: `<ng-content select="axp-layout-content,axp-layout-prefix,axp-layout-suffix,ng-container"></ng-content>`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
570
597
|
}
|
|
571
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
598
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPThemeLayoutListItemComponent, decorators: [{
|
|
572
599
|
type: Component,
|
|
573
600
|
args: [{
|
|
574
601
|
standalone: true,
|
|
@@ -580,13 +607,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.8", ngImpor
|
|
|
580
607
|
}] });
|
|
581
608
|
|
|
582
609
|
class AXPThemeLayoutSectionComponent {
|
|
583
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
584
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.
|
|
610
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPThemeLayoutSectionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
611
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.4", type: AXPThemeLayoutSectionComponent, isStandalone: true, selector: "axp-layout-section", ngImport: i0, template: `
|
|
585
612
|
<ng-content select="axp-layout-header"></ng-content>
|
|
586
613
|
<ng-content select="axp-layout-content"></ng-content>
|
|
587
614
|
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
588
615
|
}
|
|
589
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
616
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPThemeLayoutSectionComponent, decorators: [{
|
|
590
617
|
type: Component,
|
|
591
618
|
args: [{
|
|
592
619
|
imports: [],
|
|
@@ -602,15 +629,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.8", ngImpor
|
|
|
602
629
|
}] });
|
|
603
630
|
|
|
604
631
|
class AXPThemeLayoutStartSideComponent {
|
|
605
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
606
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.
|
|
632
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPThemeLayoutStartSideComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
633
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.4", type: AXPThemeLayoutStartSideComponent, isStandalone: true, selector: "axp-layout-page-start-side, axp-layout-start-side", ngImport: i0, template: `
|
|
607
634
|
<ng-content select="axp-layout-header"></ng-content>
|
|
608
635
|
<ng-content select="axp-layout-content"></ng-content>
|
|
609
636
|
<ng-content select="axp-layout-footer"></ng-content>
|
|
610
637
|
<ng-content></ng-content>
|
|
611
638
|
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
612
639
|
}
|
|
613
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
640
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPThemeLayoutStartSideComponent, decorators: [{
|
|
614
641
|
type: Component,
|
|
615
642
|
args: [{
|
|
616
643
|
imports: [],
|
|
@@ -627,14 +654,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.8", ngImpor
|
|
|
627
654
|
}]
|
|
628
655
|
}] });
|
|
629
656
|
class AXPThemeLayoutEndSideComponent {
|
|
630
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
631
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.
|
|
657
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPThemeLayoutEndSideComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
658
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.4", type: AXPThemeLayoutEndSideComponent, isStandalone: true, selector: "axp-layout-page-end-side, axp-layout-end-side", ngImport: i0, template: `
|
|
632
659
|
<ng-content select="axp-layout-header"></ng-content>
|
|
633
660
|
<ng-content select="axp-layout-content"></ng-content>
|
|
634
661
|
<ng-content select="axp-layout-footer"></ng-content>
|
|
635
662
|
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
636
663
|
}
|
|
637
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
664
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPThemeLayoutEndSideComponent, decorators: [{
|
|
638
665
|
type: Component,
|
|
639
666
|
args: [{
|
|
640
667
|
imports: [],
|
|
@@ -651,14 +678,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.8", ngImpor
|
|
|
651
678
|
}] });
|
|
652
679
|
|
|
653
680
|
class AXPThemeLayoutToolbarComponent {
|
|
654
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
655
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.
|
|
681
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPThemeLayoutToolbarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
682
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.4", type: AXPThemeLayoutToolbarComponent, isStandalone: true, selector: "axp-layout-toolbar", ngImport: i0, template: `
|
|
656
683
|
<ng-content select="axp-layout-prefix"></ng-content>
|
|
657
684
|
<ng-content select="axp-layout-suffix"></ng-content>
|
|
658
685
|
<ng-content></ng-content>
|
|
659
686
|
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
660
687
|
}
|
|
661
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
688
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPThemeLayoutToolbarComponent, decorators: [{
|
|
662
689
|
type: Component,
|
|
663
690
|
args: [{
|
|
664
691
|
imports: [],
|
|
@@ -693,10 +720,10 @@ class AXPThemeLayoutContainerComponent {
|
|
|
693
720
|
ngOnDestroy() {
|
|
694
721
|
this.mutationObserver?.disconnect();
|
|
695
722
|
}
|
|
696
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
697
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.
|
|
723
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPThemeLayoutContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
724
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.4", type: AXPThemeLayoutContainerComponent, isStandalone: true, selector: "axp-layout-container", ngImport: i0, template: '<ng-content></ng-content>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
698
725
|
}
|
|
699
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
726
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPThemeLayoutContainerComponent, decorators: [{
|
|
700
727
|
type: Component,
|
|
701
728
|
args: [{
|
|
702
729
|
standalone: true,
|
|
@@ -707,6 +734,284 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.8", ngImpor
|
|
|
707
734
|
}]
|
|
708
735
|
}] });
|
|
709
736
|
|
|
737
|
+
class AXPCategoryTreeComponent {
|
|
738
|
+
constructor() {
|
|
739
|
+
//#region ---- Services & Dependencies ----
|
|
740
|
+
this.translationService = inject(AXTranslationService);
|
|
741
|
+
//#endregion
|
|
742
|
+
//#region ---- Inputs ----
|
|
743
|
+
this.dataSource = input.required(...(ngDevMode ? [{ debugName: "dataSource" }] : []));
|
|
744
|
+
this.config = input({
|
|
745
|
+
textField: 'title',
|
|
746
|
+
valueField: 'id',
|
|
747
|
+
expandedField: 'expand',
|
|
748
|
+
showCheckbox: false,
|
|
749
|
+
searchable: true,
|
|
750
|
+
searchPlaceholder: '@general:terms.interface.category.search.placeholder',
|
|
751
|
+
emptyStateTitle: '@general:terms.interface.category.search.no-records.title',
|
|
752
|
+
emptyStateDescription: '@general:terms.interface.category.search.no-records.description',
|
|
753
|
+
emptyStateIcon: 'fa-light fa-folder-open',
|
|
754
|
+
}, ...(ngDevMode ? [{ debugName: "config" }] : []));
|
|
755
|
+
this.actions = input({
|
|
756
|
+
canCreate: true,
|
|
757
|
+
canUpdate: true,
|
|
758
|
+
canDelete: true,
|
|
759
|
+
canCreateChild: true,
|
|
760
|
+
createLabel: 'Add New',
|
|
761
|
+
updateLabel: 'Edit',
|
|
762
|
+
deleteLabel: 'Delete',
|
|
763
|
+
createChildLabel: 'Add New Child',
|
|
764
|
+
}, ...(ngDevMode ? [{ debugName: "actions" }] : []));
|
|
765
|
+
this.events = input({}, ...(ngDevMode ? [{ debugName: "events" }] : []));
|
|
766
|
+
//#endregion
|
|
767
|
+
//#region ---- Outputs ----
|
|
768
|
+
this.nodeClick = output();
|
|
769
|
+
this.nodeSelect = output();
|
|
770
|
+
this.nodeCreate = output();
|
|
771
|
+
this.nodeUpdate = output();
|
|
772
|
+
this.nodeDelete = output();
|
|
773
|
+
this.searchChange = output();
|
|
774
|
+
this.collapseChange = output();
|
|
775
|
+
//#endregion
|
|
776
|
+
//#region ---- Component State ----
|
|
777
|
+
this.tree = viewChild('tree', ...(ngDevMode ? [{ debugName: "tree" }] : []));
|
|
778
|
+
this.isLoading = signal(true, ...(ngDevMode ? [{ debugName: "isLoading" }] : []));
|
|
779
|
+
this.searchValue = signal('', ...(ngDevMode ? [{ debugName: "searchValue" }] : []));
|
|
780
|
+
this.treeItems = signal([
|
|
781
|
+
{
|
|
782
|
+
id: 'root',
|
|
783
|
+
title: '@general:terms.interface.selection.all-items',
|
|
784
|
+
description: '',
|
|
785
|
+
parentId: undefined,
|
|
786
|
+
childCount: 0,
|
|
787
|
+
expand: true,
|
|
788
|
+
children: [],
|
|
789
|
+
},
|
|
790
|
+
], ...(ngDevMode ? [{ debugName: "treeItems" }] : []));
|
|
791
|
+
//#endregion
|
|
792
|
+
//#region ---- Computed Properties ----
|
|
793
|
+
this.emptyStateTitle = computed(() => {
|
|
794
|
+
const title = this.config().emptyStateTitle || '';
|
|
795
|
+
return title;
|
|
796
|
+
}, ...(ngDevMode ? [{ debugName: "emptyStateTitle" }] : []));
|
|
797
|
+
this.emptyStateDescription = computed(() => {
|
|
798
|
+
const description = this.config().emptyStateDescription || '';
|
|
799
|
+
return description;
|
|
800
|
+
}, ...(ngDevMode ? [{ debugName: "emptyStateDescription" }] : []));
|
|
801
|
+
}
|
|
802
|
+
//#endregion
|
|
803
|
+
//#region ---- Lifecycle Methods ----
|
|
804
|
+
async ngOnInit() {
|
|
805
|
+
await this.loadRootNodes();
|
|
806
|
+
}
|
|
807
|
+
//#endregion
|
|
808
|
+
//#region ---- Data Loading Methods ----
|
|
809
|
+
async loadRootNodes() {
|
|
810
|
+
this.isLoading.set(true);
|
|
811
|
+
try {
|
|
812
|
+
const entities = await this.dataSource().loadRootNodes();
|
|
813
|
+
const nodes = this.convertEntitiesToTreeNodes(entities);
|
|
814
|
+
this.treeItems.update((prev) => prev.map((item) => ({
|
|
815
|
+
...item,
|
|
816
|
+
children: nodes,
|
|
817
|
+
})));
|
|
818
|
+
}
|
|
819
|
+
catch (error) {
|
|
820
|
+
console.error('Error loading root nodes:', error);
|
|
821
|
+
}
|
|
822
|
+
finally {
|
|
823
|
+
this.isLoading.set(false);
|
|
824
|
+
}
|
|
825
|
+
}
|
|
826
|
+
async loadChildNodes(parentId) {
|
|
827
|
+
if (!this.dataSource().loadChildNodes)
|
|
828
|
+
return;
|
|
829
|
+
this.tree()?.setNodeLoading(parentId, true);
|
|
830
|
+
try {
|
|
831
|
+
const entities = await this.dataSource().loadChildNodes(parentId);
|
|
832
|
+
const children = this.convertEntitiesToTreeNodes(entities);
|
|
833
|
+
this.updateNodeChildren(parentId, children);
|
|
834
|
+
}
|
|
835
|
+
catch (error) {
|
|
836
|
+
console.error('Error loading child nodes:', error);
|
|
837
|
+
}
|
|
838
|
+
finally {
|
|
839
|
+
this.tree()?.setNodeLoading(parentId, false);
|
|
840
|
+
}
|
|
841
|
+
}
|
|
842
|
+
async searchNodes(searchValue) {
|
|
843
|
+
if (!this.dataSource().searchNodes)
|
|
844
|
+
return;
|
|
845
|
+
this.isLoading.set(true);
|
|
846
|
+
try {
|
|
847
|
+
const entities = await this.dataSource().searchNodes(searchValue);
|
|
848
|
+
const nodes = this.convertEntitiesToTreeNodes(entities);
|
|
849
|
+
this.treeItems.update((prev) => prev.map((item) => ({
|
|
850
|
+
...item,
|
|
851
|
+
children: nodes,
|
|
852
|
+
})));
|
|
853
|
+
}
|
|
854
|
+
catch (error) {
|
|
855
|
+
console.error('Error searching nodes:', error);
|
|
856
|
+
}
|
|
857
|
+
finally {
|
|
858
|
+
this.isLoading.set(false);
|
|
859
|
+
}
|
|
860
|
+
}
|
|
861
|
+
//#endregion
|
|
862
|
+
//#region ---- Event Handlers ----
|
|
863
|
+
async handleNodeClick(event) {
|
|
864
|
+
const node = event.data;
|
|
865
|
+
// Extract the entity data (without tree-specific properties)
|
|
866
|
+
const entity = {
|
|
867
|
+
id: node.id,
|
|
868
|
+
title: node.title,
|
|
869
|
+
description: node.description,
|
|
870
|
+
parentId: node.parentId,
|
|
871
|
+
childCount: node.childCount
|
|
872
|
+
};
|
|
873
|
+
this.nodeClick.emit(entity);
|
|
874
|
+
this.events().onNodeClick?.(entity);
|
|
875
|
+
}
|
|
876
|
+
async handleCollapseChanged(event) {
|
|
877
|
+
const node = event.data;
|
|
878
|
+
// Extract the entity data (without tree-specific properties)
|
|
879
|
+
const entity = {
|
|
880
|
+
id: node.id,
|
|
881
|
+
title: node.title,
|
|
882
|
+
description: node.description,
|
|
883
|
+
parentId: node.parentId,
|
|
884
|
+
childCount: node.childCount
|
|
885
|
+
};
|
|
886
|
+
this.collapseChange.emit(entity);
|
|
887
|
+
this.events().onCollapseChange?.(entity);
|
|
888
|
+
// Load children if node is being expanded
|
|
889
|
+
// Check both expand property and active property (active seems to be the actual expansion state)
|
|
890
|
+
if ((node.expand || node.active) && this.dataSource().loadChildNodes) {
|
|
891
|
+
await this.loadChildNodes(node.id);
|
|
892
|
+
}
|
|
893
|
+
}
|
|
894
|
+
async handleSearchChange(event) {
|
|
895
|
+
const searchValue = event.value;
|
|
896
|
+
this.searchValue.set(searchValue);
|
|
897
|
+
this.searchChange.emit(searchValue);
|
|
898
|
+
this.events().onSearchChange?.(searchValue);
|
|
899
|
+
if (searchValue) {
|
|
900
|
+
await this.searchNodes(searchValue);
|
|
901
|
+
}
|
|
902
|
+
else {
|
|
903
|
+
await this.loadRootNodes();
|
|
904
|
+
}
|
|
905
|
+
}
|
|
906
|
+
//#endregion
|
|
907
|
+
//#region ---- CRUD Action Handlers ----
|
|
908
|
+
async handleCreateRootClick(event) {
|
|
909
|
+
event.nativeEvent.preventDefault();
|
|
910
|
+
event.nativeEvent.stopPropagation();
|
|
911
|
+
this.nodeCreate.emit(undefined);
|
|
912
|
+
this.events().onNodeCreate?.(undefined);
|
|
913
|
+
}
|
|
914
|
+
async handleCreateChildClick(node, event) {
|
|
915
|
+
event.nativeEvent.preventDefault();
|
|
916
|
+
event.nativeEvent.stopPropagation();
|
|
917
|
+
// Extract the entity data (without tree-specific properties)
|
|
918
|
+
const entity = {
|
|
919
|
+
id: node.id,
|
|
920
|
+
title: node.title,
|
|
921
|
+
description: node.description,
|
|
922
|
+
parentId: node.parentId,
|
|
923
|
+
childCount: node.childCount
|
|
924
|
+
};
|
|
925
|
+
this.nodeCreate.emit(entity);
|
|
926
|
+
this.events().onNodeCreate?.(entity);
|
|
927
|
+
}
|
|
928
|
+
async handleUpdateNodeClick(node, event) {
|
|
929
|
+
event.nativeEvent.preventDefault();
|
|
930
|
+
event.nativeEvent.stopPropagation();
|
|
931
|
+
// Extract the entity data (without tree-specific properties)
|
|
932
|
+
const entity = {
|
|
933
|
+
id: node.id,
|
|
934
|
+
title: node.title,
|
|
935
|
+
description: node.description,
|
|
936
|
+
parentId: node.parentId,
|
|
937
|
+
childCount: node.childCount
|
|
938
|
+
};
|
|
939
|
+
this.nodeUpdate.emit(entity);
|
|
940
|
+
this.events().onNodeUpdate?.(entity);
|
|
941
|
+
}
|
|
942
|
+
async handleDeleteNodeClick(node, event) {
|
|
943
|
+
event.nativeEvent.preventDefault();
|
|
944
|
+
event.nativeEvent.stopPropagation();
|
|
945
|
+
// Extract the entity data (without tree-specific properties)
|
|
946
|
+
const entity = {
|
|
947
|
+
id: node.id,
|
|
948
|
+
title: node.title,
|
|
949
|
+
description: node.description,
|
|
950
|
+
parentId: node.parentId,
|
|
951
|
+
childCount: node.childCount
|
|
952
|
+
};
|
|
953
|
+
this.nodeDelete.emit(entity);
|
|
954
|
+
this.events().onNodeDelete?.(entity);
|
|
955
|
+
}
|
|
956
|
+
//#endregion
|
|
957
|
+
//#region ---- Utility Methods ----
|
|
958
|
+
convertEntitiesToTreeNodes(entities) {
|
|
959
|
+
return entities.map(entity => ({
|
|
960
|
+
...entity,
|
|
961
|
+
children: entity.childCount > 0 ? [] : undefined, // Set children to empty array if has children, undefined if no children
|
|
962
|
+
expand: false,
|
|
963
|
+
hasChild: entity.childCount > 0, // Set hasChild based on childCount
|
|
964
|
+
}));
|
|
965
|
+
}
|
|
966
|
+
updateNodeChildren(parentId, children) {
|
|
967
|
+
const updateChildrenAtPath = (items, id) => {
|
|
968
|
+
return items.map((item) => {
|
|
969
|
+
if (item.id === id) {
|
|
970
|
+
return { ...item, children };
|
|
971
|
+
}
|
|
972
|
+
if (item.children?.length) {
|
|
973
|
+
return { ...item, children: updateChildrenAtPath(item.children, id) };
|
|
974
|
+
}
|
|
975
|
+
return item;
|
|
976
|
+
});
|
|
977
|
+
};
|
|
978
|
+
this.treeItems.update((prev) => prev.map((item) => ({
|
|
979
|
+
...item,
|
|
980
|
+
children: updateChildrenAtPath(item.children || [], parentId),
|
|
981
|
+
})));
|
|
982
|
+
}
|
|
983
|
+
async refreshTree(parentId) {
|
|
984
|
+
if (parentId) {
|
|
985
|
+
await this.loadChildNodes(parentId);
|
|
986
|
+
}
|
|
987
|
+
else {
|
|
988
|
+
await this.loadRootNodes();
|
|
989
|
+
}
|
|
990
|
+
}
|
|
991
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPCategoryTreeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
992
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.4", type: AXPCategoryTreeComponent, isStandalone: true, selector: "axp-category-tree", inputs: { dataSource: { classPropertyName: "dataSource", publicName: "dataSource", isSignal: true, isRequired: true, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null }, actions: { classPropertyName: "actions", publicName: "actions", isSignal: true, isRequired: false, transformFunction: null }, events: { classPropertyName: "events", publicName: "events", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { nodeClick: "nodeClick", nodeSelect: "nodeSelect", nodeCreate: "nodeCreate", nodeUpdate: "nodeUpdate", nodeDelete: "nodeDelete", searchChange: "searchChange", collapseChange: "collapseChange" }, viewQueries: [{ propertyName: "tree", first: true, predicate: ["tree"], descendants: true, isSignal: true }], ngImport: i0, template: "<axp-layout-header>\n <axp-layout-toolbar>\n @if (config().searchable) {\n <ax-search-box\n (onValueChanged)=\"handleSearchChange($event)\"\n [delayTime]=\"300\"\n [placeholder]=\"config().searchPlaceholder! | translate | async\"\n >\n </ax-search-box>\n }\n </axp-layout-toolbar>\n</axp-layout-header>\n\n<axp-layout-content>\n @if (isLoading()) {\n <div class=\"ax-p-4 ax-flex ax-flex-col ax-gap-3\" [class.ax-pt-2]=\"config().searchable\">\n <ax-skeleton class=\"ax-w-full ax-h-6 ax-rounded-md\"></ax-skeleton>\n <ax-skeleton class=\"ax-w-full ax-h-6 ax-rounded-md\"></ax-skeleton>\n <ax-skeleton class=\"ax-w-full ax-h-6 ax-rounded-md\"></ax-skeleton>\n <ax-skeleton class=\"ax-w-full ax-h-6 ax-rounded-md\"></ax-skeleton>\n <ax-skeleton class=\"ax-w-full ax-h-6 ax-rounded-md\"></ax-skeleton>\n <ax-skeleton class=\"ax-w-full ax-h-6 ax-rounded-md\"></ax-skeleton>\n </div>\n } @else if (treeItems()[0].children?.length) {\n <div class=\"ax-px-4 ax-max-h-[calc(100vh-250px)] ax-overflow-auto\" [class.ax-pt-2]=\"config().searchable\">\n <ax-tree-view\n (onNodeClick)=\"handleNodeClick($event)\"\n (onCollapsedChanged)=\"handleCollapseChanged($event)\"\n [showCheckbox]=\"config().showCheckbox || false\"\n [itemTemplate]=\"itemTemplate\"\n #treeRef\n [textField]=\"config().textField || 'title'\"\n [valueField]=\"config().valueField || 'id'\"\n [expandedField]=\"config().expandedField || 'expand'\"\n [items]=\"treeItems()\"\n #tree\n >\n </ax-tree-view>\n </div>\n } @else {\n <axp-state-message\n [icon]=\"config().emptyStateIcon || 'fa-light fa-folder-open'\"\n [title]=\"emptyStateTitle()\"\n [description]=\"emptyStateDescription()\"\n >\n </axp-state-message>\n }\n\n <ng-template #itemTemplate let-item>\n <div class=\"ax-flex ax-items-center ax-justify-between ax-w-full ax-gap-2 ax-overflow-hidden\">\n <div class=\"ax-flex ax-items-center ax-gap-2 ax-min-w-0\">\n <ax-icon class=\"fas ax-text-warning fa-folder\"></ax-icon>\n <span class=\"ax-truncate\">{{ item.title | translate | async }}</span>\n </div>\n @if (item.id && item.id !== 'root') {\n @if (actions().canCreateChild || actions().canUpdate || actions().canDelete) {\n <div class=\"ax-flex ax-items-center ax-gap-1\">\n <ax-button class=\"ax-xs\" color=\"default\" look=\"blank\" (onClick)=\"$event.nativeEvent.stopPropagation()\">\n <ax-icon class=\"fas fa-ellipsis-v\"></ax-icon>\n <ax-dropdown-panel>\n <ax-button-item-list>\n @if (actions().canCreateChild) {\n <ax-button-item\n (onClick)=\"handleCreateChildClick(item, $event)\"\n look=\"blank\"\n color=\"default\"\n [text]=\"actions().createChildLabel || 'Add New Child'\"\n >\n <ax-icon class=\"fas fa-plus\"></ax-icon>\n </ax-button-item>\n }\n @if (actions().canUpdate) {\n <ax-button-item\n (onClick)=\"handleUpdateNodeClick(item, $event)\"\n look=\"blank\"\n [text]=\"actions().updateLabel || 'Edit'\"\n >\n <ax-icon class=\"fas fa-pen\"></ax-icon>\n </ax-button-item>\n }\n @if (actions().canDelete) {\n <ax-button-item\n (onClick)=\"handleDeleteNodeClick(item, $event)\"\n color=\"danger\"\n look=\"blank\"\n [text]=\"actions().deleteLabel || 'Delete'\"\n >\n <ax-icon class=\"fas fa-trash\"></ax-icon>\n </ax-button-item>\n }\n </ax-button-item-list>\n </ax-dropdown-panel>\n </ax-button>\n </div>\n }\n } @else if (item.id === 'root' && actions().canCreate) {\n <div class=\"ax-flex ax-items-center ax-gap-1\">\n <ax-button class=\"ax-xs\" (onClick)=\"handleCreateRootClick($event)\" look=\"blank\" color=\"default\">\n <ax-icon class=\"fas fa-plus\"></ax-icon>\n </ax-button>\n </div>\n }\n </div>\n </ng-template>\n</axp-layout-content>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i2$1.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "ngmodule", type: AXTreeViewModule }, { kind: "component", type: i2$2.AXTreeViewComponent, selector: "ax-tree-view", inputs: ["items", "showCheckbox", "hasCheckboxField", "selectionMode", "selectionBehavior", "selectionScope", "focusNodeEnabled", "valueField", "textField", "visibleField", "disableField", "hasChildField", "selectedField", "expandedField", "tooltipField", "childrenField", "activeField", "indeterminateField", "parentField", "iconField", "toggleIcons", "look", "showEmptyNodeMassage", "itemTemplate", "emptyTemplate", "expandOn"], outputs: ["onSelectionChanged", "onItemSelectedChanged", "onNodeClick", "onCollapsedChanged", "onNodedbClick"] }, { kind: "ngmodule", type: AXSkeletonModule }, { kind: "component", type: i2.AXSkeletonComponent, selector: "ax-skeleton", inputs: ["animated"] }, { kind: "component", type: AXPThemeLayoutBlockComponent, selector: "\n\n axp-page-content, \n axp-page-footer-container,\n axp-page-footer,\n axp-page-header,\n axp-page-header-container,\n axp-page-toolbar,\n\n axp-layout-content, \n axp-layout-page-content, \n\n axp-layout-sections,\n axp-layout-body,\n axp-layout-page-body,\n axp-layout-prefix,\n axp-layout-suffix,\n axp-layout-title-bar,\n axp-layout-title, \n axp-layout-title-actions, \n axp-layout-nav-button, \n axp-layout-description, \n axp-layout-breadcrumbs,\n axp-layout-list-action,\n " }, { kind: "ngmodule", type: AXSearchBoxModule }, { kind: "component", type: i4$2.AXSearchBoxComponent, selector: "ax-search-box", inputs: ["disabled", "readonly", "tabIndex", "placeholder", "value", "state", "name", "id", "look", "class", "delayTime", "type"], outputs: ["valueChange", "stateChange", "onValueChanged", "onBlur", "onFocus", "readonlyChange", "disabledChange", "onKeyDown", "onKeyUp", "onKeyPress"] }, { kind: "component", type: AXPThemeLayoutHeaderComponent, selector: "axp-layout-header" }, { kind: "component", type: AXPThemeLayoutToolbarComponent, selector: "axp-layout-toolbar" }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i5$1.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "component", type: i5$1.AXButtonItemComponent, selector: "ax-button-item", inputs: ["color", "disabled", "text", "selected", "divided", "data", "name"], outputs: ["onClick", "onFocus", "onBlur", "disabledChange"] }, { kind: "component", type: i5$1.AXButtonItemListComponent, selector: "ax-button-item-list", inputs: ["items"], outputs: ["onItemClick"] }, { kind: "ngmodule", type: AXDropdownModule }, { kind: "component", type: i6.AXDropdownPanelComponent, selector: "ax-dropdown-panel", inputs: ["isOpen", "fitParent", "dropdownWidth", "position", "placement", "_target", "adaptivityEnabled"], outputs: ["onOpened", "onClosed"] }, { kind: "component", type: AXPStateMessageComponent, selector: "axp-state-message", inputs: ["mode", "icon", "title", "description", "variant"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "pipe", type: i5.AXTranslatorPipe, name: "translate" }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
993
|
+
}
|
|
994
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPCategoryTreeComponent, decorators: [{
|
|
995
|
+
type: Component,
|
|
996
|
+
args: [{ selector: 'axp-category-tree', standalone: true, encapsulation: ViewEncapsulation.None, imports: [
|
|
997
|
+
CommonModule,
|
|
998
|
+
AXDecoratorModule,
|
|
999
|
+
AXTreeViewModule,
|
|
1000
|
+
AXSkeletonModule,
|
|
1001
|
+
AXPThemeLayoutBlockComponent,
|
|
1002
|
+
AXSearchBoxModule,
|
|
1003
|
+
AXPThemeLayoutHeaderComponent,
|
|
1004
|
+
AXPThemeLayoutToolbarComponent,
|
|
1005
|
+
AXTranslationModule,
|
|
1006
|
+
AXButtonModule,
|
|
1007
|
+
AXDropdownModule,
|
|
1008
|
+
AXPStateMessageComponent,
|
|
1009
|
+
], template: "<axp-layout-header>\n <axp-layout-toolbar>\n @if (config().searchable) {\n <ax-search-box\n (onValueChanged)=\"handleSearchChange($event)\"\n [delayTime]=\"300\"\n [placeholder]=\"config().searchPlaceholder! | translate | async\"\n >\n </ax-search-box>\n }\n </axp-layout-toolbar>\n</axp-layout-header>\n\n<axp-layout-content>\n @if (isLoading()) {\n <div class=\"ax-p-4 ax-flex ax-flex-col ax-gap-3\" [class.ax-pt-2]=\"config().searchable\">\n <ax-skeleton class=\"ax-w-full ax-h-6 ax-rounded-md\"></ax-skeleton>\n <ax-skeleton class=\"ax-w-full ax-h-6 ax-rounded-md\"></ax-skeleton>\n <ax-skeleton class=\"ax-w-full ax-h-6 ax-rounded-md\"></ax-skeleton>\n <ax-skeleton class=\"ax-w-full ax-h-6 ax-rounded-md\"></ax-skeleton>\n <ax-skeleton class=\"ax-w-full ax-h-6 ax-rounded-md\"></ax-skeleton>\n <ax-skeleton class=\"ax-w-full ax-h-6 ax-rounded-md\"></ax-skeleton>\n </div>\n } @else if (treeItems()[0].children?.length) {\n <div class=\"ax-px-4 ax-max-h-[calc(100vh-250px)] ax-overflow-auto\" [class.ax-pt-2]=\"config().searchable\">\n <ax-tree-view\n (onNodeClick)=\"handleNodeClick($event)\"\n (onCollapsedChanged)=\"handleCollapseChanged($event)\"\n [showCheckbox]=\"config().showCheckbox || false\"\n [itemTemplate]=\"itemTemplate\"\n #treeRef\n [textField]=\"config().textField || 'title'\"\n [valueField]=\"config().valueField || 'id'\"\n [expandedField]=\"config().expandedField || 'expand'\"\n [items]=\"treeItems()\"\n #tree\n >\n </ax-tree-view>\n </div>\n } @else {\n <axp-state-message\n [icon]=\"config().emptyStateIcon || 'fa-light fa-folder-open'\"\n [title]=\"emptyStateTitle()\"\n [description]=\"emptyStateDescription()\"\n >\n </axp-state-message>\n }\n\n <ng-template #itemTemplate let-item>\n <div class=\"ax-flex ax-items-center ax-justify-between ax-w-full ax-gap-2 ax-overflow-hidden\">\n <div class=\"ax-flex ax-items-center ax-gap-2 ax-min-w-0\">\n <ax-icon class=\"fas ax-text-warning fa-folder\"></ax-icon>\n <span class=\"ax-truncate\">{{ item.title | translate | async }}</span>\n </div>\n @if (item.id && item.id !== 'root') {\n @if (actions().canCreateChild || actions().canUpdate || actions().canDelete) {\n <div class=\"ax-flex ax-items-center ax-gap-1\">\n <ax-button class=\"ax-xs\" color=\"default\" look=\"blank\" (onClick)=\"$event.nativeEvent.stopPropagation()\">\n <ax-icon class=\"fas fa-ellipsis-v\"></ax-icon>\n <ax-dropdown-panel>\n <ax-button-item-list>\n @if (actions().canCreateChild) {\n <ax-button-item\n (onClick)=\"handleCreateChildClick(item, $event)\"\n look=\"blank\"\n color=\"default\"\n [text]=\"actions().createChildLabel || 'Add New Child'\"\n >\n <ax-icon class=\"fas fa-plus\"></ax-icon>\n </ax-button-item>\n }\n @if (actions().canUpdate) {\n <ax-button-item\n (onClick)=\"handleUpdateNodeClick(item, $event)\"\n look=\"blank\"\n [text]=\"actions().updateLabel || 'Edit'\"\n >\n <ax-icon class=\"fas fa-pen\"></ax-icon>\n </ax-button-item>\n }\n @if (actions().canDelete) {\n <ax-button-item\n (onClick)=\"handleDeleteNodeClick(item, $event)\"\n color=\"danger\"\n look=\"blank\"\n [text]=\"actions().deleteLabel || 'Delete'\"\n >\n <ax-icon class=\"fas fa-trash\"></ax-icon>\n </ax-button-item>\n }\n </ax-button-item-list>\n </ax-dropdown-panel>\n </ax-button>\n </div>\n }\n } @else if (item.id === 'root' && actions().canCreate) {\n <div class=\"ax-flex ax-items-center ax-gap-1\">\n <ax-button class=\"ax-xs\" (onClick)=\"handleCreateRootClick($event)\" look=\"blank\" color=\"default\">\n <ax-icon class=\"fas fa-plus\"></ax-icon>\n </ax-button>\n </div>\n }\n </div>\n </ng-template>\n</axp-layout-content>\n" }]
|
|
1010
|
+
}] });
|
|
1011
|
+
|
|
1012
|
+
//#region ---- Tree Node Interface ----
|
|
1013
|
+
//#endregion
|
|
1014
|
+
|
|
710
1015
|
class AXPQueryColumnsComponent {
|
|
711
1016
|
constructor() {
|
|
712
1017
|
this.columns = model([], ...(ngDevMode ? [{ debugName: "columns" }] : []));
|
|
@@ -725,10 +1030,10 @@ class AXPQueryColumnsComponent {
|
|
|
725
1030
|
moveItemInArray(columns, event.previousIndex, event.currentIndex);
|
|
726
1031
|
this.columns.set(columns);
|
|
727
1032
|
}
|
|
728
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
729
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.
|
|
1033
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPQueryColumnsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1034
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.4", type: AXPQueryColumnsComponent, isStandalone: true, selector: "axp-query-columns", inputs: { columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { columns: "columnsChange" }, ngImport: i0, template: "<div class=\"ax-flex ax-flex-col ax-gap-4 ax-select-none\" cdkDropList (cdkDropListDropped)=\"drop($event)\">\n <div class=\"ax-flex ax-flex-col ax-gap-3 ax-w-full ax-sorted-list ax-max-h-[calc(100vh-280px)] ax-overflow-auto\">\n @for (item of columns(); track item.name) {\n <div class=\"ax-flex ax-py-1 ax-items-center ax-justify-between\" cdkDrag cdkDragBoundary=\".ax-sorted-list\">\n <div class=\"ax-flex ax-items-center ax-gap-3\" cdkDragHandle>\n <ax-icon class=\"fa-solid fa-grip-dots-vertical ax-cursor-move\"></ax-icon>\n <p class=\"ax-font-medium ax-text-sm\">{{ item.title | translate | async }}</p>\n </div>\n <ax-switch\n class=\"ax-sm\"\n [ngModel]=\"item.visible\"\n (onValueChanged)=\"handleVisibilityChange($event, item.name)\"\n ></ax-switch>\n </div>\n }\n </div>\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer", "cdkDropListHasAnchor"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "ngmodule", type: AXButtonModule }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i2$1.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "ngmodule", type: AXSwitchModule }, { kind: "component", type: i3.AXSwitchComponent, selector: "ax-switch", inputs: ["disabled", "readonly", "color", "tabIndex", "value", "name", "isLoading"], outputs: ["onBlur", "onFocus", "valueChange", "onValueChanged", "readonlyChange", "disabledChange"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "pipe", type: i5.AXTranslatorPipe, name: "translate" }] }); }
|
|
730
1035
|
}
|
|
731
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
1036
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPQueryColumnsComponent, decorators: [{
|
|
732
1037
|
type: Component,
|
|
733
1038
|
args: [{ selector: 'axp-query-columns', imports: [
|
|
734
1039
|
CommonModule,
|
|
@@ -856,16 +1161,16 @@ class AXPCompareViewComponent {
|
|
|
856
1161
|
}
|
|
857
1162
|
ngOnDestroy() {
|
|
858
1163
|
}
|
|
859
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
860
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.8", type: AXPCompareViewComponent, isStandalone: true, selector: "axp-compare-view", inputs: { inputs: { classPropertyName: "inputs", publicName: "inputs", isSignal: true, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null } }, providers: [], ngImport: i0, template: "<!--\n #region ---- Compare View Table Layout ----\n-->\n<div class=\"axp-compare-view\">\n <div class=\"__table-container\">\n <table class=\"__table\">\n <thead class=\"__thead\">\n <tr class=\"__header-row\">\n <th class=\"__field-header\">\n <ax-check-box\n [value]=\"showOnlyChanges()\"\n (valueChange)=\"toggleShowOnlyChanges()\"\n class=\"__show-changes-toggle\"\n >\n <ax-label>\n {{ '@activity-log:compare-view.show-only-differences' | translate | async }}\n </ax-label>\n </ax-check-box>\n </th>\n @for (obj of remainingObjects(); track obj.id) {\n <th class=\"__object-header\" [attr.data-id]=\"obj.id\">\n <div class=\"__object-title\" [title]=\"obj.description\">\n <span>{{ obj.title | translate | async }}</span>\n @if (remainingObjects().length > 2) {\n <span class=\"__remove-object-button\" (click)=\"removeObject(obj.id)\">\n <i class=\"fa-light fa-times\"></i>\n </span>\n }\n </div>\n </th>\n }\n </tr>\n </thead>\n <tbody class=\"__tbody\">\n @for (field of filteredFields(); track field.path; let i = $index) {\n <tr\n class=\"__row\"\n [class.__row--odd]=\"i % 2 === 1\"\n [class.__row--has-differences]=\"hasUnequalValues(field.path)\"\n [class.__row--has-equal-values]=\"hasEqualValues(field.path)\"\n >\n <td class=\"__field-cell\">\n <div class=\"__field-content\">\n <div class=\"__field-title\">\n {{ field.title | translate | async }}\n </div>\n @if (field.description) {\n <div class=\"__field-description\">{{ field.description }}</div>\n }\n </div>\n </td>\n @for (obj of remainingObjects(); track obj.id; let objIndex = $index) {\n <td\n class=\"__object-cell\"\n [attr.data-id]=\"obj.id\"\n [class.__cell--changed]=\"hasValueChangedFromPrevious(field.path, objIndex) && isChangesMode()\"\n >\n @if (obj.context[field.path] !== undefined) {\n <div class=\"__object-content\">\n <axp-widgets-container [context]=\"obj.context\">\n <ng-container axp-widget-renderer [node]=\"field.widget\" [mode]=\"'view'\"></ng-container>\n </axp-widgets-container>\n </div>\n } @else {\n <div class=\"__object-placeholder\">---</div>\n }\n @if (hasValueChangingToNext(field.path, objIndex) && isChangesMode()) {\n <div class=\"__change-indicator\">\n <i class=\"fa-light fa-arrow-right\"></i>\n </div>\n }\n </td>\n }\n </tr>\n }\n </tbody>\n </table>\n </div>\n</div>\n<!--\n #endregion\n-->\n", styles: [".axp-compare-view{display:flex;height:100%;width:100%;flex-direction:column;border-radius:.375rem;border-width:1px;--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);background-color:rgb(var(--ax-sys-color-lightest-surface));color:rgb(var(--ax-sys-color-on-lightest-surface));border-color:rgb(var(--ax-sys-color-border-lightest-surface));position:relative}.axp-compare-view .__filter-controls{flex-shrink:0;border-bottom-width:1px;padding:1rem;background-color:rgb(var(--ax-sys-color-light-surface));color:rgb(var(--ax-sys-color-on-light-surface));border-color:rgb(var(--ax-sys-color-border-light-surface))}.axp-compare-view .__filter-controls .__show-changes-toggle{font-size:.875rem;line-height:1.25rem}.axp-compare-view .__table-container{flex:1 1 0%;overflow:auto;position:relative}.axp-compare-view .__table{width:100%;border-collapse:separate;border-spacing:0;table-layout:fixed}.axp-compare-view .__table .__thead{position:-webkit-sticky;position:sticky;top:0;z-index:20}.axp-compare-view .__table .__thead .__header-row .__field-header{width:14rem;border-bottom-width:1px;border-right-width:1px;padding:.75rem 1rem;text-align:left;font-weight:700;background-color:rgb(var(--ax-sys-color-lighter-surface));color:rgb(var(--ax-sys-color-on-lighter-surface));border-color:rgb(var(--ax-sys-color-border-lighter-surface));position:-webkit-sticky;position:sticky;left:0;z-index:25}.axp-compare-view .__table .__thead .__header-row .__object-header{position:relative;border-bottom-width:1px;padding:.75rem 1rem;text-align:center;background-color:rgb(var(--ax-sys-color-lighter-surface));color:rgb(var(--ax-sys-color-on-lighter-surface));border-color:rgb(var(--ax-sys-color-border-lighter-surface));min-width:250px;width:250px}.axp-compare-view .__table .__thead .__header-row .__object-header .__object-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.875rem;line-height:1.25rem;font-weight:600}.axp-compare-view .__table .__thead .__header-row .__object-header .__object-description{margin-top:.25rem;font-size:.75rem;line-height:1rem;opacity:.75}.axp-compare-view .__table .__thead .__header-row .__object-header .__remove-object-button{display:flex;width:1.5rem;height:1.5rem;cursor:pointer;align-items:center;justify-content:center;border-radius:9999px;--tw-bg-opacity: 1;background-color:rgba(var(--ax-sys-color-light-surface),var(--tw-bg-opacity, 1));font-size:.875rem;line-height:1.25rem;position:absolute;top:50%;inset-inline-end:0px;--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.axp-compare-view .__table .__thead .__header-row .__object-header .__remove-object-button:hover{--tw-bg-opacity: 1;background-color:rgba(var(--ax-sys-color-danger-100),var(--tw-bg-opacity, 1));--tw-text-opacity: 1;color:rgba(var(--ax-sys-color-danger-600),var(--tw-text-opacity, 1))}.axp-compare-view .__table .__tbody .__row{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.2s;animation-duration:.2s}.axp-compare-view .__table .__tbody .__row.__row--odd{background-color:rgb(var(--ax-sys-color-lightest-surface));color:rgb(var(--ax-sys-color-on-lightest-surface));border-color:rgb(var(--ax-sys-color-border-lightest-surface))}.axp-compare-view .__table .__tbody .__row.__row--has-differences{border-left-width:4px;--tw-border-opacity: 1;border-left-color:rgba(var(--ax-sys-color-warning-500),var(--tw-border-opacity, 1))}.axp-compare-view .__table .__tbody .__row.__row--has-differences .__field-cell{background-color:rgba(var(--ax-sys-color-warning-500),var(--tw-bg-opacity, 1));--tw-bg-opacity: .05}.axp-compare-view .__table .__tbody .__row.__row--has-equal-values{border-left-width:4px;--tw-border-opacity: 1;border-left-color:rgba(var(--ax-sys-color-success-500),var(--tw-border-opacity, 1))}.axp-compare-view .__table .__tbody .__row.__row--has-equal-values .__field-cell{background-color:rgba(var(--ax-sys-color-success-500),var(--tw-bg-opacity, 1));--tw-bg-opacity: .05}.axp-compare-view .__table .__tbody .__row .__field-cell{width:14rem;border-bottom-width:1px;border-right-width:1px;padding:.75rem 1rem;vertical-align:top;background-color:rgb(var(--ax-sys-color-lightest-surface));color:rgb(var(--ax-sys-color-on-lightest-surface));border-color:rgb(var(--ax-sys-color-border-lightest-surface));position:-webkit-sticky;position:sticky;left:0;z-index:15}.axp-compare-view .__table .__tbody .__row .__field-cell .__field-content{display:flex;flex-direction:column;gap:.25rem}.axp-compare-view .__table .__tbody .__row .__field-cell .__field-content .__field-title{font-weight:500}.axp-compare-view .__table .__tbody .__row .__field-cell .__field-content .__field-description{font-size:.75rem;line-height:1rem;opacity:.75}.axp-compare-view .__table .__tbody .__row .__object-cell{border-bottom-width:1px;padding:.75rem 1rem;text-align:center;vertical-align:middle;position:relative}.axp-compare-view .__table .__tbody .__row .__object-cell.__cell--changed .__object-content{border-width:1px;border-style:dashed;--tw-border-opacity: 1;border-color:rgba(var(--ax-sys-color-warning-200),var(--tw-border-opacity, 1));padding:.5rem}.axp-compare-view .__table .__tbody .__row .__object-cell .__object-content{position:relative;display:flex;align-items:center;justify-content:center}.axp-compare-view .__table .__tbody .__row .__object-cell .__change-indicator{position:absolute;inset-inline-end:-.25rem;top:50%;--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));line-height:1rem;--tw-text-opacity: 1;color:rgba(var(--ax-sys-color-warning-500),var(--tw-text-opacity, 1));font-size:.875rem}.axp-compare-view .__table .__tbody .__row .__object-cell .__object-placeholder{opacity:.75}.axp-compare-view .__table .__tbody .__row.__row--has-differences .__field-cell{border-inline-start-width:4px;--tw-border-opacity: 1;border-inline-start-color:rgba(var(--ax-sys-color-warning-500),var(--tw-border-opacity, 1));--tw-bg-opacity: 1;background-color:rgba(var(--ax-sys-color-warning-50),var(--tw-bg-opacity, 1))}.axp-compare-view .__table .__tbody .__row.__row--has-differences .__field-cell:is(.ax-dark *){--tw-bg-opacity: 1;background-color:rgba(var(--ax-sys-color-warning-900),var(--tw-bg-opacity, 1))}.axp-compare-view .__table .__tbody .__row.__row--has-equal-values .__field-cell{border-inline-start-width:4px;--tw-border-opacity: 1;border-inline-start-color:rgba(var(--ax-sys-color-success-500),var(--tw-border-opacity, 1));--tw-bg-opacity: 1;background-color:rgba(var(--ax-sys-color-success-50),var(--tw-bg-opacity, 1))}.axp-compare-view .__table .__tbody .__row.__row--has-equal-values .__field-cell:is(.ax-dark *){--tw-bg-opacity: 1;background-color:rgba(var(--ax-sys-color-success-900),var(--tw-bg-opacity, 1))}\n"], dependencies: [{ kind: "ngmodule", type:
|
|
1164
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPCompareViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1165
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.4", type: AXPCompareViewComponent, isStandalone: true, selector: "axp-compare-view", inputs: { inputs: { classPropertyName: "inputs", publicName: "inputs", isSignal: true, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null } }, providers: [], ngImport: i0, template: "<!--\n #region ---- Compare View Table Layout ----\n-->\n<div class=\"axp-compare-view\">\n <div class=\"__table-container\">\n <table class=\"__table\">\n <thead class=\"__thead\">\n <tr class=\"__header-row\">\n <th class=\"__field-header\">\n <ax-check-box\n [value]=\"showOnlyChanges()\"\n (valueChange)=\"toggleShowOnlyChanges()\"\n class=\"__show-changes-toggle\"\n >\n <ax-label>\n {{ '@activity-log:compare-view.show-only-differences' | translate | async }}\n </ax-label>\n </ax-check-box>\n </th>\n @for (obj of remainingObjects(); track obj.id) {\n <th class=\"__object-header\" [attr.data-id]=\"obj.id\">\n <div class=\"__object-title\" [title]=\"obj.description\">\n <span>{{ obj.title | translate | async }}</span>\n @if (remainingObjects().length > 2) {\n <span class=\"__remove-object-button\" (click)=\"removeObject(obj.id)\">\n <i class=\"fa-light fa-times\"></i>\n </span>\n }\n </div>\n </th>\n }\n </tr>\n </thead>\n <tbody class=\"__tbody\">\n @for (field of filteredFields(); track field.path; let i = $index) {\n <tr\n class=\"__row\"\n [class.__row--odd]=\"i % 2 === 1\"\n [class.__row--has-differences]=\"hasUnequalValues(field.path)\"\n [class.__row--has-equal-values]=\"hasEqualValues(field.path)\"\n >\n <td class=\"__field-cell\">\n <div class=\"__field-content\">\n <div class=\"__field-title\">\n {{ field.title | translate | async }}\n </div>\n @if (field.description) {\n <div class=\"__field-description\">{{ field.description }}</div>\n }\n </div>\n </td>\n @for (obj of remainingObjects(); track obj.id; let objIndex = $index) {\n <td\n class=\"__object-cell\"\n [attr.data-id]=\"obj.id\"\n [class.__cell--changed]=\"hasValueChangedFromPrevious(field.path, objIndex) && isChangesMode()\"\n >\n @if (obj.context[field.path] !== undefined) {\n <div class=\"__object-content\">\n <axp-widgets-container [context]=\"obj.context\">\n <ng-container axp-widget-renderer [node]=\"field.widget\" [mode]=\"'view'\"></ng-container>\n </axp-widgets-container>\n </div>\n } @else {\n <div class=\"__object-placeholder\">---</div>\n }\n @if (hasValueChangingToNext(field.path, objIndex) && isChangesMode()) {\n <div class=\"__change-indicator\">\n <i class=\"fa-light fa-arrow-right\"></i>\n </div>\n }\n </td>\n }\n </tr>\n }\n </tbody>\n </table>\n </div>\n</div>\n<!--\n #endregion\n-->\n", styles: [".axp-compare-view{display:flex;height:100%;width:100%;flex-direction:column;border-radius:.375rem;border-width:1px;--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);background-color:rgb(var(--ax-sys-color-lightest-surface));color:rgb(var(--ax-sys-color-on-lightest-surface));border-color:rgb(var(--ax-sys-color-border-lightest-surface));position:relative}.axp-compare-view .__filter-controls{flex-shrink:0;border-bottom-width:1px;padding:1rem;background-color:rgb(var(--ax-sys-color-light-surface));color:rgb(var(--ax-sys-color-on-light-surface));border-color:rgb(var(--ax-sys-color-border-light-surface))}.axp-compare-view .__filter-controls .__show-changes-toggle{font-size:.875rem;line-height:1.25rem}.axp-compare-view .__table-container{flex:1 1 0%;overflow:auto;position:relative}.axp-compare-view .__table{width:100%;border-collapse:separate;border-spacing:0;table-layout:fixed}.axp-compare-view .__table .__thead{position:-webkit-sticky;position:sticky;top:0;z-index:20}.axp-compare-view .__table .__thead .__header-row .__field-header{width:14rem;border-bottom-width:1px;border-right-width:1px;padding:.75rem 1rem;text-align:left;font-weight:700;background-color:rgb(var(--ax-sys-color-lighter-surface));color:rgb(var(--ax-sys-color-on-lighter-surface));border-color:rgb(var(--ax-sys-color-border-lighter-surface));position:-webkit-sticky;position:sticky;left:0;z-index:25}.axp-compare-view .__table .__thead .__header-row .__object-header{position:relative;border-bottom-width:1px;padding:.75rem 1rem;text-align:center;background-color:rgb(var(--ax-sys-color-lighter-surface));color:rgb(var(--ax-sys-color-on-lighter-surface));border-color:rgb(var(--ax-sys-color-border-lighter-surface));min-width:250px;width:250px}.axp-compare-view .__table .__thead .__header-row .__object-header .__object-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.875rem;line-height:1.25rem;font-weight:600}.axp-compare-view .__table .__thead .__header-row .__object-header .__object-description{margin-top:.25rem;font-size:.75rem;line-height:1rem;opacity:.75}.axp-compare-view .__table .__thead .__header-row .__object-header .__remove-object-button{display:flex;width:1.5rem;height:1.5rem;cursor:pointer;align-items:center;justify-content:center;border-radius:9999px;--tw-bg-opacity: 1;background-color:rgba(var(--ax-sys-color-light-surface),var(--tw-bg-opacity, 1));font-size:.875rem;line-height:1.25rem;position:absolute;top:50%;inset-inline-end:0px;--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.axp-compare-view .__table .__thead .__header-row .__object-header .__remove-object-button:hover{--tw-bg-opacity: 1;background-color:rgba(var(--ax-sys-color-danger-100),var(--tw-bg-opacity, 1));--tw-text-opacity: 1;color:rgba(var(--ax-sys-color-danger-600),var(--tw-text-opacity, 1))}.axp-compare-view .__table .__tbody .__row{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.2s;animation-duration:.2s}.axp-compare-view .__table .__tbody .__row.__row--odd{background-color:rgb(var(--ax-sys-color-lightest-surface));color:rgb(var(--ax-sys-color-on-lightest-surface));border-color:rgb(var(--ax-sys-color-border-lightest-surface))}.axp-compare-view .__table .__tbody .__row.__row--has-differences{border-left-width:4px;--tw-border-opacity: 1;border-left-color:rgba(var(--ax-sys-color-warning-500),var(--tw-border-opacity, 1))}.axp-compare-view .__table .__tbody .__row.__row--has-differences .__field-cell{background-color:rgba(var(--ax-sys-color-warning-500),var(--tw-bg-opacity, 1));--tw-bg-opacity: .05}.axp-compare-view .__table .__tbody .__row.__row--has-equal-values{border-left-width:4px;--tw-border-opacity: 1;border-left-color:rgba(var(--ax-sys-color-success-500),var(--tw-border-opacity, 1))}.axp-compare-view .__table .__tbody .__row.__row--has-equal-values .__field-cell{background-color:rgba(var(--ax-sys-color-success-500),var(--tw-bg-opacity, 1));--tw-bg-opacity: .05}.axp-compare-view .__table .__tbody .__row .__field-cell{width:14rem;border-bottom-width:1px;border-right-width:1px;padding:.75rem 1rem;vertical-align:top;background-color:rgb(var(--ax-sys-color-lightest-surface));color:rgb(var(--ax-sys-color-on-lightest-surface));border-color:rgb(var(--ax-sys-color-border-lightest-surface));position:-webkit-sticky;position:sticky;left:0;z-index:15}.axp-compare-view .__table .__tbody .__row .__field-cell .__field-content{display:flex;flex-direction:column;gap:.25rem}.axp-compare-view .__table .__tbody .__row .__field-cell .__field-content .__field-title{font-weight:500}.axp-compare-view .__table .__tbody .__row .__field-cell .__field-content .__field-description{font-size:.75rem;line-height:1rem;opacity:.75}.axp-compare-view .__table .__tbody .__row .__object-cell{border-bottom-width:1px;padding:.75rem 1rem;text-align:center;vertical-align:middle;position:relative}.axp-compare-view .__table .__tbody .__row .__object-cell.__cell--changed .__object-content{border-width:1px;border-style:dashed;--tw-border-opacity: 1;border-color:rgba(var(--ax-sys-color-warning-200),var(--tw-border-opacity, 1));padding:.5rem}.axp-compare-view .__table .__tbody .__row .__object-cell .__object-content{position:relative;display:flex;align-items:center;justify-content:center}.axp-compare-view .__table .__tbody .__row .__object-cell .__change-indicator{position:absolute;inset-inline-end:-.25rem;top:50%;--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));line-height:1rem;--tw-text-opacity: 1;color:rgba(var(--ax-sys-color-warning-500),var(--tw-text-opacity, 1));font-size:.875rem}.axp-compare-view .__table .__tbody .__row .__object-cell .__object-placeholder{opacity:.75}.axp-compare-view .__table .__tbody .__row.__row--has-differences .__field-cell{border-inline-start-width:4px;--tw-border-opacity: 1;border-inline-start-color:rgba(var(--ax-sys-color-warning-500),var(--tw-border-opacity, 1));--tw-bg-opacity: 1;background-color:rgba(var(--ax-sys-color-warning-50),var(--tw-bg-opacity, 1))}.axp-compare-view .__table .__tbody .__row.__row--has-differences .__field-cell:is(.ax-dark *){--tw-bg-opacity: 1;background-color:rgba(var(--ax-sys-color-warning-900),var(--tw-bg-opacity, 1))}.axp-compare-view .__table .__tbody .__row.__row--has-equal-values .__field-cell{border-inline-start-width:4px;--tw-border-opacity: 1;border-inline-start-color:rgba(var(--ax-sys-color-success-500),var(--tw-border-opacity, 1));--tw-bg-opacity: 1;background-color:rgba(var(--ax-sys-color-success-50),var(--tw-bg-opacity, 1))}.axp-compare-view .__table .__tbody .__row.__row--has-equal-values .__field-cell:is(.ax-dark *){--tw-bg-opacity: 1;background-color:rgba(var(--ax-sys-color-success-900),var(--tw-bg-opacity, 1))}\n"], dependencies: [{ kind: "ngmodule", type:
|
|
861
1166
|
// Angular
|
|
862
1167
|
CommonModule }, { kind: "ngmodule", type:
|
|
863
1168
|
// ACoreX
|
|
864
|
-
AXFormModule }, { kind: "ngmodule", type: AXTextBoxModule }, { kind: "ngmodule", type: AXButtonModule }, { kind: "ngmodule", type: AXLabelModule }, { kind: "component", type: i3$
|
|
1169
|
+
AXFormModule }, { kind: "ngmodule", type: AXTextBoxModule }, { kind: "ngmodule", type: AXButtonModule }, { kind: "ngmodule", type: AXLabelModule }, { kind: "component", type: i3$1.AXLabelComponent, selector: "ax-label", inputs: ["required", "for"], outputs: ["requiredChange"] }, { kind: "ngmodule", type: AXCheckBoxModule }, { kind: "component", type: i2$3.AXCheckBoxComponent, selector: "ax-check-box", inputs: ["disabled", "tabIndex", "readonly", "color", "value", "name", "id", "isLoading", "indeterminate"], outputs: ["onBlur", "onFocus", "valueChange", "onValueChanged"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "ngmodule", type:
|
|
865
1170
|
// Platform
|
|
866
|
-
|
|
1171
|
+
AXPWidgetCoreModule }, { kind: "component", type: i3$2.AXPWidgetContainerComponent, selector: "axp-widgets-container", inputs: ["context", "functions"], outputs: ["onContextChanged"] }, { kind: "directive", type: i3$2.AXPWidgetRendererDirective, selector: "[axp-widget-renderer]", inputs: ["parentNode", "index", "mode", "node"], outputs: ["onOptionsChanged", "onValueChanged"], exportAs: ["widgetRenderer"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "pipe", type: i5.AXTranslatorPipe, name: "translate" }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
867
1172
|
}
|
|
868
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
1173
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPCompareViewComponent, decorators: [{
|
|
869
1174
|
type: Component,
|
|
870
1175
|
args: [{ selector: 'axp-compare-view', imports: [
|
|
871
1176
|
// Angular
|
|
@@ -878,15 +1183,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.8", ngImpor
|
|
|
878
1183
|
AXCheckBoxModule,
|
|
879
1184
|
AXTranslationModule,
|
|
880
1185
|
// Platform
|
|
881
|
-
|
|
1186
|
+
AXPWidgetCoreModule
|
|
882
1187
|
], encapsulation: ViewEncapsulation.None, providers: [], template: "<!--\n #region ---- Compare View Table Layout ----\n-->\n<div class=\"axp-compare-view\">\n <div class=\"__table-container\">\n <table class=\"__table\">\n <thead class=\"__thead\">\n <tr class=\"__header-row\">\n <th class=\"__field-header\">\n <ax-check-box\n [value]=\"showOnlyChanges()\"\n (valueChange)=\"toggleShowOnlyChanges()\"\n class=\"__show-changes-toggle\"\n >\n <ax-label>\n {{ '@activity-log:compare-view.show-only-differences' | translate | async }}\n </ax-label>\n </ax-check-box>\n </th>\n @for (obj of remainingObjects(); track obj.id) {\n <th class=\"__object-header\" [attr.data-id]=\"obj.id\">\n <div class=\"__object-title\" [title]=\"obj.description\">\n <span>{{ obj.title | translate | async }}</span>\n @if (remainingObjects().length > 2) {\n <span class=\"__remove-object-button\" (click)=\"removeObject(obj.id)\">\n <i class=\"fa-light fa-times\"></i>\n </span>\n }\n </div>\n </th>\n }\n </tr>\n </thead>\n <tbody class=\"__tbody\">\n @for (field of filteredFields(); track field.path; let i = $index) {\n <tr\n class=\"__row\"\n [class.__row--odd]=\"i % 2 === 1\"\n [class.__row--has-differences]=\"hasUnequalValues(field.path)\"\n [class.__row--has-equal-values]=\"hasEqualValues(field.path)\"\n >\n <td class=\"__field-cell\">\n <div class=\"__field-content\">\n <div class=\"__field-title\">\n {{ field.title | translate | async }}\n </div>\n @if (field.description) {\n <div class=\"__field-description\">{{ field.description }}</div>\n }\n </div>\n </td>\n @for (obj of remainingObjects(); track obj.id; let objIndex = $index) {\n <td\n class=\"__object-cell\"\n [attr.data-id]=\"obj.id\"\n [class.__cell--changed]=\"hasValueChangedFromPrevious(field.path, objIndex) && isChangesMode()\"\n >\n @if (obj.context[field.path] !== undefined) {\n <div class=\"__object-content\">\n <axp-widgets-container [context]=\"obj.context\">\n <ng-container axp-widget-renderer [node]=\"field.widget\" [mode]=\"'view'\"></ng-container>\n </axp-widgets-container>\n </div>\n } @else {\n <div class=\"__object-placeholder\">---</div>\n }\n @if (hasValueChangingToNext(field.path, objIndex) && isChangesMode()) {\n <div class=\"__change-indicator\">\n <i class=\"fa-light fa-arrow-right\"></i>\n </div>\n }\n </td>\n }\n </tr>\n }\n </tbody>\n </table>\n </div>\n</div>\n<!--\n #endregion\n-->\n", styles: [".axp-compare-view{display:flex;height:100%;width:100%;flex-direction:column;border-radius:.375rem;border-width:1px;--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);background-color:rgb(var(--ax-sys-color-lightest-surface));color:rgb(var(--ax-sys-color-on-lightest-surface));border-color:rgb(var(--ax-sys-color-border-lightest-surface));position:relative}.axp-compare-view .__filter-controls{flex-shrink:0;border-bottom-width:1px;padding:1rem;background-color:rgb(var(--ax-sys-color-light-surface));color:rgb(var(--ax-sys-color-on-light-surface));border-color:rgb(var(--ax-sys-color-border-light-surface))}.axp-compare-view .__filter-controls .__show-changes-toggle{font-size:.875rem;line-height:1.25rem}.axp-compare-view .__table-container{flex:1 1 0%;overflow:auto;position:relative}.axp-compare-view .__table{width:100%;border-collapse:separate;border-spacing:0;table-layout:fixed}.axp-compare-view .__table .__thead{position:-webkit-sticky;position:sticky;top:0;z-index:20}.axp-compare-view .__table .__thead .__header-row .__field-header{width:14rem;border-bottom-width:1px;border-right-width:1px;padding:.75rem 1rem;text-align:left;font-weight:700;background-color:rgb(var(--ax-sys-color-lighter-surface));color:rgb(var(--ax-sys-color-on-lighter-surface));border-color:rgb(var(--ax-sys-color-border-lighter-surface));position:-webkit-sticky;position:sticky;left:0;z-index:25}.axp-compare-view .__table .__thead .__header-row .__object-header{position:relative;border-bottom-width:1px;padding:.75rem 1rem;text-align:center;background-color:rgb(var(--ax-sys-color-lighter-surface));color:rgb(var(--ax-sys-color-on-lighter-surface));border-color:rgb(var(--ax-sys-color-border-lighter-surface));min-width:250px;width:250px}.axp-compare-view .__table .__thead .__header-row .__object-header .__object-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.875rem;line-height:1.25rem;font-weight:600}.axp-compare-view .__table .__thead .__header-row .__object-header .__object-description{margin-top:.25rem;font-size:.75rem;line-height:1rem;opacity:.75}.axp-compare-view .__table .__thead .__header-row .__object-header .__remove-object-button{display:flex;width:1.5rem;height:1.5rem;cursor:pointer;align-items:center;justify-content:center;border-radius:9999px;--tw-bg-opacity: 1;background-color:rgba(var(--ax-sys-color-light-surface),var(--tw-bg-opacity, 1));font-size:.875rem;line-height:1.25rem;position:absolute;top:50%;inset-inline-end:0px;--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.axp-compare-view .__table .__thead .__header-row .__object-header .__remove-object-button:hover{--tw-bg-opacity: 1;background-color:rgba(var(--ax-sys-color-danger-100),var(--tw-bg-opacity, 1));--tw-text-opacity: 1;color:rgba(var(--ax-sys-color-danger-600),var(--tw-text-opacity, 1))}.axp-compare-view .__table .__tbody .__row{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.2s;animation-duration:.2s}.axp-compare-view .__table .__tbody .__row.__row--odd{background-color:rgb(var(--ax-sys-color-lightest-surface));color:rgb(var(--ax-sys-color-on-lightest-surface));border-color:rgb(var(--ax-sys-color-border-lightest-surface))}.axp-compare-view .__table .__tbody .__row.__row--has-differences{border-left-width:4px;--tw-border-opacity: 1;border-left-color:rgba(var(--ax-sys-color-warning-500),var(--tw-border-opacity, 1))}.axp-compare-view .__table .__tbody .__row.__row--has-differences .__field-cell{background-color:rgba(var(--ax-sys-color-warning-500),var(--tw-bg-opacity, 1));--tw-bg-opacity: .05}.axp-compare-view .__table .__tbody .__row.__row--has-equal-values{border-left-width:4px;--tw-border-opacity: 1;border-left-color:rgba(var(--ax-sys-color-success-500),var(--tw-border-opacity, 1))}.axp-compare-view .__table .__tbody .__row.__row--has-equal-values .__field-cell{background-color:rgba(var(--ax-sys-color-success-500),var(--tw-bg-opacity, 1));--tw-bg-opacity: .05}.axp-compare-view .__table .__tbody .__row .__field-cell{width:14rem;border-bottom-width:1px;border-right-width:1px;padding:.75rem 1rem;vertical-align:top;background-color:rgb(var(--ax-sys-color-lightest-surface));color:rgb(var(--ax-sys-color-on-lightest-surface));border-color:rgb(var(--ax-sys-color-border-lightest-surface));position:-webkit-sticky;position:sticky;left:0;z-index:15}.axp-compare-view .__table .__tbody .__row .__field-cell .__field-content{display:flex;flex-direction:column;gap:.25rem}.axp-compare-view .__table .__tbody .__row .__field-cell .__field-content .__field-title{font-weight:500}.axp-compare-view .__table .__tbody .__row .__field-cell .__field-content .__field-description{font-size:.75rem;line-height:1rem;opacity:.75}.axp-compare-view .__table .__tbody .__row .__object-cell{border-bottom-width:1px;padding:.75rem 1rem;text-align:center;vertical-align:middle;position:relative}.axp-compare-view .__table .__tbody .__row .__object-cell.__cell--changed .__object-content{border-width:1px;border-style:dashed;--tw-border-opacity: 1;border-color:rgba(var(--ax-sys-color-warning-200),var(--tw-border-opacity, 1));padding:.5rem}.axp-compare-view .__table .__tbody .__row .__object-cell .__object-content{position:relative;display:flex;align-items:center;justify-content:center}.axp-compare-view .__table .__tbody .__row .__object-cell .__change-indicator{position:absolute;inset-inline-end:-.25rem;top:50%;--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));line-height:1rem;--tw-text-opacity: 1;color:rgba(var(--ax-sys-color-warning-500),var(--tw-text-opacity, 1));font-size:.875rem}.axp-compare-view .__table .__tbody .__row .__object-cell .__object-placeholder{opacity:.75}.axp-compare-view .__table .__tbody .__row.__row--has-differences .__field-cell{border-inline-start-width:4px;--tw-border-opacity: 1;border-inline-start-color:rgba(var(--ax-sys-color-warning-500),var(--tw-border-opacity, 1));--tw-bg-opacity: 1;background-color:rgba(var(--ax-sys-color-warning-50),var(--tw-bg-opacity, 1))}.axp-compare-view .__table .__tbody .__row.__row--has-differences .__field-cell:is(.ax-dark *){--tw-bg-opacity: 1;background-color:rgba(var(--ax-sys-color-warning-900),var(--tw-bg-opacity, 1))}.axp-compare-view .__table .__tbody .__row.__row--has-equal-values .__field-cell{border-inline-start-width:4px;--tw-border-opacity: 1;border-inline-start-color:rgba(var(--ax-sys-color-success-500),var(--tw-border-opacity, 1));--tw-bg-opacity: 1;background-color:rgba(var(--ax-sys-color-success-50),var(--tw-bg-opacity, 1))}.axp-compare-view .__table .__tbody .__row.__row--has-equal-values .__field-cell:is(.ax-dark *){--tw-bg-opacity: 1;background-color:rgba(var(--ax-sys-color-success-900),var(--tw-bg-opacity, 1))}\n"] }]
|
|
883
1188
|
}] });
|
|
884
1189
|
|
|
885
1190
|
class AXPComponentSlot {
|
|
886
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
887
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.
|
|
1191
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPComponentSlot, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1192
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.4", type: AXPComponentSlot, isStandalone: true, ngImport: i0 }); }
|
|
888
1193
|
}
|
|
889
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
1194
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPComponentSlot, decorators: [{
|
|
890
1195
|
type: Directive
|
|
891
1196
|
}] });
|
|
892
1197
|
|
|
@@ -906,10 +1211,10 @@ class AXPComponentSlotRegistryService {
|
|
|
906
1211
|
get(slotName) {
|
|
907
1212
|
return this.registry.get(slotName) || [];
|
|
908
1213
|
}
|
|
909
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
910
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.
|
|
1214
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPComponentSlotRegistryService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1215
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPComponentSlotRegistryService, providedIn: 'root' }); }
|
|
911
1216
|
}
|
|
912
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
1217
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPComponentSlotRegistryService, decorators: [{
|
|
913
1218
|
type: Injectable,
|
|
914
1219
|
args: [{
|
|
915
1220
|
providedIn: 'root'
|
|
@@ -1008,10 +1313,10 @@ class AXPComponentSlotDirective {
|
|
|
1008
1313
|
return condition(this.contextStore.data());
|
|
1009
1314
|
//return condition(this.context());
|
|
1010
1315
|
}
|
|
1011
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
1012
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.
|
|
1316
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPComponentSlotDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1317
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.4", type: AXPComponentSlotDirective, isStandalone: false, selector: "axp-component-slot", inputs: { name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: true, transformFunction: null }, host: { classPropertyName: "host", publicName: "host", isSignal: true, isRequired: false, transformFunction: null }, context: { classPropertyName: "context", publicName: "context", isSignal: true, isRequired: false, transformFunction: null } }, exportAs: ["slot"], ngImport: i0 }); }
|
|
1013
1318
|
}
|
|
1014
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
1319
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPComponentSlotDirective, decorators: [{
|
|
1015
1320
|
type: Directive,
|
|
1016
1321
|
args: [{
|
|
1017
1322
|
selector: 'axp-component-slot',
|
|
@@ -1071,11 +1376,11 @@ class AXPComponentSlotModule {
|
|
|
1071
1376
|
f();
|
|
1072
1377
|
});
|
|
1073
1378
|
}
|
|
1074
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
1075
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.
|
|
1076
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.
|
|
1379
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPComponentSlotModule, deps: [{ token: 'AXPComponentSlotModuleFactory', optional: true }], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
1380
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.4", ngImport: i0, type: AXPComponentSlotModule, declarations: [AXPComponentSlotDirective], exports: [AXPComponentSlotDirective] }); }
|
|
1381
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPComponentSlotModule }); }
|
|
1077
1382
|
}
|
|
1078
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
1383
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPComponentSlotModule, decorators: [{
|
|
1079
1384
|
type: NgModule,
|
|
1080
1385
|
args: [{
|
|
1081
1386
|
declarations: [AXPComponentSlotDirective],
|
|
@@ -1100,12 +1405,15 @@ class AXPDataSelectorComponent extends AXBasePageComponent {
|
|
|
1100
1405
|
selectionMode: 'single',
|
|
1101
1406
|
searchFields: [],
|
|
1102
1407
|
parentField: undefined,
|
|
1103
|
-
allowCreate: false
|
|
1408
|
+
allowCreate: false,
|
|
1409
|
+
filters: undefined
|
|
1104
1410
|
}, ...(ngDevMode ? [{ debugName: "config" }] : []));
|
|
1105
1411
|
this.searchTerm = '';
|
|
1106
1412
|
this.grid = viewChild('grid', ...(ngDevMode ? [{ debugName: "grid" }] : []));
|
|
1107
1413
|
this.initialSelectedItems = [];
|
|
1108
1414
|
this.selectedItems = signal([], ...(ngDevMode ? [{ debugName: "selectedItems" }] : []));
|
|
1415
|
+
// Category Filter State
|
|
1416
|
+
this.activeCategoryFilter = signal(null, ...(ngDevMode ? [{ debugName: "activeCategoryFilter" }] : []));
|
|
1109
1417
|
//#endregion
|
|
1110
1418
|
//#region ---- Computed Properties ----
|
|
1111
1419
|
this.allowSelect = computed(() => this.selectedItems().length > 0, ...(ngDevMode ? [{ debugName: "allowSelect" }] : []));
|
|
@@ -1120,6 +1428,24 @@ class AXPDataSelectorComponent extends AXBasePageComponent {
|
|
|
1120
1428
|
}
|
|
1121
1429
|
return `Search in ${searchFields.join(', ')}...`;
|
|
1122
1430
|
}, ...(ngDevMode ? [{ debugName: "searchPlaceholder" }] : []));
|
|
1431
|
+
// Category Tree Configuration
|
|
1432
|
+
this.categoryTreeConfig = computed(() => ({
|
|
1433
|
+
textField: 'title',
|
|
1434
|
+
valueField: 'id',
|
|
1435
|
+
showCheckbox: false,
|
|
1436
|
+
searchable: true,
|
|
1437
|
+
searchPlaceholder: '@general:terms.interface.category.search.placeholder',
|
|
1438
|
+
emptyStateTitle: '@general:terms.interface.category.search.no-records.title',
|
|
1439
|
+
emptyStateDescription: '@general:terms.interface.category.search.no-records.description',
|
|
1440
|
+
emptyStateIcon: 'fa-light fa-folder-open',
|
|
1441
|
+
}), ...(ngDevMode ? [{ debugName: "categoryTreeConfig" }] : []));
|
|
1442
|
+
// Category Tree Actions (no CRUD in filter mode)
|
|
1443
|
+
this.categoryTreeActions = computed(() => ({
|
|
1444
|
+
canCreate: false,
|
|
1445
|
+
canUpdate: false,
|
|
1446
|
+
canDelete: false,
|
|
1447
|
+
canCreateChild: false,
|
|
1448
|
+
}), ...(ngDevMode ? [{ debugName: "categoryTreeActions" }] : []));
|
|
1123
1449
|
}
|
|
1124
1450
|
//#endregion
|
|
1125
1451
|
//#region ---- Lifecycle Methods ----
|
|
@@ -1186,6 +1512,31 @@ class AXPDataSelectorComponent extends AXBasePageComponent {
|
|
|
1186
1512
|
await this.grid().expandRow(row);
|
|
1187
1513
|
}
|
|
1188
1514
|
}
|
|
1515
|
+
// Category Filter Event Handlers
|
|
1516
|
+
handleCategoryFilterClick(node) {
|
|
1517
|
+
const categoryConfig = this.config().categoryFilter;
|
|
1518
|
+
// Get the filter value from the node
|
|
1519
|
+
const filterValue = node.id;
|
|
1520
|
+
// Store active filter state
|
|
1521
|
+
this.activeCategoryFilter.set({
|
|
1522
|
+
node,
|
|
1523
|
+
filterValue
|
|
1524
|
+
});
|
|
1525
|
+
// Apply filter to main data source
|
|
1526
|
+
this.applyCategoryFilter(filterValue, categoryConfig);
|
|
1527
|
+
}
|
|
1528
|
+
clearCategoryFilter() {
|
|
1529
|
+
this.activeCategoryFilter.set(null);
|
|
1530
|
+
// Apply only base filters (without category filter)
|
|
1531
|
+
const baseFilters = this.config().filters;
|
|
1532
|
+
if (baseFilters) {
|
|
1533
|
+
this.config().dataSource.filter(baseFilters);
|
|
1534
|
+
}
|
|
1535
|
+
else {
|
|
1536
|
+
this.config().dataSource.clearFilter();
|
|
1537
|
+
}
|
|
1538
|
+
this.config().dataSource.refresh();
|
|
1539
|
+
}
|
|
1189
1540
|
//#endregion
|
|
1190
1541
|
//#region ---- Private Methods ----
|
|
1191
1542
|
applySearchFilter(searchTerm) {
|
|
@@ -1193,18 +1544,76 @@ class AXPDataSelectorComponent extends AXBasePageComponent {
|
|
|
1193
1544
|
if (!searchFields || searchFields.length === 0) {
|
|
1194
1545
|
return;
|
|
1195
1546
|
}
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1547
|
+
if (isEmpty(searchTerm) || isNil(searchTerm)) {
|
|
1548
|
+
// Apply only base filters when search is cleared
|
|
1549
|
+
const baseFilters = this.config().filters;
|
|
1550
|
+
if (baseFilters) {
|
|
1551
|
+
this.config().dataSource.filter(baseFilters);
|
|
1552
|
+
}
|
|
1553
|
+
else {
|
|
1554
|
+
this.config().dataSource.clearFilter();
|
|
1555
|
+
}
|
|
1556
|
+
this.config().dataSource.refresh();
|
|
1557
|
+
return;
|
|
1558
|
+
}
|
|
1559
|
+
// Get base filters from config
|
|
1560
|
+
const baseFilters = this.config().filters;
|
|
1561
|
+
// Create search filter
|
|
1562
|
+
const searchFilter = {
|
|
1563
|
+
field: 'title',
|
|
1564
|
+
value: searchTerm,
|
|
1565
|
+
operator: { type: 'contains' }
|
|
1566
|
+
};
|
|
1567
|
+
// Merge base filters with search filter
|
|
1568
|
+
const allFilters = baseFilters ? [baseFilters, searchFilter] : [searchFilter];
|
|
1569
|
+
const filter = {
|
|
1570
|
+
field: null,
|
|
1571
|
+
logic: 'and',
|
|
1572
|
+
operator: null,
|
|
1573
|
+
filters: allFilters
|
|
1574
|
+
};
|
|
1575
|
+
// Apply filter to data source
|
|
1576
|
+
this.config().dataSource.filter(filter);
|
|
1577
|
+
this.config().dataSource.refresh();
|
|
1199
1578
|
}
|
|
1200
1579
|
applyFilterAndSort() {
|
|
1201
|
-
// Apply
|
|
1202
|
-
|
|
1580
|
+
// Apply base filters from config
|
|
1581
|
+
const baseFilters = this.config().filters;
|
|
1582
|
+
if (baseFilters) {
|
|
1583
|
+
this.config().dataSource.filter(baseFilters);
|
|
1584
|
+
this.config().dataSource.refresh();
|
|
1585
|
+
}
|
|
1203
1586
|
}
|
|
1204
|
-
|
|
1205
|
-
|
|
1587
|
+
applyCategoryFilter(filterValue, categoryConfig) {
|
|
1588
|
+
if (isNil(filterValue) || filterValue === 'root') {
|
|
1589
|
+
this.config().dataSource.clearFilter();
|
|
1590
|
+
this.config().dataSource.refresh();
|
|
1591
|
+
return;
|
|
1592
|
+
}
|
|
1593
|
+
// Get base filters from config
|
|
1594
|
+
const baseFilters = this.config().filters;
|
|
1595
|
+
// Create category filter
|
|
1596
|
+
const categoryFilter = {
|
|
1597
|
+
field: categoryConfig.filterField,
|
|
1598
|
+
value: filterValue,
|
|
1599
|
+
operator: { type: categoryConfig.filterOperator || 'contains' }
|
|
1600
|
+
};
|
|
1601
|
+
// Merge base filters with category filter
|
|
1602
|
+
const allFilters = baseFilters ? [baseFilters, categoryFilter] : [categoryFilter];
|
|
1603
|
+
const filter = {
|
|
1604
|
+
field: null,
|
|
1605
|
+
logic: 'and',
|
|
1606
|
+
operator: null,
|
|
1607
|
+
filters: allFilters
|
|
1608
|
+
};
|
|
1609
|
+
// Apply filter to data source (adds to existing filters)
|
|
1610
|
+
this.config().dataSource.filter(filter);
|
|
1611
|
+
this.config().dataSource.refresh();
|
|
1612
|
+
}
|
|
1613
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPDataSelectorComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
1614
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.4", type: AXPDataSelectorComponent, isStandalone: true, selector: "axp-data-selector", viewQueries: [{ propertyName: "grid", first: true, predicate: ["grid"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"axp-data-selector\">\n <!-- Main Content Area -->\n <div class=\"axp-data-selector-content\" [class.with-category-filter]=\"config().categoryFilter?.enabled\">\n <!-- Category Filter Side Panel -->\n @if (config().categoryFilter?.enabled) {\n <div class=\"axp-category-filter-panel\" [style.width]=\"config().categoryFilter?.width || '300px'\">\n <axp-category-tree\n [dataSource]=\"config().categoryFilter!.dataSource\"\n [config]=\"categoryTreeConfig()\"\n [actions]=\"categoryTreeActions()\"\n (nodeClick)=\"handleCategoryFilterClick($event)\"\n >\n </axp-category-tree>\n </div>\n }\n\n <!-- Main Data Area -->\n <div class=\"axp-main-data-area\">\n @if (hasSearch()) {\n <div class=\"ax-w-full ax-mb-2\">\n <ax-search-box\n [placeholder]=\"searchPlaceholder()\"\n [value]=\"searchTerm\"\n (onValueChanged)=\"handleChangeSearchValue($event)\"\n [axAutoFocus]=\"true\"\n >\n <ax-clear-button></ax-clear-button>\n </ax-search-box>\n </div>\n }\n\n <ax-data-table\n #grid\n [showFooter]=\"false\"\n class=\"ax-h-[50vh]\"\n [paging]=\"true\"\n [loading]=\"{ enabled: true, animation: true }\"\n [dataSource]=\"config().dataSource\"\n [parentField]=\"config().parentField\"\n (selectedRowsChange)=\"handleSelectedRowsChange($event)\"\n (onRowClick)=\"handleRowClick($event)\"\n (onRowDbClick)=\"handleRowDbClick($event)\"\n >\n @if (config().selectionMode === 'multiple') {\n <ax-select-column fixed=\"start\" [width]=\"'50px'\"></ax-select-column>\n }\n\n @for (col of config().columns; track col.name) {\n @if (col.visible) {\n <axp-widget-column-renderer\n [expandHandler]=\"$index === 0 && config().parentField ? true : false\"\n [caption]=\"col.title | translate | async\"\n [node]=\"{\n path: col.dataPath || col.name,\n type: col.widget.type,\n options: col.widget.options,\n }\"\n >\n </axp-widget-column-renderer>\n }\n }\n </ax-data-table>\n </div>\n </div>\n</div>\n\n<ax-footer>\n <ax-suffix>\n <ax-button\n look=\"solid\"\n [text]=\"('@general:actions.close.title' | translate | async)!\"\n (onClick)=\"handleCloseClick()\"\n >\n </ax-button>\n <ax-button\n look=\"solid\"\n color=\"primary\"\n [text]=\"('@general:actions.select.title' | translate | async)!\"\n (onClick)=\"handleSelectClick()\"\n [disabled]=\"allowSelect() === false\"\n >\n </ax-button>\n <!-- @if (config().allowCreate) {\n <ax-button\n look=\"solid\"\n color=\"primary\"\n [text]=\"'@general:actions.create.title' | translate | async\"\n (onClick)=\"handleCreateNewClick()\"\n >\n <ax-prefix>\n <ax-icon icon=\"fa-solid fa-add\"></ax-icon>\n </ax-prefix>\n </ax-button>\n } -->\n </ax-suffix>\n</ax-footer>\n", styles: [":host{display:block;height:100%}.ax-expand-handler{cursor:pointer;display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;margin-right:8px}.ax-expand-handler:hover{opacity:.8}.ax-expand-handler.ax-invisible{visibility:hidden}.ax-h-\\[50vh\\]{height:50vh}.ax-overflow-hidden{overflow:hidden}.ax-flex{display:flex}.ax-flex-col{flex-direction:column}.ax-gap-4{gap:1rem}.ax-p-4{padding:1rem}.ax-w-full{width:100%}.axp-data-selector{display:flex;flex-direction:column;height:100%;overflow:hidden}.axp-data-selector-header{display:flex;justify-content:space-between;align-items:center;padding:1rem;border-bottom:1px solid var(--border-color);background:var(--surface-color);flex-shrink:0}.axp-data-selector-header h3{margin:0;font-size:1.25rem;font-weight:600;color:var(--text-color)}.axp-data-selector-content{display:flex;flex:1;overflow:hidden}.axp-data-selector-content.with-category-filter .axp-main-data-area{flex:1;overflow:hidden}.axp-data-selector .axp-category-filter-panel{border-right:1px solid var(--border-color);padding:1rem;overflow-y:auto;background:var(--surface-color);flex-shrink:0}.axp-data-selector .axp-main-data-area{flex:1;overflow:hidden;padding:1rem;display:flex;flex-direction:column;gap:1rem}.axp-data-selector .axp-main-data-area .ax-data-table{flex:1;min-height:0}.axp-data-selector .axp-main-data-area .ax-search-box{width:100%}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXCommonModule }, { kind: "directive", type: i1$1.AXAutoFocusDirective, selector: "[axAutoFocus]", inputs: ["axAutoFocus", "axAutoFocusTime"] }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i5$1.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXFormModule }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i2$1.AXDecoratorClearButtonComponent, selector: "ax-clear-button", 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: AXDropdownButtonModule }, { kind: "ngmodule", type: AXDataTableModule }, { kind: "component", type: i4$3.AXDataTableComponent, selector: "ax-data-table", inputs: ["dataSource", "selectedRows", "parentField", "rowTemplate", "emptyTemplate", "noDataTemplate", "alternative", "showHeader", "fixedHeader", "showFooter", "fixedFooter", "itemHeight", "allowReordering", "paging", "fetchDataMode", "loading", "focusedRow"], outputs: ["selectedRowsChange", "focusedRowChange", "onRowClick", "onRowDbClick", "onColumnsOrderChanged", "onColumnSizeChanged", "onPageChanged"] }, { kind: "component", type: i4$3.AXRowSelectColumnComponent, selector: "ax-select-column", inputs: ["width", "caption", "fixed"] }, { kind: "ngmodule", type: AXSearchBoxModule }, { kind: "component", type: i4$2.AXSearchBoxComponent, selector: "ax-search-box", inputs: ["disabled", "readonly", "tabIndex", "placeholder", "value", "state", "name", "id", "look", "class", "delayTime", "type"], outputs: ["valueChange", "stateChange", "onValueChanged", "onBlur", "onFocus", "readonlyChange", "disabledChange", "onKeyDown", "onKeyUp", "onKeyPress"] }, { kind: "ngmodule", type: AXPWidgetCoreModule }, { kind: "component", type: i3$2.AXPWidgetColumnRendererComponent, selector: "axp-widget-column-renderer", inputs: ["caption", "customExpandIcon", "customCollapseIcon", "customWidth", "node", "footerTemplate", "expandHandler", "cellTemplate", "headerTemplate"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "ngmodule", type: AXBadgeModule }, { kind: "component", type: AXPCategoryTreeComponent, selector: "axp-category-tree", inputs: ["dataSource", "config", "actions", "events"], outputs: ["nodeClick", "nodeSelect", "nodeCreate", "nodeUpdate", "nodeDelete", "searchChange", "collapseChange"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "pipe", type: i5.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1206
1615
|
}
|
|
1207
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
1616
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPDataSelectorComponent, decorators: [{
|
|
1208
1617
|
type: Component,
|
|
1209
1618
|
args: [{ selector: 'axp-data-selector', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
1210
1619
|
CommonModule,
|
|
@@ -1215,10 +1624,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.8", ngImpor
|
|
|
1215
1624
|
AXDropdownButtonModule,
|
|
1216
1625
|
AXDataTableModule,
|
|
1217
1626
|
AXSearchBoxModule,
|
|
1218
|
-
|
|
1627
|
+
AXPWidgetCoreModule,
|
|
1219
1628
|
AXTranslationModule,
|
|
1220
1629
|
AXBadgeModule,
|
|
1221
|
-
|
|
1630
|
+
AXPCategoryTreeComponent,
|
|
1631
|
+
], inputs: [], template: "<div class=\"axp-data-selector\">\n <!-- Main Content Area -->\n <div class=\"axp-data-selector-content\" [class.with-category-filter]=\"config().categoryFilter?.enabled\">\n <!-- Category Filter Side Panel -->\n @if (config().categoryFilter?.enabled) {\n <div class=\"axp-category-filter-panel\" [style.width]=\"config().categoryFilter?.width || '300px'\">\n <axp-category-tree\n [dataSource]=\"config().categoryFilter!.dataSource\"\n [config]=\"categoryTreeConfig()\"\n [actions]=\"categoryTreeActions()\"\n (nodeClick)=\"handleCategoryFilterClick($event)\"\n >\n </axp-category-tree>\n </div>\n }\n\n <!-- Main Data Area -->\n <div class=\"axp-main-data-area\">\n @if (hasSearch()) {\n <div class=\"ax-w-full ax-mb-2\">\n <ax-search-box\n [placeholder]=\"searchPlaceholder()\"\n [value]=\"searchTerm\"\n (onValueChanged)=\"handleChangeSearchValue($event)\"\n [axAutoFocus]=\"true\"\n >\n <ax-clear-button></ax-clear-button>\n </ax-search-box>\n </div>\n }\n\n <ax-data-table\n #grid\n [showFooter]=\"false\"\n class=\"ax-h-[50vh]\"\n [paging]=\"true\"\n [loading]=\"{ enabled: true, animation: true }\"\n [dataSource]=\"config().dataSource\"\n [parentField]=\"config().parentField\"\n (selectedRowsChange)=\"handleSelectedRowsChange($event)\"\n (onRowClick)=\"handleRowClick($event)\"\n (onRowDbClick)=\"handleRowDbClick($event)\"\n >\n @if (config().selectionMode === 'multiple') {\n <ax-select-column fixed=\"start\" [width]=\"'50px'\"></ax-select-column>\n }\n\n @for (col of config().columns; track col.name) {\n @if (col.visible) {\n <axp-widget-column-renderer\n [expandHandler]=\"$index === 0 && config().parentField ? true : false\"\n [caption]=\"col.title | translate | async\"\n [node]=\"{\n path: col.dataPath || col.name,\n type: col.widget.type,\n options: col.widget.options,\n }\"\n >\n </axp-widget-column-renderer>\n }\n }\n </ax-data-table>\n </div>\n </div>\n</div>\n\n<ax-footer>\n <ax-suffix>\n <ax-button\n look=\"solid\"\n [text]=\"('@general:actions.close.title' | translate | async)!\"\n (onClick)=\"handleCloseClick()\"\n >\n </ax-button>\n <ax-button\n look=\"solid\"\n color=\"primary\"\n [text]=\"('@general:actions.select.title' | translate | async)!\"\n (onClick)=\"handleSelectClick()\"\n [disabled]=\"allowSelect() === false\"\n >\n </ax-button>\n <!-- @if (config().allowCreate) {\n <ax-button\n look=\"solid\"\n color=\"primary\"\n [text]=\"'@general:actions.create.title' | translate | async\"\n (onClick)=\"handleCreateNewClick()\"\n >\n <ax-prefix>\n <ax-icon icon=\"fa-solid fa-add\"></ax-icon>\n </ax-prefix>\n </ax-button>\n } -->\n </ax-suffix>\n</ax-footer>\n", styles: [":host{display:block;height:100%}.ax-expand-handler{cursor:pointer;display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;margin-right:8px}.ax-expand-handler:hover{opacity:.8}.ax-expand-handler.ax-invisible{visibility:hidden}.ax-h-\\[50vh\\]{height:50vh}.ax-overflow-hidden{overflow:hidden}.ax-flex{display:flex}.ax-flex-col{flex-direction:column}.ax-gap-4{gap:1rem}.ax-p-4{padding:1rem}.ax-w-full{width:100%}.axp-data-selector{display:flex;flex-direction:column;height:100%;overflow:hidden}.axp-data-selector-header{display:flex;justify-content:space-between;align-items:center;padding:1rem;border-bottom:1px solid var(--border-color);background:var(--surface-color);flex-shrink:0}.axp-data-selector-header h3{margin:0;font-size:1.25rem;font-weight:600;color:var(--text-color)}.axp-data-selector-content{display:flex;flex:1;overflow:hidden}.axp-data-selector-content.with-category-filter .axp-main-data-area{flex:1;overflow:hidden}.axp-data-selector .axp-category-filter-panel{border-right:1px solid var(--border-color);padding:1rem;overflow-y:auto;background:var(--surface-color);flex-shrink:0}.axp-data-selector .axp-main-data-area{flex:1;overflow:hidden;padding:1rem;display:flex;flex-direction:column;gap:1rem}.axp-data-selector .axp-main-data-area .ax-data-table{flex:1;min-height:0}.axp-data-selector .axp-main-data-area .ax-search-box{width:100%}\n"] }]
|
|
1222
1632
|
}] });
|
|
1223
1633
|
|
|
1224
1634
|
var dataSelector_component = /*#__PURE__*/Object.freeze({
|
|
@@ -1230,6 +1640,7 @@ class AXPDataSelectorService {
|
|
|
1230
1640
|
constructor() {
|
|
1231
1641
|
//#region ---- Services & Dependencies ----
|
|
1232
1642
|
this.popupService = inject(AXPopupService);
|
|
1643
|
+
this.expressionService = inject(AXPExpressionEvaluatorService);
|
|
1233
1644
|
}
|
|
1234
1645
|
//#endregion
|
|
1235
1646
|
//#region ---- Public Methods ----
|
|
@@ -1238,820 +1649,1169 @@ class AXPDataSelectorService {
|
|
|
1238
1649
|
*/
|
|
1239
1650
|
async open(config) {
|
|
1240
1651
|
const component = await Promise.resolve().then(function () { return dataSelector_component; }).then(c => c.AXPDataSelectorComponent);
|
|
1652
|
+
// Create a copy of config to avoid mutating the original
|
|
1653
|
+
const processedConfig = { ...config };
|
|
1654
|
+
// Evaluate filters if they exist
|
|
1655
|
+
if (processedConfig.filters) {
|
|
1656
|
+
processedConfig.filters = await this.expressionService.evaluate(processedConfig.filters);
|
|
1657
|
+
}
|
|
1241
1658
|
const result = await this.popupService.open(component, {
|
|
1242
|
-
title:
|
|
1659
|
+
title: processedConfig.title,
|
|
1660
|
+
size: processedConfig.categoryFilter?.enabled ?
|
|
1661
|
+
'lg'
|
|
1662
|
+
: (processedConfig.columns.length > 3 ? 'lg' : 'md'),
|
|
1243
1663
|
data: {
|
|
1244
|
-
config: signal(
|
|
1664
|
+
config: signal(processedConfig)
|
|
1245
1665
|
}
|
|
1246
1666
|
});
|
|
1247
1667
|
return result.data || null;
|
|
1248
1668
|
}
|
|
1249
1669
|
/**
|
|
1250
|
-
* Open data selector
|
|
1670
|
+
* Open data selector with category filter
|
|
1251
1671
|
*/
|
|
1252
|
-
async
|
|
1253
|
-
const
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
title: 'Title',
|
|
1260
|
-
visible: true,
|
|
1261
|
-
widget: {
|
|
1262
|
-
type: 'text',
|
|
1263
|
-
options: {}
|
|
1264
|
-
}
|
|
1265
|
-
},
|
|
1266
|
-
{
|
|
1267
|
-
name: 'description',
|
|
1268
|
-
title: 'Description',
|
|
1269
|
-
visible: true,
|
|
1270
|
-
widget: {
|
|
1271
|
-
type: 'text',
|
|
1272
|
-
options: {}
|
|
1273
|
-
}
|
|
1274
|
-
}
|
|
1275
|
-
],
|
|
1276
|
-
selectionMode: 'multiple',
|
|
1277
|
-
searchFields: ['title', 'description'],
|
|
1278
|
-
parentField: 'parentId',
|
|
1279
|
-
allowCreate: false
|
|
1672
|
+
async openWithCategoryFilter(config, categoryFilterConfig) {
|
|
1673
|
+
const enhancedConfig = {
|
|
1674
|
+
...config,
|
|
1675
|
+
categoryFilter: {
|
|
1676
|
+
enabled: true,
|
|
1677
|
+
...categoryFilterConfig
|
|
1678
|
+
}
|
|
1280
1679
|
};
|
|
1281
|
-
return this.open(
|
|
1680
|
+
return this.open(enhancedConfig);
|
|
1681
|
+
}
|
|
1682
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPDataSelectorService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1683
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPDataSelectorService, providedIn: 'root' }); }
|
|
1684
|
+
}
|
|
1685
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPDataSelectorService, decorators: [{
|
|
1686
|
+
type: Injectable,
|
|
1687
|
+
args: [{
|
|
1688
|
+
providedIn: 'root'
|
|
1689
|
+
}]
|
|
1690
|
+
}] });
|
|
1691
|
+
|
|
1692
|
+
class AXPWidgetPropertyViewerService {
|
|
1693
|
+
constructor() {
|
|
1694
|
+
//#region ---- Services & Dependencies ----
|
|
1695
|
+
this.popupService = inject(AXPopupService);
|
|
1696
|
+
}
|
|
1697
|
+
//#endregion
|
|
1698
|
+
//#region ---- Public Methods ----
|
|
1699
|
+
/**
|
|
1700
|
+
* Open widget property viewer popup
|
|
1701
|
+
*/
|
|
1702
|
+
async open(config) {
|
|
1703
|
+
const component = await Promise.resolve().then(function () { return widgetPropertyViewerPopup_component; }).then(c => c.AXPWidgetPropertyViewerPopupComponent);
|
|
1704
|
+
const result = await this.popupService.open(component, {
|
|
1705
|
+
title: config.title,
|
|
1706
|
+
size: config.size || 'lg',
|
|
1707
|
+
data: {
|
|
1708
|
+
widget: signal(config.widget),
|
|
1709
|
+
mode: signal(config.mode || 'simple')
|
|
1710
|
+
}
|
|
1711
|
+
});
|
|
1712
|
+
return result.data || null;
|
|
1282
1713
|
}
|
|
1283
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
1284
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.
|
|
1714
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPWidgetPropertyViewerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1715
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPWidgetPropertyViewerService, providedIn: 'root' }); }
|
|
1285
1716
|
}
|
|
1286
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
1717
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPWidgetPropertyViewerService, decorators: [{
|
|
1287
1718
|
type: Injectable,
|
|
1288
1719
|
args: [{
|
|
1289
1720
|
providedIn: 'root'
|
|
1290
1721
|
}]
|
|
1291
1722
|
}] });
|
|
1292
1723
|
|
|
1293
|
-
|
|
1724
|
+
//#endregion
|
|
1725
|
+
//#region ---- Conversion Utilities ----
|
|
1726
|
+
/**
|
|
1727
|
+
* Convert designer field to form field definition
|
|
1728
|
+
*/
|
|
1729
|
+
function convertDesignerFieldToFormField(field) {
|
|
1730
|
+
return {
|
|
1731
|
+
path: field.name,
|
|
1732
|
+
title: field.title,
|
|
1733
|
+
description: field.description,
|
|
1734
|
+
widget: field.widget,
|
|
1735
|
+
mode: field.mode,
|
|
1736
|
+
layout: field.layout,
|
|
1737
|
+
};
|
|
1738
|
+
}
|
|
1739
|
+
/**
|
|
1740
|
+
* Convert designer group to form group definition
|
|
1741
|
+
*/
|
|
1742
|
+
function convertDesignerGroupToFormGroup(group) {
|
|
1743
|
+
return {
|
|
1744
|
+
name: group.name,
|
|
1745
|
+
title: group.title,
|
|
1746
|
+
description: group.description,
|
|
1747
|
+
parameters: group.fields.map(convertDesignerFieldToFormField),
|
|
1748
|
+
mode: group.mode,
|
|
1749
|
+
};
|
|
1750
|
+
}
|
|
1751
|
+
/**
|
|
1752
|
+
* Convert designer state to form definition
|
|
1753
|
+
*/
|
|
1754
|
+
function convertDesignerStateToFormDefinition(state) {
|
|
1755
|
+
return {
|
|
1756
|
+
groups: state.groups.map(convertDesignerGroupToFormGroup),
|
|
1757
|
+
};
|
|
1758
|
+
}
|
|
1759
|
+
//#endregion
|
|
1760
|
+
|
|
1761
|
+
class AXPDynamicFormDesignerComponent {
|
|
1294
1762
|
constructor() {
|
|
1295
1763
|
//#region ---- Inputs ----
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
* Form context/model data
|
|
1302
|
-
*/
|
|
1303
|
-
this.context = input.required(...(ngDevMode ? [{ debugName: "context" }] : []));
|
|
1304
|
-
/**
|
|
1305
|
-
* Form appearance and density styling (normal, compact, spacious)
|
|
1306
|
-
*/
|
|
1307
|
-
this.layoutLook = input('normal', ...(ngDevMode ? [{ debugName: "layoutLook" }] : []));
|
|
1308
|
-
/**
|
|
1309
|
-
* Form layout direction and flow (vertical, horizontal, grid)
|
|
1310
|
-
*/
|
|
1311
|
-
this.layoutDirection = input('vertical', ...(ngDevMode ? [{ debugName: "layoutDirection" }] : []));
|
|
1312
|
-
/**
|
|
1313
|
-
* Custom layout configuration for form fields
|
|
1314
|
-
*/
|
|
1315
|
-
this.layoutConfig = input({
|
|
1316
|
-
positions: {
|
|
1317
|
-
default: { colSpan: 12 },
|
|
1318
|
-
md: { colSpan: 8 },
|
|
1319
|
-
lg: { colSpan: 6 },
|
|
1320
|
-
xl: { colSpan: 5 },
|
|
1321
|
-
xxl: { colSpan: 4 },
|
|
1322
|
-
},
|
|
1323
|
-
}, ...(ngDevMode ? [{ debugName: "layoutConfig" }] : []));
|
|
1764
|
+
// Form definition model for two-way binding
|
|
1765
|
+
this.formDefinition = model({ groups: [] }, ...(ngDevMode ? [{ debugName: "formDefinition" }] : []));
|
|
1766
|
+
this.readonly = input(false, ...(ngDevMode ? [{ debugName: "readonly" }] : []));
|
|
1767
|
+
// Flag to prevent external sync during internal updates
|
|
1768
|
+
this.isInternalUpdate = false;
|
|
1324
1769
|
//#endregion
|
|
1325
|
-
//#region ----
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
this.contextChange = output();
|
|
1330
|
-
/**
|
|
1331
|
-
* Emitted when context change is initiated
|
|
1332
|
-
*/
|
|
1333
|
-
this.contextInitiated = output();
|
|
1334
|
-
/**
|
|
1335
|
-
* Emitted when form becomes valid/invalid
|
|
1336
|
-
*/
|
|
1337
|
-
this.validityChange = output();
|
|
1770
|
+
//#region ---- Services & Dependencies ----
|
|
1771
|
+
this.widgetRegistry = inject(AXPWidgetRegistryService);
|
|
1772
|
+
this.formBuilderService = inject(AXPLayoutBuilderService);
|
|
1773
|
+
this.widgetPropertyViewerService = inject(AXPWidgetPropertyViewerService);
|
|
1338
1774
|
//#endregion
|
|
1339
|
-
//#region ---- Properties ----
|
|
1340
|
-
|
|
1341
|
-
this.
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1775
|
+
//#region ---- Class Properties ----
|
|
1776
|
+
// Designer state
|
|
1777
|
+
this.selectedFieldId = signal(null, ...(ngDevMode ? [{ debugName: "selectedFieldId" }] : []));
|
|
1778
|
+
// Internal designer state for UI management
|
|
1779
|
+
this.designerState = signal({ groups: [], mode: 'designer' }, ...(ngDevMode ? [{ debugName: "designerState" }] : []));
|
|
1780
|
+
// Field management - simplified approach
|
|
1781
|
+
// Available widgets filtered by FormElement group
|
|
1782
|
+
this.availableWidgets = computed(() => {
|
|
1783
|
+
return this.widgetRegistry
|
|
1784
|
+
.all()
|
|
1785
|
+
.filter((widget) => widget.groups?.includes(AXPWidgetGroupEnum.FormElement) && widget.type === 'editor')
|
|
1786
|
+
.map((widget) => ({
|
|
1787
|
+
name: widget.name,
|
|
1788
|
+
title: widget.title,
|
|
1789
|
+
icon: widget.icon,
|
|
1790
|
+
description: widget.description,
|
|
1791
|
+
type: widget.type,
|
|
1792
|
+
properties: widget.properties,
|
|
1793
|
+
}));
|
|
1794
|
+
}, ...(ngDevMode ? [{ debugName: "availableWidgets" }] : []));
|
|
1795
|
+
// Widget options for select box
|
|
1796
|
+
this.widgetOptions = computed(() => {
|
|
1797
|
+
return this.availableWidgets().map((w) => ({
|
|
1798
|
+
value: w.name,
|
|
1799
|
+
text: w.title,
|
|
1800
|
+
}));
|
|
1801
|
+
}, ...(ngDevMode ? [{ debugName: "widgetOptions" }] : []));
|
|
1802
|
+
// Get all fields from all groups
|
|
1803
|
+
this.getAllFields = computed(() => {
|
|
1804
|
+
const groups = this.designerState().groups || [];
|
|
1805
|
+
if (!groups || groups.length === 0)
|
|
1806
|
+
return [];
|
|
1807
|
+
return groups.flatMap((group) => group.fields);
|
|
1808
|
+
}, ...(ngDevMode ? [{ debugName: "getAllFields" }] : []));
|
|
1809
|
+
// Convert form definition to designer groups for template rendering
|
|
1810
|
+
this.designerGroups = computed(() => {
|
|
1811
|
+
const formDef = this.formDefinition();
|
|
1812
|
+
if (!formDef?.groups)
|
|
1813
|
+
return [];
|
|
1814
|
+
return formDef.groups.map((group) => ({
|
|
1815
|
+
id: `group-${group.name}`,
|
|
1816
|
+
name: group.name,
|
|
1817
|
+
title: group.title,
|
|
1818
|
+
description: group.description,
|
|
1819
|
+
mode: group.mode,
|
|
1820
|
+
fields: group.parameters.map((param) => ({
|
|
1821
|
+
id: `field-${param.path}`,
|
|
1822
|
+
name: param.path,
|
|
1823
|
+
title: param.title || '',
|
|
1824
|
+
description: param.description,
|
|
1825
|
+
widget: param.widget,
|
|
1826
|
+
mode: param.mode,
|
|
1827
|
+
layout: param.layout,
|
|
1828
|
+
})),
|
|
1829
|
+
}));
|
|
1830
|
+
}, ...(ngDevMode ? [{ debugName: "designerGroups" }] : []));
|
|
1346
1831
|
//#endregion
|
|
1347
|
-
//#region ----
|
|
1832
|
+
//#region ---- Effects ----
|
|
1348
1833
|
/**
|
|
1349
|
-
*
|
|
1834
|
+
* Effect to log form definition changes
|
|
1350
1835
|
*/
|
|
1351
|
-
this.
|
|
1836
|
+
this.logFormDefinitionChanges = effect(() => {
|
|
1837
|
+
const formDef = this.formDefinition();
|
|
1838
|
+
console.log('formDefinition changed to:', formDef);
|
|
1839
|
+
console.log('formDefinition groups details:', formDef.groups?.map((g) => ({ name: g.name })));
|
|
1840
|
+
}, ...(ngDevMode ? [{ debugName: "logFormDefinitionChanges" }] : []));
|
|
1352
1841
|
/**
|
|
1353
|
-
*
|
|
1842
|
+
* Effect to sync form definition model to designer state
|
|
1354
1843
|
*/
|
|
1355
|
-
this.
|
|
1356
|
-
const
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1844
|
+
this.syncModelToDesigner = effect(() => {
|
|
1845
|
+
const formDef = this.formDefinition();
|
|
1846
|
+
if (formDef && formDef.groups.length > 0) {
|
|
1847
|
+
if (!this.isInternalUpdate) {
|
|
1848
|
+
untracked(() => {
|
|
1849
|
+
console.log('syncModelToDesigner - syncing external changes:', formDef);
|
|
1850
|
+
this.setFormDefinition(formDef);
|
|
1851
|
+
});
|
|
1852
|
+
}
|
|
1853
|
+
else {
|
|
1854
|
+
console.log('syncModelToDesigner - BLOCKED internal update, flag is set');
|
|
1855
|
+
}
|
|
1364
1856
|
}
|
|
1365
|
-
|
|
1366
|
-
}, ...(ngDevMode ? [{ debugName: "hostClasses" }] : []));
|
|
1367
|
-
//#endregion
|
|
1368
|
-
//#region ---- Effects ----
|
|
1857
|
+
}, ...(ngDevMode ? [{ debugName: "syncModelToDesigner" }] : []));
|
|
1369
1858
|
/**
|
|
1370
|
-
* Effect to sync
|
|
1859
|
+
* Effect to sync designer state changes back to model
|
|
1371
1860
|
*/
|
|
1372
|
-
this
|
|
1373
|
-
const
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
if (form) {
|
|
1382
|
-
// You can add form status tracking here if needed
|
|
1383
|
-
this.container()?.builderService.setStatus(AXPPageStatus.Rendered);
|
|
1861
|
+
this.syncDesignerToModel = effect(() => {
|
|
1862
|
+
const designerState = this.designerState();
|
|
1863
|
+
const formDef = convertDesignerStateToFormDefinition(designerState);
|
|
1864
|
+
const currentModel = untracked(() => this.formDefinition());
|
|
1865
|
+
// Only update if there's a meaningful change
|
|
1866
|
+
if (!isEqual(formDef, currentModel)) {
|
|
1867
|
+
untracked(() => {
|
|
1868
|
+
this.formDefinition.set(formDef);
|
|
1869
|
+
});
|
|
1384
1870
|
}
|
|
1385
|
-
}, ...(ngDevMode ? [{ debugName: "
|
|
1871
|
+
}, ...(ngDevMode ? [{ debugName: "syncDesignerToModel" }] : []));
|
|
1386
1872
|
}
|
|
1387
1873
|
//#endregion
|
|
1388
|
-
//#region ----
|
|
1389
|
-
ngOnInit() {
|
|
1390
|
-
// Initialize internal context with input context
|
|
1391
|
-
this.internalContext.set(this.context() ?? {});
|
|
1392
|
-
}
|
|
1393
|
-
//#endregion
|
|
1394
|
-
//#region ---- Effects ----
|
|
1874
|
+
//#region ---- External API Methods ----
|
|
1395
1875
|
/**
|
|
1396
|
-
*
|
|
1876
|
+
* Get the current form definition (converted from designer state)
|
|
1397
1877
|
*/
|
|
1398
|
-
|
|
1878
|
+
getFormDefinition() {
|
|
1879
|
+
return convertDesignerStateToFormDefinition(this.designerState());
|
|
1880
|
+
}
|
|
1399
1881
|
/**
|
|
1400
|
-
*
|
|
1882
|
+
* Set the form definition (converted to designer state)
|
|
1401
1883
|
*/
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1884
|
+
setFormDefinition(definition) {
|
|
1885
|
+
const groups = definition.groups.map((group) => ({
|
|
1886
|
+
id: this.generateId(),
|
|
1887
|
+
name: group.name,
|
|
1888
|
+
title: group.title,
|
|
1889
|
+
description: group.description,
|
|
1890
|
+
mode: group.mode,
|
|
1891
|
+
fields: group.parameters.map((param) => ({
|
|
1892
|
+
id: this.generateId(),
|
|
1893
|
+
name: param.path,
|
|
1894
|
+
title: param.title || '',
|
|
1895
|
+
description: param.description,
|
|
1896
|
+
widget: param.widget,
|
|
1897
|
+
mode: param.mode,
|
|
1898
|
+
layout: param.layout,
|
|
1899
|
+
})),
|
|
1900
|
+
}));
|
|
1901
|
+
this.designerState.set({
|
|
1902
|
+
groups,
|
|
1903
|
+
mode: 'designer',
|
|
1904
|
+
});
|
|
1905
|
+
}
|
|
1405
1906
|
/**
|
|
1406
|
-
*
|
|
1907
|
+
* Add a new field to the form
|
|
1908
|
+
* @param field The field to add
|
|
1407
1909
|
*/
|
|
1408
|
-
|
|
1409
|
-
const
|
|
1410
|
-
|
|
1411
|
-
|
|
1910
|
+
addField(field) {
|
|
1911
|
+
const currentDefinition = this.formDefinition();
|
|
1912
|
+
const updatedGroups = [...(currentDefinition.groups || [])];
|
|
1913
|
+
if (updatedGroups.length === 0) {
|
|
1914
|
+
// Create default group if none exists
|
|
1915
|
+
updatedGroups.push({
|
|
1916
|
+
name: 'default-group',
|
|
1917
|
+
title: 'Default Group',
|
|
1918
|
+
parameters: [
|
|
1919
|
+
{
|
|
1920
|
+
path: field.name,
|
|
1921
|
+
title: field.title,
|
|
1922
|
+
description: field.description,
|
|
1923
|
+
widget: field.widget,
|
|
1924
|
+
mode: field.mode,
|
|
1925
|
+
layout: field.layout,
|
|
1926
|
+
},
|
|
1927
|
+
],
|
|
1928
|
+
});
|
|
1412
1929
|
}
|
|
1413
1930
|
else {
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1931
|
+
// Add to first group
|
|
1932
|
+
updatedGroups[0] = {
|
|
1933
|
+
...updatedGroups[0],
|
|
1934
|
+
parameters: [
|
|
1935
|
+
...updatedGroups[0].parameters,
|
|
1936
|
+
{
|
|
1937
|
+
path: field.name,
|
|
1938
|
+
title: field.title,
|
|
1939
|
+
description: field.description,
|
|
1940
|
+
widget: field.widget,
|
|
1941
|
+
mode: field.mode,
|
|
1942
|
+
layout: field.layout,
|
|
1943
|
+
},
|
|
1944
|
+
],
|
|
1945
|
+
};
|
|
1426
1946
|
}
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
/**
|
|
1438
|
-
* Get current form context
|
|
1439
|
-
*/
|
|
1440
|
-
getContext() {
|
|
1441
|
-
return this.internalContext();
|
|
1947
|
+
// Set flag to prevent external sync during internal update
|
|
1948
|
+
this.isInternalUpdate = true;
|
|
1949
|
+
this.formDefinition.set({
|
|
1950
|
+
...currentDefinition,
|
|
1951
|
+
groups: updatedGroups,
|
|
1952
|
+
});
|
|
1953
|
+
// Reset flag after a delay
|
|
1954
|
+
setTimeout(() => {
|
|
1955
|
+
this.isInternalUpdate = false;
|
|
1956
|
+
}, 100);
|
|
1442
1957
|
}
|
|
1443
1958
|
/**
|
|
1444
|
-
* Update
|
|
1959
|
+
* Update an existing field
|
|
1960
|
+
* @param fieldId The ID of the field to update
|
|
1961
|
+
* @param updates The updates to apply
|
|
1445
1962
|
*/
|
|
1446
|
-
|
|
1447
|
-
this.
|
|
1963
|
+
updateField(fieldId, updates) {
|
|
1964
|
+
const currentDefinition = this.formDefinition();
|
|
1965
|
+
const updatedGroups = currentDefinition.groups.map((group) => ({
|
|
1966
|
+
...group,
|
|
1967
|
+
parameters: group.parameters.map((param) => param.path === fieldId
|
|
1968
|
+
? {
|
|
1969
|
+
...param,
|
|
1970
|
+
title: updates.title ?? param.title,
|
|
1971
|
+
description: updates.description ?? param.description,
|
|
1972
|
+
widget: updates.widget ?? param.widget,
|
|
1973
|
+
mode: updates.mode ?? param.mode,
|
|
1974
|
+
layout: updates.layout ?? param.layout,
|
|
1975
|
+
}
|
|
1976
|
+
: param),
|
|
1977
|
+
}));
|
|
1978
|
+
// Set flag to prevent external sync during internal update
|
|
1979
|
+
this.isInternalUpdate = true;
|
|
1980
|
+
this.formDefinition.set({
|
|
1981
|
+
...currentDefinition,
|
|
1982
|
+
groups: updatedGroups,
|
|
1983
|
+
});
|
|
1984
|
+
// Reset flag after a delay
|
|
1985
|
+
setTimeout(() => {
|
|
1986
|
+
this.isInternalUpdate = false;
|
|
1987
|
+
}, 100);
|
|
1448
1988
|
}
|
|
1449
1989
|
/**
|
|
1450
|
-
*
|
|
1990
|
+
* Remove a field from the form
|
|
1991
|
+
* @param fieldId The ID of the field to remove
|
|
1451
1992
|
*/
|
|
1452
|
-
|
|
1453
|
-
const
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.8", type: AXPDynamicFormComponent, isStandalone: true, selector: "axp-dynamic-form", inputs: { formDefinition: { classPropertyName: "formDefinition", publicName: "formDefinition", isSignal: true, isRequired: true, transformFunction: null }, context: { classPropertyName: "context", publicName: "context", isSignal: true, isRequired: true, transformFunction: null }, layoutLook: { classPropertyName: "layoutLook", publicName: "layoutLook", isSignal: true, isRequired: false, transformFunction: null }, layoutDirection: { classPropertyName: "layoutDirection", publicName: "layoutDirection", isSignal: true, isRequired: false, transformFunction: null }, layoutConfig: { classPropertyName: "layoutConfig", publicName: "layoutConfig", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { contextChange: "contextChange", contextInitiated: "contextInitiated", validityChange: "validityChange" }, host: { properties: { "class": "hostClasses()" }, classAttribute: "axp-dynamic-form" }, viewQueries: [{ propertyName: "form", first: true, predicate: AXFormComponent, descendants: true, isSignal: true }, { propertyName: "container", first: true, predicate: AXPWidgetContainerComponent, descendants: true, isSignal: true }], ngImport: i0, template: "<ax-form>\n <axp-widgets-container [context]=\"internalContext()\" (onContextChanged)=\"handleContextChanged($event)\">\n <axp-layout-sections>\n @for (group of formDefinition().groups; track group.name) {\n <axp-layout-section>\n @if (group.title || group.description) {\n <axp-layout-header>\n <axp-layout-title>{{ group.title }}</axp-layout-title>\n @if (group.description) {\n <axp-layout-description>{{ group.description }}</axp-layout-description>\n }\n </axp-layout-header>\n }\n <axp-layout-content>\n @for (param of group.parameters; track param.path) {\n <div class=\"__field-container\">\n <ax-form-field class=\"__field-input\" [gridLayout]=\"computedLayout()\">\n <ax-label [required]=\"isRequired(param)\">{{ param.title! | translate | async }}</ax-label>\n <ng-container axp-widget-renderer [node]=\"param.widget\" [mode]=\"'edit'\"></ng-container>\n @if (param.description) {\n <axp-layout-description>{{ param.description! | translate | async }}</axp-layout-description>\n }\n </ax-form-field>\n </div>\n }\n </axp-layout-content>\n </axp-layout-section>\n } @empty {\n <axp-layout-section>\n <axp-layout-content>\n <div class=\"__empty-state\">\n <axp-layout-description>No form definition provided</axp-layout-description>\n </div>\n </axp-layout-content>\n </axp-layout-section>\n }\n </axp-layout-sections>\n </axp-widgets-container>\n</ax-form>\n", styles: [".axp-dynamic-form{width:100%}.axp-dynamic-form axp-layout-section axp-layout-content{display:flex;width:100%;flex-direction:column}.axp-dynamic-form axp-layout-section axp-layout-content>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse));border-style:dashed;--tw-divide-opacity: 1;border-color:rgba(var(--ax-sys-color-border-lightest-surface),var(--tw-divide-opacity, 1))}.axp-dynamic-form axp-layout-section axp-layout-content .__field-container{align-items:center;gap:1rem;padding:1rem}@media (min-width: 1024px){.axp-dynamic-form axp-layout-section axp-layout-content .__field-container{padding-left:1.5rem;padding-right:1.5rem}}@media (min-width: 1280px){.axp-dynamic-form axp-layout-section axp-layout-content .__field-container{padding-left:2rem;padding-right:2rem}}@media (min-width: 1536px){.axp-dynamic-form axp-layout-section axp-layout-content .__field-container{padding-left:2.5rem;padding-right:2.5rem}}.axp-dynamic-form axp-layout-section axp-layout-content .__field-container{display:grid;grid-template-columns:repeat(12,minmax(0,1fr))}.axp-dynamic-form axp-layout-section axp-layout-content .__field-container .__field-info{grid-column:span 12 / span 12}@media (min-width: 768px){.axp-dynamic-form axp-layout-section axp-layout-content .__field-container .__field-info{grid-column:span 4 / span 4}}@media (min-width: 1024px){.axp-dynamic-form axp-layout-section axp-layout-content .__field-container .__field-info{grid-column:span 4 / span 4}}@media (min-width: 1536px){.axp-dynamic-form axp-layout-section axp-layout-content .__field-container .__field-info{grid-column:span 3 / span 3}}.axp-dynamic-form axp-layout-section axp-layout-content .__field-container axp-layout-description{margin-top:.5rem!important;font-size:.75rem!important;line-height:1rem!important}.axp-dynamic-form.--look-compact axp-layout-section axp-layout-content>:not([hidden])~:not([hidden]){border-style:none}.axp-dynamic-form.--look-compact axp-layout-section axp-layout-content .__field-container{display:flex;flex-direction:column;gap:.25rem;padding:.25rem .5rem;margin-bottom:.5rem;border-width:0px}.axp-dynamic-form.--look-compact axp-layout-section axp-layout-content .__field-container .__field-info{margin-bottom:.125rem;width:100%}.axp-dynamic-form.--look-compact axp-layout-section axp-layout-content .__field-container .__field-info axp-layout-title{font-size:.875rem;line-height:1.25rem;font-weight:500}.axp-dynamic-form.--look-compact axp-layout-section axp-layout-content .__field-container .__field-input{width:100%}.axp-dynamic-form.--look-compact axp-layout-section axp-layout-content .__field-container axp-layout-description{margin-top:.125rem!important;font-size:.75rem!important;line-height:1rem!important;opacity:.75!important}.axp-dynamic-form.--look-compact axp-layout-section{margin-bottom:.75rem}.axp-dynamic-form.--look-compact axp-layout-section axp-layout-header{margin-bottom:.5rem;gap:0px;padding:.5rem}.axp-dynamic-form.--look-compact axp-layout-section axp-layout-header axp-layout-title{font-size:1rem;line-height:1.5rem;font-weight:600}.axp-dynamic-form.--look-compact axp-layout-section axp-layout-header axp-layout-description{margin-top:.25rem;font-size:.75rem;line-height:1rem;opacity:.75}.axp-dynamic-form.--look-borderless axp-layout-section{border-width:0px!important;--tw-shadow: 0 0 #0000 !important;--tw-shadow-colored: 0 0 #0000 !important;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)!important}.axp-dynamic-form.--look-borderless axp-layout-section axp-layout-content>:not([hidden])~:not([hidden]){border-style:none}.axp-dynamic-form.--look-borderless axp-layout-section axp-layout-content .__field-container{display:flex;flex-direction:column;gap:.25rem;padding:.25rem .5rem;margin-bottom:.5rem;border-width:0px}.axp-dynamic-form.--look-borderless axp-layout-section axp-layout-content .__field-container .__field-info{margin-bottom:.125rem;width:100%}.axp-dynamic-form.--look-borderless axp-layout-section axp-layout-content .__field-container .__field-info axp-layout-title{font-size:.875rem;line-height:1.25rem;font-weight:500}.axp-dynamic-form.--look-borderless axp-layout-section axp-layout-content .__field-container .__field-input{width:100%}.axp-dynamic-form.--look-borderless axp-layout-section axp-layout-content .__field-container axp-layout-description{margin-top:.125rem!important;font-size:.75rem!important;line-height:1rem!important;opacity:.75!important}.axp-dynamic-form.--direction-vertical axp-layout-section axp-layout-content .__field-container{display:flex;flex-direction:column;align-items:flex-start;gap:.75rem}.axp-dynamic-form.--direction-vertical axp-layout-section axp-layout-content .__field-container .__field-info{grid-column:span 12 / span 12;width:100%}.axp-dynamic-form.--direction-vertical axp-layout-section axp-layout-content .__field-container .__field-input{grid-column:span 12 / span 12;width:100%}.axp-dynamic-form.--direction-vertical axp-layout-section axp-layout-content .__field-container axp-layout-description{margin-top:.25rem!important;font-size:.875rem!important;line-height:1.25rem!important}.axp-dynamic-form.--direction-horizontal axp-layout-section axp-layout-content>:not([hidden])~:not([hidden]){border-style:none}.axp-dynamic-form.--direction-horizontal axp-layout-section axp-layout-content .__field-container{display:flex;flex-direction:row;align-items:center;gap:1rem;padding-top:.75rem;padding-bottom:.75rem}.axp-dynamic-form.--direction-horizontal axp-layout-section axp-layout-content .__field-container .__field-info{width:12rem;flex-shrink:0}.axp-dynamic-form.--direction-horizontal axp-layout-section axp-layout-content .__field-container .__field-info axp-layout-title{margin-bottom:.25rem;font-size:.875rem;line-height:1.25rem;font-weight:500}.axp-dynamic-form.--direction-horizontal axp-layout-section axp-layout-content .__field-container .__field-input{flex:1 1 0%}.axp-dynamic-form.--direction-horizontal axp-layout-section axp-layout-content .__field-container axp-layout-description{margin-top:.25rem!important;font-size:.75rem!important;line-height:1rem!important;opacity:.75!important}.axp-dynamic-form.--direction-grid axp-layout-section axp-layout-content .__field-container{display:grid;grid-template-columns:repeat(1,minmax(0,1fr))}@media (min-width: 768px){.axp-dynamic-form.--direction-grid axp-layout-section axp-layout-content .__field-container{grid-template-columns:repeat(2,minmax(0,1fr))}}@media (min-width: 1024px){.axp-dynamic-form.--direction-grid axp-layout-section axp-layout-content .__field-container{grid-template-columns:repeat(3,minmax(0,1fr))}}@media (min-width: 1280px){.axp-dynamic-form.--direction-grid axp-layout-section axp-layout-content .__field-container{grid-template-columns:repeat(4,minmax(0,1fr))}}.axp-dynamic-form.--direction-grid axp-layout-section axp-layout-content .__field-container{gap:1rem;padding:1rem}.axp-dynamic-form.--direction-grid axp-layout-section axp-layout-content .__field-container .__field-info{grid-column:1 / -1}.axp-dynamic-form.--direction-grid axp-layout-section axp-layout-content .__field-container .__field-input{grid-column:1 / -1}.axp-dynamic-form .__empty-state{display:flex;flex-direction:column;align-items:center;justify-content:center;padding-top:2rem;padding-bottom:2rem;text-align:center}.axp-dynamic-form .__empty-state .__message{font-size:.875rem;line-height:1.25rem;--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type:
|
|
1463
|
-
// ACoreX
|
|
1464
|
-
AXFormModule }, { kind: "component", type: i2$2.AXFormFieldComponent, selector: "ax-form-field", inputs: ["labelMode"] }, { kind: "component", type: i2$2.AXFormComponent, selector: "ax-form", inputs: ["labelMode", "look", "messageStyle", "updateOn"], outputs: ["onValidate", "updateOnChange"] }, { kind: "ngmodule", type: AXValidationModule }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "ngmodule", type:
|
|
1465
|
-
// Platform
|
|
1466
|
-
AXPLayoutBuilderModule }, { kind: "component", type: i3$4.AXPWidgetContainerComponent, selector: "axp-widgets-container", inputs: ["context", "functions"], outputs: ["onContextChanged"] }, { kind: "directive", type: i3$4.AXPWidgetRendererDirective, selector: "[axp-widget-renderer]", inputs: ["parentNode", "index", "mode", "node"], outputs: ["onOptionsChanged", "onValueChanged"], exportAs: ["widgetRenderer"] }, { kind: "component", type: AXPThemeLayoutBlockComponent, selector: "\n\n axp-page-content, \n axp-page-footer-container,\n axp-page-footer,\n axp-page-header,\n axp-page-header-container,\n axp-page-toolbar,\n\n axp-layout-content, \n axp-layout-page-content, \n\n axp-layout-sections,\n axp-layout-body,\n axp-layout-page-body,\n axp-layout-prefix,\n axp-layout-suffix,\n axp-layout-title-bar,\n axp-layout-title, \n axp-layout-title-actions, \n axp-layout-nav-button, \n axp-layout-description, \n axp-layout-breadcrumbs,\n axp-layout-list-action,\n " }, { kind: "component", type: AXPThemeLayoutHeaderComponent, selector: "axp-layout-header" }, { kind: "component", type: AXPThemeLayoutSectionComponent, selector: "axp-layout-section" }, { kind: "directive", type: AXPGridLayoutDirective, selector: "[gridLayout]", inputs: ["gridLayout"] }, { kind: "component", type: AXLabelComponent, selector: "ax-label", inputs: ["required", "for"], outputs: ["requiredChange"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "pipe", type: i5.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
1467
|
-
}
|
|
1468
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPDynamicFormComponent, decorators: [{
|
|
1469
|
-
type: Component,
|
|
1470
|
-
args: [{ standalone: true, selector: 'axp-dynamic-form', imports: [
|
|
1471
|
-
CommonModule,
|
|
1472
|
-
FormsModule,
|
|
1473
|
-
// ACoreX
|
|
1474
|
-
AXFormModule,
|
|
1475
|
-
AXValidationModule,
|
|
1476
|
-
AXTranslationModule,
|
|
1477
|
-
// Platform
|
|
1478
|
-
AXPLayoutBuilderModule,
|
|
1479
|
-
AXPThemeLayoutBlockComponent,
|
|
1480
|
-
AXPThemeLayoutHeaderComponent,
|
|
1481
|
-
AXPThemeLayoutSectionComponent,
|
|
1482
|
-
AXPGridLayoutDirective,
|
|
1483
|
-
AXLabelComponent
|
|
1484
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
|
|
1485
|
-
class: 'axp-dynamic-form',
|
|
1486
|
-
'[class]': 'hostClasses()',
|
|
1487
|
-
}, template: "<ax-form>\n <axp-widgets-container [context]=\"internalContext()\" (onContextChanged)=\"handleContextChanged($event)\">\n <axp-layout-sections>\n @for (group of formDefinition().groups; track group.name) {\n <axp-layout-section>\n @if (group.title || group.description) {\n <axp-layout-header>\n <axp-layout-title>{{ group.title }}</axp-layout-title>\n @if (group.description) {\n <axp-layout-description>{{ group.description }}</axp-layout-description>\n }\n </axp-layout-header>\n }\n <axp-layout-content>\n @for (param of group.parameters; track param.path) {\n <div class=\"__field-container\">\n <ax-form-field class=\"__field-input\" [gridLayout]=\"computedLayout()\">\n <ax-label [required]=\"isRequired(param)\">{{ param.title! | translate | async }}</ax-label>\n <ng-container axp-widget-renderer [node]=\"param.widget\" [mode]=\"'edit'\"></ng-container>\n @if (param.description) {\n <axp-layout-description>{{ param.description! | translate | async }}</axp-layout-description>\n }\n </ax-form-field>\n </div>\n }\n </axp-layout-content>\n </axp-layout-section>\n } @empty {\n <axp-layout-section>\n <axp-layout-content>\n <div class=\"__empty-state\">\n <axp-layout-description>No form definition provided</axp-layout-description>\n </div>\n </axp-layout-content>\n </axp-layout-section>\n }\n </axp-layout-sections>\n </axp-widgets-container>\n</ax-form>\n", styles: [".axp-dynamic-form{width:100%}.axp-dynamic-form axp-layout-section axp-layout-content{display:flex;width:100%;flex-direction:column}.axp-dynamic-form axp-layout-section axp-layout-content>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse));border-style:dashed;--tw-divide-opacity: 1;border-color:rgba(var(--ax-sys-color-border-lightest-surface),var(--tw-divide-opacity, 1))}.axp-dynamic-form axp-layout-section axp-layout-content .__field-container{align-items:center;gap:1rem;padding:1rem}@media (min-width: 1024px){.axp-dynamic-form axp-layout-section axp-layout-content .__field-container{padding-left:1.5rem;padding-right:1.5rem}}@media (min-width: 1280px){.axp-dynamic-form axp-layout-section axp-layout-content .__field-container{padding-left:2rem;padding-right:2rem}}@media (min-width: 1536px){.axp-dynamic-form axp-layout-section axp-layout-content .__field-container{padding-left:2.5rem;padding-right:2.5rem}}.axp-dynamic-form axp-layout-section axp-layout-content .__field-container{display:grid;grid-template-columns:repeat(12,minmax(0,1fr))}.axp-dynamic-form axp-layout-section axp-layout-content .__field-container .__field-info{grid-column:span 12 / span 12}@media (min-width: 768px){.axp-dynamic-form axp-layout-section axp-layout-content .__field-container .__field-info{grid-column:span 4 / span 4}}@media (min-width: 1024px){.axp-dynamic-form axp-layout-section axp-layout-content .__field-container .__field-info{grid-column:span 4 / span 4}}@media (min-width: 1536px){.axp-dynamic-form axp-layout-section axp-layout-content .__field-container .__field-info{grid-column:span 3 / span 3}}.axp-dynamic-form axp-layout-section axp-layout-content .__field-container axp-layout-description{margin-top:.5rem!important;font-size:.75rem!important;line-height:1rem!important}.axp-dynamic-form.--look-compact axp-layout-section axp-layout-content>:not([hidden])~:not([hidden]){border-style:none}.axp-dynamic-form.--look-compact axp-layout-section axp-layout-content .__field-container{display:flex;flex-direction:column;gap:.25rem;padding:.25rem .5rem;margin-bottom:.5rem;border-width:0px}.axp-dynamic-form.--look-compact axp-layout-section axp-layout-content .__field-container .__field-info{margin-bottom:.125rem;width:100%}.axp-dynamic-form.--look-compact axp-layout-section axp-layout-content .__field-container .__field-info axp-layout-title{font-size:.875rem;line-height:1.25rem;font-weight:500}.axp-dynamic-form.--look-compact axp-layout-section axp-layout-content .__field-container .__field-input{width:100%}.axp-dynamic-form.--look-compact axp-layout-section axp-layout-content .__field-container axp-layout-description{margin-top:.125rem!important;font-size:.75rem!important;line-height:1rem!important;opacity:.75!important}.axp-dynamic-form.--look-compact axp-layout-section{margin-bottom:.75rem}.axp-dynamic-form.--look-compact axp-layout-section axp-layout-header{margin-bottom:.5rem;gap:0px;padding:.5rem}.axp-dynamic-form.--look-compact axp-layout-section axp-layout-header axp-layout-title{font-size:1rem;line-height:1.5rem;font-weight:600}.axp-dynamic-form.--look-compact axp-layout-section axp-layout-header axp-layout-description{margin-top:.25rem;font-size:.75rem;line-height:1rem;opacity:.75}.axp-dynamic-form.--look-borderless axp-layout-section{border-width:0px!important;--tw-shadow: 0 0 #0000 !important;--tw-shadow-colored: 0 0 #0000 !important;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)!important}.axp-dynamic-form.--look-borderless axp-layout-section axp-layout-content>:not([hidden])~:not([hidden]){border-style:none}.axp-dynamic-form.--look-borderless axp-layout-section axp-layout-content .__field-container{display:flex;flex-direction:column;gap:.25rem;padding:.25rem .5rem;margin-bottom:.5rem;border-width:0px}.axp-dynamic-form.--look-borderless axp-layout-section axp-layout-content .__field-container .__field-info{margin-bottom:.125rem;width:100%}.axp-dynamic-form.--look-borderless axp-layout-section axp-layout-content .__field-container .__field-info axp-layout-title{font-size:.875rem;line-height:1.25rem;font-weight:500}.axp-dynamic-form.--look-borderless axp-layout-section axp-layout-content .__field-container .__field-input{width:100%}.axp-dynamic-form.--look-borderless axp-layout-section axp-layout-content .__field-container axp-layout-description{margin-top:.125rem!important;font-size:.75rem!important;line-height:1rem!important;opacity:.75!important}.axp-dynamic-form.--direction-vertical axp-layout-section axp-layout-content .__field-container{display:flex;flex-direction:column;align-items:flex-start;gap:.75rem}.axp-dynamic-form.--direction-vertical axp-layout-section axp-layout-content .__field-container .__field-info{grid-column:span 12 / span 12;width:100%}.axp-dynamic-form.--direction-vertical axp-layout-section axp-layout-content .__field-container .__field-input{grid-column:span 12 / span 12;width:100%}.axp-dynamic-form.--direction-vertical axp-layout-section axp-layout-content .__field-container axp-layout-description{margin-top:.25rem!important;font-size:.875rem!important;line-height:1.25rem!important}.axp-dynamic-form.--direction-horizontal axp-layout-section axp-layout-content>:not([hidden])~:not([hidden]){border-style:none}.axp-dynamic-form.--direction-horizontal axp-layout-section axp-layout-content .__field-container{display:flex;flex-direction:row;align-items:center;gap:1rem;padding-top:.75rem;padding-bottom:.75rem}.axp-dynamic-form.--direction-horizontal axp-layout-section axp-layout-content .__field-container .__field-info{width:12rem;flex-shrink:0}.axp-dynamic-form.--direction-horizontal axp-layout-section axp-layout-content .__field-container .__field-info axp-layout-title{margin-bottom:.25rem;font-size:.875rem;line-height:1.25rem;font-weight:500}.axp-dynamic-form.--direction-horizontal axp-layout-section axp-layout-content .__field-container .__field-input{flex:1 1 0%}.axp-dynamic-form.--direction-horizontal axp-layout-section axp-layout-content .__field-container axp-layout-description{margin-top:.25rem!important;font-size:.75rem!important;line-height:1rem!important;opacity:.75!important}.axp-dynamic-form.--direction-grid axp-layout-section axp-layout-content .__field-container{display:grid;grid-template-columns:repeat(1,minmax(0,1fr))}@media (min-width: 768px){.axp-dynamic-form.--direction-grid axp-layout-section axp-layout-content .__field-container{grid-template-columns:repeat(2,minmax(0,1fr))}}@media (min-width: 1024px){.axp-dynamic-form.--direction-grid axp-layout-section axp-layout-content .__field-container{grid-template-columns:repeat(3,minmax(0,1fr))}}@media (min-width: 1280px){.axp-dynamic-form.--direction-grid axp-layout-section axp-layout-content .__field-container{grid-template-columns:repeat(4,minmax(0,1fr))}}.axp-dynamic-form.--direction-grid axp-layout-section axp-layout-content .__field-container{gap:1rem;padding:1rem}.axp-dynamic-form.--direction-grid axp-layout-section axp-layout-content .__field-container .__field-info{grid-column:1 / -1}.axp-dynamic-form.--direction-grid axp-layout-section axp-layout-content .__field-container .__field-input{grid-column:1 / -1}.axp-dynamic-form .__empty-state{display:flex;flex-direction:column;align-items:center;justify-content:center;padding-top:2rem;padding-bottom:2rem;text-align:center}.axp-dynamic-form .__empty-state .__message{font-size:.875rem;line-height:1.25rem;--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}\n"] }]
|
|
1488
|
-
}] });
|
|
1489
|
-
|
|
1490
|
-
class AXPDynamicDialogComponent extends AXBasePageComponent {
|
|
1491
|
-
constructor() {
|
|
1492
|
-
super(...arguments);
|
|
1493
|
-
this.dynamicForm = viewChild(AXPDynamicFormComponent, ...(ngDevMode ? [{ debugName: "dynamicForm" }] : []));
|
|
1494
|
-
this.isSubmitting = signal(false, ...(ngDevMode ? [{ debugName: "isSubmitting" }] : []));
|
|
1495
|
-
this.previousContext = signal({}, ...(ngDevMode ? [{ debugName: "previousContext" }] : []));
|
|
1496
|
-
this.formData = signal({}, ...(ngDevMode ? [{ debugName: "formData" }] : []));
|
|
1497
|
-
// This will be set by the popup service automatically
|
|
1498
|
-
this.dialogResult = null;
|
|
1499
|
-
this.isSubmittingFromDialog = false;
|
|
1500
|
-
this.callBack = () => { };
|
|
1501
|
-
//#region ---- Computed Properties ----
|
|
1502
|
-
/**
|
|
1503
|
-
* Form context for widget container
|
|
1504
|
-
*/
|
|
1505
|
-
this.formContext = computed(() => this.formData(), ...(ngDevMode ? [{ debugName: "formContext" }] : []));
|
|
1506
|
-
/**
|
|
1507
|
-
* Combined loading state from both signal and dialog
|
|
1508
|
-
*/
|
|
1509
|
-
this.isFormLoading = computed(() => this.isSubmitting() || this.isSubmittingFromDialog, ...(ngDevMode ? [{ debugName: "isFormLoading" }] : []));
|
|
1510
|
-
this.defaultLayout = () => ({
|
|
1511
|
-
positions: {
|
|
1512
|
-
default: { colSpan: 12 },
|
|
1513
|
-
md: { colSpan: 8 },
|
|
1514
|
-
lg: { colSpan: 6 },
|
|
1515
|
-
xl: { colSpan: 5 },
|
|
1516
|
-
xxl: { colSpan: 4 }
|
|
1517
|
-
}
|
|
1993
|
+
removeField(fieldId) {
|
|
1994
|
+
const currentDefinition = this.formDefinition();
|
|
1995
|
+
const updatedGroups = currentDefinition.groups.map((group) => ({
|
|
1996
|
+
...group,
|
|
1997
|
+
parameters: group.parameters.filter((param) => param.path !== fieldId),
|
|
1998
|
+
}));
|
|
1999
|
+
// Set flag to prevent external sync during internal update
|
|
2000
|
+
this.isInternalUpdate = true;
|
|
2001
|
+
this.formDefinition.set({
|
|
2002
|
+
...currentDefinition,
|
|
2003
|
+
groups: updatedGroups,
|
|
1518
2004
|
});
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
this.footerSuffixActions = computed(() => this.config.actions?.footer?.suffix || [], ...(ngDevMode ? [{ debugName: "footerSuffixActions" }] : []));
|
|
1524
|
-
this.hasFooterActions = computed(() => {
|
|
1525
|
-
const prefixActions = this.footerPrefixActions();
|
|
1526
|
-
const suffixActions = this.footerSuffixActions();
|
|
1527
|
-
return prefixActions.length > 0 || suffixActions.length > 0;
|
|
1528
|
-
}, ...(ngDevMode ? [{ debugName: "hasFooterActions" }] : []));
|
|
1529
|
-
this.hasVisibleFooterPrefixActions = computed(() => {
|
|
1530
|
-
const prefixFooterActions = this.footerPrefixActions();
|
|
1531
|
-
return prefixFooterActions.some((action) => action.visible != false);
|
|
1532
|
-
}, ...(ngDevMode ? [{ debugName: "hasVisibleFooterPrefixActions" }] : []));
|
|
1533
|
-
this.hasVisibleFooterSuffixActions = computed(() => {
|
|
1534
|
-
const suffixFooterActions = this.footerSuffixActions();
|
|
1535
|
-
return suffixFooterActions.some((action) => action.visible != false);
|
|
1536
|
-
}, ...(ngDevMode ? [{ debugName: "hasVisibleFooterSuffixActions" }] : []));
|
|
2005
|
+
// Reset flag after a delay
|
|
2006
|
+
setTimeout(() => {
|
|
2007
|
+
this.isInternalUpdate = false;
|
|
2008
|
+
}, 100);
|
|
1537
2009
|
}
|
|
1538
|
-
//#endregion
|
|
1539
|
-
//#region ---- Lifecycle Methods ----
|
|
1540
|
-
ngOnInit() {
|
|
1541
|
-
this.formData.set(this.config.context ?? {});
|
|
1542
|
-
}
|
|
1543
|
-
//#endregion
|
|
1544
|
-
//#region ---- Event Handlers ----
|
|
1545
|
-
handleContextInitiated(context) {
|
|
1546
|
-
this.previousContext.set(context);
|
|
1547
|
-
}
|
|
1548
|
-
handleContextChanged(context) {
|
|
1549
|
-
this.formData.set(context);
|
|
1550
|
-
}
|
|
1551
|
-
//#endregion
|
|
1552
|
-
//#region ---- Action Execution ----
|
|
1553
2010
|
/**
|
|
1554
|
-
*
|
|
2011
|
+
* Get all available widget types
|
|
1555
2012
|
*/
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
// Execute the command if provided
|
|
1559
|
-
await this.executeCommand(action.command);
|
|
1560
|
-
}
|
|
1561
|
-
else {
|
|
1562
|
-
// Handle custom action logic here
|
|
1563
|
-
const result = {
|
|
1564
|
-
context: this.formData(),
|
|
1565
|
-
action: action.name || action.title
|
|
1566
|
-
};
|
|
1567
|
-
this.close(result);
|
|
1568
|
-
}
|
|
2013
|
+
getAvailableWidgets() {
|
|
2014
|
+
return this.availableWidgets();
|
|
1569
2015
|
}
|
|
1570
2016
|
/**
|
|
1571
|
-
*
|
|
2017
|
+
* Add a new group to the form
|
|
2018
|
+
* @param group The group to add
|
|
1572
2019
|
*/
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
}
|
|
1595
|
-
// Call the callback with DialogRef
|
|
1596
|
-
this.callBack({
|
|
1597
|
-
close: (result) => {
|
|
1598
|
-
this.close(result);
|
|
1599
|
-
},
|
|
1600
|
-
context: () => {
|
|
1601
|
-
return this.formData();
|
|
1602
|
-
},
|
|
1603
|
-
action: () => {
|
|
1604
|
-
return result.action;
|
|
1605
|
-
},
|
|
1606
|
-
setLoading: (loading) => {
|
|
1607
|
-
this.isSubmitting.set(loading);
|
|
1608
|
-
}
|
|
2020
|
+
addGroup(group) {
|
|
2021
|
+
const currentDefinition = this.formDefinition();
|
|
2022
|
+
const updatedGroups = [...(currentDefinition.groups || [])];
|
|
2023
|
+
// Convert designer group to form group
|
|
2024
|
+
updatedGroups.push({
|
|
2025
|
+
name: group.name,
|
|
2026
|
+
title: group.title,
|
|
2027
|
+
description: group.description,
|
|
2028
|
+
parameters: group.fields.map((field) => ({
|
|
2029
|
+
path: field.name,
|
|
2030
|
+
title: field.title,
|
|
2031
|
+
description: field.description,
|
|
2032
|
+
widget: field.widget,
|
|
2033
|
+
mode: field.mode,
|
|
2034
|
+
layout: field.layout,
|
|
2035
|
+
})),
|
|
2036
|
+
mode: group.mode,
|
|
2037
|
+
});
|
|
2038
|
+
this.formDefinition.set({
|
|
2039
|
+
...currentDefinition,
|
|
2040
|
+
groups: updatedGroups,
|
|
1609
2041
|
});
|
|
1610
2042
|
}
|
|
1611
|
-
//#endregion
|
|
1612
|
-
//#region ---- Public Methods ----
|
|
1613
2043
|
/**
|
|
1614
|
-
*
|
|
2044
|
+
* Remove a group from the form
|
|
2045
|
+
* @param groupName The name of the group to remove
|
|
1615
2046
|
*/
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
}
|
|
1624
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPDynamicDialogComponent, decorators: [{
|
|
1625
|
-
type: Component,
|
|
1626
|
-
args: [{ selector: 'axp-dynamic-dialog', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
1627
|
-
CommonModule,
|
|
1628
|
-
//
|
|
1629
|
-
AXFormModule,
|
|
1630
|
-
AXValidationModule,
|
|
1631
|
-
AXPDynamicFormComponent,
|
|
1632
|
-
AXDecoratorModule,
|
|
1633
|
-
AXButtonModule,
|
|
1634
|
-
AXDropdownButtonModule,
|
|
1635
|
-
AXDropdownModule,
|
|
1636
|
-
AXLoadingModule,
|
|
1637
|
-
AXTranslationModule,
|
|
1638
|
-
], template: "<div class=\"ax-p-4\">\n <axp-dynamic-form\n [formDefinition]=\"config.formDefinition\"\n [context]=\"formContext()\"\n [layoutConfig]=\"config.layoutConfig || defaultLayout()\"\n [layoutLook]=\"'borderless'\"\n [layoutDirection]=\"'vertical'\"\n (contextChange)=\"handleContextChanged($event)\"\n (contextInitiated)=\"handleContextInitiated($event)\"\n >\n </axp-dynamic-form>\n</div>\n\n<ax-footer>\n <ax-prefix>\n <!-- Dynamic footer prefix actions -->\n @if (hasVisibleFooterPrefixActions()) {\n @for (action of footerPrefixActions(); track $index) {\n @if (action.visible != false) {\n <ax-button\n [disabled]=\"action.disabled || isFormLoading()\"\n [text]=\"(action.title | translate | async)!\"\n [look]=\"'outline'\"\n [color]=\"action.color\"\n (onClick)=\"executeAction(action)\"\n >\n <ax-prefix>\n <i class=\"{{ action.icon }}\"></i>\n </ax-prefix>\n @if (action?.items) {\n <ax-dropdown-panel #panel>\n <ax-button-item-list>\n @for (sub of action?.items; track $index) {\n @if (sub.visible != false) {\n <ax-button-item\n [text]=\"(sub.title | translate | async)!\"\n [color]=\"sub.color\"\n [disabled]=\"sub.disabled\"\n (onClick)=\"executeAction(sub)\"\n >\n <ax-prefix>\n <i class=\"fa-light {{ sub.icon }}\"></i>\n </ax-prefix>\n </ax-button-item>\n @if (sub.break) {\n <div class=\"ax-divider\"></div>\n }\n }\n }\n </ax-button-item-list>\n </ax-dropdown-panel>\n }\n </ax-button>\n }\n }\n }\n </ax-prefix>\n <ax-suffix>\n <!-- Dynamic footer suffix actions -->\n @if (hasFooterActions()) {\n <!-- Suffix actions -->\n @if (hasVisibleFooterSuffixActions()) {\n @for (action of footerSuffixActions(); track $index) {\n @if (action.visible != false) {\n <ax-button\n [disabled]=\"action.disabled || isFormLoading()\"\n [text]=\"(action.title | translate | async)!\"\n [look]=\"'solid'\"\n [color]=\"action.color\"\n (onClick)=\"executeAction(action)\"\n >\n @if (isFormLoading() && action.command?.name != 'cancel') {\n <ax-loading></ax-loading>\n }\n <ax-prefix>\n <i class=\"{{ action.icon }}\"></i>\n </ax-prefix>\n @if (action?.items) {\n <ax-dropdown-panel #panel>\n <ax-button-item-list>\n @for (sub of action?.items; track $index) {\n @if (sub.visible != false) {\n <ax-button-item\n [text]=\"(sub.title | translate | async)!\"\n [color]=\"sub.color\"\n [disabled]=\"sub.disabled\"\n (onClick)=\"executeAction(sub)\"\n >\n <ax-prefix>\n <i class=\"fa-light {{ sub.icon }}\"></i>\n </ax-prefix>\n </ax-button-item>\n @if (sub.break) {\n <div class=\"ax-divider\"></div>\n }\n }\n }\n </ax-button-item-list>\n </ax-dropdown-panel>\n }\n </ax-button>\n }\n }\n }\n }\n </ax-suffix>\n</ax-footer>\n" }]
|
|
1639
|
-
}], propDecorators: { config: [{
|
|
1640
|
-
type: Input,
|
|
1641
|
-
args: [{ required: true }]
|
|
1642
|
-
}] } });
|
|
1643
|
-
|
|
1644
|
-
var dynamicDialog_component = /*#__PURE__*/Object.freeze({
|
|
1645
|
-
__proto__: null,
|
|
1646
|
-
AXPDynamicDialogComponent: AXPDynamicDialogComponent
|
|
1647
|
-
});
|
|
1648
|
-
|
|
1649
|
-
class AXPDynamicDialogService {
|
|
1650
|
-
constructor() {
|
|
1651
|
-
this.popupService = inject(AXPopupService);
|
|
2047
|
+
removeGroup(groupName) {
|
|
2048
|
+
const currentDefinition = this.formDefinition();
|
|
2049
|
+
const updatedGroups = currentDefinition.groups.filter((group) => group.name !== groupName);
|
|
2050
|
+
this.formDefinition.set({
|
|
2051
|
+
...currentDefinition,
|
|
2052
|
+
groups: updatedGroups,
|
|
2053
|
+
});
|
|
1652
2054
|
}
|
|
1653
2055
|
/**
|
|
1654
|
-
*
|
|
1655
|
-
* @param
|
|
1656
|
-
* @
|
|
2056
|
+
* Reorder groups in the form
|
|
2057
|
+
* @param fromIndex Source index
|
|
2058
|
+
* @param toIndex Target index
|
|
1657
2059
|
*/
|
|
1658
|
-
|
|
1659
|
-
const
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
draggable: false,
|
|
1668
|
-
data: {
|
|
1669
|
-
config,
|
|
1670
|
-
dialogResult: null,
|
|
1671
|
-
isSubmittingFromDialog: false,
|
|
1672
|
-
callBack: (result) => {
|
|
1673
|
-
resolve(result);
|
|
1674
|
-
}
|
|
1675
|
-
}
|
|
1676
|
-
});
|
|
2060
|
+
reorderGroups(fromIndex, toIndex) {
|
|
2061
|
+
const currentDefinition = this.formDefinition();
|
|
2062
|
+
const updatedGroups = [...currentDefinition.groups];
|
|
2063
|
+
// Move group from one position to another
|
|
2064
|
+
const [movedGroup] = updatedGroups.splice(fromIndex, 1);
|
|
2065
|
+
updatedGroups.splice(toIndex, 0, movedGroup);
|
|
2066
|
+
this.formDefinition.set({
|
|
2067
|
+
...currentDefinition,
|
|
2068
|
+
groups: updatedGroups,
|
|
1677
2069
|
});
|
|
1678
2070
|
}
|
|
1679
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPDynamicDialogService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1680
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPDynamicDialogService, providedIn: 'root' }); }
|
|
1681
|
-
}
|
|
1682
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPDynamicDialogService, decorators: [{
|
|
1683
|
-
type: Injectable,
|
|
1684
|
-
args: [{
|
|
1685
|
-
providedIn: 'root'
|
|
1686
|
-
}]
|
|
1687
|
-
}] });
|
|
1688
|
-
|
|
1689
|
-
class AXPDynamicFormBuilderService {
|
|
1690
|
-
constructor() {
|
|
1691
|
-
//#region ---- Services & Dependencies ----
|
|
1692
|
-
this.dialogService = inject(AXPDynamicDialogService);
|
|
1693
|
-
}
|
|
1694
|
-
//#endregion
|
|
1695
|
-
//#region ---- Public Methods ----
|
|
1696
2071
|
/**
|
|
1697
|
-
*
|
|
2072
|
+
* Update an existing group
|
|
2073
|
+
* @param groupName The name of the group to update
|
|
2074
|
+
* @param updates The updates to apply
|
|
1698
2075
|
*/
|
|
1699
|
-
|
|
1700
|
-
|
|
2076
|
+
updateGroup(groupName, updates) {
|
|
2077
|
+
console.log('updateGroup called with:', { groupName, updates });
|
|
2078
|
+
const currentDefinition = this.formDefinition();
|
|
2079
|
+
console.log('Current definition before update:', currentDefinition);
|
|
2080
|
+
const updatedGroups = currentDefinition.groups.map((group) => {
|
|
2081
|
+
if (group.name === groupName) {
|
|
2082
|
+
const updatedGroup = {
|
|
2083
|
+
...group,
|
|
2084
|
+
title: updates.title ?? group.title,
|
|
2085
|
+
description: updates.description ?? group.description,
|
|
2086
|
+
mode: updates.mode ?? group.mode,
|
|
2087
|
+
};
|
|
2088
|
+
console.log('Updating group:', { original: group, updates, result: updatedGroup });
|
|
2089
|
+
return updatedGroup;
|
|
2090
|
+
}
|
|
2091
|
+
return group;
|
|
2092
|
+
});
|
|
2093
|
+
const newDefinition = {
|
|
2094
|
+
...currentDefinition,
|
|
2095
|
+
groups: updatedGroups,
|
|
2096
|
+
};
|
|
2097
|
+
console.log('New definition after update:', newDefinition);
|
|
2098
|
+
// Set flag to prevent external sync during internal update
|
|
2099
|
+
this.isInternalUpdate = true;
|
|
2100
|
+
console.log('Set isInternalUpdate flag to prevent external sync');
|
|
2101
|
+
this.formDefinition.set(newDefinition);
|
|
2102
|
+
// Reset flag after a longer delay to ensure all effects have processed
|
|
2103
|
+
setTimeout(() => {
|
|
2104
|
+
this.isInternalUpdate = false;
|
|
2105
|
+
console.log('Reset isInternalUpdate flag');
|
|
2106
|
+
}, 100);
|
|
1701
2107
|
}
|
|
1702
2108
|
/**
|
|
1703
|
-
*
|
|
2109
|
+
* Move a field to a different group
|
|
2110
|
+
* @param fieldName The name/path of the field to move
|
|
2111
|
+
* @param targetGroupName The name of the target group
|
|
1704
2112
|
*/
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
};
|
|
2113
|
+
moveFieldToGroup(fieldName, targetGroupName) {
|
|
2114
|
+
const currentDefinition = this.formDefinition();
|
|
2115
|
+
let fieldToMove = null;
|
|
2116
|
+
// Find and remove the field from its current group
|
|
2117
|
+
const updatedGroups = currentDefinition.groups.map((group) => {
|
|
2118
|
+
const fieldIndex = group.parameters.findIndex((param) => param.path === fieldName);
|
|
2119
|
+
if (fieldIndex !== -1) {
|
|
2120
|
+
fieldToMove = group.parameters[fieldIndex];
|
|
2121
|
+
return {
|
|
2122
|
+
...group,
|
|
2123
|
+
parameters: group.parameters.filter((_, index) => index !== fieldIndex),
|
|
2124
|
+
};
|
|
2125
|
+
}
|
|
2126
|
+
return group;
|
|
2127
|
+
});
|
|
2128
|
+
// Add the field to the target group
|
|
2129
|
+
if (fieldToMove) {
|
|
2130
|
+
const finalGroups = updatedGroups.map((group) => group.name === targetGroupName
|
|
2131
|
+
? {
|
|
2132
|
+
...group,
|
|
2133
|
+
parameters: [...group.parameters, fieldToMove],
|
|
2134
|
+
}
|
|
2135
|
+
: group);
|
|
2136
|
+
this.formDefinition.set({
|
|
2137
|
+
...currentDefinition,
|
|
2138
|
+
groups: finalGroups,
|
|
2139
|
+
});
|
|
2140
|
+
}
|
|
1734
2141
|
}
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
2142
|
+
//#endregion
|
|
2143
|
+
//#region ---- Event Handlers ----
|
|
2144
|
+
async handleAddGroupClick() {
|
|
2145
|
+
try {
|
|
2146
|
+
// Create dialog using new Layout Builder API
|
|
2147
|
+
const dialogRef = await this.formBuilderService
|
|
2148
|
+
.create()
|
|
2149
|
+
.dialog((dialog) => {
|
|
2150
|
+
dialog
|
|
2151
|
+
.setTitle('Add Group')
|
|
2152
|
+
.setSize('md')
|
|
2153
|
+
.setCloseButton(true)
|
|
2154
|
+
.setContext({ name: '', title: '', description: '' })
|
|
2155
|
+
.content((layoutBuilder) => {
|
|
2156
|
+
layoutBuilder.flex((flex) => {
|
|
2157
|
+
flex
|
|
2158
|
+
.setDirection('column')
|
|
2159
|
+
.setGap('16px')
|
|
2160
|
+
.formField('Group Name', (field) => {
|
|
2161
|
+
field.path('name');
|
|
2162
|
+
field.textBox({
|
|
2163
|
+
placeholder: 'Enter group name (used as identifier)',
|
|
2164
|
+
validations: [{ rule: 'required' }],
|
|
2165
|
+
});
|
|
2166
|
+
})
|
|
2167
|
+
.formField('Group Title', (field) => {
|
|
2168
|
+
field.path('title');
|
|
2169
|
+
field.textBox({
|
|
2170
|
+
placeholder: 'Enter group display title',
|
|
2171
|
+
});
|
|
2172
|
+
})
|
|
2173
|
+
.formField('Group Description', (field) => {
|
|
2174
|
+
field.path('description');
|
|
2175
|
+
field.largeTextBox({
|
|
2176
|
+
placeholder: 'Enter group description (optional)',
|
|
2177
|
+
rows: 3,
|
|
2178
|
+
});
|
|
2179
|
+
});
|
|
2180
|
+
});
|
|
2181
|
+
})
|
|
2182
|
+
.setActions((actions) => actions.cancel('@general:actions.cancel.title').submit('@general:actions.add.title'));
|
|
2183
|
+
})
|
|
2184
|
+
.show();
|
|
2185
|
+
// Get the form data from the dialog
|
|
2186
|
+
const formData = dialogRef.context();
|
|
2187
|
+
const action = dialogRef.action();
|
|
2188
|
+
// Close the dialog
|
|
2189
|
+
dialogRef.close();
|
|
2190
|
+
if (action !== 'cancel' && formData && formData.name) {
|
|
2191
|
+
// Create new group
|
|
2192
|
+
const newGroup = {
|
|
2193
|
+
id: this.generateId(),
|
|
2194
|
+
name: this.deriveGroupKey(formData.name),
|
|
2195
|
+
title: formData.title || formData.name,
|
|
2196
|
+
description: formData.description,
|
|
2197
|
+
fields: [],
|
|
2198
|
+
layout: {
|
|
2199
|
+
positions: {
|
|
2200
|
+
sm: { colSpan: 12 },
|
|
2201
|
+
md: { colSpan: 6 },
|
|
2202
|
+
lg: { colSpan: 4 },
|
|
2203
|
+
},
|
|
2204
|
+
},
|
|
2205
|
+
};
|
|
2206
|
+
this.addGroup(newGroup);
|
|
2207
|
+
}
|
|
2208
|
+
}
|
|
2209
|
+
catch (error) {
|
|
2210
|
+
console.error('Error adding group:', error);
|
|
1739
2211
|
}
|
|
1740
|
-
this.addGroup(groupBuilder.build());
|
|
1741
|
-
return this;
|
|
1742
2212
|
}
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
2213
|
+
async handleAddFieldToGroup(group) {
|
|
2214
|
+
try {
|
|
2215
|
+
// Create dialog using new Layout Builder API
|
|
2216
|
+
const dialogRef = await this.formBuilderService
|
|
2217
|
+
.create()
|
|
2218
|
+
.dialog((dialog) => {
|
|
2219
|
+
dialog
|
|
2220
|
+
.setTitle(`Add Field to ${group.title || group.name}`)
|
|
2221
|
+
.setSize('sm')
|
|
2222
|
+
.setCloseButton(true)
|
|
2223
|
+
.setContext({ title: '', widgetType: '' })
|
|
2224
|
+
.content((layoutBuilder) => {
|
|
2225
|
+
layoutBuilder.flex((flex) => {
|
|
2226
|
+
flex
|
|
2227
|
+
.setDirection('column')
|
|
2228
|
+
.setGap('16px')
|
|
2229
|
+
.formField('Field Title', (field) => {
|
|
2230
|
+
field.path('title');
|
|
2231
|
+
field.textBox({
|
|
2232
|
+
placeholder: 'Enter field title',
|
|
2233
|
+
validations: [{ rule: 'required' }],
|
|
2234
|
+
});
|
|
2235
|
+
})
|
|
2236
|
+
.formField('Widget Type', (field) => {
|
|
2237
|
+
field.path('widgetType');
|
|
2238
|
+
field.selectBox({
|
|
2239
|
+
valueField: 'value',
|
|
2240
|
+
textField: 'text',
|
|
2241
|
+
dataSource: this.widgetOptions(),
|
|
2242
|
+
placeholder: 'Select widget type',
|
|
2243
|
+
validations: [{ rule: 'required' }],
|
|
2244
|
+
});
|
|
2245
|
+
});
|
|
2246
|
+
});
|
|
2247
|
+
})
|
|
2248
|
+
.setActions((actions) => actions.cancel('@general:actions.cancel.title').submit('@general:actions.add.title'));
|
|
2249
|
+
})
|
|
2250
|
+
.show();
|
|
2251
|
+
// Get the form data from the dialog
|
|
2252
|
+
const formData = dialogRef.context();
|
|
2253
|
+
const action = dialogRef.action();
|
|
2254
|
+
// Close the dialog
|
|
2255
|
+
dialogRef.close();
|
|
2256
|
+
if (action !== 'cancel' && formData && formData.title && formData.widgetType) {
|
|
2257
|
+
// Extract the widget type value (it might be an object from select box)
|
|
2258
|
+
const widgetTypeValue = typeof formData.widgetType === 'string'
|
|
2259
|
+
? formData.widgetType
|
|
2260
|
+
: formData.widgetType?.value || formData.widgetType?.name;
|
|
2261
|
+
if (!widgetTypeValue) {
|
|
2262
|
+
console.error('Invalid widget type:', formData.widgetType);
|
|
2263
|
+
return;
|
|
2264
|
+
}
|
|
2265
|
+
// Create field with AXPWidgetNode structure
|
|
2266
|
+
const field = {
|
|
2267
|
+
id: this.generateId(),
|
|
2268
|
+
name: this.deriveKey(formData.title),
|
|
2269
|
+
title: formData.title,
|
|
2270
|
+
widget: {
|
|
2271
|
+
type: widgetTypeValue,
|
|
2272
|
+
name: this.deriveKey(formData.title),
|
|
2273
|
+
options: {
|
|
2274
|
+
// Add validations to widget options
|
|
2275
|
+
validations: [],
|
|
2276
|
+
},
|
|
2277
|
+
},
|
|
2278
|
+
layout: { positions: { sm: { colSpan: 12 } } }, // Default full width
|
|
2279
|
+
};
|
|
2280
|
+
this.addFieldToGroup(field, group.name);
|
|
2281
|
+
}
|
|
2282
|
+
}
|
|
2283
|
+
catch (error) {
|
|
2284
|
+
console.error('Error adding field to group:', error);
|
|
2285
|
+
}
|
|
1746
2286
|
}
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
2287
|
+
async handleFieldEdit(field) {
|
|
2288
|
+
try {
|
|
2289
|
+
// Use the existing widget property viewer service
|
|
2290
|
+
const result = await this.widgetPropertyViewerService.open({
|
|
2291
|
+
title: `Edit Field: ${field.title}`,
|
|
2292
|
+
widget: field.widget,
|
|
2293
|
+
mode: 'advanced',
|
|
2294
|
+
size: 'md',
|
|
2295
|
+
});
|
|
2296
|
+
if (result && result.values) {
|
|
2297
|
+
// Update the field with the new widget options
|
|
2298
|
+
this.updateField(field.name, {
|
|
2299
|
+
widget: {
|
|
2300
|
+
...field.widget,
|
|
2301
|
+
options: result.values.options || field.widget.options,
|
|
2302
|
+
},
|
|
2303
|
+
});
|
|
2304
|
+
}
|
|
2305
|
+
}
|
|
2306
|
+
catch (error) {
|
|
2307
|
+
console.error('Error editing field:', error);
|
|
2308
|
+
}
|
|
1750
2309
|
}
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
2310
|
+
handleFieldRemove(field) {
|
|
2311
|
+
// Call public method for external handling
|
|
2312
|
+
this.removeField(field.name);
|
|
1754
2313
|
}
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
2314
|
+
async handleGroupEdit(group) {
|
|
2315
|
+
// Similar to field edit but for group properties
|
|
2316
|
+
try {
|
|
2317
|
+
const dialogRef = await this.formBuilderService
|
|
2318
|
+
.create()
|
|
2319
|
+
.dialog((dialog) => {
|
|
2320
|
+
dialog
|
|
2321
|
+
.setTitle(`Edit Group: ${group.title || group.name}`)
|
|
2322
|
+
.setSize('md')
|
|
2323
|
+
.setCloseButton(true)
|
|
2324
|
+
.setContext({
|
|
2325
|
+
title: group.title || '',
|
|
2326
|
+
description: group.description || '',
|
|
2327
|
+
})
|
|
2328
|
+
.content((layoutBuilder) => {
|
|
2329
|
+
layoutBuilder.flex((flex) => {
|
|
2330
|
+
flex
|
|
2331
|
+
.setDirection('column')
|
|
2332
|
+
.setGap('16px')
|
|
2333
|
+
.formField('Group Title', (field) => {
|
|
2334
|
+
field.path('title');
|
|
2335
|
+
field.textBox({
|
|
2336
|
+
placeholder: 'Enter group display title',
|
|
2337
|
+
});
|
|
2338
|
+
})
|
|
2339
|
+
.formField('Group Description', (field) => {
|
|
2340
|
+
field.path('description');
|
|
2341
|
+
field.largeTextBox({
|
|
2342
|
+
placeholder: 'Enter group description (optional)',
|
|
2343
|
+
rows: 3,
|
|
2344
|
+
});
|
|
2345
|
+
});
|
|
2346
|
+
});
|
|
2347
|
+
})
|
|
2348
|
+
.setActions((actions) => actions.cancel('@general:actions.cancel.title').submit('@general:actions.save.title'));
|
|
2349
|
+
})
|
|
2350
|
+
.show();
|
|
2351
|
+
const formData = dialogRef.context();
|
|
2352
|
+
const action = dialogRef.action();
|
|
2353
|
+
dialogRef.close();
|
|
2354
|
+
if (action !== 'cancel' && formData) {
|
|
2355
|
+
this.updateGroup(group.name, {
|
|
2356
|
+
title: formData.title,
|
|
2357
|
+
description: formData.description,
|
|
2358
|
+
});
|
|
2359
|
+
}
|
|
2360
|
+
}
|
|
2361
|
+
catch (error) {
|
|
2362
|
+
console.error('Error editing group:', error);
|
|
2363
|
+
}
|
|
1759
2364
|
}
|
|
1760
|
-
|
|
1761
|
-
|
|
2365
|
+
async handleGroupLayoutEdit(group) {
|
|
2366
|
+
// Group layout editing is disabled - always use 12 columns
|
|
2367
|
+
// Focus is on field-level colSpan and colStart configuration
|
|
2368
|
+
console.log('Group layout editing is disabled. All groups use 12 columns by default.');
|
|
1762
2369
|
}
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
//#region ---- Group Builder Implementation ----
|
|
1766
|
-
class GroupBuilder {
|
|
1767
|
-
constructor(formBuilder, name) {
|
|
1768
|
-
this.formBuilder = formBuilder;
|
|
1769
|
-
this.groupState = {
|
|
1770
|
-
name: '',
|
|
1771
|
-
title: '',
|
|
1772
|
-
description: '',
|
|
1773
|
-
parameters: []
|
|
1774
|
-
};
|
|
1775
|
-
this.groupState.name = name;
|
|
2370
|
+
handleGroupRemove(group) {
|
|
2371
|
+
this.removeGroup(group.name);
|
|
1776
2372
|
}
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
2373
|
+
/**
|
|
2374
|
+
* Handle field layout editing
|
|
2375
|
+
*/
|
|
2376
|
+
async handleFieldLayoutEdit(field, group) {
|
|
2377
|
+
try {
|
|
2378
|
+
const currentLayout = field.layout || { positions: {} };
|
|
2379
|
+
// Create dialog using new Layout Builder API
|
|
2380
|
+
const dialogRef = await this.formBuilderService
|
|
2381
|
+
.create()
|
|
2382
|
+
.dialog((dialog) => {
|
|
2383
|
+
dialog
|
|
2384
|
+
.setTitle(`Field Layout Settings - ${field.title || field.name}`)
|
|
2385
|
+
.setSize('lg')
|
|
2386
|
+
.setCloseButton(true)
|
|
2387
|
+
.setContext({
|
|
2388
|
+
sm_colSpan: currentLayout.positions?.sm?.colSpan,
|
|
2389
|
+
sm_colStart: currentLayout.positions?.sm?.colStart,
|
|
2390
|
+
md_colSpan: currentLayout.positions?.md?.colSpan,
|
|
2391
|
+
md_colStart: currentLayout.positions?.md?.colStart,
|
|
2392
|
+
lg_colSpan: currentLayout.positions?.lg?.colSpan,
|
|
2393
|
+
lg_colStart: currentLayout.positions?.lg?.colStart,
|
|
2394
|
+
xl_colSpan: currentLayout.positions?.xl?.colSpan,
|
|
2395
|
+
xl_colStart: currentLayout.positions?.xl?.colStart,
|
|
2396
|
+
xxl_colSpan: currentLayout.positions?.xxl?.colSpan,
|
|
2397
|
+
xxl_colStart: currentLayout.positions?.xxl?.colStart,
|
|
2398
|
+
xxxl_colSpan: currentLayout.positions?.xxxl?.colSpan,
|
|
2399
|
+
xxxl_colStart: currentLayout.positions?.xxxl?.colStart,
|
|
2400
|
+
})
|
|
2401
|
+
.content((layoutBuilder) => {
|
|
2402
|
+
layoutBuilder.flex((flex) => {
|
|
2403
|
+
flex
|
|
2404
|
+
.setDirection('column')
|
|
2405
|
+
.setGap('16px')
|
|
2406
|
+
.formField('Responsive Layout Configuration (12-Column Grid)', (f) => {
|
|
2407
|
+
f.setShowLabel(false);
|
|
2408
|
+
f.customWidget('spacer');
|
|
2409
|
+
})
|
|
2410
|
+
.formField('Small Screens - Column Span', (f) => {
|
|
2411
|
+
f.path('sm_colSpan');
|
|
2412
|
+
f.numberBox({ placeholder: 'How many columns to span (1-12)' });
|
|
2413
|
+
})
|
|
2414
|
+
.formField('Small Screens - Column Start', (f) => {
|
|
2415
|
+
f.path('sm_colStart');
|
|
2416
|
+
f.numberBox({ placeholder: 'Starting column position (1-12)' });
|
|
2417
|
+
})
|
|
2418
|
+
.formField('Medium Screens - Column Span', (f) => {
|
|
2419
|
+
f.path('md_colSpan');
|
|
2420
|
+
f.numberBox({ placeholder: 'How many columns to span (1-12)' });
|
|
2421
|
+
})
|
|
2422
|
+
.formField('Medium Screens - Column Start', (f) => {
|
|
2423
|
+
f.path('md_colStart');
|
|
2424
|
+
f.numberBox({ placeholder: 'Starting column position (1-12)' });
|
|
2425
|
+
})
|
|
2426
|
+
.formField('Large Screens - Column Span', (f) => {
|
|
2427
|
+
f.path('lg_colSpan');
|
|
2428
|
+
f.numberBox({ placeholder: 'How many columns to span (1-12)' });
|
|
2429
|
+
})
|
|
2430
|
+
.formField('Large Screens - Column Start', (f) => {
|
|
2431
|
+
f.path('lg_colStart');
|
|
2432
|
+
f.numberBox({ placeholder: 'Starting column position (1-12)' });
|
|
2433
|
+
})
|
|
2434
|
+
.formField('Extra Large Screens - Column Span', (f) => {
|
|
2435
|
+
f.path('xl_colSpan');
|
|
2436
|
+
f.numberBox({ placeholder: 'How many columns to span (1-12)' });
|
|
2437
|
+
})
|
|
2438
|
+
.formField('Extra Large Screens - Column Start', (f) => {
|
|
2439
|
+
f.path('xl_colStart');
|
|
2440
|
+
f.numberBox({ placeholder: 'Starting column position (1-12)' });
|
|
2441
|
+
})
|
|
2442
|
+
.formField('2x Large Screens - Column Span', (f) => {
|
|
2443
|
+
f.path('xxl_colSpan');
|
|
2444
|
+
f.numberBox({ placeholder: 'How many columns to span (1-12)' });
|
|
2445
|
+
})
|
|
2446
|
+
.formField('2x Large Screens - Column Start', (f) => {
|
|
2447
|
+
f.path('xxl_colStart');
|
|
2448
|
+
f.numberBox({ placeholder: 'Starting column position (1-12)' });
|
|
2449
|
+
})
|
|
2450
|
+
.formField('3x Large Screens - Column Span', (f) => {
|
|
2451
|
+
f.path('xxxl_colSpan');
|
|
2452
|
+
f.numberBox({ placeholder: 'How many columns to span (1-12)' });
|
|
2453
|
+
})
|
|
2454
|
+
.formField('3x Large Screens - Column Start', (f) => {
|
|
2455
|
+
f.path('xxxl_colStart');
|
|
2456
|
+
f.numberBox({ placeholder: 'Starting column position (1-12)' });
|
|
2457
|
+
});
|
|
2458
|
+
});
|
|
2459
|
+
})
|
|
2460
|
+
.setActions((actions) => actions.cancel('@general:actions.cancel.title').submit('@general:actions.apply.title'));
|
|
2461
|
+
})
|
|
2462
|
+
.show();
|
|
2463
|
+
// Get the form data and action BEFORE closing
|
|
2464
|
+
const formData = dialogRef.context();
|
|
2465
|
+
const action = dialogRef.action();
|
|
2466
|
+
console.log('Field Layout Dialog result:', { formData, action, currentLayout });
|
|
2467
|
+
// Close the dialog after getting the data
|
|
2468
|
+
dialogRef.close();
|
|
2469
|
+
if (action !== 'cancel' && formData) {
|
|
2470
|
+
const newLayout = {
|
|
2471
|
+
positions: {},
|
|
2472
|
+
};
|
|
2473
|
+
// Build the layout object from form data
|
|
2474
|
+
if (formData.sm_colSpan || formData.sm_colStart) {
|
|
2475
|
+
newLayout.positions.sm = {};
|
|
2476
|
+
if (formData.sm_colSpan)
|
|
2477
|
+
newLayout.positions.sm.colSpan = formData.sm_colSpan;
|
|
2478
|
+
if (formData.sm_colStart)
|
|
2479
|
+
newLayout.positions.sm.colStart = formData.sm_colStart;
|
|
2480
|
+
}
|
|
2481
|
+
if (formData.md_colSpan || formData.md_colStart) {
|
|
2482
|
+
newLayout.positions.md = {};
|
|
2483
|
+
if (formData.md_colSpan)
|
|
2484
|
+
newLayout.positions.md.colSpan = formData.md_colSpan;
|
|
2485
|
+
if (formData.md_colStart)
|
|
2486
|
+
newLayout.positions.md.colStart = formData.md_colStart;
|
|
2487
|
+
}
|
|
2488
|
+
if (formData.lg_colSpan || formData.lg_colStart) {
|
|
2489
|
+
newLayout.positions.lg = {};
|
|
2490
|
+
if (formData.lg_colSpan)
|
|
2491
|
+
newLayout.positions.lg.colSpan = formData.lg_colSpan;
|
|
2492
|
+
if (formData.lg_colStart)
|
|
2493
|
+
newLayout.positions.lg.colStart = formData.lg_colStart;
|
|
2494
|
+
}
|
|
2495
|
+
if (formData.xl_colSpan || formData.xl_colStart) {
|
|
2496
|
+
newLayout.positions.xl = {};
|
|
2497
|
+
if (formData.xl_colSpan)
|
|
2498
|
+
newLayout.positions.xl.colSpan = formData.xl_colSpan;
|
|
2499
|
+
if (formData.xl_colStart)
|
|
2500
|
+
newLayout.positions.xl.colStart = formData.xl_colStart;
|
|
2501
|
+
}
|
|
2502
|
+
if (formData.xxl_colSpan || formData.xxl_colStart) {
|
|
2503
|
+
newLayout.positions.xxl = {};
|
|
2504
|
+
if (formData.xxl_colSpan)
|
|
2505
|
+
newLayout.positions.xxl.colSpan = formData.xxl_colSpan;
|
|
2506
|
+
if (formData.xxl_colStart)
|
|
2507
|
+
newLayout.positions.xxl.colStart = formData.xxl_colStart;
|
|
2508
|
+
}
|
|
2509
|
+
if (formData.xxxl_colSpan || formData.xxxl_colStart) {
|
|
2510
|
+
newLayout.positions.xxxl = {};
|
|
2511
|
+
if (formData.xxxl_colSpan)
|
|
2512
|
+
newLayout.positions.xxxl.colSpan = formData.xxxl_colSpan;
|
|
2513
|
+
if (formData.xxxl_colStart)
|
|
2514
|
+
newLayout.positions.xxxl.colStart = formData.xxxl_colStart;
|
|
2515
|
+
}
|
|
2516
|
+
console.log('Updating field with layout:', newLayout);
|
|
2517
|
+
// Update the field with the new layout
|
|
2518
|
+
this.updateField(field.name, { layout: newLayout });
|
|
2519
|
+
}
|
|
1781
2520
|
}
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
}
|
|
1785
|
-
group(name, delegate) {
|
|
1786
|
-
const nestedGroupBuilder = new GroupBuilder(this.formBuilder, name);
|
|
1787
|
-
if (delegate) {
|
|
1788
|
-
delegate(nestedGroupBuilder);
|
|
2521
|
+
catch (error) {
|
|
2522
|
+
console.error('Error editing field layout:', error);
|
|
1789
2523
|
}
|
|
1790
|
-
this.addGroup(nestedGroupBuilder.build());
|
|
1791
|
-
return this;
|
|
1792
2524
|
}
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
description: this.groupState.description,
|
|
1798
|
-
parameters: this.groupState.parameters
|
|
1799
|
-
};
|
|
1800
|
-
}
|
|
1801
|
-
addField(field) {
|
|
1802
|
-
this.groupState.parameters.push(field);
|
|
2525
|
+
handleGroupDrop(event) {
|
|
2526
|
+
if (event.previousIndex !== event.currentIndex) {
|
|
2527
|
+
this.reorderGroups(event.previousIndex, event.currentIndex);
|
|
2528
|
+
}
|
|
1803
2529
|
}
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
2530
|
+
handleFieldDrop(event, targetGroupName) {
|
|
2531
|
+
const formDef = this.formDefinition();
|
|
2532
|
+
if (!formDef.groups.length)
|
|
2533
|
+
return;
|
|
2534
|
+
if (event.previousContainer === event.container) {
|
|
2535
|
+
// Same container - just reorder within group
|
|
2536
|
+
const targetGroup = formDef.groups.find((g) => g.name === targetGroupName);
|
|
2537
|
+
if (!targetGroup)
|
|
2538
|
+
return;
|
|
2539
|
+
const parameters = [...targetGroup.parameters];
|
|
2540
|
+
moveItemInArray(parameters, event.previousIndex, event.currentIndex);
|
|
2541
|
+
const updatedGroups = formDef.groups.map((g) => (g.name === targetGroupName ? { ...g, parameters } : g));
|
|
2542
|
+
// Set flag to prevent external sync during internal update
|
|
2543
|
+
this.isInternalUpdate = true;
|
|
2544
|
+
this.formDefinition.set({
|
|
2545
|
+
...formDef,
|
|
2546
|
+
groups: updatedGroups,
|
|
2547
|
+
});
|
|
2548
|
+
// Reset flag after a delay
|
|
2549
|
+
setTimeout(() => {
|
|
2550
|
+
this.isInternalUpdate = false;
|
|
2551
|
+
}, 100);
|
|
2552
|
+
}
|
|
2553
|
+
else {
|
|
2554
|
+
// Different containers - move field between groups
|
|
2555
|
+
const sourceGroupName = event.previousContainer.id.replace('group-', '').replace('-fields', '');
|
|
2556
|
+
const targetGroupName = event.container.id.replace('group-', '').replace('-fields', '');
|
|
2557
|
+
const sourceGroup = formDef.groups.find((g) => g.name === sourceGroupName);
|
|
2558
|
+
const targetGroup = formDef.groups.find((g) => g.name === targetGroupName);
|
|
2559
|
+
if (!sourceGroup || !targetGroup)
|
|
2560
|
+
return;
|
|
2561
|
+
// Get the field being moved
|
|
2562
|
+
const fieldToMove = sourceGroup.parameters[event.previousIndex];
|
|
2563
|
+
// Remove from source group
|
|
2564
|
+
const updatedSourceParams = [...sourceGroup.parameters];
|
|
2565
|
+
updatedSourceParams.splice(event.previousIndex, 1);
|
|
2566
|
+
// Add to target group
|
|
2567
|
+
const updatedTargetParams = [...targetGroup.parameters];
|
|
2568
|
+
updatedTargetParams.splice(event.currentIndex, 0, fieldToMove);
|
|
2569
|
+
// Update both groups
|
|
2570
|
+
const updatedGroups = formDef.groups.map((g) => {
|
|
2571
|
+
if (g.name === sourceGroupName) {
|
|
2572
|
+
return { ...g, parameters: updatedSourceParams };
|
|
2573
|
+
}
|
|
2574
|
+
else if (g.name === targetGroupName) {
|
|
2575
|
+
return { ...g, parameters: updatedTargetParams };
|
|
2576
|
+
}
|
|
2577
|
+
return g;
|
|
2578
|
+
});
|
|
2579
|
+
// Set flag to prevent external sync during internal update
|
|
2580
|
+
this.isInternalUpdate = true;
|
|
2581
|
+
this.formDefinition.set({
|
|
2582
|
+
...formDef,
|
|
2583
|
+
groups: updatedGroups,
|
|
2584
|
+
});
|
|
2585
|
+
// Reset flag after a delay
|
|
2586
|
+
setTimeout(() => {
|
|
2587
|
+
this.isInternalUpdate = false;
|
|
2588
|
+
}, 100);
|
|
2589
|
+
}
|
|
1807
2590
|
}
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
}
|
|
1828
|
-
description(description) {
|
|
1829
|
-
this.fieldState.description = description;
|
|
1830
|
-
return this;
|
|
1831
|
-
}
|
|
1832
|
-
defaultValue(value) {
|
|
1833
|
-
this.fieldState.defaultValue = value;
|
|
1834
|
-
return this;
|
|
1835
|
-
}
|
|
1836
|
-
textBox(options) {
|
|
1837
|
-
this.fieldState.widget = {
|
|
1838
|
-
type: 'text-editor',
|
|
1839
|
-
path: this.fieldState.path,
|
|
1840
|
-
options: {
|
|
1841
|
-
...options,
|
|
1842
|
-
defaultValue: this.fieldState.defaultValue
|
|
2591
|
+
async handlePreviewClick() {
|
|
2592
|
+
try {
|
|
2593
|
+
const formDef = this.getFormDefinition();
|
|
2594
|
+
// Check if form has content
|
|
2595
|
+
if (!formDef.groups || formDef.groups.length === 0) {
|
|
2596
|
+
// Show empty state message
|
|
2597
|
+
const dialogRef = await this.formBuilderService
|
|
2598
|
+
.create()
|
|
2599
|
+
.dialog((dialog) => {
|
|
2600
|
+
dialog
|
|
2601
|
+
.setTitle('Form Preview')
|
|
2602
|
+
.setSize('md')
|
|
2603
|
+
.setCloseButton(true)
|
|
2604
|
+
.setContext({})
|
|
2605
|
+
.setActions((actions) => actions.cancel('@general:actions.close.title'));
|
|
2606
|
+
})
|
|
2607
|
+
.show();
|
|
2608
|
+
dialogRef.close();
|
|
2609
|
+
return;
|
|
1843
2610
|
}
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
2611
|
+
// Create a dynamic form using the current definition with new Layout Builder
|
|
2612
|
+
const dialogRef = await this.formBuilderService
|
|
2613
|
+
.create()
|
|
2614
|
+
.dialog((dialog) => {
|
|
2615
|
+
dialog
|
|
2616
|
+
.setTitle('Form Preview')
|
|
2617
|
+
.setSize('lg')
|
|
2618
|
+
.setCloseButton(true)
|
|
2619
|
+
.setContext({})
|
|
2620
|
+
.content((layoutBuilder) => {
|
|
2621
|
+
layoutBuilder.flex((mainFlex) => {
|
|
2622
|
+
mainFlex.setDirection('column').setGap('20px');
|
|
2623
|
+
for (const group of formDef.groups) {
|
|
2624
|
+
mainFlex.fieldset((fieldset) => {
|
|
2625
|
+
if (group.title)
|
|
2626
|
+
fieldset.setTitle(group.title);
|
|
2627
|
+
if (group.description)
|
|
2628
|
+
fieldset.setDescription(group.description);
|
|
2629
|
+
fieldset.setCols(12);
|
|
2630
|
+
for (const param of group.parameters) {
|
|
2631
|
+
fieldset.formField(param.title || param.path, (f) => {
|
|
2632
|
+
f.path(param.path);
|
|
2633
|
+
if (param.layout) {
|
|
2634
|
+
console.log(`Preview: Applying layout to field ${param.path}:`, param.layout);
|
|
2635
|
+
f.layout(param.layout);
|
|
2636
|
+
}
|
|
2637
|
+
// Map widget types to builder methods
|
|
2638
|
+
const widgetType = param.widget?.type;
|
|
2639
|
+
const opts = param.widget?.options || {};
|
|
2640
|
+
switch (widgetType) {
|
|
2641
|
+
case 'text-editor':
|
|
2642
|
+
f.textBox(opts);
|
|
2643
|
+
break;
|
|
2644
|
+
case 'large-text-editor':
|
|
2645
|
+
f.largeTextBox(opts);
|
|
2646
|
+
break;
|
|
2647
|
+
case 'rich-text-editor':
|
|
2648
|
+
f.richText(opts);
|
|
2649
|
+
break;
|
|
2650
|
+
case 'password-editor':
|
|
2651
|
+
f.passwordBox(opts);
|
|
2652
|
+
break;
|
|
2653
|
+
case 'number-editor':
|
|
2654
|
+
f.numberBox(opts);
|
|
2655
|
+
break;
|
|
2656
|
+
case 'select-editor':
|
|
2657
|
+
f.selectBox(opts);
|
|
2658
|
+
break;
|
|
2659
|
+
case 'lookup-editor':
|
|
2660
|
+
f.lookupBox(opts);
|
|
2661
|
+
break;
|
|
2662
|
+
case 'selection-list-editor':
|
|
2663
|
+
f.selectionList(opts);
|
|
2664
|
+
break;
|
|
2665
|
+
case 'date-time-editor':
|
|
2666
|
+
f.dateTimeBox(opts);
|
|
2667
|
+
break;
|
|
2668
|
+
case 'toggle-editor':
|
|
2669
|
+
f.toggleSwitch(opts);
|
|
2670
|
+
break;
|
|
2671
|
+
case 'color-editor':
|
|
2672
|
+
f.colorBox(opts);
|
|
2673
|
+
break;
|
|
2674
|
+
default:
|
|
2675
|
+
f.customWidget(widgetType, opts);
|
|
2676
|
+
break;
|
|
2677
|
+
}
|
|
2678
|
+
});
|
|
2679
|
+
}
|
|
2680
|
+
});
|
|
2681
|
+
}
|
|
2682
|
+
});
|
|
2683
|
+
})
|
|
2684
|
+
.setActions((actions) => actions.cancel('@general:actions.close.title'));
|
|
2685
|
+
})
|
|
2686
|
+
.show();
|
|
2687
|
+
dialogRef.close();
|
|
2688
|
+
}
|
|
2689
|
+
catch (error) {
|
|
2690
|
+
console.error('Error showing preview:', error);
|
|
2691
|
+
}
|
|
1854
2692
|
}
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
2693
|
+
//#endregion
|
|
2694
|
+
//#region ---- Utility Methods ----
|
|
2695
|
+
deriveKey(input) {
|
|
2696
|
+
if (!input)
|
|
2697
|
+
return '';
|
|
2698
|
+
let k = camelCase(String(input));
|
|
2699
|
+
k = k.replace(/[^a-zA-Z0-9_]/g, '');
|
|
2700
|
+
if (!/^[a-zA-Z_]/.test(k))
|
|
2701
|
+
k = `_${k}`;
|
|
2702
|
+
const groups = this.formDefinition().groups || [];
|
|
2703
|
+
const exists = (candidate) => groups.some((group) => group.parameters.some((param) => param.path === candidate));
|
|
2704
|
+
if (!exists(k))
|
|
2705
|
+
return k;
|
|
2706
|
+
let i = 1;
|
|
2707
|
+
while (exists(`${k}${i}`))
|
|
2708
|
+
i++;
|
|
2709
|
+
return `${k}${i}`;
|
|
1862
2710
|
}
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
type: 'password-editor',
|
|
1866
|
-
path: this.fieldState.path,
|
|
1867
|
-
options
|
|
1868
|
-
};
|
|
1869
|
-
return this;
|
|
2711
|
+
generateId() {
|
|
2712
|
+
return `field_${Date.now()}_${Math.random().toString(36).substr(2, 9)}`;
|
|
1870
2713
|
}
|
|
1871
|
-
|
|
1872
|
-
this.
|
|
1873
|
-
|
|
1874
|
-
path: this.fieldState.path,
|
|
1875
|
-
options
|
|
1876
|
-
};
|
|
1877
|
-
return this;
|
|
2714
|
+
getWidgetIcon(widgetName) {
|
|
2715
|
+
const widget = this.availableWidgets().find((w) => w.name === widgetName);
|
|
2716
|
+
return widget?.icon ?? 'fa-light fa-square';
|
|
1878
2717
|
}
|
|
1879
|
-
|
|
1880
|
-
this.
|
|
1881
|
-
|
|
1882
|
-
path: this.fieldState.path,
|
|
1883
|
-
options
|
|
1884
|
-
};
|
|
1885
|
-
return this;
|
|
2718
|
+
getWidgetTitle(widgetName) {
|
|
2719
|
+
const widget = this.availableWidgets().find((w) => w.name === widgetName);
|
|
2720
|
+
return widget?.title ?? widgetName;
|
|
1886
2721
|
}
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
type: 'lookup-editor',
|
|
1890
|
-
path: this.fieldState.path,
|
|
1891
|
-
options
|
|
1892
|
-
};
|
|
1893
|
-
return this;
|
|
2722
|
+
getWidgetNode(field) {
|
|
2723
|
+
return field.widget;
|
|
1894
2724
|
}
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
2725
|
+
deriveGroupKey(input) {
|
|
2726
|
+
if (!input)
|
|
2727
|
+
return '';
|
|
2728
|
+
let k = camelCase(String(input));
|
|
2729
|
+
k = k.replace(/[^a-zA-Z0-9_]/g, '');
|
|
2730
|
+
if (!/^[a-zA-Z_]/.test(k))
|
|
2731
|
+
k = `_${k}`;
|
|
2732
|
+
const groups = this.formDefinition().groups || [];
|
|
2733
|
+
const exists = (candidate) => groups.some((group) => group.name === candidate);
|
|
2734
|
+
if (!exists(k))
|
|
2735
|
+
return k;
|
|
2736
|
+
let i = 1;
|
|
2737
|
+
while (exists(`${k}${i}`))
|
|
2738
|
+
i++;
|
|
2739
|
+
return `${k}${i}`;
|
|
1902
2740
|
}
|
|
1903
|
-
|
|
1904
|
-
this.
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
};
|
|
1909
|
-
return this;
|
|
2741
|
+
getGroupOptions() {
|
|
2742
|
+
return this.formDefinition().groups.map((group) => ({
|
|
2743
|
+
value: group.name,
|
|
2744
|
+
text: group.title || group.name,
|
|
2745
|
+
}));
|
|
1910
2746
|
}
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
2747
|
+
addFieldToGroup(field, groupName) {
|
|
2748
|
+
const currentDefinition = this.formDefinition();
|
|
2749
|
+
const updatedGroups = currentDefinition.groups.map((group) => group.name === groupName
|
|
2750
|
+
? {
|
|
2751
|
+
...group,
|
|
2752
|
+
parameters: [
|
|
2753
|
+
...group.parameters,
|
|
2754
|
+
{
|
|
2755
|
+
path: field.name,
|
|
2756
|
+
title: field.title,
|
|
2757
|
+
description: field.description,
|
|
2758
|
+
widget: field.widget,
|
|
2759
|
+
mode: field.mode,
|
|
2760
|
+
layout: field.layout,
|
|
2761
|
+
},
|
|
2762
|
+
],
|
|
2763
|
+
}
|
|
2764
|
+
: group);
|
|
2765
|
+
this.formDefinition.set({
|
|
2766
|
+
...currentDefinition,
|
|
2767
|
+
groups: updatedGroups,
|
|
2768
|
+
});
|
|
1918
2769
|
}
|
|
1919
|
-
|
|
1920
|
-
this.
|
|
1921
|
-
type: 'color-editor',
|
|
1922
|
-
path: this.fieldState.path,
|
|
1923
|
-
options
|
|
1924
|
-
};
|
|
1925
|
-
return this;
|
|
2770
|
+
getAllGroupDropLists() {
|
|
2771
|
+
return this.designerGroups().map((group) => `group-${group.name}-fields`);
|
|
1926
2772
|
}
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
};
|
|
1933
|
-
return this;
|
|
2773
|
+
/**
|
|
2774
|
+
* Get the grid column count for a group (always 12 columns)
|
|
2775
|
+
*/
|
|
2776
|
+
getGroupColumnCount() {
|
|
2777
|
+
return 12; // Always 12 columns for all groups
|
|
1934
2778
|
}
|
|
1935
|
-
|
|
2779
|
+
/**
|
|
2780
|
+
* Get default field grid layout based on group configuration
|
|
2781
|
+
*/
|
|
2782
|
+
getFieldGridLayout(group, fieldIndex) {
|
|
2783
|
+
// Always use 12 columns, provide smart default layout
|
|
1936
2784
|
return {
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
}
|
|
1944
|
-
//#endregion
|
|
1945
|
-
//#region ---- Dialog Builder Implementation ----
|
|
1946
|
-
class DialogBuilder extends FormBuilder {
|
|
1947
|
-
constructor(dialogService) {
|
|
1948
|
-
super();
|
|
1949
|
-
this.dialogService = dialogService;
|
|
1950
|
-
this.dialogState = {
|
|
1951
|
-
groups: [],
|
|
1952
|
-
layoutConfig: {
|
|
1953
|
-
positions: {
|
|
1954
|
-
default: { colSpan: 12 },
|
|
1955
|
-
md: { colSpan: 8 },
|
|
1956
|
-
lg: { colSpan: 6 },
|
|
1957
|
-
xl: { colSpan: 5 },
|
|
1958
|
-
xxl: { colSpan: 4 },
|
|
1959
|
-
},
|
|
2785
|
+
positions: {
|
|
2786
|
+
sm: { colSpan: 6 }, // Half width on small screens (6/12)
|
|
2787
|
+
md: { colSpan: 3 }, // 1/4 width on medium screens (3/12)
|
|
2788
|
+
lg: { colSpan: 3 }, // 1/4 width on large screens (3/12)
|
|
2789
|
+
xl: { colSpan: 3 }, // 1/4 width on xl screens (3/12)
|
|
2790
|
+
xxl: { colSpan: 3 }, // 1/4 width on xxl screens (3/12)
|
|
2791
|
+
xxxl: { colSpan: 3 }, // 1/4 width on xxxl screens (3/12)
|
|
1960
2792
|
},
|
|
1961
|
-
look: 'normal',
|
|
1962
|
-
direction: 'vertical',
|
|
1963
|
-
title: '',
|
|
1964
|
-
message: '',
|
|
1965
|
-
size: 'md',
|
|
1966
|
-
context: {},
|
|
1967
|
-
actions: {
|
|
1968
|
-
footer: {
|
|
1969
|
-
prefix: [],
|
|
1970
|
-
suffix: []
|
|
1971
|
-
}
|
|
1972
|
-
}
|
|
1973
|
-
};
|
|
1974
|
-
}
|
|
1975
|
-
// Override to keep chaining within dialog context
|
|
1976
|
-
group(name, delegate) {
|
|
1977
|
-
super.group(name, delegate);
|
|
1978
|
-
return this;
|
|
1979
|
-
}
|
|
1980
|
-
title(title) {
|
|
1981
|
-
this.dialogState.title = title;
|
|
1982
|
-
return this;
|
|
1983
|
-
}
|
|
1984
|
-
message(message) {
|
|
1985
|
-
this.dialogState.message = message;
|
|
1986
|
-
return this;
|
|
1987
|
-
}
|
|
1988
|
-
size(size) {
|
|
1989
|
-
this.dialogState.size = size;
|
|
1990
|
-
return this;
|
|
1991
|
-
}
|
|
1992
|
-
context(context) {
|
|
1993
|
-
this.dialogState.context = context;
|
|
1994
|
-
return this;
|
|
1995
|
-
}
|
|
1996
|
-
actions(delegate) {
|
|
1997
|
-
const actionBuilder = new ActionBuilder(this);
|
|
1998
|
-
if (delegate) {
|
|
1999
|
-
delegate(actionBuilder);
|
|
2000
|
-
}
|
|
2001
|
-
return this;
|
|
2002
|
-
}
|
|
2003
|
-
async show() {
|
|
2004
|
-
const config = {
|
|
2005
|
-
title: this.dialogState.title,
|
|
2006
|
-
message: this.dialogState.message,
|
|
2007
|
-
formDefinition: this.build(),
|
|
2008
|
-
context: this.dialogState.context,
|
|
2009
|
-
size: this.dialogState.size,
|
|
2010
|
-
actions: this.dialogState.actions
|
|
2011
2793
|
};
|
|
2012
|
-
return await this.dialogService.showDialog(config);
|
|
2013
|
-
}
|
|
2014
|
-
}
|
|
2015
|
-
//#endregion
|
|
2016
|
-
//#region ---- Action Builder Implementation ----
|
|
2017
|
-
class ActionBuilder {
|
|
2018
|
-
constructor(dialogBuilder) {
|
|
2019
|
-
this.dialogBuilder = dialogBuilder;
|
|
2020
|
-
}
|
|
2021
|
-
cancel(text) {
|
|
2022
|
-
if (!this.dialogBuilder['dialogState'].actions.footer.suffix) {
|
|
2023
|
-
this.dialogBuilder['dialogState'].actions.footer.suffix = [];
|
|
2024
|
-
}
|
|
2025
|
-
this.dialogBuilder['dialogState'].actions.footer.suffix.push({
|
|
2026
|
-
title: text || '@general:actions.cancel.title',
|
|
2027
|
-
icon: 'fa-times',
|
|
2028
|
-
color: 'default',
|
|
2029
|
-
command: { name: 'cancel' }
|
|
2030
|
-
});
|
|
2031
|
-
return this;
|
|
2032
|
-
}
|
|
2033
|
-
submit(text) {
|
|
2034
|
-
if (!this.dialogBuilder['dialogState'].actions.footer.suffix) {
|
|
2035
|
-
this.dialogBuilder['dialogState'].actions.footer.suffix = [];
|
|
2036
|
-
}
|
|
2037
|
-
this.dialogBuilder['dialogState'].actions.footer.suffix.push({
|
|
2038
|
-
title: text || '@general:actions.submit.title',
|
|
2039
|
-
icon: 'fa-check',
|
|
2040
|
-
color: 'primary',
|
|
2041
|
-
command: { name: 'submit', options: { validate: true } }
|
|
2042
|
-
});
|
|
2043
|
-
return this;
|
|
2044
|
-
}
|
|
2045
|
-
custom(action) {
|
|
2046
|
-
if (!this.dialogBuilder['dialogState'].actions.footer.suffix) {
|
|
2047
|
-
this.dialogBuilder['dialogState'].actions.footer.suffix = [];
|
|
2048
|
-
}
|
|
2049
|
-
this.dialogBuilder['dialogState'].actions.footer.suffix.push(action);
|
|
2050
|
-
return this;
|
|
2051
2794
|
}
|
|
2795
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPDynamicFormDesignerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2796
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.4", type: AXPDynamicFormDesignerComponent, isStandalone: true, selector: "axp-dynamic-form-designer", inputs: { formDefinition: { classPropertyName: "formDefinition", publicName: "formDefinition", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { formDefinition: "formDefinitionChange" }, host: { classAttribute: "ax-w-full ax-h-full" }, ngImport: i0, template: "<div class=\"axp-dynamic-form-designer\" *translate=\"let t\">\n @if (!readonly()) {\n <div class=\"__header\">\n <div class=\"__header-left\">\n <!-- Left side can be used for other actions in the future -->\n </div>\n <div class=\"__header-right\">\n <ax-button\n class=\"ax-sm\"\n [text]=\"t('@dynamic-form-designer:actions.add-group') | async\"\n [color]=\"'primary'\"\n (onClick)=\"handleAddGroupClick()\"\n >\n <ax-prefix>\n <ax-icon icon=\"fa-light fa-layer-group\"></ax-icon>\n </ax-prefix>\n </ax-button>\n\n <ax-button\n class=\"ax-sm\"\n [text]=\"t('@dynamic-form-designer:actions.preview') | async\"\n [color]=\"'success'\"\n (onClick)=\"handlePreviewClick()\"\n >\n <ax-prefix>\n <ax-icon icon=\"fa-light fa-eye\"></ax-icon>\n </ax-prefix>\n </ax-button>\n </div>\n </div>\n }\n <div class=\"__content\">\n @if (formDefinition().groups.length === 0) {\n <axp-state-message\n icon=\"fa-light fa-layer-group\"\n [title]=\"'@dynamic-form-designer:groups.empty'\"\n [description]=\"'@dynamic-form-designer:groups.empty-description'\"\n >\n </axp-state-message>\n } @else {\n <div\n class=\"__groups-container\"\n cdkDropList\n [cdkDropListData]=\"designerGroups()\"\n (cdkDropListDropped)=\"handleGroupDrop($event)\"\n >\n @for (group of designerGroups(); track group.id) {\n <div class=\"__group\" cdkDrag>\n <div class=\"__group-header\">\n @if (!readonly()) {\n <div class=\"__group-drag-handle\" cdkDragHandle>\n <ax-icon icon=\"fa-light fa-grip-vertical\"></ax-icon>\n </div>\n }\n <div class=\"__group-info\">\n <h3 class=\"__group-title\">{{ group.title || group.name }}</h3>\n @if (group.description) {\n <p class=\"__group-description\">{{ group.description }}</p>\n }\n </div>\n @if (!readonly()) {\n <div class=\"__group-actions\">\n <ax-button\n class=\"ax-sm\"\n [text]=\"t('@dynamic-form-designer:actions.add-field') | async\"\n [color]=\"'accent2'\"\n (onClick)=\"handleAddFieldToGroup(group)\"\n >\n <ax-prefix>\n <ax-icon icon=\"fa-light fa-plus\"></ax-icon>\n </ax-prefix>\n </ax-button>\n <ax-button\n class=\"ax-sm\"\n [look]=\"'blank'\"\n color=\"info\"\n (onClick)=\"handleGroupLayoutEdit(group)\"\n [title]=\"t('@dynamic-form-designer:actions.layout-settings') | async\"\n >\n <ax-icon class=\"fa-light fa-grid\"></ax-icon>\n </ax-button>\n <ax-button class=\"ax-sm\" [look]=\"'blank'\" color=\"accent3\" (onClick)=\"handleGroupEdit(group)\">\n <ax-icon class=\"fa-light fa-pencil\"></ax-icon>\n </ax-button>\n <ax-button class=\"ax-sm\" [look]=\"'blank'\" color=\"danger\" (onClick)=\"handleGroupRemove(group)\">\n <ax-icon class=\"fa-light fa-trash-can\"></ax-icon>\n </ax-button>\n </div>\n }\n </div>\n\n <div class=\"__fields-container\" [attr.data-grid-columns]=\"12\">\n <div\n class=\"__items-list\"\n cdkDropList\n [id]=\"'group-' + group.name + '-fields'\"\n [cdkDropListData]=\"group.fields\"\n [cdkDropListConnectedTo]=\"getAllGroupDropLists()\"\n (cdkDropListDropped)=\"handleFieldDrop($event, group.name)\"\n >\n @if (group.fields.length === 0) {\n <axp-state-message\n icon=\"fa-light fa-plus\"\n [title]=\"'@dynamic-form-designer:fields.empty-group'\"\n [description]=\"'@dynamic-form-designer:fields.empty-group-description'\"\n >\n </axp-state-message>\n } @else {\n @for (field of group.fields; track field.id) {\n <div\n class=\"__field-item\"\n cdkDrag\n [class.__selected]=\"selectedFieldId() === field.id\"\n [axp-grid-layout]=\"getFieldGridLayout(group)\"\n >\n <div class=\"__drag-handle\" cdkDragHandle>\n <ax-icon icon=\"fa-light fa-grip-vertical\"></ax-icon>\n </div>\n\n <div class=\"__item-content\">\n <div class=\"__item-header\">\n <div class=\"__field-icon\">\n <ax-icon [icon]=\"getWidgetIcon(field.widget.type)\"></ax-icon>\n </div>\n <div class=\"__field-info\">\n <h4 class=\"__item-title\">{{ field.title }}</h4>\n <span class=\"__widget-type\">{{ getWidgetTitle(field.widget.type) }}</span>\n @if (field.description) {\n <p class=\"__field-description\">{{ field.description }}</p>\n }\n </div>\n </div>\n </div>\n\n @if (!readonly()) {\n <div class=\"__item-actions\">\n <ax-button\n class=\"ax-sm\"\n [look]=\"'blank'\"\n color=\"accent2\"\n (onClick)=\"handleFieldLayoutEdit(field, group)\"\n title=\"Configure field layout (colSpan, colStart)\"\n >\n <ax-icon class=\"fa-light fa-grid\"></ax-icon>\n </ax-button>\n <ax-button class=\"ax-sm\" [look]=\"'blank'\" color=\"accent3\" (onClick)=\"handleFieldEdit(field)\">\n <ax-icon class=\"fa-light fa-pencil\"></ax-icon>\n </ax-button>\n\n <ax-button [look]=\"'blank'\" class=\"ax-sm\" color=\"danger\" (onClick)=\"handleFieldRemove(field)\">\n <ax-icon class=\"fa-light fa-trash-can\"></ax-icon>\n </ax-button>\n </div>\n }\n </div>\n }\n }\n </div>\n </div>\n </div>\n }\n </div>\n }\n </div>\n</div>\n", styles: [".axp-dynamic-form-designer{width:100%;border-radius:.375rem;border-width:1px;background-color:rgb(var(--ax-sys-color-surface));color:rgb(var(--ax-sys-color-on-surface));border-color:rgb(var(--ax-sys-color-border-surface))}.axp-dynamic-form-designer .__header{display:flex;align-items:center;justify-content:space-between;border-bottom-width:1px;padding:1rem;background-color:rgb(var(--ax-sys-color-lighter-surface));color:rgb(var(--ax-sys-color-on-lighter-surface));border-color:rgb(var(--ax-sys-color-border-lighter-surface))}.axp-dynamic-form-designer .__header .__header-left{display:flex;gap:.5rem}.axp-dynamic-form-designer .__header .__header-right{display:flex;gap:.75rem}.axp-dynamic-form-designer .__content{padding:1rem}.axp-dynamic-form-designer .__content .__groups-container{display:flex;flex-direction:column;gap:1rem}.axp-dynamic-form-designer .__content .__group{border-radius:.375rem;border-width:1px;--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);background-color:rgb(var(--ax-sys-color-lightest-surface));color:rgb(var(--ax-sys-color-on-lightest-surface));border-color:rgb(var(--ax-sys-color-border-lightest-surface))}.axp-dynamic-form-designer .__content .__group .__group-header{display:flex;align-items:center;gap:.75rem;border-bottom-width:1px;padding:.75rem;background-color:rgb(var(--ax-sys-color-lighter-surface));color:rgb(var(--ax-sys-color-on-lighter-surface));border-color:rgb(var(--ax-sys-color-border-lighter-surface))}.axp-dynamic-form-designer .__content .__group .__group-header .__group-drag-handle{display:flex;height:1.5rem;width:1.5rem;align-items:center;justify-content:center;--tw-text-opacity: 1;color:rgb(163 163 163 / var(--tw-text-opacity, 1));cursor:grab}.axp-dynamic-form-designer .__content .__group .__group-header .__group-drag-handle:active{cursor:grabbing}.axp-dynamic-form-designer .__content .__group .__group-header .__group-drag-handle:hover{--tw-text-opacity: 1;color:rgb(82 82 82 / var(--tw-text-opacity, 1))}.axp-dynamic-form-designer .__content .__group .__group-header .__group-info{flex:1 1 0%}.axp-dynamic-form-designer .__content .__group .__group-header .__group-info .__group-title{margin-bottom:.25rem;font-size:1.125rem;line-height:1.75rem;font-weight:600}.axp-dynamic-form-designer .__content .__group .__group-header .__group-info .__group-description{font-size:.875rem;line-height:1.25rem;line-height:1.625;--tw-text-opacity: 1;color:rgb(82 82 82 / var(--tw-text-opacity, 1))}.axp-dynamic-form-designer .__content .__group .__group-header .__group-actions{display:flex;gap:.5rem}.axp-dynamic-form-designer .__content .__group .__fields-container{padding:1rem}.axp-dynamic-form-designer .__content .__group .__fields-container .__items-list{gap:.75rem;min-height:3rem;display:flex;flex-direction:column}.axp-dynamic-form-designer .__content .__group .__fields-container .__items-list:empty{display:flex;align-items:center;justify-content:center;--tw-text-opacity: 1;color:rgb(163 163 163 / var(--tw-text-opacity, 1))}.axp-dynamic-form-designer .__content .__group .__fields-container .__items-list:empty:before{content:\"Drop fields here\";font-size:.875rem;line-height:1.25rem;font-weight:500}.axp-dynamic-form-designer .__content .__group .__fields-container[data-columns=\"2\"] .__items-list,.axp-dynamic-form-designer .__content .__group .__fields-container[data-columns=\"3\"] .__items-list,.axp-dynamic-form-designer .__content .__group .__fields-container[data-columns=\"4\"] .__items-list{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:.75rem}.__field-item{display:flex;align-items:center;gap:.75rem;border-radius:.375rem;border-width:1px;padding:.75rem;--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);background-color:rgb(var(--ax-sys-color-lightest-surface));color:rgb(var(--ax-sys-color-on-lightest-surface));border-color:rgb(var(--ax-sys-color-border-lightest-surface));cursor:move;-webkit-user-select:none;-moz-user-select:-moz-none;user-select:none}.__field-item:hover{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);background-color:rgb(var(--ax-sys-color-lighter-surface));color:rgb(var(--ax-sys-color-on-lighter-surface));border-color:rgb(var(--ax-sys-color-border-lighter-surface))}.__field-item.__selected{--tw-border-opacity: 1;border-color:rgba(var(--ax-sys-color-accent2-500),var(--tw-border-opacity, 1));--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);background-color:rgb(var(--ax-sys-color-accent2-lightest-surface));color:rgb(var(--ax-sys-color-on-accent2-lightest-surface));border-color:rgb(var(--ax-sys-color-border-accent2-lightest-surface))}.__field-item .__drag-handle{display:flex;height:1.5rem;width:1.5rem;align-items:center;justify-content:center;--tw-text-opacity: 1;color:rgb(163 163 163 / var(--tw-text-opacity, 1));cursor:grab;transition:color .15s ease-in-out}.__field-item .__drag-handle:active{cursor:grabbing}.__field-item .__drag-handle:hover{--tw-text-opacity: 1;color:rgb(82 82 82 / var(--tw-text-opacity, 1))}.__field-item .__item-content{flex:1 1 0%}.__field-item .__item-content .__item-header{margin-bottom:.5rem;display:flex;align-items:center;gap:.75rem}.__field-item .__item-content .__item-header .__field-icon{display:flex;height:2.5rem;width:2.5rem;align-items:center;justify-content:center;border-radius:.375rem;--tw-text-opacity: 1;color:rgba(var(--ax-sys-color-accent2-500),var(--tw-text-opacity, 1));--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);background-color:rgb(var(--ax-sys-color-accent2-lightest-surface));color:rgb(var(--ax-sys-color-on-accent2-lightest-surface));border-color:rgb(var(--ax-sys-color-border-accent2-lightest-surface))}.__field-item .__item-content .__item-header .__field-info{flex:1 1 0%}.__field-item .__item-content .__item-header .__field-info .__item-title{margin-bottom:.25rem;font-size:1rem;line-height:1.5rem;font-weight:600}.__field-item .__item-content .__item-header .__field-info .__widget-type{font-size:.875rem;line-height:1.25rem;font-weight:500;--tw-text-opacity: 1;color:rgb(82 82 82 / var(--tw-text-opacity, 1))}.__field-item .__item-content .__item-header .__field-info .__field-description{margin-top:.25rem;font-size:.875rem;line-height:1.25rem;line-height:1.625;--tw-text-opacity: 1;color:rgb(115 115 115 / var(--tw-text-opacity, 1))}.__field-item .__item-actions{display:flex;gap:.5rem}.__group.cdk-drag-preview{border-radius:.375rem;border-width:1px;--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);background-color:rgb(var(--ax-sys-color-lightest-surface));color:rgb(var(--ax-sys-color-on-lightest-surface));border-color:rgb(var(--ax-sys-color-border-lightest-surface))}.__group.cdk-drag-preview .__group-header{display:flex;align-items:center;gap:.75rem;border-bottom-width:1px;padding:.75rem;background-color:rgb(var(--ax-sys-color-lighter-surface));color:rgb(var(--ax-sys-color-on-lighter-surface));border-color:rgb(var(--ax-sys-color-border-lighter-surface))}.__group.cdk-drag-preview .__group-info{flex:1 1 0%}.__group.cdk-drag-preview .__group-info .__group-title{margin-bottom:.25rem;font-size:1.125rem;line-height:1.75rem;font-weight:600}.__group.cdk-drag-preview .__group-info .__group-description{font-size:.875rem;line-height:1.25rem;--tw-text-opacity: 1;color:rgb(82 82 82 / var(--tw-text-opacity, 1))}.__group.cdk-drag-preview .__fields-container{padding:.75rem}.__group.cdk-drag-preview .__fields-container .__field-item{display:flex;align-items:center;gap:.75rem;border-radius:.375rem;border-width:1px;padding:.75rem;background-color:rgb(var(--ax-sys-color-lightest-surface));color:rgb(var(--ax-sys-color-on-lightest-surface));border-color:rgb(var(--ax-sys-color-border-lightest-surface))}.__group.cdk-drag-preview .__fields-container .__field-item .__field-icon{display:flex;height:2rem;width:2rem;align-items:center;justify-content:center;border-radius:.25rem;--tw-text-opacity: 1;color:rgba(var(--ax-sys-color-accent2-500),var(--tw-text-opacity, 1));background-color:rgb(var(--ax-sys-color-accent2-lightest-surface));color:rgb(var(--ax-sys-color-on-accent2-lightest-surface));border-color:rgb(var(--ax-sys-color-border-accent2-lightest-surface))}.__group.cdk-drag-preview .__fields-container .__field-item .__item-content{flex:1 1 0%}.__group.cdk-drag-preview .__fields-container .__field-item .__item-content .__item-title{margin-bottom:0;font-size:.875rem;line-height:1.25rem;font-weight:500}.__group.cdk-drag-preview .__fields-container .__field-item .__item-content .__widget-type{font-size:.75rem;line-height:1rem;--tw-text-opacity: 1;color:rgb(82 82 82 / var(--tw-text-opacity, 1))}.__group.cdk-drag-placeholder{border-width:2px;border-style:dashed;--tw-border-opacity: 1;border-color:rgba(var(--ax-sys-color-accent2-500),var(--tw-border-opacity, 1));opacity:.5;background-color:rgb(var(--ax-sys-color-accent2-lightest-surface));color:rgb(var(--ax-sys-color-on-accent2-lightest-surface));border-color:rgb(var(--ax-sys-color-border-accent2-lightest-surface))}.__group.cdk-drag-dragging{opacity:.7}.__group:hover:not(.cdk-drag-dragging) .__group-drag-handle{--tw-text-opacity: 1;color:rgba(var(--ax-sys-color-accent2-500),var(--tw-text-opacity, 1))}.__field-item.cdk-drag-preview{border-radius:.375rem;border-width:1px;--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);background-color:rgb(var(--ax-sys-color-lightest-surface));color:rgb(var(--ax-sys-color-on-lightest-surface));border-color:rgb(var(--ax-sys-color-border-lightest-surface))}.__field-item.cdk-drag-placeholder{border-width:2px;border-style:dashed;--tw-border-opacity: 1;border-color:rgba(var(--ax-sys-color-accent2-500),var(--tw-border-opacity, 1));opacity:.5;background-color:rgb(var(--ax-sys-color-accent2-lightest-surface));color:rgb(var(--ax-sys-color-on-accent2-lightest-surface));border-color:rgb(var(--ax-sys-color-border-accent2-lightest-surface))}.__items-list.cdk-drop-list-dragging{position:relative;min-height:4rem}.__items-list.cdk-drop-list-dragging axp-state-message{display:none}.__items-list.cdk-drop-list-dragging:has(axp-state-message):after{content:\"Drop fields here\";position:absolute;top:0;right:0;bottom:0;left:0;display:flex;align-items:center;justify-content:center;border-radius:.375rem;border-width:2px;border-style:dashed;--tw-border-opacity: 1;border-color:rgb(212 212 212 / var(--tw-border-opacity, 1));--tw-bg-opacity: 1;background-color:rgb(250 250 250 / var(--tw-bg-opacity, 1));font-size:.875rem;line-height:1.25rem;--tw-text-opacity: 1;color:rgb(115 115 115 / var(--tw-text-opacity, 1));margin:.5rem;z-index:-1;pointer-events:none;min-height:3rem}.__items-list.cdk-drop-list-receiving{position:relative;min-height:4rem}.__items-list.cdk-drop-list-receiving axp-state-message{display:none}.__items-list.cdk-drop-list-receiving:has(axp-state-message):after{content:\"Drop fields here\";position:absolute;top:0;right:0;bottom:0;left:0;display:flex;align-items:center;justify-content:center;border-width:2px;border-style:dashed;--tw-border-opacity: 1;border-color:rgba(var(--ax-sys-color-accent2-500),var(--tw-border-opacity, 1));font-size:.875rem;line-height:1.25rem;--tw-text-opacity: 1;color:rgba(var(--ax-sys-color-accent2-500),var(--tw-text-opacity, 1));background-color:rgb(var(--ax-sys-color-accent2-lightest-surface));color:rgb(var(--ax-sys-color-on-accent2-lightest-surface));border-color:rgb(var(--ax-sys-color-border-accent2-lightest-surface));margin:.5rem;z-index:-1;pointer-events:none;min-height:3rem}.__groups-container.cdk-drop-list-dragging{border-radius:.5rem;padding:.5rem;background-color:rgb(var(--ax-sys-color-accent2-lightest-surface));color:rgb(var(--ax-sys-color-on-accent2-lightest-surface));border-color:rgb(var(--ax-sys-color-border-accent2-lightest-surface));border-width:2px;border-style:dashed;--tw-border-opacity: 1;border-color:rgba(var(--ax-sys-color-accent2-500),var(--tw-border-opacity, 1))}.cdk-drop-list.cdk-drop-list-receiving{background-color:rgb(var(--ax-sys-color-accent2-lightest-surface));color:rgb(var(--ax-sys-color-on-accent2-lightest-surface));border-color:rgb(var(--ax-sys-color-border-accent2-lightest-surface))}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: AXFormModule }, { kind: "ngmodule", type: AXLabelModule }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i5$1.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i2$1.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i2$1.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: DragDropModule }, { kind: "directive", type: i3$3.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer", "cdkDropListHasAnchor"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i3$3.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i3$3.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "directive", type: i5.AXTranslatorDirective, selector: "[translate]" }, { kind: "component", type: AXPStateMessageComponent, selector: "axp-state-message", inputs: ["mode", "icon", "title", "description", "variant"] }, { kind: "directive", type: AXPGridLayoutDirective, selector: "[axp-grid-layout]", inputs: ["axp-grid-layout"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2052
2797
|
}
|
|
2053
|
-
|
|
2054
|
-
|
|
2798
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPDynamicFormDesignerComponent, decorators: [{
|
|
2799
|
+
type: Component,
|
|
2800
|
+
args: [{ selector: 'axp-dynamic-form-designer', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
2801
|
+
CommonModule,
|
|
2802
|
+
FormsModule,
|
|
2803
|
+
AXFormModule,
|
|
2804
|
+
AXLabelModule,
|
|
2805
|
+
AXButtonModule,
|
|
2806
|
+
AXDecoratorModule,
|
|
2807
|
+
DragDropModule,
|
|
2808
|
+
AXTranslationModule,
|
|
2809
|
+
AXPStateMessageComponent,
|
|
2810
|
+
AXPGridLayoutDirective,
|
|
2811
|
+
], standalone: true, host: {
|
|
2812
|
+
class: 'ax-w-full ax-h-full',
|
|
2813
|
+
}, template: "<div class=\"axp-dynamic-form-designer\" *translate=\"let t\">\n @if (!readonly()) {\n <div class=\"__header\">\n <div class=\"__header-left\">\n <!-- Left side can be used for other actions in the future -->\n </div>\n <div class=\"__header-right\">\n <ax-button\n class=\"ax-sm\"\n [text]=\"t('@dynamic-form-designer:actions.add-group') | async\"\n [color]=\"'primary'\"\n (onClick)=\"handleAddGroupClick()\"\n >\n <ax-prefix>\n <ax-icon icon=\"fa-light fa-layer-group\"></ax-icon>\n </ax-prefix>\n </ax-button>\n\n <ax-button\n class=\"ax-sm\"\n [text]=\"t('@dynamic-form-designer:actions.preview') | async\"\n [color]=\"'success'\"\n (onClick)=\"handlePreviewClick()\"\n >\n <ax-prefix>\n <ax-icon icon=\"fa-light fa-eye\"></ax-icon>\n </ax-prefix>\n </ax-button>\n </div>\n </div>\n }\n <div class=\"__content\">\n @if (formDefinition().groups.length === 0) {\n <axp-state-message\n icon=\"fa-light fa-layer-group\"\n [title]=\"'@dynamic-form-designer:groups.empty'\"\n [description]=\"'@dynamic-form-designer:groups.empty-description'\"\n >\n </axp-state-message>\n } @else {\n <div\n class=\"__groups-container\"\n cdkDropList\n [cdkDropListData]=\"designerGroups()\"\n (cdkDropListDropped)=\"handleGroupDrop($event)\"\n >\n @for (group of designerGroups(); track group.id) {\n <div class=\"__group\" cdkDrag>\n <div class=\"__group-header\">\n @if (!readonly()) {\n <div class=\"__group-drag-handle\" cdkDragHandle>\n <ax-icon icon=\"fa-light fa-grip-vertical\"></ax-icon>\n </div>\n }\n <div class=\"__group-info\">\n <h3 class=\"__group-title\">{{ group.title || group.name }}</h3>\n @if (group.description) {\n <p class=\"__group-description\">{{ group.description }}</p>\n }\n </div>\n @if (!readonly()) {\n <div class=\"__group-actions\">\n <ax-button\n class=\"ax-sm\"\n [text]=\"t('@dynamic-form-designer:actions.add-field') | async\"\n [color]=\"'accent2'\"\n (onClick)=\"handleAddFieldToGroup(group)\"\n >\n <ax-prefix>\n <ax-icon icon=\"fa-light fa-plus\"></ax-icon>\n </ax-prefix>\n </ax-button>\n <ax-button\n class=\"ax-sm\"\n [look]=\"'blank'\"\n color=\"info\"\n (onClick)=\"handleGroupLayoutEdit(group)\"\n [title]=\"t('@dynamic-form-designer:actions.layout-settings') | async\"\n >\n <ax-icon class=\"fa-light fa-grid\"></ax-icon>\n </ax-button>\n <ax-button class=\"ax-sm\" [look]=\"'blank'\" color=\"accent3\" (onClick)=\"handleGroupEdit(group)\">\n <ax-icon class=\"fa-light fa-pencil\"></ax-icon>\n </ax-button>\n <ax-button class=\"ax-sm\" [look]=\"'blank'\" color=\"danger\" (onClick)=\"handleGroupRemove(group)\">\n <ax-icon class=\"fa-light fa-trash-can\"></ax-icon>\n </ax-button>\n </div>\n }\n </div>\n\n <div class=\"__fields-container\" [attr.data-grid-columns]=\"12\">\n <div\n class=\"__items-list\"\n cdkDropList\n [id]=\"'group-' + group.name + '-fields'\"\n [cdkDropListData]=\"group.fields\"\n [cdkDropListConnectedTo]=\"getAllGroupDropLists()\"\n (cdkDropListDropped)=\"handleFieldDrop($event, group.name)\"\n >\n @if (group.fields.length === 0) {\n <axp-state-message\n icon=\"fa-light fa-plus\"\n [title]=\"'@dynamic-form-designer:fields.empty-group'\"\n [description]=\"'@dynamic-form-designer:fields.empty-group-description'\"\n >\n </axp-state-message>\n } @else {\n @for (field of group.fields; track field.id) {\n <div\n class=\"__field-item\"\n cdkDrag\n [class.__selected]=\"selectedFieldId() === field.id\"\n [axp-grid-layout]=\"getFieldGridLayout(group)\"\n >\n <div class=\"__drag-handle\" cdkDragHandle>\n <ax-icon icon=\"fa-light fa-grip-vertical\"></ax-icon>\n </div>\n\n <div class=\"__item-content\">\n <div class=\"__item-header\">\n <div class=\"__field-icon\">\n <ax-icon [icon]=\"getWidgetIcon(field.widget.type)\"></ax-icon>\n </div>\n <div class=\"__field-info\">\n <h4 class=\"__item-title\">{{ field.title }}</h4>\n <span class=\"__widget-type\">{{ getWidgetTitle(field.widget.type) }}</span>\n @if (field.description) {\n <p class=\"__field-description\">{{ field.description }}</p>\n }\n </div>\n </div>\n </div>\n\n @if (!readonly()) {\n <div class=\"__item-actions\">\n <ax-button\n class=\"ax-sm\"\n [look]=\"'blank'\"\n color=\"accent2\"\n (onClick)=\"handleFieldLayoutEdit(field, group)\"\n title=\"Configure field layout (colSpan, colStart)\"\n >\n <ax-icon class=\"fa-light fa-grid\"></ax-icon>\n </ax-button>\n <ax-button class=\"ax-sm\" [look]=\"'blank'\" color=\"accent3\" (onClick)=\"handleFieldEdit(field)\">\n <ax-icon class=\"fa-light fa-pencil\"></ax-icon>\n </ax-button>\n\n <ax-button [look]=\"'blank'\" class=\"ax-sm\" color=\"danger\" (onClick)=\"handleFieldRemove(field)\">\n <ax-icon class=\"fa-light fa-trash-can\"></ax-icon>\n </ax-button>\n </div>\n }\n </div>\n }\n }\n </div>\n </div>\n </div>\n }\n </div>\n }\n </div>\n</div>\n", styles: [".axp-dynamic-form-designer{width:100%;border-radius:.375rem;border-width:1px;background-color:rgb(var(--ax-sys-color-surface));color:rgb(var(--ax-sys-color-on-surface));border-color:rgb(var(--ax-sys-color-border-surface))}.axp-dynamic-form-designer .__header{display:flex;align-items:center;justify-content:space-between;border-bottom-width:1px;padding:1rem;background-color:rgb(var(--ax-sys-color-lighter-surface));color:rgb(var(--ax-sys-color-on-lighter-surface));border-color:rgb(var(--ax-sys-color-border-lighter-surface))}.axp-dynamic-form-designer .__header .__header-left{display:flex;gap:.5rem}.axp-dynamic-form-designer .__header .__header-right{display:flex;gap:.75rem}.axp-dynamic-form-designer .__content{padding:1rem}.axp-dynamic-form-designer .__content .__groups-container{display:flex;flex-direction:column;gap:1rem}.axp-dynamic-form-designer .__content .__group{border-radius:.375rem;border-width:1px;--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);background-color:rgb(var(--ax-sys-color-lightest-surface));color:rgb(var(--ax-sys-color-on-lightest-surface));border-color:rgb(var(--ax-sys-color-border-lightest-surface))}.axp-dynamic-form-designer .__content .__group .__group-header{display:flex;align-items:center;gap:.75rem;border-bottom-width:1px;padding:.75rem;background-color:rgb(var(--ax-sys-color-lighter-surface));color:rgb(var(--ax-sys-color-on-lighter-surface));border-color:rgb(var(--ax-sys-color-border-lighter-surface))}.axp-dynamic-form-designer .__content .__group .__group-header .__group-drag-handle{display:flex;height:1.5rem;width:1.5rem;align-items:center;justify-content:center;--tw-text-opacity: 1;color:rgb(163 163 163 / var(--tw-text-opacity, 1));cursor:grab}.axp-dynamic-form-designer .__content .__group .__group-header .__group-drag-handle:active{cursor:grabbing}.axp-dynamic-form-designer .__content .__group .__group-header .__group-drag-handle:hover{--tw-text-opacity: 1;color:rgb(82 82 82 / var(--tw-text-opacity, 1))}.axp-dynamic-form-designer .__content .__group .__group-header .__group-info{flex:1 1 0%}.axp-dynamic-form-designer .__content .__group .__group-header .__group-info .__group-title{margin-bottom:.25rem;font-size:1.125rem;line-height:1.75rem;font-weight:600}.axp-dynamic-form-designer .__content .__group .__group-header .__group-info .__group-description{font-size:.875rem;line-height:1.25rem;line-height:1.625;--tw-text-opacity: 1;color:rgb(82 82 82 / var(--tw-text-opacity, 1))}.axp-dynamic-form-designer .__content .__group .__group-header .__group-actions{display:flex;gap:.5rem}.axp-dynamic-form-designer .__content .__group .__fields-container{padding:1rem}.axp-dynamic-form-designer .__content .__group .__fields-container .__items-list{gap:.75rem;min-height:3rem;display:flex;flex-direction:column}.axp-dynamic-form-designer .__content .__group .__fields-container .__items-list:empty{display:flex;align-items:center;justify-content:center;--tw-text-opacity: 1;color:rgb(163 163 163 / var(--tw-text-opacity, 1))}.axp-dynamic-form-designer .__content .__group .__fields-container .__items-list:empty:before{content:\"Drop fields here\";font-size:.875rem;line-height:1.25rem;font-weight:500}.axp-dynamic-form-designer .__content .__group .__fields-container[data-columns=\"2\"] .__items-list,.axp-dynamic-form-designer .__content .__group .__fields-container[data-columns=\"3\"] .__items-list,.axp-dynamic-form-designer .__content .__group .__fields-container[data-columns=\"4\"] .__items-list{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:.75rem}.__field-item{display:flex;align-items:center;gap:.75rem;border-radius:.375rem;border-width:1px;padding:.75rem;--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);background-color:rgb(var(--ax-sys-color-lightest-surface));color:rgb(var(--ax-sys-color-on-lightest-surface));border-color:rgb(var(--ax-sys-color-border-lightest-surface));cursor:move;-webkit-user-select:none;-moz-user-select:-moz-none;user-select:none}.__field-item:hover{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);background-color:rgb(var(--ax-sys-color-lighter-surface));color:rgb(var(--ax-sys-color-on-lighter-surface));border-color:rgb(var(--ax-sys-color-border-lighter-surface))}.__field-item.__selected{--tw-border-opacity: 1;border-color:rgba(var(--ax-sys-color-accent2-500),var(--tw-border-opacity, 1));--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);background-color:rgb(var(--ax-sys-color-accent2-lightest-surface));color:rgb(var(--ax-sys-color-on-accent2-lightest-surface));border-color:rgb(var(--ax-sys-color-border-accent2-lightest-surface))}.__field-item .__drag-handle{display:flex;height:1.5rem;width:1.5rem;align-items:center;justify-content:center;--tw-text-opacity: 1;color:rgb(163 163 163 / var(--tw-text-opacity, 1));cursor:grab;transition:color .15s ease-in-out}.__field-item .__drag-handle:active{cursor:grabbing}.__field-item .__drag-handle:hover{--tw-text-opacity: 1;color:rgb(82 82 82 / var(--tw-text-opacity, 1))}.__field-item .__item-content{flex:1 1 0%}.__field-item .__item-content .__item-header{margin-bottom:.5rem;display:flex;align-items:center;gap:.75rem}.__field-item .__item-content .__item-header .__field-icon{display:flex;height:2.5rem;width:2.5rem;align-items:center;justify-content:center;border-radius:.375rem;--tw-text-opacity: 1;color:rgba(var(--ax-sys-color-accent2-500),var(--tw-text-opacity, 1));--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);background-color:rgb(var(--ax-sys-color-accent2-lightest-surface));color:rgb(var(--ax-sys-color-on-accent2-lightest-surface));border-color:rgb(var(--ax-sys-color-border-accent2-lightest-surface))}.__field-item .__item-content .__item-header .__field-info{flex:1 1 0%}.__field-item .__item-content .__item-header .__field-info .__item-title{margin-bottom:.25rem;font-size:1rem;line-height:1.5rem;font-weight:600}.__field-item .__item-content .__item-header .__field-info .__widget-type{font-size:.875rem;line-height:1.25rem;font-weight:500;--tw-text-opacity: 1;color:rgb(82 82 82 / var(--tw-text-opacity, 1))}.__field-item .__item-content .__item-header .__field-info .__field-description{margin-top:.25rem;font-size:.875rem;line-height:1.25rem;line-height:1.625;--tw-text-opacity: 1;color:rgb(115 115 115 / var(--tw-text-opacity, 1))}.__field-item .__item-actions{display:flex;gap:.5rem}.__group.cdk-drag-preview{border-radius:.375rem;border-width:1px;--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);background-color:rgb(var(--ax-sys-color-lightest-surface));color:rgb(var(--ax-sys-color-on-lightest-surface));border-color:rgb(var(--ax-sys-color-border-lightest-surface))}.__group.cdk-drag-preview .__group-header{display:flex;align-items:center;gap:.75rem;border-bottom-width:1px;padding:.75rem;background-color:rgb(var(--ax-sys-color-lighter-surface));color:rgb(var(--ax-sys-color-on-lighter-surface));border-color:rgb(var(--ax-sys-color-border-lighter-surface))}.__group.cdk-drag-preview .__group-info{flex:1 1 0%}.__group.cdk-drag-preview .__group-info .__group-title{margin-bottom:.25rem;font-size:1.125rem;line-height:1.75rem;font-weight:600}.__group.cdk-drag-preview .__group-info .__group-description{font-size:.875rem;line-height:1.25rem;--tw-text-opacity: 1;color:rgb(82 82 82 / var(--tw-text-opacity, 1))}.__group.cdk-drag-preview .__fields-container{padding:.75rem}.__group.cdk-drag-preview .__fields-container .__field-item{display:flex;align-items:center;gap:.75rem;border-radius:.375rem;border-width:1px;padding:.75rem;background-color:rgb(var(--ax-sys-color-lightest-surface));color:rgb(var(--ax-sys-color-on-lightest-surface));border-color:rgb(var(--ax-sys-color-border-lightest-surface))}.__group.cdk-drag-preview .__fields-container .__field-item .__field-icon{display:flex;height:2rem;width:2rem;align-items:center;justify-content:center;border-radius:.25rem;--tw-text-opacity: 1;color:rgba(var(--ax-sys-color-accent2-500),var(--tw-text-opacity, 1));background-color:rgb(var(--ax-sys-color-accent2-lightest-surface));color:rgb(var(--ax-sys-color-on-accent2-lightest-surface));border-color:rgb(var(--ax-sys-color-border-accent2-lightest-surface))}.__group.cdk-drag-preview .__fields-container .__field-item .__item-content{flex:1 1 0%}.__group.cdk-drag-preview .__fields-container .__field-item .__item-content .__item-title{margin-bottom:0;font-size:.875rem;line-height:1.25rem;font-weight:500}.__group.cdk-drag-preview .__fields-container .__field-item .__item-content .__widget-type{font-size:.75rem;line-height:1rem;--tw-text-opacity: 1;color:rgb(82 82 82 / var(--tw-text-opacity, 1))}.__group.cdk-drag-placeholder{border-width:2px;border-style:dashed;--tw-border-opacity: 1;border-color:rgba(var(--ax-sys-color-accent2-500),var(--tw-border-opacity, 1));opacity:.5;background-color:rgb(var(--ax-sys-color-accent2-lightest-surface));color:rgb(var(--ax-sys-color-on-accent2-lightest-surface));border-color:rgb(var(--ax-sys-color-border-accent2-lightest-surface))}.__group.cdk-drag-dragging{opacity:.7}.__group:hover:not(.cdk-drag-dragging) .__group-drag-handle{--tw-text-opacity: 1;color:rgba(var(--ax-sys-color-accent2-500),var(--tw-text-opacity, 1))}.__field-item.cdk-drag-preview{border-radius:.375rem;border-width:1px;--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);background-color:rgb(var(--ax-sys-color-lightest-surface));color:rgb(var(--ax-sys-color-on-lightest-surface));border-color:rgb(var(--ax-sys-color-border-lightest-surface))}.__field-item.cdk-drag-placeholder{border-width:2px;border-style:dashed;--tw-border-opacity: 1;border-color:rgba(var(--ax-sys-color-accent2-500),var(--tw-border-opacity, 1));opacity:.5;background-color:rgb(var(--ax-sys-color-accent2-lightest-surface));color:rgb(var(--ax-sys-color-on-accent2-lightest-surface));border-color:rgb(var(--ax-sys-color-border-accent2-lightest-surface))}.__items-list.cdk-drop-list-dragging{position:relative;min-height:4rem}.__items-list.cdk-drop-list-dragging axp-state-message{display:none}.__items-list.cdk-drop-list-dragging:has(axp-state-message):after{content:\"Drop fields here\";position:absolute;top:0;right:0;bottom:0;left:0;display:flex;align-items:center;justify-content:center;border-radius:.375rem;border-width:2px;border-style:dashed;--tw-border-opacity: 1;border-color:rgb(212 212 212 / var(--tw-border-opacity, 1));--tw-bg-opacity: 1;background-color:rgb(250 250 250 / var(--tw-bg-opacity, 1));font-size:.875rem;line-height:1.25rem;--tw-text-opacity: 1;color:rgb(115 115 115 / var(--tw-text-opacity, 1));margin:.5rem;z-index:-1;pointer-events:none;min-height:3rem}.__items-list.cdk-drop-list-receiving{position:relative;min-height:4rem}.__items-list.cdk-drop-list-receiving axp-state-message{display:none}.__items-list.cdk-drop-list-receiving:has(axp-state-message):after{content:\"Drop fields here\";position:absolute;top:0;right:0;bottom:0;left:0;display:flex;align-items:center;justify-content:center;border-width:2px;border-style:dashed;--tw-border-opacity: 1;border-color:rgba(var(--ax-sys-color-accent2-500),var(--tw-border-opacity, 1));font-size:.875rem;line-height:1.25rem;--tw-text-opacity: 1;color:rgba(var(--ax-sys-color-accent2-500),var(--tw-text-opacity, 1));background-color:rgb(var(--ax-sys-color-accent2-lightest-surface));color:rgb(var(--ax-sys-color-on-accent2-lightest-surface));border-color:rgb(var(--ax-sys-color-border-accent2-lightest-surface));margin:.5rem;z-index:-1;pointer-events:none;min-height:3rem}.__groups-container.cdk-drop-list-dragging{border-radius:.5rem;padding:.5rem;background-color:rgb(var(--ax-sys-color-accent2-lightest-surface));color:rgb(var(--ax-sys-color-on-accent2-lightest-surface));border-color:rgb(var(--ax-sys-color-border-accent2-lightest-surface));border-width:2px;border-style:dashed;--tw-border-opacity: 1;border-color:rgba(var(--ax-sys-color-accent2-500),var(--tw-border-opacity, 1))}.cdk-drop-list.cdk-drop-list-receiving{background-color:rgb(var(--ax-sys-color-accent2-lightest-surface));color:rgb(var(--ax-sys-color-on-accent2-lightest-surface));border-color:rgb(var(--ax-sys-color-border-accent2-lightest-surface))}\n"] }]
|
|
2814
|
+
}] });
|
|
2055
2815
|
|
|
2056
2816
|
//#endregion
|
|
2057
2817
|
//#region ---- Injection Tokens ----
|
|
@@ -2303,8 +3063,8 @@ class AXPExtraPropertiesComponent {
|
|
|
2303
3063
|
i++;
|
|
2304
3064
|
return `${k}${i}`;
|
|
2305
3065
|
}
|
|
2306
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
2307
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.
|
|
3066
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPExtraPropertiesComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3067
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.4", type: AXPExtraPropertiesComponent, isStandalone: true, selector: "axp-extra-properties", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { itemsChange: "itemsChange" }, host: { classAttribute: "ax-block ax-flex-1" }, ngImport: i0, template: `
|
|
2308
3068
|
<div class="ax-grid ax-grid-cols-12 ax-gap-4">
|
|
2309
3069
|
<axp-widgets-container [context]="internalContext()" (onContextChanged)="onContextChanged($event)">
|
|
2310
3070
|
<div cdkDropList (cdkDropListDropped)="handleDrop($event)" class="ax-col-span-12 ax-flex ax-flex-col ax-gap-3">
|
|
@@ -2394,9 +3154,9 @@ class AXPExtraPropertiesComponent {
|
|
|
2394
3154
|
</axp-widgets-container>
|
|
2395
3155
|
</div>
|
|
2396
3156
|
|
|
2397
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: AXFormModule }, { kind: "component", type: i2$
|
|
3157
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: AXFormModule }, { kind: "component", type: i2$4.AXFormFieldComponent, selector: "ax-form-field", inputs: ["labelMode"] }, { kind: "ngmodule", type: AXLabelModule }, { kind: "component", type: i3$1.AXLabelComponent, selector: "ax-label", inputs: ["required", "for"], outputs: ["requiredChange"] }, { kind: "ngmodule", type: AXTextBoxModule }, { kind: "component", type: i4$4.AXTextBoxComponent, selector: "ax-text-box", inputs: ["disabled", "tabIndex", "readonly", "value", "state", "name", "id", "placeholder", "maxLength", "allowNull", "type", "autoComplete", "look", "mask-options", "class"], outputs: ["onBlur", "onFocus", "valueChange", "stateChange", "onValueChanged", "readonlyChange", "disabledChange", "onKeyDown", "onKeyUp", "onKeyPress"] }, { kind: "ngmodule", type: AXSelectBoxModule }, { kind: "component", type: i5$2.AXSelectBoxComponent, selector: "ax-select-box", inputs: ["disabled", "readonly", "tabIndex", "placeholder", "minValue", "maxValue", "value", "state", "name", "id", "type", "look", "multiple", "valueField", "textField", "disabledField", "textTemplate", "selectedItems", "isItemTruncated", "showItemTooltip", "dataSource", "minRecordsForSearch", "caption", "itemTemplate", "selectedTemplate", "emptyTemplate", "loadingTemplate", "dropdownWidth", "searchBoxAutoFocus"], outputs: ["valueChange", "stateChange", "onValueChanged", "onBlur", "onFocus", "readonlyChange", "disabledChange", "onOpened", "onClosed", "onItemSelected", "onItemClick"] }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i5$1.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i2$1.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i2$1.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXPWidgetCoreModule }, { kind: "component", type: i3$2.AXPWidgetContainerComponent, selector: "axp-widgets-container", inputs: ["context", "functions"], outputs: ["onContextChanged"] }, { kind: "directive", type: i3$2.AXPWidgetRendererDirective, selector: "[axp-widget-renderer]", inputs: ["parentNode", "index", "mode", "node"], outputs: ["onOptionsChanged", "onValueChanged"], exportAs: ["widgetRenderer"] }, { kind: "ngmodule", type: DragDropModule }, { kind: "directive", type: i3$3.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer", "cdkDropListHasAnchor"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i3$3.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i3$3.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "pipe", type: i5.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2398
3158
|
}
|
|
2399
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
3159
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPExtraPropertiesComponent, decorators: [{
|
|
2400
3160
|
type: Component,
|
|
2401
3161
|
args: [{
|
|
2402
3162
|
selector: 'axp-extra-properties',
|
|
@@ -2501,7 +3261,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.8", ngImpor
|
|
|
2501
3261
|
AXSelectBoxModule,
|
|
2502
3262
|
AXButtonModule,
|
|
2503
3263
|
AXDecoratorModule,
|
|
2504
|
-
|
|
3264
|
+
AXPWidgetCoreModule,
|
|
2505
3265
|
DragDropModule,
|
|
2506
3266
|
AXTranslationModule,
|
|
2507
3267
|
//AXPGridLayoutDirective,
|
|
@@ -2607,12 +3367,12 @@ class AXPWidgetPropertyViewerComponent {
|
|
|
2607
3367
|
handleCollapsedChange(group, collapsed) {
|
|
2608
3368
|
this.groupCollapsedStates.set(group, collapsed);
|
|
2609
3369
|
}
|
|
2610
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
2611
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.
|
|
3370
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPWidgetPropertyViewerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3371
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.4", type: AXPWidgetPropertyViewerComponent, isStandalone: true, selector: "axp-widget-property-viewer", inputs: { widget: { classPropertyName: "widget", publicName: "widget", isSignal: true, isRequired: true, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onChanged: "onChanged" }, ngImport: i0, template: "<axp-widgets-container [context]=\"context()\" (onContextChanged)=\"handleContextChange($event)\">\n @if (mode() == 'advanced') {\n <div class=\"ax-flex ax-flex-col\">\n @if (tabs().length > 1) {\n <div class=\"ax-pb-2\">\n <ax-tabs look=\"default\" (onActiveTabChanged)=\"handleTabChange($event)\" [look]=\"'with-line'\">\n @for (tab of tabs(); track $index) {\n <ax-tab-item [text]=\"tab.title\" [key]=\"$index.toString()\" [active]=\"currentTabIndex() === $index\">\n </ax-tab-item>\n }\n </ax-tabs>\n </div>\n }\n <div class=\"ax-flex-1 ax-overflow-auto\">\n <ax-accordion-group class=\"ax-h-fit\" [look]=\"'flat'\">\n @for (group of groups(); track $index) {\n <ax-accordion-item class=\"!ax-mb-0\" [caption]=\"group.title\" [isCollapsed]=\"group.isCollapsed\"\n (isCollapsedChange)=\"handleCollapsedChange(group.name, $event)\">\n <div class=\"ax-flex ax-flex-col\">\n @for (p of group.props; track $index) {\n <div class=\"ax-flex ax-flex-col ax-gap-1 ax-py-2\">\n <span class=\"ax-font-semibold\">{{ p.title }}</span>\n @if (p.schema.interface) {\n <ng-container axp-widget-renderer [node]=\"p.schema.interface\" [mode]=\"'edit'\"> </ng-container>\n }\n </div>\n }\n </div>\n </ax-accordion-item>\n }\n </ax-accordion-group>\n </div>\n </div>\n }\n <!-- Simple-->\n @else {\n <div class=\"ax-flex ax-flex-col ax-p-4 ax-gap-4\">\n <!-- groups -->\n @for (group of groups(); track $index) {\n <!-- props -->\n @for (p of group.props; track $index) {\n <div class=\"ax-flex ax-flex-col ax-gap-2\">\n <span class=\"ax-font-semibold\">{{ p.title | translate | async }}</span>\n @if (p.schema.interface) {\n <ng-container axp-widget-renderer [node]=\"p.schema.interface\" [mode]=\"'edit'\"> </ng-container>\n }\n </div>\n }\n }\n </div>\n }\n</axp-widgets-container>", styles: ["axp-widget-property-viewer ax-accordion-item .ax-accordion-header{font-weight:600!important}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXAccordionModule }, { kind: "component", type: i1$2.AXAccordionItemComponent, selector: "ax-accordion-item", inputs: ["isCollapsed", "icon", "caption", "isLoading", "headerTemplate", "look", "disabled"], outputs: ["isCollapsedChange", "isLoadingChange", "onClick"] }, { kind: "component", type: i1$2.AXAccordionGroupComponent, selector: "ax-accordion-group", inputs: ["accordion", "activeIndex", "look", "collapsedOnItemClick"], outputs: ["activeIndexChange"] }, { kind: "ngmodule", type: AXTabsModule }, { kind: "component", type: i2$5.AXTabsComponent, selector: "ax-tabs", inputs: ["look", "location", "fitParent", "minWidth", "content"], outputs: ["onActiveTabChanged"] }, { kind: "component", type: i2$5.AXTabItemComponent, selector: "ax-tab-item", inputs: ["disabled", "text", "key", "headerTemplate", "active"], outputs: ["disabledChange", "onClick", "onBlur", "onFocus", "activeChange"] }, { kind: "ngmodule", type: AXPWidgetCoreModule }, { kind: "component", type: i3$2.AXPWidgetContainerComponent, selector: "axp-widgets-container", inputs: ["context", "functions"], outputs: ["onContextChanged"] }, { kind: "directive", type: i3$2.AXPWidgetRendererDirective, selector: "[axp-widget-renderer]", inputs: ["parentNode", "index", "mode", "node"], outputs: ["onOptionsChanged", "onValueChanged"], exportAs: ["widgetRenderer"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "pipe", type: i5.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
2612
3372
|
}
|
|
2613
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
3373
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPWidgetPropertyViewerComponent, decorators: [{
|
|
2614
3374
|
type: Component,
|
|
2615
|
-
args: [{ selector: 'axp-widget-property-viewer', changeDetection: ChangeDetectionStrategy.OnPush, imports: [CommonModule,
|
|
3375
|
+
args: [{ selector: 'axp-widget-property-viewer', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [CommonModule, AXAccordionModule, AXTabsModule, AXPWidgetCoreModule, AXTranslationModule], template: "<axp-widgets-container [context]=\"context()\" (onContextChanged)=\"handleContextChange($event)\">\n @if (mode() == 'advanced') {\n <div class=\"ax-flex ax-flex-col\">\n @if (tabs().length > 1) {\n <div class=\"ax-pb-2\">\n <ax-tabs look=\"default\" (onActiveTabChanged)=\"handleTabChange($event)\" [look]=\"'with-line'\">\n @for (tab of tabs(); track $index) {\n <ax-tab-item [text]=\"tab.title\" [key]=\"$index.toString()\" [active]=\"currentTabIndex() === $index\">\n </ax-tab-item>\n }\n </ax-tabs>\n </div>\n }\n <div class=\"ax-flex-1 ax-overflow-auto\">\n <ax-accordion-group class=\"ax-h-fit\" [look]=\"'flat'\">\n @for (group of groups(); track $index) {\n <ax-accordion-item class=\"!ax-mb-0\" [caption]=\"group.title\" [isCollapsed]=\"group.isCollapsed\"\n (isCollapsedChange)=\"handleCollapsedChange(group.name, $event)\">\n <div class=\"ax-flex ax-flex-col\">\n @for (p of group.props; track $index) {\n <div class=\"ax-flex ax-flex-col ax-gap-1 ax-py-2\">\n <span class=\"ax-font-semibold\">{{ p.title }}</span>\n @if (p.schema.interface) {\n <ng-container axp-widget-renderer [node]=\"p.schema.interface\" [mode]=\"'edit'\"> </ng-container>\n }\n </div>\n }\n </div>\n </ax-accordion-item>\n }\n </ax-accordion-group>\n </div>\n </div>\n }\n <!-- Simple-->\n @else {\n <div class=\"ax-flex ax-flex-col ax-p-4 ax-gap-4\">\n <!-- groups -->\n @for (group of groups(); track $index) {\n <!-- props -->\n @for (p of group.props; track $index) {\n <div class=\"ax-flex ax-flex-col ax-gap-2\">\n <span class=\"ax-font-semibold\">{{ p.title | translate | async }}</span>\n @if (p.schema.interface) {\n <ng-container axp-widget-renderer [node]=\"p.schema.interface\" [mode]=\"'edit'\"> </ng-container>\n }\n </div>\n }\n }\n </div>\n }\n</axp-widgets-container>", styles: ["axp-widget-property-viewer ax-accordion-item .ax-accordion-header{font-weight:600!important}\n"] }]
|
|
2616
3376
|
}], ctorParameters: () => [], propDecorators: { onChanged: [{
|
|
2617
3377
|
type: Output
|
|
2618
3378
|
}] } });
|
|
@@ -2742,10 +3502,10 @@ class AXPExtraPropertiesSchemaComponent {
|
|
|
2742
3502
|
i++;
|
|
2743
3503
|
return `${k}${i}`;
|
|
2744
3504
|
}
|
|
2745
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
2746
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.8", type: AXPExtraPropertiesSchemaComponent, isStandalone: true, selector: "axp-extra-properties-schema", inputs: { schema: { classPropertyName: "schema", publicName: "schema", isSignal: true, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { schemaChange: "schemaChange" }, host: { classAttribute: "ax-flex ax-flex-1 ax-h-full ax-gap-4 ax-p-4" }, ngImport: i0, template: "<!-- Left Panel: list/manage properties -->\n<div class=\"ax-flex ax-flex-col ax-gap-3 ax-min-h-0 ax-h-full ax-w-2/3\">\n <div class=\"ax-overflow-y-auto ax-min-h-0 ax-h-full ax-pe-2 -ax-me-2\">\n <div cdkDropList (cdkDropListDropped)=\"handleDrop($event)\" class=\"ax-flex ax-flex-col ax-gap-3\">\n @for (item of schema(); track item.key) {\n @if (mode() === 'edit') {\n <div class=\"ax-grid ax-grid-cols-12 ax-gap-4 ax-items-center ax-rounded ax-border ax-p-3 ax-cursor-pointer ax-lightest-surface \"\n [class.!ax-lighter-surface]=\"item.key === selectedKey()\" (click)=\"handleSelect(item.key)\" cdkDrag\n [cdkDragDisabled]=\"false\">\n <div class=\"ax-col-span-12 md:ax-col-span-4 ax-flex ax-items-center ax-gap-3\">\n <ax-icon class=\"fa-solid fa-grip-dots-vertical ax-cursor-move ax-text-neutral-500\"\n cdkDragHandle></ax-icon>\n <div>\n <div class=\"ax-font-semibold\">{{ item.title }}</div>\n </div>\n </div>\n <div class=\"ax-col-span-12 md:ax-col-span-7 ax-grid ax-grid-cols-12 ax-gap-4 ax-items-center\">\n <ax-form-field class=\"ax-col-span-12 md:ax-col-span-6\">\n <ax-select-box [value]=\"item.type\" [dataSource]=\"typeOptions()\" valueField=\"id\"\n textField=\"title\"\n (onValueChanged)=\"handleUpdateType(item.key, $event.value)\"></ax-select-box>\n </ax-form-field>\n <ax-form-field class=\"ax-col-span-12 md:ax-col-span-6\">\n <ax-text-box [ngModel]=\"item.title\"\n (onValueChanged)=\"handleUpdateTitle(item.key, $event.value)\"></ax-text-box>\n </ax-form-field>\n </div>\n <div class=\"ax-hidden md:ax-block md:ax-col-span-1 md:ax-justify-self-end\">\n <ax-button look=\"blank\" color=\"danger\" (onClick)=\"handleRemove(item.key)\">\n <ax-prefix><ax-icon class=\"fa-light fa-trash-can\"></ax-icon></ax-prefix>\n </ax-button>\n </div>\n </div>\n } @else {\n <div class=\"ax-grid ax-grid-cols-12 ax-gap-1 ax-rounded ax-border ax-p-3\">\n <div class=\"ax-font-semibold\">{{ item.title }}</div>\n <div class=\"ax-col-span-12 ax-text-xs ax-text-muted\">{{ item.key }}</div>\n </div>\n }\n } @empty {\n <div class=\"ax-text-sm ax-text-gray-400\">{{ '@extra-properties:messages.no-schema-fields' | translate |\n async\n }}</div>\n }\n\n @if (mode() === 'edit') {\n <div class=\"ax-grid ax-grid-cols-12 ax-gap-4 ax-items-end ax-mt-4 ax-border-t ax-border-dashed ax-pt-4\">\n <!-- Type -->\n <ax-form-field class=\"ax-col-span-12 md:ax-col-span-6 lg:ax-col-span-6\">\n <ax-label>{{ '@extra-properties:labels.type' | translate | async }}</ax-label>\n <ax-select-box [ngModel]=\"newTypeId()\" [dataSource]=\"typeOptions()\" valueField=\"id\"\n textField=\"title\" (onValueChanged)=\"newTypeChanged($event.value)\"></ax-select-box>\n </ax-form-field>\n <!-- Title -->\n <ax-form-field class=\"ax-col-span-12 md:ax-col-span-6 lg:ax-col-span-6\">\n <ax-label>{{ '@extra-properties:labels.title' | translate | async }}</ax-label>\n <ax-text-box [ngModel]=\"newTitle()\"\n (onValueChanged)=\"handleTitleChange($event.value)\"></ax-text-box>\n </ax-form-field>\n <!-- Add -->\n <div class=\"ax-col-span-12 ax-flex ax-justify-end\">\n <ax-button look=\"solid\" (onClick)=\"handleAdd()\" [disabled]=\"!canAdd()\"\n text=\"{{ '@extra-properties:actions.add-field' | translate | async }}\">\n <ax-prefix><ax-icon class=\"fa-solid fa-add\"></ax-icon></ax-prefix>\n </ax-button>\n </div>\n </div>\n }\n </div>\n </div>\n</div>\n\n<!-- Right Panel: widget property viewer for selected item -->\n<div class=\"ax-w-1/3 ax-border ax-rounded ax-h-full ax-flex ax-flex-col ax-lightest-surface\">\n @if (mode() === 'edit' && selectedItem()) {\n <div class=\"ax-p-4 ax-font-semibold ax-border-b ax-lighter-surface\">\n {{selectedItem()?.title}}\n </div>\n <div class=\"ax-overflow-y-auto ax-flex-1\">\n <axp-widget-property-viewer [widget]=\"{ type: selectedItem()!.type, options: selectedItem()!.options }\"\n [mode]=\"'advanced'\" (onChanged)=\"handleViewerChanged($event)\" />\n </div>\n }\n @else {\n <div class=\"ax-text-sm ax-text-muted ax-p-4 ax-text-center\">{{ '@extra-properties:messages.select-field-to-edit' |\n translate | async }}</div>\n }\n</div>", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: AXFormModule }, { kind: "component", type: i2$2.AXFormFieldComponent, selector: "ax-form-field", inputs: ["labelMode"] }, { kind: "ngmodule", type: AXLabelModule }, { kind: "component", type: i3$3.AXLabelComponent, selector: "ax-label", inputs: ["required", "for"], outputs: ["requiredChange"] }, { kind: "ngmodule", type: AXTextBoxModule }, { kind: "component", type: i4$3.AXTextBoxComponent, selector: "ax-text-box", inputs: ["disabled", "tabIndex", "readonly", "value", "state", "name", "id", "placeholder", "maxLength", "allowNull", "type", "autoComplete", "look", "mask-options", "class"], outputs: ["onBlur", "onFocus", "valueChange", "stateChange", "onValueChanged", "readonlyChange", "disabledChange", "onKeyDown", "onKeyUp", "onKeyPress"] }, { kind: "ngmodule", type: AXSelectBoxModule }, { kind: "component", type: i5$3.AXSelectBoxComponent, selector: "ax-select-box", inputs: ["disabled", "readonly", "tabIndex", "placeholder", "minValue", "maxValue", "value", "state", "name", "id", "type", "look", "multiple", "valueField", "textField", "disabledField", "textTemplate", "selectedItems", "isItemTruncated", "showItemTooltip", "dataSource", "minRecordsForSearch", "caption", "itemTemplate", "selectedTemplate", "emptyTemplate", "loadingTemplate", "dropdownWidth", "searchBoxAutoFocus"], outputs: ["valueChange", "stateChange", "onValueChanged", "onBlur", "onFocus", "readonlyChange", "disabledChange", "onOpened", "onClosed", "onItemSelected", "onItemClick"] }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i2$1.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i3.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i3.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: DragDropModule }, { kind: "directive", type: i9.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer", "cdkDropListHasAnchor"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i9.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i9.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "component", type: AXPWidgetPropertyViewerComponent, selector: "axp-widget-property-viewer", inputs: ["widget", "mode"], outputs: ["onChanged"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "pipe", type: i5.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3505
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPExtraPropertiesSchemaComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3506
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.4", type: AXPExtraPropertiesSchemaComponent, isStandalone: true, selector: "axp-extra-properties-schema", inputs: { schema: { classPropertyName: "schema", publicName: "schema", isSignal: true, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { schemaChange: "schemaChange" }, host: { classAttribute: "ax-flex ax-flex-1 ax-h-full ax-gap-4 ax-p-4" }, ngImport: i0, template: "<!-- Left Panel: list/manage properties -->\n<div class=\"ax-flex ax-flex-col ax-gap-3 ax-min-h-0 ax-h-full ax-w-2/3\">\n <div class=\"ax-overflow-y-auto ax-min-h-0 ax-h-full ax-pe-2 -ax-me-2\">\n <div cdkDropList (cdkDropListDropped)=\"handleDrop($event)\" class=\"ax-flex ax-flex-col ax-gap-3\">\n @for (item of schema(); track item.key) {\n @if (mode() === 'edit') {\n <div class=\"ax-grid ax-grid-cols-12 ax-gap-4 ax-items-center ax-rounded ax-border ax-p-3 ax-cursor-pointer ax-lightest-surface \"\n [class.!ax-lighter-surface]=\"item.key === selectedKey()\" (click)=\"handleSelect(item.key)\" cdkDrag\n [cdkDragDisabled]=\"false\">\n <div class=\"ax-col-span-12 md:ax-col-span-4 ax-flex ax-items-center ax-gap-3\">\n <ax-icon class=\"fa-solid fa-grip-dots-vertical ax-cursor-move ax-text-neutral-500\"\n cdkDragHandle></ax-icon>\n <div>\n <div class=\"ax-font-semibold\">{{ item.title }}</div>\n </div>\n </div>\n <div class=\"ax-col-span-12 md:ax-col-span-7 ax-grid ax-grid-cols-12 ax-gap-4 ax-items-center\">\n <ax-form-field class=\"ax-col-span-12 md:ax-col-span-6\">\n <ax-select-box [value]=\"item.type\" [dataSource]=\"typeOptions()\" valueField=\"id\"\n textField=\"title\"\n (onValueChanged)=\"handleUpdateType(item.key, $event.value)\"></ax-select-box>\n </ax-form-field>\n <ax-form-field class=\"ax-col-span-12 md:ax-col-span-6\">\n <ax-text-box [ngModel]=\"item.title\"\n (onValueChanged)=\"handleUpdateTitle(item.key, $event.value)\"></ax-text-box>\n </ax-form-field>\n </div>\n <div class=\"ax-hidden md:ax-block md:ax-col-span-1 md:ax-justify-self-end\">\n <ax-button look=\"blank\" color=\"danger\" (onClick)=\"handleRemove(item.key)\">\n <ax-prefix><ax-icon class=\"fa-light fa-trash-can\"></ax-icon></ax-prefix>\n </ax-button>\n </div>\n </div>\n } @else {\n <div class=\"ax-grid ax-grid-cols-12 ax-gap-1 ax-rounded ax-border ax-p-3\">\n <div class=\"ax-font-semibold\">{{ item.title }}</div>\n <div class=\"ax-col-span-12 ax-text-xs ax-text-muted\">{{ item.key }}</div>\n </div>\n }\n } @empty {\n <div class=\"ax-text-sm ax-text-gray-400\">{{ '@extra-properties:messages.no-schema-fields' | translate |\n async\n }}</div>\n }\n\n @if (mode() === 'edit') {\n <div class=\"ax-grid ax-grid-cols-12 ax-gap-4 ax-items-end ax-mt-4 ax-border-t ax-border-dashed ax-pt-4\">\n <!-- Type -->\n <ax-form-field class=\"ax-col-span-12 md:ax-col-span-6 lg:ax-col-span-6\">\n <ax-label>{{ '@extra-properties:labels.type' | translate | async }}</ax-label>\n <ax-select-box [ngModel]=\"newTypeId()\" [dataSource]=\"typeOptions()\" valueField=\"id\"\n textField=\"title\" (onValueChanged)=\"newTypeChanged($event.value)\"></ax-select-box>\n </ax-form-field>\n <!-- Title -->\n <ax-form-field class=\"ax-col-span-12 md:ax-col-span-6 lg:ax-col-span-6\">\n <ax-label>{{ '@extra-properties:labels.title' | translate | async }}</ax-label>\n <ax-text-box [ngModel]=\"newTitle()\"\n (onValueChanged)=\"handleTitleChange($event.value)\"></ax-text-box>\n </ax-form-field>\n <!-- Add -->\n <div class=\"ax-col-span-12 ax-flex ax-justify-end\">\n <ax-button look=\"solid\" (onClick)=\"handleAdd()\" [disabled]=\"!canAdd()\"\n text=\"{{ '@extra-properties:actions.add-field' | translate | async }}\">\n <ax-prefix><ax-icon class=\"fa-solid fa-add\"></ax-icon></ax-prefix>\n </ax-button>\n </div>\n </div>\n }\n </div>\n </div>\n</div>\n\n<!-- Right Panel: widget property viewer for selected item -->\n<div class=\"ax-w-1/3 ax-border ax-rounded ax-h-full ax-flex ax-flex-col ax-lightest-surface\">\n @if (mode() === 'edit' && selectedItem()) {\n <div class=\"ax-p-4 ax-font-semibold ax-border-b ax-lighter-surface\">\n {{selectedItem()?.title}}\n </div>\n <div class=\"ax-overflow-y-auto ax-flex-1\">\n <axp-widget-property-viewer [widget]=\"{ type: selectedItem()!.type, options: selectedItem()!.options }\"\n [mode]=\"'advanced'\" (onChanged)=\"handleViewerChanged($event)\" />\n </div>\n }\n @else {\n <div class=\"ax-text-sm ax-text-muted ax-p-4 ax-text-center\">{{ '@extra-properties:messages.select-field-to-edit' |\n translate | async }}</div>\n }\n</div>", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: AXFormModule }, { kind: "component", type: i2$4.AXFormFieldComponent, selector: "ax-form-field", inputs: ["labelMode"] }, { kind: "ngmodule", type: AXLabelModule }, { kind: "component", type: i3$1.AXLabelComponent, selector: "ax-label", inputs: ["required", "for"], outputs: ["requiredChange"] }, { kind: "ngmodule", type: AXTextBoxModule }, { kind: "component", type: i4$4.AXTextBoxComponent, selector: "ax-text-box", inputs: ["disabled", "tabIndex", "readonly", "value", "state", "name", "id", "placeholder", "maxLength", "allowNull", "type", "autoComplete", "look", "mask-options", "class"], outputs: ["onBlur", "onFocus", "valueChange", "stateChange", "onValueChanged", "readonlyChange", "disabledChange", "onKeyDown", "onKeyUp", "onKeyPress"] }, { kind: "ngmodule", type: AXSelectBoxModule }, { kind: "component", type: i5$2.AXSelectBoxComponent, selector: "ax-select-box", inputs: ["disabled", "readonly", "tabIndex", "placeholder", "minValue", "maxValue", "value", "state", "name", "id", "type", "look", "multiple", "valueField", "textField", "disabledField", "textTemplate", "selectedItems", "isItemTruncated", "showItemTooltip", "dataSource", "minRecordsForSearch", "caption", "itemTemplate", "selectedTemplate", "emptyTemplate", "loadingTemplate", "dropdownWidth", "searchBoxAutoFocus"], outputs: ["valueChange", "stateChange", "onValueChanged", "onBlur", "onFocus", "readonlyChange", "disabledChange", "onOpened", "onClosed", "onItemSelected", "onItemClick"] }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i5$1.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i2$1.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i2$1.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: DragDropModule }, { kind: "directive", type: i3$3.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer", "cdkDropListHasAnchor"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i3$3.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i3$3.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "component", type: AXPWidgetPropertyViewerComponent, selector: "axp-widget-property-viewer", inputs: ["widget", "mode"], outputs: ["onChanged"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "pipe", type: i5.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2747
3507
|
}
|
|
2748
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
3508
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPExtraPropertiesSchemaComponent, decorators: [{
|
|
2749
3509
|
type: Component,
|
|
2750
3510
|
args: [{ selector: 'axp-extra-properties-schema', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
2751
3511
|
CommonModule,
|
|
@@ -2863,8 +3623,8 @@ class AXPExtraPropertiesValuesComponent {
|
|
|
2863
3623
|
}
|
|
2864
3624
|
return node;
|
|
2865
3625
|
}
|
|
2866
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
2867
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.
|
|
3626
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPExtraPropertiesValuesComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3627
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.4", type: AXPExtraPropertiesValuesComponent, isStandalone: true, selector: "axp-extra-properties-values", inputs: { schema: { classPropertyName: "schema", publicName: "schema", isSignal: true, isRequired: false, transformFunction: null }, values: { classPropertyName: "values", publicName: "values", isSignal: true, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valuesChange: "valuesChange" }, host: { classAttribute: "ax-block ax-flex-1" }, ngImport: i0, template: `
|
|
2868
3628
|
<div class="ax-grid ax-grid-cols-12 ax-gap-4">
|
|
2869
3629
|
<axp-widgets-container [context]="internalContext()" (onContextChanged)="onContextChanged($event)">
|
|
2870
3630
|
<div class="ax-col-span-12 ax-flex ax-flex-col ax-gap-3">
|
|
@@ -2894,9 +3654,9 @@ class AXPExtraPropertiesValuesComponent {
|
|
|
2894
3654
|
</div>
|
|
2895
3655
|
</axp-widgets-container>
|
|
2896
3656
|
</div>
|
|
2897
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type:
|
|
3657
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXPWidgetCoreModule }, { kind: "component", type: i3$2.AXPWidgetContainerComponent, selector: "axp-widgets-container", inputs: ["context", "functions"], outputs: ["onContextChanged"] }, { kind: "directive", type: i3$2.AXPWidgetRendererDirective, selector: "[axp-widget-renderer]", inputs: ["parentNode", "index", "mode", "node"], outputs: ["onOptionsChanged", "onValueChanged"], exportAs: ["widgetRenderer"] }, { kind: "ngmodule", type: AXFormModule }, { kind: "component", type: i2$4.AXFormFieldComponent, selector: "ax-form-field", inputs: ["labelMode"] }, { kind: "ngmodule", type: AXLabelModule }, { kind: "component", type: i3$1.AXLabelComponent, selector: "ax-label", inputs: ["required", "for"], outputs: ["requiredChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2898
3658
|
}
|
|
2899
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
3659
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPExtraPropertiesValuesComponent, decorators: [{
|
|
2900
3660
|
type: Component,
|
|
2901
3661
|
args: [{
|
|
2902
3662
|
selector: 'axp-extra-properties-values',
|
|
@@ -2932,7 +3692,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.8", ngImpor
|
|
|
2932
3692
|
</div>
|
|
2933
3693
|
`,
|
|
2934
3694
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
2935
|
-
imports: [CommonModule,
|
|
3695
|
+
imports: [CommonModule, AXPWidgetCoreModule, AXFormModule, AXLabelModule],
|
|
2936
3696
|
standalone: true,
|
|
2937
3697
|
host: {
|
|
2938
3698
|
class: 'ax-block ax-flex-1',
|
|
@@ -2950,10 +3710,10 @@ class AXPQueryFiltersComponent {
|
|
|
2950
3710
|
this.onFiltersChanged = output();
|
|
2951
3711
|
this.tagBox = viewChild('tagBox', ...(ngDevMode ? [{ debugName: "tagBox" }] : []));
|
|
2952
3712
|
this.selectedField = signal(null, ...(ngDevMode ? [{ debugName: "selectedField" }] : []));
|
|
2953
|
-
this.selectedFilters = linkedSignal(() => this.convertQueriesToDefinitions(this.initialFilters()), {
|
|
2954
|
-
|
|
2955
|
-
|
|
2956
|
-
this.context = linkedSignal(() => this.convertQueriesToContext(this.initialFilters()));
|
|
3713
|
+
this.selectedFilters = linkedSignal(() => this.convertQueriesToDefinitions(this.initialFilters()), ...(ngDevMode ? [{ debugName: "selectedFilters", equal: isEqual }] : [{
|
|
3714
|
+
equal: isEqual,
|
|
3715
|
+
}]));
|
|
3716
|
+
this.context = linkedSignal(() => this.convertQueriesToContext(this.initialFilters()), ...(ngDevMode ? [{ debugName: "context" }] : []));
|
|
2957
3717
|
this.activeFilter = signal(null, ...(ngDevMode ? [{ debugName: "activeFilter" }] : []));
|
|
2958
3718
|
this.asyncTags = signal([], ...(ngDevMode ? [{ debugName: "asyncTags" }] : []));
|
|
2959
3719
|
this.popover = viewChild('popover', ...(ngDevMode ? [{ debugName: "popover" }] : []));
|
|
@@ -3018,12 +3778,14 @@ class AXPQueryFiltersComponent {
|
|
|
3018
3778
|
operator: context[f.field]?.operation,
|
|
3019
3779
|
value: context[f.field]?.value,
|
|
3020
3780
|
hidden: f.hidden,
|
|
3781
|
+
displayText: context[f.field]?.displayText,
|
|
3021
3782
|
}));
|
|
3022
3783
|
const newContext = {};
|
|
3023
3784
|
convertedFilters.forEach((cf) => {
|
|
3024
3785
|
newContext[cf.field] = {
|
|
3025
3786
|
value: cf.value,
|
|
3026
3787
|
operation: typeof cf.operator === 'string' ? { type: cf.operator } : cf.operator,
|
|
3788
|
+
displayText: context[cf.field]?.displayText,
|
|
3027
3789
|
};
|
|
3028
3790
|
});
|
|
3029
3791
|
this.context.set(newContext);
|
|
@@ -3036,7 +3798,8 @@ class AXPQueryFiltersComponent {
|
|
|
3036
3798
|
const context = this.context();
|
|
3037
3799
|
Promise.all(filters.map(async (filter) => {
|
|
3038
3800
|
const val = context[filter.field]?.value;
|
|
3039
|
-
const
|
|
3801
|
+
const displayText = context[filter.field]?.displayText;
|
|
3802
|
+
const displayValue = displayText ? displayText : await this.getDisplayValue(filter, val);
|
|
3040
3803
|
return {
|
|
3041
3804
|
...filter,
|
|
3042
3805
|
query: `${this.translate.translateSync(filter.title)} ${this.getActiveOperator(filter)} '${displayValue}'`,
|
|
@@ -3063,7 +3826,7 @@ class AXPQueryFiltersComponent {
|
|
|
3063
3826
|
}
|
|
3064
3827
|
convertQueriesToContext(queries) {
|
|
3065
3828
|
return queries.reduce((acc, q) => {
|
|
3066
|
-
acc[q.field] = { value: q.value, operation: q.operator };
|
|
3829
|
+
acc[q.field] = { value: q.value, operation: q.operator, displayText: q.displayText };
|
|
3067
3830
|
return acc;
|
|
3068
3831
|
}, {});
|
|
3069
3832
|
}
|
|
@@ -3168,10 +3931,10 @@ class AXPQueryFiltersComponent {
|
|
|
3168
3931
|
}
|
|
3169
3932
|
}
|
|
3170
3933
|
#effect2;
|
|
3171
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
3172
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.
|
|
3934
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPQueryFiltersComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3935
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.4", type: AXPQueryFiltersComponent, isStandalone: true, selector: "axp-query-filters", inputs: { filtersDefinitions: { classPropertyName: "filtersDefinitions", publicName: "filtersDefinitions", isSignal: true, isRequired: false, transformFunction: null }, initialFilters: { classPropertyName: "initialFilters", publicName: "initialFilters", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onFiltersChanged: "onFiltersChanged" }, viewQueries: [{ propertyName: "tagBox", first: true, predicate: ["tagBox"], descendants: true, isSignal: true }, { propertyName: "popover", first: true, predicate: ["popover"], descendants: true, isSignal: true }, { propertyName: "listItems", predicate: ["caseItem"], descendants: true }], ngImport: i0, template: "<div class=\"ax-flex ax-items-center ax-gap-2 ax-p-2\">\n <ax-button (keydown)=\"handleButtonKeyDown($event)\" (onClick)=\"popover.open()\" #filterButton [look]=\"'blank'\">\n <ax-icon class=\"far fa-bars-filter ax-cursor-pointer\"> </ax-icon>\n </ax-button>\n <ax-tag-box\n [ngModel]=\"asyncTags()\"\n (onValueChanged)=\"handleSelectFilters($event)\"\n [textField]=\"'query'\"\n [valueField]=\"'id'\"\n [readonly]=\"filtersDefinitions().length === 0\"\n [look]=\"'none'\"\n [readonlyField]=\"'readOnly'\"\n (onKeyDown)=\"handleKeyDown($event)\"\n [addOnEnter]=\"false\"\n [placeholder]=\"\n (filtersDefinitions().length === 0\n ? '@general:terms.interface.filter.no-filter-definitions'\n : '@general:terms.interface.filter.placeholder'\n )\n | translate\n | async\n \"\n #tagBox\n ></ax-tag-box>\n</div>\n\n<ax-popover\n [offsetY]=\"activeFilter() ? -30 : 0\"\n [target]=\"tagBoxInput\"\n [openOn]=\"'toggle'\"\n (onOpened)=\"onPopoverOpened($event)\"\n [closeOn]=\"'clickOut'\"\n (onClosed)=\"handlePopoverClosed($event)\"\n [adaptivityEnabled]=\"true\"\n #popover\n>\n <div\n class=\"md:ax-min-w-72 ax-border ax-surface ax-w-full ax-rounded-md md:ax-max-h-96 ax-max-w-80 md:ax-overflow-auto\"\n >\n <axp-widgets-container [context]=\"context()\" (onContextChanged)=\"onContextChanged($event)\">\n @if (activeFilter()) {\n <div class=\"ax-flex ax-flex-col ax-lightest-surface ax-shadow-md\">\n <ax-header class=\"ax-border-b ax-border-light ax-px-4 ax-py-2\">{{\n activeFilter()?.title! | translate | async\n }}</ax-header>\n <ax-content class=\"ax-p-4\">\n <div class=\"ax-mb-2\">\n <ax-badge [text]=\"getActiveOperator(activeFilter())!\"></ax-badge>\n </div>\n <ng-container\n axp-widget-renderer\n [node]=\"{\n type: activeFilter()?.widget?.type || 'text-editor',\n path: activeFilter()?.field,\n options: activeFilter()?.widget?.options,\n }\"\n [mode]=\"'edit'\"\n >\n </ng-container>\n </ax-content>\n <ax-footer class=\"ax-border-t ax-flex ax-justify-end ax-border-light ax-w-full ax-px-4 ax-py-2\">\n <ax-button\n class=\"ax-xs\"\n [text]=\"'@general:actions.apply.title' | translate | async\"\n (onClick)=\"handleApplyFilter()\"\n ></ax-button>\n </ax-footer>\n </div>\n } @else {\n <div axListNavigation #list=\"axListNavigation\" class=\"axp-list-items\">\n @if (tagBox.inputValue()) {\n @for (inlineFilter of inlineFilters(); track inlineFilter.field) {\n <div\n axListNavigationItem\n #caseItem=\"axListNavigationItem\"\n [class.axp-state-focused]=\"caseItem.isActive()\"\n tabindex=\"0\"\n (click)=\"handleSelectInlineFilter(inlineFilter)\"\n (keydown)=\"handleInlineFilterKeyDown($event, inlineFilter)\"\n >\n {{ inlineFilter.title | translate | async }} {{ getActiveOperator(inlineFilter) }} '{{\n tagBox.inputValue()\n }}'\n </div>\n }\n <span class=\"ax-w-full ax-border-t ax-border-light ax-my-1\"></span>\n }\n @for (field of filterFields(); track field.field) {\n <div\n axListNavigationItem\n #caseItem=\"axListNavigationItem\"\n [class.axp-state-focused]=\"caseItem.isActive()\"\n (click)=\"handleSelectField(field)\"\n (keydown)=\"handleFieldKeyDown($event, field)\"\n tabindex=\"0\"\n >\n <div class=\"ax-flex ax-items-end ax-gap-2\">\n <ax-icon class=\"ax-w-5\" [class]=\"'fa-light ' + field.icon\"> </ax-icon>\n {{ field.title | translate | async }}\n </div>\n </div>\n }\n </div>\n }\n </axp-widgets-container>\n </div>\n</ax-popover>\n", styles: ["axp-query-filters{width:100%}.axp-list-items{display:flex;min-width:10rem;flex-direction:column;border-radius:.375rem;border-width:1px;padding-top:1rem;padding-bottom:1rem;--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);background-color:rgb(var(--ax-sys-color-lightest-surface));color:rgb(var(--ax-sys-color-on-lightest-surface));border-color:rgb(var(--ax-sys-color-border-lightest-surface))}.axp-list-items>div{min-width:7rem;cursor:pointer;padding:.5rem 1rem;text-align:start}.axp-list-items>div:focus{outline:none}.axp-list-items>div.axp-state-focused,.axp-list-items>div:hover{background-color:rgb(var(--ax-sys-color-surface));color:rgb(var(--ax-sys-color-on-surface));border-color:rgb(var(--ax-sys-color-border-surface))}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i5$1.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i2$1.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i2$1.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "ngmodule", type: AXPopoverModule }, { kind: "component", type: i4$5.AXPopoverComponent, selector: "ax-popover", inputs: ["width", "disabled", "offsetX", "offsetY", "target", "placement", "content", "openOn", "closeOn", "hasBackdrop", "openAfter", "closeAfter", "backdropClass", "panelClass", "adaptivityEnabled"], outputs: ["onOpened", "onClosed"] }, { kind: "ngmodule", type: AXSelectionListModule }, { kind: "ngmodule", type: AXTagBoxModule }, { kind: "component", type: i5$3.AXTagBoxComponent, selector: "ax-tag-box", inputs: ["disabled", "tabIndex", "readonly", "value", "state", "name", "id", "placeholder", "allowNull", "type", "look", "addOnComma", "addOnEnter", "valueField", "textField", "readonlyField", "allowDuplicateValues"], outputs: ["onBlur", "onFocus", "valueChange", "stateChange", "onValueChanged", "readonlyChange", "disabledChange", "onKeyDown", "onKeyUp", "onKeyPress"] }, { kind: "ngmodule", type: AXPWidgetCoreModule }, { kind: "component", type: i3$2.AXPWidgetContainerComponent, selector: "axp-widgets-container", inputs: ["context", "functions"], outputs: ["onContextChanged"] }, { kind: "directive", type: i3$2.AXPWidgetRendererDirective, selector: "[axp-widget-renderer]", inputs: ["parentNode", "index", "mode", "node"], outputs: ["onOptionsChanged", "onValueChanged"], exportAs: ["widgetRenderer"] }, { kind: "ngmodule", type: AXListNavigationModule }, { kind: "directive", type: i7.AXListNavigationDirective, selector: "[axListNavigation]", inputs: ["orientation"], outputs: ["onNavigationChanged", "onKeypress"], exportAs: ["axListNavigation"] }, { kind: "directive", type: i7.AXListNavigationItemDirective, selector: "[axListNavigationItem]", outputs: ["onKeypress"], exportAs: ["axListNavigationItem"] }, { kind: "ngmodule", type: AXBadgeModule }, { kind: "component", type: i8.AXBadgeComponent, selector: "ax-badge", inputs: ["color", "look", "text"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "pipe", type: i5.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
3173
3936
|
}
|
|
3174
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
3937
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPQueryFiltersComponent, decorators: [{
|
|
3175
3938
|
type: Component,
|
|
3176
3939
|
args: [{ selector: 'axp-query-filters', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [
|
|
3177
3940
|
CommonModule,
|
|
@@ -3182,15 +3945,255 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.8", ngImpor
|
|
|
3182
3945
|
AXPopoverModule,
|
|
3183
3946
|
AXSelectionListModule,
|
|
3184
3947
|
AXTagBoxModule,
|
|
3185
|
-
|
|
3948
|
+
AXPWidgetCoreModule,
|
|
3186
3949
|
AXListNavigationModule,
|
|
3187
3950
|
AXBadgeModule,
|
|
3188
|
-
], template: "<div class=\"ax-flex ax-items-center ax-gap-2 ax-p-2\">\n <ax-button (keydown)=\"handleButtonKeyDown($event)\" (onClick)=\"popover.open()\" #filterButton [look]=\"'blank'\">\n <ax-icon class=\"far fa-bars-filter ax-cursor-pointer\"> </ax-icon>\n </ax-button>\n <ax-tag-box\n [ngModel]=\"asyncTags()\"\n (onValueChanged)=\"handleSelectFilters($event)\"\n [textField]=\"'query'\"\n [valueField]=\"'id'\"\n [readonly]=\"filtersDefinitions().length === 0\"\n [look]=\"'none'\"\n [readonlyField]=\"'readOnly'\"\n (onKeyDown)=\"handleKeyDown($event)\"\n [addOnEnter]=\"false\"\n [placeholder]=\"(filtersDefinitions().length === 0
|
|
3951
|
+
], template: "<div class=\"ax-flex ax-items-center ax-gap-2 ax-p-2\">\n <ax-button (keydown)=\"handleButtonKeyDown($event)\" (onClick)=\"popover.open()\" #filterButton [look]=\"'blank'\">\n <ax-icon class=\"far fa-bars-filter ax-cursor-pointer\"> </ax-icon>\n </ax-button>\n <ax-tag-box\n [ngModel]=\"asyncTags()\"\n (onValueChanged)=\"handleSelectFilters($event)\"\n [textField]=\"'query'\"\n [valueField]=\"'id'\"\n [readonly]=\"filtersDefinitions().length === 0\"\n [look]=\"'none'\"\n [readonlyField]=\"'readOnly'\"\n (onKeyDown)=\"handleKeyDown($event)\"\n [addOnEnter]=\"false\"\n [placeholder]=\"\n (filtersDefinitions().length === 0\n ? '@general:terms.interface.filter.no-filter-definitions'\n : '@general:terms.interface.filter.placeholder'\n )\n | translate\n | async\n \"\n #tagBox\n ></ax-tag-box>\n</div>\n\n<ax-popover\n [offsetY]=\"activeFilter() ? -30 : 0\"\n [target]=\"tagBoxInput\"\n [openOn]=\"'toggle'\"\n (onOpened)=\"onPopoverOpened($event)\"\n [closeOn]=\"'clickOut'\"\n (onClosed)=\"handlePopoverClosed($event)\"\n [adaptivityEnabled]=\"true\"\n #popover\n>\n <div\n class=\"md:ax-min-w-72 ax-border ax-surface ax-w-full ax-rounded-md md:ax-max-h-96 ax-max-w-80 md:ax-overflow-auto\"\n >\n <axp-widgets-container [context]=\"context()\" (onContextChanged)=\"onContextChanged($event)\">\n @if (activeFilter()) {\n <div class=\"ax-flex ax-flex-col ax-lightest-surface ax-shadow-md\">\n <ax-header class=\"ax-border-b ax-border-light ax-px-4 ax-py-2\">{{\n activeFilter()?.title! | translate | async\n }}</ax-header>\n <ax-content class=\"ax-p-4\">\n <div class=\"ax-mb-2\">\n <ax-badge [text]=\"getActiveOperator(activeFilter())!\"></ax-badge>\n </div>\n <ng-container\n axp-widget-renderer\n [node]=\"{\n type: activeFilter()?.widget?.type || 'text-editor',\n path: activeFilter()?.field,\n options: activeFilter()?.widget?.options,\n }\"\n [mode]=\"'edit'\"\n >\n </ng-container>\n </ax-content>\n <ax-footer class=\"ax-border-t ax-flex ax-justify-end ax-border-light ax-w-full ax-px-4 ax-py-2\">\n <ax-button\n class=\"ax-xs\"\n [text]=\"'@general:actions.apply.title' | translate | async\"\n (onClick)=\"handleApplyFilter()\"\n ></ax-button>\n </ax-footer>\n </div>\n } @else {\n <div axListNavigation #list=\"axListNavigation\" class=\"axp-list-items\">\n @if (tagBox.inputValue()) {\n @for (inlineFilter of inlineFilters(); track inlineFilter.field) {\n <div\n axListNavigationItem\n #caseItem=\"axListNavigationItem\"\n [class.axp-state-focused]=\"caseItem.isActive()\"\n tabindex=\"0\"\n (click)=\"handleSelectInlineFilter(inlineFilter)\"\n (keydown)=\"handleInlineFilterKeyDown($event, inlineFilter)\"\n >\n {{ inlineFilter.title | translate | async }} {{ getActiveOperator(inlineFilter) }} '{{\n tagBox.inputValue()\n }}'\n </div>\n }\n <span class=\"ax-w-full ax-border-t ax-border-light ax-my-1\"></span>\n }\n @for (field of filterFields(); track field.field) {\n <div\n axListNavigationItem\n #caseItem=\"axListNavigationItem\"\n [class.axp-state-focused]=\"caseItem.isActive()\"\n (click)=\"handleSelectField(field)\"\n (keydown)=\"handleFieldKeyDown($event, field)\"\n tabindex=\"0\"\n >\n <div class=\"ax-flex ax-items-end ax-gap-2\">\n <ax-icon class=\"ax-w-5\" [class]=\"'fa-light ' + field.icon\"> </ax-icon>\n {{ field.title | translate | async }}\n </div>\n </div>\n }\n </div>\n }\n </axp-widgets-container>\n </div>\n</ax-popover>\n", styles: ["axp-query-filters{width:100%}.axp-list-items{display:flex;min-width:10rem;flex-direction:column;border-radius:.375rem;border-width:1px;padding-top:1rem;padding-bottom:1rem;--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);background-color:rgb(var(--ax-sys-color-lightest-surface));color:rgb(var(--ax-sys-color-on-lightest-surface));border-color:rgb(var(--ax-sys-color-border-lightest-surface))}.axp-list-items>div{min-width:7rem;cursor:pointer;padding:.5rem 1rem;text-align:start}.axp-list-items>div:focus{outline:none}.axp-list-items>div.axp-state-focused,.axp-list-items>div:hover{background-color:rgb(var(--ax-sys-color-surface));color:rgb(var(--ax-sys-color-on-surface));border-color:rgb(var(--ax-sys-color-border-surface))}\n"] }]
|
|
3189
3952
|
}], propDecorators: { listItems: [{
|
|
3190
3953
|
type: ViewChildren,
|
|
3191
3954
|
args: ['caseItem']
|
|
3192
3955
|
}] } });
|
|
3193
3956
|
|
|
3957
|
+
class AXPImageEditorPopupComponent extends AXBasePageComponent {
|
|
3958
|
+
constructor() {
|
|
3959
|
+
super(...arguments);
|
|
3960
|
+
this.fileStorage = inject(AXPFileStorageService);
|
|
3961
|
+
this.image = input.required(...(ngDevMode ? [{ debugName: "image" }] : []));
|
|
3962
|
+
this.showHistory = input(true, ...(ngDevMode ? [{ debugName: "showHistory" }] : []));
|
|
3963
|
+
this.look = input('blank', ...(ngDevMode ? [{ debugName: "look" }] : []));
|
|
3964
|
+
this.container = viewChild(AXImageEditorContainerComponent, ...(ngDevMode ? [{ debugName: "container" }] : []));
|
|
3965
|
+
this.blobUrl = signal(null, ...(ngDevMode ? [{ debugName: "blobUrl" }] : []));
|
|
3966
|
+
this.url = signal(null, ...(ngDevMode ? [{ debugName: "url" }] : []));
|
|
3967
|
+
this.context = linkedSignal(() => ({ image: this.image() }), ...(ngDevMode ? [{ debugName: "context" }] : []));
|
|
3968
|
+
}
|
|
3969
|
+
async ngOnInit() {
|
|
3970
|
+
const value = this.image();
|
|
3971
|
+
//for safety
|
|
3972
|
+
if (!value) {
|
|
3973
|
+
this.url.set(null);
|
|
3974
|
+
return;
|
|
3975
|
+
}
|
|
3976
|
+
const prev = this.blobUrl();
|
|
3977
|
+
if (prev) {
|
|
3978
|
+
URL.revokeObjectURL(prev);
|
|
3979
|
+
}
|
|
3980
|
+
const blob = value;
|
|
3981
|
+
const next = URL.createObjectURL(blob);
|
|
3982
|
+
this.blobUrl.set(next);
|
|
3983
|
+
this.url.set(next);
|
|
3984
|
+
}
|
|
3985
|
+
handleValueChanged(e) {
|
|
3986
|
+
const value = e?.value;
|
|
3987
|
+
const webP = value?.find((item) => item.type.startsWith('image/webp'));
|
|
3988
|
+
if (webP) {
|
|
3989
|
+
this.context.set({ image: webP });
|
|
3990
|
+
}
|
|
3991
|
+
}
|
|
3992
|
+
handleSave() {
|
|
3993
|
+
this.container()?.save();
|
|
3994
|
+
this.close({ data: this.context() });
|
|
3995
|
+
}
|
|
3996
|
+
handleCancel() {
|
|
3997
|
+
this.close({ data: { image: null } });
|
|
3998
|
+
}
|
|
3999
|
+
ngOnDestroy() {
|
|
4000
|
+
const prev = this.blobUrl();
|
|
4001
|
+
if (prev) {
|
|
4002
|
+
URL.revokeObjectURL(prev);
|
|
4003
|
+
}
|
|
4004
|
+
}
|
|
4005
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPImageEditorPopupComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
4006
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.4", type: AXPImageEditorPopupComponent, isStandalone: true, selector: "axp-image-editor-popup", inputs: { image: { classPropertyName: "image", publicName: "image", isSignal: true, isRequired: true, transformFunction: null }, showHistory: { classPropertyName: "showHistory", publicName: "showHistory", isSignal: true, isRequired: false, transformFunction: null }, look: { classPropertyName: "look", publicName: "look", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "container", first: true, predicate: AXImageEditorContainerComponent, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: `
|
|
4007
|
+
<ax-form class="ax-flex ax-justify-center">
|
|
4008
|
+
<ax-form-field class="ax-p-2">
|
|
4009
|
+
<ax-image-editor-container #container [look]="look()" (onValueChanged)="handleValueChanged($event)">
|
|
4010
|
+
<ax-header>
|
|
4011
|
+
<ax-toolbar>
|
|
4012
|
+
<ax-prefix>
|
|
4013
|
+
@if (showHistory()) {
|
|
4014
|
+
<ax-image-editor-history></ax-image-editor-history>
|
|
4015
|
+
}
|
|
4016
|
+
</ax-prefix>
|
|
4017
|
+
</ax-toolbar>
|
|
4018
|
+
</ax-header>
|
|
4019
|
+
<ax-image-editor-view [src]="url() || ''"></ax-image-editor-view>
|
|
4020
|
+
</ax-image-editor-container>
|
|
4021
|
+
</ax-form-field>
|
|
4022
|
+
</ax-form>
|
|
4023
|
+
<ax-footer class="ax-flex ax-justify-end ax-gap-2">
|
|
4024
|
+
<ax-suffix>
|
|
4025
|
+
<ax-button look="solid" (onClick)="handleCancel()" [text]="'@general:actions.cancel.title' | translate | async">
|
|
4026
|
+
</ax-button>
|
|
4027
|
+
<ax-button color="primary" look="solid" (onClick)="handleSave()" [text]="'@general:actions.save.title' | translate | async">
|
|
4028
|
+
</ax-button>
|
|
4029
|
+
</ax-suffix>
|
|
4030
|
+
</ax-footer>
|
|
4031
|
+
`, isInline: true, styles: ["::ng-deep ax-image-editor-view>canvas{height:65vh}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXImageEditorModule }, { kind: "component", type: i1$3.AXImageEditorViewComponent, selector: "ax-image-editor-view", inputs: ["showGrid", "src"] }, { kind: "component", type: i1$3.AXImageEditorContainerComponent, selector: "ax-image-editor-container", inputs: ["look", "disabled"], outputs: ["onValueChanged"] }, { kind: "component", type: i1$3.AXImageEditorHistoryComponent, selector: "ax-image-editor-history" }, { kind: "ngmodule", type: AXFormModule }, { kind: "component", type: i2$4.AXFormFieldComponent, selector: "ax-form-field", inputs: ["labelMode"] }, { kind: "component", type: i2$4.AXFormComponent, selector: "ax-form", inputs: ["labelMode", "look", "messageStyle", "updateOn"], outputs: ["onValidate", "updateOnChange"] }, { kind: "ngmodule", type: AXToolBarModule }, { kind: "component", type: i3$4.AXToolBarComponent, selector: "ax-toolbar" }, { kind: "ngmodule", type: AXDecoratorModule }, { 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: AXButtonModule }, { kind: "component", type: i5$1.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "pipe", type: i5.AXTranslatorPipe, name: "translate" }] }); }
|
|
4032
|
+
}
|
|
4033
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPImageEditorPopupComponent, decorators: [{
|
|
4034
|
+
type: Component,
|
|
4035
|
+
args: [{ standalone: true, selector: 'axp-image-editor-popup', imports: [
|
|
4036
|
+
CommonModule,
|
|
4037
|
+
AXImageEditorModule,
|
|
4038
|
+
AXFormModule,
|
|
4039
|
+
AXToolBarModule,
|
|
4040
|
+
AXDecoratorModule,
|
|
4041
|
+
AXButtonModule,
|
|
4042
|
+
AXTranslationModule,
|
|
4043
|
+
], template: `
|
|
4044
|
+
<ax-form class="ax-flex ax-justify-center">
|
|
4045
|
+
<ax-form-field class="ax-p-2">
|
|
4046
|
+
<ax-image-editor-container #container [look]="look()" (onValueChanged)="handleValueChanged($event)">
|
|
4047
|
+
<ax-header>
|
|
4048
|
+
<ax-toolbar>
|
|
4049
|
+
<ax-prefix>
|
|
4050
|
+
@if (showHistory()) {
|
|
4051
|
+
<ax-image-editor-history></ax-image-editor-history>
|
|
4052
|
+
}
|
|
4053
|
+
</ax-prefix>
|
|
4054
|
+
</ax-toolbar>
|
|
4055
|
+
</ax-header>
|
|
4056
|
+
<ax-image-editor-view [src]="url() || ''"></ax-image-editor-view>
|
|
4057
|
+
</ax-image-editor-container>
|
|
4058
|
+
</ax-form-field>
|
|
4059
|
+
</ax-form>
|
|
4060
|
+
<ax-footer class="ax-flex ax-justify-end ax-gap-2">
|
|
4061
|
+
<ax-suffix>
|
|
4062
|
+
<ax-button look="solid" (onClick)="handleCancel()" [text]="'@general:actions.cancel.title' | translate | async">
|
|
4063
|
+
</ax-button>
|
|
4064
|
+
<ax-button color="primary" look="solid" (onClick)="handleSave()" [text]="'@general:actions.save.title' | translate | async">
|
|
4065
|
+
</ax-button>
|
|
4066
|
+
</ax-suffix>
|
|
4067
|
+
</ax-footer>
|
|
4068
|
+
`, styles: ["::ng-deep ax-image-editor-view>canvas{height:65vh}\n"] }]
|
|
4069
|
+
}] });
|
|
4070
|
+
|
|
4071
|
+
var imageEditorPopup_component = /*#__PURE__*/Object.freeze({
|
|
4072
|
+
__proto__: null,
|
|
4073
|
+
AXPImageEditorPopupComponent: AXPImageEditorPopupComponent
|
|
4074
|
+
});
|
|
4075
|
+
|
|
4076
|
+
class AXPImageEditorService {
|
|
4077
|
+
constructor() {
|
|
4078
|
+
this.popupService = inject(AXPopupService);
|
|
4079
|
+
this.translate = inject(AXTranslationService);
|
|
4080
|
+
}
|
|
4081
|
+
async open(options) {
|
|
4082
|
+
const component = await Promise.resolve().then(function () { return imageEditorPopup_component; }).then((m) => m.AXPImageEditorPopupComponent);
|
|
4083
|
+
const result = await this.popupService.open(component, {
|
|
4084
|
+
title: options?.title ?? (await this.translate.translateAsync('@general:image.title')),
|
|
4085
|
+
data: {
|
|
4086
|
+
image: signal(options?.image),
|
|
4087
|
+
showHistory: signal(options?.showHistory ?? true),
|
|
4088
|
+
look: signal(options?.look ?? 'solid'),
|
|
4089
|
+
},
|
|
4090
|
+
});
|
|
4091
|
+
return result?.data?.data?.image ?? null;
|
|
4092
|
+
}
|
|
4093
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPImageEditorService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
4094
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPImageEditorService, providedIn: 'root' }); }
|
|
4095
|
+
}
|
|
4096
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPImageEditorService, decorators: [{
|
|
4097
|
+
type: Injectable,
|
|
4098
|
+
args: [{ providedIn: 'root' }]
|
|
4099
|
+
}] });
|
|
4100
|
+
|
|
4101
|
+
class AXPWidgetPropertyViewerPopupComponent extends AXBasePageComponent {
|
|
4102
|
+
constructor() {
|
|
4103
|
+
super(...arguments);
|
|
4104
|
+
//#region ---- Inputs ----
|
|
4105
|
+
this.widget = input.required(...(ngDevMode ? [{ debugName: "widget" }] : []));
|
|
4106
|
+
this.mode = input('simple', ...(ngDevMode ? [{ debugName: "mode" }] : []));
|
|
4107
|
+
//#endregion
|
|
4108
|
+
//#region ---- Properties ----
|
|
4109
|
+
this.currentValues = signal({}, ...(ngDevMode ? [{ debugName: "currentValues" }] : []));
|
|
4110
|
+
}
|
|
4111
|
+
//#endregion
|
|
4112
|
+
//#region ---- Event Handlers ----
|
|
4113
|
+
handlePropertyChanged(event) {
|
|
4114
|
+
this.currentValues.set(event.values);
|
|
4115
|
+
}
|
|
4116
|
+
handleCloseClick() {
|
|
4117
|
+
this.close();
|
|
4118
|
+
}
|
|
4119
|
+
handleApplyClick() {
|
|
4120
|
+
this.close({
|
|
4121
|
+
values: this.currentValues(),
|
|
4122
|
+
mode: 'update'
|
|
4123
|
+
});
|
|
4124
|
+
}
|
|
4125
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPWidgetPropertyViewerPopupComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
4126
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.4", type: AXPWidgetPropertyViewerPopupComponent, isStandalone: true, selector: "axp-widget-property-viewer-popup", inputs: { widget: { classPropertyName: "widget", publicName: "widget", isSignal: true, isRequired: true, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0, template: `
|
|
4127
|
+
<div class="ax-flex ax-flex-col ax-h-full ax-overflow-hidden">
|
|
4128
|
+
<axp-widget-property-viewer
|
|
4129
|
+
[widget]="widget()"
|
|
4130
|
+
[mode]="mode()"
|
|
4131
|
+
(onChanged)="handlePropertyChanged($event)">
|
|
4132
|
+
</axp-widget-property-viewer>
|
|
4133
|
+
</div>
|
|
4134
|
+
|
|
4135
|
+
<ax-footer>
|
|
4136
|
+
<ax-suffix>
|
|
4137
|
+
<ax-button
|
|
4138
|
+
look="solid"
|
|
4139
|
+
[text]="'@general:actions.close.title' | translate | async"
|
|
4140
|
+
(onClick)="handleCloseClick()">
|
|
4141
|
+
</ax-button>
|
|
4142
|
+
<ax-button
|
|
4143
|
+
look="solid"
|
|
4144
|
+
color="primary"
|
|
4145
|
+
[text]="'@general:actions.apply.title' | translate | async"
|
|
4146
|
+
(onClick)="handleApplyClick()">
|
|
4147
|
+
</ax-button>
|
|
4148
|
+
</ax-suffix>
|
|
4149
|
+
</ax-footer>
|
|
4150
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i5$1.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i2$1.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: AXTranslationModule }, { kind: "component", type: AXPWidgetPropertyViewerComponent, selector: "axp-widget-property-viewer", inputs: ["widget", "mode"], outputs: ["onChanged"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "pipe", type: i5.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
4151
|
+
}
|
|
4152
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPWidgetPropertyViewerPopupComponent, decorators: [{
|
|
4153
|
+
type: Component,
|
|
4154
|
+
args: [{
|
|
4155
|
+
selector: 'axp-widget-property-viewer-popup',
|
|
4156
|
+
template: `
|
|
4157
|
+
<div class="ax-flex ax-flex-col ax-h-full ax-overflow-hidden">
|
|
4158
|
+
<axp-widget-property-viewer
|
|
4159
|
+
[widget]="widget()"
|
|
4160
|
+
[mode]="mode()"
|
|
4161
|
+
(onChanged)="handlePropertyChanged($event)">
|
|
4162
|
+
</axp-widget-property-viewer>
|
|
4163
|
+
</div>
|
|
4164
|
+
|
|
4165
|
+
<ax-footer>
|
|
4166
|
+
<ax-suffix>
|
|
4167
|
+
<ax-button
|
|
4168
|
+
look="solid"
|
|
4169
|
+
[text]="'@general:actions.close.title' | translate | async"
|
|
4170
|
+
(onClick)="handleCloseClick()">
|
|
4171
|
+
</ax-button>
|
|
4172
|
+
<ax-button
|
|
4173
|
+
look="solid"
|
|
4174
|
+
color="primary"
|
|
4175
|
+
[text]="'@general:actions.apply.title' | translate | async"
|
|
4176
|
+
(onClick)="handleApplyClick()">
|
|
4177
|
+
</ax-button>
|
|
4178
|
+
</ax-suffix>
|
|
4179
|
+
</ax-footer>
|
|
4180
|
+
`,
|
|
4181
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
4182
|
+
imports: [
|
|
4183
|
+
CommonModule,
|
|
4184
|
+
AXButtonModule,
|
|
4185
|
+
AXDecoratorModule,
|
|
4186
|
+
AXTranslationModule,
|
|
4187
|
+
AXPWidgetPropertyViewerComponent
|
|
4188
|
+
],
|
|
4189
|
+
}]
|
|
4190
|
+
}] });
|
|
4191
|
+
|
|
4192
|
+
var widgetPropertyViewerPopup_component = /*#__PURE__*/Object.freeze({
|
|
4193
|
+
__proto__: null,
|
|
4194
|
+
AXPWidgetPropertyViewerPopupComponent: AXPWidgetPropertyViewerPopupComponent
|
|
4195
|
+
});
|
|
4196
|
+
|
|
3194
4197
|
class AXPQuerySortsComponent {
|
|
3195
4198
|
constructor() {
|
|
3196
4199
|
this.sortDefinitions = model([], ...(ngDevMode ? [{ debugName: "sortDefinitions" }] : []));
|
|
@@ -3238,10 +4241,10 @@ class AXPQuerySortsComponent {
|
|
|
3238
4241
|
});
|
|
3239
4242
|
});
|
|
3240
4243
|
}
|
|
3241
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
3242
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.
|
|
4244
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPQuerySortsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
4245
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.4", type: AXPQuerySortsComponent, isStandalone: true, selector: "axp-query-sorts", inputs: { sortDefinitions: { classPropertyName: "sortDefinitions", publicName: "sortDefinitions", isSignal: true, isRequired: false, transformFunction: null }, initialSortQueries: { classPropertyName: "initialSortQueries", publicName: "initialSortQueries", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { sortDefinitions: "sortDefinitionsChange", sortQueriesChange: "sortQueriesChange" }, ngImport: i0, template: "<div class=\"ax-flex ax-flex-col ax-justify-center ax-gap-4 ax-select-none\">\n <div class=\"ax-flex ax-flex-col ax-gap-4 ax-select-none\" cdkDropList (cdkDropListDropped)=\"drop($event)\">\n <div class=\"ax-flex ax-flex-col ax-gap-3 ax-w-full ax-sorted-list ax-max-h-[calc(100vh-280px)] ax-overflow-auto\">\n @for (item of sortDefinitions(); track item.name) {\n <div class=\"ax-flex ax-py-1 ax-items-center ax-justify-between\" cdkDrag cdkDragBoundary=\".ax-sorted-list\">\n <div class=\"ax-flex ax-items-center ax-gap-3\" cdkDragHandle>\n <ax-icon class=\"fa-solid fa-grip-dots-vertical ax-cursor-move\"></ax-icon>\n <p class=\"ax-font-medium ax-text-sm\">{{ item.title | translate | async }}</p>\n </div>\n <ax-button [color]=\"'blank'\" class=\"ax-sm\" (click)=\"changeItemSort(item)\">\n <ax-icon\n [class.ax-text-primary]=\"getSortDirection(item) === 'asc'\"\n class=\"fa-solid fa-arrow-up-long ax-text-neutral-400\"\n ></ax-icon>\n <ax-icon\n [class.ax-text-primary]=\"getSortDirection(item) === 'desc'\"\n class=\"fa-solid fa-arrow-down-long ax-text-neutral-400\"\n ></ax-icon>\n </ax-button>\n </div>\n }\n </div>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer", "cdkDropListHasAnchor"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "ngmodule", type: AXTabsModule }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i2$1.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i5$1.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "pipe", type: i5.AXTranslatorPipe, name: "translate" }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
3243
4246
|
}
|
|
3244
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
4247
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPQuerySortsComponent, decorators: [{
|
|
3245
4248
|
type: Component,
|
|
3246
4249
|
args: [{ selector: 'axp-query-sorts', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [
|
|
3247
4250
|
CdkDropList,
|
|
@@ -3328,8 +4331,8 @@ class AXPTemplateViewerComponent extends AXBasePageComponent {
|
|
|
3328
4331
|
metadata: this.config?.metadata
|
|
3329
4332
|
});
|
|
3330
4333
|
}
|
|
3331
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
3332
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.
|
|
4334
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPTemplateViewerComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
4335
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.4", type: AXPTemplateViewerComponent, isStandalone: true, selector: "axp-template-viewer", inputs: { config: "config" }, usesInheritance: true, ngImport: i0, template: `
|
|
3333
4336
|
<div class="ax-p-4 ax-min-h-64">
|
|
3334
4337
|
<ax-form #form>
|
|
3335
4338
|
<axp-widgets-container [context]="context" (onContextChanged)="handleContextChanged($event)" >
|
|
@@ -3339,18 +4342,18 @@ class AXPTemplateViewerComponent extends AXBasePageComponent {
|
|
|
3339
4342
|
</div>
|
|
3340
4343
|
|
|
3341
4344
|
@if (config?.showActions !== false) {
|
|
3342
|
-
<ax-footer
|
|
4345
|
+
<ax-footer>
|
|
3343
4346
|
<ax-suffix>
|
|
3344
|
-
<ax-button [text]="
|
|
4347
|
+
<ax-button [text]="'@general:actions.cancel.title' | translate | async" (onClick)="handleCancel()"></ax-button>
|
|
3345
4348
|
@if (!config?.readOnly) {
|
|
3346
|
-
<ax-button color="primary" [text]="
|
|
4349
|
+
<ax-button color="primary" [text]="'@general:actions.submit.title' | translate | async" (onClick)="handleSubmit(form)"></ax-button>
|
|
3347
4350
|
}
|
|
3348
4351
|
</ax-suffix>
|
|
3349
4352
|
</ax-footer>
|
|
3350
4353
|
}
|
|
3351
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type:
|
|
4354
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXPWidgetCoreModule }, { kind: "component", type: i3$2.AXPWidgetContainerComponent, selector: "axp-widgets-container", inputs: ["context", "functions"], outputs: ["onContextChanged"] }, { kind: "directive", type: i3$2.AXPWidgetRendererDirective, selector: "[axp-widget-renderer]", inputs: ["parentNode", "index", "mode", "node"], outputs: ["onOptionsChanged", "onValueChanged"], exportAs: ["widgetRenderer"] }, { kind: "ngmodule", type: AXDecoratorModule }, { 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: AXButtonModule }, { kind: "component", type: i5$1.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXFormModule }, { kind: "component", type: i2$4.AXFormComponent, selector: "ax-form", inputs: ["labelMode", "look", "messageStyle", "updateOn"], outputs: ["onValidate", "updateOnChange"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "pipe", type: i5.AXTranslatorPipe, name: "translate" }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
3352
4355
|
}
|
|
3353
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
4356
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPTemplateViewerComponent, decorators: [{
|
|
3354
4357
|
type: Component,
|
|
3355
4358
|
args: [{
|
|
3356
4359
|
selector: 'axp-template-viewer',
|
|
@@ -3364,18 +4367,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.8", ngImpor
|
|
|
3364
4367
|
</div>
|
|
3365
4368
|
|
|
3366
4369
|
@if (config?.showActions !== false) {
|
|
3367
|
-
<ax-footer
|
|
4370
|
+
<ax-footer>
|
|
3368
4371
|
<ax-suffix>
|
|
3369
|
-
<ax-button [text]="
|
|
4372
|
+
<ax-button [text]="'@general:actions.cancel.title' | translate | async" (onClick)="handleCancel()"></ax-button>
|
|
3370
4373
|
@if (!config?.readOnly) {
|
|
3371
|
-
<ax-button color="primary" [text]="
|
|
4374
|
+
<ax-button color="primary" [text]="'@general:actions.submit.title' | translate | async" (onClick)="handleSubmit(form)"></ax-button>
|
|
3372
4375
|
}
|
|
3373
4376
|
</ax-suffix>
|
|
3374
4377
|
</ax-footer>
|
|
3375
4378
|
}
|
|
3376
4379
|
`,
|
|
3377
4380
|
encapsulation: ViewEncapsulation.None,
|
|
3378
|
-
imports: [CommonModule,
|
|
4381
|
+
imports: [CommonModule, AXPWidgetCoreModule, AXDecoratorModule, AXButtonModule, AXFormModule, AXTranslationModule]
|
|
3379
4382
|
}]
|
|
3380
4383
|
}], propDecorators: { config: [{
|
|
3381
4384
|
type: Input
|
|
@@ -3419,10 +4422,10 @@ class AXPTemplateViewerService {
|
|
|
3419
4422
|
showActions: false
|
|
3420
4423
|
});
|
|
3421
4424
|
}
|
|
3422
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
3423
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.
|
|
4425
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPTemplateViewerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
4426
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPTemplateViewerService, providedIn: 'root' }); }
|
|
3424
4427
|
}
|
|
3425
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
4428
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPTemplateViewerService, decorators: [{
|
|
3426
4429
|
type: Injectable,
|
|
3427
4430
|
args: [{
|
|
3428
4431
|
providedIn: 'root'
|
|
@@ -3562,10 +4565,10 @@ class AXPUserAvatarService {
|
|
|
3562
4565
|
throw error;
|
|
3563
4566
|
}
|
|
3564
4567
|
}
|
|
3565
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
3566
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.
|
|
4568
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPUserAvatarService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
4569
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPUserAvatarService, providedIn: 'root' }); }
|
|
3567
4570
|
}
|
|
3568
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
4571
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPUserAvatarService, decorators: [{
|
|
3569
4572
|
type: Injectable,
|
|
3570
4573
|
args: [{
|
|
3571
4574
|
providedIn: 'root',
|
|
@@ -3587,7 +4590,7 @@ class AXPUserAvatarComponent {
|
|
|
3587
4590
|
this.isOnline = computed(() => this.userInfo()?.status === 'online', ...(ngDevMode ? [{ debugName: "isOnline" }] : []));
|
|
3588
4591
|
this.avatarText = computed(() => this.getInitials(), ...(ngDevMode ? [{ debugName: "avatarText" }] : []));
|
|
3589
4592
|
this.avatarColor = computed(() => this.pickColor(this.avatarText()), ...(ngDevMode ? [{ debugName: "avatarColor" }] : []));
|
|
3590
|
-
this.hasPicture = signal(
|
|
4593
|
+
this.hasPicture = signal(true, ...(ngDevMode ? [{ debugName: "hasPicture" }] : []));
|
|
3591
4594
|
}
|
|
3592
4595
|
onImageError(event) {
|
|
3593
4596
|
this.hasPicture.set(false);
|
|
@@ -3655,17 +4658,12 @@ class AXPUserAvatarComponent {
|
|
|
3655
4658
|
const idx = this.hashString(initials) % colors.length;
|
|
3656
4659
|
return colors[idx];
|
|
3657
4660
|
}
|
|
3658
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
3659
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.
|
|
4661
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPUserAvatarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
4662
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.4", type: AXPUserAvatarComponent, isStandalone: true, selector: "axp-user-avatar", inputs: { size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, userId: { classPropertyName: "userId", publicName: "userId", isSignal: true, isRequired: false, transformFunction: null } }, providers: [], ngImport: i0, template: "<ax-avatar #avatar [size]=\"size()\" class=\"ax-cursor-pointer\">\n @if(hasPicture()){\n <ax-image (onError)=\"onImageError($event)\" (onLoad)=\"onImageLoad($event)\" [src]=\"src()\"></ax-image>\n }@else{\n <ax-text class=\"ax-{{ avatarColor() }}-lightest \">\n <small class=\"ax-text-xs ax-font-semibold\">{{ avatarText() }}</small>\n </ax-text>\n }\n</ax-avatar>\n\n<!--\n\nax-primary-lightest\nax-warning-lightest\nax-success-lightest\nax-danger-lightest\nax-secondary-lightest\nax-accent1-lightest\nax-accent2-lightest\nax-accent3-lightest\n\n-->\n", styles: [""], dependencies: [{ kind: "ngmodule", type: AXAvatarModule }, { kind: "component", type: i1$4.AXAvatarComponent, selector: "ax-avatar", inputs: ["color", "size", "shape", "look"], outputs: ["sizeChange"] }, { kind: "ngmodule", type: AXDecoratorModule }, { 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: AXImageModule }, { kind: "component", type: i3$5.AXImageComponent, selector: "ax-image", inputs: ["width", "height", "overlayMode", "src", "alt", "priority", "lazy"], outputs: ["onLoad", "onError"] }, { kind: "ngmodule", type: AXBadgeModule }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
3660
4663
|
}
|
|
3661
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
4664
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPUserAvatarComponent, decorators: [{
|
|
3662
4665
|
type: Component,
|
|
3663
|
-
args: [{ selector: 'axp-user-avatar', imports: [
|
|
3664
|
-
AXAvatarModule,
|
|
3665
|
-
AXDecoratorModule,
|
|
3666
|
-
AXImageModule,
|
|
3667
|
-
AXBadgeModule
|
|
3668
|
-
], encapsulation: ViewEncapsulation.None, providers: [], template: "<ax-avatar #avatar [size]=\"size()\" class=\"ax-cursor-pointer\">\n @if(hasPicture()){\n <ax-image (onError)=\"onImageError($event)\" (onLoad)=\"onImageLoad($event)\" [src]=\"src()\"></ax-image>\n }@else{\n <ax-text class=\"ax-{{ avatarColor() }}-lightest \">\n <small class=\"ax-text-xs ax-font-semibold\">{{ avatarText() }}</small>\n </ax-text>\n }\n</ax-avatar>\n\n<!--\n\nax-primary-lightest\nax-warning-lightest\nax-success-lightest\nax-danger-lightest\nax-secondary-lightest\nax-accent1-lightest\nax-accent2-lightest\nax-accent3-lightest\n\n-->\n" }]
|
|
4666
|
+
args: [{ selector: 'axp-user-avatar', imports: [AXAvatarModule, AXDecoratorModule, AXImageModule, AXBadgeModule], encapsulation: ViewEncapsulation.None, providers: [], template: "<ax-avatar #avatar [size]=\"size()\" class=\"ax-cursor-pointer\">\n @if(hasPicture()){\n <ax-image (onError)=\"onImageError($event)\" (onLoad)=\"onImageLoad($event)\" [src]=\"src()\"></ax-image>\n }@else{\n <ax-text class=\"ax-{{ avatarColor() }}-lightest \">\n <small class=\"ax-text-xs ax-font-semibold\">{{ avatarText() }}</small>\n </ax-text>\n }\n</ax-avatar>\n\n<!--\n\nax-primary-lightest\nax-warning-lightest\nax-success-lightest\nax-danger-lightest\nax-secondary-lightest\nax-accent1-lightest\nax-accent2-lightest\nax-accent3-lightest\n\n-->\n" }]
|
|
3669
4667
|
}] });
|
|
3670
4668
|
|
|
3671
4669
|
class AXPQueryViewsComponent {
|
|
@@ -3700,12 +4698,12 @@ class AXPQueryViewsComponent {
|
|
|
3700
4698
|
handleActiveChange(e) {
|
|
3701
4699
|
console.log(e);
|
|
3702
4700
|
}
|
|
3703
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
3704
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.
|
|
4701
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPQueryViewsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
4702
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.4", type: AXPQueryViewsComponent, isStandalone: true, selector: "axp-query-views", inputs: { views: { classPropertyName: "views", publicName: "views", isSignal: true, isRequired: false, transformFunction: null }, selectedView: { classPropertyName: "selectedView", publicName: "selectedView", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { views: "viewsChange", selectedView: "selectedViewChange" }, viewQueries: [{ propertyName: "tabs", first: true, predicate: ["tabs"], descendants: true, isSignal: true }], ngImport: i0, template: "<ax-tabs #tabs [look]=\"'with-line'\" class=\"ax-font-semibold\">\n @for (item of views(); track item.name) {\n <ax-tab-item (onClick)=\"setView(item)\" [key]=\"item.name\" [text]=\"(item.title | translate | async) || 'item.title'\">\n </ax-tab-item>\n }\n <!-- <ax-tab-item\n (onClick)=\"createNew()\"\n [key]=\"'create-new'\"\n [text]=\"('@general:actions.create.title' | translate | async) || 'Create New'\"\n >\n </ax-tab-item> -->\n</ax-tabs>\n", dependencies: [{ kind: "ngmodule", type: AXTabsModule }, { kind: "component", type: i2$5.AXTabsComponent, selector: "ax-tabs", inputs: ["look", "location", "fitParent", "minWidth", "content"], outputs: ["onActiveTabChanged"] }, { kind: "component", type: i2$5.AXTabItemComponent, selector: "ax-tab-item", inputs: ["disabled", "text", "key", "headerTemplate", "active"], outputs: ["disabledChange", "onClick", "onBlur", "onFocus", "activeChange"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i5.AXTranslatorPipe, name: "translate" }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
3705
4703
|
}
|
|
3706
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
4704
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPQueryViewsComponent, decorators: [{
|
|
3707
4705
|
type: Component,
|
|
3708
|
-
args: [{ selector: 'axp-query-views', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [AXTabsModule, AXTranslationModule, CommonModule], template: "<ax-tabs #tabs [look]=\"'with-line'\" class=\"ax-font-semibold\">\n @for (item of views(); track item.name) {\n <ax-tab-item (onClick)=\"setView(item)\" [key]=\"item.name\" [text]=\"(item.title | translate | async) || 'item.title'\">\n </ax-tab-item>\n }\n <!-- <ax-tab-item\n (onClick)=\"createNew()\"\n [key]=\"'create-new'\"\n [text]=\"('
|
|
4706
|
+
args: [{ selector: 'axp-query-views', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [AXTabsModule, AXTranslationModule, CommonModule], template: "<ax-tabs #tabs [look]=\"'with-line'\" class=\"ax-font-semibold\">\n @for (item of views(); track item.name) {\n <ax-tab-item (onClick)=\"setView(item)\" [key]=\"item.name\" [text]=\"(item.title | translate | async) || 'item.title'\">\n </ax-tab-item>\n }\n <!-- <ax-tab-item\n (onClick)=\"createNew()\"\n [key]=\"'create-new'\"\n [text]=\"('@general:actions.create.title' | translate | async) || 'Create New'\"\n >\n </ax-tab-item> -->\n</ax-tabs>\n" }]
|
|
3709
4707
|
}] });
|
|
3710
4708
|
|
|
3711
4709
|
/**
|
|
@@ -3754,10 +4752,10 @@ class AXPWidgetItemComponent {
|
|
|
3754
4752
|
getIconClass() {
|
|
3755
4753
|
return this.widget().icon || 'fa-light fa-document';
|
|
3756
4754
|
}
|
|
3757
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
3758
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.
|
|
4755
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPWidgetItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
4756
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.4", type: AXPWidgetItemComponent, isStandalone: true, selector: "axp-widget-item", inputs: { widget: { classPropertyName: "widget", publicName: "widget", isSignal: true, isRequired: true, transformFunction: null }, isSelected: { classPropertyName: "isSelected", publicName: "isSelected", isSignal: true, isRequired: false, transformFunction: null }, showPinButton: { classPropertyName: "showPinButton", publicName: "showPinButton", isSignal: true, isRequired: false, transformFunction: null }, customClasses: { classPropertyName: "customClasses", publicName: "customClasses", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onWidgetClick: "onWidgetClick", onPinClick: "onPinClick" }, ngImport: i0, template: "<div (click)=\"handleClick($event)\"\n class=\"ax-py-2 ax-px-3 ax-rounded-md ax-flex ax-gap-3 ax-items-center ax-group hover:ax-bg-primary-lightest/65 hover:ax-text-primary-on-lightest ax-cursor-pointer ax-w-full\"\n [class.ax-bg-primary-lightest]=\"isSelected()\" [class.ax-text-primary-on-lightest]=\"isSelected()\"\n [class.ax-border-primary-lightest]=\"isSelected()\" [class]=\"customClasses()\">\n\n <!-- Widget Icon -->\n <div class=\"ax-min-w-10 ax-h-10 ax-flex ax-items-center ax-justify-center ax-rounded-md ax-border group-hover:ax-bg-primary-lighter group-hover:ax-text-primary-on-lighter group-hover:ax-border-primary-lighter\"\n [class.ax-bg-primary-light]=\"isSelected()\" [class.ax-text-primary-on-light]=\"isSelected()\"\n [class.ax-border-primary-light]=\"isSelected()\" [class.ax-surface]=\"!isSelected()\">\n <i [ngClass]=\"getIconClass()\" class=\"ax-text-lg\"></i>\n </div>\n\n <!-- Widget Content -->\n <div class=\"ax-flex ax-flex-col ax-gap-1 ax-flex-1 ax-w-[70%]\">\n <div class=\"ax-flex ax-items-center ax-justify-between ax-gap-2\">\n <!-- Widget Title -->\n <div class=\"ax-font-semibold ax-text-sm ax-truncate\" [title]=\"widget().title\">\n {{ widget().title }}\n </div>\n\n <!-- Pin Button -->\n @if (showPinButton()) {\n <div (click)=\"handlePinClick($event)\" class=\"ax-cursor-pointer\">\n @if (widget().isPinned) {\n <i class=\"fa-solid fa-thumbtack ax-text-sm ax-rotate-45\" title=\"Unpin\"></i>\n } @else {\n <i class=\"fa-light fa-thumbtack ax-text-sm ax-rotate-45 ax-invisible group-hover:ax-visible\"\n title=\"Pin\"></i>\n }\n </div>\n }\n </div>\n\n <!-- Widget Description -->\n @if (widget().description) {\n <span class=\"ax-text-xs ax-truncate\" [title]=\"widget().description\">\n {{ widget().description }}\n </span>\n }\n </div>\n</div>", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
3759
4757
|
}
|
|
3760
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
4758
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPWidgetItemComponent, decorators: [{
|
|
3761
4759
|
type: Component,
|
|
3762
4760
|
args: [{ selector: 'axp-widget-item', imports: [CommonModule], encapsulation: ViewEncapsulation.None, template: "<div (click)=\"handleClick($event)\"\n class=\"ax-py-2 ax-px-3 ax-rounded-md ax-flex ax-gap-3 ax-items-center ax-group hover:ax-bg-primary-lightest/65 hover:ax-text-primary-on-lightest ax-cursor-pointer ax-w-full\"\n [class.ax-bg-primary-lightest]=\"isSelected()\" [class.ax-text-primary-on-lightest]=\"isSelected()\"\n [class.ax-border-primary-lightest]=\"isSelected()\" [class]=\"customClasses()\">\n\n <!-- Widget Icon -->\n <div class=\"ax-min-w-10 ax-h-10 ax-flex ax-items-center ax-justify-center ax-rounded-md ax-border group-hover:ax-bg-primary-lighter group-hover:ax-text-primary-on-lighter group-hover:ax-border-primary-lighter\"\n [class.ax-bg-primary-light]=\"isSelected()\" [class.ax-text-primary-on-light]=\"isSelected()\"\n [class.ax-border-primary-light]=\"isSelected()\" [class.ax-surface]=\"!isSelected()\">\n <i [ngClass]=\"getIconClass()\" class=\"ax-text-lg\"></i>\n </div>\n\n <!-- Widget Content -->\n <div class=\"ax-flex ax-flex-col ax-gap-1 ax-flex-1 ax-w-[70%]\">\n <div class=\"ax-flex ax-items-center ax-justify-between ax-gap-2\">\n <!-- Widget Title -->\n <div class=\"ax-font-semibold ax-text-sm ax-truncate\" [title]=\"widget().title\">\n {{ widget().title }}\n </div>\n\n <!-- Pin Button -->\n @if (showPinButton()) {\n <div (click)=\"handlePinClick($event)\" class=\"ax-cursor-pointer\">\n @if (widget().isPinned) {\n <i class=\"fa-solid fa-thumbtack ax-text-sm ax-rotate-45\" title=\"Unpin\"></i>\n } @else {\n <i class=\"fa-light fa-thumbtack ax-text-sm ax-rotate-45 ax-invisible group-hover:ax-visible\"\n title=\"Pin\"></i>\n }\n </div>\n }\n </div>\n\n <!-- Widget Description -->\n @if (widget().description) {\n <span class=\"ax-text-xs ax-truncate\" [title]=\"widget().description\">\n {{ widget().description }}\n </span>\n }\n </div>\n</div>" }]
|
|
3763
4761
|
}] });
|
|
@@ -3766,5 +4764,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.8", ngImpor
|
|
|
3766
4764
|
* Generated bundle index. Do not edit.
|
|
3767
4765
|
*/
|
|
3768
4766
|
|
|
3769
|
-
export { AXPActivityLogComponent, AXPCompareViewComponent, AXPComponentSlot, AXPComponentSlotDirective, AXPComponentSlotModule, AXPComponentSlotRegistryService, AXPDataSelectorComponent, AXPDataSelectorService,
|
|
4767
|
+
export { AXPActivityLogComponent, AXPCategoryTreeComponent, AXPCompareViewComponent, AXPComponentSlot, AXPComponentSlotDirective, AXPComponentSlotModule, AXPComponentSlotRegistryService, AXPDataSelectorComponent, AXPDataSelectorService, AXPDynamicFormDesignerComponent, AXPExtraPropertiesComponent, AXPExtraPropertiesSchemaComponent, AXPExtraPropertiesValuesComponent, AXPImageEditorPopupComponent, AXPImageEditorService, AXPMenuBadgeHelper, AXPQueryColumnsComponent, AXPQueryFiltersComponent, AXPQuerySortsComponent, AXPQueryViewsComponent, AXPStateMessageComponent, AXPTaskBadgeDirective, AXPTaskBadgeProvider, AXPTaskBadgeService, AXPTemplateViewerComponent, AXPTemplateViewerService, AXPThemeLayoutActionsComponent, AXPThemeLayoutBlockComponent, AXPThemeLayoutContainerComponent, AXPThemeLayoutEndSideComponent, AXPThemeLayoutFooterComponent, AXPThemeLayoutHeaderComponent, AXPThemeLayoutListComponent, AXPThemeLayoutListItemComponent, AXPThemeLayoutListItemsGroupComponent, AXPThemeLayoutPageHeaderComponent, AXPThemeLayoutPagePrimaryActionsComponent, AXPThemeLayoutPageSecondaryActionsComponent, AXPThemeLayoutSectionComponent, AXPThemeLayoutStartSideComponent, AXPThemeLayoutToolbarComponent, AXPUserAvatarComponent, AXPUserAvatarService, AXPWidgetItemComponent, AXPWidgetPropertyViewerComponent, AXPWidgetPropertyViewerPopupComponent, AXPWidgetPropertyViewerService, AXP_EXTRA_PROPERTY_TYPES, AXP_TASK_BADGE_PROVIDERS, AXP_USER_AVATAR_PROVIDER, convertDesignerFieldToFormField, convertDesignerGroupToFormGroup, convertDesignerStateToFormDefinition };
|
|
3770
4768
|
//# sourceMappingURL=acorex-platform-layout-components.mjs.map
|