ember-headless-table 1.1.0 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +9 -0
- package/dist/-private/-type-tests/plugin-properties.test.js +4 -8
- package/dist/-private/-type-tests/plugin-properties.test.js.map +1 -1
- package/dist/-private/-type-tests/plugin-with.test.js.map +1 -1
- package/dist/-private/-type-tests/plugins-accessors.test.js +12 -11
- package/dist/-private/-type-tests/plugins-accessors.test.js.map +1 -1
- package/dist/-private/-type-tests/plugins-signature-from.test.js +7 -6
- package/dist/-private/-type-tests/plugins-signature-from.test.js.map +1 -1
- package/dist/-private/-type-tests/plugins-signature-utils.test.js.map +1 -1
- package/dist/-private/-type-tests/table-api.test.js +3 -2
- package/dist/-private/-type-tests/table-api.test.js.map +1 -1
- package/dist/-private/-type-tests/table-config.test.js +9 -11
- package/dist/-private/-type-tests/table-config.test.js.map +1 -1
- package/dist/-private/column.d.ts +1 -1
- package/dist/-private/column.js +7 -15
- package/dist/-private/column.js.map +1 -1
- package/dist/-private/js-helper.d.ts +1 -1
- package/dist/-private/js-helper.js +2 -3
- package/dist/-private/js-helper.js.map +1 -1
- package/dist/-private/preferences.js +7 -39
- package/dist/-private/preferences.js.map +1 -1
- package/dist/-private/row.d.ts +1 -1
- package/dist/-private/row.js +4 -15
- package/dist/-private/row.js.map +1 -1
- package/dist/-private/table.js +4 -4
- package/dist/-private/utils.js +0 -2
- package/dist/-private/utils.js.map +1 -1
- package/dist/{applyDecoratedDescriptor-e0489e2f.js → applyDecoratedDescriptor-6b986a67.js} +1 -6
- package/dist/applyDecoratedDescriptor-6b986a67.js.map +1 -0
- package/dist/{classPrivateFieldGet-af59a8ea.js → classPrivateFieldGet-b4d7d334.js} +1 -3
- package/dist/{classPrivateFieldGet-af59a8ea.js.map → classPrivateFieldGet-b4d7d334.js.map} +1 -1
- package/dist/{defineProperty-a0196711.js → defineProperty-35ce617b.js} +1 -2
- package/dist/defineProperty-35ce617b.js.map +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/plugins/-private/base.d.ts +1 -1
- package/dist/plugins/-private/base.js +18 -59
- package/dist/plugins/-private/base.js.map +1 -1
- package/dist/plugins/-private/utils.js +5 -20
- package/dist/plugins/-private/utils.js.map +1 -1
- package/dist/plugins/column-reordering/helpers.d.ts +9 -4
- package/dist/plugins/column-reordering/helpers.js +13 -6
- package/dist/plugins/column-reordering/helpers.js.map +1 -1
- package/dist/plugins/column-reordering/index.js +1 -1
- package/dist/plugins/column-reordering/plugin.d.ts +57 -11
- package/dist/plugins/column-reordering/plugin.js +109 -130
- package/dist/plugins/column-reordering/plugin.js.map +1 -1
- package/dist/plugins/column-reordering/utils.js +0 -7
- package/dist/plugins/column-reordering/utils.js.map +1 -1
- package/dist/plugins/column-resizing/handle.js +4 -33
- package/dist/plugins/column-resizing/handle.js.map +1 -1
- package/dist/plugins/column-resizing/helpers.js +2 -2
- package/dist/plugins/column-resizing/helpers.js.map +1 -1
- package/dist/plugins/column-resizing/plugin.js +15 -64
- package/dist/plugins/column-resizing/plugin.js.map +1 -1
- package/dist/plugins/column-resizing/resize-observer.js +1 -3
- package/dist/plugins/column-resizing/resize-observer.js.map +1 -1
- package/dist/plugins/column-resizing/utils.js +0 -2
- package/dist/plugins/column-resizing/utils.js.map +1 -1
- package/dist/plugins/column-visibility/helpers.js +3 -3
- package/dist/plugins/column-visibility/helpers.js.map +1 -1
- package/dist/plugins/column-visibility/plugin.js +6 -26
- package/dist/plugins/column-visibility/plugin.js.map +1 -1
- package/dist/plugins/data-sorting/helpers.js +7 -7
- package/dist/plugins/data-sorting/helpers.js.map +1 -1
- package/dist/plugins/data-sorting/plugin.js +2 -32
- package/dist/plugins/data-sorting/plugin.js.map +1 -1
- package/dist/plugins/data-sorting/types.js +0 -3
- package/dist/plugins/data-sorting/types.js.map +1 -1
- package/dist/plugins/metadata/helpers.d.ts +4 -0
- package/dist/plugins/metadata/helpers.js +12 -0
- package/dist/plugins/metadata/helpers.js.map +1 -0
- package/dist/plugins/metadata/index.d.ts +3 -0
- package/dist/plugins/metadata/index.js +3 -0
- package/dist/plugins/metadata/index.js.map +1 -0
- package/dist/plugins/metadata/plugin.d.ts +24 -0
- package/dist/plugins/metadata/plugin.js +25 -0
- package/dist/plugins/metadata/plugin.js.map +1 -0
- package/dist/plugins/row-selection/helpers.js.map +1 -1
- package/dist/plugins/row-selection/plugin.js +5 -42
- package/dist/plugins/row-selection/plugin.js.map +1 -1
- package/dist/plugins/sticky-columns/helpers.d.ts +14 -1
- package/dist/plugins/sticky-columns/helpers.js +40 -1
- package/dist/plugins/sticky-columns/helpers.js.map +1 -1
- package/dist/plugins/sticky-columns/index.js +1 -1
- package/dist/plugins/sticky-columns/plugin.d.ts +17 -1
- package/dist/plugins/sticky-columns/plugin.js +41 -43
- package/dist/plugins/sticky-columns/plugin.js.map +1 -1
- package/dist/{table-8e46554b.d.ts → table-0cbd2720.d.ts} +9 -7
- package/dist/{table-8e46554b.js → table-0cbd2720.js} +34 -36
- package/dist/table-0cbd2720.js.map +1 -0
- package/dist/test-support/index.js +2 -6
- package/dist/test-support/index.js.map +1 -1
- package/dist/utils.js +2 -5
- package/dist/utils.js.map +1 -1
- package/package.json +20 -33
- package/dist/applyDecoratedDescriptor-e0489e2f.js.map +0 -1
- package/dist/defineProperty-a0196711.js.map +0 -1
- package/dist/table-8e46554b.js.map +0 -1
@@ -1,25 +1,22 @@
|
|
1
|
-
import { _ as _defineProperty } from '../defineProperty-
|
1
|
+
import { _ as _defineProperty } from '../defineProperty-35ce617b.js';
|
2
2
|
import { TrackedMap } from 'tracked-built-ins';
|
3
3
|
|
4
4
|
class TablePreferences {
|
5
5
|
constructor(key, adapter) {
|
6
6
|
_defineProperty(this, "storage", new TrackedPreferences());
|
7
|
-
|
8
7
|
this.key = key;
|
9
8
|
this.adapter = adapter;
|
10
|
-
|
11
9
|
if (this.adapter) {
|
12
10
|
this.restore(this.adapter);
|
13
11
|
}
|
14
12
|
}
|
15
|
-
|
16
13
|
hasAdapter() {
|
17
14
|
return this.adapter !== undefined;
|
18
15
|
}
|
19
|
-
|
20
16
|
getIsAtDefault() {
|
21
17
|
return this.storage.isAtDefault;
|
22
18
|
}
|
19
|
+
|
23
20
|
/**
|
24
21
|
* Passes a JSON-compatible structure to `adapter.persist`
|
25
22
|
*
|
@@ -27,54 +24,45 @@ class TablePreferences {
|
|
27
24
|
* local storage. The `adpater.restore` method can be used to restore
|
28
25
|
* this structure back in to the {@link TrackedPreferences }
|
29
26
|
*/
|
30
|
-
|
31
|
-
|
32
27
|
persist() {
|
33
|
-
return this.adapter?.persist?.(this.key, {
|
28
|
+
return this.adapter?.persist?.(this.key, {
|
29
|
+
...this.storage.serialize()
|
34
30
|
});
|
35
31
|
}
|
32
|
+
|
36
33
|
/**
|
37
34
|
* Using the `adapter.restore` method, convert the JSON structure
|
38
35
|
* to {@link TrackedPreferences }
|
39
36
|
*/
|
40
|
-
|
41
|
-
|
42
37
|
restore(adapter) {
|
43
38
|
let data = adapter?.restore?.(this.key);
|
44
39
|
if (!data) return;
|
45
40
|
return this.storage.restore(data);
|
46
41
|
}
|
47
|
-
|
48
42
|
}
|
43
|
+
|
49
44
|
/**
|
50
45
|
* @public
|
51
46
|
*
|
52
47
|
* The API for reactively interacting with preferences
|
53
48
|
*/
|
54
|
-
|
55
49
|
class TrackedPreferences {
|
56
50
|
constructor() {
|
57
51
|
_defineProperty(this, "plugins", new Map());
|
58
52
|
}
|
59
|
-
|
60
53
|
get isAtDefault() {
|
61
54
|
return [...this.plugins.values()].every(pluginPrefs => pluginPrefs.isAtDefault);
|
62
55
|
}
|
63
|
-
|
64
56
|
forPlugin(name) {
|
65
57
|
let existing = this.plugins.get(name);
|
66
|
-
|
67
58
|
if (!existing) {
|
68
59
|
existing = new TrackedPluginPrefs();
|
69
60
|
this.plugins.set(name, existing);
|
70
61
|
}
|
71
|
-
|
72
62
|
return existing;
|
73
63
|
}
|
74
|
-
|
75
64
|
serialize() {
|
76
65
|
let plugins = {};
|
77
|
-
|
78
66
|
for (let [pluginName, preferences] of this.plugins.entries()) {
|
79
67
|
/**
|
80
68
|
* This cast is dirty, and should be fixed eventually.
|
@@ -84,91 +72,71 @@ class TrackedPreferences {
|
|
84
72
|
*/
|
85
73
|
plugins[pluginName] = preferences.serialize();
|
86
74
|
}
|
87
|
-
|
88
75
|
return {
|
89
76
|
plugins
|
90
77
|
};
|
91
78
|
}
|
92
|
-
|
93
79
|
restore(data) {
|
94
80
|
let {
|
95
81
|
plugins
|
96
82
|
} = data;
|
97
|
-
|
98
83
|
for (let [pluginName, preferences] of Object.entries(plugins || {})) {
|
99
84
|
let trackedPluginPrefs = new TrackedPluginPrefs();
|
100
85
|
trackedPluginPrefs.restore(preferences);
|
101
86
|
this.plugins.set(pluginName, trackedPluginPrefs);
|
102
87
|
}
|
103
88
|
}
|
104
|
-
|
105
89
|
}
|
106
|
-
|
107
90
|
class TrackedPluginPrefs {
|
108
91
|
constructor() {
|
109
92
|
_defineProperty(this, "table", new TrackedMap());
|
110
|
-
|
111
93
|
_defineProperty(this, "columns", new Map());
|
112
|
-
|
113
94
|
_defineProperty(this, "forColumn", key => {
|
114
95
|
let existing = this.columns.get(key);
|
115
|
-
|
116
96
|
if (!existing) {
|
117
97
|
existing = new TrackedMap();
|
118
98
|
this.columns.set(key, existing);
|
119
99
|
}
|
120
|
-
|
121
100
|
return existing;
|
122
101
|
});
|
123
102
|
}
|
124
|
-
|
125
103
|
get isAtDefault() {
|
126
104
|
return this.table.size === 0 && [...this.columns.values()].every(x => x.size === 0);
|
127
105
|
}
|
128
|
-
|
129
106
|
serialize() {
|
130
107
|
let columnsPrefs = {};
|
131
108
|
let tablePrefs = {};
|
132
|
-
|
133
109
|
for (let [columnKey, preferences] of this.columns.entries()) {
|
134
110
|
let serializedPreferences = {};
|
135
|
-
|
136
111
|
for (let [key, preference] of preferences.entries()) {
|
137
112
|
serializedPreferences[key] = preference;
|
138
113
|
}
|
139
|
-
|
140
114
|
columnsPrefs[columnKey] = serializedPreferences;
|
141
115
|
}
|
142
|
-
|
143
116
|
for (let [key, preference] of this.table.entries()) {
|
144
117
|
tablePrefs[key] = preference;
|
145
118
|
}
|
146
|
-
|
147
119
|
return {
|
148
120
|
table: tablePrefs,
|
149
121
|
columns: columnsPrefs
|
150
122
|
};
|
151
123
|
}
|
152
|
-
|
153
124
|
restore(data) {
|
154
125
|
let {
|
155
126
|
table,
|
156
127
|
columns
|
157
128
|
} = data;
|
158
|
-
|
159
129
|
for (let [key, preferences] of Object.entries(columns)) {
|
160
130
|
let trackedPluginPrefs = new TrackedMap(Object.entries(preferences));
|
161
131
|
this.columns.set(key, trackedPluginPrefs);
|
162
132
|
}
|
133
|
+
|
163
134
|
/**
|
164
135
|
* TODO: fix the inference here...
|
165
136
|
* each time there is a cast, there is a greater risk of runtime error.
|
166
137
|
*/
|
167
|
-
|
168
|
-
|
169
138
|
this.table = new TrackedMap(Object.entries(table));
|
170
139
|
}
|
171
|
-
|
172
140
|
}
|
173
141
|
|
174
142
|
export { TablePreferences };
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"preferences.js","sources":["../../src/-private/preferences.ts"],"sourcesContent":["import { TrackedMap } from 'tracked-built-ins';\n\nimport type {\n PluginPreferenceFor,\n PluginPreferences,\n PreferencesAdapter as Adapter,\n PreferencesTableValues,\n TablePreferencesData,\n} from '#interfaces';\n\nexport class TablePreferences {\n storage = new TrackedPreferences();\n\n constructor(private key: string, private adapter?: Adapter) {\n if (this.adapter) {\n this.restore(this.adapter);\n }\n }\n\n hasAdapter() {\n return this.adapter !== undefined;\n }\n\n getIsAtDefault() {\n return this.storage.isAtDefault;\n }\n\n /**\n * Passes a JSON-compatible structure to `adapter.persist`\n *\n * This structure could be stored in a remote database or\n * local storage. The `adpater.restore` method can be used to restore\n * this structure back in to the {@link TrackedPreferences }\n */\n persist() {\n return this.adapter?.persist?.(this.key, {\n ...this.storage.serialize(),\n });\n }\n\n /**\n * Using the `adapter.restore` method, convert the JSON structure\n * to {@link TrackedPreferences }\n */\n restore(adapter: Adapter) {\n let data = adapter?.restore?.(this.key);\n\n if (!data) return;\n\n return this.storage.restore(data);\n }\n}\n\n/**\n * @public\n *\n * The API for reactively interacting with preferences\n */\nclass TrackedPreferences {\n plugins = new Map<string, TrackedPluginPrefs>();\n\n get isAtDefault(): boolean {\n return [...this.plugins.values()].every((pluginPrefs) => pluginPrefs.isAtDefault);\n }\n\n forPlugin(name: string) {\n let existing = this.plugins.get(name);\n\n if (!existing) {\n existing = new TrackedPluginPrefs();\n this.plugins.set(name, existing);\n }\n\n return existing;\n }\n\n serialize(): TablePreferencesData {\n let plugins: TablePreferencesData['plugins'] = {};\n\n for (let [pluginName, preferences] of this.plugins.entries()) {\n /**\n * This cast is dirty, and should be fixed eventually.\n * We should be able to, knowing that pluginName\n * will either be in the registry, or be a default PluginPreferences\n * object, that we can assign the serialized structure to plugins.\n */\n (plugins as any)[pluginName] = preferences.serialize();\n }\n\n return {\n plugins,\n };\n }\n\n restore(data: TablePreferencesData): void {\n let { plugins } = data;\n\n for (let [pluginName, preferences] of Object.entries(plugins || {})) {\n let trackedPluginPrefs = new TrackedPluginPrefs();\n\n trackedPluginPrefs.restore(preferences);\n\n this.plugins.set(pluginName, trackedPluginPrefs);\n }\n }\n}\n\nclass TrackedPluginPrefs<PluginName = unknown> {\n table = new TrackedMap<string, unknown>();\n columns = new Map<string, TrackedMap<string, unknown>>();\n\n get isAtDefault(): boolean {\n return this.table.size === 0 && [...this.columns.values()].every((x) => x.size === 0);\n }\n\n forColumn = (key: string): TrackedMap<string, unknown> => {\n let existing = this.columns.get(key);\n\n if (!existing) {\n existing = new TrackedMap();\n this.columns.set(key, existing);\n }\n\n return existing;\n };\n\n serialize(): PluginPreferenceFor<PluginName> {\n let columnsPrefs: PluginPreferences['columns'] = {};\n let tablePrefs: PluginPreferences['table'] = {};\n\n for (let [columnKey, preferences] of this.columns.entries()) {\n let serializedPreferences: Record<string, unknown> = {};\n\n for (let [key, preference] of preferences.entries()) {\n serializedPreferences[key] = preference;\n }\n\n columnsPrefs[columnKey] = serializedPreferences;\n }\n\n for (let [key, preference] of this.table.entries()) {\n tablePrefs[key] = preference;\n }\n\n return {\n table: tablePrefs,\n columns: columnsPrefs,\n } as PluginPreferenceFor<PluginName>;\n }\n\n restore(data: PluginPreferences): void {\n let { table, columns } = data;\n\n for (let [key, preferences] of Object.entries(columns)) {\n let trackedPluginPrefs = new TrackedMap(Object.entries(preferences));\n\n this.columns.set(key, trackedPluginPrefs);\n }\n\n /**\n * TODO: fix the inference here...\n * each time there is a cast, there is a greater risk of runtime error.\n */\n this.table = new TrackedMap<string, PreferencesTableValues<PluginName>>(\n Object.entries(table) as [string, PreferencesTableValues<PluginName>][]\n );\n }\n}\n"],"names":["TablePreferences","constructor","key","adapter","TrackedPreferences","restore","hasAdapter","undefined","getIsAtDefault","storage","isAtDefault","persist","serialize","data","Map","plugins","values","every","pluginPrefs","forPlugin","name","existing","get","TrackedPluginPrefs","set","pluginName","preferences","entries","Object","trackedPluginPrefs","TrackedMap","columns","table","size","x","columnsPrefs","tablePrefs","columnKey","serializedPreferences","preference"],"mappings":";;;AAUO,MAAMA,
|
1
|
+
{"version":3,"file":"preferences.js","sources":["../../src/-private/preferences.ts"],"sourcesContent":["import { TrackedMap } from 'tracked-built-ins';\n\nimport type {\n PluginPreferenceFor,\n PluginPreferences,\n PreferencesAdapter as Adapter,\n PreferencesTableValues,\n TablePreferencesData,\n} from '#interfaces';\n\nexport class TablePreferences {\n storage = new TrackedPreferences();\n\n constructor(private key: string, private adapter?: Adapter) {\n if (this.adapter) {\n this.restore(this.adapter);\n }\n }\n\n hasAdapter() {\n return this.adapter !== undefined;\n }\n\n getIsAtDefault() {\n return this.storage.isAtDefault;\n }\n\n /**\n * Passes a JSON-compatible structure to `adapter.persist`\n *\n * This structure could be stored in a remote database or\n * local storage. The `adpater.restore` method can be used to restore\n * this structure back in to the {@link TrackedPreferences }\n */\n persist() {\n return this.adapter?.persist?.(this.key, {\n ...this.storage.serialize(),\n });\n }\n\n /**\n * Using the `adapter.restore` method, convert the JSON structure\n * to {@link TrackedPreferences }\n */\n restore(adapter: Adapter) {\n let data = adapter?.restore?.(this.key);\n\n if (!data) return;\n\n return this.storage.restore(data);\n }\n}\n\n/**\n * @public\n *\n * The API for reactively interacting with preferences\n */\nclass TrackedPreferences {\n plugins = new Map<string, TrackedPluginPrefs>();\n\n get isAtDefault(): boolean {\n return [...this.plugins.values()].every((pluginPrefs) => pluginPrefs.isAtDefault);\n }\n\n forPlugin(name: string) {\n let existing = this.plugins.get(name);\n\n if (!existing) {\n existing = new TrackedPluginPrefs();\n this.plugins.set(name, existing);\n }\n\n return existing;\n }\n\n serialize(): TablePreferencesData {\n let plugins: TablePreferencesData['plugins'] = {};\n\n for (let [pluginName, preferences] of this.plugins.entries()) {\n /**\n * This cast is dirty, and should be fixed eventually.\n * We should be able to, knowing that pluginName\n * will either be in the registry, or be a default PluginPreferences\n * object, that we can assign the serialized structure to plugins.\n */\n (plugins as any)[pluginName] = preferences.serialize();\n }\n\n return {\n plugins,\n };\n }\n\n restore(data: TablePreferencesData): void {\n let { plugins } = data;\n\n for (let [pluginName, preferences] of Object.entries(plugins || {})) {\n let trackedPluginPrefs = new TrackedPluginPrefs();\n\n trackedPluginPrefs.restore(preferences);\n\n this.plugins.set(pluginName, trackedPluginPrefs);\n }\n }\n}\n\nclass TrackedPluginPrefs<PluginName = unknown> {\n table = new TrackedMap<string, unknown>();\n columns = new Map<string, TrackedMap<string, unknown>>();\n\n get isAtDefault(): boolean {\n return this.table.size === 0 && [...this.columns.values()].every((x) => x.size === 0);\n }\n\n forColumn = (key: string): TrackedMap<string, unknown> => {\n let existing = this.columns.get(key);\n\n if (!existing) {\n existing = new TrackedMap();\n this.columns.set(key, existing);\n }\n\n return existing;\n };\n\n serialize(): PluginPreferenceFor<PluginName> {\n let columnsPrefs: PluginPreferences['columns'] = {};\n let tablePrefs: PluginPreferences['table'] = {};\n\n for (let [columnKey, preferences] of this.columns.entries()) {\n let serializedPreferences: Record<string, unknown> = {};\n\n for (let [key, preference] of preferences.entries()) {\n serializedPreferences[key] = preference;\n }\n\n columnsPrefs[columnKey] = serializedPreferences;\n }\n\n for (let [key, preference] of this.table.entries()) {\n tablePrefs[key] = preference;\n }\n\n return {\n table: tablePrefs,\n columns: columnsPrefs,\n } as PluginPreferenceFor<PluginName>;\n }\n\n restore(data: PluginPreferences): void {\n let { table, columns } = data;\n\n for (let [key, preferences] of Object.entries(columns)) {\n let trackedPluginPrefs = new TrackedMap(Object.entries(preferences));\n\n this.columns.set(key, trackedPluginPrefs);\n }\n\n /**\n * TODO: fix the inference here...\n * each time there is a cast, there is a greater risk of runtime error.\n */\n this.table = new TrackedMap<string, PreferencesTableValues<PluginName>>(\n Object.entries(table) as [string, PreferencesTableValues<PluginName>][]\n );\n }\n}\n"],"names":["TablePreferences","constructor","key","adapter","TrackedPreferences","restore","hasAdapter","undefined","getIsAtDefault","storage","isAtDefault","persist","serialize","data","Map","plugins","values","every","pluginPrefs","forPlugin","name","existing","get","TrackedPluginPrefs","set","pluginName","preferences","entries","Object","trackedPluginPrefs","TrackedMap","columns","table","size","x","columnsPrefs","tablePrefs","columnKey","serializedPreferences","preference"],"mappings":";;;AAUO,MAAMA,gBAAgB,CAAC;AAG5BC,EAAAA,WAAW,CAASC,GAAW,EAAUC,OAAiB,EAAE;IAAA,eAFlD,CAAA,IAAA,EAAA,SAAA,EAAA,IAAIC,kBAAkB,EAAE,CAAA,CAAA;IAAA,IAEdF,CAAAA,GAAW,GAAXA,GAAW,CAAA;IAAA,IAAUC,CAAAA,OAAiB,GAAjBA,OAAiB,CAAA;IACxD,IAAI,IAAI,CAACA,OAAO,EAAE;AAChB,MAAA,IAAI,CAACE,OAAO,CAAC,IAAI,CAACF,OAAO,CAAC,CAAA;AAC5B,KAAA;AACF,GAAA;AAEAG,EAAAA,UAAU,GAAG;AACX,IAAA,OAAO,IAAI,CAACH,OAAO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IAAuB,EAAQ;IACrC,IAAI;MAAEmB,KAAK;AAAED,MAAAA,OAAAA;AAAQ,KAAC,GAAGlB,IAAI,CAAA;AAE7B,IAAA,KAAK,IAAI,CAACX,GAAG,EAAEwB,WAAW,CAAC,IAAIE,MAAM,CAACD,OAAO,CAACI,OAAO,CAAC,EAAE;MACtD,IAAIF,kBAAkB,GAAG,IAAIC,UAAU,CAACF,MAAM,CAACD,OAAO,CAACD,WAAW,CAAC,CAAC,CAAA;MAEpE,IAAI,CAACK,OAAO,CAACP,GAAG,CAACtB,GAAG,EAAE2B,kBAAkB,CAAC,CAAA;AAC3C,KAAA;;AAEA;AACJ;AACA;AACA;AACI,IAAA,IAAI,CAACG,KAAK,GAAG,IAAIF,UAAU,CACzBF,MAAM,CAACD,OAAO,CAACK,KAAK,CAAC,CACtB,CAAA;AACH,GAAA;AACF;;;;"}
|
package/dist/-private/row.d.ts
CHANGED
package/dist/-private/row.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
import { _ as _defineProperty } from '../defineProperty-
|
2
|
-
import { _ as _applyDecoratedDescriptor } from '../applyDecoratedDescriptor-
|
1
|
+
import { _ as _defineProperty } from '../defineProperty-35ce617b.js';
|
2
|
+
import { _ as _applyDecoratedDescriptor } from '../applyDecoratedDescriptor-6b986a67.js';
|
3
3
|
import { assert } from '@ember/debug';
|
4
4
|
import { action } from '@ember/object';
|
5
5
|
|
@@ -10,53 +10,42 @@ let Row = (_class = class Row {
|
|
10
10
|
assert(`Row is no longer a part of the table, something has gone wrong`, i >= 0);
|
11
11
|
return i;
|
12
12
|
}
|
13
|
-
|
14
13
|
get isOdd() {
|
15
14
|
return this.index % 2 !== 0;
|
16
15
|
}
|
17
|
-
|
18
16
|
get next() {
|
19
17
|
return this.table.rows[this.index + 1];
|
20
18
|
}
|
21
|
-
|
22
19
|
get prev() {
|
23
20
|
return this.table.rows[this.index - 1];
|
24
21
|
}
|
25
|
-
|
26
22
|
constructor(table, data) {
|
27
23
|
_defineProperty(this, "data", void 0);
|
28
|
-
|
29
24
|
_defineProperty(this, "table", void 0);
|
30
|
-
|
31
25
|
this.data = data;
|
32
26
|
this.table = table;
|
33
27
|
}
|
34
|
-
|
35
28
|
handleClick(event) {
|
36
29
|
assert(`expected event.target to be an instance of HTMLElement`, event.target instanceof HTMLElement || event.target instanceof SVGElement);
|
37
30
|
let selection = document.getSelection();
|
38
|
-
|
39
31
|
if (selection) {
|
40
32
|
let {
|
41
33
|
type,
|
42
34
|
anchorNode
|
43
35
|
} = selection;
|
44
36
|
let isSelectingText = type === 'Range' && event.target?.contains(anchorNode);
|
45
|
-
|
46
37
|
if (isSelectingText) {
|
47
38
|
event.stopPropagation();
|
48
39
|
return;
|
49
40
|
}
|
50
|
-
}
|
51
|
-
|
41
|
+
}
|
52
42
|
|
43
|
+
// Ignore clicks on interactive elements within the row
|
53
44
|
let inputParent = event.target.closest('input, button, label, a, select');
|
54
|
-
|
55
45
|
if (inputParent) {
|
56
46
|
return;
|
57
47
|
}
|
58
48
|
}
|
59
|
-
|
60
49
|
}, (_applyDecoratedDescriptor(_class.prototype, "handleClick", [action], Object.getOwnPropertyDescriptor(_class.prototype, "handleClick"), _class.prototype)), _class);
|
61
50
|
|
62
51
|
export { Row };
|
package/dist/-private/row.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"row.js","sources":["../../src/-private/row.ts"],"sourcesContent":["import { assert } from '@ember/debug';\nimport { action } from '@ember/object';\n\nimport type { Table } from './table';\n\nexport class Row<DataType = Record<string, unknown>> {\n data: DataType;\n table: Table<DataType>;\n\n get index(): number {\n let i = this.table.rows.values().indexOf(this);\n\n assert(`Row is no longer a part of the table, something has gone wrong`, i >= 0);\n\n return i;\n }\n\n get isOdd() {\n return this.index % 2 !== 0;\n }\n\n get next(): Row<DataType> | undefined {\n return this.table.rows[this.index + 1];\n }\n\n get prev(): Row<DataType> | undefined {\n return this.table.rows[this.index - 1];\n }\n\n constructor(table: Table<DataType>, data: DataType) {\n this.data = data;\n this.table = table;\n }\n\n @action\n handleClick(event: MouseEvent) {\n assert(\n `expected event.target to be an instance of HTMLElement`,\n event.target instanceof HTMLElement || event.target instanceof SVGElement\n );\n\n let selection = document.getSelection();\n\n if (selection) {\n let { type, anchorNode } = selection;\n let isSelectingText = type === 'Range' && event.target?.contains(anchorNode);\n\n if (isSelectingText) {\n event.stopPropagation();\n\n return;\n }\n }\n\n // Ignore clicks on interactive elements within the row\n let inputParent = event.target.closest('input, button, label, a, select');\n\n if (inputParent) {\n return;\n }\n }\n}\n"],"names":["Row","index","i","table","rows","values","indexOf","assert","isOdd","next","prev","constructor","data","handleClick","event","target","HTMLElement","SVGElement","selection","document","getSelection","type","anchorNode","isSelectingText","contains","stopPropagation","inputParent","closest","action"],"mappings":";;;;;;AAKA,IAAaA,
|
1
|
+
{"version":3,"file":"row.js","sources":["../../src/-private/row.ts"],"sourcesContent":["import { assert } from '@ember/debug';\nimport { action } from '@ember/object';\n\nimport type { Table } from './table';\n\nexport class Row<DataType = Record<string, unknown>> {\n data: DataType;\n table: Table<DataType>;\n\n get index(): number {\n let i = this.table.rows.values().indexOf(this);\n\n assert(`Row is no longer a part of the table, something has gone wrong`, i >= 0);\n\n return i;\n }\n\n get isOdd() {\n return this.index % 2 !== 0;\n }\n\n get next(): Row<DataType> | undefined {\n return this.table.rows[this.index + 1];\n }\n\n get prev(): Row<DataType> | undefined {\n return this.table.rows[this.index - 1];\n }\n\n constructor(table: Table<DataType>, data: DataType) {\n this.data = data;\n this.table = table;\n }\n\n @action\n handleClick(event: MouseEvent) {\n assert(\n `expected event.target to be an instance of HTMLElement`,\n event.target instanceof HTMLElement || event.target instanceof SVGElement\n );\n\n let selection = document.getSelection();\n\n if (selection) {\n let { type, anchorNode } = selection;\n let isSelectingText = type === 'Range' && event.target?.contains(anchorNode);\n\n if (isSelectingText) {\n event.stopPropagation();\n\n return;\n }\n }\n\n // Ignore clicks on interactive elements within the row\n let inputParent = event.target.closest('input, button, label, a, select');\n\n if (inputParent) {\n return;\n }\n }\n}\n"],"names":["Row","index","i","table","rows","values","indexOf","assert","isOdd","next","prev","constructor","data","handleClick","event","target","HTMLElement","SVGElement","selection","document","getSelection","type","anchorNode","isSelectingText","contains","stopPropagation","inputParent","closest","action"],"mappings":";;;;;;AAKA,IAAaA,GAAG,IAAA,MAAA,GAAT,MAAMA,GAAG,CAAqC;AAInD,EAAA,IAAIC,KAAK,GAAW;AAClB,IAAA,IAAIC,CAAC,GAAG,IAAI,CAACC,KAAK,CAACC,IAAI,CAACC,MAAM,EAAE,CAACC,OAAO,CAAC,IAAI,CAAC,CAAA;AAE9CC,IAAAA,MAAM,CAAE,CAA+D,8DAAA,CAAA,EAAEL,CAAC,IAAI,CAAC,CAAC,CAAA;AAEhF,IAAA,OAAOA,CAAC,CAAA;AACV,GAAA;AAEA,EAAA,IAAIM,KAAK,GAAG;AACV,IAAA,OAAO,IAAI,CAACP,KAAK,GAAG,CAAC,KAAK,CAAC,CAAA;AAC7B,GAAA;AAEA,EAAA,IAAIQ,IAAI,GAA8B;IACpC,OAAO,IAAI,CAACN,KAAK,CAACC,IAAI,CAAC,IAAI,CAACH,KAAK,GAAG,CAAC,CAAC,CAAA;AACxC,GAAA;AAEA,EAAA,IAAIS,IAAI,GAA8B;IACpC,OAAO,IAAI,CAACP,KAAK,CAACC,IAAI,CAAC,IAAI,CAACH,KAAK,GAAG,CAAC,CAAC,CAAA;AACxC,GAAA;AAEAU,EAAAA,WAAW,CAACR,KAAsB,EAAES,IAAc,EAAE;AAAA,IAAA,eAAA,CAAA,IAAA,EAAA,MAAA,EAAA,KAAA,CAAA,CAAA,CAAA;AAAA,IAAA,eAAA,CAAA,IAAA,EAAA,OAAA,EAAA,KAAA,CAAA,CAAA,CAAA;IAClD,IAAI,CAACA,IAAI,GAAGA,IAAI,CAAA;IAChB,IAAI,CAACT,KAAK,GAAGA,KAAK,CAAA;AACpB,GAAA;EAGAU,WAAW,CAACC,KAAiB,EAAE;AAC7BP,IAAAA,MAAM,CACH,CAAA,sDAAA,CAAuD,EACxDO,KAAK,CAACC,MAAM,YAAYC,WAAW,IAAIF,KAAK,CAACC,MAAM,YAAYE,UAAU,CAC1E,CAAA;AAED,IAAA,IAAIC,SAAS,GAAGC,QAAQ,CAACC,YAAY,EAAE,CAAA;AAEvC,IAAA,IAAIF,SAAS,EAAE;MACb,IAAI;QAAEG,IAAI;AAAEC,QAAAA,UAAAA;AAAW,OAAC,GAAGJ,SAAS,CAAA;AACpC,MAAA,IAAIK,eAAe,GAAGF,IAAI,KAAK,OAAO,IAAIP,KAAK,CAACC,MAAM,EAAES,QAAQ,CAACF,UAAU,CAAC,CAAA;AAE5E,MAAA,IAAIC,eAAe,EAAE;QACnBT,KAAK,CAACW,eAAe,EAAE,CAAA;AAEvB,QAAA,OAAA;AACF,OAAA;AACF,KAAA;;AAEA;IACA,IAAIC,WAAW,GAAGZ,KAAK,CAACC,MAAM,CAACY,OAAO,CAAC,iCAAiC,CAAC,CAAA;AAEzE,IAAA,IAAID,WAAW,EAAE;AACf,MAAA,OAAA;AACF,KAAA;AACF,GAAA;AACF,CAAC,+DA3BEE,MAAM,CAAA,EAAA,MAAA,CAAA,wBAAA,CAAA,MAAA,CAAA,SAAA,EAAA,aAAA,CAAA,EAAA,MAAA,CAAA,SAAA,CAAA,GAAA,MAAA;;;;"}
|
package/dist/-private/table.js
CHANGED
@@ -1,12 +1,12 @@
|
|
1
|
-
export { T as TABLE_KEY, a as Table } from '../table-
|
2
|
-
import '../defineProperty-
|
3
|
-
import '../applyDecoratedDescriptor-
|
4
|
-
import '@embroider/macros';
|
1
|
+
export { T as TABLE_KEY, a as Table } from '../table-0cbd2720.js';
|
2
|
+
import '../defineProperty-35ce617b.js';
|
3
|
+
import '../applyDecoratedDescriptor-6b986a67.js';
|
5
4
|
import '@glimmer/tracking';
|
6
5
|
import '@ember/application';
|
7
6
|
import '@ember/debug';
|
8
7
|
import '@ember/object';
|
9
8
|
import '@ember/object/internals';
|
9
|
+
import '@embroider/macros';
|
10
10
|
import 'ember-modifier';
|
11
11
|
import 'ember-resources/core';
|
12
12
|
import 'ember-resources/util/map';
|
package/dist/-private/utils.js
CHANGED
@@ -1,6 +1,5 @@
|
|
1
1
|
function composeFunctionModifiers(modifiers) {
|
2
2
|
let setup = modifiers.filter(Boolean);
|
3
|
-
|
4
3
|
let composed = (element, ...args) => {
|
5
4
|
let destructors = setup.map(fn => fn(element, ...args)).filter(Boolean);
|
6
5
|
return () => {
|
@@ -9,7 +8,6 @@ function composeFunctionModifiers(modifiers) {
|
|
9
8
|
}
|
10
9
|
};
|
11
10
|
};
|
12
|
-
|
13
11
|
return composed;
|
14
12
|
}
|
15
13
|
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"utils.js","sources":["../../src/-private/utils.ts"],"sourcesContent":["import type { Destructor, FunctionModifier } from '#interfaces';\n\nexport function composeFunctionModifiers<Args extends unknown[]>(\n modifiers: Array<FunctionModifier<Args> | undefined>\n) {\n let setup = modifiers.filter(Boolean) as FunctionModifier<Args>[];\n\n let composed = (element: HTMLElement, ...args: Args) => {\n let destructors = setup.map((fn) => fn(element, ...args)).filter(Boolean) as Destructor[];\n\n return () => {\n for (let destructor of destructors) {\n destructor();\n }\n };\n };\n\n return composed;\n}\n"],"names":["composeFunctionModifiers","modifiers","setup","filter","Boolean","composed","element","args","destructors","map","fn","destructor"],"mappings":"AAEO,SAASA,
|
1
|
+
{"version":3,"file":"utils.js","sources":["../../src/-private/utils.ts"],"sourcesContent":["import type { Destructor, FunctionModifier } from '#interfaces';\n\nexport function composeFunctionModifiers<Args extends unknown[]>(\n modifiers: Array<FunctionModifier<Args> | undefined>\n) {\n let setup = modifiers.filter(Boolean) as FunctionModifier<Args>[];\n\n let composed = (element: HTMLElement, ...args: Args) => {\n let destructors = setup.map((fn) => fn(element, ...args)).filter(Boolean) as Destructor[];\n\n return () => {\n for (let destructor of destructors) {\n destructor();\n }\n };\n };\n\n return composed;\n}\n"],"names":["composeFunctionModifiers","modifiers","setup","filter","Boolean","composed","element","args","destructors","map","fn","destructor"],"mappings":"AAEO,SAASA,wBAAwB,CACtCC,SAAoD,EACpD;AACA,EAAA,IAAIC,KAAK,GAAGD,SAAS,CAACE,MAAM,CAACC,OAAO,CAA6B,CAAA;AAEjE,EAAA,IAAIC,QAAQ,GAAG,CAACC,OAAoB,EAAE,GAAGC,IAAU,KAAK;IACtD,IAAIC,WAAW,GAAGN,KAAK,CAACO,GAAG,CAAEC,EAAE,IAAKA,EAAE,CAACJ,OAAO,EAAE,GAAGC,IAAI,CAAC,CAAC,CAACJ,MAAM,CAACC,OAAO,CAAiB,CAAA;AAEzF,IAAA,OAAO,MAAM;AACX,MAAA,KAAK,IAAIO,UAAU,IAAIH,WAAW,EAAE;AAClCG,QAAAA,UAAU,EAAE,CAAA;AACd,OAAA;KACD,CAAA;GACF,CAAA;AAED,EAAA,OAAON,QAAQ,CAAA;AACjB;;;;"}
|
@@ -5,27 +5,22 @@ function _applyDecoratedDescriptor(target, property, decorators, descriptor, con
|
|
5
5
|
});
|
6
6
|
desc.enumerable = !!desc.enumerable;
|
7
7
|
desc.configurable = !!desc.configurable;
|
8
|
-
|
9
8
|
if ('value' in desc || desc.initializer) {
|
10
9
|
desc.writable = true;
|
11
10
|
}
|
12
|
-
|
13
11
|
desc = decorators.slice().reverse().reduce(function (desc, decorator) {
|
14
12
|
return decorator(target, property, desc) || desc;
|
15
13
|
}, desc);
|
16
|
-
|
17
14
|
if (context && desc.initializer !== void 0) {
|
18
15
|
desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
|
19
16
|
desc.initializer = undefined;
|
20
17
|
}
|
21
|
-
|
22
18
|
if (desc.initializer === void 0) {
|
23
19
|
Object.defineProperty(target, property, desc);
|
24
20
|
desc = null;
|
25
21
|
}
|
26
|
-
|
27
22
|
return desc;
|
28
23
|
}
|
29
24
|
|
30
25
|
export { _applyDecoratedDescriptor as _ };
|
31
|
-
//# sourceMappingURL=applyDecoratedDescriptor-
|
26
|
+
//# sourceMappingURL=applyDecoratedDescriptor-6b986a67.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"applyDecoratedDescriptor-6b986a67.js","sources":["../../node_modules/.pnpm/@babel+runtime@7.20.1/node_modules/@babel/runtime/helpers/esm/applyDecoratedDescriptor.js"],"sourcesContent":["export default function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {\n var desc = {};\n Object.keys(descriptor).forEach(function (key) {\n desc[key] = descriptor[key];\n });\n desc.enumerable = !!desc.enumerable;\n desc.configurable = !!desc.configurable;\n if ('value' in desc || desc.initializer) {\n desc.writable = true;\n }\n desc = decorators.slice().reverse().reduce(function (desc, decorator) {\n return decorator(target, property, desc) || desc;\n }, desc);\n if (context && desc.initializer !== void 0) {\n desc.value = desc.initializer ? desc.initializer.call(context) : void 0;\n desc.initializer = undefined;\n }\n if (desc.initializer === void 0) {\n Object.defineProperty(target, property, desc);\n desc = null;\n }\n return desc;\n}"],"names":["_applyDecoratedDescriptor","target","property","decorators","descriptor","context","desc","Object","keys","forEach","key","enumerable","configurable","initializer","writable","slice","reverse","reduce","decorator","value","call","undefined","defineProperty"],"mappings":"AAAe,SAASA,yBAAyB,CAACC,MAAM,EAAEC,QAAQ,EAAEC,UAAU,EAAEC,UAAU,EAAEC,OAAO,EAAE;EACnG,IAAIC,IAAI,GAAG,EAAE,CAAA;EACbC,MAAM,CAACC,IAAI,CAACJ,UAAU,CAAC,CAACK,OAAO,CAAC,UAAUC,GAAG,EAAE;AAC7CJ,IAAAA,IAAI,CAACI,GAAG,CAAC,GAAGN,UAAU,CAACM,GAAG,CAAC,CAAA;AAC7B,GAAC,CAAC,CAAA;AACFJ,EAAAA,IAAI,CAACK,UAAU,GAAG,CAAC,CAACL,IAAI,CAACK,UAAU,CAAA;AACnCL,EAAAA,IAAI,CAACM,YAAY,GAAG,CAAC,CAACN,IAAI,CAACM,YAAY,CAAA;AACvC,EAAA,IAAI,OAAO,IAAIN,IAAI,IAAIA,IAAI,CAACO,WAAW,EAAE;IACvCP,IAAI,CAACQ,QAAQ,GAAG,IAAI,CAAA;AACtB,GAAA;AACAR,EAAAA,IAAI,GAAGH,UAAU,CAACY,KAAK,EAAE,CAACC,OAAO,EAAE,CAACC,MAAM,CAAC,UAAUX,IAAI,EAAEY,SAAS,EAAE;IACpE,OAAOA,SAAS,CAACjB,MAAM,EAAEC,QAAQ,EAAEI,IAAI,CAAC,IAAIA,IAAI,CAAA;GACjD,EAAEA,IAAI,CAAC,CAAA;EACR,IAAID,OAAO,IAAIC,IAAI,CAACO,WAAW,KAAK,KAAK,CAAC,EAAE;AAC1CP,IAAAA,IAAI,CAACa,KAAK,GAAGb,IAAI,CAACO,WAAW,GAAGP,IAAI,CAACO,WAAW,CAACO,IAAI,CAACf,OAAO,CAAC,GAAG,KAAK,CAAC,CAAA;IACvEC,IAAI,CAACO,WAAW,GAAGQ,SAAS,CAAA;AAC9B,GAAA;AACA,EAAA,IAAIf,IAAI,CAACO,WAAW,KAAK,KAAK,CAAC,EAAE;IAC/BN,MAAM,CAACe,cAAc,CAACrB,MAAM,EAAEC,QAAQ,EAAEI,IAAI,CAAC,CAAA;AAC7CA,IAAAA,IAAI,GAAG,IAAI,CAAA;AACb,GAAA;AACA,EAAA,OAAOA,IAAI,CAAA;AACb;;;;"}
|
@@ -2,7 +2,6 @@ function _classExtractFieldDescriptor(receiver, privateMap, action) {
|
|
2
2
|
if (!privateMap.has(receiver)) {
|
3
3
|
throw new TypeError("attempted to " + action + " private field on non-instance");
|
4
4
|
}
|
5
|
-
|
6
5
|
return privateMap.get(receiver);
|
7
6
|
}
|
8
7
|
|
@@ -10,7 +9,6 @@ function _classApplyDescriptorGet(receiver, descriptor) {
|
|
10
9
|
if (descriptor.get) {
|
11
10
|
return descriptor.get.call(receiver);
|
12
11
|
}
|
13
|
-
|
14
12
|
return descriptor.value;
|
15
13
|
}
|
16
14
|
|
@@ -20,4 +18,4 @@ function _classPrivateFieldGet(receiver, privateMap) {
|
|
20
18
|
}
|
21
19
|
|
22
20
|
export { _classExtractFieldDescriptor as _, _classPrivateFieldGet as a };
|
23
|
-
//# sourceMappingURL=classPrivateFieldGet-
|
21
|
+
//# sourceMappingURL=classPrivateFieldGet-b4d7d334.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"classPrivateFieldGet-
|
1
|
+
{"version":3,"file":"classPrivateFieldGet-b4d7d334.js","sources":["../../node_modules/.pnpm/@babel+runtime@7.20.1/node_modules/@babel/runtime/helpers/esm/classExtractFieldDescriptor.js","../../node_modules/.pnpm/@babel+runtime@7.20.1/node_modules/@babel/runtime/helpers/esm/classApplyDescriptorGet.js","../../node_modules/.pnpm/@babel+runtime@7.20.1/node_modules/@babel/runtime/helpers/esm/classPrivateFieldGet.js"],"sourcesContent":["export default function _classExtractFieldDescriptor(receiver, privateMap, action) {\n if (!privateMap.has(receiver)) {\n throw new TypeError(\"attempted to \" + action + \" private field on non-instance\");\n }\n return privateMap.get(receiver);\n}","export default function _classApplyDescriptorGet(receiver, descriptor) {\n if (descriptor.get) {\n return descriptor.get.call(receiver);\n }\n return descriptor.value;\n}","import classApplyDescriptorGet from \"./classApplyDescriptorGet.js\";\nimport classExtractFieldDescriptor from \"./classExtractFieldDescriptor.js\";\nexport default function _classPrivateFieldGet(receiver, privateMap) {\n var descriptor = classExtractFieldDescriptor(receiver, privateMap, \"get\");\n return classApplyDescriptorGet(receiver, descriptor);\n}"],"names":["_classExtractFieldDescriptor","receiver","privateMap","action","has","TypeError","get","_classApplyDescriptorGet","descriptor","call","value","_classPrivateFieldGet","classExtractFieldDescriptor","classApplyDescriptorGet"],"mappings":"AAAe,SAASA,4BAA4B,CAACC,QAAQ,EAAEC,UAAU,EAAEC,MAAM,EAAE;AACjF,EAAA,IAAI,CAACD,UAAU,CAACE,GAAG,CAACH,QAAQ,CAAC,EAAE;IAC7B,MAAM,IAAII,SAAS,CAAC,eAAe,GAAGF,MAAM,GAAG,gCAAgC,CAAC,CAAA;AAClF,GAAA;AACA,EAAA,OAAOD,UAAU,CAACI,GAAG,CAACL,QAAQ,CAAC,CAAA;AACjC;;ACLe,SAASM,wBAAwB,CAACN,QAAQ,EAAEO,UAAU,EAAE;EACrE,IAAIA,UAAU,CAACF,GAAG,EAAE;AAClB,IAAA,OAAOE,UAAU,CAACF,GAAG,CAACG,IAAI,CAACR,QAAQ,CAAC,CAAA;AACtC,GAAA;EACA,OAAOO,UAAU,CAACE,KAAK,CAAA;AACzB;;ACHe,SAASC,qBAAqB,CAACV,QAAQ,EAAEC,UAAU,EAAE;EAClE,IAAIM,UAAU,GAAGI,4BAA2B,CAACX,QAAQ,EAAEC,UAAU,EAAE,KAAK,CAAC,CAAA;AACzE,EAAA,OAAOW,wBAAuB,CAACZ,QAAQ,EAAEO,UAAU,CAAC,CAAA;AACtD;;;;"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"defineProperty-35ce617b.js","sources":["../../node_modules/.pnpm/@babel+runtime@7.20.1/node_modules/@babel/runtime/helpers/esm/defineProperty.js"],"sourcesContent":["export default function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}"],"names":["_defineProperty","obj","key","value","Object","defineProperty","enumerable","configurable","writable"],"mappings":"AAAe,SAASA,eAAe,CAACC,GAAG,EAAEC,GAAG,EAAEC,KAAK,EAAE;EACvD,IAAID,GAAG,IAAID,GAAG,EAAE;AACdG,IAAAA,MAAM,CAACC,cAAc,CAACJ,GAAG,EAAEC,GAAG,EAAE;AAC9BC,MAAAA,KAAK,EAAEA,KAAK;AACZG,MAAAA,UAAU,EAAE,IAAI;AAChBC,MAAAA,YAAY,EAAE,IAAI;AAClBC,MAAAA,QAAQ,EAAE,IAAA;AACZ,KAAC,CAAC,CAAA;AACJ,GAAC,MAAM;AACLP,IAAAA,GAAG,CAACC,GAAG,CAAC,GAAGC,KAAK,CAAA;AAClB,GAAA;AACA,EAAA,OAAOF,GAAG,CAAA;AACZ;;;;"}
|
package/dist/index.d.ts
CHANGED
@@ -10,4 +10,4 @@ export { deserializeSorts, serializeSorts } from "./utils";
|
|
10
10
|
export type { Column } from "./-private/column";
|
11
11
|
export type { ColumnConfig, ColumnKey, Pagination, PreferencesAdapter, TablePreferencesData as PreferencesData, Selection, TableConfig, TableMeta } from "./-private/interfaces/index";
|
12
12
|
export type { Row } from "./-private/row";
|
13
|
-
export type { Table } from "./table-
|
13
|
+
export type { Table } from "./table-0cbd2720";
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { Table } from "../../table-
|
1
|
+
import { Table } from "../../table-0cbd2720";
|
2
2
|
import { ColumnReordering } from "../column-reordering/index";
|
3
3
|
import { ColumnVisibility } from "../column-visibility/index";
|
4
4
|
import { Class, Constructor } from "../../-private/private-types";
|