@genesislcap/foundation-layout 14.107.1-alpha-afbc4d7.0 → 14.107.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "metadata": {
3
3
  "toolPackage": "@microsoft/api-extractor",
4
- "toolVersion": "7.38.0",
4
+ "toolVersion": "7.34.9",
5
5
  "schemaVersion": 1011,
6
6
  "oldestForwardsCompatibleVersion": 1001,
7
7
  "tsdocConfig": {
@@ -213,512 +213,512 @@ export declare class FoundationLayout extends FoundationElement implements Layou
213
213
  * @param handleMissingItem - what to do if the layout contains items that are not currently registered with the layout system. Defaults to 'error' which will throw an error. If set to 'placeholder' then any missing items will be replaced with a placeholder element. You can control the text of the placeholder element with {@link FoundationLayout.missingItemPlaceholder}.
214
214
  * @param disableCache - if set to true then the layout will give you a new instance of every item, even if it has a currently cached item to use. Using this will not stop you from saving and loading state via the {@link LayoutComponentWithState} interface. Defaults to false.
215
215
  * @throws {@link LayoutUsageError} if you attempt to load a layout with registered items that are not currently registered with the layout system, and handleMissingItem is set to 'error' (default).
216
- * @throws various errors if the layout string is malformed and cannot be parsed
217
- */
218
- loadLayout(layout: SerialisedLayout, handleMissingItem?: 'placeholder' | 'error', disableCache?: boolean): void;
219
- /**
220
- * @public
221
- * Dynamically add a new item to the layout. The user can move the new plane to whenever they want once it has been added.
222
- * @remarks
223
- * Adding new items invokes the registration previously made explicitly via {@link FoundationLayout.registerItem | registerItem()} or implicitly via the html declarative API.
224
- *
225
- * The elements added onto the new pane are copies using `element.cloneNode()` of the original element references used during registration.
226
- *
227
- * @param config - {@link RegisteredElementConfig} configuration items for the new items(s). Pass an array of {@link RegisteredElementConfig} to add multiple items at once.
228
- * @param placement - where and how to add the new items to the layout. For more info and defaults see {@link Placement}.
229
- * @throws {@link LayoutRegistrationError} if you attempt to add an item before it has been registered
230
- */
231
- addItem(config: RegisteredElementConfig | RegisteredElementConfig[], placement?: Placement): void;
232
- /**
233
- * @public
234
- * Register a collection of `Element` and associate them with an `ID` with the layout system for later use.
235
- * @remarks
236
- * You would use this to register elements that you later want to load when using {@link FoundationLayout.loadLayout}.
237
- * Use {@link FoundationLayout.layoutRequiredRegistrations} to see what components need to be registered for a certain config
238
- * and then register them using this function before calling {@link FoundationLayout.loadLayout}.
239
- *
240
- * When registering an element it is moved by reference into the internals of the layout, so if you pass elements already in the DOM then they will disappear. If you want to avoid this you can pass copies using `element.cloneNode(true)`.
241
- *
242
- * @param registration - string of the registration ID
243
- * @param elements - Elements[] containing the reference to the elements to register for later usage
244
- * @throws {@link LayoutUsageError} if you attempt to add an item before the layout has been initialised.
245
- * @throws {@link LayoutRegistrationError} if you attempt to use a `registration` name which is already in use (declarative html API and JavaScript API registrations use the same "pool" of registration names).
246
- * @returns - string defining the name of the registered item with the layout system (config.id if set).
247
- */
248
- registerItem(registration: string, elements: Element[]): string;
249
- /**
250
- * Internal APIs
251
- */
252
- /**
253
- * The `LifecycleMixin` can use the lifecycleUpdateToken to determine if it needs to gate
254
- * lifecycle methods from running when other items have been added or deleted.
255
- * This key is updated every time one of these actions are performed, so you can check if the key has changed and know you potentially need to gate some of your lifecycle functionality.
256
- * This method should be called whenever we are about to perform an action which will cause a lifecycle update, should as adding or removing an item from the layout
257
- */
258
- private updateLifecycleToken;
259
- /**
260
- * Request to reload the layout using the private member config. Debounced using the time set
261
- * in this.reloadBuffer
262
- * @internal
263
- */
264
- requestLayoutReload(): void;
265
- /**
266
- * Adds a config item into the root config and returns a link to the new config in the tree
267
- * @typeParam T - RowOrColumnItemConfig | StackItemConfig | ComponentItemConfig;
268
- * @param item - T to add as the root element of the layout
269
- * @returns T the reference to the added item in the whole item config
270
- * @throws {@link LayoutUsageError} if you try and add an item when a root has already been set (this happens if you have multiple direct children of this html element which is an incorrect usage)
271
- * @internal
272
- */
273
- addItemFromChild<T extends RootItemConfig>(item: T): T;
274
- /**
275
- * Registers a function with golden layout to create a pane
276
- * @param elements - Elements[] to add to new new pane
277
- * @param id - optional string which is used to register the new function with golden layout. Defaults to sequentially setting the IDs for default items
278
- * @returns - string which is the registered ID
279
- * @throws - {@link LayoutRegistrationError} if the id is already in use
280
- * @internal
281
- */
282
- cacheElementsAndRegister({ elements, id }: RegistrationConfig): string;
283
- /**
284
- * Sets up the event listeners for the layout receive events
285
- * @internal
286
- */
287
- private setupLayoutReceiveEvents;
288
- /**
289
- * Saves the stored layout config according to the Golden Layout provider.
290
- * And caches the layout in local storage if {@link FoundationLayout.autoSaveKey} is set.
291
- * @internal
292
- * */
293
- private cacheAndSaveLayout;
294
- /**
295
- * Used when we are trying to load a layout with missing registrations and we want to add placeholder items
296
- * @remarks
297
- * This function will register the items with placeholder text, and set them to be closeable if they were not already
298
- * As config is passed by reference it is updated directly
299
- * @param config - The layout config to update
300
- * @param missingRegisteredItems - The items which were missing from the registrations
301
- * @internal
302
- */
303
- private registerPlaceholdersAndSetClosable;
304
- /**
305
- * Loads the provided config into Golden Layout and does other setup
306
- * @remarks
307
- * Loads the config into Golden Layout, and then sets up the event listeners for the layout
308
- * When loading the layout the visual configuration is loaded
309
- * Event listeners are added to the drag handles to emulate resizing events
310
- *
311
- * Visual config can be overridden by the `dimensions-config` attribute.
312
- *
313
- * **This is the only function which should call this.layout.loadLayout() directly.**
314
- * @internal
315
- */
316
- private loadGLConfigAndSetup;
317
- /**
318
- * Handles adding the drag event listeners onto the golden layout drag handles
319
- * @remarks
320
- * If we only add the event listeners once then once the user drags items around the layout and creates
321
- * new drag handles, they will not have the event listeners attached. This function will add the event listeners
322
- * but also ensure that old listeners are cleaned up. To be able to clean up the event we need a reference
323
- * rather than an anonymous function so we store the bound function in a private variable.
324
- * @internal
325
- */
326
- private attatchResizeEvents;
327
- /**
328
- * If the user has provided any custom buttons, register a callback with golden layout to add them to any new items
329
- * @internal
330
- */
331
- private setupCustomButtons;
332
- /**
333
- * Return an array of each contained items in the layout.
334
- * @internal
335
- */
336
- private getLayoutComponents;
337
- /**
338
- * Recursively remove the instance key from the config which will mean that when the config is loaded it will instantiate a new instance for every item, even if they're in the cache.
339
- */
340
- private removeConfigCacheInformation;
341
- }
216
+ * @throws various errors if the layout string is malformed and cannot be parsed
217
+ */
218
+ loadLayout(layout: SerialisedLayout, handleMissingItem?: 'placeholder' | 'error', disableCache?: boolean): void;
219
+ /**
220
+ * @public
221
+ * Dynamically add a new item to the layout. The user can move the new plane to whenever they want once it has been added.
222
+ * @remarks
223
+ * Adding new items invokes the registration previously made explicitly via {@link FoundationLayout.registerItem | registerItem()} or implicitly via the html declarative API.
224
+ *
225
+ * The elements added onto the new pane are copies using `element.cloneNode()` of the original element references used during registration.
226
+ *
227
+ * @param config - {@link RegisteredElementConfig} configuration items for the new items(s). Pass an array of {@link RegisteredElementConfig} to add multiple items at once.
228
+ * @param placement - where and how to add the new items to the layout. For more info and defaults see {@link Placement}.
229
+ * @throws {@link LayoutRegistrationError} if you attempt to add an item before it has been registered
230
+ */
231
+ addItem(config: RegisteredElementConfig | RegisteredElementConfig[], placement?: Placement): void;
232
+ /**
233
+ * @public
234
+ * Register a collection of `Element` and associate them with an `ID` with the layout system for later use.
235
+ * @remarks
236
+ * You would use this to register elements that you later want to load when using {@link FoundationLayout.loadLayout}.
237
+ * Use {@link FoundationLayout.layoutRequiredRegistrations} to see what components need to be registered for a certain config
238
+ * and then register them using this function before calling {@link FoundationLayout.loadLayout}.
239
+ *
240
+ * When registering an element it is moved by reference into the internals of the layout, so if you pass elements already in the DOM then they will disappear. If you want to avoid this you can pass copies using `element.cloneNode(true)`.
241
+ *
242
+ * @param registration - string of the registration ID
243
+ * @param elements - Elements[] containing the reference to the elements to register for later usage
244
+ * @throws {@link LayoutUsageError} if you attempt to add an item before the layout has been initialised.
245
+ * @throws {@link LayoutRegistrationError} if you attempt to use a `registration` name which is already in use (declarative html API and JavaScript API registrations use the same "pool" of registration names).
246
+ * @returns - string defining the name of the registered item with the layout system (config.id if set).
247
+ */
248
+ registerItem(registration: string, elements: Element[]): string;
249
+ /**
250
+ * Internal APIs
251
+ */
252
+ /**
253
+ * The `LifecycleMixin` can use the lifecycleUpdateToken to determine if it needs to gate
254
+ * lifecycle methods from running when other items have been added or deleted.
255
+ * This key is updated every time one of these actions are performed, so you can check if the key has changed and know you potentially need to gate some of your lifecycle functionality.
256
+ * This method should be called whenever we are about to perform an action which will cause a lifecycle update, should as adding or removing an item from the layout
257
+ */
258
+ private updateLifecycleToken;
259
+ /**
260
+ * Request to reload the layout using the private member config. Debounced using the time set
261
+ * in this.reloadBuffer
262
+ * @internal
263
+ */
264
+ requestLayoutReload(): void;
265
+ /**
266
+ * Adds a config item into the root config and returns a link to the new config in the tree
267
+ * @typeParam T - RowOrColumnItemConfig | StackItemConfig | ComponentItemConfig;
268
+ * @param item - T to add as the root element of the layout
269
+ * @returns T the reference to the added item in the whole item config
270
+ * @throws {@link LayoutUsageError} if you try and add an item when a root has already been set (this happens if you have multiple direct children of this html element which is an incorrect usage)
271
+ * @internal
272
+ */
273
+ addItemFromChild<T extends RootItemConfig>(item: T): T;
274
+ /**
275
+ * Registers a function with golden layout to create a pane
276
+ * @param elements - Elements[] to add to new new pane
277
+ * @param id - optional string which is used to register the new function with golden layout. Defaults to sequentially setting the IDs for default items
278
+ * @returns - string which is the registered ID
279
+ * @throws - {@link LayoutRegistrationError} if the id is already in use
280
+ * @internal
281
+ */
282
+ cacheElementsAndRegister({ elements, id }: RegistrationConfig): string;
283
+ /**
284
+ * Sets up the event listeners for the layout receive events
285
+ * @internal
286
+ */
287
+ private setupLayoutReceiveEvents;
288
+ /**
289
+ * Saves the stored layout config according to the Golden Layout provider.
290
+ * And caches the layout in local storage if {@link FoundationLayout.autoSaveKey} is set.
291
+ * @internal
292
+ * */
293
+ private cacheAndSaveLayout;
294
+ /**
295
+ * Used when we are trying to load a layout with missing registrations and we want to add placeholder items
296
+ * @remarks
297
+ * This function will register the items with placeholder text, and set them to be closeable if they were not already
298
+ * As config is passed by reference it is updated directly
299
+ * @param config - The layout config to update
300
+ * @param missingRegisteredItems - The items which were missing from the registrations
301
+ * @internal
302
+ */
303
+ private registerPlaceholdersAndSetClosable;
304
+ /**
305
+ * Loads the provided config into Golden Layout and does other setup
306
+ * @remarks
307
+ * Loads the config into Golden Layout, and then sets up the event listeners for the layout
308
+ * When loading the layout the visual configuration is loaded
309
+ * Event listeners are added to the drag handles to emulate resizing events
310
+ *
311
+ * Visual config can be overridden by the `dimensions-config` attribute.
312
+ *
313
+ * **This is the only function which should call this.layout.loadLayout() directly.**
314
+ * @internal
315
+ */
316
+ private loadGLConfigAndSetup;
317
+ /**
318
+ * Handles adding the drag event listeners onto the golden layout drag handles
319
+ * @remarks
320
+ * If we only add the event listeners once then once the user drags items around the layout and creates
321
+ * new drag handles, they will not have the event listeners attached. This function will add the event listeners
322
+ * but also ensure that old listeners are cleaned up. To be able to clean up the event we need a reference
323
+ * rather than an anonymous function so we store the bound function in a private variable.
324
+ * @internal
325
+ */
326
+ private attatchResizeEvents;
327
+ /**
328
+ * If the user has provided any custom buttons, register a callback with golden layout to add them to any new items
329
+ * @internal
330
+ */
331
+ private setupCustomButtons;
332
+ /**
333
+ * Return an array of each contained items in the layout.
334
+ * @internal
335
+ */
336
+ private getLayoutComponents;
337
+ /**
338
+ * Recursively remove the instance key from the config which will mean that when the config is loaded it will instantiate a new instance for every item, even if they're in the cache.
339
+ */
340
+ private removeConfigCacheInformation;
341
+ }
342
342
 
