@genesislcap/foundation-ui 15.10.4 → 15.10.6
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 +708 -689
- package/dist/dts/combobox/combobox.d.ts.map +1 -1
- package/dist/dts/options-datasource/options-datasource.d.ts +8 -2
- package/dist/dts/options-datasource/options-datasource.d.ts.map +1 -1
- package/dist/dts/utils/base-datasource.d.ts.map +1 -1
- package/dist/esm/combobox/combobox.js +21 -3
- package/dist/esm/options-datasource/options-datasource.js +36 -10
- package/dist/esm/utils/base-datasource.js +13 -9
- package/dist/foundation-ui.d.ts +8 -2
- package/package.json +19 -19
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"combobox.d.ts","sourceRoot":"","sources":["../../../src/combobox/combobox.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,IAAI,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAEtE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAclE,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAI9C;;;;;GAKG;AACH,qBAAa,QAAS,SAAQ,YAAY;;IACxC,OAAO,CAAC,SAAS,CAAS;IAI1B,OAAO,CAAC,6BAA6B,CAAkB;IACvD,IACI,gBAAgB,WAKnB;IAEW,iBAAiB,EAAE,eAAe,CAAC;IAC/C;;;;;;;;;OASG;IACwB,KAAK,UAAS;IACnC,QAAQ,EAAE,MAAM,CAAiB;IACvC,eAAe,CAAC,QAAQ,KAAA,EAAE,QAAQ,EAAE,MAAM;IAG1C,qBAAqB,MAAC;IACtB,iFAAiF;IAE1E,aAAa,EAAE,OAAO,CAAS;IAEtC,wFAAwF;IAEjF,gBAAgB,EAAE,OAAO,CAAS;IAEzC,2DAA2D;IAEpD,UAAU,EAAE,UAAU,CAAgB;IAE7C;;;OAGG;IAEH,2BAA2B,EAAE,OAAO,CAAS;IAE7C;;;OAGG;IA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AO,GAAG,qBAAqB,CAGjE;IAEF;;;OAGG;IAEH,0BAA0B,EAAE,OAAO,CAAS;IAE5C;;;OAGG;IAEH,iCAAiC,EAAE,OAAO,GAAG,qBAAqB,CAGhE;IAEF;;;;OAIG;IACH,IAAW,iBAAiB,IAAI,WAAW,GAAG,IAAI,CAEjD;IAED,WAAW;IAqBX,IAAW,KAAK,IAKO,MAAM,CAF5B;IAED,IAAW,KAAK,CAAC,IAAI,EAAE,MAAM,EA6B5B;IAEe,qBAAqB,CAAC,IAAI,EAAE,OAAO,EAAE,GAAG,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI;IAUzF;;;;;;OAMG;IACH,OAAO,CAAC,sCAAsC;IAY9B,aAAa,IAAI,IAAI;IA2BrB,YAAY,CAAC,CAAC,EAAE,UAAU,GAAG,OAAO,GAAG,IAAI;IAuB3C,cAAc,CAAC,CAAC,EAAE,aAAa,GAAG,OAAO,GAAG,IAAI;IAgDhD,YAAY,CAAC,CAAC,EAAE,aAAa,GAAG,OAAO,GAAG,IAAI;IAgC9D;;;;OAIG;IACH,SAAS,KAAK,SAAS,IAAI,OAAO,CAGjC;IAED;;;;;OAKG;IACH,SAAS,CAAC,iBAAiB,CAAC,KAAK,EAAE,MAAM;IAKhC,YAAY,CAAC,CAAC,EAAE,UAAU,GAAG,OAAO,GAAG,IAAI;IAQpD,cAAc;IA0Bd,aAAa,aAOX;IAEF,OAAO,CAAC,2BAA2B;CAUpC;AAGD,eAAO,MAAM,+BAA+B,EAAE,cAG7C,CAAC;AAEF,eAAO,MAAM,qBAAqB;;CAajC,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB,8SAM7B,CAAC"}
|
|
@@ -82,11 +82,17 @@ export declare class OptionsDatasource extends BaseDatasource {
|
|
|
82
82
|
*/
|
|
83
83
|
private applyInfiniteScrollFetchMode;
|
|
84
84
|
private attachListboxScrollListener;
|
|
85
|
+
/**
|
|
86
|
+
* Also true when the options do not fill the listbox: it cannot be scrolled, so the
|
|
87
|
+
* bottom is already in view.
|
|
88
|
+
*/
|
|
89
|
+
private isNearListboxBottom;
|
|
85
90
|
private listboxScrollHandler;
|
|
86
91
|
private loadNextPage;
|
|
87
92
|
/**
|
|
88
|
-
*
|
|
89
|
-
*
|
|
93
|
+
* Keeps requesting pages while the bottom of the listbox is in view — either because
|
|
94
|
+
* the loaded options do not fill it, or because the user is already scrolled there and
|
|
95
|
+
* appending rows fires no further scroll event.
|
|
90
96
|
*/
|
|
91
97
|
private topUpVisibleListbox;
|
|
92
98
|
private resizeObserverCallback;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"options-datasource.d.ts","sourceRoot":"","sources":["../../../src/options-datasource/options-datasource.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAgB,MAAM,+BAA+B,CAAC;AAY/E,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EACL,cAAc,EAKf,MAAM,UAAU,CAAC;AAElB;;;GAGG;AACH,MAAM,WAAW,sBAAsB;IACrC,KAAK,EAAE,GAAG,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;;;;;;GAOG;AACH,qBAGa,iBAAkB,SAAQ,cAAc;IACjC,SAAS,EAAG,gBAAgB,CAAC;IAEX,UAAU,EAAE,MAAM,CAAC;IAChB,aAAa,EAAE,MAAM,CAAC;IACzB,UAAU,EAAE,MAAM,CAAC;IACd,cAAc,EAAE,MAAM,CAAyB;IAC1B,kBAAkB,UAAS;IAEzF;;;;;;;;;;;;OAYG;IACsD,cAAc,UAAS;IAEhF;;OAEG;IAEH,QAAQ,SAAqC;IACjC,cAAc,MAAC;IACf,iBAAiB,EAAE,CAAC,GAAG,KAAA,KAAK,MAAM,CAAC;IAEnC,oBAAoB,EAAE,MAAM,GAAG,MAAM,CAAC;IAClD,2BAA2B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AM,GAAE,kCAAuC,GAAG,IAAI;IAQlE,gBAAgB,CAAC,SAAS,EAAE,MAAM,GAAG,aAAa;IAIlD,qBAAqB,CAAC,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,aAAa;CAOtD"}
|
|
@@ -144,9 +144,12 @@ export class Combobox extends FASTComboBox {
|
|
|
144
144
|
}
|
|
145
145
|
slottedOptionsChanged(prev, next) {
|
|
146
146
|
this.enableAsyncForInfiniteScrollDatasource();
|
|
147
|
-
const shouldEmit = this.async ? true : false;
|
|
148
147
|
super.slottedOptionsChanged(prev, next);
|
|
149
|
-
|
|
148
|
+
// Never emit `change` here. Async typeahead / infinite-scroll paging reloads options
|
|
149
|
+
// without a user selection, and a consumer that writes the value back (JSON Forms feeds
|
|
150
|
+
// it to `initialSelectedValue`) then clears and refetches from OFFSET 0, appending the
|
|
151
|
+
// first page again. Keep the typed/selected text without notifying.
|
|
152
|
+
this['updateValue'](false);
|
|
150
153
|
}
|
|
151
154
|
/**
|
|
152
155
|
* When the slotted datasource pages its options (infinite scroll), only a page of the
|
|
@@ -165,6 +168,13 @@ export class Combobox extends FASTComboBox {
|
|
|
165
168
|
}
|
|
166
169
|
}
|
|
167
170
|
filterOptions() {
|
|
171
|
+
// Server-side filtering already applied the criteria; hiding options locally would
|
|
172
|
+
// conceal the next infinite-scroll page (and duplicate the visible first page).
|
|
173
|
+
if (this.async) {
|
|
174
|
+
this.filteredOptions = [...this._options];
|
|
175
|
+
this._options.forEach((o) => (o.hidden = false));
|
|
176
|
+
return;
|
|
177
|
+
}
|
|
168
178
|
if (!this.autocomplete || this.autocomplete === ComboboxAutocomplete.none) {
|
|
169
179
|
this['filter'] = '';
|
|
170
180
|
}
|
|
@@ -308,7 +318,15 @@ export class Combobox extends FASTComboBox {
|
|
|
308
318
|
.assignedNodes()
|
|
309
319
|
.filter((x) => x instanceof OptionsDatasource);
|
|
310
320
|
if (datasourceNode.length > 0) {
|
|
311
|
-
|
|
321
|
+
const datasource = datasourceNode[0];
|
|
322
|
+
// An empty input must not become `containsIgnoreCase(field, '')` — that is a
|
|
323
|
+
// criteria change and refetches OFFSET 0, replacing/appending the first page.
|
|
324
|
+
if (cachedControlValue == null || cachedControlValue === '') {
|
|
325
|
+
datasource.criteria = datasource.baseCriteria || '';
|
|
326
|
+
}
|
|
327
|
+
else {
|
|
328
|
+
criteriaMatchBuilder(datasource, cachedControlValue);
|
|
329
|
+
}
|
|
312
330
|
DOM.queueUpdate(() => {
|
|
313
331
|
this.control.value = cachedControlValue;
|
|
314
332
|
});
|
|
@@ -62,9 +62,7 @@ let OptionsDatasource = OptionsDatasource_1 = class OptionsDatasource extends Ba
|
|
|
62
62
|
const listbox = this.listboxElement;
|
|
63
63
|
if (!listbox)
|
|
64
64
|
return;
|
|
65
|
-
|
|
66
|
-
listbox.scrollHeight - OptionsDatasource_1.scrollLoadThresholdPx;
|
|
67
|
-
if (nearBottom) {
|
|
65
|
+
if (this.isNearListboxBottom(listbox)) {
|
|
68
66
|
this.loadNextPage();
|
|
69
67
|
}
|
|
70
68
|
};
|
|
@@ -111,6 +109,7 @@ let OptionsDatasource = OptionsDatasource_1 = class OptionsDatasource extends Ba
|
|
|
111
109
|
this.select.addEventListener('change', this.selectChangeHandler);
|
|
112
110
|
this.resizeObserver = new ResizeObserver(this.resizeObserverCallback);
|
|
113
111
|
if (this.infiniteScroll) {
|
|
112
|
+
this.isSnapshot = true;
|
|
114
113
|
this.maxRows = this.pageSize > 0 ? this.pageSize : OptionsDatasource_1.defaultPageSize;
|
|
115
114
|
// Note: the combobox switches itself to async (server-side) filtering when it
|
|
116
115
|
// detects a slotted infinite-scroll datasource — see Combobox.slottedOptionsChanged
|
|
@@ -171,6 +170,14 @@ let OptionsDatasource = OptionsDatasource_1 = class OptionsDatasource extends Ba
|
|
|
171
170
|
}
|
|
172
171
|
this.listboxElement.addEventListener('scroll', this.listboxScrollHandler);
|
|
173
172
|
}
|
|
173
|
+
/**
|
|
174
|
+
* Also true when the options do not fill the listbox: it cannot be scrolled, so the
|
|
175
|
+
* bottom is already in view.
|
|
176
|
+
*/
|
|
177
|
+
isNearListboxBottom(listbox) {
|
|
178
|
+
return (listbox.scrollTop + listbox.clientHeight >=
|
|
179
|
+
listbox.scrollHeight - OptionsDatasource_1.scrollLoadThresholdPx);
|
|
180
|
+
}
|
|
174
181
|
loadNextPage() {
|
|
175
182
|
return __awaiter(this, void 0, void 0, function* () {
|
|
176
183
|
if (this.loadingMoreRows || !this.canRequestMoreRows())
|
|
@@ -194,8 +201,9 @@ let OptionsDatasource = OptionsDatasource_1 = class OptionsDatasource extends Ba
|
|
|
194
201
|
});
|
|
195
202
|
}
|
|
196
203
|
/**
|
|
197
|
-
*
|
|
198
|
-
*
|
|
204
|
+
* Keeps requesting pages while the bottom of the listbox is in view — either because
|
|
205
|
+
* the loaded options do not fill it, or because the user is already scrolled there and
|
|
206
|
+
* appending rows fires no further scroll event.
|
|
199
207
|
*/
|
|
200
208
|
topUpVisibleListbox() {
|
|
201
209
|
if (!this.infiniteScroll)
|
|
@@ -207,7 +215,7 @@ let OptionsDatasource = OptionsDatasource_1 = class OptionsDatasource extends Ba
|
|
|
207
215
|
// clientHeight is 0 while the dropdown is closed; scrolling isn't possible then anyway
|
|
208
216
|
if (!listbox || listbox.clientHeight === 0)
|
|
209
217
|
return;
|
|
210
|
-
if (
|
|
218
|
+
if (!this.isNearListboxBottom(listbox))
|
|
211
219
|
return;
|
|
212
220
|
// If the last top-up didn't grow the listbox (e.g. options hidden by CSS),
|
|
213
221
|
// fetching further pages would loop until the resource is exhausted
|
|
@@ -246,6 +254,7 @@ let OptionsDatasource = OptionsDatasource_1 = class OptionsDatasource extends Ba
|
|
|
246
254
|
// Rows accumulated from a previous stream must not leak into the next fetch
|
|
247
255
|
// (e.g. when the criteria changes in async mode).
|
|
248
256
|
this.rowsSyncedWithStream.clear();
|
|
257
|
+
this.options = [];
|
|
249
258
|
this.renderedOptionsCount = 0;
|
|
250
259
|
this.lastTopUpScrollHeight = -1;
|
|
251
260
|
this.emptyDataOption = null;
|
|
@@ -308,6 +317,9 @@ let OptionsDatasource = OptionsDatasource_1 = class OptionsDatasource extends Ba
|
|
|
308
317
|
const isFirstRenderAfterClear = this.renderedOptionsCount === 0;
|
|
309
318
|
this.renderListboxOptions(this.options.slice(this.renderedOptionsCount));
|
|
310
319
|
this.renderedOptionsCount = this.options.length;
|
|
320
|
+
// Keep the OFFSET cursor in step with what is loaded: the first page arrives from the
|
|
321
|
+
// initial fetch, which never sets nextRequestOffset, so the next page would repeat it.
|
|
322
|
+
this.nextRequestOffset = Math.max(this.nextRequestOffset, this.renderedOptionsCount);
|
|
311
323
|
this.topUpVisibleListbox();
|
|
312
324
|
if (!this.initalSelectedValueInitialized ||
|
|
313
325
|
(this.select instanceof FASTComboBox && !this.select.async && isFirstRenderAfterClear)) {
|
|
@@ -315,7 +327,10 @@ let OptionsDatasource = OptionsDatasource_1 = class OptionsDatasource extends Ba
|
|
|
315
327
|
const initialLabel = this.getInitialLabel();
|
|
316
328
|
DOM.queueUpdate(() => {
|
|
317
329
|
this.select.value = String(initialLabel);
|
|
318
|
-
|
|
330
|
+
// Only report a resolved selection. An empty label means nothing is selected yet
|
|
331
|
+
// (no initial value, or its row is not in the loaded page), and `value-change`
|
|
332
|
+
// with an empty payload is indistinguishable from the user clearing the field.
|
|
333
|
+
if (initialLabel && this.select instanceof FASTComboBox && this.select.async) {
|
|
319
334
|
this.selectChangeHandler({ target: { value: initialLabel } });
|
|
320
335
|
}
|
|
321
336
|
});
|
|
@@ -366,15 +381,26 @@ let OptionsDatasource = OptionsDatasource_1 = class OptionsDatasource extends Ba
|
|
|
366
381
|
* infinite scroll paging, where each page contains only the new rows.
|
|
367
382
|
*/
|
|
368
383
|
handleStreamInserts(insertedRows) {
|
|
369
|
-
var _a;
|
|
384
|
+
var _a, _b;
|
|
370
385
|
this.loadingMoreRows = false;
|
|
371
386
|
if (!(insertedRows === null || insertedRows === void 0 ? void 0 : insertedRows.length))
|
|
372
387
|
return;
|
|
373
388
|
this.removeEmptyDataOption();
|
|
374
|
-
const
|
|
375
|
-
|
|
389
|
+
const existingValues = new Set(((_a = this.options) !== null && _a !== void 0 ? _a : []).map((option) => String(option.value)));
|
|
390
|
+
const newRows = insertedRows.filter((row) => !existingValues.has(String(row[this.valueField])));
|
|
391
|
+
if (!newRows.length) {
|
|
392
|
+
// Every row was already loaded, so requesting further pages would append the same
|
|
393
|
+
// rows indefinitely (a resource that ignores OFFSET and reports no MORE_ROWS keeps
|
|
394
|
+
// looking like it has another full page).
|
|
395
|
+
logger.warn(`Infinite scroll for ${this.resourceName} received a page of options that were all already loaded, so paging has stopped. Request Server resources only honour OFFSET when declared with criteriaOnlyRequest; otherwise every page returns the same rows. Also set a stable order-by so pages cannot overlap.`);
|
|
396
|
+
this.moreRowsAvailable = false;
|
|
397
|
+
return;
|
|
398
|
+
}
|
|
399
|
+
const newOptions = newRows.map((row) => this.rowToOption(row));
|
|
400
|
+
this.options = [...((_b = this.options) !== null && _b !== void 0 ? _b : []), ...newOptions];
|
|
376
401
|
this.renderListboxOptions(newOptions);
|
|
377
402
|
this.renderedOptionsCount = this.options.length;
|
|
403
|
+
this.nextRequestOffset = Math.max(this.nextRequestOffset, this.renderedOptionsCount);
|
|
378
404
|
this.topUpVisibleListbox();
|
|
379
405
|
}
|
|
380
406
|
/**
|
|
@@ -275,19 +275,23 @@ export class BaseDatasource extends DatasourceEventHandler(FoundationElement) {
|
|
|
275
275
|
return;
|
|
276
276
|
}
|
|
277
277
|
const pagingResult = result;
|
|
278
|
+
const nextOffset = pagingResult.NEXT_OFFSET;
|
|
279
|
+
const nextOffsetAdvances = typeof nextOffset === 'number' && nextOffset > requestedOffset;
|
|
278
280
|
const requestedMaxRows = Number(this.maxRows) || 0;
|
|
279
|
-
|
|
280
|
-
//
|
|
281
|
-
//
|
|
281
|
+
const fullPage = rowCount > 0 && requestedMaxRows > 0 && rowCount >= requestedMaxRows;
|
|
282
|
+
// Only a fallback: an entity-db request/reply reads MAX_ROWS + 1 rows, so MORE_ROWS is
|
|
283
|
+
// accurate whenever it is sent. It is absent on a non-SQL storage engine (those replies
|
|
284
|
+
// carry no paging metadata at all), under VIEW_NUMBER paging of a filtered resource, and
|
|
285
|
+
// from custom request/replies. -1 is the legacy "no more data" sentinel, read the same
|
|
286
|
+
// way by grid-pro's req/rep server-side datasource.
|
|
282
287
|
this.moreRowsAvailable =
|
|
283
288
|
typeof pagingResult.MORE_ROWS === 'boolean'
|
|
284
289
|
? pagingResult.MORE_ROWS
|
|
285
|
-
:
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
: requestedOffset + rowCount;
|
|
290
|
+
: nextOffset !== -1 && (nextOffsetAdvances || fullPage);
|
|
291
|
+
// NEXT_OFFSET is not just requestedOffset + rowCount: the server counts the rows it
|
|
292
|
+
// read from the database, so the cursor also steps over rows it dropped (auth/row
|
|
293
|
+
// filters). Falling back to the arithmetic would re-request rows already served.
|
|
294
|
+
this.nextRequestOffset = nextOffsetAdvances ? nextOffset : requestedOffset + rowCount;
|
|
291
295
|
}
|
|
292
296
|
initialRequestOffset() {
|
|
293
297
|
var _a, _b;
|
package/dist/foundation-ui.d.ts
CHANGED
|
@@ -5972,11 +5972,17 @@ export declare class OptionsDatasource extends BaseDatasource {
|
|
|
5972
5972
|
*/
|
|
5973
5973
|
private applyInfiniteScrollFetchMode;
|
|
5974
5974
|
private attachListboxScrollListener;
|
|
5975
|
+
/**
|
|
5976
|
+
* Also true when the options do not fill the listbox: it cannot be scrolled, so the
|
|
5977
|
+
* bottom is already in view.
|
|
5978
|
+
*/
|
|
5979
|
+
private isNearListboxBottom;
|
|
5975
5980
|
private listboxScrollHandler;
|
|
5976
5981
|
private loadNextPage;
|
|
5977
5982
|
/**
|
|
5978
|
-
*
|
|
5979
|
-
*
|
|
5983
|
+
* Keeps requesting pages while the bottom of the listbox is in view — either because
|
|
5984
|
+
* the loaded options do not fill it, or because the user is already scrolled there and
|
|
5985
|
+
* appending rows fires no further scroll event.
|
|
5980
5986
|
*/
|
|
5981
5987
|
private topUpVisibleListbox;
|
|
5982
5988
|
private resizeObserverCallback;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@genesislcap/foundation-ui",
|
|
3
3
|
"description": "Genesis Foundation UI",
|
|
4
|
-
"version": "15.10.
|
|
4
|
+
"version": "15.10.6",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"license": "SEE LICENSE IN license.txt",
|
|
7
7
|
"main": "dist/esm/index.js",
|
|
@@ -85,13 +85,13 @@
|
|
|
85
85
|
}
|
|
86
86
|
},
|
|
87
87
|
"devDependencies": {
|
|
88
|
-
"@genesislcap/foundation-testing": "15.10.
|
|
89
|
-
"@genesislcap/genx": "15.10.
|
|
90
|
-
"@genesislcap/rollup-builder": "15.10.
|
|
91
|
-
"@genesislcap/ts-builder": "15.10.
|
|
92
|
-
"@genesislcap/uvu-playwright-builder": "15.10.
|
|
93
|
-
"@genesislcap/vite-builder": "15.10.
|
|
94
|
-
"@genesislcap/webpack-builder": "15.10.
|
|
88
|
+
"@genesislcap/foundation-testing": "15.10.6",
|
|
89
|
+
"@genesislcap/genx": "15.10.6",
|
|
90
|
+
"@genesislcap/rollup-builder": "15.10.6",
|
|
91
|
+
"@genesislcap/ts-builder": "15.10.6",
|
|
92
|
+
"@genesislcap/uvu-playwright-builder": "15.10.6",
|
|
93
|
+
"@genesislcap/vite-builder": "15.10.6",
|
|
94
|
+
"@genesislcap/webpack-builder": "15.10.6",
|
|
95
95
|
"copyfiles": "^2.4.1"
|
|
96
96
|
},
|
|
97
97
|
"dependencies": {
|
|
@@ -100,16 +100,16 @@
|
|
|
100
100
|
"@fortawesome/free-regular-svg-icons": "^6.2.1",
|
|
101
101
|
"@fortawesome/free-solid-svg-icons": "^6.2.1",
|
|
102
102
|
"@genesiscommunitysuccess/analyzer-import-alias-plugin": "^5.0.3",
|
|
103
|
-
"@genesislcap/expression-builder": "15.10.
|
|
104
|
-
"@genesislcap/foundation-ai": "15.10.
|
|
105
|
-
"@genesislcap/foundation-comms": "15.10.
|
|
106
|
-
"@genesislcap/foundation-criteria": "15.10.
|
|
107
|
-
"@genesislcap/foundation-errors": "15.10.
|
|
108
|
-
"@genesislcap/foundation-events": "15.10.
|
|
109
|
-
"@genesislcap/foundation-logger": "15.10.
|
|
110
|
-
"@genesislcap/foundation-notifications": "15.10.
|
|
111
|
-
"@genesislcap/foundation-user": "15.10.
|
|
112
|
-
"@genesislcap/foundation-utils": "15.10.
|
|
103
|
+
"@genesislcap/expression-builder": "15.10.6",
|
|
104
|
+
"@genesislcap/foundation-ai": "15.10.6",
|
|
105
|
+
"@genesislcap/foundation-comms": "15.10.6",
|
|
106
|
+
"@genesislcap/foundation-criteria": "15.10.6",
|
|
107
|
+
"@genesislcap/foundation-errors": "15.10.6",
|
|
108
|
+
"@genesislcap/foundation-events": "15.10.6",
|
|
109
|
+
"@genesislcap/foundation-logger": "15.10.6",
|
|
110
|
+
"@genesislcap/foundation-notifications": "15.10.6",
|
|
111
|
+
"@genesislcap/foundation-user": "15.10.6",
|
|
112
|
+
"@genesislcap/foundation-utils": "15.10.6",
|
|
113
113
|
"@microsoft/fast-colors": "5.3.1",
|
|
114
114
|
"@microsoft/fast-components": "2.30.6",
|
|
115
115
|
"@microsoft/fast-element": "1.14.0",
|
|
@@ -142,5 +142,5 @@
|
|
|
142
142
|
"require": "./dist/react.cjs"
|
|
143
143
|
}
|
|
144
144
|
},
|
|
145
|
-
"gitHead": "
|
|
145
|
+
"gitHead": "2fd12f28a04c8dc20974ab54d3ea143b80229510"
|
|
146
146
|
}
|