@universal-ember/table 3.6.0 → 3.6.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 (224) hide show
  1. package/package.json +1 -1
  2. package/src/plugins/column-reordering/plugin.ts +4 -6
  3. package/declarations/-private/-type-tests/plugin-properties.test.d.ts +0 -2
  4. package/declarations/-private/-type-tests/plugin-properties.test.d.ts.map +0 -1
  5. package/declarations/-private/-type-tests/plugin-with.test.d.ts +0 -2
  6. package/declarations/-private/-type-tests/plugin-with.test.d.ts.map +0 -1
  7. package/declarations/-private/-type-tests/plugins-accessors.test.d.ts +0 -2
  8. package/declarations/-private/-type-tests/plugins-accessors.test.d.ts.map +0 -1
  9. package/declarations/-private/-type-tests/plugins-signature-from.test.d.ts +0 -2
  10. package/declarations/-private/-type-tests/plugins-signature-from.test.d.ts.map +0 -1
  11. package/declarations/-private/-type-tests/plugins-signature-utils.test.d.ts +0 -2
  12. package/declarations/-private/-type-tests/plugins-signature-utils.test.d.ts.map +0 -1
  13. package/declarations/-private/-type-tests/table-api.test.d.ts +0 -2
  14. package/declarations/-private/-type-tests/table-api.test.d.ts.map +0 -1
  15. package/declarations/-private/-type-tests/table-config.test.d.ts +0 -2
  16. package/declarations/-private/-type-tests/table-config.test.d.ts.map +0 -1
  17. package/declarations/-private/column.d.ts +0 -18
  18. package/declarations/-private/column.d.ts.map +0 -1
  19. package/declarations/-private/ember-compat.d.ts +0 -8
  20. package/declarations/-private/ember-compat.d.ts.map +0 -1
  21. package/declarations/-private/interfaces/column.d.ts +0 -63
  22. package/declarations/-private/interfaces/column.d.ts.map +0 -1
  23. package/declarations/-private/interfaces/index.d.ts +0 -8
  24. package/declarations/-private/interfaces/index.d.ts.map +0 -1
  25. package/declarations/-private/interfaces/modifier.d.ts +0 -7
  26. package/declarations/-private/interfaces/modifier.d.ts.map +0 -1
  27. package/declarations/-private/interfaces/pagination.d.ts +0 -17
  28. package/declarations/-private/interfaces/pagination.d.ts.map +0 -1
  29. package/declarations/-private/interfaces/plugins.d.ts +0 -315
  30. package/declarations/-private/interfaces/plugins.d.ts.map +0 -1
  31. package/declarations/-private/interfaces/preferences.d.ts +0 -74
  32. package/declarations/-private/interfaces/preferences.d.ts.map +0 -1
  33. package/declarations/-private/interfaces/selection.d.ts +0 -36
  34. package/declarations/-private/interfaces/selection.d.ts.map +0 -1
  35. package/declarations/-private/interfaces/table.d.ts +0 -127
  36. package/declarations/-private/interfaces/table.d.ts.map +0 -1
  37. package/declarations/-private/js-helper.d.ts +0 -39
  38. package/declarations/-private/js-helper.d.ts.map +0 -1
  39. package/declarations/-private/preferences.d.ts +0 -47
  40. package/declarations/-private/preferences.d.ts.map +0 -1
  41. package/declarations/-private/private-types.d.ts +0 -6
  42. package/declarations/-private/private-types.d.ts.map +0 -1
  43. package/declarations/-private/row.d.ts +0 -12
  44. package/declarations/-private/row.d.ts.map +0 -1
  45. package/declarations/-private/table.d.ts +0 -136
  46. package/declarations/-private/table.d.ts.map +0 -1
  47. package/declarations/-private/utils.d.ts +0 -3
  48. package/declarations/-private/utils.d.ts.map +0 -1
  49. package/declarations/index.d.ts +0 -14
  50. package/declarations/index.d.ts.map +0 -1
  51. package/declarations/plugins/-private/base.d.ts +0 -281
  52. package/declarations/plugins/-private/base.d.ts.map +0 -1
  53. package/declarations/plugins/-private/utils.d.ts +0 -22
  54. package/declarations/plugins/-private/utils.d.ts.map +0 -1
  55. package/declarations/plugins/column-reordering/helpers.d.ts +0 -54
  56. package/declarations/plugins/column-reordering/helpers.d.ts.map +0 -1
  57. package/declarations/plugins/column-reordering/index.d.ts +0 -5
  58. package/declarations/plugins/column-reordering/index.d.ts.map +0 -1
  59. package/declarations/plugins/column-reordering/plugin.d.ts +0 -196
  60. package/declarations/plugins/column-reordering/plugin.d.ts.map +0 -1
  61. package/declarations/plugins/column-reordering/utils.d.ts +0 -8
  62. package/declarations/plugins/column-reordering/utils.d.ts.map +0 -1
  63. package/declarations/plugins/column-resizing/handle.d.ts +0 -128
  64. package/declarations/plugins/column-resizing/handle.d.ts.map +0 -1
  65. package/declarations/plugins/column-resizing/helpers.d.ts +0 -40
  66. package/declarations/plugins/column-resizing/helpers.d.ts.map +0 -1
  67. package/declarations/plugins/column-resizing/index.d.ts +0 -6
  68. package/declarations/plugins/column-resizing/index.d.ts.map +0 -1
  69. package/declarations/plugins/column-resizing/plugin.d.ts +0 -172
  70. package/declarations/plugins/column-resizing/plugin.d.ts.map +0 -1
  71. package/declarations/plugins/column-resizing/resize-observer.d.ts +0 -14
  72. package/declarations/plugins/column-resizing/resize-observer.d.ts.map +0 -1
  73. package/declarations/plugins/column-resizing/utils.d.ts +0 -22
  74. package/declarations/plugins/column-resizing/utils.d.ts.map +0 -1
  75. package/declarations/plugins/column-visibility/helpers.d.ts +0 -18
  76. package/declarations/plugins/column-visibility/helpers.d.ts.map +0 -1
  77. package/declarations/plugins/column-visibility/index.d.ts +0 -5
  78. package/declarations/plugins/column-visibility/index.d.ts.map +0 -1
  79. package/declarations/plugins/column-visibility/plugin.d.ts +0 -64
  80. package/declarations/plugins/column-visibility/plugin.d.ts.map +0 -1
  81. package/declarations/plugins/data-sorting/helpers.d.ts +0 -38
  82. package/declarations/plugins/data-sorting/helpers.d.ts.map +0 -1
  83. package/declarations/plugins/data-sorting/index.d.ts +0 -7
  84. package/declarations/plugins/data-sorting/index.d.ts.map +0 -1
  85. package/declarations/plugins/data-sorting/plugin.d.ts +0 -102
  86. package/declarations/plugins/data-sorting/plugin.d.ts.map +0 -1
  87. package/declarations/plugins/data-sorting/types.d.ts +0 -23
  88. package/declarations/plugins/data-sorting/types.d.ts.map +0 -1
  89. package/declarations/plugins/index.d.ts +0 -6
  90. package/declarations/plugins/index.d.ts.map +0 -1
  91. package/declarations/plugins/metadata/helpers.d.ts +0 -4
  92. package/declarations/plugins/metadata/helpers.d.ts.map +0 -1
  93. package/declarations/plugins/metadata/index.d.ts +0 -5
  94. package/declarations/plugins/metadata/index.d.ts.map +0 -1
  95. package/declarations/plugins/metadata/plugin.d.ts +0 -25
  96. package/declarations/plugins/metadata/plugin.d.ts.map +0 -1
  97. package/declarations/plugins/row-selection/helpers.d.ts +0 -6
  98. package/declarations/plugins/row-selection/helpers.d.ts.map +0 -1
  99. package/declarations/plugins/row-selection/index.d.ts +0 -5
  100. package/declarations/plugins/row-selection/index.d.ts.map +0 -1
  101. package/declarations/plugins/row-selection/plugin.d.ts +0 -80
  102. package/declarations/plugins/row-selection/plugin.d.ts.map +0 -1
  103. package/declarations/plugins/sticky-columns/helpers.d.ts +0 -17
  104. package/declarations/plugins/sticky-columns/helpers.d.ts.map +0 -1
  105. package/declarations/plugins/sticky-columns/index.d.ts +0 -5
  106. package/declarations/plugins/sticky-columns/index.d.ts.map +0 -1
  107. package/declarations/plugins/sticky-columns/plugin.d.ts +0 -70
  108. package/declarations/plugins/sticky-columns/plugin.d.ts.map +0 -1
  109. package/declarations/test-support/index.d.ts +0 -15
  110. package/declarations/test-support/index.d.ts.map +0 -1
  111. package/declarations/utils.d.ts +0 -26
  112. package/declarations/utils.d.ts.map +0 -1
  113. package/dist/-private/-type-tests/plugin-properties.test.js +0 -27
  114. package/dist/-private/-type-tests/plugin-properties.test.js.map +0 -1
  115. package/dist/-private/-type-tests/plugin-with.test.js +0 -20
  116. package/dist/-private/-type-tests/plugin-with.test.js.map +0 -1
  117. package/dist/-private/-type-tests/plugins-accessors.test.js +0 -36
  118. package/dist/-private/-type-tests/plugins-accessors.test.js.map +0 -1
  119. package/dist/-private/-type-tests/plugins-signature-from.test.js +0 -15
  120. package/dist/-private/-type-tests/plugins-signature-from.test.js.map +0 -1
  121. package/dist/-private/-type-tests/plugins-signature-utils.test.js +0 -36
  122. package/dist/-private/-type-tests/plugins-signature-utils.test.js.map +0 -1
  123. package/dist/-private/-type-tests/table-api.test.js +0 -17
  124. package/dist/-private/-type-tests/table-api.test.js.map +0 -1
  125. package/dist/-private/-type-tests/table-config.test.js +0 -55
  126. package/dist/-private/-type-tests/table-config.test.js.map +0 -1
  127. package/dist/-private/column.js +0 -62
  128. package/dist/-private/column.js.map +0 -1
  129. package/dist/-private/ember-compat.js +0 -17
  130. package/dist/-private/ember-compat.js.map +0 -1
  131. package/dist/-private/interfaces/column.js +0 -2
  132. package/dist/-private/interfaces/column.js.map +0 -1
  133. package/dist/-private/interfaces/index.js +0 -2
  134. package/dist/-private/interfaces/index.js.map +0 -1
  135. package/dist/-private/interfaces/modifier.js +0 -2
  136. package/dist/-private/interfaces/modifier.js.map +0 -1
  137. package/dist/-private/interfaces/pagination.js +0 -2
  138. package/dist/-private/interfaces/pagination.js.map +0 -1
  139. package/dist/-private/interfaces/plugins.js +0 -2
  140. package/dist/-private/interfaces/plugins.js.map +0 -1
  141. package/dist/-private/interfaces/preferences.js +0 -2
  142. package/dist/-private/interfaces/preferences.js.map +0 -1
  143. package/dist/-private/interfaces/selection.js +0 -2
  144. package/dist/-private/interfaces/selection.js.map +0 -1
  145. package/dist/-private/interfaces/table.js +0 -2
  146. package/dist/-private/interfaces/table.js.map +0 -1
  147. package/dist/-private/js-helper.js +0 -55
  148. package/dist/-private/js-helper.js.map +0 -1
  149. package/dist/-private/preferences.js +0 -149
  150. package/dist/-private/preferences.js.map +0 -1
  151. package/dist/-private/private-types.js +0 -2
  152. package/dist/-private/private-types.js.map +0 -1
  153. package/dist/-private/row.js +0 -51
  154. package/dist/-private/row.js.map +0 -1
  155. package/dist/-private/table.js +0 -276
  156. package/dist/-private/table.js.map +0 -1
  157. package/dist/-private/utils.js +0 -15
  158. package/dist/-private/utils.js.map +0 -1
  159. package/dist/_rollupPluginBabelHelpers-CjaRjJZX.js +0 -63
  160. package/dist/_rollupPluginBabelHelpers-CjaRjJZX.js.map +0 -1
  161. package/dist/index.js +0 -4
  162. package/dist/index.js.map +0 -1
  163. package/dist/plugins/-private/base.js +0 -532
  164. package/dist/plugins/-private/base.js.map +0 -1
  165. package/dist/plugins/-private/utils.js +0 -103
  166. package/dist/plugins/-private/utils.js.map +0 -1
  167. package/dist/plugins/column-reordering/helpers.js +0 -81
  168. package/dist/plugins/column-reordering/helpers.js.map +0 -1
  169. package/dist/plugins/column-reordering/index.js +0 -3
  170. package/dist/plugins/column-reordering/index.js.map +0 -1
  171. package/dist/plugins/column-reordering/plugin.js +0 -453
  172. package/dist/plugins/column-reordering/plugin.js.map +0 -1
  173. package/dist/plugins/column-reordering/utils.js +0 -34
  174. package/dist/plugins/column-reordering/utils.js.map +0 -1
  175. package/dist/plugins/column-resizing/handle.js +0 -243
  176. package/dist/plugins/column-resizing/handle.js.map +0 -1
  177. package/dist/plugins/column-resizing/helpers.js +0 -77
  178. package/dist/plugins/column-resizing/helpers.js.map +0 -1
  179. package/dist/plugins/column-resizing/index.js +0 -4
  180. package/dist/plugins/column-resizing/index.js.map +0 -1
  181. package/dist/plugins/column-resizing/plugin.js +0 -365
  182. package/dist/plugins/column-resizing/plugin.js.map +0 -1
  183. package/dist/plugins/column-resizing/resize-observer.js +0 -44
  184. package/dist/plugins/column-resizing/resize-observer.js.map +0 -1
  185. package/dist/plugins/column-resizing/utils.js +0 -44
  186. package/dist/plugins/column-resizing/utils.js.map +0 -1
  187. package/dist/plugins/column-visibility/helpers.js +0 -25
  188. package/dist/plugins/column-visibility/helpers.js.map +0 -1
  189. package/dist/plugins/column-visibility/index.js +0 -3
  190. package/dist/plugins/column-visibility/index.js.map +0 -1
  191. package/dist/plugins/column-visibility/plugin.js +0 -92
  192. package/dist/plugins/column-visibility/plugin.js.map +0 -1
  193. package/dist/plugins/data-sorting/helpers.js +0 -49
  194. package/dist/plugins/data-sorting/helpers.js.map +0 -1
  195. package/dist/plugins/data-sorting/index.js +0 -4
  196. package/dist/plugins/data-sorting/index.js.map +0 -1
  197. package/dist/plugins/data-sorting/plugin.js +0 -132
  198. package/dist/plugins/data-sorting/plugin.js.map +0 -1
  199. package/dist/plugins/data-sorting/types.js +0 -14
  200. package/dist/plugins/data-sorting/types.js.map +0 -1
  201. package/dist/plugins/index.js +0 -3
  202. package/dist/plugins/index.js.map +0 -1
  203. package/dist/plugins/metadata/helpers.js +0 -12
  204. package/dist/plugins/metadata/helpers.js.map +0 -1
  205. package/dist/plugins/metadata/index.js +0 -3
  206. package/dist/plugins/metadata/index.js.map +0 -1
  207. package/dist/plugins/metadata/plugin.js +0 -25
  208. package/dist/plugins/metadata/plugin.js.map +0 -1
  209. package/dist/plugins/row-selection/helpers.js +0 -10
  210. package/dist/plugins/row-selection/helpers.js.map +0 -1
  211. package/dist/plugins/row-selection/index.js +0 -3
  212. package/dist/plugins/row-selection/index.js.map +0 -1
  213. package/dist/plugins/row-selection/plugin.js +0 -118
  214. package/dist/plugins/row-selection/plugin.js.map +0 -1
  215. package/dist/plugins/sticky-columns/helpers.js +0 -49
  216. package/dist/plugins/sticky-columns/helpers.js.map +0 -1
  217. package/dist/plugins/sticky-columns/index.js +0 -3
  218. package/dist/plugins/sticky-columns/index.js.map +0 -1
  219. package/dist/plugins/sticky-columns/plugin.js +0 -139
  220. package/dist/plugins/sticky-columns/plugin.js.map +0 -1
  221. package/dist/test-support/index.js +0 -62
  222. package/dist/test-support/index.js.map +0 -1
  223. package/dist/utils.js +0 -77
  224. package/dist/utils.js.map +0 -1
