@egen-civitas/esm-framework 3.1.0 → 4.1.0
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/CHANGELOG.md +69 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/internal.d.ts +1 -0
- package/dist/internal.d.ts.map +1 -1
- package/dist/internal.js +1 -0
- package/mock-jest.tsx +20 -4
- package/mock.tsx +20 -4
- package/package.json +13 -12
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,74 @@
|
|
|
1
1
|
# @egen-civitas/esm-framework
|
|
2
2
|
|
|
3
|
+
## 4.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- c5d96c9: Client du protocole Host v1 (C5) : `createBridgeClient` (handshake mémorisé, délais, concurrence, messages invalides ignorés et comptés), `getHostInfo()`, `getHostBridge()`, `createMockHost()` (testing). En natif, `getPlatform().ready` attend désormais le handshake et rejette `INCOMPATIBLE` si le Host est de version incompatible ou annonce une autre plateforme. Aucun changement en Web.
|
|
8
|
+
- 74f778d: Conformité à la TopBar neutre du core (niveaux déclarés par les apps).
|
|
9
|
+
|
|
10
|
+
- `esm-extensions` : nouveau `TOPBAR_SLOT` (`topbar-slot`, seul slot d'extension de la TopBar) et types `TopBarPlacementMeta` / `TopBarRegion` / `TopBarContentRegion` pour la déclaration `meta.topbar` (niveau, rang, région, ordre, before/after). Retrait de `TOPBAR_LEVEL2_NAV_SLOT` et `TOPBAR_NAV_SLOTS` : le slot de navigation est uniquement `TOPBAR_NAV_SLOT` (`topbar-nav-slot`).
|
|
11
|
+
- `esm-styleguide` : `SectionNavPanel` ne lit plus l'ancien slot `topbar-level2-nav`.
|
|
12
|
+
- `esm-framework` : mocks alignés. `esm-app-shell` : documentation du layout-sync sans notion de niveau figé.
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- Updated dependencies [c5d96c9]
|
|
17
|
+
- Updated dependencies [340f5fe]
|
|
18
|
+
- Updated dependencies [74f778d]
|
|
19
|
+
- @egen-civitas/esm-platform@1.2.0
|
|
20
|
+
- @egen-civitas/esm-globals@2.2.0
|
|
21
|
+
- @egen-civitas/esm-extensions@2.5.0
|
|
22
|
+
- @egen-civitas/esm-styleguide@4.1.0
|
|
23
|
+
|
|
24
|
+
## 4.0.0
|
|
25
|
+
|
|
26
|
+
### Major Changes
|
|
27
|
+
|
|
28
|
+
- 5958a56: Framework neutre : suppression des derniers résidus hospitaliers (FHIR, patients, établissement de santé).
|
|
29
|
+
|
|
30
|
+
Retirés :
|
|
31
|
+
|
|
32
|
+
- `esm-api` : `fhirBaseUrl` et le traitement spécifique des URL FHIR (`_summary=data`) dans `egenFetch`.
|
|
33
|
+
- `esm-data-api` : type `FHIRLocationResource`.
|
|
34
|
+
- `esm-styleguide` : composant `LocationPicker` (basé sur l'API FHIR `Location` et le tag « Login Location ») ; pictogrammes médicaux `AppointmentsPictogram`, `AppointmentsAltPictogram`, `Assessment1Pictogram`, `Assessment2Pictogram`, `FacilityPictogram`, `RegistrationPictogram` (identifiants `egen-pict-appointments`, `-assessment-1`, `-assessment-2`, `-facility`, `-registration`) ; icônes `GenderFemaleIcon`, `GenderMaleIcon`, `GenderOtherIcon`, `GenderUnknownIcon`.
|
|
35
|
+
- `esm-translations` : clés `errorLoadingLoginLocations`, `searchForLocation` et clés orphelines patient/clinique (`Clinic`, `patientAvatarAlt`, `patientIdentifierSticker`, `patientLists`, `patientPhotoAlt`, `patientPhotoPlaceholder`, `seeMoreLists`) dans toutes les langues.
|
|
36
|
+
|
|
37
|
+
Ajouté : `HomePictogram` est désormais un pictogramme de maison neutre (`egen-pict-home`) au lieu d'un alias du bâtiment d'hôpital.
|
|
38
|
+
|
|
39
|
+
Vocabulaire neutre dans la documentation, les exemples, les stories et les tests (patient, médicaments, rendez-vous, pharmacie remplacés).
|
|
40
|
+
|
|
41
|
+
### Minor Changes
|
|
42
|
+
|
|
43
|
+
- 669cbd6: Réforme multiplateforme, lot P0 (docs/EGEN-FRAMEWORK-DEV.md) :
|
|
44
|
+
|
|
45
|
+
- esm-globals : `EgenTarget`, `CapabilityName`, `getEgenTarget()`, `isNativeTarget()`.
|
|
46
|
+
- esm-platform (nouveau package, 1.0.0) : contrats des capacités (annexe 2), `PlatformError`, détection de la cible, `getPlatform()` (adaptateur Web : session vide, `openExternal`, `lifecycle`, `files.select`, `camera`, `permissions` ; jamais de faux coffre ni de biométrie simulée. En natif, aucune capacité tant que le client de pont n'est pas branché, `ready` rejette `INCOMPATIBLE` sans Host), `createMockPlatform` (sous-chemin `/testing`).
|
|
47
|
+
- esm-framework : ré-export de `@egen-civitas/esm-platform` (`index`, `internal`, mocks).
|
|
48
|
+
- egen (CLI) : option `build --platform web|android|ios`.
|
|
49
|
+
- esm-api : `setAuthorizationProvider` (jeton fourni par la plateforme, rafraîchissement unique sur 401, rejeu GET/HEAD, politique `credentials`) ; `FetchConfig.replayOnUnauthorized` ; `isDevAuthBypassEnabled()` inerte en natif. Sans fournisseur, comportement inchangé.
|
|
50
|
+
- esm-dynamic-loading : overrides d'import map et de route map désactivés en cible native.
|
|
51
|
+
|
|
52
|
+
### Patch Changes
|
|
53
|
+
|
|
54
|
+
- Updated dependencies [d1d2d7d]
|
|
55
|
+
- Updated dependencies [669cbd6]
|
|
56
|
+
- Updated dependencies [b3d9419]
|
|
57
|
+
- Updated dependencies [5958a56]
|
|
58
|
+
- Updated dependencies [478e80c]
|
|
59
|
+
- @egen-civitas/esm-globals@2.1.0
|
|
60
|
+
- @egen-civitas/esm-routes@1.2.0
|
|
61
|
+
- @egen-civitas/esm-platform@1.1.0
|
|
62
|
+
- @egen-civitas/esm-api@3.0.0
|
|
63
|
+
- @egen-civitas/esm-dynamic-loading@2.1.0
|
|
64
|
+
- @egen-civitas/esm-translations@1.0.4
|
|
65
|
+
- @egen-civitas/esm-data-api@3.0.0
|
|
66
|
+
- @egen-civitas/esm-styleguide@4.0.0
|
|
67
|
+
- @egen-civitas/esm-react-utils@3.0.1
|
|
68
|
+
- @egen-civitas/esm-ai-framework@1.3.4
|
|
69
|
+
- @egen-civitas/esm-extensions@2.4.1
|
|
70
|
+
- @egen-civitas/esm-offline@1.0.4
|
|
71
|
+
|
|
3
72
|
## 3.1.0
|
|
4
73
|
|
|
5
74
|
### Minor Changes
|
package/dist/index.d.ts
CHANGED
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,mCAAmC,CAAC;AAClD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,kCAAkC,CAAC;AACjD,cAAc,wCAAwC,CAAC;AACvD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,iCAAiC,CAAC;AAChD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,yBAAyB,CAAC;AACxC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,yBAAyB,CAAC;AACxC,cAAc,gCAAgC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC;AACzC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,mCAAmC,CAAC;AAClD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,kCAAkC,CAAC;AACjD,cAAc,wCAAwC,CAAC;AACvD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,iCAAiC,CAAC;AAChD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,yBAAyB,CAAC;AACxC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,yBAAyB,CAAC;AACxC,cAAc,gCAAgC,CAAC"}
|
package/dist/index.js
CHANGED
package/dist/internal.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ export * from '@egen-civitas/esm-feature-flags';
|
|
|
9
9
|
export * from '@egen-civitas/esm-globals';
|
|
10
10
|
export * from '@egen-civitas/esm-navigation';
|
|
11
11
|
export * from '@egen-civitas/esm-offline';
|
|
12
|
+
export * from '@egen-civitas/esm-platform';
|
|
12
13
|
export * from '@egen-civitas/esm-react-utils';
|
|
13
14
|
export * from '@egen-civitas/esm-routes';
|
|
14
15
|
export * from '@egen-civitas/esm-state';
|
package/dist/internal.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../src/internal.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,mCAAmC,CAAC;AAClD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,kCAAkC,CAAC;AACjD,cAAc,wCAAwC,CAAC;AACvD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,iCAAiC,CAAC;AAChD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,yBAAyB,CAAC"}
|
|
1
|
+
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../src/internal.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,mCAAmC,CAAC;AAClD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,kCAAkC,CAAC;AACjD,cAAc,wCAAwC,CAAC;AACvD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,iCAAiC,CAAC;AAChD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,yBAAyB,CAAC"}
|
package/dist/internal.js
CHANGED
|
@@ -9,6 +9,7 @@ export * from "@egen-civitas/esm-feature-flags";
|
|
|
9
9
|
export * from "@egen-civitas/esm-globals";
|
|
10
10
|
export * from "@egen-civitas/esm-navigation";
|
|
11
11
|
export * from "@egen-civitas/esm-offline";
|
|
12
|
+
export * from "@egen-civitas/esm-platform";
|
|
12
13
|
export * from "@egen-civitas/esm-react-utils";
|
|
13
14
|
export * from "@egen-civitas/esm-routes";
|
|
14
15
|
export * from "@egen-civitas/esm-state";
|
package/mock-jest.tsx
CHANGED
|
@@ -2,6 +2,7 @@ import React, { useState } from 'react';
|
|
|
2
2
|
import { NEVER } from 'rxjs';
|
|
3
3
|
import type {} from '@egen-civitas/esm-globals';
|
|
4
4
|
import * as utils from '@egen-civitas/esm-utils/mock';
|
|
5
|
+
import { createMockHost, createMockPlatform } from '@egen-civitas/esm-platform/testing';
|
|
5
6
|
import dayjs from 'dayjs';
|
|
6
7
|
|
|
7
8
|
window.i18next = { ...window.i18next, language: 'en' };
|
|
@@ -62,6 +63,24 @@ export const goBackInHistory = jest.fn();
|
|
|
62
63
|
export const useConnectivity = jest.fn().mockReturnValue(true);
|
|
63
64
|
export const subscribeConnectivity = jest.fn();
|
|
64
65
|
|
|
66
|
+
/* esm-platform : un Platform de test sans Host. Les erreurs et la détection restent les vraies implémentations ;
|
|
67
|
+
* `getPlatform` retourne un Platform dont aucune capacité n'est fournie (comme en production sans adaptateur).
|
|
68
|
+
* Pour simuler une capacité : `getPlatform.mockReturnValue(createMockPlatform({ capabilities: { … } }))`. */
|
|
69
|
+
export {
|
|
70
|
+
PlatformError,
|
|
71
|
+
isPlatformError,
|
|
72
|
+
unavailable,
|
|
73
|
+
getPlatformEnvironment,
|
|
74
|
+
isNativePlatform,
|
|
75
|
+
hasHostBridge,
|
|
76
|
+
getHostBridge,
|
|
77
|
+
createBridgeClient,
|
|
78
|
+
} from '@egen-civitas/esm-platform';
|
|
79
|
+
export { createMockPlatform, createMockHost };
|
|
80
|
+
/* Handshake avec le Host : jamais effectué dans un test unitaire ; `createMockHost()` simule `window.egenHostBridge`. */
|
|
81
|
+
export const getHostInfo = jest.fn(() => null);
|
|
82
|
+
export const getPlatform = jest.fn(() => createMockPlatform());
|
|
83
|
+
|
|
65
84
|
/* esm-styleguide */
|
|
66
85
|
export const showNotification = jest.fn();
|
|
67
86
|
export const showActionableNotification = jest.fn();
|
|
@@ -74,8 +93,7 @@ export const getNavBehavior = jest.fn();
|
|
|
74
93
|
// Constantes et validateurs purs : on garde les vraies implémentations (aucune raison de les simuler).
|
|
75
94
|
export {
|
|
76
95
|
TOPBAR_NAV_SLOT,
|
|
77
|
-
|
|
78
|
-
TOPBAR_LEVEL2_NAV_SLOT,
|
|
96
|
+
TOPBAR_SLOT,
|
|
79
97
|
NAV_ALL_WORKSPACES,
|
|
80
98
|
isNavEntryMeta,
|
|
81
99
|
isNavEntryInWorkspace,
|
|
@@ -159,10 +177,8 @@ export const EgenDateRangePicker = jest.fn(({ id, labelText, value = [], onChang
|
|
|
159
177
|
/* esm-utils */
|
|
160
178
|
export {
|
|
161
179
|
getDefaultsFromConfigSchema,
|
|
162
|
-
selectPreferredName,
|
|
163
180
|
} from '@egen-civitas/esm-utils';
|
|
164
181
|
|
|
165
|
-
export const age = jest.fn((arg) => utils.age(arg));
|
|
166
182
|
|
|
167
183
|
export function isVersionSatisfied() {
|
|
168
184
|
return true;
|
package/mock.tsx
CHANGED
|
@@ -4,6 +4,7 @@ import { NEVER } from 'rxjs';
|
|
|
4
4
|
import { vi } from 'vitest';
|
|
5
5
|
import type {} from '@egen-civitas/esm-globals';
|
|
6
6
|
import * as utils from '@egen-civitas/esm-utils/mock';
|
|
7
|
+
import { createMockHost, createMockPlatform } from '@egen-civitas/esm-platform/testing';
|
|
7
8
|
|
|
8
9
|
window.i18next = { ...window.i18next, language: 'en' };
|
|
9
10
|
|
|
@@ -63,6 +64,24 @@ export const goBackInHistory = vi.fn();
|
|
|
63
64
|
export const useConnectivity = vi.fn().mockReturnValue(true);
|
|
64
65
|
export const subscribeConnectivity = vi.fn();
|
|
65
66
|
|
|
67
|
+
/* esm-platform : un Platform de test sans Host. Les erreurs et la détection restent les vraies implémentations ;
|
|
68
|
+
* `getPlatform` retourne un Platform dont aucune capacité n'est fournie (comme en production sans adaptateur).
|
|
69
|
+
* Pour simuler une capacité : `getPlatform.mockReturnValue(createMockPlatform({ capabilities: { … } }))`. */
|
|
70
|
+
export {
|
|
71
|
+
PlatformError,
|
|
72
|
+
isPlatformError,
|
|
73
|
+
unavailable,
|
|
74
|
+
getPlatformEnvironment,
|
|
75
|
+
isNativePlatform,
|
|
76
|
+
hasHostBridge,
|
|
77
|
+
getHostBridge,
|
|
78
|
+
createBridgeClient,
|
|
79
|
+
} from '@egen-civitas/esm-platform';
|
|
80
|
+
export { createMockPlatform, createMockHost };
|
|
81
|
+
/* Handshake avec le Host : jamais effectué dans un test unitaire ; `createMockHost()` simule `window.egenHostBridge`. */
|
|
82
|
+
export const getHostInfo = vi.fn(() => null);
|
|
83
|
+
export const getPlatform = vi.fn(() => createMockPlatform());
|
|
84
|
+
|
|
66
85
|
/* esm-styleguide */
|
|
67
86
|
export const showNotification = vi.fn();
|
|
68
87
|
export const showActionableNotification = vi.fn();
|
|
@@ -75,8 +94,7 @@ export const getNavBehavior = vi.fn();
|
|
|
75
94
|
// Constantes et validateurs purs : on garde les vraies implémentations (aucune raison de les simuler).
|
|
76
95
|
export {
|
|
77
96
|
TOPBAR_NAV_SLOT,
|
|
78
|
-
|
|
79
|
-
TOPBAR_LEVEL2_NAV_SLOT,
|
|
97
|
+
TOPBAR_SLOT,
|
|
80
98
|
NAV_ALL_WORKSPACES,
|
|
81
99
|
isNavEntryMeta,
|
|
82
100
|
isNavEntryInWorkspace,
|
|
@@ -160,10 +178,8 @@ export const EgenDateRangePicker = vi.fn(({ id, labelText, value = [], onChange,
|
|
|
160
178
|
/* esm-utils */
|
|
161
179
|
export {
|
|
162
180
|
getDefaultsFromConfigSchema,
|
|
163
|
-
selectPreferredName,
|
|
164
181
|
} from '@egen-civitas/esm-utils';
|
|
165
182
|
|
|
166
|
-
export const age = vi.fn((arg) => utils.age(arg));
|
|
167
183
|
|
|
168
184
|
export function isVersionSatisfied() {
|
|
169
185
|
return true;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@egen-civitas/esm-framework",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.1.0",
|
|
4
4
|
"license": "MPL-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -66,25 +66,26 @@
|
|
|
66
66
|
"access": "public"
|
|
67
67
|
},
|
|
68
68
|
"dependencies": {
|
|
69
|
-
"@egen-civitas/esm-ai-framework": "^1.3.
|
|
70
|
-
"@egen-civitas/esm-api": "^
|
|
69
|
+
"@egen-civitas/esm-ai-framework": "^1.3.4",
|
|
70
|
+
"@egen-civitas/esm-api": "^3.0.0",
|
|
71
71
|
"@egen-civitas/esm-config": "^2.0.0",
|
|
72
72
|
"@egen-civitas/esm-context": "^1.0.2",
|
|
73
|
-
"@egen-civitas/esm-data-api": "^
|
|
74
|
-
"@egen-civitas/esm-dynamic-loading": "^2.0
|
|
73
|
+
"@egen-civitas/esm-data-api": "^3.0.0",
|
|
74
|
+
"@egen-civitas/esm-dynamic-loading": "^2.1.0",
|
|
75
75
|
"@egen-civitas/esm-error-handling": "^1.0.2",
|
|
76
76
|
"@egen-civitas/esm-expression-evaluator": "^1.0.0",
|
|
77
|
-
"@egen-civitas/esm-extensions": "^2.
|
|
77
|
+
"@egen-civitas/esm-extensions": "^2.5.0",
|
|
78
78
|
"@egen-civitas/esm-feature-flags": "^1.0.2",
|
|
79
|
-
"@egen-civitas/esm-globals": "^2.
|
|
79
|
+
"@egen-civitas/esm-globals": "^2.2.0",
|
|
80
80
|
"@egen-civitas/esm-navigation": "^1.0.0",
|
|
81
|
-
"@egen-civitas/esm-offline": "^1.0.
|
|
82
|
-
"@egen-civitas/esm-
|
|
83
|
-
"@egen-civitas/esm-
|
|
81
|
+
"@egen-civitas/esm-offline": "^1.0.4",
|
|
82
|
+
"@egen-civitas/esm-platform": "^1.2.0",
|
|
83
|
+
"@egen-civitas/esm-react-utils": "^3.0.1",
|
|
84
|
+
"@egen-civitas/esm-routes": "^1.2.0",
|
|
84
85
|
"@egen-civitas/esm-state": "^1.0.3",
|
|
85
|
-
"@egen-civitas/esm-styleguide": "^
|
|
86
|
+
"@egen-civitas/esm-styleguide": "^4.1.0",
|
|
86
87
|
"@egen-civitas/esm-tenant": "^1.0.0",
|
|
87
|
-
"@egen-civitas/esm-translations": "^1.0.
|
|
88
|
+
"@egen-civitas/esm-translations": "^1.0.4",
|
|
88
89
|
"@egen-civitas/esm-utils": "^2.0.0"
|
|
89
90
|
},
|
|
90
91
|
"peerDependencies": {
|