@openmrs/esm-framework 7.0.1-pre.3273 → 7.0.1-pre.3274

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.
@@ -17,7 +17,7 @@ invalid key to this function will result in a type error.
17
17
 
18
18
  ### key
19
19
 
20
- `"error"` | `"delete"` | `"actions"` | `"address"` | `"age"` | `"cancel"` | `"change"` | `"Clinic"` | `"close"` | `"confirm"` | `"contactAdministratorIfIssuePersists"` | `"contactDetails"` | `"edit"` | `"errorCopy"` | `"female"` | `"loading"` | `"male"` | `"other"` | `"patientIdentifierSticker"` | `"patientLists"` | `"print"` | `"printError"` | `"printErrorExplainer"` | `"printIdentifierSticker"` | `"printing"` | `"relationships"` | `"resetOverrides"` | `"save"` | `"scriptLoadingFailed"` | `"scriptLoadingError"` | `"seeMoreLists"` | `"sex"` | `"showLess"` | `"showMore"` | `"toggleDevTools"` | `"unknown"` | `"closeWorkspaces2PromptTitle"` | `"closeWorkspaces2PromptBody"` | `"closeAllOpenedWorkspaces"` | `"closingAllWorkspacesPromptBody"` | `"closingAllWorkspacesPromptTitle"` | `"discard"` | `"hide"` | `"maximize"` | `"minimize"` | `"openAnyway"` | `"unsavedChangesInOpenedWorkspace"` | `"unsavedChangesInWorkspace"` | `"unsavedChangesTitleText"` | `"workspaceHeader"` | `"address1"` | `"address2"` | `"address3"` | `"address4"` | `"address5"` | `"address6"` | `"city"` | `"cityVillage"` | `"country"` | `"countyDistrict"` | `"district"` | `"postalCode"` | `"state"` | `"stateProvince"`
20
+ `"error"` | `"delete"` | `"actions"` | `"address"` | `"age"` | `"cancel"` | `"change"` | `"Clinic"` | `"close"` | `"confirm"` | `"contactAdministratorIfIssuePersists"` | `"contactDetails"` | `"edit"` | `"errorCopy"` | `"female"` | `"loading"` | `"male"` | `"other"` | `"patientIdentifierSticker"` | `"patientLists"` | `"print"` | `"printError"` | `"printErrorExplainer"` | `"printIdentifierSticker"` | `"printing"` | `"relationships"` | `"resetOverrides"` | `"save"` | `"scriptLoadingFailed"` | `"scriptLoadingError"` | `"seeMoreLists"` | `"sex"` | `"showLess"` | `"showMore"` | `"toggleDevTools"` | `"unknown"` | `"closeAllOpenedWorkspaces"` | `"closingAllWorkspacesPromptBody"` | `"closingAllWorkspacesPromptTitle"` | `"discard"` | `"hide"` | `"maximize"` | `"minimize"` | `"openAnyway"` | `"unsavedChangesInOpenedWorkspace"` | `"unsavedChangesInWorkspace"` | `"unsavedChangesTitleText"` | `"workspaceHeader"` | `"address1"` | `"address2"` | `"address3"` | `"address4"` | `"address5"` | `"address6"` | `"city"` | `"cityVillage"` | `"country"` | `"countyDistrict"` | `"district"` | `"postalCode"` | `"state"` | `"stateProvince"`
21
21
 
22
22
  ### defaultText?
23
23
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  # Interface: WorkspaceGroupDefinition
4
4
 
5
- Defined in: packages/framework/esm-globals/dist/types.d.ts:283
5
+ Defined in: packages/framework/esm-globals/dist/types.d.ts:285
6
6
 
7
7
  ## Properties
8
8
 
@@ -10,7 +10,7 @@ Defined in: packages/framework/esm-globals/dist/types.d.ts:283
10
10
 
11
11
  > `optional` **members**: `string`[]
12
12
 
13
- Defined in: packages/framework/esm-globals/dist/types.d.ts:291
13
+ Defined in: packages/framework/esm-globals/dist/types.d.ts:293
14
14
 
15
15
  List of workspace names which are part of the workspace group.
16
16
 
@@ -20,6 +20,6 @@ List of workspace names which are part of the workspace group.
20
20
 
21
21
  > **name**: `string`
22
22
 
23
- Defined in: packages/framework/esm-globals/dist/types.d.ts:287
23
+ Defined in: packages/framework/esm-globals/dist/types.d.ts:289
24
24
 
