@egen-civitas/esm-extensions 1.4.0 → 2.0.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 +24 -0
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -1
- package/dist/public.d.ts +0 -1
- package/dist/public.d.ts.map +1 -1
- package/dist/public.js +0 -1
- package/dist/tool-window.d.ts +8 -1
- package/dist/tool-window.d.ts.map +1 -1
- package/dist/tool-window.js +3 -1
- package/package.json +5 -5
- package/dist/left-nav.d.ts +0 -38
- package/dist/left-nav.d.ts.map +0 -1
- package/dist/left-nav.js +0 -28
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
# @egen-civitas/esm-extensions
|
|
2
2
|
|
|
3
|
+
## 2.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- b8a56e7: Suppression complète de l'ancienne barre latérale (sidebar) : plus aucune app ne peut la monter. La navigation passe par les rails et zones du shell (`shell-rail-left-slot`, `shell-rail-bottom-slot`, `shell-rail-right-slot`) et la TopBar niveau 2 (`topbar-level2-nav`).
|
|
8
|
+
|
|
9
|
+
Retirés : `LeftNavMenu`, `setLeftNav`, `unsetLeftNav`, `SetLeftNavParams`, `LeftNavStore`, `useLeftNav`, `useLeftNavStore`, `DashboardExtension`, `createDashboard` (lien de sidebar), la variable `--egen-sidenav-width`, les styles `.cds--side-nav*` / `.active-left-nav-link`, la clé de traduction `leftNavigation` et les alias `side-nav` / `sidenav` de `esm-ai-tools`.
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies [b8a56e7]
|
|
14
|
+
- @egen-civitas/esm-translations@1.0.2
|
|
15
|
+
|
|
16
|
+
## 1.5.0
|
|
17
|
+
|
|
18
|
+
### Minor Changes
|
|
19
|
+
|
|
20
|
+
- 0978f93: Rails : le rail droit porte aussi un groupe bas ; `ToolWindowMeta.rail` ('left' par défaut | 'right') choisit le rail d'une option de la zone basse (pleine largeur entre les rails).
|
|
21
|
+
|
|
22
|
+
### Patch Changes
|
|
23
|
+
|
|
24
|
+
- Updated dependencies [ac88343]
|
|
25
|
+
- @egen-civitas/esm-globals@1.0.3
|
|
26
|
+
|
|
3
27
|
## 1.4.0
|
|
4
28
|
|
|
5
29
|
### 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,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC"}
|
package/dist/index.js
CHANGED
package/dist/public.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
export { getExtensionNameFromId, registerExtension, attach, detach, detachAll, getAssignedExtensions, registerExtensionSlot, } from './extensions.js';
|
|
2
|
-
export { type LeftNavStore, setLeftNav, unsetLeftNav, type SetLeftNavParams } from './left-nav.js';
|
|
3
2
|
export { type CancelLoading, renderExtension } from './render.js';
|
|
4
3
|
export { type ExtensionMeta, type ExtensionRegistration, type ExtensionStore, type AssignedExtension, type ConnectedExtension, type ExtensionSlotState, getExtensionStore, } from './store.js';
|
|
5
4
|
export { type WorkspaceRegistration } from './workspaces.js';
|
package/dist/public.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"public.d.ts","sourceRoot":"","sources":["../src/public.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,sBAAsB,EACtB,iBAAiB,EACjB,MAAM,EACN,MAAM,EACN,SAAS,EACT,qBAAqB,EACrB,qBAAqB,GACtB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"public.d.ts","sourceRoot":"","sources":["../src/public.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,sBAAsB,EACtB,iBAAiB,EACjB,MAAM,EACN,MAAM,EACN,SAAS,EACT,qBAAqB,EACrB,qBAAqB,GACtB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,KAAK,aAAa,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAClE,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,qBAAqB,EAC1B,KAAK,cAAc,EACnB,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,iBAAiB,GAClB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,KAAK,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAC7D,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,eAAe,EAAE,MAAM,YAAY,CAAC;AACtE,OAAO,EACL,sBAAsB,EACtB,kBAAkB,EAClB,KAAK,YAAY,EACjB,cAAc,EACd,qBAAqB,GACtB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,oBAAoB,EACpB,sBAAsB,EACtB,qBAAqB,EACrB,iBAAiB,EACjB,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,gBAAgB,GACjB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,KAAK,WAAW,EAChB,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,mBAAmB,EACnB,cAAc,GACf,MAAM,mBAAmB,CAAC"}
|
package/dist/public.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
export { getExtensionNameFromId, registerExtension, attach, detach, detachAll, getAssignedExtensions, registerExtensionSlot } from "./extensions.js";
|
|
2
|
-
export { setLeftNav, unsetLeftNav } from "./left-nav.js";
|
|
3
2
|
export { renderExtension } from "./render.js";
|
|
4
3
|
export { getExtensionStore } from "./store.js";
|
|
5
4
|
export { TOPBAR_LEVEL2_NAV_SLOT, NAV_ALL_WORKSPACES, isNavEntryMeta, isNavEntryInWorkspace } from "./nav-entry.js";
|
package/dist/tool-window.d.ts
CHANGED
|
@@ -9,7 +9,8 @@
|
|
|
9
9
|
*
|
|
10
10
|
* rail gauche, groupe haut → slot `shell-rail-left-slot` → zone gauche (sidebar de l'app)
|
|
11
11
|
* rail gauche, groupe bas → slot `shell-rail-bottom-slot` → zone basse (ex. terminal)
|
|
12
|
-
* rail droit
|
|
12
|
+
* rail droit, groupe haut → slot `shell-rail-right-slot` → zone droite (options globales)
|
|
13
|
+
* rail droit, groupe bas → slot `shell-rail-bottom-slot` + `meta.rail: 'right'` → zone basse
|
|
13
14
|
*
|
|
14
15
|
* Déclaration dans le `routes.json` d'une app :
|
|
15
16
|
* `{ "slot": "shell-rail-left-slot", "component": "projectPanel", "meta": ToolWindowMeta }`.
|
|
@@ -42,6 +43,12 @@ export interface ToolWindowMeta {
|
|
|
42
43
|
* le rail droit, déjà global.
|
|
43
44
|
*/
|
|
44
45
|
global?: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Zone basse uniquement : rail qui porte le bouton. `left` (défaut) : groupe bas du rail gauche ;
|
|
48
|
+
* `right` : groupe bas du rail droit. Dans les deux cas le contenu s'ouvre dans la zone basse,
|
|
49
|
+
* qui occupe toute la largeur entre les rails.
|
|
50
|
+
*/
|
|
51
|
+
rail?: 'left' | 'right';
|
|
45
52
|
}
|
|
46
53
|
/** Valide une `meta` d'extension : vrai si c'est une `ToolWindowMeta` exploitable. */
|
|
47
54
|
export declare function isToolWindowMeta(meta: unknown): meta is ToolWindowMeta;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-window.d.ts","sourceRoot":"","sources":["../src/tool-window.ts"],"names":[],"mappings":"AAAA,kCAAkC;AAElC
|
|
1
|
+
{"version":3,"file":"tool-window.d.ts","sourceRoot":"","sources":["../src/tool-window.ts"],"names":[],"mappings":"AAAA,kCAAkC;AAElC;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,oBAAoB,yBAAyB,CAAC;AAC3D,eAAO,MAAM,sBAAsB,2BAA2B,CAAC;AAC/D,eAAO,MAAM,qBAAqB,0BAA0B,CAAC;AAE7D,4EAA4E;AAC5E,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;AAE3D,0CAA0C;AAC1C,eAAO,MAAM,iBAAiB,EAAE,QAAQ,CAAC,MAAM,CAAC,gBAAgB,EAAE,MAAM,CAAC,CAIxE,CAAC;AAEF,2EAA2E;AAC3E,MAAM,WAAW,cAAc;IAC7B,qEAAqE;IACrE,KAAK,EAAE,MAAM,CAAC;IACd,gDAAgD;IAChD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,oFAAoF;IACpF,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,2EAA2E;IAC3E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;CACzB;AAED,sFAAsF;AACtF,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,IAAI,cAAc,CAUtE"}
|
package/dist/tool-window.js
CHANGED
|
@@ -8,7 +8,8 @@
|
|
|
8
8
|
*
|
|
9
9
|
* rail gauche, groupe haut → slot `shell-rail-left-slot` → zone gauche (sidebar de l'app)
|
|
10
10
|
* rail gauche, groupe bas → slot `shell-rail-bottom-slot` → zone basse (ex. terminal)
|
|
11
|
-
* rail droit
|
|
11
|
+
* rail droit, groupe haut → slot `shell-rail-right-slot` → zone droite (options globales)
|
|
12
|
+
* rail droit, groupe bas → slot `shell-rail-bottom-slot` + `meta.rail: 'right'` → zone basse
|
|
12
13
|
*
|
|
13
14
|
* Déclaration dans le `routes.json` d'une app :
|
|
14
15
|
* `{ "slot": "shell-rail-left-slot", "component": "projectPanel", "meta": ToolWindowMeta }`.
|
|
@@ -33,5 +34,6 @@ export const SHELL_RAIL_RIGHT_SLOT = 'shell-rail-right-slot';
|
|
|
33
34
|
if (m.icon !== undefined && typeof m.icon !== 'string') return false;
|
|
34
35
|
if (m.order !== undefined && (typeof m.order !== 'number' || !Number.isFinite(m.order))) return false;
|
|
35
36
|
if (m.global !== undefined && typeof m.global !== 'boolean') return false;
|
|
37
|
+
if (m.rail !== undefined && m.rail !== 'left' && m.rail !== 'right') return false;
|
|
36
38
|
return true;
|
|
37
39
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@egen-civitas/esm-extensions",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"license": "MPL-2.0",
|
|
5
5
|
"description": "Coordinates extensions and extension points in the Egen Frontend",
|
|
6
6
|
"type": "module",
|
|
@@ -67,9 +67,9 @@
|
|
|
67
67
|
"@egen-civitas/esm-config": "^1.0.0",
|
|
68
68
|
"@egen-civitas/esm-expression-evaluator": "^1.0.0",
|
|
69
69
|
"@egen-civitas/esm-feature-flags": "^1.0.0",
|
|
70
|
-
"@egen-civitas/esm-globals": "^1.0.
|
|
70
|
+
"@egen-civitas/esm-globals": "^1.0.3",
|
|
71
71
|
"@egen-civitas/esm-state": "^1.0.0",
|
|
72
|
-
"@egen-civitas/esm-translations": "^1.0.
|
|
72
|
+
"@egen-civitas/esm-translations": "^1.0.2",
|
|
73
73
|
"@egen-civitas/esm-utils": "^1.0.0",
|
|
74
74
|
"react": "18.x",
|
|
75
75
|
"single-spa": "6.x"
|
|
@@ -79,9 +79,9 @@
|
|
|
79
79
|
"@egen-civitas/esm-config": "^1.0.0",
|
|
80
80
|
"@egen-civitas/esm-expression-evaluator": "^1.0.0",
|
|
81
81
|
"@egen-civitas/esm-feature-flags": "^1.0.0",
|
|
82
|
-
"@egen-civitas/esm-globals": "^1.0.
|
|
82
|
+
"@egen-civitas/esm-globals": "^1.0.3",
|
|
83
83
|
"@egen-civitas/esm-state": "^1.0.0",
|
|
84
|
-
"@egen-civitas/esm-translations": "^1.0.
|
|
84
|
+
"@egen-civitas/esm-translations": "^1.0.2",
|
|
85
85
|
"@egen-civitas/esm-utils": "^1.0.0",
|
|
86
86
|
"@swc/cli": "0.8.1",
|
|
87
87
|
"@swc/core": "1.15.21",
|
package/dist/left-nav.d.ts
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { type ComponentConfig } from './types.js';
|
|
2
|
-
import { type ExtensionSlotState } from './store.js';
|
|
3
|
-
type LeftNavMode = 'normal' | 'collapsed' | 'hidden';
|
|
4
|
-
export interface LeftNavStore {
|
|
5
|
-
slotName: string | null;
|
|
6
|
-
basePath: string;
|
|
7
|
-
mode: LeftNavMode;
|
|
8
|
-
componentContext?: ComponentConfig;
|
|
9
|
-
state?: ExtensionSlotState;
|
|
10
|
-
}
|
|
11
|
-
/** @internal */
|
|
12
|
-
export declare const leftNavStore: import("zustand").StoreApi<LeftNavStore>;
|
|
13
|
-
export interface SetLeftNavParams {
|
|
14
|
-
name: string;
|
|
15
|
-
basePath: string;
|
|
16
|
-
/**
|
|
17
|
-
* In normal mode, the left nav is shown in desktop mode, and collapse into hamburger menu button in tablet mode
|
|
18
|
-
* In collapsed mode, the left nav is always collapsed, regardless of desktop / tablet mode.
|
|
19
|
-
* In hidden mode, the left nav is not shown at all.
|
|
20
|
-
*/
|
|
21
|
-
mode?: LeftNavMode;
|
|
22
|
-
componentContext?: ComponentConfig;
|
|
23
|
-
state?: ExtensionSlotState;
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* Sets the current left nav context. Must be paired with {@link unsetLeftNav}.
|
|
27
|
-
*
|
|
28
|
-
* @deprecated Il n'existe plus de barre latérale globale : la navigation de niveau 2 est portée par la TopBar (slot `topbar-level2-nav`, type `NavEntryMeta`). Une app qui a besoin d'une navigation interne affiche sa propre barre latérale.
|
|
29
|
-
*/
|
|
30
|
-
export declare function setLeftNav({ name, basePath, mode, componentContext, state }: SetLeftNavParams): void;
|
|
31
|
-
/**
|
|
32
|
-
* Unsets the left nav context if the current context is for the supplied name.
|
|
33
|
-
*
|
|
34
|
-
* @deprecated Il n'existe plus de barre latérale globale : la navigation de niveau 2 est portée par la TopBar (slot `topbar-level2-nav`, type `NavEntryMeta`). Une app qui a besoin d'une navigation interne affiche sa propre barre latérale.
|
|
35
|
-
*/
|
|
36
|
-
export declare function unsetLeftNav(name: string): void;
|
|
37
|
-
export {};
|
|
38
|
-
//# sourceMappingURL=left-nav.d.ts.map
|
package/dist/left-nav.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"left-nav.d.ts","sourceRoot":"","sources":["../src/left-nav.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,YAAY,CAAC;AAClD,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAErD,KAAK,WAAW,GAAG,QAAQ,GAAG,WAAW,GAAG,QAAQ,CAAC;AACrD,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,WAAW,CAAC;IAClB,gBAAgB,CAAC,EAAE,eAAe,CAAC;IACnC,KAAK,CAAC,EAAE,kBAAkB,CAAC;CAC5B;AAED,gBAAgB;AAChB,eAAO,MAAM,YAAY,0CAIvB,CAAC;AAEH,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB;;;;OAIG;IACH,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,gBAAgB,CAAC,EAAE,eAAe,CAAC;IACnC,KAAK,CAAC,EAAE,kBAAkB,CAAC;CAC5B;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,gBAAgB,EAAE,KAAK,EAAE,EAAE,gBAAgB,QAE7F;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,QAIxC"}
|
package/dist/left-nav.js
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { createGlobalStore } from "@egen-civitas/esm-state";
|
|
2
|
-
/** @internal */ export const leftNavStore = createGlobalStore('left-nav', {
|
|
3
|
-
slotName: null,
|
|
4
|
-
basePath: window.spaBase,
|
|
5
|
-
mode: 'normal'
|
|
6
|
-
});
|
|
7
|
-
/**
|
|
8
|
-
* Sets the current left nav context. Must be paired with {@link unsetLeftNav}.
|
|
9
|
-
*
|
|
10
|
-
* @deprecated Il n'existe plus de barre latérale globale : la navigation de niveau 2 est portée par la TopBar (slot `topbar-level2-nav`, type `NavEntryMeta`). Une app qui a besoin d'une navigation interne affiche sa propre barre latérale.
|
|
11
|
-
*/ export function setLeftNav({ name, basePath, mode, componentContext, state }) {
|
|
12
|
-
leftNavStore.setState({
|
|
13
|
-
slotName: name,
|
|
14
|
-
basePath,
|
|
15
|
-
mode: mode ?? 'normal',
|
|
16
|
-
componentContext,
|
|
17
|
-
state
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Unsets the left nav context if the current context is for the supplied name.
|
|
22
|
-
*
|
|
23
|
-
* @deprecated Il n'existe plus de barre latérale globale : la navigation de niveau 2 est portée par la TopBar (slot `topbar-level2-nav`, type `NavEntryMeta`). Une app qui a besoin d'une navigation interne affiche sa propre barre latérale.
|
|
24
|
-
*/ export function unsetLeftNav(name) {
|
|
25
|
-
if (leftNavStore.getState().slotName === name) {
|
|
26
|
-
leftNavStore.setState(leftNavStore.getInitialState(), true);
|
|
27
|
-
}
|
|
28
|
-
}
|