@ouestfrance/sipa-bms-ui 8.6.0 → 8.7.0

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.
Files changed (54) hide show
  1. package/dist/components/form/BmsAutocomplete.vue.d.ts +2 -0
  2. package/dist/components/form/BmsInputBooleanCheckbox.vue.d.ts +1 -1
  3. package/dist/components/form/BmsInputCheckboxGroup.vue.d.ts +2 -2
  4. package/dist/components/form/BmsInputCode.vue.d.ts +2 -2
  5. package/dist/components/form/BmsInputNumber.vue.d.ts +2 -2
  6. package/dist/components/form/BmsInputRadio.vue.d.ts +2 -2
  7. package/dist/components/form/BmsInputText.vue.d.ts +24 -22
  8. package/dist/components/form/BmsMultiSelect.vue.d.ts +3 -1
  9. package/dist/components/form/BmsSearch.vue.d.ts +28 -24
  10. package/dist/components/form/BmsSelect.vue.d.ts +7 -17
  11. package/dist/components/form/RawAutocomplete.vue.d.ts +17 -21
  12. package/dist/components/form/RawInputText.vue.d.ts +9 -9
  13. package/dist/components/form/RawSelect.vue.d.ts +30 -0
  14. package/dist/components/navigation/UiTenantSwitcher.vue.d.ts +28 -24
  15. package/dist/components/table/BmsServerTable.vue.d.ts +18 -0
  16. package/dist/components/table/BmsTable.vue.d.ts +18 -1
  17. package/dist/components/table/BmsTableFilters.vue.d.ts +47 -25
  18. package/dist/composables/search.composable.d.ts +1 -0
  19. package/dist/plugins/field/FieldDatalist.vue.d.ts +2 -0
  20. package/dist/plugins/field/field-component.model.d.ts +2 -2
  21. package/dist/sipa-bms-ui.css +163 -116
  22. package/dist/sipa-bms-ui.es.js +725 -520
  23. package/dist/sipa-bms-ui.es.js.map +1 -1
  24. package/dist/sipa-bms-ui.umd.js +730 -525
  25. package/dist/sipa-bms-ui.umd.js.map +1 -1
  26. package/package.json +1 -1
  27. package/src/components/form/BmsAutocomplete.vue +3 -0
  28. package/src/components/form/BmsInputNumber.spec.ts +26 -0
  29. package/src/components/form/BmsInputNumber.stories.js +20 -3
  30. package/src/components/form/BmsInputNumber.vue +36 -4
  31. package/src/components/form/BmsInputRadio.vue +1 -1
  32. package/src/components/form/BmsInputText.spec.ts +25 -0
  33. package/src/components/form/BmsInputText.stories.js +28 -3
  34. package/src/components/form/BmsInputText.vue +73 -12
  35. package/src/components/form/BmsMultiSelect.vue +66 -28
  36. package/src/components/form/BmsSelect.vue +60 -57
  37. package/src/components/form/RawAutocomplete.spec.ts +0 -8
  38. package/src/components/form/RawAutocomplete.vue +42 -24
  39. package/src/components/form/RawInputText.vue +14 -21
  40. package/src/components/form/RawSelect.vue +111 -0
  41. package/src/components/table/BmsServerTable.vue +18 -3
  42. package/src/components/table/BmsTable.vue +15 -2
  43. package/src/components/table/BmsTableFilters.vue +19 -7
  44. package/src/composables/search.composable.spec.ts +75 -0
  45. package/src/composables/search.composable.ts +54 -11
  46. package/src/plugins/field/FieldComponent.vue +6 -4
  47. package/src/plugins/field/FieldDatalist.stories.js +0 -9
  48. package/src/plugins/field/FieldDatalist.vue +16 -13
  49. package/src/plugins/field/field-component.model.ts +2 -2
  50. package/src/showroom/pages/autocomplete.vue +22 -1
  51. package/src/showroom/pages/server-table.vue +53 -22
  52. package/src/showroom/pages/table.vue +42 -3
  53. package/dist/plugins/field/FieldDatalist.spec.d.ts +0 -1
  54. package/src/plugins/field/FieldDatalist.spec.ts +0 -35
@@ -313,8 +313,8 @@
313
313
  };
314
314
 
315
315
  const _hoisted_1$X = ["href", "target"];
316
- const _hoisted_2$B = ["href", "onClick", "target"];
317
- const _sfc_main$1l = /* @__PURE__ */ vue.defineComponent({
316
+ const _hoisted_2$C = ["href", "onClick", "target"];
317
+ const _sfc_main$1m = /* @__PURE__ */ vue.defineComponent({
318
318
  __name: "BmsLink",
319
319
  props: {
320
320
  to: {},
@@ -355,7 +355,7 @@
355
355
  target: _ctx.target
356
356
  }, _ctx.$attrs), [
357
357
  vue.renderSlot(_ctx.$slots, "default")
358
- ], 16, _hoisted_2$B)
358
+ ], 16, _hoisted_2$C)
359
359
  ]),
360
360
  _: 3
361
361
  }, 8, ["to"]));
@@ -364,7 +364,7 @@
364
364
  });
365
365
 
366
366
  const _hoisted_1$W = ["type"];
