@globalbrain/sefirot 2.0.0-draft.7 → 2.0.0-draft.8
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/CHANGELOG.md +6 -0
- package/LICENSE.md +1 -1
- package/lib/.DS_Store +0 -0
- package/lib/components/.DS_Store +0 -0
- package/lib/components/icons/.DS_Store +0 -0
- package/lib/composables/Form.ts +1 -1
- package/lib/composables/Validation.ts +8 -5
- package/package.json +24 -25
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
# [2.0.0-draft.8](https://github.com/globalbrain/sefirot/compare/v2.0.0-draft.7...v2.0.0-draft.8) (2022-04-21)
|
|
2
|
+
|
|
3
|
+
### Features
|
|
4
|
+
|
|
5
|
+
* **validation:** update types
|
|
6
|
+
|
|
1
7
|
# [2.0.0-draft.7](https://github.com/globalbrain/sefirot/compare/v2.0.0-draft.6...v2.0.0-draft.7) (2022-02-21)
|
|
2
8
|
|
|
3
9
|
### Bug Fixes
|
package/LICENSE.md
CHANGED
package/lib/.DS_Store
ADDED
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/lib/composables/Form.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Ref, ToRefs, reactive, computed } from 'vue'
|
|
2
2
|
import { cloneDeep } from '../support/Utils'
|
|
3
3
|
import { useSnackbar } from './Snackbar'
|
|
4
|
-
import { Validation,
|
|
4
|
+
import { Validation, ValidationArgs, useValidation } from './Validation'
|
|
5
5
|
|
|
6
6
|
export interface Form<D> {
|
|
7
7
|
data: D
|
|
@@ -3,12 +3,11 @@ import {
|
|
|
3
3
|
Validation,
|
|
4
4
|
ValidationArgs,
|
|
5
5
|
GlobalConfig,
|
|
6
|
-
ExtractState,
|
|
7
6
|
ErrorObject,
|
|
8
7
|
useVuelidate
|
|
9
8
|
} from '@vuelidate/core'
|
|
10
9
|
|
|
11
|
-
export type { Validation, ValidationArgs, GlobalConfig
|
|
10
|
+
export type { Validation, ValidationArgs, GlobalConfig }
|
|
12
11
|
|
|
13
12
|
export interface Validatable {
|
|
14
13
|
readonly $dirty: boolean
|
|
@@ -17,13 +16,17 @@ export interface Validatable {
|
|
|
17
16
|
readonly $touch: () => void
|
|
18
17
|
}
|
|
19
18
|
|
|
19
|
+
export interface ValidationNotification {
|
|
20
|
+
notify(): Promise<boolean>
|
|
21
|
+
}
|
|
22
|
+
|
|
20
23
|
export function useValidation<
|
|
21
|
-
T extends
|
|
22
|
-
A extends ValidationArgs
|
|
24
|
+
T extends { [key in keyof A]: any },
|
|
25
|
+
A extends ValidationArgs = ValidationArgs,
|
|
23
26
|
>(
|
|
24
27
|
state: T | Ref<T> | ToRefs<T>,
|
|
25
28
|
rules: Ref<A> | A,
|
|
26
29
|
config?: GlobalConfig
|
|
27
|
-
): Ref<Validation<A>> {
|
|
30
|
+
): Ref<Validation<A, T>> {
|
|
28
31
|
return useVuelidate(rules, state, config)
|
|
29
32
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@globalbrain/sefirot",
|
|
3
|
-
"version": "2.0.0-draft.
|
|
3
|
+
"version": "2.0.0-draft.8",
|
|
4
4
|
"description": "Vue Components for Global Brain Design System.",
|
|
5
5
|
"files": [
|
|
6
6
|
"lib"
|
|
@@ -32,52 +32,51 @@
|
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
34
34
|
"@types/body-scroll-lock": "^3.1.0",
|
|
35
|
-
"@types/lodash-es": "^4.17.
|
|
36
|
-
"@vuelidate/core": "^2.0.0-alpha.
|
|
37
|
-
"@vuelidate/validators": "^2.0.0-alpha.
|
|
35
|
+
"@types/lodash-es": "^4.17.6",
|
|
36
|
+
"@vuelidate/core": "^2.0.0-alpha.38",
|
|
37
|
+
"@vuelidate/validators": "^2.0.0-alpha.28",
|
|
38
38
|
"body-scroll-lock": "^4.0.0-beta.0",
|
|
39
|
-
"dayjs": "^1.
|
|
39
|
+
"dayjs": "^1.11.0",
|
|
40
40
|
"fuse.js": "^6.5.3",
|
|
41
41
|
"lodash-es": "^4.17.21",
|
|
42
42
|
"normalize.css": "^8.0.1",
|
|
43
|
-
"postcss": "^8.4.
|
|
43
|
+
"postcss": "^8.4.12",
|
|
44
44
|
"postcss-nested": "^5.0.6",
|
|
45
|
-
"typescript": "^4.
|
|
45
|
+
"typescript": "^4.6.3",
|
|
46
46
|
"vue": "^3.2.31",
|
|
47
|
-
"vue-router": "^4.0.
|
|
48
|
-
"vue-tsc": "^0.31.4",
|
|
47
|
+
"vue-router": "^4.0.14",
|
|
49
48
|
"vuex": "^4.0.2"
|
|
50
49
|
},
|
|
51
50
|
"devDependencies": {
|
|
52
|
-
"@babel/core": "^7.17.
|
|
51
|
+
"@babel/core": "^7.17.8",
|
|
53
52
|
"@types/body-scroll-lock": "^3.1.0",
|
|
54
53
|
"@types/lodash-es": "^4.17.6",
|
|
55
|
-
"@typescript-eslint/parser": "^5.
|
|
56
|
-
"@vitejs/plugin-vue": "^2.2.
|
|
57
|
-
"@vue/test-utils": "^2.0.0-rc.
|
|
58
|
-
"@vuelidate/core": "^2.0.0-alpha.
|
|
59
|
-
"@vuelidate/validators": "^2.0.0-alpha.
|
|
54
|
+
"@typescript-eslint/parser": "^5.17.0",
|
|
55
|
+
"@vitejs/plugin-vue": "^2.2.4",
|
|
56
|
+
"@vue/test-utils": "^2.0.0-rc.18",
|
|
57
|
+
"@vuelidate/core": "^2.0.0-alpha.38",
|
|
58
|
+
"@vuelidate/validators": "^2.0.0-alpha.28",
|
|
60
59
|
"body-scroll-lock": "^4.0.0-beta.0",
|
|
61
60
|
"c8": "^7.11.0",
|
|
62
61
|
"codecov": "^3.8.3",
|
|
63
62
|
"conventional-changelog-cli": "^2.2.2",
|
|
64
|
-
"dayjs": "^1.
|
|
63
|
+
"dayjs": "^1.11.0",
|
|
65
64
|
"enquirer": "^2.3.6",
|
|
66
|
-
"eslint": "^8.
|
|
67
|
-
"eslint-plugin-vue": "^8.
|
|
65
|
+
"eslint": "^8.12.0",
|
|
66
|
+
"eslint-plugin-vue": "^8.5.0",
|
|
68
67
|
"execa": "^5.1.1",
|
|
69
68
|
"fuse.js": "^6.5.3",
|
|
70
|
-
"happy-dom": "^2.
|
|
69
|
+
"happy-dom": "^2.50.0",
|
|
71
70
|
"lodash-es": "^4.17.21",
|
|
72
71
|
"normalize.css": "^8.0.1",
|
|
73
|
-
"postcss": "^8.4.
|
|
72
|
+
"postcss": "^8.4.12",
|
|
74
73
|
"postcss-nested": "^5.0.6",
|
|
75
|
-
"typescript": "^4.
|
|
76
|
-
"vite": "^2.8.
|
|
77
|
-
"vitest": "^0.
|
|
74
|
+
"typescript": "^4.6.3",
|
|
75
|
+
"vite": "^2.8.6",
|
|
76
|
+
"vitest": "^0.7.12",
|
|
78
77
|
"vue": "^3.2.31",
|
|
79
|
-
"vue-router": "^4.0.
|
|
80
|
-
"vue-tsc": "^0.
|
|
78
|
+
"vue-router": "^4.0.14",
|
|
79
|
+
"vue-tsc": "^0.33.9",
|
|
81
80
|
"vuex": "^4.0.2"
|
|
82
81
|
}
|
|
83
82
|
}
|