@xlabs-store/core 0.0.2 → 0.0.3
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/components/index.js +1 -1
- package/components/p-CQ2VND9-.js +1 -0
- package/components/p-CQQI-pRu.js +1 -0
- package/components/p-CkwLFDlS.js +1 -0
- package/components/p-CzHtwC1k.js +1 -0
- package/components/{p-BlvrLhyv.js → p-DqayamUz.js} +1 -1
- package/components/x-form-builder.js +1 -1
- package/components/x-icon-picker-dropdown-content.js +1 -1
- package/components/x-input-icon.js +1 -1
- package/components/x-login.js +1 -1
- package/components/x-table.js +1 -1
- package/dist/cjs/icons-BfHE2jcr.js +19261 -0
- package/dist/cjs/index.cjs.js +2 -2
- package/dist/cjs/{schema-builder-BKX4QdTc.js → schema-builder-DAwDwgIM.js} +98 -14
- package/dist/cjs/x-address_51.cjs.entry.js +115 -11
- package/dist/cjs/x-icon-picker-dropdown-content.cjs.entry.js +1 -1
- package/dist/collection/components/x-form-builder/services/schema/condition-builder.js +48 -6
- package/dist/collection/components/x-form-builder/services/schema/form-mapping.js +2 -2
- package/dist/collection/components/x-form-builder/utils/condition-engine.js +48 -6
- package/dist/collection/components/x-form-builder/x-form-builder.js +96 -6
- package/dist/collection/components/x-icon/icons.js +11462 -11492
- package/dist/collection/components/x-table/x-table.js +18 -4
- package/dist/esm/icons-CQ2VND9-.js +19259 -0
- package/dist/esm/index.js +2 -2
- package/dist/esm/{schema-builder-DlGEzg5B.js → schema-builder-CekbhOnD.js} +98 -14
- package/dist/esm/x-address_51.entry.js +115 -11
- package/dist/esm/x-icon-picker-dropdown-content.entry.js +1 -1
- package/dist/types/components/x-form-builder/types/common/field-types-enum.d.ts +1 -1
- package/dist/types/components/x-form-builder/types/fields/advanced-fields.d.ts +1 -0
- package/dist/types/components/x-form-builder/types/fields/form-field-union.d.ts +2 -2
- package/dist/types/components/x-form-builder/types/fields/layout-fields.d.ts +10 -1
- package/dist/types/components/x-form-builder/types/fields/special-input-fields.d.ts +3 -0
- package/dist/types/components/x-form-builder/x-form-builder.d.ts +2 -0
- package/dist/xlabs/index.esm.js +1 -1
- package/dist/xlabs/{p-45fda37b.entry.js → p-99c568fd.entry.js} +1 -1
- package/dist/xlabs/p-CQ2VND9-.js +1 -0
- package/dist/xlabs/p-CkwLFDlS.js +1 -0
- package/dist/xlabs/p-a4995e36.entry.js +1 -0
- package/dist/xlabs/xlabs.esm.js +1 -1
- package/package.json +1 -1
- package/components/p-BGNOiTqa.js +0 -1
- package/components/p-BgCjF74f.js +0 -1
- package/components/p-xf66Fag-.js +0 -1
- package/components/p-xzKm-BQN.js +0 -1
- package/dist/cjs/icons-DJ-kuboh.js +0 -19291
- package/dist/esm/icons-BgCjF74f.js +0 -19289
- package/dist/xlabs/p-239cf367.entry.js +0 -1
- package/dist/xlabs/p-BgCjF74f.js +0 -1
- package/dist/xlabs/p-xf66Fag-.js +0 -1
package/dist/esm/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { m as message, n as notification } from './notification-service-CUyIF7K-.js';
|
|
2
2
|
export { M as modal } from './modal-service-ikfAY1gn.js';
|
|
3
|
-
export { S as SchemaBuilder } from './schema-builder-
|
|
4
|
-
export { I as Icons } from './icons-
|
|
3
|
+
export { S as SchemaBuilder } from './schema-builder-CekbhOnD.js';
|
|
4
|
+
export { I as Icons } from './icons-CQ2VND9-.js';
|
|
5
5
|
import './portal-controller-DM8AggMt.js';
|
|
6
6
|
import './locale.service-DFADJBLL.js';
|
|
@@ -90,12 +90,26 @@ function evaluateCondition(condition, formValues, context) {
|
|
|
90
90
|
const result = (() => {
|
|
91
91
|
switch (operator) {
|
|
92
92
|
case 'equals':
|
|
93
|
+
if ((typeof actualValue === 'string' && typeof expectedValue === 'number') ||
|
|
94
|
+
(typeof actualValue === 'number' && typeof expectedValue === 'string')) {
|
|
95
|
+
return String(actualValue) === String(expectedValue);
|
|
96
|
+
}
|
|
93
97
|
return actualValue === expectedValue;
|
|
94
98
|
case 'notEquals':
|
|
99
|
+
if ((typeof actualValue === 'string' && typeof expectedValue === 'number') ||
|
|
100
|
+
(typeof actualValue === 'number' && typeof expectedValue === 'string')) {
|
|
101
|
+
return String(actualValue) !== String(expectedValue);
|
|
102
|
+
}
|
|
95
103
|
return actualValue !== expectedValue;
|
|
96
104
|
case 'contains':
|
|
97
105
|
if (Array.isArray(actualValue)) {
|
|
98
|
-
return actualValue.
|
|
106
|
+
return actualValue.some(item => {
|
|
107
|
+
if ((typeof item === 'string' && typeof expectedValue === 'number') ||
|
|
108
|
+
(typeof item === 'number' && typeof expectedValue === 'string')) {
|
|
109
|
+
return String(item) === String(expectedValue);
|
|
110
|
+
}
|
|
111
|
+
return item === expectedValue;
|
|
112
|
+
});
|
|
99
113
|
}
|
|
100
114
|
if (typeof actualValue === 'string') {
|
|
101
115
|
return actualValue.includes(String(expectedValue));
|
|
@@ -103,7 +117,13 @@ function evaluateCondition(condition, formValues, context) {
|
|
|
103
117
|
return false;
|
|
104
118
|
case 'notContains':
|
|
105
119
|
if (Array.isArray(actualValue)) {
|
|
106
|
-
return !actualValue.
|
|
120
|
+
return !actualValue.some(item => {
|
|
121
|
+
if ((typeof item === 'string' && typeof expectedValue === 'number') ||
|
|
122
|
+
(typeof item === 'number' && typeof expectedValue === 'string')) {
|
|
123
|
+
return String(item) === String(expectedValue);
|
|
124
|
+
}
|
|
125
|
+
return item === expectedValue;
|
|
126
|
+
});
|
|
107
127
|
}
|
|
108
128
|
if (typeof actualValue === 'string') {
|
|
109
129
|
return !actualValue.includes(String(expectedValue));
|
|
@@ -129,24 +149,46 @@ function evaluateCondition(condition, formValues, context) {
|
|
|
129
149
|
return String(actualValue).endsWith(String(expectedValue));
|
|
130
150
|
case 'in':
|
|
131
151
|
if (Array.isArray(expectedValue)) {
|
|
132
|
-
return expectedValue.
|
|
152
|
+
return expectedValue.some(item => {
|
|
153
|
+
if ((typeof item === 'string' && typeof actualValue === 'number') ||
|
|
154
|
+
(typeof item === 'number' && typeof actualValue === 'string')) {
|
|
155
|
+
return String(item) === String(actualValue);
|
|
156
|
+
}
|
|
157
|
+
return item === actualValue;
|
|
158
|
+
});
|
|
133
159
|
}
|
|
134
160
|
if (typeof expectedValue === 'string') {
|
|
135
161
|
return expectedValue
|
|
136
162
|
.split(',')
|
|
137
163
|
.map(v => v.trim())
|
|
138
|
-
.
|
|
164
|
+
.some(item => {
|
|
165
|
+
if (typeof actualValue === 'number') {
|
|
166
|
+
return item === String(actualValue);
|
|
167
|
+
}
|
|
168
|
+
return item === actualValue;
|
|
169
|
+
});
|
|
139
170
|
}
|
|
140
171
|
return false;
|
|
141
172
|
case 'notIn':
|
|
142
173
|
if (Array.isArray(expectedValue)) {
|
|
143
|
-
return !expectedValue.
|
|
174
|
+
return !expectedValue.some(item => {
|
|
175
|
+
if ((typeof item === 'string' && typeof actualValue === 'number') ||
|
|
176
|
+
(typeof item === 'number' && typeof actualValue === 'string')) {
|
|
177
|
+
return String(item) === String(actualValue);
|
|
178
|
+
}
|
|
179
|
+
return item === actualValue;
|
|
180
|
+
});
|
|
144
181
|
}
|
|
145
182
|
if (typeof expectedValue === 'string') {
|
|
146
183
|
return !expectedValue
|
|
147
184
|
.split(',')
|
|
148
185
|
.map(v => v.trim())
|
|
149
|
-
.
|
|
186
|
+
.some(item => {
|
|
187
|
+
if (typeof actualValue === 'number') {
|
|
188
|
+
return item === String(actualValue);
|
|
189
|
+
}
|
|
190
|
+
return item === actualValue;
|
|
191
|
+
});
|
|
150
192
|
}
|
|
151
193
|
return true;
|
|
152
194
|
default:
|
|
@@ -177,16 +219,30 @@ class ConditionOperators {
|
|
|
177
219
|
}
|
|
178
220
|
equals(option, field, value) {
|
|
179
221
|
value = ValueUtil.detect(field, value);
|
|
222
|
+
if ((typeof value === 'string' && typeof option.value === 'number') ||
|
|
223
|
+
(typeof value === 'number' && typeof option.value === 'string')) {
|
|
224
|
+
return String(value) === String(option.value);
|
|
225
|
+
}
|
|
180
226
|
return option.value === value;
|
|
181
227
|
}
|
|
182
228
|
notEquals(option, field, value) {
|
|
183
229
|
value = ValueUtil.detect(field, value);
|
|
230
|
+
if ((typeof value === 'string' && typeof option.value === 'number') ||
|
|
231
|
+
(typeof value === 'number' && typeof option.value === 'string')) {
|
|
232
|
+
return String(value) !== String(option.value);
|
|
233
|
+
}
|
|
184
234
|
return option.value !== value;
|
|
185
235
|
}
|
|
186
236
|
contains(option, field, value) {
|
|
187
237
|
value = ValueUtil.detect(field, value);
|
|
188
238
|
if (Array.isArray(value)) {
|
|
189
|
-
return value.
|
|
239
|
+
return value.some(item => {
|
|
240
|
+
if ((typeof item === 'string' && typeof option.value === 'number') ||
|
|
241
|
+
(typeof item === 'number' && typeof option.value === 'string')) {
|
|
242
|
+
return String(item) === String(option.value);
|
|
243
|
+
}
|
|
244
|
+
return item === option.value;
|
|
245
|
+
});
|
|
190
246
|
}
|
|
191
247
|
if (typeof value === 'string') {
|
|
192
248
|
return value.includes(String(option.value));
|
|
@@ -220,7 +276,13 @@ class ConditionOperators {
|
|
|
220
276
|
notContains(option, field, value) {
|
|
221
277
|
value = ValueUtil.detect(field, value);
|
|
222
278
|
if (Array.isArray(value)) {
|
|
223
|
-
return !value.
|
|
279
|
+
return !value.some(item => {
|
|
280
|
+
if ((typeof item === 'string' && typeof option.value === 'number') ||
|
|
281
|
+
(typeof item === 'number' && typeof option.value === 'string')) {
|
|
282
|
+
return String(item) === String(option.value);
|
|
283
|
+
}
|
|
284
|
+
return item === option.value;
|
|
285
|
+
});
|
|
224
286
|
}
|
|
225
287
|
if (typeof value === 'string') {
|
|
226
288
|
return !value.includes(String(option.value));
|
|
@@ -260,26 +322,48 @@ class ConditionOperators {
|
|
|
260
322
|
in(option, field, value) {
|
|
261
323
|
value = ValueUtil.detect(field, value);
|
|
262
324
|
if (Array.isArray(option.value)) {
|
|
263
|
-
return option.value.
|
|
325
|
+
return option.value.some(item => {
|
|
326
|
+
if ((typeof item === 'string' && typeof value === 'number') ||
|
|
327
|
+
(typeof item === 'number' && typeof value === 'string')) {
|
|
328
|
+
return String(item) === String(value);
|
|
329
|
+
}
|
|
330
|
+
return item === value;
|
|
331
|
+
});
|
|
264
332
|
}
|
|
265
333
|
if (typeof option.value === 'string') {
|
|
266
334
|
return option.value
|
|
267
335
|
.split(',')
|
|
268
336
|
.map(v => v.trim())
|
|
269
|
-
.
|
|
337
|
+
.some(item => {
|
|
338
|
+
if (typeof value === 'number') {
|
|
339
|
+
return item === String(value);
|
|
340
|
+
}
|
|
341
|
+
return item === value;
|
|
342
|
+
});
|
|
270
343
|
}
|
|
271
344
|
return false;
|
|
272
345
|
}
|
|
273
346
|
notIn(option, field, value) {
|
|
274
347
|
value = ValueUtil.detect(field, value);
|
|
275
348
|
if (Array.isArray(option.value)) {
|
|
276
|
-
return !option.value.
|
|
349
|
+
return !option.value.some(item => {
|
|
350
|
+
if ((typeof item === 'string' && typeof value === 'number') ||
|
|
351
|
+
(typeof item === 'number' && typeof value === 'string')) {
|
|
352
|
+
return String(item) === String(value);
|
|
353
|
+
}
|
|
354
|
+
return item === value;
|
|
355
|
+
});
|
|
277
356
|
}
|
|
278
357
|
if (typeof option.value === 'string') {
|
|
279
358
|
return !option.value
|
|
280
359
|
.split(',')
|
|
281
360
|
.map(v => v.trim())
|
|
282
|
-
.
|
|
361
|
+
.some(item => {
|
|
362
|
+
if (typeof value === 'number') {
|
|
363
|
+
return item === String(value);
|
|
364
|
+
}
|
|
365
|
+
return item === value;
|
|
366
|
+
});
|
|
283
367
|
}
|
|
284
368
|
return true;
|
|
285
369
|
}
|
|
@@ -1401,8 +1485,8 @@ class FormMapping extends FormGroup {
|
|
|
1401
1485
|
// Safely merge Maps
|
|
1402
1486
|
child_paths.forEach((v, k) => paths.set(k, v));
|
|
1403
1487
|
}
|
|
1404
|
-
// Support tabs mapping recursively
|
|
1405
|
-
if (field.type === 'tabs' && field.items && Array.isArray(field.items)) {
|
|
1488
|
+
// Support tabs and columns mapping recursively
|
|
1489
|
+
if ((field.type === 'tabs' || String(field.type).startsWith('columns-')) && field.items && Array.isArray(field.items)) {
|
|
1406
1490
|
for (const item of field.items) {
|
|
1407
1491
|
if (item && Array.isArray(item.elements)) {
|
|
1408
1492
|
const child_paths = mappingRecursive(item.elements);
|
|
@@ -2,7 +2,7 @@ import { r as registerInstance, c as createEvent, h, H as Host, a as getElement
|
|
|
2
2
|
import { P as PortalController } from './portal-controller-DM8AggMt.js';
|
|
3
3
|
import { g as getIcon } from './config-RKpMhZmc.js';
|
|
4
4
|
import { t as translate } from './locale.service-DFADJBLL.js';
|
|
5
|
-
import { U as Utils, S as SchemaBuilder } from './schema-builder-
|
|
5
|
+
import { U as Utils, S as SchemaBuilder } from './schema-builder-CekbhOnD.js';
|
|
6
6
|
import { A as AbstractControl } from './abstract-control-BtYiIQqg.js';
|
|
7
7
|
import { T as TreeService } from './tree.service-iG9CbEpE.js';
|
|
8
8
|
|
|
@@ -10263,6 +10263,15 @@ const XFormBuilder = class {
|
|
|
10263
10263
|
gridTemplateColumns: `repeat(${field.columns || 12}, minmax(0, 1fr))`,
|
|
10264
10264
|
gap: `${field.gap || 15}px`,
|
|
10265
10265
|
} }, 'elements' in field && field.elements ? this.bind(field.elements, field) : null));
|
|
10266
|
+
const ColumnsCallback = (field) => {
|
|
10267
|
+
const items = field.items || [];
|
|
10268
|
+
return (h("div", { style: {
|
|
10269
|
+
display: 'grid',
|
|
10270
|
+
gridTemplateColumns: `repeat(12, minmax(0, 1fr))`,
|
|
10271
|
+
gap: `${field.gap || 15}px`,
|
|
10272
|
+
width: '100%',
|
|
10273
|
+
} }, items.map((item) => (h("div", { style: { gridColumn: `span ${item.span || 12}` }, key: item.key }, item.elements ? this.bind(item.elements, field) : null)))));
|
|
10274
|
+
};
|
|
10266
10275
|
const MapsCallback = (field) => {
|
|
10267
10276
|
const width = field.width || '100%';
|
|
10268
10277
|
const height = field.height || 400;
|
|
@@ -10527,7 +10536,16 @@ const XFormBuilder = class {
|
|
|
10527
10536
|
dataIndex: col.dataIndex || col.key,
|
|
10528
10537
|
slot: col.actions ? col.slot || col.key || 'action' : col.slot,
|
|
10529
10538
|
}));
|
|
10530
|
-
|
|
10539
|
+
const controlVal = field.control?.value;
|
|
10540
|
+
const isValArrayOfObjects = Array.isArray(controlVal) && controlVal.length > 0 && typeof controlVal[0] === 'object';
|
|
10541
|
+
const dataSource = isValArrayOfObjects ? controlVal : (f.dataSource || []);
|
|
10542
|
+
const rowSelection = f.rowSelection
|
|
10543
|
+
? {
|
|
10544
|
+
...f.rowSelection,
|
|
10545
|
+
selectedRowKeys: Array.isArray(controlVal) && !isValArrayOfObjects ? controlVal : [],
|
|
10546
|
+
}
|
|
10547
|
+
: undefined;
|
|
10548
|
+
return (h("x-table", { ...commonProps, columns: columns, dataSource: dataSource, rowKey: f.rowKey || 'id', tableTitle: f.tableTitle, pagination: f.pagination, tableScroll: f.tableScroll, rowSelection: rowSelection, size: f.size, bordered: f.bordered, loading: f.loading, showHeader: f.showHeader, emptyText: f.emptyText, resizableColumns: f.resizableColumns, draggableColumns: f.draggableColumns, draggableRows: f.draggableRows, sticky: f.sticky, onXSelectionChange: ev => {
|
|
10531
10549
|
if (f.rowSelection) {
|
|
10532
10550
|
onChange(ev.detail.selectedRowKeys);
|
|
10533
10551
|
}
|
|
@@ -10535,7 +10553,7 @@ const XFormBuilder = class {
|
|
|
10535
10553
|
console.log('x-form-builder: Table changed:', ev.detail);
|
|
10536
10554
|
} }, columns
|
|
10537
10555
|
.filter(col => col.actions)
|
|
10538
|
-
.map(col => (
|
|
10556
|
+
.map(col => (dataSource || []).map((record, index) => (h("div", { slot: `${col.slot}-${index}`, style: { display: 'flex', gap: '8px' } }, (col.actions || []).map(action => {
|
|
10539
10557
|
const button = (h("x-button", { type: action.type === 'button' ? 'primary' : 'link', size: "small", danger: action.danger, onClick: e => {
|
|
10540
10558
|
e.stopPropagation();
|
|
10541
10559
|
this.xTableAction.emit({
|
|
@@ -10589,6 +10607,29 @@ const XFormBuilder = class {
|
|
|
10589
10607
|
}
|
|
10590
10608
|
return (h("x-tabs", { activeKey: activeKey, tabPlacement: f.tabPlacement || 'top', type: tabsType, editable: allowRename, hideAdd: !allowAdd, onXTabRename: onRename, onXEdit: onEdit }, items.map(item => (h("x-tab-pane", { key: item.key, paneKey: item.key, tab: item.label, disabled: item.disabled, icon: item.icon, closable: allowRemove && item.closable !== false }, this.bind(item.elements, field))))));
|
|
10591
10609
|
};
|
|
10610
|
+
const DynamicCallback = (field) => {
|
|
10611
|
+
const slotName = field.meta?.slot || field.metadata?.slot || field.name;
|
|
10612
|
+
return (h("div", { class: "x-dynamic-field-container", ...{
|
|
10613
|
+
onXChange: (e) => {
|
|
10614
|
+
if (field.control && e.detail && 'value' in e.detail) {
|
|
10615
|
+
field.control.setValue(e.detail.value, { emitEvent: false });
|
|
10616
|
+
}
|
|
10617
|
+
}
|
|
10618
|
+
} }, h("slot", { name: slotName }, h("div", { style: {
|
|
10619
|
+
height: '300px',
|
|
10620
|
+
width: '100%',
|
|
10621
|
+
border: '1px dashed #d1d5db',
|
|
10622
|
+
borderRadius: '8px',
|
|
10623
|
+
backgroundColor: '#f9fafb',
|
|
10624
|
+
display: 'flex',
|
|
10625
|
+
flexDirection: 'column',
|
|
10626
|
+
alignItems: 'center',
|
|
10627
|
+
justifyContent: 'center',
|
|
10628
|
+
color: '#9ca3af',
|
|
10629
|
+
fontSize: '13px',
|
|
10630
|
+
gap: '8px'
|
|
10631
|
+
} }, h("span", { style: { fontSize: '24px' } }, "\uD83E\uDDE9"), h("span", null, "Dynamic slot \"", slotName, "\" is empty or not configured")))));
|
|
10632
|
+
};
|
|
10592
10633
|
return {
|
|
10593
10634
|
'text': InputCallback,
|
|
10594
10635
|
'input': InputCallback,
|
|
@@ -10628,6 +10669,9 @@ const XFormBuilder = class {
|
|
|
10628
10669
|
'button': ButtonCallback,
|
|
10629
10670
|
'href': HrefCallback,
|
|
10630
10671
|
'grid': GridCallback,
|
|
10672
|
+
'columns': ColumnsCallback,
|
|
10673
|
+
'columns-3': ColumnsCallback,
|
|
10674
|
+
'columns-4': ColumnsCallback,
|
|
10631
10675
|
'table': TableCallback,
|
|
10632
10676
|
'maps': MapsCallback,
|
|
10633
10677
|
'panel': PanelCallback,
|
|
@@ -10636,9 +10680,50 @@ const XFormBuilder = class {
|
|
|
10636
10680
|
'qr-code': QRCodeCallback,
|
|
10637
10681
|
'tabs': TabsCallback,
|
|
10638
10682
|
'range-picker': DateRangeCallback,
|
|
10683
|
+
'dynamic': DynamicCallback,
|
|
10639
10684
|
};
|
|
10640
10685
|
}
|
|
10641
10686
|
async submit(event, field) {
|
|
10687
|
+
// Gather values from dynamic slots first
|
|
10688
|
+
let dynamicValues = {};
|
|
10689
|
+
let allDynamicValid = true;
|
|
10690
|
+
let dynamicErrors = {};
|
|
10691
|
+
if (this.builder && this.builder.form) {
|
|
10692
|
+
const dynamicFields = Array.from(this.builder.form.mapping.values()).filter(f => f.type === 'dynamic');
|
|
10693
|
+
for (const dField of dynamicFields) {
|
|
10694
|
+
const slotName = dField.meta?.slot || dField.metadata?.slot || dField.name;
|
|
10695
|
+
// Search for slotted elements in light DOM (children of this.el)
|
|
10696
|
+
const slottedElement = Array.from(this.el.children).find(child => child.getAttribute('slot') === slotName);
|
|
10697
|
+
if (slottedElement) {
|
|
10698
|
+
let val = slottedElement.value;
|
|
10699
|
+
if (val === undefined && dField.control) {
|
|
10700
|
+
val = dField.control.value;
|
|
10701
|
+
}
|
|
10702
|
+
// Update internal control so built-in validators (like required) pass
|
|
10703
|
+
if (dField.control && val !== undefined) {
|
|
10704
|
+
dField.control.setValue(val, { emitEvent: false });
|
|
10705
|
+
}
|
|
10706
|
+
// Check if it has a validate method
|
|
10707
|
+
if (typeof slottedElement.validate === 'function') {
|
|
10708
|
+
const res = await slottedElement.validate(val);
|
|
10709
|
+
if (res) {
|
|
10710
|
+
allDynamicValid = false;
|
|
10711
|
+
dynamicErrors[dField.name] = res;
|
|
10712
|
+
slottedElement.validationState = {
|
|
10713
|
+
status: 'invalid',
|
|
10714
|
+
errorMessage: typeof res === 'object' ? Object.values(res)[0] : 'Invalid',
|
|
10715
|
+
errors: res
|
|
10716
|
+
};
|
|
10717
|
+
}
|
|
10718
|
+
else {
|
|
10719
|
+
slottedElement.validationState = { status: 'valid', errors: null, errorMessage: '' };
|
|
10720
|
+
}
|
|
10721
|
+
}
|
|
10722
|
+
// Merge value
|
|
10723
|
+
dynamicValues[dField.name] = val;
|
|
10724
|
+
}
|
|
10725
|
+
}
|
|
10726
|
+
}
|
|
10642
10727
|
// Validate all mapped controls (both sync and async) first to ensure errors are updated
|
|
10643
10728
|
if (this.builder && this.builder.form) {
|
|
10644
10729
|
for (const [_key, fld] of Array.from(this.builder.form.mapping.entries())) {
|
|
@@ -10663,9 +10748,9 @@ const XFormBuilder = class {
|
|
|
10663
10748
|
}
|
|
10664
10749
|
}
|
|
10665
10750
|
}
|
|
10666
|
-
if (this.builder.form.valid && allCaptchaValid) {
|
|
10751
|
+
if (this.builder.form.valid && allCaptchaValid && allDynamicValid) {
|
|
10667
10752
|
this.formSubmit.emit({
|
|
10668
|
-
value: this.builder.form.value,
|
|
10753
|
+
value: { ...this.builder.form.value, ...dynamicValues },
|
|
10669
10754
|
builder: this.builder,
|
|
10670
10755
|
event: event,
|
|
10671
10756
|
field,
|
|
@@ -10687,7 +10772,7 @@ const XFormBuilder = class {
|
|
|
10687
10772
|
this.formError.emit({
|
|
10688
10773
|
builder: this.builder,
|
|
10689
10774
|
event: event,
|
|
10690
|
-
errors: this.builder.form.errors,
|
|
10775
|
+
errors: { ...this.builder.form.errors, ...dynamicErrors },
|
|
10691
10776
|
});
|
|
10692
10777
|
}
|
|
10693
10778
|
}
|
|
@@ -10750,7 +10835,8 @@ const XFormBuilder = class {
|
|
|
10750
10835
|
const control = field.control;
|
|
10751
10836
|
if (control && this.builder && control.touched) {
|
|
10752
10837
|
commonProps.status = undefined;
|
|
10753
|
-
|
|
10838
|
+
// Bỏ qua hiển thị lỗi nội bộ của x-form-builder cho các trường dynamic vì client tự quản lý
|
|
10839
|
+
if (control.invalid && field.type !== 'dynamic') {
|
|
10754
10840
|
commonProps.status = 'error';
|
|
10755
10841
|
const errors = control.errors ?? {};
|
|
10756
10842
|
const messages = this.getMessageValidator(field, errors);
|
|
@@ -10799,6 +10885,10 @@ const XFormBuilder = class {
|
|
|
10799
10885
|
componentWillLoad() {
|
|
10800
10886
|
this.asyncBuilderForm(true);
|
|
10801
10887
|
}
|
|
10888
|
+
componentDidUpdate() {
|
|
10889
|
+
}
|
|
10890
|
+
disconnectedCallback() {
|
|
10891
|
+
}
|
|
10802
10892
|
handleValueChange() {
|
|
10803
10893
|
if (this._isInternalChange)
|
|
10804
10894
|
return;
|
|
@@ -20497,6 +20587,9 @@ const XTable = class {
|
|
|
20497
20587
|
if (column.maxWidth) {
|
|
20498
20588
|
style.maxWidth = `${column.maxWidth}px`;
|
|
20499
20589
|
}
|
|
20590
|
+
if (column.width) {
|
|
20591
|
+
style.width = typeof column.width === 'number' ? `${column.width}px` : column.width;
|
|
20592
|
+
}
|
|
20500
20593
|
// Sticky
|
|
20501
20594
|
// Find the leaf columns to determine sticky offsets
|
|
20502
20595
|
const leaves = ColumnUtil.getFlattenColumns([column]);
|
|
@@ -20689,6 +20782,9 @@ const XTable = class {
|
|
|
20689
20782
|
cellContent = column.render ? column.render(value, record, index) : value;
|
|
20690
20783
|
}
|
|
20691
20784
|
const style = {};
|
|
20785
|
+
if (column.width) {
|
|
20786
|
+
style.width = typeof column.width === 'number' ? `${column.width}px` : column.width;
|
|
20787
|
+
}
|
|
20692
20788
|
// Sticky
|
|
20693
20789
|
const key = column.key || column.dataIndex;
|
|
20694
20790
|
const isFixedLeft = column.fixed === 'left' || column.fixed === true;
|
|
@@ -20891,10 +20987,17 @@ const XTable = class {
|
|
|
20891
20987
|
*/
|
|
20892
20988
|
render() {
|
|
20893
20989
|
const scrollStyle = {};
|
|
20990
|
+
const innerTableStyle = {};
|
|
20894
20991
|
if (this.tableScroll?.x) {
|
|
20895
20992
|
scrollStyle.overflowX = 'auto';
|
|
20896
20993
|
if (typeof this.tableScroll.x === 'number') {
|
|
20897
|
-
|
|
20994
|
+
innerTableStyle.minWidth = `${this.tableScroll.x}px`;
|
|
20995
|
+
}
|
|
20996
|
+
else if (typeof this.tableScroll.x === 'string') {
|
|
20997
|
+
innerTableStyle.minWidth = this.tableScroll.x;
|
|
20998
|
+
}
|
|
20999
|
+
else if (this.tableScroll.x === true) {
|
|
21000
|
+
innerTableStyle.minWidth = 'max-content';
|
|
20898
21001
|
}
|
|
20899
21002
|
}
|
|
20900
21003
|
if (this.tableScroll?.y) {
|
|
@@ -20922,17 +21025,18 @@ const XTable = class {
|
|
|
20922
21025
|
total,
|
|
20923
21026
|
startIndex,
|
|
20924
21027
|
});
|
|
20925
|
-
return (h(Host, { key: '
|
|
21028
|
+
return (h(Host, { key: '76c750528d53df24f767afdc0d53e90c901f113f', class: {
|
|
20926
21029
|
'x-table': true,
|
|
20927
21030
|
'x-table-bordered': this.bordered,
|
|
20928
21031
|
'x-table-loading': this.loading,
|
|
20929
21032
|
[`x-table-${this.size}`]: true,
|
|
20930
21033
|
'x-table-sticky': !!this.sticky || !!this.tableScroll?.y,
|
|
20931
21034
|
[this.classNames?.root || '']: !!this.classNames?.root,
|
|
20932
|
-
}, style: this.styles?.root }, h("div", { key: '
|
|
21035
|
+
}, style: this.styles?.root }, h("div", { key: '5af6bb4b50f3e790f1eb15d1c15c262f4ff8ea29', class: "x-table-wrapper" }, this.renderTitle(), topPagination && this.renderPagination('top'), h("div", { key: '71578d15387263765f1ef603520d2e7b668c1476', class: "x-table-container" }, this.loading && (h("div", { key: '17eaf05d5f7884e606a26c5ee64ad23bb495e0af', class: "x-table-loading-overlay" }, h("x-spin", { key: '69fe0249701f71a9dab737d54e6c848fdbce9111' }))), h("div", { key: '37d0f9e25159256389c8b137236ffd20c2575a88', class: "x-table-content", style: scrollStyle }, h("table", { key: '511af98bedf1b8fc0a2b2f1a07fb22b9d7d4675a', style: {
|
|
20933
21036
|
...tableStyle,
|
|
21037
|
+
...innerTableStyle,
|
|
20934
21038
|
tableLayout: this.resizeState || this.internalColumns.some(c => c.width) ? 'fixed' : this.tableLayout,
|
|
20935
|
-
} }, this.renderColGroup(), this.renderHeader(stickyOffsets), this.renderBody(stickyOffsets)))), (bottomPagination || this.tableFooter) && (h("div", { key: '
|
|
21039
|
+
} }, this.renderColGroup(), this.renderHeader(stickyOffsets), this.renderBody(stickyOffsets)))), (bottomPagination || this.tableFooter) && (h("div", { key: '3bd5751883e4d30519d81cc6ade817c0a13951cc', class: "x-table-footer-pagination" }, this.renderFooter(), bottomPagination && this.renderPagination('bottom'))))));
|
|
20936
21040
|
}
|
|
20937
21041
|
static get watchers() { return {
|
|
20938
21042
|
"rowKey": [{
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, a as getElement, h } from './index-BMTt8QT3.js';
|
|
2
|
-
import { I as Icons } from './icons-
|
|
2
|
+
import { I as Icons } from './icons-CQ2VND9-.js';
|
|
3
3
|
import { t as translate } from './locale.service-DFADJBLL.js';
|
|
4
4
|
|
|
5
5
|
const iconPickerDropdownContentCss = () => `@charset "UTF-8";:root{--x-color-primary:#1677ff;--x-color-primary-rgb:22, 119, 255;--x-color-primary-contrast:#ffffff;--x-color-primary-contrast-rgb:255, 255, 255;--x-color-primary-shade:#0958d9;--x-color-primary-tint:#4096ff;--x-color-primary-bg:#e6f4ff;--x-color-primary-bg-hover:#bae0ff;--x-color-primary-border:#91caff;--x-color-primary-border-hover:#69b1ff;--x-color-primary-hover:#4096ff;--x-color-primary-active:#0958d9;--x-color-primary-text:#1677ff;--x-color-primary-text-hover:#4096ff;--x-color-primary-text-active:#0958d9;--x-color-secondary:#3dc2ff;--x-color-secondary-rgb:61, 194, 255;--x-color-secondary-contrast:#ffffff;--x-color-secondary-contrast-rgb:255, 255, 255;--x-color-secondary-shade:#36abe0;--x-color-secondary-tint:#50c8ff;--x-color-success:#52c41a;--x-color-success-rgb:82, 196, 26;--x-color-success-contrast:#ffffff;--x-color-success-contrast-rgb:255, 255, 255;--x-color-success-shade:#389e0d;--x-color-success-tint:#73d13d;--x-color-success-bg:#f6ffed;--x-color-success-bg-hover:#d9f7be;--x-color-success-border:#b7eb8f;--x-color-success-border-hover:#95de64;--x-color-success-hover:#73d13d;--x-color-success-active:#389e0d;--x-color-success-text:#52c41a;--x-color-success-text-hover:#73d13d;--x-color-success-text-active:#389e0d;--x-color-warning:#faad14;--x-color-warning-rgb:250, 173, 20;--x-color-warning-contrast:#000000;--x-color-warning-contrast-rgb:0, 0, 0;--x-color-warning-shade:#d48806;--x-color-warning-tint:#ffc53d;--x-color-warning-bg:#fffbe6;--x-color-warning-bg-hover:#fff1b8;--x-color-warning-border:#ffe58f;--x-color-warning-border-hover:#ffd666;--x-color-warning-hover:#ffc53d;--x-color-warning-active:#d48806;--x-color-warning-text:#faad14;--x-color-warning-text-hover:#ffc53d;--x-color-warning-text-active:#d48806;--x-color-danger:#ff4d4f;--x-color-danger-rgb:255, 77, 79;--x-color-danger-contrast:#ffffff;--x-color-danger-contrast-rgb:255, 255, 255;--x-color-danger-shade:#cf1322;--x-color-danger-tint:#ff7875;--x-color-error:#ff4d4f;--x-color-error-rgb:255, 77, 79;--x-color-error-bg:#fff2f0;--x-color-error-bg-hover:#ffccc7;--x-color-error-border:#ffa39e;--x-color-error-border-hover:#ff7875;--x-color-error-hover:#ff7875;--x-color-error-active:#d9363e;--x-color-error-text:#ff4d4f;--x-color-error-text-hover:#ff7875;--x-color-error-text-active:#d9363e;--x-color-info:#1677ff;--x-color-info-rgb:22, 119, 255;--x-color-info-bg:#e6f4ff;--x-color-info-bg-hover:#bae0ff;--x-color-info-border:#91caff;--x-color-info-border-hover:#69b1ff;--x-color-info-hover:#69b1ff;--x-color-info-active:#0958d9;--x-color-info-text:#1677ff;--x-color-info-text-hover:#69b1ff;--x-color-info-text-active:#0958d9;--x-color-text:rgba(0, 0, 0, 0.88);--x-color-text-secondary:rgba(0, 0, 0, 0.65);--x-color-text-tertiary:rgba(0, 0, 0, 0.45);--x-color-text-quaternary:rgba(0, 0, 0, 0.25);--x-color-text-disabled:rgba(0, 0, 0, 0.25);--x-color-text-placeholder:rgba(0, 0, 0, 0.25);--x-color-text-heading:rgba(0, 0, 0, 0.88);--x-color-text-label:rgba(0, 0, 0, 0.65);--x-color-text-description:rgba(0, 0, 0, 0.45);--x-color-text-light-solid:#ffffff;--x-color-text-processing:#ffffff;--x-color-bg-container:#ffffff;--x-color-bg-elevated:#ffffff;--x-color-bg-layout:#f5f5f5;--x-color-bg-spotlight:rgba(0, 0, 0, 0.85);--x-color-bg-mask:rgba(0, 0, 0, 0.45);--x-color-bg-base:#ffffff;--x-color-bg-container-disabled:#f5f5f5;--x-color-bg-container-loading:rgba(255, 255, 255, 0.65);--x-color-white:#ffffff;--x-color-fill:rgba(0, 0, 0, 0.15);--x-color-fill-secondary:rgba(0, 0, 0, 0.06);--x-color-fill-tertiary:rgba(0, 0, 0, 0.04);--x-color-fill-quaternary:rgba(0, 0, 0, 0.02);--x-color-border:#d9d9d9;--x-color-border-secondary:#f0f0f0;--x-color-border-bg:#ffffff;--x-color-split:rgba(5, 5, 5, 0.06);--x-color-dark:#222428;--x-color-dark-rgb:34, 36, 40;--x-color-dark-contrast:#ffffff;--x-color-dark-contrast-rgb:255, 255, 255;--x-color-dark-shade:#1e2023;--x-color-dark-tint:#383a3e;--x-color-medium:#92949c;--x-color-medium-rgb:146, 148, 156;--x-color-medium-contrast:#ffffff;--x-color-medium-contrast-rgb:255, 255, 255;--x-color-medium-shade:#808289;--x-color-medium-tint:#9d9fa6;--x-color-light:#f4f5f8;--x-color-light-rgb:244, 245, 248;--x-color-light-contrast:#000000;--x-color-light-contrast-rgb:0, 0, 0;--x-color-light-shade:#d7d8da;--x-color-light-tint:#f5f6f9;--x-font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';--x-font-family-code:'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;--x-font-size:14px;--x-font-size-sm:12px;--x-font-size-lg:16px;--x-font-size-xl:20px;--x-font-size-heading-1:38px;--x-font-size-heading-2:30px;--x-font-size-heading-3:24px;--x-font-size-heading-4:20px;--x-font-size-heading-5:16px;--x-line-height:1.5714285714285714;--x-line-height-lg:1.5;--x-line-height-sm:1.6666666666666667;--x-line-height-heading-1:1.2105263157894737;--x-line-height-heading-2:1.2666666666666666;--x-line-height-heading-3:1.3333333333333333;--x-line-height-heading-4:1.4;--x-line-height-heading-5:1.5;--x-font-weight-normal:400;--x-font-weight-medium:500;--x-font-weight-semibold:600;--x-font-weight-strong:600;--x-font-size-base:14px;--x-font-size-xxl:24px;--x-line-height-base:1.5714285714285714;--x-spacing-xxs:4px;--x-spacing-xs:8px;--x-spacing-sm:12px;--x-spacing-md:16px;--x-spacing-lg:20px;--x-spacing-xl:24px;--x-spacing-xxl:32px;--x-spacing-xxxl:48px;--x-margin-xxs:4px;--x-margin-xs:8px;--x-margin-sm:12px;--x-margin-md:16px;--x-margin-lg:24px;--x-margin-xl:32px;--x-margin-xxl:48px;--x-padding-xxs:4px;--x-padding-xs:8px;--x-padding-sm:12px;--x-padding-md:16px;--x-padding-lg:24px;--x-padding-content-horizontal-lg:24px;--x-padding-content-vertical-lg:12px;--x-padding-content-horizontal:16px;--x-padding-content-vertical:12px;--x-padding-content-horizontal-sm:16px;--x-padding-content-vertical-sm:8px;--x-border-radius:6px;--x-border-radius-xs:2px;--x-border-radius-sm:4px;--x-border-radius-lg:8px;--x-border-radius-xl:12px;--x-border-radius-outer:4px;--x-border-radius-base:6px;--x-border-width:1px;--x-border-width-base:1px;--x-shadow:0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 9px 28px 8px rgba(0, 0, 0, 0.05);--x-shadow-secondary:0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 9px 28px 8px rgba(0, 0, 0, 0.05);--x-shadow-tertiary:0 1px 2px 0 rgba(0, 0, 0, 0.03), 0 1px 6px -1px rgba(0, 0, 0, 0.02), 0 2px 4px 0 rgba(0, 0, 0, 0.02);--x-shadow-lg:0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 9px 28px 8px rgba(0, 0, 0, 0.05);--x-box-shadow:0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 9px 28px 8px rgba(0, 0, 0, 0.05);--x-box-shadow-secondary:0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 9px 28px 8px rgba(0, 0, 0, 0.05);--x-box-shadow-tertiary:0 1px 2px 0 rgba(0, 0, 0, 0.03), 0 1px 6px -1px rgba(0, 0, 0, 0.02), 0 2px 4px 0 rgba(0, 0, 0, 0.02);--x-box-shadow-popover-arrow:2px 2px 5px rgba(0, 0, 0, 0.05);--x-box-shadow-card:0 1px 2px -2px rgba(0, 0, 0, 0.16), 0 3px 6px 0 rgba(0, 0, 0, 0.12), 0 5px 12px 4px rgba(0, 0, 0, 0.09);--x-box-shadow-drawer-right:-6px 0 16px 0 rgba(0, 0, 0, 0.08), -3px 0 6px -4px rgba(0, 0, 0, 0.12), -9px 0 28px 8px rgba(0, 0, 0, 0.05);--x-box-shadow-drawer-left:6px 0 16px 0 rgba(0, 0, 0, 0.08), 3px 0 6px -4px rgba(0, 0, 0, 0.12), 9px 0 28px 8px rgba(0, 0, 0, 0.05);--x-box-shadow-drawer-up:0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 9px 28px 8px rgba(0, 0, 0, 0.05);--x-box-shadow-drawer-down:0 -6px 16px 0 rgba(0, 0, 0, 0.08), 0 -3px 6px -4px rgba(0, 0, 0, 0.12), 0 -9px 28px 8px rgba(0, 0, 0, 0.05);--x-box-shadow-tabs-overflow-left:inset 10px 0 8px -8px rgba(0, 0, 0, 0.08);--x-box-shadow-tabs-overflow-right:inset -10px 0 8px -8px rgba(0, 0, 0, 0.08);--x-box-shadow-tabs-overflow-top:inset 0 10px 8px -8px rgba(0, 0, 0, 0.08);--x-box-shadow-tabs-overflow-bottom:inset 0 -10px 8px -8px rgba(0, 0, 0, 0.08);--x-motion-duration-fast:0.1s;--x-motion-duration-mid:0.2s;--x-motion-duration-slow:0.3s;--x-motion-ease-in-out:cubic-bezier(0.645, 0.045, 0.355, 1);--x-motion-ease-out:cubic-bezier(0.215, 0.61, 0.355, 1);--x-motion-ease-in:cubic-bezier(0.55, 0.055, 0.675, 0.19);--x-motion-ease-out-back:cubic-bezier(0.12, 0.4, 0.29, 1.46);--x-motion-ease-in-back:cubic-bezier(0.71, -0.46, 0.88, 0.6);--x-motion-ease-in-out-circle:cubic-bezier(0.78, 0.14, 0.15, 0.86);--x-motion-ease-out-circle:cubic-bezier(0.08, 0.82, 0.17, 1);--x-motion-ease-in-circle:cubic-bezier(0.6, 0.04, 0.98, 0.34);--x-motion-ease-in-quint:cubic-bezier(0.755, 0.05, 0.855, 0.06);--x-motion-ease-out-quint:cubic-bezier(0.23, 1, 0.32, 1);--x-z-index-base:0;--x-z-index-popup-base:1000;--x-z-index-popup:1030;--x-z-index-affix:10;--x-z-index-modal:1000;--x-z-index-modal-mask:1000;--x-z-index-drawer:1000;--x-z-index-popover:1030;--x-z-index-dropdown:1050;--x-z-index-tooltip:1070;--x-z-index-notification:1080;--x-z-index-message:1090;--x-z-index-popconfirm:1060;--x-z-index-table-fixed:10;--x-opacity-loading:0.65;--x-opacity-image:1;--x-opacity-disabled:0.5;--x-control-height:32px;--x-control-height-xs:24px;--x-control-height-sm:24px;--x-control-height-lg:40px;--x-control-radio-size:16px;--x-control-checkbox-size:16px;--x-control-padding-horizontal:12px;--x-control-padding-horizontal-sm:8px;--x-control-outline-width:2px;--x-control-outline:rgba(5, 145, 255, 0.1);--x-control-item-bg-hover:rgba(0, 0, 0, 0.04);--x-control-item-bg-active:#e6f4ff;--x-control-item-bg-active-hover:#bae0ff;--x-control-item-bg-active-disabled:rgba(0, 0, 0, 0.15);--x-control-tmp-outline:rgba(0, 0, 0, 0.02);--x-color-yellow:#fadb14;--x-color-yellow-rgb:250, 219, 20;--x-font-family-base:var(--x-font-family);--x-color-link:#1677ff;--x-color-link-hover:#69b1ff;--x-color-link-active:#0958d9;--x-color-icon:rgba(0, 0, 0, 0.45);--x-color-icon-hover:rgba(0, 0, 0, 0.88);--x-color-highlight:#ff4d4f;--x-color-bg-text-hover:rgba(0, 0, 0, 0.06);--x-color-bg-text-active:rgba(0, 0, 0, 0.15);--x-screen-xs:480px;--x-screen-xs-min:480px;--x-screen-xs-max:575px;--x-screen-sm:576px;--x-screen-sm-min:576px;--x-screen-sm-max:767px;--x-screen-md:768px;--x-screen-md-min:768px;--x-screen-md-max:991px;--x-screen-lg:992px;--x-screen-lg-min:992px;--x-screen-lg-max:1199px;--x-screen-xl:1200px;--x-screen-xl-min:1200px;--x-screen-xl-max:1599px;--x-screen-xxl:1600px;--x-screen-xxl-min:1600px;--x-color-fill-content:rgba(0, 0, 0, 0.06);--x-color-fill-content-hover:rgba(0, 0, 0, 0.15);--x-color-fill-alter:rgba(0, 0, 0, 0.02);--x-scrollbar-width:12px;--x-scrollbar-track-bg:rgba(0, 0, 0, 0.04);--x-scrollbar-thumb-bg:rgba(0, 0, 0, 0.25);--x-scrollbar-thumb-bg-hover:rgba(0, 0, 0, 0.35);--x-menu-dark-bg:#001529;--x-menu-dark-item-bg:#001529;--x-menu-dark-popup-bg:#001529;--x-menu-dark-submenu-item-bg:#000c17}:host{display:block}.x-icon-picker-panel{width:var(--x-input-icon-panel-width, 300px);background-color:var(--x-input-icon-bg, var(--x-control-bg, var(--x-color-bg-container, #ffffff)));border-radius:var(--x-input-icon-item-border-radius, var(--x-border-radius));-webkit-box-shadow:var(--x-box-shadow);box-shadow:var(--x-box-shadow);display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;overflow:hidden;position:relative;z-index:1050}.x-icon-picker-panel.x-date-picker-dropdown-hidden{display:none}.x-icon-picker-search{padding:8px 8px 0}.x-icon-picker-body{height:var(--x-input-icon-panel-height, 320px);overflow-y:auto;padding:8px 8px 4px}.x-icon-picker-body::-webkit-scrollbar{width:5px}.x-icon-picker-body::-webkit-scrollbar-thumb{background-color:var(--x-border-color-split);border-radius:4px}.x-icon-picker-body::-webkit-scrollbar-track{background:transparent}.x-icon-picker-group{margin-bottom:8px}.x-icon-picker-group:last-of-type{margin-bottom:0}.x-icon-picker-group-header{font-size:11px;font-weight:600;letter-spacing:0.04em;text-transform:uppercase;color:var(--x-text-color-secondary);padding:4px 2px 6px;line-height:1;border-bottom:1px solid var(--x-border-color-split);margin-bottom:6px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.x-icon-picker-grid{display:grid;grid-template-columns:repeat(auto-fill, minmax(36px, 1fr));gap:3px}.x-icon-picker-item{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;height:36px;width:100%;font-size:20px;border-radius:var(--x-border-radius-sm);cursor:pointer;-webkit-transition:background-color 0.15s ease, color 0.15s ease;transition:background-color 0.15s ease, color 0.15s ease;color:var(--x-text-color);overflow:hidden;white-space:nowrap}.x-icon-picker-item x-icon{max-width:100%;max-height:100%;overflow:hidden;pointer-events:none}.x-icon-picker-item:hover{background-color:var(--x-input-icon-item-hover-bg, var(--x-control-item-bg-hover));color:var(--x-primary-color)}.x-icon-picker-item-selected{background-color:var(--x-input-icon-item-active-bg, var(--x-control-item-bg-active));color:var(--x-input-icon-item-active-color, var(--x-primary-color))}.x-icon-picker-item-selected:hover{background-color:var(--x-input-icon-item-active-bg, var(--x-control-item-bg-active))}.x-icon-picker-empty{display:-ms-flexbox;display:flex;width:100%;height:100%;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;min-height:120px}.x-icon-picker-sentinel{height:40px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;margin-top:4px}.x-icon-picker-loading{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;opacity:0.5}.x-icon-picker-footer{font-size:11px;color:var(--x-text-color-quaternary, var(--x-text-color-secondary));text-align:center;padding:6px 4px 4px;border-top:1px solid var(--x-border-color-split);margin-top:6px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}`;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export type FieldType = 'text' | 'email' | 'password' | 'url' | 'number' | 'textarea' | 'select' | 'radio' | 'checkbox' | 'date' | 'datetime' | 'time' | 'file' | 'slider' | 'switch' | 'rate' | 'color' | 'tags' | 'range' | 'phone' | 'location' | 'tree-select' | 'transfer' | 'cascader' | 'auto-complete' | 'divider' | 'heading' | 'paragraph' | 'image' | 'avatar' | 'editor' | 'button' | 'href' | 'grid' | 'table' | 'maps' | 'panel' | 'container' | 'iframe' | 'qr-code' | 'input' | 'daterange' | 'range-picker' | 'captcha' | 'address' | 'tabs' | '
|
|
1
|
+
export type FieldType = 'text' | 'email' | 'password' | 'url' | 'number' | 'textarea' | 'select' | 'radio' | 'checkbox' | 'date' | 'datetime' | 'time' | 'file' | 'slider' | 'switch' | 'rate' | 'color' | 'tags' | 'range' | 'phone' | 'location' | 'tree-select' | 'transfer' | 'cascader' | 'auto-complete' | 'divider' | 'heading' | 'paragraph' | 'image' | 'avatar' | 'editor' | 'button' | 'href' | 'grid' | 'table' | 'maps' | 'panel' | 'container' | 'iframe' | 'qr-code' | 'input' | 'daterange' | 'range-picker' | 'captcha' | 'address' | 'tabs' | 'columns-3' | 'columns-4' | 'columns' | 'dynamic';
|
|
2
2
|
export type FieldCategory = 'input' | 'selection' | 'special' | 'controls' | 'layout' | 'display';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { InputField } from './input-fields';
|
|
2
2
|
import { RadioField, SelectionField } from './selection-fields';
|
|
3
3
|
import { DateTimeField, FileField } from './datetime-file-fields';
|
|
4
|
-
import { SliderField, SwitchField, RateField, ColorField, TagsField, RangeField, LocationField, CaptchaField, AddressField } from './special-input-fields';
|
|
4
|
+
import { SliderField, SwitchField, RateField, ColorField, TagsField, RangeField, LocationField, CaptchaField, AddressField, DynamicField } from './special-input-fields';
|
|
5
5
|
import { DisplayField } from './display-fields';
|
|
6
6
|
import { LayoutField, GridField, PanelField, ContainerField, TabsField } from './layout-fields';
|
|
7
7
|
import { TableField, MapsField, IframeField, QRCodeField } from './advanced-fields';
|
|
8
8
|
export type FormParentField = GridField | PanelField | ContainerField | TabsField;
|
|
9
|
-
export type FormField = InputField | SelectionField | FileField | DateTimeField | SliderField | SwitchField | RateField | ColorField | TagsField | RangeField | LocationField | DisplayField | LayoutField | TableField | MapsField | IframeField | QRCodeField | CaptchaField | RadioField | AddressField;
|
|
9
|
+
export type FormField = InputField | SelectionField | FileField | DateTimeField | SliderField | SwitchField | RateField | ColorField | TagsField | RangeField | LocationField | DisplayField | LayoutField | TableField | MapsField | IframeField | QRCodeField | CaptchaField | RadioField | AddressField | DynamicField;
|
|
@@ -70,4 +70,13 @@ export interface TabsField extends BaseFieldNotName<never> {
|
|
|
70
70
|
allowRemove?: boolean;
|
|
71
71
|
allowRename?: boolean;
|
|
72
72
|
}
|
|
73
|
-
export
|
|
73
|
+
export interface ColumnPaneField {
|
|
74
|
+
key: string;
|
|
75
|
+
span?: number;
|
|
76
|
+
elements: FormField[];
|
|
77
|
+
}
|
|
78
|
+
export interface ColumnsField extends BaseFieldNotName<never> {
|
|
79
|
+
type: 'columns-3' | 'columns-4' | 'columns';
|
|
80
|
+
items: ColumnPaneField[];
|
|
81
|
+
}
|
|
82
|
+
export type LayoutField = GridField | PanelField | ContainerField | TabsField | ColumnsField;
|
|
@@ -61,6 +61,8 @@ export declare class XFormBuilder<T extends Record<string, any> = Record<string,
|
|
|
61
61
|
builder: SchemaBuilder<T>;
|
|
62
62
|
private _isInternalChange;
|
|
63
63
|
componentWillLoad(): void;
|
|
64
|
+
componentDidUpdate(): void;
|
|
65
|
+
disconnectedCallback(): void;
|
|
64
66
|
handleValueChange(): void;
|
|
65
67
|
handleSchemaChange(): void;
|
|
66
68
|
private isSyncing;
|
package/dist/xlabs/index.esm.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{m as message,n as notification}from"./p-D7kqIlVo.js";export{M as modal}from"./p-DSa1uqPO.js";export{S as SchemaBuilder}from"./p-
|
|
1
|
+
export{m as message,n as notification}from"./p-D7kqIlVo.js";export{M as modal}from"./p-DSa1uqPO.js";export{S as SchemaBuilder}from"./p-CkwLFDlS.js";export{I as Icons}from"./p-CQ2VND9-.js";import"./p-DM8AggMt.js";import"./p-DFADJBLL.js";
|