@universal-ember/table 3.0.2 → 3.0.3

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 (111) hide show
  1. package/declarations/-private/-type-tests/plugin-properties.test.d.ts +2 -0
  2. package/declarations/-private/-type-tests/plugin-properties.test.d.ts.map +1 -0
  3. package/declarations/-private/-type-tests/plugin-with.test.d.ts +2 -0
  4. package/declarations/-private/-type-tests/plugin-with.test.d.ts.map +1 -0
  5. package/declarations/-private/-type-tests/plugins-accessors.test.d.ts +2 -0
  6. package/declarations/-private/-type-tests/plugins-accessors.test.d.ts.map +1 -0
  7. package/declarations/-private/-type-tests/plugins-signature-from.test.d.ts +2 -0
  8. package/declarations/-private/-type-tests/plugins-signature-from.test.d.ts.map +1 -0
  9. package/declarations/-private/-type-tests/plugins-signature-utils.test.d.ts +2 -0
  10. package/declarations/-private/-type-tests/plugins-signature-utils.test.d.ts.map +1 -0
  11. package/declarations/-private/-type-tests/table-api.test.d.ts +2 -0
  12. package/declarations/-private/-type-tests/table-api.test.d.ts.map +1 -0
  13. package/declarations/-private/-type-tests/table-config.test.d.ts +2 -0
  14. package/declarations/-private/-type-tests/table-config.test.d.ts.map +1 -0
  15. package/declarations/-private/column.d.ts +18 -0
  16. package/declarations/-private/column.d.ts.map +1 -0
  17. package/declarations/-private/ember-compat.d.ts +8 -0
  18. package/declarations/-private/ember-compat.d.ts.map +1 -0
  19. package/declarations/-private/interfaces/column.d.ts +63 -0
  20. package/declarations/-private/interfaces/column.d.ts.map +1 -0
  21. package/declarations/-private/interfaces/index.d.ts +8 -0
  22. package/declarations/-private/interfaces/index.d.ts.map +1 -0
  23. package/declarations/-private/interfaces/modifier.d.ts +7 -0
  24. package/declarations/-private/interfaces/modifier.d.ts.map +1 -0
  25. package/declarations/-private/interfaces/pagination.d.ts +17 -0
  26. package/declarations/-private/interfaces/pagination.d.ts.map +1 -0
  27. package/declarations/-private/interfaces/plugins.d.ts +315 -0
  28. package/declarations/-private/interfaces/plugins.d.ts.map +1 -0
  29. package/declarations/-private/interfaces/preferences.d.ts +74 -0
  30. package/declarations/-private/interfaces/preferences.d.ts.map +1 -0
  31. package/declarations/-private/interfaces/selection.d.ts +36 -0
  32. package/declarations/-private/interfaces/selection.d.ts.map +1 -0
  33. package/declarations/-private/interfaces/table.d.ts +109 -0
  34. package/declarations/-private/interfaces/table.d.ts.map +1 -0
  35. package/declarations/-private/js-helper.d.ts +39 -0
  36. package/declarations/-private/js-helper.d.ts.map +1 -0
  37. package/declarations/-private/preferences.d.ts +45 -0
  38. package/declarations/-private/preferences.d.ts.map +1 -0
  39. package/declarations/-private/private-types.d.ts +6 -0
  40. package/declarations/-private/private-types.d.ts.map +1 -0
  41. package/declarations/-private/row.d.ts +12 -0
  42. package/declarations/-private/row.d.ts.map +1 -0
  43. package/declarations/-private/table.d.ts +136 -0
  44. package/declarations/-private/table.d.ts.map +1 -0
  45. package/declarations/-private/utils.d.ts +3 -0
  46. package/declarations/-private/utils.d.ts.map +1 -0
  47. package/declarations/index.d.ts +14 -0
  48. package/declarations/index.d.ts.map +1 -0
  49. package/declarations/plugins/-private/base.d.ts +281 -0
  50. package/declarations/plugins/-private/base.d.ts.map +1 -0
  51. package/declarations/plugins/-private/utils.d.ts +22 -0
  52. package/declarations/plugins/-private/utils.d.ts.map +1 -0
  53. package/declarations/plugins/column-reordering/helpers.d.ts +33 -0
  54. package/declarations/plugins/column-reordering/helpers.d.ts.map +1 -0
  55. package/declarations/plugins/column-reordering/index.d.ts +5 -0
  56. package/declarations/plugins/column-reordering/index.d.ts.map +1 -0
  57. package/declarations/plugins/column-reordering/plugin.d.ts +148 -0
  58. package/declarations/plugins/column-reordering/plugin.d.ts.map +1 -0
  59. package/declarations/plugins/column-reordering/utils.d.ts +8 -0
  60. package/declarations/plugins/column-reordering/utils.d.ts.map +1 -0
  61. package/declarations/plugins/column-resizing/handle.d.ts +128 -0
  62. package/declarations/plugins/column-resizing/handle.d.ts.map +1 -0
  63. package/declarations/plugins/column-resizing/helpers.d.ts +35 -0
  64. package/declarations/plugins/column-resizing/helpers.d.ts.map +1 -0
  65. package/declarations/plugins/column-resizing/index.d.ts +6 -0
  66. package/declarations/plugins/column-resizing/index.d.ts.map +1 -0
  67. package/declarations/plugins/column-resizing/plugin.d.ts +160 -0
  68. package/declarations/plugins/column-resizing/plugin.d.ts.map +1 -0
  69. package/declarations/plugins/column-resizing/resize-observer.d.ts +14 -0
  70. package/declarations/plugins/column-resizing/resize-observer.d.ts.map +1 -0
  71. package/declarations/plugins/column-resizing/utils.d.ts +22 -0
  72. package/declarations/plugins/column-resizing/utils.d.ts.map +1 -0
  73. package/declarations/plugins/column-visibility/helpers.d.ts +18 -0
  74. package/declarations/plugins/column-visibility/helpers.d.ts.map +1 -0
  75. package/declarations/plugins/column-visibility/index.d.ts +5 -0
  76. package/declarations/plugins/column-visibility/index.d.ts.map +1 -0
  77. package/declarations/plugins/column-visibility/plugin.d.ts +64 -0
  78. package/declarations/plugins/column-visibility/plugin.d.ts.map +1 -0
  79. package/declarations/plugins/data-sorting/helpers.d.ts +38 -0
  80. package/declarations/plugins/data-sorting/helpers.d.ts.map +1 -0
  81. package/declarations/plugins/data-sorting/index.d.ts +7 -0
  82. package/declarations/plugins/data-sorting/index.d.ts.map +1 -0
  83. package/declarations/plugins/data-sorting/plugin.d.ts +102 -0
  84. package/declarations/plugins/data-sorting/plugin.d.ts.map +1 -0
  85. package/declarations/plugins/data-sorting/types.d.ts +23 -0
  86. package/declarations/plugins/data-sorting/types.d.ts.map +1 -0
  87. package/declarations/plugins/index.d.ts +6 -0
  88. package/declarations/plugins/index.d.ts.map +1 -0
  89. package/declarations/plugins/metadata/helpers.d.ts +4 -0
  90. package/declarations/plugins/metadata/helpers.d.ts.map +1 -0
  91. package/declarations/plugins/metadata/index.d.ts +5 -0
  92. package/declarations/plugins/metadata/index.d.ts.map +1 -0
  93. package/declarations/plugins/metadata/plugin.d.ts +25 -0
  94. package/declarations/plugins/metadata/plugin.d.ts.map +1 -0
  95. package/declarations/plugins/row-selection/helpers.d.ts +6 -0
  96. package/declarations/plugins/row-selection/helpers.d.ts.map +1 -0
  97. package/declarations/plugins/row-selection/index.d.ts +5 -0
  98. package/declarations/plugins/row-selection/index.d.ts.map +1 -0
  99. package/declarations/plugins/row-selection/plugin.d.ts +80 -0
  100. package/declarations/plugins/row-selection/plugin.d.ts.map +1 -0
  101. package/declarations/plugins/sticky-columns/helpers.d.ts +17 -0
  102. package/declarations/plugins/sticky-columns/helpers.d.ts.map +1 -0
  103. package/declarations/plugins/sticky-columns/index.d.ts +5 -0
  104. package/declarations/plugins/sticky-columns/index.d.ts.map +1 -0
  105. package/declarations/plugins/sticky-columns/plugin.d.ts +70 -0
  106. package/declarations/plugins/sticky-columns/plugin.d.ts.map +1 -0
  107. package/declarations/test-support/index.d.ts +15 -0
  108. package/declarations/test-support/index.d.ts.map +1 -0
  109. package/declarations/utils.d.ts +26 -0
  110. package/declarations/utils.d.ts.map +1 -0
  111. package/package.json +2 -1
