@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
|
@@ -3,42 +3,159 @@ import { AXPWidgetRegistryService, AXP_WIDGET_TOKEN, AXPLayoutBuilderModule, AXP
|
|
|
3
3
|
import * as i1 from '@angular/common';
|
|
4
4
|
import { CommonModule } from '@angular/common';
|
|
5
5
|
import * as i0 from '@angular/core';
|
|
6
|
-
import { signal, computed,
|
|
6
|
+
import { signal, computed, Injectable, inject, Injector, NgZone, ElementRef, input, effect, Component, ChangeDetectionStrategy, HostListener, ViewEncapsulation, NgModule, EventEmitter, untracked, Output } from '@angular/core';
|
|
7
7
|
import * as i3 from '@acorex/components/skeleton';
|
|
8
8
|
import { AXSkeletonModule } from '@acorex/components/skeleton';
|
|
9
9
|
import { AXUnsubscriber } from '@acorex/core/utils';
|
|
10
10
|
import * as i2 from '@angular/cdk/portal';
|
|
11
11
|
import { ComponentPortal, PortalModule } from '@angular/cdk/portal';
|
|
12
|
-
import { merge, sortBy, set, get,
|
|
12
|
+
import { cloneDeep, merge, sortBy, set, get, capitalize, unionBy, isArray, isNil, isEmpty } from 'lodash-es';
|
|
13
13
|
import { Subject, first, merge as merge$1 } from 'rxjs';
|
|
14
14
|
import { AXPopupService } from '@acorex/components/popup';
|
|
15
|
-
import * as
|
|
15
|
+
import * as i2$1 from '@acorex/components/button';
|
|
16
16
|
import { AXButtonModule } from '@acorex/components/button';
|
|
17
|
-
import * as
|
|
17
|
+
import * as i1$1 from '@acorex/components/decorators';
|
|
18
18
|
import { AXDecoratorModule } from '@acorex/components/decorators';
|
|
19
|
+
import * as i5 from '@acorex/components/button-group';
|
|
20
|
+
import { AXButtonGroupModule } from '@acorex/components/button-group';
|
|
19
21
|
import * as i3$2 from '@acorex/components/drawer';
|
|
20
22
|
import { AXDrawerModule } from '@acorex/components/drawer';
|
|
21
|
-
import * as
|
|
23
|
+
import * as i6 from '@acorex/components/dropdown';
|
|
24
|
+
import { AXDropdownModule } from '@acorex/components/dropdown';
|
|
25
|
+
import * as i2$2 from '@acorex/components/menu';
|
|
26
|
+
import { AXMenuModule } from '@acorex/components/menu';
|
|
27
|
+
import * as i2$3 from '@acorex/components/tabs';
|
|
22
28
|
import { AXTabsModule } from '@acorex/components/tabs';
|
|
23
29
|
import * as i1$2 from '@acorex/components/breadcrumbs';
|
|
24
30
|
import { AXBreadcrumbsModule } from '@acorex/components/breadcrumbs';
|
|
25
31
|
import * as i1$3 from '@acorex/components/collapse';
|
|
26
32
|
import { AXCollapseModule } from '@acorex/components/collapse';
|
|
27
|
-
|
|
28
|
-
|
|
33
|
+
|
|
34
|
+
class AXPObjectHistoryManager {
|
|
35
|
+
constructor() {
|
|
36
|
+
this.undoStack = signal([]); // Undo history as a signal
|
|
37
|
+
this.redoStack = signal([]); // Redo history as a signal
|
|
38
|
+
this._currentState = signal(null); // Current state as a signal
|
|
39
|
+
this.maxHistorySize = 50;
|
|
40
|
+
this.revertedIndex = null; // Track the index when reverting
|
|
41
|
+
this.currentState = this._currentState.asReadonly();
|
|
42
|
+
this.canUndo = computed(() => this.undoStack().length > 0);
|
|
43
|
+
this.canRedo = computed(() => this.redoStack().length > 0);
|
|
44
|
+
// Get the undo history for UI with disabled future states
|
|
45
|
+
this.history = computed(() => {
|
|
46
|
+
const undoHistory = this.undoStack();
|
|
47
|
+
return undoHistory.map((state, index) => ({
|
|
48
|
+
...state,
|
|
49
|
+
index,
|
|
50
|
+
disabled: this.revertedIndex !== null && index > this.revertedIndex
|
|
51
|
+
}));
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
// Save a new state and clear redo if necessary
|
|
55
|
+
saveState(newState, description) {
|
|
56
|
+
const newHistoryState = {
|
|
57
|
+
state: cloneDeep(newState),
|
|
58
|
+
date: new Date(),
|
|
59
|
+
description: description,
|
|
60
|
+
};
|
|
61
|
+
// Limit undo history size
|
|
62
|
+
if (this.undoStack().length >= this.maxHistorySize) {
|
|
63
|
+
this.undoStack.set(this.undoStack().slice(1)); // Remove oldest state
|
|
64
|
+
}
|
|
65
|
+
// Add the current state to the undo stack
|
|
66
|
+
//if (this._currentState()) {
|
|
67
|
+
this.undoStack.set([...this.undoStack(), this._currentState()]);
|
|
68
|
+
//}
|
|
69
|
+
// Set the new state as the current state
|
|
70
|
+
this._currentState.set(newHistoryState);
|
|
71
|
+
// Clear the redo stack if a new state is saved after undoing
|
|
72
|
+
if (this.revertedIndex !== null) {
|
|
73
|
+
this.redoStack.set([]);
|
|
74
|
+
this.revertedIndex = null; // Reset reverted index
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
// Update the current state's last entry in the undo stack
|
|
78
|
+
updateState(newState) {
|
|
79
|
+
const lastStateIndex = this.undoStack().length - 1;
|
|
80
|
+
// Check if there is a valid state to update
|
|
81
|
+
if (lastStateIndex >= 0) {
|
|
82
|
+
const lastState = this.undoStack()[lastStateIndex];
|
|
83
|
+
// Update the state in the last history entry
|
|
84
|
+
const updatedState = {
|
|
85
|
+
...lastState,
|
|
86
|
+
state: cloneDeep(newState),
|
|
87
|
+
date: new Date() // Update the date to reflect the change
|
|
88
|
+
};
|
|
89
|
+
// Update the undo stack with the modified state
|
|
90
|
+
const updatedUndoStack = [...this.undoStack()];
|
|
91
|
+
updatedUndoStack[lastStateIndex] = updatedState;
|
|
92
|
+
this.undoStack.set(updatedUndoStack);
|
|
93
|
+
// Also update the currentState to reflect the latest change
|
|
94
|
+
this._currentState.set(updatedState);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
// Undo the last action and update the current state
|
|
98
|
+
undo() {
|
|
99
|
+
if (this.undoStack().length > 0) {
|
|
100
|
+
const previousState = this.undoStack().pop(); // Get the last state
|
|
101
|
+
this.redoStack.set([...this.redoStack(), this._currentState()]); // Save current state to redo stack
|
|
102
|
+
this._currentState.set(previousState); // Revert to the previous state
|
|
103
|
+
this.revertedIndex = this.undoStack().length - 1; // Update reverted index
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
// Redo the last undone action and update the current state
|
|
107
|
+
redo() {
|
|
108
|
+
if (this.redoStack().length > 0) {
|
|
109
|
+
const nextState = this.redoStack().pop(); // Get the next state
|
|
110
|
+
this.undoStack.set([...this.undoStack(), this._currentState()]); // Save current state to undo stack
|
|
111
|
+
this._currentState.set(nextState); // Apply the redo state
|
|
112
|
+
this.revertedIndex = this.undoStack().length - 1; // Update reverted index
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
// Revert to a specific state by index in the undo stack
|
|
116
|
+
revert(index) {
|
|
117
|
+
if (index < 0 || index >= this.undoStack().length) {
|
|
118
|
+
return; // Invalid index, do nothing
|
|
119
|
+
}
|
|
120
|
+
const targetState = this.undoStack()[index];
|
|
121
|
+
const currentStateSnapshot = this._currentState(); // Save the current state for redo
|
|
122
|
+
// Move states after the reverted index to the redo stack
|
|
123
|
+
const statesToRedo = this.undoStack().slice(index + 1);
|
|
124
|
+
this.redoStack.set([currentStateSnapshot, ...statesToRedo]);
|
|
125
|
+
// Update the undo stack to the reverted point
|
|
126
|
+
this.undoStack.set(this.undoStack().slice(0, index + 1));
|
|
127
|
+
// Set the reverted state as the current state
|
|
128
|
+
this._currentState.set(targetState);
|
|
129
|
+
this.revertedIndex = index; // Track the reverted index
|
|
130
|
+
}
|
|
131
|
+
// Clear all history
|
|
132
|
+
clear() {
|
|
133
|
+
this.undoStack.set([]);
|
|
134
|
+
this.redoStack.set([]);
|
|
135
|
+
this.revertedIndex = null;
|
|
136
|
+
this._currentState.set(null);
|
|
137
|
+
}
|
|
138
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXPObjectHistoryManager, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
139
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXPObjectHistoryManager, providedIn: 'root' }); }
|
|
140
|
+
}
|
|
141
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXPObjectHistoryManager, decorators: [{
|
|
142
|
+
type: Injectable,
|
|
143
|
+
args: [{
|
|
144
|
+
providedIn: 'root',
|
|
145
|
+
}]
|
|
146
|
+
}] });
|
|
29
147
|
|
|
30
148
|
class AXPDesignerService {
|
|
31
149
|
constructor() {
|
|
150
|
+
this.popupService = inject(AXPopupService);
|
|
151
|
+
this.widgetRegisteryService = inject(AXPWidgetRegistryService);
|
|
152
|
+
this.historyManager = inject((AXPObjectHistoryManager));
|
|
32
153
|
this.clipboard = signal(null);
|
|
33
|
-
this.undoStack = [];
|
|
34
|
-
this.redoStack = [];
|
|
35
|
-
this.maxHistorySize = 20;
|
|
36
|
-
this.canUndo = signal(false);
|
|
37
|
-
this.canRedo = signal(false);
|
|
38
154
|
this.canCutCopy = computed(() => this.selectedNode() != null && this.selectedNode()?.name != "page");
|
|
39
155
|
this.canPaste = computed(() => (this.clipboard() != null));
|
|
40
|
-
this.
|
|
41
|
-
this.
|
|
156
|
+
this.history = computed(() => this.historyManager.history());
|
|
157
|
+
this.canUndo = computed(() => this.historyManager.canUndo());
|
|
158
|
+
this.canRedo = computed(() => this.historyManager.canRedo());
|
|
42
159
|
this.root = signal(this.createPage());
|
|
43
160
|
this.breadcrumbs = computed(() => {
|
|
44
161
|
return this.selectedNode() ? this.findBreadcrumbs(this.root(), this.selectedNode()) ?? [] : [];
|
|
@@ -47,16 +164,13 @@ class AXPDesignerService {
|
|
|
47
164
|
this._lastSelectedNode = null;
|
|
48
165
|
this._focusedNode = null;
|
|
49
166
|
this.focusedNode = () => this._focusedNode;
|
|
50
|
-
this.
|
|
51
|
-
this.
|
|
167
|
+
this.mode = signal('designer');
|
|
168
|
+
this.size = signal('xl');
|
|
52
169
|
this.onSelected = new Subject();
|
|
53
170
|
this.onRefresh = new Subject();
|
|
54
171
|
this.onUpdate = new Subject();
|
|
55
172
|
this.onFocused = new Subject();
|
|
56
173
|
}
|
|
57
|
-
setMode(mode) {
|
|
58
|
-
this._mode.set(mode);
|
|
59
|
-
}
|
|
60
174
|
register(command) {
|
|
61
175
|
if (!this._lastSelectedNode) {
|
|
62
176
|
this.select({ widget: command.widget });
|
|
@@ -72,8 +186,7 @@ class AXPDesignerService {
|
|
|
72
186
|
}
|
|
73
187
|
update(command) {
|
|
74
188
|
if (command.mode == 'update') {
|
|
75
|
-
|
|
76
|
-
this.saveStateForUndo();
|
|
189
|
+
this.historyManager.saveState(cloneDeep(this.root()), `Updated ${this.selectedNode()?.name}`);
|
|
77
190
|
}
|
|
78
191
|
this.selectedNode.update(c => merge(this.selectedNode(), command.values));
|
|
79
192
|
this.onUpdate.next({ widget: this.selectedNode(), values: command.values });
|
|
@@ -132,6 +245,7 @@ class AXPDesignerService {
|
|
|
132
245
|
};
|
|
133
246
|
set(page, '__meta__.id', Math.random() * Math.pow(10, 18));
|
|
134
247
|
set(page, '__meta__.config', config);
|
|
248
|
+
this.historyManager.saveState(page, "New");
|
|
135
249
|
return page;
|
|
136
250
|
}
|
|
137
251
|
findWidgetById(root, id) {
|
|
@@ -192,20 +306,21 @@ class AXPDesignerService {
|
|
|
192
306
|
if (!currentNode)
|
|
193
307
|
return null;
|
|
194
308
|
//
|
|
195
|
-
|
|
309
|
+
const cloned = cloneDeep(node);
|
|
310
|
+
this.historyManager.saveState(cloneDeep(this.root()), `Added ${cloned.type}`);
|
|
196
311
|
//
|
|
197
312
|
if (!currentNode.children) {
|
|
198
313
|
currentNode.children = [];
|
|
199
314
|
}
|
|
200
315
|
const config = this.widgetRegisteryService.resolve(node.type);
|
|
201
316
|
//
|
|
202
|
-
const cloned = cloneDeep(node);
|
|
203
317
|
cloned.name = this.generateUniqueName(node.type);
|
|
204
318
|
set(cloned, '__meta__.id', Math.random() * Math.pow(10, 18));
|
|
205
319
|
set(cloned, '__meta__.config', config);
|
|
206
320
|
//
|
|
207
321
|
currentNode.children.push(cloned);
|
|
208
322
|
//
|
|
323
|
+
this.historyManager.updateState(this.root());
|
|
209
324
|
//
|
|
210
325
|
this.refresh({ widget: currentNode });
|
|
211
326
|
this.select({ widget: cloned });
|
|
@@ -216,7 +331,7 @@ class AXPDesignerService {
|
|
|
216
331
|
console.error("Cannot remove the page node.");
|
|
217
332
|
return; // Prevent removing the root page node
|
|
218
333
|
}
|
|
219
|
-
this.
|
|
334
|
+
this.historyManager.saveState(cloneDeep(this.root()), `Removed ${node.name}`);
|
|
220
335
|
const nodeIdToRemove = get(node, "__meta__.id");
|
|
221
336
|
if (!nodeIdToRemove) {
|
|
222
337
|
throw new Error("Node does not have a valid __meta__.id to identify it for removal.");
|
|
@@ -229,6 +344,9 @@ class AXPDesignerService {
|
|
|
229
344
|
const index = parent.children?.findIndex(child => get(child, "__meta__.id") === nodeIdToRemove) ?? -1;
|
|
230
345
|
if (index > -1) {
|
|
231
346
|
parent.children.splice(index, 1);
|
|
347
|
+
//
|
|
348
|
+
this.historyManager.updateState(this.root());
|
|
349
|
+
//
|
|
232
350
|
this.refresh({ widget: parent }); // Refresh the UI to reflect changes
|
|
233
351
|
this.select({ widget: parent }); // Select the parent node after removal
|
|
234
352
|
}
|
|
@@ -236,41 +354,23 @@ class AXPDesignerService {
|
|
|
236
354
|
throw new Error("Node to remove not found in the widget tree.");
|
|
237
355
|
}
|
|
238
356
|
}
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
}
|
|
243
|
-
this.undoStack.push(cloneDeep(this.root()));
|
|
244
|
-
this.canUndo.set(true);
|
|
245
|
-
// Clear the redo stack whenever a new change is made after undo
|
|
246
|
-
if (this.redoStack.length > 0) {
|
|
247
|
-
this.redoStack = [];
|
|
248
|
-
this.canRedo.set(false);
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
applyState(state) {
|
|
252
|
-
this.root.set(state);
|
|
357
|
+
revertToChange(index) {
|
|
358
|
+
this.historyManager.revert(index);
|
|
359
|
+
this.root.set(this.historyManager.currentState()?.state);
|
|
253
360
|
this.refresh({ widget: this.root() });
|
|
254
|
-
//TODO: select the selected widget on this state
|
|
255
|
-
this.select({ widget: this._lastSelectedNode ?? this.root() });
|
|
256
361
|
}
|
|
257
|
-
|
|
258
|
-
if (this.
|
|
259
|
-
|
|
260
|
-
this.
|
|
261
|
-
|
|
262
|
-
this.applyState(prevState);
|
|
263
|
-
this.canUndo.set(this.undoStack.length > 0);
|
|
264
|
-
this.canRedo.set(true); // There is at least one action to redo now
|
|
362
|
+
redo() {
|
|
363
|
+
if (this.historyManager.canRedo()) {
|
|
364
|
+
this.historyManager.redo();
|
|
365
|
+
this.root.set(this.historyManager.currentState()?.state);
|
|
366
|
+
this.refresh({ widget: this.root() });
|
|
265
367
|
}
|
|
266
368
|
}
|
|
267
|
-
|
|
268
|
-
if (this.
|
|
269
|
-
|
|
270
|
-
this.
|
|
271
|
-
this.
|
|
272
|
-
this.canRedo.set(this.redoStack.length > 0);
|
|
273
|
-
this.canUndo.set(true); // Undo is always available after a redo
|
|
369
|
+
undo() {
|
|
370
|
+
if (this.historyManager.canUndo()) {
|
|
371
|
+
this.historyManager.undo();
|
|
372
|
+
this.root.set(this.historyManager.currentState()?.state);
|
|
373
|
+
this.refresh({ widget: this.root() });
|
|
274
374
|
}
|
|
275
375
|
}
|
|
276
376
|
formatOutputJSON(obj, nodeName) {
|
|
@@ -308,21 +408,24 @@ class AXPDesignerService {
|
|
|
308
408
|
console.error("Clipboard is empty or no node is selected.");
|
|
309
409
|
return;
|
|
310
410
|
}
|
|
411
|
+
const newNode = cloneDeep(this.clipboard());
|
|
311
412
|
const nearestContainer = this.findNearestContainer(parentNode, true);
|
|
312
413
|
if (!nearestContainer) {
|
|
313
414
|
console.error("No suitable container found.");
|
|
314
415
|
return;
|
|
315
416
|
}
|
|
316
417
|
//
|
|
317
|
-
this.
|
|
418
|
+
this.historyManager.saveState(newNode, `Pasted ${newNode.name}`); // Prepare for undo functionality
|
|
318
419
|
//
|
|
319
420
|
if (!nearestContainer.children) {
|
|
320
421
|
nearestContainer.children = [];
|
|
321
422
|
}
|
|
322
|
-
const newNode = cloneDeep(this.clipboard());
|
|
323
423
|
set(newNode, "__meta__.id", Math.random() * Math.pow(10, 18)); // Ensure a unique ID
|
|
324
424
|
//
|
|
325
425
|
nearestContainer.children.push(newNode); // Add the new node to the container
|
|
426
|
+
//
|
|
427
|
+
this.historyManager.updateState(this.root());
|
|
428
|
+
//
|
|
326
429
|
this.refresh({ widget: nearestContainer }); // Refresh the UI
|
|
327
430
|
this.select({ widget: newNode }); // Select the newly pasted node
|
|
328
431
|
}
|
|
@@ -624,13 +727,74 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
|
|
|
624
727
|
class AXPDesignerBoardComponent {
|
|
625
728
|
constructor() {
|
|
626
729
|
this.context = {};
|
|
730
|
+
this.elementRef = inject((ElementRef));
|
|
731
|
+
this.breakpointMap = {
|
|
732
|
+
'sm': 640,
|
|
733
|
+
'md': 768,
|
|
734
|
+
'lg': 1024,
|
|
735
|
+
'xl': 1280,
|
|
736
|
+
'xxl': 1536
|
|
737
|
+
};
|
|
627
738
|
this.service = inject(AXPDesignerService);
|
|
739
|
+
this.width = computed(() => {
|
|
740
|
+
switch (this.service.size()) {
|
|
741
|
+
case 'sm':
|
|
742
|
+
return '340px';
|
|
743
|
+
case 'md':
|
|
744
|
+
case 'lg':
|
|
745
|
+
return '768px';
|
|
746
|
+
default:
|
|
747
|
+
return '100%';
|
|
748
|
+
}
|
|
749
|
+
});
|
|
750
|
+
this.ef = effect(() => {
|
|
751
|
+
this.removeCustomClass();
|
|
752
|
+
if (this.service.size() != 'xl') {
|
|
753
|
+
this.applyResponsiveStyles(this.service.size());
|
|
754
|
+
}
|
|
755
|
+
});
|
|
628
756
|
}
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
757
|
+
// Unified method to extract media queries and create a custom class
|
|
758
|
+
applyResponsiveStyles(breakpoint) {
|
|
759
|
+
const minWidth = get(this.breakpointMap, breakpoint);
|
|
760
|
+
const mediaRules = [];
|
|
761
|
+
// Loop through all the stylesheets
|
|
762
|
+
for (let sheet of Array.from(document.styleSheets)) {
|
|
763
|
+
try {
|
|
764
|
+
// Loop through CSS rules
|
|
765
|
+
for (let rule of Array.from(sheet.cssRules)) {
|
|
766
|
+
// Check if the rule is a CSSMediaRule
|
|
767
|
+
if (rule instanceof CSSMediaRule && rule.media.mediaText.includes(`min-width: ${minWidth}px`)) {
|
|
768
|
+
// Loop through the media rule's CSS rules
|
|
769
|
+
for (let subRule of Array.from(rule.cssRules)) {
|
|
770
|
+
mediaRules.push(subRule.cssText);
|
|
771
|
+
}
|
|
772
|
+
}
|
|
773
|
+
}
|
|
774
|
+
}
|
|
775
|
+
catch (e) {
|
|
776
|
+
console.error('Error accessing stylesheet:', e);
|
|
777
|
+
}
|
|
778
|
+
}
|
|
779
|
+
// Create a dynamic class for the media queries
|
|
780
|
+
this.createCustomClass(`axp-preview-${breakpoint}`, mediaRules, breakpoint);
|
|
781
|
+
}
|
|
782
|
+
createCustomClass(className, styles, breakpoint) {
|
|
783
|
+
const styleSheet = document.createElement('style');
|
|
784
|
+
styleSheet.setAttribute("data-screen", breakpoint);
|
|
785
|
+
// Construct a pure CSS string, dynamically replacing the breakpoint prefix
|
|
786
|
+
let styleString = "";
|
|
787
|
+
styles.forEach(style => {
|
|
788
|
+
// Replace any prefixed classes like 'lg:' or 'md:' dynamically
|
|
789
|
+
const dynamicPrefix = new RegExp(`\\.${breakpoint}\\\\:`, 'g');
|
|
790
|
+
styleString += `.${className} ${style.replace(dynamicPrefix, '.')}`; // Replace the breakpoint prefix
|
|
791
|
+
});
|
|
792
|
+
styleSheet.innerText = styleString;
|
|
793
|
+
this.removeCustomClass();
|
|
794
|
+
this.elementRef.nativeElement.appendChild(styleSheet);
|
|
795
|
+
}
|
|
796
|
+
removeCustomClass() {
|
|
797
|
+
this.elementRef.nativeElement.querySelectorAll('style').forEach(s => s.remove());
|
|
634
798
|
}
|
|
635
799
|
handleKeyboardEvent(event) {
|
|
636
800
|
if (event.ctrlKey) {
|
|
@@ -665,7 +829,7 @@ class AXPDesignerBoardComponent {
|
|
|
665
829
|
}
|
|
666
830
|
}
|
|
667
831
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXPDesignerBoardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
668
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.0", type: AXPDesignerBoardComponent, isStandalone: true, selector: "axp-designer-board", host: { listeners: { "document:keydown": "handleKeyboardEvent($event)" }
|
|
832
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.0", type: AXPDesignerBoardComponent, isStandalone: true, selector: "axp-designer-board", host: { listeners: { "document:keydown": "handleKeyboardEvent($event)" } }, ngImport: i0, template: "<div class=\"axp-designer-board axp-state-design axp-preview-{{service.size()}}\" [style.width]=\"width()\">\n <axp-widgets-container [(context)]=\"context\">\n <axp-widget-designer-renderer [node]=\"service.root()\" [mode]=\"service.mode()\">\n </axp-widget-designer-renderer>\n </axp-widgets-container>\n</div>", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXPLayoutBuilderModule }, { kind: "component", type: i3$1.AXPWidgetContainerComponent, selector: "axp-widgets-container", inputs: ["context", "variables", "functions"], outputs: ["onChanged", "contextChange"] }, { kind: "component", type: AXPWidgetDesignerRendererComponent, selector: "axp-widget-designer-renderer", inputs: ["parentNode", "index", "mode", "node"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
669
833
|
}
|
|
670
834
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXPDesignerBoardComponent, decorators: [{
|
|
671
835
|
type: Component,
|
|
@@ -673,11 +837,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
|
|
|
673
837
|
CommonModule,
|
|
674
838
|
AXPLayoutBuilderModule,
|
|
675
839
|
AXPWidgetDesignerRendererComponent
|
|
676
|
-
], template: "<axp-widgets-container [(context)]=\"context\">\n
|
|
677
|
-
}], propDecorators: {
|
|
678
|
-
type: HostBinding,
|
|
679
|
-
args: ['class']
|
|
680
|
-
}], handleKeyboardEvent: [{
|
|
840
|
+
], template: "<div class=\"axp-designer-board axp-state-design axp-preview-{{service.size()}}\" [style.width]=\"width()\">\n <axp-widgets-container [(context)]=\"context\">\n <axp-widget-designer-renderer [node]=\"service.root()\" [mode]=\"service.mode()\">\n </axp-widget-designer-renderer>\n </axp-widgets-container>\n</div>" }]
|
|
841
|
+
}], propDecorators: { handleKeyboardEvent: [{
|
|
681
842
|
type: HostListener,
|
|
682
843
|
args: ['document:keydown', ['$event']]
|
|
683
844
|
}] } });
|
|
@@ -693,22 +854,22 @@ class AXPDesignerAddWidgetButtonComponent {
|
|
|
693
854
|
}
|
|
694
855
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXPDesignerAddWidgetButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
695
856
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.0", type: AXPDesignerAddWidgetButtonComponent, isStandalone: true, selector: "axp-designer-add-widget-button", ngImport: i0, template: `
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
857
|
+
<div class="ax-container ax-mx-auto">
|
|
858
|
+
<ax-button [text]="'Add New Element'" (onClick)="handleClick($event)" [look]="'twotone'">
|
|
859
|
+
<ax-icon icon="fa-solid fa-plus"></ax-icon>
|
|
860
|
+
</ax-button>
|
|
861
|
+
</div>
|
|
862
|
+
`, isInline: true, styles: ["axp-designer-add-widget-button .ax-container{display:flex;justify-content:center;padding:.5rem}\n"], dependencies: [{ kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i2$1.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "type", "responsiveOn", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "responsiveOnChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i1$1.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
702
863
|
}
|
|
703
864
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXPDesignerAddWidgetButtonComponent, decorators: [{
|
|
704
865
|
type: Component,
|
|
705
866
|
args: [{ selector: 'axp-designer-add-widget-button', template: `
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
867
|
+
<div class="ax-container ax-mx-auto">
|
|
868
|
+
<ax-button [text]="'Add New Element'" (onClick)="handleClick($event)" [look]="'twotone'">
|
|
869
|
+
<ax-icon icon="fa-solid fa-plus"></ax-icon>
|
|
870
|
+
</ax-button>
|
|
871
|
+
</div>
|
|
872
|
+
`, standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [AXButtonModule, AXDecoratorModule], encapsulation: ViewEncapsulation.None, styles: ["axp-designer-add-widget-button .ax-container{display:flex;justify-content:center;padding:.5rem}\n"] }]
|
|
712
873
|
}] });
|
|
713
874
|
|
|
714
875
|
class AXPDesignerModule {
|
|
@@ -780,6 +941,67 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
|
|
|
780
941
|
}]
|
|
781
942
|
}] });
|
|
782
943
|
|
|
944
|
+
class AXPDesignerHeaderMenuComponent {
|
|
945
|
+
constructor() {
|
|
946
|
+
this.service = inject(AXPDesignerService);
|
|
947
|
+
}
|
|
948
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXPDesignerHeaderMenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
949
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.0", type: AXPDesignerHeaderMenuComponent, isStandalone: true, selector: "axp-designer-header-menu", ngImport: i0, template: "<ax-menu [openOn]=\"'hover'\">\n <ax-menu-item text=\"Home\">\n <ax-menu-item text=\"New\"></ax-menu-item>\n <ax-menu-item text=\"Export\">\n <ax-menu-item text=\"Download JSON\" (onClick)=\"service.download()\">\n </ax-menu-item>\n </ax-menu-item>\n </ax-menu-item>\n <ax-menu-item text=\"Edit\">\n <ax-menu-item text=\"Undo\" [disabled]=\"!service.canUndo()\" (onClick)=\"service.undo()\">\n <ax-prefix>\n <ax-icon>\n <i class=\"fa-solid fa-rotate-left\"></i>\n </ax-icon>\n </ax-prefix>\n <ax-suffix>\n <ax-text>\n Ctrl+Z\n </ax-text>\n </ax-suffix>\n </ax-menu-item>\n <ax-menu-item text=\"Redo\" [disabled]=\"!service.canRedo()\" (onClick)=\"service.redo()\">\n <ax-prefix>\n <ax-icon>\n <i class=\"fa-solid fa-rotate-right\"></i>\n </ax-icon>\n </ax-prefix>\n <ax-suffix>\n <ax-text>\n Ctrl+Y\n </ax-text>\n </ax-suffix>\n </ax-menu-item>\n <ax-divider></ax-divider>\n <ax-menu-item text=\"Cut\" [disabled]=\"!service.canCutCopy()\" (onClick)=\"service.cut()\">\n <ax-prefix>\n <ax-icon>\n <i class=\"fa-solid fa-cut\"></i>\n </ax-icon>\n </ax-prefix>\n <ax-suffix>\n <ax-text>\n Ctrl+X\n </ax-text>\n </ax-suffix>\n </ax-menu-item>\n <ax-menu-item text=\"Copy\" [disabled]=\"!service.canCutCopy()\" (onClick)=\"service.copy()\">\n <ax-prefix>\n <ax-icon>\n <i class=\"fa-solid fa-copy\"></i>\n </ax-icon>\n </ax-prefix>\n <ax-suffix>\n <ax-text>\n Ctrl+C\n </ax-text>\n </ax-suffix>\n </ax-menu-item>\n <ax-menu-item text=\"Paste\" [disabled]=\"!service.canPaste()\" (onClick)=\"service.paste()\">\n <ax-prefix>\n <ax-icon>\n <i class=\"fa-solid fa-paste\"></i>\n </ax-icon>\n </ax-prefix>\n <ax-suffix>\n <ax-text>\n Ctrl+V\n </ax-text>\n </ax-suffix>\n </ax-menu-item>\n </ax-menu-item>\n <ax-menu-item text=\"Help\">\n <ax-menu-item text=\"About\"></ax-menu-item>\n </ax-menu-item>\n</ax-menu>", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i1$1.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i1$1.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-sub-title, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXMenuModule }, { kind: "component", type: i2$2.AXMenuItemComponent, selector: "ax-menu-item", inputs: ["disabled", "text", "active"], outputs: ["activeChange", "onClick"] }, { kind: "component", type: i2$2.AXMenuComponent, selector: "ax-menu", inputs: ["orientation", "openOn"] }] }); }
|
|
950
|
+
}
|
|
951
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXPDesignerHeaderMenuComponent, decorators: [{
|
|
952
|
+
type: Component,
|
|
953
|
+
args: [{ standalone: true, imports: [
|
|
954
|
+
CommonModule,
|
|
955
|
+
AXDecoratorModule,
|
|
956
|
+
AXMenuModule,
|
|
957
|
+
], selector: 'axp-designer-header-menu', template: "<ax-menu [openOn]=\"'hover'\">\n <ax-menu-item text=\"Home\">\n <ax-menu-item text=\"New\"></ax-menu-item>\n <ax-menu-item text=\"Export\">\n <ax-menu-item text=\"Download JSON\" (onClick)=\"service.download()\">\n </ax-menu-item>\n </ax-menu-item>\n </ax-menu-item>\n <ax-menu-item text=\"Edit\">\n <ax-menu-item text=\"Undo\" [disabled]=\"!service.canUndo()\" (onClick)=\"service.undo()\">\n <ax-prefix>\n <ax-icon>\n <i class=\"fa-solid fa-rotate-left\"></i>\n </ax-icon>\n </ax-prefix>\n <ax-suffix>\n <ax-text>\n Ctrl+Z\n </ax-text>\n </ax-suffix>\n </ax-menu-item>\n <ax-menu-item text=\"Redo\" [disabled]=\"!service.canRedo()\" (onClick)=\"service.redo()\">\n <ax-prefix>\n <ax-icon>\n <i class=\"fa-solid fa-rotate-right\"></i>\n </ax-icon>\n </ax-prefix>\n <ax-suffix>\n <ax-text>\n Ctrl+Y\n </ax-text>\n </ax-suffix>\n </ax-menu-item>\n <ax-divider></ax-divider>\n <ax-menu-item text=\"Cut\" [disabled]=\"!service.canCutCopy()\" (onClick)=\"service.cut()\">\n <ax-prefix>\n <ax-icon>\n <i class=\"fa-solid fa-cut\"></i>\n </ax-icon>\n </ax-prefix>\n <ax-suffix>\n <ax-text>\n Ctrl+X\n </ax-text>\n </ax-suffix>\n </ax-menu-item>\n <ax-menu-item text=\"Copy\" [disabled]=\"!service.canCutCopy()\" (onClick)=\"service.copy()\">\n <ax-prefix>\n <ax-icon>\n <i class=\"fa-solid fa-copy\"></i>\n </ax-icon>\n </ax-prefix>\n <ax-suffix>\n <ax-text>\n Ctrl+C\n </ax-text>\n </ax-suffix>\n </ax-menu-item>\n <ax-menu-item text=\"Paste\" [disabled]=\"!service.canPaste()\" (onClick)=\"service.paste()\">\n <ax-prefix>\n <ax-icon>\n <i class=\"fa-solid fa-paste\"></i>\n </ax-icon>\n </ax-prefix>\n <ax-suffix>\n <ax-text>\n Ctrl+V\n </ax-text>\n </ax-suffix>\n </ax-menu-item>\n </ax-menu-item>\n <ax-menu-item text=\"Help\">\n <ax-menu-item text=\"About\"></ax-menu-item>\n </ax-menu-item>\n</ax-menu>" }]
|
|
958
|
+
}] });
|
|
959
|
+
|
|
960
|
+
class AXPDesignerOutlineComponent {
|
|
961
|
+
constructor() {
|
|
962
|
+
this.service = inject(AXPDesignerService);
|
|
963
|
+
this.collapsedStates = new Map();
|
|
964
|
+
this.root = signal(this.service.root());
|
|
965
|
+
merge$1(this.service.onRefresh, this.service.onUpdate)
|
|
966
|
+
.subscribe(() => {
|
|
967
|
+
this.root.update(c => ({ ...this.service.root() }));
|
|
968
|
+
});
|
|
969
|
+
}
|
|
970
|
+
toggleCollapse(node) {
|
|
971
|
+
// Toggle the current state or set to true if undefined
|
|
972
|
+
this.collapsedStates.set(node, !this.collapsedStates.get(node));
|
|
973
|
+
}
|
|
974
|
+
isCollapsed(node) {
|
|
975
|
+
// Return the collapsed state, default is false (expanded)
|
|
976
|
+
return !!this.collapsedStates.get(node);
|
|
977
|
+
}
|
|
978
|
+
getConfig(node) {
|
|
979
|
+
return get(node, "__meta__.config");
|
|
980
|
+
}
|
|
981
|
+
handleClick(e, node) {
|
|
982
|
+
e.stopPropagation();
|
|
983
|
+
this.service.select({ widget: node });
|
|
984
|
+
}
|
|
985
|
+
handleToggleClick(event, item) {
|
|
986
|
+
event.stopPropagation(); // Prevents the event from bubbling up to parent elements
|
|
987
|
+
this.toggleCollapse(item);
|
|
988
|
+
}
|
|
989
|
+
handleMouseOver(e, node) {
|
|
990
|
+
e.stopPropagation();
|
|
991
|
+
this.service.focus({ widget: node });
|
|
992
|
+
}
|
|
993
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXPDesignerOutlineComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
994
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.0", type: AXPDesignerOutlineComponent, isStandalone: true, selector: "axp-designer-outline", ngImport: i0, template: "<div class=\"ax-flex ax-flex-col ax-border-e ax-w-72\">\n <div class=\"ax-flex ax-flex-row ax-w-full ax-justify-between ax-text-white ax-p-2 ax-border-b\">\n <div class=\"ax-flex ax-flex-row ax-gap-2 ax-items-center\">\n <span class=\"ax-font-semibold\">Outline</span>\n </div>\n <ax-close-button></ax-close-button>\n </div>\n <div class=\"ax-flex-1 ax-h-full ax-overflow-auto\">\n\n @if(root().children?.length)\n {\n <ul class=\"ax-text-white ax-text-sm ax-bg-gray-800 ax-p-2 ax-rounded-md ax-space-y-1\">\n @for( node of root().children;track $index)\n {\n <ng-container [ngTemplateOutlet]=\"sideMenu\" [ngTemplateOutletContext]=\"{ $implicit: node }\">\n </ng-container>\n }\n </ul>\n <ng-template #sideMenu let-item>\n <li class=\"ax-cursor-pointer ax-transition ax-duration-150 ax-ease-in-out ax-hover:bg-gray-700\"\n (click)=\"handleClick($event,item)\" (mouseover)=\"handleMouseOver($event,item)\">\n <div [class.ax-bg-blue-200]=\"item === service.selectedNode()\"\n [class.ax-text-blue-900]=\"item === service.selectedNode()\"\n class=\"ax-flex ax-flex-row ax-items-center ax-p-1 ax-px-2\">\n <span class=\"ax-w-5\">\n @if(item.children?.length)\n {\n <i class=\"fa-solid\" [class.fa-chevron-right]=\"isCollapsed(item)\"\n (click)=\"handleToggleClick($event, item)\" [class.fa-chevron-down]=\"!isCollapsed(item)\"></i>\n }\n </span>\n @let config= getConfig(item);\n <span class=\"ax-w-5\">\n @if(config.icon)\n {\n <i [ngClass]=\"config.icon\"></i>\n }\n </span>\n <span>{{config.title}} : {{item.name}}</span>\n </div>\n @if(item.children?.length && !isCollapsed(item)) {\n <ul class=\"ax-pl-5 ax-space-y-1\">\n <ng-container *ngFor=\"let child of item.children\" [ngTemplateOutlet]=\"sideMenu\"\n [ngTemplateOutletContext]=\"{ $implicit: child }\">\n </ng-container>\n </ul>\n }\n </li>\n </ng-template>\n }\n @else {\n <div class=\"ax-flex ax-justify-center ax-items-center ax-text-gray-300 ax-p-4\">No widgets found in the page\n </div>\n }\n </div>\n</div>", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: AXPLayoutBuilderModule }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i1$1.AXDecoratorCloseButtonComponent, selector: "ax-close-button", inputs: ["icon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
995
|
+
}
|
|
996
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXPDesignerOutlineComponent, decorators: [{
|
|
997
|
+
type: Component,
|
|
998
|
+
args: [{ selector: 'axp-designer-outline', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
|
|
999
|
+
CommonModule,
|
|
1000
|
+
AXPLayoutBuilderModule,
|
|
1001
|
+
AXDecoratorModule,
|
|
1002
|
+
], template: "<div class=\"ax-flex ax-flex-col ax-border-e ax-w-72\">\n <div class=\"ax-flex ax-flex-row ax-w-full ax-justify-between ax-text-white ax-p-2 ax-border-b\">\n <div class=\"ax-flex ax-flex-row ax-gap-2 ax-items-center\">\n <span class=\"ax-font-semibold\">Outline</span>\n </div>\n <ax-close-button></ax-close-button>\n </div>\n <div class=\"ax-flex-1 ax-h-full ax-overflow-auto\">\n\n @if(root().children?.length)\n {\n <ul class=\"ax-text-white ax-text-sm ax-bg-gray-800 ax-p-2 ax-rounded-md ax-space-y-1\">\n @for( node of root().children;track $index)\n {\n <ng-container [ngTemplateOutlet]=\"sideMenu\" [ngTemplateOutletContext]=\"{ $implicit: node }\">\n </ng-container>\n }\n </ul>\n <ng-template #sideMenu let-item>\n <li class=\"ax-cursor-pointer ax-transition ax-duration-150 ax-ease-in-out ax-hover:bg-gray-700\"\n (click)=\"handleClick($event,item)\" (mouseover)=\"handleMouseOver($event,item)\">\n <div [class.ax-bg-blue-200]=\"item === service.selectedNode()\"\n [class.ax-text-blue-900]=\"item === service.selectedNode()\"\n class=\"ax-flex ax-flex-row ax-items-center ax-p-1 ax-px-2\">\n <span class=\"ax-w-5\">\n @if(item.children?.length)\n {\n <i class=\"fa-solid\" [class.fa-chevron-right]=\"isCollapsed(item)\"\n (click)=\"handleToggleClick($event, item)\" [class.fa-chevron-down]=\"!isCollapsed(item)\"></i>\n }\n </span>\n @let config= getConfig(item);\n <span class=\"ax-w-5\">\n @if(config.icon)\n {\n <i [ngClass]=\"config.icon\"></i>\n }\n </span>\n <span>{{config.title}} : {{item.name}}</span>\n </div>\n @if(item.children?.length && !isCollapsed(item)) {\n <ul class=\"ax-pl-5 ax-space-y-1\">\n <ng-container *ngFor=\"let child of item.children\" [ngTemplateOutlet]=\"sideMenu\"\n [ngTemplateOutletContext]=\"{ $implicit: child }\">\n </ng-container>\n </ul>\n }\n </li>\n </ng-template>\n }\n @else {\n <div class=\"ax-flex ax-justify-center ax-items-center ax-text-gray-300 ax-p-4\">No widgets found in the page\n </div>\n }\n </div>\n</div>" }]
|
|
1003
|
+
}], ctorParameters: () => [] });
|
|
1004
|
+
|
|
783
1005
|
class AXPWidgetPropertyViewerComponent {
|
|
784
1006
|
constructor() {
|
|
785
1007
|
this.widget = input.required();
|
|
@@ -855,7 +1077,7 @@ class AXPWidgetPropertyViewerComponent {
|
|
|
855
1077
|
untracked(() => {
|
|
856
1078
|
this.context.set(e.data);
|
|
857
1079
|
});
|
|
858
|
-
this.onChanged.emit({ values:
|
|
1080
|
+
this.onChanged.emit({ values: this.context(), mode: 'update', });
|
|
859
1081
|
}
|
|
860
1082
|
handleTabChange(event) {
|
|
861
1083
|
const indx = event.index;
|
|
@@ -864,7 +1086,7 @@ class AXPWidgetPropertyViewerComponent {
|
|
|
864
1086
|
}
|
|
865
1087
|
}
|
|
866
1088
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXPWidgetPropertyViewerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
867
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.0", type: AXPWidgetPropertyViewerComponent, isStandalone: true, selector: "axp-widget-property-viewer", inputs: { widget: { classPropertyName: "widget", publicName: "widget", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { onChanged: "onChanged" }, ngImport: i0, template: "<axp-widgets-container [context]=\"context()\" (onChanged)=\"handleContextChange($event)\">\n <div class=\"ax-flex ax-flex-col\">\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 <div class=\"ax-flex-1 ax-overflow-auto\">\n <ax-collapse-group class=\"ax-h-fit\" look=\"blank\">\n @for( group of groups();track $index){\n <ax-collapse [caption]=\"group.title\" look=\"solid\" [(isCollapsed)]=\"group.isCollapsed\">\n <div class=\"ax-flex ax-flex-col ax-divide-y\">\n @for( p of group.props;track $index){\n <div class=\"ax-flex ax-flex-col ax-gap-1 ax-py-2 first:ax-pt-0 last:ax-pb-0\">\n <span class=\"ax-font-semibold\">{{p.title}}</span>\n @if(p.schema.interface)\n {\n <axp-widget-renderer [node]=\"p.schema.interface\" [mode]=\"'edit'\">\n </axp-widget-renderer>\n }\n </div>\n }\n </div>\n </ax-collapse>\n }\n </ax-collapse-group>\n </div>\n </div>\n</axp-widgets-container>", styles: ["ax-collapse .ax-collapse-header{font-weight:600}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXCollapseModule }, { kind: "component", type: i1$3.AXCollapseComponent, selector: "ax-collapse", inputs: ["disabled", "look", "isCollapsed", "showHeader", "caption", "icon", "isLoading", "headerTemplate"], outputs: ["onClick", "isCollapsedChange"] }, { kind: "component", type: i1$3.AXCollapseGroupComponent, selector: "ax-collapse-group", inputs: ["look", "accordion", "activeIndex"], outputs: ["accordionChange", "activeIndexChange"] }, { kind: "ngmodule", type: AXTabsModule }, { kind: "component", type: i2$
|
|
1089
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.0", type: AXPWidgetPropertyViewerComponent, isStandalone: true, selector: "axp-widget-property-viewer", inputs: { widget: { classPropertyName: "widget", publicName: "widget", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { onChanged: "onChanged" }, ngImport: i0, template: "<axp-widgets-container [context]=\"context()\" (onChanged)=\"handleContextChange($event)\">\n <div class=\"ax-flex ax-flex-col\">\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 <div class=\"ax-flex-1 ax-overflow-auto\">\n <ax-collapse-group class=\"ax-h-fit\" look=\"blank\">\n @for( group of groups();track $index){\n <ax-collapse [caption]=\"group.title\" look=\"solid\" [(isCollapsed)]=\"group.isCollapsed\">\n <div class=\"ax-flex ax-flex-col ax-divide-y\">\n @for( p of group.props;track $index){\n <div class=\"ax-flex ax-flex-col ax-gap-1 ax-py-2 first:ax-pt-0 last:ax-pb-0\">\n <span class=\"ax-font-semibold\">{{p.title}}</span>\n @if(p.schema.interface)\n {\n <axp-widget-renderer [node]=\"p.schema.interface\" [mode]=\"'edit'\">\n </axp-widget-renderer>\n }\n </div>\n }\n </div>\n </ax-collapse>\n }\n </ax-collapse-group>\n </div>\n </div>\n</axp-widgets-container>", styles: ["ax-collapse .ax-collapse-header{font-weight:600}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXCollapseModule }, { kind: "component", type: i1$3.AXCollapseComponent, selector: "ax-collapse", inputs: ["disabled", "look", "isCollapsed", "showHeader", "caption", "icon", "isLoading", "headerTemplate"], outputs: ["onClick", "isCollapsedChange"] }, { kind: "component", type: i1$3.AXCollapseGroupComponent, selector: "ax-collapse-group", inputs: ["look", "accordion", "activeIndex"], outputs: ["accordionChange", "activeIndexChange"] }, { kind: "ngmodule", type: AXTabsModule }, { kind: "component", type: i2$3.AXTabsComponent, selector: "ax-tabs", inputs: ["look", "location", "fitParent", "minWidth", "content"], outputs: ["onActiveTabChanged"] }, { kind: "component", type: i2$3.AXTabItemComponent, selector: "ax-tab-item", inputs: ["disabled", "text", "key", "headerTemplate", "active"], outputs: ["disabledChange", "onClick", "onBlur", "onFocus", "activeChange"] }, { kind: "ngmodule", type: AXPLayoutBuilderModule }, { kind: "component", type: i3$1.AXPWidgetContainerComponent, selector: "axp-widgets-container", inputs: ["context", "variables", "functions"], outputs: ["onChanged", "contextChange"] }, { kind: "component", type: i3$1.AXPWidgetRendererComponent, selector: "axp-widget-renderer", inputs: ["node", "mode", "parentNode", "index"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
868
1090
|
}
|
|
869
1091
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXPWidgetPropertyViewerComponent, decorators: [{
|
|
870
1092
|
type: Component,
|
|
@@ -873,88 +1095,28 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
|
|
|
873
1095
|
type: Output
|
|
874
1096
|
}] } });
|
|
875
1097
|
|
|
876
|
-
class
|
|
1098
|
+
class AXPDesignerHistoryComponent {
|
|
877
1099
|
constructor() {
|
|
878
1100
|
this.service = inject(AXPDesignerService);
|
|
879
|
-
this.collapsedStates = new Map();
|
|
880
|
-
this.root = signal(this.service.root());
|
|
881
|
-
merge$1(this.service.onRefresh, this.service.onUpdate)
|
|
882
|
-
.subscribe(() => {
|
|
883
|
-
this.root.update(c => ({ ...this.service.root() }));
|
|
884
|
-
});
|
|
885
|
-
}
|
|
886
|
-
toggleCollapse(node) {
|
|
887
|
-
// Toggle the current state or set to true if undefined
|
|
888
|
-
this.collapsedStates.set(node, !this.collapsedStates.get(node));
|
|
889
|
-
}
|
|
890
|
-
isCollapsed(node) {
|
|
891
|
-
// Return the collapsed state, default is false (expanded)
|
|
892
|
-
return !!this.collapsedStates.get(node);
|
|
893
|
-
}
|
|
894
|
-
getConfig(node) {
|
|
895
|
-
return get(node, "__meta__.config");
|
|
896
1101
|
}
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
this.service.select({ widget: node });
|
|
900
|
-
}
|
|
901
|
-
handleToggleClick(event, item) {
|
|
902
|
-
event.stopPropagation(); // Prevents the event from bubbling up to parent elements
|
|
903
|
-
this.toggleCollapse(item);
|
|
904
|
-
}
|
|
905
|
-
handleMouseOver(e, node) {
|
|
906
|
-
e.stopPropagation();
|
|
907
|
-
this.service.focus({ widget: node });
|
|
908
|
-
}
|
|
909
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXPDesignerOutlineComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
910
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.0", type: AXPDesignerOutlineComponent, isStandalone: true, selector: "axp-designer-outline", ngImport: i0, template: "@if(root().children?.length)\n{\n<ul class=\"ax-text-white ax-text-sm ax-bg-gray-800 ax-p-2 ax-rounded-md ax-space-y-1\">\n @for( node of root().children;track $index)\n {\n <ng-container [ngTemplateOutlet]=\"sideMenu\" [ngTemplateOutletContext]=\"{ $implicit: node }\">\n </ng-container>\n }\n</ul>\n<ng-template #sideMenu let-item>\n <li class=\"ax-cursor-pointer ax-transition ax-duration-150 ax-ease-in-out ax-hover:bg-gray-700\"\n (click)=\"handleClick($event,item)\" (mouseover)=\"handleMouseOver($event,item)\">\n <div [class.ax-bg-blue-200]=\"item === service.selectedNode()\"\n [class.ax-text-blue-900]=\"item === service.selectedNode()\"\n class=\"ax-flex ax-flex-row ax-items-center ax-p-1 ax-px-2\">\n <span class=\"ax-w-5\">\n @if(item.children?.length)\n {\n <i class=\"fa-solid\" [class.fa-chevron-right]=\"isCollapsed(item)\"\n (click)=\"handleToggleClick($event, item)\" [class.fa-chevron-down]=\"!isCollapsed(item)\"></i>\n }\n </span>\n @let config= getConfig(item);\n <span class=\"ax-w-5\">\n @if(config.icon)\n {\n <i [ngClass]=\"config.icon\"></i>\n }\n </span>\n <span>{{config.title}} : {{item.name}}</span>\n </div>\n @if(item.children?.length && !isCollapsed(item)) {\n <ul class=\"ax-pl-5 ax-space-y-1\">\n <ng-container *ngFor=\"let child of item.children\" [ngTemplateOutlet]=\"sideMenu\"\n [ngTemplateOutletContext]=\"{ $implicit: child }\">\n </ng-container>\n </ul>\n }\n </li>\n</ng-template>\n}\n@else {\n<div class=\"ax-flex ax-justify-center ax-items-center ax-text-gray-300 ax-p-4\">No widgets found in the page</div>\n}", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: AXPLayoutBuilderModule }, { kind: "ngmodule", type: AXBreadcrumbsModule }, { kind: "ngmodule", type: AXDecoratorModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
1102
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXPDesignerHistoryComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1103
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.0", type: AXPDesignerHistoryComponent, isStandalone: true, selector: "axp-designer-history", ngImport: i0, template: "<div class=\"ax-flex ax-flex-col ax-border-e ax-w-72\">\n <!-- Header -->\n <div class=\"ax-flex ax-flex-row ax-w-full ax-justify-between ax-text-white ax-p-2 ax-border-b\">\n <div class=\"ax-flex ax-flex-row ax-gap-2 ax-items-center\">\n <span class=\"ax-font-semibold\">History</span>\n </div>\n <ax-close-button></ax-close-button>\n </div>\n\n <!-- History List or Empty State -->\n <div class=\"ax-flex-1 ax-h-full ax-overflow-auto\">\n @if(service.history().length)\n {\n <!-- History Items -->\n <ul class=\"ax-space-y-2 ax-p-2 ax-text-white ax-text-sm\">\n @for (step of service.history(); track $index) {\n <li (click)=\"service.revertToChange($index)\"\n class=\"ax-cursor-pointer ax-transition ax-duration-150 ax-ease-in-out ax-hover:bg-gray-700\">\n {{ step.description }} {{step.disabled}}\n </li>\n }\n </ul>\n }\n @else {\n <!-- No History Found -->\n <div class=\"ax-flex ax-justify-center ax-items-center ax-text-gray-300 ax-p-4\">\n No changes have been made yet.\n </div>\n }\n </div>\n</div>", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i1$1.AXDecoratorCloseButtonComponent, selector: "ax-close-button", inputs: ["icon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
911
1104
|
}
|
|
912
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type:
|
|
1105
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXPDesignerHistoryComponent, decorators: [{
|
|
913
1106
|
type: Component,
|
|
914
|
-
args: [{ selector: 'axp-designer-
|
|
1107
|
+
args: [{ selector: 'axp-designer-history', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
|
|
915
1108
|
CommonModule,
|
|
916
|
-
AXPLayoutBuilderModule,
|
|
917
|
-
AXBreadcrumbsModule,
|
|
918
1109
|
AXDecoratorModule,
|
|
919
|
-
], template: "
|
|
920
|
-
}]
|
|
1110
|
+
], template: "<div class=\"ax-flex ax-flex-col ax-border-e ax-w-72\">\n <!-- Header -->\n <div class=\"ax-flex ax-flex-row ax-w-full ax-justify-between ax-text-white ax-p-2 ax-border-b\">\n <div class=\"ax-flex ax-flex-row ax-gap-2 ax-items-center\">\n <span class=\"ax-font-semibold\">History</span>\n </div>\n <ax-close-button></ax-close-button>\n </div>\n\n <!-- History List or Empty State -->\n <div class=\"ax-flex-1 ax-h-full ax-overflow-auto\">\n @if(service.history().length)\n {\n <!-- History Items -->\n <ul class=\"ax-space-y-2 ax-p-2 ax-text-white ax-text-sm\">\n @for (step of service.history(); track $index) {\n <li (click)=\"service.revertToChange($index)\"\n class=\"ax-cursor-pointer ax-transition ax-duration-150 ax-ease-in-out ax-hover:bg-gray-700\">\n {{ step.description }} {{step.disabled}}\n </li>\n }\n </ul>\n }\n @else {\n <!-- No History Found -->\n <div class=\"ax-flex ax-justify-center ax-items-center ax-text-gray-300 ax-p-4\">\n No changes have been made yet.\n </div>\n }\n </div>\n</div>" }]
|
|
1111
|
+
}] });
|
|
921
1112
|
|
|
922
1113
|
class AXPLayoutDesignerComponent {
|
|
923
1114
|
constructor() {
|
|
924
|
-
this.currentTabIndex = signal(0);
|
|
925
1115
|
this.service = inject(AXPDesignerService);
|
|
926
|
-
this.tabs = [
|
|
927
|
-
{
|
|
928
|
-
mode: 'designer',
|
|
929
|
-
title: 'Designer',
|
|
930
|
-
},
|
|
931
|
-
{
|
|
932
|
-
mode: 'edit',
|
|
933
|
-
title: 'Edit',
|
|
934
|
-
},
|
|
935
|
-
{
|
|
936
|
-
mode: 'view',
|
|
937
|
-
title: 'View',
|
|
938
|
-
},
|
|
939
|
-
{
|
|
940
|
-
mode: 'print',
|
|
941
|
-
title: 'Print',
|
|
942
|
-
},
|
|
943
|
-
];
|
|
944
1116
|
this.nodeConfig = computed(() => this.service.selectedNode() ? get(this.service.selectedNode(), '__meta__.config') : null);
|
|
945
1117
|
}
|
|
946
|
-
handleTabChange(event) {
|
|
947
|
-
const index = event.index;
|
|
948
|
-
if (this.currentTabIndex() != index) {
|
|
949
|
-
this.currentTabIndex.set(index);
|
|
950
|
-
this.service.setMode(this.tabs[this.currentTabIndex()].mode);
|
|
951
|
-
}
|
|
952
|
-
}
|
|
953
|
-
get __class() {
|
|
954
|
-
return 'ax-h-full';
|
|
955
|
-
}
|
|
956
1118
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXPLayoutDesignerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
957
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.0", type: AXPLayoutDesignerComponent, isStandalone: true, selector: "axp-layout-designer", host: { properties: { "class": "this.__class" } }, providers: [AXPDesignerService], ngImport: i0, template: "<ax-drawer-container class=\"ax-h-full ax-w-full ax-flex ax-relative child:ax-h-full ax-overflow-hidden\">\n <ax-content class=\"ax-contents\">\n <!-- Toolbar Side -->\n <div class=\"ax-min-w-10 ax-bg-surface ax-border-e ax-xs ax-flex ax-flex-col ax-items-center ax-dark\">\n <div class=\"ax-min-w-10 ax-h-10 ax-flex ax-items-center ax-justify-center ax-border-b\">\n <img src=\"assets/logos/logo.png\" class=\"ax-w-6\" />\n </div>\n <div class=\"ax-py-1\"></div>\n <div class=\"ax-flex ax-flex-col ax-gap-2\">\n <ax-button color=\"ghost\" look=\"twotone\">\n <ax-icon class=\"fa-solid fa-puzzle ax-text-sm\"> </ax-icon>\n </ax-button>\n <ax-button color=\"ghost\" look=\"twotone\">\n <ax-icon class=\"fa-solid fa-plus ax-text-sm\"> </ax-icon>\n </ax-button>\n <ax-button color=\"ghost\" look=\"twotone\">\n <ax-icon class=\"fa-solid fa-database ax-text-sm\"> </ax-icon>\n </ax-button>\n <ax-button color=\"ghost\" look=\"twotone\" (onClick)=\"outline.toggle()\">\n <ax-icon class=\"fa-solid fa-list-tree ax-text-sm\"> </ax-icon>\n </ax-button>\n </div>\n </div>\n\n <!-- Main Side -->\n <div class=\"ax-col-span-10 ax-flex ax-flex-col ax-flex-1\">\n <!-- Header Toolbar -->\n <div class=\"ax-min-h-10 ax-bg-surface ax-border-b ax-dark ax-flex ax-flex-grow ax-justify-between ax-px-2\">\n <div class=\"ax-flex ax-items-center ax-justify-center ax-text-white\">\n <ax-menu [openOn]=\"'hover'\">\n <ax-menu-item text=\"Home\">\n <ax-menu-item text=\"New\"></ax-menu-item>\n <ax-menu-item text=\"Export\">\n <ax-menu-item text=\"Download JSON\" (onClick)=\"service.download()\">\n </ax-menu-item>\n </ax-menu-item>\n </ax-menu-item>\n <ax-menu-item text=\"Edit\">\n <ax-menu-item text=\"Undo\" [disabled]=\"!service.canUndo()\" (onClick)=\"service.undo()\">\n <ax-prefix>\n <ax-icon>\n <i class=\"fa-solid fa-rotate-left\"></i>\n </ax-icon>\n </ax-prefix>\n <ax-suffix>\n <ax-text>\n Ctrl+Z\n </ax-text>\n </ax-suffix>\n </ax-menu-item>\n <ax-menu-item text=\"Redo\" [disabled]=\"!service.canRedo()\" (onClick)=\"service.redo()\">\n <ax-prefix>\n <ax-icon>\n <i class=\"fa-solid fa-rotate-right\"></i>\n </ax-icon>\n </ax-prefix>\n <ax-suffix>\n <ax-text>\n Ctrl+Y\n </ax-text>\n </ax-suffix>\n </ax-menu-item>\n <ax-divider></ax-divider>\n <ax-menu-item text=\"Cut\" [disabled]=\"!service.canCutCopy()\" (onClick)=\"service.cut()\">\n <ax-prefix>\n <ax-icon>\n <i class=\"fa-solid fa-cut\"></i>\n </ax-icon>\n </ax-prefix>\n <ax-suffix>\n <ax-text>\n Ctrl+X\n </ax-text>\n </ax-suffix>\n </ax-menu-item>\n <ax-menu-item text=\"Copy\" [disabled]=\"!service.canCutCopy()\" (onClick)=\"service.copy()\">\n <ax-prefix>\n <ax-icon>\n <i class=\"fa-solid fa-copy\"></i>\n </ax-icon>\n </ax-prefix>\n <ax-suffix>\n <ax-text>\n Ctrl+C\n </ax-text>\n </ax-suffix>\n </ax-menu-item>\n <ax-menu-item text=\"Paste\" [disabled]=\"!service.canPaste()\" (onClick)=\"service.paste()\">\n <ax-prefix>\n <ax-icon>\n <i class=\"fa-solid fa-paste\"></i>\n </ax-icon>\n </ax-prefix>\n <ax-suffix>\n <ax-text>\n Ctrl+V\n </ax-text>\n </ax-suffix>\n </ax-menu-item>\n </ax-menu-item>\n <ax-menu-item text=\"Help\">\n <ax-menu-item text=\"About\"></ax-menu-item>\n </ax-menu-item>\n </ax-menu>\n </div>\n <div class=\"ax-flex ax-flex-row ax-gap-2 ax-xs ax-items-center\">\n <ax-button color=\"success\" look=\"twotone\" text=\"Preview\">\n <ax-icon class=\"fa-solid fa-eye \"> </ax-icon>\n </ax-button>\n <!-- <ax-button color=\"ghost\" look=\"twotone\" (onClick)=\"service.undo()\" [disabled]=\"!service.canUndo()\">\n <ax-icon class=\"fa-solid fa-rotate-left ax-text-sm\"> </ax-icon>\n </ax-button>\n <ax-button color=\"ghost\" look=\"twotone\" (onClick)=\"service.redo()\" [disabled]=\"!service.canRedo()\">\n <ax-icon class=\"fa-solid fa-rotate-right ax-text-sm\"> </ax-icon>\n </ax-button> -->\n </div>\n </div>\n\n <!-- Board -->\n <div class=\"ax-h-full\">\n <ax-drawer-container class=\"ax-w-full ax-h-full\">\n <ax-drawer #bd location=\"start\" mode=\"push\" class=\"ax-dark\">\n <ax-content>\n <div class=\"ax-min-w-80 ax-h-full ax-overflow-auto ax-border-e\">\n </div>\n </ax-content>\n </ax-drawer>\n <ax-drawer #outline location=\"start\" mode=\"push\" class=\"ax-dark\">\n <ax-content>\n <div class=\"ax-flex ax-flex-col ax-border-e ax-w-72\">\n <div class=\"ax-flex ax-flex-row ax-w-full ax-justify-between ax-text-white ax-p-2 ax-border-b\">\n <div class=\"ax-flex ax-flex-row ax-gap-2 ax-items-center\">\n <span class=\"ax-font-semibold\">Outline</span>\n </div>\n <ax-close-button></ax-close-button>\n </div>\n <div class=\"ax-flex-1 ax-h-full ax-overflow-auto\">\n <axp-designer-outline></axp-designer-outline>\n </div>\n </div>\n </ax-content>\n </ax-drawer>\n <!-- Content of board -->\n <ax-content>\n <div class=\"ax-bg-white ax-h-full ax-block\">\n <axp-designer-board class=\"ax-w-full ax-border-default ax-border ax-flex-1 ax-overflow-auto ax-p-3\">\n </axp-designer-board>\n </div>\n </ax-content>\n </ax-drawer-container>\n </div>\n\n <!-- Footer -->\n <div class=\"ax-min-h-10 ax-bg-surface ax-border-t ax-dark ax-flex ax-items-center\">\n @if(currentTabIndex()==0) {\n <axp-designer-breadcrumbs class=\"ax-border-default ax-border-t ax-p-2 ax-font-normal\">\n </axp-designer-breadcrumbs>\n }\n </div>\n </div>\n </ax-content>\n <!-- Property Side -->\n <ax-drawer class=\"ax-w-80 ax-border-s ax-dark \" location=\"end\" mode=\"push\" [collapsed]=\"false\" #pd>\n <ax-content>\n\n <div class=\"ax-flex ax-flex-row ax-w-full ax-justify-between ax-text-white ax-py-2 ax-px-4 ax-border-b\">\n <div class=\"ax-flex ax-flex-row ax-gap-2 ax-items-center\">\n <i [ngClass]=\"nodeConfig()?.icon\"></i>\n <span class=\"ax-font-semibold\">{{nodeConfig()?.title}}</span>\n </div>\n </div>\n <axp-widget-property-viewer [widget]=\"service.selectedNode()!\"\n (onChanged)=\"service.update({ values: $event.values,mode:$event.mode})\" class=\"ax-w-1/4\">\n </axp-widget-property-viewer>\n </ax-content>\n </ax-drawer>\n</ax-drawer-container>", styles: [".axp-designer-board{display:block}.axp-designer-board.axp-state-design .axp-widget-host{position:relative;display:block;cursor:pointer;padding:.25rem}.axp-designer-board.axp-state-design .axp-widget-host.axp-state-selected{outline-style:solid;outline-width:1px;outline-offset:1px;outline-color:rgba(var(--ax-color-primary-500),1);position:relative}.axp-designer-board.axp-state-design .axp-widget-host.axp-state-hover{outline-style:dashed;outline-width:1px;outline-offset:1px;outline-color:rgba(var(--ax-color-primary-500),1)}.axp-designer-board.axp-state-design .axp-widget-host .axp-widget-overlay{position:absolute;left:0;top:0;right:0;bottom:0;z-index:9999;height:100%;width:100%;background:rgba(202,123,123,.39)}@keyframes moveLight{0%{background-position:0% 50%}to{background-position:100% 50%}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: AXPLayoutBuilderModule }, { kind: "component", type: AXPDesignerBoardComponent, selector: "axp-designer-board" }, { kind: "component", type: AXPWidgetPropertyViewerComponent, selector: "axp-widget-property-viewer", inputs: ["widget"], outputs: ["onChanged"] }, { kind: "component", type: AXPDesignerBreadcrumbsComponent, selector: "axp-designer-breadcrumbs" }, { kind: "component", type: AXPDesignerOutlineComponent, selector: "axp-designer-outline" }, { kind: "ngmodule", type: AXTabsModule }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i1$1.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "type", "responsiveOn", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "responsiveOnChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXDrawerModule }, { kind: "component", type: i3$2.AXDrawerComponent, selector: "ax-drawer", inputs: ["location", "showBackdrop", "mode", "collapsed"], outputs: ["locationChange", "modeChange", "collapsedChange"] }, { kind: "component", type: i3$2.AXDrawerContainerComponent, selector: "ax-drawer-container" }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i4.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i4.AXDecoratorCloseButtonComponent, selector: "ax-close-button", inputs: ["icon"] }, { kind: "component", type: i4.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-sub-title, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXMenuModule }, { kind: "component", type: i5.AXMenuItemComponent, selector: "ax-menu-item", inputs: ["disabled", "text", "active"], outputs: ["activeChange", "onClick"] }, { kind: "component", type: i5.AXMenuComponent, selector: "ax-menu", inputs: ["orientation", "openOn"] }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
1119
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.0", type: AXPLayoutDesignerComponent, isStandalone: true, selector: "axp-layout-designer", providers: [AXPDesignerService], ngImport: i0, template: "<ax-drawer-container class=\"ax-h-full ax-w-full ax-flex ax-relative child:ax-h-full ax-overflow-hidden ax-dark\">\n <ax-content class=\"ax-contents\">\n <!-- Toolbar Side -->\n <div class=\"ax-min-w-10 ax-bg-surface ax-border-e ax-xs ax-flex ax-flex-col ax-items-center \">\n <div class=\"ax-min-w-10 ax-h-10 ax-flex ax-items-center ax-justify-center ax-border-b\">\n <img src=\"assets/logos/logo.png\" class=\"ax-w-6\" />\n </div>\n <div class=\"ax-py-1\"></div>\n <div class=\"ax-flex ax-flex-col ax-gap-2\">\n <ax-button color=\"ghost\" look=\"twotone\">\n <ax-icon class=\"fa-solid fa-puzzle ax-text-sm\"> </ax-icon>\n </ax-button>\n <ax-button color=\"ghost\" look=\"twotone\">\n <ax-icon class=\"fa-solid fa-plus ax-text-sm\"> </ax-icon>\n </ax-button>\n <ax-button color=\"ghost\" look=\"twotone\">\n <ax-icon class=\"fa-solid fa-database ax-text-sm\"> </ax-icon>\n </ax-button>\n <ax-button color=\"ghost\" look=\"twotone\" (onClick)=\"outline.toggle()\" title=\"Outline\">\n <ax-icon class=\"fa-solid fa-list-tree ax-text-sm\"> </ax-icon>\n </ax-button>\n <ax-button color=\"ghost\" look=\"twotone\" (onClick)=\"history.toggle()\" title=\"History\">\n <ax-icon class=\"fa-solid fa-clock-rotate-left ax-text-sm\"> </ax-icon>\n </ax-button>\n <ax-button color=\"ghost\" look=\"twotone\" title=\"Timeline\">\n <ax-icon class=\"fa-solid fa-diagram-sankey ax-text-sm\"> </ax-icon>\n </ax-button>\n </div>\n </div>\n <!-- Main Side -->\n <div class=\"ax-col-span-10 ax-flex ax-flex-col ax-flex-1\">\n <!-- Header Toolbar -->\n <div class=\"ax-min-h-10 ax-bg-surface ax-border-b ax-flex ax-flex-grow ax-justify-between ax-px-2\">\n <div class=\"ax-flex ax-items-center ax-justify-center ax-text-white\">\n <axp-designer-header-menu></axp-designer-header-menu>\n </div>\n <div class=\"ax-flex ax-flex-row ax-gap-2 ax-xs ax-items-center\">\n <ax-button-group color=\"ghost\" look=\"twotone\" [selection]=\"'single'\">\n <ax-button-item [selected]=\"service.size() == 'xl'\" [data]=\"'xl'\" (onClick)=\"service.size.set('xl')\">\n <ax-icon class=\"fa-light fa-desktop\"></ax-icon>\n </ax-button-item>\n <ax-button-item [selected]=\"service.size() == 'lg'\" [data]=\"'lg'\" (onClick)=\"service.size.set('lg')\">\n <ax-icon class=\"fa-light fa-tablet\"></ax-icon>\n </ax-button-item>\n <ax-button-item [selected]=\"service.size() == 'sm'\" [data]=\"'sm'\" (onClick)=\"service.size.set('sm')\">\n <ax-icon class=\"fa-light fa-mobile\"></ax-icon>\n </ax-button-item>\n </ax-button-group>\n </div>\n <div class=\"ax-flex ax-flex-row ax-gap-2 ax-xs ax-items-center\">\n <ax-button text=\"Design\" look=\"outline\" class=\"ax-xs\">\n <ax-suffix>\n <ax-icon class=\"fa-light fa-chevron-down\"></ax-icon>\n </ax-suffix>\n <ax-dropdown-panel>\n <ax-button-item-list>\n <ax-button-item text=\"Print\" name=\"print\"> </ax-button-item>\n <ax-button-item text=\"View\" name=\"view\"> </ax-button-item>\n </ax-button-item-list>\n </ax-dropdown-panel>\n </ax-button>\n <ax-button color=\"success\" look=\"outline\" text=\"Preview\" class=\"ax-xs\">\n <ax-suffix>\n <ax-icon class=\"fa-solid fa-play\"></ax-icon>\n </ax-suffix>\n </ax-button>\n </div>\n </div>\n <!-- Board -->\n <div class=\"ax-h-full \">\n <ax-drawer-container class=\"ax-w-full ax-h-full\">\n <ax-drawer #bd location=\"start\" mode=\"push\">\n <ax-content>\n <div class=\"ax-min-w-80 ax-h-full ax-overflow-auto ax-border-e\"></div>\n </ax-content>\n </ax-drawer>\n <!-- Outline Pnael -->\n <ax-drawer #outline location=\"start\" mode=\"push\">\n <ax-content>\n <axp-designer-outline></axp-designer-outline>\n </ax-content>\n </ax-drawer>\n <!-- History Pnael -->\n <ax-drawer #history location=\"start\" mode=\"push\">\n <ax-content>\n <axp-designer-history></axp-designer-history>\n </ax-content>\n </ax-drawer>\n <!-- Content of board -->\n <ax-content class=\"ax-light\">\n <axp-designer-board class=\"ax-h-full ax-bg-on-surface ax-flex ax-justify-center\"> </axp-designer-board>\n </ax-content>\n </ax-drawer-container>\n </div>\n <!-- Footer -->\n <div class=\"ax-min-h-10 ax-bg-surface ax-border-t ax-flex ax-items-center\">\n <axp-designer-breadcrumbs class=\"ax-border-default ax-border-t ax-p-2 ax-font-normal\">\n </axp-designer-breadcrumbs>\n </div>\n </div>\n </ax-content>\n <!-- Property Side -->\n <ax-drawer class=\"ax-w-80 ax-border-s\" location=\"end\" mode=\"push\" [collapsed]=\"false\" #pd>\n <ax-content>\n <div class=\"ax-flex ax-flex-row ax-w-full ax-justify-between ax-text-white ax-py-2 ax-px-4 ax-border-b\">\n <div class=\"ax-flex ax-flex-row ax-gap-2 ax-items-center\">\n <i [ngClass]=\"nodeConfig()?.icon\"></i>\n <span class=\"ax-font-semibold\">{{ nodeConfig()?.title }}</span>\n </div>\n </div>\n <axp-widget-property-viewer [widget]=\"service.selectedNode()!\"\n (onChanged)=\"service.update({ values: $event.values, mode: $event.mode })\" class=\"ax-w-1/4\">\n </axp-widget-property-viewer>\n </ax-content>\n </ax-drawer>\n</ax-drawer-container>", styles: [".axp-designer-board{display:block;height:100%;width:100%;overflow:auto;--tw-bg-opacity: 1;background-color:rgba(var(--ax-color-surface),var(--tw-bg-opacity));padding:.75rem}.axp-designer-board.axp-state-design .axp-widget-host{position:relative;display:block;cursor:pointer;padding:.25rem}.axp-designer-board.axp-state-design .axp-widget-host.axp-state-selected{outline-style:solid;outline-width:1px;outline-offset:1px;outline-color:rgba(var(--ax-color-primary-500),1);position:relative}.axp-designer-board.axp-state-design .axp-widget-host.axp-state-hover{outline-style:dashed;outline-width:1px;outline-offset:1px;outline-color:rgba(var(--ax-color-primary-500),1)}.axp-designer-board.axp-state-design .axp-widget-host .axp-widget-overlay{position:absolute;left:0;top:0;right:0;bottom:0;z-index:10;height:100%;width:100%;background:rgba(202,123,123,.39)}@keyframes moveLight{0%{background-position:0% 50%}to{background-position:100% 50%}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: AXPLayoutBuilderModule }, { kind: "component", type: AXPDesignerBoardComponent, selector: "axp-designer-board" }, { kind: "component", type: AXPWidgetPropertyViewerComponent, selector: "axp-widget-property-viewer", inputs: ["widget"], outputs: ["onChanged"] }, { kind: "component", type: AXPDesignerBreadcrumbsComponent, selector: "axp-designer-breadcrumbs" }, { kind: "component", type: AXPDesignerOutlineComponent, selector: "axp-designer-outline" }, { kind: "component", type: AXPDesignerHeaderMenuComponent, selector: "axp-designer-header-menu" }, { kind: "component", type: AXPDesignerHistoryComponent, selector: "axp-designer-history" }, { kind: "ngmodule", type: AXTabsModule }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i2$1.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "type", "responsiveOn", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "responsiveOnChange", "loadingTextChange"] }, { kind: "component", type: i2$1.AXButtonItemComponent, selector: "ax-button-item", inputs: ["color", "disabled", "text", "selected", "divided", "data", "name"], outputs: ["onClick", "onFocus", "onBlur", "disabledChange"] }, { kind: "component", type: i2$1.AXButtonItemListComponent, selector: "ax-button-item-list", inputs: ["items"], outputs: ["onItemClick"] }, { kind: "ngmodule", type: AXDrawerModule }, { kind: "component", type: i3$2.AXDrawerComponent, selector: "ax-drawer", inputs: ["location", "showBackdrop", "mode", "collapsed"], outputs: ["locationChange", "modeChange", "collapsedChange"] }, { kind: "component", type: i3$2.AXDrawerContainerComponent, selector: "ax-drawer-container" }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i1$1.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i1$1.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-sub-title, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXMenuModule }, { kind: "ngmodule", type: AXButtonGroupModule }, { kind: "component", type: i5.AXButtonGroupComponent, selector: "ax-button-group", inputs: ["disabled", "color", "look", "selection"], outputs: ["onBlur", "onFocus", "lookChange", "colorChange", "disabledChange", "selectionChange"] }, { kind: "ngmodule", type: AXDropdownModule }, { kind: "component", type: i6.AXDropdownPanelComponent, selector: "ax-dropdown-panel", inputs: ["isOpen", "fitParent", "dropdownWidth", "position", "_target", "adaptivityEnabled"], outputs: ["onOpened", "onClosed"] }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
958
1120
|
}
|
|
959
1121
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXPLayoutDesignerComponent, decorators: [{
|
|
960
1122
|
type: Component,
|
|
@@ -965,16 +1127,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
|
|
|
965
1127
|
AXPWidgetPropertyViewerComponent,
|
|
966
1128
|
AXPDesignerBreadcrumbsComponent,
|
|
967
1129
|
AXPDesignerOutlineComponent,
|
|
1130
|
+
AXPDesignerHeaderMenuComponent,
|
|
1131
|
+
AXPDesignerHistoryComponent,
|
|
968
1132
|
AXTabsModule,
|
|
969
1133
|
AXButtonModule,
|
|
970
1134
|
AXDrawerModule,
|
|
971
1135
|
AXDecoratorModule,
|
|
972
|
-
AXMenuModule
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
}] } });
|
|
1136
|
+
AXMenuModule,
|
|
1137
|
+
AXButtonGroupModule,
|
|
1138
|
+
AXDropdownModule,
|
|
1139
|
+
], providers: [AXPDesignerService], template: "<ax-drawer-container class=\"ax-h-full ax-w-full ax-flex ax-relative child:ax-h-full ax-overflow-hidden ax-dark\">\n <ax-content class=\"ax-contents\">\n <!-- Toolbar Side -->\n <div class=\"ax-min-w-10 ax-bg-surface ax-border-e ax-xs ax-flex ax-flex-col ax-items-center \">\n <div class=\"ax-min-w-10 ax-h-10 ax-flex ax-items-center ax-justify-center ax-border-b\">\n <img src=\"assets/logos/logo.png\" class=\"ax-w-6\" />\n </div>\n <div class=\"ax-py-1\"></div>\n <div class=\"ax-flex ax-flex-col ax-gap-2\">\n <ax-button color=\"ghost\" look=\"twotone\">\n <ax-icon class=\"fa-solid fa-puzzle ax-text-sm\"> </ax-icon>\n </ax-button>\n <ax-button color=\"ghost\" look=\"twotone\">\n <ax-icon class=\"fa-solid fa-plus ax-text-sm\"> </ax-icon>\n </ax-button>\n <ax-button color=\"ghost\" look=\"twotone\">\n <ax-icon class=\"fa-solid fa-database ax-text-sm\"> </ax-icon>\n </ax-button>\n <ax-button color=\"ghost\" look=\"twotone\" (onClick)=\"outline.toggle()\" title=\"Outline\">\n <ax-icon class=\"fa-solid fa-list-tree ax-text-sm\"> </ax-icon>\n </ax-button>\n <ax-button color=\"ghost\" look=\"twotone\" (onClick)=\"history.toggle()\" title=\"History\">\n <ax-icon class=\"fa-solid fa-clock-rotate-left ax-text-sm\"> </ax-icon>\n </ax-button>\n <ax-button color=\"ghost\" look=\"twotone\" title=\"Timeline\">\n <ax-icon class=\"fa-solid fa-diagram-sankey ax-text-sm\"> </ax-icon>\n </ax-button>\n </div>\n </div>\n <!-- Main Side -->\n <div class=\"ax-col-span-10 ax-flex ax-flex-col ax-flex-1\">\n <!-- Header Toolbar -->\n <div class=\"ax-min-h-10 ax-bg-surface ax-border-b ax-flex ax-flex-grow ax-justify-between ax-px-2\">\n <div class=\"ax-flex ax-items-center ax-justify-center ax-text-white\">\n <axp-designer-header-menu></axp-designer-header-menu>\n </div>\n <div class=\"ax-flex ax-flex-row ax-gap-2 ax-xs ax-items-center\">\n <ax-button-group color=\"ghost\" look=\"twotone\" [selection]=\"'single'\">\n <ax-button-item [selected]=\"service.size() == 'xl'\" [data]=\"'xl'\" (onClick)=\"service.size.set('xl')\">\n <ax-icon class=\"fa-light fa-desktop\"></ax-icon>\n </ax-button-item>\n <ax-button-item [selected]=\"service.size() == 'lg'\" [data]=\"'lg'\" (onClick)=\"service.size.set('lg')\">\n <ax-icon class=\"fa-light fa-tablet\"></ax-icon>\n </ax-button-item>\n <ax-button-item [selected]=\"service.size() == 'sm'\" [data]=\"'sm'\" (onClick)=\"service.size.set('sm')\">\n <ax-icon class=\"fa-light fa-mobile\"></ax-icon>\n </ax-button-item>\n </ax-button-group>\n </div>\n <div class=\"ax-flex ax-flex-row ax-gap-2 ax-xs ax-items-center\">\n <ax-button text=\"Design\" look=\"outline\" class=\"ax-xs\">\n <ax-suffix>\n <ax-icon class=\"fa-light fa-chevron-down\"></ax-icon>\n </ax-suffix>\n <ax-dropdown-panel>\n <ax-button-item-list>\n <ax-button-item text=\"Print\" name=\"print\"> </ax-button-item>\n <ax-button-item text=\"View\" name=\"view\"> </ax-button-item>\n </ax-button-item-list>\n </ax-dropdown-panel>\n </ax-button>\n <ax-button color=\"success\" look=\"outline\" text=\"Preview\" class=\"ax-xs\">\n <ax-suffix>\n <ax-icon class=\"fa-solid fa-play\"></ax-icon>\n </ax-suffix>\n </ax-button>\n </div>\n </div>\n <!-- Board -->\n <div class=\"ax-h-full \">\n <ax-drawer-container class=\"ax-w-full ax-h-full\">\n <ax-drawer #bd location=\"start\" mode=\"push\">\n <ax-content>\n <div class=\"ax-min-w-80 ax-h-full ax-overflow-auto ax-border-e\"></div>\n </ax-content>\n </ax-drawer>\n <!-- Outline Pnael -->\n <ax-drawer #outline location=\"start\" mode=\"push\">\n <ax-content>\n <axp-designer-outline></axp-designer-outline>\n </ax-content>\n </ax-drawer>\n <!-- History Pnael -->\n <ax-drawer #history location=\"start\" mode=\"push\">\n <ax-content>\n <axp-designer-history></axp-designer-history>\n </ax-content>\n </ax-drawer>\n <!-- Content of board -->\n <ax-content class=\"ax-light\">\n <axp-designer-board class=\"ax-h-full ax-bg-on-surface ax-flex ax-justify-center\"> </axp-designer-board>\n </ax-content>\n </ax-drawer-container>\n </div>\n <!-- Footer -->\n <div class=\"ax-min-h-10 ax-bg-surface ax-border-t ax-flex ax-items-center\">\n <axp-designer-breadcrumbs class=\"ax-border-default ax-border-t ax-p-2 ax-font-normal\">\n </axp-designer-breadcrumbs>\n </div>\n </div>\n </ax-content>\n <!-- Property Side -->\n <ax-drawer class=\"ax-w-80 ax-border-s\" location=\"end\" mode=\"push\" [collapsed]=\"false\" #pd>\n <ax-content>\n <div class=\"ax-flex ax-flex-row ax-w-full ax-justify-between ax-text-white ax-py-2 ax-px-4 ax-border-b\">\n <div class=\"ax-flex ax-flex-row ax-gap-2 ax-items-center\">\n <i [ngClass]=\"nodeConfig()?.icon\"></i>\n <span class=\"ax-font-semibold\">{{ nodeConfig()?.title }}</span>\n </div>\n </div>\n <axp-widget-property-viewer [widget]=\"service.selectedNode()!\"\n (onChanged)=\"service.update({ values: $event.values, mode: $event.mode })\" class=\"ax-w-1/4\">\n </axp-widget-property-viewer>\n </ax-content>\n </ax-drawer>\n</ax-drawer-container>", styles: [".axp-designer-board{display:block;height:100%;width:100%;overflow:auto;--tw-bg-opacity: 1;background-color:rgba(var(--ax-color-surface),var(--tw-bg-opacity));padding:.75rem}.axp-designer-board.axp-state-design .axp-widget-host{position:relative;display:block;cursor:pointer;padding:.25rem}.axp-designer-board.axp-state-design .axp-widget-host.axp-state-selected{outline-style:solid;outline-width:1px;outline-offset:1px;outline-color:rgba(var(--ax-color-primary-500),1);position:relative}.axp-designer-board.axp-state-design .axp-widget-host.axp-state-hover{outline-style:dashed;outline-width:1px;outline-offset:1px;outline-color:rgba(var(--ax-color-primary-500),1)}.axp-designer-board.axp-state-design .axp-widget-host .axp-widget-overlay{position:absolute;left:0;top:0;right:0;bottom:0;z-index:10;height:100%;width:100%;background:rgba(202,123,123,.39)}@keyframes moveLight{0%{background-position:0% 50%}to{background-position:100% 50%}}\n"] }]
|
|
1140
|
+
}] });
|
|
978
1141
|
|
|
979
1142
|
/**
|
|
980
1143
|
* Generated bundle index. Do not edit.
|