@uxland/primary-shell 2.0.0 → 2.0.1-rc.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/dist/plugin.d.ts CHANGED
@@ -2,5 +2,5 @@ import { PluginDefinition, Plugin as PluginType } from '@uxland/harmonix';
2
2
  import { PrimariaApi } from './api/api';
3
3
 
4
4
  export type { PluginDefinition, PluginInfo } from '@uxland/harmonix';
5
- export declare const bootstrapPlugins: (plugins: PluginDefinition[]) => any;
5
+ export declare const bootstrapPlugins: (plugins: PluginDefinition[]) => Promise<void | void[]>;
6
6
  export type Plugin = PluginType<PrimariaApi>;
@@ -1,4 +1,5 @@
1
- import { HarmonixRegionManager, HarmonixViewDefinition } from '@uxland/harmonix';
1
+ import { HarmonixRegionManager, IRegionManager, HarmonixViewDefinition } from '@uxland/harmonix';
2
+ import { PluginInfo } from './plugin';
2
3
 
3
4
  export interface PrimariaRegionManager extends HarmonixRegionManager {
4
5
  registerMenu(view: HarmonixViewDefinition): Promise<void>;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@uxland/primary-shell",
3
- "version": "2.0.0",
4
- "description": "Framework Integració modular",
3
+ "version": "2.0.1-rc.1",
4
+ "description": "Primaria Shell",
5
5
  "author": "UXLand <dev@uxland.es>",
6
6
  "homepage": "https://github.com/uxland/harmonix/tree/app#readme",
7
7
  "license": "UNLICENSED",
@@ -9,10 +9,7 @@
9
9
  "main": "src/index.ts",
10
10
  "types": "dist/index.d.ts",
11
11
  "module": "dist/index.js",
12
- "files": [
13
- "dist",
14
- "src"
15
- ],
12
+ "files": ["dist", "src"],
16
13
  "publishConfig": {
17
14
  "access": "public",
18
15
  "registry": "https://registry.npmjs.org/"
@@ -21,6 +18,13 @@
21
18
  "type": "git",
22
19
  "url": "git+https://github.com/uxland/harmonix.git"
23
20
  },
21
+ "scripts": {
22
+ "serve": "vite",
23
+ "start": "ng serve --host 0.0.0.0",
24
+ "build": "vite build",
25
+ "preview": "vite preview",
26
+ "publish-rc": "npm publish --tag rc"
27
+ },
24
28
  "bugs": {
25
29
  "url": "https://github.com/uxland/harmonix/issues"
26
30
  },
@@ -40,11 +44,5 @@
40
44
  "tslib": "^2.3.0",
41
45
  "vite": "^5.2.8",
42
46
  "@salut/design-system-salut": "1.6.0"
43
- },
44
- "scripts": {
45
- "serve": "vite",
46
- "start": "ng serve --host 0.0.0.0",
47
- "build": "vite build",
48
- "preview": "vite preview"
49
47
  }
50
- }
48
+ }
@@ -1,67 +1,9 @@
1
- //import "@uxland/primaria-ui-components";
2
1
  import "@salut/design-system-salut";
3
2
  import "@salut/design-system-salut/css/main.css";
4
3
  import { html } from "lit";
5
4
  import gencatLogo from "../../../UI/images/Gencat_Logotip.svg";
6
5
  import salutLogo from "../../../UI/images/Salut_Logotip.svg";
7
6
  import { PrimariaShell } from "./primaria-shell";
8
- import { shellApi } from "../../../api/api";
9
-
10
- const handleInteraction = () => {
11
- shellApi.interactionManager.notify({
12
- message: "Prova Toast!!",
13
- type: "danger",
14
- });
15
- };
16
-
17
- // const handleBasicConfirmation = () => {
18
- // shellApi.interactionManager
19
- // .doConfirm({
20
- // title: "Confirmation title",
21
- // type: "success",
22
- // message: "Això és missatge de confirmacio",
23
- // acceptLabel: "Acceptar",
24
- // cancelLabel: "Cancelar",
25
- // })
26
- // .then((r) => console.log(r));
27
- // };
28
-
29
- // const handleComponentConfirmation = () => {
30
- // shellApi.interactionManager
31
- // .doCustomConfirm({
32
- // title: "Confirmation title",
33
- // type: "danger",
34
- // componentConstructor: TitleView,
35
- // acceptLabel: "Acceptar",
36
- // cancelLabel: "Cancelar",
37
- // properties: { title: "HOLAAA" },
38
- // })
39
- // .then((r) => console.log(r));
40
- // };
41
- // const handleComponentConfirmation = () => {
42
- // shellApi.interactionManager
43
- // .doCustomConfirm({
44
- // title: "Exportar a PDF",
45
- // type: "success",
46
- // componentConstructor: ExportPdfModal,
47
- // acceptLabel: "Acceptar",
48
- // cancelLabel: "Cancelar",
49
- // properties: { text: "Hola custom text" },
50
- // })
51
- // .then((r) => console.log(r));
52
- // };
53
- // const handleComponentConfirmation2 = () => {
54
- // shellApi.interactionManager
55
- // .doCustomConfirm({
56
- // title: "Eliminar curs clínic",
57
- // type: "danger",
58
- // componentConstructor: DeleteClinicalCourseModal,
59
- // acceptLabel: "Eliminar",
60
- // cancelLabel: "Cancelar",
61
- // properties: { text: "Hola custom text" },
62
- // })
63
- // .then((r) => console.log(r));
64
- // };
65
7
 
66
8
  export const template = (props: PrimariaShell) => html`
67
9
  <div class="container">
@@ -2,7 +2,6 @@ import { PrimariaMenuItem } from "./UI/shared-components/primaria-menu-item/prim
2
2
  import { selectableAdapterFactory as factory, regionAdapterRegistry } from "@uxland/regions";
3
3
  import { ClinicalMonitoring } from "./UI/components/clinical-monitoring/clinical-monitoring";
4
4
  import { PrimariaShell } from "./UI/components/primaria-shell/primaria-shell";
5
- import { appendTheme } from "./UI/styles/theme/apply-theme";
6
5
  import { shellApi } from "./api/api";
7
6
  import { initializeLocalization } from "./locales";
8
7
  import { shellRegions } from "./regions";
@@ -13,7 +12,6 @@ export const initializeShell = async (element: HTMLElement) => {
13
12
  regionAdapterRegistry.registerAdapterFactory("primaria-content-switcher", factory);
14
13
  const shell = new PrimariaShell();
15
14
  element.appendChild(shell as any);
16
- appendTheme();
17
15
  registerViews();
18
16
  };
19
17
 
@@ -1 +0,0 @@
1
- export declare const appendTheme: () => void;
@@ -1,11 +0,0 @@
1
- const themeCSSVariables = `
2
- :root{
3
- --primaria-primary-color: #0054A8;
4
- }
5
- `;
6
-
7
- export const appendTheme = () => {
8
- const styleElement = document.createElement("style");
9
- styleElement.appendChild(document.createTextNode(themeCSSVariables));
10
- document.head.appendChild(styleElement);
11
- };