simple-table-core 3.0.0-beta.12 → 3.0.0-beta.14
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/dist/cjs/index.js +1 -1
- package/dist/cjs/src/utils/headerWidthUtils.d.ts +2 -2
- package/dist/cjs/stories/examples/infrastructure/InfrastructureExample.d.ts +1 -0
- package/dist/cjs/stories/tests/13-ColumnResizeTests.stories.d.ts +24 -0
- package/dist/cjs/stories/tests/39-AutoExpandColumnsTests.stories.d.ts +115 -0
- package/dist/index.es.js +1 -1
- package/dist/src/utils/headerWidthUtils.d.ts +2 -2
- package/dist/stories/examples/infrastructure/InfrastructureExample.d.ts +1 -0
- package/dist/stories/tests/13-ColumnResizeTests.stories.d.ts +24 -0
- package/dist/stories/tests/39-AutoExpandColumnsTests.stories.d.ts +115 -0
- package/package.json +1 -1
|
@@ -13,8 +13,8 @@ export declare const DEFAULT_TABLE_WIDTH = 800;
|
|
|
13
13
|
* Normalize header widths so that fr and % are converted to pixels.
|
|
14
14
|
* Call this as soon as headers are received so the rest of the code can assume numeric widths.
|
|
15
15
|
* If totalWidth is not provided, a reasonable total is computed from fixed widths + default for fr columns.
|
|
16
|
-
* If options.containerWidth is provided,
|
|
17
|
-
*
|
|
16
|
+
* If options.containerWidth is provided, all fr/% columns are resolved against the full container width,
|
|
17
|
+
* so pinned and non-pinned fr columns share the same proportional pool.
|
|
18
18
|
*/
|
|
19
19
|
export declare function normalizeHeaderWidths(headers: HeaderObject[], totalWidthOrOptions?: number | {
|
|
20
20
|
containerWidth: number;
|
|
@@ -60,3 +60,27 @@ export declare const DoubleClickResizeHandleAutoFit: {
|
|
|
60
60
|
canvasElement: HTMLElement;
|
|
61
61
|
}) => Promise<void>;
|
|
62
62
|
};
|
|
63
|
+
export declare const ResizeLeftPinnedColumn: {
|
|
64
|
+
render: () => HTMLDivElement & {
|
|
65
|
+
_table?: SimpleTableVanilla | undefined;
|
|
66
|
+
};
|
|
67
|
+
play: ({ canvasElement }: {
|
|
68
|
+
canvasElement: HTMLElement;
|
|
69
|
+
}) => Promise<void>;
|
|
70
|
+
};
|
|
71
|
+
export declare const ResizeRightPinnedColumn: {
|
|
72
|
+
render: () => HTMLDivElement & {
|
|
73
|
+
_table?: SimpleTableVanilla | undefined;
|
|
74
|
+
};
|
|
75
|
+
play: ({ canvasElement }: {
|
|
76
|
+
canvasElement: HTMLElement;
|
|
77
|
+
}) => Promise<void>;
|
|
78
|
+
};
|
|
79
|
+
export declare const ResizeWithBothPinnedSections: {
|
|
80
|
+
render: () => HTMLDivElement & {
|
|
81
|
+
_table?: SimpleTableVanilla | undefined;
|
|
82
|
+
};
|
|
83
|
+
play: ({ canvasElement }: {
|
|
84
|
+
canvasElement: HTMLElement;
|
|
85
|
+
}) => Promise<void>;
|
|
86
|
+
};
|
|
@@ -247,6 +247,121 @@ export declare const AutoExpandContainerResizeTriggersRescale: {
|
|
|
247
247
|
canvasElement: HTMLElement;
|
|
248
248
|
}) => Promise<void>;
|
|
249
249
|
};
|
|
250
|
+
/** Resize a right-pinned column with autoExpand. Delta is reversed for right-pinned. */
|
|
251
|
+
export declare const AutoExpandResizeRightPinnedColumn: {
|
|
252
|
+
parameters: {
|
|
253
|
+
tags: string[];
|
|
254
|
+
};
|
|
255
|
+
render: () => HTMLDivElement & {
|
|
256
|
+
_table?: import("../../src/index").SimpleTableVanilla | undefined;
|
|
257
|
+
};
|
|
258
|
+
play: ({ canvasElement }: {
|
|
259
|
+
canvasElement: HTMLElement;
|
|
260
|
+
}) => Promise<void>;
|
|
261
|
+
};
|
|
262
|
+
/** Resize the boundary column of a left-pinned section (rightmost pinned column).
|
|
263
|
+
* This hits the "section boundary" code path where columnsToShrink is empty;
|
|
264
|
+
* the section itself grows/shrinks without sibling compensation. */
|
|
265
|
+
export declare const AutoExpandResizePinnedBoundaryColumn: {
|
|
266
|
+
parameters: {
|
|
267
|
+
tags: string[];
|
|
268
|
+
};
|
|
269
|
+
render: () => HTMLDivElement & {
|
|
270
|
+
_table?: import("../../src/index").SimpleTableVanilla | undefined;
|
|
271
|
+
};
|
|
272
|
+
play: ({ canvasElement }: {
|
|
273
|
+
canvasElement: HTMLElement;
|
|
274
|
+
}) => Promise<void>;
|
|
275
|
+
};
|
|
276
|
+
/** Resize a main-section column when both left and right pinned sections exist.
|
|
277
|
+
* Width redistribution should only affect the main section columns. */
|
|
278
|
+
export declare const AutoExpandResizeMainWithBothPinned: {
|
|
279
|
+
parameters: {
|
|
280
|
+
tags: string[];
|
|
281
|
+
};
|
|
282
|
+
render: () => HTMLDivElement & {
|
|
283
|
+
_table?: import("../../src/index").SimpleTableVanilla | undefined;
|
|
284
|
+
};
|
|
285
|
+
play: ({ canvasElement }: {
|
|
286
|
+
canvasElement: HTMLElement;
|
|
287
|
+
}) => Promise<void>;
|
|
288
|
+
};
|
|
289
|
+
/** Shrink a column all the way to minWidth with autoExpand.
|
|
290
|
+
* The freed space should be redistributed to neighboring columns. */
|
|
291
|
+
export declare const AutoExpandShrinkColumnToMinWidth: {
|
|
292
|
+
parameters: {
|
|
293
|
+
tags: string[];
|
|
294
|
+
};
|
|
295
|
+
render: () => HTMLDivElement & {
|
|
296
|
+
_table?: import("../../src/index").SimpleTableVanilla | undefined;
|
|
297
|
+
};
|
|
298
|
+
play: ({ canvasElement }: {
|
|
299
|
+
canvasElement: HTMLElement;
|
|
300
|
+
}) => Promise<void>;
|
|
301
|
+
};
|
|
302
|
+
/** Grow a column until all siblings hit minWidth.
|
|
303
|
+
* Growth should be clamped once there is no more shrinkable headroom. */
|
|
304
|
+
export declare const AutoExpandGrowUntilSiblingsAtMin: {
|
|
305
|
+
parameters: {
|
|
306
|
+
tags: string[];
|
|
307
|
+
};
|
|
308
|
+
render: () => HTMLDivElement & {
|
|
309
|
+
_table?: import("../../src/index").SimpleTableVanilla | undefined;
|
|
310
|
+
};
|
|
311
|
+
play: ({ canvasElement }: {
|
|
312
|
+
canvasElement: HTMLElement;
|
|
313
|
+
}) => Promise<void>;
|
|
314
|
+
};
|
|
315
|
+
/** Resize a left-pinned column with an extreme positive delta to test max section width clamping.
|
|
316
|
+
* The pinned section should not exceed 60% of the container (single pinned) or 40% (dual). */
|
|
317
|
+
export declare const AutoExpandResizePinnedPastMaxSectionWidth: {
|
|
318
|
+
parameters: {
|
|
319
|
+
tags: string[];
|
|
320
|
+
};
|
|
321
|
+
render: () => HTMLDivElement & {
|
|
322
|
+
_table?: import("../../src/index").SimpleTableVanilla | undefined;
|
|
323
|
+
};
|
|
324
|
+
play: ({ canvasElement }: {
|
|
325
|
+
canvasElement: HTMLElement;
|
|
326
|
+
}) => Promise<void>;
|
|
327
|
+
};
|
|
328
|
+
/** Resize with both pinned sections and extreme delta to test dual-pinned max clamping (40% each). */
|
|
329
|
+
export declare const AutoExpandResizeDualPinnedMaxClamp: {
|
|
330
|
+
parameters: {
|
|
331
|
+
tags: string[];
|
|
332
|
+
};
|
|
333
|
+
render: () => HTMLDivElement & {
|
|
334
|
+
_table?: import("../../src/index").SimpleTableVanilla | undefined;
|
|
335
|
+
};
|
|
336
|
+
play: ({ canvasElement }: {
|
|
337
|
+
canvasElement: HTMLElement;
|
|
338
|
+
}) => Promise<void>;
|
|
339
|
+
};
|
|
340
|
+
/** Double-click on resize handle with autoExpand + pinned columns.
|
|
341
|
+
* Verifies no crash and columns stay within bounds. */
|
|
342
|
+
export declare const AutoExpandDoubleClickResizePinned: {
|
|
343
|
+
parameters: {
|
|
344
|
+
tags: string[];
|
|
345
|
+
};
|
|
346
|
+
render: () => HTMLDivElement & {
|
|
347
|
+
_table?: import("../../src/index").SimpleTableVanilla | undefined;
|
|
348
|
+
};
|
|
349
|
+
play: ({ canvasElement }: {
|
|
350
|
+
canvasElement: HTMLElement;
|
|
351
|
+
}) => Promise<void>;
|
|
352
|
+
};
|
|
353
|
+
/** Stress test: resize across pinned and main sections in sequence, growing and shrinking. */
|
|
354
|
+
export declare const AutoExpandResizePinnedAndMainStress: {
|
|
355
|
+
parameters: {
|
|
356
|
+
tags: string[];
|
|
357
|
+
};
|
|
358
|
+
render: () => HTMLDivElement & {
|
|
359
|
+
_table?: import("../../src/index").SimpleTableVanilla | undefined;
|
|
360
|
+
};
|
|
361
|
+
play: ({ canvasElement }: {
|
|
362
|
+
canvasElement: HTMLElement;
|
|
363
|
+
}) => Promise<void>;
|
|
364
|
+
};
|
|
250
365
|
export declare const AutoExpandDisabledNoExpand: {
|
|
251
366
|
parameters: {
|
|
252
367
|
tags: string[];
|