@signal24/vue-foundation 4.17.2 → 4.18.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.
- package/.yarnrc.yml +1 -1
- package/dist/demo/components/demo-root.vue.d.ts +1 -1
- package/dist/demo/components/demo-vf-smart-select.vue.d.ts +1 -1
- package/dist/src/components/overlay-anchor.vue.d.ts +7 -8
- package/dist/src/components/vf-ajax-select.vue.d.ts +1 -3
- package/dist/src/components/vf-alert-modal.vue.d.ts +3 -10
- package/dist/src/components/vf-ez-smart-select.vue.d.ts +4 -11
- package/dist/src/components/vf-modal.vue.d.ts +12 -16
- package/dist/src/components/vf-smart-select.vue.d.ts +1 -4
- package/dist/src/components/vf-toast.vue.d.ts +3 -4
- package/dist/src/config.d.ts +1 -1
- package/dist/vue-foundation.es.js +522 -514
- package/package.json +24 -24
- package/src/config.ts +2 -2
- package/src/directives/datetime.ts +21 -4
- package/src/filters/index.ts +1 -1
- package/tsconfig.node.json +1 -1
- package/tsconfig.vite-plugins.json +1 -1
- package/vite.config.ts +7 -0
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@signal24/vue-foundation",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "4.
|
|
4
|
+
"version": "4.18.0",
|
|
5
5
|
"description": "Common components, directives, and helpers for Vue 3 apps",
|
|
6
6
|
"module": "./dist/vue-foundation.es.js",
|
|
7
7
|
"exports": {
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
},
|
|
35
35
|
"license": "MIT",
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"uuid": "^
|
|
37
|
+
"uuid": "^11.0.3"
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|
|
40
40
|
"@signal24/openapi-client-codegen": "^1.1.0",
|
|
@@ -43,39 +43,39 @@
|
|
|
43
43
|
"vue": "^3.4.0"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
|
-
"@eslint/js": "
|
|
46
|
+
"@eslint/js": "9.14.0",
|
|
47
47
|
"@nabla/vite-plugin-eslint": "^2.0.4",
|
|
48
48
|
"@signal24/openapi-client-codegen": "^1.1.0",
|
|
49
|
-
"@tsconfig/
|
|
49
|
+
"@tsconfig/node22": "^22.0.0",
|
|
50
50
|
"@types/eslint__js": "^8.42.3",
|
|
51
51
|
"@types/jsdom": "^21.1.7",
|
|
52
|
-
"@types/lodash": "^4.17.
|
|
53
|
-
"@types/node": "^
|
|
52
|
+
"@types/lodash": "^4.17.13",
|
|
53
|
+
"@types/node": "^22.9.0",
|
|
54
54
|
"@types/uuid": "^10.0.0",
|
|
55
|
-
"@vitejs/plugin-vue": "^5.
|
|
56
|
-
"@vue/eslint-config-prettier": "^
|
|
57
|
-
"@vue/eslint-config-typescript": "^
|
|
55
|
+
"@vitejs/plugin-vue": "^5.2.0",
|
|
56
|
+
"@vue/eslint-config-prettier": "^10.1.0",
|
|
57
|
+
"@vue/eslint-config-typescript": "^14.1.3",
|
|
58
58
|
"@vue/test-utils": "^2.4.6",
|
|
59
|
-
"@vue/tsconfig": "^0.
|
|
60
|
-
"cypress": "^13.
|
|
59
|
+
"@vue/tsconfig": "^0.6.0",
|
|
60
|
+
"cypress": "^13.15.2",
|
|
61
61
|
"date-fns": "^4.1.0",
|
|
62
|
-
"eslint": "
|
|
63
|
-
"eslint-plugin-cypress": "^
|
|
62
|
+
"eslint": "9.14.0",
|
|
63
|
+
"eslint-plugin-cypress": "^4.1.0",
|
|
64
64
|
"eslint-plugin-simple-import-sort": "^12.1.1",
|
|
65
65
|
"eslint-plugin-unused-imports": "^4.1.4",
|
|
66
|
-
"eslint-plugin-vue": "^9.
|
|
67
|
-
"jsdom": "^25.0.
|
|
66
|
+
"eslint-plugin-vue": "^9.31.0",
|
|
67
|
+
"jsdom": "^25.0.1",
|
|
68
68
|
"lodash": "^4.17.21",
|
|
69
69
|
"prettier": "^3.3.3",
|
|
70
|
-
"sass": "^1.
|
|
70
|
+
"sass": "^1.81.0",
|
|
71
71
|
"start-server-and-test": "^2.0.8",
|
|
72
|
-
"type-fest": "^4.
|
|
73
|
-
"typescript": "^5.6.
|
|
74
|
-
"typescript-eslint": "^8.
|
|
75
|
-
"vite": "^5.4.
|
|
76
|
-
"vitest": "^2.1.
|
|
77
|
-
"vue": "^3.5.
|
|
78
|
-
"vue-tsc": "^2.1.
|
|
72
|
+
"type-fest": "^4.27.0",
|
|
73
|
+
"typescript": "^5.6.3",
|
|
74
|
+
"typescript-eslint": "^8.14.0",
|
|
75
|
+
"vite": "^5.4.11",
|
|
76
|
+
"vitest": "^2.1.5",
|
|
77
|
+
"vue": "^3.5.13",
|
|
78
|
+
"vue-tsc": "^2.1.10"
|
|
79
79
|
},
|
|
80
|
-
"packageManager": "yarn@4.
|
|
80
|
+
"packageManager": "yarn@4.5.1"
|
|
81
81
|
}
|
package/src/config.ts
CHANGED
|
@@ -2,14 +2,14 @@ interface IOptions {
|
|
|
2
2
|
unhandledErrorSupportText: string;
|
|
3
3
|
errorHandler: (err: Error) => void;
|
|
4
4
|
defaultDateFormat: string;
|
|
5
|
-
|
|
5
|
+
defaultTimeFormat: string;
|
|
6
6
|
}
|
|
7
7
|
|
|
8
8
|
export const VfOptions: IOptions = {
|
|
9
9
|
unhandledErrorSupportText: 'please contact support',
|
|
10
10
|
errorHandler: err => console.error('Unhandled error:', err),
|
|
11
11
|
defaultDateFormat: 'M/d/yy',
|
|
12
|
-
|
|
12
|
+
defaultTimeFormat: 'H:mm'
|
|
13
13
|
};
|
|
14
14
|
|
|
15
15
|
export function configureVf(options: Partial<IOptions>) {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { format } from 'date-fns';
|
|
2
|
+
import { compact } from 'lodash';
|
|
2
3
|
import type { DirectiveBinding, ObjectDirective } from 'vue';
|
|
3
4
|
|
|
4
5
|
import { VfOptions } from '../config';
|
|
@@ -28,20 +29,36 @@ function getDateTimeValue(el: HTMLElement, binding: DirectiveBinding<string>) {
|
|
|
28
29
|
}
|
|
29
30
|
|
|
30
31
|
let formatSpec = el.attributes.getNamedItem('format')?.value;
|
|
32
|
+
const isDateOnly = el.attributes.getNamedItem('date-only') !== null;
|
|
31
33
|
|
|
32
34
|
if (!formatSpec && el.attributes.getNamedItem('relative-date') !== null) {
|
|
33
35
|
const now = new Date();
|
|
34
|
-
if (now.getFullYear()
|
|
35
|
-
prefix = 'at';
|
|
36
|
+
if (now.getFullYear() === theDate.getFullYear() && now.getMonth() === theDate.getMonth() && now.getDate() === theDate.getDate()) {
|
|
37
|
+
prefix = 'at'; // ???
|
|
36
38
|
formatSpec = 'HH:mm';
|
|
37
39
|
}
|
|
38
40
|
}
|
|
39
41
|
|
|
42
|
+
if (!formatSpec && el.attributes.getNamedItem('simplified-date') !== null) {
|
|
43
|
+
let dateSpec: string | null = null;
|
|
44
|
+
const now = new Date();
|
|
45
|
+
if (now.getFullYear() === theDate.getFullYear()) {
|
|
46
|
+
if (now.getMonth() !== theDate.getMonth() || now.getDate() !== theDate.getDate()) {
|
|
47
|
+
dateSpec = 'M/d';
|
|
48
|
+
}
|
|
49
|
+
} else {
|
|
50
|
+
dateSpec = 'M/d/YY';
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
const timeSpec = isDateOnly ? null : VfOptions.defaultTimeFormat;
|
|
54
|
+
formatSpec = compact([dateSpec, timeSpec]).join(' ');
|
|
55
|
+
}
|
|
56
|
+
|
|
40
57
|
if (!formatSpec) {
|
|
41
|
-
if (
|
|
58
|
+
if (isDateOnly) {
|
|
42
59
|
formatSpec = VfOptions.defaultDateFormat;
|
|
43
60
|
} else {
|
|
44
|
-
formatSpec = VfOptions.
|
|
61
|
+
formatSpec = `${VfOptions.defaultDateFormat} ${VfOptions.defaultTimeFormat}`;
|
|
45
62
|
}
|
|
46
63
|
}
|
|
47
64
|
|
package/src/filters/index.ts
CHANGED
|
@@ -32,7 +32,7 @@ function phone(value: string | null) {
|
|
|
32
32
|
|
|
33
33
|
function upperFirst(value: null): null;
|
|
34
34
|
function upperFirst(value: string): string;
|
|
35
|
-
function upperFirst(value: string | null) {
|
|
35
|
+
function upperFirst(value: string | null): null | string {
|
|
36
36
|
return value ? _upperFirst(value) : null;
|
|
37
37
|
}
|
|
38
38
|
|
package/tsconfig.node.json
CHANGED
package/vite.config.ts
CHANGED
|
@@ -8,6 +8,13 @@ import { defineConfig } from 'vite';
|
|
|
8
8
|
// https://vitejs.dev/config/
|
|
9
9
|
export default defineConfig({
|
|
10
10
|
plugins: [vue(), eslintPlugin()],
|
|
11
|
+
css: {
|
|
12
|
+
preprocessorOptions: {
|
|
13
|
+
scss: {
|
|
14
|
+
api: 'modern-compiler'
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
},
|
|
11
18
|
build: {
|
|
12
19
|
cssCodeSplit: true,
|
|
13
20
|
lib: {
|