@tekkare/romulus 0.1.291 → 0.1.293

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.290",
7
+ "version": "0.1.292",
8
8
  "builder": {
9
9
  "@nuxt/module-builder": "0.8.4",
10
10
  "unbuild": "2.0.0"
@@ -1,9 +1,16 @@
1
1
  <!--
2
2
  Fiche du remboursement PBS d'un code item (Australia One, type
3
- AuDrugReimbursement), par son `_id` (AU_ITEM_<code>) dans l'index produit :
4
- identite, chiffres des 12 derniers mois publies, courbe mensuelle et
5
- tableau par annee. Les mois se lisent dans `item_level` (un objet par mois
6
- et categorie de patients), additionnes ici.
3
+ AuDrugReimbursement), par son `_id` (AU_ITEM_<code>) dans l'index produit.
4
+
5
+ Reprend la lecture de la page Drug reimbursement d'Australia One
6
+ (/drugs/retail) : indicateur, periode glissante et categories de patients
7
+ au-dessus ; courbe mensuelle, synthese des fenetres glissantes (dernier mois,
8
+ 3 et 12 derniers mois, depuis janvier) comparees aux memes mois un an plus
9
+ tot, puis le detail mois par mois par categorie de patients. Les mois se
10
+ lisent dans `item_level` (un objet par mois, categorie et section).
11
+
12
+ Montants en dollars australiens : la conversion de la page depend des taux
13
+ de l'app, que le tiroir ne charge pas.
7
14
 
8
15
  Montee par le tiroir des projets ; le lien vers l'app passe par le slot
9
16
  `title-link`.
@@ -25,45 +32,98 @@
25
32
  <RmTag variant="gray">PBS {{ doc.local_drug_id || code }}</RmTag>
26
33
  <RmTag v-if="doc.code_label" variant="blue">{{ doc.code_label }}</RmTag>
27
34
  <RmTag v-for="brand in doc.brands ?? []" :key="brand" variant="indigo">{{ brand }}</RmTag>
35
+ <RmTag v-for="section in sections" :key="section" :variant="SECTION_COLORS[section] ?? 'gray'">{{ section }}</RmTag>
28
36
  </div>
29
37
 
30
- <RmCard padding="md">
31
- <h3 class="oip-au__card-title">
32
- {{ en ? "Last 12 months" : "12 derniers mois" }}
33
- <span v-if="lastPeriod" class="oip-au__figure-note">({{ en ? "to" : "jusqu'à" }} {{ month(lastPeriod) }})</span>
34
- </h3>
35
- <div class="oip-au__figures">
36
- <div v-for="figure in lastYear" :key="figure.label" class="oip-au__figure">
37
- <span class="oip-au__figure-label">{{ figure.label }}</span>
38
- <span class="oip-au__figure-value">{{ figure.value }}</span>
39
- </div>
40
- </div>
41
- </RmCard>
38
+ <!-- Les reglages de la page retail, sur le seul code item. -->
39
+ <div class="oip-au__controls">
40
+ <RmFilterDropdown
41
+ v-model="metricModel"
42
+ :multiple="false"
43
+ :label="en ? 'Metric' : 'Indicateur'"
44
+ :options="metricChoices"
45
+ :lang="lang"
46
+ />
47
+ <RmFilterDropdown
48
+ v-model="periodModel"
49
+ :multiple="false"
50
+ :label="en ? 'Period' : 'Période'"
51
+ :options="periodChoices"
52
+ :lang="lang"
53
+ />
54
+ <RmMultipleSelect
55
+ v-if="categories.length > 1"
56
+ v-model="selectedCategories"
57
+ :label="en ? 'Patient category' : 'Catégorie de patients'"
58
+ :options="categories"
59
+ :search="false"
60
+ show-all
61
+ :empty-label="en ? 'All' : 'Toutes'"
62
+ :lang="lang"
63
+ />
64
+ </div>
42
65
 
43
- <RmCard v-if="months.length" padding="md">
44
- <div class="oip-au__chart-head">
45
- <h3 class="oip-au__card-title">{{ en ? "Monthly evolution" : "Évolution mensuelle" }}</h3>
46
- <RmSegmented v-model="metric" size="sm" :options="metricOptions" :aria-label="en ? 'Measure' : 'Mesure'" />
47
- </div>
66
+ <RmCard v-if="shownPeriods.length" padding="md">
67
+ <h3 class="oip-au__card-title">{{ chartTitle }}</h3>
48
68
  <RmLineChart