343
- /**
344
- * Registration object to register the layout with your design system.
345
- *
346
- * @remarks
347
- * Registers the three layout component types with the design system.
348
- * You require to use the prefix of the design system with each tag.
349
- * If you wish to alternate the styles of the layout you only need to compose your own custom
350
- * version of {@link FoundationLayout} as this contains the styles for the entire layout.
351
- *
352
- * @example
353
- * `<zero-layout></zero-layout>` if you are using the layout with the `zero` design-system.
354
- *
355
- * @public
356
- */
357
- export declare const foundationLayoutComponents: {
358
- foundationLayout: (overrideDefinition?: OverrideFoundationElementDefinition< {
359
- baseName: string;
360
- styles: ElementStyles;
361
- template: ViewTemplate<FoundationLayout, any>;
362
- }>) => FoundationElementRegistry< {
363
- baseName: string;
364
- styles: ElementStyles;
365
- template: ViewTemplate<FoundationLayout, any>;
366
- }, FoundationLayout>;
367
- foundationLayoutRegion: (overrideDefinition?: OverrideFoundationElementDefinition< {
368
- baseName: string;
369
- template: ViewTemplate<any, any>;
370
- }>) => FoundationElementRegistry< {
371
- baseName: string;
372
- template: ViewTemplate<any, any>;
373
- }, FoundationLayoutRegion>;
374
- foundationLayoutItem: (overrideDefinition?: OverrideFoundationElementDefinition< {
375
- baseName: string;
376
- template: ViewTemplate<any, any>;
377
- }>) => FoundationElementRegistry< {
378
- baseName: string;
379
- template: ViewTemplate<any, any>;
380
- }, FoundationLayoutItem>;
381
- register(container?: Container, ...rest: any[]): void;
382
- };
343
+ /**
344
+ * Registration object to register the layout with your design system.
345
+ *
346
+ * @remarks
347
+ * Registers the three layout component types with the design system.
348
+ * You require to use the prefix of the design system with each tag.
349
+ * If you wish to alternate the styles of the layout you only need to compose your own custom
350
+ * version of {@link FoundationLayout} as this contains the styles for the entire layout.
351
+ *
352
+ * @example
353
+ * `<zero-layout></zero-layout>` if you are using the layout with the `zero` design-system.
354
+ *
355
+ * @public
356
+ */
357
+ export declare const foundationLayoutComponents: {
358
+ foundationLayout: (overrideDefinition?: OverrideFoundationElementDefinition< {
359
+ baseName: string;
360
+ styles: ElementStyles;
361
+ template: ViewTemplate<FoundationLayout, any>;
362
+ }>) => FoundationElementRegistry< {
363
+ baseName: string;
364
+ styles: ElementStyles;
365
+ template: ViewTemplate<FoundationLayout, any>;
366
+ }, FoundationLayout>;
367
+ foundationLayoutRegion: (overrideDefinition?: OverrideFoundationElementDefinition< {
368
+ baseName: string;
369
+ template: ViewTemplate<any, any>;
370
+ }>) => FoundationElementRegistry< {
371
+ baseName: string;
372
+ template: ViewTemplate<any, any>;
373
+ }, FoundationLayoutRegion>;
374
+ foundationLayoutItem: (overrideDefinition?: OverrideFoundationElementDefinition< {
375
+ baseName: string;
376
+ template: ViewTemplate<any, any>;
377
+ }>) => FoundationElementRegistry< {
378
+ baseName: string;
379
+ template: ViewTemplate<any, any>;
380
+ }, FoundationLayoutItem>;
381
+ register(container?: Container, ...rest: any[]): void;
382
+ };
383
383
 
