@limetech/lime-elements 38.29.3 → 38.30.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/CHANGELOG.md +21 -0
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/limel-form.cjs.entry.js +60 -27
- package/dist/cjs/limel-form.cjs.entry.js.map +1 -1
- package/dist/cjs/limel-table.cjs.entry.js +14 -6
- package/dist/cjs/limel-table.cjs.entry.js.map +1 -1
- package/dist/collection/components/form/form.js +1 -0
- package/dist/collection/components/form/form.js.map +1 -1
- package/dist/collection/components/form/form.types.js.map +1 -1
- package/dist/collection/components/form/templates/array-field-collapsible-item.js +11 -9
- package/dist/collection/components/form/templates/array-field-collapsible-item.js.map +1 -1
- package/dist/collection/components/form/templates/array-field-simple-item.js +36 -18
- package/dist/collection/components/form/templates/array-field-simple-item.js.map +1 -1
- package/dist/collection/components/form/templates/array-field.js +13 -0
- package/dist/collection/components/form/templates/array-field.js.map +1 -1
- package/dist/collection/components/table/table.js +15 -7
- package/dist/collection/components/table/table.js.map +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/limel-form.entry.js +60 -27
- package/dist/esm/limel-form.entry.js.map +1 -1
- package/dist/esm/limel-table.entry.js +14 -6
- package/dist/esm/limel-table.entry.js.map +1 -1
- package/dist/lime-elements/index.esm.js.map +1 -1
- package/dist/lime-elements/lime-elements.esm.js +1 -1
- package/dist/lime-elements/{p-d24988e7.entry.js → p-beee38bc.entry.js} +5 -5
- package/dist/lime-elements/p-beee38bc.entry.js.map +1 -0
- package/dist/lime-elements/{p-c3394c18.entry.js → p-d1aa44e1.entry.js} +2 -2
- package/dist/lime-elements/p-d1aa44e1.entry.js.map +1 -0
- package/dist/types/components/form/form.d.ts +1 -0
- package/dist/types/components/form/form.types.d.ts +8 -0
- package/dist/types/components/form/templates/array-field-collapsible-item.d.ts +9 -1
- package/dist/types/components/form/templates/array-field-simple-item.d.ts +9 -5
- package/dist/types/components/form/templates/array-field.d.ts +1 -0
- package/dist/types/components/table/table.d.ts +3 -1
- package/dist/types/components.d.ts +6 -2
- package/package.json +1 -1
- package/dist/lime-elements/p-c3394c18.entry.js.map +0 -1
- package/dist/lime-elements/p-d24988e7.entry.js.map +0 -1
|
@@ -24430,7 +24430,10 @@ const Table = class {
|
|
|
24430
24430
|
this.formatRows();
|
|
24431
24431
|
}
|
|
24432
24432
|
updateData(newData = [], oldData = []) {
|
|
24433
|
-
const
|
|
24433
|
+
const newIds = this.getRowIds(newData);
|
|
24434
|
+
const oldIds = this.getRowIds(oldData);
|
|
24435
|
+
const shouldReplace = this.shouldReplaceData(newIds, oldIds);
|
|
24436
|
+
const hasRowUpdates = !areRowsEqual(newData, oldData);
|
|
24434
24437
|
setTimeout(() => {
|
|
24435
24438
|
if (!this.tabulator) {
|
|
24436
24439
|
return;
|
|
@@ -24441,6 +24444,11 @@ const Table = class {
|
|
|
24441
24444
|
this.setSelection();
|
|
24442
24445
|
return;
|
|
24443
24446
|
}
|
|
24447
|
+
if (hasRowUpdates) {
|
|
24448
|
+
this.tabulator.updateData(newData);
|
|
24449
|
+
this.setSelection();
|
|
24450
|
+
return;
|
|
24451
|
+
}
|
|
24444
24452
|
this.tabulator.updateOrAddData(newData);
|
|
24445
24453
|
});
|
|
24446
24454
|
}
|
|
@@ -24503,12 +24511,12 @@ const Table = class {
|
|
|
24503
24511
|
}
|
|
24504
24512
|
this.tabulator.setSort(newSorting);
|
|
24505
24513
|
}
|
|
24506
|
-
shouldReplaceData(
|
|
24507
|
-
const newIds = newData.map((item) => { var _a; return (_a = item.id) !== null && _a !== void 0 ? _a : item; });
|
|
24508
|
-
const oldIds = oldData.map((item) => { var _a; return (_a = item.id) !== null && _a !== void 0 ? _a : item; });
|
|
24514
|
+
shouldReplaceData(newIds, oldIds) {
|
|
24509
24515
|
return (!this.areEqualIds(newIds, oldIds) ||
|
|
24510
|
-
!this.isSameOrder(newIds, oldIds)
|
|
24511
|
-
|
|
24516
|
+
!this.isSameOrder(newIds, oldIds));
|
|
24517
|
+
}
|
|
24518
|
+
getRowIds(data) {
|
|
24519
|
+
return data.map((item) => { var _a; return (_a = item.id) !== null && _a !== void 0 ? _a : item; });
|
|
24512
24520
|
}
|
|
24513
24521
|
areEqualIds(newIds, oldIds) {
|
|
24514
24522
|
const newIdSet = new Set(newIds);
|