@itrocks/table 0.7.3 → 0.8.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/README.md CHANGED
@@ -269,21 +269,22 @@ match the current view.
269
269
  - `reveal(id): void` scrolls the horizontal container only as needed, accounting for frozen bounds.
270
270
  - `highlight(id): void` applies the same green/light/theme flash for new and existing columns, cleans up after 350 ms,
271
271
  honours reduced motion and preserves keyboard focus and row selection. Existing columns keep their content and width.
272
- - Columns appended at the right edge (before any right-frozen columns) appear at full width immediately, with their
273
- heading, filter and placeholder cells visible in green. Loaded values appear immediately and scroll the table to its
274
- right edge over 100 ms if needed. Reduced motion makes this scroll immediate.
275
- - Columns inserted between existing columns open from zero to their measured width over 100 ms.
276
- The flash stays green until values arrive, then
277
- fades over the remainder of 350 ms from opening, with a minimum fade of 100 ms. Content remains hidden until the
278
- fade ends for value cells; the heading and filter become visible after the 100 ms opening. A non-breaking space
279
- keeps masked cells painted and holds their measured width. Asynchronous values continue
280
- opening from the current width towards the greater of the heading width and the loaded content width.
272
+ - New columns show their heading, filter and placeholder cells immediately, and start one 350 ms addition flash.
273
+ Values arriving during the flash update the measured target width and remain masked until the flash finishes.
274
+ Values arriving afterwards are displayed immediately without another flash. Data loading never extends the flash.
275
+ Columns inserted between existing columns open over 100 ms; incoming values retarget their width.
276
+ Appended columns appear at full heading width and scroll to the new right edge over 100 ms when values require it.
277
+ Reduced motion disables width animation and makes scrolling immediate.
281
278
  - `remove(id, signal?): Promise<boolean>` reveals a column, shrinks it over 100 ms during a 300 ms red flash,
282
279
  hiding cell content immediately, then removes the header, body/footer cells and matching `col`. It returns false for
283
280
  a missing column or cancellation. Repeated calls share the pending removal; abort, disposal and reset clear the flash
284
281
  without deletion. Late values cannot restore a removed column. Cancellation restores the natural width.
285
282
  Reduced motion skips width animation and uses a static red outline.
286
283
  The host persists the resulting configuration.
284
+ - `highlightMany(ids, opening?): void` starts addition highlights for all supplied columns in the same frame.
285
+ - `removeMany(ids, signal?): Promise<boolean>` prepares every column before starting their red flashes in the same
286
+ frame and removes them after one shared delay. Cancellation clears the whole group's flash without deletion.
287
+ Missing columns return false; overlapping group removals reject. Single-column calls share pending removal.
287
288
  - `retry(id): Promise<void>` retries a failed value callback. Failure retains the committed column and marks it with
288
289
  `.column-add-error`; data cells receive a discreet red background and the addition flash stops.
289
290
  It never confirms another addition. The plugin adds no error text, retry control or automatic retry.
@@ -297,7 +298,9 @@ match the current view.
297
298
 
298
299
  `ColumnCreationOptions` is shared by `add` and `begin`. `hidden: true` inserts hidden cells and a hidden `col`;
299
300
  loaded replacements retain that visibility. `effects: false` skips width animation, flash and automatic scroll for both
300
- creation and loaded values. Loading still starts immediately. Pass both options to prepare a column for pointer entry.
301
+ creation and loaded values. `effects: 'deferred'` lets a host create several columns, publish their selection state,
302
+ then call `highlightMany(ids, true)` to start one shared flash before starting their shared request. Loading still starts
303
+ immediately when a source provides it. Pass both options to prepare a column for pointer entry.
301
304
 
302
305
  `TableColumnAddOptions.identify(header)` defaults to `header.dataset.columnId`. Added and loaded headers carry this
303
306
  opaque attribute so identity survives plugin resets. A custom callback can identify pre-existing columns differently.
package/column-add.css CHANGED
@@ -5,11 +5,7 @@ table.itrocks > :is(thead, tbody, tfoot) > tr > :is(th, td)[hidden] {
5
5
  }
6
6
 
