@openmrs/esm-framework 5.6.1-pre.1955 → 5.6.1-pre.1966
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
CHANGED
package/docs/API.md
CHANGED
|
@@ -180,6 +180,7 @@
|
|
|
180
180
|
|
|
181
181
|
### Other Functions
|
|
182
182
|
|
|
183
|
+
- [WorkspaceContainer](API.md#workspacecontainer)
|
|
183
184
|
- [isOnline](API.md#isonline)
|
|
184
185
|
|
|
185
186
|
### Store Functions
|
|
@@ -5295,6 +5296,64 @@ ___
|
|
|
5295
5296
|
|
|
5296
5297
|
## Other Functions
|
|
5297
5298
|
|
|
5299
|
+
### WorkspaceContainer
|
|
5300
|
+
|
|
5301
|
+
▸ **WorkspaceContainer**(`__namedParameters`): `Element`
|
|
5302
|
+
|
|
5303
|
+
Use this component to render the [workspace window](https://zeroheight.com/23a080e38/p/483a22-workspace)
|
|
5304
|
+
in an app such as the patient chart, or a workspace overlay in an app such as the clinic dashboard.
|
|
5305
|
+
This allows workspaces to be opened on the page where this component is mounted. This component
|
|
5306
|
+
must not be mounted multiple times on the same page. If there are multiple apps on a page, only
|
|
5307
|
+
one of those apps should use this component—it "hosts" the workspaces.
|
|
5308
|
+
|
|
5309
|
+
Workspaces may be opened with the [launchWorkspace](API.md#launchworkspace) function from `@openmrs/esm-framework`
|
|
5310
|
+
(among other options).
|
|
5311
|
+
|
|
5312
|
+
The `overlay` prop determines whether the workspace is rendered as an overlay or a window.
|
|
5313
|
+
When a workspace window is opened, the other content on the screen will be pushed to the left.
|
|
5314
|
+
When an overlay is opened, it will cover other content on the screen.
|
|
5315
|
+
|
|
5316
|
+
The context key is a string that appears in the URL, which defines the pages on which workspaces
|
|
5317
|
+
are valid. If the URL changes in a way such that it no longer contains the context key, then
|
|
5318
|
+
all workspaces will be closed. This ensures that, for example, workspaces on the home page do
|
|
5319
|
+
not stay open when the user transitions to the patient dashboard; and also that workspaces do
|
|
5320
|
+
not stay open when the user navigates to a different patient. The context key must be a valid
|
|
5321
|
+
sub-path of the URL, with no initial or trailing slash. So if the URL is
|
|
5322
|
+
`https://example.com/patient/123/foo`, then `patient` and `patient/123` and `123/foo` are valid
|
|
5323
|
+
context keys, but `patient/12` and `pati` are not.
|
|
5324
|
+
|
|
5325
|
+
An extension slot is provided in the workspace header. Its name is derived from the `featureName` of
|
|
5326
|
+
the top-level component in which it is defined (feature names are generally provided in the lifecycle
|
|
5327
|
+
functions in an app's `index.ts` file). The slot is named `workspace-header-${featureName}-slot`.
|
|
5328
|
+
For the patient chart, this is `workspace-header-patient-chart-slot`.
|
|
5329
|
+
|
|
5330
|
+
This component also provides the [Siderail and Bottom Nav](https://zeroheight.com/23a080e38/p/948cf1-siderail-and-bottom-nav/b/86907e).
|
|
5331
|
+
To use this, pass the `showSiderailAndBottomNav` prop. The Siderail is rendered on the right side of the screen
|
|
5332
|
+
on desktop, and the Bottom Nav is rendered at the bottom of the screen on tablet or mobile. The sidebar/bottom-nav
|
|
5333
|
+
menu provides an extension slot, to which buttons are attached as extensions. The slot
|
|
5334
|
+
derives its name from the `featureName` of the top-level component in which this `WorkspaceContainer`
|
|
5335
|
+
appears (feature names are generally provided in the lifecycle functions in an app's `index.ts` file).
|
|
5336
|
+
The slot is named `action-menu-${featureName}-items-slot`. For the patient chart, this is
|
|
5337
|
+
`action-menu-patient-chart-items-slot`.
|
|
5338
|
+
|
|
5339
|
+
This component also provides everything needed for workspace notifications to be rendered.
|
|
5340
|
+
|
|
5341
|
+
#### Parameters
|
|
5342
|
+
|
|
5343
|
+
| Name | Type |
|
|
5344
|
+
| :------ | :------ |
|
|
5345
|
+
| `__namedParameters` | [`WorkspaceContainerProps`](interfaces/WorkspaceContainerProps.md) |
|
|
5346
|
+
|
|
5347
|
+
#### Returns
|
|
5348
|
+
|
|
5349
|
+
`Element`
|
|
5350
|
+
|
|
5351
|
+
#### Defined in
|
|
5352
|
+
|
|
5353
|
+
[packages/framework/esm-styleguide/src/workspaces/container/workspace-container.component.tsx:59](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/workspaces/container/workspace-container.component.tsx#L59)
|
|
5354
|
+
|
|
5355
|
+
___
|
|
5356
|
+
|
|
5298
5357
|
### isOnline
|
|
5299
5358
|
|
|
5300
5359
|
▸ **isOnline**(`online?`): `boolean`
|
|
@@ -6716,25 +6775,17 @@ ___
|
|
|
6716
6775
|
|
|
6717
6776
|
### ActionMenu
|
|
6718
6777
|
|
|
6719
|
-
▸ **ActionMenu**():
|
|
6778
|
+
▸ **ActionMenu**(): `Element`
|
|
6720
6779
|
|
|
6721
|
-
|
|
6722
|
-
collectively known as the Action Menu. The Siderail is rendered on the right side of the screen
|
|
6723
|
-
on desktop, and the Bottom Nav is rendered at the bottom of the screen on tablet or mobile.
|
|
6724
|
-
|
|
6725
|
-
The action menu provides an extension slot, to which buttons are attached as extensions. The slot
|
|
6726
|
-
derives its name from the `featureName` of the top-level component in which this `ActionMenu`
|
|
6727
|
-
appears (feature names are generally provided in the lifecycle functions in an app's `index.ts` file).
|
|
6728
|
-
The slot is named `action-menu-${featureName}-items-slot`. For the patient chart, this is
|
|
6729
|
-
`action-menu-patient-chart-items-slot`.
|
|
6780
|
+
**`deprecated`** Use `WorkspaceContainer` instead
|
|
6730
6781
|
|
|
6731
6782
|
#### Returns
|
|
6732
6783
|
|
|
6733
|
-
|
|
6784
|
+
`Element`
|
|
6734
6785
|
|
|
6735
6786
|
#### Defined in
|
|
6736
6787
|
|
|
6737
|
-
[packages/framework/esm-styleguide/src/workspaces/
|
|
6788
|
+
[packages/framework/esm-styleguide/src/workspaces/container/action-menu.component.tsx:10](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/workspaces/container/action-menu.component.tsx#L10)
|
|
6738
6789
|
|
|
6739
6790
|
___
|
|
6740
6791
|
|
|
@@ -6742,28 +6793,7 @@ ___
|
|
|
6742
6793
|
|
|
6743
6794
|
▸ **WorkspaceOverlay**(`__namedParameters`): `Element`
|
|
6744
6795
|
|
|
6745
|
-
Use
|
|
6746
|
-
a way of rendering workspaces that will cover other content on the screen, rather than
|
|
6747
|
-
pushing it to the left (as with [WorkspaceWindow](API.md#workspacewindow)). As described in the
|
|
6748
|
-
[ZeroHeight](https://zeroheight.com/23a080e38/p/483a22-workspace/t/34e1a1) documentation,
|
|
6749
|
-
this should be used on "app pages" such as the Clinic Dashboard.
|
|
6750
|
-
|
|
6751
|
-
The context key is a string that appears in the URL, which defines the pages on which workspaces
|
|
6752
|
-
are valid. If the URL changes in a way such that it no longer contains the context key, then
|
|
6753
|
-
all workspaces will be closed. This ensures that, for example, workspaces on the home page do
|
|
6754
|
-
not stay open when the user transitions to the patient dashboard; and also that workspaces do
|
|
6755
|
-
not stay open when the user navigates to a different patient. The context key must be a valid
|
|
6756
|
-
sub-path of the URL, with no initial or trailing slash. So if the URL is
|
|
6757
|
-
`https://example.com/patient/123/foo`, then `patient` and `patient/123` and `123/foo` are valid
|
|
6758
|
-
context keys, but `patient/12` and `pati` are not.
|
|
6759
|
-
|
|
6760
|
-
Workspaces may be opened with the [launchWorkspace](API.md#launchworkspace) function from `@openmrs/esm-framework`
|
|
6761
|
-
(among other options).
|
|
6762
|
-
|
|
6763
|
-
This component also provides everything needed for workspace notifications to be rendered.
|
|
6764
|
-
|
|
6765
|
-
This component does not include the action menu (the right siderail). The [ActionMenu](API.md#actionmenu) component
|
|
6766
|
-
is provided separately.
|
|
6796
|
+
**`deprecated`** Use `WorkspaceContainer` instead
|
|
6767
6797
|
|
|
6768
6798
|
#### Parameters
|
|
6769
6799
|
|
|
@@ -6777,7 +6807,7 @@ is provided separately.
|
|
|
6777
6807
|
|
|
6778
6808
|
#### Defined in
|
|
6779
6809
|
|
|
6780
|
-
[packages/framework/esm-styleguide/src/workspaces/
|
|
6810
|
+
[packages/framework/esm-styleguide/src/workspaces/container/workspace-overlay.component.tsx:21](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/workspaces/container/workspace-overlay.component.tsx#L21)
|
|
6781
6811
|
|
|
6782
6812
|
___
|
|
6783
6813
|
|
|
@@ -6785,31 +6815,7 @@ ___
|
|
|
6785
6815
|
|
|
6786
6816
|
▸ **WorkspaceWindow**(`__namedParameters`): `Element`
|
|
6787
6817
|
|
|
6788
|
-
Use
|
|
6789
|
-
in an app such as the patient chart.
|
|
6790
|
-
When a workspace is opened, the other content on the screen will be pushed to the left.
|
|
6791
|
-
|
|
6792
|
-
The context key is a string that appears in the URL, which defines the pages on which workspaces
|
|
6793
|
-
are valid. If the URL changes in a way such that it no longer contains the context key, then
|
|
6794
|
-
all workspaces will be closed. This ensures that, for example, workspaces on the home page do
|
|
6795
|
-
not stay open when the user transitions to the patient dashboard; and also that workspaces do
|
|
6796
|
-
not stay open when the user navigates to a different patient. The context key must be a valid
|
|
6797
|
-
sub-path of the URL, with no initial or trailing slash. So if the URL is
|
|
6798
|
-
`https://example.com/patient/123/foo`, then `patient` and `patient/123` and `123/foo` are valid
|
|
6799
|
-
context keys, but `patient/12` and `pati` are not.
|
|
6800
|
-
|
|
6801
|
-
Workspaces may be opened with the [launchWorkspace](API.md#launchworkspace) function from `@openmrs/esm-framework`
|
|
6802
|
-
(among other options).
|
|
6803
|
-
|
|
6804
|
-
This component also provides everything needed for workspace notifications to be rendered.
|
|
6805
|
-
|
|
6806
|
-
This component does not include the action menu (the right siderail). The [ActionMenu](API.md#actionmenu) component
|
|
6807
|
-
is provided separately.
|
|
6808
|
-
|
|
6809
|
-
An extension slot is provided in the workspace header. Its name is derived from the `featureName` of
|
|
6810
|
-
the top-level component in which it is defined (feature names are generally provided in the lifecycle
|
|
6811
|
-
functions in an app's `index.ts` file). The slot is named `workspace-header-${featureName}-slot`.
|
|
6812
|
-
For the patient chart, this is `workspace-header-patient-chart-slot`.
|
|
6818
|
+
**`deprecated`** Use `WorkspaceContainer` instead
|
|
6813
6819
|
|
|
6814
6820
|
#### Parameters
|
|
6815
6821
|
|
|
@@ -6823,7 +6829,7 @@ For the patient chart, this is `workspace-header-patient-chart-slot`.
|
|
|
6823
6829
|
|
|
6824
6830
|
#### Defined in
|
|
6825
6831
|
|
|
6826
|
-
[packages/framework/esm-styleguide/src/workspaces/
|
|
6832
|
+
[packages/framework/esm-styleguide/src/workspaces/container/workspace-window.component.tsx:22](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/workspaces/container/workspace-window.component.tsx#L22)
|
|
6827
6833
|
|
|
6828
6834
|
___
|
|
6829
6835
|
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
[@openmrs/esm-framework](../API.md) / WorkspaceContainerProps
|
|
2
|
+
|
|
3
|
+
# Interface: WorkspaceContainerProps
|
|
4
|
+
|
|
5
|
+
## Table of contents
|
|
6
|
+
|
|
7
|
+
### Properties
|
|
8
|
+
|
|
9
|
+
- [additionalWorkspaceProps](WorkspaceContainerProps.md#additionalworkspaceprops)
|
|
10
|
+
- [contextKey](WorkspaceContainerProps.md#contextkey)
|
|
11
|
+
- [overlay](WorkspaceContainerProps.md#overlay)
|
|
12
|
+
- [showSiderailAndBottomNav](WorkspaceContainerProps.md#showsiderailandbottomnav)
|
|
13
|
+
|
|
14
|
+
## Properties
|
|
15
|
+
|
|
16
|
+
### additionalWorkspaceProps
|
|
17
|
+
|
|
18
|
+
• `Optional` **additionalWorkspaceProps**: `object`
|
|
19
|
+
|
|
20
|
+
#### Defined in
|
|
21
|
+
|
|
22
|
+
[packages/framework/esm-styleguide/src/workspaces/container/workspace-container.component.tsx:11](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/workspaces/container/workspace-container.component.tsx#L11)
|
|
23
|
+
|
|
24
|
+
___
|
|
25
|
+
|
|
26
|
+
### contextKey
|
|
27
|
+
|
|
28
|
+
• **contextKey**: `string`
|
|
29
|
+
|
|
30
|
+
#### Defined in
|
|
31
|
+
|
|
32
|
+
[packages/framework/esm-styleguide/src/workspaces/container/workspace-container.component.tsx:8](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/workspaces/container/workspace-container.component.tsx#L8)
|
|
33
|
+
|
|
34
|
+
___
|
|
35
|
+
|
|
36
|
+
### overlay
|
|
37
|
+
|
|
38
|
+
• `Optional` **overlay**: `boolean`
|
|
39
|
+
|
|
40
|
+
#### Defined in
|
|
41
|
+
|
|
42
|
+
[packages/framework/esm-styleguide/src/workspaces/container/workspace-container.component.tsx:9](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/workspaces/container/workspace-container.component.tsx#L9)
|
|
43
|
+
|
|
44
|
+
___
|
|
45
|
+
|
|
46
|
+
### showSiderailAndBottomNav
|
|
47
|
+
|
|
48
|
+
• `Optional` **showSiderailAndBottomNav**: `boolean`
|
|
49
|
+
|
|
50
|
+
#### Defined in
|
|
51
|
+
|
|
52
|
+
[packages/framework/esm-styleguide/src/workspaces/container/workspace-container.component.tsx:10](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/workspaces/container/workspace-container.component.tsx#L10)
|
|
@@ -6,14 +6,25 @@
|
|
|
6
6
|
|
|
7
7
|
### Workspace Properties
|
|
8
8
|
|
|
9
|
+
- [additionalWorkspaceProps](WorkspaceOverlayProps.md#additionalworkspaceprops)
|
|
9
10
|
- [contextKey](WorkspaceOverlayProps.md#contextkey)
|
|
10
11
|
|
|
11
12
|
## Workspace Properties
|
|
12
13
|
|
|
14
|
+
### additionalWorkspaceProps
|
|
15
|
+
|
|
16
|
+
• `Optional` **additionalWorkspaceProps**: `object`
|
|
17
|
+
|
|
18
|
+
#### Defined in
|
|
19
|
+
|
|
20
|
+
[packages/framework/esm-styleguide/src/workspaces/container/workspace-overlay.component.tsx:15](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/workspaces/container/workspace-overlay.component.tsx#L15)
|
|
21
|
+
|
|
22
|
+
___
|
|
23
|
+
|
|
13
24
|
### contextKey
|
|
14
25
|
|
|
15
26
|
• **contextKey**: `string`
|
|
16
27
|
|
|
17
28
|
#### Defined in
|
|
18
29
|
|
|
19
|
-
[packages/framework/esm-styleguide/src/workspaces/
|
|
30
|
+
[packages/framework/esm-styleguide/src/workspaces/container/workspace-overlay.component.tsx:14](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/workspaces/container/workspace-overlay.component.tsx#L14)
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
|
|
18
18
|
#### Defined in
|
|
19
19
|
|
|
20
|
-
[packages/framework/esm-styleguide/src/workspaces/
|
|
20
|
+
[packages/framework/esm-styleguide/src/workspaces/container/workspace-window.component.tsx:16](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/workspaces/container/workspace-window.component.tsx#L16)
|
|
21
21
|
|
|
22
22
|
___
|
|
23
23
|
|
|
@@ -27,4 +27,4 @@ ___
|
|
|
27
27
|
|
|
28
28
|
#### Defined in
|
|
29
29
|
|
|
30
|
-
[packages/framework/esm-styleguide/src/workspaces/
|
|
30
|
+
[packages/framework/esm-styleguide/src/workspaces/container/workspace-window.component.tsx:15](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/workspaces/container/workspace-window.component.tsx#L15)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openmrs/esm-framework",
|
|
3
|
-
"version": "5.6.1-pre.
|
|
3
|
+
"version": "5.6.1-pre.1966",
|
|
4
4
|
"license": "MPL-2.0",
|
|
5
5
|
"browser": "dist/openmrs-esm-framework.js",
|
|
6
6
|
"main": "src/index.ts",
|
|
@@ -37,22 +37,22 @@
|
|
|
37
37
|
"access": "public"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@openmrs/esm-api": "5.6.1-pre.
|
|
41
|
-
"@openmrs/esm-config": "5.6.1-pre.
|
|
42
|
-
"@openmrs/esm-context": "5.6.1-pre.
|
|
43
|
-
"@openmrs/esm-dynamic-loading": "5.6.1-pre.
|
|
44
|
-
"@openmrs/esm-error-handling": "5.6.1-pre.
|
|
45
|
-
"@openmrs/esm-extensions": "5.6.1-pre.
|
|
46
|
-
"@openmrs/esm-feature-flags": "5.6.1-pre.
|
|
47
|
-
"@openmrs/esm-globals": "5.6.1-pre.
|
|
48
|
-
"@openmrs/esm-navigation": "5.6.1-pre.
|
|
49
|
-
"@openmrs/esm-offline": "5.6.1-pre.
|
|
50
|
-
"@openmrs/esm-react-utils": "5.6.1-pre.
|
|
51
|
-
"@openmrs/esm-routes": "5.6.1-pre.
|
|
52
|
-
"@openmrs/esm-state": "5.6.1-pre.
|
|
53
|
-
"@openmrs/esm-styleguide": "5.6.1-pre.
|
|
54
|
-
"@openmrs/esm-translations": "5.6.1-pre.
|
|
55
|
-
"@openmrs/esm-utils": "5.6.1-pre.
|
|
40
|
+
"@openmrs/esm-api": "5.6.1-pre.1966",
|
|
41
|
+
"@openmrs/esm-config": "5.6.1-pre.1966",
|
|
42
|
+
"@openmrs/esm-context": "5.6.1-pre.1966",
|
|
43
|
+
"@openmrs/esm-dynamic-loading": "5.6.1-pre.1966",
|
|
44
|
+
"@openmrs/esm-error-handling": "5.6.1-pre.1966",
|
|
45
|
+
"@openmrs/esm-extensions": "5.6.1-pre.1966",
|
|
46
|
+
"@openmrs/esm-feature-flags": "5.6.1-pre.1966",
|
|
47
|
+
"@openmrs/esm-globals": "5.6.1-pre.1966",
|
|
48
|
+
"@openmrs/esm-navigation": "5.6.1-pre.1966",
|
|
49
|
+
"@openmrs/esm-offline": "5.6.1-pre.1966",
|
|
50
|
+
"@openmrs/esm-react-utils": "5.6.1-pre.1966",
|
|
51
|
+
"@openmrs/esm-routes": "5.6.1-pre.1966",
|
|
52
|
+
"@openmrs/esm-state": "5.6.1-pre.1966",
|
|
53
|
+
"@openmrs/esm-styleguide": "5.6.1-pre.1966",
|
|
54
|
+
"@openmrs/esm-translations": "5.6.1-pre.1966",
|
|
55
|
+
"@openmrs/esm-utils": "5.6.1-pre.1966",
|
|
56
56
|
"dayjs": "^1.10.7"
|
|
57
57
|
},
|
|
58
58
|
"peerDependencies": {
|