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.
Files changed (123) hide show
  1. package/README.md +279 -0
  2. package/convert-legacy-rem-to-sass-function.mjs +198 -0
  3. package/fesm2022/ngx-form-designer.mjs +33548 -0
  4. package/fesm2022/ngx-form-designer.mjs.map +1 -0
  5. package/index.d.ts +5 -0
  6. package/lib/data/data-catalog.d.ts +46 -0
  7. package/lib/data/data-provider.d.ts +69 -0
  8. package/lib/data/data-source-client.d.ts +59 -0
  9. package/lib/data/data-source-parsers.d.ts +7 -0
  10. package/lib/data/external-data-source.d.ts +29 -0
  11. package/lib/data/file-upload-client.d.ts +19 -0
  12. package/lib/data/http-data-source-client.d.ts +31 -0
  13. package/lib/data/in-memory-data-catalog.service.d.ts +12 -0
  14. package/lib/data/runtime-field-data-access-registry.service.d.ts +29 -0
  15. package/lib/data/runtime-field-data-access.d.ts +32 -0
  16. package/lib/data/tree-utils.d.ts +28 -0
  17. package/lib/email-renderer/email-renderer.component.d.ts +21 -0
  18. package/lib/form-core/event-api-reference.d.ts +8 -0
  19. package/lib/form-core/form-engine.d.ts +55 -0
  20. package/lib/form-core/form-event-runner.d.ts +28 -0
  21. package/lib/form-core/models.d.ts +358 -0
  22. package/lib/form-core/plugin-metadata.d.ts +10 -0
  23. package/lib/form-core/rule-evaluation.service.d.ts +18 -0
  24. package/lib/form-core/schema-factory.d.ts +11 -0
  25. package/lib/form-core/schema-guard.d.ts +18 -0
  26. package/lib/form-core/schema-utils.d.ts +9 -0
  27. package/lib/form-designer/data-panel/data-panel.component.d.ts +101 -0
  28. package/lib/form-designer/designer-context.service.d.ts +29 -0
  29. package/lib/form-designer/designer-state.service.d.ts +167 -0
  30. package/lib/form-designer/dynamic-properties/dynamic-properties.component.d.ts +92 -0
  31. package/lib/form-designer/events-panel/events-panel.component.d.ts +21 -0
  32. package/lib/form-designer/events-workspace.component.d.ts +125 -0
  33. package/lib/form-designer/field-palette.component.d.ts +99 -0
  34. package/lib/form-designer/form-designer-shell.component.d.ts +81 -0
  35. package/lib/form-designer/form-preview.component.d.ts +36 -0
  36. package/lib/form-designer/form-settings-inspector.component.d.ts +15 -0
  37. package/lib/form-designer/global-data-manager.component.d.ts +32 -0
  38. package/lib/form-designer/inspector-sections/inspector-advanced-section.component.d.ts +17 -0
  39. package/lib/form-designer/inspector-sections/inspector-backgrounds-section.component.d.ts +14 -0
  40. package/lib/form-designer/inspector-sections/inspector-borders-section.component.d.ts +45 -0
  41. package/lib/form-designer/inspector-sections/inspector-effects-section.component.d.ts +22 -0
  42. package/lib/form-designer/inspector-sections/inspector-layout-section.component.d.ts +33 -0
  43. package/lib/form-designer/inspector-sections/inspector-position-section.component.d.ts +28 -0
  44. package/lib/form-designer/inspector-sections/inspector-size-section.component.d.ts +12 -0
  45. package/lib/form-designer/inspector-sections/inspector-spacing-section.component.d.ts +13 -0
  46. package/lib/form-designer/inspector-sections/inspector-typography-section.component.d.ts +31 -0
  47. package/lib/form-designer/json-form-designer.component.d.ts +17 -0
  48. package/lib/form-designer/layer-tree/layer-tree.component.d.ts +24 -0
  49. package/lib/form-designer/layout-canvas.component.d.ts +69 -0
  50. package/lib/form-designer/page-style.d.ts +2 -0
  51. package/lib/form-designer/properties-panel.component.d.ts +65 -0
  52. package/lib/form-designer/rules-editor/query-builder/query-builder.component.d.ts +23 -0
  53. package/lib/form-designer/rules-editor/rules-panel/rules-panel.component.d.ts +15 -0
  54. package/lib/form-designer/services/widget-definition-resolver.service.d.ts +38 -0
  55. package/lib/form-designer/template-library.d.ts +9 -0
  56. package/lib/form-designer/widget-inspector.component.d.ts +30 -0
  57. package/lib/form-renderer/form-viewer/form-viewer-readonly.component.d.ts +56 -0
  58. package/lib/form-renderer/form-viewer/form-viewer.component.d.ts +55 -0
  59. package/lib/form-renderer/json-form-renderer.component.d.ts +98 -0
  60. package/lib/form-renderer/layout-node.component.d.ts +94 -0
  61. package/lib/plugins/core-plugins.d.ts +5 -0
  62. package/lib/plugins/designer-plugin.d.ts +15 -0
  63. package/lib/plugins/plugin-context.d.ts +18 -0
  64. package/lib/plugins/plugin-providers.d.ts +3 -0
  65. package/lib/plugins/section-definition.d.ts +16 -0
  66. package/lib/theme/theme.service.d.ts +15 -0
  67. package/lib/ui/json-schema-editor.component.d.ts +27 -0
  68. package/lib/ui/monaco-editor.component.d.ts +24 -0
  69. package/lib/ui/ui-accordion.component.d.ts +11 -0
  70. package/lib/ui/ui-box-model.component.d.ts +55 -0
  71. package/lib/ui/ui-color-swatch.component.d.ts +12 -0
  72. package/lib/ui/ui-dimension.component.d.ts +21 -0
  73. package/lib/ui/ui-edge-box.component.d.ts +20 -0
  74. package/lib/ui/ui-field-wrapper.component.d.ts +8 -0
  75. package/lib/ui/ui-icon.module.d.ts +7 -0
  76. package/lib/ui/ui-input.component.d.ts +17 -0
  77. package/lib/ui/ui-range-number.component.d.ts +16 -0
  78. package/lib/ui/ui-select-icon.component.d.ts +18 -0
  79. package/lib/ui/ui-tabs.component.d.ts +25 -0
  80. package/lib/website/website-brick-studio.component.d.ts +67 -0
  81. package/lib/website/website-designer-shell.component.d.ts +53 -0
  82. package/lib/website/website-preview-shell.component.d.ts +25 -0
  83. package/lib/website/website-project.models.d.ts +78 -0
  84. package/lib/website/website-project.service.d.ts +50 -0
  85. package/lib/website/website-section-library.d.ts +6 -0
  86. package/lib/widgets/email-widgets/email-button-widget.component.d.ts +15 -0
  87. package/lib/widgets/email-widgets/email-heading-widget.component.d.ts +15 -0
  88. package/lib/widgets/email-widgets/email-text-widget.component.d.ts +13 -0
  89. package/lib/widgets/email-widgets.d.ts +2 -0
  90. package/lib/widgets/field-widgets/checkbox/checkbox-widget.component.d.ts +28 -0
  91. package/lib/widgets/field-widgets/checkbox-group/checkbox-group-widget.component.d.ts +40 -0
  92. package/lib/widgets/field-widgets/file-upload/file-upload-widget.component.d.ts +45 -0
  93. package/lib/widgets/field-widgets/radio/radio-widget.component.d.ts +39 -0
  94. package/lib/widgets/field-widgets/repeatable-group/repeatable-group-widget.component.d.ts +69 -0
  95. package/lib/widgets/field-widgets/rich-text/rich-text-widget.component.d.ts +17 -0
  96. package/lib/widgets/field-widgets/search/search-widget.component.d.ts +56 -0
  97. package/lib/widgets/field-widgets/select/select-widget.component.d.ts +53 -0
  98. package/lib/widgets/field-widgets/text-field/text-field.component.d.ts +39 -0
  99. package/lib/widgets/field-widgets/tree-select/tree-select-widget.component.d.ts +47 -0
  100. package/lib/widgets/page-link-context.d.ts +8 -0
  101. package/lib/widgets/page-widgets/brick-settings.component.d.ts +23 -0
  102. package/lib/widgets/page-widgets/brick-widget.component.d.ts +47 -0
  103. package/lib/widgets/page-widgets/button-link-settings.component.d.ts +23 -0
  104. package/lib/widgets/page-widgets/button-widget.component.d.ts +21 -0
  105. package/lib/widgets/page-widgets/heading-widget.component.d.ts +22 -0
  106. package/lib/widgets/page-widgets/inline-quill-editor.component.d.ts +35 -0
  107. package/lib/widgets/page-widgets/table-inspector.component.d.ts +17 -0
  108. package/lib/widgets/page-widgets/table-widget.component.d.ts +36 -0
  109. package/lib/widgets/page-widgets/text-block-widget.component.d.ts +22 -0
  110. package/lib/widgets/page-widgets.d.ts +2 -0
  111. package/lib/widgets/static-widgets/image/image-widget.component.d.ts +20 -0
  112. package/lib/widgets/style-helpers.d.ts +8 -0
  113. package/lib/widgets/style-properties.d.ts +28 -0
  114. package/lib/widgets/style-sections.d.ts +1 -0
  115. package/lib/widgets/table-widget.d.ts +2 -0
  116. package/lib/widgets/widget-definition.d.ts +81 -0
  117. package/lib/widgets/widget-editor-context.d.ts +8 -0
  118. package/lib/widgets/widget-packs.d.ts +4 -0
  119. package/lib/widgets/widgets.d.ts +2 -0
  120. package/package.json +47 -0
  121. package/public-api.d.ts +73 -0
  122. package/style-test-bug.scss +2562 -0
  123. package/tailwind.preset.js +62 -0
