@getflip/swirl-components 0.363.1 → 0.363.2

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.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "timestamp": "2025-08-08T07:02:43",
2
+ "timestamp": "2025-08-11T08:37:40",
3
3
  "compiler": {
4
4
  "name": "@stencil/core",
5
5
  "version": "4.35.0",
@@ -226,11 +226,17 @@ const SwirlTable = class {
226
226
  this.setupDragDrop();
227
227
  }
228
228
  });
229
- this.rowMutationObserver.observe(this.bodyEl, {
229
+ this.startRowMutationObserver();
230
+ }
231
+ startRowMutationObserver() {
232
+ this.rowMutationObserver?.observe(this.bodyEl, {
230
233
  childList: true,
231
234
  subtree: true,
232
235
  });
233
236
  }
237
+ stopRowMutationObserver() {
238
+ this.rowMutationObserver?.disconnect();
239
+ }
234
240
  setupDragDrop() {
235
241
  if (this.sortable) {
236
242
  this.sortable.destroy();
@@ -258,6 +264,9 @@ const SwirlTable = class {
258
264
  handle: this.dragDropHandle,
259
265
  fallbackOnBody: true,
260
266
  group: `swirl-table-${Math.random().toString().substring(2)}`,
267
+ onStart: () => {
268
+ this.stopRowMutationObserver();
269
+ },
261
270
  onEnd: (event) => {
262
271
  event.stopPropagation();
263
272
  const { to, newIndex, oldIndex, item } = event;
@@ -271,6 +280,7 @@ const SwirlTable = class {
271
280
  : undefined,
272
281
  newPrevSiblingItemId: newIndex > 0 ? to.children[newIndex - 1].id : undefined,
273
282
  });
283
+ this.startRowMutationObserver();
274
284
  },
275
285
  });
276
286
  }
@@ -570,7 +580,7 @@ const SwirlTable = class {
570
580
  "table--show-empty-state": this.empty && !this.loading,
571
581
  "table--keyboard-move": this.movingViaKeyboard,
572
582
  });
573
- return (index$1.h(index$1.Host, { key: '6bc1959e06eaff434db4841127eaf6011ea4e386' }, index$1.h("div", { key: '1aef97ca18f0d367df69681fd4a0287fc1e9a96d', class: className }, this.enableDragDrop && (index$1.h("swirl-visually-hidden", { key: 'ae609948912c9656417c710d3bd0e1cc4b8e7977' }, index$1.h("span", { key: '8f6d333178d51be1ca097c346f90d01c92f1dfa7', "aria-live": "assertive" }, this.liveRegionText))), index$1.h("div", { key: '9ad655fd644d07acdc86c194d9685958f4acbcd9', class: "table__container", onFocusin: this.onFocus, onFocusout: this.onBlur, onKeyDown: this.onKeyDown, onScroll: this.onScroll, ref: (el) => (this.container = el), tabIndex: -1 }, index$1.h("div", { key: 'ce68c4da82f895a975e7d48852470bd60b861ce0', "aria-describedby": Boolean(this.caption) ? "caption" : undefined, "aria-label": this.label, role: "table", class: "table__table" }, this.caption && (index$1.h("swirl-visually-hidden", { key: '77389ebb48e386ebb8d896444a394fa3c9cb82ec' }, index$1.h("div", { key: '65d40dac426958eb868d9d93461bb27f8f389b1d', id: "caption" }, this.caption))), index$1.h("div", { key: '01c0b5caa080855c98799e4cf2e8d3c3d91e0baf', role: "rowgroup" }, index$1.h("div", { key: '66e18f47a2964f15d64b4adfec51b88fb3563c1b', class: "table__header", ref: (el) => (this.headerEl = el), role: "row" }, index$1.h("slot", { key: '7e6d17abfec2e509afeff2a4bca5ad4634bc8705', name: "columns" }))), index$1.h("div", { key: 'cc5f8948dcf6998d8bd3497b9d93fc1218052278', class: "table__body", ref: (el) => (this.bodyEl = el) }, index$1.h("slot", { key: '17d4f92f350e958fd3270569b9fc18f08ccfe325', name: "rows" }), index$1.h("div", { key: '25499fcf2e5fbe30be4b281f121fe8df48517692', class: "table__empty-row", role: "row" }, index$1.h("div", { key: '007c30a0120784a4c86e22c8b036ee16b4720b6a', "aria-colspan": this.getColumns().length, class: "table__empty-row-cell", role: "cell" }, index$1.h("slot", { key: 'c535c880ecb853342633e3036d99d417a4dd7c83', name: "empty" }), !hasEmptyStateSlotAssignment && (index$1.h("swirl-text", { key: 'd5afb052b4c575930aacd9ee366ae91115db16ac', align: "center", size: "sm" }, this.emptyStateLabel))))))))));
583
+ return (index$1.h(index$1.Host, { key: '31cc2b99cd42ce8de24fcdca3bd25d677b2065e9' }, index$1.h("div", { key: '2b10bbe4a18214e22f2ecedb07f2806d830abb55', class: className }, this.enableDragDrop && (index$1.h("swirl-visually-hidden", { key: 'aac0580b6da061bcf6a4e57f9e3308bcd83cd9ab' }, index$1.h("span", { key: '3c2c47c530275c59c13af5ae0bf95fe865546848', "aria-live": "assertive" }, this.liveRegionText))), index$1.h("div", { key: '063f4ec7388d8a9b9cc986e24e98dab85deb81b7', class: "table__container", onFocusin: this.onFocus, onFocusout: this.onBlur, onKeyDown: this.onKeyDown, onScroll: this.onScroll, ref: (el) => (this.container = el), tabIndex: -1 }, index$1.h("div", { key: '44ae0cb1ac3dbedba432e5154bb890311544a361', "aria-describedby": Boolean(this.caption) ? "caption" : undefined, "aria-label": this.label, role: "table", class: "table__table" }, this.caption && (index$1.h("swirl-visually-hidden", { key: '4e98279e3a5e8dd340b05f1851559cbf35b25d95' }, index$1.h("div", { key: 'ec620a55154a96b65760fdfe5857d36cabc20e03', id: "caption" }, this.caption))), index$1.h("div", { key: 'de46c8483c070f631b529ff0e53db8b6a27ec8d8', role: "rowgroup" }, index$1.h("div", { key: '18a6f22082c3fe08134f6843ac9b9722501716fa', class: "table__header", ref: (el) => (this.headerEl = el), role: "row" }, index$1.h("slot", { key: '167710dee7162c62f40c218f6f2fb98e3f7534c0', name: "columns" }))), index$1.h("div", { key: '58cd2a6ee100461b4a9e8b5da35884f4271092a2', class: "table__body", ref: (el) => (this.bodyEl = el) }, index$1.h("slot", { key: 'd258590441b67c639ba479bcbf7ae85dc840fa88', name: "rows" }), index$1.h("div", { key: '9ddfc91f1a3055363798312fb0fd1aeb2671c2db', class: "table__empty-row", role: "row" }, index$1.h("div", { key: '78c4b0fa18d31277de03507b564ec42eba10c0a3', "aria-colspan": this.getColumns().length, class: "table__empty-row-cell", role: "cell" }, index$1.h("slot", { key: 'f56688d7ff20f7ae1a3fc4f9f8241bc235b8ff5e', name: "empty" }), !hasEmptyStateSlotAssignment && (index$1.h("swirl-text", { key: 'b7cb802b3420a554459372d8813f1b7ba6571929', align: "center", size: "sm" }, this.emptyStateLabel))))))))));
574
584
  }
