@designcrowd/library.brand-page 6.0.21 → 6.0.22
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/lib/src/{CreatedOnBrandCrowd-de-de-C52IyXZu.js → CreatedOnBrandCrowd-de-de-BS8dQhaZ.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-en-us-DhTy_dEV.js → CreatedOnBrandCrowd-en-us-45ZyXSxn.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-es-es-BJelIAQ4.js → CreatedOnBrandCrowd-es-es-B1K3Ojw-.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-fr-fr-DwJohy0T.js → CreatedOnBrandCrowd-fr-ca-4v9c20Q9.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-fr-ca-DwJohy0T.js → CreatedOnBrandCrowd-fr-fr-4v9c20Q9.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-pt-pt-CMzKbxdG.js → CreatedOnBrandCrowd-pt-br-BdDmm1GE.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-pt-br-CMzKbxdG.js → CreatedOnBrandCrowd-pt-pt-BdDmm1GE.js} +1 -1
- package/lib/src/{CreatedOnDcom-de-de-DAy1GHrw.js → CreatedOnDcom-de-de-Dc8rOxAE.js} +1 -1
- package/lib/src/{CreatedOnDcom-en-us-CgBDAkJN.js → CreatedOnDcom-en-us-Bq6rusW6.js} +1 -1
- package/lib/src/{CreatedOnDcom-es-es-Ds9d5rem.js → CreatedOnDcom-es-es-C5gNEuoi.js} +1 -1
- package/lib/src/{CreatedOnDcom-fr-ca-CZL0BQ-u.js → CreatedOnDcom-fr-ca-NL2KoADg.js} +1 -1
- package/lib/src/{CreatedOnDcom-fr-fr-BVYh5Wvo.js → CreatedOnDcom-fr-fr-DZaLN0j-.js} +1 -1
- package/lib/src/{CreatedOnDcom-pt-br-1hsWNXfq.js → CreatedOnDcom-pt-br-DXZvo45o.js} +1 -1
- package/lib/src/{CreatedOnDcom-pt-pt-DvM0N-3M.js → CreatedOnDcom-pt-pt-GUJ4aTM2.js} +1 -1
- package/lib/src/brand-page/components/collapsible/Collapsible.mixin.d.ts +11 -0
- package/lib/src/brand-page/components/collapsible/Collapsible.mixin.js +13 -1
- package/lib/src/brand-page/components/contact-form/ContactForm.mixin.d.ts +1 -0
- package/lib/src/brand-page/components/contact-form/ContactForm.mixin.js +12 -3
- package/lib/src/brand-page/components/mailing-list/MailingList.mixin.js +5 -0
- package/lib/src/brand-page/components/payment/Payment.mixin.js +5 -0
- package/lib/src/brand-page/models/index.d.ts +1 -0
- package/lib/src/brand-page/models/payment.model.d.ts +2 -0
- package/lib/src/brand-page/utils/button.util.d.ts +5 -0
- package/lib/src/brand-page/utils/button.util.js +13 -0
- package/lib/src/brand-page/utils/migration/migration-19.d.ts +2 -0
- package/lib/src/brand-page/utils/migration/migration-19.js +41 -0
- package/lib/src/brand-page/utils/migration.util.js +11 -0
- package/lib/src/brand-page/utils/view-model.util.js +1 -0
- package/lib/src/brand-page-maker/assessors/contact-form-visibility.assessor.d.ts +1 -0
- package/lib/src/brand-page-maker/assessors/contact-form-visibility.assessor.js +16 -7
- package/lib/src/brand-page-maker/constants/config-settings-constant.js +40 -3
- package/lib/src/brand-page-maker/default-getters/contact-form-card-color.default-getter.d.ts +8 -0
- package/lib/src/brand-page-maker/default-getters/contact-form-card-color.default-getter.js +16 -0
- package/lib/src/brand-page-maker/default-getters/index.d.ts +1 -0
- package/lib/src/brand-page-maker/default-getters/index.js +1 -0
- package/lib/src/brand-page-maker/models/button-styles-config.js +15 -3
- package/lib/src/brand-page-maker/models/content-settings-configs.d.ts +2 -1
- package/lib/src/brand-page-maker/models/content-settings.js +15 -3
- package/lib/src/css/library.brand-page-brandCrowd.min.css +96 -68
- package/lib/src/css/library.brand-page-brandPage.min.css +96 -68
- package/lib/src/css/library.brand-page-designCom.min.css +96 -68
- package/lib/src/css/library.brand-page-preview.min.css +96 -68
- package/lib/src/index.mjs +1 -1
- package/lib/src/{lib-CK2FPBv5.js → lib-Dh4vrmod.js} +18439 -18090
- package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItemField.mixin.js +5 -0
- package/lib/src/shared/content-settings/models.d.ts +1 -0
- package/lib/src/shared/content-settings/store/content-settings-store.js +3 -0
- package/package.json +2 -2
- package/src/brand-page/components/button/ButtonStyleWrapper.vue +112 -44
- package/src/brand-page/components/button/ButtonStyleWrapper.vue.test.ts +167 -0
- package/src/brand-page/components/collapsible/Collapsible.mixin.ts +14 -1
- package/src/brand-page/components/contact-form/ContactForm.mixin.test.ts +18 -0
- package/src/brand-page/components/contact-form/ContactForm.mixin.ts +15 -3
- package/src/brand-page/components/contact-form/ContactForm.vue +97 -36
- package/src/brand-page/components/mailing-list/MailingList.mixin.ts +6 -0
- package/src/brand-page/components/mailing-list/MailingList.vue +18 -10
- package/src/brand-page/components/payment/Payment.mixin.ts +6 -0
- package/src/brand-page/components/payment/Payment.vue +43 -24
- package/src/brand-page/components/payment/RequestPaymentStripe.vue +26 -22
- package/src/brand-page/components/shop/Shop.vue +15 -6
- package/src/brand-page/models/index.ts +1 -0
- package/src/brand-page/models/payment.model.ts +2 -0
- package/src/brand-page/utils/__snapshots__/migration.util.test.ts.snap +3 -3
- package/src/brand-page/utils/button.util.ts +17 -0
- package/src/brand-page/utils/migration/migration-19.test.ts +172 -0
- package/src/brand-page/utils/migration/migration-19.ts +65 -0
- package/src/brand-page/utils/migration.util.ts +12 -0
- package/src/brand-page/utils/view-model.util.ts +1 -0
- package/src/brand-page-maker/assessors/contact-form-visibility.assessor.ts +34 -26
- package/src/brand-page-maker/constants/config-settings-constant.ts +43 -2
- package/src/brand-page-maker/default-getters/contact-form-card-color.default-getter.ts +23 -0
- package/src/brand-page-maker/default-getters/index.ts +1 -0
- package/src/brand-page-maker/models/button-styles-config.ts +15 -3
- package/src/brand-page-maker/models/content-settings-configs.ts +4 -1
- package/src/brand-page-maker/models/content-settings.ts +16 -3
- package/src/shared/content-settings/components/content-settings-item/ContentSettingsItemField.mixin.ts +6 -0
- package/src/shared/content-settings/models.ts +3 -0
- package/src/shared/content-settings/store/content-settings-store.ts +3 -0
- package/src/shared/style-settings/components/StyleSettings.vue +1 -0
- package/lib/src/metadata-builder/builders/reorder-pages-builder.d.ts +0 -13
- package/lib/src/metadata-builder/builders/reorder-pages-builder.js +0 -49
- package/src/metadata-builder/builders/reorder-pages-builder.ts +0 -80
|
@@ -30,6 +30,10 @@
|
|
|
30
30
|
:title="title"
|
|
31
31
|
:title-style="viewModel.titleStyle"
|
|
32
32
|
:button-styles="viewModel.buttonStyles.style"
|
|
33
|
+
:card-style="context.isBrandSite ? undefined : viewModel.cardStyle"
|
|
34
|
+
:background-style="
|
|
35
|
+
context.isBrandSite ? viewModel.backgroundStyle : undefined
|
|
36
|
+
"
|
|
33
37
|
:can-collapse="canCollapse"
|
|
34
38
|
:context="context"
|
|
35
39
|
:class="{ 'contact-container': context.isBrandSite }"
|
|
@@ -80,17 +84,25 @@
|
|
|
80
84
|
{{ value.error }}
|
|
81
85
|
</p>
|
|
82
86
|
</div>
|
|
83
|
-
<
|
|
87
|
+
<ButtonStyleWrapper
|
|
84
88
|
v-if="isSubmitButtonVisible"
|
|
85
|
-
|
|
86
|
-
|
|
89
|
+
:selected-button-style-id="
|
|
90
|
+
viewModel.buttonStyles.selectedButtonStyleId
|
|
91
|
+
"
|
|
92
|
+
:icon-color="viewModel.buttonStyles.style.backgroundColor"
|
|
93
|
+
:no-margin="true"
|
|
87
94
|
>
|
|
88
|
-
<
|
|
89
|
-
|
|
90
|
-
:
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
95
|
+
<button
|
|
96
|
+
class="tw-block tw-border-0 tw-mt-4 tw-py-2 tw-select-none tw-text-base tw-text-center tw-w-full hover:tw-cursor-pointer"
|
|
97
|
+
:style="submitButtonStyle"
|
|
98
|
+
>
|
|
99
|
+
<TextWrapper
|
|
100
|
+
:text-style="submitButtonTextStyle"
|
|
101
|
+
:text="viewModel.buttonText"
|
|
102
|
+
class="tw-text-center tw-text-base"
|
|
103
|
+
/>
|
|
104
|
+
</button>
|
|
105
|
+
</ButtonStyleWrapper>
|
|
94
106
|
</div>
|
|
95
107
|
<div v-else class="tw-w-full tw-flex tw-justify-center">
|
|
96
108
|
<Loader />
|
|
@@ -184,18 +196,31 @@
|
|
|
184
196
|
</p>
|
|
185
197
|
</div>
|
|
186
198
|
<div class="tw-flex tw-w-full tw-justify-center tw-col-span-2">
|
|
187
|
-
<
|
|
199
|
+
<ButtonStyleWrapper
|
|
188
200
|
v-if="isSubmitButtonVisible"
|
|
189
|
-
|
|
190
|
-
|
|
201
|
+
:selected-button-style-id="
|
|
202
|
+
viewModel.buttonStyles.selectedButtonStyleId
|
|
203
|
+
"
|
|
204
|
+
:icon-color="viewModel.buttonStyles.style.backgroundColor"
|
|
205
|
+
:full-width="!!isMobileDevice"
|
|
191
206
|
:class="{ 'tw-w-full': isMobileDevice }"
|
|
207
|
+
:no-margin="true"
|
|
192
208
|
>
|
|
193
|
-
<
|
|
194
|
-
|
|
195
|
-
:
|
|
196
|
-
class="
|
|
197
|
-
|
|
198
|
-
|
|
209
|
+
<button
|
|
210
|
+
class="tw-block tw-border-0 tw-py-2 tw-select-none tw-text-base tw-text-center tw-w-fit hover:tw-cursor-pointer tw-px-8 tw-py-3 c-button-full"
|
|
211
|
+
:style="submitButtonStyle"
|
|
212
|
+
:class="{
|
|
213
|
+
'tw-w-full': isMobileDevice,
|
|
214
|
+
'tw-min-w-[120px]': isDecorativeSubmitStyle,
|
|
215
|
+
}"
|
|
216
|
+
>
|
|
217
|
+
<TextWrapper
|
|
218
|
+
:text-style="submitButtonTextStyle"
|
|
219
|
+
:text="viewModel.buttonText"
|
|
220
|
+
class="tw-text-center tw-text-base"
|
|
221
|
+
/>
|
|
222
|
+
</button>
|
|
223
|
+
</ButtonStyleWrapper>
|
|
199
224
|
</div>
|
|
200
225
|
</div>
|
|
201
226
|
<div v-else class="tw-w-full tw-flex tw-justify-center">
|
|
@@ -296,18 +321,31 @@
|
|
|
296
321
|
</p>
|
|
297
322
|
</div>
|
|
298
323
|
<div class="tw-flex tw-w-full tw-justify-start tw-col-span-2">
|
|
299
|
-
<
|
|
324
|
+
<ButtonStyleWrapper
|
|
300
325
|
v-if="isSubmitButtonVisible"
|
|
301
|
-
|
|
302
|
-
|
|
326
|
+
:selected-button-style-id="
|
|
327
|
+
viewModel.buttonStyles.selectedButtonStyleId
|
|
328
|
+
"
|
|
329
|
+
:icon-color="viewModel.buttonStyles.style.backgroundColor"
|
|
330
|
+
:full-width="!!isMobileDevice"
|
|
303
331
|
:class="{ 'tw-w-full': isMobileDevice }"
|
|
332
|
+
:no-margin="true"
|
|
304
333
|
>
|
|
305
|
-
<
|
|
306
|
-
|
|
307
|
-
:
|
|
308
|
-
class="
|
|
309
|
-
|
|
310
|
-
|
|
334
|
+
<button
|
|
335
|
+
class="tw-block tw-border-0 tw-py-2 tw-select-none tw-text-base tw-text-center tw-w-fit hover:tw-cursor-pointer tw-px-8 tw-py-3 c-button-full"
|
|
336
|
+
:style="submitButtonStyle"
|
|
337
|
+
:class="{
|
|
338
|
+
'tw-w-full': isMobileDevice,
|
|
339
|
+
'tw-min-w-[120px]': isDecorativeSubmitStyle,
|
|
340
|
+
}"
|
|
341
|
+
>
|
|
342
|
+
<TextWrapper
|
|
343
|
+
:text-style="submitButtonTextStyle"
|
|
344
|
+
:text="viewModel.buttonText"
|
|
345
|
+
class="tw-text-center tw-text-base"
|
|
346
|
+
/>
|
|
347
|
+
</button>
|
|
348
|
+
</ButtonStyleWrapper>
|
|
311
349
|
</div>
|
|
312
350
|
</div>
|
|
313
351
|
<p v-if="hasSubmitError" class="tw-text-center tw-mt-2 form-error">
|
|
@@ -426,18 +464,33 @@
|
|
|
426
464
|
<div
|
|
427
465
|
class="tw-flex tw-w-full tw-justify-start tw-col-span-2"
|
|
428
466
|
>
|
|
429
|
-
<
|
|
467
|
+
<ButtonStyleWrapper
|
|
430
468
|
v-if="isSubmitButtonVisible"
|
|
431
|
-
|
|
432
|
-
|
|
469
|
+
:selected-button-style-id="
|
|
470
|
+
viewModel.buttonStyles.selectedButtonStyleId
|
|
471
|
+
"
|
|
472
|
+
:icon-color="
|
|
473
|
+
viewModel.buttonStyles.style.backgroundColor
|
|
474
|
+
"
|
|
475
|
+
:full-width="!!isMobileDevice"
|
|
433
476
|
:class="{ 'tw-w-full': isMobileDevice }"
|
|
477
|
+
:no-margin="true"
|
|
434
478
|
>
|
|
435
|
-
<
|
|
436
|
-
|
|
437
|
-
:
|
|
438
|
-
class="
|
|
439
|
-
|
|
440
|
-
|
|
479
|
+
<button
|
|
480
|
+
class="tw-block tw-border-0 tw-py-2 tw-select-none tw-text-base tw-text-center tw-w-fit hover:tw-cursor-pointer tw-px-8 tw-py-3 c-button-full"
|
|
481
|
+
:style="submitButtonStyle"
|
|
482
|
+
:class="{
|
|
483
|
+
'tw-w-full': isMobileDevice,
|
|
484
|
+
'tw-min-w-[120px]': isDecorativeSubmitStyle,
|
|
485
|
+
}"
|
|
486
|
+
>
|
|
487
|
+
<TextWrapper
|
|
488
|
+
:text-style="submitButtonTextStyle"
|
|
489
|
+
:text="viewModel.buttonText"
|
|
490
|
+
class="tw-text-center tw-text-base"
|
|
491
|
+
/>
|
|
492
|
+
</button>
|
|
493
|
+
</ButtonStyleWrapper>
|
|
441
494
|
</div>
|
|
442
495
|
</div>
|
|
443
496
|
<div v-else class="tw-w-full tw-flex tw-justify-center">
|
|
@@ -476,6 +529,7 @@ import Collapsible from '../collapsible/Collapsible.vue';
|
|
|
476
529
|
import MailingListMixin from './ContactForm.mixin.ts';
|
|
477
530
|
import Media from '../media/Media.vue';
|
|
478
531
|
import TextWrapper from '../text-wrapper/TextWrapper.vue';
|
|
532
|
+
import ButtonStyleWrapper from '../button/ButtonStyleWrapper.vue';
|
|
479
533
|
import RecaptchaDisclosure from '../recaptcha-disclosure/RecaptchaDisclosure.vue';
|
|
480
534
|
|
|
481
535
|
export default {
|
|
@@ -486,6 +540,7 @@ export default {
|
|
|
486
540
|
Loader,
|
|
487
541
|
Media,
|
|
488
542
|
TextWrapper,
|
|
543
|
+
ButtonStyleWrapper,
|
|
489
544
|
RecaptchaDisclosure,
|
|
490
545
|
},
|
|
491
546
|
mixins: [MailingListMixin],
|
|
@@ -520,6 +575,12 @@ export default {
|
|
|
520
575
|
.c-button-full {
|
|
521
576
|
@apply tw-w-full;
|
|
522
577
|
}
|
|
578
|
+
/* Match the button's full-width on published mobile. The maker uses the
|
|
579
|
+
isMobileDevice prop for this; the renderer has no such state, so the
|
|
580
|
+
decorative-button wrapper is widened here via the real viewport instead. */
|
|
581
|
+
:deep(.bp-style-wrapper) {
|
|
582
|
+
@apply tw-w-full;
|
|
583
|
+
}
|
|
523
584
|
.c-col-span-2 {
|
|
524
585
|
@apply tw-col-span-2;
|
|
525
586
|
}
|
|
@@ -126,6 +126,12 @@ export default defineComponent({
|
|
|
126
126
|
buttonStyle.borderRadius = '24px';
|
|
127
127
|
}
|
|
128
128
|
|
|
129
|
+
// Own background colour decouples the container from the button fill (BP-5800).
|
|
130
|
+
if (this.viewModel.backgroundStyle?.backgroundColor) {
|
|
131
|
+
buttonStyle.backgroundColor =
|
|
132
|
+
this.viewModel.backgroundStyle.backgroundColor;
|
|
133
|
+
}
|
|
134
|
+
|
|
129
135
|
return buttonStyle;
|
|
130
136
|
},
|
|
131
137
|
|
|
@@ -46,17 +46,23 @@
|
|
|
46
46
|
<p v-if="hasEmailError" class="form-error">
|
|
47
47
|
{{ emailError }}
|
|
48
48
|
</p>
|
|
49
|
-
<
|
|
50
|
-
:style="
|
|
51
|
-
:
|
|
52
|
-
|
|
53
|
-
:class="{
|
|
54
|
-
'tw-cursor-pointer hover:tw-underline': !isFormDisabled,
|
|
55
|
-
'tw-cursor-wait': isSubmitting,
|
|
56
|
-
}"
|
|
49
|
+
<ButtonStyleWrapper
|
|
50
|
+
:selected-button-style-id="viewModel.styles.selectedButtonStyleId"
|
|
51
|
+
:icon-color="viewModel.styles.style.backgroundColor"
|
|
52
|
+
:no-margin="true"
|
|
57
53
|
>
|
|
58
|
-
|
|
59
|
-
|
|
54
|
+
<button
|
|
55
|
+
:style="buttonStyle"
|
|
56
|
+
:disabled="isFormDisabled"
|
|
57
|
+
class="tw-w-full tw-py-4 tw-mt-4 tw-block tw-text-center tw-text-base tw-border-0"
|
|
58
|
+
:class="{
|
|
59
|
+
'tw-cursor-pointer hover:tw-underline': !isFormDisabled,
|
|
60
|
+
'tw-cursor-wait': isSubmitting,
|
|
61
|
+
}"
|
|
62
|
+
>
|
|
63
|
+
{{ buttonText }}
|
|
64
|
+
</button>
|
|
65
|
+
</ButtonStyleWrapper>
|
|
60
66
|
<p v-if="hasSubmitError" class="tw-text-center tw-mt-2 form-error">
|
|
61
67
|
{{ submitError }}
|
|
62
68
|
</p>
|
|
@@ -74,12 +80,14 @@
|
|
|
74
80
|
import { TextInput } from '@designcrowd/fe-shared-lib';
|
|
75
81
|
import MailingListMixin from './MailingList.mixin.ts';
|
|
76
82
|
import TextWrapper from '../text-wrapper/TextWrapper.vue';
|
|
83
|
+
import ButtonStyleWrapper from '../button/ButtonStyleWrapper.vue';
|
|
77
84
|
import RecaptchaDisclosure from '../recaptcha-disclosure/RecaptchaDisclosure.vue';
|
|
78
85
|
|
|
79
86
|
export default {
|
|
80
87
|
components: {
|
|
81
88
|
TextInput,
|
|
82
89
|
TextWrapper,
|
|
90
|
+
ButtonStyleWrapper,
|
|
83
91
|
RecaptchaDisclosure,
|
|
84
92
|
},
|
|
85
93
|
mixins: [MailingListMixin],
|
|
@@ -126,6 +126,12 @@ export default defineComponent({
|
|
|
126
126
|
buttonStyle.borderRadius = '26px';
|
|
127
127
|
}
|
|
128
128
|
|
|
129
|
+
// Own background colour decouples the container from the button fill (BP-5800).
|
|
130
|
+
if (this.viewModel.backgroundStyle?.backgroundColor) {
|
|
131
|
+
buttonStyle.backgroundColor =
|
|
132
|
+
this.viewModel.backgroundStyle.backgroundColor;
|
|
133
|
+
}
|
|
134
|
+
|
|
129
135
|
return buttonStyle;
|
|
130
136
|
},
|
|
131
137
|
|
|
@@ -49,22 +49,31 @@
|
|
|
49
49
|
<slot name="payment-options" />
|
|
50
50
|
|
|
51
51
|
<!-- TODO: Calculate or constant disabled background colour -->
|
|
52
|
-
<
|
|
53
|
-
|
|
54
|
-
|
|
52
|
+
<ButtonStyleWrapper
|
|
53
|
+
:selected-button-style-id="
|
|
54
|
+
viewModel.buttonStyles.selectedButtonStyleId
|
|
55
|
+
"
|
|
56
|
+
:icon-color="viewModel.buttonStyles.style.backgroundColor"
|
|
57
|
+
:no-margin="true"
|
|
55
58
|
:disabled="!isPaymentOptionSelectionContinueEnabled"
|
|
56
|
-
:class="{
|
|
57
|
-
'hover:tw-cursor-pointer': isPaymentOptionSelectionContinueEnabled,
|
|
58
|
-
'tw-opacity-50': !isPaymentOptionSelectionContinueEnabled,
|
|
59
|
-
}"
|
|
60
|
-
@click="onPaymentOptionSelectionContinueClick"
|
|
61
59
|
>
|
|
62
|
-
<
|
|
63
|
-
|
|
64
|
-
:
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
60
|
+
<button
|
|
61
|
+
class="tw-w-full tw-py-4 tw-mt-4 tw-block tw-text-center tw-text-base tw-border-0"
|
|
62
|
+
:style="continueButtonStyle"
|
|
63
|
+
:disabled="!isPaymentOptionSelectionContinueEnabled"
|
|
64
|
+
:class="{
|
|
65
|
+
'hover:tw-cursor-pointer':
|
|
66
|
+
isPaymentOptionSelectionContinueEnabled,
|
|
67
|
+
}"
|
|
68
|
+
@click="onPaymentOptionSelectionContinueClick"
|
|
69
|
+
>
|
|
70
|
+
<TextWrapper
|
|
71
|
+
:text-style="viewModel.buttonTextStyle"
|
|
72
|
+
:text="commonTr(`continue`)"
|
|
73
|
+
class="tw-select-none"
|
|
74
|
+
/>
|
|
75
|
+
</button>
|
|
76
|
+
</ButtonStyleWrapper>
|
|
68
77
|
</div>
|
|
69
78
|
<!-- End payment option selection state -->
|
|
70
79
|
|
|
@@ -90,17 +99,25 @@
|
|
|
90
99
|
element="p"
|
|
91
100
|
class="tw-text-center"
|
|
92
101
|
/>
|
|
93
|
-
<
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
102
|
+
<ButtonStyleWrapper
|
|
103
|
+
:selected-button-style-id="
|
|
104
|
+
viewModel.buttonStyles.selectedButtonStyleId
|
|
105
|
+
"
|
|
106
|
+
:icon-color="viewModel.buttonStyles.style.backgroundColor"
|
|
107
|
+
:no-margin="true"
|
|
97
108
|
>
|
|
98
|
-
<
|
|
99
|
-
|
|
100
|
-
:
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
109
|
+
<button
|
|
110
|
+
class="tw-block tw-border-0 tw-mt-4 tw-py-2 tw-select-none tw-text-base tw-text-center tw-w-full hover:tw-cursor-pointer"
|
|
111
|
+
:style="continueButtonStyle"
|
|
112
|
+
@click="onDoneButtonClick"
|
|
113
|
+
>
|
|
114
|
+
<TextWrapper
|
|
115
|
+
:text-style="viewModel.buttonTextStyle"
|
|
116
|
+
:text="commonTr(`done`)"
|
|
117
|
+
class="tw-select-none"
|
|
118
|
+
/>
|
|
119
|
+
</button>
|
|
120
|
+
</ButtonStyleWrapper>
|
|
104
121
|
</div>
|
|
105
122
|
</div>
|
|
106
123
|
</section>
|
|
@@ -110,6 +127,7 @@ import { Icon, Loader } from '@designcrowd/fe-shared-lib';
|
|
|
110
127
|
import RequestPaymentStripe from './RequestPaymentStripe.vue';
|
|
111
128
|
import PaymentMixin from './Payment.mixin.ts';
|
|
112
129
|
import TextWrapper from '../text-wrapper/TextWrapper.vue';
|
|
130
|
+
import ButtonStyleWrapper from '../button/ButtonStyleWrapper.vue';
|
|
113
131
|
import { commonTr, paymentTr } from '@src/composables/useTranslate';
|
|
114
132
|
|
|
115
133
|
export default {
|
|
@@ -118,6 +136,7 @@ export default {
|
|
|
118
136
|
Loader,
|
|
119
137
|
RequestPaymentStripe,
|
|
120
138
|
TextWrapper,
|
|
139
|
+
ButtonStyleWrapper,
|
|
121
140
|
},
|
|
122
141
|
mixins: [PaymentMixin],
|
|
123
142
|
setup() {
|
|
@@ -96,25 +96,33 @@
|
|
|
96
96
|
<!-- End Error Message -->
|
|
97
97
|
|
|
98
98
|
<!-- Start Pay Button -->
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
:style="payButtonStyle"
|
|
106
|
-
:value="submitButtonMessage"
|
|
99
|
+
<!-- payButtonStyle inverts the palette (bg = text colour), so the
|
|
100
|
+
decoration colour is buttonStyles.style.color, not backgroundColor. -->
|
|
101
|
+
<ButtonStyleWrapper
|
|
102
|
+
:selected-button-style-id="props.buttonStyles.selectedButtonStyleId"
|
|
103
|
+
:icon-color="props.buttonStyles.style.color"
|
|
104
|
+
:no-margin="true"
|
|
107
105
|
:disabled="!isSubmitButtonEnabled"
|
|
108
|
-
@click="onSubmitPaymentClick"
|
|
109
106
|
>
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
107
|
+
<button
|
|
108
|
+
class="tw-block tw-border-0 tw-my-4 tw-py-2 tw-text-base tw-text-center tw-w-full"
|
|
109
|
+
:class="{
|
|
110
|
+
'hover:tw-cursor-pointer': isSubmitButtonEnabled,
|
|
111
|
+
}"
|
|
112
|
+
:style="payButtonStyle"
|
|
113
|
+
:value="submitButtonMessage"
|
|
114
|
+
:disabled="!isSubmitButtonEnabled"
|
|
115
|
+
@click="onSubmitPaymentClick"
|
|
116
|
+
>
|
|
117
|
+
{{
|
|
118
|
+
requestPaymentStripeTr('proceedToPayment', {
|
|
119
|
+
CURRENCY_SYMBOL: currencySymbol,
|
|
120
|
+
AMOUNT: amount,
|
|
121
|
+
CURRENCY_CODE: currencyCode,
|
|
122
|
+
})
|
|
123
|
+
}}
|
|
124
|
+
</button>
|
|
125
|
+
</ButtonStyleWrapper>
|
|
118
126
|
<!-- End Pay Button -->
|
|
119
127
|
|
|
120
128
|
<!-- Start T&C -->
|
|
@@ -146,6 +154,7 @@ import { Icon, TextInput, Loader } from '@designcrowd/fe-shared-lib';
|
|
|
146
154
|
import validator from 'validator';
|
|
147
155
|
import IconStripe from '../icon/IconStripe.vue';
|
|
148
156
|
import PaymentShippingAddress from '../shop/PaymentShippingAddress.vue';
|
|
157
|
+
import ButtonStyleWrapper from '../button/ButtonStyleWrapper.vue';
|
|
149
158
|
import { debug, debugError } from '../../../utils/debug.util';
|
|
150
159
|
import * as constants from '../../constants';
|
|
151
160
|
import {
|
|
@@ -507,9 +516,4 @@ onMounted(() => {
|
|
|
507
516
|
@apply tw-text-xs;
|
|
508
517
|
color: #f21b3f;
|
|
509
518
|
}
|
|
510
|
-
|
|
511
|
-
.pay-button-disabled {
|
|
512
|
-
opacity: 0.5 !important;
|
|
513
|
-
pointer-events: none;
|
|
514
|
-
}
|
|
515
519
|
</style>
|
|
@@ -55,14 +55,22 @@
|
|
|
55
55
|
<p v-else class="tw-text-center tw-text-base tw-my-4">
|
|
56
56
|
{{ shopTr(`noProducts`) }}
|
|
57
57
|
</p>
|
|
58
|
-
<
|
|
58
|
+
<ButtonStyleWrapper
|
|
59
59
|
v-if="viewModel.products.length >= 1"
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
60
|
+
:selected-button-style-id="
|
|
61
|
+
viewModel.buttonStyles.selectedButtonStyleId
|
|
62
|
+
"
|
|
63
|
+
:icon-color="viewModel.buttonStyles.style.backgroundColor"
|
|
64
|
+
:no-margin="true"
|
|
63
65
|
>
|
|
64
|
-
<
|
|
65
|
-
|
|
66
|
+
<button
|
|
67
|
+
class="tw-mt-4 tw-block tw-w-full tw-border-0 tw-py-3 tw-select-none tw-text-base hover:tw-cursor-pointer tw-rounded"
|
|
68
|
+
:style="buttonStyle"
|
|
69
|
+
@click="onShowCartModal"
|
|
70
|
+
>
|
|
71
|
+
<TextWrapper :text-style="buttonTextStyle" :text="viewCartText" />
|
|
72
|
+
</button>
|
|
73
|
+
</ButtonStyleWrapper>
|
|
66
74
|
</div>
|
|
67
75
|
</div>
|
|
68
76
|
<div
|
|
@@ -124,6 +132,7 @@ import ThumbnailDisplay from './ThumbnailDisplay.vue';
|
|
|
124
132
|
import FeaturedDisplay from './FeaturedDisplay.vue';
|
|
125
133
|
import ProductDetailModal from './ProductDetailModal.vue';
|
|
126
134
|
import CartModal from './CartModal.vue';
|
|
135
|
+
import ButtonStyleWrapper from '../button/ButtonStyleWrapper.vue';
|
|
127
136
|
import { computed, onMounted, reactive } from 'vue';
|
|
128
137
|
import {
|
|
129
138
|
PAYMENT_OPTION_DISPLAY_TYPES,
|
|
@@ -147,6 +147,7 @@ export interface RequestPaymentContent extends Content {
|
|
|
147
147
|
descriptionStyle?: TextStyleDeclaration;
|
|
148
148
|
itemTextStyle: TextStyleDeclaration;
|
|
149
149
|
buttonTextStyle?: TextStyleDeclaration;
|
|
150
|
+
backgroundStyle?: BrandPageCssStyle;
|
|
150
151
|
}
|
|
151
152
|
|
|
152
153
|
export interface ShopContentConfig extends PaymentConfig {
|
|
@@ -191,6 +192,7 @@ export interface SupportMeContent extends Content {
|
|
|
191
192
|
descriptionStyle: TextStyleDeclaration;
|
|
192
193
|
buttonTextStyle: TextStyleDeclaration;
|
|
193
194
|
itemTextStyle: TextStyleDeclaration;
|
|
195
|
+
backgroundStyle?: BrandPageCssStyle;
|
|
194
196
|
}
|
|
195
197
|
|
|
196
198
|
export interface CreateStripePaymentIntentResponse {
|
|
@@ -463,7 +463,7 @@ exports[`migration.util > Banner Contents - text Align and Font Family should no
|
|
|
463
463
|
},
|
|
464
464
|
},
|
|
465
465
|
"userPromptContentKey": undefined,
|
|
466
|
-
"v":
|
|
466
|
+
"v": 19,
|
|
467
467
|
},
|
|
468
468
|
"useOldLogoRenderSize": true,
|
|
469
469
|
}
|
|
@@ -916,7 +916,7 @@ exports[`migration.util > migrateBrandPageModel should return brand page model w
|
|
|
916
916
|
},
|
|
917
917
|
},
|
|
918
918
|
"userPromptContentKey": undefined,
|
|
919
|
-
"v":
|
|
919
|
+
"v": 19,
|
|
920
920
|
},
|
|
921
921
|
"useOldLogoRenderSize": true,
|
|
922
922
|
}
|
|
@@ -1376,7 +1376,7 @@ exports[`migration.util > migrateBrandPageModel should return brand page model w
|
|
|
1376
1376
|
},
|
|
1377
1377
|
},
|
|
1378
1378
|
"userPromptContentKey": undefined,
|
|
1379
|
-
"v":
|
|
1379
|
+
"v": 19,
|
|
1380
1380
|
},
|
|
1381
1381
|
"useOldLogoRenderSize": true,
|
|
1382
1382
|
}
|
|
@@ -37,3 +37,20 @@ export const getBoxShadowValue = (buttonStyles: ButtonStyles): string => {
|
|
|
37
37
|
|
|
38
38
|
return boxShadowValue;
|
|
39
39
|
};
|
|
40
|
+
|
|
41
|
+
// The "decorative" button styles — brushstroke / arrow / torn-paper — whose visual
|
|
42
|
+
// is drawn by ButtonStyleWrapper rather than plain CSS. Their banner-like SVG
|
|
43
|
+
// decoration needs the button to be reasonably wide to render legibly, so narrow
|
|
44
|
+
// (w-fit) hosts should widen when one of these is active (BP-5800).
|
|
45
|
+
export const BUTTON_STYLE_BRUSHSTROKE = 'BUTTON_STYLE_19';
|
|
46
|
+
export const BUTTON_STYLE_ARROW = 'BUTTON_STYLE_20';
|
|
47
|
+
export const BUTTON_STYLE_PAPER = 'BUTTON_STYLE_21';
|
|
48
|
+
|
|
49
|
+
export const DECORATIVE_BUTTON_STYLE_IDS = [
|
|
50
|
+
BUTTON_STYLE_BRUSHSTROKE,
|
|
51
|
+
BUTTON_STYLE_ARROW,
|
|
52
|
+
BUTTON_STYLE_PAPER,
|
|
53
|
+
];
|
|
54
|
+
|
|
55
|
+
export const isDecorativeButtonStyle = (styleId?: string): boolean =>
|
|
56
|
+
!!styleId && DECORATIVE_BUTTON_STYLE_IDS.includes(styleId);
|