49
- :categories="months.map((m) => month(m.period))"
50
- :series="[{ name: metricLabel, data: months.map((m) => Math.round(m[metric] * 100) / 100) }]"
51
- :height="260"
52
- :value-formatter="metric === 'prescriptions' ? number : money"
69
+ :categories="shownPeriods.map(monthLabel)"
70
+ :series="[{ name: metricLabel, data: shownPeriods.map((p) => round(total[p] ?? 0)) }]"
71
+ :height="280"
72
+ :value-formatter="formatValue"
53
73
  :description="metricLabel"
54
74
  />
55
75
  </RmCard>
56
76
 
57
- <RmCard v-if="years.length" padding="md">
58
- <h3 class="oip-au__card-title">{{ en ? "By year" : "Par année" }}</h3>
77
+ <RmCard v-if="windows.length" padding="md">
78
+ <h3 class="oip-au__card-title">{{ en ? "Rolling periods" : "Périodes glissantes" }}</h3>
79
+ <p class="oip-au__note oip-au__note--spaced">
80
+ {{
81
+ en
82
+ ? `Latest month available: ${monthLabel(latest)}. Each period is compared with the same calendar months one year earlier.`
83
+ : `Dernier mois disponible : ${monthLabel(latest)}. Chaque période est comparée aux mêmes mois civils un an plus tôt.`
84
+ }}
85
+ </p>
59
86
  <RmTable
60
- :columns="yearColumns"
61
- :rows="years"
87
+ :columns="windowColumns"
88
+ :rows="windowRows"
89
+ emphasis-key="isTotal"
62
90
  compact
63
91
  flat
92
+ :striped="false"
64
93
  max-height="none"
65
94
  :empty-text="en ? 'No data' : 'Aucune donnée'"
66
- />
95
+ >
96
+ <template #label="{ row }">
97
+ <RmTag v-if="!row.isTotal" :variant="SECTION_COLORS[row.label] ?? 'gray'">{{ row.label }}</RmTag>
98
+ <span v-else>{{ row.label }}</span>
99
+ </template>
100
+ <template v-for="(w, wi) in windows" :key="w.key" #[`w${wi}`]="{ value }">
101
+ <span class="oip-au__nowrap">{{ formatValue(value.value) }}</span>
102
+ <span
103
+ v-if="value.evolution !== null"
104
+ class="oip-au__evo"
105
+ :class="value.evolution >= 0 ? 'oip-au__evo--up' : 'oip-au__evo--down'"
106
+ >({{ signedPercent(value.evolution) }})</span>
107
+ </template>
108
+ </RmTable>
109
+ </RmCard>
110
+
111
+ <RmCard v-if="shownPeriods.length" padding="md">
112
+ <h3 class="oip-au__card-title">{{ en ? "Monthly detail" : "Détail mensuel" }}</h3>
113
+ <RmTable
114
+ :columns="detailColumns"
115
+ :rows="detailRows"
116
+ emphasis-key="isTotal"
117
+ compact
118
+ flat
119
+ :striped="false"
120
+ max-height="none"
121
+ :empty-text="en ? 'No data' : 'Aucune donnée'"
122
+ >
123
+ <template v-for="period in detailPeriods" :key="period" #[period]="{ value }">
124
+ <span class="oip-au__nowrap">{{ value === null || value === undefined ? "-" : formatValue(value) }}</span>
125
+ </template>
126
+ </RmTable>
67
127
  </RmCard>
68
128
  </template>
69
129
  </div>
@@ -85,80 +145,179 @@ const props = withDefaults(
85
145
  { type: "AuDrugReimbursement", lang: "fr", highlight: () => [] },
86
146
  );
87
147
 
