@streamline-pulse/formkrafter-wc 0.1.0
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/LICENSE +21 -0
- package/README.md +140 -0
- package/dist/cjs/app-globals-V2Kpy_OQ.js +5 -0
- package/dist/cjs/fk-brick-actions_18.cjs.entry.js +26442 -0
- package/dist/cjs/formkrafter-wc.cjs.js +25 -0
- package/dist/cjs/index-By4GGW_q.js +17346 -0
- package/dist/cjs/index-D_7eGIJ0.js +2090 -0
- package/dist/cjs/index.cjs.js +47 -0
- package/dist/cjs/loader.cjs.js +13 -0
- package/dist/collection/collection-manifest.json +30 -0
- package/dist/collection/components/fk-brick-actions/fk-brick-actions.css +78 -0
- package/dist/collection/components/fk-brick-actions/fk-brick-actions.js +215 -0
- package/dist/collection/components/fk-brick-list/fk-brick-list.css +71 -0
- package/dist/collection/components/fk-brick-list/fk-brick-list.js +55 -0
- package/dist/collection/components/fk-brick-mold-item/fk-brick-mold-item.css +33 -0
- package/dist/collection/components/fk-brick-mold-item/fk-brick-mold-item.js +73 -0
- package/dist/collection/components/fk-brick-not-found/fk-brick-not-found.css +8 -0
- package/dist/collection/components/fk-brick-not-found/fk-brick-not-found.js +18 -0
- package/dist/collection/components/fk-brick-render/fk-brick-render.js +419 -0
- package/dist/collection/components/fk-code-editor/fk-code-editor.css +26 -0
- package/dist/collection/components/fk-code-editor/fk-code-editor.js +136 -0
- package/dist/collection/components/fk-data-grid/fk-data-grid.css +75 -0
- package/dist/collection/components/fk-data-grid/fk-data-grid.js +300 -0
- package/dist/collection/components/fk-drop-area/fk-drop-area.css +18 -0
- package/dist/collection/components/fk-drop-area/fk-drop-area.js +98 -0
- package/dist/collection/components/fk-empty-form/fk-empty-form.css +22 -0
- package/dist/collection/components/fk-empty-form/fk-empty-form.js +19 -0
- package/dist/collection/components/fk-file-input/fk-file-input.css +74 -0
- package/dist/collection/components/fk-file-input/fk-file-input.js +157 -0
- package/dist/collection/components/fk-form-builder/fk-form-builder.css +82 -0
- package/dist/collection/components/fk-form-builder/fk-form-builder.js +431 -0
- package/dist/collection/components/fk-form-render/fk-form-render.css +7 -0
- package/dist/collection/components/fk-form-render/fk-form-render.js +352 -0
- package/dist/collection/components/fk-property-panel/fk-property-panel.css +153 -0
- package/dist/collection/components/fk-property-panel/fk-property-panel.js +384 -0
- package/dist/collection/components/fk-rules-editor/fk-rules-editor.css +166 -0
- package/dist/collection/components/fk-rules-editor/fk-rules-editor.js +250 -0
- package/dist/collection/components/fk-select-input/fk-select-input.css +144 -0
- package/dist/collection/components/fk-select-input/fk-select-input.js +356 -0
- package/dist/collection/components/fk-signature-input/fk-signature-input.css +42 -0
- package/dist/collection/components/fk-signature-input/fk-signature-input.js +158 -0
- package/dist/collection/components/fk-stepper/fk-stepper.css +85 -0
- package/dist/collection/components/fk-stepper/fk-stepper.js +282 -0
- package/dist/collection/components/fk-tabs/fk-tabs.css +38 -0
- package/dist/collection/components/fk-tabs/fk-tabs.js +236 -0
- package/dist/collection/i18n/i18n.js +245 -0
- package/dist/collection/index.js +5 -0
- package/dist/collection/registry/create-brick.js +34 -0
- package/dist/collection/registry/default-bricks.js +424 -0
- package/dist/collection/registry/registry.js +44 -0
- package/dist/collection/utils/brick-data.js +16 -0
- package/dist/collection/utils/drop.js +14 -0
- package/dist/collection/utils/events.js +1 -0
- package/dist/collection/utils/options.js +21 -0
- package/dist/collection/utils/remote.js +27 -0
- package/dist/collection/utils/rule-condition.js +72 -0
- package/dist/collection/utils/style.js +11 -0
- package/dist/components/fk-brick-actions.d.ts +11 -0
- package/dist/components/fk-brick-actions.js +1 -0
- package/dist/components/fk-brick-list.d.ts +11 -0
- package/dist/components/fk-brick-list.js +1 -0
- package/dist/components/fk-brick-mold-item.d.ts +11 -0
- package/dist/components/fk-brick-mold-item.js +1 -0
- package/dist/components/fk-brick-not-found.d.ts +11 -0
- package/dist/components/fk-brick-not-found.js +1 -0
- package/dist/components/fk-brick-render.d.ts +11 -0
- package/dist/components/fk-brick-render.js +1 -0
- package/dist/components/fk-code-editor.d.ts +11 -0
- package/dist/components/fk-code-editor.js +1 -0
- package/dist/components/fk-data-grid.d.ts +11 -0
- package/dist/components/fk-data-grid.js +1 -0
- package/dist/components/fk-drop-area.d.ts +11 -0
- package/dist/components/fk-drop-area.js +1 -0
- package/dist/components/fk-empty-form.d.ts +11 -0
- package/dist/components/fk-empty-form.js +1 -0
- package/dist/components/fk-file-input.d.ts +11 -0
- package/dist/components/fk-file-input.js +1 -0
- package/dist/components/fk-form-builder.d.ts +11 -0
- package/dist/components/fk-form-builder.js +1 -0
- package/dist/components/fk-form-render.d.ts +11 -0
- package/dist/components/fk-form-render.js +1 -0
- package/dist/components/fk-property-panel.d.ts +11 -0
- package/dist/components/fk-property-panel.js +1 -0
- package/dist/components/fk-rules-editor.d.ts +11 -0
- package/dist/components/fk-rules-editor.js +1 -0
- package/dist/components/fk-select-input.d.ts +11 -0
- package/dist/components/fk-select-input.js +1 -0
- package/dist/components/fk-signature-input.d.ts +11 -0
- package/dist/components/fk-signature-input.js +1 -0
- package/dist/components/fk-stepper.d.ts +11 -0
- package/dist/components/fk-stepper.js +1 -0
- package/dist/components/fk-tabs.d.ts +11 -0
- package/dist/components/fk-tabs.js +1 -0
- package/dist/components/index.d.ts +35 -0
- package/dist/components/index.js +1 -0
- package/dist/components/p-92BozD8S.js +1 -0
- package/dist/components/p-B4vAN-UA.js +1 -0
- package/dist/components/p-BB3BQPr8.js +1 -0
- package/dist/components/p-BCQ-hj6j.js +1 -0
- package/dist/components/p-BIEpAM4V.js +1 -0
- package/dist/components/p-BLKRn62s.js +1 -0
- package/dist/components/p-BNREw7TY.js +1 -0
- package/dist/components/p-BOvjVIvo.js +1 -0
- package/dist/components/p-BQP1WryV.js +1 -0
- package/dist/components/p-BXFug2Ql.js +1 -0
- package/dist/components/p-Ctt--jpe.js +1 -0
- package/dist/components/p-D318uFl-.js +1 -0
- package/dist/components/p-DJDrDvoC.js +1 -0
- package/dist/components/p-DKGyje7v.js +1 -0
- package/dist/components/p-DKoJovNt.js +1 -0
- package/dist/components/p-DWgjI3TW.js +1 -0
- package/dist/components/p-Diknh4-7.js +1 -0
- package/dist/components/p-DtzMNM4i.js +1 -0
- package/dist/components/p-QC41Uj05.js +1 -0
- package/dist/components/p-TvmRksgg.js +1 -0
- package/dist/components/p-ZEW2q-4b.js +1 -0
- package/dist/components/p-dX7Lo8Fe.js +12 -0
- package/dist/components/p-gPc0o8Jb.js +1 -0
- package/dist/esm/app-globals-DQuL1Twl.js +3 -0
- package/dist/esm/fk-brick-actions_18.entry.js +26423 -0
- package/dist/esm/formkrafter-wc.js +21 -0
- package/dist/esm/index-BQqrzKxo.js +2081 -0
- package/dist/esm/index-BTmZ8XET.js +17288 -0
- package/dist/esm/index.js +2 -0
- package/dist/esm/loader.js +11 -0
- package/dist/formkrafter-wc/formkrafter-wc.css +1 -0
- package/dist/formkrafter-wc/formkrafter-wc.esm.js +1 -0
- package/dist/formkrafter-wc/index.esm.js +1 -0
- package/dist/formkrafter-wc/p-BQqrzKxo.js +2 -0
- package/dist/formkrafter-wc/p-BXIsVlA6.js +12 -0
- package/dist/formkrafter-wc/p-DQuL1Twl.js +1 -0
- package/dist/formkrafter-wc/p-f6bc0be0.entry.js +1 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/stencil.config.js +34 -0
- package/dist/types/Users/datagnikan/Desktop/WorkSpace/streamline-pulse/formkrafter-js/formkrafter/packages/wc/.stencil/stencil.config.d.ts +2 -0
- package/dist/types/components/fk-brick-actions/fk-brick-actions.d.ts +18 -0
- package/dist/types/components/fk-brick-list/fk-brick-list.d.ts +6 -0
- package/dist/types/components/fk-brick-mold-item/fk-brick-mold-item.d.ts +10 -0
- package/dist/types/components/fk-brick-not-found/fk-brick-not-found.d.ts +3 -0
- package/dist/types/components/fk-brick-render/fk-brick-render.d.ts +22 -0
- package/dist/types/components/fk-code-editor/fk-code-editor.d.ts +13 -0
- package/dist/types/components/fk-data-grid/fk-data-grid.d.ts +21 -0
- package/dist/types/components/fk-drop-area/fk-drop-area.d.ts +12 -0
- package/dist/types/components/fk-empty-form/fk-empty-form.d.ts +3 -0
- package/dist/types/components/fk-file-input/fk-file-input.d.ts +14 -0
- package/dist/types/components/fk-form-builder/fk-form-builder.d.ts +43 -0
- package/dist/types/components/fk-form-render/fk-form-render.d.ts +29 -0
- package/dist/types/components/fk-property-panel/fk-property-panel.d.ts +34 -0
- package/dist/types/components/fk-rules-editor/fk-rules-editor.d.ts +29 -0
- package/dist/types/components/fk-select-input/fk-select-input.d.ts +37 -0
- package/dist/types/components/fk-signature-input/fk-signature-input.d.ts +19 -0
- package/dist/types/components/fk-stepper/fk-stepper.d.ts +27 -0
- package/dist/types/components/fk-tabs/fk-tabs.d.ts +23 -0
- package/dist/types/components.d.ts +796 -0
- package/dist/types/i18n/i18n.d.ts +5 -0
- package/dist/types/index.d.ts +11 -0
- package/dist/types/registry/create-brick.d.ts +37 -0
- package/dist/types/registry/default-bricks.d.ts +489 -0
- package/dist/types/registry/registry.d.ts +8 -0
- package/dist/types/stencil-public-runtime.d.ts +1861 -0
- package/dist/types/utils/brick-data.d.ts +3 -0
- package/dist/types/utils/drop.d.ts +2 -0
- package/dist/types/utils/events.d.ts +37 -0
- package/dist/types/utils/options.d.ts +5 -0
- package/dist/types/utils/remote.d.ts +3 -0
- package/dist/types/utils/rule-condition.d.ts +30 -0
- package/dist/types/utils/style.d.ts +1 -0
- package/loader/cdn.js +1 -0
- package/loader/index.cjs.js +1 -0
- package/loader/index.d.ts +24 -0
- package/loader/index.es2017.js +1 -0
- package/loader/index.js +2 -0
- package/package.json +80 -0
|
@@ -0,0 +1,352 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
import { getAffectedProperties, iterateBricks, validateBrickSpecDataDetailed, } from "@streamline-pulse/formkrafter-core";
|
|
3
|
+
export class FkFormRender {
|
|
4
|
+
constructor() {
|
|
5
|
+
this.editable = false;
|
|
6
|
+
this.currentData = {};
|
|
7
|
+
this.touched = {};
|
|
8
|
+
this.utils = {
|
|
9
|
+
validateForm: () => ({
|
|
10
|
+
isValid: this.runValidation().valid,
|
|
11
|
+
}),
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
componentWillLoad() {
|
|
15
|
+
this.currentData = Object.assign({}, this.data);
|
|
16
|
+
}
|
|
17
|
+
syncData(next) {
|
|
18
|
+
this.currentData = Object.assign({}, next);
|
|
19
|
+
}
|
|
20
|
+
publicData() {
|
|
21
|
+
return Object.fromEntries(Object.entries(this.currentData).filter(([key]) => !key.startsWith('_')));
|
|
22
|
+
}
|
|
23
|
+
handleBrickDataChange(event) {
|
|
24
|
+
event.stopPropagation();
|
|
25
|
+
this.currentData = this.applyValueEffects(Object.assign(Object.assign({}, this.currentData), event.detail));
|
|
26
|
+
const touched = Object.assign({}, this.touched);
|
|
27
|
+
for (const key of Object.keys(event.detail))
|
|
28
|
+
touched[key] = true;
|
|
29
|
+
this.touched = touched;
|
|
30
|
+
const { valid, errors } = this.runValidation();
|
|
31
|
+
this.formDataChange.emit({
|
|
32
|
+
data: this.publicData(),
|
|
33
|
+
isValid: valid,
|
|
34
|
+
errors,
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
applyValueEffects(data) {
|
|
38
|
+
var _a, _b;
|
|
39
|
+
let result = data;
|
|
40
|
+
for (const { brick } of iterateBricks(this.spec)) {
|
|
41
|
+
const key = (_a = brick.configs) === null || _a === void 0 ? void 0 : _a.key;
|
|
42
|
+
if (!key || !((_b = brick.rules) === null || _b === void 0 ? void 0 : _b.length))
|
|
43
|
+
continue;
|
|
44
|
+
const affected = getAffectedProperties(brick.rules, result);
|
|
45
|
+
if (affected.value !== undefined && result[key] !== affected.value) {
|
|
46
|
+
result = Object.assign(Object.assign({}, result), { [key]: affected.value });
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
return result;
|
|
50
|
+
}
|
|
51
|
+
async validate() {
|
|
52
|
+
var _a;
|
|
53
|
+
const touched = {};
|
|
54
|
+
for (const { brick } of iterateBricks(this.spec)) {
|
|
55
|
+
const key = (_a = brick.configs) === null || _a === void 0 ? void 0 : _a.key;
|
|
56
|
+
if (key)
|
|
57
|
+
touched[key] = true;
|
|
58
|
+
}
|
|
59
|
+
this.touched = touched;
|
|
60
|
+
const flat = this.runValidation();
|
|
61
|
+
const errors = Object.assign({}, flat.errors);
|
|
62
|
+
let valid = flat.valid;
|
|
63
|
+
const grids = Array.from(this.host.querySelectorAll('fk-data-grid'));
|
|
64
|
+
for (const grid of grids) {
|
|
65
|
+
const rowResult = await grid.validateRows();
|
|
66
|
+
valid = valid && rowResult.valid;
|
|
67
|
+
Object.assign(errors, rowResult.errors);
|
|
68
|
+
}
|
|
69
|
+
const result = { valid, errors };
|
|
70
|
+
this.formDataChange.emit({
|
|
71
|
+
data: this.publicData(),
|
|
72
|
+
isValid: result.valid,
|
|
73
|
+
errors: result.errors,
|
|
74
|
+
});
|
|
75
|
+
return result;
|
|
76
|
+
}
|
|
77
|
+
handleStepTouch(event) {
|
|
78
|
+
event.stopPropagation();
|
|
79
|
+
const touched = Object.assign({}, this.touched);
|
|
80
|
+
for (const key of event.detail.keys)
|
|
81
|
+
touched[key] = true;
|
|
82
|
+
this.touched = touched;
|
|
83
|
+
}
|
|
84
|
+
async handleStepperSubmit(event) {
|
|
85
|
+
event.stopPropagation();
|
|
86
|
+
const result = await this.validate();
|
|
87
|
+
this.formSubmit.emit({
|
|
88
|
+
data: this.publicData(),
|
|
89
|
+
isValid: result.valid,
|
|
90
|
+
errors: result.errors,
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
runValidation() {
|
|
94
|
+
const presentData = Object.fromEntries(Object.entries(this.currentData).filter(([, value]) => value !== '' && value !== null && value !== undefined));
|
|
95
|
+
return validateBrickSpecDataDetailed(this.spec, presentData, this.locale);
|
|
96
|
+
}
|
|
97
|
+
visibleErrors() {
|
|
98
|
+
if (this.editable)
|
|
99
|
+
return {};
|
|
100
|
+
const errors = {};
|
|
101
|
+
for (const [key, message] of Object.entries(this.runValidation().errors)) {
|
|
102
|
+
if (this.touched[key])
|
|
103
|
+
errors[key] = message;
|
|
104
|
+
}
|
|
105
|
+
return errors;
|
|
106
|
+
}
|
|
107
|
+
render() {
|
|
108
|
+
if (!this.spec)
|
|
109
|
+
return null;
|
|
110
|
+
return (h("form", { class: "fk-form", onSubmit: (event) => event.preventDefault() }, h("fk-brick-render", { brickSpec: this.spec, data: this.currentData, dataMap: this.currentData, errors: this.visibleErrors(), locale: this.locale, path: "0", editable: this.editable, selectedUid: this.selectedUid, utils: this.utils })));
|
|
111
|
+
}
|
|
112
|
+
static get is() { return "fk-form-render"; }
|
|
113
|
+
static get encapsulation() { return "scoped"; }
|
|
114
|
+
static get originalStyleUrls() {
|
|
115
|
+
return {
|
|
116
|
+
"$": ["fk-form-render.css"]
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
static get styleUrls() {
|
|
120
|
+
return {
|
|
121
|
+
"$": ["fk-form-render.css"]
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
static get properties() {
|
|
125
|
+
return {
|
|
126
|
+
"spec": {
|
|
127
|
+
"type": "unknown",
|
|
128
|
+
"mutable": false,
|
|
129
|
+
"complexType": {
|
|
130
|
+
"original": "BrickSpec",
|
|
131
|
+
"resolved": "BrickSpec",
|
|
132
|
+
"references": {
|
|
133
|
+
"BrickSpec": {
|
|
134
|
+
"location": "import",
|
|
135
|
+
"path": "@streamline-pulse/formkrafter-core",
|
|
136
|
+
"id": "../core/dist/index.d.ts::BrickSpec",
|
|
137
|
+
"referenceLocation": "BrickSpec"
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
"required": true,
|
|
142
|
+
"optional": false,
|
|
143
|
+
"docs": {
|
|
144
|
+
"tags": [],
|
|
145
|
+
"text": ""
|
|
146
|
+
},
|
|
147
|
+
"getter": false,
|
|
148
|
+
"setter": false
|
|
149
|
+
},
|
|
150
|
+
"data": {
|
|
151
|
+
"type": "unknown",
|
|
152
|
+
"mutable": false,
|
|
153
|
+
"complexType": {
|
|
154
|
+
"original": "Record<string, unknown>",
|
|
155
|
+
"resolved": "string | unknown",
|
|
156
|
+
"references": {
|
|
157
|
+
"Record": {
|
|
158
|
+
"location": "global",
|
|
159
|
+
"id": "global::Record"
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
},
|
|
163
|
+
"required": false,
|
|
164
|
+
"optional": true,
|
|
165
|
+
"docs": {
|
|
166
|
+
"tags": [],
|
|
167
|
+
"text": ""
|
|
168
|
+
},
|
|
169
|
+
"getter": false,
|
|
170
|
+
"setter": false
|
|
171
|
+
},
|
|
172
|
+
"editable": {
|
|
173
|
+
"type": "boolean",
|
|
174
|
+
"mutable": false,
|
|
175
|
+
"complexType": {
|
|
176
|
+
"original": "boolean",
|
|
177
|
+
"resolved": "boolean",
|
|
178
|
+
"references": {}
|
|
179
|
+
},
|
|
180
|
+
"required": false,
|
|
181
|
+
"optional": false,
|
|
182
|
+
"docs": {
|
|
183
|
+
"tags": [],
|
|
184
|
+
"text": ""
|
|
185
|
+
},
|
|
186
|
+
"getter": false,
|
|
187
|
+
"setter": false,
|
|
188
|
+
"reflect": false,
|
|
189
|
+
"attribute": "editable",
|
|
190
|
+
"defaultValue": "false"
|
|
191
|
+
},
|
|
192
|
+
"selectedUid": {
|
|
193
|
+
"type": "string",
|
|
194
|
+
"mutable": false,
|
|
195
|
+
"complexType": {
|
|
196
|
+
"original": "string",
|
|
197
|
+
"resolved": "string",
|
|
198
|
+
"references": {}
|
|
199
|
+
},
|
|
200
|
+
"required": false,
|
|
201
|
+
"optional": true,
|
|
202
|
+
"docs": {
|
|
203
|
+
"tags": [],
|
|
204
|
+
"text": ""
|
|
205
|
+
},
|
|
206
|
+
"getter": false,
|
|
207
|
+
"setter": false,
|
|
208
|
+
"reflect": false,
|
|
209
|
+
"attribute": "selected-uid"
|
|
210
|
+
},
|
|
211
|
+
"locale": {
|
|
212
|
+
"type": "string",
|
|
213
|
+
"mutable": false,
|
|
214
|
+
"complexType": {
|
|
215
|
+
"original": "string",
|
|
216
|
+
"resolved": "string",
|
|
217
|
+
"references": {}
|
|
218
|
+
},
|
|
219
|
+
"required": false,
|
|
220
|
+
"optional": true,
|
|
221
|
+
"docs": {
|
|
222
|
+
"tags": [],
|
|
223
|
+
"text": ""
|
|
224
|
+
},
|
|
225
|
+
"getter": false,
|
|
226
|
+
"setter": false,
|
|
227
|
+
"reflect": false,
|
|
228
|
+
"attribute": "locale"
|
|
229
|
+
}
|
|
230
|
+
};
|
|
231
|
+
}
|
|
232
|
+
static get states() {
|
|
233
|
+
return {
|
|
234
|
+
"currentData": {},
|
|
235
|
+
"touched": {}
|
|
236
|
+
};
|
|
237
|
+
}
|
|
238
|
+
static get events() {
|
|
239
|
+
return [{
|
|
240
|
+
"method": "formDataChange",
|
|
241
|
+
"name": "formDataChange",
|
|
242
|
+
"bubbles": true,
|
|
243
|
+
"cancelable": true,
|
|
244
|
+
"composed": true,
|
|
245
|
+
"docs": {
|
|
246
|
+
"tags": [],
|
|
247
|
+
"text": ""
|
|
248
|
+
},
|
|
249
|
+
"complexType": {
|
|
250
|
+
"original": "DataChangeDetail",
|
|
251
|
+
"resolved": "DataChangeDetail",
|
|
252
|
+
"references": {
|
|
253
|
+
"DataChangeDetail": {
|
|
254
|
+
"location": "import",
|
|
255
|
+
"path": "../../utils/events",
|
|
256
|
+
"id": "src/utils/events.ts::DataChangeDetail",
|
|
257
|
+
"referenceLocation": "DataChangeDetail"
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
}, {
|
|
262
|
+
"method": "formSubmit",
|
|
263
|
+
"name": "formSubmit",
|
|
264
|
+
"bubbles": true,
|
|
265
|
+
"cancelable": true,
|
|
266
|
+
"composed": true,
|
|
267
|
+
"docs": {
|
|
268
|
+
"tags": [],
|
|
269
|
+
"text": ""
|
|
270
|
+
},
|
|
271
|
+
"complexType": {
|
|
272
|
+
"original": "DataChangeDetail",
|
|
273
|
+
"resolved": "DataChangeDetail",
|
|
274
|
+
"references": {
|
|
275
|
+
"DataChangeDetail": {
|
|
276
|
+
"location": "import",
|
|
277
|
+
"path": "../../utils/events",
|
|
278
|
+
"id": "src/utils/events.ts::DataChangeDetail",
|
|
279
|
+
"referenceLocation": "DataChangeDetail"
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
}];
|
|
284
|
+
}
|
|
285
|
+
static get methods() {
|
|
286
|
+
return {
|
|
287
|
+
"validate": {
|
|
288
|
+
"complexType": {
|
|
289
|
+
"signature": "() => Promise<ValidationResult>",
|
|
290
|
+
"parameters": [],
|
|
291
|
+
"references": {
|
|
292
|
+
"Promise": {
|
|
293
|
+
"location": "global",
|
|
294
|
+
"id": "global::Promise"
|
|
295
|
+
},
|
|
296
|
+
"ValidationResult": {
|
|
297
|
+
"location": "import",
|
|
298
|
+
"path": "@streamline-pulse/formkrafter-core",
|
|
299
|
+
"id": "../core/dist/index.d.ts::ValidationResult",
|
|
300
|
+
"referenceLocation": "ValidationResult"
|
|
301
|
+
},
|
|
302
|
+
"Record": {
|
|
303
|
+
"location": "global",
|
|
304
|
+
"id": "global::Record"
|
|
305
|
+
},
|
|
306
|
+
"Array": {
|
|
307
|
+
"location": "global",
|
|
308
|
+
"id": "global::Array"
|
|
309
|
+
},
|
|
310
|
+
"HTMLElement": {
|
|
311
|
+
"location": "global",
|
|
312
|
+
"id": "global::HTMLElement"
|
|
313
|
+
}
|
|
314
|
+
},
|
|
315
|
+
"return": "Promise<ValidationResult>"
|
|
316
|
+
},
|
|
317
|
+
"docs": {
|
|
318
|
+
"text": "",
|
|
319
|
+
"tags": []
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
};
|
|
323
|
+
}
|
|
324
|
+
static get elementRef() { return "host"; }
|
|
325
|
+
static get watchers() {
|
|
326
|
+
return [{
|
|
327
|
+
"propName": "data",
|
|
328
|
+
"methodName": "syncData"
|
|
329
|
+
}];
|
|
330
|
+
}
|
|
331
|
+
static get listeners() {
|
|
332
|
+
return [{
|
|
333
|
+
"name": "brickDataChange",
|
|
334
|
+
"method": "handleBrickDataChange",
|
|
335
|
+
"target": undefined,
|
|
336
|
+
"capture": false,
|
|
337
|
+
"passive": false
|
|
338
|
+
}, {
|
|
339
|
+
"name": "stepTouch",
|
|
340
|
+
"method": "handleStepTouch",
|
|
341
|
+
"target": undefined,
|
|
342
|
+
"capture": false,
|
|
343
|
+
"passive": false
|
|
344
|
+
}, {
|
|
345
|
+
"name": "stepperSubmit",
|
|
346
|
+
"method": "handleStepperSubmit",
|
|
347
|
+
"target": undefined,
|
|
348
|
+
"capture": false,
|
|
349
|
+
"passive": false
|
|
350
|
+
}];
|
|
351
|
+
}
|
|
352
|
+
}
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
display: block;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.fk-props {
|
|
6
|
+
display: flex;
|
|
7
|
+
flex-direction: column;
|
|
8
|
+
gap: calc(var(--fk-spacing) * 1.5);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.fk-props__header {
|
|
12
|
+
display: flex;
|
|
13
|
+
flex-direction: column;
|
|
14
|
+
gap: 2px;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.fk-props__type {
|
|
18
|
+
font-size: 0.65rem;
|
|
19
|
+
font-weight: 700;
|
|
20
|
+
text-transform: uppercase;
|
|
21
|
+
letter-spacing: 0.08em;
|
|
22
|
+
color: var(--fk-color-primary);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.fk-props__title {
|
|
26
|
+
margin: 0;
|
|
27
|
+
font-size: 0.95rem;
|
|
28
|
+
color: var(--fk-color-text);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.fk-props__section {
|
|
32
|
+
display: flex;
|
|
33
|
+
flex-direction: column;
|
|
34
|
+
gap: var(--fk-spacing);
|
|
35
|
+
padding-top: var(--fk-spacing);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.fk-props__tabs {
|
|
39
|
+
display: flex;
|
|
40
|
+
gap: 2px;
|
|
41
|
+
border-bottom: 1px solid var(--fk-color-border);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.fk-props__tab {
|
|
45
|
+
font: inherit;
|
|
46
|
+
font-size: 0.72rem;
|
|
47
|
+
font-weight: 600;
|
|
48
|
+
padding: 5px 9px;
|
|
49
|
+
border: none;
|
|
50
|
+
border-bottom: 2px solid transparent;
|
|
51
|
+
background: transparent;
|
|
52
|
+
color: var(--fk-color-muted);
|
|
53
|
+
cursor: pointer;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.fk-props__tab:hover {
|
|
57
|
+
color: var(--fk-color-text);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.fk-props__tab--active {
|
|
61
|
+
color: var(--fk-color-primary);
|
|
62
|
+
border-bottom-color: var(--fk-color-primary);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.fk-props__section-title {
|
|
66
|
+
margin: 0;
|
|
67
|
+
font-size: 0.7rem;
|
|
68
|
+
font-weight: 700;
|
|
69
|
+
text-transform: uppercase;
|
|
70
|
+
letter-spacing: 0.08em;
|
|
71
|
+
color: var(--fk-color-muted);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.fk-props__field {
|
|
75
|
+
display: flex;
|
|
76
|
+
flex-direction: column;
|
|
77
|
+
gap: 4px;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.fk-props__field--inline {
|
|
81
|
+
flex-direction: row;
|
|
82
|
+
align-items: center;
|
|
83
|
+
gap: 8px;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.fk-props__label {
|
|
87
|
+
font-size: 0.75rem;
|
|
88
|
+
font-weight: 600;
|
|
89
|
+
color: var(--fk-color-muted);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.fk-props__input {
|
|
93
|
+
font: inherit;
|
|
94
|
+
font-size: 0.85rem;
|
|
95
|
+
padding: 6px 8px;
|
|
96
|
+
border: 1px solid var(--fk-color-border);
|
|
97
|
+
border-radius: calc(var(--fk-radius) / 2);
|
|
98
|
+
background: var(--fk-color-surface);
|
|
99
|
+
color: var(--fk-color-text);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.fk-props__input:focus {
|
|
103
|
+
outline: none;
|
|
104
|
+
border-color: var(--fk-color-primary);
|
|
105
|
+
box-shadow: 0 0 0 2px color-mix(in srgb, var(--fk-color-primary) 20%, transparent);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.fk-props__input--textarea {
|
|
109
|
+
min-height: 72px;
|
|
110
|
+
resize: vertical;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.fk-props__vrule {
|
|
114
|
+
display: flex;
|
|
115
|
+
flex-direction: column;
|
|
116
|
+
gap: 6px;
|
|
117
|
+
padding: calc(var(--fk-spacing) / 1.5);
|
|
118
|
+
border: 1px solid var(--fk-color-border);
|
|
119
|
+
border-radius: calc(var(--fk-radius) / 1.5);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.fk-props__style-row {
|
|
123
|
+
display: flex;
|
|
124
|
+
align-items: center;
|
|
125
|
+
gap: 6px;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.fk-props__style-key {
|
|
129
|
+
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
|
|
130
|
+
font-size: 0.75rem;
|
|
131
|
+
color: var(--fk-color-text);
|
|
132
|
+
min-width: 72px;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.fk-props__input--grow {
|
|
136
|
+
flex: 1;
|
|
137
|
+
min-width: 0;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.fk-props__remove {
|
|
141
|
+
border: none;
|
|
142
|
+
background: transparent;
|
|
143
|
+
color: var(--fk-color-muted);
|
|
144
|
+
font-size: 0.75rem;
|
|
145
|
+
cursor: pointer;
|
|
146
|
+
padding: 2px 4px;
|
|
147
|
+
border-radius: calc(var(--fk-radius) / 2);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.fk-props__remove:hover {
|
|
151
|
+
color: var(--fk-color-danger);
|
|
152
|
+
background: color-mix(in srgb, var(--fk-color-danger) 10%, transparent);
|
|
153
|
+
}
|