@genesislcap/grid-pro 15.79.0 → 15.79.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/custom-elements.json +2619 -2619
- package/dist/dts/grid-pro.d.ts.map +1 -1
- package/dist/dts/react.d.ts +18 -18
- package/dist/esm/grid-pro.js +80 -17
- package/dist/react.cjs +12 -12
- package/dist/react.mjs +10 -10
- package/package.json +12 -12
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"grid-pro.d.ts","sourceRoot":"","sources":["../../src/grid-pro.ts"],"names":[],"mappings":"AAMA,OAAO,EAA8B,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACnF,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,KAAK,EACV,oBAAoB,EACpB,MAAM,EACN,WAAW,EAGX,OAAO,EACP,WAAW,EACX,UAAU,EAEV,gBAAgB,
|
|
1
|
+
{"version":3,"file":"grid-pro.d.ts","sourceRoot":"","sources":["../../src/grid-pro.ts"],"names":[],"mappings":"AAMA,OAAO,EAA8B,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACnF,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,KAAK,EACV,oBAAoB,EACpB,MAAM,EACN,WAAW,EAGX,OAAO,EACP,WAAW,EACX,UAAU,EAEV,gBAAgB,EAEjB,MAAM,mBAAmB,CAAC;AAwD3B,OAAO,EAGL,KAAK,uBAAuB,EAC7B,MAAM,gDAAgD,CAAC;AACxD,OAAO,EAAuB,KAAK,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AAMhG,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAkCrE,OAAO,KAAK,EACV,cAAc,EACd,eAAe,EACf,iBAAiB,EACjB,gBAAgB,EAEhB,yBAAyB,EAG1B,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAKL,iBAAiB,EAE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AAS,CAAC,cAAc,CAAC,WAAW,EAAE,WAAW;IAQjD,IAAI,kBAAkB,aAWrB;IAED,0BAA0B,CAAC,OAAO,KAAA,EAAE,QAAQ,KAAA,EAAE,QAAQ,KAAA;IAqBtD;;;;;;OAMG;IACH,OAAO,CAAC,0BAA0B;IAMlC;;;;OAIG;IACH,OAAO,CAAC,eAAe;IAgCvB,mBAAmB,CAAC,SAAS,KAAA,EAAE,KAAK,KAAA;CAgBrC;AAED;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;kBAwC5B,CAAC"}
|
package/dist/dts/react.d.ts
CHANGED
|
@@ -164,6 +164,24 @@ export declare const AgTextRenderer: React.ForwardRefExoticComponent<
|
|
|
164
164
|
>;
|
|
165
165
|
export type AgTextRendererRef = AgTextRendererWC;
|
|
166
166
|
|
|
167
|
+
export declare const GridProColumn: React.ForwardRefExoticComponent<
|
|
168
|
+
React.PropsWithChildren<
|
|
169
|
+
Omit<PublicOf<GridProColumnWC>, 'children' | 'style'> &
|
|
170
|
+
HTMLWCProps & {
|
|
171
|
+
}
|
|
172
|
+
> & React.RefAttributes<GridProColumnWC>
|
|
173
|
+
>;
|
|
174
|
+
export type GridProColumnRef = GridProColumnWC;
|
|
175
|
+
|
|
176
|
+
export declare const ColumnSelection: React.ForwardRefExoticComponent<
|
|
177
|
+
React.PropsWithChildren<
|
|
178
|
+
Omit<PublicOf<ColumnSelectionWC>, 'children' | 'style'> &
|
|
179
|
+
HTMLWCProps & {
|
|
180
|
+
}
|
|
181
|
+
> & React.RefAttributes<ColumnSelectionWC>
|
|
182
|
+
>;
|
|
183
|
+
export type ColumnSelectionRef = ColumnSelectionWC;
|
|
184
|
+
|
|
167
185
|
export declare const DateEditor: React.ForwardRefExoticComponent<
|
|
168
186
|
React.PropsWithChildren<
|
|
169
187
|
Omit<PublicOf<DateEditorWC>, 'children' | 'style'> &
|
|
@@ -209,24 +227,6 @@ export declare const StringEditor: React.ForwardRefExoticComponent<
|
|
|
209
227
|
>;
|
|
210
228
|
export type StringEditorRef = StringEditorWC;
|
|
211
229
|
|
|
212
|
-
export declare const GridProColumn: React.ForwardRefExoticComponent<
|
|
213
|
-
React.PropsWithChildren<
|
|
214
|
-
Omit<PublicOf<GridProColumnWC>, 'children' | 'style'> &
|
|
215
|
-
HTMLWCProps & {
|
|
216
|
-
}
|
|
217
|
-
> & React.RefAttributes<GridProColumnWC>
|
|
218
|
-
>;
|
|
219
|
-
export type GridProColumnRef = GridProColumnWC;
|
|
220
|
-
|
|
221
|
-
export declare const ColumnSelection: React.ForwardRefExoticComponent<
|
|
222
|
-
React.PropsWithChildren<
|
|
223
|
-
Omit<PublicOf<ColumnSelectionWC>, 'children' | 'style'> &
|
|
224
|
-
HTMLWCProps & {
|
|
225
|
-
}
|
|
226
|
-
> & React.RefAttributes<ColumnSelectionWC>
|
|
227
|
-
>;
|
|
228
|
-
export type ColumnSelectionRef = ColumnSelectionWC;
|
|
229
|
-
|
|
230
230
|
export declare const GridProClientSideDatasource: React.ForwardRefExoticComponent<
|
|
231
231
|
React.PropsWithChildren<
|
|
232
232
|
Omit<PublicOf<GridProClientSideDatasourceWC>, 'children' | 'style'> &
|
package/dist/esm/grid-pro.js
CHANGED
|
@@ -87,6 +87,76 @@ function findDeclaredAccessor(target, key) {
|
|
|
87
87
|
}
|
|
88
88
|
return undefined;
|
|
89
89
|
}
|
|
90
|
+
/** `tooltip` callbacks grid-pro injected, so re-merging the same column does not wrap them again. */
|
|
91
|
+
const errorTooltipCallbacks = new WeakSet();
|
|
92
|
+
/** What AG Grid shows for `tooltip: true`: the formatted cell value, else the raw one. */
|
|
93
|
+
const showDisplayedValue = (params) => { var _a; return (_a = params.valueFormatted) !== null && _a !== void 0 ? _a : params.value; };
|
|
94
|
+
/** Reads a dot-separated path (e.g. `trade.counterparty`) from an object, `undefined` if missing. */
|
|
95
|
+
const getValueAtPath = (data, path) => path.split('.').reduce((value, key) => value === null || value === void 0 ? void 0 : value[key], data);
|
|
96
|
+
/**
|
|
97
|
+
* The column's own cell tooltip content as one callback, following AG Grid's precedence:
|
|
98
|
+
* `tooltip`, then `tooltipField`, then `tooltipValueGetter`.
|
|
99
|
+
* @remarks `tooltipField` is read straight from row data (dot paths included), falling back to
|
|
100
|
+
* `tooltipValueGetter` when the row has no data, like AG Grid; AG Grid's group aggregate and pending
|
|
101
|
+
* batch-edit lookups for it are not reproduced.
|
|
102
|
+
* @internal
|
|
103
|
+
*/
|
|
104
|
+
function getOwnCellTooltip(colDef) {
|
|
105
|
+
const { tooltip, tooltipField, tooltipValueGetter } = colDef;
|
|
106
|
+
if (typeof tooltip === 'function')
|
|
107
|
+
return tooltip;
|
|
108
|
+
if (tooltip === true)
|
|
109
|
+
return showDisplayedValue;
|
|
110
|
+
if (typeof tooltip === 'string')
|
|
111
|
+
return () => tooltip;
|
|
112
|
+
if (tooltipField) {
|
|
113
|
+
const readTooltipField = (params) => params.data == null
|
|
114
|
+
? tooltipValueGetter === null || tooltipValueGetter === void 0 ? void 0 : tooltipValueGetter(params)
|
|
115
|
+
: getValueAtPath(params.data, tooltipField);
|
|
116
|
+
return readTooltipField;
|
|
117
|
+
}
|
|
118
|
+
return tooltipValueGetter;
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Shows the inline-edit error of an editable column in `ErrorTooltip`, while every other cell keeps
|
|
122
|
+
* the column's own tooltip content and component.
|
|
123
|
+
* @remarks `tooltip: false` turns the column's tooltip off on purpose, so it is left untouched.
|
|
124
|
+
* The content goes into `tooltip`, which replaces `tooltipValueGetter` (deprecated in AG Grid 36.2)
|
|
125
|
+
* and takes precedence over `tooltipField`, so the column's own content is resolved inside it.
|
|
126
|
+
* `ErrorTooltip` is picked via `tooltipComponentSelector`, whose result wins over
|
|
127
|
+
* `tooltipComponent`; returning nothing falls back to it.
|
|
128
|
+
* @internal
|
|
129
|
+
*/
|
|
130
|
+
function composeErrorTooltip(colDef, field) {
|
|
131
|
+
if (colDef.tooltip === false ||
|
|
132
|
+
errorTooltipCallbacks.has(colDef.tooltip)) {
|
|
133
|
+
return;
|
|
134
|
+
}
|
|
135
|
+
const ownTooltip = getOwnCellTooltip(colDef);
|
|
136
|
+
const ownComponentSelector = colDef.tooltipComponentSelector;
|
|
137
|
+
const getError = (data) => {
|
|
138
|
+
const error = data === null || data === void 0 ? void 0 : data[ERROR_COLUMN_FIELD];
|
|
139
|
+
return (error === null || error === void 0 ? void 0 : error.column) === field ? error : undefined;
|
|
140
|
+
};
|
|
141
|
+
const tooltip = (params) => {
|
|
142
|
+
const error = getError(params.data);
|
|
143
|
+
return error ? error.message : ownTooltip === null || ownTooltip === void 0 ? void 0 : ownTooltip(params);
|
|
144
|
+
};
|
|
145
|
+
errorTooltipCallbacks.add(tooltip);
|
|
146
|
+
colDef.tooltip = tooltip;
|
|
147
|
+
colDef.tooltipComponentSelector = (params) => getError(params.data) ? { component: ErrorTooltip } : ownComponentSelector === null || ownComponentSelector === void 0 ? void 0 : ownComponentSelector(params);
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* Whether row selection is on, in either the deprecated string form or the `RowSelectionOptions`
|
|
151
|
+
* object form.
|
|
152
|
+
* @internal
|
|
153
|
+
*/
|
|
154
|
+
function isRowSelectionEnabled(rowSelection) {
|
|
155
|
+
if (rowSelection === 'single' || rowSelection === 'multiple')
|
|
156
|
+
return true;
|
|
157
|
+
return (typeof rowSelection === 'object' &&
|
|
158
|
+
((rowSelection === null || rowSelection === void 0 ? void 0 : rowSelection.mode) === 'singleRow' || (rowSelection === null || rowSelection === void 0 ? void 0 : rowSelection.mode) === 'multiRow'));
|
|
159
|
+
}
|
|
90
160
|
/**
|
|
91
161
|
* The Grid Pro element (AG Grid v36 compatible).
|
|
92
162
|
* @remarks Grid Pro is a Web Component wrapper around the AG Grid Community library.
|
|
@@ -970,14 +1040,13 @@ export class GridPro extends LifecycleMixin(FoundationElement) {
|
|
|
970
1040
|
* @returns Array of selected row data
|
|
971
1041
|
*/
|
|
972
1042
|
getSelectedRows() {
|
|
973
|
-
var _a, _b, _c, _d;
|
|
1043
|
+
var _a, _b, _c, _d, _e;
|
|
974
1044
|
try {
|
|
975
1045
|
if (!this.initialised || !this.gridApi) {
|
|
976
1046
|
return [];
|
|
977
1047
|
}
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
if (rowSelectionMode === 'single' || rowSelectionMode === 'multiple') {
|
|
1048
|
+
// If row selection is enabled (string or object form), use row selection only
|
|
1049
|
+
if (isRowSelectionEnabled((_a = this.gridOptions) === null || _a === void 0 ? void 0 : _a.rowSelection)) {
|
|
981
1050
|
if (this.gridApi.getSelectedRows && this.gridApi.getSelectedRows().length > 0) {
|
|
982
1051
|
return this.gridApi.getSelectedRows();
|
|
983
1052
|
}
|
|
@@ -989,8 +1058,8 @@ export class GridPro extends LifecycleMixin(FoundationElement) {
|
|
|
989
1058
|
}
|
|
990
1059
|
// Fallback: if no cell ranges but range selection is disabled,
|
|
991
1060
|
// check for focused cell (single cell selection)
|
|
992
|
-
if (!((_c = this.gridOptions) === null || _c === void 0 ? void 0 : _c.enableRangeSelection)) {
|
|
993
|
-
const focusedCell = (
|
|
1061
|
+
if (!((_c = this.gridOptions) === null || _c === void 0 ? void 0 : _c.cellSelection) && !((_d = this.gridOptions) === null || _d === void 0 ? void 0 : _d.enableRangeSelection)) {
|
|
1062
|
+
const focusedCell = (_e = this.gridApi) === null || _e === void 0 ? void 0 : _e.getFocusedCell();
|
|
994
1063
|
if (focusedCell) {
|
|
995
1064
|
const rowNode = this.gridApi.getDisplayedRowAtIndex(focusedCell.rowIndex);
|
|
996
1065
|
if (rowNode === null || rowNode === void 0 ? void 0 : rowNode.data) {
|
|
@@ -1454,25 +1523,19 @@ export class GridPro extends LifecycleMixin(FoundationElement) {
|
|
|
1454
1523
|
if (columnDef.editable) {
|
|
1455
1524
|
if (!columnDef.cellRenderer && !columnDef.cellRendererSelector) {
|
|
1456
1525
|
columnDef.cellRendererSelector = (params) => {
|
|
1457
|
-
|
|
1526
|
+
var _a;
|
|
1527
|
+
if (((_a = params.data) === null || _a === void 0 ? void 0 : _a[EDITED_COLUMN_FIELD]) === columnDef.field) {
|
|
1458
1528
|
return {
|
|
1459
1529
|
component: GridProRendererTypes.editable,
|
|
1460
1530
|
};
|
|
1461
1531
|
}
|
|
1462
1532
|
};
|
|
1463
1533
|
}
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
columnDef.tooltipValueGetter = (params) => {
|
|
1467
|
-
const error = params.data[ERROR_COLUMN_FIELD];
|
|
1468
|
-
if (error && error.column === columnDef.field) {
|
|
1469
|
-
return error.message;
|
|
1470
|
-
}
|
|
1471
|
-
};
|
|
1472
|
-
}
|
|
1534
|
+
// The template column is typed with the shared v29 `ColDef`, which predates `tooltip`.
|
|
1535
|
+
composeErrorTooltip(columnDef, columnDef.field);
|
|
1473
1536
|
if (!columnDef.cellClassRules) {
|
|
1474
1537
|
columnDef.cellClassRules = {
|
|
1475
|
-
error: (params) => { var _a; return ((_a = params.data[ERROR_COLUMN_FIELD]) === null ||
|
|
1538
|
+
error: (params) => { var _a, _b; return ((_b = (_a = params.data) === null || _a === void 0 ? void 0 : _a[ERROR_COLUMN_FIELD]) === null || _b === void 0 ? void 0 : _b.column) === params.colDef.field; },
|
|
1476
1539
|
};
|
|
1477
1540
|
}
|
|
1478
1541
|
}
|
package/dist/react.cjs
CHANGED
|
@@ -139,6 +139,16 @@ const AgTextRenderer = React.forwardRef(function AgTextRenderer(props, ref) {
|
|
|
139
139
|
return React.createElement(customElements.getName(AgTextRendererWC) ?? '%%prefix%%-grid-text-renderer', { ...rest, ref }, children);
|
|
140
140
|
});
|
|
141
141
|
|
|
142
|
+
const GridProColumn = React.forwardRef(function GridProColumn(props, ref) {
|
|
143
|
+
const { children, ...rest } = props;
|
|
144
|
+
return React.createElement(customElements.getName(GridProColumnWC) ?? 'grid-pro-column', { ...rest, ref }, children);
|
|
145
|
+
});
|
|
146
|
+
|
|
147
|
+
const ColumnSelection = React.forwardRef(function ColumnSelection(props, ref) {
|
|
148
|
+
const { children, ...rest } = props;
|
|
149
|
+
return React.createElement(customElements.getName(ColumnSelectionWC) ?? '%%prefix%%-column-selection', { ...rest, ref }, children);
|
|
150
|
+
});
|
|
151
|
+
|
|
142
152
|
const DateEditor = React.forwardRef(function DateEditor(props, ref) {
|
|
143
153
|
const { children, ...rest } = props;
|
|
144
154
|
return React.createElement(customElements.getName(DateEditorWC) ?? '%%prefix%%-date-editor', { ...rest, ref }, children);
|
|
@@ -164,16 +174,6 @@ const StringEditor = React.forwardRef(function StringEditor(props, ref) {
|
|
|
164
174
|
return React.createElement(customElements.getName(StringEditorWC) ?? '%%prefix%%-string-editor', { ...rest, ref }, children);
|
|
165
175
|
});
|
|
166
176
|
|
|
167
|
-
const GridProColumn = React.forwardRef(function GridProColumn(props, ref) {
|
|
168
|
-
const { children, ...rest } = props;
|
|
169
|
-
return React.createElement(customElements.getName(GridProColumnWC) ?? 'grid-pro-column', { ...rest, ref }, children);
|
|
170
|
-
});
|
|
171
|
-
|
|
172
|
-
const ColumnSelection = React.forwardRef(function ColumnSelection(props, ref) {
|
|
173
|
-
const { children, ...rest } = props;
|
|
174
|
-
return React.createElement(customElements.getName(ColumnSelectionWC) ?? '%%prefix%%-column-selection', { ...rest, ref }, children);
|
|
175
|
-
});
|
|
176
|
-
|
|
177
177
|
const GridProClientSideDatasource = React.forwardRef(function GridProClientSideDatasource(props, ref) {
|
|
178
178
|
const { onBaseDatasourceError, onDatasourceError, onBaseDatasourceConnected, onDatasourceLoadingFinished, onDatasourceNoDataAvailable, onDatasourceDataChanged, onDatasourceInitialize, onDatasourceDestroy, onDatasourceDataCleared, onDatasourceSchemaUpdated, onDatasourceFiltersRestored, onDatasourceDataLoaded, onDatasourceLoadingStarted, onDatasourceMoreDataAvailable, onDatasourceReady, onDatasourceInit, onMoreRowsChanged, onDatasourceSizeChanged, children, ...rest } = props;
|
|
179
179
|
const _innerRef = React.useRef(null);
|
|
@@ -599,13 +599,13 @@ module.exports = {
|
|
|
599
599
|
StatusPillRenderer,
|
|
600
600
|
AgTextFieldRenderer,
|
|
601
601
|
AgTextRenderer,
|
|
602
|
+
GridProColumn,
|
|
603
|
+
ColumnSelection,
|
|
602
604
|
DateEditor,
|
|
603
605
|
MultiselectEditor,
|
|
604
606
|
NumberEditor,
|
|
605
607
|
SelectEditor,
|
|
606
608
|
StringEditor,
|
|
607
|
-
GridProColumn,
|
|
608
|
-
ColumnSelection,
|
|
609
609
|
GridProClientSideDatasource,
|
|
610
610
|
GridProInfiniteDatasource,
|
|
611
611
|
GridProServerSideDatasource,
|
package/dist/react.mjs
CHANGED
|
@@ -137,6 +137,16 @@ export const AgTextRenderer = React.forwardRef(function AgTextRenderer(props, re
|
|
|
137
137
|
return React.createElement(customElements.getName(AgTextRendererWC) ?? '%%prefix%%-grid-text-renderer', { ...rest, ref }, children);
|
|
138
138
|
});
|
|
139
139
|
|
|
140
|
+
export const GridProColumn = React.forwardRef(function GridProColumn(props, ref) {
|
|
141
|
+
const { children, ...rest } = props;
|
|
142
|
+
return React.createElement(customElements.getName(GridProColumnWC) ?? 'grid-pro-column', { ...rest, ref }, children);
|
|
143
|
+
});
|
|
144
|
+
|
|
145
|
+
export const ColumnSelection = React.forwardRef(function ColumnSelection(props, ref) {
|
|
146
|
+
const { children, ...rest } = props;
|
|
147
|
+
return React.createElement(customElements.getName(ColumnSelectionWC) ?? '%%prefix%%-column-selection', { ...rest, ref }, children);
|
|
148
|
+
});
|
|
149
|
+
|
|
140
150
|
export const DateEditor = React.forwardRef(function DateEditor(props, ref) {
|
|
141
151
|
const { children, ...rest } = props;
|
|
142
152
|
return React.createElement(customElements.getName(DateEditorWC) ?? '%%prefix%%-date-editor', { ...rest, ref }, children);
|
|
@@ -162,16 +172,6 @@ export const StringEditor = React.forwardRef(function StringEditor(props, ref) {
|
|
|
162
172
|
return React.createElement(customElements.getName(StringEditorWC) ?? '%%prefix%%-string-editor', { ...rest, ref }, children);
|
|
163
173
|
});
|
|
164
174
|
|
|
165
|
-
export const GridProColumn = React.forwardRef(function GridProColumn(props, ref) {
|
|
166
|
-
const { children, ...rest } = props;
|
|
167
|
-
return React.createElement(customElements.getName(GridProColumnWC) ?? 'grid-pro-column', { ...rest, ref }, children);
|
|
168
|
-
});
|
|
169
|
-
|
|
170
|
-
export const ColumnSelection = React.forwardRef(function ColumnSelection(props, ref) {
|
|
171
|
-
const { children, ...rest } = props;
|
|
172
|
-
return React.createElement(customElements.getName(ColumnSelectionWC) ?? '%%prefix%%-column-selection', { ...rest, ref }, children);
|
|
173
|
-
});
|
|
174
|
-
|
|
175
175
|
export const GridProClientSideDatasource = React.forwardRef(function GridProClientSideDatasource(props, ref) {
|
|
176
176
|
const { onBaseDatasourceError, onDatasourceError, onBaseDatasourceConnected, onDatasourceLoadingFinished, onDatasourceNoDataAvailable, onDatasourceDataChanged, onDatasourceInitialize, onDatasourceDestroy, onDatasourceDataCleared, onDatasourceSchemaUpdated, onDatasourceFiltersRestored, onDatasourceDataLoaded, onDatasourceLoadingStarted, onDatasourceMoreDataAvailable, onDatasourceReady, onDatasourceInit, onMoreRowsChanged, onDatasourceSizeChanged, children, ...rest } = props;
|
|
177
177
|
const _innerRef = React.useRef(null);
|
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": "15.79.
|
|
4
|
+
"version": "15.79.2",
|
|
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": "15.79.
|
|
42
|
-
"@genesislcap/genx": "15.79.
|
|
43
|
-
"@genesislcap/ts-builder": "15.79.
|
|
44
|
-
"@genesislcap/uvu-playwright-builder": "15.79.
|
|
45
|
-
"@genesislcap/vite-builder": "15.79.
|
|
46
|
-
"@genesislcap/webpack-builder": "15.79.
|
|
41
|
+
"@genesislcap/foundation-testing": "15.79.2",
|
|
42
|
+
"@genesislcap/genx": "15.79.2",
|
|
43
|
+
"@genesislcap/ts-builder": "15.79.2",
|
|
44
|
+
"@genesislcap/uvu-playwright-builder": "15.79.2",
|
|
45
|
+
"@genesislcap/vite-builder": "15.79.2",
|
|
46
|
+
"@genesislcap/webpack-builder": "15.79.2"
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@genesislcap/foundation-comms": "15.79.
|
|
50
|
-
"@genesislcap/foundation-criteria": "15.79.
|
|
51
|
-
"@genesislcap/foundation-logger": "15.79.
|
|
52
|
-
"@genesislcap/foundation-ui": "15.79.
|
|
53
|
-
"@genesislcap/foundation-utils": "15.79.
|
|
49
|
+
"@genesislcap/foundation-comms": "15.79.2",
|
|
50
|
+
"@genesislcap/foundation-criteria": "15.79.2",
|
|
51
|
+
"@genesislcap/foundation-logger": "15.79.2",
|
|
52
|
+
"@genesislcap/foundation-ui": "15.79.2",
|
|
53
|
+
"@genesislcap/foundation-utils": "15.79.2",
|
|
54
54
|
"@microsoft/fast-colors": "5.3.1",
|
|
55
55
|
"@microsoft/fast-components": "2.30.6",
|
|
56
56
|
"@microsoft/fast-element": "1.14.0",
|