-
Notifications
You must be signed in to change notification settings - Fork 208
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
O3-908 - Combine meta and index (#324)
* Prepare offline * Fixed the version of the file size impact * Include output optimizer * Updated importmap * Updated asset optimizer * Improved documentation * Improved translation * Improved tooling w.r.t. dependent modules * Updated docs * Fixed usage of non-spa based path O3-1022 * Added offline capability button * Fixed local representation * Applied prettier * Correctly mark openmrs dev dependency * Put default webpack config in dedicated package
- Loading branch information
1 parent
7c9d796
commit 98a6c6b
Showing
50 changed files
with
1,198 additions
and
442 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<mxfile host="Electron" modified="2022-02-11T14:21:24.945Z" agent="Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/12.2.2 Chrome/78.0.3904.94 Electron/7.1.0 Safari/537.36" etag="sAUTCDZsfW7qMPxC1mIL" version="12.2.2" type="device" pages="1"><diagram id="q1xaKWcLuFI0TARncDAu" name="State Machine">7V1Pc6M2FP80mWkPySCEZDhunE330M52Ju20e+ooINuaxcgFHMf99JUAGUsCm7gY3Dh7yIIQQrzf+6f39PANnC5ff0rJavELj2h84zrR6w18uHFd4ASe+E+2bFWL45Yt85RFVVvd8MT+oapj1bpmEc20jjnncc5WemPIk4SGudZG0pRv9G4zHutPXZE5tRqeQhLbrX+wKF+Urb47qdu/UDZfqCcDHJRXlkR1rt4kW5CIb/aa4OcbOE05z8uj5euUxpJ6ii7lfY8tV3cTS2mSd7nh+XmN//Jfvtzebr89AP7l6fPLT7fVKC8kXlcvXE023yoKiFEEscXJ/WbBcvq0IqG8shGAi7ZFvozFGRCHJFuVCMzYKxUPvc/ylH+nUx7ztBgKOs7jo+PsriiCItFSzYOmOX1tfUGwI5tgOM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sR4rs+IDcEyHUvh0ZEOtxGZhzVPzWYq93GxTwsJFGbTAgwwYFkB0U2OHmyKFdJ4wpkaG6kISLxqxoRmXnOksTkhV5ZjHLryhZ6vsGsGPj+raFf7fSmnoDXdv+6/9cJnPqLtfuBqG3ArOrKK/xdY8Xof+6k693wzPsR6DP+3F6X0fRbzAPqqpXq0E1PMT+tEhTPKI0AAugDMDTdvnM40xdEA+qr6nGlWr4TZoQ+QMLMd+wZC5xUrc7C/IiL0oMyoT+kpJEdLrbG3pVj9ybackEP8i5lDBWZ7/JFeyD3JjezDVcAD2LC922EJaHJoNYGaPCoil3HzQoHVUjcQYOeU8frDbFr+EzDMOKn70z5lORVVPp0t69q5jO8ovzrQDQjZCPbO9KlYEOUpqP7GBbhYvyga8UmGBsYLrEw3rSRsp4DPnVcENBBa5N70EVFLZjRV/PXtfwvxCFoOlrWnBAUcB2QOZ8v9/RSRaqTmcQA4xHFgM7iPK0TQqf8lrZX6n9/tlfnNY/h1auIutflYOf/wU=</diagram></mxfile> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
...apps/esm-offline-tools-app/src/offline-actions/offline-actions-mode-button.component.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
@import "../root.scss"; | ||
|
||
.offlineModeButtonContainer { | ||
display: flex; | ||
flex-direction: row; | ||
width: 16rem; | ||
justify-content: flex-start; | ||
color: $field-01; | ||
align-items: center; | ||
@extend .bodyLong01; | ||
height: 3rem; | ||
cursor: pointer; | ||
|
||
:global(.bx--toggle-input__label .bx--toggle__switch) { | ||
margin-top: 0 !important; | ||
} | ||
} | ||
|
||
.offlineModeButtonContainer svg { | ||
margin: 0rem 0.75rem; | ||
fill: $field-01; | ||
} | ||
|
||
.offlineModeButtonContainer > div { | ||
display: flex; | ||
flex-direction: row; | ||
width: fit-content; | ||
align-items: center; | ||
|
||
& > div { | ||
margin-left: 1rem; | ||
} | ||
} |
45 changes: 45 additions & 0 deletions
45
.../apps/esm-offline-tools-app/src/offline-actions/offline-actions-mode-button.component.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
import React from "react"; | ||
import { useTranslation } from "react-i18next"; | ||
import { Toggle } from "carbon-components-react"; | ||
import Network20 from "@carbon/icons-react/es/network--3/20"; | ||
import { | ||
getCurrentOfflineMode, | ||
setCurrentOfflineMode, | ||
} from "@openmrs/esm-framework"; | ||
import styles from "./offline-actions-mode-button.component.scss"; | ||
|
||
function doNotCloseMenu(ev: React.SyntheticEvent) { | ||
ev.stopPropagation(); | ||
} | ||
|
||
const OfflineActionsModeButton: React.FC = () => { | ||
const { t } = useTranslation(); | ||
const [active, setActive] = React.useState( | ||
() => getCurrentOfflineMode().active | ||
); | ||
const toggle = React.useCallback(() => { | ||
setActive((value) => { | ||
const active = !value; | ||
setCurrentOfflineMode(active ? "on" : "off"); | ||
return active; | ||
}); | ||
}, []); | ||
|
||
return ( | ||
<div className={styles.offlineModeButtonContainer}> | ||
<Network20 /> | ||
<div onClick={doNotCloseMenu} role="none"> | ||
{t("offlineReady", "Offline Ready")} | ||
<Toggle | ||
id="offlineModeSwitch" | ||
labelA="" | ||
labelB="" | ||
toggled={active} | ||
onToggle={toggle} | ||
/> | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default OfflineActionsModeButton; |
4 changes: 2 additions & 2 deletions
4
...pps/esm-offline-tools-app/src/offline-actions/offline-actions-overview-card.component.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.