@designcrowd/library.brand-page 6.2.2 → 6.2.3-ast-faq

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 (147) hide show
  1. package/lib/src/{CreatedOnBrandCrowd-de-de-7P2gNr-R.js → CreatedOnBrandCrowd-de-de-BRisMzFY.js} +1 -1
  2. package/lib/src/{CreatedOnBrandCrowd-en-us-Dl7BymW6.js → CreatedOnBrandCrowd-en-us-CDDsL9GX.js} +1 -1
  3. package/lib/src/{CreatedOnBrandCrowd-es-es-CO4FvWVw.js → CreatedOnBrandCrowd-es-es-BkZrEo4j.js} +1 -1
  4. package/lib/src/{CreatedOnBrandCrowd-fr-fr-DHNqakQu.js → CreatedOnBrandCrowd-fr-ca-sx_ury7R.js} +1 -1
  5. package/lib/src/{CreatedOnBrandCrowd-fr-ca-DHNqakQu.js → CreatedOnBrandCrowd-fr-fr-sx_ury7R.js} +1 -1
  6. package/lib/src/{CreatedOnBrandCrowd-pt-pt-CGUC-ZbP.js → CreatedOnBrandCrowd-pt-br-DCWiAfkU.js} +1 -1
  7. package/lib/src/{CreatedOnBrandCrowd-pt-br-CGUC-ZbP.js → CreatedOnBrandCrowd-pt-pt-DCWiAfkU.js} +1 -1
  8. package/lib/src/{CreatedOnDcom-de-de-Dvds-Vmy.js → CreatedOnDcom-de-de-C1S7f22L.js} +1 -1
  9. package/lib/src/{CreatedOnDcom-en-us-fd3C-8Tp.js → CreatedOnDcom-en-us-DgTlWaXE.js} +1 -1
  10. package/lib/src/{CreatedOnDcom-es-es-DTXZW35-.js → CreatedOnDcom-es-es-CxSQJe_V.js} +1 -1
  11. package/lib/src/{CreatedOnDcom-fr-ca-DRCYOKPs.js → CreatedOnDcom-fr-ca-Bbam2tt6.js} +1 -1
  12. package/lib/src/{CreatedOnDcom-fr-fr-DpIB8x2x.js → CreatedOnDcom-fr-fr-Cb0XDRPL.js} +1 -1
  13. package/lib/src/{CreatedOnDcom-pt-br-Esnxy8wX.js → CreatedOnDcom-pt-br-BjdX3-E3.js} +1 -1
  14. package/lib/src/{CreatedOnDcom-pt-pt-CaiVHFXR.js → CreatedOnDcom-pt-pt-BXpbfopB.js} +1 -1
  15. package/lib/src/brand-page/constants/misc.constants.d.ts +8 -0
  16. package/lib/src/brand-page/constants/misc.constants.js +7 -0
  17. package/lib/src/brand-page/constants/styles.constants.d.ts +2 -0
  18. package/lib/src/brand-page/constants/styles.constants.js +2 -0
  19. package/lib/src/brand-page/models/brand-page-context.model.d.ts +0 -2
  20. package/lib/src/brand-page/models/brand-page-context.model.js +0 -12
  21. package/lib/src/brand-page/models/content.model.d.ts +1 -0
  22. package/lib/src/brand-page/models/content.model.js +1 -0
  23. package/lib/src/brand-page/models/index.d.ts +19 -0
  24. package/lib/src/brand-page/utils/content-callback-util.d.ts +2 -1
  25. package/lib/src/brand-page/utils/content-callback-util.js +3 -0
  26. package/lib/src/brand-page/utils/model.util.d.ts +2 -1
  27. package/lib/src/brand-page/utils/model.util.js +3 -0
  28. package/lib/src/brand-page/utils/view-model.util.d.ts +2 -0
  29. package/lib/src/brand-page/utils/view-model.util.js +24 -0
  30. package/lib/src/brand-page/view-models.d.ts +9 -2
  31. package/lib/src/brand-page-maker/components/action-bar/ActionBar.mixin.d.ts +0 -1
  32. package/lib/src/brand-page-maker/components/action-bar/ActionBar.mixin.js +0 -9
  33. package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.d.ts +10 -42
  34. package/lib/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.d.ts +10 -42
  35. package/lib/src/brand-page-maker/components/preview/Preview.mixin.d.ts +0 -14
  36. package/lib/src/brand-page-maker/components/quick-link-bar/QuickLinkBar.mixin.d.ts +0 -42
  37. package/lib/src/brand-page-maker/components/seo-settings/SeoPageSettings.mixin.d.ts +0 -42
  38. package/lib/src/brand-page-maker/components/seo-settings/UrlSettings.mixin.d.ts +0 -42
  39. package/lib/src/brand-page-maker/components/seo-settings/UseExistingDomainModal.mixin.d.ts +0 -42
  40. package/lib/src/brand-page-maker/components/template-preview/TemplatePreview.mixin.d.ts +0 -42
  41. package/lib/src/brand-page-maker/components/upgrade-to-premium-button/UpgradeToPremiumButton.mixin.d.ts +0 -42
  42. package/lib/src/brand-page-maker/composables/rich-text-editor/useRichTextEditor.d.ts +13 -0
  43. package/lib/src/brand-page-maker/composables/rich-text-editor/useRichTextEditor.js +64 -30
  44. package/lib/src/brand-page-maker/constants/config-settings-constant.d.ts +2 -1
  45. package/lib/src/brand-page-maker/constants/config-settings-constant.js +101 -2
  46. package/lib/src/brand-page-maker/convertors/faq-display-style.convertor.d.ts +3 -0
  47. package/lib/src/brand-page-maker/convertors/faq-display-style.convertor.js +47 -0
  48. package/lib/src/brand-page-maker/models/content-settings-configs.d.ts +22 -1
  49. package/lib/src/brand-page-maker/models/content-settings-configs.js +1 -0
  50. package/lib/src/brand-page-maker/models/content-settings.d.ts +4 -1
  51. package/lib/src/brand-page-maker/models/content-settings.js +45 -1
  52. package/lib/src/brand-page-maker/stores/brandpage-container/brand-page-container-store.d.ts +0 -42
  53. package/lib/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.js +1 -0
  54. package/lib/src/brand-page-maker/utils/apply-color-strategy.js +47 -17
  55. package/lib/src/brand-page-maker/utils/rich-text-editor.util.d.ts +6 -0
  56. package/lib/src/brand-page-maker/utils/rich-text-editor.util.js +24 -1
  57. package/lib/src/brand-page-maker/validators/field.validator.js +2 -0
  58. package/lib/src/bundled-translations-DY9YvuL-.js +179 -0
  59. package/lib/src/bundles/bundled-translations.json +20 -2
  60. package/lib/src/composables/useTranslate.d.ts +1 -1
  61. package/lib/src/composables/useTranslate.js +1 -1
  62. package/lib/src/css/library.brand-page-brandCrowd.min.css +143 -36
  63. package/lib/src/css/library.brand-page-brandPage.min.css +143 -36
  64. package/lib/src/css/library.brand-page-designCom.min.css +143 -36
  65. package/lib/src/css/library.brand-page-preview.min.css +143 -36
  66. package/lib/src/index.mjs +159 -158
  67. package/lib/src/{lib-V7aqfuiB.js → lib-DwpSAbLZ.js} +26889 -26178
  68. package/lib/src/metadata-builder/parsers/section-tool-arguments.d.ts +1 -1
  69. package/lib/src/shared/color-strategies/color-strategies.js +4 -0
  70. package/lib/src/shared/color-strategies/rte-field-pairs.d.ts +12 -0
  71. package/lib/src/shared/color-strategies/rte-field-pairs.js +10 -0
  72. package/lib/src/shared/content-settings/components/content-settings/ContentSettings.mixin.d.ts +10 -0
  73. package/lib/src/shared/content-settings/components/content-settings/ReplaceImageSettingsForContent.mixin.d.ts +11 -1
  74. package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItem.mixin.d.ts +10 -0
  75. package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItemField.mixin.d.ts +10 -0
  76. package/lib/src/shared/content-settings/components/focused-content-item-settings/FocusedContentItemSettings.mixin.d.ts +10 -0
  77. package/lib/src/shared/content-settings/components/items-field/ItemsField.mixin.d.ts +14 -1
  78. package/lib/src/shared/content-settings/components/items-field/ItemsField.mixin.js +11 -1
  79. package/lib/src/shared/content-settings/components/payment-config-field/PaymentConfigField.mixin.d.ts +0 -42
  80. package/lib/src/shared/content-settings/components/textarea-field/TextareaField.mixin.d.ts +12 -0
  81. package/lib/src/shared/content-settings/components/textarea-field/TextareaField.mixin.js +5 -0
  82. package/lib/src/shared/content-settings/models.d.ts +6 -0
  83. package/lib/src/shared/content-settings/store/content-settings-store.d.ts +14 -1
  84. package/lib/src/shared/content-settings/store/content-settings-store.js +24 -2
  85. package/lib/src/shared/logo-settings/components/LogoSettings.mixin.d.ts +0 -42
  86. package/lib/src/shared/page-settings/components/page-settings/PageSettings.mixin.d.ts +10 -42
  87. package/lib/src/shared/page-settings/components/page-settings-section-styles/PageSettingsSectionStyles.mixin.d.ts +10 -42
  88. package/lib/src/shared/publish-brand-page-with-state/PublishBrandPageModalWithState.mixin.d.ts +0 -56
  89. package/lib/src/shared/side-bar/components/SideBar.mixin.d.ts +0 -42
  90. package/lib/src/shared/style-settings/components/StyleSettings.mixin.d.ts +0 -42
  91. package/package.json +2 -2
  92. package/src/brand-page/components/faq-section/FaqSection.test.ts +292 -0
  93. package/src/brand-page/components/faq-section/FaqSection.vue +299 -0
  94. package/src/brand-page/components/page/PageComponent.vue +2 -0
  95. package/src/brand-page/components/section-heading/SectionHeading.vue +52 -0
  96. package/src/brand-page/components/text-wrapper/TextWrapper.test.ts +33 -0
  97. package/src/brand-page/constants/misc.constants.ts +12 -0
  98. package/src/brand-page/constants/styles.constants.ts +2 -0
  99. package/src/brand-page/models/brand-page-context.model.ts +0 -23
  100. package/src/brand-page/models/content.model.ts +1 -0
  101. package/src/brand-page/models/index.ts +21 -0
  102. package/src/brand-page/utils/content-callback-util.ts +5 -0
  103. package/src/brand-page/utils/model.util.ts +7 -0
  104. package/src/brand-page/utils/view-model.util.test.ts +96 -0
  105. package/src/brand-page/utils/view-model.util.ts +49 -0
  106. package/src/brand-page/view-models.ts +12 -1
  107. package/src/brand-page-maker/components/action-bar/ActionBar.mixin.ts +0 -10
  108. package/src/brand-page-maker/components/action-bar/ActionBarNavigation.test.ts +8 -49
  109. package/src/brand-page-maker/components/action-bar/ActionBarNavigation.vue +1 -1
  110. package/src/brand-page-maker/components/rich-text-editor/RichTextEditor.test.ts +165 -0
  111. package/src/brand-page-maker/components/rich-text-editor/RichTextEditor.vue +37 -49
  112. package/src/brand-page-maker/composables/rich-text-editor/useRichTextEditor.ts +87 -30
  113. package/src/brand-page-maker/constants/config-settings-constant.ts +108 -0
  114. package/src/brand-page-maker/constants/faq-section-config.test.ts +151 -0
  115. package/src/brand-page-maker/convertors/faq-display-style.convertor.ts +59 -0
  116. package/src/brand-page-maker/convertors/i18n/converter.json +4 -1
  117. package/src/brand-page-maker/models/content-settings-configs.ts +24 -0
  118. package/src/brand-page-maker/models/content-settings.ts +57 -0
  119. package/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.ts +2 -0
  120. package/src/brand-page-maker/utils/__snapshots__/apply-color-strategy.golden.test.ts.snap +4063 -895
  121. package/src/brand-page-maker/utils/apply-color-strategy.test.ts +104 -2
  122. package/src/brand-page-maker/utils/apply-color-strategy.ts +77 -19
  123. package/src/brand-page-maker/utils/rich-text-editor.util.test.ts +110 -0
  124. package/src/brand-page-maker/utils/rich-text-editor.util.ts +66 -0
  125. package/src/brand-page-maker/validators/field.validator.ts +2 -0
  126. package/src/bundles/bundled-translations.json +20 -2
  127. package/src/composables/useTranslate.ts +2 -1
  128. package/src/metadata-builder/builders/item-id-utils.test.ts +24 -0
  129. package/src/metadata-builder/parsers/section-tool-arguments.ts +2 -1
  130. package/src/metadata-builder/parsers/section-tool-map.test.ts +12 -0
  131. package/src/shared/color-strategies/color-strategies.ts +4 -0
  132. package/src/shared/color-strategies/rte-field-pairs.ts +23 -0
  133. package/src/shared/content-settings/components/content-settings/i18n/content-settings.json +17 -1
  134. package/src/shared/content-settings/components/content-settings-item/ContentSettingsItemField.vue +3 -0
  135. package/src/shared/content-settings/components/items-field/ItemsField.mixin.ts +11 -1
  136. package/src/shared/content-settings/components/items-field/ItemsField.vue +8 -2
  137. package/src/shared/content-settings/components/list-items-field/ListItemsField.test.ts +429 -0
  138. package/src/shared/content-settings/components/list-items-field/ListItemsField.vue +262 -0
  139. package/src/shared/content-settings/components/textarea-field/TextareaField.mixin.ts +6 -0
  140. package/src/shared/content-settings/components/textarea-field/TextareaField.vue +1 -0
  141. package/src/shared/content-settings/models.ts +7 -0
  142. package/src/shared/content-settings/store/content-settings-store.test.ts +70 -0
  143. package/src/shared/content-settings/store/content-settings-store.ts +37 -3
  144. package/src/shared/ecommerce-settings/util/refreshDuplicatedMetadata.test.ts +19 -0
  145. package/src/shared/page-settings/store/page-settings-store.test.ts +0 -71
  146. package/src/utils/minify-brand-page-metadata.test.ts +35 -0
  147. package/lib/src/bundled-translations-BYUfWBT3.js +0 -179
