@signal24/vue-foundation 4.1.1 → 4.2.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/.prettierrc.json +9 -1
- package/dist/src/components/ajax-select.vue.d.ts +5 -5
- package/dist/src/components/alert-modal.vue.d.ts +1 -1
- package/dist/src/components/ez-smart-select.vue.d.ts +1 -1
- package/dist/src/components/modal-container.d.ts +1 -1
- package/dist/src/components/modal.vue.d.ts +5 -5
- package/dist/src/components/smart-select.vue.d.ts +1 -1
- package/dist/src/helpers/mask.d.ts +1 -1
- package/dist/vue-foundation.es.js +321 -321
- package/package.json +23 -21
- package/src/components/alert-modal.vue +2 -3
- package/src/components/ez-smart-select.vue +1 -1
- package/src/components/modal.vue +1 -1
- package/src/directives/datetime.ts +1 -1
- package/src/helpers/error.ts +1 -2
- package/src/helpers/mask.ts +5 -5
- package/tsconfig.app.json +2 -6
- package/tsconfig.node.json +2 -1
- package/tsconfig.vite-plugins.json +2 -1
- package/tsconfig.vitest.json +1 -1
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.2.1",
|
|
5
5
|
"description": "Common components, directives, and helpers for Vue 3 apps",
|
|
6
6
|
"module": "./dist/vue-foundation.es.js",
|
|
7
7
|
"bin": {
|
|
@@ -9,7 +9,8 @@
|
|
|
9
9
|
},
|
|
10
10
|
"exports": {
|
|
11
11
|
".": {
|
|
12
|
-
"import": "./dist/vue-foundation.es.js"
|
|
12
|
+
"import": "./dist/vue-foundation.es.js",
|
|
13
|
+
"types": "./dist/src/index.d.ts"
|
|
13
14
|
},
|
|
14
15
|
"./dist/vue-foundation.css": {
|
|
15
16
|
"import": "./dist/vue-foundation.css",
|
|
@@ -35,36 +36,37 @@
|
|
|
35
36
|
},
|
|
36
37
|
"license": "MIT",
|
|
37
38
|
"dependencies": {
|
|
38
|
-
"date-fns": "^2.
|
|
39
|
+
"date-fns": "^2.30.0",
|
|
39
40
|
"lodash": "^4.17.21",
|
|
40
|
-
"type-fest": "^3.
|
|
41
|
-
"vue": "^3.
|
|
41
|
+
"type-fest": "^3.11.0",
|
|
42
|
+
"vue": "^3.3.4"
|
|
42
43
|
},
|
|
43
44
|
"devDependencies": {
|
|
44
45
|
"@nabla/vite-plugin-eslint": "^1.5.0",
|
|
45
46
|
"@rushstack/eslint-patch": "^1.2.0",
|
|
47
|
+
"@tsconfig/node18": "^2.0.1",
|
|
46
48
|
"@types/jsdom": "^21.1.1",
|
|
47
|
-
"@types/lodash": "^4.14.
|
|
49
|
+
"@types/lodash": "^4.14.194",
|
|
48
50
|
"@types/node": "^18.15.11",
|
|
49
|
-
"@vitejs/plugin-vue": "^4.
|
|
51
|
+
"@vitejs/plugin-vue": "^4.2.3",
|
|
50
52
|
"@vue/eslint-config-prettier": "^7.1.0",
|
|
51
|
-
"@vue/eslint-config-typescript": "^11.0.
|
|
53
|
+
"@vue/eslint-config-typescript": "^11.0.3",
|
|
52
54
|
"@vue/test-utils": "^2.3.2",
|
|
53
|
-
"@vue/tsconfig": "^0.
|
|
54
|
-
"cypress": "^12.
|
|
55
|
-
"eslint": "^8.
|
|
56
|
-
"eslint-plugin-cypress": "^2.13.
|
|
55
|
+
"@vue/tsconfig": "^0.4.0",
|
|
56
|
+
"cypress": "^12.12.0",
|
|
57
|
+
"eslint": "^8.41.0",
|
|
58
|
+
"eslint-plugin-cypress": "^2.13.3",
|
|
57
59
|
"eslint-plugin-simple-import-sort": "^10.0.0",
|
|
58
60
|
"eslint-plugin-unused-imports": "^2.0.0",
|
|
59
|
-
"eslint-plugin-vue": "^9.
|
|
60
|
-
"jsdom": "^
|
|
61
|
-
"openapi-typescript-codegen": "^0.
|
|
62
|
-
"prettier": "^2.8.
|
|
63
|
-
"sass": "^1.
|
|
61
|
+
"eslint-plugin-vue": "^9.13.0",
|
|
62
|
+
"jsdom": "^22.0.0",
|
|
63
|
+
"openapi-typescript-codegen": "^0.24.0",
|
|
64
|
+
"prettier": "^2.8.8",
|
|
65
|
+
"sass": "^1.62.1",
|
|
64
66
|
"start-server-and-test": "^2.0.0",
|
|
65
|
-
"typescript": "~
|
|
66
|
-
"vite": "^4.
|
|
67
|
-
"vitest": "^0.
|
|
68
|
-
"vue-tsc": "^1.
|
|
67
|
+
"typescript": "~5.0.4",
|
|
68
|
+
"vite": "^4.3.8",
|
|
69
|
+
"vitest": "^0.31.1",
|
|
70
|
+
"vue-tsc": "^1.6.5"
|
|
69
71
|
}
|
|
70
72
|
}
|
|
@@ -18,10 +18,9 @@
|
|
|
18
18
|
</template>
|
|
19
19
|
|
|
20
20
|
<script lang="ts" setup>
|
|
21
|
-
import { computed
|
|
22
|
-
|
|
23
|
-
import { formatError } from '@/helpers/error';
|
|
21
|
+
import { computed } from 'vue';
|
|
24
22
|
|
|
23
|
+
import { formatError } from '../helpers/error';
|
|
25
24
|
import Modal from './modal.vue';
|
|
26
25
|
|
|
27
26
|
const props = defineProps<{
|
package/src/components/modal.vue
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
</template>
|
|
19
19
|
|
|
20
20
|
<script lang="ts" setup>
|
|
21
|
-
import {
|
|
21
|
+
import { getCurrentInstance, onBeforeUnmount, onMounted, ref } from 'vue';
|
|
22
22
|
|
|
23
23
|
import { removeModalInjectionByInternalInstance } from './modal-container';
|
|
24
24
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { format } from 'date-fns';
|
|
2
2
|
import type { DirectiveBinding, ObjectDirective } from 'vue';
|
|
3
3
|
|
|
4
|
-
import { VfOptions } from '
|
|
4
|
+
import { VfOptions } from '../config';
|
|
5
5
|
|
|
6
6
|
export const vDatetime: ObjectDirective<HTMLElement, string> = {
|
|
7
7
|
beforeMount: applyDateTime,
|
package/src/helpers/error.ts
CHANGED
package/src/helpers/mask.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AnyComponentPublicInstance } from '
|
|
1
|
+
import type { AnyComponentPublicInstance } from '../components/modal-container';
|
|
2
2
|
|
|
3
3
|
/*///////////////////////////////////////////////
|
|
4
4
|
Component Overlay Masking
|
|
@@ -51,7 +51,7 @@ interface IFormMaskState {
|
|
|
51
51
|
[FormMaskState]?: {
|
|
52
52
|
disabledElements: HTMLElement[];
|
|
53
53
|
waitButton: HTMLElement;
|
|
54
|
-
|
|
54
|
+
buttonHtml: string;
|
|
55
55
|
};
|
|
56
56
|
}
|
|
57
57
|
type FormMaskElement = Element & IFormMaskState;
|
|
@@ -63,7 +63,7 @@ export function maskForm(formOrCmp: Element | AnyComponentPublicInstance, button
|
|
|
63
63
|
const buttonEl = (
|
|
64
64
|
buttonSelector instanceof Element ? buttonSelector : form.querySelectorAll(buttonSelector ?? 'button:not([disabled])')[0]
|
|
65
65
|
) as HTMLElement;
|
|
66
|
-
const
|
|
66
|
+
const originalButtonHtml = buttonEl.tagName === 'INPUT' ? (buttonEl as HTMLInputElement).value : buttonEl.innerHTML;
|
|
67
67
|
buttonEl.setAttribute('disabled', 'disabled');
|
|
68
68
|
buttonEl.innerText = buttonText ?? 'Please wait...';
|
|
69
69
|
|
|
@@ -74,7 +74,7 @@ export function maskForm(formOrCmp: Element | AnyComponentPublicInstance, button
|
|
|
74
74
|
(form as FormMaskElement)[FormMaskState] = {
|
|
75
75
|
disabledElements: inputs,
|
|
76
76
|
waitButton: buttonEl,
|
|
77
|
-
|
|
77
|
+
buttonHtml: originalButtonHtml
|
|
78
78
|
};
|
|
79
79
|
|
|
80
80
|
return () => unmaskForm(form);
|
|
@@ -89,7 +89,7 @@ export function unmaskForm(formOrCmp: Element | AnyComponentPublicInstance) {
|
|
|
89
89
|
form.classList.remove('vf-masked');
|
|
90
90
|
|
|
91
91
|
state.disabledElements.forEach(el => el.removeAttribute('disabled'));
|
|
92
|
-
state.waitButton.
|
|
92
|
+
state.waitButton.innerHTML = state.buttonHtml;
|
|
93
93
|
state.waitButton.removeAttribute('disabled');
|
|
94
94
|
|
|
95
95
|
delete (form as FormMaskElement)[FormMaskState];
|
package/tsconfig.app.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"extends": "@vue/tsconfig/tsconfig.
|
|
2
|
+
"extends": "@vue/tsconfig/tsconfig.dom.json",
|
|
3
3
|
"include": ["src/**/*.ts", "src/**/*.vue"],
|
|
4
4
|
"exclude": ["src/**/__tests__/*", "src/vite-plugins/*"],
|
|
5
5
|
"compilerOptions": {
|
|
@@ -13,10 +13,6 @@
|
|
|
13
13
|
"declaration": true,
|
|
14
14
|
"declarationDir": "dist",
|
|
15
15
|
"target": "ES2020",
|
|
16
|
-
"lib": [
|
|
17
|
-
"ES2020",
|
|
18
|
-
"DOM",
|
|
19
|
-
"DOM.Iterable"
|
|
20
|
-
]
|
|
16
|
+
"lib": ["ES2020", "DOM", "DOM.Iterable"]
|
|
21
17
|
}
|
|
22
18
|
}
|
package/tsconfig.node.json
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
{
|
|
2
|
-
"extends": "@
|
|
2
|
+
"extends": "@tsconfig/node18/tsconfig.json",
|
|
3
3
|
"include": ["vite.config.*", "vitest.config.*", "cypress.config.*", "playwright.config.*"],
|
|
4
4
|
"compilerOptions": {
|
|
5
5
|
"composite": true,
|
|
6
|
+
"module": "ESNext",
|
|
6
7
|
"types": ["node"],
|
|
7
8
|
"noImplicitAny": true
|
|
8
9
|
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
{
|
|
2
|
-
"extends": "@
|
|
2
|
+
"extends": "@tsconfig/node18/tsconfig.json",
|
|
3
3
|
"include": ["src/vite-plugins/*"],
|
|
4
4
|
"compilerOptions": {
|
|
5
5
|
"composite": true,
|
|
6
|
+
"module": "ESNext",
|
|
6
7
|
"types": ["node"],
|
|
7
8
|
"noImplicitAny": true,
|
|
8
9
|
"outDir": "dist"
|