@designcrowd/library.brand-page 6.1.18-style-v2-12 → 6.2.1
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-C-miE90k.js → CreatedOnBrandCrowd-de-de-CtvPtYF6.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-en-us-BMRe6cJ8.js → CreatedOnBrandCrowd-en-us-eGF-EjAX.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-es-es-DMeXHyvr.js → CreatedOnBrandCrowd-es-es-CSemsOtT.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-fr-fr-Cg2bGaXR.js → CreatedOnBrandCrowd-fr-ca-DzylX-AT.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-fr-ca-Cg2bGaXR.js → CreatedOnBrandCrowd-fr-fr-DzylX-AT.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-pt-pt-Ipffm0nv.js → CreatedOnBrandCrowd-pt-br-QMUxXQsE.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-pt-br-Ipffm0nv.js → CreatedOnBrandCrowd-pt-pt-QMUxXQsE.js} +1 -1
- package/lib/src/{CreatedOnDcom-de-de-6gXXPZL2.js → CreatedOnDcom-de-de-M7OoJt-1.js} +1 -1
- package/lib/src/{CreatedOnDcom-en-us-XameLHTE.js → CreatedOnDcom-en-us-D7hMM0AI.js} +1 -1
- package/lib/src/{CreatedOnDcom-es-es-CxEUwGOZ.js → CreatedOnDcom-es-es-CLw-BLp2.js} +1 -1
- package/lib/src/{CreatedOnDcom-fr-ca-BlZoDKI8.js → CreatedOnDcom-fr-ca-BRu_kmeu.js} +1 -1
- package/lib/src/{CreatedOnDcom-fr-fr-BUJnRwRZ.js → CreatedOnDcom-fr-fr-IMnEv_yM.js} +1 -1
- package/lib/src/{CreatedOnDcom-pt-br-B9iKuqSa.js → CreatedOnDcom-pt-br-Bt6v1p27.js} +1 -1
- package/lib/src/{CreatedOnDcom-pt-pt-kN0P9AeT.js → CreatedOnDcom-pt-pt-BVsFJIJg.js} +1 -1
- package/lib/src/brand-page/components/navigation/navigation-side-menu/NavigationSideMenu.mixin.d.ts +16 -2
- package/lib/src/brand-page/components/navigation/navigation-side-menu/NavigationSideMenu.mixin.js +17 -0
- package/lib/src/brand-page/components/page/Page.mixin.d.ts +3 -5
- package/lib/src/brand-page/components/page/Page.mixin.js +21 -33
- package/lib/src/brand-page/components/page-header/HeaderLayout.stories.d.ts +1 -0
- package/lib/src/brand-page/components/page-header/HeaderLayout.stories.js +9 -0
- package/lib/src/brand-page/components/page-header/PageHeader.mixin.d.ts +3 -1
- package/lib/src/brand-page/components/page-header/PageHeader.mixin.js +10 -4
- package/lib/src/brand-page/components/social-links/SocialLinks.stories.js +3 -0
- package/lib/src/brand-page/components/testimonial-section/__fixtures__/data.js +3 -0
- package/lib/src/brand-page/components/text/Text.stories.js +17 -0
- package/lib/src/brand-page/constants/font.constants.d.ts +0 -62
- package/lib/src/brand-page/constants/font.constants.js +0 -35
- package/lib/src/brand-page/constants/sections/header-display.constants.d.ts +3 -0
- package/lib/src/brand-page/constants/sections/header-display.constants.js +15 -0
- package/lib/src/brand-page/models/index.d.ts +32 -20
- package/lib/src/brand-page/models/index.js +4 -0
- package/lib/src/brand-page/models/logo.model.js +1 -1
- package/lib/src/brand-page/models/payment.model.d.ts +6 -8
- package/lib/src/brand-page/models/styles.model.d.ts +1 -45
- package/lib/src/brand-page/models/styles.model.js +22 -106
- package/lib/src/brand-page/utils/color-palette-referencify.util.d.ts +1 -1
- package/lib/src/brand-page/utils/color-palette-referencify.util.js +1 -1
- package/lib/src/brand-page/utils/color-palette.util.d.ts +23 -43
- package/lib/src/brand-page/utils/color-palette.util.js +27 -62
- package/lib/src/brand-page/utils/color.util.d.ts +9 -12
- package/lib/src/brand-page/utils/color.util.js +15 -49
- package/lib/src/brand-page/utils/container-text-color.util.d.ts +13 -34
- package/lib/src/brand-page/utils/container-text-color.util.js +40 -243
- package/lib/src/brand-page/utils/context.util.d.ts +1 -0
- package/lib/src/brand-page/utils/context.util.js +9 -0
- package/lib/src/brand-page/utils/index.d.ts +0 -1
- package/lib/src/brand-page/utils/index.js +0 -1
- package/lib/src/brand-page/utils/migration/migration-20.js +1 -4
- package/lib/src/brand-page/utils/migration/migration-21.js +6 -18
- package/lib/src/brand-page/utils/migration.util.js +0 -16
- package/lib/src/brand-page/utils/personalisation.util.js +1 -9
- package/lib/src/brand-page/utils/route.util.d.ts +1 -0
- package/lib/src/brand-page/utils/route.util.js +9 -0
- package/lib/src/brand-page/utils/text-style.util.d.ts +22 -61
- package/lib/src/brand-page/utils/text-style.util.js +22 -104
- package/lib/src/brand-page/utils/view-model.util.js +72 -25
- package/lib/src/brand-page/view-models.d.ts +3 -1
- package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.d.ts +2 -2
- package/lib/src/brand-page-maker/components/brand-page-maker/__fixtures__/brand-page-examples.js +10 -0
- package/lib/src/brand-page-maker/components/brand-page-maker/__fixtures__/content-settings-items.fixture.js +1 -0
- package/lib/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.d.ts +137 -8
- package/lib/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.js +28 -0
- package/lib/src/brand-page-maker/components/navigation/Navigation.mixin.d.ts +1 -1
- package/lib/src/brand-page-maker/composables/rich-text-editor/font.d.ts +1 -2
- package/lib/src/brand-page-maker/composables/rich-text-editor/font.js +6 -25
- package/lib/src/brand-page-maker/composables/rich-text-editor/formatting.d.ts +3 -17
- package/lib/src/brand-page-maker/composables/rich-text-editor/formatting.js +14 -108
- package/lib/src/brand-page-maker/composables/rich-text-editor/getRteExtensions.d.ts +15 -10
- package/lib/src/brand-page-maker/composables/rich-text-editor/getRteExtensions.js +1 -46
- package/lib/src/brand-page-maker/composables/rich-text-editor/spacing.d.ts +1 -2
- package/lib/src/brand-page-maker/composables/rich-text-editor/spacing.js +6 -22
- package/lib/src/brand-page-maker/composables/rich-text-editor/useRichTextEditor.d.ts +2 -7
- package/lib/src/brand-page-maker/composables/rich-text-editor/useRichTextEditor.js +195 -214
- package/lib/src/brand-page-maker/default-getters/payment-text-and-border-color.default-getter.js +14 -7
- package/lib/src/brand-page-maker/default-getters/text-color.default-getter.js +13 -6
- package/lib/src/brand-page-maker/models/content-settings.js +75 -80
- package/lib/src/brand-page-maker/stores/ai-checkpoint/ai-checkpoint-store.d.ts +1798 -1048
- package/lib/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.js +9 -2
- package/lib/src/brand-page-maker/stores/history/history-store.d.ts +1 -1
- package/lib/src/brand-page-maker/utils/index.d.ts +0 -1
- package/lib/src/brand-page-maker/utils/index.js +0 -1
- package/lib/src/brand-page-maker/utils/rich-text-editor.util.d.ts +7 -52
- package/lib/src/brand-page-maker/utils/rich-text-editor.util.js +264 -212
- package/lib/src/brand-page-maker/utils/rte-render.util.d.ts +2 -46
- package/lib/src/brand-page-maker/utils/rte-render.util.js +7 -145
- package/lib/src/brand-page-maker/utils/rte-sanitize.util.js +3 -7
- package/lib/src/brand-page-maker/validators/section-button.validator.d.ts +5 -2
- package/lib/src/brand-page-maker/validators/section-button.validator.js +11 -15
- package/lib/src/{bundled-translations-CQ8dZIIe.js → bundled-translations-KY0aSmMp.js} +17 -17
- package/lib/src/{bundled-translations.de-DE-D10ohBT0.js → bundled-translations.de-DE-BIFi4bYj.js} +17 -17
- package/lib/src/{bundled-translations.es-ES-C1o3tbHg.js → bundled-translations.es-ES-CHlKuPLO.js} +9 -9
- package/lib/src/{bundled-translations.fr-CA-ClHWmoIS.js → bundled-translations.fr-CA-DR1fvm8e.js} +9 -9
- package/lib/src/{bundled-translations.fr-FR-C_PgkOpB.js → bundled-translations.fr-FR-DnpWVIQg.js} +17 -17
- package/lib/src/{bundled-translations.pt-BR-Csr8_jy7.js → bundled-translations.pt-BR-p8szTOiT.js} +21 -21
- package/lib/src/{bundled-translations.pt-PT-D-vjMoOD.js → bundled-translations.pt-PT-DEk39NhW.js} +34 -34
- package/lib/src/bundles/bundled-translations.de-DE.json +7 -18
- package/lib/src/bundles/bundled-translations.es-ES.json +7 -18
- package/lib/src/bundles/bundled-translations.fr-CA.json +7 -18
- package/lib/src/bundles/bundled-translations.fr-FR.json +7 -18
- package/lib/src/bundles/bundled-translations.json +8 -19
- package/lib/src/bundles/bundled-translations.pt-BR.json +7 -18
- package/lib/src/bundles/bundled-translations.pt-PT.json +7 -18
- package/lib/src/composables/useTranslate.d.ts +1 -1
- package/lib/src/composables/useTranslate.js +1 -1
- package/lib/src/css/library.brand-page-brandCrowd.min.css +664 -348
- package/lib/src/css/library.brand-page-brandPage.min.css +664 -348
- package/lib/src/css/library.brand-page-designCom.min.css +664 -348
- package/lib/src/css/library.brand-page-preview.min.css +664 -348
- package/lib/src/index.mjs +189 -192
- package/lib/src/{lib-JxZ9L98_.js → lib-B38VVCSw.js} +29399 -29931
- package/lib/src/metadata-builder/builders/section-builders/about-section-builder.js +3 -3
- package/lib/src/metadata-builder/builders/section-builders/banner-section-builder.js +3 -3
- package/lib/src/metadata-builder/builders/section-builders/booking-section-builder.js +3 -3
- package/lib/src/metadata-builder/builders/section-builders/contact-form-builder.js +4 -4
- package/lib/src/metadata-builder/builders/section-builders/images-section-builder.js +3 -3
- package/lib/src/metadata-builder/builders/section-builders/mailing-list-builder.js +2 -2
- package/lib/src/metadata-builder/builders/section-builders/mailing-list-section-builder.js +2 -2
- package/lib/src/metadata-builder/builders/section-builders/profile-section-builder.js +4 -4
- package/lib/src/metadata-builder/builders/section-builders/shapes-section-builder.js +3 -3
- package/lib/src/metadata-builder/builders/section-builders/testimonial-section-builder.js +2 -2
- package/lib/src/metadata-builder/builders/section-builders/text-section-builder.js +22 -32
- package/lib/src/metadata-builder/builders/section-field-utils.d.ts +1 -15
- package/lib/src/metadata-builder/builders/section-field-utils.js +2 -30
- package/lib/src/metadata-builder/builders/section-rules/global-styles.rules.d.ts +1 -1
- package/lib/src/metadata-builder/builders/section-rules/global-styles.rules.js +4 -6
- package/lib/src/metadata-builder/metadata-executor.js +1 -16
- package/lib/src/metadata-builder/parsers/ai-toolcall-parser.d.ts +18 -5
- package/lib/src/metadata-builder/parsers/section-tool-arguments.d.ts +1 -8
- package/lib/src/shared/color-palette/section-color-matches.js +24 -8
- package/lib/src/shared/color-strategies/rte-field-pairs.d.ts +0 -20
- package/lib/src/shared/color-strategies/rte-field-pairs.js +0 -25
- package/lib/src/shared/content-settings/components/content-settings/ContentSettings.mixin.d.ts +136 -2
- package/lib/src/shared/content-settings/components/content-settings/ContentSettings.mixin.js +27 -1
- package/lib/src/shared/content-settings/components/content-settings/ReplaceImageSettingsForContent.mixin.d.ts +1 -2
- package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItem.mixin.d.ts +0 -1
- package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItemField.mixin.d.ts +2 -7
- package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItemField.mixin.js +5 -15
- package/lib/src/shared/content-settings/components/focused-content-item-settings/FocusedContentItemSettings.mixin.d.ts +1 -1
- package/lib/src/shared/content-settings/components/focused-content-item-settings/FocusedContentItemSettings.mixin.js +7 -0
- package/lib/src/shared/content-settings/components/payment-config-field/PaymentConfigField.mixin.d.ts +1 -1
- package/lib/src/shared/content-settings/components/text-field/TextField.mixin.d.ts +14 -2
- package/lib/src/shared/content-settings/components/text-field/TextField.mixin.js +14 -0
- package/lib/src/shared/content-settings/components/text-style-field/TextStyleField.mixin.d.ts +11 -1244
- package/lib/src/shared/content-settings/components/text-style-field/TextStyleField.mixin.js +51 -194
- package/lib/src/shared/content-settings/store/content-settings-store.d.ts +0 -1
- package/lib/src/shared/content-settings/store/content-settings-store.js +7 -55
- package/lib/src/shared/ecommerce-settings/util/refreshDuplicatedMetadata.d.ts +1 -1
- package/lib/src/shared/ecommerce-settings/util/refreshDuplicatedMetadata.js +1 -1
- package/lib/src/shared/logo-settings/components/LogoSettings.mixin.d.ts +1 -1
- package/lib/src/shared/navigation-style-settings/store/index.d.ts +1 -2
- package/lib/src/shared/navigation-style-settings/store/index.js +8 -5
- package/lib/src/shared/page-navigation/store/page-navigation-store.d.ts +1 -0
- package/lib/src/shared/page-navigation/store/page-navigation-store.js +12 -0
- package/lib/src/shared/page-settings/components/delete-page-modal/DeletePageModal.mixin.d.ts +1 -1
- package/lib/src/shared/page-settings/components/new-page-modal/NewPageModal.mixin.d.ts +2 -1
- package/lib/src/shared/page-settings/components/page-settings/PageSettings.mixin.d.ts +191 -4
- package/lib/src/shared/page-settings/components/page-settings-section-styles/PageSettingsSectionStyles.mixin.d.ts +186 -5
- package/lib/src/shared/page-settings/components/page-settings-section-styles/PageSettingsSectionStyles.mixin.js +34 -3
- package/lib/src/shared/page-settings/store/page-settings-store.d.ts +2 -2
- package/lib/src/shared/style-settings/components/StyleSettings.mixin.d.ts +8 -150
- package/lib/src/shared/style-settings/store/style-settings-store.d.ts +1 -0
- package/lib/src/shared/style-settings/store/style-settings-store.js +4 -3
- package/lib/src/tracker.js +1 -2
- package/package.json +4 -4
- package/src/brand-page/components/about-section/AboutSection.vue.test.ts +10 -0
- package/src/brand-page/components/navigation/hamburger/HamburgerNavigation.vue +1 -0
- package/src/brand-page/components/navigation/navigation-side-menu/NavigationSideMenu.mixin.ts +18 -1
- package/src/brand-page/components/navigation/navigation-side-menu/NavigationSideMenu.vue +73 -3
- package/src/brand-page/components/navigation/navigation-side-menu/NavigationSideMenu.vue.test.ts +181 -0
- package/src/brand-page/components/page/Page.mixin.ts +32 -43
- package/src/brand-page/components/page/Page.vue +2 -6
- package/src/brand-page/components/page-header/HeaderLayout.stories.ts +10 -0
- package/src/brand-page/components/page-header/HeaderLayout.vue +415 -71
- package/src/brand-page/components/page-header/PageHeader.mixin.ts +14 -10
- package/src/brand-page/components/page-header/PageHeader.vue +16 -1
- package/src/brand-page/components/page-header/PageHeader.vue.test.ts +339 -0
- package/src/brand-page/components/social-links/SocialLinks.stories.ts +3 -0
- package/src/brand-page/components/social-links/SocialLinks.vue.test.ts +3 -0
- package/src/brand-page/components/testimonial-section/__fixtures__/data.ts +3 -0
- package/src/brand-page/components/text/Text.stories.ts +17 -0
- package/src/brand-page/components/text-wrapper/TextWrapper.vue +14 -139
- package/src/brand-page/constants/font.constants.ts +0 -37
- package/src/brand-page/constants/sections/header-display.constants.test.ts +44 -0
- package/src/brand-page/constants/sections/header-display.constants.ts +35 -0
- package/src/brand-page/models/header-button.model.test.ts +85 -0
- package/src/brand-page/models/index.ts +38 -20
- package/src/brand-page/models/logo.model.ts +1 -1
- package/src/brand-page/models/payment.model.ts +6 -12
- package/src/brand-page/models/styles.model.ts +38 -161
- package/src/brand-page/utils/__snapshots__/migration.util.test.ts.snap +32 -641
- package/src/brand-page/utils/__snapshots__/migration2.util.test.ts.snap +4 -150
- package/src/brand-page/utils/__snapshots__/model.util.test.ts.snap +8 -300
- package/src/brand-page/utils/color-palette-referencify.util.test.ts +1 -1
- package/src/brand-page/utils/color-palette-referencify.util.ts +1 -1
- package/src/brand-page/utils/color-palette.util.test.ts +1 -126
- package/src/brand-page/utils/color-palette.util.ts +26 -89
- package/src/brand-page/utils/color.util.test.ts +31 -54
- package/src/brand-page/utils/color.util.ts +15 -68
- package/src/brand-page/utils/container-text-color.util.test.ts +27 -573
- package/src/brand-page/utils/container-text-color.util.ts +47 -357
- package/src/brand-page/utils/context.util.ts +15 -0
- package/src/brand-page/utils/index.ts +0 -1
- package/src/brand-page/utils/migration/migration-01.ts +237 -293
- package/src/brand-page/utils/migration/migration-02.ts +1 -8
- package/src/brand-page/utils/migration/migration-20.ts +1 -4
- package/src/brand-page/utils/migration/migration-20_5.test.ts +1 -1
- package/src/brand-page/utils/migration/migration-21.ts +7 -27
- package/src/brand-page/utils/migration.util.test.ts +31 -92
- package/src/brand-page/utils/migration.util.ts +0 -17
- package/src/brand-page/utils/personalisation.util.test.ts +0 -80
- package/src/brand-page/utils/personalisation.util.ts +1 -12
- package/src/brand-page/utils/route.util.ts +13 -0
- package/src/brand-page/utils/text-style.util.ts +24 -147
- package/src/brand-page/utils/view-model.util.test.ts +236 -219
- package/src/brand-page/utils/view-model.util.ts +98 -32
- package/src/brand-page/view-models.ts +3 -0
- package/src/brand-page-maker/components/brand-page-maker/__fixtures__/brand-page-examples.ts +10 -0
- package/src/brand-page-maker/components/brand-page-maker/__fixtures__/content-settings-items.fixture.ts +1 -0
- package/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.ts +44 -0
- package/src/brand-page-maker/components/rich-text-editor/RichTextEditor.vue +218 -406
- package/src/brand-page-maker/composables/rich-text-editor/font.ts +5 -36
- package/src/brand-page-maker/composables/rich-text-editor/formatting.test.ts +0 -88
- package/src/brand-page-maker/composables/rich-text-editor/formatting.ts +14 -153
- package/src/brand-page-maker/composables/rich-text-editor/getRteExtensions.ts +1 -40
- package/src/brand-page-maker/composables/rich-text-editor/spacing.ts +6 -31
- package/src/brand-page-maker/composables/rich-text-editor/useRichTextEditor.ts +225 -288
- package/src/brand-page-maker/default-getters/payment-text-and-border-color.default-getter.ts +22 -7
- package/src/brand-page-maker/default-getters/text-color.default-getter.ts +21 -5
- package/src/brand-page-maker/models/content-settings.ts +75 -80
- package/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.ts +35 -0
- package/src/brand-page-maker/utils/__snapshots__/rte-render-parity.test.ts.snap +0 -9
- package/src/brand-page-maker/utils/index.ts +0 -1
- package/src/brand-page-maker/utils/rich-text-editor.util.test.ts +409 -186
- package/src/brand-page-maker/utils/rich-text-editor.util.ts +484 -249
- package/src/brand-page-maker/utils/rte-render-parity.test.ts +1 -1
- package/src/brand-page-maker/utils/rte-render.util.ts +6 -203
- package/src/brand-page-maker/utils/rte-sanitize.util.ts +3 -7
- package/src/brand-page-maker/validators/section-button.validator.ts +23 -19
- package/src/bundles/bundled-translations.de-DE.json +7 -18
- package/src/bundles/bundled-translations.es-ES.json +7 -18
- package/src/bundles/bundled-translations.fr-CA.json +7 -18
- package/src/bundles/bundled-translations.fr-FR.json +7 -18
- package/src/bundles/bundled-translations.json +8 -19
- package/src/bundles/bundled-translations.pt-BR.json +7 -18
- package/src/bundles/bundled-translations.pt-PT.json +7 -18
- package/src/composables/useTranslate.ts +1 -2
- package/src/metadata-builder/builders/section-builders/about-section-builder.ts +3 -5
- package/src/metadata-builder/builders/section-builders/banner-section-builder.ts +3 -5
- package/src/metadata-builder/builders/section-builders/booking-section-builder.ts +3 -5
- package/src/metadata-builder/builders/section-builders/contact-form-builder.ts +4 -7
- package/src/metadata-builder/builders/section-builders/images-section-builder.ts +3 -5
- package/src/metadata-builder/builders/section-builders/mailing-list-builder.ts +2 -3
- package/src/metadata-builder/builders/section-builders/mailing-list-section-builder.ts +2 -3
- package/src/metadata-builder/builders/section-builders/profile-section-builder.ts +7 -7
- package/src/metadata-builder/builders/section-builders/shapes-section-builder.ts +3 -5
- package/src/metadata-builder/builders/section-builders/testimonial-section-builder.ts +2 -3
- package/src/metadata-builder/builders/section-builders/text-section-builder.ts +56 -47
- package/src/metadata-builder/builders/section-field-utils.ts +6 -46
- package/src/metadata-builder/builders/section-rules/global-styles.rules.ts +5 -10
- package/src/metadata-builder/metadata-executor.ts +1 -18
- package/src/metadata-builder/parsers/ai-toolcall-parser.ts +6 -10
- package/src/metadata-builder/parsers/section-tool-arguments.ts +1 -11
- package/src/shared/color-palette/section-color-matches.test.ts +11 -15
- package/src/shared/color-palette/section-color-matches.ts +27 -8
- package/src/shared/color-strategies/rte-field-pairs.test.ts +5 -26
- package/src/shared/color-strategies/rte-field-pairs.ts +0 -30
- package/src/shared/content-settings/components/color-matches-panel/ColorMatchesPanel.test.ts +66 -43
- package/src/shared/content-settings/components/color-matches-panel/ColorMatchesPanel.vue +1 -7
- package/src/shared/content-settings/components/content-settings/ContentSettings.mixin.ts +48 -1
- package/src/shared/content-settings/components/content-settings-item/ContentSettingsItemField.mixin.ts +5 -26
- package/src/shared/content-settings/components/content-settings-item/ContentSettingsItemField.test.ts +1 -47
- package/src/shared/content-settings/components/focused-content-item-settings/FocusedContentItemSettings.mixin.ts +6 -0
- package/src/shared/content-settings/components/text-field/TextField.mixin.ts +15 -0
- package/src/shared/content-settings/components/text-items-field/TextItemsField.mixin.test.ts +1 -0
- package/src/shared/content-settings/components/text-style-field/TextStyleField.mixin.test.ts +25 -258
- package/src/shared/content-settings/components/text-style-field/TextStyleField.mixin.ts +57 -226
- package/src/shared/content-settings/components/text-style-field/TextStyleField.vue +16 -119
- package/src/shared/content-settings/components/text-style-field/i18n/text-style-field.de-DE.json +10 -15
- package/src/shared/content-settings/components/text-style-field/i18n/text-style-field.es-ES.json +10 -15
- package/src/shared/content-settings/components/text-style-field/i18n/text-style-field.fr-CA.json +10 -15
- package/src/shared/content-settings/components/text-style-field/i18n/text-style-field.fr-FR.json +10 -15
- package/src/shared/content-settings/components/text-style-field/i18n/text-style-field.json +1 -6
- package/src/shared/content-settings/components/text-style-field/i18n/text-style-field.pt-BR.json +10 -15
- package/src/shared/content-settings/components/text-style-field/i18n/text-style-field.pt-PT.json +10 -15
- package/src/shared/content-settings/components/url-field/UrlField.vue +1 -0
- package/src/shared/content-settings/store/content-settings-store.test.ts +5 -186
- package/src/shared/content-settings/store/content-settings-store.ts +16 -81
- package/src/shared/ecommerce-settings/util/refreshDuplicatedMetadata.ts +1 -1
- package/src/shared/navigation-style-settings/store/index.ts +8 -6
- package/src/shared/page-navigation/store/page-navigation-store.ts +16 -0
- package/src/shared/page-settings/components/header-settings-panel/HeaderSettingsPanel.button-section.test.ts +131 -0
- package/src/shared/page-settings/components/header-settings-panel/HeaderSettingsPanel.vue +65 -10
- package/src/shared/page-settings/components/page-settings-section-styles/HeaderButtonSettings.test.ts +305 -0
- package/src/shared/page-settings/components/page-settings-section-styles/HeaderButtonSettings.vue +265 -0
- package/src/shared/page-settings/components/page-settings-section-styles/HeaderDisplayStyle.test.ts +354 -0
- package/src/shared/page-settings/components/page-settings-section-styles/HeaderDisplayStyle.vue +48 -9
- package/src/shared/page-settings/components/page-settings-section-styles/PageSettingsSectionStyles.mixin.header-button.test.ts +114 -0
- package/src/shared/page-settings/components/page-settings-section-styles/PageSettingsSectionStyles.mixin.ts +38 -2
- package/src/shared/page-settings/components/page-settings-section-styles/i18n/page-settings-section.de-DE.json +6 -1
- package/src/shared/page-settings/components/page-settings-section-styles/i18n/page-settings-section.es-ES.json +6 -1
- package/src/shared/page-settings/components/page-settings-section-styles/i18n/page-settings-section.fr-CA.json +6 -1
- package/src/shared/page-settings/components/page-settings-section-styles/i18n/page-settings-section.fr-FR.json +6 -1
- package/src/shared/page-settings/components/page-settings-section-styles/i18n/page-settings-section.json +6 -1
- package/src/shared/page-settings/components/page-settings-section-styles/i18n/page-settings-section.pt-BR.json +6 -1
- package/src/shared/page-settings/components/page-settings-section-styles/i18n/page-settings-section.pt-PT.json +6 -1
- package/src/shared/page-settings/store/page-settings-store.ts +2 -0
- package/src/shared/style-settings/components/StyleSettings.vue +25 -29
- package/src/shared/style-settings/components/StyleSettingsSection.vue +8 -0
- package/src/shared/style-settings/components/i18n/style-settings.de-DE.json +20 -31
- package/src/shared/style-settings/components/i18n/style-settings.es-ES.json +20 -31
- package/src/shared/style-settings/components/i18n/style-settings.fr-CA.json +20 -31
- package/src/shared/style-settings/components/i18n/style-settings.fr-FR.json +20 -31
- package/src/shared/style-settings/components/i18n/style-settings.json +3 -12
- package/src/shared/style-settings/components/i18n/style-settings.pt-BR.json +20 -31
- package/src/shared/style-settings/components/i18n/style-settings.pt-PT.json +20 -31
- package/src/shared/style-settings/components/text-style-options-settings-with-state/TextStyleOptionsSettingsWithState.vue +34 -14
- package/src/shared/style-settings/store/style-settings-store.ts +4 -3
- package/src/tracker.ts +1 -2
- package/src/utils/minify-brand-page-metadata.test.ts +1 -1
- package/lib/src/brand-page/utils/migration/migration-22.d.ts +0 -135
- package/lib/src/brand-page/utils/migration/migration-22.js +0 -671
- package/lib/src/brand-page/utils/text-role-css.util.d.ts +0 -112
- package/lib/src/brand-page/utils/text-role-css.util.js +0 -262
- package/lib/src/brand-page-maker/composables/rich-text-editor/extensions/TextEffects.d.ts +0 -27
- package/lib/src/brand-page-maker/composables/rich-text-editor/extensions/TextEffects.js +0 -68
- package/lib/src/brand-page-maker/composables/rich-text-editor/keepMarksOnEmpty.d.ts +0 -20
- package/lib/src/brand-page-maker/composables/rich-text-editor/keepMarksOnEmpty.js +0 -60
- package/lib/src/brand-page-maker/utils/rte-authoring.util.d.ts +0 -2
- package/lib/src/brand-page-maker/utils/rte-authoring.util.js +0 -101
- package/lib/src/mockServiceWorker.js +0 -349
- package/src/brand-page/components/text-wrapper/TextWrapper.test.ts +0 -116
- package/src/brand-page/utils/migration/migration-22.test.ts +0 -1143
- package/src/brand-page/utils/migration/migration-22.ts +0 -1051
- package/src/brand-page/utils/text-role-css.util.test.ts +0 -268
- package/src/brand-page/utils/text-role-css.util.ts +0 -348
- package/src/brand-page/utils/text-style.util.test.ts +0 -200
- package/src/brand-page-maker/composables/rich-text-editor/block-typography.test.ts +0 -236
- package/src/brand-page-maker/composables/rich-text-editor/extensions/TextEffects.ts +0 -110
- package/src/brand-page-maker/composables/rich-text-editor/keepMarksOnEmpty.test.ts +0 -80
- package/src/brand-page-maker/composables/rich-text-editor/keepMarksOnEmpty.ts +0 -75
- package/src/brand-page-maker/models/content-settings.test.ts +0 -153
- package/src/brand-page-maker/utils/rte-authoring.util.test.ts +0 -244
- package/src/brand-page-maker/utils/rte-authoring.util.ts +0 -179
- package/src/brand-page-maker/utils/rte-render.util.test.ts +0 -226
- package/src/brand-page-maker/utils/rte-schema-version.test.ts +0 -102
- package/src/metadata-builder/builders/section-field-utils.test.ts +0 -54
package/lib/src/brand-page/components/navigation/navigation-side-menu/NavigationSideMenu.mixin.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { PropType } from 'vue';
|
|
2
2
|
import type { BrandPageContext, NavigationDesktop, NavigationMobile } from '../../../models';
|
|
3
|
-
import type { NavItemViewModel } from '../../../view-models';
|
|
3
|
+
import type { ButtonViewModel, NavItemViewModel } from '../../../view-models';
|
|
4
4
|
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
5
5
|
context: {
|
|
6
6
|
type: PropType<BrandPageContext>;
|
|
@@ -18,6 +18,11 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
18
18
|
type: PropType<NavigationDesktop | NavigationMobile>;
|
|
19
19
|
required: true;
|
|
20
20
|
};
|
|
21
|
+
headerButtonViewModel: {
|
|
22
|
+
type: PropType<ButtonViewModel>;
|
|
23
|
+
required: false;
|
|
24
|
+
default: undefined;
|
|
25
|
+
};
|
|
21
26
|
}>, {}, {
|
|
22
27
|
expandedItems: Record<string, boolean>;
|
|
23
28
|
}, {
|
|
@@ -27,12 +32,14 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
27
32
|
selectedButtonStyle(): BrandPageCssStyle;
|
|
28
33
|
defaultWrapperStyle(): BrandPageCssStyle;
|
|
29
34
|
selectedWrapperStyle(): BrandPageCssStyle;
|
|
35
|
+
showHeaderButton(): boolean;
|
|
30
36
|
routes(): any[];
|
|
31
37
|
}, {
|
|
32
38
|
filterHiddenNavItems(navItems: NavItemViewModel[]): NavItemViewModel[];
|
|
33
39
|
isCurrentPage(navItem: NavItemViewModel): boolean;
|
|
34
40
|
getSubNavItemStyle(navItem: NavItemViewModel): BrandPageCssStyle;
|
|
35
41
|
closeSideMenu(): void;
|
|
42
|
+
onSideMenuCtaClick(event: MouseEvent): void;
|
|
36
43
|
toggleExpanded(pageId: string): void;
|
|
37
44
|
isExpanded(pageId: string): boolean;
|
|
38
45
|
expandSubPageIfCurrentPage(): void;
|
|
@@ -53,7 +60,14 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
53
60
|
type: PropType<NavigationDesktop | NavigationMobile>;
|
|
54
61
|
required: true;
|
|
55
62
|
};
|
|
63
|
+
headerButtonViewModel: {
|
|
64
|
+
type: PropType<ButtonViewModel>;
|
|
65
|
+
required: false;
|
|
66
|
+
default: undefined;
|
|
67
|
+
};
|
|
56
68
|
}>> & Readonly<{
|
|
57
69
|
"onClose-side-menu"?: ((...args: any[]) => any) | undefined;
|
|
58
|
-
}>, {
|
|
70
|
+
}>, {
|
|
71
|
+
headerButtonViewModel: ButtonViewModel;
|
|
72
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
59
73
|
export default _default;
|
package/lib/src/brand-page/components/navigation/navigation-side-menu/NavigationSideMenu.mixin.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { defineComponent } from 'vue';
|
|
2
2
|
import { resolveSubNavItemBackgroundColor } from '../../../models';
|
|
3
|
+
import { guardPreviewClick } from '../../../utils/context.util';
|
|
3
4
|
export default defineComponent({
|
|
4
5
|
props: {
|
|
5
6
|
context: {
|
|
@@ -18,6 +19,13 @@ export default defineComponent({
|
|
|
18
19
|
type: Object,
|
|
19
20
|
required: true,
|
|
20
21
|
},
|
|
22
|
+
// Provided only when the header row does not render the CTA (the caller
|
|
23
|
+
// decides via headerRowRendersCta) — absent means the side menu shows none.
|
|
24
|
+
headerButtonViewModel: {
|
|
25
|
+
type: Object,
|
|
26
|
+
required: false,
|
|
27
|
+
default: undefined,
|
|
28
|
+
},
|
|
21
29
|
},
|
|
22
30
|
emits: ['close-side-menu'],
|
|
23
31
|
data() {
|
|
@@ -50,6 +58,9 @@ export default defineComponent({
|
|
|
50
58
|
const { fontSize: _fontSize, lineHeight: _lineHeight, letterSpacing: _letterSpacing, ...rest } = this.selectedButtonStyle;
|
|
51
59
|
return rest;
|
|
52
60
|
},
|
|
61
|
+
showHeaderButton() {
|
|
62
|
+
return Boolean(this.headerButtonViewModel);
|
|
63
|
+
},
|
|
53
64
|
routes() {
|
|
54
65
|
return this.visibleNavItems.map((navItem, _i) => {
|
|
55
66
|
return {
|
|
@@ -85,6 +96,12 @@ export default defineComponent({
|
|
|
85
96
|
closeSideMenu() {
|
|
86
97
|
this.$emit('close-side-menu');
|
|
87
98
|
},
|
|
99
|
+
// Preview: inert; published: follow the link and close the side menu behind it.
|
|
100
|
+
onSideMenuCtaClick(event) {
|
|
101
|
+
if (!guardPreviewClick(event, this.context)) {
|
|
102
|
+
this.closeSideMenu();
|
|
103
|
+
}
|
|
104
|
+
},
|
|
88
105
|
toggleExpanded(pageId) {
|
|
89
106
|
const isCurrentlyExpanded = this.expandedItems[pageId];
|
|
90
107
|
this.expandedItems = {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { PropType } from 'vue';
|
|
2
|
-
import type { BrandPageViewModel, ContentViewModel, PageViewModel } from '@brand-page/view-models';
|
|
2
|
+
import type { BrandPageViewModel, ButtonViewModel, ContentViewModel, PageViewModel } from '@brand-page/view-models';
|
|
3
3
|
import type { BackgroundShape, BrandPageContext, ViewportsType } from '@brand-page/models';
|
|
4
4
|
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
5
5
|
context: {
|
|
@@ -54,7 +54,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
54
54
|
}, {
|
|
55
55
|
brandPageToken(): string | null;
|
|
56
56
|
paletteStyleHtml(): string;
|
|
57
|
-
textRoleStyleHtml(): string;
|
|
58
57
|
pageScopeAttrs(): Record<string, string | undefined>;
|
|
59
58
|
contents(): ContentViewModel[];
|
|
60
59
|
/**
|
|
@@ -82,6 +81,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
82
81
|
headerViewModelDesktop(): any;
|
|
83
82
|
isNavigationEmbeddedInLogoMobile(): boolean;
|
|
84
83
|
isNavigationEmbeddedInLogoDesktop(): boolean;
|
|
84
|
+
sideMenuHeaderButtonViewModel(): ButtonViewModel | undefined;
|
|
85
85
|
shouldShowNavigation(): boolean;
|
|
86
86
|
showNavigationAfterLogoMobile(): boolean;
|
|
87
87
|
showNavigationAfterLogoDesktop(): boolean;
|
|
@@ -168,7 +168,5 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
168
168
|
isContentSelected: boolean;
|
|
169
169
|
isHeaderSelected: boolean;
|
|
170
170
|
isFooterSelected: boolean;
|
|
171
|
-
}, {}, {}, {}, string, ()
|
|
172
|
-
[x: symbol]: import("vue").ComputedRef<any>;
|
|
173
|
-
}, true, {}, any>;
|
|
171
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
174
172
|
export default _default;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { DEFAULT_FONT_FAMILY_KEY, FALLBACK_FONT_FAMILIES, FONT_FAMILY_CONFIGS, } from '../../constants';
|
|
3
|
-
import { getSlugFromContext, getPageHeadingText, buildPaletteRootCss, buildPaletteScopedCss,
|
|
4
|
-
import { findNavItemByRelativePath } from '@brand-page/utils/route.util';
|
|
1
|
+
import { defineComponent } from 'vue';
|
|
2
|
+
import { DEFAULT_FONT_FAMILY_KEY, FALLBACK_FONT_FAMILIES, FONT_FAMILY_CONFIGS, headerRowRendersCta, } from '../../constants';
|
|
3
|
+
import { getSlugFromContext, getPageHeadingText, buildPaletteRootCss, buildPaletteScopedCss, PAGE_SCOPE_ID_ATTRIBUTE, resolveColorReference, } from '@brand-page/utils';
|
|
4
|
+
import { findNavItemByRelativePath, hasVisibleNavigation, } from '@brand-page/utils/route.util';
|
|
5
5
|
import { BRAND_PAGE_TYPES } from '@brand-page/models';
|
|
6
6
|
import { hasProfileContent as checkHasProfileContent } from '@brand-page/utils/vcard.util';
|
|
7
7
|
// Per-instance id for a `Page` instance. Deliberately generic — any per-instance
|
|
@@ -72,15 +72,6 @@ export default defineComponent({
|
|
|
72
72
|
}),
|
|
73
73
|
};
|
|
74
74
|
},
|
|
75
|
-
// BP-5969: expose the live role options to every descendant TextWrapper so it can
|
|
76
|
-
// inline only its overrides and leave the role typography to the CSS class. A computed
|
|
77
|
-
// keeps it reactive (a role edit repaints), and `this` is the instance in Options-API
|
|
78
|
-
// provide(). Descendants that render outside a Page get `undefined` and bake inline.
|
|
79
|
-
provide() {
|
|
80
|
-
return {
|
|
81
|
-
[TEXT_ROLE_OPTIONS_KEY]: computed(() => this.viewModel?.styles?.textStyles?.textStyleOptions),
|
|
82
|
-
};
|
|
83
|
-
},
|
|
84
75
|
data() {
|
|
85
76
|
return {
|
|
86
77
|
isSideMenuOpen: false,
|
|
@@ -104,17 +95,6 @@ export default defineComponent({
|
|
|
104
95
|
? buildPaletteScopedCss(colors, this.pageScopeId)
|
|
105
96
|
: buildPaletteRootCss(colors);
|
|
106
97
|
},
|
|
107
|
-
// BP-5969: the global text roles as a page-scoped <style> of CSS classes
|
|
108
|
-
// (design-token render). Same root/scoped split as the palette above: a role
|
|
109
|
-
// edit is one CSS-rule change that repaints every block carrying the role class.
|
|
110
|
-
textRoleStyleHtml() {
|
|
111
|
-
const options = this.viewModel?.styles?.textStyles?.textStyleOptions;
|
|
112
|
-
if (!options)
|
|
113
|
-
return '';
|
|
114
|
-
return this.context?.isTemplate
|
|
115
|
-
? buildTextRoleScopedCss(options, this.pageScopeId)
|
|
116
|
-
: buildTextRoleRootCss(options);
|
|
117
|
-
},
|
|
118
98
|
// Spread onto EVERY top-level node of Page's fragment (template mode only).
|
|
119
99
|
// The root-background/overlay siblings paint values that can hold
|
|
120
100
|
// `var(--palette-…)`, and a custom property applies to its own node too.
|
|
@@ -181,10 +161,13 @@ export default defineComponent({
|
|
|
181
161
|
...this.viewModel?.styles?.backgroundStylesViewModel?.style,
|
|
182
162
|
};
|
|
183
163
|
}
|
|
184
|
-
//
|
|
185
|
-
//
|
|
186
|
-
|
|
187
|
-
|
|
164
|
+
// The page base coat — anything with no colour of its own inherits this
|
|
165
|
+
// (RTE text, form controls, SVG `currentColor` fills).
|
|
166
|
+
const baseTextColour = this.viewModel?.styles?.textStyles?.textStyleOptions?.paragraphs?.style
|
|
167
|
+
?.color;
|
|
168
|
+
if (baseTextColour) {
|
|
169
|
+
styles.color = baseTextColour;
|
|
170
|
+
}
|
|
188
171
|
const textFontFamilyKey = this.viewModel.styles?.textStyles.textFontFamily ||
|
|
189
172
|
DEFAULT_FONT_FAMILY_KEY;
|
|
190
173
|
const textFontFamilyConfig = FONT_FAMILY_CONFIGS[textFontFamilyKey];
|
|
@@ -293,12 +276,17 @@ export default defineComponent({
|
|
|
293
276
|
this.contents[0]?.type === 'logo' &&
|
|
294
277
|
this.viewModel.pages.length > 1);
|
|
295
278
|
},
|
|
279
|
+
// The button shows in the header row OR in the side menu, never both. This gives it to the side menu when the header doesn't show it; undefined = no button in the menu.
|
|
280
|
+
sideMenuHeaderButtonViewModel() {
|
|
281
|
+
const header = this.viewModel.headerViewModelMobile;
|
|
282
|
+
if (!header.headerButtonViewModel ||
|
|
283
|
+
headerRowRendersCta(header.displayStyle, this.shouldShowNavigation)) {
|
|
284
|
+
return undefined;
|
|
285
|
+
}
|
|
286
|
+
return header.headerButtonViewModel;
|
|
287
|
+
},
|
|
296
288
|
shouldShowNavigation() {
|
|
297
|
-
|
|
298
|
-
const visibleNavItems = this.context.nav.navItems.filter((item) => !item.isHidden);
|
|
299
|
-
return (visibleNavItems.length > 1 ||
|
|
300
|
-
(visibleNavItems.length === 1 &&
|
|
301
|
-
visibleNavItems[0].nestedNavItems.some((item) => !item.isHidden)));
|
|
289
|
+
return hasVisibleNavigation(this.context.nav.navItems);
|
|
302
290
|
},
|
|
303
291
|
showNavigationAfterLogoMobile() {
|
|
304
292
|
return (!this.context.isBrandSite &&
|
|
@@ -36,6 +36,7 @@ const Template = (args) => ({
|
|
|
36
36
|
nav-id="nav-1"
|
|
37
37
|
:show-nav="args.showNav"
|
|
38
38
|
:display-style="args.displayStyle"
|
|
39
|
+
:has-cta="args.hasCta"
|
|
39
40
|
logo-width="100px"
|
|
40
41
|
>
|
|
41
42
|
<template v-slot:logo>
|
|
@@ -44,6 +45,9 @@ const Template = (args) => ({
|
|
|
44
45
|
<template v-slot:nav>
|
|
45
46
|
<div style="border: 1px solid red; display: inline-block;">Nav | Nav | Nav | Nav | Nav | Nav | Nav | Nav</div>
|
|
46
47
|
</template>
|
|
48
|
+
<template v-slot:cta>
|
|
49
|
+
<div style="border: 1px solid green; display: inline-block; padding: 8px 16px;">Contact Us</div>
|
|
50
|
+
</template>
|
|
47
51
|
</HeaderLayout>
|
|
48
52
|
</div>
|
|
49
53
|
`,
|
|
@@ -52,3 +56,8 @@ export const Sample = Template.bind({});
|
|
|
52
56
|
Sample.args = {
|
|
53
57
|
displayStyle: HEADER_DISPLAY.DESKTOP_TAB_5,
|
|
54
58
|
};
|
|
59
|
+
export const WithHeaderButton = Template.bind({});
|
|
60
|
+
WithHeaderButton.args = {
|
|
61
|
+
displayStyle: HEADER_DISPLAY.DESKTOP_TAB_1,
|
|
62
|
+
hasCta: true,
|
|
63
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { PropType } from 'vue';
|
|
2
2
|
import type { BrandPageContext } from '@brand-page/models';
|
|
3
|
-
import type { PageHeaderViewModel } from '@brand-page/view-models';
|
|
3
|
+
import type { ButtonViewModel, PageHeaderViewModel } from '@brand-page/view-models';
|
|
4
4
|
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
5
5
|
navId: {
|
|
6
6
|
type: StringConstructor;
|
|
@@ -23,9 +23,11 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
23
23
|
LOGO_SLIDER_DESKTOP_MAX: number;
|
|
24
24
|
}, {
|
|
25
25
|
containerCss(): BrandPageCssStyle;
|
|
26
|
+
headerButtonViewModel(): ButtonViewModel | undefined;
|
|
26
27
|
showNav(): boolean;
|
|
27
28
|
}, {
|
|
28
29
|
onHeaderContainerClick(): void;
|
|
30
|
+
onHeaderCtaClick(event: MouseEvent): void;
|
|
29
31
|
}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "header-container-click"[], "header-container-click", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
30
32
|
navId: {
|
|
31
33
|
type: StringConstructor;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { defineComponent } from 'vue';
|
|
2
2
|
import { LOGO_SLIDER_DESKTOP_MAX } from '../../constants';
|
|
3
|
+
import { hasVisibleNavigation } from '../../utils/route.util';
|
|
4
|
+
import { guardPreviewClick } from '../../utils/context.util';
|
|
3
5
|
export default defineComponent({
|
|
4
6
|
props: {
|
|
5
7
|
navId: {
|
|
@@ -33,11 +35,11 @@ export default defineComponent({
|
|
|
33
35
|
padding: '1.5rem 0', // var(--page-padding) 0
|
|
34
36
|
};
|
|
35
37
|
},
|
|
38
|
+
headerButtonViewModel() {
|
|
39
|
+
return this.viewModel.headerButtonViewModel;
|
|
40
|
+
},
|
|
36
41
|
showNav() {
|
|
37
|
-
|
|
38
|
-
return (visibleNavItems.length > 1 ||
|
|
39
|
-
(visibleNavItems.length === 1 &&
|
|
40
|
-
visibleNavItems[0].nestedNavItems.some((item) => !item.isHidden)));
|
|
42
|
+
return hasVisibleNavigation(this.context.nav.navItems);
|
|
41
43
|
},
|
|
42
44
|
},
|
|
43
45
|
emits: ['header-container-click'],
|
|
@@ -45,5 +47,9 @@ export default defineComponent({
|
|
|
45
47
|
onHeaderContainerClick() {
|
|
46
48
|
this.$emit('header-container-click');
|
|
47
49
|
},
|
|
50
|
+
// Preview only: deliberately inert — no link-follow, no Header Settings open.
|
|
51
|
+
onHeaderCtaClick(event) {
|
|
52
|
+
guardPreviewClick(event, this.context);
|
|
53
|
+
},
|
|
48
54
|
},
|
|
49
55
|
});
|
|
@@ -12,7 +12,12 @@ const BPviewModel = {
|
|
|
12
12
|
textItems: [],
|
|
13
13
|
type: 'text',
|
|
14
14
|
textStyle: {
|
|
15
|
+
fontSize: '1rem',
|
|
16
|
+
lineHeight: '1.5rem',
|
|
17
|
+
fontFamily: 'Lato',
|
|
15
18
|
textAlign: 'left',
|
|
19
|
+
overflowWrap: 'anywhere',
|
|
20
|
+
wordBreak: 'normal',
|
|
16
21
|
},
|
|
17
22
|
columnStyle: '1',
|
|
18
23
|
backgroundColor: {},
|
|
@@ -29,6 +34,7 @@ const BSviewModel = {
|
|
|
29
34
|
id: 'text-item-1',
|
|
30
35
|
text: 'lorem ipsum',
|
|
31
36
|
textStyle: {
|
|
37
|
+
fontSize: '1rem',
|
|
32
38
|
textAlign: 'left',
|
|
33
39
|
textStyleType: 'paragraphs',
|
|
34
40
|
},
|
|
@@ -37,6 +43,7 @@ const BSviewModel = {
|
|
|
37
43
|
id: 'text-item-2',
|
|
38
44
|
text: 'lorem ipsum',
|
|
39
45
|
textStyle: {
|
|
46
|
+
fontSize: '1rem',
|
|
40
47
|
textAlign: 'left',
|
|
41
48
|
textStyleType: 'paragraphs',
|
|
42
49
|
},
|
|
@@ -44,7 +51,12 @@ const BSviewModel = {
|
|
|
44
51
|
],
|
|
45
52
|
type: 'text',
|
|
46
53
|
textStyle: {
|
|
54
|
+
fontSize: '1rem',
|
|
55
|
+
lineHeight: '1.5rem',
|
|
56
|
+
fontFamily: 'Lato',
|
|
47
57
|
textAlign: 'left',
|
|
58
|
+
overflowWrap: 'anywhere',
|
|
59
|
+
wordBreak: 'normal',
|
|
48
60
|
},
|
|
49
61
|
columnStyle: '2',
|
|
50
62
|
backgroundColor: {},
|
|
@@ -59,7 +71,12 @@ const BSEmptyTextItem = {
|
|
|
59
71
|
textItems: [],
|
|
60
72
|
type: 'text',
|
|
61
73
|
textStyle: {
|
|
74
|
+
fontSize: '1rem',
|
|
75
|
+
lineHeight: '1.5rem',
|
|
76
|
+
fontFamily: 'Lato',
|
|
62
77
|
textAlign: 'left',
|
|
78
|
+
overflowWrap: 'anywhere',
|
|
79
|
+
wordBreak: 'normal',
|
|
63
80
|
},
|
|
64
81
|
columnStyle: '1',
|
|
65
82
|
backgroundColor: {},
|
|
@@ -2,16 +2,6 @@ export declare const DISPLAY_TEXT_TITLE = "Titles";
|
|
|
2
2
|
export declare const DISPLAY_TEXT_HEADINGS = "Headings";
|
|
3
3
|
export declare const DISPLAY_TEXT_BODY = "Paragraphs";
|
|
4
4
|
export declare const DISPlAY_TEXT_BUTTONS = "Button Texts";
|
|
5
|
-
export declare const DISPLAY_TEXT_HEADING_1 = "Heading 1";
|
|
6
|
-
export declare const DISPLAY_TEXT_HEADING_2 = "Heading 2";
|
|
7
|
-
export declare const DISPLAY_TEXT_HEADING_3 = "Heading 3";
|
|
8
|
-
export declare const DISPLAY_TEXT_HEADING_4 = "Heading 4";
|
|
9
|
-
export declare const DISPLAY_TEXT_HEADING_5 = "Heading 5";
|
|
10
|
-
export declare const DISPLAY_TEXT_HEADING_6 = "Heading 6";
|
|
11
|
-
export declare const DISPLAY_TEXT_PARAGRAPH_1 = "Paragraph 1";
|
|
12
|
-
export declare const DISPLAY_TEXT_PARAGRAPH_2 = "Paragraph 2";
|
|
13
|
-
export declare const DISPLAY_TEXT_PARAGRAPH_3 = "Paragraph 3";
|
|
14
|
-
export declare const DISPLAY_TEXT_BUTTON = "Button";
|
|
15
5
|
export declare const DEFAULT_TEXT_DECORATION: undefined;
|
|
16
6
|
export declare const DEFAULT_FONT_STYLE: undefined;
|
|
17
7
|
export declare const FONT_SIZE_TITLE = "2.25em";
|
|
@@ -23,58 +13,6 @@ export declare const FONT_WEIGHT_NORMAL = "normal";
|
|
|
23
13
|
export declare const LINE_HEIGHT_TITLE = "1.3";
|
|
24
14
|
export declare const LINE_HEIGHT_HEADINGS = "1.4";
|
|
25
15
|
export declare const LINE_HEIGHT_BODY = "1.5";
|
|
26
|
-
export declare const TEXT_ROLE_STYLE_DEFAULTS: {
|
|
27
|
-
readonly heading1: {
|
|
28
|
-
readonly fontSize: "6.875em";
|
|
29
|
-
readonly fontWeight: "bold";
|
|
30
|
-
readonly lineHeight: "1.2";
|
|
31
|
-
};
|
|
32
|
-
readonly heading2: {
|
|
33
|
-
readonly fontSize: "5.25em";
|
|
34
|
-
readonly fontWeight: "bold";
|
|
35
|
-
readonly lineHeight: "1.2";
|
|
36
|
-
};
|
|
37
|
-
readonly heading3: {
|
|
38
|
-
readonly fontSize: "3.1875em";
|
|
39
|
-
readonly fontWeight: "bold";
|
|
40
|
-
readonly lineHeight: "1.25";
|
|
41
|
-
};
|
|
42
|
-
readonly heading4: {
|
|
43
|
-
readonly fontSize: "2.1875em";
|
|
44
|
-
readonly fontWeight: "bold";
|
|
45
|
-
readonly lineHeight: "1.3";
|
|
46
|
-
};
|
|
47
|
-
readonly heading5: {
|
|
48
|
-
readonly fontSize: "1.4375em";
|
|
49
|
-
readonly fontWeight: "bold";
|
|
50
|
-
readonly lineHeight: "1.35";
|
|
51
|
-
};
|
|
52
|
-
readonly heading6: {
|
|
53
|
-
readonly fontSize: "1em";
|
|
54
|
-
readonly fontWeight: "bold";
|
|
55
|
-
readonly lineHeight: "1.4";
|
|
56
|
-
};
|
|
57
|
-
readonly paragraph1: {
|
|
58
|
-
readonly fontSize: "1.375em";
|
|
59
|
-
readonly fontWeight: "normal";
|
|
60
|
-
readonly lineHeight: "1.5";
|
|
61
|
-
};
|
|
62
|
-
readonly paragraph2: {
|
|
63
|
-
readonly fontSize: "1.125em";
|
|
64
|
-
readonly fontWeight: "normal";
|
|
65
|
-
readonly lineHeight: "1.5";
|
|
66
|
-
};
|
|
67
|
-
readonly paragraph3: {
|
|
68
|
-
readonly fontSize: "0.875em";
|
|
69
|
-
readonly fontWeight: "normal";
|
|
70
|
-
readonly lineHeight: "1.6";
|
|
71
|
-
};
|
|
72
|
-
readonly button: {
|
|
73
|
-
readonly fontSize: "1em";
|
|
74
|
-
readonly fontWeight: "normal";
|
|
75
|
-
readonly lineHeight: "1.2";
|
|
76
|
-
};
|
|
77
|
-
};
|
|
78
16
|
export declare const DEFAULT_FONT_SIZE = 12;
|
|
79
17
|
export declare const MIN_TEXT_SIZE_PX = 12;
|
|
80
18
|
export declare const MAX_TEXT_SIZE_PX = 128;
|
|
@@ -3,18 +3,6 @@ export const DISPLAY_TEXT_TITLE = 'Titles';
|
|
|
3
3
|
export const DISPLAY_TEXT_HEADINGS = 'Headings';
|
|
4
4
|
export const DISPLAY_TEXT_BODY = 'Paragraphs';
|
|
5
5
|
export const DISPlAY_TEXT_BUTTONS = 'Button Texts';
|
|
6
|
-
// BP-5969 — display names for the 10 global text roles (English fallback; the
|
|
7
|
-
// panel/picker use i18n `styleSettingsTr(<role>)`, these back it up).
|
|
8
|
-
export const DISPLAY_TEXT_HEADING_1 = 'Heading 1';
|
|
9
|
-
export const DISPLAY_TEXT_HEADING_2 = 'Heading 2';
|
|
10
|
-
export const DISPLAY_TEXT_HEADING_3 = 'Heading 3';
|
|
11
|
-
export const DISPLAY_TEXT_HEADING_4 = 'Heading 4';
|
|
12
|
-
export const DISPLAY_TEXT_HEADING_5 = 'Heading 5';
|
|
13
|
-
export const DISPLAY_TEXT_HEADING_6 = 'Heading 6';
|
|
14
|
-
export const DISPLAY_TEXT_PARAGRAPH_1 = 'Paragraph 1';
|
|
15
|
-
export const DISPLAY_TEXT_PARAGRAPH_2 = 'Paragraph 2';
|
|
16
|
-
export const DISPLAY_TEXT_PARAGRAPH_3 = 'Paragraph 3';
|
|
17
|
-
export const DISPLAY_TEXT_BUTTON = 'Button';
|
|
18
6
|
export const DEFAULT_TEXT_DECORATION = undefined;
|
|
19
7
|
export const DEFAULT_FONT_STYLE = undefined;
|
|
20
8
|
export const FONT_SIZE_TITLE = '2.25em';
|
|
@@ -26,29 +14,6 @@ export const FONT_WEIGHT_NORMAL = 'normal';
|
|
|
26
14
|
export const LINE_HEIGHT_TITLE = '1.3';
|
|
27
15
|
export const LINE_HEIGHT_HEADINGS = '1.4';
|
|
28
16
|
export const LINE_HEIGHT_BODY = '1.5';
|
|
29
|
-
// BP-5969 — §4 default typography for the 10 global text roles. Sizes in `em`
|
|
30
|
-
// (relative to the 16px root). Weights/letter-spacing are new: the legacy 4
|
|
31
|
-
// roles carried none, so these apply to new sites only — existing sites keep
|
|
32
|
-
// their persisted role definitions (migration-22 preserves appearance).
|
|
33
|
-
// Weight is strictly binary (BP-5969): headings default `bold`, body + button
|
|
34
|
-
// `normal`. No semibold tier — the RTE exposes only a normal/bold toggle, so the
|
|
35
|
-
// role defaults use the same `bold`/`normal` keywords that toggle (and every weight
|
|
36
|
-
// reader) speaks, not numeric weights.
|
|
37
|
-
//
|
|
38
|
-
// Sizes are a display scale in em @ 16px root; the px each em resolves to is noted
|
|
39
|
-
// inline. Headings anchor H1 110px → H6 16px; body runs 22/18/14; button stays 16px.
|
|
40
|
-
export const TEXT_ROLE_STYLE_DEFAULTS = {
|
|
41
|
-
heading1: { fontSize: '6.875em', fontWeight: 'bold', lineHeight: '1.2' }, // 110px
|
|
42
|
-
heading2: { fontSize: '5.25em', fontWeight: 'bold', lineHeight: '1.2' }, // 84px
|
|
43
|
-
heading3: { fontSize: '3.1875em', fontWeight: 'bold', lineHeight: '1.25' }, // 51px
|
|
44
|
-
heading4: { fontSize: '2.1875em', fontWeight: 'bold', lineHeight: '1.3' }, // 35px
|
|
45
|
-
heading5: { fontSize: '1.4375em', fontWeight: 'bold', lineHeight: '1.35' }, // 23px
|
|
46
|
-
heading6: { fontSize: '1em', fontWeight: 'bold', lineHeight: '1.4' }, // 16px
|
|
47
|
-
paragraph1: { fontSize: '1.375em', fontWeight: 'normal', lineHeight: '1.5' }, // 22px
|
|
48
|
-
paragraph2: { fontSize: '1.125em', fontWeight: 'normal', lineHeight: '1.5' }, // 18px
|
|
49
|
-
paragraph3: { fontSize: '0.875em', fontWeight: 'normal', lineHeight: '1.6' }, // 14px
|
|
50
|
-
button: { fontSize: '1em', fontWeight: 'normal', lineHeight: '1.2' }, // 16px
|
|
51
|
-
};
|
|
52
17
|
export const DEFAULT_FONT_SIZE = 12;
|
|
53
18
|
export const MIN_TEXT_SIZE_PX = 12;
|
|
54
19
|
export const MAX_TEXT_SIZE_PX = 128;
|
|
@@ -42,6 +42,9 @@ interface HeaderDisplayStyleConfig {
|
|
|
42
42
|
supportLogo: boolean;
|
|
43
43
|
supportedNavTypes: string[];
|
|
44
44
|
option: ButtonGroupOption;
|
|
45
|
+
withButtonIconName?: string;
|
|
45
46
|
}
|
|
46
47
|
export declare const HEADER_DISPLAY_STYLE_CONFIGS: HeaderDisplayStyleConfig[];
|
|
48
|
+
/** True when the header row shows the button; mobile hamburger styles put it in the side menu instead (unless the nav is hidden — then there is no side menu). */
|
|
49
|
+
export declare const headerRowRendersCta: (displayStyle: string, showNav: boolean) => boolean;
|
|
47
50
|
export {};
|