commons-shared-web-ui 0.0.50 → 0.0.52
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/commons-shared-web-ui.mjs +14557 -0
- package/fesm2022/commons-shared-web-ui.mjs.map +1 -0
- package/index.d.ts +4534 -0
- package/package.json +34 -53
- package/src/lib/styles/utilities.scss +1 -0
- package/.claude/settings.local.json +0 -10
- package/documentation/alert.md +0 -123
- package/documentation/button-dropdown.md +0 -126
- package/documentation/button.md +0 -184
- package/documentation/cards-usage-guidelines.md +0 -131
- package/documentation/configurable-form.md +0 -605
- package/documentation/confirmation-modal.md +0 -250
- package/documentation/filter-sidebar.md +0 -178
- package/documentation/filter-table-selector.md +0 -228
- package/documentation/form-builder.md +0 -597
- package/documentation/form-components.md +0 -384
- package/documentation/nav.md +0 -427
- package/documentation/pagination.md +0 -181
- package/documentation/side-nav-documentation.md +0 -169
- package/documentation/smart-form.md +0 -2405
- package/documentation/smart-table.md +0 -1221
- package/documentation/snackbar.md +0 -118
- package/documentation/style-externalization.md +0 -88
- package/documentation/summary-card.md +0 -279
- package/ng-package.json +0 -28
- package/src/lib/modules/alert/alert.models.ts +0 -6
- package/src/lib/modules/alert/alert.module.ts +0 -16
- package/src/lib/modules/alert/components/alert/alert.component.html +0 -27
- package/src/lib/modules/alert/components/alert/alert.component.scss +0 -92
- package/src/lib/modules/alert/components/alert/alert.component.ts +0 -81
- package/src/lib/modules/button/button.models.ts +0 -13
- package/src/lib/modules/button/button.module.ts +0 -16
- package/src/lib/modules/button/components/button/button.component.html +0 -22
- package/src/lib/modules/button/components/button/button.component.scss +0 -88
- package/src/lib/modules/button/components/button/button.component.ts +0 -67
- package/src/lib/modules/button-dropdown/button-dropdown.models.ts +0 -26
- package/src/lib/modules/button-dropdown/button-dropdown.module.ts +0 -22
- package/src/lib/modules/button-dropdown/button-dropdown.theme.scss +0 -87
- package/src/lib/modules/button-dropdown/components/button-dropdown/button-dropdown.component.html +0 -41
- package/src/lib/modules/button-dropdown/components/button-dropdown/button-dropdown.component.scss +0 -135
- package/src/lib/modules/button-dropdown/components/button-dropdown/button-dropdown.component.ts +0 -160
- package/src/lib/modules/configurable-form/component/configurable-form.component.html +0 -294
- package/src/lib/modules/configurable-form/component/configurable-form.component.scss +0 -503
- package/src/lib/modules/configurable-form/component/configurable-form.component.ts +0 -628
- package/src/lib/modules/configurable-form/configurable-form.examples.ts +0 -154
- package/src/lib/modules/configurable-form/configurable-form.model.ts +0 -131
- package/src/lib/modules/configurable-form/configurable-form.module.ts +0 -19
- package/src/lib/modules/confirmation-modal/components/confirmation-modal/confirmation-modal.component.html +0 -77
- package/src/lib/modules/confirmation-modal/components/confirmation-modal/confirmation-modal.component.scss +0 -395
- package/src/lib/modules/confirmation-modal/components/confirmation-modal/confirmation-modal.component.ts +0 -266
- package/src/lib/modules/confirmation-modal/confirmation-modal.models.ts +0 -71
- package/src/lib/modules/confirmation-modal/confirmation-modal.module.ts +0 -20
- package/src/lib/modules/filter/components/filter/filter.component.html +0 -131
- package/src/lib/modules/filter/components/filter/filter.component.scss +0 -245
- package/src/lib/modules/filter/components/filter/filter.component.ts +0 -216
- package/src/lib/modules/filter/filter.models.ts +0 -88
- package/src/lib/modules/filter/filter.module.ts +0 -24
- package/src/lib/modules/filter-sidebar/components/filter-sidebar/filter-sidebar.component.html +0 -112
- package/src/lib/modules/filter-sidebar/components/filter-sidebar/filter-sidebar.component.scss +0 -186
- package/src/lib/modules/filter-sidebar/components/filter-sidebar/filter-sidebar.component.ts +0 -163
- package/src/lib/modules/filter-sidebar/filter-sidebar.models.ts +0 -95
- package/src/lib/modules/filter-sidebar/filter-sidebar.module.ts +0 -24
- package/src/lib/modules/filter-table-selector/components/filter-table-selector/filter-table-selector.component.html +0 -73
- package/src/lib/modules/filter-table-selector/components/filter-table-selector/filter-table-selector.component.scss +0 -321
- package/src/lib/modules/filter-table-selector/components/filter-table-selector/filter-table-selector.component.ts +0 -361
- package/src/lib/modules/filter-table-selector/filter-table-selector.models.ts +0 -91
- package/src/lib/modules/filter-table-selector/filter-table-selector.module.ts +0 -22
- package/src/lib/modules/form-builder/components/field-configurator/configurator-config-panel/configurator-config-panel.component.html +0 -63
- package/src/lib/modules/form-builder/components/field-configurator/configurator-config-panel/configurator-config-panel.component.scss +0 -496
- package/src/lib/modules/form-builder/components/field-configurator/configurator-config-panel/configurator-config-panel.component.ts +0 -445
- package/src/lib/modules/form-builder/components/field-configurator/configurator-tree/configurator-tree.component.html +0 -75
- package/src/lib/modules/form-builder/components/field-configurator/configurator-tree/configurator-tree.component.scss +0 -210
- package/src/lib/modules/form-builder/components/field-configurator/configurator-tree/configurator-tree.component.ts +0 -55
- package/src/lib/modules/form-builder/components/field-configurator/field-configurator.component.html +0 -25
- package/src/lib/modules/form-builder/components/field-configurator/field-configurator.component.scss +0 -82
- package/src/lib/modules/form-builder/components/field-configurator/field-configurator.component.ts +0 -95
- package/src/lib/modules/form-builder/components/field-selection/field-selection.component.html +0 -20
- package/src/lib/modules/form-builder/components/field-selection/field-selection.component.scss +0 -37
- package/src/lib/modules/form-builder/components/field-selection/field-selection.component.ts +0 -94
- package/src/lib/modules/form-builder/components/field-selection/group-node/group-node.component.html +0 -46
- package/src/lib/modules/form-builder/components/field-selection/group-node/group-node.component.scss +0 -102
- package/src/lib/modules/form-builder/components/field-selection/group-node/group-node.component.ts +0 -50
- package/src/lib/modules/form-builder/components/field-selection/selection-field-node/selection-field-node.component.html +0 -35
- package/src/lib/modules/form-builder/components/field-selection/selection-field-node/selection-field-node.component.scss +0 -67
- package/src/lib/modules/form-builder/components/field-selection/selection-field-node/selection-field-node.component.ts +0 -34
- package/src/lib/modules/form-builder/components/field-selection/selection-section-node/selection-section-node.component.html +0 -68
- package/src/lib/modules/form-builder/components/field-selection/selection-section-node/selection-section-node.component.scss +0 -113
- package/src/lib/modules/form-builder/components/field-selection/selection-section-node/selection-section-node.component.ts +0 -74
- package/src/lib/modules/form-builder/configs/field-type-schema.map.ts +0 -533
- package/src/lib/modules/form-builder/form-builder.module.ts +0 -36
- package/src/lib/modules/form-builder/index.ts +0 -9
- package/src/lib/modules/form-builder/models/builder.models.ts +0 -7
- package/src/lib/modules/form-builder/models/field-configurator.models.ts +0 -38
- package/src/lib/modules/form-builder/models/field-selection.models.ts +0 -51
- package/src/lib/modules/form-builder/services/field-configurator.service.ts +0 -258
- package/src/lib/modules/form-builder/services/field-selection.service.ts +0 -299
- package/src/lib/modules/form-builder/services/form-schema-tree.service.ts +0 -670
- package/src/lib/modules/form-builder/tokens/builder.tokens.ts +0 -10
- package/src/lib/modules/form-builder/utils/constants.ts +0 -43
- package/src/lib/modules/form-components/components/checkbox/checkbox.component.html +0 -29
- package/src/lib/modules/form-components/components/checkbox/checkbox.component.scss +0 -111
- package/src/lib/modules/form-components/components/checkbox/checkbox.component.ts +0 -207
- package/src/lib/modules/form-components/components/checkbox/checkbox.models.ts +0 -35
- package/src/lib/modules/form-components/components/datepicker/datepicker.component.html +0 -42
- package/src/lib/modules/form-components/components/datepicker/datepicker.component.scss +0 -115
- package/src/lib/modules/form-components/components/datepicker/datepicker.component.ts +0 -267
- package/src/lib/modules/form-components/components/datepicker/datepicker.models.ts +0 -45
- package/src/lib/modules/form-components/components/dropdown/dropdown.component.html +0 -74
- package/src/lib/modules/form-components/components/dropdown/dropdown.component.scss +0 -252
- package/src/lib/modules/form-components/components/dropdown/dropdown.component.ts +0 -377
- package/src/lib/modules/form-components/components/dropdown/dropdown.models.ts +0 -53
- package/src/lib/modules/form-components/components/input/input.component.html +0 -51
- package/src/lib/modules/form-components/components/input/input.component.scss +0 -128
- package/src/lib/modules/form-components/components/input/input.component.ts +0 -250
- package/src/lib/modules/form-components/components/input/input.models.ts +0 -55
- package/src/lib/modules/form-components/components/radio/radio.component.html +0 -22
- package/src/lib/modules/form-components/components/radio/radio.component.scss +0 -107
- package/src/lib/modules/form-components/components/radio/radio.component.ts +0 -181
- package/src/lib/modules/form-components/components/radio/radio.models.ts +0 -39
- package/src/lib/modules/form-components/components/search/search.component.html +0 -15
- package/src/lib/modules/form-components/components/search/search.component.scss +0 -87
- package/src/lib/modules/form-components/components/search/search.component.ts +0 -213
- package/src/lib/modules/form-components/components/search/search.models.ts +0 -40
- package/src/lib/modules/form-components/components/toggle/toggle.component.html +0 -15
- package/src/lib/modules/form-components/components/toggle/toggle.component.scss +0 -81
- package/src/lib/modules/form-components/components/toggle/toggle.component.ts +0 -166
- package/src/lib/modules/form-components/components/toggle/toggle.models.ts +0 -27
- package/src/lib/modules/form-components/directives/click-outside.directive.ts +0 -22
- package/src/lib/modules/form-components/form-components.module.ts +0 -41
- package/src/lib/modules/material/material.module.ts +0 -94
- package/src/lib/modules/nav/components/nav/nav.component.html +0 -34
- package/src/lib/modules/nav/components/nav/nav.component.scss +0 -171
- package/src/lib/modules/nav/components/nav/nav.component.ts +0 -82
- package/src/lib/modules/nav/nav.models.ts +0 -31
- package/src/lib/modules/nav/nav.module.ts +0 -17
- package/src/lib/modules/pagination/components/pagination/pagination.component.html +0 -52
- package/src/lib/modules/pagination/components/pagination/pagination.component.scss +0 -155
- package/src/lib/modules/pagination/components/pagination/pagination.component.ts +0 -109
- package/src/lib/modules/pagination/pagination.module.ts +0 -17
- package/src/lib/modules/side-nav/components/side-nav/side-nav.component.html +0 -56
- package/src/lib/modules/side-nav/components/side-nav/side-nav.component.scss +0 -342
- package/src/lib/modules/side-nav/components/side-nav/side-nav.component.ts +0 -135
- package/src/lib/modules/side-nav/side-nav.models.ts +0 -38
- package/src/lib/modules/side-nav/side-nav.module.ts +0 -16
- package/src/lib/modules/smart-form/components/form-field/form-field.component.html +0 -1196
- package/src/lib/modules/smart-form/components/form-field/form-field.component.scss +0 -2014
- package/src/lib/modules/smart-form/components/form-field/form-field.component.ts +0 -2525
- package/src/lib/modules/smart-form/components/form-section/form-section.component.html +0 -65
- package/src/lib/modules/smart-form/components/form-section/form-section.component.scss +0 -209
- package/src/lib/modules/smart-form/components/form-section/form-section.component.ts +0 -131
- package/src/lib/modules/smart-form/components/smart-form/smart-form.component.html +0 -253
- package/src/lib/modules/smart-form/components/smart-form/smart-form.component.scss +0 -689
- package/src/lib/modules/smart-form/components/smart-form/smart-form.component.ts +0 -1124
- package/src/lib/modules/smart-form/index.ts +0 -10
- package/src/lib/modules/smart-form/models/form-schema.model.ts +0 -733
- package/src/lib/modules/smart-form/models/hierarchy-config.model.ts +0 -21
- package/src/lib/modules/smart-form/services/expression.service.ts +0 -75
- package/src/lib/modules/smart-form/services/smart-form-controller.service.ts +0 -65
- package/src/lib/modules/smart-form/smart-form.examples.ts +0 -1324
- package/src/lib/modules/smart-form/smart-form.module.ts +0 -36
- package/src/lib/modules/smart-form/utils/translation.utils.ts +0 -82
- package/src/lib/modules/smart-form/utils/trusted-url.pipe.ts +0 -25
- package/src/lib/modules/smart-form/utils/validation.utils.ts +0 -98
- package/src/lib/modules/smart-table/components/smart-table/smart-table.component.html +0 -283
- package/src/lib/modules/smart-table/components/smart-table/smart-table.component.scss +0 -685
- package/src/lib/modules/smart-table/components/smart-table/smart-table.component.ts +0 -1128
- package/src/lib/modules/smart-table/models/table-config.model.ts +0 -207
- package/src/lib/modules/smart-table/smart-table.module.ts +0 -30
- package/src/lib/modules/smart-table/utils/safe-html.pipe.ts +0 -28
- package/src/lib/modules/smart-table/utils/smart-table.utils.ts +0 -18
- package/src/lib/modules/snackbar/components/snackbar.component.html +0 -41
- package/src/lib/modules/snackbar/components/snackbar.component.scss +0 -99
- package/src/lib/modules/snackbar/components/snackbar.component.ts +0 -18
- package/src/lib/modules/snackbar/models/snackbar.models.ts +0 -10
- package/src/lib/modules/snackbar/services/snackbar.service.ts +0 -40
- package/src/lib/modules/snackbar/snackbar.module.ts +0 -11
- package/src/lib/modules/summary-card/components/summary-card/summary-card.component.html +0 -47
- package/src/lib/modules/summary-card/components/summary-card/summary-card.component.scss +0 -199
- package/src/lib/modules/summary-card/components/summary-card/summary-card.component.ts +0 -126
- package/src/lib/modules/summary-card/summary-card.module.ts +0 -18
- package/src/lib/shared-ui.module.ts +0 -44
- package/src/lib/utils/constants.ts +0 -11
- package/src/lib/utils/storage.utils.ts +0 -37
- package/src/lib/utils/string.utils.ts +0 -23
- package/src/lib/utils/translation.utils.ts +0 -87
- package/src/public-api.ts +0 -104
- package/tsconfig.lib.json +0 -15
|
@@ -1,533 +0,0 @@
|
|
|
1
|
-
import { FormSchema } from '../../smart-form/models/form-schema.model';
|
|
2
|
-
import { SWITCHABLE_FIELD_TYPES } from '../utils/constants';
|
|
3
|
-
|
|
4
|
-
// ─────────────────────────────────────────────────────────────────────────────
|
|
5
|
-
// SHARED BASE FIELDS (common to ALL field types)
|
|
6
|
-
// These fields come from the core FieldConfig interface.
|
|
7
|
-
// ─────────────────────────────────────────────────────────────────────────────
|
|
8
|
-
|
|
9
|
-
const F = {
|
|
10
|
-
label: { name: 'label', type: 'TEXT_INPUT', label: 'Field Label', required: true, placeholder: 'Enter field label...', colSpan: 12 },
|
|
11
|
-
name: { name: 'name', type: 'TEXT_INPUT', label: 'System Name (name)', placeholder: 'e.g. firstName', colSpan: 6, hint: 'Unique key for the field in payload' },
|
|
12
|
-
colSpan: { name: 'colSpan', type: 'NUMBER_INPUT', label: 'Col Span (1–12)', defaultValue: 12, colSpan: 6, hint: '6 = half width, 12 = full width' },
|
|
13
|
-
placeholder: { name: 'placeholder', type: 'TEXT_INPUT', label: 'Placeholder Text', placeholder: 'e.g. Enter value here...', colSpan: 6 },
|
|
14
|
-
hint: { name: 'hint', type: 'TEXT_INPUT', label: 'Hint (below field)', placeholder: 'Helpful instruction...', colSpan: 6 },
|
|
15
|
-
prefix: { name: 'prefix', type: 'TEXT_INPUT', label: 'Prefix', placeholder: 'e.g. $', colSpan: 6 },
|
|
16
|
-
suffix: { name: 'suffix', type: 'TEXT_INPUT', label: 'Suffix', placeholder: 'e.g. USD', colSpan: 6 },
|
|
17
|
-
defaultValue: { name: 'defaultValue', type: 'TEXT_INPUT', label: 'Default Value', placeholder: 'Pre-filled value', colSpan: 6 },
|
|
18
|
-
payloadPath: { name: 'payloadPath', type: 'TEXT_INPUT', label: 'Payload Path', placeholder: 'e.g. metadata.status.code', colSpan: 6, hint: 'Dot-notation path in API payload' },
|
|
19
|
-
className: { name: 'className', type: 'TEXT_INPUT', label: 'CSS Class', placeholder: 'e.g. custom-class', colSpan: 6 },
|
|
20
|
-
errorMessage: { name: 'errorMessage', type: 'TEXT_INPUT', label: 'Custom Error Message', placeholder: 'e.g. This field is required', colSpan: 12 },
|
|
21
|
-
visibilityExpression: { name: 'visibilityExpression', type: 'TEXT_INPUT', label: 'Visibility Expression', placeholder: 'e.g. data.age > 18', colSpan: 12, hint: 'Show/hide this field conditionally based on other field values' },
|
|
22
|
-
isEnabled: { name: 'isEnabled', type: 'SWITCH', label: 'Is Enabled', colSpan: 6, defaultValue: true },
|
|
23
|
-
required: { name: 'required', type: 'SWITCH', label: 'Required', colSpan: 6 },
|
|
24
|
-
readonly: { name: 'readonly', type: 'SWITCH', label: 'Read Only', colSpan: 6 },
|
|
25
|
-
disabled: { name: 'disabled', type: 'SWITCH', label: 'Disabled', colSpan: 6 },
|
|
26
|
-
type: {
|
|
27
|
-
name: 'type',
|
|
28
|
-
type: 'DROPDOWN',
|
|
29
|
-
label: 'Field Type',
|
|
30
|
-
colSpan: 6,
|
|
31
|
-
subType: 'SINGLE',
|
|
32
|
-
placeholder: 'Select field type',
|
|
33
|
-
optionConfig: { optionList: SWITCHABLE_FIELD_TYPES }
|
|
34
|
-
},
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
// ─────────────────────────────────────────────────────────────────────────────
|
|
38
|
-
// SECTIONS
|
|
39
|
-
// Each section groups related fields for better UX
|
|
40
|
-
// ─────────────────────────────────────────────────────────────────────────────
|
|
41
|
-
|
|
42
|
-
function section(label: string, children: any[]): any {
|
|
43
|
-
return {
|
|
44
|
-
type: 'GROUP',
|
|
45
|
-
label,
|
|
46
|
-
sectionConfig: { label, children }
|
|
47
|
-
};
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
function row(...children: any[]): any {
|
|
51
|
-
return { type: 'ROW', name: 'row-' + children.map(c => c.name).join('-'), children };
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
// ─────────────────────────────────────────────────────────────────────────────
|
|
55
|
-
// COMMON SECTIONS (shared across multiple types)
|
|
56
|
-
// ─────────────────────────────────────────────────────────────────────────────
|
|
57
|
-
|
|
58
|
-
const BASE_SECTION_NO_TYPE = section('Basic Settings', [
|
|
59
|
-
row(F.label, F.name, F.colSpan, F.defaultValue, F.placeholder, F.hint),
|
|
60
|
-
]);
|
|
61
|
-
|
|
62
|
-
const BASE_SECTION = section('Basic Settings', [
|
|
63
|
-
// row(F.name, F.type),
|
|
64
|
-
row(F.label, F.name, F.colSpan, F.defaultValue, F.placeholder, F.hint),
|
|
65
|
-
]);
|
|
66
|
-
|
|
67
|
-
const FLAGS_SECTION = section('Field State', [
|
|
68
|
-
row(F.isEnabled, F.required),
|
|
69
|
-
row(F.readonly, F.disabled),
|
|
70
|
-
]);
|
|
71
|
-
|
|
72
|
-
const ADVANCED_SECTION = section('Advanced', [
|
|
73
|
-
F.visibilityExpression,
|
|
74
|
-
row(F.payloadPath, F.className),
|
|
75
|
-
row(F.prefix, F.suffix),
|
|
76
|
-
F.errorMessage,
|
|
77
|
-
]);
|
|
78
|
-
|
|
79
|
-
// ─────────────────────────────────────────────────────────────────────────────
|
|
80
|
-
// APPLY BUTTON
|
|
81
|
-
// ─────────────────────────────────────────────────────────────────────────────
|
|
82
|
-
|
|
83
|
-
const APPLY_BUTTON: any = {
|
|
84
|
-
actionBarConfig: {
|
|
85
|
-
buttons: [{
|
|
86
|
-
id: 'apply', label: 'Apply Changes', variant: 'primary',
|
|
87
|
-
alignment: 'right', action: { kind: 'emit' }
|
|
88
|
-
}]
|
|
89
|
-
}
|
|
90
|
-
};
|
|
91
|
-
|
|
92
|
-
// ─────────────────────────────────────────────────────────────────────────────
|
|
93
|
-
// SCHEMA BUILDER HELPER
|
|
94
|
-
// ─────────────────────────────────────────────────────────────────────────────
|
|
95
|
-
|
|
96
|
-
function buildSchema(...sections: any[]): FormSchema {
|
|
97
|
-
return {
|
|
98
|
-
entityType: 'FIELD_CONFIG',
|
|
99
|
-
label: 'Field Configuration',
|
|
100
|
-
formType: 'SECTION',
|
|
101
|
-
sectionConfig: { children: sections },
|
|
102
|
-
...APPLY_BUTTON
|
|
103
|
-
} as FormSchema;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
// ─────────────────────────────────────────────────────────────────────────────
|
|
107
|
-
// TYPE-SPECIFIC CONFIG SCHEMAS
|
|
108
|
-
// Based on: FieldConfig interface in form-schema.model.ts
|
|
109
|
-
// ─────────────────────────────────────────────────────────────────────────────
|
|
110
|
-
|
|
111
|
-
export const DEFAULT_FIELD_TYPE_SCHEMA_MAP: Record<string, FormSchema> = {
|
|
112
|
-
|
|
113
|
-
// ── SHORT TEXT (TEXT_INPUT → textConfig: TextConfig) ─────────────────────
|
|
114
|
-
shortText: buildSchema(
|
|
115
|
-
BASE_SECTION,
|
|
116
|
-
section('Text Constraints (textConfig)', [
|
|
117
|
-
row(
|
|
118
|
-
{ name: 'textConfig.length.min', type: 'NUMBER_INPUT', label: 'Min Length', colSpan: 6, hint: 'Minimum number of characters' },
|
|
119
|
-
{ name: 'textConfig.length.max', type: 'NUMBER_INPUT', label: 'Max Length', colSpan: 6, hint: 'Maximum number of characters' },
|
|
120
|
-
),
|
|
121
|
-
{ name: 'textConfig.pattern', type: 'TEXT_INPUT', label: 'Regex Pattern', placeholder: '^[A-Za-z]+$', colSpan: 9 },
|
|
122
|
-
{ name: 'textConfig.patternMessage', type: 'TEXT_INPUT', label: 'Pattern Error Message', placeholder: 'Only letters allowed', colSpan: 9 },
|
|
123
|
-
row(
|
|
124
|
-
{ name: 'textConfig.showCharCount', type: 'SWITCH', label: 'Show Char Count', colSpan: 6 },
|
|
125
|
-
),
|
|
126
|
-
]),
|
|
127
|
-
FLAGS_SECTION,
|
|
128
|
-
ADVANCED_SECTION,
|
|
129
|
-
),
|
|
130
|
-
|
|
131
|
-
// ── PASSWORD (TEXT_INPUT + subType=PASSWORD → textConfig) ────────────────
|
|
132
|
-
password: buildSchema(
|
|
133
|
-
BASE_SECTION,
|
|
134
|
-
section('Password Settings (textConfig)', [
|
|
135
|
-
row(
|
|
136
|
-
{ name: 'textConfig.length.min', type: 'NUMBER_INPUT', label: 'Min Length', colSpan: 6 },
|
|
137
|
-
{ name: 'textConfig.length.max', type: 'NUMBER_INPUT', label: 'Max Length', colSpan: 6 },
|
|
138
|
-
),
|
|
139
|
-
{ name: 'textConfig.matchField', type: 'TEXT_INPUT', label: 'Match with Field', placeholder: 'password', colSpan: 12, hint: 'e.g. for "Confirm Password" field' },
|
|
140
|
-
]),
|
|
141
|
-
FLAGS_SECTION,
|
|
142
|
-
ADVANCED_SECTION,
|
|
143
|
-
),
|
|
144
|
-
|
|
145
|
-
// ── LONG TEXT (TEXT_INPUT + subType=LONG → textConfig) ───────────────────
|
|
146
|
-
longText: buildSchema(
|
|
147
|
-
BASE_SECTION,
|
|
148
|
-
section('Textarea Settings (textConfig)', [
|
|
149
|
-
row(
|
|
150
|
-
{ name: 'textConfig.length.min', type: 'NUMBER_INPUT', label: 'Min Length', colSpan: 6 },
|
|
151
|
-
{ name: 'textConfig.length.max', type: 'NUMBER_INPUT', label: 'Max Length', colSpan: 6 },
|
|
152
|
-
),
|
|
153
|
-
row(
|
|
154
|
-
{ name: 'rows', type: 'NUMBER_INPUT', label: 'Visible Rows', defaultValue: 4, colSpan: 6, hint: 'Height of the textarea' },
|
|
155
|
-
{ name: 'textConfig.showCharCount', type: 'SWITCH', label: 'Show Char Count', colSpan: 6 },
|
|
156
|
-
),
|
|
157
|
-
]),
|
|
158
|
-
FLAGS_SECTION,
|
|
159
|
-
ADVANCED_SECTION,
|
|
160
|
-
),
|
|
161
|
-
|
|
162
|
-
// ── EMAIL (TEXT_INPUT + subType=EMAIL → emailConfig: EmailConfig) ─────────
|
|
163
|
-
email: buildSchema(
|
|
164
|
-
BASE_SECTION,
|
|
165
|
-
section('Email Settings (emailConfig)', [
|
|
166
|
-
{ name: 'emailConfig.defaultDomain', type: 'TEXT_INPUT', label: 'Default Domain', placeholder: 'example.com', colSpan: 6 },
|
|
167
|
-
{ name: 'emailConfig.allowedDomains', type: 'TEXT_INPUT', label: 'Allowed Domains (comma-separated)', placeholder: 'example.com, org.com', colSpan: 12, hint: 'Leave blank to allow all domains' },
|
|
168
|
-
{ name: 'emailConfig.blockedDomains', type: 'TEXT_INPUT', label: 'Blocked Domains (comma-separated)', placeholder: 'spam.com', colSpan: 12 },
|
|
169
|
-
]),
|
|
170
|
-
FLAGS_SECTION,
|
|
171
|
-
ADVANCED_SECTION,
|
|
172
|
-
),
|
|
173
|
-
|
|
174
|
-
// ── PHONE (TEXT_INPUT + subType=PHONE → phoneConfig: PhoneConfig) ─────────
|
|
175
|
-
phone: buildSchema(
|
|
176
|
-
BASE_SECTION,
|
|
177
|
-
section('Phone Settings (phoneConfig)', [
|
|
178
|
-
row(
|
|
179
|
-
{ name: 'phoneConfig.defaultCountryCode', type: 'TEXT_INPUT', label: 'Default Country Code', placeholder: '+91', colSpan: 6 },
|
|
180
|
-
{ name: 'phoneConfig.prefixCountryCode', type: 'SWITCH', label: 'Prefix Country Code', colSpan: 6 },
|
|
181
|
-
),
|
|
182
|
-
{
|
|
183
|
-
name: 'phoneConfig.supportedCountryCodeLocale',
|
|
184
|
-
type: 'TEXT_INPUT', label: 'Supported Country Codes (comma-separated)',
|
|
185
|
-
placeholder: 'IN, US, GB',
|
|
186
|
-
colSpan: 12,
|
|
187
|
-
hint: 'Leave blank to allow all country codes'
|
|
188
|
-
},
|
|
189
|
-
]),
|
|
190
|
-
FLAGS_SECTION,
|
|
191
|
-
ADVANCED_SECTION,
|
|
192
|
-
),
|
|
193
|
-
|
|
194
|
-
// ── NUMBER (NUMBER_INPUT → numberConfig: NumberConfig) ────────────────────
|
|
195
|
-
number: buildSchema(
|
|
196
|
-
BASE_SECTION,
|
|
197
|
-
section('Number Settings (numberConfig)', [
|
|
198
|
-
row(
|
|
199
|
-
{ name: 'numberConfig.min', type: 'NUMBER_INPUT', label: 'Min Value', colSpan: 6 },
|
|
200
|
-
{ name: 'numberConfig.max', type: 'NUMBER_INPUT', label: 'Max Value', colSpan: 6 },
|
|
201
|
-
),
|
|
202
|
-
row(
|
|
203
|
-
{ name: 'numberConfig.step', type: 'NUMBER_INPUT', label: 'Step', colSpan: 6, hint: 'Increment by this amount' },
|
|
204
|
-
{ name: 'numberConfig.precision', type: 'NUMBER_INPUT', label: 'Decimal Precision', colSpan: 6, defaultValue: 0 },
|
|
205
|
-
),
|
|
206
|
-
]),
|
|
207
|
-
FLAGS_SECTION,
|
|
208
|
-
ADVANCED_SECTION,
|
|
209
|
-
),
|
|
210
|
-
|
|
211
|
-
// ── DECIMAL (NUMBER_INPUT + precision → numberConfig) ─────────────────────
|
|
212
|
-
decimal: buildSchema(
|
|
213
|
-
BASE_SECTION,
|
|
214
|
-
section('Decimal Number Settings (numberConfig)', [
|
|
215
|
-
row(
|
|
216
|
-
{ name: 'numberConfig.min', type: 'NUMBER_INPUT', label: 'Min Value', colSpan: 6 },
|
|
217
|
-
{ name: 'numberConfig.max', type: 'NUMBER_INPUT', label: 'Max Value', colSpan: 6 },
|
|
218
|
-
),
|
|
219
|
-
row(
|
|
220
|
-
{ name: 'numberConfig.precision', type: 'NUMBER_INPUT', label: 'Decimal Places', defaultValue: 2, colSpan: 6 },
|
|
221
|
-
{ name: 'numberConfig.step', type: 'NUMBER_INPUT', label: 'Step', defaultValue: 0.01, colSpan: 6 },
|
|
222
|
-
),
|
|
223
|
-
]),
|
|
224
|
-
FLAGS_SECTION,
|
|
225
|
-
ADVANCED_SECTION,
|
|
226
|
-
),
|
|
227
|
-
|
|
228
|
-
// ── DATE (DATE → dateConfig: DateConfig) ─────────────────────────────────
|
|
229
|
-
date: buildSchema(
|
|
230
|
-
BASE_SECTION,
|
|
231
|
-
section('Date Settings (dateConfig)', [
|
|
232
|
-
row(
|
|
233
|
-
{ name: 'dateConfig.minDate', type: 'TEXT_INPUT', label: 'Min Date', placeholder: 'YYYY-MM-DD', colSpan: 6 },
|
|
234
|
-
{ name: 'dateConfig.maxDate', type: 'TEXT_INPUT', label: 'Max Date', placeholder: 'YYYY-MM-DD', colSpan: 6 },
|
|
235
|
-
),
|
|
236
|
-
row(
|
|
237
|
-
{ name: 'dateConfig.allowFuture', type: 'SWITCH', label: 'Allow Future Dates', colSpan: 6 },
|
|
238
|
-
),
|
|
239
|
-
]),
|
|
240
|
-
FLAGS_SECTION,
|
|
241
|
-
ADVANCED_SECTION,
|
|
242
|
-
),
|
|
243
|
-
|
|
244
|
-
// ── TIME ────────────────────────────────────────────────────────────────
|
|
245
|
-
time: buildSchema(
|
|
246
|
-
BASE_SECTION,
|
|
247
|
-
section('Time Settings', [
|
|
248
|
-
row(F.placeholder, F.hint),
|
|
249
|
-
]),
|
|
250
|
-
FLAGS_SECTION,
|
|
251
|
-
ADVANCED_SECTION,
|
|
252
|
-
),
|
|
253
|
-
|
|
254
|
-
// ── DATE & TIME ──────────────────────────────────────────────────────────
|
|
255
|
-
dateTime: buildSchema(
|
|
256
|
-
BASE_SECTION,
|
|
257
|
-
section('Date & Time Settings (dateConfig)', [
|
|
258
|
-
row(
|
|
259
|
-
{ name: 'dateConfig.minDate', type: 'TEXT_INPUT', label: 'Min Date', placeholder: 'YYYY-MM-DD', colSpan: 6 },
|
|
260
|
-
{ name: 'dateConfig.maxDate', type: 'TEXT_INPUT', label: 'Max Date', placeholder: 'YYYY-MM-DD', colSpan: 6 },
|
|
261
|
-
),
|
|
262
|
-
row(
|
|
263
|
-
{ name: 'dateConfig.allowFuture', type: 'SWITCH', label: 'Allow Future', colSpan: 6 },
|
|
264
|
-
),
|
|
265
|
-
]),
|
|
266
|
-
FLAGS_SECTION,
|
|
267
|
-
ADVANCED_SECTION,
|
|
268
|
-
),
|
|
269
|
-
|
|
270
|
-
// ── DROPDOWN (DROPDOWN → optionConfig: OptionConfig) ─────────────────────
|
|
271
|
-
dropdown: buildSchema(
|
|
272
|
-
BASE_SECTION_NO_TYPE,
|
|
273
|
-
section('Dropdown Options (optionConfig)', [
|
|
274
|
-
{
|
|
275
|
-
name: 'optionConfig.optionList',
|
|
276
|
-
type: 'TEXT_INPUT',
|
|
277
|
-
subType: 'LONG',
|
|
278
|
-
label: 'Static Options (JSON)',
|
|
279
|
-
placeholder: '[{"label": "Yes", "code": "Y"}, {"label": "No", "code": "N"}]',
|
|
280
|
-
colSpan: 12,
|
|
281
|
-
hint: 'Paste an array of objects with "label" and "code" keys',
|
|
282
|
-
},
|
|
283
|
-
{ name: 'optionConfig.apiUrl', type: 'TEXT_INPUT', label: 'Options API URL', placeholder: '/api/options', colSpan: 12 },
|
|
284
|
-
row(
|
|
285
|
-
{ name: 'optionConfig.dataPath', type: 'TEXT_INPUT', label: 'Data Path', placeholder: 'data.items', colSpan: 6 },
|
|
286
|
-
{ name: 'optionConfig.labelPath', type: 'TEXT_INPUT', label: 'Label Path', placeholder: 'name', colSpan: 6 },
|
|
287
|
-
),
|
|
288
|
-
row(
|
|
289
|
-
{ name: 'optionConfig.valuePath', type: 'TEXT_INPUT', label: 'Value Path (code)', placeholder: 'code', colSpan: 6 },
|
|
290
|
-
{ name: 'optionConfig.sortBy', type: 'TEXT_INPUT', label: 'Sort By', placeholder: 'name.text', colSpan: 6 },
|
|
291
|
-
),
|
|
292
|
-
row(
|
|
293
|
-
{ name: 'optionConfig.responsePath', type: 'TEXT_INPUT', label: 'Response Path', placeholder: 'e.g. elements', colSpan: 6 },
|
|
294
|
-
{
|
|
295
|
-
name: 'optionConfig.layout',
|
|
296
|
-
type: 'DROPDOWN', subType: 'SINGLE',
|
|
297
|
-
label: 'Options Layout',
|
|
298
|
-
colSpan: 6,
|
|
299
|
-
optionConfig: { optionList: [{ label: 'Row', code: 'row' }, { label: 'Column', code: 'column' }] },
|
|
300
|
-
},
|
|
301
|
-
),
|
|
302
|
-
]),
|
|
303
|
-
FLAGS_SECTION,
|
|
304
|
-
ADVANCED_SECTION,
|
|
305
|
-
),
|
|
306
|
-
|
|
307
|
-
// ── AUTOCOMPLETE (AUTOCOMPLETE → optionConfig) ───────────────────────────
|
|
308
|
-
autocomplete: buildSchema(
|
|
309
|
-
BASE_SECTION,
|
|
310
|
-
section('Autocomplete Settings (optionConfig)', [
|
|
311
|
-
{ name: 'optionConfig.apiUrl', type: 'TEXT_INPUT', label: 'Search API URL', placeholder: '/api/search', colSpan: 12 },
|
|
312
|
-
{ name: 'optionConfig.dataPath', type: 'TEXT_INPUT', label: 'Data Path', placeholder: 'data.items', colSpan: 6 },
|
|
313
|
-
{ name: 'optionConfig.labelPath', type: 'TEXT_INPUT', label: 'Label Path', placeholder: 'name', colSpan: 6 },
|
|
314
|
-
]),
|
|
315
|
-
FLAGS_SECTION,
|
|
316
|
-
ADVANCED_SECTION,
|
|
317
|
-
),
|
|
318
|
-
|
|
319
|
-
// ── MULTI-SELECT (same structure as dropdown) ────────────────────────────
|
|
320
|
-
multiSelect: buildSchema(
|
|
321
|
-
BASE_SECTION_NO_TYPE,
|
|
322
|
-
section('Multi-Select Options (optionConfig)', [
|
|
323
|
-
{
|
|
324
|
-
name: 'optionConfig.optionList',
|
|
325
|
-
type: 'TEXT_INPUT',
|
|
326
|
-
subType: 'LONG',
|
|
327
|
-
label: 'Static Options (JSON)',
|
|
328
|
-
placeholder: '[{"label": "Option A", "code": "A"}]',
|
|
329
|
-
colSpan: 12,
|
|
330
|
-
hint: 'Array of objects with "label" and "code" keys',
|
|
331
|
-
},
|
|
332
|
-
{ name: 'optionConfig.apiUrl', type: 'TEXT_INPUT', label: 'Options API URL', placeholder: '/api/options', colSpan: 12 },
|
|
333
|
-
]),
|
|
334
|
-
FLAGS_SECTION,
|
|
335
|
-
ADVANCED_SECTION,
|
|
336
|
-
),
|
|
337
|
-
|
|
338
|
-
// ── CHECKBOX (CHECKBOX → optionConfig for list, no optionConfig for single)
|
|
339
|
-
checkbox: buildSchema(
|
|
340
|
-
BASE_SECTION,
|
|
341
|
-
section('Checkbox List Options (optionConfig)', [
|
|
342
|
-
{
|
|
343
|
-
name: 'optionConfig.optionList',
|
|
344
|
-
type: 'TEXT_INPUT',
|
|
345
|
-
subType: 'LONG',
|
|
346
|
-
label: 'Checkbox Options (JSON) — leave blank for single checkbox',
|
|
347
|
-
placeholder: '[{"label": "Yes", "code": "Y"}]',
|
|
348
|
-
colSpan: 12,
|
|
349
|
-
},
|
|
350
|
-
]),
|
|
351
|
-
FLAGS_SECTION,
|
|
352
|
-
ADVANCED_SECTION,
|
|
353
|
-
),
|
|
354
|
-
|
|
355
|
-
// ── MUTLI-CHECKBOX ───────────────────────────────────────────────────────
|
|
356
|
-
multiCheckbox: buildSchema(
|
|
357
|
-
BASE_SECTION,
|
|
358
|
-
section('Checkbox List Options (optionConfig)', [
|
|
359
|
-
{
|
|
360
|
-
name: 'optionConfig.optionList',
|
|
361
|
-
type: 'TEXT_INPUT',
|
|
362
|
-
subType: 'LONG',
|
|
363
|
-
label: 'Checkbox Options (JSON)',
|
|
364
|
-
placeholder: '[{"label": "Opt A", "code": "A"}]',
|
|
365
|
-
colSpan: 12,
|
|
366
|
-
},
|
|
367
|
-
{ name: 'optionConfig.apiUrl', type: 'TEXT_INPUT', label: 'Options API URL', placeholder: '/api/options', colSpan: 12 },
|
|
368
|
-
]),
|
|
369
|
-
FLAGS_SECTION,
|
|
370
|
-
ADVANCED_SECTION,
|
|
371
|
-
),
|
|
372
|
-
|
|
373
|
-
// ── TOGGLE / SWITCH (SWITCH → no extra config except basics) ─────────────
|
|
374
|
-
toggle: buildSchema(
|
|
375
|
-
section('Basic Settings', [
|
|
376
|
-
row(F.label, F.name),
|
|
377
|
-
row(F.colSpan, F.defaultValue),
|
|
378
|
-
F.hint,
|
|
379
|
-
]),
|
|
380
|
-
FLAGS_SECTION,
|
|
381
|
-
section('Advanced', [
|
|
382
|
-
F.visibilityExpression,
|
|
383
|
-
row(F.payloadPath, F.className),
|
|
384
|
-
F.errorMessage,
|
|
385
|
-
]),
|
|
386
|
-
),
|
|
387
|
-
|
|
388
|
-
// ── CHIPS ────────────────────────────────────────────────────────────────
|
|
389
|
-
chip: buildSchema(
|
|
390
|
-
BASE_SECTION,
|
|
391
|
-
section('Chip Options (optionConfig)', [
|
|
392
|
-
{
|
|
393
|
-
name: 'optionConfig.optionList',
|
|
394
|
-
type: 'TEXT_INPUT',
|
|
395
|
-
subType: 'LONG',
|
|
396
|
-
label: 'Chip Options (JSON)',
|
|
397
|
-
placeholder: '[{"label": "Tag 1", "code": "T1"}]',
|
|
398
|
-
colSpan: 12,
|
|
399
|
-
},
|
|
400
|
-
]),
|
|
401
|
-
FLAGS_SECTION,
|
|
402
|
-
ADVANCED_SECTION,
|
|
403
|
-
),
|
|
404
|
-
|
|
405
|
-
// ── RICH TEXT (RICH_TEXT → richTextConfig: RichTextConfig) ───────────────
|
|
406
|
-
richText: buildSchema(
|
|
407
|
-
BASE_SECTION,
|
|
408
|
-
section('Rich Text Editor Settings (richTextConfig)', [
|
|
409
|
-
row(
|
|
410
|
-
{ name: 'richTextConfig.height', type: 'TEXT_INPUT', label: 'Editor Height', placeholder: '300px', colSpan: 6 },
|
|
411
|
-
{ name: 'richTextConfig.maxLength', type: 'NUMBER_INPUT', label: 'Max Length (chars)', colSpan: 6 },
|
|
412
|
-
),
|
|
413
|
-
row(
|
|
414
|
-
{ name: 'richTextConfig.placeholder', type: 'TEXT_INPUT', label: 'Editor Placeholder', placeholder: 'Enter content here...', colSpan: 6 },
|
|
415
|
-
{ name: 'richTextConfig.showCharCount', type: 'SWITCH', label: 'Show Char Count', colSpan: 6 },
|
|
416
|
-
),
|
|
417
|
-
]),
|
|
418
|
-
FLAGS_SECTION,
|
|
419
|
-
ADVANCED_SECTION,
|
|
420
|
-
),
|
|
421
|
-
|
|
422
|
-
// ── FILE UPLOAD (FILE_UPLOAD → attachmentConfig: AttachmentConfig) ────────
|
|
423
|
-
file: buildSchema(
|
|
424
|
-
BASE_SECTION,
|
|
425
|
-
section('File Upload Settings (attachmentConfig)', [
|
|
426
|
-
row(
|
|
427
|
-
{ name: 'attachmentConfig.multiple', type: 'SWITCH', label: 'Allow Multiple Files', colSpan: 6 },
|
|
428
|
-
{ name: 'attachmentConfig.maxFiles', type: 'NUMBER_INPUT', label: 'Max Files', colSpan: 6, hint: 'Only applies when multiple=true' },
|
|
429
|
-
),
|
|
430
|
-
row(
|
|
431
|
-
{ name: 'attachmentConfig.maxSizeMB', type: 'NUMBER_INPUT', label: 'Max File Size (MB)', colSpan: 6 },
|
|
432
|
-
{ name: 'attachmentConfig.accept', type: 'TEXT_INPUT', label: 'Accepted Types', placeholder: '.pdf,.jpg,image/*', colSpan: 6 },
|
|
433
|
-
),
|
|
434
|
-
{ name: 'attachmentConfig.acceptLabel', type: 'TEXT_INPUT', label: 'Hint in Drop Zone', placeholder: 'JPG, PNG, PDF (max 5 MB)', colSpan: 12 },
|
|
435
|
-
{ name: 'attachmentConfig.uploadUrl', type: 'TEXT_INPUT', label: 'Upload API URL', placeholder: '/api/upload', colSpan: 12 },
|
|
436
|
-
{ name: 'attachmentConfig.deleteUrl', type: 'TEXT_INPUT', label: 'Delete API URL', placeholder: '/api/file/{id}', colSpan: 12 },
|
|
437
|
-
]),
|
|
438
|
-
FLAGS_SECTION,
|
|
439
|
-
ADVANCED_SECTION,
|
|
440
|
-
),
|
|
441
|
-
|
|
442
|
-
// ── RATING (RATING → ratingConfig: RatingConfig) ─────────────────────────
|
|
443
|
-
rating: buildSchema(
|
|
444
|
-
BASE_SECTION,
|
|
445
|
-
section('Rating Settings (ratingConfig)', [
|
|
446
|
-
row(
|
|
447
|
-
{ name: 'ratingConfig.maxRating', type: 'NUMBER_INPUT', label: 'Max Stars', defaultValue: 5, colSpan: 6 },
|
|
448
|
-
{ name: 'ratingConfig.allowHalf', type: 'SWITCH', label: 'Allow Half Stars', colSpan: 6 },
|
|
449
|
-
),
|
|
450
|
-
]),
|
|
451
|
-
FLAGS_SECTION,
|
|
452
|
-
ADVANCED_SECTION,
|
|
453
|
-
),
|
|
454
|
-
|
|
455
|
-
// ── RADIO (RADIO → optionConfig for list) ────────────────────────────────
|
|
456
|
-
radio: buildSchema(
|
|
457
|
-
BASE_SECTION,
|
|
458
|
-
section('Radio Options (optionConfig)', [
|
|
459
|
-
{
|
|
460
|
-
name: 'optionConfig.optionList',
|
|
461
|
-
type: 'TEXT_INPUT',
|
|
462
|
-
subType: 'LONG',
|
|
463
|
-
label: 'Radio Options (JSON)',
|
|
464
|
-
placeholder: '[{"label": "Male", "code": "M"}, {"label": "Female", "code": "F"}]',
|
|
465
|
-
colSpan: 12,
|
|
466
|
-
},
|
|
467
|
-
{ name: 'optionConfig.apiUrl', type: 'TEXT_INPUT', label: 'Options API URL', placeholder: '/api/options', colSpan: 12 },
|
|
468
|
-
]),
|
|
469
|
-
FLAGS_SECTION,
|
|
470
|
-
ADVANCED_SECTION,
|
|
471
|
-
),
|
|
472
|
-
|
|
473
|
-
// ── LOCATION (LOCATION → locationConfig: LocationConfig) ─────────────────
|
|
474
|
-
location: buildSchema(
|
|
475
|
-
BASE_SECTION,
|
|
476
|
-
section('Location Settings (locationConfig)', [
|
|
477
|
-
row(
|
|
478
|
-
{
|
|
479
|
-
name: 'locationConfig.defaultTab',
|
|
480
|
-
type: 'DROPDOWN', subType: 'SINGLE',
|
|
481
|
-
label: 'Default Tab',
|
|
482
|
-
colSpan: 6,
|
|
483
|
-
optionConfig: { optionList: [{ label: 'Venue', code: 'VENUE' }, { label: 'Online', code: 'ONLINE' }, { label: 'TBA', code: 'TBA' }] },
|
|
484
|
-
},
|
|
485
|
-
{ name: 'locationConfig.maxLocations', type: 'NUMBER_INPUT', label: 'Max Locations', colSpan: 6, defaultValue: 5 },
|
|
486
|
-
),
|
|
487
|
-
row(
|
|
488
|
-
{ name: 'locationConfig.allowMulti', type: 'SWITCH', label: 'Allow Multiple Locations', colSpan: 6 },
|
|
489
|
-
{ name: 'locationConfig.showMap', type: 'SWITCH', label: 'Show Map Preview', colSpan: 6 },
|
|
490
|
-
),
|
|
491
|
-
{ name: 'locationConfig.googleMapsApiKey', type: 'TEXT_INPUT', label: 'Google Maps API Key', colSpan: 12 },
|
|
492
|
-
{ name: 'locationConfig.venuePlaceholder', type: 'TEXT_INPUT', label: 'Venue Search Placeholder', colSpan: 6 },
|
|
493
|
-
{ name: 'locationConfig.onlinePlaceholder', type: 'TEXT_INPUT', label: 'Online URL Placeholder', colSpan: 6 },
|
|
494
|
-
]),
|
|
495
|
-
FLAGS_SECTION,
|
|
496
|
-
ADVANCED_SECTION,
|
|
497
|
-
),
|
|
498
|
-
|
|
499
|
-
// ── GENERATED / FORMULA ──────────────────────────────────────────────────
|
|
500
|
-
generated: buildSchema(
|
|
501
|
-
BASE_SECTION,
|
|
502
|
-
section('Formula Settings (generatedConfig)', [
|
|
503
|
-
{
|
|
504
|
-
name: 'generatedConfig.formula',
|
|
505
|
-
type: 'TEXT_INPUT',
|
|
506
|
-
label: 'Formula Expression',
|
|
507
|
-
placeholder: 'data.price * data.quantity',
|
|
508
|
-
colSpan: 12,
|
|
509
|
-
hint: 'Use data.field_name to reference other fields'
|
|
510
|
-
},
|
|
511
|
-
]),
|
|
512
|
-
FLAGS_SECTION,
|
|
513
|
-
ADVANCED_SECTION,
|
|
514
|
-
),
|
|
515
|
-
|
|
516
|
-
// ── GROUP & SECTION ───────────────────────────────────────────────────────
|
|
517
|
-
group: buildSchema(
|
|
518
|
-
section('Group Settings', [
|
|
519
|
-
row(F.label, F.name),
|
|
520
|
-
row(F.colSpan),
|
|
521
|
-
F.isEnabled,
|
|
522
|
-
]),
|
|
523
|
-
ADVANCED_SECTION,
|
|
524
|
-
),
|
|
525
|
-
|
|
526
|
-
section: buildSchema(
|
|
527
|
-
section('Section Settings', [
|
|
528
|
-
row(F.label, F.name),
|
|
529
|
-
F.isEnabled,
|
|
530
|
-
]),
|
|
531
|
-
ADVANCED_SECTION,
|
|
532
|
-
),
|
|
533
|
-
};
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { NgModule } from '@angular/core';
|
|
2
|
-
import { CommonModule } from '@angular/common';
|
|
3
|
-
import { SmartFormModule } from '../smart-form/smart-form.module';
|
|
4
|
-
import { FormComponentsModule } from '../form-components/form-components.module';
|
|
5
|
-
|
|
6
|
-
import { FieldSelectionComponent } from './components/field-selection/field-selection.component';
|
|
7
|
-
import { FieldConfiguratorComponent } from './components/field-configurator/field-configurator.component';
|
|
8
|
-
import { GroupNodeComponent } from './components/field-selection/group-node/group-node.component';
|
|
9
|
-
import { SelectionSectionNodeComponent } from './components/field-selection/selection-section-node/selection-section-node.component';
|
|
10
|
-
import { SelectionFieldNodeComponent } from './components/field-selection/selection-field-node/selection-field-node.component';
|
|
11
|
-
import { ConfiguratorTreeComponent } from './components/field-configurator/configurator-tree/configurator-tree.component';
|
|
12
|
-
import { ConfiguratorConfigPanelComponent } from './components/field-configurator/configurator-config-panel/configurator-config-panel.component';
|
|
13
|
-
|
|
14
|
-
const COMPONENTS = [
|
|
15
|
-
FieldSelectionComponent,
|
|
16
|
-
FieldConfiguratorComponent,
|
|
17
|
-
GroupNodeComponent,
|
|
18
|
-
SelectionSectionNodeComponent,
|
|
19
|
-
SelectionFieldNodeComponent,
|
|
20
|
-
ConfiguratorTreeComponent,
|
|
21
|
-
ConfiguratorConfigPanelComponent,
|
|
22
|
-
];
|
|
23
|
-
|
|
24
|
-
@NgModule({
|
|
25
|
-
declarations: [...COMPONENTS],
|
|
26
|
-
imports: [
|
|
27
|
-
CommonModule,
|
|
28
|
-
SmartFormModule,
|
|
29
|
-
FormComponentsModule,
|
|
30
|
-
],
|
|
31
|
-
exports: [
|
|
32
|
-
FieldSelectionComponent,
|
|
33
|
-
FieldConfiguratorComponent,
|
|
34
|
-
],
|
|
35
|
-
})
|
|
36
|
-
export class FormBuilderModule {}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export * from './form-builder.module';
|
|
2
|
-
export * from './components/field-selection/field-selection.component';
|
|
3
|
-
export * from './components/field-configurator/field-configurator.component';
|
|
4
|
-
export * from './models/builder.models';
|
|
5
|
-
export * from './models/field-selection.models';
|
|
6
|
-
export * from './models/field-configurator.models';
|
|
7
|
-
export * from './services/field-selection.service';
|
|
8
|
-
export * from './services/field-configurator.service';
|
|
9
|
-
export * from './services/form-schema-tree.service';
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { FormSchema } from '../../../modules/smart-form/models/form-schema.model';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Maps a builder field type key to a FormSchema used to generate
|
|
5
|
-
* the configuration panel for that field type.
|
|
6
|
-
*/
|
|
7
|
-
export type FieldTypeSchemaMap = Record<string, FormSchema>;
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { FieldConfig } from '../../smart-form/models/form-schema.model';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Metadata about the currently selected field in the configurator.
|
|
5
|
-
*/
|
|
6
|
-
export interface ConfiguratorFieldInfo {
|
|
7
|
-
/** Reference to the FieldConfig being edited */
|
|
8
|
-
fieldConfig: FieldConfig;
|
|
9
|
-
/** Display label of the parent group */
|
|
10
|
-
groupLabel: string;
|
|
11
|
-
/** Display label of the parent section */
|
|
12
|
-
sectionLabel: string;
|
|
13
|
-
/** Index path used to locate this field inside the FormSchema tree */
|
|
14
|
-
path: number[];
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* A node in the configurator left-panel tree.
|
|
19
|
-
* Represents either a group, section, or field.
|
|
20
|
-
*/
|
|
21
|
-
export type ConfiguratorNodeType = 'group' | 'section' | 'field';
|
|
22
|
-
|
|
23
|
-
export interface ConfiguratorTreeNode {
|
|
24
|
-
/** Unique identifier (name or generated index-based key) */
|
|
25
|
-
id: string;
|
|
26
|
-
/** Node display label */
|
|
27
|
-
label: string;
|
|
28
|
-
/** Node type */
|
|
29
|
-
type: ConfiguratorNodeType;
|
|
30
|
-
/** Whether the node is expanded (for groups/sections) */
|
|
31
|
-
expanded: boolean;
|
|
32
|
-
/** Reference to the FieldConfig (only for field nodes) */
|
|
33
|
-
fieldConfig: FieldConfig | null;
|
|
34
|
-
/** Index path to this node in FormSchema */
|
|
35
|
-
path: number[];
|
|
36
|
-
/** Child nodes */
|
|
37
|
-
children: ConfiguratorTreeNode[];
|
|
38
|
-
}
|