@tekkare/romulus 0.1.115 → 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.114",
7
+ "version": "0.1.115",
8
8
  "builder": {
9
9
  "@nuxt/module-builder": "0.8.4",
10
10
  "unbuild": "2.0.0"
@@ -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.115",
3
+ "version": "0.1.116",
4
4
  "description": "Romulus Design System - Nuxt module by Tekkare",
5
5
  "license": "MIT",
6
6
  "type": "module",