@3mo/data-grid 0.9.0-preview.0 → 0.9.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/dist/DataGrid.d.ts +1 -3
- package/dist/DataGrid.d.ts.map +1 -1
- package/dist/DataGrid.js +10 -83
- package/dist/DataGridColumnsController.d.ts.map +1 -1
- package/dist/DataGridColumnsController.js +8 -2
- package/dist/DataGridFooter.d.ts +2 -2
- package/dist/DataGridFooter.d.ts.map +1 -1
- package/dist/DataGridFooter.js +87 -41
- package/dist/DataGridHeader.d.ts +2 -3
- package/dist/DataGridHeader.d.ts.map +1 -1
- package/dist/DataGridHeader.js +90 -33
- package/dist/custom-elements.json +10 -634
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/dist/FieldSelectDataGridPageSize.d.ts +0 -13
- package/dist/FieldSelectDataGridPageSize.d.ts.map +0 -1
- package/dist/FieldSelectDataGridPageSize.js +0 -24
package/dist/DataGrid.d.ts
CHANGED
|
@@ -42,7 +42,6 @@ export declare enum DataGridEditability {
|
|
|
42
42
|
* @attr getRowContextMenuTemplate - A function which returns a template for the context menu of a given row.
|
|
43
43
|
* @attr sidePanelTab - The side panel tab.
|
|
44
44
|
* @attr sidePanelHidden - Whether the side panel should be hidden.
|
|
45
|
-
* @attr selectionToolbarDisabled - Whether the selection toolbar should be disabled.
|
|
46
45
|
* @attr hasAlternatingBackground - Whether the rows should have alternating background.
|
|
47
46
|
* @attr preventFabCollapse - Whether the FAB should be prevented from collapsing.
|
|
48
47
|
* @attr cellFontSize - The font size of the cells relative to the default font size. Defaults @see DataGrid.cellFontSize 's value which defaults to 0.8.
|
|
@@ -119,7 +118,6 @@ export declare class DataGrid<TData, TDetailsElement extends Element | undefined
|
|
|
119
118
|
editability: DataGridEditability;
|
|
120
119
|
sidePanelTab: DataGridSidePanelTab | undefined;
|
|
121
120
|
sidePanelHidden: boolean;
|
|
122
|
-
selectionToolbarDisabled: boolean;
|
|
123
121
|
hasAlternatingBackground: boolean;
|
|
124
122
|
preventFabCollapse: boolean;
|
|
125
123
|
protected fabSlotCollapsed: boolean;
|
|
@@ -179,6 +177,7 @@ export declare class DataGrid<TData, TDetailsElement extends Element | undefined
|
|
|
179
177
|
readonly detailsController: DataGridDetailsController<TData>;
|
|
180
178
|
readonly rowIntersectionObserver?: IntersectionObserver;
|
|
181
179
|
protected updated(...parameters: Parameters<Component['updated']>): void;
|
|
180
|
+
private navigateToLastValidPageIfNeeded;
|
|
182
181
|
protected firstUpdated(props: PropertyValues): void;
|
|
183
182
|
static get styles(): import("@a11d/lit").CSSResult;
|
|
184
183
|
protected get template(): HTMLTemplateResult;
|
|
@@ -203,7 +202,6 @@ export declare class DataGrid<TData, TDetailsElement extends Element | undefined
|
|
|
203
202
|
protected get toolbarDefaultTemplate(): HTMLTemplateResult;
|
|
204
203
|
protected get toolbarActionDefaultTemplate(): HTMLTemplateResult;
|
|
205
204
|
protected get sumDefaultTemplate(): HTMLTemplateResult;
|
|
206
|
-
protected get selectionToolbarTemplate(): HTMLTemplateResult;
|
|
207
205
|
protected get toolbarActionsTemplate(): HTMLTemplateResult;
|
|
208
206
|
private lastScrollElementTop;
|
|
209
207
|
private handleScroll;
|
package/dist/DataGrid.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataGrid.d.ts","sourceRoot":"","sources":["../DataGrid.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,SAAS,EAA+B,KAAK,cAAc,EAAqC,KAAK,kBAAkB,EAAwD,MAAM,WAAW,CAAA;AAE9N,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAClD,OAAO,EAAE,6BAA6B,EAAE,MAAM,sCAAsC,CAAA;AACpF,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAErD,OAAO,EAAE,eAAe,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AgB7B;IAED,SAAS,KAAK,cAAc,uBAI3B;IAED,OAAO,KAAK,YAAY,GAMvB;IAED,cAAc,CAAC,UAAU,EAAE,UAAU,CAAC,KAAK,CAAC,EAAE,KAAK,SAAI;IASvD,SAAS,KAAK,cAAc,uBAa3B;IAED,IAAI,YAAY,IAAI,kBAAkB,CAIrC;IAED,SAAS,KAAK,eAAe,uBAY5B;IAED,SAAS,KAAK,sBAAsB,uBAEnC;IAED,SAAS,KAAK,4BAA4B,uBAEzC;IAED,SAAS,KAAK,kBAAkB,uBAE/B;IAED,SAAS,KAAK,sBAAsB,uBAgBnC;IAGD,OAAO,CAAC,oBAAoB,CAAI;IAEhC,OAAO,CAAC,YAAY;IAkBpB,SAAS,CAAC,iBAAiB,CAAC,KAAK,EAAE,YAAY;IAI/C,OAAO,CAAE,gBAAgB;IA+BzB,IAAI,WAAW,IAAI,KAAK,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAO1C;IAED,IAAI,iBAAiB,wBAUpB;IAED,SAAS,KAAK,QAAQ,WAErB;IAED,SAAS,KAAK,QAAQ,WAErB;CACD;AAED,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,qBAAqB;QAC9B,cAAc,EAAE,QAAQ,CAAC,OAAO,EAAE,SAAS,CAAC,CAAA;KAC5C;CACD"}
|
package/dist/DataGrid.js
CHANGED
|
@@ -16,20 +16,9 @@ import { DataGridSortingController } from './DataGridSortingController.js';
|
|
|
16
16
|
import { DataGridDetailsController } from './DataGridDetailsController.js';
|
|
17
17
|
import { CsvGenerator, DataGridSidePanelTab } from './index.js';
|
|
18
18
|
import { DataRecord } from './DataRecord.js';
|
|
19
|
-
Localizer.register('en', {
|
|
20
|
-
'${count:pluralityNumber} entries selected': [
|
|
21
|
-
'1 entry selected',
|
|
22
|
-
'${count} entries selected',
|
|
23
|
-
]
|
|
24
|
-
});
|
|
25
19
|
Localizer.register('de', {
|
|
26
20
|
'Exporting excel file': 'Die Excel-Datei wird exportiert',
|
|
27
21
|
'No results': 'Kein Ergebnis',
|
|
28
|
-
'${count:pluralityNumber} entries selected': [
|
|
29
|
-
'1 Eintrag ausgewählt',
|
|
30
|
-
'${count} Einträge ausgewählt',
|
|
31
|
-
],
|
|
32
|
-
'Options': 'Optionen',
|
|
33
22
|
'More Filters': 'Weitere Filter',
|
|
34
23
|
'Deselect All': 'Alle deselektieren',
|
|
35
24
|
});
|
|
@@ -65,7 +54,6 @@ export var DataGridEditability;
|
|
|
65
54
|
* @attr getRowContextMenuTemplate - A function which returns a template for the context menu of a given row.
|
|
66
55
|
* @attr sidePanelTab - The side panel tab.
|
|
67
56
|
* @attr sidePanelHidden - Whether the side panel should be hidden.
|
|
68
|
-
* @attr selectionToolbarDisabled - Whether the selection toolbar should be disabled.
|
|
69
57
|
* @attr hasAlternatingBackground - Whether the rows should have alternating background.
|
|
70
58
|
* @attr preventFabCollapse - Whether the FAB should be prevented from collapsing.
|
|
71
59
|
* @attr cellFontSize - The font size of the cells relative to the default font size. Defaults @see DataGrid.cellFontSize 's value which defaults to 0.8.
|
|
@@ -118,7 +106,6 @@ let DataGrid = DataGrid_1 = class DataGrid extends Component {
|
|
|
118
106
|
this.primaryContextMenuItemOnDoubleClick = false;
|
|
119
107
|
this.editability = DataGridEditability.Never;
|
|
120
108
|
this.sidePanelHidden = false;
|
|
121
|
-
this.selectionToolbarDisabled = false;
|
|
122
109
|
this.hasAlternatingBackground = DataGrid_1.hasAlternatingBackground.value;
|
|
123
110
|
this.preventFabCollapse = false;
|
|
124
111
|
this.fabSlotCollapsed = false;
|
|
@@ -285,7 +272,7 @@ let DataGrid = DataGrid_1 = class DataGrid extends Component {
|
|
|
285
272
|
return value;
|
|
286
273
|
}
|
|
287
274
|
get dataLength() {
|
|
288
|
-
return this.
|
|
275
|
+
return this.dataRecords.length;
|
|
289
276
|
}
|
|
290
277
|
get maxPage() {
|
|
291
278
|
return Math.ceil(this.dataLength / this.pageSize);
|
|
@@ -310,8 +297,14 @@ let DataGrid = DataGrid_1 = class DataGrid extends Component {
|
|
|
310
297
|
root: this.scroller,
|
|
311
298
|
rootMargin: '100% 0px',
|
|
312
299
|
}));
|
|
300
|
+
this.navigateToLastValidPageIfNeeded();
|
|
313
301
|
return super.updated(...parameters);
|
|
314
302
|
}
|
|
303
|
+
navigateToLastValidPageIfNeeded() {
|
|
304
|
+
if (this.page > this.maxPage) {
|
|
305
|
+
this.setPage(this.maxPage);
|
|
306
|
+
}
|
|
307
|
+
}
|
|
315
308
|
firstUpdated(props) {
|
|
316
309
|
super.firstUpdated(props);
|
|
317
310
|
this.cellEdit.subscribe(() => this.requestUpdate());
|
|
@@ -396,42 +389,6 @@ let DataGrid = DataGrid_1 = class DataGrid extends Component {
|
|
|
396
389
|
}
|
|
397
390
|
}
|
|
398
391
|
|
|
399
|
-
#flexSelectionToolbar {
|
|
400
|
-
background: var(--mo-color-surface);
|
|
401
|
-
position: absolute;
|
|
402
|
-
inset: 0px;
|
|
403
|
-
width: 100%;
|
|
404
|
-
height: 100%;
|
|
405
|
-
z-index: 5;
|
|
406
|
-
|
|
407
|
-
& > mo-flex {
|
|
408
|
-
background: var(--mo-data-grid-selection-background);
|
|
409
|
-
height: 100%;
|
|
410
|
-
align-items: center;
|
|
411
|
-
}
|
|
412
|
-
|
|
413
|
-
mo-icon-button {
|
|
414
|
-
align-self: center;
|
|
415
|
-
color: var(--mo-color-foreground);
|
|
416
|
-
}
|
|
417
|
-
}
|
|
418
|
-
|
|
419
|
-
mo-popover-container {
|
|
420
|
-
height: calc(100% - calc(2 * 6px));
|
|
421
|
-
max-height: 45px;
|
|
422
|
-
margin: 6px 0;
|
|
423
|
-
|
|
424
|
-
#flexActions {
|
|
425
|
-
align-items: center;
|
|
426
|
-
justify-content: center;
|
|
427
|
-
padding-inline: 14px 6px;
|
|
428
|
-
cursor: pointer;
|
|
429
|
-
background: var(--mo-color-accent-transparent);
|
|
430
|
-
height: 100%;
|
|
431
|
-
}
|
|
432
|
-
}
|
|
433
|
-
|
|
434
|
-
|
|
435
392
|
#fab {
|
|
436
393
|
position: absolute;
|
|
437
394
|
inset-inline-end: 16px;
|
|
@@ -578,8 +535,10 @@ let DataGrid = DataGrid_1 = class DataGrid extends Component {
|
|
|
578
535
|
`;
|
|
579
536
|
}
|
|
580
537
|
get rowsTemplate() {
|
|
538
|
+
// Do not use the record itself as a key as can change
|
|
539
|
+
// Also, do not use the data itself as it leads to UI flickering
|
|
581
540
|
return html `
|
|
582
|
-
${repeat(this.renderDataRecords,
|
|
541
|
+
${repeat(this.renderDataRecords, record => record.index, (record, index) => this.getRowTemplate(record, index))}
|
|
583
542
|
`;
|
|
584
543
|
}
|
|
585
544
|
getRowTemplate(dataRecord, index = 0) {
|
|
@@ -618,7 +577,6 @@ let DataGrid = DataGrid_1 = class DataGrid extends Component {
|
|
|
618
577
|
<mo-flex id='actions' direction='horizontal' gap='8px'>
|
|
619
578
|
<slot name='toolbarAction'>${this.toolbarActionDefaultTemplate}</slot>
|
|
620
579
|
${this.toolbarActionsTemplate}
|
|
621
|
-
${this.selectionToolbarTemplate}
|
|
622
580
|
</mo-flex>
|
|
623
581
|
</mo-flex>
|
|
624
582
|
`;
|
|
@@ -632,34 +590,6 @@ let DataGrid = DataGrid_1 = class DataGrid extends Component {
|
|
|
632
590
|
get sumDefaultTemplate() {
|
|
633
591
|
return html.nothing;
|
|
634
592
|
}
|
|
635
|
-
get selectionToolbarTemplate() {
|
|
636
|
-
return this.selectionToolbarDisabled === true || this.selectedData.length === 0 ? html.nothing : html `
|
|
637
|
-
<mo-flex id='flexSelectionToolbar'>
|
|
638
|
-
<mo-flex direction='horizontal' gap='30px' ${style({ placeSelf: 'stretch' })}>
|
|
639
|
-
<div ${style({ fontWeight: '500', margin: '0 6px' })}>
|
|
640
|
-
${t('${count:pluralityNumber} entries selected', { count: this.selectedData.length })}
|
|
641
|
-
</div>
|
|
642
|
-
${!this.getRowContextMenuTemplate ? html.nothing : html `
|
|
643
|
-
<mo-popover-container fixed>
|
|
644
|
-
<mo-flex id='flexActions' direction='horizontal'>
|
|
645
|
-
<div ${style({ flex: '1' })}>${t('Options')}</div>
|
|
646
|
-
<mo-icon-button dense icon='arrow_drop_down' ${style({ display: 'flex', alignItems: 'center', justifyContent: 'center' })}></mo-icon-button>
|
|
647
|
-
</mo-flex>
|
|
648
|
-
|
|
649
|
-
<mo-menu slot='popover'>
|
|
650
|
-
${this.getRowContextMenuTemplate?.(this.selectedData) ?? html.nothing}
|
|
651
|
-
</mo-menu>
|
|
652
|
-
</mo-popover-container>
|
|
653
|
-
`}
|
|
654
|
-
<div ${style({ flex: '1' })}></div>
|
|
655
|
-
<mo-icon-button icon='close'
|
|
656
|
-
${tooltip(t('Deselect All'))}
|
|
657
|
-
@click=${() => this.deselectAll()}
|
|
658
|
-
></mo-icon-button>
|
|
659
|
-
</mo-flex>
|
|
660
|
-
</mo-flex>
|
|
661
|
-
`;
|
|
662
|
-
}
|
|
663
593
|
get toolbarActionsTemplate() {
|
|
664
594
|
return html `
|
|
665
595
|
${!this.hasFilters ? html.nothing : html `
|
|
@@ -856,9 +786,6 @@ __decorate([
|
|
|
856
786
|
__decorate([
|
|
857
787
|
property({ type: Boolean })
|
|
858
788
|
], DataGrid.prototype, "sidePanelHidden", void 0);
|
|
859
|
-
__decorate([
|
|
860
|
-
property({ type: Boolean })
|
|
861
|
-
], DataGrid.prototype, "selectionToolbarDisabled", void 0);
|
|
862
789
|
__decorate([
|
|
863
790
|
property({ type: Boolean })
|
|
864
791
|
], DataGrid.prototype, "hasAlternatingBackground", void 0);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataGridColumnsController.d.ts","sourceRoot":"","sources":["../DataGridColumnsController.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAA;AACtC,OAAO,EAA2B,KAAK,QAAQ,EAAE,KAAK,cAAc,EAAE,MAAM,YAAY,CAAA;AAExF,qBAAa,yBAAyB,CAAC,KAAK,CAAE,SAAQ,UAAU;a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Ae,GAE1B;IAED,OAAO,KAAK,eAAe,GAa1B;IAED,OAAO,KAAK,uBAAuB,GAElC;IAED,OAAO,KAAK,oBAAoB,GA4B/B;CACD"}
|
|
@@ -36,8 +36,14 @@ export class DataGridColumnsController extends Controller {
|
|
|
36
36
|
// The reason for not doing this in the CSS is that we need to trim all the 0px values out of the columns
|
|
37
37
|
// because the 'grid column gap' renders a gap no matter if the column is 0px or not
|
|
38
38
|
provideCssColumnsProperties() {
|
|
39
|
-
|
|
40
|
-
this.host.style.
|
|
39
|
+
const contentWidth = this.dataColumnsWidths.join(' ');
|
|
40
|
+
if (this.host.style.getPropertyValue('--mo-data-grid-content-width') !== contentWidth) {
|
|
41
|
+
this.host.style.setProperty('--mo-data-grid-content-width', this.dataColumnsWidths.join(' '));
|
|
42
|
+
}
|
|
43
|
+
const columns = this.columnsWidths.join(' ');
|
|
44
|
+
if (this.host.style.getPropertyValue('--mo-data-grid-columns') !== columns) {
|
|
45
|
+
this.host.style.setProperty('--mo-data-grid-columns', columns);
|
|
46
|
+
}
|
|
41
47
|
}
|
|
42
48
|
get columnsWidths() {
|
|
43
49
|
return [
|
package/dist/DataGridFooter.d.ts
CHANGED
|
@@ -6,15 +6,15 @@ import { type DataGrid } from './index.js';
|
|
|
6
6
|
* @attr page
|
|
7
7
|
*/
|
|
8
8
|
export declare class DataGridFooter<TData> extends Component {
|
|
9
|
+
private static readonly pageSizes;
|
|
9
10
|
dataGrid: DataGrid<TData, any>;
|
|
10
11
|
page: number;
|
|
11
12
|
private manualPagination;
|
|
12
|
-
private manualPageSize;
|
|
13
13
|
private readonly pageNumberField;
|
|
14
|
-
private readonly pageSizeSelectField;
|
|
15
14
|
static get styles(): import("@a11d/lit").CSSResult;
|
|
16
15
|
protected get template(): import("lit-html").HTMLTemplateResult;
|
|
17
16
|
private get paginationTemplate();
|
|
17
|
+
private get paginationInfoTemplate();
|
|
18
18
|
private handlePaginationChange;
|
|
19
19
|
private handleManualPageChange;
|
|
20
20
|
private get exportTemplate();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataGridFooter.d.ts","sourceRoot":"","sources":["../DataGridFooter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,SAAS,
|
|
1
|
+
{"version":3,"file":"DataGridFooter.d.ts","sourceRoot":"","sources":["../DataGridFooter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,SAAS,EAAkC,MAAM,WAAW,CAAA;AAI1F,OAAO,EAAE,KAAK,QAAQ,EAA2B,MAAM,YAAY,CAAA;AAcnE;;;;GAIG;AACH,qBACa,cAAc,CAAC,KAAK,CAAE,SAAQ,SAAS;IACnD,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAoE;IAEzE,QAAQ,EAAG,QAAQ,CAAC,KAAK,EAAE,GAAG,CAAC,CAAA;IAE/B,IAAI,SAAI;IAWjC,OAAO,CAAC,gBAAgB,CAAQ;IAET,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAc;IAExE,WAAoB,MAAM,kCAiEzB;IAED,cAAuB,QAAQ,0CAe9B;IAED,OAAO,KAAK,kBAAkB,GA0C7B;IAED,OAAO,KAAK,sBAAsB,GAuBjC;IAED,OAAO,CAAC,sBAAsB;IAO9B,OAAO,CAAC,sBAAsB;IAS9B,OAAO,KAAK,cAAc,GAwBzB;IAED,OAAO,CAAC,OAAO;CAaf;AAED,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,qBAAqB;QAC9B,qBAAqB,EAAE,cAAc,CAAC,OAAO,CAAC,CAAA;KAC9C;CACD"}
|
package/dist/DataGridFooter.js
CHANGED
|
@@ -1,26 +1,28 @@
|
|
|
1
|
+
var DataGridFooter_1;
|
|
1
2
|
import { __decorate } from "tslib";
|
|
2
|
-
import { component, property, Component, css, state, html, query,
|
|
3
|
+
import { component, property, Component, css, state, html, query, style } from '@a11d/lit';
|
|
3
4
|
import { DirectionsByLanguage, Localizer } from '@3mo/localization';
|
|
4
5
|
import { TooltipPlacement, tooltip } from '@3mo/tooltip';
|
|
5
6
|
import excelSvg from './excel.svg.js';
|
|
6
7
|
Localizer.register('de', {
|
|
7
8
|
'${page:number} of ${maxPage:number}': '${page} von ${maxPage}',
|
|
8
|
-
'Export current view to Excel': 'Aktuelle Ansicht nach Excel exportieren'
|
|
9
|
+
'Export current view to Excel': 'Aktuelle Ansicht nach Excel exportieren',
|
|
10
|
+
'Auto': 'Auto'
|
|
9
11
|
});
|
|
10
12
|
Localizer.register('fa', {
|
|
11
13
|
'${page:number} of ${maxPage:number}': '${page} از ${maxPage}',
|
|
14
|
+
'Auto': 'خودکار',
|
|
12
15
|
});
|
|
13
16
|
/**
|
|
14
17
|
* @element mo-data-grid-footer
|
|
15
18
|
* @attr dataGrid
|
|
16
19
|
* @attr page
|
|
17
20
|
*/
|
|
18
|
-
let DataGridFooter = class DataGridFooter extends Component {
|
|
21
|
+
let DataGridFooter = DataGridFooter_1 = class DataGridFooter extends Component {
|
|
19
22
|
constructor() {
|
|
20
23
|
super(...arguments);
|
|
21
24
|
this.page = 1;
|
|
22
25
|
this.manualPagination = false;
|
|
23
|
-
this.manualPageSize = false;
|
|
24
26
|
}
|
|
25
27
|
static get styles() {
|
|
26
28
|
return css `
|
|
@@ -34,6 +36,58 @@ let DataGridFooter = class DataGridFooter extends Component {
|
|
|
34
36
|
:host(:not([hideTopBorder])) {
|
|
35
37
|
border-top: var(--mo-data-grid-border);
|
|
36
38
|
}
|
|
39
|
+
|
|
40
|
+
#page-info {
|
|
41
|
+
display: flex;
|
|
42
|
+
align-items: center;
|
|
43
|
+
|
|
44
|
+
span {
|
|
45
|
+
user-select: none;
|
|
46
|
+
padding-block: 0.25em;
|
|
47
|
+
font-size: small;
|
|
48
|
+
|
|
49
|
+
&:first-of-type {
|
|
50
|
+
&::after {
|
|
51
|
+
content: ' / ';
|
|
52
|
+
color: var(--mo-color-gray);
|
|
53
|
+
padding-inline: 0.25em;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
#selected-length {
|
|
59
|
+
color: color-mix(in srgb, var(--mo-color-accent), currentColor 12.5%);
|
|
60
|
+
font-size: unset;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
#length {
|
|
64
|
+
color: var(--mo-color-gray);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
mo-menu-item {
|
|
68
|
+
font-size: smaller;
|
|
69
|
+
min-height: 20px;
|
|
70
|
+
cursor: pointer;
|
|
71
|
+
gap: 8px;
|
|
72
|
+
|
|
73
|
+
&::part(icon) {
|
|
74
|
+
font-size: 18px;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
&:not([selected]) {
|
|
78
|
+
&::part(icon) {
|
|
79
|
+
opacity: 0;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
#selection-info {
|
|
86
|
+
color: var(--mo-color-accent);
|
|
87
|
+
font-weight: 500;
|
|
88
|
+
margin: 0 6px;
|
|
89
|
+
font-size: smaller;
|
|
90
|
+
}
|
|
37
91
|
`;
|
|
38
92
|
}
|
|
39
93
|
get template() {
|
|
@@ -56,14 +110,8 @@ let DataGridFooter = class DataGridFooter extends Component {
|
|
|
56
110
|
const isRtl = DirectionsByLanguage.get() === 'rtl';
|
|
57
111
|
const hasUnknownDataLength = this.dataGrid.maxPage === undefined;
|
|
58
112
|
const pageText = hasUnknownDataLength ? this.page : t('${page:number} of ${maxPage:number}', { page: this.page, maxPage: this.dataGrid.maxPage ?? 0 });
|
|
59
|
-
const from = (this.page - 1) * this.dataGrid.pageSize + 1;
|
|
60
|
-
const to = from + this.dataGrid.renderDataRecords.length - 1;
|
|
61
|
-
const pageSizeText = [
|
|
62
|
-
`${(Math.min(from, to)).format()}-${to.format()}`,
|
|
63
|
-
hasUnknownDataLength ? undefined : this.dataGrid.dataLength.format(),
|
|
64
|
-
].filter(Boolean).join(' / ');
|
|
65
113
|
return !this.dataGrid.hasPagination ? html.nothing : html `
|
|
66
|
-
<mo-flex direction='horizontal' alignItems='center' gap='
|
|
114
|
+
<mo-flex direction='horizontal' alignItems='center' gap='2vw'>
|
|
67
115
|
<mo-flex direction='horizontal' gap='4px' alignItems='center' justifyContent='center'>
|
|
68
116
|
<mo-icon-button dense icon=${isRtl ? 'last_page' : 'first_page'}
|
|
69
117
|
?disabled=${this.page === 1}
|
|
@@ -97,26 +145,39 @@ let DataGridFooter = class DataGridFooter extends Component {
|
|
|
97
145
|
></mo-icon-button>
|
|
98
146
|
</mo-flex>
|
|
99
147
|
|
|
100
|
-
|
|
101
|
-
${!this.manualPageSize ? html `
|
|
102
|
-
<div ${style({ fontSize: 'small', userSelect: 'none' })} @click=${() => this.manualPageSize = true}>${pageSizeText}</div>
|
|
103
|
-
` : html `
|
|
104
|
-
<mo-field-select-data-grid-page-size dense ${style({ width: '90px' })}
|
|
105
|
-
.dataGrid=${this.dataGrid}
|
|
106
|
-
value=${ifDefined(this.dataGrid.pagination)}
|
|
107
|
-
@change=${(e) => this.handlePaginationChange(e.detail)}>
|
|
108
|
-
</mo-field-select-data-grid-page-size>
|
|
109
|
-
`}
|
|
110
|
-
</div>
|
|
148
|
+
${this.paginationInfoTemplate}
|
|
111
149
|
</mo-flex>
|
|
112
150
|
`;
|
|
113
151
|
}
|
|
152
|
+
get paginationInfoTemplate() {
|
|
153
|
+
const from = (this.page - 1) * this.dataGrid.pageSize + 1;
|
|
154
|
+
const to = from + this.dataGrid.renderDataRecords.length - 1;
|
|
155
|
+
const rangeText = `${(Math.min(from, to)).format()}-${to.format()}`;
|
|
156
|
+
const dataLengthText = this.dataGrid.maxPage === undefined ? undefined : this.dataGrid.dataLength.format();
|
|
157
|
+
return html `
|
|
158
|
+
<mo-popover-container id='page-info' placement='block-start' fixed>
|
|
159
|
+
${this.dataGrid.selectedData.length ? html `
|
|
160
|
+
<span id='selected-length'>${this.dataGrid.selectedData.length}</span>
|
|
161
|
+
` : html `
|
|
162
|
+
<span id='range' tabindex='0'>${rangeText}</span>
|
|
163
|
+
`}
|
|
164
|
+
<span id='length'>${dataLengthText}</span>
|
|
165
|
+
<mo-menu slot='popover'>
|
|
166
|
+
${!this.dataGrid?.supportsDynamicPageSize ? html.nothing : html `
|
|
167
|
+
<mo-menu-item icon='done' ?selected=${this.dataGrid.pagination === 'auto'} value='auto' @click=${() => this.handlePaginationChange('auto')}>${t('Auto')}</mo-menu-item>
|
|
168
|
+
`}
|
|
169
|
+
${DataGridFooter_1.pageSizes.map(size => html `
|
|
170
|
+
<mo-menu-item icon='done' ?selected=${this.dataGrid.pagination === size} value=${size} @click=${() => this.handlePaginationChange(size)}>${size.format()}</mo-menu-item>
|
|
171
|
+
`)}
|
|
172
|
+
</mo-menu>
|
|
173
|
+
</mo-popover-container>
|
|
174
|
+
`;
|
|
175
|
+
}
|
|
114
176
|
handlePaginationChange(value) {
|
|
115
177
|
if (this.dataGrid.maxPage && this.dataGrid.page > this.dataGrid.maxPage) {
|
|
116
178
|
this.dataGrid.page = this.dataGrid.maxPage;
|
|
117
179
|
}
|
|
118
180
|
this.dataGrid.setPagination(value);
|
|
119
|
-
this.manualPageSize = false;
|
|
120
181
|
}
|
|
121
182
|
handleManualPageChange(value) {
|
|
122
183
|
if (this.page === value) {
|
|
@@ -158,11 +219,11 @@ let DataGridFooter = class DataGridFooter extends Component {
|
|
|
158
219
|
value = this.dataGrid.maxPage;
|
|
159
220
|
}
|
|
160
221
|
this.manualPagination = false;
|
|
161
|
-
this.manualPageSize = false;
|
|
162
222
|
this.page = value;
|
|
163
223
|
this.dataGrid.setPage(value);
|
|
164
224
|
}
|
|
165
225
|
};
|
|
226
|
+
DataGridFooter.pageSizes = new Array(10, 25, 50, 100, 250, 500);
|
|
166
227
|
__decorate([
|
|
167
228
|
property({ type: Object })
|
|
168
229
|
], DataGridFooter.prototype, "dataGrid", void 0);
|
|
@@ -174,32 +235,17 @@ __decorate([
|
|
|
174
235
|
async updated(value) {
|
|
175
236
|
if (value === true) {
|
|
176
237
|
await this.updateComplete;
|
|
177
|
-
await new Promise(r =>
|
|
238
|
+
await new Promise(r => requestAnimationFrame(r));
|
|
178
239
|
this.pageNumberField.focus();
|
|
179
240
|
this.pageNumberField.select();
|
|
180
241
|
}
|
|
181
242
|
}
|
|
182
243
|
})
|
|
183
244
|
], DataGridFooter.prototype, "manualPagination", void 0);
|
|
184
|
-
__decorate([
|
|
185
|
-
state({
|
|
186
|
-
async updated(value) {
|
|
187
|
-
if (value === true) {
|
|
188
|
-
await this.updateComplete;
|
|
189
|
-
await new Promise(r => requestIdleCallback(r));
|
|
190
|
-
this.pageSizeSelectField.focus();
|
|
191
|
-
this.pageSizeSelectField.open = true;
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
})
|
|
195
|
-
], DataGridFooter.prototype, "manualPageSize", void 0);
|
|
196
245
|
__decorate([
|
|
197
246
|
query('mo-field-number')
|
|
198
247
|
], DataGridFooter.prototype, "pageNumberField", void 0);
|
|
199
|
-
__decorate([
|
|
200
|
-
query('mo-field-select-data-grid-page-size')
|
|
201
|
-
], DataGridFooter.prototype, "pageSizeSelectField", void 0);
|
|
202
|
-
DataGridFooter = __decorate([
|
|
248
|
+
DataGridFooter = DataGridFooter_1 = __decorate([
|
|
203
249
|
component('mo-data-grid-footer')
|
|
204
250
|
], DataGridFooter);
|
|
205
251
|
export { DataGridFooter };
|
package/dist/DataGridHeader.d.ts
CHANGED
|
@@ -4,16 +4,16 @@ export declare class DataGridHeader<TData> extends Component {
|
|
|
4
4
|
readonly pageChange: EventDispatcher<number>;
|
|
5
5
|
readonly modeSelectionChange: EventDispatcher<string>;
|
|
6
6
|
dataGrid: DataGrid<TData, any>;
|
|
7
|
-
selection: CheckboxSelection;
|
|
8
7
|
overlayOpen: boolean;
|
|
9
8
|
protected connected(): void;
|
|
10
9
|
protected disconnected(): void;
|
|
11
10
|
private readonly handleDataGridDataChange;
|
|
12
|
-
private readonly handleDataGridSelectionChange;
|
|
13
11
|
static get styles(): import("@a11d/lit").CSSResult;
|
|
14
12
|
protected get template(): import("lit-html").HTMLTemplateResult;
|
|
15
13
|
private get detailsExpanderTemplate();
|
|
16
14
|
private get selectionTemplate();
|
|
15
|
+
private get selection();
|
|
16
|
+
private readonly toggleSelection;
|
|
17
17
|
private get contentTemplate();
|
|
18
18
|
private readonly getHeaderCellTemplate;
|
|
19
19
|
private get fillerTemplate();
|
|
@@ -21,7 +21,6 @@ export declare class DataGridHeader<TData> extends Component {
|
|
|
21
21
|
private getResizeObserver;
|
|
22
22
|
private sort;
|
|
23
23
|
private toggleAllDetails;
|
|
24
|
-
private readonly handleSelectionChange;
|
|
25
24
|
}
|
|
26
25
|
declare global {
|
|
27
26
|
interface HTMLElementTagNameMap {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataGridHeader.d.ts","sourceRoot":"","sources":["../DataGridHeader.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,SAAS,
|
|
1
|
+
{"version":3,"file":"DataGridHeader.d.ts","sourceRoot":"","sources":["../DataGridHeader.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,SAAS,EAAsD,MAAM,WAAW,CAAA;AAIpG,OAAO,EAAuE,KAAK,QAAQ,EAAwB,MAAM,YAAY,CAAA;AAyBrI,qBACa,cAAc,CAAC,KAAK,CAAE,SAAQ,SAAS;IAC1C,QAAQ,CAAC,UAAU,EAAG,eAAe,CAAC,MAAM,CAAC,CAAA;IAC7C,QAAQ,CAAC,mBAAmB,EAAG,eAAe,CAAC,MAAM,CAAC,CAAA;IAEnC,QAAQ,EAAG,QAAQ,CAAC,KAAK,EAAE,GAAG,CAAC,CAAA;IACf,WAAW,UAAQ;cAE5C,SAAS;cAIT,YAAY;IAI/B,OAAO,CAAC,QAAQ,CAAC,wBAAwB,CAExC;IAED,WAAoB,MAAM,kCAyGzB;IAED,cAAuB,QAAQ,0CAQ9B;IAED,OAAO,KAAK,uBAAuB,GAclC;IAED,OAAO,KAAK,iBAAiB,GAW5B;IAED,OAAO,KAAK,SAAS,GASpB;IAED,OAAO,CAAC,QAAQ,CAAC,eAAe,CAQ/B;IAED,OAAO,KAAK,eAAe,GAI1B;IAED,OAAO,CAAC,QAAQ,CAAC,qBAAqB,CAqCrC;IAED,OAAO,KAAK,cAAc,GAEzB;IAED,OAAO,KAAK,YAAY,GA8BvB;IAED,OAAO,CAAC,iBAAiB;IAKzB,OAAO,CAAC,IAAI;IAOZ,OAAO,CAAC,gBAAgB;CAIxB;AAED,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,qBAAqB;QAC9B,qBAAqB,EAAE,cAAc,CAAC,OAAO,CAAC,CAAA;KAC9C;CACD"}
|