384
- /**
385
- * @public
386
- * `FoundationLayoutItem` is a custom element that represents an item in the layout.
387
- * @remarks
388
- * This element is used to wrap html elements and configure their layout settings as part of the layout system.
389
- *
390
- * This is a simple component which is only used to define the layout splits; any JavaScript API interactions or custom styling is used via {@link FoundationLayout}.
391
- * @tagname %%prefix%%-layout-item
392
- */
393
- export declare class FoundationLayoutItem extends FoundationElement implements LayoutComponent {
394
- /**
395
- * Sets the title of the item which is displayed on the tab.
396
- * @remarks
397
- * Defaults to `Item ` + {@link FoundationLayoutItem.registration}
398
- * @public
399
- */
400
- title: string;
401
- /**
402
- * Boolean attribute controls whether the window can be closed in the GUI.
403
- * Defaults to `false`.
404
- * @public
405
- */
406
- closable: boolean;
407
- /**
408
- * optional string describing the size of the new item (see the written documentation for more info)
409
- * @public
410
- */
411
- size: string;
412
- /**
413
- * Sets the registration name for the item, which can be used later to add the item via the JavaScript API using {@link FoundationLayout.addItem}.
414
- * @remarks
415
- * Items added via the JavaScript API and HTML API share the same pool of registration names.
416
- * Using a duplicate registration name is a runtime error.
417
- * This registration name defaults to the number of the window it is.
418
- * It is highly recommended if you are using the JavaScript API that you set a registration name here manually.
419
- * @public
420
- */
421
- registration: string;
422
- /** @internal */
423
- [componentType]: "item";
424
- /** @internal */
425
- private slottedElements;
426
- /** @internal */
427
- connectedCallback(): void;
428
- /** @internal */
429
- private getParentLayoutComponent;
430
- /** @internal */
431
- requestLayoutReload(): void;
432
- /** @internal */
433
- cacheElementsAndRegister(config: RegistrationConfig): string;
434
- }
384
+ /**
385
+ * @public
386
+ * `FoundationLayoutItem` is a custom element that represents an item in the layout.
387
+ * @remarks
388
+ * This element is used to wrap html elements and configure their layout settings as part of the layout system.
389
+ *
390
+ * This is a simple component which is only used to define the layout splits; any JavaScript API interactions or custom styling is used via {@link FoundationLayout}.
391
+ * @tagname %%prefix%%-layout-item
392
+ */
393
+ export declare class FoundationLayoutItem extends FoundationElement implements LayoutComponent {
394
+ /**
395
+ * Sets the title of the item which is displayed on the tab.
396
+ * @remarks
397
+ * Defaults to `Item ` + {@link FoundationLayoutItem.registration}
398
+ * @public
399
+ */
400
+ title: string;
401
+ /**
402
+ * Boolean attribute controls whether the window can be closed in the GUI.
403
+ * Defaults to `false`.
404
+ * @public
405
+ */
406
+ closable: boolean;
407
+ /**
408
+ * optional string describing the size of the new item (see the written documentation for more info)
409
+ * @public
410
+ */
411
+ size: string;
412
+ /**
413
+ * Sets the registration name for the item, which can be used later to add the item via the JavaScript API using {@link FoundationLayout.addItem}.
414
+ * @remarks
415
+ * Items added via the JavaScript API and HTML API share the same pool of registration names.
416
+ * Using a duplicate registration name is a runtime error.
417
+ * This registration name defaults to the number of the window it is.
418
+ * It is highly recommended if you are using the JavaScript API that you set a registration name here manually.
419
+ * @public
420
+ */
421
+ registration: string;
422
+ /** @internal */
423
+ [componentType]: "item";
424
+ /** @internal */
425
+ private slottedElements;
426
+ /** @internal */
427
+ connectedCallback(): void;
428
+ /** @internal */
429
+ private getParentLayoutComponent;
430
+ /** @internal */
431
+ requestLayoutReload(): void;
432
+ /** @internal */
433
+ cacheElementsAndRegister(config: RegistrationConfig): string;
434
+ }
435
435
 
