@genesislcap/foundation-layout 14.393.2 → 14.393.3-FUI-2471.1

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.
@@ -143,6 +143,22 @@
143
143
  "module": "./utils"
144
144
  }
145
145
  },
146
+ {
147
+ "kind": "js",
148
+ "name": "LAYOUT_POPOUT_CONTROL_KEY",
149
+ "declaration": {
150
+ "name": "LAYOUT_POPOUT_CONTROL_KEY",
151
+ "module": "./utils"
152
+ }
153
+ },
154
+ {
155
+ "kind": "js",
156
+ "name": "LayoutPopoutConfig",
157
+ "declaration": {
158
+ "name": "LayoutPopoutConfig",
159
+ "module": "./utils"
160
+ }
161
+ },
146
162
  {
147
163
  "kind": "js",
148
164
  "name": "registerFactory",
@@ -600,10 +616,10 @@
600
616
  "kind": "field",
601
617
  "name": "popoutConfig",
602
618
  "type": {
603
- "text": "string | undefined"
619
+ "text": "LayoutPopoutConfig | undefined"
604
620
  },
605
621
  "default": "undefined",
606
- "description": "Controls whether popout functionality is enabled on the layout. Defaults to disabled.\nSet this attribute to any string to enable popout functionality. If this string is of format `number;number` then this will be interpreted as the width and height of the popout window."
622
+ "description": "Controls whether popout functionality is enabled on the layout. Defaults to disabled.\nPass an empty object `{}` to use default configurations, or a LayoutPopoutConfig object to further customise."
607
623
  },
608
624
  {
609
625
  "kind": "field",
@@ -663,6 +679,16 @@
663
679
  "text": "boolean"
664
680
  }
665
681
  },
682
+ "parameters": [
683
+ {
684
+ "name": "autoloading",
685
+ "default": "false",
686
+ "type": {
687
+ "text": "boolean"
688
+ },
689
+ "description": "If true, this respects the {@link LayoutPopoutConfig.loadAutomatically}property.\n * You might want to set this to false and call it manually if you're manually registering components to the layout in order to avoid race conditions.\n * "
690
+ }
691
+ ],
666
692
  "description": "If in a popout window from the dynamic layout, this function will run the flow to put the component in popout mode.\nThis function is automatically called if using the declarative HTML API, but if only using the JavaScript API then you will need to call this function manually."
667
693
  },
668
694
  {
@@ -966,18 +992,6 @@
966
992
  },
967
993
  "description": "Attribute which if set will auto save and load the layout as the user changes it.\nOmit this attribute to disable this feature.\nSet attribute using `auto-save-key`.",
968
994
  "fieldName": "autoSaveKey"
969
- },
970
- {
971
- "name": "popout-config",
972
- "type": {
973
- "text": "string | undefined"
974
- },
975
- "default": "undefined",
976
- "description": "Controls whether popout functionality is enabled on the layout. Defaults to disabled.\nSet this attribute to any string to enable popout functionality. If this string is of format `number;number` then this will be interpreted as the width and height of the popout window.",
977
- "resolveInitializer": {
978
- "module": "src/main/layout-main.ts"
979
- },
980
- "fieldName": "popoutConfig"
981
995
  }
982
996
  ],
983
997
  "superclass": {
@@ -1336,6 +1350,15 @@
1336
1350
  "description": "Default time in milliseconds for the layout to buffer calls to reloading\nthe layout while the declarative API is loading.\n\nDuring the first load of the layout, a loading spinner will be shown.",
1337
1351
  "privacy": "public"
1338
1352
  },
1353
+ {
1354
+ "kind": "variable",
1355
+ "name": "LAYOUT_POPOUT_CONTROL_KEY",
1356
+ "type": {
1357
+ "text": "string"
1358
+ },
1359
+ "default": "'f-layout-key'",
1360
+ "description": "Key to be used for controlling popout behaviour"
1361
+ },
1339
1362
  {
1340
1363
  "kind": "variable",
1341
1364
  "name": "LAYOUT_POPOUT_CONTAINER_CLASS",
@@ -1367,6 +1390,14 @@
1367
1390
  "module": "src/utils/constants.ts"
1368
1391
  }
1369
1392
  },
