@streamline-pulse/formkrafter-wc 0.3.0 → 0.4.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/README.md +10 -8
- package/dist/components/fk-brick-actions.js +1 -1
- package/dist/components/fk-brick-list.js +1 -1
- package/dist/components/fk-brick-mold-item.js +1 -1
- package/dist/components/fk-brick-render.js +1 -1
- package/dist/components/fk-code-editor.js +1 -1
- package/dist/components/fk-data-grid.js +1 -1
- package/dist/components/fk-drop-area.js +1 -1
- package/dist/components/fk-empty-form.js +1 -1
- package/dist/components/fk-file-input.js +1 -1
- package/dist/components/fk-form-builder.js +1 -1
- package/dist/components/fk-form-render.js +1 -1
- package/dist/components/fk-property-panel.js +1 -1
- package/dist/components/fk-rules-editor.js +1 -1
- package/dist/components/fk-select-input.js +1 -1
- package/dist/components/fk-signature-input.js +1 -1
- package/dist/components/fk-stepper.js +1 -1
- package/dist/components/fk-tabs.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/{p-CKMHMpID.js → p-28GBFlUX.js} +4 -4
- package/dist/components/{p-D6n74M9d.js → p-BGxmFcpL.js} +1 -1
- package/dist/components/{p-DYchD23x.js → p-BInUBjyw.js} +1 -1
- package/dist/{formkrafter-wc/p-C-wnqV3i.js → components/p-BietHxaT.js} +1 -1
- package/dist/components/{p-fDJP6whN.js → p-BnzSarwW.js} +1 -1
- package/dist/components/p-BpkKcCCr.js +1 -0
- package/dist/components/p-C0Y8qh8R.js +1 -0
- package/dist/components/p-C5OWoRhO.js +1 -0
- package/dist/components/{p-wuC5rVU7.js → p-CKs1CWVz.js} +1 -1
- package/dist/components/{p-v7LxwCAc.js → p-CZHykCYD.js} +1 -1
- package/dist/components/{p-4COASNrZ.js → p-CehxuHtl.js} +1 -1
- package/dist/components/p-CqVSd56Z.js +1 -0
- package/dist/components/p-CyZA17qf.js +1 -0
- package/dist/components/{p-BGkZP87K.js → p-D4HhZxQ-.js} +1 -1
- package/dist/components/p-DC6Wxbnz.js +1 -0
- package/dist/components/p-DRNycSdI.js +1 -0
- package/dist/components/{p--vL6GR31.js → p-Dh5Z49YD.js} +1 -1
- package/dist/components/p-DiOstAi9.js +1 -0
- package/dist/components/p-DlqnIm46.js +1 -0
- package/dist/components/{p-CIfjRTky.js → p-DshUS8Zm.js} +1 -1
- package/dist/components/{p-DMCkrZqi.js → p-RzeBwfwG.js} +1 -1
- package/dist/components/{p-BWdm2a6q.js → p-ajy8ZcBX.js} +1 -1
- package/dist/components/p-kYG3E0GQ.js +1 -0
- package/dist/components/p-tTJg_I4V.js +1 -0
- package/dist/formkrafter-wc/formkrafter-wc.css +1 -1
- package/dist/formkrafter-wc/formkrafter-wc.esm.js +1 -1
- package/dist/formkrafter-wc/index.esm.js +1 -1
- package/dist/formkrafter-wc/p-3579150a.entry.js +1 -0
- package/dist/formkrafter-wc/p-8b0ff66e.entry.js +1 -0
- package/dist/formkrafter-wc/p-BHZMDq2e.js +1 -0
- package/dist/{components/p-C-wnqV3i.js → formkrafter-wc/p-BietHxaT.js} +1 -1
- package/dist/formkrafter-wc/p-C0Y8qh8R.js +1 -0
- package/dist/formkrafter-wc/{p-4COASNrZ.js → p-CehxuHtl.js} +1 -1
- package/dist/formkrafter-wc/p-DlqnIm46.js +1 -0
- package/dist/formkrafter-wc/{p-DMCkrZqi.js → p-RzeBwfwG.js} +1 -1
- package/dist/formkrafter-wc/p-WWmY5Z05.js +1 -0
- package/dist/formkrafter-wc/p-hcT25XX4.js +12 -0
- package/dist/types/components/fk-code-editor/fk-code-editor.d.ts +1 -0
- package/dist/types/components/fk-data-grid/fk-data-grid.d.ts +1 -0
- package/dist/types/components/fk-drop-area/fk-drop-area.d.ts +1 -0
- package/dist/types/components/fk-form-render/fk-form-render.d.ts +7 -1
- package/dist/types/components.d.ts +17 -0
- package/dist/types/index.d.ts +1 -1
- package/dist/types/registry/default-bricks.d.ts +36 -0
- package/dist/types/utils/mask.d.ts +1 -0
- package/package.json +10 -15
- package/dist/cjs/app-globals-V2Kpy_OQ.js +0 -5
- package/dist/cjs/fk-brick-actions_18.cjs.entry.js +0 -4224
- package/dist/cjs/formkrafter-wc.cjs.js +0 -25
- package/dist/cjs/index-Bhy1RJMV.js +0 -3042
- package/dist/cjs/index-CImTe9BG.js +0 -2126
- package/dist/cjs/index-CdaT3-qx.js +0 -5444
- package/dist/cjs/index-CkPPRg03.js +0 -17548
- package/dist/cjs/index-DHgK3reD.js +0 -12233
- package/dist/cjs/index-Ds0sDbXV.js +0 -4019
- package/dist/cjs/index-c9BL7y3N.js +0 -1922
- package/dist/cjs/index.cjs.js +0 -48
- package/dist/cjs/loader.cjs.js +0 -13
- package/dist/collection/collection-manifest.json +0 -30
- package/dist/collection/components/fk-brick-actions/fk-brick-actions.css +0 -78
- package/dist/collection/components/fk-brick-actions/fk-brick-actions.js +0 -215
- package/dist/collection/components/fk-brick-list/fk-brick-list.css +0 -71
- package/dist/collection/components/fk-brick-list/fk-brick-list.js +0 -55
- package/dist/collection/components/fk-brick-mold-item/fk-brick-mold-item.css +0 -33
- package/dist/collection/components/fk-brick-mold-item/fk-brick-mold-item.js +0 -73
- package/dist/collection/components/fk-brick-not-found/fk-brick-not-found.css +0 -8
- package/dist/collection/components/fk-brick-not-found/fk-brick-not-found.js +0 -18
- package/dist/collection/components/fk-brick-render/fk-brick-render.js +0 -447
- package/dist/collection/components/fk-code-editor/fk-code-editor.css +0 -26
- package/dist/collection/components/fk-code-editor/fk-code-editor.js +0 -145
- package/dist/collection/components/fk-data-grid/fk-data-grid.css +0 -75
- package/dist/collection/components/fk-data-grid/fk-data-grid.js +0 -300
- package/dist/collection/components/fk-drop-area/fk-drop-area.css +0 -18
- package/dist/collection/components/fk-drop-area/fk-drop-area.js +0 -98
- package/dist/collection/components/fk-empty-form/fk-empty-form.css +0 -22
- package/dist/collection/components/fk-empty-form/fk-empty-form.js +0 -19
- package/dist/collection/components/fk-file-input/fk-file-input.css +0 -95
- package/dist/collection/components/fk-file-input/fk-file-input.js +0 -239
- package/dist/collection/components/fk-form-builder/fk-form-builder.css +0 -112
- package/dist/collection/components/fk-form-builder/fk-form-builder.js +0 -431
- package/dist/collection/components/fk-form-render/fk-form-render.css +0 -7
- package/dist/collection/components/fk-form-render/fk-form-render.js +0 -352
- package/dist/collection/components/fk-property-panel/fk-property-panel.css +0 -153
- package/dist/collection/components/fk-property-panel/fk-property-panel.js +0 -388
- package/dist/collection/components/fk-rules-editor/fk-rules-editor.css +0 -166
- package/dist/collection/components/fk-rules-editor/fk-rules-editor.js +0 -250
- package/dist/collection/components/fk-select-input/fk-select-input.css +0 -153
- package/dist/collection/components/fk-select-input/fk-select-input.js +0 -454
- package/dist/collection/components/fk-signature-input/fk-signature-input.css +0 -42
- package/dist/collection/components/fk-signature-input/fk-signature-input.js +0 -158
- package/dist/collection/components/fk-stepper/fk-stepper.css +0 -99
- package/dist/collection/components/fk-stepper/fk-stepper.js +0 -285
- package/dist/collection/components/fk-tabs/fk-tabs.css +0 -38
- package/dist/collection/components/fk-tabs/fk-tabs.js +0 -249
- package/dist/collection/i18n/i18n.js +0 -265
- package/dist/collection/index.js +0 -5
- package/dist/collection/registry/create-brick.js +0 -34
- package/dist/collection/registry/default-bricks.js +0 -564
- package/dist/collection/registry/registry.js +0 -44
- package/dist/collection/utils/brick-data.js +0 -16
- package/dist/collection/utils/drop.js +0 -14
- package/dist/collection/utils/events.js +0 -1
- package/dist/collection/utils/options.js +0 -21
- package/dist/collection/utils/remote.js +0 -27
- package/dist/collection/utils/rule-condition.js +0 -72
- package/dist/collection/utils/style.js +0 -11
- package/dist/components/p-BOmBVgfJ.js +0 -1
- package/dist/components/p-B_-x-GlA.js +0 -1
- package/dist/components/p-Br1s4Ujx.js +0 -1
- package/dist/components/p-CUF31e-P.js +0 -1
- package/dist/components/p-CWQX0sXS.js +0 -1
- package/dist/components/p-DFe3zZCI.js +0 -1
- package/dist/components/p-DOInQkG6.js +0 -1
- package/dist/components/p-PAr7WoWG.js +0 -1
- package/dist/components/p-YyGnQmX-.js +0 -1
- package/dist/components/p-swxZqinH.js +0 -1
- package/dist/esm/app-globals-DQuL1Twl.js +0 -3
- package/dist/esm/fk-brick-actions_18.entry.js +0 -4205
- package/dist/esm/formkrafter-wc.js +0 -21
- package/dist/esm/index-BAcz7b5u.js +0 -5416
- package/dist/esm/index-BkRMoLXK.js +0 -3029
- package/dist/esm/index-CGMDfZ5m.js +0 -1808
- package/dist/esm/index-D7Cta1UB.js +0 -17488
- package/dist/esm/index-DtcM1yw5.js +0 -3991
- package/dist/esm/index-DuVf3NlP.js +0 -12222
- package/dist/esm/index-qLZlXROB.js +0 -2117
- package/dist/esm/index.js +0 -2
- package/dist/esm/loader.js +0 -11
- package/dist/formkrafter-wc/p-6d29555b.entry.js +0 -1
- package/dist/formkrafter-wc/p-DOInQkG6.js +0 -1
- package/dist/formkrafter-wc/p-Ddu6BquK.js +0 -12
- package/dist/index.cjs.js +0 -1
- package/dist/index.js +0 -1
- package/dist/stencil.config.js +0 -34
- package/loader/cdn.js +0 -1
- package/loader/index.cjs.js +0 -1
- package/loader/index.d.ts +0 -24
- package/loader/index.es2017.js +0 -1
- package/loader/index.js +0 -2
|
@@ -1,300 +0,0 @@
|
|
|
1
|
-
import { h } from "@stencil/core";
|
|
2
|
-
import { validateBrickSpecDataDetailed } from "@streamline-pulse/formkrafter-core";
|
|
3
|
-
import { fkT } from "../../i18n/i18n";
|
|
4
|
-
export class FkDataGrid {
|
|
5
|
-
constructor() {
|
|
6
|
-
this.disabled = false;
|
|
7
|
-
this.touched = {};
|
|
8
|
-
this.addRow = (event) => {
|
|
9
|
-
event.preventDefault();
|
|
10
|
-
this.gridValueChange.emit([...this.rows(), {}]);
|
|
11
|
-
};
|
|
12
|
-
}
|
|
13
|
-
rows() {
|
|
14
|
-
return Array.isArray(this.value)
|
|
15
|
-
? this.value
|
|
16
|
-
: [];
|
|
17
|
-
}
|
|
18
|
-
rowSpec() {
|
|
19
|
-
var _a, _b;
|
|
20
|
-
if (((_a = this.rowSpecCache) === null || _a === void 0 ? void 0 : _a.source) !== this.spec) {
|
|
21
|
-
this.rowSpecCache = {
|
|
22
|
-
source: this.spec,
|
|
23
|
-
rowSpec: {
|
|
24
|
-
type: 'panel',
|
|
25
|
-
id: 'grid-row',
|
|
26
|
-
name: 'Row',
|
|
27
|
-
configs: { key: 'row' },
|
|
28
|
-
children: (_b = this.spec.children) !== null && _b !== void 0 ? _b : [],
|
|
29
|
-
},
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
return this.rowSpecCache.rowSpec;
|
|
33
|
-
}
|
|
34
|
-
rowErrors(row) {
|
|
35
|
-
const present = Object.fromEntries(Object.entries(row).filter(([, value]) => value !== '' && value !== null && value !== undefined));
|
|
36
|
-
return validateBrickSpecDataDetailed(this.rowSpec(), present, this.locale)
|
|
37
|
-
.errors;
|
|
38
|
-
}
|
|
39
|
-
visibleRowErrors(index) {
|
|
40
|
-
var _a, _b;
|
|
41
|
-
const row = (_a = this.rows()[index]) !== null && _a !== void 0 ? _a : {};
|
|
42
|
-
const touched = (_b = this.touched[index]) !== null && _b !== void 0 ? _b : {};
|
|
43
|
-
const errors = {};
|
|
44
|
-
for (const [key, message] of Object.entries(this.rowErrors(row))) {
|
|
45
|
-
if (touched[key])
|
|
46
|
-
errors[key] = message;
|
|
47
|
-
}
|
|
48
|
-
return errors;
|
|
49
|
-
}
|
|
50
|
-
handleRowChange(event) {
|
|
51
|
-
var _a, _b;
|
|
52
|
-
event.stopPropagation();
|
|
53
|
-
const origin = event.target;
|
|
54
|
-
const rowEl = origin.closest('[data-grid-row]');
|
|
55
|
-
const index = Number((_a = rowEl === null || rowEl === void 0 ? void 0 : rowEl.getAttribute('data-grid-row')) !== null && _a !== void 0 ? _a : -1);
|
|
56
|
-
if (index < 0)
|
|
57
|
-
return;
|
|
58
|
-
const rowTouched = Object.assign({}, ((_b = this.touched[index]) !== null && _b !== void 0 ? _b : {}));
|
|
59
|
-
for (const key of Object.keys(event.detail))
|
|
60
|
-
rowTouched[key] = true;
|
|
61
|
-
this.touched = Object.assign(Object.assign({}, this.touched), { [index]: rowTouched });
|
|
62
|
-
const rows = this.rows().map((row, i) => i === index ? Object.assign(Object.assign({}, row), event.detail) : row);
|
|
63
|
-
this.gridValueChange.emit(rows);
|
|
64
|
-
}
|
|
65
|
-
async validateRows() {
|
|
66
|
-
var _a, _b;
|
|
67
|
-
const rows = this.rows();
|
|
68
|
-
const gridKey = (_b = (_a = this.spec.configs) === null || _a === void 0 ? void 0 : _a.key) !== null && _b !== void 0 ? _b : 'grid';
|
|
69
|
-
const allTouched = {};
|
|
70
|
-
const errors = {};
|
|
71
|
-
rows.forEach((row, index) => {
|
|
72
|
-
var _a, _b;
|
|
73
|
-
const rowTouched = {};
|
|
74
|
-
for (const child of (_a = this.spec.children) !== null && _a !== void 0 ? _a : []) {
|
|
75
|
-
if ((_b = child.configs) === null || _b === void 0 ? void 0 : _b.key)
|
|
76
|
-
rowTouched[child.configs.key] = true;
|
|
77
|
-
}
|
|
78
|
-
allTouched[index] = rowTouched;
|
|
79
|
-
for (const [key, message] of Object.entries(this.rowErrors(row))) {
|
|
80
|
-
errors[`${gridKey}[${index}].${key}`] = message;
|
|
81
|
-
}
|
|
82
|
-
});
|
|
83
|
-
this.touched = allTouched;
|
|
84
|
-
return { valid: Object.keys(errors).length === 0, errors };
|
|
85
|
-
}
|
|
86
|
-
removeRow(index) {
|
|
87
|
-
const rows = this.rows().filter((_, i) => i !== index);
|
|
88
|
-
const touched = {};
|
|
89
|
-
for (const [key, value] of Object.entries(this.touched)) {
|
|
90
|
-
const i = Number(key);
|
|
91
|
-
if (i < index)
|
|
92
|
-
touched[i] = value;
|
|
93
|
-
else if (i > index)
|
|
94
|
-
touched[i - 1] = value;
|
|
95
|
-
}
|
|
96
|
-
this.touched = touched;
|
|
97
|
-
this.gridValueChange.emit(rows.length ? rows : undefined);
|
|
98
|
-
}
|
|
99
|
-
render() {
|
|
100
|
-
var _a;
|
|
101
|
-
const children = (_a = this.spec.children) !== null && _a !== void 0 ? _a : [];
|
|
102
|
-
const rows = this.rows();
|
|
103
|
-
return (h("div", { key: '1c77d72cd1482d673ffdb5b7d67ca200e55919d7', class: "fk-grid" }, rows.length === 0 ? (h("p", { class: "fk-grid__empty" }, fkT('grid.empty'))) : null, rows.map((row, index) => (h("div", { class: "fk-grid__row", "data-grid-row": index, key: index }, h("div", { class: "fk-grid__cells" }, children.map((child, childIndex) => (h("fk-brick-render", { brickSpec: child, data: row, dataMap: row, errors: this.visibleRowErrors(index), locale: this.locale, path: `grid.${index}.${childIndex}`, utils: this.utils })))), h("button", { type: "button", class: "fk-grid__remove", title: fkT('grid.removeRow'), disabled: this.disabled, onClick: (event) => {
|
|
104
|
-
event.preventDefault();
|
|
105
|
-
this.removeRow(index);
|
|
106
|
-
} }, "\u2715")))), h("button", { key: '9bf04c364b3262c436ffb580daf802d15f29de57', type: "button", class: "fk-grid__add", disabled: this.disabled, onClick: this.addRow }, fkT('grid.addRow'))));
|
|
107
|
-
}
|
|
108
|
-
static get is() { return "fk-data-grid"; }
|
|
109
|
-
static get encapsulation() { return "scoped"; }
|
|
110
|
-
static get originalStyleUrls() {
|
|
111
|
-
return {
|
|
112
|
-
"$": ["fk-data-grid.css"]
|
|
113
|
-
};
|
|
114
|
-
}
|
|
115
|
-
static get styleUrls() {
|
|
116
|
-
return {
|
|
117
|
-
"$": ["fk-data-grid.css"]
|
|
118
|
-
};
|
|
119
|
-
}
|
|
120
|
-
static get properties() {
|
|
121
|
-
return {
|
|
122
|
-
"spec": {
|
|
123
|
-
"type": "unknown",
|
|
124
|
-
"mutable": false,
|
|
125
|
-
"complexType": {
|
|
126
|
-
"original": "BrickSpec",
|
|
127
|
-
"resolved": "BrickSpec",
|
|
128
|
-
"references": {
|
|
129
|
-
"BrickSpec": {
|
|
130
|
-
"location": "import",
|
|
131
|
-
"path": "@streamline-pulse/formkrafter-core",
|
|
132
|
-
"id": "../core/dist/index.d.ts::BrickSpec",
|
|
133
|
-
"referenceLocation": "BrickSpec"
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
},
|
|
137
|
-
"required": true,
|
|
138
|
-
"optional": false,
|
|
139
|
-
"docs": {
|
|
140
|
-
"tags": [],
|
|
141
|
-
"text": ""
|
|
142
|
-
},
|
|
143
|
-
"getter": false,
|
|
144
|
-
"setter": false
|
|
145
|
-
},
|
|
146
|
-
"value": {
|
|
147
|
-
"type": "unknown",
|
|
148
|
-
"mutable": false,
|
|
149
|
-
"complexType": {
|
|
150
|
-
"original": "unknown",
|
|
151
|
-
"resolved": "unknown",
|
|
152
|
-
"references": {}
|
|
153
|
-
},
|
|
154
|
-
"required": false,
|
|
155
|
-
"optional": true,
|
|
156
|
-
"docs": {
|
|
157
|
-
"tags": [],
|
|
158
|
-
"text": ""
|
|
159
|
-
},
|
|
160
|
-
"getter": false,
|
|
161
|
-
"setter": false
|
|
162
|
-
},
|
|
163
|
-
"disabled": {
|
|
164
|
-
"type": "boolean",
|
|
165
|
-
"mutable": false,
|
|
166
|
-
"complexType": {
|
|
167
|
-
"original": "boolean",
|
|
168
|
-
"resolved": "boolean",
|
|
169
|
-
"references": {}
|
|
170
|
-
},
|
|
171
|
-
"required": false,
|
|
172
|
-
"optional": false,
|
|
173
|
-
"docs": {
|
|
174
|
-
"tags": [],
|
|
175
|
-
"text": ""
|
|
176
|
-
},
|
|
177
|
-
"getter": false,
|
|
178
|
-
"setter": false,
|
|
179
|
-
"reflect": false,
|
|
180
|
-
"attribute": "disabled",
|
|
181
|
-
"defaultValue": "false"
|
|
182
|
-
},
|
|
183
|
-
"locale": {
|
|
184
|
-
"type": "string",
|
|
185
|
-
"mutable": false,
|
|
186
|
-
"complexType": {
|
|
187
|
-
"original": "string",
|
|
188
|
-
"resolved": "string",
|
|
189
|
-
"references": {}
|
|
190
|
-
},
|
|
191
|
-
"required": false,
|
|
192
|
-
"optional": true,
|
|
193
|
-
"docs": {
|
|
194
|
-
"tags": [],
|
|
195
|
-
"text": ""
|
|
196
|
-
},
|
|
197
|
-
"getter": false,
|
|
198
|
-
"setter": false,
|
|
199
|
-
"reflect": false,
|
|
200
|
-
"attribute": "locale"
|
|
201
|
-
},
|
|
202
|
-
"utils": {
|
|
203
|
-
"type": "unknown",
|
|
204
|
-
"mutable": false,
|
|
205
|
-
"complexType": {
|
|
206
|
-
"original": "Utils",
|
|
207
|
-
"resolved": "object & { validateForm: () => { isValid: boolean; }; }",
|
|
208
|
-
"references": {
|
|
209
|
-
"Utils": {
|
|
210
|
-
"location": "import",
|
|
211
|
-
"path": "@streamline-pulse/formkrafter-core",
|
|
212
|
-
"id": "../core/dist/index.d.ts::Utils",
|
|
213
|
-
"referenceLocation": "Utils"
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
},
|
|
217
|
-
"required": true,
|
|
218
|
-
"optional": false,
|
|
219
|
-
"docs": {
|
|
220
|
-
"tags": [],
|
|
221
|
-
"text": ""
|
|
222
|
-
},
|
|
223
|
-
"getter": false,
|
|
224
|
-
"setter": false
|
|
225
|
-
}
|
|
226
|
-
};
|
|
227
|
-
}
|
|
228
|
-
static get states() {
|
|
229
|
-
return {
|
|
230
|
-
"touched": {}
|
|
231
|
-
};
|
|
232
|
-
}
|
|
233
|
-
static get events() {
|
|
234
|
-
return [{
|
|
235
|
-
"method": "gridValueChange",
|
|
236
|
-
"name": "gridValueChange",
|
|
237
|
-
"bubbles": true,
|
|
238
|
-
"cancelable": true,
|
|
239
|
-
"composed": true,
|
|
240
|
-
"docs": {
|
|
241
|
-
"tags": [],
|
|
242
|
-
"text": ""
|
|
243
|
-
},
|
|
244
|
-
"complexType": {
|
|
245
|
-
"original": "Array<Record<string, unknown>> | undefined",
|
|
246
|
-
"resolved": "Record<string, unknown>[]",
|
|
247
|
-
"references": {
|
|
248
|
-
"Array": {
|
|
249
|
-
"location": "global",
|
|
250
|
-
"id": "global::Array"
|
|
251
|
-
},
|
|
252
|
-
"Record": {
|
|
253
|
-
"location": "global",
|
|
254
|
-
"id": "global::Record"
|
|
255
|
-
}
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
}];
|
|
259
|
-
}
|
|
260
|
-
static get methods() {
|
|
261
|
-
return {
|
|
262
|
-
"validateRows": {
|
|
263
|
-
"complexType": {
|
|
264
|
-
"signature": "() => Promise<ValidationResult>",
|
|
265
|
-
"parameters": [],
|
|
266
|
-
"references": {
|
|
267
|
-
"Promise": {
|
|
268
|
-
"location": "global",
|
|
269
|
-
"id": "global::Promise"
|
|
270
|
-
},
|
|
271
|
-
"ValidationResult": {
|
|
272
|
-
"location": "import",
|
|
273
|
-
"path": "@streamline-pulse/formkrafter-core",
|
|
274
|
-
"id": "../core/dist/index.d.ts::ValidationResult",
|
|
275
|
-
"referenceLocation": "ValidationResult"
|
|
276
|
-
},
|
|
277
|
-
"Record": {
|
|
278
|
-
"location": "global",
|
|
279
|
-
"id": "global::Record"
|
|
280
|
-
}
|
|
281
|
-
},
|
|
282
|
-
"return": "Promise<ValidationResult>"
|
|
283
|
-
},
|
|
284
|
-
"docs": {
|
|
285
|
-
"text": "",
|
|
286
|
-
"tags": []
|
|
287
|
-
}
|
|
288
|
-
}
|
|
289
|
-
};
|
|
290
|
-
}
|
|
291
|
-
static get listeners() {
|
|
292
|
-
return [{
|
|
293
|
-
"name": "brickDataChange",
|
|
294
|
-
"method": "handleRowChange",
|
|
295
|
-
"target": undefined,
|
|
296
|
-
"capture": false,
|
|
297
|
-
"passive": false
|
|
298
|
-
}];
|
|
299
|
-
}
|
|
300
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
.fk-drop {
|
|
2
|
-
display: flex;
|
|
3
|
-
align-items: center;
|
|
4
|
-
justify-content: center;
|
|
5
|
-
min-height: 40px;
|
|
6
|
-
margin-top: calc(var(--fk-spacing) / 2);
|
|
7
|
-
border: 1px dashed var(--fk-color-border);
|
|
8
|
-
border-radius: var(--fk-radius);
|
|
9
|
-
color: var(--fk-color-muted);
|
|
10
|
-
font-size: 0.75rem;
|
|
11
|
-
transition: border-color 120ms ease, background-color 120ms ease;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.fk-drop--over {
|
|
15
|
-
border-color: var(--fk-color-primary);
|
|
16
|
-
background: color-mix(in srgb, var(--fk-color-primary) 8%, transparent);
|
|
17
|
-
color: var(--fk-color-primary);
|
|
18
|
-
}
|
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
import { h } from "@stencil/core";
|
|
2
|
-
import { dropTargetForElements } from "@atlaskit/pragmatic-drag-and-drop/element/adapter";
|
|
3
|
-
import { toBrickDropDetail } from "../../utils/drop";
|
|
4
|
-
import { fkT } from "../../i18n/i18n";
|
|
5
|
-
export class FkDropArea {
|
|
6
|
-
constructor() {
|
|
7
|
-
this.isOver = false;
|
|
8
|
-
}
|
|
9
|
-
componentDidLoad() {
|
|
10
|
-
this.cleanup = dropTargetForElements({
|
|
11
|
-
element: this.host,
|
|
12
|
-
onDragEnter: () => (this.isOver = true),
|
|
13
|
-
onDragLeave: () => (this.isOver = false),
|
|
14
|
-
onDrop: ({ source, location }) => {
|
|
15
|
-
var _a;
|
|
16
|
-
this.isOver = false;
|
|
17
|
-
if (((_a = location.current.dropTargets[0]) === null || _a === void 0 ? void 0 : _a.element) !== this.host)
|
|
18
|
-
return;
|
|
19
|
-
const detail = toBrickDropDetail(source.data, this.path);
|
|
20
|
-
if (detail)
|
|
21
|
-
this.brickDrop.emit(detail);
|
|
22
|
-
},
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
disconnectedCallback() {
|
|
26
|
-
var _a;
|
|
27
|
-
(_a = this.cleanup) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
28
|
-
}
|
|
29
|
-
render() {
|
|
30
|
-
return (h("div", { key: '727b7005fcc58e3b6b2f455b03312fd91e3b063b', class: { 'fk-drop': true, 'fk-drop--over': this.isOver } }, h("span", { key: '41d1158e101100ebb229b74aec2ddfaf1aa57202', class: "fk-drop__hint" }, fkT('drop.hint'))));
|
|
31
|
-
}
|
|
32
|
-
static get is() { return "fk-drop-area"; }
|
|
33
|
-
static get encapsulation() { return "scoped"; }
|
|
34
|
-
static get originalStyleUrls() {
|
|
35
|
-
return {
|
|
36
|
-
"$": ["fk-drop-area.css"]
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
static get styleUrls() {
|
|
40
|
-
return {
|
|
41
|
-
"$": ["fk-drop-area.css"]
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
static get properties() {
|
|
45
|
-
return {
|
|
46
|
-
"path": {
|
|
47
|
-
"type": "string",
|
|
48
|
-
"mutable": false,
|
|
49
|
-
"complexType": {
|
|
50
|
-
"original": "string",
|
|
51
|
-
"resolved": "string",
|
|
52
|
-
"references": {}
|
|
53
|
-
},
|
|
54
|
-
"required": true,
|
|
55
|
-
"optional": false,
|
|
56
|
-
"docs": {
|
|
57
|
-
"tags": [],
|
|
58
|
-
"text": ""
|
|
59
|
-
},
|
|
60
|
-
"getter": false,
|
|
61
|
-
"setter": false,
|
|
62
|
-
"reflect": false,
|
|
63
|
-
"attribute": "path"
|
|
64
|
-
}
|
|
65
|
-
};
|
|
66
|
-
}
|
|
67
|
-
static get states() {
|
|
68
|
-
return {
|
|
69
|
-
"isOver": {}
|
|
70
|
-
};
|
|
71
|
-
}
|
|
72
|
-
static get events() {
|
|
73
|
-
return [{
|
|
74
|
-
"method": "brickDrop",
|
|
75
|
-
"name": "brickDrop",
|
|
76
|
-
"bubbles": true,
|
|
77
|
-
"cancelable": true,
|
|
78
|
-
"composed": true,
|
|
79
|
-
"docs": {
|
|
80
|
-
"tags": [],
|
|
81
|
-
"text": ""
|
|
82
|
-
},
|
|
83
|
-
"complexType": {
|
|
84
|
-
"original": "BrickDropDetail",
|
|
85
|
-
"resolved": "BrickDropDetail",
|
|
86
|
-
"references": {
|
|
87
|
-
"BrickDropDetail": {
|
|
88
|
-
"location": "import",
|
|
89
|
-
"path": "../../utils/events",
|
|
90
|
-
"id": "src/utils/events.ts::BrickDropDetail",
|
|
91
|
-
"referenceLocation": "BrickDropDetail"
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
}];
|
|
96
|
-
}
|
|
97
|
-
static get elementRef() { return "host"; }
|
|
98
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
.fk-empty {
|
|
2
|
-
display: flex;
|
|
3
|
-
flex-direction: column;
|
|
4
|
-
align-items: center;
|
|
5
|
-
justify-content: center;
|
|
6
|
-
gap: calc(var(--fk-spacing) / 2);
|
|
7
|
-
min-height: 160px;
|
|
8
|
-
border: 2px dashed var(--fk-color-border);
|
|
9
|
-
border-radius: var(--fk-radius);
|
|
10
|
-
color: var(--fk-color-muted);
|
|
11
|
-
text-align: center;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.fk-empty__title {
|
|
15
|
-
margin: 0;
|
|
16
|
-
font-weight: 600;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.fk-empty__hint {
|
|
20
|
-
margin: 0;
|
|
21
|
-
font-size: 0.875rem;
|
|
22
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { Host, h } from "@stencil/core";
|
|
2
|
-
import { fkT } from "../../i18n/i18n";
|
|
3
|
-
export class FkEmptyForm {
|
|
4
|
-
render() {
|
|
5
|
-
return (h(Host, { key: '1b0ab4cd1d988a4800deeb6e3cfd8f5074520f6b' }, h("div", { key: '65b551e1cab6162514ad941b21e318c5f19b824a', class: "fk-empty" }, h("p", { key: 'c4eba1c6fecb4f2669f1c4dfb09cd816790a5ebf', class: "fk-empty__title" }, fkT('empty.title')), h("p", { key: '751bb3a2fc07982c90a214bd1e71592ec03d988d', class: "fk-empty__hint" }, fkT('empty.hint')))));
|
|
6
|
-
}
|
|
7
|
-
static get is() { return "fk-empty-form"; }
|
|
8
|
-
static get encapsulation() { return "scoped"; }
|
|
9
|
-
static get originalStyleUrls() {
|
|
10
|
-
return {
|
|
11
|
-
"$": ["fk-empty-form.css"]
|
|
12
|
-
};
|
|
13
|
-
}
|
|
14
|
-
static get styleUrls() {
|
|
15
|
-
return {
|
|
16
|
-
"$": ["fk-empty-form.css"]
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
}
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
:host {
|
|
2
|
-
display: block;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
.fk-file {
|
|
6
|
-
display: flex;
|
|
7
|
-
flex-direction: column;
|
|
8
|
-
gap: calc(var(--fk-spacing) / 2);
|
|
9
|
-
align-items: flex-start;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
.fk-file__native {
|
|
13
|
-
display: none;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.fk-file__choose {
|
|
17
|
-
font: inherit;
|
|
18
|
-
font-size: 0.85rem;
|
|
19
|
-
padding: calc(var(--fk-spacing) / 1.5) var(--fk-spacing);
|
|
20
|
-
border: 1px dashed var(--fk-color-border);
|
|
21
|
-
border-radius: var(--fk-radius);
|
|
22
|
-
background: transparent;
|
|
23
|
-
color: var(--fk-color-muted);
|
|
24
|
-
cursor: pointer;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.fk-file__choose:hover:not(:disabled) {
|
|
28
|
-
border-color: var(--fk-color-primary);
|
|
29
|
-
color: var(--fk-color-primary);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.fk-file__choose:disabled {
|
|
33
|
-
opacity: 0.55;
|
|
34
|
-
cursor: not-allowed;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
.fk-file__selected {
|
|
38
|
-
display: flex;
|
|
39
|
-
align-items: center;
|
|
40
|
-
gap: var(--fk-spacing);
|
|
41
|
-
width: 100%;
|
|
42
|
-
box-sizing: border-box;
|
|
43
|
-
padding: calc(var(--fk-spacing) * 0.75) var(--fk-spacing);
|
|
44
|
-
border: 1px solid var(--fk-color-border);
|
|
45
|
-
border-radius: var(--fk-radius);
|
|
46
|
-
background: var(--fk-color-surface);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
.fk-file__icon {
|
|
50
|
-
display: inline-flex;
|
|
51
|
-
flex-shrink: 0;
|
|
52
|
-
color: var(--fk-color-primary);
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
.fk-file__meta {
|
|
56
|
-
display: flex;
|
|
57
|
-
flex-direction: column;
|
|
58
|
-
gap: 2px;
|
|
59
|
-
flex: 1;
|
|
60
|
-
min-width: 0;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
.fk-file__name {
|
|
64
|
-
font-size: 0.85rem;
|
|
65
|
-
font-weight: 600;
|
|
66
|
-
color: var(--fk-color-text);
|
|
67
|
-
overflow: hidden;
|
|
68
|
-
text-overflow: ellipsis;
|
|
69
|
-
white-space: nowrap;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
.fk-file__size {
|
|
73
|
-
font-size: 0.72rem;
|
|
74
|
-
color: var(--fk-color-muted);
|
|
75
|
-
white-space: nowrap;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
.fk-file__remove {
|
|
79
|
-
border: none;
|
|
80
|
-
background: transparent;
|
|
81
|
-
color: var(--fk-color-muted);
|
|
82
|
-
font-size: 0.8rem;
|
|
83
|
-
cursor: pointer;
|
|
84
|
-
padding: 4px 6px;
|
|
85
|
-
border-radius: calc(var(--fk-radius) / 2);
|
|
86
|
-
flex-shrink: 0;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
.fk-file__remove:hover:not(:disabled) {
|
|
90
|
-
background: color-mix(in srgb, var(--fk-color-danger) 12%, transparent);
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
.fk-file__remove:hover:not(:disabled) {
|
|
94
|
-
color: var(--fk-color-danger);
|
|
95
|
-
}
|