@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.
Files changed (128) hide show
  1. package/dist/{component-D-FzreYp.js → component-MqXtlLU5.js} +5 -5
  2. package/dist/{component-D-FzreYp.js.map → component-MqXtlLU5.js.map} +1 -1
  3. package/dist/{index-CNPfOkYA.js → index-mpq5c2Dk.js} +35 -100
  4. package/dist/index-mpq5c2Dk.js.map +1 -0
  5. package/dist/index.d.ts +926 -2
  6. package/dist/index.js +1 -1
  7. package/dist/{plugin-BIiKj9R9.js → plugin-CrpAo4ti.js} +1516 -1515
  8. package/dist/plugin-CrpAo4ti.js.map +1 -0
  9. package/package.json +1 -2
  10. package/dist/index-CNPfOkYA.js.map +0 -1
  11. package/dist/plugin-BIiKj9R9.js.map +0 -1
  12. package/dist/primary/shell/src/UI/bootstrapper.d.ts +0 -1
  13. package/dist/primary/shell/src/UI/components/bootstrapper.d.ts +0 -1
  14. package/dist/primary/shell/src/UI/components/clinical-pathways-action-menu/clinical-pathways-action-menu.d.ts +0 -7
  15. package/dist/primary/shell/src/UI/components/communication-action-menu/communication-action-menu.d.ts +0 -7
  16. package/dist/primary/shell/src/UI/components/error-view/component.d.ts +0 -8
  17. package/dist/primary/shell/src/UI/components/error-view/template.d.ts +0 -2
  18. package/dist/primary/shell/src/UI/components/nav-divider/template.d.ts +0 -2
  19. package/dist/primary/shell/src/UI/components/petitioner-action-menu/petitioner-action-menu.d.ts +0 -7
  20. package/dist/primary/shell/src/UI/components/primaria-accordion/primaria-accordion.d.ts +0 -7
  21. package/dist/primary/shell/src/UI/components/primaria-shell/constants.d.ts +0 -4
  22. package/dist/primary/shell/src/UI/components/primaria-shell/primaria-shell.d.ts +0 -28
  23. package/dist/primary/shell/src/UI/components/primaria-shell/shell-header/header-divider/header-divider.d.ts +0 -5
  24. package/dist/primary/shell/src/UI/components/primaria-shell/shell-header/header-divider/template.d.ts +0 -2
  25. package/dist/primary/shell/src/UI/components/primaria-shell/shell-header/shell-header.d.ts +0 -16
  26. package/dist/primary/shell/src/UI/components/primaria-shell/shell-header/template.d.ts +0 -2
  27. package/dist/primary/shell/src/UI/components/primaria-shell/template.d.ts +0 -2
  28. package/dist/primary/shell/src/UI/components/sidenav-action-menu/sidenav-action-menu.d.ts +0 -27
  29. package/dist/primary/shell/src/UI/components/sidenav-action-menu/template.d.ts +0 -2
  30. package/dist/primary/shell/src/UI/index.d.ts +0 -1
  31. package/dist/primary/shell/src/UI/internal-views/administrative-nav-menu.d.ts +0 -2
  32. package/dist/primary/shell/src/UI/internal-views/common-nav-menu.d.ts +0 -36
  33. package/dist/primary/shell/src/UI/internal-views/doctor-nav-menu.d.ts +0 -6
  34. package/dist/primary/shell/src/UI/internal-views/doctor-quick-action-menu.d.ts +0 -1
  35. package/dist/primary/shell/src/UI/internal-views/handle-views.d.ts +0 -1
  36. package/dist/primary/shell/src/UI/shared-components/bootstrapper.d.ts +0 -1
  37. package/dist/primary/shell/src/UI/shared-components/index.d.ts +0 -1
  38. package/dist/primary/shell/src/UI/shared-components/primaria-character-limit-badge/primaria-character-limit-badge.d.ts +0 -8
  39. package/dist/primary/shell/src/UI/shared-components/primaria-content-switcher/primaria-content-switcher.d.ts +0 -13
  40. package/dist/primary/shell/src/UI/shared-components/primaria-nav-item/template.d.ts +0 -2
  41. package/dist/primary/shell/src/UI/shared-components/primaria-nav-tree-menu/primaria-nav-tree-menu.d.ts +0 -12
  42. package/dist/primary/shell/src/UI/shared-components/primaria-nav-tree-menu/template.d.ts +0 -2
  43. package/dist/primary/shell/src/UI/shared-components/primaria-region/index.d.ts +0 -1
  44. package/dist/primary/shell/src/UI/shared-components/primaria-region/primaria-region.d.ts +0 -99
  45. package/dist/primary/shell/src/UI/shared-components/primaria-text-editor/primaria-rich-text-editor.d.ts +0 -65
  46. package/dist/primary/shell/src/UI/shared-components/primaria-text-editor/template.d.ts +0 -1
  47. package/dist/primary/shell/src/UI/shared-components/primaria-text-editor/utils.d.ts +0 -1
  48. package/dist/primary/shell/src/UI/shared-components/quick-action-item/quick-action-item.d.ts +0 -8
  49. package/dist/primary/shell/src/UI/shared-components/quick-action-item/template.d.ts +0 -2
  50. package/dist/primary/shell/src/UI/shared-components/typings.d.ts +0 -18
  51. package/dist/primary/shell/src/api/activity-monitor/activity-monitor.d.ts +0 -13
  52. package/dist/primary/shell/src/api/activity-monitor/activity-monitor.test.d.ts +0 -1
  53. package/dist/primary/shell/src/api/api.d.ts +0 -56
  54. package/dist/primary/shell/src/api/api.test.d.ts +0 -1
  55. package/dist/primary/shell/src/api/broker/broker-events.d.ts +0 -44
  56. package/dist/primary/shell/src/api/broker/broker-requests.d.ts +0 -20
  57. package/dist/primary/shell/src/api/broker/factory.d.ts +0 -12
  58. package/dist/primary/shell/src/api/broker/factory.test.d.ts +0 -1
  59. package/dist/primary/shell/src/api/broker/primaria-broker.d.ts +0 -11
  60. package/dist/primary/shell/src/api/context-manager/context-manager.d.ts +0 -28
  61. package/dist/primary/shell/src/api/context-manager/context-manager.test.d.ts +0 -1
  62. package/dist/primary/shell/src/api/ecap-event-manager/ecap-event-manager.d.ts +0 -20
  63. package/dist/primary/shell/src/api/ecap-event-manager/ecap-event-manager.test.d.ts +0 -1
  64. package/dist/primary/shell/src/api/ecap-event-manager/typings.d.ts +0 -6
  65. package/dist/primary/shell/src/api/exit-guard-manager/exit-guard-manager.d.ts +0 -12
  66. package/dist/primary/shell/src/api/exit-guard-manager/exit-guard-manager.test.d.ts +0 -1
  67. package/dist/primary/shell/src/api/global-state/global-state.d.ts +0 -27
  68. package/dist/primary/shell/src/api/global-state/global-state.test.d.ts +0 -1
  69. package/dist/primary/shell/src/api/http-client/http-client.d.ts +0 -14
  70. package/dist/primary/shell/src/api/http-client/http-client.test.d.ts +0 -1
  71. package/dist/primary/shell/src/api/import-data-manager/component/component.d.ts +0 -13
  72. package/dist/primary/shell/src/api/import-data-manager/component/template.d.ts +0 -2
  73. package/dist/primary/shell/src/api/import-data-manager/import-data-manager-impl.d.ts +0 -42
  74. package/dist/primary/shell/src/api/import-data-manager/import-data-manager-impl.test.d.ts +0 -1
  75. package/dist/primary/shell/src/api/import-data-manager/import-data-manager.d.ts +0 -42
  76. package/dist/primary/shell/src/api/import-data-manager/index.d.ts +0 -2
  77. package/dist/primary/shell/src/api/interaction-service/confirmation-message.d.ts +0 -2
  78. package/dist/primary/shell/src/api/interaction-service/index.d.ts +0 -1
  79. package/dist/primary/shell/src/api/interaction-service/interaction-service-impl.d.ts +0 -11
  80. package/dist/primary/shell/src/api/interaction-service/interaction-service.d.ts +0 -40
  81. package/dist/primary/shell/src/api/localization/localization.test.d.ts +0 -1
  82. package/dist/primary/shell/src/api/notification-service/notification-service-impl.test.d.ts +0 -1
  83. package/dist/primary/shell/src/api/notification-service/notification-service.d.ts +0 -6
  84. package/dist/primary/shell/src/api/notification-service/notification.service-impl.d.ts +0 -10
  85. package/dist/primary/shell/src/api/pdf-viewer-manager/constants.d.ts +0 -1
  86. package/dist/primary/shell/src/api/pdf-viewer-manager/events.d.ts +0 -5
  87. package/dist/primary/shell/src/api/pdf-viewer-manager/handle-views.d.ts +0 -2
  88. package/dist/primary/shell/src/api/pdf-viewer-manager/pdf-viewer-manager.d.ts +0 -28
  89. package/dist/primary/shell/src/api/pdf-viewer-manager/pdf-viewer-manager.test.d.ts +0 -1
  90. package/dist/primary/shell/src/api/pdf-viewer-manager/pdf-visor/pdf-selector/pdf-selector.d.ts +0 -11
  91. package/dist/primary/shell/src/api/pdf-viewer-manager/pdf-visor/pdf-selector/template.d.ts +0 -2
  92. package/dist/primary/shell/src/api/pdf-viewer-manager/pdf-visor/pdf-visor.d.ts +0 -21
  93. package/dist/primary/shell/src/api/pdf-viewer-manager/pdf-visor/utils.d.ts +0 -1
  94. package/dist/primary/shell/src/api/quick-action-busy-manager/quick-action-busy-manager.d.ts +0 -18
  95. package/dist/primary/shell/src/api/quick-action-busy-manager/quick-action-busy-manager.test.d.ts +0 -1
  96. package/dist/primary/shell/src/api/region-manager/region-manager.d.ts +0 -49
  97. package/dist/primary/shell/src/api/region-manager/region-manager.test.d.ts +0 -1
  98. package/dist/primary/shell/src/api/region-manager/regions.d.ts +0 -27
  99. package/dist/primary/shell/src/api/region-manager/remove-view-idempotency.test.d.ts +0 -1
  100. package/dist/primary/shell/src/api/session-refresh-timer/session-refresh-timer.d.ts +0 -18
  101. package/dist/primary/shell/src/api/session-refresh-timer/session-refresh-timer.test.d.ts +0 -1
  102. package/dist/primary/shell/src/api/token-manager/token-manager.d.ts +0 -21
  103. package/dist/primary/shell/src/api/token-manager/token-manager.test.d.ts +0 -1
  104. package/dist/primary/shell/src/api/user-manager/user-manager.d.ts +0 -19
  105. package/dist/primary/shell/src/bootstrapper.d.ts +0 -14
  106. package/dist/primary/shell/src/constants.d.ts +0 -1
  107. package/dist/primary/shell/src/disposer.d.ts +0 -4
  108. package/dist/primary/shell/src/features/bootstrapper.d.ts +0 -3
  109. package/dist/primary/shell/src/features/exit/bootstrapper.d.ts +0 -3
  110. package/dist/primary/shell/src/features/exit/handler.d.ts +0 -21
  111. package/dist/primary/shell/src/features/exit/handler.test.d.ts +0 -1
  112. package/dist/primary/shell/src/features/exit/request.d.ts +0 -10
  113. package/dist/primary/shell/src/features/get-patient-cip/action.d.ts +0 -2
  114. package/dist/primary/shell/src/features/get-user-info/backend-adapter.d.ts +0 -13
  115. package/dist/primary/shell/src/features/get-user-info/bootstrapper.d.ts +0 -3
  116. package/dist/primary/shell/src/features/get-user-info/handler.d.ts +0 -10
  117. package/dist/primary/shell/src/features/get-user-info/handler.test.d.ts +0 -1
  118. package/dist/primary/shell/src/features/get-user-info/model.d.ts +0 -10
  119. package/dist/primary/shell/src/features/get-user-info/pds-token.d.ts +0 -26
  120. package/dist/primary/shell/src/features/get-user-info/request.d.ts +0 -4
  121. package/dist/primary/shell/src/features/get-visi-id/action.d.ts +0 -2
  122. package/dist/primary/shell/src/features/navigate-to-ecap/navigate-to-ecap.d.ts +0 -1
  123. package/dist/primary/shell/src/features/utils.d.ts +0 -6
  124. package/dist/primary/shell/src/handle-plugins.d.ts +0 -19
  125. package/dist/primary/shell/src/index.d.ts +0 -24
  126. package/dist/primary/shell/src/infrastructure/ioc/container.d.ts +0 -6
  127. package/dist/primary/shell/src/infrastructure/ioc/types.d.ts +0 -5
  128. package/dist/primary/shell/src/locales.d.ts +0 -52
