@genesislcap/foundation-layout 14.375.1-alpha-1fac5fc.0 → 14.375.1
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.
|
@@ -802,6 +802,20 @@
|
|
|
802
802
|
},
|
|
803
803
|
"description": "The `LifecycleMixin` can use the lifecycleUpdateToken to determine if it needs to gate\nlifecycle methods from running when other items have been added or deleted.\nThis key is updated every time one of these actions are performed, so you can check if the key has changed and know you potentially need to gate some of your lifecycle functionality.\nThis method should be called whenever we are about to perform an action which will cause a lifecycle update, should as adding or removing an item from the layout"
|
|
804
804
|
},
|
|
805
|
+
{
|
|
806
|
+
"kind": "method",
|
|
807
|
+
"name": "handleGLRunErrors",
|
|
808
|
+
"privacy": "private",
|
|
809
|
+
"parameters": [
|
|
810
|
+
{
|
|
811
|
+
"name": "e",
|
|
812
|
+
"type": {
|
|
813
|
+
"text": "Error"
|
|
814
|
+
}
|
|
815
|
+
}
|
|
816
|
+
],
|
|
817
|
+
"description": "For specific golden layout errors we can provide better information to the caller. Else re-throw the original error"
|
|
818
|
+
},
|
|
805
819
|
{
|
|
806
820
|
"kind": "field",
|
|
807
821
|
"name": "_presentation",
|
|
@@ -359,6 +359,10 @@ export declare class FoundationLayout extends FoundationElement implements Layou
|
|
|
359
359
|
* @internal
|
|
360
360
|
*/
|
|
361
361
|
private loadGLConfigAndSetup;
|
|
362
|
+
/**
|
|
363
|
+
* For specific golden layout errors we can provide better information to the caller. Else re-throw the original error
|
|
364
|
+
*/
|
|
365
|
+
private handleGLRunErrors;
|
|
362
366
|
/**
|
|
363
367
|
* Handles adding the drag event listeners onto the golden layout drag handles
|
|
364
368
|
* @remarks
|
|
@@ -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;AAK1C,OAAO,E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C3D,SAAS,GAAE,SAAmC;IAsEhD;;;;;;;;;OASG;IACH,WAAW,CAAC,YAAY,EAAE,MAAM,EAAE,KAAK,GAAE,OAAe,GAAG,MAAM;IAgDjE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA0CG;IACH,YAAY,CAAC,YAAY,EAAE,MAAM,EAAE,iBAAiB,EAAE,OAAO,EAAE,GAAG,gBAAgB,GAAG,MAAM;IA4B3F;;OAEG;IAEH;;;;;OAKG;IACH,OAAO,CAAC,oBAAoB;IAI5B;;;;OAIG;IACH,mBAAmB,IAAI,IAAI;IAqB3B;;;;;;;OAOG;IACH,gBAAgB,CAAC,CAAC,SAAS,cAAc,EAAE,IAAI,EAAE,CAAC,GAAG,CAAC;IAetD;;;;;;;;OAQG;IACH,wBAAwB,CAAC,MAAM,EAAE,kBAAkB,GAAG,MAAM;IA4J5D;;;OAGG;IACH,OAAO,CAAC,wBAAwB;IAehC;;;;;;;;SAQK;IACL,OAAO,CAAC,kBAAkB;IAY1B;;;;;;;;OAQG;IACH,OAAO,CAAC,kCAAkC;IA4B1C;;;;;;;;;;;OAWG;IACH,OAAO,CAAC,oBAAoB;IAe5B;;OAEG;IACH,OAAO,CAAC,iBAAiB;IASzB;;;;;;;;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"}
|
|
@@ -440,7 +440,10 @@ export class FoundationLayout extends FoundationElement {
|
|
|
440
440
|
* @throws {@link LayoutRegistrationError} if you attempt to add an item before it has been registered
|
|
441
441
|
*/
|
|
442
442
|
addItem(config, placement = defaultAddItemPlacement) {
|
|
443
|
-
var _b, _c;
|
|
443
|
+
var _b, _c, _d;
|
|
444
|
+
if (((_b = placement === null || placement === void 0 ? void 0 : placement.multiple) === null || _b === void 0 ? void 0 : _b.size) === '100%') {
|
|
445
|
+
throw new LayoutUsageError('Adding an item taking up 100% size is not defined behaviour. The size attribute is a relative size of the item inside its layout stack. If you’re trying to set an initial layout with a single item, you can omit the size attribute as implicitly it takes up the full layout. If you already have layout items and you’re trying to add a new one that takes up the entire layout then you need to delete all of the other items and add this item only.');
|
|
446
|
+
}
|
|
444
447
|
const configArray = Array.isArray(config) ? config : [config];
|
|
445
448
|
const isSingleItem = configArray.length === 1;
|
|
446
449
|
const childItems = configArray.map((regConfig) => {
|
|
@@ -461,9 +464,9 @@ export class FoundationLayout extends FoundationElement {
|
|
|
461
464
|
};
|
|
462
465
|
});
|
|
463
466
|
const itemConfig = {
|
|
464
|
-
type: regionConveter(((
|
|
467
|
+
type: regionConveter(((_c = placement === null || placement === void 0 ? void 0 : placement.multiple) === null || _c === void 0 ? void 0 : _c.type) || 'tabs'),
|
|
465
468
|
content: childItems,
|
|
466
|
-
size: isSingleItem ? configArray[0].size : (
|
|
469
|
+
size: isSingleItem ? configArray[0].size : (_d = placement === null || placement === void 0 ? void 0 : placement.multiple) === null || _d === void 0 ? void 0 : _d.size,
|
|
467
470
|
};
|
|
468
471
|
this.updateLifecycleToken();
|
|
469
472
|
/**
|
|
@@ -885,9 +888,23 @@ export class FoundationLayout extends FoundationElement {
|
|
|
885
888
|
loadGLConfigAndSetup(config) {
|
|
886
889
|
const _glVisualConfig = glVisualConfig();
|
|
887
890
|
this.hasFirstLoaded = true;
|
|
888
|
-
|
|
891
|
+
try {
|
|
892
|
+
this.layout.loadLayout(Object.assign(Object.assign(Object.assign({}, config), _glVisualConfig), { dimensions: Object.assign(Object.assign({}, _glVisualConfig.dimensions), this.dimensionsConfig) }));
|
|
893
|
+
}
|
|
894
|
+
catch (e) {
|
|
895
|
+
this.handleGLRunErrors(e);
|
|
896
|
+
}
|
|
889
897
|
this.attatchResizeEvents();
|
|
890
898
|
}
|
|
899
|
+
/**
|
|
900
|
+
* For specific golden layout errors we can provide better information to the caller. Else re-throw the original error
|
|
901
|
+
*/
|
|
902
|
+
handleGLRunErrors(e) {
|
|
903
|
+
if (e.message.includes('ROCCAS6692')) {
|
|
904
|
+
throw new LayoutUsageError('Golden layout internal error ROCCAS6692. A maths error has accoured while calculating the layout item sizes. Verify you have not added an item with "size: 100%".');
|
|
905
|
+
}
|
|
906
|
+
throw e;
|
|
907
|
+
}
|
|
891
908
|
/**
|
|
892
909
|
* Handles adding the drag event listeners onto the golden layout drag handles
|
|
893
910
|
* @remarks
|
|
@@ -434,6 +434,10 @@ export declare class FoundationLayout extends FoundationElement implements Layou
|
|
|
434
434
|
* @internal
|
|
435
435
|
*/
|
|
436
436
|
private loadGLConfigAndSetup;
|
|
437
|
+
/**
|
|
438
|
+
* For specific golden layout errors we can provide better information to the caller. Else re-throw the original error
|
|
439
|
+
*/
|
|
440
|
+
private handleGLRunErrors;
|
|
437
441
|
/**
|
|
438
442
|
* Handles adding the drag event listeners onto the golden layout drag handles
|
|
439
443
|
* @remarks
|
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.375.1
|
|
4
|
+
"version": "14.375.1",
|
|
5
5
|
"license": "SEE LICENSE IN license.txt",
|
|
6
6
|
"main": "dist/esm/index.js",
|
|
7
7
|
"types": "dist/foundation-layout.d.ts",
|
|
@@ -36,20 +36,20 @@
|
|
|
36
36
|
}
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@genesislcap/foundation-testing": "14.375.1
|
|
40
|
-
"@genesislcap/genx": "14.375.1
|
|
41
|
-
"@genesislcap/rollup-builder": "14.375.1
|
|
42
|
-
"@genesislcap/ts-builder": "14.375.1
|
|
43
|
-
"@genesislcap/uvu-playwright-builder": "14.375.1
|
|
44
|
-
"@genesislcap/vite-builder": "14.375.1
|
|
45
|
-
"@genesislcap/webpack-builder": "14.375.1
|
|
39
|
+
"@genesislcap/foundation-testing": "14.375.1",
|
|
40
|
+
"@genesislcap/genx": "14.375.1",
|
|
41
|
+
"@genesislcap/rollup-builder": "14.375.1",
|
|
42
|
+
"@genesislcap/ts-builder": "14.375.1",
|
|
43
|
+
"@genesislcap/uvu-playwright-builder": "14.375.1",
|
|
44
|
+
"@genesislcap/vite-builder": "14.375.1",
|
|
45
|
+
"@genesislcap/webpack-builder": "14.375.1"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
48
|
"@genesis-community/golden-layout": "^2.11.0",
|
|
49
|
-
"@genesislcap/foundation-comms": "14.375.1
|
|
50
|
-
"@genesislcap/foundation-logger": "14.375.1
|
|
51
|
-
"@genesislcap/foundation-ui": "14.375.1
|
|
52
|
-
"@genesislcap/foundation-utils": "14.375.1
|
|
49
|
+
"@genesislcap/foundation-comms": "14.375.1",
|
|
50
|
+
"@genesislcap/foundation-logger": "14.375.1",
|
|
51
|
+
"@genesislcap/foundation-ui": "14.375.1",
|
|
52
|
+
"@genesislcap/foundation-utils": "14.375.1",
|
|
53
53
|
"@microsoft/fast-components": "2.30.6",
|
|
54
54
|
"@microsoft/fast-element": "1.14.0",
|
|
55
55
|
"@microsoft/fast-foundation": "2.49.6"
|
|
@@ -63,5 +63,5 @@
|
|
|
63
63
|
"access": "public"
|
|
64
64
|
},
|
|
65
65
|
"customElements": "dist/custom-elements.json",
|
|
66
|
-
"gitHead": "
|
|
66
|
+
"gitHead": "13a943f508a86862442e9a38999e0f0e56b282fa"
|
|
67
67
|
}
|