@genesislcap/foundation-workspace 15.46.2-FUI-2628.2 → 15.46.2-FUI-2628.3

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.
@@ -801,7 +801,7 @@
801
801
  "kind": "field",
802
802
  "name": "layouts",
803
803
  "type": {
804
- "text": "Map<string, FoundationLayout>"
804
+ "text": "Map<string, WorkspaceLayout>"
805
805
  },
806
806
  "privacy": "private",
807
807
  "default": "new Map()"
@@ -833,7 +833,7 @@
833
833
  {
834
834
  "name": "layout",
835
835
  "type": {
836
- "text": "FoundationLayout"
836
+ "text": "WorkspaceLayout"
837
837
  }
838
838
  }
839
839
  ]
@@ -894,7 +894,7 @@
894
894
  {
895
895
  "name": "layout",
896
896
  "type": {
897
- "text": "FoundationLayout"
897
+ "text": "WorkspaceLayout"
898
898
  }
899
899
  }
900
900
  ],
@@ -913,7 +913,7 @@
913
913
  {
914
914
  "name": "layout",
915
915
  "type": {
916
- "text": "FoundationLayout"
916
+ "text": "WorkspaceLayout"
917
917
  }
918
918
  },
919
919
  {
@@ -1,5 +1,23 @@
1
- import type { FoundationLayout } from '@genesislcap/foundation-layout';
1
+ import type { SerialisedLayout } from '@genesislcap/foundation-layout';
2
2
  import type { SavedLayout } from './workspace.types';
3
+ /**
4
+ * What the layout registry needs from a registered layout. `rapid-layout` (`FoundationLayout`)
5
+ * satisfies it as-is; adapters make other layout libraries saveable, e.g.
6
+ * `useWorkspaceFlexLayout` in `@genesislcap/foundation-react-utils/workspace` for flexlayout-react.
7
+ * @alpha
8
+ */
9
+ export interface WorkspaceLayout {
10
+ /** Whether the layout has finished its first load; its config is only read after that. */
11
+ hasFirstLoaded: boolean;
12
+ /** Returns the layout's current config (serialisable JSON) for a workspace to save. */
13
+ getLayout(): SerialisedLayout;
14
+ /** Replaces the layout with a saved config. */
15
+ loadLayout(layout: SerialisedLayout, handleMissingItem?: 'placeholder' | 'error', disableCache?: boolean): void;
16
+ /** Used to wait for `first-loaded` when `hasFirstLoaded` is still false. */
17
+ addEventListener(type: string, listener: () => void, options?: {
18
+ once?: boolean;
19
+ }): void;
20
+ }
3
21
  /**
4
22
  * @alpha
5
23
  */
@@ -27,7 +45,7 @@ export interface LayoutRegistry {
27
45
  export declare class DefaultLayoutRegistry implements LayoutRegistry {
28
46
  private layouts;
29
47
  private stored;
30
- registerLayout(layoutKey: string, layout: FoundationLayout): void;
48
+ registerLayout(layoutKey: string, layout: WorkspaceLayout): void;
31
49
  unregisterLayout(layoutKey: string): void;
32
50
  getLayoutsConfigs(): SavedLayout[];
33
51
  applySavedLayouts(savedLayouts: SavedLayout[]): Promise<void>;
@@ -1 +1 @@
1
- {"version":3,"file":"layout-registry.d.ts","sourceRoot":"","sources":["../../../src/workspace/layout-registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAoB,MAAM,gCAAgC,CAAC;AAGzF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAIrD;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,cAAc,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,GAAG,IAAI,CAAC;IACzD,gBAAgB,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1C,iBAAiB,IAAI,WAAW,EAAE,CAAC;IACnC,iBAAiB,CAAC,YAAY,EAAE,WAAW,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC/D;AAED;;;;;;;;;;;;;;GAcG;AACH,qBAAa,qBAAsB,YAAW,cAAc;IAC1D,OAAO,CAAC,OAAO,CAA4C;IAC3D,OAAO,CAAC,MAAM,CAA4C;IAE1D,cAAc,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,gBAAgB,GAAG,IAAI;IAiBjE,gBAAgB,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI;IASzC,iBAAiB,IAAI,WAAW,EAAE;IAU5B,iBAAiB,CAAC,YAAY,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AAC,MAAM,CAA4C;IAE1D,cAAc,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,eAAe,GAAG,IAAI;IAiBhE,gBAAgB,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI;IASzC,iBAAiB,IAAI,WAAW,EAAE;IAU5B,iBAAiB,CAAC,YAAY,EAAE,WAAW,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAanE;;;OAGG;IACH,OAAO,CAAC,UAAU;IAYlB,OAAO,CAAC,eAAe;CAOxB;AAED;;;GAGG;AACH,eAAO,MAAM,cAAc,sEAE1B,CAAC"}
@@ -2774,6 +2774,235 @@
2774
2774
  "endIndex": 10
2775
2775
  }
2776
2776
  },
2777
+ {
2778
+ "kind": "Interface",
2779
+ "canonicalReference": "@genesislcap/foundation-workspace!WorkspaceLayout:interface",
2780
+ "docComment": "/**\n * What the layout registry needs from a registered layout. `rapid-layout` (`FoundationLayout`) satisfies it as-is; adapters make other layout libraries saveable, e.g. `useWorkspaceFlexLayout` in `@genesislcap/foundation-react-utils/workspace` for flexlayout-react.\n *\n * @alpha\n */\n",
2781
+ "excerptTokens": [
2782
+ {
2783
+ "kind": "Content",
2784
+ "text": "export interface WorkspaceLayout "
2785
+ }
2786
+ ],
2787
+ "fileUrlPath": "src/workspace/layout-registry.ts",
2788
+ "releaseTag": "Alpha",
2789
+ "name": "WorkspaceLayout",
2790
+ "preserveMemberOrder": false,
2791
+ "members": [
2792
+ {
2793
+ "kind": "MethodSignature",
2794
+ "canonicalReference": "@genesislcap/foundation-workspace!WorkspaceLayout#addEventListener:member(1)",
2795
+ "docComment": "/**\n * Used to wait for `first-loaded` when `hasFirstLoaded` is still false.\n */\n",
2796
+ "excerptTokens": [
2797
+ {
2798
+ "kind": "Content",
2799
+ "text": "addEventListener(type: "
2800
+ },
2801
+ {
2802
+ "kind": "Content",
2803
+ "text": "string"
2804
+ },
2805
+ {
2806
+ "kind": "Content",
2807
+ "text": ", listener: "
2808
+ },
2809
+ {
2810
+ "kind": "Content",
2811
+ "text": "() => void"
2812
+ },
2813
+ {
2814
+ "kind": "Content",
2815
+ "text": ", options?: "
2816
+ },
2817
+ {
2818
+ "kind": "Content",
2819
+ "text": "{\n once?: boolean;\n }"
2820
+ },
2821
+ {
2822
+ "kind": "Content",
2823
+ "text": "): "
2824
+ },
2825
+ {
2826
+ "kind": "Content",
2827
+ "text": "void"
2828
+ },
2829
+ {
2830
+ "kind": "Content",
2831
+ "text": ";"
2832
+ }
2833
+ ],
2834
+ "isOptional": false,
2835
+ "returnTypeTokenRange": {
2836
+ "startIndex": 7,
2837
+ "endIndex": 8
2838
+ },
2839
+ "releaseTag": "Alpha",
2840
+ "overloadIndex": 1,
2841
+ "parameters": [
2842
+ {
2843
+ "parameterName": "type",
2844
+ "parameterTypeTokenRange": {
2845
+ "startIndex": 1,
2846
+ "endIndex": 2
2847
+ },
2848
+ "isOptional": false
2849
+ },
2850
+ {
2851
+ "parameterName": "listener",
2852
+ "parameterTypeTokenRange": {
2853
+ "startIndex": 3,
2854
+ "endIndex": 4
2855
+ },
2856
+ "isOptional": false
2857
+ },
2858
+ {
2859
+ "parameterName": "options",
2860
+ "parameterTypeTokenRange": {
2861
+ "startIndex": 5,
2862
+ "endIndex": 6
2863
+ },
2864
+ "isOptional": true
2865
+ }
2866
+ ],
2867
+ "name": "addEventListener"
2868
+ },
2869
+ {
2870
+ "kind": "MethodSignature",
2871
+ "canonicalReference": "@genesislcap/foundation-workspace!WorkspaceLayout#getLayout:member(1)",
2872
+ "docComment": "/**\n * Returns the layout's current config (serialisable JSON) for a workspace to save.\n */\n",
2873
+ "excerptTokens": [
2874
+ {
2875
+ "kind": "Content",
2876
+ "text": "getLayout(): "
2877
+ },
2878
+ {
2879
+ "kind": "Reference",
2880
+ "text": "SerialisedLayout",
2881
+ "canonicalReference": "@genesislcap/foundation-layout!SerialisedLayout:type"
2882
+ },
2883
+ {
2884
+ "kind": "Content",
2885
+ "text": ";"
2886
+ }
2887
+ ],
2888
+ "isOptional": false,
2889
+ "returnTypeTokenRange": {
2890
+ "startIndex": 1,
2891
+ "endIndex": 2
2892
+ },
2893
+ "releaseTag": "Alpha",
2894
+ "overloadIndex": 1,
2895
+ "parameters": [],
2896
+ "name": "getLayout"
2897
+ },
2898
+ {
2899
+ "kind": "PropertySignature",
2900
+ "canonicalReference": "@genesislcap/foundation-workspace!WorkspaceLayout#hasFirstLoaded:member",
2901
+ "docComment": "/**\n * Whether the layout has finished its first load; its config is only read after that.\n */\n",
2902
+ "excerptTokens": [
2903
+ {
2904
+ "kind": "Content",
2905
+ "text": "hasFirstLoaded: "
2906
+ },
2907
+ {
2908
+ "kind": "Content",
2909
+ "text": "boolean"
2910
+ },
2911
+ {
2912
+ "kind": "Content",
2913
+ "text": ";"
2914
+ }
2915
+ ],
2916
+ "isReadonly": false,
2917
+ "isOptional": false,
2918
+ "releaseTag": "Alpha",
2919
+ "name": "hasFirstLoaded",
2920
+ "propertyTypeTokenRange": {
2921
+ "startIndex": 1,
2922
+ "endIndex": 2
2923
+ }
2924
+ },
2925
+ {
2926
+ "kind": "MethodSignature",
2927
+ "canonicalReference": "@genesislcap/foundation-workspace!WorkspaceLayout#loadLayout:member(1)",
2928
+ "docComment": "/**\n * Replaces the layout with a saved config.\n */\n",
2929
+ "excerptTokens": [
2930
+ {
2931
+ "kind": "Content",
2932
+ "text": "loadLayout(layout: "
2933
+ },
2934
+ {
2935
+ "kind": "Reference",
2936
+ "text": "SerialisedLayout",
2937
+ "canonicalReference": "@genesislcap/foundation-layout!SerialisedLayout:type"
2938
+ },
2939
+ {
2940
+ "kind": "Content",
2941
+ "text": ", handleMissingItem?: "
2942
+ },
2943
+ {
2944
+ "kind": "Content",
2945
+ "text": "'placeholder' | 'error'"
2946
+ },
2947
+ {
2948
+ "kind": "Content",
2949
+ "text": ", disableCache?: "
2950
+ },
2951
+ {
2952
+ "kind": "Content",
2953
+ "text": "boolean"
2954
+ },
2955
+ {
2956
+ "kind": "Content",
2957
+ "text": "): "
2958
+ },
2959
+ {
2960
+ "kind": "Content",
2961
+ "text": "void"
2962
+ },
2963
+ {
2964
+ "kind": "Content",
2965
+ "text": ";"
2966
+ }
2967
+ ],
2968
+ "isOptional": false,
2969
+ "returnTypeTokenRange": {
2970
+ "startIndex": 7,
2971
+ "endIndex": 8
2972
+ },
2973
+ "releaseTag": "Alpha",
2974
+ "overloadIndex": 1,
2975
+ "parameters": [
2976
+ {
2977
+ "parameterName": "layout",
2978
+ "parameterTypeTokenRange": {
2979
+ "startIndex": 1,
2980
+ "endIndex": 2
2981
+ },
2982
+ "isOptional": false
2983
+ },
2984
+ {
2985
+ "parameterName": "handleMissingItem",
2986
+ "parameterTypeTokenRange": {
2987
+ "startIndex": 3,
2988
+ "endIndex": 4
2989
+ },
2990
+ "isOptional": true
2991
+ },
2992
+ {
2993
+ "parameterName": "disableCache",
2994
+ "parameterTypeTokenRange": {
2995
+ "startIndex": 5,
2996
+ "endIndex": 6
2997
+ },
2998
+ "isOptional": true
2999
+ }
3000
+ ],
3001
+ "name": "loadLayout"
3002
+ }
3003
+ ],
3004
+ "extendsTokenRanges": []
3005
+ },
2777
3006
  {
2778
3007
  "kind": "Class",
2779
3008
  "canonicalReference": "@genesislcap/foundation-workspace!WorkspaceManager:class",
@@ -3,7 +3,6 @@ import type { ColumnApi } from '@ag-grid-community/core';
3
3
  import { Connect } from '@genesislcap/foundation-comms';
4
4
  import type { Container } from '@genesislcap/web-core';
5
5
  import { FoundationElement } from '@genesislcap/web-core';
6
- import type { FoundationLayout } from '@genesislcap/foundation-layout';
7
6
  import type { GridApi } from '@ag-grid-community/core';
8
7
  import { InterfaceSymbol } from '@microsoft/fast-foundation';
9
8
  import { KVStorage } from '@genesislcap/foundation-comms';
@@ -131,7 +130,7 @@ export declare class DefaultGridRegistry implements GridRegistry {
131
130
  export declare class DefaultLayoutRegistry implements LayoutRegistry {
132
131
  private layouts;
133
132
  private stored;
134
- registerLayout(layoutKey: string, layout: FoundationLayout): void;
133
+ registerLayout(layoutKey: string, layout: WorkspaceLayout): void;
135
134
  unregisterLayout(layoutKey: string): void;
136
135
  getLayoutsConfigs(): SavedLayout[];
137
136
  applySavedLayouts(savedLayouts: SavedLayout[]): Promise<void>;
@@ -374,6 +373,25 @@ export declare const workspaceComponents: {
374
373
  register(container?: Container, ...rest: any[]): void;
375
374
  };
376
375
 
376
+ /**
377
+ * What the layout registry needs from a registered layout. `rapid-layout` (`FoundationLayout`)
378
+ * satisfies it as-is; adapters make other layout libraries saveable, e.g.
379
+ * `useWorkspaceFlexLayout` in `@genesislcap/foundation-react-utils/workspace` for flexlayout-react.
380
+ * @alpha
381
+ */
382
+ export declare interface WorkspaceLayout {
383
+ /** Whether the layout has finished its first load; its config is only read after that. */
384
+ hasFirstLoaded: boolean;
385
+ /** Returns the layout's current config (serialisable JSON) for a workspace to save. */
386
+ getLayout(): SerialisedLayout;
387
+ /** Replaces the layout with a saved config. */
388
+ loadLayout(layout: SerialisedLayout, handleMissingItem?: 'placeholder' | 'error', disableCache?: boolean): void;
389
+ /** Used to wait for `first-loaded` when `hasFirstLoaded` is still false. */
390
+ addEventListener(type: string, listener: () => void, options?: {
391
+ once?: boolean;
392
+ }): void;
393
+ }
394
+
377
395
  /**
378
396
  * Workspace persistence UI (save/load + share/delete shared workspaces).
379
397
  * @alpha
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@genesislcap/foundation-workspace",
3
3
  "description": "Genesis Foundation Workspace Components and State",
4
- "version": "15.46.2-FUI-2628.2",
4
+ "version": "15.46.2-FUI-2628.3",
5
5
  "sideEffects": false,
6
6
  "license": "SEE LICENSE IN license.txt",
7
7
  "main": "dist/esm/index.js",
@@ -48,22 +48,22 @@
48
48
  }
49
49
  },
50
50
  "devDependencies": {
51
- "@genesislcap/foundation-testing": "15.46.2-FUI-2628.2",
52
- "@genesislcap/genx": "15.46.2-FUI-2628.2",
53
- "@genesislcap/ts-builder": "15.46.2-FUI-2628.2",
54
- "@genesislcap/uvu-playwright-builder": "15.46.2-FUI-2628.2",
55
- "@genesislcap/vite-builder": "15.46.2-FUI-2628.2",
56
- "@genesislcap/webpack-builder": "15.46.2-FUI-2628.2"
51
+ "@genesislcap/foundation-testing": "15.46.2-FUI-2628.3",
52
+ "@genesislcap/genx": "15.46.2-FUI-2628.3",
53
+ "@genesislcap/ts-builder": "15.46.2-FUI-2628.3",
54
+ "@genesislcap/uvu-playwright-builder": "15.46.2-FUI-2628.3",
55
+ "@genesislcap/vite-builder": "15.46.2-FUI-2628.3",
56
+ "@genesislcap/webpack-builder": "15.46.2-FUI-2628.3"
57
57
  },
58
58
  "dependencies": {
59
59
  "@ag-grid-community/core": "29.2.0",
60
- "@genesislcap/foundation-comms": "15.46.2-FUI-2628.2",
61
- "@genesislcap/foundation-layout": "15.46.2-FUI-2628.2",
62
- "@genesislcap/foundation-notifications": "15.46.2-FUI-2628.2",
63
- "@genesislcap/foundation-ui": "15.46.2-FUI-2628.2",
64
- "@genesislcap/foundation-utils": "15.46.2-FUI-2628.2",
65
- "@genesislcap/grid-pro": "15.46.2-FUI-2628.2",
66
- "@genesislcap/web-core": "15.46.2-FUI-2628.2"
60
+ "@genesislcap/foundation-comms": "15.46.2-FUI-2628.3",
61
+ "@genesislcap/foundation-layout": "15.46.2-FUI-2628.3",
62
+ "@genesislcap/foundation-notifications": "15.46.2-FUI-2628.3",
63
+ "@genesislcap/foundation-ui": "15.46.2-FUI-2628.3",
64
+ "@genesislcap/foundation-utils": "15.46.2-FUI-2628.3",
65
+ "@genesislcap/grid-pro": "15.46.2-FUI-2628.3",
66
+ "@genesislcap/web-core": "15.46.2-FUI-2628.3"
67
67
  },
68
68
  "repository": {
69
69
  "type": "git",