@designcrowd/library.brand-page 6.2.0 → 6.2.2-live-preview-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-VQCQvlMg.js → CreatedOnBrandCrowd-de-de-Cn0M-eZ1.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-en-us-DSf3BjCG.js → CreatedOnBrandCrowd-en-us-DRLMSDZr.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-es-es-DGcdM9Ec.js → CreatedOnBrandCrowd-es-es-BglTu73U.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-fr-fr-C9g1fc39.js → CreatedOnBrandCrowd-fr-ca-Bj6YZ_el.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-fr-ca-C9g1fc39.js → CreatedOnBrandCrowd-fr-fr-Bj6YZ_el.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-pt-pt-DSXr7Bxl.js → CreatedOnBrandCrowd-pt-br-DEoOmQ1F.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-pt-br-DSXr7Bxl.js → CreatedOnBrandCrowd-pt-pt-DEoOmQ1F.js} +1 -1
- package/lib/src/{CreatedOnDcom-de-de-BPdCL6wS.js → CreatedOnDcom-de-de-BZ7gTt4Z.js} +1 -1
- package/lib/src/{CreatedOnDcom-en-us-CLkSTQRu.js → CreatedOnDcom-en-us-CD6Km5sH.js} +1 -1
- package/lib/src/{CreatedOnDcom-es-es-CRknMAGv.js → CreatedOnDcom-es-es-CNpZHvEl.js} +1 -1
- package/lib/src/{CreatedOnDcom-fr-ca-ClAY_dHI.js → CreatedOnDcom-fr-ca-URS-ydJ1.js} +1 -1
- package/lib/src/{CreatedOnDcom-fr-fr-DQtv9rR-.js → CreatedOnDcom-fr-fr-D2AVeA3H.js} +1 -1
- package/lib/src/{CreatedOnDcom-pt-br-BbIxvmxv.js → CreatedOnDcom-pt-br-C32frnFs.js} +1 -1
- package/lib/src/{CreatedOnDcom-pt-pt-BOfOesBj.js → CreatedOnDcom-pt-pt-TDYGjRXS.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 +2 -1
- package/lib/src/brand-page/components/page/Page.mixin.js +12 -7
- 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/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/brand-page-context.model.d.ts +0 -2
- package/lib/src/brand-page/models/brand-page-context.model.js +0 -12
- package/lib/src/brand-page/models/index.d.ts +12 -0
- package/lib/src/brand-page/models/index.js +4 -0
- 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/route.util.d.ts +1 -0
- package/lib/src/brand-page/utils/route.util.js +9 -0
- package/lib/src/brand-page/utils/view-model.util.js +53 -1
- package/lib/src/brand-page/view-models.d.ts +3 -1
- package/lib/src/brand-page-maker/components/action-bar/ActionBar.mixin.d.ts +0 -1
- package/lib/src/brand-page-maker/components/action-bar/ActionBar.mixin.js +0 -9
- package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.d.ts +9 -44
- package/lib/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.d.ts +8 -43
- package/lib/src/brand-page-maker/components/preview/Preview.mixin.d.ts +0 -14
- package/lib/src/brand-page-maker/components/quick-link-bar/QuickLinkBar.mixin.d.ts +0 -42
- package/lib/src/brand-page-maker/components/seo-settings/SeoPageSettings.mixin.d.ts +0 -42
- package/lib/src/brand-page-maker/components/seo-settings/UrlSettings.mixin.d.ts +0 -42
- package/lib/src/brand-page-maker/components/seo-settings/UseExistingDomainModal.mixin.d.ts +0 -42
- package/lib/src/brand-page-maker/components/template-preview/TemplatePreview.mixin.d.ts +0 -42
- package/lib/src/brand-page-maker/components/upgrade-to-premium-button/UpgradeToPremiumButton.mixin.d.ts +0 -42
- package/lib/src/brand-page-maker/composables/useEventTracker.d.ts +3 -0
- package/lib/src/brand-page-maker/composables/useEventTracker.js +10 -0
- package/lib/src/brand-page-maker/stores/ai-checkpoint/ai-checkpoint-store.d.ts +1626 -0
- package/lib/src/brand-page-maker/stores/brandpage-container/brand-page-container-store.d.ts +0 -42
- package/lib/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.js +2 -4
- 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-B2q5GWTQ.js → bundled-translations-BYUfWBT3.js} +17 -17
- package/lib/src/{bundled-translations.de-DE-FhH2H_rd.js → bundled-translations.de-DE-MmzUu1tt.js} +21 -21
- package/lib/src/{bundled-translations.es-ES-_ZExxMi7.js → bundled-translations.es-ES-D-tG33XL.js} +5 -5
- package/lib/src/{bundled-translations.fr-CA-Tg-ODIiC.js → bundled-translations.fr-CA-CNc1H1h3.js} +1 -1
- package/lib/src/{bundled-translations.fr-FR-C0sU51Mz.js → bundled-translations.fr-FR-DX0-yepT.js} +9 -9
- package/lib/src/{bundled-translations.pt-BR-MYFIhA4u.js → bundled-translations.pt-BR-ih1-LRgy.js} +9 -9
- package/lib/src/{bundled-translations.pt-PT-DeUBSzCB.js → bundled-translations.pt-PT-Dq2CmD1p.js} +22 -22
- package/lib/src/bundles/bundled-translations.de-DE.json +9 -2
- package/lib/src/bundles/bundled-translations.es-ES.json +9 -2
- package/lib/src/bundles/bundled-translations.fr-CA.json +9 -2
- package/lib/src/bundles/bundled-translations.fr-FR.json +9 -2
- package/lib/src/bundles/bundled-translations.json +9 -2
- package/lib/src/bundles/bundled-translations.pt-BR.json +9 -2
- package/lib/src/bundles/bundled-translations.pt-PT.json +9 -2
- 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 +577 -139
- package/lib/src/css/library.brand-page-brandPage.min.css +577 -139
- package/lib/src/css/library.brand-page-designCom.min.css +577 -139
- package/lib/src/css/library.brand-page-preview.min.css +577 -139
- package/lib/src/index.mjs +2 -2
- package/lib/src/{lib-BMVF4uNy.js → lib-Dm9AuOJL.js} +22487 -21900
- package/lib/src/metadata-builder/builders/item-id-utils.d.ts +2 -0
- package/lib/src/metadata-builder/builders/item-id-utils.js +8 -2
- package/lib/src/shared/content-settings/components/content-settings/ContentSettings.mixin.d.ts +10 -2
- package/lib/src/shared/content-settings/components/content-settings/ReplaceImageSettingsForContent.mixin.d.ts +7 -1
- package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItem.mixin.d.ts +1 -0
- package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItemField.mixin.d.ts +6 -1
- package/lib/src/shared/content-settings/components/payment-config-field/PaymentConfigField.mixin.d.ts +6 -43
- 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/ecommerce-settings/util/refreshDuplicatedMetadata.d.ts +9 -1
- package/lib/src/shared/ecommerce-settings/util/refreshDuplicatedMetadata.js +31 -9
- package/lib/src/shared/logo-settings/components/EditLogoSettings.mixin.d.ts +1 -0
- package/lib/src/shared/logo-settings/components/LogoSettings.mixin.d.ts +6 -43
- package/lib/src/shared/page-navigation/store/page-navigation-store.d.ts +3 -1
- package/lib/src/shared/page-navigation/store/page-navigation-store.js +34 -9
- 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 +9 -2
- package/lib/src/shared/page-settings/components/page-settings/PageSettings.mixin.d.ts +200 -44
- package/lib/src/shared/page-settings/components/page-settings/PageSettings.mixin.js +12 -35
- package/lib/src/shared/page-settings/components/page-settings-section-styles/PageSettingsSectionStyles.mixin.d.ts +190 -44
- package/lib/src/shared/page-settings/components/page-settings-section-styles/PageSettingsSectionStyles.mixin.js +34 -2
- package/lib/src/shared/page-settings/duplicate-page.util.d.ts +4 -0
- package/lib/src/shared/page-settings/duplicate-page.util.js +82 -0
- package/lib/src/shared/page-settings/models.d.ts +1 -0
- package/lib/src/shared/page-settings/store/page-settings-store.d.ts +7 -2
- package/lib/src/shared/page-settings/store/page-settings-store.js +90 -7
- package/lib/src/shared/page-settings/utils.d.ts +3 -0
- package/lib/src/shared/page-settings/utils.js +6 -0
- package/lib/src/shared/publish-brand-page-with-state/PublishBrandPageModalWithState.mixin.d.ts +1 -56
- package/lib/src/shared/side-bar/components/SideBar.mixin.d.ts +0 -42
- package/lib/src/shared/side-bar/components/SideBarTabButton.mixin.d.ts +1 -0
- package/lib/src/shared/style-settings/components/StyleSettings.mixin.d.ts +4 -42
- package/lib/src/shared/template-settings/components/TemplatesSettings.mixin.d.ts +1 -0
- package/lib/src/tracker.mjs +1 -1
- package/lib/src/{useEventTracker-C5Ql5p7u.js → useEventTracker-DwPTmzpa.js} +13 -3
- package/package.json +2 -2
- 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 +21 -11
- package/src/brand-page/components/page/Page.vue +2 -0
- 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/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/brand-page-context.model.ts +0 -23
- package/src/brand-page/models/header-button.model.test.ts +85 -0
- package/src/brand-page/models/index.ts +19 -0
- package/src/brand-page/utils/context.util.ts +15 -0
- package/src/brand-page/utils/route.util.ts +13 -0
- package/src/brand-page/utils/view-model.util.test.ts +151 -1
- package/src/brand-page/utils/view-model.util.ts +73 -1
- package/src/brand-page/view-models.ts +3 -0
- package/src/brand-page-maker/components/action-bar/ActionBar.mixin.ts +0 -10
- package/src/brand-page-maker/components/action-bar/ActionBarNavigation.test.ts +8 -49
- package/src/brand-page-maker/components/action-bar/ActionBarNavigation.vue +1 -1
- package/src/brand-page-maker/composables/useEventTracker.ts +13 -0
- package/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.ts +2 -4
- package/src/brand-page-maker/validators/section-button.validator.ts +23 -19
- package/src/bundles/bundled-translations.de-DE.json +9 -2
- package/src/bundles/bundled-translations.es-ES.json +9 -2
- package/src/bundles/bundled-translations.fr-CA.json +9 -2
- package/src/bundles/bundled-translations.fr-FR.json +9 -2
- package/src/bundles/bundled-translations.json +9 -2
- package/src/bundles/bundled-translations.pt-BR.json +9 -2
- package/src/bundles/bundled-translations.pt-PT.json +9 -2
- package/src/composables/useTranslate.ts +2 -1
- package/src/metadata-builder/builders/item-id-utils.ts +9 -2
- package/src/shared/content-settings/components/text-field/TextField.mixin.ts +15 -0
- package/src/shared/content-settings/components/url-field/UrlField.vue +1 -0
- package/src/shared/ecommerce-settings/components/product-config-field/ProductConfigOption.vue +0 -2
- package/src/shared/ecommerce-settings/util/refreshDuplicatedMetadata.ts +32 -10
- package/src/shared/page-navigation/store/page-navigation-store.ts +57 -13
- 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/NestedDraggable.vue +3 -0
- package/src/shared/page-settings/components/page-settings/PageElement.vue +2 -0
- package/src/shared/page-settings/components/page-settings/PageSettingMenu.test.ts +105 -0
- package/src/shared/page-settings/components/page-settings/PageSettingMenu.vue +16 -0
- package/src/shared/page-settings/components/page-settings/PageSettings.duplicate.test.ts +108 -0
- package/src/shared/page-settings/components/page-settings/PageSettings.mixin.ts +22 -50
- package/src/shared/page-settings/components/page-settings/PageSettings.vue +1 -0
- package/src/shared/page-settings/components/page-settings/i18n/page-settings.de-DE.json +3 -1
- package/src/shared/page-settings/components/page-settings/i18n/page-settings.es-ES.json +3 -1
- package/src/shared/page-settings/components/page-settings/i18n/page-settings.fr-CA.json +3 -1
- package/src/shared/page-settings/components/page-settings/i18n/page-settings.fr-FR.json +3 -1
- package/src/shared/page-settings/components/page-settings/i18n/page-settings.json +3 -1
- package/src/shared/page-settings/components/page-settings/i18n/page-settings.pt-BR.json +3 -1
- package/src/shared/page-settings/components/page-settings/i18n/page-settings.pt-PT.json +3 -1
- 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 -1
- 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/duplicate-page.util.test.ts +382 -0
- package/src/shared/page-settings/duplicate-page.util.ts +124 -0
- package/src/shared/page-settings/models.ts +1 -0
- package/src/shared/page-settings/store/page-settings-store.test.ts +441 -1
- package/src/shared/page-settings/store/page-settings-store.ts +147 -11
- package/src/shared/page-settings/utils.ts +10 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent, computed } from 'vue';
|
|
2
2
|
import { PAGE_SECTION_STYLE_OPTIONS } from '@brand-page-maker/models/page-section-style.model';
|
|
3
3
|
import { PAGE_SECTIONS } from '../../models';
|
|
4
|
-
import { LOGO_SLIDER_DESKTOP_MAX, LOGO_SLIDER_DESKTOP_MIN, LOGO_SLIDER_MOBILE_MAX, LOGO_SLIDER_MOBILE_MIN, VIEWPORTS, getNavigationType, NAVIGATION_TYPE_DEFAULT_DISPLAY_TYPE, } from '@brand-page';
|
|
4
|
+
import { BUTTON_LINK_TYPE, LOGO_SLIDER_DESKTOP_MAX, LOGO_SLIDER_DESKTOP_MIN, LOGO_SLIDER_MOBILE_MAX, LOGO_SLIDER_MOBILE_MIN, VIEWPORTS, getNavigationType, NAVIGATION_TYPE_DEFAULT_DISPLAY_TYPE, } from '@brand-page';
|
|
5
5
|
import { UI_DEVICE_MODES, UI_EVENT_SOURCES } from '../../../models';
|
|
6
6
|
import { isTransparentColour } from '@brand-page/utils/color.util';
|
|
7
7
|
import { useUiPageSettingsStore } from '../../store';
|
|
@@ -12,7 +12,13 @@ import { useBrandPageContainerStore, useBrandPageMakerStore, useLogoStore, useUi
|
|
|
12
12
|
import { useUiEditableLogoStore, useUiLogoSettingsStore, } from '@shared/logo-settings/store';
|
|
13
13
|
import { FabricRenderClient } from '../../../../clients/fabric-render-client';
|
|
14
14
|
import { parseLogoThemeToCssStyles } from '@brand-page/utils';
|
|
15
|
-
import { commonTr } from '@src/composables/useTranslate';
|
|
15
|
+
import { commonTr, pageSettingsSectionTr } from '@src/composables/useTranslate';
|
|
16
|
+
// Starting values for a brand-new button; real "Contact Us" text so the label is never empty.
|
|
17
|
+
const newHeaderButton = () => ({
|
|
18
|
+
isVisible: false,
|
|
19
|
+
text: pageSettingsSectionTr('buttonLabelPlaceholder'),
|
|
20
|
+
buttonLinkType: BUTTON_LINK_TYPE.url,
|
|
21
|
+
});
|
|
16
22
|
const viewportsWithTr = () => [
|
|
17
23
|
{
|
|
18
24
|
key: VIEWPORTS.desktop,
|
|
@@ -100,6 +106,12 @@ export default defineComponent({
|
|
|
100
106
|
header() {
|
|
101
107
|
return this.sections[PAGE_SECTIONS.header][this.viewport];
|
|
102
108
|
},
|
|
109
|
+
headerButton() {
|
|
110
|
+
return this.header.headerButton;
|
|
111
|
+
},
|
|
112
|
+
isHeaderButtonVisible() {
|
|
113
|
+
return this.headerButton?.isVisible === true;
|
|
114
|
+
},
|
|
103
115
|
navigationType() {
|
|
104
116
|
return getNavigationType(this.navigation.displayType);
|
|
105
117
|
},
|
|
@@ -327,6 +339,26 @@ export default defineComponent({
|
|
|
327
339
|
viewport: VIEWPORTS.desktop,
|
|
328
340
|
});
|
|
329
341
|
},
|
|
342
|
+
onHeaderButtonChange(patch) {
|
|
343
|
+
const value = {
|
|
344
|
+
...newHeaderButton(),
|
|
345
|
+
...this.headerButton,
|
|
346
|
+
...patch,
|
|
347
|
+
};
|
|
348
|
+
// Write the whole button to BOTH viewports (own copy each) so they always match.
|
|
349
|
+
this.pageSettingsStore.setPageSettingsSectionValue({
|
|
350
|
+
sectionName: PAGE_SECTIONS.header,
|
|
351
|
+
propName: 'headerButton',
|
|
352
|
+
value: { ...value },
|
|
353
|
+
viewport: VIEWPORTS.mobile,
|
|
354
|
+
});
|
|
355
|
+
this.pageSettingsStore.setPageSettingsSectionValue({
|
|
356
|
+
sectionName: PAGE_SECTIONS.header,
|
|
357
|
+
propName: 'headerButton',
|
|
358
|
+
value: { ...value },
|
|
359
|
+
viewport: VIEWPORTS.desktop,
|
|
360
|
+
});
|
|
361
|
+
},
|
|
330
362
|
onItemListIntentImageReplace(name, { index }) {
|
|
331
363
|
this.contentSettingsStore.setSelectedItemAndFieldName({
|
|
332
364
|
id: this.sectionName,
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { Content } from '@brand-page';
|
|
2
|
+
import type { ContentItem } from '../content-settings/models';
|
|
3
|
+
export declare const getDuplicatePageTitle: (sourceTitle: string, siblingTitles: string[], isSubPage: boolean) => string;
|
|
4
|
+
export declare const duplicatePageContents: (contents: ContentItem<Content>[]) => ContentItem<Content>[];
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import cloneDeep from 'lodash.clonedeep';
|
|
2
|
+
import { v4 as uuid } from 'uuid';
|
|
3
|
+
import { rotateMonetizationIds } from '../ecommerce-settings/util/refreshDuplicatedMetadata';
|
|
4
|
+
import { generateItemId, ITEM_ID_BEARING_FIELDS, } from '@src/metadata-builder/builders/item-id-utils';
|
|
5
|
+
import { pageSettingsTr } from '@src/composables/useTranslate';
|
|
6
|
+
import { MAX_PAGE_TITLE_LENGTH, MAX_SUBPAGE_TITLE_LENGTH } from './utils';
|
|
7
|
+
const composeTitle = (baseTitle, index) => {
|
|
8
|
+
const copyTitle = pageSettingsTr('duplicatePageTitle', {
|
|
9
|
+
title: baseTitle,
|
|
10
|
+
// A page title is text, not markup, and i18next escapes interpolated values
|
|
11
|
+
// by default - "Tom & Jerry" would come back as "Tom & Jerry".
|
|
12
|
+
interpolation: { escapeValue: false },
|
|
13
|
+
}).trim();
|
|
14
|
+
return index > 1 ? `${copyTitle} ${index}` : copyTitle;
|
|
15
|
+
};
|
|
16
|
+
// The localised affix may sit either side of the title and is not a fixed
|
|
17
|
+
// length, so fit by trimming the base and re-composing rather than by slicing
|
|
18
|
+
// the finished string - that would cut the affix off in some locales.
|
|
19
|
+
const composeTitleWithinLimit = (baseTitle, index, maxLength) => {
|
|
20
|
+
const candidate = composeTitle(baseTitle, index);
|
|
21
|
+
const overflow = candidate.length - maxLength;
|
|
22
|
+
if (overflow <= 0) {
|
|
23
|
+
return candidate;
|
|
24
|
+
}
|
|
25
|
+
const trimmedBase = baseTitle
|
|
26
|
+
.slice(0, Math.max(0, baseTitle.length - overflow))
|
|
27
|
+
.trimEnd();
|
|
28
|
+
const trimmedCandidate = composeTitle(trimmedBase, index);
|
|
29
|
+
if (trimmedCandidate.length <= maxLength) {
|
|
30
|
+
return trimmedCandidate;
|
|
31
|
+
}
|
|
32
|
+
// A locale whose affix alone exceeds the limit: keep trimming the base rather
|
|
33
|
+
// than slicing the finished title, which would cut the trailing index and let
|
|
34
|
+
// two indexes collapse to the same name.
|
|
35
|
+
const affixLength = composeTitle('', index).length;
|
|
36
|
+
return composeTitle(baseTitle.slice(0, Math.max(0, maxLength - affixLength)).trimEnd(), index);
|
|
37
|
+
};
|
|
38
|
+
export const getDuplicatePageTitle = (sourceTitle, siblingTitles, isSubPage) => {
|
|
39
|
+
const maxLength = isSubPage
|
|
40
|
+
? MAX_SUBPAGE_TITLE_LENGTH
|
|
41
|
+
: MAX_PAGE_TITLE_LENGTH;
|
|
42
|
+
const takenTitles = new Set(siblingTitles);
|
|
43
|
+
// N siblings block at most N candidates, so one of the first N+1 is free.
|
|
44
|
+
const lastIndex = siblingTitles.length + 1;
|
|
45
|
+
for (let index = 1; index < lastIndex; index += 1) {
|
|
46
|
+
const candidate = composeTitleWithinLimit(sourceTitle, index, maxLength);
|
|
47
|
+
if (!takenTitles.has(candidate)) {
|
|
48
|
+
return candidate;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
return composeTitleWithinLimit(sourceTitle, lastIndex, maxLength);
|
|
52
|
+
};
|
|
53
|
+
// These ids are what the AI builder is shown and what its executor matches on
|
|
54
|
+
// (see ensureBrandPageItemIds), so a copy sharing them would put two identical
|
|
55
|
+
// ids in front of it.
|
|
56
|
+
const renewItemIds = (content) => {
|
|
57
|
+
const fields = content;
|
|
58
|
+
for (const field of ITEM_ID_BEARING_FIELDS) {
|
|
59
|
+
const items = fields[field];
|
|
60
|
+
if (!Array.isArray(items)) {
|
|
61
|
+
continue;
|
|
62
|
+
}
|
|
63
|
+
for (const item of items) {
|
|
64
|
+
if (item.id) {
|
|
65
|
+
item.id = generateItemId();
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
export const duplicatePageContents = (contents) => cloneDeep(contents).map((item) => {
|
|
71
|
+
// ContentItem.id is re-derived from content.id on every reload
|
|
72
|
+
// (content-settings.util: mapBrandPageContentToContentSettingsItem), so the
|
|
73
|
+
// two must be minted together or itemStates drifts until the next load.
|
|
74
|
+
const newId = uuid();
|
|
75
|
+
item.id = newId;
|
|
76
|
+
item.settings.content.id = newId;
|
|
77
|
+
// Ids only. The copy keeps the source's payment connection - same owner, so it should carry on
|
|
78
|
+
// taking payments; it is website duplication that disconnects.
|
|
79
|
+
rotateMonetizationIds(item.settings.content);
|
|
80
|
+
renewItemIds(item.settings.content);
|
|
81
|
+
return item;
|
|
82
|
+
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ContentItem } from '../../content-settings/models';
|
|
2
2
|
import { PageHeaderDesktop, PageHeaderMobile, PageFooterDesktop, PageFooterMobile, VIEWPORTS } from '@brand-page';
|
|
3
3
|
import type { NavigationType } from '@brand-page';
|
|
4
|
-
import type { Content, ImageGalleryItem, LinksItem, LogoImageModel, ViewportsType, LogoTemplateImageModel, BrandPagePaymentConfig, BrandPagePaymentConfigCurrency } from '@brand-page';
|
|
4
|
+
import type { Content, HeaderButton, ImageGalleryItem, LinksItem, LogoImageModel, ViewportsType, LogoTemplateImageModel, BrandPagePaymentConfig, BrandPagePaymentConfigCurrency } from '@brand-page';
|
|
5
5
|
import type { ContentPage } from '../models';
|
|
6
6
|
import { PAGE_SECTIONS } from '../models';
|
|
7
7
|
export type PageSettingsStateSectionStyles = Partial<PageHeaderDesktop & PageHeaderMobile & PageFooterDesktop & PageFooterMobile>;
|
|
@@ -54,6 +54,8 @@ export declare const useUiPageSettingsStore: import("pinia").StoreDefinition<"ui
|
|
|
54
54
|
setPages({ pages }: {
|
|
55
55
|
pages: ContentPage[];
|
|
56
56
|
}): void;
|
|
57
|
+
syncPagesWithOrders(): void;
|
|
58
|
+
showPageLimitUpgradeModalAsync(ctaLocation: string): Promise<void>;
|
|
57
59
|
setNewPageModalVisibilityAsync({ isNewPageModalVisible, parentPageId, }: {
|
|
58
60
|
isNewPageModalVisible: boolean;
|
|
59
61
|
parentPageId?: string;
|
|
@@ -74,7 +76,7 @@ export declare const useUiPageSettingsStore: import("pinia").StoreDefinition<"ui
|
|
|
74
76
|
sectionName: PageSettingsSection;
|
|
75
77
|
propName: keyof PageSettingsStateSectionStyles;
|
|
76
78
|
index?: number;
|
|
77
|
-
value: string | boolean | LinksItem[] | BrandPageCssStyle | Partial<ImageGalleryItem> | number | null | undefined;
|
|
79
|
+
value: string | boolean | LinksItem[] | BrandPageCssStyle | Partial<ImageGalleryItem> | HeaderButton | number | null | undefined;
|
|
78
80
|
merge?: boolean;
|
|
79
81
|
viewport: ViewportsType;
|
|
80
82
|
}): void;
|
|
@@ -103,6 +105,9 @@ export declare const useUiPageSettingsStore: import("pinia").StoreDefinition<"ui
|
|
|
103
105
|
title: string;
|
|
104
106
|
newPageParentId?: string;
|
|
105
107
|
}): ContentPage;
|
|
108
|
+
duplicatePage({ pageId, }: {
|
|
109
|
+
pageId: string;
|
|
110
|
+
}): Promise<ContentPage | undefined>;
|
|
106
111
|
setSelectedSectionName({ sectionName, }: {
|
|
107
112
|
sectionName?: PageSettingsSection;
|
|
108
113
|
}): void;
|
|
@@ -2,6 +2,8 @@ import { defineStore } from 'pinia';
|
|
|
2
2
|
import { PageHeaderDesktop, PageHeaderMobile, PageFooterDesktop, PageFooterMobile, VIEWPORTS, getNavigationType, } from '@brand-page';
|
|
3
3
|
import { v4 as uuid } from 'uuid';
|
|
4
4
|
import { PAGE_SECTIONS } from '../models';
|
|
5
|
+
import { toPageModels } from '../utils';
|
|
6
|
+
import { duplicatePageContents, getDuplicatePageTitle, } from '../duplicate-page.util';
|
|
5
7
|
import { navigateToPageByPageId } from '@brand-page-maker/routing';
|
|
6
8
|
import { getPageSlugFromPageTitle } from '@brand-page-maker/utils';
|
|
7
9
|
import { useUiContentSettingsStore } from '../../content-settings/store';
|
|
@@ -78,16 +80,55 @@ export const useUiPageSettingsStore = defineStore('uiPageSettings', {
|
|
|
78
80
|
setPages({ pages }) {
|
|
79
81
|
this.pages = pages;
|
|
80
82
|
},
|
|
81
|
-
|
|
83
|
+
// `orders` is the hierarchy; `pages` is a flat list that has to match it
|
|
84
|
+
// depth-first, because row indexes drive the home check and the hide/delete
|
|
85
|
+
// gating. Anything reshaping orders should re-derive pages after - except
|
|
86
|
+
// addNewPage, which predates this and appends by visibility instead; the
|
|
87
|
+
// next drag-end catches it up.
|
|
88
|
+
syncPagesWithOrders() {
|
|
89
|
+
const pageNavigationStore = usePageNavigationStore();
|
|
90
|
+
const pageIdOrder = [];
|
|
91
|
+
const collectPageIds = (orders) => {
|
|
92
|
+
for (const order of orders) {
|
|
93
|
+
const route = pageNavigationStore.routes.find((r) => r.id === order.routeId);
|
|
94
|
+
if (route?.pageId) {
|
|
95
|
+
pageIdOrder.push(route.pageId);
|
|
96
|
+
}
|
|
97
|
+
if (order.subRoutes?.length) {
|
|
98
|
+
collectPageIds(order.subRoutes);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
};
|
|
102
|
+
collectPageIds(pageNavigationStore.orders);
|
|
103
|
+
if (!pageIdOrder.length) {
|
|
104
|
+
return;
|
|
105
|
+
}
|
|
106
|
+
const pageMap = new Map(this.pages.map((page) => [page.id, page]));
|
|
107
|
+
const orderedPages = [];
|
|
108
|
+
for (const pageId of pageIdOrder) {
|
|
109
|
+
const page = pageMap.get(pageId);
|
|
110
|
+
if (page) {
|
|
111
|
+
orderedPages.push(page);
|
|
112
|
+
pageMap.delete(pageId);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
// A page with no route would otherwise vanish.
|
|
116
|
+
orderedPages.push(...pageMap.values());
|
|
117
|
+
this.setPages({ pages: orderedPages });
|
|
118
|
+
},
|
|
119
|
+
async showPageLimitUpgradeModalAsync(ctaLocation) {
|
|
82
120
|
const uiStore = useUiStore();
|
|
83
121
|
const eventTracker = useEventTracker();
|
|
122
|
+
eventTracker.setUpsellBridgeState({
|
|
123
|
+
cta_location: ctaLocation,
|
|
124
|
+
trigger_type: TRIGGER_TYPE.AUTOMATIC,
|
|
125
|
+
content_type: null,
|
|
126
|
+
});
|
|
127
|
+
await uiStore.showUpgradeModalAndSaveAsync(WEBSITE_UPGRADE_CONTEXT_TYPES.AddPage);
|
|
128
|
+
},
|
|
129
|
+
async setNewPageModalVisibilityAsync({ isNewPageModalVisible, parentPageId, }) {
|
|
84
130
|
if (isNewPageModalVisible && !this.canAddPage) {
|
|
85
|
-
|
|
86
|
-
cta_location: UPGRADE_CTA_LOCATIONS.ADD_NEW_PAGE,
|
|
87
|
-
trigger_type: TRIGGER_TYPE.AUTOMATIC,
|
|
88
|
-
content_type: null,
|
|
89
|
-
});
|
|
90
|
-
await uiStore.showUpgradeModalAndSaveAsync(WEBSITE_UPGRADE_CONTEXT_TYPES.AddPage);
|
|
131
|
+
await this.showPageLimitUpgradeModalAsync(UPGRADE_CTA_LOCATIONS.ADD_NEW_PAGE);
|
|
91
132
|
return;
|
|
92
133
|
}
|
|
93
134
|
this.isNewPageModalVisible = isNewPageModalVisible;
|
|
@@ -231,6 +272,48 @@ export const useUiPageSettingsStore = defineStore('uiPageSettings', {
|
|
|
231
272
|
}
|
|
232
273
|
return newPage;
|
|
233
274
|
},
|
|
275
|
+
async duplicatePage({ pageId, }) {
|
|
276
|
+
const pageNavigationStore = usePageNavigationStore();
|
|
277
|
+
// Gate first: a paywalled duplicate must not leave a half-created page.
|
|
278
|
+
if (!this.canAddPage) {
|
|
279
|
+
await this.showPageLimitUpgradeModalAsync(UPGRADE_CTA_LOCATIONS.DUPLICATE_PAGE);
|
|
280
|
+
return undefined;
|
|
281
|
+
}
|
|
282
|
+
const sourcePage = this.pages.find((page) => page.id === pageId);
|
|
283
|
+
const sourceRoute = pageNavigationStore.routes.find((route) => route.pageId === pageId);
|
|
284
|
+
if (!sourcePage || !sourceRoute) {
|
|
285
|
+
return undefined;
|
|
286
|
+
}
|
|
287
|
+
const parentRouteId = pageNavigationStore.getParentRouteIdForPage(pageId);
|
|
288
|
+
const title = getDuplicatePageTitle(sourcePage.title, pageNavigationStore.getDisplayNamesForDepth(parentRouteId), Boolean(parentRouteId));
|
|
289
|
+
const newPage = {
|
|
290
|
+
id: uuid(),
|
|
291
|
+
title,
|
|
292
|
+
contents: duplicatePageContents(sourcePage.contents),
|
|
293
|
+
// A copy of a hidden page stays hidden, or it publishes into the nav.
|
|
294
|
+
isHidden: sourcePage.isHidden,
|
|
295
|
+
};
|
|
296
|
+
// addNavRoute navigates to the copy and reads its contents, so the page
|
|
297
|
+
// has to exist before the route does. syncPagesWithOrders places it.
|
|
298
|
+
this.setPages({ pages: [...this.pages, newPage] });
|
|
299
|
+
const newRoute = {
|
|
300
|
+
id: uuid(),
|
|
301
|
+
pageId: newPage.id,
|
|
302
|
+
pageSlug: getPageSlugFromPageTitle(title, pageNavigationStore.getPageSlugsForDepth(parentRouteId)),
|
|
303
|
+
isHidden: Boolean(sourceRoute.isHidden),
|
|
304
|
+
displayName: title,
|
|
305
|
+
};
|
|
306
|
+
pageNavigationStore.addNavRoute(newRoute, parentRouteId, sourceRoute.id);
|
|
307
|
+
this.syncPagesWithOrders();
|
|
308
|
+
// shopConfig.products is DERIVED from the shop blocks, not updated with
|
|
309
|
+
// them - without this the copy's fresh product ids never reach the save.
|
|
310
|
+
const shopConfigStore = useShopConfigStore();
|
|
311
|
+
shopConfigStore.initialiseShopStore({
|
|
312
|
+
paymentConfig: shopConfigStore.paymentConfig,
|
|
313
|
+
pages: toPageModels(this.pages),
|
|
314
|
+
});
|
|
315
|
+
return newPage;
|
|
316
|
+
},
|
|
234
317
|
setSelectedSectionName({ sectionName, }) {
|
|
235
318
|
this.selectedSectionName = sectionName;
|
|
236
319
|
if (!sectionName) {
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import type { PageModel } from '@brand-page';
|
|
2
|
+
import type { ContentPage } from './models';
|
|
1
3
|
export declare const MAX_PAGE_TITLE_LENGTH = 30;
|
|
2
4
|
export declare const MAX_SUBPAGE_TITLE_LENGTH = 20;
|
|
5
|
+
export declare const toPageModels: (pages: ContentPage[]) => PageModel[];
|
|
3
6
|
export declare const getPageTitleError: (pageTitle: string, isSubPage: boolean) => string | null;
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import { errorTr } from '@src/composables/useTranslate';
|
|
2
2
|
export const MAX_PAGE_TITLE_LENGTH = 30;
|
|
3
3
|
export const MAX_SUBPAGE_TITLE_LENGTH = 20;
|
|
4
|
+
// The maker holds a page's sections as ContentItems (settings wrapper + content);
|
|
5
|
+
// everything that consumes a BrandPageModel wants the bare content.
|
|
6
|
+
export const toPageModels = (pages) => pages.map((page) => ({
|
|
7
|
+
...page,
|
|
8
|
+
contents: page.contents.map((item) => item.settings.content),
|
|
9
|
+
}));
|
|
4
10
|
export const getPageTitleError = (pageTitle, isSubPage) => {
|
|
5
11
|
if (!pageTitle) {
|
|
6
12
|
return errorTr('pageTitleError');
|
package/lib/src/shared/publish-brand-page-with-state/PublishBrandPageModalWithState.mixin.d.ts
CHANGED
|
@@ -70,20 +70,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
70
70
|
isVariation: boolean;
|
|
71
71
|
isExcluded: boolean;
|
|
72
72
|
} | undefined;
|
|
73
|
-
bp_5873_live_preview_prepurchase?: {
|
|
74
|
-
key: string;
|
|
75
|
-
value: string;
|
|
76
|
-
isControl: boolean;
|
|
77
|
-
isVariation: boolean;
|
|
78
|
-
isExcluded: boolean;
|
|
79
|
-
} | undefined;
|
|
80
|
-
bp_5873_live_preview_postpurchase?: {
|
|
81
|
-
key: string;
|
|
82
|
-
value: string;
|
|
83
|
-
isControl: boolean;
|
|
84
|
-
isVariation: boolean;
|
|
85
|
-
isExcluded: boolean;
|
|
86
|
-
} | undefined;
|
|
87
73
|
}>;
|
|
88
74
|
brandPageType: import("vue").ComputedRef<"default" | "brandSite" | "brandContact">;
|
|
89
75
|
isSubsequentPublish: import("vue").ComputedRef<boolean>;
|
|
@@ -301,20 +287,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
301
287
|
isVariation: boolean;
|
|
302
288
|
isExcluded: boolean;
|
|
303
289
|
} | undefined;
|
|
304
|
-
bp_5873_live_preview_prepurchase?: {
|
|
305
|
-
key: string;
|
|
306
|
-
value: string;
|
|
307
|
-
isControl: boolean;
|
|
308
|
-
isVariation: boolean;
|
|
309
|
-
isExcluded: boolean;
|
|
310
|
-
} | undefined;
|
|
311
|
-
bp_5873_live_preview_postpurchase?: {
|
|
312
|
-
key: string;
|
|
313
|
-
value: string;
|
|
314
|
-
isControl: boolean;
|
|
315
|
-
isVariation: boolean;
|
|
316
|
-
isExcluded: boolean;
|
|
317
|
-
} | undefined;
|
|
318
290
|
};
|
|
319
291
|
isSubsequentPublish: boolean;
|
|
320
292
|
isContextualUpgradeModalVisible: boolean;
|
|
@@ -390,20 +362,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
390
362
|
isVariation: boolean;
|
|
391
363
|
isExcluded: boolean;
|
|
392
364
|
} | undefined;
|
|
393
|
-
bp_5873_live_preview_prepurchase?: {
|
|
394
|
-
key: string;
|
|
395
|
-
value: string;
|
|
396
|
-
isControl: boolean;
|
|
397
|
-
isVariation: boolean;
|
|
398
|
-
isExcluded: boolean;
|
|
399
|
-
} | undefined;
|
|
400
|
-
bp_5873_live_preview_postpurchase?: {
|
|
401
|
-
key: string;
|
|
402
|
-
value: string;
|
|
403
|
-
isControl: boolean;
|
|
404
|
-
isVariation: boolean;
|
|
405
|
-
isExcluded: boolean;
|
|
406
|
-
} | undefined;
|
|
407
365
|
};
|
|
408
366
|
isSubsequentPublish: boolean;
|
|
409
367
|
isContextualUpgradeModalVisible: boolean;
|
|
@@ -479,20 +437,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
479
437
|
isVariation: boolean;
|
|
480
438
|
isExcluded: boolean;
|
|
481
439
|
} | undefined;
|
|
482
|
-
bp_5873_live_preview_prepurchase?: {
|
|
483
|
-
key: string;
|
|
484
|
-
value: string;
|
|
485
|
-
isControl: boolean;
|
|
486
|
-
isVariation: boolean;
|
|
487
|
-
isExcluded: boolean;
|
|
488
|
-
} | undefined;
|
|
489
|
-
bp_5873_live_preview_postpurchase?: {
|
|
490
|
-
key: string;
|
|
491
|
-
value: string;
|
|
492
|
-
isControl: boolean;
|
|
493
|
-
isVariation: boolean;
|
|
494
|
-
isExcluded: boolean;
|
|
495
|
-
} | undefined;
|
|
496
440
|
};
|
|
497
441
|
isSubsequentPublish: boolean;
|
|
498
442
|
isContextualUpgradeModalVisible: boolean;
|
|
@@ -650,6 +594,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
650
594
|
sendWebsiteManageAddPageEvent: (pageName: string, isSubPageMode?: boolean) => void;
|
|
651
595
|
sendWebsiteManageRemovePageEvent: (pageName: string, isRouteNested?: boolean) => void;
|
|
652
596
|
sendWebsiteManageReorderPageEvent: (pageName: string) => void;
|
|
597
|
+
sendWebsiteManageDuplicatePageEvent: (sourcePageName: string, isSubPage?: boolean) => void;
|
|
653
598
|
sendPublishOptionsForFreeEvent: () => void;
|
|
654
599
|
sendPublishOptionsForPremiumEvent: () => void;
|
|
655
600
|
sendPublishOptionsForExitEvent: () => void;
|
|
@@ -84,20 +84,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
84
84
|
isVariation: boolean;
|
|
85
85
|
isExcluded: boolean;
|
|
86
86
|
} | undefined;
|
|
87
|
-
bp_5873_live_preview_prepurchase?: {
|
|
88
|
-
key: string;
|
|
89
|
-
value: string;
|
|
90
|
-
isControl: boolean;
|
|
91
|
-
isVariation: boolean;
|
|
92
|
-
isExcluded: boolean;
|
|
93
|
-
} | undefined;
|
|
94
|
-
bp_5873_live_preview_postpurchase?: {
|
|
95
|
-
key: string;
|
|
96
|
-
value: string;
|
|
97
|
-
isControl: boolean;
|
|
98
|
-
isVariation: boolean;
|
|
99
|
-
isExcluded: boolean;
|
|
100
|
-
} | undefined;
|
|
101
87
|
};
|
|
102
88
|
isSubsequentPublish: boolean;
|
|
103
89
|
isContextualUpgradeModalVisible: boolean;
|
|
@@ -173,20 +159,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
173
159
|
isVariation: boolean;
|
|
174
160
|
isExcluded: boolean;
|
|
175
161
|
} | undefined;
|
|
176
|
-
bp_5873_live_preview_prepurchase?: {
|
|
177
|
-
key: string;
|
|
178
|
-
value: string;
|
|
179
|
-
isControl: boolean;
|
|
180
|
-
isVariation: boolean;
|
|
181
|
-
isExcluded: boolean;
|
|
182
|
-
} | undefined;
|
|
183
|
-
bp_5873_live_preview_postpurchase?: {
|
|
184
|
-
key: string;
|
|
185
|
-
value: string;
|
|
186
|
-
isControl: boolean;
|
|
187
|
-
isVariation: boolean;
|
|
188
|
-
isExcluded: boolean;
|
|
189
|
-
} | undefined;
|
|
190
162
|
};
|
|
191
163
|
isSubsequentPublish: boolean;
|
|
192
164
|
isContextualUpgradeModalVisible: boolean;
|
|
@@ -262,20 +234,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
262
234
|
isVariation: boolean;
|
|
263
235
|
isExcluded: boolean;
|
|
264
236
|
} | undefined;
|
|
265
|
-
bp_5873_live_preview_prepurchase?: {
|
|
266
|
-
key: string;
|
|
267
|
-
value: string;
|
|
268
|
-
isControl: boolean;
|
|
269
|
-
isVariation: boolean;
|
|
270
|
-
isExcluded: boolean;
|
|
271
|
-
} | undefined;
|
|
272
|
-
bp_5873_live_preview_postpurchase?: {
|
|
273
|
-
key: string;
|
|
274
|
-
value: string;
|
|
275
|
-
isControl: boolean;
|
|
276
|
-
isVariation: boolean;
|
|
277
|
-
isExcluded: boolean;
|
|
278
|
-
} | undefined;
|
|
279
237
|
};
|
|
280
238
|
isSubsequentPublish: boolean;
|
|
281
239
|
isContextualUpgradeModalVisible: boolean;
|
|
@@ -60,6 +60,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
60
60
|
sendWebsiteManageAddPageEvent: (pageName: string, isSubPageMode?: boolean) => void;
|
|
61
61
|
sendWebsiteManageRemovePageEvent: (pageName: string, isRouteNested?: boolean) => void;
|
|
62
62
|
sendWebsiteManageReorderPageEvent: (pageName: string) => void;
|
|
63
|
+
sendWebsiteManageDuplicatePageEvent: (sourcePageName: string, isSubPage?: boolean) => void;
|
|
63
64
|
sendPublishOptionsForFreeEvent: () => void;
|
|
64
65
|
sendPublishOptionsForPremiumEvent: () => void;
|
|
65
66
|
sendPublishOptionsForExitEvent: () => void;
|
|
@@ -80,6 +80,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
80
80
|
paddingTop?: string | undefined;
|
|
81
81
|
position?: string | undefined;
|
|
82
82
|
textAlign?: string | undefined;
|
|
83
|
+
textAlignLast?: string | undefined;
|
|
83
84
|
textDecoration?: string | undefined;
|
|
84
85
|
top?: string | undefined;
|
|
85
86
|
transform?: string | undefined;
|
|
@@ -128,6 +129,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
128
129
|
paddingTop?: string | undefined;
|
|
129
130
|
position?: string | undefined;
|
|
130
131
|
textAlign?: string | undefined;
|
|
132
|
+
textAlignLast?: string | undefined;
|
|
131
133
|
textDecoration?: string | undefined;
|
|
132
134
|
top?: string | undefined;
|
|
133
135
|
transform?: string | undefined;
|
|
@@ -175,6 +177,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
175
177
|
paddingTop?: string | undefined;
|
|
176
178
|
position?: string | undefined;
|
|
177
179
|
textAlign?: string | undefined;
|
|
180
|
+
textAlignLast?: string | undefined;
|
|
178
181
|
textDecoration?: string | undefined;
|
|
179
182
|
top?: string | undefined;
|
|
180
183
|
transform?: string | undefined;
|
|
@@ -589,20 +592,6 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
589
592
|
isVariation: boolean;
|
|
590
593
|
isExcluded: boolean;
|
|
591
594
|
} | undefined;
|
|
592
|
-
bp_5873_live_preview_prepurchase?: {
|
|
593
|
-
key: string;
|
|
594
|
-
value: string;
|
|
595
|
-
isControl: boolean;
|
|
596
|
-
isVariation: boolean;
|
|
597
|
-
isExcluded: boolean;
|
|
598
|
-
} | undefined;
|
|
599
|
-
bp_5873_live_preview_postpurchase?: {
|
|
600
|
-
key: string;
|
|
601
|
-
value: string;
|
|
602
|
-
isControl: boolean;
|
|
603
|
-
isVariation: boolean;
|
|
604
|
-
isExcluded: boolean;
|
|
605
|
-
} | undefined;
|
|
606
595
|
};
|
|
607
596
|
isSubsequentPublish: boolean;
|
|
608
597
|
isContextualUpgradeModalVisible: boolean;
|
|
@@ -678,20 +667,6 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
678
667
|
isVariation: boolean;
|
|
679
668
|
isExcluded: boolean;
|
|
680
669
|
} | undefined;
|
|
681
|
-
bp_5873_live_preview_prepurchase?: {
|
|
682
|
-
key: string;
|
|
683
|
-
value: string;
|
|
684
|
-
isControl: boolean;
|
|
685
|
-
isVariation: boolean;
|
|
686
|
-
isExcluded: boolean;
|
|
687
|
-
} | undefined;
|
|
688
|
-
bp_5873_live_preview_postpurchase?: {
|
|
689
|
-
key: string;
|
|
690
|
-
value: string;
|
|
691
|
-
isControl: boolean;
|
|
692
|
-
isVariation: boolean;
|
|
693
|
-
isExcluded: boolean;
|
|
694
|
-
} | undefined;
|
|
695
670
|
};
|
|
696
671
|
isSubsequentPublish: boolean;
|
|
697
672
|
isContextualUpgradeModalVisible: boolean;
|
|
@@ -767,20 +742,6 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
767
742
|
isVariation: boolean;
|
|
768
743
|
isExcluded: boolean;
|
|
769
744
|
} | undefined;
|
|
770
|
-
bp_5873_live_preview_prepurchase?: {
|
|
771
|
-
key: string;
|
|
772
|
-
value: string;
|
|
773
|
-
isControl: boolean;
|
|
774
|
-
isVariation: boolean;
|
|
775
|
-
isExcluded: boolean;
|
|
776
|
-
} | undefined;
|
|
777
|
-
bp_5873_live_preview_postpurchase?: {
|
|
778
|
-
key: string;
|
|
779
|
-
value: string;
|
|
780
|
-
isControl: boolean;
|
|
781
|
-
isVariation: boolean;
|
|
782
|
-
isExcluded: boolean;
|
|
783
|
-
} | undefined;
|
|
784
745
|
};
|
|
785
746
|
isSubsequentPublish: boolean;
|
|
786
747
|
isContextualUpgradeModalVisible: boolean;
|
|
@@ -991,6 +952,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
991
952
|
sendWebsiteManageAddPageEvent: (pageName: string, isSubPageMode?: boolean) => void;
|
|
992
953
|
sendWebsiteManageRemovePageEvent: (pageName: string, isRouteNested?: boolean) => void;
|
|
993
954
|
sendWebsiteManageReorderPageEvent: (pageName: string) => void;
|
|
955
|
+
sendWebsiteManageDuplicatePageEvent: (sourcePageName: string, isSubPage?: boolean) => void;
|
|
994
956
|
sendPublishOptionsForFreeEvent: () => void;
|
|
995
957
|
sendPublishOptionsForPremiumEvent: () => void;
|
|
996
958
|
sendPublishOptionsForExitEvent: () => void;
|
|
@@ -175,6 +175,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
175
175
|
sendWebsiteManageAddPageEvent: (pageName: string, isSubPageMode?: boolean) => void;
|
|
176
176
|
sendWebsiteManageRemovePageEvent: (pageName: string, isRouteNested?: boolean) => void;
|
|
177
177
|
sendWebsiteManageReorderPageEvent: (pageName: string) => void;
|
|
178
|
+
sendWebsiteManageDuplicatePageEvent: (sourcePageName: string, isSubPage?: boolean) => void;
|
|
178
179
|
sendPublishOptionsForFreeEvent: () => void;
|
|
179
180
|
sendPublishOptionsForPremiumEvent: () => void;
|
|
180
181
|
sendPublishOptionsForExitEvent: () => void;
|
package/lib/src/tracker.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as N, E as O, G as _, P as I, a as A, b as a, c as S, S as s, T as C, U as L, u as P } from "./useEventTracker-
|
|
1
|
+
import { A as N, E as O, G as _, P as I, a as A, b as a, c as S, S as s, T as C, U as L, u as P } from "./useEventTracker-DwPTmzpa.js";
|
|
2
2
|
export {
|
|
3
3
|
N as AI_CTA_LOCATIONS,
|
|
4
4
|
O as EVENTS,
|
|
@@ -9,6 +9,7 @@ const E = {
|
|
|
9
9
|
WEBSITE_MAKER_ADD_PAGE: "website_maker_add_page",
|
|
10
10
|
WEBSITE_MAKER_REMOVE_PAGE: "website_maker_remove_page",
|
|
11
11
|
WEBSITE_MAKER_REORDER_PAGE: "website_maker_reorder_page",
|
|
12
|
+
WEBSITE_MAKER_DUPLICATE_PAGE: "website_maker_duplicate_page",
|
|
12
13
|
WEBSITE_MAKER_OPEN: "website_maker_open",
|
|
13
14
|
WEBSITE_MAKER_PUBLISH_UPSELL_OPTION_MODAL: "website_maker_publish_upsell_option_modal",
|
|
14
15
|
WEBSITE_MAKER_TEMPLATE_SEARCH: "website_maker_template_search",
|
|
@@ -62,6 +63,7 @@ const E = {
|
|
|
62
63
|
REMOVE_WATERMARK_FOOTER_SETTINGS: "remove_watermark_footer_settings",
|
|
63
64
|
PREVIEW_WATERMARK: "preview_watermark",
|
|
64
65
|
ADD_NEW_PAGE: "add_new_page",
|
|
66
|
+
DUPLICATE_PAGE: "duplicate_page",
|
|
65
67
|
ADD_CONTENT: "add_content",
|
|
66
68
|
EDITOR_PUBLISH_TOP: "editor_publish_top",
|
|
67
69
|
EDITOR_PUBLISH_BOTTOM: "editor_publish_bottom",
|
|
@@ -99,14 +101,14 @@ const E = {
|
|
|
99
101
|
upsellOpenEventProps: {},
|
|
100
102
|
domainUpsellOpenEventProps: {},
|
|
101
103
|
publishOpenEventProps: {}
|
|
102
|
-
}), l = I([]), _ = (
|
|
104
|
+
}), l = I([]), _ = (A, o, e = !1, t = "maker_editor") => {
|
|
103
105
|
l.value.forEach((s) => {
|
|
104
106
|
s({
|
|
105
107
|
scope: t,
|
|
106
|
-
eventName:
|
|
108
|
+
eventName: A,
|
|
107
109
|
eventProps: {
|
|
108
110
|
...e ? {} : T.value,
|
|
109
|
-
...
|
|
111
|
+
...o
|
|
110
112
|
}
|
|
111
113
|
});
|
|
112
114
|
});
|
|
@@ -216,6 +218,14 @@ const E = {
|
|
|
216
218
|
page_name: e
|
|
217
219
|
});
|
|
218
220
|
},
|
|
221
|
+
// The SOURCE page, not the copy: tracking the copy would fragment the
|
|
222
|
+
// dimension across "About Copy", "About Copy 2".
|
|
223
|
+
sendWebsiteManageDuplicatePageEvent: (e, t) => {
|
|
224
|
+
_(E.WEBSITE_MAKER_DUPLICATE_PAGE, {
|
|
225
|
+
page_name: e,
|
|
226
|
+
is_sub_page: !!t
|
|
227
|
+
});
|
|
228
|
+
},
|
|
219
229
|
sendPublishOptionsForFreeEvent: () => {
|
|
220
230
|
_(E.WEBSITE_MAKER_PUBLISH_UPSELL_OPTION_MODAL, {
|
|
221
231
|
upsell_option_continuation: i.FREEMIUM
|