@uxland/primary-shell 7.29.7 → 7.29.12

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.
@@ -3,9 +3,9 @@ import { PrimariaNavItemConfig, PrimariaNavTreeMenuConfig } from '../typings';
3
3
  export declare class PrimariaNavTreeMenu extends LitElement {
4
4
  static styles: import('lit').CSSResult;
5
5
  config: PrimariaNavTreeMenuConfig;
6
- primariaNavItemConfig: PrimariaNavItemConfig;
7
6
  showActionMenu: boolean;
8
7
  constructor(config: PrimariaNavTreeMenuConfig);
8
+ get primariaNavItemConfig(): PrimariaNavItemConfig;
9
9
  handleItemClick: () => void;
10
10
  handleCloseMenu: () => void;
11
11
  render(): import('lit').TemplateResult<1>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uxland/primary-shell",
3
- "version": "7.29.7",
3
+ "version": "7.29.12",
4
4
  "description": "Primaria Shell",
5
5
  "author": "UXLand <dev@uxland.es>",
6
6
  "homepage": "https://github.com/uxland/harmonix/tree/app#readme",
@@ -25,7 +25,7 @@
25
25
  "url": "https://github.com/uxland/harmonix/issues"
26
26
  },
27
27
  "dependencies": {
28
- "@uxland/harmonix": "^1.1.2",
28
+ "@uxland/harmonix": "^1.1.3",
29
29
  "@uxland/harmonix-adapters": "^1.2.2"
30
30
  },
31
31
  "devDependencies": {
@@ -23,3 +23,7 @@
23
23
  outline: 2px solid white;
24
24
  outline-offset: -2px;
25
25
  }
26
+
27
+ dss-tooltip {
28
+ pointer-events: none;
29
+ }
@@ -23,3 +23,7 @@
23
23
  outline: 2px solid white;
24
24
  outline-offset: -2px;
25
25
  }
26
+
27
+ dss-tooltip {
28
+ pointer-events: none;
29
+ }
@@ -23,3 +23,7 @@
23
23
  outline: 2px solid white;
24
24
  outline-offset: -2px;
25
25
  }
26
+
27
+ dss-tooltip {
28
+ pointer-events: none;
29
+ }
@@ -4,12 +4,11 @@ import { classMap } from "lit/directives/class-map.js";
4
4
 