@@ -0,0 +1,35 @@
1
+ import { htmlSafe } from '@ember/template';
2
+ import type { Column } from '../../index.ts';
3
+ /**
4
+ * The column actively being resized by the user.
5
+ *
6
+ * Note that during resizing, multiple columns are resized at once,
7
+ * dependending on the boundaries of the resize events.
8
+ *
9
+ * The other columns being resized as a consequence of "this" column will not
10
+ * be marked as isResizing, because this is a user-scoped question:
11
+ * "Is the user directly resizing this column?"
12
+ */
13
+ export declare const isResizing: (column: Column) => boolean;
14
+ /**
15
+ * Does the column have room to shrink?
16
+ */
17
+ export declare const canShrink: (column: Column) => boolean | 0;
18
+ /**
19
+ * Does the column have a resize handle?
20
+ * The return value of this function can be determined by
21
+ * - if resizing is enabled for the column
22
+ * - if resizing is enabled for the whole table
23
+ * - or if we're asking about the first column (resize handles may only be "between" columns)
24
+ */
25
+ export declare const hasResizeHandle: (column: Column) => boolean;
26
+ /**
27
+ * In this plugin (by default), styles are only applied to the headers automatically.
28
+ * in <Table> UIs, the header cells control the widths of all cells in that column.
29
+ * There are other kinds of tabular-like markup that may want to grab the widths of columns,
30
+ * because The Platform does not manage that automatically (like if divs and roles were used manually)
31
+ *
32
+ * This utility is meant to be applied to the `style` attribute of a particular td-like element.
33
+ */
34
+ export declare const styleStringFor: <DataType = unknown>(column: Column<DataType>) => ReturnType<typeof htmlSafe>;
35
+ //# sourceMappingURL=helpers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../src/plugins/column-resizing/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAK3C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAE7C;;;;;;;;;GASG;AACH,eAAO,MAAM,UAAU,GAAI,QAAQ,MAAM,YACU,CAAC;AAEpD;;GAEG;AACH,eAAO,MAAM,SAAS,GAAI,QAAQ,MAAM,gBACU,CAAC;AAEnD;;;;;;GAMG;AACH,eAAO,MAAM,eAAe,GAAI,QAAQ,MAAM,YACU,CAAC;AAEzD;;;;;;;GAOG;AACH,eAAO,MAAM,cAAc,GAAI,QAAQ,GAAG,OAAO,EAC/C,QAAQ,MAAM,CAAC,QAAQ,CAAC,KACvB,UAAU,CAAC,OAAO,QAAQ,CAiB5B,CAAC"}
@@ -0,0 +1,6 @@
1
+ export { resizeHandle } from './handle.ts';
2
+ export * from './helpers.ts';
3
+ export { ColumnResizing } from './plugin.ts';
4
+ export { ColumnResizing as Plugin } from './plugin.ts';
5
+ export type { ColumnOptions, TableOptions } from './plugin.ts';
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/column-resizing/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,cAAc,cAAc,CAAC;AAC7B,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,cAAc,IAAI,MAAM,EAAE,MAAM,aAAa,CAAC;AAGvD,YAAY,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC"}
@@ -0,0 +1,160 @@
1
+ import { BasePlugin } from '../-private/base.ts';
2
+ import type { ColumnApi, PluginPreferences } from '../../plugins/index.ts';
3
+ import type { Column, Table } from '../../index.ts';
4
+ interface ColumnResizePreferences extends PluginPreferences {
5
+ columns: {
6
+ [columnKey: string]: {
7
+ width?: number;
8
+ };
9
+ };
10
+ }
11
+ declare module '@universal-ember/table/plugins' {
12
+ interface Registry {
13
+ ColumnResizing?: ColumnResizePreferences;
14
+ }
15
+ }
16
+ export interface ColumnOptions {
17
+ /**
18
+ * Force a starting width
19
+ * This may not be less than the minWidth
20
+ */
21
+ width?: number;
22
+ /**
23
+ * Default: 128px
24
+ */
25
+ minWidth?: number;
26
+ /**
27
+ * Flip if the column is resizable or not.
28
+ * The default is whatever the table's plugin option is set to
29
+ * (and then yet again true, if not set at all)
30
+ */
31
+ isResizable?: boolean;
32
+ }
33
+ export interface TableOptions {
34
+ /**
35
+ * Toggle whether the table is able to be resized at all
36
+ *
37
+ * default :true
38
+ */
39
+ enabled?: boolean;
40
+ /**
41
+ * By default, each column's "handle" position is on the
42
+ * left-hand side of the column.
43
+ *
44
+ * If, for style-reasons, you want to move it to the right,
45
+ * this option should reflect that so that the calculations can be
46
+ * updated to match the expected behavior of which column(s) grow/shrink
47
+ *
48
+ * Valid values are 'left' or 'right'
49
+ */
50
+ handlePosition?: string;
51
+ }
52
+ interface Signature {
53
+ Meta: {
54
+ Column: ColumnMeta;
55
+ Table: TableMeta;
56
+ };
57
+ Options: {
58
+ Plugin: TableOptions;
59
+ Column: ColumnOptions;
60
+ };
61
+ }
62
+ /**
63
+ * One instance of a plugin exists per table
64
+ * but a plugin can have a "Meta" for each column
65
+ */
66
+ export declare class ColumnResizing extends BasePlugin<Signature> {
67
+ name: string;
68
+ static features: string[];
69
+ meta: {
70
+ column: typeof ColumnMeta;
71
+ table: typeof TableMeta;
72
+ };
73
+ headerCellModifier: (element: HTMLElement, { column }: ColumnApi) => void;
74
+ /**
75
+ * This is what ends up calling resize when the browser changes
76
+ * (assuming that the containing element's styles stretch to fill the space)
77
+ *
78
+ * Later, when container queries are more broadly supported, we'll want to watch
79
+ * the container instead of the window to prevent unneeded updates (as a window can change
80
+ * size without the container changing size)
81
+ */
82
+ containerModifier: typeof resizeObserver;
83
+ reset(): void;
84
+ }
85
+ /**
86
+ * @private
87
+ *
88
+ * Contains resizable information for a particular column
89
+ */
90
+ export declare class ColumnMeta {
91
+ private column;
92
+ constructor(column: Column);
93
+ _width?: number;
94
+ isResizing: boolean;
95
+ get tableMeta(): TableMeta;
96
+ get options(): {
97
+ /**
98
+ * Force a starting width
99
+ * This may not be less than the minWidth
100
+ */
101
+ width?: number;
102
+ minWidth: number;
103
+ /**
104
+ * Flip if the column is resizable or not.
105
+ * The default is whatever the table's plugin option is set to
106
+ * (and then yet again true, if not set at all)
107
+ */
108
+ isResizable?: boolean;
109
+ };
110
+ get key(): string;
111
+ get minWidth(): number;
112
+ get initialWidth(): number | undefined;
113
+ get canShrink(): boolean | 0;
114
+ get roomToShrink(): number;
115
+ get isResizable(): boolean;
116
+ get hasResizeHandle(): boolean;
117
+ get width(): number;
118
+ set width(value: number);
119
+ get style(): Partial<Pick<CSSStyleDeclaration, "width" | "minWidth">>;
120
+ resize(delta: number): void;
121
+ save(): void;
122
+ }
123
+ /**
124
+ * @private
125
+ *
126
+ * Contains resizable and width information regarding the table as a whole
127
+ */
128
+ export declare class TableMeta {
129
+ #private;
130
+ private table;
131
+ constructor(table: Table);
132
+ scrollContainerHeight?: number;
133
+ scrollContainerWidth?: number;
134
+ get options(): Partial<TableOptions>;
135
+ get isResizable(): boolean;
136
+ get defaultColumnWidth(): number | undefined;
137
+ get visibleColumnMetas(): ColumnMeta[];
138
+ get totalInitialColumnWidths(): number;
139
+ get columnsWithoutInitialWidth(): ColumnMeta[];
140
+ get totalVisibleColumnsWidth(): number;
141
+ saveColWidths(visibleColumnMetas: ColumnMeta[]): void;
142
+ reset(): void;
143
+ onTableResize(entry: ResizeObserverEntry): void;
144
+ resizeColumn(column: Column, delta: number): void;
145
+ }
146
+ /**
147
+ * @private
148
+ * included in the same file as the plugin due to circular dependency
149
+ *
150
+ * This goes on the containing element
151
+ *
152
+ * @example
153
+ * ```hbs
154
+ * <div {{resizeObserver @table}}>
155
+ * <table>
156
+ * ```
157
+ */
158
+ declare function resizeObserver(element: HTMLElement, table: Table): () => void;
159
+ export {};
160
+ //# sourceMappingURL=plugin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../src/plugins/column-resizing/plugin.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * @private
3
+ * included in the same file as the plugin due to circular dependency
4
+ *
5
+ * This goes on the containing element
6
+ *
7
+ * @example
8
+ * ```hbs
9
+ * <div {{resizeObserver @table}}>
10
+ * <table>
11
+ * ```
12
+ */
13
+ export declare function resizeObserver(element: HTMLElement, table: any): () => void;
14
+ //# sourceMappingURL=resize-observer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resize-observer.d.ts","sourceRoot":"","sources":["../../../src/plugins/column-resizing/resize-observer.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;GAWG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,GAAG,cAQ9D"}
@@ -0,0 +1,22 @@
1
+ /**
2
+ We want to make sure we get the clientWidth rather than the
3
+ offsetWidth so that the width of the scrollbar is not included when we're
4
+ resizing the columns in the table so that they fit within the scroll
5
+ container
6
+
7
+ Ideally we would just use `entry.contentRect.width`, which we can access
8
+ without triggering any reflows. Unfortunately there are differences in the
9
+ way that this works in Chrome vs Firefox. In Chrome, the
10
+ `entry.contentRect.width` works the same as `entry.target.clientWidth`,
11
+ which does not include the width that is taken up by the vertical scrollbar
12
+ if the element overflows. In Firefox the `entry.contentRect.width` is the
13
+ same as `entry.target.offsetWidth`, which does include the width taken up by
14
+ the scrollbar.
15
+
16
+ We use `getBoundingClientRect()` because it does not round the value to an
17
+ integer, which can sometimes cause subpixel gaps.
18
+ **/
19
+ export declare const getAccurateClientWidth: (element: HTMLElement) => number;
20
+ export declare const totalGapOf: (element?: Element | null) => number;
21
+ export declare const getAccurateClientHeight: (element: HTMLElement) => number;
22
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/plugins/column-resizing/utils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,sBAAsB,GAAI,SAAS,WAAW,WAO1D,CAAC;AAEF,eAAO,MAAM,UAAU,GAAI,UAAU,OAAO,GAAG,IAAI,WAoBlD,CAAC;AAEF,eAAO,MAAM,uBAAuB,GAAI,SAAS,WAAW,WAI3D,CAAC"}
@@ -0,0 +1,18 @@
1
+ import type { Column } from '../../index.ts';
2
+ /**
3
+ * Hide a column
4
+ */
5
+ export declare const hide: (column: Column) => void;
6
+ /**
7
+ * Show a column
8
+ */
9
+ export declare const show: (column: Column) => void;
10
+ /**
11
+ * Ask if a column is presently supposed to be visible
12
+ */
13
+ export declare const isVisible: (column: Column) => boolean;
14
+ /**
15
+ * Ask if a column is presently supposed to be hidden
16
+ */
17
+ export declare const isHidden: (column: Column) => boolean;
18
+ //# sourceMappingURL=helpers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../src/plugins/column-visibility/helpers.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAE7C;;GAEG;AACH,eAAO,MAAM,IAAI,GAAI,QAAQ,MAAM,SACc,CAAC;AAElD;;GAEG;AACH,eAAO,MAAM,IAAI,GAAI,QAAQ,MAAM,SACc,CAAC;AAElD;;GAEG;AACH,eAAO,MAAM,SAAS,GAAI,QAAQ,MAAM,YACY,CAAC;AAErD;;GAEG;AACH,eAAO,MAAM,QAAQ,GAAI,QAAQ,MAAM,YACY,CAAC"}
@@ -0,0 +1,5 @@
1
+ export * from './helpers.ts';
2
+ export { ColumnVisibility } from './plugin.ts';
3
+ export { ColumnVisibility as Plugin } from './plugin.ts';
4
+ export type { Signature } from './plugin.ts';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/column-visibility/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,gBAAgB,IAAI,MAAM,EAAE,MAAM,aAAa,CAAC;AAGzD,YAAY,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC"}
@@ -0,0 +1,64 @@
1
+ import { BasePlugin } from '../-private/base.ts';
2
+ import type { Plugin, PluginPreferences } from '../../plugins/index.ts';
3
+ import type { Column, Table } from '../../index.ts';
4
+ interface ColumnVisibilityPreferences extends PluginPreferences {
5
+ columns: {
6
+ [columnKey: string]: {
7
+ isVisible?: boolean;
8
+ };
9
+ };
10
+ }
11
+ declare module '@universal-ember/table/plugins' {
12
+ interface Registry {
13
+ ColumnVisibility?: ColumnVisibilityPreferences;
14
+ 'column-visibility'?: ColumnVisibilityPreferences;
15
+ }
16
+ }
17
+ export interface Signature {
18
+ Meta: {
19
+ Table: TableMeta;
20
+ Column: ColumnMeta;
21
+ };
22
+ Options: {
23
+ Plugin: {
24
+ enabled?: boolean;
25
+ };
26
+ Column: {
27
+ /**
28
+ * The default visibilty of the column, when rendered.
29
+ * The column can still be toggled on and off.
30
+ *
31
+ * When interacting with preferences, the value stored in preferenced
32
+ * will be the inverse of this value (to save space in storage).
33
+ */
34
+ isVisible?: boolean;
35
+ };
36
+ };
37
+ }
38
+ export declare class ColumnVisibility extends BasePlugin<Signature> implements Plugin<Signature> {
39
+ name: string;
40
+ static features: string[];
41
+ meta: {
42
+ column: typeof ColumnMeta;
43
+ table: typeof TableMeta;
44
+ };
45
+ reset(): void;
46
+ get columns(): Column<unknown>[];
47
+ }
48
+ export declare class ColumnMeta<Data = unknown> {
49
+ private column;
50
+ constructor(column: Column<Data>);
51
+ get isVisible(): boolean;
52
+ get isHidden(): boolean;
53
+ hide: () => void;
54
+ show: () => void;
55
+ toggle: () => void;
56
+ }
57
+ export declare class TableMeta<Data = unknown> {
58
+ private table;
59
+ constructor(table: Table<Data>);
60
+ get visibleColumns(): Column<Data>[];
61
+ toggleColumnVisibility(column: Column<Data>): void;
62
+ }
63
+ export {};
64
+ //# sourceMappingURL=plugin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../src/plugins/column-visibility/plugin.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAA8B,MAAM,qBAAqB,CAAC;AAE7E,OAAO,KAAK,EAAE,MAAM,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AACxE,OAAO,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAEpD,UAAU,2BAA4B,SAAQ,iBAAiB;IAC7D,OAAO,EAAE;QACP,CAAC,SAAS,EAAE,MAAM,GAAG;YACnB,SAAS,CAAC,EAAE,OAAO,CAAC;SACrB,CAAC;KACH,CAAC;CACH;AAED,OAAO,QAAQ,gCAAgC,CAAC;IAC9C,UAAU,QAAQ;QAChB,gBAAgB,CAAC,EAAE,2BAA2B,CAAC;QAC/C,mBAAmB,CAAC,EAAE,2BAA2B,CAAC;KACnD;CACF;AAED,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE;QACJ,KAAK,EAAE,SAAS,CAAC;QACjB,MAAM,EAAE,UAAU,CAAC;KACpB,CAAC;IACF,OAAO,EAAE;QACP,MAAM,EAAE;YACN,OAAO,CAAC,EAAE,OAAO,CAAC;SACnB,CAAC;QACF,MAAM,EAAE;YACN;;;;;;eAMG;YACH,SAAS,CAAC,EAAE,OAAO,CAAC;SACrB,CAAC;KACH,CAAC;CACH;AAED,qBAAa,gBACX,SAAQ,UAAU,CAAC,SAAS,CAC5B,YAAW,MAAM,CAAC,SAAS,CAAC;IAE5B,IAAI,SAAuB;IAC3B,MAAM,CAAC,QAAQ,WAAwB;IAEvC,IAAI;;;MAGF;IAEF,KAAK;IAIL,IAAI,OAAO,sBAEV;CACF;AAED,qBAAa,UAAU,CAAC,IAAI,GAAG,OAAO;IACxB,OAAO,CAAC,MAAM;gBAAN,MAAM,EAAE,MAAM,CAAC,IAAI,CAAC;IAExC,IAAI,SAAS,IAAI,OAAO,CAUvB;IAED,IAAI,QAAQ,IAAI,OAAO,CAEtB;IAED,IAAI,aAiBF;IAEF,IAAI,aAiBF;IAEF,MAAM,aAQJ;CACH;AAED,qBAAa,SAAS,CAAC,IAAI,GAAG,OAAO;IACvB,OAAO,CAAC,KAAK;gBAAL,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC;IAEtC,IACI,cAAc,IAAI,MAAM,CAAC,IAAI,CAAC,EAAE,CAQnC;IAGD,sBAAsB,CAAC,MAAM,EAAE,MAAM,CAAC,IAAI,CAAC;CAK5C"}
@@ -0,0 +1,38 @@
1
+ import type { Column } from '../../index.ts';
2
+ /**
3
+ * Query a specific column's current sort direction
4
+ */
5
+ export declare const sortDirection: (column: Column) => import("./types.ts").SortDirection;
6
+ /**
7
+ * Ask if a column is sortable
8
+ */
9
+ export declare const isSortable: (column: Column) => boolean;
10
+ /**
11
+ * Ask if a column is ascending
12
+ */
13
+ export declare const isAscending: (column: Column) => boolean;
14
+ /**
15
+ * Ask if a column is sorted descending
16
+ */
17
+ export declare const isDescending: (column: Column) => boolean;
18
+ /**
19
+ * Ask if a column is not sorted
20
+ */
21
+ export declare const isUnsorted: (column: Column) => boolean;
22
+ /**
23
+ * Sort the specified column's data using a tri-toggle.
24
+ *
25
+ * States go in this order:
26
+ * Ascending => None => Descending
27
+ * ⬑ ---------- <= ---------- ↲
28
+ */
29
+ export declare const sort: (column: Column) => void;
30
+ /**
31
+ * Toggle a column between descending and not unsorted states
32
+ */
33
+ export declare const sortDescending: (column: Column) => void;
34
+ /**
35
+ * Toggle a column between ascending and not unsorted states
36
+ */
37
+ export declare const sortAscending: (column: Column) => void;
38
+ //# sourceMappingURL=helpers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../src/plugins/data-sorting/helpers.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAE7C;;GAEG;AACH,eAAO,MAAM,aAAa,GAAI,QAAQ,MAAM,uCACG,CAAC;AAEhD;;GAEG;AACH,eAAO,MAAM,UAAU,GAAI,QAAQ,MAAM,YACG,CAAC;AAE7C;;GAEG;AACH,eAAO,MAAM,WAAW,GAAI,QAAQ,MAAM,YACG,CAAC;AAE9C;;GAEG;AACH,eAAO,MAAM,YAAY,GAAI,QAAQ,MAAM,YACG,CAAC;AAE/C;;GAEG;AACH,eAAO,MAAM,UAAU,GAAI,QAAQ,MAAM,YACG,CAAC;AAE7C;;;;;;GAMG;AACH,eAAO,MAAM,IAAI,GAAI,QAAQ,MAAM,SACsB,CAAC;AAE1D;;GAEG;AACH,eAAO,MAAM,cAAc,GAAI,QAAQ,MAAM,SACkB,CAAC;AAEhE;;GAEG;AACH,eAAO,MAAM,aAAa,GAAI,QAAQ,MAAM,SACkB,CAAC"}
@@ -0,0 +1,7 @@
1
+ export * from './helpers.ts';
2
+ export { Sorting as Plugin } from './plugin.ts';
3
+ export { Sorting as DataSorting } from './plugin.ts';
4
+ export { SortDirection } from './types.ts';
5
+ export type { Signature } from './plugin.ts';
6
+ export type { Sort, SortItem } from './types.ts';
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/data-sorting/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAG3C,YAAY,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAC7C,YAAY,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC"}
@@ -0,0 +1,102 @@
1
+ import { BasePlugin } from '../-private/base.ts';
2
+ import { SortDirection } from './types.ts';
3
+ import type { Sort, SortItem } from './types.ts';
4
+ import type { ColumnApi, PluginPreferences } from '../../plugins/index.ts';
5
+ import type { Column, Table } from '../../index.ts';
6
+ interface SortingPreferences extends PluginPreferences {
7
+ table: {
8
+ sorts?: Sort[];
9
+ };
10
+ }
11
+ declare module '@universal-ember/table/plugins' {
12
+ interface Registry {
13
+ Sorting?: SortingPreferences;
14
+ sorting?: SortingPreferences;
15
+ }
16
+ }
17
+ export interface Signature<DataType = unknown> {
18
+ Meta: {
19
+ Column: ColumnMeta;
20
+ Table: TableMeta;
21
+ };
22
+ Options: {
23
+ Plugin: Options<DataType>;
24
+ Column: ColumnOptions;
25
+ };
26
+ }
27
+ interface Options<DataType = unknown> {
28
+ /**
29
+ * Handler for interpreting sort requests from the headless table.
30
+ *
31
+ * Does not actually do the sorting.
32
+ *
33
+ * if omitted, the DataSorting plugin will disable itself
34
+ */
35
+ onSort?: (sorts: SortItem<DataType>[]) => void;
36
+ /**
37
+ * Provided sorts that the table should assume are true.
38
+ *
39
+ * if omitted, the DataSorting plugin will disable itself
40
+ */
41
+ sorts?: SortItem<DataType>[];
42
+ }
43
+ interface ColumnOptions {
44
+ /**
45
+ * Opt in or out of sorting for a particular column.
46
+ * Default is true.
47
+ */
48
+ isSortable?: boolean;
49
+ /**
50
+ * Use this key instead of the `key` on the column config.
51
+ * This has no bearing on any behavior in the plugin, *other than*,
52
+ * swapping out the `property`'s value on the `SortItem`s passed to
53
+ * the table plugin config's `onSort` callback
54
+ */
55
+ sortProperty?: string;
56
+ }
57
+ /**
58
+ * Manages basic data-sorting behaviors. Ascending -> Descending -> None
59
+ *
60
+ * This plugin requires a table plugin configuration, `onSort` for handling *how* sorting happens.
61
+ * communicating back to the table that sorting has succeeded can be done by setting the `sorts`
62
+ * property in the table plugin configuration.
63
+ *
64
+ * Note that this plugin doesn't actually sort the data, as data management is not the responsibility
65
+ * of the table, but of the surrounding context providing the data to the table. So sorting can happen
66
+ * client-side still, just in a component -- much the same way you'd handel sorting via API requests.
67
+ *
68
+ * This plugin is for *conveying* what the current sorts are, rather than _doing_ the sorting.
69
+ */
70
+ export declare class Sorting<DataType = unknown> extends BasePlugin<Signature<DataType>> {
71
+ name: string;
72
+ meta: {
73
+ column: typeof ColumnMeta;
74
+ table: typeof TableMeta;
75
+ };
76
+ headerCellModifier: (element: HTMLElement, { column }: ColumnApi) => void;
77
+ }
78
+ export declare class ColumnMeta {
79
+ private column;
80
+ constructor(column: Column);
81
+ get options(): Partial<ColumnOptions>;
82
+ get isSortable(): boolean;
83
+ get tableMeta(): TableMeta;
84
+ get sortDirection(): SortDirection;
85
+ get isAscending(): boolean;
86
+ get isDescending(): boolean;
87
+ get isUnsorted(): boolean;
88
+ get sortProperty(): string;
89
+ }
90
+ export declare class TableMeta {
91
+ private table;
92
+ constructor(table: Table);
93
+ get options(): Partial<Options<unknown>>;
94
+ get sorts(): SortItem<unknown>[];
95
+ get isSortable(): boolean;
96
+ get onSort(): ((sorts: SortItem<unknown>[]) => void) | undefined;
97
+ handleSort(column: Column): void;
98
+ toggleAscending(column: Column): void;
99
+ toggleDescending(column: Column): void;
100
+ }
101
+ export {};
102
+ //# sourceMappingURL=plugin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../src/plugins/data-sorting/plugin.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAiB,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAE3C,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,KAAK,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3E,OAAO,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAEpD,UAAU,kBAAmB,SAAQ,iBAAiB;IACpD,KAAK,EAAE;QACL,KAAK,CAAC,EAAE,IAAI,EAAE,CAAC;KAChB,CAAC;CACH;AAED,OAAO,QAAQ,gCAAgC,CAAC;IAC9C,UAAU,QAAQ;QAChB,OAAO,CAAC,EAAE,kBAAkB,CAAC;QAC7B,OAAO,CAAC,EAAE,kBAAkB,CAAC;KAC9B;CACF;AAED,MAAM,WAAW,SAAS,CAAC,QAAQ,GAAG,OAAO;IAC3C,IAAI,EAAE;QACJ,MAAM,EAAE,UAAU,CAAC;QACnB,KAAK,EAAE,SAAS,CAAC;KAClB,CAAC;IACF,OAAO,EAAE;QACP,MAAM,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC;QAC1B,MAAM,EAAE,aAAa,CAAC;KACvB,CAAC;CACH;AAED,UAAU,OAAO,CAAC,QAAQ,GAAG,OAAO;IAClC;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,QAAQ,CAAC,QAAQ,CAAC,EAAE,KAAK,IAAI,CAAC;IAC/C;;;;OAIG;IACH,KAAK,CAAC,EAAE,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC;CAC9B;AAED,UAAU,aAAa;IACrB;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;;OAKG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;;;;;;;;;;GAYG;AACH,qBAAa,OAAO,CAAC,QAAQ,GAAG,OAAO,CAAE,SAAQ,UAAU,CACzD,SAAS,CAAC,QAAQ,CAAC,CACpB;IACC,IAAI,SAAkB;IAEtB,IAAI;;;MAGF;IAEF,kBAAkB,GAAI,SAAS,WAAW,EAAE,YAAY,SAAS,UAK/D;CACH;AAED,qBAAa,UAAU;IACT,OAAO,CAAC,MAAM;gBAAN,MAAM,EAAE,MAAM;IAElC,IACI,OAAO,2BAEV;IAED,IAAI,UAAU,YAEb;IAED,IAAI,SAAS,cAEZ;IAED,IAAI,aAAa,kBAMhB;IAED,IAAI,WAAW,YAEd;IAED,IAAI,YAAY,YAEf;IAED,IAAI,UAAU,YAEb;IAED,IAAI,YAAY,WAEf;CACF;AAED,qBAAa,SAAS;IACR,OAAO,CAAC,KAAK;gBAAL,KAAK,EAAE,KAAK;IAEhC,IACI,OAAO,8BAEV;IAED,IAAI,KAAK,wBAER;IAED,IAAI,UAAU,YAEb;IAED,IAAI,MAAM,qCAhHgC,IAAI,cAkH7C;IAGD,UAAU,CAAC,MAAM,EAAE,MAAM;IA2BzB,eAAe,CAAC,MAAM,EAAE,MAAM;IAiB9B,gBAAgB,CAAC,MAAM,EAAE,MAAM;CAkBhC"}
@@ -0,0 +1,23 @@
1
+ import type { ColumnKey } from '../../-private/interfaces';
2
+ export declare enum SortDirection {
3
+ Ascending = "ascending",
4
+ Descending = "descending",
5
+ None = "none"
6
+ }
7
+ export interface Sort {
8
+ property: string;
9
+ direction: SortDirection;
10
+ }
11
+ export declare enum SortTransform {
12
+ Underscore = "underscore",
13
+ Camelize = "camelize"
14
+ }
15
+ export interface SortsOptions {
16
+ separator: string;
17
+ transform: string | null;
18
+ }
19
+ export interface SortItem<T> {
20
+ direction: SortDirection;
21
+ property: ColumnKey<T>;
22
+ }
23
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/plugins/data-sorting/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAE3D,oBAAY,aAAa;IACvB,SAAS,cAAc;IACvB,UAAU,eAAe;IACzB,IAAI,SAAS;CACd;AAED,MAAM,WAAW,IAAI;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,aAAa,CAAC;CAC1B;AAED,oBAAY,aAAa;IACvB,UAAU,eAAe;IACzB,QAAQ,aAAa;CACtB;AACD,MAAM,WAAW,YAAY;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B;AAED,MAAM,WAAW,QAAQ,CAAC,CAAC;IACzB,SAAS,EAAE,aAAa,CAAC;IACzB,QAAQ,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC;CACxB"}
@@ -0,0 +1,6 @@
1
+ export { BasePlugin, columns, hasPlugin, meta, options, preferences, } from './-private/base.ts';
2
+ export { applyStyles, removeStyles } from './-private/utils.ts';
3
+ export type { ColumnFeatures, TableFeatures } from './-private/base.ts';
4
+ export type { ColumnApi, Plugin, PluginPreferences, Registry, } from '../-private/interfaces';
5
+ export type { PluginSignature } from '../-private/interfaces/plugins';
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/plugins/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,UAAU,EACV,OAAO,EACP,SAAS,EACT,IAAI,EACJ,OAAO,EACP,WAAW,GACZ,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAGhE,YAAY,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxE,YAAY,EACV,SAAS,EACT,MAAM,EACN,iBAAiB,EACjB,QAAQ,GACT,MAAM,wBAAwB,CAAC;AAChC,YAAY,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { Column, Table } from '../../index.ts';
2
+ export declare const forColumn: (column: Column<any>, key: string) => any;
3
+ export declare const forTable: (table: Table<any>, key: string) => any;
4
+ //# sourceMappingURL=helpers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../src/plugins/metadata/helpers.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAEpD,eAAO,MAAM,SAAS,GAAI,QAAQ,MAAM,CAAC,GAAG,CAAC,EAAE,KAAK,MAAM,QAEzD,CAAC;AAEF,eAAO,MAAM,QAAQ,GAAI,OAAO,KAAK,CAAC,GAAG,CAAC,EAAE,KAAK,MAAM,QAEtD,CAAC"}
@@ -0,0 +1,5 @@
1
+ export * from './helpers.ts';
2
+ export { Metadata } from './plugin.ts';
3
+ export { Metadata as Plugin } from './plugin.ts';
4
+ export type { Signature } from './plugin.ts';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/metadata/index.ts"],"names":[],"mappings":"AACA,cAAc,cAAc,CAAC;AAC7B,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,QAAQ,IAAI,MAAM,EAAE,MAAM,aAAa,CAAC;AAGjD,YAAY,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC"}
@@ -0,0 +1,25 @@
1
+ import { BasePlugin } from '../-private/base.ts';
2
+ /**
3
+ * Data stored per column or table can be arbitrary
4
+ *
5
+ */
6
+ type ArbitraryData = Record<string, any>;
7
+ export interface Signature<Data = ArbitraryData> {
8
+ Options: {
9
+ Column: Data;
10
+ Plugin: Data;
11
+ };
12
+ }
13
+ /**
14
+ * This plugin does noting,
15
+ * but gives consumer of it a safe way to store and associate "any" data with columns
16
+ * (and have a generic top-level bucket of data as well)
17
+ *
18
+ * This "metadata" stored per column per table is managed via the "options" part of the Signature, as
19
+ * "meta" is a term used for plugins for plugin authors.
20
+ */
21
+ export declare class Metadata<S extends Signature> extends BasePlugin<S> {
22
+ name: string;
23
+ }
24
+ export {};
25
+ //# sourceMappingURL=plugin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../src/plugins/metadata/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjD;;;GAGG;AACH,KAAK,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AAEzC,MAAM,WAAW,SAAS,CAAC,IAAI,GAAG,aAAa;IAC7C,OAAO,EAAE;QACP,MAAM,EAAE,IAAI,CAAC;QACb,MAAM,EAAE,IAAI,CAAC;KACd,CAAC;CACH;AAED;;;;;;;GAOG;AACH,qBAAa,QAAQ,CAAC,CAAC,SAAS,SAAS,CAAE,SAAQ,UAAU,CAAC,CAAC,CAAC;IAC9D,IAAI,SAAc;CACnB"}
@@ -0,0 +1,6 @@
1
+ import type { Row } from '../../-private/row.ts';
2
+ export declare const isSelected: (row: Row<any>) => boolean;
3
+ export declare const select: (row: Row<any>) => void;
4
+ export declare const deselect: (row: Row<any>) => void;
5
+ export declare const toggle: (row: Row<any>) => void;
6
+ //# sourceMappingURL=helpers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../src/plugins/row-selection/helpers.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAEjD,eAAO,MAAM,UAAU,GAAI,KAAK,GAAG,CAAC,GAAG,CAAC,YACG,CAAC;AAC5C,eAAO,MAAM,MAAM,GAAI,KAAK,GAAG,CAAC,GAAG,CAAC,SACK,CAAC;AAC1C,eAAO,MAAM,QAAQ,GAAI,KAAK,GAAG,CAAC,GAAG,CAAC,SACK,CAAC;AAC5C,eAAO,MAAM,MAAM,GAAI,KAAK,GAAG,CAAC,GAAG,CAAC,SACK,CAAC"}
@@ -0,0 +1,5 @@
1
+ export * from './helpers.ts';
2
+ export { RowSelection as Plugin } from './plugin.ts';
3
+ export { RowSelection } from './plugin.ts';
4
+ export type { Signature } from './plugin.ts';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/row-selection/index.ts"],"names":[],"mappings":"AACA,cAAc,cAAc,CAAC;AAC7B,OAAO,EAAE,YAAY,IAAI,MAAM,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAG3C,YAAY,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC"}