@uxland/primary-shell 7.50.6 → 7.50.8

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 { u as i, v as l, k as d, h as g, r as p, b as m, t as h } from "./index-BIs8eEYr.js";
1
+ import { u as i, v as l, k as d, h as g, r as p, b as m, t as h } from "./index-gUvhiwVy.js";
2
2
  const u = ".container{background-color:#fff;display:flex;flex-direction:column;min-width:500px;width:95vw;height:95vh;border-radius:var(--dss-radius-sm);overflow:hidden}.header{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;color:#000;padding:var(--dss-spacing-sm)}.header__title{grid-column:2;text-align:center}.header__close{grid-column:3;justify-self:end}.content{display:grid;flex:1;min-height:0;grid-template-columns:50% 50%;padding:16px}.content>primaria-region{width:100%;height:100%;min-height:0}.content primaria-region>div{width:100%;height:100%;border-radius:8px;padding:0 16px;box-sizing:border-box}.content>primaria-region>div{display:flex;flex-direction:column;gap:16px;overflow-y:auto}.content>primaria-region>div>*{flex-shrink:0}.footer{display:flex;flex-direction:row;align-items:center;background:#fff;justify-content:center;gap:12px;height:56px;border-top:1px solid var(--color-neutral-100);padding:var(--dss-spacing-sm)}", v = (a) => d`
3
3
  <div class="container">
4
4
  <div class="header">
@@ -65,4 +65,4 @@ t = x([
65
65
  export {
66
66
  t as ImportDataManagerModal
67
67
  };
68
- //# sourceMappingURL=component-u2CLR6gm.js.map
68
+ //# sourceMappingURL=component-DMRTcjcJ.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"component-u2CLR6gm.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 { shellApi } from \"../../api\";\nimport { ImportDataManagerModal } from \"./component\";\n\nexport const template = (props: ImportDataManagerModal) => {\n return html`\n <div class=\"container\">\n <div class=\"header\">\n <dss-typography class=\"header__title\" tag=\"h2\" variant=\"headline-4\">\n ${translate(\"importDataManager.title\")}\n </dss-typography>\n <dss-icon-button\n class=\"header__close\"\n icon=\"close\"\n size=\"lg\"\n variant=\"neutral\"\n label=\"${translate(\"importDataManager.actions.close\")}\"\n @onClick=\"${() => {\n props.cancel();\n }}\"\n ></dss-icon-button>\n </div>\n <div class=\"content\">\n <primaria-region name=\"${shellApi.regionManager.regions.shell.importDataActivityHistory}\"></primaria-region>\n <primaria-region name=\"${shellApi.regionManager.regions.shell.importData}\"></primaria-region>\n </div>\n <div class=\"footer\">\n <dss-button\n label=\"${translate(\"importDataManager.actions.cancel\")}\"\n @click=\"${() => {\n props.cancel();\n }}\"\n size=\"md\"\n variant=\"secondary\"\n ></dss-button>\n <dss-button\n icon=\"add_circle\"\n label=\"${translate(\"importDataManager.actions.import\")}\"\n @click=\"${() => {\n props._accept();\n }}\"\n size=\"md\"\n variant=\"primary\"\n ></dss-button>\n </div>\n </div>\n `;\n};\n","import { LitElement, css, html, unsafeCSS } from \"lit\";\nimport { customElement } from \"lit/decorators.js\";\nimport { ConfirmationContentProps } from \"../../interaction-service\";\nimport styles from \"./styles.css?inline\";\nimport { template } from \"./template\";\n\n@customElement(\"import-data-manager-modal\")\nexport class ImportDataManagerModal extends LitElement implements ConfirmationContentProps<undefined, undefined> {\n data: undefined;\n setResult: (result: undefined) => void;\n setIsValid: (isValid: boolean) => void;\n confirm: () => void;\n // Injectat pel servei d'interacció igual que la resta; faltava des que es va afegir a la\n // interfície.\n confirmResult: (result: undefined) => void;\n cancel: () => void;\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","shellApi","ImportDataManagerModal","LitElement","css","unsafeCSS","styles","__decorateClass","customElement"],"mappings":";m8BAKaA,IAAW,CAACC,MAChBC;AAAAA;AAAAA;AAAAA;AAAAA,YAIGC,EAAU,yBAAyB,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAO7BA,EAAU,iCAAiC,CAAC;AAAA,sBACzC,MAAM;AAChB,EAAAF,EAAM,OAAA;AACR,CAAC;AAAA;AAAA;AAAA;AAAA,iCAIsBG,EAAS,cAAc,QAAQ,MAAM,yBAAyB;AAAA,iCAC9DA,EAAS,cAAc,QAAQ,MAAM,UAAU;AAAA;AAAA;AAAA;AAAA,mBAI7DD,EAAU,kCAAkC,CAAC;AAAA,oBAC5C,MAAM;AACd,EAAAF,EAAM,OAAA;AACR,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAMQE,EAAU,kCAAkC,CAAC;AAAA,oBAC5C,MAAM;AACd,EAAAF,EAAM,QAAA;AACR,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;;AClCJ,IAAMI,IAAN,cAAqCC,EAAqE;AAAA,EAA1G,cAAA;AAAA,UAAA,GAAA,SAAA,GAkBL,KAAA,UAAU,MAAM;AACd,WAAK,QAAA;AAAA,IACP;AAAA,EAAA;AAAA,EAVA,SAAS;AACP,WAAOJ,IAAOF,EAAS,IAAI,CAAC;AAAA,EAC9B;AASF;AArBaK,EAcJ,SAASE;AAAAA,MACZC,EAAUC,CAAM,CAAC;AAAA;AAfVJ,IAANK,EAAA;AAAA,EADNC,EAAc,2BAA2B;AAAA,GAC7BN,CAAA;"}
1
+ {"version":3,"file":"component-DMRTcjcJ.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 { shellApi } from \"../../api\";\nimport { ImportDataManagerModal } from \"./component\";\n\nexport const template = (props: ImportDataManagerModal) => {\n return html`\n <div class=\"container\">\n <div class=\"header\">\n <dss-typography class=\"header__title\" tag=\"h2\" variant=\"headline-4\">\n ${translate(\"importDataManager.title\")}\n </dss-typography>\n <dss-icon-button\n class=\"header__close\"\n icon=\"close\"\n size=\"lg\"\n variant=\"neutral\"\n label=\"${translate(\"importDataManager.actions.close\")}\"\n @onClick=\"${() => {\n props.cancel();\n }}\"\n ></dss-icon-button>\n </div>\n <div class=\"content\">\n <primaria-region name=\"${shellApi.regionManager.regions.shell.importDataActivityHistory}\"></primaria-region>\n <primaria-region name=\"${shellApi.regionManager.regions.shell.importData}\"></primaria-region>\n </div>\n <div class=\"footer\">\n <dss-button\n label=\"${translate(\"importDataManager.actions.cancel\")}\"\n @click=\"${() => {\n props.cancel();\n }}\"\n size=\"md\"\n variant=\"secondary\"\n ></dss-button>\n <dss-button\n icon=\"add_circle\"\n label=\"${translate(\"importDataManager.actions.import\")}\"\n @click=\"${() => {\n props._accept();\n }}\"\n size=\"md\"\n variant=\"primary\"\n ></dss-button>\n </div>\n </div>\n `;\n};\n","import { LitElement, css, html, unsafeCSS } from \"lit\";\nimport { customElement } from \"lit/decorators.js\";\nimport { ConfirmationContentProps } from \"../../interaction-service\";\nimport styles from \"./styles.css?inline\";\nimport { template } from \"./template\";\n\n@customElement(\"import-data-manager-modal\")\nexport class ImportDataManagerModal extends LitElement implements ConfirmationContentProps<undefined, undefined> {\n data: undefined;\n setResult: (result: undefined) => void;\n setIsValid: (isValid: boolean) => void;\n confirm: () => void;\n // Injectat pel servei d'interacció igual que la resta; faltava des que es va afegir a la\n // interfície.\n confirmResult: (result: undefined) => void;\n cancel: () => void;\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","shellApi","ImportDataManagerModal","LitElement","css","unsafeCSS","styles","__decorateClass","customElement"],"mappings":";m8BAKaA,IAAW,CAACC,MAChBC;AAAAA;AAAAA;AAAAA;AAAAA,YAIGC,EAAU,yBAAyB,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAO7BA,EAAU,iCAAiC,CAAC;AAAA,sBACzC,MAAM;AAChB,EAAAF,EAAM,OAAA;AACR,CAAC;AAAA;AAAA;AAAA;AAAA,iCAIsBG,EAAS,cAAc,QAAQ,MAAM,yBAAyB;AAAA,iCAC9DA,EAAS,cAAc,QAAQ,MAAM,UAAU;AAAA;AAAA;AAAA;AAAA,mBAI7DD,EAAU,kCAAkC,CAAC;AAAA,oBAC5C,MAAM;AACd,EAAAF,EAAM,OAAA;AACR,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAMQE,EAAU,kCAAkC,CAAC;AAAA,oBAC5C,MAAM;AACd,EAAAF,EAAM,QAAA;AACR,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;;AClCJ,IAAMI,IAAN,cAAqCC,EAAqE;AAAA,EAA1G,cAAA;AAAA,UAAA,GAAA,SAAA,GAkBL,KAAA,UAAU,MAAM;AACd,WAAK,QAAA;AAAA,IACP;AAAA,EAAA;AAAA,EAVA,SAAS;AACP,WAAOJ,IAAOF,EAAS,IAAI,CAAC;AAAA,EAC9B;AASF;AArBaK,EAcJ,SAASE;AAAAA,MACZC,EAAUC,CAAM,CAAC;AAAA;AAfVJ,IAANK,EAAA;AAAA,EADNC,EAAc,2BAA2B;AAAA,GAC7BN,CAAA;"}
@@ -9027,7 +9027,7 @@ class ImportDataManagerImpl {
9027
9027
  async import(W, te) {
9028
9028
  this.currentImporterId = W, this.currentImportParams = te, this.selectedItems = {}, this.pluginTexts = {};
9029
9029
  try {
9030
- const { ImportDataManagerModal: oe } = await import("./component-u2CLR6gm.js"), { confirmed: ne } = await this.interactionService.confirm(
9030
+ const { ImportDataManagerModal: oe } = await import("./component-DMRTcjcJ.js"), { confirmed: ne } = await this.interactionService.confirm(
9031
9031
  void 0,
9032
9032
  { component: oe },
9033
9033
  {
@@ -9046,7 +9046,7 @@ class ImportDataManagerImpl {
9046
9046
  selectItems(W) {
9047
9047
  console.log(
9048
9048
  `[ImportDataManager] selectItems — pluginId: "${W.pluginId}" | items: ${W.data.length} | text.raw: ${W.text.raw.length} chars | text.html: ${W.text.html.length} chars`
9049
- ), this.selectedItems[W.pluginId] = W.data, this.pluginTexts[W.pluginId] = W.text;
9049
+ ), this.selectedItems[W.pluginId] = W.data, this.pluginTexts[W.pluginId] = { ...W.text, title: W.title };
9050
9050
  }
9051
9051
  getCurrentImporterId() {
9052
9052
  return this.currentImporterId;
@@ -9054,15 +9054,36 @@ class ImportDataManagerImpl {
9054
9054
  getCurrentImportParams() {
9055
9055
  return this.currentImportParams;
9056
9056
  }
9057
+ /**
9058
+ * Ajunta el text de cada plugin que ha contribuït a la importació.
9059
+ *
9060
+ * Els que declaren el mateix títol formen una sola secció, encapçalada un
9061
+ * cop (dues iniciatives poden omplir el mateix apartat del modal: el curs
9062
+ * clínic i l'històric d'activitat ho fan amb "Seguiment Clínic"). Els que no
9063
+ * en declaren cap van tots junts, sense títol.
9064
+ *
9065
+ * El resultat acaba amb una línia en blanc perquè qui rep el text pugui
9066
+ * seguir escrivint a sota.
9067
+ */
9057
9068
  getConcatenatedText() {
9058
- const W = [], te = [];
9059
- for (const oe of Object.values(this.pluginTexts))
9060
- oe.raw && W.push(oe.raw), oe.html && te.push(oe.html);
9061
- return {
9062
- raw: W.join(`
9069
+ const W = [];
9070
+ for (const { raw: ne, html: re, title: de } of Object.values(this.pluginTexts)) {
9071
+ if (!ne && !re) continue;
9072
+ const ce = de ?? "";
9073
+ let ue = W.find((fe) => fe.title === ce);
9074
+ ue || (ue = { title: ce, raw: [], html: [] }, W.push(ue)), ne && ue.raw.push(ne), re && ue.html.push(re);
9075
+ }
9076
+ const te = W.filter((ne) => ne.raw.length > 0).map((ne) => (ne.title ? `${ne.title}
9077
+
9078
+ ` : "") + ne.raw.join(`
9063
9079
 
9064
- `),
9065
- html: te.join("<br><br>")
9080
+ `)).join(`
9081
+
9082
+ `), oe = W.filter((ne) => ne.html.length > 0).map((ne) => (ne.title ? `<p><strong>${ne.title}</strong></p>` : "") + ne.html.join("<br><br>")).join("<br><br>");
9083
+ return {
9084
+ raw: te ? `${te}
9085
+ ` : "",
9086
+ html: oe ? `${oe}<p><br></p>` : ""
9066
9087
  };
9067
9088
  }
9068
9089
  }
@@ -9130,7 +9151,7 @@ const createContextManager = () => contextManager$1 || (contextManager$1 = new P
9130
9151
  let bootstrappedPlugins = [];
9131
9152
  const CORE_FIRST_ID = "activity-history", bundledActivityHistory = {
9132
9153
  pluginId: CORE_FIRST_ID,
9133
- importer: () => import("./plugin-9pNdD2kl.js")
9154
+ importer: () => import("./plugin-CErfA0eR.js")
9134
9155
  }, bootstrapPlugins = async (X, W) => {
9135
9156
  const te = X ?? [], oe = te.filter((ue) => ue.pluginId === CORE_FIRST_ID), ne = te.filter((ue) => ue.pluginId !== CORE_FIRST_ID), re = oe.length ? oe : [bundledActivityHistory], de = await p$d(
9136
9157
  re,
@@ -45654,4 +45675,4 @@ export {
45654
45675
  PrimariaRegion as y,
45655
45676
  createEcapEventManager as z
45656
45677
  };
45657
- //# sourceMappingURL=index-BIs8eEYr.js.map
45678
+ //# sourceMappingURL=index-gUvhiwVy.js.map