@universal-ember/table 3.5.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.
- package/package.json +1 -1
- package/src/-private/interfaces/table.ts +25 -21
- package/src/-private/table.ts +7 -2
- package/src/plugins/column-reordering/plugin.ts +4 -6
- package/declarations/-private/-type-tests/plugin-properties.test.d.ts +0 -2
- package/declarations/-private/-type-tests/plugin-properties.test.d.ts.map +0 -1
- package/declarations/-private/-type-tests/plugin-with.test.d.ts +0 -2
- package/declarations/-private/-type-tests/plugin-with.test.d.ts.map +0 -1
- package/declarations/-private/-type-tests/plugins-accessors.test.d.ts +0 -2
- package/declarations/-private/-type-tests/plugins-accessors.test.d.ts.map +0 -1
- package/declarations/-private/-type-tests/plugins-signature-from.test.d.ts +0 -2
- package/declarations/-private/-type-tests/plugins-signature-from.test.d.ts.map +0 -1
- package/declarations/-private/-type-tests/plugins-signature-utils.test.d.ts +0 -2
- package/declarations/-private/-type-tests/plugins-signature-utils.test.d.ts.map +0 -1
- package/declarations/-private/-type-tests/table-api.test.d.ts +0 -2
- package/declarations/-private/-type-tests/table-api.test.d.ts.map +0 -1
- package/declarations/-private/-type-tests/table-config.test.d.ts +0 -2
- package/declarations/-private/-type-tests/table-config.test.d.ts.map +0 -1
- package/declarations/-private/column.d.ts +0 -18
- package/declarations/-private/column.d.ts.map +0 -1
- package/declarations/-private/ember-compat.d.ts +0 -8
- package/declarations/-private/ember-compat.d.ts.map +0 -1
- package/declarations/-private/interfaces/column.d.ts +0 -63
- package/declarations/-private/interfaces/column.d.ts.map +0 -1
- package/declarations/-private/interfaces/index.d.ts +0 -8
- package/declarations/-private/interfaces/index.d.ts.map +0 -1
- package/declarations/-private/interfaces/modifier.d.ts +0 -7
- package/declarations/-private/interfaces/modifier.d.ts.map +0 -1
- package/declarations/-private/interfaces/pagination.d.ts +0 -17
- package/declarations/-private/interfaces/pagination.d.ts.map +0 -1
- package/declarations/-private/interfaces/plugins.d.ts +0 -315
- package/declarations/-private/interfaces/plugins.d.ts.map +0 -1
- package/declarations/-private/interfaces/preferences.d.ts +0 -74
- package/declarations/-private/interfaces/preferences.d.ts.map +0 -1
- package/declarations/-private/interfaces/selection.d.ts +0 -36
- package/declarations/-private/interfaces/selection.d.ts.map +0 -1
- package/declarations/-private/interfaces/table.d.ts +0 -122
- package/declarations/-private/interfaces/table.d.ts.map +0 -1
- package/declarations/-private/js-helper.d.ts +0 -39
- package/declarations/-private/js-helper.d.ts.map +0 -1
- package/declarations/-private/preferences.d.ts +0 -47
- package/declarations/-private/preferences.d.ts.map +0 -1
- package/declarations/-private/private-types.d.ts +0 -6
- package/declarations/-private/private-types.d.ts.map +0 -1
- package/declarations/-private/row.d.ts +0 -12
- package/declarations/-private/row.d.ts.map +0 -1
- package/declarations/-private/table.d.ts +0 -136
- package/declarations/-private/table.d.ts.map +0 -1
- package/declarations/-private/utils.d.ts +0 -3
- package/declarations/-private/utils.d.ts.map +0 -1
- package/declarations/index.d.ts +0 -14
- package/declarations/index.d.ts.map +0 -1
- package/declarations/plugins/-private/base.d.ts +0 -281
- package/declarations/plugins/-private/base.d.ts.map +0 -1
- package/declarations/plugins/-private/utils.d.ts +0 -22
- package/declarations/plugins/-private/utils.d.ts.map +0 -1
- package/declarations/plugins/column-reordering/helpers.d.ts +0 -54
- package/declarations/plugins/column-reordering/helpers.d.ts.map +0 -1
- package/declarations/plugins/column-reordering/index.d.ts +0 -5
- package/declarations/plugins/column-reordering/index.d.ts.map +0 -1
- package/declarations/plugins/column-reordering/plugin.d.ts +0 -196
- package/declarations/plugins/column-reordering/plugin.d.ts.map +0 -1
- package/declarations/plugins/column-reordering/utils.d.ts +0 -8
- package/declarations/plugins/column-reordering/utils.d.ts.map +0 -1
- package/declarations/plugins/column-resizing/handle.d.ts +0 -128
- package/declarations/plugins/column-resizing/handle.d.ts.map +0 -1
- package/declarations/plugins/column-resizing/helpers.d.ts +0 -40
- package/declarations/plugins/column-resizing/helpers.d.ts.map +0 -1
- package/declarations/plugins/column-resizing/index.d.ts +0 -6
- package/declarations/plugins/column-resizing/index.d.ts.map +0 -1
- package/declarations/plugins/column-resizing/plugin.d.ts +0 -172
- package/declarations/plugins/column-resizing/plugin.d.ts.map +0 -1
- package/declarations/plugins/column-resizing/resize-observer.d.ts +0 -14
- package/declarations/plugins/column-resizing/resize-observer.d.ts.map +0 -1
- package/declarations/plugins/column-resizing/utils.d.ts +0 -22
- package/declarations/plugins/column-resizing/utils.d.ts.map +0 -1
- package/declarations/plugins/column-visibility/helpers.d.ts +0 -18
- package/declarations/plugins/column-visibility/helpers.d.ts.map +0 -1
- package/declarations/plugins/column-visibility/index.d.ts +0 -5
- package/declarations/plugins/column-visibility/index.d.ts.map +0 -1
- package/declarations/plugins/column-visibility/plugin.d.ts +0 -64
- package/declarations/plugins/column-visibility/plugin.d.ts.map +0 -1
- package/declarations/plugins/data-sorting/helpers.d.ts +0 -38
- package/declarations/plugins/data-sorting/helpers.d.ts.map +0 -1
- package/declarations/plugins/data-sorting/index.d.ts +0 -7
- package/declarations/plugins/data-sorting/index.d.ts.map +0 -1
- package/declarations/plugins/data-sorting/plugin.d.ts +0 -102
- package/declarations/plugins/data-sorting/plugin.d.ts.map +0 -1
- package/declarations/plugins/data-sorting/types.d.ts +0 -23
- package/declarations/plugins/data-sorting/types.d.ts.map +0 -1
- package/declarations/plugins/index.d.ts +0 -6
- package/declarations/plugins/index.d.ts.map +0 -1
- package/declarations/plugins/metadata/helpers.d.ts +0 -4
- package/declarations/plugins/metadata/helpers.d.ts.map +0 -1
- package/declarations/plugins/metadata/index.d.ts +0 -5
- package/declarations/plugins/metadata/index.d.ts.map +0 -1
- package/declarations/plugins/metadata/plugin.d.ts +0 -25
- package/declarations/plugins/metadata/plugin.d.ts.map +0 -1
- package/declarations/plugins/row-selection/helpers.d.ts +0 -6
- package/declarations/plugins/row-selection/helpers.d.ts.map +0 -1
- package/declarations/plugins/row-selection/index.d.ts +0 -5
- package/declarations/plugins/row-selection/index.d.ts.map +0 -1
- package/declarations/plugins/row-selection/plugin.d.ts +0 -80
- package/declarations/plugins/row-selection/plugin.d.ts.map +0 -1
- package/declarations/plugins/sticky-columns/helpers.d.ts +0 -17
- package/declarations/plugins/sticky-columns/helpers.d.ts.map +0 -1
- package/declarations/plugins/sticky-columns/index.d.ts +0 -5
- package/declarations/plugins/sticky-columns/index.d.ts.map +0 -1
- package/declarations/plugins/sticky-columns/plugin.d.ts +0 -70
- package/declarations/plugins/sticky-columns/plugin.d.ts.map +0 -1
- package/declarations/test-support/index.d.ts +0 -15
- package/declarations/test-support/index.d.ts.map +0 -1
- package/declarations/utils.d.ts +0 -26
- package/declarations/utils.d.ts.map +0 -1
- package/dist/-private/-type-tests/plugin-properties.test.js +0 -27
- package/dist/-private/-type-tests/plugin-properties.test.js.map +0 -1
- package/dist/-private/-type-tests/plugin-with.test.js +0 -20
- package/dist/-private/-type-tests/plugin-with.test.js.map +0 -1
- package/dist/-private/-type-tests/plugins-accessors.test.js +0 -36
- package/dist/-private/-type-tests/plugins-accessors.test.js.map +0 -1
- package/dist/-private/-type-tests/plugins-signature-from.test.js +0 -15
- package/dist/-private/-type-tests/plugins-signature-from.test.js.map +0 -1
- package/dist/-private/-type-tests/plugins-signature-utils.test.js +0 -36
- package/dist/-private/-type-tests/plugins-signature-utils.test.js.map +0 -1
- package/dist/-private/-type-tests/table-api.test.js +0 -17
- package/dist/-private/-type-tests/table-api.test.js.map +0 -1
- package/dist/-private/-type-tests/table-config.test.js +0 -55
- package/dist/-private/-type-tests/table-config.test.js.map +0 -1
- package/dist/-private/column.js +0 -62
- package/dist/-private/column.js.map +0 -1
- package/dist/-private/ember-compat.js +0 -17
- package/dist/-private/ember-compat.js.map +0 -1
- package/dist/-private/interfaces/column.js +0 -2
- package/dist/-private/interfaces/column.js.map +0 -1
- package/dist/-private/interfaces/index.js +0 -2
- package/dist/-private/interfaces/index.js.map +0 -1
- package/dist/-private/interfaces/modifier.js +0 -2
- package/dist/-private/interfaces/modifier.js.map +0 -1
- package/dist/-private/interfaces/pagination.js +0 -2
- package/dist/-private/interfaces/pagination.js.map +0 -1
- package/dist/-private/interfaces/plugins.js +0 -2
- package/dist/-private/interfaces/plugins.js.map +0 -1
- package/dist/-private/interfaces/preferences.js +0 -2
- package/dist/-private/interfaces/preferences.js.map +0 -1
- package/dist/-private/interfaces/selection.js +0 -2
- package/dist/-private/interfaces/selection.js.map +0 -1
- package/dist/-private/interfaces/table.js +0 -2
- package/dist/-private/interfaces/table.js.map +0 -1
- package/dist/-private/js-helper.js +0 -55
- package/dist/-private/js-helper.js.map +0 -1
- package/dist/-private/preferences.js +0 -149
- package/dist/-private/preferences.js.map +0 -1
- package/dist/-private/private-types.js +0 -2
- package/dist/-private/private-types.js.map +0 -1
- package/dist/-private/row.js +0 -51
- package/dist/-private/row.js.map +0 -1
- package/dist/-private/table.js +0 -273
- package/dist/-private/table.js.map +0 -1
- package/dist/-private/utils.js +0 -15
- package/dist/-private/utils.js.map +0 -1
- package/dist/_rollupPluginBabelHelpers-CjaRjJZX.js +0 -63
- package/dist/_rollupPluginBabelHelpers-CjaRjJZX.js.map +0 -1
- package/dist/index.js +0 -4
- package/dist/index.js.map +0 -1
- package/dist/plugins/-private/base.js +0 -532
- package/dist/plugins/-private/base.js.map +0 -1
- package/dist/plugins/-private/utils.js +0 -103
- package/dist/plugins/-private/utils.js.map +0 -1
- package/dist/plugins/column-reordering/helpers.js +0 -81
- package/dist/plugins/column-reordering/helpers.js.map +0 -1
- package/dist/plugins/column-reordering/index.js +0 -3
- package/dist/plugins/column-reordering/index.js.map +0 -1
- package/dist/plugins/column-reordering/plugin.js +0 -453
- package/dist/plugins/column-reordering/plugin.js.map +0 -1
- package/dist/plugins/column-reordering/utils.js +0 -34
- package/dist/plugins/column-reordering/utils.js.map +0 -1
- package/dist/plugins/column-resizing/handle.js +0 -243
- package/dist/plugins/column-resizing/handle.js.map +0 -1
- package/dist/plugins/column-resizing/helpers.js +0 -77
- package/dist/plugins/column-resizing/helpers.js.map +0 -1
- package/dist/plugins/column-resizing/index.js +0 -4
- package/dist/plugins/column-resizing/index.js.map +0 -1
- package/dist/plugins/column-resizing/plugin.js +0 -365
- package/dist/plugins/column-resizing/plugin.js.map +0 -1
- package/dist/plugins/column-resizing/resize-observer.js +0 -44
- package/dist/plugins/column-resizing/resize-observer.js.map +0 -1
- package/dist/plugins/column-resizing/utils.js +0 -44
- package/dist/plugins/column-resizing/utils.js.map +0 -1
- package/dist/plugins/column-visibility/helpers.js +0 -25
- package/dist/plugins/column-visibility/helpers.js.map +0 -1
- package/dist/plugins/column-visibility/index.js +0 -3
- package/dist/plugins/column-visibility/index.js.map +0 -1
- package/dist/plugins/column-visibility/plugin.js +0 -92
- package/dist/plugins/column-visibility/plugin.js.map +0 -1
- package/dist/plugins/data-sorting/helpers.js +0 -49
- package/dist/plugins/data-sorting/helpers.js.map +0 -1
- package/dist/plugins/data-sorting/index.js +0 -4
- package/dist/plugins/data-sorting/index.js.map +0 -1
- package/dist/plugins/data-sorting/plugin.js +0 -132
- package/dist/plugins/data-sorting/plugin.js.map +0 -1
- package/dist/plugins/data-sorting/types.js +0 -14
- package/dist/plugins/data-sorting/types.js.map +0 -1
- package/dist/plugins/index.js +0 -3
- package/dist/plugins/index.js.map +0 -1
- package/dist/plugins/metadata/helpers.js +0 -12
- package/dist/plugins/metadata/helpers.js.map +0 -1
- package/dist/plugins/metadata/index.js +0 -3
- package/dist/plugins/metadata/index.js.map +0 -1
- package/dist/plugins/metadata/plugin.js +0 -25
- package/dist/plugins/metadata/plugin.js.map +0 -1
- package/dist/plugins/row-selection/helpers.js +0 -10
- package/dist/plugins/row-selection/helpers.js.map +0 -1
- package/dist/plugins/row-selection/index.js +0 -3
- package/dist/plugins/row-selection/index.js.map +0 -1
- package/dist/plugins/row-selection/plugin.js +0 -118
- package/dist/plugins/row-selection/plugin.js.map +0 -1
- package/dist/plugins/sticky-columns/helpers.js +0 -49
- package/dist/plugins/sticky-columns/helpers.js.map +0 -1
- package/dist/plugins/sticky-columns/index.js +0 -3
- package/dist/plugins/sticky-columns/index.js.map +0 -1
- package/dist/plugins/sticky-columns/plugin.js +0 -139
- package/dist/plugins/sticky-columns/plugin.js.map +0 -1
- package/dist/test-support/index.js +0 -62
- package/dist/test-support/index.js.map +0 -1
- package/dist/utils.js +0 -77
- package/dist/utils.js.map +0 -1
|
@@ -1,532 +0,0 @@
|
|
|
1
|
-
import { _ as _defineProperty } from '../../_rollupPluginBabelHelpers-CjaRjJZX.js';
|
|
2
|
-
import { assert } from '@ember/debug';
|
|
3
|
-
import { TABLE_META_KEY, ROW_META_KEY, COLUMN_META_KEY, TABLE_KEY } from '../../-private/table.js';
|
|
4
|
-
import { normalizePluginsConfig } from './utils.js';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* @public
|
|
8
|
-
*
|
|
9
|
-
* list of interfaces by feature name that consumers may provide alternative
|
|
10
|
-
* implementation for
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* @public
|
|
15
|
-
*
|
|
16
|
-
* list of interfaces by feature name that consumers may provide alternative
|
|
17
|
-
* implementation for
|
|
18
|
-
*/
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* @private utility type
|
|
22
|
-
*
|
|
23
|
-
*/
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* @public
|
|
27
|
-
*
|
|
28
|
-
* If your table plugin is a class, you may extend from BasePlugin, which provides
|
|
29
|
-
* small utility methods and properties for getting the metadata for your plugin
|
|
30
|
-
* for the table and each column
|
|
31
|
-
*
|
|
32
|
-
* One instance of a plugin exists per table
|
|
33
|
-
*/
|
|
34
|
-
class BasePlugin {
|
|
35
|
-
constructor(table) {
|
|
36
|
-
this.table = table;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* @private (secret)
|
|
41
|
-
*
|
|
42
|
-
* Because classes are kind of like interfaces,
|
|
43
|
-
* we need "something" to help TS know what a Resource is.
|
|
44
|
-
*
|
|
45
|
-
* This isn't a real API, but does help with type inference
|
|
46
|
-
* with the SignatureFrom utility above
|
|
47
|
-
*/
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* Helper for specifying plugins on `headlessTable` with the plugin-level options
|
|
51
|
-
*/
|
|
52
|
-
static with(configFn) {
|
|
53
|
-
return [this, configFn];
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* Helper for specifying column-level configurations for a plugin on `headlessTable`'s
|
|
58
|
-
* columns option
|
|
59
|
-
*/
|
|
60
|
-
static forColumn(configFn) {
|
|
61
|
-
return [this, configFn];
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
/**
|
|
66
|
-
* @public
|
|
67
|
-
*
|
|
68
|
-
* returns boolean if the passed table has an instance of the configured passed plugin class.
|
|
69
|
-
* This can be used to help guard against accessing public-specific APIs if those plugins
|
|
70
|
-
* are not configured for a particular table instance
|
|
71
|
-
*/
|
|
72
|
-
_defineProperty(BasePlugin, "features", void 0);
|
|
73
|
-
_defineProperty(BasePlugin, "requires", void 0);
|
|
74
|
-
function hasPlugin(table, klass) {
|
|
75
|
-
return Boolean(table.pluginOf(klass));
|
|
76
|
-
}
|
|
77
|
-
const preferences = {
|
|
78
|
-
/**
|
|
79
|
-
* @public
|
|
80
|
-
*
|
|
81
|
-
* returns an object for getting and setting preferences data
|
|
82
|
-
* based on the column (scoped to key)
|
|
83
|
-
*
|
|
84
|
-
* Only the provided plugin will have access to these preferences
|
|
85
|
-
* (though, if other plugins can guess how the underlying plugin access
|
|
86
|
-
* works, they can access this data, too. No security guaranteed)
|
|
87
|
-
*/
|
|
88
|
-
forColumn(column, klass) {
|
|
89
|
-
return {
|
|
90
|
-
/**
|
|
91
|
-
* delete an entry on the underlying `Map` used for this column-plugin pair
|
|
92
|
-
*/
|
|
93
|
-
delete(key) {
|
|
94
|
-
const prefs = column.table.preferences;
|
|
95
|
-
const pluginPrefs = prefs.storage.getPlugin(klass.name);
|
|
96
|
-
if (!pluginPrefs) return prefs.persist();
|
|
97
|
-
const columnPrefs = pluginPrefs.getColumn(column.key);
|
|
98
|
-
if (!columnPrefs) return prefs.persist();
|
|
99
|
-
columnPrefs.delete(key);
|
|
100
|
-
return prefs.persist();
|
|
101
|
-
},
|
|
102
|
-
/**
|
|
103
|
-
* get an entry on the underlying `Map` used for this column-plugin pair
|
|
104
|
-
*/
|
|
105
|
-
get(key) {
|
|
106
|
-
const prefs = column.table.preferences;
|
|
107
|
-
const pluginPrefs = prefs.storage.getPlugin(klass.name);
|
|
108
|
-
if (!pluginPrefs) return undefined;
|
|
109
|
-
const columnPrefs = pluginPrefs.getColumn(column.key);
|
|
110
|
-
if (!columnPrefs) return undefined;
|
|
111
|
-
return columnPrefs.get(key);
|
|
112
|
-
},
|
|
113
|
-
/**
|
|
114
|
-
* set an entry on the underlying `Map` used for this column-plugin pair
|
|
115
|
-
*/
|
|
116
|
-
set(key, value) {
|
|
117
|
-
const prefs = column.table.preferences;
|
|
118
|
-
const existing = prefs.storage.forPlugin(klass.name);
|
|
119
|
-
const columnPrefs = existing.forColumn(column.key);
|
|
120
|
-
columnPrefs.set(key, value);
|
|
121
|
-
prefs.persist();
|
|
122
|
-
}
|
|
123
|
-
};
|
|
124
|
-
},
|
|
125
|
-
/**
|
|
126
|
-
* @public
|
|
127
|
-
*
|
|
128
|
-
* returns an object for bulk updating preferences data
|
|
129
|
-
* for all columns (scoped to key and table)
|
|
130
|
-
*/
|
|
131
|
-
forAllColumns(table, klass) {
|
|
132
|
-
return {
|
|
133
|
-
/**
|
|
134
|
-
* delete an entry on every column in the underlying column `Map` for this table-plugin pair
|
|
135
|
-
*/
|
|
136
|
-
delete(key) {
|
|
137
|
-
const tablePrefs = table.preferences;
|
|
138
|
-
for (const column of table.columns) {
|
|
139
|
-
const prefs = column.table.preferences;
|
|
140
|
-
const pluginPrefs = prefs.storage.getPlugin(klass.name);
|
|
141
|
-
if (!pluginPrefs) continue;
|
|
142
|
-
const columnPrefs = pluginPrefs.getColumn(column.key);
|
|
143
|
-
if (!columnPrefs) continue;
|
|
144
|
-
columnPrefs.delete(key);
|
|
145
|
-
}
|
|
146
|
-
return tablePrefs.persist();
|
|
147
|
-
}
|
|
148
|
-
};
|
|
149
|
-
},
|
|
150
|
-
/**
|
|
151
|
-
* @public
|
|
152
|
-
*
|
|
153
|
-
* returns an object for getting and setting preferences data
|
|
154
|
-
* based on the table (scoped to the key: "table")
|
|
155
|
-
*
|
|
156
|
-
* Only the provided plugin will have access to these preferences
|
|
157
|
-
* (though, if other plugins can guess how the underlying plugin access
|
|
158
|
-
* works, they can access this data, too. No security guaranteed)
|
|
159
|
-
*/
|
|
160
|
-
forTable(table, klass) {
|
|
161
|
-
return {
|
|
162
|
-
/**
|
|
163
|
-
* delete an entry on the underlying `Map` used for this table-plugin pair
|
|
164
|
-
*/
|
|
165
|
-
delete(key) {
|
|
166
|
-
const prefs = table.preferences;
|
|
167
|
-
const pluginPrefs = prefs.storage.getPlugin(klass.name);
|
|
168
|
-
if (!pluginPrefs) return prefs.persist();
|
|
169
|
-
pluginPrefs.table.delete(key);
|
|
170
|
-
return prefs.persist();
|
|
171
|
-
},
|
|
172
|
-
/**
|
|
173
|
-
* get an entry on the underlying `Map` used for this table-plugin pair
|
|
174
|
-
*/
|
|
175
|
-
get(key) {
|
|
176
|
-
const prefs = table.preferences;
|
|
177
|
-
const pluginPrefs = prefs.storage.getPlugin(klass.name);
|
|
178
|
-
if (!pluginPrefs) return undefined;
|
|
179
|
-
return pluginPrefs.table.get(key);
|
|
180
|
-
},
|
|
181
|
-
/**
|
|
182
|
-
* set an entry on the underlying `Map` used for this table-plugin pair
|
|
183
|
-
*/
|
|
184
|
-
set(key, value) {
|
|
185
|
-
const prefs = table.preferences;
|
|
186
|
-
const existing = prefs.storage.forPlugin(klass.name);
|
|
187
|
-
existing.table.set(key, value);
|
|
188
|
-
return prefs.persist();
|
|
189
|
-
}
|
|
190
|
-
};
|
|
191
|
-
}
|
|
192
|
-
};
|
|
193
|
-
|
|
194
|
-
/**
|
|
195
|
-
* if a `requester` is not provided,
|
|
196
|
-
* Get the columns for the table, considering any and all plugins that could modify columns.
|
|
197
|
-
*
|
|
198
|
-
* If you are an end-consumer of @universal-ember/table, this is the function to use.
|
|
199
|
-
* If you are a plugin-author, you'll want to pass your plugin class as the second parameter.
|
|
200
|
-
*
|
|
201
|
-
* For a given plugin, `requester`, determine what columns should be returned.
|
|
202
|
-
* Since multiple plugins could be used in a table, there is an implicit hierarchy of
|
|
203
|
-
* column modifications that can occur from each of those plugins.
|
|
204
|
-
*
|
|
205
|
-
* If a plugin defines other plugins as either *requirements* or *optional requirements*,
|
|
206
|
-
* and that upstream plugin defines a `columns` property, then those columns will be returned here.
|
|
207
|
-
*
|
|
208
|
-
* This works recursively up the plugin tree up until a plugin has no requirements, and then
|
|
209
|
-
* all columns from the table are returned.
|
|
210
|
-
*/
|
|
211
|
-
function columnsFor(table, requester) {
|
|
212
|
-
assert(`First argument passed to columns.for must be an instance of Table`, table[TABLE_KEY]);
|
|
213
|
-
const visibility = findPlugin(table.plugins, 'columnVisibility');
|
|
214
|
-
const reordering = findPlugin(table.plugins, 'columnOrder');
|
|
215
|
-
const sizing = findPlugin(table.plugins, 'columnResizing');
|
|
216
|
-
|
|
217
|
-
// TODO: actually resolve the graph, rather than use the hardcoded feature names
|
|
218
|
-
// atm, this only "happens" to work based on expectations of
|
|
219
|
-
// of the currently implemented plugins' capabilities and implied hierarchy.
|
|
220
|
-
|
|
221
|
-
if (requester) {
|
|
222
|
-
assert(`[${requester.name}] requested columns from the table, but the plugin, ${requester.name}, ` + `is not used in this table`, table.plugins.some(plugin => plugin instanceof requester));
|
|
223
|
-
if (sizing && sizing.constructor === requester) {
|
|
224
|
-
return table.columns.values();
|
|
225
|
-
}
|
|
226
|
-
if (visibility && visibility.constructor === requester) {
|
|
227
|
-
return table.columns.values();
|
|
228
|
-
}
|
|
229
|
-
if (reordering && reordering.constructor === requester) {
|
|
230
|
-
if (visibility) {
|
|
231
|
-
assert(`<#${visibility.name}> defined a 'columns' property, but did not return valid data.`, visibility.columns && Array.isArray(visibility.columns));
|
|
232
|
-
return visibility.columns;
|
|
233
|
-
}
|
|
234
|
-
return table.columns.values();
|
|
235
|
-
}
|
|
236
|
-
if (reordering) {
|
|
237
|
-
assert(`<#${reordering.name}> defined a 'columns' property, but did not return valid data.`, reordering.columns && Array.isArray(reordering.columns));
|
|
238
|
-
return reordering.columns;
|
|
239
|
-
}
|
|
240
|
-
if (visibility) {
|
|
241
|
-
assert(`<#${visibility.name}> defined a 'columns' property, but did not return valid data.`, visibility.columns && Array.isArray(visibility.columns));
|
|
242
|
-
return visibility.columns;
|
|
243
|
-
}
|
|
244
|
-
if (sizing) {
|
|
245
|
-
assert(`<#${sizing.name}> defined a 'columns' property, but did not return valid data.`, sizing.columns && Array.isArray(sizing.columns));
|
|
246
|
-
return sizing.columns;
|
|
247
|
-
}
|
|
248
|
-
return table.columns.values();
|
|
249
|
-
}
|
|
250
|
-
|
|
251
|
-
/**
|
|
252
|
-
* This flow is the inverse of when we have a requester
|
|
253
|
-
*/
|
|
254
|
-
|
|
255
|
-
if (reordering) {
|
|
256
|
-
assert(`<#${reordering.name}> defined a 'columns' property, but did not return valid data.`, reordering.columns && Array.isArray(reordering.columns));
|
|
257
|
-
return reordering.columns;
|
|
258
|
-
}
|
|
259
|
-
if (visibility) {
|
|
260
|
-
assert(`<#${visibility.name}> defined a 'columns' property, but did not return valid data.`, visibility.columns && Array.isArray(visibility.columns));
|
|
261
|
-
return visibility.columns;
|
|
262
|
-
}
|
|
263
|
-
if (sizing) {
|
|
264
|
-
assert(`<#${sizing.name}> defined a 'columns' property, but did not return valid data.`, sizing.columns && Array.isArray(sizing.columns));
|
|
265
|
-
return sizing.columns;
|
|
266
|
-
}
|
|
267
|
-
return table.columns.values();
|
|
268
|
-
}
|
|
269
|
-
const columns = {
|
|
270
|
-
for: columnsFor,
|
|
271
|
-
/**
|
|
272
|
-
* for a given current or reference column, return the column that
|
|
273
|
-
* is immediately next, or to the right of that column.
|
|
274
|
-
*
|
|
275
|
-
* If a plugin class is provided, the hierarchy of column list modifications
|
|
276
|
-
* will be respected.
|
|
277
|
-
*/
|
|
278
|
-
next: (current, requester) => {
|
|
279
|
-
const columns = requester ? columnsFor(current.table, requester) : columnsFor(current.table);
|
|
280
|
-
const referenceIndex = columns.indexOf(current);
|
|
281
|
-
assert(`index of reference column must be >= 0. column likely not a part of the table`, referenceIndex >= 0);
|
|
282
|
-
|
|
283
|
-
/**
|
|
284
|
-
* There can be nothing after the last column
|
|
285
|
-
*/
|
|
286
|
-
if (referenceIndex >= columns.length - 1) {
|
|
287
|
-
return undefined;
|
|
288
|
-
}
|
|
289
|
-
return columns[referenceIndex + 1];
|
|
290
|
-
},
|
|
291
|
-
/**
|
|
292
|
-
* for a given current or reference column, return the column that
|
|
293
|
-
* is immediately previous, or to the left of that column.
|
|
294
|
-
*
|
|
295
|
-
* If a plugin class is provided, the hierarchy of column list modifications
|
|
296
|
-
* will be respected.
|
|
297
|
-
*/
|
|
298
|
-
previous: (current, requester) => {
|
|
299
|
-
const columns = requester ? columnsFor(current.table, requester) : columnsFor(current.table);
|
|
300
|
-
const referenceIndex = columns.indexOf(current);
|
|
301
|
-
assert(`index of reference column must be >= 0. column likely not a part of the table`, referenceIndex >= 0);
|
|
302
|
-
|
|
303
|
-
/**
|
|
304
|
-
* There can be nothing before the first column
|
|
305
|
-
*/
|
|
306
|
-
if (referenceIndex === 0) {
|
|
307
|
-
return undefined;
|
|
308
|
-
}
|
|
309
|
-
return columns[referenceIndex - 1];
|
|
310
|
-
},
|
|
311
|
-
/**
|
|
312
|
-
* for a given current or reference column, return the columns that
|
|
313
|
-
* should appear before, or to the left of that column.
|
|
314
|
-
*
|
|
315
|
-
* if a plugin class is provided, the hierarchy of column list modifications
|
|
316
|
-
* will be respected.
|
|
317
|
-
*/
|
|
318
|
-
before: (current, requester) => {
|
|
319
|
-
const columns = requester ? columnsFor(current.table, requester) : columnsFor(current.table);
|
|
320
|
-
const referenceIndex = columns.indexOf(current);
|
|
321
|
-
return columns.slice(0, referenceIndex);
|
|
322
|
-
},
|
|
323
|
-
/**
|
|
324
|
-
* for a given current or reference column, return the columns that
|
|
325
|
-
* should appear after, or to the right of that column.
|
|
326
|
-
*
|
|
327
|
-
* if a plugin class is provided, the hierarchy of column list modifications
|
|
328
|
-
* will be respected.
|
|
329
|
-
*/
|
|
330
|
-
after: (current, requester) => {
|
|
331
|
-
const columns = requester ? columnsFor(current.table, requester) : columnsFor(current.table);
|
|
332
|
-
const referenceIndex = columns.indexOf(current);
|
|
333
|
-
return columns.slice(referenceIndex + 1);
|
|
334
|
-
}
|
|
335
|
-
};
|
|
336
|
-
const meta = {
|
|
337
|
-
/**
|
|
338
|
-
* @public
|
|
339
|
-
*
|
|
340
|
-
* For a given column and plugin, return the meta / state bucket for the
|
|
341
|
-
* plugin<->column instance pair.
|
|
342
|
-
*
|
|
343
|
-
* Note that this requires the column instance to exist on the table.
|
|
344
|
-
*/
|
|
345
|
-
forColumn(column, klass) {
|
|
346
|
-
const columnMeta = column.table[COLUMN_META_KEY];
|
|
347
|
-
return getPluginInstance(columnMeta, column, klass, () => {
|
|
348
|
-
const plugin = column.table.pluginOf(klass);
|
|
349
|
-
assert(`[${klass.name}] cannot get plugin instance of unregistered plugin class`, plugin);
|
|
350
|
-
assert(`<#${plugin.name}> plugin does not have meta specified`, plugin.meta);
|
|
351
|
-
assert(`<#${plugin.name}> plugin does not specify column meta`, plugin.meta.column);
|
|
352
|
-
return new plugin.meta.column(column);
|
|
353
|
-
});
|
|
354
|
-
},
|
|
355
|
-
/**
|
|
356
|
-
* @public
|
|
357
|
-
*
|
|
358
|
-
* For a given row and plugin, return the meta / state bucket for the
|
|
359
|
-
* plugin<->row instance pair.
|
|
360
|
-
*
|
|
361
|
-
* Note that this requires the row instance to exist on the table.
|
|
362
|
-
*/
|
|
363
|
-
forRow(row, klass) {
|
|
364
|
-
const rowMeta = row.table[ROW_META_KEY];
|
|
365
|
-
return getPluginInstance(rowMeta, row, klass, () => {
|
|
366
|
-
const plugin = row.table.pluginOf(klass);
|
|
367
|
-
assert(`[${klass.name}] cannot get plugin instance of unregistered plugin class`, plugin);
|
|
368
|
-
assert(`<#${plugin.name}> plugin does not have meta specified`, plugin.meta);
|
|
369
|
-
assert(`<#${plugin.name}> plugin does not specify row meta`, plugin.meta.row);
|
|
370
|
-
return new plugin.meta.row(row);
|
|
371
|
-
});
|
|
372
|
-
},
|
|
373
|
-
/**
|
|
374
|
-
* @public
|
|
375
|
-
*
|
|
376
|
-
* For a given table and plugin, return the meta / state bucket for the
|
|
377
|
-
* plugin<->table instance pair.
|
|
378
|
-
*/
|
|
379
|
-
forTable(table, klass) {
|
|
380
|
-
const tableMeta = table[TABLE_META_KEY];
|
|
381
|
-
return getPluginInstance(tableMeta, klass, () => {
|
|
382
|
-
const plugin = table.pluginOf(klass);
|
|
383
|
-
assert(`[${klass.name}] cannot get plugin instance of unregistered plugin class`, plugin);
|
|
384
|
-
assert(`<#${plugin.name}> plugin does not have meta specified`, plugin.meta);
|
|
385
|
-
assert(`<#${plugin.name}> plugin does not specify table meta`, plugin.meta.table);
|
|
386
|
-
assert(`<#${plugin.name}> plugin already exists for the table. ` + `A plugin may only be instantiated once per table.`, ![...tableMeta.keys()].includes(klass));
|
|
387
|
-
return new plugin.meta.table(table);
|
|
388
|
-
});
|
|
389
|
-
},
|
|
390
|
-
/**
|
|
391
|
-
* Instead of finding meta based on column or table instances,
|
|
392
|
-
* you can search for meta based on feature strings, such as `columnWidth`
|
|
393
|
-
*/
|
|
394
|
-
withFeature: {
|
|
395
|
-
/**
|
|
396
|
-
* @public
|
|
397
|
-
*
|
|
398
|
-
* for a given column and feature name, return the "ColumnMeta" for that feature.
|
|
399
|
-
* This is useful when plugins may depend on one another but may not necessarily care which
|
|
400
|
-
* plugin is providing what behavior.
|
|
401
|
-
*
|
|
402
|
-
* For example, multiple column-focused plugins may care about width or visibility
|
|
403
|
-
*/
|
|
404
|
-
forColumn(column, featureName) {
|
|
405
|
-
const {
|
|
406
|
-
plugins
|
|
407
|
-
} = column.table;
|
|
408
|
-
const provider = findPlugin(plugins, featureName);
|
|
409
|
-
assert(`Could not find plugin with feature: ${featureName}. ` + `Available features: ${availableFeatures(plugins)}`, provider);
|
|
410
|
-
|
|
411
|
-
// TS doesn't believe in the constructor property?
|
|
412
|
-
return meta.forColumn(column, provider.constructor);
|
|
413
|
-
},
|
|
414
|
-
/**
|
|
415
|
-
* @public
|
|
416
|
-
*
|
|
417
|
-
* for a given table and feature name, return the "TableMeta" for that feature.
|
|
418
|
-
* This is useful when plugins may depend on one another but may not necessarily care
|
|
419
|
-
* which plugin is providing that behavior.
|
|
420
|
-
*
|
|
421
|
-
* For example, multiple column-focused plugins may care about width or visibility.
|
|
422
|
-
*/
|
|
423
|
-
forTable(table, featureName) {
|
|
424
|
-
const {
|
|
425
|
-
plugins
|
|
426
|
-
} = table;
|
|
427
|
-
const provider = findPlugin(plugins, featureName);
|
|
428
|
-
assert(`Could not find plugin with feature: ${featureName}. ` + `Available features: ${availableFeatures(plugins)}`, provider);
|
|
429
|
-
|
|
430
|
-
// TS doesn't believe in the constructor property?
|
|
431
|
-
return meta.forTable(table, provider.constructor);
|
|
432
|
-
}
|
|
433
|
-
}
|
|
434
|
-
};
|
|
435
|
-
function findPlugin(plugins, featureName) {
|
|
436
|
-
const provider = plugins.find(plugin => {
|
|
437
|
-
/*
|
|
438
|
-
* have to cast in order to get static properties, but we may not have a base plugin
|
|
439
|
-
* so we must rely on nullish coalesting to protect from throwing exceptions
|
|
440
|
-
*
|
|
441
|
-
* (Plugin || BasePlugin).features)
|
|
442
|
-
*/
|
|
443
|
-
const features = plugin.features || plugin.constructor.features;
|
|
444
|
-
return features?.includes(featureName);
|
|
445
|
-
});
|
|
446
|
-
return provider;
|
|
447
|
-
}
|
|
448
|
-
function availableFeatures(plugins) {
|
|
449
|
-
const allFeatures = plugins.map(plugin => {
|
|
450
|
-
/*
|
|
451
|
-
* have to cast in order to get static properties, but we may not have a base plugin
|
|
452
|
-
* so we must rely on nullish coalesting to protect from throwing exceptions
|
|
453
|
-
*
|
|
454
|
-
* (Plugin || BasePlugin).features)
|
|
455
|
-
*/
|
|
456
|
-
const features = plugin.features || plugin.constructor.features;
|
|
457
|
-
return features;
|
|
458
|
-
}).flat().filter(Boolean);
|
|
459
|
-
return allFeatures.length > 0 ? allFeatures.join(', ') : '[none]';
|
|
460
|
-
}
|
|
461
|
-
const options = {
|
|
462
|
-
/**
|
|
463
|
-
* @public
|
|
464
|
-
*
|
|
465
|
-
* For a given table and plugin, return the options, if any were given from the user
|
|
466
|
-
* during construction of the table.
|
|
467
|
-
*/
|
|
468
|
-
forTable(table, klass) {
|
|
469
|
-
const normalized = normalizePluginsConfig(table?.config?.plugins);
|
|
470
|
-
const tuple = normalized?.find(option => option[0] === klass);
|
|
471
|
-
const t = tuple;
|
|
472
|
-
|
|
473
|
-
// Plugin not provided, likely
|
|
474
|
-
if (!t) return {};
|
|
475
|
-
const fn = t[1];
|
|
476
|
-
return fn() ?? {};
|
|
477
|
-
},
|
|
478
|
-
forColumn(column, klass) {
|
|
479
|
-
const tuple = column.config.pluginOptions?.find(option => option[0] === klass);
|
|
480
|
-
const t = tuple;
|
|
481
|
-
const fn = t?.[1];
|
|
482
|
-
if (!fn) return {};
|
|
483
|
-
return fn() ?? {};
|
|
484
|
-
}
|
|
485
|
-
};
|
|
486
|
-
|
|
487
|
-
/**
|
|
488
|
-
* @private
|
|
489
|
-
*/
|
|
490
|
-
|
|
491
|
-
function getPluginInstance(...args) {
|
|
492
|
-
let map;
|
|
493
|
-
let mapKey;
|
|
494
|
-
let rootKey;
|
|
495
|
-
let factory;
|
|
496
|
-
if (args.length === 3) {
|
|
497
|
-
map = args[0];
|
|
498
|
-
mapKey = args[1];
|
|
499
|
-
factory = args[2];
|
|
500
|
-
} else if (args.length === 4) {
|
|
501
|
-
map = args[0];
|
|
502
|
-
rootKey = args[1];
|
|
503
|
-
mapKey = args[2];
|
|
504
|
-
factory = args[3];
|
|
505
|
-
} else {
|
|
506
|
-
throw new Error(
|
|
507
|
-
// TS says args is of type "never", but TS can't protect against general misuse
|
|
508
|
-
// (esp without TS)
|
|
509
|
-
`Incorrect arity passed to getPluginInstance. Expected 3 or 4, received ${args.length}`);
|
|
510
|
-
}
|
|
511
|
-
let bucket;
|
|
512
|
-
if (map instanceof WeakMap) {
|
|
513
|
-
assert(`rootKey is missing`, rootKey);
|
|
514
|
-
bucket = map.get(rootKey);
|
|
515
|
-
if (!bucket) {
|
|
516
|
-
bucket = new Map();
|
|
517
|
-
map.set(rootKey, bucket);
|
|
518
|
-
}
|
|
519
|
-
} else {
|
|
520
|
-
bucket = map;
|
|
521
|
-
}
|
|
522
|
-
let instance = bucket.get(mapKey);
|
|
523
|
-
if (instance) {
|
|
524
|
-
return instance;
|
|
525
|
-
}
|
|
526
|
-
instance = factory();
|
|
527
|
-
bucket.set(mapKey, instance);
|
|
528
|
-
return instance;
|
|
529
|
-
}
|
|
530
|
-
|
|
531
|
-
export { BasePlugin, columns, hasPlugin, meta, options, preferences };
|
|
532
|
-
//# sourceMappingURL=base.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"base.js","sources":["../../../src/plugins/-private/base.ts"],"sourcesContent":["import { assert } from '@ember/debug';\n\nimport {\n COLUMN_META_KEY,\n ROW_META_KEY,\n TABLE_KEY,\n TABLE_META_KEY,\n} from '../../-private/table.ts';\nimport { normalizePluginsConfig } from './utils.ts';\n\nimport type { Table } from '../../-private/table.ts';\nimport type { ColumnReordering } from '../column-reordering';\nimport type { ColumnVisibility } from '../column-visibility';\nimport type { Class, Constructor } from '../../-private/private-types.ts';\nimport type { Column, Row } from '../../index.ts';\nimport type {\n ColumnMetaFor,\n ColumnOptionsFor,\n OptionsFor,\n Plugin,\n RowMetaFor,\n TableMetaFor,\n} from '../../-private/interfaces';\n\ntype InstanceOf<T> = T extends Class<infer Instance> ? Instance : T;\n\n/**\n * @public\n *\n * list of interfaces by feature name that consumers may provide alternative\n * implementation for\n */\nexport interface TableFeatures extends Record<string, unknown | undefined> {\n /**\n * @public\n *\n * interface for the table meta of a \"column visibility plugin\"\n */\n columnVisibility: InstanceOf<ColumnVisibility['meta']['table']>;\n /**\n * @public\n *\n * interface for the table meta of a \"column order plugin\"\n */\n columnOrder: InstanceOf<ColumnReordering['meta']['table']>;\n}\n\n/**\n * @public\n *\n * list of interfaces by feature name that consumers may provide alternative\n * implementation for\n */\nexport interface ColumnFeatures extends Record<string, unknown | undefined> {\n /**\n * @public\n *\n * interface for the column meta of a \"column visibility plugin\"\n */\n columnVisibility: InstanceOf<ColumnVisibility['meta']['column']>;\n /**\n * @public\n *\n * interface for the column meta of a \"column order plugin\"\n */\n columnOrder: InstanceOf<ColumnReordering['meta']['column']>;\n}\n\n/**\n * @private utility type\n *\n */\nexport type SignatureFrom<Klass extends BasePlugin<any>> =\n Klass extends BasePlugin<infer Signature> ? Signature : never;\n\ndeclare const __Signature__: unique symbol;\n\n/**\n * @public\n *\n * If your table plugin is a class, you may extend from BasePlugin, which provides\n * small utility methods and properties for getting the metadata for your plugin\n * for the table and each column\n *\n * One instance of a plugin exists per table\n */\nexport abstract class BasePlugin<Signature = unknown>\n implements Plugin<Signature>\n{\n constructor(protected table: Table) {}\n\n /**\n * @private (secret)\n *\n * Because classes are kind of like interfaces,\n * we need \"something\" to help TS know what a Resource is.\n *\n * This isn't a real API, but does help with type inference\n * with the SignatureFrom utility above\n */\n declare [__Signature__]: Signature;\n\n /**\n * Helper for specifying plugins on `headlessTable` with the plugin-level options\n */\n static with<T extends BasePlugin<any>>(\n this: Constructor<T>,\n configFn: () => OptionsFor<SignatureFrom<T>>,\n ): [Constructor<T>, () => OptionsFor<SignatureFrom<T>>] {\n return [this, configFn];\n }\n\n /**\n * Helper for specifying column-level configurations for a plugin on `headlessTable`'s\n * columns option\n */\n static forColumn<T extends BasePlugin<any>>(\n this: Constructor<T>,\n configFn: () => ColumnOptionsFor<SignatureFrom<T>>,\n ): [Constructor<T>, () => ColumnOptionsFor<SignatureFrom<T>>] {\n return [this, configFn];\n }\n\n declare meta?: {\n column?: Constructor<ColumnMetaFor<Signature>>;\n table?: Constructor<TableMetaFor<Signature>>;\n row?: Constructor<RowMetaFor<Signature>>;\n };\n\n abstract name: string;\n static features?: string[];\n static requires?: string[];\n}\n\n/**\n * @public\n *\n * returns boolean if the passed table has an instance of the configured passed plugin class.\n * This can be used to help guard against accessing public-specific APIs if those plugins\n * are not configured for a particular table instance\n */\nexport function hasPlugin<P extends BasePlugin<any>, Data = unknown>(\n table: Table<Data>,\n klass: Class<P>,\n) {\n return Boolean(table.pluginOf(klass));\n}\n\nexport const preferences = {\n /**\n * @public\n *\n * returns an object for getting and setting preferences data\n * based on the column (scoped to key)\n *\n * Only the provided plugin will have access to these preferences\n * (though, if other plugins can guess how the underlying plugin access\n * works, they can access this data, too. No security guaranteed)\n */\n forColumn<P extends BasePlugin<any>, Data = unknown>(\n column: Column<Data>,\n klass: Class<P>,\n ) {\n return {\n /**\n * delete an entry on the underlying `Map` used for this column-plugin pair\n */\n delete(key: string) {\n const prefs = column.table.preferences;\n const pluginPrefs = prefs.storage.getPlugin(klass.name);\n if (!pluginPrefs) return prefs.persist();\n const columnPrefs = pluginPrefs.getColumn(column.key);\n if (!columnPrefs) return prefs.persist();\n\n columnPrefs.delete(key);\n\n return prefs.persist();\n },\n /**\n * get an entry on the underlying `Map` used for this column-plugin pair\n */\n get(key: string) {\n const prefs = column.table.preferences;\n const pluginPrefs = prefs.storage.getPlugin(klass.name);\n if (!pluginPrefs) return undefined;\n const columnPrefs = pluginPrefs.getColumn(column.key);\n if (!columnPrefs) return undefined;\n return columnPrefs.get(key);\n },\n /**\n * set an entry on the underlying `Map` used for this column-plugin pair\n */\n set(key: string, value: unknown) {\n const prefs = column.table.preferences;\n const existing = prefs.storage.forPlugin(klass.name);\n const columnPrefs = existing.forColumn(column.key);\n\n columnPrefs.set(key, value);\n\n prefs.persist();\n },\n };\n },\n\n /**\n * @public\n *\n * returns an object for bulk updating preferences data\n * for all columns (scoped to key and table)\n */\n forAllColumns<P extends BasePlugin<any>, Data = unknown>(\n table: Table<Data>,\n klass: Class<P>,\n ) {\n return {\n /**\n * delete an entry on every column in the underlying column `Map` for this table-plugin pair\n */\n delete(key: string) {\n const tablePrefs = table.preferences;\n\n for (const column of table.columns) {\n const prefs = column.table.preferences;\n const pluginPrefs = prefs.storage.getPlugin(klass.name);\n if (!pluginPrefs) continue;\n const columnPrefs = pluginPrefs.getColumn(column.key);\n if (!columnPrefs) continue;\n\n columnPrefs.delete(key);\n }\n\n return tablePrefs.persist();\n },\n };\n },\n\n /**\n * @public\n *\n * returns an object for getting and setting preferences data\n * based on the table (scoped to the key: \"table\")\n *\n * Only the provided plugin will have access to these preferences\n * (though, if other plugins can guess how the underlying plugin access\n * works, they can access this data, too. No security guaranteed)\n */\n forTable<P extends BasePlugin<any>, Data = unknown>(\n table: Table<Data>,\n klass: Class<P>,\n ) {\n return {\n /**\n * delete an entry on the underlying `Map` used for this table-plugin pair\n */\n delete(key: string) {\n const prefs = table.preferences;\n const pluginPrefs = prefs.storage.getPlugin(klass.name);\n if (!pluginPrefs) return prefs.persist();\n\n pluginPrefs.table.delete(key);\n\n return prefs.persist();\n },\n /**\n * get an entry on the underlying `Map` used for this table-plugin pair\n */\n get(key: string) {\n const prefs = table.preferences;\n const pluginPrefs = prefs.storage.getPlugin(klass.name);\n if (!pluginPrefs) return undefined;\n return pluginPrefs.table.get(key);\n },\n /**\n * set an entry on the underlying `Map` used for this table-plugin pair\n */\n set(key: string, value: unknown) {\n const prefs = table.preferences;\n const existing = prefs.storage.forPlugin(klass.name);\n\n existing.table.set(key, value);\n\n return prefs.persist();\n },\n };\n },\n};\n\n/**\n * if a `requester` is not provided,\n * Get the columns for the table, considering any and all plugins that could modify columns.\n *\n * If you are an end-consumer of @universal-ember/table, this is the function to use.\n * If you are a plugin-author, you'll want to pass your plugin class as the second parameter.\n *\n * For a given plugin, `requester`, determine what columns should be returned.\n * Since multiple plugins could be used in a table, there is an implicit hierarchy of\n * column modifications that can occur from each of those plugins.\n *\n * If a plugin defines other plugins as either *requirements* or *optional requirements*,\n * and that upstream plugin defines a `columns` property, then those columns will be returned here.\n *\n * This works recursively up the plugin tree up until a plugin has no requirements, and then\n * all columns from the table are returned.\n */\nfunction columnsFor<DataType = any>(\n table: Table<DataType>,\n requester?: Plugin<any>,\n): Column<DataType>[] {\n assert(\n `First argument passed to columns.for must be an instance of Table`,\n table[TABLE_KEY],\n );\n\n const visibility = findPlugin(table.plugins, 'columnVisibility');\n const reordering = findPlugin(table.plugins, 'columnOrder');\n const sizing = findPlugin(table.plugins, 'columnResizing');\n\n // TODO: actually resolve the graph, rather than use the hardcoded feature names\n // atm, this only \"happens\" to work based on expectations of\n // of the currently implemented plugins' capabilities and implied hierarchy.\n\n if (requester) {\n assert(\n `[${requester.name}] requested columns from the table, but the plugin, ${requester.name}, ` +\n `is not used in this table`,\n table.plugins.some(\n (plugin) => plugin instanceof (requester as Class<Plugin>),\n ),\n );\n\n if (sizing && sizing.constructor === requester) {\n return table.columns.values();\n }\n\n if (visibility && visibility.constructor === requester) {\n return table.columns.values();\n }\n\n if (reordering && reordering.constructor === requester) {\n if (visibility) {\n assert(\n `<#${visibility.name}> defined a 'columns' property, but did not return valid data.`,\n visibility.columns && Array.isArray(visibility.columns),\n );\n\n return visibility.columns;\n }\n\n return table.columns.values();\n }\n\n if (reordering) {\n assert(\n `<#${reordering.name}> defined a 'columns' property, but did not return valid data.`,\n reordering.columns && Array.isArray(reordering.columns),\n );\n\n return reordering.columns;\n }\n\n if (visibility) {\n assert(\n `<#${visibility.name}> defined a 'columns' property, but did not return valid data.`,\n visibility.columns && Array.isArray(visibility.columns),\n );\n\n return visibility.columns;\n }\n\n if (sizing) {\n assert(\n `<#${sizing.name}> defined a 'columns' property, but did not return valid data.`,\n sizing.columns && Array.isArray(sizing.columns),\n );\n\n return sizing.columns;\n }\n\n return table.columns.values();\n }\n\n /**\n * This flow is the inverse of when we have a requester\n */\n\n if (reordering) {\n assert(\n `<#${reordering.name}> defined a 'columns' property, but did not return valid data.`,\n reordering.columns && Array.isArray(reordering.columns),\n );\n\n return reordering.columns;\n }\n\n if (visibility) {\n assert(\n `<#${visibility.name}> defined a 'columns' property, but did not return valid data.`,\n visibility.columns && Array.isArray(visibility.columns),\n );\n\n return visibility.columns;\n }\n\n if (sizing) {\n assert(\n `<#${sizing.name}> defined a 'columns' property, but did not return valid data.`,\n sizing.columns && Array.isArray(sizing.columns),\n );\n\n return sizing.columns;\n }\n\n return table.columns.values();\n}\n\nexport const columns = {\n for: columnsFor,\n\n /**\n * for a given current or reference column, return the column that\n * is immediately next, or to the right of that column.\n *\n * If a plugin class is provided, the hierarchy of column list modifications\n * will be respected.\n */\n next: <Data = unknown>(\n current: Column<Data>,\n requester?: Plugin<any>,\n ): Column<Data> | undefined => {\n const columns = requester\n ? columnsFor(current.table, requester)\n : columnsFor(current.table);\n\n const referenceIndex = columns.indexOf(current);\n\n assert(\n `index of reference column must be >= 0. column likely not a part of the table`,\n referenceIndex >= 0,\n );\n\n /**\n * There can be nothing after the last column\n */\n if (referenceIndex >= columns.length - 1) {\n return undefined;\n }\n\n return columns[referenceIndex + 1];\n },\n\n /**\n * for a given current or reference column, return the column that\n * is immediately previous, or to the left of that column.\n *\n * If a plugin class is provided, the hierarchy of column list modifications\n * will be respected.\n */\n previous: <Data = unknown>(\n current: Column<Data>,\n requester?: Plugin<any>,\n ): Column<Data> | undefined => {\n const columns = requester\n ? columnsFor(current.table, requester)\n : columnsFor(current.table);\n const referenceIndex = columns.indexOf(current);\n\n assert(\n `index of reference column must be >= 0. column likely not a part of the table`,\n referenceIndex >= 0,\n );\n\n /**\n * There can be nothing before the first column\n */\n if (referenceIndex === 0) {\n return undefined;\n }\n\n return columns[referenceIndex - 1];\n },\n /**\n * for a given current or reference column, return the columns that\n * should appear before, or to the left of that column.\n *\n * if a plugin class is provided, the hierarchy of column list modifications\n * will be respected.\n */\n before: <Data = unknown>(\n current: Column<Data>,\n requester?: Plugin<any>,\n ): Column<Data>[] => {\n const columns = requester\n ? columnsFor(current.table, requester)\n : columnsFor(current.table);\n\n const referenceIndex = columns.indexOf(current);\n\n return columns.slice(0, referenceIndex);\n },\n /**\n * for a given current or reference column, return the columns that\n * should appear after, or to the right of that column.\n *\n * if a plugin class is provided, the hierarchy of column list modifications\n * will be respected.\n */\n after: <Data = unknown>(\n current: Column<Data>,\n requester?: Plugin<any>,\n ): Column<Data>[] => {\n const columns = requester\n ? columnsFor(current.table, requester)\n : columnsFor(current.table);\n\n const referenceIndex = columns.indexOf(current);\n\n return columns.slice(referenceIndex + 1);\n },\n};\n\nexport const meta = {\n /**\n * @public\n *\n * For a given column and plugin, return the meta / state bucket for the\n * plugin<->column instance pair.\n *\n * Note that this requires the column instance to exist on the table.\n */\n forColumn<P extends BasePlugin<any>, Data = unknown>(\n column: Column<Data>,\n klass: Class<P>,\n ): ColumnMetaFor<SignatureFrom<P>> {\n const columnMeta = column.table[COLUMN_META_KEY];\n\n return getPluginInstance(columnMeta, column, klass, () => {\n const plugin = column.table.pluginOf(klass);\n\n assert(\n `[${klass.name}] cannot get plugin instance of unregistered plugin class`,\n plugin,\n );\n assert(\n `<#${plugin.name}> plugin does not have meta specified`,\n plugin.meta,\n );\n assert(\n `<#${plugin.name}> plugin does not specify column meta`,\n plugin.meta.column,\n );\n\n return new plugin.meta.column(column);\n });\n },\n\n /**\n * @public\n *\n * For a given row and plugin, return the meta / state bucket for the\n * plugin<->row instance pair.\n *\n * Note that this requires the row instance to exist on the table.\n */\n forRow<P extends BasePlugin<any>, Data = unknown>(\n row: Row<Data>,\n klass: Class<P>,\n ): RowMetaFor<SignatureFrom<P>> {\n const rowMeta = row.table[ROW_META_KEY];\n\n return getPluginInstance(rowMeta, row, klass, () => {\n const plugin = row.table.pluginOf(klass);\n\n assert(\n `[${klass.name}] cannot get plugin instance of unregistered plugin class`,\n plugin,\n );\n assert(\n `<#${plugin.name}> plugin does not have meta specified`,\n plugin.meta,\n );\n assert(\n `<#${plugin.name}> plugin does not specify row meta`,\n plugin.meta.row,\n );\n\n return new plugin.meta.row(row);\n });\n },\n\n /**\n * @public\n *\n * For a given table and plugin, return the meta / state bucket for the\n * plugin<->table instance pair.\n */\n forTable<P extends BasePlugin<any>, Data = unknown>(\n table: Table<Data>,\n klass: Class<P>,\n ): TableMetaFor<SignatureFrom<P>> {\n const tableMeta = table[TABLE_META_KEY];\n\n return getPluginInstance(tableMeta, klass, () => {\n const plugin = table.pluginOf(klass);\n\n assert(\n `[${klass.name}] cannot get plugin instance of unregistered plugin class`,\n plugin,\n );\n assert(\n `<#${plugin.name}> plugin does not have meta specified`,\n plugin.meta,\n );\n assert(\n `<#${plugin.name}> plugin does not specify table meta`,\n plugin.meta.table,\n );\n assert(\n `<#${plugin.name}> plugin already exists for the table. ` +\n `A plugin may only be instantiated once per table.`,\n ![...tableMeta.keys()].includes(klass),\n );\n\n return new plugin.meta.table(table);\n });\n },\n\n /**\n * Instead of finding meta based on column or table instances,\n * you can search for meta based on feature strings, such as `columnWidth`\n */\n withFeature: {\n /**\n * @public\n *\n * for a given column and feature name, return the \"ColumnMeta\" for that feature.\n * This is useful when plugins may depend on one another but may not necessarily care which\n * plugin is providing what behavior.\n *\n * For example, multiple column-focused plugins may care about width or visibility\n */\n forColumn<FeatureName extends string, Data = unknown>(\n column: Column<Data>,\n featureName: FeatureName,\n ): ColumnFeatures[FeatureName] {\n const { plugins } = column.table;\n\n const provider = findPlugin(plugins, featureName);\n\n assert(\n `Could not find plugin with feature: ${featureName}. ` +\n `Available features: ${availableFeatures(plugins)}`,\n provider,\n );\n\n // TS doesn't believe in the constructor property?\n return meta.forColumn(column, (provider as any).constructor);\n },\n\n /**\n * @public\n *\n * for a given table and feature name, return the \"TableMeta\" for that feature.\n * This is useful when plugins may depend on one another but may not necessarily care\n * which plugin is providing that behavior.\n *\n * For example, multiple column-focused plugins may care about width or visibility.\n */\n forTable<FeatureName extends string, Data = unknown>(\n table: Table<Data>,\n featureName: FeatureName,\n ): TableFeatures[FeatureName] {\n const { plugins } = table;\n\n const provider = findPlugin(plugins, featureName);\n\n assert(\n `Could not find plugin with feature: ${featureName}. ` +\n `Available features: ${availableFeatures(plugins)}`,\n provider,\n );\n\n // TS doesn't believe in the constructor property?\n return meta.forTable(table, (provider as any).constructor);\n },\n },\n};\n\nfunction findPlugin(plugins: Plugin[], featureName: string) {\n const provider = plugins.find((plugin) => {\n /*\n * have to cast in order to get static properties, but we may not have a base plugin\n * so we must rely on nullish coalesting to protect from throwing exceptions\n *\n * (Plugin || BasePlugin).features)\n */\n const features =\n plugin.features || (plugin.constructor as typeof BasePlugin).features;\n\n return features?.includes(featureName);\n });\n\n return provider;\n}\n\nfunction availableFeatures(plugins: Plugin[]): string {\n const allFeatures = plugins\n .map((plugin) => {\n /*\n * have to cast in order to get static properties, but we may not have a base plugin\n * so we must rely on nullish coalesting to protect from throwing exceptions\n *\n * (Plugin || BasePlugin).features)\n */\n const features =\n plugin.features || (plugin.constructor as typeof BasePlugin).features;\n\n return features;\n })\n .flat()\n .filter(Boolean);\n\n return allFeatures.length > 0 ? allFeatures.join(', ') : '[none]';\n}\n\nexport const options = {\n /**\n * @public\n *\n * For a given table and plugin, return the options, if any were given from the user\n * during construction of the table.\n */\n forTable<P extends BasePlugin<any>, Data = unknown>(\n table: Table<Data>,\n klass: Class<P>,\n ): Partial<OptionsFor<SignatureFrom<P>>> {\n const normalized = normalizePluginsConfig(table?.config?.plugins);\n const tuple = normalized?.find((option) => option[0] === klass);\n const t = tuple as [Class<P>, () => OptionsFor<SignatureFrom<P>>];\n\n // Plugin not provided, likely\n if (!t) return {};\n\n const fn = t[1];\n\n return fn() ?? {};\n },\n\n forColumn<P extends BasePlugin<any>, Data = unknown>(\n column: Column<Data>,\n klass: Class<P>,\n ): Partial<ColumnOptionsFor<SignatureFrom<P>>> {\n const tuple = column.config.pluginOptions?.find(\n (option) => option[0] === klass,\n );\n const t = tuple as [unknown, () => ColumnOptionsFor<SignatureFrom<P>>];\n\n const fn = t?.[1];\n\n if (!fn) return {};\n\n return fn() ?? {};\n },\n};\n\ntype FactoryMap<Instance> = Map<Class<Instance>, Instance>;\n\n/**\n * @private\n */\nfunction getPluginInstance<Instance>(\n map: Map<Class<Instance>, Instance>,\n mapKey: Class<Instance>,\n factory: () => Instance,\n): Instance;\nfunction getPluginInstance<RootKey extends Column<any> | Row<any>, Instance>(\n map: WeakMap<Column | Row, Map<Class<Instance>, Instance>>,\n rootKey: RootKey,\n mapKey: Class<Instance>,\n factory: () => Instance,\n): Instance;\nfunction getPluginInstance<RootKey extends Column<any> | Row<any>, Instance>(\n ...args:\n | [FactoryMap<Instance>, Class<Instance>, () => Instance]\n | [\n WeakMap<Column | Row, FactoryMap<Instance>>,\n RootKey,\n Class<Instance>,\n () => Instance,\n ]\n): Instance {\n let map: WeakMap<Column | Row, FactoryMap<Instance>> | FactoryMap<Instance>;\n let mapKey: Class<Instance>;\n let rootKey: RootKey | undefined;\n let factory: () => Instance;\n\n if (args.length === 3) {\n map = args[0];\n mapKey = args[1];\n factory = args[2];\n } else if (args.length === 4) {\n map = args[0];\n rootKey = args[1];\n mapKey = args[2];\n factory = args[3];\n } else {\n throw new Error(\n // TS says args is of type \"never\", but TS can't protect against general misuse\n // (esp without TS)\n `Incorrect arity passed to getPluginInstance. Expected 3 or 4, received ${\n (args as any).length\n }`,\n );\n }\n\n let bucket: FactoryMap<Instance> | undefined;\n\n if (map instanceof WeakMap) {\n assert(`rootKey is missing`, rootKey);\n\n bucket = map.get(rootKey);\n\n if (!bucket) {\n bucket = new Map();\n\n map.set(rootKey, bucket);\n }\n } else {\n bucket = map;\n }\n\n let instance = bucket.get(mapKey);\n\n if (instance) {\n return instance;\n }\n\n instance = factory();\n\n bucket.set(mapKey, instance);\n\n return instance;\n}\n"],"names":["BasePlugin","constructor","table","with","configFn","forColumn","_defineProperty","hasPlugin","klass","Boolean","pluginOf","preferences","column","delete","key","prefs","pluginPrefs","storage","getPlugin","name","persist","columnPrefs","getColumn","get","undefined","set","value","existing","forPlugin","forAllColumns","tablePrefs","columns","forTable","columnsFor","requester","assert","TABLE_KEY","visibility","findPlugin","plugins","reordering","sizing","some","plugin","values","Array","isArray","for","next","current","referenceIndex","indexOf","length","previous","before","slice","after","meta","columnMeta","COLUMN_META_KEY","getPluginInstance","forRow","row","rowMeta","ROW_META_KEY","tableMeta","TABLE_META_KEY","keys","includes","withFeature","featureName","provider","availableFeatures","find","features","allFeatures","map","flat","filter","join","options","normalized","normalizePluginsConfig","config","tuple","option","t","fn","pluginOptions","args","mapKey","rootKey","factory","Error","bucket","WeakMap","Map","instance"],"mappings":";;;;;AA0BA;AACA;AACA;AACA;AACA;AACA;;AAgBA;AACA;AACA;AACA;AACA;AACA;;AAgBA;AACA;AACA;AACA;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAeA,UAAU,CAEhC;EACEC,WAAWA,CAAWC,KAAY,EAAE;IAAA,IAAdA,CAAAA,KAAY,GAAZA,KAAY;AAAG;;AAErC;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGE;AACF;AACA;EACE,OAAOC,IAAIA,CAETC,QAA4C,EACU;AACtD,IAAA,OAAO,CAAC,IAAI,EAAEA,QAAQ,CAAC;AACzB;;AAEA;AACF;AACA;AACA;EACE,OAAOC,SAASA,CAEdD,QAAkD,EACU;AAC5D,IAAA,OAAO,CAAC,IAAI,EAAEA,QAAQ,CAAC;AACzB;AAWF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AANAE,eAAA,CAhDsBN,UAAU,EAAA,UAAA,EAAA,MAAA,CAAA;AAAAM,eAAA,CAAVN,UAAU,EAAA,UAAA,EAAA,MAAA,CAAA;AAuDzB,SAASO,SAASA,CACvBL,KAAkB,E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