@openmrs/esm-framework 4.5.1-pre.804 → 5.0.0
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 +27 -25
- package/dist/530.openmrs-esm-framework.js +2 -0
- package/dist/530.openmrs-esm-framework.js.map +1 -0
- package/dist/585.openmrs-esm-framework.js +2 -0
- package/dist/585.openmrs-esm-framework.js.map +1 -0
- package/dist/645.openmrs-esm-framework.js +2 -0
- package/dist/645.openmrs-esm-framework.js.map +1 -0
- package/dist/71.openmrs-esm-framework.js +2 -0
- package/dist/71.openmrs-esm-framework.js.map +1 -0
- package/dist/710.openmrs-esm-framework.js +2 -0
- package/dist/710.openmrs-esm-framework.js.map +1 -0
- package/dist/735.openmrs-esm-framework.js +3 -0
- package/dist/735.openmrs-esm-framework.js.LICENSE.txt +9 -0
- package/dist/735.openmrs-esm-framework.js.map +1 -0
- package/dist/788.openmrs-esm-framework.js +3 -0
- package/dist/788.openmrs-esm-framework.js.LICENSE.txt +19 -0
- package/dist/788.openmrs-esm-framework.js.map +1 -0
- package/dist/openmrs-esm-framework.js +1 -1
- package/dist/openmrs-esm-framework.js.LICENSE.txt +1 -31
- package/dist/openmrs-esm-framework.js.map +1 -1
- package/docs/API.md +58 -9
- package/docs/classes/OpenmrsFetchError.md +3 -3
- package/docs/interfaces/CancelLoading.md +1 -1
- package/docs/interfaces/ExtensionRegistration.md +2 -2
- package/docs/interfaces/FetchConfig.md +2 -2
- package/docs/interfaces/ImportMap.md +1 -1
- package/docs/interfaces/OpenmrsAppRoutes.md +62 -0
- package/docs/interfaces/ResourceLoader.md +1 -1
- package/docs/interfaces/SpaConfig.md +7 -5
- package/package.json +24 -14
- package/webpack.config.js +27 -5
- package/docs/interfaces/ComponentDefinition.md +0 -102
- package/docs/interfaces/ExtensionDefinition.md +0 -202
- package/docs/interfaces/Lifecycle.md +0 -52
- package/docs/interfaces/PageDefinition.md +0 -150
|
@@ -1,202 +0,0 @@
|
|
|
1
|
-
[@openmrs/esm-framework](../API.md) / ExtensionDefinition
|
|
2
|
-
|
|
3
|
-
# Interface: ExtensionDefinition
|
|
4
|
-
|
|
5
|
-
## Hierarchy
|
|
6
|
-
|
|
7
|
-
- [`ComponentDefinition`](ComponentDefinition.md)
|
|
8
|
-
|
|
9
|
-
↳ **`ExtensionDefinition`**
|
|
10
|
-
|
|
11
|
-
## Table of contents
|
|
12
|
-
|
|
13
|
-
### Properties
|
|
14
|
-
|
|
15
|
-
- [appName](ExtensionDefinition.md#appname)
|
|
16
|
-
- [id](ExtensionDefinition.md#id)
|
|
17
|
-
- [meta](ExtensionDefinition.md#meta)
|
|
18
|
-
- [name](ExtensionDefinition.md#name)
|
|
19
|
-
- [offline](ExtensionDefinition.md#offline)
|
|
20
|
-
- [online](ExtensionDefinition.md#online)
|
|
21
|
-
- [order](ExtensionDefinition.md#order)
|
|
22
|
-
- [privilege](ExtensionDefinition.md#privilege)
|
|
23
|
-
- [resources](ExtensionDefinition.md#resources)
|
|
24
|
-
- [slot](ExtensionDefinition.md#slot)
|
|
25
|
-
- [slots](ExtensionDefinition.md#slots)
|
|
26
|
-
|
|
27
|
-
### Methods
|
|
28
|
-
|
|
29
|
-
- [load](ExtensionDefinition.md#load)
|
|
30
|
-
|
|
31
|
-
## Properties
|
|
32
|
-
|
|
33
|
-
### appName
|
|
34
|
-
|
|
35
|
-
• **appName**: `string`
|
|
36
|
-
|
|
37
|
-
The module/app that defines the component
|
|
38
|
-
|
|
39
|
-
#### Inherited from
|
|
40
|
-
|
|
41
|
-
[ComponentDefinition](ComponentDefinition.md).[appName](ComponentDefinition.md#appname)
|
|
42
|
-
|
|
43
|
-
#### Defined in
|
|
44
|
-
|
|
45
|
-
[packages/framework/esm-globals/src/types.ts:109](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-globals/src/types.ts#L109)
|
|
46
|
-
|
|
47
|
-
___
|
|
48
|
-
|
|
49
|
-
### id
|
|
50
|
-
|
|
51
|
-
• `Optional` **id**: `string`
|
|
52
|
-
|
|
53
|
-
**`deprecated`** A confusing way to specify the name of the extension
|
|
54
|
-
|
|
55
|
-
#### Defined in
|
|
56
|
-
|
|
57
|
-
[packages/framework/esm-globals/src/types.ts:145](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-globals/src/types.ts#L145)
|
|
58
|
-
|
|
59
|
-
___
|
|
60
|
-
|
|
61
|
-
### meta
|
|
62
|
-
|
|
63
|
-
• `Optional` **meta**: `Record`<`string`, `any`\>
|
|
64
|
-
|
|
65
|
-
The meta data used for reflection by other components
|
|
66
|
-
|
|
67
|
-
#### Defined in
|
|
68
|
-
|
|
69
|
-
[packages/framework/esm-globals/src/types.ts:141](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-globals/src/types.ts#L141)
|
|
70
|
-
|
|
71
|
-
___
|
|
72
|
-
|
|
73
|
-
### name
|
|
74
|
-
|
|
75
|
-
• **name**: `string`
|
|
76
|
-
|
|
77
|
-
The name of the extension being registered
|
|
78
|
-
|
|
79
|
-
#### Defined in
|
|
80
|
-
|
|
81
|
-
[packages/framework/esm-globals/src/types.ts:135](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-globals/src/types.ts#L135)
|
|
82
|
-
|
|
83
|
-
___
|
|
84
|
-
|
|
85
|
-
### offline
|
|
86
|
-
|
|
87
|
-
• `Optional` **offline**: `boolean` \| `object`
|
|
88
|
-
|
|
89
|
-
Defines the offline support / properties of the component.
|
|
90
|
-
|
|
91
|
-
#### Inherited from
|
|
92
|
-
|
|
93
|
-
[ComponentDefinition](ComponentDefinition.md).[offline](ComponentDefinition.md#offline)
|
|
94
|
-
|
|
95
|
-
#### Defined in
|
|
96
|
-
|
|
97
|
-
[packages/framework/esm-globals/src/types.ts:121](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-globals/src/types.ts#L121)
|
|
98
|
-
|
|
99
|
-
___
|
|
100
|
-
|
|
101
|
-
### online
|
|
102
|
-
|
|
103
|
-
• `Optional` **online**: `boolean` \| `object`
|
|
104
|
-
|
|
105
|
-
Defines the online support / properties of the component.
|
|
106
|
-
|
|
107
|
-
#### Inherited from
|
|
108
|
-
|
|
109
|
-
[ComponentDefinition](ComponentDefinition.md).[online](ComponentDefinition.md#online)
|
|
110
|
-
|
|
111
|
-
#### Defined in
|
|
112
|
-
|
|
113
|
-
[packages/framework/esm-globals/src/types.ts:117](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-globals/src/types.ts#L117)
|
|
114
|
-
|
|
115
|
-
___
|
|
116
|
-
|
|
117
|
-
### order
|
|
118
|
-
|
|
119
|
-
• `Optional` **order**: `number`
|
|
120
|
-
|
|
121
|
-
Specifies the relative order in which the extension renders in a slot
|
|
122
|
-
|
|
123
|
-
#### Defined in
|
|
124
|
-
|
|
125
|
-
[packages/framework/esm-globals/src/types.ts:143](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-globals/src/types.ts#L143)
|
|
126
|
-
|
|
127
|
-
___
|
|
128
|
-
|
|
129
|
-
### privilege
|
|
130
|
-
|
|
131
|
-
• `Optional` **privilege**: `string` \| `string`[]
|
|
132
|
-
|
|
133
|
-
Defines the access privilege(s) required for this component, if any.
|
|
134
|
-
If more than one privilege is provided, the user must have all specified permissions.
|
|
135
|
-
|
|
136
|
-
#### Inherited from
|
|
137
|
-
|
|
138
|
-
[ComponentDefinition](ComponentDefinition.md).[privilege](ComponentDefinition.md#privilege)
|
|
139
|
-
|
|
140
|
-
#### Defined in
|
|
141
|
-
|
|
142
|
-
[packages/framework/esm-globals/src/types.ts:126](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-globals/src/types.ts#L126)
|
|
143
|
-
|
|
144
|
-
___
|
|
145
|
-
|
|
146
|
-
### resources
|
|
147
|
-
|
|
148
|
-
• `Optional` **resources**: `Record`<`string`, [`ResourceLoader`](ResourceLoader.md)<`any`\>\>
|
|
149
|
-
|
|
150
|
-
Defines resources that are loaded when the component should mount.
|
|
151
|
-
|
|
152
|
-
#### Inherited from
|
|
153
|
-
|
|
154
|
-
[ComponentDefinition](ComponentDefinition.md).[resources](ComponentDefinition.md#resources)
|
|
155
|
-
|
|
156
|
-
#### Defined in
|
|
157
|
-
|
|
158
|
-
[packages/framework/esm-globals/src/types.ts:130](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-globals/src/types.ts#L130)
|
|
159
|
-
|
|
160
|
-
___
|
|
161
|
-
|
|
162
|
-
### slot
|
|
163
|
-
|
|
164
|
-
• `Optional` **slot**: `string`
|
|
165
|
-
|
|
166
|
-
A slot to attach to
|
|
167
|
-
|
|
168
|
-
#### Defined in
|
|
169
|
-
|
|
170
|
-
[packages/framework/esm-globals/src/types.ts:137](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-globals/src/types.ts#L137)
|
|
171
|
-
|
|
172
|
-
___
|
|
173
|
-
|
|
174
|
-
### slots
|
|
175
|
-
|
|
176
|
-
• `Optional` **slots**: `string`[]
|
|
177
|
-
|
|
178
|
-
Slots to attach to
|
|
179
|
-
|
|
180
|
-
#### Defined in
|
|
181
|
-
|
|
182
|
-
[packages/framework/esm-globals/src/types.ts:139](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-globals/src/types.ts#L139)
|
|
183
|
-
|
|
184
|
-
## Methods
|
|
185
|
-
|
|
186
|
-
### load
|
|
187
|
-
|
|
188
|
-
▸ **load**(): `Promise`<`any`\>
|
|
189
|
-
|
|
190
|
-
Defines a function to use for actually loading the component's lifecycle.
|
|
191
|
-
|
|
192
|
-
#### Returns
|
|
193
|
-
|
|
194
|
-
`Promise`<`any`\>
|
|
195
|
-
|
|
196
|
-
#### Inherited from
|
|
197
|
-
|
|
198
|
-
[ComponentDefinition](ComponentDefinition.md).[load](ComponentDefinition.md#load)
|
|
199
|
-
|
|
200
|
-
#### Defined in
|
|
201
|
-
|
|
202
|
-
[packages/framework/esm-globals/src/types.ts:113](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-globals/src/types.ts#L113)
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
[@openmrs/esm-framework](../API.md) / Lifecycle
|
|
2
|
-
|
|
3
|
-
# Interface: Lifecycle
|
|
4
|
-
|
|
5
|
-
## Table of contents
|
|
6
|
-
|
|
7
|
-
### Properties
|
|
8
|
-
|
|
9
|
-
- [bootstrap](Lifecycle.md#bootstrap)
|
|
10
|
-
- [mount](Lifecycle.md#mount)
|
|
11
|
-
- [unmount](Lifecycle.md#unmount)
|
|
12
|
-
- [update](Lifecycle.md#update)
|
|
13
|
-
|
|
14
|
-
## Properties
|
|
15
|
-
|
|
16
|
-
### bootstrap
|
|
17
|
-
|
|
18
|
-
• **bootstrap**: `LifeCycleFn`<`any`\>
|
|
19
|
-
|
|
20
|
-
#### Defined in
|
|
21
|
-
|
|
22
|
-
[packages/framework/esm-globals/src/types.ts:70](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-globals/src/types.ts#L70)
|
|
23
|
-
|
|
24
|
-
___
|
|
25
|
-
|
|
26
|
-
### mount
|
|
27
|
-
|
|
28
|
-
• **mount**: `LifeCycleFn`<`any`\>
|
|
29
|
-
|
|
30
|
-
#### Defined in
|
|
31
|
-
|
|
32
|
-
[packages/framework/esm-globals/src/types.ts:71](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-globals/src/types.ts#L71)
|
|
33
|
-
|
|
34
|
-
___
|
|
35
|
-
|
|
36
|
-
### unmount
|
|
37
|
-
|
|
38
|
-
• **unmount**: `LifeCycleFn`<`any`\>
|
|
39
|
-
|
|
40
|
-
#### Defined in
|
|
41
|
-
|
|
42
|
-
[packages/framework/esm-globals/src/types.ts:72](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-globals/src/types.ts#L72)
|
|
43
|
-
|
|
44
|
-
___
|
|
45
|
-
|
|
46
|
-
### update
|
|
47
|
-
|
|
48
|
-
• `Optional` **update**: `LifeCycleFn`<`any`\>
|
|
49
|
-
|
|
50
|
-
#### Defined in
|
|
51
|
-
|
|
52
|
-
[packages/framework/esm-globals/src/types.ts:73](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-globals/src/types.ts#L73)
|
|
@@ -1,150 +0,0 @@
|
|
|
1
|
-
[@openmrs/esm-framework](../API.md) / PageDefinition
|
|
2
|
-
|
|
3
|
-
# Interface: PageDefinition
|
|
4
|
-
|
|
5
|
-
## Hierarchy
|
|
6
|
-
|
|
7
|
-
- [`ComponentDefinition`](ComponentDefinition.md)
|
|
8
|
-
|
|
9
|
-
↳ **`PageDefinition`**
|
|
10
|
-
|
|
11
|
-
## Table of contents
|
|
12
|
-
|
|
13
|
-
### Properties
|
|
14
|
-
|
|
15
|
-
- [appName](PageDefinition.md#appname)
|
|
16
|
-
- [offline](PageDefinition.md#offline)
|
|
17
|
-
- [online](PageDefinition.md#online)
|
|
18
|
-
- [order](PageDefinition.md#order)
|
|
19
|
-
- [privilege](PageDefinition.md#privilege)
|
|
20
|
-
- [resources](PageDefinition.md#resources)
|
|
21
|
-
- [route](PageDefinition.md#route)
|
|
22
|
-
|
|
23
|
-
### Methods
|
|
24
|
-
|
|
25
|
-
- [load](PageDefinition.md#load)
|
|
26
|
-
|
|
27
|
-
## Properties
|
|
28
|
-
|
|
29
|
-
### appName
|
|
30
|
-
|
|
31
|
-
• **appName**: `string`
|
|
32
|
-
|
|
33
|
-
The module/app that defines the component
|
|
34
|
-
|
|
35
|
-
#### Inherited from
|
|
36
|
-
|
|
37
|
-
[ComponentDefinition](ComponentDefinition.md).[appName](ComponentDefinition.md#appname)
|
|
38
|
-
|
|
39
|
-
#### Defined in
|
|
40
|
-
|
|
41
|
-
[packages/framework/esm-globals/src/types.ts:109](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-globals/src/types.ts#L109)
|
|
42
|
-
|
|
43
|
-
___
|
|
44
|
-
|
|
45
|
-
### offline
|
|
46
|
-
|
|
47
|
-
• `Optional` **offline**: `boolean` \| `object`
|
|
48
|
-
|
|
49
|
-
Defines the offline support / properties of the component.
|
|
50
|
-
|
|
51
|
-
#### Inherited from
|
|
52
|
-
|
|
53
|
-
[ComponentDefinition](ComponentDefinition.md).[offline](ComponentDefinition.md#offline)
|
|
54
|
-
|
|
55
|
-
#### Defined in
|
|
56
|
-
|
|
57
|
-
[packages/framework/esm-globals/src/types.ts:121](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-globals/src/types.ts#L121)
|
|
58
|
-
|
|
59
|
-
___
|
|
60
|
-
|
|
61
|
-
### online
|
|
62
|
-
|
|
63
|
-
• `Optional` **online**: `boolean` \| `object`
|
|
64
|
-
|
|
65
|
-
Defines the online support / properties of the component.
|
|
66
|
-
|
|
67
|
-
#### Inherited from
|
|
68
|
-
|
|
69
|
-
[ComponentDefinition](ComponentDefinition.md).[online](ComponentDefinition.md#online)
|
|
70
|
-
|
|
71
|
-
#### Defined in
|
|
72
|
-
|
|
73
|
-
[packages/framework/esm-globals/src/types.ts:117](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-globals/src/types.ts#L117)
|
|
74
|
-
|
|
75
|
-
___
|
|
76
|
-
|
|
77
|
-
### order
|
|
78
|
-
|
|
79
|
-
• **order**: `number`
|
|
80
|
-
|
|
81
|
-
The order in which to load the page. This determines DOM order.
|
|
82
|
-
|
|
83
|
-
#### Defined in
|
|
84
|
-
|
|
85
|
-
[packages/framework/esm-globals/src/types.ts:156](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-globals/src/types.ts#L156)
|
|
86
|
-
|
|
87
|
-
___
|
|
88
|
-
|
|
89
|
-
### privilege
|
|
90
|
-
|
|
91
|
-
• `Optional` **privilege**: `string` \| `string`[]
|
|
92
|
-
|
|
93
|
-
Defines the access privilege(s) required for this component, if any.
|
|
94
|
-
If more than one privilege is provided, the user must have all specified permissions.
|
|
95
|
-
|
|
96
|
-
#### Inherited from
|
|
97
|
-
|
|
98
|
-
[ComponentDefinition](ComponentDefinition.md).[privilege](ComponentDefinition.md#privilege)
|
|
99
|
-
|
|
100
|
-
#### Defined in
|
|
101
|
-
|
|
102
|
-
[packages/framework/esm-globals/src/types.ts:126](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-globals/src/types.ts#L126)
|
|
103
|
-
|
|
104
|
-
___
|
|
105
|
-
|
|
106
|
-
### resources
|
|
107
|
-
|
|
108
|
-
• `Optional` **resources**: `Record`<`string`, [`ResourceLoader`](ResourceLoader.md)<`any`\>\>
|
|
109
|
-
|
|
110
|
-
Defines resources that are loaded when the component should mount.
|
|
111
|
-
|
|
112
|
-
#### Inherited from
|
|
113
|
-
|
|
114
|
-
[ComponentDefinition](ComponentDefinition.md).[resources](ComponentDefinition.md#resources)
|
|
115
|
-
|
|
116
|
-
#### Defined in
|
|
117
|
-
|
|
118
|
-
[packages/framework/esm-globals/src/types.ts:130](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-globals/src/types.ts#L130)
|
|
119
|
-
|
|
120
|
-
___
|
|
121
|
-
|
|
122
|
-
### route
|
|
123
|
-
|
|
124
|
-
• **route**: `string`
|
|
125
|
-
|
|
126
|
-
The route of the page.
|
|
127
|
-
|
|
128
|
-
#### Defined in
|
|
129
|
-
|
|
130
|
-
[packages/framework/esm-globals/src/types.ts:152](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-globals/src/types.ts#L152)
|
|
131
|
-
|
|
132
|
-
## Methods
|
|
133
|
-
|
|
134
|
-
### load
|
|
135
|
-
|
|
136
|
-
▸ **load**(): `Promise`<`any`\>
|
|
137
|
-
|
|
138
|
-
Defines a function to use for actually loading the component's lifecycle.
|
|
139
|
-
|
|
140
|
-
#### Returns
|
|
141
|
-
|
|
142
|
-
`Promise`<`any`\>
|
|
143
|
-
|
|
144
|
-
#### Inherited from
|
|
145
|
-
|
|
146
|
-
[ComponentDefinition](ComponentDefinition.md).[load](ComponentDefinition.md#load)
|
|
147
|
-
|
|
148
|
-
#### Defined in
|
|
149
|
-
|
|
150
|
-
[packages/framework/esm-globals/src/types.ts:113](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-globals/src/types.ts#L113)
|