@@ -0,0 +1,358 @@
1
+ export type FieldType = 'text' | 'textarea' | 'number' | 'email' | 'password' | 'tel' | 'date' | 'time' | 'datetime-local' | 'checkbox' | 'radio' | 'select' | 'multiselect' | 'file' | 'repeatable-group' | 'image' | 'heading' | 'paragraph' | 'cta-button' | 'table' | (string & {});
2
+ export interface Html5ValidationProps {
3
+ required?: boolean;
4
+ min?: number | string;
5
+ max?: number | string;
6
+ step?: number;
7
+ minLength?: number;
8
+ maxLength?: number;
9
+ pattern?: string;
10
+ }
11
+ export interface ValidationRule {
12
+ id?: string;
13
+ type: 'builtin' | 'expression';
14
+ name?: string;
15
+ expression?: string;
16
+ message: string;
17
+ when?: string;
18
+ }
19
+ export type LogicOperator = 'AND' | 'OR';
20
+ export type ConditionOperator = 'eq' | 'neq' | 'gt' | 'lt' | 'gte' | 'lte' | 'contains' | 'startsWith' | 'endsWith' | 'empty' | 'notEmpty' | 'truthy';
21
+ export type RuleAction = 'visible' | 'hidden' | 'enable' | 'disable' | 'required' | 'optional';
22
+ export interface LogicCondition {
23
+ fieldId: string;
24
+ operator: ConditionOperator;
25
+ value?: unknown;
26
+ }
27
+ export interface LogicGroup {
28
+ operator: LogicOperator;
29
+ conditions: (LogicCondition | LogicGroup)[];
30
+ }
31
+ export interface FormRule {
32
+ id: string;
33
+ name?: string;
34
+ conditions: LogicGroup;
35
+ action: RuleAction;
36
+ }
37
+ export interface WidgetStyleSchema {
38
+ width?: string | number;
39
+ height?: string | number;
40
+ minWidth?: string | number;
41
+ minHeight?: string | number;
42
+ maxWidth?: string | number;
43
+ maxHeight?: string | number;
44
+ alignX?: 'left' | 'center' | 'right' | 'stretch';
45
+ alignY?: 'top' | 'middle' | 'bottom' | 'stretch';
46
+ margin?: string;
47
+ marginTop?: string | number;
48
+ marginRight?: string | number;
49
+ marginBottom?: string | number;
50
+ marginLeft?: string | number;
51
+ padding?: string;
52
+ paddingTop?: string | number;
53
+ paddingRight?: string | number;
54
+ paddingBottom?: string | number;
55
+ paddingLeft?: string | number;
56
+ backgroundColor?: string;
57
+ color?: string;
58
+ borderRadius?: string | number;
59
+ borderWidth?: string | number;
60
+ borderColor?: string;
61
+ borderStyle?: 'solid' | 'dashed' | 'dotted' | 'none';
62
+ fontSize?: string | number;
63
+ fontWeight?: string | number;
64
+ lineHeight?: string | number;
65
+ textAlign?: 'left' | 'center' | 'right' | 'justify';
66
+ transformX?: number;
67
+ transformY?: number;
68
+ transformZ?: number;
69
+ rotate?: number;
70
+ scale?: number;
71
+ opacity?: number;
72
+ boxShadow?: string;
73
+ [key: string]: unknown;
74
+ }
75
+ export interface UploadedFileRef {
76
+ id?: string;
77
+ name?: string;
78
+ size?: number;
79
+ type?: string;
80
+ url?: string;
81
+ }
82
+ export type FileUploadValue = UploadedFileRef | UploadedFileRef[] | null;
83
+ export interface RepeatableGroupConfig {
84
+ minItems?: number;
85
+ maxItems?: number;
86
+ itemLabel?: string;
87
+ addButtonLabel?: string;
88
+ removeButtonLabel?: string;
89
+ itemSchema: FormSchema;
90
+ }
91
+ export interface FieldSchema {
92
+ id: string;
93
+ widgetId?: string;
94
+ name: string;
95
+ type: FieldType;
96
+ groupKey?: string;
97
+ label?: string;
98
+ placeholder?: string;
99
+ helpText?: string;
100
+ tooltip?: string;
101
+ defaultValue?: unknown;
102
+ accept?: string;
103
+ multiple?: boolean;
104
+ uploadUrl?: string;
105
+ uploadFieldName?: string;
106
+ repeatable?: RepeatableGroupConfig;
107
+ appearance?: 'outline' | 'fill' | 'standard';
108
+ readonly?: boolean;
109
+ disabled?: boolean;
110
+ prefixIcon?: string;
111
+ suffixIcon?: string;
112
+ html5?: Html5ValidationProps;
113
+ validation?: ValidationRule[];
114
+ dependencies?: DependencyRule[];
115
+ conditionalVisibility?: ConditionalVisibility;
116
+ rules?: FormRule[];
117
+ dataConfig?: DataSourceConfig;
118
+ events?: WidgetEventBinding[];
119
+ dataSourceId?: string;
120
+ staticOptions?: OptionSchema[];
121
+ style?: WidgetStyleSchema;
122
+ metadata?: Record<string, unknown>;
123
+ [key: string]: unknown;
124
+ }
125
+ export interface DataSourceConfig {
126
+ type: 'static' | 'api' | 'context' | 'global' | 'source';
127
+ staticValue?: unknown;
128
+ staticOptions?: OptionSchema[];
129
+ endpoint?: string;
130
+ method?: 'GET' | 'POST';
131
+ headers?: Record<string, string>;
132
+ resultPath?: string;
133
+ labelKey?: string;
134
+ valueKey?: string;
135
+ contextKey?: string;
136
+ datasourceId?: string;
137
+ rowsPath?: string;
138
+ labelPath?: string;
139
+ valuePath?: string;
140
+ rowSelectionMode?: 'first' | 'selected';
141
+ selectionFieldId?: string;
142
+ selectionMatchPath?: string;
143
+ childRowsPath?: string;
144
+ dependsOn?: DataDependencyBinding[];
145
+ filters?: DataFilter[];
146
+ hierarchyAccess?: boolean;
147
+ eventAccess?: boolean;
148
+ eventId?: string;
149
+ treeIdKey?: string;
150
+ treeParentKey?: string;
151
+ treeRootValue?: unknown;
152
+ searchEnabled?: boolean;
153
+ searchColumns?: string[];
154
+ optionsLimit?: number;
155
+ pageSize?: number;
156
+ sort?: {
157
+ column: string;
158
+ dir: 'asc' | 'desc';
159
+ }[];
160
+ }
161
+ export type DataFilterOperator = 'eq' | 'neq' | 'in' | 'contains' | 'startsWith' | 'endsWith' | 'gt' | 'gte' | 'lt' | 'lte' | 'like';
162
+ export interface DataFilter {
163
+ column: string;
164
+ op: DataFilterOperator;
165
+ valueFrom?: 'field' | 'literal';
166
+ fieldId?: string;
167
+ valueLiteral?: unknown;
168
+ }
169
+ export type WidgetEventType = 'focus' | 'blur' | 'change' | 'click' | 'dirty' | 'touched';
170
+ export interface WidgetEventActionSetValue {
171
+ type: 'setValue';
172
+ targetFieldId: string;
173
+ valueFrom: 'literal' | 'field' | 'event';
174
+ valueLiteral?: unknown;
175
+ sourceFieldId?: string;
176
+ }
177
+ export interface WidgetEventActionLog {
178
+ type: 'log';
179
+ message?: string;
180
+ }
181
+ export interface WidgetEventActionApi {
182
+ type: 'api';
183
+ apiId?: string;
184
+ apiName?: string;
185
+ apiVersion?: string;
186
+ datasourceId?: string;
187
+ sourceFieldIds?: string[];
188
+ inputTransformScript?: string;
189
+ outputTransformScript?: string;
190
+ }
191
+ export type WidgetEventAction = WidgetEventActionSetValue | WidgetEventActionLog | WidgetEventActionApi;
192
+ export interface WidgetEventApiExecutionRequest {
193
+ eventId: string;
194
+ action: WidgetEventActionApi;
195
+ event: {
196
+ fieldId: string;
197
+ fieldName?: string;
198
+ type: WidgetEventType;
199
+ value?: unknown;
200
+ ts: number;
201
+ };
202
+ input: unknown;
203
+ sourceValues: Record<string, unknown>;
204
+ formValues: Record<string, unknown>;
205
+ }
206
+ export type WidgetEventApiExecutor = (request: WidgetEventApiExecutionRequest) => Promise<unknown>;
207
+ export interface WidgetEventDatasourceWriteRequest {
208
+ datasourceId: string;
209
+ rows: unknown[];
210
+ action: WidgetEventActionApi;
211
+ event: {
212
+ fieldId: string;
213
+ fieldName?: string;
214
+ type: WidgetEventType;
215
+ value?: unknown;
216
+ ts: number;
217
+ };
218
+ response: unknown;
219
+ }
220
+ export type WidgetEventDatasourceWriter = (request: WidgetEventDatasourceWriteRequest) => void | Promise<void>;
221
+ export interface WidgetEventBinding {
222
+ id: string;
223
+ on: WidgetEventType;
224
+ enabled?: boolean;
225
+ actions: WidgetEventAction[];
226
+ }
227
+ export interface DesignerEventApiDefinition {
228
+ id?: string;
229
+ name?: string;
230
+ version?: string;
231
+ label: string;
232
+ endpoint?: string;
233
+ method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
234
+ description?: string;
235
+ inputSchema?: unknown;
236
+ outputSchema?: unknown;
237
+ }
238
+ export interface DesignerEventApiSearchRequest {
239
+ pageNo: number;
240
+ itemsPerPage: number;
241
+ }
242
+ export interface DesignerEventApiSearchResponse {
243
+ items: DesignerEventApiDefinition[];
244
+ hasMore?: boolean;
245
+ totalItems?: number;
246
+ }
247
+ export interface DesignerEventApiSchemaRequest {
248
+ apiName: string;
249
+ apiVersion?: string;
250
+ apiId?: string;
251
+ }
252
+ export interface DesignerEventApiSchemaResponse {
253
+ inputSchema?: unknown;
254
+ outputSchema?: unknown;
255
+ }
256
+ export interface DesignerEventApiBrowser {
257
+ search(request: DesignerEventApiSearchRequest): Promise<DesignerEventApiSearchResponse>;
258
+ getSchema?(request: DesignerEventApiSchemaRequest): Promise<DesignerEventApiSchemaResponse>;
259
+ }
260
+ export interface EventFieldConfigSnapshot {
261
+ fieldId: string;
262
+ fieldName: string;
263
+ fieldLabel?: string;
264
+ scopePath: string[];
265
+ events: WidgetEventBinding[];
266
+ }
267
+ export interface EventsWorkspaceSavePayload {
268
+ selectedFieldId: string | null;
269
+ selectedFieldEvents: WidgetEventBinding[];
270
+ fields: EventFieldConfigSnapshot[];
271
+ }
272
+ export interface DataDependencyBinding {
273
+ fieldId: string;
274
+ paramKey: string;
275
+ }
276
+ export interface ConditionalVisibility {
277
+ fieldName: string;
278
+ operator: 'equals' | 'notEquals' | 'contains' | 'isEmpty' | 'isNotEmpty' | 'greaterThan' | 'lessThan';
279
+ value?: unknown;
280
+ }
281
+ export interface OptionSchema {
282
+ label: string;
283
+ value: string | number;
284
+ }
285
+ export interface DependencyRule {
286
+ effect: 'show' | 'hide' | 'enable' | 'disable' | 'require' | 'optional';
287
+ when: string;
288
+ }
289
+ export type WidgetKind = 'field' | 'image' | 'text' | 'table' | 'button';
290
+ export interface ResponsiveSpan {
291
+ xs?: number;
292
+ sm?: number;
293
+ md?: number;
294
+ lg?: number;
295
+ xl?: number;
296
+ '2xl'?: number;
297
+ }
298
+ export type LayoutNode = RowNode | ColumnNode | WidgetNode;
299
+ export interface BaseNode {
300
+ id: string;
301
+ type: 'row' | 'col' | 'widget';
302
+ style?: StyleTokenSet;
303
+ parent?: string;
304
+ }
305
+ export interface RowNode extends BaseNode {
306
+ type: 'row';
307
+ children: ColumnNode[];
308
+ maxColumns?: number;
309
+ }
310
+ export interface ColumnNode extends BaseNode {
311
+ type: 'col';
312
+ responsive: ResponsiveSpan;
313
+ children: LayoutNode[];
314
+ }
315
+ export interface WidgetNode extends BaseNode {
316
+ type: 'widget';
317
+ widgetKind: WidgetKind;
318
+ refId: string;
319
+ }
320
+ export type SpacingToken = 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
321
+ export interface StyleTokenSet {
322
+ fontFamily?: string;
323
+ fontSize?: string;
324
+ fontWeight?: string;
325
+ textAlign?: 'left' | 'center' | 'right';
326
+ padding?: SpacingToken | string;
327
+ margin?: SpacingToken | string;
328
+ borderRadius?: string;
329
+ borderColor?: string;
330
+ backgroundColor?: string;
331
+ minHeight?: string;
332
+ marginBottom?: SpacingToken | string;
333
+ gap?: SpacingToken | string;
334
+ width?: string;
335
+ height?: string;
336
+ [key: string]: unknown;
337
+ }
338
+ export interface FormUIConfig {
339
+ themeId?: string;
340
+ baseStyle?: StyleTokenSet;
341
+ }
342
+ export type DesignerFlavor = 'form' | 'web' | 'email' | 'pdf';
343
+ export declare const CURRENT_SCHEMA_VERSION = "1.0.0";
344
+ export interface FormSchema {
345
+ id: string;
346
+ version: string;
347
+ schemaVersion?: string;
348
+ flavor?: DesignerFlavor;
349
+ title?: string;
350
+ description?: string;
351
+ metadata?: Record<string, unknown>;
352
+ fields: FieldSchema[];
353
+ layout: LayoutNode;
354
+ ui?: FormUIConfig;
355
+ submitButtonText?: string;
356
+ resetButtonText?: string;
357
+ showResetButton?: boolean;
358
+ }
@@ -0,0 +1,10 @@
1
+ import { FormSchema, FieldSchema } from './models';
2
+ /**
3
+ * Helper methodology for plugins to store JSON data on the schema/fields.
4
+ * pluginId should be the same ID used in DesignerPlugin.id and in defineWidget(pluginId, ...).
5
+ * This keeps everything portable and AI-friendly.
6
+ */
7
+ export declare function getPluginSchemaMeta<T = unknown>(schema: FormSchema, pluginId: string): T | undefined;
8
+ export declare function setPluginSchemaMeta<T = unknown>(schema: FormSchema, pluginId: string, value: T): FormSchema;
9
+ export declare function getPluginFieldMeta<T = unknown>(field: FieldSchema, pluginId: string): T | undefined;
10
+ export declare function setPluginFieldMeta<T = unknown>(field: FieldSchema, pluginId: string, value: T): FieldSchema;
@@ -0,0 +1,18 @@
1
+ import { FormRule } from './models';
2
+ import * as i0 from "@angular/core";
3
+ export declare class RuleEvaluationService {
4
+ constructor();
5
+ /**
6
+ * Evaluates a single rule against the current form data.
7
+ * Returns true if the rule's conditions are met.
8
+ */
9
+ evaluateRule(rule: FormRule, formData: Record<string, unknown>): boolean;
10
+ /**
11
+ * Recursively evaluates a LogicGroup (AND/OR).
12
+ */
13
+ private evaluateGroup;
14
+ private evaluateConditionOrGroup;
15
+ private evaluateCondition;
16
+ static ɵfac: i0.ɵɵFactoryDeclaration<RuleEvaluationService, never>;
17
+ static ɵprov: i0.ɵɵInjectableDeclaration<RuleEvaluationService>;
18
+ }
@@ -0,0 +1,11 @@
1
+ import { FormSchema, DesignerFlavor } from './models';
2
+ /**
3
+ * Metadata field is intended for AI/LLM and project-level information (prompts, generation parameters, tags).
4
+ * SchemaVersion will be used for future migrations as more flavors (audio/video/image editors, tables, etc.) are added.
5
+ */
6
+ export declare function createEmptySchema(flavor?: DesignerFlavor, opts?: {
7
+ title?: string;
8
+ id?: string;
9
+ }): FormSchema;
10
+ export declare function serializeSchema(schema: FormSchema): string;
11
+ export declare function parseSchema(json: string): FormSchema;
@@ -0,0 +1,18 @@
1
+ import { FormSchema } from './models';
2
+ export interface SchemaGuardIssue {
3
+ level: 'warn' | 'error';
4
+ message: string;
5
+ fieldId?: string;
6
+ fieldName?: string;
7
+ }
8
+ /**
9
+ * Checks the schema for violations of the "API-Only Source" architecture.
10
+ * This is a read-only check that does not mutate the schema.
11
+ */
12
+ export declare function checkSchemaForApiOnlySources(schema: FormSchema): SchemaGuardIssue[];
13
+ /**
14
+ * Manually sanitizes a schema by removing embedded data from source-backed fields.
15
+ * Returns a deep copy of the modified schema.
16
+ * use this for debugging only.
17
+ */
18
+ export declare function stripEmbeddedSourceData(schema: FormSchema): FormSchema;
@@ -0,0 +1,9 @@
1
+ import { FormSchema } from './models';
2
+ /**
3
+ * Automatically computes and sets `hierarchyAccess` flags
4
+ * on each field's dataConfig based on dependency relationships.
5
+ *
6
+ * Logic:
7
+ * - hierarchyAccess = true if field has dependsOn OR other fields depend on it
8
+ */
9
+ export declare function computeAccessFlags(schema: FormSchema): void;
@@ -0,0 +1,101 @@
1
+ import { EventEmitter, OnChanges, SimpleChanges } from '@angular/core';
2
+ import { FieldSchema, OptionSchema, DataDependencyBinding, DataFilter } from '../../form-core/models';
3
+ import { DataSourceDefinition } from '../../data/data-catalog';
4
+ import { DataSourceColumn } from '../../data/data-source-client';
5
+ import * as i0 from "@angular/core";
6
+ export declare class DataPanelComponent implements OnChanges {
7
+ config: FieldSchema;
8
+ readOnly: boolean;
9
+ dataConsumer: 'value' | 'list' | 'image' | 'none';
10
+ bindingShape: 'scalar' | 'list' | null;
11
+ widgetType: string;
12
+ allFields: FieldSchema[];
13
+ configChange: EventEmitter<FieldSchema>;
14
+ sourceType: 'static' | 'source';
15
+ selectedSourceId?: string;
16
+ showSourceManager: boolean;
17
+ staticOptions: OptionSchema[];
18
+ labelKey?: string;
19
+ valueKey?: string;
20
+ rowsPath?: string;
21
+ rowsPathSuggestion?: string;
22
+ rowSelectionMode: 'first' | 'selected';
23
+ selectionFieldId?: string;
24
+ selectionMatchPath?: string;
25
+ childRowsPath?: string;
26
+ rootPathOptions: string[];
27
+ rowPathOptions: string[];
28
+ staticValue?: any;
29
+ tableColumns: any[];
30
+ tableRows: any[];
31
+ dependencyBindings: DataDependencyBinding[];
32
+ dataFilters: DataFilter[];
33
+ availableSources: DataSourceDefinition[];
34
+ sourceColumns: DataSourceColumn[];
35
+ previewLoading: boolean;
36
+ previewError: string | null;
37
+ previewRows: unknown[];
38
+ previewTotal: number;
39
+ private previewReqId;
40
+ private client;
41
+ constructor();
42
+ searchEnabled: boolean;
43
+ optionsLimit?: number;
44
+ searchColumns: string[];
45
+ treeIdKey?: string;
46
+ treeParentKey?: string;
47
+ treeRootValue?: string;
48
+ ngOnChanges(changes: SimpleChanges): Promise<void>;
49
+ refreshSources(): Promise<void>;
50
+ openSourceManager(): void;
51
+ closeSourceManager(): void;
52
+ get availableFields(): FieldSchema[];
53
+ setSourceType(type: 'static' | 'source'): void;
54
+ addOption(): void;
55
+ removeOption(index: number): void;
56
+ onSourceChange(): void;
57
+ onMappingKeyChange(): void;
58
+ loadSourceInfo(): Promise<void>;
59
+ refreshPreview(): Promise<void>;
60
+ autoMapKeys(): void;
61
+ hasFieldFilters(): boolean;
62
+ updateSearchColumns(value: string): void;
63
+ addTableColumn(): void;
64
+ removeTableColumn(index: number): void;
65
+ addTableRow(): void;
66
+ removeTableRow(index: number): void;
67
+ addDependency(): void;
68
+ removeDependency(index: number): void;
69
+ addFilter(): void;
70
+ removeFilter(index: number): void;
71
+ private resetEditorState;
72
+ loadFromField(): void;
73
+ emitChange(): void;
74
+ generateTableColumns(): Promise<void>;
75
+ pageSize?: number;
76
+ sortColumn?: string;
77
+ sortDir: 'asc' | 'desc';
78
+ toggleSortDir(): void;
79
+ formatSourceLabel(source: DataSourceDefinition & {
80
+ eventAccess?: boolean;
81
+ }): string;
82
+ isSelectedSourceEventBacked(): boolean;
83
+ normalizedRowsPath(): string | undefined;
84
+ effectiveRowsPath(): string | undefined;
85
+ useSuggestedRowsPath(): void;
86
+ showRowsPathControls(): boolean;
87
+ showScalarMappingControls(): boolean;
88
+ rowsPathPreviewRows(): unknown[];
89
+ getPreviewLabel(row: any): string;
90
+ getPreviewValue(row: any): string;
91
+ availableRootPaths(): string[];
92
+ availableRowPaths(): string[];
93
+ availableParentRowPaths(): string[];
94
+ availableChildCollectionPaths(): string[];
95
+ private shouldPersistStructuredLabelPath;
96
+ private shouldPersistStructuredValuePath;
97
+ private updatePreviewPathState;
98
+ private extractPreviewRows;
99
+ static ɵfac: i0.ɵɵFactoryDeclaration<DataPanelComponent, never>;
100
+ static ɵcmp: i0.ɵɵComponentDeclaration<DataPanelComponent, "app-data-panel", never, { "config": { "alias": "config"; "required": false; }; "readOnly": { "alias": "readOnly"; "required": false; }; "dataConsumer": { "alias": "dataConsumer"; "required": false; }; "bindingShape": { "alias": "bindingShape"; "required": false; }; "widgetType": { "alias": "widgetType"; "required": false; }; "allFields": { "alias": "allFields"; "required": false; }; }, { "configChange": "configChange"; }, never, never, true, never>;
101
+ }
@@ -0,0 +1,29 @@
1
+ import { Signal } from '@angular/core';
2
+ import { FormSchema, FieldSchema } from '../form-core/models';
3
+ import { WidgetDefinition } from '../widgets/widget-definition';
4
+ import { DesignerPlugin } from '../plugins/designer-plugin';
5
+ import * as i0 from "@angular/core";
6
+ /**
7
+ * Public API for Designer Plugins.
8
+ * Allows plugins to interact with the designer state and discover other plugins.
9
+ */
10
+ export declare class DesignerContext {
11
+ private readonly state;
12
+ private readonly pluginGroups;
13
+ readonly schema: Signal<FormSchema>;
14
+ readonly plugins: Signal<DesignerPlugin[]>;
15
+ getSchema(): FormSchema;
16
+ updateSchema(mutator: (schema: FormSchema) => FormSchema): void;
17
+ getFields(): FieldSchema[];
18
+ getFieldById(id: string): FieldSchema | undefined;
19
+ updateField(id: string, updater: (field: FieldSchema) => FieldSchema): void;
20
+ getPluginSchemaMeta<T = unknown>(pluginId: string): T | undefined;
21
+ setPluginSchemaMeta<T = unknown>(pluginId: string, value: T): void;
22
+ getPluginFieldMeta<T = unknown>(fieldId: string, pluginId: string): T | undefined;
23
+ setPluginFieldMeta<T = unknown>(fieldId: string, pluginId: string, value: T): void;
24
+ getWidgetDefinitionById(id: string): WidgetDefinition | undefined;
25
+ getWidgetDefinitionForField(field: FieldSchema, kind?: string): WidgetDefinition | undefined;
26
+ getWidgetDefinition(type: string): WidgetDefinition | undefined;
27
+ static ɵfac: i0.ɵɵFactoryDeclaration<DesignerContext, never>;
28
+ static ɵprov: i0.ɵɵInjectableDeclaration<DesignerContext>;
29
+ }