@acorex-platform/framework-client 0.0.38 → 0.0.48
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/acorex-platform-framework-client-auth.mjs +212 -44
- package/fesm2022/acorex-platform-framework-client-auth.mjs.map +1 -1
- package/fesm2022/{acorex-platform-framework-client-common-common-settings.provider-CzBr0cRi.mjs → acorex-platform-framework-client-common-common-settings.provider-ChU2tvyt.mjs} +31 -1
- package/fesm2022/acorex-platform-framework-client-common-common-settings.provider-ChU2tvyt.mjs.map +1 -0
- package/fesm2022/acorex-platform-framework-client-common.mjs +1172 -193
- package/fesm2022/acorex-platform-framework-client-common.mjs.map +1 -1
- package/fesm2022/acorex-platform-framework-client-core.mjs +233 -132
- package/fesm2022/acorex-platform-framework-client-core.mjs.map +1 -1
- package/fesm2022/acorex-platform-framework-client-layout-builder.mjs +295 -59
- package/fesm2022/acorex-platform-framework-client-layout-builder.mjs.map +1 -1
- package/fesm2022/{acorex-platform-framework-client-layout-components-binding-expression-editor-popup.component-Bp2cNCPO.mjs → acorex-platform-framework-client-layout-components-binding-expression-editor-popup.component-BqPaHKPM.mjs} +10 -6
- package/fesm2022/acorex-platform-framework-client-layout-components-binding-expression-editor-popup.component-BqPaHKPM.mjs.map +1 -0
- package/fesm2022/acorex-platform-framework-client-layout-components-property-viewer-inline-code-editor.component-CcpUTEVQ.mjs +66 -0
- package/fesm2022/acorex-platform-framework-client-layout-components-property-viewer-inline-code-editor.component-CcpUTEVQ.mjs.map +1 -0
- package/fesm2022/acorex-platform-framework-client-layout-components-resource-appointment-board.component-DCkpgsFH.mjs +195 -0
- package/fesm2022/acorex-platform-framework-client-layout-components-resource-appointment-board.component-DCkpgsFH.mjs.map +1 -0
- package/fesm2022/acorex-platform-framework-client-layout-components.mjs +4015 -1014
- package/fesm2022/acorex-platform-framework-client-layout-components.mjs.map +1 -1
- package/fesm2022/acorex-platform-framework-client-layout-designer.mjs +1179 -304
- package/fesm2022/acorex-platform-framework-client-layout-designer.mjs.map +1 -1
- package/fesm2022/{acorex-platform-framework-client-layout-entity-acorex-platform-framework-client-layout-entity-CvaOWbJx.mjs → acorex-platform-framework-client-layout-entity-acorex-platform-framework-client-layout-entity-UkQsf84C.mjs} +1701 -300
- package/fesm2022/acorex-platform-framework-client-layout-entity-acorex-platform-framework-client-layout-entity-UkQsf84C.mjs.map +1 -0
- package/fesm2022/{acorex-platform-framework-client-layout-entity-attachments-page.component-Ds63Rt2n.mjs → acorex-platform-framework-client-layout-entity-attachments-page.component-DmmiDLZw.mjs} +2 -2
- package/fesm2022/{acorex-platform-framework-client-layout-entity-attachments-page.component-Ds63Rt2n.mjs.map → acorex-platform-framework-client-layout-entity-attachments-page.component-DmmiDLZw.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-framework-client-layout-entity-bulk-entity.command-C0pohwdo.mjs → acorex-platform-framework-client-layout-entity-bulk-entity.command-BOFTb66c.mjs} +2 -2
- package/fesm2022/{acorex-platform-framework-client-layout-entity-bulk-entity.command-C0pohwdo.mjs.map → acorex-platform-framework-client-layout-entity-bulk-entity.command-BOFTb66c.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-framework-client-layout-entity-gallery-page.component-o2HuZrDN.mjs → acorex-platform-framework-client-layout-entity-gallery-page.component-Bg-cMOlQ.mjs} +2 -2
- package/fesm2022/{acorex-platform-framework-client-layout-entity-gallery-page.component-o2HuZrDN.mjs.map → acorex-platform-framework-client-layout-entity-gallery-page.component-Bg-cMOlQ.mjs.map} +1 -1
- package/fesm2022/acorex-platform-framework-client-layout-entity.mjs +2 -2
- package/fesm2022/acorex-platform-framework-client-layout-views.mjs +47 -8
- package/fesm2022/acorex-platform-framework-client-layout-views.mjs.map +1 -1
- package/fesm2022/acorex-platform-framework-client-layout-widget-core.mjs +3854 -3292
- package/fesm2022/acorex-platform-framework-client-layout-widget-core.mjs.map +1 -1
- package/fesm2022/acorex-platform-framework-client-layout-widgets-acorex-platform-framework-client-layout-widgets-DJNSBNVe.mjs +33319 -0
- package/fesm2022/acorex-platform-framework-client-layout-widgets-acorex-platform-framework-client-layout-widgets-DJNSBNVe.mjs.map +1 -0
- package/fesm2022/{acorex-platform-framework-client-layout-widgets-button-widget-designer.component-BDOdcoyN.mjs → acorex-platform-framework-client-layout-widgets-button-widget-designer.component-BkrPu1wO.mjs} +8 -5
- package/fesm2022/acorex-platform-framework-client-layout-widgets-button-widget-designer.component-BkrPu1wO.mjs.map +1 -0
- package/fesm2022/acorex-platform-framework-client-layout-widgets-code-editor-value.util-Cb7R1qLO.mjs +45 -0
- package/fesm2022/acorex-platform-framework-client-layout-widgets-code-editor-value.util-Cb7R1qLO.mjs.map +1 -0
- package/fesm2022/acorex-platform-framework-client-layout-widgets-code-editor-widget-column.component-BL621E1r.mjs +68 -0
- package/fesm2022/acorex-platform-framework-client-layout-widgets-code-editor-widget-column.component-BL621E1r.mjs.map +1 -0
- package/fesm2022/acorex-platform-framework-client-layout-widgets-code-editor-widget-edit.component-CVsPKhNl.mjs +88 -0
- package/fesm2022/acorex-platform-framework-client-layout-widgets-code-editor-widget-edit.component-CVsPKhNl.mjs.map +1 -0
- package/fesm2022/acorex-platform-framework-client-layout-widgets-code-editor-widget-view.component-BEq4O4al.mjs +71 -0
- package/fesm2022/acorex-platform-framework-client-layout-widgets-code-editor-widget-view.component-BEq4O4al.mjs.map +1 -0
- package/fesm2022/acorex-platform-framework-client-layout-widgets-condition-builder-edit-popup.component-WpiEHusZ.mjs +81 -0
- package/fesm2022/acorex-platform-framework-client-layout-widgets-condition-builder-edit-popup.component-WpiEHusZ.mjs.map +1 -0
- package/fesm2022/{acorex-platform-framework-client-layout-widgets-page-widget-designer.component-WzIiwnGC.mjs → acorex-platform-framework-client-layout-widgets-page-widget-designer.component-Cadl6guA.mjs} +41 -23
- package/fesm2022/acorex-platform-framework-client-layout-widgets-page-widget-designer.component-Cadl6guA.mjs.map +1 -0
- package/fesm2022/{acorex-platform-framework-client-layout-widgets-repeater-widget-column.component-4mX8aYzA.mjs → acorex-platform-framework-client-layout-widgets-repeater-widget-column.component-CKtGsWPI.mjs} +3 -3
- package/fesm2022/{acorex-platform-framework-client-layout-widgets-repeater-widget-column.component-4mX8aYzA.mjs.map → acorex-platform-framework-client-layout-widgets-repeater-widget-column.component-CKtGsWPI.mjs.map} +1 -1
- package/fesm2022/acorex-platform-framework-client-layout-widgets-scheduler-picker-widget-column.component-Clb27Loe.mjs +71 -0
- package/fesm2022/acorex-platform-framework-client-layout-widgets-scheduler-picker-widget-column.component-Clb27Loe.mjs.map +1 -0
- package/fesm2022/acorex-platform-framework-client-layout-widgets-scheduler-picker-widget-edit.component-l7q8A-D3.mjs +111 -0
- package/fesm2022/acorex-platform-framework-client-layout-widgets-scheduler-picker-widget-edit.component-l7q8A-D3.mjs.map +1 -0
- package/fesm2022/acorex-platform-framework-client-layout-widgets-scheduler-picker-widget-view.component-Cc1AH09b.mjs +77 -0
- package/fesm2022/acorex-platform-framework-client-layout-widgets-scheduler-picker-widget-view.component-Cc1AH09b.mjs.map +1 -0
- package/fesm2022/{acorex-platform-framework-client-layout-widgets-tabular-data-edit-popup.component-TWxthl21.mjs → acorex-platform-framework-client-layout-widgets-tabular-data-edit-popup.component-BCLxS3rS.mjs} +3 -3
- package/fesm2022/{acorex-platform-framework-client-layout-widgets-tabular-data-edit-popup.component-TWxthl21.mjs.map → acorex-platform-framework-client-layout-widgets-tabular-data-edit-popup.component-BCLxS3rS.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-framework-client-layout-widgets-text-block-widget-designer.component-D6HFPmGC.mjs → acorex-platform-framework-client-layout-widgets-text-block-widget-designer.component-DYxgwR2E.mjs} +21 -8
- package/fesm2022/acorex-platform-framework-client-layout-widgets-text-block-widget-designer.component-DYxgwR2E.mjs.map +1 -0
- package/fesm2022/acorex-platform-framework-client-layout-widgets-trigger-expression-editor-popup.component-C2PGoC7r.mjs +124 -0
- package/fesm2022/acorex-platform-framework-client-layout-widgets-trigger-expression-editor-popup.component-C2PGoC7r.mjs.map +1 -0
- package/fesm2022/acorex-platform-framework-client-layout-widgets-triggers-widget-editor.component-DDDoPoQa.mjs +345 -0
- package/fesm2022/acorex-platform-framework-client-layout-widgets-triggers-widget-editor.component-DDDoPoQa.mjs.map +1 -0
- package/fesm2022/acorex-platform-framework-client-layout-widgets.mjs +1 -31985
- package/fesm2022/acorex-platform-framework-client-layout-widgets.mjs.map +1 -1
- package/fesm2022/acorex-platform-framework-client-realtime.mjs +2 -1
- package/fesm2022/acorex-platform-framework-client-realtime.mjs.map +1 -1
- package/fesm2022/acorex-platform-framework-client-runtime.mjs +2 -2
- package/fesm2022/acorex-platform-framework-client-runtime.mjs.map +1 -1
- package/fesm2022/{acorex-platform-framework-client-themes-default-entity-master-create-view.component-CT7WWWG0.mjs → acorex-platform-framework-client-themes-default-entity-master-create-view.component-DlS4v_zb.mjs} +3 -3
- package/fesm2022/acorex-platform-framework-client-themes-default-entity-master-create-view.component-DlS4v_zb.mjs.map +1 -0
- package/fesm2022/acorex-platform-framework-client-themes-default-entity-master-modify-view.component-DBmdBKBL.mjs +122 -0
- package/fesm2022/acorex-platform-framework-client-themes-default-entity-master-modify-view.component-DBmdBKBL.mjs.map +1 -0
- package/fesm2022/{acorex-platform-framework-client-themes-default-entity-master-single-view.component-DBUwSzvg.mjs → acorex-platform-framework-client-themes-default-entity-master-single-view.component-CkpRT1a9.mjs} +3 -3
- package/fesm2022/acorex-platform-framework-client-themes-default-entity-master-single-view.component-CkpRT1a9.mjs.map +1 -0
- package/fesm2022/acorex-platform-framework-client-themes-default.mjs +424 -103
- package/fesm2022/acorex-platform-framework-client-themes-default.mjs.map +1 -1
- package/fesm2022/{acorex-platform-framework-client-themes-shared-settings.provider-CpsAIsxj.mjs → acorex-platform-framework-client-themes-shared-settings.provider-DIkjSTU7.mjs} +102 -1
- package/fesm2022/acorex-platform-framework-client-themes-shared-settings.provider-DIkjSTU7.mjs.map +1 -0
- package/fesm2022/acorex-platform-framework-client-themes-shared.mjs +174 -22
- package/fesm2022/acorex-platform-framework-client-themes-shared.mjs.map +1 -1
- package/package.json +2 -2
- package/realtime/README.md +1 -1
- package/types/acorex-platform-framework-client-auth.d.ts +18 -1
- package/types/acorex-platform-framework-client-common.d.ts +243 -9
- package/types/acorex-platform-framework-client-core.d.ts +152 -119
- package/types/acorex-platform-framework-client-layout-builder.d.ts +29 -0
- package/types/acorex-platform-framework-client-layout-components.d.ts +717 -147
- package/types/acorex-platform-framework-client-layout-designer.d.ts +192 -14
- package/types/acorex-platform-framework-client-layout-entity.d.ts +167 -92
- package/types/acorex-platform-framework-client-layout-views.d.ts +23 -1
- package/types/acorex-platform-framework-client-layout-widget-core.d.ts +148 -40
- package/types/acorex-platform-framework-client-layout-widgets.d.ts +261 -119
- package/types/acorex-platform-framework-client-realtime.d.ts +16 -3
- package/types/acorex-platform-framework-client-themes-default.d.ts +62 -11
- package/types/acorex-platform-framework-client-themes-shared.d.ts +25 -2
- package/fesm2022/acorex-platform-framework-client-common-common-settings.provider-CzBr0cRi.mjs.map +0 -1
- package/fesm2022/acorex-platform-framework-client-layout-components-binding-expression-editor-popup.component-Bp2cNCPO.mjs.map +0 -1
- package/fesm2022/acorex-platform-framework-client-layout-components-file-provider-picker.popup.component-BtLEUWAA.mjs +0 -77
- package/fesm2022/acorex-platform-framework-client-layout-components-file-provider-picker.popup.component-BtLEUWAA.mjs.map +0 -1
- package/fesm2022/acorex-platform-framework-client-layout-entity-acorex-platform-framework-client-layout-entity-CvaOWbJx.mjs.map +0 -1
- package/fesm2022/acorex-platform-framework-client-layout-widgets-button-widget-designer.component-BDOdcoyN.mjs.map +0 -1
- package/fesm2022/acorex-platform-framework-client-layout-widgets-page-widget-designer.component-WzIiwnGC.mjs.map +0 -1
- package/fesm2022/acorex-platform-framework-client-layout-widgets-text-block-widget-designer.component-D6HFPmGC.mjs.map +0 -1
- package/fesm2022/acorex-platform-framework-client-themes-default-entity-master-create-view.component-CT7WWWG0.mjs.map +0 -1
- package/fesm2022/acorex-platform-framework-client-themes-default-entity-master-modify-view.component-DienTcPE.mjs +0 -122
- package/fesm2022/acorex-platform-framework-client-themes-default-entity-master-modify-view.component-DienTcPE.mjs.map +0 -1
- package/fesm2022/acorex-platform-framework-client-themes-default-entity-master-single-view.component-DBUwSzvg.mjs.map +0 -1
- package/fesm2022/acorex-platform-framework-client-themes-shared-settings.provider-CpsAIsxj.mjs.map +0 -1
|
@@ -5,7 +5,10 @@ import * as i2$1 from '@acorex/components/decorators';
|
|
|
5
5
|
import { AXDecoratorModule } from '@acorex/components/decorators';
|
|
6
6
|
import * as i2 from '@acorex/components/loading';
|
|
7
7
|
import { AXLoadingModule } from '@acorex/components/loading';
|
|
8
|
+
import * as i3 from '@acorex/core/translation';
|
|
9
|
+
import { AXTranslationModule } from '@acorex/core/translation';
|
|
8
10
|
import { AXPLayoutBaseWidgetComponent } from '@acorex-platform/framework-client/layout/widget-core';
|
|
11
|
+
import { AsyncPipe } from '@angular/common';
|
|
9
12
|
import * as i0 from '@angular/core';
|
|
10
13
|
import { computed, EventEmitter, HostBinding, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
11
14
|
|
|
@@ -34,7 +37,7 @@ class AXPButtonWidgetDesignerComponent extends AXPLayoutBaseWidgetComponent {
|
|
|
34
37
|
}
|
|
35
38
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXPButtonWidgetDesignerComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
36
39
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: AXPButtonWidgetDesignerComponent, isStandalone: true, selector: "axp-button-widget-designer", host: { properties: { "class": "this.__class" } }, usesInheritance: true, ngImport: i0, template: `
|
|
37
|
-
<ax-button [disabled]="disabled()" [color]="color()" [look]="look()" [text]="text()">
|
|
40
|
+
<ax-button [disabled]="disabled()" [color]="color()" [look]="look()" [text]="(text() | translate | async) ?? ''">
|
|
38
41
|
@if (icon() && text()) {
|
|
39
42
|
<ax-prefix
|
|
40
43
|
><ax-icon> <i class="fa-solid" [class]="icon()"></i> </ax-icon
|
|
@@ -46,14 +49,14 @@ class AXPButtonWidgetDesignerComponent extends AXPLayoutBaseWidgetComponent {
|
|
|
46
49
|
<ax-loading> </ax-loading>
|
|
47
50
|
}
|
|
48
51
|
</ax-button>
|
|
49
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i1.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXLoadingModule }, { kind: "component", type: i2.AXLoadingComponent, selector: "ax-loading", inputs: ["visible", "type", "context"], outputs: ["visibleChange"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i2$1.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i2$1.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXBadgeModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
52
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i1.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXLoadingModule }, { kind: "component", type: i2.AXLoadingComponent, selector: "ax-loading", inputs: ["visible", "type", "context"], outputs: ["visibleChange"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i2$1.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i2$1.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXBadgeModule }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "pipe", type: i3.AXTranslatorPipe, name: "translate" }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
50
53
|
}
|
|
51
54
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXPButtonWidgetDesignerComponent, decorators: [{
|
|
52
55
|
type: Component,
|
|
53
56
|
args: [{
|
|
54
57
|
selector: 'axp-button-widget-designer',
|
|
55
58
|
template: `
|
|
56
|
-
<ax-button [disabled]="disabled()" [color]="color()" [look]="look()" [text]="text()">
|
|
59
|
+
<ax-button [disabled]="disabled()" [color]="color()" [look]="look()" [text]="(text() | translate | async) ?? ''">
|
|
57
60
|
@if (icon() && text()) {
|
|
58
61
|
<ax-prefix
|
|
59
62
|
><ax-icon> <i class="fa-solid" [class]="icon()"></i> </ax-icon
|
|
@@ -67,7 +70,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
67
70
|
</ax-button>
|
|
68
71
|
`,
|
|
69
72
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
70
|
-
imports: [AXButtonModule, AXLoadingModule, AXDecoratorModule, AXBadgeModule],
|
|
73
|
+
imports: [AXButtonModule, AXLoadingModule, AXDecoratorModule, AXBadgeModule, AXTranslationModule, AsyncPipe],
|
|
71
74
|
}]
|
|
72
75
|
}], propDecorators: { __class: [{
|
|
73
76
|
type: HostBinding,
|
|
@@ -75,4 +78,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
75
78
|
}] } });
|
|
76
79
|
|
|
77
80
|
export { AXPButtonWidgetDesignerComponent };
|
|
78
|
-
//# sourceMappingURL=acorex-platform-framework-client-layout-widgets-button-widget-designer.component-
|
|
81
|
+
//# sourceMappingURL=acorex-platform-framework-client-layout-widgets-button-widget-designer.component-BkrPu1wO.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acorex-platform-framework-client-layout-widgets-button-widget-designer.component-BkrPu1wO.mjs","sources":["../../../../../libs/framework/client/layout/widgets/src/lib/widgets/actions/button/button-widget-designer.component.ts"],"sourcesContent":["import { AXClickEvent, AXStyleColorType, AXStyleLookType } from '@acorex/cdk/common';\nimport { AXBadgeModule } from '@acorex/components/badge';\nimport { AXButtonModule } from '@acorex/components/button';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXLoadingModule } from '@acorex/components/loading';\nimport { AXTranslationModule } from '@acorex/core/translation';\nimport { AXPLayoutBaseWidgetComponent } from '@acorex-platform/framework-client/layout/widget-core';\n\nimport { AsyncPipe } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, computed, EventEmitter, HostBinding } from '@angular/core';\n@Component({\n selector: 'axp-button-widget-designer',\n template: `\n <ax-button [disabled]=\"disabled()\" [color]=\"color()\" [look]=\"look()\" [text]=\"(text() | translate | async) ?? ''\">\n @if (icon() && text()) {\n <ax-prefix\n ><ax-icon> <i class=\"fa-solid\" [class]=\"icon()\"></i> </ax-icon\n ></ax-prefix>\n } @else if (icon() && !text()) {\n <ax-icon> <i class=\"fa-solid\" [class]=\"icon()\"></i> </ax-icon>\n }\n @if (loading()) {\n <ax-loading> </ax-loading>\n }\n </ax-button>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [AXButtonModule, AXLoadingModule, AXDecoratorModule, AXBadgeModule, AXTranslationModule, AsyncPipe],\n})\nexport class AXPButtonWidgetDesignerComponent extends AXPLayoutBaseWidgetComponent {\n protected disabled = computed<boolean>(() => this.options()['disabled']);\n protected color = computed<AXStyleColorType>(() => this.options()['color']?.id ?? 'primary');\n protected look = computed<AXStyleLookType>(() => this.options()['look']?.id ?? 'solid');\n protected text = computed<string | undefined>(() => this.options()['text']);\n protected loading = computed<boolean>(() => this.options()['loading']);\n protected icon = computed<string | undefined>(() => this.options()['icon']);\n\n public onClick = new EventEmitter<AXClickEvent>();\n\n @HostBinding('class')\n private get __class(): string {\n const cls: any = {};\n //\n cls['inline-block'] = true;\n return cls;\n }\n}\n"],"names":["i4"],"mappings":";;;;;;;;;;;;;;AA6BM,MAAO,gCAAiC,SAAQ,4BAA4B,CAAA;AAnBlF,IAAA,WAAA,GAAA;;AAoBY,QAAA,IAAA,CAAA,QAAQ,GAAG,QAAQ,CAAU,MAAM,IAAI,CAAC,OAAO,EAAE,CAAC,UAAU,CAAC;qFAAC;AAC9D,QAAA,IAAA,CAAA,KAAK,GAAG,QAAQ,CAAmB,MAAM,IAAI,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,EAAE,EAAE,IAAI,SAAS;kFAAC;AAClF,QAAA,IAAA,CAAA,IAAI,GAAG,QAAQ,CAAkB,MAAM,IAAI,CAAC,OAAO,EAAE,CAAC,MAAM,CAAC,EAAE,EAAE,IAAI,OAAO;iFAAC;AAC7E,QAAA,IAAA,CAAA,IAAI,GAAG,QAAQ,CAAqB,MAAM,IAAI,CAAC,OAAO,EAAE,CAAC,MAAM,CAAC;iFAAC;AACjE,QAAA,IAAA,CAAA,OAAO,GAAG,QAAQ,CAAU,MAAM,IAAI,CAAC,OAAO,EAAE,CAAC,SAAS,CAAC;oFAAC;AAC5D,QAAA,IAAA,CAAA,IAAI,GAAG,QAAQ,CAAqB,MAAM,IAAI,CAAC,OAAO,EAAE,CAAC,MAAM,CAAC;iFAAC;AAEpE,QAAA,IAAA,CAAA,OAAO,GAAG,IAAI,YAAY,EAAgB;AASlD,IAAA;AAPC,IAAA,IACY,OAAO,GAAA;QAC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,EAAA,MAAA,EAAA,SAAA,CAAA,EAAA,OAAA,EAAA,CAAA,eAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAE,iBAAiB,0VAAE,aAAa,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAE,mBAAmB,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAAA,EAAA,CAAA,gBAAA,EAAA,IAAA,EAAA,WAAA,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAE,SAAS,EAAA,IAAA,EAAA,OAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAEhG,gCAAgC,EAAA,UAAA,EAAA,CAAA;kBAnB5C,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,4BAA4B;AACtC,oBAAA,QAAQ,EAAE;;;;;;;;;;;;;AAaT,EAAA,CAAA;oBACD,eAAe,EAAE,uBAAuB,CAAC,MAAM;AAC/C,oBAAA,OAAO,EAAE,CAAC,cAAc,EAAE,eAAe,EAAE,iBAAiB,EAAE,aAAa,EAAE,mBAAmB,EAAE,SAAS,CAAC;AAC7G,iBAAA;;sBAWE,WAAW;uBAAC,OAAO;;;"}
|
package/fesm2022/acorex-platform-framework-client-layout-widgets-code-editor-value.util-Cb7R1qLO.mjs
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
//#region ----- Code editor value coercion -----
|
|
2
|
+
/**
|
|
3
|
+
* Code-editor widgets bind a string. Catalog fields often store object/array JSON.
|
|
4
|
+
* Coerce those values so column/view/edit never call string methods on non-strings.
|
|
5
|
+
*/
|
|
6
|
+
function coerceCodeEditorText(value, pretty = false) {
|
|
7
|
+
if (value == null) {
|
|
8
|
+
return '';
|
|
9
|
+
}
|
|
10
|
+
if (typeof value === 'string') {
|
|
11
|
+
return value;
|
|
12
|
+
}
|
|
13
|
+
if (typeof value === 'number' || typeof value === 'boolean') {
|
|
14
|
+
return String(value);
|
|
15
|
+
}
|
|
16
|
+
try {
|
|
17
|
+
return JSON.stringify(value, null, pretty ? 2 : 0) ?? '';
|
|
18
|
+
}
|
|
19
|
+
catch {
|
|
20
|
+
return '';
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Edit mode binds a string. Writing that string over an object/array
|
|
25
|
+
* (`content`) breaks sibling nested paths such as `content.module`.
|
|
26
|
+
*/
|
|
27
|
+
function restoreCodeEditorBoundValue(text, current) {
|
|
28
|
+
if (current != null && typeof current === 'object') {
|
|
29
|
+
const trimmed = text?.trim() ?? '';
|
|
30
|
+
if (!trimmed) {
|
|
31
|
+
return current;
|
|
32
|
+
}
|
|
33
|
+
try {
|
|
34
|
+
return JSON.parse(trimmed);
|
|
35
|
+
}
|
|
36
|
+
catch {
|
|
37
|
+
return current;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
return text;
|
|
41
|
+
}
|
|
42
|
+
//#endregion
|
|
43
|
+
|
|
44
|
+
export { coerceCodeEditorText as c, restoreCodeEditorBoundValue as r };
|
|
45
|
+
//# sourceMappingURL=acorex-platform-framework-client-layout-widgets-code-editor-value.util-Cb7R1qLO.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acorex-platform-framework-client-layout-widgets-code-editor-value.util-Cb7R1qLO.mjs","sources":["../../../../../libs/framework/client/layout/widgets/src/lib/widgets/advance/code-editor/code-editor-value.util.ts"],"sourcesContent":["//#region ----- Code editor value coercion -----\n\n/**\n * Code-editor widgets bind a string. Catalog fields often store object/array JSON.\n * Coerce those values so column/view/edit never call string methods on non-strings.\n */\nexport function coerceCodeEditorText(value: unknown, pretty = false): string {\n if (value == null) {\n return '';\n }\n\n if (typeof value === 'string') {\n return value;\n }\n\n if (typeof value === 'number' || typeof value === 'boolean') {\n return String(value);\n }\n\n try {\n return JSON.stringify(value, null, pretty ? 2 : 0) ?? '';\n } catch {\n return '';\n }\n}\n\n/**\n * Edit mode binds a string. Writing that string over an object/array\n * (`content`) breaks sibling nested paths such as `content.module`.\n */\nexport function restoreCodeEditorBoundValue(text: string, current: unknown): unknown {\n if (current != null && typeof current === 'object') {\n const trimmed = text?.trim() ?? '';\n if (!trimmed) {\n return current;\n }\n try {\n return JSON.parse(trimmed);\n } catch {\n return current;\n }\n }\n return text;\n}\n\n//#endregion\n"],"names":[],"mappings":"AAAA;AAEA;;;AAGG;SACa,oBAAoB,CAAC,KAAc,EAAE,MAAM,GAAG,KAAK,EAAA;AACjE,IAAA,IAAI,KAAK,IAAI,IAAI,EAAE;AACjB,QAAA,OAAO,EAAE;IACX;AAEA,IAAA,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;AAC7B,QAAA,OAAO,KAAK;IACd;IAEA,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,OAAO,KAAK,KAAK,SAAS,EAAE;AAC3D,QAAA,OAAO,MAAM,CAAC,KAAK,CAAC;IACtB;AAEA,IAAA,IAAI;QACF,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,EAAE,MAAM,GAAG,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE;IAC1D;AAAE,IAAA,MAAM;AACN,QAAA,OAAO,EAAE;IACX;AACF;AAEA;;;AAGG;AACG,SAAU,2BAA2B,CAAC,IAAY,EAAE,OAAgB,EAAA;IACxE,IAAI,OAAO,IAAI,IAAI,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE;QAClD,MAAM,OAAO,GAAG,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE;QAClC,IAAI,CAAC,OAAO,EAAE;AACZ,YAAA,OAAO,OAAO;QAChB;AACA,QAAA,IAAI;AACF,YAAA,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC;QAC5B;AAAE,QAAA,MAAM;AACN,YAAA,OAAO,OAAO;QAChB;IACF;AACA,IAAA,OAAO,IAAI;AACb;AAEA;;"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { AXPColumnWidgetComponent } from '@acorex-platform/framework-client/layout/widget-core';
|
|
2
|
+
import * as i0 from '@angular/core';
|
|
3
|
+
import { computed, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
4
|
+
import { c as coerceCodeEditorText } from './acorex-platform-framework-client-layout-widgets-code-editor-value.util-Cb7R1qLO.mjs';
|
|
5
|
+
|
|
6
|
+
//#region ---- Imports ----
|
|
7
|
+
//#endregion
|
|
8
|
+
//#region ---- Component ----
|
|
9
|
+
class AXPCodeEditorWidgetColumnComponent extends AXPColumnWidgetComponent {
|
|
10
|
+
constructor() {
|
|
11
|
+
super(...arguments);
|
|
12
|
+
//#region ---- Computed Properties ----
|
|
13
|
+
this.fullValue = computed(() => coerceCodeEditorText(this.rawValue), /* @ts-ignore */
|
|
14
|
+
...(ngDevMode ? [{ debugName: "fullValue" }] : /* istanbul ignore next */ []));
|
|
15
|
+
this.displayText = computed(() => {
|
|
16
|
+
const value = this.fullValue();
|
|
17
|
+
if (!value) {
|
|
18
|
+
return '';
|
|
19
|
+
}
|
|
20
|
+
const trimmed = value.trim().replace(/\r\n/g, '\n').replace(/\r/g, '\n');
|
|
21
|
+
// If empty after trimming, return empty
|
|
22
|
+
if (!trimmed) {
|
|
23
|
+
return '';
|
|
24
|
+
}
|
|
25
|
+
// Get max length from options (default: 100 characters)
|
|
26
|
+
const options = this.options;
|
|
27
|
+
const maxLength = options?.['maxLength'] ?? 100;
|
|
28
|
+
// If value is shorter than max length, return as-is
|
|
29
|
+
if (trimmed.length <= maxLength) {
|
|
30
|
+
return trimmed;
|
|
31
|
+
}
|
|
32
|
+
// Truncate and add ellipsis
|
|
33
|
+
return trimmed.substring(0, maxLength) + '...';
|
|
34
|
+
}, /* @ts-ignore */
|
|
35
|
+
...(ngDevMode ? [{ debugName: "displayText" }] : /* istanbul ignore next */ []));
|
|
36
|
+
}
|
|
37
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXPCodeEditorWidgetColumnComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
38
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: AXPCodeEditorWidgetColumnComponent, isStandalone: true, selector: "axp-code-editor-widget-column", inputs: { rawValue: "rawValue", rowData: "rowData" }, usesInheritance: true, ngImport: i0, template: `
|
|
39
|
+
@if (displayText()) {
|
|
40
|
+
<span [title]="fullValue()" class="text-xs font-mono text-muted">
|
|
41
|
+
{{ displayText() }}
|
|
42
|
+
</span>
|
|
43
|
+
} @else {
|
|
44
|
+
<span class="text-muted">---</span>
|
|
45
|
+
}
|
|
46
|
+
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
47
|
+
}
|
|
48
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXPCodeEditorWidgetColumnComponent, decorators: [{
|
|
49
|
+
type: Component,
|
|
50
|
+
args: [{
|
|
51
|
+
selector: 'axp-code-editor-widget-column',
|
|
52
|
+
template: `
|
|
53
|
+
@if (displayText()) {
|
|
54
|
+
<span [title]="fullValue()" class="text-xs font-mono text-muted">
|
|
55
|
+
{{ displayText() }}
|
|
56
|
+
</span>
|
|
57
|
+
} @else {
|
|
58
|
+
<span class="text-muted">---</span>
|
|
59
|
+
}
|
|
60
|
+
`,
|
|
61
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
62
|
+
imports: [],
|
|
63
|
+
inputs: ['rawValue', 'rowData'],
|
|
64
|
+
}]
|
|
65
|
+
}] });
|
|
66
|
+
|
|
67
|
+
export { AXPCodeEditorWidgetColumnComponent };
|
|
68
|
+
//# sourceMappingURL=acorex-platform-framework-client-layout-widgets-code-editor-widget-column.component-BL621E1r.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acorex-platform-framework-client-layout-widgets-code-editor-widget-column.component-BL621E1r.mjs","sources":["../../../../../libs/framework/client/layout/widgets/src/lib/widgets/advance/code-editor/code-editor-widget-column.component.ts"],"sourcesContent":["//#region ---- Imports ----\n\nimport { AXPColumnWidgetComponent } from '@acorex-platform/framework-client/layout/widget-core';\nimport { ChangeDetectionStrategy, Component, computed } from '@angular/core';\n\nimport { coerceCodeEditorText } from './code-editor-value.util';\n\n//#endregion\n\n//#region ---- Component ----\n\n@Component({\n selector: 'axp-code-editor-widget-column',\n template: `\n @if (displayText()) {\n <span [title]=\"fullValue()\" class=\"text-xs font-mono text-muted\">\n {{ displayText() }}\n </span>\n } @else {\n <span class=\"text-muted\">---</span>\n }\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [],\n inputs: ['rawValue', 'rowData'],\n})\nexport class AXPCodeEditorWidgetColumnComponent extends AXPColumnWidgetComponent<string> {\n //#region ---- Computed Properties ----\n\n protected fullValue = computed(() => coerceCodeEditorText(this.rawValue));\n\n protected displayText = computed(() => {\n const value = this.fullValue();\n if (!value) {\n return '';\n }\n\n const trimmed = value.trim().replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\n\n // If empty after trimming, return empty\n if (!trimmed) {\n return '';\n }\n\n // Get max length from options (default: 100 characters)\n const options = this.options;\n const maxLength = (options?.['maxLength'] as number) ?? 100;\n\n // If value is shorter than max length, return as-is\n if (trimmed.length <= maxLength) {\n return trimmed;\n }\n\n // Truncate and add ellipsis\n return trimmed.substring(0, maxLength) + '...';\n });\n\n //#endregion\n}\n\n//#endregion\n\n"],"names":[],"mappings":";;;;;AAAA;AAOA;AAEA;AAiBM,MAAO,kCAAmC,SAAQ,wBAAgC,CAAA;AAfxF,IAAA,WAAA,GAAA;;;QAkBc,IAAA,CAAA,SAAS,GAAG,QAAQ,CAAC,MAAM,oBAAoB,CAAC,IAAI,CAAC,QAAQ,CAAC;sFAAC;AAE/D,QAAA,IA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,UAAA,EAAA,CAAA;kBAf9C,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,+BAA+B;AACzC,oBAAA,QAAQ,EAAE;;;;;;;;AAQX,EAAA,CAAA;oBACC,eAAe,EAAE,uBAAuB,CAAC,MAAM;AAC/C,oBAAA,OAAO,EAAE,EAAE;AACX,oBAAA,MAAM,EAAE,CAAC,UAAU,EAAE,SAAS,CAAC;AAClC,iBAAA;;;"}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import * as i1$1 from '@acorex/components/code-editor';
|
|
2
|
+
import { AXCodeEditorModule } from '@acorex/components/code-editor';
|
|
3
|
+
import { AXPValueWidgetComponent } from '@acorex-platform/framework-client/layout/widget-core';
|
|
4
|
+
import { NgClass } from '@angular/common';
|
|
5
|
+
import * as i0 from '@angular/core';
|
|
6
|
+
import { computed, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
7
|
+
import { c as coerceCodeEditorText, r as restoreCodeEditorBoundValue } from './acorex-platform-framework-client-layout-widgets-code-editor-value.util-Cb7R1qLO.mjs';
|
|
8
|
+
import * as i1 from '@angular/forms';
|
|
9
|
+
import { FormsModule } from '@angular/forms';
|
|
10
|
+
|
|
11
|
+
//#region ---- Imports ----
|
|
12
|
+
//#endregion
|
|
13
|
+
//#region ---- Component ----
|
|
14
|
+
class AXPCodeEditorWidgetEditComponent extends AXPValueWidgetComponent {
|
|
15
|
+
constructor() {
|
|
16
|
+
super(...arguments);
|
|
17
|
+
//#region ---- Computed Properties ----
|
|
18
|
+
this.currentValue = computed(() => coerceCodeEditorText(this.getValue(), true), /* @ts-ignore */
|
|
19
|
+
...(ngDevMode ? [{ debugName: "currentValue" }] : /* istanbul ignore next */ []));
|
|
20
|
+
this.language = computed(() => {
|
|
21
|
+
const options = this.options();
|
|
22
|
+
return (options?.['language'] ?? 'javascript');
|
|
23
|
+
}, /* @ts-ignore */
|
|
24
|
+
...(ngDevMode ? [{ debugName: "language" }] : /* istanbul ignore next */ []));
|
|
25
|
+
this.lineNumbers = computed(() => {
|
|
26
|
+
const options = this.options();
|
|
27
|
+
return options?.['lineNumbers'] ?? true;
|
|
28
|
+
}, /* @ts-ignore */
|
|
29
|
+
...(ngDevMode ? [{ debugName: "lineNumbers" }] : /* istanbul ignore next */ []));
|
|
30
|
+
this.editorHeight = computed(() => {
|
|
31
|
+
const options = this.options();
|
|
32
|
+
return options?.['height'] ?? 'h-96';
|
|
33
|
+
}, /* @ts-ignore */
|
|
34
|
+
...(ngDevMode ? [{ debugName: "editorHeight" }] : /* istanbul ignore next */ []));
|
|
35
|
+
this.isReadOnly = computed(() => {
|
|
36
|
+
const options = this.options();
|
|
37
|
+
return options?.['readOnly'] === true || options?.['readonly'] === true || options?.['disabled'] === true;
|
|
38
|
+
}, /* @ts-ignore */
|
|
39
|
+
...(ngDevMode ? [{ debugName: "isReadOnly" }] : /* istanbul ignore next */ []));
|
|
40
|
+
}
|
|
41
|
+
//#endregion
|
|
42
|
+
//#region ---- Event Handlers ----
|
|
43
|
+
handleValueChange(newValue) {
|
|
44
|
+
if (this.isReadOnly()) {
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
this.setValue(restoreCodeEditorBoundValue(newValue, this.getValue()));
|
|
48
|
+
}
|
|
49
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXPCodeEditorWidgetEditComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
50
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.8", type: AXPCodeEditorWidgetEditComponent, isStandalone: true, selector: "axp-code-editor-widget-edit", host: { classAttribute: "block w-full ltr" }, usesInheritance: true, ngImport: i0, template: `
|
|
51
|
+
<div class="w-full min-h-0 overflow-auto" [ngClass]="editorHeight()">
|
|
52
|
+
<ax-code-editor
|
|
53
|
+
[ngModel]="currentValue()"
|
|
54
|
+
(ngModelChange)="handleValueChange($event)"
|
|
55
|
+
[language]="language()"
|
|
56
|
+
[lineNumbers]="lineNumbers()"
|
|
57
|
+
[readonly]="isReadOnly()"
|
|
58
|
+
class="w-full"
|
|
59
|
+
></ax-code-editor>
|
|
60
|
+
</div>
|
|
61
|
+
`, isInline: true, dependencies: [{ 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: AXCodeEditorModule }, { kind: "component", type: i1$1.AXCodeEditorComponent, selector: "ax-code-editor", inputs: ["disabled", "value", "state", "name", "id", "language", "readonly", "placeholder", "lineNumbers", "lineWrapping", "tabSize", "indentWithTab", "theme", "extensions", "ariaLabel", "focusOnReady", "formatOnSave", "minRow", "customCompletions"], outputs: ["onValueChanged", "valueChange", "stateChange", "readonlyChange", "disabledChange", "ready", "save"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
62
|
+
}
|
|
63
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXPCodeEditorWidgetEditComponent, decorators: [{
|
|
64
|
+
type: Component,
|
|
65
|
+
args: [{
|
|
66
|
+
selector: 'axp-code-editor-widget-edit',
|
|
67
|
+
template: `
|
|
68
|
+
<div class="w-full min-h-0 overflow-auto" [ngClass]="editorHeight()">
|
|
69
|
+
<ax-code-editor
|
|
70
|
+
[ngModel]="currentValue()"
|
|
71
|
+
(ngModelChange)="handleValueChange($event)"
|
|
72
|
+
[language]="language()"
|
|
73
|
+
[lineNumbers]="lineNumbers()"
|
|
74
|
+
[readonly]="isReadOnly()"
|
|
75
|
+
class="w-full"
|
|
76
|
+
></ax-code-editor>
|
|
77
|
+
</div>
|
|
78
|
+
`,
|
|
79
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
80
|
+
imports: [FormsModule, AXCodeEditorModule, NgClass],
|
|
81
|
+
host: {
|
|
82
|
+
class: 'block w-full ltr',
|
|
83
|
+
},
|
|
84
|
+
}]
|
|
85
|
+
}] });
|
|
86
|
+
|
|
87
|
+
export { AXPCodeEditorWidgetEditComponent };
|
|
88
|
+
//# sourceMappingURL=acorex-platform-framework-client-layout-widgets-code-editor-widget-edit.component-CVsPKhNl.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acorex-platform-framework-client-layout-widgets-code-editor-widget-edit.component-CVsPKhNl.mjs","sources":["../../../../../libs/framework/client/layout/widgets/src/lib/widgets/advance/code-editor/code-editor-widget-edit.component.ts"],"sourcesContent":["//#region ---- Imports ----\n\nimport { AXCodeEditorDefaultLanguage, AXCodeEditorModule } from '@acorex/components/code-editor';\nimport { AXPValueWidgetComponent } from '@acorex-platform/framework-client/layout/widget-core';\nimport { NgClass } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, computed } from '@angular/core';\n\nimport { coerceCodeEditorText, restoreCodeEditorBoundValue } from './code-editor-value.util';\n\nimport { FormsModule } from '@angular/forms';\n\n//#endregion\n\n//#region ---- Component ----\n\n@Component({\n selector: 'axp-code-editor-widget-edit',\n template: `\n <div class=\"w-full min-h-0 overflow-auto\" [ngClass]=\"editorHeight()\">\n <ax-code-editor\n [ngModel]=\"currentValue()\"\n (ngModelChange)=\"handleValueChange($event)\"\n [language]=\"language()\"\n [lineNumbers]=\"lineNumbers()\"\n [readonly]=\"isReadOnly()\"\n class=\"w-full\"\n ></ax-code-editor>\n </div>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [FormsModule, AXCodeEditorModule, NgClass],\n host: {\n class: 'block w-full ltr',\n },\n})\nexport class AXPCodeEditorWidgetEditComponent extends AXPValueWidgetComponent<string> {\n //#region ---- Computed Properties ----\n\n protected currentValue = computed(() => coerceCodeEditorText(this.getValue(), true));\n\n protected language = computed<AXCodeEditorDefaultLanguage>(() => {\n const options = this.options();\n return ((options?.['language'] as AXCodeEditorDefaultLanguage) ?? 'javascript');\n });\n\n protected lineNumbers = computed(() => {\n const options = this.options();\n return (options?.['lineNumbers'] as boolean) ?? true;\n });\n\n protected editorHeight = computed(() => {\n const options = this.options();\n return (options?.['height'] as string) ?? 'h-96';\n });\n\n protected isReadOnly = computed(() => {\n const options = this.options();\n return options?.['readOnly'] === true || options?.['readonly'] === true || options?.['disabled'] === true;\n });\n\n //#endregion\n\n //#region ---- Event Handlers ----\n\n protected handleValueChange(newValue: string): void {\n if (this.isReadOnly()) {\n return;\n }\n this.setValue(restoreCodeEditorBoundValue(newValue, this.getValue()) as string);\n }\n\n //#endregion\n}\n\n//#endregion\n\n"],"names":["i2"],"mappings":";;;;;;;;;;AAAA;AAWA;AAEA;AAsBM,MAAO,gCAAiC,SAAQ,uBAA+B,CAAA;AApBrF,IAAA,WAAA,GAAA;;;AAuBY,QAAA,IAAA,CAAA,YAAY,GAAG,QAAQ,CAAC,MAAM,oBAAoB,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,IAAI,CAAC;yFAAC;AAE1E,QAAA,IAAA,CAAA,QAAQ,GAAG,QAAQ,CAA8B,MAAK;AAC9D,YAAA,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,EAAE;YAC9B,QAAS,OAAO,GAAG,UAAU,CAAiC,IAAI,YAAY;QAChF,CAAC;qFAAC;AAEQ,QAAA,IAAA,CAAA,WAAW,GAAG,QAAQ,CAAC,MAAK;AACpC,YAAA,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,EAAE;AAC9B,YAAA,OAAQ,OAAO,GAAG,aAAa,CAAa,IAAI,IAAI;QACtD,CAAC;wFAAC;AAEQ,QAAA,IAAA,CAAA,YAAY,GAAG,QAAQ,CAAC,MAAK;AACrC,YAAA,MAAM,OAAO,GAAG,IAAI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kBAAkB,EAAE,OAAO,CAAC;AACnD,oBAAA,IAAI,EAAE;AACJ,wBAAA,KAAK,EAAE,kBAAkB;AAC1B,qBAAA;AACF,iBAAA;;;"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import * as i1 from '@acorex/components/code-editor';
|
|
2
|
+
import { AXCodeEditorModule } from '@acorex/components/code-editor';
|
|
3
|
+
import { AXPValueWidgetComponent } from '@acorex-platform/framework-client/layout/widget-core';
|
|
4
|
+
import { NgClass } from '@angular/common';
|
|
5
|
+
import * as i0 from '@angular/core';
|
|
6
|
+
import { computed, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
7
|
+
import { c as coerceCodeEditorText } from './acorex-platform-framework-client-layout-widgets-code-editor-value.util-Cb7R1qLO.mjs';
|
|
8
|
+
|
|
9
|
+
//#region ---- Imports ----
|
|
10
|
+
//#endregion
|
|
11
|
+
//#region ---- Component ----
|
|
12
|
+
class AXPCodeEditorWidgetViewComponent extends AXPValueWidgetComponent {
|
|
13
|
+
constructor() {
|
|
14
|
+
super(...arguments);
|
|
15
|
+
//#region ---- Computed Properties ----
|
|
16
|
+
this.currentValue = computed(() => coerceCodeEditorText(this.getValue(), true), /* @ts-ignore */
|
|
17
|
+
...(ngDevMode ? [{ debugName: "currentValue" }] : /* istanbul ignore next */ []));
|
|
18
|
+
this.language = computed(() => {
|
|
19
|
+
const options = this.options();
|
|
20
|
+
return options?.['language'] ?? 'javascript';
|
|
21
|
+
}, /* @ts-ignore */
|
|
22
|
+
...(ngDevMode ? [{ debugName: "language" }] : /* istanbul ignore next */ []));
|
|
23
|
+
this.lineNumbers = computed(() => {
|
|
24
|
+
const options = this.options();
|
|
25
|
+
return options?.['lineNumbers'] ?? true;
|
|
26
|
+
}, /* @ts-ignore */
|
|
27
|
+
...(ngDevMode ? [{ debugName: "lineNumbers" }] : /* istanbul ignore next */ []));
|
|
28
|
+
this.editorHeight = computed(() => {
|
|
29
|
+
const options = this.options();
|
|
30
|
+
return options?.['height'] ?? 'h-96';
|
|
31
|
+
}, /* @ts-ignore */
|
|
32
|
+
...(ngDevMode ? [{ debugName: "editorHeight" }] : /* istanbul ignore next */ []));
|
|
33
|
+
}
|
|
34
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXPCodeEditorWidgetViewComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
35
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.8", type: AXPCodeEditorWidgetViewComponent, isStandalone: true, selector: "axp-code-editor-widget-view", host: { classAttribute: "block w-full" }, usesInheritance: true, ngImport: i0, template: `
|
|
36
|
+
<div class="w-full border rounded-md min-h-0 overflow-auto" style="direction: ltr;" [ngClass]="editorHeight()">
|
|
37
|
+
<ax-code-editor
|
|
38
|
+
[value]="currentValue()"
|
|
39
|
+
[readonly]="true"
|
|
40
|
+
[language]="language()"
|
|
41
|
+
[lineNumbers]="lineNumbers()"
|
|
42
|
+
class="w-full"
|
|
43
|
+
></ax-code-editor>
|
|
44
|
+
</div>
|
|
45
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: AXCodeEditorModule }, { kind: "component", type: i1.AXCodeEditorComponent, selector: "ax-code-editor", inputs: ["disabled", "value", "state", "name", "id", "language", "readonly", "placeholder", "lineNumbers", "lineWrapping", "tabSize", "indentWithTab", "theme", "extensions", "ariaLabel", "focusOnReady", "formatOnSave", "minRow", "customCompletions"], outputs: ["onValueChanged", "valueChange", "stateChange", "readonlyChange", "disabledChange", "ready", "save"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
46
|
+
}
|
|
47
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXPCodeEditorWidgetViewComponent, decorators: [{
|
|
48
|
+
type: Component,
|
|
49
|
+
args: [{
|
|
50
|
+
selector: 'axp-code-editor-widget-view',
|
|
51
|
+
template: `
|
|
52
|
+
<div class="w-full border rounded-md min-h-0 overflow-auto" style="direction: ltr;" [ngClass]="editorHeight()">
|
|
53
|
+
<ax-code-editor
|
|
54
|
+
[value]="currentValue()"
|
|
55
|
+
[readonly]="true"
|
|
56
|
+
[language]="language()"
|
|
57
|
+
[lineNumbers]="lineNumbers()"
|
|
58
|
+
class="w-full"
|
|
59
|
+
></ax-code-editor>
|
|
60
|
+
</div>
|
|
61
|
+
`,
|
|
62
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
63
|
+
imports: [AXCodeEditorModule, NgClass],
|
|
64
|
+
host: {
|
|
65
|
+
class: 'block w-full',
|
|
66
|
+
},
|
|
67
|
+
}]
|
|
68
|
+
}] });
|
|
69
|
+
|
|
70
|
+
export { AXPCodeEditorWidgetViewComponent };
|
|
71
|
+
//# sourceMappingURL=acorex-platform-framework-client-layout-widgets-code-editor-widget-view.component-BEq4O4al.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acorex-platform-framework-client-layout-widgets-code-editor-widget-view.component-BEq4O4al.mjs","sources":["../../../../../libs/framework/client/layout/widgets/src/lib/widgets/advance/code-editor/code-editor-widget-view.component.ts"],"sourcesContent":["//#region ---- Imports ----\n\nimport { AXCodeEditorModule } from '@acorex/components/code-editor';\nimport { AXPValueWidgetComponent } from '@acorex-platform/framework-client/layout/widget-core';\nimport { NgClass } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, computed } from '@angular/core';\n\nimport { coerceCodeEditorText } from './code-editor-value.util';\n\n//#endregion\n\n//#region ---- Component ----\n\n@Component({\n selector: 'axp-code-editor-widget-view',\n template: `\n <div class=\"w-full border rounded-md min-h-0 overflow-auto\" style=\"direction: ltr;\" [ngClass]=\"editorHeight()\">\n <ax-code-editor\n [value]=\"currentValue()\"\n [readonly]=\"true\"\n [language]=\"language()\"\n [lineNumbers]=\"lineNumbers()\"\n class=\"w-full\"\n ></ax-code-editor>\n </div>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [AXCodeEditorModule, NgClass],\n host: {\n class: 'block w-full',\n },\n})\nexport class AXPCodeEditorWidgetViewComponent extends AXPValueWidgetComponent<string> {\n //#region ---- Computed Properties ----\n\n protected currentValue = computed(() => coerceCodeEditorText(this.getValue(), true));\n\n protected language = computed(() => {\n const options = this.options();\n return (options?.['language'] as any) ?? 'javascript';\n });\n\n protected lineNumbers = computed(() => {\n const options = this.options();\n return (options?.['lineNumbers'] as boolean) ?? true;\n });\n\n protected editorHeight = computed(() => {\n const options = this.options();\n return (options?.['height'] as string) ?? 'h-96';\n });\n\n //#endregion\n}\n\n//#endregion\n\n"],"names":[],"mappings":";;;;;;;;AAAA;AASA;AAEA;AAqBM,MAAO,gCAAiC,SAAQ,uBAA+B,CAAA;AAnBrF,IAAA,WAAA,GAAA;;;AAsBc,QAAA,IAAA,CAAA,YAAY,GAAG,QAAQ,CAAC,MAAM,oBAAoB,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,IAAI,CAAC;yFAAC;AAE1E,QAAA,IAAA,CAAA,QAAQ,GAAG,QAAQ,CAAC,MAAK;AAC/B,YAAA,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,EAAE;AAC9B,YAAA,OAAQ,OAAO,GAAG,UAAU,CAAS,IAAI,YAAY;QACzD,CAAC;qFAAC;AAEQ,QAAA,IAAA,CAAA,WAAW,GAAG,QAAQ,CAAC,MAAK;AAClC,YAAA,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,EAAE;AAC9B,YAAA,OAAQ,OAAO,GAAG,aAAa,CAAa,IAAI,IAAI;QACxD,CAAC;wFAAC;AAEQ,QAAA,IAAA,CAAA,YAAY,GAAG,QAAQ,CAAC,MAAK;AACnC,YAAA,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,EAAE;AAC9B,YAAA,OAAQ,OAAO,GAAG,QAAQ,CAAY,IAAI,MAAM;QACpD,CAAC;yFAAC;AAGL,IAAA;8GArBY,gCAAgC,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAhC,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,gCAAgC,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,6BAAA,EAAA,IAAA,EAAA,EAAA,cAAA,EAAA,cAAA,EAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAjB/B;;;;;;;;;;GAUX,EAAA,QAAA,EAAA,IAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAEW,kBAAkB,6dAAE,OAAO,EAAA,QAAA,EAAA,WAAA,EAAA,MAAA,EAAA,CAAA,OAAA,EAAA,SAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAK5B,gCAAgC,EAAA,UAAA,EAAA,CAAA;kBAnB5C,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,6BAA6B;AACvC,oBAAA,QAAQ,EAAE;;;;;;;;;;AAUX,EAAA,CAAA;oBACC,eAAe,EAAE,uBAAuB,CAAC,MAAM;AAC/C,oBAAA,OAAO,EAAE,CAAC,kBAAkB,EAAE,OAAO,CAAC;AACtC,oBAAA,IAAI,EAAE;AACF,wBAAA,KAAK,EAAE,cAAc;AACxB,qBAAA;AACJ,iBAAA;;;"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import * as i1 from '@acorex/components/button';
|
|
2
|
+
import { AXButtonModule } from '@acorex/components/button';
|
|
3
|
+
import * as i2 from '@acorex/components/decorators';
|
|
4
|
+
import { AXDecoratorModule } from '@acorex/components/decorators';
|
|
5
|
+
import { AXBasePageComponent } from '@acorex/components/page';
|
|
6
|
+
import * as i3 from '@acorex/core/translation';
|
|
7
|
+
import { AXTranslationModule } from '@acorex/core/translation';
|
|
8
|
+
import { setupPopupFooterKeyboardShortcuts } from '@acorex-platform/framework-client/core';
|
|
9
|
+
import { AXPConditionBuilderComponent } from '@acorex-platform/framework-client/layout/components';
|
|
10
|
+
import { omitFilterClauseIdentity } from '@acorex-platform/framework-shared/core';
|
|
11
|
+
import { AsyncPipe } from '@angular/common';
|
|
12
|
+
import * as i0 from '@angular/core';
|
|
13
|
+
import { signal, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
14
|
+
import { cloneDeep } from 'lodash-es';
|
|
15
|
+
|
|
16
|
+
//#region ----- Imports -----
|
|
17
|
+
//#endregion
|
|
18
|
+
//#region ----- Constants -----
|
|
19
|
+
const I18N = {
|
|
20
|
+
cancel: '@general:actions.cancel.title',
|
|
21
|
+
save: '@general:actions.save.title',
|
|
22
|
+
};
|
|
23
|
+
//#endregion
|
|
24
|
+
//#region ----- Component -----
|
|
25
|
+
class AXPConditionBuilderEditPopupComponent extends AXBasePageComponent {
|
|
26
|
+
//#endregion
|
|
27
|
+
//#region ----- Lifecycle -----
|
|
28
|
+
constructor() {
|
|
29
|
+
super();
|
|
30
|
+
//#region ----- Popup Data -----
|
|
31
|
+
this.value = { logic: 'and', filters: [] };
|
|
32
|
+
this.filterDefinitions = [];
|
|
33
|
+
this.operationsLook = 'select';
|
|
34
|
+
//#endregion
|
|
35
|
+
//#region ----- State Signals -----
|
|
36
|
+
this.draft = signal({ logic: 'and', filters: [] }, /* @ts-ignore */
|
|
37
|
+
...(ngDevMode ? [{ debugName: "draft" }] : /* istanbul ignore next */ []));
|
|
38
|
+
//#endregion
|
|
39
|
+
//#region ----- Constants -----
|
|
40
|
+
this.I18N = I18N;
|
|
41
|
+
setupPopupFooterKeyboardShortcuts(() => [
|
|
42
|
+
{
|
|
43
|
+
title: I18N.cancel,
|
|
44
|
+
command: 'cancel',
|
|
45
|
+
handler: () => this.handleCancel(),
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
title: I18N.save,
|
|
49
|
+
command: 'submit',
|
|
50
|
+
handler: () => this.handleSave(),
|
|
51
|
+
},
|
|
52
|
+
], { id: 'condition-builder-edit-popup' });
|
|
53
|
+
}
|
|
54
|
+
ngOnInit() {
|
|
55
|
+
super.ngOnInit();
|
|
56
|
+
this.draft.set(cloneDeep(this.value ?? { logic: 'and', filters: [] }));
|
|
57
|
+
}
|
|
58
|
+
//#endregion
|
|
59
|
+
//#region ----- Event Handlers -----
|
|
60
|
+
onValueChange(value) {
|
|
61
|
+
this.draft.set(value);
|
|
62
|
+
}
|
|
63
|
+
handleCancel() {
|
|
64
|
+
this.close();
|
|
65
|
+
}
|
|
66
|
+
handleSave() {
|
|
67
|
+
this.close({
|
|
68
|
+
saved: true,
|
|
69
|
+
value: omitFilterClauseIdentity(this.draft()),
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXPConditionBuilderEditPopupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
73
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.8", type: AXPConditionBuilderEditPopupComponent, isStandalone: true, selector: "axp-condition-builder-edit-popup", usesInheritance: true, ngImport: i0, template: "<div class=\"axp-condition-builder-edit-popup p-4\">\n <axp-condition-builder\n [value]=\"draft()\"\n [filterDefinitions]=\"filterDefinitions\"\n [operationsLook]=\"operationsLook\"\n (valueChange)=\"onValueChange($event)\"\n />\n</div>\n\n<ax-footer>\n <ax-suffix>\n <ax-button look=\"solid\" [text]=\"(I18N.cancel | translate | async) ?? ''\" (onClick)=\"handleCancel()\"></ax-button>\n <ax-button\n look=\"solid\"\n color=\"primary\"\n [text]=\"(I18N.save | translate | async) ?? ''\"\n (onClick)=\"handleSave()\"\n ></ax-button>\n </ax-suffix>\n</ax-footer>\n", dependencies: [{ kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i1.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "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.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: AXPConditionBuilderComponent, selector: "axp-condition-builder", inputs: ["value", "filterDefinitions", "showFillByUser", "operationsLook"], outputs: ["valueChange"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: i3.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
74
|
+
}
|
|
75
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXPConditionBuilderEditPopupComponent, decorators: [{
|
|
76
|
+
type: Component,
|
|
77
|
+
args: [{ selector: 'axp-condition-builder-edit-popup', changeDetection: ChangeDetectionStrategy.OnPush, imports: [AsyncPipe, AXButtonModule, AXDecoratorModule, AXTranslationModule, AXPConditionBuilderComponent], template: "<div class=\"axp-condition-builder-edit-popup p-4\">\n <axp-condition-builder\n [value]=\"draft()\"\n [filterDefinitions]=\"filterDefinitions\"\n [operationsLook]=\"operationsLook\"\n (valueChange)=\"onValueChange($event)\"\n />\n</div>\n\n<ax-footer>\n <ax-suffix>\n <ax-button look=\"solid\" [text]=\"(I18N.cancel | translate | async) ?? ''\" (onClick)=\"handleCancel()\"></ax-button>\n <ax-button\n look=\"solid\"\n color=\"primary\"\n [text]=\"(I18N.save | translate | async) ?? ''\"\n (onClick)=\"handleSave()\"\n ></ax-button>\n </ax-suffix>\n</ax-footer>\n" }]
|
|
78
|
+
}], ctorParameters: () => [] });
|
|
79
|
+
|
|
80
|
+
export { AXPConditionBuilderEditPopupComponent };
|
|
81
|
+
//# sourceMappingURL=acorex-platform-framework-client-layout-widgets-condition-builder-edit-popup.component-WpiEHusZ.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acorex-platform-framework-client-layout-widgets-condition-builder-edit-popup.component-WpiEHusZ.mjs","sources":["../../../../../libs/framework/client/layout/widgets/src/lib/widgets/expression-builders/condition-builder/condition-builder-edit-popup.component.ts","../../../../../libs/framework/client/layout/widgets/src/lib/widgets/expression-builders/condition-builder/condition-builder-edit-popup.component.html"],"sourcesContent":["//#region ----- Imports -----\n\nimport { AXButtonModule } from '@acorex/components/button';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXBasePageComponent } from '@acorex/components/page';\nimport { AXTranslationModule } from '@acorex/core/translation';\nimport { setupPopupFooterKeyboardShortcuts } from '@acorex-platform/framework-client/core';\nimport { AXPConditionBuilderComponent } from '@acorex-platform/framework-client/layout/components';\nimport { omitFilterClauseIdentity, type AXPFilterClause, type AXPFilterDefinition } from '@acorex-platform/framework-shared/core';\nimport { AsyncPipe } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, signal } from '@angular/core';\nimport { cloneDeep } from 'lodash-es';\n\n//#endregion\n\n//#region ----- Constants -----\n\nconst I18N = {\n cancel: '@general:actions.cancel.title',\n save: '@general:actions.save.title',\n} as const;\n\n//#endregion\n\n//#region ----- Component -----\n\n@Component({\n selector: 'axp-condition-builder-edit-popup',\n templateUrl: './condition-builder-edit-popup.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [AsyncPipe, AXButtonModule, AXDecoratorModule, AXTranslationModule, AXPConditionBuilderComponent],\n})\nexport class AXPConditionBuilderEditPopupComponent extends AXBasePageComponent {\n //#region ----- Popup Data -----\n\n value: AXPFilterClause = { logic: 'and', filters: [] };\n filterDefinitions: AXPFilterDefinition[] = [];\n operationsLook: 'menu' | 'select' = 'select';\n\n //#endregion\n\n //#region ----- State Signals -----\n\n protected readonly draft = signal<AXPFilterClause>({ logic: 'and', filters: [] });\n\n //#endregion\n\n //#region ----- Constants -----\n\n protected readonly I18N = I18N;\n\n //#endregion\n\n //#region ----- Lifecycle -----\n\n constructor() {\n super();\n setupPopupFooterKeyboardShortcuts(\n () => [\n {\n title: I18N.cancel,\n command: 'cancel',\n handler: () => this.handleCancel(),\n },\n {\n title: I18N.save,\n command: 'submit',\n handler: () => this.handleSave(),\n },\n ],\n { id: 'condition-builder-edit-popup' },\n );\n }\n\n protected override ngOnInit(): void {\n super.ngOnInit();\n this.draft.set(cloneDeep(this.value ?? { logic: 'and', filters: [] }));\n }\n\n //#endregion\n\n //#region ----- Event Handlers -----\n\n protected onValueChange(value: AXPFilterClause): void {\n this.draft.set(value);\n }\n\n protected handleCancel(): void {\n this.close();\n }\n\n protected handleSave(): void {\n this.close({\n saved: true,\n value: omitFilterClauseIdentity(this.draft()),\n });\n }\n\n //#endregion\n}\n\n//#endregion\n","<div class=\"axp-condition-builder-edit-popup p-4\">\n <axp-condition-builder\n [value]=\"draft()\"\n [filterDefinitions]=\"filterDefinitions\"\n [operationsLook]=\"operationsLook\"\n (valueChange)=\"onValueChange($event)\"\n />\n</div>\n\n<ax-footer>\n <ax-suffix>\n <ax-button look=\"solid\" [text]=\"(I18N.cancel | translate | async) ?? ''\" (onClick)=\"handleCancel()\"></ax-button>\n <ax-button\n look=\"solid\"\n color=\"primary\"\n [text]=\"(I18N.save | translate | async) ?? ''\"\n (onClick)=\"handleSave()\"\n ></ax-button>\n </ax-suffix>\n</ax-footer>\n"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA;AAaA;AAEA;AAEA,MAAM,IAAI,GAAG;AACX,IAAA,MAAM,E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