25
25
  Name of the workspace group. This is used to launch the workspace group
@@ -2,28 +2,12 @@
2
2
 
3
3
  # Interface: WorkspaceGroupDefinition2
4
4
 
5
- Defined in: packages/framework/esm-globals/dist/types.d.ts:293
6
-
7
- ## Properties
8
-
9
- ### closeable?
10
-
11
- > `optional` **closeable**: `boolean`
12
-
13
5
  Defined in: packages/framework/esm-globals/dist/types.d.ts:295
14
6
 
15
- ***
7
+ ## Properties
16
8
 
17
9
  ### name
18
10
 
19
11
  > **name**: `string`
20
12
 
21
- Defined in: packages/framework/esm-globals/dist/types.d.ts:294
22
-
23
- ***
24
-
25
- ### overlay?
26
-
27
- > `optional` **overlay**: `boolean`
28
-
29
13
  Defined in: packages/framework/esm-globals/dist/types.d.ts:296
@@ -4,7 +4,7 @@
4
4
 
5
5
  > **ExtensionDefinition** = `object`
6
6
 
7
- Defined in: packages/framework/esm-globals/dist/types.d.ts:168
7
+ Defined in: packages/framework/esm-globals/dist/types.d.ts:170
8
8
 
9
9
  A definition of an extension as extracted from an app's routes.json
10
10
 
@@ -14,7 +14,7 @@ A definition of an extension as extracted from an app's routes.json
14
14
 
15
15
  > **component**: `string`
16
16
 
17
- Defined in: packages/framework/esm-globals/dist/types.d.ts:210
17
+ Defined in: packages/framework/esm-globals/dist/types.d.ts:212
18
18
 
19
19
  The name of the component exported by this frontend module.
20
20
 
@@ -24,7 +24,7 @@ The name of the component exported by this frontend module.
24
24
 
25
25
  > `optional` **featureFlag**: `string`
26
26
 
27
- Defined in: packages/framework/esm-globals/dist/types.d.ts:200
27
+ Defined in: packages/framework/esm-globals/dist/types.d.ts:202
28
28
 
29
29
  If supplied, the extension will only be rendered when this feature flag is enabled.
30
30
 
@@ -34,7 +34,7 @@ If supplied, the extension will only be rendered when this feature flag is enabl
34
34
 
35
35
  > `optional` **meta**: `object`
36
36
 
37
- Defined in: packages/framework/esm-globals/dist/types.d.ts:204
37
+ Defined in: packages/framework/esm-globals/dist/types.d.ts:206
38
38
 
39
39
  Meta describes any properties that are passed down to the extension when it is loaded
40
40
 
@@ -48,7 +48,7 @@ Meta describes any properties that are passed down to the extension when it is l
48
48
 
49
49
  > **name**: `string`
50
50
 
51
- Defined in: packages/framework/esm-globals/dist/types.d.ts:172
51
+ Defined in: packages/framework/esm-globals/dist/types.d.ts:174
52
52
 
53
53
  The name of this extension. This is used to refer to the extension in configuration.
54
54
 
@@ -58,7 +58,7 @@ The name of this extension. This is used to refer to the extension in configurat
58
58
 
59
59
  > `optional` **offline**: `boolean`
60
60
 
61
- Defined in: packages/framework/esm-globals/dist/types.d.ts:188
61
+ Defined in: packages/framework/esm-globals/dist/types.d.ts:190
62
62
 
63
63
  Determines whether the component renders while the browser is not connected to the internet. If false, this page will never render while offline.
64
64
 
@@ -68,7 +68,7 @@ Determines whether the component renders while the browser is not connected to t
68
68
 
69
69
  > `optional` **online**: `boolean`
70
70
 
71
- Defined in: packages/framework/esm-globals/dist/types.d.ts:184
71
+ Defined in: packages/framework/esm-globals/dist/types.d.ts:186
72
72
 
73
73
  Determines whether the component renders while the browser is connected to the internet. If false, this page will never render while online.
74
74
 
@@ -78,7 +78,7 @@ Determines whether the component renders while the browser is connected to the i
78
78
 
79
79
  > `optional` **order**: `number`
80
80
 
81
- Defined in: packages/framework/esm-globals/dist/types.d.ts:192
81
+ Defined in: packages/framework/esm-globals/dist/types.d.ts:194
82
82
 
