@genesislcap/foundation-layout 14.443.1 → 14.444.1-GENC-1262.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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layout-main.d.ts","sourceRoot":"","sources":["../../../src/main/layout-main.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,YAAY,
|
|
1
|
+
{"version":3,"file":"layout-main.d.ts","sourceRoot":"","sources":["../../../src/main/layout-main.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,YAAY,EAGZ,cAAc,EAGf,MAAM,kCAAkC,CAAC;AAK1C,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAE/D,OAAO,EAGL,gBAAgB,EAChB,aAAa,EACb,YAAY,EAOZ,eAAe,EAGf,kBAAkB,EAGlB,SAAS,EAET,uBAAuB,EACvB,kBAAkB,EAClB,gBAAgB,EACjB,MAAM,UAAU,CAAC;AAIlB,OAAO,EAAE,gCAAgC,EAAE,MAAM,4BAA4B,CAAC;AAE9E,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAmBzC;;;;;;;;;;;GAWG;AACH,qBAAa,gBAAiB,SAAQ,iBAAkB,YAAW,eAAe;;IAChF,OAAO,CAAC,MAAM,CAAe;IAC7B,gBAAgB;IAChB,aAAa,EAAE,WAAW,CAAC;IAC3B,OAAO,CAAC,YAAY,CAAqC;IACzD,OAAO,CAAC,mBAAmB,CAAqC;IAEhE,gBAAgB;IAChB,CAAC,aAAa,CAAC,EAAG,MAAM,CAAU;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,EA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;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;CAyChC;AAKD;;;;;GAKG;AACH,eAAO,MAAM,cAAc,uEAe1B,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;2BAI3B,CAAC"}
|
|
@@ -143,13 +143,34 @@ export interface RegisteredElementConfig {
|
|
|
143
143
|
* `multiple.size` - optional string describing the size of the new item (see the written documentation for more info).
|
|
144
144
|
* `multiple.size` specifies the size of the new group to be added and then the `size` config of the new items are the sizes relative to this new multiple group. If you only specify one new item then the `size` of that will be used as the size and will override `multiple.size`.
|
|
145
145
|
*/
|
|
146
|
-
export type
|
|
146
|
+
export type AreaPlacement = {
|
|
147
147
|
area: 'top' | 'left' | 'bottom' | 'right';
|
|
148
148
|
multiple?: {
|
|
149
149
|
type: LayoutRegionType;
|
|
150
150
|
size?: string;
|
|
151
151
|
};
|
|
152
152
|
};
|
|
153
|
+
/**
|
|
154
|
+
* @public
|
|
155
|
+
* Smart-join placement: add the new item as a tab inside the first stack that
|
|
156
|
+
* already contains any of the listed registrations.
|
|
157
|
+
*
|
|
158
|
+
* If none of the listed registrations are present in the current layout the
|
|
159
|
+
* placement falls back to `{ area: 'right' }`, creating a new right-side column
|
|
160
|
+
* exactly as the existing area-based behaviour does.
|
|
161
|
+
*
|
|
162
|
+
* Only supports adding a single item at a time.
|
|
163
|
+
*
|
|
164
|
+
* @example
|
|
165
|
+
* layout.addItem(
|
|
166
|
+
* { registration: 'diagram-viewer', title: 'Project Schema', closable: true },
|
|
167
|
+
* { nearRegistration: ['journey-creator', 'react-ui-preview'] },
|
|
168
|
+
* );
|
|
169
|
+
*/
|
|
170
|
+
export type NearRegistrationPlacement = {
|
|
171
|
+
nearRegistration: string | string[];
|
|
172
|
+
};
|
|
173
|
+
export type Placement = AreaPlacement | NearRegistrationPlacement;
|
|
153
174
|
/** @internal */
|
|
154
175
|
export type InstanceContainer = {
|
|
155
176
|
container: ComponentContainer;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/utils/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AAC5F,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAE/D;;;GAGG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,WAAW,GAAG;IACxB,QAAQ,EAAE,cAAc,CAAC;IACzB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,CAAC,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,WAAW,KAAK,IAAI,CAAC;CAC9D,CAAC;AAEF;;;;;;;;;;GAUG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC7B,CAAC,EAAE,GAAG,CAAC;IACP,CAAC,EAAE,oBAAoB,CAAC;IACxB;;;OAGG;IACH,OAAO,CAAC,EAAE;QACR,CAAC,SAAS,EAAE,MAAM,GAAG,WAAW,CAAC;KAClC,CAAC;CACH,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAoDK;AACL,MAAM,WAAW,wBAAwB,CAAC,CAAC;IACzC;;OAE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+454,7 @@ export class FoundationLayout extends FoundationElement {
|
|
|
454
454
|
*/
|
|
455
455
|
addItem(config, placement = defaultAddItemPlacement) {
|
|
456
456
|
var _b, _c, _d;
|
|
457
|
-
if (
|
|
457
|
+
if ('area' in placement && ((_b = placement.multiple) === null || _b === void 0 ? void 0 : _b.size) === '100%') {
|
|
458
458
|
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.');
|
|
459
459
|
}
|
|
460
460
|
const configArray = Array.isArray(config) ? config : [config];
|
|
@@ -476,14 +476,53 @@ export class FoundationLayout extends FoundationElement {
|
|
|
476
476
|
},
|
|
477
477
|
};
|
|
478
478
|
});
|
|
479
|
+
this.updateLifecycleToken();
|
|
480
|
+
// nearRegistration: add as a tab in the stack that already contains one of
|
|
481
|
+
// the candidate registrations; fall back to a new right column if none found.
|
|
482
|
+
if ('nearRegistration' in placement) {
|
|
483
|
+
if (!isSingleItem) {
|
|
484
|
+
throw new LayoutUsageError('nearRegistration placement only supports adding a single item at a time. Pass one RegisteredElementConfig, not an array.');
|
|
485
|
+
}
|
|
486
|
+
if (typeof this.layoutConfig.root === 'undefined') {
|
|
487
|
+
this.layoutConfig = {
|
|
488
|
+
root: { type: 'stack', content: childItems },
|
|
489
|
+
};
|
|
490
|
+
this.loadGLConfigAndSetup(this.layoutConfig);
|
|
491
|
+
this.onPostItemAdded();
|
|
492
|
+
return;
|
|
493
|
+
}
|
|
494
|
+
const candidates = Array.isArray(placement.nearRegistration)
|
|
495
|
+
? placement.nearRegistration
|
|
496
|
+
: [placement.nearRegistration];
|
|
497
|
+
const selectors = candidates.map((reg) => ({
|
|
498
|
+
typeId: 9 /* LayoutManager.LocationSelector.TypeId.StackContainingComponentType */, // 9
|
|
499
|
+
componentType: reg,
|
|
500
|
+
}));
|
|
501
|
+
const location = this.layout.addItemAtLocation(childItems[0], selectors);
|
|
502
|
+
if (location !== undefined) {
|
|
503
|
+
this.cacheAndSaveLayout();
|
|
504
|
+
this.onPostItemAdded();
|
|
505
|
+
return;
|
|
506
|
+
}
|
|
507
|
+
// None of the candidates found — open as new column on the right
|
|
508
|
+
this.layoutConfig = {
|
|
509
|
+
root: {
|
|
510
|
+
type: 'row',
|
|
511
|
+
content: [this.layoutConfig.root, { type: 'stack', content: childItems }],
|
|
512
|
+
},
|
|
513
|
+
};
|
|
514
|
+
this.loadGLConfigAndSetup(this.layoutConfig);
|
|
515
|
+
this.onPostItemAdded();
|
|
516
|
+
return;
|
|
517
|
+
}
|
|
518
|
+
// Area-based placement (existing behaviour) — placement is narrowed to AreaPlacement here
|
|
479
519
|
const itemConfig = {
|
|
480
|
-
type: regionConveter(((_c = placement
|
|
520
|
+
type: regionConveter(((_c = placement.multiple) === null || _c === void 0 ? void 0 : _c.type) || 'tabs'),
|
|
481
521
|
content: childItems,
|
|
482
|
-
size: isSingleItem ? configArray[0].size : (_d = placement
|
|
522
|
+
size: isSingleItem ? configArray[0].size : (_d = placement.multiple) === null || _d === void 0 ? void 0 : _d.size,
|
|
483
523
|
};
|
|
484
|
-
this.updateLifecycleToken();
|
|
485
524
|
/**
|
|
486
|
-
* If no root is added (no items via
|
|
525
|
+
* If no root is added (no items via declarative API) then
|
|
487
526
|
* this new item is the root so set it and return
|
|
488
527
|
*/
|
|
489
528
|
if (typeof this.layoutConfig.root === 'undefined') {
|
|
@@ -494,7 +533,6 @@ export class FoundationLayout extends FoundationElement {
|
|
|
494
533
|
this.onPostItemAdded();
|
|
495
534
|
return;
|
|
496
535
|
}
|
|
497
|
-
// Else we add the item relative to existing items
|
|
498
536
|
this.cacheAndSaveLayout();
|
|
499
537
|
const { area } = placement;
|
|
500
538
|
this.layoutConfig = {
|
|
@@ -2190,24 +2190,25 @@
|
|
|
2190
2190
|
{
|
|
2191
2191
|
"kind": "TypeAlias",
|
|
2192
2192
|
"canonicalReference": "@genesislcap/foundation-layout!Placement:type",
|
|
2193
|
-
"docComment": "
|
|
2193
|
+
"docComment": "",
|
|
2194
2194
|
"excerptTokens": [
|
|
2195
2195
|
{
|
|
2196
2196
|
"kind": "Content",
|
|
2197
2197
|
"text": "export type Placement = "
|
|
2198
2198
|
},
|
|
2199
|
-
{
|
|
2200
|
-
"kind": "Content",
|
|
2201
|
-
"text": "{\n area: 'top' | 'left' | 'bottom' | 'right';\n multiple?: {\n type: "
|
|
2202
|
-
},
|
|
2203
2199
|
{
|
|
2204
2200
|
"kind": "Reference",
|
|
2205
|
-
"text": "
|
|
2206
|
-
"canonicalReference": "@genesislcap/foundation-layout
|
|
2201
|
+
"text": "AreaPlacement",
|
|
2202
|
+
"canonicalReference": "@genesislcap/foundation-layout!~AreaPlacement:type"
|
|
2207
2203
|
},
|
|
2208
2204
|
{
|
|
2209
2205
|
"kind": "Content",
|
|
2210
|
-
"text": "
|
|
2206
|
+
"text": " | "
|
|
2207
|
+
},
|
|
2208
|
+
{
|
|
2209
|
+
"kind": "Reference",
|
|
2210
|
+
"text": "NearRegistrationPlacement",
|
|
2211
|
+
"canonicalReference": "@genesislcap/foundation-layout!~NearRegistrationPlacement:type"
|
|
2211
2212
|
},
|
|
2212
2213
|
{
|
|
2213
2214
|
"kind": "Content",
|
|
@@ -9,6 +9,24 @@ import { ResolvedLayoutConfig } from '@genesis-community/golden-layout';
|
|
|
9
9
|
import { RootItemConfig } from '@genesis-community/golden-layout';
|
|
10
10
|
import { ViewTemplate } from '@microsoft/fast-element';
|
|
11
11
|
|
|
12
|
+
/**
|
|
13
|
+
* @public
|
|
14
|
+
* Where to and how to add the new item(s) into the layout when using the {@link FoundationLayout.addItem} API.
|
|
15
|
+
* @remarks
|
|
16
|
+
* `area` dictates what part of the layout the new item(s) will be added to.
|
|
17
|
+
* `multiple` is optional and is defaulted to `type=horizontal` and `size=50%` if not defined. `multiple` config only affects the placement if multiple items are specified to be added.
|
|
18
|
+
* `multiple.type` sets the group type of the new items, whether they are horizontal, vertical, or in tabs.
|
|
19
|
+
* `multiple.size` - optional string describing the size of the new item (see the written documentation for more info).
|
|
20
|
+
* `multiple.size` specifies the size of the new group to be added and then the `size` config of the new items are the sizes relative to this new multiple group. If you only specify one new item then the `size` of that will be used as the size and will override `multiple.size`.
|
|
21
|
+
*/
|
|
22
|
+
declare type AreaPlacement = {
|
|
23
|
+
area: 'top' | 'left' | 'bottom' | 'right';
|
|
24
|
+
multiple?: {
|
|
25
|
+
type: LayoutRegionType;
|
|
26
|
+
size?: string;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
|
|
12
30
|
/**
|
|
13
31
|
* @public
|
|
14
32
|
* Factory function for creating component instances in the layout.
|
|
@@ -906,22 +924,27 @@ export declare class FoundationLayout extends FoundationElement implements Layou
|
|
|
906
924
|
|
|
907
925
|
/**
|
|
908
926
|
* @public
|
|
909
|
-
*
|
|
910
|
-
*
|
|
911
|
-
*
|
|
912
|
-
*
|
|
913
|
-
*
|
|
914
|
-
*
|
|
915
|
-
*
|
|
927
|
+
* Smart-join placement: add the new item as a tab inside the first stack that
|
|
928
|
+
* already contains any of the listed registrations.
|
|
929
|
+
*
|
|
930
|
+
* If none of the listed registrations are present in the current layout the
|
|
931
|
+
* placement falls back to `{ area: 'right' }`, creating a new right-side column
|
|
932
|
+
* exactly as the existing area-based behaviour does.
|
|
933
|
+
*
|
|
934
|
+
* Only supports adding a single item at a time.
|
|
935
|
+
*
|
|
936
|
+
* @example
|
|
937
|
+
* layout.addItem(
|
|
938
|
+
* { registration: 'diagram-viewer', title: 'Project Schema', closable: true },
|
|
939
|
+
* { nearRegistration: ['journey-creator', 'react-ui-preview'] },
|
|
940
|
+
* );
|
|
916
941
|
*/
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
multiple?: {
|
|
920
|
-
type: LayoutRegionType;
|
|
921
|
-
size?: string;
|
|
922
|
-
};
|
|
942
|
+
declare type NearRegistrationPlacement = {
|
|
943
|
+
nearRegistration: string | string[];
|
|
923
944
|
};
|
|
924
945
|
|
|
946
|
+
export declare type Placement = AreaPlacement | NearRegistrationPlacement;
|
|
947
|
+
|
|
925
948
|
/**
|
|
926
949
|
* Geometry details for a popout window
|
|
927
950
|
* @public
|
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.444.1-GENC-1262.1",
|
|
5
5
|
"license": "SEE LICENSE IN license.txt",
|
|
6
6
|
"main": "dist/esm/index.js",
|
|
7
7
|
"types": "dist/foundation-layout.d.ts",
|
|
@@ -38,22 +38,22 @@
|
|
|
38
38
|
}
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@genesislcap/foundation-testing": "14.
|
|
42
|
-
"@genesislcap/genx": "14.
|
|
43
|
-
"@genesislcap/rollup-builder": "14.
|
|
44
|
-
"@genesislcap/ts-builder": "14.
|
|
45
|
-
"@genesislcap/uvu-playwright-builder": "14.
|
|
46
|
-
"@genesislcap/vite-builder": "14.
|
|
47
|
-
"@genesislcap/webpack-builder": "14.
|
|
41
|
+
"@genesislcap/foundation-testing": "14.444.1-GENC-1262.1",
|
|
42
|
+
"@genesislcap/genx": "14.444.1-GENC-1262.1",
|
|
43
|
+
"@genesislcap/rollup-builder": "14.444.1-GENC-1262.1",
|
|
44
|
+
"@genesislcap/ts-builder": "14.444.1-GENC-1262.1",
|
|
45
|
+
"@genesislcap/uvu-playwright-builder": "14.444.1-GENC-1262.1",
|
|
46
|
+
"@genesislcap/vite-builder": "14.444.1-GENC-1262.1",
|
|
47
|
+
"@genesislcap/webpack-builder": "14.444.1-GENC-1262.1"
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@genesis-community/golden-layout": "^2.
|
|
51
|
-
"@genesislcap/foundation-broadcast-channel": "14.
|
|
52
|
-
"@genesislcap/foundation-comms": "14.
|
|
53
|
-
"@genesislcap/foundation-events": "14.
|
|
54
|
-
"@genesislcap/foundation-logger": "14.
|
|
55
|
-
"@genesislcap/foundation-ui": "14.
|
|
56
|
-
"@genesislcap/foundation-utils": "14.
|
|
50
|
+
"@genesis-community/golden-layout": "^2.13.0",
|
|
51
|
+
"@genesislcap/foundation-broadcast-channel": "14.444.1-GENC-1262.1",
|
|
52
|
+
"@genesislcap/foundation-comms": "14.444.1-GENC-1262.1",
|
|
53
|
+
"@genesislcap/foundation-events": "14.444.1-GENC-1262.1",
|
|
54
|
+
"@genesislcap/foundation-logger": "14.444.1-GENC-1262.1",
|
|
55
|
+
"@genesislcap/foundation-ui": "14.444.1-GENC-1262.1",
|
|
56
|
+
"@genesislcap/foundation-utils": "14.444.1-GENC-1262.1",
|
|
57
57
|
"@microsoft/fast-components": "2.30.6",
|
|
58
58
|
"@microsoft/fast-element": "1.14.0",
|
|
59
59
|
"@microsoft/fast-foundation": "2.50.0"
|
|
@@ -67,5 +67,5 @@
|
|
|
67
67
|
"access": "public"
|
|
68
68
|
},
|
|
69
69
|
"customElements": "dist/custom-elements.json",
|
|
70
|
-
"gitHead": "
|
|
70
|
+
"gitHead": "02c0cf4af9330e5dfd78d9ef6b481192ba87d6a5"
|
|
71
71
|
}
|