@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.
Files changed (49) hide show
  1. package/components/index.js +1 -1
  2. package/components/p-CQ2VND9-.js +1 -0
  3. package/components/p-CQQI-pRu.js +1 -0
  4. package/components/p-CkwLFDlS.js +1 -0
  5. package/components/p-CzHtwC1k.js +1 -0
  6. package/components/{p-BlvrLhyv.js → p-DqayamUz.js} +1 -1
  7. package/components/x-form-builder.js +1 -1
  8. package/components/x-icon-picker-dropdown-content.js +1 -1
  9. package/components/x-input-icon.js +1 -1
  10. package/components/x-login.js +1 -1
  11. package/components/x-table.js +1 -1
  12. package/dist/cjs/icons-BfHE2jcr.js +19261 -0
  13. package/dist/cjs/index.cjs.js +2 -2
  14. package/dist/cjs/{schema-builder-BKX4QdTc.js → schema-builder-DAwDwgIM.js} +98 -14
  15. package/dist/cjs/x-address_51.cjs.entry.js +115 -11
  16. package/dist/cjs/x-icon-picker-dropdown-content.cjs.entry.js +1 -1
  17. package/dist/collection/components/x-form-builder/services/schema/condition-builder.js +48 -6
  18. package/dist/collection/components/x-form-builder/services/schema/form-mapping.js +2 -2
  19. package/dist/collection/components/x-form-builder/utils/condition-engine.js +48 -6
  20. package/dist/collection/components/x-form-builder/x-form-builder.js +96 -6
  21. package/dist/collection/components/x-icon/icons.js +11462 -11492
  22. package/dist/collection/components/x-table/x-table.js +18 -4
  23. package/dist/esm/icons-CQ2VND9-.js +19259 -0
  24. package/dist/esm/index.js +2 -2
  25. package/dist/esm/{schema-builder-DlGEzg5B.js → schema-builder-CekbhOnD.js} +98 -14
  26. package/dist/esm/x-address_51.entry.js +115 -11
  27. package/dist/esm/x-icon-picker-dropdown-content.entry.js +1 -1
  28. package/dist/types/components/x-form-builder/types/common/field-types-enum.d.ts +1 -1
  29. package/dist/types/components/x-form-builder/types/fields/advanced-fields.d.ts +1 -0
  30. package/dist/types/components/x-form-builder/types/fields/form-field-union.d.ts +2 -2
  31. package/dist/types/components/x-form-builder/types/fields/layout-fields.d.ts +10 -1
  32. package/dist/types/components/x-form-builder/types/fields/special-input-fields.d.ts +3 -0
  33. package/dist/types/components/x-form-builder/x-form-builder.d.ts +2 -0
  34. package/dist/xlabs/index.esm.js +1 -1
  35. package/dist/xlabs/{p-45fda37b.entry.js → p-99c568fd.entry.js} +1 -1
  36. package/dist/xlabs/p-CQ2VND9-.js +1 -0
  37. package/dist/xlabs/p-CkwLFDlS.js +1 -0
  38. package/dist/xlabs/p-a4995e36.entry.js +1 -0
  39. package/dist/xlabs/xlabs.esm.js +1 -1
  40. package/package.json +1 -1
  41. package/components/p-BGNOiTqa.js +0 -1
  42. package/components/p-BgCjF74f.js +0 -1
  43. package/components/p-xf66Fag-.js +0 -1
  44. package/components/p-xzKm-BQN.js +0 -1
  45. package/dist/cjs/icons-DJ-kuboh.js +0 -19291
  46. package/dist/esm/icons-BgCjF74f.js +0 -19289
  47. package/dist/xlabs/p-239cf367.entry.js +0 -1
  48. package/dist/xlabs/p-BgCjF74f.js +0 -1
  49. package/dist/xlabs/p-xf66Fag-.js +0 -1
@@ -2,8 +2,8 @@
2
2
 
3
3
  var notificationService = require('./notification-service-v7LRmTyh.js');
4
4
  var modalService = require('./modal-service-FQpCPk_L.js');
5
- var schemaBuilder = require('./schema-builder-BKX4QdTc.js');
6
- var icons = require('./icons-DJ-kuboh.js');
5
+ var schemaBuilder = require('./schema-builder-DAwDwgIM.js');
6
+ var icons = require('./icons-BfHE2jcr.js');
7
7
  require('./portal-controller-DJft2QkA.js');
