@openmrs/esm-framework 8.0.1-pre.3473 → 8.0.1-pre.3498

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.
Files changed (31) hide show
  1. package/.turbo/turbo-build.log +4 -1
  2. package/dist/openmrs-esm-framework.js +2 -2
  3. package/dist/openmrs-esm-framework.js.map +1 -1
  4. package/docs/functions/closeWorkspaceGroup2.md +1 -1
  5. package/docs/functions/createUseStore.md +1 -1
  6. package/docs/functions/getRegisteredWorkspace2Names.md +13 -0
  7. package/docs/functions/launchWorkspace2.md +1 -1
  8. package/docs/functions/launchWorkspaceGroup2.md +1 -1
  9. package/docs/functions/useStore.md +4 -4
  10. package/docs/functions/useStoreWithActions.md +1 -1
  11. package/docs/functions/useWorkspace2Context.md +14 -0
  12. package/docs/interfaces/FeatureFlagDefinition.md +4 -4
  13. package/docs/interfaces/OpenmrsAppRoutes.md +13 -13
  14. package/docs/interfaces/ResourceLoader.md +2 -2
  15. package/docs/interfaces/Workspace2DefinitionProps.md +27 -7
  16. package/docs/interfaces/WorkspaceDefinition2.md +4 -4
  17. package/docs/interfaces/WorkspaceGroupDefinition2.md +16 -0
  18. package/docs/interfaces/WorkspaceWindowDefinition2.md +9 -25
  19. package/docs/type-aliases/ActionFunction.md +1 -1
  20. package/docs/type-aliases/Actions.md +1 -1
  21. package/docs/type-aliases/BoundActions.md +1 -1
  22. package/docs/type-aliases/NameUse.md +1 -1
  23. package/docs/type-aliases/OpenmrsRoutes.md +1 -1
  24. package/docs/type-aliases/Workspace2Definition.md +1 -1
  25. package/docs/variables/Workspace2.md +1 -1
  26. package/mock-jest.tsx +1 -0
  27. package/mock.tsx +1 -0
  28. package/package.json +20 -20
  29. package/setup-tests.ts +20 -1
  30. package/src/integration-tests/extension-config-expressions.test.tsx +7 -11
  31. package/src/integration-tests/extension-config.test.tsx +49 -59
@@ -4,7 +4,7 @@
4
4
 
5
5
  > **closeWorkspaceGroup2**(`discardUnsavedChanges?`): `Promise`\<`boolean`\>
6
6
 
