@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
|
@@ -1,96 +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) > [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
|
-
|
|
@@ -1,400 +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)
|
|
4
|
-
|
|
5
|
-
## FoundationLayout class
|
|
6
|
-
|
|
7
|
-
Top level web component which is used to initialise a custom layout
|
|
8
|
-
|
|
9
|
-
**Signature:**
|
|
10
|
-
|
|
11
|
-
```typescript
|
|
12
|
-
export declare class FoundationLayout extends FoundationElement implements LayoutComponent
|
|
13
|
-
```
|
|
14
|
-
**Extends:** FoundationElement
|
|
15
|
-
|
|
16
|
-
**Implements:** LayoutComponent
|
|
17
|
-
|
|
18
|
-
## Remarks
|
|
19
|
-
|
|
20
|
-
Can be used in a composition to customise the styles of the layout.
|
|
21
|
-
|
|
22
|
-
The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the `FoundationLayout` class.
|
|
23
|
-
|
|
24
|
-
## Properties
|
|
25
|
-
|
|
26
|
-
<table><thead><tr><th>
|
|
27
|
-
|
|
28
|
-
Property
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
</th><th>
|
|
32
|
-
|
|
33
|
-
Modifiers
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
</th><th>
|
|
37
|
-
|
|
38
|
-
Type
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
</th><th>
|
|
42
|
-
|
|
43
|
-
Description
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
</th></tr></thead>
|
|
47
|
-
<tbody><tr><td>
|
|
48
|
-
|
|
49
|
-
[autoSaveKey?](./foundation-layout.foundationlayout.autosavekey.md)
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
</td><td>
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
</td><td>
|
|
56
|
-
|
|
57
|
-
string
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
</td><td>
|
|
61
|
-
|
|
62
|
-
_(Optional)_ 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`<!-- -->.
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
</td></tr>
|
|
66
|
-
<tr><td>
|
|
67
|
-
|
|
68
|
-
[class](./foundation-layout.foundationlayout.class.md)
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
</td><td>
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
</td><td>
|
|
75
|
-
|
|
76
|
-
"FoundationLayoutMain"
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
</td><td>
|
|
80
|
-
|
|
81
|
-
Identifier constant token.
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
</td></tr>
|
|
85
|
-
<tr><td>
|
|
86
|
-
|
|
87
|
-
[customButtons](./foundation-layout.foundationlayout.custombuttons.md)
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
</td><td>
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
</td><td>
|
|
94
|
-
|
|
95
|
-
[CustomButton](./foundation-layout.custombutton.md)<!-- -->\[\]
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
</td><td>
|
|
99
|
-
|
|
100
|
-
Set custom button definition on this property to add them to the layout header controls
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
</td></tr>
|
|
104
|
-
<tr><td>
|
|
105
|
-
|
|
106
|
-
[dimensionsConfig?](./foundation-layout.foundationlayout.dimensionsconfig.md)
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
</td><td>
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
</td><td>
|
|
113
|
-
|
|
114
|
-
LayoutConfig.Dimensions
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
</td><td>
|
|
118
|
-
|
|
119
|
-
_(Optional)_ Apply dimensions config to the layout, such as setting the size of the drag handles.
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
</td></tr>
|
|
123
|
-
<tr><td>
|
|
124
|
-
|
|
125
|
-
[dragging](./foundation-layout.foundationlayout.dragging.md)
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
</td><td>
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
</td><td>
|
|
132
|
-
|
|
133
|
-
boolean
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
</td><td>
|
|
137
|
-
|
|
138
|
-
Set to true when the user is currently dragging the panes inside of the layout
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
</td></tr>
|
|
142
|
-
<tr><td>
|
|
143
|
-
|
|
144
|
-
[hasFirstLoaded](./foundation-layout.foundationlayout.hasfirstloaded.md)
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
</td><td>
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
</td><td>
|
|
151
|
-
|
|
152
|
-
boolean
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
</td><td>
|
|
156
|
-
|
|
157
|
-
Boolean signifies whether the layout has loaded for the first time or not.
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
</td></tr>
|
|
161
|
-
<tr><td>
|
|
162
|
-
|
|
163
|
-
[lifecycleUpdateToken](./foundation-layout.foundationlayout.lifecycleupdatetoken.md)
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
</td><td>
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
</td><td>
|
|
170
|
-
|
|
171
|
-
string \| undefined
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
</td><td>
|
|
175
|
-
|
|
176
|
-
Used to calculate whether a layout item should run its lifecycle methods or not
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
</td></tr>
|
|
180
|
-
<tr><td>
|
|
181
|
-
|
|
182
|
-
[missingItemPlaceholder](./foundation-layout.foundationlayout.missingitemplaceholder.md)
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
</td><td>
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
</td><td>
|
|
189
|
-
|
|
190
|
-
(missingItem: string) => string
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
</td><td>
|
|
194
|
-
|
|
195
|
-
Function which is used to generate the placeholder text when a layout is loaded with a missing item.
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
</td></tr>
|
|
199
|
-
<tr><td>
|
|
200
|
-
|
|
201
|
-
[popoutConfig](./foundation-layout.foundationlayout.popoutconfig.md)
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
</td><td>
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
</td><td>
|
|
208
|
-
|
|
209
|
-
[LayoutPopoutConfig](./foundation-layout.layoutpopoutconfig.md) \| undefined
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
</td><td>
|
|
213
|
-
|
|
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
|
-
|
|
216
|
-
|
|
217
|
-
</td></tr>
|
|
218
|
-
<tr><td>
|
|
219
|
-
|
|
220
|
-
[reloadBuffer](./foundation-layout.foundationlayout.reloadbuffer.md)
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
</td><td>
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
</td><td>
|
|
227
|
-
|
|
228
|
-
number
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
</td><td>
|
|
232
|
-
|
|
233
|
-
Number describing how long to wait in ms before reloading the config when adding items declaratively by the html API. Default 500 (ms).
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
</td></tr>
|
|
237
|
-
</tbody></table>
|
|
238
|
-
|
|
239
|
-
## Methods
|
|
240
|
-
|
|
241
|
-
<table><thead><tr><th>
|
|
242
|
-
|
|
243
|
-
Method
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
</th><th>
|
|
247
|
-
|
|
248
|
-
Modifiers
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
</th><th>
|
|
252
|
-
|
|
253
|
-
Description
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
</th></tr></thead>
|
|
257
|
-
<tbody><tr><td>
|
|
258
|
-
|
|
259
|
-
[addItem(config, placement)](./foundation-layout.foundationlayout.additem.md)
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
</td><td>
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
</td><td>
|
|
266
|
-
|
|
267
|
-
Dynamically add a new item to the layout. The user can move the new plane to whenever they want once it has been added.
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
</td></tr>
|
|
271
|
-
<tr><td>
|
|
272
|
-
|
|
273
|
-
[clearAutosaveAndRevertToDefault()](./foundation-layout.foundationlayout.clearautosaveandreverttodefault.md)
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
</td><td>
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
</td><td>
|
|
280
|
-
|
|
281
|
-
Clears the autosaved layout from local storage and reverts to the default layout
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
</td></tr>
|
|
285
|
-
<tr><td>
|
|
286
|
-
|
|
287
|
-
[getLayout()](./foundation-layout.foundationlayout.getlayout.md)
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
</td><td>
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
</td><td>
|
|
294
|
-
|
|
295
|
-
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)
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
</td></tr>
|
|
299
|
-
<tr><td>
|
|
300
|
-
|
|
301
|
-
[layoutRequiredRegistrations(layout)](./foundation-layout.foundationlayout.layoutrequiredregistrations.md)
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
</td><td>
|
|
305
|
-
|
|
306
|
-
`static`
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
</td><td>
|
|
310
|
-
|
|
311
|
-
Gets all of the required element registry function names for a set of config
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
</td></tr>
|
|
315
|
-
<tr><td>
|
|
316
|
-
|
|
317
|
-
[loadLayout(layout, handleMissingItem, disableCache)](./foundation-layout.foundationlayout.loadlayout.md)
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
</td><td>
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
</td><td>
|
|
324
|
-
|
|
325
|
-
Restores a layout described in the config from [getLayout()](./foundation-layout.foundationlayout.getlayout.md)
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
</td></tr>
|
|
329
|
-
<tr><td>
|
|
330
|
-
|
|
331
|
-
[registeredItems()](./foundation-layout.foundationlayout.registereditems.md)
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
</td><td>
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
</td><td>
|
|
338
|
-
|
|
339
|
-
Gets all of the currently registered names
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
</td></tr>
|
|
343
|
-
<tr><td>
|
|
344
|
-
|
|
345
|
-
[registerItem(registration, elementsOrFactory)](./foundation-layout.foundationlayout.registeritem.md)
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
</td><td>
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
</td><td>
|
|
352
|
-
|
|
353
|
-
Register a collection of `Element` or a factory function and associate them with an `ID` with the layout system for later use.
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
</td></tr>
|
|
357
|
-
<tr><td>
|
|
358
|
-
|
|
359
|
-
[removeItems(registration, force)](./foundation-layout.foundationlayout.removeitems.md)
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
</td><td>
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
</td><td>
|
|
366
|
-
|
|
367
|
-
Removes all instances of a specified registered item from the layout.
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
</td></tr>
|
|
371
|
-
<tr><td>
|
|
372
|
-
|
|
373
|
-
[tryActivatePopoutMode()](./foundation-layout.foundationlayout.tryactivatepopoutmode.md)
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
</td><td>
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
</td><td>
|
|
380
|
-
|
|
381
|
-
**_(BETA)_** 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.
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
</td></tr>
|
|
385
|
-
<tr><td>
|
|
386
|
-
|
|
387
|
-
[tryLoadLayoutFromLocalStorage()](./foundation-layout.foundationlayout.tryloadlayoutfromlocalstorage.md)
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
</td><td>
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
</td><td>
|
|
394
|
-
|
|
395
|
-
Try to load a layout from local storage, or return false. Only required if manually calling [FoundationLayout.registerItem()](./foundation-layout.foundationlayout.registeritem.md)
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
</td></tr>
|
|
399
|
-
</tbody></table>
|
|
400
|
-
|
|
@@ -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) > [missingItemPlaceholder](./foundation-layout.foundationlayout.missingitemplaceholder.md)
|
|
4
|
-
|
|
5
|
-
## FoundationLayout.missingItemPlaceholder property
|
|
6
|
-
|
|
7
|
-
Function which is used to generate the placeholder text when a layout is loaded with a missing item.
|
|
8
|
-
|
|
9
|
-
**Signature:**
|
|
10
|
-
|
|
11
|
-
```typescript
|
|
12
|
-
missingItemPlaceholder: (missingItem: string) => string;
|
|
13
|
-
```
|
|
@@ -1,16 +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) > [popoutConfig](./foundation-layout.foundationlayout.popoutconfig.md)
|
|
4
|
-
|
|
5
|
-
## FoundationLayout.popoutConfig property
|
|
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
|
-
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
|
-
|
|
12
|
-
**Signature:**
|
|
13
|
-
|
|
14
|
-
```typescript
|
|
15
|
-
popoutConfig: LayoutPopoutConfig | undefined;
|
|
16
|
-
```
|
|
@@ -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) > [registeredItems](./foundation-layout.foundationlayout.registereditems.md)
|
|
4
|
-
|
|
5
|
-
## FoundationLayout.registeredItems() method
|
|
6
|
-
|
|
7
|
-
Gets all of the currently registered names
|
|
8
|
-
|
|
9
|
-
**Signature:**
|
|
10
|
-
|
|
11
|
-
```typescript
|
|
12
|
-
registeredItems(): string[];
|
|
13
|
-
```
|
|
14
|
-
**Returns:**
|
|
15
|
-
|
|
16
|
-
string\[\]
|
|
17
|
-
|
|
18
|
-
string\[\] - an item for each registered element currently registered with the layout system
|
|
19
|
-
|
|
20
|
-
## Remarks
|
|
21
|
-
|
|
22
|
-
You can use this with [layoutRequiredRegistrations](./foundation-layout.foundationlayout.layoutrequiredregistrations.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)
|
|
23
|
-
|
|
@@ -1,108 +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) > [registerItem](./foundation-layout.foundationlayout.registeritem.md)
|
|
4
|
-
|
|
5
|
-
## FoundationLayout.registerItem() method
|
|
6
|
-
|
|
7
|
-
Register a collection of `Element` or a factory function and associate them with an `ID` with the layout system for later use.
|
|
8
|
-
|
|
9
|
-
**Signature:**
|
|
10
|
-
|
|
11
|
-
```typescript
|
|
12
|
-
registerItem(registration: string, elementsOrFactory: Element[] | ComponentFactory): 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
|
-
registration
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
</td><td>
|
|
39
|
-
|
|
40
|
-
string
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
</td><td>
|
|
44
|
-
|
|
45
|
-
string of the registration ID
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
</td></tr>
|
|
49
|
-
<tr><td>
|
|
50
|
-
|
|
51
|
-
elementsOrFactory
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
</td><td>
|
|
55
|
-
|
|
56
|
-
Element\[\] \| [ComponentFactory](./foundation-layout.componentfactory.md)
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
</td><td>
|
|
60
|
-
|
|
61
|
-
Either Elements\[\] containing the reference to the elements to register, or a ComponentFactory function
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
</td></tr>
|
|
65
|
-
</tbody></table>
|
|
66
|
-
|
|
67
|
-
**Returns:**
|
|
68
|
-
|
|
69
|
-
string
|
|
70
|
-
|
|
71
|
-
- string defining the name of the registered item with the layout system (config.id if set).
|
|
72
|
-
|
|
73
|
-
## Exceptions
|
|
74
|
-
|
|
75
|
-
[LayoutUsageError](./foundation-layout.layoutusageerror.md) if you attempt to add an item before the layout has been initialised.
|
|
76
|
-
|
|
77
|
-
[LayoutRegistrationError](./foundation-layout.layoutregistrationerror.md) if you attempt to use a `registration` name which is already in use (declarative html API and JavaScript API registrations use the same "pool" of registration names).
|
|
78
|
-
|
|
79
|
-
## Remarks
|
|
80
|
-
|
|
81
|
-
You can register either an array of elements or a factory function.
|
|
82
|
-
|
|
83
|
-
\*\*Element registration\*\*: Use this to register elements that you later want to load when using [FoundationLayout.loadLayout()](./foundation-layout.foundationlayout.loadlayout.md)<!-- -->. Use [FoundationLayout.layoutRequiredRegistrations()](./foundation-layout.foundationlayout.layoutrequiredregistrations.md) to see what components need to be registered for a certain config and then register them using this function before calling [FoundationLayout.loadLayout()](./foundation-layout.foundationlayout.loadlayout.md)<!-- -->. When registering an element it is moved by reference into the internals of the layout, so if you pass elements already in the DOM then they will disappear. If you want to avoid this you can pass copies using `element.cloneNode(true)`<!-- -->.
|
|
84
|
-
|
|
85
|
-
\*\*Factory registration\*\*: 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). The factory function will be called each time a new instance of the component is needed. It 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.
|
|
86
|
-
|
|
87
|
-
## Example 1
|
|
88
|
-
|
|
89
|
-
Element registration:
|
|
90
|
-
|
|
91
|
-
```typescript
|
|
92
|
-
const div = document.createElement('div');
|
|
93
|
-
div.innerHTML = '<h1>Hello</h1>';
|
|
94
|
-
layout.registerItem('my-element', [div]);
|
|
95
|
-
```
|
|
96
|
-
|
|
97
|
-
## Example 2
|
|
98
|
-
|
|
99
|
-
Factory registration (React):
|
|
100
|
-
|
|
101
|
-
```typescript
|
|
102
|
-
layout.registerItem('text-field', (container) => {
|
|
103
|
-
const root = createRoot(container);
|
|
104
|
-
root.render(<TextFieldComponent />);
|
|
105
|
-
return () => root.unmount();
|
|
106
|
-
});
|
|
107
|
-
```
|
|
108
|
-
|
|
@@ -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) > [reloadBuffer](./foundation-layout.foundationlayout.reloadbuffer.md)
|
|
4
|
-
|
|
5
|
-
## FoundationLayout.reloadBuffer property
|
|
6
|
-
|
|
7
|
-
Number describing how long to wait in ms before reloading the config when adding items declaratively by the html API. Default 500 (ms).
|
|
8
|
-
|
|
9
|
-
**Signature:**
|
|
10
|
-
|
|
11
|
-
```typescript
|
|
12
|
-
reloadBuffer: number;
|
|
13
|
-
```
|