@genesislcap/foundation-layout 14.125.0 → 14.126.0-PA-1036.1
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +4 -0
- package/dist/custom-elements.json +145 -118
- package/dist/dts/main/layout-main.d.ts +15 -0
- package/dist/dts/main/layout-main.d.ts.map +1 -1
- package/dist/esm/main/layout-main.js +59 -0
- package/dist/foundation-layout.api.json +64 -0
- package/dist/foundation-layout.d.ts +15 -0
- package/docs/api/foundation-layout.foundationlayout.md +1 -0
- package/docs/api/foundation-layout.foundationlayout.removeitems.md +31 -0
- package/docs/api-report.md +1 -0
- package/package.json +7 -7
package/README.md
CHANGED
@@ -169,6 +169,10 @@ This API enables you to register an item at runtime, but it will not be displaye
|
|
169
169
|
|
170
170
|
Add an item or items that have previously been registered with the layout.
|
171
171
|
|
172
|
+
#### [Remove Items](./docs/api/foundation-layout.foundationlayout.removeitems.md)
|
173
|
+
|
174
|
+
Dynamically remove items from the layout. See linked API for side effects and options.
|
175
|
+
|
172
176
|
#### [Layout Required Registrations](./docs/api/foundation-layout.foundationlayout.layoutrequiredregistrations.md)
|
173
177
|
|
174
178
|
Static function to read a layout config. It returns a list of all the required registrations required to load it in the layout system. [See this example](#loading-serialised-layouts).
|
@@ -143,6 +143,124 @@
|
|
143
143
|
}
|
144
144
|
]
|
145
145
|
},
|
146
|
+
{
|
147
|
+
"kind": "javascript-module",
|
148
|
+
"path": "src/styles/constants.ts",
|
149
|
+
"declarations": [
|
150
|
+
{
|
151
|
+
"kind": "variable",
|
152
|
+
"name": "glVisualConfig",
|
153
|
+
"type": {
|
154
|
+
"text": "Omit<LayoutConfig, 'root'>"
|
155
|
+
},
|
156
|
+
"default": "{\n dimensions: {\n headerHeight: 38,\n borderWidth: 12,\n },\n header: {\n maximise: 'maximise',\n minimise: 'minimise',\n popout: false,\n },\n}"
|
157
|
+
},
|
158
|
+
{
|
159
|
+
"kind": "variable",
|
160
|
+
"name": "LAYOUT_ICONS",
|
161
|
+
"type": {
|
162
|
+
"text": "{\n renameSVG,\n maximiseSVG,\n minimiseSVG,\n closeSVG,\n tabDropdownSVG,\n popoutSVG,\n}"
|
163
|
+
},
|
164
|
+
"default": "{\n renameSVG,\n maximiseSVG,\n minimiseSVG,\n closeSVG,\n tabDropdownSVG,\n popoutSVG,\n}",
|
165
|
+
"description": "A collection of SVG icons in base64 format.",
|
166
|
+
"privacy": "public"
|
167
|
+
}
|
168
|
+
],
|
169
|
+
"exports": [
|
170
|
+
{
|
171
|
+
"kind": "js",
|
172
|
+
"name": "glVisualConfig",
|
173
|
+
"declaration": {
|
174
|
+
"name": "glVisualConfig",
|
175
|
+
"module": "src/styles/constants.ts"
|
176
|
+
}
|
177
|
+
},
|
178
|
+
{
|
179
|
+
"kind": "js",
|
180
|
+
"name": "LAYOUT_ICONS",
|
181
|
+
"declaration": {
|
182
|
+
"name": "LAYOUT_ICONS",
|
183
|
+
"module": "src/styles/constants.ts"
|
184
|
+
}
|
185
|
+
}
|
186
|
+
]
|
187
|
+
},
|
188
|
+
{
|
189
|
+
"kind": "javascript-module",
|
190
|
+
"path": "src/styles/dragging.styles.ts",
|
191
|
+
"declarations": [
|
192
|
+
{
|
193
|
+
"kind": "variable",
|
194
|
+
"name": "globalDraggingStyles",
|
195
|
+
"default": "`\n .lm_dragProxy .lm_content {\n box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.9);\n }\n .lm_dropTargetIndicator {\n box-shadow: inset 0 0 30px #000000;\n outline: 1px dashed #cccccc;\n transition: all 200ms ease;\n }\n .lm_dropTargetIndicator .lm_inner {\n background: var(${neutralFillStealthRest.cssCustomProperty});\n opacity: 0.2;\n }\n .lm_dragProxy.lm_left .lm_header,\n .lm_dragProxy.lm_right .lm_header {\n width: 20px;\n float: left;\n vertical-align: top;\n }\n .lm_dragProxy.lm_left .lm_header .lm_tabs,\n .lm_dragProxy.lm_right .lm_header .lm_tabs {\n transform-origin: left top;\n top: 0;\n width: 1000px;\n }\n .lm_dragProxy.lm_left .lm_header .lm_controls,\n .lm_dragProxy.lm_right .lm_header .lm_controls {\n bottom: 0;\n }\n .lm_dragProxy.lm_left .lm_items,\n .lm_dragProxy.lm_right .lm_items {\n float: left;\n }\n .lm_dragProxy.lm_left .lm_header .lm_tabs {\n transform: rotate(-90deg) scaleX(-1);\n left: 0;\n }\n .lm_dragProxy.lm_left .lm_header .lm_tabs .lm_tab {\n transform: scaleX(-1);\n margin-top: 1px;\n }\n .lm_dragProxy.lm_left .lm_header .lm_tabdropdown_list {\n top: initial;\n right: initial;\n left: 20px;\n }\n .lm_dragProxy.lm_right .lm_content {\n float: left;\n }\n .lm_dragProxy.lm_right .lm_header .lm_tabs {\n transform: rotate(90deg) scaleX(1);\n left: 100%;\n margin-left: 0;\n }\n .lm_dragProxy.lm_right .lm_header .lm_controls {\n left: 3px;\n }\n .lm_dragProxy.lm_right .lm_header .lm_tabdropdown_list {\n top: initial;\n right: 20px;\n }\n .lm_dragProxy.lm_bottom .lm_header .lm_tab {\n margin-top: 0;\n border-top: none;\n }\n .lm_dragProxy.lm_bottom .lm_header .lm_controls,\n .lm_stack.lm_bottom .lm_header .lm_controls {\n top: 3px;\n }\n .lm_dragProxy.lm_bottom .lm_header .lm_tabdropdown_list,\n .lm_stack.lm_bottom .lm_header .lm_tabdropdown_list {\n top: initial;\n bottom: 20px;\n }\n .lm_dragProxy {\n position: absolute;\n top: 0;\n left: 0;\n z-index: 30;\n }\n .lm_dragProxy .lm_header {\n background: transparent;\n }\n .lm_dragProxy .lm_content {\n border-top: none;\n overflow: hidden;\n }\n .lm_dropTargetIndicator {\n display: none;\n position: absolute;\n z-index: 20;\n }\n .lm_dropTargetIndicator .lm_inner {\n width: 100%;\n height: 100%;\n position: relative;\n top: 0;\n left: 0;\n }\n .lm_transition_indicator {\n display: none;\n width: 20px;\n height: 20px;\n position: absolute;\n top: 0;\n left: 0;\n z-index: 20;\n }\n`",
|
196
|
+
"description": "This is defined as a string rather than a css template\nbecause it is applied to a CSSStyleSheet object rather than\nused as a FAST template"
|
197
|
+
}
|
198
|
+
],
|
199
|
+
"exports": [
|
200
|
+
{
|
201
|
+
"kind": "js",
|
202
|
+
"name": "globalDraggingStyles",
|
203
|
+
"declaration": {
|
204
|
+
"name": "globalDraggingStyles",
|
205
|
+
"module": "src/styles/dragging.styles.ts"
|
206
|
+
}
|
207
|
+
}
|
208
|
+
]
|
209
|
+
},
|
210
|
+
{
|
211
|
+
"kind": "javascript-module",
|
212
|
+
"path": "src/styles/index.ts",
|
213
|
+
"declarations": [],
|
214
|
+
"exports": [
|
215
|
+
{
|
216
|
+
"kind": "js",
|
217
|
+
"name": "*",
|
218
|
+
"declaration": {
|
219
|
+
"name": "*",
|
220
|
+
"package": "./constants"
|
221
|
+
}
|
222
|
+
},
|
223
|
+
{
|
224
|
+
"kind": "js",
|
225
|
+
"name": "*",
|
226
|
+
"declaration": {
|
227
|
+
"name": "*",
|
228
|
+
"package": "./dragging.styles"
|
229
|
+
}
|
230
|
+
},
|
231
|
+
{
|
232
|
+
"kind": "js",
|
233
|
+
"name": "*",
|
234
|
+
"declaration": {
|
235
|
+
"name": "*",
|
236
|
+
"package": "./layout.styles"
|
237
|
+
}
|
238
|
+
}
|
239
|
+
]
|
240
|
+
},
|
241
|
+
{
|
242
|
+
"kind": "javascript-module",
|
243
|
+
"path": "src/styles/layout.styles.ts",
|
244
|
+
"declarations": [
|
245
|
+
{
|
246
|
+
"kind": "variable",
|
247
|
+
"name": "layoutStyles",
|
248
|
+
"default": "css`\n ${containerStyles}\n ${loadingSpinnerStyles}\n\n .lm_goldenlayout {\n padding: 1px;\n background: ${neutralLayer1};\n border-radius: calc(${controlCornerRadius} * 1.5px);\n }\n\n .lm_stack.lm_item {\n background-color: ${neutralLayer4};\n border-radius: calc(${controlCornerRadius} * 1.5px);\n }\n .lm_maximised .lm_header {\n background-color: ${neutralLayer4};\n border-radius: calc(${controlCornerRadius} * 1.5px);\n position: unset;\n }\n\n .lm_maximised .lm_header .lm_tabs {\n z-index: 3;\n }\n\n .lm_content {\n background-color: ${neutralLayer3};\n border-radius: calc(${controlCornerRadius} * 1.5px);\n border: 1px solid;\n border-color: #2e3339;\n box-sizing: border-box;\n }\n\n .lm-header {\n z-index: 1;\n }\n .lm_header .lm_tabs {\n padding: 0 16px;\n }\n\n .lm_stack > .lm_items {\n z-index: 2;\n box-shadow: 0px -1px 15px rgba(0, 0, 0, 0.35);\n }\n\n .lm_header .lm_tab.lm_active.lm_focused {\n background-color: ${neutralLayer3};\n }\n .lm_header .lm_tab.lm_active {\n background-color: ${neutralLayer3};\n border: 1px solid;\n border-color: #2e3339;\n border-bottom: 0;\n color: ${accentFillRest};\n }\n\n .lm_header .lm_tab {\n align-items: center;\n background-color: ${neutralLayer4};\n border: 1px solid;\n border-bottom-color: #2e3339;\n border-bottom: 0px solid;\n border-color: rgba(0, 0, 0, 0.35);\n border-radius: calc(${controlCornerRadius} * 1.5px) calc(${controlCornerRadius} * 1.5px) 0 0;\n box-shadow: 1px -1px 2px rgba(0, 0, 0, 0.35);\n color: rgba(255, 255, 255, 0.3);\n display: flex;\n font-family: inherit;\n font-size: 13px;\n font-weight: 700;\n height: 30px;\n margin-right: 2px;\n margin-top: 3px;\n padding: 2px 16px;\n }\n\n .lm_header .lm_tab:not(.lm_active):hover {\n background-color: rgba(255, 255, 255, 0.1);\n color: #f1f1f1;\n }\n\n .lm_header .lm_controls {\n top: 4px;\n display: flex;\n }\n .lm_header .lm_controls > * {\n width: 30px;\n height: 30px;\n background-repeat: no-repeat;\n background-position: center;\n background-size: 16px;\n background-color: rgba(255, 255, 255, 0.03);\n border-radius: calc(${controlCornerRadius} * 1.5px);\n margin-right: 4px;\n top: 3px;\n opacity: 1;\n }\n .lm_header .lm_controls > *:hover {\n background-color: rgba(255, 255, 255, 0.1);\n cursor: pointer;\n }\n\n .lm_controls .lm_maximise {\n background-image: url('${LAYOUT_ICONS.maximiseSVG}');\n }\n .lm_maximised .lm_controls .lm_maximise {\n background-image: url('${LAYOUT_ICONS.minimiseSVG}');\n }\n .lm_controls .lm_close {\n background-image: url('${LAYOUT_ICONS.closeSVG}');\n }\n .lm_header .lm_tab .lm_close_tab {\n background-image: url('${LAYOUT_ICONS.closeSVG}');\n background-size: 10px;\n background-repeat: no-repeat;\n margin-left: 12px;\n position: relative;\n top: 0;\n right: 0;\n }\n\n .lm_header .lm_tab.lm_active {\n padding: 4px 25px 3px 10px;\n }\n\n .lm_header .lm_tab:not(.lm_active) .lm_title {\n color: ${accentFillRest};\n opacity: 0.7;\n }\n\n .lm_header .lm_controls .lm_tabdropdown::before {\n content: none;\n }\n .lm_header .lm_controls .lm_tabdropdown {\n background-image: url('${LAYOUT_ICONS.tabDropdownSVG}');\n }\n .lm_header .lm_tabdropdown_list {\n top: 38px;\n right: 108px;\n background-color: ${neutralLayer3};\n border: 1px solid;\n border-color: #2e3339;\n border-radius: calc(${controlCornerRadius} * 1.5px);\n box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.35);\n }\n .lm_header .lm_tabdropdown_list > .lm_tab {\n box-shadow: none;\n padding: 0 16px;\n white-space: nowrap;\n background-color: transparent;\n color: #c9c9c9;\n height: 36px;\n border-radius: 0;\n overflow: visible;\n text-overflow: normal;\n }\n .lm_header .lm_tabdropdown_list > .lm_tab:last-child {\n border-bottom: 0;\n }\n\n /* gl base styles start */\n .lm_root {\n position: relative;\n }\n .lm_row > .lm_item {\n float: left;\n }\n .lm_content {\n overflow: hidden;\n position: relative;\n }\n .lm_dragging,\n .lm_dragging * {\n cursor: move !important;\n user-select: none;\n }\n .lm_maximised {\n left: 0;\n padding: 1px;\n position: absolute;\n top: 0;\n z-index: 40;\n }\n .lm_maximise_placeholder {\n display: none;\n }\n .lm_splitter {\n position: relative;\n z-index: 20;\n }\n .lm_splitter:hover,\n .lm_splitter.lm_dragging {\n background: ${accentFillRest};\n border-radius: calc(${controlCornerRadius} * 4px);\n }\n .lm_splitter.lm_vertical .lm_drag_handle {\n width: 100%;\n height: 15px;\n position: absolute;\n top: -5px;\n cursor: ns-resize;\n }\n .lm_splitter.lm_horizontal {\n float: left;\n height: 100%;\n }\n .lm_splitter.lm_horizontal .lm_drag_handle {\n width: 15px;\n height: 100%;\n position: absolute;\n left: -5px;\n cursor: ew-resize;\n }\n .lm_header {\n overflow: visible;\n position: relative;\n z-index: 1;\n }\n .lm_header [class^='lm_'] {\n box-sizing: content-box !important;\n }\n .lm_header .lm_controls {\n position: absolute;\n right: 3px;\n }\n .lm_header .lm_controls > li {\n cursor: pointer;\n float: left;\n width: 18px;\n height: 18px;\n text-align: center;\n }\n .lm_header ul {\n margin: 0;\n padding: 0;\n list-style-type: none;\n }\n .lm_header .lm_tabs {\n position: absolute;\n }\n .lm_header .lm_tab {\n cursor: pointer;\n float: left;\n margin-top: 1px;\n padding: 3px 25px 3px 10px;\n position: relative;\n }\n .lm_header .lm_tab i {\n width: 2px;\n height: 19px;\n position: absolute;\n }\n .lm_header .lm_tab i.lm_left {\n top: 0;\n left: -2px;\n }\n .lm_header .lm_tab i.lm_right {\n top: 0;\n right: -2px;\n }\n .lm_header .lm_tab .lm_title {\n display: inline-block;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n .lm_header .lm_tab .lm_title:only-child {\n padding-left: 10px;\n }\n .lm_header .lm_tab .lm_close_tab {\n width: 14px;\n height: 14px;\n position: absolute;\n top: 11px;\n right: 0;\n text-align: center;\n }\n .lm_stack.lm_left .lm_header,\n .lm_stack.lm_right .lm_header {\n height: 100%;\n }\n .lm_dragProxy.lm_left .lm_header,\n .lm_dragProxy.lm_right .lm_header,\n .lm_stack.lm_left .lm_header,\n .lm_stack.lm_right .lm_header {\n width: 20px;\n float: left;\n vertical-align: top;\n }\n .lm_dragProxy.lm_left .lm_header .lm_tabs,\n .lm_dragProxy.lm_right .lm_header .lm_tabs,\n .lm_stack.lm_left .lm_header .lm_tabs,\n .lm_stack.lm_right .lm_header .lm_tabs {\n transform-origin: left top;\n top: 0;\n width: 1000px;\n }\n .lm_dragProxy.lm_left .lm_header .lm_controls,\n .lm_dragProxy.lm_right .lm_header .lm_controls,\n .lm_stack.lm_left .lm_header .lm_controls,\n .lm_stack.lm_right .lm_header .lm_controls {\n bottom: 0;\n }\n .lm_dragProxy.lm_left .lm_items,\n .lm_dragProxy.lm_right .lm_items,\n .lm_stack.lm_left .lm_items,\n .lm_stack.lm_right .lm_items {\n float: left;\n }\n .lm_dragProxy.lm_left .lm_header .lm_tabs,\n .lm_stack.lm_left .lm_header .lm_tabs {\n transform: rotate(-90deg) scaleX(-1);\n left: 0;\n }\n .lm_dragProxy.lm_left .lm_header .lm_tabs .lm_tab,\n .lm_stack.lm_left .lm_header .lm_tabs .lm_tab {\n transform: scaleX(-1);\n margin-top: 1px;\n }\n .lm_dragProxy.lm_left .lm_header .lm_tabdropdown_list,\n .lm_stack.lm_left .lm_header .lm_tabdropdown_list {\n top: initial;\n right: initial;\n left: 20px;\n }\n .lm_dragProxy.lm_right .lm_content {\n float: left;\n }\n .lm_dragProxy.lm_right .lm_header .lm_tabs,\n .lm_stack.lm_right .lm_header .lm_tabs {\n transform: rotate(90deg) scaleX(1);\n left: 100%;\n margin-left: 0;\n }\n .lm_dragProxy.lm_right .lm_header .lm_controls,\n .lm_stack.lm_right .lm_header .lm_controls {\n left: 3px;\n }\n .lm_dragProxy.lm_right .lm_header .lm_tabdropdown_list,\n .lm_stack.lm_right .lm_header .lm_tabdropdown_list {\n top: initial;\n right: 20px;\n }\n .lm_dragProxy.lm_bottom .lm_header .lm_tab,\n .lm_stack.lm_bottom .lm_header .lm_tab {\n margin-top: 0;\n border-top: none;\n }\n .lm_dragProxy.lm_bottom .lm_header .lm_controls,\n .lm_stack.lm_bottom .lm_header .lm_controls {\n top: 3px;\n }\n .lm_dragProxy.lm_bottom .lm_header .lm_tabdropdown_list,\n .lm_stack.lm_bottom .lm_header .lm_tabdropdown_list {\n top: initial;\n bottom: 20px;\n }\n .lm_drop_tab_placeholder {\n float: left;\n width: 100px;\n height: 10px;\n visibility: hidden;\n }\n .lm_header .lm_tabdropdown_list {\n position: absolute;\n top: 20px;\n right: 0;\n z-index: 5;\n overflow: hidden;\n }\n .lm_header .lm_tabdropdown_list .lm_tab {\n clear: both;\n padding-right: 10px;\n margin: 0;\n }\n .lm_header .lm_tabdropdown_list .lm_tab .lm_title {\n width: 100px;\n }\n .lm_header .lm_tabdropdown_list .lm_close_tab {\n display: none !important;\n }\n .lm_dragProxy {\n position: absolute;\n top: 0;\n left: 0;\n z-index: 30;\n }\n .lm_dragProxy .lm_header {\n background: transparent;\n }\n .lm_dragProxy .lm_content {\n border-top: none;\n overflow: hidden;\n }\n .lm_dropTargetIndicator {\n display: none;\n position: absolute;\n z-index: 20;\n }\n .lm_dropTargetIndicator .lm_inner {\n width: 100%;\n height: 100%;\n position: relative;\n top: 0;\n left: 0;\n }\n .lm_transition_indicator {\n display: none;\n width: 20px;\n height: 20px;\n position: absolute;\n top: 0;\n left: 0;\n z-index: 20;\n }\n .lm_popin {\n width: 20px;\n height: 20px;\n position: absolute;\n bottom: 0;\n right: 0;\n z-index: 9999;\n }\n .lm_popin > * {\n width: 100%;\n height: 100%;\n position: absolute;\n top: 0;\n left: 0;\n }\n .lm_popin > .lm_bg {\n z-index: 10;\n }\n .lm_popin > .lm_icon {\n z-index: 20;\n } /*# sourceMappingURL=goldenlayout-base.css.map */\n`",
|
249
|
+
"description": "`ElementStyles` which defines the css for FoundationLayout.",
|
250
|
+
"privacy": "public"
|
251
|
+
}
|
252
|
+
],
|
253
|
+
"exports": [
|
254
|
+
{
|
255
|
+
"kind": "js",
|
256
|
+
"name": "layoutStyles",
|
257
|
+
"declaration": {
|
258
|
+
"name": "layoutStyles",
|
259
|
+
"module": "src/styles/layout.styles.ts"
|
260
|
+
}
|
261
|
+
}
|
262
|
+
]
|
263
|
+
},
|
146
264
|
{
|
147
265
|
"kind": "javascript-module",
|
148
266
|
"path": "src/main/index.ts",
|
@@ -693,6 +811,33 @@
|
|
693
811
|
],
|
694
812
|
"privacy": "public"
|
695
813
|
},
|
814
|
+
{
|
815
|
+
"kind": "method",
|
816
|
+
"name": "removeItems",
|
817
|
+
"return": {
|
818
|
+
"type": {
|
819
|
+
"text": ""
|
820
|
+
}
|
821
|
+
},
|
822
|
+
"parameters": [
|
823
|
+
{
|
824
|
+
"name": "registration",
|
825
|
+
"type": {
|
826
|
+
"text": "string"
|
827
|
+
},
|
828
|
+
"description": "string of the registration ID"
|
829
|
+
},
|
830
|
+
{
|
831
|
+
"name": "force",
|
832
|
+
"default": "false",
|
833
|
+
"type": {
|
834
|
+
"text": "boolean"
|
835
|
+
},
|
836
|
+
"description": "if set to true then the item will be removed even if it is not closable. Defaults to false, which is the same behaviour as the close button on the header."
|
837
|
+
}
|
838
|
+
],
|
839
|
+
"privacy": "public"
|
840
|
+
},
|
696
841
|
{
|
697
842
|
"kind": "method",
|
698
843
|
"name": "registerItem",
|
@@ -1117,124 +1262,6 @@
|
|
1117
1262
|
}
|
1118
1263
|
]
|
1119
1264
|
},
|
1120
|
-
{
|
1121
|
-
"kind": "javascript-module",
|
1122
|
-
"path": "src/styles/constants.ts",
|
1123
|
-
"declarations": [
|
1124
|
-
{
|
1125
|
-
"kind": "variable",
|
1126
|
-
"name": "glVisualConfig",
|
1127
|
-
"type": {
|
1128
|
-
"text": "Omit<LayoutConfig, 'root'>"
|
1129
|
-
},
|
1130
|
-
"default": "{\n dimensions: {\n headerHeight: 38,\n borderWidth: 12,\n },\n header: {\n maximise: 'maximise',\n minimise: 'minimise',\n popout: false,\n },\n}"
|
1131
|
-
},
|
1132
|
-
{
|
1133
|
-
"kind": "variable",
|
1134
|
-
"name": "LAYOUT_ICONS",
|
1135
|
-
"type": {
|
1136
|
-
"text": "{\n renameSVG,\n maximiseSVG,\n minimiseSVG,\n closeSVG,\n tabDropdownSVG,\n popoutSVG,\n}"
|
1137
|
-
},
|
1138
|
-
"default": "{\n renameSVG,\n maximiseSVG,\n minimiseSVG,\n closeSVG,\n tabDropdownSVG,\n popoutSVG,\n}",
|
1139
|
-
"description": "A collection of SVG icons in base64 format.",
|
1140
|
-
"privacy": "public"
|
1141
|
-
}
|
1142
|
-
],
|
1143
|
-
"exports": [
|
1144
|
-
{
|
1145
|
-
"kind": "js",
|
1146
|
-
"name": "glVisualConfig",
|
1147
|
-
"declaration": {
|
1148
|
-
"name": "glVisualConfig",
|
1149
|
-
"module": "src/styles/constants.ts"
|
1150
|
-
}
|
1151
|
-
},
|
1152
|
-
{
|
1153
|
-
"kind": "js",
|
1154
|
-
"name": "LAYOUT_ICONS",
|
1155
|
-
"declaration": {
|
1156
|
-
"name": "LAYOUT_ICONS",
|
1157
|
-
"module": "src/styles/constants.ts"
|
1158
|
-
}
|
1159
|
-
}
|
1160
|
-
]
|
1161
|
-
},
|
1162
|
-
{
|
1163
|
-
"kind": "javascript-module",
|
1164
|
-
"path": "src/styles/dragging.styles.ts",
|
1165
|
-
"declarations": [
|
1166
|
-
{
|
1167
|
-
"kind": "variable",
|
1168
|
-
"name": "globalDraggingStyles",
|
1169
|
-
"default": "`\n .lm_dragProxy .lm_content {\n box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.9);\n }\n .lm_dropTargetIndicator {\n box-shadow: inset 0 0 30px #000000;\n outline: 1px dashed #cccccc;\n transition: all 200ms ease;\n }\n .lm_dropTargetIndicator .lm_inner {\n background: var(${neutralFillStealthRest.cssCustomProperty});\n opacity: 0.2;\n }\n .lm_dragProxy.lm_left .lm_header,\n .lm_dragProxy.lm_right .lm_header {\n width: 20px;\n float: left;\n vertical-align: top;\n }\n .lm_dragProxy.lm_left .lm_header .lm_tabs,\n .lm_dragProxy.lm_right .lm_header .lm_tabs {\n transform-origin: left top;\n top: 0;\n width: 1000px;\n }\n .lm_dragProxy.lm_left .lm_header .lm_controls,\n .lm_dragProxy.lm_right .lm_header .lm_controls {\n bottom: 0;\n }\n .lm_dragProxy.lm_left .lm_items,\n .lm_dragProxy.lm_right .lm_items {\n float: left;\n }\n .lm_dragProxy.lm_left .lm_header .lm_tabs {\n transform: rotate(-90deg) scaleX(-1);\n left: 0;\n }\n .lm_dragProxy.lm_left .lm_header .lm_tabs .lm_tab {\n transform: scaleX(-1);\n margin-top: 1px;\n }\n .lm_dragProxy.lm_left .lm_header .lm_tabdropdown_list {\n top: initial;\n right: initial;\n left: 20px;\n }\n .lm_dragProxy.lm_right .lm_content {\n float: left;\n }\n .lm_dragProxy.lm_right .lm_header .lm_tabs {\n transform: rotate(90deg) scaleX(1);\n left: 100%;\n margin-left: 0;\n }\n .lm_dragProxy.lm_right .lm_header .lm_controls {\n left: 3px;\n }\n .lm_dragProxy.lm_right .lm_header .lm_tabdropdown_list {\n top: initial;\n right: 20px;\n }\n .lm_dragProxy.lm_bottom .lm_header .lm_tab {\n margin-top: 0;\n border-top: none;\n }\n .lm_dragProxy.lm_bottom .lm_header .lm_controls,\n .lm_stack.lm_bottom .lm_header .lm_controls {\n top: 3px;\n }\n .lm_dragProxy.lm_bottom .lm_header .lm_tabdropdown_list,\n .lm_stack.lm_bottom .lm_header .lm_tabdropdown_list {\n top: initial;\n bottom: 20px;\n }\n .lm_dragProxy {\n position: absolute;\n top: 0;\n left: 0;\n z-index: 30;\n }\n .lm_dragProxy .lm_header {\n background: transparent;\n }\n .lm_dragProxy .lm_content {\n border-top: none;\n overflow: hidden;\n }\n .lm_dropTargetIndicator {\n display: none;\n position: absolute;\n z-index: 20;\n }\n .lm_dropTargetIndicator .lm_inner {\n width: 100%;\n height: 100%;\n position: relative;\n top: 0;\n left: 0;\n }\n .lm_transition_indicator {\n display: none;\n width: 20px;\n height: 20px;\n position: absolute;\n top: 0;\n left: 0;\n z-index: 20;\n }\n`",
|
1170
|
-
"description": "This is defined as a string rather than a css template\nbecause it is applied to a CSSStyleSheet object rather than\nused as a FAST template"
|
1171
|
-
}
|
1172
|
-
],
|
1173
|
-
"exports": [
|
1174
|
-
{
|
1175
|
-
"kind": "js",
|
1176
|
-
"name": "globalDraggingStyles",
|
1177
|
-
"declaration": {
|
1178
|
-
"name": "globalDraggingStyles",
|
1179
|
-
"module": "src/styles/dragging.styles.ts"
|
1180
|
-
}
|
1181
|
-
}
|
1182
|
-
]
|
1183
|
-
},
|
1184
|
-
{
|
1185
|
-
"kind": "javascript-module",
|
1186
|
-
"path": "src/styles/index.ts",
|
1187
|
-
"declarations": [],
|
1188
|
-
"exports": [
|
1189
|
-
{
|
1190
|
-
"kind": "js",
|
1191
|
-
"name": "*",
|
1192
|
-
"declaration": {
|
1193
|
-
"name": "*",
|
1194
|
-
"package": "./constants"
|
1195
|
-
}
|
1196
|
-
},
|
1197
|
-
{
|
1198
|
-
"kind": "js",
|
1199
|
-
"name": "*",
|
1200
|
-
"declaration": {
|
1201
|
-
"name": "*",
|
1202
|
-
"package": "./dragging.styles"
|
1203
|
-
}
|
1204
|
-
},
|
1205
|
-
{
|
1206
|
-
"kind": "js",
|
1207
|
-
"name": "*",
|
1208
|
-
"declaration": {
|
1209
|
-
"name": "*",
|
1210
|
-
"package": "./layout.styles"
|
1211
|
-
}
|
1212
|
-
}
|
1213
|
-
]
|
1214
|
-
},
|
1215
|
-
{
|
1216
|
-
"kind": "javascript-module",
|
1217
|
-
"path": "src/styles/layout.styles.ts",
|
1218
|
-
"declarations": [
|
1219
|
-
{
|
1220
|
-
"kind": "variable",
|
1221
|
-
"name": "layoutStyles",
|
1222
|
-
"default": "css`\n ${containerStyles}\n ${loadingSpinnerStyles}\n\n .lm_goldenlayout {\n padding: 1px;\n background: ${neutralLayer1};\n border-radius: calc(${controlCornerRadius} * 1.5px);\n }\n\n .lm_stack.lm_item {\n background-color: ${neutralLayer4};\n border-radius: calc(${controlCornerRadius} * 1.5px);\n }\n .lm_maximised .lm_header {\n background-color: ${neutralLayer4};\n border-radius: calc(${controlCornerRadius} * 1.5px);\n position: unset;\n }\n\n .lm_maximised .lm_header .lm_tabs {\n z-index: 3;\n }\n\n .lm_content {\n background-color: ${neutralLayer3};\n border-radius: calc(${controlCornerRadius} * 1.5px);\n border: 1px solid;\n border-color: #2e3339;\n box-sizing: border-box;\n }\n\n .lm-header {\n z-index: 1;\n }\n .lm_header .lm_tabs {\n padding: 0 16px;\n }\n\n .lm_stack > .lm_items {\n z-index: 2;\n box-shadow: 0px -1px 15px rgba(0, 0, 0, 0.35);\n }\n\n .lm_header .lm_tab.lm_active.lm_focused {\n background-color: ${neutralLayer3};\n }\n .lm_header .lm_tab.lm_active {\n background-color: ${neutralLayer3};\n border: 1px solid;\n border-color: #2e3339;\n border-bottom: 0;\n color: ${accentFillRest};\n }\n\n .lm_header .lm_tab {\n align-items: center;\n background-color: ${neutralLayer4};\n border: 1px solid;\n border-bottom-color: #2e3339;\n border-bottom: 0px solid;\n border-color: rgba(0, 0, 0, 0.35);\n border-radius: calc(${controlCornerRadius} * 1.5px) calc(${controlCornerRadius} * 1.5px) 0 0;\n box-shadow: 1px -1px 2px rgba(0, 0, 0, 0.35);\n color: rgba(255, 255, 255, 0.3);\n display: flex;\n font-family: inherit;\n font-size: 13px;\n font-weight: 700;\n height: 30px;\n margin-right: 2px;\n margin-top: 3px;\n padding: 2px 16px;\n }\n\n .lm_header .lm_tab:not(.lm_active):hover {\n background-color: rgba(255, 255, 255, 0.1);\n color: #f1f1f1;\n }\n\n .lm_header .lm_controls {\n top: 4px;\n display: flex;\n }\n .lm_header .lm_controls > * {\n width: 30px;\n height: 30px;\n background-repeat: no-repeat;\n background-position: center;\n background-size: 16px;\n background-color: rgba(255, 255, 255, 0.03);\n border-radius: calc(${controlCornerRadius} * 1.5px);\n margin-right: 4px;\n top: 3px;\n opacity: 1;\n }\n .lm_header .lm_controls > *:hover {\n background-color: rgba(255, 255, 255, 0.1);\n cursor: pointer;\n }\n\n .lm_controls .lm_maximise {\n background-image: url('${LAYOUT_ICONS.maximiseSVG}');\n }\n .lm_maximised .lm_controls .lm_maximise {\n background-image: url('${LAYOUT_ICONS.minimiseSVG}');\n }\n .lm_controls .lm_close {\n background-image: url('${LAYOUT_ICONS.closeSVG}');\n }\n .lm_header .lm_tab .lm_close_tab {\n background-image: url('${LAYOUT_ICONS.closeSVG}');\n background-size: 10px;\n background-repeat: no-repeat;\n margin-left: 12px;\n position: relative;\n top: 0;\n right: 0;\n }\n\n .lm_header .lm_tab.lm_active {\n padding: 4px 25px 3px 10px;\n }\n\n .lm_header .lm_tab:not(.lm_active) .lm_title {\n color: ${accentFillRest};\n opacity: 0.7;\n }\n\n .lm_header .lm_controls .lm_tabdropdown::before {\n content: none;\n }\n .lm_header .lm_controls .lm_tabdropdown {\n background-image: url('${LAYOUT_ICONS.tabDropdownSVG}');\n }\n .lm_header .lm_tabdropdown_list {\n top: 38px;\n right: 108px;\n background-color: ${neutralLayer3};\n border: 1px solid;\n border-color: #2e3339;\n border-radius: calc(${controlCornerRadius} * 1.5px);\n box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.35);\n }\n .lm_header .lm_tabdropdown_list > .lm_tab {\n box-shadow: none;\n padding: 0 16px;\n white-space: nowrap;\n background-color: transparent;\n color: #c9c9c9;\n height: 36px;\n border-radius: 0;\n overflow: visible;\n text-overflow: normal;\n }\n .lm_header .lm_tabdropdown_list > .lm_tab:last-child {\n border-bottom: 0;\n }\n\n /* gl base styles start */\n .lm_root {\n position: relative;\n }\n .lm_row > .lm_item {\n float: left;\n }\n .lm_content {\n overflow: hidden;\n position: relative;\n }\n .lm_dragging,\n .lm_dragging * {\n cursor: move !important;\n user-select: none;\n }\n .lm_maximised {\n left: 0;\n padding: 1px;\n position: absolute;\n top: 0;\n z-index: 40;\n }\n .lm_maximise_placeholder {\n display: none;\n }\n .lm_splitter {\n position: relative;\n z-index: 20;\n }\n .lm_splitter:hover,\n .lm_splitter.lm_dragging {\n background: ${accentFillRest};\n border-radius: calc(${controlCornerRadius} * 4px);\n }\n .lm_splitter.lm_vertical .lm_drag_handle {\n width: 100%;\n height: 15px;\n position: absolute;\n top: -5px;\n cursor: ns-resize;\n }\n .lm_splitter.lm_horizontal {\n float: left;\n height: 100%;\n }\n .lm_splitter.lm_horizontal .lm_drag_handle {\n width: 15px;\n height: 100%;\n position: absolute;\n left: -5px;\n cursor: ew-resize;\n }\n .lm_header {\n overflow: visible;\n position: relative;\n z-index: 1;\n }\n .lm_header [class^='lm_'] {\n box-sizing: content-box !important;\n }\n .lm_header .lm_controls {\n position: absolute;\n right: 3px;\n }\n .lm_header .lm_controls > li {\n cursor: pointer;\n float: left;\n width: 18px;\n height: 18px;\n text-align: center;\n }\n .lm_header ul {\n margin: 0;\n padding: 0;\n list-style-type: none;\n }\n .lm_header .lm_tabs {\n position: absolute;\n }\n .lm_header .lm_tab {\n cursor: pointer;\n float: left;\n margin-top: 1px;\n padding: 3px 25px 3px 10px;\n position: relative;\n }\n .lm_header .lm_tab i {\n width: 2px;\n height: 19px;\n position: absolute;\n }\n .lm_header .lm_tab i.lm_left {\n top: 0;\n left: -2px;\n }\n .lm_header .lm_tab i.lm_right {\n top: 0;\n right: -2px;\n }\n .lm_header .lm_tab .lm_title {\n display: inline-block;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n .lm_header .lm_tab .lm_title:only-child {\n padding-left: 10px;\n }\n .lm_header .lm_tab .lm_close_tab {\n width: 14px;\n height: 14px;\n position: absolute;\n top: 11px;\n right: 0;\n text-align: center;\n }\n .lm_stack.lm_left .lm_header,\n .lm_stack.lm_right .lm_header {\n height: 100%;\n }\n .lm_dragProxy.lm_left .lm_header,\n .lm_dragProxy.lm_right .lm_header,\n .lm_stack.lm_left .lm_header,\n .lm_stack.lm_right .lm_header {\n width: 20px;\n float: left;\n vertical-align: top;\n }\n .lm_dragProxy.lm_left .lm_header .lm_tabs,\n .lm_dragProxy.lm_right .lm_header .lm_tabs,\n .lm_stack.lm_left .lm_header .lm_tabs,\n .lm_stack.lm_right .lm_header .lm_tabs {\n transform-origin: left top;\n top: 0;\n width: 1000px;\n }\n .lm_dragProxy.lm_left .lm_header .lm_controls,\n .lm_dragProxy.lm_right .lm_header .lm_controls,\n .lm_stack.lm_left .lm_header .lm_controls,\n .lm_stack.lm_right .lm_header .lm_controls {\n bottom: 0;\n }\n .lm_dragProxy.lm_left .lm_items,\n .lm_dragProxy.lm_right .lm_items,\n .lm_stack.lm_left .lm_items,\n .lm_stack.lm_right .lm_items {\n float: left;\n }\n .lm_dragProxy.lm_left .lm_header .lm_tabs,\n .lm_stack.lm_left .lm_header .lm_tabs {\n transform: rotate(-90deg) scaleX(-1);\n left: 0;\n }\n .lm_dragProxy.lm_left .lm_header .lm_tabs .lm_tab,\n .lm_stack.lm_left .lm_header .lm_tabs .lm_tab {\n transform: scaleX(-1);\n margin-top: 1px;\n }\n .lm_dragProxy.lm_left .lm_header .lm_tabdropdown_list,\n .lm_stack.lm_left .lm_header .lm_tabdropdown_list {\n top: initial;\n right: initial;\n left: 20px;\n }\n .lm_dragProxy.lm_right .lm_content {\n float: left;\n }\n .lm_dragProxy.lm_right .lm_header .lm_tabs,\n .lm_stack.lm_right .lm_header .lm_tabs {\n transform: rotate(90deg) scaleX(1);\n left: 100%;\n margin-left: 0;\n }\n .lm_dragProxy.lm_right .lm_header .lm_controls,\n .lm_stack.lm_right .lm_header .lm_controls {\n left: 3px;\n }\n .lm_dragProxy.lm_right .lm_header .lm_tabdropdown_list,\n .lm_stack.lm_right .lm_header .lm_tabdropdown_list {\n top: initial;\n right: 20px;\n }\n .lm_dragProxy.lm_bottom .lm_header .lm_tab,\n .lm_stack.lm_bottom .lm_header .lm_tab {\n margin-top: 0;\n border-top: none;\n }\n .lm_dragProxy.lm_bottom .lm_header .lm_controls,\n .lm_stack.lm_bottom .lm_header .lm_controls {\n top: 3px;\n }\n .lm_dragProxy.lm_bottom .lm_header .lm_tabdropdown_list,\n .lm_stack.lm_bottom .lm_header .lm_tabdropdown_list {\n top: initial;\n bottom: 20px;\n }\n .lm_drop_tab_placeholder {\n float: left;\n width: 100px;\n height: 10px;\n visibility: hidden;\n }\n .lm_header .lm_tabdropdown_list {\n position: absolute;\n top: 20px;\n right: 0;\n z-index: 5;\n overflow: hidden;\n }\n .lm_header .lm_tabdropdown_list .lm_tab {\n clear: both;\n padding-right: 10px;\n margin: 0;\n }\n .lm_header .lm_tabdropdown_list .lm_tab .lm_title {\n width: 100px;\n }\n .lm_header .lm_tabdropdown_list .lm_close_tab {\n display: none !important;\n }\n .lm_dragProxy {\n position: absolute;\n top: 0;\n left: 0;\n z-index: 30;\n }\n .lm_dragProxy .lm_header {\n background: transparent;\n }\n .lm_dragProxy .lm_content {\n border-top: none;\n overflow: hidden;\n }\n .lm_dropTargetIndicator {\n display: none;\n position: absolute;\n z-index: 20;\n }\n .lm_dropTargetIndicator .lm_inner {\n width: 100%;\n height: 100%;\n position: relative;\n top: 0;\n left: 0;\n }\n .lm_transition_indicator {\n display: none;\n width: 20px;\n height: 20px;\n position: absolute;\n top: 0;\n left: 0;\n z-index: 20;\n }\n .lm_popin {\n width: 20px;\n height: 20px;\n position: absolute;\n bottom: 0;\n right: 0;\n z-index: 9999;\n }\n .lm_popin > * {\n width: 100%;\n height: 100%;\n position: absolute;\n top: 0;\n left: 0;\n }\n .lm_popin > .lm_bg {\n z-index: 10;\n }\n .lm_popin > .lm_icon {\n z-index: 20;\n } /*# sourceMappingURL=goldenlayout-base.css.map */\n`",
|
1223
|
-
"description": "`ElementStyles` which defines the css for FoundationLayout.",
|
1224
|
-
"privacy": "public"
|
1225
|
-
}
|
1226
|
-
],
|
1227
|
-
"exports": [
|
1228
|
-
{
|
1229
|
-
"kind": "js",
|
1230
|
-
"name": "layoutStyles",
|
1231
|
-
"declaration": {
|
1232
|
-
"name": "layoutStyles",
|
1233
|
-
"module": "src/styles/layout.styles.ts"
|
1234
|
-
}
|
1235
|
-
}
|
1236
|
-
]
|
1237
|
-
},
|
1238
1265
|
{
|
1239
1266
|
"kind": "javascript-module",
|
1240
1267
|
"path": "src/utils/constants.ts",
|
@@ -212,6 +212,17 @@ export declare class FoundationLayout extends FoundationElement implements Layou
|
|
212
212
|
* @throws {@link LayoutRegistrationError} if you attempt to add an item before it has been registered
|
213
213
|
*/
|
214
214
|
addItem(config: RegisteredElementConfig | RegisteredElementConfig[], placement?: Placement): void;
|
215
|
+
/**
|
216
|
+
* @public
|
217
|
+
* Removes all instances of a specified registered item from the layout.
|
218
|
+
* @param registration - string of the registration ID
|
219
|
+
* @param force - if set to true then the item will be removed even if it is not closable. Defaults to false, which is the same behaviour as the close button on the header.
|
220
|
+
* @returns number of items removed
|
221
|
+
* @remarks
|
222
|
+
* Does not remove the registration from the layout system.
|
223
|
+
* Has a side affect of setting all tab views to be viewing the first tab in the stack.
|
224
|
+
*/
|
225
|
+
removeItems(registration: string, force?: boolean): number;
|
215
226
|
/**
|
216
227
|
* @public
|
217
228
|
* Register a collection of `Element` and associate them with an `ID` with the layout system for later use.
|
@@ -272,6 +283,10 @@ export declare class FoundationLayout extends FoundationElement implements Layou
|
|
272
283
|
* Saves the stored layout config according to the Golden Layout provider.
|
273
284
|
* And caches the layout in local storage if {@link FoundationLayout.autoSaveKey} is set.
|
274
285
|
* @internal
|
286
|
+
* @remarks
|
287
|
+
* This will also normalise the config. E.g. over time when adding and deleting items from
|
288
|
+
* the layout, the layout config can become deeply nested but only have one item in it.
|
289
|
+
* `fromResolved()` function will remove all of the unnecessary nesting.
|
275
290
|
* */
|
276
291
|
private cacheAndSaveLayout;
|
277
292
|
/**
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"layout-main.d.ts","sourceRoot":"","sources":["../../../src/main/layout-main.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,YAAY,EAEZ,cAAc,EAGf,MAAM,kCAAkC,CAAC;AAI1C,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAE/D,OAAO,EAEL,eAAe,EAGf,SAAS,EACT,uBAAuB,EACvB,kBAAkB,EAClB,gBAAgB,EAChB,aAAa,EAKb,YAAY,EAQb,MAAM,WAAW,CAAC;AAKnB,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAiBzC;;;;;;;;;;;GAWG;AACH,qBAAa,gBAAiB,SAAQ,iBAAkB,YAAW,eAAe;;IAChF,OAAO,CAAC,MAAM,C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oB;IAI5B;;;;OAIG;IACH,mBAAmB,IAAI,IAAI;IAmB3B;;;;;;;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;IAuEtE;;;OAGG;IACH,OAAO,CAAC,wBAAwB;IAehC;;;;;;;;SAQK;IACL,OAAO,CAAC,kBAAkB;IAY1B;;;;;;;;OAQG;IACH,OAAO,CAAC,kCAAkC;IA4B1C;;;;;;;;;;;OAWG;IACH,OAAO,CAAC,oBAAoB;IAU5B;;;;;;;;OAQG;IACH,OAAO,CAAC,mBAAmB;IAU3B;;;OAGG;IACH,OAAO,CAAC,kBAAkB;IAc1B;;;OAGG;IACH,OAAO,CAAC,mBAAmB;IAM3B;;;OAGG;IACH,OAAO,CAAC,4BAA4B;IAWpC;;;OAGG;IACH,OAAO,CAAC,uBAAuB;CAyBhC;AAMD;;;;;GAKG;AACH,eAAO,MAAM,cAAc,uEAK1B,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;2BAI3B,CAAC"}
|
@@ -436,6 +436,61 @@ export class FoundationLayout extends FoundationElement {
|
|
436
436
|
this.loadGLConfigAndSetup(this.layoutConfig);
|
437
437
|
this.onPostItemAdded();
|
438
438
|
}
|
439
|
+
/**
|
440
|
+
* @public
|
441
|
+
* Removes all instances of a specified registered item from the layout.
|
442
|
+
* @param registration - string of the registration ID
|
443
|
+
* @param force - if set to true then the item will be removed even if it is not closable. Defaults to false, which is the same behaviour as the close button on the header.
|
444
|
+
* @returns number of items removed
|
445
|
+
* @remarks
|
446
|
+
* Does not remove the registration from the layout system.
|
447
|
+
* Has a side affect of setting all tab views to be viewing the first tab in the stack.
|
448
|
+
*/
|
449
|
+
removeItems(registration, force = false) {
|
450
|
+
let removedCount = 0;
|
451
|
+
const countDeletion = () => ((removedCount += 1), true);
|
452
|
+
const closeableCheck = (c) => force || c.isClosable;
|
453
|
+
// Remove an item when it matches the registration and is valid closable,
|
454
|
+
// or when it is now an empty container (because we just removed all items from it)
|
455
|
+
const predicate = (c) => {
|
456
|
+
var _b;
|
457
|
+
return !(((_b = c.content) === null || _b === void 0 ? void 0 : _b.length) === 0 ||
|
458
|
+
(c.type === 'component' &&
|
459
|
+
c.componentType === registration &&
|
460
|
+
closeableCheck(c) &&
|
461
|
+
countDeletion()));
|
462
|
+
};
|
463
|
+
const removeItemFromNode = (node) => {
|
464
|
+
var _b, _c;
|
465
|
+
const recurse = (_node) => {
|
466
|
+
var _b, _c;
|
467
|
+
if (_node.type === 'component')
|
468
|
+
return;
|
469
|
+
(_b = _node.content) === null || _b === void 0 ? void 0 : _b.forEach(recurse);
|
470
|
+
_node.content = (_c = _node.content) === null || _c === void 0 ? void 0 : _c.filter(predicate);
|
471
|
+
// activeItemIndex tracks which tab you have open in a stack and
|
472
|
+
// will potentially become out of bounds if we remove an item. Deleting it
|
473
|
+
// is safe and just sets you back to the 1st tab, but UX could be improved
|
474
|
+
// with proper tracking of the value
|
475
|
+
if (_node.type === 'stack')
|
476
|
+
delete _node.activeItemIndex;
|
477
|
+
};
|
478
|
+
(_b = node === null || node === void 0 ? void 0 : node.content) === null || _b === void 0 ? void 0 : _b.forEach(recurse);
|
479
|
+
if (node.type === 'stack')
|
480
|
+
delete node.activeItemIndex;
|
481
|
+
return (_c = node === null || node === void 0 ? void 0 : node.content) === null || _c === void 0 ? void 0 : _c.filter(predicate);
|
482
|
+
};
|
483
|
+
const content = removeItemFromNode(this.layoutConfig.root);
|
484
|
+
if (removedCount === 0)
|
485
|
+
return 0;
|
486
|
+
this.layoutConfig = Object.assign(Object.assign({}, this.layoutConfig), { root: content.length > 0
|
487
|
+
? Object.assign(Object.assign({}, this.layoutConfig.root), { content })
|
488
|
+
: undefined });
|
489
|
+
this.updateLifecycleToken();
|
490
|
+
this.loadGLConfigAndSetup(this.layoutConfig);
|
491
|
+
this.onPostItemRemoved();
|
492
|
+
return removedCount;
|
493
|
+
}
|
439
494
|
/**
|
440
495
|
* @public
|
441
496
|
* Register a collection of `Element` and associate them with an `ID` with the layout system for later use.
|
@@ -601,6 +656,10 @@ export class FoundationLayout extends FoundationElement {
|
|
601
656
|
* Saves the stored layout config according to the Golden Layout provider.
|
602
657
|
* And caches the layout in local storage if {@link FoundationLayout.autoSaveKey} is set.
|
603
658
|
* @internal
|
659
|
+
* @remarks
|
660
|
+
* This will also normalise the config. E.g. over time when adding and deleting items from
|
661
|
+
* the layout, the layout config can become deeply nested but only have one item in it.
|
662
|
+
* `fromResolved()` function will remove all of the unnecessary nesting.
|
604
663
|
* */
|
605
664
|
cacheAndSaveLayout() {
|
606
665
|
this.layoutConfig = LayoutConfig.fromResolved(this.layout.saveLayout());
|
@@ -936,6 +936,70 @@
|
|
936
936
|
"isProtected": false,
|
937
937
|
"isAbstract": false
|
938
938
|
},
|
939
|
+
{
|
940
|
+
"kind": "Method",
|
941
|
+
"canonicalReference": "@genesislcap/foundation-layout!FoundationLayout#removeItems:member(1)",
|
942
|
+
"docComment": "/**\n * Removes all instances of a specified registered item from the layout.\n *\n * @remarks\n *\n * Does not remove the registration from the layout system. Has a side affect of setting all tab views to be viewing the first tab in the stack.\n *\n * @param registration - string of the registration ID\n *\n * @param force - if set to true then the item will be removed even if it is not closable. Defaults to false, which is the same behaviour as the close button on the header.\n *\n * @returns number of items removed\n *\n * @public\n */\n",
|
943
|
+
"excerptTokens": [
|
944
|
+
{
|
945
|
+
"kind": "Content",
|
946
|
+
"text": "removeItems(registration: "
|
947
|
+
},
|
948
|
+
{
|
949
|
+
"kind": "Content",
|
950
|
+
"text": "string"
|
951
|
+
},
|
952
|
+
{
|
953
|
+
"kind": "Content",
|
954
|
+
"text": ", force?: "
|
955
|
+
},
|
956
|
+
{
|
957
|
+
"kind": "Content",
|
958
|
+
"text": "boolean"
|
959
|
+
},
|
960
|
+
{
|
961
|
+
"kind": "Content",
|
962
|
+
"text": "): "
|
963
|
+
},
|
964
|
+
{
|
965
|
+
"kind": "Content",
|
966
|
+
"text": "number"
|
967
|
+
},
|
968
|
+
{
|
969
|
+
"kind": "Content",
|
970
|
+
"text": ";"
|
971
|
+
}
|
972
|
+
],
|
973
|
+
"isStatic": false,
|
974
|
+
"returnTypeTokenRange": {
|
975
|
+
"startIndex": 5,
|
976
|
+
"endIndex": 6
|
977
|
+
},
|
978
|
+
"releaseTag": "Public",
|
979
|
+
"isProtected": false,
|
980
|
+
"overloadIndex": 1,
|
981
|
+
"parameters": [
|
982
|
+
{
|
983
|
+
"parameterName": "registration",
|
984
|
+
"parameterTypeTokenRange": {
|
985
|
+
"startIndex": 1,
|
986
|
+
"endIndex": 2
|
987
|
+
},
|
988
|
+
"isOptional": false
|
989
|
+
},
|
990
|
+
{
|
991
|
+
"parameterName": "force",
|
992
|
+
"parameterTypeTokenRange": {
|
993
|
+
"startIndex": 3,
|
994
|
+
"endIndex": 4
|
995
|
+
},
|
996
|
+
"isOptional": true
|
997
|
+
}
|
998
|
+
],
|
999
|
+
"isOptional": false,
|
1000
|
+
"isAbstract": false,
|
1001
|
+
"name": "removeItems"
|
1002
|
+
},
|
939
1003
|
{
|
940
1004
|
"kind": "Method",
|
941
1005
|
"canonicalReference": "@genesislcap/foundation-layout!FoundationLayout#tryActivatePopoutMode:member(1)",
|
@@ -248,6 +248,17 @@ export declare class FoundationLayout extends FoundationElement implements Layou
|
|
248
248
|
* @throws {@link LayoutRegistrationError} if you attempt to add an item before it has been registered
|
249
249
|
*/
|
250
250
|
addItem(config: RegisteredElementConfig | RegisteredElementConfig[], placement?: Placement): void;
|
251
|
+
/**
|
252
|
+
* @public
|
253
|
+
* Removes all instances of a specified registered item from the layout.
|
254
|
+
* @param registration - string of the registration ID
|
255
|
+
* @param force - if set to true then the item will be removed even if it is not closable. Defaults to false, which is the same behaviour as the close button on the header.
|
256
|
+
* @returns number of items removed
|
257
|
+
* @remarks
|
258
|
+
* Does not remove the registration from the layout system.
|
259
|
+
* Has a side affect of setting all tab views to be viewing the first tab in the stack.
|
260
|
+
*/
|
261
|
+
removeItems(registration: string, force?: boolean): number;
|
251
262
|
/**
|
252
263
|
* @public
|
253
264
|
* Register a collection of `Element` and associate them with an `ID` with the layout system for later use.
|
@@ -308,6 +319,10 @@ export declare class FoundationLayout extends FoundationElement implements Layou
|
|
308
319
|
* Saves the stored layout config according to the Golden Layout provider.
|
309
320
|
* And caches the layout in local storage if {@link FoundationLayout.autoSaveKey} is set.
|
310
321
|
* @internal
|
322
|
+
* @remarks
|
323
|
+
* This will also normalise the config. E.g. over time when adding and deleting items from
|
324
|
+
* the layout, the layout config can become deeply nested but only have one item in it.
|
325
|
+
* `fromResolved()` function will remove all of the unnecessary nesting.
|
311
326
|
* */
|
312
327
|
private cacheAndSaveLayout;
|
313
328
|
/**
|
@@ -46,6 +46,7 @@ The constructor for this class is marked as internal. Third-party code should no
|
|
46
46
|
| [loadLayout(layout, handleMissingItem, disableCache)](./foundation-layout.foundationlayout.loadlayout.md) | | Restores a layout described in the config from [getLayout()](./foundation-layout.foundationlayout.getlayout.md) |
|
47
47
|
| [registeredItems()](./foundation-layout.foundationlayout.registereditems.md) | | Gets all of the currently registered names |
|
48
48
|
| [registerItem(registration, elements)](./foundation-layout.foundationlayout.registeritem.md) | | Register a collection of <code>Element</code> and associate them with an <code>ID</code> with the layout system for later use. |
|
49
|
+
| [removeItems(registration, force)](./foundation-layout.foundationlayout.removeitems.md) | | Removes all instances of a specified registered item from the layout. |
|
49
50
|
| [tryActivatePopoutMode()](./foundation-layout.foundationlayout.tryactivatepopoutmode.md) | | **_(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. |
|
50
51
|
| [tryLoadLayoutFromLocalStorage()](./foundation-layout.foundationlayout.tryloadlayoutfromlocalstorage.md) | | Try to load a layout from local storage, or return false. Only required if manually calling [FoundationLayout.registerItem()](./foundation-layout.foundationlayout.registeritem.md) |
|
51
52
|
|
@@ -0,0 +1,31 @@
|
|
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) > [removeItems](./foundation-layout.foundationlayout.removeitems.md)
|
4
|
+
|
5
|
+
## FoundationLayout.removeItems() method
|
6
|
+
|
7
|
+
Removes all instances of a specified registered item from the layout.
|
8
|
+
|
9
|
+
**Signature:**
|
10
|
+
|
11
|
+
```typescript
|
12
|
+
removeItems(registration: string, force?: boolean): number;
|
13
|
+
```
|
14
|
+
|
15
|
+
## Parameters
|
16
|
+
|
17
|
+
| Parameter | Type | Description |
|
18
|
+
| --- | --- | --- |
|
19
|
+
| registration | string | string of the registration ID |
|
20
|
+
| force | boolean | _(Optional)_ if set to true then the item will be removed even if it is not closable. Defaults to false, which is the same behaviour as the close button on the header. |
|
21
|
+
|
22
|
+
**Returns:**
|
23
|
+
|
24
|
+
number
|
25
|
+
|
26
|
+
number of items removed
|
27
|
+
|
28
|
+
## Remarks
|
29
|
+
|
30
|
+
Does not remove the registration from the layout system. Has a side affect of setting all tab views to be viewing the first tab in the stack.
|
31
|
+
|
package/docs/api-report.md
CHANGED
@@ -58,6 +58,7 @@ export class FoundationLayout extends FoundationElement implements LayoutCompone
|
|
58
58
|
registeredItems(): string[];
|
59
59
|
registerItem(registration: string, elements: Element[]): string;
|
60
60
|
reloadBuffer: number;
|
61
|
+
removeItems(registration: string, force?: boolean): number;
|
61
62
|
// @internal
|
62
63
|
requestLayoutReload(): void;
|
63
64
|
// @beta
|
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.126.0-PA-1036.1",
|
5
5
|
"license": "SEE LICENSE IN license.txt",
|
6
6
|
"main": "dist/esm/index.js",
|
7
7
|
"types": "dist/foundation-layout.d.ts",
|
@@ -27,15 +27,15 @@
|
|
27
27
|
"test:debug": "genx test --debug"
|
28
28
|
},
|
29
29
|
"devDependencies": {
|
30
|
-
"@genesislcap/foundation-testing": "14.
|
31
|
-
"@genesislcap/genx": "14.
|
30
|
+
"@genesislcap/foundation-testing": "14.126.0-PA-1036.1",
|
31
|
+
"@genesislcap/genx": "14.126.0-PA-1036.1",
|
32
32
|
"rimraf": "^3.0.2"
|
33
33
|
},
|
34
34
|
"dependencies": {
|
35
35
|
"@genesis-community/golden-layout": "^2.11.0",
|
36
|
-
"@genesislcap/foundation-comms": "14.
|
37
|
-
"@genesislcap/foundation-logger": "14.
|
38
|
-
"@genesislcap/foundation-utils": "14.
|
36
|
+
"@genesislcap/foundation-comms": "14.126.0-PA-1036.1",
|
37
|
+
"@genesislcap/foundation-logger": "14.126.0-PA-1036.1",
|
38
|
+
"@genesislcap/foundation-utils": "14.126.0-PA-1036.1",
|
39
39
|
"@microsoft/fast-components": "^2.21.3",
|
40
40
|
"@microsoft/fast-element": "^1.7.0",
|
41
41
|
"@microsoft/fast-foundation": "^2.33.2",
|
@@ -50,5 +50,5 @@
|
|
50
50
|
"access": "public"
|
51
51
|
},
|
52
52
|
"customElements": "dist/custom-elements.json",
|
53
|
-
"gitHead": "
|
53
|
+
"gitHead": "8aaf618a04b53570dfe0d72e88df81d823fd4166"
|
54
54
|
}
|