diff --git a/.husky/pre-commit b/.husky/pre-commit index b79f9a4b6..88d011794 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -4,5 +4,5 @@ set -e # die on error yarn run extract-translations -npx pretty-quick --staged -npx lerna run document --since master +yarn pretty-quick --staged +yarn lerna run document --since master diff --git a/.husky/pre-push b/.husky/pre-push index de5c5665b..67d27ec0d 100755 --- a/.husky/pre-push +++ b/.husky/pre-push @@ -3,6 +3,6 @@ set -e # die on error -npx lerna run lint --since master -npx lerna run test --since master -npx lerna run typescript --since master +yarn lerna run lint --since master +yarn lerna run test --since master +yarn lerna run typescript --since master diff --git a/packages/apps/esm-implementer-tools-app/src/configuration/configuration.component.tsx b/packages/apps/esm-implementer-tools-app/src/configuration/configuration.component.tsx index 319007b53..36f6e4e89 100644 --- a/packages/apps/esm-implementer-tools-app/src/configuration/configuration.component.tsx +++ b/packages/apps/esm-implementer-tools-app/src/configuration/configuration.component.tsx @@ -7,10 +7,11 @@ import { Config, ConfigInternalStore, configInternalStore, + getExtensionInternalStore, implementerToolsConfigStore, temporaryConfigStore, - useExtensionInternalStore, useStore, + useStoreWithActions, } from "@openmrs/esm-framework"; import { Button, @@ -89,13 +90,13 @@ export const Configuration: React.FC = () => { toggleIsJsonModeEnabled, isConfigToolbarOpen, toggleIsToolbarOpen, - } = useStore(implementerToolsStore, actions); - const { devDefaultsAreOn, toggleDevDefaults } = useStore( + } = useStoreWithActions(implementerToolsStore, actions); + const { devDefaultsAreOn, toggleDevDefaults } = useStoreWithActions( configInternalStore, configActions ); const { config } = useStore(implementerToolsConfigStore); - const extensionStore = useExtensionInternalStore(); + const extensionStore = useStore(getExtensionInternalStore()); const tempConfigStore = useStore(temporaryConfigStore); const [filterText, setFilterText] = useState(""); const tempConfig = tempConfigStore.config; diff --git a/packages/apps/esm-implementer-tools-app/src/ui-editor/ui-editor.tsx b/packages/apps/esm-implementer-tools-app/src/ui-editor/ui-editor.tsx index 516101cd4..50cabac89 100644 --- a/packages/apps/esm-implementer-tools-app/src/ui-editor/ui-editor.tsx +++ b/packages/apps/esm-implementer-tools-app/src/ui-editor/ui-editor.tsx @@ -1,14 +1,18 @@ import React from "react"; import styles from "./styles.css"; import Close16 from "@carbon/icons-react/es/close/16"; -import { useExtensionInternalStore, useStore } from "@openmrs/esm-framework"; +import { + getExtensionInternalStore, + useStore, + useStoreWithActions, +} from "@openmrs/esm-framework"; import { Button } from "carbon-components-react"; import { Portal } from "./portal"; import { ExtensionOverlay } from "./extension-overlay.component"; import { ImplementerToolsStore, implementerToolsStore } from "../store"; export default function UiEditor() { - const { slots, extensions } = useExtensionInternalStore(); + const { slots, extensions } = useStore(getExtensionInternalStore()); const { isOpen: implementerToolsIsOpen } = useStore(implementerToolsStore); return ( @@ -66,7 +70,10 @@ const actions = { }; export function ExitButton() { - const { toggleIsUIEditorEnabled } = useStore(implementerToolsStore, actions); + const { toggleIsUIEditorEnabled } = useStoreWithActions( + implementerToolsStore, + actions + ); return (