@limetech/lime-elements 38.39.0 → 38.39.1

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 CHANGED
@@ -1,3 +1,10 @@
1
+ ## [38.39.1](https://github.com/Lundalogik/lime-elements/compare/v38.39.0...v38.39.1) (2026-01-22)
2
+
3
+ ### Bug Fixes
4
+
5
+
6
+ * **form:** prevent duplication of sections after drag to reorder ([c1cf6f7](https://github.com/Lundalogik/lime-elements/commit/c1cf6f74d9253f14fa5a31ff2bc24852a9b935f4))
7
+
1
8
  ## [38.39.0](https://github.com/Lundalogik/lime-elements/compare/v38.38.1...v38.39.0) (2026-01-22)
2
9
 
3
10
  ### Features
@@ -42327,7 +42327,13 @@ class ArrayFieldTemplate extends react.Component {
42327
42327
  if (!this.container) {
42328
42328
  return [];
42329
42329
  }
42330
- const items = [...this.container.querySelectorAll('.array-item')];
42330
+ // Only read the order of the direct children of this array field.
42331
+ // Nested array fields may render `.array-item` elements inside items,
42332
+ // and those must not affect the parent order.
42333
+ const items = [...this.container.children].filter((element) => {
42334
+ var _a, _b;
42335
+ return Boolean((_b = (_a = element === null || element === void 0 ? void 0 : element.classList) === null || _a === void 0 ? void 0 : _a.contains) === null || _b === void 0 ? void 0 : _b.call(_a, 'array-item'));
42336
+ });
42331
42337
  const order = [];
42332
42338
  for (const element of items) {
42333
42339
  const index = this.getReorderId(element);
@@ -42338,13 +42344,11 @@ class ArrayFieldTemplate extends react.Component {
42338
42344
  return order;
42339
42345
  }
42340
42346
  getReorderId(element) {
42347
+ var _a;
42341
42348
  if (!element) {
42342
42349
  return undefined;
42343
42350
  }
42344
- if (!(element instanceof HTMLElement)) {
42345
- return undefined;
42346
- }
42347
- const value = element.dataset.reorderId;
42351
+ const value = (_a = element === null || element === void 0 ? void 0 : element.dataset) === null || _a === void 0 ? void 0 : _a.reorderId;
42348
42352
  if (value === undefined) {
42349
42353
  return undefined;
42350
42354
  }