@@ -1,5 +1,5 @@
1
1
  import { openBlock as e, createElementBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-V7aqfuiB.js";
2
+ import { _ as t } from "./lib-DwpSAbLZ.js";
3
3
  const i = {}, h = {
4
4
  width: "275",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as e, createElementBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-V7aqfuiB.js";
2
+ import { _ as t } from "./lib-DwpSAbLZ.js";
3
3
  const i = {}, h = {
4
4
  width: "251",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as e, createElementBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-V7aqfuiB.js";
2
+ import { _ as t } from "./lib-DwpSAbLZ.js";
3
3
  const i = {}, h = {
4
4
  width: "250",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as e, createElementBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-V7aqfuiB.js";
2
+ import { _ as t } from "./lib-DwpSAbLZ.js";
3
3
  const i = {}, h = {
4
4
  width: "237",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as e, createElementBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-V7aqfuiB.js";
2
+ import { _ as t } from "./lib-DwpSAbLZ.js";
3
3
  const i = {}, h = {
4
4
  width: "237",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as e, createElementBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-V7aqfuiB.js";
2
+ import { _ as t } from "./lib-DwpSAbLZ.js";
3
3
  const i = {}, h = {
4
4
  width: "263",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as e, createElementBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-V7aqfuiB.js";
2
+ import { _ as t } from "./lib-DwpSAbLZ.js";
3
3
  const i = {}, h = {
4
4
  width: "263",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as H, createElementBlock as V, createStaticVNode as t } from "vue";
2
- import { _ as e } from "./lib-V7aqfuiB.js";
2
+ import { _ as e } from "./lib-DwpSAbLZ.js";
3
3
  const M = {}, Z = {
4
4
  width: "242",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as H, createElementBlock as V, createStaticVNode as t } from "vue";
2
- import { _ as e } from "./lib-V7aqfuiB.js";
2
+ import { _ as e } from "./lib-DwpSAbLZ.js";
3
3
  const i = {}, M = {
4
4
  width: "231",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as H, createElementBlock as V, createStaticVNode as t } from "vue";
2
- import { _ as e } from "./lib-V7aqfuiB.js";
2
+ import { _ as e } from "./lib-DwpSAbLZ.js";
3
3
  const M = {}, Z = {
4
4
  width: "230",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as H, createElementBlock as V, createStaticVNode as t } from "vue";
2
- import { _ as e } from "./lib-V7aqfuiB.js";
2
+ import { _ as e } from "./lib-DwpSAbLZ.js";
3
3
  const i = {}, l = {
4
4
  width: "216",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as H, createElementBlock as V, createStaticVNode as t } from "vue";
2
- import { _ as e } from "./lib-V7aqfuiB.js";
2
+ import { _ as e } from "./lib-DwpSAbLZ.js";
3
3
  const i = {}, l = {
4
4
  width: "216",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as H, createElementBlock as V, createStaticVNode as t } from "vue";
2
- import { _ as M } from "./lib-V7aqfuiB.js";
2
+ import { _ as M } from "./lib-DwpSAbLZ.js";
3
3
  const Z = {}, e = {
4
4
  width: "232",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as H, createElementBlock as V, createStaticVNode as t } from "vue";
2
- import { _ as M } from "./lib-V7aqfuiB.js";
2
+ import { _ as M } from "./lib-DwpSAbLZ.js";
3
3
  const Z = {}, e = {
4
4
  width: "232",
5
5
  height: "36",
@@ -77,6 +77,14 @@ export declare const IMAGE_RESOLUTION_PRESETS: {
77
77
  readonly ULTRA_HD: "q=80&w=2160";
78
78
  };
79
79
  export type ImagesSectionContentDisplayStyle = (typeof IMAGES_SECTION_CONTENT_DISPLAY_STYLES)[number];
80
+ /** Centered and split are accordions; grid shows every answer. */
81
+ export declare const FAQ_DISPLAY_STYLES: Readonly<{
82
+ readonly centered: "faq-centered";
83
+ readonly split: "faq-split";
84
+ readonly grid: "faq-grid";
85
+ }>;
86
+ export type FaqDisplayStyle = (typeof FAQ_DISPLAY_STYLES)[keyof typeof FAQ_DISPLAY_STYLES];
87
+ export declare const FAQ_MAX_ITEMS = 6;
80
88
  export declare const HEADER_CSRF_TOKEN = "csrf-token";
81
89
  export declare const STYLE_THEME_KEYS: Readonly<{
82
90
  LogoTextColor: "logo-text-color";
@@ -103,6 +103,13 @@ export const IMAGE_RESOLUTION_PRESETS = {
103
103
  FULL_HD: 'q=80&w=1080',
104
104
  ULTRA_HD: 'q=80&w=2160',
105
105
  };
106
+ /** Centered and split are accordions; grid shows every answer. */
107
+ export const FAQ_DISPLAY_STYLES = Object.freeze({
108
+ centered: 'faq-centered',
109
+ split: 'faq-split',
110
+ grid: 'faq-grid',
111
+ });
112
+ export const FAQ_MAX_ITEMS = 6;
106
113
  export const HEADER_CSRF_TOKEN = 'csrf-token';
107
114
  export const STYLE_THEME_KEYS = Object.freeze({
108
115
  LogoTextColor: 'logo-text-color',
@@ -33,5 +33,7 @@ export declare const CONTENT_TEXT_STYLE_PROPERTY_KEYS: {
33
33
  readonly buttonTextStyle: "buttonTextStyle";
34
34
  readonly copyrightStyle: "copyrightStyle";
35
35
  readonly successMessageStyle: "successMessageStyle";
36
+ readonly questionStyle: "questionStyle";
37
+ readonly answerStyle: "answerStyle";
36
38
  };
37
39
  export type ContentTextStylePropertyKey = keyof typeof CONTENT_TEXT_STYLE_PROPERTY_KEYS;
@@ -35,4 +35,6 @@ export const CONTENT_TEXT_STYLE_PROPERTY_KEYS = {
35
35
  buttonTextStyle: 'buttonTextStyle',
36
36
  copyrightStyle: 'copyrightStyle',
37
37
  successMessageStyle: 'successMessageStyle',
38
+ questionStyle: 'questionStyle',
39
+ answerStyle: 'answerStyle',
38
40
  };
@@ -36,8 +36,6 @@ export interface AbTestResult {
36
36
  }
37
37
  export interface AbTest {
38
38
  bp_3926_freemium_watermark?: AbTestResult;
39
- bp_5873_live_preview_prepurchase?: AbTestResult;
40
- bp_5873_live_preview_postpurchase?: AbTestResult;
41
39
  }
42
40
  export declare const MEDIA_SIZES: {
43
41
  readonly size1x: "size1x";
@@ -24,11 +24,6 @@ export const AB_TEST_FLAG = {
24
24
  };
25
25
  const AB_TEST_KEYS = {
26
26
  BP_3926_FREEMIUM_WATERMARK: 'bc-bp-3926-freemium-cta-in-website-editor',
27
- // Two separate live-preview experiments — bc-net sends only the one for the
28
- // current purchase state, and a user's value on each side is independent
29
- // (BP-5873). Keys must match `CampaignNames.LivePreview*Test` in bc-net.
30
- BP_5873_LIVE_PREVIEW_PREPURCHASE: 'bc-bp-5873-live-preview-prepurchase',
31
- BP_5873_LIVE_PREVIEW_POSTPURCHASE: 'bc-bp-5873-live-preview-postpurchase',
32
27
  };
33
28
  export const MEDIA_SIZES = {
34
29
  size1x: 'size1x',
@@ -50,12 +45,5 @@ export const getAbTestResults = (abtestKeyValues) => {
50
45
  if (abtestKeyValues[AB_TEST_KEYS.BP_3926_FREEMIUM_WATERMARK]) {
51
46
  abTests.bp_3926_freemium_watermark = getValueType(AB_TEST_KEYS.BP_3926_FREEMIUM_WATERMARK, abtestKeyValues[AB_TEST_KEYS.BP_3926_FREEMIUM_WATERMARK]);
52
47
  }
53
- // AB Test for BP-5873 - Live preview (pre- and post-purchase run separately)
54
- if (abtestKeyValues[AB_TEST_KEYS.BP_5873_LIVE_PREVIEW_PREPURCHASE]) {
55
- abTests.bp_5873_live_preview_prepurchase = getValueType(AB_TEST_KEYS.BP_5873_LIVE_PREVIEW_PREPURCHASE, abtestKeyValues[AB_TEST_KEYS.BP_5873_LIVE_PREVIEW_PREPURCHASE]);
56
- }
57
- if (abtestKeyValues[AB_TEST_KEYS.BP_5873_LIVE_PREVIEW_POSTPURCHASE]) {
58
- abTests.bp_5873_live_preview_postpurchase = getValueType(AB_TEST_KEYS.BP_5873_LIVE_PREVIEW_POSTPURCHASE, abtestKeyValues[AB_TEST_KEYS.BP_5873_LIVE_PREVIEW_POSTPURCHASE]);
59
- }
60
48
  return abTests;
61
49
  };
@@ -31,6 +31,7 @@ export declare const CONTENT_TYPES: {
31
31
  readonly 'shapes-section': "shapes-section";
32
32
  readonly 'shop-section': "shop-section";
33
33
  readonly 'booking-section': "booking-section";
34
+ readonly 'faq-section': "faq-section";
34
35
  };
35
36
  export type ContentType = keyof typeof CONTENT_TYPES;
36
37
  export declare const PERSONALISATION_ROLES: {
@@ -31,6 +31,7 @@ export const CONTENT_TYPES = {
31
31
  'shapes-section': 'shapes-section',
32
32
  'shop-section': 'shop-section',
33
33
  'booking-section': 'booking-section',
34
+ 'faq-section': 'faq-section',
34
35
  };
35
36
  export const PERSONALISATION_ROLES = {
36
37
  profile: 'profile',
@@ -478,6 +478,25 @@ export interface BookingSectionContent extends Content {
478
478
  buttonLinkType: ButtonLinkType;
479
479
  buttonTextStyle: TextStyleDeclaration;
480
480
  }
481
+ export interface FaqItem {
482
+ /** Stable per-item identifier. See ImageItem.id. */
483
+ id: string;
484
+ question: RichTextValue;
485
+ /** Drives `question`, per item — like a section's `titleStyle` drives its title. */
486
+ questionStyle: TextStyleDeclaration;
487
+ answer: RichTextValue;
488
+ answerStyle: TextStyleDeclaration;
489
+ }
490
+ export interface FaqSectionContent extends Content {
491
+ type: 'faq-section';
492
+ title: RichTextValue;
493
+ description: RichTextValue;
494
+ displayStyle: string;
495
+ items: FaqItem[];
496
+ titleStyle: TextStyleDeclaration;
497
+ descriptionStyle: TextStyleDeclaration;
498
+ backgroundStyle: BrandPageCssStyle;
499
+ }
481
500
  export declare class PageModel {
482
501
  title: string;
483
502
  contents: Content[];
@@ -1,4 +1,4 @@
1
- import type { ProfileContent, TextContent, ContactFormContent, ImageContent, BannerSectionContent, SocialLinksContent, ImageGalleryContent, TestimonialSectionContent, AboutSectionContent, ImagesSectionContent, MailingListContent, SupportMeContent, RequestPaymentContent, ShapesSectionContent, ShopContent, ButtonContent, PageModel, BookingSectionContent } from '../models';
1
+ import type { ProfileContent, TextContent, ContactFormContent, ImageContent, BannerSectionContent, SocialLinksContent, ImageGalleryContent, TestimonialSectionContent, AboutSectionContent, ImagesSectionContent, MailingListContent, SupportMeContent, RequestPaymentContent, ShapesSectionContent, ShopContent, ButtonContent, PageModel, BookingSectionContent, FaqSectionContent } from '../models';
2
2
  export type ContentCallback = {
3
3
  profileContentCallback: (content: ProfileContent) => void;
4
4
  textContentCallback: (content: TextContent) => void;
@@ -17,5 +17,6 @@ export type ContentCallback = {
17
17
  shopSectionContentCallback: (content: ShopContent) => void;
18
18
  buttonContentCallback: (content: ButtonContent) => void;
19
19
  bookingSectionContentCallback: (content: BookingSectionContent) => void;
20
+ faqSectionContentCallback: (content: FaqSectionContent) => void;
20
21
  };
21
22
  export declare const forEachPageCallContentCallback: (page: PageModel, callbacks: ContentCallback) => void;
@@ -49,6 +49,9 @@ export const forEachPageCallContentCallback = (page, callbacks) => {
49
49
  case 'booking-section':
50
50
  callbacks.bookingSectionContentCallback(content);
51
51
  break;
52
+ case 'faq-section':
53
+ callbacks.faqSectionContentCallback(content);
54
+ break;
52
55
  case 'general-link':
53
56
  case 'website':
54
57
  case 'email':
@@ -1,4 +1,4 @@
1
- import { type Content, type AboutSectionContent, type BannerSectionContent, type BrandPageModel, type ButtonWithModalContent, type ImagesSectionContent, type LogoContent, type MailingListContent, type ProfileContent, type ShapesSectionContent, type SocialLinksContent, type SupportMeContent, type TestimonialSectionContent, type TextContent, type RequestPaymentContent, type ContactFormContent, type LogoImageModel, type ShopContent, type ImageContent, type ImageGalleryContent, type BookingSectionContent } from '../models';
1
+ import { type Content, type AboutSectionContent, type BannerSectionContent, type BrandPageModel, type ButtonWithModalContent, type ImagesSectionContent, type LogoContent, type MailingListContent, type ProfileContent, type ShapesSectionContent, type SocialLinksContent, type SupportMeContent, type TestimonialSectionContent, type TextContent, type RequestPaymentContent, type ContactFormContent, type LogoImageModel, type ShopContent, type ImageContent, type ImageGalleryContent, type BookingSectionContent, type FaqSectionContent } from '../models';
2
2
  export declare const isLogoContent: (content?: Content) => content is LogoContent;
3
3
  export declare const applyLogoImageToBrandPageModelLogoContents: (model: BrandPageModel, logoImage: LogoImageModel) => BrandPageModel;
4
4
  export declare const isTextContent: (content?: Content) => content is TextContent;
@@ -8,6 +8,7 @@ export declare const isSupportMeContent: (content?: Content) => content is Suppo
8
8
  export declare const isButtonContent: (content?: Content) => content is ButtonWithModalContent;
9
9
  export declare const isBannerContent: (content?: Content) => content is BannerSectionContent;
10
10
  export declare const isBookingContent: (content?: Content) => content is BookingSectionContent;
11
+ export declare const isFaqContent: (content?: Content) => content is FaqSectionContent;
11
12
  export declare const isAboutContent: (content?: Content) => content is AboutSectionContent;
12
13
  export declare const isTestimonialContent: (content?: Content) => content is TestimonialSectionContent;
13
14
  export declare const isShapesContent: (content?: Content) => content is ShapesSectionContent;
@@ -43,6 +43,9 @@ export const isBannerContent = (content) => {
43
43
  export const isBookingContent = (content) => {
44
44
  return content?.type === 'booking-section';
45
45
  };
46
+ export const isFaqContent = (content) => {
47
+ return content?.type === 'faq-section';
48
+ };
46
49
  export const isAboutContent = (content) => {
47
50
  return content?.type === 'about-section';
48
51
  };
@@ -29,6 +29,8 @@ interface ViewModelMappingOptions {
29
29
  previewImageUrl: string;
30
30
  };
31
31
  setVideoUrlsWithToken?: (token: string, videoUrl: string, previewImageUrl: string, assetId: string) => void;
32
+ /** Maker-only UI state: content id → the item its settings panel has open. Never persisted. */
33
+ activeItemIdByContentId?: Record<string, string | undefined>;
32
34
  }
33
35
  export declare const getBrandPageViewModelFromBrandPageModel: (model: BrandPageModel, brandPageToken: string | undefined, showBrandCrowdLogo: boolean | undefined, options: ViewModelMappingOptions) => BrandPageViewModel;
34
36
  export declare const resolvePageIdsInRteJson: (doc: unknown, nav: NavViewModel, options: ViewModelMappingOptions) => unknown;
@@ -611,6 +611,28 @@ const mapToTestimonialSectionViewModel = (content, styles) => {
611
611
  isFullWidth: true,
612
612
  }, styles);
613
613
  };
614
+ // An item's question/answer styles are CONTENT_TEXT_STYLE_PROPERTY_KEYS, so the section
615
+ // resolver handles them when handed the item.
616
+ const mapFaqItem = (item, styles) => applyViewModelTextStyles({
617
+ ...item,
618
+ questionStyle: { ...item.questionStyle },
619
+ answerStyle: { ...item.answerStyle },
620
+ }, styles);
621
+ const mapToFaqSectionViewModel = (content, styles, brandPageType, options) => {
622
+ return applyViewModelTextStyles({
623
+ ...content,
624
+ role: content.type,
625
+ type: 'faq-section',
626
+ // No `color` pre-seed — these styles are CONTENT_TEXT_STYLE_PROPERTY_KEYS
627
+ // (see the testimonial mapper), resolved per item for the item styles.
628
+ titleStyle: { ...content.titleStyle },
629
+ descriptionStyle: { ...content.descriptionStyle },
630
+ items: (content.items ?? []).map((item) => mapFaqItem(item, styles)),
631
+ isFullWidth: true,
632
+ isStacked: brandPageType !== BRAND_PAGE_TYPES.brandSite,
633
+ activeItemId: options.activeItemIdByContentId?.[content.id],
634
+ }, styles);
635
+ };
614
636
  const mapToSocialLinksViewModel = (content, styles, brandPageType) => {
615
637
  return applyViewModelTextStyles({
616
638
  ...content,
@@ -872,6 +894,8 @@ export const mapToViewModel = (styles, brandPageType, options) => (content) => {
872
894
  return mapToBannerSectionViewModel(content, styles, options);
873
895
  case 'booking-section':
874
896
  return mapToBookingSectionViewModel(content, styles);
897
+ case 'faq-section':
898
+ return mapToFaqSectionViewModel(content, styles, brandPageType, options);
875
899
  case 'about-section':
876
900
  return mapToAboutSectionViewModel(content, styles);
877
901
  case 'images-section':
@@ -1,6 +1,6 @@
1
- import type { ButtonWithModalContent, ProfileContent, TextContent, VideoContent, ImageContent, ContentType, ButtonStyles, LogoStyles, MapContent, ImageGalleryContent, GalleryStyles, MailingListContent, RequestPaymentContent, ShopContent, SupportMeContent, ContactFormContent, BannerSectionContent, BrandPageType, SocialLinksContent, TestimonialSectionContent, AboutSectionContent, DividerSectionContent, ShapesSectionContent, ButtonLinkType, PageHeaderMobile, PageHeaderDesktop, PageFooterMobile, PageFooterDesktop, TextMediaItem, TextShapeItem, TextStyleDeclaration, AspectRatio, LogoImageModel, LogoTemplateImageModel, CookieOptions, BookingSectionContent, MediaTypes, TextStyles, BackgroundStyle, BackgroundShape, PersonalisationRole, SaveContactOptions, ColorItem, RichTextValue } from './models';
1
+ import type { ButtonWithModalContent, ProfileContent, TextContent, VideoContent, ImageContent, ContentType, ButtonStyles, LogoStyles, MapContent, ImageGalleryContent, GalleryStyles, MailingListContent, RequestPaymentContent, ShopContent, SupportMeContent, ContactFormContent, BannerSectionContent, BrandPageType, SocialLinksContent, TestimonialSectionContent, AboutSectionContent, DividerSectionContent, ShapesSectionContent, ButtonLinkType, PageHeaderMobile, PageHeaderDesktop, PageFooterMobile, PageFooterDesktop, TextMediaItem, TextShapeItem, TextStyleDeclaration, AspectRatio, LogoImageModel, LogoTemplateImageModel, CookieOptions, BookingSectionContent, FaqSectionContent, MediaTypes, TextStyles, BackgroundStyle, BackgroundShape, PersonalisationRole, SaveContactOptions, ColorItem, RichTextValue } from './models';
2
2
  import type { ImagesSectionContentDisplayStyle } from './constants';
3
- export type ViewModelType = 'button' | 'image' | 'image-gallery' | 'logo' | 'map' | 'mailing-list' | 'profile' | 'support-me' | 'request-payment' | 'text' | 'video' | 'contact-form' | 'banner-section' | 'images-section' | 'about-section' | 'divider-section' | 'testimonial-section' | 'social-links' | 'shapes-section' | 'shop-section' | 'booking-section';
3
+ export type ViewModelType = 'button' | 'image' | 'image-gallery' | 'logo' | 'map' | 'mailing-list' | 'profile' | 'support-me' | 'request-payment' | 'text' | 'video' | 'contact-form' | 'banner-section' | 'images-section' | 'about-section' | 'divider-section' | 'testimonial-section' | 'social-links' | 'shapes-section' | 'shop-section' | 'booking-section' | 'faq-section';
4
4
  export interface ContentViewModel {
5
5
  id: string;
6
6
  type: ViewModelType;
@@ -132,6 +132,13 @@ export interface BookingSectionViewModel extends ContentViewModel, Omit<BookingS
132
132
  buttonViewModel: ButtonViewModel;
133
133
  isFullWidth: boolean;
134
134
  }
135
+ export interface FaqSectionViewModel extends ContentViewModel, Omit<FaqSectionContent, 'type'> {
136
+ isFullWidth: boolean;
137
+ /** brand.page / brand.contact: split and grid always use their stacked layout. */
138
+ isStacked: boolean;
139
+ /** Maker-only: the item the settings panel has open, so the canvas shows it. */
140
+ activeItemId?: string;
141
+ }
135
142
  export interface PageHeaderViewModel extends Omit<PageHeaderDesktop | PageHeaderMobile, 'logoImage' | 'logoImageStyle' | 'isLogoOptional' | 'viewport' | 'isLogoVisible' | 'logoTemplateImage' | 'logoImageHeight' | 'logoImageWidth' | 'headerButton' | 'backgroundStyle'> {
136
143
  logo: LogoViewModel;
137
144
  pages: PageViewModel[];
@@ -1,6 +1,5 @@
1
1
  declare const _default: import("vue").DefineComponent<{}, {
2
2
  isAdminMaker: import("vue").ComputedRef<boolean>;
3
- isLivePreviewEnabled: import("vue").ComputedRef<boolean>;
4
3
  isSaving: import("vue").ComputedRef<boolean>;
5
4
  isPublished: import("vue").ComputedRef<boolean>;
6
5
  isPublishButtonEnabled: import("vue").ComputedRef<boolean>;
@@ -11,15 +11,6 @@ export default defineComponent({
11
11
  const containerStore = useBrandPageContainerStore();
12
12
  return {
13
13
  isAdminMaker: computed(() => containerStore.isAdminMaker),
14
- // BP-5873: the Preview button is behind an AB test, and pre/post purchase are
15
- // two separate experiments. Pick the one for the current purchase state — a
16
- // user's value on the other side is independent and must not leak across.
17
- isLivePreviewEnabled: computed(() => {
18
- const experiment = containerStore.isPrePurchase
19
- ? containerStore.abTests.bp_5873_live_preview_prepurchase
20
- : containerStore.abTests.bp_5873_live_preview_postpurchase;
21
- return !!experiment?.isVariation;
22
- }),
23
14
  isSaving: computed(() => brandPageMakerStore.isSaving),
24
15
  isPublished: computed(() => brandPageMakerStore.isPublished),
25
16
  isPublishButtonEnabled: computed(() => brandPageMakerStore.isPublishButtonEnabled),
@@ -292,20 +292,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
292
292
  isVariation: boolean;
293
293
  isExcluded: boolean;
294
294
  } | undefined;
295
- bp_5873_live_preview_prepurchase?: {
296
- key: string;
297
- value: string;
298
- isControl: boolean;
299
- isVariation: boolean;
300
- isExcluded: boolean;
301
- } | undefined;
302
- bp_5873_live_preview_postpurchase?: {
303
- key: string;
304
- value: string;
305
- isControl: boolean;
306
- isVariation: boolean;
307
- isExcluded: boolean;
308
- } | undefined;
309
295
  };
310
296
  isSubsequentPublish: boolean;
311
297
  isContextualUpgradeModalVisible: boolean;
@@ -381,20 +367,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
381
367
  isVariation: boolean;
382
368
  isExcluded: boolean;
383
369
  } | undefined;
384
- bp_5873_live_preview_prepurchase?: {
385
- key: string;
386
- value: string;
387
- isControl: boolean;
388
- isVariation: boolean;
389
- isExcluded: boolean;
390
- } | undefined;
391
- bp_5873_live_preview_postpurchase?: {
392
- key: string;
393
- value: string;
394
- isControl: boolean;
395
- isVariation: boolean;
396
- isExcluded: boolean;
397
- } | undefined;
398
370
  };
399
371
  isSubsequentPublish: boolean;
400
372
  isContextualUpgradeModalVisible: boolean;
@@ -470,20 +442,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
470
442
  isVariation: boolean;
471
443
  isExcluded: boolean;
472
444
  } | undefined;
473
- bp_5873_live_preview_prepurchase?: {
474
- key: string;
475
- value: string;
476
- isControl: boolean;
477
- isVariation: boolean;
478
- isExcluded: boolean;
479
- } | undefined;
480
- bp_5873_live_preview_postpurchase?: {
481
- key: string;
482
- value: string;
483
- isControl: boolean;
484
- isVariation: boolean;
485
- isExcluded: boolean;
486
- } | undefined;
487
445
  };
488
446
  isSubsequentPublish: boolean;
489
447
  isContextualUpgradeModalVisible: boolean;
@@ -648,6 +606,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
648
606
  selectedItemValue: string | null;
649
607
  selectedItemIndex: number | null;
650
608
  activeCategoryTab: import("@brand-page-maker/models").ItemCategory;
609
+ activeItemIdByContentId: Record<string, string | undefined>;
651
610
  } & import("pinia").PiniaCustomStateProperties<import("@shared/content-settings/store").ContentSettingsState>): (id: string) => import("@brand-page").Content | undefined;
652
611
  getFieldSettings(state: {
653
612
  addContentOptions: {
@@ -699,6 +658,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
699
658
  selectedItemValue: string | null;
700
659
  selectedItemIndex: number | null;
701
660
  activeCategoryTab: import("@brand-page-maker/models").ItemCategory;
661
+ activeItemIdByContentId: Record<string, string | undefined>;
702
662
  } & import("pinia").PiniaCustomStateProperties<import("@shared/content-settings/store").ContentSettingsState>): (id: string, fieldName: string) => import("../../../shared/content-settings/models").ContentItemFieldSettings | undefined;
703
663
  getItem(state: {
704
664
  addContentOptions: {
@@ -750,6 +710,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
750
710
  selectedItemValue: string | null;
751
711
  selectedItemIndex: number | null;
752
712
  activeCategoryTab: import("@brand-page-maker/models").ItemCategory;
713
+ activeItemIdByContentId: Record<string, string | undefined>;
753
714
  } & import("pinia").PiniaCustomStateProperties<import("@shared/content-settings/store").ContentSettingsState>): (id: string) => import("../../../shared/content-settings/models").ContentItem<any> | undefined;
754
715
  getValue(state: {
755
716
  addContentOptions: {
@@ -801,6 +762,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
801
762
  selectedItemValue: string | null;
802
763
  selectedItemIndex: number | null;
803
764
  activeCategoryTab: import("@brand-page-maker/models").ItemCategory;
765
+ activeItemIdByContentId: Record<string, string | undefined>;
804
766
  } & import("pinia").PiniaCustomStateProperties<import("@shared/content-settings/store").ContentSettingsState>): (id: string, fieldName: string) => import("@brand-page").Content | string | undefined;
805
767
  getItemState(state: {
806
768
  addContentOptions: {
@@ -852,6 +814,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
852
814
  selectedItemValue: string | null;
853
815
  selectedItemIndex: number | null;
854
816
  activeCategoryTab: import("@brand-page-maker/models").ItemCategory;
817
+ activeItemIdByContentId: Record<string, string | undefined>;
855
818
  } & import("pinia").PiniaCustomStateProperties<import("@shared/content-settings/store").ContentSettingsState>): (id: string) => import("../../../shared/content-settings/models").ContentSettingsItemState;
856
819
  getItemGroupState(state: {
857
820
  addContentOptions: {
@@ -903,11 +866,13 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
903
866
  selectedItemValue: string | null;
904
867
  selectedItemIndex: number | null;
905
868
  activeCategoryTab: import("@brand-page-maker/models").ItemCategory;
869
+ activeItemIdByContentId: Record<string, string | undefined>;
906
870
  } & import("pinia").PiniaCustomStateProperties<import("@shared/content-settings/store").ContentSettingsState>): (id: string, groupId: string) => import("../../../shared/content-settings/models").ContentSettingsItemGroupState;
907
871
  mode(): import("@shared/content-settings/store").ContentSettingsMode;
908
872
  selectedItem(): import("../../../shared/content-settings/models").ContentItem<any> | undefined;
909
873
  selectedItemTemplate(): import("@brand-page-maker/models").ContentSettingsConfig<any> | undefined;
910
874
  }, {
875
+ setActiveItem(contentId: string, itemId: string | undefined): void;
911
876
  onContentChanged(): void;
912
877
  _addItem({ item, index, }: {
913
878
  item: import("../../../shared/content-settings/models").ContentItem<any>;
@@ -971,6 +936,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
971
936
  }): void;
972
937
  updateTextItemTextStyleType({ id, name, value, index, isHydrationWrite, }: import("../../../shared/content-settings/models").UpdateMultipleItemValuesPayload<any>): void;
973
938
  updateTextItemTextStyleTypeWithStyles({ id, name, value, index, isHydrationWrite, }: import("../../../shared/content-settings/models").UpdateMultipleItemValuesPayload<any>): void;
939
+ updateListItemTextStyles({ id, name, value, target, isHydrationWrite, }: Omit<import("../../../shared/content-settings/models").UpdateMultipleItemValuesPayload<any>, "index"> & {
940
+ target: import("../../../shared/content-settings/models").RteItemStyleTarget;
941
+ }): void;
974
942
  _setActiveCategoryTab({ activeCategoryTab, }: {
975
943
  activeCategoryTab: import("@brand-page-maker/models").ItemCategory;
976
944
  }): void;