@sfxcode/formkit-primevue 3.0.4 → 3.0.5

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/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Formkit - Primevue
2
2
 
3
- PrimeVue based [FormKit Inputs](https://sfxcode.github.io/formkit-primevue/guide/inputs.html) for using [FormKit](https://formkit.com/) with the [PrimeVue UI Framework](https://www.primefaces.org/primevue/#/).
3
+ PrimeVue based [FormKit Inputs](https://sfxcode.github.io/formkit-primevue/guide/inputs.html) for using [FormKit](https://formkit.com/) with the [PrimeVue UI Framework](https://primevue.org/#/).
4
4
 
5
5
  Main focus of this project is to provide configuration based forms with validation.
6
6
 
@@ -10,14 +10,16 @@ function useOutputDuration() {
10
10
  let minutes = 0;
11
11
  const lowerDuration = duration.toLowerCase();
12
12
  if (lowerDuration.includes(":")) {
13
- [hours, minutes] = lowerDuration.split(":").map(part => +part.trim());
13
+ const [h, m] = lowerDuration.split(":").map(part => +(part?.trim() || "0"));
14
+ hours = h ?? 0;
15
+ minutes = m ?? 0;
14
16
  } else {
15
17
  if (lowerDuration.includes("h")) {
16
- hours = +lowerDuration.split("h")[0].trim();
18
+ hours = +(lowerDuration.split("h")[0]?.trim() || "0");
17
19
  const remainder = lowerDuration.split("h")[1] || "";
18
- if (remainder.includes("m")) minutes = +remainder.split("m")[0].trim();else if (/^\d+$/.test(remainder)) minutes = +remainder;
20
+ if (remainder.includes("m")) minutes = +(remainder.split("m")[0]?.trim() || "0");else if (/^\d+$/.test(remainder)) minutes = +remainder;
19
21
  } else if (lowerDuration.includes("m")) {
20
- minutes = +lowerDuration.split("m")[0].trim();
22
+ minutes = +(lowerDuration.split("m")[0]?.trim() || "0");
21
23
  } else if (/^\d+$/.test(lowerDuration)) {
22
24
  minutes = +lowerDuration;
23
25
  }
@@ -4,17 +4,19 @@ export function useOutputDuration() {
4
4
  let minutes = 0;
5
5
  const lowerDuration = duration.toLowerCase();
6
6
  if (lowerDuration.includes(":")) {
7
- [hours, minutes] = lowerDuration.split(":").map((part) => +part.trim());
7
+ const [h, m] = lowerDuration.split(":").map((part) => +(part?.trim() || "0"));
8
+ hours = h ?? 0;
9
+ minutes = m ?? 0;
8
10
  } else {
9
11
  if (lowerDuration.includes("h")) {
10
- hours = +lowerDuration.split("h")[0].trim();
12
+ hours = +(lowerDuration.split("h")[0]?.trim() || "0");
11
13
  const remainder = lowerDuration.split("h")[1] || "";
12
14
  if (remainder.includes("m"))
13
- minutes = +remainder.split("m")[0].trim();
15
+ minutes = +(remainder.split("m")[0]?.trim() || "0");
14
16
  else if (/^\d+$/.test(remainder))
15
17
  minutes = +remainder;
16
18
  } else if (lowerDuration.includes("m")) {
17
- minutes = +lowerDuration.split("m")[0].trim();
19
+ minutes = +(lowerDuration.split("m")[0]?.trim() || "0");
18
20
  } else if (/^\d+$/.test(lowerDuration)) {
19
21
  minutes = +lowerDuration;
20
22
  }
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@sfxcode/formkit-primevue",
3
3
  "type": "module",
4
- "version": "3.0.4",
5
- "packageManager": "pnpm@10.13.1+sha512.37ebf1a5c7a30d5fabe0c5df44ee8da4c965ca0c5af3dbab28c3a1681b70a256218d05c81c9c0dcf767ef6b8551eb5b960042b9ed4300c59242336377e01cfad",
4
+ "version": "3.0.5",
5
+ "packageManager": "pnpm@10.15.0+sha512.486ebc259d3e999a4e8691ce03b5cac4a71cbeca39372a9b762cb500cfdf0873e2cb16abe3d951b1ee2cf012503f027b98b6584e4df22524e0c7450d9ec7aa7b",
6
6
  "author": {
7
7
  "name": "Tom",
8
8
  "email": "tom@sfxcode.com"
@@ -93,53 +93,53 @@
93
93
  "@formkit/vue": "^1.6.9",
94
94
  "@intlify/core": "^11.1.11",
95
95
  "primeicons": "^7.0.0",
96
- "primevue": "^4.3.7",
96
+ "primevue": "^4.3.8",
97
97
  "vue-i18n": "^11.1.11"
98
98
  },
99
99
  "devDependencies": {
100
- "@antfu/eslint-config": "^5.1.0",
100
+ "@antfu/eslint-config": "^5.2.1",
101
101
  "@formkit/core": "^1.6.9",
102
102
  "@formkit/drag-and-drop": "^0.5.3",
103
103
  "@primeuix/themes": "^1.2.3",
104
- "@types/node": "^24.1.0",
104
+ "@types/node": "^24.3.0",
105
105
  "@types/uuid": "^10.0.0",
106
- "@unocss/preset-icons": "66.4.0",
107
- "@unocss/preset-uno": "66.4.0",
106
+ "@unocss/preset-icons": "66.5.0",
107
+ "@unocss/preset-uno": "66.5.0",
108
108
  "@vitejs/plugin-vue": "^6.0.1",
109
109
  "@vitest/coverage-v8": "^3.2.4",
110
110
  "@vitest/ui": "^3.2.4",
111
- "@vue/compiler-sfc": "^3.5.18",
112
- "@vue/server-renderer": "^3.5.18",
111
+ "@vue/compiler-sfc": "^3.5.21",
112
+ "@vue/server-renderer": "^3.5.21",
113
113
  "@vue/test-utils": "^2.4.6",
114
- "@vue/tsconfig": "^0.7.0",
115
- "@vueuse/core": "^13.6.0",
114
+ "@vue/tsconfig": "^0.8.1",
115
+ "@vueuse/core": "^13.9.0",
116
116
  "@vueuse/head": "^2.0.0",
117
117
  "changelogen": "^0.6.2",
118
118
  "chart.js": "^4.5.0",
119
119
  "consola": "^3.4.2",
120
120
  "cookie": "^1.0.2",
121
- "esbuild": "^0.25.8",
122
- "eslint": "^9.32.0",
121
+ "esbuild": "^0.25.9",
122
+ "eslint": "^9.34.0",
123
123
  "happy-dom": "^18.0.1",
124
124
  "json-editor-vue": "^0.18.1",
125
125
  "mkdist": "^2.3.0",
126
- "sass": "^1.89.2",
126
+ "sass": "^1.91.0",
127
127
  "tslib": "^2.8.1",
128
128
  "typescript": "^5.9.2",
129
- "unbuild": "^3.6.0",
130
- "unocss": "66.4.0",
131
- "unplugin-auto-import": "^19.3.0",
132
- "unplugin-vue-components": "^28.8.0",
133
- "vite": "^7.0.6",
129
+ "unbuild": "^3.6.1",
130
+ "unocss": "66.5.0",
131
+ "unplugin-auto-import": "^20.1.0",
132
+ "unplugin-vue-components": "^29.0.0",
133
+ "vite": "^7.1.4",
134
134
  "vite-plugin-dts": "^4.5.4",
135
135
  "vite-plugin-eslint": "^1.8.1",
136
136
  "vite-plugin-pages": "^0.33.1",
137
- "vite-ssg": "^28.0.0",
138
- "vitepress": "^1.6.3",
137
+ "vite-ssg": "^28.1.0",
138
+ "vitepress": "^1.6.4",
139
139
  "vitest": "^3.2.4",
140
- "vue": "^3.5.18",
140
+ "vue": "^3.5.21",
141
141
  "vue-demi": "^0.14.10",
142
142
  "vue-router": "^4.5.1",
143
- "vue-tsc": "^3.0.5"
143
+ "vue-tsc": "^3.0.6"
144
144
  }
145
145
  }