@toolbox-web/grid 0.3.3 → 0.4.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.
Files changed (148) hide show
  1. package/all.d.ts +19 -19
  2. package/all.d.ts.map +1 -1
  3. package/all.js +1798 -1201
  4. package/all.js.map +1 -1
  5. package/index.js +2215 -2026
  6. package/index.js.map +1 -1
  7. package/lib/core/grid.d.ts +22 -12
  8. package/lib/core/grid.d.ts.map +1 -1
  9. package/lib/core/internal/columns.d.ts +0 -9
  10. package/lib/core/internal/columns.d.ts.map +1 -1
  11. package/lib/core/internal/config-manager.d.ts +236 -0
  12. package/lib/core/internal/config-manager.d.ts.map +1 -0
  13. package/lib/core/internal/editing.d.ts +3 -3
  14. package/lib/core/internal/editing.d.ts.map +1 -1
  15. package/lib/core/internal/event-delegation.d.ts.map +1 -1
  16. package/lib/core/internal/header.d.ts.map +1 -1
  17. package/lib/core/internal/keyboard.d.ts.map +1 -1
  18. package/lib/core/internal/render-scheduler.d.ts +123 -0
  19. package/lib/core/internal/render-scheduler.d.ts.map +1 -0
  20. package/lib/core/internal/rows.d.ts +8 -3
  21. package/lib/core/internal/rows.d.ts.map +1 -1
  22. package/lib/core/internal/sanitize.d.ts +2 -2
  23. package/lib/core/internal/sanitize.d.ts.map +1 -1
  24. package/lib/core/internal/shell.d.ts +40 -2
  25. package/lib/core/internal/shell.d.ts.map +1 -1
  26. package/lib/core/internal/validate-config.d.ts +25 -0
  27. package/lib/core/internal/validate-config.d.ts.map +1 -0
  28. package/lib/core/plugin/base-plugin.d.ts +118 -0
  29. package/lib/core/plugin/base-plugin.d.ts.map +1 -1
  30. package/lib/core/plugin/index.d.ts +1 -0
  31. package/lib/core/plugin/index.d.ts.map +1 -1
  32. package/lib/core/plugin/plugin-manager.d.ts +13 -2
  33. package/lib/core/plugin/plugin-manager.d.ts.map +1 -1
  34. package/lib/core/plugin/types.d.ts +17 -3
  35. package/lib/core/plugin/types.d.ts.map +1 -1
  36. package/lib/core/types.d.ts +112 -12
  37. package/lib/core/types.d.ts.map +1 -1
  38. package/lib/plugins/clipboard/ClipboardPlugin.d.ts +7 -1
  39. package/lib/plugins/clipboard/ClipboardPlugin.d.ts.map +1 -1
  40. package/lib/plugins/clipboard/index.js +78 -22
  41. package/lib/plugins/clipboard/index.js.map +1 -1
  42. package/lib/plugins/column-virtualization/index.js +72 -21
  43. package/lib/plugins/column-virtualization/index.js.map +1 -1
  44. package/lib/plugins/context-menu/index.js +53 -2
  45. package/lib/plugins/context-menu/index.js.map +1 -1
  46. package/lib/plugins/editing/EditingPlugin.d.ts +117 -0
  47. package/lib/plugins/editing/EditingPlugin.d.ts.map +1 -0
  48. package/lib/{core/internal → plugins/editing}/editors.d.ts +1 -1
  49. package/lib/plugins/editing/editors.d.ts.map +1 -0
  50. package/lib/plugins/editing/index.d.ts +8 -0
  51. package/lib/plugins/editing/index.d.ts.map +1 -0
  52. package/lib/plugins/editing/index.js +721 -0
  53. package/lib/plugins/editing/index.js.map +1 -0
  54. package/lib/plugins/editing/types.d.ts +45 -0
  55. package/lib/plugins/editing/types.d.ts.map +1 -0
  56. package/lib/plugins/export/ExportPlugin.d.ts.map +1 -1
  57. package/lib/plugins/export/index.js +68 -17
  58. package/lib/plugins/export/index.js.map +1 -1
  59. package/lib/plugins/filtering/FilteringPlugin.d.ts.map +1 -1
  60. package/lib/plugins/filtering/index.js +103 -50
  61. package/lib/plugins/filtering/index.js.map +1 -1
  62. package/lib/plugins/grouping-columns/grouping-columns.d.ts +4 -4
  63. package/lib/plugins/grouping-columns/grouping-columns.d.ts.map +1 -1
  64. package/lib/plugins/grouping-columns/index.js +80 -29
  65. package/lib/plugins/grouping-columns/index.js.map +1 -1
  66. package/lib/plugins/grouping-rows/GroupingRowsPlugin.d.ts.map +1 -1
  67. package/lib/plugins/grouping-rows/grouping-rows.d.ts.map +1 -1
  68. package/lib/plugins/grouping-rows/index.js +62 -11
  69. package/lib/plugins/grouping-rows/index.js.map +1 -1
  70. package/lib/plugins/master-detail/MasterDetailPlugin.d.ts +2 -2
  71. package/lib/plugins/master-detail/MasterDetailPlugin.d.ts.map +1 -1
  72. package/lib/plugins/master-detail/index.js +156 -102
  73. package/lib/plugins/master-detail/index.js.map +1 -1
  74. package/lib/plugins/master-detail/types.d.ts +12 -2
  75. package/lib/plugins/master-detail/types.d.ts.map +1 -1
  76. package/lib/plugins/multi-sort/MultiSortPlugin.d.ts.map +1 -1
  77. package/lib/plugins/multi-sort/index.js +75 -22
  78. package/lib/plugins/multi-sort/index.js.map +1 -1
  79. package/lib/plugins/pinned-columns/index.js +57 -6
  80. package/lib/plugins/pinned-columns/index.js.map +1 -1
  81. package/lib/plugins/pinned-rows/PinnedRowsPlugin.d.ts.map +1 -1
  82. package/lib/plugins/pinned-rows/index.js +61 -9
  83. package/lib/plugins/pinned-rows/index.js.map +1 -1
  84. package/lib/plugins/pivot/index.js +58 -7
  85. package/lib/plugins/pivot/index.js.map +1 -1
  86. package/lib/plugins/reorder/ReorderPlugin.d.ts.map +1 -1
  87. package/lib/plugins/reorder/index.js +75 -19
  88. package/lib/plugins/reorder/index.js.map +1 -1
  89. package/lib/plugins/selection/index.js +57 -6
  90. package/lib/plugins/selection/index.js.map +1 -1
  91. package/lib/plugins/server-side/index.js +60 -9
  92. package/lib/plugins/server-side/index.js.map +1 -1
  93. package/lib/plugins/tree/TreePlugin.d.ts +3 -3
  94. package/lib/plugins/tree/TreePlugin.d.ts.map +1 -1
  95. package/lib/plugins/tree/index.js +181 -126
  96. package/lib/plugins/tree/index.js.map +1 -1
  97. package/lib/plugins/tree/tree-data.d.ts +6 -6
  98. package/lib/plugins/tree/tree-data.d.ts.map +1 -1
  99. package/lib/plugins/tree/tree-detect.d.ts +5 -9
  100. package/lib/plugins/tree/tree-detect.d.ts.map +1 -1
  101. package/lib/plugins/tree/types.d.ts +16 -4
  102. package/lib/plugins/tree/types.d.ts.map +1 -1
  103. package/lib/plugins/undo-redo/UndoRedoPlugin.d.ts +7 -1
  104. package/lib/plugins/undo-redo/UndoRedoPlugin.d.ts.map +1 -1
  105. package/lib/plugins/undo-redo/index.js +65 -6
  106. package/lib/plugins/undo-redo/index.js.map +1 -1
  107. package/lib/plugins/visibility/VisibilityPlugin.d.ts +7 -1
  108. package/lib/plugins/visibility/VisibilityPlugin.d.ts.map +1 -1
  109. package/lib/plugins/visibility/index.js +61 -2
  110. package/lib/plugins/visibility/index.js.map +1 -1
  111. package/package.json +1 -1
  112. package/public.d.ts +104 -13
  113. package/public.d.ts.map +1 -1
  114. package/umd/grid.all.umd.js +37 -19
  115. package/umd/grid.all.umd.js.map +1 -1
  116. package/umd/grid.umd.js +25 -7
  117. package/umd/grid.umd.js.map +1 -1
  118. package/umd/plugins/clipboard.umd.js +2 -2
  119. package/umd/plugins/clipboard.umd.js.map +1 -1
  120. package/umd/plugins/editing.umd.js +2 -0
  121. package/umd/plugins/editing.umd.js.map +1 -0
  122. package/umd/plugins/export.umd.js +2 -2
  123. package/umd/plugins/export.umd.js.map +1 -1
  124. package/umd/plugins/filtering.umd.js +1 -1
  125. package/umd/plugins/filtering.umd.js.map +1 -1
  126. package/umd/plugins/grouping-columns.umd.js +1 -1
  127. package/umd/plugins/grouping-columns.umd.js.map +1 -1
  128. package/umd/plugins/grouping-rows.umd.js +1 -1
  129. package/umd/plugins/grouping-rows.umd.js.map +1 -1
  130. package/umd/plugins/master-detail.umd.js +1 -1
  131. package/umd/plugins/master-detail.umd.js.map +1 -1
  132. package/umd/plugins/multi-sort.umd.js +1 -1
  133. package/umd/plugins/multi-sort.umd.js.map +1 -1
  134. package/umd/plugins/pinned-rows.umd.js +1 -1
  135. package/umd/plugins/pinned-rows.umd.js.map +1 -1
  136. package/umd/plugins/reorder.umd.js +1 -1
  137. package/umd/plugins/reorder.umd.js.map +1 -1
  138. package/umd/plugins/tree.umd.js +1 -1
  139. package/umd/plugins/tree.umd.js.map +1 -1
  140. package/umd/plugins/undo-redo.umd.js +1 -1
  141. package/umd/plugins/undo-redo.umd.js.map +1 -1
  142. package/umd/plugins/visibility.umd.js +1 -1
  143. package/umd/plugins/visibility.umd.js.map +1 -1
  144. package/lib/core/internal/column-state.d.ts +0 -124
  145. package/lib/core/internal/column-state.d.ts.map +0 -1
  146. package/lib/core/internal/editors.d.ts.map +0 -1
  147. package/lib/core/internal/grid-internals.d.ts +0 -83
  148. package/lib/core/internal/grid-internals.d.ts.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"ReorderPlugin.d.ts","sourceRoot":"","sources":["../../../../../../libs/grid/src/lib/plugins/reorder/ReorderPlugin.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,EAAE,cAAc,EAAkB,MAAM,+BAA+B,CAAC;AAI/E,OAAO,KAAK,EAAoB,aAAa,EAAE,MAAM,SAAS,CAAC;AAa/D;;;;;;;GAOG;AACH,qBAAa,aAAc,SAAQ,cAAc,CAAC,aAAa,CAAC;IAC9D,QAAQ,CAAC,IAAI,aAAa;IAC1B,SAAkB,OAAO,WAAW;IAEpC,cAAuB,aAAa,IAAI,OAAO,CAAC,aAAa,CAAC,CAI7D;IAED;;;OAGG;IACH,OAAO,KAAK,aAAa,GAYxB;IAED;;;OAGG;IACH,OAAO,KAAK,kBAAkB,GAkB7B;IAED;;OAEG;IACH,OAAO,KAAK,iBAAiB,GAe5B;IAGD,OAAO,CAAC,UAAU,CAAS;IAC3B,OAAO,CAAC,YAAY,CAAuB;IAC3C,OAAO,CAAC,YAAY,CAAuB;IAC3C,OAAO,CAAC,SAAS,CAAuB;IAK/B,MAAM,CAAC,IAAI,EAAE,OAAO,+BAA+B,EAAE,WAAW,GAAG,IAAI;IAiBvE,MAAM,IAAI,IAAI;IAUd,WAAW,IAAI,IAAI;IAyG5B;;OAEG;IACM,SAAS,CAAC,KAAK,EAAE,aAAa,GAAG,OAAO,GAAG,IAAI;IAuDxD;;;OAGG;IACH,cAAc,IAAI,MAAM,EAAE;IAI1B;;;;OAIG;IACH,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI;IAkBhD;;;OAGG;IACH,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,IAAI;IAIrC;;OAEG;IACH,gBAAgB,IAAI,IAAI;IAQxB;;OAEG;IACH,OAAO,CAAC,sBAAsB;IAS9B;;;;OAIG;IACH,OAAO,CAAC,WAAW;IAmDnB;;;OAGG;IACH,OAAO,CAAC,WAAW;IAgDnB;;OAEG;IACH,OAAO,CAAC,iBAAiB;IAqBzB,SAAkB,MAAM,SAAU;CAEnC"}
