@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
|
@@ -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
|
-
|
|
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
|
-
|
|
427
|
-
|
|
428
|
-
:
|
|
429
|
-
|
|
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)) }}
|