367
- const _sfc_main$1k = /* @__PURE__ */ vue.defineComponent({
367
+ const _sfc_main$1l = /* @__PURE__ */ vue.defineComponent({
368
368
  __name: "UiButtonLink",
369
369
  props: {
370
370
  type: {},
@@ -388,7 +388,7 @@
388
388
  type: _ctx.type
389
389
  }, [
390
390
  vue.renderSlot(_ctx.$slots, "default")
391
- ], 10, _hoisted_1$W)) : (vue.openBlock(), vue.createBlock(_sfc_main$1l, {
391
+ ], 10, _hoisted_1$W)) : (vue.openBlock(), vue.createBlock(_sfc_main$1m, {
392
392
  key: 1,
393
393
  to: _ctx.to,
394
394
  target: _ctx.target,
@@ -404,9 +404,9 @@
404
404
  });
405
405
 
406
406
  const _hoisted_1$V = { class: "start" };
407
- const _hoisted_2$A = { class: "content" };
407
+ const _hoisted_2$B = { class: "content" };
408
408
  const _hoisted_3$j = { class: "end" };
409
- const _sfc_main$1j = /* @__PURE__ */ vue.defineComponent({
409
+ const _sfc_main$1k = /* @__PURE__ */ vue.defineComponent({
410
410
  __name: "UiButton",
411
411
  props: {
412
412
  type: { default: "button" },
@@ -418,12 +418,12 @@
418
418
  setup(__props) {
419
419
  const props = __props;
420
420
  return (_ctx, _cache) => {
421
- return vue.openBlock(), vue.createBlock(_sfc_main$1k, vue.normalizeProps(vue.guardReactiveProps(props)), {
421
+ return vue.openBlock(), vue.createBlock(_sfc_main$1l, vue.normalizeProps(vue.guardReactiveProps(props)), {
422
422
  default: vue.withCtx(() => [
423
423
  vue.createElementVNode("span", _hoisted_1$V, [
424
424
  vue.renderSlot(_ctx.$slots, "start")
425
425
  ]),
426
- vue.createElementVNode("span", _hoisted_2$A, [
426
+ vue.createElementVNode("span", _hoisted_2$B, [
427
427
  vue.renderSlot(_ctx.$slots, "default")
428
428
  ]),
429
429
  vue.createElementVNode("span", _hoisted_3$j, [
@@ -436,7 +436,7 @@
436
436
  }
437
437
  });
438
438
 
439
- const _sfc_main$1i = /* @__PURE__ */ vue.defineComponent({
439
+ const _sfc_main$1j = /* @__PURE__ */ vue.defineComponent({
440
440
  __name: "BmsButton",
441
441
  props: {
442
442
  type: { default: "primary" },
@@ -459,7 +459,7 @@
459
459
  }
460
460
  });
461
461
  return (_ctx, _cache) => {
462
- return vue.openBlock(), vue.createBlock(_sfc_main$1j, {
462
+ return vue.openBlock(), vue.createBlock(_sfc_main$1k, {
463
463
  mode: uiMode.value,
464
464
  color: _ctx.mode,
465
465
  to: _ctx.to,
@@ -480,7 +480,7 @@
480
480
  }
481
481
  });
482
482
 
483
- const _sfc_main$1h = /* @__PURE__ */ vue.defineComponent({
483
+ const _sfc_main$1i = /* @__PURE__ */ vue.defineComponent({
484
484
  __name: "BmsIconButton",
485
485
  props: {
486
486
  to: { default: null },
@@ -499,7 +499,7 @@
499
499
  direction: _ctx.tooltipDirection
500
500
  }, {
501
501
  default: vue.withCtx(() => [
502
- vue.createVNode(_sfc_main$1j, vue.mergeProps(_ctx.$attrs, {
502
+ vue.createVNode(_sfc_main$1k, vue.mergeProps(_ctx.$attrs, {
503
503
  icon: "",
504
504
  to: _ctx.to,
505
505
  target: _ctx.target,
@@ -36723,9 +36723,9 @@
36723
36723
  }, Symbol.toStringTag, { value: 'Module' }));
36724
36724
 
36725
36725
  const _hoisted_1$U = { class: "info-line" };
36726
- const _hoisted_2$z = { class: "icon" };
36726
+ const _hoisted_2$A = { class: "icon" };
36727
36727
  const _hoisted_3$i = { class: "message" };
36728
- const _sfc_main$1g = /* @__PURE__ */ vue.defineComponent({
36728
+ const _sfc_main$1h = /* @__PURE__ */ vue.defineComponent({
36729
36729
  __name: "BmsAlert",
36730
36730
  props: {
36731
36731
  message: {},
@@ -36751,7 +36751,7 @@
36751
36751
  class: vue.normalizeClass(["alert", `alert-${props.type}`])
36752
36752
  }, [
36753
36753
  vue.createElementVNode("div", _hoisted_1$U, [
36754
- vue.createElementVNode("span", _hoisted_2$z, [
36754
+ vue.createElementVNode("span", _hoisted_2$A, [
36755
36755
  (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(alertIcon.value), { size: 20 }))
36756
36756
  ]),
36757
36757
  vue.createElementVNode("span", _hoisted_3$i, [
@@ -36760,7 +36760,7 @@
36760
36760
  ], true)
36761
36761
  ]),
36762
36762
  vue.renderSlot(_ctx.$slots, "action", {}, void 0, true),
36763
- _ctx.dismissable ? (vue.openBlock(), vue.createBlock(_sfc_main$1h, {
36763
+ _ctx.dismissable ? (vue.openBlock(), vue.createBlock(_sfc_main$1i, {
36764
36764
  key: 0,
36765
36765
  onClick: _cache[0] || (_cache[0] = ($event) => emits("dismiss"))
36766
36766
  }, {
@@ -36784,13 +36784,13 @@
36784
36784
  return target;
36785
36785
  };
36786
36786
 
36787
- const BmsAlert = /* @__PURE__ */ _export_sfc(_sfc_main$1g, [["__scopeId", "data-v-26caccdd"]]);
36787
+ const BmsAlert = /* @__PURE__ */ _export_sfc(_sfc_main$1h, [["__scopeId", "data-v-26caccdd"]]);
36788
36788
 
36789
36789
  const _hoisted_1$T = {
36790
36790
  key: 0,
36791
36791
  class: "ui-badge__container"
36792
36792
  };
36793
- const _sfc_main$1f = /* @__PURE__ */ vue.defineComponent({
36793
+ const _sfc_main$1g = /* @__PURE__ */ vue.defineComponent({
36794
36794
  __name: "BmsBadge",
36795
36795
  props: {
36796
36796
  pending: { default: 0 },
@@ -36816,14 +36816,14 @@
36816
36816
  }
36817
36817
  });
36818
36818
 
36819
- const BmsBadge = /* @__PURE__ */ _export_sfc(_sfc_main$1f, [["__scopeId", "data-v-8a6297ca"]]);
36819
+ const BmsBadge = /* @__PURE__ */ _export_sfc(_sfc_main$1g, [["__scopeId", "data-v-8a6297ca"]]);
36820
36820
 
36821
36821
  const _hoisted_1$S = {
36822
36822
  key: 0,
36823
36823
  class: "icon"
36824
36824
  };
36825
- const _hoisted_2$y = ["innerHTML"];
36826
- const _sfc_main$1e = /* @__PURE__ */ vue.defineComponent({
36825
+ const _hoisted_2$z = ["innerHTML"];
36826
+ const _sfc_main$1f = /* @__PURE__ */ vue.defineComponent({
36827
36827
  __name: "BmsCaption",
36828
36828
  props: {
36829
36829
  caption: {}
@@ -36860,29 +36860,29 @@
36860
36860
  vue.createElementVNode("span", {
36861
36861
  class: "label",
36862
36862
  innerHTML: vue.unref(sanitizeHtml)(computedCaption.value.label)
36863
- }, null, 8, _hoisted_2$y)
36863
+ }, null, 8, _hoisted_2$z)
36864
36864
  ], 2);
36865
36865
  };
36866
36866
  }
36867
36867
  });
36868
36868
 
36869
- const BmsCaption = /* @__PURE__ */ _export_sfc(_sfc_main$1e, [["__scopeId", "data-v-b08dd4e0"]]);
36869
+ const BmsCaption = /* @__PURE__ */ _export_sfc(_sfc_main$1f, [["__scopeId", "data-v-b08dd4e0"]]);
36870
36870
 
36871
36871
  const _hoisted_1$R = { class: "circular-progress" };
36872
- const _hoisted_2$x = {
36872
+ const _hoisted_2$y = {
36873
36873
  key: 0,
36874
36874
  viewBox: "0 0 100 100"
36875
36875
  };
36876
36876
  const _hoisted_3$h = { transform: "rotate(-90, 50, 50)" };
36877
36877
  const _hoisted_4$c = ["stroke-dashoffset"];
36878
36878
  const _hoisted_5$8 = { class: "percent" };
36879
- const _sfc_main$1d = /* @__PURE__ */ vue.defineComponent({
36879
+ const _sfc_main$1e = /* @__PURE__ */ vue.defineComponent({
36880
36880
  __name: "BmsCircularProgress",
36881
36881
  props: ["progress"],
36882
36882
  setup(__props) {
36883
36883
  return (_ctx, _cache) => {
36884
36884
  return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$R, [
36885
- __props.progress ? (vue.openBlock(), vue.createElementBlock("svg", _hoisted_2$x, [
36885
+ __props.progress ? (vue.openBlock(), vue.createElementBlock("svg", _hoisted_2$y, [
36886
36886
  vue.createElementVNode("g", _hoisted_3$h, [
36887
36887
  _cache[0] || (_cache[0] = vue.createElementVNode("circle", {
36888
36888
  opacity: ".08",
@@ -36911,13 +36911,13 @@
36911
36911
  }
36912
36912
  });
36913
36913
 
36914
- const BmsCircularProgress = /* @__PURE__ */ _export_sfc(_sfc_main$1d, [["__scopeId", "data-v-7869acfb"]]);
36914
+ const BmsCircularProgress = /* @__PURE__ */ _export_sfc(_sfc_main$1e, [["__scopeId", "data-v-7869acfb"]]);
36915
36915
 
36916
36916
  const _hoisted_1$Q = { class: "bms-loader" };
36917
36917
  function transformIntoPx(totransform) {
36918
36918
  return typeof totransform === "string" ? totransform : `${totransform}px`;
36919
36919
  }
36920
- const _sfc_main$1c = /* @__PURE__ */ vue.defineComponent({
36920
+ const _sfc_main$1d = /* @__PURE__ */ vue.defineComponent({
36921
36921
  __name: "BmsLoader",
36922
36922
  props: {
36923
36923
  size: { default: "inherit" }
@@ -36938,7 +36938,7 @@
36938
36938
  }
36939
36939
  });
36940
36940
 
36941
- const BmsLoader = /* @__PURE__ */ _export_sfc(_sfc_main$1c, [["__scopeId", "data-v-7cc96135"]]);
36941
+ const BmsLoader = /* @__PURE__ */ _export_sfc(_sfc_main$1d, [["__scopeId", "data-v-7cc96135"]]);
36942
36942
 
36943
36943
  function tryOnScopeDispose(fn) {
36944
36944
  if (vue.getCurrentScope()) {
@@ -37772,7 +37772,7 @@
37772
37772
  };
37773
37773
  };
37774
37774
 
37775
- const _sfc_main$1b = /* @__PURE__ */ vue.defineComponent({
37775
+ const _sfc_main$1c = /* @__PURE__ */ vue.defineComponent({
37776
37776
  __name: "UiTooltip",
37777
37777
  props: {
37778
37778
  visible: { type: Boolean, default: true },
@@ -37848,9 +37848,9 @@
37848
37848
  }
37849
37849
  });
37850
37850
 
37851
- const UiTooltip = /* @__PURE__ */ _export_sfc(_sfc_main$1b, [["__scopeId", "data-v-e8f6f5f1"]]);
37851
+ const UiTooltip = /* @__PURE__ */ _export_sfc(_sfc_main$1c, [["__scopeId", "data-v-e8f6f5f1"]]);
37852
37852
 
37853
- const _sfc_main$1a = /* @__PURE__ */ vue.defineComponent({
37853
+ const _sfc_main$1b = /* @__PURE__ */ vue.defineComponent({
37854
37854
  __name: "BmsTooltip",
37855
37855
  props: {
37856
37856
  tooltipText: { default: "" },
@@ -37929,10 +37929,14 @@
37929
37929
  }
37930
37930
  });
37931
37931
 
37932
- const BmsTooltip = /* @__PURE__ */ _export_sfc(_sfc_main$1a, [["__scopeId", "data-v-b033f8af"]]);
37932
+ const BmsTooltip = /* @__PURE__ */ _export_sfc(_sfc_main$1b, [["__scopeId", "data-v-b033f8af"]]);
37933
37933
 
37934
- const _hoisted_1$P = ["data-testid", "onClick"];
37935
- const _sfc_main$19 = /* @__PURE__ */ vue.defineComponent({
37934
+ const _hoisted_1$P = {
37935
+ class: "options-list",
37936
+ "data-testid": "select-options"
37937
+ };
37938
+ const _hoisted_2$x = ["data-testid", "onClick"];
37939
+ const _sfc_main$1a = /* @__PURE__ */ vue.defineComponent({
37936
37940
  __name: "FieldDatalist",
37937
37941
  props: {
37938
37942
  options: {},
@@ -37941,7 +37945,7 @@
37941
37945
  newOption: { default: "" },
37942
37946
  small: { type: Boolean, default: false }
37943
37947
  },
37944
- emits: ["select", "addNewOption"],
37948
+ emits: ["select", "addNewOption", "blur"],
37945
37949
  setup(__props, { emit: __emit }) {
37946
37950
  const props = __props;
37947
37951
  const currentSelectedItemIndex = vue.ref(-1);
@@ -37950,11 +37954,17 @@
37950
37954
  if (props.isInputFocused) {
37951
37955
  switch (ev.key) {
37952
37956
  case "ArrowDown":
37957
+ ev.preventDefault();
37953
37958
  return keyDown();
37954
37959
  case "ArrowUp":
37960
+ ev.preventDefault();
37955
37961
  return keyUp();
37956
37962
  case "Enter":
37963
+ ev.preventDefault();
37957
37964
  return keyEnter();
37965
+ case "Escape":
37966
+ ev.preventDefault();
37967
+ return keyEscape();
37958
37968
  default:
37959
37969
  return;
37960
37970
  }
@@ -37983,6 +37993,9 @@
37983
37993
  currentSelectedItemIndex.value = -1;
37984
37994
  }
37985
37995
  };
37996
+ const keyEscape = () => {
37997
+ $emits("blur");
37998
+ };
37986
37999
  const onClick = (option) => {
37987
38000
  $emits("select", option);
37988
38001
  };
@@ -37990,55 +38003,52 @@
37990
38003
  () => props.canAddNewOption && props.newOption && !props.options.find((o) => o.value === props.newOption)
37991
38004
  );
37992
38005
  return (_ctx, _cache) => {
37993
- return vue.openBlock(), vue.createElementBlock("ul", {
37994
- class: "options-list",
37995
- "data-testid": "select-options",
37996
- onKeydown: [
37997
- vue.withKeys(keyUp, ["up"]),
37998
- vue.withKeys(keyDown, ["down"]),
37999
- vue.withKeys(keyEnter, ["enter"])
38000
- ]
38001
- }, [
38006
+ return vue.openBlock(), vue.createElementBlock("ul", _hoisted_1$P, [
38002
38007
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.options, (option, index) => {
38003
38008
  return vue.openBlock(), vue.createElementBlock("li", {
38004
38009
  key: index,
38005
38010
  "data-testid": option.value,
38006
38011
  class: vue.normalizeClass({
38012
+ "datalist-option": true,
38007
38013
  selected: index === currentSelectedItemIndex.value,
38008
38014
  small: _ctx.small
38009
38015
  }),
38010
- onClick: vue.withModifiers(($event) => onClick(option), ["prevent"])
38016
+ onClick: vue.withModifiers(($event) => onClick(option), ["stop"])
38011
38017
  }, [
38012
38018
  vue.renderSlot(_ctx.$slots, "option", { option }, () => [
38013
38019
  vue.createTextVNode(vue.toDisplayString(option.label === null ? "N/A" : option.label), 1)
38014
38020
  ], true)
38015
- ], 10, _hoisted_1$P);
38021
+ ], 10, _hoisted_2$x);
38016
38022
  }), 128)),
38017
38023
  displayNewOption.value ? (vue.openBlock(), vue.createElementBlock("li", {
38018
38024
  key: 0,
38019
- onClick: _cache[0] || (_cache[0] = vue.withModifiers(($event) => $emits("addNewOption", _ctx.newOption), ["prevent"]))
38025
+ onClick: _cache[0] || (_cache[0] = vue.withModifiers(($event) => $emits("addNewOption", _ctx.newOption), ["stop"]))
38020
38026
  }, [
38021
38027
  vue.renderSlot(_ctx.$slots, "new-option", {}, () => [
38022
38028
  vue.createTextVNode(vue.toDisplayString(_ctx.newOption) + " (nouvelle option) ", 1)
38023
38029
  ], true)
38024
38030
  ])) : vue.createCommentVNode("", true)
38025
- ], 32);
38031
+ ]);
38026
38032
  };
38027
38033
  }
38028
38034
  });
38029
38035
 
38030
- const FieldDatalist = /* @__PURE__ */ _export_sfc(_sfc_main$19, [["__scopeId", "data-v-413e6742"]]);
38036
+ const FieldDatalist = /* @__PURE__ */ _export_sfc(_sfc_main$1a, [["__scopeId", "data-v-ba5302fc"]]);
38031
38037
 
38032
38038
  const _hoisted_1$O = { class: "field__input-label" };
38033
38039
  const _hoisted_2$w = { class: "field__input-icon field__input-icon--start" };
38034
- const _hoisted_3$g = ["type", "value", "placeholder", "required", "disabled"];
38040
+ const _hoisted_3$g = ["type", "value", "placeholder", "required", "disabled", "max", "min", "minlength", "maxlength"];
38035
38041
  const _hoisted_4$b = { class: "field__input-icon field__input-icon--end" };
38036
- const _sfc_main$18 = /* @__PURE__ */ vue.defineComponent({
38042
+ const _sfc_main$19 = /* @__PURE__ */ vue.defineComponent({
38037
38043
  __name: "RawInputText",
38038
38044
  props: {
38039
38045
  modelValue: {},
38040
38046
  placeholder: {},
38041
38047
  focus: { type: Boolean, default: false },
38048
+ min: {},
38049
+ max: {},
38050
+ minlength: {},
38051
+ maxlength: {},
38042
38052
  type: { default: InputType.TEXT },
38043
38053
  label: {},
38044
38054
  required: { type: Boolean, default: false },
@@ -38049,25 +38059,14 @@
38049
38059
  disabled: { type: Boolean, default: false },
38050
38060
  small: { type: Boolean }
38051
38061
  },
38052
- emits: ["update:modelValue", "update:focus", "blur", "keyUp", "keyDown", "keyEnter"],
38062
+ emits: ["update:modelValue", "blur", "focus", "click"],
38053
38063
  setup(__props, { expose: __expose, emit: __emit }) {
38054
38064
  const props = __props;
38055
38065
  const input = vue.ref(null);
38056
38066
  const $emits = __emit;
38057
- vue.onMounted(() => {
38058
- document.body.addEventListener("click", (ev) => {
38059
- if (ev.target === input.value) {
38060
- $emits("update:focus", !props.focus);
38061
- ev.stopPropagation();
38062
- } else {
38063
- $emits("update:focus", false);
38064
- }
38065
- });
38066
- });
38067
38067
  const setFocus = () => {
38068
38068
  if (input.value) {
38069
38069
  input.value.focus();
38070
- $emits("update:focus", true);
38071
38070
  }
38072
38071
  };
38073
38072
  __expose({
@@ -38103,13 +38102,13 @@
38103
38102
  placeholder: _ctx.placeholder,
38104
38103
  required: _ctx.required,
38105
38104
  disabled: _ctx.disabled,
38105
+ max: _ctx.max,
38106
+ min: _ctx.min,
38107
+ minlength: _ctx.minlength,
38108
+ maxlength: _ctx.maxlength,
38106
38109
  onBlur: _cache[0] || (_cache[0] = ($event) => $emits("blur")),
38107
38110
  onInput,
38108
- onKeydown: [
38109
- _cache[1] || (_cache[1] = vue.withKeys(($event) => $emits("keyUp"), ["up"])),
38110
- _cache[2] || (_cache[2] = vue.withKeys(($event) => $emits("keyDown"), ["down"])),
38111
- _cache[3] || (_cache[3] = vue.withKeys(($event) => $emits("keyEnter"), ["enter"]))
38112
- ]
38111
+ onFocus: _cache[1] || (_cache[1] = ($event) => $emits("focus"))
38113
38112
  }, null, 40, _hoisted_3$g),
38114
38113
  vue.createElementVNode("span", _hoisted_4$b, [
38115
38114
  vue.renderSlot(_ctx.$slots, "icon-end", {}, void 0, true)
@@ -38119,9 +38118,9 @@
38119
38118
  }
38120
38119
  });
38121
38120
 
38122
- const RawInputText = /* @__PURE__ */ _export_sfc(_sfc_main$18, [["__scopeId", "data-v-af4d1ce5"]]);
38121
+ const RawInputText = /* @__PURE__ */ _export_sfc(_sfc_main$19, [["__scopeId", "data-v-078d99d6"]]);
38123
38122
 
38124
- const _sfc_main$17 = /* @__PURE__ */ vue.defineComponent({
38123
+ const _sfc_main$18 = /* @__PURE__ */ vue.defineComponent({
38125
38124
  __name: "RawAutocomplete",
38126
38125
  props: /* @__PURE__ */ vue.mergeModels({
38127
38126
  options: {},
@@ -38145,14 +38144,19 @@
38145
38144
  setup(__props, { expose: __expose, emit: __emit }) {
38146
38145
  const props = __props;
38147
38146
  const modelValue = vue.useModel(__props, "modelValue");
38147
+ const rawInput = vue.useTemplateRef("rawInput");
38148
38148
  const emits = __emit;
38149
38149
  const getValidOptionByLabel = (label) => props.options.find((o) => o.label === label);
38150
38150
  const getValidOptionByValue = (value) => props.options.find((o) => o.value === value);
38151
38151
  const inputText = vue.ref(
38152
38152
  getValidOptionByValue(modelValue.value)?.label ?? ""
38153
38153
  );
38154
- const showDataList = vue.ref(props.open);
38155
- const autocompleteInput = vue.ref(null);
38154
+ const isDatalistOpen = vue.ref(props.open);
38155
+ const closeDatalist = () => isDatalistOpen.value = false;
38156
+ const openDatalist = () => isDatalistOpen.value = true;
38157
+ onClickOutside(rawInput, closeDatalist, {
38158
+ ignore: [".datalist-option", ".icon-toggle-button", ".icon-clear"]
38159
+ });
38156
38160
  const classes = vue.computed(() => {
38157
38161
  return { "is-error": props.errors?.length, "is-disabled": props.disabled };
38158
38162
  });
@@ -38160,11 +38164,13 @@
38160
38164
  () => props.options.filter((o) => searchString(o.label, inputText.value))
38161
38165
  );
38162
38166
  const selectItem = (option) => {
38163
- emits("select", option);
38164
38167
  const existingOption = getValidOptionByLabel(option.label) || getValidOptionByValue(option.value);
38165
- modelValue.value = existingOption?.value ?? null;
38166
- showDataList.value = false;
38167
- setFocus();
38168
+ if (existingOption) {
38169
+ modelValue.value = existingOption?.value ?? null;
38170
+ emits("select", existingOption);
38171
+ setFocus();
38172
+ closeDatalist();
38173
+ }
38168
38174
  };
38169
38175
  const displayItem = (option) => {
38170
38176
  const existingOption = getValidOptionByLabel(option.label) || getValidOptionByValue(option.value);
@@ -38188,25 +38194,25 @@
38188
38194
  }
38189
38195
  }
38190
38196
  );
38197
+ const onFocus = () => {
38198
+ openDatalist();
38199
+ };
38191
38200
  const onInput = () => {
38192
- showDataList.value = true;
38201
+ openDatalist();
38193
38202
  if (inputText.value === "") {
38194
38203
  clearInput();
38195
38204
  }
38196
38205
  };
38197
38206
  const setFocus = () => {
38198
- if (autocompleteInput.value) {
38199
- autocompleteInput.value.setFocus();
38207
+ if (rawInput.value) {
38208
+ rawInput.value.setFocus();
38200
38209
  }
38201
38210
  };
38202
38211
  const clearInput = () => {
38203
38212
  inputText.value = "";
38204
38213
  modelValue.value = null;
38205
38214
  setFocus();
38206
- };
38207
- const toggleList = () => {
38208
- showDataList.value = !showDataList.value;
38209
- setFocus();
38215
+ closeDatalist();
38210
38216
  };
38211
38217
  __expose({
38212
38218
  setFocus
@@ -38217,13 +38223,14 @@
38217
38223
  datalist: vue.withCtx(() => [
38218
38224
  vue.withDirectives(vue.createVNode(FieldDatalist, {
38219
38225
  "data-testid": "autocomplete-menu",
38220
- "is-input-focused": showDataList.value,
38226
+ "is-input-focused": isDatalistOpen.value,
38221
38227
  "can-add-new-option": _ctx.canAddNewOption,
38222
38228
  "new-option": inputText.value,
38223
38229
  options: filteredMenuItems.value,
38224
38230
  small: _ctx.small,
38225
38231
  onSelect: selectItem,
38226
- onAddNewOption: _cache[1] || (_cache[1] = (option) => emits("addNewOption", option))
38232
+ onAddNewOption: _cache[1] || (_cache[1] = (option) => emits("addNewOption", option)),
38233
+ onBlur: closeDatalist
38227
38234
  }, {
38228
38235
  option: vue.withCtx(({ option }) => [
38229
38236
  vue.renderSlot(_ctx.$slots, "option", { option }, () => [
@@ -38232,13 +38239,13 @@
38232
38239
  ]),
38233
38240
  _: 3
38234
38241
  }, 8, ["is-input-focused", "can-add-new-option", "new-option", "options", "small"]), [
38235
- [vue.vShow, showDataList.value]
38242
+ [vue.vShow, isDatalistOpen.value]
38236
38243
  ])
38237
38244
  ]),
38238
38245
  default: vue.withCtx(() => [
38239
38246
  vue.createVNode(RawInputText, {
38240
- ref_key: "autocompleteInput",
38241
- ref: autocompleteInput,
38247
+ ref_key: "rawInput",
38248
+ ref: rawInput,
38242
38249
  modelValue: inputText.value,
38243
38250
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => inputText.value = $event),
38244
38251
  type: vue.unref(InputType).TEXT,
@@ -38247,26 +38254,29 @@
38247
38254
  placeholder: _ctx.placeholder,
38248
38255
  required: _ctx.required,
38249
38256
  small: _ctx.small,
38250
- onInput
38257
+ onInput,
38258
+ onFocus
38251
38259
  }, {
38252
38260
  "icon-start": vue.withCtx(() => [
38253
38261
  vue.renderSlot(_ctx.$slots, "icon-start", {}, void 0, true)
38254
38262
  ]),
38255
38263
  "icon-end": vue.withCtx(() => [
38256
38264
  vue.renderSlot(_ctx.$slots, "icon-end", {}, () => [
38257
- inputText.value.length ? (vue.openBlock(), vue.createElementBlock("span", {
38265
+ inputText.value.length ? (vue.openBlock(), vue.createBlock(vue.unref(X), {
38258
38266
  key: 0,
38259
38267
  class: "icon",
38260
- onClick: clearInput
38261
- }, [
38262
- vue.createVNode(vue.unref(X))
38263
- ])) : (vue.openBlock(), vue.createElementBlock("span", {
38264
- key: 1,
38265
- class: "icon",
38266
- onClick: vue.withModifiers(toggleList, ["stop"])
38267
- }, [
38268
- !showDataList.value ? (vue.openBlock(), vue.createBlock(vue.unref(ChevronDown), { key: 0 })) : (vue.openBlock(), vue.createBlock(vue.unref(ChevronUp), { key: 1 }))
38269
- ]))
38268
+ onClick: vue.withModifiers(clearInput, ["stop"])
38269
+ })) : (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
38270
+ isDatalistOpen.value ? (vue.openBlock(), vue.createBlock(vue.unref(ChevronUp), {
38271
+ key: 0,
38272
+ class: "icon",
38273
+ onClick: closeDatalist
38274
+ })) : (vue.openBlock(), vue.createBlock(vue.unref(ChevronDown), {
38275
+ key: 1,
38276
+ class: "icon",
38277
+ onClick: openDatalist
38278
+ }))
38279
+ ], 64))
38270
38280
  ], true)
38271
38281
  ]),
38272
38282
  _: 3
@@ -38278,11 +38288,11 @@
38278
38288
  }
38279
38289
  });
38280
38290
 
38281
- const RawAutocomplete = /* @__PURE__ */ _export_sfc(_sfc_main$17, [["__scopeId", "data-v-5d665f68"]]);
38291
+ const RawAutocomplete = /* @__PURE__ */ _export_sfc(_sfc_main$18, [["__scopeId", "data-v-d649440b"]]);
38282
38292
 
38283
38293
  const _hoisted_1$N = ["innerHTML"];
38284
38294
  const _hoisted_2$v = ["innerHTML"];
38285
- const _sfc_main$16 = /* @__PURE__ */ vue.defineComponent({
38295
+ const _sfc_main$17 = /* @__PURE__ */ vue.defineComponent({
38286
38296
  __name: "BmsAutocomplete",
38287
38297
  props: /* @__PURE__ */ vue.mergeModels({
38288
38298
  options: {},
@@ -38304,7 +38314,7 @@
38304
38314
  },
38305
38315
  "modelModifiers": {}
38306
38316
  }),
38307
- emits: /* @__PURE__ */ vue.mergeModels(["addNewOption", "select"], ["update:modelValue"]),
38317
+ emits: /* @__PURE__ */ vue.mergeModels(["addNewOption", "select", "input"], ["update:modelValue"]),
38308
38318
  setup(__props, { emit: __emit }) {
38309
38319
  const props = __props;
38310
38320
  const modelValue = vue.useModel(__props, "modelValue");
@@ -38336,7 +38346,8 @@
38336
38346
  "can-add-new-option": _ctx.canAddNewOption,
38337
38347
  small: _ctx.small,
38338
38348
  onSelect: _cache[1] || (_cache[1] = (option) => emits("select", option)),
38339
- onAddNewOption: _cache[2] || (_cache[2] = (newOption) => emits("addNewOption", newOption))
38349
+ onAddNewOption: _cache[2] || (_cache[2] = (newOption) => emits("addNewOption", newOption)),
38350
+ onInput: _cache[3] || (_cache[3] = (e) => emits("input", e))
38340
38351
  }, vue.createSlots({
38341
38352
  option: vue.withCtx(({ option }) => [
38342
38353
  option.icon ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
@@ -38369,9 +38380,9 @@
38369
38380
  }
38370
38381
  });
38371
38382
 
38372
- const BmsAutocomplete = /* @__PURE__ */ _export_sfc(_sfc_main$16, [["__scopeId", "data-v-274b6035"]]);
38383
+ const BmsAutocomplete = /* @__PURE__ */ _export_sfc(_sfc_main$17, [["__scopeId", "data-v-b0e1e6f3"]]);
38373
38384
 
38374
- const _sfc_main$15 = /* @__PURE__ */ vue.defineComponent({
38385
+ const _sfc_main$16 = /* @__PURE__ */ vue.defineComponent({
38375
38386
  __name: "BmsBetweenInput",
38376
38387
  props: {
38377
38388
  inputType: { default: InputType.NUMBER },
@@ -38468,9 +38479,9 @@
38468
38479
  }
38469
38480
  });
38470
38481
 
38471
- const BmsBetweenInput = /* @__PURE__ */ _export_sfc(_sfc_main$15, [["__scopeId", "data-v-f25b520b"]]);
38482
+ const BmsBetweenInput = /* @__PURE__ */ _export_sfc(_sfc_main$16, [["__scopeId", "data-v-f25b520b"]]);
38472
38483
 
38473
- const _sfc_main$14 = /* @__PURE__ */ vue.defineComponent({
38484
+ const _sfc_main$15 = /* @__PURE__ */ vue.defineComponent({
38474
38485
  __name: "BmsChip",
38475
38486
  props: {
38476
38487
  color: { default: ChipColor.Grey }
@@ -38493,13 +38504,13 @@
38493
38504
  }
38494
38505
  });
38495
38506
 
38496
- const BmsChip = /* @__PURE__ */ _export_sfc(_sfc_main$14, [["__scopeId", "data-v-72b945cc"]]);
38507
+ const BmsChip = /* @__PURE__ */ _export_sfc(_sfc_main$15, [["__scopeId", "data-v-72b945cc"]]);
38497
38508
 
38498
38509
  const _hoisted_1$M = { class: "file-upload" };
38499
38510
  const _hoisted_2$u = { class: "file-upload__label" };
38500
38511
  const _hoisted_3$f = { key: 1 };
38501
38512
  const _hoisted_4$a = { class: "file-upload__file-name" };
38502
- const _sfc_main$13 = /* @__PURE__ */ vue.defineComponent({
38513
+ const _sfc_main$14 = /* @__PURE__ */ vue.defineComponent({
38503
38514
  __name: "BmsFilePicker",
38504
38515
  props: {
38505
38516
  modelValue: {},
@@ -38598,7 +38609,7 @@
38598
38609
  class: "file-upload__file"
38599
38610
  }, [
38600
38611
  vue.createElementVNode("span", _hoisted_4$a, vue.toDisplayString(file.name), 1),
38601
- vue.createVNode(vue.unref(_sfc_main$1h), {
38612
+ vue.createVNode(vue.unref(_sfc_main$1i), {
38602
38613
  onClick: ($event) => onDeleteFile(file)
38603
38614
  }, {
38604
38615
  default: vue.withCtx(() => [
@@ -38614,14 +38625,14 @@
38614
38625
  }
38615
38626
  });
38616
38627
 
38617
- const BmsFilePicker = /* @__PURE__ */ _export_sfc(_sfc_main$13, [["__scopeId", "data-v-c892a845"]]);
38628
+ const BmsFilePicker = /* @__PURE__ */ _export_sfc(_sfc_main$14, [["__scopeId", "data-v-c892a845"]]);
38618
38629
 
38619
38630
  const _hoisted_1$L = ["disabled", "name", "value"];
38620
38631
  const _hoisted_2$t = {
38621
38632
  key: 0,
38622
38633
  class: "input-checkbox-info"
38623
38634
  };
38624
- const _sfc_main$12 = /* @__PURE__ */ vue.defineComponent({
38635
+ const _sfc_main$13 = /* @__PURE__ */ vue.defineComponent({
38625
38636
  __name: "UiBmsInputCheckbox",
38626
38637
  props: {
38627
38638
  modelValue: { default: false },
@@ -38671,9 +38682,9 @@
38671
38682
  }
38672
38683
  });
38673
38684
 
38674
- const UiBmsInputCheckbox = /* @__PURE__ */ _export_sfc(_sfc_main$12, [["__scopeId", "data-v-e1d94c62"]]);
38685
+ const UiBmsInputCheckbox = /* @__PURE__ */ _export_sfc(_sfc_main$13, [["__scopeId", "data-v-e1d94c62"]]);
38675
38686
 
38676
- const _sfc_main$11 = /* @__PURE__ */ vue.defineComponent({
38687
+ const _sfc_main$12 = /* @__PURE__ */ vue.defineComponent({
38677
38688
  __name: "BmsInputBooleanCheckbox",
38678
38689
  props: {
38679
38690
  modelValue: {},
@@ -38792,7 +38803,7 @@
38792
38803
  return _v4(options, buf, offset);
38793
38804
  }
38794
38805
 
38795
- const _sfc_main$10 = /* @__PURE__ */ vue.defineComponent({
38806
+ const _sfc_main$11 = /* @__PURE__ */ vue.defineComponent({
38796
38807
  __name: "BmsInputCheckboxGroup",
38797
38808
  props: {
38798
38809
  values: {},
@@ -38861,9 +38872,9 @@
38861
38872
  }
38862
38873
  });
38863
38874
 
38864
- const BmsInputCheckboxGroup = /* @__PURE__ */ _export_sfc(_sfc_main$10, [["__scopeId", "data-v-43978315"]]);
38875
+ const BmsInputCheckboxGroup = /* @__PURE__ */ _export_sfc(_sfc_main$11, [["__scopeId", "data-v-43978315"]]);
38865
38876
 
38866
- const _sfc_main$$ = /* @__PURE__ */ vue.defineComponent({
38877
+ const _sfc_main$10 = /* @__PURE__ */ vue.defineComponent({
38867
38878
  __name: "BmsInputCheckboxCaption",
38868
38879
  props: {
38869
38880
  modelValue: {},
@@ -38939,9 +38950,9 @@
38939
38950
  }
38940
38951
  });
38941
38952
 
38942
- const BmsInputCheckboxCaption = /* @__PURE__ */ _export_sfc(_sfc_main$$, [["__scopeId", "data-v-6cb7c474"]]);
38953
+ const BmsInputCheckboxCaption = /* @__PURE__ */ _export_sfc(_sfc_main$10, [["__scopeId", "data-v-6cb7c474"]]);
38943
38954
 
38944
- const _sfc_main$_ = /* @__PURE__ */ vue.defineComponent({
38955
+ const _sfc_main$$ = /* @__PURE__ */ vue.defineComponent({
38945
38956
  __name: "BmsInputCheckboxCaptionGroup",
38946
38957
  props: {
38947
38958
  options: { default: () => [] },
@@ -38996,7 +39007,7 @@
38996
39007
  }
38997
39008
  });
38998
39009
 
38999
- const BmsInputCheckboxCaptionGroup = /* @__PURE__ */ _export_sfc(_sfc_main$_, [["__scopeId", "data-v-4183cc04"]]);
39010
+ const BmsInputCheckboxCaptionGroup = /* @__PURE__ */ _export_sfc(_sfc_main$$, [["__scopeId", "data-v-4183cc04"]]);
39000
39011
 
39001
39012
  /**
39002
39013
  The default maximum length of a `TreeBuffer` node.
@@ -67532,7 +67543,7 @@
67532
67543
  var h=Object.freeze({autofocus:false,disabled:false,indentWithTab:true,tabSize:2,placeholder:"",autoDestroy:true,extensions:[basicSetup]}),y=Symbol("vue-codemirror-global-config");var O,j=function(e){var t=e.onUpdate,n=e.onChange,o=e.onFocus,r=e.onBlur,u=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]]);}return n}(e,["onUpdate","onChange","onFocus","onBlur"]);return EditorState.create({doc:u.doc,selection:u.selection,extensions:(Array.isArray(u.extensions)?u.extensions:[u.extensions]).concat([EditorView.updateListener.of((function(e){t(e),e.docChanged&&n(e.state.doc.toString(),e),e.focusChanged&&(e.view.hasFocus?o(e):r(e));}))])})},S=function(e){var t=new Compartment;return {compartment:t,run:function(n){t.get(e.state)?e.dispatch({effects:t.reconfigure(n)}):e.dispatch({effects:StateEffect.appendConfig.of(t.of(n))});}}},x=function(e,t){var n=S(e),o=n.compartment,r=n.run;return function(n){var u=o.get(e.state);r((null!=n?n:u!==t)?t:[]);}},C={type:Boolean,default:void 0},D={autofocus:C,disabled:C,indentWithTab:C,tabSize:Number,placeholder:String,style:Object,autoDestroy:C,phrases:Object,root:Object,extensions:Array,selection:Object},U={modelValue:{type:String,default:""}},w=Object.assign(Object.assign({},D),U);!function(e){e.Change="change",e.Update="update",e.Focus="focus",e.Blur="blur",e.Ready="ready",e.ModelUpdate="update:modelValue";}(O||(O={}));var z={};z[O.Change]=function(e,t){return true},z[O.Update]=function(e){return true},z[O.Focus]=function(e){return true},z[O.Blur]=function(e){return true},z[O.Ready]=function(e){return true};var B={};B[O.ModelUpdate]=z[O.Change];var F=Object.assign(Object.assign({},z),B),P=vue.defineComponent({name:"VueCodemirror",props:Object.assign({},w),emits:Object.assign({},F),setup:function(t,s){var f=vue.shallowRef(),d=vue.shallowRef(),C=vue.shallowRef(),D=Object.assign(Object.assign({},h),vue.inject(y,{})),U=vue.computed((function(){var e={};return Object.keys(vue.toRaw(t)).forEach((function(n){var o;"modelValue"!==n&&(e[n]=null!==(o=t[n])&&void 0!==o?o:D[n]);})),e}));return vue.onMounted((function(){var e;d.value=j({doc:t.modelValue,selection:U.value.selection,extensions:null!==(e=D.extensions)&&void 0!==e?e:[],onFocus:function(e){return s.emit(O.Focus,e)},onBlur:function(e){return s.emit(O.Blur,e)},onUpdate:function(e){return s.emit(O.Update,e)},onChange:function(e,n){e!==t.modelValue&&(s.emit(O.Change,e,n),s.emit(O.ModelUpdate,e,n));}}),C.value=function(e){return new EditorView(Object.assign({},e))}({state:d.value,parent:f.value,root:U.value.root});var n=function(e){var t=function(){return e.state.doc.toString()},n=S(e).run,o=x(e,[EditorView.editable.of(false),EditorState.readOnly.of(true)]),r=x(e,keymap.of([indentWithTab])),u=S(e).run,a=S(e).run,i=S(e).run,c=S(e).run;return {focus:function(){return e.focus()},getDoc:t,setDoc:function(n){n!==t()&&e.dispatch({changes:{from:0,to:e.state.doc.length,insert:n}});},reExtensions:n,toggleDisabled:o,toggleIndentWithTab:r,setTabSize:function(e){u([EditorState.tabSize.of(e),indentUnit.of(" ".repeat(e))]);},setPhrases:function(e){a([EditorState.phrases.of(e)]);},setPlaceholder:function(e){i(placeholder(e));},setStyle:function(e){ void 0===e&&(e={}),c(EditorView.theme({"&":Object.assign({},e)}));}}}(C.value);vue.watch((function(){return t.modelValue}),(function(e){e!==n.getDoc()&&n.setDoc(e);})),vue.watch((function(){return t.extensions}),(function(e){return n.reExtensions(e||[])}),{immediate:true}),vue.watch((function(){return U.value.disabled}),(function(e){return n.toggleDisabled(e)}),{immediate:true}),vue.watch((function(){return U.value.indentWithTab}),(function(e){return n.toggleIndentWithTab(e)}),{immediate:true}),vue.watch((function(){return U.value.tabSize}),(function(e){return n.setTabSize(e)}),{immediate:true}),vue.watch((function(){return U.value.phrases}),(function(e){return n.setPhrases(e||{})}),{immediate:true}),vue.watch((function(){return U.value.placeholder}),(function(e){return n.setPlaceholder(e)}),{immediate:true}),vue.watch((function(){return U.value.style}),(function(e){return n.setStyle(e)}),{immediate:true}),U.value.autofocus&&n.focus(),s.emit(O.Ready,{state:d.value,view:C.value,container:f.value});})),vue.onBeforeUnmount((function(){U.value.autoDestroy&&C.value&&function(e){e.destroy();}(C.value);})),function(){return vue.h("div",{class:"v-codemirror",style:{display:"contents"},ref:f})}}}),T=P;
67533
67544
 
67534
67545
  const _hoisted_1$K = { class: "code-mirror" };
67535
- const _sfc_main$Z = /* @__PURE__ */ vue.defineComponent({
67546
+ const _sfc_main$_ = /* @__PURE__ */ vue.defineComponent({
67536
67547
  __name: "BmsInputCode",
67537
67548
  props: /* @__PURE__ */ vue.mergeModels({
67538
67549
  type: {},
@@ -67582,14 +67593,18 @@
67582
67593
  }
67583
67594
  });
67584
67595
 
67585
- const BmsInputCode = /* @__PURE__ */ _export_sfc(_sfc_main$Z, [["__scopeId", "data-v-b2a2a2fa"]]);
67596
+ const BmsInputCode = /* @__PURE__ */ _export_sfc(_sfc_main$_, [["__scopeId", "data-v-b2a2a2fa"]]);
67586
67597
 
67587
- const _sfc_main$Y = /* @__PURE__ */ vue.defineComponent({
67598
+ const _sfc_main$Z = /* @__PURE__ */ vue.defineComponent({
67588
67599
  __name: "BmsInputText",
67589
67600
  props: {
67590
67601
  inputType: { default: InputType.TEXT },
67591
67602
  modelValue: {},
67592
67603
  placeholder: {},
67604
+ min: {},
67605
+ max: {},
67606
+ minlength: {},
67607
+ maxlength: {},
67593
67608
  label: { default: "" },
67594
67609
  required: { type: Boolean, default: false },
67595
67610
  optional: { type: Boolean },
@@ -67599,11 +67614,47 @@
67599
67614
  disabled: { type: Boolean, default: false },
67600
67615
  small: { type: Boolean }
67601
67616
  },
67602
- emits: ["update:modelValue", "blur"],
67617
+ emits: ["update:modelValue", "blur", "focus"],
67603
67618
  setup(__props, { expose: __expose, emit: __emit }) {
67604
67619
  const props = __props;
67605
67620
  const input = vue.ref(null);
67621
+ const internalErrors = vue.ref([]);
67622
+ const computedErrors = vue.computed(() => {
67623
+ return props.errors ? internalErrors.value.concat(props.errors) : internalErrors.value;
67624
+ });
67625
+ const internalCaptions = vue.ref([]);
67626
+ const computedCaptions = vue.computed(() => {
67627
+ return props.captions ? internalCaptions.value.concat(props.captions) : internalCaptions.value;
67628
+ });
67629
+ vue.onMounted(() => {
67630
+ checkLimit();
67631
+ });
67606
67632
  const $emits = __emit;
67633
+ const checkLimit = () => {
67634
+ internalErrors.value = [];
67635
+ internalCaptions.value = [];
67636
+ if (props.inputType === InputType.TEXT && typeof props.modelValue === "string") {
67637
+ if (props.minlength !== void 0 && props.modelValue.length < props.minlength) {
67638
+ internalErrors.value = [
67639
+ "Longueur inférieur au minimum autorisé (min:" + props.minlength + ")"
67640
+ ];
67641
+ }
67642
+ if (props.maxlength !== void 0) {
67643
+ if (props.modelValue.length > props.maxlength) {
67644
+ internalErrors.value = [
67645
+ `Longueur supérieure au maximum autorisé (max:${props.maxlength})`
67646
+ ];
67647
+ } else if (props.modelValue.length === props.maxlength) {
67648
+ internalCaptions.value = [
67649
+ {
67650
+ label: `Attention, vous avez atteint la limite de ${props.maxlength} caractères.`,
67651
+ mode: StatusType.Warning
67652
+ }
67653
+ ];
67654
+ }
67655
+ }
67656
+ }
67657
+ };
67607
67658
  const setFocus = () => {
67608
67659
  if (input.value) {
67609
67660
  input.value.setFocus();
@@ -67612,28 +67663,35 @@
67612
67663
  __expose({
67613
67664
  setFocus
67614
67665
  });
67615
- const onInput = (e) => {
67616
- if (!props.disabled)
67617
- $emits("update:modelValue", (e?.target).value);
67618
- };
67666
+ vue.watch(
67667
+ () => props.modelValue,
67668
+ () => checkLimit()
67669
+ );
67619
67670
  return (_ctx, _cache) => {
67620
67671
  const _component_field = vue.resolveComponent("field");
67621
- return vue.openBlock(), vue.createBlock(_component_field, vue.normalizeProps(vue.guardReactiveProps(_ctx.$props)), {
67672
+ return vue.openBlock(), vue.createBlock(_component_field, vue.mergeProps(_ctx.$props, {
67673
+ captions: computedCaptions.value,
67674
+ errors: computedErrors.value
67675
+ }), {
67622
67676
  default: vue.withCtx(() => [
67623
67677
  vue.createVNode(RawInputText, {
67624
67678
  ref_key: "input",
67625
67679
  ref: input,
67626
67680
  type: _ctx.inputType,
67627
67681
  modelValue: _ctx.modelValue,
67682
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = (val) => $emits("update:modelValue", val)),
67628
67683
  required: _ctx.required,
67629
67684
  placeholder: _ctx.placeholder,
67630
67685
  disabled: _ctx.disabled,
67631
- errors: _ctx.errors,
67686
+ errors: computedErrors.value,
67632
67687
  hasDate: false,
67633
67688
  small: _ctx.small,
67634
- onBlur: _cache[0] || (_cache[0] = ($event) => $emits("blur")),
67635
- onInput,
67636
- onKeyup: onInput
67689
+ min: _ctx.min,
67690
+ max: _ctx.max,
67691
+ minlength: _ctx.minlength,
67692
+ maxlength: _ctx.maxlength,
67693
+ onBlur: _cache[1] || (_cache[1] = ($event) => $emits("blur")),
67694
+ onFocus: _cache[2] || (_cache[2] = ($event) => $emits("focus"))
67637
67695
  }, {
67638
67696
  "icon-start": vue.withCtx(() => [
67639
67697
  vue.renderSlot(_ctx.$slots, "icon-start")
@@ -67642,15 +67700,15 @@
67642
67700
  vue.renderSlot(_ctx.$slots, "icon-end")
67643
67701
  ]),
67644
67702
  _: 3
67645
- }, 8, ["type", "modelValue", "required", "placeholder", "disabled", "errors", "small"])
67703
+ }, 8, ["type", "modelValue", "required", "placeholder", "disabled", "errors", "small", "min", "max", "minlength", "maxlength"])
67646
67704
  ]),
67647
67705
  _: 3
67648
- }, 16);
67706
+ }, 16, ["captions", "errors"]);
67649
67707
  };
67650
67708
  }
67651
67709
  });
67652
67710
 
67653
- const _sfc_main$X = /* @__PURE__ */ vue.defineComponent({
67711
+ const _sfc_main$Y = /* @__PURE__ */ vue.defineComponent({
67654
67712
  __name: "BmsInputDateTime",
67655
67713
  props: {
67656
67714
  modelValue: {},
@@ -67676,7 +67734,7 @@
67676
67734
  if (!props.disabled && value) $emits("update:modelValue", value);
67677
67735
  };
67678
67736
  return (_ctx, _cache) => {
67679
- return vue.openBlock(), vue.createBlock(_sfc_main$Y, {
67737
+ return vue.openBlock(), vue.createBlock(_sfc_main$Z, {
67680
67738
  modelValue: _ctx.modelValue,
67681
67739
  label: _ctx.label,
67682
67740
  required: _ctx.required,
@@ -67699,7 +67757,7 @@
67699
67757
  key: 1,
67700
67758
  class: "file-upload__file-name"
67701
67759
  };
67702
- const _sfc_main$W = /* @__PURE__ */ vue.defineComponent({
67760
+ const _sfc_main$X = /* @__PURE__ */ vue.defineComponent({
67703
67761
  __name: "BmsInputFile",
67704
67762
  props: {
67705
67763
  modelValue: {},
@@ -67853,7 +67911,7 @@
67853
67911
  src: getImageSrc(file),
67854
67912
  class: "file-upload__file-img"
67855
67913
  }, null, 8, _hoisted_2$s)) : (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$e, vue.toDisplayString(file.name), 1)),
67856
- vue.createVNode(_sfc_main$1h, {
67914
+ vue.createVNode(_sfc_main$1i, {
67857
67915
  mode: vue.unref(StatusType).Danger,
67858
67916
  onClick: vue.withModifiers(($event) => onDeleteFile(file), ["prevent"]),
67859
67917
  class: "close-button"
@@ -67873,9 +67931,9 @@
67873
67931
  }
67874
67932
  });
67875
67933
 
67876
- const BmsInputFile = /* @__PURE__ */ _export_sfc(_sfc_main$W, [["__scopeId", "data-v-0c91cbf5"]]);
67934
+ const BmsInputFile = /* @__PURE__ */ _export_sfc(_sfc_main$X, [["__scopeId", "data-v-0c91cbf5"]]);
67877
67935
 
67878
- const _sfc_main$V = /* @__PURE__ */ vue.defineComponent({
67936
+ const _sfc_main$W = /* @__PURE__ */ vue.defineComponent({
67879
67937
  __name: "BmsInputNumber",
67880
67938
  props: {
67881
67939
  modelValue: {},
@@ -67894,6 +67952,13 @@
67894
67952
  setup(__props, { expose: __expose, emit: __emit }) {
67895
67953
  const props = __props;
67896
67954
  const input = vue.ref(null);
67955
+ const internalErrors = vue.ref([]);
67956
+ const computedErrors = vue.computed(() => {
67957
+ return props.errors ? internalErrors.value.concat(props.errors) : internalErrors.value;
67958
+ });
67959
+ vue.onMounted(() => {
67960
+ checkLimit();
67961
+ });
67897
67962
  const $emits = __emit;
67898
67963
  const onInput = (e) => {
67899
67964
  if (!props.disabled)
@@ -67902,6 +67967,19 @@
67902
67967
  vue.computed(() => {
67903
67968
  return { "is-error": props.errors?.length, "is-disabled": props.disabled };
67904
67969
  });
67970
+ const checkLimit = () => {
67971
+ internalErrors.value = [];
67972
+ if (props.min !== void 0 && props.modelValue < props.min) {
67973
+ internalErrors.value = [
67974
+ "Valeur inférieure au minimum autorisé (min : " + props.min + ")"
67975
+ ];
67976
+ }
67977
+ if (props.max !== void 0 && props.modelValue > props.max) {
67978
+ internalErrors.value = [
67979
+ "Valeur supérieure au maximum autorisé (max : " + props.max + ")"
67980
+ ];
67981
+ }
67982
+ };
67905
67983
  const setFocus = () => {
67906
67984
  if (input.value) {
67907
67985
  input.value.focus();
@@ -67910,8 +67988,12 @@
67910
67988
  __expose({
67911
67989
  setFocus
67912
67990
  });
67991
+ vue.watch(
67992
+ () => props.modelValue,
67993
+ () => checkLimit()
67994
+ );
67913
67995
  return (_ctx, _cache) => {
67914
- return vue.openBlock(), vue.createBlock(_sfc_main$Y, {
67996
+ return vue.openBlock(), vue.createBlock(_sfc_main$Z, {
67915
67997
  modelValue: _ctx.modelValue,
67916
67998
  label: _ctx.label,
67917
67999
  required: _ctx.required,
@@ -67920,10 +68002,12 @@
67920
68002
  helperText: _ctx.helperText,
67921
68003
  placeholder: _ctx.placeholder,
67922
68004
  captions: _ctx.captions,
67923
- errors: _ctx.errors,
68005
+ errors: computedErrors.value,
67924
68006
  inputType: vue.unref(InputType).NUMBER,
68007
+ min: _ctx.min,
68008
+ max: _ctx.max,
67925
68009
  onInput
67926
- }, null, 8, ["modelValue", "label", "required", "optional", "disabled", "helperText", "placeholder", "captions", "errors", "inputType"]);
68010
+ }, null, 8, ["modelValue", "label", "required", "optional", "disabled", "helperText", "placeholder", "captions", "errors", "inputType", "min", "max"]);
67927
68011
  };
67928
68012
  }
67929
68013
  });
@@ -67933,7 +68017,7 @@
67933
68017
  key: 0,
67934
68018
  class: "input-radio-info"
67935
68019
  };
67936
- const _sfc_main$U = /* @__PURE__ */ vue.defineComponent({
68020
+ const _sfc_main$V = /* @__PURE__ */ vue.defineComponent({
67937
68021
  __name: "BmsInputRadio",
67938
68022
  props: {
67939
68023
  modelValue: {},
@@ -67984,9 +68068,9 @@
67984
68068
  }
67985
68069
  });
67986
68070
 
67987
- const BmsInputRadio = /* @__PURE__ */ _export_sfc(_sfc_main$U, [["__scopeId", "data-v-cb26402d"]]);
68071
+ const BmsInputRadio = /* @__PURE__ */ _export_sfc(_sfc_main$V, [["__scopeId", "data-v-c0c9efa3"]]);
67988
68072
 
67989
- const _sfc_main$T = /* @__PURE__ */ vue.defineComponent({
68073
+ const _sfc_main$U = /* @__PURE__ */ vue.defineComponent({
67990
68074
  __name: "BmsInputRadioGroup",
67991
68075
  props: {
67992
68076
  values: { default: () => [] },
@@ -68055,9 +68139,9 @@
68055
68139
  }
68056
68140
  });
68057
68141
 
68058
- const BmsInputRadioGroup = /* @__PURE__ */ _export_sfc(_sfc_main$T, [["__scopeId", "data-v-186163e2"]]);
68142
+ const BmsInputRadioGroup = /* @__PURE__ */ _export_sfc(_sfc_main$U, [["__scopeId", "data-v-186163e2"]]);
68059
68143
 
68060
- const _sfc_main$S = /* @__PURE__ */ vue.defineComponent({
68144
+ const _sfc_main$T = /* @__PURE__ */ vue.defineComponent({
68061
68145
  __name: "BmsInputRadioCaption",
68062
68146
  props: {
68063
68147
  modelValue: {},
@@ -68119,9 +68203,9 @@
68119
68203
  }
68120
68204
  });
68121
68205
 
68122
- const BmsInputRadioCaption = /* @__PURE__ */ _export_sfc(_sfc_main$S, [["__scopeId", "data-v-c3ba4fee"]]);
68206
+ const BmsInputRadioCaption = /* @__PURE__ */ _export_sfc(_sfc_main$T, [["__scopeId", "data-v-c3ba4fee"]]);
68123
68207
 
68124
- const _sfc_main$R = /* @__PURE__ */ vue.defineComponent({
68208
+ const _sfc_main$S = /* @__PURE__ */ vue.defineComponent({
68125
68209
  __name: "BmsInputRadioCaptionGroup",
68126
68210
  props: {
68127
68211
  options: { default: () => [] },
@@ -68179,10 +68263,10 @@
68179
68263
  }
68180
68264
  });
68181
68265
 
68182
- const BmsInputRadioCaptionGroup = /* @__PURE__ */ _export_sfc(_sfc_main$R, [["__scopeId", "data-v-a4287904"]]);
68266
+ const BmsInputRadioCaptionGroup = /* @__PURE__ */ _export_sfc(_sfc_main$S, [["__scopeId", "data-v-a4287904"]]);
68183
68267
 
68184
68268
  const _hoisted_1$H = ["disabled", "name"];
68185
- const _sfc_main$Q = /* @__PURE__ */ vue.defineComponent({
68269
+ const _sfc_main$R = /* @__PURE__ */ vue.defineComponent({
68186
68270
  __name: "UiBmsSwitch",
68187
68271
  props: {
68188
68272
  disabled: { type: Boolean, default: false },
@@ -68219,10 +68303,10 @@
68219
68303
  }
68220
68304
  });
68221
68305
 
68222
- const UiBmsSwitch = /* @__PURE__ */ _export_sfc(_sfc_main$Q, [["__scopeId", "data-v-19745934"]]);
68306
+ const UiBmsSwitch = /* @__PURE__ */ _export_sfc(_sfc_main$R, [["__scopeId", "data-v-19745934"]]);
68223
68307
 
68224
68308
  const _hoisted_1$G = { class: "input-switch-info" };
68225
- const _sfc_main$P = /* @__PURE__ */ vue.defineComponent({
68309
+ const _sfc_main$Q = /* @__PURE__ */ vue.defineComponent({
68226
68310
  __name: "BmsInputToggle",
68227
68311
  props: {
68228
68312
  name: {},
@@ -68263,7 +68347,302 @@
68263
68347
  }
68264
68348
  });
68265
68349
 
68266
- const BmsInputToggle = /* @__PURE__ */ _export_sfc(_sfc_main$P, [["__scopeId", "data-v-9570e0a9"]]);
68350
+ const BmsInputToggle = /* @__PURE__ */ _export_sfc(_sfc_main$Q, [["__scopeId", "data-v-9570e0a9"]]);
68351
+
68352
+ const _hoisted_1$F = { class: "dismiss-button" };
68353
+ const _sfc_main$P = /* @__PURE__ */ vue.defineComponent({
68354
+ __name: "BmsTag",
68355
+ props: {
68356
+ active: { type: Boolean, default: false },
68357
+ disabled: { type: Boolean, default: false },
68358
+ canBeDismissed: { type: Boolean, default: true },
68359
+ small: { type: Boolean }
68360
+ },
68361
+ emits: ["dismiss", "click"],
68362
+ setup(__props, { emit: __emit }) {
68363
+ const emits = __emit;
68364
+ return (_ctx, _cache) => {
68365
+ return vue.openBlock(), vue.createElementBlock("div", {
68366
+ class: vue.normalizeClass(["tag", { active: _ctx.active, disabled: _ctx.disabled, small: _ctx.small }]),
68367
+ onClick: _cache[1] || (_cache[1] = ($event) => emits("click"))
68368
+ }, [
68369
+ vue.renderSlot(_ctx.$slots, "default", {}, void 0, true),
68370
+ vue.createElementVNode("span", _hoisted_1$F, [
68371
+ _ctx.canBeDismissed ? (vue.openBlock(), vue.createBlock(vue.unref(_sfc_main$1i), {
68372
+ key: 0,
68373
+ onClick: _cache[0] || (_cache[0] = vue.withModifiers(($event) => emits("dismiss"), ["stop"]))
68374
+ }, {
68375
+ default: vue.withCtx(() => [
68376
+ vue.renderSlot(_ctx.$slots, "closeIcon", {}, () => [
68377
+ vue.createVNode(vue.unref(X))
68378
+ ], true)
68379
+ ]),
68380
+ _: 3
68381
+ })) : vue.createCommentVNode("", true)
68382
+ ])
68383
+ ], 2);
68384
+ };
68385
+ }
68386
+ });
68387
+
68388
+ const BmsTag = /* @__PURE__ */ _export_sfc(_sfc_main$P, [["__scopeId", "data-v-e2517fee"]]);
68389
+
68390
+ const _sfc_main$O = /* @__PURE__ */ vue.defineComponent({
68391
+ __name: "RawSelect",
68392
+ props: {
68393
+ options: {},
68394
+ optional: { type: Boolean },
68395
+ placeholder: {},
68396
+ open: { type: Boolean, default: false },
68397
+ label: { default: "" },
68398
+ required: { type: Boolean, default: false },
68399
+ helperText: {},
68400
+ errors: {},
68401
+ captions: {},
68402
+ disabled: { type: Boolean, default: false },
68403
+ small: { type: Boolean, default: false }
68404
+ },
68405
+ emits: ["select"],
68406
+ setup(__props, { emit: __emit }) {
68407
+ const props = __props;
68408
+ const emits = __emit;
68409
+ const classes = vue.computed(() => {
68410
+ return { "is-error": props.errors?.length, "is-disabled": props.disabled };
68411
+ });
68412
+ const selectItem = (option) => {
68413
+ emits("select", option);
68414
+ };
68415
+ return (_ctx, _cache) => {
68416
+ const _component_field = vue.resolveComponent("field");
68417
+ return vue.openBlock(), vue.createBlock(_component_field, vue.normalizeProps(vue.guardReactiveProps(_ctx.$props)), {
68418
+ datalist: vue.withCtx(() => [
68419
+ vue.withDirectives(vue.createVNode(FieldDatalist, {
68420
+ options: _ctx.options,
68421
+ "is-input-focused": _ctx.open,
68422
+ small: _ctx.small,
68423
+ onSelect: selectItem
68424
+ }, {
68425
+ option: vue.withCtx(({ option }) => [
68426
+ vue.renderSlot(_ctx.$slots, "option", { option }, void 0, true)
68427
+ ]),
68428
+ _: 3
68429
+ }, 8, ["options", "is-input-focused", "small"]), [
68430
+ [vue.vShow, _ctx.open]
68431
+ ])
68432
+ ]),
68433
+ default: vue.withCtx(() => [
68434
+ vue.createElementVNode("span", {
68435
+ class: vue.normalizeClass(["select-wrapper", classes.value])
68436
+ }, [
68437
+ vue.renderSlot(_ctx.$slots, "input", {}, void 0, true)
68438
+ ], 2)
68439
+ ]),
68440
+ _: 3
68441
+ }, 16);
68442
+ };
68443
+ }
68444
+ });
68445
+
68446
+ const RawSelect = /* @__PURE__ */ _export_sfc(_sfc_main$O, [["__scopeId", "data-v-95176719"]]);
68447
+
68448
+ const _hoisted_1$E = { class: "tags" };
68449
+ const _hoisted_2$q = { class: "icon-container" };
68450
+ const _sfc_main$N = /* @__PURE__ */ vue.defineComponent({
68451
+ __name: "BmsMultiSelect",
68452
+ props: /* @__PURE__ */ vue.mergeModels({
68453
+ options: {},
68454
+ placeholder: {},
68455
+ label: { default: "" },
68456
+ required: { type: Boolean, default: false },
68457
+ optional: { type: Boolean },
68458
+ helperText: {},
68459
+ errors: {},
68460
+ captions: {},
68461
+ disabled: { type: Boolean, default: false },
68462
+ small: { type: Boolean }
68463
+ }, {
68464
+ "modelValue": {
68465
+ required: true
68466
+ },
68467
+ "modelModifiers": {}
68468
+ }),
68469
+ emits: ["update:modelValue"],
68470
+ setup(__props) {
68471
+ const props = __props;
68472
+ const inputElement = vue.useTemplateRef("inputElement");
68473
+ const isDatalistOpen = vue.ref(false);
68474
+ const closeDatalist = () => isDatalistOpen.value = false;
68475
+ const openDatalist = () => isDatalistOpen.value = true;
68476
+ const searching = vue.ref("");
68477
+ const modelValue = vue.useModel(__props, "modelValue");
68478
+ const onBackspace = () => {
68479
+ modelValue.value.splice(-1);
68480
+ };
68481
+ const setFocus = () => {
68482
+ if (inputElement.value) {
68483
+ inputElement.value.focus();
68484
+ }
68485
+ };
68486
+ const onSelect = (option) => {
68487
+ modelValue.value.push(option);
68488
+ searching.value = "";
68489
+ setFocus();
68490
+ closeDatalist();
68491
+ };
68492
+ const removeOption = (value) => {
68493
+ modelValue.value = modelValue.value.filter((o) => o.value !== value);
68494
+ };
68495
+ const clearInput = () => {
68496
+ modelValue.value = [];
68497
+ searching.value = "";
68498
+ };
68499
+ const displayedOptions = vue.computed(
68500
+ () => props.options.filter((o) => searchString(o.label, searching.value)).filter(
68501
+ (o) => !modelValue.value.find((option) => option.value === o.value)
68502
+ )
68503
+ );
68504
+ const displayValues = vue.computed(
68505
+ () => modelValue.value.filter(
68506
+ (o) => props.options.find((option) => option.value === o.value)
68507
+ )
68508
+ );
68509
+ return (_ctx, _cache) => {
68510
+ return vue.openBlock(), vue.createBlock(RawSelect, vue.mergeProps(_ctx.$props, {
68511
+ options: displayedOptions.value,
68512
+ "model-value": modelValue.value,
68513
+ open: isDatalistOpen.value,
68514
+ onSelect
68515
+ }), {
68516
+ input: vue.withCtx(() => [
68517
+ vue.createElementVNode("div", _hoisted_1$E, [
68518
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(displayValues.value, (tag) => {
68519
+ return vue.openBlock(), vue.createBlock(BmsTag, {
68520
+ small: _ctx.small,
68521
+ active: "",
68522
+ onDismiss: ($event) => removeOption(tag.value)
68523
+ }, {
68524
+ default: vue.withCtx(() => [
68525
+ tag?.icon ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(tag.icon), { key: 0 })) : vue.createCommentVNode("", true),
68526
+ vue.createTextVNode(" " + vue.toDisplayString(tag.label), 1)
68527
+ ]),
68528
+ _: 2
68529
+ }, 1032, ["small", "onDismiss"]);
68530
+ }), 256)),
68531
+ vue.withDirectives(vue.createElementVNode("input", {
68532
+ type: "text",
68533
+ ref_key: "inputElement",
68534
+ ref: inputElement,
68535
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => searching.value = $event),
68536
+ class: "search",
68537
+ onFocus: openDatalist,
68538
+ onClick: openDatalist,
68539
+ onKeyup: [
68540
+ vue.withKeys(openDatalist, ["down"]),
68541
+ vue.withKeys(onBackspace, ["backspace"])
68542
+ ],
68543
+ onInput: openDatalist
68544
+ }, null, 544), [
68545
+ [vue.vModelText, searching.value]
68546
+ ])
68547
+ ]),
68548
+ vue.createElementVNode("span", _hoisted_2$q, [
68549
+ modelValue.value.length ? (vue.openBlock(), vue.createBlock(vue.unref(X), {
68550
+ key: 0,
68551
+ class: "icon icon-clear",
68552
+ onClick: vue.withModifiers(clearInput, ["stop"])
68553
+ })) : (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
68554
+ isDatalistOpen.value ? (vue.openBlock(), vue.createBlock(vue.unref(ChevronUp), {
68555
+ key: 0,
68556
+ class: "icon icon-toggle-button",
68557
+ onClick: closeDatalist
68558
+ })) : (vue.openBlock(), vue.createBlock(vue.unref(ChevronDown), {
68559
+ key: 1,
68560
+ class: "icon icon-toggle-button",
68561
+ onClick: openDatalist
68562
+ }))
68563
+ ], 64))
68564
+ ])
68565
+ ]),
68566
+ option: vue.withCtx(({ option }) => [
68567
+ vue.createVNode(BmsTag, {
68568
+ active: "",
68569
+ "can-be-dismissed": false
68570
+ }, {
68571
+ default: vue.withCtx(() => [
68572
+ option?.icon ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(option.icon), { key: 0 })) : vue.createCommentVNode("", true),
68573
+ vue.createTextVNode(" " + vue.toDisplayString(option.label), 1)
68574
+ ]),
68575
+ _: 2
68576
+ }, 1024)
68577
+ ]),
68578
+ _: 1
68579
+ }, 16, ["options", "model-value", "open"]);
68580
+ };
68581
+ }
68582
+ });
68583
+
68584
+ const BmsMultiSelect = /* @__PURE__ */ _export_sfc(_sfc_main$N, [["__scopeId", "data-v-89613f32"]]);
68585
+
68586
+ const _sfc_main$M = /* @__PURE__ */ vue.defineComponent({
68587
+ __name: "BmsSearch",
68588
+ props: {
68589
+ modelValue: {},
68590
+ placeholder: { default: "Rechercher..." },
68591
+ disabled: { type: Boolean },
68592
+ errors: {}
68593
+ },
68594
+ emits: ["update:modelValue"],
68595
+ setup(__props, { expose: __expose, emit: __emit }) {
68596
+ const input = vue.ref(null);
68597
+ const props = __props;
68598
+ const emit = __emit;
68599
+ const search = vue.computed({
68600
+ get() {
68601
+ return props.modelValue;
68602
+ },
68603
+ set(value) {
68604
+ emit("update:modelValue", value);
68605
+ }
68606
+ });
68607
+ const setFocus = () => {
68608
+ if (input.value) {
68609
+ input.value.setFocus();
68610
+ }
68611
+ };
68612
+ __expose({
68613
+ setFocus
68614
+ });
68615
+ return (_ctx, _cache) => {
68616
+ return vue.openBlock(), vue.createBlock(_sfc_main$Z, {
68617
+ ref_key: "input",
68618
+ ref: input,
68619
+ modelValue: search.value,
68620
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => search.value = $event),
68621
+ placeholder: _ctx.placeholder,
68622
+ errors: _ctx.errors,
68623
+ disabled: _ctx.disabled
68624
+ }, vue.createSlots({
68625
+ "icon-start": vue.withCtx(() => [
68626
+ vue.createVNode(vue.unref(Search))
68627
+ ]),
68628
+ _: 2
68629
+ }, [
68630
+ search.value && !_ctx.disabled ? {
68631
+ name: "icon-end",
68632
+ fn: vue.withCtx(() => [
68633
+ vue.createVNode(vue.unref(X), {
68634
+ class: "clean-icon",
68635
+ onClick: _cache[0] || (_cache[0] = ($event) => search.value = "")
68636
+ })
68637
+ ]),
68638
+ key: "0"
68639
+ } : void 0
68640
+ ]), 1032, ["modelValue", "placeholder", "errors", "disabled"]);
68641
+ };
68642
+ }
68643
+ });
68644
+
68645
+ const BmsSearch = /* @__PURE__ */ _export_sfc(_sfc_main$M, [["__scopeId", "data-v-66c267f2"]]);
68267
68646
 
68268
68647
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
68269
68648
 
@@ -85483,14 +85862,15 @@
85483
85862
  var lodashExports = requireLodash();
85484
85863
  const _ = /*@__PURE__*/getDefaultExportFromCjs(lodashExports);
85485
85864
 
85486
- const _hoisted_1$F = ["value", "placeholder", "required"];
85487
- const _hoisted_2$q = { class: "icon-down-container" };
85488
- const _sfc_main$O = /* @__PURE__ */ vue.defineComponent({
85865
+ const _hoisted_1$D = ["value", "placeholder", "required"];
85866
+ const _hoisted_2$p = { class: "icon-toggle-container" };
85867
+ const _sfc_main$L = /* @__PURE__ */ vue.defineComponent({
85489
85868
  __name: "BmsSelect",
85490
85869
  props: /* @__PURE__ */ vue.mergeModels({
85491
85870
  options: {},
85492
85871
  optional: { type: Boolean },
85493
85872
  placeholder: {},
85873
+ open: { type: Boolean, default: false },
85494
85874
  label: { default: "" },
85495
85875
  required: { type: Boolean, default: false },
85496
85876
  helperText: {},
@@ -85500,29 +85880,24 @@
85500
85880
  small: { type: Boolean, default: false }
85501
85881
  }, {
85502
85882
  "modelValue": { required: true },
85503
- "modelModifiers": {},
85504
- "open": { type: Boolean, ...{ default: false } },
85505
- "openModifiers": {}
85883
+ "modelModifiers": {}
85506
85884
  }),
85507
- emits: ["update:modelValue", "update:open"],
85508
- setup(__props, { expose: __expose }) {
85885
+ emits: /* @__PURE__ */ vue.mergeModels(["select"], ["update:modelValue"]),
85886
+ setup(__props, { expose: __expose, emit: __emit }) {
85509
85887
  const props = __props;
85510
85888
  const modelValue = vue.useModel(__props, "modelValue");
85511
- const open = vue.useModel(__props, "open");
85512
- const selectInput = vue.ref(null);
85513
- const selectWrapper = vue.ref(null);
85514
- const classes = vue.computed(() => {
85515
- return { "is-error": props.errors?.length, "is-disabled": props.disabled };
85516
- });
85517
- vue.onMounted(() => {
85518
- document.body.addEventListener("click", (ev) => {
85519
- if (ev.target.closest(".select-wrapper") === selectWrapper.value) {
85520
- open.value = !open.value;
85521
- ev.stopPropagation();
85522
- } else {
85523
- open.value = false;
85524
- }
85525
- });
85889
+ const inputElement = vue.useTemplateRef("inputElement");
85890
+ const isDatalistOpen = vue.ref(props.open);
85891
+ const closeDatalist = () => {
85892
+ isDatalistOpen.value = false;
85893
+ };
85894
+ const openDatalist = () => {
85895
+ isDatalistOpen.value = true;
85896
+ setFocus();
85897
+ };
85898
+ const emits = __emit;
85899
+ onClickOutside(inputElement, () => closeDatalist, {
85900
+ ignore: [".datalist-option", ".icon-toggle-button"]
85526
85901
  });
85527
85902
  const displayValue = vue.computed(() => {
85528
85903
  const option = props.options.find(
@@ -85531,277 +85906,59 @@
85531
85906
  if (option) return option.label;
85532
85907
  return "";
85533
85908
  });
85534
- const selectItem = (option) => {
85535
- modelValue.value = option.value;
85536
- setFocus();
85537
- open.value = false;
85538
- };
85539
85909
  const setFocus = () => {
85540
- open.value = true;
85541
- if (selectInput.value) {
85542
- selectInput.value.focus();
85910
+ if (inputElement.value) {
85911
+ inputElement.value.focus();
85543
85912
  }
85544
85913
  };
85914
+ const onSelect = (option) => {
85915
+ modelValue.value = option.value;
85916
+ emits("select", option.value);
85917
+ setFocus();
85918
+ closeDatalist();
85919
+ };
85545
85920
  __expose({
85546
85921
  setFocus
85547
85922
  });
85548
85923
  return (_ctx, _cache) => {
85549
- const _component_field = vue.resolveComponent("field");
85550
- return vue.openBlock(), vue.createBlock(_component_field, vue.normalizeProps(vue.guardReactiveProps(_ctx.$props)), {
85551
- datalist: vue.withCtx(() => [
85552
- vue.withDirectives(vue.createVNode(FieldDatalist, {
85553
- options: _ctx.options,
85554
- "is-input-focused": open.value,
85555
- small: _ctx.small,
85556
- onSelect: _cache[0] || (_cache[0] = (option) => selectItem(option))
85557
- }, {
85558
- option: vue.withCtx(({ option }) => [
85559
- vue.renderSlot(_ctx.$slots, "option", { option }, void 0, true)
85560
- ]),
85561
- _: 3
85562
- }, 8, ["options", "is-input-focused", "small"]), [
85563
- [vue.vShow, open.value]
85564
- ])
85565
- ]),
85566
- default: vue.withCtx(() => [
85567
- vue.createElementVNode("span", {
85568
- class: vue.normalizeClass(["select-wrapper", classes.value]),
85569
- ref_key: "selectWrapper",
85570
- ref: selectWrapper
85571
- }, [
85572
- vue.renderSlot(_ctx.$slots, "input", {}, () => [
85573
- vue.createElementVNode("input", {
85574
- ref_key: "selectInput",
85575
- ref: selectInput,
85576
- type: "text",
85577
- role: "input",
85578
- value: displayValue.value,
85579
- placeholder: _ctx.placeholder,
85580
- onkeypress: "return false;",
85581
- required: _ctx.required
85582
- }, null, 8, _hoisted_1$F),
85583
- vue.createElementVNode("span", _hoisted_2$q, [
85584
- vue.createVNode(vue.unref(ChevronDown), { class: "icon-down-button" })
85585
- ])
85586
- ], true)
85587
- ], 2)
85588
- ]),
85589
- _: 3
85590
- }, 16);
85591
- };
85592
- }
85593
- });
85594
-
85595
- const BmsSelect = /* @__PURE__ */ _export_sfc(_sfc_main$O, [["__scopeId", "data-v-6e3f7aab"]]);
85596
-
85597
- const _hoisted_1$E = { class: "dismiss-button" };
85598
- const _sfc_main$N = /* @__PURE__ */ vue.defineComponent({
85599
- __name: "BmsTag",
85600
- props: {
85601
- active: { type: Boolean, default: false },
85602
- disabled: { type: Boolean, default: false },
85603
- canBeDismissed: { type: Boolean, default: true },
85604
- small: { type: Boolean }
85605
- },
85606
- emits: ["dismiss", "click"],
85607
- setup(__props, { emit: __emit }) {
85608
- const emits = __emit;
85609
- return (_ctx, _cache) => {
85610
- return vue.openBlock(), vue.createElementBlock("div", {
85611
- class: vue.normalizeClass(["tag", { active: _ctx.active, disabled: _ctx.disabled, small: _ctx.small }]),
85612
- onClick: _cache[1] || (_cache[1] = ($event) => emits("click"))
85613
- }, [
85614
- vue.renderSlot(_ctx.$slots, "default", {}, void 0, true),
85615
- vue.createElementVNode("span", _hoisted_1$E, [
85616
- _ctx.canBeDismissed ? (vue.openBlock(), vue.createBlock(vue.unref(_sfc_main$1h), {
85617
- key: 0,
85618
- onClick: _cache[0] || (_cache[0] = vue.withModifiers(($event) => emits("dismiss"), ["stop"]))
85619
- }, {
85620
- default: vue.withCtx(() => [
85621
- vue.renderSlot(_ctx.$slots, "closeIcon", {}, () => [
85622
- vue.createVNode(vue.unref(X))
85623
- ], true)
85624
- ]),
85625
- _: 3
85626
- })) : vue.createCommentVNode("", true)
85627
- ])
85628
- ], 2);
85629
- };
85630
- }
85631
- });
85632
-
85633
- const BmsTag = /* @__PURE__ */ _export_sfc(_sfc_main$N, [["__scopeId", "data-v-e2517fee"]]);
85634
-
85635
- const _hoisted_1$D = { class: "tags" };
85636
- const _hoisted_2$p = { class: "icon-container" };
85637
- const _sfc_main$M = /* @__PURE__ */ vue.defineComponent({
85638
- __name: "BmsMultiSelect",
85639
- props: /* @__PURE__ */ vue.mergeModels({
85640
- options: {},
85641
- placeholder: {},
85642
- label: { default: "" },
85643
- required: { type: Boolean, default: false },
85644
- optional: { type: Boolean },
85645
- helperText: {},
85646
- errors: {},
85647
- captions: {},
85648
- disabled: { type: Boolean, default: false },
85649
- small: { type: Boolean }
85650
- }, {
85651
- "modelValue": {
85652
- required: true
85653
- },
85654
- "modelModifiers": {}
85655
- }),
85656
- emits: ["update:modelValue"],
85657
- setup(__props) {
85658
- const props = __props;
85659
- const searching = vue.ref("");
85660
- const modelValue = vue.useModel(__props, "modelValue");
85661
- const onSelect = (value) => {
85662
- const option = props.options.find((o) => o.value === value);
85663
- if (option) {
85664
- modelValue.value.push(option);
85665
- searching.value = "";
85666
- }
85667
- };
85668
- const removeOption = (value) => {
85669
- modelValue.value = modelValue.value.filter((o) => o.value !== value);
85670
- };
85671
- const reset = () => {
85672
- modelValue.value = [];
85673
- searching.value = "";
85674
- };
85675
- const displayedOptions = vue.computed(
85676
- () => props.options.filter((o) => searchString(o.label, searching.value)).filter(
85677
- (o) => !modelValue.value.find((option) => option.value === o.value)
85678
- )
85679
- );
85680
- const displayValues = vue.computed(
85681
- () => modelValue.value.filter(
85682
- (o) => props.options.find((option) => option.value === o.value)
85683
- )
85684
- );
85685
- return (_ctx, _cache) => {
85686
- return vue.openBlock(), vue.createBlock(BmsSelect, vue.mergeProps(_ctx.$props, {
85687
- options: displayedOptions.value,
85688
- "model-value": modelValue.value,
85689
- "onUpdate:modelValue": onSelect
85924
+ return vue.openBlock(), vue.createBlock(RawSelect, vue.mergeProps(_ctx.$props, {
85925
+ open: isDatalistOpen.value,
85926
+ onSelect,
85927
+ onClick: setFocus
85690
85928
  }), {
85691
85929
  input: vue.withCtx(() => [
85692
- vue.createElementVNode("div", _hoisted_1$D, [
85693
- (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(displayValues.value, (tag) => {
85694
- return vue.openBlock(), vue.createBlock(BmsTag, {
85695
- small: _ctx.small,
85696
- active: "",
85697
- onDismiss: ($event) => removeOption(tag.value)
85698
- }, {
85699
- default: vue.withCtx(() => [
85700
- tag?.icon ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(tag.icon), { key: 0 })) : vue.createCommentVNode("", true),
85701
- vue.createTextVNode(" " + vue.toDisplayString(tag.label), 1)
85702
- ]),
85703
- _: 2
85704
- }, 1032, ["small", "onDismiss"]);
85705
- }), 256)),
85706
- vue.withDirectives(vue.createElementVNode("input", {
85707
- type: "text",
85708
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => searching.value = $event),
85709
- class: "search"
85710
- }, null, 512), [
85711
- [vue.vModelText, searching.value]
85712
- ])
85713
- ]),
85930
+ vue.createElementVNode("input", {
85931
+ ref_key: "inputElement",
85932
+ ref: inputElement,
85933
+ type: "text",
85934
+ role: "input",
85935
+ readonly: "",
85936
+ value: displayValue.value,
85937
+ placeholder: _ctx.placeholder,
85938
+ required: _ctx.required,
85939
+ onFocus: openDatalist,
85940
+ onClick: openDatalist,
85941
+ onKeyup: vue.withKeys(openDatalist, ["down"])
85942
+ }, null, 40, _hoisted_1$D),
85714
85943
  vue.createElementVNode("span", _hoisted_2$p, [
85715
- modelValue.value.length === 0 ? (vue.openBlock(), vue.createBlock(vue.unref(ChevronDown), {
85944
+ isDatalistOpen.value ? (vue.openBlock(), vue.createBlock(vue.unref(ChevronUp), {
85716
85945
  key: 0,
85717
- class: "icon-button"
85718
- })) : (vue.openBlock(), vue.createBlock(vue.unref(X), {
85946
+ class: "icon-toggle-button",
85947
+ onClick: closeDatalist
85948
+ })) : (vue.openBlock(), vue.createBlock(vue.unref(ChevronDown), {
85719
85949
  key: 1,
85720
- class: "icon-button",
85721
- onClick: reset
85950
+ class: "icon-toggle-button",
85951
+ onClick: openDatalist
85722
85952
  }))
85723
85953
  ])
85724
85954
  ]),
85725
- option: vue.withCtx(({ option }) => [
85726
- vue.createVNode(BmsTag, {
85727
- active: "",
85728
- "can-be-dismissed": false
85729
- }, {
85730
- default: vue.withCtx(() => [
85731
- option?.icon ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(option.icon), { key: 0 })) : vue.createCommentVNode("", true),
85732
- vue.createTextVNode(" " + vue.toDisplayString(option.label), 1)
85733
- ]),
85734
- _: 2
85735
- }, 1024)
85736
- ]),
85737
85955
  _: 1
85738
- }, 16, ["options", "model-value"]);
85956
+ }, 16, ["open"]);
85739
85957
  };
85740
85958
  }
85741
85959
  });
85742
85960
 
85743
- const BmsMultiSelect = /* @__PURE__ */ _export_sfc(_sfc_main$M, [["__scopeId", "data-v-9bf5a4d3"]]);
85744
-
85745
- const _sfc_main$L = /* @__PURE__ */ vue.defineComponent({
85746
- __name: "BmsSearch",
85747
- props: {
85748
- modelValue: {},
85749
- placeholder: { default: "Rechercher..." },
85750
- disabled: { type: Boolean },
85751
- errors: {}
85752
- },
85753
- emits: ["update:modelValue"],
85754
- setup(__props, { expose: __expose, emit: __emit }) {
85755
- const input = vue.ref(null);
85756
- const props = __props;
85757
- const emit = __emit;
85758
- const search = vue.computed({
85759
- get() {
85760
- return props.modelValue;
85761
- },
85762
- set(value) {
85763
- emit("update:modelValue", value);
85764
- }
85765
- });
85766
- const setFocus = () => {
85767
- if (input.value) {
85768
- input.value.setFocus();
85769
- }
85770
- };
85771
- __expose({
85772
- setFocus
85773
- });
85774
- return (_ctx, _cache) => {
85775
- return vue.openBlock(), vue.createBlock(_sfc_main$Y, {
85776
- ref_key: "input",
85777
- ref: input,
85778
- modelValue: search.value,
85779
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => search.value = $event),
85780
- placeholder: _ctx.placeholder,
85781
- errors: _ctx.errors,
85782
- disabled: _ctx.disabled
85783
- }, vue.createSlots({
85784
- "icon-start": vue.withCtx(() => [
85785
- vue.createVNode(vue.unref(Search))
85786
- ]),
85787
- _: 2
85788
- }, [
85789
- search.value && !_ctx.disabled ? {
85790
- name: "icon-end",
85791
- fn: vue.withCtx(() => [
85792
- vue.createVNode(vue.unref(X), {
85793
- class: "clean-icon",
85794
- onClick: _cache[0] || (_cache[0] = ($event) => search.value = "")
85795
- })
85796
- ]),
85797
- key: "0"
85798
- } : void 0
85799
- ]), 1032, ["modelValue", "placeholder", "errors", "disabled"]);
85800
- };
85801
- }
85802
- });
85803
-
85804
- const BmsSearch = /* @__PURE__ */ _export_sfc(_sfc_main$L, [["__scopeId", "data-v-66c267f2"]]);
85961
+ const BmsSelect = /* @__PURE__ */ _export_sfc(_sfc_main$L, [["__scopeId", "data-v-e159e127"]]);
85805
85962
 
85806
85963
  const _hoisted_1$C = ["value", "required", "placeholder"];
85807
85964
  const _sfc_main$K = /* @__PURE__ */ vue.defineComponent({
@@ -85944,7 +86101,7 @@
85944
86101
  class: vue.normalizeClass(["card__body", { animated: _ctx.animated, hasAction: !!_ctx.$slots.action }])
85945
86102
  }, [
85946
86103
  vue.createElementVNode("div", _hoisted_1$A, [
85947
- _ctx.to ? (vue.openBlock(), vue.createBlock(_sfc_main$1l, {
86104
+ _ctx.to ? (vue.openBlock(), vue.createBlock(_sfc_main$1m, {
85948
86105
  key: 0,
85949
86106
  class: "card__body__content__link",
85950
86107
  to: _ctx.to
@@ -88939,7 +89096,7 @@
88939
89096
  key: 0,
88940
89097
  class: vue.normalizeClass(["bms-short-link-menu", { "bms-short-link-menu__outline": _ctx.outline }])
88941
89098
  }, [
88942
- !!_ctx.helpLink ? (vue.openBlock(), vue.createBlock(_sfc_main$1h, {
89099
+ !!_ctx.helpLink ? (vue.openBlock(), vue.createBlock(_sfc_main$1i, {
88943
89100
  key: 0,
88944
89101
  "tooltip-text": "Voir la documentation",
88945
89102
  to: _ctx.helpLink,
@@ -88952,7 +89109,7 @@
88952
89109
  ]),
88953
89110
  _: 3
88954
89111
  }, 8, ["to"])) : vue.createCommentVNode("", true),
88955
- !!_ctx.activityLink ? (vue.openBlock(), vue.createBlock(_sfc_main$1h, {
89112
+ !!_ctx.activityLink ? (vue.openBlock(), vue.createBlock(_sfc_main$1i, {
88956
89113
  key: 1,
88957
89114
  "tooltip-text": "Voir l'activité",
88958
89115
  to: _ctx.activityLink,
@@ -89063,7 +89220,7 @@
89063
89220
  key: 0,
89064
89221
  class: "ui-modal__loader"
89065
89222
  };
89066
- const _hoisted_9$3 = { key: 0 };
89223
+ const _hoisted_9$2 = { key: 0 };
89067
89224
  const _sfc_main$A = /* @__PURE__ */ vue.defineComponent({
89068
89225
  __name: "BmsModal",
89069
89226
  props: {
@@ -89204,7 +89361,7 @@
89204
89361
  ])
89205
89362
  ], true)
89206
89363
  ]),
89207
- vue.createVNode(_sfc_main$1h, {
89364
+ vue.createVNode(_sfc_main$1i, {
89208
89365
  disabled: !isModalClosable.value,
89209
89366
  onClick: dismissModal,
89210
89367
  "data-testid": "close-modal"
@@ -89230,7 +89387,7 @@
89230
89387
  modalData: props.modelValue
89231
89388
  }, () => [
89232
89389
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(buttons.value, (button) => {
89233
- return vue.openBlock(), vue.createBlock(_sfc_main$1i, {
89390
+ return vue.openBlock(), vue.createBlock(_sfc_main$1j, {
89234
89391
  key: button.label + button.role,
89235
89392
  type: button.role === "cancel" ? "secondary" : "primary",
89236
89393
  disabled: !isModalClosable.value || button.disabled,
@@ -89252,7 +89409,7 @@
89252
89409
  default: vue.withCtx(() => [
89253
89410
  _ctx.loading ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_8$3, [
89254
89411
  vue.createVNode(BmsLoader, { size: 64 }),
89255
- _ctx.loadingText ? (vue.openBlock(), vue.createElementBlock("p", _hoisted_9$3, vue.toDisplayString(_ctx.loadingText), 1)) : vue.createCommentVNode("", true)
89412
+ _ctx.loadingText ? (vue.openBlock(), vue.createElementBlock("p", _hoisted_9$2, vue.toDisplayString(_ctx.loadingText), 1)) : vue.createCommentVNode("", true)
89256
89413
  ])) : vue.createCommentVNode("", true)
89257
89414
  ]),
89258
89415
  _: 1
@@ -89312,7 +89469,7 @@
89312
89469
  vue.renderSlot(_ctx.$slots, "default", {}, void 0, true),
89313
89470
  vue.renderSlot(_ctx.$slots, "actions", {}, () => [
89314
89471
  vue.createElementVNode("div", _hoisted_2$j, [
89315
- _ctx.previousLabel ? (vue.openBlock(), vue.createBlock(_sfc_main$1i, {
89472
+ _ctx.previousLabel ? (vue.openBlock(), vue.createBlock(_sfc_main$1j, {
89316
89473
  key: 0,
89317
89474
  "data-test": "previous-button",
89318
89475
  name: "previous",
@@ -89324,7 +89481,7 @@
89324
89481
  ]),
89325
89482
  _: 1
89326
89483
  })) : vue.createCommentVNode("", true),
89327
- _ctx.nextLabel ? (vue.openBlock(), vue.createBlock(_sfc_main$1i, {
89484
+ _ctx.nextLabel ? (vue.openBlock(), vue.createBlock(_sfc_main$1j, {
89328
89485
  key: 1,
89329
89486
  "data-test": "next-button",
89330
89487
  class: "",
@@ -89619,7 +89776,7 @@
89619
89776
  return classes2;
89620
89777
  });
89621
89778
  return (_ctx, _cache) => {
89622
- return vue.openBlock(), vue.createBlock(_sfc_main$1l, {
89779
+ return vue.openBlock(), vue.createBlock(_sfc_main$1m, {
89623
89780
  to: _ctx.item.link,
89624
89781
  target: _ctx.target,
89625
89782
  classes: classes.value
@@ -89709,7 +89866,7 @@
89709
89866
  key: item.label
89710
89867
  }, [
89711
89868
  hasSubItems(item) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$o, [
89712
- item.link ? (vue.openBlock(), vue.createBlock(_sfc_main$1l, {
89869
+ item.link ? (vue.openBlock(), vue.createBlock(_sfc_main$1m, {
89713
89870
  key: 0,
89714
89871
  to: item.link,
89715
89872
  class: vue.normalizeClass(`parent-item ${isItemActive(item) ? "active" : ""}`)
@@ -89824,7 +89981,7 @@
89824
89981
  const toggleMenu = (newMenuState = true) => isMenuOpen.value = newMenuState;
89825
89982
  return (_ctx, _cache) => {
89826
89983
  return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$m, [
89827
- vue.createVNode(vue.unref(_sfc_main$1h), {
89984
+ vue.createVNode(vue.unref(_sfc_main$1i), {
89828
89985
  onClick: _cache[0] || (_cache[0] = ($event) => toggleMenu(!isMenuOpen.value)),
89829
89986
  "data-testid": "openMenu",
89830
89987
  "aria-label": "Ouvrir le menu"
@@ -89848,7 +90005,7 @@
89848
90005
  ref: menu,
89849
90006
  class: vue.normalizeClass(["menu__container", { "is-show": isMenuOpen.value }])
89850
90007
  }, [
89851
- vue.createVNode(vue.unref(_sfc_main$1h), {
90008
+ vue.createVNode(vue.unref(_sfc_main$1i), {
89852
90009
  class: "menu__close",
89853
90010
  onClick: _cache[1] || (_cache[1] = ($event) => toggleMenu(false)),
89854
90011
  "data-testid": "closeMenu",
@@ -90105,7 +90262,7 @@
90105
90262
  vue.createTextVNode(" " + vue.toDisplayString(_ctx.tenant.label), 1),
90106
90263
  vue.createElementVNode("em", null, "- " + vue.toDisplayString(_ctx.tenant.information), 1)
90107
90264
  ], 8, _hoisted_1$j),
90108
- _ctx.tenant.isFavorite ? (vue.openBlock(), vue.createBlock(_sfc_main$1h, {
90265
+ _ctx.tenant.isFavorite ? (vue.openBlock(), vue.createBlock(_sfc_main$1i, {
90109
90266
  key: 0,
90110
90267
  class: "remove-tenant-button",
90111
90268
  onClick: _cache[0] || (_cache[0] = vue.withModifiers(($event) => emits("removeFavorite"), ["stop"]))
@@ -90185,7 +90342,7 @@
90185
90342
  }, {
90186
90343
  default: vue.withCtx(() => [
90187
90344
  vue.createElementVNode("div", _hoisted_1$i, [
90188
- vue.createVNode(vue.unref(_sfc_main$Y), {
90345
+ vue.createVNode(vue.unref(_sfc_main$Z), {
90189
90346
  ref_key: "searchRef",
90190
90347
  ref: searchRef,
90191
90348
  modelValue: search.value,
@@ -90301,7 +90458,7 @@
90301
90458
  _ctx.currentTenant && _ctx.tenants.length === 1 ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$h, [
90302
90459
  vue.createVNode(_sfc_main$m, { tenant: _ctx.currentTenant }, null, 8, ["tenant"]),
90303
90460
  vue.createElementVNode("span", null, vue.toDisplayString(_ctx.currentTenant.label), 1)
90304
- ])) : _ctx.tenants.length > 0 ? (vue.openBlock(), vue.createBlock(vue.unref(_sfc_main$1i), {
90461
+ ])) : _ctx.tenants.length > 0 ? (vue.openBlock(), vue.createBlock(vue.unref(_sfc_main$1j), {
90305
90462
  key: 1,
90306
90463
  type: "tertiary",
90307
90464
  onClick: _cache[0] || (_cache[0] = ($event) => showTenantSwitcher.value = !showTenantSwitcher.value)
@@ -90444,7 +90601,7 @@
90444
90601
  onMouseup: _cache[1] || (_cache[1] = () => gripped.value = false)
90445
90602
  }),
90446
90603
  vue.renderSlot(_ctx.$slots, "default", { row: item }, void 0, true),
90447
- vue.createVNode(vue.unref(_sfc_main$1h), {
90604
+ vue.createVNode(vue.unref(_sfc_main$1i), {
90448
90605
  mode: vue.unref(StatusType).Danger,
90449
90606
  onClick: ($event) => onRemove(item)
90450
90607
  }, {
@@ -90592,7 +90749,7 @@
90592
90749
  ], true)
90593
90750
  ]),
90594
90751
  vue.createElementVNode("div", _hoisted_3$6, [
90595
- vue.createVNode(_sfc_main$1h, {
90752
+ vue.createVNode(_sfc_main$1i, {
90596
90753
  color: "neutral",
90597
90754
  onClick: goToFirst,
90598
90755
  disabled: _ctx.currentPage === 0
@@ -90602,7 +90759,7 @@
90602
90759
  ]),
90603
90760
  _: 1
90604
90761
  }, 8, ["disabled"]),
90605
- vue.createVNode(_sfc_main$1h, {
90762
+ vue.createVNode(_sfc_main$1i, {
90606
90763
  onClick: goToPrevious,
90607
90764
  disabled: _ctx.currentPage === 0
90608
90765
  }, {
@@ -90611,7 +90768,7 @@
90611
90768
  ]),
90612
90769
  _: 1
90613
90770
  }, 8, ["disabled"]),
90614
- vue.createVNode(_sfc_main$1h, {
90771
+ vue.createVNode(_sfc_main$1i, {
90615
90772
  onClick: goToNext,
90616
90773
  disabled: _ctx.currentPage === _ctx.pages - 1 || _ctx.pages === 0
90617
90774
  }, {
@@ -90620,7 +90777,7 @@
90620
90777
  ]),
90621
90778
  _: 1
90622
90779
  }, 8, ["disabled"]),
90623
- vue.createVNode(_sfc_main$1h, {
90780
+ vue.createVNode(_sfc_main$1i, {
90624
90781
  onClick: goToLast,
90625
90782
  disabled: _ctx.currentPage === _ctx.pages - 1 || _ctx.pages === 0 || _ctx.total === Infinity
90626
90783
  }, {
@@ -94457,7 +94614,7 @@
94457
94614
  };
94458
94615
  const _hoisted_7$2 = { key: 1 };
94459
94616
  const _hoisted_8$2 = { key: 1 };
94460
- const _hoisted_9$2 = { class: "bms-table__table-wrapper" };
94617
+ const _hoisted_9$1 = { class: "bms-table__table-wrapper" };
94461
94618
  const _hoisted_10$1 = {
94462
94619
  key: 0,
94463
94620
  class: "bms-table__loader"
@@ -94684,7 +94841,7 @@
94684
94841
  _: 3
94685
94842
  }, 8, ["type"])) : vue.createCommentVNode("", true),
94686
94843
  _cache[4] || (_cache[4] = vue.createElementVNode("div", { class: "selected-wrapper" }, null, -1)),
94687
- vue.createElementVNode("div", _hoisted_9$2, [
94844
+ vue.createElementVNode("div", _hoisted_9$1, [
94688
94845
  vue.createVNode(vue.Transition, { name: "fade" }, {
94689
94846
  default: vue.withCtx(() => [
94690
94847
  _ctx.loading ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_10$1, [
@@ -94839,7 +94996,7 @@
94839
94996
  );
94840
94997
  return (_ctx, _cache) => {
94841
94998
  return vue.openBlock(), vue.createElementBlock("span", _hoisted_1$9, [
94842
- vue.createVNode(_sfc_main$1j, {
94999
+ vue.createVNode(_sfc_main$1k, {
94843
95000
  class: "filter-button",
94844
95001
  color: _ctx.isFilterVisible ? vue.unref(StatusType).Default : vue.unref(StatusType).Information,
94845
95002
  mode: _ctx.isFilterVisible ? "fill" : "ghost",
@@ -96391,16 +96548,19 @@
96391
96548
  return targetFilter.value === saveF.value || targetFilter.value === "" && saveF.value === null || targetFilter.value === null && saveF.value === "";
96392
96549
  });
96393
96550
  };
96551
+ const resetFilterValue = (filter) => {
96552
+ let resetFilter = { ...filter };
96553
+ const valueKeys = ["value", "valueFrom", "valueTo"];
96554
+ valueKeys.forEach((key) => {
96555
+ if (resetFilter[key] !== null && resetFilter[key] !== void 0) {
96556
+ resetFilter[key] = null;
96557
+ }
96558
+ });
96559
+ return resetFilter;
96560
+ };
96394
96561
  const resetFilters = () => {
96395
96562
  filters.value = filters.value.map((filter) => {
96396
- let resetFilter = { ...filter };
96397
- const valueKeys = ["value", "valueFrom", "valueTo"];
96398
- valueKeys.forEach((key) => {
96399
- if (resetFilter[key] !== null && resetFilter[key] !== void 0) {
96400
- resetFilter[key] = null;
96401
- }
96402
- });
96403
- return resetFilter;
96563
+ return resetFilterValue(filter);
96404
96564
  });
96405
96565
  };
96406
96566
  const selectSavedFilter = (savedFilter) => {
@@ -96417,6 +96577,27 @@
96417
96577
  });
96418
96578
  }
96419
96579
  };
96580
+ const updateFiltersFromProps = (updatedFilters) => {
96581
+ filters.value = filters.value.map((filter) => {
96582
+ const updatedFilter = updatedFilters.find((f) => f.key === filter.key);
96583
+ if (updatedFilter) {
96584
+ let mergedFilter = { ...filter };
96585
+ if (updatedFilter.autocompleteOptions)
96586
+ mergedFilter.autocompleteOptions = updatedFilter.autocompleteOptions;
96587
+ if (updatedFilter.selectOptions)
96588
+ mergedFilter.selectOptions = updatedFilter.selectOptions;
96589
+ const value = filter.value || filter.valueFrom || filter.valueTo;
96590
+ const isValueValidSelectOption = updatedFilter.type === "select" && updatedFilter.selectOptions?.find((option) => option.value === value);
96591
+ const isValueValidAutocompleteOption = updatedFilter.type === "autocomplete" && updatedFilter.autocompleteOptions?.find((option) => option === value);
96592
+ if (value && !isValueValidSelectOption && !isValueValidAutocompleteOption) {
96593
+ mergedFilter = resetFilterValue(mergedFilter);
96594
+ }
96595
+ return mergedFilter;
96596
+ } else {
96597
+ return filter;
96598
+ }
96599
+ });
96600
+ };
96420
96601
  return {
96421
96602
  search,
96422
96603
  reflect,
@@ -96429,7 +96610,8 @@
96429
96610
  isSavedFilterActive,
96430
96611
  resetFilters,
96431
96612
  selectSavedFilter,
96432
- resetAllFilters
96613
+ resetAllFilters,
96614
+ updateFiltersFromProps
96433
96615
  };
96434
96616
  };
96435
96617
  const reflectFiltersToPath = (filters) => {
@@ -96933,7 +97115,7 @@
96933
97115
  modelValue: {},
96934
97116
  canSaveFilters: { type: Boolean, default: false }
96935
97117
  },
96936
- emits: ["update:modelValue", "saveFilter", "resetFilters"],
97118
+ emits: ["update:modelValue", "saveFilter", "resetFilters", "filterInput", "filterChange"],
96937
97119
  setup(__props, { emit: __emit }) {
96938
97120
  const route = vueRouter.useRoute();
96939
97121
  const props = __props;
@@ -96943,22 +97125,25 @@
96943
97125
  const nameInput = vue.ref(null);
96944
97126
  const onFilter = (key, inputValue, valueKey) => {
96945
97127
  let filter = props.modelValue.find((f) => f.key === key);
97128
+ let updatedValue;
96946
97129
  if (filter) {
96947
97130
  switch (filter.type) {
96948
97131
  case "boolean":
96949
- filter.value = inputValue === "true" ? true : inputValue === "false" ? false : null;
97132
+ updatedValue = inputValue === "true" ? true : inputValue === "false" ? false : null;
96950
97133
  break;
96951
97134
  case "select":
96952
97135
  case "autocomplete":
96953
97136
  case "betweenDate":
96954
97137
  case "betweenDateTime":
96955
97138
  case "betweenNumber":
96956
- filter[valueKey] = inputValue === "null" ? null : inputValue;
97139
+ updatedValue = inputValue === "null" ? null : inputValue;
96957
97140
  break;
96958
97141
  default:
96959
- filter.value = inputValue;
97142
+ updatedValue = inputValue;
96960
97143
  break;
96961
97144
  }
97145
+ filter[valueKey] = updatedValue;
97146
+ $emits("filterChange", { filterKey: key, value: updatedValue });
96962
97147
  }
96963
97148
  $emits("update:modelValue", props.modelValue);
96964
97149
  };
@@ -96967,9 +97152,9 @@
96967
97152
  case "boolean":
96968
97153
  return BmsSelect;
96969
97154
  case "input":
96970
- return _sfc_main$Y;
97155
+ return _sfc_main$Z;
96971
97156
  case "inputDate":
96972
- return _sfc_main$X;
97157
+ return _sfc_main$Y;
96973
97158
  case "autocomplete":
96974
97159
  return BmsAutocomplete;
96975
97160
  case "select":
@@ -97054,7 +97239,7 @@
97054
97239
  _cache[2] || (_cache[2] = vue.createTextVNode(" Recherche avancée ", -1))
97055
97240
  ]),
97056
97241
  vue.createElementVNode("span", _hoisted_4$3, [
97057
- _ctx.canSaveFilters ? (vue.openBlock(), vue.createBlock(_sfc_main$1h, {
97242
+ _ctx.canSaveFilters ? (vue.openBlock(), vue.createBlock(_sfc_main$1i, {
97058
97243
  key: 0,
97059
97244
  class: "save",
97060
97245
  tooltipText: "Sauvegarder le filtre",
@@ -97065,7 +97250,7 @@
97065
97250
  ]),
97066
97251
  _: 1
97067
97252
  })) : vue.createCommentVNode("", true),
97068
- vue.createVNode(_sfc_main$1h, {
97253
+ vue.createVNode(_sfc_main$1i, {
97069
97254
  class: "reset",
97070
97255
  tooltipText: "Vider les champs",
97071
97256
  onClick: reset
@@ -97094,8 +97279,13 @@
97094
97279
  "onUpdate:valueTo": ($event) => onFilter(filter.key, $event, "valueTo"),
97095
97280
  valueFrom: transformValueForComponent(filter?.valueFrom, filter.type),
97096
97281
  valueTo: transformValueForComponent(filter?.valueTo, filter.type),
97097
- options: getFilterOptions(filter)
97098
- }, null, 40, ["label", "inputType", "modelValue", "onUpdate:modelValue", "onUpdate:valueFrom", "onUpdate:valueTo", "valueFrom", "valueTo", "options"]))
97282
+ options: getFilterOptions(filter),
97283
+ onInput: (e) => $emits("filterInput", {
97284
+ filterKey: filter.key,
97285
+ value: e.target.value,
97286
+ e
97287
+ })
97288
+ }, null, 40, ["label", "inputType", "modelValue", "onUpdate:modelValue", "onUpdate:valueFrom", "onUpdate:valueTo", "valueFrom", "valueTo", "options", "onInput"]))
97099
97289
  ], 2);
97100
97290
  }), 128))
97101
97291
  ]),
@@ -97108,7 +97298,7 @@
97108
97298
  }, {
97109
97299
  default: vue.withCtx(() => [
97110
97300
  _cache[3] || (_cache[3] = vue.createElementVNode("div", null, " Vous pouvez sauvegarder votre recherche pour la retrouver plus facilement. ", -1)),
97111
- vue.createVNode(vue.unref(_sfc_main$Y), {
97301
+ vue.createVNode(vue.unref(_sfc_main$Z), {
97112
97302
  ref_key: "nameInput",
97113
97303
  ref: nameInput,
97114
97304
  label: "Nom de la sauvegarde",
@@ -97124,7 +97314,7 @@
97124
97314
  }
97125
97315
  });
97126
97316
 
97127
- const BmsTableFilters = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-58f3ef61"]]);
97317
+ const BmsTableFilters = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-92161702"]]);
97128
97318
 
97129
97319
  function bind(fn, thisArg) {
97130
97320
  return function wrap() {
@@ -101035,7 +101225,7 @@
101035
101225
  },
101036
101226
  "selectedItemsModifiers": {}
101037
101227
  }),
101038
- emits: /* @__PURE__ */ vue.mergeModels(["deleteSavedFilter", "saveFilter", "update:selectMode"], ["update:selectedItems"]),
101228
+ emits: /* @__PURE__ */ vue.mergeModels(["deleteSavedFilter", "saveFilter", "update:selectMode", "filterInput", "filterChange"], ["update:selectedItems"]),
101039
101229
  setup(__props, { expose: __expose, emit: __emit }) {
101040
101230
  const props = __props;
101041
101231
  const {
@@ -101068,7 +101258,8 @@
101068
101258
  toggleFilters,
101069
101259
  isSavedFilterActive,
101070
101260
  resetFilters,
101071
- selectSavedFilter
101261
+ selectSavedFilter,
101262
+ updateFiltersFromProps
101072
101263
  } = useSearch(props.persistent, props.filters, props.defaultFiltersOpened);
101073
101264
  const emits = __emit;
101074
101265
  const loading = vue.ref(false);
@@ -101099,6 +101290,14 @@
101099
101290
  fetchData();
101100
101291
  }
101101
101292
  });
101293
+ vue.watch(
101294
+ () => props.filters,
101295
+ () => {
101296
+ updateFiltersFromProps(props.filters);
101297
+ reflectFiltersToPath(filters.value);
101298
+ },
101299
+ { deep: true }
101300
+ );
101102
101301
  vue.watch(
101103
101302
  [() => filters.value, () => sort.value, size, search],
101104
101303
  () => {
@@ -101179,9 +101378,9 @@
101179
101378
  return (_ctx, _cache) => {
101180
101379
  return vue.openBlock(), vue.createBlock(UiBmsTable, {
101181
101380
  selectedItems: selectedItems.value,
101182
- "onUpdate:selectedItems": _cache[3] || (_cache[3] = ($event) => selectedItems.value = $event),
101381
+ "onUpdate:selectedItems": _cache[5] || (_cache[5] = ($event) => selectedItems.value = $event),
101183
101382
  selectMode: localSelectMode.value,
101184
- "onUpdate:selectMode": _cache[4] || (_cache[4] = ($event) => localSelectMode.value = $event),
101383
+ "onUpdate:selectMode": _cache[6] || (_cache[6] = ($event) => localSelectMode.value = $event),
101185
101384
  loading: loading.value,
101186
101385
  items: vue.unref(items),
101187
101386
  headers: _ctx.headers,
@@ -101205,7 +101404,9 @@
101205
101404
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => vue.isRef(filters) ? filters.value = $event : null),
101206
101405
  canSaveFilters: _ctx.canSaveFilters,
101207
101406
  onSaveFilter,
101208
- onResetFilters: vue.unref(resetFilters)
101407
+ onResetFilters: vue.unref(resetFilters),
101408
+ onFilterInput: _cache[1] || (_cache[1] = (filterEvent) => emits("filterInput", filterEvent)),
101409
+ onFilterChange: _cache[2] || (_cache[2] = (filterEvent) => emits("filterChange", filterEvent))
101209
101410
  }, null, 8, ["modelValue", "canSaveFilters", "onResetFilters"])
101210
101411
  ], 512), [
101211
101412
  [vue.vShow, vue.unref(isFilterVisible)]
@@ -101259,14 +101460,14 @@
101259
101460
  props.size ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$6, [
101260
101461
  vue.createVNode(BmsPagination, {
101261
101462
  currentSize: vue.unref(size),
101262
- "onUpdate:currentSize": _cache[1] || (_cache[1] = ($event) => vue.isRef(size) ? size.value = $event : null),
101463
+ "onUpdate:currentSize": _cache[3] || (_cache[3] = ($event) => vue.isRef(size) ? size.value = $event : null),
101263
101464
  total: total.value,
101264
101465
  currentPage: props.initialPage === 1 ? vue.unref(currentPage) - 1 : vue.unref(currentPage),
101265
101466
  sizes: vue.unref(paginationsOptions),
101266
101467
  pages: totalPages.value,
101267
101468
  onPrev: onPrevClick,
101268
101469
  onNext: onNextClick,
101269
- onGo: _cache[2] || (_cache[2] = ($event) => go($event))
101470
+ onGo: _cache[4] || (_cache[4] = ($event) => go($event))
101270
101471
  }, null, 8, ["currentSize", "total", "currentPage", "sizes", "pages"])
101271
101472
  ])) : vue.createCommentVNode("", true)
101272
101473
  ]),
@@ -101285,7 +101486,7 @@
101285
101486
  }
101286
101487
  });
101287
101488
 
101288
- const BmsServerTable = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-1a3ad3f2"]]);
101489
+ const BmsServerTable = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-bb2d9aca"]]);
101289
101490
 
101290
101491
  const _hoisted_1$6 = { class: "filters-container" };
101291
101492
  const _hoisted_2$5 = {
@@ -101320,7 +101521,7 @@
101320
101521
  },
101321
101522
  "selectedItemsModifiers": {}
101322
101523
  }),
101323
- emits: /* @__PURE__ */ vue.mergeModels(["deleteSavedFilter", "saveFilter"], ["update:selectedItems"]),
101524
+ emits: /* @__PURE__ */ vue.mergeModels(["deleteSavedFilter", "saveFilter", "filterInput", "filterChange"], ["update:selectedItems"]),
101324
101525
  setup(__props, { emit: __emit }) {
101325
101526
  const route = vueRouter.useRoute();
101326
101527
  const slots = vue.useSlots();
@@ -101354,7 +101555,8 @@
101354
101555
  isSavedFilterActive,
101355
101556
  resetFilters,
101356
101557
  selectSavedFilter,
101357
- resetAllFilters
101558
+ resetAllFilters,
101559
+ updateFiltersFromProps
101358
101560
  } = useSearch(props.persistent, props.filters, props.defaultFiltersOpened);
101359
101561
  const emits = __emit;
101360
101562
  const selectedItems = vue.useModel(__props, "selectedItems");
@@ -101370,6 +101572,13 @@
101370
101572
  );
101371
101573
  };
101372
101574
  const isMounting = vue.ref(true);
101575
+ vue.watch(
101576
+ () => props.filters,
101577
+ () => {
101578
+ updateFiltersFromProps(props.filters);
101579
+ },
101580
+ { deep: true }
101581
+ );
101373
101582
  vue.watchEffect(
101374
101583
  async () => {
101375
101584
  isMounting.value = isPaginationMounting.value || isSortMounting.value || isSearchMounting.value;
@@ -101443,7 +101652,7 @@
101443
101652
  return (_ctx, _cache) => {
101444
101653
  return vue.openBlock(), vue.createBlock(UiBmsTable, {
101445
101654
  selectedItems: selectedItems.value,
101446
- "onUpdate:selectedItems": _cache[4] || (_cache[4] = ($event) => selectedItems.value = $event),
101655
+ "onUpdate:selectedItems": _cache[6] || (_cache[6] = ($event) => selectedItems.value = $event),
101447
101656
  loading: _ctx.loading,
101448
101657
  items: vue.unref(currentItems),
101449
101658
  headers: _ctx.headers,
@@ -101468,7 +101677,9 @@
101468
101677
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => vue.isRef(filters) ? filters.value = $event : null),
101469
101678
  canSaveFilters: _ctx.canSaveFilters,
101470
101679
  onSaveFilter,
101471
- onResetFilters: vue.unref(resetFilters)
101680
+ onResetFilters: vue.unref(resetFilters),
101681
+ onFilterInput: _cache[1] || (_cache[1] = (filterEvent) => emits("filterInput", filterEvent)),
101682
+ onFilterChange: _cache[2] || (_cache[2] = (filterEvent) => emits("filterChange", filterEvent))
101472
101683
  }, null, 8, ["modelValue", "canSaveFilters", "onResetFilters"])
101473
101684
  ], 512), [
101474
101685
  [vue.vShow, vue.unref(isFilterVisible)]
@@ -101507,7 +101718,7 @@
101507
101718
  !_ctx.disableSearch ? vue.renderSlot(_ctx.$slots, "search", { key: 1 }, () => [
101508
101719
  vue.createVNode(BmsSearch, {
101509
101720
  modelValue: vue.unref(search),
101510
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => vue.isRef(search) ? search.value = $event : null),
101721
+ "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => vue.isRef(search) ? search.value = $event : null),
101511
101722
  class: "table-search"
101512
101723
  }, null, 8, ["modelValue"])
101513
101724
  ], true) : vue.createCommentVNode("", true)
@@ -101524,14 +101735,14 @@
101524
101735
  props.size ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$5, [
101525
101736
  vue.createVNode(BmsPagination, {
101526
101737
  currentSize: vue.unref(size),
101527
- "onUpdate:currentSize": _cache[2] || (_cache[2] = ($event) => vue.isRef(size) ? size.value = $event : null),
101738
+ "onUpdate:currentSize": _cache[4] || (_cache[4] = ($event) => vue.isRef(size) ? size.value = $event : null),
101528
101739
  total: vue.unref(items).length,
101529
101740
  currentPage: vue.unref(currentPage),
101530
101741
  sizes: vue.unref(paginationsOptions),
101531
101742
  pages: vue.unref(totalPages),
101532
101743
  onPrev: onPrevClick,
101533
101744
  onNext: onNextClick,
101534
- onGo: _cache[3] || (_cache[3] = ($event) => go($event))
101745
+ onGo: _cache[5] || (_cache[5] = ($event) => go($event))
101535
101746
  }, null, 8, ["currentSize", "total", "currentPage", "sizes", "pages"])
101536
101747
  ])) : vue.createCommentVNode("", true)
101537
101748
  ]),
@@ -101550,7 +101761,7 @@
101550
101761
  }
101551
101762
  });
101552
101763
 
101553
- const BmsTable = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-f2f86c8c"]]);
101764
+ const BmsTable = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-2f003e4e"]]);
101554
101765
 
101555
101766
  const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
101556
101767
  __name: "BmsCocarde",
@@ -101608,7 +101819,7 @@
101608
101819
  class: "bms-notification__icon"
101609
101820
  })),
101610
101821
  vue.createElementVNode("div", _hoisted_2$4, vue.toDisplayString(_ctx.notification.text), 1),
101611
- vue.createVNode(_sfc_main$1h, {
101822
+ vue.createVNode(_sfc_main$1i, {
101612
101823
  class: "bms-notification__close-button",
101613
101824
  onClick: closeNotification
101614
101825
  }, {
@@ -101785,7 +101996,7 @@
101785
101996
  const _hoisted_6$1 = { class: "line-value" };
101786
101997
  const _hoisted_7$1 = { class: "ui-debugger-line" };
101787
101998
  const _hoisted_8$1 = { class: "ui-debugger-line" };
101788
- const _hoisted_9$1 = { class: "line-value" };
101999
+ const _hoisted_9 = { class: "line-value" };
101789
102000
  const _hoisted_10 = { class: "ui-debugger-line" };
101790
102001
  const _hoisted_11 = ["href"];
101791
102002
  const _hoisted_12 = { class: "ui-debugger-line line-value" };
@@ -101849,7 +102060,7 @@
101849
102060
  vue.createElementVNode("div", null, [
101850
102061
  vue.createElementVNode("div", _hoisted_5$1, [
101851
102062
  vue.createElementVNode("span", _hoisted_6$1, vue.toDisplayString(_ctx.problem.detail), 1),
101852
- vue.createVNode(vue.unref(_sfc_main$1h), {
102063
+ vue.createVNode(vue.unref(_sfc_main$1i), {
101853
102064
  class: "copyToClipboardButton",
101854
102065
  onClick: _cache[1] || (_cache[1] = ($event) => onCopyToClipboard(_ctx.problem.detail))
101855
102066
  }, {
@@ -101883,8 +102094,8 @@
101883
102094
  ]),
101884
102095
  vue.createElementVNode("div", null, [
101885
102096
  vue.createElementVNode("div", _hoisted_8$1, [
101886
- vue.createElementVNode("span", _hoisted_9$1, vue.toDisplayString(_ctx.problem.correlationId), 1),
101887
- vue.createVNode(vue.unref(_sfc_main$1h), {
102097
+ vue.createElementVNode("span", _hoisted_9, vue.toDisplayString(_ctx.problem.correlationId), 1),
102098
+ vue.createVNode(vue.unref(_sfc_main$1i), {
101888
102099
  class: "copyToClipboardButton",
101889
102100
  onClick: _cache[3] || (_cache[3] = ($event) => onCopyToClipboard(_ctx.problem.detail))
101890
102101
  }, {
@@ -102094,7 +102305,7 @@
102094
102305
  );
102095
102306
  return (_ctx, _cache) => {
102096
102307
  return isFeatureFlippingOn.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$1, [
102097
- vue.createVNode(_sfc_main$1i, {
102308
+ vue.createVNode(_sfc_main$1j, {
102098
102309
  onClick: _cache[0] || (_cache[0] = ($event) => emit("click")),
102099
102310
  mode: vue.unref(StatusType).Danger
102100
102311
  }, {
@@ -102163,10 +102374,6 @@
102163
102374
  key: 0,
102164
102375
  class: "field__captions"
102165
102376
  };
102166
- const _hoisted_9 = {
102167
- key: 1,
102168
- class: "field__errors"
102169
- };
102170
102377
  const _sfc_main = /* @__PURE__ */ vue.defineComponent({
102171
102378
  __name: "FieldComponent",
102172
102379
  props: {
@@ -102256,25 +102463,23 @@
102256
102463
  ], 2)
102257
102464
  ], 512)
102258
102465
  ]),
102259
- _ctx.captions?.length ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_8, [
102260
- (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.captions, (caption) => {
102466
+ _ctx.captions?.length || _ctx.errors?.length ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_8, [
102467
+ _ctx.captions?.length ? (vue.openBlock(true), vue.createElementBlock(vue.Fragment, { key: 0 }, vue.renderList(_ctx.captions, (caption) => {
102261
102468
  return vue.openBlock(), vue.createElementBlock("div", {
102262
102469
  key: getCaptionIdentifier(caption),
102263
102470
  class: "information field__caption"
102264
102471
  }, [
102265
102472
  vue.createVNode(BmsCaption, { caption }, null, 8, ["caption"])
102266
102473
  ]);
102267
- }), 128))
102268
- ])) : vue.createCommentVNode("", true),
102269
- _ctx.errors?.length ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_9, [
102270
- (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(computedErrors.value, (error) => {
102474
+ }), 128)) : vue.createCommentVNode("", true),
102475
+ _ctx.errors?.length ? (vue.openBlock(true), vue.createElementBlock(vue.Fragment, { key: 1 }, vue.renderList(computedErrors.value, (error) => {
102271
102476
  return vue.openBlock(), vue.createElementBlock("div", {
102272
102477
  key: error.label,
102273
102478
  class: "field__error"
102274
102479
  }, [
102275
102480
  vue.createVNode(BmsCaption, { caption: error }, null, 8, ["caption"])
102276
102481
  ]);
102277
- }), 128))
102482
+ }), 128)) : vue.createCommentVNode("", true)
102278
102483
  ])) : vue.createCommentVNode("", true)
102279
102484
  ], 2);
102280
102485
  };
@@ -104380,8 +104585,8 @@
104380
104585
 
104381
104586
  const createBmsUi = () => ({
104382
104587
  install: (app) => {
104383
- app.component("BmsButton", _sfc_main$1i);
104384
- app.component("BmsIconButton", _sfc_main$1h);
104588
+ app.component("BmsButton", _sfc_main$1j);
104589
+ app.component("BmsIconButton", _sfc_main$1i);
104385
104590
  app.component("BmsAlert", BmsAlert);
104386
104591
  app.component("BmsBadge", BmsBadge);
104387
104592
  app.component("BmsCaption", BmsCaption);
@@ -104392,19 +104597,19 @@
104392
104597
  app.component("BmsBetweenInput", BmsBetweenInput);
104393
104598
  app.component("BmsChip", BmsChip);
104394
104599
  app.component("BmsFilePicker", BmsFilePicker);
104395
- app.component("BmsInputBooleanCheckbox", _sfc_main$11);
104600
+ app.component("BmsInputBooleanCheckbox", _sfc_main$12);
104396
104601
  app.component("BmsInputCheckboxGroup", BmsInputCheckboxGroup);
104397
104602
  app.component("BmsInputCheckboxCaption", BmsInputCheckboxCaption);
104398
104603
  app.component("BmsInputCheckboxCaptionGroup", BmsInputCheckboxCaptionGroup);
104399
104604
  app.component("BmsInputCode", BmsInputCode);
104400
- app.component("BmsInputDateTime", _sfc_main$X);
104605
+ app.component("BmsInputDateTime", _sfc_main$Y);
104401
104606
  app.component("BmsInputFile", BmsInputFile);
104402
- app.component("BmsInputNumber", _sfc_main$V);
104607
+ app.component("BmsInputNumber", _sfc_main$W);
104403
104608
  app.component("BmsInputRadio", BmsInputRadio);
104404
104609
  app.component("BmsInputRadioGroup", BmsInputRadioGroup);
104405
104610
  app.component("BmsInputRadioCaption", BmsInputRadioCaption);
104406
104611
  app.component("BmsInputRadioCaptionGroup", BmsInputRadioCaptionGroup);
104407
- app.component("BmsInputText", _sfc_main$Y);
104612
+ app.component("BmsInputText", _sfc_main$Z);
104408
104613
  app.component("BmsInputToggle", BmsInputToggle);
104409
104614
  app.component("BmsMultiSelect", BmsMultiSelect);
104410
104615
  app.component("BmsSearch", BmsSearch);
@@ -104424,7 +104629,7 @@
104424
104629
  app.component("BmsBackButton", BmsBackButton);
104425
104630
  app.component("BmsBreadcrumb", BmsBreadcrumb);
104426
104631
  app.component("BmsFixedMenu", BmsFixedMenu);
104427
- app.component("BmsLink", _sfc_main$1l);
104632
+ app.component("BmsLink", _sfc_main$1m);
104428
104633
  app.component("BmsMenu", BmsMenu);
104429
104634
  app.component("BmsMenuNav", BmsMenuNav);
104430
104635
  app.component("BmsShortLinkMenu", BmsShortLinkMenu);
@@ -104448,7 +104653,7 @@
104448
104653
  exports.BmsBadge = BmsBadge;
104449
104654
  exports.BmsBetweenInput = BmsBetweenInput;
104450
104655
  exports.BmsBreadcrumb = BmsBreadcrumb;
104451
- exports.BmsButton = _sfc_main$1i;
104656
+ exports.BmsButton = _sfc_main$1j;
104452
104657
  exports.BmsCaption = BmsCaption;
104453
104658
  exports.BmsCard = BmsCard;
104454
104659
  exports.BmsChip = BmsChip;
@@ -104462,22 +104667,22 @@
104462
104667
  exports.BmsForm = BmsForm;
104463
104668
  exports.BmsHeader = BmsHeader;
104464
104669
  exports.BmsHeaderTitle = BmsHeaderTitle;
104465
- exports.BmsIconButton = _sfc_main$1h;
104466
- exports.BmsInputBooleanCheckbox = _sfc_main$11;
104670
+ exports.BmsIconButton = _sfc_main$1i;
104671
+ exports.BmsInputBooleanCheckbox = _sfc_main$12;
104467
104672
  exports.BmsInputCheckboxCaption = BmsInputCheckboxCaption;
104468
104673
  exports.BmsInputCheckboxCaptionGroup = BmsInputCheckboxCaptionGroup;
104469
104674
  exports.BmsInputCheckboxGroup = BmsInputCheckboxGroup;
104470
104675
  exports.BmsInputCode = BmsInputCode;
104471
- exports.BmsInputDateTime = _sfc_main$X;
104676
+ exports.BmsInputDateTime = _sfc_main$Y;
104472
104677
  exports.BmsInputFile = BmsInputFile;
104473
- exports.BmsInputNumber = _sfc_main$V;
104678
+ exports.BmsInputNumber = _sfc_main$W;
104474
104679
  exports.BmsInputRadio = BmsInputRadio;
104475
104680
  exports.BmsInputRadioCaption = BmsInputRadioCaption;
104476
104681
  exports.BmsInputRadioCaptionGroup = BmsInputRadioCaptionGroup;
104477
104682
  exports.BmsInputRadioGroup = BmsInputRadioGroup;
104478
- exports.BmsInputText = _sfc_main$Y;
104683
+ exports.BmsInputText = _sfc_main$Z;
104479
104684
  exports.BmsInputToggle = BmsInputToggle;
104480
- exports.BmsLink = _sfc_main$1l;
104685
+ exports.BmsLink = _sfc_main$1m;
104481
104686
  exports.BmsLoader = BmsLoader;
104482
104687
  exports.BmsMenu = BmsMenu;
104483
104688
  exports.BmsMenuNav = BmsMenuNav;