1393
+ {
1394
+ "kind": "js",
1395
+ "name": "LAYOUT_POPOUT_CONTROL_KEY",
1396
+ "declaration": {
1397
+ "name": "LAYOUT_POPOUT_CONTROL_KEY",
1398
+ "module": "src/utils/constants.ts"
1399
+ }
1400
+ },
1370
1401
  {
1371
1402
  "kind": "js",
1372
1403
  "name": "LAYOUT_POPOUT_CONTAINER_CLASS",
@@ -1,5 +1,5 @@
1
1
  export * from './main';
2
2
  export { LAYOUT_ICONS } from './styles';
3
- export { ComponentFactory, CustomButton, DEFAULT_RELOAD_BUFFER, LayoutComponentWithState, LayoutEmitEvents, LayoutReceiveEvents, LayoutReceiveEventsDetail, LayoutRegionType, LayoutRegistrationError, LayoutUsageError, Placement, RegisteredElementConfig, RegistrationConfig, SerialisedLayout, LAYOUT_POPOUT_CONTAINER_CLASS, } from './utils';
3
+ export { ComponentFactory, CustomButton, DEFAULT_RELOAD_BUFFER, LayoutComponentWithState, LayoutEmitEvents, LayoutReceiveEvents, LayoutReceiveEventsDetail, LayoutRegionType, LayoutRegistrationError, LayoutUsageError, Placement, RegisteredElementConfig, RegistrationConfig, SerialisedLayout, LAYOUT_POPOUT_CONTAINER_CLASS, LAYOUT_POPOUT_CONTROL_KEY, LayoutPopoutConfig, } from './utils';
4
4
  export { registerFactory, getFactory, unregisterFactory } from './utils/factory-registry';
5
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACxC,OAAO,EACL,gBAAgB,EAChB,YAAY,EACZ,qBAAqB,EACrB,wBAAwB,EACxB,gBAAgB,EAChB,mBAAmB,EACnB,yBAAyB,EACzB,gBAAgB,EAChB,uBAAuB,EACvB,gBAAgB,EAChB,SAAS,EACT,uBAAuB,EACvB,kBAAkB,EAClB,gBAAgB,EAChB,6BAA6B,GAC9B,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACxC,OAAO,EACL,gBAAgB,EAChB,YAAY,EACZ,qBAAqB,EACrB,wBAAwB,EACxB,gBAAgB,EAChB,mBAAmB,EACnB,yBAAyB,EACzB,gBAAgB,EAChB,uBAAuB,EACvB,gBAAgB,EAChB,SAAS,EACT,uBAAuB,EACvB,kBAAkB,EAClB,gBAAgB,EAChB,6BAA6B,EAC7B,yBAAyB,EACzB,kBAAkB,GACnB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { LayoutConfig, RootItemConfig } from '@genesis-community/golden-layout';
2
2
  import { FoundationElement } from '@microsoft/fast-foundation';
3
- import { ComponentFactory, componentType, CustomButton, LayoutComponent, Placement, RegisteredElementConfig, RegistrationConfig, SerialisedLayout } from '../utils/';
3
+ import { ComponentFactory, componentType, CustomButton, LayoutComponent, LayoutPopoutConfig, Placement, RegisteredElementConfig, RegistrationConfig, SerialisedLayout } from '../utils/';
4
4
  export { layoutStyles } from '../styles';
5
5
  /**
6
6
  * @public
@@ -97,10 +97,10 @@ export declare class FoundationLayout extends FoundationElement implements Layou
97
97
  lifecycleUpdateToken: string | undefined;
98
98
  /**
99
99
  * Controls whether popout functionality is enabled on the layout. Defaults to disabled.
100
- * Set this attribute to any string to enable popout functionality. If this string is of format `number;number` then this will be interpreted as the width and height of the popout window.
100
+ * Pass an empty object `{}` to use default configurations, or a {@link LayoutPopoutConfig} object to further customise.
101
101
  * @beta
102
102
  */
103
- popoutConfig: string | undefined;
103
+ popoutConfig: LayoutPopoutConfig | undefined;
104
104
  private popupMode;
105
105
  /** @internal */
106
106
  constructor();
@@ -172,9 +172,12 @@ export declare class FoundationLayout extends FoundationElement implements Layou
172
172
  * If you set the `LAYOUT_POPOUT_CONTAINER_CLASS` on an element which is a DOM parent of the layout,
173
173
  * then if the layout goes into popout mode then it will place itself as the only child for the popout container you set.
174
174
  * It is likely you'll want to attach this class to your design system provider.
175
+ *
176
+ * @param autoloading - If true, this respects the {@link LayoutPopoutConfig.loadAutomatically} property.
177
+ * You might want to set this to false and call it manually if you're manually registering components to the layout in order to avoid race conditions.
175
178
  * @beta
176
179
  */
177
- tryActivatePopoutMode(): boolean;
180
+ tryActivatePopoutMode(autoloading?: boolean): boolean;
178
181
  /**
179
182
  * Try to load a layout from local storage, or return false. Only required if manually calling {@link FoundationLayout.registerItem}
180
183
  * @remarks
@@ -1 +1 @@
1
- {"version":3,"file":"layout-main.d.ts","sourceRoot":"","sources":["../../../src/main/layout-main.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,YAAY,EAEZ,cAAc,EAGf,MAAM,kCAAkC,CAAC;AAK1C,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAE/D,OAAO,EAGL,gBAAgB,EAChB,aAAa,EACb,YAAY,EAOZ,eAAe,EAKf,SAAS,EAET,uBAAuB,EACvB,kBAAkB,EAClB,gBAAgB,EACjB,MAAM,WAAW,CAAC;AAKnB,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAiBzC;;;;;;;;;;;GAWG;AACH,qBAAa,gBAAiB,SAAQ,iBAAkB,YAAW,eAAe;;IAChF,OAAO,CAAC,MAAM,CAAe;IAC7B,gBAAgB;IAChB,aAAa,EAAE,WAAW,CAAC;IAC3B,OAAO,CAAC,YAAY,CAAqC;IACzD,OAAO,CAAC,mBAAmB,CAAqC;IAEhE,gBAAgB;IAChB,CAAC,aAAa,CAAC,EAAG,MAAM,CAAU;IAElC;;;;OAIG;IACmC,YAAY,EAAE,MAAM,CAAyB;IACnF,OAAO,CAAC,aAAa,CAAS;IAC9B,OAAO,CAAC,oBAAoB,CAAK;IAEjC,gBAAgB;IACV,OAAO,CAAC,IAAI,CAAO;IAEzB,gBAAgB;IACP,OAAO,CAAC,OAAO,CAAU;IAClC;;;;;OAKG;IACmC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC3D;;;;OAIG;IACS,sBAAsB,GAAI,aAAa,MAAM,YAC2B;IAEpF;;;OAGG;IACH,gBAAgB,CAAC,EAAE,YAAY,CAAC,UAAU,CAAC;IAE3C;;;;;;;;;;OAUG;IACS,cAA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AM,cAAc,uEAK1B,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;2BAI3B,CAAC"}
@@ -23,7 +23,7 @@ export declare const DEFAULT_RELOAD_BUFFER = 500;
23
23
  export declare const AUTOSAVE_KEY = "foundation-layout-autosave";
24
24
  /**
25
25
  * Key to be used for controlling popout behaviour
26
- * @internal
26
+ * @beta
27
27
  */
28
28
  export declare const LAYOUT_POPOUT_CONTROL_KEY = "f-layout-key";
29
29
  /**
@@ -200,4 +200,12 @@ export interface LayoutComponent {
200
200
  export type AutosavedLayouts = {
201
201
  [x: string]: string;
202
202
  };
203
+ /** @beta */
204
+ export type LayoutPopoutConfig = {
205
+ loadAutomatically?: boolean;
206
+ popoutDimension?: {
207
+ width: number;
208
+ height: number;
209
+ };
210
+ };
203
211
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/utils/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AAC5F,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAE/D;;;;;;GAMG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,CAAC,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,WAAW,KAAK,IAAI,CAAC;CAC9D,CAAC;AAEF;;;;;;;;;;GAUG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC7B,CAAC,EAAE,GAAG,CAAC;IACP,CAAC,EAAE,oBAAoB,CAAC;CACzB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAoDK;AACL,MAAM,WAAW,wBAAwB,CAAC,CAAC;IACzC;;OAEG;IACH,eAAe,IAAI,CAAC,CAAC;IACrB;;OAEG;IACH,UAA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AAiB,6CAA8C,CAAC;AAC7E;;;;GAIG;AACH,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAC;AAClE,gBAAgB;AAChB,MAAM,MAAM,cAAc,GAAG,gBAAgB,GAAG,MAAM,GAAG,MAAM,CAAC;AAEhE,gBAAgB;AAChB,MAAM,WAAW,eAAe;IAC9B,CAAC,aAAa,CAAC,EAAE,cAAc,CAAC;IAChC,wBAAwB,CAAC,MAAM,EAAE,kBAAkB,GAAG,MAAM,CAAC;IAC7D,mBAAmB,IAAI,IAAI,CAAC;CAC7B;AAED,gBAAgB;AAChB,MAAM,MAAM,gBAAgB,GAAG;IAC7B,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CACrB,CAAC;AAEF,YAAY;AACZ,MAAM,MAAM,kBAAkB,GAAG;IAC/B,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,eAAe,CAAC,EAAE;QAChB,KAAK,EAAE,MAAM,CAAC;QACd,MAAM,EAAE,MAAM,CAAC;KAChB,CAAC;CACH,CAAC"}
package/dist/esm/index.js CHANGED
@@ -1,4 +1,4 @@
1
1
  export * from './main';
2
2
  export { LAYOUT_ICONS } from './styles';
3
- export { DEFAULT_RELOAD_BUFFER, LayoutEmitEvents, LayoutReceiveEvents, LayoutRegistrationError, LayoutUsageError, LAYOUT_POPOUT_CONTAINER_CLASS, } from './utils';
3
+ export { DEFAULT_RELOAD_BUFFER, LayoutEmitEvents, LayoutReceiveEvents, LayoutRegistrationError, LayoutUsageError, LAYOUT_POPOUT_CONTAINER_CLASS, LAYOUT_POPOUT_CONTROL_KEY, } from './utils';
4
4
  export { registerFactory, getFactory, unregisterFactory } from './utils/factory-registry';
@@ -103,7 +103,7 @@ export class FoundationLayout extends FoundationElement {
103
103
  this.lifecycleUpdateToken = undefined;
104
104
  /**
105
105
  * Controls whether popout functionality is enabled on the layout. Defaults to disabled.
106
- * Set this attribute to any string to enable popout functionality. If this string is of format `number;number` then this will be interpreted as the width and height of the popout window.
106
+ * Pass an empty object `{}` to use default configurations, or a {@link LayoutPopoutConfig} object to further customise.
107
107
  * @beta
108
108
  */
109
109
  this.popoutConfig = undefined;
@@ -287,13 +287,19 @@ export class FoundationLayout extends FoundationElement {
287
287
  * If you set the `LAYOUT_POPOUT_CONTAINER_CLASS` on an element which is a DOM parent of the layout,
288
288
  * then if the layout goes into popout mode then it will place itself as the only child for the popout container you set.
289
289
  * It is likely you'll want to attach this class to your design system provider.
290
+ *
291
+ * @param autoloading - If true, this respects the {@link LayoutPopoutConfig.loadAutomatically} property.
292
+ * You might want to set this to false and call it manually if you're manually registering components to the layout in order to avoid race conditions.
290
293
  * @beta
291
294
  */
292
- tryActivatePopoutMode() {
295
+ tryActivatePopoutMode(autoloading = false) {
296
+ var _b;
293
297
  if (!this.popupMode)
294
298
  return false;
299
+ if (autoloading && ((_b = this.popoutConfig) === null || _b === void 0 ? void 0 : _b.loadAutomatically) === false)
300
+ return;
295
301
  const popoutComponentRegistration = new URLSearchParams(window.location.search).get(LAYOUT_POPOUT_CONTROL_KEY);
296
- const popoutConfig = {
302
+ const glPopoutConfig = {
297
303
  root: {
298
304
  type: 'component',
299
305
  componentType: popoutComponentRegistration,
@@ -303,7 +309,7 @@ export class FoundationLayout extends FoundationElement {
303
309
  hasHeaders: false,
304
310
  },
305
311
  };
306
- this.loadGLConfigAndSetup(popoutConfig);
312
+ this.loadGLConfigAndSetup(glPopoutConfig);
307
313
  const tryFindNewLayoutDOMLocation = (e) => {
308
314
  if (e.classList.contains(LAYOUT_POPOUT_CONTAINER_CLASS))
309
315
  return e;
@@ -644,7 +650,7 @@ export class FoundationLayout extends FoundationElement {
644
650
  this.hasFirstLoaded = true;
645
651
  // Store the default layout config before attempting to load from storage
646
652
  this.defaultLayoutConfig = JSON.parse(JSON.stringify(this.layoutConfig));
647
- const res = this.tryLoadLayoutFromLocalStorage() || this.tryActivatePopoutMode();
653
+ const res = this.tryLoadLayoutFromLocalStorage() || this.tryActivatePopoutMode(true);
648
654
  if (!res) {
649
655
  this.loadGLConfigAndSetup(this.layoutConfig);
650
656
  }
@@ -973,14 +979,7 @@ export class FoundationLayout extends FoundationElement {
973
979
  if (!this.popoutConfig)
974
980
  return;
975
981
  logger.warn('Layout pop-out mode is enabled, this is an experimental feature and may change in future versions');
976
- const popoutWindowPixelConfig = (popoutConfig) => {
977
- const matcher = /(\d+);(\d+)/;
978
- const mMatches = popoutConfig.match(matcher);
979
- if (!mMatches)
980
- return '';
981
- const [, width, height] = mMatches;
982
- return `,width=${width},height=${height}`;
983
- };
982
+ const configWithDefaults = Object.assign(Object.assign({}, this.popoutConfig), { loadAutomatically: true, popoutDimension: Object.assign(Object.assign({}, this.popoutConfig.popoutDimension), { width: 960, height: 720 }) });
984
983
  this.customButtons.push({
985
984
  svg: LAYOUT_ICONS.popoutSVG,
986
985
  onClick: (_, elem) => {
@@ -989,7 +988,7 @@ export class FoundationLayout extends FoundationElement {
989
988
  const itemParams = new URLSearchParams();
990
989
  itemParams.append(LAYOUT_POPOUT_CONTROL_KEY, registration);
991
990
  url.search = itemParams.toString();
992
- window.open(url, undefined, 'popup' + popoutWindowPixelConfig(this.popoutConfig));
991
+ window.open(url, undefined, `popup,width=${configWithDefaults.popoutDimension.width},height=${configWithDefaults.popoutDimension.height}`);
993
992
  },
994
993
  });
995
994
  this.popupMode = window.location.search.includes(LAYOUT_POPOUT_CONTROL_KEY);
@@ -1021,7 +1020,7 @@ __decorate([
1021
1020
  observable
1022
1021
  ], FoundationLayout.prototype, "dragging", void 0);
1023
1022
  __decorate([
1024
- attr({ attribute: 'popout-config' })
1023
+ observable
1025
1024
  ], FoundationLayout.prototype, "popoutConfig", void 0);
1026
1025
  __decorate([
1027
1026
  observable
@@ -25,7 +25,7 @@ export const DEFAULT_RELOAD_BUFFER = 500;
25
25
  export const AUTOSAVE_KEY = 'foundation-layout-autosave';
26
26
  /**
27
27
  * Key to be used for controlling popout behaviour
28
- * @internal
28
+ * @beta
29
29
  */
30
30
  export const LAYOUT_POPOUT_CONTROL_KEY = 'f-layout-key';
31
31
  /**
@@ -845,15 +845,20 @@
845
845
  {
846
846
  "kind": "Property",
847
847
  "canonicalReference": "@genesislcap/foundation-layout!FoundationLayout#popoutConfig:member",
848
- "docComment": "/**\n * Controls whether popout functionality is enabled on the layout. Defaults to disabled. Set this attribute to any string to enable popout functionality. If this string is of format `number;number` then this will be interpreted as the width and height of the popout window.\n *\n * @beta\n */\n",
848
+ "docComment": "/**\n * Controls whether popout functionality is enabled on the layout. Defaults to disabled. Pass an empty object `{}` to use default configurations, or a {@link LayoutPopoutConfig} object to further customise.\n *\n * @beta\n */\n",
849
849
  "excerptTokens": [
850
850
  {
851
851
  "kind": "Content",
852
852
  "text": "popoutConfig: "
853
853
  },
854
+ {
855
+ "kind": "Reference",
856
+ "text": "LayoutPopoutConfig",
857
+ "canonicalReference": "@genesislcap/foundation-layout!LayoutPopoutConfig:type"
858
+ },
854
859
  {
855
860
  "kind": "Content",
856
- "text": "string | undefined"
861
+ "text": " | undefined"
857
862
  },
858
863
  {
859
864
  "kind": "Content",
@@ -866,7 +871,7 @@
866
871
  "name": "popoutConfig",
867
872
  "propertyTypeTokenRange": {
868
873
  "startIndex": 1,
869
- "endIndex": 2
874
+ "endIndex": 3
870
875
  },
871
876
  "isStatic": false,
872
877
  "isProtected": false,
@@ -1074,11 +1079,19 @@
1074
1079
  {
1075
1080
  "kind": "Method",
1076
1081
  "canonicalReference": "@genesislcap/foundation-layout!FoundationLayout#tryActivatePopoutMode:member(1)",
1077
- "docComment": "/**\n * If in a popout window from the dynamic layout, this function will run the flow to put the component in popout mode. This function is automatically called if using the declarative HTML API, but if only using the JavaScript API then you will need to call this function manually.\n *\n * @remarks\n *\n * If you need to call this manually then you should do it as soon as you register all of the required components with {@link FoundationLayout.registerItem}.\n *\n * If you set the `LAYOUT_POPOUT_CONTAINER_CLASS` on an element which is a DOM parent of the layout, then if the layout goes into popout mode then it will place itself as the only child for the popout container you set. It is likely you'll want to attach this class to your design system provider.\n *\n * @beta\n */\n",
1082
+ "docComment": "/**\n * If in a popout window from the dynamic layout, this function will run the flow to put the component in popout mode. This function is automatically called if using the declarative HTML API, but if only using the JavaScript API then you will need to call this function manually.\n *\n * @remarks\n *\n * If you need to call this manually then you should do it as soon as you register all of the required components with {@link FoundationLayout.registerItem}.\n *\n * If you set the `LAYOUT_POPOUT_CONTAINER_CLASS` on an element which is a DOM parent of the layout, then if the layout goes into popout mode then it will place itself as the only child for the popout container you set. It is likely you'll want to attach this class to your design system provider.\n *\n * @param autoloading - If true, this respects the {@link LayoutPopoutConfig.loadAutomatically} property. You might want to set this to false and call it manually if you're manually registering components to the layout in order to avoid race conditions.\n *\n * @beta\n */\n",
1078
1083
  "excerptTokens": [
1079
1084
  {
1080
1085
  "kind": "Content",
1081
- "text": "tryActivatePopoutMode(): "
1086
+ "text": "tryActivatePopoutMode(autoloading?: "
1087
+ },
1088
+ {
1089
+ "kind": "Content",
1090
+ "text": "boolean"
1091
+ },
1092
+ {
1093
+ "kind": "Content",
1094
+ "text": "): "
1082
1095
  },
1083
1096
  {
1084
1097
  "kind": "Content",
@@ -1091,13 +1104,22 @@
1091
1104
  ],
1092
1105
  "isStatic": false,
1093
1106
  "returnTypeTokenRange": {
1094
- "startIndex": 1,
1095
- "endIndex": 2
1107
+ "startIndex": 3,
1108
+ "endIndex": 4
1096
1109
  },
1097
1110
  "releaseTag": "Beta",
1098
1111
  "isProtected": false,
1099
1112
  "overloadIndex": 1,
1100
- "parameters": [],
1113
+ "parameters": [
1114
+ {
1115
+ "parameterName": "autoloading",
1116
+ "parameterTypeTokenRange": {
1117
+ "startIndex": 1,
1118
+ "endIndex": 2
1119
+ },
1120
+ "isOptional": true
1121
+ }
1122
+ ],
1101
1123
  "isOptional": false,
1102
1124
  "isAbstract": false,
1103
1125
  "name": "tryActivatePopoutMode"
@@ -1721,6 +1743,33 @@
1721
1743
  "endIndex": 0
1722
1744
  }
1723
1745
  },
1746
+ {
1747
+ "kind": "Variable",
1748
+ "canonicalReference": "@genesislcap/foundation-layout!LAYOUT_POPOUT_CONTROL_KEY:var",
1749
+ "docComment": "/**\n * Key to be used for controlling popout behaviour\n *\n * @beta\n */\n",
1750
+ "excerptTokens": [
1751
+ {
1752
+ "kind": "Content",
1753
+ "text": "LAYOUT_POPOUT_CONTROL_KEY = "
1754
+ },
1755
+ {
1756
+ "kind": "Content",
1757
+ "text": "\"f-layout-key\""
1758
+ }
1759
+ ],
1760
+ "fileUrlPath": "src/utils/constants.ts",
1761
+ "initializerTokenRange": {
1762
+ "startIndex": 1,
1763
+ "endIndex": 2
1764
+ },
1765
+ "isReadonly": true,
1766
+ "releaseTag": "Beta",
1767
+ "name": "LAYOUT_POPOUT_CONTROL_KEY",
1768
+ "variableTypeTokenRange": {
1769
+ "startIndex": 0,
1770
+ "endIndex": 0
1771
+ }
1772
+ },
1724
1773
  {
1725
1774
  "kind": "Interface",
1726
1775
  "canonicalReference": "@genesislcap/foundation-layout!LayoutComponentWithState:interface",
@@ -1848,6 +1897,32 @@
1848
1897
  "endIndex": 2
1849
1898
  }
1850
1899
  },
1900
+ {
1901
+ "kind": "TypeAlias",
1902
+ "canonicalReference": "@genesislcap/foundation-layout!LayoutPopoutConfig:type",
1903
+ "docComment": "/**\n * @beta\n */\n",
1904
+ "excerptTokens": [
1905
+ {
1906
+ "kind": "Content",
1907
+ "text": "export type LayoutPopoutConfig = "
1908
+ },
1909
+ {
1910
+ "kind": "Content",
1911
+ "text": "{\n loadAutomatically?: boolean;\n popoutDimension?: {\n width: number;\n height: number;\n };\n}"
1912
+ },
1913
+ {
1914
+ "kind": "Content",
1915
+ "text": ";"
1916
+ }
1917
+ ],
1918
+ "fileUrlPath": "src/utils/types.ts",
1919
+ "releaseTag": "Beta",
1920
+ "name": "LayoutPopoutConfig",
1921
+ "typeTokenRange": {
1922
+ "startIndex": 1,
1923
+ "endIndex": 2
1924
+ }
1925
+ },
1851
1926
  {
1852
1927
  "kind": "Variable",
1853
1928
  "canonicalReference": "@genesislcap/foundation-layout!LayoutReceiveEvents:var",
@@ -172,10 +172,10 @@ export declare class FoundationLayout extends FoundationElement implements Layou
172
172
  lifecycleUpdateToken: string | undefined;
173
173
  /**
174
174
  * Controls whether popout functionality is enabled on the layout. Defaults to disabled.
175
- * Set this attribute to any string to enable popout functionality. If this string is of format `number;number` then this will be interpreted as the width and height of the popout window.
175
+ * Pass an empty object `{}` to use default configurations, or a {@link LayoutPopoutConfig} object to further customise.
176
176
  * @beta
177
177
  */
178
- popoutConfig: string | undefined;
178
+ popoutConfig: LayoutPopoutConfig | undefined;
179
179
  private popupMode;
180
180
  /** @internal */
181
181
  constructor();
@@ -247,9 +247,12 @@ export declare class FoundationLayout extends FoundationElement implements Layou
247
247
  * If you set the `LAYOUT_POPOUT_CONTAINER_CLASS` on an element which is a DOM parent of the layout,
248
248
  * then if the layout goes into popout mode then it will place itself as the only child for the popout container you set.
249
249
  * It is likely you'll want to attach this class to your design system provider.
250
+ *
251
+ * @param autoloading - If true, this respects the {@link LayoutPopoutConfig.loadAutomatically} property.
252
+ * You might want to set this to false and call it manually if you're manually registering components to the layout in order to avoid race conditions.
250
253
  * @beta
251
254
  */
252
- tryActivatePopoutMode(): boolean;
255
+ tryActivatePopoutMode(autoloading?: boolean): boolean;
253
256
  /**
254
257
  * Try to load a layout from local storage, or return false. Only required if manually calling {@link FoundationLayout.registerItem}
255
258
  * @remarks
@@ -674,6 +677,12 @@ export declare class FoundationLayout extends FoundationElement implements Layou
674
677
  */
675
678
  export declare const LAYOUT_POPOUT_CONTAINER_CLASS = "f-layout-popout";
676
679
 
680
+ /**
681
+ * Key to be used for controlling popout behaviour
682
+ * @beta
683
+ */
684
+ export declare const LAYOUT_POPOUT_CONTROL_KEY = "f-layout-key";
685
+
677
686
  /** @internal */
678
687
  declare interface LayoutComponent {
679
688
  [componentType]: ComponentTypes;
@@ -765,6 +774,15 @@ export declare class FoundationLayout extends FoundationElement implements Layou
765
774
  readonly itemResized: "item-resized";
766
775
  };
767
776
 
777
+ /** @beta */
778
+ export declare type LayoutPopoutConfig = {
779
+ loadAutomatically?: boolean;
780
+ popoutDimension?: {
781
+ width: number;
782
+ height: number;
783
+ };
784
+ };
785
+
768
786
  /**
769
787
  * Defines events that the layout system listens for
770
788
  *
@@ -206,12 +206,12 @@ Function which is used to generate the placeholder text when a layout is loaded
206
206
 
207
207
  </td><td>
208
208
 
209
- string \| undefined
209
+ [LayoutPopoutConfig](./foundation-layout.layoutpopoutconfig.md) \| undefined
210
210
 
211
211
 
212
212
  </td><td>
213
213
 
214
- **_(BETA)_** Controls whether popout functionality is enabled on the layout. Defaults to disabled. Set this attribute to any string to enable popout functionality. If this string is of format `number;number` then this will be interpreted as the width and height of the popout window.
214
+ **_(BETA)_** Controls whether popout functionality is enabled on the layout. Defaults to disabled. Pass an empty object `{}` to use default configurations, or a [LayoutPopoutConfig](./foundation-layout.layoutpopoutconfig.md) object to further customise.
215
215
 
216
216
 
217
217
  </td></tr>
@@ -370,7 +370,7 @@ Removes all instances of a specified registered item from the layout.
370
370
  </td></tr>
371
371
  <tr><td>
372
372
 
373
- [tryActivatePopoutMode()](./foundation-layout.foundationlayout.tryactivatepopoutmode.md)
373
+ [tryActivatePopoutMode(autoloading)](./foundation-layout.foundationlayout.tryactivatepopoutmode.md)
374
374
 
375
375
 
376
376
  </td><td>
@@ -7,10 +7,10 @@
7
7
  > This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
8
8
  >
9
9
 
10
- Controls whether popout functionality is enabled on the layout. Defaults to disabled. Set this attribute to any string to enable popout functionality. If this string is of format `number;number` then this will be interpreted as the width and height of the popout window.
10
+ Controls whether popout functionality is enabled on the layout. Defaults to disabled. Pass an empty object `{}` to use default configurations, or a [LayoutPopoutConfig](./foundation-layout.layoutpopoutconfig.md) object to further customise.
11
11
 
12
12
  **Signature:**
13
13
 
14
14
  ```typescript
15
- popoutConfig: string | undefined;
15
+ popoutConfig: LayoutPopoutConfig | undefined;
16
16
  ```
@@ -12,8 +12,45 @@ If in a popout window from the dynamic layout, this function will run the flow t
12
12
  **Signature:**
13
13
 
14
14
  ```typescript
15
- tryActivatePopoutMode(): boolean;
15
+ tryActivatePopoutMode(autoloading?: boolean): boolean;
16
16
  ```
17
+
18
+ ## Parameters
19
+
20
+ <table><thead><tr><th>
21
+
22
+ Parameter
23
+
24
+
25
+ </th><th>
26
+
27
+ Type
28
+
29
+
30
+ </th><th>
31
+
32
+ Description
33
+
34
+
35
+ </th></tr></thead>
36
+ <tbody><tr><td>
37
+
38
+ autoloading
39
+
40
+
41
+ </td><td>
42
+
43
+ boolean
44
+
45
+
46
+ </td><td>
47
+
48
+ _(Optional)_ If true, this respects the property. You might want to set this to false and call it manually if you're manually registering components to the layout in order to avoid race conditions.
49
+
50
+
51
+ </td></tr>
52
+ </tbody></table>
53
+
17
54
  **Returns:**
18
55
 
19
56
  boolean
@@ -0,0 +1,16 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [@genesislcap/foundation-layout](./foundation-layout.md) &gt; [LAYOUT\_POPOUT\_CONTROL\_KEY](./foundation-layout.layout_popout_control_key.md)
4
+
5
+ ## LAYOUT\_POPOUT\_CONTROL\_KEY variable
6
+
7
+ > This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
8
+ >
9
+
10
+ Key to be used for controlling popout behaviour
11
+
12
+ **Signature:**
13
+
14
+ ```typescript
15
+ LAYOUT_POPOUT_CONTROL_KEY = "f-layout-key"
16
+ ```
@@ -0,0 +1,21 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [@genesislcap/foundation-layout](./foundation-layout.md) &gt; [LayoutPopoutConfig](./foundation-layout.layoutpopoutconfig.md)
4
+
5
+ ## LayoutPopoutConfig type
6
+
7
+ > This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
8
+ >
9
+
10
+
11
+ **Signature:**
12
+
13
+ ```typescript
14
+ export type LayoutPopoutConfig = {
15
+ loadAutomatically?: boolean;
16
+ popoutDimension?: {
17
+ width: number;
18
+ height: number;
19
+ };
20
+ };
21
+ ```
@@ -215,6 +215,17 @@ A collection of SVG icons in base64 format.
215
215
  **_(BETA)_** Put this classname on an element which is a DOM parent of the layout, and if the layout goes into popout mode then it will place itself as the only child for the popout container you set.
216
216
 
217
217
 
218
+ </td></tr>
219
+ <tr><td>
220
+
221
+ [LAYOUT\_POPOUT\_CONTROL\_KEY](./foundation-layout.layout_popout_control_key.md)
222
+
223
+
224
+ </td><td>
225
+
226
+ **_(BETA)_** Key to be used for controlling popout behaviour
227
+
228
+
218
229
  </td></tr>
219
230
  <tr><td>
220
231
 
@@ -300,6 +311,17 @@ Factory function for creating component instances in the layout.
300
311
  Definition of a custom button which will be added to all layout items.
301
312
 
302
313
 
314
+ </td></tr>
315
+ <tr><td>
316
+
317
+ [LayoutPopoutConfig](./foundation-layout.layoutpopoutconfig.md)
318
+
319
+
320
+ </td><td>
321
+
322
+ **_(BETA)_**
323
+
324
+
303
325
  </td></tr>
304
326
  <tr><td>
305
327
 
@@ -60,7 +60,7 @@ export class FoundationLayout extends FoundationElement implements LayoutCompone
60
60
  loadLayout(layout: SerialisedLayout, handleMissingItem?: 'placeholder' | 'error', disableCache?: boolean): void;
61
61
  missingItemPlaceholder: (missingItem: string) => string;
62
62
  // @beta
63
- popoutConfig: string | undefined;
63
+ popoutConfig: LayoutPopoutConfig | undefined;
64
64
  registeredItems(): string[];
65
65
  registerItem(registration: string, elementsOrFactory: Element[] | ComponentFactory): string;
66
66
  reloadBuffer: number;
@@ -68,7 +68,7 @@ export class FoundationLayout extends FoundationElement implements LayoutCompone
68
68
  // @internal
69
69
  requestLayoutReload(): void;
70
70
  // @beta
71
- tryActivatePopoutMode(): boolean;
71
+ tryActivatePopoutMode(autoloading?: boolean): boolean;
72
72
  tryLoadLayoutFromLocalStorage(): boolean;
73
73
  // @internal (undocumented)
74
74
  usingDeclerativeAPI: boolean;
@@ -150,6 +150,9 @@ export const LAYOUT_ICONS: {
150
150
  // @beta
151
151
  export const LAYOUT_POPOUT_CONTAINER_CLASS = "f-layout-popout";
152
152
 
153
+ // @beta
154
+ export const LAYOUT_POPOUT_CONTROL_KEY = "f-layout-key";
155
+
153
156
  // @public
154
157
  export interface LayoutComponentWithState<T> {
155
158
  applyState(state: T | null): void;
@@ -164,6 +167,15 @@ export const LayoutEmitEvents: {
164
167
  readonly itemResized: "item-resized";
165
168
  };
166
169
 
170
+ // @beta (undocumented)
171
+ export type LayoutPopoutConfig = {
172
+ loadAutomatically?: boolean;
173
+ popoutDimension?: {
174
+ width: number;
175
+ height: number;
176
+ };
177
+ };
178
+
167
179
  // @public
168
180
  export const LayoutReceiveEvents: {
169
181
  readonly changeTitle: "change-title";
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.393.2",
4
+ "version": "14.393.3-FUI-2471.1",
5
5
  "license": "SEE LICENSE IN license.txt",
6
6
  "main": "dist/esm/index.js",
7
7
  "types": "dist/foundation-layout.d.ts",
@@ -38,20 +38,20 @@
38
38
  }
39
39
  },
40
40
  "devDependencies": {
41
- "@genesislcap/foundation-testing": "14.393.2",
42
- "@genesislcap/genx": "14.393.2",
43
- "@genesislcap/rollup-builder": "14.393.2",
44
- "@genesislcap/ts-builder": "14.393.2",
45
- "@genesislcap/uvu-playwright-builder": "14.393.2",
46
- "@genesislcap/vite-builder": "14.393.2",
47
- "@genesislcap/webpack-builder": "14.393.2"
41
+ "@genesislcap/foundation-testing": "14.393.3-FUI-2471.1",
42
+ "@genesislcap/genx": "14.393.3-FUI-2471.1",
43
+ "@genesislcap/rollup-builder": "14.393.3-FUI-2471.1",
44
+ "@genesislcap/ts-builder": "14.393.3-FUI-2471.1",
45
+ "@genesislcap/uvu-playwright-builder": "14.393.3-FUI-2471.1",
46
+ "@genesislcap/vite-builder": "14.393.3-FUI-2471.1",
47
+ "@genesislcap/webpack-builder": "14.393.3-FUI-2471.1"
48
48
  },
49
49
  "dependencies": {
50
50
  "@genesis-community/golden-layout": "^2.11.0",
51
- "@genesislcap/foundation-comms": "14.393.2",
52
- "@genesislcap/foundation-logger": "14.393.2",
53
- "@genesislcap/foundation-ui": "14.393.2",
54
- "@genesislcap/foundation-utils": "14.393.2",
51
+ "@genesislcap/foundation-comms": "14.393.3-FUI-2471.1",
52
+ "@genesislcap/foundation-logger": "14.393.3-FUI-2471.1",
53
+ "@genesislcap/foundation-ui": "14.393.3-FUI-2471.1",
54
+ "@genesislcap/foundation-utils": "14.393.3-FUI-2471.1",
55
55
  "@microsoft/fast-components": "2.30.6",
56
56
  "@microsoft/fast-element": "1.14.0",
57
57
  "@microsoft/fast-foundation": "2.50.0"
@@ -65,5 +65,5 @@
65
65
  "access": "public"
66
66
  },
67
67
  "customElements": "dist/custom-elements.json",
68
- "gitHead": "2448f444f9684f2fd2209843677ccaa342af1234"
68
+ "gitHead": "1234c6eb62ef380e2552f20adf320494eae1c996"
69
69
  }