@vc-shell/framework 1.0.108 → 1.0.110
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 +20 -0
- package/core/composables/useUser/index.ts +1 -1
- package/core/plugins/validation/rules.ts +24 -7
- package/dist/core/composables/useI18n/index.d.ts +1 -1
- package/dist/core/composables/useI18n/index.d.ts.map +1 -1
- package/dist/core/plugins/validation/rules.d.ts.map +1 -1
- package/dist/framework.mjs +21166 -20384
- package/dist/index.css +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/ui/components/atoms/index.d.ts +1 -0
- package/dist/ui/components/atoms/index.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-icon/index.d.ts +3 -3
- package/dist/ui/components/atoms/vc-icon/vc-icon.vue.d.ts +2 -2
- package/dist/ui/components/atoms/vc-icon/vc-icon.vue.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-video/index.d.ts +54 -0
- package/dist/ui/components/atoms/vc-video/index.d.ts.map +1 -0
- package/dist/ui/components/atoms/vc-video/vc-video.vue.d.ts +42 -0
- package/dist/ui/components/atoms/vc-video/vc-video.vue.d.ts.map +1 -0
- package/package.json +4 -3
- package/ui/components/atoms/index.ts +1 -0
- package/ui/components/atoms/vc-icon/vc-icon.vue +3 -2
- package/ui/components/atoms/vc-video/index.ts +3 -0
- package/ui/components/atoms/vc-video/vc-video.vue +102 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,23 @@
|
|
|
1
|
+
## [1.0.110](https://github.com/VirtoCommerce/vc-shell/compare/v1.0.109...v1.0.110) (2023-10-16)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* code review improvements ([5c6c6dc](https://github.com/VirtoCommerce/vc-shell/commit/5c6c6dc7a60c1212e4c23e0ddbbc42611f16303b))
|
|
7
|
+
* code review improvements ([5453ba0](https://github.com/VirtoCommerce/vc-shell/commit/5453ba0388a51b2946408b980e119a0ad20f7647))
|
|
8
|
+
* delete index.ts from framework api ([8cc2fee](https://github.com/VirtoCommerce/vc-shell/commit/8cc2feef30ac38bcf229234456cac78c8e23f158))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* vm-1215 vc-video ([52680f6](https://github.com/VirtoCommerce/vc-shell/commit/52680f6f2bd649d7226818f6432e605502ab9eab))
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## [1.0.109](https://github.com/VirtoCommerce/vc-shell/compare/v1.0.108...v1.0.109) (2023-10-13)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
1
21
|
## [1.0.108](https://github.com/VirtoCommerce/vc-shell/compare/v1.0.107...v1.0.108) (2023-10-13)
|
|
2
22
|
|
|
3
23
|
|
|
@@ -47,7 +47,7 @@ interface IUseUser {
|
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
export function useUser(): IUseUser {
|
|
50
|
-
const base = window.location.
|
|
50
|
+
const base = window.location.origin + "/";
|
|
51
51
|
const externalSecurityClient = new ExternalSignInClient(base);
|
|
52
52
|
const externalSignInStorage = useLocalStorage<{ providerType: string }>("externalSignIn", { providerType: null });
|
|
53
53
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { defineRule } from "vee-validate";
|
|
2
|
-
import
|
|
2
|
+
/*eslint import/namespace: ['error', { allowComputed: true }]*/
|
|
3
|
+
import * as AllRules from "@vee-validate/rules";
|
|
3
4
|
|
|
4
5
|
Object.keys(AllRules).forEach((rule) => {
|
|
5
6
|
defineRule(rule, AllRules[rule]);
|
|
@@ -84,20 +85,35 @@ export const fileWeight = (file: HTMLInputElement, [size]: [number]) => {
|
|
|
84
85
|
defineRule("fileWeight", fileWeight);
|
|
85
86
|
|
|
86
87
|
const compare = (
|
|
87
|
-
value: string,
|
|
88
|
-
[target]: string[],
|
|
88
|
+
value: string | Date,
|
|
89
|
+
[target]: string[] | Date[],
|
|
89
90
|
comparer: (first: number, second: number) => boolean,
|
|
90
91
|
errorMessage: string
|
|
91
92
|
): boolean | string => {
|
|
92
93
|
// The field is empty so it should pass
|
|
93
|
-
if (!value || !value.length) {
|
|
94
|
+
if (!value || (typeof value == "string" && !value.length)) {
|
|
94
95
|
return true;
|
|
95
96
|
}
|
|
96
97
|
|
|
97
|
-
|
|
98
|
-
|
|
98
|
+
let first_date;
|
|
99
|
+
let second_date;
|
|
100
|
+
if (value instanceof Date) {
|
|
101
|
+
first_date = value;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
if (target instanceof Date) {
|
|
105
|
+
second_date = target;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
if (typeof value === "string") {
|
|
109
|
+
first_date = new Date(value);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
if (typeof target === "string") {
|
|
113
|
+
second_date = new Date(target);
|
|
114
|
+
}
|
|
99
115
|
|
|
100
|
-
if (first_date
|
|
116
|
+
if (first_date?.getTime() > 0 && second_date?.getTime() > 0) {
|
|
101
117
|
if (comparer(second_date.getTime(), first_date.getTime())) {
|
|
102
118
|
return errorMessage;
|
|
103
119
|
}
|
|
@@ -114,6 +130,7 @@ defineRule("before", before);
|
|
|
114
130
|
// after
|
|
115
131
|
export const after = (value: string, [target]: string[]) =>
|
|
116
132
|
compare(value, [target], (first, second) => first > second, "End date must be later than start date");
|
|
133
|
+
|
|
117
134
|
defineRule("after", after);
|
|
118
135
|
|
|
119
136
|
export const bigInt = (value: string) => {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/** @deprecated use `useI18n({ useScope: "global" })` directly from `vue-i18n` */
|
|
2
|
-
export declare function useI18n(): import("vue-i18n").Composer<{}, {}, {},
|
|
2
|
+
export declare function useI18n(): import("vue-i18n").Composer<{}, {}, {}, string, never, string>;
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../core/composables/useI18n/index.ts"],"names":[],"mappings":"AAEA,iFAAiF;AACjF,wBAAgB,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../core/composables/useI18n/index.ts"],"names":[],"mappings":"AAEA,iFAAiF;AACjF,wBAAgB,OAAO,mEAGtB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rules.d.ts","sourceRoot":"","sources":["../../../../core/plugins/validation/rules.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"rules.d.ts","sourceRoot":"","sources":["../../../../core/plugins/validation/rules.ts"],"names":[],"mappings":"AAQA;;GAEG;AACH,eAAO,MAAM,aAAa,WAAY,gBAAgB,mBAAmB,CAAC,MAAM,GAAG,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,qCAwC1G,CAAC;AAIF;;GAEG;AACH,eAAO,MAAM,UAAU,SAAU,gBAAgB,UAAU,CAAC,MAAM,CAAC,kBAwBlE,CAAC;AA2CF,eAAO,MAAM,MAAM,UAAW,MAAM,YAAY,MAAM,EAAE,qBACiD,CAAC;AAI1G,eAAO,MAAM,KAAK,UAAW,MAAM,YAAY,MAAM,EAAE,qBACgD,CAAC;AAIxG,eAAO,MAAM,MAAM,UAAW,MAAM,gCAMnC,CAAC"}
|