@uxland/primary-shell 3.1.0-rc.1 → 3.1.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": "3.1.0-rc.1",
3
+ "version": "3.1.1",
4
4
  "description": "Primaria Shell",
5
5
  "author": "UXLand <dev@uxland.es>",
6
6
  "homepage": "https://github.com/uxland/harmonix/tree/app#readme",
@@ -23,7 +23,8 @@
23
23
  "start": "ng serve --host 0.0.0.0",
24
24
  "build": "vite build",
25
25
  "preview": "vite preview",
26
- "publish-rc": "npm publish --tag rc"
26
+ "publish-rc": "npm publish --tag rc",
27
+ "publish": "npm publish"
27
28
  },
28
29
  "bugs": {
29
30
  "url": "https://github.com/uxland/harmonix/issues"
@@ -22,12 +22,22 @@
22
22
  &__left {
23
23
  @include horizontal-center;
24
24
  gap: 24px;
25
+
26
+ .header-logo {
27
+ align-self: center;
28
+ }
29
+ #header-region-container {
30
+ @include horizontal-center;
31
+ }
25
32
  }
26
- .header-logo {
27
- align-self: center;
28
- }
29
- #actions-toolbar-region-container {
30
- @include layout-horizontal;
33
+
34
+ &__right {
35
+ @include horizontal-center;
36
+ gap: 24px;
37
+
38
+ #header-actions-region-container {
39
+ @include horizontal-center;
40
+ }
31
41
  }
32
42
  }
33
43
 
@@ -17,8 +17,8 @@ export const template = (props: PrimariaShell) => html`
17
17
  <div class="header-logo">
18
18
  <img src=${salutLogo} alt="logo" />
19
19
  </div>
20
- <primaria-content-switcher id="header-region-container"></primaria-content-switcher>
21
20
  <patient-header></patient-header>
21
+ <div id="header-region-container"></div>
22
22
  </div>
23
23
  <div class="header__right">
24
24
  <div id="header-actions-region-container"></div>
package/src/index.ts CHANGED
@@ -11,3 +11,4 @@ export type {
11
11
  IConfirmMixin,
12
12
  CustomConfirmOptions,
13
13
  } from "./UI/shared-components/primaria-interaction";
14
+ export * from "./internal-plugins";
@@ -125,4 +125,26 @@ describe("isValidActivityHistoryItem", () => {
125
125
 
126
126
  expect(isValidActivityHistoryItem(invalidItem)).toBe(false);
127
127
  });
128
+ it("should return true if all base props are correct, but object contain more extra fields", () => {
129
+ const validItem = {
130
+ id: "123",
131
+ date: "2023-10-07",
132
+ professional: {
133
+ id: "prof-1",
134
+ name: "Dr. John Doe",
135
+ speciality: { id: "spec-1", description: "Cardiology" },
136
+ role: { id: "role-1", description: "Lead Doctor" },
137
+ },
138
+ relevant: true,
139
+ diagnostics: [{ id: "diag-1", description: "High Blood Pressure" }],
140
+ center: { id: "center-1", description: "Main Hospital" },
141
+ up: { id: "up-1", description: "Unit A" },
142
+ ep: { id: "ep-1", description: "Emergency Room" },
143
+ service: { id: "service-1", description: "Cardiac Service" },
144
+ prop1: "value1",
145
+ prop2: "value2",
146
+ };
147
+
148
+ expect(isValidActivityHistoryItem(validItem)).toBe(true);
149
+ });
128
150
  });
@@ -37,17 +37,22 @@ export const activityHistorySlice = createSlice({
37
37
  addActivityHistoryItems(state, action) {
38
38
  const { id, items } = action.payload;
39
39
 
40
+ // Crea la colección si no existe
41
+ if (!state.collections[id])
42
+ state.collections = { ...state.collections, [id]: action.payload };
40
43
  // Si la colección ya existe, fusiona el array existente con el nuevo; si no, crea una nueva entrada
41
- state.collections = {
42
- ...state.collections,
43
- [id]: {
44
- ...state.collections[id],
45
- items: [
46
- ...(state.collections[id]?.items || []), // Array existente o vacío si no hay nada
47
- ...items, // Nuevo array de action.payload.items
48
- ],
49
- },
50
- };
44
+ else {
45
+ state.collections = {
46
+ ...state.collections,
47
+ [id]: {
48
+ ...state.collections[id],
49
+ items: [
50
+ ...(state.collections[id]?.items || []), // Array existente o vacío si no hay nada
51
+ ...items, // Nuevo array de action.payload.items
52
+ ],
53
+ },
54
+ };
55
+ }
51
56
  },
52
57
  removeErrorHistoryItem(state, action) {
53
58
  state.error = state.error.filter((i) => i !== action.payload);
@@ -0,0 +1 @@
1
+ export * from "./domain/model";
@@ -0,0 +1 @@
1
+ export * from "./activity-history";