575
585
  get el() { return index$1.getElement(this); }
576
586
  static get watchers() { return {
@@ -141,11 +141,17 @@ export class SwirlTable {
141
141
  this.setupDragDrop();
142
142
  }
143
143
  });
144
- this.rowMutationObserver.observe(this.bodyEl, {
144
+ this.startRowMutationObserver();
145
+ }
146
+ startRowMutationObserver() {
147
+ this.rowMutationObserver?.observe(this.bodyEl, {
145
148
  childList: true,
146
149
  subtree: true,
147
150
  });
148
151
  }
152
+ stopRowMutationObserver() {
153
+ this.rowMutationObserver?.disconnect();
154
+ }
149
155
  setupDragDrop() {
150
156
  if (this.sortable) {
151
157
  this.sortable.destroy();
@@ -173,6 +179,9 @@ export class SwirlTable {
173
179
  handle: this.dragDropHandle,
174
180
  fallbackOnBody: true,
175
181
  group: `swirl-table-${Math.random().toString().substring(2)}`,
182
+ onStart: () => {
183
+ this.stopRowMutationObserver();
184
+ },
176
185
  onEnd: (event) => {
177
186
  event.stopPropagation();
178
187
  const { to, newIndex, oldIndex, item } = event;
@@ -186,6 +195,7 @@ export class SwirlTable {
186
195
  : undefined,
187
196
  newPrevSiblingItemId: newIndex > 0 ? to.children[newIndex - 1].id : undefined,
188
197
  });
198
+ this.startRowMutationObserver();
189
199
  },
190
200
  });
191
201
  }
@@ -485,7 +495,7 @@ export class SwirlTable {
485
495
  "table--show-empty-state": this.empty && !this.loading,
486
496
  "table--keyboard-move": this.movingViaKeyboard,
487
497
  });
