@tekkare/romulus 0.1.114 → 0.1.116

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.113",
7
+ "version": "0.1.115",
8
8
  "builder": {
9
9
  "@nuxt/module-builder": "0.8.4",
10
10
  "unbuild": "2.0.0"
@@ -109,13 +109,13 @@ const FR = {
109
109
  kind: 'Que surveiller',
110
110
  kindView: 'Une vue',
111
111
  kindViewHint: 'Un écran filtré, aussi fin que vous voulez, mais limité à cette page.',
112
- kindProduct: 'Un produit',
112
+ kindProduct: 'Une marque',
113
113
  kindProductHint: 'Une à {max} marques, suivies partout : prix, avis HAS, indications, ANSM, PUT, MITM, Journal officiel.',
114
114
  brands: 'Marques surveillées',
115
115
  brandsHint: 'Cherchez une marque et ajoutez-la. L’alerte couvre tout le hub pour chacune.',
116
116
  brandsRequired: 'Choisissez au moins une marque.',
117
117
  brandsTooMany: 'Une alerte suit {max} marques au maximum.',
118
- productFields: 'Tous les champs sont suivis : une alerte de produit ne se restreint pas, elle rapporte tout ce qui bouge sur ces marques.',
118
+ productFields: 'Tous les champs sont suivis : une alerte de marque ne se restreint pas, elle rapporte tout ce qui bouge.',
119
119
  screenOption: 'Écran actuel (une vue sera créée)',
120
120
  viewSelect: 'Vue à surveiller',
121
121
  viewApplied: 'La vue choisie est appliquée à l’écran : c’est lui qui fournit la requête surveillée.',
@@ -161,13 +161,13 @@ const EN = {
161
161
  kind: 'What to watch',
162
162
  kindView: 'A view',
163
163
  kindViewHint: 'A filtered screen, as precise as you like, but tied to that page.',
164
- kindProduct: 'A product',
164
+ kindProduct: 'A brand',
165
165
  kindProductHint: 'One to {max} brands, watched everywhere: prices, HAS opinions, indications, ANSM, PUT, MITM, official journal.',
166
166
  brands: 'Watched brands',
167
167
  brandsHint: 'Search a brand and add it. The alert covers the whole hub for each one.',
168
168
  brandsRequired: 'Pick at least one brand.',
169
169
  brandsTooMany: 'An alert watches at most {max} brands.',
170
- productFields: 'Every field is watched: a product alert does not narrow down, it reports whatever moves on those brands.',
170
+ productFields: 'Every field is watched: a brand alert does not narrow down, it reports whatever moves.',
171
171
  screenOption: 'Current screen (a view will be created)',
172
172
  viewSelect: 'View to watch',
173
173
  viewApplied: 'The chosen view is applied to the screen: the screen is what provides the watched query.',
@@ -237,6 +237,13 @@ const kind = ref<RmAlertKind>(
237
237
  (props.initial?.kind as RmAlertKind) ?? (props.canWatchView ? 'view' : 'product')
238
238
  )
239
239
  const brands = ref<string[]>(props.initial?.brands ?? [])
240
+
241
+ /**
242
+ * Saisie du selecteur de marques. Le filtre complexe l'amortit lui-meme ;
243
+ * l'appelant n'a plus qu'a la porter jusqu'a l'index.
244
+ */
245
+ const brandSearch = ref('')
246
+ watch(brandSearch, (value) => emit('search-brands', value))
240
247
  const watchesProduct = computed(() => kind.value === 'product')
241
248
 
242
249
  const title = ref(props.initial?.title ?? props.viewTitle)
@@ -421,16 +428,18 @@ function submit() {
421
428
  <fieldset v-if="watchesProduct" class="rm-alert-form__group">
422
429
  <legend class="rm-alert-form__label">{{ T.brands }}</legend>
423
430
  <p class="rm-alert-form__hint">{{ T.brandsHint }}</p>
424
- <RmMultipleSelect
431
+ <!-- Le filtre complexe plutot qu'un simple choix multiple : le
432
+ referentiel des marques ne tient pas dans une liste, il se cherche.
433
+ Son mode `remote` amortit la saisie et laisse l'appelant servir les
434
+ options, au lieu de filtrer cent valeurs deja chargees et de laisser
435
+ croire que le reste n'existe pas. -->
436
+ <RmFilterComplex
425
437
  v-model="brands"
426
- label=""
427
- search
428
- :filter-search="false"
429
- :options="brandOptions"
430
- :loading="brandsLoading"
431
- :show-amount="true"
438
+ v-model:search="brandSearch"
439
+ :label="T.brands"
440
+ :options="brandOptions.map((brand) => ({ label: brand, value: brand }))"
441
+ remote
432
442
  :lang="lang"
433
- @search="emit('search-brands', $event)"
434
443
  />
435
444
  <p v-if="brands.length > maxBrands" class="rm-alert-form__error">
436
445
  {{ T.brandsTooMany.replace('{max}', String(maxBrands)) }}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tekkare/romulus",
3
- "version": "0.1.114",
3
+ "version": "0.1.116",
4
4
  "description": "Romulus Design System - Nuxt module by Tekkare",
5
5
  "license": "MIT",
6
6
  "type": "module",