@vc-shell/framework 1.0.70 → 1.0.71
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 +35 -1
- package/core/composables/useNotifications/index.ts +1 -1
- package/core/composables/useUser/index.ts +175 -9
- package/dist/core/composables/useNotifications/index.d.ts +1 -1
- package/dist/core/composables/useNotifications/index.d.ts.map +1 -1
- package/dist/core/composables/useUser/index.d.ts +18 -1
- package/dist/core/composables/useUser/index.d.ts.map +1 -1
- package/dist/framework.mjs +17124 -15573
- package/dist/index.css +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/injectionSymbols.d.ts +6 -0
- package/dist/injectionSymbols.d.ts.map +1 -0
- package/dist/shared/components/app-switcher/composables/useAppSwitcher/index.d.ts +1 -1
- package/dist/shared/components/app-switcher/composables/useAppSwitcher/index.d.ts.map +1 -1
- package/dist/shared/components/blade-navigation/components/vc-blade-navigation/vc-blade-navigation.vue.d.ts.map +1 -1
- package/dist/shared/components/blade-navigation/composables/useBladeNavigation/index.d.ts +1 -1
- package/dist/shared/components/blade-navigation/composables/useBladeNavigation/index.d.ts.map +1 -1
- package/dist/shared/components/change-password/change-password.vue.d.ts +7 -0
- package/dist/shared/components/change-password/change-password.vue.d.ts.map +1 -0
- package/dist/shared/components/change-password/index.d.ts +11 -0
- package/dist/shared/components/change-password/index.d.ts.map +1 -0
- package/dist/shared/components/index.d.ts +9 -0
- package/dist/shared/components/index.d.ts.map +1 -0
- package/dist/shared/components/language-selector/index.d.ts +55 -0
- package/dist/shared/components/language-selector/index.d.ts.map +1 -0
- package/dist/shared/components/language-selector/language-selector.vue.d.ts +45 -0
- package/dist/shared/components/language-selector/language-selector.vue.d.ts.map +1 -0
- package/dist/shared/components/notifications/core/notification.d.ts.map +1 -1
- package/dist/shared/components/notifications/types/index.d.ts +3 -1
- package/dist/shared/components/notifications/types/index.d.ts.map +1 -1
- package/dist/shared/components/user-dropdown-button/index.d.ts +43 -0
- package/dist/shared/components/user-dropdown-button/index.d.ts.map +1 -0
- package/dist/shared/components/user-dropdown-button/user-dropdown-button.vue.d.ts +33 -0
- package/dist/shared/components/user-dropdown-button/user-dropdown-button.vue.d.ts.map +1 -0
- package/dist/shared/index.d.ts +3 -7
- package/dist/shared/index.d.ts.map +1 -1
- package/dist/shared/locales/index.d.ts +3 -0
- package/dist/shared/locales/index.d.ts.map +1 -0
- package/dist/shared/modules/assets/components/assets-details/assets-details.vue.d.ts +2 -9
- package/dist/shared/modules/assets/components/assets-details/assets-details.vue.d.ts.map +1 -1
- package/dist/shared/modules/assets/components/assets-details/index.d.ts +23 -157
- package/dist/shared/modules/assets/components/assets-details/index.d.ts.map +1 -1
- package/dist/shared/modules/assets-manager/components/assets-manager/assets-manager.vue.d.ts +2 -9
- package/dist/shared/modules/assets-manager/components/assets-manager/assets-manager.vue.d.ts.map +1 -1
- package/dist/shared/modules/assets-manager/components/assets-manager/index.d.ts +27 -172
- package/dist/shared/modules/assets-manager/components/assets-manager/index.d.ts.map +1 -1
- package/dist/shared/modules/index.d.ts +3 -0
- package/dist/shared/modules/index.d.ts.map +1 -0
- package/dist/shared/pages/InvitePage/components/index.d.ts +2 -0
- package/dist/shared/pages/InvitePage/components/index.d.ts.map +1 -0
- package/dist/shared/pages/InvitePage/components/invite/Invite.vue.d.ts +33 -0
- package/dist/shared/pages/InvitePage/components/invite/Invite.vue.d.ts.map +1 -0
- package/dist/shared/pages/InvitePage/components/invite/index.d.ts +32 -0
- package/dist/shared/pages/InvitePage/components/invite/index.d.ts.map +1 -0
- package/dist/shared/pages/InvitePage/index.d.ts +5 -0
- package/dist/shared/pages/InvitePage/index.d.ts.map +1 -0
- package/dist/shared/pages/InvitePage/locales/index.d.ts +3 -0
- package/dist/shared/pages/InvitePage/locales/index.d.ts.map +1 -0
- package/dist/shared/pages/LoginPage/components/index.d.ts +2 -0
- package/dist/shared/pages/LoginPage/components/index.d.ts.map +1 -0
- package/dist/shared/pages/LoginPage/components/login/Login.vue.d.ts +17 -0
- package/dist/shared/pages/LoginPage/components/login/Login.vue.d.ts.map +1 -0
- package/dist/shared/pages/LoginPage/components/login/index.d.ts +28 -0
- package/dist/shared/pages/LoginPage/components/login/index.d.ts.map +1 -0
- package/dist/shared/pages/LoginPage/index.d.ts +3 -0
- package/dist/shared/pages/LoginPage/index.d.ts.map +1 -0
- package/dist/shared/pages/LoginPage/locales/index.d.ts +3 -0
- package/dist/shared/pages/LoginPage/locales/index.d.ts.map +1 -0
- package/dist/shared/pages/LoginPage/plugin.d.ts +6 -0
- package/dist/shared/pages/LoginPage/plugin.d.ts.map +1 -0
- package/dist/shared/pages/ResetPasswordPage/components/index.d.ts +2 -0
- package/dist/shared/pages/ResetPasswordPage/components/index.d.ts.map +1 -0
- package/dist/shared/pages/ResetPasswordPage/components/reset-password/ResetPassword.vue.d.ts +33 -0
- package/dist/shared/pages/ResetPasswordPage/components/reset-password/ResetPassword.vue.d.ts.map +1 -0
- package/dist/shared/pages/ResetPasswordPage/components/reset-password/index.d.ts +32 -0
- package/dist/shared/pages/ResetPasswordPage/components/reset-password/index.d.ts.map +1 -0
- package/dist/shared/pages/ResetPasswordPage/index.d.ts +5 -0
- package/dist/shared/pages/ResetPasswordPage/index.d.ts.map +1 -0
- package/dist/shared/pages/ResetPasswordPage/locales/index.d.ts +3 -0
- package/dist/shared/pages/ResetPasswordPage/locales/index.d.ts.map +1 -0
- package/dist/shared/pages/index.d.ts +10 -0
- package/dist/shared/pages/index.d.ts.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/typings/index.d.ts +8 -0
- package/dist/typings/index.d.ts.map +1 -0
- package/dist/ui/components/atoms/vc-button/index.d.ts +36 -6
- package/dist/ui/components/atoms/vc-button/index.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-button/vc-button.vue.d.ts +10 -7
- package/dist/ui/components/atoms/vc-button/vc-button.vue.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-status/index.d.ts +6 -6
- package/dist/ui/components/atoms/vc-status/vc-status.vue.d.ts +1 -1
- package/dist/ui/components/organisms/vc-app/_internal/vc-app-menu/_internal/vc-app-menu-item/vc-app-menu-item.vue.d.ts +1 -1
- package/dist/ui/components/organisms/vc-app/_internal/vc-app-menu/_internal/vc-app-menu-item/vc-app-menu-item.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-app/vc-app.vue.d.ts +2 -2
- package/dist/ui/components/organisms/vc-app/vc-app.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-blade/_internal/vc-blade-toolbar/_internal/vc-blade-toolbar-button/vc-blade-toolbar-button.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-blade/index.d.ts +1 -31
- package/dist/ui/components/organisms/vc-blade/index.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-blade/vc-blade.vue.d.ts +1 -6
- package/dist/ui/components/organisms/vc-blade/vc-blade.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-popup/index.d.ts +6 -6
- package/dist/ui/components/organisms/vc-popup/vc-popup.vue.d.ts +1 -1
- package/dist/ui/components/organisms/vc-popup/vc-popup.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-table/_internal/vc-table-filter/vc-table-filter.vue.d.ts +2 -1
- package/dist/ui/components/organisms/vc-table/_internal/vc-table-filter/vc-table-filter.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-table/index.d.ts +7 -7
- package/dist/ui/components/organisms/vc-table/vc-table.vue.d.ts +7 -7
- package/dist/ui/components/organisms/vc-table/vc-table.vue.d.ts.map +1 -1
- package/package.json +9 -7
- package/shared/components/app-switcher/composables/useAppSwitcher/index.ts +1 -1
- package/shared/components/blade-navigation/components/vc-blade-navigation/vc-blade-navigation.vue +4 -11
- package/shared/components/blade-navigation/composables/useBladeNavigation/index.ts +4 -7
- package/shared/components/change-password/change-password.vue +167 -0
- package/shared/components/change-password/index.ts +10 -0
- package/shared/components/index.ts +8 -0
- package/shared/components/language-selector/index.ts +10 -0
- package/shared/components/language-selector/language-selector.vue +60 -0
- package/shared/components/notifications/core/notification.ts +3 -3
- package/shared/components/notifications/types/index.ts +4 -1
- package/shared/components/user-dropdown-button/index.ts +10 -0
- package/shared/components/user-dropdown-button/user-dropdown-button.vue +124 -0
- package/shared/index.ts +12 -8
- package/shared/locales/en.json +35 -0
- package/shared/locales/index.ts +2 -0
- package/shared/modules/assets/components/assets-details/assets-details.vue +1 -7
- package/shared/modules/assets-manager/components/assets-manager/assets-manager.vue +0 -6
- package/shared/modules/index.ts +2 -0
- package/shared/pages/InvitePage/components/index.ts +1 -0
- package/shared/pages/InvitePage/components/invite/Invite.vue +172 -0
- package/shared/pages/InvitePage/components/invite/index.ts +3 -0
- package/shared/pages/InvitePage/index.ts +7 -0
- package/shared/pages/InvitePage/locales/en.json +31 -0
- package/shared/pages/InvitePage/locales/index.ts +2 -0
- package/shared/pages/LoginPage/components/index.ts +1 -0
- package/shared/pages/LoginPage/components/login/Login.vue +283 -0
- package/shared/pages/LoginPage/components/login/index.ts +3 -0
- package/shared/pages/LoginPage/index.ts +2 -0
- package/shared/pages/LoginPage/locales/en.json +36 -0
- package/shared/pages/LoginPage/locales/index.ts +2 -0
- package/shared/pages/LoginPage/plugin.ts +17 -0
- package/shared/pages/ResetPasswordPage/components/index.ts +1 -0
- package/shared/pages/ResetPasswordPage/components/reset-password/ResetPassword.vue +166 -0
- package/shared/pages/ResetPasswordPage/components/reset-password/index.ts +3 -0
- package/shared/pages/ResetPasswordPage/index.ts +7 -0
- package/shared/pages/ResetPasswordPage/locales/en.json +28 -0
- package/shared/pages/ResetPasswordPage/locales/index.ts +2 -0
- package/shared/pages/index.ts +12 -0
- package/ui/components/atoms/vc-button/vc-button.vue +109 -143
- package/ui/components/organisms/vc-app/_internal/vc-app-bar/vc-app-bar.vue +1 -1
- package/ui/components/organisms/vc-app/_internal/vc-app-menu/_internal/vc-app-menu-item/vc-app-menu-item.vue +3 -4
- package/ui/components/organisms/vc-app/vc-app.vue +6 -9
- package/ui/components/organisms/vc-blade/_internal/vc-blade-toolbar/_internal/vc-blade-toolbar-button/vc-blade-toolbar-button.vue +5 -8
- package/ui/components/organisms/vc-blade/vc-blade.vue +14 -22
- package/ui/components/organisms/vc-login-form/vc-login-form.stories.ts +1 -1
- package/ui/components/organisms/vc-popup/_internal/vc-popup-warning/vc-popup-warning.vue +1 -1
- package/ui/components/organisms/vc-popup/vc-popup.vue +1 -1
- package/ui/components/organisms/vc-table/_internal/vc-table-filter/vc-table-filter.vue +5 -8
- package/ui/components/organisms/vc-table/vc-table.vue +25 -18
- package/ui/locales/en.json +3 -3
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { App } from "vue";
|
|
2
|
+
import { createModule } from "./../../../core/plugins";
|
|
3
|
+
import * as components from "./components";
|
|
4
|
+
import * as locales from "./locales";
|
|
5
|
+
import { CommonPageComposables } from "./../../../typings";
|
|
6
|
+
|
|
7
|
+
export const LoginPage = {
|
|
8
|
+
install(app: App, config: CommonPageComposables) {
|
|
9
|
+
// Register components
|
|
10
|
+
createModule(components, locales).install(app);
|
|
11
|
+
|
|
12
|
+
if (config) {
|
|
13
|
+
app.config.globalProperties.commonPageComposables = config;
|
|
14
|
+
app.provide("commonPageComposables", config);
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./reset-password";
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="vc-app tw-w-full tw-h-full tw-box-border tw-flex tw-flex-col tw-m-0 vc-theme_light">
|
|
3
|
+
<VcLoading
|
|
4
|
+
v-if="loading"
|
|
5
|
+
active
|
|
6
|
+
></VcLoading>
|
|
7
|
+
|
|
8
|
+
<VcLoginForm
|
|
9
|
+
logo="/assets/logo-white.svg"
|
|
10
|
+
background="/assets/background.jpg"
|
|
11
|
+
:title="$t('PASSWORDRESET.TITLE')"
|
|
12
|
+
>
|
|
13
|
+
<VcForm>
|
|
14
|
+
<Field
|
|
15
|
+
v-slot="{ field, errorMessage, handleChange, errors }"
|
|
16
|
+
:label="$t('PASSWORDRESET.FIELDS.PASSWORD.LABEL')"
|
|
17
|
+
name="password"
|
|
18
|
+
:model-value="form.password"
|
|
19
|
+
rules="required"
|
|
20
|
+
>
|
|
21
|
+
<VcInput
|
|
22
|
+
v-bind="field"
|
|
23
|
+
ref="passwordField"
|
|
24
|
+
v-model="form.password"
|
|
25
|
+
class="tw-mb-4 tw-mt-1"
|
|
26
|
+
:label="$t('PASSWORDRESET.FIELDS.PASSWORD.LABEL')"
|
|
27
|
+
:placeholder="$t('PASSWORDRESET.FIELDS.PASSWORD.PLACEHOLDER')"
|
|
28
|
+
type="password"
|
|
29
|
+
:disabled="!form.tokenIsValid"
|
|
30
|
+
required
|
|
31
|
+
:error="!!errors.length"
|
|
32
|
+
:error-message="errorMessage"
|
|
33
|
+
@update:model-value="
|
|
34
|
+
(e) => {
|
|
35
|
+
handleChange(e);
|
|
36
|
+
validate();
|
|
37
|
+
}
|
|
38
|
+
"
|
|
39
|
+
/>
|
|
40
|
+
</Field>
|
|
41
|
+
<Field
|
|
42
|
+
v-slot="{ field, errorMessage, handleChange, errors }"
|
|
43
|
+
:label="$t('PASSWORDRESET.FIELDS.CONFIRM_PASSWORD.LABEL')"
|
|
44
|
+
name="confirm_password"
|
|
45
|
+
:model-value="form.confirmPassword"
|
|
46
|
+
rules="required"
|
|
47
|
+
>
|
|
48
|
+
<VcInput
|
|
49
|
+
v-bind="field"
|
|
50
|
+
ref="confirmPasswordField"
|
|
51
|
+
v-model="form.confirmPassword"
|
|
52
|
+
class="tw-mb-4"
|
|
53
|
+
:label="$t('PASSWORDRESET.FIELDS.CONFIRM_PASSWORD.LABEL')"
|
|
54
|
+
:placeholder="$t('PASSWORDRESET.FIELDS.CONFIRM_PASSWORD.PLACEHOLDER')"
|
|
55
|
+
:disabled="!form.tokenIsValid"
|
|
56
|
+
type="password"
|
|
57
|
+
required
|
|
58
|
+
:error="!!errors.length"
|
|
59
|
+
:error-message="errorMessage"
|
|
60
|
+
@update:model-value="
|
|
61
|
+
(e) => {
|
|
62
|
+
handleChange(e);
|
|
63
|
+
validate();
|
|
64
|
+
}
|
|
65
|
+
"
|
|
66
|
+
@keyup.enter="resetPassword"
|
|
67
|
+
>
|
|
68
|
+
</VcInput>
|
|
69
|
+
</Field>
|
|
70
|
+
<div class="tw-flex tw-justify-center tw-items-center tw-pt-2">
|
|
71
|
+
<span
|
|
72
|
+
v-if="$isDesktop.value"
|
|
73
|
+
class="tw-grow tw-basis-0"
|
|
74
|
+
></span>
|
|
75
|
+
<vc-button
|
|
76
|
+
:disabled="disableButton"
|
|
77
|
+
@click="resetPassword"
|
|
78
|
+
>
|
|
79
|
+
{{ $t("PASSWORDRESET.SAVE_PASSWORD") }}
|
|
80
|
+
</vc-button>
|
|
81
|
+
</div>
|
|
82
|
+
|
|
83
|
+
<VcHint
|
|
84
|
+
v-for="error in form.errors"
|
|
85
|
+
:key="error"
|
|
86
|
+
class="tw-mt-3 !tw-text-[#f14e4e]"
|
|
87
|
+
>
|
|
88
|
+
<!-- TODO: stylizing-->
|
|
89
|
+
{{ $t(`PASSWORDRESET.ERRORS.${error}`) }}
|
|
90
|
+
</VcHint>
|
|
91
|
+
</VcForm>
|
|
92
|
+
</VcLoginForm>
|
|
93
|
+
</div>
|
|
94
|
+
</template>
|
|
95
|
+
|
|
96
|
+
<script lang="ts" setup>
|
|
97
|
+
import { reactive, onMounted, computed } from "vue";
|
|
98
|
+
import { useRouter } from "vue-router";
|
|
99
|
+
import { Field, useForm } from "vee-validate";
|
|
100
|
+
import { useUser } from "./../../../../../core/composables";
|
|
101
|
+
|
|
102
|
+
const props = defineProps({
|
|
103
|
+
userId: {
|
|
104
|
+
type: String,
|
|
105
|
+
default: undefined,
|
|
106
|
+
},
|
|
107
|
+
userName: {
|
|
108
|
+
type: String,
|
|
109
|
+
default: undefined,
|
|
110
|
+
},
|
|
111
|
+
token: {
|
|
112
|
+
type: String,
|
|
113
|
+
default: undefined,
|
|
114
|
+
},
|
|
115
|
+
});
|
|
116
|
+
const { validateToken, validatePassword, resetPasswordByToken, signIn, loading } = useUser();
|
|
117
|
+
const router = useRouter();
|
|
118
|
+
const { validate: veeValidate } = useForm({ validateOnMount: false });
|
|
119
|
+
|
|
120
|
+
const form = reactive({
|
|
121
|
+
isValid: false,
|
|
122
|
+
tokenIsValid: false,
|
|
123
|
+
errors: [],
|
|
124
|
+
password: "",
|
|
125
|
+
confirmPassword: "",
|
|
126
|
+
});
|
|
127
|
+
|
|
128
|
+
onMounted(async () => {
|
|
129
|
+
form.tokenIsValid = await validateToken(props.userId, props.token);
|
|
130
|
+
if (!form.tokenIsValid) {
|
|
131
|
+
form.errors.push("Invalid-token");
|
|
132
|
+
}
|
|
133
|
+
});
|
|
134
|
+
|
|
135
|
+
const disableButton = computed(() => {
|
|
136
|
+
return loading.value || !form.password || !form.confirmPassword || (!form.isValid && form.tokenIsValid);
|
|
137
|
+
});
|
|
138
|
+
|
|
139
|
+
const validate = async () => {
|
|
140
|
+
if (form.tokenIsValid) {
|
|
141
|
+
const errors = (await validatePassword(form.password)).errors;
|
|
142
|
+
form.errors = errors.map((x) => x.code);
|
|
143
|
+
if (form.confirmPassword !== form.password) {
|
|
144
|
+
form.errors.push("Repeat-password");
|
|
145
|
+
}
|
|
146
|
+
form.isValid = form.errors.length == 0;
|
|
147
|
+
}
|
|
148
|
+
};
|
|
149
|
+
|
|
150
|
+
const resetPassword = async () => {
|
|
151
|
+
const { valid } = await veeValidate();
|
|
152
|
+
if (valid) {
|
|
153
|
+
const result = await resetPasswordByToken(props.userId, form.password, props.token);
|
|
154
|
+
if (result.succeeded) {
|
|
155
|
+
const result = await signIn(props.userName, form.password);
|
|
156
|
+
if (result.succeeded) {
|
|
157
|
+
router.push("/");
|
|
158
|
+
} else {
|
|
159
|
+
form.errors = [result.errorCode];
|
|
160
|
+
}
|
|
161
|
+
} else {
|
|
162
|
+
form.errors = result.errors;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
};
|
|
166
|
+
</script>
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"PASSWORDRESET": {
|
|
3
|
+
"TITLE": "Password reset",
|
|
4
|
+
"FIELDS": {
|
|
5
|
+
"PASSWORD": {
|
|
6
|
+
"LABEL": "New password",
|
|
7
|
+
"PLACEHOLDER": "Enter password"
|
|
8
|
+
},
|
|
9
|
+
"CONFIRM_PASSWORD": {
|
|
10
|
+
"LABEL": "Confirm password",
|
|
11
|
+
"PLACEHOLDER": "Confirm password"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"SAVE_PASSWORD": "Save",
|
|
15
|
+
"ERRORS": {
|
|
16
|
+
"Repeat-password": "Passwords are not same",
|
|
17
|
+
"Invalid-token": "Token is invalid or expired",
|
|
18
|
+
"Password-too-weak": "New password does not comply one or more password security policies:",
|
|
19
|
+
"PasswordTooShort": "Passwords too short",
|
|
20
|
+
"PasswordRequiresUniqueChars": "Passwords must use different characters",
|
|
21
|
+
"PasswordRequiresLower": "Passwords must have at least one lowercase ('a'-'z')",
|
|
22
|
+
"PasswordRequiresUpper": "Passwords must have at least one uppercase ('A'-'Z')",
|
|
23
|
+
"PasswordRequiresDigit": "Passwords must have at least one digit ('0'-'9')",
|
|
24
|
+
"PasswordRequiresNonAlphanumeric": "Passwords must have at least one non alphanumeric character",
|
|
25
|
+
"recentPasswordUsed": "You have used this password in the past. Choose another one."
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { CommonPageComposables } from "./../../typings";
|
|
2
|
+
|
|
3
|
+
// Declare globally
|
|
4
|
+
declare module "@vue/runtime-core" {
|
|
5
|
+
export interface ComponentCustomProperties {
|
|
6
|
+
CommonPageComposables: CommonPageComposables;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export * from "./InvitePage";
|
|
11
|
+
export * from "./LoginPage";
|
|
12
|
+
export * from "./ResetPasswordPage";
|
|
@@ -1,20 +1,12 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<button
|
|
3
|
-
class="
|
|
4
|
-
:class="[
|
|
5
|
-
`vc-button_${variant}`,
|
|
6
|
-
{
|
|
7
|
-
'vc-button_small': small,
|
|
8
|
-
'vc-button_outline': outline,
|
|
9
|
-
'vc-button_selected': selected,
|
|
10
|
-
},
|
|
11
|
-
]"
|
|
3
|
+
:class="buttonClass"
|
|
12
4
|
:disabled="disabled"
|
|
13
5
|
@click="onClick"
|
|
14
6
|
>
|
|
15
7
|
<VcIcon
|
|
16
8
|
v-if="icon"
|
|
17
|
-
class="vc-button__icon"
|
|
9
|
+
:class="['vc-button__icon', iconClass]"
|
|
18
10
|
:icon="icon"
|
|
19
11
|
:size="small ? 'xs' : 's'"
|
|
20
12
|
></VcIcon>
|
|
@@ -28,14 +20,18 @@
|
|
|
28
20
|
</template>
|
|
29
21
|
|
|
30
22
|
<script lang="ts" setup>
|
|
23
|
+
import { computed } from "vue";
|
|
31
24
|
import { VcIcon } from "./../vc-icon";
|
|
32
25
|
export interface Props {
|
|
33
|
-
icon?: string
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
26
|
+
icon?: string;
|
|
27
|
+
iconClass?: string;
|
|
28
|
+
variant?: "primary" | "warning" | "danger";
|
|
29
|
+
disabled?: boolean;
|
|
30
|
+
small?: boolean;
|
|
31
|
+
outline?: boolean;
|
|
32
|
+
selected?: boolean;
|
|
33
|
+
text?: boolean;
|
|
34
|
+
raised?: boolean;
|
|
39
35
|
}
|
|
40
36
|
|
|
41
37
|
export interface Emits {
|
|
@@ -51,6 +47,20 @@ const props = withDefaults(defineProps<Props>(), {
|
|
|
51
47
|
|
|
52
48
|
const emit = defineEmits<Emits>();
|
|
53
49
|
|
|
50
|
+
const buttonClass = computed(() => {
|
|
51
|
+
return [
|
|
52
|
+
"vc-button",
|
|
53
|
+
{
|
|
54
|
+
[`vc-button-${props.variant}`]: props.variant,
|
|
55
|
+
"vc-button_small": props.small,
|
|
56
|
+
"vc-button_outline": props.outline,
|
|
57
|
+
"vc-button_selected": props.selected,
|
|
58
|
+
"vc-button_text": props.text,
|
|
59
|
+
"vc-button_raised": props.raised,
|
|
60
|
+
},
|
|
61
|
+
];
|
|
62
|
+
});
|
|
63
|
+
|
|
54
64
|
function onClick(e: Event): void {
|
|
55
65
|
if (!props.disabled) {
|
|
56
66
|
e.preventDefault();
|
|
@@ -61,146 +71,102 @@ function onClick(e: Event): void {
|
|
|
61
71
|
|
|
62
72
|
<style lang="scss">
|
|
63
73
|
:root {
|
|
64
|
-
--button-primary-background-color:
|
|
65
|
-
--button-primary-background-color-hover:
|
|
66
|
-
--button-primary-background-color-
|
|
67
|
-
--button-primary-
|
|
68
|
-
|
|
69
|
-
--button-primary-text-color:
|
|
70
|
-
|
|
71
|
-
--button-
|
|
72
|
-
--button-
|
|
73
|
-
|
|
74
|
-
--button-
|
|
75
|
-
--button-
|
|
76
|
-
--button-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
--button-
|
|
80
|
-
--button-
|
|
81
|
-
--button-
|
|
82
|
-
--button-
|
|
83
|
-
|
|
84
|
-
--button-secondary-text-color: #43b0e6;
|
|
85
|
-
--button-secondary-text-color-hover: #319ed4;
|
|
86
|
-
--button-secondary-text-color-active: #319ed4;
|
|
87
|
-
--button-secondary-text-color-disabled: #a9ddf6;
|
|
88
|
-
|
|
89
|
-
--button-special-background-color: #f89406;
|
|
90
|
-
--button-special-background-color-hover: #eb8b03;
|
|
91
|
-
--button-special-background-color-active: #eb8b03;
|
|
92
|
-
--button-special-background-color-disabled: #fed498;
|
|
93
|
-
|
|
94
|
-
--button-danger-background-color: #ff4a4a;
|
|
95
|
-
--button-danger-background-color-hover: #d73a3a;
|
|
96
|
-
--button-danger-background-color-active: #d73a3a;
|
|
97
|
-
--button-danger-background-color-disabled: #ff5e5e;
|
|
98
|
-
|
|
99
|
-
--button-special-text-color: #ffffff;
|
|
100
|
-
--button-special-text-color-hover: #ffffff;
|
|
101
|
-
--button-special-text-color-active: #ffffff;
|
|
102
|
-
--button-special-text-color-disabled: #ffffff;
|
|
103
|
-
|
|
104
|
-
--button-widget-background-color: #ffffff;
|
|
105
|
-
--button-widget-background-color-hover: #f2faff;
|
|
106
|
-
--button-widget-background-color-active: #eaf6ff;
|
|
107
|
-
--button-widget-background-color-disabled: #fafafa;
|
|
108
|
-
|
|
109
|
-
--button-widget-border-color: #eaedf3;
|
|
110
|
-
--button-widget-border-color-hover: #d3e2ec;
|
|
111
|
-
--button-widget-border-color-active: #deecf4;
|
|
74
|
+
--button-primary-background-color: 65, 175, 230;
|
|
75
|
+
--button-primary-background-color-hover: 49, 158, 212;
|
|
76
|
+
--button-primary-background-color-disabled: 169, 221, 246;
|
|
77
|
+
--button-primary-text-color: 255, 255, 255;
|
|
78
|
+
--button-primary-text-color-outlined: var(--button-primary-background-color);
|
|
79
|
+
--button-primary-text-color-hover: var(--button-primary-background-color-hover);
|
|
80
|
+
|
|
81
|
+
--button-warning-background-color: 248, 148, 6;
|
|
82
|
+
--button-warning-background-color-hover: 235, 139, 3;
|
|
83
|
+
--button-warning-background-color-disabled: 254, 212, 152;
|
|
84
|
+
--button-warning-text-color: 255, 255, 255;
|
|
85
|
+
--button-warning-text-color-outlined: var(--button-warning-background-color);
|
|
86
|
+
--button-warning-text-color-hover: var(--button-warning-background-color-hover);
|
|
87
|
+
|
|
88
|
+
--button-danger-background-color: 255, 74, 74;
|
|
89
|
+
--button-danger-background-color-hover: 215, 58, 58;
|
|
90
|
+
--button-danger-background-color-disabled: 255, 94, 94;
|
|
91
|
+
--button-danger-text-color: 255, 255, 255;
|
|
92
|
+
--button-danger-text-color-outlined: var(--button-danger-background-color);
|
|
93
|
+
--button-danger-text-color-hover: var(--button-danger-background-color-hover);
|
|
112
94
|
|
|
113
95
|
--button-border-radius: 3px;
|
|
114
|
-
--button-padding: 14px;
|
|
115
|
-
--button-padding-small:
|
|
96
|
+
--button-padding-hor: 14px;
|
|
97
|
+
--button-padding-hor-small: 14px;
|
|
98
|
+
--button-padding-vert: 10px;
|
|
99
|
+
--button-padding-vert-small: 2px;
|
|
100
|
+
|
|
116
101
|
--button-height: 36px;
|
|
117
102
|
--button-height-small: 28px;
|
|
118
103
|
}
|
|
119
104
|
|
|
120
|
-
$variants: primary,
|
|
105
|
+
$variants: primary, warning, danger;
|
|
121
106
|
|
|
122
107
|
.vc-button {
|
|
123
|
-
@apply tw-inline-flex tw-items-center tw-font-medium tw-text-sm tw-cursor-pointer tw-box-border tw-transition tw-duration-200 tw-rounded-[var(--button-border-radius)] tw-px-[var(--button-padding)] tw-h-[var(--button-height)];
|
|
124
|
-
|
|
125
108
|
&__icon + &__title {
|
|
126
|
-
@apply tw-ml-2;
|
|
109
|
+
@apply tw-ml-2 tw-text-left;
|
|
127
110
|
}
|
|
128
111
|
|
|
129
112
|
@each $variant in $variants {
|
|
130
|
-
|
|
131
|
-
@apply tw-
|
|
132
|
-
tw-
|
|
133
|
-
tw-
|
|
134
|
-
tw-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
hover:tw-
|
|
138
|
-
focus:tw-bg-[color:var(--button-#{$variant}-background-color-
|
|
139
|
-
focus:tw-text-[color:var(--button-#{$variant}-text-color-active)]
|
|
140
|
-
focus:tw-bg-[color:var(--button-#{$variant}-background-color-active)]
|
|
113
|
+
&.vc-button-#{$variant} {
|
|
114
|
+
@apply tw-inline-flex tw-items-center tw-font-medium tw-text-sm tw-cursor-pointer tw-box-border tw-transition tw-duration-200
|
|
115
|
+
tw-rounded-[var(--button-border-radius)] tw-px-[var(--button-padding-hor)] tw-py-[var(--button-padding-vert)]
|
|
116
|
+
tw-min-h-[var(--button-height)]
|
|
117
|
+
tw-bg-[color:rgb(var(--button-#{$variant}-background-color))]
|
|
118
|
+
tw-flex tw-justify-center
|
|
119
|
+
tw-text-[color:rgb(var(--button-#{$variant}-text-color))]
|
|
120
|
+
hover:tw-bg-[color:rgb(var(--button-#{$variant}-background-color-hover))]
|
|
121
|
+
focus:tw-bg-[color:rgb(var(--button-#{$variant}-background-color-hover))]
|
|
141
122
|
disabled:tw-cursor-not-allowed
|
|
142
|
-
disabled:tw-bg-[color:var(--button-#{$variant}-background-color-disabled)]
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
disabled:tw-bg-transparent;
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
&_onlytext {
|
|
193
|
-
@apply tw-text-[color:var(--button-secondary-text-color)]
|
|
194
|
-
tw-p-0 tw-border-none tw-bg-transparent tw-h-auto
|
|
195
|
-
hover:tw-bg-transparent
|
|
196
|
-
hover:tw-text-[color:var(--button-secondary-text-color-hover)]
|
|
197
|
-
focus:tw-bg-transparent
|
|
198
|
-
focus:tw-text-[color:var(--button-secondary-text-color-hover)];
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
&_selected {
|
|
202
|
-
&.vc-button_widget {
|
|
203
|
-
@apply tw-bg-[color:var(--button-widget-background-color-hover)];
|
|
123
|
+
disabled:tw-bg-[color:rgb(var(--button-#{$variant}-background-color-disabled))];
|
|
124
|
+
|
|
125
|
+
&.vc-button_small {
|
|
126
|
+
@apply tw-py-[var(--button-padding-vert-small)] tw-min-h-[var(--button-height-small)] tw-px-[var(--button-padding-hor-small)] tw-font-normal tw-text-xs;
|
|
127
|
+
|
|
128
|
+
.vc-button__icon + .vc-button__title {
|
|
129
|
+
@apply tw-ml-1;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
&.vc-button_outline {
|
|
134
|
+
@apply tw-bg-transparent tw-border tw-border-[color:rgb(var(--button-#{$variant}-background-color))]
|
|
135
|
+
tw-text-[color:rgb(var(--button-#{$variant}-text-color-outlined))]
|
|
136
|
+
hover:tw-text-[color:rgb(var(--button-#{$variant}-text-color-hover))]
|
|
137
|
+
hover:tw-bg-transparent
|
|
138
|
+
hover:tw-border-[color:rgb(var(--button-#{$variant}-background-color-hover))]
|
|
139
|
+
disabled:tw-text-[color:rgba(var(--button-#{$variant}-text-color-hover),0.5)]
|
|
140
|
+
disabled:tw-border-[color:rgba(var(--button-#{$variant}-background-color),0.5)]
|
|
141
|
+
disabled:tw-bg-transparent;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
&.vc-button_text {
|
|
145
|
+
@apply tw-border-none tw-bg-transparent tw-p-0 tw-min-h-0
|
|
146
|
+
tw-text-[color:rgb(var(--button-#{$variant}-background-color))]
|
|
147
|
+
hover:tw-text-[color:rgb(var(--button-#{$variant}-background-color-hover))]
|
|
148
|
+
focus:tw-text-[color:rgb(var(--button-#{$variant}-background-color-hover))]
|
|
149
|
+
disabled:tw-text-[color:rgba(var(--button-#{$variant}-background-color),0.5)];
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
&.vc-button_raised {
|
|
153
|
+
@apply tw-shadow-[1px_4px_10px_rgba(197,206,214,0.24)] tw-px-[var(--button-padding-hor)] tw-py-[var(--button-padding-vert)];
|
|
154
|
+
|
|
155
|
+
&.vc-button_text:not(:disabled) {
|
|
156
|
+
&:hover,
|
|
157
|
+
&:focus {
|
|
158
|
+
@apply tw-bg-[color:rgba(var(--button-#{$variant}-background-color-hover),0.07)];
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
&.vc-button_selected {
|
|
164
|
+
@apply tw-bg-[color:rgb(var(--button-#{$variant}-background-color-hover))];
|
|
165
|
+
|
|
166
|
+
&.vc-button_text {
|
|
167
|
+
@apply tw-bg-[color:rgba(var(--button-#{$variant}-background-color-hover),0.07)];
|
|
168
|
+
}
|
|
169
|
+
}
|
|
204
170
|
}
|
|
205
171
|
}
|
|
206
172
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div
|
|
3
|
-
class="tw-relative tw-flex tw-items-center tw-content-between tw-h-[var(--app-bar-height)] tw-bg-[color:var(--app-bar-background-color)] tw-
|
|
3
|
+
class="tw-relative tw-flex tw-items-center tw-content-between tw-h-[var(--app-bar-height)] tw-bg-[color:var(--app-bar-background-color)] tw-px-4"
|
|
4
4
|
>
|
|
5
5
|
<slot name="appSwitcher"></slot>
|
|
6
6
|
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
:is-active="isExactActive"
|
|
11
11
|
:children="children"
|
|
12
12
|
:sticky="sticky"
|
|
13
|
-
:icon="icon
|
|
13
|
+
:icon="icon"
|
|
14
14
|
:title="title"
|
|
15
15
|
@on-click="onMenuItemClick"
|
|
16
16
|
/>
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
<vc-app-menu-link
|
|
21
21
|
:children="children"
|
|
22
22
|
:sticky="sticky"
|
|
23
|
-
:icon="icon
|
|
23
|
+
:icon="icon"
|
|
24
24
|
:title="title"
|
|
25
25
|
@on-click="onMenuItemClick"
|
|
26
26
|
/>
|
|
@@ -70,7 +70,7 @@ export interface Props {
|
|
|
70
70
|
sticky?: boolean;
|
|
71
71
|
isVisible?: boolean;
|
|
72
72
|
component?: BladeConstructor;
|
|
73
|
-
icon?: string
|
|
73
|
+
icon?: string;
|
|
74
74
|
title?: string;
|
|
75
75
|
children?: BladeMenu[];
|
|
76
76
|
}
|
|
@@ -94,7 +94,6 @@ const props = withDefaults(defineProps<Props>(), {
|
|
|
94
94
|
});
|
|
95
95
|
|
|
96
96
|
const route = useRoute();
|
|
97
|
-
|
|
98
97
|
const emit = defineEmits<Emits>();
|
|
99
98
|
|
|
100
99
|
const isOpened = ref(false);
|
|
@@ -56,16 +56,9 @@
|
|
|
56
56
|
</div>
|
|
57
57
|
</template>
|
|
58
58
|
|
|
59
|
-
<script lang="ts">
|
|
60
|
-
import { defineComponent, getCurrentInstance, markRaw } from "vue";
|
|
61
|
-
import { BladeMenu, IBladeToolbar } from "../../../../core/types";
|
|
62
|
-
|
|
63
|
-
export default defineComponent({
|
|
64
|
-
inheritAttrs: false,
|
|
65
|
-
});
|
|
66
|
-
</script>
|
|
67
|
-
|
|
68
59
|
<script lang="ts" setup>
|
|
60
|
+
import { getCurrentInstance, markRaw } from "vue";
|
|
61
|
+
import { BladeMenu, IBladeToolbar } from "../../../../core/types";
|
|
69
62
|
import VcAppBar from "./_internal/vc-app-bar/vc-app-bar.vue";
|
|
70
63
|
import VcAppMenu from "./_internal/vc-app-menu/vc-app-menu.vue";
|
|
71
64
|
import { BladePageComponent, IBladeRef, useBladeNavigation } from "./../../../../shared";
|
|
@@ -90,6 +83,10 @@ export interface Emits {
|
|
|
90
83
|
(event: "logo:click"): void;
|
|
91
84
|
}
|
|
92
85
|
|
|
86
|
+
defineOptions({
|
|
87
|
+
inheritAttrs: false,
|
|
88
|
+
});
|
|
89
|
+
|
|
93
90
|
withDefaults(defineProps<Props>(), {
|
|
94
91
|
pages: () => [],
|
|
95
92
|
menuItems: () => [],
|
|
@@ -47,15 +47,8 @@
|
|
|
47
47
|
</div>
|
|
48
48
|
</template>
|
|
49
49
|
|
|
50
|
-
<script lang="ts">
|
|
51
|
-
import { defineComponent, ref, computed, nextTick } from "vue";
|
|
52
|
-
|
|
53
|
-
export default defineComponent({
|
|
54
|
-
inheritAttrs: false,
|
|
55
|
-
});
|
|
56
|
-
</script>
|
|
57
|
-
|
|
58
50
|
<script lang="ts" setup>
|
|
51
|
+
import { ref, computed, nextTick } from "vue";
|
|
59
52
|
import { VcIcon } from "./../../../../../../";
|
|
60
53
|
import { offset, computePosition, ComputePositionReturn } from "@floating-ui/vue";
|
|
61
54
|
import { IBladeDropdownItem } from "./../../../../../../../../core/types";
|
|
@@ -74,6 +67,10 @@ export interface Emits {
|
|
|
74
67
|
(event: "click"): void;
|
|
75
68
|
}
|
|
76
69
|
|
|
70
|
+
defineOptions({
|
|
71
|
+
inheritAttrs: false,
|
|
72
|
+
});
|
|
73
|
+
|
|
77
74
|
const props = withDefaults(defineProps<Props>(), {
|
|
78
75
|
disabled: false,
|
|
79
76
|
isExpanded: true,
|