@universal-ember/table 3.6.0 → 3.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- 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 -127
- 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 -276
- 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,128 +0,0 @@
|
|
|
1
|
-
import Modifier from 'ember-modifier';
|
|
2
|
-
import type { ColumnMeta } from './plugin.ts';
|
|
3
|
-
import type { Column } from '../../-private/column.ts';
|
|
4
|
-
/**
|
|
5
|
-
* - why are mouse events used instead of drag events?
|
|
6
|
-
* - why not use the "draggable" attribute?
|
|
7
|
-
*
|
|
8
|
-
* It seems drag events are more for files and/or moving images around on a page
|
|
9
|
-
* dragging an image, for example, has a ghost of that image until it is dropped.
|
|
10
|
-
* The same thing happens with text.
|
|
11
|
-
* This prevents us from having total control of the styling of how dragging works.
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*/
|
|
16
|
-
declare class ResizeHandle<DataType = unknown> extends Modifier<{
|
|
17
|
-
Args: {
|
|
18
|
-
Positional: [Column<DataType>];
|
|
19
|
-
};
|
|
20
|
-
}> {
|
|
21
|
-
dragHandle: HTMLElement;
|
|
22
|
-
column: Column<DataType>;
|
|
23
|
-
meta: ColumnMeta;
|
|
24
|
-
pointerStartX: number;
|
|
25
|
-
pointerStartY: number;
|
|
26
|
-
pointerX: number;
|
|
27
|
-
pointerY: number;
|
|
28
|
-
dragFrame: number;
|
|
29
|
-
keyDistance: number;
|
|
30
|
-
keyFrame: number;
|
|
31
|
-
lastKey: number;
|
|
32
|
-
token?: unknown;
|
|
33
|
-
isSetup: boolean;
|
|
34
|
-
modify(element: Element, [column]: [Column<DataType>]): void;
|
|
35
|
-
setup: () => void;
|
|
36
|
-
setPosition: (event: Event) => void;
|
|
37
|
-
setStartPosition: (event: Event) => void;
|
|
38
|
-
/**
|
|
39
|
-
* queueUpdate takes an optional function argument that is called
|
|
40
|
-
* in the requestAnimationFrame callback _after_ the resize function.
|
|
41
|
-
*
|
|
42
|
-
* We can use this to ensure that preferences are only ever saved after
|
|
43
|
-
* we have completed column resizing.
|
|
44
|
-
*
|
|
45
|
-
* Because the requestAnimationFrame 'hides' these function calls from the
|
|
46
|
-
* the ember test waiter, we also ensure that we track them by also cancelling
|
|
47
|
-
* the waiter in the requestAnimationFrame callback.
|
|
48
|
-
*/
|
|
49
|
-
queueUpdate: (callback?: () => void) => void;
|
|
50
|
-
dragEndHandler: () => void;
|
|
51
|
-
dragMove: (event: Event) => void;
|
|
52
|
-
dragStartHandler: (event: Event) => void;
|
|
53
|
-
keyHandler: (event: KeyboardEvent) => void;
|
|
54
|
-
}
|
|
55
|
-
/**
|
|
56
|
-
* Modifier to attach to the column resize handles.
|
|
57
|
-
* This provides both keyboard and mouse support for resizing columns.
|
|
58
|
-
* (provided the resize handle element is focusable -- so consider using
|
|
59
|
-
* a button for the resize element)
|
|
60
|
-
*
|
|
61
|
-
* @example
|
|
62
|
-
* ```js
|
|
63
|
-
* import Component from '@glimmer/component';
|
|
64
|
-
* import { meta } from '@universal-ember/table/plugins';
|
|
65
|
-
* import { resizeHandle, ColumnResizing } from '@universal-ember/table/plugins/column-resizing';
|
|
66
|
-
*
|
|
67
|
-
* export default class TableHead extends Component {
|
|
68
|
-
* /* ✂️ *\/
|
|
69
|
-
*
|
|
70
|
-
* <template>
|
|
71
|
-
* <thead>
|
|
72
|
-
* <tr>
|
|
73
|
-
* {{#each this.columns as |column|}}
|
|
74
|
-
* <th>
|
|
75
|
-
* <span>{{column.name}}</span>
|
|
76
|
-
* <button {{resizeHandle column}}></button>
|
|
77
|
-
* </th>
|
|
78
|
-
* {{/each}}
|
|
79
|
-
* </tr>
|
|
80
|
-
* </thead>
|
|
81
|
-
* </template>
|
|
82
|
-
* }
|
|
83
|
-
* ```
|
|
84
|
-
*
|
|
85
|
-
* Width and isResizing state is maintained on the "meta"
|
|
86
|
-
* class so that the users may choose per-column stylings for
|
|
87
|
-
* isResizing and dragging behaviors.
|
|
88
|
-
*
|
|
89
|
-
* For example, while dragging, the user may add a class based on the
|
|
90
|
-
* isDragging property.
|
|
91
|
-
*
|
|
92
|
-
* @example
|
|
93
|
-
* ```js
|
|
94
|
-
* import Component from '@glimmer/component';
|
|
95
|
-
* import { meta } from '@universal-ember/table/plugins';
|
|
96
|
-
* import { resizeHandle, ColumnResizing } from '@universal-ember/table/plugins/column-resizing';
|
|
97
|
-
*
|
|
98
|
-
* export default class TableHead extends Component {
|
|
99
|
-
* /* ✂️ *\/
|
|
100
|
-
*
|
|
101
|
-
* isDragging = (column) => {
|
|
102
|
-
* return meta.forColumn(column, ColumnResizing).isDragging;
|
|
103
|
-
* }
|
|
104
|
-
*
|
|
105
|
-
* <template>
|
|
106
|
-
* <thead>
|
|
107
|
-
* <tr>
|
|
108
|
-
* {{#each this.columns as |column|}}
|
|
109
|
-
* <th class="header {{if (this.isDragging column) 'blue'}}">
|
|
110
|
-
* <span>{{column.name}}</span>
|
|
111
|
-
* <button {{resizeHandle column}}></button>
|
|
112
|
-
* </th>
|
|
113
|
-
* {{/each}}
|
|
114
|
-
* </tr>
|
|
115
|
-
* </thead>
|
|
116
|
-
* </template>
|
|
117
|
-
* }
|
|
118
|
-
* ```
|
|
119
|
-
*
|
|
120
|
-
*
|
|
121
|
-
* @note
|
|
122
|
-
* The logic here is copied from the drag slider in
|
|
123
|
-
* https://limber.glimdown.com/
|
|
124
|
-
* See: "resize-handle" on Limber's GitHub
|
|
125
|
-
*/
|
|
126
|
-
export declare const resizeHandle: typeof ResizeHandle;
|
|
127
|
-
export {};
|
|
128
|
-
//# sourceMappingURL=handle.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"handle.d.ts","sourceRoot":"","sources":["../../../src/plugins/column-resizing/handle.ts"],"names":[],"mappings":"AAGA,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AAKtC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM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|
|
2
|
-
import type { Column } from '../../index.ts';
|
|
3
|
-
/**
|
|
4
|
-
* Is the column resizable?
|
|
5
|
-
* This checks if resizing is enabled for this specific column,
|
|
6
|
-
*/
|
|
7
|
-
export declare const isResizable: <DataType = unknown>(column: Column<DataType>) => boolean;
|
|
8
|
-
/**
|
|
9
|
-
* The column actively being resized by the user.
|
|
10
|
-
*
|
|
11
|
-
* Note that during resizing, multiple columns are resized at once,
|
|
12
|
-
* dependending on the boundaries of the resize events.
|
|
13
|
-
*
|
|
14
|
-
* The other columns being resized as a consequence of "this" column will not
|
|
15
|
-
* be marked as isResizing, because this is a user-scoped question:
|
|
16
|
-
* "Is the user directly resizing this column?"
|
|
17
|
-
*/
|
|
18
|
-
export declare const isResizing: <DataType = unknown>(column: Column<DataType>) => boolean;
|
|
19
|
-
/**
|
|
20
|
-
* Does the column have room to shrink?
|
|
21
|
-
*/
|
|
22
|
-
export declare const canShrink: <DataType = unknown>(column: Column<DataType>) => boolean | 0;
|
|
23
|
-
/**
|
|
24
|
-
* Does the column have a resize handle?
|
|
25
|
-
* The return value of this function can be determined by
|
|
26
|
-
* - if resizing is enabled for the column
|
|
27
|
-
* - if resizing is enabled for the whole table
|
|
28
|
-
* - or if we're asking about the first column (resize handles may only be "between" columns)
|
|
29
|
-
*/
|
|
30
|
-
export declare const hasResizeHandle: <DataType = unknown>(column: Column<DataType>) => boolean;
|
|
31
|
-
/**
|
|
32
|
-
* In this plugin (by default), styles are only applied to the headers automatically.
|
|
33
|
-
* in <Table> UIs, the header cells control the widths of all cells in that column.
|
|
34
|
-
* There are other kinds of tabular-like markup that may want to grab the widths of columns,
|
|
35
|
-
* because The Platform does not manage that automatically (like if divs and roles were used manually)
|
|
36
|
-
*
|
|
37
|
-
* This utility is meant to be applied to the `style` attribute of a particular td-like element.
|
|
38
|
-
*/
|
|
39
|
-
export declare const styleStringFor: <DataType = unknown>(column: Column<DataType>) => ReturnType<typeof htmlSafe>;
|
|
40
|
-
//# sourceMappingURL=helpers.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../src/plugins/column-resizing/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAK3C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAE7C;;;GAGG;AACH,eAAO,MAAM,WAAW,GAAI,QAAQ,GAAG,OAAO,EAAE,QAAQ,MAAM,CAAC,QAAQ,CAAC,YACpB,CAAC;AAErD;;;;;;;;;GASG;AACH,eAAO,MAAM,UAAU,GAAI,QAAQ,GAAG,OAAO,EAAE,QAAQ,MAAM,CAAC,QAAQ,CAAC,YACpB,CAAC;AAEpD;;GAEG;AACH,eAAO,MAAM,SAAS,GAAI,QAAQ,GAAG,OAAO,EAAE,QAAQ,MAAM,CAAC,QAAQ,CAAC,gBACpB,CAAC;AAEnD;;;;;;GAMG;AACH,eAAO,MAAM,eAAe,GAAI,QAAQ,GAAG,OAAO,EAAE,QAAQ,MAAM,CAAC,QAAQ,CAAC,YACpB,CAAC;AAEzD;;;;;;;GAOG;AACH,eAAO,MAAM,cAAc,GAAI,QAAQ,GAAG,OAAO,EAC/C,QAAQ,MAAM,CAAC,QAAQ,CAAC,KACvB,UAAU,CAAC,OAAO,QAAQ,CAiB5B,CAAC"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export { resizeHandle } from './handle.ts';
|
|
2
|
-
export * from './helpers.ts';
|
|
3
|
-
export { ColumnResizing } from './plugin.ts';
|
|
4
|
-
export { ColumnResizing as Plugin } from './plugin.ts';
|
|
5
|
-
export type { ColumnOptions, TableOptions } from './plugin.ts';
|
|
6
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/column-resizing/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,cAAc,cAAc,CAAC;AAC7B,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,cAAc,IAAI,MAAM,EAAE,MAAM,aAAa,CAAC;AAGvD,YAAY,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -1,172 +0,0 @@
|
|
|
1
|
-
import { BasePlugin } from '../-private/base.ts';
|
|
2
|
-
import type { ColumnApi, PluginPreferences } from '../../plugins/index.ts';
|
|
3
|
-
import type { Column, Table } from '../../index.ts';
|
|
4
|
-
interface ColumnResizePreferences extends PluginPreferences {
|
|
5
|
-
columns: {
|
|
6
|
-
[columnKey: string]: {
|
|
7
|
-
width?: number;
|
|
8
|
-
};
|
|
9
|
-
};
|
|
10
|
-
}
|
|
11
|
-
declare module '@universal-ember/table/plugins' {
|
|
12
|
-
interface Registry {
|
|
13
|
-
ColumnResizing?: ColumnResizePreferences;
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
export interface ColumnOptions {
|
|
17
|
-
/**
|
|
18
|
-
* Force a starting width
|
|
19
|
-
* This may not be less than the minWidth
|
|
20
|
-
*/
|
|
21
|
-
width?: number;
|
|
22
|
-
/**
|
|
23
|
-
* Default: 128px
|
|
24
|
-
*/
|
|
25
|
-
minWidth?: number;
|
|
26
|
-
/**
|
|
27
|
-
* Flip if the column is resizable or not.
|
|
28
|
-
* The default is whatever the table's plugin option is set to
|
|
29
|
-
* (and then yet again true, if not set at all)
|
|
30
|
-
*/
|
|
31
|
-
isResizable?: boolean;
|
|
32
|
-
}
|
|
33
|
-
export interface TableOptions {
|
|
34
|
-
/**
|
|
35
|
-
* Toggle whether the table is able to be resized at all
|
|
36
|
-
*
|
|
37
|
-
* default :true
|
|
38
|
-
*/
|
|
39
|
-
enabled?: boolean;
|
|
40
|
-
/**
|
|
41
|
-
* By default, each column's "handle" position is on the
|
|
42
|
-
* left-hand side of the column.
|
|
43
|
-
*
|
|
44
|
-
* If, for style-reasons, you want to move it to the right,
|
|
45
|
-
* this option should reflect that so that the calculations can be
|
|
46
|
-
* updated to match the expected behavior of which column(s) grow/shrink
|
|
47
|
-
*
|
|
48
|
-
* Valid values are 'left' or 'right'
|
|
49
|
-
*/
|
|
50
|
-
handlePosition?: string;
|
|
51
|
-
/**
|
|
52
|
-
* Specify the table layout strategy for column resizing.
|
|
53
|
-
*
|
|
54
|
-
* - 'auto': Uses complex redistribution logic where resizing one column
|
|
55
|
-
* affects neighboring columns (default, preserves existing behavior)
|
|
56
|
-
* - 'fixed': Simple per-column resizing suitable for CSS table-layout: fixed
|
|
57
|
-
*
|
|
58
|
-
* Valid values are 'auto' or 'fixed'
|
|
59
|
-
*
|
|
60
|
-
* default: 'auto'
|
|
61
|
-
*/
|
|
62
|
-
tableLayout?: string;
|
|
63
|
-
}
|
|
64
|
-
interface Signature {
|
|
65
|
-
Meta: {
|
|
66
|
-
Column: ColumnMeta;
|
|
67
|
-
Table: TableMeta;
|
|
68
|
-
};
|
|
69
|
-
Options: {
|
|
70
|
-
Plugin: TableOptions;
|
|
71
|
-
Column: ColumnOptions;
|
|
72
|
-
};
|
|
73
|
-
}
|
|
74
|
-
/**
|
|
75
|
-
* One instance of a plugin exists per table
|
|
76
|
-
* but a plugin can have a "Meta" for each column
|
|
77
|
-
*/
|
|
78
|
-
export declare class ColumnResizing extends BasePlugin<Signature> {
|
|
79
|
-
name: string;
|
|
80
|
-
static features: string[];
|
|
81
|
-
meta: {
|
|
82
|
-
column: typeof ColumnMeta;
|
|
83
|
-
table: typeof TableMeta;
|
|
84
|
-
};
|
|
85
|
-
headerCellModifier: (element: HTMLElement, { column }: ColumnApi) => void;
|
|
86
|
-
/**
|
|
87
|
-
* This is what ends up calling resize when the browser changes
|
|
88
|
-
* (assuming that the containing element's styles stretch to fill the space)
|
|
89
|
-
*
|
|
90
|
-
* Later, when container queries are more broadly supported, we'll want to watch
|
|
91
|
-
* the container instead of the window to prevent unneeded updates (as a window can change
|
|
92
|
-
* size without the container changing size)
|
|
93
|
-
*/
|
|
94
|
-
containerModifier: typeof resizeObserver;
|
|
95
|
-
reset(): void;
|
|
96
|
-
}
|
|
97
|
-
/**
|
|
98
|
-
* @private
|
|
99
|
-
*
|
|
100
|
-
* Contains resizable information for a particular column
|
|
101
|
-
*/
|
|
102
|
-
export declare class ColumnMeta {
|
|
103
|
-
private column;
|
|
104
|
-
constructor(column: Column);
|
|
105
|
-
_width?: number;
|
|
106
|
-
isResizing: boolean;
|
|
107
|
-
get tableMeta(): TableMeta;
|
|
108
|
-
get options(): {
|
|
109
|
-
/**
|
|
110
|
-
* Force a starting width
|
|
111
|
-
* This may not be less than the minWidth
|
|
112
|
-
*/
|
|
113
|
-
width?: number;
|
|
114
|
-
minWidth: number;
|
|
115
|
-
/**
|
|
116
|
-
* Flip if the column is resizable or not.
|
|
117
|
-
* The default is whatever the table's plugin option is set to
|
|
118
|
-
* (and then yet again true, if not set at all)
|
|
119
|
-
*/
|
|
120
|
-
isResizable?: boolean;
|
|
121
|
-
};
|
|
122
|
-
get key(): string;
|
|
123
|
-
get minWidth(): number;
|
|
124
|
-
get initialWidth(): number | undefined;
|
|
125
|
-
get canShrink(): boolean | 0;
|
|
126
|
-
get roomToShrink(): number;
|
|
127
|
-
get isResizable(): boolean;
|
|
128
|
-
get hasResizeHandle(): boolean;
|
|
129
|
-
get width(): number;
|
|
130
|
-
set width(value: number);
|
|
131
|
-
get style(): Partial<Pick<CSSStyleDeclaration, "width" | "minWidth">>;
|
|
132
|
-
resize(delta: number): void;
|
|
133
|
-
save(): void;
|
|
134
|
-
}
|
|
135
|
-
/**
|
|
136
|
-
* @private
|
|
137
|
-
*
|
|
138
|
-
* Contains resizable and width information regarding the table as a whole
|
|
139
|
-
*/
|
|
140
|
-
export declare class TableMeta {
|
|
141
|
-
#private;
|
|
142
|
-
private table;
|
|
143
|
-
constructor(table: Table);
|
|
144
|
-
scrollContainerHeight?: number;
|
|
145
|
-
scrollContainerWidth?: number;
|
|
146
|
-
get options(): Partial<TableOptions>;
|
|
147
|
-
get isResizable(): boolean;
|
|
148
|
-
get defaultColumnWidth(): number | undefined;
|
|
149
|
-
get visibleColumnMetas(): ColumnMeta[];
|
|
150
|
-
get totalInitialColumnWidths(): number;
|
|
151
|
-
get columnsWithoutInitialWidth(): ColumnMeta[];
|
|
152
|
-
get totalVisibleColumnsWidth(): number;
|
|
153
|
-
saveColWidths(visibleColumnMetas: ColumnMeta[]): void;
|
|
154
|
-
reset(): void;
|
|
155
|
-
onTableResize(entry: ResizeObserverEntry): void;
|
|
156
|
-
resizeColumn<DataType = unknown>(column: Column<DataType>, delta: number): void;
|
|
157
|
-
}
|
|
158
|
-
/**
|
|
159
|
-
* @private
|
|
160
|
-
* included in the same file as the plugin due to circular dependency
|
|
161
|
-
*
|
|
162
|
-
* This goes on the containing element
|
|
163
|
-
*
|
|
164
|
-
* @example
|
|
165
|
-
* ```hbs
|
|
166
|
-
* <div {{resizeObserver @table}}>
|
|
167
|
-
* <table>
|
|
168
|
-
* ```
|
|
169
|
-
*/
|
|
170
|
-
declare function resizeObserver(element: HTMLElement, table: Table): () => void;
|
|
171
|
-
export {};
|
|
172
|
-
//# sourceMappingURL=plugin.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../src/plugins/column-resizing/plugin.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,UAAU,EAA0B,MAAM,qBAAqB,CAAC;AAQzE,OAAO,KAAK,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3E,OAAO,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAEpD,UAAU,uBAAwB,SAAQ,iBAAiB;IACzD,OAAO,EAAE;QACP,CAAC,SAAS,EAAE,MAAM,GAAG;YACnB,KAAK,CAAC,EAAE,MAAM,CAAC;SAChB,CAAC;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,QAAQ,WAEX;IAED,IAAI,YAAY,uBAkBf;IAED,IAAI,SAAS,gBAEZ;IAED,IAAI,YAAY,WAEf;IAED,IAAI,WAAW,YAEd;IAED,IAAI,eAAe,YAgBlB;IAED,IAAI,KAAK,WAYR;IAED,IAAI,KAAK,CAAC,KAAK,QAAA,EAEd;IAED,IAAI,KAAK,6DAOR;IAGD,MAAM,CAAC,KAAK,EAAE,MAAM;IAKpB,IAAI;CAGL;AAkCD;;;;GAIG;AACH,qBAAa,SAAS;;IACR,OAAO,CAAC,KAAK;gBAAL,KAAK,EAAE,KAAK;IAEvB,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAEvC,IAAI,OAAO,0BAEV;IAED,IAAI,WAAW,YAEd;IAED,IAAI,kBAAkB,uBAOrB;IAMD,IAAI,kBAAkB,iBAIrB;IAED,IAAI,wBAAwB,WAK3B;IAED,IAAI,0BAA0B,iBAE7B;IAED,IAAI,wBAAwB,WAK3B;IAGD,aAAa,CAAC,kBAAkB,EAAE,UAAU,EAAE;IAc9C,KAAK;IASL,aAAa,CAAC,KAAK,EAAE,mBAAmB;IAyBxC,YAAY,CAAC,QAAQ,GAAG,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,QAAQ,CAAC,EAAE,KAAK,EAAE,MAAM;CAkGzE;AAED;;;;;;;;;;;GAWG;AACH,iBAAS,cAAc,CAAC,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,KAAK,cAQzD"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @private
|
|
3
|
-
* included in the same file as the plugin due to circular dependency
|
|
4
|
-
*
|
|
5
|
-
* This goes on the containing element
|
|
6
|
-
*
|
|
7
|
-
* @example
|
|
8
|
-
* ```hbs
|
|
9
|
-
* <div {{resizeObserver @table}}>
|
|
10
|
-
* <table>
|
|
11
|
-
* ```
|
|
12
|
-
*/
|
|
13
|
-
export declare function resizeObserver(element: HTMLElement, table: any): () => void;
|
|
14
|
-
//# sourceMappingURL=resize-observer.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"resize-observer.d.ts","sourceRoot":"","sources":["../../../src/plugins/column-resizing/resize-observer.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;GAWG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,GAAG,cAQ9D"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
We want to make sure we get the clientWidth rather than the
|
|
3
|
-
offsetWidth so that the width of the scrollbar is not included when we're
|
|
4
|
-
resizing the columns in the table so that they fit within the scroll
|
|
5
|
-
container
|
|
6
|
-
|
|
7
|
-
Ideally we would just use `entry.contentRect.width`, which we can access
|
|
8
|
-
without triggering any reflows. Unfortunately there are differences in the
|
|
9
|
-
way that this works in Chrome vs Firefox. In Chrome, the
|
|
10
|
-
`entry.contentRect.width` works the same as `entry.target.clientWidth`,
|
|
11
|
-
which does not include the width that is taken up by the vertical scrollbar
|
|
12
|
-
if the element overflows. In Firefox the `entry.contentRect.width` is the
|
|
13
|
-
same as `entry.target.offsetWidth`, which does include the width taken up by
|
|
14
|
-
the scrollbar.
|
|
15
|
-
|
|
16
|
-
We use `getBoundingClientRect()` because it does not round the value to an
|
|
17
|
-
integer, which can sometimes cause subpixel gaps.
|
|
18
|
-
**/
|
|
19
|
-
export declare const getAccurateClientWidth: (element: HTMLElement) => number;
|
|
20
|
-
export declare const totalGapOf: (element?: Element | null) => number;
|
|
21
|
-
export declare const getAccurateClientHeight: (element: HTMLElement) => number;
|
|
22
|
-
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/plugins/column-resizing/utils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,sBAAsB,GAAI,SAAS,WAAW,WAO1D,CAAC;AAEF,eAAO,MAAM,UAAU,GAAI,UAAU,OAAO,GAAG,IAAI,WAoBlD,CAAC;AAEF,eAAO,MAAM,uBAAuB,GAAI,SAAS,WAAW,WAI3D,CAAC"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { Column } from '../../index.ts';
|
|
2
|
-
/**
|
|
3
|
-
* Hide a column
|
|
4
|
-
*/
|
|
5
|
-
export declare const hide: <DataType = unknown>(column: Column<DataType>) => void;
|
|
6
|
-
/**
|
|
7
|
-
* Show a column
|
|
8
|
-
*/
|
|
9
|
-
export declare const show: <DataType = unknown>(column: Column<DataType>) => void;
|
|
10
|
-
/**
|
|
11
|
-
* Ask if a column is presently supposed to be visible
|
|
12
|
-
*/
|
|
13
|
-
export declare const isVisible: <DataType = unknown>(column: Column<DataType>) => boolean;
|
|
14
|
-
/**
|
|
15
|
-
* Ask if a column is presently supposed to be hidden
|
|
16
|
-
*/
|
|
17
|
-
export declare const isHidden: <DataType = unknown>(column: Column<DataType>) => boolean;
|
|
18
|
-
//# sourceMappingURL=helpers.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../src/plugins/column-visibility/helpers.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAE7C;;GAEG;AACH,eAAO,MAAM,IAAI,GAAI,QAAQ,GAAG,OAAO,EAAE,QAAQ,MAAM,CAAC,QAAQ,CAAC,SAChB,CAAC;AAElD;;GAEG;AACH,eAAO,MAAM,IAAI,GAAI,QAAQ,GAAG,OAAO,EAAE,QAAQ,MAAM,CAAC,QAAQ,CAAC,SAChB,CAAC;AAElD;;GAEG;AACH,eAAO,MAAM,SAAS,GAAI,QAAQ,GAAG,OAAO,EAAE,QAAQ,MAAM,CAAC,QAAQ,CAAC,YAClB,CAAC;AAErD;;GAEG;AACH,eAAO,MAAM,QAAQ,GAAI,QAAQ,GAAG,OAAO,EAAE,QAAQ,MAAM,CAAC,QAAQ,CAAC,YAClB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/column-visibility/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,gBAAgB,IAAI,MAAM,EAAE,MAAM,aAAa,CAAC;AAGzD,YAAY,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import { BasePlugin } from '../-private/base.ts';
|
|
2
|
-
import type { Plugin, PluginPreferences } from '../../plugins/index.ts';
|
|
3
|
-
import type { Column, Table } from '../../index.ts';
|
|
4
|
-
interface ColumnVisibilityPreferences extends PluginPreferences {
|
|
5
|
-
columns: {
|
|
6
|
-
[columnKey: string]: {
|
|
7
|
-
isVisible?: boolean;
|
|
8
|
-
};
|
|
9
|
-
};
|
|
10
|
-
}
|
|
11
|
-
declare module '@universal-ember/table/plugins' {
|
|
12
|
-
interface Registry {
|
|
13
|
-
ColumnVisibility?: ColumnVisibilityPreferences;
|
|
14
|
-
'column-visibility'?: ColumnVisibilityPreferences;
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
export interface Signature {
|
|
18
|
-
Meta: {
|
|
19
|
-
Table: TableMeta;
|
|
20
|
-
Column: ColumnMeta;
|
|
21
|
-
};
|
|
22
|
-
Options: {
|
|
23
|
-
Plugin: {
|
|
24
|
-
enabled?: boolean;
|
|
25
|
-
};
|
|
26
|
-
Column: {
|
|
27
|
-
/**
|
|
28
|
-
* The default visibilty of the column, when rendered.
|
|
29
|
-
* The column can still be toggled on and off.
|
|
30
|
-
*
|
|
31
|
-
* When interacting with preferences, the value stored in preferenced
|
|
32
|
-
* will be the inverse of this value (to save space in storage).
|
|
33
|
-
*/
|
|
34
|
-
isVisible?: boolean;
|
|
35
|
-
};
|
|
36
|
-
};
|
|
37
|
-
}
|
|
38
|
-
export declare class ColumnVisibility extends BasePlugin<Signature> implements Plugin<Signature> {
|
|
39
|
-
name: string;
|
|
40
|
-
static features: string[];
|
|
41
|
-
meta: {
|
|
42
|
-
column: typeof ColumnMeta;
|
|
43
|
-
table: typeof TableMeta;
|
|
44
|
-
};
|
|
45
|
-
reset(): void;
|
|
46
|
-
get columns(): Column<unknown>[];
|
|
47
|
-
}
|
|
48
|
-
export declare class ColumnMeta<Data = unknown> {
|
|
49
|
-
private column;
|
|
50
|
-
constructor(column: Column<Data>);
|
|
51
|
-
get isVisible(): boolean;
|
|
52
|
-
get isHidden(): boolean;
|
|
53
|
-
hide: () => void;
|
|
54
|
-
show: () => void;
|
|
55
|
-
toggle: () => void;
|
|
56
|
-
}
|
|
57
|
-
export declare class TableMeta<Data = unknown> {
|
|
58
|
-
private table;
|
|
59
|
-
constructor(table: Table<Data>);
|
|
60
|
-
get visibleColumns(): Column<Data>[];
|
|
61
|
-
toggleColumnVisibility(column: Column<Data>): void;
|
|
62
|
-
}
|
|
63
|
-
export {};
|
|
64
|
-
//# sourceMappingURL=plugin.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../src/plugins/column-visibility/plugin.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAA8B,MAAM,qBAAqB,CAAC;AAE7E,OAAO,KAAK,EAAE,MAAM,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AACxE,OAAO,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAEpD,UAAU,2BAA4B,SAAQ,iBAAiB;IAC7D,OAAO,EAAE;QACP,CAAC,SAAS,EAAE,MAAM,GAAG;YACnB,SAAS,CAAC,EAAE,OAAO,CAAC;SACrB,CAAC;KACH,CAAC;CACH;AAED,OAAO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
|
-
export declare const sortDirection: <DataType = unknown>(column: Column<DataType>) => import("./types.ts").SortDirection;
|
|
6
|
-
/**
|
|
7
|
-
* Ask if a column is sortable
|
|
8
|
-
*/
|
|
9
|
-
export declare const isSortable: <DataType = unknown>(column: Column<DataType>) => boolean;
|
|
10
|
-
/**
|
|
11
|
-
* Ask if a column is ascending
|
|
12
|
-
*/
|
|
13
|
-
export declare const isAscending: <DataType = unknown>(column: Column<DataType>) => boolean;
|
|
14
|
-
/**
|
|
15
|
-
* Ask if a column is sorted descending
|
|
16
|
-
*/
|
|
17
|
-
export declare const isDescending: <DataType = unknown>(column: Column<DataType>) => boolean;
|
|
18
|
-
/**
|
|
19
|
-
* Ask if a column is not sorted
|
|
20
|
-
*/
|
|
21
|
-
export declare const isUnsorted: <DataType = unknown>(column: Column<DataType>) => boolean;
|
|
22
|
-
/**
|
|
23
|
-
* Sort the specified column's data using a tri-toggle.
|
|
24
|
-
*
|
|
25
|
-
* States go in this order:
|
|
26
|
-
* Ascending => None => Descending
|
|
27
|
-
* ⬑ ---------- <= ---------- ↲
|
|
28
|
-
*/
|
|
29
|
-
export declare const sort: <DataType = unknown>(column: Column<DataType>) => void;
|
|
30
|
-
/**
|
|
31
|
-
* Toggle a column between descending and not unsorted states
|
|
32
|
-
*/
|
|
33
|
-
export declare const sortDescending: <DataType = unknown>(column: Column<DataType>) => void;
|
|
34
|
-
/**
|
|
35
|
-
* Toggle a column between ascending and not unsorted states
|
|
36
|
-
*/
|
|
37
|
-
export declare const sortAscending: <DataType = unknown>(column: Column<DataType>) => void;
|
|
38
|
-
//# sourceMappingURL=helpers.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../src/plugins/data-sorting/helpers.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAE7C;;GAEG;AACH,eAAO,MAAM,aAAa,GAAI,QAAQ,GAAG,OAAO,EAAE,QAAQ,MAAM,CAAC,QAAQ,CAAC,uCAC3B,CAAC;AAEhD;;GAEG;AACH,eAAO,MAAM,UAAU,GAAI,QAAQ,GAAG,OAAO,EAAE,QAAQ,MAAM,CAAC,QAAQ,CAAC,YAC3B,CAAC;AAE7C;;GAEG;AACH,eAAO,MAAM,WAAW,GAAI,QAAQ,GAAG,OAAO,EAAE,QAAQ,MAAM,CAAC,QAAQ,CAAC,YAC3B,CAAC;AAE9C;;GAEG;AACH,eAAO,MAAM,YAAY,GAAI,QAAQ,GAAG,OAAO,EAAE,QAAQ,MAAM,CAAC,QAAQ,CAAC,YAC3B,CAAC;AAE/C;;GAEG;AACH,eAAO,MAAM,UAAU,GAAI,QAAQ,GAAG,OAAO,EAAE,QAAQ,MAAM,CAAC,QAAQ,CAAC,YAC3B,CAAC;AAE7C;;;;;;GAMG;AACH,eAAO,MAAM,IAAI,GAAI,QAAQ,GAAG,OAAO,EAAE,QAAQ,MAAM,CAAC,QAAQ,CAAC,SACR,CAAC;AAE1D;;GAEG;AACH,eAAO,MAAM,cAAc,GAAI,QAAQ,GAAG,OAAO,EAAE,QAAQ,MAAM,CAAC,QAAQ,CAAC,SACZ,CAAC;AAEhE;;GAEG;AACH,eAAO,MAAM,aAAa,GAAI,QAAQ,GAAG,OAAO,EAAE,QAAQ,MAAM,CAAC,QAAQ,CAAC,SACZ,CAAC"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export * from './helpers.ts';
|
|
2
|
-
export { Sorting as Plugin } from './plugin.ts';
|
|
3
|
-
export { Sorting as DataSorting } from './plugin.ts';
|
|
4
|
-
export { SortDirection } from './types.ts';
|
|
5
|
-
export type { Signature } from './plugin.ts';
|
|
6
|
-
export type { Sort, SortItem } from './types.ts';
|
|
7
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/data-sorting/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAG3C,YAAY,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAC7C,YAAY,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC"}
|