@genesislcap/grid-pro 14.381.1 → 14.382.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -11399,6 +11399,12 @@
|
|
|
11399
11399
|
"type": {
|
|
11400
11400
|
"text": "IndexDetail[]"
|
|
11401
11401
|
}
|
|
11402
|
+
},
|
|
11403
|
+
{
|
|
11404
|
+
"name": "availableSortableFields",
|
|
11405
|
+
"type": {
|
|
11406
|
+
"text": "string[]"
|
|
11407
|
+
}
|
|
11402
11408
|
}
|
|
11403
11409
|
]
|
|
11404
11410
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server-side.datasource.d.ts","sourceRoot":"","sources":["../../../src/datasource/server-side.datasource.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,UAAU,EACV,iBAAiB,EAYlB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAEL,cAAc,EAEf,MAAM,+BAA+B,CAAC;AAUvC,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;;;;;;;kBAsDhD,CAAC;;;;;;;;8BAmCgE,CAAC,cAC9D,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;yBAgCC,CAAC;4IAKH,CAAH;wFAMI,CAAC;+IAQK,CAAC;2FAEL,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BA8ByD,CAAA;;;;;;;;;;;;;;;;;;;;;;;mBAwExC,CAAC;;;;;;;;;;;;;6BAmBZ,CAAC;8BACiC,CAAC;kBACnC,CAAC;;oBAEL,CAAN;;sBAKI,CAAH;oBACG,CAAD;;;;;;;;
|
|
1
|
+
{"version":3,"file":"server-side.datasource.d.ts","sourceRoot":"","sources":["../../../src/datasource/server-side.datasource.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,UAAU,EACV,iBAAiB,EAYlB,MAAM,+BAA+B,CAAC;A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AU,GAAG,SAAS,CAAC;IAE3D,OAAO,EAAE,GAAG,CAAM;IAE9B,OAAO,CAAC,OAAO,CAAwB;IACvC,OAAO,CAAC,cAAc,CAA8D;IACpF,OAAO,CAAC,iBAAiB,CAAqB;IAC9C,OAAO,CAAC,uBAAuB,CAA6B;IAE5D,mBAAmB,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM;IAOtD,eAAe,CAAC,WAAW,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM;IAaxD,iBAAiB;IAUjB,oBAAoB;IAUX,SAAS,IAAI,IAAI;IAO1B;;;;OAIG;IACG,kBAAkB,CAAC,MAAM,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC;IAsCnE;;;OAGG;IACH,OAAO,CAAC,mCAAmC;IAc3C;;;OAGG;IACH,OAAO,CAAC,oCAAoC;IAWtC,IAAI;IAmIV,mBAAmB,CAAC,KAAK,EAAE,GAAG;IAMf,OAAO;IAmBP,OAAO;IAKtB,OAAO,CAAC,YAAY;IAmBpB,OAAO,CAAC,kBAAkB;YAgDZ,mBAAmB;IAKjC;;;;;;;;;;;;OAYG;YACW,kBAAkB;IA+BhC;;;;;;OAMG;IACH,OAAO,CAAC,kBAAkB,CAA+B;IAEzD;;;;;;OAMG;IACI,uBAAuB;IAK9B;;;;;;;;;;;OAWG;IACH,OAAO,CAAC,wBAAwB;YAqElB,sBAAsB;YAoDtB,eAAe;IAmBpB,gBAAgB,CAAC,WAAW,EAAE,GAAG,GAAG,GAAG;IAIvC,QAAQ;CAGlB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __awaiter, __decorate } from "tslib";
|
|
2
|
-
import { dataServerResultFilter, Datasource, MessageType, normaliseCriteria,
|
|
2
|
+
import { dataServerResultFilter, Datasource, MessageType, normaliseCriteria, toFieldMetadata, } from '@genesislcap/foundation-comms';
|
|
3
3
|
import { insertDocumentCSSRule, JSONSerializer, LifecycleMixin, } from '@genesislcap/foundation-utils';
|
|
4
4
|
import { attr, customElement, DOM, observable } from '@microsoft/fast-element';
|
|
5
5
|
import { gridProGenesisDatasourceEventNames } from '../grid-pro-genesis-datasource';
|
|
@@ -231,7 +231,7 @@ let GridProServerSideDatasource = class GridProServerSideDatasource extends Life
|
|
|
231
231
|
}
|
|
232
232
|
this.$emit(gridProGenesisDatasourceEventNames.dataInit);
|
|
233
233
|
this.setDisconnected(false);
|
|
234
|
-
this.indexes = this.getResourceIndexes(this.datasource.availableIndexes);
|
|
234
|
+
this.indexes = this.getResourceIndexes(this.datasource.availableIndexes, this.datasource.availableSortableFields);
|
|
235
235
|
const fieldMetadata = toFieldMetadata(this.datasource.originalFieldDef);
|
|
236
236
|
const agColumnDefs = yield this.getAgColumnDefs(fieldMetadata);
|
|
237
237
|
// Emit event to set column definitions
|
|
@@ -341,11 +341,39 @@ let GridProServerSideDatasource = class GridProServerSideDatasource extends Life
|
|
|
341
341
|
});
|
|
342
342
|
this.transactionData = undefined;
|
|
343
343
|
}
|
|
344
|
-
getResourceIndexes(avaialbleIndexes) {
|
|
344
|
+
getResourceIndexes(avaialbleIndexes, availableSortableFields) {
|
|
345
345
|
const resourceIndexesMap = new Map();
|
|
346
|
+
const allSortableFields = new Set();
|
|
347
|
+
// Add indexes from INDEXES metadata
|
|
346
348
|
avaialbleIndexes === null || avaialbleIndexes === void 0 ? void 0 : avaialbleIndexes.forEach((index) => {
|
|
347
|
-
|
|
349
|
+
const fields = index.FIELDS.split(' ');
|
|
350
|
+
resourceIndexesMap.set(index.NAME, fields);
|
|
351
|
+
fields.forEach((field) => allSortableFields.add(field));
|
|
348
352
|
});
|
|
353
|
+
// Add fields from SORTABLE_FIELDS metadata if available
|
|
354
|
+
if (availableSortableFields && availableSortableFields.length > 0) {
|
|
355
|
+
availableSortableFields.forEach((field) => allSortableFields.add(field));
|
|
356
|
+
}
|
|
357
|
+
// If we have SORTABLE_FIELDS but no indexes, create a synthetic index entry
|
|
358
|
+
// This ensures compatibility with existing code that expects a Map structure
|
|
359
|
+
if (resourceIndexesMap.size === 0 && allSortableFields.size > 0) {
|
|
360
|
+
resourceIndexesMap.set('SORTABLE_FIELDS', Array.from(allSortableFields));
|
|
361
|
+
}
|
|
362
|
+
else if (availableSortableFields &&
|
|
363
|
+
availableSortableFields.length > 0 &&
|
|
364
|
+
resourceIndexesMap.size > 0) {
|
|
365
|
+
// If we have both indexes and SORTABLE_FIELDS, merge them
|
|
366
|
+
// Add any additional fields from SORTABLE_FIELDS that aren't already in any index
|
|
367
|
+
const fieldsFromIndexes = new Set();
|
|
368
|
+
resourceIndexesMap.forEach((fields) => {
|
|
369
|
+
fields.forEach((field) => fieldsFromIndexes.add(field));
|
|
370
|
+
});
|
|
371
|
+
const additionalFields = availableSortableFields.filter((field) => !fieldsFromIndexes.has(field));
|
|
372
|
+
if (additionalFields.length > 0) {
|
|
373
|
+
// Add additional sortable fields as a separate entry
|
|
374
|
+
resourceIndexesMap.set('SORTABLE_FIELDS', additionalFields);
|
|
375
|
+
}
|
|
376
|
+
}
|
|
349
377
|
return resourceIndexesMap;
|
|
350
378
|
}
|
|
351
379
|
createReqRepRequest() {
|
|
@@ -513,16 +541,14 @@ let GridProServerSideDatasource = class GridProServerSideDatasource extends Life
|
|
|
513
541
|
getAgColumnDefs(fieldsMetadata) {
|
|
514
542
|
return __awaiter(this, void 0, void 0, function* () {
|
|
515
543
|
const colDefsFromGenesisData = this.generateColumnDefsFromMetadata(fieldsMetadata, getServerSideFilterParamsByFieldType, getFilterByFieldType);
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
});
|
|
525
|
-
}
|
|
544
|
+
colDefsFromGenesisData.forEach((colDef) => {
|
|
545
|
+
colDef.sortable = [].concat(...this.indexes.values()).includes(colDef.field);
|
|
546
|
+
if (this.datasource.criteriaOnlyRequest) {
|
|
547
|
+
colDef.filter = this.datasource.availableCriteriaFields.includes(colDef.field)
|
|
548
|
+
? colDef.filter
|
|
549
|
+
: null;
|
|
550
|
+
}
|
|
551
|
+
});
|
|
526
552
|
return colDefsFromGenesisData;
|
|
527
553
|
});
|
|
528
554
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@genesislcap/grid-pro",
|
|
3
3
|
"description": "Genesis Foundation AG Grid",
|
|
4
|
-
"version": "14.
|
|
4
|
+
"version": "14.382.0",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"license": "SEE LICENSE IN license.txt",
|
|
7
7
|
"main": "dist/esm/index.js",
|
|
@@ -38,19 +38,19 @@
|
|
|
38
38
|
}
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@genesislcap/foundation-testing": "14.
|
|
42
|
-
"@genesislcap/genx": "14.
|
|
43
|
-
"@genesislcap/rollup-builder": "14.
|
|
44
|
-
"@genesislcap/ts-builder": "14.
|
|
45
|
-
"@genesislcap/uvu-playwright-builder": "14.
|
|
46
|
-
"@genesislcap/vite-builder": "14.
|
|
47
|
-
"@genesislcap/webpack-builder": "14.
|
|
41
|
+
"@genesislcap/foundation-testing": "14.382.0",
|
|
42
|
+
"@genesislcap/genx": "14.382.0",
|
|
43
|
+
"@genesislcap/rollup-builder": "14.382.0",
|
|
44
|
+
"@genesislcap/ts-builder": "14.382.0",
|
|
45
|
+
"@genesislcap/uvu-playwright-builder": "14.382.0",
|
|
46
|
+
"@genesislcap/vite-builder": "14.382.0",
|
|
47
|
+
"@genesislcap/webpack-builder": "14.382.0"
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@genesislcap/foundation-comms": "14.
|
|
51
|
-
"@genesislcap/foundation-logger": "14.
|
|
52
|
-
"@genesislcap/foundation-ui": "14.
|
|
53
|
-
"@genesislcap/foundation-utils": "14.
|
|
50
|
+
"@genesislcap/foundation-comms": "14.382.0",
|
|
51
|
+
"@genesislcap/foundation-logger": "14.382.0",
|
|
52
|
+
"@genesislcap/foundation-ui": "14.382.0",
|
|
53
|
+
"@genesislcap/foundation-utils": "14.382.0",
|
|
54
54
|
"@microsoft/fast-colors": "5.3.1",
|
|
55
55
|
"@microsoft/fast-components": "2.30.6",
|
|
56
56
|
"@microsoft/fast-element": "1.14.0",
|
|
@@ -77,5 +77,5 @@
|
|
|
77
77
|
"access": "public"
|
|
78
78
|
},
|
|
79
79
|
"customElements": "dist/custom-elements.json",
|
|
80
|
-
"gitHead": "
|
|
80
|
+
"gitHead": "7c8ac23c3c6437179c8a35b7ba2084963afc5497"
|
|
81
81
|
}
|