@uxland/primary-shell 5.1.2 → 5.2.1
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/index.js +27064 -26699
- package/dist/index.js.map +1 -1
- package/dist/index.umd.cjs +1660 -1531
- package/dist/index.umd.cjs.map +1 -1
- package/dist/primary/shell/src/UI/bootstrapper.d.ts +1 -0
- package/dist/primary/shell/src/UI/components/bootstrapper.d.ts +1 -0
- package/dist/primary/shell/src/UI/components/{shell-header → primaria-shell/shell-header}/shell-header.d.ts +3 -3
- package/dist/primary/shell/src/UI/components/primaria-shell/shell-header/template.d.ts +3 -0
- package/dist/primary/shell/src/UI/index.d.ts +0 -1
- package/dist/primary/shell/src/UI/shared-components/bootstrapper.d.ts +1 -0
- package/dist/primary/shell/src/UI/shared-components/index.d.ts +0 -1
- package/dist/primary/shell/src/UI/shared-components/primaria-character-limit-badge/primaria-character-limit-badge.d.ts +9 -0
- package/dist/primary/shell/src/api/api.d.ts +4 -4
- package/dist/primary/shell/src/api/ecap-event-manager/ecap-event-manager.test.d.ts +1 -0
- package/dist/primary/shell/src/api/notification-service/notification-service-impl.test.d.ts +1 -0
- package/dist/primary/shell/src/api/pdf-viewer-manager/constants.d.ts +1 -0
- package/dist/primary/shell/src/api/pdf-viewer-manager/handle-views.d.ts +2 -0
- package/dist/primary/shell/src/api/pdf-viewer-manager/pdf-viewer-manager.d.ts +2 -4
- package/dist/primary/shell/src/api/pdf-viewer-manager/pdf-viewer-manager.test.d.ts +1 -0
- package/dist/primary/shell/src/api/region-manager/region-manager.test.d.ts +1 -0
- package/dist/primary/shell/src/bootstrapper.d.ts +0 -1
- package/dist/primary/shell/src/constants.d.ts +0 -2
- package/dist/primary/shell/src/features/bootstrapper.d.ts +2 -2
- package/dist/primary/shell/src/features/clinical-monitoring/bootstrapper.d.ts +4 -0
- package/dist/primary/shell/src/features/clinical-monitoring/constants.d.ts +1 -0
- package/dist/primary/shell/src/features/clinical-monitoring/handle-views.d.ts +1 -0
- package/dist/primary/shell/src/features/exit/bootstrapper.d.ts +4 -2
- package/dist/primary/shell/src/features/exit/handler.test.d.ts +1 -0
- package/dist/primary/shell/src/features/get-patient-cip/action.d.ts +3 -0
- package/dist/primary/shell/src/features/get-user-info/bootstrapper.d.ts +4 -2
- package/dist/primary/shell/src/features/get-user-info/handler.d.ts +1 -1
- package/dist/primary/shell/src/features/get-user-info/handler.test.d.ts +1 -0
- package/dist/primary/shell/src/features/navigate-to-ecap/navigate-without-closing-and-with-cip.d.ts +1 -0
- package/dist/primary/shell/src/handle-views.d.ts +1 -2
- package/dist/primary/shell/src/internal-plugins/activity-history/utils/get-unique-values-by-prop-path.test.d.ts +1 -0
- package/dist/primary/shell/src/internal-plugins/activity-history/utils/normalize-string.d.ts +1 -1
- package/dist/primary/shell/src/internal-plugins/activity-history/utils/normalize-string.test.d.ts +1 -0
- package/dist/primary/shell/src/internal-plugins/activity-history/utils/prop-contains-string.test.d.ts +1 -0
- package/dist/primary/shell/src/locales.d.ts +1 -1
- package/package.json +2 -2
- package/src/UI/bootstrapper.ts +12 -0
- package/src/UI/components/bootstrapper.ts +17 -0
- package/src/UI/components/{primaria-error-view → error-view}/component.ts +2 -3
- package/src/UI/components/poc-events-ecap/poc-events-ecap.ts +3 -7
- package/src/UI/components/primaria-shell/primaria-shell.ts +8 -10
- package/src/UI/components/{shell-header → primaria-shell/shell-header}/shell-header.ts +8 -9
- package/src/UI/components/{shell-header → primaria-shell/shell-header}/template.ts +4 -4
- package/src/UI/components/primaria-shell/template.ts +14 -8
- package/src/UI/components/quick-actions-menu/quick-actions-menu.ts +0 -2
- package/src/UI/index.ts +0 -1
- package/src/UI/shared-components/bootstrapper.ts +14 -0
- package/src/UI/shared-components/index.ts +0 -3
- package/src/UI/shared-components/primaria-character-limit-badge/primaria-character-limit-badge.ts +29 -0
- package/src/UI/shared-components/primaria-character-limit-badge/styles.css +8 -0
- package/src/UI/shared-components/primaria-content-switcher/primaria-content-switcher.ts +1 -2
- package/src/UI/shared-components/primaria-nav-item/primaria-nav-item.ts +6 -7
- package/src/UI/shared-components/primaria-nav-tree-menu/primaria-nav-tree-menu.ts +3 -4
- package/src/UI/shared-components/primaria-text-editor/primaria-rich-text-editor.ts +1 -2
- package/src/api/api.ts +17 -14
- package/src/api/ecap-event-manager/ecap-event-manager.test.ts +48 -0
- package/src/api/notification-service/notification-service-impl.test.ts +56 -0
- package/src/api/pdf-viewer-manager/constants.ts +1 -0
- package/src/api/pdf-viewer-manager/handle-views.ts +32 -0
- package/src/api/pdf-viewer-manager/pdf-viewer-manager.test.ts +99 -0
- package/src/api/pdf-viewer-manager/pdf-viewer-manager.ts +15 -25
- package/src/{UI/components → api/pdf-viewer-manager}/pdf-visor/pdf-selector/pdf-selector.ts +3 -4
- package/src/{UI/components → api/pdf-viewer-manager}/pdf-visor/pdf-visor.ts +8 -9
- package/src/api/plugin-busy-manager/plugin-busy-list/component.ts +0 -2
- package/src/api/plugin-busy-manager/plugin-busy-manager.ts +7 -1
- package/src/api/region-manager/region-manager.test.ts +123 -0
- package/src/bootstrapper.ts +8 -9
- package/src/constants.ts +0 -2
- package/src/disposer.ts +2 -2
- package/src/features/bootstrapper.ts +14 -8
- package/src/features/clinical-monitoring/bootstrapper.ts +39 -0
- package/src/{UI/components/clinical-monitoring → features/clinical-monitoring/component}/clinical-monitoring.ts +3 -6
- package/src/features/clinical-monitoring/constants.ts +1 -0
- package/src/features/clinical-monitoring/handle-views.ts +6 -0
- package/src/features/exit/bootstrapper.ts +5 -5
- package/src/features/exit/handler.test.ts +103 -0
- package/src/features/get-patient-cip/action.ts +5 -0
- package/src/features/get-user-info/bootstrapper.ts +5 -5
- package/src/features/get-user-info/handler.test.ts +60 -0
- package/src/features/get-user-info/handler.ts +2 -4
- package/src/features/navigate-to-ecap/navigate-without-closing-and-with-cip.ts +7 -0
- package/src/handle-views.ts +78 -142
- package/src/internal-plugins/activity-history/utils/get-unique-values-by-prop-path.test.ts +61 -0
- package/src/internal-plugins/activity-history/utils/get-unique-values-by-prop-path.ts +2 -2
- package/src/internal-plugins/activity-history/utils/normalize-string.test.ts +29 -0
- package/src/internal-plugins/activity-history/utils/normalize-string.ts +5 -3
- package/src/internal-plugins/activity-history/utils/prop-contains-string.test.ts +47 -0
- package/src/locales.ts +1 -1
- package/dist/primary/shell/src/UI/components/index.d.ts +0 -1
- package/dist/primary/shell/src/UI/components/shell-header/template.d.ts +0 -3
- package/src/UI/components/index.ts +0 -7
- /package/dist/primary/shell/src/UI/components/{primaria-error-view → error-view}/component.d.ts +0 -0
- /package/dist/primary/shell/src/UI/components/{primaria-error-view → error-view}/template.d.ts +0 -0
- /package/dist/primary/shell/src/{UI/components → api/pdf-viewer-manager}/pdf-visor/pdf-selector/pdf-selector.d.ts +0 -0
- /package/dist/primary/shell/src/{UI/components → api/pdf-viewer-manager}/pdf-visor/pdf-selector/template.d.ts +0 -0
- /package/dist/primary/shell/src/{UI/components → api/pdf-viewer-manager}/pdf-visor/pdf-visor.d.ts +0 -0
- /package/dist/primary/shell/src/{UI/components → api/pdf-viewer-manager}/pdf-visor/utils.d.ts +0 -0
- /package/dist/primary/shell/src/{UI/components/clinical-monitoring → features/clinical-monitoring/component}/clinical-monitoring.d.ts +0 -0
- /package/dist/primary/shell/src/{UI/components/clinical-monitoring → features/clinical-monitoring/component}/template.d.ts +0 -0
- /package/src/UI/components/{primaria-error-view → error-view}/styles.css +0 -0
- /package/src/UI/components/{primaria-error-view → error-view}/template.ts +0 -0
- /package/src/UI/components/{shell-header → primaria-shell/shell-header}/styles.css +0 -0
- /package/src/{UI/components → api/pdf-viewer-manager}/pdf-visor/pdf-selector/styles.css +0 -0
- /package/src/{UI/components → api/pdf-viewer-manager}/pdf-visor/pdf-selector/template.ts +0 -0
- /package/src/{UI/components → api/pdf-viewer-manager}/pdf-visor/styles.css +0 -0
- /package/src/{UI/components → api/pdf-viewer-manager}/pdf-visor/utils.ts +0 -0
- /package/src/{UI/components/clinical-monitoring → features/clinical-monitoring/component}/styles.css +0 -0
- /package/src/{UI/components/clinical-monitoring → features/clinical-monitoring/component}/template.ts +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useUI: () => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useComponents: () => void;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { IUserInfo } from 'primary/shell/src/features/get-user-info/model';
|
|
2
1
|
import { IRegion } from '@uxland/regions';
|
|
2
|
+
import { IUserInfo } from 'primary/shell/src/features/get-user-info/model';
|
|
3
3
|
|
|
4
|
-
declare const
|
|
5
|
-
export declare class
|
|
4
|
+
declare const PrimariaShellHeader_base: any;
|
|
5
|
+
export declare class PrimariaShellHeader extends PrimariaShellHeader_base {
|
|
6
6
|
render(): import('lit').TemplateResult<1>;
|
|
7
7
|
static styles: import('lit').CSSResult;
|
|
8
8
|
headerRegion: IRegion | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useSharedUI: () => void;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { LitElement, nothing } from 'lit';
|
|
2
|
+
|
|
3
|
+
export declare class PrimariaCharacterLimitBadge extends LitElement {
|
|
4
|
+
characterCount: number;
|
|
5
|
+
characterLimit: number;
|
|
6
|
+
label: string;
|
|
7
|
+
static styles: import('lit').CSSResult;
|
|
8
|
+
render(): import('lit').TemplateResult<1> | typeof nothing;
|
|
9
|
+
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { ApiFactory, HarmonixApi } from '@uxland/harmonix';
|
|
2
|
-
import { PrimariaRegionManager } from './region-manager/region-manager';
|
|
3
2
|
import { PrimariaBroker } from './broker/primaria-broker';
|
|
3
|
+
import { EcapEventManager } from './ecap-event-manager/ecap-event-manager';
|
|
4
4
|
import { PrimariaGlobalStateManager } from './global-state/global-state';
|
|
5
5
|
import { HttpClient } from './http-client/http-client';
|
|
6
|
-
import { TokenManager } from './token-manager/token-manager';
|
|
7
|
-
import { EcapEventManager } from './ecap-event-manager/ecap-event-manager';
|
|
8
|
-
import { PluginBusyManager } from './plugin-busy-manager/plugin-busy-manager';
|
|
9
6
|
import { PrimariaInteractionService } from './interaction-service';
|
|
10
7
|
import { PrimariaNotificationService } from './notification-service/notification-service';
|
|
11
8
|
import { PdfViewerManager } from './pdf-viewer-manager/pdf-viewer-manager';
|
|
9
|
+
import { PluginBusyManager } from './plugin-busy-manager/plugin-busy-manager';
|
|
10
|
+
import { PrimariaRegionManager } from './region-manager/region-manager';
|
|
11
|
+
import { TokenManager } from './token-manager/token-manager';
|
|
12
12
|
|
|
13
13
|
export interface PrimariaApi extends HarmonixApi {
|
|
14
14
|
httpClient: HttpClient;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const pdfViewerId = "pdf-viewer";
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { PrimariaBroker } from '../broker/primaria-broker';
|
|
2
2
|
import { PrimariaNotificationService } from '../notification-service/notification-service';
|
|
3
|
-
import { PrimariaRegionManager } from '../region-manager/region-manager';
|
|
4
3
|
|
|
5
4
|
export interface IPdfDocument {
|
|
6
5
|
pdfName: string;
|
|
@@ -14,8 +13,7 @@ export interface PdfData {
|
|
|
14
13
|
export declare class PdfViewerManager {
|
|
15
14
|
private broker;
|
|
16
15
|
private notificationService;
|
|
17
|
-
|
|
18
|
-
constructor(broker: PrimariaBroker, notificationService: PrimariaNotificationService, regionManager: PrimariaRegionManager);
|
|
16
|
+
constructor(broker: PrimariaBroker, notificationService: PrimariaNotificationService);
|
|
19
17
|
private pdfs;
|
|
20
18
|
private activePdf;
|
|
21
19
|
private hasBeenActivated;
|
|
@@ -24,4 +22,4 @@ export declare class PdfViewerManager {
|
|
|
24
22
|
getPdfs(): IPdfDocument[];
|
|
25
23
|
private registerNavButton;
|
|
26
24
|
}
|
|
27
|
-
export declare const createPdfViewerManager: (broker: PrimariaBroker, notificationService: PrimariaNotificationService
|
|
25
|
+
export declare const createPdfViewerManager: (broker: PrimariaBroker, notificationService: PrimariaNotificationService) => PdfViewerManager;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { PrimariaApi } from '../api/api';
|
|
2
2
|
|
|
3
|
-
export declare const
|
|
4
|
-
export declare const
|
|
3
|
+
export declare const useFeatures: (api: PrimariaApi) => void;
|
|
4
|
+
export declare const disposeFeatures: (api: PrimariaApi) => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const clinicalMonitoringId = "clinical-monitoring";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const activateClinicalMonitoringView: () => void;
|
|
@@ -1,2 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { PrimariaApi } from '../../api/api';
|
|
2
|
+
|
|
3
|
+
export declare const useExitShell: (api: PrimariaApi) => void;
|
|
4
|
+
export declare const disposeExitShell: () => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,2 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { PrimariaApi } from '../../api/api';
|
|
2
|
+
|
|
3
|
+
export declare const useGetUserInfo: (api: PrimariaApi) => void;
|
|
4
|
+
export declare const disposeGetUserInfo: () => void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { PrimariaApi } from '../..';
|
|
2
1
|
import { GetUserInfo } from './request';
|
|
3
2
|
import { IUserInfo } from './model';
|
|
4
3
|
import { UserInfoBackendAdapter } from './backend-adapter';
|
|
4
|
+
import { PrimariaApi } from '../../api/api';
|
|
5
5
|
|
|
6
6
|
export declare class GetUserInfoHandler {
|
|
7
7
|
private api;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/primary/shell/src/features/navigate-to-ecap/navigate-without-closing-and-with-cip.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const navigateToEcapWithoutClosingWithCip: (eventName: string) => Promise<void>;
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export declare const
|
|
2
|
-
export declare const activateDefaultView: () => void;
|
|
1
|
+
export declare const useInternalViews: () => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/primary/shell/src/internal-plugins/activity-history/utils/normalize-string.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const normalizeStringToNFD: (text: string) => string;
|
|
1
|
+
export declare const normalizeStringToNFD: (text: string | number | boolean | null | undefined) => string;
|
package/dist/primary/shell/src/internal-plugins/activity-history/utils/normalize-string.test.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -2,7 +2,7 @@ import { PrimariaApi } from './api/api';
|
|
|
2
2
|
import { primariaShellId } from './constants';
|
|
3
3
|
|
|
4
4
|
declare let shellLocaleManager: any;
|
|
5
|
-
export declare const
|
|
5
|
+
export declare const useLocalization: (api: PrimariaApi) => Promise<void>;
|
|
6
6
|
type LocaleKeys<T> = T extends object ? {
|
|
7
7
|
[K in keyof T]: `${K & string}` | (T[K] extends object ? `${K & string}.${LocaleKeys<T[K]>}` : never);
|
|
8
8
|
}[keyof T] : never;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uxland/primary-shell",
|
|
3
|
-
"version": "5.1
|
|
3
|
+
"version": "5.2.1",
|
|
4
4
|
"description": "Primaria Shell",
|
|
5
5
|
"author": "UXLand <dev@uxland.es>",
|
|
6
6
|
"homepage": "https://github.com/uxland/harmonix/tree/app#readme",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"react-dom": "^19.0.0",
|
|
45
45
|
"@types/react": "^19.0.12",
|
|
46
46
|
"inversify-inject-decorators": "^3.1.0",
|
|
47
|
-
"@salut/design-system-salut": "../../design-system-salut-2.
|
|
47
|
+
"@salut/design-system-salut": "../../design-system-salut-2.4.0.tgz",
|
|
48
48
|
"jwt-decode": "^4.0.0",
|
|
49
49
|
"lit": "^3.1.0",
|
|
50
50
|
"mediatr-ts": "^1.2.1",
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { regionAdapterRegistry, selectableAdapterFactory } from "@uxland/regions";
|
|
2
|
+
import { useComponents } from "./components/bootstrapper";
|
|
3
|
+
import { useSharedUI } from "./shared-components/bootstrapper";
|
|
4
|
+
|
|
5
|
+
export const useUI = () => {
|
|
6
|
+
regionAdapterRegistry.registerAdapterFactory(
|
|
7
|
+
"primaria-content-switcher",
|
|
8
|
+
selectableAdapterFactory,
|
|
9
|
+
);
|
|
10
|
+
useSharedUI();
|
|
11
|
+
useComponents();
|
|
12
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { customElement } from "lit/decorators.js";
|
|
2
|
+
import { PrimariaShell } from "./primaria-shell/primaria-shell";
|
|
3
|
+
import { PrimariaErrorView } from "./error-view/component";
|
|
4
|
+
import { QuickActionsMenu } from "./quick-actions-menu/quick-actions-menu";
|
|
5
|
+
import { PrimariaShellHeader } from "./primaria-shell/shell-header/shell-header";
|
|
6
|
+
import { PocEventsEcap } from "./poc-events-ecap/poc-events-ecap";
|
|
7
|
+
|
|
8
|
+
export const useComponents = () => {
|
|
9
|
+
//@ts-ignore
|
|
10
|
+
customElement("primaria-shell")(PrimariaShell);
|
|
11
|
+
//@ts-ignore
|
|
12
|
+
customElement("primaria-shell-header")(PrimariaShellHeader);
|
|
13
|
+
customElement("primaria-error-view")(PrimariaErrorView);
|
|
14
|
+
customElement("quick-actions-menu")(QuickActionsMenu);
|
|
15
|
+
//@ts-ignore
|
|
16
|
+
customElement("poc-events-ecap")(PocEventsEcap);
|
|
17
|
+
};
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { LitElement, css, html, unsafeCSS } from "lit";
|
|
2
|
-
import {
|
|
2
|
+
import { property } from "lit/decorators.js";
|
|
3
3
|
import styles from "./styles.css?inline";
|
|
4
4
|
import { template } from "./template";
|
|
5
5
|
|
|
6
|
-
@customElement("primaria-error-view")
|
|
7
6
|
export class PrimariaErrorView extends LitElement {
|
|
8
7
|
render() {
|
|
9
8
|
return html`${template(this)}`;
|
|
@@ -14,5 +13,5 @@ export class PrimariaErrorView extends LitElement {
|
|
|
14
13
|
`;
|
|
15
14
|
|
|
16
15
|
@property()
|
|
17
|
-
error: {message: string};
|
|
16
|
+
error: { message: string };
|
|
18
17
|
}
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import { LitElement, css, html } from "lit";
|
|
2
|
-
import { customElement } from "lit/decorators.js";
|
|
3
2
|
import { shellApi } from "../../../api/api";
|
|
4
3
|
|
|
5
|
-
//@ts-ignore
|
|
6
|
-
@customElement("poc-events-ecap")
|
|
7
4
|
export class PocEventsEcap extends LitElement {
|
|
8
5
|
render() {
|
|
9
6
|
return html`<div>
|
|
@@ -43,12 +40,11 @@ export class PocEventsEcap extends LitElement {
|
|
|
43
40
|
const pdfName = (this as any).shadowRoot?.getElementById("pdfName")?.value as string;
|
|
44
41
|
const fileName = (this as any).shadowRoot?.getElementById("url")?.value as string;
|
|
45
42
|
|
|
46
|
-
const data = fileName;
|
|
43
|
+
const data = { url: fileName };
|
|
47
44
|
|
|
48
|
-
|
|
49
|
-
console.log("Añadiendo PDF:", pdf);
|
|
45
|
+
console.log("Añadiendo PDF:", pdfName);
|
|
50
46
|
|
|
51
|
-
shellApi.pdfViewerManager.add(
|
|
47
|
+
shellApi.pdfViewerManager.add(pdfName, data);
|
|
52
48
|
}
|
|
53
49
|
|
|
54
50
|
getPDFS() {
|
|
@@ -1,19 +1,17 @@
|
|
|
1
1
|
import { IRegion, region } from "@uxland/regions";
|
|
2
|
+
import { BrokerDisposableHandler } from "harmonix/core/dist";
|
|
2
3
|
import { LitElement, css, html, unsafeCSS } from "lit";
|
|
4
|
+
import { state } from "lit/decorators.js";
|
|
3
5
|
import { PrimariaRegionHost, shellApi } from "../../../api/api";
|
|
4
|
-
import { customElement, state } from "lit/decorators.js";
|
|
5
6
|
import { shellRegions } from "../../../api/region-manager/regions";
|
|
6
|
-
import
|
|
7
|
-
import { template } from "./template";
|
|
8
|
-
import { shellViews } from "./constants";
|
|
7
|
+
import { disposeShell } from "../../../disposer";
|
|
9
8
|
import { shellEvents } from "../../../events";
|
|
10
|
-
import { activateDefaultView } from "../../../handle-views";
|
|
11
|
-
import { BrokerDisposableHandler } from "harmonix/core/dist";
|
|
12
9
|
import { translate } from "../../../locales";
|
|
13
|
-
import {
|
|
10
|
+
import { shellViews } from "./constants";
|
|
11
|
+
import styles from "./styles.css?inline";
|
|
12
|
+
import { template } from "./template";
|
|
13
|
+
import { activateClinicalMonitoringView } from "../../../features/clinical-monitoring/handle-views";
|
|
14
14
|
|
|
15
|
-
//@ts-ignore
|
|
16
|
-
@customElement("primaria-shell")
|
|
17
15
|
export class PrimariaShell extends PrimariaRegionHost(LitElement) {
|
|
18
16
|
render() {
|
|
19
17
|
return html`${template(this)}`;
|
|
@@ -36,7 +34,7 @@ export class PrimariaShell extends PrimariaRegionHost(LitElement) {
|
|
|
36
34
|
firstUpdated() {
|
|
37
35
|
super.firstUpdated();
|
|
38
36
|
setTimeout(() => {
|
|
39
|
-
|
|
37
|
+
activateClinicalMonitoringView();
|
|
40
38
|
}, 300);
|
|
41
39
|
}
|
|
42
40
|
|
|
@@ -1,16 +1,15 @@
|
|
|
1
|
+
import { IRegion, region } from "@uxland/regions";
|
|
1
2
|
import { LitElement, css, html, unsafeCSS } from "lit";
|
|
2
|
-
import {
|
|
3
|
-
import { template } from "./template";
|
|
4
|
-
import { PrimariaRegionHost, shellApi } from "../../../api/api";
|
|
3
|
+
import { property, state } from "lit/decorators.js";
|
|
5
4
|
import { IUserInfo } from "primary/shell/src/features/get-user-info/model";
|
|
6
|
-
import {
|
|
5
|
+
import { PrimariaRegionHost, shellApi } from "../../../../api/api";
|
|
6
|
+
import { shellRegions } from "../../../../api/region-manager/regions";
|
|
7
|
+
import { ExitShell } from "../../../../features/exit/request";
|
|
8
|
+
import { GetUserInfo } from "../../../../features/get-user-info/request";
|
|
7
9
|
import styles from "./styles.css?inline";
|
|
8
|
-
import {
|
|
9
|
-
import { IRegion, region } from "@uxland/regions";
|
|
10
|
-
import { ExitShell } from "../../../features/exit/request";
|
|
10
|
+
import { template } from "./template";
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
export class ShellHeader extends PrimariaRegionHost(LitElement) {
|
|
12
|
+
export class PrimariaShellHeader extends PrimariaRegionHost(LitElement) {
|
|
14
13
|
render() {
|
|
15
14
|
return html`${template(this)}`;
|
|
16
15
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { html } from "lit";
|
|
2
|
-
import salutLogo from "
|
|
3
|
-
import {
|
|
2
|
+
import salutLogo from "../../../../UI/images/Salut_Logotip.svg";
|
|
3
|
+
import { PrimariaShellHeader } from "./shell-header";
|
|
4
4
|
import { when } from "lit/directives/when.js";
|
|
5
|
-
import { translate } from "
|
|
5
|
+
import { translate } from "../../../../locales";
|
|
6
6
|
|
|
7
|
-
export const template = (props:
|
|
7
|
+
export const template = (props: PrimariaShellHeader) => {
|
|
8
8
|
const workCenterElements = [{ label: props.professional?.workCenter, value: "1" }];
|
|
9
9
|
const roleElements = [{ label: props.professional?.role, value: "1" }];
|
|
10
10
|
const specialityElements = [{ label: props.professional?.speciality, value: "1" }];
|
|
@@ -5,12 +5,12 @@ import { html, nothing } from "lit";
|
|
|
5
5
|
import gencatLogo from "../../../UI/images/Gencat_Logotip.svg";
|
|
6
6
|
import { PrimariaShell } from "./primaria-shell";
|
|
7
7
|
import { shellViews } from "./constants";
|
|
8
|
-
import {translate} from
|
|
8
|
+
import { translate } from "../../../locales";
|
|
9
9
|
|
|
10
10
|
export const template = (props: PrimariaShell) => html`
|
|
11
11
|
<primaria-content-switcher id="main-switcher" attrForSelected="view" .selected=${props.viewSelected}>
|
|
12
12
|
<div class="container" view=${shellViews.shell}>
|
|
13
|
-
<shell-header></shell-header>
|
|
13
|
+
<primaria-shell-header></primaria-shell-header>
|
|
14
14
|
<div class="main-container">
|
|
15
15
|
<div class="sidebar" ?expanded=${props.sidebarExpanded}>
|
|
16
16
|
<div id="menu-region-container"></div>
|
|
@@ -18,13 +18,17 @@ export const template = (props: PrimariaShell) => html`
|
|
|
18
18
|
<quick-actions-menu>
|
|
19
19
|
<div class="${props.sidebarExpanded ? "create-button-opened" : "create-button-closed"} " slot="anchor" id="usage-anchor">
|
|
20
20
|
<div class="${props.quickActionBusy ? "create-button-icon-badge" : ""}">
|
|
21
|
-
${props.quickActionBusy ? html`<dss-notification-badge value="" state="error" borderwhite="" type="default" dot=""></dss-notification-badge
|
|
21
|
+
${props.quickActionBusy ? html`<dss-notification-badge value="" state="error" borderwhite="" type="default" dot=""></dss-notification-badge>` : nothing}
|
|
22
22
|
<dss-icon class="${props.sidebarExpanded ? "icon" : ""}" icon="add_circle_outline" size="md"></dss-icon>
|
|
23
23
|
</div>
|
|
24
|
-
${props.sidebarExpanded ? translate(
|
|
25
|
-
${
|
|
26
|
-
|
|
27
|
-
|
|
24
|
+
${props.sidebarExpanded ? translate("actions.create") : nothing}
|
|
25
|
+
${
|
|
26
|
+
!props.sidebarExpanded
|
|
27
|
+
? html`<dss-tooltip position="right">
|
|
28
|
+
${translate("actions.create")}
|
|
29
|
+
</dss-tooltip>`
|
|
30
|
+
: nothing
|
|
31
|
+
}
|
|
28
32
|
</div>
|
|
29
33
|
<dss-action-menu id="quick-actions-region-container" slot="content" id="content" anchor="usage-anchor"></dss-action-menu>
|
|
30
34
|
</quick-actions-menu>
|
|
@@ -37,7 +41,9 @@ export const template = (props: PrimariaShell) => html`
|
|
|
37
41
|
<primaria-nav-item
|
|
38
42
|
.config=${{
|
|
39
43
|
icon: "expand_circle_right",
|
|
40
|
-
label: props.sidebarExpanded
|
|
44
|
+
label: props.sidebarExpanded
|
|
45
|
+
? translate("actions.toggleMenuClose")
|
|
46
|
+
: translate("actions.toggleMenuOpen"),
|
|
41
47
|
fill: true,
|
|
42
48
|
rotateIcon: props.sidebarExpanded,
|
|
43
49
|
callbackFn: () => props._toggleSidebar(),
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { LitElement, html } from "lit";
|
|
2
|
-
import { customElement } from "lit/decorators.js";
|
|
3
2
|
import { template } from "./template";
|
|
4
3
|
|
|
5
|
-
@customElement("quick-actions-menu")
|
|
6
4
|
export class QuickActionsMenu extends LitElement {
|
|
7
5
|
render() {
|
|
8
6
|
return html`${template(this)}`;
|
package/src/UI/index.ts
CHANGED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { customElement } from "lit/decorators.js";
|
|
2
|
+
import { PrimariaContentSwitcher } from "./primaria-content-switcher/primaria-content-switcher";
|
|
3
|
+
import { PrimariaNavItem } from "./primaria-nav-item/primaria-nav-item";
|
|
4
|
+
import { PrimariaNavTreeMenu } from "./primaria-nav-tree-menu/primaria-nav-tree-menu";
|
|
5
|
+
import { PrimariaRichTextEditor } from "./primaria-text-editor/primaria-rich-text-editor";
|
|
6
|
+
import { PrimariaCharacterLimitBadge } from "./primaria-character-limit-badge/primaria-character-limit-badge";
|
|
7
|
+
|
|
8
|
+
export const useSharedUI = () => {
|
|
9
|
+
customElement("primaria-content-switcher")(PrimariaContentSwitcher);
|
|
10
|
+
customElement("primaria-nav-item")(PrimariaNavItem);
|
|
11
|
+
customElement("primaria-rich-text-editor")(PrimariaRichTextEditor);
|
|
12
|
+
customElement("primaria-nav-tree-menu")(PrimariaNavTreeMenu);
|
|
13
|
+
customElement("primaria-character-limit-badge")(PrimariaCharacterLimitBadge);
|
|
14
|
+
};
|
package/src/UI/shared-components/primaria-character-limit-badge/primaria-character-limit-badge.ts
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { LitElement, html, nothing, css, unsafeCSS } from "lit";
|
|
2
|
+
import { property } from "lit/decorators.js";
|
|
3
|
+
import styles from "./styles.css?inline";
|
|
4
|
+
|
|
5
|
+
export class PrimariaCharacterLimitBadge extends LitElement {
|
|
6
|
+
@property({ type: Number }) characterCount = 0;
|
|
7
|
+
@property({ type: Number }) characterLimit = 0;
|
|
8
|
+
@property({ type: String }) label = "";
|
|
9
|
+
|
|
10
|
+
static styles = css`
|
|
11
|
+
${unsafeCSS(styles)}
|
|
12
|
+
`;
|
|
13
|
+
|
|
14
|
+
render() {
|
|
15
|
+
if (this.characterCount > this.characterLimit) {
|
|
16
|
+
return html`
|
|
17
|
+
<dss-badge
|
|
18
|
+
class="limit-badge"
|
|
19
|
+
icon="report"
|
|
20
|
+
size="md"
|
|
21
|
+
state="alert"
|
|
22
|
+
text="${this.label} ${this.characterCount}/${this.characterLimit}"
|
|
23
|
+
outlined
|
|
24
|
+
></dss-badge>
|
|
25
|
+
`;
|
|
26
|
+
}
|
|
27
|
+
return nothing;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { LitElement, css, html } from "lit";
|
|
2
|
-
import {
|
|
2
|
+
import { property } from "lit/decorators.js";
|
|
3
3
|
const isSelected = (item: HTMLElement, attrForSelected: string, selection: string) =>
|
|
4
4
|
item[attrForSelected] === selection ||
|
|
5
5
|
Array.from(item.attributes).some(
|
|
6
6
|
(attr) => attr.name === attrForSelected && attr.value === selection,
|
|
7
7
|
);
|
|
8
8
|
|
|
9
|
-
@customElement("primaria-content-switcher")
|
|
10
9
|
export class PrimariaContentSwitcher extends LitElement {
|
|
11
10
|
render() {
|
|
12
11
|
return html` <slot></slot> `;
|
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
1
|
+
import { regionView } from "@uxland/regions";
|
|
2
|
+
import { BrokerDisposableHandler } from "harmonix/core/dist";
|
|
3
|
+
import { LitElement, PropertyValues, css, html, unsafeCSS } from "lit";
|
|
4
|
+
import { property, state } from "lit/decorators.js";
|
|
5
5
|
import { shellApi } from "../../../api/api";
|
|
6
6
|
import { shellEvents } from "../../../events";
|
|
7
7
|
import { PrimariaNavItemConfig } from "../typings";
|
|
8
|
-
import
|
|
9
|
-
import {
|
|
8
|
+
import styles from "./styles.css?inline";
|
|
9
|
+
import { template } from "./template";
|
|
10
10
|
|
|
11
|
-
@customElement("primaria-nav-item")
|
|
12
11
|
export class PrimariaNavItem extends regionView(LitElement) {
|
|
13
12
|
static styles = css`
|
|
14
13
|
${unsafeCSS(styles)}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { LitElement,
|
|
1
|
+
import { LitElement, css, html, unsafeCSS } from "lit";
|
|
2
|
+
import { property, state } from "lit/decorators.js";
|
|
3
|
+
import { PrimariaNavItemConfig, PrimariaNavTreeMenuConfig } from "../typings";
|
|
2
4
|
import styles from "./styles.css?inline";
|
|
3
|
-
import { customElement, property, state } from "lit/decorators.js";
|
|
4
5
|
import { template } from "./template";
|
|
5
|
-
import { PrimariaNavItemConfig, PrimariaNavTreeMenuConfig } from "../typings";
|
|
6
6
|
|
|
7
|
-
@customElement("primaria-nav-tree-menu")
|
|
8
7
|
export class PrimariaNavTreeMenu extends LitElement {
|
|
9
8
|
static styles = css`
|
|
10
9
|
${unsafeCSS(styles)}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { css, html, LitElement, unsafeCSS } from "lit";
|
|
2
|
-
import {
|
|
2
|
+
import { property } from "lit/decorators.js";
|
|
3
3
|
import Quill from "uxl-quill/dist/quill";
|
|
4
4
|
import styles from "./styles.css?inline";
|
|
5
5
|
import { template } from "./template";
|
|
@@ -7,7 +7,6 @@ import { fixSpellCheckerIssue } from "./utils";
|
|
|
7
7
|
|
|
8
8
|
fixSpellCheckerIssue(Quill);
|
|
9
9
|
|
|
10
|
-
@customElement("primaria-rich-text-editor")
|
|
11
10
|
export class PrimariaRichTextEditor extends LitElement {
|
|
12
11
|
render() {
|
|
13
12
|
return html` ${template(this)} `;
|