@designcrowd/library.brand-page 6.2.4 → 6.2.5-ast-small-bugs

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.
Files changed (64) hide show
  1. package/lib/src/{CreatedOnBrandCrowd-de-de-ystrO2LW.js → CreatedOnBrandCrowd-de-de-5cKWmmtY.js} +1 -1
  2. package/lib/src/{CreatedOnBrandCrowd-en-us-BU7hNzTZ.js → CreatedOnBrandCrowd-en-us-D6fGJtEg.js} +1 -1
  3. package/lib/src/{CreatedOnBrandCrowd-es-es-CbuxneQ3.js → CreatedOnBrandCrowd-es-es-Bc2JqrrJ.js} +1 -1
  4. package/lib/src/{CreatedOnBrandCrowd-fr-fr-BuNUGOFr.js → CreatedOnBrandCrowd-fr-ca-B0ExS7n4.js} +1 -1
  5. package/lib/src/{CreatedOnBrandCrowd-fr-ca-BuNUGOFr.js → CreatedOnBrandCrowd-fr-fr-B0ExS7n4.js} +1 -1
  6. package/lib/src/{CreatedOnBrandCrowd-pt-pt-BehL88mc.js → CreatedOnBrandCrowd-pt-br-CDuCW3w1.js} +1 -1
  7. package/lib/src/{CreatedOnBrandCrowd-pt-br-BehL88mc.js → CreatedOnBrandCrowd-pt-pt-CDuCW3w1.js} +1 -1
  8. package/lib/src/{CreatedOnDcom-de-de-CMxjFZt9.js → CreatedOnDcom-de-de-Bo0kKST2.js} +1 -1
  9. package/lib/src/{CreatedOnDcom-en-us-2Cf6WBvx.js → CreatedOnDcom-en-us-C2rpQEkJ.js} +1 -1
  10. package/lib/src/{CreatedOnDcom-es-es-CATNnbTq.js → CreatedOnDcom-es-es-BrGM-1s3.js} +1 -1
  11. package/lib/src/{CreatedOnDcom-fr-ca-DQtMfB-a.js → CreatedOnDcom-fr-ca-N9Gg8bG1.js} +1 -1
  12. package/lib/src/{CreatedOnDcom-fr-fr-C1_FWOQf.js → CreatedOnDcom-fr-fr-BLNlstwD.js} +1 -1
  13. package/lib/src/{CreatedOnDcom-pt-br-C0QOCW0L.js → CreatedOnDcom-pt-br-LU9VoSSB.js} +1 -1
  14. package/lib/src/{CreatedOnDcom-pt-pt-lHD-p6o4.js → CreatedOnDcom-pt-pt-DyST0W9W.js} +1 -1
  15. package/lib/src/bundled-translations-BNA5h0Dx.js +179 -0
  16. package/lib/src/bundled-translations.de-DE-fyTHrRxT.js +179 -0
  17. package/lib/src/bundled-translations.es-ES-BMmvJGGC.js +179 -0
  18. package/lib/src/bundled-translations.fr-CA-Bo69L_BP.js +179 -0
  19. package/lib/src/bundled-translations.fr-FR-C4yTVFOW.js +179 -0
  20. package/lib/src/bundled-translations.pt-BR-CPMPfny0.js +179 -0
  21. package/lib/src/bundled-translations.pt-PT-C6ZwYs37.js +179 -0
  22. package/lib/src/bundles/bundled-translations.de-DE.json +5 -1
  23. package/lib/src/bundles/bundled-translations.es-ES.json +5 -1
  24. package/lib/src/bundles/bundled-translations.fr-CA.json +5 -1
  25. package/lib/src/bundles/bundled-translations.fr-FR.json +5 -1
  26. package/lib/src/bundles/bundled-translations.json +5 -1
  27. package/lib/src/bundles/bundled-translations.pt-BR.json +5 -1
  28. package/lib/src/bundles/bundled-translations.pt-PT.json +5 -1
  29. package/lib/src/css/library.brand-page-brandCrowd.min.css +226 -221
  30. package/lib/src/css/library.brand-page-brandPage.min.css +226 -221
  31. package/lib/src/css/library.brand-page-designCom.min.css +226 -221
  32. package/lib/src/css/library.brand-page-preview.min.css +226 -221
  33. package/lib/src/index.mjs +1 -1
  34. package/lib/src/{lib-CqHUUPUW.js → lib-DK6vz-E_.js} +1170 -1165
  35. package/package.json +1 -1
  36. package/src/brand-page/components/button/ButtonStyleWrapper.vue +4 -2
  37. package/src/brand-page/components/page-header/HeaderLayout.vue +3 -3
  38. package/src/brand-page/components/payment/RequestPaymentStripe.vue +15 -6
  39. package/src/brand-page/components/payment/RequestPaymentStripe.vue.test.ts +644 -0
  40. package/src/brand-page/components/payment/i18n/request-payment-stripe.de-DE.json +5 -1
  41. package/src/brand-page/components/payment/i18n/request-payment-stripe.es-ES.json +5 -1
  42. package/src/brand-page/components/payment/i18n/request-payment-stripe.fr-CA.json +5 -1
  43. package/src/brand-page/components/payment/i18n/request-payment-stripe.fr-FR.json +5 -1
  44. package/src/brand-page/components/payment/i18n/request-payment-stripe.json +5 -1
  45. package/src/brand-page/components/payment/i18n/request-payment-stripe.pt-BR.json +5 -1
  46. package/src/brand-page/components/payment/i18n/request-payment-stripe.pt-PT.json +5 -1
  47. package/src/brand-page-maker/components/rich-text-editor/RichTextEditor.vue +2 -1
  48. package/src/bundles/bundled-translations.de-DE.json +5 -1
  49. package/src/bundles/bundled-translations.es-ES.json +5 -1
  50. package/src/bundles/bundled-translations.fr-CA.json +5 -1
  51. package/src/bundles/bundled-translations.fr-FR.json +5 -1
  52. package/src/bundles/bundled-translations.json +5 -1
  53. package/src/bundles/bundled-translations.pt-BR.json +5 -1
  54. package/src/bundles/bundled-translations.pt-PT.json +5 -1
  55. package/lib/src/bundled-translations-BYUfWBT3.js +0 -179
  56. package/lib/src/bundled-translations.de-DE-MmzUu1tt.js +0 -179
  57. package/lib/src/bundled-translations.es-ES-D-tG33XL.js +0 -179
  58. package/lib/src/bundled-translations.fr-CA-CNc1H1h3.js +0 -179
  59. package/lib/src/bundled-translations.fr-FR-DX0-yepT.js +0 -179
  60. package/lib/src/bundled-translations.pt-BR-ih1-LRgy.js +0 -179
  61. package/lib/src/bundled-translations.pt-PT-Dq2CmD1p.js +0 -179
  62. package/lib/src/metadata-builder/builders/reorder-pages-builder.d.ts +0 -13
  63. package/lib/src/metadata-builder/builders/reorder-pages-builder.js +0 -49
  64. package/src/metadata-builder/builders/reorder-pages-builder.ts +0 -80
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@designcrowd/library.brand-page",
3
3
  "description": "A collection of Maker/Designer applications",
