@openmrs/esm-framework 3.2.1-pre.1030 → 3.2.1-pre.1037
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/dist/openmrs-esm-framework.js +1 -1
- package/dist/openmrs-esm-framework.js.map +1 -1
- package/docs/API.md +48 -31
- package/mock.tsx +4 -0
- package/package.json +13 -13
package/docs/API.md
CHANGED
|
@@ -70,6 +70,7 @@
|
|
|
70
70
|
- [createUseStore](API.md#createusestore)
|
|
71
71
|
- [daysIntoYear](API.md#daysintoyear)
|
|
72
72
|
- [defineConfigSchema](API.md#defineconfigschema)
|
|
73
|
+
- [defineExtensionConfigSchema](API.md#defineextensionconfigschema)
|
|
73
74
|
- [deleteSynchronizationItem](API.md#deletesynchronizationitem)
|
|
74
75
|
- [detach](API.md#detach)
|
|
75
76
|
- [detachAll](API.md#detachall)
|
|
@@ -154,7 +155,6 @@
|
|
|
154
155
|
- [useForceUpdate](API.md#useforceupdate)
|
|
155
156
|
- [useLayoutType](API.md#uselayouttype)
|
|
156
157
|
- [useLocations](API.md#uselocations)
|
|
157
|
-
- [useNavigationContext](API.md#usenavigationcontext)
|
|
158
158
|
- [useOnClickOutside](API.md#useonclickoutside)
|
|
159
159
|
- [usePagination](API.md#usepagination)
|
|
160
160
|
- [usePatient](API.md#usepatient)
|
|
@@ -2037,12 +2037,19 @@ ___
|
|
|
2037
2037
|
|
|
2038
2038
|
▸ **defineConfigSchema**(`moduleName`, `schema`): `void`
|
|
2039
2039
|
|
|
2040
|
+
This defines a configuration schema for a module. The schema tells the
|
|
2041
|
+
configuration system how the module can be configured. It specifies
|
|
2042
|
+
what makes configuration valid or invalid.
|
|
2043
|
+
|
|
2044
|
+
See [Configuration System](http://o3-dev.docs.openmrs.org/#/main/config)
|
|
2045
|
+
for more information about defining a config schema.
|
|
2046
|
+
|
|
2040
2047
|
#### Parameters
|
|
2041
2048
|
|
|
2042
|
-
| Name | Type |
|
|
2043
|
-
| :------ | :------ |
|
|
2044
|
-
| `moduleName` | `string` |
|
|
2045
|
-
| `schema` | [`ConfigSchema`](interfaces/ConfigSchema.md) |
|
|
2049
|
+
| Name | Type | Description |
|
|
2050
|
+
| :------ | :------ | :------ |
|
|
2051
|
+
| `moduleName` | `string` | Name of the module the schema is being defined for. Generally should be the one in which the `defineConfigSchema` call takes place. |
|
|
2052
|
+
| `schema` | [`ConfigSchema`](interfaces/ConfigSchema.md) | The config schema for the module |
|
|
2046
2053
|
|
|
2047
2054
|
#### Returns
|
|
2048
2055
|
|
|
@@ -2050,7 +2057,39 @@ ___
|
|
|
2050
2057
|
|
|
2051
2058
|
#### Defined in
|
|
2052
2059
|
|
|
2053
|
-
[packages/framework/esm-config/src/module-config/module-config.ts:
|
|
2060
|
+
[packages/framework/esm-config/src/module-config/module-config.ts:191](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-config/src/module-config/module-config.ts#L191)
|
|
2061
|
+
|
|
2062
|
+
___
|
|
2063
|
+
|
|
2064
|
+
### defineExtensionConfigSchema
|
|
2065
|
+
|
|
2066
|
+
▸ **defineExtensionConfigSchema**(`extensionName`, `schema`): `void`
|
|
2067
|
+
|
|
2068
|
+
This defines a configuration schema for an extension. When a schema is defined
|
|
2069
|
+
for an extension, that extension will receive the configuration corresponding
|
|
2070
|
+
to that schema, rather than the configuration corresponding to the module
|
|
2071
|
+
in which it is defined.
|
|
2072
|
+
|
|
2073
|
+
The schema tells the configuration system how the module can be configured.
|
|
2074
|
+
It specifies what makes configuration valid or invalid.
|
|
2075
|
+
|
|
2076
|
+
See [Configuration System](http://o3-dev.docs.openmrs.org/#/main/config)
|
|
2077
|
+
for more information about defining a config schema.
|
|
2078
|
+
|
|
2079
|
+
#### Parameters
|
|
2080
|
+
|
|
2081
|
+
| Name | Type | Description |
|
|
2082
|
+
| :------ | :------ | :------ |
|
|
2083
|
+
| `extensionName` | `string` | Name of the extension the schema is being defined for. Should match the `name` of one of the `extensions` entries being returned by `setupOpenMRS`. |
|
|
2084
|
+
| `schema` | [`ConfigSchema`](interfaces/ConfigSchema.md) | The config schema for the extension |
|
|
2085
|
+
|
|
2086
|
+
#### Returns
|
|
2087
|
+
|
|
2088
|
+
`void`
|
|
2089
|
+
|
|
2090
|
+
#### Defined in
|
|
2091
|
+
|
|
2092
|
+
[packages/framework/esm-config/src/module-config/module-config.ts:216](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-config/src/module-config/module-config.ts#L216)
|
|
2054
2093
|
|
|
2055
2094
|
___
|
|
2056
2095
|
|
|
@@ -2347,7 +2386,7 @@ of the execution of a function.
|
|
|
2347
2386
|
|
|
2348
2387
|
#### Defined in
|
|
2349
2388
|
|
|
2350
|
-
[packages/framework/esm-config/src/module-config/module-config.ts:
|
|
2389
|
+
[packages/framework/esm-config/src/module-config/module-config.ts:252](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-config/src/module-config/module-config.ts#L252)
|
|
2351
2390
|
|
|
2352
2391
|
___
|
|
2353
2392
|
|
|
@@ -2966,7 +3005,7 @@ Validate and interpolate defaults for `providedConfig` according to `schema`
|
|
|
2966
3005
|
|
|
2967
3006
|
#### Defined in
|
|
2968
3007
|
|
|
2969
|
-
[packages/framework/esm-config/src/module-config/module-config.ts:
|
|
3008
|
+
[packages/framework/esm-config/src/module-config/module-config.ts:274](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-config/src/module-config/module-config.ts#L274)
|
|
2970
3009
|
|
|
2971
3010
|
___
|
|
2972
3011
|
|
|
@@ -2987,7 +3026,7 @@ ___
|
|
|
2987
3026
|
|
|
2988
3027
|
#### Defined in
|
|
2989
3028
|
|
|
2990
|
-
[packages/framework/esm-config/src/module-config/module-config.ts:
|
|
3029
|
+
[packages/framework/esm-config/src/module-config/module-config.ts:232](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-config/src/module-config/module-config.ts#L232)
|
|
2991
3030
|
|
|
2992
3031
|
___
|
|
2993
3032
|
|
|
@@ -4056,28 +4095,6 @@ ___
|
|
|
4056
4095
|
|
|
4057
4096
|
___
|
|
4058
4097
|
|
|
4059
|
-
### useNavigationContext
|
|
4060
|
-
|
|
4061
|
-
▸ **useNavigationContext**(`context`): `void`
|
|
4062
|
-
|
|
4063
|
-
**`deprecated`** Don't use this anymore.
|
|
4064
|
-
|
|
4065
|
-
#### Parameters
|
|
4066
|
-
|
|
4067
|
-
| Name | Type |
|
|
4068
|
-
| :------ | :------ |
|
|
4069
|
-
| `context` | [`NavigationContext`](interfaces/NavigationContext.md) |
|
|
4070
|
-
|
|
4071
|
-
#### Returns
|
|
4072
|
-
|
|
4073
|
-
`void`
|
|
4074
|
-
|
|
4075
|
-
#### Defined in
|
|
4076
|
-
|
|
4077
|
-
[packages/framework/esm-react-utils/src/useNavigationContext.ts:10](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/framework/esm-react-utils/src/useNavigationContext.ts#L10)
|
|
4078
|
-
|
|
4079
|
-
___
|
|
4080
|
-
|
|
4081
4098
|
### useOnClickOutside
|
|
4082
4099
|
|
|
4083
4100
|
▸ **useOnClickOutside**<`T`\>(`handler`, `active?`): `RefObject`<`T`\>
|
package/mock.tsx
CHANGED
|
@@ -176,6 +176,10 @@ export function defineConfigSchema(moduleName, schema) {
|
|
|
176
176
|
configSchema = schema;
|
|
177
177
|
}
|
|
178
178
|
|
|
179
|
+
export function defineExtensionConfigSchema(extensionName, schema) {
|
|
180
|
+
configSchema = schema;
|
|
181
|
+
}
|
|
182
|
+
|
|
179
183
|
export const navigate = jest.fn();
|
|
180
184
|
|
|
181
185
|
export const ConfigurableLink = jest
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openmrs/esm-framework",
|
|
3
|
-
"version": "3.2.1-pre.
|
|
3
|
+
"version": "3.2.1-pre.1037",
|
|
4
4
|
"license": "MPL-2.0",
|
|
5
5
|
"browser": "dist/openmrs-esm-framework.js",
|
|
6
6
|
"main": "src/index.ts",
|
|
@@ -35,18 +35,18 @@
|
|
|
35
35
|
"access": "public"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@openmrs/esm-api": "^3.2.1-pre.
|
|
39
|
-
"@openmrs/esm-breadcrumbs": "^3.2.1-pre.
|
|
40
|
-
"@openmrs/esm-config": "^3.2.1-pre.
|
|
41
|
-
"@openmrs/esm-error-handling": "^3.2.1-pre.
|
|
42
|
-
"@openmrs/esm-extensions": "^3.2.1-pre.
|
|
43
|
-
"@openmrs/esm-globals": "^3.2.1-pre.
|
|
44
|
-
"@openmrs/esm-offline": "^3.2.1-pre.
|
|
45
|
-
"@openmrs/esm-react-utils": "^3.2.1-pre.
|
|
46
|
-
"@openmrs/esm-state": "^3.2.1-pre.
|
|
47
|
-
"@openmrs/esm-styleguide": "^3.2.1-pre.
|
|
48
|
-
"@openmrs/esm-utils": "^3.2.1-pre.
|
|
38
|
+
"@openmrs/esm-api": "^3.2.1-pre.1037",
|
|
39
|
+
"@openmrs/esm-breadcrumbs": "^3.2.1-pre.1037",
|
|
40
|
+
"@openmrs/esm-config": "^3.2.1-pre.1037",
|
|
41
|
+
"@openmrs/esm-error-handling": "^3.2.1-pre.1037",
|
|
42
|
+
"@openmrs/esm-extensions": "^3.2.1-pre.1037",
|
|
43
|
+
"@openmrs/esm-globals": "^3.2.1-pre.1037",
|
|
44
|
+
"@openmrs/esm-offline": "^3.2.1-pre.1037",
|
|
45
|
+
"@openmrs/esm-react-utils": "^3.2.1-pre.1037",
|
|
46
|
+
"@openmrs/esm-state": "^3.2.1-pre.1037",
|
|
47
|
+
"@openmrs/esm-styleguide": "^3.2.1-pre.1037",
|
|
48
|
+
"@openmrs/esm-utils": "^3.2.1-pre.1037",
|
|
49
49
|
"dayjs": "^1.10.7"
|
|
50
50
|
},
|
|
51
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "d17e2dec220c28d9328b242227ffe7e711f9fea9"
|
|
52
52
|
}
|