@genesislcap/foundation-layout 10.3.1-alpha-08364b6.0 → 11.3.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 +98 -30
- package/dist/dts/index.d.ts +1 -1
- package/dist/dts/index.d.ts.map +1 -1
- package/dist/dts/main/index.d.ts +0 -1
- package/dist/dts/main/index.d.ts.map +1 -1
- package/dist/dts/main/layout-components.d.ts +1 -1
- package/dist/dts/main/layout-item.d.ts +7 -7
- package/dist/dts/main/layout-item.d.ts.map +1 -1
- package/dist/dts/main/layout-main.d.ts +71 -16
- package/dist/dts/main/layout-main.d.ts.map +1 -1
- package/dist/dts/main/layout-region.d.ts +4 -4
- package/dist/dts/main/layout-region.d.ts.map +1 -1
- package/dist/dts/styles/layout.styles.d.ts +1 -1
- package/dist/dts/utils/constants.d.ts +6 -1
- package/dist/dts/utils/constants.d.ts.map +1 -1
- package/dist/dts/utils/error.d.ts +2 -2
- package/dist/dts/utils/events.d.ts +6 -3
- package/dist/dts/utils/events.d.ts.map +1 -1
- package/dist/dts/utils/index.d.ts +1 -0
- package/dist/dts/utils/index.d.ts.map +1 -1
- package/dist/dts/utils/logger.d.ts.map +1 -1
- package/dist/dts/utils/types.d.ts +8 -4
- package/dist/dts/utils/types.d.ts.map +1 -1
- package/dist/esm/index.federated.js +0 -1
- package/dist/esm/index.js +1 -2
- package/dist/esm/main/index.js +0 -2
- package/dist/esm/main/layout-components.js +2 -3
- package/dist/esm/main/layout-item.js +3 -4
- package/dist/esm/main/layout-main.js +148 -39
- package/dist/esm/main/layout-region.js +3 -4
- package/dist/esm/styles/constants.js +0 -1
- package/dist/esm/styles/dragging.styles.js +0 -1
- package/dist/esm/styles/index.js +0 -1
- package/dist/esm/styles/layout.styles.js +1 -2
- package/dist/esm/utils/constants.js +6 -2
- package/dist/esm/utils/error.js +2 -3
- package/dist/esm/utils/events.js +5 -3
- package/dist/esm/utils/index.js +1 -1
- package/dist/esm/utils/logger.js +0 -1
- package/dist/esm/utils/misc.js +0 -1
- package/dist/esm/utils/templates.js +0 -1
- package/dist/esm/utils/types.js +0 -1
- package/dist/foundation-layout.api.json +180 -73
- package/dist/foundation-layout.d.ts +98 -56
- package/docs/api/foundation-layout.default_reload_buffer.md +0 -3
- package/docs/api/foundation-layout.foundationlayout.additem.md +0 -3
- package/docs/api/foundation-layout.foundationlayout.autosavekey.md +13 -0
- package/docs/api/foundation-layout.foundationlayout.dragging.md +0 -3
- package/docs/api/foundation-layout.foundationlayout.getlayout.md +0 -3
- package/docs/api/foundation-layout.foundationlayout.layoutrequiredregistrations.md +0 -3
- package/docs/api/foundation-layout.foundationlayout.loadlayout.md +4 -6
- package/docs/api/foundation-layout.foundationlayout.md +11 -11
- package/docs/api/foundation-layout.foundationlayout.missingitemplaceholder.md +13 -0
- package/docs/api/foundation-layout.foundationlayout.registereditems.md +0 -3
- package/docs/api/foundation-layout.foundationlayout.registeritem.md +0 -3
- package/docs/api/foundation-layout.foundationlayout.reloadbuffer.md +0 -3
- package/docs/api/foundation-layout.foundationlayout.tryloadlayoutfromlocalstorage.md +27 -0
- package/docs/api/foundation-layout.foundationlayoutcomponents.md +0 -3
- package/docs/api/foundation-layout.foundationlayoutitem.closable.md +0 -3
- package/docs/api/foundation-layout.foundationlayoutitem.md +4 -7
- package/docs/api/foundation-layout.foundationlayoutitem.registration.md +1 -4
- package/docs/api/foundation-layout.foundationlayoutitem.size.md +0 -3
- package/docs/api/foundation-layout.foundationlayoutitem.title.md +0 -3
- package/docs/api/foundation-layout.foundationlayoutregion.md +2 -5
- package/docs/api/foundation-layout.foundationlayoutregion.size.md +0 -3
- package/docs/api/foundation-layout.foundationlayoutregion.type.md +0 -3
- package/docs/api/foundation-layout.layoutemitevents.md +2 -4
- package/docs/api/foundation-layout.layoutreceiveevents.md +0 -3
- package/docs/api/foundation-layout.layoutreceiveeventsdetail.md +0 -3
- package/docs/api/foundation-layout.layoutregiontype.md +0 -3
- package/docs/api/foundation-layout.layoutregistrationerror._constructor_.md +0 -3
- package/docs/api/foundation-layout.layoutregistrationerror.md +1 -4
- package/docs/api/foundation-layout.layoutstyles.md +0 -3
- package/docs/api/foundation-layout.layouttemplate.md +0 -3
- package/docs/api/foundation-layout.layoutusageerror._constructor_.md +0 -3
- package/docs/api/foundation-layout.layoutusageerror.md +1 -4
- package/docs/api/foundation-layout.md +16 -16
- package/docs/api/foundation-layout.placement.md +0 -3
- package/docs/api/foundation-layout.registeredelementconfig.closable.md +0 -3
- package/docs/api/foundation-layout.registeredelementconfig.md +4 -7
- package/docs/api/foundation-layout.registeredelementconfig.registration.md +0 -3
- package/docs/api/foundation-layout.registeredelementconfig.size.md +0 -3
- package/docs/api/foundation-layout.registeredelementconfig.title.md +0 -3
- package/docs/api/foundation-layout.serialisedlayout.md +0 -3
- package/docs/api-report.md +23 -65
- package/docs/img/foundation-layout-example.png +0 -0
- package/jsdom.setup.ts +1 -0
- package/package.json +22 -8
- package/playwright.config.ts +23 -0
- package/test/unit/setupRegisterForTests.ts +30 -0
- package/test/unit/test.ts +1 -0
- package/dist/1.0.0.remoteEntry.js +0 -1
- package/dist/191.191.106ece7a41ded6731029.js +0 -2
- package/dist/191.9a61143c2afb6057ad1bae886d5d1a6e.js.map +0 -1
- package/dist/259.09c601e5288d875caab4df1e2354c0ea.js.map +0 -1
- package/dist/259.259.216fcad43e9a38888e08.js +0 -2
- package/dist/415.415.094780a1a1162c7e5f1c.js +0 -3
- package/dist/415.415.094780a1a1162c7e5f1c.js.LICENSE.txt +0 -4
- package/dist/415.fcfb4f02eaecbfa31fc322639f244245.js.map +0 -1
- package/dist/459.459.6afc33f49546607f9227.js +0 -515
- package/dist/459.57760bcb7fc239af5b5953687ad192ff.js.map +0 -1
- package/dist/623.623.0e7e8f23454ee96ed9c8.js +0 -3
- package/dist/623.623.0e7e8f23454ee96ed9c8.js.LICENSE.txt +0 -4
- package/dist/623.e8f211473f9034c4157d362efb017821.js.map +0 -1
- package/dist/755.718e14af7194fb741f98580b24b2bb8f.js.map +0 -1
- package/dist/755.755.f93ee58c2b836a669ec4.js +0 -2
- package/dist/dashboard.json +0 -1
- package/dist/esm/index.federated.js.map +0 -1
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/main/index.js.map +0 -1
- package/dist/esm/main/layout-components.js.map +0 -1
- package/dist/esm/main/layout-item.js.map +0 -1
- package/dist/esm/main/layout-main.js.map +0 -1
- package/dist/esm/main/layout-region.js.map +0 -1
- package/dist/esm/styles/constants.js.map +0 -1
- package/dist/esm/styles/dragging.styles.js.map +0 -1
- package/dist/esm/styles/index.js.map +0 -1
- package/dist/esm/styles/layout.styles.js.map +0 -1
- package/dist/esm/utils/constants.js.map +0 -1
- package/dist/esm/utils/error.js.map +0 -1
- package/dist/esm/utils/events.js.map +0 -1
- package/dist/esm/utils/index.js.map +0 -1
- package/dist/esm/utils/logger.js.map +0 -1
- package/dist/esm/utils/misc.js.map +0 -1
- package/dist/esm/utils/templates.js.map +0 -1
- package/dist/esm/utils/types.js.map +0 -1
- package/dist/favicon.ico +0 -0
- package/dist/foundationLayout.3cfa4a65fd1f4b6b3ab7671e3356db59.js.map +0 -1
- package/dist/index.ejs +0 -23
- package/dist/index.html +0 -15
- package/dist/info.ejs +0 -13
- package/dist/main.b0ddbf415137dc7a9e92.js +0 -2
- package/dist/main.f141788ee57f3820f1f4f0fc27368847.js.map +0 -1
- package/dist/npm.consola.713.b1e4073e73c71572987a.js +0 -2
- package/dist/npm.consola.a0d3324d3e61dcc430c3029da5f4dcc7.js.map +0 -1
- package/dist/npm.genesis-community.248.9c9900001dbc5ba9c3ed.js +0 -2
- package/dist/npm.genesis-community.2e0cc159dabe113d6fb29bb505c1a0d4.js.map +0 -1
- package/dist/npm.microsoft.127.00f16f24d8da8fd89263.js +0 -1469
- package/dist/npm.microsoft.127.00f16f24d8da8fd89263.js.LICENSE.txt +0 -14
- package/dist/npm.microsoft.be43958facd28231e770c1307660f64d.js.map +0 -1
- package/dist/remoteEntry.js +0 -2
- package/dist/serve.json +0 -3
package/README.md
CHANGED
|
@@ -9,35 +9,31 @@
|
|
|
9
9
|
|
|
10
10
|
The following example shows the usage of the declarative API with `zero-charts` and the output that it produces.
|
|
11
11
|
```html
|
|
12
|
-
<foundation-layout>
|
|
12
|
+
<foundation-layout ${ref('analyticsLayout')}>
|
|
13
13
|
<foundation-layout-region>
|
|
14
|
-
<foundation-layout-
|
|
15
|
-
<
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
14
|
+
<foundation-layout-region type="horizontal">
|
|
15
|
+
<foundation-layout-item title="Static Data Bar" registration="bar" closable>
|
|
16
|
+
<foundation-g2plot-chart
|
|
17
|
+
type="bar"
|
|
18
|
+
:config=${(x) => x.barConfig}
|
|
19
|
+
:data=${(x) => x.barData}
|
|
20
|
+
></foundation-g2plot-chart>
|
|
21
|
+
</foundation-layout-item>
|
|
21
22
|
<foundation-layout-region type="vertical">
|
|
22
|
-
<foundation-layout-item title="
|
|
23
|
-
<
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
isSnapshot="true"
|
|
29
|
-
></charts-datasource>
|
|
30
|
-
</zero-charts>
|
|
23
|
+
<foundation-layout-item title="Static Data Stock" registration="stock" closable>
|
|
24
|
+
<foundation-g2plot-chart
|
|
25
|
+
type="stock"
|
|
26
|
+
:config=${(x) => x.stockConfiguration}
|
|
27
|
+
:data=${(x) => x.stockData}
|
|
28
|
+
></foundation-g2plot-chart>
|
|
31
29
|
</foundation-layout-item>
|
|
32
|
-
<foundation-layout-item title="
|
|
33
|
-
<
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
></charts-datasource>
|
|
40
|
-
</zero-charts>
|
|
30
|
+
<foundation-layout-item title="Static Data Rose" registration="rose" closable>
|
|
31
|
+
<foundation-g2plot-chart
|
|
32
|
+
type="rose"
|
|
33
|
+
:config=${(x) => x.roseConfig}
|
|
34
|
+
:data=${(x) => x.roseData}
|
|
35
|
+
:legendParser=${(x) => x.roseLegendParser()}
|
|
36
|
+
></foundation-g2plot-chart>
|
|
41
37
|
</foundation-layout-item>
|
|
42
38
|
</foundation-layout-region>
|
|
43
39
|
</foundation-layout-region>
|
|
@@ -52,7 +48,7 @@ The following example shows the usage of the declarative API with `zero-charts`
|
|
|
52
48
|
|
|
53
49
|
To enable this module in your application, follow the steps below.
|
|
54
50
|
|
|
55
|
-
1. Add `@genesislcap/foundation-layout` as a dependency in your **package.json** file. Whenever you change the dependencies of your project, ensure you run the `$ npm run bootstrap` command again.
|
|
51
|
+
1. Add `@genesislcap/foundation-layout` as a dependency in your **package.json** file. Whenever you change the dependencies of your project, ensure you run the `$ npm run bootstrap` command again. You can find more information in the [package.json basics](https://learn.genesis.global/secure/web/basics/package-json-basics/) page.
|
|
56
52
|
|
|
57
53
|
```javascript
|
|
58
54
|
{
|
|
@@ -96,6 +92,8 @@ Top level web component, which is used to initialise a custom layout
|
|
|
96
92
|
is 500ms. In this case, the layout is only reloaded if the child elements of the layout region are manipulated
|
|
97
93
|
once every 500ms. This is to stop the layout being reloaded over and over for every single item during initialisation.
|
|
98
94
|
The higher the value is, the more performant the component is - but the first load will appear to take longer.
|
|
95
|
+
- **auto-save-key** : optional string which if set, will enable autosaving the layout under this key in local
|
|
96
|
+
storage. See [here](#autosaving-layout) for more.
|
|
99
97
|
|
|
100
98
|
::tip
|
|
101
99
|
This only applies for usage with the declarative HTML API. When the layout first loads after this amount of time,
|
|
@@ -186,7 +184,8 @@ Use this function over `.layoutRequiredRegistrations(layout: SerialisedLayout)`
|
|
|
186
184
|
|
|
187
185
|
### Serialising layout
|
|
188
186
|
|
|
189
|
-
The JavaScript API can be used to save and load layout states. This only describes the state of the dynamic layout itself. It is the responsibility of any components contained within their layout to serialise their own state, if required.
|
|
187
|
+
The JavaScript API can be used to manually save and load layout states. This only describes the state of the dynamic layout itself. It is the responsibility of any components contained within their layout to serialise their own state, if required.
|
|
188
|
+
To enable autosaving the layout see [here](#autosaving-layout).
|
|
190
189
|
|
|
191
190
|
#### [Get Layout](./docs/api/foundation-layout.foundationlayout.getlayout.md)
|
|
192
191
|
|
|
@@ -210,6 +209,31 @@ this.$emit(eventType, eventDetail)
|
|
|
210
209
|
```
|
|
211
210
|
Each event requires a certain detail to process the event - see [the map of events to their required details](./docs/api/foundation-layout.layoutreceiveeventsdetail.md).
|
|
212
211
|
|
|
212
|
+
## Autosaving layout
|
|
213
|
+
|
|
214
|
+
There is opt-in functionality provided in the layout to autosave the layout in local storage as the user interacts with it. Set the `auto-save-key` attribute to a unique string on the root element to enable the feature, and this is the key in which the layout will be saved into. As the user performs the following actions: adding an item, removing an item, resizing items using the divider, and dragging items around the layout - the layout will be saved for later recall in local storage.
|
|
215
|
+
|
|
216
|
+
When you have enabled autosave you are still able to use the manual [serialising commands](#serialising-layout).
|
|
217
|
+
|
|
218
|
+
### Reloading the layout
|
|
219
|
+
|
|
220
|
+
The provided function [tryLoadLayoutFromLocalStorage()](./docs/api/foundation-layout.foundationlayout.tryloadlayoutfromlocalstorage.md) is used to rehydrate the layout from local storage, if `auto-save-key` is enabled.
|
|
221
|
+
If you are using the declarative API then this function is automatically called for you.
|
|
222
|
+
|
|
223
|
+
If you are manually registering items (too) using the JavaScript API you must manually call this function, immediately after you have finishing registering all of the items. For an example [see here](#contained-example).
|
|
224
|
+
|
|
225
|
+
### Layout placeholder
|
|
226
|
+
|
|
227
|
+
If the layout is auto-loaded with items that are missing from the registration, then a placeholder item is displayed instead. Additionally, the close option is added to the pane. This accounts for you removing an item from a layout that a user has autosaved in their config.
|
|
228
|
+
|
|
229
|
+
You can change the text of the placeholder using the observable binding `:missingItemPlaceholder`. This is a function which takes a string (the missing registration name) and returns the string to use as the placeholder. A default is set, but you can override it. See the override implementation [in this example](#contained-example).
|
|
230
|
+
|
|
231
|
+
### Invalidating the cache
|
|
232
|
+
|
|
233
|
+
As explained in the previous section, a placeholder item is added if an item is no longer registered for the auto-loaded layout. This accounts for removing an item. However, there is the reverse issue: If you are only using the declarative API and you add a new item, if the user already has an autosaved layout then that will be loaded which will effectively hide the new item you've added.
|
|
234
|
+
|
|
235
|
+
In this case you must invalidate the autosaved layout cache. The cleanest and easiest implementation for you is to add a hash onto the end of your `auto-save-key` which will start a new autosave for this table (and reload the default which will contain your new layout item).
|
|
236
|
+
|
|
213
237
|
## Contained elements
|
|
214
238
|
|
|
215
239
|
This section concerns the behaviour of elements inside the layout. If you are using simple elements or Genesis-supplied elements this section is less of a concern, but if you are building complex custom components yourself, you will need this information.
|
|
@@ -585,7 +609,11 @@ export const template = html<ContainedExample>`
|
|
|
585
609
|
<foundation-button @click=${(x) => x.addItem('3')}>Test 3</foundation-button>
|
|
586
610
|
</div>
|
|
587
611
|
<div style="display: block; position: relative; grid-row-start: 2; grid-row-end: 12;">
|
|
588
|
-
<foundation-layout
|
|
612
|
+
<foundation-layout
|
|
613
|
+
auto-save-key="layout-preview-contained-example"
|
|
614
|
+
:missingItemPlaceholder=${(x) => x.missingItemOverride()}
|
|
615
|
+
${ref('containedExampleLayout')}
|
|
616
|
+
></foundation-layout>
|
|
589
617
|
</div>
|
|
590
618
|
</div>
|
|
591
619
|
`;
|
|
@@ -620,6 +648,7 @@ export class ContainedExample extends FASTElement {
|
|
|
620
648
|
this.containedExampleLayout.registerItem('1', [h1, p1]);
|
|
621
649
|
this.containedExampleLayout.registerItem('2', [h2, p2]);
|
|
622
650
|
this.containedExampleLayout.registerItem('3', [h3, p3]);
|
|
651
|
+
this.containedExampleLayout.tryLoadLayoutFromLocalStorage();
|
|
623
652
|
}
|
|
624
653
|
|
|
625
654
|
addItem(registration: string) {
|
|
@@ -629,6 +658,8 @@ export class ContainedExample extends FASTElement {
|
|
|
629
658
|
closable: true,
|
|
630
659
|
});
|
|
631
660
|
}
|
|
661
|
+
|
|
662
|
+
missingItemOverride = () => (missingItem: string) => `Missing Item: ${missingItem}`;
|
|
632
663
|
}
|
|
633
664
|
```
|
|
634
665
|
|
|
@@ -723,6 +754,10 @@ layout.registerItem(test, [element]);
|
|
|
723
754
|
Only items _missing_ from the `requiredRegistrations` is an issue. If there are items in the `currentRegistrations` that are not in `requiredRegistrations`, this is *not* an issue - because these will simply be unused registrations.
|
|
724
755
|
:::
|
|
725
756
|
|
|
757
|
+
:::warning
|
|
758
|
+
If you are calling `registerItem` manually and are using the autosave feature, [see here](#reloading-the-layout).
|
|
759
|
+
:::
|
|
760
|
+
|
|
726
761
|
## Incorrect examples
|
|
727
762
|
|
|
728
763
|
The following section contains examples of incorrect usage, which are useful for troubleshooting.
|
|
@@ -909,8 +944,41 @@ You can then use the custom component in the layout:
|
|
|
909
944
|
</foundation-layout>
|
|
910
945
|
```
|
|
911
946
|
|
|
947
|
+
### New layout item not displaying
|
|
948
|
+
Say you have the following layout, [the simple example](#simple-example), with autosave enabled.
|
|
949
|
+
```html
|
|
950
|
+
<foundation-layout auto-save-key="simple-example">
|
|
951
|
+
<foundation-layout-region type="horizontal">
|
|
952
|
+
<foundation-layout-item title="Component 1">
|
|
953
|
+
<!-- Content -->
|
|
954
|
+
</foundation-layout-item>
|
|
955
|
+
<foundation-layout-item title="Component 2">
|
|
956
|
+
<!-- Content -->
|
|
957
|
+
</foundation-layout-item>
|
|
958
|
+
</foundation-layout-region>
|
|
959
|
+
</foundation-layout>
|
|
960
|
+
```
|
|
961
|
+
|
|
962
|
+
The user of your layout will move things around and this will cache the layout. Say you then update the layout to add an item.
|
|
963
|
+
```html
|
|
964
|
+
<foundation-layout auto-save-key="simple-example">
|
|
965
|
+
<foundation-layout-region type="horizontal">
|
|
966
|
+
<foundation-layout-item title="Component 1">
|
|
967
|
+
<!-- Content -->
|
|
968
|
+
</foundation-layout-item>
|
|
969
|
+
<foundation-layout-item title="Component 2">
|
|
970
|
+
<!-- Content -->
|
|
971
|
+
</foundation-layout-item>
|
|
972
|
+
<foundation-layout-item title="Component 3">
|
|
973
|
+
<!-- Content -->
|
|
974
|
+
</foundation-layout-item>
|
|
975
|
+
</foundation-layout-region>
|
|
976
|
+
</foundation-layout>
|
|
977
|
+
```
|
|
912
978
|
|
|
979
|
+
You and the user will only see the first two items like before. This is because the cached layout is being loaded, which does not contain the
|
|
980
|
+
new item. To fix this you must [invalidate the cache](#invalidating-the-cache).
|
|
913
981
|
|
|
914
982
|
## License
|
|
915
983
|
|
|
916
|
-
Note: this project provides front end dependencies and uses licensed components listed in the next section, thus licenses for those components are required during development. Contact [Genesis Global](https://genesis.global/contact-us/) for more details.
|
|
984
|
+
Note: this project provides front end dependencies and uses licensed components listed in the next section, thus licenses for those components are required during development. Contact [Genesis Global](https://genesis.global/contact-us/) for more details.
|
package/dist/dts/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export * from './main';
|
|
2
|
-
export
|
|
2
|
+
export { DEFAULT_RELOAD_BUFFER, LayoutEmitEvents, LayoutReceiveEvents, LayoutReceiveEventsDetail, LayoutRegionType, LayoutRegistrationError, LayoutUsageError, Placement, RegisteredElementConfig, RegistrationConfig, SerialisedLayout, } from './utils';
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/dts/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,OAAO,EACL,qBAAqB,EACrB,gBAAgB,EAChB,mBAAmB,EACnB,yBAAyB,EACzB,gBAAgB,EAChB,uBAAuB,EACvB,gBAAgB,EAChB,SAAS,EACT,uBAAuB,EACvB,kBAAkB,EAClB,gBAAgB,GACjB,MAAM,SAAS,CAAC"}
|
package/dist/dts/main/index.d.ts
CHANGED
|
@@ -2,5 +2,4 @@ export { FoundationLayoutItem } from './layout-item';
|
|
|
2
2
|
export { FoundationLayoutRegion } from './layout-region';
|
|
3
3
|
export { FoundationLayout, layoutStyles, layoutTemplate } from './layout-main';
|
|
4
4
|
export * from './layout-components';
|
|
5
|
-
export { DEFAULT_RELOAD_BUFFER, LayoutEmitEvents, LayoutReceiveEvents, LayoutRegionType, Placement, RegisteredElementConfig, RegistrationConfig, SerialisedLayout, } from '../utils';
|
|
6
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/main/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/E,cAAc,qBAAqB,CAAC
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/main/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/E,cAAc,qBAAqB,CAAC"}
|
|
@@ -11,7 +11,7 @@ import type { Container } from '@microsoft/fast-foundation';
|
|
|
11
11
|
* @example
|
|
12
12
|
* `<zero-layout></zero-layout>` if you are using the layout with the `zero` design-system.
|
|
13
13
|
*
|
|
14
|
-
* @
|
|
14
|
+
* @public
|
|
15
15
|
*/
|
|
16
16
|
export declare const foundationLayoutComponents: {
|
|
17
17
|
foundationLayout: (overrideDefinition?: import("@microsoft/fast-foundation").OverrideFoundationElementDefinition<{
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { componentType, LayoutComponent, RegistrationConfig } from '../utils';
|
|
2
1
|
import { FoundationElement } from '@microsoft/fast-foundation';
|
|
2
|
+
import { componentType, LayoutComponent, RegistrationConfig } from '../utils';
|
|
3
3
|
/**
|
|
4
|
-
* @
|
|
4
|
+
* @public
|
|
5
5
|
* `FoundationLayoutItem` is a custom element that represents an item in the layout.
|
|
6
6
|
* @remarks
|
|
7
7
|
* This element is used to wrap html elements and configure their layout settings as part of the layout system.
|
|
@@ -13,28 +13,28 @@ export declare class FoundationLayoutItem extends FoundationElement implements L
|
|
|
13
13
|
* Sets the title of the item which is displayed on the tab.
|
|
14
14
|
* @remarks
|
|
15
15
|
* Defaults to `Item ` + {@link FoundationLayoutItem.registration}
|
|
16
|
-
* @
|
|
16
|
+
* @public
|
|
17
17
|
*/
|
|
18
18
|
title: string;
|
|
19
19
|
/**
|
|
20
20
|
* Boolean attribute controls whether the window can be closed in the GUI.
|
|
21
21
|
* Defaults to `false`.
|
|
22
|
-
* @
|
|
22
|
+
* @public
|
|
23
23
|
*/
|
|
24
24
|
closable: boolean;
|
|
25
25
|
/**
|
|
26
26
|
* optional string describing the size of the new item (see the written documentation for more info)
|
|
27
|
-
* @
|
|
27
|
+
* @public
|
|
28
28
|
*/
|
|
29
29
|
size: string;
|
|
30
30
|
/**
|
|
31
|
-
* Sets the registration name for the item, which can be used later to add the item via the JavaScript API using {@link FoundationLayout.addItem
|
|
31
|
+
* Sets the registration name for the item, which can be used later to add the item via the JavaScript API using {@link FoundationLayout.addItem}.
|
|
32
32
|
* @remarks
|
|
33
33
|
* Items added via the JavaScript API and HTML API share the same pool of registration names.
|
|
34
34
|
* Using a duplicate registration name is a runtime error.
|
|
35
35
|
* This registration name defaults to the number of the window it is.
|
|
36
36
|
* It is highly recommended if you are using the JavaScript API that you set a registration name here manually.
|
|
37
|
-
* @
|
|
37
|
+
* @public
|
|
38
38
|
*/
|
|
39
39
|
registration: string;
|
|
40
40
|
/** @internal */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layout-item.d.ts","sourceRoot":"","sources":["../../../src/main/layout-item.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,aAAa,EAEb,eAAe,EACf,kBAAkB,EAEnB,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"layout-item.d.ts","sourceRoot":"","sources":["../../../src/main/layout-item.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EACL,aAAa,EAEb,eAAe,EACf,kBAAkB,EAEnB,MAAM,UAAU,CAAC;AAIlB;;;;;;;GAOG;AACH,qBAAa,oBAAqB,SAAQ,iBAAkB,YAAW,eAAe;IACpF;;;;;OAKG;IACG,KAAK,EAAE,MAAM,CAAC;IAEpB;;;;OAIG;IACwB,QAAQ,EAAE,OAAO,CAAS;IAErD;;;OAGG;IACG,IAAI,EAAE,MAAM,CAAC;IAEnB;;;;;;;;OAQG;IACG,YAAY,EAAE,MAAM,CAAC;IAE3B,gBAAgB;IAChB,CAAC,aAAa,CAAC,SAAmB;IAElC,gBAAgB;IAChB,OAAO,CAAC,eAAe,CAAY;IAEnC,gBAAgB;IAChB,iBAAiB,IAAI,IAAI;IAyBzB,gBAAgB;IAChB,OAAO,CAAC,wBAAwB;IAIhC,gBAAgB;IAChB,mBAAmB,IAAI,IAAI;IAI3B,gBAAgB;IAChB,wBAAwB,CAAC,MAAM,EAAE,kBAAkB,GAAG,MAAM;CAG7D;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,oBAAoB;;;;;;+BAG/B,CAAC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { FoundationElement } from '@microsoft/fast-foundation';
|
|
2
1
|
import { RootItemConfig } from '@genesis-community/golden-layout';
|
|
2
|
+
import { FoundationElement } from '@microsoft/fast-foundation';
|
|
3
3
|
import { LayoutComponent, Placement, RegisteredElementConfig, RegistrationConfig, SerialisedLayout, componentType } from '../utils/';
|
|
4
4
|
export { layoutStyles } from '../styles';
|
|
5
5
|
/**
|
|
6
|
-
* @
|
|
6
|
+
* @public
|
|
7
7
|
* Top level web component which is used to initialise a custom layout
|
|
8
8
|
* @remarks
|
|
9
9
|
* Can be used in a composition to customise the styles of the layout.
|
|
@@ -18,17 +18,34 @@ export declare class FoundationLayout extends FoundationElement implements Layou
|
|
|
18
18
|
/**
|
|
19
19
|
* Number describing how long to wait in ms before reloading the config when adding items
|
|
20
20
|
* declaratively by the html API. Default 500 (ms).
|
|
21
|
-
* @
|
|
21
|
+
* @public
|
|
22
22
|
*/
|
|
23
23
|
reloadBuffer: number;
|
|
24
24
|
private reloadPending;
|
|
25
25
|
private registeredComponents;
|
|
26
26
|
/** @internal */
|
|
27
|
+
private uuid;
|
|
28
|
+
/** @internal */
|
|
29
|
+
private session;
|
|
30
|
+
/**
|
|
31
|
+
* Attribute which if set will auto save and load the layout as the user changes it.
|
|
32
|
+
* Omit this attribute to disable this feature.
|
|
33
|
+
* Set attribute using `auto-save-key`.
|
|
34
|
+
* @public
|
|
35
|
+
*/
|
|
36
|
+
autoSaveKey?: string;
|
|
37
|
+
/**
|
|
38
|
+
* Function which is used to generate the placeholder text when a layout is loaded
|
|
39
|
+
* with a missing item.
|
|
40
|
+
* @public
|
|
41
|
+
*/
|
|
42
|
+
missingItemPlaceholder: (missingItem: string) => string;
|
|
43
|
+
/** @internal */
|
|
27
44
|
hasFirstLoaded: boolean;
|
|
28
45
|
/** @internal */
|
|
29
46
|
usingDeclerativeAPI: boolean;
|
|
30
47
|
/**
|
|
31
|
-
* @
|
|
48
|
+
* @public
|
|
32
49
|
* Set to true when the user is currently dragging the panes inside of the layout
|
|
33
50
|
*/
|
|
34
51
|
dragging: boolean;
|
|
@@ -46,11 +63,13 @@ export declare class FoundationLayout extends FoundationElement implements Layou
|
|
|
46
63
|
private onItemAdded;
|
|
47
64
|
/** @internal */
|
|
48
65
|
private onItemRemoved;
|
|
66
|
+
/** @internal */
|
|
67
|
+
private onItemResized;
|
|
49
68
|
/**
|
|
50
69
|
* JS API, public
|
|
51
70
|
*/
|
|
52
71
|
/**
|
|
53
|
-
* @
|
|
72
|
+
* @public
|
|
54
73
|
* Gets all of the required registration function names for a set of config
|
|
55
74
|
* @remarks
|
|
56
75
|
* You can use this with {@link FoundationLayout.registeredItems | registeredItems} to work out what items you need to register with {@link FoundationLayout.registerItem | registerItem()}
|
|
@@ -62,7 +81,7 @@ export declare class FoundationLayout extends FoundationElement implements Layou
|
|
|
62
81
|
*/
|
|
63
82
|
static layoutRequiredRegistrations(layout: SerialisedLayout): string[];
|
|
64
83
|
/**
|
|
65
|
-
* @
|
|
84
|
+
* @public
|
|
66
85
|
* Gets all of the currently registered names
|
|
67
86
|
* @remarks
|
|
68
87
|
* You can use this with {@link FoundationLayout.layoutRequiredRegistrations | layoutRequiredRegistrations} to work out what items you need to register with {@link FoundationLayout.registerItem | registerItem()}
|
|
@@ -72,25 +91,40 @@ export declare class FoundationLayout extends FoundationElement implements Layou
|
|
|
72
91
|
*/
|
|
73
92
|
registeredItems(): string[];
|
|
74
93
|
/**
|
|
75
|
-
* @
|
|
94
|
+
* @public
|
|
76
95
|
* Gets a minified string containing the config describing the current layout of the layout object to later restore in {@link FoundationLayout.loadLayout | function}
|
|
77
96
|
* @returns - latest version of {@link SerialisedLayout} describing the layout
|
|
78
97
|
*/
|
|
79
98
|
getLayout(): SerialisedLayout;
|
|
80
99
|
/**
|
|
81
|
-
* @
|
|
100
|
+
* Try to load a layout from local storage, or return false. Only required if manually calling {@link FoundationLayout.registerItem}
|
|
101
|
+
* @remarks
|
|
102
|
+
* Attempt to load an autosaved layout from local storage, keyed on the `auto-save-key` attribute.
|
|
103
|
+
* If `auto-save-key` attribute is not set or there is no autosaved layout yet, this will return false. Else, true.
|
|
104
|
+
*
|
|
105
|
+
* This function is automatically called when loading the layout via the declarative API so if you're not registering components via
|
|
106
|
+
* the JavaScript API then you don't need to call this function. If you *are* calling {@link FoundationLayout.registerItem} then you should call this function immediately afterwards.
|
|
107
|
+
*
|
|
108
|
+
* Will load the layout with `handleMissingItem = 'placeholder` so placeholder text will be shown for any missing items.
|
|
109
|
+
* @returns boolean - true if a layout was loaded, false if not
|
|
110
|
+
* @public
|
|
111
|
+
*/
|
|
112
|
+
tryLoadLayoutFromLocalStorage(): boolean;
|
|
113
|
+
/**
|
|
114
|
+
* @public
|
|
82
115
|
* Restores a layout described in the config from {@link FoundationLayout.getLayout | getLayout()}
|
|
83
116
|
*
|
|
84
117
|
* @remarks
|
|
85
|
-
* 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.
|
|
118
|
+
* 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 {@link FoundationLayout.registerItem} 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 {@link RegisteredElementConfig} and `foundation-layout-item` APIs. You can use {@link FoundationLayout.layoutRequiredRegistrations} to check which items are registered in a current layout in order to dynamically add any missing items before you can restore the layout
|
|
86
119
|
*
|
|
87
120
|
* @param layout - any version of {@link SerialisedLayout} object describing the layout
|
|
88
|
-
* @
|
|
121
|
+
* @param handleMissingItem - what to do if the layout contains items that are not currently registered with the layout system. Defaults to 'error' which will throw an error. If set to 'placeholder' then any missing items will be replaced with a placeholder element. You can control the text of the placeholder element with {@link FoundationLayout.missingItemPlaceholder}.
|
|
122
|
+
* @throws {@link LayoutUsageError} if you attempt to load a layout with registered items that are not currently registered with the layout system, and handleMissingItem is set to 'error' (default).
|
|
89
123
|
* @throws various errors if the layout string is malformed and cannot be parsed
|
|
90
124
|
*/
|
|
91
|
-
loadLayout(layout: SerialisedLayout): void;
|
|
125
|
+
loadLayout(layout: SerialisedLayout, handleMissingItem?: 'placeholder' | 'error'): void;
|
|
92
126
|
/**
|
|
93
|
-
* @
|
|
127
|
+
* @public
|
|
94
128
|
* Dynamically add a new item to the layout. The user can move the new plane to whenever they want once it has been added.
|
|
95
129
|
* @remarks
|
|
96
130
|
* Adding a new item invokes the registration previously made explicitly via {@link FoundationLayout.registerItem | registerItem()} or implicitly via the html declerative API.
|
|
@@ -103,7 +137,7 @@ export declare class FoundationLayout extends FoundationElement implements Layou
|
|
|
103
137
|
*/
|
|
104
138
|
addItem(config: RegisteredElementConfig, placement?: Placement): void;
|
|
105
139
|
/**
|
|
106
|
-
* @
|
|
140
|
+
* @public
|
|
107
141
|
* Register a collection of `Element` and associate them with an `ID` with the layout system for later use.
|
|
108
142
|
* @remarks
|
|
109
143
|
* You would use this to register elements that you later want to load when using {@link FoundationLayout.loadLayout}.
|
|
@@ -153,16 +187,37 @@ export declare class FoundationLayout extends FoundationElement implements Layou
|
|
|
153
187
|
private setupLayoutReceiveEvents;
|
|
154
188
|
/**
|
|
155
189
|
* Saves the stored layout config according to the Golden Layout provider.
|
|
156
|
-
*
|
|
190
|
+
* And caches the layout in local storage if {@link FoundationLayout.autoSaveKey} is set.
|
|
157
191
|
* @internal
|
|
158
192
|
* */
|
|
159
|
-
private
|
|
193
|
+
private cacheAndSaveLayout;
|
|
194
|
+
/**
|
|
195
|
+
* Used when we are trying to load a layout with missing registrations and we want to add placeholder items
|
|
196
|
+
* @remarks
|
|
197
|
+
* This function will register the items with placeholder text, and set them to be closeable if they were not already
|
|
198
|
+
* As config is passed by reference it is updated directly
|
|
199
|
+
* @param config - The layout config to update
|
|
200
|
+
* @param missingRegisteredItems - The items which were missing from the registrations
|
|
201
|
+
* @internal
|
|
202
|
+
*/
|
|
203
|
+
private registerPlaceholdersAndSetClosable;
|
|
204
|
+
/**
|
|
205
|
+
* Loads the provided config into Golden Layout and does other setup
|
|
206
|
+
* @remarks
|
|
207
|
+
* Loads the config into Golden Layout, and then sets up the event listeners for the layout
|
|
208
|
+
* When loading the layout the visual configuration is loaded
|
|
209
|
+
* Event listeners are added to the drag handles to emulate resizing events
|
|
210
|
+
*
|
|
211
|
+
* **This is the only function which should call this.layout.loadLayout() directly.**
|
|
212
|
+
* @internal
|
|
213
|
+
*/
|
|
214
|
+
private loadGLConfigAndSetup;
|
|
160
215
|
}
|
|
161
216
|
/**
|
|
162
217
|
* `ViewTemplate` which defines the html for {@link FoundationLayout}.
|
|
163
218
|
* @remarks
|
|
164
219
|
* Can be used in a composition to customise the styles of the layout.
|
|
165
|
-
* @
|
|
220
|
+
* @public
|
|
166
221
|
*/
|
|
167
222
|
export declare const layoutTemplate: import("@microsoft/fast-element").ViewTemplate<FoundationLayout, any>;
|
|
168
223
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layout-main.d.ts","sourceRoot":"","sources":["../../../src/main/layout-main.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"layout-main.d.ts","sourceRoot":"","sources":["../../../src/main/layout-main.ts"],"names":[],"mappings":"AAAA,OAAO,EAOL,cAAc,EACf,MAAM,kCAAkC,CAAC;AAI1C,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAE/D,OAAO,EAEL,eAAe,EAGf,SAAS,EACT,uBAAuB,EACvB,kBAAkB,EAClB,gBAAgB,EAChB,aAAa,EAId,MAAM,WAAW,CAAC;AAKnB,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AASzC;;;;;GAKG;AACH,qBAAa,gBAAiB,SAAQ,iBAAkB,YAAW,eAAe;IAChF,OAAO,CAAC,MAAM,CAAe;IAC7B,gBAAgB;IAChB,aAAa,EAAE,WAAW,CAAC;IAC3B,OAAO,CAAC,YAAY,CAAqC;IAEzD,gBAAgB;IAChB,CAAC,aAAa,CAAC,SAAmB;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,gBAAiB,MAAM,YAC2B;IAEpF,gBAAgB;IACJ,cAAc,UAAS;IACnC,gBAAgB;IACJ,mBAAmB,UAAS;IAExC;;;OAGG;IACS,QAAQ,EAAE,OAAO,CAAS;IAEtC,gBAAgB;;IAShB,gBAAgB;IAChB,iBAAiB,IAAI,IAAI;IAoBzB,gBAAgB;IAChB,oBAAoB,IAAI,IAAI;IAO5B,gBAAgB;IAChB,OAAO,CAAC,WAAW;IAInB,gBAAgB;IAChB,OAAO,CAAC,UAAU;IAKlB,gBAAgB;IAChB,OAAO,CAAC,WAAW;IAKnB,gBAAgB;IAChB,OAAO,CAAC,aAAa;IAKrB,gBAAgB;IAChB,OAAO,CAAC,aAAa;IAKrB;;OAEG;IAEH;;;;;;;;;;OAUG;IACH,MAAM,CAAC,2BAA2B,CAAC,MAAM,EAAE,gBAAgB,GAAG,MAAM,EAAE;IActE;;;;;;;;OAQG;IACH,eAAe,IAAI,MAAM,EAAE;IAI3B;;;;OAIG;IACH,SAAS,IAAI,gBAAgB;IAI7B;;;;;;;;;;;;OAYG;IACH,6BAA6B,IAAI,OAAO;IAcxC;;;;;;;;;;;OAWG;IACH,UAAU,CAAC,MAAM,EAAE,gBAAgB,EAAE,iBAAiB,GAAE,aAAa,GAAG,OAAiB;IAqBzF;;;;;;;;;;;OAWG;IACH,OAAO,CAAC,MAAM,EAAE,uBAAuB,EAAE,SAAS,GAAE,SAA6B;IAiDjF;;;;;;;;;;;;;;;OAeG;IACH,YAAY,CAAC,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,MAAM;IAW/D;;OAEG;IAEH;;;;OAIG;IACH,mBAAmB,IAAI,IAAI;IAe3B;;;;;;;OAOG;IACH,gBAAgB,CAAC,CAAC,SAAS,cAAc,EAAE,IAAI,EAAE,CAAC,GAAG,CAAC;IAetD;;;;;;;OAOG;IACH,wBAAwB,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,EAAE,kBAAkB,GAAG,MAAM;IAyDtE;;;OAGG;IACH,OAAO,CAAC,wBAAwB;IAehC;;;;SAIK;IACL,OAAO,CAAC,kBAAkB;IAY1B;;;;;;;;OAQG;IACH,OAAO,CAAC,kCAAkC;IA4B1C;;;;;;;;;OASG;IACH,OAAO,CAAC,oBAAoB;CAQ7B;AAMD;;;;;GAKG;AACH,eAAO,MAAM,cAAc,uEAK1B,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;2BAI3B,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { RootItemConfig } from '@genesis-community/golden-layout';
|
|
2
|
-
import { componentType, LayoutComponent, LayoutRegionType, RegistrationConfig } from '../utils';
|
|
3
2
|
import { FoundationElement } from '@microsoft/fast-foundation';
|
|
3
|
+
import { componentType, LayoutComponent, LayoutRegionType, RegistrationConfig } from '../utils';
|
|
4
4
|
/**
|
|
5
|
-
* @
|
|
5
|
+
* @public
|
|
6
6
|
* `FoundationLayoutRegion` is a custom element that represents a region in the layout.
|
|
7
7
|
* @remarks
|
|
8
8
|
* This element is used to create a region in the layout. It can be used to create a horizontal or vertical split, or a tabbed region.
|
|
@@ -12,13 +12,13 @@ import { FoundationElement } from '@microsoft/fast-foundation';
|
|
|
12
12
|
export declare class FoundationLayoutRegion extends FoundationElement implements LayoutComponent {
|
|
13
13
|
/**
|
|
14
14
|
* optional string describing the size of the new item (see the written documentation for more info)
|
|
15
|
-
* @
|
|
15
|
+
* @public
|
|
16
16
|
*/
|
|
17
17
|
size: string;
|
|
18
18
|
/**
|
|
19
19
|
* Defines the {@link LayoutRegionType | type} of the region.
|
|
20
20
|
* Defaults to `horizontal`.
|
|
21
|
-
* @
|
|
21
|
+
* @public
|
|
22
22
|
*/
|
|
23
23
|
type: LayoutRegionType;
|
|
24
24
|
/** @internal */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layout-region.d.ts","sourceRoot":"","sources":["../../../src/main/layout-region.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"layout-region.d.ts","sourceRoot":"","sources":["../../../src/main/layout-region.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,cAAc,EACf,MAAM,kCAAkC,CAAC;AAE1C,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EACL,aAAa,EAEb,eAAe,EACf,gBAAgB,EAEhB,kBAAkB,EAEnB,MAAM,UAAU,CAAC;AAiBlB;;;;;;;GAOG;AACH,qBAAa,sBAAuB,SAAQ,iBAAkB,YAAW,eAAe;IACtF;;;OAGG;IACG,IAAI,EAAE,MAAM,CAAC;IAEnB;;;;OAIG;IACG,IAAI,EAAE,gBAAgB,CAAC;IAE7B,gBAAgB;IAChB,CAAC,aAAa,CAAC,EAAE,gBAAgB,CAAgB;IAEjD;;;;OAIG;IACH,OAAO,CAAC,YAAY,CAA0C;IAE9D,gBAAgB;IAChB,iBAAiB,IAAI,IAAI;IAUzB;;;OAGG;IACH,OAAO,CAAC,iBAAiB;IAMzB;;;OAGG;IACH,OAAO,CAAC,qBAAqB;IAS7B,gBAAgB;IAChB,OAAO,CAAC,wBAAwB;IAIhC,gBAAgB;IAChB,gBAAgB,CAAC,CAAC,SAAS,cAAc,EAAE,IAAI,EAAE,CAAC,GAAG,CAAC;IAKtD,gBAAgB;IAChB,mBAAmB,IAAI,IAAI;IAI3B,gBAAgB;IAChB,wBAAwB,CAAC,MAAM,EAAE,kBAAkB,GAAG,MAAM;CAG7D;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,sBAAsB;;;;;;iCAGjC,CAAC"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* `ElementStyles` which defines the css for {@link FoundationLayout}.
|
|
3
3
|
* @remarks
|
|
4
4
|
* Can be used in a composition to customise the styles of the layout.
|
|
5
|
-
* @
|
|
5
|
+
* @public
|
|
6
6
|
*/
|
|
7
7
|
export declare const layoutStyles: import("@microsoft/fast-element").ElementStyles;
|
|
8
8
|
//# sourceMappingURL=layout.styles.d.ts.map
|
|
@@ -8,7 +8,12 @@ export declare const componentType: unique symbol;
|
|
|
8
8
|
* the layout while the declarative API is loading.
|
|
9
9
|
*
|
|
10
10
|
* During the first load of the layout, a loading spinner will be shown.
|
|
11
|
-
* @
|
|
11
|
+
* @public
|
|
12
12
|
*/
|
|
13
13
|
export declare const DEFAULT_RELOAD_BUFFER = 500;
|
|
14
|
+
/**
|
|
15
|
+
* Key to cache autosaved layouts in local storage
|
|
16
|
+
* @internal
|
|
17
|
+
*/
|
|
18
|
+
export declare const AUTOSAVE_KEY = "foundation-layout-autosave";
|
|
14
19
|
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/utils/constants.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,aAAa,eAA2B,CAAC;AAEtD;;;;;;GAMG;AACH,eAAO,MAAM,qBAAqB,MAAM,CAAC"}
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/utils/constants.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,aAAa,eAA2B,CAAC;AAEtD;;;;;;GAMG;AACH,eAAO,MAAM,qBAAqB,MAAM,CAAC;AAEzC;;;GAGG;AACH,eAAO,MAAM,YAAY,+BAA+B,CAAC"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @
|
|
2
|
+
* @public
|
|
3
3
|
*/
|
|
4
4
|
export declare class LayoutUsageError extends Error {
|
|
5
5
|
constructor(message: string);
|
|
6
6
|
}
|
|
7
7
|
/**
|
|
8
|
-
* @
|
|
8
|
+
* @public
|
|
9
9
|
*/
|
|
10
10
|
export declare class LayoutRegistrationError extends Error {
|
|
11
11
|
constructor(message: string);
|
|
@@ -7,18 +7,21 @@
|
|
|
7
7
|
* 'itemAdded' - emitted when an item is added to the layout'
|
|
8
8
|
* <br/>
|
|
9
9
|
* 'itemRemoved' - emitted when an item is removed from the layout'
|
|
10
|
-
*
|
|
10
|
+
* <br/>
|
|
11
|
+
* 'itemResized' - emitted when the user drags the divider to resize elements
|
|
12
|
+
* @public
|
|
11
13
|
*/
|
|
12
14
|
export declare const LayoutEmitEvents: {
|
|
13
15
|
readonly firstLoaded: "first-loaded";
|
|
14
16
|
readonly itemAdded: "item-added";
|
|
15
17
|
readonly itemRemoved: "item-removed";
|
|
18
|
+
readonly itemResized: "item-resized";
|
|
16
19
|
};
|
|
17
20
|
/**
|
|
18
21
|
* Defines events that the layout system listens for
|
|
19
22
|
*
|
|
20
23
|
* 'changeTitle' - emit this from a contained item to update the title of the window that contains it.
|
|
21
|
-
* @
|
|
24
|
+
* @public
|
|
22
25
|
*/
|
|
23
26
|
export declare const LayoutReceiveEvents: {
|
|
24
27
|
readonly changeTitle: "change-title";
|
|
@@ -27,7 +30,7 @@ export declare const LayoutReceiveEvents: {
|
|
|
27
30
|
* Defines the shape of the detail that the layout listens works with for events it listens on
|
|
28
31
|
*
|
|
29
32
|
* 'changeTitle' - `title` is the string you want to set. For `mode`: `replace` will set the title to be `title`, `suffix` will append `title` to the end of the existing title.
|
|
30
|
-
* @
|
|
33
|
+
* @public
|
|
31
34
|
*/
|
|
32
35
|
export type LayoutReceiveEventsDetail = {
|
|
33
36
|
changeTitle: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../../src/utils/events.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../../src/utils/events.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,gBAAgB;;;;;CAKnB,CAAC;AAEX;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB;;CAEtB,CAAC;AAEX;;;;;GAKG;AACH,MAAM,MAAM,yBAAyB,GAAG;IACtC,WAAW,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,SAAS,GAAG,QAAQ,CAAA;KAAE,CAAC;CAC5D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../../src/utils/logger.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../../src/utils/logger.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,MAAM,gDAAoC,CAAC"}
|