@uxland/primary-shell 8.3.8 → 8.3.10
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/{component-D-FzreYp.js → component-MqXtlLU5.js} +5 -5
- package/dist/{component-D-FzreYp.js.map → component-MqXtlLU5.js.map} +1 -1
- package/dist/{index-CNPfOkYA.js → index-mpq5c2Dk.js} +35 -100
- package/dist/index-mpq5c2Dk.js.map +1 -0
- package/dist/index.d.ts +926 -2
- package/dist/index.js +1 -1
- package/dist/{plugin-BIiKj9R9.js → plugin-CrpAo4ti.js} +1516 -1515
- package/dist/plugin-CrpAo4ti.js.map +1 -0
- package/package.json +1 -2
- package/dist/index-CNPfOkYA.js.map +0 -1
- package/dist/plugin-BIiKj9R9.js.map +0 -1
- package/dist/primary/shell/src/UI/bootstrapper.d.ts +0 -1
- package/dist/primary/shell/src/UI/components/bootstrapper.d.ts +0 -1
- package/dist/primary/shell/src/UI/components/clinical-pathways-action-menu/clinical-pathways-action-menu.d.ts +0 -7
- package/dist/primary/shell/src/UI/components/communication-action-menu/communication-action-menu.d.ts +0 -7
- package/dist/primary/shell/src/UI/components/error-view/component.d.ts +0 -8
- package/dist/primary/shell/src/UI/components/error-view/template.d.ts +0 -2
- package/dist/primary/shell/src/UI/components/nav-divider/template.d.ts +0 -2
- package/dist/primary/shell/src/UI/components/petitioner-action-menu/petitioner-action-menu.d.ts +0 -7
- package/dist/primary/shell/src/UI/components/primaria-accordion/primaria-accordion.d.ts +0 -7
- package/dist/primary/shell/src/UI/components/primaria-shell/constants.d.ts +0 -4
- package/dist/primary/shell/src/UI/components/primaria-shell/primaria-shell.d.ts +0 -28
- package/dist/primary/shell/src/UI/components/primaria-shell/shell-header/header-divider/header-divider.d.ts +0 -5
- package/dist/primary/shell/src/UI/components/primaria-shell/shell-header/header-divider/template.d.ts +0 -2
- package/dist/primary/shell/src/UI/components/primaria-shell/shell-header/shell-header.d.ts +0 -16
- package/dist/primary/shell/src/UI/components/primaria-shell/shell-header/template.d.ts +0 -2
- package/dist/primary/shell/src/UI/components/primaria-shell/template.d.ts +0 -2
- package/dist/primary/shell/src/UI/components/sidenav-action-menu/sidenav-action-menu.d.ts +0 -27
- package/dist/primary/shell/src/UI/components/sidenav-action-menu/template.d.ts +0 -2
- package/dist/primary/shell/src/UI/index.d.ts +0 -1
- package/dist/primary/shell/src/UI/internal-views/administrative-nav-menu.d.ts +0 -2
- package/dist/primary/shell/src/UI/internal-views/common-nav-menu.d.ts +0 -36
- package/dist/primary/shell/src/UI/internal-views/doctor-nav-menu.d.ts +0 -6
- package/dist/primary/shell/src/UI/internal-views/doctor-quick-action-menu.d.ts +0 -1
- package/dist/primary/shell/src/UI/internal-views/handle-views.d.ts +0 -1
- package/dist/primary/shell/src/UI/shared-components/bootstrapper.d.ts +0 -1
- 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 +0 -8
- package/dist/primary/shell/src/UI/shared-components/primaria-content-switcher/primaria-content-switcher.d.ts +0 -13
- package/dist/primary/shell/src/UI/shared-components/primaria-nav-item/template.d.ts +0 -2
- package/dist/primary/shell/src/UI/shared-components/primaria-nav-tree-menu/primaria-nav-tree-menu.d.ts +0 -12
- package/dist/primary/shell/src/UI/shared-components/primaria-nav-tree-menu/template.d.ts +0 -2
- package/dist/primary/shell/src/UI/shared-components/primaria-region/index.d.ts +0 -1
- package/dist/primary/shell/src/UI/shared-components/primaria-region/primaria-region.d.ts +0 -99
- package/dist/primary/shell/src/UI/shared-components/primaria-text-editor/primaria-rich-text-editor.d.ts +0 -65
- package/dist/primary/shell/src/UI/shared-components/primaria-text-editor/template.d.ts +0 -1
- package/dist/primary/shell/src/UI/shared-components/primaria-text-editor/utils.d.ts +0 -1
- package/dist/primary/shell/src/UI/shared-components/quick-action-item/quick-action-item.d.ts +0 -8
- package/dist/primary/shell/src/UI/shared-components/quick-action-item/template.d.ts +0 -2
- package/dist/primary/shell/src/UI/shared-components/typings.d.ts +0 -18
- package/dist/primary/shell/src/api/activity-monitor/activity-monitor.d.ts +0 -13
- package/dist/primary/shell/src/api/activity-monitor/activity-monitor.test.d.ts +0 -1
- package/dist/primary/shell/src/api/api.d.ts +0 -56
- package/dist/primary/shell/src/api/api.test.d.ts +0 -1
- package/dist/primary/shell/src/api/broker/broker-events.d.ts +0 -44
- package/dist/primary/shell/src/api/broker/broker-requests.d.ts +0 -20
- package/dist/primary/shell/src/api/broker/factory.d.ts +0 -12
- package/dist/primary/shell/src/api/broker/factory.test.d.ts +0 -1
- package/dist/primary/shell/src/api/broker/primaria-broker.d.ts +0 -11
- package/dist/primary/shell/src/api/context-manager/context-manager.d.ts +0 -28
- package/dist/primary/shell/src/api/context-manager/context-manager.test.d.ts +0 -1
- package/dist/primary/shell/src/api/ecap-event-manager/ecap-event-manager.d.ts +0 -20
- package/dist/primary/shell/src/api/ecap-event-manager/ecap-event-manager.test.d.ts +0 -1
- package/dist/primary/shell/src/api/ecap-event-manager/typings.d.ts +0 -6
- package/dist/primary/shell/src/api/exit-guard-manager/exit-guard-manager.d.ts +0 -12
- package/dist/primary/shell/src/api/exit-guard-manager/exit-guard-manager.test.d.ts +0 -1
- package/dist/primary/shell/src/api/global-state/global-state.d.ts +0 -27
- package/dist/primary/shell/src/api/global-state/global-state.test.d.ts +0 -1
- package/dist/primary/shell/src/api/http-client/http-client.d.ts +0 -14
- package/dist/primary/shell/src/api/http-client/http-client.test.d.ts +0 -1
- package/dist/primary/shell/src/api/import-data-manager/component/component.d.ts +0 -13
- package/dist/primary/shell/src/api/import-data-manager/component/template.d.ts +0 -2
- package/dist/primary/shell/src/api/import-data-manager/import-data-manager-impl.d.ts +0 -42
- package/dist/primary/shell/src/api/import-data-manager/import-data-manager-impl.test.d.ts +0 -1
- package/dist/primary/shell/src/api/import-data-manager/import-data-manager.d.ts +0 -42
- package/dist/primary/shell/src/api/import-data-manager/index.d.ts +0 -2
- package/dist/primary/shell/src/api/interaction-service/confirmation-message.d.ts +0 -2
- package/dist/primary/shell/src/api/interaction-service/index.d.ts +0 -1
- package/dist/primary/shell/src/api/interaction-service/interaction-service-impl.d.ts +0 -11
- package/dist/primary/shell/src/api/interaction-service/interaction-service.d.ts +0 -40
- package/dist/primary/shell/src/api/localization/localization.test.d.ts +0 -1
- package/dist/primary/shell/src/api/notification-service/notification-service-impl.test.d.ts +0 -1
- package/dist/primary/shell/src/api/notification-service/notification-service.d.ts +0 -6
- package/dist/primary/shell/src/api/notification-service/notification.service-impl.d.ts +0 -10
- package/dist/primary/shell/src/api/pdf-viewer-manager/constants.d.ts +0 -1
- package/dist/primary/shell/src/api/pdf-viewer-manager/events.d.ts +0 -5
- package/dist/primary/shell/src/api/pdf-viewer-manager/handle-views.d.ts +0 -2
- package/dist/primary/shell/src/api/pdf-viewer-manager/pdf-viewer-manager.d.ts +0 -28
- package/dist/primary/shell/src/api/pdf-viewer-manager/pdf-viewer-manager.test.d.ts +0 -1
- package/dist/primary/shell/src/api/pdf-viewer-manager/pdf-visor/pdf-selector/pdf-selector.d.ts +0 -11
- package/dist/primary/shell/src/api/pdf-viewer-manager/pdf-visor/pdf-selector/template.d.ts +0 -2
- package/dist/primary/shell/src/api/pdf-viewer-manager/pdf-visor/pdf-visor.d.ts +0 -21
- package/dist/primary/shell/src/api/pdf-viewer-manager/pdf-visor/utils.d.ts +0 -1
- package/dist/primary/shell/src/api/quick-action-busy-manager/quick-action-busy-manager.d.ts +0 -18
- package/dist/primary/shell/src/api/quick-action-busy-manager/quick-action-busy-manager.test.d.ts +0 -1
- package/dist/primary/shell/src/api/region-manager/region-manager.d.ts +0 -49
- package/dist/primary/shell/src/api/region-manager/region-manager.test.d.ts +0 -1
- package/dist/primary/shell/src/api/region-manager/regions.d.ts +0 -27
- package/dist/primary/shell/src/api/region-manager/remove-view-idempotency.test.d.ts +0 -1
- package/dist/primary/shell/src/api/session-refresh-timer/session-refresh-timer.d.ts +0 -18
- package/dist/primary/shell/src/api/session-refresh-timer/session-refresh-timer.test.d.ts +0 -1
- package/dist/primary/shell/src/api/token-manager/token-manager.d.ts +0 -21
- package/dist/primary/shell/src/api/token-manager/token-manager.test.d.ts +0 -1
- package/dist/primary/shell/src/api/user-manager/user-manager.d.ts +0 -19
- package/dist/primary/shell/src/bootstrapper.d.ts +0 -14
- package/dist/primary/shell/src/constants.d.ts +0 -1
- package/dist/primary/shell/src/disposer.d.ts +0 -4
- package/dist/primary/shell/src/features/bootstrapper.d.ts +0 -3
- package/dist/primary/shell/src/features/exit/bootstrapper.d.ts +0 -3
- package/dist/primary/shell/src/features/exit/handler.d.ts +0 -21
- package/dist/primary/shell/src/features/exit/handler.test.d.ts +0 -1
- package/dist/primary/shell/src/features/exit/request.d.ts +0 -10
- package/dist/primary/shell/src/features/get-patient-cip/action.d.ts +0 -2
- package/dist/primary/shell/src/features/get-user-info/backend-adapter.d.ts +0 -13
- package/dist/primary/shell/src/features/get-user-info/bootstrapper.d.ts +0 -3
- package/dist/primary/shell/src/features/get-user-info/handler.d.ts +0 -10
- package/dist/primary/shell/src/features/get-user-info/handler.test.d.ts +0 -1
- package/dist/primary/shell/src/features/get-user-info/model.d.ts +0 -10
- package/dist/primary/shell/src/features/get-user-info/pds-token.d.ts +0 -26
- package/dist/primary/shell/src/features/get-user-info/request.d.ts +0 -4
- package/dist/primary/shell/src/features/get-visi-id/action.d.ts +0 -2
- package/dist/primary/shell/src/features/navigate-to-ecap/navigate-to-ecap.d.ts +0 -1
- package/dist/primary/shell/src/features/utils.d.ts +0 -6
- package/dist/primary/shell/src/handle-plugins.d.ts +0 -19
- package/dist/primary/shell/src/index.d.ts +0 -24
- package/dist/primary/shell/src/infrastructure/ioc/container.d.ts +0 -6
- package/dist/primary/shell/src/infrastructure/ioc/types.d.ts +0 -5
- package/dist/primary/shell/src/locales.d.ts +0 -52
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { PrimariaBroker } from './primaria-broker';
|
|
2
|
-
export interface BrokerHandle {
|
|
3
|
-
/** The broker every plugin receives. */
|
|
4
|
-
broker: PrimariaBroker;
|
|
5
|
-
/**
|
|
6
|
-
* Removes every registration. Used on shell teardown so a re-initialization
|
|
7
|
-
* starts from a clean registry (the broker is a module-level singleton).
|
|
8
|
-
* Host-only: it lives outside the broker so no plugin receives it.
|
|
9
|
-
*/
|
|
10
|
-
clear: () => void;
|
|
11
|
-
}
|
|
12
|
-
export declare const createBroker: () => BrokerHandle;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { HarmonixBroker } from '@uxland/harmonix';
|
|
2
|
-
import { BrokerEvents } from './broker-events';
|
|
3
|
-
import { BrokerRequests } from './broker-requests';
|
|
4
|
-
export interface PrimariaBroker extends HarmonixBroker {
|
|
5
|
-
/** Noms dels events: `publish` / `subscribe`. */
|
|
6
|
-
events: BrokerEvents;
|
|
7
|
-
/** Noms de les requests: `send` / `registerRequest`. */
|
|
8
|
-
requests: BrokerRequests;
|
|
9
|
-
}
|
|
10
|
-
export type { HarmonixBroker, IEvent, IEventClass, IRequest, IRequestClass, } from '@uxland/harmonix';
|
|
11
|
-
export type { BrokerDisposableHandler } from '@uxland/harmonix';
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
export interface EcapContext {
|
|
2
|
-
visi_id?: string;
|
|
3
|
-
hes_appointment_id?: string;
|
|
4
|
-
signador?: string;
|
|
5
|
-
campanya?: string;
|
|
6
|
-
}
|
|
7
|
-
export declare abstract class PrimariaContextManager {
|
|
8
|
-
abstract getContext(): Readonly<EcapContext>;
|
|
9
|
-
}
|
|
10
|
-
declare class PrimariaContextManagerImpl implements PrimariaContextManager {
|
|
11
|
-
private context;
|
|
12
|
-
/**
|
|
13
|
-
* Initializes the context with the provided ECAP context data.
|
|
14
|
-
* This should only be called once during shell initialization.
|
|
15
|
-
*
|
|
16
|
-
* @param {EcapContext} context - The context data from ECAP
|
|
17
|
-
* @return {void}
|
|
18
|
-
*/
|
|
19
|
-
initializeContext(context: EcapContext): void;
|
|
20
|
-
/**
|
|
21
|
-
* Returns a read-only copy of the entire ECAP context.
|
|
22
|
-
*
|
|
23
|
-
* @return {Readonly<EcapContext>} The context object
|
|
24
|
-
*/
|
|
25
|
-
getContext(): Readonly<EcapContext>;
|
|
26
|
-
}
|
|
27
|
-
export declare const createContextManager: () => PrimariaContextManagerImpl;
|
|
28
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { LAST_WORKED_DIAGNOSTICS_KEY } from '@primaria/plugins-core';
|
|
2
|
-
import { PrimariaGlobalStateManager } from '../global-state/global-state';
|
|
3
|
-
export { LAST_WORKED_DIAGNOSTICS_KEY };
|
|
4
|
-
export declare abstract class EcapEventManager {
|
|
5
|
-
/**
|
|
6
|
-
* Publish an Ecap event.
|
|
7
|
-
* @param eventType - Event type.
|
|
8
|
-
* @param accio - Action.
|
|
9
|
-
* @param payload - Additional payload properties.
|
|
10
|
-
*/
|
|
11
|
-
abstract publish(eventType: string, accio: string, payload?: Record<string, unknown>): void;
|
|
12
|
-
}
|
|
13
|
-
declare class EcapEventManagerImpl implements EcapEventManager {
|
|
14
|
-
private globalStateManager;
|
|
15
|
-
constructor(globalStateManager: PrimariaGlobalStateManager);
|
|
16
|
-
publish(eventType: string, accio: string, payload?: Record<string, unknown>): void;
|
|
17
|
-
private createEcapEvent;
|
|
18
|
-
private raiseEcapEvent;
|
|
19
|
-
}
|
|
20
|
-
export declare const createEcapEventManager: (globalStateManager: PrimariaGlobalStateManager) => EcapEventManagerImpl;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export type ExitGuardCanDispose = () => Promise<boolean>;
|
|
2
|
-
export declare abstract class ExitGuardManager {
|
|
3
|
-
abstract register(id: string, canDispose: ExitGuardCanDispose): void;
|
|
4
|
-
abstract unregister(id: string): void;
|
|
5
|
-
abstract canExit(): Promise<boolean>;
|
|
6
|
-
}
|
|
7
|
-
export declare class ExitGuardManagerImpl implements ExitGuardManager {
|
|
8
|
-
private guards;
|
|
9
|
-
register(id: string, canDispose: ExitGuardCanDispose): void;
|
|
10
|
-
unregister(id: string): void;
|
|
11
|
-
canExit(): Promise<boolean>;
|
|
12
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { PrimariaBroker } from '../broker/primaria-broker';
|
|
2
|
-
export declare abstract class PrimariaGlobalStateManager {
|
|
3
|
-
abstract setData<T>(key: string, value: T): void;
|
|
4
|
-
abstract getData<T>(key: string): T | undefined;
|
|
5
|
-
}
|
|
6
|
-
declare class PrimariaGlobalStateManagerImpl implements PrimariaGlobalStateManager {
|
|
7
|
-
broker: PrimariaBroker;
|
|
8
|
-
private state;
|
|
9
|
-
constructor(broker: PrimariaBroker);
|
|
10
|
-
/**
|
|
11
|
-
* Sets the value of a key in the state object and publishes an event with the event bus.
|
|
12
|
-
*
|
|
13
|
-
* @param {string} key - The key to set the value for.
|
|
14
|
-
* @param {T} value - The value to set for the key.
|
|
15
|
-
* @return {void} This function does not return anything.
|
|
16
|
-
*/
|
|
17
|
-
setData<T>(key: string, value: T): void;
|
|
18
|
-
/**
|
|
19
|
-
* Retrieves the value associated with the specified key from the state object.
|
|
20
|
-
*
|
|
21
|
-
* @param {string} key - The key to retrieve the value for.
|
|
22
|
-
* @return {T | undefined} The value associated with the specified key, or undefined if the key does not exist in the state object.
|
|
23
|
-
*/
|
|
24
|
-
getData<T>(key: string): T | undefined;
|
|
25
|
-
}
|
|
26
|
-
export declare const createGlobalStateManager: (broker: PrimariaBroker) => PrimariaGlobalStateManagerImpl;
|
|
27
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { AxiosRequestConfig, AxiosResponse } from 'axios';
|
|
2
|
-
import { TokenManager } from '../token-manager/token-manager';
|
|
3
|
-
import { PrimariaBroker } from '../broker/primaria-broker';
|
|
4
|
-
export declare class MissingMpidHeaderError extends Error {
|
|
5
|
-
constructor(message: string);
|
|
6
|
-
}
|
|
7
|
-
export declare class InvalidMpidHeaderError extends Error {
|
|
8
|
-
constructor(message: string);
|
|
9
|
-
}
|
|
10
|
-
export declare const createAxiosInstance: (tokenManager: TokenManager, broker: PrimariaBroker, validateMpid?: boolean) => import('axios').AxiosInstance;
|
|
11
|
-
export interface HttpClient {
|
|
12
|
-
request<T = any, R = AxiosResponse<T>, D = any>(config: AxiosRequestConfig<D>): Promise<R>;
|
|
13
|
-
}
|
|
14
|
-
export declare const createHttpClient: (tokenManager: TokenManager, broker: PrimariaBroker) => HttpClient;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { LitElement } from 'lit';
|
|
2
|
-
import { ConfirmationContentProps } from '../../interaction-service';
|
|
3
|
-
export declare class ImportDataManagerModal extends LitElement implements ConfirmationContentProps<undefined, undefined> {
|
|
4
|
-
data: undefined;
|
|
5
|
-
setResult: (result: undefined) => void;
|
|
6
|
-
setIsValid: (isValid: boolean) => void;
|
|
7
|
-
confirm: () => void;
|
|
8
|
-
confirmResult: (result: undefined) => void;
|
|
9
|
-
cancel: () => void;
|
|
10
|
-
render(): import('lit').TemplateResult<1>;
|
|
11
|
-
static styles: import('lit').CSSResult;
|
|
12
|
-
_accept: () => void;
|
|
13
|
-
}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { PrimariaInteractionService } from '../interaction-service/interaction-service';
|
|
2
|
-
import { ImportParams, PrimariaImportDataManager } from './import-data-manager';
|
|
3
|
-
export declare class ImportDataManagerImpl implements PrimariaImportDataManager {
|
|
4
|
-
private interactionService;
|
|
5
|
-
private selectedItems;
|
|
6
|
-
private currentImporterId;
|
|
7
|
-
private currentImportParams;
|
|
8
|
-
private pluginTexts;
|
|
9
|
-
constructor(interactionService: PrimariaInteractionService);
|
|
10
|
-
import(importerId: string, params?: ImportParams): Promise<{
|
|
11
|
-
accepted: boolean;
|
|
12
|
-
data: Record<string, unknown[]>;
|
|
13
|
-
text: {
|
|
14
|
-
raw: string;
|
|
15
|
-
html: string;
|
|
16
|
-
};
|
|
17
|
-
}>;
|
|
18
|
-
selectItems(payload: {
|
|
19
|
-
pluginId: string;
|
|
20
|
-
data: unknown[];
|
|
21
|
-
text: {
|
|
22
|
-
raw: string;
|
|
23
|
-
html: string;
|
|
24
|
-
};
|
|
25
|
-
title?: string;
|
|
26
|
-
sortHint?: number;
|
|
27
|
-
}): void;
|
|
28
|
-
getCurrentImporterId(): string;
|
|
29
|
-
getCurrentImportParams(): ImportParams | undefined;
|
|
30
|
-
/**
|
|
31
|
-
* Ajunta el text de cada plugin que ha contribuït a la importació.
|
|
32
|
-
*
|
|
33
|
-
* Els que declaren el mateix títol formen una sola secció, encapçalada un
|
|
34
|
-
* cop (dues iniciatives poden omplir el mateix apartat del modal: el curs
|
|
35
|
-
* clínic i l'històric d'activitat ho fan amb "Seguiment Clínic"). Els que no
|
|
36
|
-
* en declaren cap van tots junts, sense títol.
|
|
37
|
-
*
|
|
38
|
-
* El resultat acaba amb una línia en blanc perquè qui rep el text pugui
|
|
39
|
-
* seguir escrivint a sota.
|
|
40
|
-
*/
|
|
41
|
-
private getConcatenatedText;
|
|
42
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
export interface ImportParamsDiagnostic {
|
|
2
|
-
code: string;
|
|
3
|
-
catalog: string;
|
|
4
|
-
description: string;
|
|
5
|
-
}
|
|
6
|
-
export interface ImportParams {
|
|
7
|
-
/** Optional list of diagnostics the consumer wants the activity-history
|
|
8
|
-
* importer to filter by. If absent, the diagnostics filter is hidden.
|
|
9
|
-
* Plugins must map their own diagnostic shape to this common model. */
|
|
10
|
-
diagnostics?: ImportParamsDiagnostic[];
|
|
11
|
-
/** Open extension point for future per-importer parameters. */
|
|
12
|
-
[key: string]: unknown;
|
|
13
|
-
}
|
|
14
|
-
export interface PrimariaImportDataManager {
|
|
15
|
-
import(importerId: string, params?: ImportParams): Promise<{
|
|
16
|
-
accepted: boolean;
|
|
17
|
-
data: Record<string, unknown[]>;
|
|
18
|
-
text: {
|
|
19
|
-
raw: string;
|
|
20
|
-
html: string;
|
|
21
|
-
};
|
|
22
|
-
}>;
|
|
23
|
-
selectItems(payload: {
|
|
24
|
-
pluginId: string;
|
|
25
|
-
data: unknown[];
|
|
26
|
-
text: {
|
|
27
|
-
raw: string;
|
|
28
|
-
html: string;
|
|
29
|
-
};
|
|
30
|
-
/** Títol que encapçala aquest text dins del resultat de la importació. Els
|
|
31
|
-
* plugins que en declaren un de mateix queden sota un sol títol, en l'ordre
|
|
32
|
-
* determinat per sortHint. Sense títol, el text s'afegeix tal qual. */
|
|
33
|
-
title?: string;
|
|
34
|
-
/** Ordre dins d'una mateixa secció (mateix title). Menor valor = abans.
|
|
35
|
-
* Sense valor, s'utilitza 0. */
|
|
36
|
-
sortHint?: number;
|
|
37
|
-
}): void;
|
|
38
|
-
getCurrentImporterId(): string;
|
|
39
|
-
/** Returns the params the current importer was opened with (or undefined
|
|
40
|
-
* if no import is in progress). */
|
|
41
|
-
getCurrentImportParams(): ImportParams | undefined;
|
|
42
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './interaction-service';
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { ConfirmationOptions, ConfirmationResult, ConfirmComponentUI, PrimariaInteractionService } from './interaction-service';
|
|
2
|
-
export declare class PrimariaInteractionServiceImpl extends PrimariaInteractionService {
|
|
3
|
-
private readonly openDialogCancellers;
|
|
4
|
-
confirm<TData = undefined, TResult = undefined>(data: TData | undefined, componentUI: ConfirmComponentUI<TData, TResult>, options?: ConfirmationOptions | undefined): Promise<ConfirmationResult<TResult | undefined>>;
|
|
5
|
-
confirmMessage(message: string, options?: ConfirmationOptions | undefined): Promise<ConfirmationResult>;
|
|
6
|
-
/**
|
|
7
|
-
* Tanca tots els diàlegs oberts, siguin del plugin que siguin. Host-only: no és al tipus
|
|
8
|
-
* `PrimariaInteractionService`, i els plugins reben una vista que no el porta.
|
|
9
|
-
*/
|
|
10
|
-
dispose(): void;
|
|
11
|
-
}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
export interface ConfirmationResult<T = undefined> {
|
|
3
|
-
confirmed: boolean;
|
|
4
|
-
result: T | undefined;
|
|
5
|
-
}
|
|
6
|
-
export interface ConfirmationContentProps<TData, TResult = undefined> {
|
|
7
|
-
data: TData | undefined;
|
|
8
|
-
setResult: (result: TResult) => void;
|
|
9
|
-
setIsValid: (isValid: boolean) => void;
|
|
10
|
-
confirm: () => void;
|
|
11
|
-
confirmResult: (result: TResult) => void;
|
|
12
|
-
cancel: () => void;
|
|
13
|
-
}
|
|
14
|
-
export interface ConfirmationWithResultContentProps<TData, TResult = undefined> {
|
|
15
|
-
data: TData | undefined;
|
|
16
|
-
confirmResult: (result: TResult) => void;
|
|
17
|
-
cancel: () => void;
|
|
18
|
-
}
|
|
19
|
-
export interface ConfirmationOptions {
|
|
20
|
-
title?: string | undefined;
|
|
21
|
-
showConfirmButton?: boolean | undefined;
|
|
22
|
-
showCancelButton?: boolean | undefined;
|
|
23
|
-
confirmButtonText?: string | undefined;
|
|
24
|
-
cancelButtonText?: string | undefined;
|
|
25
|
-
confirmButtonIcon?: string | undefined;
|
|
26
|
-
cancelButtonIcon?: string | undefined;
|
|
27
|
-
showCloseButton?: boolean | undefined;
|
|
28
|
-
fullCustomization?: boolean | undefined;
|
|
29
|
-
closeOnOutsideClick?: boolean | undefined;
|
|
30
|
-
state?: "success" | "info" | "alert" | "error";
|
|
31
|
-
hideIcon?: boolean;
|
|
32
|
-
}
|
|
33
|
-
export interface ConfirmComponentUI<TData = undefined, TResult = undefined> {
|
|
34
|
-
component: React.ComponentType<ConfirmationContentProps<TData, TResult> | ConfirmationWithResultContentProps<TData, TResult>> | (new () => HTMLElement);
|
|
35
|
-
styles?: string;
|
|
36
|
-
}
|
|
37
|
-
export declare abstract class PrimariaInteractionService {
|
|
38
|
-
abstract confirm<TData = undefined, TResult = undefined>(data: TData | undefined, componentUI: ConfirmComponentUI<TData, TResult>, options?: ConfirmationOptions | undefined): Promise<ConfirmationResult<TResult | undefined>>;
|
|
39
|
-
abstract confirmMessage(message: string, options?: ConfirmationOptions | undefined): Promise<ConfirmationResult>;
|
|
40
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { PrimariaNotificationService } from './notification-service';
|
|
2
|
-
export declare class PrimariaNotificationServiceImpl extends PrimariaNotificationService {
|
|
3
|
-
private getOrCreateContainer;
|
|
4
|
-
private removeContainerIfEmpty;
|
|
5
|
-
private notify;
|
|
6
|
-
info(message: string, duration?: number): void;
|
|
7
|
-
warning(message: string, duration?: number): void;
|
|
8
|
-
error(message: string, duration?: number): void;
|
|
9
|
-
success(message: string, duration?: number): void;
|
|
10
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const pdfViewerId = "pdf-viewer";
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { PrimariaBroker } from '../broker/primaria-broker';
|
|
2
|
-
import { PrimariaNotificationService } from '../notification-service/notification-service';
|
|
3
|
-
export interface PdfData {
|
|
4
|
-
id: string;
|
|
5
|
-
name: string;
|
|
6
|
-
date: string;
|
|
7
|
-
url?: string;
|
|
8
|
-
b64?: string;
|
|
9
|
-
}
|
|
10
|
-
export interface IPdfDocument {
|
|
11
|
-
id: string;
|
|
12
|
-
pdfName: string;
|
|
13
|
-
data: PdfData;
|
|
14
|
-
}
|
|
15
|
-
export interface PdfViewerOptions {
|
|
16
|
-
autoNavigate?: boolean;
|
|
17
|
-
}
|
|
18
|
-
export declare class PdfViewerManager {
|
|
19
|
-
private broker;
|
|
20
|
-
private notificationService;
|
|
21
|
-
constructor(broker: PrimariaBroker, notificationService: PrimariaNotificationService);
|
|
22
|
-
private pdfs;
|
|
23
|
-
private activePdf;
|
|
24
|
-
add(data: PdfData, options?: PdfViewerOptions): IPdfDocument | undefined;
|
|
25
|
-
delete(pdfId: string): void;
|
|
26
|
-
getPdfs(): IPdfDocument[];
|
|
27
|
-
}
|
|
28
|
-
export declare const createPdfViewerManager: (broker: PrimariaBroker, notificationService: PrimariaNotificationService) => PdfViewerManager;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/primary/shell/src/api/pdf-viewer-manager/pdf-visor/pdf-selector/pdf-selector.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { LitElement } from 'lit';
|
|
2
|
-
import { IPdfDocument } from '../../../../../src/api/pdf-viewer-manager/pdf-viewer-manager';
|
|
3
|
-
export declare class PdfSelector extends LitElement {
|
|
4
|
-
render(): import('lit').TemplateResult<1>;
|
|
5
|
-
static styles: import('lit').CSSResult;
|
|
6
|
-
pdfList: IPdfDocument[];
|
|
7
|
-
activePdfs: IPdfDocument[];
|
|
8
|
-
removePdf(id: string): void;
|
|
9
|
-
setActivePdf(id: string): void;
|
|
10
|
-
openInNewWindow(pdf: IPdfDocument): void;
|
|
11
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { LitElement } from 'lit';
|
|
2
|
-
import { PrimariaApi } from '../../../api/api';
|
|
3
|
-
import { IPdfDocument } from '../../../api/pdf-viewer-manager/pdf-viewer-manager';
|
|
4
|
-
export declare class PdfVisor extends LitElement {
|
|
5
|
-
static styles: import('lit').CSSResult;
|
|
6
|
-
api: PrimariaApi;
|
|
7
|
-
pdfList: IPdfDocument[];
|
|
8
|
-
activePdfs: IPdfDocument[];
|
|
9
|
-
private subscriptions;
|
|
10
|
-
connectedCallback(): Promise<void>;
|
|
11
|
-
disconnectedCallback(): void;
|
|
12
|
-
private _initializePdfState;
|
|
13
|
-
private _getPdfSrc;
|
|
14
|
-
private _subscribeEvents;
|
|
15
|
-
private _unsubscribeEvents;
|
|
16
|
-
private _onPdfAdded;
|
|
17
|
-
private _onPdfDeleted;
|
|
18
|
-
private _removePdf;
|
|
19
|
-
private _updateActivePdfs;
|
|
20
|
-
render(): import('lit').TemplateResult<1>;
|
|
21
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const createUrlFromBase64: (b64: string, type?: string) => string | undefined;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { PrimariaBroker } from '../broker/primaria-broker';
|
|
2
|
-
export interface QuickActionTask {
|
|
3
|
-
taskId: string;
|
|
4
|
-
}
|
|
5
|
-
export declare abstract class QuickActionBusyManager {
|
|
6
|
-
abstract addTask(task: QuickActionTask): void;
|
|
7
|
-
abstract removeTask(taskId: string): void;
|
|
8
|
-
abstract isBusy(): boolean;
|
|
9
|
-
}
|
|
10
|
-
export declare class QuickActionBusyManagerImpl implements QuickActionBusyManager {
|
|
11
|
-
private broker;
|
|
12
|
-
private tasks;
|
|
13
|
-
constructor(broker: PrimariaBroker);
|
|
14
|
-
addTask(task: QuickActionTask): void;
|
|
15
|
-
removeTask(taskId: string): void;
|
|
16
|
-
isBusy(): boolean;
|
|
17
|
-
private emitBusyChanged;
|
|
18
|
-
}
|
package/dist/primary/shell/src/api/quick-action-busy-manager/quick-action-busy-manager.test.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { HarmonixRegionManager, HarmonixViewDefinition, IRegionManager } from '@uxland/harmonix';
|
|
2
|
-
import { PluginInfo } from '../../handle-plugins';
|
|
3
|
-
import { PrimariaBroker } from '../broker/primaria-broker';
|
|
4
|
-
import { activityHistoryRegions, administrativeManagementRegions, clinicalMonitoringRegions, shellRegions } from './regions';
|
|
5
|
-
/** Una vista de la region main, amb el plugin que l'ha registrada. */
|
|
6
|
-
export interface RegisteredMainView {
|
|
7
|
-
pluginId: string;
|
|
8
|
-
viewId: string;
|
|
9
|
-
}
|
|
10
|
-
export interface PrimariaRegionManager extends HarmonixRegionManager {
|
|
11
|
-
regions: {
|
|
12
|
-
shell: typeof shellRegions;
|
|
13
|
-
clinicalMonitoring: typeof clinicalMonitoringRegions;
|
|
14
|
-
activityHistory: typeof activityHistoryRegions;
|
|
15
|
-
administrativeManagement: typeof administrativeManagementRegions;
|
|
16
|
-
};
|
|
17
|
-
registerQuickAction(view: HarmonixViewDefinition): Promise<void>;
|
|
18
|
-
registerNavigationMenu(view: HarmonixViewDefinition): Promise<void>;
|
|
19
|
-
registerMainView(view: HarmonixViewDefinition): Promise<void>;
|
|
20
|
-
activateMainView(viewId: string): Promise<void>;
|
|
21
|
-
activatePluginView(regionName: string, pluginId: string, viewId: string): Promise<void>;
|
|
22
|
-
getCurrentMainViewActive(): string | undefined;
|
|
23
|
-
getRegisteredMainViews(): RegisteredMainView[];
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* Desmunta totes les vistes de totes les regions, i espera que acabin.
|
|
27
|
-
*
|
|
28
|
-
* Es crida en tancar, ABANS de fer el `dispose` dels plugins: els cleanups dels `useEffect` que
|
|
29
|
-
* s'executen en desmuntar-se poden enviar comandes pel broker, i han de trobar el handler encara
|
|
30
|
-
* registrat. Cada plugin ja ho fa pel seu compte al `dispose`, però això només cobreix els
|
|
31
|
-
* plugins d'aquest repositori; els de tercers (econsulta, allergies…) no els controlem.
|
|
32
|
-
*
|
|
33
|
-
* Fa servir `unregisterViewFromRegion` i no `destroy()`/`clear()` del regionManager perquè
|
|
34
|
-
* aquests fan `forEach` amb crides asíncrones sense esperar-les, així que retornen abans que les
|
|
35
|
-
* vistes s'hagin desmuntat de debò.
|
|
36
|
-
*
|
|
37
|
-
* És idempotent: desregistrar una vista que ja no hi és no fa res.
|
|
38
|
-
*
|
|
39
|
-
* Host-only: és una funció i no un mètode del proxy perquè cap plugin la rebi amb la seva `api`.
|
|
40
|
-
*/
|
|
41
|
-
export declare const removeAllViews: (regionManager: IRegionManager) => Promise<void>;
|
|
42
|
-
/**
|
|
43
|
-
* Creates a proxy for the region manager with the given plugin info and region manager instance.
|
|
44
|
-
*
|
|
45
|
-
* @param {PluginInfo} pluginInfo - The plugin information.
|
|
46
|
-
* @param {IRegionManager} regionManager - The region manager instance.
|
|
47
|
-
* @return {HarmonixRegionManager} The created region manager proxy.
|
|
48
|
-
*/
|
|
49
|
-
export declare const createRegionManagerProxy: (pluginInfo: PluginInfo, regionManager: IRegionManager, broker: PrimariaBroker) => PrimariaRegionManager;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
export declare const shellRegions: {
|
|
2
|
-
header: string;
|
|
3
|
-
headerRightActions: string;
|
|
4
|
-
main: string;
|
|
5
|
-
navigationMenu: string;
|
|
6
|
-
navigationLowerLeftMenu: string;
|
|
7
|
-
quickActions: string;
|
|
8
|
-
floating: string;
|
|
9
|
-
communicationSidenav: string;
|
|
10
|
-
clinicalPathwaysSidenav: string;
|
|
11
|
-
petitionerSidenav: string;
|
|
12
|
-
importData: string;
|
|
13
|
-
importDataActivityHistory: string;
|
|
14
|
-
};
|
|
15
|
-
export declare const clinicalMonitoringRegions: {
|
|
16
|
-
sidebar: string;
|
|
17
|
-
header: string;
|
|
18
|
-
content: string;
|
|
19
|
-
};
|
|
20
|
-
export declare const activityHistoryRegions: {
|
|
21
|
-
customFilters: string;
|
|
22
|
-
};
|
|
23
|
-
export declare const administrativeManagementRegions: {
|
|
24
|
-
widgets: string;
|
|
25
|
-
tabs: string;
|
|
26
|
-
detail: string;
|
|
27
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { ActivityMonitor } from '../activity-monitor/activity-monitor';
|
|
2
|
-
import { TokenManager } from '../token-manager/token-manager';
|
|
3
|
-
export interface SessionRefreshTimer {
|
|
4
|
-
start: () => void;
|
|
5
|
-
stop: () => void;
|
|
6
|
-
}
|
|
7
|
-
export declare class SessionRefreshTimerImpl implements SessionRefreshTimer {
|
|
8
|
-
private readonly tokenManager;
|
|
9
|
-
private readonly activityMonitor;
|
|
10
|
-
private intervalId;
|
|
11
|
-
private isRefreshing;
|
|
12
|
-
constructor(tokenManager: TokenManager, activityMonitor: ActivityMonitor);
|
|
13
|
-
start: () => void;
|
|
14
|
-
stop: () => void;
|
|
15
|
-
private getTokenExpiry;
|
|
16
|
-
private checkAndRefresh;
|
|
17
|
-
}
|
|
18
|
-
export declare const createSessionRefreshTimer: (tokenManager: TokenManager, activityMonitor: ActivityMonitor) => SessionRefreshTimer;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { PrimariaBroker } from '../broker/primaria-broker';
|
|
2
|
-
/**
|
|
3
|
-
* API pública de tokens disponible per als plugins via `api.tokenManager`.
|
|
4
|
-
* Els plugins poden llegir el token actual o forçar-ne el refresc; NO poden
|
|
5
|
-
* fixar els tokens inicials: això ho fa el host amb `setInitialTokens`, que
|
|
6
|
-
* s'exporta com a funció i només funciona una vegada.
|
|
7
|
-
*/
|
|
8
|
-
export interface TokenManager {
|
|
9
|
-
getToken: () => string;
|
|
10
|
-
refreshToken: () => Promise<string>;
|
|
11
|
-
}
|
|
12
|
-
export declare class TokenManagerImpl implements TokenManager {
|
|
13
|
-
private readonly broker;
|
|
14
|
-
constructor(broker: PrimariaBroker);
|
|
15
|
-
getUrlParams: () => URLSearchParams;
|
|
16
|
-
private initToken;
|
|
17
|
-
setInitialTokens: (access_token: string, refresh_token: string) => void;
|
|
18
|
-
getToken: () => string;
|
|
19
|
-
refreshToken: () => Promise<string>;
|
|
20
|
-
}
|
|
21
|
-
export declare const createTokenManager: (broker: PrimariaBroker) => TokenManagerImpl;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { TokenManager } from '../token-manager/token-manager';
|
|
2
|
-
export interface UserManager {
|
|
3
|
-
getRole: () => string | undefined;
|
|
4
|
-
isUserRoleAdministrative: () => boolean;
|
|
5
|
-
getFullName: () => string | undefined;
|
|
6
|
-
getSector: () => string | undefined;
|
|
7
|
-
getDNI: () => string | undefined;
|
|
8
|
-
}
|
|
9
|
-
export declare class UserManagerImpl implements UserManager {
|
|
10
|
-
private tokenManager;
|
|
11
|
-
constructor(tokenManager: TokenManager);
|
|
12
|
-
private getAccessInfo;
|
|
13
|
-
getRole: () => string | undefined;
|
|
14
|
-
isUserRoleAdministrative: () => boolean;
|
|
15
|
-
getFullName: () => string | undefined;
|
|
16
|
-
getSector: () => string | undefined;
|
|
17
|
-
getDNI: () => string | undefined;
|
|
18
|
-
}
|
|
19
|
-
export declare const createUserManager: (tokenManager: TokenManager) => UserManager;
|