7
7
  table.itrocks > :is(thead, tbody, tfoot) > tr > :is(th, td).column-add-highlight {
8
- animation: itrocks-column-add-flash var(--column-fade, 350ms) ease-out;
9
- }
10
- table.itrocks > :is(thead, tbody, tfoot) > tr > :is(th, td).column-add-highlight.column-add-loading {
11
- animation: none;
12
- background-color: color-mix(in srgb, #58b46b 35%, Canvas);
8
+ animation: itrocks-column-add-flash var(--column-fade, 350ms) ease-out var(--column-delay, 0ms);
13
9
  }
14
10
  table.itrocks > :is(thead, tbody, tfoot) > tr > :is(th, td).column-add-opening::after {
15
11
  animation: itrocks-column-open 100ms ease-out both;
@@ -40,6 +36,12 @@ table.itrocks > :is(thead, tbody, tfoot) > tr > :is(th, td).column-remove-highli
40
36
  line-height: 1px;
41
37
  width: var(--column-width);
42
38
  }
39
+ table.itrocks > :is(thead, tbody, tfoot) > tr > :is(th, td).column-add-values-hidden {
40
+ color: transparent !important;
41
+ }
42
+ table.itrocks > :is(thead, tbody, tfoot) > tr > :is(th, td).column-add-values-hidden > * {
43
+ visibility: hidden !important;
44
+ }
43
45
  table.itrocks > :is(thead, tbody, tfoot) > tr > :is(th, td).column-add-loading {
44
46
  cursor: progress;
45
47
  }
package/column-add.d.ts CHANGED
@@ -15,7 +15,7 @@ export type ColumnContent = {
15
15
  header: HTMLTableCellElement;
16
16
  };
17
17
  export type ColumnCreationOptions = {
18
- effects?: boolean;
18
+ effects?: boolean | 'deferred';
19
19
  hidden?: boolean;
20
20
  };
21
21
  export interface ColumnOperation {
@@ -40,6 +40,11 @@ export interface ColumnTransaction {
40
40
  commit(): ColumnResult;
41
41
  moveTo(index: number): void;
42
42
  }
43
+ interface Highlight {
44
+ cells: Set<HTMLTableCellElement>;
45
+ started: number;
46
+ timer?: ReturnType<typeof setTimeout>;
47
+ }
43
48
  interface Pending {
44
49
  abort: AbortController;
45
50
  col?: HTMLTableColElement;
@@ -55,7 +60,7 @@ interface Pending {
55
60
  export declare class TableColumnAdd extends Plugin<Table, TableColumnAddOptions> {
56
61
  protected disposed: boolean;
57
62
  protected external?: ColumnOperation;
58
- protected highlights: Map<HTMLTableCellElement, number | undefined>;
63
+ protected highlights: Map<HTMLTableCellElement, Highlight>;
59
64
  protected identities: WeakMap<HTMLTableCellElement, string>;
60
65
  protected pending: Map<string, Pending>;
61
66
  protected removals: Map<string, {
@@ -72,9 +77,11 @@ export declare class TableColumnAdd extends Plugin<Table, TableColumnAddOptions>
72
77
  protected create(source: ColumnSource, options?: ColumnCreationOptions): ColumnTransaction;
73
78
  defaultOptions(): TableColumnAddOptions;
74
79
  dispose(): void;
80
+ protected clearHighlight(cell: HTMLTableCellElement): void;
75
81
  protected find(id: string): HTMLTableCellElement | undefined;
76
82
  protected headers(): HTMLTableRowElement;
77
83
  highlight(id: string, opening?: boolean): void;
84
+ highlightMany(ids: readonly string[], opening?: boolean): void;
78
85
  init(): void;
79
86
  protected isLastColumn(header: HTMLTableCellElement): boolean;
80
87
  protected live(entry: Pending): boolean;
@@ -85,7 +92,10 @@ export declare class TableColumnAdd extends Plugin<Table, TableColumnAddOptions>
85
92
  protected refresh(): void;
86
93
  /** Reveal and briefly mark a column in red before removing it. */
87
94
  remove(id: string, signal?: AbortSignal): Promise<boolean>;
95
+ /** Flash all requested columns together, then remove them after one shared delay. */
96
+ removeMany(ids: readonly string[], signal?: AbortSignal): Promise<boolean>;
88
97
  protected removeColumn(id: string, signal: AbortSignal): Promise<boolean>;
98
+ protected removeColumns(ids: readonly string[], signal: AbortSignal): Promise<boolean>;
89
99
  reveal(id: string): void;
90
100
  protected scrollToEnd(): void;
91
101
  retry(id: string): Promise<void>;
package/column-add.js CHANGED
@@ -194,7 +194,7 @@ export class TableColumnAdd extends Plugin {
194
194
  this.mark(entry, 'provisional', false);
195
195
  if (!existing || (entry.content.header.cellIndex !== entry.initial))
196
196
  this.notify(entry, 'committed');
197
- if (!existing && entry.effects) {
197
+ if (!existing && entry.effects && options.effects !== 'deferred') {
198
198
  entry.started = performance.now();
199
199
  this.highlight(source.id, true);
200
200
  if (entry.settled && this.isLastColumn(entry.content.header))
@@ -213,7 +213,7 @@ export class TableColumnAdd extends Plugin {
213
213
  this.refresh();
214
214
  }
215
215
  };
216
- const entry = { abort, content, effects: options.effects ?? true, initial: existing?.cellIndex ?? -1,
216
+ const entry = { abort, content, effects: options.effects !== false, initial: existing?.cellIndex ?? -1,
217
217
  rows, settled: false, source, transaction };
218
218
  this.pending.set(source.id, entry);
219
219
  if (existing)
@@ -258,14 +258,21 @@ export class TableColumnAdd extends Plugin {
258
258
  this.mark(entry, 'loading', false);
259
259
  }
260
260
  this.pending.clear();
261
- for (const [cell, timer] of this.highlights) {
262
- clearTimeout(timer);
263
- cell.classList.remove('column-add-highlight', 'column-add-new', 'column-add-opening');
264
- for (const name of ['fade', 'from', 'height', 'width'])
261
+ for (const [cell, highlight] of this.highlights) {
262
+ clearTimeout(highlight.timer);
263
+ cell.classList.remove('column-add-highlight', 'column-add-new', 'column-add-opening', 'column-add-values-hidden');
264
+ for (const name of ['delay', 'fade', 'from', 'height', 'width'])
265
265
  cell.style?.removeProperty(`--column-${name}`);
266
266
  }
267
267
  this.highlights.clear();
268
268
  }
269
+ clearHighlight(cell) {
270
+ const highlight = this.highlights.get(cell);
271
+ this.highlights.delete(cell);
272
+ highlight?.cells.delete(cell);
273
+ if (highlight && !highlight.cells.size)
274
+ clearTimeout(highlight.timer);
275
+ }
269
276
  find(id) {
270
277
  return Array.from(this.headers().cells).find(header => (this.identities.get(header) ?? this.options.identify(header)) === id);
271
278
  }
@@ -276,46 +283,63 @@ export class TableColumnAdd extends Plugin {
276
283
  return row;
277
284
  }
278
285
  highlight(id, opening = false) {
279
- const header = this.find(id);
280
- if (!header || this.disposed)
286
+ this.highlightMany([id], opening);
287
+ }
288
+ highlightMany(ids, opening = false) {
289
+ if (this.disposed)
281
290
  return;
282
- const started = opening ? this.pending.get(id)?.started : undefined;
283
- const duration = started === undefined ? 350 : Math.max(100, 350 - (performance.now() - started));
284
- const waiting = opening && header.classList.contains('column-add-loading');
285
- const expanding = opening && !this.isLastColumn(header);
286
- for (const row of Array.from(this.of.element.rows)) {
287
- const cell = row.cells[header.cellIndex];
288
- if (!cell)
289
- continue;
290
- clearTimeout(this.highlights.get(cell));
291
- cell.classList.remove('column-add-highlight', 'column-add-new', 'column-add-opening');
292
- }
293
- this.measureColumn(header);
294
- void header.offsetWidth;
295
- for (const row of Array.from(this.of.element.rows)) {
296
- const cell = row.cells[header.cellIndex];
297
- if (!cell)
298
- continue;
299
- cell.classList.toggle('column-add-new', expanding);
300
- cell.classList.toggle('column-add-opening', expanding);
301
- cell.classList.add('column-add-highlight');
302
- cell.style?.setProperty('--column-fade', `${duration}ms`);
303
- this.highlights.set(cell, waiting ? undefined : setTimeout(() => {
304
- cell.classList.remove('column-add-highlight', 'column-add-new', 'column-add-opening');
305
- this.highlights.delete(cell);
306
- for (const name of ['fade', 'from', 'height', 'width'])
307
- cell.style?.removeProperty(`--column-${name}`);
308
- if (!this.highlights.size)
291
+ const started = performance.now();
292
+ const columns = [...new Set(ids)].flatMap(id => {
293
+ const header = this.find(id);
294
+ if (!header)
295
+ return [];
296
+ const entry = this.pending.get(id);
297
+ if (opening && entry)
298
+ entry.started = started;
299
+ return [{ header,
300
+ cells: Array.from(this.of.element.rows).map(row => row.cells[header.cellIndex]).filter(Boolean),
301
+ expanding: opening && !this.isLastColumn(header)
302
+ }];
303
+ });
304
+ for (const column of columns)
305
+ for (const cell of column.cells) {
306
+ this.clearHighlight(cell);
307
+ cell.classList.remove('column-add-highlight', 'column-add-new', 'column-add-opening', 'column-add-values-hidden');
308
+ }
309
+ for (const column of columns)
310
+ this.measureColumn(column.header);
311
+ if (columns.length)
312
+ void columns[0].header.offsetWidth;
313
+ const highlight = { cells: new Set(columns.flatMap(column => column.cells)), started: performance.now() };
314
+ if (highlight.cells.size)
315
+ highlight.timer = setTimeout(() => {
316
+ for (const cell of highlight.cells) {
317
+ cell.classList.remove('column-add-highlight', 'column-add-new', 'column-add-opening', 'column-add-values-hidden');
318
+ this.highlights.delete(cell);
319
+ for (const name of ['delay', 'fade', 'from', 'height', 'width'])
320
+ cell.style?.removeProperty(`--column-${name}`);
321
+ }
322
+ highlight.cells.clear();
323
+ this.refresh();
324
+ }, 350);
325
+ for (const { cells, expanding, header } of columns) {
326
+ for (const cell of cells) {
327
+ cell.classList.toggle('column-add-new', expanding);
328
+ cell.classList.toggle('column-add-opening', expanding);
329
+ cell.classList.toggle('column-add-values-hidden', opening && cell !== header);
330
+ cell.classList.add('column-add-highlight');
331
+ cell.style?.setProperty('--column-delay', '0ms');
332
+ cell.style?.setProperty('--column-fade', '350ms');
333
+ this.highlights.set(cell, highlight);
334
+ }
335
+ if (expanding && header.ownerDocument)
336
+ setTimeout(() => {
337
+ if (this.disposed || !header.isConnected)
338
+ return;
339
+ header.classList.remove('column-add-opening');
309
340
  this.refresh();
310
- }, duration));
341
+ }, 100);
311
342
  }
312
- if (expanding && header.ownerDocument)
313
- setTimeout(() => {
314
- if (this.disposed || !header.isConnected)
315
- return;
316
- header.classList.remove('column-add-opening');
317
- this.refresh();
318
- }, 100);
319
343
  }
320
344
  init() {
321
345
  this.disposed = false;
@@ -349,41 +373,57 @@ export class TableColumnAdd extends Plugin {
349
373
  throw new Error('Column row view changed during loading');
350
374
  }
351
375
  const old = entry.content;
352
- const opening = old.header.classList.contains('column-add-opening');
353
376
  const width = old.header.getBoundingClientRect?.().width ?? 0;
354
- const target = parseFloat(old.header.style?.getPropertyValue('--column-width') ?? '') || width;
355
- for (const cell of [old.header, ...old.cells]) {
356
- clearTimeout(this.highlights.get(cell));
357
- this.highlights.delete(cell);
377
+ const removing = old.header.classList.contains('column-remove-highlight');
378
+ const animation = old.header.getAnimations?.().find(animation => animation.animationName === 'itrocks-column-add-flash');
379
+ const elapsed = typeof animation?.currentTime === 'number' ? animation.currentTime : 0;
380
+ const pairs = [[old.header, content.header], ...old.cells.map((cell, index) => [cell, content.cells[index]])];
381
+ for (const [previous, replacement] of pairs) {
382
+ replacement.hidden = previous.hidden;
383
+ const highlight = this.highlights.get(previous);
384
+ if (highlight && performance.now() < highlight.started + 350) {
385
+ highlight.cells.delete(previous);
386
+ highlight.cells.add(replacement);
387
+ this.highlights.delete(previous);
388
+ this.highlights.set(replacement, highlight);
389
+ replacement.classList.add('column-add-highlight');
390
+ replacement.classList.toggle('column-add-values-hidden', previous.classList.contains('column-add-values-hidden'));
391
+ replacement.style?.setProperty('--column-fade', '350ms');
392
+ replacement.style?.setProperty('--column-delay', `${-elapsed}ms`);
393
+ }
394
+ else
395
+ this.clearHighlight(previous);
358
396
  }
359
- for (const cell of [content.header, ...content.cells])
360
- cell.hidden = old.header.hidden;
361
397
  this.reorder.replaceCell(old.header, content.header);
362
398
  old.cells.forEach((cell, index) => this.reorder.replaceCell(cell, content.cells[index]));
363
399
  entry.content = content;
364
400
  this.identities.set(content.header, entry.source.id);
365
401
  content.header.dataset.columnId = entry.source.id;
366
- const removing = old.header.classList.contains('column-remove-highlight');
402
+ this.mark(entry, 'provisional', entry.transaction.state === 'provisional');
403
+ this.mark(entry, 'loading', false);
404
+ this.refresh();
367
405
  if (removing) {
368
406
  this.measureColumn(content.header, width);
369
407
  for (const cell of [content.header, ...content.cells])
370
408
  cell.classList.add('column-remove-highlight');
371
409
  }
372
- this.mark(entry, 'provisional', entry.transaction.state === 'provisional');
373
- this.mark(entry, 'loading', false);
374
- this.refresh();
375
- this.notify(entry, 'loaded');
376
- if (!removing && entry.effects && entry.transaction.state === 'committed') {
410
+ else if (entry.effects && this.highlights.has(content.header) && !this.isLastColumn(content.header)) {
411
+ this.measureColumn(content.header);
377
412
  for (const cell of [content.header, ...content.cells]) {
378
413
  cell.style?.setProperty('--column-from', `${width}px`);
379
- cell.style?.setProperty('--column-width', `${target}px`);
414
+ cell.classList.add('column-add-new', 'column-add-opening');
380
415
  }
381
- this.highlight(entry.source.id, true);
382
- if (!opening)
383
- content.header.classList.remove('column-add-opening');
384
- if (this.isLastColumn(content.header))
385
- this.scrollToEnd();
416
+ setTimeout(() => {
417
+ if (!this.disposed && content.header.isConnected) {
418
+ content.header.classList.remove('column-add-opening');
419
+ this.refresh();
420
+ }
421
+ }, 100);
386
422
  }
423
+ if (!removing && entry.effects && entry.transaction.state === 'committed'
424
+ && this.isLastColumn(content.header))
425
+ this.scrollToEnd();
426
+ this.notify(entry, 'loaded');
387
427
  }
388
428
  catch (error) {
389
429
  if (!this.live(entry))
@@ -392,10 +432,9 @@ export class TableColumnAdd extends Plugin {
392
432
  this.mark(entry, 'error', true);
393
433
  this.notify(entry, 'error', error);
394
434
  for (const cell of [entry.content.header, ...entry.content.cells]) {
395
- clearTimeout(this.highlights.get(cell));
396
- this.highlights.delete(cell);
397
- cell.classList.remove('column-add-highlight', 'column-add-new', 'column-add-opening');
398
- for (const name of ['fade', 'from', 'height', 'width'])
435
+ this.clearHighlight(cell);
436
+ cell.classList.remove('column-add-highlight', 'column-add-new', 'column-add-opening', 'column-add-values-hidden');
437
+ for (const name of ['delay', 'fade', 'from', 'height', 'width'])
399
438
  cell.style?.removeProperty(`--column-${name}`);
400
439
  }
401
440
  this.refresh();
@@ -436,33 +475,52 @@ export class TableColumnAdd extends Plugin {
436
475
  }
437
476
  /** Reveal and briefly mark a column in red before removing it. */
438
477
  remove(id, signal) {
439
- const pending = this.removals.get(id);
440
- if (pending)
441
- return pending.promise;
442
- if (this.disposed || signal?.aborted || !this.find(id))
478
+ return this.removeMany([id], signal);
479
+ }
480
+ /** Flash all requested columns together, then remove them after one shared delay. */
481
+ removeMany(ids, signal) {
482
+ const names = [...new Set(ids)];
483
+ if (names.length === 1) {
484
+ const pending = this.removals.get(names[0]);
485
+ if (pending)
486
+ return pending.promise;
487
+ }
488
+ if (!names.length || this.disposed || signal?.aborted || names.some(id => !this.find(id)))
443
489
  return Promise.resolve(false);
444
- if (this.external || this.pending.get(id)?.transaction.state === 'provisional')
490
+ if (this.external || names.some(id => this.removals.has(id)
491
+ || this.pending.get(id)?.transaction.state === 'provisional'))
445
492
  return Promise.reject(new Error('A column interaction is active'));
446
493
  const abort = new AbortController();
447
494
  const cancelled = AbortSignal.any([abort.signal, ...(signal ? [signal] : [])]);
448
- const promise = this.removeColumn(id, cancelled).finally(() => {
449
- if (this.removals.get(id)?.abort === abort)
450
- this.removals.delete(id);
495
+ const operation = names.length === 1 ? this.removeColumn(names[0], cancelled) : this.removeColumns(names, cancelled);
496
+ const promise = operation.finally(() => {
497
+ for (const id of names)
498
+ if (this.removals.get(id)?.abort === abort)
499
+ this.removals.delete(id);
451
500
  });
452
- this.removals.set(id, { abort, promise });
501
+ for (const id of names)
502
+ this.removals.set(id, { abort, promise });
453
503
  return promise;
454
504
  }
455
- async removeColumn(id, signal) {
456
- this.reveal(id);
457
- const header = this.find(id);
458
- const cells = Array.from(this.of.element.rows).map(row => row.cells[header.cellIndex]).filter(Boolean);
459
- this.measureColumn(header, header.getBoundingClientRect?.().width ?? 0);
460
- for (const cell of cells) {
461
- clearTimeout(this.highlights.get(cell));
462
- this.highlights.delete(cell);
463
- cell.classList.remove('column-add-highlight', 'column-add-new', 'column-add-opening');
464
- cell.classList.add('column-remove-highlight');
465
- }
505
+ removeColumn(id, signal) {
506
+ return this.removeColumns([id], signal);
507
+ }
508
+ async removeColumns(ids, signal) {
509
+ this.reveal(ids.at(-1));
510
+ const columns = ids.map(id => {
511
+ const header = this.find(id);
512
+ const cells = Array.from(this.of.element.rows).map(row => row.cells[header.cellIndex]).filter(Boolean);
513
+ return { cells, header, id, width: header.getBoundingClientRect?.().width ?? 0 };
514
+ });
515
+ // Finish every layout read before applying any removal class, so all animations start in the same frame.
516
+ for (const column of columns)
517
+ this.measureColumn(column.header, column.width);
518
+ for (const column of columns)
519
+ for (const cell of column.cells) {
520
+ this.clearHighlight(cell);
521
+ cell.classList.remove('column-add-highlight', 'column-add-new', 'column-add-opening', 'column-add-values-hidden');
522
+ cell.classList.add('column-remove-highlight');
523
+ }
466
524
  try {
467
525
  await new Promise(resolve => {
468
526
  const finish = () => {
@@ -473,25 +531,27 @@ export class TableColumnAdd extends Plugin {
473
531
  const timer = setTimeout(finish, 300);
474
532
  signal.addEventListener('abort', finish, { once: true });
475
533
  });
476
- const current = this.find(id);
477
- if (this.disposed || signal.aborted || !current)
478
- return false;
479
- if (!this.reorder.removeColumn(current))
534
+ if (this.disposed || signal.aborted || ids.some(id => !this.find(id)))
480
535
  return false;
481
- const entry = this.pending.get(id);
482
- entry?.abort.abort();
483
- this.pending.delete(id);
484
- this.refresh();
536
+ for (const id of ids) {
537
+ if (!this.reorder.removeColumn(this.find(id)))
538
+ return false;
539
+ const entry = this.pending.get(id);
540
+ entry?.abort.abort();
541
+ this.pending.delete(id);
542
+ }
485
543
  return true;
486
544
  }
487
545
  finally {
488
- const current = this.find(id);
489
- if (current)
490
- cells.push(...Array.from(this.of.element.rows).map(row => row.cells[current.cellIndex]));
491
- for (const cell of cells) {
492
- cell?.classList.remove('column-remove-highlight');
493
- for (const name of ['fade', 'from', 'height', 'width'])
494
- cell?.style?.removeProperty(`--column-${name}`);
546
+ for (const column of columns) {
547
+ const current = this.find(column.id);
548
+ if (current)
549
+ column.cells.push(...Array.from(this.of.element.rows).map(row => row.cells[current.cellIndex]));
550
+ for (const cell of column.cells) {
551
+ cell?.classList.remove('column-remove-highlight');
552
+ for (const name of ['delay', 'fade', 'from', 'height', 'width'])
553
+ cell?.style?.removeProperty(`--column-${name}`);
554
+ }
495
555
  }
496
556
  this.refresh();
497
557
  }
package/package.json CHANGED
@@ -53,5 +53,5 @@
53
53
  "scripts": {
54
54
  "build": "tsc && sass --no-source-map demo:demo src/column-add.scss:column-add.css && node ../prepare-module/prepare-module.js"
55
55
  },
56
- "version": "0.7.3"
56
+ "version": "0.8.0"
57
57
  }