83
83
  Determines the order in which this component renders in its default extension slot. Note that this can be overridden by configuration.
84
84
 
@@ -88,7 +88,7 @@ Determines the order in which this component renders in its default extension sl
88
88
 
89
89
  > `optional` **privileges**: `string` \| `string`[]
90
90
 
91
- Defined in: packages/framework/esm-globals/dist/types.d.ts:196
91
+ Defined in: packages/framework/esm-globals/dist/types.d.ts:198
92
92
 
93
93
  The user must have ANY of these privileges to see this extension.
94
94
 
@@ -98,7 +98,7 @@ The user must have ANY of these privileges to see this extension.
98
98
 
99
99
  > `optional` **slot**: `string`
100
100
 
101
- Defined in: packages/framework/esm-globals/dist/types.d.ts:176
101
+ Defined in: packages/framework/esm-globals/dist/types.d.ts:178
102
102
 
103
103
  If supplied, the slot that this extension is rendered into by default.
104
104
 
@@ -108,6 +108,6 @@ If supplied, the slot that this extension is rendered into by default.
108
108
 
109
109
  > `optional` **slots**: `string`[]
110
110
 
111
- Defined in: packages/framework/esm-globals/dist/types.d.ts:180
111
+ Defined in: packages/framework/esm-globals/dist/types.d.ts:182
112
112
 
113
113
  If supplied, the slots that this extension is rendered into by default.
@@ -4,7 +4,7 @@
4
4
 
5
5
  > **ModalDefinition** = `object`
6
6
 
7
- Defined in: packages/framework/esm-globals/dist/types.d.ts:215
7
+ Defined in: packages/framework/esm-globals/dist/types.d.ts:217
8
8
 
9
9
  A definition of a modal as extracted from an app's routes.json
10
10
 
@@ -14,7 +14,7 @@ A definition of a modal as extracted from an app's routes.json
14
14
 
15
15
  > **component**: `string`
16
16
 
17
- Defined in: packages/framework/esm-globals/dist/types.d.ts:223
17
+ Defined in: packages/framework/esm-globals/dist/types.d.ts:225
18
18
 
19
19
  The name of the component exported by this frontend module.
20
20
 
@@ -24,6 +24,6 @@ The name of the component exported by this frontend module.
24
24
 
25
25
  > **name**: `string`
26
26
 
27
- Defined in: packages/framework/esm-globals/dist/types.d.ts:219
27
+ Defined in: packages/framework/esm-globals/dist/types.d.ts:221
28
28
 
29
29
  The name of this modal. This is used to launch the modal.
@@ -16,12 +16,6 @@ A definition of a page extracted from an app's routes.json
16
16
 
17
17
  The name of the component exported by this frontend module.
18
18
 
19
- ### containerDomId?
20
-
21
- > `optional` **containerDomId**: `string`
22
-
23
- If supplied, the page will be rendered within the DOM element with the specified ID. Defaults to "omrs-apps-container" if not supplied.
24
-
25
19
  ### featureFlag?
26
20
 
27
21
  > `optional` **featureFlag**: `string`
@@ -39,3 +33,9 @@ Determines whether the component renders while the browser is not connected to t
39
33
  > `optional` **online**: `boolean`
40
34
 
41
35
  Determines whether the component renders while the browser is connected to the internet. If false, this page will never render while online.
36
+
37
+ ### order?
38
+
39
+ > `optional` **order**: `number`
40
+
41
+ Determines the order in which this page is rendered in the app-shell, which is useful for situations where DOM ordering matters.
@@ -4,7 +4,7 @@
4
4
 
5
5
  > **WorkspaceDefinition** = `object`
6
6
 
7
- Defined in: packages/framework/esm-globals/dist/types.d.ts:229
7
+ Defined in: packages/framework/esm-globals/dist/types.d.ts:231
8
8
 
9
9
  A definition of a workspace as extracted from an app's routes.json
10
10
 
@@ -14,7 +14,7 @@ A definition of a workspace as extracted from an app's routes.json
14
14
 
15
15
  > `optional` **canHide**: `boolean`
16
16
 
17
- Defined in: packages/framework/esm-globals/dist/types.d.ts:245
17
+ Defined in: packages/framework/esm-globals/dist/types.d.ts:247
18
18
 
19
19
  ***
20
20
 
@@ -22,7 +22,7 @@ Defined in: packages/framework/esm-globals/dist/types.d.ts:245
22
22
 
