@3mo/data-grid 0.9.16-preview.0 → 0.9.16
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/DataGridColumn.d.ts +2 -1
- package/dist/DataGridColumn.d.ts.map +1 -1
- package/dist/DataGridColumn.js +5 -4
- package/dist/DataGridSidePanel.d.ts +0 -2
- package/dist/DataGridSidePanel.d.ts.map +1 -1
- package/dist/DataGridSidePanel.js +0 -17
- package/dist/custom-elements.json +4651 -7
- package/dist/index.d.ts +0 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -2
- package/dist/rows/DataGridRow.d.ts.map +1 -1
- package/dist/rows/DataGridRow.js +2 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -3
package/dist/DataGridColumn.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type HTMLTemplateResult } from '@a11d/lit';
|
|
2
|
+
import { equals } from '@a11d/equals';
|
|
2
3
|
import type { DataGrid } from './index.js';
|
|
3
4
|
import type * as CSS from 'csstype';
|
|
4
5
|
export type DataGridColumnAlignment = 'start' | 'center' | 'end';
|
|
@@ -22,7 +23,7 @@ export declare class DataGridColumn<TData, TValue = unknown> {
|
|
|
22
23
|
sumHeading?: string;
|
|
23
24
|
getSumTemplate?(sum: number): HTMLTemplateResult;
|
|
24
25
|
constructor(column: Partial<DataGridColumn<TData, TValue>>);
|
|
25
|
-
equals(other: DataGridColumn<TData, any>): boolean;
|
|
26
|
+
[equals](other: DataGridColumn<TData, any>): boolean;
|
|
26
27
|
with(other: Partial<this>): DataGridColumn<TData, TValue>;
|
|
27
28
|
private _widthInPixels?;
|
|
28
29
|
get widthInPixels(): number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataGridColumn.d.ts","sourceRoot":"","sources":["../DataGridColumn.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,KAAK,kBAAkB,EAAE,MAAM,WAAW,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CAAC,KAAK,CAAC,CAAQ;IAC5C,sBAAsB,CAAC,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,GAAG,kBAAkB;IAEvE,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,cAAc,CAAC,CAAC,GAAG,EAAE,MAAM,GAAG,kBAAkB;gBAEpC,MAAM,EAAE,OAAO,CAAC,cAAc,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;IAI1D,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,cAAc,CAAC,KAAK,EAAE,GAAG,CAAC,GAAG,OAAO;IAMpD,IAAI,CAAC,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC,GAAG,cAAc,CAAC,KAAK,EAAE,MAAM,CAAC;IAIzD,OAAO,CAAC,cAAc,CAAC,CAAQ;IAC/B,IAAI,aAAa,WAAsC;IACvD,IAAI,aAAa,CAAC,KAAK,QAAA,EAGtB;IAED,OAAO,CAAC,aAAa,CAAQ;IAC7B,IAAI,YAAY,YAAgC;IAChD,IAAI,YAAY,CAAC,KAAK,SAAA,EAGrB;IAED,IAAI,iBAAiB,6FAIpB;IAED,IAAI,WAAW,mCAkBd;IAED,IAAI,uBAAuB,WA2B1B;CACD"}
|
package/dist/DataGridColumn.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { html, style } from '@a11d/lit';
|
|
2
|
+
import { equals } from '@a11d/equals';
|
|
2
3
|
export class DataGridColumn {
|
|
3
4
|
get sortDataSelector() { return this._sortDataSelector || this.dataSelector; }
|
|
4
5
|
set sortDataSelector(value) { this._sortDataSelector = value; }
|
|
@@ -12,10 +13,10 @@ export class DataGridColumn {
|
|
|
12
13
|
this._intersecting = false;
|
|
13
14
|
Object.assign(this, column);
|
|
14
15
|
}
|
|
15
|
-
equals(other) {
|
|
16
|
-
return this.dataSelector
|
|
17
|
-
|
|
18
|
-
&& this.description === other.description;
|
|
16
|
+
[equals](other) {
|
|
17
|
+
return !!this.dataSelector || !!other.dataSelector
|
|
18
|
+
? this.dataSelector === other.dataSelector
|
|
19
|
+
: this.heading === other.heading && this.description === other.description;
|
|
19
20
|
}
|
|
20
21
|
with(other) {
|
|
21
22
|
return new DataGridColumn({ ...this, ...other });
|
|
@@ -15,8 +15,6 @@ export declare class DataGridSidePanel<TData> extends Component {
|
|
|
15
15
|
static get styles(): import("@a11d/lit").CSSResult;
|
|
16
16
|
protected get template(): import("lit-html").HTMLTemplateResult;
|
|
17
17
|
protected get filtersTemplate(): import("lit-html").HTMLTemplateResult;
|
|
18
|
-
private get areParametersDirty();
|
|
19
|
-
private resetAllParameters;
|
|
20
18
|
protected get settingsTemplate(): import("lit-html").HTMLTemplateResult;
|
|
21
19
|
private readonly getColumnTemplate;
|
|
22
20
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataGridSidePanel.d.ts","sourceRoot":"","sources":["../DataGridSidePanel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,SAAS,EAAwC,MAAM,WAAW,CAAA;AAI7F,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,eAAe,CAAA;
|
|
1
|
+
{"version":3,"file":"DataGridSidePanel.d.ts","sourceRoot":"","sources":["../DataGridSidePanel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,SAAS,EAAwC,MAAM,WAAW,CAAA;AAI7F,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,eAAe,CAAA;AAW7C,oBAAY,oBAAoB;IAC/B,QAAQ,aAAa;IACrB,OAAO,YAAY;CACnB;AAED;;;;GAIG;AACH,qBACa,iBAAiB,CAAC,KAAK,CAAE,SAAQ,SAAS;IAC1B,QAAQ,EAAG,QAAQ,CAAC,KAAK,EAAE,GAAG,CAAC,CAAA;IAC/C,GAAG,CAAC,EAAE,oBAAoB,CAAA;IAEtC,WAAoB,MAAM,kCA4CzB;IAED,cAAuB,QAAQ,0CAmC9B;IAED,SAAS,KAAK,eAAe,0CAM5B;IAED,SAAS,KAAK,gBAAgB,0CAgC7B;IAED,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAcjC;CACD;AAED,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,qBAAqB;QAC9B,yBAAyB,EAAE,iBAAiB,CAAC,OAAO,CAAC,CAAA;KACrD;CACD"}
|
|
@@ -9,7 +9,6 @@ Localizer.dictionaries.add('de', {
|
|
|
9
9
|
'Font Size': 'Schriftgröße',
|
|
10
10
|
'Row Height': 'Zeilenhöhe',
|
|
11
11
|
'Design': 'Design',
|
|
12
|
-
'Reset all filters': 'Alle Filter zurücksetzen',
|
|
13
12
|
});
|
|
14
13
|
export var DataGridSidePanelTab;
|
|
15
14
|
(function (DataGridSidePanelTab) {
|
|
@@ -24,10 +23,6 @@ export var DataGridSidePanelTab;
|
|
|
24
23
|
let DataGridSidePanel = class DataGridSidePanel extends Component {
|
|
25
24
|
constructor() {
|
|
26
25
|
super(...arguments);
|
|
27
|
-
this.resetAllParameters = () => {
|
|
28
|
-
this.dataGrid.parameters =
|
|
29
|
-
this.dataGrid.initialParameters;
|
|
30
|
-
};
|
|
31
26
|
this.getColumnTemplate = (column) => {
|
|
32
27
|
const change = async (e) => {
|
|
33
28
|
column.hidden = e.detail === false;
|
|
@@ -129,21 +124,9 @@ let DataGridSidePanel = class DataGridSidePanel extends Component {
|
|
|
129
124
|
return html `
|
|
130
125
|
<mo-flex gap='14px' style='padding: 14px'>
|
|
131
126
|
<slot name='filter'></slot>
|
|
132
|
-
${!this.dataGrid.hasFilters || !('parameters' in this.dataGrid) ? html.nothing : html `
|
|
133
|
-
<mo-button type='raised'
|
|
134
|
-
?disabled=${this.areParametersDirty}
|
|
135
|
-
@click=${() => this.resetAllParameters()}
|
|
136
|
-
>
|
|
137
|
-
${t('Reset all filters')}
|
|
138
|
-
</mo-button>
|
|
139
|
-
`}
|
|
140
127
|
</mo-flex>
|
|
141
128
|
`;
|
|
142
129
|
}
|
|
143
|
-
get areParametersDirty() {
|
|
144
|
-
const { parameters, initialParameters } = this.dataGrid;
|
|
145
|
-
return JSON.stringify(parameters) === JSON.stringify(initialParameters);
|
|
146
|
-
}
|
|
147
130
|
get settingsTemplate() {
|
|
148
131
|
return html `
|
|
149
132
|
<mo-flex>
|