@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
package/package.json
CHANGED
|
@@ -110,26 +110,30 @@ export interface TableConfig<DataType> {
|
|
|
110
110
|
* you have a table representing "blog posts", your table key may be "blog-posts".
|
|
111
111
|
*
|
|
112
112
|
* And most importantly, the `adapter` is how you load and save the preferences.
|
|
113
|
-
* This may
|
|
113
|
+
* This may be to local storage, or some API.
|
|
114
|
+
*
|
|
115
|
+
* Can be provided as a thunk for reactive multi-table sync.
|
|
114
116
|
*/
|
|
115
|
-
preferences?:
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
117
|
+
preferences?:
|
|
118
|
+
| {
|
|
119
|
+
/**
|
|
120
|
+
* What to name the table in the preferences storage of your choice.
|
|
121
|
+
* Any string is valid provided that the storage adapter of your choice supports
|
|
122
|
+
* the format.
|
|
123
|
+
*
|
|
124
|
+
* For example, if you have a table of "blog posts", the preferences key might be
|
|
125
|
+
* `"all-blog-posts"`
|
|
126
|
+
*/
|
|
127
|
+
key: string;
|
|
128
|
+
/**
|
|
129
|
+
* Configuration for how you wish to `persist` and `restore` the configuration for your table.
|
|
130
|
+
*
|
|
131
|
+
* `persist` may be async as it is a fire-and-forget type of action.
|
|
132
|
+
*
|
|
133
|
+
* However, `restore` must be synchronous, as this is a blocking operation for rendering the table.
|
|
134
|
+
* So it's best to load up the table preferences before rendering a table.
|
|
135
|
+
*/
|
|
136
|
+
adapter?: PreferencesAdapter;
|
|
137
|
+
}
|
|
138
|
+
| (() => { key: string; adapter?: PreferencesAdapter });
|
|
135
139
|
}
|
package/src/-private/table.ts
CHANGED
|
@@ -113,16 +113,21 @@ export class Table<DataType = unknown> extends Resource<Signature<DataType>> {
|
|
|
113
113
|
modify(_: [] | undefined, named: Signature<DataType>['Named']) {
|
|
114
114
|
this.args = { named };
|
|
115
115
|
|
|
116
|
+
const preferences = named?.preferences;
|
|
117
|
+
const { key = guidFor(this), adapter } =
|
|
118
|
+
(typeof preferences === 'function' ? preferences() : preferences) ?? {};
|
|
119
|
+
|
|
116
120
|
// only set the preferences once
|
|
117
121
|
if (!this.preferences) {
|
|
118
|
-
const { key = guidFor(this), adapter } = named?.preferences ?? {};
|
|
119
|
-
|
|
120
122
|
// TODO: when no key is present,
|
|
121
123
|
// use "local-storage" preferences.
|
|
122
124
|
// it does not make sense to use a guid in a user's preferences
|
|
123
125
|
this.preferences = new TablePreferences(key, adapter);
|
|
124
126
|
} else {
|
|
125
127
|
// subsequent updates to args
|
|
128
|
+
if (typeof preferences === 'function' && adapter) {
|
|
129
|
+
this.preferences.restore(adapter);
|
|
130
|
+
}
|
|
126
131
|
this.resetScrollContainer();
|
|
127
132
|
}
|
|
128
133
|
}
|
|
@@ -593,13 +593,11 @@ function addMissingColumnsToMap(
|
|
|
593
593
|
columns: { key: string }[],
|
|
594
594
|
map: Map<string, number>,
|
|
595
595
|
): void {
|
|
596
|
-
|
|
597
|
-
let maxAssignedColumn = Math.max(...map.values());
|
|
596
|
+
let maxAssignedColumn = Math.max(...map.values());
|
|
598
597
|
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
}
|
|
598
|
+
for (let column of columns) {
|
|
599
|
+
if (map.get(column.key) === undefined) {
|
|
600
|
+
map.set(column.key, ++maxAssignedColumn);
|
|
603
601
|
}
|
|
604
602
|
}
|
|
605
603
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-properties.test.d.ts","sourceRoot":"","sources":["../../../src/-private/-type-tests/plugin-properties.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-with.test.d.ts","sourceRoot":"","sources":["../../../src/-private/-type-tests/plugin-with.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"plugins-accessors.test.d.ts","sourceRoot":"","sources":["../../../src/-private/-type-tests/plugins-accessors.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"plugins-signature-from.test.d.ts","sourceRoot":"","sources":["../../../src/-private/-type-tests/plugins-signature-from.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"plugins-signature-utils.test.d.ts","sourceRoot":"","sources":["../../../src/-private/-type-tests/plugins-signature-utils.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"table-api.test.d.ts","sourceRoot":"","sources":["../../../src/-private/-type-tests/table-api.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"table-config.test.d.ts","sourceRoot":"","sources":["../../../src/-private/-type-tests/table-config.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { Row } from './row';
|
|
2
|
-
import type { Table } from './table';
|
|
3
|
-
import type { ContentValue } from '@glint/template';
|
|
4
|
-
import type { ColumnConfig } from './interfaces';
|
|
5
|
-
export declare class Column<T = unknown> {
|
|
6
|
-
table: Table<T>;
|
|
7
|
-
config: ColumnConfig<T>;
|
|
8
|
-
get Cell(): import("@glint/template").ComponentLike<import("./interfaces").CellContext<T>> | undefined;
|
|
9
|
-
get key(): string;
|
|
10
|
-
get name(): string | undefined;
|
|
11
|
-
constructor(table: Table<T>, config: ColumnConfig<T>);
|
|
12
|
-
getValueForRow(row: Row<T>): ContentValue;
|
|
13
|
-
private getDefaultValue;
|
|
14
|
-
getOptionsForRow(row: Row<T>): {
|
|
15
|
-
defaultValue: string;
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
//# sourceMappingURL=column.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"column.d.ts","sourceRoot":"","sources":["../../src/-private/column.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAQjD,qBAAa,MAAM,CAAC,CAAC,GAAG,OAAO;IAcpB,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC;IACf,MAAM,EAAE,YAAY,CAAC,CAAC,CAAC;IAdhC,IAAI,IAAI,+FAEP;IAED,IAAI,GAAG,WAEN;IAED,IAAI,IAAI,uBAEP;gBAGQ,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,EACf,MAAM,EAAE,YAAY,CAAC,CAAC,CAAC;IAIhC,cAAc,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC,GAAG,YAAY;IAoBzC,OAAO,CAAC,eAAe;IAKvB,gBAAgB,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC;;;CAY7B"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type Owner from '@ember/owner';
|
|
2
|
-
interface CompatOwner {
|
|
3
|
-
getOwner: (context: unknown) => Owner | undefined;
|
|
4
|
-
setOwner: (context: unknown, owner: Owner) => void;
|
|
5
|
-
}
|
|
6
|
-
export declare const compatOwner: CompatOwner;
|
|
7
|
-
export {};
|
|
8
|
-
//# sourceMappingURL=ember-compat.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ember-compat.d.ts","sourceRoot":"","sources":["../../src/-private/ember-compat.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AAEtC,UAAU,WAAW;IACnB,QAAQ,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,KAAK,GAAG,SAAS,CAAC;IAClD,QAAQ,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;CACpD;AAED,eAAO,MAAM,WAAW,EAAS,WAAW,CAAC"}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import type { BasePlugin, Plugin } from '../../plugins';
|
|
2
|
-
import type { Column } from '../column';
|
|
3
|
-
import type { Row } from '../row';
|
|
4
|
-
import type { ColumnOptionsFor, SignatureFrom } from './plugins';
|
|
5
|
-
import type { Constructor } from '../private-types';
|
|
6
|
-
import type { ComponentLike, ContentValue } from '@glint/template';
|
|
7
|
-
export interface CellContext<T> {
|
|
8
|
-
column: Column<T>;
|
|
9
|
-
row: Row<T>;
|
|
10
|
-
}
|
|
11
|
-
type ColumnPluginOption<P = Plugin> = P extends BasePlugin ? [Constructor<P>, () => ColumnOptionsFor<SignatureFrom<P>>] : [P | Constructor<P>, () => unknown];
|
|
12
|
-
export type CellOptions = {
|
|
13
|
-
/**
|
|
14
|
-
* when no value is present for a given set of data for the given column config
|
|
15
|
-
*/
|
|
16
|
-
defaultValue?: string;
|
|
17
|
-
} & Record<string, unknown>;
|
|
18
|
-
export interface ColumnConfig<T = unknown> {
|
|
19
|
-
/**
|
|
20
|
-
* the `key` is required for preferences storage, as well as
|
|
21
|
-
* managing uniqueness of the columns in an easy-to-understand way.
|
|
22
|
-
*
|
|
23
|
-
* key may be anything if a `value` is provided, but _should_
|
|
24
|
-
* be a property-path on each data object passed to the table.
|
|
25
|
-
*
|
|
26
|
-
* @example `someObj.property.path`
|
|
27
|
-
* @example `someProperty`
|
|
28
|
-
*/
|
|
29
|
-
key: string;
|
|
30
|
-
/**
|
|
31
|
-
* Optionally provide a function to determine the value of a row at this column
|
|
32
|
-
*/
|
|
33
|
-
value?: (context: CellContext<T>) => ContentValue;
|
|
34
|
-
/**
|
|
35
|
-
* Recommended property to use for custom components for each cell per column.
|
|
36
|
-
* Out-of-the-box, this property isn't used, but the provided type may be
|
|
37
|
-
* a convenience for consumers of the headless table
|
|
38
|
-
*/
|
|
39
|
-
Cell?: ComponentLike<CellContext<T>>;
|
|
40
|
-
/**
|
|
41
|
-
* The name or title of the column, shown in the column heading / th
|
|
42
|
-
*/
|
|
43
|
-
name?: string;
|
|
44
|
-
/**
|
|
45
|
-
* Bag of extra properties to pass to Cell via `@options`, if desired
|
|
46
|
-
*/
|
|
47
|
-
options?: (context: CellContext<T>) => CellOptions;
|
|
48
|
-
/**
|
|
49
|
-
* Each plugin may provide column options, and provides similar syntax to how
|
|
50
|
-
* options for the table are specified in the plugins entry,
|
|
51
|
-
*
|
|
52
|
-
* ```js
|
|
53
|
-
* pluginOptions: [
|
|
54
|
-
* ColumnVisibility.forColumn(() => ({ isVisible: false })),
|
|
55
|
-
* StickyColumns.forColumn(() => ({ sticky: 'right' })),
|
|
56
|
-
* ],
|
|
57
|
-
* ```
|
|
58
|
-
*/
|
|
59
|
-
pluginOptions?: ColumnPluginOption[];
|
|
60
|
-
}
|
|
61
|
-
export type ColumnKey<T> = NonNullable<ColumnConfig<T>['key']>;
|
|
62
|
-
export {};
|
|
63
|
-
//# sourceMappingURL=column.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"column.d.ts","sourceRoot":"","sources":["../../../src/-private/interfaces/column.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACxD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,KAAK,EAAE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CAAC;CACtC;AAED,MAAM,MAAM,SAAS,CAAC,CAAC,IAAI,WAAW,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export * from './column.ts';
|
|
2
|
-
export * from './modifier.ts';
|
|
3
|
-
export * from './pagination.ts';
|
|
4
|
-
export * from './plugins.ts';
|
|
5
|
-
export * from './preferences.ts';
|
|
6
|
-
export * from './selection.ts';
|
|
7
|
-
export * from './table.ts';
|
|
8
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/-private/interfaces/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"modifier.d.ts","sourceRoot":"","sources":["../../../src/-private/interfaces/modifier.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,UAAU;IACzB,IAAI,IAAI,CAAC;CACV;AAED,MAAM,WAAW,gBAAgB,CAAC,IAAI,SAAS,OAAO,EAAE;IACtD,CAAC,OAAO,EAAE,WAAW,EAAE,GAAG,IAAI,EAAE,IAAI,GAAG,IAAI,GAAG,UAAU,CAAC;CAC1D"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
export interface Pagination {
|
|
2
|
-
formatItemSummary?: (data: {
|
|
3
|
-
end: number;
|
|
4
|
-
start: number;
|
|
5
|
-
totalItems: number;
|
|
6
|
-
}) => string;
|
|
7
|
-
onChange: (value: {
|
|
8
|
-
page: number;
|
|
9
|
-
pageSize: number;
|
|
10
|
-
}) => Promise<void> | void;
|
|
11
|
-
page: number;
|
|
12
|
-
pageSize: number;
|
|
13
|
-
pageSizeLabel?: string;
|
|
14
|
-
pageSizes?: number[];
|
|
15
|
-
totalItems: number;
|
|
16
|
-
}
|
|
17
|
-
//# sourceMappingURL=pagination.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pagination.d.ts","sourceRoot":"","sources":["../../../src/-private/interfaces/pagination.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,UAAU;IACzB,iBAAiB,CAAC,EAAE,CAAC,IAAI,EAAE;QACzB,GAAG,EAAE,MAAM,CAAC;QACZ,KAAK,EAAE,MAAM,CAAC;QACd,UAAU,EAAE,MAAM,CAAC;KACpB,KAAK,MAAM,CAAC;IACb,QAAQ,EAAE,CAAC,KAAK,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IAC9E,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;CACpB"}
|
|
@@ -1,315 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* NOTE:
|
|
3
|
-
* Empty, EmptyObject, and GetOrElse are copied from @glimmer/component
|
|
4
|
-
*/
|
|
5
|
-
import type { Constructor } from '../../-private/private-types.ts';
|
|
6
|
-
import type { Column, Row, Table } from '../../index.ts';
|
|
7
|
-
import type { Destructor } from '../../-private/interfaces';
|
|
8
|
-
type DataTypeOf<T> = T extends Table<infer DataType> ? DataType : T;
|
|
9
|
-
/**
|
|
10
|
-
* @private utility class
|
|
11
|
-
*
|
|
12
|
-
* This class exists because there isn't a way to, in TS,
|
|
13
|
-
* get access to static properties from an instance type
|
|
14
|
-
*/
|
|
15
|
-
export type PluginClass<PluginType> = PluginType & {
|
|
16
|
-
new: (...args: unknown[]) => PluginType;
|
|
17
|
-
features?: string[];
|
|
18
|
-
requires?: string[];
|
|
19
|
-
};
|
|
20
|
-
export type PluginSubclassInstance<PluginType> = PluginType & {
|
|
21
|
-
constructor: PluginClass<PluginType>;
|
|
22
|
-
};
|
|
23
|
-
/**
|
|
24
|
-
* @public
|
|
25
|
-
*
|
|
26
|
-
* The data passed to a plugin's column APIs
|
|
27
|
-
*/
|
|
28
|
-
export interface ColumnApi<T extends Table = Table> {
|
|
29
|
-
column: Column<DataTypeOf<T>>;
|
|
30
|
-
table: T;
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* @public
|
|
34
|
-
*
|
|
35
|
-
* The data passed to a plugin's row APIs
|
|
36
|
-
*/
|
|
37
|
-
export interface RowApi<T extends Table = Table> {
|
|
38
|
-
row: Row<DataTypeOf<T>>;
|
|
39
|
-
table: T;
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* @private utility type
|
|
43
|
-
*
|
|
44
|
-
* Note that this exists here, and the Plugin interface exists in general
|
|
45
|
-
* because we need to derive types in a static context on BasePlugin,
|
|
46
|
-
* and the source of types need to exist somewhere other than BasePlugin,
|
|
47
|
-
* so that:
|
|
48
|
-
* - inference will work
|
|
49
|
-
* - we avoid infinite recursive type definitions
|
|
50
|
-
*/
|
|
51
|
-
export type SignatureFrom<Klass extends Plugin<any>> = Klass extends Plugin<infer Signature> ? Signature : never;
|
|
52
|
-
/**
|
|
53
|
-
* @public
|
|
54
|
-
*
|
|
55
|
-
* Table plugins are stateless objects that optionally provide hooks based on what
|
|
56
|
-
* the plugin wishes to modify.
|
|
57
|
-
*
|
|
58
|
-
* If state is desired, Metadata classes may be provided to manage that state.
|
|
59
|
-
* As a convenience, when the meta classes are instantiated, they'll be given the same
|
|
60
|
-
* `owner` as everything else in the application, so service injection will be available
|
|
61
|
-
* within the meta class instances.
|
|
62
|
-
*
|
|
63
|
-
* A plugin can provide components that the consuming Table can opt in to rendering.
|
|
64
|
-
* (though, often these components will be required to be rendered for the plugin to work)
|
|
65
|
-
*
|
|
66
|
-
* a `Plugin` has one type argument:
|
|
67
|
-
* - Signature - which can provide optional information about the Meta/State and Options the plugin can take
|
|
68
|
-
*
|
|
69
|
-
* Any particular plugin instantiation will have at most 1 instance of their TableMeta
|
|
70
|
-
* and `n` instances of their ColumnMeta, where `n` is at most the number of columns.
|
|
71
|
-
*/
|
|
72
|
-
export interface Plugin<Signature = unknown> {
|
|
73
|
-
/**
|
|
74
|
-
* Unique name for the plugin.
|
|
75
|
-
* - only one plugin of the same name is allowed
|
|
76
|
-
* - the name is used for storing preferences / serializable information
|
|
77
|
-
*/
|
|
78
|
-
name: string;
|
|
79
|
-
/**
|
|
80
|
-
* Some plugins may require that other plugins be present.
|
|
81
|
-
* and because plugins can be interchangeable, the features implemented
|
|
82
|
-
* by those plugins must be declared via strings so that we can have
|
|
83
|
-
* a semi-stable reference that isn't tied to object equality or anything like that.
|
|
84
|
-
*
|
|
85
|
-
* This enables, for example, the StickyColumns plugin to work with different implementations of the ColumnResizing plugin (such as one
|
|
86
|
-
* might have between an aria-grid and a data table)
|
|
87
|
-
*/
|
|
88
|
-
features?: string[];
|
|
89
|
-
/**
|
|
90
|
-
* List of features to lookup "somewhere" in the list of plugins
|
|
91
|
-
* order does not matter.
|
|
92
|
-
*/
|
|
93
|
-
requires?: string[];
|
|
94
|
-
/**
|
|
95
|
-
* Optional state that this plugin may or may not choose to use
|
|
96
|
-
*
|
|
97
|
-
* columns will each have an instance of meta.column.
|
|
98
|
-
* the table will have only one instance of meta.table.
|
|
99
|
-
*/
|
|
100
|
-
meta?: {
|
|
101
|
-
/**
|
|
102
|
-
* @public
|
|
103
|
-
*
|
|
104
|
-
* Specifies the class definition to use for storing column-related state / behavior for this plugin
|
|
105
|
-
*/
|
|
106
|
-
column?: Constructor<ColumnMetaFor<Signature>>;
|
|
107
|
-
/**
|
|
108
|
-
* @public
|
|
109
|
-
*
|
|
110
|
-
* Specifies the class definition to use for storing table-related state / behavior for this plugin
|
|
111
|
-
*/
|
|
112
|
-
table?: Constructor<TableMetaFor<Signature>>;
|
|
113
|
-
/**
|
|
114
|
-
* @public
|
|
115
|
-
*
|
|
116
|
-
* Specifies the class definition to use for storing the row-related state / behavior for this plugin
|
|
117
|
-
*/
|
|
118
|
-
row?: Constructor<RowMetaFor<Signature>>;
|
|
119
|
-
};
|
|
120
|
-
/**
|
|
121
|
-
* @public
|
|
122
|
-
* @kind Column property
|
|
123
|
-
*
|
|
124
|
-
* Specify a modifier setup/teardown function to attach to each of the header cells
|
|
125
|
-
*
|
|
126
|
-
* Can be used to add / remove attributes, event listeners, etc
|
|
127
|
-
*/
|
|
128
|
-
headerCellModifier?: (element: HTMLElement, ...args: [ColumnApi<Table<any>>]) => void | Destructor;
|
|
129
|
-
/**
|
|
130
|
-
* @public
|
|
131
|
-
* @kind Row property
|
|
132
|
-
*
|
|
133
|
-
* Specify a modifier setup/teardown function to attach to each of the rows
|
|
134
|
-
*
|
|
135
|
-
* Can be used to add / remove attributes, event listeners, etc
|
|
136
|
-
*/
|
|
137
|
-
rowModifier?: (element: HTMLElement, ...args: [RowApi<Table<any>>]) => void | Destructor;
|
|
138
|
-
/**
|
|
139
|
-
* @public
|
|
140
|
-
* @kind Table hook
|
|
141
|
-
*
|
|
142
|
-
* Specify a modifier setup/teardown function to attach to the table's containing element
|
|
143
|
-
*/
|
|
144
|
-
containerModifier?: (element: HTMLElement, ...args: [Table<any>]) => void | Destructor;
|
|
145
|
-
/**
|
|
146
|
-
* @public
|
|
147
|
-
* @kind Table Hook
|
|
148
|
-
*
|
|
149
|
-
* If the plugin has state, this should be used to reset that state
|
|
150
|
-
*/
|
|
151
|
-
reset?: () => void;
|
|
152
|
-
/**
|
|
153
|
-
* @public
|
|
154
|
-
* @kind Table Hook
|
|
155
|
-
*
|
|
156
|
-
* A plugin may change the columns order, visibility, etc.
|
|
157
|
-
* By implementing this getter, this plugin's
|
|
158
|
-
* `columns` property will be used by other plugins via
|
|
159
|
-
* the `columns.for(table, RequestingPlugin)` api.
|
|
160
|
-
*
|
|
161
|
-
* For the end-consumer, they may choose to do
|
|
162
|
-
* `columns.for(table)`, which will aggregate all column modifications
|
|
163
|
-
* from all plugins.
|
|
164
|
-
*
|
|
165
|
-
* As always, `table.columns` is the way to get the unmodified list of columns.
|
|
166
|
-
*/
|
|
167
|
-
columns?: Column<any>[];
|
|
168
|
-
}
|
|
169
|
-
/**
|
|
170
|
-
* @private utility type
|
|
171
|
-
*/
|
|
172
|
-
type GetOrElse<Obj, K, Fallback> = K extends keyof Obj ? Obj[K] : Fallback;
|
|
173
|
-
/**
|
|
174
|
-
* @public
|
|
175
|
-
*
|
|
176
|
-
* utility class to help with autocompletion / documentation
|
|
177
|
-
* in the editor while while defining the signature of custom plugins.
|
|
178
|
-
*/
|
|
179
|
-
export interface PluginSignature {
|
|
180
|
-
/**
|
|
181
|
-
* Meta is how plugins can manage per-{table,columns,rows}
|
|
182
|
-
* state, event listeners, and general public API
|
|
183
|
-
*/
|
|
184
|
-
Meta?: {
|
|
185
|
-
/**
|
|
186
|
-
* If a plugin has Table meta/state,
|
|
187
|
-
* the shape of that state can be described here
|
|
188
|
-
*/
|
|
189
|
-
Table?: unknown;
|
|
190
|
-
/**
|
|
191
|
-
* If a plugin has Column meta/state,
|
|
192
|
-
* the shape of that state can be described here
|
|
193
|
-
*/
|
|
194
|
-
Column?: unknown;
|
|
195
|
-
/**
|
|
196
|
-
* If a plugin has Row meta/state,
|
|
197
|
-
* the shape of that state can be described here
|
|
198
|
-
*/
|
|
199
|
-
Row?: unknown;
|
|
200
|
-
};
|
|
201
|
-
Options?: {
|
|
202
|
-
/**
|
|
203
|
-
* If a plugin has options configurable for the whole table,
|
|
204
|
-
* those can be specified here.
|
|
205
|
-
*
|
|
206
|
-
* These are passed via the the `withOptions` API
|
|
207
|
-
*
|
|
208
|
-
* ```js
|
|
209
|
-
* headlessTable(this?, {
|
|
210
|
-
* // ...
|
|
211
|
-
* plugins: [
|
|
212
|
-
* MyPlugin.withOptions(() => {
|
|
213
|
-
* // the return value here is this is Signature['Options']['Plugin']
|
|
214
|
-
* return {};
|
|
215
|
-
* })
|
|
216
|
-
* ]
|
|
217
|
-
* })
|
|
218
|
-
* ```
|
|
219
|
-
*/
|
|
220
|
-
Plugin?: unknown;
|
|
221
|
-
/**
|
|
222
|
-
* If a plugin has options configurable per column,
|
|
223
|
-
* those can be specified here
|
|
224
|
-
*
|
|
225
|
-
* These are passed via the the `forColumn` API
|
|
226
|
-
*
|
|
227
|
-
* ```js
|
|
228
|
-
* headlessTable(this?, {
|
|
229
|
-
* // ...
|
|
230
|
-
* columns: () => [
|
|
231
|
-
* MyPlugin.forColumn(() => {
|
|
232
|
-
* // the return value here is this is Signature['Options']['Column']
|
|
233
|
-
* return {};
|
|
234
|
-
* })
|
|
235
|
-
* ]
|
|
236
|
-
* })
|
|
237
|
-
* ```
|
|
238
|
-
*/
|
|
239
|
-
Column?: unknown;
|
|
240
|
-
};
|
|
241
|
-
}
|
|
242
|
-
/**
|
|
243
|
-
* @private default type
|
|
244
|
-
*
|
|
245
|
-
* Describes the shape of all the dynamic parts of a Plugin.
|
|
246
|
-
*
|
|
247
|
-
* There are no row options, because rows are not statically configurable.
|
|
248
|
-
*/
|
|
249
|
-
export interface DefaultPluginSignature {
|
|
250
|
-
Meta: {
|
|
251
|
-
Row: unknown;
|
|
252
|
-
Column: unknown;
|
|
253
|
-
Table: unknown;
|
|
254
|
-
};
|
|
255
|
-
Options: {
|
|
256
|
-
Plugin: unknown;
|
|
257
|
-
Column: unknown;
|
|
258
|
-
};
|
|
259
|
-
}
|
|
260
|
-
/**
|
|
261
|
-
* @private utility type
|
|
262
|
-
*/
|
|
263
|
-
export type TableMetaFor<Signature> = Signature extends {
|
|
264
|
-
Meta: {
|
|
265
|
-
Table: unknown;
|
|
266
|
-
};
|
|
267
|
-
} ? GetOrElse<Signature['Meta'], 'Table', never> : never;
|
|
268
|
-
/**
|
|
269
|
-
* @private utility type
|
|
270
|
-
*/
|
|
271
|
-
export type ColumnMetaFor<Signature> = Signature extends {
|
|
272
|
-
Meta: {
|
|
273
|
-
Column: unknown;
|
|
274
|
-
};
|
|
275
|
-
} ? GetOrElse<Signature['Meta'], 'Column', never> : never;
|
|
276
|
-
/**
|
|
277
|
-
* @private utility type
|
|
278
|
-
*/
|
|
279
|
-
export type RowMetaFor<Signature> = Signature extends {
|
|
280
|
-
Meta: {
|
|
281
|
-
Row: unknown;
|
|
282
|
-
};
|
|
283
|
-
} ? GetOrElse<Signature['Meta'], 'Row', never> : never;
|
|
284
|
-
/**
|
|
285
|
-
* @private utility type
|
|
286
|
-
*/
|
|
287
|
-
export type OptionsFor<Signature> = Signature extends {
|
|
288
|
-
Options: object;
|
|
289
|
-
} ? GetOrElse<Signature['Options'], 'Plugin', EmptyObject> : EmptyObject;
|
|
290
|
-
/**
|
|
291
|
-
* @private utility type
|
|
292
|
-
*/
|
|
293
|
-
export type ColumnOptionsFor<Signature> = Signature extends {
|
|
294
|
-
Options: object;
|
|
295
|
-
} ? GetOrElse<Signature['Options'], 'Column', EmptyObject> : EmptyObject;
|
|
296
|
-
declare const Empty: unique symbol;
|
|
297
|
-
/**
|
|
298
|
-
* This provides us a way to have a "fallback" which represents an empty object,
|
|
299
|
-
* without the downsides of how TS treats `{}`. Specifically: this will
|
|
300
|
-
* correctly leverage "excess property checking" so that, given a component
|
|
301
|
-
* which has no named args, if someone invokes it with any named args, they will
|
|
302
|
-
* get a type error.
|
|
303
|
-
*
|
|
304
|
-
* @internal This is exported so declaration emit works (if it were not emitted,
|
|
305
|
-
* declarations which fall back to it would not work). It is *not* intended for
|
|
306
|
-
* public usage, and the specific mechanics it uses may change at any time.
|
|
307
|
-
* The location of this export *is* part of the public API, because moving it
|
|
308
|
-
* will break existing declarations, but is not legal for end users to import
|
|
309
|
-
* themselves, so ***DO NOT RELY ON IT***.
|
|
310
|
-
*/
|
|
311
|
-
export type EmptyObject = {
|
|
312
|
-
[Empty]?: true;
|
|
313
|
-
};
|
|
314
|
-
export {};
|
|
315
|
-
//# sourceMappingURL=plugins.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"plugins.d.ts","sourceRoot":"","sources":["../../../src/-private/interfaces/plugins.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAE5D,KAAK,UAAU,CAAC,CAAC,IAAI,CAAC,SAAS,KAAK,CAAC,MAAM,QAAQ,CAAC,GAAG,QAAQ,GAAG,CAAC,CAAC;AAEpE;;;;;GAKG;AACH,MAAM,MAAM,WAAW,CAAC,UAAU,IAAI,UAAU,GAAG;IACjD,GAAG,EAAE,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,UAAU,CAAC;IACxC,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,sBAAsB,CAAC,UAAU,IAAI,UAAU,GAAG;IAC5D,WAAW,EAAE,WAAW,CAAC,UAAU,CAAC,CAAC;CACtC,CAAC;AAEF;;;;GAIG;AACH,MAAM,WAAW,SAAS,CAAC,CAAC,SAAS,KAAK,GAAG,KAAK;IAChD,MAAM,EAAE,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;IAC9B,KAAK,EAAE,CAAC,CAAC;CACV;AAED;;;;GAIG;AACH,MAAM,WAAW,MAAM,CAAC,CAAC,SAAS,KAAK,GAAG,KAAK;IAC7C,GAAG,EAAE,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;IACxB,KAAK,EAAE,CAAC,C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