@uxland/primary-shell 7.46.11 → 7.46.13

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 (30) hide show
  1. package/dist/{component-D1LT-9ft.js → component-CQDFWF9Z.js} +2 -2
  2. package/dist/{component-D1LT-9ft.js.map → component-CQDFWF9Z.js.map} +1 -1
  3. package/dist/{index-eNimG-uq.js → index-Dcg1Qboj.js} +268 -338
  4. package/dist/index-Dcg1Qboj.js.map +1 -0
  5. package/dist/index.js +3 -3
  6. package/dist/index.umd.cjs +52 -84
  7. package/dist/index.umd.cjs.map +1 -1
  8. package/dist/{plugin-Dl1Lkn7z.js → plugin-Ddy8HwLA.js} +5441 -5430
  9. package/dist/plugin-Ddy8HwLA.js.map +1 -0
  10. package/dist/primary/shell/src/UI/components/clinical-pathways-action-menu/clinical-pathways-action-menu.d.ts +4 -12
  11. package/dist/primary/shell/src/UI/components/communication-action-menu/communication-action-menu.d.ts +4 -12
  12. package/dist/primary/shell/src/UI/components/petitioner-action-menu/petitioner-action-menu.d.ts +4 -12
  13. package/dist/primary/shell/src/UI/components/sidenav-action-menu/sidenav-action-menu.d.ts +27 -0
  14. package/dist/primary/shell/src/UI/components/sidenav-action-menu/template.d.ts +2 -0
  15. package/package.json +3 -3
  16. package/src/UI/components/clinical-pathways-action-menu/clinical-pathways-action-menu.ts +6 -41
  17. package/src/UI/components/communication-action-menu/communication-action-menu.ts +6 -41
  18. package/src/UI/components/petitioner-action-menu/petitioner-action-menu.ts +6 -41
  19. package/src/UI/components/sidenav-action-menu/sidenav-action-menu.ts +62 -0
  20. package/src/UI/components/{petitioner-action-menu → sidenav-action-menu}/template.ts +3 -3
  21. package/dist/index-eNimG-uq.js.map +0 -1
  22. package/dist/plugin-Dl1Lkn7z.js.map +0 -1
  23. package/dist/primary/shell/src/UI/components/clinical-pathways-action-menu/template.d.ts +0 -2
  24. package/dist/primary/shell/src/UI/components/communication-action-menu/template.d.ts +0 -2
  25. package/dist/primary/shell/src/UI/components/petitioner-action-menu/template.d.ts +0 -2
  26. package/src/UI/components/clinical-pathways-action-menu/template.ts +0 -24
  27. package/src/UI/components/communication-action-menu/styles.css +0 -29
  28. package/src/UI/components/communication-action-menu/template.ts +0 -24
  29. package/src/UI/components/petitioner-action-menu/styles.css +0 -29
  30. /package/src/UI/components/{clinical-pathways-action-menu → sidenav-action-menu}/styles.css +0 -0
@@ -1,15 +1,7 @@
1
1
  import { IRegion } from '@uxland/regions';
