@openmrs/esm-framework 10.0.1-pre.5652 → 10.0.1-pre.5664
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.
- package/.turbo/turbo-build.log +1 -1
- package/docs/API.md +0 -14
- package/docs/functions/calculateInterpretation.md +2 -2
- package/docs/functions/normalizeInterpretation.md +3 -3
- package/docs/interfaces/FeatureFlagDefinition.md +4 -4
- package/docs/interfaces/NumericObservationProps.md +1 -1
- package/docs/interfaces/OpenmrsAppRoutes.md +11 -31
- package/docs/interfaces/OpenmrsRoutes.md +3 -3
- package/docs/interfaces/ResourceLoader.md +2 -2
- package/docs/interfaces/WorkspaceDefinition2.md +5 -5
- package/docs/interfaces/WorkspaceGroupDefinition2.md +6 -6
- package/docs/interfaces/WorkspaceWindowDefinition2.md +7 -7
- package/docs/type-aliases/NameUse.md +1 -1
- package/docs/type-aliases/PictogramId.md +1 -1
- package/docs/type-aliases/PictogramProps.md +3 -3
- package/docs/type-aliases/SvgPictogramProps.md +3 -3
- package/docs/variables/AppointmentsAltPictogram.md +1 -1
- package/docs/variables/AppointmentsPictogram.md +1 -1
- package/docs/variables/Assessment1Pictogram.md +1 -1
- package/docs/variables/Assessment2Pictogram.md +1 -1
- package/docs/variables/BloodBankPictogram.md +1 -1
- package/docs/variables/CardiologyPictogram.md +1 -1
- package/docs/variables/CtScanPictogram.md +1 -1
- package/docs/variables/DentistryPictogram.md +1 -1
- package/docs/variables/DigitalTrustPictogram.md +1 -1
- package/docs/variables/EmergencyDepartmentPictogram.md +1 -1
- package/docs/variables/FacilityPictogram.md +1 -1
- package/docs/variables/GeriatricsPictogram.md +1 -1
- package/docs/variables/GynaecologyPictogram.md +1 -1
- package/docs/variables/HomePictogram.md +1 -1
- package/docs/variables/InPatientPictogram.md +1 -1
- package/docs/variables/LaboratoryPictogram.md +1 -1
- package/docs/variables/Labs2Pictogram.md +1 -1
- package/docs/variables/MaybePictogram.md +1 -1
- package/docs/variables/MetadataExportPictogram.md +1 -1
- package/docs/variables/ObstetricsPictogram.md +1 -1
- package/docs/variables/PatientDocumentsPictogram.md +7 -0
- package/docs/variables/PatientListsPictogram.md +1 -1
- package/docs/variables/PatientSearchPictogram.md +1 -1
- package/docs/variables/PatientsPictogram.md +1 -1
- package/docs/variables/PaymentsDeskPictogram.md +1 -1
- package/docs/variables/Pharmacy2Pictogram.md +1 -1
- package/docs/variables/PharmacyPictogram.md +1 -1
- package/docs/variables/Pictogram.md +1 -1
- package/docs/variables/RegistrationPictogram.md +1 -1
- package/docs/variables/ServiceQueuesPictogram.md +1 -1
- package/docs/variables/StockManagementPictogram.md +1 -1
- package/docs/variables/TransferPictogram.md +1 -1
- package/docs/variables/TriagePictogram.md +1 -1
- package/docs/variables/XrayPictogram.md +1 -1
- package/docs/variables/pictogramIds.md +1 -1
- package/mock-jest.tsx +0 -7
- package/mock.tsx +0 -7
- package/package.json +19 -19
- package/docs/functions/WorkspaceContainer.md +0 -59
- package/docs/functions/closeWorkspace.md +0 -32
- package/docs/functions/launchWorkspace.md +0 -61
- package/docs/functions/launchWorkspaceGroup.md +0 -43
- package/docs/functions/navigateAndLaunchWorkspace.md +0 -48
- package/docs/functions/useWorkspaces.md +0 -16
- package/docs/interfaces/ActionMenuButtonProps.md +0 -67
- package/docs/interfaces/CloseWorkspaceOptions.md +0 -54
- package/docs/interfaces/DefaultWorkspaceProps.md +0 -113
- package/docs/interfaces/OpenWorkspace.md +0 -281
- package/docs/interfaces/Prompt.md +0 -53
- package/docs/interfaces/WorkspaceContainerProps.md +0 -64
- package/docs/interfaces/WorkspaceGroupDefinition.md +0 -25
- package/docs/interfaces/WorkspaceRegistration.md +0 -103
- package/docs/interfaces/WorkspacesInfo.md +0 -61
- package/docs/type-aliases/WorkspaceDefinition.md +0 -118
- package/docs/type-aliases/WorkspaceWindowState.md +0 -7
- package/docs/variables/ActionMenuButton.md +0 -12
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
[O3 Framework](../API.md) / CloseWorkspaceOptions
|
|
2
|
-
|
|
3
|
-
# Interface: CloseWorkspaceOptions
|
|
4
|
-
|
|
5
|
-
Defined in: [packages/framework/esm-styleguide/src/workspaces/workspaces.ts:15](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/workspaces/workspaces.ts#L15)
|
|
6
|
-
|
|
7
|
-
## Properties
|
|
8
|
-
|
|
9
|
-
### closeWorkspaceGroup?
|
|
10
|
-
|
|
11
|
-
> `optional` **closeWorkspaceGroup**: `boolean`
|
|
12
|
-
|
|
13
|
-
Defined in: [packages/framework/esm-styleguide/src/workspaces/workspaces.ts:37](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/workspaces/workspaces.ts#L37)
|
|
14
|
-
|
|
15
|
-
Controls whether the workspace group should be closed and store to be
|
|
16
|
-
cleared when this workspace is closed.
|
|
17
|
-
Defaults to true except when opening a new workspace of the same group.
|
|
18
|
-
|
|
19
|
-
#### Default
|
|
20
|
-
|
|
21
|
-
```ts
|
|
22
|
-
true
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
***
|
|
26
|
-
|
|
27
|
-
### ignoreChanges?
|
|
28
|
-
|
|
29
|
-
> `optional` **ignoreChanges**: `boolean`
|
|
30
|
-
|
|
31
|
-
Defined in: [packages/framework/esm-styleguide/src/workspaces/workspaces.ts:22](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/workspaces/workspaces.ts#L22)
|
|
32
|
-
|
|
33
|
-
Whether to close the workspace ignoring all the changes present in the workspace.
|
|
34
|
-
|
|
35
|
-
If ignoreChanges is true, the user will not be prompted to save changes before closing
|
|
36
|
-
even if the `testFcn` passed to `promptBeforeClosing` returns `true`.
|
|
37
|
-
|
|
38
|
-
***
|
|
39
|
-
|
|
40
|
-
### onWorkspaceClose()?
|
|
41
|
-
|
|
42
|
-
> `optional` **onWorkspaceClose**: () => `void`
|
|
43
|
-
|
|
44
|
-
Defined in: [packages/framework/esm-styleguide/src/workspaces/workspaces.ts:29](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/workspaces/workspaces.ts#L29)
|
|
45
|
-
|
|
46
|
-
If you want to take an action after the workspace is closed, you can pass your function as
|
|
47
|
-
`onWorkspaceClose`. This function will be called only after the workspace is closed, given
|
|
48
|
-
that the user might be shown a prompt.
|
|
49
|
-
|
|
50
|
-
#### Returns
|
|
51
|
-
|
|
52
|
-
`void`
|
|
53
|
-
|
|
54
|
-
void
|
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
[O3 Framework](../API.md) / DefaultWorkspaceProps
|
|
2
|
-
|
|
3
|
-
# Interface: DefaultWorkspaceProps
|
|
4
|
-
|
|
5
|
-
Defined in: [packages/framework/esm-styleguide/src/workspaces/workspaces.ts:41](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/workspaces/workspaces.ts#L41)
|
|
6
|
-
|
|
7
|
-
The default parameters received by all workspaces
|
|
8
|
-
|
|
9
|
-
## Extended by
|
|
10
|
-
|
|
11
|
-
- [`OpenWorkspace`](OpenWorkspace.md)
|
|
12
|
-
|
|
13
|
-
## Methods
|
|
14
|
-
|
|
15
|
-
### closeWorkspace()
|
|
16
|
-
|
|
17
|
-
> **closeWorkspace**(`closeWorkspaceOptions?`): `void`
|
|
18
|
-
|
|
19
|
-
Defined in: [packages/framework/esm-styleguide/src/workspaces/workspaces.ts:49](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/workspaces/workspaces.ts#L49)
|
|
20
|
-
|
|
21
|
-
Call this function to close the workspace. This function will prompt the user
|
|
22
|
-
if there are any unsaved changes to workspace.
|
|
23
|
-
|
|
24
|
-
You can pass `onWorkspaceClose` function to be called when the workspace is finally
|
|
25
|
-
closed, given the user forcefully closes the workspace.
|
|
26
|
-
|
|
27
|
-
#### Parameters
|
|
28
|
-
|
|
29
|
-
##### closeWorkspaceOptions?
|
|
30
|
-
|
|
31
|
-
[`CloseWorkspaceOptions`](CloseWorkspaceOptions.md)
|
|
32
|
-
|
|
33
|
-
#### Returns
|
|
34
|
-
|
|
35
|
-
`void`
|
|
36
|
-
|
|
37
|
-
***
|
|
38
|
-
|
|
39
|
-
### closeWorkspaceWithSavedChanges()
|
|
40
|
-
|
|
41
|
-
> **closeWorkspaceWithSavedChanges**(`closeWorkspaceOptions?`): `void`
|
|
42
|
-
|
|
43
|
-
Defined in: [packages/framework/esm-styleguide/src/workspaces/workspaces.ts:59](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/workspaces/workspaces.ts#L59)
|
|
44
|
-
|
|
45
|
-
Call this function to close the workspace after the form is saved. This function
|
|
46
|
-
will directly close the workspace without any prompt
|
|
47
|
-
|
|
48
|
-
#### Parameters
|
|
49
|
-
|
|
50
|
-
##### closeWorkspaceOptions?
|
|
51
|
-
|
|
52
|
-
[`CloseWorkspaceOptions`](CloseWorkspaceOptions.md)
|
|
53
|
-
|
|
54
|
-
#### Returns
|
|
55
|
-
|
|
56
|
-
`void`
|
|
57
|
-
|
|
58
|
-
***
|
|
59
|
-
|
|
60
|
-
### promptBeforeClosing()
|
|
61
|
-
|
|
62
|
-
> **promptBeforeClosing**(`testFcn`): `void`
|
|
63
|
-
|
|
64
|
-
Defined in: [packages/framework/esm-styleguide/src/workspaces/workspaces.ts:54](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/workspaces/workspaces.ts#L54)
|
|
65
|
-
|
|
66
|
-
Call this with a no-args function that returns true if the user should be prompted before
|
|
67
|
-
this workspace is closed; e.g. if there is unsaved data.
|
|
68
|
-
|
|
69
|
-
#### Parameters
|
|
70
|
-
|
|
71
|
-
##### testFcn
|
|
72
|
-
|
|
73
|
-
() => `boolean`
|
|
74
|
-
|
|
75
|
-
#### Returns
|
|
76
|
-
|
|
77
|
-
`void`
|
|
78
|
-
|
|
79
|
-
***
|
|
80
|
-
|
|
81
|
-
### setTitle()
|
|
82
|
-
|
|
83
|
-
> **setTitle**(`title`, `titleNode?`): `void`
|
|
84
|
-
|
|
85
|
-
Defined in: [packages/framework/esm-styleguide/src/workspaces/workspaces.ts:74](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/workspaces/workspaces.ts#L74)
|
|
86
|
-
|
|
87
|
-
Use this to set the workspace title if it needs to be set dynamically.
|
|
88
|
-
|
|
89
|
-
Workspace titles generally are set in the workspace declaration in the routes.json file. They can also
|
|
90
|
-
be set by the workspace launcher by passing `workspaceTitle` in the `additionalProps`
|
|
91
|
-
parameter of the `launchWorkspace` function. This function is useful when the workspace
|
|
92
|
-
title needs to be set dynamically.
|
|
93
|
-
|
|
94
|
-
#### Parameters
|
|
95
|
-
|
|
96
|
-
##### title
|
|
97
|
-
|
|
98
|
-
`string`
|
|
99
|
-
|
|
100
|
-
The title to set. If using titleNode, set this to a human-readable string
|
|
101
|
-
which will identify the workspace in notifications and other places.
|
|
102
|
-
|
|
103
|
-
##### titleNode?
|
|
104
|
-
|
|
105
|
-
`ReactNode`
|
|
106
|
-
|
|
107
|
-
A React object to put in the workspace header in place of the title. This
|
|
108
|
-
is useful for displaying custom elements in the header. Note that custom header
|
|
109
|
-
elements can also be attached to the workspace header extension slots.
|
|
110
|
-
|
|
111
|
-
#### Returns
|
|
112
|
-
|
|
113
|
-
`void`
|
|
@@ -1,281 +0,0 @@
|
|
|
1
|
-
[O3 Framework](../API.md) / OpenWorkspace
|
|
2
|
-
|
|
3
|
-
# Interface: OpenWorkspace
|
|
4
|
-
|
|
5
|
-
Defined in: [packages/framework/esm-styleguide/src/workspaces/workspaces.ts:113](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/workspaces/workspaces.ts#L113)
|
|
6
|
-
|
|
7
|
-
See [[WorkspaceDefinition]] for more information about these properties
|
|
8
|
-
|
|
9
|
-
## Extends
|
|
10
|
-
|
|
11
|
-
- [`WorkspaceRegistration`](WorkspaceRegistration.md).[`DefaultWorkspaceProps`](DefaultWorkspaceProps.md)
|
|
12
|
-
|
|
13
|
-
## Properties
|
|
14
|
-
|
|
15
|
-
### additionalProps
|
|
16
|
-
|
|
17
|
-
> **additionalProps**: `object`
|
|
18
|
-
|
|
19
|
-
Defined in: [packages/framework/esm-styleguide/src/workspaces/workspaces.ts:114](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/workspaces/workspaces.ts#L114)
|
|
20
|
-
|
|
21
|
-
***
|
|
22
|
-
|
|
23
|
-
### canHide
|
|
24
|
-
|
|
25
|
-
> **canHide**: `boolean`
|
|
26
|
-
|
|
27
|
-
Defined in: [packages/framework/esm-extensions/src/workspaces.ts:14](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-extensions/src/workspaces.ts#L14)
|
|
28
|
-
|
|
29
|
-
#### Inherited from
|
|
30
|
-
|
|
31
|
-
[`WorkspaceRegistration`](WorkspaceRegistration.md).[`canHide`](WorkspaceRegistration.md#canhide)
|
|
32
|
-
|
|
33
|
-
***
|
|
34
|
-
|
|
35
|
-
### canMaximize
|
|
36
|
-
|
|
37
|
-
> **canMaximize**: `boolean`
|
|
38
|
-
|
|
39
|
-
Defined in: [packages/framework/esm-extensions/src/workspaces.ts:15](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-extensions/src/workspaces.ts#L15)
|
|
40
|
-
|
|
41
|
-
#### Inherited from
|
|
42
|
-
|
|
43
|
-
[`WorkspaceRegistration`](WorkspaceRegistration.md).[`canMaximize`](WorkspaceRegistration.md#canmaximize)
|
|
44
|
-
|
|
45
|
-
***
|
|
46
|
-
|
|
47
|
-
### currentWorkspaceGroup?
|
|
48
|
-
|
|
49
|
-
> `optional` **currentWorkspaceGroup**: `string`
|
|
50
|
-
|
|
51
|
-
Defined in: [packages/framework/esm-styleguide/src/workspaces/workspaces.ts:115](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/workspaces/workspaces.ts#L115)
|
|
52
|
-
|
|
53
|
-
***
|
|
54
|
-
|
|
55
|
-
### groups
|
|
56
|
-
|
|
57
|
-
> **groups**: `string`[]
|
|
58
|
-
|
|
59
|
-
Defined in: [packages/framework/esm-extensions/src/workspaces.ts:20](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-extensions/src/workspaces.ts#L20)
|
|
60
|
-
|
|
61
|
-
#### Inherited from
|
|
62
|
-
|
|
63
|
-
[`WorkspaceRegistration`](WorkspaceRegistration.md).[`groups`](WorkspaceRegistration.md#groups)
|
|
64
|
-
|
|
65
|
-
***
|
|
66
|
-
|
|
67
|
-
### moduleName
|
|
68
|
-
|
|
69
|
-
> **moduleName**: `string`
|
|
70
|
-
|
|
71
|
-
Defined in: [packages/framework/esm-extensions/src/workspaces.ts:19](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-extensions/src/workspaces.ts#L19)
|
|
72
|
-
|
|
73
|
-
#### Inherited from
|
|
74
|
-
|
|
75
|
-
[`WorkspaceRegistration`](WorkspaceRegistration.md).[`moduleName`](WorkspaceRegistration.md#modulename)
|
|
76
|
-
|
|
77
|
-
***
|
|
78
|
-
|
|
79
|
-
### name
|
|
80
|
-
|
|
81
|
-
> **name**: `string`
|
|
82
|
-
|
|
83
|
-
Defined in: [packages/framework/esm-extensions/src/workspaces.ts:10](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-extensions/src/workspaces.ts#L10)
|
|
84
|
-
|
|
85
|
-
#### Inherited from
|
|
86
|
-
|
|
87
|
-
[`WorkspaceRegistration`](WorkspaceRegistration.md).[`name`](WorkspaceRegistration.md#name)
|
|
88
|
-
|
|
89
|
-
***
|
|
90
|
-
|
|
91
|
-
### preferredWindowSize
|
|
92
|
-
|
|
93
|
-
> **preferredWindowSize**: [`WorkspaceWindowState`](../type-aliases/WorkspaceWindowState.md)
|
|
94
|
-
|
|
95
|
-
Defined in: [packages/framework/esm-extensions/src/workspaces.ts:17](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-extensions/src/workspaces.ts#L17)
|
|
96
|
-
|
|
97
|
-
#### Inherited from
|
|
98
|
-
|
|
99
|
-
[`WorkspaceRegistration`](WorkspaceRegistration.md).[`preferredWindowSize`](WorkspaceRegistration.md#preferredwindowsize)
|
|
100
|
-
|
|
101
|
-
***
|
|
102
|
-
|
|
103
|
-
### title
|
|
104
|
-
|
|
105
|
-
> **title**: `string`
|
|
106
|
-
|
|
107
|
-
Defined in: [packages/framework/esm-extensions/src/workspaces.ts:11](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-extensions/src/workspaces.ts#L11)
|
|
108
|
-
|
|
109
|
-
#### Inherited from
|
|
110
|
-
|
|
111
|
-
[`WorkspaceRegistration`](WorkspaceRegistration.md).[`title`](WorkspaceRegistration.md#title)
|
|
112
|
-
|
|
113
|
-
***
|
|
114
|
-
|
|
115
|
-
### titleNode?
|
|
116
|
-
|
|
117
|
-
> `optional` **titleNode**: `ReactNode`
|
|
118
|
-
|
|
119
|
-
Defined in: [packages/framework/esm-extensions/src/workspaces.ts:12](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-extensions/src/workspaces.ts#L12)
|
|
120
|
-
|
|
121
|
-
#### Inherited from
|
|
122
|
-
|
|
123
|
-
[`WorkspaceRegistration`](WorkspaceRegistration.md).[`titleNode`](WorkspaceRegistration.md#titlenode)
|
|
124
|
-
|
|
125
|
-
***
|
|
126
|
-
|
|
127
|
-
### type
|
|
128
|
-
|
|
129
|
-
> **type**: `string`
|
|
130
|
-
|
|
131
|
-
Defined in: [packages/framework/esm-extensions/src/workspaces.ts:13](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-extensions/src/workspaces.ts#L13)
|
|
132
|
-
|
|
133
|
-
#### Inherited from
|
|
134
|
-
|
|
135
|
-
[`WorkspaceRegistration`](WorkspaceRegistration.md).[`type`](WorkspaceRegistration.md#type)
|
|
136
|
-
|
|
137
|
-
***
|
|
138
|
-
|
|
139
|
-
### width
|
|
140
|
-
|
|
141
|
-
> **width**: `"narrow"` \| `"wider"` \| `"extra-wide"`
|
|
142
|
-
|
|
143
|
-
Defined in: [packages/framework/esm-extensions/src/workspaces.ts:16](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-extensions/src/workspaces.ts#L16)
|
|
144
|
-
|
|
145
|
-
#### Inherited from
|
|
146
|
-
|
|
147
|
-
[`WorkspaceRegistration`](WorkspaceRegistration.md).[`width`](WorkspaceRegistration.md#width)
|
|
148
|
-
|
|
149
|
-
## Methods
|
|
150
|
-
|
|
151
|
-
### closeWorkspace()
|
|
152
|
-
|
|
153
|
-
> **closeWorkspace**(`closeWorkspaceOptions?`): `void`
|
|
154
|
-
|
|
155
|
-
Defined in: [packages/framework/esm-styleguide/src/workspaces/workspaces.ts:49](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/workspaces/workspaces.ts#L49)
|
|
156
|
-
|
|
157
|
-
Call this function to close the workspace. This function will prompt the user
|
|
158
|
-
if there are any unsaved changes to workspace.
|
|
159
|
-
|
|
160
|
-
You can pass `onWorkspaceClose` function to be called when the workspace is finally
|
|
161
|
-
closed, given the user forcefully closes the workspace.
|
|
162
|
-
|
|
163
|
-
#### Parameters
|
|
164
|
-
|
|
165
|
-
##### closeWorkspaceOptions?
|
|
166
|
-
|
|
167
|
-
[`CloseWorkspaceOptions`](CloseWorkspaceOptions.md)
|
|
168
|
-
|
|
169
|
-
#### Returns
|
|
170
|
-
|
|
171
|
-
`void`
|
|
172
|
-
|
|
173
|
-
#### Inherited from
|
|
174
|
-
|
|
175
|
-
[`DefaultWorkspaceProps`](DefaultWorkspaceProps.md).[`closeWorkspace`](DefaultWorkspaceProps.md#closeworkspace)
|
|
176
|
-
|
|
177
|
-
***
|
|
178
|
-
|
|
179
|
-
### closeWorkspaceWithSavedChanges()
|
|
180
|
-
|
|
181
|
-
> **closeWorkspaceWithSavedChanges**(`closeWorkspaceOptions?`): `void`
|
|
182
|
-
|
|
183
|
-
Defined in: [packages/framework/esm-styleguide/src/workspaces/workspaces.ts:59](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/workspaces/workspaces.ts#L59)
|
|
184
|
-
|
|
185
|
-
Call this function to close the workspace after the form is saved. This function
|
|
186
|
-
will directly close the workspace without any prompt
|
|
187
|
-
|
|
188
|
-
#### Parameters
|
|
189
|
-
|
|
190
|
-
##### closeWorkspaceOptions?
|
|
191
|
-
|
|
192
|
-
[`CloseWorkspaceOptions`](CloseWorkspaceOptions.md)
|
|
193
|
-
|
|
194
|
-
#### Returns
|
|
195
|
-
|
|
196
|
-
`void`
|
|
197
|
-
|
|
198
|
-
#### Inherited from
|
|
199
|
-
|
|
200
|
-
[`DefaultWorkspaceProps`](DefaultWorkspaceProps.md).[`closeWorkspaceWithSavedChanges`](DefaultWorkspaceProps.md#closeworkspacewithsavedchanges)
|
|
201
|
-
|
|
202
|
-
***
|
|
203
|
-
|
|
204
|
-
### load()
|
|
205
|
-
|
|
206
|
-
> **load**(): `Promise`\<`LifeCycles`\>
|
|
207
|
-
|
|
208
|
-
Defined in: [packages/framework/esm-extensions/src/workspaces.ts:18](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-extensions/src/workspaces.ts#L18)
|
|
209
|
-
|
|
210
|
-
#### Returns
|
|
211
|
-
|
|
212
|
-
`Promise`\<`LifeCycles`\>
|
|
213
|
-
|
|
214
|
-
#### Inherited from
|
|
215
|
-
|
|
216
|
-
[`WorkspaceRegistration`](WorkspaceRegistration.md).[`load`](WorkspaceRegistration.md#load)
|
|
217
|
-
|
|
218
|
-
***
|
|
219
|
-
|
|
220
|
-
### promptBeforeClosing()
|
|
221
|
-
|
|
222
|
-
> **promptBeforeClosing**(`testFcn`): `void`
|
|
223
|
-
|
|
224
|
-
Defined in: [packages/framework/esm-styleguide/src/workspaces/workspaces.ts:54](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/workspaces/workspaces.ts#L54)
|
|
225
|
-
|
|
226
|
-
Call this with a no-args function that returns true if the user should be prompted before
|
|
227
|
-
this workspace is closed; e.g. if there is unsaved data.
|
|
228
|
-
|
|
229
|
-
#### Parameters
|
|
230
|
-
|
|
231
|
-
##### testFcn
|
|
232
|
-
|
|
233
|
-
() => `boolean`
|
|
234
|
-
|
|
235
|
-
#### Returns
|
|
236
|
-
|
|
237
|
-
`void`
|
|
238
|
-
|
|
239
|
-
#### Inherited from
|
|
240
|
-
|
|
241
|
-
[`DefaultWorkspaceProps`](DefaultWorkspaceProps.md).[`promptBeforeClosing`](DefaultWorkspaceProps.md#promptbeforeclosing)
|
|
242
|
-
|
|
243
|
-
***
|
|
244
|
-
|
|
245
|
-
### setTitle()
|
|
246
|
-
|
|
247
|
-
> **setTitle**(`title`, `titleNode?`): `void`
|
|
248
|
-
|
|
249
|
-
Defined in: [packages/framework/esm-styleguide/src/workspaces/workspaces.ts:74](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/workspaces/workspaces.ts#L74)
|
|
250
|
-
|
|
251
|
-
Use this to set the workspace title if it needs to be set dynamically.
|
|
252
|
-
|
|
253
|
-
Workspace titles generally are set in the workspace declaration in the routes.json file. They can also
|
|
254
|
-
be set by the workspace launcher by passing `workspaceTitle` in the `additionalProps`
|
|
255
|
-
parameter of the `launchWorkspace` function. This function is useful when the workspace
|
|
256
|
-
title needs to be set dynamically.
|
|
257
|
-
|
|
258
|
-
#### Parameters
|
|
259
|
-
|
|
260
|
-
##### title
|
|
261
|
-
|
|
262
|
-
`string`
|
|
263
|
-
|
|
264
|
-
The title to set. If using titleNode, set this to a human-readable string
|
|
265
|
-
which will identify the workspace in notifications and other places.
|
|
266
|
-
|
|
267
|
-
##### titleNode?
|
|
268
|
-
|
|
269
|
-
`ReactNode`
|
|
270
|
-
|
|
271
|
-
A React object to put in the workspace header in place of the title. This
|
|
272
|
-
is useful for displaying custom elements in the header. Note that custom header
|
|
273
|
-
elements can also be attached to the workspace header extension slots.
|
|
274
|
-
|
|
275
|
-
#### Returns
|
|
276
|
-
|
|
277
|
-
`void`
|
|
278
|
-
|
|
279
|
-
#### Inherited from
|
|
280
|
-
|
|
281
|
-
[`DefaultWorkspaceProps`](DefaultWorkspaceProps.md).[`setTitle`](DefaultWorkspaceProps.md#settitle)
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
[O3 Framework](../API.md) / Prompt
|
|
2
|
-
|
|
3
|
-
# Interface: Prompt
|
|
4
|
-
|
|
5
|
-
Defined in: [packages/framework/esm-styleguide/src/workspaces/workspaces.ts:91](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/workspaces/workspaces.ts#L91)
|
|
6
|
-
|
|
7
|
-
## Properties
|
|
8
|
-
|
|
9
|
-
### body
|
|
10
|
-
|
|
11
|
-
> **body**: `string`
|
|
12
|
-
|
|
13
|
-
Defined in: [packages/framework/esm-styleguide/src/workspaces/workspaces.ts:93](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/workspaces/workspaces.ts#L93)
|
|
14
|
-
|
|
15
|
-
***
|
|
16
|
-
|
|
17
|
-
### cancelText?
|
|
18
|
-
|
|
19
|
-
> `optional` **cancelText**: `string`
|
|
20
|
-
|
|
21
|
-
Defined in: [packages/framework/esm-styleguide/src/workspaces/workspaces.ts:98](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/workspaces/workspaces.ts#L98)
|
|
22
|
-
|
|
23
|
-
Defaults to "Cancel"
|
|
24
|
-
|
|
25
|
-
***
|
|
26
|
-
|
|
27
|
-
### confirmText?
|
|
28
|
-
|
|
29
|
-
> `optional` **confirmText**: `string`
|
|
30
|
-
|
|
31
|
-
Defined in: [packages/framework/esm-styleguide/src/workspaces/workspaces.ts:95](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/workspaces/workspaces.ts#L95)
|
|
32
|
-
|
|
33
|
-
Defaults to "Confirm"
|
|
34
|
-
|
|
35
|
-
***
|
|
36
|
-
|
|
37
|
-
### title
|
|
38
|
-
|
|
39
|
-
> **title**: `string`
|
|
40
|
-
|
|
41
|
-
Defined in: [packages/framework/esm-styleguide/src/workspaces/workspaces.ts:92](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/workspaces/workspaces.ts#L92)
|
|
42
|
-
|
|
43
|
-
## Methods
|
|
44
|
-
|
|
45
|
-
### onConfirm()
|
|
46
|
-
|
|
47
|
-
> **onConfirm**(): `void`
|
|
48
|
-
|
|
49
|
-
Defined in: [packages/framework/esm-styleguide/src/workspaces/workspaces.ts:96](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/workspaces/workspaces.ts#L96)
|
|
50
|
-
|
|
51
|
-
#### Returns
|
|
52
|
-
|
|
53
|
-
`void`
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
[O3 Framework](../API.md) / WorkspaceContainerProps
|
|
2
|
-
|
|
3
|
-
# Interface: ~~WorkspaceContainerProps~~
|
|
4
|
-
|
|
5
|
-
Defined in: [packages/framework/esm-styleguide/src/workspaces/container/workspace-container.component.tsx:18](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/workspaces/container/workspace-container.component.tsx#L18)
|
|
6
|
-
|
|
7
|
-
## Deprecated
|
|
8
|
-
|
|
9
|
-
Workspace container is no longer needed with workspace v2.
|
|
10
|
-
|
|
11
|
-
## Properties
|
|
12
|
-
|
|
13
|
-
### ~~actionMenuProps?~~
|
|
14
|
-
|
|
15
|
-
> `optional` **actionMenuProps**: `Record`\<`string`, `unknown`\>
|
|
16
|
-
|
|
17
|
-
Defined in: [packages/framework/esm-styleguide/src/workspaces/container/workspace-container.component.tsx:37](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/workspaces/container/workspace-container.component.tsx#L37)
|
|
18
|
-
|
|
19
|
-
Props to pass to the action menu component.
|
|
20
|
-
|
|
21
|
-
***
|
|
22
|
-
|
|
23
|
-
### ~~additionalWorkspaceProps?~~
|
|
24
|
-
|
|
25
|
-
> `optional` **additionalWorkspaceProps**: `object`
|
|
26
|
-
|
|
27
|
-
Defined in: [packages/framework/esm-styleguide/src/workspaces/container/workspace-container.component.tsx:35](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/workspaces/container/workspace-container.component.tsx#L35)
|
|
28
|
-
|
|
29
|
-
Additional props to pass to the workspace. Using this is unusual; you will generally
|
|
30
|
-
want to pass props to the workspace when you open it using `launchWorkspace`. Use this
|
|
31
|
-
only for props that will apply to every workspace launched on the page where this
|
|
32
|
-
component is mounted.
|
|
33
|
-
|
|
34
|
-
***
|
|
35
|
-
|
|
36
|
-
### ~~contextKey~~
|
|
37
|
-
|
|
38
|
-
> **contextKey**: `string`
|
|
39
|
-
|
|
40
|
-
Defined in: [packages/framework/esm-styleguide/src/workspaces/container/workspace-container.component.tsx:24](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/workspaces/container/workspace-container.component.tsx#L24)
|
|
41
|
-
|
|
42
|
-
The context key is a path element that identifies the pages on which workspaces should
|
|
43
|
-
appear. Defined to ensure workspaces do not stay open when navigating between pages.
|
|
44
|
-
Must be a valid sub-path of the URL, with no initial or trailing slash.
|
|
45
|
-
|
|
46
|
-
***
|
|
47
|
-
|
|
48
|
-
### ~~overlay?~~
|
|
49
|
-
|
|
50
|
-
> `optional` **overlay**: `boolean`
|
|
51
|
-
|
|
52
|
-
Defined in: [packages/framework/esm-styleguide/src/workspaces/container/workspace-container.component.tsx:26](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/workspaces/container/workspace-container.component.tsx#L26)
|
|
53
|
-
|
|
54
|
-
When true, renders the workspace as an overlay instead of a side panel window.
|
|
55
|
-
|
|
56
|
-
***
|
|
57
|
-
|
|
58
|
-
### ~~showSiderailAndBottomNav?~~
|
|
59
|
-
|
|
60
|
-
> `optional` **showSiderailAndBottomNav**: `boolean`
|
|
61
|
-
|
|
62
|
-
Defined in: [packages/framework/esm-styleguide/src/workspaces/container/workspace-container.component.tsx:28](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/workspaces/container/workspace-container.component.tsx#L28)
|
|
63
|
-
|
|
64
|
-
When true, renders the Siderail (desktop) or Bottom Nav (tablet/mobile) action menu.
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
[O3 Framework](../API.md) / WorkspaceGroupDefinition
|
|
2
|
-
|
|
3
|
-
# Interface: WorkspaceGroupDefinition
|
|
4
|
-
|
|
5
|
-
Defined in: [packages/framework/esm-globals/src/types.ts:267](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-globals/src/types.ts#L267)
|
|
6
|
-
|
|
7
|
-
## Properties
|
|
8
|
-
|
|
9
|
-
### members?
|
|
10
|
-
|
|
11
|
-
> `optional` **members**: `string`[]
|
|
12
|
-
|
|
13
|
-
Defined in: [packages/framework/esm-globals/src/types.ts:275](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-globals/src/types.ts#L275)
|
|
14
|
-
|
|
15
|
-
List of workspace names which are part of the workspace group.
|
|
16
|
-
|
|
17
|
-
***
|
|
18
|
-
|
|
19
|
-
### name
|
|
20
|
-
|
|
21
|
-
> **name**: `string`
|
|
22
|
-
|
|
23
|
-
Defined in: [packages/framework/esm-globals/src/types.ts:271](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-globals/src/types.ts#L271)
|
|
24
|
-
|
|
25
|
-
Name of the workspace group. This is used to launch the workspace group
|