@tekkare/romulus 0.1.368 → 0.1.370

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/module.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "compatibility": {
5
5
  "nuxt": ">=3.16.0"
6
6
  },
7
- "version": "0.1.367",
7
+ "version": "0.1.369",
8
8
  "builder": {
9
9
  "@nuxt/module-builder": "0.8.4",
10
10
  "unbuild": "2.0.0"
@@ -75,8 +75,24 @@ const props = withDefaults(
75
75
  * que l'ecran montre (ex. la selection de produits de la vue).
76
76
  */
77
77
  partLinks?: Record<string, string>;
78
- /** Maillon sous la partie (ex. la profession ouverte d'un annuaire). */
79
- subPart?: { label: string; to: string } | null;
78
+ /**
79
+ * Menu du maillon de partie, a la place des autres parties du hub (liens
80
+ * deja localises). Pour une partie qui forme un univers a part : ses
81
+ * propres voisins, ou `[]` pour un maillon simple.
82
+ */
83
+ partMenu?: { label: string; to: string; icon?: string; group?: string; active?: boolean }[] | null;
84
+ /**
85
+ * Maillon sous la partie (ex. la profession ouverte d'un annuaire). Avec
86
+ * `menu`, il ouvre ses voisins (liens deja localises, `group` pour les
87
+ * ranger, `active` pour l'entree ouverte).
88
+ */
89
+ subPart?: { label: string; to: string; menu?: { label: string; to: string; icon?: string; group?: string; active?: boolean }[] } | null;
90
+ /**
91
+ * false : le fil s'arrete a la partie (ou au sous-maillon), sans la page
92
+ * ouverte ni la page d'origine. Pour une partie ou l'on ne choisit que le
93
+ * sous-maillon (un theme), la barre gauche portant les pages.
94
+ */
95
+ pageCrumbs?: boolean;
80
96
  /** Sections de la barre gauche depliees par defaut. */
81
97
  navDefaultOpen?: boolean;
82
98
  /** Remplace app.config.oip.home quand le maillon pays est dynamique. */
@@ -107,7 +123,7 @@ const props = withDefaults(
107
123
  */
108
124
  panelProps?: Partial<Record<OipRailTileKey, Record<string, unknown>>>;
109
125
  }>(),
110
- { flag: "fr", appKey: "", part: null, partLinks: () => ({}), subPart: null, navDefaultOpen: false, home: undefined, tiles: () => ({}), superAdmin: false, userName: "", hideTabs: false, panelProps: () => ({}) },
126
+ { flag: "fr", appKey: "", part: null, partLinks: () => ({}), partMenu: null, subPart: null, pageCrumbs: true, navDefaultOpen: false, home: undefined, tiles: () => ({}), superAdmin: false, userName: "", hideTabs: false, panelProps: () => ({}) },
111
127
  );
112
128
 
113
129
  /** Tuile ouverte, ou null quand la toolbar est fermee. */
@@ -297,16 +313,18 @@ const crumbs = computed(() => {
297
313
  config.platform,
298
314
  ...(home ? [home] : []),
299
315
  ...(currentPart.value
300
- ? [{ label: partLabel(currentPart.value), to: appTo.value, menu: partMenu.value }]
316
+ ? [{ label: partLabel(currentPart.value), to: appTo.value, menu: props.partMenu ?? partMenu.value }]
301
317
  : props.part
302
318
  ? [{ label: props.part.label, to: props.part.to }]
303
319
  : []),
304
- ...(props.subPart ? [{ label: props.subPart.label, to: props.subPart.to }] : []),
320
+ ...(props.subPart
321
+ ? [{ label: props.subPart.label, to: props.subPart.to, ...(props.subPart.menu?.length ? { menu: props.subPart.menu } : {}) }]
322
+ : []),
305
323
  // Sur une fiche, la page d'origine reste dans le fil avant elle.
306
- ...(activeItem.value || !originPage.value || !props.sections.length
324
+ ...(!props.pageCrumbs || activeItem.value || !originPage.value || !props.sections.length
307
325
  ? []
308
326
  : [{ label: originPage.value.label, to: originPage.value.to, menu: pageMenu.value }]),
309
- ...(props.sections.length && activeLabel.value
327
+ ...(props.pageCrumbs && props.sections.length && activeLabel.value
310
328
  ? [{ label: activeLabel.value, ...(activeItem.value ? { menu: pageMenu.value } : {}) }]
311
329
  : []),
312
330
  ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tekkare/romulus",
3
- "version": "0.1.368",
3
+ "version": "0.1.370",
4
4
  "description": "Romulus Design System - Nuxt module by Tekkare",
5
5
  "license": "MIT",
6
6
  "type": "module",