2
- import { PropertyValues } from 'lit';
3
- declare const ClinicalPathwaysActionMenu_base: any;
4
- export declare class ClinicalPathwaysActionMenu extends ClinicalPathwaysActionMenu_base {
2
+ import { SidenavActionMenu } from '../sidenav-action-menu/sidenav-action-menu';
3
+ /** Menú "Vies clíniques" del menú de navegació: aporta la regió `clinicalPathwaysSidenav`. */
4
+ export declare class ClinicalPathwaysActionMenu extends SidenavActionMenu {
5
5
  constructor(icon: string, label: string);
6
- showText: boolean;
7
- clinicalPathwaysSidenavRegion: IRegion | undefined;
8
- static styles: import('lit').CSSResult;
9
- firstUpdated(_changedProps: PropertyValues<ClinicalPathwaysActionMenu>): void;
10
- observeHostResize(): void;
11
- render(): import('lit').TemplateResult<1>;
12
- icon: string;
13
- label: string;
6
+ sidenavRegion: IRegion | undefined;
14
7
  }
15
- export {};
@@ -1,15 +1,7 @@
1
1
  import { IRegion } from '@uxland/regions';
2
- import { PropertyValues } from 'lit';
3
- declare const CommunicationActionMenu_base: any;
4
- export declare class CommunicationActionMenu extends CommunicationActionMenu_base {
2
+ import { SidenavActionMenu } from '../sidenav-action-menu/sidenav-action-menu';
3
+ /** Menú "Comunicació" del menú de navegació: aporta la regió `communicationSidenav`. */
4
+ export declare class CommunicationActionMenu extends SidenavActionMenu {
5
5
  constructor(icon: string, label: string);
6
- showText: boolean;
7
- comminucationSidenavRegion: IRegion | undefined;
8
- static styles: import('lit').CSSResult;
9
- firstUpdated(_changedProps: PropertyValues<CommunicationActionMenu>): void;
10
- observeHostResize(): void;
11
- render(): import('lit').TemplateResult<1>;
12
- icon: string;
13
- label: string;
6
+ sidenavRegion: IRegion | undefined;
14
7
  }
15
- export {};
@@ -1,15 +1,7 @@
1
1
  import { IRegion } from '@uxland/regions';
2
- import { PropertyValues } from 'lit';
3
- declare const PetitionerActionMenu_base: any;
4
- export declare class PetitionerActionMenu extends PetitionerActionMenu_base {
2
+ import { SidenavActionMenu } from '../sidenav-action-menu/sidenav-action-menu';
3
+ /** Menú "Peticionari" del menú de navegació: aporta la regió `petitionerSidenav`. */
4
+ export declare class PetitionerActionMenu extends SidenavActionMenu {
5
5
  constructor(icon: string, label: string);
6
- showText: boolean;
7
- petitionerSidenavRegion: IRegion | undefined;
8
- static styles: import('lit').CSSResult;
9
- firstUpdated(_changedProps: PropertyValues<PetitionerActionMenu>): void;
10
- observeHostResize(): void;
11
- render(): import('lit').TemplateResult<1>;
12
- icon: string;
13
- label: string;
6
+ sidenavRegion: IRegion | undefined;
14
7
  }
15
- export {};
@@ -0,0 +1,27 @@
1
+ import { PropertyValues } from 'lit';
2
+ /** Id del contenidor de la regió, derivat del seu nom. */
3
+ export declare const regionContainerId: (regionName: string) => string;
4
+ declare const SidenavActionMenu_base: any;
5
+ /**
6
+ * Base dels menús del menú de navegació que despleguen un `dss-action-menu` amb una regió a
7
+ * dins: "Comunicació", "Vies clíniques" i "Peticionari".
8
+ *
9
+ * Els tres eren el mateix component copiat tres vegades (styles.css idèntics i templates que
10
+ * només diferien en l'id del contenidor). Cada subclasse només aporta el seu `@region`, que no
11
+ * es pot parametritzar: el decorador escriu la metadada al constructor de la classe, així que
12
+ * una sola classe compartida tindria una única regió per a totes les instàncies.
13
+ */
14
+ export declare class SidenavActionMenu extends SidenavActionMenu_base {
15
+ constructor(icon: string, label: string, regionName: string);
16
+ showText: boolean;
17
+ icon: string;
18
+ label: string;
19
+ regionName: string;
20
+ get containerId(): string;
21
+ static styles: import('lit').CSSResult;
22
+ firstUpdated(_changedProps: PropertyValues<SidenavActionMenu>): void;
23
+ /** Amaga el text quan el menú es col·lapsa. */
24
+ observeHostResize(): void;
25
+ render(): import('lit').TemplateResult<1>;
26
+ }
27
+ export {};
@@ -0,0 +1,2 @@
1
+ import { SidenavActionMenu } from './sidenav-action-menu';
2
+ export declare const template: (props: SidenavActionMenu) => import('lit').TemplateResult<1>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uxland/primary-shell",
3
- "version": "7.46.11",
3
+ "version": "7.46.13",
4
4
  "description": "Primaria Shell",
5
5
  "author": "UXLand <dev@uxland.es>",
6
6
  "homepage": "https://github.com/uxland/harmonix/tree/app#readme",
@@ -40,14 +40,14 @@
40
40
  "inversify": "^6.0.2",
41
41
  "inversify-inject-decorators": "^3.1.0",
42
42
  "jwt-decode": "^4.0.0",
43
- "lit": "^3.1.0",
43
+ "lit": "^3.2.1",
44
44
  "react": "^19.0.0",
45
45
  "react-dom": "^19.0.0",
46
46
  "reflect-metadata": "^0.2.2",
47
47
  "tslib": "^2.3.0",
48
48
  "uxl-quill": "^1.0.1",
49
49
  "vite": "^7.0.0",
50
- "@primaria/plugins-core": "1.0.18"
50
+ "@primaria/plugins-core": "1.0.21"
51
51
  },
52
52
  "scripts": {
53
53
  "serve": "vite",
@@ -1,48 +1,13 @@
1
1
  import { IRegion, region } from "@uxland/regions";
2
- import { LitElement, PropertyValues, css, html, unsafeCSS } from "lit";
3
- import { property, state } from "lit/decorators.js";
4
- import { PrimariaRegionHost } from "../../../api/api";
5
2
  import { shellRegions } from "../../../api/region-manager/regions";
6
- import styles from "./styles.css?inline";
7
- import { template } from "./template";
3
+ import { SidenavActionMenu, regionContainerId } from "../sidenav-action-menu/sidenav-action-menu";
8
4
 
9
- export class ClinicalPathwaysActionMenu extends PrimariaRegionHost(LitElement) {
5
+ /** Menú "Vies clíniques" del menú de navegació: aporta la regió `clinicalPathwaysSidenav`. */
6
+ export class ClinicalPathwaysActionMenu extends SidenavActionMenu {
10
7
  constructor(icon: string, label: string) {
11
- super();
12
- this.icon = icon;
13
- this.label = label;
8
+ super(icon, label, shellRegions.clinicalPathwaysSidenav);
14
9
  }
15
10
 
16
- @state() showText = false;
17
-
18
- @region({ targetId: "clinical-pathways-sidenav-region-container", name: shellRegions.clinicalPathwaysSidenav })
19
- clinicalPathwaysSidenavRegion: IRegion | undefined;
20
-
21
- static styles = css`
22
- ${unsafeCSS(styles)}
23
- `;
24
-
25
- firstUpdated(_changedProps: PropertyValues<ClinicalPathwaysActionMenu>) {
26
- super.firstUpdated(_changedProps);
27
- this.observeHostResize();
28
- }
29
-
30
- observeHostResize() {
31
- const parentElement = this.parentElement;
32
- const observer = new ResizeObserver((entries) => {
33
- for (const entry of entries) {
34
- const width = entry.target.clientWidth;
35
- this.showText = width > 100;
36
- }
37
- });
38
-
39
- observer.observe(parentElement as HTMLElement);
40
- }
41
-
42
- render() {
43
- return html`${template(this)}`;
44
- }
45
-
46
- @property({ type: String }) icon = "";
47
- @property({ type: String }) label = "";
11
+ @region({ targetId: regionContainerId(shellRegions.clinicalPathwaysSidenav), name: shellRegions.clinicalPathwaysSidenav })
12
+ sidenavRegion: IRegion | undefined;
48
13
  }
@@ -1,48 +1,13 @@
1
1
  import { IRegion, region } from "@uxland/regions";
2
- import { LitElement, PropertyValues, css, html, unsafeCSS } from "lit";
3
- import { property, state } from "lit/decorators.js";
4
- import { PrimariaRegionHost } from "../../../api/api";
5
2
  import { shellRegions } from "../../../api/region-manager/regions";
6
- import styles from "./styles.css?inline";
7
- import { template } from "./template";
3
+ import { SidenavActionMenu, regionContainerId } from "../sidenav-action-menu/sidenav-action-menu";
8
4
 
9
- export class CommunicationActionMenu extends PrimariaRegionHost(LitElement) {
5
+ /** Menú "Comunicació" del menú de navegació: aporta la regió `communicationSidenav`. */
6
+ export class CommunicationActionMenu extends SidenavActionMenu {
10
7
  constructor(icon: string, label: string) {
11
- super();
12
- this.icon = icon;
13
- this.label = label;
8
+ super(icon, label, shellRegions.communicationSidenav);
14
9
  }
15
10
 
16
- @state() showText = false;
17
-
18
- @region({ targetId: "communication-sidenav-region-container", name: shellRegions.communicationSidenav })
19
- comminucationSidenavRegion: IRegion | undefined;
20
-
21
- static styles = css`
22
- ${unsafeCSS(styles)}
23
- `;
24
-
25
- firstUpdated(_changedProps: PropertyValues<CommunicationActionMenu>) {
26
- super.firstUpdated(_changedProps);
27
- this.observeHostResize();
28
- }
29
-
30
- observeHostResize() {
31
- const parentElement = this.parentElement;
32
- const observer = new ResizeObserver((entries) => {
33
- for (const entry of entries) {
34
- const width = entry.target.clientWidth;
35
- this.showText = width > 100;
36
- }
37
- });
38
-
39
- observer.observe(parentElement as HTMLElement);
40
- }
41
-
42
- render() {
43
- return html`${template(this)}`;
44
- }
45
-
46
- @property({ type: String }) icon = "";
47
- @property({ type: String }) label = "";
11
+ @region({ targetId: regionContainerId(shellRegions.communicationSidenav), name: shellRegions.communicationSidenav })
12
+ sidenavRegion: IRegion | undefined;
48
13
  }
@@ -1,48 +1,13 @@
1
1
  import { IRegion, region } from "@uxland/regions";
2
- import { LitElement, PropertyValues, css, html, unsafeCSS } from "lit";
3
- import { property, state } from "lit/decorators.js";
4
- import { PrimariaRegionHost } from "../../../api/api";
5
2
  import { shellRegions } from "../../../api/region-manager/regions";
6
- import styles from "./styles.css?inline";
7
- import { template } from "./template";
3
+ import { SidenavActionMenu, regionContainerId } from "../sidenav-action-menu/sidenav-action-menu";
8
4
 
9
- export class PetitionerActionMenu extends PrimariaRegionHost(LitElement) {
5
+ /** Menú "Peticionari" del menú de navegació: aporta la regió `petitionerSidenav`. */
6
+ export class PetitionerActionMenu extends SidenavActionMenu {
10
7
  constructor(icon: string, label: string) {
11
- super();
12
- this.icon = icon;
13
- this.label = label;
8
+ super(icon, label, shellRegions.petitionerSidenav);
14
9
  }
15
10
 
16
- @state() showText = false;
17
-
18
- @region({ targetId: "petitioner-sidenav-region-container", name: shellRegions.petitionerSidenav })
19
- petitionerSidenavRegion: IRegion | undefined;
20
-
21
- static styles = css`
22
- ${unsafeCSS(styles)}
23
- `;
24
-
25
- firstUpdated(_changedProps: PropertyValues<PetitionerActionMenu>) {
26
- super.firstUpdated(_changedProps);
27
- this.observeHostResize();
28
- }
29
-
30
- observeHostResize() {
31
- const parentElement = this.parentElement;
32
- const observer = new ResizeObserver((entries) => {
33
- for (const entry of entries) {
34
- const width = entry.target.clientWidth;
35
- this.showText = width > 100;
36
- }
37
- });
38
-
39
- observer.observe(parentElement as HTMLElement);
40
- }
41
-
42
- render() {
43
- return html`${template(this)}`;
44
- }
45
-
46
- @property({ type: String }) icon = "";
47
- @property({ type: String }) label = "";
11
+ @region({ targetId: regionContainerId(shellRegions.petitionerSidenav), name: shellRegions.petitionerSidenav })
12
+ sidenavRegion: IRegion | undefined;
48
13
  }
@@ -0,0 +1,62 @@
1
+ import { LitElement, PropertyValues, css, html, unsafeCSS } from "lit";
2
+ import { property, state } from "lit/decorators.js";
3
+ import { PrimariaRegionHost } from "../../../api/api";
4
+ import styles from "./styles.css?inline";
5
+ import { template } from "./template";
6
+
7
+ /** Id del contenidor de la regió, derivat del seu nom. */
8
+ export const regionContainerId = (regionName: string) => `${regionName}-container`;
9
+
10
+ /**
11
+ * Base dels menús del menú de navegació que despleguen un `dss-action-menu` amb una regió a
12
+ * dins: "Comunicació", "Vies clíniques" i "Peticionari".
13
+ *
14
+ * Els tres eren el mateix component copiat tres vegades (styles.css idèntics i templates que
15
+ * només diferien en l'id del contenidor). Cada subclasse només aporta el seu `@region`, que no
16
+ * es pot parametritzar: el decorador escriu la metadada al constructor de la classe, així que
17
+ * una sola classe compartida tindria una única regió per a totes les instàncies.
18
+ */
19
+ export class SidenavActionMenu extends PrimariaRegionHost(LitElement) {
20
+ constructor(icon: string, label: string, regionName: string) {
21
+ super();
22
+ this.icon = icon;
23
+ this.label = label;
24
+ this.regionName = regionName;
25
+ }
26
+
27
+ @state() showText = false;
28
+
29
+ @property({ type: String }) icon = "";
30
+ @property({ type: String }) label = "";
31
+ @property({ type: String }) regionName = "";
32
+
33
+ get containerId() {
34
+ return regionContainerId(this.regionName);
35
+ }
36
+
37
+ static styles = css`
38
+ ${unsafeCSS(styles)}
39
+ `;
40
+
41
+ firstUpdated(_changedProps: PropertyValues<SidenavActionMenu>) {
42
+ super.firstUpdated(_changedProps);
43
+ this.observeHostResize();
44
+ }
45
+
46
+ /** Amaga el text quan el menú es col·lapsa. */
47
+ observeHostResize() {
48
+ const parentElement = this.parentElement;
49
+ const observer = new ResizeObserver((entries) => {
50
+ for (const entry of entries) {
51
+ const width = entry.target.clientWidth;
52
+ this.showText = width > 100;
53
+ }
54
+ });
55
+
56
+ observer.observe(parentElement as HTMLElement);
57
+ }
58
+
59
+ render() {
60
+ return html`${template(this)}`;
61
+ }
62
+ }
@@ -1,7 +1,7 @@
1
1
  import { html, nothing } from "lit";
2
- import { PetitionerActionMenu } from "./petitioner-action-menu";
2
+ import { SidenavActionMenu } from "./sidenav-action-menu";
3
3
 
4
- export const template = (props: PetitionerActionMenu) => {
4
+ export const template = (props: SidenavActionMenu) => {
5
5
  return html`
6
6
  <div class="item" ?expanded=${props.showText}>
7
7
  <div class="icon-label">
@@ -16,7 +16,7 @@ export const template = (props: PetitionerActionMenu) => {
16
16
  : nothing
17
17
  }
18
18
  </div>
19
- <dss-action-menu id="petitioner-sidenav-region-container" slot="content" >
19
+ <dss-action-menu id=${props.containerId} slot="content" >
20
20
  </dss-action-menu>
21
21
  ${props.showText ? html`<dss-icon icon="chevron_right" size="md"></dss-icon>` : nothing}
22
22
  </div>