@openmrs/esm-framework 4.0.3-pre.371 → 4.0.3-pre.379
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/docs/API.md
CHANGED
|
@@ -160,6 +160,7 @@
|
|
|
160
160
|
- [setLeftNav](API.md#setleftnav)
|
|
161
161
|
- [showModal](API.md#showmodal)
|
|
162
162
|
- [showNotification](API.md#shownotification)
|
|
163
|
+
- [showActionableNotification](API.md#showactionablenotification)
|
|
163
164
|
- [showToast](API.md#showtoast)
|
|
164
165
|
- [subscribeNotificationShown](API.md#subscribenotificationshown)
|
|
165
166
|
- [subscribeToastShown](API.md#subscribetoastshown)
|
|
@@ -534,6 +535,16 @@ ___
|
|
|
534
535
|
|
|
535
536
|
___
|
|
536
537
|
|
|
538
|
+
### ActionableNotificationType
|
|
539
|
+
|
|
540
|
+
Ƭ **ActionableNotificationType**: ``"error"`` \| ``"info"`` \| ``"info-square"`` \| ``"success"`` \| ``"warning"`` \| ``"warning-alt"``
|
|
541
|
+
|
|
542
|
+
#### Defined in
|
|
543
|
+
|
|
544
|
+
[packages/framework/esm-styleguide/src/notifications/actionable-notification.component.tsx:25](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/notifications/actionable-notification.component.tsx#L25)
|
|
545
|
+
|
|
546
|
+
___
|
|
547
|
+
|
|
537
548
|
### LayoutType
|
|
538
549
|
|
|
539
550
|
Ƭ **LayoutType**: ``"phone"`` \| ``"tablet"`` \| ``"small-desktop"`` \| ``"large-desktop"``
|
|
@@ -3897,10 +3908,31 @@ Displays an inline notification in the UI.
|
|
|
3897
3908
|
|
|
3898
3909
|
#### Defined in
|
|
3899
3910
|
|
|
3900
|
-
[packages/framework/esm-styleguide/src/notifications/index.tsx:40](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/notifications/index.tsx#
|
|
3911
|
+
[packages/framework/esm-styleguide/src/notifications/index.tsx:40](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/notifications/index.tsx#L48)
|
|
3901
3912
|
|
|
3902
3913
|
___
|
|
3903
3914
|
|
|
3915
|
+
### showActionableNotification
|
|
3916
|
+
|
|
3917
|
+
▸ **showActionableNotification**(`notification`): `void`
|
|
3918
|
+
|
|
3919
|
+
Displays an actionable notification in the UI which takes in an action.
|
|
3920
|
+
|
|
3921
|
+
#### Parameters
|
|
3922
|
+
|
|
3923
|
+
| Name | Type | Description |
|
|
3924
|
+
| :------ | :------ | :------ |
|
|
3925
|
+
| `notification` | [`ActionableNotificationDescriptor`](interfaces/ActionableNotificationDescriptor.md) | The description of the actionable notification to display. |
|
|
3926
|
+
|
|
3927
|
+
#### Returns
|
|
3928
|
+
|
|
3929
|
+
`void`
|
|
3930
|
+
|
|
3931
|
+
#### Defined in
|
|
3932
|
+
|
|
3933
|
+
[packages/framework/esm-styleguide/src/notifications/index.tsx:40](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/notifications/index.tsx#L88)
|
|
3934
|
+
|
|
3935
|
+
___
|
|
3904
3936
|
### showToast
|
|
3905
3937
|
|
|
3906
3938
|
▸ **showToast**(`toast`): `void`
|
|
@@ -3945,7 +3977,31 @@ ___
|
|
|
3945
3977
|
|
|
3946
3978
|
#### Defined in
|
|
3947
3979
|
|
|
3948
|
-
[packages/framework/esm-globals/src/events.ts:93](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-globals/src/events.ts#
|
|
3980
|
+
[packages/framework/esm-globals/src/events.ts:93](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-globals/src/events.ts#L117)
|
|
3981
|
+
|
|
3982
|
+
___
|
|
3983
|
+
|
|
3984
|
+
▸ **subscribeActionableNotificationShown**(`cb`): () => `void`
|
|
3985
|
+
|
|
3986
|
+
#### Parameters
|
|
3987
|
+
|
|
3988
|
+
| Name | Type |
|
|
3989
|
+
| :------ | :------ |
|
|
3990
|
+
| `cb` | (`data`: [`ShowActionableNotificationEvent`](interfaces/ShowActionableNotificationEvent.md)) => `void` |
|
|
3991
|
+
|
|
3992
|
+
#### Returns
|
|
3993
|
+
|
|
3994
|
+
`fn`
|
|
3995
|
+
|
|
3996
|
+
▸ (): `void`
|
|
3997
|
+
|
|
3998
|
+
##### Returns
|
|
3999
|
+
|
|
4000
|
+
`void`
|
|
4001
|
+
|
|
4002
|
+
#### Defined in
|
|
4003
|
+
|
|
4004
|
+
[packages/framework/esm-globals/src/events.ts:93](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-globals/src/events.ts#L126)
|
|
3949
4005
|
|
|
3950
4006
|
___
|
|
3951
4007
|
|
|
@@ -3971,7 +4027,7 @@ ___
|
|
|
3971
4027
|
|
|
3972
4028
|
#### Defined in
|
|
3973
4029
|
|
|
3974
|
-
[packages/framework/esm-globals/src/events.ts:102](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-globals/src/events.ts#
|
|
4030
|
+
[packages/framework/esm-globals/src/events.ts:102](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-globals/src/events.ts#L136)
|
|
3975
4031
|
|
|
3976
4032
|
___
|
|
3977
4033
|
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
[@openmrs/esm-framework](../API.md) / ActionableNotificationDescriptor
|
|
2
|
+
|
|
3
|
+
# Interface: ActionableNotificationDescriptor
|
|
4
|
+
|
|
5
|
+
## Table of contents
|
|
6
|
+
|
|
7
|
+
### UI Properties
|
|
8
|
+
|
|
9
|
+
- [actionButtonLable](ActionableNotificationDescriptor.md#actionButtonLable)
|
|
10
|
+
- [critical](ActionableNotificationDescriptor.md#critical)
|
|
11
|
+
- [subtitle](ActionableNotificationDescriptor.md#subtitle)
|
|
12
|
+
- [kind](ActionableNotificationDescriptor.md#kind)
|
|
13
|
+
- [onActionButtonClick](ActionableNotificationDescriptor.md#onActionButtonClick)
|
|
14
|
+
- [title](ActionableNotificationDescriptor.md#title)
|
|
15
|
+
|
|
16
|
+
## UI Properties
|
|
17
|
+
|
|
18
|
+
### actionButtonLabel
|
|
19
|
+
|
|
20
|
+
• **actionButtonLabel**: `string`
|
|
21
|
+
|
|
22
|
+
#### Defined in
|
|
23
|
+
|
|
24
|
+
[packages/framework/esm-styleguide/src/notifications/actionable-notification.component.tsx:10](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/notifications/actionable-notification.component.tsx#L10)
|
|
25
|
+
|
|
26
|
+
___
|
|
27
|
+
|
|
28
|
+
• **onActionButtonClick**: `void`
|
|
29
|
+
|
|
30
|
+
#### Defined in
|
|
31
|
+
|
|
32
|
+
[packages/framework/esm-styleguide/src/notifications/actionable-notification.component.tsx:11](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/notifications/actionable-notification.component.tsx#L11)
|
|
33
|
+
|
|
34
|
+
___
|
|
35
|
+
|
|
36
|
+
### critical
|
|
37
|
+
|
|
38
|
+
• `Optional` **critical**: `boolean`
|
|
39
|
+
|
|
40
|
+
#### Defined in
|
|
41
|
+
|
|
42
|
+
[packages/framework/esm-styleguide/src/notifications/notification.component.tsx:16](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/notifications/notification.component.tsx#L16)
|
|
43
|
+
|
|
44
|
+
___
|
|
45
|
+
|
|
46
|
+
### subtitle
|
|
47
|
+
|
|
48
|
+
• **subtitle**: `string`
|
|
49
|
+
|
|
50
|
+
#### Defined in
|
|
51
|
+
|
|
52
|
+
[packages/framework/esm-styleguide/src/notifications/notification.component.tsx:13](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/notifications/notification.component.tsx#L13)
|
|
53
|
+
|
|
54
|
+
___
|
|
55
|
+
|
|
56
|
+
### kind
|
|
57
|
+
|
|
58
|
+
• `Optional` **kind**: [`ActionableNotificationType`](../API.md#actionablenotificationtype)
|
|
59
|
+
|
|
60
|
+
#### Defined in
|
|
61
|
+
|
|
62
|
+
[packages/framework/esm-styleguide/src/notifications/actionable-notification.component.tsx:15](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/notifications/actionable-notification.component.tsx#L15)
|
|
63
|
+
|
|
64
|
+
___
|
|
65
|
+
|
|
66
|
+
### progressActionLabel
|
|
67
|
+
|
|
68
|
+
• `Optional` **progressActionLabel**: `string`
|
|
69
|
+
|
|
70
|
+
#### Defined in
|
|
71
|
+
|
|
72
|
+
[packages/framework/esm-styleguide/src/notifications/actionable-notification.component.tsx:17](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/notifications/actionable-notification.component.tsx#L17)
|
|
73
|
+
|
|
74
|
+
___
|
|
75
|
+
|
|
76
|
+
### title
|
|
77
|
+
|
|
78
|
+
• `Optional` **title**: `string`
|
|
79
|
+
|
|
80
|
+
#### Defined in
|
|
81
|
+
|
|
82
|
+
[packages/framework/esm-styleguide/src/notifications/actionable-notification.component.tsx:14](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/notifications/actionable-notification.component.tsx#L14)
|
package/mock.tsx
CHANGED
|
@@ -303,6 +303,7 @@ export const useVisitTypes = jest.fn(() => []);
|
|
|
303
303
|
/* esm-styleguide */
|
|
304
304
|
|
|
305
305
|
export const showNotification = jest.fn();
|
|
306
|
+
export const showActionableNotification = jest.fn();
|
|
306
307
|
export const showToast = jest.fn();
|
|
307
308
|
export const showModal = jest.fn();
|
|
308
309
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openmrs/esm-framework",
|
|
3
|
-
"version": "4.0.3-pre.
|
|
3
|
+
"version": "4.0.3-pre.379",
|
|
4
4
|
"license": "MPL-2.0",
|
|
5
5
|
"browser": "dist/openmrs-esm-framework.js",
|
|
6
6
|
"main": "src/index.ts",
|
|
@@ -35,17 +35,17 @@
|
|
|
35
35
|
"access": "public"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@openmrs/esm-api": "^4.0.3-pre.
|
|
39
|
-
"@openmrs/esm-breadcrumbs": "^4.0.3-pre.
|
|
40
|
-
"@openmrs/esm-config": "^4.0.3-pre.
|
|
41
|
-
"@openmrs/esm-error-handling": "^4.0.3-pre.
|
|
42
|
-
"@openmrs/esm-extensions": "^4.0.3-pre.
|
|
43
|
-
"@openmrs/esm-globals": "^4.0.3-pre.
|
|
44
|
-
"@openmrs/esm-offline": "^4.0.3-pre.
|
|
45
|
-
"@openmrs/esm-react-utils": "^4.0.3-pre.
|
|
46
|
-
"@openmrs/esm-state": "^4.0.3-pre.
|
|
47
|
-
"@openmrs/esm-styleguide": "^4.0.3-pre.
|
|
48
|
-
"@openmrs/esm-utils": "^4.0.3-pre.
|
|
38
|
+
"@openmrs/esm-api": "^4.0.3-pre.379",
|
|
39
|
+
"@openmrs/esm-breadcrumbs": "^4.0.3-pre.379",
|
|
40
|
+
"@openmrs/esm-config": "^4.0.3-pre.379",
|
|
41
|
+
"@openmrs/esm-error-handling": "^4.0.3-pre.379",
|
|
42
|
+
"@openmrs/esm-extensions": "^4.0.3-pre.379",
|
|
43
|
+
"@openmrs/esm-globals": "^4.0.3-pre.379",
|
|
44
|
+
"@openmrs/esm-offline": "^4.0.3-pre.379",
|
|
45
|
+
"@openmrs/esm-react-utils": "^4.0.3-pre.379",
|
|
46
|
+
"@openmrs/esm-state": "^4.0.3-pre.379",
|
|
47
|
+
"@openmrs/esm-styleguide": "^4.0.3-pre.379",
|
|
48
|
+
"@openmrs/esm-utils": "^4.0.3-pre.379",
|
|
49
49
|
"dayjs": "^1.10.7"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
@@ -53,5 +53,5 @@
|
|
|
53
53
|
"jest-cli": "28.1.0",
|
|
54
54
|
"jest-environment-jsdom": "28.1.0"
|
|
55
55
|
},
|
|
56
|
-
"gitHead": "
|
|
56
|
+
"gitHead": "1a240c7c9dbef90d166e1fe29390d48d3cc9b305"
|
|
57
57
|
}
|