436
- /**
437
- * @public
438
- * `FoundationLayoutRegion` is a custom element that represents a region in the layout.
439
- * @remarks
440
- * This element is used to create a region in the layout. It can be used to create a horizontal or vertical split, or a tabbed region.
441
- *
442
- * This is a simple component which is only used to define the layout splits; any JavaScript API interactions or custom styling is used via {@link FoundationLayout}.
443
- * @tagname %%prefix%%-layout-region
444
- */
445
- export declare class FoundationLayoutRegion extends FoundationElement implements LayoutComponent {
446
- /**
447
- * optional string describing the size of the new item (see the written documentation for more info)
448
- * @public
449
- */
450
- size: string;
451
- /**
452
- * Defines the {@link LayoutRegionType | type} of the region.
453
- * Defaults to `horizontal`.
454
- * @public
455
- */
456
- type: LayoutRegionType;
457
- /** @internal */
458
- [componentType]: LayoutRegionType;
459
- /**
460
- * Reference to the config in the whole layout config for this
461
- * specific region.
462
- * @internal
463
- */
464
- private layoutConfig;
465
- /** @internal */
466
- connectedCallback(): void;
467
- /**
468
- * Gets the layout config for this region using {@link FoundationLayoutRegion.constructLayoutConfig} and adds it into the main config tree via the parents. It saves a reference to the this config so a child can add its config in later.
469
- * @internal
470
- */
471
- private setupLayoutRegion;
472
- /**
473
- * Creates a golden layout config for this object.
474
- * @internal
475
- */
476
- private constructLayoutConfig;
477
- /** @internal */
478
- private getParentLayoutComponent;
479
- /** @internal */
480
- addItemFromChild<T extends RootItemConfig>(item: T): T;
481
- /** @internal */
482
- requestLayoutReload(): void;
483
- /** @internal */
484
- cacheElementsAndRegister(config: RegistrationConfig): string;
485
- }
436
+ /**
437
+ * @public
438
+ * `FoundationLayoutRegion` is a custom element that represents a region in the layout.
439
+ * @remarks
440
+ * This element is used to create a region in the layout. It can be used to create a horizontal or vertical split, or a tabbed region.
441
+ *
442
+ * This is a simple component which is only used to define the layout splits; any JavaScript API interactions or custom styling is used via {@link FoundationLayout}.
443
+ * @tagname %%prefix%%-layout-region
444
+ */
445
+ export declare class FoundationLayoutRegion extends FoundationElement implements LayoutComponent {
446
+ /**
447
+ * optional string describing the size of the new item (see the written documentation for more info)
448
+ * @public
449
+ */
450
+ size: string;
451
+ /**
452
+ * Defines the {@link LayoutRegionType | type} of the region.
453
+ * Defaults to `horizontal`.
454
+ * @public
455
+ */
456
+ type: LayoutRegionType;
457
+ /** @internal */
458
+ [componentType]: LayoutRegionType;
459
+ /**
460
+ * Reference to the config in the whole layout config for this
461
+ * specific region.
462
+ * @internal
463
+ */
464
+ private layoutConfig;
465
+ /** @internal */
466
+ connectedCallback(): void;
467
+ /**
468
+ * Gets the layout config for this region using {@link FoundationLayoutRegion.constructLayoutConfig} and adds it into the main config tree via the parents. It saves a reference to the this config so a child can add its config in later.
469
+ * @internal
470
+ */
471
+ private setupLayoutRegion;
472
+ /**
473
+ * Creates a golden layout config for this object.
474
+ * @internal
475
+ */
476
+ private constructLayoutConfig;
477
+ /** @internal */
478
+ private getParentLayoutComponent;
479
+ /** @internal */
480
+ addItemFromChild<T extends RootItemConfig>(item: T): T;
481
+ /** @internal */
482
+ requestLayoutReload(): void;
483
+ /** @internal */
484
+ cacheElementsAndRegister(config: RegistrationConfig): string;
485
+ }
486
486
 
