@genesislcap/grid-pro 14.148.1-alpha-ef0e7af.0 → 14.148.1-alpha-eb67ade.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/custom-elements.json +82 -5
- package/dist/dts/datasource/server-side.datasource.d.ts +8 -7
- package/dist/dts/datasource/server-side.datasource.d.ts.map +1 -1
- package/dist/dts/utils/index.d.ts +1 -0
- package/dist/dts/utils/index.d.ts.map +1 -1
- package/dist/dts/utils/map.d.ts +17 -0
- package/dist/dts/utils/map.d.ts.map +1 -0
- package/dist/esm/datasource/server-side.datasource.js +74 -37
- package/dist/esm/utils/index.js +1 -0
- package/dist/esm/utils/map.js +39 -0
- package/dist/grid-pro.api.json +100 -0
- package/dist/grid-pro.d.ts +26 -7
- package/docs/api/grid-pro.getavailableindexes.md +30 -0
- package/docs/api/grid-pro.getavailableindexfields.md +30 -0
- package/docs/api/grid-pro.md +2 -0
- package/docs/api-report.md +10 -2
- package/package.json +13 -13
|
@@ -7934,8 +7934,7 @@
|
|
|
7934
7934
|
},
|
|
7935
7935
|
{
|
|
7936
7936
|
"kind": "method",
|
|
7937
|
-
"name": "dataLogoff"
|
|
7938
|
-
"privacy": "private"
|
|
7937
|
+
"name": "dataLogoff"
|
|
7939
7938
|
},
|
|
7940
7939
|
{
|
|
7941
7940
|
"kind": "method",
|
|
@@ -8150,11 +8149,11 @@
|
|
|
8150
8149
|
},
|
|
8151
8150
|
{
|
|
8152
8151
|
"kind": "method",
|
|
8153
|
-
"name": "
|
|
8152
|
+
"name": "deinit"
|
|
8154
8153
|
},
|
|
8155
8154
|
{
|
|
8156
8155
|
"kind": "method",
|
|
8157
|
-
"name": "
|
|
8156
|
+
"name": "init"
|
|
8158
8157
|
},
|
|
8159
8158
|
{
|
|
8160
8159
|
"kind": "method",
|
|
@@ -8163,7 +8162,13 @@
|
|
|
8163
8162
|
{
|
|
8164
8163
|
"kind": "method",
|
|
8165
8164
|
"name": "clearRowData",
|
|
8166
|
-
"privacy": "private"
|
|
8165
|
+
"privacy": "private",
|
|
8166
|
+
"parameters": [
|
|
8167
|
+
{
|
|
8168
|
+
"name": "withColumnDefs",
|
|
8169
|
+
"default": "true"
|
|
8170
|
+
}
|
|
8171
|
+
]
|
|
8167
8172
|
},
|
|
8168
8173
|
{
|
|
8169
8174
|
"kind": "method",
|
|
@@ -10623,6 +10628,14 @@
|
|
|
10623
10628
|
"package": "./logger"
|
|
10624
10629
|
}
|
|
10625
10630
|
},
|
|
10631
|
+
{
|
|
10632
|
+
"kind": "js",
|
|
10633
|
+
"name": "*",
|
|
10634
|
+
"declaration": {
|
|
10635
|
+
"name": "*",
|
|
10636
|
+
"package": "./map"
|
|
10637
|
+
}
|
|
10638
|
+
},
|
|
10626
10639
|
{
|
|
10627
10640
|
"kind": "js",
|
|
10628
10641
|
"name": "*",
|
|
@@ -10655,6 +10668,70 @@
|
|
|
10655
10668
|
}
|
|
10656
10669
|
]
|
|
10657
10670
|
},
|
|
10671
|
+
{
|
|
10672
|
+
"kind": "javascript-module",
|
|
10673
|
+
"path": "src/utils/map.ts",
|
|
10674
|
+
"declarations": [
|
|
10675
|
+
{
|
|
10676
|
+
"kind": "function",
|
|
10677
|
+
"name": "getAvailableIndexes",
|
|
10678
|
+
"return": {
|
|
10679
|
+
"type": {
|
|
10680
|
+
"text": ""
|
|
10681
|
+
}
|
|
10682
|
+
},
|
|
10683
|
+
"parameters": [
|
|
10684
|
+
{
|
|
10685
|
+
"name": "data",
|
|
10686
|
+
"type": {
|
|
10687
|
+
"text": "Map<string, [string]>"
|
|
10688
|
+
},
|
|
10689
|
+
"description": "the map data to have the keys extracted from"
|
|
10690
|
+
}
|
|
10691
|
+
],
|
|
10692
|
+
"description": "Get the keys of the Metadata indexes map",
|
|
10693
|
+
"privacy": "public"
|
|
10694
|
+
},
|
|
10695
|
+
{
|
|
10696
|
+
"kind": "function",
|
|
10697
|
+
"name": "getAvailableIndexFields",
|
|
10698
|
+
"return": {
|
|
10699
|
+
"type": {
|
|
10700
|
+
"text": ""
|
|
10701
|
+
}
|
|
10702
|
+
},
|
|
10703
|
+
"parameters": [
|
|
10704
|
+
{
|
|
10705
|
+
"name": "data",
|
|
10706
|
+
"type": {
|
|
10707
|
+
"text": "Map<string, [string]>"
|
|
10708
|
+
},
|
|
10709
|
+
"description": "the map data to have the values extracted from"
|
|
10710
|
+
}
|
|
10711
|
+
],
|
|
10712
|
+
"description": "Get the values of the Metadata indexes map",
|
|
10713
|
+
"privacy": "public"
|
|
10714
|
+
}
|
|
10715
|
+
],
|
|
10716
|
+
"exports": [
|
|
10717
|
+
{
|
|
10718
|
+
"kind": "js",
|
|
10719
|
+
"name": "getAvailableIndexes",
|
|
10720
|
+
"declaration": {
|
|
10721
|
+
"name": "getAvailableIndexes",
|
|
10722
|
+
"module": "src/utils/map.ts"
|
|
10723
|
+
}
|
|
10724
|
+
},
|
|
10725
|
+
{
|
|
10726
|
+
"kind": "js",
|
|
10727
|
+
"name": "getAvailableIndexFields",
|
|
10728
|
+
"declaration": {
|
|
10729
|
+
"name": "getAvailableIndexFields",
|
|
10730
|
+
"module": "src/utils/map.ts"
|
|
10731
|
+
}
|
|
10732
|
+
}
|
|
10733
|
+
]
|
|
10734
|
+
},
|
|
10658
10735
|
{
|
|
10659
10736
|
"kind": "javascript-module",
|
|
10660
10737
|
"path": "src/utils/sanitasations.ts",
|
|
@@ -53,7 +53,7 @@ export declare class StreamDatasource extends StreamBaseDatasource implements IS
|
|
|
53
53
|
constructor(options: StreamDatasourceOptions);
|
|
54
54
|
getRows(params: IServerSideGetRowsParams): Promise<void>;
|
|
55
55
|
private sortMapByNumericKey;
|
|
56
|
-
|
|
56
|
+
dataLogoff(): void;
|
|
57
57
|
private restartSubscription;
|
|
58
58
|
private getOrderByAndToBeSortedColIds;
|
|
59
59
|
private handleCurrentStreamLoad;
|
|
@@ -212,11 +212,6 @@ declare const GridProServerSideDatasource_base: (new (...args: any[]) => {
|
|
|
212
212
|
readonly DOCUMENT_TYPE_NODE: number;
|
|
213
213
|
readonly ELEMENT_NODE: number;
|
|
214
214
|
readonly ENTITY_NODE: number;
|
|
215
|
-
/**
|
|
216
|
-
* A Genesis Datasource element, for server-side | SSRM-compatible data fetching and used exclusively by the GridPro element.
|
|
217
|
-
* @remarks Only supports Server-Side Row Model. Requires `@ag-grid-enterprise/server-side-row-model` setup and valid AG Grid Enterprise license.
|
|
218
|
-
* @alpha
|
|
219
|
-
*/
|
|
220
215
|
readonly ENTITY_REFERENCE_NODE: number;
|
|
221
216
|
readonly NOTATION_NODE: number;
|
|
222
217
|
readonly PROCESSING_INSTRUCTION_NODE: number;
|
|
@@ -400,6 +395,12 @@ export declare class GridProServerSideDatasource extends GridProServerSideDataso
|
|
|
400
395
|
applyFuncName: string;
|
|
401
396
|
applyAsyncFuncName: string;
|
|
402
397
|
criteriaChanged(oldCriteria: string, newCriteria: string): void;
|
|
398
|
+
/**
|
|
399
|
+
* Resets the grid data while keeping columnDefs and sends a DATA_LOGOFF message if it's a stream.
|
|
400
|
+
* @remarks This is used when the grid is already initialized and we want to reload the data due to a criteria/filter change.
|
|
401
|
+
* @internal
|
|
402
|
+
*/
|
|
403
|
+
private reloadResourceData;
|
|
403
404
|
resourceNameChanged(oldValue: string, newValue: string): void;
|
|
404
405
|
pagination: boolean;
|
|
405
406
|
private indexes;
|
|
@@ -408,8 +409,8 @@ export declare class GridProServerSideDatasource extends GridProServerSideDataso
|
|
|
408
409
|
connectedCallback(): void;
|
|
409
410
|
disconnectedCallback(): void;
|
|
410
411
|
deepClone(): Node;
|
|
412
|
+
deinit(): void;
|
|
411
413
|
init(): void;
|
|
412
|
-
reset(): void;
|
|
413
414
|
restart(): void;
|
|
414
415
|
private clearRowData;
|
|
415
416
|
private getResourceIndexes;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server-side.datasource.d.ts","sourceRoot":"","sources":["../../../src/datasource/server-side.datasource.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAGV,qBAAqB,EACrB,wBAAwB,EACxB,mBAAmB,EAEnB,kBAAkB,EAClB,2BAA2B,EAG5B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,IAAI,EACJ,OAAO,EAKP,wBAAwB,EAIxB,cAAc,EAGd,gBAAgB,EAEjB,MAAM,+BAA+B,CAAC;AAQvC,OAAO,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAOhF;;;;;GAKG;AACH,MAAM,MAAM,uBAAuB,GAAG;IACpC,MAAM,EAAE,gBAAgB,CAAC,wBAAwB,CAAC,CAAC;IACnD,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,GAAG,CAAC;IACrB,eAAe,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC;IACxC,eAAe,CAAC,EAAE,cAAc,EAAE,CAAC;IAEnC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF;;;GAGG;AACH,qBAAa,gBAAiB,SAAQ,oBAAqB,YAAW,qBAAqB;IACnF,IAAI,EAAG,IAAI,CAAC;IACT,OAAO,EAAG,OAAO,CAAC;IAE3B,gBAAgB,EAAE,gBAAgB,CAAC,wBAAwB,CAAC,CAAC;IAC7D,OAAO,CAAC,YAAY,CAAS;IAC7B,cAAc,EAAE,GAAG,CAAC;IACpB,OAAO,CAAC,eAAe,CAAwB;IAC/C,OAAO,CAAC,eAAe,CAAmB;IAE1C,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,UAAU,CAAU;IAE5B,eAAe,EAAE,MAAM,CAAC;IAExB;;;OAGG;IACH,iBAAiB,SAAK;IAEtB;;;OAGG;IACH,iBAAiB,SAAK;IAEtB,OAAO,CAAC,QAAQ,CAAS;IAEzB,OAAO,CAAC,mBAAmB,CAAK;IAChC,OAAO,CAAC,cAAc,CAAK;IAE3B,OAAO,CAAC,kBAAkB,CAAM;IAChC,OAAO,CAAC,qBAAqB,CAAoB;IACjD,OAAO,CAAC,gBAAgB,CAAkB;gBAE9B,OAAO,EAAE,uBAAuB;IAiBtC,OAAO,CAAC,MAAM,EAAE,wBAAwB;
|
|
1
|
+
{"version":3,"file":"server-side.datasource.d.ts","sourceRoot":"","sources":["../../../src/datasource/server-side.datasource.ts"],"names":[],"mappings":"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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,iBAAiB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,OAAO,CAAC;AACtB,cAAc,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Get the keys of the Metadata indexes map
|
|
3
|
+
* @remarks This function will return a flat string array of all the keys in the "metadata indexes" map
|
|
4
|
+
* @param data - the map data to have the keys extracted from
|
|
5
|
+
* @returns the keys of the map
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
export declare function getAvailableIndexes(data: Map<string, [string]>): string[];
|
|
9
|
+
/**
|
|
10
|
+
* Get the values of the Metadata indexes map
|
|
11
|
+
* @remarks This function will return a flat string array of all the values in the "metadata indexes" map
|
|
12
|
+
* @param data - the map data to have the values extracted from
|
|
13
|
+
* @returns the values of the map
|
|
14
|
+
* @public
|
|
15
|
+
*/
|
|
16
|
+
export declare function getAvailableIndexFields(data: Map<string, [string]>): string[];
|
|
17
|
+
//# sourceMappingURL=map.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"map.d.ts","sourceRoot":"","sources":["../../../src/utils/map.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,GAAG,CAAC,MAAM,EAAE,CAAC,MAAM,CAAC,CAAC,GAAG,MAAM,EAAE,CAUzE;AAED;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,GAAG,CAAC,MAAM,EAAE,CAAC,MAAM,CAAC,CAAC,GAAG,MAAM,EAAE,CAkB7E"}
|
|
@@ -5,7 +5,7 @@ import { attr, customElement, DOM } from '@microsoft/fast-element';
|
|
|
5
5
|
import { take } from 'rxjs/operators';
|
|
6
6
|
import { dateTimeValueFormatter, dateValueFormatter } from '../grid-pro.definitions';
|
|
7
7
|
import { GridProRendererTypes } from '../grid-pro.types';
|
|
8
|
-
import { logger } from '../utils';
|
|
8
|
+
import { getAvailableIndexes, getAvailableIndexFields, logger } from '../utils';
|
|
9
9
|
import { GridProBaseDatasource, StreamBaseDatasource } from './base.datasource';
|
|
10
10
|
import { getColumnType, getFilterByFieldType, getFilterParamsByFieldType, } from './server-side.grid-definitions';
|
|
11
11
|
/**
|
|
@@ -40,7 +40,7 @@ export class StreamDatasource extends StreamBaseDatasource {
|
|
|
40
40
|
this.pagination = options.pagination;
|
|
41
41
|
}
|
|
42
42
|
getRows(params) {
|
|
43
|
-
var _a;
|
|
43
|
+
var _a, _b;
|
|
44
44
|
return __awaiter(this, void 0, void 0, function* () {
|
|
45
45
|
const filterModelBeingApplied = params.request.filterModel;
|
|
46
46
|
const filtersAreBeingApplied = Object.keys(filterModelBeingApplied).length > 0;
|
|
@@ -72,12 +72,25 @@ export class StreamDatasource extends StreamBaseDatasource {
|
|
|
72
72
|
const coldIdBeingSorted = this.currentSortModel[0].colId; // Not allowing multiple sorts by user
|
|
73
73
|
const sortTypeBeingApplied = this.currentSortModel[0].sort;
|
|
74
74
|
const orderByAndToBeSortedColIds = this.getOrderByAndToBeSortedColIds(this.resourceIndexes, coldIdBeingSorted);
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
75
|
+
this.calculatedRowsCount = 0;
|
|
76
|
+
if (!orderByAndToBeSortedColIds) {
|
|
77
|
+
const availableIndexes = getAvailableIndexes(this.resourceIndexes);
|
|
78
|
+
const availableIndexFields = getAvailableIndexFields(this.resourceIndexes);
|
|
79
|
+
logger.warn('The FIELD/column (${coldIdBeingSorted}) being sorted is not part of an INDEX, required for the [orderBy] operation. See https://learn.genesis.global/docs/database/data-types/index-entities/');
|
|
80
|
+
logger.debug('Available indexes:', availableIndexes);
|
|
81
|
+
logger.debug('Columns that can be sorted with the available indexes:', availableIndexFields);
|
|
82
|
+
(_b = params.api) === null || _b === void 0 ? void 0 : _b.refreshServerSide({ purge: true });
|
|
83
|
+
params.fail();
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
else {
|
|
87
|
+
orderByAndToBeSortedColIds.toBeSorted.forEach((colId) => {
|
|
88
|
+
this.currentSortModel.push({ sort: sortTypeBeingApplied, colId });
|
|
89
|
+
});
|
|
90
|
+
this.resourceParams.ORDER_BY = orderByAndToBeSortedColIds.orderBy;
|
|
91
|
+
this.resourceParams.REVERSE = sortTypeBeingApplied === 'desc' ? true : false;
|
|
92
|
+
this.restartSubscription();
|
|
93
|
+
}
|
|
81
94
|
}
|
|
82
95
|
}
|
|
83
96
|
if (this.moreRows && params.request.startRow >= Number(this.maxRows)) {
|
|
@@ -108,18 +121,20 @@ export class StreamDatasource extends StreamBaseDatasource {
|
|
|
108
121
|
this.streamSourceRef = result.SOURCE_REF;
|
|
109
122
|
this.server_ROWS_COUNT = (_a = result.ROWS_COUNT) !== null && _a !== void 0 ? _a : this.rowData.size;
|
|
110
123
|
}
|
|
111
|
-
|
|
124
|
+
const successRowData = {
|
|
125
|
+
rowData: Array.from(this.sortMapByNumericKey(this.rowData).values()),
|
|
126
|
+
rowCount: this.pagination && !this.resourceParams.CRITERIA_MATCH
|
|
127
|
+
? Math.min(this.server_ROWS_COUNT, this.maxView)
|
|
128
|
+
: undefined,
|
|
129
|
+
};
|
|
130
|
+
if (!this.moreRows &&
|
|
131
|
+
this.client_ROWS_COUNT &&
|
|
132
|
+
this.client_ROWS_COUNT <= this.server_ROWS_COUNT) {
|
|
112
133
|
this.calculatedRowsCount = this.client_ROWS_COUNT;
|
|
113
134
|
}
|
|
114
135
|
else {
|
|
115
136
|
this.calculatedRowsCount += (_b = this.rowData.size) !== null && _b !== void 0 ? _b : 0;
|
|
116
137
|
}
|
|
117
|
-
const successRowData = {
|
|
118
|
-
rowData: Array.from(this.sortMapByNumericKey(this.rowData).values()),
|
|
119
|
-
};
|
|
120
|
-
if (this.pagination) {
|
|
121
|
-
successRowData.rowCount = Math.min(this.server_ROWS_COUNT, this.maxView);
|
|
122
|
-
}
|
|
123
138
|
if (params.request.endRow > this.maxView ||
|
|
124
139
|
params.request.endRow > this.calculatedRowsCount) {
|
|
125
140
|
successRowData.rowCount = this.calculatedRowsCount;
|
|
@@ -127,6 +142,9 @@ export class StreamDatasource extends StreamBaseDatasource {
|
|
|
127
142
|
else if (params.request.endRow === this.server_ROWS_COUNT) {
|
|
128
143
|
successRowData.rowCount = this.server_ROWS_COUNT;
|
|
129
144
|
}
|
|
145
|
+
else if (!this.moreRows && this.server_ROWS_COUNT >= this.client_ROWS_COUNT) {
|
|
146
|
+
successRowData.rowCount = this.calculatedRowsCount;
|
|
147
|
+
}
|
|
130
148
|
params.success(successRowData);
|
|
131
149
|
});
|
|
132
150
|
});
|
|
@@ -253,6 +271,7 @@ __decorate([
|
|
|
253
271
|
Connect
|
|
254
272
|
], StreamDatasource.prototype, "connect", void 0);
|
|
255
273
|
const criteriaDelimiter = ';';
|
|
274
|
+
const withoutColumnDefs = null;
|
|
256
275
|
/**
|
|
257
276
|
* A Genesis Datasource element, for server-side | SSRM-compatible data fetching and used exclusively by the GridPro element.
|
|
258
277
|
* @remarks Only supports Server-Side Row Model. Requires `@ag-grid-enterprise/server-side-row-model` setup and valid AG Grid Enterprise license.
|
|
@@ -266,14 +285,27 @@ let GridProServerSideDatasource = class GridProServerSideDatasource extends Life
|
|
|
266
285
|
this.pagination = false;
|
|
267
286
|
}
|
|
268
287
|
criteriaChanged(oldCriteria, newCriteria) {
|
|
269
|
-
const
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
// TODO: check grid-pro-genesis-datasource criteriaChanged
|
|
273
|
-
if (!startingCriteria && criteriaNotDuplicate) {
|
|
274
|
-
this.restart();
|
|
288
|
+
const criteriaIsNotDuplicate = oldCriteria !== normaliseCriteria(newCriteria, criteriaDelimiter);
|
|
289
|
+
if (this.ssrmDatasource && criteriaIsNotDuplicate) {
|
|
290
|
+
this.reloadResourceData();
|
|
275
291
|
}
|
|
276
292
|
}
|
|
293
|
+
/**
|
|
294
|
+
* Resets the grid data while keeping columnDefs and sends a DATA_LOGOFF message if it's a stream.
|
|
295
|
+
* @remarks This is used when the grid is already initialized and we want to reload the data due to a criteria/filter change.
|
|
296
|
+
* @internal
|
|
297
|
+
*/
|
|
298
|
+
reloadResourceData() {
|
|
299
|
+
var _a, _b, _c;
|
|
300
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
301
|
+
this.ssrmDatasource.dataLogoff();
|
|
302
|
+
this.clearRowData(withoutColumnDefs);
|
|
303
|
+
this.ssrmDatasource = undefined;
|
|
304
|
+
(_a = this.agGrid.gridApi) === null || _a === void 0 ? void 0 : _a.refreshServerSide({ purge: true });
|
|
305
|
+
(_c = (_b = this.agGrid) === null || _b === void 0 ? void 0 : _b.gridApi) === null || _c === void 0 ? void 0 : _c.showLoadingOverlay();
|
|
306
|
+
this.init();
|
|
307
|
+
});
|
|
308
|
+
}
|
|
277
309
|
resourceNameChanged(oldValue, newValue) {
|
|
278
310
|
if (!oldValue || oldValue === newValue)
|
|
279
311
|
return;
|
|
@@ -294,7 +326,7 @@ let GridProServerSideDatasource = class GridProServerSideDatasource extends Life
|
|
|
294
326
|
DOM.queueUpdate(() => {
|
|
295
327
|
if (!shouldRunDisconnect)
|
|
296
328
|
return;
|
|
297
|
-
this.
|
|
329
|
+
this.deinit();
|
|
298
330
|
});
|
|
299
331
|
}
|
|
300
332
|
deepClone() {
|
|
@@ -303,6 +335,13 @@ let GridProServerSideDatasource = class GridProServerSideDatasource extends Life
|
|
|
303
335
|
copy.deferredColumnStates = structuredClone(this.deferredColumnStates);
|
|
304
336
|
return copy;
|
|
305
337
|
}
|
|
338
|
+
deinit() {
|
|
339
|
+
var _a;
|
|
340
|
+
this.clearRowData();
|
|
341
|
+
this.ssrmDatasource = undefined;
|
|
342
|
+
this.originalFieldDef = undefined;
|
|
343
|
+
(_a = this.agGrid.gridApi) === null || _a === void 0 ? void 0 : _a.refreshServerSide({ purge: true });
|
|
344
|
+
}
|
|
306
345
|
init() {
|
|
307
346
|
if (this.agGrid && this.resourceName && this.connect.isConnected) {
|
|
308
347
|
this.agGrid.gridOptions = Object.assign({ getRowId: (params) => {
|
|
@@ -338,8 +377,8 @@ let GridProServerSideDatasource = class GridProServerSideDatasource extends Life
|
|
|
338
377
|
resourceParams: this.params,
|
|
339
378
|
resourceIndexes: this.indexes,
|
|
340
379
|
resourceColDefs: this.originalFieldDef,
|
|
341
|
-
maxRows: this.maxRows,
|
|
342
|
-
maxView: this.maxView,
|
|
380
|
+
maxRows: +this.maxRows,
|
|
381
|
+
maxView: +this.maxView,
|
|
343
382
|
rowId: this.rowId,
|
|
344
383
|
pagination: this.pagination,
|
|
345
384
|
});
|
|
@@ -349,25 +388,22 @@ let GridProServerSideDatasource = class GridProServerSideDatasource extends Life
|
|
|
349
388
|
}
|
|
350
389
|
logger.warn(`Application not connected, falling back to local columnDefs/rowData`);
|
|
351
390
|
}
|
|
352
|
-
reset() {
|
|
353
|
-
var _a;
|
|
354
|
-
this.clearRowData();
|
|
355
|
-
this.ssrmDatasource = undefined;
|
|
356
|
-
this.originalFieldDef = undefined;
|
|
357
|
-
(_a = this.agGrid.gridApi) === null || _a === void 0 ? void 0 : _a.refreshServerSide({ purge: true });
|
|
358
|
-
}
|
|
359
391
|
restart() {
|
|
360
|
-
this.
|
|
392
|
+
this.deinit();
|
|
361
393
|
this.init();
|
|
362
394
|
}
|
|
363
|
-
clearRowData() {
|
|
395
|
+
clearRowData(withColumnDefs = true) {
|
|
364
396
|
var _a, _b, _c, _d;
|
|
365
|
-
|
|
366
|
-
|
|
397
|
+
this.rowData = new Map();
|
|
398
|
+
if (withColumnDefs) {
|
|
399
|
+
(_b = (_a = this.agGrid) === null || _a === void 0 ? void 0 : _a.gridApi) === null || _b === void 0 ? void 0 : _b.setColumnDefs([]);
|
|
400
|
+
}
|
|
401
|
+
this.agTransaction = { remove: [] };
|
|
367
402
|
(_c = this.agGrid.gridApi) === null || _c === void 0 ? void 0 : _c.forEachNode((node) => {
|
|
368
|
-
agTransaction.remove.push(node.data);
|
|
403
|
+
this.agTransaction.remove.push(node.data);
|
|
369
404
|
});
|
|
370
|
-
(_d = this.agGrid.gridApi) === null || _d === void 0 ? void 0 : _d.applyServerSideTransaction(agTransaction);
|
|
405
|
+
(_d = this.agGrid.gridApi) === null || _d === void 0 ? void 0 : _d.applyServerSideTransaction(this.agTransaction);
|
|
406
|
+
this.agTransaction = undefined;
|
|
371
407
|
}
|
|
372
408
|
getResourceIndexes(avaialbleIndexes) {
|
|
373
409
|
const resourceIndexesMap = new Map();
|
|
@@ -419,6 +455,7 @@ let GridProServerSideDatasource = class GridProServerSideDatasource extends Life
|
|
|
419
455
|
const updatedInfo = yield this.connect.snapshot(this.resourceName, {
|
|
420
456
|
MAX_ROWS: 1,
|
|
421
457
|
MAX_VIEW: 1,
|
|
458
|
+
CRITERIA_MATCH: this.criteria,
|
|
422
459
|
});
|
|
423
460
|
this.ssrmDatasource.server_ROWS_COUNT = updatedInfo.ROWS_COUNT;
|
|
424
461
|
}
|
package/dist/esm/utils/index.js
CHANGED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Get the keys of the Metadata indexes map
|
|
3
|
+
* @remarks This function will return a flat string array of all the keys in the "metadata indexes" map
|
|
4
|
+
* @param data - the map data to have the keys extracted from
|
|
5
|
+
* @returns the keys of the map
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
export function getAvailableIndexes(data) {
|
|
9
|
+
const availabeIndexes = [];
|
|
10
|
+
for (const [key] of data) {
|
|
11
|
+
if (key) {
|
|
12
|
+
availabeIndexes.push(key);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
return availabeIndexes;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Get the values of the Metadata indexes map
|
|
19
|
+
* @remarks This function will return a flat string array of all the values in the "metadata indexes" map
|
|
20
|
+
* @param data - the map data to have the values extracted from
|
|
21
|
+
* @returns the values of the map
|
|
22
|
+
* @public
|
|
23
|
+
*/
|
|
24
|
+
export function getAvailableIndexFields(data) {
|
|
25
|
+
const availableIndexFields = [];
|
|
26
|
+
function traverse(items) {
|
|
27
|
+
for (const item of items) {
|
|
28
|
+
if (item !== null) {
|
|
29
|
+
availableIndexFields.push(item);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
for (const [key, value] of data) {
|
|
34
|
+
if (key !== null && value !== null) {
|
|
35
|
+
traverse(value);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
return availableIndexFields;
|
|
39
|
+
}
|
package/dist/grid-pro.api.json
CHANGED
|
@@ -6879,6 +6879,106 @@
|
|
|
6879
6879
|
"endIndex": 6
|
|
6880
6880
|
}
|
|
6881
6881
|
},
|
|
6882
|
+
{
|
|
6883
|
+
"kind": "Function",
|
|
6884
|
+
"canonicalReference": "@genesislcap/grid-pro!getAvailableIndexes:function(1)",
|
|
6885
|
+
"docComment": "/**\n * Get the keys of the Metadata indexes map\n *\n * @remarks\n *\n * This function will return a flat string array of all the keys in the \"metadata indexes\" map\n *\n * @param data - the map data to have the keys extracted from\n *\n * @returns the keys of the map\n *\n * @public\n */\n",
|
|
6886
|
+
"excerptTokens": [
|
|
6887
|
+
{
|
|
6888
|
+
"kind": "Content",
|
|
6889
|
+
"text": "export declare function getAvailableIndexes(data: "
|
|
6890
|
+
},
|
|
6891
|
+
{
|
|
6892
|
+
"kind": "Reference",
|
|
6893
|
+
"text": "Map",
|
|
6894
|
+
"canonicalReference": "!Map:interface"
|
|
6895
|
+
},
|
|
6896
|
+
{
|
|
6897
|
+
"kind": "Content",
|
|
6898
|
+
"text": "<string, [string]>"
|
|
6899
|
+
},
|
|
6900
|
+
{
|
|
6901
|
+
"kind": "Content",
|
|
6902
|
+
"text": "): "
|
|
6903
|
+
},
|
|
6904
|
+
{
|
|
6905
|
+
"kind": "Content",
|
|
6906
|
+
"text": "string[]"
|
|
6907
|
+
},
|
|
6908
|
+
{
|
|
6909
|
+
"kind": "Content",
|
|
6910
|
+
"text": ";"
|
|
6911
|
+
}
|
|
6912
|
+
],
|
|
6913
|
+
"fileUrlPath": "src/utils/map.ts",
|
|
6914
|
+
"returnTypeTokenRange": {
|
|
6915
|
+
"startIndex": 4,
|
|
6916
|
+
"endIndex": 5
|
|
6917
|
+
},
|
|
6918
|
+
"releaseTag": "Public",
|
|
6919
|
+
"overloadIndex": 1,
|
|
6920
|
+
"parameters": [
|
|
6921
|
+
{
|
|
6922
|
+
"parameterName": "data",
|
|
6923
|
+
"parameterTypeTokenRange": {
|
|
6924
|
+
"startIndex": 1,
|
|
6925
|
+
"endIndex": 3
|
|
6926
|
+
},
|
|
6927
|
+
"isOptional": false
|
|
6928
|
+
}
|
|
6929
|
+
],
|
|
6930
|
+
"name": "getAvailableIndexes"
|
|
6931
|
+
},
|
|
6932
|
+
{
|
|
6933
|
+
"kind": "Function",
|
|
6934
|
+
"canonicalReference": "@genesislcap/grid-pro!getAvailableIndexFields:function(1)",
|
|
6935
|
+
"docComment": "/**\n * Get the values of the Metadata indexes map\n *\n * @remarks\n *\n * This function will return a flat string array of all the values in the \"metadata indexes\" map\n *\n * @param data - the map data to have the values extracted from\n *\n * @returns the values of the map\n *\n * @public\n */\n",
|
|
6936
|
+
"excerptTokens": [
|
|
6937
|
+
{
|
|
6938
|
+
"kind": "Content",
|
|
6939
|
+
"text": "export declare function getAvailableIndexFields(data: "
|
|
6940
|
+
},
|
|
6941
|
+
{
|
|
6942
|
+
"kind": "Reference",
|
|
6943
|
+
"text": "Map",
|
|
6944
|
+
"canonicalReference": "!Map:interface"
|
|
6945
|
+
},
|
|
6946
|
+
{
|
|
6947
|
+
"kind": "Content",
|
|
6948
|
+
"text": "<string, [string]>"
|
|
6949
|
+
},
|
|
6950
|
+
{
|
|
6951
|
+
"kind": "Content",
|
|
6952
|
+
"text": "): "
|
|
6953
|
+
},
|
|
6954
|
+
{
|
|
6955
|
+
"kind": "Content",
|
|
6956
|
+
"text": "string[]"
|
|
6957
|
+
},
|
|
6958
|
+
{
|
|
6959
|
+
"kind": "Content",
|
|
6960
|
+
"text": ";"
|
|
6961
|
+
}
|
|
6962
|
+
],
|
|
6963
|
+
"fileUrlPath": "src/utils/map.ts",
|
|
6964
|
+
"returnTypeTokenRange": {
|
|
6965
|
+
"startIndex": 4,
|
|
6966
|
+
"endIndex": 5
|
|
6967
|
+
},
|
|
6968
|
+
"releaseTag": "Public",
|
|
6969
|
+
"overloadIndex": 1,
|
|
6970
|
+
"parameters": [
|
|
6971
|
+
{
|
|
6972
|
+
"parameterName": "data",
|
|
6973
|
+
"parameterTypeTokenRange": {
|
|
6974
|
+
"startIndex": 1,
|
|
6975
|
+
"endIndex": 3
|
|
6976
|
+
},
|
|
6977
|
+
"isOptional": false
|
|
6978
|
+
}
|
|
6979
|
+
],
|
|
6980
|
+
"name": "getAvailableIndexFields"
|
|
6981
|
+
},
|
|
6882
6982
|
{
|
|
6883
6983
|
"kind": "Variable",
|
|
6884
6984
|
"canonicalReference": "@genesislcap/grid-pro!getDateEditorTemplate:var",
|
package/dist/grid-pro.d.ts
CHANGED
|
@@ -1023,6 +1023,24 @@ export declare const getAgBooleanRendererTemplate: (designSystem?: string) => Vi
|
|
|
1023
1023
|
*/
|
|
1024
1024
|
export declare const getAgEditableRendererTemplate: (designSystem?: string) => ViewTemplate<EditableRenderer, any>;
|
|
1025
1025
|
|
|
1026
|
+
/**
|
|
1027
|
+
* Get the keys of the Metadata indexes map
|
|
1028
|
+
* @remarks This function will return a flat string array of all the keys in the "metadata indexes" map
|
|
1029
|
+
* @param data - the map data to have the keys extracted from
|
|
1030
|
+
* @returns the keys of the map
|
|
1031
|
+
* @public
|
|
1032
|
+
*/
|
|
1033
|
+
export declare function getAvailableIndexes(data: Map<string, [string]>): string[];
|
|
1034
|
+
|
|
1035
|
+
/**
|
|
1036
|
+
* Get the values of the Metadata indexes map
|
|
1037
|
+
* @remarks This function will return a flat string array of all the values in the "metadata indexes" map
|
|
1038
|
+
* @param data - the map data to have the values extracted from
|
|
1039
|
+
* @returns the values of the map
|
|
1040
|
+
* @public
|
|
1041
|
+
*/
|
|
1042
|
+
export declare function getAvailableIndexFields(data: Map<string, [string]>): string[];
|
|
1043
|
+
|
|
1026
1044
|
/**
|
|
1027
1045
|
* Return a column type base on each field's metadata from the selected resource.
|
|
1028
1046
|
* @param metadataType - The type of the field/column
|
|
@@ -2170,6 +2188,12 @@ export declare class GridProServerSideDatasource extends GridProServerSideDataso
|
|
|
2170
2188
|
applyFuncName: string;
|
|
2171
2189
|
applyAsyncFuncName: string;
|
|
2172
2190
|
criteriaChanged(oldCriteria: string, newCriteria: string): void;
|
|
2191
|
+
/**
|
|
2192
|
+
* Resets the grid data while keeping columnDefs and sends a DATA_LOGOFF message if it's a stream.
|
|
2193
|
+
* @remarks This is used when the grid is already initialized and we want to reload the data due to a criteria/filter change.
|
|
2194
|
+
* @internal
|
|
2195
|
+
*/
|
|
2196
|
+
private reloadResourceData;
|
|
2173
2197
|
resourceNameChanged(oldValue: string, newValue: string): void;
|
|
2174
2198
|
pagination: boolean;
|
|
2175
2199
|
private indexes;
|
|
@@ -2178,8 +2202,8 @@ export declare class GridProServerSideDatasource extends GridProServerSideDataso
|
|
|
2178
2202
|
connectedCallback(): void;
|
|
2179
2203
|
disconnectedCallback(): void;
|
|
2180
2204
|
deepClone(): Node;
|
|
2205
|
+
deinit(): void;
|
|
2181
2206
|
init(): void;
|
|
2182
|
-
reset(): void;
|
|
2183
2207
|
restart(): void;
|
|
2184
2208
|
private clearRowData;
|
|
2185
2209
|
private getResourceIndexes;
|
|
@@ -2343,11 +2367,6 @@ declare const GridProServerSideDatasource_base: (new (...args: any[]) => {
|
|
|
2343
2367
|
readonly DOCUMENT_TYPE_NODE: number;
|
|
2344
2368
|
readonly ELEMENT_NODE: number;
|
|
2345
2369
|
readonly ENTITY_NODE: number;
|
|
2346
|
-
/**
|
|
2347
|
-
* A Genesis Datasource element, for server-side | SSRM-compatible data fetching and used exclusively by the GridPro element.
|
|
2348
|
-
* @remarks Only supports Server-Side Row Model. Requires `@ag-grid-enterprise/server-side-row-model` setup and valid AG Grid Enterprise license.
|
|
2349
|
-
* @alpha
|
|
2350
|
-
*/
|
|
2351
2370
|
readonly ENTITY_REFERENCE_NODE: number;
|
|
2352
2371
|
readonly NOTATION_NODE: number;
|
|
2353
2372
|
readonly PROCESSING_INSTRUCTION_NODE: number;
|
|
@@ -2706,7 +2725,7 @@ export declare class StreamDatasource extends StreamBaseDatasource implements IS
|
|
|
2706
2725
|
constructor(options: StreamDatasourceOptions);
|
|
2707
2726
|
getRows(params: IServerSideGetRowsParams): Promise<void>;
|
|
2708
2727
|
private sortMapByNumericKey;
|
|
2709
|
-
|
|
2728
|
+
dataLogoff(): void;
|
|
2710
2729
|
private restartSubscription;
|
|
2711
2730
|
private getOrderByAndToBeSortedColIds;
|
|
2712
2731
|
private handleCurrentStreamLoad;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@genesislcap/grid-pro](./grid-pro.md) > [getAvailableIndexes](./grid-pro.getavailableindexes.md)
|
|
4
|
+
|
|
5
|
+
## getAvailableIndexes() function
|
|
6
|
+
|
|
7
|
+
Get the keys of the Metadata indexes map
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
export declare function getAvailableIndexes(data: Map<string, [string]>): string[];
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
| Parameter | Type | Description |
|
|
18
|
+
| --- | --- | --- |
|
|
19
|
+
| data | Map<string, \[string\]> | the map data to have the keys extracted from |
|
|
20
|
+
|
|
21
|
+
**Returns:**
|
|
22
|
+
|
|
23
|
+
string\[\]
|
|
24
|
+
|
|
25
|
+
the keys of the map
|
|
26
|
+
|
|
27
|
+
## Remarks
|
|
28
|
+
|
|
29
|
+
This function will return a flat string array of all the keys in the "metadata indexes" map
|
|
30
|
+
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@genesislcap/grid-pro](./grid-pro.md) > [getAvailableIndexFields](./grid-pro.getavailableindexfields.md)
|
|
4
|
+
|
|
5
|
+
## getAvailableIndexFields() function
|
|
6
|
+
|
|
7
|
+
Get the values of the Metadata indexes map
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
export declare function getAvailableIndexFields(data: Map<string, [string]>): string[];
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
| Parameter | Type | Description |
|
|
18
|
+
| --- | --- | --- |
|
|
19
|
+
| data | Map<string, \[string\]> | the map data to have the values extracted from |
|
|
20
|
+
|
|
21
|
+
**Returns:**
|
|
22
|
+
|
|
23
|
+
string\[\]
|
|
24
|
+
|
|
25
|
+
the values of the map
|
|
26
|
+
|
|
27
|
+
## Remarks
|
|
28
|
+
|
|
29
|
+
This function will return a flat string array of all the values in the "metadata indexes" map
|
|
30
|
+
|
package/docs/api/grid-pro.md
CHANGED
|
@@ -41,6 +41,8 @@
|
|
|
41
41
|
| --- | --- |
|
|
42
42
|
| [dateTimeValueFormatter({ value })](./grid-pro.datetimevalueformatter.md) | Returns a formatted date time value from the Grid Pro cell value. |
|
|
43
43
|
| [dateValueFormatter({ value })](./grid-pro.datevalueformatter.md) | Returns a formatted date value from the Grid Pro cell value. |
|
|
44
|
+
| [getAvailableIndexes(data)](./grid-pro.getavailableindexes.md) | Get the keys of the Metadata indexes map |
|
|
45
|
+
| [getAvailableIndexFields(data)](./grid-pro.getavailableindexfields.md) | Get the values of the Metadata indexes map |
|
|
44
46
|
| [gridProColumns(itemsBinding, includeRenderers)](./grid-pro.gridprocolumns.md) | A directive that renders a set of grid-pro-column elements from a given input binding |
|
|
45
47
|
| [mergeAndDedupColDefWithColumnState(colDefs, columnStates)](./grid-pro.mergeanddedupcoldefwithcolumnstate.md) | Merges two arrays, one of <code>ColDef</code> and one of <code>ColumnState</code>, and deduplicates them. |
|
|
46
48
|
|
package/docs/api-report.md
CHANGED
|
@@ -723,6 +723,12 @@ export const getAgBooleanRendererTemplate: (designSystem?: string) => ViewTempla
|
|
|
723
723
|
// @public
|
|
724
724
|
export const getAgEditableRendererTemplate: (designSystem?: string) => ViewTemplate<EditableRenderer, any>;
|
|
725
725
|
|
|
726
|
+
// @public
|
|
727
|
+
export function getAvailableIndexes(data: Map<string, [string]>): string[];
|
|
728
|
+
|
|
729
|
+
// @public
|
|
730
|
+
export function getAvailableIndexFields(data: Map<string, [string]>): string[];
|
|
731
|
+
|
|
726
732
|
// @alpha
|
|
727
733
|
export function getColumnType(metadataType: string): string;
|
|
728
734
|
|
|
@@ -1015,6 +1021,8 @@ export class GridProServerSideDatasource extends GridProServerSideDatasource_bas
|
|
|
1015
1021
|
// (undocumented)
|
|
1016
1022
|
deepClone(): Node;
|
|
1017
1023
|
// (undocumented)
|
|
1024
|
+
deinit(): void;
|
|
1025
|
+
// (undocumented)
|
|
1018
1026
|
disconnectedCallback(): void;
|
|
1019
1027
|
// (undocumented)
|
|
1020
1028
|
init(): void;
|
|
@@ -1023,8 +1031,6 @@ export class GridProServerSideDatasource extends GridProServerSideDatasource_bas
|
|
|
1023
1031
|
// (undocumented)
|
|
1024
1032
|
get params(): any;
|
|
1025
1033
|
// (undocumented)
|
|
1026
|
-
reset(): void;
|
|
1027
|
-
// (undocumented)
|
|
1028
1034
|
resourceNameChanged(oldValue: string, newValue: string): void;
|
|
1029
1035
|
// (undocumented)
|
|
1030
1036
|
restart(): void;
|
|
@@ -1199,6 +1205,8 @@ export class StreamDatasource extends StreamBaseDatasource implements IServerSid
|
|
|
1199
1205
|
// (undocumented)
|
|
1200
1206
|
connect: Connect;
|
|
1201
1207
|
// (undocumented)
|
|
1208
|
+
dataLogoff(): void;
|
|
1209
|
+
// (undocumented)
|
|
1202
1210
|
dataserverStream: SocketObservable<FilteredDataServerResult>;
|
|
1203
1211
|
// (undocumented)
|
|
1204
1212
|
getRows(params: IServerSideGetRowsParams): Promise<void>;
|
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.148.1-alpha-
|
|
4
|
+
"version": "14.148.1-alpha-eb67ade.0",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"license": "SEE LICENSE IN license.txt",
|
|
7
7
|
"main": "dist/esm/index.js",
|
|
@@ -30,20 +30,20 @@
|
|
|
30
30
|
"test:debug": "genx test --debug"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@genesislcap/foundation-testing": "14.148.1-alpha-
|
|
34
|
-
"@genesislcap/genx": "14.148.1-alpha-
|
|
35
|
-
"@genesislcap/rollup-builder": "14.148.1-alpha-
|
|
36
|
-
"@genesislcap/ts-builder": "14.148.1-alpha-
|
|
37
|
-
"@genesislcap/uvu-playwright-builder": "14.148.1-alpha-
|
|
38
|
-
"@genesislcap/vite-builder": "14.148.1-alpha-
|
|
39
|
-
"@genesislcap/webpack-builder": "14.148.1-alpha-
|
|
33
|
+
"@genesislcap/foundation-testing": "14.148.1-alpha-eb67ade.0",
|
|
34
|
+
"@genesislcap/genx": "14.148.1-alpha-eb67ade.0",
|
|
35
|
+
"@genesislcap/rollup-builder": "14.148.1-alpha-eb67ade.0",
|
|
36
|
+
"@genesislcap/ts-builder": "14.148.1-alpha-eb67ade.0",
|
|
37
|
+
"@genesislcap/uvu-playwright-builder": "14.148.1-alpha-eb67ade.0",
|
|
38
|
+
"@genesislcap/vite-builder": "14.148.1-alpha-eb67ade.0",
|
|
39
|
+
"@genesislcap/webpack-builder": "14.148.1-alpha-eb67ade.0",
|
|
40
40
|
"rimraf": "^3.0.2"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@genesislcap/foundation-comms": "14.148.1-alpha-
|
|
44
|
-
"@genesislcap/foundation-logger": "14.148.1-alpha-
|
|
45
|
-
"@genesislcap/foundation-ui": "14.148.1-alpha-
|
|
46
|
-
"@genesislcap/foundation-utils": "14.148.1-alpha-
|
|
43
|
+
"@genesislcap/foundation-comms": "14.148.1-alpha-eb67ade.0",
|
|
44
|
+
"@genesislcap/foundation-logger": "14.148.1-alpha-eb67ade.0",
|
|
45
|
+
"@genesislcap/foundation-ui": "14.148.1-alpha-eb67ade.0",
|
|
46
|
+
"@genesislcap/foundation-utils": "14.148.1-alpha-eb67ade.0",
|
|
47
47
|
"@microsoft/fast-colors": "^5.3.1",
|
|
48
48
|
"@microsoft/fast-components": "^2.30.6",
|
|
49
49
|
"@microsoft/fast-element": "^1.12.0",
|
|
@@ -68,5 +68,5 @@
|
|
|
68
68
|
"access": "public"
|
|
69
69
|
},
|
|
70
70
|
"customElements": "dist/custom-elements.json",
|
|
71
|
-
"gitHead": "
|
|
71
|
+
"gitHead": "738a374c816b4510ff58fedde518c01ac80abe6c"
|
|
72
72
|
}
|