88
- type Metric = "prescriptions" | "total_cost" | "government_contribution" | "patient_contribution";
89
- const METRICS: Metric[] = ["prescriptions", "total_cost", "government_contribution", "patient_contribution"];
148
+ /** Les indicateurs de la page retail, dans son ordre. */
149
+ const METRICS = [
150
+ { key: "prescriptions", en: "Prescriptions", fr: "Prescriptions", money: false },
151
+ { key: "total_cost", en: "Total Cost", fr: "Coût total", money: true },
152
+ { key: "government_contribution", en: "Government Contribution", fr: "Part de l'État", money: true },
153
+ { key: "patient_contribution", en: "Patient Contribution", fr: "Part du patient", money: true },
154
+ { key: "retail_markup", en: "Retail Markup", fr: "Marge officinale", money: true },
155
+ ] as const;
156
+ type MetricKey = (typeof METRICS)[number]["key"];
157
+
158
+ /** Fenetres de la courbe et du detail (13 mois par defaut, comme la page). */
159
+ const PERIODS = [6, 13, 24, 36, null] as const;
160
+ const DEFAULT_PERIOD = 1;
161
+
162
+ const SECTION_COLORS: Record<string, "blue" | "violet" | "teal" | "gray"> = {
163
+ "Section 85": "blue",
164
+ "Section 100": "violet",
165
+ RPBS: "teal",
166
+ Unknown: "gray",
167
+ };
90
168
 
91
169
  const en = computed(() => props.lang === "en");
170
+ const lang = computed(() => props.lang);
92
171
  const loading = ref(true);
93
172
  const doc = ref<Record<string, any> | null>(null);
94
173
  const code = computed(() => props.id.replace(/^AU_ITEM_/, ""));
95
- const metric = ref<Metric>("prescriptions");
96
174
 
97
- const LABELS: Record<Metric, { fr: string; en: string }> = {
98
- prescriptions: { fr: "Prescriptions", en: "Prescriptions" },
99
- total_cost: { fr: "Coût total", en: "Total cost" },
100
- government_contribution: { fr: "Part de l'État", en: "Government contribution" },
101
- patient_contribution: { fr: "Part du patient", en: "Patient contribution" },
102
- };
103
- const label = (key: Metric) => (en.value ? LABELS[key].en : LABELS[key].fr);
104
- const metricLabel = computed(() => label(metric.value));
105
- const metricOptions = computed(() => METRICS.map((key) => ({ value: key, label: label(key) })));
175
+ const metricIndex = ref(0);
176
+ const periodIndex = ref<number>(DEFAULT_PERIOD);
177
+ const selectedCategories = ref<string[]>([]);
106
178
 
107
- const locale = computed(() => (en.value ? "en-GB" : "fr-FR"));
108
- const number = (value: number) => Math.round(value).toLocaleString(locale.value);
109
- const money = (value: number) => `${Math.round(value).toLocaleString(locale.value)} A$`;
110
- const month = (period: string) => {
111
- const parsed = new Date(`${period}-01`);
112
- return Number.isNaN(parsed.getTime()) ? period : parsed.toLocaleDateString(locale.value, { month: "short", year: "numeric" });
113
- };
179
+ const metric = computed(() => METRICS[metricIndex.value]!);
180
+ const metricLabel = computed(() => (en.value ? metric.value.en : metric.value.fr));
181
+ const indexModel = (target: Ref<number>) =>
182
+ computed<string[]>({
183
+ get: () => [String(target.value)],
184
+ set: (values) => {
185
+ if (values[0] !== undefined) target.value = Number(values[0]);
186
+ },
187
+ });
188
+ const metricModel = indexModel(metricIndex);
189
+ const periodModel = indexModel(periodIndex);
190
+ const metricChoices = computed(() => METRICS.map((m, i) => ({ value: String(i), label: en.value ? m.en : m.fr })));
191
+ const periodLabel = (count: number | null) =>
192
+ count === null ? (en.value ? "All" : "Tout") : en.value ? `Last ${count} months` : `${count} derniers mois`;
193
+ const periodChoices = computed(() => PERIODS.map((p, i) => ({ value: String(i), label: periodLabel(p) })));
114
194
 
