@uxland/primary-shell 7.28.0 → 7.29.1

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uxland/primary-shell",
3
- "version": "7.28.0",
3
+ "version": "7.29.1",
4
4
  "description": "Primaria Shell",
5
5
  "author": "UXLand <dev@uxland.es>",
6
6
  "homepage": "https://github.com/uxland/harmonix/tree/app#readme",
@@ -1,2 +1,2 @@
1
1
  export { showNavItemTooltip } from "./tooltip-manager";
2
- export { default as NavigationTooltip } from "./navigation-tooltip";
2
+ export { NavigationTooltip } from "./navigation-tooltip";
@@ -0,0 +1,50 @@
1
+ import { LitElement, html, css, unsafeCSS } from "lit";
2
+ import { property } from "lit/decorators.js";
3
+ import styles from "./styles.css?inline";
4
+
5
+ export class NavigationTooltip extends LitElement {
6
+ @property({ type: String }) text = "";
7
+ @property({ type: Number }) itemAbsoluteY = 0;
8
+
9
+ static styles = css`
10
+ ${unsafeCSS(styles)}
11
+ `;
12
+
13
+ render() {
14
+ const itemHeight = 51;
15
+ const centerY = this.itemAbsoluteY + itemHeight / 2;
16
+
17
+ return html`
18
+ <div class="tooltip-overlay">
19
+ <div class="navigation-tooltip" style="left: 73px; top: ${centerY}px">
20
+ <dss-icon icon="info" size="md"></dss-icon>
21
+ ${this.text}
22
+ <div class="arrow"></div>
23
+ </div>
24
+ </div>
25
+ `;
26
+ }
27
+ }
28
+
29
+ customElements.define("navigation-tooltip", NavigationTooltip);
30
+
31
+ export const renderNavigationTooltip = (text: string, itemAbsoluteY: number) => {
32
+ // Remove existing tooltip if any
33
+ const existing = document.querySelector("navigation-tooltip");
34
+ if (existing) {
35
+ existing.remove();
36
+ }
37
+
38
+ // Create new tooltip
39
+ const tooltip = document.createElement("navigation-tooltip") as NavigationTooltip;
40
+ tooltip.text = text;
41
+ tooltip.itemAbsoluteY = itemAbsoluteY;
42
+ document.body.appendChild(tooltip);
43
+
44
+ // Auto-remove after 5 seconds
45
+ setTimeout(() => {
46
+ if (tooltip && document.body.contains(tooltip)) {
47
+ tooltip.remove();
48
+ }
49
+ }, 5000);
50
+ };
@@ -1,3 +1,7 @@
1
+ :host {
2
+ display: block;
3
+ }
4
+
1
5
  .tooltip-overlay {
2
6
  position: fixed;
3
7
  top: 0;
@@ -40,7 +44,7 @@
40
44
  width: 0;
41
45
  height: 0;
42
46
  border: 12px solid transparent;
43
- border-right-color: #1e88e5;
47
+ border-right-color: #0F4877;
44
48
  }
45
49
 
46
50
  @keyframes fadeInOut {
@@ -170,21 +170,6 @@ export const registerDoctorCommunicationMenuActions = () => {
170
170
  });
171
171
  },
172
172
  },
173
- {
174
- id: "2",
175
- sortHint: "0020",
176
- icon: "open_in_new",
177
- label: "eConsulta",
178
- callbackFn: async () => {
179
- const CIP = await getPatientCip(shellApi);
180
- const visiId = (await shellApi.broker.send(new GetVisitId())) as string;
181
-
182
- shellApi.ecapEventManager.publish("NAVEGACIO_ECAP_ECONSULTA", "NO_TANCAR", {
183
- CIP: CIP || "",
184
- VisiID: visiId || "",
185
- });
186
- },
187
- },
188
173
  {
189
174
  id: "3",
190
175
  icon: "open_in_new",