@designcrowd/fe-shared-lib 1.5.1 → 1.5.2
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-CV5AmoX8.css +1 -0
- package/.storybook-static/assets/Auth.stories-CX3sjxh5.js +490 -0
- package/.storybook-static/assets/AuthCrazyDomains.stories-Didj_VFa.js +73 -0
- package/.storybook-static/assets/Button-5UzSGUF6.css +1 -0
- package/.storybook-static/assets/Button-DtVlr_q3.js +1 -0
- package/.storybook-static/assets/ButtonGroup-Dfr7bNL2.css +1 -0
- package/.storybook-static/assets/ButtonGroup.stories-4EQk-ktb.js +503 -0
- package/.storybook-static/assets/ButtonPrimary-Bu6bXb_c.css +1 -0
- package/.storybook-static/assets/ButtonPrimary-DG9wNod9.js +1 -0
- package/.storybook-static/assets/Buttons.stories-B_KpeCzt.js +761 -0
- package/.storybook-static/assets/ButtonsCrazyDomains.stories-oZtahAmR.js +199 -0
- package/.storybook-static/assets/Checkbox.mixin-DkHpdvGa.js +1 -0
- package/.storybook-static/assets/Checkbox.stories-C67RL0ut.js +203 -0
- package/.storybook-static/assets/Checktile.stories-DN2wfzd6.js +88 -0
- package/.storybook-static/assets/CollapsiblePanel.stories-BkzrqfVG.js +39 -0
- package/.storybook-static/assets/ColorPicker.stories-85BQwpyF.js +73 -0
- package/.storybook-static/assets/CopyToClipboardText.stories-Csh5nVRs.js +32 -0
- package/.storybook-static/assets/Dropdown.stories-NNlxNopk.js +159 -0
- package/.storybook-static/assets/DropdownItem-CDX_V6Mi.js +1 -0
- package/.storybook-static/assets/DropdownItem-CLNmWtKh.css +1 -0
- package/.storybook-static/assets/FormControl.mixin-_gXRExB7.js +1 -0
- package/.storybook-static/assets/HashRouteModal.stories-Dy1_nLTJ.js +64 -0
- package/.storybook-static/assets/HelloBar-z54fob0q.js +1 -0
- package/.storybook-static/assets/HelloBar.stories-ClJ9_KRK.js +342 -0
- package/.storybook-static/assets/Icon-8mZGP41G.js +144 -0
- package/.storybook-static/assets/Icon.stories-BcXMvpuh.js +126 -0
- package/.storybook-static/assets/Icon.stories-D6ECVMta.js +751 -0
- package/.storybook-static/assets/Loader-D61Ki9P1.js +1 -0
- package/.storybook-static/assets/LogoBusinessBrandColours-B1_8hw0H.js +1 -0
- package/.storybook-static/assets/LogoBusinessBrandColours-DEFhAyxR.css +1 -0
- package/.storybook-static/assets/LogoBusinessBrandColours.stories-CIWe9ndn.js +36 -0
- package/.storybook-static/assets/Masonry-C2MNiGg0.css +1 -0
- package/.storybook-static/assets/Masonry.stories-CDT8kZCv.js +71 -0
- package/.storybook-static/assets/Modal-BQrpXSGA.js +1 -0
- package/.storybook-static/assets/Modal-BvVMN71n.css +1 -0
- package/.storybook-static/assets/Modal.stories-BycF7YL6.js +345 -0
- package/.storybook-static/assets/Notice.stories-BufkrC1b.js +222 -0
- package/.storybook-static/assets/NumberStepper-Blffv09R.css +1 -0
- package/.storybook-static/assets/NumberStepper.stories-6_y_lEgC.js +64 -0
- package/.storybook-static/assets/PaymentConfigList-wI1eTv5x.css +1 -0
- package/.storybook-static/assets/PaymentConfigList.stories-BlzzKrzz.js +126 -0
- package/.storybook-static/assets/Picture-Cq76CaoK.js +1 -0
- package/.storybook-static/assets/Picture.stories-BDqRm9_g.js +119 -0
- package/.storybook-static/assets/Pill-BsMeJhV9.js +1 -0
- package/.storybook-static/assets/Pill.stories-DUvzbtnS.js +18 -0
- package/.storybook-static/assets/PillBar-os4mJV3M.css +1 -0
- package/.storybook-static/assets/PillBar.stories-BUMLXBij.js +41 -0
- package/.storybook-static/assets/Price-DKOwLeD0.js +1 -0
- package/.storybook-static/assets/Price.stories-DlqrNUWI.js +221 -0
- package/.storybook-static/assets/PublishBrandPageModal-CLU8-If3.css +1 -0
- package/.storybook-static/assets/PublishBrandPageModal.stories-Dqobvq-n.js +273 -0
- package/.storybook-static/assets/SearchBar.stories-_wPX3-Rl.js +12 -0
- package/.storybook-static/assets/Select-Dw-zvSUg.css +1 -0
- package/.storybook-static/assets/Select.stories-BWINGxdY.js +108 -0
- package/.storybook-static/assets/SellDomainNameList.fixtures-LC6fjr_b.js +1 -0
- package/.storybook-static/assets/SellDomainNameListModal-ByK_ak0A.js +1 -0
- package/.storybook-static/assets/SellDomainNameListModal-CdfyEX1a.css +1 -0
- package/.storybook-static/assets/SellDomainNameListModal.stories-DrL8w2AY.js +71 -0
- package/.storybook-static/assets/SellDomainNameListSearchResult-1WuAKfzI.css +1 -0
- package/.storybook-static/assets/SellDomainNameListSearchResult-By0IpIM_.js +1 -0
- package/.storybook-static/assets/SellDomainNameSearchWithResults-BttjI4PH.js +1 -0
- package/.storybook-static/assets/SellDomainNameSearchWithResults.stories-Dm1Q8Cza.js +37 -0
- package/.storybook-static/assets/SellDomainNameWidget.stories-CKoz3WnZ.js +36 -0
- package/.storybook-static/assets/SignIn-DNYeJu86.css +1 -0
- package/.storybook-static/assets/SignIn-Dt8OJr0J.js +1 -0
- package/.storybook-static/assets/Slider-Cog2FFdj.css +1 -0
- package/.storybook-static/assets/Slider.stories-08DN2SFB.js +141 -0
- package/.storybook-static/assets/StarRating-BtKh7pzm.css +1 -0
- package/.storybook-static/assets/StarRating.stories-BEIj9ufA.js +45 -0
- package/.storybook-static/assets/TabMenu.stories-D9f0pyZI.js +47 -0
- package/.storybook-static/assets/TextCopyField-B04vTGbG.js +1 -0
- package/.storybook-static/assets/TextCopyField.stories-KD0WUWzA.js +47 -0
- package/.storybook-static/assets/TextInput-JK1M0hv6.js +1 -0
- package/.storybook-static/assets/TextInput.stories-BO0eQqBY.js +233 -0
- package/.storybook-static/assets/Textarea.stories-Bcn4sCkV.js +207 -0
- package/.storybook-static/assets/Toggle.stories-CuTFLoNh.js +161 -0
- package/.storybook-static/assets/Tooltip-DcSbUh5f.js +1 -0
- package/.storybook-static/assets/Tooltip-DyXIgFQH.css +1 -0
- package/.storybook-static/assets/Tooltip.stories-B0I_PBGG.js +953 -0
- package/.storybook-static/assets/UploadYourLogoApplication-EyTEQx-x.css +9 -0
- package/.storybook-static/assets/UploadYourLogoApplication.stories-Dixp1ynI.js +194 -0
- package/.storybook-static/assets/UploadYourLogoDropzone-DQqACf-e.css +1 -0
- package/.storybook-static/assets/UploadYourLogoDropzone-DouZtNvi.js +24 -0
- package/.storybook-static/assets/UploadYourLogoDropzone.stories-BHYeu4gz.js +55 -0
- package/.storybook-static/assets/UploadedLogoSearchResultCard.stories-D1KR63O4.js +79 -0
- package/.storybook-static/assets/_commonjsHelpers-D6-XlEtG.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-nGVJxRof.js +30 -0
- package/.storybook-static/assets/brand-crowd-api.client-DiPM1Wo-.js +1 -0
- package/.storybook-static/assets/bundled-translations-BZ57czTo.js +1 -0
- package/.storybook-static/assets/bundled-translations.de-DE-DXggTXB2.js +1 -0
- package/.storybook-static/assets/bundled-translations.es-ES-DtMmvicd.js +1 -0
- package/.storybook-static/assets/bundled-translations.fr-FR-BrQqbieG.js +1 -0
- package/.storybook-static/assets/bundled-translations.pt-PT-CpiWEAtr.js +1 -0
- package/.storybook-static/assets/carousel-CMMZ5MZ-.css +1 -0
- package/.storybook-static/assets/carousel.stories-o3eu2Qyc.js +374 -0
- package/.storybook-static/assets/event-constants-CMO9VQVu.js +1 -0
- package/.storybook-static/assets/iframe-C86bI_2U.js +1126 -0
- package/.storybook-static/assets/index-Bw-gCGc_.js +6 -0
- package/.storybook-static/assets/index-DhkYCT1V.js +29 -0
- package/.storybook-static/assets/matchers-7Z3WT2CE-T3xScrR7.js +14 -0
- package/.storybook-static/assets/tracking-ATsLLehC.js +1 -0
- package/.storybook-static/css/tailwind-brandCrowd.css +2404 -0
- package/.storybook-static/css/tailwind-brandPage.css +2088 -0
- package/.storybook-static/css/tailwind-crazyDomains.css +2404 -0
- package/.storybook-static/css/tailwind-designCom.css +2404 -0
- package/.storybook-static/css/tailwind-designCrowd.css +2404 -0
- package/.storybook-static/favicon.svg +1 -0
- package/.storybook-static/iframe.html +694 -0
- package/.storybook-static/index.html +156 -0
- package/.storybook-static/index.json +1 -0
- 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 +1 -0
- package/.storybook-static/sb-addons/a11y-1/manager-bundle.js +5 -0
- package/.storybook-static/sb-addons/links-2/manager-bundle.js +3 -0
- package/.storybook-static/sb-addons/storybook-core-server-presets-0/common-manager-bundle.js +188 -0
- package/.storybook-static/sb-addons/themes-3/manager-bundle.js +3 -0
- package/.storybook-static/sb-common-assets/favicon.svg +1 -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/globals-module-info.js +797 -0
- package/.storybook-static/sb-manager/globals-runtime.js +72062 -0
- package/.storybook-static/sb-manager/globals.js +34 -0
- package/.storybook-static/sb-manager/runtime.js +13002 -0
- package/dist/css/tailwind-brandCrowd.css +6 -86
- package/dist/css/tailwind-brandPage.css +6 -82
- package/dist/css/tailwind-crazyDomains.css +6 -86
- package/dist/css/tailwind-designCom.css +6 -86
- package/dist/css/tailwind-designCrowd.css +6 -86
- package/package.json +1 -1
- package/public/css/tailwind-brandCrowd.css +2417 -0
- package/public/css/tailwind-brandPage.css +2101 -0
- package/public/css/tailwind-crazyDomains.css +2417 -0
- package/public/css/tailwind-designCom.css +2417 -0
- package/public/css/tailwind-designCrowd.css +2417 -0
- package/src/experiences/components/PublishBrandPageModal/PublishBrandPageModal.stories.js +36 -0
- package/src/experiences/components/PublishBrandPageModal/PublishBrandPageModal.vue +100 -297
- package/src/experiences/components/PublishBrandPageModal/views/PublishWhenHasDomainsView.vue +271 -0
- package/src/experiences/components/PublishBrandPageModal/views/PublishWhenNoDomainsView.vue +168 -0
- package/src/experiences/components/PublishBrandPageModal/views/PublishedView.vue +149 -0
- package/src/experiences/components/PublishBrandPageModal/views/SetUrlView.vue +155 -0
|
@@ -0,0 +1,271 @@
|
|
|
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>
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<div class="tw-mt-4">
|
|
4
|
+
<PublishBrandPageCard
|
|
5
|
+
:img-url="iconUrl"
|
|
6
|
+
:title="freePublishCardTitleLabel"
|
|
7
|
+
:description="freePublishCardDescriptionLabel"
|
|
8
|
+
:is-design-com="isDesignCom"
|
|
9
|
+
:has-search-button="false"
|
|
10
|
+
>
|
|
11
|
+
<template #slug>
|
|
12
|
+
<div class="tw-flex tw-flex-col md:tw-flex-row tw-justify-between">
|
|
13
|
+
<div class="tw-grow md:tw-mr-2">
|
|
14
|
+
<TextInput
|
|
15
|
+
v-model="internalSlug"
|
|
16
|
+
element-classes="tw-mb-0 !tw-rounded-l-none tw-text-md"
|
|
17
|
+
:prefix-text="`${brandPageBaseUrlWithoutHttps}/`"
|
|
18
|
+
:error="!!slugValidationError"
|
|
19
|
+
:disabled="isInputEnabled"
|
|
20
|
+
:placeholder="getPlaceHolder"
|
|
21
|
+
data-test-brand-page-slug-input
|
|
22
|
+
:attrs="{ 'data-test-set-url-text-field': '' }"
|
|
23
|
+
@input="onSlugChanged"
|
|
24
|
+
/>
|
|
25
|
+
<div v-if="slugErrorMessage" class="tw-mt-2 tw-text-sm tw-text-left tw-text-error-500 tw-font-normal">
|
|
26
|
+
{{ slugErrorMessage }}
|
|
27
|
+
</div>
|
|
28
|
+
</div>
|
|
29
|
+
<Button
|
|
30
|
+
:label="publishLabel"
|
|
31
|
+
:disabled="isPublishingDisabled"
|
|
32
|
+
class="tw-flex tw-items-center tw-justify-center tw-mt-2 md:tw-mt-0 tw-font-bold tw-transition-colors tw-duration-300"
|
|
33
|
+
data-test-brand-page-publish-button
|
|
34
|
+
variant="primary"
|
|
35
|
+
size="small-medium"
|
|
36
|
+
:full-width="isMobile"
|
|
37
|
+
:class="{
|
|
38
|
+
'tw-uppercase': !isDesignCom,
|
|
39
|
+
}"
|
|
40
|
+
@on-click="onPublish"
|
|
41
|
+
/>
|
|
42
|
+
</div>
|
|
43
|
+
</template>
|
|
44
|
+
</PublishBrandPageCard>
|
|
45
|
+
</div>
|
|
46
|
+
<div class="tw-mt-4">
|
|
47
|
+
<slot name="recommended" />
|
|
48
|
+
</div>
|
|
49
|
+
</div>
|
|
50
|
+
</template>
|
|
51
|
+
<script>
|
|
52
|
+
import PublishBrandPageCard from '../PublishBrandPageCard.vue';
|
|
53
|
+
import TextInput from '../../../../atoms/components/TextInput/TextInput.vue';
|
|
54
|
+
import Button from '../../../../atoms/components/Button/Button.vue';
|
|
55
|
+
import mediaQueryMixin from '../../../mixins/mediaQueryMixin';
|
|
56
|
+
import { publishBrandPageModalTr } from '../../../../useSharedLibTranslate';
|
|
57
|
+
|
|
58
|
+
const DCOM_IMG_FREE = 'https://brandcrowd-cdn.s3.amazonaws.com/public/assets/images/icons/publish/dcom-free-url.svg';
|
|
59
|
+
const BC_IMG_FREE = 'https://brandcrowd-cdn.s3.amazonaws.com/public/assets/images/icons/publish/bc-free-url.svg';
|
|
60
|
+
|
|
61
|
+
export default {
|
|
62
|
+
components: {
|
|
63
|
+
TextInput,
|
|
64
|
+
Button,
|
|
65
|
+
PublishBrandPageCard,
|
|
66
|
+
},
|
|
67
|
+
mixins: [mediaQueryMixin],
|
|
68
|
+
props: {
|
|
69
|
+
brandPageBaseUrl: {
|
|
70
|
+
type: String,
|
|
71
|
+
required: true,
|
|
72
|
+
default: undefined,
|
|
73
|
+
},
|
|
74
|
+
brandPageSlug: {
|
|
75
|
+
type: String,
|
|
76
|
+
required: true,
|
|
77
|
+
default: undefined,
|
|
78
|
+
},
|
|
79
|
+
slugValidationError: {
|
|
80
|
+
type: String,
|
|
81
|
+
required: true,
|
|
82
|
+
default: undefined,
|
|
83
|
+
},
|
|
84
|
+
errorMessage: {
|
|
85
|
+
type: String,
|
|
86
|
+
required: false,
|
|
87
|
+
default: undefined,
|
|
88
|
+
},
|
|
89
|
+
publishErrorMessage: {
|
|
90
|
+
type: String,
|
|
91
|
+
required: false,
|
|
92
|
+
default: undefined,
|
|
93
|
+
},
|
|
94
|
+
isPublishing: {
|
|
95
|
+
type: Boolean,
|
|
96
|
+
required: true,
|
|
97
|
+
default: false,
|
|
98
|
+
},
|
|
99
|
+
isDesignCom: {
|
|
100
|
+
type: Boolean,
|
|
101
|
+
required: true,
|
|
102
|
+
default: false,
|
|
103
|
+
},
|
|
104
|
+
brandPageType: {
|
|
105
|
+
type: String,
|
|
106
|
+
required: true,
|
|
107
|
+
default: '',
|
|
108
|
+
},
|
|
109
|
+
},
|
|
110
|
+
emits: ['internal-publish-brand-page', 'on-slug-changed'],
|
|
111
|
+
setup() {
|
|
112
|
+
return {
|
|
113
|
+
publishBrandPageModalTr,
|
|
114
|
+
freePublishCardTitleLabel: publishBrandPageModalTr('freePublishCardTitleLabel'),
|
|
115
|
+
freePublishCardDescriptionLabel: publishBrandPageModalTr('freePublishCardDescriptionLabel'),
|
|
116
|
+
slugInputPlaceholderYourNameLabel: publishBrandPageModalTr('slugInputPlaceholderYourNameLabel'),
|
|
117
|
+
slugInputPlaceholderYourBusinessNameLabel: publishBrandPageModalTr('slugInputPlaceholderYourBusinessNameLabel'),
|
|
118
|
+
publishLabel: publishBrandPageModalTr('publishLabel'),
|
|
119
|
+
};
|
|
120
|
+
},
|
|
121
|
+
data() {
|
|
122
|
+
return {
|
|
123
|
+
internalSlug: this.brandPageSlug,
|
|
124
|
+
};
|
|
125
|
+
},
|
|
126
|
+
computed: {
|
|
127
|
+
brandPageBaseUrlWithoutHttps() {
|
|
128
|
+
return this.brandPageBaseUrl.replace('https://', '');
|
|
129
|
+
},
|
|
130
|
+
allowPublish() {
|
|
131
|
+
return this.internalSlug && !this.slugValidationError;
|
|
132
|
+
},
|
|
133
|
+
slugErrorMessage() {
|
|
134
|
+
return this.slugValidationError ? this.slugValidationError : this.publishErrorMessage;
|
|
135
|
+
},
|
|
136
|
+
iconUrl() {
|
|
137
|
+
return this.isDesignCom ? DCOM_IMG_FREE : BC_IMG_FREE;
|
|
138
|
+
},
|
|
139
|
+
isInputEnabled() {
|
|
140
|
+
return this.isPublishing;
|
|
141
|
+
},
|
|
142
|
+
isPublishingDisabled() {
|
|
143
|
+
return !this.allowPublish || this.isPublishing;
|
|
144
|
+
},
|
|
145
|
+
getPlaceHolder() {
|
|
146
|
+
return this.brandPageType === 'brandContact'
|
|
147
|
+
? this.slugInputPlaceholderYourNameLabel
|
|
148
|
+
: this.slugInputPlaceholderYourBusinessNameLabel;
|
|
149
|
+
},
|
|
150
|
+
},
|
|
151
|
+
watch: {
|
|
152
|
+
brandPageSlug(slug) {
|
|
153
|
+
this.internalSlug = slug;
|
|
154
|
+
},
|
|
155
|
+
},
|
|
156
|
+
mounted() {
|
|
157
|
+
this.internalSlug = this.brandPageSlug;
|
|
158
|
+
},
|
|
159
|
+
methods: {
|
|
160
|
+
onSlugChanged(e) {
|
|
161
|
+
this.$emit('on-slug-changed', e);
|
|
162
|
+
},
|
|
163
|
+
onPublish() {
|
|
164
|
+
this.$emit('internal-publish-brand-page', this.internalSlug);
|
|
165
|
+
},
|
|
166
|
+
},
|
|
167
|
+
};
|
|
168
|
+
</script>
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="tw-font-sans">
|
|
3
|
+
<div v-if="!showUpsellRotationContainer" class="tw-mb-6 tw-text-left">
|
|
4
|
+
<div class="tw-mb-6">
|
|
5
|
+
<SellDomainNameSearchWithResults
|
|
6
|
+
:is-design-com="isDesignCom"
|
|
7
|
+
:initial-search-term="searchText"
|
|
8
|
+
:currency="userCurrency"
|
|
9
|
+
:display-result-limit="4"
|
|
10
|
+
:domain-search-location="sitePublishedModal"
|
|
11
|
+
show-view-more-button
|
|
12
|
+
@on-change-search="onSearchTextChanged"
|
|
13
|
+
@on-buy-now-click="onBuyNowClick"
|
|
14
|
+
@on-view-more="onViewMore"
|
|
15
|
+
/>
|
|
16
|
+
</div>
|
|
17
|
+
</div>
|
|
18
|
+
<div class="tw-px-4 tw-text-center" :class="{ 'lg:tw-px-20': hasPurchasedDomains }">
|
|
19
|
+
<TextCopyField
|
|
20
|
+
button-variant="secondary"
|
|
21
|
+
:text="brandPageUrl"
|
|
22
|
+
:default-copy-button-text="copyLabel"
|
|
23
|
+
:copied-button-text="copySuccessLabel"
|
|
24
|
+
data-test-brand-page-copy-input
|
|
25
|
+
@on-click="onCopyUrlClick"
|
|
26
|
+
/>
|
|
27
|
+
<Button
|
|
28
|
+
:label="viewMyWebsiteLabel"
|
|
29
|
+
:variant="isDesignCom ? 'primary' : 'primary-with-icon'"
|
|
30
|
+
icon="chevron-right-wide"
|
|
31
|
+
size="medium"
|
|
32
|
+
icon-view-box="0 0 24 24"
|
|
33
|
+
class="tw-my-4"
|
|
34
|
+
target="_blank"
|
|
35
|
+
rel="noopener noreferrer"
|
|
36
|
+
:url="brandPageUrl"
|
|
37
|
+
:full-width="isMobile"
|
|
38
|
+
@on-click="onBrandPageUrlClick"
|
|
39
|
+
/>
|
|
40
|
+
</div>
|
|
41
|
+
<div v-if="showUpsellRotationContainer" class="tw-border-t tw-border-solid tw-border-grayscale-500 tw-p-5">
|
|
42
|
+
<slot name="upsellContainer" />
|
|
43
|
+
</div>
|
|
44
|
+
</div>
|
|
45
|
+
</template>
|
|
46
|
+
<script>
|
|
47
|
+
import Button from '../../../../atoms/components/Button/Button.vue';
|
|
48
|
+
import TextCopyField from '../../../../atoms/components/TextCopyField/TextCopyField.vue';
|
|
49
|
+
|
|
50
|
+
import SellDomainNameSearchWithResults from '../../SellDomainNameSearchWithResults/SellDomainNameSearchWithResults.vue';
|
|
51
|
+
import { sitePublishedModal } from '../../../constants/event-constants';
|
|
52
|
+
import mediaQueryMixin from '../../../mixins/mediaQueryMixin';
|
|
53
|
+
import { publishBrandPageModalTr } from '../../../../useSharedLibTranslate';
|
|
54
|
+
|
|
55
|
+
export default {
|
|
56
|
+
components: {
|
|
57
|
+
Button,
|
|
58
|
+
TextCopyField,
|
|
59
|
+
SellDomainNameSearchWithResults,
|
|
60
|
+
},
|
|
61
|
+
mixins: [mediaQueryMixin],
|
|
62
|
+
props: {
|
|
63
|
+
brandPageUrl: {
|
|
64
|
+
type: String,
|
|
65
|
+
required: true,
|
|
66
|
+
default: undefined,
|
|
67
|
+
},
|
|
68
|
+
isDesignCom: {
|
|
69
|
+
type: Boolean,
|
|
70
|
+
required: true,
|
|
71
|
+
default: false,
|
|
72
|
+
},
|
|
73
|
+
showUpsellRotation: {
|
|
74
|
+
type: Boolean,
|
|
75
|
+
required: true,
|
|
76
|
+
default: false,
|
|
77
|
+
},
|
|
78
|
+
isSubsequentPublish: {
|
|
79
|
+
type: Boolean,
|
|
80
|
+
required: true,
|
|
81
|
+
default: false,
|
|
82
|
+
},
|
|
83
|
+
searchText: {
|
|
84
|
+
type: String,
|
|
85
|
+
required: false,
|
|
86
|
+
default: '',
|
|
87
|
+
},
|
|
88
|
+
brandPageDisplayName: {
|
|
89
|
+
type: String,
|
|
90
|
+
required: true,
|
|
91
|
+
default: undefined,
|
|
92
|
+
},
|
|
93
|
+
hasPurchasedDomains: {
|
|
94
|
+
type: Boolean,
|
|
95
|
+
required: true,
|
|
96
|
+
default: false,
|
|
97
|
+
},
|
|
98
|
+
showUpsellRotationContainer: {
|
|
99
|
+
type: Boolean,
|
|
100
|
+
required: true,
|
|
101
|
+
default: false,
|
|
102
|
+
},
|
|
103
|
+
userCurrency: {
|
|
104
|
+
type: String,
|
|
105
|
+
required: true,
|
|
106
|
+
default: undefined,
|
|
107
|
+
},
|
|
108
|
+
},
|
|
109
|
+
emits: [
|
|
110
|
+
'copy-url-clicked',
|
|
111
|
+
'on-brand-page-url-click',
|
|
112
|
+
'on-view-more-domains',
|
|
113
|
+
'on-buy-now-clicked',
|
|
114
|
+
'on-search-text-changed',
|
|
115
|
+
],
|
|
116
|
+
setup() {
|
|
117
|
+
return {
|
|
118
|
+
sitePublishedModal,
|
|
119
|
+
publishBrandPageModalTr,
|
|
120
|
+
copyLabel: publishBrandPageModalTr('copyLabel'),
|
|
121
|
+
copySuccessLabel: publishBrandPageModalTr('copySuccessLabel'),
|
|
122
|
+
};
|
|
123
|
+
},
|
|
124
|
+
computed: {
|
|
125
|
+
viewMyWebsiteLabel() {
|
|
126
|
+
return this.publishBrandPageModalTr('viewMyWebsiteLabel', {
|
|
127
|
+
brandPageDisplayName: this.brandPageDisplayName,
|
|
128
|
+
});
|
|
129
|
+
},
|
|
130
|
+
},
|
|
131
|
+
methods: {
|
|
132
|
+
onCopyUrlClick() {
|
|
133
|
+
this.$emit('copy-url-clicked');
|
|
134
|
+
},
|
|
135
|
+
onBrandPageUrlClick() {
|
|
136
|
+
this.$emit('on-brand-page-url-click');
|
|
137
|
+
},
|
|
138
|
+
onViewMore() {
|
|
139
|
+
this.$emit('on-view-more-domains');
|
|
140
|
+
},
|
|
141
|
+
onSearchTextChanged(val) {
|
|
142
|
+
this.$emit('on-search-text-changed', val);
|
|
143
|
+
},
|
|
144
|
+
onBuyNowClick() {
|
|
145
|
+
this.$emit('on-buy-now-clicked');
|
|
146
|
+
},
|
|
147
|
+
},
|
|
148
|
+
};
|
|
149
|
+
</script>
|