@designcrowd/library.brand-page 6.0.18 → 6.0.19-ast-btns-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/lib/src/{CreatedOnBrandCrowd-de-de-CIrk6Brm.js → CreatedOnBrandCrowd-de-de-BI4rJV_V.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-en-us-CvXk0moH.js → CreatedOnBrandCrowd-en-us-Crf-sBeO.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-es-es-BhtZbjjU.js → CreatedOnBrandCrowd-es-es-DE_kK1yb.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-fr-fr-B6TD57O-.js → CreatedOnBrandCrowd-fr-ca-BXhEu1vY.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-fr-ca-B6TD57O-.js → CreatedOnBrandCrowd-fr-fr-BXhEu1vY.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-pt-pt-Bto0xOtS.js → CreatedOnBrandCrowd-pt-br-DG1azcKI.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-pt-br-Bto0xOtS.js → CreatedOnBrandCrowd-pt-pt-DG1azcKI.js} +1 -1
- package/lib/src/{CreatedOnDcom-de-de-2h2W3y5z.js → CreatedOnDcom-de-de-BFL99-ya.js} +1 -1
- package/lib/src/{CreatedOnDcom-en-us-D6Jgk6yv.js → CreatedOnDcom-en-us-DqWMpFgs.js} +1 -1
- package/lib/src/{CreatedOnDcom-es-es-sBCqYQIm.js → CreatedOnDcom-es-es-Ds0zIzXx.js} +1 -1
- package/lib/src/{CreatedOnDcom-fr-ca-C8hg5hTU.js → CreatedOnDcom-fr-ca-X-GSmpwv.js} +1 -1
- package/lib/src/{CreatedOnDcom-fr-fr-_DP1Umyh.js → CreatedOnDcom-fr-fr-Cm1eyNiD.js} +1 -1
- package/lib/src/{CreatedOnDcom-pt-br-BdwYAy5p.js → CreatedOnDcom-pt-br-BUOePaaJ.js} +1 -1
- package/lib/src/{CreatedOnDcom-pt-pt-Bm1NHVaH.js → CreatedOnDcom-pt-pt-CJSZsybQ.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 +10 -0
- 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 +7 -0
- 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 +48 -0
- package/lib/src/brand-page/utils/migration.util.js +9 -0
- package/lib/src/brand-page/utils/view-model.util.js +1 -0
- package/lib/src/brand-page-maker/constants/config-settings-constant.js +41 -1
- package/lib/src/brand-page-maker/default-getters/contact-form-background-color.default-getter.d.ts +8 -0
- package/lib/src/brand-page-maker/default-getters/contact-form-background-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 +1 -1
- package/lib/src/brand-page-maker/models/content-settings.js +3 -0
- 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-CPTMajMv.js → lib-CfENvLvt.js} +18121 -17791
- package/lib/src/metadata-builder/builders/section-rules/banner-section.rules.js +6 -0
- package/lib/src/metadata-builder/parsers/section-tool-arguments.d.ts +1 -1
- package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItemField.mixin.js +5 -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 +11 -0
- package/src/brand-page/components/contact-form/ContactForm.mixin.ts +10 -0
- package/src/brand-page/components/contact-form/ContactForm.vue +94 -39
- 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 +120 -0
- package/src/brand-page/utils/migration/migration-19.ts +67 -0
- package/src/brand-page/utils/migration.util.ts +10 -0
- package/src/brand-page/utils/view-model.util.ts +1 -0
- package/src/brand-page-maker/constants/config-settings-constant.ts +44 -0
- package/src/brand-page-maker/default-getters/contact-form-background-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 +1 -1
- package/src/brand-page-maker/models/content-settings.ts +3 -0
- package/src/metadata-builder/builders/section-rules/banner-section.rules.ts +6 -0
- package/src/metadata-builder/parsers/section-tool-arguments.ts +7 -1
- package/src/metadata-builder/sanitizers/__tests__/section-args-validator.test.ts +13 -0
- package/src/shared/content-settings/components/content-settings-item/ContentSettingsItemField.mixin.ts +6 -0
- package/src/shared/style-settings/components/StyleSettings.vue +1 -0
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
:title="title"
|
|
31
31
|
:title-style="viewModel.titleStyle"
|
|
32
32
|
:button-styles="viewModel.buttonStyles.style"
|
|
33
|
+
:background-style="viewModel.backgroundStyle"
|
|
33
34
|
:can-collapse="canCollapse"
|
|
34
35
|
:context="context"
|
|
35
36
|
:class="{ 'contact-container': context.isBrandSite }"
|
|
@@ -80,17 +81,25 @@
|
|
|
80
81
|
{{ value.error }}
|
|
81
82
|
</p>
|
|
82
83
|
</div>
|
|
83
|
-
<
|
|
84
|
+
<ButtonStyleWrapper
|
|
84
85
|
v-if="isSubmitButtonVisible"
|
|
85
|
-
|
|
86
|
-
|
|
86
|
+
:selected-button-style-id="
|
|
87
|
+
viewModel.buttonStyles.selectedButtonStyleId
|
|
88
|
+
"
|
|
89
|
+
:icon-color="viewModel.buttonStyles.style.backgroundColor"
|
|
90
|
+
:no-margin="true"
|
|
87
91
|
>
|
|
88
|
-
<
|
|
89
|
-
|
|
90
|
-
:
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
92
|
+
<button
|
|
93
|
+
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"
|
|
94
|
+
:style="submitButtonStyle"
|
|
95
|
+
>
|
|
96
|
+
<TextWrapper
|
|
97
|
+
:text-style="submitButtonTextStyle"
|
|
98
|
+
:text="viewModel.buttonText"
|
|
99
|
+
class="tw-text-center tw-text-base"
|
|
100
|
+
/>
|
|
101
|
+
</button>
|
|
102
|
+
</ButtonStyleWrapper>
|
|
94
103
|
</div>
|
|
95
104
|
<div v-else class="tw-w-full tw-flex tw-justify-center">
|
|
96
105
|
<Loader />
|
|
@@ -184,18 +193,30 @@
|
|
|
184
193
|
</p>
|
|
185
194
|
</div>
|
|
186
195
|
<div class="tw-flex tw-w-full tw-justify-center tw-col-span-2">
|
|
187
|
-
<
|
|
196
|
+
<ButtonStyleWrapper
|
|
188
197
|
v-if="isSubmitButtonVisible"
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
198
|
+
:selected-button-style-id="
|
|
199
|
+
viewModel.buttonStyles.selectedButtonStyleId
|
|
200
|
+
"
|
|
201
|
+
:icon-color="viewModel.buttonStyles.style.backgroundColor"
|
|
202
|
+
:full-width="!!isMobileDevice"
|
|
203
|
+
:no-margin="true"
|
|
192
204
|
>
|
|
193
|
-
<
|
|
194
|
-
|
|
195
|
-
:
|
|
196
|
-
class="
|
|
197
|
-
|
|
198
|
-
|
|
205
|
+
<button
|
|
206
|
+
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"
|
|
207
|
+
:style="submitButtonStyle"
|
|
208
|
+
:class="{
|
|
209
|
+
'tw-w-full': isMobileDevice,
|
|
210
|
+
'tw-min-w-[120px]': isDecorativeSubmitStyle,
|
|
211
|
+
}"
|
|
212
|
+
>
|
|
213
|
+
<TextWrapper
|
|
214
|
+
:text-style="submitButtonTextStyle"
|
|
215
|
+
:text="viewModel.buttonText"
|
|
216
|
+
class="tw-text-center tw-text-base"
|
|
217
|
+
/>
|
|
218
|
+
</button>
|
|
219
|
+
</ButtonStyleWrapper>
|
|
199
220
|
</div>
|
|
200
221
|
</div>
|
|
201
222
|
<div v-else class="tw-w-full tw-flex tw-justify-center">
|
|
@@ -296,18 +317,30 @@
|
|
|
296
317
|
</p>
|
|
297
318
|
</div>
|
|
298
319
|
<div class="tw-flex tw-w-full tw-justify-start tw-col-span-2">
|
|
299
|
-
<
|
|
320
|
+
<ButtonStyleWrapper
|
|
300
321
|
v-if="isSubmitButtonVisible"
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
322
|
+
:selected-button-style-id="
|
|
323
|
+
viewModel.buttonStyles.selectedButtonStyleId
|
|
324
|
+
"
|
|
325
|
+
:icon-color="viewModel.buttonStyles.style.backgroundColor"
|
|
326
|
+
:full-width="!!isMobileDevice"
|
|
327
|
+
:no-margin="true"
|
|
304
328
|
>
|
|
305
|
-
<
|
|
306
|
-
|
|
307
|
-
:
|
|
308
|
-
class="
|
|
309
|
-
|
|
310
|
-
|
|
329
|
+
<button
|
|
330
|
+
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"
|
|
331
|
+
:style="submitButtonStyle"
|
|
332
|
+
:class="{
|
|
333
|
+
'tw-w-full': isMobileDevice,
|
|
334
|
+
'tw-min-w-[120px]': isDecorativeSubmitStyle,
|
|
335
|
+
}"
|
|
336
|
+
>
|
|
337
|
+
<TextWrapper
|
|
338
|
+
:text-style="submitButtonTextStyle"
|
|
339
|
+
:text="viewModel.buttonText"
|
|
340
|
+
class="tw-text-center tw-text-base"
|
|
341
|
+
/>
|
|
342
|
+
</button>
|
|
343
|
+
</ButtonStyleWrapper>
|
|
311
344
|
</div>
|
|
312
345
|
</div>
|
|
313
346
|
<p v-if="hasSubmitError" class="tw-text-center tw-mt-2 form-error">
|
|
@@ -426,18 +459,32 @@
|
|
|
426
459
|
<div
|
|
427
460
|
class="tw-flex tw-w-full tw-justify-start tw-col-span-2"
|
|
428
461
|
>
|
|
429
|
-
<
|
|
462
|
+
<ButtonStyleWrapper
|
|
430
463
|
v-if="isSubmitButtonVisible"
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
464
|
+
:selected-button-style-id="
|
|
465
|
+
viewModel.buttonStyles.selectedButtonStyleId
|
|
466
|
+
"
|
|
467
|
+
:icon-color="
|
|
468
|
+
viewModel.buttonStyles.style.backgroundColor
|
|
469
|
+
"
|
|
470
|
+
:full-width="!!isMobileDevice"
|
|
471
|
+
:no-margin="true"
|
|
434
472
|
>
|
|
435
|
-
<
|
|
436
|
-
|
|
437
|
-
:
|
|
438
|
-
class="
|
|
439
|
-
|
|
440
|
-
|
|
473
|
+
<button
|
|
474
|
+
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"
|
|
475
|
+
:style="submitButtonStyle"
|
|
476
|
+
:class="{
|
|
477
|
+
'tw-w-full': isMobileDevice,
|
|
478
|
+
'tw-min-w-[120px]': isDecorativeSubmitStyle,
|
|
479
|
+
}"
|
|
480
|
+
>
|
|
481
|
+
<TextWrapper
|
|
482
|
+
:text-style="submitButtonTextStyle"
|
|
483
|
+
:text="viewModel.buttonText"
|
|
484
|
+
class="tw-text-center tw-text-base"
|
|
485
|
+
/>
|
|
486
|
+
</button>
|
|
487
|
+
</ButtonStyleWrapper>
|
|
441
488
|
</div>
|
|
442
489
|
</div>
|
|
443
490
|
<div v-else class="tw-w-full tw-flex tw-justify-center">
|
|
@@ -476,6 +523,7 @@ import Collapsible from '../collapsible/Collapsible.vue';
|
|
|
476
523
|
import MailingListMixin from './ContactForm.mixin.ts';
|
|
477
524
|
import Media from '../media/Media.vue';
|
|
478
525
|
import TextWrapper from '../text-wrapper/TextWrapper.vue';
|
|
526
|
+
import ButtonStyleWrapper from '../button/ButtonStyleWrapper.vue';
|
|
479
527
|
import RecaptchaDisclosure from '../recaptcha-disclosure/RecaptchaDisclosure.vue';
|
|
480
528
|
|
|
481
529
|
export default {
|
|
@@ -486,6 +534,7 @@ export default {
|
|
|
486
534
|
Loader,
|
|
487
535
|
Media,
|
|
488
536
|
TextWrapper,
|
|
537
|
+
ButtonStyleWrapper,
|
|
489
538
|
RecaptchaDisclosure,
|
|
490
539
|
},
|
|
491
540
|
mixins: [MailingListMixin],
|
|
@@ -520,6 +569,12 @@ export default {
|
|
|
520
569
|
.c-button-full {
|
|
521
570
|
@apply tw-w-full;
|
|
522
571
|
}
|
|
572
|
+
/* Match the button's full-width on published mobile. The maker uses the
|
|
573
|
+
isMobileDevice prop for this; the renderer has no such state, so the
|
|
574
|
+
decorative-button wrapper is widened here via the real viewport instead. */
|
|
575
|
+
:deep(.bp-style-wrapper) {
|
|
576
|
+
@apply tw-w-full;
|
|
577
|
+
}
|
|
523
578
|
.c-col-span-2 {
|
|
524
579
|
@apply tw-col-span-2;
|
|
525
580
|
}
|
|
@@ -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);
|