115
- /** Les mois du code item, toutes categories de patients additionnees. */
116
- const months = computed(() => {
117
- const byPeriod = new Map<string, Record<Metric, number>>();
118
- for (const row of doc.value?.item_level ?? []) {
119
- const period = String(row?.period ?? "");
120
- if (!period) continue;
121
- const sums = byPeriod.get(period) ?? { prescriptions: 0, total_cost: 0, government_contribution: 0, patient_contribution: 0 };
122
- for (const key of METRICS) sums[key] += Number(row?.[key]) || 0;
123
- byPeriod.set(period, sums);
195
+ // ::::::: lecture des mois :::::::
196
+ const rows = computed<any[]>(() => doc.value?.item_level ?? []);
197
+ const categories = computed(() => [...new Set(rows.value.map((r) => String(r.patient_category ?? "")).filter(Boolean))].sort());
198
+ const sections = computed(() => [...new Set(rows.value.map((r) => String(r.drug_type_category ?? "")).filter(Boolean))].sort());
199
+ /** Tout coche vaut rien de coche. */
200
+ const kept = (row: any) => !selectedCategories.value.length || selectedCategories.value.includes(row.patient_category);
201
+
202
+ /** Somme de l'indicateur par mois, selon une cle de regroupement. */
203
+ function sumBy(group: (row: any) => string) {
204
+ const out: Record<string, Record<string, number>> = {};
205
+ for (const row of rows.value) {
206
+ if (!kept(row) || !row.period) continue;
207
+ const bucket = (out[group(row)] ??= {});
208
+ bucket[row.period] = (bucket[row.period] ?? 0) + (Number(row[metric.value.key as MetricKey]) || 0);
124
209
  }
125
- return [...byPeriod.entries()].sort(([a], [b]) => a.localeCompare(b)).map(([period, sums]) => ({ period, ...sums }));
210
+ return out;
211
+ }
212
+ const total = computed(() => sumBy(() => "total").total ?? {});
213
+ const bySection = computed(() => sumBy((row) => String(row.drug_type_category ?? "Unknown")));
214
+ const byCategory = computed(() => sumBy((row) => String(row.patient_category ?? "")));
215
+
216
+ const allPeriods = computed(() => Object.keys(total.value).sort());
217
+ const latest = computed(() => allPeriods.value[allPeriods.value.length - 1] ?? "");
218
+ const shownPeriods = computed(() => {
219
+ const count = PERIODS[periodIndex.value];
220
+ return count ? allPeriods.value.slice(-count) : allPeriods.value;
126
221
  });
222
+ /** Le detail se lit du plus recent au plus ancien. */
223
+ const detailPeriods = computed(() => [...shownPeriods.value].reverse());
127
224
 
128
- const lastPeriod = computed(() => months.value[months.value.length - 1]?.period ?? "");
225
+ // ::::::: formats :::::::
226
+ const MONTHS = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
227
+ const monthLabel = (period: string) => {
228
+ const [y, m] = period.split("-");
229
+ return y && m ? `${MONTHS[Number(m) - 1]} ${y}` : period;
230
+ };
231
+ const locale = computed(() => (en.value ? "en-GB" : "fr-FR"));
232
+ const round = (value: number) => Math.round(value * 100) / 100;
233
+ const formatValue = (value: number) =>
234
+ metric.value.money
235
+ ? `${Math.round(value).toLocaleString(locale.value)} A$`
236
+ : Math.round(value).toLocaleString(locale.value);
237
+ const signedPercent = (value: number) =>
238
+ `${value >= 0 ? "+" : ""}${(value * 100).toLocaleString(locale.value, { maximumFractionDigits: 1 })}%`;
239
+ const chartTitle = computed(() =>
240
+ en.value ? `${metricLabel.value} evolution` : `Évolution : ${metricLabel.value.toLowerCase()}`,
241
+ );
129
242
 
130
- const lastYear = computed(() => {
131
- const recent = months.value.slice(-12);
132
- return METRICS.map((key) => {
133
- const total = recent.reduce((sum, m) => sum + m[key], 0);
134
- return { label: label(key), value: key === "prescriptions" ? number(total) : money(total) };
135
- });
243
+ // ::::::: fenetres glissantes, comme la synthese de la page :::::::
244
+ const shiftMonth = (period: string, delta: number) => {
245
+ const [y, m] = period.split("-").map(Number);
246
+ const months = y! * 12 + (m! - 1) + delta;
247
+ return `${Math.floor(months / 12)}-${String((months % 12) + 1).padStart(2, "0")}`;
248
+ };
249
+ const monthsBack = (anchor: string, count: number) => Array.from({ length: count }, (_, i) => shiftMonth(anchor, -i));
250
+ const rangeLabel = (periods: string[]) => {
251
+ const sorted = [...periods].sort();
252
+ return sorted.length === 1 ? monthLabel(sorted[0]!) : `${monthLabel(sorted[0]!)} - ${monthLabel(sorted[sorted.length - 1]!)}`;
253
+ };
254
+
255
+ const windows = computed(() => {
256
+ const anchor = latest.value;
257
+ if (!anchor) return [];
258
+ const monthOfYear = Number(anchor.split("-")[1]);
259
+ return [
260
+ { key: "1", en: "Last month", fr: "Dernier mois", periods: monthsBack(anchor, 1) },
261
+ { key: "3", en: "Last 3 months", fr: "3 derniers mois", periods: monthsBack(anchor, 3) },
262
+ { key: "12", en: "Last 12 months", fr: "12 derniers mois", periods: monthsBack(anchor, 12) },
263
+ { key: "ytd", en: "YTD", fr: "Depuis janvier", periods: monthsBack(anchor, monthOfYear) },
264
+ ].map((w) => ({ ...w, previous: w.periods.map((p) => shiftMonth(p, -12)) }));
136
265
  });
137
266
 
138
- const yearColumns = computed(() => [
139
- { key: "year", label: en.value ? "Year" : "Année" },
140
- ...METRICS.map((key) => ({ key, label: label(key), numeric: true })),
267
+ const windowColumns = computed(() => [
268
+ { key: "label", label: en.value ? "Item code" : "Code item", rowHeader: true, minWidth: "140px" },
269
+ ...windows.value.map((w, i) => ({
270
+ key: `w${i}`,
271
+ label: en.value ? w.en : w.fr,
272
+ sublabel: `${rangeLabel(w.periods)} vs ${rangeLabel(w.previous)}`,
273
+ numeric: true,
274
+ })),
141
275
  ]);
142
- const years = computed(() => {
143
- const byYear = new Map<string, Record<Metric, number>>();
144
- for (const m of months.value) {
145
- const year = m.period.slice(0, 4);
146
- const sums = byYear.get(year) ?? { prescriptions: 0, total_cost: 0, government_contribution: 0, patient_contribution: 0 };
147
- for (const key of METRICS) sums[key] += m[key];
148
- byYear.set(year, sums);
149
- }
150
- return [...byYear.entries()]
151
- .sort(([a], [b]) => b.localeCompare(a))
152
- .map(([year, sums]) => ({
153
- year,
154
- ...Object.fromEntries(METRICS.map((key) => [key, key === "prescriptions" ? number(sums[key]) : money(sums[key])])),
155
- }));
276
+
277
+ const sumOver = (byPeriod: Record<string, number>, periods: string[]) =>
278
+ periods.reduce((sum, p) => sum + (byPeriod[p] ?? 0), 0);
279
+ const cellsFor = (byPeriod: Record<string, number>) =>
280
+ Object.fromEntries(
281
+ windows.value.map((w, i) => {
282
+ const current = sumOver(byPeriod, w.periods);
283
+ const previous = sumOver(byPeriod, w.previous);
284
+ // sans base l'an dernier, une evolution ne voudrait rien dire
285
+ return [`w${i}`, { value: current, evolution: previous > 0 ? (current - previous) / previous : null }];
286
+ }),
287
+ );
288
+
289
+ // Le code item en ligne forte, puis une ligne par section quand il en a plusieurs.
290
+ const windowRows = computed(() => [
291
+ { label: `PBS ${doc.value?.local_drug_id || code.value}`, isTotal: true, ...cellsFor(total.value) },
292
+ ...(Object.keys(bySection.value).length > 1
293
+ ? Object.entries(bySection.value).map(([label, byPeriod]) => ({ label, isTotal: false, ...cellsFor(byPeriod) }))
294
+ : []),
295
+ ]);
296
+
297
+ // ::::::: detail mensuel par categorie de patients :::::::
298
+ const detailColumns = computed(() => [
299
+ { key: "label", label: en.value ? "Patient category" : "Catégorie de patients", rowHeader: true, minWidth: "200px" },
300
+ ...detailPeriods.value.map((p) => ({ key: p, label: monthLabel(p), numeric: true })),
301
+ ]);
302
+ const detailRows = computed(() => {
303
+ const line = (label: string, byPeriod: Record<string, number>, isTotal: boolean) => ({
304
+ label,
305
+ isTotal,
306
+ ...Object.fromEntries(detailPeriods.value.map((p) => [p, byPeriod[p] ?? null])),
307
+ });
308
+ return [
309
+ line("Total", total.value, true),
310
+ ...Object.entries(byCategory.value)
311
+ .sort(([a], [b]) => a.localeCompare(b))
312
+ .map(([label, byPeriod]) => line(label, byPeriod, false)),
313
+ ];
156
314
  });
157
315
 
158
316
  async function read() {
159
317
  loading.value = true;
160
318
  const hit = await oipEsGet<any>("drugs", AUSTRALIA_INDEX.reimbursement, props.id).catch(() => null);
161
319
  doc.value = hit?._source ?? null;
320
+ selectedCategories.value = [];
162
321
  loading.value = false;
163
322
  }
164
323
 
@@ -166,15 +325,27 @@ watch(() => props.id, read, { immediate: true });
166
325
  </script>
167
326
 
168
327
  <style scoped>
169
- .oip-au__chart-head {
328
+ .oip-au__controls {
170
329
  display: flex;
171
330
  flex-wrap: wrap;
172
- align-items: center;
173
- justify-content: space-between;
331
+ align-items: flex-end;
174
332
  gap: var(--space-12);
333
+ }
334
+ .oip-au__note--spaced {
175
335
  margin-bottom: var(--space-12);
176
336
  }
177
- .oip-au__chart-head .oip-au__card-title {
178
- margin: 0;
337
+ .oip-au__nowrap {
338
+ white-space: nowrap;
339
+ }
340
+ .oip-au__evo {
341
+ margin-left: var(--space-4);
342
+ font-size: var(--font-12);
343
+ white-space: nowrap;
344
+ }
345
+ .oip-au__evo--up {
346
+ color: var(--color-success);
347
+ }
348
+ .oip-au__evo--down {
349
+ color: var(--color-danger);
179
350
  }
180
351
  </style>
@@ -5,7 +5,8 @@
5
5
  Repris de France Augmented Science et d'OIP Case Atlas.
6
6
 
7
7
  Les widgets decrivent ce que le projet range, a partir des documents que la
8
- page a deja relus. Ce que le layer ajoute au paquet :
8
+ page a deja relus ; les marques en viennent aussi (`projectBrands` de
9
+ l'app). Ce que le layer ajoute au paquet :
9
10
  - la source de chaque entree : le contenu du projet, lu a l'instant ;
10
11
  - l'export de l'onglet (tuile Export du rail, rapport PDF) : un onglet de
11
12
  classeur par widget, avec ses nombres bruts.
@@ -32,7 +33,7 @@
32
33
  <script setup lang="ts">
33
34
  import type { RmExportSheet } from "@tekkare/romulus/utils/export";
34
35
  import type { RmWidgetSource } from "@tekkare/romulus/utils/dashboard";
35
- import { PROJECT_DASHBOARD_WIDGETS, PROJECT_WORDING } from "#oip-projects";
36
+ import { PROJECT_DASHBOARD_WIDGETS, PROJECT_WORDING, projectBrands } from "#oip-projects";
36
37
  import type { OipProjectWidgetContext as WidgetContext } from "../../oip-defaults/projects";
37
38
  import { visibleExportCharts } from "../../utils/exportPage";
38
39
 
@@ -52,7 +53,7 @@ const { widgets, loading, failed, saving, saveFailed, load, update, retrySave }
52
53
  onMounted(load);
53
54
 
54
55
  const context = computed<WidgetContext>(() => ({
55
- brands: [],
56
+ brands: projectBrands(props.docs),
56
57
  lang: props.lang,
57
58
  groups: props.groups,
58
59
  docs: props.docs,
@@ -149,6 +149,14 @@ export interface OipProjectWidgetContext extends RmWidgetContext {
149
149
  docs: { type: string; source: Record<string, any> }[];
150
150
  }
151
151
 
152
+ /**
153
+ * Les marques du projet, que les widgets `usesBrands` lisent : l'app les tire
154
+ * des documents ranges (`code` des ventes, marques des avis...). Aucune par defaut.
155
+ */
156
+ export function projectBrands(_docs: OipProjectWidgetContext["docs"]): string[] {
157
+ return [];
158
+ }
159
+
152
160
  /** Le widget que toute app sait remplir : le contenu du projet, par famille. */
153
161
  export const PROJECT_RESOURCES_WIDGET: RmWidgetKind<OipProjectWidgetContext> = {
154
162
  kind: "project.resources",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tekkare/romulus",
3
- "version": "0.1.291",
3
+ "version": "0.1.293",
4
4
  "description": "Romulus Design System - Nuxt module by Tekkare",
5
5
  "license": "MIT",
6
6
  "type": "module",