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

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.
@@ -4,7 +4,7 @@
4
4
 
5
5
  > **WorkspaceDefinition** = `object`
6
6
 
7
- Defined in: packages/framework/esm-globals/dist/types.d.ts:231
7
+ Defined in: packages/framework/esm-globals/dist/types.d.ts:229
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:247
17
+ Defined in: packages/framework/esm-globals/dist/types.d.ts:245
18
18
 
19
19
  ***
20
20
 
@@ -22,7 +22,7 @@ Defined in: packages/framework/esm-globals/dist/types.d.ts:247
22
22
 
23
23
  > `optional` **canMaximize**: `boolean`
24
24
 
25
- Defined in: packages/framework/esm-globals/dist/types.d.ts:248
25
+ Defined in: packages/framework/esm-globals/dist/types.d.ts:246
26
26
 
27
27
  ***
28
28
 
@@ -30,7 +30,7 @@ Defined in: packages/framework/esm-globals/dist/types.d.ts:248
30
30
 
31
31
  > **component**: `string`
32
32
 
33
- Defined in: packages/framework/esm-globals/dist/types.d.ts:283
33
+ Defined in: packages/framework/esm-globals/dist/types.d.ts:281
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:279
43
+ Defined in: packages/framework/esm-globals/dist/types.d.ts:277
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:235
71
+ Defined in: packages/framework/esm-globals/dist/types.d.ts:233
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:258
81
+ Defined in: packages/framework/esm-globals/dist/types.d.ts:256
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:240
91
+ Defined in: packages/framework/esm-globals/dist/types.d.ts:238
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:246
102
+ Defined in: packages/framework/esm-globals/dist/types.d.ts:244
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:254
114
+ Defined in: packages/framework/esm-globals/dist/types.d.ts:252
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:227
7
+ Defined in: packages/framework/esm-globals/dist/types.d.ts:225
@@ -0,0 +1,17 @@
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.
@@ -0,0 +1,12 @@
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.
package/mock-jest.tsx CHANGED
@@ -93,6 +93,7 @@ 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();
96
97
  export const launchWorkspaceGroup = jest.fn();
97
98
  export const navigateAndLaunchWorkspace = jest.fn();
98
99
  export const useWorkspaces = jest.fn();
package/mock.tsx CHANGED
@@ -94,6 +94,7 @@ 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();
97
98
  export const launchWorkspaceGroup = vi.fn();
98
99
  export const navigateAndLaunchWorkspace = vi.fn();
99
100
  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.3258",
3
+ "version": "7.0.1-pre.3273",
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.3258",
63
- "@openmrs/esm-config": "7.0.1-pre.3258",
64
- "@openmrs/esm-context": "7.0.1-pre.3258",
65
- "@openmrs/esm-dynamic-loading": "7.0.1-pre.3258",
66
- "@openmrs/esm-emr-api": "7.0.1-pre.3258",
67
- "@openmrs/esm-error-handling": "7.0.1-pre.3258",
68
- "@openmrs/esm-expression-evaluator": "7.0.1-pre.3258",
69
- "@openmrs/esm-extensions": "7.0.1-pre.3258",
70
- "@openmrs/esm-feature-flags": "7.0.1-pre.3258",
71
- "@openmrs/esm-globals": "7.0.1-pre.3258",
72
- "@openmrs/esm-navigation": "7.0.1-pre.3258",
73
- "@openmrs/esm-offline": "7.0.1-pre.3258",
74
- "@openmrs/esm-react-utils": "7.0.1-pre.3258",
75
- "@openmrs/esm-routes": "7.0.1-pre.3258",
76
- "@openmrs/esm-state": "7.0.1-pre.3258",
77
- "@openmrs/esm-styleguide": "7.0.1-pre.3258",
78
- "@openmrs/esm-translations": "7.0.1-pre.3258",
79
- "@openmrs/esm-utils": "7.0.1-pre.3258"
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"
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.3258",
92
+ "@openmrs/typedoc-plugin-file-categories": "7.0.1-pre.3273",
93
93
  "@rspack/cli": "^1.3.11",
94
94
  "@rspack/core": "^1.3.11",
95
95
  "concurrently": "^9.1.2",