23
23
  > `optional` **canMaximize**: `boolean`
24
24
 
25
- Defined in: packages/framework/esm-globals/dist/types.d.ts:246
25
+ Defined in: packages/framework/esm-globals/dist/types.d.ts:248
26
26
 
27
27
  ***
28
28
 
@@ -30,7 +30,7 @@ Defined in: packages/framework/esm-globals/dist/types.d.ts:246
30
30
 
31
31
  > **component**: `string`
32
32
 
33
- Defined in: packages/framework/esm-globals/dist/types.d.ts:281
33
+ Defined in: packages/framework/esm-globals/dist/types.d.ts:283
34
34
 
35
35
  The name of the component exported by this frontend module.
36
36
 
@@ -40,7 +40,7 @@ The name of the component exported by this frontend module.
40
40
 
41
41
  > **groups**: `string`[]
42
42
 
43
- Defined in: packages/framework/esm-globals/dist/types.d.ts:277
43
+ Defined in: packages/framework/esm-globals/dist/types.d.ts:279
44
44
 
45
45
  Workspaces can open either independently or as part of a "workspace group". A
46
46
  "workspace group" groups related workspaces together, so that only one is visible
@@ -68,7 +68,7 @@ name, the entire workspace group will close, and the new workspace will launch i
68
68
 
69
69
  > **name**: `string`
70
70
 
71
- Defined in: packages/framework/esm-globals/dist/types.d.ts:233
71
+ Defined in: packages/framework/esm-globals/dist/types.d.ts:235
72
72
 
73
73
  The name of this workspace. This is used to launch the workspace.
74
74
 
@@ -78,7 +78,7 @@ The name of this workspace. This is used to launch the workspace.
78
78
 
79
79
  > `optional` **preferredWindowSize**: [`WorkspaceWindowState`](WorkspaceWindowState.md)
80
80
 
81
- Defined in: packages/framework/esm-globals/dist/types.d.ts:256
81
+ Defined in: packages/framework/esm-globals/dist/types.d.ts:258
82
82
 
83
83
  Launches the workspace in the preferred size, it defaults to the 'narrow' width
84
84
 
@@ -88,7 +88,7 @@ Launches the workspace in the preferred size, it defaults to the 'narrow' width
88
88
 
89
89
  > **title**: `string`
90
90
 
91
- Defined in: packages/framework/esm-globals/dist/types.d.ts:238
91
+ Defined in: packages/framework/esm-globals/dist/types.d.ts:240
92
92
 
93
93
  The title of the workspace. This will be looked up as a key in the translations of the module
94
94
  defining the workspace.
@@ -99,7 +99,7 @@ defining the workspace.
99
99
 
100
100
  > **type**: `string`
101
101
 
102
- Defined in: packages/framework/esm-globals/dist/types.d.ts:244
102
+ Defined in: packages/framework/esm-globals/dist/types.d.ts:246
103
103
 
104
104
  The type of the workspace. Only one of each "type" of workspace is allowed to be open at a
105
105
  time. The default is "form". If the right sidebar is in use, then the type determines which
@@ -111,7 +111,7 @@ right sidebar icon corresponds to the workspace.
111
111
 
112
112
  > `optional` **width**: `"narrow"` \| `"wider"` \| `"extra-wide"`
113
113
 
114
- Defined in: packages/framework/esm-globals/dist/types.d.ts:252
114
+ Defined in: packages/framework/esm-globals/dist/types.d.ts:254
115
115
 
116
116
  Controls the width of the workspace. The default is "narrow" and this should only be
117
117
  changed to "wider" if the workspace itself has internal navigation, like the form editor.
@@ -4,4 +4,4 @@
4
4
 
5
5
  > **WorkspaceWindowState** = `"maximized"` \| `"hidden"` \| `"normal"`
6
6
 
7
- Defined in: packages/framework/esm-globals/dist/types.d.ts:225
7
+ Defined in: packages/framework/esm-globals/dist/types.d.ts:227
package/mock-jest.tsx CHANGED
@@ -93,7 +93,6 @@ export const ActionMenu = jest.fn(() => <div>Action Menu</div>);
93
93
  export const WorkspaceContainer = jest.fn(() => <div>Workspace Container</div>);
94
94
  export const closeWorkspace = jest.fn();
95
95
  export const launchWorkspace = jest.fn();
