Skip to content

Commit

Permalink
(chore) Update ConnectedExtension and add useConnectedExtensions mock
Browse files Browse the repository at this point in the history
  • Loading branch information
ibacher committed Jul 21, 2023
1 parent 8cebf05 commit 8f9f182
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 2 deletions.
1 change: 1 addition & 0 deletions packages/framework/esm-extensions/src/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ export interface AssignedExtension {
export interface ConnectedExtension {
id: string;
name: string;
moduleName: string;
meta: ExtensionMeta;
/** The extension's config. Note that this will be `null` until the slot is mounted. */
config: ConfigObject | null;
Expand Down
2 changes: 1 addition & 1 deletion packages/framework/esm-framework/docs/API.md
Original file line number Diff line number Diff line change
Expand Up @@ -2403,7 +2403,7 @@ state of the extension system.

#### Defined in

[packages/framework/esm-extensions/src/store.ts:132](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-extensions/src/store.ts#L132)
[packages/framework/esm-extensions/src/store.ts:133](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-extensions/src/store.ts#L133)

___

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
- [config](ConnectedExtension.md#config)
- [id](ConnectedExtension.md#id)
- [meta](ConnectedExtension.md#meta)
- [moduleName](ConnectedExtension.md#modulename)
- [name](ConnectedExtension.md#name)

## Extension Properties
Expand All @@ -21,7 +22,7 @@ The extension's config. Note that this will be `null` until the slot is mounted.

#### Defined in

[packages/framework/esm-extensions/src/store.ts:93](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-extensions/src/store.ts#L93)
[packages/framework/esm-extensions/src/store.ts:94](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-extensions/src/store.ts#L94)

___

Expand All @@ -41,6 +42,16 @@ ___

#### Defined in

[packages/framework/esm-extensions/src/store.ts:92](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-extensions/src/store.ts#L92)

___

### moduleName

**moduleName**: `string`

#### Defined in

[packages/framework/esm-extensions/src/store.ts:91](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-extensions/src/store.ts#L91)

___
Expand Down
2 changes: 2 additions & 0 deletions packages/framework/esm-framework/mock.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,8 @@ export const useLayoutType = jest.fn(() => "desktop");

export const useExtensionSlotMeta = jest.fn(() => ({}));

export const useConnectedExtensions = jest.fn(() => []);

export const UserHasAccess = jest.fn().mockImplementation((props: any) => {
return props.children;
});
Expand Down

0 comments on commit 8f9f182

Please sign in to comment.