@vc-shell/framework 1.1.25 → 1.1.27
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/useAppInsights/index.ts +2 -2
- package/core/composables/useErrorHandler/index.ts +3 -2
- package/core/composables/useGlobalSearch/useGlobalSearch.md +263 -0
- package/core/composables/usePermissions/index.ts +2 -2
- package/core/composables/useTheme/index.ts +74 -26
- package/core/composables/useUser/index.ts +29 -8
- package/core/composables/useUserManagement/index.ts +45 -0
- package/core/interceptors/index.ts +2 -2
- package/core/plugins/signalR/index.ts +2 -2
- package/core/services/global-search-service/global-search-service.md +203 -0
- package/core/services/widget-service.ts +35 -12
- package/dist/core/composables/useErrorHandler/index.d.ts.map +1 -1
- package/dist/core/composables/useTheme/index.d.ts +14 -5
- package/dist/core/composables/useTheme/index.d.ts.map +1 -1
- package/dist/core/composables/useUser/index.d.ts +11 -3
- package/dist/core/composables/useUser/index.d.ts.map +1 -1
- package/dist/core/composables/useUserManagement/index.d.ts +23 -0
- package/dist/core/composables/useUserManagement/index.d.ts.map +1 -0
- package/dist/core/services/widget-service.d.ts +9 -7
- package/dist/core/services/widget-service.d.ts.map +1 -1
- package/dist/framework.js +94 -93
- package/dist/{index-BnqqEJTE.js → index-7QxPGzyc.js} +1 -1
- package/dist/{index-BbuBDu8A.js → index-BTSkZXT8.js} +1 -1
- package/dist/{index-Cmbxdwnl.js → index-BY-R-HdZ.js} +1 -1
- package/dist/{index-BLmjssqE.js → index-BZxRjAGk.js} +1 -1
- package/dist/{index-DAnceKLv.js → index-BqYr-8f0.js} +1 -1
- package/dist/{index-Cxkjjuah.js → index-BzqwPR6i.js} +1 -1
- package/dist/{index-Br7ZwtRW.js → index-C0M62ScY.js} +1 -1
- package/dist/{index-eOG-NNYN.js → index-C3-32wVM.js} +1 -1
- package/dist/{index-cuex9jil.js → index-CDDikrWT.js} +1 -1
- package/dist/{index-CGL9e-cM.js → index-D0ULQYO-.js} +1 -1
- package/dist/{index-CRwMOCjN.js → index-DH6g1vn6.js} +1 -1
- package/dist/{index-DvenBxy6.js → index-DOWE0lAY.js} +23639 -23558
- package/dist/{index-DoArZBIw.js → index-DgTmfnFD.js} +1 -1
- package/dist/{index-CLAYu8Qj.js → index-DjFrEbcz.js} +1 -1
- package/dist/{index-CIzLBvgg.js → index-Ytl5MiZA.js} +1 -1
- package/dist/{index-Dk1K3-27.js → index-bTh-yQ1Q.js} +1 -1
- package/dist/{index-BYcoxn-f.js → index-copXmHaa.js} +1 -1
- package/dist/index.css +1 -1
- package/dist/locales/de.json +6 -0
- package/dist/locales/en.json +6 -0
- package/dist/shared/components/change-password/change-password.vue.d.ts.map +1 -1
- package/dist/shared/components/notifications/components/notification-container/index.d.ts +1 -1
- package/dist/shared/components/notifications/components/notification-container/index.d.ts.map +1 -1
- package/dist/shared/components/settings-menu/settings-menu.vue.d.ts.map +1 -1
- package/dist/shared/components/settings-menu-item/settings-menu-item.vue.d.ts +6 -11
- package/dist/shared/components/settings-menu-item/settings-menu-item.vue.d.ts.map +1 -1
- package/dist/shared/components/sidebar/sidebar.vue.d.ts +3 -11
- package/dist/shared/components/sidebar/sidebar.vue.d.ts.map +1 -1
- package/dist/shared/components/theme-selector/theme-selector.vue.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/pages/dynamic-blade-form.vue.d.ts.map +1 -1
- package/dist/shared/pages/InvitePage/components/invite/Invite.vue.d.ts.map +1 -1
- package/dist/shared/pages/LoginPage/components/login/Login.vue.d.ts.map +1 -1
- package/dist/shared/pages/ResetPasswordPage/components/reset-password/ResetPassword.vue.d.ts.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/ui/components/atoms/vc-widget/vc-widget.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-input-dropdown/vc-input-dropdown.vue.d.ts.map +1 -1
- 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-widget-container/_internal/vc-widget-container-desktop.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-blade/_internal/vc-blade-widget-container/_internal/vc-widget-container-mobile.vue.d.ts.map +1 -1
- 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/package.json +4 -4
- package/shared/components/change-password/change-password.vue +2 -3
- package/shared/components/logout-button/logout-button.vue +2 -2
- package/shared/components/settings-menu/settings-menu.vue +1 -4
- package/shared/components/settings-menu-item/settings-menu-item.vue +9 -1
- package/shared/components/sidebar/sidebar.vue +6 -1
- package/shared/components/theme-selector/theme-selector.vue +11 -11
- package/shared/components/user-dropdown-button/_internal/user-info.vue +2 -2
- package/shared/modules/dynamic/pages/dynamic-blade-form.vue +1 -0
- package/shared/pages/InvitePage/components/invite/Invite.vue +217 -216
- package/shared/pages/LoginPage/components/login/Login.vue +3 -2
- package/shared/pages/ResetPasswordPage/components/reset-password/ResetPassword.vue +3 -2
- package/ui/components/atoms/vc-widget/vc-widget.vue +13 -6
- package/ui/components/molecules/vc-input-dropdown/vc-input-dropdown.stories.ts +0 -2
- package/ui/components/molecules/vc-input-dropdown/vc-input-dropdown.vue +11 -0
- package/ui/components/organisms/vc-app/vc-app.vue +4 -3
- package/ui/components/organisms/vc-blade/_internal/vc-blade-widget-container/_internal/vc-widget-container-desktop.vue +2 -1
- package/ui/components/organisms/vc-blade/_internal/vc-blade-widget-container/_internal/vc-widget-container-mobile.vue +2 -0
- package/ui/components/organisms/vc-popup/vc-popup.stories.ts +398 -0
- package/ui/components/organisms/vc-popup/vc-popup.vue +1 -1
|
@@ -1,216 +1,217 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="vc-invite-page">
|
|
3
|
-
<VcLoading
|
|
4
|
-
v-if="loading"
|
|
5
|
-
active
|
|
6
|
-
></VcLoading>
|
|
7
|
-
|
|
8
|
-
<VcLoginForm
|
|
9
|
-
:logo="customization.logo"
|
|
10
|
-
:background="background"
|
|
11
|
-
:title="t('INVITATION.TITLE')"
|
|
12
|
-
>
|
|
13
|
-
<VcForm>
|
|
14
|
-
<VcInput
|
|
15
|
-
class="vc-invite-page__input"
|
|
16
|
-
:label="t('INVITATION.FIELDS.EMAIL.LABEL')"
|
|
17
|
-
:model-value="userName"
|
|
18
|
-
name="username"
|
|
19
|
-
disabled
|
|
20
|
-
></VcInput>
|
|
21
|
-
|
|
22
|
-
<Field
|
|
23
|
-
v-slot="{ field, errorMessage, handleChange, errors }"
|
|
24
|
-
:label="t('INVITATION.FIELDS.PASSWORD.LABEL')"
|
|
25
|
-
:model-value="form.password"
|
|
26
|
-
rules="required"
|
|
27
|
-
name="password"
|
|
28
|
-
>
|
|
29
|
-
<VcInput
|
|
30
|
-
v-bind="field"
|
|
31
|
-
ref="passwordField"
|
|
32
|
-
v-model="form.password"
|
|
33
|
-
class="vc-invite-page__input"
|
|
34
|
-
:label="t('INVITATION.FIELDS.PASSWORD.LABEL')"
|
|
35
|
-
:placeholder="t('INVITATION.FIELDS.PASSWORD.PLACEHOLDER')"
|
|
36
|
-
type="password"
|
|
37
|
-
:disabled="!form.tokenIsValid"
|
|
38
|
-
:error="!!errors.length"
|
|
39
|
-
:error-message="errorMessage"
|
|
40
|
-
required
|
|
41
|
-
@update:model-value="
|
|
42
|
-
(e) => {
|
|
43
|
-
handleChange(e);
|
|
44
|
-
validate();
|
|
45
|
-
}
|
|
46
|
-
"
|
|
47
|
-
></VcInput>
|
|
48
|
-
</Field>
|
|
49
|
-
|
|
50
|
-
<Field
|
|
51
|
-
v-slot="{ field, errorMessage, handleChange, errors }"
|
|
52
|
-
:label="t('INVITATION.FIELDS.CONFIRM_PASSWORD.LABEL')"
|
|
53
|
-
:model-value="form.confirmPassword"
|
|
54
|
-
rules="required"
|
|
55
|
-
name="confirm_password"
|
|
56
|
-
>
|
|
57
|
-
<VcInput
|
|
58
|
-
v-bind="field"
|
|
59
|
-
ref="confirmPasswordField"
|
|
60
|
-
v-model="form.confirmPassword"
|
|
61
|
-
class="vc-invite-page__input--small"
|
|
62
|
-
:label="t('INVITATION.FIELDS.CONFIRM_PASSWORD.LABEL')"
|
|
63
|
-
:placeholder="t('INVITATION.FIELDS.CONFIRM_PASSWORD.PLACEHOLDER')"
|
|
64
|
-
:disabled="!form.tokenIsValid"
|
|
65
|
-
type="password"
|
|
66
|
-
:error="!!errors.length"
|
|
67
|
-
:error-message="errorMessage"
|
|
68
|
-
required
|
|
69
|
-
@update:model-value="
|
|
70
|
-
(e) => {
|
|
71
|
-
handleChange(e);
|
|
72
|
-
validate();
|
|
73
|
-
}
|
|
74
|
-
"
|
|
75
|
-
@keyup.enter="acceptInvitation"
|
|
76
|
-
></VcInput>
|
|
77
|
-
</Field>
|
|
78
|
-
|
|
79
|
-
<div class="vc-invite-page__button-container">
|
|
80
|
-
<span
|
|
81
|
-
v-if="$isDesktop.value"
|
|
82
|
-
class="vc-invite-page__spacer"
|
|
83
|
-
></span>
|
|
84
|
-
<vc-button
|
|
85
|
-
:disabled="loading || !form.isValid || !form.tokenIsValid"
|
|
86
|
-
@click="acceptInvitation"
|
|
87
|
-
>
|
|
88
|
-
{{ t("INVITATION.ACCEPT_INVITATION") }}
|
|
89
|
-
</vc-button>
|
|
90
|
-
</div>
|
|
91
|
-
|
|
92
|
-
<VcHint
|
|
93
|
-
v-for="error in form.errors"
|
|
94
|
-
:key="error"
|
|
95
|
-
class="vc-invite-page__hint"
|
|
96
|
-
style="color: #f14e4e"
|
|
97
|
-
>
|
|
98
|
-
<!-- TODO: stylizing-->
|
|
99
|
-
{{ t(`INVITATION.ERRORS.${error}`) }}
|
|
100
|
-
</VcHint>
|
|
101
|
-
</VcForm>
|
|
102
|
-
</VcLoginForm>
|
|
103
|
-
</div>
|
|
104
|
-
</template>
|
|
105
|
-
|
|
106
|
-
<script lang="ts" setup>
|
|
107
|
-
import { reactive, onMounted, computed } from "vue";
|
|
108
|
-
import { useRouter } from "vue-router";
|
|
109
|
-
import { useIsFormValid, Field, useIsFormDirty, useForm } from "vee-validate";
|
|
110
|
-
import {
|
|
111
|
-
import { useI18n } from "vue-i18n";
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
const
|
|
131
|
-
const
|
|
132
|
-
const
|
|
133
|
-
const
|
|
134
|
-
const
|
|
135
|
-
const
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
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
|
-
}
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<div class="vc-invite-page">
|
|
3
|
+
<VcLoading
|
|
4
|
+
v-if="loading"
|
|
5
|
+
active
|
|
6
|
+
></VcLoading>
|
|
7
|
+
|
|
8
|
+
<VcLoginForm
|
|
9
|
+
:logo="customization.logo"
|
|
10
|
+
:background="background"
|
|
11
|
+
:title="t('INVITATION.TITLE')"
|
|
12
|
+
>
|
|
13
|
+
<VcForm>
|
|
14
|
+
<VcInput
|
|
15
|
+
class="vc-invite-page__input"
|
|
16
|
+
:label="t('INVITATION.FIELDS.EMAIL.LABEL')"
|
|
17
|
+
:model-value="userName"
|
|
18
|
+
name="username"
|
|
19
|
+
disabled
|
|
20
|
+
></VcInput>
|
|
21
|
+
|
|
22
|
+
<Field
|
|
23
|
+
v-slot="{ field, errorMessage, handleChange, errors }"
|
|
24
|
+
:label="t('INVITATION.FIELDS.PASSWORD.LABEL')"
|
|
25
|
+
:model-value="form.password"
|
|
26
|
+
rules="required"
|
|
27
|
+
name="password"
|
|
28
|
+
>
|
|
29
|
+
<VcInput
|
|
30
|
+
v-bind="field"
|
|
31
|
+
ref="passwordField"
|
|
32
|
+
v-model="form.password"
|
|
33
|
+
class="vc-invite-page__input"
|
|
34
|
+
:label="t('INVITATION.FIELDS.PASSWORD.LABEL')"
|
|
35
|
+
:placeholder="t('INVITATION.FIELDS.PASSWORD.PLACEHOLDER')"
|
|
36
|
+
type="password"
|
|
37
|
+
:disabled="!form.tokenIsValid"
|
|
38
|
+
:error="!!errors.length"
|
|
39
|
+
:error-message="errorMessage"
|
|
40
|
+
required
|
|
41
|
+
@update:model-value="
|
|
42
|
+
(e) => {
|
|
43
|
+
handleChange(e);
|
|
44
|
+
validate();
|
|
45
|
+
}
|
|
46
|
+
"
|
|
47
|
+
></VcInput>
|
|
48
|
+
</Field>
|
|
49
|
+
|
|
50
|
+
<Field
|
|
51
|
+
v-slot="{ field, errorMessage, handleChange, errors }"
|
|
52
|
+
:label="t('INVITATION.FIELDS.CONFIRM_PASSWORD.LABEL')"
|
|
53
|
+
:model-value="form.confirmPassword"
|
|
54
|
+
rules="required"
|
|
55
|
+
name="confirm_password"
|
|
56
|
+
>
|
|
57
|
+
<VcInput
|
|
58
|
+
v-bind="field"
|
|
59
|
+
ref="confirmPasswordField"
|
|
60
|
+
v-model="form.confirmPassword"
|
|
61
|
+
class="vc-invite-page__input--small"
|
|
62
|
+
:label="t('INVITATION.FIELDS.CONFIRM_PASSWORD.LABEL')"
|
|
63
|
+
:placeholder="t('INVITATION.FIELDS.CONFIRM_PASSWORD.PLACEHOLDER')"
|
|
64
|
+
:disabled="!form.tokenIsValid"
|
|
65
|
+
type="password"
|
|
66
|
+
:error="!!errors.length"
|
|
67
|
+
:error-message="errorMessage"
|
|
68
|
+
required
|
|
69
|
+
@update:model-value="
|
|
70
|
+
(e) => {
|
|
71
|
+
handleChange(e);
|
|
72
|
+
validate();
|
|
73
|
+
}
|
|
74
|
+
"
|
|
75
|
+
@keyup.enter="acceptInvitation"
|
|
76
|
+
></VcInput>
|
|
77
|
+
</Field>
|
|
78
|
+
|
|
79
|
+
<div class="vc-invite-page__button-container">
|
|
80
|
+
<span
|
|
81
|
+
v-if="$isDesktop.value"
|
|
82
|
+
class="vc-invite-page__spacer"
|
|
83
|
+
></span>
|
|
84
|
+
<vc-button
|
|
85
|
+
:disabled="loading || !form.isValid || !form.tokenIsValid"
|
|
86
|
+
@click="acceptInvitation"
|
|
87
|
+
>
|
|
88
|
+
{{ t("INVITATION.ACCEPT_INVITATION") }}
|
|
89
|
+
</vc-button>
|
|
90
|
+
</div>
|
|
91
|
+
|
|
92
|
+
<VcHint
|
|
93
|
+
v-for="error in form.errors"
|
|
94
|
+
:key="error"
|
|
95
|
+
class="vc-invite-page__hint"
|
|
96
|
+
style="color: #f14e4e"
|
|
97
|
+
>
|
|
98
|
+
<!-- TODO: stylizing-->
|
|
99
|
+
{{ t(`INVITATION.ERRORS.${error}`) }}
|
|
100
|
+
</VcHint>
|
|
101
|
+
</VcForm>
|
|
102
|
+
</VcLoginForm>
|
|
103
|
+
</div>
|
|
104
|
+
</template>
|
|
105
|
+
|
|
106
|
+
<script lang="ts" setup>
|
|
107
|
+
import { reactive, onMounted, computed } from "vue";
|
|
108
|
+
import { useRouter } from "vue-router";
|
|
109
|
+
import { useIsFormValid, Field, useIsFormDirty, useForm } from "vee-validate";
|
|
110
|
+
import { useSettings } from "./../../../../../core/composables";
|
|
111
|
+
import { useI18n } from "vue-i18n";
|
|
112
|
+
import { useUserManagement } from "./../../../../../core/composables/useUserManagement";
|
|
113
|
+
|
|
114
|
+
useForm({ validateOnMount: false });
|
|
115
|
+
|
|
116
|
+
const props = withDefaults(
|
|
117
|
+
defineProps<{
|
|
118
|
+
userId: string;
|
|
119
|
+
userName: string;
|
|
120
|
+
token: string;
|
|
121
|
+
logo: string;
|
|
122
|
+
background: string;
|
|
123
|
+
}>(),
|
|
124
|
+
{
|
|
125
|
+
background: "/assets/background.jpg",
|
|
126
|
+
logo: "/assets/logo-white.svg",
|
|
127
|
+
},
|
|
128
|
+
);
|
|
129
|
+
|
|
130
|
+
const { validateToken, validatePassword, resetPasswordByToken, signIn, loading } = useUserManagement();
|
|
131
|
+
const router = useRouter();
|
|
132
|
+
const { t } = useI18n({ useScope: "global" });
|
|
133
|
+
const isFormValid = useIsFormValid();
|
|
134
|
+
const isDirty = useIsFormDirty();
|
|
135
|
+
const { uiSettings, loading: customizationLoading } = useSettings();
|
|
136
|
+
const form = reactive<{
|
|
137
|
+
isValid: boolean;
|
|
138
|
+
tokenIsValid: boolean;
|
|
139
|
+
errors: string[];
|
|
140
|
+
password: string;
|
|
141
|
+
confirmPassword: string;
|
|
142
|
+
}>({
|
|
143
|
+
isValid: false,
|
|
144
|
+
tokenIsValid: false,
|
|
145
|
+
errors: [],
|
|
146
|
+
password: "",
|
|
147
|
+
confirmPassword: "",
|
|
148
|
+
});
|
|
149
|
+
|
|
150
|
+
const isDisabled = computed(() => {
|
|
151
|
+
return !isDirty.value || !isFormValid.value;
|
|
152
|
+
});
|
|
153
|
+
|
|
154
|
+
onMounted(async () => {
|
|
155
|
+
form.tokenIsValid = await validateToken(props.userId, props.token);
|
|
156
|
+
if (!form.tokenIsValid) {
|
|
157
|
+
form.errors.push("Invalid-token");
|
|
158
|
+
}
|
|
159
|
+
});
|
|
160
|
+
|
|
161
|
+
const validate = async () => {
|
|
162
|
+
if (form.tokenIsValid) {
|
|
163
|
+
const errors = (await validatePassword(form.password)).errors;
|
|
164
|
+
form.errors = errors?.map((x) => x.code) as string[];
|
|
165
|
+
if (form.confirmPassword && form.confirmPassword !== form.password) {
|
|
166
|
+
form.errors.push("Repeat-password");
|
|
167
|
+
}
|
|
168
|
+
form.isValid = form.errors.length == 0 && !isDisabled.value;
|
|
169
|
+
}
|
|
170
|
+
};
|
|
171
|
+
|
|
172
|
+
const acceptInvitation = async () => {
|
|
173
|
+
const result = await resetPasswordByToken(props.userId, form.password, props.token);
|
|
174
|
+
if (result.succeeded) {
|
|
175
|
+
const result = await signIn(props.userName, form.password);
|
|
176
|
+
if (result.succeeded) {
|
|
177
|
+
router.push("/");
|
|
178
|
+
} else {
|
|
179
|
+
// form.errors = [result.errorCode as string];
|
|
180
|
+
}
|
|
181
|
+
} else {
|
|
182
|
+
form.errors = result.errors as string[];
|
|
183
|
+
}
|
|
184
|
+
};
|
|
185
|
+
|
|
186
|
+
const customization = computed(() => {
|
|
187
|
+
return {
|
|
188
|
+
logo: !customizationLoading.value ? uiSettings.value?.logo || props.logo : "",
|
|
189
|
+
};
|
|
190
|
+
});
|
|
191
|
+
</script>
|
|
192
|
+
|
|
193
|
+
<style lang="scss">
|
|
194
|
+
.vc-invite-page {
|
|
195
|
+
@apply tw-w-full tw-h-full tw-box-border tw-flex tw-flex-col tw-items-center tw-m-0;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.vc-invite-page__input {
|
|
199
|
+
@apply tw-mb-4 tw-mt-1;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
.vc-invite-page__input--small {
|
|
203
|
+
@apply tw-mb-4;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
.vc-invite-page__button-container {
|
|
207
|
+
@apply tw-flex tw-justify-center tw-items-center tw-pt-2;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
.vc-invite-page__spacer {
|
|
211
|
+
@apply tw-grow tw-basis-0;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
.vc-invite-page__hint {
|
|
215
|
+
@apply tw-mt-3;
|
|
216
|
+
}
|
|
217
|
+
</style>
|
|
@@ -173,7 +173,8 @@
|
|
|
173
173
|
import { ref, reactive, computed, onMounted, Ref, inject } from "vue";
|
|
174
174
|
import { useRouter } from "vue-router";
|
|
175
175
|
import { useIsFormValid, Field, useIsFormDirty, useForm } from "vee-validate";
|
|
176
|
-
import { useSettings
|
|
176
|
+
import { useSettings } from "./../../../../../core/composables";
|
|
177
|
+
import { useUserManagement } from "./../../../../../core/composables/useUserManagement";
|
|
177
178
|
import { RequestPasswordResult } from "./../../../../../core/types";
|
|
178
179
|
import { ExternalSignInProviderInfo, SignInResult } from "./../../../../../core/api/platform";
|
|
179
180
|
import { useI18n } from "vue-i18n";
|
|
@@ -201,7 +202,7 @@ let useLogin;
|
|
|
201
202
|
const signInResult = ref({ succeeded: true }) as Ref<SignInResult & { status?: number; error?: any }>;
|
|
202
203
|
const requestPassResult = ref<RequestPasswordResult>({ succeeded: true });
|
|
203
204
|
const forgotPasswordRequestSent = ref(false);
|
|
204
|
-
const { signIn, loading, user } =
|
|
205
|
+
const { signIn, loading, user } = useUserManagement();
|
|
205
206
|
const { getProviders } = useExternalProvider();
|
|
206
207
|
|
|
207
208
|
const isLogin = ref(true);
|
|
@@ -100,8 +100,9 @@
|
|
|
100
100
|
import { reactive, onMounted, computed } from "vue";
|
|
101
101
|
import { useRouter } from "vue-router";
|
|
102
102
|
import { Field, useForm } from "vee-validate";
|
|
103
|
-
import {
|
|
103
|
+
import { useSettings } from "./../../../../../core/composables";
|
|
104
104
|
import { useI18n } from "vue-i18n";
|
|
105
|
+
import { useUserManagement } from "./../../../../../core/composables/useUserManagement";
|
|
105
106
|
|
|
106
107
|
const props = withDefaults(
|
|
107
108
|
defineProps<{
|
|
@@ -117,7 +118,7 @@ const props = withDefaults(
|
|
|
117
118
|
},
|
|
118
119
|
);
|
|
119
120
|
|
|
120
|
-
const { validateToken, validatePassword, resetPasswordByToken, signIn, loading } =
|
|
121
|
+
const { validateToken, validatePassword, resetPasswordByToken, signIn, loading } = useUserManagement();
|
|
121
122
|
const router = useRouter();
|
|
122
123
|
const { t } = useI18n({ useScope: "global" });
|
|
123
124
|
const { validate: veeValidate } = useForm({ validateOnMount: false });
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div
|
|
3
3
|
class="vc-widget"
|
|
4
|
-
:data-widget-id="
|
|
4
|
+
:data-widget-id="actualWidgetId"
|
|
5
5
|
:data-widget-name="title"
|
|
6
6
|
:class="[
|
|
7
7
|
{ 'vc-widget--expanded': isExpanded },
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
</template>
|
|
39
39
|
|
|
40
40
|
<script lang="ts" setup>
|
|
41
|
-
import { computed, getCurrentInstance } from "vue";
|
|
41
|
+
import { computed, getCurrentInstance, useAttrs } from "vue";
|
|
42
42
|
import { VcIcon } from "./../vc-icon";
|
|
43
43
|
import { useWidgets } from "../../../../core/composables";
|
|
44
44
|
|
|
@@ -57,15 +57,22 @@ const emit = defineEmits<{
|
|
|
57
57
|
}>();
|
|
58
58
|
|
|
59
59
|
const instance = getCurrentInstance();
|
|
60
|
-
|
|
60
|
+
const attrs = useAttrs();
|
|
61
61
|
const widgetService = useWidgets();
|
|
62
62
|
|
|
63
|
-
|
|
63
|
+
// Get widgetId from attributes passed by the parent container
|
|
64
|
+
const actualWidgetId = computed(() => (attrs.widgetId || attrs["widget-id"]) as string | undefined);
|
|
64
65
|
|
|
65
66
|
function onClick() {
|
|
66
67
|
if (!props.disabled) {
|
|
67
|
-
|
|
68
|
-
|
|
68
|
+
// Use the actualWidgetId from attrs
|
|
69
|
+
if (actualWidgetId.value && instance?.parent?.exposed) {
|
|
70
|
+
widgetService.setActiveWidget({
|
|
71
|
+
exposed: instance.parent.exposed,
|
|
72
|
+
widgetId: actualWidgetId.value,
|
|
73
|
+
});
|
|
74
|
+
} else if (!actualWidgetId.value) {
|
|
75
|
+
console.warn("VcWidget: widgetId is missing from attrs. Widget activation might not work as expected.");
|
|
69
76
|
}
|
|
70
77
|
emit("click");
|
|
71
78
|
}
|
|
@@ -273,8 +273,6 @@ const meta = {
|
|
|
273
273
|
docs: {
|
|
274
274
|
description: {
|
|
275
275
|
component: `
|
|
276
|
-
### VcInputDropdown Component
|
|
277
|
-
|
|
278
276
|
The VcInputDropdown component combines an input field with a dropdown selection in a unified interface.
|
|
279
277
|
This creates a powerful and flexible control ideal for scenarios where users need to both input a value
|
|
280
278
|
and select a category, unit, or format for that value.
|
|
@@ -58,6 +58,13 @@
|
|
|
58
58
|
</button>
|
|
59
59
|
</template>
|
|
60
60
|
</slot>
|
|
61
|
+
<VcButton
|
|
62
|
+
icon="material-keyboard_arrow_down"
|
|
63
|
+
icon-size="s"
|
|
64
|
+
text
|
|
65
|
+
icon-class="vc-input-dropdown__toggle-button-icon"
|
|
66
|
+
@click.stop.prevent="toggleHandler"
|
|
67
|
+
></VcButton>
|
|
61
68
|
<slot
|
|
62
69
|
v-if="$slots['append-inner']"
|
|
63
70
|
name="append-inner"
|
|
@@ -281,5 +288,9 @@ defineEmits<Emits>();
|
|
|
281
288
|
&__toggle-button {
|
|
282
289
|
@apply tw-text-[color:var(--input-dropdown-toggle-color)] tw-not-italic tw-font-medium tw-text-sm tw-cursor-pointer;
|
|
283
290
|
}
|
|
291
|
+
|
|
292
|
+
&__toggle-button-icon {
|
|
293
|
+
@apply tw-text-[color:var(--input-dropdown-toggle-color)];
|
|
294
|
+
}
|
|
284
295
|
}
|
|
285
296
|
</style>
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
</template>
|
|
68
68
|
<!-- eslint-disable @typescript-eslint/no-explicit-any -->
|
|
69
69
|
<script lang="ts" setup>
|
|
70
|
-
import { inject, provide,
|
|
70
|
+
import { inject, provide, watch, ref, onUnmounted, computed } from "vue";
|
|
71
71
|
import VcAppBar from "./_internal/vc-app-bar/vc-app-bar.vue";
|
|
72
72
|
import VcAppMenu from "./_internal/vc-app-menu/vc-app-menu.vue";
|
|
73
73
|
import {
|
|
@@ -78,7 +78,7 @@ import {
|
|
|
78
78
|
NotificationDropdown,
|
|
79
79
|
BladeRoutesRecord,
|
|
80
80
|
} from "./../../../../shared/components";
|
|
81
|
-
import { provideAppBarWidget,
|
|
81
|
+
import { provideAppBarWidget, useNotifications } from "../../../../core/composables";
|
|
82
82
|
import { useRoute, useRouter } from "vue-router";
|
|
83
83
|
import { watchOnce } from "@vueuse/core";
|
|
84
84
|
import { MenuItem } from "../../../../core/types";
|
|
@@ -94,6 +94,7 @@ import { DynamicModulesKey } from "../../../../injection-keys";
|
|
|
94
94
|
import { provideMenuService } from "../../../../core/composables/useMenuService";
|
|
95
95
|
import { BellIcon } from "../../atoms/vc-icon/icons";
|
|
96
96
|
import { provideAppBarMobileButtonsService } from "../../../../core/composables/useAppBarMobileButtons";
|
|
97
|
+
import { useUserManagement } from "../../../../core/composables/useUserManagement";
|
|
97
98
|
|
|
98
99
|
export interface Props {
|
|
99
100
|
isReady: boolean;
|
|
@@ -134,7 +135,7 @@ const { appsList, switchApp, getApps } = useAppSwitcher();
|
|
|
134
135
|
|
|
135
136
|
const { loadFromHistory, notifications, markAllAsRead } = useNotifications();
|
|
136
137
|
const route = useRoute();
|
|
137
|
-
const { isAuthenticated } =
|
|
138
|
+
const { isAuthenticated } = useUserManagement();
|
|
138
139
|
|
|
139
140
|
const routes = router.getRoutes();
|
|
140
141
|
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
v-for="widget in displayedItems"
|
|
7
7
|
:key="widget.id"
|
|
8
8
|
v-bind="widget.props || {}"
|
|
9
|
+
:widget-id="widget.id"
|
|
9
10
|
v-on="widget.events || {}"
|
|
10
11
|
/>
|
|
11
12
|
|
|
@@ -34,6 +35,7 @@
|
|
|
34
35
|
class="tw-p-3 tw-w-full"
|
|
35
36
|
v-bind="item.props || {}"
|
|
36
37
|
horizontal
|
|
38
|
+
:widget-id="item.id"
|
|
37
39
|
v-on="item.events || {}"
|
|
38
40
|
/>
|
|
39
41
|
</template>
|
|
@@ -54,7 +56,6 @@ interface Props {
|
|
|
54
56
|
}
|
|
55
57
|
|
|
56
58
|
const props = defineProps<Props>();
|
|
57
|
-
const normalizedBladeId = computed(() => props.bladeId?.toLowerCase() || "");
|
|
58
59
|
const showToolbar = ref(false);
|
|
59
60
|
|
|
60
61
|
const displayedItems = computed(() => props.widgets.slice(0, 3));
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
:key="widget.id"
|
|
14
14
|
v-bind="widget.props || {}"
|
|
15
15
|
:data-item-key="widget.id"
|
|
16
|
+
:widget-id="widget.id"
|
|
16
17
|
v-on="widget.events || {}"
|
|
17
18
|
/>
|
|
18
19
|
|
|
@@ -42,6 +43,7 @@
|
|
|
42
43
|
class="tw-p-3 tw-w-full"
|
|
43
44
|
v-bind="item.props || {}"
|
|
44
45
|
horizontal
|
|
46
|
+
:widget-id="item.id"
|
|
45
47
|
v-on="item.events || {}"
|
|
46
48
|
/>
|
|
47
49
|
</template>
|