@3mo/data-grid 0.20.2 → 0.21.0-preview.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/dist/DataGrid.d.ts +6 -1
- package/dist/DataGrid.d.ts.map +1 -1
- package/dist/DataGrid.js +12 -1
- package/dist/DataGridColumn.d.ts.map +1 -1
- package/dist/DataGridColumn.js +5 -26
- package/dist/DataGridColumnHeader.d.ts.map +1 -1
- package/dist/DataGridColumnHeader.js +14 -1
- package/dist/DataGridColumnsController.d.ts +4 -3
- package/dist/DataGridColumnsController.d.ts.map +1 -1
- package/dist/DataGridColumnsController.js +44 -3
- package/dist/DataGridHeader.d.ts +3 -1
- package/dist/DataGridHeader.d.ts.map +1 -1
- package/dist/DataGridHeader.js +33 -22
- package/dist/DataGridReorderabilityController.d.ts +63 -0
- package/dist/DataGridReorderabilityController.d.ts.map +1 -0
- package/dist/DataGridReorderabilityController.js +176 -0
- package/dist/DataGridSelectionController.d.ts +1 -1
- package/dist/DataGridSelectionController.d.ts.map +1 -1
- package/dist/DataGridSortingController.d.ts +1 -0
- package/dist/DataGridSortingController.d.ts.map +1 -1
- package/dist/DataGridSortingController.js +3 -0
- package/dist/custom-elements.json +56 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/rows/DataGridDefaultRow.d.ts.map +1 -1
- package/dist/rows/DataGridDefaultRow.js +1 -0
- package/dist/rows/DataGridRow.d.ts +1 -0
- package/dist/rows/DataGridRow.d.ts.map +1 -1
- package/dist/rows/DataGridRow.js +36 -7
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
import { AsyncDirective, Controller, directive, noChange, PartType } from '@a11d/lit';
|
|
2
|
+
import { DataGridSelectability } from './DataGridSelectionController.js';
|
|
3
|
+
class DragGhostImage extends Image {
|
|
4
|
+
constructor() {
|
|
5
|
+
super(...arguments);
|
|
6
|
+
this.src = 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==';
|
|
7
|
+
}
|
|
8
|
+
static { this.instance = new DragGhostImage(); }
|
|
9
|
+
}
|
|
10
|
+
export var ReorderabilityState;
|
|
11
|
+
(function (ReorderabilityState) {
|
|
12
|
+
ReorderabilityState["Idle"] = "idle";
|
|
13
|
+
ReorderabilityState["Dragging"] = "dragging";
|
|
14
|
+
ReorderabilityState["DropBefore"] = "drop-before";
|
|
15
|
+
ReorderabilityState["DropAfter"] = "drop-after";
|
|
16
|
+
})(ReorderabilityState || (ReorderabilityState = {}));
|
|
17
|
+
export class ReorderabilityController extends Controller {
|
|
18
|
+
constructor(host, options) {
|
|
19
|
+
super(host);
|
|
20
|
+
this.host = host;
|
|
21
|
+
this.options = options;
|
|
22
|
+
this.items = new Map();
|
|
23
|
+
}
|
|
24
|
+
get item() {
|
|
25
|
+
const controller = this;
|
|
26
|
+
return directive(class extends AsyncDirective {
|
|
27
|
+
constructor(partInfo) {
|
|
28
|
+
super(partInfo);
|
|
29
|
+
if (partInfo.type !== PartType.ELEMENT) {
|
|
30
|
+
throw new Error('This directive can only be used on an element');
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
render(options) {
|
|
34
|
+
options;
|
|
35
|
+
return noChange;
|
|
36
|
+
}
|
|
37
|
+
update(part, [options]) {
|
|
38
|
+
this.part = part;
|
|
39
|
+
this.options = options;
|
|
40
|
+
const element = part.element;
|
|
41
|
+
controller.items.set(element, options);
|
|
42
|
+
element.draggable = !options.disabled;
|
|
43
|
+
element.dataset.reorderability = this.state;
|
|
44
|
+
this.addEventListeners();
|
|
45
|
+
return noChange;
|
|
46
|
+
}
|
|
47
|
+
get state() {
|
|
48
|
+
const draggingItem = controller.draggingItem;
|
|
49
|
+
switch (true) {
|
|
50
|
+
case draggingItem === undefined:
|
|
51
|
+
return ReorderabilityState.Idle;
|
|
52
|
+
case draggingItem.source === this.options.index:
|
|
53
|
+
return ReorderabilityState.Dragging;
|
|
54
|
+
case draggingItem.destination !== this.options.index:
|
|
55
|
+
return ReorderabilityState.Idle;
|
|
56
|
+
case draggingItem.source > this.options.index:
|
|
57
|
+
return ReorderabilityState.DropBefore;
|
|
58
|
+
default:
|
|
59
|
+
return ReorderabilityState.DropAfter;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
disconnected() {
|
|
63
|
+
controller.items.delete(this.part.element);
|
|
64
|
+
this.removeEventListeners();
|
|
65
|
+
}
|
|
66
|
+
reconnected() {
|
|
67
|
+
this.addEventListeners();
|
|
68
|
+
}
|
|
69
|
+
addEventListeners() {
|
|
70
|
+
if (!this.part)
|
|
71
|
+
return;
|
|
72
|
+
const element = this.part.element;
|
|
73
|
+
element.addEventListener('dragstart', controller, { capture: true });
|
|
74
|
+
element.addEventListener('dragover', controller, { capture: true });
|
|
75
|
+
element.addEventListener('drop', controller, { capture: true });
|
|
76
|
+
element.addEventListener('dragend', controller, { capture: true });
|
|
77
|
+
}
|
|
78
|
+
removeEventListeners() {
|
|
79
|
+
if (!this.part)
|
|
80
|
+
return;
|
|
81
|
+
const element = this.part.element;
|
|
82
|
+
element.removeEventListener('dragstart', controller);
|
|
83
|
+
element.removeEventListener('dragover', controller);
|
|
84
|
+
element.removeEventListener('drop', controller);
|
|
85
|
+
element.removeEventListener('dragend', controller);
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
handleEvent(e) {
|
|
90
|
+
if (this.items.get(e.currentTarget)?.disabled) {
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
switch (e.type) {
|
|
94
|
+
case 'dragstart':
|
|
95
|
+
return this.handleDragStart(e);
|
|
96
|
+
case 'dragover':
|
|
97
|
+
return this.handleDropOver(e);
|
|
98
|
+
case 'drop':
|
|
99
|
+
return this.handleDrop(e);
|
|
100
|
+
case 'dragend':
|
|
101
|
+
return this.handleDragEnd(e);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
handleDragStart(e) {
|
|
105
|
+
const index = this.items.get(e.currentTarget).index;
|
|
106
|
+
this.draggingItem = { source: index, destination: index };
|
|
107
|
+
e.dataTransfer?.setDragImage(DragGhostImage.instance, 0, 0);
|
|
108
|
+
e.dataTransfer.effectAllowed = 'move';
|
|
109
|
+
this.host.requestUpdate();
|
|
110
|
+
}
|
|
111
|
+
handleDropOver(e) {
|
|
112
|
+
if (this.draggingItem) {
|
|
113
|
+
e.preventDefault();
|
|
114
|
+
e.dataTransfer.dropEffect = 'move';
|
|
115
|
+
this.draggingItem.destination = this.items.get(e.currentTarget).index;
|
|
116
|
+
this.host.requestUpdate();
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
handleDrop(e) {
|
|
120
|
+
e.preventDefault();
|
|
121
|
+
if (!this.draggingItem) {
|
|
122
|
+
return;
|
|
123
|
+
}
|
|
124
|
+
this.handleReorder(this.draggingItem.source, this.draggingItem.destination);
|
|
125
|
+
this.draggingItem = undefined;
|
|
126
|
+
this.host.requestUpdate();
|
|
127
|
+
}
|
|
128
|
+
handleDragEnd(e) {
|
|
129
|
+
e;
|
|
130
|
+
this.draggingItem = undefined;
|
|
131
|
+
this.host.requestUpdate();
|
|
132
|
+
}
|
|
133
|
+
handleReorder(source, destination) {
|
|
134
|
+
this.options.handleReorder?.(source, destination);
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
export class DataGridReorderabilityController extends ReorderabilityController {
|
|
138
|
+
constructor(host) {
|
|
139
|
+
super(host, {});
|
|
140
|
+
this.host = host;
|
|
141
|
+
}
|
|
142
|
+
get enabled() {
|
|
143
|
+
return this.host.reorderability
|
|
144
|
+
&& this.host.sortingController.enabled === false
|
|
145
|
+
&& this.host.selectionController.selectability !== DataGridSelectability.Multiple
|
|
146
|
+
&& this.host.detailsController.hasDetails === false;
|
|
147
|
+
}
|
|
148
|
+
reorder(source, destination) {
|
|
149
|
+
this.handleReorder(source, destination);
|
|
150
|
+
}
|
|
151
|
+
handleReorder(source, destination) {
|
|
152
|
+
if (source === destination) {
|
|
153
|
+
return;
|
|
154
|
+
}
|
|
155
|
+
const d = [...this.host.data];
|
|
156
|
+
const [movedItem] = d.splice(source, 1);
|
|
157
|
+
d.splice(destination, 0, movedItem);
|
|
158
|
+
this.host.data = d;
|
|
159
|
+
const isMovingDown = source < destination;
|
|
160
|
+
this.host.reorder.dispatch([
|
|
161
|
+
{
|
|
162
|
+
record: this.host.dataRecords[destination],
|
|
163
|
+
oldIndex: source,
|
|
164
|
+
type: 'move',
|
|
165
|
+
},
|
|
166
|
+
...Array.from({ length: Math.abs(destination - source) })
|
|
167
|
+
.fill(0)
|
|
168
|
+
.map((_, i) => isMovingDown ? source + i : destination + i + 1)
|
|
169
|
+
.map(i => ({
|
|
170
|
+
record: this.host.dataRecords[i],
|
|
171
|
+
oldIndex: isMovingDown ? i + 1 : i - 1,
|
|
172
|
+
type: 'shift',
|
|
173
|
+
}))
|
|
174
|
+
]);
|
|
175
|
+
}
|
|
176
|
+
}
|
|
@@ -24,7 +24,7 @@ export declare class DataGridSelectionController<TData> {
|
|
|
24
24
|
readonly host: SelectableComponent<TData>;
|
|
25
25
|
private lastActiveSelection?;
|
|
26
26
|
constructor(host: SelectableComponent<TData>);
|
|
27
|
-
|
|
27
|
+
get selectability(): DataGridSelectability | undefined;
|
|
28
28
|
get hasSelection(): boolean;
|
|
29
29
|
private get data();
|
|
30
30
|
private get selectableData();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataGridSelectionController.d.ts","sourceRoot":"","sources":["../DataGridSelectionController.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAEjD,oBAAY,qBAAqB;IAChC,MAAM,WAAW;IACjB,QAAQ,aAAa;CACrB;AAED,oBAAY,qCAAqC;IAChD,uCAAu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AAY,EAAE,KAAK,CAAC,KAAK,CAAC,CAAA;IAC1B,gBAAgB,CAAC,CAAC,IAAI,EAAE,KAAK,GAAG,OAAO,CAAA;IACvC,QAAQ,CAAC,eAAe,CAAC,EAAE,eAAe,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAA;IACxD,QAAQ,CAAC,6BAA6B,CAAC,EAAE,qCAAqC,CAAA;IAC9E,QAAQ,CAAC,cAAc,CAAC,EAAE,OAAO,CAAA;CACjC;AAED,qBAAa,2BAA2B,CAAC,KAAK;IAMjC,QAAQ,CAAC,IAAI,EAAE,mBAAmB,CAAC,KAAK,CAAC;IALrD,OAAO,CAAC,mBAAmB,CAAC,CAG3B;gBAEoB,IAAI,EAAE,mBAAmB,CAAC,KAAK,CAAC;IAErD,IAAI,aAAa,sCAKhB;IAED,IAAI,YAAY,YAEf;IAED,OAAO,KAAK,IAAI,GAAoD;IAEpE,OAAO,KAAK,cAAc,GAAyD;IAEnF,OAAO,KAAK,YAAY,GAAoC;IAC5D,OAAO,KAAK,YAAY,QAAwC;IAEhE,OAAO,KAAK,sBAAsB,GASjC;IAED,YAAY,CAAC,IAAI,EAAE,KAAK;IAIxB,UAAU,CAAC,IAAI,EAAE,KAAK;IAItB,gBAAgB,CAAC,QAAQ,EAAE,qCAAqC;IAWhE,4BAA4B;IAI5B,YAAY,CAAC,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,0BAA0B,UAAQ;IA8B/E,SAAS;IAMT,WAAW;IAIX,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,KAAK,CAAC;CAOzB"}
|
|
@@ -17,6 +17,7 @@ interface SortableComponent<TData> {
|
|
|
17
17
|
export declare class DataGridSortingController<TData> {
|
|
18
18
|
readonly host: SortableComponent<TData>;
|
|
19
19
|
constructor(host: SortableComponent<TData>);
|
|
20
|
+
get enabled(): boolean;
|
|
20
21
|
get(): DataGridRankedSortDefinition<TData>[];
|
|
21
22
|
set(sorting: DataGridSorting<TData>): void;
|
|
22
23
|
private toNormalizedRanked;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataGridSortingController.d.ts","sourceRoot":"","sources":["../DataGridSortingController.ts"],"names":[],"mappings":"AAEA,oBAAY,uBAAuB;IAClC,UAAU,eAAe;IACzB,SAAS,cAAc;CACvB;AAED,MAAM,MAAM,yBAAyB,CAAC,KAAK,IAAI;IAC9C,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC,EAAE,CAAC,KAAK,CAAC,CAAA;IACpC,QAAQ,CAAC,QAAQ,EAAE,uBAAuB,CAAA;CAC1C,CAAA;AAED,MAAM,MAAM,4BAA4B,CAAC,KAAK,IAAI,yBAAyB,CAAC,KAAK,CAAC,GAAG;IACpF,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CACrB,CAAA;AAED,MAAM,MAAM,eAAe,CAAC,KAAK,IAC9B,yBAAyB,CAAC,KAAK,CAAC,GAChC,KAAK,CAAC,yBAAyB,CAAC,KAAK,CAAC,CAAC,CAAA;AAE1C,UAAU,iBAAiB,CAAC,KAAK;IAChC,OAAO,CAAC,EAAE,eAAe,CAAC,KAAK,CAAC,GAAG,SAAS,CAAA;IAC5C,QAAQ,CAAC,aAAa,CAAC,EAAE,eAAe,CAAC,KAAK,CAAC,4BAA4B,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;CACpF;AAED,qBAAa,yBAAyB,CAAC,KAAK;IAC/B,QAAQ,CAAC,IAAI,EAAE,iBAAiB,CAAC,KAAK,CAAC;gBAA9B,IAAI,EAAE,iBAAiB,CAAC,KAAK,CAAC;IAEnD,GAAG;IAIH,GAAG,CAAC,OAAO,EAAE,eAAe,CAAC,KAAK,CAAC;IAMnC,OAAO,CAAC,kBAAkB;IAK1B,KAAK;IAIL;;;;;;OAMG;IACH,MAAM,CAAC,QAAQ,EAAE,OAAO,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,QAAQ,CAAC,EAAE,uBAAuB;IAyCtE;;;;O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CAAC,kBAAkB;IAK1B,KAAK;IAIL;;;;;;OAMG;IACH,MAAM,CAAC,QAAQ,EAAE,OAAO,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,QAAQ,CAAC,EAAE,uBAAuB;IAyCtE;;;;OAIG;IACH,QAAQ,CAAC,IAAI,EAAE,KAAK,CAAC,KAAK,CAAC;IAI3B,UAAU,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,KAAK;CAwB3D"}
|
|
@@ -73,6 +73,11 @@
|
|
|
73
73
|
"type": "DataGridSelectionBehaviorOnDataChange",
|
|
74
74
|
"default": "\"reset\""
|
|
75
75
|
},
|
|
76
|
+
{
|
|
77
|
+
"name": "reorderability",
|
|
78
|
+
"description": "Whether the rows can be reordered. Can only be enabled if sorting is not active, selectability is not 'multiple', and no details are present.",
|
|
79
|
+
"type": "boolean | undefined"
|
|
80
|
+
},
|
|
76
81
|
{
|
|
77
82
|
"name": "multipleDetails",
|
|
78
83
|
"description": "Whether multiple details can be opened at the same time.",
|
|
@@ -197,6 +202,10 @@
|
|
|
197
202
|
"name": "sortingChange",
|
|
198
203
|
"type": "EventDispatcher<DataGridRankedSortDefinition<TData>[]>"
|
|
199
204
|
},
|
|
205
|
+
{
|
|
206
|
+
"name": "reorder",
|
|
207
|
+
"type": "EventDispatcher<DataGridReorderChange<TData>[]>"
|
|
208
|
+
},
|
|
200
209
|
{
|
|
201
210
|
"name": "rowDetailsOpen",
|
|
202
211
|
"type": "EventDispatcher<DataGridRow<TData, TDetailsElement>>"
|
|
@@ -332,6 +341,11 @@
|
|
|
332
341
|
"type": "DataGridCsvController<TData>",
|
|
333
342
|
"default": "\"new DataGridCsvController<TData>(this)\""
|
|
334
343
|
},
|
|
344
|
+
{
|
|
345
|
+
"name": "reorderabilityController",
|
|
346
|
+
"type": "DataGridReorderabilityController<TData>",
|
|
347
|
+
"default": "\"new DataGridReorderabilityController(this)\""
|
|
348
|
+
},
|
|
335
349
|
{
|
|
336
350
|
"name": "rowIntersectionObserver",
|
|
337
351
|
"type": "IntersectionObserver | undefined"
|
|
@@ -432,6 +446,12 @@
|
|
|
432
446
|
"type": "DataGridSelectionBehaviorOnDataChange",
|
|
433
447
|
"default": "\"reset\""
|
|
434
448
|
},
|
|
449
|
+
{
|
|
450
|
+
"name": "reorderability",
|
|
451
|
+
"attribute": "reorderability",
|
|
452
|
+
"description": "Whether the rows can be reordered. Can only be enabled if sorting is not active, selectability is not 'multiple', and no details are present.",
|
|
453
|
+
"type": "boolean | undefined"
|
|
454
|
+
},
|
|
435
455
|
{
|
|
436
456
|
"name": "multipleDetails",
|
|
437
457
|
"attribute": "multipleDetails",
|
|
@@ -566,6 +586,10 @@
|
|
|
566
586
|
"name": "sortingChange",
|
|
567
587
|
"type": "CustomEvent<DataGridRankedSortDefinition<TData>[]>"
|
|
568
588
|
},
|
|
589
|
+
{
|
|
590
|
+
"name": "reorder",
|
|
591
|
+
"type": "CustomEvent<DataGridReorderChange<TData>[]>"
|
|
592
|
+
},
|
|
569
593
|
{
|
|
570
594
|
"name": "rowDetailsOpen",
|
|
571
595
|
"type": "CustomEvent<DataGridRow<TData, TDetailsElement>>"
|
|
@@ -798,6 +822,11 @@
|
|
|
798
822
|
"attribute": "overlayOpen",
|
|
799
823
|
"type": "boolean",
|
|
800
824
|
"default": "false"
|
|
825
|
+
},
|
|
826
|
+
{
|
|
827
|
+
"name": "reorderabilityController",
|
|
828
|
+
"type": "ReorderabilityController",
|
|
829
|
+
"default": "\"new ReorderabilityController(this, {\\r\\n\\t\\thandleReorder: (source, destination) => {\\r\\n\\t\\t\\tconst sourceColumn = this.dataGrid.visibleColumns[source]!\\r\\n\\t\\t\\tconst destinationColumn = this.dataGrid.visibleColumns[destination]!\\r\\n\\t\\t\\tconst sourceIndex = this.dataGrid.columns.indexOf(sourceColumn)\\r\\n\\t\\t\\tconst destinationIndex = this.dataGrid.columns.indexOf(destinationColumn)\\r\\n\\t\\t\\tthis.dataGrid.columns.splice(sourceIndex, 1)\\r\\n\\t\\t\\tthis.dataGrid.columns.splice(destinationIndex, 0, sourceColumn)\\r\\n\\t\\t\\tthis.dataGrid.setColumns(this.dataGrid.columns)\\r\\n\\t\\t}\\r\\n\\t})\""
|
|
801
830
|
}
|
|
802
831
|
]
|
|
803
832
|
},
|
|
@@ -3394,6 +3423,11 @@
|
|
|
3394
3423
|
"description": "The behavior of the selection when the data changes.",
|
|
3395
3424
|
"type": "DataGridSelectionBehaviorOnDataChange"
|
|
3396
3425
|
},
|
|
3426
|
+
{
|
|
3427
|
+
"name": "reorderability",
|
|
3428
|
+
"description": "Whether the rows can be reordered. Can only be enabled if sorting is not active, selectability is not 'multiple', and no details are present.",
|
|
3429
|
+
"type": "boolean | undefined"
|
|
3430
|
+
},
|
|
3397
3431
|
{
|
|
3398
3432
|
"name": "multipleDetails",
|
|
3399
3433
|
"description": "Whether multiple details can be opened at the same time.",
|
|
@@ -3507,6 +3541,10 @@
|
|
|
3507
3541
|
"name": "sortingChange",
|
|
3508
3542
|
"type": "EventDispatcher<DataGridRankedSortDefinition<TData>[]>"
|
|
3509
3543
|
},
|
|
3544
|
+
{
|
|
3545
|
+
"name": "reorder",
|
|
3546
|
+
"type": "EventDispatcher<DataGridReorderChange<TData>[]>"
|
|
3547
|
+
},
|
|
3510
3548
|
{
|
|
3511
3549
|
"name": "rowDetailsOpen",
|
|
3512
3550
|
"type": "EventDispatcher<DataGridRow<TData, TDetailsElement>>"
|
|
@@ -3635,6 +3673,10 @@
|
|
|
3635
3673
|
"name": "csvController",
|
|
3636
3674
|
"type": "DataGridCsvController<TData>"
|
|
3637
3675
|
},
|
|
3676
|
+
{
|
|
3677
|
+
"name": "reorderabilityController",
|
|
3678
|
+
"type": "DataGridReorderabilityController<TData>"
|
|
3679
|
+
},
|
|
3638
3680
|
{
|
|
3639
3681
|
"name": "rowIntersectionObserver",
|
|
3640
3682
|
"type": "IntersectionObserver | undefined"
|
|
@@ -3727,6 +3769,12 @@
|
|
|
3727
3769
|
"description": "The behavior of the selection when the data changes.",
|
|
3728
3770
|
"type": "DataGridSelectionBehaviorOnDataChange"
|
|
3729
3771
|
},
|
|
3772
|
+
{
|
|
3773
|
+
"name": "reorderability",
|
|
3774
|
+
"attribute": "reorderability",
|
|
3775
|
+
"description": "Whether the rows can be reordered. Can only be enabled if sorting is not active, selectability is not 'multiple', and no details are present.",
|
|
3776
|
+
"type": "boolean | undefined"
|
|
3777
|
+
},
|
|
3730
3778
|
{
|
|
3731
3779
|
"name": "multipleDetails",
|
|
3732
3780
|
"attribute": "multipleDetails",
|
|
@@ -3851,6 +3899,10 @@
|
|
|
3851
3899
|
"name": "sortingChange",
|
|
3852
3900
|
"type": "CustomEvent<DataGridRankedSortDefinition<TData>[]>"
|
|
3853
3901
|
},
|
|
3902
|
+
{
|
|
3903
|
+
"name": "reorder",
|
|
3904
|
+
"type": "CustomEvent<DataGridReorderChange<TData>[]>"
|
|
3905
|
+
},
|
|
3854
3906
|
{
|
|
3855
3907
|
"name": "rowDetailsOpen",
|
|
3856
3908
|
"type": "CustomEvent<DataGridRow<TData, TDetailsElement>>"
|
|
@@ -4048,6 +4100,10 @@
|
|
|
4048
4100
|
{
|
|
4049
4101
|
"name": "overlayOpen",
|
|
4050
4102
|
"type": "boolean"
|
|
4103
|
+
},
|
|
4104
|
+
{
|
|
4105
|
+
"name": "reorderabilityController",
|
|
4106
|
+
"type": "ReorderabilityController"
|
|
4051
4107
|
}
|
|
4052
4108
|
]
|
|
4053
4109
|
},
|
package/dist/index.d.ts
CHANGED
|
@@ -16,6 +16,7 @@ import '@3mo/section';
|
|
|
16
16
|
import '@3mo/tab';
|
|
17
17
|
import '@3mo/line';
|
|
18
18
|
import './types.js';
|
|
19
|
+
export * from './DataGridReorderabilityController.js';
|
|
19
20
|
export * from './DataRecord.js';
|
|
20
21
|
export * from './DataGridColumn.js';
|
|
21
22
|
export * from './columns/index.js';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,OAAO,8BAA8B,CAAA;AACrC,OAAO,WAAW,CAAA;AAClB,OAAO,WAAW,CAAA;AAClB,OAAO,gBAAgB,CAAA;AACvB,OAAO,WAAW,CAAA;AAClB,OAAO,kBAAkB,CAAA;AACzB,OAAO,eAAe,CAAA;AACtB,OAAO,oBAAoB,CAAA;AAC3B,OAAO,kBAAkB,CAAA;AACzB,OAAO,uBAAuB,CAAA;AAC9B,OAAO,mBAAmB,CAAA;AAC1B,OAAO,cAAc,CAAA;AACrB,OAAO,eAAe,CAAA;AACtB,OAAO,kBAAkB,CAAA;AACzB,OAAO,cAAc,CAAA;AACrB,OAAO,UAAU,CAAA;AACjB,OAAO,WAAW,CAAA;AAElB,OAAO,YAAY,CAAA;AACnB,cAAc,iBAAiB,CAAA;AAC/B,cAAc,qBAAqB,CAAA;AACnC,cAAc,oBAAoB,CAAA;AAClC,cAAc,gCAAgC,CAAA;AAC9C,cAAc,kCAAkC,CAAA;AAChD,cAAc,gCAAgC,CAAA;AAC9C,cAAc,oCAAoC,CAAA;AAClD,cAAc,gCAAgC,CAAA;AAC9C,cAAc,4BAA4B,CAAA;AAC1C,cAAc,eAAe,CAAA;AAC7B,cAAc,qBAAqB,CAAA;AACnC,cAAc,2BAA2B,CAAA;AACzC,cAAc,8BAA8B,CAAA;AAC5C,cAAc,iBAAiB,CAAA;AAC/B,cAAc,mBAAmB,CAAA;AACjC,cAAc,qBAAqB,CAAA;AACnC,cAAc,wBAAwB,CAAA;AACtC,cAAc,qCAAqC,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,OAAO,8BAA8B,CAAA;AACrC,OAAO,WAAW,CAAA;AAClB,OAAO,WAAW,CAAA;AAClB,OAAO,gBAAgB,CAAA;AACvB,OAAO,WAAW,CAAA;AAClB,OAAO,kBAAkB,CAAA;AACzB,OAAO,eAAe,CAAA;AACtB,OAAO,oBAAoB,CAAA;AAC3B,OAAO,kBAAkB,CAAA;AACzB,OAAO,uBAAuB,CAAA;AAC9B,OAAO,mBAAmB,CAAA;AAC1B,OAAO,cAAc,CAAA;AACrB,OAAO,eAAe,CAAA;AACtB,OAAO,kBAAkB,CAAA;AACzB,OAAO,cAAc,CAAA;AACrB,OAAO,UAAU,CAAA;AACjB,OAAO,WAAW,CAAA;AAElB,OAAO,YAAY,CAAA;AACnB,cAAc,uCAAuC,CAAA;AACrD,cAAc,iBAAiB,CAAA;AAC/B,cAAc,qBAAqB,CAAA;AACnC,cAAc,oBAAoB,CAAA;AAClC,cAAc,gCAAgC,CAAA;AAC9C,cAAc,kCAAkC,CAAA;AAChD,cAAc,gCAAgC,CAAA;AAC9C,cAAc,oCAAoC,CAAA;AAClD,cAAc,gCAAgC,CAAA;AAC9C,cAAc,4BAA4B,CAAA;AAC1C,cAAc,eAAe,CAAA;AAC7B,cAAc,qBAAqB,CAAA;AACnC,cAAc,2BAA2B,CAAA;AACzC,cAAc,8BAA8B,CAAA;AAC5C,cAAc,iBAAiB,CAAA;AAC/B,cAAc,mBAAmB,CAAA;AACjC,cAAc,qBAAqB,CAAA;AACnC,cAAc,wBAAwB,CAAA;AACtC,cAAc,qCAAqC,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -17,6 +17,7 @@ import '@3mo/tab';
|
|
|
17
17
|
import '@3mo/line';
|
|
18
18
|
// import '@3mo/focus-ring'
|
|
19
19
|
import './types.js';
|
|
20
|
+
export * from './DataGridReorderabilityController.js';
|
|
20
21
|
export * from './DataRecord.js';
|
|
21
22
|
export * from './DataGridColumn.js';
|
|
22
23
|
export * from './columns/index.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataGridDefaultRow.d.ts","sourceRoot":"","sources":["../../rows/DataGridDefaultRow.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAG9C,qBACa,kBAAkB,CAAC,KAAK,EAAE,eAAe,SAAS,OAAO,GAAG,SAAS,GAAG,SAAS,CAAE,SAAQ,WAAW,CAAC,KAAK,EAAE,eAAe,CAAC;IAC1I,WAAoB,MAAM,kCAqBzB;IAEQ,OAAO,CAAC,GAAG,UAAU,EAAE,UAAU,CAAC,WAAW,CAAC,KAAK,EAAE,eAAe,CAAC,CAAC,SAAS,CAAC,CAAC;IAQ1F,cAAuB,WAAW,
|
|
1
|
+
{"version":3,"file":"DataGridDefaultRow.d.ts","sourceRoot":"","sources":["../../rows/DataGridDefaultRow.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAG9C,qBACa,kBAAkB,CAAC,KAAK,EAAE,eAAe,SAAS,OAAO,GAAG,SAAS,GAAG,SAAS,CAAE,SAAQ,WAAW,CAAC,KAAK,EAAE,eAAe,CAAC;IAC1I,WAAoB,MAAM,kCAqBzB;IAEQ,OAAO,CAAC,GAAG,UAAU,EAAE,UAAU,CAAC,WAAW,CAAC,KAAK,EAAE,eAAe,CAAC,CAAC,SAAS,CAAC,CAAC;IAQ1F,cAAuB,WAAW,0CASjC;CACD;AAED,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,qBAAqB;QAC9B,0BAA0B,EAAE,WAAW,CAAC,OAAO,CAAC,CAAA;KAChD;CACD"}
|
|
@@ -33,6 +33,7 @@ let DataGridDefaultRow = class DataGridDefaultRow extends DataGridRow {
|
|
|
33
33
|
}
|
|
34
34
|
get rowTemplate() {
|
|
35
35
|
return html `
|
|
36
|
+
${this.reorderabilityTemplate}
|
|
36
37
|
${this.detailsExpanderTemplate}
|
|
37
38
|
${this.selectionTemplate}
|
|
38
39
|
${this.dataGrid.columns.map(column => this.getCellTemplate(column))}
|
|
@@ -23,6 +23,7 @@ export declare abstract class DataGridRow<TData, TDetailsElement extends Element
|
|
|
23
23
|
static get styles(): import("@a11d/lit").CSSResult;
|
|
24
24
|
protected get template(): HTMLTemplateResult;
|
|
25
25
|
protected abstract get rowTemplate(): HTMLTemplateResult;
|
|
26
|
+
protected get reorderabilityTemplate(): HTMLTemplateResult;
|
|
26
27
|
protected get detailsExpanderTemplate(): HTMLTemplateResult;
|
|
27
28
|
protected get selectionTemplate(): HTMLTemplateResult;
|
|
28
29
|
protected getCellTemplate(column: DataGridColumn<TData, KeyPath.ValueOf<TData, KeyPath.Of<TData>>>): HTMLTemplateResult;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataGridRow.d.ts","sourceRoot":"","sources":["../../rows/DataGridRow.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,SAAS,EAAyB,KAAK,kBAAkB,
|
|
1
|
+
{"version":3,"file":"DataGridRow.d.ts","sourceRoot":"","sources":["../../rows/DataGridRow.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,SAAS,EAAyB,KAAK,kBAAkB,EAAsC,MAAM,WAAW,CAAA;AAKxI,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAC1D,OAAO,EAAE,KAAK,YAAY,EAAkC,KAAK,UAAU,EAAuB,MAAM,aAAa,CAAA;AAErH,8BAAsB,WAAW,CAAC,KAAK,EAAE,eAAe,SAAS,OAAO,GAAG,SAAS,GAAG,SAAS,CAAE,SAAQ,SAAS;IACnF,QAAQ,CAAC,KAAK,EAAG,KAAK,CAAC,YAAY,CAAC,GAAG,EAAE,KAAK,EAAE,eAAe,CAAC,CAAC,CAAA;IAChE,QAAQ,CAAC,OAAO,EAAG,KAAK,CAAC,WAAW,CAAC,KAAK,EAAE,eAAe,CAAC,CAAC,CAAA;IACjE,QAAQ,CAAC,OAAO,EAAG,WAAW,CAAA;IAE7B,cAAc,UAAO;IAEtB,UAAU,EAAG,UAAU,CAAC,KAAK,CAAC,CAAA;IAC1D,IAAI,QAAQ,kDAAsC;IAClD,IAAI,IAAI,UAAkC;I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rows/DataGridRow.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
|
-
import { css, property, Component, html, query, queryAll, LitElement, live } from '@a11d/lit';
|
|
2
|
+
import { css, property, Component, html, query, queryAll, LitElement, live, style, unsafeCSS } from '@a11d/lit';
|
|
3
3
|
import { equals } from '@a11d/equals';
|
|
4
4
|
import { DirectionsByLanguage } from '@3mo/localization';
|
|
5
5
|
import { popover } from '@3mo/popover';
|
|
6
6
|
import { ContextMenu } from '@3mo/context-menu';
|
|
7
|
-
import { DataGridPrimaryContextMenuItem } from '../index.js';
|
|
7
|
+
import { DataGridPrimaryContextMenuItem, ReorderabilityState } from '../index.js';
|
|
8
8
|
export class DataGridRow extends Component {
|
|
9
9
|
constructor() {
|
|
10
10
|
super(...arguments);
|
|
@@ -58,6 +58,31 @@ export class DataGridRow extends Component {
|
|
|
58
58
|
width: 100%;
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
+
:host([data-reorderability=${unsafeCSS(ReorderabilityState.Dragging)}]) {
|
|
62
|
+
opacity: 0.5;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
:host([data-reorderability=${unsafeCSS(ReorderabilityState.DropBefore)}]) {
|
|
66
|
+
border-top: 2px solid var(--mo-color-accent);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
:host([data-reorderability=${unsafeCSS(ReorderabilityState.DropAfter)}]) {
|
|
70
|
+
border-bottom: 2px solid var(--mo-color-accent);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
#reorderability {
|
|
74
|
+
position: sticky;
|
|
75
|
+
z-index: 2;
|
|
76
|
+
width: var(--mo-data-grid-column-reorder-width);
|
|
77
|
+
height: 100%;
|
|
78
|
+
background: var(--mo-data-grid-sticky-part-color);
|
|
79
|
+
|
|
80
|
+
mo-icon-button {
|
|
81
|
+
cursor: grab;
|
|
82
|
+
opacity: 0.5;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
61
86
|
#detailsExpanderContainer {
|
|
62
87
|
position: sticky;
|
|
63
88
|
z-index: 2;
|
|
@@ -69,12 +94,8 @@ export class DataGridRow extends Component {
|
|
|
69
94
|
width: var(--mo-data-grid-column-selection-width);
|
|
70
95
|
position: sticky;
|
|
71
96
|
z-index: 2;
|
|
72
|
-
inset-inline-start: 0px;
|
|
73
97
|
height: 100%;
|
|
74
98
|
background: var(--mo-data-grid-sticky-part-color);
|
|
75
|
-
&[data-has-details] {
|
|
76
|
-
inset-inline-start: 20px;
|
|
77
|
-
}
|
|
78
99
|
}
|
|
79
100
|
|
|
80
101
|
:host(:hover) {
|
|
@@ -90,7 +111,6 @@ export class DataGridRow extends Component {
|
|
|
90
111
|
width: 2px;
|
|
91
112
|
height: 100%;
|
|
92
113
|
top: 0;
|
|
93
|
-
inset-inline-start: 0;
|
|
94
114
|
position: absolute;
|
|
95
115
|
background-color: var(--mo-color-accent);
|
|
96
116
|
z-index: 2;
|
|
@@ -211,9 +231,17 @@ export class DataGridRow extends Component {
|
|
|
211
231
|
<slot id='detailsContainer'>${this.detailsOpen ? this.detailsTemplate : html.nothing}</slot>
|
|
212
232
|
`;
|
|
213
233
|
}
|
|
234
|
+
get reorderabilityTemplate() {
|
|
235
|
+
return !this.dataGrid.reorderabilityController.enabled ? html.nothing : html `
|
|
236
|
+
<mo-flex id='reorderability' justifyContent='center' alignItems='center' ${style({ insetInlineStart: this.dataGrid.columnsController.getStickyColumnInsetInline('reordering') })}>
|
|
237
|
+
<mo-icon-button icon='drag_handle'></mo-icon-button>
|
|
238
|
+
</mo-flex>
|
|
239
|
+
`;
|
|
240
|
+
}
|
|
214
241
|
get detailsExpanderTemplate() {
|
|
215
242
|
return this.dataGrid.hasDetails === false ? html.nothing : html `
|
|
216
243
|
<mo-flex id='detailsExpanderContainer' justifyContent='center' alignItems='center'
|
|
244
|
+
${style({ insetInlineStart: this.dataGrid.columnsController.getStickyColumnInsetInline('details') })}
|
|
217
245
|
@click=${(e) => e.stopPropagation()}
|
|
218
246
|
@dblclick=${(e) => e.stopPropagation()}
|
|
219
247
|
>
|
|
@@ -231,6 +259,7 @@ export class DataGridRow extends Component {
|
|
|
231
259
|
return !this.dataGrid.hasSelection ? html.nothing : html `
|
|
232
260
|
<mo-flex id='selectionContainer' justifyContent='center' alignItems='center'
|
|
233
261
|
?data-has-details=${this.dataGrid.hasDetails}
|
|
262
|
+
${style({ insetInlineStart: this.dataGrid.columnsController.getStickyColumnInsetInline('selection') })}
|
|
234
263
|
@click=${(e) => e.stopPropagation()}
|
|
235
264
|
@dblclick=${(e) => e.stopPropagation()}
|
|
236
265
|
>
|