487
- /**
488
- * A collection of SVG icons in base64 format.
489
- * @remarks
490
- * These icons are used by the layout manager for the UI buttons. You can use these as examples for your own custom icons when creating a custom button.
491
- * @example
492
- * ```
493
- * export const layoutCustomButtons: CustomButton[] = [
494
- * { svg: LAYOUT_ICONS.renameSVG, onClick: (button: HTMLElement, elem: HTMLElement) => {} },
495
- * ];
496
- * ```
497
- *
498
- * @public
499
- */
500
- export declare const LAYOUT_ICONS: {
501
- readonly renameSVG: "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2ZXJzaW9uPSIxLjEiIHdpZHRoPSI0NTAiIGhlaWdodD0iNDUwIiB2aWV3Qm94PSIwIDAgNDUwIDQ1MCIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+PGcgdHJhbnNmb3JtPSJtYXRyaXgoMTguNjEgMCAwIDE4LjYxIDIyMi44MSAyMjIuODEpIiBpZD0iT3V0bGluZSIgID48cGF0aCBzdHlsZT0ic3Ryb2tlOiBub25lOyBzdHJva2Utd2lkdGg6IDE7IHN0cm9rZS1kYXNoYXJyYXk6IG5vbmU7IHN0cm9rZS1saW5lY2FwOiBidXR0OyBzdHJva2UtZGFzaG9mZnNldDogMDsgc3Ryb2tlLWxpbmVqb2luOiBtaXRlcjsgc3Ryb2tlLW1pdGVybGltaXQ6IDQ7IGZpbGw6IHJnYigxMTEsMTI2LDEzNSk7IGZpbGwtcnVsZTogbm9uemVybzsgb3BhY2l0eTogM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vc3ZnPg==";
505
- readonly tabDropdownSVG: "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA0NDggNTEyIj48IS0tISBGb250IEF3ZXNvbWUgUHJvIDYuMi4wIGJ5IEBmb250YXdlc29tZSAtIGh0dHBzOi8vZm9udGF3ZXNvbWUuY29tIExpY2Vuc2UgLSBodHRwczovL2ZvbnRhd2Vzb21lLmNvbS9saWNlbnNlIChDb21tZXJjaWFsIExpY2Vuc2UpIENvcHlyaWdodCAyMDIyIEZvbnRpY29ucywgSW5jLiAtLT48cGF0aCBkPSJNNC4yNTEgMTgxLjFDNy4zOTIgMTc3LjcgMTEuNjkgMTc1LjEgMTYgMTc1LjFjMy44OTEgMCA3Ljc4MSAxLjQwNiAxMC44NiA0LjI1bDE5Ny4xIDE4MS4xbDE5Ny4xLTE4MS4xYzYuNS02IDE2LjY0LTUuNjI1IDIyLjYxIC45MDYyYzYgNi41IDUuNTk0IDE2LjU5LS44OTA2IDIyLjU5bC0yMDggMTkyYy02LjE1NiA1LjY4OC0xNS41NiA1LjY4OC0yMS43MiAwbC0yMDgtMTkyQy0xLjM0MyAxOTcuNy0xLjc0OSAxODcuNiA0LjI1MSAxODEuMXoiIGZpbGw9IiM4NzliYTYiLz48L3N2Zz4=";
506
- };
487
+ /**
488
+ * A collection of SVG icons in base64 format.
489
+ * @remarks
490
+ * These icons are used by the layout manager for the UI buttons. You can use these as examples for your own custom icons when creating a custom button.
491
+ * @example
492
+ * ```
493
+ * export const layoutCustomButtons: CustomButton[] = [
494
+ * { svg: LAYOUT_ICONS.renameSVG, onClick: (button: HTMLElement, elem: HTMLElement) => {} },
495
+ * ];
496
+ * ```
497
+ *
498
+ * @public
499
+ */
500
+ export declare const LAYOUT_ICONS: {
501
+ readonly renameSVG: "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG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jYxIC45MDYyYzYgNi41IDUuNTk0IDE2LjU5LS44OTA2IDIyLjU5bC0yMDggMTkyYy02LjE1NiA1LjY4OC0xNS41NiA1LjY4OC0yMS43MiAwbC0yMDgtMTkyQy0xLjM0MyAxOTcuNy0xLjc0OSAxODcuNiA0LjI1MSAxODEuMXoiIGZpbGw9IiM4NzliYTYiLz48L3N2Zz4=";
506
+ };
507
507
 
508
- /** @internal */
509
- declare interface LayoutComponent {
510
- [componentType]: ComponentTypes;
511
- cacheElementsAndRegister(config: RegistrationConfig): string;
512
- requestLayoutReload(): void;
513
- }
508
+ /** @internal */
509
+ declare interface LayoutComponent {
510
+ [componentType]: ComponentTypes;
511
+ cacheElementsAndRegister(config: RegistrationConfig): string;
512
+ requestLayoutReload(): void;
513
+ }
514
514
 