package/dist/index.d.ts CHANGED
@@ -1,2 +1,926 @@
1
- export * from './primary/shell/src/index'
2
- export {}
1
+ import { AxiosRequestConfig } from 'axios';
2
+ import { AxiosResponse } from 'axios';
3
+ import { BrokerDisposableHandler } from '@uxland/harmonix';
4
+ import { Constructor } from '@uxland/utilities/dedupe-mixin';
5
+ import { CSSResult } from 'lit';
6
+ import { HarmonixApi } from '@uxland/harmonix';
7
+ import { HarmonixBroker } from '@uxland/harmonix';
8
+ import { HarmonixRegionManager } from '@uxland/harmonix';
9
+ import { HarmonixViewDefinition } from '@uxland/harmonix';
10
+ import { IEvent } from '@uxland/harmonix';
11
+ import { IEventClass } from '@uxland/harmonix';
12
+ import { IRegion } from '@uxland/regions';
13
+ import { IRequest } from '@uxland/harmonix';
14
+ import { IRequestClass } from '@uxland/harmonix';
15
+ import { LitElement } from 'lit';
16
+ import { Plugin as Plugin_3 } from '@uxland/harmonix';
17
+ import { PluginDefinition } from '@uxland/harmonix';
18
+ import { PluginInfo } from '@uxland/harmonix';
19
+ import { PropertyValues } from 'lit';
20
+ import * as React_2 from 'react';
21
+ import { RegionViewMixin } from '@uxland/regions';
22
+ import { TemplateResult } from 'lit';
23
+
24
+ export declare enum ActivityHistoryFilterType {
25
+ /** Una casella per cada valor que apareix als ítems del plugin. */
26
+ Checkbox = "checkbox",
27
+ /** Un sol interruptor: encès, deixa només els ítems amb la prop a cert. */
28
+ Switch = "switch",
29
+ }
30
+
31
+ declare const activityHistoryRegions: {
32
+ customFilters: string;
33
+ };
34
+
35
+ export declare interface AddHistoryItemPayload {
36
+ entityId: string;
37
+ item: IActivityHistoryItem;
38
+ componentFactory: (item: IActivityHistoryItem) => HTMLElement;
39
+ searchPredicate?: (searchString: string, item: any) => boolean;
40
+ }
41
+
42
+ export declare interface AddHistoryItemsPayload {
43
+ entityId: string;
44
+ items: IActivityHistoryItem[];
45
+ componentFactory: (item: IActivityHistoryItem) => HTMLElement;
46
+ filters?: IActivityHistoryCustomFilterGroup;
47
+ searchPredicate?: (searchString: string, item: any) => boolean;
48
+ historyDataImporterRules?: IHistoryDataImporterRules;
49
+ }
50
+
51
+ declare const administrativeManagementRegions: {
52
+ widgets: string;
53
+ tabs: string;
54
+ detail: string;
55
+ };
56
+
57
+ /**
58
+ * Carrega i inicialitza els plugins. L'exporta el paquet perquè el host l'ha de cridar, i per
59
+ * això també el pot importar un plugin: només funciona una vegada, i no torna a funcionar fins
60
+ * que `disposePlugins` els ha desmuntat. Així un plugin no pot carregar-ne d'altres amb la
61
+ * identitat que vulgui.
62
+ */
63
+ export declare const bootstrapPlugins: (plugins: PluginDefinition[], startup?: PrimariaStartupPlugin) => Promise<void>;
64
+
65
+ /**
66
+ * Diccionari centralitzat d'events del broker.
67
+ * Events agrupats per plugin/iniciativa per facilitar l'organització i escalabilitat.
68
+ *
69
+ * Els grups que hi ha aquí escrits són els que el shell publica o consumeix. Els
70
+ * contractes entre iniciatives, en què el shell no és part, es declaren a
71
+ * `@primaria/plugins-core` i s'hi escampen a sota: el shell només fa de canal de
72
+ * distribució, perquè és l'únic paquet que instal·len les iniciatives externes.
73
+ * Els que porten resposta no són aquí, sinó a `BROKER_REQUESTS`.
74
+ */
75
+ declare const BROKER_EVENTS: {
76
+ readonly activityHistory: {
77
+ readonly refreshDataRequested: "refresh_history_data_requested";
78
+ readonly errorLoadingData: "error_loading_activity_history_data";
79
+ readonly searched: "activity_history_searched";
80
+ readonly filtersCleaned: "activity_history_filters_cleaned";
81
+ readonly diagnosticFilterDeactivated: "activity_history_diagnostic_filter_deactivated";
82
+ readonly injectAsyncHistoryItemsRequest: "inject_async_history_items_request";
83
+ readonly addHistoryItemRequest: "add_history_item_request";
84
+ readonly addHistoryItemsRequest: "add_history_items_request";
85
+ readonly updateHistoryItemRequest: "update_history_item_request";
86
+ readonly removeHistoryItemRequest: "remove_history_item_request";
87
+ };
88
+ readonly shell: {
89
+ readonly appCrashed: "appCrashed";
90
+ readonly mainViewChanged: "mainViewChanged";
91
+ readonly refreshTokenFailed: "refreshTokenFailed";
92
+ readonly mpidHeaderInvalid: "mpidHeaderInvalid";
93
+ readonly quickActionBusyChanged: "quickActionBusyChanged";
94
+ };
95
+ readonly administrativeManagement: {
96
+ readonly tabSelected: "administrative_management_tab_selected";
97
+ };
98
+ readonly cipds: {
99
+ readonly filterHistoricRequested: "cipds_diagnostic_filter_historic_requested";
100
+ };
101
+ readonly clinicalCourse: {
102
+ readonly draftAppendRequested: "clinical_course_draft_append_requested";
103
+ };
104
+ readonly helpCenter: {
105
+ readonly helpRequested: "help_requested";
106
+ };
107
+ };
108
+
109
+ /**
110
+ * Diccionari centralitzat de requests del broker: els missatges que porten
111
+ * resposta i es criden amb `send` / `registerRequest`.
112
+ *
113
+ * Separat de `BROKER_EVENTS` a propòsit. Un event (`publish`/`subscribe`) i una
114
+ * request (`send`/`registerRequest`) són mecanismes diferents, i barrejar-los
115
+ * en una constant que es diu "events" deixa qui l'autocompleta sense saber quin
116
+ * dels dos ha de cridar.
117
+ *
118
+ * Ara mateix només conté contractes entre iniciatives, declarats a
119
+ * `@primaria/plugins-core`. Si algun dia el shell exposa requests pròpies,
120
+ * s'escriuen aquí al costat, igual que a `BROKER_EVENTS`.
121
+ */
122
+ declare const BROKER_REQUESTS: {
123
+ readonly cipds: {
124
+ readonly diagnosticsSelectorRequested: "request_diagnostics_selector";
125
+ readonly selectionRequested: "cipds_selection_request";
126
+ };
127
+ };
128
+
129
+ export { BrokerDisposableHandler }
130
+
131
+ declare type BrokerEvents = typeof BROKER_EVENTS;
132
+
133
+ declare type BrokerRequests = typeof BROKER_REQUESTS;
134
+
135
+ /** CIPDS anuncia la selecció actual per filtrar l'Històric d'Activitat. */
136
+ export declare const CIPDS_DIAGNOSTIC_FILTER_HISTORIC_REQUESTED = "cipds_diagnostic_filter_historic_requested";
137
+
138
+ /** Selecció de diagnòstics via pop-up, amb resposta. */
139
+ export declare const CIPDS_SELECTION_REQUEST = "cipds_selection_request";
140
+
141
+ /**
142
+ * Payload de `CIPDS_SELECTION_REQUEST` (el pop-up de selecció).
143
+ *
144
+ * Tipat a partir del que envia de debò l'únic cridador que hi ha al repositori
145
+ * (`plugins/reports`, que passa `{ maxElements, llistaDiagnostics }`), no a
146
+ * partir de la guia d'integració: la guia diu que el payload és
147
+ * `ConfigFilterDiagnosticParams` —on el límit de selecció es diu
148
+ * `maximSeleccio`— i els seus propis exemples envien `maxElements`. La resta de
149
+ * camps de la configuració s'hereten perquè la guia els documenta, però només
150
+ * `maxElements` i `llistaDiagnostics` estan confirmats per un consumidor real.
151
+ *
152
+ * PENDENT DE CONFIRMAR amb l'equip de CIPDS quins camps llegeix realment.
153
+ */
154
+ export declare interface CipdsSelectionRequestPayload extends ConfigFilterDiagnosticParams {
155
+ /** Nombre màxim de diagnòstics que l'usuari pot triar al pop-up. */
156
+ maxElements?: number;
157
+ }
158
+
159
+ /**
160
+ * Resposta de `CIPDS_SELECTION_REQUEST`.
161
+ *
162
+ * `plugins/reports` accepta tant això com un array pelat de diagnòstics, senyal
163
+ * que la forma no està tancada. Aquí es declara la que documenta la guia.
164
+ */
165
+ export declare interface CipdsSelectionResponse {
166
+ diagnostics: Diagnostic[];
167
+ }
168
+
169
+ /**
170
+ * Bolca text i diagnòstics associats a la finestra de Curs Clínic, per no
171
+ * haver de reescriure a mà informació que ja s'ha enregistrat en un altre
172
+ * mòdul (eConsulta, Vies Clíniques...).
173
+ */
174
+ export declare const CLINICAL_COURSE_DRAFT_APPEND_REQUESTED = "clinical_course_draft_append_requested";
175
+
176
+ export declare interface ClinicalCourseDraftAppendRequestedPayload {
177
+ html: string;
178
+ plainText: string;
179
+ diagnostics?: Diagnostic[];
180
+ }
181
+
182
+ declare const clinicalMonitoringRegions: {
183
+ sidebar: string;
184
+ header: string;
185
+ content: string;
186
+ };
187
+
188
+ export declare interface ConfigFilterDiagnosticParams {
189
+ maximSeleccio?: number;
190
+ catalegSeleccio?: string[];
191
+ estat?: "tots" | "actiu" | "inactiu";
192
+ llistaDiagnostics?: Diagnostic[];
193
+ llistaFinanciats?: string[];
194
+ selectAll?: boolean;
195
+ tipusCodi?: "Tots" | "D" | "E";
196
+ }
197
+
198
+ export declare interface ConfirmationContentProps<TData, TResult = undefined> {
199
+ data: TData | undefined;
200
+ setResult: (result: TResult) => void;
201
+ setIsValid: (isValid: boolean) => void;
202
+ confirm: () => void;
203
+ confirmResult: (result: TResult) => void;
204
+ cancel: () => void;
205
+ }
206
+
207
+ export declare interface ConfirmationOptions {
208
+ title?: string | undefined;
209
+ showConfirmButton?: boolean | undefined;
210
+ showCancelButton?: boolean | undefined;
211
+ confirmButtonText?: string | undefined;
212
+ cancelButtonText?: string | undefined;
213
+ confirmButtonIcon?: string | undefined;
214
+ cancelButtonIcon?: string | undefined;
215
+ showCloseButton?: boolean | undefined;
216
+ fullCustomization?: boolean | undefined;
217
+ closeOnOutsideClick?: boolean | undefined;
218
+ state?: "success" | "info" | "alert" | "error";
219
+ hideIcon?: boolean;
220
+ }
221
+
222
+ export declare interface ConfirmationResult<T = undefined> {
223
+ confirmed: boolean;
224
+ result: T | undefined;
225
+ }
226
+
227
+ export declare interface ConfirmationWithResultContentProps<TData, TResult = undefined> {
228
+ data: TData | undefined;
229
+ confirmResult: (result: TResult) => void;
230
+ cancel: () => void;
231
+ }
232
+
233
+ export declare interface ConfirmComponentUI<TData = undefined, TResult = undefined> {
234
+ component: React_2.ComponentType<ConfirmationContentProps<TData, TResult> | ConfirmationWithResultContentProps<TData, TResult>> | (new () => HTMLElement);
235
+ styles?: string;
236
+ }
237
+
238
+ export declare const createEcapEventManager: (globalStateManager: PrimariaGlobalStateManager) => EcapEventManagerImpl;
239
+
240
+ export declare interface Diagnostic {
241
+ codi?: string;
242
+ idEcap?: string;
243
+ idCipds?: string;
244
+ idCdr?: string;
245
+ cataleg?: string;
246
+ descripcio?: string;
247
+ }
248
+
249
+ /**
250
+ * Payload de `CIPDS_DIAGNOSTIC_FILTER_HISTORIC_REQUESTED`: tots els diagnòstics
251
+ * marcats en el moment de publicar l'event. L'Històric fa un xip per cada
252
+ * diagnòstic —no per les evolucions ni les relacions—, però filtra per les tres
253
+ * coses.
254
+ */
255
+ export declare interface DiagnosticFilterHistoricPayload {
256
+ diagnostics: DiagnosticWithRelations[];
257
+ }
258
+
259
+ /** Diagnòstic tal com el publica CIPDS als filtres, amb el nom del catàleg. */
260
+ export declare interface DiagnosticRelation {
261
+ codi: string;
262
+ cataleg: string;
263
+ nomCataleg: string;
264
+ descripcio: string;
265
+ idEcap: string;
266
+ idCipds: string;
267
+ }
268
+
269
+ export declare interface DiagnosticsSelectorPayload {
270
+ regionName: string;
271
+ config: ConfigFilterDiagnosticParams;
272
+ onSelectionChange: (diagnostics: Diagnostic[]) => void;
273
+ onRegisterUpdate?: (updater: DiagnosticsUpdater) => void;
274
+ /** Posició del component dins de la regió proporcionada. */
275
+ sortHint?: string;
276
+ }
277
+
278
+ export declare type DiagnosticsUpdater = (diagnostics: Diagnostic[]) => void;
279
+
280
+ export declare interface DiagnosticWithRelations extends DiagnosticRelation {
281
+ evolucions?: DiagnosticRelation[];
282
+ relacions?: DiagnosticRelation[];
283
+ }
284
+
285
+ export declare interface EcapContext {
286
+ visi_id?: string;
287
+ hes_appointment_id?: string;
288
+ signador?: string;
289
+ campanya?: string;
290
+ }
291
+
292
+ export declare abstract class EcapEventManager {
293
+ /**
294
+ * Publish an Ecap event.
295
+ * @param eventType - Event type.
296
+ * @param accio - Action.
297
+ * @param payload - Additional payload properties.
298
+ */
299
+ abstract publish(eventType: string, accio: string, payload?: Record<string, unknown>): void;
300
+ }
301
+
302
+ declare class EcapEventManagerImpl implements EcapEventManager {
303
+ private globalStateManager;
304
+ constructor(globalStateManager: PrimariaGlobalStateManager);
305
+ publish(eventType: string, accio: string, payload?: Record<string, unknown>): void;
306
+ private createEcapEvent;
307
+ private raiseEcapEvent;
308
+ }
309
+
310
+ declare type ExitGuardCanDispose = () => Promise<boolean>;
311
+
312
+ declare abstract class ExitGuardManager {
313
+ abstract register(id: string, canDispose: ExitGuardCanDispose): void;
314
+ abstract unregister(id: string): void;
315
+ abstract canExit(): Promise<boolean>;
316
+ }
317
+
318
+ export declare class ExitShell implements IRequest<void> {
319
+ ecapEvent?: string | undefined;
320
+ payload?: {} | undefined;
321
+ constructor(ecapEvent?: string | undefined, payload?: {} | undefined);
322
+ }
323
+
324
+ export declare interface ExitShellPayload {
325
+ ecapEvent?: string;
326
+ payload?: any;
327
+ }
328
+
329
+ export { HarmonixBroker }
330
+
331
+ /**
332
+ * Una iniciativa demana ajuda contextual des d'un punt concret de la seva UI
333
+ * (els botons "?"). El Centre d'Ajuda s'hi subscriu i decideix què ensenya a
334
+ * partir del `topic`.
335
+ */
336
+ export declare const HELP_REQUESTED = "help_requested";
337
+
338
+ export declare interface HelpRequestedPayload {
339
+ /** Motiu de l'ajuda, acordat entre la iniciativa i el Centre d'Ajuda. */
340
+ topic: string;
341
+ }
342
+
343
+ declare interface HttpClient {
344
+ request<T = any, R = AxiosResponse<T>, D = any>(config: AxiosRequestConfig<D>): Promise<R>;
345
+ }
346
+
347
+ /**
348
+ * Filtre propi d'un plugin, tal com el declara.
349
+ *
350
+ * Només és declaració: ni les opcions ni què hi ha triat s'envien mai des del
351
+ * plugin. L'històric deriva les opcions dels ítems injectats i es guarda la
352
+ * selecció de l'usuari pel seu compte.
353
+ */
354
+ export declare interface IActivityHistoryCustomFilter {
355
+ id: string;
356
+ title: string;
357
+ /** Prop de l'ítem per la qual es filtra. */
358
+ propPathValue: string[];
359
+ /** Prop de l'ítem que es mostra a cada opció. Només als `Checkbox`: un
360
+ * `Switch` s'etiqueta amb el títol del filtre. */
361
+ propsPathDescription?: string[];
362
+ type: ActivityHistoryFilterType;
363
+ /**
364
+ * Limita el filtre als ítems amb un d'aquests tipus de nota. Per defecte un
365
+ * filtre parla de tota la col·lecció de la seva iniciativa.
366
+ *
367
+ * Cal quan d'una mateixa col·lecció en surten tipus de nota diferents i el
368
+ * filtre només té sentit per a uns quants: del backend de curs clínic hi
369
+ * arriben notes, prescripcions, immunitzacions..., i "Veure només apunts
370
+ * subjectius" només parla de les notes (`CC`). Sense això, encendre'l
371
+ * amagaria també les prescripcions, que no són ni subjectives ni objectives.
372
+ *
373
+ * L'ítem ha de complir el tipus de nota **i** la condició del filtre: no és
374
+ * una excepció que deixi passar la resta d'ítems de la col·lecció, sinó un
375
+ * acotament de a quins s'aplica.
376
+ */
377
+ appliesToNoteTypeIds?: string[];
378
+ }
379
+
380
+ /**
381
+ * Grup de filtres propis d'un plugin. Es pinta com un desplegable amb el seu
382
+ * títol i els seus filtres a dins.
383
+ *
384
+ * Només cal declarar-ne un si el plugin té filtres que no es poden expressar
385
+ * amb els filtres globals de l'històric (UP, professional, especialitat,
386
+ * servei, tipus de nota), que es deriven sols del contracte de l'ítem.
387
+ */
388
+ export declare interface IActivityHistoryCustomFilterGroup {
389
+ /** Ha de coincidir amb l'`entityId` amb què s'injecten els ítems: és el que
390
+ * lliga cada filtre amb els ítems als quals s'aplica. */
391
+ id: string;
392
+ title: string;
393
+ /** Ordena el grup respecte dels de les altres iniciatives. */
394
+ sort: string;
395
+ filters: IActivityHistoryCustomFilter[];
396
+ /** Posa un cercador a dalt del grup que filtra les seves caselles mentre
397
+ * s'escriu. Només per a grups que en poden arribar a tenir moltes: amb quatre
398
+ * caselles el cercador fa nosa. No afecta el filtrat de l'històric, només
399
+ * quines caselles es veuen. */
400
+ searchable?: boolean;
401
+ }
402
+
403
+ declare interface IActivityHistoryDiagnostic {
404
+ codi: string;
405
+ cataleg: string;
406
+ descripcio: string;
407
+ idEcap: string;
408
+ idCipds: string;
409
+ idCdr: string;
410
+ }
411
+
412
+ export declare interface IActivityHistoryItem {
413
+ id: string;
414
+ date: string;
415
+ professional: IOwner;
416
+ relevant: boolean;
417
+ diagnostics: IActivityHistoryDiagnostic[];
418
+ center: IEntityDescription;
419
+ up: IEntityDescription;
420
+ ep: IEntityDescription;
421
+ service: IEntityDescription;
422
+ /** Whether the item is logically deleted in its origin plugin. The history
423
+ * owns a single global "veure eliminats" toggle that hides deleted items by
424
+ * default, so every plugin must state it: items whose entity cannot be
425
+ * deleted simply inject `false`. */
426
+ deleted: boolean;
427
+ /** Plugin-defined short identifier shown as a small badge next to each
428
+ * item. `id` is the stable code (e.g. "CC", "SOL", "ECON"), `description`
429
+ * the human-readable label. Plugins must map their own field to this
430
+ * property when injecting items. */
431
+ tag: IEntityDescription;
432
+ /** Kind of note the item is. Feeds the history's global "Tipus de nota"
433
+ * filter, so `description` is what the user reads there. Plugins whose
434
+ * items are not typed notes can either leave it out (they won't appear in
435
+ * that filter) or inject a fixed value standing for the whole collection. */
436
+ noteType?: IEntityDescription;
437
+ /** Optional textual payload of the item, used by the structured-data
438
+ * importer's destination plugins to render the selection. Plugins whose
439
+ * items have a written body (e.g. clinical-course notes, reports) should
440
+ * populate it; plugins with only metadata (e.g. petition rows) can
441
+ * leave it undefined. */
442
+ content?: { html?: string; plainText?: string };
443
+ componentFactory?: (item?: any) => HTMLElement;
444
+ searchPredicate?: TSearchActivityHistoryItemPredicate;
445
+ type?: string;
446
+ }
447
+
448
+ export declare interface IEcapEvent {
449
+ TipusEvent: string;
450
+ Accio: string;
451
+ DIAGNOSTICS?: unknown[];
452
+ [key: string]: unknown;
453
+ }
454
+
455
+ declare interface IEntity {
456
+ id: string;
457
+ }
458
+
459
+ declare interface IEntityDescription extends IEntity {
460
+ description: string;
461
+ }
462
+
463
+ export { IEvent }
464
+
465
+ export { IEventClass }
466
+
467
+ /**
468
+ * Context the structured-data importer (the picker shown inside the
469
+ * import-data modal) hands over to each collection's preselect rule. Lives
470
+ * here to avoid coupling the activity-history domain to the shell's
471
+ * `ImportParams` type.
472
+ */
473
+ export declare interface IHistoryDataImporterContext {
474
+ diagnostics?: Array<{ code: string; catalog?: string; description?: string }>;
475
+ }
476
+
477
+ /**
478
+ * Per-collection rules that govern how the structured-data importer treats
479
+ * the items injected by a plugin. Plugins declare these alongside their
480
+ * other inject payload fields (componentFactory, searchPredicate, ...).
481
+ *
482
+ * Quins ítems s'hi veuen NO es declara aquí: l'importador té una llista única
483
+ * de tipus de nota que val per a totes les iniciatives.
484
+ */
485
+ export declare interface IHistoryDataImporterRules {
486
+ /** If provided, items matching this predicate are auto-selected the first
487
+ * time the importer modal renders the data. */
488
+ shouldPreselect?: (item: IActivityHistoryItem, ctx: IHistoryDataImporterContext) => boolean;
489
+ }
490
+
491
+ export declare interface ImportParams {
492
+ /** Optional list of diagnostics the consumer wants the activity-history
493
+ * importer to filter by. If absent, the diagnostics filter is hidden.
494
+ * Plugins must map their own diagnostic shape to this common model. */
495
+ diagnostics?: ImportParamsDiagnostic[];
496
+ /** Open extension point for future per-importer parameters. */
497
+ [key: string]: unknown;
498
+ }
499
+
500
+ export declare interface ImportParamsDiagnostic {
501
+ code: string;
502
+ catalog: string;
503
+ description: string;
504
+ }
505
+
506
+ /**
507
+ * Arrenca el shell. L'exporta el paquet perquè el host (`primary/app`, el sandbox) l'ha de cridar,
508
+ * i per això també el pot importar un plugin: només funciona una vegada, abans de carregar cap
509
+ * plugin, i no torna a funcionar fins que el shell s'ha desmuntat.
510
+ */
511
+ export declare const initializeShell: (hostAppElement: HTMLElement, ecapContext?: EcapContext) => void;
512
+
513
+ export declare interface InjectAsyncHistoryItemsPayload {
514
+ entityId: string;
515
+ entityDescription: string;
516
+ asyncDataProvider: () => Promise<IActivityHistoryItem[]>;
517
+ componentFactory: (item: IActivityHistoryItem) => HTMLElement;
518
+ searchPredicate?: (searchString: string, item: IActivityHistoryItem) => boolean;
519
+ errorMessage: string;
520
+ /** Grup de filtres propi del plugin. Opcional: sense grup, els seus ítems es
521
+ * filtren només pels filtres globals de l'històric. */
522
+ filters?: IActivityHistoryCustomFilterGroup;
523
+ historyDataImporterRules?: IHistoryDataImporterRules;
524
+ }
525
+
526
+ declare interface IOwner {
527
+ id: string;
528
+ name: string;
529
+ speciality: IEntityDescription;
530
+ role: IEntityDescription;
531
+ }
532
+
533
+ declare interface IPdfDocument {
534
+ id: string;
535
+ pdfName: string;
536
+ data: PdfData;
537
+ }
538
+
539
+ export { IRequest }
540
+
541
+ export { IRequestClass }
542
+
543
+ export declare interface IUserInfo {
544
+ userId: string;
545
+ firstName: string;
546
+ familyName: string;
547
+ lastName: string;
548
+ registrationNumber: string;
549
+ workCenter: string;
550
+ role: string;
551
+ speciality: string;
552
+ }
553
+
554
+ /**
555
+ * Clau del `globalStateManager` on CIPDS deixa els diagnòstics amb què s'ha
556
+ * treballat per últim cop, per arrossegar-los entre funcionalitats de nivell
557
+ * pacient (Prescripció, Ordres Clíniques...) sense tornar-los a triar.
558
+ */
559
+ export declare const LAST_WORKED_DIAGNOSTICS_KEY = "lastWorkedDiagnostics";
560
+
561
+ declare interface MenuItem {
562
+ icon: string;
563
+ label: string;
564
+ }
565
+
566
+ declare interface PdfData {
567
+ id: string;
568
+ name: string;
569
+ date: string;
570
+ url?: string;
571
+ b64?: string;
572
+ }
573
+
574
+ declare class PdfViewerManager {
575
+ private broker;
576
+ private notificationService;
577
+ constructor(broker: PrimariaBroker, notificationService: PrimariaNotificationService);
578
+ private pdfs;
579
+ private activePdf;
580
+ add(data: PdfData, options?: PdfViewerOptions): IPdfDocument | undefined;
581
+ delete(pdfId: string): void;
582
+ getPdfs(): IPdfDocument[];
583
+ }
584
+
585
+ declare interface PdfViewerOptions {
586
+ autoNavigate?: boolean;
587
+ }
588
+
589
+ declare type Plugin_2 = Plugin_3<PrimariaApi>;
590
+ export { Plugin_2 as Plugin }
591
+
592
+ export { PluginDefinition }
593
+
594
+ export { PluginInfo }
595
+
596
+ export declare interface PrimariaApi extends HarmonixApi {
597
+ httpClient: HttpClient;
598
+ interactionService: PrimariaInteractionService;
599
+ notificationService: PrimariaNotificationService;
600
+ broker: PrimariaBroker;
601
+ regionManager: PrimariaRegionManager;
602
+ globalStateManager: PrimariaGlobalStateManager;
603
+ contextManager: PrimariaContextManager;
604
+ tokenManager: TokenManager;
605
+ userManager: UserManager;
606
+ ecapEventManager: EcapEventManager;
607
+ exitGuardManager: ExitGuardManager;
608
+ quickActionBusyManager: QuickActionBusyManager;
609
+ pdfViewerManager: PdfViewerManager;
610
+ importDataManager: PrimariaImportDataManager;
611
+ }
612
+
613
+ export declare interface PrimariaBroker extends HarmonixBroker {
614
+ /** Noms dels events: `publish` / `subscribe`. */
615
+ events: BrokerEvents;
616
+ /** Noms de les requests: `send` / `registerRequest`. */
617
+ requests: BrokerRequests;
618
+ }
619
+
620
+ export declare class PrimariaContentSwitcher extends LitElement {
621
+ render(): TemplateResult<1>;
622
+ static styles: CSSResult;
623
+ selected: any;
624
+ attrForSelected: string;
625
+ animation: string;
626
+ updated(props: any): any;
627
+ get items(): HTMLCollection;
628
+ selectIndex(): number;
629
+ select(): void;
630
+ doAnimation(item: any): any;
631
+ }
632
+
633
+ export declare abstract class PrimariaContextManager {
634
+ abstract getContext(): Readonly<EcapContext>;
635
+ }
636
+
637
+ declare abstract class PrimariaGlobalStateManager {
638
+ abstract setData<T>(key: string, value: T): void;
639
+ abstract getData<T>(key: string): T | undefined;
640
+ }
641
+
642
+ export declare interface PrimariaImportDataManager {
643
+ import(importerId: string, params?: ImportParams): Promise<{
644
+ accepted: boolean;
645
+ data: Record<string, unknown[]>;
646
+ text: {
647
+ raw: string;
648
+ html: string;
649
+ };
650
+ }>;
651
+ selectItems(payload: {
652
+ pluginId: string;
653
+ data: unknown[];
654
+ text: {
655
+ raw: string;
656
+ html: string;
657
+ };
658
+ /** Títol que encapçala aquest text dins del resultat de la importació. Els
659
+ * plugins que en declaren un de mateix queden sota un sol títol, en l'ordre
660
+ * determinat per sortHint. Sense títol, el text s'afegeix tal qual. */
661
+ title?: string;
662
+ /** Ordre dins d'una mateixa secció (mateix title). Menor valor = abans.
663
+ * Sense valor, s'utilitza 0. */
664
+ sortHint?: number;
665
+ }): void;
666
+ getCurrentImporterId(): string;
667
+ /** Returns the params the current importer was opened with (or undefined
668
+ * if no import is in progress). */
669
+ getCurrentImportParams(): ImportParams | undefined;
670
+ }
671
+
672
+ export declare abstract class PrimariaInteractionService {
673
+ abstract confirm<TData = undefined, TResult = undefined>(data: TData | undefined, componentUI: ConfirmComponentUI<TData, TResult>, options?: ConfirmationOptions | undefined): Promise<ConfirmationResult<TResult | undefined>>;
674
+ abstract confirmMessage(message: string, options?: ConfirmationOptions | undefined): Promise<ConfirmationResult>;
675
+ }
676
+
677
+ export declare class PrimariaNavItem extends RegionLitElement {
678
+ static styles: CSSResult;
679
+ constructor(config: PrimariaNavItemConfig);
680
+ private subscriptions;
681
+ connectedCallback(): void;
682
+ disconnectedCallback(): void;
683
+ firstUpdated(_changedProps: PropertyValues<PrimariaNavItem>): void;
684
+ observeHostResize(): void;
685
+ _subscribeEvents(): void;
686
+ _unsubscribeEvents(): void;
687
+ render(): TemplateResult<1>;
688
+ containerWidth: number;
689
+ showText: boolean;
690
+ isActive: boolean;
691
+ config: PrimariaNavItemConfig;
692
+ }
693
+
694
+ declare interface PrimariaNavItemConfig extends MenuItem {
695
+ callbackFn?: () => void;
696
+ showArrow?: boolean;
697
+ fill?: boolean;
698
+ rotateIcon?: boolean;
699
+ hasNestedMenu?: boolean;
700
+ nestedMenuItems?: PrimariaNavItemConfig[];
701
+ }
702
+
703
+ declare abstract class PrimariaNotificationService {
704
+ abstract info(message: string): void;
705
+ abstract warning(message: string): void;
706
+ abstract error(message: string): void;
707
+ abstract success(message: string): void;
708
+ }
709
+
710
+ export declare interface PrimariaPlugin extends Plugin_2 {
711
+ startup: (api: PrimariaApi, startupParams: any) => Promise<void>;
712
+ }
713
+
714
+ /**
715
+ * PrimariaRegion Web Component
716
+ *
717
+ * A plug-and-play region component that allows dynamic region creation without
718
+ * needing to extend PrimariaRegionHost or use the @region decorator manually.
719
+ *
720
+ * Renders in light DOM (no shadow-root) to allow region content to be properly
721
+ * displayed in the parent's DOM tree.
722
+ *
723
+ * @example
724
+ * ```html
725
+ * <primaria-region name="diagnostics-region"></primaria-region>
726
+ * ```
727
+ *
728
+ * This component internally handles:
729
+ * - Creating a container with the appropriate ID
730
+ * - Setting up the region definition
731
+ * - Managing the region lifecycle
732
+ */
733
+ export declare class PrimariaRegion extends PrimariaRegion_base {
734
+ /**
735
+ * The name of the region to create.
736
+ * This will be used both as the region name in the region manager
737
+ * and to generate the container ID.
738
+ */
739
+ name: string;
740
+ /**
741
+ * Rendering mode for the region.
742
+ * - "multi" (default): all registered views are shown simultaneously (MultipleActiveAdapter).
743
+ * - "single": only one view is shown at a time (SelectableAdapter via primaria-content-switcher).
744
+ * Each plugin activates its own view; the adapter deactivates the rest automatically.
745
+ */
746
+ mode: "multi" | "single";
747
+ /**
748
+ * Render in light DOM instead of shadow DOM.
749
+ * This allows the region content to be visible in the parent's DOM tree.
750
+ */
751
+ createRenderRoot(): this;
752
+ /**
753
+ * Override shadowRoot getter to return this (light DOM) instead of null.
754
+ * The region mixin tries to find elements using shadowRoot.querySelector(),
755
+ * so we need to make it work with light DOM.
756
+ */
757
+ get shadowRoot(): ShadowRoot | null;
758
+ /**
759
+ * The region instance created by the region host mixin.
760
+ * Plugins can inject content into this region using the region manager.
761
+ */
762
+ region: IRegion | undefined;
763
+ /**
764
+ * Virtual constructor for this instance to hold its own region definition.
765
+ * This prevents conflicts when multiple primaria-region instances exist.
766
+ */
767
+ private _instanceConstructor;
768
+ constructor();
769
+ /**
770
+ * Called when the component is connected to the DOM.
771
+ * Sets up the region definition before the parent connectedCallback runs.
772
+ */
773
+ connectedCallback(): void;
774
+ /**
775
+ * Mixin hook fired after `createRegions` finishes.
776
+ *
777
+ * Hydrates the freshly-created region with every view that has already been
778
+ * registered for this region name via `regionManager.registerViewWithRegion`.
779
+ * `registerViewWithRegion` only forwards to regions that exist at the moment
780
+ * of the call, so a plugin that registers once at `initialize` would lose
781
+ * its view every time the region is destroyed and re-created (e.g. when a
782
+ * drawer that hosts the region is closed and reopened). Pulling from the
783
+ * registry here makes injection transparent: any plugin can register once
784
+ * and any region with that name auto-populates.
785
+ */
786
+ regionsCreated(_regions: unknown): void;
787
+ /**
788
+ * Called when the component is removed from the DOM.
789
+ *
790
+ * The base mixin's `disconnectedCallback` removes the region from the manager
791
+ * but does NOT clear `this.region`, so on a later reconnect the mixin's
792
+ * `createRegions` sees `isNil(this.region) === false` and skips re-creating
793
+ * the region. That breaks the "drawer opens, closes, opens again" flow:
794
+ * the second open would render the host but never receive the plugin's
795
+ * view. Clear the reference (and drop the orphan container) so the next
796
+ * connect rebuilds everything from scratch.
797
+ */
798
+ disconnectedCallback(): void;
799
+ /**
800
+ * Called before the component updates.
801
+ * Updates the region definition if the name changes.
802
+ */
803
+ protected willUpdate(changedProperties: Map<PropertyKey, unknown>): void;
804
+ /**
805
+ * Renders nothing because we create the container div manually in connectedCallback.
806
+ * This is necessary because the mixin needs the div to exist before it tries to create the region.
807
+ */
808
+ render(): TemplateResult<1>;
809
+ }
810
+
811
+ declare const PrimariaRegion_base: any;
812
+
813
+ export declare const PrimariaRegionHost: any;
814
+
815
+ declare interface PrimariaRegionManager extends HarmonixRegionManager {
816
+ regions: {
817
+ shell: typeof shellRegions;
818
+ clinicalMonitoring: typeof clinicalMonitoringRegions;
819
+ activityHistory: typeof activityHistoryRegions;
820
+ administrativeManagement: typeof administrativeManagementRegions;
821
+ };
822
+ registerQuickAction(view: HarmonixViewDefinition): Promise<void>;
823
+ registerNavigationMenu(view: HarmonixViewDefinition): Promise<void>;
824
+ registerMainView(view: HarmonixViewDefinition): Promise<void>;
825
+ activateMainView(viewId: string): Promise<void>;
826
+ activatePluginView(regionName: string, pluginId: string, viewId: string): Promise<void>;
827
+ getCurrentMainViewActive(): string | undefined;
828
+ getRegisteredMainViews(): RegisteredMainView[];
829
+ }
830
+
831
+ export declare interface PrimariaStartupPlugin {
832
+ pluginId: string;
833
+ params: any;
834
+ }
835
+
836
+ declare abstract class QuickActionBusyManager {
837
+ abstract addTask(task: QuickActionTask): void;
838
+ abstract removeTask(taskId: string): void;
839
+ abstract isBusy(): boolean;
840
+ }
841
+
842
+ export declare class QuickActionItem extends LitElement {
843
+ constructor(icon: string, label: string, callbackFn: () => void);
844
+ render(): TemplateResult<1>;
845
+ icon: string;
846
+ label: string;
847
+ callbackFn: () => void;
848
+ }
849
+
850
+ declare interface QuickActionTask {
851
+ taskId: string;
852
+ }
853
+
854
+ declare const RegionLitElement: Constructor<RegionViewMixin> & typeof LitElement;
855
+
856
+ /** Una vista de la region main, amb el plugin que l'ha registrada. */
857
+ export declare interface RegisteredMainView {
858
+ pluginId: string;
859
+ viewId: string;
860
+ }
861
+
862
+ /**
863
+ * Contractes de la iniciativa de Diagnòstics (CIPDS) amb la resta.
864
+ *
865
+ * Els noms dels missatges es declaren aquí, un sol cop, i el diccionari de
866
+ * `broker-contracts.ts` només hi apunta: així el literal viu al costat del
867
+ * tipus del seu payload i no hi ha dues fonts de veritat.
868
+ */
869
+ export declare const REQUEST_DIAGNOSTICS_SELECTOR = "request_diagnostics_selector";
870
+
871
+ /**
872
+ * Fixa els tokens inicials quan el host els rep d'ECAP en lloc de la URL. Només funciona una
873
+ * vegada: a partir del primer token, llegit o fixat, llança `Token already initialized`.
874
+ */
875
+ export declare const setInitialTokens: (accessToken: string, refreshToken: string) => void;
876
+
877
+ export declare const shellApi: PrimariaApi;
878
+
879
+ declare const shellRegions: {
880
+ header: string;
881
+ headerRightActions: string;
882
+ main: string;
883
+ navigationMenu: string;
884
+ navigationLowerLeftMenu: string;
885
+ quickActions: string;
886
+ floating: string;
887
+ communicationSidenav: string;
888
+ clinicalPathwaysSidenav: string;
889
+ petitionerSidenav: string;
890
+ importData: string;
891
+ importDataActivityHistory: string;
892
+ };
893
+
894
+ /**
895
+ * API pública de tokens disponible per als plugins via `api.tokenManager`.
896
+ * Els plugins poden llegir el token actual o forçar-ne el refresc; NO poden
897
+ * fixar els tokens inicials: això ho fa el host amb `setInitialTokens`, que
898
+ * s'exporta com a funció i només funciona una vegada.
899
+ */
900
+ export declare interface TokenManager {
901
+ getToken: () => string;
902
+ refreshToken: () => Promise<string>;
903
+ }
904
+
905
+ /**
906
+ * Contractes compartits de la Història d'Activitat.
907
+ *
908
+ * Viuen a `@primaria/plugins-core` (i no dins del plugin activity-history)
909
+ * perquè són part de l'API pública que el shell re-exporta i que consumeixen
910
+ * altres iniciatives. Així el shell no depèn del codi font d'un plugin germà.
911
+ */
912
+
913
+ declare type TSearchActivityHistoryItemPredicate = (searchString: string, item: IActivityHistoryItem) => boolean;
914
+
915
+ declare interface UserManager {
916
+ getRole: () => string | undefined;
917
+ isUserRoleAdministrative: () => boolean;
918
+ getFullName: () => string | undefined;
919
+ getSector: () => string | undefined;
920
+ getDNI: () => string | undefined;
921
+ }
922
+
923
+
924
+ export * from "@uxland/harmonix-adapters";
925
+
926
+ export { }