Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(fix) Include common module type declarations in framework #983

Merged
merged 7 commits into from
Apr 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 0 additions & 5 deletions packages/apps/esm-devtools-app/src/declarations.d.ts

This file was deleted.

3 changes: 0 additions & 3 deletions packages/apps/esm-implementer-tools-app/src/declarations.d.ts

This file was deleted.

6 changes: 0 additions & 6 deletions packages/apps/esm-login-app/src/declarations.d.ts

This file was deleted.

6 changes: 0 additions & 6 deletions packages/apps/esm-offline-tools-app/src/declarations.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1 @@
declare module '*.svg';
declare module '*.css';
declare module '*.scss';

declare module '@carbon/react';
declare type SideNavProps = {};
declare type TileProps = {};
Original file line number Diff line number Diff line change
@@ -1,7 +1 @@
declare module '*.css';
declare module '*.scss';
declare module '@carbon/react';
declare type HeaderPanelProps = {};
declare type SideNavProps = {
isChildOfHeader?: boolean;
};
4 changes: 2 additions & 2 deletions packages/framework/esm-framework/docs/API.md
Original file line number Diff line number Diff line change
Expand Up @@ -4541,7 +4541,7 @@ invalid key to this function will result in a type error.

| Name | Type | Description |
| :------ | :------ | :------ |
| `key` | ``"error"`` \| ``"change"`` \| ``"close"`` \| ``"other"`` \| ``"actions"`` \| ``"address"`` \| ``"cancel"`` \| ``"confirm"`` \| ``"contactDetails"`` \| ``"errorCopy"`` \| ``"female"`` \| ``"hideDetails"`` \| ``"loading"`` \| ``"male"`` \| ``"patientLists"`` \| ``"relationships"`` \| ``"seeMoreLists"`` \| ``"showDetails"`` \| ``"unknown"`` \| ``"closeAllOpenedWorkspaces"`` \| ``"closingAllWorkspacesPromptBody"`` \| ``"closingAllWorkspacesPromptTitle"`` \| ``"discard"`` \| ``"openAnyway"`` \| ``"unsavedChangesInOpenedWorkspace"`` \| ``"unsavedChangesInWorkspace"`` \| ``"unsavedChangesTitleText"`` \| ``"address1"`` \| ``"address2"`` \| ``"city"`` \| ``"cityVillage"`` \| ``"country"`` \| ``"countyDistrict"`` \| ``"postalCode"`` \| ``"state"`` \| ``"stateProvince"`` | - |
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dunno what this is about

| `key` | ``"error"`` \| ``"change"`` \| ``"close"`` \| ``"other"`` \| ``"actions"`` \| ``"address"`` \| ``"cancel"`` \| ``"confirm"`` \| ``"contactDetails"`` \| ``"errorCopy"`` \| ``"female"`` \| ``"hideDetails"`` \| ``"loading"`` \| ``"male"`` \| ``"patientLists"`` \| ``"relationships"`` \| ``"seeMoreLists"`` \| ``"showDetails"`` \| ``"unknown"`` \| ``"closeAllOpenedWorkspaces"`` \| ``"closingAllWorkspacesPromptBody"`` \| ``"closingAllWorkspacesPromptTitle"`` \| ``"discard"`` \| ``"hide"`` \| ``"maximize"`` \| ``"minimize"`` \| ``"openAnyway"`` \| ``"unsavedChangesInOpenedWorkspace"`` \| ``"unsavedChangesInWorkspace"`` \| ``"unsavedChangesTitleText"`` \| ``"workspaceHeader"`` \| ``"address1"`` \| ``"address2"`` \| ``"city"`` \| ``"cityVillage"`` \| ``"country"`` \| ``"countyDistrict"`` \| ``"postalCode"`` \| ``"state"`` \| ``"stateProvince"`` | - |
| `defaultText?` | `string` | - |
| `options?` | `object` | Object passed to the i18next `t` function. See https://www.i18next.com/translation-function/essentials#overview-options for more information. `ns` and `defaultValue` are already set and may not be used. |

Expand Down Expand Up @@ -5604,7 +5604,7 @@ For the patient chart, this is `workspace-header-patient-chart-slot`.

#### Defined in

[packages/framework/esm-styleguide/src/workspaces/window/workspace-window.component.tsx:48](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/workspaces/window/workspace-window.component.tsx#L48)
[packages/framework/esm-styleguide/src/workspaces/window/workspace-window.component.tsx:55](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/workspaces/window/workspace-window.component.tsx#L55)

___

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

#### Defined in

[packages/framework/esm-styleguide/src/workspaces/window/workspace-window.component.tsx:16](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/workspaces/window/workspace-window.component.tsx#L16)
[packages/framework/esm-styleguide/src/workspaces/window/workspace-window.component.tsx:23](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/workspaces/window/workspace-window.component.tsx#L23)

___

Expand All @@ -27,4 +27,4 @@ ___

#### Defined in

[packages/framework/esm-styleguide/src/workspaces/window/workspace-window.component.tsx:15](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/workspaces/window/workspace-window.component.tsx#L15)
[packages/framework/esm-styleguide/src/workspaces/window/workspace-window.component.tsx:22](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/workspaces/window/workspace-window.component.tsx#L22)
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
declare module '@carbon/react';
declare type SideNavProps = {
isChildOfHeader?: boolean;
};
declare module '*.css';
declare module '*.scss';
declare module '*.svg' {
const content: string;
export = content;
}
declare module '*.css';
declare module '*.scss';
declare type SideNavProps = {
isChildOfHeader?: boolean;
};
declare module '*.png';
2 changes: 2 additions & 0 deletions packages/framework/esm-framework/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/// <reference path="./declarations.d.ts" />

export * from '@openmrs/esm-api/src/public';
export * from '@openmrs/esm-config/src/public';
export * from '@openmrs/esm-dynamic-loading/src/public';
Expand Down
2 changes: 0 additions & 2 deletions packages/framework/esm-styleguide/src/icons/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/// <reference path="../declarations.d.ts" />

import visibility from './svgs/visibility_24px_rounded.svg';
import menu from './svgs/menu_24px_rounded.svg';
import search from './svgs/search_24px_rounded.svg';
Expand Down
2 changes: 0 additions & 2 deletions packages/framework/esm-styleguide/src/logo/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/// <reference path="../declarations.d.ts" />

import fullLogo from './openmrs-logo-full.svg';
import partialLogo from './openmrs-logo-partial.svg';
import iconLogo from './openmrs-logo-icon.svg';
Expand Down
2 changes: 0 additions & 2 deletions packages/shell/esm-app-shell/src/declarations.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
declare module '*.css';
declare module '*.scss';
declare const __webpack_share_scopes__: Record<
string,
Record<string, { loaded?: 1; get: () => Promise<unknown>; from: string; eager: boolean }>
Expand Down