7
- Defined in: [packages/framework/esm-styleguide/src/workspaces2/workspace2.ts:72](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/workspaces2/workspace2.ts#L72)
7
+ Defined in: [packages/framework/esm-styleguide/src/workspaces2/workspace2.ts:75](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/workspaces2/workspace2.ts#L75)
8
8
 
9
9
  **`Experimental`**
10
10
 
@@ -4,7 +4,7 @@
4
4
 
5
5
  > **createUseStore**\<`T`\>(`store`): \{(): `T`; \<`A`\>(`actions`): `T` & [`BoundActions`](../type-aliases/BoundActions.md)\<`T`, `A`\>; \<`A`\>(`actions?`): `T` & [`BoundActions`](../type-aliases/BoundActions.md)\<`T`, `A`\>; \}
6
6
 
7
- Defined in: [packages/framework/esm-react-utils/src/useStore.ts:95](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-react-utils/src/useStore.ts#L95)
7
+ Defined in: [packages/framework/esm-react-utils/src/useStore.ts:104](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-react-utils/src/useStore.ts#L104)
8
8
 
9
9
  Whenever possible, use `useStore(yourStore)` instead. This function is for creating a
10
10
  custom hook for a specific store.
@@ -0,0 +1,13 @@
1
+ [O3 Framework](../API.md) / getRegisteredWorkspace2Names
2
+
3
+ # Function: getRegisteredWorkspace2Names()
4
+
5
+ > **getRegisteredWorkspace2Names**(): `string`[]
6
+
7
+ Defined in: [packages/framework/esm-styleguide/src/workspaces2/workspace2.ts:561](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/workspaces2/workspace2.ts#L561)
8
+
9
+ ## Returns
10
+
11
+ `string`[]
12
+
13
+ a list of registered workspaces.
@@ -4,7 +4,7 @@
4
4
 
5
5
  > **launchWorkspace2**\<`WorkspaceProps`, `WindowProps`, `GroupProp`\>(`workspaceName`, `workspaceProps`, `windowProps`, `groupProps`): `Promise`\<`boolean`\>
6
6
 
7
- Defined in: [packages/framework/esm-styleguide/src/workspaces2/workspace2.ts:132](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/workspaces2/workspace2.ts#L132)
7
+ Defined in: [packages/framework/esm-styleguide/src/workspaces2/workspace2.ts:135](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/workspaces2/workspace2.ts#L135)
8
8
 
9
9
  **`Experimental`**
10
10
 
@@ -4,7 +4,7 @@
4
4
 
5
5
  > **launchWorkspaceGroup2**\<`GroupProps`\>(`groupName`, `groupProps`): `Promise`\<`boolean`\>
6
6
 
7
- Defined in: [packages/framework/esm-styleguide/src/workspaces2/workspace2.ts:29](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/workspaces2/workspace2.ts#L29)
7
+ Defined in: [packages/framework/esm-styleguide/src/workspaces2/workspace2.ts:32](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/workspaces2/workspace2.ts#L32)
8
8
 
9
9
  **`Experimental`**
10
10
 
@@ -6,7 +6,7 @@
6
6
 
7
7
  > **useStore**\<`T`\>(`store`): `T`
8
8
 
9
- Defined in: [packages/framework/esm-react-utils/src/useStore.ts:53](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-react-utils/src/useStore.ts#L53)
9
+ Defined in: [packages/framework/esm-react-utils/src/useStore.ts:52](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-react-utils/src/useStore.ts#L52)
10
10
 
11
11
  ### Type Parameters
12
12
 
@@ -28,7 +28,7 @@ Defined in: [packages/framework/esm-react-utils/src/useStore.ts:53](https://gith
28
28
 
29
29
  > **useStore**\<`T`, `U`\>(`store`, `select`): `U`
30
30
 
31
- Defined in: [packages/framework/esm-react-utils/src/useStore.ts:54](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-react-utils/src/useStore.ts#L54)
31
+ Defined in: [packages/framework/esm-react-utils/src/useStore.ts:53](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-react-utils/src/useStore.ts#L53)
32
32
 
33
33
  ### Type Parameters
34
34
 
@@ -58,7 +58,7 @@ Defined in: [packages/framework/esm-react-utils/src/useStore.ts:54](https://gith
58
58
 
59
59
  > **useStore**\<`T`, `U`, `A`\>(`store`, `select`, `actions`): `T` & [`BoundActions`](../type-aliases/BoundActions.md)\<`T`, `A`\>
60
60
 
61
- Defined in: [packages/framework/esm-react-utils/src/useStore.ts:55](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-react-utils/src/useStore.ts#L55)
61
+ Defined in: [packages/framework/esm-react-utils/src/useStore.ts:54](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-react-utils/src/useStore.ts#L54)
62
62
 
63
63
  ### Type Parameters
64
64
 
@@ -96,7 +96,7 @@ Defined in: [packages/framework/esm-react-utils/src/useStore.ts:55](https://gith
96
96
 
97
97
  > **useStore**\<`T`, `U`, `A`\>(`store`, `select`, `actions`): `U` & [`BoundActions`](../type-aliases/BoundActions.md)\<`T`, `A`\>
98
98
 
99
- Defined in: [packages/framework/esm-react-utils/src/useStore.ts:60](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-react-utils/src/useStore.ts#L60)
99
+ Defined in: [packages/framework/esm-react-utils/src/useStore.ts:59](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-react-utils/src/useStore.ts#L59)
100
100
 
101
101
  ### Type Parameters
102
102
 
@@ -4,7 +4,7 @@
4
4
 
5
5
  > **useStoreWithActions**\<`T`, `A`\>(`store`, `actions`): `T` & [`BoundActions`](../type-aliases/BoundActions.md)\<`T`, `A`\>
6
6
 
7
- Defined in: [packages/framework/esm-react-utils/src/useStore.ts:87](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-react-utils/src/useStore.ts#L87)
7
+ Defined in: [packages/framework/esm-react-utils/src/useStore.ts:96](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-react-utils/src/useStore.ts#L96)
8
8
 
9
9
  ## Type Parameters
10
10
 
@@ -0,0 +1,14 @@
1
+ [O3 Framework](../API.md) / useWorkspace2Context
2
+
3
+ # Function: useWorkspace2Context()
4
+
5
+ > **useWorkspace2Context**(): [`Workspace2DefinitionProps`](../interfaces/Workspace2DefinitionProps.md)\<`object`, `object`, `object`\>
6
+
7
+ Defined in: [packages/framework/esm-styleguide/src/workspaces2/workspace2.ts:555](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/workspaces2/workspace2.ts#L555)
8
+
9
+ Returns the react Context containing props passed into a workspace.
10
+ This hook MUST be called inside a child of <Workspace2>
11
+
12
+ ## Returns
13
+
14
+ [`Workspace2DefinitionProps`](../interfaces/Workspace2DefinitionProps.md)\<`object`, `object`, `object`\>
@@ -2,7 +2,7 @@
2
2
 
3
3
  # Interface: FeatureFlagDefinition
4
4
 
5
- Defined in: packages/framework/esm-globals/dist/types.d.ts:320
5
+ Defined in: packages/framework/esm-globals/dist/types.d.ts:328
6
6
 
7
7
  A definition of a feature flag extracted from the routes.json
8
8
 
@@ -12,7 +12,7 @@ A definition of a feature flag extracted from the routes.json
12
12
 
13
13
  > **description**: `string`
14
14
 
15
- Defined in: packages/framework/esm-globals/dist/types.d.ts:326
15
+ Defined in: packages/framework/esm-globals/dist/types.d.ts:334
16
16
 
17
17
  An explanation of what the flag does, which will be displayed in the Implementer Tools
18
18
 
@@ -22,7 +22,7 @@ An explanation of what the flag does, which will be displayed in the Implementer
22
22
 
23
23
  > **flagName**: `string`
24
24
 
25
- Defined in: packages/framework/esm-globals/dist/types.d.ts:322
25
+ Defined in: packages/framework/esm-globals/dist/types.d.ts:330
26
26
 
27
27
  A code-friendly name for the flag, which will be used to reference it in code
28
28
 
@@ -32,6 +32,6 @@ A code-friendly name for the flag, which will be used to reference it in code
32
32
 
33
33
  > **label**: `string`
34
34
 
35
- Defined in: packages/framework/esm-globals/dist/types.d.ts:324
35
+ Defined in: packages/framework/esm-globals/dist/types.d.ts:332
36
36
 
37
37
  A human-friendly name which will be displayed in the Implementer Tools
@@ -2,7 +2,7 @@
2
2
 
3
3
  # Interface: OpenmrsAppRoutes
4
4
 
5
- Defined in: packages/framework/esm-globals/dist/types.d.ts:329
5
+ Defined in: packages/framework/esm-globals/dist/types.d.ts:337
6
6
 
7
7
  This interface describes the format of the routes provided by an app
8
8
 
@@ -12,7 +12,7 @@ This interface describes the format of the routes provided by an app
12
12
 
13
13
  > `optional` **backendDependencies**: `Record`\<`string`, `string`\>
14
14
 
15
- Defined in: packages/framework/esm-globals/dist/types.d.ts:333
15
+ Defined in: packages/framework/esm-globals/dist/types.d.ts:341
16
16
 
17
17
  A list of backend modules necessary for this frontend module and the corresponding required versions.
18
18
 
@@ -22,7 +22,7 @@ A list of backend modules necessary for this frontend module and the correspondi
22
22
 
23
23
  > `optional` **extensions**: [`ExtensionDefinition`](../type-aliases/ExtensionDefinition.md)[]
24
24
 
25
- Defined in: packages/framework/esm-globals/dist/types.d.ts:347
25
+ Defined in: packages/framework/esm-globals/dist/types.d.ts:355
26
26
 
27
27
  An array of all extensions supported by this frontend module. Extensions can be mounted in extension slots, either via declarations in this file or configuration.
28
28
 
@@ -32,7 +32,7 @@ An array of all extensions supported by this frontend module. Extensions can be
32
32
 
33
33
  > `optional` **featureFlags**: [`FeatureFlagDefinition`](FeatureFlagDefinition.md)[]
34
34
 
35
- Defined in: packages/framework/esm-globals/dist/types.d.ts:349
35
+ Defined in: packages/framework/esm-globals/dist/types.d.ts:357
36
36
 
37
37
  An array of all feature flags for any beta-stage features this module provides.
38
38
 
@@ -42,7 +42,7 @@ An array of all feature flags for any beta-stage features this module provides.
42
42
 
43
43
  > `optional` **modals**: [`ModalDefinition`](../type-aliases/ModalDefinition.md)[]
44
44
 
45
- Defined in: packages/framework/esm-globals/dist/types.d.ts:351
45
+ Defined in: packages/framework/esm-globals/dist/types.d.ts:359
46
46
 
47
47
  An array of all modals supported by this frontend module. Modals can be launched by name.
48
48
 
@@ -52,7 +52,7 @@ An array of all modals supported by this frontend module. Modals can be launched
52
52
 
53
53
  > `optional` **optionalBackendDependencies**: `object`
54
54
 
55
- Defined in: packages/framework/esm-globals/dist/types.d.ts:335
55
+ Defined in: packages/framework/esm-globals/dist/types.d.ts:343
56
56
 
57
57
  A list of backend modules that may enable optional functionality in this frontend module if available and the corresponding required versions.
58
58
 
@@ -68,7 +68,7 @@ The name of the backend dependency and either the required version or an object
68
68
 
69
69
  > `optional` **pages**: [`PageDefinition`](../type-aliases/PageDefinition.md)[]
70
70
 
71
- Defined in: packages/framework/esm-globals/dist/types.d.ts:345
71
+ Defined in: packages/framework/esm-globals/dist/types.d.ts:353
72
72
 
73
73
  An array of all pages supported by this frontend module. Pages are automatically mounted based on a route.
74
74
 
@@ -78,7 +78,7 @@ An array of all pages supported by this frontend module. Pages are automatically
78
78
 
79
79
  > `optional` **version**: `string`
80
80
 
81
- Defined in: packages/framework/esm-globals/dist/types.d.ts:331
81
+ Defined in: packages/framework/esm-globals/dist/types.d.ts:339
82
82
 
83
83
  The version of this frontend module.
84
84
 
@@ -88,7 +88,7 @@ The version of this frontend module.
88
88
 
89
89
  > `optional` **workspaceGroups**: [`WorkspaceGroupDefinition`](WorkspaceGroupDefinition.md)[]
90
90
 
91
- Defined in: packages/framework/esm-globals/dist/types.d.ts:355
91
+ Defined in: packages/framework/esm-globals/dist/types.d.ts:363
92
92
 
93
93
  An array of all workspace groups supported by this frontend module.
94
94
 
@@ -98,7 +98,7 @@ An array of all workspace groups supported by this frontend module.
98
98
 
99
99
  > `optional` **workspaceGroups2**: [`WorkspaceGroupDefinition2`](WorkspaceGroupDefinition2.md)[]
100
100
 
101
- Defined in: packages/framework/esm-globals/dist/types.d.ts:357
101
+ Defined in: packages/framework/esm-globals/dist/types.d.ts:365
102
102
 
103
103
  An array of all workspace groups (v2) supported by this frontend module.
104
104
 
@@ -108,7 +108,7 @@ An array of all workspace groups (v2) supported by this frontend module.
108
108
 
109
109
  > `optional` **workspaces**: [`WorkspaceDefinition`](../type-aliases/WorkspaceDefinition.md)[]
110
110
 
111
- Defined in: packages/framework/esm-globals/dist/types.d.ts:353
111
+ Defined in: packages/framework/esm-globals/dist/types.d.ts:361
112
112
 
113
113
  An array of all workspaces supported by this frontend module. Workspaces can be launched by name.
114
114
 
@@ -118,7 +118,7 @@ An array of all workspaces supported by this frontend module. Workspaces can be
118
118
 
119
119
  > `optional` **workspaces2**: [`WorkspaceDefinition2`](WorkspaceDefinition2.md)[]
120
120
 
121
- Defined in: packages/framework/esm-globals/dist/types.d.ts:361
121
+ Defined in: packages/framework/esm-globals/dist/types.d.ts:369
122
122
 
123
123
  An array of all workspaces (v2) supported by this frontend module.
124
124
 
@@ -128,6 +128,6 @@ An array of all workspaces (v2) supported by this frontend module.
128
128
 
129
129
  > `optional` **workspaceWindows2**: [`WorkspaceWindowDefinition2`](WorkspaceWindowDefinition2.md)[]
130
130
 
131
- Defined in: packages/framework/esm-globals/dist/types.d.ts:359
131
+ Defined in: packages/framework/esm-globals/dist/types.d.ts:367
132
132
 
133
133
  An array of all workspace windows (v2) supported by this frontend module.
@@ -2,7 +2,7 @@
2
2
 
3
3
  # Interface: ResourceLoader()\<T\>
4
4
 
5
- Defined in: packages/framework/esm-globals/dist/types.d.ts:368
5
+ Defined in: packages/framework/esm-globals/dist/types.d.ts:376
6
6
 
7
7
  ## Type Parameters
8
8
 
@@ -12,7 +12,7 @@ Defined in: packages/framework/esm-globals/dist/types.d.ts:368
12
12
 
13
13
  > **ResourceLoader**(): `Promise`\<`T`\>
14
14
 
15
- Defined in: packages/framework/esm-globals/dist/types.d.ts:369
15
+ Defined in: packages/framework/esm-globals/dist/types.d.ts:377
16
16
 
17
17
  ## Returns
18
18
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  # Interface: Workspace2DefinitionProps\<WorkspaceProps, WindowProps, GroupProps\>
4
4
 
5
- Defined in: [packages/framework/esm-styleguide/src/workspaces2/workspace2.component.tsx:21](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/workspaces2/workspace2.component.tsx#L21)
5
+ Defined in: [packages/framework/esm-styleguide/src/workspaces2/workspace2.component.tsx:20](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/workspaces2/workspace2.component.tsx#L20)
6
6
 
7
7
  **`Experimental`**
8
8
 
@@ -26,7 +26,27 @@ Defined in: [packages/framework/esm-styleguide/src/workspaces2/workspace2.compon
26
26
 
27
27
  > **groupProps**: `null` \| `GroupProps`
28
28
 
29
- Defined in: [packages/framework/esm-styleguide/src/workspaces2/workspace2.component.tsx:45](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/workspaces2/workspace2.component.tsx#L45)
29
+ Defined in: [packages/framework/esm-styleguide/src/workspaces2/workspace2.component.tsx:44](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/workspaces2/workspace2.component.tsx#L44)
30
+
31
+ **`Experimental`**
32
+
33
+ ***
34
+
35
+ ### isRootWorkspace
36
+
37
+ > **isRootWorkspace**: `boolean`
38
+
39
+ Defined in: [packages/framework/esm-styleguide/src/workspaces2/workspace2.component.tsx:47](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/workspaces2/workspace2.component.tsx#L47)
40
+
41
+ **`Experimental`**
42
+
43
+ ***
44
+
45
+ ### windowName
46
+
47
+ > **windowName**: `string`
48
+
49
+ Defined in: [packages/framework/esm-styleguide/src/workspaces2/workspace2.component.tsx:46](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/workspaces2/workspace2.component.tsx#L46)
30
50
 
31
51
  **`Experimental`**
32
52
 
@@ -36,7 +56,7 @@ Defined in: [packages/framework/esm-styleguide/src/workspaces2/workspace2.compon
36
56
 
37
57
  > **windowProps**: `null` \| `WindowProps`
38
58
 
39
- Defined in: [packages/framework/esm-styleguide/src/workspaces2/workspace2.component.tsx:44](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/workspaces2/workspace2.component.tsx#L44)
59
+ Defined in: [packages/framework/esm-styleguide/src/workspaces2/workspace2.component.tsx:43](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/workspaces2/workspace2.component.tsx#L43)
40
60
 
41
61
  **`Experimental`**
42
62
 
@@ -46,7 +66,7 @@ Defined in: [packages/framework/esm-styleguide/src/workspaces2/workspace2.compon
46
66
 
47
67
  > **workspaceName**: `string`
48
68
 
49
- Defined in: [packages/framework/esm-styleguide/src/workspaces2/workspace2.component.tsx:46](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/workspaces2/workspace2.component.tsx#L46)
69
+ Defined in: [packages/framework/esm-styleguide/src/workspaces2/workspace2.component.tsx:45](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/workspaces2/workspace2.component.tsx#L45)
50
70
 
51
71
  **`Experimental`**
52
72
 
@@ -56,7 +76,7 @@ Defined in: [packages/framework/esm-styleguide/src/workspaces2/workspace2.compon
56
76
 
57
77
  > **workspaceProps**: `null` \| `WorkspaceProps`
58
78
 
59
- Defined in: [packages/framework/esm-styleguide/src/workspaces2/workspace2.component.tsx:43](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/workspaces2/workspace2.component.tsx#L43)
79
+ Defined in: [packages/framework/esm-styleguide/src/workspaces2/workspace2.component.tsx:42](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/workspaces2/workspace2.component.tsx#L42)
60
80
 
61
81
  **`Experimental`**
62
82
 
@@ -66,7 +86,7 @@ Defined in: [packages/framework/esm-styleguide/src/workspaces2/workspace2.compon
66
86
 
67
87
  > **closeWorkspace**(`options?`): `Promise`\<`boolean`\>
68
88
 
69
- Defined in: [packages/framework/esm-styleguide/src/workspaces2/workspace2.component.tsx:41](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/workspaces2/workspace2.component.tsx#L41)
89
+ Defined in: [packages/framework/esm-styleguide/src/workspaces2/workspace2.component.tsx:40](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/workspaces2/workspace2.component.tsx#L40)
70
90
 
71
91
  **`Experimental`**
72
92
 
@@ -96,7 +116,7 @@ a Promise that resolves to true if the workspace is closed, false otherwise.
96
116
 
97
117
  > **launchChildWorkspace**\<`Props`\>(`workspaceName`, `workspaceProps?`): `void`
98
118
 
99
- Defined in: [packages/framework/esm-styleguide/src/workspaces2/workspace2.component.tsx:33](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/workspaces2/workspace2.component.tsx#L33)
119
+ Defined in: [packages/framework/esm-styleguide/src/workspaces2/workspace2.component.tsx:32](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/workspaces2/workspace2.component.tsx#L32)
100
120
 
101
121
  **`Experimental`**
102
122
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  # Interface: WorkspaceDefinition2
4
4
 
5
- Defined in: packages/framework/esm-globals/dist/types.d.ts:312
5
+ Defined in: packages/framework/esm-globals/dist/types.d.ts:320
6
6
 
7
7
  ## Properties
8
8
 
@@ -10,7 +10,7 @@ Defined in: packages/framework/esm-globals/dist/types.d.ts:312
10
10
 
11
11
  > **component**: `string`
12
12
 
13
- Defined in: packages/framework/esm-globals/dist/types.d.ts:314
13
+ Defined in: packages/framework/esm-globals/dist/types.d.ts:322
14
14
 
15
15
  ***
16
16
 
@@ -18,7 +18,7 @@ Defined in: packages/framework/esm-globals/dist/types.d.ts:314
18
18
 
19
19
  > **name**: `string`
20
20
 
21
- Defined in: packages/framework/esm-globals/dist/types.d.ts:313
21
+ Defined in: packages/framework/esm-globals/dist/types.d.ts:321
22
22
 
23
23
  ***
24
24
 
@@ -26,4 +26,4 @@ Defined in: packages/framework/esm-globals/dist/types.d.ts:313
26
26
 
27
27
  > **window**: `string`
28
28
 
29
- Defined in: packages/framework/esm-globals/dist/types.d.ts:315
29
+ Defined in: packages/framework/esm-globals/dist/types.d.ts:323
@@ -27,3 +27,19 @@ Defined in: packages/framework/esm-globals/dist/types.d.ts:298
27
27
  > `optional` **overlay**: `boolean`
28
28
 
29
29
  Defined in: packages/framework/esm-globals/dist/types.d.ts:300
30
+
31
+ ***
32
+
33
+ ### persistence?
34
+
35
+ > `optional` **persistence**: `"app-wide"` \| `"closable"`
36
+
37
+ Defined in: packages/framework/esm-globals/dist/types.d.ts:310
38
+
39
+ In app-wide persistence mode, a workspace group renders its
40
+ action menu without a close button. This is for
41
+ workspace groups that are meant to be opened for the entire duration of the app
42
+
43
+ In closable persistence mode, a workspace group renders its
44
+ action menu with a close button. User may explicitly close the group, along
45
+ with any opened windows / workspaces.
@@ -2,23 +2,15 @@
2
2
 
3
3
  # Interface: WorkspaceWindowDefinition2
4
4
 
5
- Defined in: packages/framework/esm-globals/dist/types.d.ts:302
5
+ Defined in: packages/framework/esm-globals/dist/types.d.ts:312
6
6
 
7
7
  ## Properties
8
8
 
9
- ### canHide
9
+ ### canMaximize?
10
10
 
11
- > **canHide**: `boolean`
11
+ > `optional` **canMaximize**: `boolean`
12
12
 
13
- Defined in: packages/framework/esm-globals/dist/types.d.ts:305
14
-
15
- ***
16
-
17
- ### canMaximize
18
-
19
- > **canMaximize**: `boolean`
20
-
21
- Defined in: packages/framework/esm-globals/dist/types.d.ts:306
13
+ Defined in: packages/framework/esm-globals/dist/types.d.ts:315
22
14
 
23
15
  ***
24
16
 
@@ -26,7 +18,7 @@ Defined in: packages/framework/esm-globals/dist/types.d.ts:306
26
18
 
27
19
  > **group**: `string`
28
20
 
29
- Defined in: packages/framework/esm-globals/dist/types.d.ts:308
21
+ Defined in: packages/framework/esm-globals/dist/types.d.ts:316
30
22
 
31
23
  ***
32
24
 
@@ -34,7 +26,7 @@ Defined in: packages/framework/esm-globals/dist/types.d.ts:308
34
26
 
35
27
  > `optional` **icon**: `string`
36
28
 
37
- Defined in: packages/framework/esm-globals/dist/types.d.ts:304
29
+ Defined in: packages/framework/esm-globals/dist/types.d.ts:314
38
30
 
39
31
  ***
40
32
 
@@ -42,7 +34,7 @@ Defined in: packages/framework/esm-globals/dist/types.d.ts:304
42
34
 
43
35
  > **name**: `string`
44
36
 
45
- Defined in: packages/framework/esm-globals/dist/types.d.ts:303
37
+ Defined in: packages/framework/esm-globals/dist/types.d.ts:313
46
38
 
47
39
  ***
48
40
 
@@ -50,15 +42,7 @@ Defined in: packages/framework/esm-globals/dist/types.d.ts:303
50
42
 
51
43
  > `optional` **order**: `number`
52
44
 
53
- Defined in: packages/framework/esm-globals/dist/types.d.ts:309
54
-
55
- ***
56
-
57
- ### overlay
58
-
59
- > **overlay**: `boolean`
60
-
61
- Defined in: packages/framework/esm-globals/dist/types.d.ts:307
45
+ Defined in: packages/framework/esm-globals/dist/types.d.ts:317
62
46
 
63
47
  ***
64
48
 
@@ -66,4 +50,4 @@ Defined in: packages/framework/esm-globals/dist/types.d.ts:307
66
50
 
67
51
  > `optional` **width**: `"narrow"` \| `"wider"` \| `"extra-wide"`
68
52
 
69
- Defined in: packages/framework/esm-globals/dist/types.d.ts:310
53
+ Defined in: packages/framework/esm-globals/dist/types.d.ts:318
@@ -4,7 +4,7 @@
4
4
 
5
5
  > **ActionFunction**\<`T`\> = (`state`, ...`args`) => `Partial`\<`T`\>
6
6
 
7
- Defined in: [packages/framework/esm-react-utils/src/useStore.ts:6](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-react-utils/src/useStore.ts#L6)
7
+ Defined in: [packages/framework/esm-react-utils/src/useStore.ts:5](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-react-utils/src/useStore.ts#L5)
8
8
 
9
9
  ## Type Parameters
10
10
 
@@ -4,7 +4,7 @@
4
4
 
5
5
  > **Actions**\<`T`\> = (`store`) => `ActionFunctionsRecord`\<`T`\> \| `ActionFunctionsRecord`\<`T`\>
6
6
 
7
- Defined in: [packages/framework/esm-react-utils/src/useStore.ts:10](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-react-utils/src/useStore.ts#L10)
7
+ Defined in: [packages/framework/esm-react-utils/src/useStore.ts:9](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-react-utils/src/useStore.ts#L9)
8
8
 
9
9
  ## Type Parameters
10
10
 
@@ -4,7 +4,7 @@
4
4
 
5
5
  > **BoundActions**\<`T`, `A`\> = `A` *extends* `ActionFunctionsRecord`\<`T`\> ? `BindFunctionsIn`\<`A`\> : `A` *extends* (`store`) => `ActionFunctionsRecord`\<`T`\> ? `BindFunctionsIn`\<`ActionFunctionsRecord`\<`T`\>\> : `never`
6
6
 
7
- Defined in: [packages/framework/esm-react-utils/src/useStore.ts:12](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-react-utils/src/useStore.ts#L12)
7
+ Defined in: [packages/framework/esm-react-utils/src/useStore.ts:11](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-react-utils/src/useStore.ts#L11)
8
8
 
9
9
  ## Type Parameters
10
10
 
@@ -4,4 +4,4 @@
4
4
 
5
5
  > **NameUse** = `"usual"` \| `"official"` \| `"temp"` \| `"nickname"` \| `"anonymous"` \| `"old"` \| `"maiden"`
6
6
 
7
- Defined in: packages/framework/esm-globals/dist/types.d.ts:371
7
+ Defined in: packages/framework/esm-globals/dist/types.d.ts:379
@@ -4,7 +4,7 @@
4
4
 
5
5
  > **OpenmrsRoutes** = `Record`\<`string`, [`OpenmrsAppRoutes`](../interfaces/OpenmrsAppRoutes.md)\>
6
6
 
7
- Defined in: packages/framework/esm-globals/dist/types.d.ts:367
7
+ Defined in: packages/framework/esm-globals/dist/types.d.ts:375
8
8
 
9
9
  This interfaces describes the format of the overall routes.json loaded by the app shell.
10
10
  Basically, this is the same as the app routes, with each routes definition keyed by the app's name
@@ -4,7 +4,7 @@
4
4
 
5
5
  > **Workspace2Definition**\<`WorkspaceProps`, `WindowProps`, `GroupProps`\> = `React.FC`\<[`Workspace2DefinitionProps`](../interfaces/Workspace2DefinitionProps.md)\<`WorkspaceProps`, `WindowProps`, `GroupProps`\>\>
6
6
 
7
- Defined in: [packages/framework/esm-styleguide/src/workspaces2/workspace2.component.tsx:52](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/workspaces2/workspace2.component.tsx#L52)
7
+ Defined in: [packages/framework/esm-styleguide/src/workspaces2/workspace2.component.tsx:53](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/workspaces2/workspace2.component.tsx#L53)
8
8
 
9
9
  **`Experimental`**
10
10
 
@@ -4,7 +4,7 @@
4
4
 
5
5
  > `const` **Workspace2**: `React.FC`\<`Workspace2Props`\>
6
6
 
7
- Defined in: [packages/framework/esm-styleguide/src/workspaces2/workspace2.component.tsx:65](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/workspaces2/workspace2.component.tsx#L65)
7
+ Defined in: [packages/framework/esm-styleguide/src/workspaces2/workspace2.component.tsx:66](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/workspaces2/workspace2.component.tsx#L66)
8
8
 
9
9
  **`Experimental`**
10
10
 
package/mock-jest.tsx CHANGED
@@ -100,6 +100,7 @@ export const closeWorkspace = jest.fn();
100
100
  export const launchWorkspace = jest.fn();
101
101
  export const launchWorkspace2 = jest.fn();
102
102
  export const launchWorkspaceGroup = jest.fn();
103
+ export const closeWorkspaceGroup2 = jest.fn();
103
104
  export const navigateAndLaunchWorkspace = jest.fn();
104
105
  export const useWorkspaces = jest.fn();
105
106
 
package/mock.tsx CHANGED
@@ -101,6 +101,7 @@ export const closeWorkspace = vi.fn();
101
101
  export const launchWorkspace = vi.fn();
102
102
  export const launchWorkspace2 = vi.fn();
103
103
  export const launchWorkspaceGroup = vi.fn();
104
+ export const closeWorkspaceGroup2 = vi.fn();
104
105
  export const navigateAndLaunchWorkspace = vi.fn();
105
106
  export const useWorkspaces = vi.fn();
106
107