@signal24/vue-foundation 4.26.0 → 4.27.1

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,7 +1,7 @@
1
1
  {
2
2
  "name": "@signal24/vue-foundation",
3
3
  "type": "module",
4
- "version": "4.26.0",
4
+ "version": "4.27.1",
5
5
  "description": "Common components, directives, and helpers for Vue 3 apps",
6
6
  "module": "./dist/vue-foundation.es.js",
7
7
  "exports": {
@@ -26,8 +26,6 @@
26
26
  "demo": "vite -c ./demo/vite.config.ts ./demo",
27
27
  "test:types": "vue-tsc -p tsconfig.vitest.json",
28
28
  "test:unit": "vitest",
29
- "test:e2e": "start-server-and-test preview http://localhost:4173 'cypress run --e2e'",
30
- "test:e2e:dev": "start-server-and-test 'vite dev --port 4173' http://localhost:4173 'cypress open --e2e'",
31
29
  "test:e2e:dev:remote": "DISPLAY=:0 yarn test:e2e:dev",
32
30
  "lint": "eslint --fix .",
33
31
  "format": "prettier --write ."
@@ -44,37 +42,35 @@
44
42
  "vue": "^3.4.0"
45
43
  },
46
44
  "devDependencies": {
47
- "@eslint/js": "9.27.0",
45
+ "@eslint/js": "9.30.0",
48
46
  "@nabla/vite-plugin-eslint": "^2.0.5",
49
- "@signal24/openapi-client-codegen": "^2.5.0",
50
- "@tsconfig/node22": "^22.0.1",
47
+ "@signal24/openapi-client-codegen": "^2.5.1",
48
+ "@tsconfig/node22": "^22.0.2",
51
49
  "@types/jsdom": "^21.1.7",
52
- "@types/lodash": "^4.17.16",
53
- "@types/node": "^22.15.18",
50
+ "@types/lodash": "^4.17.19",
51
+ "@types/node": "^24.0.6",
54
52
  "@types/uuid": "^10.0.0",
55
- "@vitejs/plugin-vue": "^5.2.4",
53
+ "@vitejs/plugin-vue": "^6.0.0",
56
54
  "@vue/eslint-config-prettier": "^10.2.0",
57
- "@vue/eslint-config-typescript": "^14.5.0",
55
+ "@vue/eslint-config-typescript": "^14.5.1",
58
56
  "@vue/test-utils": "^2.4.6",
59
57
  "@vue/tsconfig": "^0.7.0",
60
- "cypress": "^14.3.3",
61
58
  "date-fns": "^4.1.0",
62
- "eslint": "9.27.0",
63
- "eslint-plugin-cypress": "^4.3.0",
59
+ "eslint": "9.30.0",
64
60
  "eslint-plugin-simple-import-sort": "^12.1.1",
65
61
  "eslint-plugin-unused-imports": "^4.1.4",
66
- "eslint-plugin-vue": "^10.1.0",
62
+ "eslint-plugin-vue": "^10.2.0",
67
63
  "jsdom": "^26.1.0",
68
64
  "lodash": "^4.17.21",
69
- "prettier": "^3.5.3",
70
- "sass": "^1.89.0",
65
+ "prettier": "^3.6.2",
66
+ "sass": "^1.89.2",
71
67
  "start-server-and-test": "^2.0.12",
72
68
  "type-fest": "^4.41.0",
73
69
  "typescript": "~5.8",
74
- "typescript-eslint": "^8.32.1",
75
- "vite": "^6.3.5",
76
- "vitest": "^3.1.3",
77
- "vue": "^3.5.14",
70
+ "typescript-eslint": "^8.35.0",
71
+ "vite": "^7.0.0",
72
+ "vitest": "^3.2.4",
73
+ "vue": "^3.5.17",
78
74
  "vue-tsc": "^2.2.10"
79
75
  },
80
76
  "packageManager": "yarn@4.6.0"
@@ -11,7 +11,7 @@
11
11
  </template>
12
12
 
13
13
  <script setup lang="ts" generic="T">
14
- import { computed, defineEmits, defineProps, onMounted, ref, watch } from 'vue';
14
+ import { computed, onMounted, ref, watch } from 'vue';
15
15
 
16
16
  // todo: make type safe when Vue alpha is released
17
17
 
@@ -127,8 +127,15 @@ const loadedOptions = computed(() => props.options ?? remoteOptions.value ?? [])
127
127
  const effectivePrependOptions = computed(() => props.prependOptions ?? []);
128
128
  const effectiveAppendOptions = computed(() => props.appendOptions ?? []);
129
129
  const effectiveDisabled = computed(() => !!props.disabled || (!isLoaded.value && !props.loadOptions));
130
+ const effectiveLoadingText = computed(() => props.loadingText || '...');
130
131
  const effectivePlaceholder = computed(() => {
131
- if (!isLoaded.value && props.preload) return 'Loading...';
132
+ if (!isLoaded.value) {
133
+ if (!props.loadOptions) return effectiveLoadingText.value;
134
+ if (props.preload) return effectiveLoadingText.value;
135
+ if (props.modelValue && (props.valueField || props.valueExtractor)) {
136
+ return effectiveLoadingText.value;
137
+ }
138
+ }
132
139
  if (props.nullTitle) return props.nullTitle;
133
140
  return props.placeholder || '';
134
141
  });
@@ -302,11 +309,16 @@ onMounted(async () => {
302
309
  shouldShowCreateOption.value = props.onCreateItem !== undefined;
303
310
 
304
311
  if (props.loadOptions && props.preload) {
312
+ searchText.value = effectiveLoadingText.value;
305
313
  await loadRemoteOptions();
314
+ searchText.value = '';
306
315
  }
307
316
 
308
- if (!props.options && (props.valueField || props.valueExtractor) && (!props.loadOptions || props.preload)) {
309
- searchText.value = props.loadingText ?? '...';
317
+ // if we have a value, but we don't have options and we use a specific field for the value,
318
+ // then the value is not something we can pass through the formatter.
319
+ // thus, we have to wait to parse the value and render the value later.
320
+ if (!props.options && !props.loadOptions && (props.valueField || props.valueExtractor)) {
321
+ searchText.value = effectiveLoadingText.value;
310
322
  } else {
311
323
  handleValueChanged();
312
324
  }