@revolist/revogrid 4.21.7 → 4.21.9
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/cjs/{cell-renderer-DW8i7ULg.js → cell-renderer-uZmDBXz7.js} +4 -2
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/revogr-data_4.cjs.entry.js +2 -2
- package/dist/collection/components/data/revogr-data.js +5 -5
- package/dist/collection/components/data/row-renderer.js +4 -2
- package/dist/collection/components/editors/revogr-edit.js +3 -3
- package/dist/collection/components/header/revogr-header.js +5 -5
- package/dist/collection/components/order/revogr-order-editor.js +3 -3
- package/dist/collection/components/overlay/revogr-overlay-selection.js +7 -7
- package/dist/collection/components/revoGrid/revo-grid.js +45 -21
- package/dist/collection/components/selectionFocus/revogr-focus.js +3 -3
- package/dist/esm/{cell-renderer-CqVunVBY.js → cell-renderer-K_BKH7Kx.js} +4 -2
- package/dist/esm/index.js +1 -1
- package/dist/esm/revogr-data_4.entry.js +2 -2
- package/dist/revo-grid/{cell-renderer-CqVunVBY.js → cell-renderer-K_BKH7Kx.js} +4 -2
- package/dist/revo-grid/index.esm.js +1 -1
- package/dist/revo-grid/revogr-data_4.entry.js +2 -2
- package/dist/types/components/data/revogr-data.d.ts +1 -1
- package/dist/types/components/data/row-renderer.d.ts +2 -1
- package/dist/types/services/column.data.provider.d.ts +1 -1
- package/dist/types/types/interfaces.d.ts +59 -37
- package/dist/types/types/selection.d.ts +12 -8
- package/hydrate/index.js +5 -3
- package/hydrate/index.mjs +5 -3
- package/package.json +1 -1
- package/standalone/revogr-data2.js +1 -1
|
@@ -13,8 +13,10 @@ const SortingSign = ({ column }) => {
|
|
|
13
13
|
};
|
|
14
14
|
|
|
15
15
|
const PADDING_DEPTH = 10;
|
|
16
|
-
const RowRenderer = ({ rowClass, index: index$1, size, start, depth }, cells) => {
|
|
17
|
-
const props = Object.assign({ [dimension_helpers.DATA_ROW]: index$1 }
|
|
16
|
+
const RowRenderer = ({ rowClass, index: index$1, size, start, depth, groupingLevel }, cells) => {
|
|
17
|
+
const props = Object.assign({ [dimension_helpers.DATA_ROW]: index$1 }, (typeof groupingLevel === 'number'
|
|
18
|
+
? { 'data-level': groupingLevel }
|
|
19
|
+
: {}));
|
|
18
20
|
return (index.h("div", Object.assign({}, props, { class: `rgRow ${rowClass || ''}`, style: {
|
|
19
21
|
height: `${size}px`,
|
|
20
22
|
transform: `translateY(${start}px)`,
|
package/dist/cjs/index.cjs.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
var column_service = require('./column.service-DvQDqxxx.js');
|
|
7
7
|
var column_drag_plugin = require('./column.drag.plugin-BWX5_5iT.js');
|
|
8
8
|
var headerCellRenderer = require('./header-cell-renderer-B1dJwgTO.js');
|
|
9
|
-
var cellRenderer = require('./cell-renderer-
|
|
9
|
+
var cellRenderer = require('./cell-renderer-uZmDBXz7.js');
|
|
10
10
|
var dimension_helpers = require('./dimension.helpers-CaIsYC99.js');
|
|
11
11
|
var textEditor = require('./text-editor-BTnGaIl3.js');
|
|
12
12
|
var edit_utils = require('./edit.utils-CwMzSIVF.js');
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
var index = require('./index-Dq8Xzj5l.js');
|
|
7
7
|
var column_service = require('./column.service-DvQDqxxx.js');
|
|
8
8
|
var dimension_helpers = require('./dimension.helpers-CaIsYC99.js');
|
|
9
|
-
var cellRenderer = require('./cell-renderer-
|
|
9
|
+
var cellRenderer = require('./cell-renderer-uZmDBXz7.js');
|
|
10
10
|
var filter_button = require('./filter.button-w6LWnyhi.js');
|
|
11
11
|
var headerCellRenderer = require('./header-cell-renderer-B1dJwgTO.js');
|
|
12
12
|
var throttle = require('./throttle-CI4MsAqs.js');
|
|
@@ -225,7 +225,7 @@ const RevogrData = class {
|
|
|
225
225
|
if (this.rowHighlightPlugin.isRowFocused(rgRow.itemIndex)) {
|
|
226
226
|
rowClass += ` ${dimension_helpers.ROW_FOCUSED_CLASS}`;
|
|
227
227
|
}
|
|
228
|
-
const row = (index.h(cellRenderer.RowRenderer, { index: rgRow.itemIndex, rowClass: rowClass, size: rgRow.size, start: rgRow.start }, cells));
|
|
228
|
+
const row = (index.h(cellRenderer.RowRenderer, { index: rgRow.itemIndex, rowClass: rowClass, size: rgRow.size, start: rgRow.start, groupingLevel: groupDepth || undefined }, cells));
|
|
229
229
|
this.beforerowrender.emit({
|
|
230
230
|
node: row,
|
|
231
231
|
item: rgRow,
|
|
@@ -157,7 +157,7 @@ export class RevogrData {
|
|
|
157
157
|
if (this.rowHighlightPlugin.isRowFocused(rgRow.itemIndex)) {
|
|
158
158
|
rowClass += ` ${ROW_FOCUSED_CLASS}`;
|
|
159
159
|
}
|
|
160
|
-
const row = (h(RowRenderer, { index: rgRow.itemIndex, rowClass: rowClass, size: rgRow.size, start: rgRow.start }, cells));
|
|
160
|
+
const row = (h(RowRenderer, { index: rgRow.itemIndex, rowClass: rowClass, size: rgRow.size, start: rgRow.start, groupingLevel: groupDepth || undefined }, cells));
|
|
161
161
|
this.beforerowrender.emit({
|
|
162
162
|
node: row,
|
|
163
163
|
item: rgRow,
|
|
@@ -395,7 +395,7 @@ export class RevogrData {
|
|
|
395
395
|
"mutable": false,
|
|
396
396
|
"complexType": {
|
|
397
397
|
"original": "Observable<DSourceState<ColumnRegular, DimensionCols>>",
|
|
398
|
-
"resolved": "\"colPinEnd\" | \"colPinStart\" | \"rgCol\" | ColumnRegular",
|
|
398
|
+
"resolved": "\"colPinEnd\" | \"colPinStart\" | \"rgCol\" | ColumnRegular<ColumnProp, DataType<any, ColumnProp>>",
|
|
399
399
|
"references": {
|
|
400
400
|
"Observable": {
|
|
401
401
|
"location": "import",
|
|
@@ -437,7 +437,7 @@ export class RevogrData {
|
|
|
437
437
|
"mutable": false,
|
|
438
438
|
"complexType": {
|
|
439
439
|
"original": "Observable<DSourceState<DataType, DimensionRows>>",
|
|
440
|
-
"resolved": "\"rgRow\" | \"rowPinEnd\" | \"rowPinStart\" | D",
|
|
440
|
+
"resolved": "\"rgRow\" | \"rowPinEnd\" | \"rowPinStart\" | D | K",
|
|
441
441
|
"references": {
|
|
442
442
|
"Observable": {
|
|
443
443
|
"location": "import",
|
|
@@ -613,7 +613,7 @@ export class RevogrData {
|
|
|
613
613
|
},
|
|
614
614
|
"complexType": {
|
|
615
615
|
"original": "BeforeCellRenderEvent<CellTemplateProp>",
|
|
616
|
-
"resolved": "BeforeCellRenderEvent<CellTemplateProp
|
|
616
|
+
"resolved": "BeforeCellRenderEvent<CellTemplateProp<DataType<any, ColumnProp>, ColumnRegular<ColumnProp, DataType<any, ColumnProp>>, ColumnProp>>",
|
|
617
617
|
"references": {
|
|
618
618
|
"BeforeCellRenderEvent": {
|
|
619
619
|
"location": "import",
|
|
@@ -663,7 +663,7 @@ export class RevogrData {
|
|
|
663
663
|
},
|
|
664
664
|
"complexType": {
|
|
665
665
|
"original": "DragStartEvent",
|
|
666
|
-
"resolved": "DragStartEvent",
|
|
666
|
+
"resolved": "DragStartEvent<DataType<any, ColumnProp>, ColumnRegular<ColumnProp, DataType<any, ColumnProp>>>",
|
|
667
667
|
"references": {
|
|
668
668
|
"DragStartEvent": {
|
|
669
669
|
"location": "import",
|
|
@@ -4,8 +4,10 @@
|
|
|
4
4
|
import { h } from "@stencil/core";
|
|
5
5
|
import { DATA_ROW } from "../../utils/consts";
|
|
6
6
|
export const PADDING_DEPTH = 10;
|
|
7
|
-
const RowRenderer = ({ rowClass, index, size, start, depth }, cells) => {
|
|
8
|
-
const props = Object.assign({ [DATA_ROW]: index }
|
|
7
|
+
const RowRenderer = ({ rowClass, index, size, start, depth, groupingLevel }, cells) => {
|
|
8
|
+
const props = Object.assign({ [DATA_ROW]: index }, (typeof groupingLevel === 'number'
|
|
9
|
+
? { 'data-level': groupingLevel }
|
|
10
|
+
: {}));
|
|
9
11
|
return (h("div", Object.assign({}, props, { class: `rgRow ${rowClass || ''}`, style: {
|
|
10
12
|
height: `${size}px`,
|
|
11
13
|
transform: `translateY(${start}px)`,
|
|
@@ -156,7 +156,7 @@ export class RevoEdit {
|
|
|
156
156
|
"mutable": false,
|
|
157
157
|
"complexType": {
|
|
158
158
|
"original": "EditCell",
|
|
159
|
-
"resolved": "EditCellStore & BeforeSaveDataDetails",
|
|
159
|
+
"resolved": "EditCellStore & BeforeSaveDataDetails<DataType, ColumnRegular<ColumnProp, DataType<any, ColumnProp>>>",
|
|
160
160
|
"references": {
|
|
161
161
|
"EditCell": {
|
|
162
162
|
"location": "import",
|
|
@@ -180,7 +180,7 @@ export class RevoEdit {
|
|
|
180
180
|
"mutable": false,
|
|
181
181
|
"complexType": {
|
|
182
182
|
"original": "ColumnDataSchemaModel | null",
|
|
183
|
-
"resolved": "ColumnDataSchemaModel | null",
|
|
183
|
+
"resolved": "ColumnDataSchemaModel<DataType<any, ColumnProp>, ColumnRegular<ColumnProp, DataType<any, ColumnProp>>, ColumnProp> | null",
|
|
184
184
|
"references": {
|
|
185
185
|
"ColumnDataSchemaModel": {
|
|
186
186
|
"location": "import",
|
|
@@ -204,7 +204,7 @@ export class RevoEdit {
|
|
|
204
204
|
"mutable": false,
|
|
205
205
|
"complexType": {
|
|
206
206
|
"original": "EditorCtr | null",
|
|
207
|
-
"resolved": "((column: ColumnDataSchemaModel, save: (value?: any, preventFocus?: boolean | undefined) => void, close: (focusNext?: boolean | undefined) => void) => EditorBase) | EditorCtrConstructible | null",
|
|
207
|
+
"resolved": "((column: ColumnDataSchemaModel<DataType<any, ColumnProp>, ColumnRegular<ColumnProp, DataType<any, ColumnProp>>, ColumnProp>, save: (value?: any, preventFocus?: boolean | undefined) => void, close: (focusNext?: boolean | undefined) => void) => EditorBase) | EditorCtrConstructible | null",
|
|
208
208
|
"references": {
|
|
209
209
|
"EditorCtr": {
|
|
210
210
|
"location": "import",
|
|
@@ -336,7 +336,7 @@ export class RevogrHeaderComponent {
|
|
|
336
336
|
"mutable": false,
|
|
337
337
|
"complexType": {
|
|
338
338
|
"original": "ColumnRegular[]",
|
|
339
|
-
"resolved": "ColumnRegular[]",
|
|
339
|
+
"resolved": "ColumnRegular<ColumnProp, DataType<any, ColumnProp>>[]",
|
|
340
340
|
"references": {
|
|
341
341
|
"ColumnRegular": {
|
|
342
342
|
"location": "import",
|
|
@@ -435,7 +435,7 @@ export class RevogrHeaderComponent {
|
|
|
435
435
|
},
|
|
436
436
|
"complexType": {
|
|
437
437
|
"original": "InitialHeaderClick",
|
|
438
|
-
"resolved": "{ index: number; originalEvent: MouseEvent; column: ColumnRegular
|
|
438
|
+
"resolved": "{ index: number; originalEvent: MouseEvent; column: ColumnRegular<ColumnProp, DataType<any, ColumnProp>>; providers: ProvidersColumns<DimensionCols | \"rowHeaders\">; }",
|
|
439
439
|
"references": {
|
|
440
440
|
"InitialHeaderClick": {
|
|
441
441
|
"location": "import",
|
|
@@ -479,7 +479,7 @@ export class RevogrHeaderComponent {
|
|
|
479
479
|
},
|
|
480
480
|
"complexType": {
|
|
481
481
|
"original": "ColumnRegular[]",
|
|
482
|
-
"resolved": "ColumnRegular[]",
|
|
482
|
+
"resolved": "ColumnRegular<ColumnProp, DataType<any, ColumnProp>>[]",
|
|
483
483
|
"references": {
|
|
484
484
|
"ColumnRegular": {
|
|
485
485
|
"location": "import",
|
|
@@ -501,7 +501,7 @@ export class RevogrHeaderComponent {
|
|
|
501
501
|
},
|
|
502
502
|
"complexType": {
|
|
503
503
|
"original": "InitialHeaderClick",
|
|
504
|
-
"resolved": "{ index: number; originalEvent: MouseEvent; column: ColumnRegular
|
|
504
|
+
"resolved": "{ index: number; originalEvent: MouseEvent; column: ColumnRegular<ColumnProp, DataType<any, ColumnProp>>; providers: ProvidersColumns<DimensionCols | \"rowHeaders\">; }",
|
|
505
505
|
"references": {
|
|
506
506
|
"InitialHeaderClick": {
|
|
507
507
|
"location": "import",
|
|
@@ -523,7 +523,7 @@ export class RevogrHeaderComponent {
|
|
|
523
523
|
},
|
|
524
524
|
"complexType": {
|
|
525
525
|
"original": "HeaderRenderProps",
|
|
526
|
-
"resolved": "{ column: VirtualPositionItem; additionalData: any; data: ColumnTemplateProp
|
|
526
|
+
"resolved": "{ column: VirtualPositionItem; additionalData: any; data: ColumnTemplateProp<ColumnProp>; range?: RangeArea | null | undefined; canResize?: boolean | undefined; canFilter?: boolean | undefined; onResize?(e: ResizeEvent): void; onClick?(data: InitialHeaderClick): void; onDblClick?(data: InitialHeaderClick): void; } & Partial<Pick<ResizeProps, \"active\">>",
|
|
527
527
|
"references": {
|
|
528
528
|
"HeaderRenderProps": {
|
|
529
529
|
"location": "import",
|
|
@@ -182,7 +182,7 @@ export class OrderEditor {
|
|
|
182
182
|
"mutable": false,
|
|
183
183
|
"complexType": {
|
|
184
184
|
"original": "Observable<DSourceState<DataType, DimensionRows>>",
|
|
185
|
-
"resolved": "\"rgRow\" | \"rowPinEnd\" | \"rowPinStart\" | D",
|
|
185
|
+
"resolved": "\"rgRow\" | \"rowPinEnd\" | \"rowPinStart\" | D | K",
|
|
186
186
|
"references": {
|
|
187
187
|
"Observable": {
|
|
188
188
|
"location": "import",
|
|
@@ -260,7 +260,7 @@ export class OrderEditor {
|
|
|
260
260
|
},
|
|
261
261
|
"complexType": {
|
|
262
262
|
"original": "RowDragStartDetails",
|
|
263
|
-
"resolved": "
|
|
263
|
+
"resolved": "TModel",
|
|
264
264
|
"references": {
|
|
265
265
|
"RowDragStartDetails": {
|
|
266
266
|
"location": "import",
|
|
@@ -401,7 +401,7 @@ export class OrderEditor {
|
|
|
401
401
|
"signature": "(e: DragStartEvent) => Promise<void>",
|
|
402
402
|
"parameters": [{
|
|
403
403
|
"name": "e",
|
|
404
|
-
"type": "DragStartEvent",
|
|
404
|
+
"type": "DragStartEvent<DataType<any, ColumnProp>, ColumnRegular<ColumnProp, DataType<any, ColumnProp>>>",
|
|
405
405
|
"docs": ""
|
|
406
406
|
}],
|
|
407
407
|
"references": {
|
|
@@ -675,7 +675,7 @@ export class OverlaySelection {
|
|
|
675
675
|
"mutable": false,
|
|
676
676
|
"complexType": {
|
|
677
677
|
"original": "Observable<DSourceState<DataType, DimensionRows>>",
|
|
678
|
-
"resolved": "\"rgRow\" | \"rowPinEnd\" | \"rowPinStart\" | D",
|
|
678
|
+
"resolved": "\"rgRow\" | \"rowPinEnd\" | \"rowPinStart\" | D | K",
|
|
679
679
|
"references": {
|
|
680
680
|
"Observable": {
|
|
681
681
|
"location": "import",
|
|
@@ -717,7 +717,7 @@ export class OverlaySelection {
|
|
|
717
717
|
"mutable": false,
|
|
718
718
|
"complexType": {
|
|
719
719
|
"original": "Observable<DSourceState<ColumnRegular, DimensionCols>>",
|
|
720
|
-
"resolved": "\"colPinEnd\" | \"colPinStart\" | \"rgCol\" | ColumnRegular",
|
|
720
|
+
"resolved": "\"colPinEnd\" | \"colPinStart\" | \"rgCol\" | ColumnRegular<ColumnProp, DataType<any, ColumnProp>>",
|
|
721
721
|
"references": {
|
|
722
722
|
"Observable": {
|
|
723
723
|
"location": "import",
|
|
@@ -905,7 +905,7 @@ export class OverlaySelection {
|
|
|
905
905
|
},
|
|
906
906
|
"complexType": {
|
|
907
907
|
"original": "BeforeSaveDataDetails",
|
|
908
|
-
"resolved": "BeforeSaveDataDetails",
|
|
908
|
+
"resolved": "BeforeSaveDataDetails<DataType, ColumnRegular<ColumnProp, DataType<any, ColumnProp>>>",
|
|
909
909
|
"references": {
|
|
910
910
|
"BeforeSaveDataDetails": {
|
|
911
911
|
"location": "import",
|
|
@@ -927,7 +927,7 @@ export class OverlaySelection {
|
|
|
927
927
|
},
|
|
928
928
|
"complexType": {
|
|
929
929
|
"original": "BeforeSaveDataDetails",
|
|
930
|
-
"resolved": "BeforeSaveDataDetails",
|
|
930
|
+
"resolved": "BeforeSaveDataDetails<DataType, ColumnRegular<ColumnProp, DataType<any, ColumnProp>>>",
|
|
931
931
|
"references": {
|
|
932
932
|
"BeforeSaveDataDetails": {
|
|
933
933
|
"location": "import",
|
|
@@ -971,7 +971,7 @@ export class OverlaySelection {
|
|
|
971
971
|
},
|
|
972
972
|
"complexType": {
|
|
973
973
|
"original": "BeforeEdit",
|
|
974
|
-
"resolved": "BeforeSaveDataDetails",
|
|
974
|
+
"resolved": "BeforeSaveDataDetails<DataType, ColumnRegular<ColumnProp, DataType<any, ColumnProp>>>",
|
|
975
975
|
"references": {
|
|
976
976
|
"BeforeEdit": {
|
|
977
977
|
"location": "import",
|
|
@@ -1294,7 +1294,7 @@ export class OverlaySelection {
|
|
|
1294
1294
|
},
|
|
1295
1295
|
"complexType": {
|
|
1296
1296
|
"original": "BeforeRangeSaveDataDetails",
|
|
1297
|
-
"resolved": "
|
|
1297
|
+
"resolved": "TModel",
|
|
1298
1298
|
"references": {
|
|
1299
1299
|
"BeforeRangeSaveDataDetails": {
|
|
1300
1300
|
"location": "import",
|
|
@@ -1338,7 +1338,7 @@ export class OverlaySelection {
|
|
|
1338
1338
|
},
|
|
1339
1339
|
"complexType": {
|
|
1340
1340
|
"original": "RangeClipboardPasteEvent",
|
|
1341
|
-
"resolved": "RangeClipboardPasteEvent",
|
|
1341
|
+
"resolved": "RangeClipboardPasteEvent<DataType<any, ColumnProp>>",
|
|
1342
1342
|
"references": {
|
|
1343
1343
|
"RangeClipboardPasteEvent": {
|
|
1344
1344
|
"location": "import",
|
|
@@ -1251,7 +1251,7 @@ export class RevoGridComponent {
|
|
|
1251
1251
|
"mutable": false,
|
|
1252
1252
|
"complexType": {
|
|
1253
1253
|
"original": "(ColumnRegular | ColumnGrouping)[]",
|
|
1254
|
-
"resolved": "(ColumnRegular | ColumnGrouping<any>)[]",
|
|
1254
|
+
"resolved": "(ColumnRegular<ColumnProp, DataType<any, ColumnProp>> | ColumnGrouping<any>)[]",
|
|
1255
1255
|
"references": {
|
|
1256
1256
|
"ColumnRegular": {
|
|
1257
1257
|
"location": "import",
|
|
@@ -1452,7 +1452,7 @@ export class RevoGridComponent {
|
|
|
1452
1452
|
"mutable": false,
|
|
1453
1453
|
"complexType": {
|
|
1454
1454
|
"original": "{ [name: string]: ColumnType }",
|
|
1455
|
-
"resolved": "{ [name: string]: ColumnType
|
|
1455
|
+
"resolved": "{ [name: string]: ColumnType<DataType<any, ColumnProp>>; }",
|
|
1456
1456
|
"references": {
|
|
1457
1457
|
"ColumnType": {
|
|
1458
1458
|
"location": "import",
|
|
@@ -1970,7 +1970,7 @@ export class RevoGridComponent {
|
|
|
1970
1970
|
},
|
|
1971
1971
|
"complexType": {
|
|
1972
1972
|
"original": "BeforeSaveDataDetails",
|
|
1973
|
-
"resolved": "BeforeSaveDataDetails",
|
|
1973
|
+
"resolved": "BeforeSaveDataDetails<DataType, ColumnRegular<ColumnProp, DataType<any, ColumnProp>>>",
|
|
1974
1974
|
"references": {
|
|
1975
1975
|
"BeforeSaveDataDetails": {
|
|
1976
1976
|
"location": "import",
|
|
@@ -1992,7 +1992,7 @@ export class RevoGridComponent {
|
|
|
1992
1992
|
},
|
|
1993
1993
|
"complexType": {
|
|
1994
1994
|
"original": "BeforeRangeSaveDataDetails",
|
|
1995
|
-
"resolved": "
|
|
1995
|
+
"resolved": "TModel",
|
|
1996
1996
|
"references": {
|
|
1997
1997
|
"BeforeRangeSaveDataDetails": {
|
|
1998
1998
|
"location": "import",
|
|
@@ -2014,7 +2014,7 @@ export class RevoGridComponent {
|
|
|
2014
2014
|
},
|
|
2015
2015
|
"complexType": {
|
|
2016
2016
|
"original": "AfterEditEvent",
|
|
2017
|
-
"resolved": "BeforeSaveDataDetails
|
|
2017
|
+
"resolved": "BeforeSaveDataDetails<DataType, ColumnRegular<ColumnProp, DataType<any, ColumnProp>>> | D | K",
|
|
2018
2018
|
"references": {
|
|
2019
2019
|
"AfterEditEvent": {
|
|
2020
2020
|
"location": "import",
|
|
@@ -2080,7 +2080,7 @@ export class RevoGridComponent {
|
|
|
2080
2080
|
},
|
|
2081
2081
|
"complexType": {
|
|
2082
2082
|
"original": "FocusAfterRenderEvent",
|
|
2083
|
-
"resolved": "FocusAfterRenderEvent",
|
|
2083
|
+
"resolved": "FocusAfterRenderEvent<DataType<any, ColumnProp>>",
|
|
2084
2084
|
"references": {
|
|
2085
2085
|
"FocusAfterRenderEvent": {
|
|
2086
2086
|
"location": "import",
|
|
@@ -2117,7 +2117,7 @@ export class RevoGridComponent {
|
|
|
2117
2117
|
},
|
|
2118
2118
|
"complexType": {
|
|
2119
2119
|
"original": "{\n column: ColumnRegular;\n order: 'desc' | 'asc';\n additive: boolean;\n }",
|
|
2120
|
-
"resolved": "{ column: ColumnRegular
|
|
2120
|
+
"resolved": "{ column: ColumnRegular<ColumnProp, DataType<any, ColumnProp>>; order: \"asc\" | \"desc\"; additive: boolean; }",
|
|
2121
2121
|
"references": {
|
|
2122
2122
|
"ColumnRegular": {
|
|
2123
2123
|
"location": "import",
|
|
@@ -2167,7 +2167,7 @@ export class RevoGridComponent {
|
|
|
2167
2167
|
},
|
|
2168
2168
|
"complexType": {
|
|
2169
2169
|
"original": "{\n column: ColumnRegular;\n order: 'desc' | 'asc';\n additive: boolean;\n }",
|
|
2170
|
-
"resolved": "{ column: ColumnRegular
|
|
2170
|
+
"resolved": "{ column: ColumnRegular<ColumnProp, DataType<any, ColumnProp>>; order: \"asc\" | \"desc\"; additive: boolean; }",
|
|
2171
2171
|
"references": {
|
|
2172
2172
|
"ColumnRegular": {
|
|
2173
2173
|
"location": "import",
|
|
@@ -2189,7 +2189,7 @@ export class RevoGridComponent {
|
|
|
2189
2189
|
},
|
|
2190
2190
|
"complexType": {
|
|
2191
2191
|
"original": "RowDragStartDetails",
|
|
2192
|
-
"resolved": "
|
|
2192
|
+
"resolved": "TModel",
|
|
2193
2193
|
"references": {
|
|
2194
2194
|
"RowDragStartDetails": {
|
|
2195
2195
|
"location": "import",
|
|
@@ -2211,7 +2211,7 @@ export class RevoGridComponent {
|
|
|
2211
2211
|
},
|
|
2212
2212
|
"complexType": {
|
|
2213
2213
|
"original": "ColumnRegular",
|
|
2214
|
-
"resolved": "ColumnRegular",
|
|
2214
|
+
"resolved": "ColumnRegular<ColumnProp, DataType<any, ColumnProp>>",
|
|
2215
2215
|
"references": {
|
|
2216
2216
|
"ColumnRegular": {
|
|
2217
2217
|
"location": "import",
|
|
@@ -2233,7 +2233,7 @@ export class RevoGridComponent {
|
|
|
2233
2233
|
},
|
|
2234
2234
|
"complexType": {
|
|
2235
2235
|
"original": "BeforeSaveDataDetails",
|
|
2236
|
-
"resolved": "BeforeSaveDataDetails",
|
|
2236
|
+
"resolved": "BeforeSaveDataDetails<DataType, ColumnRegular<ColumnProp, DataType<any, ColumnProp>>>",
|
|
2237
2237
|
"references": {
|
|
2238
2238
|
"BeforeSaveDataDetails": {
|
|
2239
2239
|
"location": "import",
|
|
@@ -2255,7 +2255,7 @@ export class RevoGridComponent {
|
|
|
2255
2255
|
},
|
|
2256
2256
|
"complexType": {
|
|
2257
2257
|
"original": "FocusedData | null",
|
|
2258
|
-
"resolved": "null | { model: any; cell: Cell; colType: DimensionCols; rowType: DimensionRows; column?: ColumnRegular | undefined; }",
|
|
2258
|
+
"resolved": "null | { model: any; cell: Cell; colType: DimensionCols; rowType: DimensionRows; column?: ColumnRegular<ColumnProp, DataType<any, ColumnProp>> | undefined; }",
|
|
2259
2259
|
"references": {
|
|
2260
2260
|
"FocusedData": {
|
|
2261
2261
|
"location": "import",
|
|
@@ -2389,7 +2389,7 @@ export class RevoGridComponent {
|
|
|
2389
2389
|
},
|
|
2390
2390
|
"complexType": {
|
|
2391
2391
|
"original": "{\n columns: (ColumnGrouping | ColumnRegular)[];\n }",
|
|
2392
|
-
"resolved": "{ columns: (ColumnRegular | ColumnGrouping<any>)[]; }",
|
|
2392
|
+
"resolved": "{ columns: (ColumnRegular<ColumnProp, DataType<any, ColumnProp>> | ColumnGrouping<any>)[]; }",
|
|
2393
2393
|
"references": {
|
|
2394
2394
|
"ColumnGrouping": {
|
|
2395
2395
|
"location": "import",
|
|
@@ -2417,7 +2417,7 @@ export class RevoGridComponent {
|
|
|
2417
2417
|
},
|
|
2418
2418
|
"complexType": {
|
|
2419
2419
|
"original": "ColumnCollection",
|
|
2420
|
-
"resolved": "{ columns: Record<DimensionCols, ColumnRegular[]>; columnByProp: Record<ColumnProp, ColumnRegular[]>; columnGrouping: ColumnGroupingCollection; maxLevel: number; sort: Record<ColumnProp, ColumnRegular
|
|
2420
|
+
"resolved": "{ columns: Record<DimensionCols, ColumnRegular<ColumnProp, DataType<any, ColumnProp>>[]>; columnByProp: Record<ColumnProp, ColumnRegular<ColumnProp, DataType<any, ColumnProp>>[]>; columnGrouping: ColumnGroupingCollection; maxLevel: number; sort: Record<ColumnProp, ColumnRegular<ColumnProp, DataType<any, ColumnProp>>>; }",
|
|
2421
2421
|
"references": {
|
|
2422
2422
|
"ColumnCollection": {
|
|
2423
2423
|
"location": "import",
|
|
@@ -2439,7 +2439,7 @@ export class RevoGridComponent {
|
|
|
2439
2439
|
},
|
|
2440
2440
|
"complexType": {
|
|
2441
2441
|
"original": "ColumnCollection",
|
|
2442
|
-
"resolved": "{ columns: Record<DimensionCols, ColumnRegular[]>; columnByProp: Record<ColumnProp, ColumnRegular[]>; columnGrouping: ColumnGroupingCollection; maxLevel: number; sort: Record<ColumnProp, ColumnRegular
|
|
2442
|
+
"resolved": "{ columns: Record<DimensionCols, ColumnRegular<ColumnProp, DataType<any, ColumnProp>>[]>; columnByProp: Record<ColumnProp, ColumnRegular<ColumnProp, DataType<any, ColumnProp>>[]>; columnGrouping: ColumnGroupingCollection; maxLevel: number; sort: Record<ColumnProp, ColumnRegular<ColumnProp, DataType<any, ColumnProp>>>; }",
|
|
2443
2443
|
"references": {
|
|
2444
2444
|
"ColumnCollection": {
|
|
2445
2445
|
"location": "import",
|
|
@@ -2632,7 +2632,7 @@ export class RevoGridComponent {
|
|
|
2632
2632
|
},
|
|
2633
2633
|
"complexType": {
|
|
2634
2634
|
"original": "BeforeSaveDataDetails",
|
|
2635
|
-
"resolved": "BeforeSaveDataDetails",
|
|
2635
|
+
"resolved": "BeforeSaveDataDetails<DataType, ColumnRegular<ColumnProp, DataType<any, ColumnProp>>>",
|
|
2636
2636
|
"references": {
|
|
2637
2637
|
"BeforeSaveDataDetails": {
|
|
2638
2638
|
"location": "import",
|
|
@@ -2654,7 +2654,7 @@ export class RevoGridComponent {
|
|
|
2654
2654
|
},
|
|
2655
2655
|
"complexType": {
|
|
2656
2656
|
"original": "{\n [index: number]: ColumnRegular;\n }",
|
|
2657
|
-
"resolved": "{ [index: number]: ColumnRegular
|
|
2657
|
+
"resolved": "{ [index: number]: ColumnRegular<ColumnProp, DataType<any, ColumnProp>>; }",
|
|
2658
2658
|
"references": {
|
|
2659
2659
|
"ColumnRegular": {
|
|
2660
2660
|
"location": "import",
|
|
@@ -2977,7 +2977,7 @@ export class RevoGridComponent {
|
|
|
2977
2977
|
"signature": "(cols: ColumnRegular[]) => Promise<void>",
|
|
2978
2978
|
"parameters": [{
|
|
2979
2979
|
"name": "cols",
|
|
2980
|
-
"type": "ColumnRegular[]",
|
|
2980
|
+
"type": "ColumnRegular<ColumnProp, DataType<any, ColumnProp>>[]",
|
|
2981
2981
|
"docs": ""
|
|
2982
2982
|
}],
|
|
2983
2983
|
"references": {
|
|
@@ -3300,9 +3300,21 @@ export class RevoGridComponent {
|
|
|
3300
3300
|
"path": "@type",
|
|
3301
3301
|
"id": "src/types/index.ts::DimensionCols",
|
|
3302
3302
|
"referenceLocation": "DimensionCols"
|
|
3303
|
+
},
|
|
3304
|
+
"ColumnProp": {
|
|
3305
|
+
"location": "import",
|
|
3306
|
+
"path": "@type",
|
|
3307
|
+
"id": "src/types/index.ts::ColumnProp",
|
|
3308
|
+
"referenceLocation": "ColumnProp"
|
|
3309
|
+
},
|
|
3310
|
+
"DataType": {
|
|
3311
|
+
"location": "import",
|
|
3312
|
+
"path": "@type",
|
|
3313
|
+
"id": "src/types/index.ts::DataType",
|
|
3314
|
+
"referenceLocation": "DataType"
|
|
3303
3315
|
}
|
|
3304
3316
|
},
|
|
3305
|
-
"return": "Promise<Observable<DSourceState<ColumnRegular, DimensionCols>>>"
|
|
3317
|
+
"return": "Promise<Observable<DSourceState<ColumnRegular<ColumnProp, DataType<any, ColumnProp>>, DimensionCols>>>"
|
|
3306
3318
|
},
|
|
3307
3319
|
"docs": {
|
|
3308
3320
|
"text": "Provides access to column internal store observer\nCan be used for plugin support",
|
|
@@ -3317,7 +3329,7 @@ export class RevoGridComponent {
|
|
|
3317
3329
|
"signature": "(column: Pick<ColumnRegular, \"prop\" | \"cellCompare\">, order: \"asc\" | \"desc\" | undefined, additive: boolean) => Promise<void>",
|
|
3318
3330
|
"parameters": [{
|
|
3319
3331
|
"name": "column",
|
|
3320
|
-
"type": "{ prop: ColumnProp; cellCompare?: CellCompareFunc | undefined; }",
|
|
3332
|
+
"type": "{ prop: ColumnProp; cellCompare?: CellCompareFunc<DataType<any, ColumnProp>> | undefined; }",
|
|
3321
3333
|
"docs": "- column prop and cellCompare"
|
|
3322
3334
|
}, {
|
|
3323
3335
|
"name": "order",
|
|
@@ -3391,9 +3403,21 @@ export class RevoGridComponent {
|
|
|
3391
3403
|
"path": "@type",
|
|
3392
3404
|
"id": "src/types/index.ts::ColumnRegular",
|
|
3393
3405
|
"referenceLocation": "ColumnRegular"
|
|
3406
|
+
},
|
|
3407
|
+
"ColumnProp": {
|
|
3408
|
+
"location": "import",
|
|
3409
|
+
"path": "@type",
|
|
3410
|
+
"id": "src/types/index.ts::ColumnProp",
|
|
3411
|
+
"referenceLocation": "ColumnProp"
|
|
3412
|
+
},
|
|
3413
|
+
"DataType": {
|
|
3414
|
+
"location": "import",
|
|
3415
|
+
"path": "@type",
|
|
3416
|
+
"id": "src/types/index.ts::DataType",
|
|
3417
|
+
"referenceLocation": "DataType"
|
|
3394
3418
|
}
|
|
3395
3419
|
},
|
|
3396
|
-
"return": "Promise<ColumnRegular[]>"
|
|
3420
|
+
"return": "Promise<ColumnRegular<ColumnProp, DataType<any, ColumnProp>>[]>"
|
|
3397
3421
|
},
|
|
3398
3422
|
"docs": {
|
|
3399
3423
|
"text": "Receive all columns in data source",
|
|
@@ -235,7 +235,7 @@ export class RevogrFocus {
|
|
|
235
235
|
"mutable": false,
|
|
236
236
|
"complexType": {
|
|
237
237
|
"original": "Observable<DSourceState<DataType, DimensionRows>>",
|
|
238
|
-
"resolved": "\"rgRow\" | \"rowPinEnd\" | \"rowPinStart\" | D",
|
|
238
|
+
"resolved": "\"rgRow\" | \"rowPinEnd\" | \"rowPinStart\" | D | K",
|
|
239
239
|
"references": {
|
|
240
240
|
"Observable": {
|
|
241
241
|
"location": "import",
|
|
@@ -277,7 +277,7 @@ export class RevogrFocus {
|
|
|
277
277
|
"mutable": false,
|
|
278
278
|
"complexType": {
|
|
279
279
|
"original": "Observable<DSourceState<ColumnRegular, DimensionCols>>",
|
|
280
|
-
"resolved": "\"colPinEnd\" | \"colPinStart\" | \"rgCol\" | ColumnRegular",
|
|
280
|
+
"resolved": "\"colPinEnd\" | \"colPinStart\" | \"rgCol\" | ColumnRegular<ColumnProp, DataType<any, ColumnProp>>",
|
|
281
281
|
"references": {
|
|
282
282
|
"Observable": {
|
|
283
283
|
"location": "import",
|
|
@@ -396,7 +396,7 @@ export class RevogrFocus {
|
|
|
396
396
|
},
|
|
397
397
|
"complexType": {
|
|
398
398
|
"original": "FocusAfterRenderEvent",
|
|
399
|
-
"resolved": "FocusAfterRenderEvent",
|
|
399
|
+
"resolved": "FocusAfterRenderEvent<DataType<any, ColumnProp>>",
|
|
400
400
|
"references": {
|
|
401
401
|
"FocusAfterRenderEvent": {
|
|
402
402
|
"location": "import",
|
|
@@ -11,8 +11,10 @@ const SortingSign = ({ column }) => {
|
|
|
11
11
|
};
|
|
12
12
|
|
|
13
13
|
const PADDING_DEPTH = 10;
|
|
14
|
-
const RowRenderer = ({ rowClass, index, size, start, depth }, cells) => {
|
|
15
|
-
const props = Object.assign({ [DATA_ROW]: index }
|
|
14
|
+
const RowRenderer = ({ rowClass, index, size, start, depth, groupingLevel }, cells) => {
|
|
15
|
+
const props = Object.assign({ [DATA_ROW]: index }, (typeof groupingLevel === 'number'
|
|
16
|
+
? { 'data-level': groupingLevel }
|
|
17
|
+
: {}));
|
|
16
18
|
return (h("div", Object.assign({}, props, { class: `rgRow ${rowClass || ''}`, style: {
|
|
17
19
|
height: `${size}px`,
|
|
18
20
|
transform: `translateY(${start}px)`,
|
package/dist/esm/index.js
CHANGED
|
@@ -5,7 +5,7 @@ export { o as GROUPING_ROW_TYPE, j as GROUP_COLUMN_PROP, G as GROUP_DEPTH, h as
|
|
|
5
5
|
import { B as BasePlugin } from './column.drag.plugin-6YvuxWof.js';
|
|
6
6
|
export { A as AutoSizeColumnPlugin, C as ColumnAutoSizeMode, l as ColumnMovePlugin, D as DimensionStore, b as ExportCsv, E as ExportFilePlugin, c as FILTER_CONFIG_CHANGED_EVENT, F as FILTER_TRIMMED_TYPE, d as FILTE_PANEL, e as FilterPlugin, G as GroupingRowPlugin, S as SelectionStore, n as SortingPlugin, a as StretchColumn, o as defaultCellCompare, p as descCellCompare, j as doCollapse, k as doExpand, f as filterCoreFunctionsIndexedByType, h as filterNames, g as filterTypes, r as getComparer, m as getLeftRelative, q as getNextOrder, i as isStretchPlugin, s as sortIndexByItems } from './column.drag.plugin-6YvuxWof.js';
|
|
7
7
|
export { d as dispatch, a as dispatchByEvent } from './header-cell-renderer-DXhxZMly.js';
|
|
8
|
-
export { C as CellRenderer, G as GroupingRowRenderer, S as SortingSign, e as expandEvent, a as expandSvgIconVNode } from './cell-renderer-
|
|
8
|
+
export { C as CellRenderer, G as GroupingRowRenderer, S as SortingSign, e as expandEvent, a as expandSvgIconVNode } from './cell-renderer-K_BKH7Kx.js';
|
|
9
9
|
export { C as CELL_CLASS, L as CELL_HANDLER_CLASS, x as DATA_COL, y as DATA_ROW, z as DISABLED_CLASS, I as DRAGGABLE_CLASS, O as DRAGG_TEXT, G as DRAG_ICON_CLASS, D as DataStore, N as EDIT_INPUT_WR, J as FOCUS_CLASS, P as GRID_INTERNALS, F as HEADER_ACTUAL_ROW_CLASS, H as HEADER_CLASS, E as HEADER_ROW_CLASS, B as HEADER_SORTABLE_CLASS, M as MIN_COL_SIZE, K as MOBILE_CLASS, R as RESIZE_INTERVAL, Q as ROW_FOCUSED_CLASS, A as ROW_HEADER_TYPE, S as SELECTION_BORDER_CLASS, T as TMP_SELECTION_BG_CLASS, v as applyMixins, i as calculateDimensionData, U as codesLetter, l as findPositionInArray, h as gatherTrimmedItems, k as getItemByIndex, j as getItemByPosition, g as getPhysical, o as getScrollbarSize, b as getSourceItem, f as getSourceItemVirtualIndexByProp, c as getSourcePhysicalIndex, a as getVisibleSourceItem, V as keyValues, n as mergeSortedArray, p as proxyPlugin, m as pushSorted, r as range, q as scaleValue, e as setItems, d as setSourceByPhysicalIndex, s as setSourceByVirtualIndex, w as setStore, u as timeout, t as trimmedPlugin } from './dimension.helpers-DzxqJQqN.js';
|
|
10
10
|
export { T as TextEditor } from './text-editor-C1ks5eQ4.js';
|
|
11
11
|
export { k as isAll, c as isClear, h as isCopy, a as isCtrlKey, b as isCtrlMetaKey, g as isCut, l as isEditInput, m as isEditorCtrConstructible, f as isEnterKeyValue, i as isMetaKey, j as isPaste, d as isTab, e as isTabKeyValue } from './edit.utils-CzfeG98N.js';
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import { r as registerInstance, d as createEvent, h, e as Host, g as getElement } from './index-Chp_81rd.js';
|
|
5
5
|
import { M as ColumnService, u as isGrouping, K as baseEach } from './column.service-Cdz3dYqZ.js';
|
|
6
6
|
import { Q as ROW_FOCUSED_CLASS, b as getSourceItem, y as DATA_ROW, x as DATA_COL, a3 as getNative, a4 as baseIteratee, Y as isArray, M as MIN_COL_SIZE, B as HEADER_SORTABLE_CLASS, H as HEADER_CLASS, J as FOCUS_CLASS, E as HEADER_ROW_CLASS, F as HEADER_ACTUAL_ROW_CLASS, k as getItemByIndex } from './dimension.helpers-DzxqJQqN.js';
|
|
7
|
-
import { G as GroupingRowRenderer, C as CellRenderer, R as RowRenderer, P as PADDING_DEPTH, S as SortingSign } from './cell-renderer-
|
|
7
|
+
import { G as GroupingRowRenderer, C as CellRenderer, R as RowRenderer, P as PADDING_DEPTH, S as SortingSign } from './cell-renderer-K_BKH7Kx.js';
|
|
8
8
|
import { c as FilterButton } from './filter.button-C8XTWPU2.js';
|
|
9
9
|
import { H as HeaderCellRenderer } from './header-cell-renderer-DXhxZMly.js';
|
|
10
10
|
import { t as throttle, L as LocalScrollTimer, a as LocalScrollService } from './throttle-BEjFQa2l.js';
|
|
@@ -223,7 +223,7 @@ const RevogrData = class {
|
|
|
223
223
|
if (this.rowHighlightPlugin.isRowFocused(rgRow.itemIndex)) {
|
|
224
224
|
rowClass += ` ${ROW_FOCUSED_CLASS}`;
|
|
225
225
|
}
|
|
226
|
-
const row = (h(RowRenderer, { index: rgRow.itemIndex, rowClass: rowClass, size: rgRow.size, start: rgRow.start }, cells));
|
|
226
|
+
const row = (h(RowRenderer, { index: rgRow.itemIndex, rowClass: rowClass, size: rgRow.size, start: rgRow.start, groupingLevel: groupDepth || undefined }, cells));
|
|
227
227
|
this.beforerowrender.emit({
|
|
228
228
|
node: row,
|
|
229
229
|
item: rgRow,
|
|
@@ -11,8 +11,10 @@ const SortingSign = ({ column }) => {
|
|
|
11
11
|
};
|
|
12
12
|
|
|
13
13
|
const PADDING_DEPTH = 10;
|
|
14
|
-
const RowRenderer = ({ rowClass, index, size, start, depth }, cells) => {
|
|
15
|
-
const props = Object.assign({ [DATA_ROW]: index }
|
|
14
|
+
const RowRenderer = ({ rowClass, index, size, start, depth, groupingLevel }, cells) => {
|
|
15
|
+
const props = Object.assign({ [DATA_ROW]: index }, (typeof groupingLevel === 'number'
|
|
16
|
+
? { 'data-level': groupingLevel }
|
|
17
|
+
: {}));
|
|
16
18
|
return (h("div", Object.assign({}, props, { class: `rgRow ${rowClass || ''}`, style: {
|
|
17
19
|
height: `${size}px`,
|
|
18
20
|
transform: `translateY(${start}px)`,
|
|
@@ -5,7 +5,7 @@ export { o as GROUPING_ROW_TYPE, j as GROUP_COLUMN_PROP, G as GROUP_DEPTH, h as
|
|
|
5
5
|
import { B as BasePlugin } from './column.drag.plugin-6YvuxWof.js';
|
|
6
6
|
export { A as AutoSizeColumnPlugin, C as ColumnAutoSizeMode, l as ColumnMovePlugin, D as DimensionStore, b as ExportCsv, E as ExportFilePlugin, c as FILTER_CONFIG_CHANGED_EVENT, F as FILTER_TRIMMED_TYPE, d as FILTE_PANEL, e as FilterPlugin, G as GroupingRowPlugin, S as SelectionStore, n as SortingPlugin, a as StretchColumn, o as defaultCellCompare, p as descCellCompare, j as doCollapse, k as doExpand, f as filterCoreFunctionsIndexedByType, h as filterNames, g as filterTypes, r as getComparer, m as getLeftRelative, q as getNextOrder, i as isStretchPlugin, s as sortIndexByItems } from './column.drag.plugin-6YvuxWof.js';
|
|
7
7
|
export { d as dispatch, a as dispatchByEvent } from './header-cell-renderer-DXhxZMly.js';
|
|
8
|
-
export { C as CellRenderer, G as GroupingRowRenderer, S as SortingSign, e as expandEvent, a as expandSvgIconVNode } from './cell-renderer-
|
|
8
|
+
export { C as CellRenderer, G as GroupingRowRenderer, S as SortingSign, e as expandEvent, a as expandSvgIconVNode } from './cell-renderer-K_BKH7Kx.js';
|
|
9
9
|
export { C as CELL_CLASS, L as CELL_HANDLER_CLASS, x as DATA_COL, y as DATA_ROW, z as DISABLED_CLASS, I as DRAGGABLE_CLASS, O as DRAGG_TEXT, G as DRAG_ICON_CLASS, D as DataStore, N as EDIT_INPUT_WR, J as FOCUS_CLASS, P as GRID_INTERNALS, F as HEADER_ACTUAL_ROW_CLASS, H as HEADER_CLASS, E as HEADER_ROW_CLASS, B as HEADER_SORTABLE_CLASS, M as MIN_COL_SIZE, K as MOBILE_CLASS, R as RESIZE_INTERVAL, Q as ROW_FOCUSED_CLASS, A as ROW_HEADER_TYPE, S as SELECTION_BORDER_CLASS, T as TMP_SELECTION_BG_CLASS, v as applyMixins, i as calculateDimensionData, U as codesLetter, l as findPositionInArray, h as gatherTrimmedItems, k as getItemByIndex, j as getItemByPosition, g as getPhysical, o as getScrollbarSize, b as getSourceItem, f as getSourceItemVirtualIndexByProp, c as getSourcePhysicalIndex, a as getVisibleSourceItem, V as keyValues, n as mergeSortedArray, p as proxyPlugin, m as pushSorted, r as range, q as scaleValue, e as setItems, d as setSourceByPhysicalIndex, s as setSourceByVirtualIndex, w as setStore, u as timeout, t as trimmedPlugin } from './dimension.helpers-DzxqJQqN.js';
|
|
10
10
|
export { T as TextEditor } from './text-editor-C1ks5eQ4.js';
|
|
11
11
|
export { k as isAll, c as isClear, h as isCopy, a as isCtrlKey, b as isCtrlMetaKey, g as isCut, l as isEditInput, m as isEditorCtrConstructible, f as isEnterKeyValue, i as isMetaKey, j as isPaste, d as isTab, e as isTabKeyValue } from './edit.utils-CzfeG98N.js';
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import { r as registerInstance, d as createEvent, h, e as Host, g as getElement } from './index-Chp_81rd.js';
|
|
5
5
|
import { M as ColumnService, u as isGrouping, K as baseEach } from './column.service-Cdz3dYqZ.js';
|
|
6
6
|
import { Q as ROW_FOCUSED_CLASS, b as getSourceItem, y as DATA_ROW, x as DATA_COL, a3 as getNative, a4 as baseIteratee, Y as isArray, M as MIN_COL_SIZE, B as HEADER_SORTABLE_CLASS, H as HEADER_CLASS, J as FOCUS_CLASS, E as HEADER_ROW_CLASS, F as HEADER_ACTUAL_ROW_CLASS, k as getItemByIndex } from './dimension.helpers-DzxqJQqN.js';
|
|
7
|
-
import { G as GroupingRowRenderer, C as CellRenderer, R as RowRenderer, P as PADDING_DEPTH, S as SortingSign } from './cell-renderer-
|
|
7
|
+
import { G as GroupingRowRenderer, C as CellRenderer, R as RowRenderer, P as PADDING_DEPTH, S as SortingSign } from './cell-renderer-K_BKH7Kx.js';
|
|
8
8
|
import { c as FilterButton } from './filter.button-C8XTWPU2.js';
|
|
9
9
|
import { H as HeaderCellRenderer } from './header-cell-renderer-DXhxZMly.js';
|
|
10
10
|
import { t as throttle, L as LocalScrollTimer, a as LocalScrollService } from './throttle-BEjFQa2l.js';
|
|
@@ -223,7 +223,7 @@ const RevogrData = class {
|
|
|
223
223
|
if (this.rowHighlightPlugin.isRowFocused(rgRow.itemIndex)) {
|
|
224
224
|
rowClass += ` ${ROW_FOCUSED_CLASS}`;
|
|
225
225
|
}
|
|
226
|
-
const row = (h(RowRenderer, { index: rgRow.itemIndex, rowClass: rowClass, size: rgRow.size, start: rgRow.start }, cells));
|
|
226
|
+
const row = (h(RowRenderer, { index: rgRow.itemIndex, rowClass: rowClass, size: rgRow.size, start: rgRow.start, groupingLevel: groupDepth || undefined }, cells));
|
|
227
227
|
this.beforerowrender.emit({
|
|
228
228
|
node: row,
|
|
229
229
|
item: rgRow,
|
|
@@ -103,5 +103,5 @@ export declare class RevogrData {
|
|
|
103
103
|
componentWillRender(): Promise<any[]>;
|
|
104
104
|
componentDidRender(): void;
|
|
105
105
|
render(): any;
|
|
106
|
-
triggerBeforeCellRender(model: CellTemplateProp, row: VirtualPositionItem, column: VirtualPositionItem): CustomEvent<BeforeCellRenderEvent<CellTemplateProp
|
|
106
|
+
triggerBeforeCellRender(model: CellTemplateProp, row: VirtualPositionItem, column: VirtualPositionItem): CustomEvent<BeforeCellRenderEvent<CellTemplateProp<DataType<any, import("@type").ColumnProp>, ColumnRegular<import("@type").ColumnProp, DataType<any, import("@type").ColumnProp>>, import("@type").ColumnProp>>>;
|
|
107
107
|
}
|
|
@@ -6,7 +6,8 @@ export interface RowProps extends JSXBase.HTMLAttributes {
|
|
|
6
6
|
index: number;
|
|
7
7
|
rowClass?: string;
|
|
8
8
|
depth?: number;
|
|
9
|
+
groupingLevel?: number;
|
|
9
10
|
}
|
|
10
11
|
export declare const PADDING_DEPTH = 10;
|
|
11
|
-
declare const RowRenderer: ({ rowClass, index, size, start, depth }: RowProps, cells: VNode[]) => any;
|
|
12
|
+
declare const RowRenderer: ({ rowClass, index, size, start, depth, groupingLevel }: RowProps, cells: VNode[]) => any;
|
|
12
13
|
export default RowRenderer;
|
|
@@ -12,7 +12,7 @@ export default class ColumnDataProvider {
|
|
|
12
12
|
getRawColumns(): Record<DimensionCols, ColumnRegular[]>;
|
|
13
13
|
getColumns(type?: DimensionCols | 'all'): ColumnRegular[];
|
|
14
14
|
getColumnIndexByProp(prop: ColumnProp, type: DimensionCols): number;
|
|
15
|
-
getColumnByProp(prop: ColumnProp): ColumnRegular[] | undefined;
|
|
15
|
+
getColumnByProp(prop: ColumnProp): ColumnRegular<ColumnProp, import("@type").DataType<any, ColumnProp>>[] | undefined;
|
|
16
16
|
refreshByType(type: DimensionCols): void;
|
|
17
17
|
/**
|
|
18
18
|
* Main method to set columns
|
|
@@ -10,19 +10,20 @@ export type Nullable<T> = {
|
|
|
10
10
|
* Advanced column data schema model.
|
|
11
11
|
* Used for transpassing data to cell renderer and editor.
|
|
12
12
|
*/
|
|
13
|
-
|
|
13
|
+
type ModelValueByProp<TModel extends DataType, TProp extends ColumnProp> = TProp extends keyof TModel ? TModel[TProp] : any;
|
|
14
|
+
export interface ColumnDataSchemaModel<TModel extends DataType = DataType, TColumn extends ColumnRegular = ColumnRegular, TProp extends ColumnProp = TColumn['prop']> {
|
|
14
15
|
/**
|
|
15
16
|
* Column prop used for mapping value to cell from data source model/row
|
|
16
17
|
*/
|
|
17
|
-
prop:
|
|
18
|
+
prop: TProp;
|
|
18
19
|
/**
|
|
19
20
|
* Row data object
|
|
20
21
|
*/
|
|
21
|
-
model:
|
|
22
|
+
model: TModel;
|
|
22
23
|
/**
|
|
23
24
|
* Column data object
|
|
24
25
|
*/
|
|
25
|
-
column:
|
|
26
|
+
column: TColumn;
|
|
26
27
|
/**
|
|
27
28
|
* Virtual index of the row in the viewport
|
|
28
29
|
*/
|
|
@@ -42,18 +43,18 @@ export interface ColumnDataSchemaModel {
|
|
|
42
43
|
/**
|
|
43
44
|
* Row models based on viewport
|
|
44
45
|
*/
|
|
45
|
-
data:
|
|
46
|
+
data: TModel[];
|
|
46
47
|
/**
|
|
47
48
|
* Current cell data value
|
|
48
49
|
* Mapped from model through column property like model['prop']
|
|
49
50
|
*/
|
|
50
|
-
value?:
|
|
51
|
+
value?: ModelValueByProp<TModel, TProp>;
|
|
51
52
|
}
|
|
52
53
|
/**
|
|
53
54
|
* Template property for each cell, extends the column data schema model.
|
|
54
55
|
* Additionally, it provides access to the providers injected into the template.
|
|
55
56
|
*/
|
|
56
|
-
export interface CellTemplateProp extends ColumnDataSchemaModel {
|
|
57
|
+
export interface CellTemplateProp<TModel extends DataType = DataType, TColumn extends ColumnRegular = ColumnRegular, TProp extends ColumnProp = TColumn['prop']> extends ColumnDataSchemaModel<TModel, TColumn, TProp> {
|
|
57
58
|
/**
|
|
58
59
|
* Providers injected into the template
|
|
59
60
|
* Also to get grouping depth
|
|
@@ -68,10 +69,8 @@ export interface CellTemplateProp extends ColumnDataSchemaModel {
|
|
|
68
69
|
* If it is a function, it returns whether the cell in question is read-only based on the provided
|
|
69
70
|
* ColumnDataSchemaModel.
|
|
70
71
|
*/
|
|
71
|
-
export type ReadOnlyFormat = boolean | ((params: ColumnDataSchemaModel) => boolean);
|
|
72
|
-
export type RowDrag = boolean |
|
|
73
|
-
(params: ColumnDataSchemaModel): boolean;
|
|
74
|
-
};
|
|
72
|
+
export type ReadOnlyFormat<TModel extends DataType = DataType, TColumn extends ColumnRegular = ColumnRegular> = boolean | ((params: ColumnDataSchemaModel<TModel, TColumn>) => boolean);
|
|
73
|
+
export type RowDrag<TModel extends DataType = DataType, TColumn extends ColumnRegular = ColumnRegular> = boolean | ((params: ColumnDataSchemaModel<TModel, TColumn>) => boolean);
|
|
75
74
|
/**
|
|
76
75
|
* `ColumnGrouping` type is used to define a grouping in a column.
|
|
77
76
|
*/
|
|
@@ -113,20 +112,20 @@ export type ColumnTypes = {
|
|
|
113
112
|
/**
|
|
114
113
|
* Interface for custom cell renderer.
|
|
115
114
|
*/
|
|
116
|
-
export interface CellTemplate {
|
|
117
|
-
(createElement: HyperFunc<VNode>, props: CellTemplateProp
|
|
115
|
+
export interface CellTemplate<TModel extends DataType = DataType> {
|
|
116
|
+
(createElement: HyperFunc<VNode>, props: CellTemplateProp<TModel>, additionalData?: any): any;
|
|
118
117
|
}
|
|
119
118
|
/**
|
|
120
119
|
* Interface for regular column definition.
|
|
121
120
|
* Regular column can be any column that is not a grouping column.
|
|
122
121
|
*/
|
|
123
|
-
export interface ColumnType extends ColumnProperties {
|
|
122
|
+
export interface ColumnType<TModel extends DataType = DataType> extends ColumnProperties {
|
|
124
123
|
/**
|
|
125
124
|
* Represents whether the column or cell is read-only.
|
|
126
125
|
* Can be a boolean or a function that returns a boolean.
|
|
127
126
|
* The function receives column data as a parameter.
|
|
128
127
|
*/
|
|
129
|
-
readonly?: ReadOnlyFormat
|
|
128
|
+
readonly?: ReadOnlyFormat<TModel>;
|
|
130
129
|
/**
|
|
131
130
|
* Represents the default column size.
|
|
132
131
|
*/
|
|
@@ -149,20 +148,20 @@ export interface ColumnType extends ColumnProperties {
|
|
|
149
148
|
/**
|
|
150
149
|
* Represents cell properties for custom styling, classes, and events.
|
|
151
150
|
*/
|
|
152
|
-
cellProperties?: PropertiesFunc
|
|
151
|
+
cellProperties?: PropertiesFunc<TModel>;
|
|
153
152
|
/**
|
|
154
153
|
* Represents the cell template for custom rendering.
|
|
155
154
|
*/
|
|
156
|
-
cellTemplate?: CellTemplate
|
|
155
|
+
cellTemplate?: CellTemplate<TModel>;
|
|
157
156
|
/**
|
|
158
157
|
* Represents the cell compare function for custom sorting.
|
|
159
158
|
*/
|
|
160
|
-
cellCompare?: CellCompareFunc
|
|
159
|
+
cellCompare?: CellCompareFunc<TModel>;
|
|
161
160
|
/**
|
|
162
161
|
* Represents the cell value parse function for custom parsing.
|
|
163
162
|
* Currently only used for filtering.
|
|
164
163
|
*/
|
|
165
|
-
cellParser?: (model:
|
|
164
|
+
cellParser?: (model: TModel, column: ColumnRegular<ColumnProp, TModel>) => any;
|
|
166
165
|
}
|
|
167
166
|
export type Order = 'asc' | 'desc' | undefined;
|
|
168
167
|
/**
|
|
@@ -174,11 +173,11 @@ export type Order = 'asc' | 'desc' | undefined;
|
|
|
174
173
|
* ColumnRegular interface represents regular column definition.
|
|
175
174
|
* Regular column can be any column that is not a grouping column.
|
|
176
175
|
*/
|
|
177
|
-
export interface ColumnRegular extends ColumnType {
|
|
176
|
+
export interface ColumnRegular<P extends ColumnProp = ColumnProp, TModel extends DataType = DataType> extends ColumnType<TModel> {
|
|
178
177
|
/**
|
|
179
178
|
* Column prop used for mapping value to cell from data source model/row, used for indexing.
|
|
180
179
|
*/
|
|
181
|
-
prop:
|
|
180
|
+
prop: P;
|
|
182
181
|
/**
|
|
183
182
|
* Column pin 'colPinStart'|'colPinEnd'.
|
|
184
183
|
*/
|
|
@@ -206,7 +205,7 @@ export interface ColumnRegular extends ColumnType {
|
|
|
206
205
|
/**
|
|
207
206
|
* Is cell in column or individual can be dragged.
|
|
208
207
|
*/
|
|
209
|
-
rowDrag?: RowDrag
|
|
208
|
+
rowDrag?: RowDrag<TModel>;
|
|
210
209
|
/**
|
|
211
210
|
* Represents type defined in columnTypes property through grid config.
|
|
212
211
|
*/
|
|
@@ -214,7 +213,7 @@ export interface ColumnRegular extends ColumnType {
|
|
|
214
213
|
/**
|
|
215
214
|
* Function called before column applied to the store.
|
|
216
215
|
*/
|
|
217
|
-
beforeSetup?(rgCol: ColumnRegular): void;
|
|
216
|
+
beforeSetup?(rgCol: ColumnRegular<P, TModel>): void;
|
|
218
217
|
/**
|
|
219
218
|
* Additional properties can be added to the column definition.
|
|
220
219
|
*/
|
|
@@ -225,7 +224,7 @@ export type ColumnData = (ColumnGrouping | ColumnRegular)[];
|
|
|
225
224
|
* Column template property.
|
|
226
225
|
* Contains extended properties for column.
|
|
227
226
|
*/
|
|
228
|
-
export interface ColumnTemplateProp extends ColumnRegular {
|
|
227
|
+
export interface ColumnTemplateProp<P extends ColumnProp = ColumnProp> extends ColumnRegular<P> {
|
|
229
228
|
/**
|
|
230
229
|
* Providers injected into the template.
|
|
231
230
|
*/
|
|
@@ -371,15 +370,33 @@ export type FocusTemplateFunc = (createElement: HyperFunc<VNode>, detail: FocusR
|
|
|
371
370
|
* the data of the first cell, and the data of the second cell. It returns a
|
|
372
371
|
* number indicating the relative order of the two cells.
|
|
373
372
|
*/
|
|
374
|
-
export type CellCompareFunc = (prop: ColumnProp, a:
|
|
373
|
+
export type CellCompareFunc<TModel extends DataType = DataType> = (prop: ColumnProp, a: TModel, b: TModel) => number;
|
|
375
374
|
export type ColumnTemplateFunc = (createElement: HyperFunc<VNode>, props: ColumnTemplateProp, additionalData?: any) => any;
|
|
376
|
-
export type PropertiesFunc = (props: CellTemplateProp) => CellProps | void | undefined;
|
|
375
|
+
export type PropertiesFunc<TModel extends DataType = DataType> = (props: CellTemplateProp<TModel>) => CellProps | void | undefined;
|
|
377
376
|
export type ColPropertiesFunc = (props: ColumnPropProp) => CellProps | void | undefined;
|
|
378
|
-
|
|
379
|
-
|
|
377
|
+
/**
|
|
378
|
+
* Represents a generic row data object used internally by the grid.
|
|
379
|
+
*
|
|
380
|
+
* @typeParam D - Value type for all properties (defaults to `any`).
|
|
381
|
+
* @typeParam K - Column property keys (defaults to `ColumnProp`).
|
|
382
|
+
*
|
|
383
|
+
* For type-safe usage, define your own row interface and pass it
|
|
384
|
+
* directly as the data source. Use `ColumnRegular` generics to
|
|
385
|
+
* bind column definitions to your row type:
|
|
386
|
+
* ```ts
|
|
387
|
+
* type MyRow = { id: number; name: string };
|
|
388
|
+
* const source: MyRow[] = [{ id: 1, name: 'Alice' }];
|
|
389
|
+
* const columns: ColumnRegular<keyof MyRow, MyRow>[] = [
|
|
390
|
+
* { prop: 'id', name: 'ID' },
|
|
391
|
+
* { prop: 'name', name: 'Name' },
|
|
392
|
+
* ];
|
|
393
|
+
* ```
|
|
394
|
+
*/
|
|
395
|
+
export type DataType<D = any, K extends ColumnProp = ColumnProp> = {
|
|
396
|
+
[T in K]: DataFormat<D>;
|
|
380
397
|
};
|
|
381
|
-
export type DataLookup<T = any> = {
|
|
382
|
-
[rowIndex: number]: DataType<T>;
|
|
398
|
+
export type DataLookup<T = any, K extends ColumnProp = ColumnProp> = {
|
|
399
|
+
[rowIndex: number]: DataType<T, K>;
|
|
383
400
|
};
|
|
384
401
|
/**
|
|
385
402
|
* `RowDefinition` is a type that represents a row definition in the
|
|
@@ -624,7 +641,7 @@ export type ViewportStores = {
|
|
|
624
641
|
/**
|
|
625
642
|
* Represents the event object that is emitted when the drag operation starts.
|
|
626
643
|
*/
|
|
627
|
-
export interface DragStartEvent {
|
|
644
|
+
export interface DragStartEvent<TModel extends DataType = DataType, TColumn extends ColumnRegular = ColumnRegular> {
|
|
628
645
|
/**
|
|
629
646
|
* Represents the original mouse event that triggered the drag operation.
|
|
630
647
|
*/
|
|
@@ -632,7 +649,7 @@ export interface DragStartEvent {
|
|
|
632
649
|
/**
|
|
633
650
|
* Represents the model of the column being dragged.
|
|
634
651
|
*/
|
|
635
|
-
model: ColumnDataSchemaModel
|
|
652
|
+
model: ColumnDataSchemaModel<TModel, TColumn>;
|
|
636
653
|
}
|
|
637
654
|
/**
|
|
638
655
|
* Represents the event object that is emitted before cell rendering.
|
|
@@ -715,8 +732,8 @@ export interface FocusRenderEvent extends AllDimensionType {
|
|
|
715
732
|
*/
|
|
716
733
|
next?: Partial<Cell>;
|
|
717
734
|
}
|
|
718
|
-
export interface FocusAfterRenderEvent extends AllDimensionType {
|
|
719
|
-
model?:
|
|
735
|
+
export interface FocusAfterRenderEvent<TModel extends DataType = DataType> extends AllDimensionType {
|
|
736
|
+
model?: TModel;
|
|
720
737
|
column?: ColumnRegular;
|
|
721
738
|
/**
|
|
722
739
|
* Virtual index of the row in the viewport
|
|
@@ -745,9 +762,13 @@ export type ScrollCoordinateEvent = {
|
|
|
745
762
|
coordinate: number;
|
|
746
763
|
};
|
|
747
764
|
/** Range paste. */
|
|
748
|
-
export interface RangeClipboardPasteEvent extends AllDimensionType {
|
|
749
|
-
data:
|
|
750
|
-
|
|
765
|
+
export interface RangeClipboardPasteEvent<TModel extends DataType = DataType> extends AllDimensionType {
|
|
766
|
+
data: {
|
|
767
|
+
[rowIndex: number]: TModel;
|
|
768
|
+
};
|
|
769
|
+
models: {
|
|
770
|
+
[rowIndex: number]: TModel | undefined;
|
|
771
|
+
};
|
|
751
772
|
range: RangeArea | null;
|
|
752
773
|
}
|
|
753
774
|
/** Range copy. */
|
|
@@ -762,3 +783,4 @@ export interface AdditionalData {
|
|
|
762
783
|
*/
|
|
763
784
|
[key: string]: any;
|
|
764
785
|
}
|
|
786
|
+
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type VNode } from '../stencil-public-runtime';
|
|
2
2
|
import type { DimensionRows, DimensionCols } from './dimension';
|
|
3
|
-
import type { ColumnProp,
|
|
3
|
+
import type { ColumnProp, ColumnRegular, DataType, HyperFunc, ColumnDataSchemaModel, PositionItem } from './interfaces';
|
|
4
4
|
export type RowIndex = number;
|
|
5
5
|
export type ColIndex = number;
|
|
6
6
|
/**
|
|
@@ -91,28 +91,32 @@ export type SaveDataDetails = {
|
|
|
91
91
|
preventFocus?: boolean;
|
|
92
92
|
};
|
|
93
93
|
export type BeforeEdit = BeforeSaveDataDetails;
|
|
94
|
-
export type RowDragStartDetails = {
|
|
94
|
+
export type RowDragStartDetails<TModel extends DataType = DataType> = {
|
|
95
95
|
cell: Cell;
|
|
96
96
|
text: string;
|
|
97
97
|
pos: PositionItem;
|
|
98
98
|
event: MouseEvent;
|
|
99
99
|
rowType: DimensionRows;
|
|
100
|
-
model:
|
|
100
|
+
model: TModel;
|
|
101
101
|
};
|
|
102
|
-
export interface BeforeSaveDataDetails extends ColumnDataSchemaModel {
|
|
102
|
+
export interface BeforeSaveDataDetails<TModel extends DataType = DataType, TColumn extends ColumnRegular = ColumnRegular> extends ColumnDataSchemaModel<TModel, TColumn> {
|
|
103
103
|
/**
|
|
104
104
|
* Value from editor to save, not part of the model value yet
|
|
105
105
|
*/
|
|
106
106
|
val?: any;
|
|
107
107
|
}
|
|
108
|
-
export type BeforeRangeSaveDataDetails = {
|
|
109
|
-
data:
|
|
110
|
-
|
|
108
|
+
export type BeforeRangeSaveDataDetails<TModel extends DataType = DataType> = {
|
|
109
|
+
data: {
|
|
110
|
+
[rowIndex: number]: TModel;
|
|
111
|
+
};
|
|
112
|
+
models: {
|
|
113
|
+
[rowIndex: number]: TModel | undefined;
|
|
114
|
+
};
|
|
111
115
|
type: DimensionRows;
|
|
112
116
|
newRange: RangeArea | null;
|
|
113
117
|
oldRange: RangeArea | null;
|
|
114
118
|
};
|
|
115
|
-
export type AfterEditEvent = BeforeRangeSaveDataDetails | BeforeSaveDataDetails
|
|
119
|
+
export type AfterEditEvent<TModel extends DataType = DataType> = BeforeRangeSaveDataDetails<TModel> | BeforeSaveDataDetails<TModel>;
|
|
116
120
|
/**
|
|
117
121
|
* Edit cell info for store
|
|
118
122
|
*/
|
package/hydrate/index.js
CHANGED
|
@@ -16698,8 +16698,10 @@ function filterOutEmptyGroupRows(source, filterTrimmed) {
|
|
|
16698
16698
|
}
|
|
16699
16699
|
|
|
16700
16700
|
const PADDING_DEPTH = 10;
|
|
16701
|
-
const RowRenderer = ({ rowClass, index, size, start, depth }, cells) => {
|
|
16702
|
-
const props = Object.assign({ [DATA_ROW]: index }
|
|
16701
|
+
const RowRenderer = ({ rowClass, index, size, start, depth, groupingLevel }, cells) => {
|
|
16702
|
+
const props = Object.assign({ [DATA_ROW]: index }, (typeof groupingLevel === 'number'
|
|
16703
|
+
? { 'data-level': groupingLevel }
|
|
16704
|
+
: {}));
|
|
16703
16705
|
return (hAsync("div", Object.assign({}, props, { class: `rgRow ${rowClass || ''}`, style: {
|
|
16704
16706
|
height: `${size}px`,
|
|
16705
16707
|
transform: `translateY(${start}px)`,
|
|
@@ -20085,7 +20087,7 @@ class RevogrData {
|
|
|
20085
20087
|
if (this.rowHighlightPlugin.isRowFocused(rgRow.itemIndex)) {
|
|
20086
20088
|
rowClass += ` ${ROW_FOCUSED_CLASS}`;
|
|
20087
20089
|
}
|
|
20088
|
-
const row = (hAsync(RowRenderer, { index: rgRow.itemIndex, rowClass: rowClass, size: rgRow.size, start: rgRow.start }, cells));
|
|
20090
|
+
const row = (hAsync(RowRenderer, { index: rgRow.itemIndex, rowClass: rowClass, size: rgRow.size, start: rgRow.start, groupingLevel: groupDepth || undefined }, cells));
|
|
20089
20091
|
this.beforerowrender.emit({
|
|
20090
20092
|
node: row,
|
|
20091
20093
|
item: rgRow,
|
package/hydrate/index.mjs
CHANGED
|
@@ -16696,8 +16696,10 @@ function filterOutEmptyGroupRows(source, filterTrimmed) {
|
|
|
16696
16696
|
}
|
|
16697
16697
|
|
|
16698
16698
|
const PADDING_DEPTH = 10;
|
|
16699
|
-
const RowRenderer = ({ rowClass, index, size, start, depth }, cells) => {
|
|
16700
|
-
const props = Object.assign({ [DATA_ROW]: index }
|
|
16699
|
+
const RowRenderer = ({ rowClass, index, size, start, depth, groupingLevel }, cells) => {
|
|
16700
|
+
const props = Object.assign({ [DATA_ROW]: index }, (typeof groupingLevel === 'number'
|
|
16701
|
+
? { 'data-level': groupingLevel }
|
|
16702
|
+
: {}));
|
|
16701
16703
|
return (hAsync("div", Object.assign({}, props, { class: `rgRow ${rowClass || ''}`, style: {
|
|
16702
16704
|
height: `${size}px`,
|
|
16703
16705
|
transform: `translateY(${start}px)`,
|
|
@@ -20083,7 +20085,7 @@ class RevogrData {
|
|
|
20083
20085
|
if (this.rowHighlightPlugin.isRowFocused(rgRow.itemIndex)) {
|
|
20084
20086
|
rowClass += ` ${ROW_FOCUSED_CLASS}`;
|
|
20085
20087
|
}
|
|
20086
|
-
const row = (hAsync(RowRenderer, { index: rgRow.itemIndex, rowClass: rowClass, size: rgRow.size, start: rgRow.start }, cells));
|
|
20088
|
+
const row = (hAsync(RowRenderer, { index: rgRow.itemIndex, rowClass: rowClass, size: rgRow.size, start: rgRow.start, groupingLevel: groupDepth || undefined }, cells));
|
|
20087
20089
|
this.beforerowrender.emit({
|
|
20088
20090
|
node: row,
|
|
20089
20091
|
item: rgRow,
|
package/package.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Built by Revolist OU ❤️
|
|
3
3
|
*/
|
|
4
|
-
import{h as t,Build as e,proxyCustomElement as o,HTMLElement as i,createEvent as r,Host as n,transformTag as s}from"@stencil/core/internal/client";import{l as a,m as l,G as d,h as c,P as h,O as g,B as p,M as v,u as C}from"./column.service.js";import{a as u,h as m,g as w,l as L,D as x}from"./consts.js";import{b as f}from"./data.store.js";import"./platform.js";import{d as b}from"./vnode-converter.js";const y=({rowClass:e,index:o,size:i,start:r,depth:n},s)=>{const a=Object.assign({[u]:o});return t("div",Object.assign({},a,{class:`rgRow ${e||""}`,style:{height:`${i}px`,transform:`translateY(${r}px)`,paddingLeft:n?10*n+"px":void 0}}),s)};function E(t,e,o){var i;const r=new CustomEvent(l,{detail:{model:e,virtualIndex:o},cancelable:!0,bubbles:!0});null===(i=t.target)||void 0===i||i.dispatchEvent(r)}const R=e=>{const{model:o,itemIndex:i,hasExpand:r,groupingCustomRenderer:n}=e,s=o[h],l=o[c],g=parseInt(o[d],10)||0;return t(y,Object.assign({},e,{rowClass:"groupingRow",depth:g}),n?t("div",{onClick:t=>E(t,o,i)},n(t,Object.assign(Object.assign({},e),{colType:e.providers.colType,name:s,expanded:l,depth:g}))):r&&[t("button",{class:{[a]:!0},onClick:t=>E(t,o,i)},j(l)),s])},j=(e=!1)=>t("svg",{"aria-hidden":"true",style:{transform:`rotate(${e?0:-90}deg)`},focusable:"false",viewBox:"0 0 448 512"},t("path",{fill:"currentColor",d:"M207.029 381.476L12.686 187.132c-9.373-9.373-9.373-24.569 0-33.941l22.667-22.667c9.357-9.357 24.522-9.375 33.901-.04L224 284.505l154.745-154.021c9.379-9.335 24.544-9.317 33.901.04l22.667 22.667c9.373 9.373 9.373 24.569 0 33.941L240.971 381.476c-9.373 9.372-24.569 9.372-33.942 0z"}));function k(o){var i;const r=[],n=null===(i=o.schemaModel.column)||void 0===i?void 0:i.cellTemplate;if(n)r.push(n(t,o.schemaModel,o.additionalData));else{if(!o.schemaModel.column)return(null==e?void 0:e.isDev)&&console.error("Investigate column problem.",o.schemaModel),"";o.schemaModel.column.rowDrag&&g(o.schemaModel.column.rowDrag,o.schemaModel)&&r.push(t("span",{class:m,onMouseDown:t=>{var e;return null===(e=o.dragStartCell)||void 0===e?void 0:e.emit({originalEvent:t,model:o.schemaModel})}},t("span",{class:w}))),r.push(`${p(o.schemaModel.model,o.schemaModel.column)}`)}return r}const D=({renderProps:e,cellProps:o})=>{const i=k.bind(null,e);return t("div",Object.assign({},o,{redraw:i}),i())};class T{constructor(){this.currentRange=null}selectionChange(t,e){if(this.currentRange&&e.forEach(((e,o)=>{var i;t&&o>=t.y&&o<=t.y1||e&&e.t instanceof HTMLElement&&e.t.classList.contains(L)&&(e.t.classList.remove(L),(null===(i=e.o)||void 0===i?void 0:i.class.includes(L))&&(e.o.class=e.o.class.replace(L,"")))})),t)for(let o=t.y;o<=t.y1;o++){const t=e.get(o);if(t&&t.t instanceof HTMLElement&&!t.t.classList.contains(L)){const e=t.o=t.o||{};e.class=(e.class||"")+" "+L,t.t.classList.add(L)}}this.currentRange=t}isRowFocused(t){return this.currentRange&&t>=this.currentRange.y&&t<=this.currentRange.y1}}const M=o(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.beforerowrender=r(this,"beforerowrender",7),this.afterrender=r(this,"afterrender",7),this.beforeCellRender=r(this,"beforecellrender",7),this.beforeDataRender=r(this,"beforedatarender",7),this.dragStartCell=r(this,"dragstartcell",7),this.jobsBeforeRender=[],this.renderedRows=new Map}async updateCell(t){var e,o,i;const r=null===(o=null===(e=this.renderedRows.get(t.row))||void 0===e?void 0:e.i)||void 0===o?void 0:o[t.col];if(null===(i=null==r?void 0:r.o)||void 0===i?void 0:i.redraw){const t=await(n=this.element,s=r.o.redraw,new Promise((t=>{const e=document.createElement("vnode-html");n.appendChild(e),e.redraw=s,e.addEventListener("html",(o=>{e.remove(),t(o.detail)}))})));r.t.innerHTML=t.html,r.l=Math.random()}var n,s}onDataStoreChange(){this.onStoreChange()}onColDataChange(){this.onStoreChange()}onStoreChange(){var t,e;null===(t=this.columnService)||void 0===t||t.destroy(),this.columnService=new v(this.dataStore,this.colData),this.providers={type:this.type,colType:this.colType,readonly:this.readonly,data:this.dataStore,columns:this.colData,viewport:this.viewportCol,dimension:this.dimensionRow,selection:this.rowSelectionStore},null===(e=this.rangeUnsubscribe)||void 0===e||e.call(this),this.rangeUnsubscribe=this.rowSelectionStore.onChange("range",(t=>this.rowHighlightPlugin.selectionChange(t,this.renderedRows)))}connectedCallback(){this.rowHighlightPlugin=new T,this.onStoreChange()}disconnectedCallback(){var t,e;null===(t=this.columnService)||void 0===t||t.destroy(),null===(e=this.rangeUnsubscribe)||void 0===e||e.call(this)}async componentWillRender(){return this.beforeDataRender.emit({rowType:this.type,colType:this.colType}),Promise.all(this.jobsBeforeRender.map((t=>"function"==typeof t?t():t)))}componentDidRender(){this.afterrender.emit({type:this.type})}render(){if(this.renderedRows=new Map,!this.columnService.columns.length)return;const e=this.viewportRow.get("items");if(!e.length)return;const o=this.viewportCol.get("items");if(!o.length)return;const i=[],r=this.dataStore.get("groupingDepth"),s=this.dataStore.get("groupingCustomRenderer"),a=this.columnService.hasGrouping?r:0;for(let r of e){const e=f(this.dataStore,r.itemIndex);if(C(e)){const n=Object.assign(Object.assign({},r),{index:r.itemIndex,model:e,groupingCustomRenderer:s,hasExpand:this.columnService.hasGrouping&&"rowHeaders"!==this.colType,columnItems:o,providers:this.providers});i.push(t(R,Object.assign({},n)));continue}const n=[];for(let e of o){const o=Object.assign(Object.assign({},this.columnService.rowDataModel(r.itemIndex,e.itemIndex)),{providers:this.providers}),i=this.triggerBeforeCellRender(o,r,e);if(i.defaultPrevented)continue;const{detail:{column:s,row:l,model:d}}=i,c={[x]:s.itemIndex,[u]:l.itemIndex,style:{width:`${s.size}px`,transform:`translateX(${s.start}px)`,height:l.size?`${l.size}px`:void 0}};a&&!s.itemIndex&&c.style&&(c.style.paddingLeft=10*a+"px");const h=this.columnService.mergeProperties(l.itemIndex,s.itemIndex,c,d),g=t(D,{renderProps:{schemaModel:d,additionalData:this.additionalData,dragStartCell:this.dragStartCell},cellProps:h});n.push(g)}let l=this.rowClass?this.columnService.getRowClass(r.itemIndex,this.rowClass):"";this.rowHighlightPlugin.isRowFocused(r.itemIndex)&&(l+=` ${L}`);const d=t(y,{index:r.itemIndex,rowClass:l,size:r.size,start:r.start},n);this.beforerowrender.emit({node:d,item:r,model:e,colType:this.columnService.type,rowType:this.type}),i.push(d),this.renderedRows.set(r.itemIndex,d)}return t(n,null,t("slot",null),i)}triggerBeforeCellRender(t,e,o){return this.beforeCellRender.emit({column:o,row:e,model:t,rowType:t.type,colType:t.colType})}get element(){return this}static get watchers(){return{dataStore:[{onDataStoreChange:0}],colData:[{onColDataChange:0}]}}static get style(){return".revo-drag-icon{width:11px;opacity:0.8}.revo-drag-icon::before{content:\"::\";display:inline-block}.revo-alt-icon{-webkit-mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 384 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M192.4375,383 C197.424479,383 201.663411,381.254557 205.154297,377.763672 L205.154297,377.763672 L264.25,318.667969 C270.234375,312.683594 271.605794,306.075846 268.364258,298.844727 C265.122721,291.613607 259.51237,287.998047 251.533203,287.998047 L251.533203,287.998047 L213.382812,287.998047 L213.382812,212.445312 L288.935547,212.445312 L288.935547,250.595703 C288.935547,258.57487 292.551107,264.185221 299.782227,267.426758 C307.013346,270.668294 313.621094,269.296875 319.605469,263.3125 L319.605469,263.3125 L378.701172,204.216797 C382.192057,200.725911 383.9375,196.486979 383.9375,191.5 C383.9375,186.513021 382.192057,182.274089 378.701172,178.783203 L378.701172,178.783203 L319.605469,119.6875 C313.621094,114.201823 307.013346,112.955078 299.782227,115.947266 C292.551107,118.939453 288.935547,124.42513 288.935547,132.404297 L288.935547,132.404297 L288.935547,170.554688 L213.382812,170.554688 L213.382812,95.0019531 L251.533203,95.0019531 C259.51237,95.0019531 264.998047,91.3863932 267.990234,84.1552734 C270.982422,76.9241536 269.735677,70.3164062 264.25,64.3320312 L264.25,64.3320312 L205.154297,5.23632812 C201.663411,1.74544271 197.424479,0 192.4375,0 C187.450521,0 183.211589,1.74544271 179.720703,5.23632812 L179.720703,5.23632812 L120.625,64.3320312 C114.640625,70.3164062 113.269206,76.9241536 116.510742,84.1552734 C119.752279,91.3863932 125.36263,95.0019531 133.341797,95.0019531 L133.341797,95.0019531 L171.492188,95.0019531 L171.492188,170.554688 L95.9394531,170.554688 L95.9394531,132.404297 C95.9394531,124.42513 92.3238932,118.814779 85.0927734,115.573242 C77.8616536,112.331706 71.2539062,113.703125 65.2695312,119.6875 L65.2695312,119.6875 L6.17382812,178.783203 C2.68294271,182.274089 0.9375,186.513021 0.9375,191.5 C0.9375,196.486979 2.68294271,200.725911 6.17382812,204.216797 L6.17382812,204.216797 L65.2695312,263.3125 C71.2539062,268.798177 77.8616536,270.044922 85.0927734,267.052734 C92.3238932,264.060547 95.9394531,258.57487 95.9394531,250.595703 L95.9394531,250.595703 L95.9394531,212.445312 L171.492188,212.445312 L171.492188,287.998047 L133.341797,287.998047 C125.36263,287.998047 119.876953,291.613607 116.884766,298.844727 C113.892578,306.075846 115.139323,312.683594 120.625,318.667969 L120.625,318.667969 L179.720703,377.763672 C183.211589,381.254557 187.450521,383 192.4375,383 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 384 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M192.4375,383 C197.424479,383 201.663411,381.254557 205.154297,377.763672 L205.154297,377.763672 L264.25,318.667969 C270.234375,312.683594 271.605794,306.075846 268.364258,298.844727 C265.122721,291.613607 259.51237,287.998047 251.533203,287.998047 L251.533203,287.998047 L213.382812,287.998047 L213.382812,212.445312 L288.935547,212.445312 L288.935547,250.595703 C288.935547,258.57487 292.551107,264.185221 299.782227,267.426758 C307.013346,270.668294 313.621094,269.296875 319.605469,263.3125 L319.605469,263.3125 L378.701172,204.216797 C382.192057,200.725911 383.9375,196.486979 383.9375,191.5 C383.9375,186.513021 382.192057,182.274089 378.701172,178.783203 L378.701172,178.783203 L319.605469,119.6875 C313.621094,114.201823 307.013346,112.955078 299.782227,115.947266 C292.551107,118.939453 288.935547,124.42513 288.935547,132.404297 L288.935547,132.404297 L288.935547,170.554688 L213.382812,170.554688 L213.382812,95.0019531 L251.533203,95.0019531 C259.51237,95.0019531 264.998047,91.3863932 267.990234,84.1552734 C270.982422,76.9241536 269.735677,70.3164062 264.25,64.3320312 L264.25,64.3320312 L205.154297,5.23632812 C201.663411,1.74544271 197.424479,0 192.4375,0 C187.450521,0 183.211589,1.74544271 179.720703,5.23632812 L179.720703,5.23632812 L120.625,64.3320312 C114.640625,70.3164062 113.269206,76.9241536 116.510742,84.1552734 C119.752279,91.3863932 125.36263,95.0019531 133.341797,95.0019531 L133.341797,95.0019531 L171.492188,95.0019531 L171.492188,170.554688 L95.9394531,170.554688 L95.9394531,132.404297 C95.9394531,124.42513 92.3238932,118.814779 85.0927734,115.573242 C77.8616536,112.331706 71.2539062,113.703125 65.2695312,119.6875 L65.2695312,119.6875 L6.17382812,178.783203 C2.68294271,182.274089 0.9375,186.513021 0.9375,191.5 C0.9375,196.486979 2.68294271,200.725911 6.17382812,204.216797 L6.17382812,204.216797 L65.2695312,263.3125 C71.2539062,268.798177 77.8616536,270.044922 85.0927734,267.052734 C92.3238932,264.060547 95.9394531,258.57487 95.9394531,250.595703 L95.9394531,250.595703 L95.9394531,212.445312 L171.492188,212.445312 L171.492188,287.998047 L133.341797,287.998047 C125.36263,287.998047 119.876953,291.613607 116.884766,298.844727 C113.892578,306.075846 115.139323,312.683594 120.625,318.667969 L120.625,318.667969 L179.720703,377.763672 C183.211589,381.254557 187.450521,383 192.4375,383 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");width:11px;height:11px;background-size:cover;background-repeat:no-repeat}.arrow-down{position:absolute;right:5px;top:0}.arrow-down svg{width:8px;margin-top:5px;margin-left:5px;opacity:0.4}.cell-value-wrapper{margin-right:10px;overflow:hidden;text-overflow:ellipsis}revogr-data{display:block;width:100%;position:relative}revogr-data .rgRow{position:absolute;width:100%;left:0}revogr-data .rgRow.groupingRow{font-weight:600;text-align:left}revogr-data .rgRow.groupingRow .group-expand{width:25px;height:100%;max-height:25px;margin-right:2px;background-color:transparent;border-color:transparent;vertical-align:middle;padding-left:5px;display:inline-flex}revogr-data .rgRow.groupingRow .group-expand svg{width:7px}revogr-data .revo-draggable{border:none;height:32px;display:inline-flex;outline:0;padding:0;font-size:0.8125rem;box-sizing:border-box;align-items:center;white-space:nowrap;vertical-align:middle;justify-content:center;text-decoration:none;width:24px;height:100%;cursor:pointer;display:inline-flex}revogr-data .revo-draggable:hover>.revo-drag-icon{opacity:1;zoom:1.2;font-weight:600}revogr-data .revo-draggable>.revo-drag-icon{pointer-events:none;transition:opacity 300ms cubic-bezier(0.4, 0, 0.2, 1) 0ms, zoom 300ms cubic-bezier(0.4, 0, 0.2, 1) 0ms}revogr-data .rgCell{top:0;left:0;position:absolute;box-sizing:border-box;height:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;outline:none}revogr-data .rgCell.align-center{text-align:center}revogr-data .rgCell.align-left{text-align:left}revogr-data .rgCell.align-right{text-align:right}"}},[260,"revogr-data",{readonly:[4],range:[4],rowClass:[1,"row-class"],additionalData:[8,"additional-data"],rowSelectionStore:[16],viewportRow:[16],viewportCol:[16],dimensionRow:[16],colData:[16],dataStore:[16],type:[513],colType:[513,"col-type"],jobsBeforeRender:[16],providers:[32],updateCell:[64]},void 0,{dataStore:[{onDataStoreChange:0}],colData:[{onColDataChange:0}]}]);function O(){"undefined"!=typeof customElements&&["revogr-data","vnode-html"].forEach((t=>{switch(t){case"revogr-data":customElements.get(s(t))||customElements.define(s(t),M);break;case"vnode-html":customElements.get(s(t))||b()}}))}export{D as C,R as G,M as R,j as a,O as d,E as e}
|
|
4
|
+
import{h as t,Build as e,proxyCustomElement as o,HTMLElement as i,createEvent as r,Host as n,transformTag as s}from"@stencil/core/internal/client";import{l as a,m as l,G as d,h as c,P as h,O as g,B as p,M as v,u}from"./column.service.js";import{a as C,h as m,g as w,l as L,D as x}from"./consts.js";import{b as f}from"./data.store.js";import"./platform.js";import{d as b}from"./vnode-converter.js";const y=({rowClass:e,index:o,size:i,start:r,depth:n,groupingLevel:s},a)=>{const l=Object.assign({[C]:o},"number"==typeof s?{"data-level":s}:{});return t("div",Object.assign({},l,{class:`rgRow ${e||""}`,style:{height:`${i}px`,transform:`translateY(${r}px)`,paddingLeft:n?10*n+"px":void 0}}),a)};function E(t,e,o){var i;const r=new CustomEvent(l,{detail:{model:e,virtualIndex:o},cancelable:!0,bubbles:!0});null===(i=t.target)||void 0===i||i.dispatchEvent(r)}const R=e=>{const{model:o,itemIndex:i,hasExpand:r,groupingCustomRenderer:n}=e,s=o[h],l=o[c],g=parseInt(o[d],10)||0;return t(y,Object.assign({},e,{rowClass:"groupingRow",depth:g}),n?t("div",{onClick:t=>E(t,o,i)},n(t,Object.assign(Object.assign({},e),{colType:e.providers.colType,name:s,expanded:l,depth:g}))):r&&[t("button",{class:{[a]:!0},onClick:t=>E(t,o,i)},j(l)),s])},j=(e=!1)=>t("svg",{"aria-hidden":"true",style:{transform:`rotate(${e?0:-90}deg)`},focusable:"false",viewBox:"0 0 448 512"},t("path",{fill:"currentColor",d:"M207.029 381.476L12.686 187.132c-9.373-9.373-9.373-24.569 0-33.941l22.667-22.667c9.357-9.357 24.522-9.375 33.901-.04L224 284.505l154.745-154.021c9.379-9.335 24.544-9.317 33.901.04l22.667 22.667c9.373 9.373 9.373 24.569 0 33.941L240.971 381.476c-9.373 9.372-24.569 9.372-33.942 0z"}));function k(o){var i;const r=[],n=null===(i=o.schemaModel.column)||void 0===i?void 0:i.cellTemplate;if(n)r.push(n(t,o.schemaModel,o.additionalData));else{if(!o.schemaModel.column)return(null==e?void 0:e.isDev)&&console.error("Investigate column problem.",o.schemaModel),"";o.schemaModel.column.rowDrag&&g(o.schemaModel.column.rowDrag,o.schemaModel)&&r.push(t("span",{class:m,onMouseDown:t=>{var e;return null===(e=o.dragStartCell)||void 0===e?void 0:e.emit({originalEvent:t,model:o.schemaModel})}},t("span",{class:w}))),r.push(`${p(o.schemaModel.model,o.schemaModel.column)}`)}return r}const D=({renderProps:e,cellProps:o})=>{const i=k.bind(null,e);return t("div",Object.assign({},o,{redraw:i}),i())};class T{constructor(){this.currentRange=null}selectionChange(t,e){if(this.currentRange&&e.forEach(((e,o)=>{var i;t&&o>=t.y&&o<=t.y1||e&&e.t instanceof HTMLElement&&e.t.classList.contains(L)&&(e.t.classList.remove(L),(null===(i=e.o)||void 0===i?void 0:i.class.includes(L))&&(e.o.class=e.o.class.replace(L,"")))})),t)for(let o=t.y;o<=t.y1;o++){const t=e.get(o);if(t&&t.t instanceof HTMLElement&&!t.t.classList.contains(L)){const e=t.o=t.o||{};e.class=(e.class||"")+" "+L,t.t.classList.add(L)}}this.currentRange=t}isRowFocused(t){return this.currentRange&&t>=this.currentRange.y&&t<=this.currentRange.y1}}const M=o(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.beforerowrender=r(this,"beforerowrender",7),this.afterrender=r(this,"afterrender",7),this.beforeCellRender=r(this,"beforecellrender",7),this.beforeDataRender=r(this,"beforedatarender",7),this.dragStartCell=r(this,"dragstartcell",7),this.jobsBeforeRender=[],this.renderedRows=new Map}async updateCell(t){var e,o,i;const r=null===(o=null===(e=this.renderedRows.get(t.row))||void 0===e?void 0:e.i)||void 0===o?void 0:o[t.col];if(null===(i=null==r?void 0:r.o)||void 0===i?void 0:i.redraw){const t=await(n=this.element,s=r.o.redraw,new Promise((t=>{const e=document.createElement("vnode-html");n.appendChild(e),e.redraw=s,e.addEventListener("html",(o=>{e.remove(),t(o.detail)}))})));r.t.innerHTML=t.html,r.l=Math.random()}var n,s}onDataStoreChange(){this.onStoreChange()}onColDataChange(){this.onStoreChange()}onStoreChange(){var t,e;null===(t=this.columnService)||void 0===t||t.destroy(),this.columnService=new v(this.dataStore,this.colData),this.providers={type:this.type,colType:this.colType,readonly:this.readonly,data:this.dataStore,columns:this.colData,viewport:this.viewportCol,dimension:this.dimensionRow,selection:this.rowSelectionStore},null===(e=this.rangeUnsubscribe)||void 0===e||e.call(this),this.rangeUnsubscribe=this.rowSelectionStore.onChange("range",(t=>this.rowHighlightPlugin.selectionChange(t,this.renderedRows)))}connectedCallback(){this.rowHighlightPlugin=new T,this.onStoreChange()}disconnectedCallback(){var t,e;null===(t=this.columnService)||void 0===t||t.destroy(),null===(e=this.rangeUnsubscribe)||void 0===e||e.call(this)}async componentWillRender(){return this.beforeDataRender.emit({rowType:this.type,colType:this.colType}),Promise.all(this.jobsBeforeRender.map((t=>"function"==typeof t?t():t)))}componentDidRender(){this.afterrender.emit({type:this.type})}render(){if(this.renderedRows=new Map,!this.columnService.columns.length)return;const e=this.viewportRow.get("items");if(!e.length)return;const o=this.viewportCol.get("items");if(!o.length)return;const i=[],r=this.dataStore.get("groupingDepth"),s=this.dataStore.get("groupingCustomRenderer"),a=this.columnService.hasGrouping?r:0;for(let r of e){const e=f(this.dataStore,r.itemIndex);if(u(e)){const n=Object.assign(Object.assign({},r),{index:r.itemIndex,model:e,groupingCustomRenderer:s,hasExpand:this.columnService.hasGrouping&&"rowHeaders"!==this.colType,columnItems:o,providers:this.providers});i.push(t(R,Object.assign({},n)));continue}const n=[];for(let e of o){const o=Object.assign(Object.assign({},this.columnService.rowDataModel(r.itemIndex,e.itemIndex)),{providers:this.providers}),i=this.triggerBeforeCellRender(o,r,e);if(i.defaultPrevented)continue;const{detail:{column:s,row:l,model:d}}=i,c={[x]:s.itemIndex,[C]:l.itemIndex,style:{width:`${s.size}px`,transform:`translateX(${s.start}px)`,height:l.size?`${l.size}px`:void 0}};a&&!s.itemIndex&&c.style&&(c.style.paddingLeft=10*a+"px");const h=this.columnService.mergeProperties(l.itemIndex,s.itemIndex,c,d),g=t(D,{renderProps:{schemaModel:d,additionalData:this.additionalData,dragStartCell:this.dragStartCell},cellProps:h});n.push(g)}let l=this.rowClass?this.columnService.getRowClass(r.itemIndex,this.rowClass):"";this.rowHighlightPlugin.isRowFocused(r.itemIndex)&&(l+=` ${L}`);const d=t(y,{index:r.itemIndex,rowClass:l,size:r.size,start:r.start,groupingLevel:a||void 0},n);this.beforerowrender.emit({node:d,item:r,model:e,colType:this.columnService.type,rowType:this.type}),i.push(d),this.renderedRows.set(r.itemIndex,d)}return t(n,null,t("slot",null),i)}triggerBeforeCellRender(t,e,o){return this.beforeCellRender.emit({column:o,row:e,model:t,rowType:t.type,colType:t.colType})}get element(){return this}static get watchers(){return{dataStore:[{onDataStoreChange:0}],colData:[{onColDataChange:0}]}}static get style(){return".revo-drag-icon{width:11px;opacity:0.8}.revo-drag-icon::before{content:\"::\";display:inline-block}.revo-alt-icon{-webkit-mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 384 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M192.4375,383 C197.424479,383 201.663411,381.254557 205.154297,377.763672 L205.154297,377.763672 L264.25,318.667969 C270.234375,312.683594 271.605794,306.075846 268.364258,298.844727 C265.122721,291.613607 259.51237,287.998047 251.533203,287.998047 L251.533203,287.998047 L213.382812,287.998047 L213.382812,212.445312 L288.935547,212.445312 L288.935547,250.595703 C288.935547,258.57487 292.551107,264.185221 299.782227,267.426758 C307.013346,270.668294 313.621094,269.296875 319.605469,263.3125 L319.605469,263.3125 L378.701172,204.216797 C382.192057,200.725911 383.9375,196.486979 383.9375,191.5 C383.9375,186.513021 382.192057,182.274089 378.701172,178.783203 L378.701172,178.783203 L319.605469,119.6875 C313.621094,114.201823 307.013346,112.955078 299.782227,115.947266 C292.551107,118.939453 288.935547,124.42513 288.935547,132.404297 L288.935547,132.404297 L288.935547,170.554688 L213.382812,170.554688 L213.382812,95.0019531 L251.533203,95.0019531 C259.51237,95.0019531 264.998047,91.3863932 267.990234,84.1552734 C270.982422,76.9241536 269.735677,70.3164062 264.25,64.3320312 L264.25,64.3320312 L205.154297,5.23632812 C201.663411,1.74544271 197.424479,0 192.4375,0 C187.450521,0 183.211589,1.74544271 179.720703,5.23632812 L179.720703,5.23632812 L120.625,64.3320312 C114.640625,70.3164062 113.269206,76.9241536 116.510742,84.1552734 C119.752279,91.3863932 125.36263,95.0019531 133.341797,95.0019531 L133.341797,95.0019531 L171.492188,95.0019531 L171.492188,170.554688 L95.9394531,170.554688 L95.9394531,132.404297 C95.9394531,124.42513 92.3238932,118.814779 85.0927734,115.573242 C77.8616536,112.331706 71.2539062,113.703125 65.2695312,119.6875 L65.2695312,119.6875 L6.17382812,178.783203 C2.68294271,182.274089 0.9375,186.513021 0.9375,191.5 C0.9375,196.486979 2.68294271,200.725911 6.17382812,204.216797 L6.17382812,204.216797 L65.2695312,263.3125 C71.2539062,268.798177 77.8616536,270.044922 85.0927734,267.052734 C92.3238932,264.060547 95.9394531,258.57487 95.9394531,250.595703 L95.9394531,250.595703 L95.9394531,212.445312 L171.492188,212.445312 L171.492188,287.998047 L133.341797,287.998047 C125.36263,287.998047 119.876953,291.613607 116.884766,298.844727 C113.892578,306.075846 115.139323,312.683594 120.625,318.667969 L120.625,318.667969 L179.720703,377.763672 C183.211589,381.254557 187.450521,383 192.4375,383 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 384 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M192.4375,383 C197.424479,383 201.663411,381.254557 205.154297,377.763672 L205.154297,377.763672 L264.25,318.667969 C270.234375,312.683594 271.605794,306.075846 268.364258,298.844727 C265.122721,291.613607 259.51237,287.998047 251.533203,287.998047 L251.533203,287.998047 L213.382812,287.998047 L213.382812,212.445312 L288.935547,212.445312 L288.935547,250.595703 C288.935547,258.57487 292.551107,264.185221 299.782227,267.426758 C307.013346,270.668294 313.621094,269.296875 319.605469,263.3125 L319.605469,263.3125 L378.701172,204.216797 C382.192057,200.725911 383.9375,196.486979 383.9375,191.5 C383.9375,186.513021 382.192057,182.274089 378.701172,178.783203 L378.701172,178.783203 L319.605469,119.6875 C313.621094,114.201823 307.013346,112.955078 299.782227,115.947266 C292.551107,118.939453 288.935547,124.42513 288.935547,132.404297 L288.935547,132.404297 L288.935547,170.554688 L213.382812,170.554688 L213.382812,95.0019531 L251.533203,95.0019531 C259.51237,95.0019531 264.998047,91.3863932 267.990234,84.1552734 C270.982422,76.9241536 269.735677,70.3164062 264.25,64.3320312 L264.25,64.3320312 L205.154297,5.23632812 C201.663411,1.74544271 197.424479,0 192.4375,0 C187.450521,0 183.211589,1.74544271 179.720703,5.23632812 L179.720703,5.23632812 L120.625,64.3320312 C114.640625,70.3164062 113.269206,76.9241536 116.510742,84.1552734 C119.752279,91.3863932 125.36263,95.0019531 133.341797,95.0019531 L133.341797,95.0019531 L171.492188,95.0019531 L171.492188,170.554688 L95.9394531,170.554688 L95.9394531,132.404297 C95.9394531,124.42513 92.3238932,118.814779 85.0927734,115.573242 C77.8616536,112.331706 71.2539062,113.703125 65.2695312,119.6875 L65.2695312,119.6875 L6.17382812,178.783203 C2.68294271,182.274089 0.9375,186.513021 0.9375,191.5 C0.9375,196.486979 2.68294271,200.725911 6.17382812,204.216797 L6.17382812,204.216797 L65.2695312,263.3125 C71.2539062,268.798177 77.8616536,270.044922 85.0927734,267.052734 C92.3238932,264.060547 95.9394531,258.57487 95.9394531,250.595703 L95.9394531,250.595703 L95.9394531,212.445312 L171.492188,212.445312 L171.492188,287.998047 L133.341797,287.998047 C125.36263,287.998047 119.876953,291.613607 116.884766,298.844727 C113.892578,306.075846 115.139323,312.683594 120.625,318.667969 L120.625,318.667969 L179.720703,377.763672 C183.211589,381.254557 187.450521,383 192.4375,383 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");width:11px;height:11px;background-size:cover;background-repeat:no-repeat}.arrow-down{position:absolute;right:5px;top:0}.arrow-down svg{width:8px;margin-top:5px;margin-left:5px;opacity:0.4}.cell-value-wrapper{margin-right:10px;overflow:hidden;text-overflow:ellipsis}revogr-data{display:block;width:100%;position:relative}revogr-data .rgRow{position:absolute;width:100%;left:0}revogr-data .rgRow.groupingRow{font-weight:600;text-align:left}revogr-data .rgRow.groupingRow .group-expand{width:25px;height:100%;max-height:25px;margin-right:2px;background-color:transparent;border-color:transparent;vertical-align:middle;padding-left:5px;display:inline-flex}revogr-data .rgRow.groupingRow .group-expand svg{width:7px}revogr-data .revo-draggable{border:none;height:32px;display:inline-flex;outline:0;padding:0;font-size:0.8125rem;box-sizing:border-box;align-items:center;white-space:nowrap;vertical-align:middle;justify-content:center;text-decoration:none;width:24px;height:100%;cursor:pointer;display:inline-flex}revogr-data .revo-draggable:hover>.revo-drag-icon{opacity:1;zoom:1.2;font-weight:600}revogr-data .revo-draggable>.revo-drag-icon{pointer-events:none;transition:opacity 300ms cubic-bezier(0.4, 0, 0.2, 1) 0ms, zoom 300ms cubic-bezier(0.4, 0, 0.2, 1) 0ms}revogr-data .rgCell{top:0;left:0;position:absolute;box-sizing:border-box;height:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;outline:none}revogr-data .rgCell.align-center{text-align:center}revogr-data .rgCell.align-left{text-align:left}revogr-data .rgCell.align-right{text-align:right}"}},[260,"revogr-data",{readonly:[4],range:[4],rowClass:[1,"row-class"],additionalData:[8,"additional-data"],rowSelectionStore:[16],viewportRow:[16],viewportCol:[16],dimensionRow:[16],colData:[16],dataStore:[16],type:[513],colType:[513,"col-type"],jobsBeforeRender:[16],providers:[32],updateCell:[64]},void 0,{dataStore:[{onDataStoreChange:0}],colData:[{onColDataChange:0}]}]);function O(){"undefined"!=typeof customElements&&["revogr-data","vnode-html"].forEach((t=>{switch(t){case"revogr-data":customElements.get(s(t))||customElements.define(s(t),M);break;case"vnode-html":customElements.get(s(t))||b()}}))}export{D as C,R as G,M as R,j as a,O as d,E as e}
|