5
5
  export const template = (props: PrimariaNavItem) => {
6
6
  return html`
7
- <div
8
- class=${classMap({ item: true, active: props.isActive })}
9
- @click=${props.config.callbackFn}
7
+ <div
8
+ class=${classMap({ item: true, active: props.isActive })}
10
9
  ?expanded=${props.showText}
11
10
  >
12
- <div class="icon-label">
11
+ <div class="icon-label" @click=${props.config.callbackFn}>
13
12
  <dss-icon icon=${props.config.icon} size="md" ?fill=${props.config.fill} style=${props.config.rotateIcon ? "transform: rotate(180deg);" : ""}></dss-icon>
14
13
  ${props.showText ? html`<span>${props.config.label}</span>` : ""}
15
14
  </div>
@@ -10,16 +10,18 @@ export class PrimariaNavTreeMenu extends LitElement {
10
10
  `;
11
11
 
12
12
  @property({ type: Object }) config: PrimariaNavTreeMenuConfig;
13
- @state() primariaNavItemConfig: PrimariaNavItemConfig;
14
13
 
15
14
  @state() showActionMenu = false;
16
15
 
17
16
  constructor(config: PrimariaNavTreeMenuConfig) {
18
17
  super();
19
18
  this.config = config;
20
- this.primariaNavItemConfig = {
21
- icon: config.icon,
22
- label: config.label,
19
+ }
20
+
21
+ get primariaNavItemConfig(): PrimariaNavItemConfig {
22
+ return {
23
+ icon: this.config.icon,
24
+ label: this.config.label,
23
25
  showArrow: true,
24
26
  callbackFn: this.handleItemClick,
25
27
  };
@@ -27,7 +29,6 @@ export class PrimariaNavTreeMenu extends LitElement {
27
29
 
28
30
  handleItemClick = () => {
29
31
  this.showActionMenu = true;
30
- this.requestUpdate();
31
32
  };
32
33
 
33
34
  handleCloseMenu = () => {
@@ -1,4 +1,4 @@
1
- import { html, nothing } from "lit";
1
+ import { html } from "lit";
2
2
  import { PrimariaNavTreeMenu } from "./primaria-nav-tree-menu";
3
3
  import { classMap } from "lit/directives/class-map.js";
4
4
 
@@ -6,45 +6,41 @@ export const template = (props: PrimariaNavTreeMenu) => html`
6
6
  <div class="wrapper">
7
7
  <primaria-nav-item
8
8
  .config=${props.primariaNavItemConfig}
9
- @click=${props.handleItemClick}
10
9
  class="${classMap({ "menu-active": props.showActionMenu })}"
11
10
  ></primaria-nav-item>
12
- ${
13
- props.showActionMenu
14
- ? html`
15
- <dss-action-menu @onCloseActionMenu=${props.handleCloseMenu}>
16
- ${props.config.actionMenuItems?.map(
17
- (item) => item.hasNestedMenu
18
- ? html`
19
- <dss-action-menu-item
20
- righticon=${item.icon}
21
- .label=${item.label}
22
- hasnestedmenu
23
- >
24
- <dss-action-menu>
25
- ${item.nestedMenuItems?.map(
26
- (nestedItem) => html`
27
- <dss-action-menu-item
28
- righticon=${nestedItem.icon}
29
- .label=${nestedItem.label}
30
- @click=${nestedItem.callbackFn}
31
- ></dss-action-menu-item>
32
- `,
33
- )}
34
- </dss-action-menu>
35
- </dss-action-menu-item>
36
- `
37
- : html`
38
- <dss-action-menu-item
39
- righticon=${item.icon}
40
- .label=${item.label}
41
- @click=${item.callbackFn}
42
- ></dss-action-menu-item>
43
- `,
44
- )}
45
- </dss-action-menu>
46
- `
47
- : nothing
48
- }
11
+ <dss-action-menu
12
+ @onCloseActionMenu=${props.handleCloseMenu}
13
+ ?hidden=${!props.showActionMenu}
14
+ >
15
+ ${props.config.actionMenuItems?.map((item) =>
16
+ item.hasNestedMenu
17
+ ? html`
18
+ <dss-action-menu-item
19
+ righticon=${item.icon}
20
+ .label=${item.label}
21
+ hasnestedmenu
22
+ >
23
+ <dss-action-menu>
24
+ ${item.nestedMenuItems?.map(
25
+ (nestedItem) => html`
26
+ <dss-action-menu-item
27
+ righticon=${nestedItem.icon}
28
+ .label=${nestedItem.label}
29
+ @click=${nestedItem.callbackFn}
30
+ ></dss-action-menu-item>
31
+ `,
32
+ )}
33
+ </dss-action-menu>
34
+ </dss-action-menu-item>
35
+ `
36
+ : html`
37
+ <dss-action-menu-item
38
+ righticon=${item.icon}
39
+ .label=${item.label}
40
+ @click=${item.callbackFn}
41
+ ></dss-action-menu-item>
42
+ `,
43
+ )}
44
+ </dss-action-menu>
49
45
  </div>
50
46
  `;
@@ -4,6 +4,6 @@ import { translate } from "../../../../locales";
4
4
 
5
5
  export const template = (props: FinalizeVisitButton) => {
6
6
  return html`
7
- ${props.visitId ? html`<dss-button @click=${props.finalizeVisitHandler} variant="subtle" size="md" icon="door_front" label=${translate("actions.finalizeVisit")}></dss-button>` : nothing}
8
- `;
7
+ <dss-button @click=${props.finalizeVisitHandler} variant="subtle" size="md" icon="door_front" label=${translate("actions.finalizeVisit")}></dss-button>
8
+ `;
9
9
  };