8
8
  require('./locale.service-DT6E8Rzd.js');
9
9
 
@@ -92,12 +92,26 @@ function evaluateCondition(condition, formValues, context) {
92
92
  const result = (() => {
93
93
  switch (operator) {
94
94
  case 'equals':
95
+ if ((typeof actualValue === 'string' && typeof expectedValue === 'number') ||
96
+ (typeof actualValue === 'number' && typeof expectedValue === 'string')) {
97
+ return String(actualValue) === String(expectedValue);
98
+ }
95
99
  return actualValue === expectedValue;
96
100
  case 'notEquals':
101
+ if ((typeof actualValue === 'string' && typeof expectedValue === 'number') ||
102
+ (typeof actualValue === 'number' && typeof expectedValue === 'string')) {
103
+ return String(actualValue) !== String(expectedValue);
104
+ }
97
105
  return actualValue !== expectedValue;
98
106
  case 'contains':
99
107
  if (Array.isArray(actualValue)) {
100
- return actualValue.includes(expectedValue);
108
+ return actualValue.some(item => {
109
+ if ((typeof item === 'string' && typeof expectedValue === 'number') ||
110
+ (typeof item === 'number' && typeof expectedValue === 'string')) {
111
+ return String(item) === String(expectedValue);
112
+ }
113
+ return item === expectedValue;
114
+ });
101
115
  }
102
116
  if (typeof actualValue === 'string') {
103
117
  return actualValue.includes(String(expectedValue));
@@ -105,7 +119,13 @@ function evaluateCondition(condition, formValues, context) {
105
119
  return false;
106
120
  case 'notContains':
107
121
  if (Array.isArray(actualValue)) {
108
- return !actualValue.includes(expectedValue);
122
+ return !actualValue.some(item => {
123
+ if ((typeof item === 'string' && typeof expectedValue === 'number') ||
124
+ (typeof item === 'number' && typeof expectedValue === 'string')) {
125
+ return String(item) === String(expectedValue);
126
+ }
127
+ return item === expectedValue;
128
+ });
109
129
  }
110
130
  if (typeof actualValue === 'string') {
111
131
  return !actualValue.includes(String(expectedValue));
@@ -131,24 +151,46 @@ function evaluateCondition(condition, formValues, context) {
131
151
  return String(actualValue).endsWith(String(expectedValue));
132
152
  case 'in':
133
153
  if (Array.isArray(expectedValue)) {
134
- return expectedValue.includes(actualValue);
154
+ return expectedValue.some(item => {
155
+ if ((typeof item === 'string' && typeof actualValue === 'number') ||
156
+ (typeof item === 'number' && typeof actualValue === 'string')) {
157
+ return String(item) === String(actualValue);
158
+ }
159
+ return item === actualValue;
160
+ });
135
161
  }
136
162
  if (typeof expectedValue === 'string') {
137
163
  return expectedValue
138
164
  .split(',')
139
165
  .map(v => v.trim())
140
- .includes(String(actualValue));
166
+ .some(item => {
167
+ if (typeof actualValue === 'number') {
168
+ return item === String(actualValue);
169
+ }
170
+ return item === actualValue;
171
+ });
141
172
  }
142
173
  return false;
143
174
  case 'notIn':
144
175
  if (Array.isArray(expectedValue)) {
145
- return !expectedValue.includes(actualValue);
176
+ return !expectedValue.some(item => {
177
+ if ((typeof item === 'string' && typeof actualValue === 'number') ||
178
+ (typeof item === 'number' && typeof actualValue === 'string')) {
179
+ return String(item) === String(actualValue);
180
+ }
181
+ return item === actualValue;
182
+ });
146
183
  }
147
184
  if (typeof expectedValue === 'string') {
148
185
  return !expectedValue
149
186
  .split(',')
150
187
  .map(v => v.trim())
151
- .includes(String(actualValue));
188
+ .some(item => {
189
+ if (typeof actualValue === 'number') {
190
+ return item === String(actualValue);
191
+ }
192
+ return item === actualValue;
193
+ });
152
194
  }
153
195
  return true;
154
196
  default:
@@ -179,16 +221,30 @@ class ConditionOperators {
179
221
  }
180
222
  equals(option, field, value) {
181
223
  value = ValueUtil.detect(field, value);
224
+ if ((typeof value === 'string' && typeof option.value === 'number') ||
225
+ (typeof value === 'number' && typeof option.value === 'string')) {
226
+ return String(value) === String(option.value);
227
+ }
182
228
  return option.value === value;
183
229
  }
184
230
  notEquals(option, field, value) {
185
231
  value = ValueUtil.detect(field, value);
232
+ if ((typeof value === 'string' && typeof option.value === 'number') ||
233
+ (typeof value === 'number' && typeof option.value === 'string')) {
234
+ return String(value) !== String(option.value);
235
+ }
186
236
  return option.value !== value;
187
237
  }
188
238
  contains(option, field, value) {
189
239
  value = ValueUtil.detect(field, value);
190
240
  if (Array.isArray(value)) {
191
- return value.includes(option.value);
241
+ return value.some(item => {
242
+ if ((typeof item === 'string' && typeof option.value === 'number') ||
243
+ (typeof item === 'number' && typeof option.value === 'string')) {
244
+ return String(item) === String(option.value);
245
+ }
246
+ return item === option.value;
247
+ });
192
248
  }
193
249
  if (typeof value === 'string') {
194
250
  return value.includes(String(option.value));
@@ -222,7 +278,13 @@ class ConditionOperators {
222
278
  notContains(option, field, value) {
223
279
  value = ValueUtil.detect(field, value);
224
280
  if (Array.isArray(value)) {
225
- return !value.includes(option.value);
281
+ return !value.some(item => {
282
+ if ((typeof item === 'string' && typeof option.value === 'number') ||
283
+ (typeof item === 'number' && typeof option.value === 'string')) {
284
+ return String(item) === String(option.value);
285
+ }
286
+ return item === option.value;
287
+ });
226
288
  }
227
289
  if (typeof value === 'string') {
228
290
  return !value.includes(String(option.value));
@@ -262,26 +324,48 @@ class ConditionOperators {
262
324
  in(option, field, value) {
263
325
  value = ValueUtil.detect(field, value);
264
326
  if (Array.isArray(option.value)) {
265
- return option.value.includes(value);
327
+ return option.value.some(item => {
328
+ if ((typeof item === 'string' && typeof value === 'number') ||
329
+ (typeof item === 'number' && typeof value === 'string')) {
330
+ return String(item) === String(value);
331
+ }
332
+ return item === value;
333
+ });
266
334
  }
267
335
  if (typeof option.value === 'string') {
268
336
  return option.value
269
337
  .split(',')
270
338
  .map(v => v.trim())
271
- .includes(String(value));
339
+ .some(item => {
340
+ if (typeof value === 'number') {
341
+ return item === String(value);
342
+ }
343
+ return item === value;
344
+ });
272
345
  }
273
346
  return false;
274
347
  }
275
348
  notIn(option, field, value) {
276
349
  value = ValueUtil.detect(field, value);
277
350
  if (Array.isArray(option.value)) {
278
- return !option.value.includes(value);
351
+ return !option.value.some(item => {
352
+ if ((typeof item === 'string' && typeof value === 'number') ||
353
+ (typeof item === 'number' && typeof value === 'string')) {
354
+ return String(item) === String(value);
355
+ }
356
+ return item === value;
357
+ });
279
358
  }
280
359
  if (typeof option.value === 'string') {
281
360
  return !option.value
282
361
  .split(',')
283
362
  .map(v => v.trim())
284
- .includes(String(value));
363
+ .some(item => {
364
+ if (typeof value === 'number') {
365
+ return item === String(value);
366
+ }
367
+ return item === value;
368
+ });
285
369
  }
286
370
  return true;
287
371
  }
@@ -1403,8 +1487,8 @@ class FormMapping extends FormGroup {
1403
1487
  // Safely merge Maps
1404
1488
  child_paths.forEach((v, k) => paths.set(k, v));
1405
1489
  }
1406
- // Support tabs mapping recursively
1407
- if (field.type === 'tabs' && field.items && Array.isArray(field.items)) {
1490
+ // Support tabs and columns mapping recursively
1491
+ if ((field.type === 'tabs' || String(field.type).startsWith('columns-')) && field.items && Array.isArray(field.items)) {
1408
1492
  for (const item of field.items) {
1409
1493
  if (item && Array.isArray(item.elements)) {
1410
1494
  const child_paths = mappingRecursive(item.elements);
@@ -4,7 +4,7 @@ var index = require('./index-Cy2P_ln3.js');
4
4
  var portalController = require('./portal-controller-DJft2QkA.js');
5
5
  var config = require('./config-BYR5qIIZ.js');
6
6
  var locale_service = require('./locale.service-DT6E8Rzd.js');
7
- var schemaBuilder = require('./schema-builder-BKX4QdTc.js');
7
+ var schemaBuilder = require('./schema-builder-DAwDwgIM.js');
8
8
  var abstractControl = require('./abstract-control-JI4_szTV.js');
9
9
  var tree_service = require('./tree.service-u0qqS1Qh.js');
10
10
 
@@ -10265,6 +10265,15 @@ const XFormBuilder = class {
10265
10265
  gridTemplateColumns: `repeat(${field.columns || 12}, minmax(0, 1fr))`,
10266
10266
  gap: `${field.gap || 15}px`,
10267
10267
  } }, 'elements' in field && field.elements ? this.bind(field.elements, field) : null));
10268
+ const ColumnsCallback = (field) => {
10269
+ const items = field.items || [];
10270
+ return (index.h("div", { style: {
10271
+ display: 'grid',
10272
+ gridTemplateColumns: `repeat(12, minmax(0, 1fr))`,
10273
+ gap: `${field.gap || 15}px`,
10274
+ width: '100%',
10275
+ } }, items.map((item) => (index.h("div", { style: { gridColumn: `span ${item.span || 12}` }, key: item.key }, item.elements ? this.bind(item.elements, field) : null)))));
10276
+ };
10268
10277
  const MapsCallback = (field) => {
10269
10278
  const width = field.width || '100%';
10270
10279
  const height = field.height || 400;
@@ -10529,7 +10538,16 @@ const XFormBuilder = class {
10529
10538
  dataIndex: col.dataIndex || col.key,
10530
10539
  slot: col.actions ? col.slot || col.key || 'action' : col.slot,
10531
10540
  }));
10532
- return (index.h("x-table", { ...commonProps, columns: columns, dataSource: (field.control ? field.control.value : f.dataSource) || [], rowKey: f.rowKey || 'id', tableTitle: f.tableTitle, pagination: f.pagination, tableScroll: f.tableScroll, rowSelection: f.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 => {
10541
+ const controlVal = field.control?.value;
10542
+ const isValArrayOfObjects = Array.isArray(controlVal) && controlVal.length > 0 && typeof controlVal[0] === 'object';
10543
+ const dataSource = isValArrayOfObjects ? controlVal : (f.dataSource || []);
10544
+ const rowSelection = f.rowSelection
10545
+ ? {
10546
+ ...f.rowSelection,
10547
+ selectedRowKeys: Array.isArray(controlVal) && !isValArrayOfObjects ? controlVal : [],
10548
+ }
10549
+ : undefined;
10550
+ return (index.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 => {
10533
10551
  if (f.rowSelection) {
10534
10552
  onChange(ev.detail.selectedRowKeys);
10535
10553
  }
@@ -10537,7 +10555,7 @@ const XFormBuilder = class {
10537
10555
  console.log('x-form-builder: Table changed:', ev.detail);
10538
10556
  } }, columns
10539
10557
  .filter(col => col.actions)
10540
- .map(col => (f.dataSource || []).map((record, index$1) => (index.h("div", { slot: `${col.slot}-${index$1}`, style: { display: 'flex', gap: '8px' } }, (col.actions || []).map(action => {
10558
+ .map(col => (dataSource || []).map((record, index$1) => (index.h("div", { slot: `${col.slot}-${index$1}`, style: { display: 'flex', gap: '8px' } }, (col.actions || []).map(action => {
10541
10559
  const button = (index.h("x-button", { type: action.type === 'button' ? 'primary' : 'link', size: "small", danger: action.danger, onClick: e => {
10542
10560
  e.stopPropagation();
10543
10561
  this.xTableAction.emit({
@@ -10591,6 +10609,29 @@ const XFormBuilder = class {
10591
10609
  }
10592
10610
  return (index.h("x-tabs", { activeKey: activeKey, tabPlacement: f.tabPlacement || 'top', type: tabsType, editable: allowRename, hideAdd: !allowAdd, onXTabRename: onRename, onXEdit: onEdit }, items.map(item => (index.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))))));
10593
10611
  };
10612
+ const DynamicCallback = (field) => {
10613
+ const slotName = field.meta?.slot || field.metadata?.slot || field.name;
10614
+ return (index.h("div", { class: "x-dynamic-field-container", ...{
10615
+ onXChange: (e) => {
10616
+ if (field.control && e.detail && 'value' in e.detail) {
10617
+ field.control.setValue(e.detail.value, { emitEvent: false });
10618
+ }
10619
+ }
10620
+ } }, index.h("slot", { name: slotName }, index.h("div", { style: {
10621
+ height: '300px',
10622
+ width: '100%',
10623
+ border: '1px dashed #d1d5db',
10624
+ borderRadius: '8px',
10625
+ backgroundColor: '#f9fafb',
10626
+ display: 'flex',
10627
+ flexDirection: 'column',
10628
+ alignItems: 'center',
10629
+ justifyContent: 'center',
10630
+ color: '#9ca3af',
10631
+ fontSize: '13px',
10632
+ gap: '8px'
10633
+ } }, index.h("span", { style: { fontSize: '24px' } }, "\uD83E\uDDE9"), index.h("span", null, "Dynamic slot \"", slotName, "\" is empty or not configured")))));
10634
+ };
10594
10635
  return {
10595
10636
  'text': InputCallback,
10596
10637
  'input': InputCallback,
@@ -10630,6 +10671,9 @@ const XFormBuilder = class {
10630
10671
  'button': ButtonCallback,
10631
10672
  'href': HrefCallback,
10632
10673
  'grid': GridCallback,
10674
+ 'columns': ColumnsCallback,
10675
+ 'columns-3': ColumnsCallback,
10676
+ 'columns-4': ColumnsCallback,
10633
10677
  'table': TableCallback,
10634
10678
  'maps': MapsCallback,
10635
10679
  'panel': PanelCallback,
@@ -10638,9 +10682,50 @@ const XFormBuilder = class {
10638
10682
  'qr-code': QRCodeCallback,
10639
10683
  'tabs': TabsCallback,
10640
10684
  'range-picker': DateRangeCallback,
10685
+ 'dynamic': DynamicCallback,
10641
10686
  };
10642
10687
  }
10643
10688
  async submit(event, field) {
10689
+ // Gather values from dynamic slots first
10690
+ let dynamicValues = {};
10691
+ let allDynamicValid = true;
10692
+ let dynamicErrors = {};
10693
+ if (this.builder && this.builder.form) {
10694
+ const dynamicFields = Array.from(this.builder.form.mapping.values()).filter(f => f.type === 'dynamic');
10695
+ for (const dField of dynamicFields) {
10696
+ const slotName = dField.meta?.slot || dField.metadata?.slot || dField.name;
10697
+ // Search for slotted elements in light DOM (children of this.el)
10698
+ const slottedElement = Array.from(this.el.children).find(child => child.getAttribute('slot') === slotName);
10699
+ if (slottedElement) {
10700
+ let val = slottedElement.value;
10701
+ if (val === undefined && dField.control) {
10702
+ val = dField.control.value;
10703
+ }
10704
+ // Update internal control so built-in validators (like required) pass
10705
+ if (dField.control && val !== undefined) {
10706
+ dField.control.setValue(val, { emitEvent: false });
10707
+ }
10708
+ // Check if it has a validate method
10709
+ if (typeof slottedElement.validate === 'function') {
10710
+ const res = await slottedElement.validate(val);
10711
+ if (res) {
10712
+ allDynamicValid = false;
10713
+ dynamicErrors[dField.name] = res;
10714
+ slottedElement.validationState = {
10715
+ status: 'invalid',
10716
+ errorMessage: typeof res === 'object' ? Object.values(res)[0] : 'Invalid',
10717
+ errors: res
10718
+ };
10719
+ }
10720
+ else {
10721
+ slottedElement.validationState = { status: 'valid', errors: null, errorMessage: '' };
10722
+ }
10723
+ }
10724
+ // Merge value
10725
+ dynamicValues[dField.name] = val;
10726
+ }
10727
+ }
10728
+ }
10644
10729
  // Validate all mapped controls (both sync and async) first to ensure errors are updated
10645
10730
  if (this.builder && this.builder.form) {
10646
10731
  for (const [_key, fld] of Array.from(this.builder.form.mapping.entries())) {
@@ -10665,9 +10750,9 @@ const XFormBuilder = class {
10665
10750
  }
10666
10751
  }
10667
10752
  }
10668
- if (this.builder.form.valid && allCaptchaValid) {
10753
+ if (this.builder.form.valid && allCaptchaValid && allDynamicValid) {
10669
10754
  this.formSubmit.emit({
10670
- value: this.builder.form.value,
10755
+ value: { ...this.builder.form.value, ...dynamicValues },
10671
10756
  builder: this.builder,
10672
10757
  event: event,
10673
10758
  field,
@@ -10689,7 +10774,7 @@ const XFormBuilder = class {
10689
10774
  this.formError.emit({
10690
10775
  builder: this.builder,
10691
10776
  event: event,
10692
- errors: this.builder.form.errors,
10777
+ errors: { ...this.builder.form.errors, ...dynamicErrors },
10693
10778
  });
10694
10779
  }
10695
10780
  }
@@ -10752,7 +10837,8 @@ const XFormBuilder = class {
10752
10837
  const control = field.control;
10753
10838
  if (control && this.builder && control.touched) {
10754
10839
  commonProps.status = undefined;
10755
- if (control.invalid) {
10840
+ // 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ý
10841
+ if (control.invalid && field.type !== 'dynamic') {
10756
10842
  commonProps.status = 'error';
10757
10843
  const errors = control.errors ?? {};
10758
10844
  const messages = this.getMessageValidator(field, errors);
@@ -10801,6 +10887,10 @@ const XFormBuilder = class {
10801
10887
  componentWillLoad() {
10802
10888
  this.asyncBuilderForm(true);
10803
10889
  }
10890
+ componentDidUpdate() {
10891
+ }
10892
+ disconnectedCallback() {
10893
+ }
10804
10894
  handleValueChange() {
10805
10895
  if (this._isInternalChange)
10806
10896
  return;
@@ -20499,6 +20589,9 @@ const XTable = class {
20499
20589
  if (column.maxWidth) {
20500
20590
  style.maxWidth = `${column.maxWidth}px`;
20501
20591
  }
20592
+ if (column.width) {
20593
+ style.width = typeof column.width === 'number' ? `${column.width}px` : column.width;
20594
+ }
20502
20595
  // Sticky
20503
20596
  // Find the leaf columns to determine sticky offsets
20504
20597
  const leaves = ColumnUtil.getFlattenColumns([column]);
@@ -20691,6 +20784,9 @@ const XTable = class {
20691
20784
  cellContent = column.render ? column.render(value, record, index$1) : value;
20692
20785
  }
20693
20786
  const style = {};
20787
+ if (column.width) {
20788
+ style.width = typeof column.width === 'number' ? `${column.width}px` : column.width;
20789
+ }
20694
20790
  // Sticky
20695
20791
  const key = column.key || column.dataIndex;
20696
20792
  const isFixedLeft = column.fixed === 'left' || column.fixed === true;
@@ -20893,10 +20989,17 @@ const XTable = class {
20893
20989
  */
20894
20990
  render() {
20895
20991
  const scrollStyle = {};
20992
+ const innerTableStyle = {};
20896
20993
  if (this.tableScroll?.x) {
20897
20994
  scrollStyle.overflowX = 'auto';
20898
20995
  if (typeof this.tableScroll.x === 'number') {
20899
- scrollStyle.minWidth = `${this.tableScroll.x}px`;
20996
+ innerTableStyle.minWidth = `${this.tableScroll.x}px`;
20997
+ }
20998
+ else if (typeof this.tableScroll.x === 'string') {
20999
+ innerTableStyle.minWidth = this.tableScroll.x;
21000
+ }
21001
+ else if (this.tableScroll.x === true) {
21002
+ innerTableStyle.minWidth = 'max-content';
20900
21003
  }
20901
21004
  }
20902
21005
  if (this.tableScroll?.y) {
@@ -20924,17 +21027,18 @@ const XTable = class {
20924
21027
  total,
20925
21028
  startIndex,
20926
21029
  });
20927
- return (index.h(index.Host, { key: 'eaf4a6cf70d130e87188308bfd7bfb562cd01ba7', class: {
21030
+ return (index.h(index.Host, { key: '76c750528d53df24f767afdc0d53e90c901f113f', class: {
20928
21031
  'x-table': true,
20929
21032
  'x-table-bordered': this.bordered,
20930
21033
  'x-table-loading': this.loading,
20931
21034
  [`x-table-${this.size}`]: true,
20932
21035
  'x-table-sticky': !!this.sticky || !!this.tableScroll?.y,
20933
21036
  [this.classNames?.root || '']: !!this.classNames?.root,
20934
- }, style: this.styles?.root }, index.h("div", { key: '96dc817e5ed149fda58e1e775ad9321cc667841c', class: "x-table-wrapper" }, this.renderTitle(), topPagination && this.renderPagination('top'), index.h("div", { key: 'a746ceefce9e30cd3f856ff61e9f84299ca211cc', class: "x-table-container" }, this.loading && (index.h("div", { key: 'c65e55ba96dc9ff93630c1cdf7fc5c7da76b18ae', class: "x-table-loading-overlay" }, index.h("x-spin", { key: 'd86580a956df1ee08c58454eb519f2cb78a16b8b' }))), index.h("div", { key: 'c526fe4cae8ce289d266ed97109d0fb57f3c48b3', class: "x-table-content", style: scrollStyle }, index.h("table", { key: '8e4ce3903cf364956c08ff0395a354edbb7ee536', style: {
21037
+ }, style: this.styles?.root }, index.h("div", { key: '5af6bb4b50f3e790f1eb15d1c15c262f4ff8ea29', class: "x-table-wrapper" }, this.renderTitle(), topPagination && this.renderPagination('top'), index.h("div", { key: '71578d15387263765f1ef603520d2e7b668c1476', class: "x-table-container" }, this.loading && (index.h("div", { key: '17eaf05d5f7884e606a26c5ee64ad23bb495e0af', class: "x-table-loading-overlay" }, index.h("x-spin", { key: '69fe0249701f71a9dab737d54e6c848fdbce9111' }))), index.h("div", { key: '37d0f9e25159256389c8b137236ffd20c2575a88', class: "x-table-content", style: scrollStyle }, index.h("table", { key: '511af98bedf1b8fc0a2b2f1a07fb22b9d7d4675a', style: {
20935
21038
  ...tableStyle,
21039
+ ...innerTableStyle,
20936
21040
  tableLayout: this.resizeState || this.internalColumns.some(c => c.width) ? 'fixed' : this.tableLayout,
20937
- } }, this.renderColGroup(), this.renderHeader(stickyOffsets), this.renderBody(stickyOffsets)))), (bottomPagination || this.tableFooter) && (index.h("div", { key: '7e012c2a718b535225d3b9f9a2e1639bbb5bf23e', class: "x-table-footer-pagination" }, this.renderFooter(), bottomPagination && this.renderPagination('bottom'))))));
21041
+ } }, this.renderColGroup(), this.renderHeader(stickyOffsets), this.renderBody(stickyOffsets)))), (bottomPagination || this.tableFooter) && (index.h("div", { key: '3bd5751883e4d30519d81cc6ade817c0a13951cc', class: "x-table-footer-pagination" }, this.renderFooter(), bottomPagination && this.renderPagination('bottom'))))));
20938
21042
  }
20939
21043
  static get watchers() { return {
20940
21044
  "rowKey": [{
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var index = require('./index-Cy2P_ln3.js');
4
- var icons = require('./icons-DJ-kuboh.js');
4
+ var icons = require('./icons-BfHE2jcr.js');
5
5
  var locale_service = require('./locale.service-DT6E8Rzd.js');
6
6
 
7
7
  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}`;
@@ -21,16 +21,30 @@ export class ConditionOperators {
21
21
  }
22
22
  equals(option, field, value) {
23
23
  value = ValueUtil.detect(field, value);
24
+ if ((typeof value === 'string' && typeof option.value === 'number') ||
25
+ (typeof value === 'number' && typeof option.value === 'string')) {
26
+ return String(value) === String(option.value);
27
+ }
24
28
  return option.value === value;
25
29
  }
26
30
  notEquals(option, field, value) {
27
31
  value = ValueUtil.detect(field, value);
32
+ if ((typeof value === 'string' && typeof option.value === 'number') ||
33
+ (typeof value === 'number' && typeof option.value === 'string')) {
34
+ return String(value) !== String(option.value);
35
+ }
28
36
  return option.value !== value;
29
37
  }
30
38
  contains(option, field, value) {
31
39
  value = ValueUtil.detect(field, value);
32
40
  if (Array.isArray(value)) {
33
- return value.includes(option.value);
41
+ return value.some(item => {
42
+ if ((typeof item === 'string' && typeof option.value === 'number') ||
43
+ (typeof item === 'number' && typeof option.value === 'string')) {
44
+ return String(item) === String(option.value);
45
+ }
46
+ return item === option.value;
47
+ });
34
48
  }
35
49
  if (typeof value === 'string') {
36
50
  return value.includes(String(option.value));
@@ -64,7 +78,13 @@ export class ConditionOperators {
64
78
  notContains(option, field, value) {
65
79
  value = ValueUtil.detect(field, value);
66
80
  if (Array.isArray(value)) {
67
- return !value.includes(option.value);
81
+ return !value.some(item => {
82
+ if ((typeof item === 'string' && typeof option.value === 'number') ||
83
+ (typeof item === 'number' && typeof option.value === 'string')) {
84
+ return String(item) === String(option.value);
85
+ }
86
+ return item === option.value;
87
+ });
68
88
  }
69
89
  if (typeof value === 'string') {
70
90
  return !value.includes(String(option.value));
@@ -104,26 +124,48 @@ export class ConditionOperators {
104
124
  in(option, field, value) {
105
125
  value = ValueUtil.detect(field, value);
106
126
  if (Array.isArray(option.value)) {
107
- return option.value.includes(value);
127
+ return option.value.some(item => {
128
+ if ((typeof item === 'string' && typeof value === 'number') ||
129
+ (typeof item === 'number' && typeof value === 'string')) {
130
+ return String(item) === String(value);
131
+ }
132
+ return item === value;
133
+ });
108
134
  }
109
135
  if (typeof option.value === 'string') {
110
136
  return option.value
111
137
  .split(',')
112
138
  .map(v => v.trim())
113
- .includes(String(value));
139
+ .some(item => {
140
+ if (typeof value === 'number') {
141
+ return item === String(value);
142
+ }
143
+ return item === value;
144
+ });
114
145
  }
115
146
  return false;
116
147
  }
117
148
  notIn(option, field, value) {
118
149
  value = ValueUtil.detect(field, value);
119
150
  if (Array.isArray(option.value)) {
120
- return !option.value.includes(value);
151
+ return !option.value.some(item => {
152
+ if ((typeof item === 'string' && typeof value === 'number') ||
153
+ (typeof item === 'number' && typeof value === 'string')) {
154
+ return String(item) === String(value);
155
+ }
156
+ return item === value;
157
+ });
121
158
  }
122
159
  if (typeof option.value === 'string') {
123
160
  return !option.value
124
161
  .split(',')
125
162
  .map(v => v.trim())
126
- .includes(String(value));
163
+ .some(item => {
164
+ if (typeof value === 'number') {
165
+ return item === String(value);
166
+ }
167
+ return item === value;
168
+ });
127
169
  }
128
170
  return true;
129
171
  }
@@ -46,8 +46,8 @@ export class FormMapping extends FormGroup {
46
46
  // Safely merge Maps
47
47
  child_paths.forEach((v, k) => paths.set(k, v));
48
48
  }
49
- // Support tabs mapping recursively
50
- if (field.type === 'tabs' && field.items && Array.isArray(field.items)) {
49
+ // Support tabs and columns mapping recursively
50
+ if ((field.type === 'tabs' || String(field.type).startsWith('columns-')) && field.items && Array.isArray(field.items)) {
51
51
  for (const item of field.items) {
52
52
  if (item && Array.isArray(item.elements)) {
53
53
  const child_paths = mappingRecursive(item.elements);