96
- export const launchWorkspace2 = jest.fn();
97
96
  export const launchWorkspaceGroup = jest.fn();
98
97
  export const navigateAndLaunchWorkspace = jest.fn();
99
98
  export const useWorkspaces = jest.fn();
package/mock.tsx CHANGED
@@ -94,7 +94,6 @@ export const ActionMenu = vi.fn(() => <div>Action Menu</div>);
94
94
  export const WorkspaceContainer = vi.fn(() => <div>Workspace Container</div>);
95
95
  export const closeWorkspace = vi.fn();
96
96
  export const launchWorkspace = vi.fn();
97
- export const launchWorkspace2 = vi.fn();
98
97
  export const launchWorkspaceGroup = vi.fn();
99
98
  export const navigateAndLaunchWorkspace = vi.fn();
100
99
  export const useWorkspaces = vi.fn();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openmrs/esm-framework",
3
- "version": "7.0.1-pre.3273",
3
+ "version": "7.0.1-pre.3274",
4
4
  "license": "MPL-2.0",
5
5
  "type": "module",
6
6
  "module": "dist/openmrs-esm-framework.js",
@@ -59,24 +59,24 @@
59
59
  "access": "public"
60
60
  },
61
61
  "dependencies": {
62
- "@openmrs/esm-api": "7.0.1-pre.3273",
63
- "@openmrs/esm-config": "7.0.1-pre.3273",
64
- "@openmrs/esm-context": "7.0.1-pre.3273",
65
- "@openmrs/esm-dynamic-loading": "7.0.1-pre.3273",
66
- "@openmrs/esm-emr-api": "7.0.1-pre.3273",
67
- "@openmrs/esm-error-handling": "7.0.1-pre.3273",
68
- "@openmrs/esm-expression-evaluator": "7.0.1-pre.3273",
69
- "@openmrs/esm-extensions": "7.0.1-pre.3273",
70
- "@openmrs/esm-feature-flags": "7.0.1-pre.3273",
71
- "@openmrs/esm-globals": "7.0.1-pre.3273",
72
- "@openmrs/esm-navigation": "7.0.1-pre.3273",
73
- "@openmrs/esm-offline": "7.0.1-pre.3273",
74
- "@openmrs/esm-react-utils": "7.0.1-pre.3273",
75
- "@openmrs/esm-routes": "7.0.1-pre.3273",
76
- "@openmrs/esm-state": "7.0.1-pre.3273",
77
- "@openmrs/esm-styleguide": "7.0.1-pre.3273",
78
- "@openmrs/esm-translations": "7.0.1-pre.3273",
79
- "@openmrs/esm-utils": "7.0.1-pre.3273"
62
+ "@openmrs/esm-api": "7.0.1-pre.3274",
63
+ "@openmrs/esm-config": "7.0.1-pre.3274",
64
+ "@openmrs/esm-context": "7.0.1-pre.3274",
65
+ "@openmrs/esm-dynamic-loading": "7.0.1-pre.3274",
66
+ "@openmrs/esm-emr-api": "7.0.1-pre.3274",
67
+ "@openmrs/esm-error-handling": "7.0.1-pre.3274",
68
+ "@openmrs/esm-expression-evaluator": "7.0.1-pre.3274",
69
+ "@openmrs/esm-extensions": "7.0.1-pre.3274",
70
+ "@openmrs/esm-feature-flags": "7.0.1-pre.3274",
71
+ "@openmrs/esm-globals": "7.0.1-pre.3274",
72
+ "@openmrs/esm-navigation": "7.0.1-pre.3274",
73
+ "@openmrs/esm-offline": "7.0.1-pre.3274",
74
+ "@openmrs/esm-react-utils": "7.0.1-pre.3274",
75
+ "@openmrs/esm-routes": "7.0.1-pre.3274",
76
+ "@openmrs/esm-state": "7.0.1-pre.3274",
77
+ "@openmrs/esm-styleguide": "7.0.1-pre.3274",
78
+ "@openmrs/esm-translations": "7.0.1-pre.3274",
79
+ "@openmrs/esm-utils": "7.0.1-pre.3274"
80
80
  },
81
81
  "peerDependencies": {
82
82
  "dayjs": "1.x",
@@ -89,7 +89,7 @@
89
89
  "swr": "2.x"
90
90
  },
