ngx-form-designer 0.0.23
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/README.md +279 -0
- package/convert-legacy-rem-to-sass-function.mjs +198 -0
- package/fesm2022/ngx-form-designer.mjs +33548 -0
- package/fesm2022/ngx-form-designer.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/lib/data/data-catalog.d.ts +46 -0
- package/lib/data/data-provider.d.ts +69 -0
- package/lib/data/data-source-client.d.ts +59 -0
- package/lib/data/data-source-parsers.d.ts +7 -0
- package/lib/data/external-data-source.d.ts +29 -0
- package/lib/data/file-upload-client.d.ts +19 -0
- package/lib/data/http-data-source-client.d.ts +31 -0
- package/lib/data/in-memory-data-catalog.service.d.ts +12 -0
- package/lib/data/runtime-field-data-access-registry.service.d.ts +29 -0
- package/lib/data/runtime-field-data-access.d.ts +32 -0
- package/lib/data/tree-utils.d.ts +28 -0
- package/lib/email-renderer/email-renderer.component.d.ts +21 -0
- package/lib/form-core/event-api-reference.d.ts +8 -0
- package/lib/form-core/form-engine.d.ts +55 -0
- package/lib/form-core/form-event-runner.d.ts +28 -0
- package/lib/form-core/models.d.ts +358 -0
- package/lib/form-core/plugin-metadata.d.ts +10 -0
- package/lib/form-core/rule-evaluation.service.d.ts +18 -0
- package/lib/form-core/schema-factory.d.ts +11 -0
- package/lib/form-core/schema-guard.d.ts +18 -0
- package/lib/form-core/schema-utils.d.ts +9 -0
- package/lib/form-designer/data-panel/data-panel.component.d.ts +101 -0
- package/lib/form-designer/designer-context.service.d.ts +29 -0
- package/lib/form-designer/designer-state.service.d.ts +167 -0
- package/lib/form-designer/dynamic-properties/dynamic-properties.component.d.ts +92 -0
- package/lib/form-designer/events-panel/events-panel.component.d.ts +21 -0
- package/lib/form-designer/events-workspace.component.d.ts +125 -0
- package/lib/form-designer/field-palette.component.d.ts +99 -0
- package/lib/form-designer/form-designer-shell.component.d.ts +81 -0
- package/lib/form-designer/form-preview.component.d.ts +36 -0
- package/lib/form-designer/form-settings-inspector.component.d.ts +15 -0
- package/lib/form-designer/global-data-manager.component.d.ts +32 -0
- package/lib/form-designer/inspector-sections/inspector-advanced-section.component.d.ts +17 -0
- package/lib/form-designer/inspector-sections/inspector-backgrounds-section.component.d.ts +14 -0
- package/lib/form-designer/inspector-sections/inspector-borders-section.component.d.ts +45 -0
- package/lib/form-designer/inspector-sections/inspector-effects-section.component.d.ts +22 -0
- package/lib/form-designer/inspector-sections/inspector-layout-section.component.d.ts +33 -0
- package/lib/form-designer/inspector-sections/inspector-position-section.component.d.ts +28 -0
- package/lib/form-designer/inspector-sections/inspector-size-section.component.d.ts +12 -0
- package/lib/form-designer/inspector-sections/inspector-spacing-section.component.d.ts +13 -0
- package/lib/form-designer/inspector-sections/inspector-typography-section.component.d.ts +31 -0
- package/lib/form-designer/json-form-designer.component.d.ts +17 -0
- package/lib/form-designer/layer-tree/layer-tree.component.d.ts +24 -0
- package/lib/form-designer/layout-canvas.component.d.ts +69 -0
- package/lib/form-designer/page-style.d.ts +2 -0
- package/lib/form-designer/properties-panel.component.d.ts +65 -0
- package/lib/form-designer/rules-editor/query-builder/query-builder.component.d.ts +23 -0
- package/lib/form-designer/rules-editor/rules-panel/rules-panel.component.d.ts +15 -0
- package/lib/form-designer/services/widget-definition-resolver.service.d.ts +38 -0
- package/lib/form-designer/template-library.d.ts +9 -0
- package/lib/form-designer/widget-inspector.component.d.ts +30 -0
- package/lib/form-renderer/form-viewer/form-viewer-readonly.component.d.ts +56 -0
- package/lib/form-renderer/form-viewer/form-viewer.component.d.ts +55 -0
- package/lib/form-renderer/json-form-renderer.component.d.ts +98 -0
- package/lib/form-renderer/layout-node.component.d.ts +94 -0
- package/lib/plugins/core-plugins.d.ts +5 -0
- package/lib/plugins/designer-plugin.d.ts +15 -0
- package/lib/plugins/plugin-context.d.ts +18 -0
- package/lib/plugins/plugin-providers.d.ts +3 -0
- package/lib/plugins/section-definition.d.ts +16 -0
- package/lib/theme/theme.service.d.ts +15 -0
- package/lib/ui/json-schema-editor.component.d.ts +27 -0
- package/lib/ui/monaco-editor.component.d.ts +24 -0
- package/lib/ui/ui-accordion.component.d.ts +11 -0
- package/lib/ui/ui-box-model.component.d.ts +55 -0
- package/lib/ui/ui-color-swatch.component.d.ts +12 -0
- package/lib/ui/ui-dimension.component.d.ts +21 -0
- package/lib/ui/ui-edge-box.component.d.ts +20 -0
- package/lib/ui/ui-field-wrapper.component.d.ts +8 -0
- package/lib/ui/ui-icon.module.d.ts +7 -0
- package/lib/ui/ui-input.component.d.ts +17 -0
- package/lib/ui/ui-range-number.component.d.ts +16 -0
- package/lib/ui/ui-select-icon.component.d.ts +18 -0
- package/lib/ui/ui-tabs.component.d.ts +25 -0
- package/lib/website/website-brick-studio.component.d.ts +67 -0
- package/lib/website/website-designer-shell.component.d.ts +53 -0
- package/lib/website/website-preview-shell.component.d.ts +25 -0
- package/lib/website/website-project.models.d.ts +78 -0
- package/lib/website/website-project.service.d.ts +50 -0
- package/lib/website/website-section-library.d.ts +6 -0
- package/lib/widgets/email-widgets/email-button-widget.component.d.ts +15 -0
- package/lib/widgets/email-widgets/email-heading-widget.component.d.ts +15 -0
- package/lib/widgets/email-widgets/email-text-widget.component.d.ts +13 -0
- package/lib/widgets/email-widgets.d.ts +2 -0
- package/lib/widgets/field-widgets/checkbox/checkbox-widget.component.d.ts +28 -0
- package/lib/widgets/field-widgets/checkbox-group/checkbox-group-widget.component.d.ts +40 -0
- package/lib/widgets/field-widgets/file-upload/file-upload-widget.component.d.ts +45 -0
- package/lib/widgets/field-widgets/radio/radio-widget.component.d.ts +39 -0
- package/lib/widgets/field-widgets/repeatable-group/repeatable-group-widget.component.d.ts +69 -0
- package/lib/widgets/field-widgets/rich-text/rich-text-widget.component.d.ts +17 -0
- package/lib/widgets/field-widgets/search/search-widget.component.d.ts +56 -0
- package/lib/widgets/field-widgets/select/select-widget.component.d.ts +53 -0
- package/lib/widgets/field-widgets/text-field/text-field.component.d.ts +39 -0
- package/lib/widgets/field-widgets/tree-select/tree-select-widget.component.d.ts +47 -0
- package/lib/widgets/page-link-context.d.ts +8 -0
- package/lib/widgets/page-widgets/brick-settings.component.d.ts +23 -0
- package/lib/widgets/page-widgets/brick-widget.component.d.ts +47 -0
- package/lib/widgets/page-widgets/button-link-settings.component.d.ts +23 -0
- package/lib/widgets/page-widgets/button-widget.component.d.ts +21 -0
- package/lib/widgets/page-widgets/heading-widget.component.d.ts +22 -0
- package/lib/widgets/page-widgets/inline-quill-editor.component.d.ts +35 -0
- package/lib/widgets/page-widgets/table-inspector.component.d.ts +17 -0
- package/lib/widgets/page-widgets/table-widget.component.d.ts +36 -0
- package/lib/widgets/page-widgets/text-block-widget.component.d.ts +22 -0
- package/lib/widgets/page-widgets.d.ts +2 -0
- package/lib/widgets/static-widgets/image/image-widget.component.d.ts +20 -0
- package/lib/widgets/style-helpers.d.ts +8 -0
- package/lib/widgets/style-properties.d.ts +28 -0
- package/lib/widgets/style-sections.d.ts +1 -0
- package/lib/widgets/table-widget.d.ts +2 -0
- package/lib/widgets/widget-definition.d.ts +81 -0
- package/lib/widgets/widget-editor-context.d.ts +8 -0
- package/lib/widgets/widget-packs.d.ts +4 -0
- package/lib/widgets/widgets.d.ts +2 -0
- package/package.json +47 -0
- package/public-api.d.ts +73 -0
- package/style-test-bug.scss +2562 -0
- package/tailwind.preset.js +62 -0
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
import { FormSchema, WidgetKind, LayoutNode, WidgetNode, FieldSchema, DesignerFlavor } from '../form-core/models';
|
|
2
|
+
import { WidgetDefinition } from '../widgets/widget-definition';
|
|
3
|
+
import type { DesignerSectionDefinition } from '../plugins/section-definition';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export interface InternalDragData {
|
|
6
|
+
type: 'new-widget' | 'new-section';
|
|
7
|
+
widgetType?: string;
|
|
8
|
+
widgetKind?: WidgetKind;
|
|
9
|
+
widgetId?: string;
|
|
10
|
+
section?: DesignerSectionDefinition;
|
|
11
|
+
}
|
|
12
|
+
interface DragDropEventLike {
|
|
13
|
+
previousContainer: unknown;
|
|
14
|
+
container: unknown;
|
|
15
|
+
previousIndex: number;
|
|
16
|
+
currentIndex: number;
|
|
17
|
+
item: {
|
|
18
|
+
data: unknown;
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
type LayoutIndexEntry = {
|
|
22
|
+
node: LayoutNode;
|
|
23
|
+
parentId: string | null;
|
|
24
|
+
path: string[];
|
|
25
|
+
index: number;
|
|
26
|
+
scopePath: string[];
|
|
27
|
+
rawNodeId: string;
|
|
28
|
+
};
|
|
29
|
+
type LayoutIndex = Record<string, LayoutIndexEntry>;
|
|
30
|
+
export declare class DesignerStateService {
|
|
31
|
+
private readonly widgetDefs;
|
|
32
|
+
readonly activeFlavor: import("@angular/core").WritableSignal<DesignerFlavor>;
|
|
33
|
+
readonly schema: import("@angular/core").WritableSignal<FormSchema>;
|
|
34
|
+
readonly selectedNodeId: import("@angular/core").WritableSignal<string | null>;
|
|
35
|
+
readonly selectedNodeIds: import("@angular/core").WritableSignal<string[]>;
|
|
36
|
+
readonly contextMenu: import("@angular/core").WritableSignal<{
|
|
37
|
+
x: number;
|
|
38
|
+
y: number;
|
|
39
|
+
} | null>;
|
|
40
|
+
readonly activeBreakpoint: import("@angular/core").WritableSignal<"xs" | "sm" | "md" | "lg" | "xl" | "2xl">;
|
|
41
|
+
readonly isPreviewMode: import("@angular/core").WritableSignal<boolean>;
|
|
42
|
+
readonly isLeftPanelCollapsed: import("@angular/core").WritableSignal<boolean>;
|
|
43
|
+
readonly activeDevice: import("@angular/core").Signal<"mobile" | "desktop">;
|
|
44
|
+
readonly activeThemeId: import("@angular/core").WritableSignal<string>;
|
|
45
|
+
readonly isReadOnly: import("@angular/core").WritableSignal<boolean>;
|
|
46
|
+
readonly clipboard: import("@angular/core").WritableSignal<{
|
|
47
|
+
nodes: LayoutNode[];
|
|
48
|
+
fields: FieldSchema[];
|
|
49
|
+
scopePath: string[];
|
|
50
|
+
} | null>;
|
|
51
|
+
private readonly history;
|
|
52
|
+
private readonly historyIndex;
|
|
53
|
+
private readonly historyLength;
|
|
54
|
+
private readonly maxHistory;
|
|
55
|
+
readonly canUndo: import("@angular/core").Signal<boolean>;
|
|
56
|
+
readonly canRedo: import("@angular/core").Signal<boolean>;
|
|
57
|
+
constructor();
|
|
58
|
+
readonly layoutIndex: import("@angular/core").Signal<LayoutIndex>;
|
|
59
|
+
readonly selectedNode: import("@angular/core").Signal<LayoutNode | null>;
|
|
60
|
+
readonly selectedField: import("@angular/core").Signal<FieldSchema | null>;
|
|
61
|
+
updateSchema(schema: FormSchema): void;
|
|
62
|
+
setFlavor(flavor: DesignerFlavor): void;
|
|
63
|
+
setIsReadOnly(readonly: boolean): void;
|
|
64
|
+
toggleLeftPanel(): void;
|
|
65
|
+
undo(): void;
|
|
66
|
+
redo(): void;
|
|
67
|
+
selectNode(id: string | null): void;
|
|
68
|
+
toggleNodeSelection(id: string): void;
|
|
69
|
+
isNodeSelected(nodeId: string): boolean;
|
|
70
|
+
composeScopedNodeId(scopePath: string[], nodeId: string): string;
|
|
71
|
+
getSelectedScopeFields(): FieldSchema[];
|
|
72
|
+
isSelectionInScope(scopePath: string[]): boolean;
|
|
73
|
+
openContextMenu(position: {
|
|
74
|
+
x: number;
|
|
75
|
+
y: number;
|
|
76
|
+
}): void;
|
|
77
|
+
closeContextMenu(): void;
|
|
78
|
+
private setSchema;
|
|
79
|
+
copy(): void;
|
|
80
|
+
cut(): void;
|
|
81
|
+
paste(): void;
|
|
82
|
+
deleteSelected(): void;
|
|
83
|
+
private collectFields;
|
|
84
|
+
private ensureSelectionIsValid;
|
|
85
|
+
private recordHistory;
|
|
86
|
+
private restoreSnapshot;
|
|
87
|
+
findNode(root: LayoutNode, id: string): LayoutNode | null;
|
|
88
|
+
/** Get the path of nodes from root to target (for breadcrumb) */
|
|
89
|
+
getNodePath(nodeId: string): {
|
|
90
|
+
id: string;
|
|
91
|
+
label: string;
|
|
92
|
+
type: string;
|
|
93
|
+
}[];
|
|
94
|
+
private getNodeLabel;
|
|
95
|
+
addFieldWidget(field: FieldSchema, widgetNode: WidgetNode, targetColId: string): void;
|
|
96
|
+
private insertNodeIntoLayout;
|
|
97
|
+
handleDrop(event: DragDropEventLike, targetColId: string): void;
|
|
98
|
+
pushField(widgetDef: WidgetDefinition): void;
|
|
99
|
+
private resolveWidgetDefinition;
|
|
100
|
+
private createFieldFromWidget;
|
|
101
|
+
pushStructure(type: 'row' | '2col'): void;
|
|
102
|
+
/** Remove a column by its id */
|
|
103
|
+
removeColumn(columnId: string): void;
|
|
104
|
+
/** Set preset column layout (e.g., 3,4,6) on a row */
|
|
105
|
+
setPresetLayout(rowId: string, preset: number): void;
|
|
106
|
+
/** Add one or more columns to a row */
|
|
107
|
+
addColumn(rowId: string, count?: number): void;
|
|
108
|
+
/** Move a node up or down within its parent container */
|
|
109
|
+
moveNode(nodeId: string, direction: 'up' | 'down'): void;
|
|
110
|
+
/** Duplicate a node (row, col, or widget) */
|
|
111
|
+
duplicateNode(nodeId: string): void;
|
|
112
|
+
/** Delete a node (row, col, or widget) and associated field if widget */
|
|
113
|
+
deleteNode(nodeId: string): void;
|
|
114
|
+
duplicateField(fieldId: string): void;
|
|
115
|
+
removeField(fieldId: string): void;
|
|
116
|
+
updateField(fieldId: string, updates: Partial<FieldSchema>): void;
|
|
117
|
+
groupSelectedFields(): string | null;
|
|
118
|
+
ungroupSelectedFields(): void;
|
|
119
|
+
canGroupSelectedFields(): boolean;
|
|
120
|
+
canUngroupSelectedFields(): boolean;
|
|
121
|
+
private getSelectedWidgetFields;
|
|
122
|
+
/**
|
|
123
|
+
* Update a specific node's style without cloning the entire tree.
|
|
124
|
+
* Only the path from root to the target node gets new references.
|
|
125
|
+
*/
|
|
126
|
+
updateNodeStyle(nodeId: string, style: Record<string, unknown>): void;
|
|
127
|
+
/**
|
|
128
|
+
* Update a specific node's responsive settings.
|
|
129
|
+
*/
|
|
130
|
+
updateNodeResponsive(nodeId: string, responsive: Record<string, number | undefined>): void;
|
|
131
|
+
/**
|
|
132
|
+
* Immutable tree update - only creates new references along the path to target.
|
|
133
|
+
* Returns the original node if no changes were made (preserves reference equality).
|
|
134
|
+
*/
|
|
135
|
+
private updateNodeInTree;
|
|
136
|
+
private resolveEntry;
|
|
137
|
+
private resolveSchemaAtScope;
|
|
138
|
+
private findFieldByIdInScope;
|
|
139
|
+
private resolveInsertionScopePath;
|
|
140
|
+
private resolveTargetColumnForFieldInsert;
|
|
141
|
+
private findFirstColumn;
|
|
142
|
+
private selectedNodeScopePath;
|
|
143
|
+
private findFieldLocation;
|
|
144
|
+
private sameScope;
|
|
145
|
+
private isScopePrefix;
|
|
146
|
+
private cloneValue;
|
|
147
|
+
private isLayoutNode;
|
|
148
|
+
private detachNode;
|
|
149
|
+
private findWidgetByRefId;
|
|
150
|
+
private findParentCol;
|
|
151
|
+
private removeWidgetByRefId;
|
|
152
|
+
/**
|
|
153
|
+
* Insert a new Row (with default column structure) into a specific Column.
|
|
154
|
+
* Useful for creating nested grids.
|
|
155
|
+
*/
|
|
156
|
+
insertRowInColumn(columnId: string, colCount?: 1 | 2): void;
|
|
157
|
+
/**
|
|
158
|
+
* Wrap an existing widget in a new Row -> Column structure.
|
|
159
|
+
* Replaces the widget's current position with the new Row,
|
|
160
|
+
* and puts the widget inside the new Row's Column.
|
|
161
|
+
*/
|
|
162
|
+
wrapWidgetInRow(widgetId: string): void;
|
|
163
|
+
private findParentAndIndex;
|
|
164
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DesignerStateService, never>;
|
|
165
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<DesignerStateService>;
|
|
166
|
+
}
|
|
167
|
+
export {};
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { EventEmitter, OnChanges, SimpleChanges } from '@angular/core';
|
|
2
|
+
import { PropertySection, PropertyField, PropertyFieldType } from '../../widgets/widget-definition';
|
|
3
|
+
import { FieldSchema } from '../../form-core/models';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class DynamicPropertiesComponent implements OnChanges {
|
|
6
|
+
onPropertyChange?: () => void;
|
|
7
|
+
private readonly designerCtx;
|
|
8
|
+
get properties(): PropertySection[];
|
|
9
|
+
getFieldReferenceCandidates(field: PropertyField): FieldSchema[];
|
|
10
|
+
config: any;
|
|
11
|
+
readOnly: boolean;
|
|
12
|
+
includeSections: string[] | null;
|
|
13
|
+
excludeSections: string[] | null;
|
|
14
|
+
allFields: FieldSchema[];
|
|
15
|
+
configChange: EventEmitter<any>;
|
|
16
|
+
openSections: {
|
|
17
|
+
[key: string]: boolean;
|
|
18
|
+
};
|
|
19
|
+
nameDraft: string;
|
|
20
|
+
nameError: string;
|
|
21
|
+
private nameDraftDirty;
|
|
22
|
+
private lastConfigId;
|
|
23
|
+
private lastConfigName;
|
|
24
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
25
|
+
isSectionOpen(section: PropertySection, index: number): boolean;
|
|
26
|
+
toggleSection(label: string, index: number): void;
|
|
27
|
+
private didSelectedFieldChange;
|
|
28
|
+
private syncOpenSections;
|
|
29
|
+
getValue(key: string): any;
|
|
30
|
+
setValue(key: string, value: any): void;
|
|
31
|
+
isBasicInput(type: PropertyFieldType): boolean;
|
|
32
|
+
isNameField(field: PropertyField): boolean;
|
|
33
|
+
isGroupKeyField(field: PropertyField): boolean;
|
|
34
|
+
onNameDraftChange(value: string): void;
|
|
35
|
+
commitNameField(): void;
|
|
36
|
+
getGroupKeyOptions(): string[];
|
|
37
|
+
getGroupKeyListId(field: PropertyField): string;
|
|
38
|
+
private getNameError;
|
|
39
|
+
private getAllFields;
|
|
40
|
+
private getSafeOptionValue;
|
|
41
|
+
getDimensionPaths(field: PropertyField): [string, string];
|
|
42
|
+
onDimensionChange(field: PropertyField, value: {
|
|
43
|
+
width: any;
|
|
44
|
+
height: any;
|
|
45
|
+
}): void;
|
|
46
|
+
getBoxModelPath(field: PropertyField, key: string): string;
|
|
47
|
+
onBoxModelChange(field: PropertyField, value: {
|
|
48
|
+
marginTop?: any;
|
|
49
|
+
marginRight?: any;
|
|
50
|
+
marginBottom?: any;
|
|
51
|
+
marginLeft?: any;
|
|
52
|
+
paddingTop?: any;
|
|
53
|
+
paddingRight?: any;
|
|
54
|
+
paddingBottom?: any;
|
|
55
|
+
paddingLeft?: any;
|
|
56
|
+
borderWidth?: any;
|
|
57
|
+
width?: any;
|
|
58
|
+
height?: any;
|
|
59
|
+
}): void;
|
|
60
|
+
getEdgePaths(field: PropertyField): {
|
|
61
|
+
top: string;
|
|
62
|
+
right: string;
|
|
63
|
+
bottom: string;
|
|
64
|
+
left: string;
|
|
65
|
+
};
|
|
66
|
+
onEdgeChange(field: PropertyField, value: {
|
|
67
|
+
top: any;
|
|
68
|
+
right: any;
|
|
69
|
+
bottom: any;
|
|
70
|
+
left: any;
|
|
71
|
+
}): void;
|
|
72
|
+
handleFieldChange(): void;
|
|
73
|
+
buildCustomInputs(field: PropertyField): {
|
|
74
|
+
config: any;
|
|
75
|
+
getValue: (path: string) => any;
|
|
76
|
+
setValue: (path: string, value: any) => void;
|
|
77
|
+
onChange: () => void;
|
|
78
|
+
};
|
|
79
|
+
private setValues;
|
|
80
|
+
addOption(path: string): void;
|
|
81
|
+
removeOption(path: string, index: number): void;
|
|
82
|
+
updateOption(path: string, index: number, field: string, value: any): void;
|
|
83
|
+
addValidator(path: string): void;
|
|
84
|
+
removeValidator(path: string, index: number): void;
|
|
85
|
+
updateValidator(path: string, index: number, field: string, value: any): void;
|
|
86
|
+
getValidatorLabel(name: string): string;
|
|
87
|
+
enableConditional(path: string): void;
|
|
88
|
+
disableConditional(path: string): void;
|
|
89
|
+
updateConditional(path: string, field: string, value: any): void;
|
|
90
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DynamicPropertiesComponent, never>;
|
|
91
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DynamicPropertiesComponent, "app-dynamic-properties", never, { "onPropertyChange": { "alias": "onPropertyChange"; "required": false; }; "config": { "alias": "config"; "required": false; }; "readOnly": { "alias": "readOnly"; "required": false; }; "includeSections": { "alias": "includeSections"; "required": false; }; "excludeSections": { "alias": "excludeSections"; "required": false; }; "allFields": { "alias": "allFields"; "required": false; }; }, { "configChange": "configChange"; }, never, never, true, never>;
|
|
92
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { EventEmitter } from '@angular/core';
|
|
2
|
+
import { FieldSchema, WidgetEventBinding, WidgetEventType, WidgetEventAction } from '../../form-core/models';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class EventsPanelComponent {
|
|
5
|
+
config: FieldSchema;
|
|
6
|
+
allFields: FieldSchema[];
|
|
7
|
+
configChange: EventEmitter<FieldSchema>;
|
|
8
|
+
eventTypes: WidgetEventType[];
|
|
9
|
+
get bindings(): WidgetEventBinding[];
|
|
10
|
+
get availableFields(): FieldSchema[];
|
|
11
|
+
addEvent(): void;
|
|
12
|
+
removeEvent(index: number): void;
|
|
13
|
+
addAction(binding: WidgetEventBinding): void;
|
|
14
|
+
removeAction(binding: WidgetEventBinding, index: number): void;
|
|
15
|
+
asSetValue(action: WidgetEventAction): any;
|
|
16
|
+
asLog(action: WidgetEventAction): any;
|
|
17
|
+
emitChange(): void;
|
|
18
|
+
private emitUpdate;
|
|
19
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EventsPanelComponent, never>;
|
|
20
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<EventsPanelComponent, "app-events-panel", never, { "config": { "alias": "config"; "required": false; }; "allFields": { "alias": "allFields"; "required": false; }; }, { "configChange": "configChange"; }, never, never, true, never>;
|
|
21
|
+
}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { DesignerEventApiBrowser, DesignerEventApiDefinition, EventsWorkspaceSavePayload, FieldSchema, FormSchema, WidgetEventAction, WidgetEventActionApi, WidgetEventActionLog, WidgetEventActionSetValue, WidgetEventBinding, WidgetEventType } from '../form-core/models';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
type WorkspaceTab = 'fields' | 'input' | 'output';
|
|
4
|
+
interface WorkspaceFieldItem {
|
|
5
|
+
id: string;
|
|
6
|
+
name: string;
|
|
7
|
+
label: string;
|
|
8
|
+
type: string;
|
|
9
|
+
scopePath: string[];
|
|
10
|
+
scopeLabel: string;
|
|
11
|
+
}
|
|
12
|
+
interface ApiLookupState {
|
|
13
|
+
items: DesignerEventApiDefinition[];
|
|
14
|
+
query: string;
|
|
15
|
+
pageNo: number;
|
|
16
|
+
hasMore: boolean;
|
|
17
|
+
loading: boolean;
|
|
18
|
+
error: string | null;
|
|
19
|
+
requestId: number;
|
|
20
|
+
initialized: boolean;
|
|
21
|
+
}
|
|
22
|
+
interface ApiSchemaState {
|
|
23
|
+
inputSchema?: unknown;
|
|
24
|
+
outputSchema?: unknown;
|
|
25
|
+
loading: boolean;
|
|
26
|
+
error: string | null;
|
|
27
|
+
}
|
|
28
|
+
export declare class EventsWorkspaceComponent {
|
|
29
|
+
readonly schema: import("@angular/core").InputSignal<FormSchema>;
|
|
30
|
+
readonly readOnly: import("@angular/core").InputSignal<boolean>;
|
|
31
|
+
readonly eventApis: import("@angular/core").InputSignal<DesignerEventApiDefinition[]>;
|
|
32
|
+
readonly eventApiBrowser: import("@angular/core").InputSignal<DesignerEventApiBrowser | undefined>;
|
|
33
|
+
readonly schemaChange: import("@angular/core").OutputEmitterRef<FormSchema>;
|
|
34
|
+
readonly eventsSave: import("@angular/core").OutputEmitterRef<EventsWorkspaceSavePayload>;
|
|
35
|
+
readonly draftSchema: import("@angular/core").WritableSignal<FormSchema | null>;
|
|
36
|
+
readonly fieldSearch: import("@angular/core").WritableSignal<string>;
|
|
37
|
+
readonly selectedFieldId: import("@angular/core").WritableSignal<string | null>;
|
|
38
|
+
readonly expandedEventId: import("@angular/core").WritableSignal<string | null>;
|
|
39
|
+
readonly actionTabs: import("@angular/core").WritableSignal<Record<string, WorkspaceTab>>;
|
|
40
|
+
readonly actionFieldQueries: import("@angular/core").WritableSignal<Record<string, string>>;
|
|
41
|
+
readonly apiLookupState: import("@angular/core").WritableSignal<Record<string, ApiLookupState>>;
|
|
42
|
+
readonly apiSchemaState: import("@angular/core").WritableSignal<Record<string, ApiSchemaState>>;
|
|
43
|
+
readonly eventTypes: WidgetEventType[];
|
|
44
|
+
readonly currentSchema: import("@angular/core").Signal<FormSchema>;
|
|
45
|
+
readonly fields: import("@angular/core").Signal<WorkspaceFieldItem[]>;
|
|
46
|
+
readonly filteredFields: import("@angular/core").Signal<WorkspaceFieldItem[]>;
|
|
47
|
+
readonly selectedFieldItem: import("@angular/core").Signal<WorkspaceFieldItem | null>;
|
|
48
|
+
readonly selectedField: import("@angular/core").Signal<FieldSchema | null>;
|
|
49
|
+
readonly selectedFieldEvents: import("@angular/core").Signal<WidgetEventBinding[]>;
|
|
50
|
+
readonly availableTargetFields: import("@angular/core").Signal<WorkspaceFieldItem[]>;
|
|
51
|
+
readonly availableSourceFields: import("@angular/core").Signal<WorkspaceFieldItem[]>;
|
|
52
|
+
constructor();
|
|
53
|
+
selectField(fieldId: string): void;
|
|
54
|
+
addEventBinding(): void;
|
|
55
|
+
removeEventBinding(bindingIndex: number): void;
|
|
56
|
+
updateBindingEnabled(bindingIndex: number, enabled: boolean): void;
|
|
57
|
+
updateBindingType(bindingIndex: number, type: WidgetEventType): void;
|
|
58
|
+
addAction(binding: WidgetEventBinding): void;
|
|
59
|
+
removeAction(bindingIndex: number, actionIndex: number): void;
|
|
60
|
+
setActionType(action: WidgetEventAction, type: WidgetEventAction['type']): void;
|
|
61
|
+
updateActionType(bindingIndex: number, actionIndex: number, type: WidgetEventAction['type']): void;
|
|
62
|
+
patchAction(bindingIndex: number, actionIndex: number, patch: Partial<WidgetEventActionSetValue> | Partial<WidgetEventActionLog> | Partial<WidgetEventActionApi>): void;
|
|
63
|
+
patchApiAction(action: WidgetEventAction, patch: Partial<WidgetEventActionApi>): void;
|
|
64
|
+
getSelectableActionFields(action: WidgetEventAction): WorkspaceFieldItem[];
|
|
65
|
+
actionFieldSearch(action: WidgetEventAction): string;
|
|
66
|
+
setActionFieldSearch(action: WidgetEventAction, query: string): void;
|
|
67
|
+
apiSearchQuery(action: WidgetEventAction): string;
|
|
68
|
+
updateApiSearchQuery(action: WidgetEventAction, query: string): Promise<void>;
|
|
69
|
+
ensureApiOptions(action: WidgetEventAction): void;
|
|
70
|
+
loadMoreApiOptions(action: WidgetEventAction): Promise<void>;
|
|
71
|
+
onApiOptionsScroll(event: Event, action: WidgetEventAction): void;
|
|
72
|
+
getVisibleApiOptions(action: WidgetEventAction): DesignerEventApiDefinition[];
|
|
73
|
+
isApiOptionsLoading(action: WidgetEventAction): boolean;
|
|
74
|
+
apiOptionsError(action: WidgetEventAction): string | null;
|
|
75
|
+
isApiFieldSelected(action: WidgetEventActionApi, fieldId: string): boolean;
|
|
76
|
+
toggleApiSourceField(action: WidgetEventAction, fieldId: string, checked: boolean): void;
|
|
77
|
+
activeActionTab(bindingId: string, actionIndex: number): WorkspaceTab;
|
|
78
|
+
setActionTabForAction(action: WidgetEventAction, tab: WorkspaceTab): void;
|
|
79
|
+
formatApiInputSchema(action: WidgetEventActionApi): string;
|
|
80
|
+
formatApiOutputSchema(action: WidgetEventActionApi): string;
|
|
81
|
+
selectedApiLabel(action: WidgetEventActionApi): string;
|
|
82
|
+
selectedApiReference(action: WidgetEventActionApi): string;
|
|
83
|
+
formatApiOptionReference(api: DesignerEventApiDefinition): string;
|
|
84
|
+
selectApiOption(action: WidgetEventAction, api: DesignerEventApiDefinition): Promise<void>;
|
|
85
|
+
saveEventConfig(): void;
|
|
86
|
+
asSetValue(action: WidgetEventAction): WidgetEventActionSetValue;
|
|
87
|
+
asLog(action: WidgetEventAction): WidgetEventActionLog;
|
|
88
|
+
asApi(action: WidgetEventAction): WidgetEventActionApi;
|
|
89
|
+
trackFieldById(_: number, field: WorkspaceFieldItem): string;
|
|
90
|
+
trackBindingById(_: number, binding: WidgetEventBinding): string;
|
|
91
|
+
trackActionByIndex(index: number): number;
|
|
92
|
+
trackApiOption(_: number, api: DesignerEventApiDefinition): string;
|
|
93
|
+
hasApiAction(binding: WidgetEventBinding): boolean;
|
|
94
|
+
canSelectApiAction(binding: WidgetEventBinding, actionIndex: number): boolean;
|
|
95
|
+
isEventExpanded(bindingId: string): boolean;
|
|
96
|
+
toggleEventExpansion(bindingId: string): void;
|
|
97
|
+
private getFieldsExcludingSelected;
|
|
98
|
+
private updateSelectedEvents;
|
|
99
|
+
private buildActionByType;
|
|
100
|
+
private flattenFields;
|
|
101
|
+
private findFieldById;
|
|
102
|
+
private updateFieldInSchema;
|
|
103
|
+
private collectFieldSnapshots;
|
|
104
|
+
private findActionPath;
|
|
105
|
+
private getActionStorageKey;
|
|
106
|
+
private actionTabKey;
|
|
107
|
+
private loadApiOptions;
|
|
108
|
+
private ensureApiSchema;
|
|
109
|
+
private loadApiSchema;
|
|
110
|
+
private getApiSchemaState;
|
|
111
|
+
private getApiSchemaKey;
|
|
112
|
+
private createApiLookupState;
|
|
113
|
+
private searchStaticEventApis;
|
|
114
|
+
private hasMoreApiResults;
|
|
115
|
+
private resolveStaticApiSchema;
|
|
116
|
+
private findApiDefinition;
|
|
117
|
+
private hydrateApiSchemas;
|
|
118
|
+
private collectApiActionsFromBindings;
|
|
119
|
+
private formatJson;
|
|
120
|
+
private clone;
|
|
121
|
+
private createEventDatasourceId;
|
|
122
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EventsWorkspaceComponent, never>;
|
|
123
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<EventsWorkspaceComponent, "app-events-workspace", never, { "schema": { "alias": "schema"; "required": true; "isSignal": true; }; "readOnly": { "alias": "readOnly"; "required": false; "isSignal": true; }; "eventApis": { "alias": "eventApis"; "required": false; "isSignal": true; }; "eventApiBrowser": { "alias": "eventApiBrowser"; "required": false; "isSignal": true; }; }, { "schemaChange": "schemaChange"; "eventsSave": "eventsSave"; }, never, never, true, never>;
|
|
124
|
+
}
|
|
125
|
+
export {};
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { WidgetDefinition } from '../widgets/widget-definition';
|
|
2
|
+
import { InternalDragData, DesignerStateService } from './designer-state.service';
|
|
3
|
+
import { DesignerSectionDefinition } from '../plugins/section-definition';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
type PaletteTab = 'pages' | 'sections' | 'widgets' | 'layers';
|
|
6
|
+
type SectionsView = 'library' | 'saved' | 'bricks';
|
|
7
|
+
type PalettePage = {
|
|
8
|
+
id: string;
|
|
9
|
+
name: string;
|
|
10
|
+
route: string;
|
|
11
|
+
};
|
|
12
|
+
type PaletteSavedSectionDefinition = {
|
|
13
|
+
id: string;
|
|
14
|
+
name: string;
|
|
15
|
+
description?: string;
|
|
16
|
+
tags?: string[];
|
|
17
|
+
};
|
|
18
|
+
type PaletteBrick = {
|
|
19
|
+
id: string;
|
|
20
|
+
name: string;
|
|
21
|
+
runtime?: 'dom' | 'react';
|
|
22
|
+
defaultProps?: Record<string, unknown>;
|
|
23
|
+
};
|
|
24
|
+
export declare class FieldPaletteComponent {
|
|
25
|
+
private _widgets;
|
|
26
|
+
designerState: DesignerStateService;
|
|
27
|
+
readonly sectionLibrary: import("@angular/core").InputSignal<DesignerSectionDefinition[] | null>;
|
|
28
|
+
readonly sectionInsert: import("@angular/core").OutputEmitterRef<DesignerSectionDefinition>;
|
|
29
|
+
readonly pages: import("@angular/core").InputSignal<PalettePage[] | null>;
|
|
30
|
+
readonly activePageId: import("@angular/core").InputSignal<string | null>;
|
|
31
|
+
readonly canRemovePage: import("@angular/core").InputSignal<boolean>;
|
|
32
|
+
readonly pageAdd: import("@angular/core").OutputEmitterRef<void>;
|
|
33
|
+
readonly pageSelect: import("@angular/core").OutputEmitterRef<string>;
|
|
34
|
+
readonly pageRemove: import("@angular/core").OutputEmitterRef<string>;
|
|
35
|
+
readonly pageRename: import("@angular/core").OutputEmitterRef<{
|
|
36
|
+
id: string;
|
|
37
|
+
name: string;
|
|
38
|
+
}>;
|
|
39
|
+
readonly pageRouteChange: import("@angular/core").OutputEmitterRef<{
|
|
40
|
+
id: string;
|
|
41
|
+
route: string;
|
|
42
|
+
}>;
|
|
43
|
+
readonly savedSections: import("@angular/core").InputSignal<PaletteSavedSectionDefinition[] | null>;
|
|
44
|
+
readonly savedSectionInsert: import("@angular/core").OutputEmitterRef<string>;
|
|
45
|
+
readonly savedSectionRemove: import("@angular/core").OutputEmitterRef<string>;
|
|
46
|
+
readonly savedSectionCreateRequested: import("@angular/core").OutputEmitterRef<{
|
|
47
|
+
name: string;
|
|
48
|
+
}>;
|
|
49
|
+
readonly bricks: import("@angular/core").InputSignal<PaletteBrick[] | null>;
|
|
50
|
+
activeTab: import("@angular/core").WritableSignal<PaletteTab>;
|
|
51
|
+
sectionsView: import("@angular/core").WritableSignal<SectionsView>;
|
|
52
|
+
widgetSearchQuery: import("@angular/core").WritableSignal<string>;
|
|
53
|
+
sectionLibrarySearchQuery: import("@angular/core").WritableSignal<string>;
|
|
54
|
+
savedSectionSearchQuery: import("@angular/core").WritableSignal<string>;
|
|
55
|
+
savedSectionName: import("@angular/core").WritableSignal<string>;
|
|
56
|
+
brickSearchQuery: import("@angular/core").WritableSignal<string>;
|
|
57
|
+
private readonly injectedSections;
|
|
58
|
+
private readonly injectedSectionsFlat;
|
|
59
|
+
allWidgets: import("@angular/core").Signal<WidgetDefinition[]>;
|
|
60
|
+
filteredFields: import("@angular/core").Signal<WidgetDefinition[]>;
|
|
61
|
+
filteredStatic: import("@angular/core").Signal<WidgetDefinition[]>;
|
|
62
|
+
pagesList: import("@angular/core").Signal<PalettePage[]>;
|
|
63
|
+
activePage: import("@angular/core").Signal<PalettePage | null>;
|
|
64
|
+
savedSectionsList: import("@angular/core").Signal<PaletteSavedSectionDefinition[]>;
|
|
65
|
+
filteredSavedSections: import("@angular/core").Signal<PaletteSavedSectionDefinition[]>;
|
|
66
|
+
canSaveSection: import("@angular/core").Signal<boolean>;
|
|
67
|
+
sectionLibraryList: import("@angular/core").Signal<DesignerSectionDefinition[]>;
|
|
68
|
+
filteredSections: import("@angular/core").Signal<DesignerSectionDefinition[]>;
|
|
69
|
+
sectionGroups: import("@angular/core").Signal<{
|
|
70
|
+
label: string;
|
|
71
|
+
items: DesignerSectionDefinition[];
|
|
72
|
+
}[]>;
|
|
73
|
+
bricksList: import("@angular/core").Signal<PaletteBrick[]>;
|
|
74
|
+
showBricks: import("@angular/core").Signal<boolean>;
|
|
75
|
+
sectionViewOptions: import("@angular/core").Signal<SectionsView[]>;
|
|
76
|
+
currentSectionView: import("@angular/core").Signal<SectionsView>;
|
|
77
|
+
filteredBricks: import("@angular/core").Signal<PaletteBrick[]>;
|
|
78
|
+
brickGroups: import("@angular/core").Signal<{
|
|
79
|
+
label: string;
|
|
80
|
+
items: PaletteBrick[];
|
|
81
|
+
}[]>;
|
|
82
|
+
tabOptions: import("@angular/core").Signal<PaletteTab[]>;
|
|
83
|
+
currentTab: import("@angular/core").Signal<PaletteTab>;
|
|
84
|
+
constructor(_widgets: WidgetDefinition[][], designerState: DesignerStateService);
|
|
85
|
+
tabLabel(tab: PaletteTab): string;
|
|
86
|
+
sectionViewLabel(view: SectionsView): string;
|
|
87
|
+
sectionViewCount(view: SectionsView): number;
|
|
88
|
+
addField(widget: WidgetDefinition): void;
|
|
89
|
+
addStructure(type: 'row' | '2col'): void;
|
|
90
|
+
getDragData(widget: WidgetDefinition): InternalDragData;
|
|
91
|
+
getSectionDragData(section: DesignerSectionDefinition): InternalDragData;
|
|
92
|
+
insertSection(section: DesignerSectionDefinition): void;
|
|
93
|
+
insertBrick(brick: PaletteBrick): void;
|
|
94
|
+
requestSaveSection(): void;
|
|
95
|
+
private cloneBrickProps;
|
|
96
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FieldPaletteComponent, never>;
|
|
97
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FieldPaletteComponent, "app-field-palette", never, { "sectionLibrary": { "alias": "sectionLibrary"; "required": false; "isSignal": true; }; "pages": { "alias": "pages"; "required": false; "isSignal": true; }; "activePageId": { "alias": "activePageId"; "required": false; "isSignal": true; }; "canRemovePage": { "alias": "canRemovePage"; "required": false; "isSignal": true; }; "savedSections": { "alias": "savedSections"; "required": false; "isSignal": true; }; "bricks": { "alias": "bricks"; "required": false; "isSignal": true; }; }, { "sectionInsert": "sectionInsert"; "pageAdd": "pageAdd"; "pageSelect": "pageSelect"; "pageRemove": "pageRemove"; "pageRename": "pageRename"; "pageRouteChange": "pageRouteChange"; "savedSectionInsert": "savedSectionInsert"; "savedSectionRemove": "savedSectionRemove"; "savedSectionCreateRequested": "savedSectionCreateRequested"; }, never, never, true, never>;
|
|
98
|
+
}
|
|
99
|
+
export {};
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { EventEmitter, SimpleChanges, OnChanges } from '@angular/core';
|
|
2
|
+
import { FormEngine } from '../form-core/form-engine';
|
|
3
|
+
import { FormSchema, DesignerEventApiBrowser, DesignerEventApiDefinition, DesignerFlavor, EventsWorkspaceSavePayload, WidgetEventApiExecutor } from '../form-core/models';
|
|
4
|
+
import { DesignerStateService } from './designer-state.service';
|
|
5
|
+
import { DesignerTemplateDefinition } from './template-library';
|
|
6
|
+
import { ExternalDataSource } from '../data/external-data-source';
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
export interface FormDesignerShellSchemaMetadata {
|
|
9
|
+
id?: string;
|
|
10
|
+
version?: string;
|
|
11
|
+
title?: string;
|
|
12
|
+
description?: string;
|
|
13
|
+
}
|
|
14
|
+
export declare class FormDesignerShellComponent implements OnChanges {
|
|
15
|
+
protected readonly state: DesignerStateService;
|
|
16
|
+
schema?: FormSchema;
|
|
17
|
+
schemaMetadata?: FormDesignerShellSchemaMetadata;
|
|
18
|
+
flavor: DesignerFlavor;
|
|
19
|
+
flavors: DesignerFlavor[];
|
|
20
|
+
templates: DesignerTemplateDefinition[];
|
|
21
|
+
headerLabel?: string;
|
|
22
|
+
enableTemplateLibrary: boolean;
|
|
23
|
+
enableGlobalDataManager: boolean;
|
|
24
|
+
showEditButton: boolean;
|
|
25
|
+
showSaveButton: boolean;
|
|
26
|
+
showPushButton: boolean;
|
|
27
|
+
showEmailPreview: boolean;
|
|
28
|
+
isReadOnly: boolean;
|
|
29
|
+
dataSources: ExternalDataSource[];
|
|
30
|
+
eventApis: DesignerEventApiDefinition[];
|
|
31
|
+
eventApiBrowser?: DesignerEventApiBrowser;
|
|
32
|
+
eventApiExecutor?: WidgetEventApiExecutor;
|
|
33
|
+
flavorChange: EventEmitter<DesignerFlavor>;
|
|
34
|
+
edit: EventEmitter<FormSchema>;
|
|
35
|
+
save: EventEmitter<FormSchema>;
|
|
36
|
+
push: EventEmitter<FormSchema>;
|
|
37
|
+
eventsSave: EventEmitter<EventsWorkspaceSavePayload>;
|
|
38
|
+
private catalog;
|
|
39
|
+
private managedSourceIds;
|
|
40
|
+
private managedEventSourceIds;
|
|
41
|
+
showGlobalData: boolean;
|
|
42
|
+
showTemplateLibrary: boolean;
|
|
43
|
+
activeWorkspace: 'designer' | 'events';
|
|
44
|
+
selectedTemplateId: string | null;
|
|
45
|
+
pendingTemplate: DesignerTemplateDefinition | null;
|
|
46
|
+
private lastSavedSchemaSnapshot;
|
|
47
|
+
get engine(): FormEngine;
|
|
48
|
+
get filteredTemplates(): DesignerTemplateDefinition[];
|
|
49
|
+
get selectedTemplate(): DesignerTemplateDefinition | null;
|
|
50
|
+
get resolvedHeaderLabel(): string;
|
|
51
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
52
|
+
private syncDataSources;
|
|
53
|
+
private syncEventDataSources;
|
|
54
|
+
private collectEventDataSources;
|
|
55
|
+
switchFlavor(next: DesignerFlavor): void;
|
|
56
|
+
openLibrary(): void;
|
|
57
|
+
closeLibrary(): void;
|
|
58
|
+
openHomeWorkspace(): void;
|
|
59
|
+
openEventsWorkspace(): void;
|
|
60
|
+
onEventsSchemaChange(schema: FormSchema): void;
|
|
61
|
+
onEventsSave(payload: EventsWorkspaceSavePayload): void;
|
|
62
|
+
selectTemplate(template: DesignerTemplateDefinition): void;
|
|
63
|
+
requestApplyTemplate(template: DesignerTemplateDefinition | null): void;
|
|
64
|
+
confirmApplyTemplate(): void;
|
|
65
|
+
cancelApplyTemplate(): void;
|
|
66
|
+
onEdit(): void;
|
|
67
|
+
onSave(): void;
|
|
68
|
+
onPush(): void;
|
|
69
|
+
trackByTemplateId(_index: number, template: DesignerTemplateDefinition): string;
|
|
70
|
+
trackByFlavor(_index: number, flavor: DesignerFlavor): DesignerFlavor;
|
|
71
|
+
private shouldConfirmReplace;
|
|
72
|
+
private hasUnsavedChanges;
|
|
73
|
+
private serializeSchema;
|
|
74
|
+
private applyTemplate;
|
|
75
|
+
private syncTemplateSelection;
|
|
76
|
+
private createSchemaId;
|
|
77
|
+
private getResolvedExternalSchema;
|
|
78
|
+
private applySchemaMetadata;
|
|
79
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FormDesignerShellComponent, never>;
|
|
80
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FormDesignerShellComponent, "app-form-designer-shell", never, { "schema": { "alias": "schema"; "required": false; }; "schemaMetadata": { "alias": "schemaMetadata"; "required": false; }; "flavor": { "alias": "flavor"; "required": false; }; "flavors": { "alias": "flavors"; "required": false; }; "templates": { "alias": "templates"; "required": false; }; "headerLabel": { "alias": "headerLabel"; "required": false; }; "enableTemplateLibrary": { "alias": "enableTemplateLibrary"; "required": false; }; "enableGlobalDataManager": { "alias": "enableGlobalDataManager"; "required": false; }; "showEditButton": { "alias": "showEditButton"; "required": false; }; "showSaveButton": { "alias": "showSaveButton"; "required": false; }; "showPushButton": { "alias": "showPushButton"; "required": false; }; "showEmailPreview": { "alias": "showEmailPreview"; "required": false; }; "isReadOnly": { "alias": "isReadOnly"; "required": false; }; "dataSources": { "alias": "dataSources"; "required": false; }; "eventApis": { "alias": "eventApis"; "required": false; }; "eventApiBrowser": { "alias": "eventApiBrowser"; "required": false; }; "eventApiExecutor": { "alias": "eventApiExecutor"; "required": false; }; }, { "flavorChange": "flavorChange"; "edit": "edit"; "save": "save"; "push": "push"; "eventsSave": "eventsSave"; }, never, never, true, never>;
|
|
81
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { DesignerStateService } from './designer-state.service';
|
|
2
|
+
import { type FieldDataAccessMap, type RuntimeFieldDataAccessApi } from '../data/runtime-field-data-access-registry.service';
|
|
3
|
+
import { DesignerEventApiDefinition, WidgetEventApiExecutor } from '../form-core/models';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class FormPreviewComponent {
|
|
6
|
+
state: DesignerStateService;
|
|
7
|
+
eventApis: DesignerEventApiDefinition[];
|
|
8
|
+
eventApiExecutor?: WidgetEventApiExecutor;
|
|
9
|
+
fieldDataAccessMap?: FieldDataAccessMap;
|
|
10
|
+
fieldDataAccessApi?: RuntimeFieldDataAccessApi;
|
|
11
|
+
formContentId?: string;
|
|
12
|
+
formContentVersion?: string;
|
|
13
|
+
breakpoints: readonly ["xs", "sm", "md", "lg", "xl", "2xl"];
|
|
14
|
+
breakpoint: import("@angular/core").WritableSignal<"xs" | "sm" | "md" | "lg" | "xl" | "2xl">;
|
|
15
|
+
activeDevice: import("@angular/core").Signal<"mobile" | "desktop">;
|
|
16
|
+
formData: any;
|
|
17
|
+
combinedFormData: any;
|
|
18
|
+
constructor(state: DesignerStateService);
|
|
19
|
+
setBreakpoint(bp: any): void;
|
|
20
|
+
getContainerWidth(): "100%" | "375px" | "576px" | "768px" | "992px" | "1200px" | "1400px";
|
|
21
|
+
getPageStyle(): Record<string, any>;
|
|
22
|
+
close(): void;
|
|
23
|
+
updateData(data: any): void;
|
|
24
|
+
updateCombinedData(data: any): void;
|
|
25
|
+
previewData(): unknown;
|
|
26
|
+
copyData(): void;
|
|
27
|
+
private sanitizePreviewData;
|
|
28
|
+
private isObjectRecord;
|
|
29
|
+
private shouldHideFileData;
|
|
30
|
+
private isFileFieldRecord;
|
|
31
|
+
private isBytePayload;
|
|
32
|
+
private isBase64Payload;
|
|
33
|
+
private isLikelyBase64;
|
|
34
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FormPreviewComponent, never>;
|
|
35
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FormPreviewComponent, "app-form-preview", never, { "eventApis": { "alias": "eventApis"; "required": false; }; "eventApiExecutor": { "alias": "eventApiExecutor"; "required": false; }; "fieldDataAccessMap": { "alias": "fieldDataAccessMap"; "required": false; }; "fieldDataAccessApi": { "alias": "fieldDataAccessApi"; "required": false; }; "formContentId": { "alias": "formContentId"; "required": false; }; "formContentVersion": { "alias": "formContentVersion"; "required": false; }; }, {}, never, never, true, never>;
|
|
36
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { FormSchema, StyleTokenSet } from '../form-core/models';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class FormSettingsInspectorComponent {
|
|
4
|
+
readonly schema: import("@angular/core").InputSignal<FormSchema>;
|
|
5
|
+
readonly readOnly: import("@angular/core").InputSignal<boolean>;
|
|
6
|
+
readonly settingsChange: import("@angular/core").OutputEmitterRef<Record<string, any>>;
|
|
7
|
+
readonly styleChange: import("@angular/core").OutputEmitterRef<Partial<StyleTokenSet>>;
|
|
8
|
+
readonly tabs: string[];
|
|
9
|
+
activeTab: import("@angular/core").WritableSignal<string>;
|
|
10
|
+
currentStyle: import("@angular/core").Signal<StyleTokenSet>;
|
|
11
|
+
updateSettings(key: string, value: any): void;
|
|
12
|
+
onStyleChange(style: Partial<StyleTokenSet>): void;
|
|
13
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FormSettingsInspectorComponent, never>;
|
|
14
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FormSettingsInspectorComponent, "form-settings-inspector", never, { "schema": { "alias": "schema"; "required": true; "isSignal": true; }; "readOnly": { "alias": "readOnly"; "required": false; "isSignal": true; }; }, { "settingsChange": "settingsChange"; "styleChange": "styleChange"; }, never, never, true, never>;
|
|
15
|
+
}
|