@uxland/primary-shell 5.0.0 → 5.1.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.
Files changed (46) hide show
  1. package/dist/index.js +27285 -26453
  2. package/dist/index.js.map +1 -1
  3. package/dist/index.umd.cjs +1799 -1494
  4. package/dist/index.umd.cjs.map +1 -1
  5. package/dist/primary/shell/src/UI/components/pdf-visor/pdf-selector/pdf-selector.d.ts +12 -0
  6. package/dist/primary/shell/src/UI/components/pdf-visor/pdf-selector/template.d.ts +3 -0
  7. package/dist/primary/shell/src/UI/components/pdf-visor/pdf-visor.d.ts +22 -0
  8. package/dist/primary/shell/src/UI/components/pdf-visor/utils.d.ts +1 -0
  9. package/dist/primary/shell/src/UI/components/poc-events-ecap/poc-events-ecap.d.ts +2 -0
  10. package/dist/primary/shell/src/UI/components/primaria-shell/primaria-shell.d.ts +1 -0
  11. package/dist/primary/shell/src/api/api.d.ts +2 -0
  12. package/dist/primary/shell/src/api/interaction-service/interaction-service.d.ts +1 -1
  13. package/dist/primary/shell/src/api/pdf-viewer-manager/events.d.ts +5 -0
  14. package/dist/primary/shell/src/api/pdf-viewer-manager/pdf-viewer-manager.d.ts +27 -0
  15. package/dist/primary/shell/src/api/plugin-busy-manager/plugin-busy-manager.d.ts +17 -1
  16. package/dist/primary/shell/src/constants.d.ts +1 -0
  17. package/dist/primary/shell/src/events.d.ts +1 -0
  18. package/dist/primary/shell/src/locales.d.ts +10 -0
  19. package/dist/style.css +1 -1
  20. package/package.json +2 -2
  21. package/src/UI/components/clinical-monitoring/styles.css +3 -2
  22. package/src/UI/components/index.ts +1 -0
  23. package/src/UI/components/pdf-visor/pdf-selector/pdf-selector.ts +40 -0
  24. package/src/UI/components/pdf-visor/pdf-selector/styles.css +24 -0
  25. package/src/UI/components/pdf-visor/pdf-selector/template.ts +37 -0
  26. package/src/UI/components/pdf-visor/pdf-visor.ts +124 -0
  27. package/src/UI/components/pdf-visor/styles.css +29 -0
  28. package/src/UI/components/pdf-visor/utils.ts +16 -0
  29. package/src/UI/components/poc-events-ecap/poc-events-ecap.ts +37 -7
  30. package/src/UI/components/primaria-shell/primaria-shell.ts +9 -0
  31. package/src/UI/components/primaria-shell/styles.css +15 -2
  32. package/src/UI/components/primaria-shell/template.ts +7 -3
  33. package/src/UI/components/shell-header/template.ts +1 -1
  34. package/src/api/api.ts +8 -2
  35. package/src/api/interaction-service/interaction-service-impl.tsx +68 -90
  36. package/src/api/interaction-service/interaction-service.ts +1 -1
  37. package/src/api/interaction-service/modal-styles.css +69 -0
  38. package/src/api/pdf-viewer-manager/events.ts +5 -0
  39. package/src/api/pdf-viewer-manager/pdf-viewer-manager.ts +97 -0
  40. package/src/api/plugin-busy-manager/plugin-busy-manager.test.ts +93 -31
  41. package/src/api/plugin-busy-manager/plugin-busy-manager.ts +44 -1
  42. package/src/constants.ts +1 -0
  43. package/src/events.ts +1 -0
  44. package/src/features/exit/handler.ts +2 -4
  45. package/src/handle-views.ts +12 -7
  46. package/src/locales.ts +10 -0