515
- /**
516
- * Interface to implement on an item which is a component of the layout and you wish to serialise state with. This is saved separately for each instance of the component, which allows you to restore multiple instances of the same component with different state.
517
- * @typeParam T - the type of the state object you wish to serialise with the component.
518
- * @remarks
519
- * When the layout is saved either via the autosave functionality or manually calling {@link FoundationLayout.getLayout}, all contained components will be requested to provide state if they wish.
520
- *
521
- * Any state which is provided will be saved as part of the layout config and will be passed back to the component when the layout is loaded with {@link FoundationLayout.loadLayout} (or via autoloading). The state will be applied to the component via `applyState`, this may be before or after the component has been placed on the DOM, so you'll need to handle either scenario. The state is `null` when the instance is first created.
522
- *
523
- * See the written documentation for some error scenarios to consider about when implementing this interface.
524
- *
525
- * @example
526
- * ```
527
- * type ComponentState = {
528
- * foo: string;
529
- * }
530
- * \@customElement({ name: 'my-component' })
531
- * export class MyComponent extends FASTElement implements LayoutComponentWithState<ComponentState> {
532
- * \@observable foo: string;
533
- * private fooCache: ComponentState | null;
534
- *
535
- * getCurrentState(): ComponentState {
536
- * if (!this.foo) return null;
537
- * return {
538
- * foo: this.foo;
539
- * }
540
- * }
541
- *
542
- * applyState(state: ComponentState | null) {
543
- * this.fooCache = state;
544
- * }
545
- *
546
- * connectedCallback() {
547
- * // do other required setup
548
- * if (this.fooCache) {
549
- * this.foo = this.fooCache.foo;
550
- * }
551
- * }
552
- * }
553
- * ```
554
- *
555
- * @example
556
- * If you are using the autosave functionality you should inform the layout system when you update the state of a component, otherwise the state will only be updated when the user performs an action such as resizing an item. Use the {@link LayoutReceiveEvents} `autosave` event.
557
- * ```
558
- * // Same component as above
559
- * export class MyComponent extends FASTElement implements LayoutComponentWithState<ComponentState> {
560
- * // can use xChanged pattern as `foo` was declared observable
561
- * fooChanged() {
562
- * this.$emit(LayoutReceiveEvents.autosave);
563
- * }
564
- * }
565
- * ```
566
- * @public
567
- * */
568
- export declare interface LayoutComponentWithState<T> {
569
- /**
570
- * Provide the state you wish to save. It is recommended if the component which implements this interface has not fully initialised at the point this is called that you return `null` as the state, following the pattern of `null` being set as the initial state.
571
- */
572
- getCurrentState(): T;
573
- /**
574
- * Handle any state that has been saved previously for this instance of this component. It is not deterministic to know whether this is called before the component is appended to the DOM.
575
- */
576
- applyState(state: T | null): void;
577
- }
515
+ /**
516
+ * Interface to implement on an item which is a component of the layout and you wish to serialise state with. This is saved separately for each instance of the component, which allows you to restore multiple instances of the same component with different state.
517
+ * @typeParam T - the type of the state object you wish to serialise with the component.
518
+ * @remarks
519
+ * When the layout is saved either via the autosave functionality or manually calling {@link FoundationLayout.getLayout}, all contained components will be requested to provide state if they wish.
520
+ *
521
+ * Any state which is provided will be saved as part of the layout config and will be passed back to the component when the layout is loaded with {@link FoundationLayout.loadLayout} (or via autoloading). The state will be applied to the component via `applyState`, this may be before or after the component has been placed on the DOM, so you'll need to handle either scenario. The state is `null` when the instance is first created.
522
+ *
523
+ * See the written documentation for some error scenarios to consider about when implementing this interface.
524
+ *
525
+ * @example
526
+ * ```
527
+ * type ComponentState = {
528
+ * foo: string;
529
+ * }
530
+ * \@customElement({ name: 'my-component' })
531
+ * export class MyComponent extends FASTElement implements LayoutComponentWithState<ComponentState> {
532
+ * \@observable foo: string;
533
+ * private fooCache: ComponentState | null;
534
+ *
535
+ * getCurrentState(): ComponentState {
536
+ * if (!this.foo) return null;
537
+ * return {
538
+ * foo: this.foo;
539
+ * }
540
+ * }
541
+ *
542
+ * applyState(state: ComponentState | null) {
543
+ * this.fooCache = state;
544
+ * }
545
+ *
546
+ * connectedCallback() {
547
+ * // do other required setup
548
+ * if (this.fooCache) {
549
+ * this.foo = this.fooCache.foo;
550
+ * }
551
+ * }
552
+ * }
553
+ * ```
554
+ *
555
+ * @example
556
+ * If you are using the autosave functionality you should inform the layout system when you update the state of a component, otherwise the state will only be updated when the user performs an action such as resizing an item. Use the {@link LayoutReceiveEvents} `autosave` event.
557
+ * ```
558
+ * // Same component as above
559
+ * export class MyComponent extends FASTElement implements LayoutComponentWithState<ComponentState> {
560
+ * // can use xChanged pattern as `foo` was declared observable
561
+ * fooChanged() {
562
+ * this.$emit(LayoutReceiveEvents.autosave);
563
+ * }
564
+ * }
565
+ * ```
566
+ * @public
567
+ * */
568
+ export declare interface LayoutComponentWithState<T> {
569
+ /**
570
+ * Provide the state you wish to save. It is recommended if the component which implements this interface has not fully initialised at the point this is called that you return `null` as the state, following the pattern of `null` being set as the initial state.
571
+ */
572
+ getCurrentState(): T;
573
+ /**
574
+ * Handle any state that has been saved previously for this instance of this component. It is not deterministic to know whether this is called before the component is appended to the DOM.
575
+ */
576
+ applyState(state: T | null): void;
577
+ }
578
578
 
579
- /**
580
- * Defines events that the layout system emits
581
- *
582
- * 'firstLoaded' - emitted when the layout has finished loading the first time
583
- * using the declarative API after {@link DEFAULT_RELOAD_BUFFER} ms.
584
- * <br/>
585
- * 'itemAdded' - emitted when an item is added to the layout'
586
- * <br/>
587
- * 'itemRemoved' - emitted when an item is removed from the layout'
588
- * <br/>
589
- * 'itemResized' - emitted when the user drags the divider to resize elements
590
- * @public
591
- */
592
- export declare const LayoutEmitEvents: {
593
- readonly firstLoaded: "first-loaded";
594
- readonly itemAdded: "item-added";
595
- readonly itemRemoved: "item-removed";
596
- readonly itemResized: "item-resized";
597
- };
579
+ /**
580
+ * Defines events that the layout system emits
581
+ *
582
+ * 'firstLoaded' - emitted when the layout has finished loading the first time
583
+ * using the declarative API after {@link DEFAULT_RELOAD_BUFFER} ms.
584
+ * <br/>
585
+ * 'itemAdded' - emitted when an item is added to the layout'
586
+ * <br/>
587
+ * 'itemRemoved' - emitted when an item is removed from the layout'
588
+ * <br/>
589
+ * 'itemResized' - emitted when the user drags the divider to resize elements
590
+ * @public
591
+ */
592
+ export declare const LayoutEmitEvents: {
593
+ readonly firstLoaded: "first-loaded";
594
+ readonly itemAdded: "item-added";
595
+ readonly itemRemoved: "item-removed";
596
+ readonly itemResized: "item-resized";
597
+ };
598
598
 
