@3mo/data-grid 0.5.16 → 0.6.0-rc.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/ColumnDefinition.d.ts +1 -1
- package/dist/ColumnDefinition.d.ts.map +1 -1
- package/dist/DataGrid.d.ts +1 -1
- package/dist/DataGrid.d.ts.map +1 -1
- package/dist/DataGrid.js +20 -22
- package/dist/DataGridCell.d.ts +3 -3
- package/dist/DataGridCell.d.ts.map +1 -1
- package/dist/DataGridFooter.d.ts +1 -1
- package/dist/DataGridFooter.d.ts.map +1 -1
- package/dist/DataGridHeader.d.ts +2 -4
- package/dist/DataGridHeader.d.ts.map +1 -1
- package/dist/DataGridHeader.js +42 -47
- package/dist/DataGridHeaderSeparator.d.ts +4 -5
- package/dist/DataGridHeaderSeparator.d.ts.map +1 -1
- package/dist/DataGridHeaderSeparator.js +35 -28
- package/dist/DataGridPrimaryContextMenuItem.js +5 -5
- package/dist/DataGridSelectionController.d.ts +1 -1
- package/dist/DataGridSelectionController.d.ts.map +1 -1
- package/dist/DataGridSidePanel.d.ts +1 -1
- package/dist/DataGridSidePanel.d.ts.map +1 -1
- package/dist/FieldSelectDataGridPageSize.d.ts +1 -1
- package/dist/FieldSelectDataGridPageSize.d.ts.map +1 -1
- package/dist/columns/DataGridColumn.d.ts +1 -1
- package/dist/columns/DataGridColumn.d.ts.map +1 -1
- package/dist/columns/DataGridColumnBoolean.d.ts +1 -1
- package/dist/columns/DataGridColumnBoolean.d.ts.map +1 -1
- package/dist/columns/DataGridColumnDeletion.d.ts +1 -1
- package/dist/columns/DataGridColumnDeletion.d.ts.map +1 -1
- package/dist/columns/date-time/DataGridColumnDateTimeBase.d.ts +1 -1
- package/dist/columns/date-time/DataGridColumnDateTimeBase.d.ts.map +1 -1
- package/dist/columns/number/DataGridColumnCurrency.d.ts +5 -2
- package/dist/columns/number/DataGridColumnCurrency.d.ts.map +1 -1
- package/dist/columns/number/DataGridColumnCurrency.js +12 -7
- package/dist/columns/number/DataGridColumnNumberBase.d.ts +1 -1
- package/dist/columns/number/DataGridColumnNumberBase.d.ts.map +1 -1
- package/dist/columns/number/DataGridFooterSum.js +20 -20
- package/dist/custom-elements.json +70 -60
- package/dist/excel.svg.js +47 -47
- package/dist/rows/DataGridDefaultRow.d.ts.map +1 -1
- package/dist/rows/DataGridDefaultRow.js +11 -4
- package/dist/rows/DataGridRow.d.ts +4 -4
- package/dist/rows/DataGridRow.d.ts.map +1 -1
- package/dist/rows/DataGridRow.js +16 -13
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataGridColumnDateTimeBase.d.ts","sourceRoot":"","sources":["../../../columns/date-time/DataGridColumnDateTimeBase.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,OAAO,EAAoB,MAAM,WAAW,CAAA;
|
|
1
|
+
{"version":3,"file":"DataGridColumnDateTimeBase.d.ts","sourceRoot":"","sources":["../../../columns/date-time/DataGridColumnDateTimeBase.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,OAAO,EAAoB,MAAM,WAAW,CAAA;AACpE,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAErD;;;GAGG;AACH,8BAAsB,0BAA0B,CAAC,KAAK,EAAE,KAAK,SAAS;IAAE,MAAM,CAAC,GAAG,OAAO,EAAE,GAAG,EAAE,GAAG,MAAM,CAAA;CAAE,CAAE,SAAQ,cAAc,CAAC,KAAK,EAAE,KAAK,CAAC;IAChJ,MAAM,CAAC,oBAAoB,CAAC,EAAE,IAAI,CAAC,qBAAqB,CAAA;IACxD,QAAQ,CAAC,QAAQ,CAAC,QAAQ,EAAE,UAAU,CAAC,OAAO,OAAO,CAAC,CAAA;IAE1B,aAAa,CAAC,EAAE,IAAI,CAAC,qBAAqB,CAAA;IACzC,YAAY,UAAQ;IAEjD,SAAS,KAAK,kBAAkB,2CAE/B;IAED,sBAAsB,CAAC,KAAK,EAAE,KAAK,GAAG,SAAS,EAAE,IAAI,EAAE,KAAK;CAY5D"}
|
|
@@ -4,11 +4,14 @@ import { DataGridColumnNumberBase } from './DataGridColumnNumberBase.js';
|
|
|
4
4
|
* @element mo-data-grid-column-currency
|
|
5
5
|
*
|
|
6
6
|
* @attr currency - The currency of the values.
|
|
7
|
+
* @attr currencyDataSelector - The key path to the currency of the values.
|
|
7
8
|
*/
|
|
8
9
|
export declare class DataGridColumnCurrency<TData> extends DataGridColumnNumberBase<TData> {
|
|
9
10
|
static defaultCurrency?: Currency;
|
|
10
|
-
currency
|
|
11
|
-
|
|
11
|
+
currency?: Currency;
|
|
12
|
+
currencyDataSelector?: KeyPathOf<TData>;
|
|
13
|
+
private getCurrency;
|
|
14
|
+
getContentTemplate(value: number | undefined, data: TData): import("lit-html").HTMLTemplateResult;
|
|
12
15
|
getEditContentTemplate(value: number | undefined, data: TData): import("lit-html").HTMLTemplateResult;
|
|
13
16
|
getSumTemplate(sum: number): import("lit-html").HTMLTemplateResult;
|
|
14
17
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataGridColumnCurrency.d.ts","sourceRoot":"","sources":["../../../columns/number/DataGridColumnCurrency.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,
|
|
1
|
+
{"version":3,"file":"DataGridColumnCurrency.d.ts","sourceRoot":"","sources":["../../../columns/number/DataGridColumnCurrency.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAqB,MAAM,mBAAmB,CAAA;AAE/D,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAA;AAExE;;;;;EAKE;AACF,qBACa,sBAAsB,CAAC,KAAK,CAAE,SAAQ,wBAAwB,CAAC,KAAK,CAAC;IACjF,MAAM,CAAC,eAAe,CAAC,EAAE,QAAQ,CAAA;IAEuC,QAAQ,CAAC,EAAE,QAAQ,CAAA;IAC/E,oBAAoB,CAAC,EAAE,SAAS,CAAC,KAAK,CAAC,CAAA;IAEnD,OAAO,CAAC,WAAW;IAMnB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,EAAE,IAAI,EAAE,KAAK;IAIzD,sBAAsB,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,EAAE,IAAI,EAAE,KAAK;IAW7D,cAAc,CAAC,GAAG,EAAE,MAAM;CAK1B;AAED,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,qBAAqB;QAC9B,8BAA8B,EAAE,sBAAsB,CAAC,OAAO,CAAC,CAAA;KAC/D;CACD"}
|
|
@@ -1,26 +1,28 @@
|
|
|
1
1
|
var DataGridColumnCurrency_1;
|
|
2
2
|
import { __decorate } from "tslib";
|
|
3
3
|
import { component, html, ifDefined, property } from '@a11d/lit';
|
|
4
|
+
import { Currency } from '@3mo/localization';
|
|
4
5
|
import { FieldCurrency } from '@3mo/number-fields';
|
|
5
6
|
import { DataGridColumnNumberBase } from './DataGridColumnNumberBase.js';
|
|
6
7
|
/**
|
|
7
8
|
* @element mo-data-grid-column-currency
|
|
8
9
|
*
|
|
9
10
|
* @attr currency - The currency of the values.
|
|
11
|
+
* @attr currencyDataSelector - The key path to the currency of the values.
|
|
10
12
|
*/
|
|
11
13
|
let DataGridColumnCurrency = DataGridColumnCurrency_1 = class DataGridColumnCurrency extends DataGridColumnNumberBase {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
14
|
+
getCurrency(data) {
|
|
15
|
+
return (this.currencyDataSelector ? Currency[getValueByKeyPath(data, this.currencyDataSelector)] : undefined)
|
|
16
|
+
?? this.currency
|
|
17
|
+
?? DataGridColumnCurrency_1.defaultCurrency;
|
|
15
18
|
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
return html `${this.getNumber(value)?.formatAsCurrency(this.currency) ?? html.nothing}`;
|
|
19
|
+
getContentTemplate(value, data) {
|
|
20
|
+
return html `${this.getNumber(value)?.formatAsCurrency(this.getCurrency(data)) ?? html.nothing}`;
|
|
19
21
|
}
|
|
20
22
|
getEditContentTemplate(value, data) {
|
|
21
23
|
return html `
|
|
22
24
|
<mo-field-currency dense autofocus
|
|
23
|
-
.currency=${this.
|
|
25
|
+
.currency=${this.getCurrency(data)}
|
|
24
26
|
label=${this.heading}
|
|
25
27
|
value=${ifDefined(value)}
|
|
26
28
|
@change=${(e) => this.handleEdit(e.detail, data)}
|
|
@@ -36,6 +38,9 @@ let DataGridColumnCurrency = DataGridColumnCurrency_1 = class DataGridColumnCurr
|
|
|
36
38
|
__decorate([
|
|
37
39
|
property({ type: Object, converter: FieldCurrency.currencyConverter })
|
|
38
40
|
], DataGridColumnCurrency.prototype, "currency", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
property()
|
|
43
|
+
], DataGridColumnCurrency.prototype, "currencyDataSelector", void 0);
|
|
39
44
|
DataGridColumnCurrency = DataGridColumnCurrency_1 = __decorate([
|
|
40
45
|
component('mo-data-grid-column-currency')
|
|
41
46
|
], DataGridColumnCurrency);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { HTMLTemplateResult } from '@a11d/lit';
|
|
1
|
+
import { type HTMLTemplateResult } from '@a11d/lit';
|
|
2
2
|
import { DataGridColumn } from '../DataGridColumn.js';
|
|
3
3
|
export declare abstract class DataGridColumnNumberBase<TData> extends DataGridColumn<TData, number> {
|
|
4
4
|
sumHeading: string | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataGridColumnNumberBase.d.ts","sourceRoot":"","sources":["../../../columns/number/DataGridColumnNumberBase.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAY,MAAM,WAAW,CAAA;
|
|
1
|
+
{"version":3,"file":"DataGridColumnNumberBase.d.ts","sourceRoot":"","sources":["../../../columns/number/DataGridColumnNumberBase.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,kBAAkB,EAAY,MAAM,WAAW,CAAA;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAErD,8BAAsB,wBAAwB,CAAC,KAAK,CAAE,SAAQ,cAAc,CAAC,KAAK,EAAE,MAAM,CAAC;IAC9E,UAAU,EAAE,MAAM,GAAG,SAAS,CAAY;IACjC,SAAS,SAAQ;IAEtC,IAAa,UAAU;;;;;;;;;;;;;;MAMtB;IAED,SAAS,CAAC,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS;IAI7C,QAAQ,CAAC,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,kBAAkB;CACxD"}
|
|
@@ -13,29 +13,29 @@ let DataGridFooterSum = class DataGridFooterSum extends Component {
|
|
|
13
13
|
this.heading = '';
|
|
14
14
|
}
|
|
15
15
|
static get styles() {
|
|
16
|
-
return css `
|
|
17
|
-
:host {
|
|
18
|
-
display: flex;
|
|
19
|
-
flex-direction: column;
|
|
20
|
-
position: relative;
|
|
21
|
-
max-height: 100%;
|
|
22
|
-
line-height: 1em;
|
|
23
|
-
user-select: all;
|
|
24
|
-
align-items: flex-end;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
div {
|
|
28
|
-
color: var(--mo-color-gray);
|
|
29
|
-
font-size: 0.75rem;
|
|
30
|
-
}
|
|
16
|
+
return css `
|
|
17
|
+
:host {
|
|
18
|
+
display: flex;
|
|
19
|
+
flex-direction: column;
|
|
20
|
+
position: relative;
|
|
21
|
+
max-height: 100%;
|
|
22
|
+
line-height: 1em;
|
|
23
|
+
user-select: all;
|
|
24
|
+
align-items: flex-end;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
div {
|
|
28
|
+
color: var(--mo-color-gray);
|
|
29
|
+
font-size: 0.75rem;
|
|
30
|
+
}
|
|
31
31
|
`;
|
|
32
32
|
}
|
|
33
33
|
get template() {
|
|
34
|
-
return html `
|
|
35
|
-
<div>${this.heading}</div>
|
|
36
|
-
<mo-flex direction='horizontal' justifyContent='center'>
|
|
37
|
-
<slot></slot>
|
|
38
|
-
</mo-flex>
|
|
34
|
+
return html `
|
|
35
|
+
<div>${this.heading}</div>
|
|
36
|
+
<mo-flex direction='horizontal' justifyContent='center'>
|
|
37
|
+
<slot></slot>
|
|
38
|
+
</mo-flex>
|
|
39
39
|
`;
|
|
40
40
|
}
|
|
41
41
|
};
|
|
@@ -812,15 +812,6 @@
|
|
|
812
812
|
}
|
|
813
813
|
],
|
|
814
814
|
"properties": [
|
|
815
|
-
{
|
|
816
|
-
"name": "disableResizing",
|
|
817
|
-
"type": "boolean",
|
|
818
|
-
"default": "false"
|
|
819
|
-
},
|
|
820
|
-
{
|
|
821
|
-
"name": "columnUpdate",
|
|
822
|
-
"type": "EventDispatcher<void>"
|
|
823
|
-
},
|
|
824
815
|
{
|
|
825
816
|
"name": "dataGrid",
|
|
826
817
|
"attribute": "dataGrid",
|
|
@@ -831,12 +822,6 @@
|
|
|
831
822
|
"attribute": "column",
|
|
832
823
|
"type": "ColumnDefinition<unknown>"
|
|
833
824
|
}
|
|
834
|
-
],
|
|
835
|
-
"events": [
|
|
836
|
-
{
|
|
837
|
-
"name": "columnUpdate",
|
|
838
|
-
"type": "CustomEvent<void>"
|
|
839
|
-
}
|
|
840
825
|
]
|
|
841
826
|
},
|
|
842
827
|
{
|
|
@@ -964,10 +949,6 @@
|
|
|
964
949
|
"type": "boolean",
|
|
965
950
|
"default": "false"
|
|
966
951
|
},
|
|
967
|
-
{
|
|
968
|
-
"name": "menuAlignment",
|
|
969
|
-
"type": "PopoverAlignment | undefined"
|
|
970
|
-
},
|
|
971
952
|
{
|
|
972
953
|
"name": "open",
|
|
973
954
|
"type": "boolean",
|
|
@@ -1007,6 +988,16 @@
|
|
|
1007
988
|
"description": "The selected index.",
|
|
1008
989
|
"type": "Index"
|
|
1009
990
|
},
|
|
991
|
+
{
|
|
992
|
+
"name": "menuAlignment",
|
|
993
|
+
"description": "Menu popover alignment",
|
|
994
|
+
"type": "PopoverAlignment | undefined"
|
|
995
|
+
},
|
|
996
|
+
{
|
|
997
|
+
"name": "menuPlacement",
|
|
998
|
+
"description": "Menu popover placement",
|
|
999
|
+
"type": "PopoverPlacement | undefined"
|
|
1000
|
+
},
|
|
1010
1001
|
{
|
|
1011
1002
|
"name": "value",
|
|
1012
1003
|
"description": "The selected value.",
|
|
@@ -1035,10 +1026,6 @@
|
|
|
1035
1026
|
"description": "Whether the field is required",
|
|
1036
1027
|
"type": "boolean",
|
|
1037
1028
|
"default": "false"
|
|
1038
|
-
},
|
|
1039
|
-
{
|
|
1040
|
-
"name": "alignment",
|
|
1041
|
-
"description": "Popover alignment"
|
|
1042
1029
|
}
|
|
1043
1030
|
],
|
|
1044
1031
|
"properties": [
|
|
@@ -1061,11 +1048,6 @@
|
|
|
1061
1048
|
"type": "boolean",
|
|
1062
1049
|
"default": "false"
|
|
1063
1050
|
},
|
|
1064
|
-
{
|
|
1065
|
-
"name": "menuAlignment",
|
|
1066
|
-
"attribute": "menuAlignment",
|
|
1067
|
-
"type": "PopoverAlignment | undefined"
|
|
1068
|
-
},
|
|
1069
1051
|
{
|
|
1070
1052
|
"name": "open",
|
|
1071
1053
|
"attribute": "open",
|
|
@@ -1140,6 +1122,18 @@
|
|
|
1140
1122
|
"description": "The selected index.",
|
|
1141
1123
|
"type": "Index"
|
|
1142
1124
|
},
|
|
1125
|
+
{
|
|
1126
|
+
"name": "menuAlignment",
|
|
1127
|
+
"attribute": "menuAlignment",
|
|
1128
|
+
"description": "Menu popover alignment",
|
|
1129
|
+
"type": "PopoverAlignment | undefined"
|
|
1130
|
+
},
|
|
1131
|
+
{
|
|
1132
|
+
"name": "menuPlacement",
|
|
1133
|
+
"attribute": "menuPlacement",
|
|
1134
|
+
"description": "Menu popover placement",
|
|
1135
|
+
"type": "PopoverPlacement | undefined"
|
|
1136
|
+
},
|
|
1143
1137
|
{
|
|
1144
1138
|
"name": "change",
|
|
1145
1139
|
"type": "EventDispatcher<T | undefined>"
|
|
@@ -2585,8 +2579,12 @@
|
|
|
2585
2579
|
{
|
|
2586
2580
|
"name": "currency",
|
|
2587
2581
|
"description": "The currency of the values.",
|
|
2588
|
-
"type": "Currency | undefined"
|
|
2589
|
-
|
|
2582
|
+
"type": "Currency | undefined"
|
|
2583
|
+
},
|
|
2584
|
+
{
|
|
2585
|
+
"name": "currencyDataSelector",
|
|
2586
|
+
"description": "The key path to the currency of the values.",
|
|
2587
|
+
"type": "KeyPathOf<TData>"
|
|
2590
2588
|
},
|
|
2591
2589
|
{
|
|
2592
2590
|
"name": "sumHeading",
|
|
@@ -2658,8 +2656,13 @@
|
|
|
2658
2656
|
"name": "currency",
|
|
2659
2657
|
"attribute": "currency",
|
|
2660
2658
|
"description": "The currency of the values.",
|
|
2661
|
-
"type": "Currency | undefined"
|
|
2662
|
-
|
|
2659
|
+
"type": "Currency | undefined"
|
|
2660
|
+
},
|
|
2661
|
+
{
|
|
2662
|
+
"name": "currencyDataSelector",
|
|
2663
|
+
"attribute": "currencyDataSelector",
|
|
2664
|
+
"description": "The key path to the currency of the values.",
|
|
2665
|
+
"type": "(object extends TData ? string : TData extends readonly any[] ? Extract<keyof TData, `${number}`> | SubKeyPathOf<TData, Extract<keyof TData, `${number}`>, 1> : TData extends object ? Extract<...> | SubKeyPathOf<...> : never) | undefined"
|
|
2663
2666
|
},
|
|
2664
2667
|
{
|
|
2665
2668
|
"name": "sumHeading",
|
|
@@ -3704,7 +3707,8 @@
|
|
|
3704
3707
|
],
|
|
3705
3708
|
"properties": [
|
|
3706
3709
|
{
|
|
3707
|
-
"name": "dataGrid"
|
|
3710
|
+
"name": "dataGrid",
|
|
3711
|
+
"type": "DataGrid<TData, TDetailsElement>"
|
|
3708
3712
|
},
|
|
3709
3713
|
{
|
|
3710
3714
|
"name": "data",
|
|
@@ -3791,14 +3795,6 @@
|
|
|
3791
3795
|
"name": "mo-data-grid-header-separator",
|
|
3792
3796
|
"path": ".\\packages\\DataGrid\\dist\\DataGridHeaderSeparator.d.ts",
|
|
3793
3797
|
"properties": [
|
|
3794
|
-
{
|
|
3795
|
-
"name": "disableResizing",
|
|
3796
|
-
"type": "boolean"
|
|
3797
|
-
},
|
|
3798
|
-
{
|
|
3799
|
-
"name": "columnUpdate",
|
|
3800
|
-
"type": "EventDispatcher<void>"
|
|
3801
|
-
},
|
|
3802
3798
|
{
|
|
3803
3799
|
"name": "dataGrid",
|
|
3804
3800
|
"type": "DataGrid<unknown, undefined>"
|
|
@@ -3807,12 +3803,6 @@
|
|
|
3807
3803
|
"name": "column",
|
|
3808
3804
|
"type": "ColumnDefinition<unknown>"
|
|
3809
3805
|
}
|
|
3810
|
-
],
|
|
3811
|
-
"events": [
|
|
3812
|
-
{
|
|
3813
|
-
"name": "columnUpdate",
|
|
3814
|
-
"type": "CustomEvent<void>"
|
|
3815
|
-
}
|
|
3816
3806
|
]
|
|
3817
3807
|
},
|
|
3818
3808
|
{
|
|
@@ -3936,10 +3926,6 @@
|
|
|
3936
3926
|
"type": "boolean",
|
|
3937
3927
|
"default": "false"
|
|
3938
3928
|
},
|
|
3939
|
-
{
|
|
3940
|
-
"name": "menuAlignment",
|
|
3941
|
-
"type": "PopoverAlignment | undefined"
|
|
3942
|
-
},
|
|
3943
3929
|
{
|
|
3944
3930
|
"name": "open",
|
|
3945
3931
|
"type": "boolean",
|
|
@@ -3979,6 +3965,16 @@
|
|
|
3979
3965
|
"description": "The selected index.",
|
|
3980
3966
|
"type": "Index"
|
|
3981
3967
|
},
|
|
3968
|
+
{
|
|
3969
|
+
"name": "menuAlignment",
|
|
3970
|
+
"description": "Menu popover alignment",
|
|
3971
|
+
"type": "PopoverAlignment | undefined"
|
|
3972
|
+
},
|
|
3973
|
+
{
|
|
3974
|
+
"name": "menuPlacement",
|
|
3975
|
+
"description": "Menu popover placement",
|
|
3976
|
+
"type": "PopoverPlacement | undefined"
|
|
3977
|
+
},
|
|
3982
3978
|
{
|
|
3983
3979
|
"name": "value",
|
|
3984
3980
|
"description": "The selected value.",
|
|
@@ -4007,10 +4003,6 @@
|
|
|
4007
4003
|
"description": "Whether the field is required",
|
|
4008
4004
|
"type": "boolean",
|
|
4009
4005
|
"default": "false"
|
|
4010
|
-
},
|
|
4011
|
-
{
|
|
4012
|
-
"name": "alignment",
|
|
4013
|
-
"description": "Popover alignment"
|
|
4014
4006
|
}
|
|
4015
4007
|
],
|
|
4016
4008
|
"properties": [
|
|
@@ -4032,11 +4024,6 @@
|
|
|
4032
4024
|
"type": "boolean",
|
|
4033
4025
|
"default": "false"
|
|
4034
4026
|
},
|
|
4035
|
-
{
|
|
4036
|
-
"name": "menuAlignment",
|
|
4037
|
-
"attribute": "menuAlignment",
|
|
4038
|
-
"type": "PopoverAlignment | undefined"
|
|
4039
|
-
},
|
|
4040
4027
|
{
|
|
4041
4028
|
"name": "open",
|
|
4042
4029
|
"attribute": "open",
|
|
@@ -4111,6 +4098,18 @@
|
|
|
4111
4098
|
"description": "The selected index.",
|
|
4112
4099
|
"type": "Index"
|
|
4113
4100
|
},
|
|
4101
|
+
{
|
|
4102
|
+
"name": "menuAlignment",
|
|
4103
|
+
"attribute": "menuAlignment",
|
|
4104
|
+
"description": "Menu popover alignment",
|
|
4105
|
+
"type": "PopoverAlignment | undefined"
|
|
4106
|
+
},
|
|
4107
|
+
{
|
|
4108
|
+
"name": "menuPlacement",
|
|
4109
|
+
"attribute": "menuPlacement",
|
|
4110
|
+
"description": "Menu popover placement",
|
|
4111
|
+
"type": "PopoverPlacement | undefined"
|
|
4112
|
+
},
|
|
4114
4113
|
{
|
|
4115
4114
|
"name": "change",
|
|
4116
4115
|
"type": "EventDispatcher<T | undefined>"
|
|
@@ -5382,6 +5381,11 @@
|
|
|
5382
5381
|
"description": "The currency of the values.",
|
|
5383
5382
|
"type": "Currency | undefined"
|
|
5384
5383
|
},
|
|
5384
|
+
{
|
|
5385
|
+
"name": "currencyDataSelector",
|
|
5386
|
+
"description": "The key path to the currency of the values.",
|
|
5387
|
+
"type": "KeyPathOf<TData>"
|
|
5388
|
+
},
|
|
5385
5389
|
{
|
|
5386
5390
|
"name": "width",
|
|
5387
5391
|
"description": "The width of the column",
|
|
@@ -5439,6 +5443,12 @@
|
|
|
5439
5443
|
"description": "The currency of the values.",
|
|
5440
5444
|
"type": "Currency | undefined"
|
|
5441
5445
|
},
|
|
5446
|
+
{
|
|
5447
|
+
"name": "currencyDataSelector",
|
|
5448
|
+
"attribute": "currencyDataSelector",
|
|
5449
|
+
"description": "The key path to the currency of the values.",
|
|
5450
|
+
"type": "(object extends TData ? string : TData extends readonly any[] ? Extract<keyof TData, `${number}`> | SubKeyPathOf<TData, Extract<keyof TData, `${number}`>, 1> : TData extends object ? Extract<...> | SubKeyPathOf<...> : never) | undefined"
|
|
5451
|
+
},
|
|
5442
5452
|
{
|
|
5443
5453
|
"name": "sumHeading",
|
|
5444
5454
|
"type": "string | undefined"
|
package/dist/excel.svg.js
CHANGED
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
export default `<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
-
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
|
|
3
|
-
<!ENTITY ns_extend "http://ns.adobe.com/Extensibility/1.0/">
|
|
4
|
-
<!ENTITY ns_ai "http://ns.adobe.com/AdobeIllustrator/10.0/">
|
|
5
|
-
<!ENTITY ns_graphs "http://ns.adobe.com/Graphs/1.0/">
|
|
6
|
-
<!ENTITY ns_vars "http://ns.adobe.com/Variables/1.0/">
|
|
7
|
-
<!ENTITY ns_imrep "http://ns.adobe.com/ImageReplacement/1.0/">
|
|
8
|
-
<!ENTITY ns_sfw "http://ns.adobe.com/SaveForWeb/1.0/">
|
|
9
|
-
<!ENTITY ns_custom "http://ns.adobe.com/GenericCustomNamespace/1.0/">
|
|
10
|
-
<!ENTITY ns_adobe_xpath "http://ns.adobe.com/XPath/1.0/">
|
|
11
|
-
]>
|
|
12
|
-
<svg version="1.1" id="Livello_1" xmlns:x="&ns_extend;" xmlns:i="&ns_ai;" xmlns:graph="&ns_graphs;"
|
|
13
|
-
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 2289.75 2130"
|
|
14
|
-
enable-background="new 0 0 2289.75 2130" xml:space="preserve">
|
|
15
|
-
<metadata>
|
|
16
|
-
<sfw xmlns="&ns_sfw;">
|
|
17
|
-
<slices></slices>
|
|
18
|
-
<sliceSourceBounds bottomLeftOrigin="true" height="2130" width="2289.75" x="-1147.5" y="-1041"></sliceSourceBounds>
|
|
19
|
-
</sfw>
|
|
20
|
-
</metadata>
|
|
21
|
-
<path fill="#185C37" d="M1437.75,1011.75L532.5,852v1180.393c0,53.907,43.7,97.607,97.607,97.607l0,0h1562.036
|
|
22
|
-
c53.907,0,97.607-43.7,97.607-97.607l0,0V1597.5L1437.75,1011.75z"/>
|
|
23
|
-
<path fill="#21A366" d="M1437.75,0H630.107C576.2,0,532.5,43.7,532.5,97.607c0,0,0,0,0,0V532.5l905.25,532.5L1917,1224.75
|
|
24
|
-
L2289.75,1065V532.5L1437.75,0z"/>
|
|
25
|
-
<path fill="#107C41" d="M532.5,532.5h905.25V1065H532.5V532.5z"/>
|
|
26
|
-
<path opacity="0.1" enable-background="new " d="M1180.393,426H532.5v1331.25h647.893c53.834-0.175,97.432-43.773,97.607-97.607
|
|
27
|
-
V523.607C1277.825,469.773,1234.227,426.175,1180.393,426z"/>
|
|
28
|
-
<path opacity="0.2" enable-background="new " d="M1127.143,479.25H532.5V1810.5h594.643
|
|
29
|
-
c53.834-0.175,97.432-43.773,97.607-97.607V576.857C1224.575,523.023,1180.977,479.425,1127.143,479.25z"/>
|
|
30
|
-
<path opacity="0.2" enable-background="new " d="M1127.143,479.25H532.5V1704h594.643c53.834-0.175,97.432-43.773,97.607-97.607
|
|
31
|
-
V576.857C1224.575,523.023,1180.977,479.425,1127.143,479.25z"/>
|
|
32
|
-
<path opacity="0.2" enable-background="new " d="M1073.893,479.25H532.5V1704h541.393c53.834-0.175,97.432-43.773,97.607-97.607
|
|
33
|
-
V576.857C1171.325,523.023,1127.727,479.425,1073.893,479.25z"/>
|
|
34
|
-
<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="203.5132" y1="1729.0183" x2="967.9868" y2="404.9817" gradientTransform="matrix(1 0 0 -1 0 2132)">
|
|
35
|
-
<stop offset="0" style="stop-color:#18884F"/>
|
|
36
|
-
<stop offset="0.5" style="stop-color:#117E43"/>
|
|
37
|
-
<stop offset="1" style="stop-color:#0B6631"/>
|
|
38
|
-
</linearGradient>
|
|
39
|
-
<path fill="url(#SVGID_1_)" d="M97.607,479.25h976.285c53.907,0,97.607,43.7,97.607,97.607v976.285
|
|
40
|
-
c0,53.907-43.7,97.607-97.607,97.607H97.607C43.7,1650.75,0,1607.05,0,1553.143V576.857C0,522.95,43.7,479.25,97.607,479.25z"/>
|
|
41
|
-
<path fill="#FFFFFF" d="M302.3,1382.264l205.332-318.169L319.5,747.683h151.336l102.666,202.35
|
|
42
|
-
c9.479,19.223,15.975,33.494,19.49,42.919h1.331c6.745-15.336,13.845-30.228,21.3-44.677L725.371,747.79h138.929l-192.925,314.548
|
|
43
|
-
L869.2,1382.263H721.378L602.79,1160.158c-5.586-9.45-10.326-19.376-14.164-29.66h-1.757c-3.474,10.075-8.083,19.722-13.739,28.755
|
|
44
|
-
l-122.102,223.011H302.3z"/>
|
|
45
|
-
<path fill="#33C481" d="M2192.143,0H1437.75v532.5h852V97.607C2289.75,43.7,2246.05,0,2192.143,0L2192.143,0z"/>
|
|
46
|
-
<path fill="#107C41" d="M1437.75,1065h852v532.5h-852V1065z"/>
|
|
47
|
-
</svg>
|
|
1
|
+
export default `<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
|
|
3
|
+
<!ENTITY ns_extend "http://ns.adobe.com/Extensibility/1.0/">
|
|
4
|
+
<!ENTITY ns_ai "http://ns.adobe.com/AdobeIllustrator/10.0/">
|
|
5
|
+
<!ENTITY ns_graphs "http://ns.adobe.com/Graphs/1.0/">
|
|
6
|
+
<!ENTITY ns_vars "http://ns.adobe.com/Variables/1.0/">
|
|
7
|
+
<!ENTITY ns_imrep "http://ns.adobe.com/ImageReplacement/1.0/">
|
|
8
|
+
<!ENTITY ns_sfw "http://ns.adobe.com/SaveForWeb/1.0/">
|
|
9
|
+
<!ENTITY ns_custom "http://ns.adobe.com/GenericCustomNamespace/1.0/">
|
|
10
|
+
<!ENTITY ns_adobe_xpath "http://ns.adobe.com/XPath/1.0/">
|
|
11
|
+
]>
|
|
12
|
+
<svg version="1.1" id="Livello_1" xmlns:x="&ns_extend;" xmlns:i="&ns_ai;" xmlns:graph="&ns_graphs;"
|
|
13
|
+
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 2289.75 2130"
|
|
14
|
+
enable-background="new 0 0 2289.75 2130" xml:space="preserve">
|
|
15
|
+
<metadata>
|
|
16
|
+
<sfw xmlns="&ns_sfw;">
|
|
17
|
+
<slices></slices>
|
|
18
|
+
<sliceSourceBounds bottomLeftOrigin="true" height="2130" width="2289.75" x="-1147.5" y="-1041"></sliceSourceBounds>
|
|
19
|
+
</sfw>
|
|
20
|
+
</metadata>
|
|
21
|
+
<path fill="#185C37" d="M1437.75,1011.75L532.5,852v1180.393c0,53.907,43.7,97.607,97.607,97.607l0,0h1562.036
|
|
22
|
+
c53.907,0,97.607-43.7,97.607-97.607l0,0V1597.5L1437.75,1011.75z"/>
|
|
23
|
+
<path fill="#21A366" d="M1437.75,0H630.107C576.2,0,532.5,43.7,532.5,97.607c0,0,0,0,0,0V532.5l905.25,532.5L1917,1224.75
|
|
24
|
+
L2289.75,1065V532.5L1437.75,0z"/>
|
|
25
|
+
<path fill="#107C41" d="M532.5,532.5h905.25V1065H532.5V532.5z"/>
|
|
26
|
+
<path opacity="0.1" enable-background="new " d="M1180.393,426H532.5v1331.25h647.893c53.834-0.175,97.432-43.773,97.607-97.607
|
|
27
|
+
V523.607C1277.825,469.773,1234.227,426.175,1180.393,426z"/>
|
|
28
|
+
<path opacity="0.2" enable-background="new " d="M1127.143,479.25H532.5V1810.5h594.643
|
|
29
|
+
c53.834-0.175,97.432-43.773,97.607-97.607V576.857C1224.575,523.023,1180.977,479.425,1127.143,479.25z"/>
|
|
30
|
+
<path opacity="0.2" enable-background="new " d="M1127.143,479.25H532.5V1704h594.643c53.834-0.175,97.432-43.773,97.607-97.607
|
|
31
|
+
V576.857C1224.575,523.023,1180.977,479.425,1127.143,479.25z"/>
|
|
32
|
+
<path opacity="0.2" enable-background="new " d="M1073.893,479.25H532.5V1704h541.393c53.834-0.175,97.432-43.773,97.607-97.607
|
|
33
|
+
V576.857C1171.325,523.023,1127.727,479.425,1073.893,479.25z"/>
|
|
34
|
+
<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="203.5132" y1="1729.0183" x2="967.9868" y2="404.9817" gradientTransform="matrix(1 0 0 -1 0 2132)">
|
|
35
|
+
<stop offset="0" style="stop-color:#18884F"/>
|
|
36
|
+
<stop offset="0.5" style="stop-color:#117E43"/>
|
|
37
|
+
<stop offset="1" style="stop-color:#0B6631"/>
|
|
38
|
+
</linearGradient>
|
|
39
|
+
<path fill="url(#SVGID_1_)" d="M97.607,479.25h976.285c53.907,0,97.607,43.7,97.607,97.607v976.285
|
|
40
|
+
c0,53.907-43.7,97.607-97.607,97.607H97.607C43.7,1650.75,0,1607.05,0,1553.143V576.857C0,522.95,43.7,479.25,97.607,479.25z"/>
|
|
41
|
+
<path fill="#FFFFFF" d="M302.3,1382.264l205.332-318.169L319.5,747.683h151.336l102.666,202.35
|
|
42
|
+
c9.479,19.223,15.975,33.494,19.49,42.919h1.331c6.745-15.336,13.845-30.228,21.3-44.677L725.371,747.79h138.929l-192.925,314.548
|
|
43
|
+
L869.2,1382.263H721.378L602.79,1160.158c-5.586-9.45-10.326-19.376-14.164-29.66h-1.757c-3.474,10.075-8.083,19.722-13.739,28.755
|
|
44
|
+
l-122.102,223.011H302.3z"/>
|
|
45
|
+
<path fill="#33C481" d="M2192.143,0H1437.75v532.5h852V97.607C2289.75,43.7,2246.05,0,2192.143,0L2192.143,0z"/>
|
|
46
|
+
<path fill="#107C41" d="M1437.75,1065h852v532.5h-852V1065z"/>
|
|
47
|
+
</svg>
|
|
48
48
|
`;
|
|
@@ -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,kCAmDzB;IAEQ,OAAO,CAAC,GAAG,UAAU,EAAE,UAAU,CAAC,WAAW,CAAC,KAAK,EAAE,eAAe,CAAC,CAAC,SAAS,CAAC,CAAC;IAQ1F,cAAuB,WAAW,0CAOjC;CACD;AAED,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,qBAAqB;QAC9B,0BAA0B,EAAE,WAAW,CAAC,OAAO,CAAC,CAAA;KAChD;CACD"}
|
|
@@ -6,10 +6,8 @@ let DataGridDefaultRow = class DataGridDefaultRow extends DataGridRow {
|
|
|
6
6
|
return css `
|
|
7
7
|
${super.styles}
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
height: var(--mo-data-grid-row-height);
|
|
11
|
-
grid-template-columns: var(--mo-data-grid-columns);
|
|
12
|
-
column-gap: var(--mo-data-grid-columns-gap);
|
|
9
|
+
:host {
|
|
10
|
+
min-height: var(--mo-data-grid-row-height);
|
|
13
11
|
}
|
|
14
12
|
|
|
15
13
|
mo-flex {
|
|
@@ -22,6 +20,15 @@ let DataGridDefaultRow = class DataGridDefaultRow extends DataGridRow {
|
|
|
22
20
|
height: var(--mo-data-grid-row-height);
|
|
23
21
|
}
|
|
24
22
|
|
|
23
|
+
#detailsContainer {
|
|
24
|
+
grid-column: -1 / 1;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
:host([has-sub-data]) #detailsContainer {
|
|
28
|
+
display: grid;
|
|
29
|
+
grid-template-columns: subgrid;
|
|
30
|
+
}
|
|
31
|
+
|
|
25
32
|
#detailsContainer [instanceof*=mo-data-grid] {
|
|
26
33
|
--mo-data-grid-header-background: color-mix(in srgb, var(--mo-color-foreground), transparent 96%);
|
|
27
34
|
--mo-data-grid-alternating-background: transparent;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Component, HTMLTemplateResult } from '@a11d/lit';
|
|
2
|
-
import { ColumnDefinition } from '../ColumnDefinition.js';
|
|
3
|
-
import { DataGrid, DataGridCell } from '../index.js';
|
|
1
|
+
import { Component, type HTMLTemplateResult } from '@a11d/lit';
|
|
2
|
+
import { type ColumnDefinition } from '../ColumnDefinition.js';
|
|
3
|
+
import { type DataGrid, type DataGridCell } from '../index.js';
|
|
4
4
|
/**
|
|
5
5
|
* @attr dataGrid
|
|
6
6
|
* @attr data
|
|
@@ -37,7 +37,7 @@ export declare abstract class DataGridRow<TData, TDetailsElement extends Element
|
|
|
37
37
|
protected handleContentDoubleClick(): Promise<void>;
|
|
38
38
|
protected handleContentMiddleClick(): Promise<void>;
|
|
39
39
|
private clickOnPrimaryContextMenuItemIfApplicable;
|
|
40
|
-
openContextMenu(
|
|
40
|
+
openContextMenu(event?: PointerEvent): Promise<void>;
|
|
41
41
|
private get contextMenuData();
|
|
42
42
|
private get contextMenuTemplate();
|
|
43
43
|
closeContextMenu(): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataGridRow.d.ts","sourceRoot":"","sources":["../../rows/DataGridRow.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,SAAS,EAAyB,kBAAkB,EAAqB,MAAM,WAAW,CAAA;
|
|
1
|
+
{"version":3,"file":"DataGridRow.d.ts","sourceRoot":"","sources":["../../rows/DataGridRow.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,SAAS,EAAyB,KAAK,kBAAkB,EAAqB,MAAM,WAAW,CAAA;AAEvH,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AAC9D,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,YAAY,EAAyD,MAAM,aAAa,CAAA;AAErH;;;;;;;;GAQG;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;IAEjE,QAAQ,EAAG,QAAQ,CAAC,KAAK,EAAE,eAAe,CAAC,CAAA;IAC3C,IAAI,EAAG,KAAK,CAAA;IACI,QAAQ,UAAQ;IAazD,WAAW,UAAQ;IAOnB,KAAK,SAAI;IAEgC,SAAS,CAAC,eAAe,UAAQ;IAE7E,IAAI,cAAc,gCAEjB;cAEkB,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,uBAY9B;IAED,SAAS,CAAC,QAAQ,KAAK,WAAW,IAAI,kBAAkB,CAAA;IAExD,SAAS,KAAK,uBAAuB,uBAepC;IAED,SAAS,KAAK,iBAAiB,uBAc9B;IAED,SAAS,CAAC,eAAe,CAAC,MAAM,EAAE,gBAAgB,CAAC,KAAK,EAAE,cAAc,CAAC,KAAK,EAAE,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC;IAUlG,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;IAwB1C,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
|
@@ -39,7 +39,9 @@ export class DataGridRow extends Component {
|
|
|
39
39
|
static get styles() {
|
|
40
40
|
return css `
|
|
41
41
|
:host {
|
|
42
|
-
display:
|
|
42
|
+
display: grid;
|
|
43
|
+
grid-template-columns: subgrid;
|
|
44
|
+
grid-column: -1 / 1;
|
|
43
45
|
position: relative;
|
|
44
46
|
height: auto;
|
|
45
47
|
width: 100%;
|
|
@@ -65,6 +67,8 @@ export class DataGridRow extends Component {
|
|
|
65
67
|
}
|
|
66
68
|
|
|
67
69
|
#contentContainer {
|
|
70
|
+
grid-column: -1 / 1;
|
|
71
|
+
grid-template-columns: subgrid;
|
|
68
72
|
cursor: pointer;
|
|
69
73
|
transition: 250ms;
|
|
70
74
|
}
|
|
@@ -120,7 +124,7 @@ export class DataGridRow extends Component {
|
|
|
120
124
|
display: none;
|
|
121
125
|
}
|
|
122
126
|
|
|
123
|
-
#detailsContainer > :first-child {
|
|
127
|
+
:host(:not([has-sub-data])) #detailsContainer > :first-child {
|
|
124
128
|
padding: 8px 0;
|
|
125
129
|
}
|
|
126
130
|
|
|
@@ -184,11 +188,11 @@ export class DataGridRow extends Component {
|
|
|
184
188
|
}
|
|
185
189
|
get contextMenuIconButtonTemplate() {
|
|
186
190
|
return this.dataGrid.hasContextMenu === false ? html.nothing : html `
|
|
187
|
-
<mo-flex justifyContent='center'
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
191
|
+
<mo-flex justifyContent='center' ${style({ height: '100%', placeSelf: 'end', position: 'sticky', insetInlineEnd: '0px', zIndex: '3', background: 'var(--mo-data-grid-sticky-part-color)' })}>
|
|
192
|
+
<mo-icon-button id='contextMenuIconButton' icon='more_vert' dense
|
|
193
|
+
@click=${this.openContextMenu}
|
|
194
|
+
@dblclick=${(e) => e.stopPropagation()}
|
|
195
|
+
></mo-icon-button>
|
|
192
196
|
</mo-flex>
|
|
193
197
|
`;
|
|
194
198
|
}
|
|
@@ -200,11 +204,10 @@ export class DataGridRow extends Component {
|
|
|
200
204
|
return this.dataGrid.getRowDetailsTemplate(this.data);
|
|
201
205
|
}
|
|
202
206
|
const subData = this.dataGrid.getSubData(this.data);
|
|
207
|
+
this.toggleAttribute('has-sub-data', !!subData);
|
|
203
208
|
if (subData) {
|
|
204
209
|
return html `
|
|
205
|
-
|
|
206
|
-
${subData.map(data => this.dataGrid.getRowTemplate(data, undefined, this.level + 1))}
|
|
207
|
-
</mo-flex>
|
|
210
|
+
${subData.map(data => this.dataGrid.getRowTemplate(data, undefined, this.level + 1))}
|
|
208
211
|
`;
|
|
209
212
|
}
|
|
210
213
|
return html.nothing;
|
|
@@ -236,15 +239,15 @@ export class DataGridRow extends Component {
|
|
|
236
239
|
this.contextMenuOpen = false;
|
|
237
240
|
}
|
|
238
241
|
}
|
|
239
|
-
async openContextMenu(
|
|
242
|
+
async openContextMenu(event) {
|
|
240
243
|
if (!this.dataGrid.hasContextMenu) {
|
|
241
244
|
return;
|
|
242
245
|
}
|
|
243
|
-
|
|
246
|
+
event?.stopPropagation();
|
|
244
247
|
if (this.dataGrid.selectedData.includes(this.data) === false) {
|
|
245
248
|
this.dataGrid.select(this.dataGrid.selectionMode !== DataGridSelectionMode.None ? [this.data] : []);
|
|
246
249
|
}
|
|
247
|
-
const contextMenu = ContextMenu.open(
|
|
250
|
+
const contextMenu = ContextMenu.open(event || [0, 0], this.contextMenuTemplate);
|
|
248
251
|
this.contextMenuOpen = true;
|
|
249
252
|
const handler = (open) => {
|
|
250
253
|
this.contextMenuOpen = open;
|