91
91
  "devDependencies": {
92
- "@openmrs/typedoc-plugin-file-categories": "7.0.1-pre.3273",
92
+ "@openmrs/typedoc-plugin-file-categories": "7.0.1-pre.3274",
93
93
  "@rspack/cli": "^1.3.11",
94
94
  "@rspack/core": "^1.3.11",
95
95
  "concurrently": "^9.1.2",
@@ -1,17 +0,0 @@
1
- [O3 Framework](../API.md) / closeWorkspaceGroup2
2
-
3
- # Function: closeWorkspaceGroup2()
4
-
5
- > **closeWorkspaceGroup2**(): `Promise`\<`boolean`\>
6
-
7
- Defined in: [packages/framework/esm-styleguide/src/workspaces2/workspace2.ts:66](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/workspaces2/workspace2.ts#L66)
8
-
9
- Closes the workspace group that is currently opened. Note that only one workspace group
10
- may be opened at any given time
11
-
12
- ## Returns
13
-
14
- `Promise`\<`boolean`\>
15
-
16
- a Promise that resolves to true if there is no opened group to begin with or we successfully closed
17
- the opened group; false otherwise.
@@ -1,77 +0,0 @@
1
- [O3 Framework](../API.md) / launchWorkspace2
2
-
3
- # Function: launchWorkspace2()
4
-
5
- > **launchWorkspace2**\<`WorkspaceProps`, `WindowProps`, `GroupProp`\>(`workspaceName`, `workspaceProps`, `windowProps`, `groupProps`): `Promise`\<`boolean`\>
6
-
7
- Defined in: [packages/framework/esm-styleguide/src/workspaces2/workspace2.ts:123](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/workspaces2/workspace2.ts#L123)
8
-
9
- Attempts to launch the specified workspace with the given workspace props. This also implicitly opens
10
- the workspace window to which the workspace belongs (if it's not opened already),
11
- and the workspace group to which the window belongs (if it's not opened already).
12
-
13
- When calling `launchWorkspace2`, we need to also pass in the workspace props. While not required,
14
- we can also pass in the window props (shared by other workspaces in the window) and the group props
15
- (shared by all windows and their workspaces). Omitting the window props or the group props¹ means the caller
16
- explicitly does not care what the current window props and group props are, and that they may be set
17
- by other actions (like calling `launchWorkspace2` on a different workspace with those props passed in)
18
- at a later time.
19
-
20
- If there is already an opened workspace group, and it's not the group the workspace belongs to
21
- or has incompatible² group props, then we prompt the user to close the group (and its windows and their workspaces).
22
- On user confirm, the existing opened group is closed and the new workspace, along with its window and its group,
23
- is opened.
24
-
25
- If the window is already opened, but with incompatible window props, we prompt the user to close
26
- the window (and all its opened workspaces), and reopen the window with (only) the newly requested workspace.
27
-
28
- If the workspace is already opened, but with incompatible workspace props, we also prompt the user to close
29
- the **window** (and all its opened workspaces), and reopen the window with (only) the newly requested workspace.
30
- This is true regardless of whether the already opened workspace has any child workspaces.
31
-
32
- Note that calling this function *never* results in creating a child workspace in the affected window.
33
- To do so, we need to call `launchChildWorkspace` instead.
34
-
35
- [¹] Omitting window or group props is useful for workspaces that don't have ties to the window or group "context" (props).
36
- For example, in the patient chart, the visit notes / clinical forms / order basket action menu button all share
37
- a "group context" of the current visit. However, the "patient list" action menu button does not need to share that group
38
- context, so opening that workspace should not need to cause other workspaces / windows / groups to potentially close.
39
- The "patient search" workspace in the queues and ward apps is another example.
40
-
41
- [²] 2 sets of props are compatible if either one is nullish, or if they are shallow equal.
42
-
43
- ## Type Parameters
44
-
45
- ### WorkspaceProps
46
-
47
- `WorkspaceProps` *extends* `Record`\<`string`, `any`\>
48
-
49
- ### WindowProps
50
-
51
- `WindowProps` *extends* `Record`\<`string`, `any`\>
52
-
53
- ### GroupProp
54
-
55
- `GroupProp` *extends* `Record`\<`string`, `any`\>
56
-
57
- ## Parameters
58
-
59
- ### workspaceName
60
-
61
- `string`
62
-
63
- ### workspaceProps
64
-
65
- `null` | `WorkspaceProps`
66
-
67
- ### windowProps
68
-
69
- `null` | `WindowProps`
70
-
71
- ### groupProps
72
-
73
- `null` | `GroupProp`
74
-
75
- ## Returns
76
-
77
- `Promise`\<`boolean`\>
@@ -1,38 +0,0 @@
1
- [O3 Framework](../API.md) / launchWorkspaceGroup2
2
-
3
- # Function: launchWorkspaceGroup2()
4
-
5
- > **launchWorkspaceGroup2**\<`GroupProps`\>(`groupName`, `groupProps`): `Promise`\<`boolean`\>
6
-
7
- Defined in: [packages/framework/esm-styleguide/src/workspaces2/workspace2.ts:27](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/workspaces2/workspace2.ts#L27)
8
-
9
- Attempts to launch the specified workspace group with the given group props. Note that only one workspace group
10
- may be opened at any given time. If a workspace group is already opened, calling `launchWorkspaceGroup2` with
11
- either a different group name, or same group name but different incompatible props**, will result in prompting to
12
- confirm closing workspaces. If the user confirms, the opened group, along with its windows (and their workspaces), is closed, and
13
- the requested group is immediately opened.
14
-
15
- ** 2 sets of props are compatible if either one is nullish, or if they are shallow equal.
16
-
17
- ## Type Parameters
18
-
19
- ### GroupProps
20
-
21
- `GroupProps` *extends* `Record`\<`string`, `any`\>
22
-
23
- ## Parameters
24
-
25
- ### groupName
26
-
27
- `string`
28
-
29
- ### groupProps
30
-
31
- `null` | `GroupProps`
32
-
33
- ## Returns
34
-
35
- `Promise`\<`boolean`\>
36
-
37
- a Promise that resolves to true if the specified workspace group with the specified group props
38
- is successfully opened, or that it already is opened.
@@ -1,21 +0,0 @@
1
- [O3 Framework](../API.md) / Workspace2Definition
2
-
3
- # Type Alias: Workspace2Definition\<WorkspaceProps, WindowProps, GroupProps\>
4
-
5
- > **Workspace2Definition**\<`WorkspaceProps`, `WindowProps`, `GroupProps`\> = `React.FC`\<`Workspace2DefinitionProps`\<`WorkspaceProps`, `WindowProps`, `GroupProps`\>\>
6
-
7
- 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)
8
-
9
- ## Type Parameters
10
-
11
- ### WorkspaceProps
12
-
13
- `WorkspaceProps` *extends* `Record`\<`string`, `any`\>
14
-
15
- ### WindowProps
16
-
17
- `WindowProps` *extends* `Record`\<`string`, `any`\>
18
-
19
- ### GroupProps
20
-
21
- `GroupProps` *extends* `Record`\<`string`, `any`\>
@@ -1,17 +0,0 @@
1
- [O3 Framework](../API.md) / ActionMenuButton2
2
-
3
- # Variable: ActionMenuButton2
4
-
5
- > `const` **ActionMenuButton2**: `React.FC`\<`ActionMenuButtonProps2`\>
6
-
7
- Defined in: [packages/framework/esm-styleguide/src/workspaces2/action-menu2/action-menu-button2.component.tsx:64](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/workspaces2/action-menu2/action-menu-button2.component.tsx#L64)
8
-
9
- The ActionMenuButton2 component is used to render a button in the action menu of a workspace group.
10
- The button is associated with a specific workspace window, defined in routes.json of the app with the button.
11
- When one or more workspaces within the window are opened, the button will be highlighted.
12
- If the window is hidden, either `tagContent` (if defined) or an exclamation mark will be displayed
13
- on top of the icon.
14
-
15
- On clicked, The button either:
16
- 1. restores the workspace window if it is opened and hidden; or
17
- 2. launch a workspace from within that window, if the window is not opened.
@@ -1,12 +0,0 @@
1
- [O3 Framework](../API.md) / Workspace2
2
-
3
- # Variable: Workspace2
4
-
5
- > `const` **Workspace2**: `React.FC`\<`Workspace2Props`\>
6
-
7
- Defined in: [packages/framework/esm-styleguide/src/workspaces2/workspace2.component.tsx:59](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/workspaces2/workspace2.component.tsx#L59)
8
-
9
- The Workspace2 component is used as a top-level container to render
10
- its children as content within a workspace. When creating a workspace
11
- component, `<Workspace2>` should be the top-level component returned,
12
- wrapping all of the workspace content.