599
- /**
600
- * Defines events that the layout system listens for
601
- *
602
- * 'changeTitle' - emit this from a contained item to update the title of the window that contains it.
603
- * 'autosave' - emit this from a contained item to hint to the layout system that it should autosave the layout. A contained item should do this if it has just changed some state it would like to persist. See {@link LayoutComponentWithState}.
604
- * @public
605
- */
606
- export declare const LayoutReceiveEvents: {
607
- readonly changeTitle: "change-title";
608
- readonly autosave: "autosave";
609
- };
599
+ /**
600
+ * Defines events that the layout system listens for
601
+ *
602
+ * 'changeTitle' - emit this from a contained item to update the title of the window that contains it.
603
+ * 'autosave' - emit this from a contained item to hint to the layout system that it should autosave the layout. A contained item should do this if it has just changed some state it would like to persist. See {@link LayoutComponentWithState}.
604
+ * @public
605
+ */
606
+ export declare const LayoutReceiveEvents: {
607
+ readonly changeTitle: "change-title";
608
+ readonly autosave: "autosave";
609
+ };
610
610
 
611
- /**
612
- * Defines the shape of the detail that the layout listens works with for events it listens on
613
- *
614
- * 'changeTitle' - `title` is the string you want to set. For `mode`: `replace` will set the title to be `title`, `suffix` will append `title` to the end of the existing title.
615
- * 'autosave' - no other parameters.
616
- * @public
617
- */
618
- export declare type LayoutReceiveEventsDetail = {
619
- changeTitle: {
620
- title: string;
621
- mode: 'replace' | 'suffix';
622
- };
623
- autosave: void;
624
- };
611
+ /**
612
+ * Defines the shape of the detail that the layout listens works with for events it listens on
613
+ *
614
+ * 'changeTitle' - `title` is the string you want to set. For `mode`: `replace` will set the title to be `title`, `suffix` will append `title` to the end of the existing title.
615
+ * 'autosave' - no other parameters.
616
+ * @public
617
+ */
618
+ export declare type LayoutReceiveEventsDetail = {
619
+ changeTitle: {
620
+ title: string;
621
+ mode: 'replace' | 'suffix';
622
+ };
623
+ autosave: void;
624
+ };
625
625
 
626
- /**
627
- * @public
628
- * Union type describing the three different types of region splits.
629
- * Set on the `type` attribute on {@link FoundationLayoutRegion}.
630
- */
631
- export declare type LayoutRegionType = (typeof layoutRegionValue)[number];
626
+ /**
627
+ * @public
628
+ * Union type describing the three different types of region splits.
629
+ * Set on the `type` attribute on {@link FoundationLayoutRegion}.
630
+ */
631
+ export declare type LayoutRegionType = (typeof layoutRegionValue)[number];
632
632
 
633
- /** @internal */
634
- declare const layoutRegionValue: readonly ["horizontal", "vertical", "tabs"];
633
+ /** @internal */
634
+ declare const layoutRegionValue: readonly ["horizontal", "vertical", "tabs"];
635
635
 
636
- /**
637
- * @public
638
- */
639
- export declare class LayoutRegistrationError extends Error {
640
- constructor(message: string);
641
- }
636
+ /**
637
+ * @public
638
+ */
639
+ export declare class LayoutRegistrationError extends Error {
640
+ constructor(message: string);
641
+ }
642
642
 
643
- /**
644
- * `ElementStyles` which defines the css for {@link FoundationLayout}.
645
- * @remarks
646
- * Can be used in a composition to customise the styles of the layout.
647
- * @public
648
- */
649
- export declare const layoutStyles: ElementStyles;
643
+ /**
644
+ * `ElementStyles` which defines the css for {@link FoundationLayout}.
645
+ * @remarks
646
+ * Can be used in a composition to customise the styles of the layout.
647
+ * @public
648
+ */
649
+ export declare const layoutStyles: ElementStyles;
650
650
 
651
- /**
652
- * `ViewTemplate` which defines the html for {@link FoundationLayout}.
653
- * @remarks
654
- * Can be used in a composition to customise the styles of the layout.
655
- * @public
656
- */
657
- export declare const layoutTemplate: ViewTemplate<FoundationLayout, any>;
651
+ /**
652
+ * `ViewTemplate` which defines the html for {@link FoundationLayout}.
653
+ * @remarks
654
+ * Can be used in a composition to customise the styles of the layout.
655
+ * @public
656
+ */
657
+ export declare const layoutTemplate: ViewTemplate<FoundationLayout, any>;
658
658
 
659
- /**
660
- * @public
661
- */
662
- export declare class LayoutUsageError extends Error {
663
- constructor(message: string);
664
- }
659
+ /**
660
+ * @public
661
+ */
662
+ export declare class LayoutUsageError extends Error {
663
+ constructor(message: string);
664
+ }
665
665
 
666
- /**
667
- * @public
668
- * Where to and how to add the new item(s) into the layout when using the {@link FoundationLayout.addItem} API.
669
- * @remarks
670
- * `area` dictates what part of the layout the new item(s) will be added to.
671
- * `multiple` is optional and is defaulted to `type=horizontal` and `size=50%` if not defined. `multiple` config only affects the placement if multiple items are specified to be added.
672
- * `multiple.type` sets the group type of the new items, whether they are horizontal, vertical, or in tabs.
673
- * `multiple.size` - optional string describing the size of the new item (see the written documentation for more info).
674
- * `multiple.size` specifies the size of the new group to be added and then the `size` config of the new items are the sizes relative to this new multiple group. If you only specify one new item then the `size` of that will be used as the size and will override `multiple.size`.
675
- */
676
- export declare type Placement = {
677
- area: 'top' | 'left' | 'bottom' | 'right';
678
- multiple?: {
679
- type: LayoutRegionType;
680
- size?: string;
681
- };
682
- };
666
+ /**
667
+ * @public
668
+ * Where to and how to add the new item(s) into the layout when using the {@link FoundationLayout.addItem} API.
669
+ * @remarks
670
+ * `area` dictates what part of the layout the new item(s) will be added to.
671
+ * `multiple` is optional and is defaulted to `type=horizontal` and `size=50%` if not defined. `multiple` config only affects the placement if multiple items are specified to be added.
672
+ * `multiple.type` sets the group type of the new items, whether they are horizontal, vertical, or in tabs.
673
+ * `multiple.size` - optional string describing the size of the new item (see the written documentation for more info).
674
+ * `multiple.size` specifies the size of the new group to be added and then the `size` config of the new items are the sizes relative to this new multiple group. If you only specify one new item then the `size` of that will be used as the size and will override `multiple.size`.
675
+ */
676
+ export declare type Placement = {
677
+ area: 'top' | 'left' | 'bottom' | 'right';
678
+ multiple?: {
679
+ type: LayoutRegionType;
680
+ size?: string;
681
+ };
682
+ };
683
683
 
