@designcrowd/fe-shared-lib 1.4.7-jj-2 → 1.4.7
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/dist/css/tailwind-brandCrowd.css +86 -6
- package/dist/css/tailwind-brandPage.css +82 -6
- package/dist/css/tailwind-crazyDomains.css +86 -6
- package/dist/css/tailwind-designCom.css +86 -6
- package/dist/css/tailwind-designCrowd.css +86 -6
- package/package.json +1 -1
- package/src/experiences/components/PublishBrandPageModal/PublishBrandPageModal.stories.js +29 -0
- package/src/experiences/components/PublishBrandPageModal/PublishBrandPageModal.vue +297 -101
- package/.storybook-static/assets/Auth-CV5AmoX8.css +0 -1
- package/.storybook-static/assets/Auth.stories-CX3sjxh5.js +0 -490
- package/.storybook-static/assets/AuthCrazyDomains.stories-Didj_VFa.js +0 -73
- package/.storybook-static/assets/Button-5UzSGUF6.css +0 -1
- package/.storybook-static/assets/Button-DtVlr_q3.js +0 -1
- package/.storybook-static/assets/ButtonGroup-Dfr7bNL2.css +0 -1
- package/.storybook-static/assets/ButtonGroup.stories-4EQk-ktb.js +0 -503
- package/.storybook-static/assets/ButtonPrimary-Bu6bXb_c.css +0 -1
- package/.storybook-static/assets/ButtonPrimary-DG9wNod9.js +0 -1
- package/.storybook-static/assets/Buttons.stories-B_KpeCzt.js +0 -761
- package/.storybook-static/assets/ButtonsCrazyDomains.stories-oZtahAmR.js +0 -199
- package/.storybook-static/assets/Checkbox.mixin-DkHpdvGa.js +0 -1
- package/.storybook-static/assets/Checkbox.stories-C67RL0ut.js +0 -203
- package/.storybook-static/assets/Checktile.stories-DN2wfzd6.js +0 -88
- package/.storybook-static/assets/CollapsiblePanel.stories-BkzrqfVG.js +0 -39
- package/.storybook-static/assets/ColorPicker.stories-85BQwpyF.js +0 -73
- package/.storybook-static/assets/CopyToClipboardText.stories-Csh5nVRs.js +0 -32
- package/.storybook-static/assets/Dropdown.stories-NNlxNopk.js +0 -159
- package/.storybook-static/assets/DropdownItem-CDX_V6Mi.js +0 -1
- package/.storybook-static/assets/DropdownItem-CLNmWtKh.css +0 -1
- package/.storybook-static/assets/FormControl.mixin-_gXRExB7.js +0 -1
- package/.storybook-static/assets/HashRouteModal.stories-Dy1_nLTJ.js +0 -64
- package/.storybook-static/assets/HelloBar-z54fob0q.js +0 -1
- package/.storybook-static/assets/HelloBar.stories-ClJ9_KRK.js +0 -342
- package/.storybook-static/assets/Icon-8mZGP41G.js +0 -144
- package/.storybook-static/assets/Icon.stories-BcXMvpuh.js +0 -126
- package/.storybook-static/assets/Icon.stories-D6ECVMta.js +0 -751
- package/.storybook-static/assets/Loader-D61Ki9P1.js +0 -1
- package/.storybook-static/assets/LogoBusinessBrandColours-B1_8hw0H.js +0 -1
- package/.storybook-static/assets/LogoBusinessBrandColours-DEFhAyxR.css +0 -1
- package/.storybook-static/assets/LogoBusinessBrandColours.stories-CIWe9ndn.js +0 -36
- package/.storybook-static/assets/Masonry-C2MNiGg0.css +0 -1
- package/.storybook-static/assets/Masonry.stories-CDT8kZCv.js +0 -71
- package/.storybook-static/assets/Modal-BQrpXSGA.js +0 -1
- package/.storybook-static/assets/Modal-BvVMN71n.css +0 -1
- package/.storybook-static/assets/Modal.stories-BycF7YL6.js +0 -345
- package/.storybook-static/assets/Notice.stories-BufkrC1b.js +0 -222
- package/.storybook-static/assets/NumberStepper-Blffv09R.css +0 -1
- package/.storybook-static/assets/NumberStepper.stories-6_y_lEgC.js +0 -64
- package/.storybook-static/assets/PaymentConfigList-wI1eTv5x.css +0 -1
- package/.storybook-static/assets/PaymentConfigList.stories-BlzzKrzz.js +0 -126
- package/.storybook-static/assets/Picture-Cq76CaoK.js +0 -1
- package/.storybook-static/assets/Picture.stories-BDqRm9_g.js +0 -119
- package/.storybook-static/assets/Pill-BsMeJhV9.js +0 -1
- package/.storybook-static/assets/Pill.stories-DUvzbtnS.js +0 -18
- package/.storybook-static/assets/PillBar-os4mJV3M.css +0 -1
- package/.storybook-static/assets/PillBar.stories-BUMLXBij.js +0 -41
- package/.storybook-static/assets/Price-DKOwLeD0.js +0 -1
- package/.storybook-static/assets/Price.stories-DlqrNUWI.js +0 -221
- package/.storybook-static/assets/PublishBrandPageModal-CLU8-If3.css +0 -1
- package/.storybook-static/assets/PublishBrandPageModal.stories-Dqobvq-n.js +0 -273
- package/.storybook-static/assets/SearchBar.stories-_wPX3-Rl.js +0 -12
- package/.storybook-static/assets/Select-Dw-zvSUg.css +0 -1
- package/.storybook-static/assets/Select.stories-BWINGxdY.js +0 -108
- package/.storybook-static/assets/SellDomainNameList.fixtures-LC6fjr_b.js +0 -1
- package/.storybook-static/assets/SellDomainNameListModal-ByK_ak0A.js +0 -1
- package/.storybook-static/assets/SellDomainNameListModal-CdfyEX1a.css +0 -1
- package/.storybook-static/assets/SellDomainNameListModal.stories-DrL8w2AY.js +0 -71
- package/.storybook-static/assets/SellDomainNameListSearchResult-1WuAKfzI.css +0 -1
- package/.storybook-static/assets/SellDomainNameListSearchResult-By0IpIM_.js +0 -1
- package/.storybook-static/assets/SellDomainNameSearchWithResults-BttjI4PH.js +0 -1
- package/.storybook-static/assets/SellDomainNameSearchWithResults.stories-Dm1Q8Cza.js +0 -37
- package/.storybook-static/assets/SellDomainNameWidget.stories-CKoz3WnZ.js +0 -36
- package/.storybook-static/assets/SignIn-DNYeJu86.css +0 -1
- package/.storybook-static/assets/SignIn-Dt8OJr0J.js +0 -1
- package/.storybook-static/assets/Slider-Cog2FFdj.css +0 -1
- package/.storybook-static/assets/Slider.stories-08DN2SFB.js +0 -141
- package/.storybook-static/assets/StarRating-BtKh7pzm.css +0 -1
- package/.storybook-static/assets/StarRating.stories-BEIj9ufA.js +0 -45
- package/.storybook-static/assets/TabMenu.stories-D9f0pyZI.js +0 -47
- package/.storybook-static/assets/TextCopyField-B04vTGbG.js +0 -1
- package/.storybook-static/assets/TextCopyField.stories-KD0WUWzA.js +0 -47
- package/.storybook-static/assets/TextInput-JK1M0hv6.js +0 -1
- package/.storybook-static/assets/TextInput.stories-BO0eQqBY.js +0 -233
- package/.storybook-static/assets/Textarea.stories-Bcn4sCkV.js +0 -207
- package/.storybook-static/assets/Toggle.stories-CuTFLoNh.js +0 -161
- package/.storybook-static/assets/Tooltip-DcSbUh5f.js +0 -1
- package/.storybook-static/assets/Tooltip-DyXIgFQH.css +0 -1
- package/.storybook-static/assets/Tooltip.stories-B0I_PBGG.js +0 -953
- package/.storybook-static/assets/UploadYourLogoApplication-EyTEQx-x.css +0 -9
- package/.storybook-static/assets/UploadYourLogoApplication.stories-Dixp1ynI.js +0 -194
- package/.storybook-static/assets/UploadYourLogoDropzone-DQqACf-e.css +0 -1
- package/.storybook-static/assets/UploadYourLogoDropzone-DouZtNvi.js +0 -24
- package/.storybook-static/assets/UploadYourLogoDropzone.stories-BHYeu4gz.js +0 -55
- package/.storybook-static/assets/UploadedLogoSearchResultCard.stories-D1KR63O4.js +0 -79
- package/.storybook-static/assets/_commonjsHelpers-D6-XlEtG.js +0 -1
- package/.storybook-static/assets/_plugin-vue_export-helper-DlAUqK2U.js +0 -1
- package/.storybook-static/assets/api-lSJGRrF2.js +0 -1
- package/.storybook-static/assets/axe-nGVJxRof.js +0 -30
- package/.storybook-static/assets/brand-crowd-api.client-DiPM1Wo-.js +0 -1
- package/.storybook-static/assets/bundled-translations-BZ57czTo.js +0 -1
- package/.storybook-static/assets/bundled-translations.de-DE-DXggTXB2.js +0 -1
- package/.storybook-static/assets/bundled-translations.es-ES-DtMmvicd.js +0 -1
- package/.storybook-static/assets/bundled-translations.fr-FR-BrQqbieG.js +0 -1
- package/.storybook-static/assets/bundled-translations.pt-PT-CpiWEAtr.js +0 -1
- package/.storybook-static/assets/carousel-CMMZ5MZ-.css +0 -1
- package/.storybook-static/assets/carousel.stories-o3eu2Qyc.js +0 -374
- package/.storybook-static/assets/event-constants-CMO9VQVu.js +0 -1
- package/.storybook-static/assets/iframe-C86bI_2U.js +0 -1126
- package/.storybook-static/assets/index-Bw-gCGc_.js +0 -6
- package/.storybook-static/assets/index-DhkYCT1V.js +0 -29
- package/.storybook-static/assets/matchers-7Z3WT2CE-T3xScrR7.js +0 -14
- package/.storybook-static/assets/tracking-ATsLLehC.js +0 -1
- package/.storybook-static/css/tailwind-brandCrowd.css +0 -2404
- package/.storybook-static/css/tailwind-brandPage.css +0 -2088
- package/.storybook-static/css/tailwind-crazyDomains.css +0 -2404
- package/.storybook-static/css/tailwind-designCom.css +0 -2404
- package/.storybook-static/css/tailwind-designCrowd.css +0 -2404
- package/.storybook-static/favicon.svg +0 -1
- package/.storybook-static/iframe.html +0 -694
- package/.storybook-static/index.html +0 -156
- package/.storybook-static/index.json +0 -1
- package/.storybook-static/nunito-sans-bold-italic.woff2 +0 -0
- package/.storybook-static/nunito-sans-bold.woff2 +0 -0
- package/.storybook-static/nunito-sans-italic.woff2 +0 -0
- package/.storybook-static/nunito-sans-regular.woff2 +0 -0
- package/.storybook-static/project.json +0 -1
- package/.storybook-static/sb-addons/a11y-1/manager-bundle.js +0 -5
- package/.storybook-static/sb-addons/links-2/manager-bundle.js +0 -3
- package/.storybook-static/sb-addons/storybook-core-server-presets-0/common-manager-bundle.js +0 -188
- package/.storybook-static/sb-addons/themes-3/manager-bundle.js +0 -3
- package/.storybook-static/sb-common-assets/favicon.svg +0 -1
- 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/globals-module-info.js +0 -797
- package/.storybook-static/sb-manager/globals-runtime.js +0 -72062
- package/.storybook-static/sb-manager/globals.js +0 -34
- package/.storybook-static/sb-manager/runtime.js +0 -13002
- package/public/css/tailwind-brandCrowd.css +0 -2414
- package/public/css/tailwind-brandPage.css +0 -2098
- package/public/css/tailwind-crazyDomains.css +0 -2414
- package/public/css/tailwind-designCom.css +0 -2414
- package/public/css/tailwind-designCrowd.css +0 -2414
- package/src/experiences/components/PublishBrandPageModal/views/InitialPublishView.vue +0 -323
- package/src/experiences/components/PublishBrandPageModal/views/PublishWhenHasDomainsView.vue +0 -271
- package/src/experiences/components/PublishBrandPageModal/views/PublishWhenNoDomainsView.vue +0 -168
- package/src/experiences/components/PublishBrandPageModal/views/PublishedView.vue +0 -149
|
@@ -1,323 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div :class="{ 'tw-mb-8': !hasPurchasedDomains }">
|
|
3
|
-
<div
|
|
4
|
-
v-if="!isSlugEditMode"
|
|
5
|
-
class="tw-flex tw-items-center tw-mr-2 tw-mb-1"
|
|
6
|
-
@click="onDomainTypeRadioButtonClick(DOMAIN_TYPES.slug)"
|
|
7
|
-
>
|
|
8
|
-
<input
|
|
9
|
-
v-if="showRadioButtons"
|
|
10
|
-
type="radio"
|
|
11
|
-
class="tw-w-6 tw-h-8 tw-cursor-pointer tw-mb-0"
|
|
12
|
-
:style="{ 'accent-color': 'rgb(242 27 63)' }"
|
|
13
|
-
name="domainTypeValue"
|
|
14
|
-
:checked="domainTypeValue === DOMAIN_TYPES.slug"
|
|
15
|
-
:value="domainTypeValue === DOMAIN_TYPES.slug"
|
|
16
|
-
/>
|
|
17
|
-
<label
|
|
18
|
-
v-if="!isPublished && hasPurchasedDomains"
|
|
19
|
-
for="domain-type"
|
|
20
|
-
class="tw-font-sans tw-w-full tw-text-grayscale-600 tw-text-sm tw-cursor-pointer tw-ml-2"
|
|
21
|
-
>
|
|
22
|
-
<span class="tw-inline-block tw-rounded-full">{{ freeDomainLabel }}</span>
|
|
23
|
-
</label>
|
|
24
|
-
</div>
|
|
25
|
-
<div v-if="isNotPublished || isSlugEditMode" class="tw-mt-4">
|
|
26
|
-
<div v-if="hasPurchasedDomains">
|
|
27
|
-
<TextInput
|
|
28
|
-
v-model="internalSlug"
|
|
29
|
-
element-classes="tw-mb-0 !tw-rounded-l-none tw-text-lg"
|
|
30
|
-
:prefix-text="`${brandPageBaseUrlWithoutHttps}/`"
|
|
31
|
-
:error="!!slugValidationError"
|
|
32
|
-
:disabled="isInputEnabled"
|
|
33
|
-
:placeholder="getPlaceHolder"
|
|
34
|
-
data-test-brand-page-slug-input
|
|
35
|
-
:attrs="{ 'data-test-set-url-text-field': '' }"
|
|
36
|
-
@input="onSlugChanged"
|
|
37
|
-
/>
|
|
38
|
-
<div v-if="slugErrorMessage" class="tw-mt-2 tw-text-sm tw-text-left tw-text-error-500 tw-font-normal">
|
|
39
|
-
{{ slugErrorMessage }}
|
|
40
|
-
</div>
|
|
41
|
-
</div>
|
|
42
|
-
</div>
|
|
43
|
-
<div v-if="isNotPublished || !isSlugEditMode" class="tw-mt-4">
|
|
44
|
-
<div v-if="showRadioButtons">
|
|
45
|
-
<div
|
|
46
|
-
class="tw-flex tw-items-center tw-mr-2 tw-mb-1"
|
|
47
|
-
@click="onDomainTypeRadioButtonClick(DOMAIN_TYPES.purchased)"
|
|
48
|
-
>
|
|
49
|
-
<input
|
|
50
|
-
type="radio"
|
|
51
|
-
class="tw-w-6 tw-h-8 tw-cursor-pointer tw-mb-0"
|
|
52
|
-
:style="{ 'accent-color': 'rgb(242 27 63)' }"
|
|
53
|
-
name="domainTypeValue"
|
|
54
|
-
:checked="domainTypeValue === DOMAIN_TYPES.purchased"
|
|
55
|
-
:value="domainTypeValue === DOMAIN_TYPES.purchased"
|
|
56
|
-
/>
|
|
57
|
-
<label
|
|
58
|
-
for="domain-type"
|
|
59
|
-
class="tw-font-sans tw-w-full tw-text-grayscale-600 tw-text-sm tw-cursor-pointer tw-ml-2"
|
|
60
|
-
>
|
|
61
|
-
<span class="tw-inline-block tw-rounded-full">{{ purchasedDomainLabel }}</span>
|
|
62
|
-
</label>
|
|
63
|
-
</div>
|
|
64
|
-
<div class="tw-mt-4 domain-dropdown">
|
|
65
|
-
<Dropdown
|
|
66
|
-
v-if="domains"
|
|
67
|
-
ref="dropdown"
|
|
68
|
-
:element-classes="{
|
|
69
|
-
'tw-h-12': true,
|
|
70
|
-
}"
|
|
71
|
-
menu-element-classes="tw-w-full"
|
|
72
|
-
:disabled="domainTypeValue === DOMAIN_TYPES.slug"
|
|
73
|
-
:class="{
|
|
74
|
-
'tw-text-grayscale-600 tw-font-normal': !selectedCustomDomain,
|
|
75
|
-
}"
|
|
76
|
-
:title="(selectedCustomDomain && selectedCustomDomain.domainName) || selectDomainDropdownPlaceholder"
|
|
77
|
-
>
|
|
78
|
-
<DropdownItem
|
|
79
|
-
v-for="purchasedDomain of domains"
|
|
80
|
-
:key="purchasedDomain.domainName"
|
|
81
|
-
class="tw-font-bold tw-break-all tw-flex tw-gap-2 tw-text-black"
|
|
82
|
-
@click="onSelectPurchasedDomain(purchasedDomain)"
|
|
83
|
-
>
|
|
84
|
-
{{ purchasedDomain.domainName }}
|
|
85
|
-
</DropdownItem>
|
|
86
|
-
</Dropdown>
|
|
87
|
-
</div>
|
|
88
|
-
<div v-if="errorMessage" class="tw-mt-2 tw-text-sm tw-text-left tw-text-error-500 tw-font-normal">
|
|
89
|
-
{{ errorMessage }}
|
|
90
|
-
</div>
|
|
91
|
-
</div>
|
|
92
|
-
</div>
|
|
93
|
-
<div
|
|
94
|
-
v-if="hasPurchasedDomains"
|
|
95
|
-
class="tw-font-sans tw-text-center"
|
|
96
|
-
:style="isMobile ? 'padding-left: 1.5rem; padding-right: 1.5rem;' : ''"
|
|
97
|
-
>
|
|
98
|
-
<Button
|
|
99
|
-
:label="isSlugEditMode ? setUrlLabel : publishLabel"
|
|
100
|
-
:variant="isDesignCom ? 'primary' : 'primary-with-icon'"
|
|
101
|
-
icon="chevron-right-wide"
|
|
102
|
-
:disabled="isPublishingDisabled"
|
|
103
|
-
class="tw-my-4"
|
|
104
|
-
:full-width="isMobile"
|
|
105
|
-
data-test-brand-page-publish-button
|
|
106
|
-
@on-click="onPublish"
|
|
107
|
-
/>
|
|
108
|
-
<Button
|
|
109
|
-
:label="hasAlreadyPurchasedDomainCloseButtonLabel"
|
|
110
|
-
variant="no-border"
|
|
111
|
-
size="large"
|
|
112
|
-
class="tw-my-4"
|
|
113
|
-
:full-width="isMobile"
|
|
114
|
-
@on-click="onCloseModal"
|
|
115
|
-
/>
|
|
116
|
-
</div>
|
|
117
|
-
</div>
|
|
118
|
-
</template>
|
|
119
|
-
<script>
|
|
120
|
-
import TextInput from '../../../../atoms/components/TextInput/TextInput.vue';
|
|
121
|
-
import Dropdown from '../../../../atoms/components/Dropdown/Dropdown.vue';
|
|
122
|
-
import DropdownItem from '../../../../atoms/components/Dropdown/DropdownItem.vue';
|
|
123
|
-
import Button from '../../../../atoms/components/Button/Button.vue';
|
|
124
|
-
import mediaQueryMixin from '../../../mixins/mediaQueryMixin';
|
|
125
|
-
import { publishBrandPageModalTr } from '../../../../useSharedLibTranslate';
|
|
126
|
-
|
|
127
|
-
const DOMAIN_TYPES = {
|
|
128
|
-
slug: 'slug',
|
|
129
|
-
purchased: 'purchased',
|
|
130
|
-
};
|
|
131
|
-
|
|
132
|
-
const DCOM_IMG_FREE = 'https://brandcrowd-cdn.s3.amazonaws.com/public/assets/images/icons/publish/dcom-free-url.svg';
|
|
133
|
-
const BC_IMG_FREE = 'https://brandcrowd-cdn.s3.amazonaws.com/public/assets/images/icons/publish/bc-free-url.svg';
|
|
134
|
-
|
|
135
|
-
export default {
|
|
136
|
-
components: {
|
|
137
|
-
TextInput,
|
|
138
|
-
Dropdown,
|
|
139
|
-
DropdownItem,
|
|
140
|
-
Button,
|
|
141
|
-
},
|
|
142
|
-
mixins: [mediaQueryMixin],
|
|
143
|
-
props: {
|
|
144
|
-
radioValue: {
|
|
145
|
-
type: String,
|
|
146
|
-
required: true,
|
|
147
|
-
default: DOMAIN_TYPES.slug,
|
|
148
|
-
},
|
|
149
|
-
domains: {
|
|
150
|
-
type: Array,
|
|
151
|
-
required: true,
|
|
152
|
-
default: undefined,
|
|
153
|
-
},
|
|
154
|
-
brandPageBaseUrl: {
|
|
155
|
-
type: String,
|
|
156
|
-
required: true,
|
|
157
|
-
default: undefined,
|
|
158
|
-
},
|
|
159
|
-
brandPageSlug: {
|
|
160
|
-
type: String,
|
|
161
|
-
required: true,
|
|
162
|
-
default: undefined,
|
|
163
|
-
},
|
|
164
|
-
customDomain: {
|
|
165
|
-
type: Object,
|
|
166
|
-
required: false,
|
|
167
|
-
default: undefined,
|
|
168
|
-
},
|
|
169
|
-
slugValidationError: {
|
|
170
|
-
type: String,
|
|
171
|
-
required: true,
|
|
172
|
-
default: undefined,
|
|
173
|
-
},
|
|
174
|
-
brandPageDisplayName: {
|
|
175
|
-
type: String,
|
|
176
|
-
required: true,
|
|
177
|
-
default: undefined,
|
|
178
|
-
},
|
|
179
|
-
errorMessage: {
|
|
180
|
-
type: String,
|
|
181
|
-
required: false,
|
|
182
|
-
default: undefined,
|
|
183
|
-
},
|
|
184
|
-
publishErrorMessage: {
|
|
185
|
-
type: String,
|
|
186
|
-
required: false,
|
|
187
|
-
default: undefined,
|
|
188
|
-
},
|
|
189
|
-
isPublished: {
|
|
190
|
-
type: Boolean,
|
|
191
|
-
required: true,
|
|
192
|
-
},
|
|
193
|
-
isPublishing: {
|
|
194
|
-
type: Boolean,
|
|
195
|
-
required: true,
|
|
196
|
-
default: false,
|
|
197
|
-
},
|
|
198
|
-
shouldPublish: {
|
|
199
|
-
type: Boolean,
|
|
200
|
-
required: true,
|
|
201
|
-
default: false,
|
|
202
|
-
},
|
|
203
|
-
isDesignCom: {
|
|
204
|
-
type: Boolean,
|
|
205
|
-
required: true,
|
|
206
|
-
default: false,
|
|
207
|
-
},
|
|
208
|
-
showRadioButtons: {
|
|
209
|
-
type: Boolean,
|
|
210
|
-
required: true,
|
|
211
|
-
default: false,
|
|
212
|
-
},
|
|
213
|
-
isBrandPageSlugEditMode: {
|
|
214
|
-
type: Boolean,
|
|
215
|
-
required: true,
|
|
216
|
-
default: false,
|
|
217
|
-
},
|
|
218
|
-
brandPageType: {
|
|
219
|
-
type: String,
|
|
220
|
-
required: true,
|
|
221
|
-
default: '',
|
|
222
|
-
},
|
|
223
|
-
},
|
|
224
|
-
emits: ['close-modal', 'radio-button-changed', 'internal-publish-brand-page', 'on-select-domain', 'on-slug-changed'],
|
|
225
|
-
setup() {
|
|
226
|
-
return {
|
|
227
|
-
publishBrandPageModalTr,
|
|
228
|
-
freePublishCardTitleLabel: publishBrandPageModalTr('freePublishCardTitleLabel'),
|
|
229
|
-
freePublishCardDescriptionLabel: publishBrandPageModalTr('freePublishCardDescriptionLabel'),
|
|
230
|
-
slugInputPlaceholderYourNameLabel: publishBrandPageModalTr('slugInputPlaceholderYourNameLabel'),
|
|
231
|
-
slugInputPlaceholderYourBusinessNameLabel: publishBrandPageModalTr('slugInputPlaceholderYourBusinessNameLabel'),
|
|
232
|
-
freeDomainLabel: publishBrandPageModalTr('freeDomainLabel'),
|
|
233
|
-
purchasedDomainLabel: publishBrandPageModalTr('purchasedDomainLabel'),
|
|
234
|
-
setUrlLabel: publishBrandPageModalTr('setUrlLabel'),
|
|
235
|
-
publishLabel: publishBrandPageModalTr('publishLabel'),
|
|
236
|
-
hasAlreadyPurchasedDomainCloseButtonLabel: publishBrandPageModalTr('hasAlreadyPurchasedDomainCloseButtonLabel'),
|
|
237
|
-
selectDomainDropdownPlaceholder: publishBrandPageModalTr('selectDomainDropdownPlaceholder'),
|
|
238
|
-
};
|
|
239
|
-
},
|
|
240
|
-
data() {
|
|
241
|
-
return {
|
|
242
|
-
DOMAIN_TYPES,
|
|
243
|
-
domainTypeValue: this.radioValue,
|
|
244
|
-
internalSlug: this.brandPageSlug,
|
|
245
|
-
selectedCustomDomain: this.customDomain,
|
|
246
|
-
};
|
|
247
|
-
},
|
|
248
|
-
computed: {
|
|
249
|
-
brandPageBaseUrlWithoutHttps() {
|
|
250
|
-
return this.brandPageBaseUrl.replace('https://', '');
|
|
251
|
-
},
|
|
252
|
-
allowPublish() {
|
|
253
|
-
if (this.domainTypeValue === DOMAIN_TYPES.slug) {
|
|
254
|
-
return this.internalSlug && !this.slugValidationError;
|
|
255
|
-
}
|
|
256
|
-
return this.selectedCustomDomain;
|
|
257
|
-
},
|
|
258
|
-
hasPurchasedDomains() {
|
|
259
|
-
return this.domains && this.domains.length > 0;
|
|
260
|
-
},
|
|
261
|
-
slugErrorMessage() {
|
|
262
|
-
return this.slugValidationError ? this.slugValidationError : this.publishErrorMessage;
|
|
263
|
-
},
|
|
264
|
-
isNotPublished() {
|
|
265
|
-
return !this.isPublished || !this.shouldPublish;
|
|
266
|
-
},
|
|
267
|
-
isSlugEditMode() {
|
|
268
|
-
return this.isPublished && this.shouldPublish && this.isBrandPageSlugEditMode;
|
|
269
|
-
},
|
|
270
|
-
iconUrl() {
|
|
271
|
-
return this.isDesignCom ? DCOM_IMG_FREE : BC_IMG_FREE;
|
|
272
|
-
},
|
|
273
|
-
isInputEnabled() {
|
|
274
|
-
return this.isPublishing || this.domainTypeValue === DOMAIN_TYPES.purchased;
|
|
275
|
-
},
|
|
276
|
-
isPublishingDisabled() {
|
|
277
|
-
return !this.allowPublish || this.isPublishing;
|
|
278
|
-
},
|
|
279
|
-
getPlaceHolder() {
|
|
280
|
-
return this.brandPageType === 'brandContact'
|
|
281
|
-
? this.slugInputPlaceholderYourNameLabel
|
|
282
|
-
: this.slugInputPlaceholderYourBusinessNameLabel;
|
|
283
|
-
},
|
|
284
|
-
},
|
|
285
|
-
watch: {
|
|
286
|
-
brandPageSlug(slug) {
|
|
287
|
-
this.internalSlug = slug;
|
|
288
|
-
},
|
|
289
|
-
customDomain(val) {
|
|
290
|
-
this.selectedCustomDomain = val;
|
|
291
|
-
},
|
|
292
|
-
},
|
|
293
|
-
mounted() {
|
|
294
|
-
this.internalSlug = this.brandPageSlug;
|
|
295
|
-
},
|
|
296
|
-
methods: {
|
|
297
|
-
onDomainTypeRadioButtonClick(domain) {
|
|
298
|
-
this.domainTypeValue = domain;
|
|
299
|
-
this.closePurchasedDomainDropdown();
|
|
300
|
-
this.$emit('radio-button-changed', domain);
|
|
301
|
-
},
|
|
302
|
-
onCloseModal() {
|
|
303
|
-
this.$emit('close-modal');
|
|
304
|
-
},
|
|
305
|
-
onSlugChanged(e) {
|
|
306
|
-
this.$emit('on-slug-changed', e);
|
|
307
|
-
},
|
|
308
|
-
onPublish() {
|
|
309
|
-
this.$emit('internal-publish-brand-page', this.internalSlug, this.selectedCustomDomain);
|
|
310
|
-
},
|
|
311
|
-
onSelectPurchasedDomain(newVal) {
|
|
312
|
-
this.selectedCustomDomain = newVal;
|
|
313
|
-
this.$emit('on-select-domain', newVal);
|
|
314
|
-
this.closePurchasedDomainDropdown();
|
|
315
|
-
},
|
|
316
|
-
closePurchasedDomainDropdown() {
|
|
317
|
-
if (this.$refs.dropdown?.hideMenu) {
|
|
318
|
-
this.$refs.dropdown.hideMenu();
|
|
319
|
-
}
|
|
320
|
-
},
|
|
321
|
-
},
|
|
322
|
-
};
|
|
323
|
-
</script>
|
package/src/experiences/components/PublishBrandPageModal/views/PublishWhenHasDomainsView.vue
DELETED
|
@@ -1,271 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div :class="{ 'tw-mb-8': !hasPurchasedDomains }">
|
|
3
|
-
<div class="tw-flex tw-items-center tw-mr-2 tw-mb-1" @click="onDomainTypeRadioButtonClick(DOMAIN_TYPES.slug)">
|
|
4
|
-
<input
|
|
5
|
-
type="radio"
|
|
6
|
-
class="tw-w-6 tw-h-8 tw-cursor-pointer tw-mb-0"
|
|
7
|
-
:style="{ 'accent-color': 'rgb(242 27 63)' }"
|
|
8
|
-
name="domainTypeValue"
|
|
9
|
-
:checked="domainTypeValue === DOMAIN_TYPES.slug"
|
|
10
|
-
:value="domainTypeValue === DOMAIN_TYPES.slug"
|
|
11
|
-
/>
|
|
12
|
-
<label
|
|
13
|
-
for="domain-type"
|
|
14
|
-
class="tw-font-sans tw-w-full tw-text-grayscale-600 tw-text-sm tw-cursor-pointer tw-ml-2"
|
|
15
|
-
>
|
|
16
|
-
<span class="tw-inline-block tw-rounded-full">{{ freeDomainLabel }}</span>
|
|
17
|
-
</label>
|
|
18
|
-
</div>
|
|
19
|
-
<div class="tw-mt-4">
|
|
20
|
-
<div>
|
|
21
|
-
<TextInput
|
|
22
|
-
v-model="internalSlug"
|
|
23
|
-
element-classes="tw-mb-0 !tw-rounded-l-none tw-text-lg"
|
|
24
|
-
:prefix-text="`${brandPageBaseUrlWithoutHttps}/`"
|
|
25
|
-
:error="!!slugValidationError"
|
|
26
|
-
:disabled="isInputEnabled"
|
|
27
|
-
:placeholder="getPlaceHolder"
|
|
28
|
-
data-test-brand-page-slug-input
|
|
29
|
-
:attrs="{ 'data-test-set-url-text-field': '' }"
|
|
30
|
-
@input="onSlugChanged"
|
|
31
|
-
/>
|
|
32
|
-
<div v-if="slugErrorMessage" class="tw-mt-2 tw-text-sm tw-text-left tw-text-error-500 tw-font-normal">
|
|
33
|
-
{{ slugErrorMessage }}
|
|
34
|
-
</div>
|
|
35
|
-
</div>
|
|
36
|
-
</div>
|
|
37
|
-
<div class="tw-mt-4">
|
|
38
|
-
<div
|
|
39
|
-
class="tw-flex tw-items-center tw-mr-2 tw-mb-1"
|
|
40
|
-
@click="onDomainTypeRadioButtonClick(DOMAIN_TYPES.purchased)"
|
|
41
|
-
>
|
|
42
|
-
<input
|
|
43
|
-
type="radio"
|
|
44
|
-
class="tw-w-6 tw-h-8 tw-cursor-pointer tw-mb-0"
|
|
45
|
-
:style="{ 'accent-color': 'rgb(242 27 63)' }"
|
|
46
|
-
name="domainTypeValue"
|
|
47
|
-
:checked="domainTypeValue === DOMAIN_TYPES.purchased"
|
|
48
|
-
:value="domainTypeValue === DOMAIN_TYPES.purchased"
|
|
49
|
-
/>
|
|
50
|
-
<label
|
|
51
|
-
for="domain-type"
|
|
52
|
-
class="tw-font-sans tw-w-full tw-text-grayscale-600 tw-text-sm tw-cursor-pointer tw-ml-2"
|
|
53
|
-
>
|
|
54
|
-
<span class="tw-inline-block tw-rounded-full">{{ purchasedDomainLabel }}</span>
|
|
55
|
-
</label>
|
|
56
|
-
</div>
|
|
57
|
-
<div class="tw-mt-4 domain-dropdown">
|
|
58
|
-
<Dropdown
|
|
59
|
-
ref="dropdown"
|
|
60
|
-
:element-classes="{
|
|
61
|
-
'tw-h-12': true,
|
|
62
|
-
}"
|
|
63
|
-
menu-element-classes="tw-w-full"
|
|
64
|
-
:disabled="domainTypeValue === DOMAIN_TYPES.slug"
|
|
65
|
-
:class="{
|
|
66
|
-
'tw-text-grayscale-600 tw-font-normal': !selectedCustomDomain,
|
|
67
|
-
}"
|
|
68
|
-
:title="(selectedCustomDomain && selectedCustomDomain.domainName) || selectDomainDropdownPlaceholder"
|
|
69
|
-
>
|
|
70
|
-
<DropdownItem
|
|
71
|
-
v-for="purchasedDomain of domains"
|
|
72
|
-
:key="purchasedDomain.domainName"
|
|
73
|
-
class="tw-font-bold tw-break-all tw-flex tw-gap-2 tw-text-black"
|
|
74
|
-
@click="onSelectPurchasedDomain(purchasedDomain)"
|
|
75
|
-
>
|
|
76
|
-
{{ purchasedDomain.domainName }}
|
|
77
|
-
</DropdownItem>
|
|
78
|
-
</Dropdown>
|
|
79
|
-
</div>
|
|
80
|
-
<div v-if="errorMessage" class="tw-mt-2 tw-text-sm tw-text-left tw-text-error-500 tw-font-normal">
|
|
81
|
-
{{ errorMessage }}
|
|
82
|
-
</div>
|
|
83
|
-
</div>
|
|
84
|
-
<div class="tw-font-sans tw-text-center" :style="isMobile ? 'padding-left: 1.5rem; padding-right: 1.5rem;' : ''">
|
|
85
|
-
<Button
|
|
86
|
-
:label="publishLabel"
|
|
87
|
-
:variant="isDesignCom ? 'primary' : 'primary-with-icon'"
|
|
88
|
-
icon="chevron-right-wide"
|
|
89
|
-
:disabled="isPublishingDisabled"
|
|
90
|
-
class="tw-my-4"
|
|
91
|
-
:full-width="isMobile"
|
|
92
|
-
data-test-brand-page-publish-button
|
|
93
|
-
@on-click="onPublish"
|
|
94
|
-
/>
|
|
95
|
-
<Button
|
|
96
|
-
:label="hasAlreadyPurchasedDomainCloseButtonLabel"
|
|
97
|
-
variant="no-border"
|
|
98
|
-
size="large"
|
|
99
|
-
class="tw-my-4"
|
|
100
|
-
:full-width="isMobile"
|
|
101
|
-
@on-click="onCloseModal"
|
|
102
|
-
/>
|
|
103
|
-
</div>
|
|
104
|
-
</div>
|
|
105
|
-
</template>
|
|
106
|
-
<script>
|
|
107
|
-
import TextInput from '../../../../atoms/components/TextInput/TextInput.vue';
|
|
108
|
-
import Dropdown from '../../../../atoms/components/Dropdown/Dropdown.vue';
|
|
109
|
-
import DropdownItem from '../../../../atoms/components/Dropdown/DropdownItem.vue';
|
|
110
|
-
import Button from '../../../../atoms/components/Button/Button.vue';
|
|
111
|
-
import mediaQueryMixin from '../../../mixins/mediaQueryMixin';
|
|
112
|
-
import { publishBrandPageModalTr } from '../../../../useSharedLibTranslate';
|
|
113
|
-
|
|
114
|
-
const DOMAIN_TYPES = {
|
|
115
|
-
slug: 'slug',
|
|
116
|
-
purchased: 'purchased',
|
|
117
|
-
};
|
|
118
|
-
|
|
119
|
-
export default {
|
|
120
|
-
components: {
|
|
121
|
-
TextInput,
|
|
122
|
-
Dropdown,
|
|
123
|
-
DropdownItem,
|
|
124
|
-
Button,
|
|
125
|
-
},
|
|
126
|
-
mixins: [mediaQueryMixin],
|
|
127
|
-
props: {
|
|
128
|
-
radioValue: {
|
|
129
|
-
type: String,
|
|
130
|
-
required: true,
|
|
131
|
-
default: DOMAIN_TYPES.slug,
|
|
132
|
-
},
|
|
133
|
-
domains: {
|
|
134
|
-
type: Array,
|
|
135
|
-
required: true,
|
|
136
|
-
default: undefined,
|
|
137
|
-
},
|
|
138
|
-
brandPageBaseUrl: {
|
|
139
|
-
type: String,
|
|
140
|
-
required: true,
|
|
141
|
-
default: undefined,
|
|
142
|
-
},
|
|
143
|
-
brandPageSlug: {
|
|
144
|
-
type: String,
|
|
145
|
-
required: true,
|
|
146
|
-
default: undefined,
|
|
147
|
-
},
|
|
148
|
-
customDomain: {
|
|
149
|
-
type: Object,
|
|
150
|
-
required: false,
|
|
151
|
-
default: undefined,
|
|
152
|
-
},
|
|
153
|
-
slugValidationError: {
|
|
154
|
-
type: String,
|
|
155
|
-
required: true,
|
|
156
|
-
default: undefined,
|
|
157
|
-
},
|
|
158
|
-
errorMessage: {
|
|
159
|
-
type: String,
|
|
160
|
-
required: false,
|
|
161
|
-
default: undefined,
|
|
162
|
-
},
|
|
163
|
-
publishErrorMessage: {
|
|
164
|
-
type: String,
|
|
165
|
-
required: false,
|
|
166
|
-
default: undefined,
|
|
167
|
-
},
|
|
168
|
-
isPublishing: {
|
|
169
|
-
type: Boolean,
|
|
170
|
-
required: true,
|
|
171
|
-
default: false,
|
|
172
|
-
},
|
|
173
|
-
isDesignCom: {
|
|
174
|
-
type: Boolean,
|
|
175
|
-
required: true,
|
|
176
|
-
default: false,
|
|
177
|
-
},
|
|
178
|
-
brandPageType: {
|
|
179
|
-
type: String,
|
|
180
|
-
required: true,
|
|
181
|
-
default: '',
|
|
182
|
-
},
|
|
183
|
-
},
|
|
184
|
-
emits: ['close-modal', 'radio-button-changed', 'internal-publish-brand-page', 'on-select-domain', 'on-slug-changed'],
|
|
185
|
-
setup() {
|
|
186
|
-
return {
|
|
187
|
-
publishBrandPageModalTr,
|
|
188
|
-
slugInputPlaceholderYourNameLabel: publishBrandPageModalTr('slugInputPlaceholderYourNameLabel'),
|
|
189
|
-
slugInputPlaceholderYourBusinessNameLabel: publishBrandPageModalTr('slugInputPlaceholderYourBusinessNameLabel'),
|
|
190
|
-
freeDomainLabel: publishBrandPageModalTr('freeDomainLabel'),
|
|
191
|
-
purchasedDomainLabel: publishBrandPageModalTr('purchasedDomainLabel'),
|
|
192
|
-
publishLabel: publishBrandPageModalTr('publishLabel'),
|
|
193
|
-
hasAlreadyPurchasedDomainCloseButtonLabel: publishBrandPageModalTr('hasAlreadyPurchasedDomainCloseButtonLabel'),
|
|
194
|
-
selectDomainDropdownPlaceholder: publishBrandPageModalTr('selectDomainDropdownPlaceholder'),
|
|
195
|
-
};
|
|
196
|
-
},
|
|
197
|
-
data() {
|
|
198
|
-
return {
|
|
199
|
-
DOMAIN_TYPES,
|
|
200
|
-
domainTypeValue: this.radioValue,
|
|
201
|
-
internalSlug: this.brandPageSlug,
|
|
202
|
-
selectedCustomDomain: this.customDomain,
|
|
203
|
-
};
|
|
204
|
-
},
|
|
205
|
-
computed: {
|
|
206
|
-
brandPageBaseUrlWithoutHttps() {
|
|
207
|
-
return this.brandPageBaseUrl.replace('https://', '');
|
|
208
|
-
},
|
|
209
|
-
allowPublish() {
|
|
210
|
-
if (this.domainTypeValue === DOMAIN_TYPES.slug) {
|
|
211
|
-
return this.internalSlug && !this.slugValidationError;
|
|
212
|
-
}
|
|
213
|
-
return this.selectedCustomDomain;
|
|
214
|
-
},
|
|
215
|
-
hasPurchasedDomains() {
|
|
216
|
-
return this.domains && this.domains.length > 0;
|
|
217
|
-
},
|
|
218
|
-
slugErrorMessage() {
|
|
219
|
-
return this.slugValidationError ? this.slugValidationError : this.publishErrorMessage;
|
|
220
|
-
},
|
|
221
|
-
isInputEnabled() {
|
|
222
|
-
return this.isPublishing || this.domainTypeValue === DOMAIN_TYPES.purchased;
|
|
223
|
-
},
|
|
224
|
-
isPublishingDisabled() {
|
|
225
|
-
return !this.allowPublish || this.isPublishing;
|
|
226
|
-
},
|
|
227
|
-
getPlaceHolder() {
|
|
228
|
-
return this.brandPageType === 'brandContact'
|
|
229
|
-
? this.slugInputPlaceholderYourNameLabel
|
|
230
|
-
: this.slugInputPlaceholderYourBusinessNameLabel;
|
|
231
|
-
},
|
|
232
|
-
},
|
|
233
|
-
watch: {
|
|
234
|
-
brandPageSlug(slug) {
|
|
235
|
-
this.internalSlug = slug;
|
|
236
|
-
},
|
|
237
|
-
customDomain(val) {
|
|
238
|
-
this.selectedCustomDomain = val;
|
|
239
|
-
},
|
|
240
|
-
},
|
|
241
|
-
mounted() {
|
|
242
|
-
this.internalSlug = this.brandPageSlug;
|
|
243
|
-
},
|
|
244
|
-
methods: {
|
|
245
|
-
onDomainTypeRadioButtonClick(domain) {
|
|
246
|
-
this.domainTypeValue = domain;
|
|
247
|
-
this.closePurchasedDomainDropdown();
|
|
248
|
-
this.$emit('radio-button-changed', domain);
|
|
249
|
-
},
|
|
250
|
-
onCloseModal() {
|
|
251
|
-
this.$emit('close-modal');
|
|
252
|
-
},
|
|
253
|
-
onSlugChanged(e) {
|
|
254
|
-
this.$emit('on-slug-changed', e);
|
|
255
|
-
},
|
|
256
|
-
onPublish() {
|
|
257
|
-
this.$emit('internal-publish-brand-page', this.internalSlug, this.selectedCustomDomain);
|
|
258
|
-
},
|
|
259
|
-
onSelectPurchasedDomain(newVal) {
|
|
260
|
-
this.selectedCustomDomain = newVal;
|
|
261
|
-
this.$emit('on-select-domain', newVal);
|
|
262
|
-
this.closePurchasedDomainDropdown();
|
|
263
|
-
},
|
|
264
|
-
closePurchasedDomainDropdown() {
|
|
265
|
-
if (this.$refs.dropdown?.hideMenu) {
|
|
266
|
-
this.$refs.dropdown.hideMenu();
|
|
267
|
-
}
|
|
268
|
-
},
|
|
269
|
-
},
|
|
270
|
-
};
|
|
271
|
-
</script>
|