@revolist/revogrid 4.14.1 → 4.14.2
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/{column.drag.plugin-c61efe93.js → column.drag.plugin-911acec7.js} +52 -28
- package/dist/cjs/column.drag.plugin-911acec7.js.map +1 -0
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/revo-grid.cjs.entry.js +20 -50
- package/dist/cjs/revo-grid.cjs.entry.js.map +1 -1
- package/dist/collection/components/revoGrid/revo-grid.js +42 -42
- package/dist/collection/components/revoGrid/revo-grid.js.map +1 -1
- package/dist/collection/plugins/sorting/sorting.plugin.js +52 -27
- package/dist/collection/plugins/sorting/sorting.plugin.js.map +1 -1
- package/dist/collection/plugins/sorting/sorting.types.js.map +1 -1
- package/dist/collection/serve/controller.js +12 -0
- package/dist/collection/services/column.data.provider.js +0 -38
- package/dist/collection/services/column.data.provider.js.map +1 -1
- package/dist/esm/{column.drag.plugin-eb8f7e38.js → column.drag.plugin-a111b876.js} +53 -28
- package/dist/esm/column.drag.plugin-a111b876.js.map +1 -0
- package/dist/esm/index.js +2 -2
- package/dist/esm/revo-grid.entry.js +20 -50
- package/dist/esm/revo-grid.entry.js.map +1 -1
- package/dist/revo-grid/{column.drag.plugin-eb8f7e38.js → column.drag.plugin-a111b876.js} +53 -28
- package/dist/revo-grid/column.drag.plugin-a111b876.js.map +1 -0
- package/dist/revo-grid/index.esm.js +2 -2
- package/dist/revo-grid/revo-grid.entry.js +20 -50
- package/dist/revo-grid/revo-grid.entry.js.map +1 -1
- package/dist/types/components/revoGrid/revo-grid.d.ts +10 -7
- package/dist/types/components.d.ts +11 -12
- package/dist/types/plugins/sorting/sorting.plugin.d.ts +12 -4
- package/dist/types/plugins/sorting/sorting.types.d.ts +1 -0
- package/dist/types/services/column.data.provider.d.ts +0 -7
- package/hydrate/index.js +137 -142
- package/hydrate/index.mjs +137 -142
- package/package.json +1 -1
- package/readme.md +6 -0
- package/standalone/revo-grid.js +70 -75
- package/standalone/revo-grid.js.map +1 -1
- package/dist/cjs/column.drag.plugin-c61efe93.js.map +0 -1
- package/dist/esm/column.drag.plugin-eb8f7e38.js.map +0 -1
- package/dist/revo-grid/column.drag.plugin-eb8f7e38.js.map +0 -1
|
@@ -264,25 +264,29 @@ export class RevoGridComponent {
|
|
|
264
264
|
}
|
|
265
265
|
/**
|
|
266
266
|
* Update column sorting
|
|
267
|
-
* @param column -
|
|
268
|
-
* @param index - virtual column index
|
|
267
|
+
* @param column - column prop and cellCompare
|
|
269
268
|
* @param order - order to apply
|
|
270
269
|
* @param additive - if false will replace current order
|
|
270
|
+
*
|
|
271
|
+
* later passed to SortingPlugin
|
|
271
272
|
*/
|
|
272
|
-
async updateColumnSorting(column,
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
273
|
+
async updateColumnSorting(column, order, additive) {
|
|
274
|
+
this.sortingconfigchanged.emit({
|
|
275
|
+
columns: [{
|
|
276
|
+
prop: column.prop,
|
|
277
|
+
order,
|
|
278
|
+
cellCompare: column.cellCompare,
|
|
279
|
+
}],
|
|
280
|
+
additive,
|
|
281
|
+
});
|
|
277
282
|
}
|
|
278
283
|
/**
|
|
279
284
|
* Clears column sorting
|
|
280
285
|
*/
|
|
281
286
|
async clearSorting() {
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
}
|
|
285
|
-
this.columnProvider.clearSorting();
|
|
287
|
+
this.sortingconfigchanged.emit({
|
|
288
|
+
columns: [],
|
|
289
|
+
});
|
|
286
290
|
}
|
|
287
291
|
/**
|
|
288
292
|
* Receive all columns in data source
|
|
@@ -490,7 +494,10 @@ export class RevoGridComponent {
|
|
|
490
494
|
const columns = this.columnProvider.setColumns(beforeApplyEvent.detail);
|
|
491
495
|
this.aftercolumnsset.emit({
|
|
492
496
|
columns,
|
|
493
|
-
order:
|
|
497
|
+
order: Object.entries(beforeApplyEvent.detail.sort).reduce((acc, [prop, column]) => {
|
|
498
|
+
acc[prop] = column.order;
|
|
499
|
+
return acc;
|
|
500
|
+
}, {}),
|
|
494
501
|
});
|
|
495
502
|
}
|
|
496
503
|
disableVirtualXChanged(newVal = false, prevVal = false) {
|
|
@@ -1389,7 +1396,7 @@ export class RevoGridComponent {
|
|
|
1389
1396
|
"mutable": false,
|
|
1390
1397
|
"complexType": {
|
|
1391
1398
|
"original": "SortingConfig",
|
|
1392
|
-
"resolved": "undefined | { columns?: { prop: ColumnProp; order: Order; cellCompare?: CellCompareFunc | undefined; }[] | undefined; }",
|
|
1399
|
+
"resolved": "undefined | { columns?: { prop: ColumnProp; order: Order; cellCompare?: CellCompareFunc | undefined; }[] | undefined; additive?: boolean | undefined; }",
|
|
1393
1400
|
"references": {
|
|
1394
1401
|
"SortingConfig": {
|
|
1395
1402
|
"location": "import",
|
|
@@ -1402,7 +1409,7 @@ export class RevoGridComponent {
|
|
|
1402
1409
|
"optional": true,
|
|
1403
1410
|
"docs": {
|
|
1404
1411
|
"tags": [],
|
|
1405
|
-
"text": "Alternative way to set sorting.\n`{columns: [{prop: 'name', order: 'asc'}]}
|
|
1412
|
+
"text": "Alternative way to set sorting.\n`{columns: [{prop: 'name', order: 'asc'}]}`\nUse SortingPlugin to get current sorting state"
|
|
1406
1413
|
},
|
|
1407
1414
|
"getter": false,
|
|
1408
1415
|
"setter": false
|
|
@@ -1884,7 +1891,7 @@ export class RevoGridComponent {
|
|
|
1884
1891
|
"composed": true,
|
|
1885
1892
|
"docs": {
|
|
1886
1893
|
"tags": [],
|
|
1887
|
-
"text": "By `
|
|
1894
|
+
"text": "By `SortingPlugin`\n<br>Triggered immediately after header click.\n<br>First in sorting event sequence. Ff this event stops no other event called.\n<br>Use `e.preventDefault()` to prevent sorting."
|
|
1888
1895
|
},
|
|
1889
1896
|
"complexType": {
|
|
1890
1897
|
"original": "{\n column: ColumnRegular;\n order: 'desc' | 'asc';\n additive: boolean;\n }",
|
|
@@ -1905,7 +1912,7 @@ export class RevoGridComponent {
|
|
|
1905
1912
|
"composed": true,
|
|
1906
1913
|
"docs": {
|
|
1907
1914
|
"tags": [],
|
|
1908
|
-
"text": "By `
|
|
1915
|
+
"text": "By `SortingPlugin`\n<br>Same as `beforesorting` but triggered after `beforeanysource` (when source is changed).\n<br>Use `e.preventDefault()` to prevent sorting data change."
|
|
1909
1916
|
},
|
|
1910
1917
|
"complexType": {
|
|
1911
1918
|
"original": "{\n type: DimensionRows;\n sorting?: SortingOrder;\n }",
|
|
@@ -1931,7 +1938,7 @@ export class RevoGridComponent {
|
|
|
1931
1938
|
"composed": true,
|
|
1932
1939
|
"docs": {
|
|
1933
1940
|
"tags": [],
|
|
1934
|
-
"text": "By `
|
|
1941
|
+
"text": "By `SortingPlugin`\n<br> After `beforesorting`\n<br>Triggered after column data updated with new sorting order.\n<br>Use `e.preventDefault()` to prevent sorting data change."
|
|
1935
1942
|
},
|
|
1936
1943
|
"complexType": {
|
|
1937
1944
|
"original": "{\n column: ColumnRegular;\n order: 'desc' | 'asc';\n additive: boolean;\n }",
|
|
@@ -2185,22 +2192,18 @@ export class RevoGridComponent {
|
|
|
2185
2192
|
"text": "Column updated"
|
|
2186
2193
|
},
|
|
2187
2194
|
"complexType": {
|
|
2188
|
-
"original": "{\n columns: ColumnCollection;\n order:
|
|
2189
|
-
"resolved": "{ columns: ColumnCollection; order:
|
|
2195
|
+
"original": "{\n columns: ColumnCollection;\n order: SortingOrder;\n }",
|
|
2196
|
+
"resolved": "{ columns: ColumnCollection; order: SortingOrder; }",
|
|
2190
2197
|
"references": {
|
|
2191
2198
|
"ColumnCollection": {
|
|
2192
2199
|
"location": "import",
|
|
2193
2200
|
"path": "../../utils/column.utils",
|
|
2194
2201
|
"id": "src/utils/column.utils.ts::ColumnCollection"
|
|
2195
2202
|
},
|
|
2196
|
-
"
|
|
2197
|
-
"location": "global",
|
|
2198
|
-
"id": "global::Record"
|
|
2199
|
-
},
|
|
2200
|
-
"ColumnProp": {
|
|
2203
|
+
"SortingOrder": {
|
|
2201
2204
|
"location": "import",
|
|
2202
|
-
"path": "
|
|
2203
|
-
"id": "src/
|
|
2205
|
+
"path": "../../plugins",
|
|
2206
|
+
"id": "src/plugins/index.ts::SortingOrder"
|
|
2204
2207
|
}
|
|
2205
2208
|
}
|
|
2206
2209
|
}
|
|
@@ -2421,11 +2424,11 @@ export class RevoGridComponent {
|
|
|
2421
2424
|
"composed": true,
|
|
2422
2425
|
"docs": {
|
|
2423
2426
|
"tags": [],
|
|
2424
|
-
"text": "Emitted when the sorting configuration is changed"
|
|
2427
|
+
"text": "Emitted when the sorting configuration is changed\nSortingPlugin subsribed to this event"
|
|
2425
2428
|
},
|
|
2426
2429
|
"complexType": {
|
|
2427
2430
|
"original": "SortingConfig",
|
|
2428
|
-
"resolved": "{ columns?: { prop: ColumnProp; order: Order; cellCompare?: CellCompareFunc | undefined; }[] | undefined; }",
|
|
2431
|
+
"resolved": "{ columns?: { prop: ColumnProp; order: Order; cellCompare?: CellCompareFunc | undefined; }[] | undefined; additive?: boolean | undefined; }",
|
|
2429
2432
|
"references": {
|
|
2430
2433
|
"SortingConfig": {
|
|
2431
2434
|
"location": "import",
|
|
@@ -3010,15 +3013,11 @@ export class RevoGridComponent {
|
|
|
3010
3013
|
},
|
|
3011
3014
|
"updateColumnSorting": {
|
|
3012
3015
|
"complexType": {
|
|
3013
|
-
"signature": "(column: ColumnRegular,
|
|
3016
|
+
"signature": "(column: Pick<ColumnRegular, \"prop\" | \"cellCompare\">, order: \"asc\" | \"desc\" | undefined, additive: boolean) => Promise<void>",
|
|
3014
3017
|
"parameters": [{
|
|
3015
3018
|
"name": "column",
|
|
3016
|
-
"type": "
|
|
3017
|
-
"docs": "-
|
|
3018
|
-
}, {
|
|
3019
|
-
"name": "index",
|
|
3020
|
-
"type": "number",
|
|
3021
|
-
"docs": "- virtual column index"
|
|
3019
|
+
"type": "{ prop: ColumnProp; cellCompare?: CellCompareFunc | undefined; }",
|
|
3020
|
+
"docs": "- column prop and cellCompare"
|
|
3022
3021
|
}, {
|
|
3023
3022
|
"name": "order",
|
|
3024
3023
|
"type": "\"asc\" | \"desc\" | undefined",
|
|
@@ -3026,35 +3025,36 @@ export class RevoGridComponent {
|
|
|
3026
3025
|
}, {
|
|
3027
3026
|
"name": "additive",
|
|
3028
3027
|
"type": "boolean",
|
|
3029
|
-
"docs": "- if false will replace current order"
|
|
3028
|
+
"docs": "- if false will replace current order\n\nlater passed to SortingPlugin"
|
|
3030
3029
|
}],
|
|
3031
3030
|
"references": {
|
|
3032
3031
|
"Promise": {
|
|
3033
3032
|
"location": "global",
|
|
3034
3033
|
"id": "global::Promise"
|
|
3035
3034
|
},
|
|
3035
|
+
"Pick": {
|
|
3036
|
+
"location": "global",
|
|
3037
|
+
"id": "global::Pick"
|
|
3038
|
+
},
|
|
3036
3039
|
"ColumnRegular": {
|
|
3037
3040
|
"location": "import",
|
|
3038
3041
|
"path": "@type",
|
|
3039
3042
|
"id": "src/types/index.ts::ColumnRegular"
|
|
3040
3043
|
}
|
|
3041
3044
|
},
|
|
3042
|
-
"return": "Promise<
|
|
3045
|
+
"return": "Promise<void>"
|
|
3043
3046
|
},
|
|
3044
3047
|
"docs": {
|
|
3045
3048
|
"text": "Update column sorting",
|
|
3046
3049
|
"tags": [{
|
|
3047
3050
|
"name": "param",
|
|
3048
|
-
"text": "column -
|
|
3049
|
-
}, {
|
|
3050
|
-
"name": "param",
|
|
3051
|
-
"text": "index - virtual column index"
|
|
3051
|
+
"text": "column - column prop and cellCompare"
|
|
3052
3052
|
}, {
|
|
3053
3053
|
"name": "param",
|
|
3054
3054
|
"text": "order - order to apply"
|
|
3055
3055
|
}, {
|
|
3056
3056
|
"name": "param",
|
|
3057
|
-
"text": "additive - if false will replace current order"
|
|
3057
|
+
"text": "additive - if false will replace current order\n\nlater passed to SortingPlugin"
|
|
3058
3058
|
}]
|
|
3059
3059
|
}
|
|
3060
3060
|
},
|