@@ -0,0 +1,12 @@
1
+ import { LitElement } from 'lit';
2
+ import { IPdfDocument } from '../../../../../src/api/pdf-viewer-manager/pdf-viewer-manager';
3
+
4
+ export declare class PdfSelector extends LitElement {
5
+ render(): import('lit').TemplateResult<1>;
6
+ static styles: import('lit').CSSResult;
7
+ pdfList: IPdfDocument[];
8
+ activePdfs: IPdfDocument[];
9
+ removePdf(id: string): void;
10
+ setActivePdf(id: string): void;
11
+ openInNewWindow(pdf: IPdfDocument): void;
12
+ }
@@ -0,0 +1,3 @@
1
+ import { PdfSelector } from './pdf-selector';
2
+
3
+ export declare const template: (props: PdfSelector) => import('lit').TemplateResult<1>;
@@ -0,0 +1,22 @@
1
+ import { LitElement } from 'lit';
2
+ import { PrimariaApi } from '../../../api/api';
3
+ import { IPdfDocument } from '../../../api/pdf-viewer-manager/pdf-viewer-manager';
4
+
5
+ export declare class PdfVisor extends LitElement {
6
+ static styles: import('lit').CSSResult;
7
+ api: PrimariaApi;
8
+ pdfList: IPdfDocument[];
9
+ activePdfs: IPdfDocument[];
10
+ private subscriptions;
11
+ connectedCallback(): Promise<void>;
12
+ disconnectedCallback(): void;
13
+ private _initializePdfState;
14
+ private _getPdfSrc;
15
+ private _subscribeEvents;
16
+ private _unsubscribeEvents;
17
+ private _onPdfAdded;
18
+ private _onPdfDeleted;
19
+ private _removePdf;
20
+ private _updateActivePdfs;
21
+ render(): import('lit').TemplateResult<1>;
22
+ }
@@ -0,0 +1 @@
1
+ export declare const createUrlFromBase64: (b64: string, type?: string) => string | undefined;
@@ -2,6 +2,8 @@ import { LitElement } from 'lit';
2
2
 
3
3
  export declare class PocEventsEcap extends LitElement {
4
4
  render(): import('lit').TemplateResult<1>;
5
+ sendPdfToViewer(): void;
6
+ getPDFS(): void;
5
7
  goToLinkOnEcap(): void;
6
8
  static styles: import('lit').CSSResult;
7
9
  }
