@designcrowd/library.brand-page 5.16.54-ai-text-2 → 5.16.54
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-CMr7Pf6Y.js → CreatedOnBrandCrowd-de-de-MT7ymeOj.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-en-us-CpBgLE5J.js → CreatedOnBrandCrowd-en-us-C2GKnuEv.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-es-es-C6euwhsp.js → CreatedOnBrandCrowd-es-es-2takDYdw.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-fr-fr-DuVwH5vD.js → CreatedOnBrandCrowd-fr-ca-DFjtVwB7.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-fr-ca-DuVwH5vD.js → CreatedOnBrandCrowd-fr-fr-DFjtVwB7.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-pt-pt-Hf9r0lGD.js → CreatedOnBrandCrowd-pt-br-BgN5BFxF.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-pt-br-Hf9r0lGD.js → CreatedOnBrandCrowd-pt-pt-BgN5BFxF.js} +1 -1
- package/lib/src/{CreatedOnDcom-de-de-CYSCEt3r.js → CreatedOnDcom-de-de-BzxanK33.js} +1 -1
- package/lib/src/{CreatedOnDcom-en-us-BlfMprJh.js → CreatedOnDcom-en-us-Vlybo-_L.js} +1 -1
- package/lib/src/{CreatedOnDcom-es-es-BtJ72Rwr.js → CreatedOnDcom-es-es-BRKauY9e.js} +1 -1
- package/lib/src/{CreatedOnDcom-fr-ca-BL4phIkf.js → CreatedOnDcom-fr-ca-BRSzGg7E.js} +1 -1
- package/lib/src/{CreatedOnDcom-fr-fr-6EQvE4Dc.js → CreatedOnDcom-fr-fr-CQg_YrB1.js} +1 -1
- package/lib/src/{CreatedOnDcom-pt-br-R23wklBF.js → CreatedOnDcom-pt-br-CXxzg52F.js} +1 -1
- package/lib/src/{CreatedOnDcom-pt-pt-ZNkhROL0.js → CreatedOnDcom-pt-pt-Bv63jvQl.js} +1 -1
- package/lib/src/brand-page/models/brand-page-context.model.d.ts +0 -1
- package/lib/src/brand-page/models/brand-page-context.model.js +0 -5
- package/lib/src/brand-page/models/index.d.ts +1 -1
- package/lib/src/brand-page/utils/migration.util.js +1 -6
- package/lib/src/brand-page-maker/components/action-bar/ActionBar.mixin.d.ts +0 -5
- package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.d.ts +0 -7
- package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMakerTemplateSettings.mixin.d.ts +0 -5
- package/lib/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.d.ts +0 -7
- package/lib/src/brand-page-maker/components/brandpage-settings/ReplaceImageSettingsForBrandPageSettings.mixin.d.ts +0 -5
- package/lib/src/brand-page-maker/components/seo-settings/SeoPageSettings.mixin.d.ts +0 -5
- package/lib/src/brand-page-maker/components/seo-settings/UrlSettings.mixin.d.ts +0 -5
- package/lib/src/brand-page-maker/components/social-share/SocialShare.mixin.d.ts +0 -5
- package/lib/src/brand-page-maker/components/template-preview/TemplatePreview.mixin.d.ts +0 -5
- package/lib/src/brand-page-maker/constants/sidebar-constant.d.ts +0 -1
- package/lib/src/brand-page-maker/constants/sidebar-constant.js +0 -8
- package/lib/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.d.ts +0 -11
- package/lib/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.js +1 -55
- package/lib/src/brand-page-maker/stores/index.d.ts +0 -1
- package/lib/src/brand-page-maker/stores/index.js +0 -1
- package/lib/src/brand-page-maker/utils/rich-text-editor.util.js +4 -7
- package/lib/src/bundled-translations-CRhilGW5.js +169 -0
- package/lib/src/bundled-translations.de-DE-Dvjg8kzt.js +169 -0
- package/lib/src/bundled-translations.es-ES-CR_GMwLT.js +169 -0
- package/lib/src/bundled-translations.fr-CA-IeE2VZVM.js +169 -0
- package/lib/src/bundled-translations.fr-FR-Db31s5E2.js +169 -0
- package/lib/src/bundled-translations.pt-BR-BGbvdkDH.js +169 -0
- package/lib/src/bundled-translations.pt-PT-DjrePA9o.js +169 -0
- package/lib/src/bundles/bundled-translations.de-DE.json +23 -26
- package/lib/src/bundles/bundled-translations.es-ES.json +23 -26
- package/lib/src/bundles/bundled-translations.fr-CA.json +23 -26
- package/lib/src/bundles/bundled-translations.fr-FR.json +23 -26
- package/lib/src/bundles/bundled-translations.json +23 -27
- package/lib/src/bundles/bundled-translations.pt-BR.json +23 -26
- package/lib/src/bundles/bundled-translations.pt-PT.json +23 -26
- package/lib/src/clients/ai-assistant-client.d.ts +61 -49
- package/lib/src/clients/ai-assistant-client.js +25 -23
- package/lib/src/css/library.brand-page-brandCrowd.min.css +147 -116
- package/lib/src/css/library.brand-page-brandPage.min.css +147 -108
- package/lib/src/css/library.brand-page-designCom.min.css +147 -116
- package/lib/src/css/library.brand-page-preview.min.css +147 -108
- package/lib/src/index.mjs +1 -1
- package/lib/src/{lib-CLHa1NTp.js → lib-Ct6M2UhH.js} +23317 -24158
- package/lib/src/shared/content-settings/components/content-settings/ContentSettings.mixin.d.ts +0 -5
- package/lib/src/shared/content-settings/components/content-settings/ReplaceImageSettingsForContent.mixin.d.ts +0 -5
- package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItem.mixin.d.ts +0 -2
- package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItemField.mixin.d.ts +0 -8
- package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItemField.mixin.js +0 -15
- package/lib/src/shared/content-settings/components/testimonial-items-field/TestimonialItemsField.mixin.d.ts +1 -0
- package/lib/src/shared/content-settings/components/testimonial-items-field/TestimonialItemsField.mixin.js +8 -0
- package/lib/src/shared/content-settings/components/text-items-field/TextItemsField.mixin.d.ts +1 -0
- package/lib/src/shared/content-settings/components/text-items-field/TextItemsField.mixin.js +12 -0
- package/lib/src/shared/logo-settings/components/LogoSettings.mixin.d.ts +0 -5
- package/lib/src/shared/page-settings/components/page-settings/PageSettings.mixin.d.ts +0 -5
- package/lib/src/shared/page-settings/components/page-settings-section-styles/PageSettingsSectionStyles.mixin.d.ts +0 -5
- package/lib/src/shared/publish-brand-page-with-state/PublishBrandPageModalWithState.mixin.d.ts +0 -5
- package/lib/src/shared/side-bar/components/SideBar.mixin.d.ts +0 -2
- package/lib/src/shared/side-bar/components/SideBarTabButton.mixin.d.ts +0 -2
- package/lib/src/shared/side-bar/store/side-bar-store.d.ts +0 -12
- package/lib/src/shared/side-bar/store/side-bar-store.js +0 -7
- package/lib/src/shared/style-settings/components/StyleSettings.mixin.d.ts +0 -5
- package/package.json +1 -1
- package/src/brand-page/models/brand-page-context.model.ts +0 -12
- package/src/brand-page/models/index.ts +1 -1
- package/src/brand-page/utils/migration.util.ts +1 -8
- package/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.vue +2 -42
- package/src/brand-page-maker/constants/sidebar-constant.ts +0 -8
- package/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.ts +1 -74
- package/src/brand-page-maker/stores/index.ts +0 -1
- package/src/brand-page-maker/utils/rich-text-editor.util.ts +4 -7
- package/src/bundles/bundled-translations.de-DE.json +23 -26
- package/src/bundles/bundled-translations.es-ES.json +23 -26
- package/src/bundles/bundled-translations.fr-CA.json +23 -26
- package/src/bundles/bundled-translations.fr-FR.json +23 -26
- package/src/bundles/bundled-translations.json +23 -27
- package/src/bundles/bundled-translations.pt-BR.json +23 -26
- package/src/bundles/bundled-translations.pt-PT.json +23 -26
- package/src/clients/ai-assistant-client.ts +84 -80
- package/src/shared/common/i18n/common.de-DE.json +1 -3
- package/src/shared/common/i18n/common.es-ES.json +1 -3
- package/src/shared/common/i18n/common.fr-CA.json +1 -3
- package/src/shared/common/i18n/common.fr-FR.json +1 -3
- package/src/shared/common/i18n/common.json +1 -3
- package/src/shared/common/i18n/common.pt-BR.json +1 -3
- package/src/shared/common/i18n/common.pt-PT.json +1 -3
- package/src/shared/content-settings/components/content-settings-item/ContentSettingsItemField.mixin.ts +0 -17
- package/src/shared/content-settings/components/content-settings-item/ContentSettingsItemField.vue +1 -6
- package/src/shared/content-settings/components/generate-ai-button/GenerateAiButton.vue +31 -30
- package/src/{brand-page-maker/components/ai-text-edit → shared/content-settings/components/generate-ai-modal}/i18n/generate-ai.de-DE.json +1 -2
- package/src/{brand-page-maker/components/ai-text-edit → shared/content-settings/components/generate-ai-modal}/i18n/generate-ai.es-ES.json +1 -2
- package/src/{brand-page-maker/components/ai-text-edit → shared/content-settings/components/generate-ai-modal}/i18n/generate-ai.fr-CA.json +1 -2
- package/src/{brand-page-maker/components/ai-text-edit → shared/content-settings/components/generate-ai-modal}/i18n/generate-ai.fr-FR.json +1 -2
- package/src/{brand-page-maker/components/ai-text-edit → shared/content-settings/components/generate-ai-modal}/i18n/generate-ai.json +1 -3
- package/src/{brand-page-maker/components/ai-text-edit → shared/content-settings/components/generate-ai-modal}/i18n/generate-ai.pt-BR.json +1 -2
- package/src/{brand-page-maker/components/ai-text-edit → shared/content-settings/components/generate-ai-modal}/i18n/generate-ai.pt-PT.json +1 -2
- package/src/shared/content-settings/components/testimonial-items-field/TestimonialItemsField.mixin.ts +9 -0
- package/src/shared/content-settings/components/testimonial-items-field/TestimonialItemsField.vue +2 -5
- package/src/shared/content-settings/components/text-items-field/TextItemsField.mixin.ts +15 -0
- package/src/shared/content-settings/components/text-items-field/TextItemsField.vue +2 -5
- package/src/shared/side-bar/components/SideBar.vue +1 -6
- package/src/shared/side-bar/store/side-bar-store.ts +0 -20
- package/lib/src/brand-page-maker/composables/ai-chat/useAiChat.d.ts +0 -54
- package/lib/src/brand-page-maker/composables/ai-chat/useAiChat.js +0 -387
- package/lib/src/brand-page-maker/composables/ai-chat/useAiMetadataBuilder.d.ts +0 -17
- package/lib/src/brand-page-maker/composables/ai-chat/useAiMetadataBuilder.js +0 -33
- package/lib/src/brand-page-maker/composables/ai-chat/useAiTextEditPrompts.d.ts +0 -18
- package/lib/src/brand-page-maker/composables/ai-chat/useAiTextEditPrompts.js +0 -144
- package/lib/src/brand-page-maker/stores/ai-thread/ai-thread-store.d.ts +0 -19
- package/lib/src/brand-page-maker/stores/ai-thread/ai-thread-store.js +0 -17
- package/lib/src/bundled-translations-D_D7Y1MR.js +0 -169
- package/lib/src/bundled-translations.de-DE-TeGS2Ql2.js +0 -169
- package/lib/src/bundled-translations.es-ES-Bbcsxz-o.js +0 -169
- package/lib/src/bundled-translations.fr-CA-EAXpuJ-_.js +0 -169
- package/lib/src/bundled-translations.fr-FR-BBwWEk8v.js +0 -169
- package/lib/src/bundled-translations.pt-BR-2gh_78Y-.js +0 -169
- package/lib/src/bundled-translations.pt-PT-DxWeWbBV.js +0 -169
- package/lib/src/metadata-builder/ai-metadata-executor.d.ts +0 -8
- package/lib/src/metadata-builder/ai-metadata-executor.js +0 -35
- package/lib/src/metadata-builder/builders/update-content-text-builder.d.ts +0 -17
- package/lib/src/metadata-builder/builders/update-content-text-builder.js +0 -108
- package/lib/src/metadata-builder/builders/update-content-text-style-builder.d.ts +0 -16
- package/lib/src/metadata-builder/builders/update-content-text-style-builder.js +0 -212
- package/lib/src/metadata-builder/helpers/rte.helpers.d.ts +0 -3
- package/lib/src/metadata-builder/helpers/rte.helpers.js +0 -53
- package/lib/src/metadata-builder/index.d.ts +0 -2
- package/lib/src/metadata-builder/index.js +0 -2
- package/lib/src/metadata-builder/logger.d.ts +0 -10
- package/lib/src/metadata-builder/logger.js +0 -13
- package/lib/src/metadata-builder/metadata-executor.d.ts +0 -6
- package/lib/src/metadata-builder/metadata-executor.js +0 -37
- package/lib/src/metadata-builder/models.d.ts +0 -35
- package/lib/src/metadata-builder/models.js +0 -21
- package/lib/src/metadata-builder/parsers/ai-toolcall-parser.d.ts +0 -30
- package/lib/src/metadata-builder/parsers/ai-toolcall-parser.js +0 -21
- package/src/brand-page-maker/components/ai-text-edit/AiActionButtons.vue +0 -54
- package/src/brand-page-maker/components/ai-text-edit/AiChatbox.vue +0 -193
- package/src/brand-page-maker/components/ai-text-edit/AiTextEdit.vue +0 -159
- package/src/brand-page-maker/components/ai-text-edit/ImageBubble.vue +0 -79
- package/src/brand-page-maker/components/ai-text-edit/TextBubble.vue +0 -195
- package/src/brand-page-maker/composables/ai-chat/useAiChat.ts +0 -582
- package/src/brand-page-maker/composables/ai-chat/useAiMetadataBuilder.ts +0 -60
- package/src/brand-page-maker/composables/ai-chat/useAiTextEditPrompts.ts +0 -196
- package/src/brand-page-maker/stores/ai-thread/ai-thread-store.ts +0 -19
- package/src/metadata-builder/ai-metadata-executor.ts +0 -59
- package/src/metadata-builder/builders/update-content-text-builder.ts +0 -154
- package/src/metadata-builder/builders/update-content-text-style-builder.ts +0 -349
- package/src/metadata-builder/helpers/rte.helpers.ts +0 -74
- package/src/metadata-builder/index.ts +0 -8
- package/src/metadata-builder/logger.ts +0 -21
- package/src/metadata-builder/metadata-executor.ts +0 -72
- package/src/metadata-builder/models.ts +0 -58
- package/src/metadata-builder/parsers/ai-toolcall-parser.ts +0 -61
|
@@ -37,7 +37,6 @@ export interface AbTestResult {
|
|
|
37
37
|
export interface AbTest {
|
|
38
38
|
bp_3926_freemium_watermark?: AbTestResult;
|
|
39
39
|
bp_4572_ai_text_generation_post_purchase?: AbTestResult;
|
|
40
|
-
bp_4964_ai_text_generation_improvement?: AbTestResult;
|
|
41
40
|
}
|
|
42
41
|
export declare const MEDIA_SIZES: {
|
|
43
42
|
readonly size1x: "size1x";
|
|
@@ -25,7 +25,6 @@ export const AB_TEST_FLAG = {
|
|
|
25
25
|
const AB_TEST_KEYS = {
|
|
26
26
|
BP_3926_FREEMIUM_WATERMARK: 'bc-bp-3926-freemium-cta-in-website-editor',
|
|
27
27
|
BP_4572_AI_TEXT_GENERATION_POST_PURCHASE: 'bc-bp-4572-ai-text-generation-post-purchase',
|
|
28
|
-
BP_4964_AI_TEXT_GENERATION_IMPROVEMENT: 'bc-bp-4964-ai-text-improvement-post-purchase-on-website',
|
|
29
28
|
};
|
|
30
29
|
export const MEDIA_SIZES = {
|
|
31
30
|
size1x: 'size1x',
|
|
@@ -51,9 +50,5 @@ export const getAbTestResults = (abtestKeyValues) => {
|
|
|
51
50
|
if (abtestKeyValues[AB_TEST_KEYS.BP_4572_AI_TEXT_GENERATION_POST_PURCHASE]) {
|
|
52
51
|
abTests.bp_4572_ai_text_generation_post_purchase = getValueType(AB_TEST_KEYS.BP_4572_AI_TEXT_GENERATION_POST_PURCHASE, abtestKeyValues[AB_TEST_KEYS.BP_4572_AI_TEXT_GENERATION_POST_PURCHASE]);
|
|
53
52
|
}
|
|
54
|
-
// AB Test for BP-4572 - AI Text Generation Improvement
|
|
55
|
-
if (abtestKeyValues[AB_TEST_KEYS.BP_4964_AI_TEXT_GENERATION_IMPROVEMENT]) {
|
|
56
|
-
abTests.bp_4964_ai_text_generation_improvement = getValueType(AB_TEST_KEYS.BP_4964_AI_TEXT_GENERATION_IMPROVEMENT, abtestKeyValues[AB_TEST_KEYS.BP_4964_AI_TEXT_GENERATION_IMPROVEMENT]);
|
|
57
|
-
}
|
|
58
53
|
return abTests;
|
|
59
54
|
};
|
|
@@ -111,11 +111,6 @@ export const migrateBrandPageModel = async (brandPageModel, options) => {
|
|
|
111
111
|
brandPageModel,
|
|
112
112
|
useOldLogoRenderSize: false,
|
|
113
113
|
};
|
|
114
|
-
const latestVersion = GetLatestModelVersion();
|
|
115
|
-
// Return early if the model is already at the latest version
|
|
116
|
-
if (migrationResult.brandPageModel.v === latestVersion) {
|
|
117
|
-
return migrationResult;
|
|
118
|
-
}
|
|
119
114
|
if (!modelVersion) {
|
|
120
115
|
modelVersion = 0;
|
|
121
116
|
}
|
|
@@ -125,6 +120,6 @@ export const migrateBrandPageModel = async (brandPageModel, options) => {
|
|
|
125
120
|
}
|
|
126
121
|
}
|
|
127
122
|
// Set the model to latest version
|
|
128
|
-
migrationResult.brandPageModel.v =
|
|
123
|
+
migrationResult.brandPageModel.v = GetLatestModelVersion();
|
|
129
124
|
return migrationResult;
|
|
130
125
|
};
|
|
@@ -120,16 +120,11 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
120
120
|
setBrandPageType({ brandPageType }: {
|
|
121
121
|
brandPageType: "default" | "brandSite" | "brandContact";
|
|
122
122
|
}): void;
|
|
123
|
-
initialiseStoresByBrandPageModelAsync(brandPageModel: import("../../../brand-page").BrandPageModel): Promise<void>;
|
|
124
123
|
initialise({ brandPage, brandPageType, logoDraftDesignAttributes, unsplashApplicationName, templateCategories, personalisationData, isPersonalisationEnabled, businessName, industry, logoVariationImageUrls, shopConfigData, isServerRenderOverride, }: import("../../stores").InitialisePayload): Promise<void>;
|
|
125
124
|
initialisePages({ pages, sections, }: {
|
|
126
125
|
pages: import("../../../brand-page").PageModel[];
|
|
127
126
|
sections: import("../../../shared/page-settings/store").PageSettingsStateSections;
|
|
128
127
|
}): void;
|
|
129
|
-
initialisePagesForCurrentPage({ pages, sections, }: {
|
|
130
|
-
pages: import("../../../brand-page").PageModel[];
|
|
131
|
-
sections: import("../../../shared/page-settings/store").PageSettingsStateSections;
|
|
132
|
-
}): void;
|
|
133
128
|
initialiseAdminMaker(payload: {
|
|
134
129
|
models: import("../../stores/admin-logo-settings").AdminPreviewLogoTemplateModel[];
|
|
135
130
|
}): void;
|
|
@@ -165,16 +165,11 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
165
165
|
setBrandPageType({ brandPageType }: {
|
|
166
166
|
brandPageType: "default" | "brandSite" | "brandContact";
|
|
167
167
|
}): void;
|
|
168
|
-
initialiseStoresByBrandPageModelAsync(brandPageModel: import("../../../brand-page").BrandPageModel): Promise<void>;
|
|
169
168
|
initialise({ brandPage, brandPageType, logoDraftDesignAttributes, unsplashApplicationName, templateCategories, personalisationData, isPersonalisationEnabled, businessName, industry, logoVariationImageUrls, shopConfigData, isServerRenderOverride, }: import("../../stores").InitialisePayload): Promise<void>;
|
|
170
169
|
initialisePages({ pages, sections, }: {
|
|
171
170
|
pages: import("../../../brand-page").PageModel[];
|
|
172
171
|
sections: import("../../../shared/page-settings/store").PageSettingsStateSections;
|
|
173
172
|
}): void;
|
|
174
|
-
initialisePagesForCurrentPage({ pages, sections, }: {
|
|
175
|
-
pages: import("../../../brand-page").PageModel[];
|
|
176
|
-
sections: import("../../../shared/page-settings/store").PageSettingsStateSections;
|
|
177
|
-
}): void;
|
|
178
173
|
initialiseAdminMaker(payload: {
|
|
179
174
|
models: AdminPreviewLogoTemplateModel[];
|
|
180
175
|
}): void;
|
|
@@ -204,8 +199,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
204
199
|
setSelectedSettingsSection(payload: {
|
|
205
200
|
sectionName?: string | undefined;
|
|
206
201
|
}): void;
|
|
207
|
-
setAiTextEditContext(payload: import("../../../shared/side-bar/store").AiTextEditContext): void;
|
|
208
|
-
clearAiTextEditContext(): void;
|
|
209
202
|
}>;
|
|
210
203
|
userStore: import("pinia").Store<"brandPageMakerUser", import("../../stores").UserState, {}, {
|
|
211
204
|
setUserState(payload: {
|
|
@@ -110,16 +110,11 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
110
110
|
setBrandPageType({ brandPageType }: {
|
|
111
111
|
brandPageType: "default" | "brandSite" | "brandContact";
|
|
112
112
|
}): void;
|
|
113
|
-
initialiseStoresByBrandPageModelAsync(brandPageModel: import("../../../lib").BrandPageModel): Promise<void>;
|
|
114
113
|
initialise({ brandPage, brandPageType, logoDraftDesignAttributes, unsplashApplicationName, templateCategories, personalisationData, isPersonalisationEnabled, businessName, industry, logoVariationImageUrls, shopConfigData, isServerRenderOverride, }: import("../../stores").InitialisePayload): Promise<void>;
|
|
115
114
|
initialisePages({ pages, sections, }: {
|
|
116
115
|
pages: import("../../../lib").PageModel[];
|
|
117
116
|
sections: import("../../../shared/page-settings/store").PageSettingsStateSections;
|
|
118
117
|
}): void;
|
|
119
|
-
initialisePagesForCurrentPage({ pages, sections, }: {
|
|
120
|
-
pages: import("../../../lib").PageModel[];
|
|
121
|
-
sections: import("../../../shared/page-settings/store").PageSettingsStateSections;
|
|
122
|
-
}): void;
|
|
123
118
|
initialiseAdminMaker(payload: {
|
|
124
119
|
models: import("../../stores/admin-logo-settings").AdminPreviewLogoTemplateModel[];
|
|
125
120
|
}): void;
|
package/lib/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.d.ts
CHANGED
|
@@ -616,16 +616,11 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
616
616
|
setBrandPageType({ brandPageType }: {
|
|
617
617
|
brandPageType: "default" | "brandSite" | "brandContact";
|
|
618
618
|
}): void;
|
|
619
|
-
initialiseStoresByBrandPageModelAsync(brandPageModel: import("../../../brand-page").BrandPageModel): Promise<void>;
|
|
620
619
|
initialise({ brandPage, brandPageType, logoDraftDesignAttributes, unsplashApplicationName, templateCategories, personalisationData, isPersonalisationEnabled, businessName, industry, logoVariationImageUrls, shopConfigData, isServerRenderOverride, }: import("../../stores").InitialisePayload): Promise<void>;
|
|
621
620
|
initialisePages({ pages, sections, }: {
|
|
622
621
|
pages: import("../../../brand-page").PageModel[];
|
|
623
622
|
sections: import("../../../shared/page-settings/store").PageSettingsStateSections;
|
|
624
623
|
}): void;
|
|
625
|
-
initialisePagesForCurrentPage({ pages, sections, }: {
|
|
626
|
-
pages: import("../../../brand-page").PageModel[];
|
|
627
|
-
sections: import("../../../shared/page-settings/store").PageSettingsStateSections;
|
|
628
|
-
}): void;
|
|
629
624
|
initialiseAdminMaker(payload: {
|
|
630
625
|
models: import("../../stores/admin-logo-settings").AdminPreviewLogoTemplateModel[];
|
|
631
626
|
}): void;
|
|
@@ -931,8 +926,6 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
931
926
|
setSelectedSettingsSection(payload: {
|
|
932
927
|
sectionName?: string | undefined;
|
|
933
928
|
}): void;
|
|
934
|
-
setAiTextEditContext(payload: import("../../../shared/side-bar/store").AiTextEditContext): void;
|
|
935
|
-
clearAiTextEditContext(): void;
|
|
936
929
|
}>;
|
|
937
930
|
pageSettingsStore: import("pinia").Store<"uiPageSettings", import("../../../shared/page-settings/store").PageSettingsState, {
|
|
938
931
|
pageIndex(): number;
|
|
@@ -116,16 +116,11 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
116
116
|
setBrandPageType({ brandPageType }: {
|
|
117
117
|
brandPageType: "default" | "brandSite" | "brandContact";
|
|
118
118
|
}): void;
|
|
119
|
-
initialiseStoresByBrandPageModelAsync(brandPageModel: import("../../../brand-page").BrandPageModel): Promise<void>;
|
|
120
119
|
initialise({ brandPage, brandPageType, logoDraftDesignAttributes, unsplashApplicationName, templateCategories, personalisationData, isPersonalisationEnabled, businessName, industry, logoVariationImageUrls, shopConfigData, isServerRenderOverride, }: import("../../stores").InitialisePayload): Promise<void>;
|
|
121
120
|
initialisePages({ pages, sections, }: {
|
|
122
121
|
pages: import("../../../brand-page").PageModel[];
|
|
123
122
|
sections: import("../../../shared/page-settings/store").PageSettingsStateSections;
|
|
124
123
|
}): void;
|
|
125
|
-
initialisePagesForCurrentPage({ pages, sections, }: {
|
|
126
|
-
pages: import("../../../brand-page").PageModel[];
|
|
127
|
-
sections: import("../../../shared/page-settings/store").PageSettingsStateSections;
|
|
128
|
-
}): void;
|
|
129
124
|
initialiseAdminMaker(payload: {
|
|
130
125
|
models: import("../../stores/admin-logo-settings").AdminPreviewLogoTemplateModel[];
|
|
131
126
|
}): void;
|
|
@@ -362,16 +362,11 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
362
362
|
setBrandPageType({ brandPageType }: {
|
|
363
363
|
brandPageType: "default" | "brandSite" | "brandContact";
|
|
364
364
|
}): void;
|
|
365
|
-
initialiseStoresByBrandPageModelAsync(brandPageModel: import("../../../brand-page").BrandPageModel): Promise<void>;
|
|
366
365
|
initialise({ brandPage, brandPageType, logoDraftDesignAttributes, unsplashApplicationName, templateCategories, personalisationData, isPersonalisationEnabled, businessName, industry, logoVariationImageUrls, shopConfigData, isServerRenderOverride, }: import("../../stores").InitialisePayload): Promise<void>;
|
|
367
366
|
initialisePages({ pages, sections, }: {
|
|
368
367
|
pages: import("../../../brand-page").PageModel[];
|
|
369
368
|
sections: import("../../../shared/page-settings/store").PageSettingsStateSections;
|
|
370
369
|
}): void;
|
|
371
|
-
initialisePagesForCurrentPage({ pages, sections, }: {
|
|
372
|
-
pages: import("../../../brand-page").PageModel[];
|
|
373
|
-
sections: import("../../../shared/page-settings/store").PageSettingsStateSections;
|
|
374
|
-
}): void;
|
|
375
370
|
initialiseAdminMaker(payload: {
|
|
376
371
|
models: import("../../stores/admin-logo-settings").AdminPreviewLogoTemplateModel[];
|
|
377
372
|
}): void;
|
|
@@ -363,16 +363,11 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
363
363
|
setBrandPageType({ brandPageType }: {
|
|
364
364
|
brandPageType: "default" | "brandSite" | "brandContact";
|
|
365
365
|
}): void;
|
|
366
|
-
initialiseStoresByBrandPageModelAsync(brandPageModel: import("../../../brand-page").BrandPageModel): Promise<void>;
|
|
367
366
|
initialise({ brandPage, brandPageType, logoDraftDesignAttributes, unsplashApplicationName, templateCategories, personalisationData, isPersonalisationEnabled, businessName, industry, logoVariationImageUrls, shopConfigData, isServerRenderOverride, }: import("../../stores").InitialisePayload): Promise<void>;
|
|
368
367
|
initialisePages({ pages, sections, }: {
|
|
369
368
|
pages: import("../../../brand-page").PageModel[];
|
|
370
369
|
sections: import("../../../shared/page-settings/store").PageSettingsStateSections;
|
|
371
370
|
}): void;
|
|
372
|
-
initialisePagesForCurrentPage({ pages, sections, }: {
|
|
373
|
-
pages: import("../../../brand-page").PageModel[];
|
|
374
|
-
sections: import("../../../shared/page-settings/store").PageSettingsStateSections;
|
|
375
|
-
}): void;
|
|
376
371
|
initialiseAdminMaker(payload: {
|
|
377
372
|
models: import("../../stores/admin-logo-settings").AdminPreviewLogoTemplateModel[];
|
|
378
373
|
}): void;
|
|
@@ -126,16 +126,11 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
126
126
|
setBrandPageType({ brandPageType }: {
|
|
127
127
|
brandPageType: "default" | "brandSite" | "brandContact";
|
|
128
128
|
}): void;
|
|
129
|
-
initialiseStoresByBrandPageModelAsync(brandPageModel: import("../../../brand-page").BrandPageModel): Promise<void>;
|
|
130
129
|
initialise({ brandPage, brandPageType, logoDraftDesignAttributes, unsplashApplicationName, templateCategories, personalisationData, isPersonalisationEnabled, businessName, industry, logoVariationImageUrls, shopConfigData, isServerRenderOverride, }: import("../../stores").InitialisePayload): Promise<void>;
|
|
131
130
|
initialisePages({ pages, sections, }: {
|
|
132
131
|
pages: import("../../../brand-page").PageModel[];
|
|
133
132
|
sections: import("../../../shared/page-settings/store").PageSettingsStateSections;
|
|
134
133
|
}): void;
|
|
135
|
-
initialisePagesForCurrentPage({ pages, sections, }: {
|
|
136
|
-
pages: import("../../../brand-page").PageModel[];
|
|
137
|
-
sections: import("../../../shared/page-settings/store").PageSettingsStateSections;
|
|
138
|
-
}): void;
|
|
139
134
|
initialiseAdminMaker(payload: {
|
|
140
135
|
models: import("../../stores/admin-logo-settings").AdminPreviewLogoTemplateModel[];
|
|
141
136
|
}): void;
|
|
@@ -414,16 +414,11 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
414
414
|
setBrandPageType({ brandPageType }: {
|
|
415
415
|
brandPageType: "default" | "brandSite" | "brandContact";
|
|
416
416
|
}): void;
|
|
417
|
-
initialiseStoresByBrandPageModelAsync(brandPageModel: import("../../../brand-page").BrandPageModel): Promise<void>;
|
|
418
417
|
initialise({ brandPage, brandPageType, logoDraftDesignAttributes, unsplashApplicationName, templateCategories, personalisationData, isPersonalisationEnabled, businessName, industry, logoVariationImageUrls, shopConfigData, isServerRenderOverride, }: import("../../stores").InitialisePayload): Promise<void>;
|
|
419
418
|
initialisePages({ pages, sections, }: {
|
|
420
419
|
pages: import("../../../brand-page").PageModel[];
|
|
421
420
|
sections: import("../../../shared/page-settings/store").PageSettingsStateSections;
|
|
422
421
|
}): void;
|
|
423
|
-
initialisePagesForCurrentPage({ pages, sections, }: {
|
|
424
|
-
pages: import("../../../brand-page").PageModel[];
|
|
425
|
-
sections: import("../../../shared/page-settings/store").PageSettingsStateSections;
|
|
426
|
-
}): void;
|
|
427
422
|
initialiseAdminMaker(payload: {
|
|
428
423
|
models: import("../../stores/admin-logo-settings").AdminPreviewLogoTemplateModel[];
|
|
429
424
|
}): void;
|
|
@@ -9,7 +9,6 @@ export const SIDE_BAR_TAB_NAMES = {
|
|
|
9
9
|
ADMIN_LOGO_SETTINGS: 'AdminLogoSettings',
|
|
10
10
|
STYLE_SETTINGS: 'StyleSettings',
|
|
11
11
|
BRANDPAGE_SETTINGS: 'BrandPageSettings',
|
|
12
|
-
AI_TEXT_EDIT: 'AiTextEdit',
|
|
13
12
|
};
|
|
14
13
|
export const DEFAULT_SIDE_BAR_TABS = () => [
|
|
15
14
|
{
|
|
@@ -35,13 +34,6 @@ export const DEFAULT_SIDE_BAR_TABS = () => [
|
|
|
35
34
|
accessibleDisplayName: 'Content',
|
|
36
35
|
isVisible: true,
|
|
37
36
|
},
|
|
38
|
-
{
|
|
39
|
-
name: SIDE_BAR_TAB_NAMES.AI_TEXT_EDIT,
|
|
40
|
-
displayName: 'AI Text',
|
|
41
|
-
iconName: 'sparkles',
|
|
42
|
-
accessibleDisplayName: 'AI Text Edit',
|
|
43
|
-
isVisible: false,
|
|
44
|
-
},
|
|
45
37
|
{
|
|
46
38
|
name: SIDE_BAR_TAB_NAMES.BACKGROUND_SETTINGS,
|
|
47
39
|
displayName: constantsTr(`backgroundDisplayName`),
|
|
@@ -190,22 +190,11 @@ export declare const useBrandPageMakerStore: import("pinia").StoreDefinition<"br
|
|
|
190
190
|
setBrandPageType({ brandPageType }: {
|
|
191
191
|
brandPageType: BrandPageType;
|
|
192
192
|
}): void;
|
|
193
|
-
initialiseStoresByBrandPageModelAsync(brandPageModel: BrandPageModel): Promise<void>;
|
|
194
193
|
initialise({ brandPage, brandPageType, logoDraftDesignAttributes, unsplashApplicationName, templateCategories, personalisationData, isPersonalisationEnabled, businessName, industry, logoVariationImageUrls, shopConfigData, isServerRenderOverride, }: InitialisePayload): Promise<void>;
|
|
195
194
|
initialisePages({ pages, sections, }: {
|
|
196
195
|
pages: PageModel[];
|
|
197
196
|
sections: PageSettingsStateSections;
|
|
198
197
|
}): void;
|
|
199
|
-
/**
|
|
200
|
-
* Re-initialise pages while preserving the current page index.
|
|
201
|
-
* Used by AI tool-call updates so that changes on pages 1+ are
|
|
202
|
-
* reflected in the content settings store without resetting the
|
|
203
|
-
* user back to page 0.
|
|
204
|
-
*/
|
|
205
|
-
initialisePagesForCurrentPage({ pages, sections, }: {
|
|
206
|
-
pages: PageModel[];
|
|
207
|
-
sections: PageSettingsStateSections;
|
|
208
|
-
}): void;
|
|
209
198
|
initialiseAdminMaker(payload: {
|
|
210
199
|
models: AdminPreviewLogoTemplateModel[];
|
|
211
200
|
}): void;
|
|
@@ -455,23 +455,6 @@ export const useBrandPageMakerStore = defineStore('brandPageMaker', {
|
|
|
455
455
|
brandPageType === BRAND_PAGE_TYPES.brandContact;
|
|
456
456
|
this.isBrandContact = brandPageType === BRAND_PAGE_TYPES.brandContact;
|
|
457
457
|
},
|
|
458
|
-
// TODO: refactor and extend this method for initialise stores.
|
|
459
|
-
// TODO: waiting to do undo/redo feature to extend this functionality
|
|
460
|
-
async initialiseStoresByBrandPageModelAsync(brandPageModel) {
|
|
461
|
-
this.initialisePagesForCurrentPage({
|
|
462
|
-
pages: brandPageModel.pages,
|
|
463
|
-
sections: {
|
|
464
|
-
[PAGE_SECTIONS.header]: {
|
|
465
|
-
[VIEWPORTS.desktop]: brandPageModel.pageHeaderDesktop,
|
|
466
|
-
[VIEWPORTS.mobile]: brandPageModel.pageHeaderMobile,
|
|
467
|
-
},
|
|
468
|
-
[PAGE_SECTIONS.footer]: {
|
|
469
|
-
[VIEWPORTS.desktop]: brandPageModel.pageFooterDesktop,
|
|
470
|
-
[VIEWPORTS.mobile]: brandPageModel.pageFooterMobile,
|
|
471
|
-
},
|
|
472
|
-
},
|
|
473
|
-
});
|
|
474
|
-
},
|
|
475
458
|
async initialise({ brandPage, brandPageType, logoDraftDesignAttributes, unsplashApplicationName, templateCategories, personalisationData, isPersonalisationEnabled, businessName, industry, logoVariationImageUrls, shopConfigData, isServerRenderOverride = false, }) {
|
|
476
459
|
const brandPageContainerStore = useBrandPageContainerStore();
|
|
477
460
|
const userStore = useBrandPageMakerUserStore();
|
|
@@ -694,9 +677,7 @@ export const useBrandPageMakerStore = defineStore('brandPageMaker', {
|
|
|
694
677
|
}))
|
|
695
678
|
.filter((c) => c !== null),
|
|
696
679
|
}));
|
|
697
|
-
contentSettingsStore.setItems({
|
|
698
|
-
items: contentItems[0].contents,
|
|
699
|
-
});
|
|
680
|
+
contentSettingsStore.setItems({ items: contentItems[0].contents });
|
|
700
681
|
pageSettingsStore.setState({
|
|
701
682
|
newState: {
|
|
702
683
|
currentPageIndex: 0,
|
|
@@ -706,41 +687,6 @@ export const useBrandPageMakerStore = defineStore('brandPageMaker', {
|
|
|
706
687
|
},
|
|
707
688
|
});
|
|
708
689
|
},
|
|
709
|
-
/**
|
|
710
|
-
* Re-initialise pages while preserving the current page index.
|
|
711
|
-
* Used by AI tool-call updates so that changes on pages 1+ are
|
|
712
|
-
* reflected in the content settings store without resetting the
|
|
713
|
-
* user back to page 0.
|
|
714
|
-
*/
|
|
715
|
-
initialisePagesForCurrentPage({ pages, sections, }) {
|
|
716
|
-
const userStore = useBrandPageMakerUserStore();
|
|
717
|
-
const contentSettingsStore = useUiContentSettingsStore();
|
|
718
|
-
const pageSettingsStore = useUiPageSettingsStore();
|
|
719
|
-
const contentItems = pages.map((p) => ({
|
|
720
|
-
...p,
|
|
721
|
-
contents: p.contents
|
|
722
|
-
.map((content) => mapBrandPageContentToContentSettingsItem(content, {
|
|
723
|
-
userState: userStore.$state,
|
|
724
|
-
brandPageType: this.brandPageType,
|
|
725
|
-
}))
|
|
726
|
-
.filter((c) => c !== null),
|
|
727
|
-
}));
|
|
728
|
-
// Preserve the current page index so that re-initialisation
|
|
729
|
-
// loads the correct page's contents into the content settings
|
|
730
|
-
// store instead of always resetting to page 0.
|
|
731
|
-
const currentPageIndex = Math.min(pageSettingsStore.currentPageIndex, contentItems.length - 1);
|
|
732
|
-
contentSettingsStore.setItems({
|
|
733
|
-
items: contentItems[currentPageIndex]?.contents ?? contentItems[0].contents,
|
|
734
|
-
});
|
|
735
|
-
pageSettingsStore.setState({
|
|
736
|
-
newState: {
|
|
737
|
-
currentPageIndex,
|
|
738
|
-
pages: contentItems,
|
|
739
|
-
isNewPageModalVisible: false,
|
|
740
|
-
sections,
|
|
741
|
-
},
|
|
742
|
-
});
|
|
743
|
-
},
|
|
744
690
|
initialiseAdminMaker(payload) {
|
|
745
691
|
const userStore = useBrandPageMakerUserStore();
|
|
746
692
|
const adminLogoSettingsStore = useAdminLogoSettingsStore();
|
|
@@ -707,13 +707,10 @@ export const getUpdatedHTMLFromEditor = (externalEditor, contentText, newContent
|
|
|
707
707
|
color: getRTEColor(newContentStyle.color, 'text'),
|
|
708
708
|
});
|
|
709
709
|
}
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
color: getRTEColor(newContentStyle.backgroundColor, 'background'),
|
|
715
|
-
})
|
|
716
|
-
: chain.unsetHighlight();
|
|
710
|
+
if (newContentStyle?.backgroundColor) {
|
|
711
|
+
chain = chain.setMark('highlight', {
|
|
712
|
+
color: getRTEColor(newContentStyle.backgroundColor, 'background'),
|
|
713
|
+
});
|
|
717
714
|
}
|
|
718
715
|
if (!currentAlignment.textAlign && newContentStyle?.textAlign) {
|
|
719
716
|
chain = chain.setTextAlign(newContentStyle.textAlign);
|