@acorex/platform 18.0.11 → 18.0.12
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/auth/lib/session.service.d.ts +2 -2
- package/core/utils/countdown-timer.d.ts +4 -2
- package/esm2022/auth/lib/session.service.mjs +23 -38
- package/esm2022/core/utils/countdown-timer.mjs +10 -3
- package/esm2022/layout/builder/lib/builder/widget.types.mjs +3 -2
- package/esm2022/layout/designer/lib/board/board.component.mjs +72 -13
- package/esm2022/layout/designer/lib/buttons/add-widget-button/add-widget-button.component.mjs +16 -16
- package/esm2022/layout/designer/lib/designer/designer.component.mjs +18 -41
- package/esm2022/layout/designer/lib/designer.service.mjs +37 -51
- package/esm2022/layout/designer/lib/header-menu/header-menu.component.mjs +24 -0
- package/esm2022/layout/designer/lib/history/history.component.mjs +21 -0
- package/esm2022/layout/designer/lib/history-manager.service.mjs +117 -0
- package/esm2022/layout/designer/lib/outline/outline.component.mjs +4 -5
- package/esm2022/layout/designer/lib/property-viewer/widget-property-viewer.component.mjs +2 -2
- package/esm2022/layouts/lib/admin/entity-layout/entity-modify-view/entity-modify-view.component.mjs +7 -6
- package/esm2022/widgets/lib/properties/editors.props.mjs +40 -5
- package/esm2022/widgets/lib/widgets/actions/button-widget/button-widget-view.component.mjs +19 -4
- package/esm2022/widgets/lib/widgets/editors/checkbox/checkbox-widget.config.mjs +2 -1
- package/esm2022/widgets/lib/widgets/editors/color-box-widget/color-box-widget-edit.component.mjs +7 -13
- package/esm2022/widgets/lib/widgets/editors/contact-widget/contact-widget-edit.component.mjs +5 -5
- package/esm2022/widgets/lib/widgets/editors/rich-text-widget/rich-text-widget-edit.component.mjs +2 -2
- package/esm2022/widgets/lib/widgets/editors/select-box-widget/select-box-widget-edit.component.mjs +31 -21
- package/esm2022/widgets/lib/widgets/editors/select-box-widget/select-box-widget.config.mjs +11 -4
- package/esm2022/widgets/lib/widgets/editors/selection-list-widget/selection-list-widget.config.mjs +2 -1
- package/esm2022/widgets/lib/widgets/editors/text-box-widget/text-box-widget-edit.component.mjs +4 -4
- package/esm2022/widgets/lib/widgets/editors/text-box-widget/text-box-widget.config.mjs +3 -2
- package/esm2022/widgets/lib/widgets/editors/toggle-widget/toggle-widget.config.mjs +2 -1
- package/esm2022/widgets/lib/widgets/layout/page-widget/page-widget-designer.component.mjs +14 -4
- package/esm2022/widgets/lib/widgets/layout/page-widget/page-widget.config.mjs +3 -2
- package/esm2022/widgets/lib/widgets/layout/repeater-widget/repeater-widget.config.mjs +2 -1
- package/esm2022/widgets/lib/widgets/layout/text-block-widget/text-block-widget.config.mjs +2 -2
- package/fesm2022/acorex-platform-auth.mjs +22 -37
- package/fesm2022/acorex-platform-auth.mjs.map +1 -1
- package/fesm2022/acorex-platform-core.mjs +9 -2
- package/fesm2022/acorex-platform-core.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-builder.mjs +2 -1
- package/fesm2022/acorex-platform-layout-builder.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-designer.mjs +319 -156
- package/fesm2022/acorex-platform-layout-designer.mjs.map +1 -1
- package/fesm2022/{acorex-platform-layouts-entity-modify-view.component-CjofXJku.mjs → acorex-platform-layouts-entity-modify-view.component-C9L8cyBm.mjs} +7 -5
- package/fesm2022/acorex-platform-layouts-entity-modify-view.component-C9L8cyBm.mjs.map +1 -0
- package/fesm2022/acorex-platform-layouts.mjs +2 -2
- package/fesm2022/{acorex-platform-widgets-page-widget-designer.component-DYb6bilD.mjs → acorex-platform-widgets-page-widget-designer.component-DlfG4EP1.mjs} +14 -4
- package/fesm2022/acorex-platform-widgets-page-widget-designer.component-DlfG4EP1.mjs.map +1 -0
- package/fesm2022/acorex-platform-widgets.mjs +332 -267
- package/fesm2022/acorex-platform-widgets.mjs.map +1 -1
- package/layout/builder/lib/builder/widget.types.d.ts +2 -2
- package/layout/designer/lib/board/board.component.d.ts +7 -1
- package/layout/designer/lib/designer/designer.component.d.ts +1 -10
- package/layout/designer/lib/designer.service.d.ts +20 -16
- package/layout/designer/lib/header-menu/header-menu.component.d.ts +7 -0
- package/layout/designer/lib/history/history.component.d.ts +7 -0
- package/layout/designer/lib/history-manager.service.d.ts +31 -0
- package/package.json +7 -7
- package/widgets/lib/properties/editors.props.d.ts +1 -0
- package/widgets/lib/widgets/actions/button-widget/button-widget-view.component.d.ts +1 -0
- package/widgets/lib/widgets/editors/color-box-widget/color-box-widget-edit.component.d.ts +2 -4
- package/widgets/lib/widgets/editors/select-box-widget/select-box-widget-edit.component.d.ts +2 -0
- package/widgets/lib/widgets/editors/text-box-widget/text-box-widget-edit.component.d.ts +1 -1
- package/widgets/lib/widgets/layout/page-widget/page-widget-designer.component.d.ts +2 -0
- package/fesm2022/acorex-platform-layouts-entity-modify-view.component-CjofXJku.mjs.map +0 -1
- package/fesm2022/acorex-platform-widgets-page-widget-designer.component-DYb6bilD.mjs.map +0 -1
|
@@ -109,11 +109,11 @@ export declare abstract class AXPWidgetComponent<T = any | null | void> extends
|
|
|
109
109
|
private nextRender;
|
|
110
110
|
private initRender;
|
|
111
111
|
getValue<T>(): T_1;
|
|
112
|
-
setValue(value: T): void;
|
|
112
|
+
setValue(value: T | null): void;
|
|
113
113
|
setOptions(values: any): void;
|
|
114
114
|
call(name: string, ...args: any[]): void;
|
|
115
115
|
setChildren(children: AXPWidgetNode[]): void;
|
|
116
|
-
onValueChanged(oldValue: T, newValue: T): void;
|
|
116
|
+
onValueChanged(oldValue: T | null, newValue: T | null): void;
|
|
117
117
|
private detectFullPath;
|
|
118
118
|
static ɵfac: i0.ɵɵFactoryDeclaration<AXPWidgetComponent<any>, never>;
|
|
119
119
|
static ɵprov: i0.ɵɵInjectableDeclaration<AXPWidgetComponent<any>>;
|
|
@@ -2,8 +2,14 @@ import { AXPDesignerService } from '../designer.service';
|
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
3
|
export declare class AXPDesignerBoardComponent {
|
|
4
4
|
protected context: any;
|
|
5
|
+
private elementRef;
|
|
6
|
+
private breakpointMap;
|
|
7
|
+
applyResponsiveStyles(breakpoint: string): void;
|
|
8
|
+
private createCustomClass;
|
|
9
|
+
private removeCustomClass;
|
|
5
10
|
protected service: AXPDesignerService;
|
|
6
|
-
|
|
11
|
+
protected width: import("@angular/core").Signal<"340px" | "768px" | "100%">;
|
|
12
|
+
private ef;
|
|
7
13
|
private handleKeyboardEvent;
|
|
8
14
|
static ɵfac: i0.ɵɵFactoryDeclaration<AXPDesignerBoardComponent, never>;
|
|
9
15
|
static ɵcmp: i0.ɵɵComponentDeclaration<AXPDesignerBoardComponent, "axp-designer-board", never, {}, {}, never, never, true, never>;
|
|
@@ -1,17 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { AXPWidgetConfig, AXPWidgetRenderMode } from '@acorex/platform/layout/builder';
|
|
3
|
-
import { WritableSignal } from '@angular/core';
|
|
1
|
+
import { AXPWidgetConfig } from '@acorex/platform/layout/builder';
|
|
4
2
|
import { AXPDesignerService } from '../designer.service';
|
|
5
3
|
import * as i0 from "@angular/core";
|
|
6
4
|
export declare class AXPLayoutDesignerComponent {
|
|
7
|
-
protected currentTabIndex: WritableSignal<number>;
|
|
8
5
|
protected service: AXPDesignerService;
|
|
9
|
-
protected tabs: {
|
|
10
|
-
mode: AXPWidgetRenderMode;
|
|
11
|
-
title: string;
|
|
12
|
-
}[];
|
|
13
|
-
protected handleTabChange(event: AXTabStripChangedEvent): void;
|
|
14
|
-
private get __class();
|
|
15
6
|
protected nodeConfig: import("@angular/core").Signal<AXPWidgetConfig | null>;
|
|
16
7
|
static ɵfac: i0.ɵɵFactoryDeclaration<AXPLayoutDesignerComponent, never>;
|
|
17
8
|
static ɵcmp: i0.ɵɵComponentDeclaration<AXPLayoutDesignerComponent, "axp-layout-designer", never, {}, {}, never, never, true, never>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { AXPWidgetComponent, AXPWidgetConfig, AXPWidgetNode
|
|
1
|
+
import { AXPWidgetComponent, AXPWidgetConfig, AXPWidgetNode } from '@acorex/platform/layout/builder';
|
|
2
2
|
import { Subject } from 'rxjs';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
|
+
export type AXPDesignerPreviewSize = 'sm' | 'md' | 'lg' | 'xl' | 'xxl';
|
|
4
5
|
export interface AXPDesignerFocusCommand {
|
|
5
6
|
widget: AXPWidgetNode | null;
|
|
6
7
|
}
|
|
@@ -40,32 +41,36 @@ export interface AXPDesignerFocusEvent {
|
|
|
40
41
|
widget: AXPWidgetNode | null;
|
|
41
42
|
}
|
|
42
43
|
export declare class AXPDesignerService {
|
|
44
|
+
private popupService;
|
|
45
|
+
private widgetRegisteryService;
|
|
46
|
+
private readonly historyManager;
|
|
43
47
|
private clipboard;
|
|
44
|
-
private undoStack;
|
|
45
|
-
private redoStack;
|
|
46
|
-
private maxHistorySize;
|
|
47
|
-
canUndo: import("@angular/core").WritableSignal<boolean>;
|
|
48
|
-
canRedo: import("@angular/core").WritableSignal<boolean>;
|
|
49
48
|
canCutCopy: import("@angular/core").Signal<boolean>;
|
|
50
49
|
canPaste: import("@angular/core").Signal<boolean>;
|
|
51
|
-
|
|
52
|
-
|
|
50
|
+
readonly history: import("@angular/core").Signal<{
|
|
51
|
+
index: number;
|
|
52
|
+
disabled: boolean;
|
|
53
|
+
state: any;
|
|
54
|
+
date: Date;
|
|
55
|
+
description: string;
|
|
56
|
+
}[]>;
|
|
57
|
+
readonly canUndo: import("@angular/core").Signal<boolean>;
|
|
58
|
+
readonly canRedo: import("@angular/core").Signal<boolean>;
|
|
53
59
|
readonly root: import("@angular/core").WritableSignal<AXPWidgetNode>;
|
|
54
60
|
breadcrumbs: import("@angular/core").Signal<AXPWidgetNode[]>;
|
|
55
61
|
selectedNode: import("@angular/core").WritableSignal<AXPWidgetNode | null>;
|
|
56
62
|
private _lastSelectedNode;
|
|
57
63
|
private _focusedNode;
|
|
58
64
|
focusedNode: () => AXPWidgetNode | null;
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
setMode(mode: AXPWidgetRenderMode): void;
|
|
65
|
+
readonly mode: import("@angular/core").WritableSignal<keyof import("@acorex/platform/layout/builder").AXPWidgetConfigComponents>;
|
|
66
|
+
readonly size: import("@angular/core").WritableSignal<AXPDesignerPreviewSize>;
|
|
62
67
|
readonly onSelected: Subject<AXPDesignerSelectEvent>;
|
|
63
68
|
readonly onRefresh: Subject<AXPDesignerRefreshEvent>;
|
|
69
|
+
readonly onUpdate: Subject<AXPDesignerUpdateEvent>;
|
|
70
|
+
readonly onFocused: Subject<AXPDesignerFocusEvent>;
|
|
64
71
|
register(command: AXPDesignerRegisterCommand): void;
|
|
65
72
|
select(command: AXPDesignerSelectCommand): void;
|
|
66
|
-
readonly onUpdate: Subject<AXPDesignerUpdateEvent>;
|
|
67
73
|
update(command: AXPDesignerUpdateCommand): void;
|
|
68
|
-
readonly onFocused: Subject<AXPDesignerFocusEvent>;
|
|
69
74
|
focus(command: AXPDesignerFocusCommand): void;
|
|
70
75
|
refresh(command: AXPDesignerRefreshCommand): void;
|
|
71
76
|
private findBreadcrumbs;
|
|
@@ -76,10 +81,9 @@ export declare class AXPDesignerService {
|
|
|
76
81
|
private findNearestContainer;
|
|
77
82
|
addWidget(currentNode: AXPWidgetNode, node: AXPWidgetNode): AXPWidgetNode | null;
|
|
78
83
|
removeWidget(node: AXPWidgetNode): void;
|
|
79
|
-
|
|
80
|
-
private applyState;
|
|
81
|
-
undo(): void;
|
|
84
|
+
revertToChange(index: number): void;
|
|
82
85
|
redo(): void;
|
|
86
|
+
undo(): void;
|
|
83
87
|
private formatOutputJSON;
|
|
84
88
|
copy(widget?: AXPWidgetNode | null): void;
|
|
85
89
|
cut(widget?: AXPWidgetNode | null): void;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { AXPDesignerService } from '../designer.service';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class AXPDesignerHeaderMenuComponent {
|
|
4
|
+
protected service: AXPDesignerService;
|
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AXPDesignerHeaderMenuComponent, never>;
|
|
6
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AXPDesignerHeaderMenuComponent, "axp-designer-header-menu", never, {}, {}, never, never, true, never>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { AXPDesignerService } from '../designer.service';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class AXPDesignerHistoryComponent {
|
|
4
|
+
protected service: AXPDesignerService;
|
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AXPDesignerHistoryComponent, never>;
|
|
6
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AXPDesignerHistoryComponent, "axp-designer-history", never, {}, {}, never, never, true, never>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export interface AXPHistoryState<T> {
|
|
3
|
+
state: T;
|
|
4
|
+
date: Date;
|
|
5
|
+
description: string;
|
|
6
|
+
}
|
|
7
|
+
export declare class AXPObjectHistoryManager<T> {
|
|
8
|
+
private readonly undoStack;
|
|
9
|
+
private readonly redoStack;
|
|
10
|
+
private readonly _currentState;
|
|
11
|
+
private maxHistorySize;
|
|
12
|
+
private revertedIndex;
|
|
13
|
+
readonly currentState: import("@angular/core").Signal<AXPHistoryState<T> | null>;
|
|
14
|
+
canUndo: import("@angular/core").Signal<boolean>;
|
|
15
|
+
canRedo: import("@angular/core").Signal<boolean>;
|
|
16
|
+
saveState(newState: T, description: string): void;
|
|
17
|
+
updateState(newState: T): void;
|
|
18
|
+
undo(): void;
|
|
19
|
+
redo(): void;
|
|
20
|
+
revert(index: number): void;
|
|
21
|
+
history: import("@angular/core").Signal<{
|
|
22
|
+
index: number;
|
|
23
|
+
disabled: boolean;
|
|
24
|
+
state: T;
|
|
25
|
+
date: Date;
|
|
26
|
+
description: string;
|
|
27
|
+
}[]>;
|
|
28
|
+
clear(): void;
|
|
29
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AXPObjectHistoryManager<any>, never>;
|
|
30
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<AXPObjectHistoryManager<any>>;
|
|
31
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@acorex/platform",
|
|
3
|
-
"version": "18.0.
|
|
3
|
+
"version": "18.0.12",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@angular/common": ">=18.0.0",
|
|
6
6
|
"@angular/core": ">=18.0.0",
|
|
@@ -56,18 +56,18 @@
|
|
|
56
56
|
"esm": "./esm2022/common/acorex-platform-common.mjs",
|
|
57
57
|
"default": "./fesm2022/acorex-platform-common.mjs"
|
|
58
58
|
},
|
|
59
|
-
"./mocks": {
|
|
60
|
-
"types": "./mocks/index.d.ts",
|
|
61
|
-
"esm2022": "./esm2022/mocks/acorex-platform-mocks.mjs",
|
|
62
|
-
"esm": "./esm2022/mocks/acorex-platform-mocks.mjs",
|
|
63
|
-
"default": "./fesm2022/acorex-platform-mocks.mjs"
|
|
64
|
-
},
|
|
65
59
|
"./layouts": {
|
|
66
60
|
"types": "./layouts/index.d.ts",
|
|
67
61
|
"esm2022": "./esm2022/layouts/acorex-platform-layouts.mjs",
|
|
68
62
|
"esm": "./esm2022/layouts/acorex-platform-layouts.mjs",
|
|
69
63
|
"default": "./fesm2022/acorex-platform-layouts.mjs"
|
|
70
64
|
},
|
|
65
|
+
"./mocks": {
|
|
66
|
+
"types": "./mocks/index.d.ts",
|
|
67
|
+
"esm2022": "./esm2022/mocks/acorex-platform-mocks.mjs",
|
|
68
|
+
"esm": "./esm2022/mocks/acorex-platform-mocks.mjs",
|
|
69
|
+
"default": "./fesm2022/acorex-platform-mocks.mjs"
|
|
70
|
+
},
|
|
71
71
|
"./native": {
|
|
72
72
|
"types": "./native/index.d.ts",
|
|
73
73
|
"esm2022": "./esm2022/native/acorex-platform-native.mjs",
|
|
@@ -24,3 +24,4 @@ export declare const AXP_STYLE_LOOK_PROPERTY: AXPWidgetProperty;
|
|
|
24
24
|
export declare const AXP_DATE_FROMAT_PROPERTY: AXPWidgetProperty;
|
|
25
25
|
export declare function booleanDefaultProperty(): AXPWidgetProperty;
|
|
26
26
|
export declare function plainTextDefaultProperty(): AXPWidgetProperty;
|
|
27
|
+
export declare const AXP_THEME_PROPERTY: AXPWidgetProperty;
|
|
@@ -7,6 +7,7 @@ export declare class AXPButtonWidgetViewComponent extends AXPWidgetComponent<any
|
|
|
7
7
|
protected color: import("@angular/core").Signal<AXStyleColorType>;
|
|
8
8
|
protected look: import("@angular/core").Signal<AXStyleLookType>;
|
|
9
9
|
protected text: import("@angular/core").Signal<string>;
|
|
10
|
+
protected loading: import("@angular/core").Signal<boolean>;
|
|
10
11
|
onClick: EventEmitter<AXClickEvent>;
|
|
11
12
|
protected handleClick(e: AXClickEvent): void;
|
|
12
13
|
api(): AXPLayoutElementAPI;
|
|
@@ -3,10 +3,8 @@ import { AXPWidgetComponent } from '@acorex/platform/layout/builder';
|
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
export declare class AXPColorBoxWidgetEditComponent extends AXPWidgetComponent<string> {
|
|
5
5
|
protected disabled: import("@angular/core").Signal<boolean>;
|
|
6
|
-
protected
|
|
7
|
-
|
|
8
|
-
get validationRules(): AXPValidationRules;
|
|
9
|
-
set validationRules(v: AXPValidationRules);
|
|
6
|
+
protected hasClearButton: import("@angular/core").Signal<boolean>;
|
|
7
|
+
protected validationRules: import("@angular/core").Signal<AXPValidationRules>;
|
|
10
8
|
static ɵfac: i0.ɵɵFactoryDeclaration<AXPColorBoxWidgetEditComponent, never>;
|
|
11
9
|
static ɵcmp: i0.ɵɵComponentDeclaration<AXPColorBoxWidgetEditComponent, "ng-component", never, {}, {}, never, never, true, never>;
|
|
12
10
|
}
|
|
@@ -8,6 +8,8 @@ export declare class AXPSelectBoxWidgetEditComponent extends AXPWidgetComponent<
|
|
|
8
8
|
protected valueField: import("@angular/core").Signal<string>;
|
|
9
9
|
protected textField: import("@angular/core").Signal<string>;
|
|
10
10
|
protected disabled: import("@angular/core").Signal<boolean>;
|
|
11
|
+
protected placeholder: import("@angular/core").Signal<string>;
|
|
12
|
+
protected hasClearButton: import("@angular/core").Signal<boolean>;
|
|
11
13
|
protected handleValueChange(e: AXValueChangedEvent): void;
|
|
12
14
|
refresh(): void;
|
|
13
15
|
clear(): void;
|
|
@@ -5,7 +5,7 @@ import { Signal } from '@angular/core';
|
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
export declare class AXPTextBoxWidgetEditComponent extends AXPWidgetComponent<any> {
|
|
7
7
|
protected multiple: Signal<boolean>;
|
|
8
|
-
protected
|
|
8
|
+
protected hasClearButton: Signal<boolean>;
|
|
9
9
|
protected disabled: Signal<boolean>;
|
|
10
10
|
protected placeholder: Signal<string>;
|
|
11
11
|
protected validationRules: Signal<AXPValidationRules>;
|
|
@@ -2,7 +2,9 @@ import { AXPContainerWidgetComponent } from '@acorex/platform/layout/builder';
|
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
3
|
export declare class AXPPageWidgetDesignerComponent extends AXPContainerWidgetComponent<void> {
|
|
4
4
|
protected backgroundColor: import("@angular/core").Signal<string>;
|
|
5
|
+
protected theme: import("@angular/core").Signal<string>;
|
|
5
6
|
private get __style();
|
|
7
|
+
private get __class();
|
|
6
8
|
static ɵfac: i0.ɵɵFactoryDeclaration<AXPPageWidgetDesignerComponent, never>;
|
|
7
9
|
static ɵcmp: i0.ɵɵComponentDeclaration<AXPPageWidgetDesignerComponent, "axp-page-widget", never, {}, {}, never, never, true, never>;
|
|
8
10
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-platform-layouts-entity-modify-view.component-CjofXJku.mjs","sources":["../../../../libs/platform/layouts/src/lib/admin/entity-layout/entity-modify-view/entity-modify-view.component.ts","../../../../libs/platform/layouts/src/lib/admin/entity-layout/entity-modify-view/entity-modify-view.component.html"],"sourcesContent":["import { AXButtonModule } from '@acorex/components/button';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXDialogModule } from '@acorex/components/dialog';\nimport { AXDropdownButtonModule } from '@acorex/components/dropdown-button';\nimport { AXFormComponent, AXFormModule } from '@acorex/components/form';\nimport { AXLabelModule } from '@acorex/components/label';\nimport { AXLoadingModule } from '@acorex/components/loading';\nimport { AXBasePageComponent } from '@acorex/components/page';\nimport { AXTabsModule } from '@acorex/components/tabs';\nimport { AXTooltipModule } from '@acorex/components/tooltip';\nimport { AXValidationModule } from '@acorex/core/validation';\nimport { AXPStickyDirective } from '@acorex/platform/common';\nimport { AXPEntityConfig, AXPSchemaModule } from '@acorex/platform/common';\nimport { CommonModule } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, WritableSignal, signal } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { cloneDeep } from 'lodash-es';\nimport { AXPEntityModifyViewLoader } from './entity-modify-view.config';\nimport { AXTranslationModule } from '@acorex/core/translation';\n\n@Component({\n templateUrl: './entity-modify-view.component.html',\n imports: [\n CommonModule,\n FormsModule,\n AXFormModule,\n AXDecoratorModule,\n CommonModule,\n AXButtonModule,\n AXDialogModule,\n AXLoadingModule,\n AXTabsModule,\n AXPSchemaModule,\n AXTooltipModule,\n AXValidationModule,\n AXLabelModule,\n AXDropdownButtonModule,\n AXTranslationModule,\n //\n AXPStickyDirective,\n ],\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class AXPEntityModifyViewComponent extends AXBasePageComponent {\n protected loader!: AXPEntityModifyViewLoader;\n context: any;\n entity!: AXPEntityConfig;\n properties: string[] = [];\n submitLoading: WritableSignal<boolean> = signal(false);\n\n protected editForm: {\n context?: any;\n previousContext?: any;\n } = {};\n\n protected handleCloseClick() {\n this.close({ result: false });\n }\n\n protected override ngOnInit(): void {\n this.editForm.context = cloneDeep(this.context);\n this.editForm.previousContext = cloneDeep(this.context);\n }\n\n protected async handleSectionDiscard(form: AXFormComponent) {\n this.close({ result: false });\n }\n\n protected async handleSectionReset(form: AXFormComponent) {\n this.editForm.context = cloneDeep(this.editForm.previousContext);\n }\n\n protected async handleSectionSubmit(form: AXFormComponent) {\n const formResult = await form.validate();\n if (formResult.result) {\n if (this.entity.commands?.update) {\n this.submitLoading.set(true);\n await this.entity.commands.update(this.editForm.context.id, this.editForm.context);\n this.submitLoading.set(false);\n this.close({ result: true, context: this.editForm.context });\n }\n }\n }\n\n override ngOnDestroy(): void {\n super.ngOnDestroy();\n this.editForm.context = null;\n this.editForm.previousContext = null;\n }\n\n // override onClosing(e: AXComponentClosing): void | Promise<void> {\n // if (e.data?.save || isEmpty(this.loader.data))\n // e.cancel = false;\n // else {\n // e.cancel = true;\n // }\n // }\n}\n","<div class=\"ax-min-h-[25vh]\">\n <ax-form class=\"ax-flex ax-flex-col ax-gap-6 ax-p-4\" #form [messageStyle]=\"'bottom'\" [updateOn]=\"'blur'\">\n <div class=\"ax-flex ax-flex-col ax-pb-4\">\n <ax-form-field class=\"ax-grid ax-grid-cols-12 ax-gap-4 ax-py-2 first:ax-pt-0 last:ax-pb-0\">\n <ng-container *ngFor=\"let name of properties\">\n <ng-container *ngIf=\"loader.getProp(name) as prop\">\n <!-- lg:ax-col-span-6 -->\n <!-- lg:ax-col-start-1 -->\n <div *ngIf=\"prop.canEdit\" class=\"ax-col-span-12 ax-col-start-1 lg:ax-col-span-{{\n prop.layout?.positions?.default?.span || 12\n }} lg:ax-col-start-{{ prop.layout?.positions?.default?.start || 1 }} ax-flex ax-flex-col ax-gap-1\">\n <span class=\"ax-font-semibold ax-text-sm\">{{ prop.title }}</span>\n <axp-widget-renderer [schema]=\"prop.schema\" [prop]=\"prop\" [mode]=\"'edit'\"\n [context]=\"editForm.context\"></axp-widget-renderer>\n </div>\n </ng-container>\n </ng-container>\n </ax-form-field>\n </div>\n </ax-form>\n <ax-footer>\n <ax-suffix>\n <ax-dropdown-button [text]=\"'discard' | translate | async\" (onClick)=\"handleSectionDiscard(form)\">\n <ax-button-item-list>\n <ax-button-item [text]=\"('reset' | translate | async) ?? ' '\" (onClick)=\"handleSectionReset(form)\">\n <ax-prefix>\n <ax-icon icon=\"fa-solid fa-rotate-left fa-flip-horizontal\"></ax-icon>\n </ax-prefix>\n </ax-button-item>\n </ax-button-item-list>\n </ax-dropdown-button>\n <ax-button [disabled]=\"submitLoading()\" color=\"primary\" [text]=\"'save-changes' | translate | async\" (onClick)=\"handleSectionSubmit(form)\">\n <ax-loading *ngIf=\"submitLoading()\"></ax-loading>\n </ax-button>\n </ax-suffix>\n </ax-footer>\n</div>"],"names":["i3","i4","i6"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AA4CM,MAAO,4BAA6B,SAAQ,mBAAmB,CAAA;AAxBrE,IAAA,WAAA,GAAA;;QA4BE,IAAU,CAAA,UAAA,GAAa,EAAE,CAAC;AAC1B,QAAA,IAAA,CAAA,aAAa,GAA4B,MAAM,CAAC,KAAK,CAAC,CAAC;QAE7C,IAAQ,CAAA,QAAA,GAGd,EAAE,CAAC;AA4CR,KAAA;IA1CW,gBAAgB,GAAA;QACxB,IAAI,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC;KAC/B;IAEkB,QAAQ,GAAA;QACzB,IAAI,CAAC,QAAQ,CAAC,OAAO,GAAG,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAChD,IAAI,CAAC,QAAQ,CAAC,eAAe,GAAG,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;KACzD;IAES,MAAM,oBAAoB,CAAC,IAAqB,EAAA;QACxD,IAAI,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC;KAC/B;IAES,MAAM,kBAAkB,CAAC,IAAqB,EAAA;AACtD,QAAA,IAAI,CAAC,QAAQ,CAAC,OAAO,GAAG,SAAS,CAAC,IAAI,CAAC,QAA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{"version":3,"file":"acorex-platform-widgets-page-widget-designer.component-DYb6bilD.mjs","sources":["../../../../libs/platform/widgets/src/lib/widgets/layout/page-widget/page-widget-designer.component.ts"],"sourcesContent":["import { AXPLayoutBuilderModule, AXPContainerWidgetComponent } from '@acorex/platform/layout/builder';\nimport { CommonModule } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, computed, HostBinding, ViewEncapsulation } from '@angular/core';\nimport { AXPDesignerAddWidgetButtonComponent, AXPWidgetDesignerRendererComponent } from \"@acorex/platform/layout/designer\";\n\n@Component({\n selector: 'axp-page-widget',\n template: `\n @for (node of children(); track $index) {\n <axp-widget-designer-renderer [node]=\"node\" [parentNode]=\"this\" [mode]=\"mode\">\n </axp-widget-designer-renderer>\n }\n <axp-designer-add-widget-button></axp-designer-add-widget-button>\n `,\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [CommonModule, AXPLayoutBuilderModule, AXPWidgetDesignerRendererComponent, AXPDesignerAddWidgetButtonComponent],\n providers: [\n {\n provide: AXPContainerWidgetComponent, useExisting: AXPPageWidgetDesignerComponent\n }\n ]\n})\nexport class AXPPageWidgetDesignerComponent extends AXPContainerWidgetComponent<void> {\n\n protected backgroundColor = computed<string>(() => this.options()[\"backgroundColor\"] as string);\n\n @HostBinding('style')\n private get __style(): any {\n return {\n 'background-color': this.backgroundColor(),\n 'display': 'block',\n };\n }\n}"],"names":[],"mappings":";;;;;;AAwBM,MAAO,8BAA+B,SAAQ,2BAAiC,CAAA;AAnBrF,IAAA,WAAA,GAAA;;AAqBY,QAAA,IAAA,CAAA,eAAe,GAAG,QAAQ,CAAS,MAAM,IAAI,CAAC,OAAO,EAAE,CAAC,iBAAiB,CAAW,CAAC,CAAC;AASjG,KAAA;AAPC,IAAA,IACY,OAAO,GAAA;QACjB,OAAO;AACL,YAAA,kBAAkB,EAAE,IAAI,CAAC,eAAe,EAAE;AAC1C,YAAA,SAAS,EAAE,OAAO;SACnB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