@3mo/data-grid 0.8.5-rc.8 → 0.8.5
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 +0 -3
- package/dist/DataGrid.d.ts.map +1 -1
- package/dist/DataGrid.js +53 -148
- package/dist/DataGridCell.d.ts.map +1 -1
- package/dist/DataGridCell.js +3 -5
- package/dist/DataGridFooter.js +2 -2
- package/dist/DataGridHeader.d.ts +1 -3
- package/dist/DataGridHeader.d.ts.map +1 -1
- package/dist/DataGridHeader.js +52 -101
- package/dist/DataGridHeaderSeparator.d.ts.map +1 -1
- package/dist/DataGridHeaderSeparator.js +3 -15
- package/dist/columns/DataGridColumnComponent.d.ts.map +1 -1
- package/dist/columns/DataGridColumnComponent.js +2 -8
- package/dist/custom-elements.json +5054 -12
- package/dist/rows/DataGridDefaultRow.d.ts.map +1 -1
- package/dist/rows/DataGridDefaultRow.js +11 -16
- package/dist/rows/DataGridRow.d.ts +3 -5
- package/dist/rows/DataGridRow.d.ts.map +1 -1
- package/dist/rows/DataGridRow.js +29 -84
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -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,
|
|
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,kCAsDzB;IAEQ,OAAO,CAAC,GAAG,UAAU,EAAE,UAAU,CAAC,WAAW,CAAC,KAAK,EAAE,eAAe,CAAC,CAAC,SAAS,CAAC,CAAC;IAQ1F,cAAuB,WAAW,0CAQjC;CACD;AAED,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,qBAAqB;QAC9B,0BAA0B,EAAE,WAAW,CAAC,OAAO,CAAC,CAAA;KAChD;CACD"}
|
|
@@ -6,27 +6,13 @@ let DataGridDefaultRow = class DataGridDefaultRow extends DataGridRow {
|
|
|
6
6
|
return css `
|
|
7
7
|
${super.styles}
|
|
8
8
|
|
|
9
|
-
:host
|
|
9
|
+
:host {
|
|
10
10
|
display: grid;
|
|
11
11
|
grid-template-columns: subgrid;
|
|
12
12
|
grid-column: -1 / 1;
|
|
13
13
|
min-height: var(--mo-data-grid-row-height);
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
:host([subgrid][has-sub-data]) #detailsContainer {
|
|
17
|
-
display: grid;
|
|
18
|
-
grid-template-columns: subgrid;
|
|
19
|
-
grid-column: -1 / 1;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
:host(:not([subgrid])) {
|
|
23
|
-
mo-grid {
|
|
24
|
-
height: var(--mo-data-grid-row-height);
|
|
25
|
-
grid-template-columns: var(--mo-data-grid-columns);
|
|
26
|
-
column-gap: var(--mo-data-grid-columns-gap, 2px);
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
|
|
30
16
|
mo-flex {
|
|
31
17
|
white-space: nowrap;
|
|
32
18
|
text-overflow: ellipsis;
|
|
@@ -34,7 +20,16 @@ let DataGridDefaultRow = class DataGridDefaultRow extends DataGridRow {
|
|
|
34
20
|
}
|
|
35
21
|
|
|
36
22
|
#selectionContainer {
|
|
37
|
-
height:
|
|
23
|
+
height: var(--mo-data-grid-row-height);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
#detailsContainer {
|
|
27
|
+
grid-column: -1 / 1;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
:host([has-sub-data]) #detailsContainer {
|
|
31
|
+
display: grid;
|
|
32
|
+
grid-template-columns: subgrid;
|
|
38
33
|
}
|
|
39
34
|
|
|
40
35
|
#detailsContainer [instanceof*=mo-data-grid] {
|
|
@@ -5,7 +5,6 @@ import { type DataGrid, type DataGridCell } from '../index.js';
|
|
|
5
5
|
* @attr dataGrid
|
|
6
6
|
* @attr data
|
|
7
7
|
* @attr selected
|
|
8
|
-
* @attr contextMenuOpen
|
|
9
8
|
* @attr detailsOpen
|
|
10
9
|
*
|
|
11
10
|
* @fires detailsOpenChange - Dispatched when the details open state changes
|
|
@@ -14,19 +13,18 @@ export declare abstract class DataGridRow<TData, TDetailsElement extends Element
|
|
|
14
13
|
readonly detailsOpenChange: EventDispatcher<boolean>;
|
|
15
14
|
readonly cells: Array<DataGridCell<any, TData, TDetailsElement>>;
|
|
16
15
|
readonly subRows: Array<DataGridRow<TData, TDetailsElement>>;
|
|
16
|
+
readonly content: HTMLElement;
|
|
17
17
|
dataGrid: DataGrid<TData, TDetailsElement>;
|
|
18
18
|
data: TData;
|
|
19
19
|
selected: boolean;
|
|
20
20
|
detailsOpen: boolean;
|
|
21
21
|
level: number;
|
|
22
|
-
contextMenuOpen: boolean;
|
|
23
22
|
get detailsElement(): TDetailsElement | undefined;
|
|
24
23
|
getCell(column: DataGridColumn<TData, any>): DataGridCell<any, TData, TDetailsElement> | undefined;
|
|
25
24
|
protected initialized(): void;
|
|
26
25
|
updated(...parameters: Parameters<Component['updated']>): void;
|
|
27
26
|
protected get hasDetails(): boolean;
|
|
28
27
|
static get styles(): import("@a11d/lit").CSSResult;
|
|
29
|
-
private get columnsWidths();
|
|
30
28
|
protected get template(): HTMLTemplateResult;
|
|
31
29
|
protected abstract get rowTemplate(): HTMLTemplateResult;
|
|
32
30
|
protected get detailsExpanderTemplate(): HTMLTemplateResult;
|
|
@@ -40,11 +38,11 @@ export declare abstract class DataGridRow<TData, TDetailsElement extends Element
|
|
|
40
38
|
protected handleContentDoubleClick(): Promise<void>;
|
|
41
39
|
protected handleContentMiddleClick(): Promise<void>;
|
|
42
40
|
private clickOnPrimaryContextMenuItemIfApplicable;
|
|
43
|
-
openContextMenu(event?: PointerEvent
|
|
41
|
+
openContextMenu(event?: PointerEvent): Promise<void>;
|
|
44
42
|
private get contextMenuData();
|
|
45
43
|
private get contextMenuTemplate();
|
|
46
44
|
closeContextMenu(): Promise<void>;
|
|
47
|
-
toggleDetails(): void;
|
|
45
|
+
protected toggleDetails(): void;
|
|
48
46
|
protected setDetailsOpen(value: boolean): void;
|
|
49
47
|
}
|
|
50
48
|
declare global {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataGridRow.d.ts","sourceRoot":"","sources":["../../rows/DataGridRow.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,SAAS,
|
|
1
|
+
{"version":3,"file":"DataGridRow.d.ts","sourceRoot":"","sources":["../../rows/DataGridRow.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,SAAS,EAAgC,KAAK,kBAAkB,EAAqB,MAAM,WAAW,CAAA;AAG9H,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAC1D,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,YAAY,EAAyD,MAAM,aAAa,CAAA;AAErH;;;;;;;GAOG;AACH,8BAAsB,WAAW,CAAC,KAAK,EAAE,eAAe,SAAS,OAAO,GAAG,SAAS,GAAG,SAAS,CAAE,SAAQ,SAAS;IACzG,QAAQ,CAAC,iBAAiB,EAAG,eAAe,CAAC,OAAO,CAAC,CAAA;IAE/B,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;IAE9B,QAAQ,EAAG,QAAQ,CAAC,KAAK,EAAE,eAAe,CAAC,CAAA;IAC3C,IAAI,EAAG,KAAK,CAAA;IACI,QAAQ,UAAQ;IAazD,WAAW,UAAQ;IAOnB,KAAK,SAAI;IAEZ,IAAI,cAAc,gCAEjB;IAED,OAAO,CAAC,MAAM,EAAE,cAAc,CAAC,KAAK,EAAE,GAAG,CAAC;cAIvB,WAAW;IAIrB,OAAO,CAAC,GAAG,UAAU,EAAE,UAAU,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;IAShE,SAAS,KAAK,UAAU,YAEvB;IAED,WAAoB,MAAM,kCAgGzB;IAED,cAAuB,QAAQ,uBAgB9B;IAED,SAAS,CAAC,QAAQ,KAAK,WAAW,IAAI,kBAAkB,CAAA;IAExD,SAAS,KAAK,uBAAuB,uBAgBpC;IAED,SAAS,KAAK,iBAAiB,uBAe9B;IAED,SAAS,CAAC,eAAe,CAAC,MAAM,EAAE,cAAc,CAAC,KAAK,EAAE,cAAc,CAAC,KAAK,EAAE,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC;IAUhG,SAAS,KAAK,cAAc,uBAE3B;IAED,SAAS,KAAK,6BAA6B,uBAS1C;IAED,SAAS,KAAK,eAAe,uBAmB5B;IAED,OAAO,CAAC,YAAY;IAIpB,SAAS,CAAC,kBAAkB;cAYZ,wBAAwB;cAKxB,wBAAwB;YAK1B,yCAAyC;IAQjD,eAAe,CAAC,KAAK,CAAC,EAAE,YAAY;IAgB1C,OAAO,KAAK,eAAe,GAI1B;IAED,OAAO,KAAK,mBAAmB,GAE9B;IAEK,gBAAgB;IAKtB,SAAS,CAAC,aAAa;IAIvB,SAAS,CAAC,cAAc,CAAC,KAAK,EAAE,OAAO;CAIvC;AAED,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,qBAAqB;QAC9B,kBAAkB,EAAE,WAAW,CAAC,OAAO,CAAC,CAAA;KACxC;CACD"}
|
package/dist/rows/DataGridRow.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
|
-
import { css, property, Component, html, queryAll, style, LitElement, event } from '@a11d/lit';
|
|
2
|
+
import { css, property, Component, html, query, queryAll, style, LitElement, event } from '@a11d/lit';
|
|
3
|
+
import { popover } from '@3mo/popover';
|
|
3
4
|
import { ContextMenu } from '@3mo/context-menu';
|
|
4
5
|
import { DataGridPrimaryContextMenuItem, DataGridSelectionMode } from '../index.js';
|
|
5
6
|
/**
|
|
6
7
|
* @attr dataGrid
|
|
7
8
|
* @attr data
|
|
8
9
|
* @attr selected
|
|
9
|
-
* @attr contextMenuOpen
|
|
10
10
|
* @attr detailsOpen
|
|
11
11
|
*
|
|
12
12
|
* @fires detailsOpenChange - Dispatched when the details open state changes
|
|
@@ -17,7 +17,6 @@ export class DataGridRow extends Component {
|
|
|
17
17
|
this.selected = false;
|
|
18
18
|
this.detailsOpen = false;
|
|
19
19
|
this.level = 0;
|
|
20
|
-
this.contextMenuOpen = false;
|
|
21
20
|
}
|
|
22
21
|
get detailsElement() {
|
|
23
22
|
return this.renderRoot.querySelector('#detailsContainer')?.firstElementChild;
|
|
@@ -27,8 +26,6 @@ export class DataGridRow extends Component {
|
|
|
27
26
|
}
|
|
28
27
|
initialized() {
|
|
29
28
|
this.toggleAttribute('mo-data-grid-row', true);
|
|
30
|
-
this.toggleAttribute('subgrid', this.dataGrid.isUsingSubgrid);
|
|
31
|
-
this.toggleAttribute('details', this.dataGrid.hasDetails);
|
|
32
29
|
}
|
|
33
30
|
updated(...parameters) {
|
|
34
31
|
this.cells.forEach(cell => cell.requestUpdate());
|
|
@@ -70,15 +67,11 @@ export class DataGridRow extends Component {
|
|
|
70
67
|
}
|
|
71
68
|
|
|
72
69
|
#contentContainer {
|
|
70
|
+
grid-column: -1 / 1;
|
|
73
71
|
cursor: pointer;
|
|
74
72
|
transition: 250ms;
|
|
75
73
|
}
|
|
76
74
|
|
|
77
|
-
:host([selected]) #contentContainer, :host([contextMenuOpen]) #contentContainer {
|
|
78
|
-
background: var(--mo-data-grid-selection-background) !important;
|
|
79
|
-
--mo-data-grid-sticky-part-color: color-mix(in srgb, var(--mo-color-surface), var(--mo-color-accent));
|
|
80
|
-
}
|
|
81
|
-
|
|
82
75
|
:host([selected]:not(:last-of-type)) #contentContainer:after {
|
|
83
76
|
content: '';
|
|
84
77
|
position: absolute;
|
|
@@ -94,54 +87,16 @@ export class DataGridRow extends Component {
|
|
|
94
87
|
color: var(--mo-color-gray);
|
|
95
88
|
}
|
|
96
89
|
|
|
97
|
-
:host(:
|
|
98
|
-
align-items: center;
|
|
99
|
-
grid-column: -1;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
:host([subgrid]) {
|
|
90
|
+
:host([selected]), :host([data-context-menu-open]) {
|
|
103
91
|
#contentContainer {
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
[data-sticky] {
|
|
108
|
-
position: sticky;
|
|
109
|
-
z-index: 3;
|
|
110
|
-
background: var(--mo-data-grid-sticky-part-color);
|
|
92
|
+
background: var(--mo-data-grid-selection-background) !important;
|
|
93
|
+
--mo-data-grid-sticky-part-color: color-mix(in srgb, var(--mo-color-surface), var(--mo-color-accent));
|
|
111
94
|
}
|
|
112
95
|
|
|
113
|
-
#
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
inset-inline-end: 0;
|
|
96
|
+
#contextMenuIconButton {
|
|
97
|
+
color: var(--mo-color-foreground);
|
|
98
|
+
opacity: 1;
|
|
117
99
|
}
|
|
118
|
-
|
|
119
|
-
#detailsExpander {
|
|
120
|
-
inset-inline-start: 0;
|
|
121
|
-
background-color: var(--mo-data-grid-sticky-expander-part-color, var(--mo-data-grid-sticky-part-color));
|
|
122
|
-
z-index: 5;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
#selection {
|
|
126
|
-
width: var(--mo-data-grid-column-selection-width);
|
|
127
|
-
align-items: unset;
|
|
128
|
-
left: 0;
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
:host([subgrid]:not([details])) #selectionContainer {
|
|
134
|
-
inset-inline-start: 0;
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
:host([subgrid][details]) #selectionContainer {
|
|
138
|
-
inset-inline-start: 20px;
|
|
139
|
-
padding: 1px 0;
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
:host([selected]) #contextMenuIconButton, :host([contextMenuOpen]) #contextMenuIconButton {
|
|
143
|
-
color: var(--mo-color-foreground);
|
|
144
|
-
opacity: 1;
|
|
145
100
|
}
|
|
146
101
|
|
|
147
102
|
#contentContainer:hover #contextMenuIconButton {
|
|
@@ -180,20 +135,17 @@ export class DataGridRow extends Component {
|
|
|
180
135
|
}
|
|
181
136
|
`;
|
|
182
137
|
}
|
|
183
|
-
get columnsWidths() {
|
|
184
|
-
return [
|
|
185
|
-
this.dataGrid.detailsColumnWidth,
|
|
186
|
-
this.dataGrid.selectionColumnWidth,
|
|
187
|
-
this.dataGrid.dataColumnsWidths,
|
|
188
|
-
].flat().filter(Boolean).join(' ');
|
|
189
|
-
}
|
|
190
138
|
get template() {
|
|
191
139
|
return html `
|
|
192
|
-
<mo-grid id='contentContainer' columns
|
|
140
|
+
<mo-grid id='contentContainer' columns='subgrid'
|
|
193
141
|
@click=${() => this.handleContentClick()}
|
|
194
142
|
@dblclick=${() => this.handleContentDoubleClick()}
|
|
195
143
|
@auxclick=${(e) => e.button !== 1 ? void 0 : this.handleContentMiddleClick()}
|
|
196
|
-
|
|
144
|
+
${popover(() => html `
|
|
145
|
+
<mo-context-menu @openChange=${(e) => this.toggleAttribute('data-context-menu-open', e.detail)}>
|
|
146
|
+
${this.contextMenuTemplate}
|
|
147
|
+
</mo-context-menu>
|
|
148
|
+
`)}
|
|
197
149
|
>
|
|
198
150
|
${this.rowTemplate}
|
|
199
151
|
</mo-grid>
|
|
@@ -201,8 +153,9 @@ export class DataGridRow extends Component {
|
|
|
201
153
|
`;
|
|
202
154
|
}
|
|
203
155
|
get detailsExpanderTemplate() {
|
|
204
|
-
return
|
|
205
|
-
<mo-flex justifyContent='center' alignItems='center'
|
|
156
|
+
return this.dataGrid.hasDetails === false ? html.nothing : html `
|
|
157
|
+
<mo-flex justifyContent='center' alignItems='center'
|
|
158
|
+
${style({ position: 'sticky', zIndex: '2', insetInlineStart: '0px', background: 'var(--mo-data-grid-sticky-expander-part-color, var(--mo-data-grid-sticky-part-color))' })}
|
|
206
159
|
@click=${(e) => e.stopPropagation()}
|
|
207
160
|
@dblclick=${(e) => e.stopPropagation()}
|
|
208
161
|
>
|
|
@@ -218,7 +171,8 @@ export class DataGridRow extends Component {
|
|
|
218
171
|
}
|
|
219
172
|
get selectionTemplate() {
|
|
220
173
|
return this.dataGrid.hasSelection === false || this.dataGrid.selectionCheckboxesHidden ? html.nothing : html `
|
|
221
|
-
<mo-flex id='selectionContainer' justifyContent='center' alignItems='center'
|
|
174
|
+
<mo-flex id='selectionContainer' justifyContent='center' alignItems='center'
|
|
175
|
+
${style({ width: 'var(--mo-data-grid-column-selection-width)', position: 'sticky', zIndex: '2', insetInlineStart: this.dataGrid.hasDetails ? '20px' : '0px', padding: this.dataGrid.hasDetails ? '1px 0' : undefined, background: 'var(--mo-data-grid-sticky-part-color)' })}
|
|
222
176
|
@click=${(e) => e.stopPropagation()}
|
|
223
177
|
@dblclick=${(e) => e.stopPropagation()}
|
|
224
178
|
>
|
|
@@ -244,8 +198,8 @@ export class DataGridRow extends Component {
|
|
|
244
198
|
return html `<span></span>`;
|
|
245
199
|
}
|
|
246
200
|
get contextMenuIconButtonTemplate() {
|
|
247
|
-
return
|
|
248
|
-
<mo-flex
|
|
201
|
+
return this.dataGrid.hasContextMenu === false ? html.nothing : html `
|
|
202
|
+
<mo-flex justifyContent='center' ${style({ height: '100%', placeSelf: 'end', position: 'sticky', insetInlineEnd: '0px', zIndex: '3', background: 'var(--mo-data-grid-sticky-part-color)' })}>
|
|
249
203
|
<mo-icon-button id='contextMenuIconButton' icon='more_vert' dense
|
|
250
204
|
@click=${this.openContextMenu}
|
|
251
205
|
@dblclick=${(e) => e.stopPropagation()}
|
|
@@ -293,10 +247,10 @@ export class DataGridRow extends Component {
|
|
|
293
247
|
if (this.dataGrid.hasContextMenu === true && this.dataGrid.primaryContextMenuItemOnDoubleClick === true) {
|
|
294
248
|
await this.openContextMenu();
|
|
295
249
|
ContextMenu.openInstance?.items.find(item => item instanceof DataGridPrimaryContextMenuItem)?.click();
|
|
296
|
-
this.
|
|
250
|
+
await this.closeContextMenu();
|
|
297
251
|
}
|
|
298
252
|
}
|
|
299
|
-
async openContextMenu(event
|
|
253
|
+
async openContextMenu(event) {
|
|
300
254
|
if (!this.dataGrid.hasContextMenu) {
|
|
301
255
|
return;
|
|
302
256
|
}
|
|
@@ -304,17 +258,8 @@ export class DataGridRow extends Component {
|
|
|
304
258
|
if (this.dataGrid.selectedData.includes(this.data) === false) {
|
|
305
259
|
this.dataGrid.select(this.dataGrid.selectionMode !== DataGridSelectionMode.None ? [this.data] : []);
|
|
306
260
|
}
|
|
307
|
-
const contextMenu = ContextMenu.open(event || [0, 0], this.contextMenuTemplate);
|
|
308
|
-
this.contextMenuOpen = true;
|
|
309
|
-
const handler = (open) => {
|
|
310
|
-
this.contextMenuOpen = open;
|
|
311
|
-
if (open === false) {
|
|
312
|
-
contextMenu.openChange.unsubscribe(handler);
|
|
313
|
-
onClose?.();
|
|
314
|
-
}
|
|
315
|
-
};
|
|
316
|
-
contextMenu.openChange.subscribe(handler);
|
|
317
261
|
await this.updateComplete;
|
|
262
|
+
this.content?.dispatchEvent(new MouseEvent('contextmenu', { bubbles: true, composed: true, ...(event ?? {}) }));
|
|
318
263
|
}
|
|
319
264
|
get contextMenuData() {
|
|
320
265
|
return this.dataGrid.selectionMode === DataGridSelectionMode.None || this.dataGrid.selectedData.length === 0
|
|
@@ -325,7 +270,7 @@ export class DataGridRow extends Component {
|
|
|
325
270
|
return this.dataGrid.getRowContextMenuTemplate?.(this.contextMenuData) ?? html.nothing;
|
|
326
271
|
}
|
|
327
272
|
async closeContextMenu() {
|
|
328
|
-
|
|
273
|
+
ContextMenu.openInstance?.close();
|
|
329
274
|
await this.updateComplete;
|
|
330
275
|
}
|
|
331
276
|
toggleDetails() {
|
|
@@ -345,6 +290,9 @@ __decorate([
|
|
|
345
290
|
__decorate([
|
|
346
291
|
queryAll('[mo-data-grid-row]')
|
|
347
292
|
], DataGridRow.prototype, "subRows", void 0);
|
|
293
|
+
__decorate([
|
|
294
|
+
query('#contentContainer')
|
|
295
|
+
], DataGridRow.prototype, "content", void 0);
|
|
348
296
|
__decorate([
|
|
349
297
|
property({ type: Object })
|
|
350
298
|
], DataGridRow.prototype, "dataGrid", void 0);
|
|
@@ -378,6 +326,3 @@ __decorate([
|
|
|
378
326
|
}
|
|
379
327
|
})
|
|
380
328
|
], DataGridRow.prototype, "level", void 0);
|
|
381
|
-
__decorate([
|
|
382
|
-
property({ type: Boolean, reflect: true })
|
|
383
|
-
], DataGridRow.prototype, "contextMenuOpen", void 0);
|