@uxland/primary-shell 7.29.6 → 7.29.7

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 l, P as p, h as g, r as m, i as v, s as h, a as f, b as u } from "./index-CBLcIQsk.js";
1
+ import { t as d, k as l, P as p, h as g, r as m, i as v, s as h, a as f, b as u } from "./index-CbiH0JOX.js";
2
2
  const x = ".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)}", b = (r) => l`
3
3
  <div class="container">
4
4
  <!-- <div class="header">
@@ -44,4 +44,4 @@ i = c([
44
44
  export {
45
45
  i as ImportDataManagerModal
46
46
  };
47
- //# sourceMappingURL=component-DIEgkBBL.js.map
47
+ //# sourceMappingURL=component-DVZj1pQR.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"component-DIEgkBBL.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","import { 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, shellApi } from \"../../api\";\n\n@customElement(\"import-data-manager-modal\")\nexport class ImportDataManagerModal\n extends PrimariaRegionHost(LitElement)\n 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: shellApi.regionManager.regions.shell.importData })\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","shellApi","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;;;;;;ACVA,IAAMG,IAAN,cACGC,EAAmBC,CAAU,EAEvC;AAAA,EAHO,cAAA;AAAA,UAAA,GAAA,SAAA,GAqBL,KAAA,UAAU,MAAM;AACd,WAAK,QAAA;AAAA,IACP;AAAA,EAAA;AAAA,EAVA,SAAS;AACP,WAAOJ,IAAOF,EAAS,IAAI,CAAC;AAAA,EAC9B;AASF;AAxBaI,EAiBJ,SAASG;AAAAA,MACZC,EAAUC,CAAM,CAAC;AAAA;AAPrBC,EAAA;AAAA,EADCC,EAAO,EAAE,UAAU,sBAAsB,MAAMC,EAAS,cAAc,QAAQ,MAAM,WAAA,CAAY;AAAA,GAVtFR,EAWX,WAAA,oBAAA,CAAA;AAXWA,IAANM,EAAA;AAAA,EADNG,EAAc,2BAA2B;AAAA,GAC7BT,CAAA;"}
1
+ {"version":3,"file":"component-DVZj1pQR.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","import { 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, shellApi } from \"../../api\";\n\n@customElement(\"import-data-manager-modal\")\nexport class ImportDataManagerModal\n extends PrimariaRegionHost(LitElement)\n 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: shellApi.regionManager.regions.shell.importData })\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","shellApi","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;;;;;;ACVA,IAAMG,IAAN,cACGC,EAAmBC,CAAU,EAEvC;AAAA,EAHO,cAAA;AAAA,UAAA,GAAA,SAAA,GAqBL,KAAA,UAAU,MAAM;AACd,WAAK,QAAA;AAAA,IACP;AAAA,EAAA;AAAA,EAVA,SAAS;AACP,WAAOJ,IAAOF,EAAS,IAAI,CAAC;AAAA,EAC9B;AASF;AAxBaI,EAiBJ,SAASG;AAAAA,MACZC,EAAUC,CAAM,CAAC;AAAA;AAPrBC,EAAA;AAAA,EADCC,EAAO,EAAE,UAAU,sBAAsB,MAAMC,EAAS,cAAc,QAAQ,MAAM,WAAA,CAAY;AAAA,GAVtFR,EAWX,WAAA,oBAAA,CAAA;AAXWA,IAANM,EAAA;AAAA,EADNG,EAAc,2BAA2B;AAAA,GAC7BT,CAAA;"}
@@ -3370,7 +3370,17 @@ const BROKER_EVENTS = {
3370
3370
  injectAsyncHistoryItemsRequest: "inject_async_history_items_request",
3371
3371
  addHistoryItemRequest: "add_history_item_request",
3372
3372
  addHistoryItemsRequest: "add_history_items_request",
3373
- updateHistoryItemRequest: "update_history_item_request"
3373
+ updateHistoryItemRequest: "update_history_item_request",
3374
+ removeHistoryItemRequest: "remove_history_item_request"
3375
+ },
3376
+ shell: {
3377
+ appCrashed: "appCrashed",
3378
+ mainViewChanged: "mainViewChanged",
3379
+ refreshTokenFailed: "refreshTokenFailed",
3380
+ mpidHeaderInvalid: "mpidHeaderInvalid",
3381
+ quickActionBusyChanged: "quickActionBusyChanged",
3382
+ scrollToNavItemRequested: "scrollToNavItemRequested",
3383
+ scrollToNavItemCompleted: "scrollToNavItemCompleted"
3374
3384
  }
3375
3385
  }, disposableFactory = (J) => ({
3376
3386
  dispose: () => {
@@ -5271,15 +5281,7 @@ const {
5271
5281
  formToJSON,
5272
5282
  getAdapter,
5273
5283
  mergeConfig: mergeConfig$1
5274
- } = axios, shellEvents = {
5275
- appCrashed: "appCrashed",
5276
- mainViewChanged: "mainViewChanged",
5277
- refreshTokenFailed: "refreshTokenFailed",
5278
- mpidHeaderInvalid: "mpidHeaderInvalid",
5279
- quickActionBusyChanged: "quickActionBusyChanged",
5280
- scrollToNavItemRequested: "scrollToNavItemRequested",
5281
- scrollToNavItemCompleted: "scrollToNavItemCompleted"
5282
- };
5284
+ } = axios;
5283
5285
  class InvalidTokenError extends Error {
5284
5286
  }
5285
5287
  InvalidTokenError.prototype.name = "InvalidTokenError";
@@ -5353,7 +5355,7 @@ const validateMpidHeader = (J, W) => {
5353
5355
  try {
5354
5356
  return X && validateMpidHeader(re, J), re;
5355
5357
  } catch (oe) {
5356
- return oe instanceof InvalidMpidHeaderError && W.publish(shellEvents.mpidHeaderInvalid, {
5358
+ return oe instanceof InvalidMpidHeaderError && W.publish(BROKER_EVENTS.shell.mpidHeaderInvalid, {
5357
5359
  request: re.config
5358
5360
  }), Promise.reject(oe);
5359
5361
  }
@@ -5366,7 +5368,7 @@ const validateMpidHeader = (J, W) => {
5366
5368
  const ne = await J.refreshToken();
5367
5369
  return oe.headers.Authorization = `Bearer ${ne}`, te(oe);
5368
5370
  } catch (ne) {
5369
- return console.error("Error refreshing token:", ne), W.publish(shellEvents.refreshTokenFailed, {
5371
+ return console.error("Error refreshing token:", ne), W.publish(BROKER_EVENTS.shell.refreshTokenFailed, {
5370
5372
  request: oe
5371
5373
  }), Promise.reject(re);
5372
5374
  }
@@ -9439,12 +9441,12 @@ const renderNavigationTooltip = (J, W) => {
9439
9441
  }, 2500);
9440
9442
  }, scrollToNavItem = (J) => new Promise((W) => {
9441
9443
  const X = shellApi.broker.subscribe(
9442
- shellEvents.scrollToNavItemCompleted,
9444
+ BROKER_EVENTS.shell.scrollToNavItemCompleted,
9443
9445
  (te) => {
9444
9446
  X.dispose(), W(te);
9445
9447
  }
9446
9448
  );
9447
- shellApi.broker.publish(shellEvents.scrollToNavItemRequested, J), setTimeout(() => {
9449
+ shellApi.broker.publish(BROKER_EVENTS.shell.scrollToNavItemRequested, J), setTimeout(() => {
9448
9450
  X.dispose(), W({ scrollTop: 0, containerTop: 0, itemIndex: -1, itemAbsoluteY: window.innerHeight / 2 });
9449
9451
  }, 1e3);
9450
9452
  }), showNavItemTooltip = async (J, W) => {
@@ -9540,7 +9542,7 @@ class QuickActionBusyManagerImpl {
9540
9542
  }
9541
9543
  emitBusyChanged() {
9542
9544
  const W = this.isBusy();
9543
- this.broker.publish(shellEvents.quickActionBusyChanged, { busy: W });
9545
+ this.broker.publish(BROKER_EVENTS.shell.quickActionBusyChanged, { busy: W });
9544
9546
  }
9545
9547
  }
9546
9548
  const shellRegions = {
@@ -9657,7 +9659,7 @@ class RegionManagerProxy {
9657
9659
  return this.regionManager.getRegion(this.regions.shell.main).currentActiveViews[0]?.id;
9658
9660
  }
9659
9661
  _notifyMainViewChanged(W) {
9660
- this.broker.publish(shellEvents.mainViewChanged, { viewId: W });
9662
+ this.broker.publish(BROKER_EVENTS.shell.mainViewChanged, { viewId: W });
9661
9663
  }
9662
9664
  _destroy() {
9663
9665
  this.regionManager.destroy();
@@ -9721,7 +9723,7 @@ class ImportDataManagerImpl {
9721
9723
  async import(W) {
9722
9724
  this.currentImporterId = W, this.selectedItems = {}, this.pluginTexts = {};
9723
9725
  try {
9724
- const { ImportDataManagerModal: X } = await import("./component-DIEgkBBL.js"), { confirmed: te } = await this.interactionService.confirm(
9726
+ const { ImportDataManagerModal: X } = await import("./component-DVZj1pQR.js"), { confirmed: te } = await this.interactionService.confirm(
9725
9727
  void 0,
9726
9728
  { component: X },
9727
9729
  {
@@ -39954,23 +39956,23 @@ const Us = class Us extends PrimariaRegionHost(h$p) {
39954
39956
  }
39955
39957
  _subscribeEvents() {
39956
39958
  this.subscriptions.push(
39957
- shellApi.broker.subscribe(shellEvents.appCrashed, (W) => {
39959
+ shellApi.broker.subscribe(BROKER_EVENTS.shell.appCrashed, (W) => {
39958
39960
  this._handleError(W);
39959
39961
  })
39960
39962
  ), this.subscriptions.push(
39961
- shellApi.broker.subscribe(shellEvents.refreshTokenFailed, (W) => {
39963
+ shellApi.broker.subscribe(BROKER_EVENTS.shell.refreshTokenFailed, (W) => {
39962
39964
  this._handleError({ message: translate$1("errors.session") });
39963
39965
  })
39964
39966
  ), this.subscriptions.push(
39965
- shellApi.broker.subscribe(shellEvents.mpidHeaderInvalid, (W) => {
39967
+ shellApi.broker.subscribe(BROKER_EVENTS.shell.mpidHeaderInvalid, (W) => {
39966
39968
  this._handleError({ message: translate$1("errors.invalidPatient") });
39967
39969
  })
39968
39970
  ), this.subscriptions.push(
39969
- shellApi.broker.subscribe(shellEvents.quickActionBusyChanged, (W) => {
39971
+ shellApi.broker.subscribe(BROKER_EVENTS.shell.quickActionBusyChanged, (W) => {
39970
39972
  this.quickActionBusy = W.busy;
39971
39973
  })
39972
39974
  ), this.subscriptions.push(
39973
- shellApi.broker.subscribe(shellEvents.scrollToNavItemRequested, (W) => {
39975
+ shellApi.broker.subscribe(BROKER_EVENTS.shell.scrollToNavItemRequested, (W) => {
39974
39976
  this._scrollToNavItem(W);
39975
39977
  })
39976
39978
  );
@@ -39984,7 +39986,7 @@ const Us = class Us extends PrimariaRegionHost(h$p) {
39984
39986
  async _scrollToNavItem(W) {
39985
39987
  const te = (await shellApi.regionManager.getRegion(shellApi.regionManager.regions.shell.navigationMenu)).currentActiveViews, re = W.includes("::") ? W.split("::")[1] : W;
39986
39988
  if (!te.find((be) => be.id === re)) {
39987
- shellApi.broker.publish(shellEvents.scrollToNavItemCompleted, {
39989
+ shellApi.broker.publish(BROKER_EVENTS.shell.scrollToNavItemCompleted, {
39988
39990
  scrollTop: 0,
39989
39991
  containerTop: 0,
39990
39992
  itemIndex: -1
@@ -39996,7 +39998,7 @@ const Us = class Us extends PrimariaRegionHost(h$p) {
39996
39998
  return ge.localeCompare(ve);
39997
39999
  }).findIndex((be) => be.id === re);
39998
40000
  if (de === -1) {
39999
- shellApi.broker.publish(shellEvents.scrollToNavItemCompleted, {
40001
+ shellApi.broker.publish(BROKER_EVENTS.shell.scrollToNavItemCompleted, {
40000
40002
  scrollTop: 0,
40001
40003
  containerTop: 0,
40002
40004
  itemIndex: -1
@@ -40005,7 +40007,7 @@ const Us = class Us extends PrimariaRegionHost(h$p) {
40005
40007
  }
40006
40008
  const ce = this.shadowRoot?.querySelector("#menu-region-container");
40007
40009
  if (!ce) {
40008
- shellApi.broker.publish(shellEvents.scrollToNavItemCompleted, {
40010
+ shellApi.broker.publish(BROKER_EVENTS.shell.scrollToNavItemCompleted, {
40009
40011
  scrollTop: 0,
40010
40012
  containerTop: 0,
40011
40013
  itemIndex: de
@@ -40026,7 +40028,7 @@ const Us = class Us extends PrimariaRegionHost(h$p) {
40026
40028
  itemIndex: de,
40027
40029
  itemAbsoluteY: ge
40028
40030
  };
40029
- shellApi.broker.publish(shellEvents.scrollToNavItemCompleted, ve);
40031
+ shellApi.broker.publish(BROKER_EVENTS.shell.scrollToNavItemCompleted, ve);
40030
40032
  }, 300);
40031
40033
  }
40032
40034
  };
@@ -40549,7 +40551,7 @@ const Qs = class Qs extends k$a(h$p) {
40549
40551
  }).observe(W);
40550
40552
  }
40551
40553
  _subscribeEvents() {
40552
- const W = shellApi.broker.subscribe(shellEvents.mainViewChanged, (X) => {
40554
+ const W = shellApi.broker.subscribe(BROKER_EVENTS.shell.mainViewChanged, (X) => {
40553
40555
  this.isActive = X.viewId === this.view?.id;
40554
40556
  });
40555
40557
  this.subscriptions.push(W);
@@ -49116,7 +49118,6 @@ if (typeof document < "u") {
49116
49118
  ` + dssCSS, document.head.appendChild(J);
49117
49119
  }
49118
49120
  export {
49119
- BROKER_EVENTS as B,
49120
49121
  EcapEventManager as E,
49121
49122
  PrimariaRegionHost as P,
49122
49123
  shellApi as a,
@@ -49145,4 +49146,4 @@ export {
49145
49146
  l as x,
49146
49147
  PrimariaInteractionService as y
49147
49148
  };
49148
- //# sourceMappingURL=index-CBLcIQsk.js.map
49149
+ //# sourceMappingURL=index-CbiH0JOX.js.map