@drax/identity-vue 0.0.25 → 0.0.26
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/package.json +6 -5
- package/src/components/IdentityChangeOwnPassword/IdentityChangeOwnPassword.vue +1 -1
- package/src/forms/RoleForm.vue +2 -2
- package/src/forms/TenantForm.vue +2 -2
- package/src/forms/UserCreateForm.vue +2 -2
- package/src/forms/UserEditForm.vue +2 -2
- package/src/forms/UserPasswordForm.vue +1 -1
- package/src/index.ts +1 -6
- package/src/composables/useCopy.ts +0 -29
- package/src/composables/useI18nValidation.ts +0 -11
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "0.0.
|
|
6
|
+
"version": "0.0.26",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"main": "./src/index.ts",
|
|
9
9
|
"module": "./src/index.ts",
|
|
@@ -24,9 +24,10 @@
|
|
|
24
24
|
"format": "prettier --write src/"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@drax/common-front": "^0.0.
|
|
28
|
-
"@drax/common-share": "^0.0.
|
|
29
|
-
"@drax/
|
|
27
|
+
"@drax/common-front": "^0.0.26",
|
|
28
|
+
"@drax/common-share": "^0.0.26",
|
|
29
|
+
"@drax/common-vue": "^0.0.26",
|
|
30
|
+
"@drax/identity-share": "^0.0.26",
|
|
30
31
|
"vue-i18n": "^9.13.1"
|
|
31
32
|
},
|
|
32
33
|
"peerDependencies": {
|
|
@@ -63,5 +64,5 @@
|
|
|
63
64
|
"vue-tsc": "^2.0.11",
|
|
64
65
|
"vuetify": "^3.6.4"
|
|
65
66
|
},
|
|
66
|
-
"gitHead": "
|
|
67
|
+
"gitHead": "20d1fcbd2fc358e6e40fd134785d5cbce9258ef5"
|
|
67
68
|
}
|
|
@@ -3,7 +3,7 @@ import {computed, ref} from 'vue'
|
|
|
3
3
|
import {useAuth} from "../../composables/useAuth.js";
|
|
4
4
|
import {ClientError} from "@drax/common-front";
|
|
5
5
|
import type {IClientInputError} from "@drax/common-front";
|
|
6
|
-
import {useI18nValidation} from "
|
|
6
|
+
import {useI18nValidation} from "@drax/common-vue";
|
|
7
7
|
import {useI18n} from "vue-i18n";
|
|
8
8
|
|
|
9
9
|
const {t} = useI18n()
|
package/src/forms/RoleForm.vue
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import {defineModel, type PropType} from "vue";
|
|
3
|
-
import type {IRoleBase} from "@drax/identity-
|
|
4
|
-
import {useI18nValidation} from "
|
|
3
|
+
import type {IRoleBase} from "@drax/identity-share";
|
|
4
|
+
import {useI18nValidation} from "@drax/common-vue";
|
|
5
5
|
import type {IClientInputError} from "@drax/common-front";
|
|
6
6
|
import PermissionSelector from "../components/PermissionSelector/PermissionSelector.vue";
|
|
7
7
|
import RoleCombobox from "../combobox/RoleCombobox.vue";
|
package/src/forms/TenantForm.vue
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import {defineModel, type PropType} from "vue";
|
|
3
|
-
import type {ITenantBase} from "@drax/identity-
|
|
4
|
-
import {useI18nValidation} from "
|
|
3
|
+
import type {ITenantBase} from "@drax/identity-share";
|
|
4
|
+
import {useI18nValidation} from "@drax/common-vue";
|
|
5
5
|
import type {IClientInputError} from "@drax/common-front";
|
|
6
6
|
|
|
7
7
|
const {$ta} = useI18nValidation()
|
|
@@ -3,8 +3,8 @@ import {ref, defineModel, type PropType} from "vue";
|
|
|
3
3
|
import RoleCombobox from "../combobox/RoleCombobox.vue";
|
|
4
4
|
import TenantCombobox from "../combobox/TenantCombobox.vue";
|
|
5
5
|
import type {IClientInputError} from "@drax/common-front";
|
|
6
|
-
import type {IUserCreate} from "@drax/identity-
|
|
7
|
-
import {useI18nValidation} from "
|
|
6
|
+
import type {IUserCreate} from "@drax/identity-share";
|
|
7
|
+
import {useI18nValidation} from "@drax/common-vue";
|
|
8
8
|
|
|
9
9
|
const {$ta} = useI18nValidation()
|
|
10
10
|
|
|
@@ -3,8 +3,8 @@ import {defineModel, type PropType} from "vue";
|
|
|
3
3
|
import RoleCombobox from "../combobox/RoleCombobox.vue";
|
|
4
4
|
import TenantCombobox from "../combobox/TenantCombobox.vue";
|
|
5
5
|
import type {IClientInputError} from "@drax/common-front";
|
|
6
|
-
import type {IUserUpdate} from "@drax/identity-
|
|
7
|
-
import {useI18nValidation} from "
|
|
6
|
+
import type {IUserUpdate} from "@drax/identity-share";
|
|
7
|
+
import {useI18nValidation} from "@drax/common-vue";
|
|
8
8
|
const {$ta} = useI18nValidation()
|
|
9
9
|
|
|
10
10
|
defineProps({
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {ref, defineModel, type PropType} from "vue";
|
|
3
3
|
import type {IClientInputError} from "@drax/common-front";
|
|
4
4
|
import type {IUserPassword} from "@drax/identity-front";
|
|
5
|
-
import {useI18nValidation} from "
|
|
5
|
+
import {useI18nValidation} from "@drax/common-vue";
|
|
6
6
|
import {useI18n} from "vue-i18n";
|
|
7
7
|
|
|
8
8
|
const {t} = useI18n()
|
package/src/index.ts
CHANGED
|
@@ -27,17 +27,12 @@ import {useAuth} from "./composables/useAuth.js";
|
|
|
27
27
|
import {useUser} from "./composables/useUser.js";
|
|
28
28
|
import {useRole} from "./composables/useRole.js";
|
|
29
29
|
import {useTenant} from "./composables/useTenant.js";
|
|
30
|
-
|
|
31
|
-
import {useCopy} from "./composables/useCopy.js";
|
|
30
|
+
|
|
32
31
|
|
|
33
32
|
import {useAuthStore} from "./stores/auth/AuthStore.js";
|
|
34
33
|
|
|
35
34
|
export {
|
|
36
35
|
|
|
37
|
-
//General purpose composables
|
|
38
|
-
useI18nValidation,
|
|
39
|
-
useCopy,
|
|
40
|
-
|
|
41
36
|
//Vue Components
|
|
42
37
|
IdentityLogin,
|
|
43
38
|
IdentityProfileAvatar,
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
export function useCopy(){
|
|
3
|
-
|
|
4
|
-
function unsecuredCopyToClipboard(text:string) {
|
|
5
|
-
const textArea = document.createElement("textarea");
|
|
6
|
-
textArea.value = text;
|
|
7
|
-
document.body.appendChild(textArea);
|
|
8
|
-
textArea.focus();
|
|
9
|
-
textArea.select();
|
|
10
|
-
try {
|
|
11
|
-
document.execCommand('copy');
|
|
12
|
-
} catch (err) {
|
|
13
|
-
console.error('Unable to copy to clipboard', err);
|
|
14
|
-
}
|
|
15
|
-
document.body.removeChild(textArea);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
async function copy(text:string) {
|
|
19
|
-
if(navigator.clipboard){
|
|
20
|
-
await navigator.clipboard.writeText(text)
|
|
21
|
-
}else{
|
|
22
|
-
unsecuredCopyToClipboard(text)
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
return {
|
|
27
|
-
copy,
|
|
28
|
-
}
|
|
29
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import {useI18n} from "vue-i18n";
|
|
2
|
-
|
|
3
|
-
export function useI18nValidation() {
|
|
4
|
-
const {t} = useI18n()
|
|
5
|
-
|
|
6
|
-
function $ta(inputError: string[] | undefined): string | undefined {
|
|
7
|
-
return inputError ? inputError.map(error => t(error)).join(", ") : undefined
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
return {$ta}
|
|
11
|
-
}
|