@ouestfrance/sipa-bms-ui 8.25.0 → 8.25.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ouestfrance/sipa-bms-ui",
3
- "version": "8.25.0",
3
+ "version": "8.25.2",
4
4
  "author": "Ouest-France BMS",
5
5
  "license": "ISC",
6
6
  "scripts": {
@@ -33,26 +33,26 @@
33
33
  "@chromatic-com/storybook": "^5.0.0",
34
34
  "@codemirror/lang-html": "6.4.11",
35
35
  "@codemirror/lang-json": "6.0.2",
36
- "@commitlint/cli": "20.4.0",
37
- "@commitlint/config-conventional": "20.4.0",
36
+ "@commitlint/cli": "20.4.1",
37
+ "@commitlint/config-conventional": "20.4.1",
38
38
  "@mdx-js/react": "3.1.1",
39
- "@storybook/addon-docs": "10.2.3",
40
- "@storybook/addon-links": "10.2.3",
41
- "@storybook/vue3-vite": "10.2.3",
39
+ "@storybook/addon-docs": "10.2.7",
40
+ "@storybook/addon-links": "10.2.7",
41
+ "@storybook/vue3-vite": "10.2.7",
42
42
  "@types/lodash": "4.17.23",
43
43
  "@types/uuid": "11.0.0",
44
- "@vitejs/plugin-vue": "6.0.3",
44
+ "@vitejs/plugin-vue": "6.0.4",
45
45
  "@vue/test-utils": "2.4.6",
46
46
  "@vueuse/core": "13.9.0",
47
47
  "@vueuse/motion": "^3.0.0",
48
- "axios": "1.13.4",
48
+ "axios": "1.13.5",
49
49
  "blob-util": "^2.0.2",
50
50
  "chromatic": "13.3.5",
51
51
  "codemirror": "6.0.2",
52
52
  "cors": "^2.8.5",
53
53
  "cross-env": "^10.0.0",
54
54
  "cy2": "^4.0.0",
55
- "cypress": "15.9.0",
55
+ "cypress": "15.10.0",
56
56
  "express": "^5.0.0",
57
57
  "husky": "9.1.7",
58
58
  "jsdom": "27.4.0",
@@ -69,8 +69,8 @@
69
69
  "sass": "1.97.3",
70
70
  "semantic-release": "25.0.3",
71
71
  "start-server-and-test": "2.1.3",
72
- "storybook": "10.2.3",
73
- "storybook-addon-pseudo-states": "10.2.3",
72
+ "storybook": "10.2.7",
73
+ "storybook-addon-pseudo-states": "10.2.7",
74
74
  "storybook-addon-tag-badges": "^3.0.2",
75
75
  "storybook-vue3-router": "^7.0.0",
76
76
  "typescript": "5.2.2",
@@ -78,7 +78,7 @@
78
78
  "vite": "^7.1.12",
79
79
  "vite-plugin-dts": "^4.1.0",
80
80
  "vite-plugin-mkcert": "1.17.9",
81
- "vite-plugin-pages": "0.33.2",
81
+ "vite-plugin-pages": "0.33.3",
82
82
  "vite-svg-loader": "5.1.0",
83
83
  "vitest": "3.2.4",
84
84
  "vue": "3.5.27",
@@ -186,6 +186,7 @@ const loadData = async (search: string) => {
186
186
  allServerLoadedOptions.value.push(element);
187
187
  }
188
188
  });
189
+ synchronizeSearchWithValue(modelValue.value);
189
190
  }
190
191
  } catch (e) {
191
192
  console.error(e);
@@ -250,26 +251,25 @@ const filteredLocalOptions = computed<InputOption[]>(() => {
250
251
  });
251
252
 
252
253
  const localOptions = computed<InputOption[]>(() => {
253
- return Array.isArray(props.options) &&
254
- !!props.options.length &&
255
- typeof props.options[0] === 'string'
256
- ? props.options.map((o) => ({ label: o, value: o }) as InputOption)
257
- : (props.options as InputOption[]);
254
+ const options = props.request ? allServerLoadedOptions.value : props.options;
255
+ return Array.isArray(options) &&
256
+ !!options.length &&
257
+ typeof options[0] === 'string'
258
+ ? options.map((o) => ({ label: o, value: o }) as InputOption)
259
+ : (options as InputOption[]);
258
260
  });
259
261
 
260
262
  const selectedItems = computed<InputOption[]>(() => {
261
263
  if (!modelValue.value || !Array.isArray(modelValue.value)) return [];
262
264
 
263
265
  const items: InputOption[] = [];
264
- (props.request ? allServerLoadedOptions : localOptions).value.forEach(
265
- (option) => {
266
- if (modelValue.value === option.value) {
267
- items.push(option);
268
- } else if (modelValue.value?.includes(option.value)) {
269
- items.push(option);
270
- }
271
- },
272
- );
266
+ localOptions.value.forEach((option) => {
267
+ if (modelValue.value === option.value) {
268
+ items.push(option);
269
+ } else if (modelValue.value?.includes(option.value)) {
270
+ items.push(option);
271
+ }
272
+ });
273
273
  return items;
274
274
  });
275
275
 
@@ -360,6 +360,10 @@ const onSelect = (selectedOption: InputOption) => {
360
360
  closeDatalist();
361
361
  }
362
362
  };
363
+
364
+ defineExpose({
365
+ setFocus,
366
+ });
363
367
  </script>
364
368
 
365
369
  <style scoped lang="scss">
@@ -98,8 +98,8 @@ const modelValueSingle = ref('0');
98
98
  const modelValueSingleText = ref('titi-0');
99
99
  const modelValueMultiple = ref(['0', '1']);
100
100
  const modelValueMultipleText = ref(['toto-1', 'titi-3']);
101
- const modelValueServer = ref('');
102
- const modelValueServerMultiple = ref([]);
101
+ const modelValueServer = ref('Grass');
102
+ const modelValueServerMultiple = ref(['0']);
103
103
  const autocomplete = ref(false);
104
104
  const canAddNewOption = ref(false);
105
105
  const small = ref(false);