488
- return (h(Host, { key: '6bc1959e06eaff434db4841127eaf6011ea4e386' }, h("div", { key: '1aef97ca18f0d367df69681fd4a0287fc1e9a96d', class: className }, this.enableDragDrop && (h("swirl-visually-hidden", { key: 'ae609948912c9656417c710d3bd0e1cc4b8e7977' }, h("span", { key: '8f6d333178d51be1ca097c346f90d01c92f1dfa7', "aria-live": "assertive" }, this.liveRegionText))), h("div", { key: '9ad655fd644d07acdc86c194d9685958f4acbcd9', class: "table__container", onFocusin: this.onFocus, onFocusout: this.onBlur, onKeyDown: this.onKeyDown, onScroll: this.onScroll, ref: (el) => (this.container = el), tabIndex: -1 }, h("div", { key: 'ce68c4da82f895a975e7d48852470bd60b861ce0', "aria-describedby": Boolean(this.caption) ? "caption" : undefined, "aria-label": this.label, role: "table", class: "table__table" }, this.caption && (h("swirl-visually-hidden", { key: '77389ebb48e386ebb8d896444a394fa3c9cb82ec' }, h("div", { key: '65d40dac426958eb868d9d93461bb27f8f389b1d', id: "caption" }, this.caption))), h("div", { key: '01c0b5caa080855c98799e4cf2e8d3c3d91e0baf', role: "rowgroup" }, h("div", { key: '66e18f47a2964f15d64b4adfec51b88fb3563c1b', class: "table__header", ref: (el) => (this.headerEl = el), role: "row" }, h("slot", { key: '7e6d17abfec2e509afeff2a4bca5ad4634bc8705', name: "columns" }))), h("div", { key: 'cc5f8948dcf6998d8bd3497b9d93fc1218052278', class: "table__body", ref: (el) => (this.bodyEl = el) }, h("slot", { key: '17d4f92f350e958fd3270569b9fc18f08ccfe325', name: "rows" }), h("div", { key: '25499fcf2e5fbe30be4b281f121fe8df48517692', class: "table__empty-row", role: "row" }, h("div", { key: '007c30a0120784a4c86e22c8b036ee16b4720b6a', "aria-colspan": this.getColumns().length, class: "table__empty-row-cell", role: "cell" }, h("slot", { key: 'c535c880ecb853342633e3036d99d417a4dd7c83', name: "empty" }), !hasEmptyStateSlotAssignment && (h("swirl-text", { key: 'd5afb052b4c575930aacd9ee366ae91115db16ac', align: "center", size: "sm" }, this.emptyStateLabel))))))))));
498
+ return (h(Host, { key: '31cc2b99cd42ce8de24fcdca3bd25d677b2065e9' }, h("div", { key: '2b10bbe4a18214e22f2ecedb07f2806d830abb55', class: className }, this.enableDragDrop && (h("swirl-visually-hidden", { key: 'aac0580b6da061bcf6a4e57f9e3308bcd83cd9ab' }, h("span", { key: '3c2c47c530275c59c13af5ae0bf95fe865546848', "aria-live": "assertive" }, this.liveRegionText))), h("div", { key: '063f4ec7388d8a9b9cc986e24e98dab85deb81b7', class: "table__container", onFocusin: this.onFocus, onFocusout: this.onBlur, onKeyDown: this.onKeyDown, onScroll: this.onScroll, ref: (el) => (this.container = el), tabIndex: -1 }, h("div", { key: '44ae0cb1ac3dbedba432e5154bb890311544a361', "aria-describedby": Boolean(this.caption) ? "caption" : undefined, "aria-label": this.label, role: "table", class: "table__table" }, this.caption && (h("swirl-visually-hidden", { key: '4e98279e3a5e8dd340b05f1851559cbf35b25d95' }, h("div", { key: 'ec620a55154a96b65760fdfe5857d36cabc20e03', id: "caption" }, this.caption))), h("div", { key: 'de46c8483c070f631b529ff0e53db8b6a27ec8d8', role: "rowgroup" }, h("div", { key: '18a6f22082c3fe08134f6843ac9b9722501716fa', class: "table__header", ref: (el) => (this.headerEl = el), role: "row" }, h("slot", { key: '167710dee7162c62f40c218f6f2fb98e3f7534c0', name: "columns" }))), h("div", { key: '58cd2a6ee100461b4a9e8b5da35884f4271092a2', class: "table__body", ref: (el) => (this.bodyEl = el) }, h("slot", { key: 'd258590441b67c639ba479bcbf7ae85dc840fa88', name: "rows" }), h("div", { key: '9ddfc91f1a3055363798312fb0fd1aeb2671c2db', class: "table__empty-row", role: "row" }, h("div", { key: '78c4b0fa18d31277de03507b564ec42eba10c0a3', "aria-colspan": this.getColumns().length, class: "table__empty-row-cell", role: "cell" }, h("slot", { key: 'f56688d7ff20f7ae1a3fc4f9f8241bc235b8ff5e', name: "empty" }), !hasEmptyStateSlotAssignment && (h("swirl-text", { key: 'b7cb802b3420a554459372d8813f1b7ba6571929', align: "center", size: "sm" }, this.emptyStateLabel))))))))));
489
499
  }
490
500
  static get is() { return "swirl-table"; }
491
501
  static get encapsulation() { return "scoped"; }