4
- "version": "6.2.4",
4
+ "version": "6.2.5-ast-small-bugs",
5
5
  "author": "Design.com Eng",
6
6
  "license": "UNLICENSED",
7
7
  "type": "module",
@@ -160,9 +160,11 @@ const brushRightStyle = computed(() => ({
160
160
  pointer-events: none;
161
161
  }
162
162
  .bp-button-shape :deep(button),
163
- .bp-button-shape :deep(a) {
163
+ .bp-button-shape :deep(a),
164
+ .bp-button-shape :deep(.c-button) {
164
165
  position: relative; /* sit above the inert background */
165
- /* !important to override the host button's inline background-color. */
166
+ /* !important to override the host button's inline background-color. A page link nests
167
+ the styled .c-button div inside its <a>, so that needs clearing too. */
166
168
  background-color: transparent !important;
167
169
  }
168
170
  /* button-paper ships hardcoded fill="black"; recolour to the button's fill. CSS
@@ -213,7 +213,7 @@ const showCtaMirror = computed((): boolean => {
213
213
  }
214
214
 
215
215
  .mobile-tab-vertical-stack-centered-logo-centered-menu.no-nav {
216
- @apply tw-flex;
216
+ @apply tw-flex tw-justify-center;
217
217
  }
218
218
 
219
219
  /* DESKTOP_TAB_6 */
@@ -256,7 +256,7 @@ const showCtaMirror = computed((): boolean => {
256
256
  @apply tw-w-full;
257
257
  }
258
258
  .mobile-tab-vertical-stack-centered-menu-centered-logo.no-nav {
259
- @apply tw-flex;
259
+ @apply tw-flex tw-justify-center;
260
260
  }
261
261
 
262
262
  /* DESKTOP_TAB_NO_LOGO_1, DESKTOP_HAMBURGER_NO_LOGO_1 */
@@ -585,7 +585,7 @@ const showCtaMirror = computed((): boolean => {
585
585
  /* MOBILE_TAB_1/2 with the nav hidden: the stack is a plain flex row, so the button wraps below it. */
586
586
  .mobile-tab-vertical-stack-centered-logo-centered-menu.no-nav.has-header-cta,
587
587
  .mobile-tab-vertical-stack-centered-menu-centered-logo.no-nav.has-header-cta {
588
- @apply tw-flex-wrap tw-justify-center;
588
+ @apply tw-flex-wrap;
589
589
  }
590
590
 
591
591
  /* MOBILE_TAB_NO_LOGO_1 (nav shown or not — its flex-centre stack wraps the button either way)
@@ -164,6 +164,7 @@ import {
164
164
  type ButtonStyles,
165
165
  type CheckoutInformation,
166
166
  type CreateCartResult,
167
+ type CreateStripePaymentIntentResponse,
167
168
  type StripePaymentIntent,
168
169
  type StripeShippingDetails,
169
170
  } from '../../models';
@@ -363,7 +364,7 @@ const initStripeElements = (): void => {
363
364
 
364
365
  cardNumberElement.value = stripeElements.create('cardNumber', {
365
366
  style: constants.stripeDefaultStyle,
366
- placeholder: 'Credit Card Number',
367
+ placeholder: requestPaymentStripeTr('cardNumberPlaceholder'),
367
368
  });
368
369
  if (cardNumberRef.value) {
369
370
  cardNumberElement.value.mount(cardNumberRef.value);
@@ -372,7 +373,7 @@ const initStripeElements = (): void => {
372
373
 
373
374
  cardExpiryElement.value = stripeElements.create('cardExpiry', {
374
375
  style: constants.stripeDefaultStyle,
375
- placeholder: 'Expiry',
376
+ placeholder: requestPaymentStripeTr('cardExpiryPlaceholder'),
376
377
  });
377
378
  if (cardExpiryRef.value) {
378
379
  cardExpiryElement.value.mount(cardExpiryRef.value);
@@ -381,7 +382,7 @@ const initStripeElements = (): void => {
381
382
 
382
383
  cardCvcElement.value = stripeElements.create('cardCvc', {
383
384
  style: constants.stripeDefaultStyle,
384
- placeholder: 'CVV',
385
+ placeholder: requestPaymentStripeTr('cardCvcPlaceholder'),
385
386
  });
386
387
  if (cardCvcRef.value) {
387
388
  cardCvcElement.value.mount(cardCvcRef.value);
@@ -441,10 +442,15 @@ const onSubmitPaymentClick = async (): Promise<void> => {
441
442
  }
442
443
 
443
444
  isBusy.value = true;
445
+ submitError.value = undefined;
444
446
 
445
447
  try {
446
- const paymentIntentResponse =
447
- await brandPageClient.createStripePaymentIntent({
448
+ let paymentIntentResponse: CreateStripePaymentIntentResponse | null = null;
449
+
450
+ // Only the intent request is caught: nothing is charged before it, so
451
+ // "try again" is safe here but not after confirmCardPayment.
452
+ try {
453
+ paymentIntentResponse = await brandPageClient.createStripePaymentIntent({
448
454
  cartId: props.cart.cartId,
449
455
  customerEmail: emailAddress.value,
450
456
  customerRequestDetails:
@@ -455,10 +461,13 @@ const onSubmitPaymentClick = async (): Promise<void> => {
455
461
  ? shippingDetails.value
456
462
  : undefined,
457
463
  });
464
+ } catch (err) {
465
+ console.error(err);
466
+ }
458
467
 
459
468
  if (!paymentIntentResponse) {
460
469
  submitError.value = new Error(
461
- 'Unable to create payment intent. Please try again.',
470
+ requestPaymentStripeTr('paymentIntentErrorMessage'),
462
471
  );
463
472
 
464
473
  return;