@designcrowd/fe-shared-lib 1.2.8 → 1.2.9-icon-remove-title-desc
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/.storybook-static/assets/Auth-Cog6hw8U.css +1 -0
- package/.storybook-static/assets/Auth.stories-CbTWisKB.js +490 -0
- package/.storybook-static/assets/AuthCrazyDomains.stories-Dsjxh-je.js +73 -0
- package/.storybook-static/assets/Button-Dt0lL0uX.css +1 -0
- package/.storybook-static/assets/Button-IgCxbLvL.js +1 -0
- package/.storybook-static/assets/ButtonGroup-JjgCZ8Bt.css +1 -0
- package/.storybook-static/assets/ButtonGroup.stories-yhUiem6j.js +494 -0
- package/.storybook-static/assets/ButtonPrimary-CFNYtrCi.css +1 -0
- package/.storybook-static/assets/ButtonPrimary-Ce51KkgM.js +1 -0
- package/.storybook-static/assets/Buttons.stories-C7AZ07ow.js +699 -0
- package/.storybook-static/assets/ButtonsCrazyDomains.stories-DgtyyoFM.js +199 -0
- package/.storybook-static/assets/Checkbox.mixin-DkHpdvGa.js +1 -0
- package/.storybook-static/assets/Checkbox.stories-12upKauG.js +203 -0
- package/.storybook-static/assets/Checktile.stories-8H8_5ia-.js +88 -0
- package/.storybook-static/assets/CollapsiblePanel.stories-Cs6gaONK.js +39 -0
- package/.storybook-static/assets/Color-RQJUDNI5-B-WwomMi.js +1 -0
- package/.storybook-static/assets/ColorPicker.stories-DriJaUqB.js +73 -0
- package/.storybook-static/assets/CopyToClipboardText.stories-r9YFXGiX.js +32 -0
- package/.storybook-static/assets/DocsRenderer-K4EAMTCU-BflUCOHA.js +513 -0
- package/.storybook-static/assets/Dropdown.stories-D1RPdExw.js +154 -0
- package/.storybook-static/assets/DropdownItem-BQ0eJTHo.css +1 -0
- package/.storybook-static/assets/DropdownItem-C4PFbXSv.js +1 -0
- package/.storybook-static/assets/FormControl.mixin-BIPKWa5J.js +1 -0
- package/.storybook-static/assets/HashRouteModal.stories-jZo8F3lr.js +64 -0
- package/.storybook-static/assets/HelloBar-CXc7uecf.js +1 -0
- package/.storybook-static/assets/HelloBar.stories-DJPqn9T0.js +342 -0
- package/.storybook-static/assets/Icon-B8lXgcc0.js +1 -0
- package/.storybook-static/assets/Icon.stories-B2K3kKRW.js +735 -0
- package/.storybook-static/assets/Icon.stories-z4pz6mSi.js +126 -0
- package/.storybook-static/assets/Loader-D6_mUM4g.js +1 -0
- package/.storybook-static/assets/LogoBusinessBrandColours-7RXxlPF7.js +1 -0
- package/.storybook-static/assets/LogoBusinessBrandColours-8SUh_BWV.css +1 -0
- package/.storybook-static/assets/LogoBusinessBrandColours.stories-Cc65CQQK.js +36 -0
- package/.storybook-static/assets/Masonry-Q4MdMr0_.css +1 -0
- package/.storybook-static/assets/Masonry.stories-CB-rWe0y.js +71 -0
- package/.storybook-static/assets/Modal-BOHOQzO4.js +1 -0
- package/.storybook-static/assets/Modal-MZ2jF3mP.css +1 -0
- package/.storybook-static/assets/Modal.stories-Hbi4v2MQ.js +380 -0
- package/.storybook-static/assets/Notice.stories-ChRjh1h1.js +222 -0
- package/.storybook-static/assets/NumberStepper.stories-D4c10_Cl.js +48 -0
- package/.storybook-static/assets/PaymentConfigList.stories-EUp7r4Ga.js +126 -0
- package/.storybook-static/assets/Picture-AUjTe_FO.js +1 -0
- package/.storybook-static/assets/Picture.stories-7_37X1oI.js +119 -0
- package/.storybook-static/assets/Pill-DEH_ScBa.js +1 -0
- package/.storybook-static/assets/Pill.stories-CKakcDo1.js +18 -0
- package/.storybook-static/assets/PillBar-BeJSf_Pk.css +1 -0
- package/.storybook-static/assets/PillBar.stories-BNwlQM4p.js +41 -0
- package/.storybook-static/assets/Price-BzFp3dn5.js +1 -0
- package/.storybook-static/assets/Price.stories-m0jztoEd.js +221 -0
- package/.storybook-static/assets/PublishBrandPageModal-BOGSPjB0.css +1 -0
- package/.storybook-static/assets/PublishBrandPageModal.stories-Bt2eK5tM.js +349 -0
- package/.storybook-static/assets/SearchBar.stories-DE7D9jqF.js +12 -0
- package/.storybook-static/assets/Select-BkD_4Yie.css +1 -0
- package/.storybook-static/assets/Select.stories-vMzrjNuo.js +108 -0
- package/.storybook-static/assets/SellDomainNameList.fixtures-LC6fjr_b.js +1 -0
- package/.storybook-static/assets/SellDomainNameListModal-DAV6wUWy.js +1 -0
- package/.storybook-static/assets/SellDomainNameListModal-geQc7R-K.css +1 -0
- package/.storybook-static/assets/SellDomainNameListModal.stories-BOCkiwOR.js +71 -0
- package/.storybook-static/assets/SellDomainNameListSearchResult-DP3zr-UL.js +1 -0
- package/.storybook-static/assets/SellDomainNameListSearchResult-Dtf2vM3k.css +1 -0
- package/.storybook-static/assets/SellDomainNameSearchWithResults--W028-5L.js +1 -0
- package/.storybook-static/assets/SellDomainNameSearchWithResults.stories-CCYgVB46.js +37 -0
- package/.storybook-static/assets/SellDomainNameWidget.stories-ukdr-BaU.js +36 -0
- package/.storybook-static/assets/SignIn-B9RTmsHO.css +1 -0
- package/.storybook-static/assets/SignIn-yR2yVQBY.js +1 -0
- package/.storybook-static/assets/Slider-CQ7DbC3q.css +1 -0
- package/.storybook-static/assets/Slider.stories-CwIY_YjL.js +129 -0
- package/.storybook-static/assets/StarRating-BRQqs_py.css +1 -0
- package/.storybook-static/assets/StarRating.stories-B2ZK1FmW.js +45 -0
- package/.storybook-static/assets/TabMenu.stories-Cr3TQSxW.js +47 -0
- package/.storybook-static/assets/TextCopyField-BuZ5L-lt.js +1 -0
- package/.storybook-static/assets/TextCopyField.stories-ivRqKsNm.js +47 -0
- package/.storybook-static/assets/TextInput-BepJC9nE.js +1 -0
- package/.storybook-static/assets/TextInput.stories-BW4TEkLR.js +233 -0
- package/.storybook-static/assets/Textarea.stories-DWkB6BWG.js +207 -0
- package/.storybook-static/assets/Toggle.stories-C_GsxzOh.js +161 -0
- package/.storybook-static/assets/Tooltip-BHf5qq0n.css +1 -0
- package/.storybook-static/assets/Tooltip-BQfusa53.js +1 -0
- package/.storybook-static/assets/Tooltip.stories-CAIFG7b2.js +953 -0
- package/.storybook-static/assets/UploadYourLogoApplication-CeFWp7qz.css +9 -0
- package/.storybook-static/assets/UploadYourLogoApplication.stories-C-OLYLzi.js +194 -0
- package/.storybook-static/assets/UploadYourLogoDropzone-BZeSfjIk.css +1 -0
- package/.storybook-static/assets/UploadYourLogoDropzone-Cxgdqo37.js +24 -0
- package/.storybook-static/assets/UploadYourLogoDropzone.stories-X-I5FYLu.js +35 -0
- package/.storybook-static/assets/UploadedLogoSearchResultCard.stories-B2kj1FVv.js +79 -0
- package/.storybook-static/assets/WithTooltip-Y7J54OF7-DkTQ6h6H.js +1 -0
- package/.storybook-static/assets/_commonjsHelpers-BosuxZz1.js +1 -0
- package/.storybook-static/assets/_plugin-vue_export-helper-DlAUqK2U.js +1 -0
- package/.storybook-static/assets/api-lSJGRrF2.js +1 -0
- package/.storybook-static/assets/axe-CeoKsdFO.js +30 -0
- package/.storybook-static/assets/axios-dxcvQi4N.js +6 -0
- package/.storybook-static/assets/brand-crowd-api.client-CfTgrTzo.js +1 -0
- package/.storybook-static/assets/carousel-B0jomWUs.css +1 -0
- package/.storybook-static/assets/carousel.stories-B1RxWT1u.js +374 -0
- package/.storybook-static/assets/entry-preview-CMasyaBj.js +1 -0
- package/.storybook-static/assets/entry-preview-docs-DfJD_mNC.js +14 -0
- package/.storybook-static/assets/event-constants-6ydiL1p5.js +1 -0
- package/.storybook-static/assets/formatter-B5HCVTEV-CmCZjaYl.js +58 -0
- package/.storybook-static/assets/iframe-B6RguKdJ.js +7 -0
- package/.storybook-static/assets/index-BqKh95Lf.js +24 -0
- package/.storybook-static/assets/index-BwDkhjyp.js +9 -0
- package/.storybook-static/assets/index-D-8MO0q_.js +1 -0
- package/.storybook-static/assets/index-DK28puIS.js +3 -0
- package/.storybook-static/assets/index-DlpNa54Y.js +1 -0
- package/.storybook-static/assets/index-DrFu-skq.js +6 -0
- package/.storybook-static/assets/preview-B4GcaC1c.js +1 -0
- package/.storybook-static/assets/preview-BAz7FMXc.js +396 -0
- package/.storybook-static/assets/preview-BJPLiuSt.js +1 -0
- package/.storybook-static/assets/preview-CBGjgnh2.js +1 -0
- package/.storybook-static/assets/preview-Cv3rAi2i.js +7 -0
- package/.storybook-static/assets/preview-CwqMn10d.js +20 -0
- package/.storybook-static/assets/preview-DF-d5FoE.js +1 -0
- package/.storybook-static/assets/preview-Db4Idchh.js +1 -0
- package/.storybook-static/assets/preview-DvOZkz_N.js +7 -0
- package/.storybook-static/assets/preview-G-5UVXmd.js +1 -0
- package/.storybook-static/assets/preview-efJowmDL.js +7 -0
- package/.storybook-static/assets/syntaxhighlighter-JOJW2KGS-DjsQUJyu.js +1 -0
- package/.storybook-static/assets/tracking-ATsLLehC.js +1 -0
- package/.storybook-static/assets/vue.esm-bundler-C7QvyiW1.js +47 -0
- package/.storybook-static/css/tailwind-brandCrowd.css +2344 -0
- package/.storybook-static/css/tailwind-brandPage.css +2032 -0
- package/.storybook-static/css/tailwind-crazyDomains.css +2344 -0
- package/.storybook-static/css/tailwind-designCom.css +2344 -0
- package/.storybook-static/css/tailwind-designCrowd.css +2344 -0
- package/.storybook-static/favicon.svg +7 -0
- package/.storybook-static/iframe.html +501 -0
- package/.storybook-static/index.html +163 -0
- package/.storybook-static/index.json +1 -0
- package/.storybook-static/project.json +1 -0
- package/.storybook-static/sb-addons/a11y-1/manager-bundle.js +3 -0
- package/.storybook-static/sb-addons/a11y-1/manager-bundle.js.LEGAL.txt +0 -0
- package/.storybook-static/sb-addons/actions-2/manager-bundle.js +3 -0
- package/.storybook-static/sb-addons/actions-2/manager-bundle.js.LEGAL.txt +0 -0
- package/.storybook-static/sb-addons/controls-3/manager-bundle.js +60 -0
- package/.storybook-static/sb-addons/controls-3/manager-bundle.js.LEGAL.txt +18 -0
- package/.storybook-static/sb-addons/essentials-backgrounds-4/manager-bundle.js +12 -0
- package/.storybook-static/sb-addons/essentials-backgrounds-4/manager-bundle.js.LEGAL.txt +0 -0
- package/.storybook-static/sb-addons/essentials-measure-7/manager-bundle.js +3 -0
- package/.storybook-static/sb-addons/essentials-measure-7/manager-bundle.js.LEGAL.txt +0 -0
- package/.storybook-static/sb-addons/essentials-outline-8/manager-bundle.js +3 -0
- package/.storybook-static/sb-addons/essentials-outline-8/manager-bundle.js.LEGAL.txt +0 -0
- package/.storybook-static/sb-addons/essentials-toolbars-6/manager-bundle.js +3 -0
- package/.storybook-static/sb-addons/essentials-toolbars-6/manager-bundle.js.LEGAL.txt +0 -0
- package/.storybook-static/sb-addons/essentials-viewport-5/manager-bundle.js +3 -0
- package/.storybook-static/sb-addons/essentials-viewport-5/manager-bundle.js.LEGAL.txt +0 -0
- package/.storybook-static/sb-addons/links-9/manager-bundle.js +3 -0
- package/.storybook-static/sb-addons/links-9/manager-bundle.js.LEGAL.txt +0 -0
- package/.storybook-static/sb-addons/storybook-core-server-presets-0/common-manager-bundle.js +3 -0
- package/.storybook-static/sb-addons/storybook-core-server-presets-0/common-manager-bundle.js.LEGAL.txt +0 -0
- package/.storybook-static/sb-addons/themes-10/manager-bundle.js +3 -0
- package/.storybook-static/sb-addons/themes-10/manager-bundle.js.LEGAL.txt +0 -0
- package/.storybook-static/sb-common-assets/fonts.css +31 -0
- package/.storybook-static/sb-common-assets/nunito-sans-bold-italic.woff2 +0 -0
- package/.storybook-static/sb-common-assets/nunito-sans-bold.woff2 +0 -0
- package/.storybook-static/sb-common-assets/nunito-sans-italic.woff2 +0 -0
- package/.storybook-static/sb-common-assets/nunito-sans-regular.woff2 +0 -0
- package/.storybook-static/sb-manager/WithTooltip-Y7J54OF7-3AIPQNGM.js +1 -0
- package/.storybook-static/sb-manager/chunk-KCJCJECS.js +234 -0
- package/.storybook-static/sb-manager/chunk-TZAR34JC.js +6 -0
- package/.storybook-static/sb-manager/chunk-UOBNU442.js +347 -0
- package/.storybook-static/sb-manager/chunk-VCJ56UEM.js +183 -0
- package/.storybook-static/sb-manager/chunk-VMGB76WP.js +9 -0
- package/.storybook-static/sb-manager/chunk-XP3HGWTR.js +1 -0
- package/.storybook-static/sb-manager/formatter-B5HCVTEV-7DCBOGO6.js +58 -0
- package/.storybook-static/sb-manager/globals-module-info.js +1 -0
- package/.storybook-static/sb-manager/globals-runtime.js +1 -0
- package/.storybook-static/sb-manager/globals.js +1 -0
- package/.storybook-static/sb-manager/index.js +1 -0
- package/.storybook-static/sb-manager/runtime.js +1 -0
- package/.storybook-static/sb-manager/syntaxhighlighter-JOJW2KGS-7BF26SBB.js +1 -0
- package/.storybook-static/sb-preview/globals.js +1 -0
- package/.storybook-static/sb-preview/runtime.js +128 -0
- package/CLAUDE.md +71 -0
- package/Dockerfile +1 -1
- package/dist/css/tailwind-brandCrowd.css +3 -34
- package/dist/css/tailwind-brandPage.css +3 -30
- package/dist/css/tailwind-crazyDomains.css +3 -34
- package/dist/css/tailwind-designCom.css +3 -34
- package/dist/css/tailwind-designCrowd.css +3 -34
- package/package.json +2 -2
- package/public/css/tailwind-brandCrowd.css +2382 -0
- package/public/css/tailwind-brandPage.css +2070 -0
- package/public/css/tailwind-crazyDomains.css +2382 -0
- package/public/css/tailwind-designCom.css +2382 -0
- package/public/css/tailwind-designCrowd.css +2382 -0
- package/src/atoms/components/Icon/Icon.vue +0 -2
- package/src/experiences/components/AuthFlow/ForgotPassword.vue +21 -9
- package/src/experiences/components/AuthFlow/ResetPassword.vue +37 -8
- package/src/useSharedLibTranslate.js +6 -0
|
@@ -21,8 +21,6 @@
|
|
|
21
21
|
aria-describedby="desc"
|
|
22
22
|
:data-id="`${name}-${id}-title`"
|
|
23
23
|
>
|
|
24
|
-
<title v-if="title" :id="`${name}-${id}-title`" lang="en">{{ title }}</title>
|
|
25
|
-
<desc v-if="description" :id="`${name}-${id}-desc`" lang="en">{{ description }}</desc>
|
|
26
24
|
<component :is="`icon-${iconName}`"></component>
|
|
27
25
|
</svg>
|
|
28
26
|
</div>
|
|
@@ -36,10 +36,11 @@
|
|
|
36
36
|
{{ title }}
|
|
37
37
|
</h2>
|
|
38
38
|
<p class="tw-mb-8 tw-text-grayscale-600">{{ modalDescription }}</p>
|
|
39
|
-
<form id="forgotPassword" ref="forgotPasswordForm" method="post" @submit="validate">
|
|
39
|
+
<form id="forgotPassword" ref="forgotPasswordForm" method="post" novalidate @submit="validate">
|
|
40
40
|
<input type="hidden" name="__RequestVerificationToken" :value="antiForgeryToken" />
|
|
41
41
|
<label for="email" class="tw-sr-only"> {{ emailLabel }} </label>
|
|
42
42
|
<input
|
|
43
|
+
ref="emailInput"
|
|
43
44
|
v-model="aEmail"
|
|
44
45
|
name="email"
|
|
45
46
|
:class="{ 'tw-border-error-500': !!emailError }"
|
|
@@ -72,6 +73,7 @@
|
|
|
72
73
|
</div>
|
|
73
74
|
</template>
|
|
74
75
|
<script>
|
|
76
|
+
import { getCurrentLocale } from '../../../useSharedLibTranslate';
|
|
75
77
|
import HelloBar from '../../../../src/atoms/components/HelloBar/HelloBar.vue';
|
|
76
78
|
import SubmissionButton from './SubmissionButton.vue';
|
|
77
79
|
|
|
@@ -136,11 +138,15 @@ export default {
|
|
|
136
138
|
goBackToLoginLabel: this.forgotPasswordContent?.goBackToLoginLabel ?? 'Go back to login',
|
|
137
139
|
emailAddressPlaceholderLabel: this.forgotPasswordContent?.emailAddressPlaceholderLabel ?? 'Email address',
|
|
138
140
|
emailLabel: this.forgotPasswordContent?.emailLabel ?? 'Email',
|
|
141
|
+
emailErrorMessage: this.forgotPasswordContent?.emailErrorMessage ?? 'Please enter a valid email address',
|
|
139
142
|
modalDescription: this.forgotPasswordContent?.description ?? 'Enter your email below. We will then send a reset-password link to your email address.',
|
|
140
143
|
title: this.forgotPasswordContent?.title ?? 'Forgot your password?',
|
|
141
144
|
};
|
|
142
145
|
},
|
|
143
146
|
computed: {
|
|
147
|
+
currentLocale() {
|
|
148
|
+
return getCurrentLocale();
|
|
149
|
+
},
|
|
144
150
|
getRedirectToSignInUrl() {
|
|
145
151
|
const url = new URL(`https://${window.location.host}${this.signInUrl}`);
|
|
146
152
|
if (this.aEmail) {
|
|
@@ -170,21 +176,27 @@ export default {
|
|
|
170
176
|
},
|
|
171
177
|
validate(e) {
|
|
172
178
|
if (this.submitAction) {
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
this.isLoading = true;
|
|
177
|
-
return true;
|
|
179
|
+
const url = new URL(this.submitAction, window.location.origin);
|
|
180
|
+
url.searchParams.set('locale', this.currentLocale);
|
|
181
|
+
this.$refs.forgotPasswordForm.action = url.toString();
|
|
178
182
|
}
|
|
179
183
|
|
|
180
|
-
this.isLoading = false;
|
|
181
|
-
|
|
182
184
|
this.emailError = undefined;
|
|
183
185
|
|
|
184
186
|
if (!this.aEmail) {
|
|
185
|
-
this.
|
|
187
|
+
this.isLoading = false;
|
|
188
|
+
this.emailError = this.emailErrorMessage;
|
|
189
|
+
e.preventDefault();
|
|
190
|
+
return false;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
if (this.$refs.emailInput.checkValidity()) {
|
|
194
|
+
this.isLoading = true;
|
|
195
|
+
return true;
|
|
186
196
|
}
|
|
187
197
|
|
|
198
|
+
this.isLoading = false;
|
|
199
|
+
this.emailError = this.emailErrorMessage;
|
|
188
200
|
e.preventDefault();
|
|
189
201
|
return false;
|
|
190
202
|
},
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
{{ title }}
|
|
14
14
|
</h2>
|
|
15
15
|
<p class="tw-mb-8 tw-text-grayscale-600">{{ description }}</p>
|
|
16
|
-
<form id="resetPassword" method="post" @submit="validate">
|
|
16
|
+
<form id="resetPassword" ref="resetPasswordForm" method="post" @submit="validate">
|
|
17
17
|
<input name="__RequestVerificationToken" type="hidden" :value="antiForgeryToken" />
|
|
18
18
|
<input name="userName" type="hidden" :value="userName" />
|
|
19
19
|
<input name="resetPasswordToken" type="hidden" :value="resetPasswordToken" />
|
|
@@ -25,14 +25,14 @@
|
|
|
25
25
|
aria-required="true"
|
|
26
26
|
:aria-invalid="!!passwordError"
|
|
27
27
|
autocomplete="new-password"
|
|
28
|
-
placeholder="
|
|
28
|
+
:placeholder="newPasswordPlaceholder"
|
|
29
29
|
class="password-input tw-mb-3 tw-h-12 tw-bg-no-repeat tw-w-full tw-rounded tw-shadow-inner tw-outline-none tw-py-4 tw-pl-10-important tw-pr-2 tw-text-grayscale-600 tw-border tw-border-grayscale-500 focus:tw-border-grayscale-700"
|
|
30
30
|
:class="{ 'tw-border-error-500': !!passwordError }"
|
|
31
31
|
/>
|
|
32
32
|
<p v-if="!!passwordError" class="tw-text-error-500 tw-text-sm tw-text-left tw-mb-4">
|
|
33
33
|
{{ passwordError }}
|
|
34
34
|
</p>
|
|
35
|
-
<label for="confirmPassword" class="tw-sr-only">
|
|
35
|
+
<label for="confirmPassword" class="tw-sr-only">{{ confirmPasswordLabel }}</label>
|
|
36
36
|
<input
|
|
37
37
|
v-model="confirmPassword"
|
|
38
38
|
name="confirmPassword"
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
aria-required="true"
|
|
41
41
|
:aria-invalid="!!confirmPasswordError"
|
|
42
42
|
autocomplete="off"
|
|
43
|
-
placeholder="
|
|
43
|
+
:placeholder="confirmPasswordPlaceholder"
|
|
44
44
|
class="password-input tw-mb-3 tw-h-12 tw-bg-no-repeat tw-w-full tw-rounded tw-shadow-inner tw-outline-none tw-py-4 tw-pl-10-important tw-pr-2 tw-text-grayscale-600 tw-border tw-border-grayscale-500 focus:tw-border-grayscale-700"
|
|
45
45
|
:class="{ 'tw-border-error-500': !!confirmPasswordError }"
|
|
46
46
|
/>
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
<SubmissionButton
|
|
51
51
|
variant="primary"
|
|
52
52
|
size="medium"
|
|
53
|
-
label="
|
|
53
|
+
:label="updatePasswordLabel"
|
|
54
54
|
label-size="larger"
|
|
55
55
|
:is-loading="isLoading"
|
|
56
56
|
:disabled="isLoading"
|
|
@@ -63,6 +63,7 @@
|
|
|
63
63
|
</div>
|
|
64
64
|
</template>
|
|
65
65
|
<script>
|
|
66
|
+
import { getCurrentLocale } from '../../../useSharedLibTranslate';
|
|
66
67
|
import HelloBar from '../../../../src/atoms/components/HelloBar/HelloBar.vue';
|
|
67
68
|
import SubmissionButton from './SubmissionButton.vue';
|
|
68
69
|
|
|
@@ -80,7 +81,7 @@ export default {
|
|
|
80
81
|
description: {
|
|
81
82
|
type: String,
|
|
82
83
|
required: false,
|
|
83
|
-
default:
|
|
84
|
+
default: undefined,
|
|
84
85
|
},
|
|
85
86
|
userName: {
|
|
86
87
|
type: String,
|
|
@@ -104,6 +105,16 @@ export default {
|
|
|
104
105
|
required: false,
|
|
105
106
|
default: undefined,
|
|
106
107
|
},
|
|
108
|
+
submitAction: {
|
|
109
|
+
type: String,
|
|
110
|
+
required: false,
|
|
111
|
+
default: undefined,
|
|
112
|
+
},
|
|
113
|
+
resetPasswordContent: {
|
|
114
|
+
type: Object,
|
|
115
|
+
required: false,
|
|
116
|
+
default: () => {},
|
|
117
|
+
},
|
|
107
118
|
},
|
|
108
119
|
data() {
|
|
109
120
|
return {
|
|
@@ -112,10 +123,28 @@ export default {
|
|
|
112
123
|
confirmPassword: undefined,
|
|
113
124
|
passwordError: undefined,
|
|
114
125
|
confirmPasswordError: undefined,
|
|
126
|
+
|
|
127
|
+
newPasswordLabel: this.resetPasswordContent?.newPasswordLabel ?? 'New Password',
|
|
128
|
+
newPasswordPlaceholder: this.resetPasswordContent?.newPasswordPlaceholder ?? 'New password',
|
|
129
|
+
confirmPasswordLabel: this.resetPasswordContent?.confirmPasswordLabel ?? 'Confirm Password',
|
|
130
|
+
confirmPasswordPlaceholder: this.resetPasswordContent?.confirmPasswordPlaceholder ?? 'Confirm new password',
|
|
131
|
+
updatePasswordLabel: this.resetPasswordContent?.updatePasswordLabel ?? 'UPDATE PASSWORD',
|
|
132
|
+
passwordRequiredError: this.resetPasswordContent?.passwordRequiredError ?? 'Please enter a password',
|
|
133
|
+
passwordsDoNotMatchError: this.resetPasswordContent?.passwordsDoNotMatchError ?? 'Passwords do not match',
|
|
115
134
|
};
|
|
116
135
|
},
|
|
136
|
+
computed: {
|
|
137
|
+
currentLocale() {
|
|
138
|
+
return getCurrentLocale();
|
|
139
|
+
},
|
|
140
|
+
},
|
|
117
141
|
methods: {
|
|
118
142
|
validate(e) {
|
|
143
|
+
if (this.submitAction) {
|
|
144
|
+
const url = new URL(this.submitAction, window.location.origin);
|
|
145
|
+
url.searchParams.set('locale', this.currentLocale);
|
|
146
|
+
this.$refs.resetPasswordForm.action = url.toString();
|
|
147
|
+
}
|
|
119
148
|
if (this.password && this.password === this.confirmPassword) {
|
|
120
149
|
this.isLoading = true;
|
|
121
150
|
return true;
|
|
@@ -127,9 +156,9 @@ export default {
|
|
|
127
156
|
this.confirmPasswordError = undefined;
|
|
128
157
|
|
|
129
158
|
if (!this.password) {
|
|
130
|
-
this.passwordError =
|
|
159
|
+
this.passwordError = this.passwordRequiredError;
|
|
131
160
|
} else if (!this.confirmPassword || this.password !== this.confirmPassword) {
|
|
132
|
-
this.confirmPasswordError =
|
|
161
|
+
this.confirmPasswordError = this.passwordsDoNotMatchError;
|
|
133
162
|
}
|
|
134
163
|
|
|
135
164
|
e.preventDefault();
|
|
@@ -55,8 +55,13 @@ const sellDomainNameListModalTr = (key, valuesToInterpolate = {}) =>
|
|
|
55
55
|
|
|
56
56
|
const sellDomainNameListTr = (key, valuesToInterpolate = {}) => tr(`sellDomainNameList.${key}`, valuesToInterpolate);
|
|
57
57
|
|
|
58
|
+
const getCurrentLocale = () => {
|
|
59
|
+
return i18next.language || 'en-US';
|
|
60
|
+
};
|
|
61
|
+
|
|
58
62
|
export {
|
|
59
63
|
setSharedLibLocaleAsync,
|
|
64
|
+
getCurrentLocale,
|
|
60
65
|
tr,
|
|
61
66
|
publishBrandPageModalTr,
|
|
62
67
|
sellDomainNameWidgetTr,
|
|
@@ -66,3 +71,4 @@ export {
|
|
|
66
71
|
sellDomainNameListModalTr,
|
|
67
72
|
sellDomainNameListTr,
|
|
68
73
|
};
|
|
74
|
+
|