@@ -1,102 +0,0 @@
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<DataType = unknown>(column: Column<DataType>): void;
98
- toggleAscending<DataType = unknown>(column: Column<DataType>): void;
99
- toggleDescending<DataType = unknown>(column: Column<DataType>): void;
100
- }
101
- export {};
102
- //# sourceMappingURL=plugin.d.ts.map
@@ -1 +0,0 @@
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,QAAQ,GAAG,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,QAAQ,CAAC;IA2BvD,eAAe,CAAC,QAAQ,GAAG,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,QAAQ,CAAC;IAiB5D,gBAAgB,CAAC,QAAQ,GAAG,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,QAAQ,CAAC;CAkB9D"}
@@ -1,23 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,6 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,4 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,5 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,25 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,6 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,5 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,80 +0,0 @@
1
- import { BasePlugin } from '../-private/base.ts';
2
- import type { Row, Table } from '../../index.ts';
3
- import type { PluginSignature, RowApi } from '../../-private/interfaces';
4
- export interface Signature<DataType = any, Key = DataType> extends PluginSignature {
5
- Meta: {
6
- Table: TableMeta;
7
- Row: RowMeta;
8
- };
9
- Options: {
10
- Plugin: {
11
- /**
12
- * A set of selected things using the same type of Identifier
13
- * returned from `key`
14
- */
15
- selection: Set<Key> | Array<Key>;
16
- } & ({
17
- /**
18
- * For a given row's data, how should the key be determined?
19
- * this could be a remote id from a database, or some other attribute
20
- *
21
- * This could be useful for indicating in UI if a particular item is selected.
22
- *
23
- * If not provided, the row's data will be used as the key
24
- */
25
- key: (data: DataType) => Key;
26
- /**
27
- * When a row is clicked, this will be invoked,
28
- * allowing you to update your selection object
29
- */
30
- onSelect: (item: Key, row: Row<DataType>) => void;
31
- /**
32
- * When a row is clicked (and the row is selected), this will be invoked,
33
- * allowing you to update your selection object
34
- */
35
- onDeselect: (item: Key, row: Row<DataType>) => void;
36
- } | {
37
- /**
38
- * When a row is clicked (and the row is not selected), this will be invoked,
39
- * allowing you to update your selection object
40
- */
41
- onSelect: (item: DataType | any, row: Row<DataType>) => void;
42
- /**
43
- * When a row is clicked (and the row is selected), this will be invoked,
44
- * allowing you to update your selection object
45
- */
46
- onDeselect: (item: DataType | any, row: Row<DataType>) => void;
47
- });
48
- };
49
- }
50
- /**
51
- * This plugin provides a means of managing selection of a single row in a table.
52
- *
53
- * The state of what is actually selected is managed by you, but this plugin
54
- * will wire up the click listeners as well as let you know which *data* is clicked.
55
- */
56
- export declare class RowSelection<DataType = any, Key = DataType> extends BasePlugin<Signature<DataType, Key>> {
57
- #private;
58
- name: string;
59
- meta: {
60
- row: typeof RowMeta;
61
- table: typeof TableMeta;
62
- };
63
- constructor(table: Table);
64
- rowModifier: (element: HTMLElement, { row }: RowApi<Table<any>>) => () => void;
65
- }
66
- declare class TableMeta {
67
- #private;
68
- constructor(table: Table);
69
- get selection(): Set<unknown>;
70
- }
71
- declare class RowMeta {
72
- #private;
73
- constructor(row: Row<any>);
74
- get isSelected(): boolean;
75
- toggle: () => void;
76
- select: () => void;
77
- deselect: () => void;
78
- }
79
- export {};
80
- //# sourceMappingURL=plugin.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../src/plugins/row-selection/plugin.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAiB,MAAM,qBAAqB,CAAC;AAEhE,OAAO,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;AAEzE,MAAM,WAAW,SAAS,CAAC,QAAQ,GAAG,GAAG,EAAE,GAAG,GAAG,QAAQ,CACvD,SAAQ,eAAe;IACvB,IAAI,EAAE;QACJ,KAAK,EAAE,SAAS,CAAC;QACjB,GAAG,EAAE,OAAO,CAAC;KACd,CAAC;IACF,OAAO,EAAE;QACP,MAAM,EAAE;YACN;;;eAGG;YACH,SAAS,EAAE,GAAG,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC;SAClC,GAAG,CACA;YACE;;;;;;;eAOG;YACH,GAAG,EAAE,CAAC,IAAI,EAAE,QAAQ,KAAK,GAAG,CAAC;YAC7B;;;eAGG;YACH,QAAQ,EAAE,CAAC,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,QAAQ,CAAC,KAAK,IAAI,CAAC;YAClD;;;eAGG;YACH,UAAU,EAAE,CAAC,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,QAAQ,CAAC,KAAK,IAAI,CAAC;SACrD,GACD;YACE;;;eAGG;YACH,QAAQ,EAAE,CAAC,IAAI,EAAE,QAAQ,GAAG,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,QAAQ,CAAC,KAAK,IAAI,CAAC;YAC7D;;;eAGG;YACH,UAAU,EAAE,CAAC,IAAI,EAAE,QAAQ,GAAG,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,QAAQ,CAAC,KAAK,IAAI,CAAC;SAChE,CACJ,CAAC;KACH,CAAC;CACH;AAED;;;;;GAKG;AACH,qBAAa,YAAY,CAAC,QAAQ,GAAG,GAAG,EAAE,GAAG,GAAG,QAAQ,CAAE,SAAQ,UAAU,CAC1E,SAAS,CAAC,QAAQ,EAAE,GAAG,CAAC,CACzB;;IACC,IAAI,SAAmB;IAEvB,IAAI;;;MAGF;gBAEU,KAAK,EAAE,KAAK;IAcxB,WAAW,GAAI,SAAS,WAAW,EAAE,SAAS,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,gBAU9D;CAiCH;AAED,cAAM,SAAS;;gBAGD,KAAK,EAAE,KAAK;IAIxB,IACI,SAAS,IAAI,GAAG,CAAC,OAAO,CAAC,CAa5B;CACF;AAED,cAAM,OAAO;;gBAGC,GAAG,EAAE,GAAG,CAAC,GAAG,CAAC;IAIzB,IAAI,UAAU,IAAI,OAAO,CAaxB;IAED,MAAM,aAQJ;IAEF,MAAM,aAYJ;IAEF,QAAQ,aAYN;CACH"}
@@ -1,17 +0,0 @@
1
- import { htmlSafe } from '@ember/template';
2
- import type { Column } from '../../index.ts';
3
- export declare const isSticky: <DataType = unknown>(column: Column<DataType>) => boolean;
4
- export declare const styleFor: <DataType = unknown>(column: Column<DataType>) => Partial<CSSStyleDeclaration>;
5
- /**
6
- * In this plugin, both header and cells have the same styles,
7
- * if applicable.
8
- *
9
- * Until this RFC https://github.com/emberjs/rfcs/pull/883
10
- * is merged and implemented, we can't performantly
11
- * use modifiers for apply styles.
12
- *
13
- * In the mean time, we'll need to append style strings, which is more work
14
- * for consumers, but is a reasonable trade-off for now.
15
- */
16
- export declare const styleStringFor: <DataType = unknown>(column: Column<DataType>) => ReturnType<typeof htmlSafe>;
17
- //# sourceMappingURL=helpers.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../src/plugins/sticky-columns/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAK3C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAE7C,eAAO,MAAM,QAAQ,GAAI,QAAQ,GAAG,OAAO,EAAE,QAAQ,MAAM,CAAC,QAAQ,CAAC,YACrB,CAAC;AAEjD,eAAO,MAAM,QAAQ,GAAI,QAAQ,GAAG,OAAO,EACzC,QAAQ,MAAM,CAAC,QAAQ,CAAC,KACvB,OAAO,CAAC,mBAAmB,CAAgD,CAAC;AAE/E;;;;;;;;;;GAUG;AACH,eAAO,MAAM,cAAc,GAAI,QAAQ,GAAG,OAAO,EAC/C,QAAQ,MAAM,CAAC,QAAQ,CAAC,KACvB,UAAU,CAAC,OAAO,QAAQ,CAc5B,CAAC"}
@@ -1,5 +0,0 @@
1
- export * from './helpers.ts';
2
- export { StickyColumns } from './plugin.ts';
3
- export { StickyColumns as Plugin } from './plugin.ts';
4
- export type { Signature } from './plugin.ts';
5
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/sticky-columns/index.ts"],"names":[],"mappings":"AACA,cAAc,cAAc,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,aAAa,IAAI,MAAM,EAAE,MAAM,aAAa,CAAC;AAGtD,YAAY,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC"}
@@ -1,70 +0,0 @@
1
- import { BasePlugin } from '../-private/base.ts';
2
- import type { ColumnApi } from '../../plugins/index.ts';
3
- import type { Column } from '../../index.ts';
4
- interface ColumnOptions {
5
- /**
6
- * Whether or not to enable stickiness on the column
7
- * (default is false)
8
- *
9
- * valid values: 'left', 'right', false
10
- */
11
- sticky?: boolean | string;
12
- }
13
- export interface Signature {
14
- Options: {
15
- Column: ColumnOptions;
16
- Plugin: {
17
- /**
18
- * Opts this plugin out of engaging in the modifier system
19
- * and instead requires setting a `style` attribute on
20
- * th / td tags for getting the "position: sticky" behovior
21
- * on columns.
22
- */
23
- workaroundForModifierTimingUpdateRFC883?: boolean;
24
- };
25
- };
26
- Meta: {
27
- Table: TableMeta;
28
- Column: ColumnMeta;
29
- };
30
- }
31
- export declare class StickyColumns extends BasePlugin<Signature> {
32
- name: string;
33
- /**
34
- * This plugin requires that the resizing plugin be present, because the resizing plugin is
35
- * what manages the base width of the columns.
36
- *
37
- * Other width-management plugins can be used instead of ColumnResizing, but they must declare
38
- * that they manage the width of the columns.
39
- */
40
- static requires: string[];
41
- meta: {
42
- table: typeof TableMeta;
43
- column: typeof ColumnMeta;
44
- };
45
- conditionallyRemoveStyles: (element: HTMLElement) => void;
46
- headerCellModifier: (element: HTMLElement, { column, table }: ColumnApi) => void;
47
- /**
48
- * Not yet supported. Pending Ember RFC #883
49
- *
50
- * TODO: switch ColumnApi to "RowApi", add the row's data
51
- */
52
- cellModifier: (element: HTMLElement, { column, table }: ColumnApi) => void;
53
- }
54
- /**
55
- * @private
56
- *
57
- * Contains state and behaviors for the sticiness
58
- */
59
- export declare class ColumnMeta {
60
- private column;
61
- constructor(column: Column);
62
- get isSticky(): boolean;
63
- get position(): 'left' | 'right' | 'none';
64
- get offset(): string | undefined;
65
- get style(): Partial<Pick<CSSStyleDeclaration, 'position' | 'left' | 'right' | 'zIndex'>>;
66
- }
67
- export declare class TableMeta {
68
- }
69
- export {};
70
- //# sourceMappingURL=plugin.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../src/plugins/sticky-columns/plugin.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAA0B,MAAM,qBAAqB,CAAC;AAGzE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAI7C,UAAU,aAAa;IACrB;;;;;OAKG;IACH,MAAM,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;CAC3B;AAED,MAAM,WAAW,SAAS;IACxB,OAAO,EAAE;QACP,MAAM,EAAE,aAAa,CAAC;QACtB,MAAM,EAAE;YACN;;;;;eAKG;YACH,uCAAuC,CAAC,EAAE,OAAO,CAAC;SACnD,CAAC;KACH,CAAC;IACF,IAAI,EAAE;QACJ,KAAK,EAAE,SAAS,CAAC;QACjB,MAAM,EAAE,UAAU,CAAC;KACpB,CAAC;CACH;AAED,qBAAa,aAAc,SAAQ,UAAU,CAAC,SAAS,CAAC;IACtD,IAAI,SAAoB;IAExB;;;;;;OAMG;IACH,MAAM,CAAC,QAAQ,WAAmB;IAElC,IAAI;;;MAGF;IAEF,yBAAyB,GAAI,SAAS,WAAW,UAgB/C;IAEF,kBAAkB,GAAI,SAAS,WAAW,EAAE,mBAAmB,SAAS,UAetE;IAEF;;;;OAIG;IACH,YAAY,GAAI,SAAS,WAAW,EAAE,mBAAmB,SAAS,UAehE;CACH;AAED;;;;GAIG;AACH,qBAAa,UAAU;IACT,OAAO,CAAC,MAAM;gBAAN,MAAM,EAAE,MAAM;IAElC,IAAI,QAAQ,YAEX;IAED,IAAI,QAAQ,IAAI,MAAM,GAAG,OAAO,GAAG,MAAM,CAYxC;IAED,IACI,MAAM,uBAoCT;IAED,IAAI,KAAK,IAAI,OAAO,CAClB,IAAI,CAAC,mBAAmB,EAAE,UAAU,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAC,CACpE,CAUA;CACF;AAOD,qBAAa,SAAS;CAAG"}
@@ -1,15 +0,0 @@
1
- interface Selectors {
2
- resizeHandle?: string;
3
- scrollContainer?: string;
4
- }
5
- export declare function createHelpers(selectors: Selectors): {
6
- dragLeft: (column: Element, amount: number) => Promise<void>;
7
- dragRight: (column: Element, amount: number) => Promise<void>;
8
- scrollLeft: (distance: number) => Promise<void>;
9
- scrollRight: (distance: number) => Promise<void>;
10
- swipeLeft: (distance: number) => Promise<void>;
11
- swipeRight: (distance: number) => Promise<void>;
12
- };
13
- export declare function requestAnimationFrameSettled(): Promise<void>;
14
- export {};
15
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/test-support/index.ts"],"names":[],"mappings":"AAGA,UAAU,SAAS;IACjB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,wBAAgB,aAAa,CAAC,SAAS,EAAE,SAAS;uBAuD3B,OAAO,UAAU,MAAM;wBACtB,OAAO,UAAU,MAAM;2BATT,MAAM;4BAPL,MAAM;0BAAN,MAAM;2BAOP,MAAM;EAe3C;AAED,wBAAsB,4BAA4B,kBAGjD"}
@@ -1,26 +0,0 @@
1
- import type { Sort, SortsOptions } from './plugins/data-sorting/types.ts';
2
- /**
3
- * @example
4
- *
5
- * ```ts
6
- * deserializeSorts('first_name.asc', { separator: '.', transform: 'camelize' });
7
- * // => [{ property: 'firstName', direction: 'ascending' }]
8
- *
9
- * deserializeSorts('last_name.desc', { separator: '.', transform: 'camelize' });
10
- * // => [{ property: 'lastName', direction: 'descending' }]
11
- * ```
12
- */
13
- export declare const deserializeSorts: (sortString: string, options?: SortsOptions) => Sort[];
14
- /**
15
- * @example
16
- *
17
- * ```ts
18
- * serializeSorts([{ property: 'firstName', direction: 'ascending' }],{ separator: '.', transform: 'camelize' });
19
- * // => 'first_name.asc'
20
- *
21
- * serializeSorts([{ property: 'lastName', direction: 'descending' }],{ separator: '.', transform: 'camelize' });
22
- * // => 'last_name.desc'
23
- * ```
24
- */
25
- export declare function serializeSorts(sorts: Sort[], options?: SortsOptions): string;
26
- //# sourceMappingURL=utils.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAE1E;;;;;;;;;;GAUG;AAEH,eAAO,MAAM,gBAAgB,GAC3B,YAAY,MAAM,EAClB,UAAS,YAAwD,KAChE,IAAI,EA4BN,CAAC;AAEF;;;;;;;;;;GAUG;AACH,wBAAgB,cAAc,CAC5B,KAAK,EAAE,IAAI,EAAE,EACb,OAAO,GAAE,YAA0D,GAClE,MAAM,CAkBR"}
@@ -1,27 +0,0 @@
1
- import { _ as _defineProperty } from '../../_rollupPluginBabelHelpers-CjaRjJZX.js';
2
- import { expectTypeOf } from 'expect-type';
3
- import { BasePlugin } from '../../plugins/-private/base.js';
4
- import '@ember/debug';
5
-
6
- class A extends BasePlugin {
7
- constructor(...args) {
8
- super(...args);
9
- _defineProperty(this, "name", 'a plugin');
10
- }
11
- }
12
- const x = 0;
13
- const a = new A(x);
14
-
15
- ///////////////////////////////////////////////////
16
- // Meta instantiation
17
- ///////////////////////////////////////////////////
18
- if (a.meta?.table) {
19
- expectTypeOf(new a.meta.table()).toEqualTypeOf();
20
- }
21
- if (a.meta?.column) {
22
- expectTypeOf(new a.meta.column()).toEqualTypeOf();
23
- }
24
- if (a.meta?.row) {
25
- expectTypeOf(new a.meta.row()).toEqualTypeOf();
26
- }
27
- //# sourceMappingURL=plugin-properties.test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"plugin-properties.test.js","sources":["../../../src/-private/-type-tests/plugin-properties.test.ts"],"sourcesContent":["import { expectTypeOf } from 'expect-type';\n\nimport { BasePlugin } from '../../plugins/index.ts';\n\nimport type { Table } from '../../index.ts';\n\nclass TableMeta {\n a = 'a';\n}\nclass ColumnMeta {\n b = 'b';\n}\nclass RowMeta {\n c = 'c';\n}\nclass A extends BasePlugin<{\n Meta: { Table: TableMeta; Column: ColumnMeta; Row: RowMeta };\n}> {\n name = 'a plugin';\n}\n\nconst x = 0 as unknown as Table;\nconst a = new A(x);\n\n///////////////////////////////////////////////////\n// Meta instantiation\n///////////////////////////////////////////////////\nif (a.meta?.table) {\n expectTypeOf(new a.meta.table()).toEqualTypeOf<TableMeta>();\n}\n\nif (a.meta?.column) {\n expectTypeOf(new a.meta.column()).toEqualTypeOf<ColumnMeta>();\n}\n\nif (a.meta?.row) {\n expectTypeOf(new a.meta.row()).toEqualTypeOf<RowMeta>();\n}\n"],"names":["A","BasePlugin","constructor","args","_defineProperty","x","a","meta","table","expectTypeOf","toEqualTypeOf","column","row"],"mappings":";;;;;AAeA,MAAMA,CAAC,SAASC,UAAU,CAEvB;AAAAC,EAAAA,WAAAA,CAAA,GAAAC,IAAA,EAAA;AAAA,IAAA,KAAA,CAAA,GAAAA,IAAA,CAAA;AAAAC,IAAAA,eAAA,eACM,UAAU,CAAA;AAAA;AACnB;AAEA,MAAMC,CAAC,GAAG,CAAqB;AAC/B,MAAMC,CAAC,GAAG,IAAIN,CAAC,CAACK,CAAC,CAAC;;AAElB;AACA;AACA;AACA,IAAIC,CAAC,CAACC,IAAI,EAAEC,KAAK,EAAE;AACjBC,EAAAA,YAAY,CAAC,IAAIH,CAAC,CAACC,IAAI,CAACC,KAAK,EAAE,CAAC,CAACE,aAAa,EAAa;AAC7D;AAEA,IAAIJ,CAAC,CAACC,IAAI,EAAEI,MAAM,EAAE;AAClBF,EAAAA,YAAY,CAAC,IAAIH,CAAC,CAACC,IAAI,CAACI,MAAM,EAAE,CAAC,CAACD,aAAa,EAAc;AAC/D;AAEA,IAAIJ,CAAC,CAACC,IAAI,EAAEK,GAAG,EAAE;AACfH,EAAAA,YAAY,CAAC,IAAIH,CAAC,CAACC,IAAI,CAACK,GAAG,EAAE,CAAC,CAACF,aAAa,EAAW;AACzD"}
@@ -1,20 +0,0 @@
1
- import '../../plugins/-private/base.js';
2
- import { Sorting } from '../../plugins/data-sorting/plugin.js';
3
- import { RowSelection } from '../../plugins/row-selection/plugin.js';
4
-
5
- RowSelection.with(() => {
6
- const simpleOptions = {
7
- selection: new Set(),
8
- onSelect: item => console.debug(item),
9
- onDeselect: item => console.debug(item)
10
- };
11
- return simpleOptions;
12
- });
13
- Sorting.with(() => {
14
- const simpleOptions = {
15
- onSort: sorts => console.debug(sorts),
16
- sorts: []
17
- };
18
- return simpleOptions;
19
- });
20
- //# sourceMappingURL=plugin-with.test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"plugin-with.test.js","sources":["../../../src/-private/-type-tests/plugin-with.test.ts"],"sourcesContent":["import { DataSorting } from '../../plugins/data-sorting/index.ts';\nimport { RowSelection } from '../../plugins/row-selection/index.ts';\n\nimport type { SortItem } from '../../plugins/data-sorting';\n\nRowSelection.with(() => {\n const simpleOptions = {\n selection: new Set<number>(),\n onSelect: (item: number) => console.debug(item),\n onDeselect: (item: number) => console.debug(item),\n };\n\n return simpleOptions;\n});\n\nDataSorting.with(() => {\n const simpleOptions = {\n onSort: (sorts: SortItem<number>[]) => console.debug(sorts),\n sorts: [] as unknown as SortItem<number>[],\n };\n\n return simpleOptions;\n});\n"],"names":["RowSelection","with","simpleOptions","selection","Set","onSelect","item","console","debug","onDeselect","DataSorting","onSort","sorts"],"mappings":";;;;AAKAA,YAAY,CAACC,IAAI,CAAC,MAAM;AACtB,EAAA,MAAMC,aAAa,GAAG;AACpBC,IAAAA,SAAS,EAAE,IAAIC,GAAG,EAAU;IAC5BC,QAAQ,EAAGC,IAAY,IAAKC,OAAO,CAACC,KAAK,CAACF,IAAI,CAAC;AAC/CG,IAAAA,UAAU,EAAGH,IAAY,IAAKC,OAAO,CAACC,KAAK,CAACF,IAAI;GACjD;AAED,EAAA,OAAOJ,aAAa;AACtB,CAAC,CAAC;AAEFQ,OAAW,CAACT,IAAI,CAAC,MAAM;AACrB,EAAA,MAAMC,aAAa,GAAG;IACpBS,MAAM,EAAGC,KAAyB,IAAKL,OAAO,CAACC,KAAK,CAACI,KAAK,CAAC;AAC3DA,IAAAA,KAAK,EAAE;GACR;AAED,EAAA,OAAOV,aAAa;AACtB,CAAC,CAAC"}
@@ -1,36 +0,0 @@
1
- import { _ as _defineProperty } from '../../_rollupPluginBabelHelpers-CjaRjJZX.js';
2
- import { options, meta, preferences, BasePlugin } from '../../plugins/-private/base.js';
3
- import '@ember/debug';
4
- import { expectTypeOf } from 'expect-type';
5
- import { Sorting } from '../../plugins/data-sorting/plugin.js';
6
-
7
- // This value is irrelevant for the tests it's used in
8
- const x = 0;
9
- const y = 0;
10
- class SimplePlugin extends BasePlugin {
11
- constructor(...args) {
12
- super(...args);
13
- _defineProperty(this, "name", 'my-test-plugin');
14
- }
15
- }
16
-
17
- // Options
18
- expectTypeOf(options.forTable(x, SimplePlugin)).toEqualTypeOf();
19
- expectTypeOf(options.forColumn(y, SimplePlugin)).toEqualTypeOf();
20
-
21
- // Meta
22
- expectTypeOf(meta.forTable(x, SimplePlugin)).toEqualTypeOf();
23
- expectTypeOf(meta.forColumn(y, SimplePlugin)).toEqualTypeOf();
24
-
25
- // Preferences
26
-
27
- expectTypeOf(preferences.forTable(x, SimplePlugin)).toEqualTypeOf();
28
- expectTypeOf(preferences.forColumn(y, SimplePlugin)).toEqualTypeOf();
29
- // Options
30
- expectTypeOf(options.forTable(x, Sorting)).toEqualTypeOf();
31
- expectTypeOf(options.forColumn(y, Sorting)).toEqualTypeOf();
32
-
33
- // Meta
34
- expectTypeOf(meta.forTable(x, Sorting)).toEqualTypeOf();
35
- expectTypeOf(meta.forColumn(y, Sorting)).toEqualTypeOf();
36
- //# sourceMappingURL=plugins-accessors.test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"plugins-accessors.test.js","sources":["../../../src/-private/-type-tests/plugins-accessors.test.ts"],"sourcesContent":["import { BasePlugin, meta, options, preferences } from '../../plugins/index.ts';\nimport { expectTypeOf } from 'expect-type';\n\nimport type { Column, Table } from '../../index.ts';\n\n// This value is irrelevant for the tests it's used in\nconst x = 0 as unknown as Table<unknown>;\nconst y = 0 as unknown as Column<unknown>;\n\n//////////////////////////////////////////////\n// A SimplePlugin\n//////////////////////////////////////////////\nclass ATableMeta {\n isEnabled = true;\n}\nclass AColumnMeta {\n isPinned = 1;\n}\nclass ARowMeta {\n isARow = true;\n}\ninterface AOptions {\n enabled?: boolean;\n}\ninterface AColumnOptions {\n isPinned?: boolean;\n}\n\ninterface SignatureA {\n Meta: {\n Table: ATableMeta;\n Column: AColumnMeta;\n Row: ARowMeta;\n };\n Options: {\n Plugin: AOptions;\n Column: AColumnOptions;\n };\n}\n\nclass SimplePlugin<Signature = SignatureA> extends BasePlugin<Signature> {\n name = 'my-test-plugin';\n}\n\n// Options\nexpectTypeOf(options.forTable(x, SimplePlugin)).toEqualTypeOf<AOptions>();\nexpectTypeOf(\n options.forColumn(y, SimplePlugin),\n).toEqualTypeOf<AColumnOptions>();\n\n// Meta\nexpectTypeOf(meta.forTable(x, SimplePlugin)).toEqualTypeOf<ATableMeta>();\nexpectTypeOf(meta.forColumn(y, SimplePlugin)).toEqualTypeOf<AColumnMeta>();\n\n// Preferences\ninterface MapLite {\n get(key: string): unknown;\n set(key: string, value: unknown): void | undefined;\n delete(key: string): void | undefined;\n}\nexpectTypeOf(preferences.forTable(x, SimplePlugin)).toEqualTypeOf<MapLite>();\nexpectTypeOf(preferences.forColumn(y, SimplePlugin)).toEqualTypeOf<MapLite>();\n\n//////////////////////////////////////////////\n// A Real plugin\n//////////////////////////////////////////////\n\nimport { DataSorting } from '../../plugins/data-sorting/index.ts';\n\nimport type { Signature as DataSortingSignature } from '../../plugins/data-sorting/index.ts';\n\n// Options\nexpectTypeOf(options.forTable(x, DataSorting)).toEqualTypeOf<\n DataSortingSignature['Options']['Plugin']\n>();\nexpectTypeOf(options.forColumn(y, DataSorting)).toEqualTypeOf<\n DataSortingSignature['Options']['Column']\n>();\n\n// Meta\nexpectTypeOf(meta.forTable(x, DataSorting)).toEqualTypeOf<\n DataSortingSignature['Meta']['Table']\n>();\nexpectTypeOf(meta.forColumn(y, DataSorting)).toEqualTypeOf<\n DataSortingSignature['Meta']['Column']\n>();\n"],"names":["x","y","SimplePlugin","BasePlugin","constructor","args","_defineProperty","expectTypeOf","options","forTable","toEqualTypeOf","forColumn","meta","preferences","DataSorting"],"mappings":";;;;;;AAKA;AACA,MAAMA,CAAC,GAAG,CAA8B;AACxC,MAAMC,CAAC,GAAG,CAA+B;AAiCzC,MAAMC,YAAY,SAAiCC,UAAU,CAAY;AAAAC,EAAAA,WAAAA,CAAA,GAAAC,IAAA,EAAA;AAAA,IAAA,KAAA,CAAA,GAAAA,IAAA,CAAA;AAAAC,IAAAA,eAAA,eAChE,gBAAgB,CAAA;AAAA;AACzB;;AAEA;AACAC,YAAY,CAACC,OAAO,CAACC,QAAQ,CAACT,CAAC,EAAEE,YAAY,CAAC,CAAC,CAACQ,aAAa,EAAY;AACzEH,YAAY,CACVC,OAAO,CAACG,SAAS,CAACV,CAAC,EAAEC,YAAY,CACnC,CAAC,CAACQ,aAAa,EAAkB;;AAEjC;AACAH,YAAY,CAACK,IAAI,CAACH,QAAQ,CAACT,CAAC,EAAEE,YAAY,CAAC,CAAC,CAACQ,aAAa,EAAc;AACxEH,YAAY,CAACK,IAAI,CAACD,SAAS,CAACV,CAAC,EAAEC,YAAY,CAAC,CAAC,CAACQ,aAAa,EAAe;;AAE1E;;AAMAH,YAAY,CAACM,WAAW,CAACJ,QAAQ,CAACT,CAAC,EAAEE,YAAY,CAAC,CAAC,CAACQ,aAAa,EAAW;AAC5EH,YAAY,CAACM,WAAW,CAACF,SAAS,CAACV,CAAC,EAAEC,YAAY,CAAC,CAAC,CAACQ,aAAa,EAAW;AAU7E;AACAH,YAAY,CAACC,OAAO,CAACC,QAAQ,CAACT,CAAC,EAAEc,OAAW,CAAC,CAAC,CAACJ,aAAa,EAEzD;AACHH,YAAY,CAACC,OAAO,CAACG,SAAS,CAACV,CAAC,EAAEa,OAAW,CAAC,CAAC,CAACJ,aAAa,EAE1D;;AAEH;AACAH,YAAY,CAACK,IAAI,CAACH,QAAQ,CAACT,CAAC,EAAEc,OAAW,CAAC,CAAC,CAACJ,aAAa,EAEtD;AACHH,YAAY,CAACK,IAAI,CAACD,SAAS,CAACV,CAAC,EAAEa,OAAW,CAAC,CAAC,CAACJ,aAAa,EAEvD"}
@@ -1,15 +0,0 @@
1
- import { expectTypeOf } from 'expect-type';
2
- import '../../plugins/-private/base.js';
3
- import '@ember/debug';
4
-
5
- // Test the tests
6
- expectTypeOf().toEqualTypeOf();
7
-
8
- // Tests that we can pluck the generic off of BasePlugin
9
- expectTypeOf().toEqualTypeOf();
10
-
11
- // Tests that we can get the generic type off of a sub-type of BasePlugin
12
- expectTypeOf().toEqualTypeOf();
13
- expectTypeOf().toEqualTypeOf();
14
- expectTypeOf().toEqualTypeOf();
15
- //# sourceMappingURL=plugins-signature-from.test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"plugins-signature-from.test.js","sources":["../../../src/-private/-type-tests/plugins-signature-from.test.ts"],"sourcesContent":["import { expectTypeOf } from 'expect-type';\n\nimport { BasePlugin } from '../../plugins/index.ts';\n\nimport type { SignatureFrom } from '../../plugins/-private/base.ts';\n\nclass ATableMeta {\n a = 1;\n}\nclass AColumnMeta {\n ac = 1;\n}\nclass ARowMeta {\n ar = 1;\n}\nclass AOptions {\n ao = 1;\n}\nclass AColumnOptions {\n aco = 1;\n}\n\ninterface SignatureA {\n Meta: {\n Table: ATableMeta;\n Column: AColumnMeta;\n Row: ARowMeta;\n };\n Options: {\n Plugin: AOptions;\n Column: AColumnOptions;\n };\n}\n\nclass PluginA<Signature = SignatureA> extends BasePlugin<Signature> {\n name = 'my-test-plugin';\n}\n\n// Test the tests\nexpectTypeOf<SignatureA>().toEqualTypeOf<SignatureA>();\n\n// Tests that we can pluck the generic off of BasePlugin\nexpectTypeOf<\n SignatureFrom<BasePlugin<SignatureA>>\n>().toEqualTypeOf<SignatureA>();\n\n// Tests that we can get the generic type off of a sub-type of BasePlugin\nexpectTypeOf<SignatureFrom<PluginA>>().toEqualTypeOf<SignatureA>();\n\n// Tests that we can get the generic off of a sub-type passed to BasePlugin\nclass PluginC extends BasePlugin<SignatureA> {\n name = 'plugin-c';\n}\nexpectTypeOf<SignatureFrom<PluginC>>().toEqualTypeOf<SignatureA>();\n\n///////////////////////////////////////////\n\nclass PluginB extends BasePlugin<{ Meta: { Table: ATableMeta } }> {\n name = 'plugin-b';\n}\n\nexpectTypeOf<SignatureFrom<PluginB>>().toEqualTypeOf<{\n Meta: {\n Table: ATableMeta;\n };\n}>();\n"],"names":["expectTypeOf","toEqualTypeOf"],"mappings":";;;;AAsCA;AACAA,YAAY,EAAc,CAACC,aAAa,EAAc;;AAEtD;AACAD,YAAY,EAET,CAACC,aAAa,EAAc;;AAE/B;AACAD,YAAY,EAA0B,CAACC,aAAa,EAAc;AAMlED,YAAY,EAA0B,CAACC,aAAa,EAAc;AAQlED,YAAY,EAA0B,CAACC,aAAa,EAIhD"}