@genesislcap/foundation-layout 14.407.0-FUI-2491.1 → 14.407.0-workspaces.4
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/docs/api/foundation-layout.componentfactory.md +46 -0
- package/docs/api/foundation-layout.custombutton.md +21 -0
- package/docs/api/foundation-layout.default_reload_buffer.md +15 -0
- package/docs/api/foundation-layout.foundationlayout.additem.md +80 -0
- package/docs/api/foundation-layout.foundationlayout.autosavekey.md +13 -0
- package/docs/api/foundation-layout.foundationlayout.class.md +18 -0
- package/docs/api/foundation-layout.foundationlayout.clearautosaveandreverttodefault.md +25 -0
- package/docs/api/foundation-layout.foundationlayout.custombuttons.md +18 -0
- package/docs/api/foundation-layout.foundationlayout.dimensionsconfig.md +13 -0
- package/docs/api/foundation-layout.foundationlayout.dragging.md +13 -0
- package/docs/api/foundation-layout.foundationlayout.getlayout.md +23 -0
- package/docs/api/foundation-layout.foundationlayout.hasfirstloaded.md +20 -0
- package/docs/api/foundation-layout.foundationlayout.layoutrequiredregistrations.md +64 -0
- package/docs/api/foundation-layout.foundationlayout.lifecycleupdatetoken.md +18 -0
- package/docs/api/foundation-layout.foundationlayout.loadlayout.md +96 -0
- package/docs/api/foundation-layout.foundationlayout.md +400 -0
- package/docs/api/foundation-layout.foundationlayout.missingitemplaceholder.md +13 -0
- package/docs/api/foundation-layout.foundationlayout.popoutconfig.md +16 -0
- package/docs/api/foundation-layout.foundationlayout.registereditems.md +23 -0
- package/docs/api/foundation-layout.foundationlayout.registeritem.md +108 -0
- package/docs/api/foundation-layout.foundationlayout.reloadbuffer.md +13 -0
- package/docs/api/foundation-layout.foundationlayout.removeitems.md +76 -0
- package/docs/api/foundation-layout.foundationlayout.tryactivatepopoutmode.md +26 -0
- package/docs/api/foundation-layout.foundationlayout.tryloadlayoutfromlocalstorage.md +27 -0
- package/docs/api/foundation-layout.foundationlayoutcomponents.md +47 -0
- package/docs/api/foundation-layout.foundationlayoutitem.closable.md +13 -0
- package/docs/api/foundation-layout.foundationlayoutitem.md +126 -0
- package/docs/api/foundation-layout.foundationlayoutitem.registration.md +36 -0
- package/docs/api/foundation-layout.foundationlayoutitem.size.md +13 -0
- package/docs/api/foundation-layout.foundationlayoutitem.title.md +18 -0
- package/docs/api/foundation-layout.foundationlayoutregion.md +86 -0
- package/docs/api/foundation-layout.foundationlayoutregion.size.md +13 -0
- package/docs/api/foundation-layout.foundationlayoutregion.type.md +13 -0
- package/docs/api/foundation-layout.getfactory.md +56 -0
- package/docs/api/foundation-layout.layout_icons.md +34 -0
- package/docs/api/foundation-layout.layout_popout_container_class.md +16 -0
- package/docs/api/foundation-layout.layout_popout_control_key.md +16 -0
- package/docs/api/foundation-layout.layoutcomponentwithstate.applystate.md +52 -0
- package/docs/api/foundation-layout.layoutcomponentwithstate.getcurrentstate.md +17 -0
- package/docs/api/foundation-layout.layoutcomponentwithstate.md +105 -0
- package/docs/api/foundation-layout.layoutemitevents.md +20 -0
- package/docs/api/foundation-layout.layoutpopoutconfig.md +22 -0
- package/docs/api/foundation-layout.layoutreceiveevents.md +18 -0
- package/docs/api/foundation-layout.layoutreceiveeventsdetail.md +21 -0
- package/docs/api/foundation-layout.layoutregiontype.md +13 -0
- package/docs/api/foundation-layout.layoutregistrationerror._constructor_.md +48 -0
- package/docs/api/foundation-layout.layoutregistrationerror.md +48 -0
- package/docs/api/foundation-layout.layoutstyles.md +18 -0
- package/docs/api/foundation-layout.layouttemplate.md +18 -0
- package/docs/api/foundation-layout.layoutusageerror._constructor_.md +48 -0
- package/docs/api/foundation-layout.layoutusageerror.md +48 -0
- package/docs/api/foundation-layout.md +373 -0
- package/docs/api/foundation-layout.placement.md +25 -0
- package/docs/api/foundation-layout.registeredelementconfig.closable.md +11 -0
- package/docs/api/foundation-layout.registeredelementconfig.md +136 -0
- package/docs/api/foundation-layout.registeredelementconfig.registration.md +11 -0
- package/docs/api/foundation-layout.registeredelementconfig.showmaximisebutton.md +11 -0
- package/docs/api/foundation-layout.registeredelementconfig.size.md +11 -0
- package/docs/api/foundation-layout.registeredelementconfig.title.md +11 -0
- package/docs/api/foundation-layout.registerfactory.md +94 -0
- package/docs/api/foundation-layout.serialisedlayout.md +26 -0
- package/docs/api/foundation-layout.unregisterfactory.md +63 -0
- package/docs/api/index.md +30 -0
- package/package.json +15 -15
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-layout](./foundation-layout.md) > [ComponentFactory](./foundation-layout.componentfactory.md)
|
|
4
|
+
|
|
5
|
+
## ComponentFactory type
|
|
6
|
+
|
|
7
|
+
Factory function for creating component instances in the layout.
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
export type ComponentFactory = (container: HTMLElement) => void | (() => void);
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Remarks
|
|
16
|
+
|
|
17
|
+
This is the recommended approach for framework-rendered components (React, Angular, Vue, etc.) because it allows each layout instance to create a fresh component rather than cloning existing DOM elements (which loses event listeners and framework bindings).
|
|
18
|
+
|
|
19
|
+
The factory function receives a container element and should render the component into it. Optionally, it can return a cleanup function that will be called when the component is removed from the layout.
|
|
20
|
+
|
|
21
|
+
## Example 1
|
|
22
|
+
|
|
23
|
+
React example:
|
|
24
|
+
|
|
25
|
+
```typescript
|
|
26
|
+
layout.registerItem('my-component', (container) => {
|
|
27
|
+
const root = createRoot(container);
|
|
28
|
+
root.render(<MyComponent />);
|
|
29
|
+
return () => root.unmount();
|
|
30
|
+
});
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Example 2
|
|
34
|
+
|
|
35
|
+
Angular example:
|
|
36
|
+
|
|
37
|
+
```typescript
|
|
38
|
+
layout.registerItem('my-component', (container) => {
|
|
39
|
+
const componentRef = createComponent(MyComponent, {
|
|
40
|
+
environmentInjector: this.injector,
|
|
41
|
+
hostElement: container
|
|
42
|
+
});
|
|
43
|
+
return () => componentRef.destroy();
|
|
44
|
+
});
|
|
45
|
+
```
|
|
46
|
+
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-layout](./foundation-layout.md) > [CustomButton](./foundation-layout.custombutton.md)
|
|
4
|
+
|
|
5
|
+
## CustomButton type
|
|
6
|
+
|
|
7
|
+
Definition of a custom button which will be added to all layout items.
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
export type CustomButton = {
|
|
13
|
+
svg: string;
|
|
14
|
+
onClick: (button: HTMLElement, element: HTMLElement) => void;
|
|
15
|
+
};
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Remarks
|
|
19
|
+
|
|
20
|
+
`svg` - string of the SVG to use for the button. Needs to be in the format `data:image/svg+xml;base64,<<base64 encoded definition>>`<!-- -->. `onClick` - function which will be called when the button is clicked. The clicked button and the contained element associated with the clicked button will be passed to the function.
|
|
21
|
+
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-layout](./foundation-layout.md) > [DEFAULT\_RELOAD\_BUFFER](./foundation-layout.default_reload_buffer.md)
|
|
4
|
+
|
|
5
|
+
## DEFAULT\_RELOAD\_BUFFER variable
|
|
6
|
+
|
|
7
|
+
Default time in milliseconds for the layout to buffer calls to reloading the layout while the declarative API is loading.
|
|
8
|
+
|
|
9
|
+
During the first load of the layout, a loading spinner will be shown.
|
|
10
|
+
|
|
11
|
+
**Signature:**
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
DEFAULT_RELOAD_BUFFER = 500
|
|
15
|
+
```
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-layout](./foundation-layout.md) > [FoundationLayout](./foundation-layout.foundationlayout.md) > [addItem](./foundation-layout.foundationlayout.additem.md)
|
|
4
|
+
|
|
5
|
+
## FoundationLayout.addItem() method
|
|
6
|
+
|
|
7
|
+
Dynamically add a new item to the layout. The user can move the new plane to whenever they want once it has been added.
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
addItem(config: RegisteredElementConfig | RegisteredElementConfig[], placement?: Placement): void;
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
<table><thead><tr><th>
|
|
18
|
+
|
|
19
|
+
Parameter
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
</th><th>
|
|
23
|
+
|
|
24
|
+
Type
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
</th><th>
|
|
28
|
+
|
|
29
|
+
Description
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
</th></tr></thead>
|
|
33
|
+
<tbody><tr><td>
|
|
34
|
+
|
|
35
|
+
config
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
</td><td>
|
|
39
|
+
|
|
40
|
+
[RegisteredElementConfig](./foundation-layout.registeredelementconfig.md) \| [RegisteredElementConfig](./foundation-layout.registeredelementconfig.md)<!-- -->\[\]
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
</td><td>
|
|
44
|
+
|
|
45
|
+
[RegisteredElementConfig](./foundation-layout.registeredelementconfig.md) configuration items for the new items(s). Pass an array of [RegisteredElementConfig](./foundation-layout.registeredelementconfig.md) to add multiple items at once.
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
</td></tr>
|
|
49
|
+
<tr><td>
|
|
50
|
+
|
|
51
|
+
placement
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
</td><td>
|
|
55
|
+
|
|
56
|
+
[Placement](./foundation-layout.placement.md)
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
</td><td>
|
|
60
|
+
|
|
61
|
+
_(Optional)_ where and how to add the new items to the layout. For more info and defaults see [Placement](./foundation-layout.placement.md)<!-- -->.
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
</td></tr>
|
|
65
|
+
</tbody></table>
|
|
66
|
+
|
|
67
|
+
**Returns:**
|
|
68
|
+
|
|
69
|
+
void
|
|
70
|
+
|
|
71
|
+
## Exceptions
|
|
72
|
+
|
|
73
|
+
[LayoutRegistrationError](./foundation-layout.layoutregistrationerror.md) if you attempt to add an item before it has been registered
|
|
74
|
+
|
|
75
|
+
## Remarks
|
|
76
|
+
|
|
77
|
+
Adding new items invokes the registration previously made explicitly via [registerItem()](./foundation-layout.foundationlayout.registeritem.md) or implicitly via the html declarative API.
|
|
78
|
+
|
|
79
|
+
The elements added onto the new pane are copies using `element.cloneNode()` of the original element references used during registration.
|
|
80
|
+
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-layout](./foundation-layout.md) > [FoundationLayout](./foundation-layout.foundationlayout.md) > [autoSaveKey](./foundation-layout.foundationlayout.autosavekey.md)
|
|
4
|
+
|
|
5
|
+
## FoundationLayout.autoSaveKey property
|
|
6
|
+
|
|
7
|
+
Attribute which if set will auto save and load the layout as the user changes it. Omit this attribute to disable this feature. Set attribute using `auto-save-key`<!-- -->.
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
autoSaveKey?: string;
|
|
13
|
+
```
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-layout](./foundation-layout.md) > [FoundationLayout](./foundation-layout.foundationlayout.md) > [class](./foundation-layout.foundationlayout.class.md)
|
|
4
|
+
|
|
5
|
+
## FoundationLayout.class property
|
|
6
|
+
|
|
7
|
+
Identifier constant token.
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
class: "FoundationLayoutMain";
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Remarks
|
|
16
|
+
|
|
17
|
+
Used for the `LifecycleMixin` to identify it is part of the layout system.
|
|
18
|
+
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-layout](./foundation-layout.md) > [FoundationLayout](./foundation-layout.foundationlayout.md) > [clearAutosaveAndRevertToDefault](./foundation-layout.foundationlayout.clearautosaveandreverttodefault.md)
|
|
4
|
+
|
|
5
|
+
## FoundationLayout.clearAutosaveAndRevertToDefault() method
|
|
6
|
+
|
|
7
|
+
Clears the autosaved layout from local storage and reverts to the default layout
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
clearAutosaveAndRevertToDefault(): boolean;
|
|
13
|
+
```
|
|
14
|
+
**Returns:**
|
|
15
|
+
|
|
16
|
+
boolean
|
|
17
|
+
|
|
18
|
+
boolean - true if the autosave was cleared and layout reverted, false if no action was taken
|
|
19
|
+
|
|
20
|
+
## Remarks
|
|
21
|
+
|
|
22
|
+
This method will remove the autosaved layout associated with the current `auto-save-key` from local storage and reload the layout using the original configuration that was defined declaratively or set initially. The layout will be reloaded with fresh instances (cache disabled).
|
|
23
|
+
|
|
24
|
+
If no `auto-save-key` is set or if the layout is in popup mode, this method returns false without doing anything.
|
|
25
|
+
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-layout](./foundation-layout.md) > [FoundationLayout](./foundation-layout.foundationlayout.md) > [customButtons](./foundation-layout.foundationlayout.custombuttons.md)
|
|
4
|
+
|
|
5
|
+
## FoundationLayout.customButtons property
|
|
6
|
+
|
|
7
|
+
Set custom button definition on this property to add them to the layout header controls
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
customButtons: CustomButton[];
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Remarks
|
|
16
|
+
|
|
17
|
+
To see more information see [CustomButton](./foundation-layout.custombutton.md)<!-- -->.
|
|
18
|
+
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-layout](./foundation-layout.md) > [FoundationLayout](./foundation-layout.foundationlayout.md) > [dimensionsConfig](./foundation-layout.foundationlayout.dimensionsconfig.md)
|
|
4
|
+
|
|
5
|
+
## FoundationLayout.dimensionsConfig property
|
|
6
|
+
|
|
7
|
+
Apply dimensions config to the layout, such as setting the size of the drag handles.
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
dimensionsConfig?: LayoutConfig.Dimensions;
|
|
13
|
+
```
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-layout](./foundation-layout.md) > [FoundationLayout](./foundation-layout.foundationlayout.md) > [dragging](./foundation-layout.foundationlayout.dragging.md)
|
|
4
|
+
|
|
5
|
+
## FoundationLayout.dragging property
|
|
6
|
+
|
|
7
|
+
Set to true when the user is currently dragging the panes inside of the layout
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
dragging: boolean;
|
|
13
|
+
```
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-layout](./foundation-layout.md) > [FoundationLayout](./foundation-layout.foundationlayout.md) > [getLayout](./foundation-layout.foundationlayout.getlayout.md)
|
|
4
|
+
|
|
5
|
+
## FoundationLayout.getLayout() method
|
|
6
|
+
|
|
7
|
+
Gets a minified string containing the config describing the current layout of the layout object to later restore in [function](./foundation-layout.foundationlayout.loadlayout.md)
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
getLayout(): SerialisedLayout;
|
|
13
|
+
```
|
|
14
|
+
**Returns:**
|
|
15
|
+
|
|
16
|
+
[SerialisedLayout](./foundation-layout.serialisedlayout.md)
|
|
17
|
+
|
|
18
|
+
- latest version of [SerialisedLayout](./foundation-layout.serialisedlayout.md) describing the layout
|
|
19
|
+
|
|
20
|
+
## Remarks
|
|
21
|
+
|
|
22
|
+
Includes any state for a contained component exposed by the [LayoutComponentWithState](./foundation-layout.layoutcomponentwithstate.md) interface.
|
|
23
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-layout](./foundation-layout.md) > [FoundationLayout](./foundation-layout.foundationlayout.md) > [hasFirstLoaded](./foundation-layout.foundationlayout.hasfirstloaded.md)
|
|
4
|
+
|
|
5
|
+
## FoundationLayout.hasFirstLoaded property
|
|
6
|
+
|
|
7
|
+
Boolean signifies whether the layout has loaded for the first time or not.
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
hasFirstLoaded: boolean;
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Remarks
|
|
16
|
+
|
|
17
|
+
When using the declarative API this is set to true when the layout loads after the first timeout of `reload-buffer`<!-- -->. If using the JavaScript API this occurs after the first call to [addItem()](./foundation-layout.foundationlayout.additem.md)<!-- -->.
|
|
18
|
+
|
|
19
|
+
When using the `LifecycleMixin`<!-- -->, the mixin can be used to gate lifecycle methods from running before the items are inside of the layout.
|
|
20
|
+
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-layout](./foundation-layout.md) > [FoundationLayout](./foundation-layout.foundationlayout.md) > [layoutRequiredRegistrations](./foundation-layout.foundationlayout.layoutrequiredregistrations.md)
|
|
4
|
+
|
|
5
|
+
## FoundationLayout.layoutRequiredRegistrations() method
|
|
6
|
+
|
|
7
|
+
Gets all of the required element registry function names for a set of config
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
static layoutRequiredRegistrations(layout: SerialisedLayout): string[];
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
<table><thead><tr><th>
|
|
18
|
+
|
|
19
|
+
Parameter
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
</th><th>
|
|
23
|
+
|
|
24
|
+
Type
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
</th><th>
|
|
28
|
+
|
|
29
|
+
Description
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
</th></tr></thead>
|
|
33
|
+
<tbody><tr><td>
|
|
34
|
+
|
|
35
|
+
layout
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
</td><td>
|
|
39
|
+
|
|
40
|
+
[SerialisedLayout](./foundation-layout.serialisedlayout.md)
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
</td><td>
|
|
44
|
+
|
|
45
|
+
any version of [SerialisedLayout](./foundation-layout.serialisedlayout.md) object describing the layout
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
</td></tr>
|
|
49
|
+
</tbody></table>
|
|
50
|
+
|
|
51
|
+
**Returns:**
|
|
52
|
+
|
|
53
|
+
string\[\]
|
|
54
|
+
|
|
55
|
+
string\[\] - an item for each registered element in the config. These must all be added before [function](./foundation-layout.foundationlayout.loadlayout.md)
|
|
56
|
+
|
|
57
|
+
## Exceptions
|
|
58
|
+
|
|
59
|
+
- various errors if the layout parameter cannot be parsed
|
|
60
|
+
|
|
61
|
+
## Remarks
|
|
62
|
+
|
|
63
|
+
You can use this with [registeredItems](./foundation-layout.foundationlayout.registereditems.md) to work out what items you need to register with [registerItem()](./foundation-layout.foundationlayout.registeritem.md) before loading the layout with [loadLayout()](./foundation-layout.foundationlayout.loadlayout.md)
|
|
64
|
+
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-layout](./foundation-layout.md) > [FoundationLayout](./foundation-layout.foundationlayout.md) > [lifecycleUpdateToken](./foundation-layout.foundationlayout.lifecycleupdatetoken.md)
|
|
4
|
+
|
|
5
|
+
## FoundationLayout.lifecycleUpdateToken property
|
|
6
|
+
|
|
7
|
+
Used to calculate whether a layout item should run its lifecycle methods or not
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
lifecycleUpdateToken: string | undefined;
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Remarks
|
|
16
|
+
|
|
17
|
+
When using the `LifecycleMixin`<!-- -->, the mixin can be used to gate lifecycle methods from running when other items have been added or deleted. 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.
|
|
18
|
+
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-layout](./foundation-layout.md) > [FoundationLayout](./foundation-layout.foundationlayout.md) > [loadLayout](./foundation-layout.foundationlayout.loadlayout.md)
|
|
4
|
+
|
|
5
|
+
## FoundationLayout.loadLayout() method
|
|
6
|
+
|
|
7
|
+
Restores a layout described in the config from [getLayout()](./foundation-layout.foundationlayout.getlayout.md)
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
loadLayout(layout: SerialisedLayout, handleMissingItem?: 'placeholder' | 'error', disableCache?: boolean): void;
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
<table><thead><tr><th>
|
|
18
|
+
|
|
19
|
+
Parameter
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
</th><th>
|
|
23
|
+
|
|
24
|
+
Type
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
</th><th>
|
|
28
|
+
|
|
29
|
+
Description
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
</th></tr></thead>
|
|
33
|
+
<tbody><tr><td>
|
|
34
|
+
|
|
35
|
+
layout
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
</td><td>
|
|
39
|
+
|
|
40
|
+
[SerialisedLayout](./foundation-layout.serialisedlayout.md)
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
</td><td>
|
|
44
|
+
|
|
45
|
+
any version of [SerialisedLayout](./foundation-layout.serialisedlayout.md) object describing the layout
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
</td></tr>
|
|
49
|
+
<tr><td>
|
|
50
|
+
|
|
51
|
+
handleMissingItem
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
</td><td>
|
|
55
|
+
|
|
56
|
+
'placeholder' \| 'error'
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
</td><td>
|
|
60
|
+
|
|
61
|
+
_(Optional)_ 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 [FoundationLayout.missingItemPlaceholder](./foundation-layout.foundationlayout.missingitemplaceholder.md)<!-- -->.
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
</td></tr>
|
|
65
|
+
<tr><td>
|
|
66
|
+
|
|
67
|
+
disableCache
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
</td><td>
|
|
71
|
+
|
|
72
|
+
boolean
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
</td><td>
|
|
76
|
+
|
|
77
|
+
_(Optional)_ 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 [LayoutComponentWithState](./foundation-layout.layoutcomponentwithstate.md) interface. Defaults to false.
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
</td></tr>
|
|
81
|
+
</tbody></table>
|
|
82
|
+
|
|
83
|
+
**Returns:**
|
|
84
|
+
|
|
85
|
+
void
|
|
86
|
+
|
|
87
|
+
## Exceptions
|
|
88
|
+
|
|
89
|
+
[LayoutUsageError](./foundation-layout.layoutusageerror.md) 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).
|
|
90
|
+
|
|
91
|
+
various errors if the layout string is malformed and cannot be parsed
|
|
92
|
+
|
|
93
|
+
## Remarks
|
|
94
|
+
|
|
95
|
+
In order to restore a layout you must have registered all of the required panes with the layout system before restoring it. If you are just setting the layout using the declarative API then all of the same components will be registered. If you have added any elements using [FoundationLayout.registerItem()](./foundation-layout.foundationlayout.registeritem.md) then you must ensure all of the same items have been added again. To make tracking what items are registered easier it is recommended in this case you explicitly name your registrations using the `id` parameter available on the [RegisteredElementConfig](./foundation-layout.registeredelementconfig.md) and `foundation-layout-item` APIs. You can use [FoundationLayout.layoutRequiredRegistrations()](./foundation-layout.foundationlayout.layoutrequiredregistrations.md) to check which items are registered in a current layout in order to dynamically add any missing items before you can restore the layout
|
|
96
|
+
|