@@ -18,6 +18,7 @@ export declare class PrimariaShell extends PrimariaShell_base {
18
18
  error: {
19
19
  message: string;
20
20
  };
21
+ quickActionBusy: boolean;
21
22
  _toggleSidebar(): void;
22
23
  private subscriptions;
23
24
  _subscribeEvents(): void;
@@ -8,6 +8,7 @@ import { EcapEventManager } from './ecap-event-manager/ecap-event-manager';
8
8
  import { PluginBusyManager } from './plugin-busy-manager/plugin-busy-manager';
9
9
  import { PrimariaInteractionService } from './interaction-service';
10
10
  import { PrimariaNotificationService } from './notification-service/notification-service';
11
+ import { PdfViewerManager } from './pdf-viewer-manager/pdf-viewer-manager';
11
12
 
12
13
  export interface PrimariaApi extends HarmonixApi {
13
14
  httpClient: HttpClient;
@@ -19,6 +20,7 @@ export interface PrimariaApi extends HarmonixApi {
19
20
  tokenManager: TokenManager;
20
21
  ecapEventManager: EcapEventManager;
21
22
  pluginBusyManager: PluginBusyManager;
23
+ pdfViewerManager: PdfViewerManager;
22
24
  }
23
25
  export declare const PrimariaRegionHost: any;
24
26
  /**
@@ -22,8 +22,8 @@ export interface ConfirmationOptions {
22
22
  confirmButtonText?: string | undefined;
23
23
  cancelButtonText?: string | undefined;
24
24
  showCloseButton?: boolean | undefined;
25
- fullWidth?: boolean | undefined;
26
25
  fullCustomization?: boolean | undefined;
26
+ closeOnOutsideClick?: boolean | undefined;
27
27
  state?: "success" | "info" | "alert" | "error";
28
28
  }
29
29
  export declare abstract class PrimariaInteractionService {
@@ -0,0 +1,5 @@
1
+ export declare const pdfViwerEvents: {
2
+ added: string;
3
+ showed: string;
4
+ deleted: string;
5
+ };
@@ -0,0 +1,27 @@
1
+ import { PrimariaBroker } from '../broker/primaria-broker';
2
+ import { PrimariaNotificationService } from '../notification-service/notification-service';
3
+ import { PrimariaRegionManager } from '../region-manager/region-manager';
4
+
5
+ export interface IPdfDocument {
6
+ pdfName: string;
7
+ id: string;
8
+ data: PdfData;
9
+ }
10
+ export interface PdfData {
11
+ url?: string;
12
+ b64?: string;
13
+ }
14
+ export declare class PdfViewerManager {
15
+ private broker;
16
+ private notificationService;
17
+ private regionManager;
18
+ constructor(broker: PrimariaBroker, notificationService: PrimariaNotificationService, regionManager: PrimariaRegionManager);
19
+ private pdfs;
20
+ private activePdf;
21
+ private hasBeenActivated;
22
+ add(pdfName: string, data: PdfData): void;
23
+ delete(pdfId: string): void;
24
+ getPdfs(): IPdfDocument[];
25
+ private registerNavButton;
26
+ }
27
+ export declare const createPdfViewerManager: (broker: PrimariaBroker, notificationService: PrimariaNotificationService, regionManager: PrimariaRegionManager) => PdfViewerManager;
@@ -1,19 +1,35 @@
1
+ import { PrimariaBroker } from '../broker/primaria-broker';
2
+
1
3
  export interface PluginBusyTask {
2
4
  taskId: string;
3
5
  taskDescription: string;
4
6
  }
7
+ export interface QuickActionBusyTask {
8
+ taskId: string;
9
+ }
5
10
  export declare abstract class PluginBusyManager {
6
11
  abstract addBusyPluginTask(busyTask: PluginBusyTask): void;
7
- abstract removeBusyPluginTask(taskId: string): any;
12
+ abstract removeBusyPluginTask(taskId: string): void;
13
+ abstract addBusyQuickActionTask(busyTask: QuickActionBusyTask): void;
14
+ abstract removeBusyQuickActionTask(taskId: string): void;
8
15
  abstract clearAllBusyPlugins(): void;
9
16
  abstract isAnyPluginBusy(): boolean;
17
+ abstract isAnyQuickActionBusy(): boolean;
10
18
  abstract getBusyPluginTasks(): PluginBusyTask[];
11
19
  }
12
20
  export declare class PluginBusyManagerImpl implements PluginBusyManager {
21
+ broker: PrimariaBroker;
22
+ constructor(broker: PrimariaBroker);
13
23
  private busyPluginTasks;
24
+ private busyQuickActionTasks;
14
25
  addBusyPluginTask(busyTask: PluginBusyTask): void;
26
+ addBusyQuickActionTask(busyTask: QuickActionBusyTask): void;
15
27
  removeBusyPluginTask(taskId: string): any;
28
+ removeBusyQuickActionTask(taskId: string): any;
16
29
  isAnyPluginBusy(): boolean;
30
+ isAnyQuickActionBusy(): boolean;
17
31
  clearAllBusyPlugins(): void;
32
+ clearAllBusyQuickActions(): void;
18
33
  getBusyPluginTasks(): PluginBusyTask[];
34
+ private emitQuickActionBusyChanged;
19
35
  }
@@ -1,3 +1,4 @@
1
1
  export declare const primariaShellId = "primaria-shell";
2
2
  export declare const clinicalMonitoringId = "clinical-monitoring";
3
3
  export declare const pocTestEventsId = "poc-events-ecap";
4
+ export declare const pdfViewerId = "pdf-viewer";
@@ -4,4 +4,5 @@ export declare const shellEvents: {
4
4
  mainViewChanged: string;
5
5
  refreshTokenFailed: string;
6
6
  mpidHeaderInvalid: string;
7
+ quickActionBusyChanged: string;
7
8
  };
@@ -34,6 +34,16 @@ export declare const locales: {
34
34
  busyManager: {
35
35
  title: string;
36
36
  };
37
+ pdfManager: {
38
+ uploaded: string;
39
+ alreadyUploaded: string;
40
+ navButtonLabel: string;
41
+ missingData: string;
42
+ duplicatedSource: string;
43
+ };
44
+ pdfVisor: {
45
+ noPdfSelected: string;
46
+ };
37
47
  };
38
48
  };
39
49
  };