1
+ {"version":3,"file":"ReorderPlugin.d.ts","sourceRoot":"","sources":["../../../../../../libs/grid/src/lib/plugins/reorder/ReorderPlugin.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,EAAE,cAAc,EAAkB,MAAM,+BAA+B,CAAC;AAI/E,OAAO,KAAK,EAAoB,aAAa,EAAE,MAAM,SAAS,CAAC;AAa/D;;;;;;;GAOG;AACH,qBAAa,aAAc,SAAQ,cAAc,CAAC,aAAa,CAAC;IAC9D,QAAQ,CAAC,IAAI,aAAa;IAC1B,SAAkB,OAAO,WAAW;IAEpC,cAAuB,aAAa,IAAI,OAAO,CAAC,aAAa,CAAC,CAI7D;IAED;;;OAGG;IACH,OAAO,KAAK,aAAa,GAYxB;IAED;;;OAGG;IACH,OAAO,KAAK,kBAAkB,GAkB7B;IAED;;OAEG;IACH,OAAO,KAAK,iBAAiB,GAe5B;IAGD,OAAO,CAAC,UAAU,CAAS;IAC3B,OAAO,CAAC,YAAY,CAAuB;IAC3C,OAAO,CAAC,YAAY,CAAuB;IAC3C,OAAO,CAAC,SAAS,CAAuB;IAK/B,MAAM,CAAC,IAAI,EAAE,OAAO,+BAA+B,EAAE,WAAW,GAAG,IAAI;IAiBvE,MAAM,IAAI,IAAI;IAUd,WAAW,IAAI,IAAI;IAyG5B;;OAEG;IACM,SAAS,CAAC,KAAK,EAAE,aAAa,GAAG,OAAO,GAAG,IAAI;IAuDxD;;;OAGG;IACH,cAAc,IAAI,MAAM,EAAE;IAI1B;;;;OAIG;IACH,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI;IAkBhD;;;OAGG;IACH,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,IAAI;IAIrC;;OAEG;IACH,gBAAgB,IAAI,IAAI;IAQxB;;OAEG;IACH,OAAO,CAAC,sBAAsB;IAS9B;;;;OAIG;IACH,OAAO,CAAC,WAAW;IAmDnB;;;OAGG;IACH,OAAO,CAAC,WAAW;IAgDnB;;OAEG;IACH,OAAO,CAAC,iBAAiB;IAyBzB,SAAkB,MAAM,SAAU;CAEnC"}
@@ -1,8 +1,11 @@
1
1
  function E(n) {
2
2
  n && n.querySelectorAll(".cell-focus").forEach((t) => t.classList.remove("cell-focus"));
3
3
  }
4
- const R = 'input,select,textarea,[contenteditable="true"],[contenteditable=""],[tabindex]:not([tabindex="-1"])';
5
- function y(n, t) {
4
+ const R = 'input,select,textarea,[contenteditable="true"],[contenteditable=""],[tabindex]:not([tabindex="-1"])', y = document.createElement("template");
5
+ y.innerHTML = '<div class="cell" role="gridcell" part="cell"></div>';
6
+ const L = document.createElement("template");
7
+ L.innerHTML = '<div class="data-grid-row" role="row" part="row"></div>';
8
+ function A(n, t) {
6
9
  if (n._virtualization?.enabled) {
7
10
  const { rowHeight: a, container: o, viewportEl: l } = n._virtualization, s = o, d = l?.clientHeight ?? s?.clientHeight ?? 0;
8
11
  if (s && d > 0) {
@@ -44,7 +47,7 @@ function y(n, t) {
44
47
  }
45
48
  }
46
49
  }
47
- const L = {
50
+ const O = {
48
51
  expand: "▶",
49
52
  collapse: "▼",
50
53
  sortAsc: "▲",
@@ -57,7 +60,23 @@ const L = {
57
60
  /** Ask if a column can be moved. Context: ColumnConfig. Response: boolean | undefined */
58
61
  CAN_MOVE_COLUMN: "canMoveColumn"
59
62
  };
60
- class A {
63
+ class x {
64
+ /**
65
+ * Plugin dependencies - declare other plugins this one requires.
66
+ *
67
+ * Dependencies are validated when the plugin is attached.
68
+ * Required dependencies throw an error if missing.
69
+ * Optional dependencies log an info message if missing.
70
+ *
71
+ * @example
72
+ * ```typescript
73
+ * static readonly dependencies: PluginDependency[] = [
74
+ * { name: 'editing', required: true, reason: 'Tracks cell edits for undo/redo' },
75
+ * { name: 'selection', required: false, reason: 'Enables selection-based undo' },
76
+ * ];
77
+ * ```
78
+ */
79
+ static dependencies;
61
80
  /** Plugin version - override in subclass if needed */
62
81
  version = "1.0.0";
63
82
  /** CSS styles to inject into the grid's shadow DOM */
@@ -74,6 +93,12 @@ class A {
74
93
  config;
75
94
  /** User-provided configuration from constructor */
76
95
  userConfig;
96
+ /**
97
+ * Plugin-level AbortController for event listener cleanup.
98
+ * Created fresh in attach(), aborted in detach().
99
+ * This ensures event listeners are properly cleaned up when plugins are re-attached.
100
+ */
101
+ #t;
77
102
  /**
78
103
  * Default configuration - subclasses should override this getter.
79
104
  * Note: This must be a getter (not property initializer) for proper inheritance
@@ -88,19 +113,48 @@ class A {
88
113
  /**
89
114
  * Called when the plugin is attached to a grid.
90
115
  * Override to set up event listeners, initialize state, etc.
116
+ *
117
+ * @example
118
+ * ```ts
119
+ * attach(grid: GridElement): void {
120
+ * super.attach(grid);
121
+ * // Set up document-level listeners with auto-cleanup
122
+ * document.addEventListener('keydown', this.handleEscape, {
123
+ * signal: this.disconnectSignal
124
+ * });
125
+ * }
126
+ * ```
91
127
  */
92
128
  attach(t) {
93
- this.grid = t, this.config = { ...this.defaultConfig, ...this.userConfig };
129
+ this.#t?.abort(), this.#t = new AbortController(), this.grid = t, this.config = { ...this.defaultConfig, ...this.userConfig };
94
130
  }
95
131
  /**
96
132
  * Called when the plugin is detached from a grid.
97
133
  * Override to clean up event listeners, timers, etc.
134
+ *
135
+ * @example
136
+ * ```ts
137
+ * detach(): void {
138
+ * // Clean up any state not handled by disconnectSignal
139
+ * this.selectedRows.clear();
140
+ * this.cache = null;
141
+ * }
142
+ * ```
98
143
  */
99
144
  detach() {
145
+ this.#t?.abort(), this.#t = void 0;
100
146
  }
101
147
  /**
102
148
  * Get another plugin instance from the same grid.
103
149
  * Use for inter-plugin communication.
150
+ *
151
+ * @example
152
+ * ```ts
153
+ * const selection = this.getPlugin(SelectionPlugin);
154
+ * if (selection) {
155
+ * const selectedRows = selection.getSelectedRows();
156
+ * }
157
+ * ```
104
158
  */
105
159
  getPlugin(t) {
106
160
  return this.grid?.getPlugin(t);
@@ -174,7 +228,7 @@ class A {
174
228
  * document.addEventListener('keydown', handler, { signal: this.disconnectSignal });
175
229
  */
176
230
  get disconnectSignal() {
177
- return this.grid?.disconnectSignal;
231
+ return this.#t?.signal ?? this.grid?.disconnectSignal;
178
232
  }
179
233
  /**
180
234
  * Get the grid-level icons configuration.
@@ -182,7 +236,7 @@ class A {
182
236
  */
183
237
  get gridIcons() {
184
238
  const t = this.grid?.gridConfig?.icons ?? {};
185
- return { ...L, ...t };
239
+ return { ...O, ...t };
186
240
  }
187
241
  /**
188
242
  * Resolve an icon value to string or HTMLElement.
@@ -213,7 +267,7 @@ class A {
213
267
  }
214
268
  // #endregion
215
269
  }
216
- function w(n) {
270
+ function b(n) {
217
271
  const t = n.meta ?? {};
218
272
  return t.lockPosition !== !0 && t.suppressMovable !== !0;
219
273
  }
@@ -222,8 +276,8 @@ function v(n, t, e) {
222
276
  const i = [...n], [r] = i.splice(t, 1);
223
277
  return i.splice(e, 0, r), i;
224
278
  }
225
- const O = '.header-row>.cell[draggable=true]{cursor:grab;position:relative}.header-row>.cell.dragging{opacity:.5;cursor:grabbing}.header-row>.cell.drop-before:before{content:"";position:absolute;left:0;top:0;bottom:0;width:2px;background:var(--tbw-reorder-indicator, var(--tbw-color-accent));z-index:1}.header-row>.cell.drop-after:after{content:"";position:absolute;right:0;top:0;bottom:0;width:2px;background:var(--tbw-reorder-indicator, var(--tbw-color-accent));z-index:1}.cell.flip-animating{transition:transform var(--tbw-animation-duration, .2s) ease-out;will-change:transform;z-index:1}@keyframes reorder-fade-in{0%{opacity:0}to{opacity:1}}.cell.fade-animating{animation:reorder-fade-in var(--tbw-animation-duration, .2s) ease-out backwards}';
226
- class x extends A {
279
+ const _ = '.header-row>.cell[draggable=true]{cursor:grab;position:relative}.header-row>.cell.dragging{opacity:.5;cursor:grabbing}.header-row>.cell.drop-before:before{content:"";position:absolute;left:0;top:0;bottom:0;width:2px;background:var(--tbw-reorder-indicator, var(--tbw-color-accent));z-index:1}.header-row>.cell.drop-after:after{content:"";position:absolute;right:0;top:0;bottom:0;width:2px;background:var(--tbw-reorder-indicator, var(--tbw-color-accent));z-index:1}.cell.flip-animating{transition:transform var(--tbw-animation-duration, .2s) ease-out;will-change:transform;z-index:1}@keyframes reorder-fade-in{0%{opacity:0}to{opacity:1}}.cell.fade-animating{animation:reorder-fade-in var(--tbw-animation-duration, .2s) ease-out backwards}';
280
+ class I extends x {
227
281
  name = "reorder";
228
282
  version = "1.0.0";
229
283
  get defaultConfig() {
@@ -295,7 +349,7 @@ class x extends A {
295
349
  type: p.CAN_MOVE_COLUMN,
296
350
  context: a
297
351
  }).includes(!1);
298
- if (!a || !w(a) || !s) {
352
+ if (!a || !b(a) || !s) {
299
353
  r.draggable = !1;
300
354
  return;
301
355
  }
@@ -317,13 +371,13 @@ class x extends A {
317
371
  const f = this.draggedField, u = this.draggedIndex, g = this.dropIndex;
318
372
  if (!this.isDragging || f === null || u === null || g === null)
319
373
  return;
320
- const h = g > u ? g - 1 : g, m = this.getColumnOrder(), b = v(m, u, h), C = {
374
+ const h = g > u ? g - 1 : g, m = this.getColumnOrder(), w = v(m, u, h), C = {
321
375
  field: f,
322
376
  fromIndex: u,
323
377
  toIndex: h,
324
- columnOrder: b
378
+ columnOrder: w
325
379
  };
326
- this.updateColumnOrder(b), this.emit("column-move", C);
380
+ this.updateColumnOrder(w), this.emit("column-move", C);
327
381
  }));
328
382
  });
329
383
  }
@@ -336,7 +390,7 @@ class x extends A {
336
390
  const e = this.grid, i = e._focusCol, r = e._visibleColumns;
337
391
  if (i < 0 || i >= r.length) return;
338
392
  const c = r[i];
339
- if (!c || !w(c)) return;
393
+ if (!c || !b(c)) return;
340
394
  const a = this.grid;
341
395
  if (a.queryPlugins({
342
396
  type: p.CAN_MOVE_COLUMN,
@@ -351,7 +405,7 @@ class x extends A {
351
405
  type: p.CAN_MOVE_COLUMN,
352
406
  context: f
353
407
  }).includes(!1)))
354
- return this.moveColumn(c.field, d), e._focusCol = d, y(this.grid), t.preventDefault(), t.stopPropagation(), !0;
408
+ return this.moveColumn(c.field, d), e._focusCol = d, A(this.grid), t.preventDefault(), t.stopPropagation(), !0;
355
409
  }
356
410
  // #endregion
357
411
  // #region Public API
@@ -482,16 +536,18 @@ class x extends A {
482
536
  const e = this.grid, i = this.animationType;
483
537
  if (i === "flip" && this.shadowRoot) {
484
538
  const r = this.captureHeaderPositions();
485
- e.setColumnOrder(t), this.shadowRoot.host.offsetHeight, this.animateFLIP(r);
539
+ e.setColumnOrder(t), requestAnimationFrame(() => {
540
+ this.shadowRoot?.host?.offsetHeight, this.animateFLIP(r);
541
+ });
486
542
  } else i === "fade" ? this.animateFade(() => e.setColumnOrder(t)) : e.setColumnOrder(t);
487
543
  e.requestStateChange?.();
488
544
  }
489
545
  // #endregion
490
546
  // #region Styles
491
- styles = O;
547
+ styles = _;
492
548
  // #endregion
493
549
  }
494
550
  export {
495
- x as ReorderPlugin
551
+ I as ReorderPlugin
496
552
  };
497
553
  //# sourceMappingURL=index.js.map