684
- /**
685
- * @public
686
- * The parameters that can be set on a new item when being added by the {@link FoundationLayout.addItem} API
687
- *
688
- * @remarks
689
- * `elements` - array of Elements that are the content of the new item
690
- * `title` - optional string which is used as the new title of the tab (defaults to be the registered name)
691
- * `closable` - optional boolean which allows the item to be closed with the X button if set and true
692
- * `size` - optional string describing the size of the new item (see the written documentation for more info)
693
- * `registration` - optional string configuring the registration ID of the new item (defaults to sequential IDs)
694
- */
695
- export declare interface RegisteredElementConfig {
696
- registration: string;
697
- title?: string;
698
- closable?: boolean;
699
- size?: string;
700
- }
684
+ /**
685
+ * @public
686
+ * The parameters that can be set on a new item when being added by the {@link FoundationLayout.addItem} API
687
+ *
688
+ * @remarks
689
+ * `elements` - array of Elements that are the content of the new item
690
+ * `title` - optional string which is used as the new title of the tab (defaults to be the registered name)
691
+ * `closable` - optional boolean which allows the item to be closed with the X button if set and true
692
+ * `size` - optional string describing the size of the new item (see the written documentation for more info)
693
+ * `registration` - optional string configuring the registration ID of the new item (defaults to sequential IDs)
694
+ */
695
+ export declare interface RegisteredElementConfig {
696
+ registration: string;
697
+ title?: string;
698
+ closable?: boolean;
699
+ size?: string;
700
+ }
701
701
 
702
- /** @internal */
703
- export declare interface RegistrationConfig {
704
- elements: Element[];
705
- id?: string;
706
- }
702
+ /** @internal */
703
+ export declare interface RegistrationConfig {
704
+ elements: Element[];
705
+ id?: string;
706
+ }
707
707
 
708
- /**
709
- * @public
710
- * Versioned layout config objects. `v` is the version and `c` contains the layout config.
711
- * @remarks
712
- * Versioning the layout config in this way allows changes to the config schema while
713
- * remaining backwards compatible with any existing client/user configurations. When loading an
714
- * older version of the configurations the version can be used to lookup and apply transformer functions
715
- * to get the newest version of the config from it.
716
- *
717
- * As more versions of configurations are added this type will have extra union types as part of SerialisedLayout.
718
- */
719
- export declare type SerialisedLayout = {
720
- v: '1';
721
- c: ResolvedLayoutConfig;
722
- };
708
+ /**
709
+ * @public
710
+ * Versioned layout config objects. `v` is the version and `c` contains the layout config.
711
+ * @remarks
712
+ * Versioning the layout config in this way allows changes to the config schema while
713
+ * remaining backwards compatible with any existing client/user configurations. When loading an
714
+ * older version of the configurations the version can be used to lookup and apply transformer functions
715
+ * to get the newest version of the config from it.
716
+ *
717
+ * As more versions of configurations are added this type will have extra union types as part of SerialisedLayout.
718
+ */
719
+ export declare type SerialisedLayout = {
720
+ v: '1';
721
+ c: ResolvedLayoutConfig;
722
+ };
723
723
 
724
- export { }
724
+ export { }
@@ -5,7 +5,7 @@
5
5
  "toolPackages": [
6
6
  {
7
7
  "packageName": "@microsoft/api-extractor",
8
- "packageVersion": "7.38.0"
8
+ "packageVersion": "7.34.9"
9
9
  }
10
10
  ]
11
11
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@genesislcap/foundation-layout",
3
3
  "description": "Genesis Foundation UI App Layout",
4
- "version": "14.107.1-alpha-afbc4d7.0",
4
+ "version": "14.107.1",
5
5
  "license": "SEE LICENSE IN license.txt",
6
6
  "main": "dist/esm/index.js",
7
7
  "types": "dist/foundation-layout.d.ts",
@@ -27,19 +27,19 @@
27
27
  "test:debug": "genx test --debug"
28
28
  },
29
29
  "devDependencies": {
30
- "@genesislcap/foundation-testing": "14.107.1-alpha-afbc4d7.0",
31
- "@genesislcap/genx": "14.107.1-alpha-afbc4d7.0",
30
+ "@genesislcap/foundation-testing": "14.107.1",
31
+ "@genesislcap/genx": "14.107.1",
32
32
  "rimraf": "^3.0.2"
33
33
  },
34
34
  "dependencies": {
35
35
  "@genesis-community/golden-layout": "^2.11.0",
36
- "@genesislcap/foundation-comms": "14.107.1-alpha-afbc4d7.0",
37
- "@genesislcap/foundation-logger": "14.107.1-alpha-afbc4d7.0",
38
- "@genesislcap/foundation-utils": "14.107.1-alpha-afbc4d7.0",
36
+ "@genesislcap/foundation-comms": "14.107.1",
37
+ "@genesislcap/foundation-logger": "14.107.1",
38
+ "@genesislcap/foundation-utils": "14.107.1",
39
39
  "@microsoft/fast-components": "^2.21.3",
40
40
  "@microsoft/fast-element": "^1.7.0",
41
41
  "@microsoft/fast-foundation": "^2.33.2",
42
- "tslib": "^2.6.2"
42
+ "tslib": "^2.3.1"
43
43
  },
44
44
  "repository": {
45
45
  "type": "git",
@@ -50,5 +50,5 @@
50
50
  "access": "public"
51
51
  },
52
52
  "customElements": "dist/custom-elements.json",
53
- "gitHead": "bb64624e9bb6cea2cad088305e8c82d088f20da4"
53
+ "gitHead": "afc294d9a52a1eac3286416444bfd29c18910490"
54
54
  }