@genesislcap/foundation-layout 14.408.0 → 14.409.0
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/README.md +12 -135
- package/package.json +15 -15
- package/docs/api/foundation-layout.componentfactory.md +0 -46
- package/docs/api/foundation-layout.custombutton.md +0 -21
- package/docs/api/foundation-layout.default_reload_buffer.md +0 -15
- package/docs/api/foundation-layout.foundationlayout.additem.md +0 -80
- package/docs/api/foundation-layout.foundationlayout.autosavekey.md +0 -13
- package/docs/api/foundation-layout.foundationlayout.class.md +0 -18
- package/docs/api/foundation-layout.foundationlayout.clearautosaveandreverttodefault.md +0 -25
- package/docs/api/foundation-layout.foundationlayout.custombuttons.md +0 -18
- package/docs/api/foundation-layout.foundationlayout.dimensionsconfig.md +0 -13
- package/docs/api/foundation-layout.foundationlayout.dragging.md +0 -13
- package/docs/api/foundation-layout.foundationlayout.getlayout.md +0 -23
- package/docs/api/foundation-layout.foundationlayout.hasfirstloaded.md +0 -20
- package/docs/api/foundation-layout.foundationlayout.layoutrequiredregistrations.md +0 -64
- package/docs/api/foundation-layout.foundationlayout.lifecycleupdatetoken.md +0 -18
- package/docs/api/foundation-layout.foundationlayout.loadlayout.md +0 -96
- package/docs/api/foundation-layout.foundationlayout.md +0 -400
- package/docs/api/foundation-layout.foundationlayout.missingitemplaceholder.md +0 -13
- package/docs/api/foundation-layout.foundationlayout.popoutconfig.md +0 -16
- package/docs/api/foundation-layout.foundationlayout.registereditems.md +0 -23
- package/docs/api/foundation-layout.foundationlayout.registeritem.md +0 -108
- package/docs/api/foundation-layout.foundationlayout.reloadbuffer.md +0 -13
- package/docs/api/foundation-layout.foundationlayout.removeitems.md +0 -76
- package/docs/api/foundation-layout.foundationlayout.tryactivatepopoutmode.md +0 -26
- package/docs/api/foundation-layout.foundationlayout.tryloadlayoutfromlocalstorage.md +0 -27
- package/docs/api/foundation-layout.foundationlayoutcomponents.md +0 -47
- package/docs/api/foundation-layout.foundationlayoutitem.closable.md +0 -13
- package/docs/api/foundation-layout.foundationlayoutitem.md +0 -126
- package/docs/api/foundation-layout.foundationlayoutitem.registration.md +0 -36
- package/docs/api/foundation-layout.foundationlayoutitem.size.md +0 -13
- package/docs/api/foundation-layout.foundationlayoutitem.title.md +0 -18
- package/docs/api/foundation-layout.foundationlayoutregion.md +0 -86
- package/docs/api/foundation-layout.foundationlayoutregion.size.md +0 -13
- package/docs/api/foundation-layout.foundationlayoutregion.type.md +0 -13
- package/docs/api/foundation-layout.getfactory.md +0 -56
- package/docs/api/foundation-layout.layout_icons.md +0 -34
- package/docs/api/foundation-layout.layout_popout_container_class.md +0 -16
- package/docs/api/foundation-layout.layout_popout_control_key.md +0 -16
- package/docs/api/foundation-layout.layoutcomponentwithstate.applystate.md +0 -52
- package/docs/api/foundation-layout.layoutcomponentwithstate.getcurrentstate.md +0 -17
- package/docs/api/foundation-layout.layoutcomponentwithstate.md +0 -105
- package/docs/api/foundation-layout.layoutemitevents.md +0 -20
- package/docs/api/foundation-layout.layoutpopoutconfig.md +0 -22
- package/docs/api/foundation-layout.layoutreceiveevents.md +0 -18
- package/docs/api/foundation-layout.layoutreceiveeventsdetail.md +0 -21
- package/docs/api/foundation-layout.layoutregiontype.md +0 -13
- package/docs/api/foundation-layout.layoutregistrationerror._constructor_.md +0 -48
- package/docs/api/foundation-layout.layoutregistrationerror.md +0 -48
- package/docs/api/foundation-layout.layoutstyles.md +0 -18
- package/docs/api/foundation-layout.layouttemplate.md +0 -18
- package/docs/api/foundation-layout.layoutusageerror._constructor_.md +0 -48
- package/docs/api/foundation-layout.layoutusageerror.md +0 -48
- package/docs/api/foundation-layout.md +0 -373
- package/docs/api/foundation-layout.placement.md +0 -25
- package/docs/api/foundation-layout.registeredelementconfig.closable.md +0 -11
- package/docs/api/foundation-layout.registeredelementconfig.md +0 -136
- package/docs/api/foundation-layout.registeredelementconfig.registration.md +0 -11
- package/docs/api/foundation-layout.registeredelementconfig.showmaximisebutton.md +0 -11
- package/docs/api/foundation-layout.registeredelementconfig.size.md +0 -11
- package/docs/api/foundation-layout.registeredelementconfig.title.md +0 -11
- package/docs/api/foundation-layout.registerfactory.md +0 -94
- package/docs/api/foundation-layout.serialisedlayout.md +0 -26
- package/docs/api/foundation-layout.unregisterfactory.md +0 -63
- package/docs/api/index.md +0 -30
- package/docs/api-report.md.api.md +0 -278
package/README.md
CHANGED
|
@@ -1,145 +1,22 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @genesislcap/foundation-layout
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
[](https://www.typescriptlang.org/)
|
|
3
|
+
Documentation for this package is published on the Genesis docs site:
|
|
5
4
|
|
|
6
|
-
|
|
5
|
+
**Docs: [Layout management](https://docs.genesis.global/docs/develop/client-capabilities/layout-management/)**
|
|
7
6
|
|
|
8
|
-
|
|
9
|
-
```html
|
|
10
|
-
<foundation-layout ${ref('analyticsLayout')}>
|
|
11
|
-
<foundation-layout-region type="horizontal">
|
|
12
|
-
<foundation-layout-item title="Static Data Bar" registration="bar" closable>
|
|
13
|
-
<foundation-g2plot-chart
|
|
14
|
-
type="bar"
|
|
15
|
-
:config=${(x) => x.barConfig}
|
|
16
|
-
:data=${(x) => x.barData}
|
|
17
|
-
></foundation-g2plot-chart>
|
|
18
|
-
</foundation-layout-item>
|
|
19
|
-
<foundation-layout-region type="vertical">
|
|
20
|
-
<foundation-layout-item title="Static Data Stock" registration="stock" closable>
|
|
21
|
-
<foundation-g2plot-chart
|
|
22
|
-
type="stock"
|
|
23
|
-
:config=${(x) => x.stockConfiguration}
|
|
24
|
-
:data=${(x) => x.stockData}
|
|
25
|
-
></foundation-g2plot-chart>
|
|
26
|
-
</foundation-layout-item>
|
|
27
|
-
<foundation-layout-item title="Static Data Rose" registration="rose" closable>
|
|
28
|
-
<foundation-g2plot-chart
|
|
29
|
-
type="rose"
|
|
30
|
-
:config=${(x) => x.roseConfig}
|
|
31
|
-
:data=${(x) => x.roseData}
|
|
32
|
-
:legendParser=${(x) => x.roseLegendParser()}
|
|
33
|
-
></foundation-g2plot-chart>
|
|
34
|
-
</foundation-layout-item>
|
|
35
|
-
</foundation-layout-region>
|
|
36
|
-
</foundation-layout-region>
|
|
37
|
-
</foundation-layout>
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-

|
|
7
|
+
## Installation
|
|
41
8
|
|
|
42
|
-
|
|
9
|
+
Add the package to your `package.json` dependencies. After changing dependencies, run `npm run bootstrap` (or your project's equivalent). See [package.json basics](https://learn.genesis.global/secure/web/basics/package-json-basics/) for more information.
|
|
43
10
|
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
11
|
+
```json
|
|
12
|
+
{
|
|
13
|
+
"dependencies": {
|
|
14
|
+
"@genesislcap/foundation-layout": "latest"
|
|
15
|
+
}
|
|
16
|
+
}
|
|
50
17
|
```
|
|
51
18
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
:::info
|
|
55
|
-
For the rest of this document, the components will be referred to with the `foundation-` prefix.
|
|
56
|
-
:::
|
|
57
|
-
|
|
58
|
-
### Custom styling
|
|
59
|
-
|
|
60
|
-
The required class, template, and base styles are exported as part of the package, allowing a client to customise the styling of the layout system via design system extensions.
|
|
61
|
-
|
|
62
|
-
:::tip
|
|
63
|
-
All the customisable styles of the layout system are contained within the styles for [`<foundation-layout>`](./docs/api/foundation-layout.foundationlayout.md). So if you want to customise the styles in addition to setting the css variables, you only need to set the styles here.
|
|
64
|
-
:::
|
|
65
|
-
|
|
66
|
-
### [Top Level Component `<foundation-layout>`](./docs/api/foundation-layout.foundationlayout.md)
|
|
67
|
-
|
|
68
|
-
Top level web component, which is used to initialise a custom layout
|
|
69
|
-
|
|
70
|
-
- **reload-buffer** : numerical attribute that controls the buffer between how long the layout is reloaded. The default
|
|
71
|
-
is 500ms. In this case, the layout is only reloaded if the child elements of the layout region are manipulated
|
|
72
|
-
once every 500ms. This is to stop the layout being reloaded over and over for every single item during initialisation.
|
|
73
|
-
The higher the value is, the more performant the component is - but the first load will appear to take longer.
|
|
74
|
-
- **auto-save-key** : optional string which if set, will enable autosaving the layout under this key in local
|
|
75
|
-
storage. See [here](#autosaving-layout) for more.
|
|
76
|
-
|
|
77
|
-
:::tip
|
|
78
|
-
This only applies for usage with the declarative HTML API. When the layout first loads after this amount of time,
|
|
79
|
-
it emits an [event](#events).
|
|
80
|
-
:::
|
|
81
|
-
|
|
82
|
-
### [Layout Regions](./docs/api/foundation-layout.foundationlayoutregion.md)
|
|
83
|
-
|
|
84
|
-
If you don't specify the `type` of the layout region, it defaults to `type="horizontal"`;
|
|
85
|
-
|
|
86
|
-
- **type**: `vertical`, `horizontal`, `tabs` (default `horizontal`).
|
|
87
|
-
- **size**: optional string parameter defining size, [see here](#sizing).
|
|
88
|
-
|
|
89
|
-
#### `<foundation-layout-region type="vertical">`
|
|
90
|
-
|
|
91
|
-
Indicates to the layout system that all immediate children are (by default) to be split equally within the available space of this
|
|
92
|
-
component using n-1 column split(s). Can be nested within other horizontal and vertical regions.
|
|
93
|
-
|
|
94
|
-
#### `<foundation-layout-region type="horizontal">`
|
|
95
|
-
|
|
96
|
-
Indicates to the layout system that all immediate children are (by default) to be split equally among the available space of this
|
|
97
|
-
component using n-1 row split(s). Can be nested within other horizontal and vertical regions.
|
|
98
|
-
|
|
99
|
-
#### `<foundation-layout-region type="tabs">`
|
|
100
|
-
|
|
101
|
-
Indicates to the layout system that all immediate children are to be added as tabs in the available space of this component,
|
|
102
|
-
with a tab for each child. The tabs are ordered according to which child the layout item is (e.g. the second `<foundation-layout-item>`
|
|
103
|
-
of the tab split is the second tab). The first child will be the one that is open by default. Can be nested within horizontal
|
|
104
|
-
and vertical regions, but cannot have more layout sections inside it.
|
|
105
|
-
|
|
106
|
-
### [Layout Item `<foundation-layout-item>`](./docs/api/foundation-layout.foundationlayoutitem.md)
|
|
107
|
-
|
|
108
|
-
Wrapper component that lives inside a layout section and wraps the client content. All content must be inside a layout item;
|
|
109
|
-
otherwise, a runtime error will be thrown when the layout attempts to render itself on screen.
|
|
110
|
-
|
|
111
|
-
- **title**: string defining the title of the pane that contains the content. Defaults to `Item x`, where `x` is the pane number.
|
|
112
|
-
- **closable**: boolean defining whether this element is closable - Default false.
|
|
113
|
-
- **size**: optional string parameter defining size, [see here](#sizing).
|
|
114
|
-
- **registration**: optional string, which manually sets the registered name for the pane - [see here](#dynamic-registration-and-adding-items). By default, each item that doesn't have the `registration` attribute set will be a string registered sequentially starting at `"1"`.
|
|
115
|
-
|
|
116
|
-
### Sizing
|
|
117
|
-
|
|
118
|
-
The layout sections and layout item all have an _optional_ attribute:
|
|
119
|
-
|
|
120
|
-
- **size**: string defining the size. For rows, it specifies height. For columns, it specifies width. Has format `<number><size-unit>`.
|
|
121
|
-
Currently only supports units `fr` and `%`. Space is first proportionally allocated to items with sizeUnit `%`. If there is any space
|
|
122
|
-
left over (less than 100% allocated), then the remainder is allocated to the items with unit `fr` according to the fractional size.
|
|
123
|
-
If more than 100% is allocated, then an extra 50% is allocated to items with unit `fr` and is allocated to each item according to its
|
|
124
|
-
fractional size. All item sizes are then adjusted to bring the total back to 100%.
|
|
125
|
-
|
|
126
|
-
:::info
|
|
127
|
-
The size defines the size of the component _compared_ to the siblings _within_ the context of the component's parent.
|
|
128
|
-
:::
|
|
129
|
-
|
|
130
|
-
## JavaScript API
|
|
131
|
-
|
|
132
|
-
The JavaScript API is [accessed through the methods on the root layout object](./docs/api/foundation-layout.foundationlayout.md) and allows for saving/loading the layout state, and dynamically adding items to the layout at runtime.
|
|
133
|
-
|
|
134
|
-
### Dynamic registration and adding items
|
|
135
|
-
|
|
136
|
-
To have a pane displayed on the layout system, it must be *registered* with the layout system. When using the [declarative API](#declarative-html-api), the layout system takes care of this for you, but as you start to add items dynamically and then serialise the layout, you need to consider which panes are registered. See [this contained example](#contained-example), which allows the user to add pre-determined items to the layout dynamically.
|
|
137
|
-
|
|
138
|
-
:::tip
|
|
139
|
-
If you are only using the declarative API, and not using any dynamic integrations with JavaScript, then you shouldn't need to set the registration names of any items, as all the same items will be registered when you load a previously saved layout. If you are dynamically adding items as well, it is highly recommended to set the registration names of items manually. This makes it easier to figure out what is and is not registered.
|
|
140
|
-
* When using the declarative API, use the `registration` attribute on the `<foundation-layout-item>` component.
|
|
141
|
-
* When using the JavaScript API, set the `registration` optional parameter on the [registered element config](./docs/api/foundation-layout.registeredelementconfig.md).
|
|
142
|
-
:::
|
|
19
|
+
## [API Docs](./docs/api/index.md)
|
|
143
20
|
|
|
144
21
|
#### [Register Item](./docs/api/foundation-layout.foundationlayout.registeritem.md)
|
|
145
22
|
|
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.
|
|
4
|
+
"version": "14.409.0",
|
|
5
5
|
"license": "SEE LICENSE IN license.txt",
|
|
6
6
|
"main": "dist/esm/index.js",
|
|
7
7
|
"types": "dist/foundation-layout.d.ts",
|
|
@@ -38,22 +38,22 @@
|
|
|
38
38
|
}
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@genesislcap/foundation-testing": "14.
|
|
42
|
-
"@genesislcap/genx": "14.
|
|
43
|
-
"@genesislcap/rollup-builder": "14.
|
|
44
|
-
"@genesislcap/ts-builder": "14.
|
|
45
|
-
"@genesislcap/uvu-playwright-builder": "14.
|
|
46
|
-
"@genesislcap/vite-builder": "14.
|
|
47
|
-
"@genesislcap/webpack-builder": "14.
|
|
41
|
+
"@genesislcap/foundation-testing": "14.409.0",
|
|
42
|
+
"@genesislcap/genx": "14.409.0",
|
|
43
|
+
"@genesislcap/rollup-builder": "14.409.0",
|
|
44
|
+
"@genesislcap/ts-builder": "14.409.0",
|
|
45
|
+
"@genesislcap/uvu-playwright-builder": "14.409.0",
|
|
46
|
+
"@genesislcap/vite-builder": "14.409.0",
|
|
47
|
+
"@genesislcap/webpack-builder": "14.409.0"
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
50
|
"@genesis-community/golden-layout": "^2.11.0",
|
|
51
|
-
"@genesislcap/foundation-broadcast-channel": "14.
|
|
52
|
-
"@genesislcap/foundation-comms": "14.
|
|
53
|
-
"@genesislcap/foundation-events": "14.
|
|
54
|
-
"@genesislcap/foundation-logger": "14.
|
|
55
|
-
"@genesislcap/foundation-ui": "14.
|
|
56
|
-
"@genesislcap/foundation-utils": "14.
|
|
51
|
+
"@genesislcap/foundation-broadcast-channel": "14.409.0",
|
|
52
|
+
"@genesislcap/foundation-comms": "14.409.0",
|
|
53
|
+
"@genesislcap/foundation-events": "14.409.0",
|
|
54
|
+
"@genesislcap/foundation-logger": "14.409.0",
|
|
55
|
+
"@genesislcap/foundation-ui": "14.409.0",
|
|
56
|
+
"@genesislcap/foundation-utils": "14.409.0",
|
|
57
57
|
"@microsoft/fast-components": "2.30.6",
|
|
58
58
|
"@microsoft/fast-element": "1.14.0",
|
|
59
59
|
"@microsoft/fast-foundation": "2.50.0"
|
|
@@ -67,5 +67,5 @@
|
|
|
67
67
|
"access": "public"
|
|
68
68
|
},
|
|
69
69
|
"customElements": "dist/custom-elements.json",
|
|
70
|
-
"gitHead": "
|
|
70
|
+
"gitHead": "cbe0459d170f27c35a7de18cec415947aedf4da5"
|
|
71
71
|
}
|
|
@@ -1,46 +0,0 @@
|
|
|
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
|
-
|
|
@@ -1,21 +0,0 @@
|
|
|
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
|
-
|
|
@@ -1,15 +0,0 @@
|
|
|
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
|
-
```
|
|
@@ -1,80 +0,0 @@
|
|
|
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
|
-
|
|
@@ -1,13 +0,0 @@
|
|
|
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
|
-
```
|
|
@@ -1,18 +0,0 @@
|
|
|
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
|
-
|
|
@@ -1,25 +0,0 @@
|
|
|
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
|
-
|
|
@@ -1,18 +0,0 @@
|
|
|
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
|
-
|
|
@@ -1,13 +0,0 @@
|
|
|
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
|
-
```
|
|
@@ -1,13 +0,0 @@
|
|
|
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
|
-
```
|
|
@@ -1,23 +0,0 @@
|
|
|
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
|
-
|
|
@@ -1,20 +0,0 @@
|
|
|
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
|
-
|
|
@@ -1,64 +0,0 @@
|
|
|
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
|
-
|
|
@@ -1,18 +0,0 @@
|
|
|
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
|
-
|