@uxland/primary-shell 7.9.1 → 7.10.0

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.
@@ -1,4 +1,4 @@
1
- import { t as d, k as c, P as p, h as m, r as g, i as v, s as f, a as u } from "./index-Cbd1_nDm.js";
1
+ import { t as d, k as c, P as p, h as m, r as g, i as v, s as f, a as u } from "./index-rzAClqiP.js";
2
2
  const h = ".container{background-color:#fff;display:flex;flex-direction:column;min-width:500px;width:90vw;height:90vh;border-radius:var(--dss-radius-sm);overflow:hidden}.content{display:grid;height:100%;min-height:1px;grid-template-columns:1fr 1fr;grid-auto-rows:1fr;gap:16px;padding:16px;overflow-y:auto;max-height:calc(90vh - 120px)}.content>*{border:1px solid var(--color-neutral-200);border-radius:8px;padding:16px;background-color:var(--color-neutral-50);min-height:200px}.footer{display:flex;flex-direction:row;align-items:center;background:#fff;justify-content:end;gap:12px;height:56px;border-top:1px solid var(--color-neutral-100);padding:var(--dss-spacing-sm)}", x = (t) => c`
3
3
  <div class="container">
4
4
  <!-- <div class="header">
@@ -44,4 +44,4 @@ i = l([
44
44
  export {
45
45
  i as ImportDataManagerModal
46
46
  };
47
- //# sourceMappingURL=component-CiF6jO3M.js.map
47
+ //# sourceMappingURL=component-U4paEq5h.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"component-CiF6jO3M.js","sources":["../src/api/import-data-manager/component/template.ts","../src/api/import-data-manager/component/component.ts"],"sourcesContent":["import { html } from \"lit\";\nimport { translate } from \"../../../locales\";\nimport { ImportDataManagerModal } from \"./component\";\n\nexport const template = (props: ImportDataManagerModal) => {\n return html`\n <div class=\"container\">\n <!-- <div class=\"header\">\n <div class=\"title\">\n <div>${translate(\"importDataManager.title\")}</div>\n </div> \n </div> -->\n <div class=\"content\" id=\"import-data-region\"></div>\n <div class=\"footer\">\n <dss-button label=\"${translate(\"importDataManager.actions.cancel\")}\" @click=\"${() => {\n props.cancel();\n }}\" size=\"md\" variant=\"secondary\"></dss-button>\n <dss-button label=\"${translate(\"importDataManager.actions.import\")}\" @click=\"${() => {\n props._accept();\n }}\" size=\"md\" variant=\"primary\"></dss-button>\n </div>\n </div>\n `;\n};\n","\nimport { IRegion, region } from \"@uxland/regions\";\nimport { LitElement, css, html, unsafeCSS } from \"lit\";\nimport { customElement } from \"lit/decorators.js\";\nimport styles from \"./styles.css?inline\";\nimport { template } from \"./template\";\nimport { ConfirmationContentProps } from \"../../interaction-service\";\nimport { PrimariaRegionHost } from \"../../api\";\n\n@customElement(\"import-data-manager-modal\")\nexport class ImportDataManagerModal\n extends PrimariaRegionHost(LitElement) implements ConfirmationContentProps<undefined, undefined>\n{\n data: undefined;\n setResult: (result: undefined) => void;\n setIsValid: (isValid: boolean) => void;\n confirm: () => void;\n cancel: () => void;\n\n @region({ targetId: \"import-data-region\", name: \"import-data-region\" })\n importDataRegion: IRegion | undefined;\n\n render() {\n return html`${template(this)}`;\n }\n\n static styles = css`\n ${unsafeCSS(styles)}\n `;\n\n _accept = () => {\n this.confirm();\n };\n}\n"],"names":["template","props","html","translate","ImportDataManagerModal","PrimariaRegionHost","LitElement","css","unsafeCSS","styles","__decorateClass","region","customElement"],"mappings":";gqBAIaA,IAAW,CAACC,MAChBC;AAAAA;AAAAA;AAAAA;AAAAA,iBAIQC,EAAU,yBAAyB,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA,yBAK5BA,EAAU,kCAAkC,CAAC,aAAa,MAAM;AACjF,EAAAF,EAAM,OAAA;AACR,CAAC;AAAA,2BACoBE,EAAU,kCAAkC,CAAC,aAAa,MAAM;AACnF,EAAAF,EAAM,QAAA;AACR,CAAC;AAAA;AAAA;AAAA;;;;;;ACTA,IAAMG,IAAN,cACGC,EAAmBC,CAAU,EACvC;AAAA,EAFO,cAAA;AAAA,UAAA,GAAA,SAAA,GAoBL,KAAA,UAAU,MAAM;AACd,WAAK,QAAA;AAAA,IACP;AAAA,EAAA;AAAA,EAVA,SAAS;AACP,WAAOJ,IAAOF,EAAS,IAAI,CAAC;AAAA,EAC9B;AASF;AAvBaI,EAgBJ,SAASG;AAAAA,MACZC,EAAUC,CAAM,CAAC;AAAA;AAPrBC,EAAA;AAAA,EADCC,EAAO,EAAE,UAAU,sBAAsB,MAAM,sBAAsB;AAAA,GAT3DP,EAUX,WAAA,oBAAA,CAAA;AAVWA,IAANM,EAAA;AAAA,EADNE,EAAc,2BAA2B;AAAA,GAC7BR,CAAA;"}
1
+ {"version":3,"file":"component-U4paEq5h.js","sources":["../src/api/import-data-manager/component/template.ts","../src/api/import-data-manager/component/component.ts"],"sourcesContent":["import { html } from \"lit\";\nimport { translate } from \"../../../locales\";\nimport { ImportDataManagerModal } from \"./component\";\n\nexport const template = (props: ImportDataManagerModal) => {\n return html`\n <div class=\"container\">\n <!-- <div class=\"header\">\n <div class=\"title\">\n <div>${translate(\"importDataManager.title\")}</div>\n </div> \n </div> -->\n <div class=\"content\" id=\"import-data-region\"></div>\n <div class=\"footer\">\n <dss-button label=\"${translate(\"importDataManager.actions.cancel\")}\" @click=\"${() => {\n props.cancel();\n }}\" size=\"md\" variant=\"secondary\"></dss-button>\n <dss-button label=\"${translate(\"importDataManager.actions.import\")}\" @click=\"${() => {\n props._accept();\n }}\" size=\"md\" variant=\"primary\"></dss-button>\n </div>\n </div>\n `;\n};\n","\nimport { IRegion, region } from \"@uxland/regions\";\nimport { LitElement, css, html, unsafeCSS } from \"lit\";\nimport { customElement } from \"lit/decorators.js\";\nimport styles from \"./styles.css?inline\";\nimport { template } from \"./template\";\nimport { ConfirmationContentProps } from \"../../interaction-service\";\nimport { PrimariaRegionHost } from \"../../api\";\n\n@customElement(\"import-data-manager-modal\")\nexport class ImportDataManagerModal\n extends PrimariaRegionHost(LitElement) implements ConfirmationContentProps<undefined, undefined>\n{\n data: undefined;\n setResult: (result: undefined) => void;\n setIsValid: (isValid: boolean) => void;\n confirm: () => void;\n cancel: () => void;\n\n @region({ targetId: \"import-data-region\", name: \"import-data-region\" })\n importDataRegion: IRegion | undefined;\n\n render() {\n return html`${template(this)}`;\n }\n\n static styles = css`\n ${unsafeCSS(styles)}\n `;\n\n _accept = () => {\n this.confirm();\n };\n}\n"],"names":["template","props","html","translate","ImportDataManagerModal","PrimariaRegionHost","LitElement","css","unsafeCSS","styles","__decorateClass","region","customElement"],"mappings":";gqBAIaA,IAAW,CAACC,MAChBC;AAAAA;AAAAA;AAAAA;AAAAA,iBAIQC,EAAU,yBAAyB,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA,yBAK5BA,EAAU,kCAAkC,CAAC,aAAa,MAAM;AACjF,EAAAF,EAAM,OAAA;AACR,CAAC;AAAA,2BACoBE,EAAU,kCAAkC,CAAC,aAAa,MAAM;AACnF,EAAAF,EAAM,QAAA;AACR,CAAC;AAAA;AAAA;AAAA;;;;;;ACTA,IAAMG,IAAN,cACGC,EAAmBC,CAAU,EACvC;AAAA,EAFO,cAAA;AAAA,UAAA,GAAA,SAAA,GAoBL,KAAA,UAAU,MAAM;AACd,WAAK,QAAA;AAAA,IACP;AAAA,EAAA;AAAA,EAVA,SAAS;AACP,WAAOJ,IAAOF,EAAS,IAAI,CAAC;AAAA,EAC9B;AASF;AAvBaI,EAgBJ,SAASG;AAAAA,MACZC,EAAUC,CAAM,CAAC;AAAA;AAPrBC,EAAA;AAAA,EADCC,EAAO,EAAE,UAAU,sBAAsB,MAAM,sBAAsB;AAAA,GAT3DP,EAUX,WAAA,oBAAA,CAAA;AAVWA,IAANM,EAAA;AAAA,EADNE,EAAc,2BAA2B;AAAA,GAC7BR,CAAA;"}
@@ -9681,7 +9681,7 @@ class ImportDataManagerImpl {
9681
9681
  async import(J) {
9682
9682
  this.currentImporterId = J, this.selectedItems = {}, this.pluginTexts = {};
9683
9683
  try {
9684
- const { ImportDataManagerModal: X } = await import("./component-CiF6jO3M.js"), { confirmed: re } = await this.interactionService.confirm(
9684
+ const { ImportDataManagerModal: X } = await import("./component-U4paEq5h.js"), { confirmed: re } = await this.interactionService.confirm(
9685
9685
  void 0,
9686
9686
  { component: X },
9687
9687
  {
@@ -45081,14 +45081,7 @@ __decorateClass([
45081
45081
  QuickActionItem = __decorateClass([
45082
45082
  t$j("quick-action-item")
45083
45083
  ], QuickActionItem);
45084
- const commonNavMenuItems = [{
45085
- id: "landing",
45086
- icon: "home",
45087
- label: "Pàgina inici",
45088
- type: "item",
45089
- sortHint: "0010",
45090
- callbackFn: () => shellApi.broker.send(new ExitShell("OBRIR_PI"))
45091
- }], doctorNavMenuItems = [
45084
+ const commonNavMenuItems = [
45092
45085
  {
45093
45086
  id: "landing",
45094
45087
  icon: "home",
@@ -45096,7 +45089,230 @@ const commonNavMenuItems = [{
45096
45089
  type: "item",
45097
45090
  sortHint: "0010",
45098
45091
  callbackFn: () => shellApi.broker.send(new ExitShell("OBRIR_PI"))
45092
+ }
45093
+ ], registerNavMenuViews = (te) => {
45094
+ const J = [...commonNavMenuItems, ...te];
45095
+ for (const X of J)
45096
+ shellApi.regionManager.registerView(shellApi.regionManager.regions.shell.navigationMenu, {
45097
+ id: X.id,
45098
+ sortHint: X.sortHint,
45099
+ factory: () => {
45100
+ const re = X.type === "item" ? new PrimariaNavItem({
45101
+ icon: X.icon,
45102
+ label: X.label,
45103
+ callbackFn: X.callbackFn
45104
+ }) : new PrimariaNavTreeMenu({
45105
+ icon: X.icon,
45106
+ label: X.label,
45107
+ actionMenuItems: X.actionMenuItems
45108
+ });
45109
+ return Promise.resolve(re);
45110
+ }
45111
+ });
45112
+ }, registerCommunicationNavMenu = () => {
45113
+ shellApi.regionManager.registerView(shellApi.regionManager.regions.shell.navigationMenu, {
45114
+ id: "communication",
45115
+ sortHint: "0120",
45116
+ factory: () => {
45117
+ const te = new CommunicationActionMenu("3p", "Comunicació");
45118
+ return Promise.resolve(te);
45119
+ }
45120
+ });
45121
+ }, administrativeNavMenuItems = [
45122
+ {
45123
+ id: "create-visits",
45124
+ icon: "today",
45125
+ label: "Crear visites",
45126
+ type: "tree",
45127
+ sortHint: "0040",
45128
+ actionMenuItems: [
45129
+ {
45130
+ icon: "open_in_new",
45131
+ label: "",
45132
+ callbackFn: () => navigateToEcapWithoutClosingWithCip("")
45133
+ },
45134
+ {
45135
+ icon: "open_in_new",
45136
+ label: "",
45137
+ callbackFn: () => navigateToEcapWithoutClosingWithCip("")
45138
+ }
45139
+ ]
45140
+ },
45141
+ {
45142
+ id: "register-visits",
45143
+ icon: "event_note",
45144
+ label: "Registre de visites",
45145
+ type: "tree",
45146
+ sortHint: "0050",
45147
+ actionMenuItems: [
45148
+ {
45149
+ icon: "open_in_new",
45150
+ label: "",
45151
+ callbackFn: () => navigateToEcapWithoutClosingWithCip("")
45152
+ },
45153
+ {
45154
+ icon: "open_in_new",
45155
+ label: "",
45156
+ callbackFn: () => navigateToEcapWithoutClosingWithCip("")
45157
+ }
45158
+ ]
45099
45159
  },
45160
+ {
45161
+ id: "petitions",
45162
+ icon: "alt_route",
45163
+ label: "Peticions",
45164
+ type: "tree",
45165
+ sortHint: "0060",
45166
+ actionMenuItems: [
45167
+ {
45168
+ icon: "open_in_new",
45169
+ label: "",
45170
+ callbackFn: () => navigateToEcapWithoutClosingWithCip("")
45171
+ },
45172
+ {
45173
+ icon: "open_in_new",
45174
+ label: "",
45175
+ callbackFn: () => navigateToEcapWithoutClosingWithCip("")
45176
+ }
45177
+ ]
45178
+ },
45179
+ {
45180
+ id: "administrative-procedures",
45181
+ icon: "list_alt",
45182
+ label: "Procediments administratius",
45183
+ type: "tree",
45184
+ sortHint: "0070",
45185
+ actionMenuItems: [
45186
+ {
45187
+ icon: "open_in_new",
45188
+ label: "",
45189
+ callbackFn: () => navigateToEcapWithoutClosingWithCip("")
45190
+ },
45191
+ {
45192
+ icon: "open_in_new",
45193
+ label: "",
45194
+ callbackFn: () => navigateToEcapWithoutClosingWithCip("")
45195
+ }
45196
+ ]
45197
+ },
45198
+ {
45199
+ id: "billing",
45200
+ icon: "receipt",
45201
+ label: "Facturació",
45202
+ type: "tree",
45203
+ sortHint: "0080",
45204
+ actionMenuItems: [
45205
+ {
45206
+ icon: "open_in_new",
45207
+ label: "",
45208
+ callbackFn: () => navigateToEcapWithoutClosingWithCip("")
45209
+ },
45210
+ {
45211
+ icon: "open_in_new",
45212
+ label: "",
45213
+ callbackFn: () => navigateToEcapWithoutClosingWithCip("")
45214
+ }
45215
+ ]
45216
+ },
45217
+ {
45218
+ id: "user-docs",
45219
+ icon: "library_books",
45220
+ label: "Documents de l'usuari",
45221
+ type: "tree",
45222
+ sortHint: "0090",
45223
+ actionMenuItems: [
45224
+ {
45225
+ icon: "open_in_new",
45226
+ label: "",
45227
+ callbackFn: () => navigateToEcapWithoutClosingWithCip("")
45228
+ },
45229
+ {
45230
+ icon: "open_in_new",
45231
+ label: "",
45232
+ callbackFn: () => navigateToEcapWithoutClosingWithCip("")
45233
+ }
45234
+ ]
45235
+ },
45236
+ {
45237
+ id: "healthcare-procedures",
45238
+ icon: "folder",
45239
+ label: "Gestions sanitàries",
45240
+ type: "tree",
45241
+ sortHint: "0100",
45242
+ actionMenuItems: [
45243
+ {
45244
+ icon: "open_in_new",
45245
+ label: "",
45246
+ callbackFn: () => navigateToEcapWithoutClosingWithCip("")
45247
+ },
45248
+ {
45249
+ icon: "open_in_new",
45250
+ label: "",
45251
+ callbackFn: () => navigateToEcapWithoutClosingWithCip("")
45252
+ }
45253
+ ]
45254
+ }
45255
+ ], registerAdministrativeCommunicationMenuActions = () => {
45256
+ const te = [
45257
+ {
45258
+ id: "1",
45259
+ sortHint: "0010",
45260
+ icon: "open_in_new",
45261
+ label: "SMS",
45262
+ callbackFn: async () => {
45263
+ const J = await getPatientCip(shellApi);
45264
+ shellApi.ecapEventManager.publish("MISSATGES_DEV", "NO_TANCAR", {
45265
+ CIP: J || "",
45266
+ TipusMissatge: "SMS"
45267
+ });
45268
+ }
45269
+ },
45270
+ {
45271
+ id: "2",
45272
+ sortHint: "0020",
45273
+ icon: "open_in_new",
45274
+ label: "eConsulta",
45275
+ callbackFn: async () => {
45276
+ const J = await getPatientCip(shellApi), X = await shellApi.broker.send(new GetVisitId());
45277
+ shellApi.ecapEventManager.publish("NAVEGACIO_ECAP_ECONSULTA", "NO_TANCAR", {
45278
+ CIP: J || "",
45279
+ VisiID: X || ""
45280
+ });
45281
+ }
45282
+ },
45283
+ {
45284
+ id: "3",
45285
+ icon: "open_in_new",
45286
+ label: "Mail",
45287
+ callbackFn: async () => {
45288
+ const J = await getPatientCip(shellApi);
45289
+ shellApi.ecapEventManager.publish("COMUNICACIO_MISSATGES_CREAR", "NO_TANCAR", {
45290
+ CIP: J || "",
45291
+ TipusMissatge: "SMS"
45292
+ });
45293
+ }
45294
+ },
45295
+ {
45296
+ id: "4",
45297
+ sortHint: "0030",
45298
+ icon: "open_in_new",
45299
+ label: "Veu IP",
45300
+ callbackFn: () => navigateToEcapWithoutClosingWithCip("VOIP")
45301
+ }
45302
+ // { id: "5", sortHint: "0040", icon: "open_in_new", label: "Videoconsulta", callbackFn: () => {} },
45303
+ ];
45304
+ for (const J of te)
45305
+ shellApi.regionManager.registerView(shellApi.regionManager.regions.shell.communicationSidenav, {
45306
+ id: J.id,
45307
+ sortHint: J.sortHint,
45308
+ factory: () => {
45309
+ const X = new QuickActionItem(J.icon, J.label, J.callbackFn);
45310
+ return Promise.resolve(X);
45311
+ }
45312
+ });
45313
+ }, registerAdministrativeNavMenuViews = () => {
45314
+ registerCommunicationNavMenu(), registerAdministrativeCommunicationMenuActions(), registerNavMenuViews(administrativeNavMenuItems);
45315
+ }, doctorNavMenuItems = [
45100
45316
  {
45101
45317
  id: "dinamic-monitoring",
45102
45318
  icon: "poll",
@@ -45197,9 +45413,11 @@ const commonNavMenuItems = [{
45197
45413
  {
45198
45414
  icon: "open_in_new",
45199
45415
  label: "Documents usuari",
45200
- callbackFn: () => setTimeout(() => {
45201
- navigateToEcapWithoutClosingWithCip("CRIDA_DOCS_USU");
45202
- }, 0)
45416
+ callbackFn: () => {
45417
+ setTimeout(() => {
45418
+ navigateToEcapWithoutClosingWithCip("CRIDA_DOCS_USU");
45419
+ }, 0);
45420
+ }
45203
45421
  },
45204
45422
  {
45205
45423
  icon: "open_in_new",
@@ -45269,39 +45487,7 @@ const commonNavMenuItems = [{
45269
45487
  sortHint: "0130",
45270
45488
  callbackFn: () => navigateToEcapWithoutClosingWithCip("CONSULTA_VISITES")
45271
45489
  }
45272
- ], administrativeNavMenuItems = [], registerDoctorNavMenuViews = () => {
45273
- registerCommunicationNavMenu(), registerNavMenuViews(doctorNavMenuItems);
45274
- }, registerAdministrativeNavMenuViews = () => {
45275
- registerNavMenuViews(administrativeNavMenuItems);
45276
- }, registerNavMenuViews = (te) => {
45277
- const J = [...commonNavMenuItems, ...te];
45278
- for (const X of J)
45279
- shellApi.regionManager.registerView(shellApi.regionManager.regions.shell.navigationMenu, {
45280
- id: X.id,
45281
- sortHint: X.sortHint,
45282
- factory: () => {
45283
- const re = X.type === "item" ? new PrimariaNavItem({
45284
- icon: X.icon,
45285
- label: X.label,
45286
- callbackFn: X.callbackFn
45287
- }) : new PrimariaNavTreeMenu({
45288
- icon: X.icon,
45289
- label: X.label,
45290
- actionMenuItems: X.actionMenuItems
45291
- });
45292
- return Promise.resolve(re);
45293
- }
45294
- });
45295
- }, registerCommunicationNavMenu = () => {
45296
- shellApi.regionManager.registerView(shellApi.regionManager.regions.shell.navigationMenu, {
45297
- id: "communication",
45298
- sortHint: "0120",
45299
- factory: () => {
45300
- const te = new CommunicationActionMenu("3p", "Comunicació");
45301
- return Promise.resolve(te);
45302
- }
45303
- }), registerCommunicationMenuActions();
45304
- }, registerCommunicationMenuActions = () => {
45490
+ ], registerDoctorCommunicationMenuActions = () => {
45305
45491
  const te = [
45306
45492
  {
45307
45493
  id: "1",
@@ -45355,15 +45541,12 @@ const commonNavMenuItems = [{
45355
45541
  id: J.id,
45356
45542
  sortHint: J.sortHint,
45357
45543
  factory: () => {
45358
- new PrimariaNavItem({
45359
- icon: J.icon,
45360
- label: J.label,
45361
- callbackFn: J.callbackFn
45362
- });
45363
45544
  const X = new QuickActionItem(J.icon, J.label, J.callbackFn);
45364
45545
  return Promise.resolve(X);
45365
45546
  }
45366
45547
  });
45548
+ }, registerDoctorNavMenuViews = () => {
45549
+ registerCommunicationNavMenu(), registerDoctorCommunicationMenuActions(), registerNavMenuViews(doctorNavMenuItems);
45367
45550
  }, registerMainViews = () => {
45368
45551
  registerPDFVisorMainView();
45369
45552
  }, useInternalViews = () => {
@@ -45429,4 +45612,4 @@ export {
45429
45612
  h as v,
45430
45613
  PrimariaInteractionService as w
45431
45614
  };
45432
- //# sourceMappingURL=index-Cbd1_nDm.js.map
45615
+ //# sourceMappingURL=index-rzAClqiP.js.map