@designcrowd/library.brand-page 5.17.6 → 5.17.7
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-BI2KuOEF.js → CreatedOnBrandCrowd-de-de-BUQFMhZb.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-en-us-BYLJCjLJ.js → CreatedOnBrandCrowd-en-us-QS-5r4XI.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-es-es-Y_D6cuGE.js → CreatedOnBrandCrowd-es-es-CP2iH-n0.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-fr-fr-CqCBRjYh.js → CreatedOnBrandCrowd-fr-ca-qfD4NmQZ.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-fr-ca-CqCBRjYh.js → CreatedOnBrandCrowd-fr-fr-qfD4NmQZ.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-pt-pt-Bt0YF6DA.js → CreatedOnBrandCrowd-pt-br-CfmaB7zE.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-pt-br-Bt0YF6DA.js → CreatedOnBrandCrowd-pt-pt-CfmaB7zE.js} +1 -1
- package/lib/src/{CreatedOnDcom-de-de-CEk8FBEG.js → CreatedOnDcom-de-de-BxSUWfGN.js} +1 -1
- package/lib/src/{CreatedOnDcom-en-us-DWw4Tm2L.js → CreatedOnDcom-en-us-CSeUdR6v.js} +1 -1
- package/lib/src/{CreatedOnDcom-es-es-DpG-8o98.js → CreatedOnDcom-es-es-g7rCfAtP.js} +1 -1
- package/lib/src/{CreatedOnDcom-fr-ca-CEla7RmR.js → CreatedOnDcom-fr-ca-Bh_BTb-O.js} +1 -1
- package/lib/src/{CreatedOnDcom-fr-fr-DRXeVTlV.js → CreatedOnDcom-fr-fr-Clgd_Ujm.js} +1 -1
- package/lib/src/{CreatedOnDcom-pt-br-Bzu_phZc.js → CreatedOnDcom-pt-br-Dlgk0myX.js} +1 -1
- package/lib/src/{CreatedOnDcom-pt-pt-DWax8Er7.js → CreatedOnDcom-pt-pt-B14APfrn.js} +1 -1
- package/lib/src/brand-page/models/brand-page-context.model.d.ts +2 -1
- package/lib/src/brand-page/models/brand-page-context.model.js +5 -0
- package/lib/src/brand-page/models/index.d.ts +1 -0
- package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.d.ts +62 -2
- package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.js +1 -0
- package/lib/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.d.ts +60 -2
- package/lib/src/brand-page-maker/components/preview/Preview.mixin.d.ts +30 -1
- package/lib/src/brand-page-maker/components/quick-link-bar/QuickLinkBar.mixin.d.ts +60 -2
- package/lib/src/brand-page-maker/components/seo-settings/SeoPageSettings.mixin.d.ts +60 -2
- package/lib/src/brand-page-maker/components/seo-settings/UrlSettings.mixin.d.ts +60 -2
- package/lib/src/brand-page-maker/components/seo-settings/UseExistingDomainModal.mixin.d.ts +60 -2
- package/lib/src/brand-page-maker/components/template-preview/TemplatePreview.mixin.d.ts +60 -2
- package/lib/src/brand-page-maker/components/upgrade-to-premium-button/UpgradeToPremiumButton.mixin.d.ts +60 -2
- package/lib/src/brand-page-maker/composables/ai-chat/useAiChat.js +3 -1
- package/lib/src/brand-page-maker/composables/ai-chat/useAiMetadataBuilder.d.ts +1 -1
- package/lib/src/brand-page-maker/composables/ai-chat/useAiMetadataBuilder.js +6 -6
- package/lib/src/brand-page-maker/composables/ai-chat/useAiWebsiteBuilderChat.d.ts +2 -0
- package/lib/src/brand-page-maker/composables/ai-chat/useAiWebsiteBuilderChat.js +258 -0
- package/lib/src/brand-page-maker/constants/sidebar-constant.d.ts +1 -0
- package/lib/src/brand-page-maker/constants/sidebar-constant.js +8 -0
- package/lib/src/brand-page-maker/stores/ai-thread/ai-website-builder-thread-store.d.ts +16 -0
- package/lib/src/brand-page-maker/stores/ai-thread/ai-website-builder-thread-store.js +14 -0
- package/lib/src/brand-page-maker/stores/brandpage-container/brand-page-container-store.d.ts +62 -3
- package/lib/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.js +2 -0
- package/lib/src/brand-page-maker/stores/index.d.ts +1 -0
- package/lib/src/brand-page-maker/stores/index.js +1 -0
- package/lib/src/brand-page-maker/stores/snapshot/snapshot-store.d.ts +2 -0
- package/lib/src/brand-page-maker/stores/snapshot/snapshot-store.js +9 -0
- package/lib/src/clients/ai-assistant-client.d.ts +8 -0
- package/lib/src/clients/ai-assistant-client.js +11 -1
- package/lib/src/composables/useSnapshot.js +33 -0
- package/lib/src/css/library.brand-page-brandCrowd.min.css +19 -6
- package/lib/src/css/library.brand-page-brandPage.min.css +19 -6
- package/lib/src/css/library.brand-page-designCom.min.css +19 -6
- package/lib/src/css/library.brand-page-preview.min.css +19 -6
- package/lib/src/index.d.ts +1 -0
- package/lib/src/index.mjs +42 -41
- package/lib/src/{lib-DODSa6QK.js → lib-pOkCQP0J.js} +28820 -26841
- package/lib/src/lib.js +1 -0
- package/lib/src/metadata-builder/ai-metadata-executor.d.ts +1 -1
- package/lib/src/metadata-builder/ai-metadata-executor.js +68 -7
- package/lib/src/metadata-builder/builders/add-page-builder.d.ts +14 -0
- package/lib/src/metadata-builder/builders/add-page-builder.js +66 -0
- package/lib/src/metadata-builder/builders/remove-page-builder.d.ts +13 -0
- package/lib/src/metadata-builder/builders/remove-page-builder.js +50 -0
- package/lib/src/metadata-builder/builders/section-builders/about-section-builder.d.ts +6 -0
- package/lib/src/metadata-builder/builders/section-builders/about-section-builder.js +17 -0
- package/lib/src/metadata-builder/builders/section-builders/banner-section-builder.d.ts +6 -0
- package/lib/src/metadata-builder/builders/section-builders/banner-section-builder.js +25 -0
- package/lib/src/metadata-builder/builders/section-builders/base-section-builder.d.ts +40 -0
- package/lib/src/metadata-builder/builders/section-builders/base-section-builder.js +108 -0
- package/lib/src/metadata-builder/builders/section-builders/button-section-builder.d.ts +6 -0
- package/lib/src/metadata-builder/builders/section-builders/button-section-builder.js +16 -0
- package/lib/src/metadata-builder/builders/section-builders/contact-form-builder.d.ts +6 -0
- package/lib/src/metadata-builder/builders/section-builders/contact-form-builder.js +27 -0
- package/lib/src/metadata-builder/builders/section-builders/delete-section-builder.d.ts +13 -0
- package/lib/src/metadata-builder/builders/section-builders/delete-section-builder.js +37 -0
- package/lib/src/metadata-builder/builders/section-builders/divider-section-builder.d.ts +6 -0
- package/lib/src/metadata-builder/builders/section-builders/divider-section-builder.js +16 -0
- package/lib/src/metadata-builder/builders/section-builders/image-gallery-builder.d.ts +6 -0
- package/lib/src/metadata-builder/builders/section-builders/image-gallery-builder.js +76 -0
- package/lib/src/metadata-builder/builders/section-builders/image-section-builder.d.ts +6 -0
- package/lib/src/metadata-builder/builders/section-builders/image-section-builder.js +16 -0
- package/lib/src/metadata-builder/builders/section-builders/images-section-builder.d.ts +6 -0
- package/lib/src/metadata-builder/builders/section-builders/images-section-builder.js +158 -0
- package/lib/src/metadata-builder/builders/section-builders/index.d.ts +17 -0
- package/lib/src/metadata-builder/builders/section-builders/index.js +17 -0
- package/lib/src/metadata-builder/builders/section-builders/mailing-list-builder.d.ts +6 -0
- package/lib/src/metadata-builder/builders/section-builders/mailing-list-builder.js +17 -0
- package/lib/src/metadata-builder/builders/section-builders/mailing-list-section-builder.d.ts +6 -0
- package/lib/src/metadata-builder/builders/section-builders/mailing-list-section-builder.js +16 -0
- package/lib/src/metadata-builder/builders/section-builders/move-section-builder.d.ts +15 -0
- package/lib/src/metadata-builder/builders/section-builders/move-section-builder.js +62 -0
- package/lib/src/metadata-builder/builders/section-builders/profile-section-builder.d.ts +6 -0
- package/lib/src/metadata-builder/builders/section-builders/profile-section-builder.js +16 -0
- package/lib/src/metadata-builder/builders/section-builders/shapes-section-builder.d.ts +6 -0
- package/lib/src/metadata-builder/builders/section-builders/shapes-section-builder.js +162 -0
- package/lib/src/metadata-builder/builders/section-builders/social-links-builder.d.ts +6 -0
- package/lib/src/metadata-builder/builders/section-builders/social-links-builder.js +50 -0
- package/lib/src/metadata-builder/builders/section-builders/testimonial-section-builder.d.ts +6 -0
- package/lib/src/metadata-builder/builders/section-builders/testimonial-section-builder.js +133 -0
- package/lib/src/metadata-builder/builders/section-builders/text-section-builder.d.ts +6 -0
- package/lib/src/metadata-builder/builders/section-builders/text-section-builder.js +154 -0
- package/lib/src/metadata-builder/builders/section-content-factory.d.ts +3 -0
- package/lib/src/metadata-builder/builders/section-content-factory.js +13 -0
- package/lib/src/metadata-builder/builders/section-field-maps.d.ts +12 -0
- package/lib/src/metadata-builder/builders/section-field-maps.js +180 -0
- package/lib/src/metadata-builder/builders/section-field-utils.d.ts +11 -0
- package/lib/src/metadata-builder/builders/section-field-utils.js +109 -0
- package/lib/src/metadata-builder/helpers/rte.helpers.d.ts +6 -0
- package/lib/src/metadata-builder/helpers/rte.helpers.js +16 -1
- package/lib/src/metadata-builder/metadata-executor.js +71 -1
- package/lib/src/metadata-builder/models.d.ts +54 -0
- package/lib/src/metadata-builder/models.js +58 -0
- package/lib/src/metadata-builder/parsers/ai-toolcall-parser.d.ts +51 -3
- package/lib/src/metadata-builder/parsers/ai-toolcall-parser.js +110 -13
- package/lib/src/metadata-builder/parsers/section-tool-arguments.d.ts +285 -0
- package/lib/src/metadata-builder/parsers/section-tool-arguments.js +7 -0
- package/lib/src/shared/content-settings/components/payment-config-field/PaymentConfigField.mixin.d.ts +60 -2
- package/lib/src/shared/logo-settings/components/LogoSettings.mixin.d.ts +60 -2
- package/lib/src/shared/page-settings/components/page-settings/PageSettings.mixin.d.ts +60 -2
- package/lib/src/shared/page-settings/components/page-settings-section-styles/PageSettingsSectionStyles.mixin.d.ts +60 -2
- package/lib/src/shared/publish-brand-page-with-state/PublishBrandPageModalWithState.mixin.d.ts +90 -3
- package/lib/src/shared/side-bar/components/SideBar.mixin.d.ts +61 -2
- package/lib/src/shared/side-bar/components/SideBar.mixin.js +6 -0
- package/lib/src/shared/style-settings/components/StyleSettings.mixin.d.ts +60 -2
- package/lib/src/utils/minify-brand-page-metadata.d.ts +22 -0
- package/lib/src/utils/minify-brand-page-metadata.js +344 -0
- package/package.json +1 -1
- package/src/brand-page/models/brand-page-context.model.ts +12 -3
- package/src/brand-page/models/index.ts +1 -0
- package/src/brand-page-maker/components/ai-website-builder/AiWebsiteBuilder.vue +80 -0
- package/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.ts +4 -0
- package/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.vue +9 -2
- package/src/brand-page-maker/composables/ai-chat/useAiChat.ts +4 -1
- package/src/brand-page-maker/composables/ai-chat/useAiMetadataBuilder.ts +6 -6
- package/src/brand-page-maker/composables/ai-chat/useAiWebsiteBuilderChat.ts +363 -0
- package/src/brand-page-maker/constants/sidebar-constant.ts +8 -0
- package/src/brand-page-maker/stores/ai-thread/ai-website-builder-thread-store.ts +19 -0
- package/src/brand-page-maker/stores/brandpage-container/brand-page-container-store.ts +3 -1
- package/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.ts +4 -0
- package/src/brand-page-maker/stores/index.ts +1 -0
- package/src/brand-page-maker/stores/snapshot/snapshot-store.ts +12 -0
- package/src/clients/ai-assistant-client.ts +17 -1
- package/src/composables/useSnapshot.ts +47 -0
- package/src/lib.ts +4 -0
- package/src/metadata-builder/ai-metadata-executor.ts +116 -26
- package/src/metadata-builder/builders/add-page-builder.ts +98 -0
- package/src/metadata-builder/builders/remove-page-builder.ts +83 -0
- package/src/metadata-builder/builders/section-builders/about-section-builder.ts +28 -0
- package/src/metadata-builder/builders/section-builders/banner-section-builder.ts +45 -0
- package/src/metadata-builder/builders/section-builders/base-section-builder.ts +160 -0
- package/src/metadata-builder/builders/section-builders/button-section-builder.ts +24 -0
- package/src/metadata-builder/builders/section-builders/contact-form-builder.ts +43 -0
- package/src/metadata-builder/builders/section-builders/delete-section-builder.ts +63 -0
- package/src/metadata-builder/builders/section-builders/divider-section-builder.ts +27 -0
- package/src/metadata-builder/builders/section-builders/image-gallery-builder.ts +111 -0
- package/src/metadata-builder/builders/section-builders/image-section-builder.ts +24 -0
- package/src/metadata-builder/builders/section-builders/images-section-builder.ts +223 -0
- package/src/metadata-builder/builders/section-builders/index.ts +21 -0
- package/src/metadata-builder/builders/section-builders/mailing-list-builder.ts +29 -0
- package/src/metadata-builder/builders/section-builders/mailing-list-section-builder.ts +27 -0
- package/src/metadata-builder/builders/section-builders/move-section-builder.ts +100 -0
- package/src/metadata-builder/builders/section-builders/profile-section-builder.ts +27 -0
- package/src/metadata-builder/builders/section-builders/shapes-section-builder.ts +231 -0
- package/src/metadata-builder/builders/section-builders/social-links-builder.ts +79 -0
- package/src/metadata-builder/builders/section-builders/testimonial-section-builder.ts +194 -0
- package/src/metadata-builder/builders/section-builders/text-section-builder.ts +234 -0
- package/src/metadata-builder/builders/section-content-factory.ts +20 -0
- package/src/metadata-builder/builders/section-field-maps.ts +235 -0
- package/src/metadata-builder/builders/section-field-utils.ts +157 -0
- package/src/metadata-builder/helpers/rte.helpers.ts +23 -1
- package/src/metadata-builder/metadata-executor.ts +96 -4
- package/src/metadata-builder/models.ts +62 -0
- package/src/metadata-builder/parsers/ai-toolcall-parser.ts +141 -17
- package/src/metadata-builder/parsers/section-tool-arguments.ts +417 -0
- package/src/shared/side-bar/components/SideBar.mixin.ts +10 -0
- package/src/utils/minify-brand-page-metadata.ts +407 -0
package/lib/src/shared/publish-brand-page-with-state/PublishBrandPageModalWithState.mixin.d.ts
CHANGED
|
@@ -62,7 +62,36 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
62
62
|
errorMessage: import("vue").ComputedRef<string | null>;
|
|
63
63
|
publishErrorMessage: import("vue").ComputedRef<string>;
|
|
64
64
|
isBrandPageSlugEditMode: import("vue").ComputedRef<boolean>;
|
|
65
|
-
abTests: import("vue").ComputedRef<
|
|
65
|
+
abTests: import("vue").ComputedRef<{
|
|
66
|
+
bp_3926_freemium_watermark?: {
|
|
67
|
+
key: string;
|
|
68
|
+
value: string;
|
|
69
|
+
isControl: boolean;
|
|
70
|
+
isVariation: boolean;
|
|
71
|
+
isExcluded: boolean;
|
|
72
|
+
} | undefined;
|
|
73
|
+
bp_4572_ai_text_generation_post_purchase?: {
|
|
74
|
+
key: string;
|
|
75
|
+
value: string;
|
|
76
|
+
isControl: boolean;
|
|
77
|
+
isVariation: boolean;
|
|
78
|
+
isExcluded: boolean;
|
|
79
|
+
} | undefined;
|
|
80
|
+
bp_4964_ai_text_generation_improvement?: {
|
|
81
|
+
key: string;
|
|
82
|
+
value: string;
|
|
83
|
+
isControl: boolean;
|
|
84
|
+
isVariation: boolean;
|
|
85
|
+
isExcluded: boolean;
|
|
86
|
+
} | undefined;
|
|
87
|
+
bp_5245_ai_website_assistant?: {
|
|
88
|
+
key: string;
|
|
89
|
+
value: string;
|
|
90
|
+
isControl: boolean;
|
|
91
|
+
isVariation: boolean;
|
|
92
|
+
isExcluded: boolean;
|
|
93
|
+
} | undefined;
|
|
94
|
+
}>;
|
|
66
95
|
brandPageType: import("vue").ComputedRef<"default" | "brandSite" | "brandContact">;
|
|
67
96
|
isSubsequentPublish: import("vue").ComputedRef<boolean>;
|
|
68
97
|
brandPageMakerStore: import("pinia").Store<"brandPageMaker", import("@brand-page-maker/stores").BrandPageMakerState, {
|
|
@@ -262,7 +291,36 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
262
291
|
eventButtonLocation?: string | undefined;
|
|
263
292
|
websiteUpsellModalViewModel?: any;
|
|
264
293
|
showPublishOptionModal?: boolean | undefined;
|
|
265
|
-
abTests:
|
|
294
|
+
abTests: {
|
|
295
|
+
bp_3926_freemium_watermark?: {
|
|
296
|
+
key: string;
|
|
297
|
+
value: string;
|
|
298
|
+
isControl: boolean;
|
|
299
|
+
isVariation: boolean;
|
|
300
|
+
isExcluded: boolean;
|
|
301
|
+
} | undefined;
|
|
302
|
+
bp_4572_ai_text_generation_post_purchase?: {
|
|
303
|
+
key: string;
|
|
304
|
+
value: string;
|
|
305
|
+
isControl: boolean;
|
|
306
|
+
isVariation: boolean;
|
|
307
|
+
isExcluded: boolean;
|
|
308
|
+
} | undefined;
|
|
309
|
+
bp_4964_ai_text_generation_improvement?: {
|
|
310
|
+
key: string;
|
|
311
|
+
value: string;
|
|
312
|
+
isControl: boolean;
|
|
313
|
+
isVariation: boolean;
|
|
314
|
+
isExcluded: boolean;
|
|
315
|
+
} | undefined;
|
|
316
|
+
bp_5245_ai_website_assistant?: {
|
|
317
|
+
key: string;
|
|
318
|
+
value: string;
|
|
319
|
+
isControl: boolean;
|
|
320
|
+
isVariation: boolean;
|
|
321
|
+
isExcluded: boolean;
|
|
322
|
+
} | undefined;
|
|
323
|
+
};
|
|
266
324
|
isSubsequentPublish: boolean;
|
|
267
325
|
isContextualUpgradeModalVisible: boolean;
|
|
268
326
|
contextualUpgradeType: string | number | symbol | undefined;
|
|
@@ -324,7 +382,36 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
324
382
|
eventButtonLocation?: string | undefined;
|
|
325
383
|
websiteUpsellModalViewModel?: any;
|
|
326
384
|
showPublishOptionModal?: boolean | undefined;
|
|
327
|
-
abTests:
|
|
385
|
+
abTests: {
|
|
386
|
+
bp_3926_freemium_watermark?: {
|
|
387
|
+
key: string;
|
|
388
|
+
value: string;
|
|
389
|
+
isControl: boolean;
|
|
390
|
+
isVariation: boolean;
|
|
391
|
+
isExcluded: boolean;
|
|
392
|
+
} | undefined;
|
|
393
|
+
bp_4572_ai_text_generation_post_purchase?: {
|
|
394
|
+
key: string;
|
|
395
|
+
value: string;
|
|
396
|
+
isControl: boolean;
|
|
397
|
+
isVariation: boolean;
|
|
398
|
+
isExcluded: boolean;
|
|
399
|
+
} | undefined;
|
|
400
|
+
bp_4964_ai_text_generation_improvement?: {
|
|
401
|
+
key: string;
|
|
402
|
+
value: string;
|
|
403
|
+
isControl: boolean;
|
|
404
|
+
isVariation: boolean;
|
|
405
|
+
isExcluded: boolean;
|
|
406
|
+
} | undefined;
|
|
407
|
+
bp_5245_ai_website_assistant?: {
|
|
408
|
+
key: string;
|
|
409
|
+
value: string;
|
|
410
|
+
isControl: boolean;
|
|
411
|
+
isVariation: boolean;
|
|
412
|
+
isExcluded: boolean;
|
|
413
|
+
} | undefined;
|
|
414
|
+
};
|
|
328
415
|
isSubsequentPublish: boolean;
|
|
329
416
|
isContextualUpgradeModalVisible: boolean;
|
|
330
417
|
contextualUpgradeType: string | number | symbol | undefined;
|
|
@@ -73,7 +73,36 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
73
73
|
eventButtonLocation?: string | undefined;
|
|
74
74
|
websiteUpsellModalViewModel?: any;
|
|
75
75
|
showPublishOptionModal?: boolean | undefined;
|
|
76
|
-
abTests:
|
|
76
|
+
abTests: {
|
|
77
|
+
bp_3926_freemium_watermark?: {
|
|
78
|
+
key: string;
|
|
79
|
+
value: string;
|
|
80
|
+
isControl: boolean;
|
|
81
|
+
isVariation: boolean;
|
|
82
|
+
isExcluded: boolean;
|
|
83
|
+
} | undefined;
|
|
84
|
+
bp_4572_ai_text_generation_post_purchase?: {
|
|
85
|
+
key: string;
|
|
86
|
+
value: string;
|
|
87
|
+
isControl: boolean;
|
|
88
|
+
isVariation: boolean;
|
|
89
|
+
isExcluded: boolean;
|
|
90
|
+
} | undefined;
|
|
91
|
+
bp_4964_ai_text_generation_improvement?: {
|
|
92
|
+
key: string;
|
|
93
|
+
value: string;
|
|
94
|
+
isControl: boolean;
|
|
95
|
+
isVariation: boolean;
|
|
96
|
+
isExcluded: boolean;
|
|
97
|
+
} | undefined;
|
|
98
|
+
bp_5245_ai_website_assistant?: {
|
|
99
|
+
key: string;
|
|
100
|
+
value: string;
|
|
101
|
+
isControl: boolean;
|
|
102
|
+
isVariation: boolean;
|
|
103
|
+
isExcluded: boolean;
|
|
104
|
+
} | undefined;
|
|
105
|
+
};
|
|
77
106
|
isSubsequentPublish: boolean;
|
|
78
107
|
isContextualUpgradeModalVisible: boolean;
|
|
79
108
|
contextualUpgradeType: string | number | symbol | undefined;
|
|
@@ -135,7 +164,36 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
135
164
|
eventButtonLocation?: string | undefined;
|
|
136
165
|
websiteUpsellModalViewModel?: any;
|
|
137
166
|
showPublishOptionModal?: boolean | undefined;
|
|
138
|
-
abTests:
|
|
167
|
+
abTests: {
|
|
168
|
+
bp_3926_freemium_watermark?: {
|
|
169
|
+
key: string;
|
|
170
|
+
value: string;
|
|
171
|
+
isControl: boolean;
|
|
172
|
+
isVariation: boolean;
|
|
173
|
+
isExcluded: boolean;
|
|
174
|
+
} | undefined;
|
|
175
|
+
bp_4572_ai_text_generation_post_purchase?: {
|
|
176
|
+
key: string;
|
|
177
|
+
value: string;
|
|
178
|
+
isControl: boolean;
|
|
179
|
+
isVariation: boolean;
|
|
180
|
+
isExcluded: boolean;
|
|
181
|
+
} | undefined;
|
|
182
|
+
bp_4964_ai_text_generation_improvement?: {
|
|
183
|
+
key: string;
|
|
184
|
+
value: string;
|
|
185
|
+
isControl: boolean;
|
|
186
|
+
isVariation: boolean;
|
|
187
|
+
isExcluded: boolean;
|
|
188
|
+
} | undefined;
|
|
189
|
+
bp_5245_ai_website_assistant?: {
|
|
190
|
+
key: string;
|
|
191
|
+
value: string;
|
|
192
|
+
isControl: boolean;
|
|
193
|
+
isVariation: boolean;
|
|
194
|
+
isExcluded: boolean;
|
|
195
|
+
} | undefined;
|
|
196
|
+
};
|
|
139
197
|
isSubsequentPublish: boolean;
|
|
140
198
|
isContextualUpgradeModalVisible: boolean;
|
|
141
199
|
contextualUpgradeType: string | number | symbol | undefined;
|
|
@@ -280,6 +338,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
280
338
|
'side-bar-content': import("vue").Ref<null, null>;
|
|
281
339
|
isPrepurchase: import("vue").ComputedRef<boolean>;
|
|
282
340
|
isBrandPageLoaded: import("vue").ComputedRef<boolean>;
|
|
341
|
+
isAiWebsiteAssistantVisible: import("vue").ComputedRef<boolean | undefined>;
|
|
283
342
|
}, {
|
|
284
343
|
SIDE_BAR_CONTENT_ID: string;
|
|
285
344
|
sideBarContentRef: string;
|
|
@@ -3,6 +3,7 @@ import { useUiSideBarStore } from '../store';
|
|
|
3
3
|
import { useBrandPageContainerStore, useBrandPageMakerUserStore, useBrandPageMakerStore, } from '@brand-page-maker/stores';
|
|
4
4
|
import { SIDE_BAR_CONTENT_ID } from '../../content-settings/constants';
|
|
5
5
|
import { useUiContentSettingsStore } from '../../content-settings/store';
|
|
6
|
+
import { SIDE_BAR_TAB_NAMES } from '@src/brand-page-maker/constants/sidebar-constant';
|
|
6
7
|
export default defineComponent({
|
|
7
8
|
props: {
|
|
8
9
|
hasQuickLinks: {
|
|
@@ -37,6 +38,8 @@ export default defineComponent({
|
|
|
37
38
|
'side-bar-content': ref(null),
|
|
38
39
|
isPrepurchase: computed(() => brandPageContainerStore.isPrePurchase),
|
|
39
40
|
isBrandPageLoaded: computed(() => brandPageMakerStore.isBrandPageLoaded),
|
|
41
|
+
isAiWebsiteAssistantVisible: computed(() => brandPageContainerStore.abTests.bp_5245_ai_website_assistant
|
|
42
|
+
?.isVariation),
|
|
40
43
|
};
|
|
41
44
|
},
|
|
42
45
|
data: () => ({ SIDE_BAR_CONTENT_ID, sideBarContentRef: 'side-bar-content' }),
|
|
@@ -85,6 +88,9 @@ export default defineComponent({
|
|
|
85
88
|
if (!this.isMobileScreenSize && tab.isMobileOnly) {
|
|
86
89
|
return false;
|
|
87
90
|
}
|
|
91
|
+
if (tab.name === SIDE_BAR_TAB_NAMES.AI_WEBSITE_BUILDER) {
|
|
92
|
+
return this.isAiWebsiteAssistantVisible;
|
|
93
|
+
}
|
|
88
94
|
return tab.isVisible;
|
|
89
95
|
},
|
|
90
96
|
contentScrollToTop() {
|
|
@@ -669,7 +669,36 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
669
669
|
eventButtonLocation?: string | undefined;
|
|
670
670
|
websiteUpsellModalViewModel?: any;
|
|
671
671
|
showPublishOptionModal?: boolean | undefined;
|
|
672
|
-
abTests:
|
|
672
|
+
abTests: {
|
|
673
|
+
bp_3926_freemium_watermark?: {
|
|
674
|
+
key: string;
|
|
675
|
+
value: string;
|
|
676
|
+
isControl: boolean;
|
|
677
|
+
isVariation: boolean;
|
|
678
|
+
isExcluded: boolean;
|
|
679
|
+
} | undefined;
|
|
680
|
+
bp_4572_ai_text_generation_post_purchase?: {
|
|
681
|
+
key: string;
|
|
682
|
+
value: string;
|
|
683
|
+
isControl: boolean;
|
|
684
|
+
isVariation: boolean;
|
|
685
|
+
isExcluded: boolean;
|
|
686
|
+
} | undefined;
|
|
687
|
+
bp_4964_ai_text_generation_improvement?: {
|
|
688
|
+
key: string;
|
|
689
|
+
value: string;
|
|
690
|
+
isControl: boolean;
|
|
691
|
+
isVariation: boolean;
|
|
692
|
+
isExcluded: boolean;
|
|
693
|
+
} | undefined;
|
|
694
|
+
bp_5245_ai_website_assistant?: {
|
|
695
|
+
key: string;
|
|
696
|
+
value: string;
|
|
697
|
+
isControl: boolean;
|
|
698
|
+
isVariation: boolean;
|
|
699
|
+
isExcluded: boolean;
|
|
700
|
+
} | undefined;
|
|
701
|
+
};
|
|
673
702
|
isSubsequentPublish: boolean;
|
|
674
703
|
isContextualUpgradeModalVisible: boolean;
|
|
675
704
|
contextualUpgradeType: string | number | symbol | undefined;
|
|
@@ -731,7 +760,36 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
731
760
|
eventButtonLocation?: string | undefined;
|
|
732
761
|
websiteUpsellModalViewModel?: any;
|
|
733
762
|
showPublishOptionModal?: boolean | undefined;
|
|
734
|
-
abTests:
|
|
763
|
+
abTests: {
|
|
764
|
+
bp_3926_freemium_watermark?: {
|
|
765
|
+
key: string;
|
|
766
|
+
value: string;
|
|
767
|
+
isControl: boolean;
|
|
768
|
+
isVariation: boolean;
|
|
769
|
+
isExcluded: boolean;
|
|
770
|
+
} | undefined;
|
|
771
|
+
bp_4572_ai_text_generation_post_purchase?: {
|
|
772
|
+
key: string;
|
|
773
|
+
value: string;
|
|
774
|
+
isControl: boolean;
|
|
775
|
+
isVariation: boolean;
|
|
776
|
+
isExcluded: boolean;
|
|
777
|
+
} | undefined;
|
|
778
|
+
bp_4964_ai_text_generation_improvement?: {
|
|
779
|
+
key: string;
|
|
780
|
+
value: string;
|
|
781
|
+
isControl: boolean;
|
|
782
|
+
isVariation: boolean;
|
|
783
|
+
isExcluded: boolean;
|
|
784
|
+
} | undefined;
|
|
785
|
+
bp_5245_ai_website_assistant?: {
|
|
786
|
+
key: string;
|
|
787
|
+
value: string;
|
|
788
|
+
isControl: boolean;
|
|
789
|
+
isVariation: boolean;
|
|
790
|
+
isExcluded: boolean;
|
|
791
|
+
} | undefined;
|
|
792
|
+
};
|
|
735
793
|
isSubsequentPublish: boolean;
|
|
736
794
|
isContextualUpgradeModalVisible: boolean;
|
|
737
795
|
contextualUpgradeType: string | number | symbol | undefined;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { BrandPageModel, NavModel, PageStyles } from '../brand-page/models';
|
|
2
|
+
import type { ContentType } from '../brand-page/models/content.model';
|
|
3
|
+
type MinifiedContent = {
|
|
4
|
+
id: string;
|
|
5
|
+
type: ContentType;
|
|
6
|
+
[key: string]: unknown;
|
|
7
|
+
};
|
|
8
|
+
type MinifiedPage = {
|
|
9
|
+
id: string;
|
|
10
|
+
title: string;
|
|
11
|
+
slug: string;
|
|
12
|
+
isHidden?: boolean;
|
|
13
|
+
contents: MinifiedContent[];
|
|
14
|
+
};
|
|
15
|
+
export interface MinifiedBrandPageMetadata {
|
|
16
|
+
v: number;
|
|
17
|
+
styles: PageStyles;
|
|
18
|
+
pages: MinifiedPage[];
|
|
19
|
+
nav: NavModel;
|
|
20
|
+
}
|
|
21
|
+
export declare const minifyBrandPageMetadata: (model: BrandPageModel) => MinifiedBrandPageMetadata;
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,344 @@
|
|
|
1
|
+
const stripHtmlTags = (html) => html.replace(/<[^>]*>/g, '').trim();
|
|
2
|
+
const BUTTON_TYPES = [
|
|
3
|
+
'general-link',
|
|
4
|
+
'website',
|
|
5
|
+
'email',
|
|
6
|
+
'phone',
|
|
7
|
+
'facebook',
|
|
8
|
+
'x',
|
|
9
|
+
'instagram',
|
|
10
|
+
'youtube',
|
|
11
|
+
'linkedin',
|
|
12
|
+
'pinterest',
|
|
13
|
+
'twitch',
|
|
14
|
+
'tiktok',
|
|
15
|
+
];
|
|
16
|
+
const stripOptional = (value) => {
|
|
17
|
+
if (typeof value === 'string' && value) {
|
|
18
|
+
return stripHtmlTags(value);
|
|
19
|
+
}
|
|
20
|
+
return undefined;
|
|
21
|
+
};
|
|
22
|
+
const includeStyle = (value) => {
|
|
23
|
+
if (value && typeof value === 'object') {
|
|
24
|
+
return value;
|
|
25
|
+
}
|
|
26
|
+
return undefined;
|
|
27
|
+
};
|
|
28
|
+
const includeString = (value) => {
|
|
29
|
+
if (typeof value === 'string' && value) {
|
|
30
|
+
return value;
|
|
31
|
+
}
|
|
32
|
+
return undefined;
|
|
33
|
+
};
|
|
34
|
+
const minifyContent = (content) => {
|
|
35
|
+
const base = { id: content.id, type: content.type };
|
|
36
|
+
const c = content;
|
|
37
|
+
if (BUTTON_TYPES.includes(content.type)) {
|
|
38
|
+
return {
|
|
39
|
+
...base,
|
|
40
|
+
...(stripOptional(c.title) !== undefined && {
|
|
41
|
+
title: stripOptional(c.title),
|
|
42
|
+
}),
|
|
43
|
+
...(includeString(c.url) && { url: c.url }),
|
|
44
|
+
...(includeStyle(c.titleStyle) && { titleStyle: c.titleStyle }),
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
switch (content.type) {
|
|
48
|
+
case 'banner-section':
|
|
49
|
+
return {
|
|
50
|
+
...base,
|
|
51
|
+
...(includeString(c.imageUrl) && { imageUrl: c.imageUrl }),
|
|
52
|
+
...(stripOptional(c.title) !== undefined && {
|
|
53
|
+
title: stripOptional(c.title),
|
|
54
|
+
}),
|
|
55
|
+
...(stripOptional(c.description) !== undefined && {
|
|
56
|
+
description: stripOptional(c.description),
|
|
57
|
+
}),
|
|
58
|
+
...(stripOptional(c.buttonText) !== undefined && {
|
|
59
|
+
buttonText: stripOptional(c.buttonText),
|
|
60
|
+
}),
|
|
61
|
+
...(includeString(c.url) && { url: c.url }),
|
|
62
|
+
...(includeString(c.displayStyle) && { displayStyle: c.displayStyle }),
|
|
63
|
+
...(includeStyle(c.titleStyle) && { titleStyle: c.titleStyle }),
|
|
64
|
+
...(includeStyle(c.descriptionStyle) && {
|
|
65
|
+
descriptionStyle: c.descriptionStyle,
|
|
66
|
+
}),
|
|
67
|
+
...(includeStyle(c.buttonTextStyle) && {
|
|
68
|
+
buttonTextStyle: c.buttonTextStyle,
|
|
69
|
+
}),
|
|
70
|
+
};
|
|
71
|
+
case 'about-section':
|
|
72
|
+
return {
|
|
73
|
+
...base,
|
|
74
|
+
...(includeString(c.imageUrl) && { imageUrl: c.imageUrl }),
|
|
75
|
+
...(stripOptional(c.title) !== undefined && {
|
|
76
|
+
title: stripOptional(c.title),
|
|
77
|
+
}),
|
|
78
|
+
...(stripOptional(c.paragraph) !== undefined && {
|
|
79
|
+
paragraph: stripOptional(c.paragraph),
|
|
80
|
+
}),
|
|
81
|
+
...(includeString(c.displayStyle) && { displayStyle: c.displayStyle }),
|
|
82
|
+
...(includeStyle(c.titleStyle) && { titleStyle: c.titleStyle }),
|
|
83
|
+
...(includeStyle(c.paragraphStyle) && {
|
|
84
|
+
paragraphStyle: c.paragraphStyle,
|
|
85
|
+
}),
|
|
86
|
+
};
|
|
87
|
+
case 'testimonial-section':
|
|
88
|
+
return {
|
|
89
|
+
...base,
|
|
90
|
+
...(stripOptional(c.title) !== undefined && {
|
|
91
|
+
title: stripOptional(c.title),
|
|
92
|
+
}),
|
|
93
|
+
...(includeString(c.displayStyle) && { displayStyle: c.displayStyle }),
|
|
94
|
+
...(Array.isArray(c.items) && {
|
|
95
|
+
items: c.items.map((item, index) => ({
|
|
96
|
+
position: index + 1,
|
|
97
|
+
...(stripOptional(item.name) !== undefined && {
|
|
98
|
+
name: stripOptional(item.name),
|
|
99
|
+
}),
|
|
100
|
+
...(stripOptional(item.position) !== undefined && {
|
|
101
|
+
jobTitle: stripOptional(item.position),
|
|
102
|
+
}),
|
|
103
|
+
...(stripOptional(item.testimonials) !== undefined && {
|
|
104
|
+
testimonials: stripOptional(item.testimonials),
|
|
105
|
+
}),
|
|
106
|
+
...(includeString(item.imageUrl) && { imageUrl: item.imageUrl }),
|
|
107
|
+
})),
|
|
108
|
+
}),
|
|
109
|
+
...(includeStyle(c.titleStyle) && { titleStyle: c.titleStyle }),
|
|
110
|
+
...(includeStyle(c.testimonialStyle) && {
|
|
111
|
+
testimonialStyle: c.testimonialStyle,
|
|
112
|
+
}),
|
|
113
|
+
...(includeStyle(c.nameStyle) && { nameStyle: c.nameStyle }),
|
|
114
|
+
...(includeStyle(c.positionStyle) && {
|
|
115
|
+
positionStyle: c.positionStyle,
|
|
116
|
+
}),
|
|
117
|
+
};
|
|
118
|
+
case 'images-section':
|
|
119
|
+
case 'shapes-section':
|
|
120
|
+
return {
|
|
121
|
+
...base,
|
|
122
|
+
...(stripOptional(c.title) !== undefined && {
|
|
123
|
+
title: stripOptional(c.title),
|
|
124
|
+
}),
|
|
125
|
+
...(stripOptional(c.description) !== undefined && {
|
|
126
|
+
description: stripOptional(c.description),
|
|
127
|
+
}),
|
|
128
|
+
...(includeString(c.displayStyle) && { displayStyle: c.displayStyle }),
|
|
129
|
+
...(Array.isArray(c.items) && {
|
|
130
|
+
items: c.items.map((item, index) => ({
|
|
131
|
+
position: index + 1,
|
|
132
|
+
...(includeString(item.imageUrl) && { imageUrl: item.imageUrl }),
|
|
133
|
+
...(stripOptional(item.title) !== undefined && {
|
|
134
|
+
title: stripOptional(item.title),
|
|
135
|
+
}),
|
|
136
|
+
...(stripOptional(item.paragraph) !== undefined && {
|
|
137
|
+
paragraph: stripOptional(item.paragraph),
|
|
138
|
+
}),
|
|
139
|
+
})),
|
|
140
|
+
}),
|
|
141
|
+
...(includeStyle(c.titleStyle) && { titleStyle: c.titleStyle }),
|
|
142
|
+
...(includeStyle(c.descriptionStyle) && {
|
|
143
|
+
descriptionStyle: c.descriptionStyle,
|
|
144
|
+
}),
|
|
145
|
+
...(includeStyle(c.headingStyle) && { headingStyle: c.headingStyle }),
|
|
146
|
+
...(includeStyle(c.paragraphStyle) && {
|
|
147
|
+
paragraphStyle: c.paragraphStyle,
|
|
148
|
+
}),
|
|
149
|
+
};
|
|
150
|
+
case 'text':
|
|
151
|
+
return {
|
|
152
|
+
...base,
|
|
153
|
+
...(stripOptional(c.text) !== undefined && {
|
|
154
|
+
text: stripOptional(c.text),
|
|
155
|
+
}),
|
|
156
|
+
...(Array.isArray(c.textItems) && {
|
|
157
|
+
textItems: c.textItems.map((item, index) => ({
|
|
158
|
+
position: index + 1,
|
|
159
|
+
...(stripOptional(item.text) !== undefined && {
|
|
160
|
+
text: stripOptional(item.text),
|
|
161
|
+
}),
|
|
162
|
+
...(includeStyle(item.textStyle) && { textStyle: item.textStyle }),
|
|
163
|
+
})),
|
|
164
|
+
}),
|
|
165
|
+
...(includeStyle(c.textStyle) && { textStyle: c.textStyle }),
|
|
166
|
+
};
|
|
167
|
+
case 'profile':
|
|
168
|
+
return {
|
|
169
|
+
...base,
|
|
170
|
+
...(includeString(c.avatarImageUrl) && {
|
|
171
|
+
avatarImageUrl: c.avatarImageUrl,
|
|
172
|
+
}),
|
|
173
|
+
...(stripOptional(c.name) !== undefined && {
|
|
174
|
+
name: stripOptional(c.name),
|
|
175
|
+
}),
|
|
176
|
+
...(stripOptional(c.title) !== undefined && {
|
|
177
|
+
title: stripOptional(c.title),
|
|
178
|
+
}),
|
|
179
|
+
...(stripOptional(c.description) !== undefined && {
|
|
180
|
+
description: stripOptional(c.description),
|
|
181
|
+
}),
|
|
182
|
+
...(includeStyle(c.nameStyle) && { nameStyle: c.nameStyle }),
|
|
183
|
+
...(includeStyle(c.titleStyle) && { titleStyle: c.titleStyle }),
|
|
184
|
+
...(includeStyle(c.descriptionStyle) && {
|
|
185
|
+
descriptionStyle: c.descriptionStyle,
|
|
186
|
+
}),
|
|
187
|
+
};
|
|
188
|
+
case 'contact-form':
|
|
189
|
+
return {
|
|
190
|
+
...base,
|
|
191
|
+
...(stripOptional(c.title) !== undefined && {
|
|
192
|
+
title: stripOptional(c.title),
|
|
193
|
+
}),
|
|
194
|
+
...(stripOptional(c.description) !== undefined && {
|
|
195
|
+
description: stripOptional(c.description),
|
|
196
|
+
}),
|
|
197
|
+
...(stripOptional(c.buttonText) !== undefined && {
|
|
198
|
+
buttonText: stripOptional(c.buttonText),
|
|
199
|
+
}),
|
|
200
|
+
...(stripOptional(c.successMessage) !== undefined && {
|
|
201
|
+
successMessage: stripOptional(c.successMessage),
|
|
202
|
+
}),
|
|
203
|
+
...(includeStyle(c.titleStyle) && { titleStyle: c.titleStyle }),
|
|
204
|
+
...(includeStyle(c.descriptionStyle) && {
|
|
205
|
+
descriptionStyle: c.descriptionStyle,
|
|
206
|
+
}),
|
|
207
|
+
...(includeStyle(c.buttonTextStyle) && {
|
|
208
|
+
buttonTextStyle: c.buttonTextStyle,
|
|
209
|
+
}),
|
|
210
|
+
};
|
|
211
|
+
case 'mailing-list':
|
|
212
|
+
return {
|
|
213
|
+
...base,
|
|
214
|
+
...(stripOptional(c.title) !== undefined && {
|
|
215
|
+
title: stripOptional(c.title),
|
|
216
|
+
}),
|
|
217
|
+
...(stripOptional(c.buttonText) !== undefined && {
|
|
218
|
+
buttonText: stripOptional(c.buttonText),
|
|
219
|
+
}),
|
|
220
|
+
...(includeStyle(c.titleStyle) && { titleStyle: c.titleStyle }),
|
|
221
|
+
...(includeStyle(c.buttonTextStyle) && {
|
|
222
|
+
buttonTextStyle: c.buttonTextStyle,
|
|
223
|
+
}),
|
|
224
|
+
};
|
|
225
|
+
case 'booking-section':
|
|
226
|
+
return {
|
|
227
|
+
...base,
|
|
228
|
+
...(stripOptional(c.title) !== undefined && {
|
|
229
|
+
title: stripOptional(c.title),
|
|
230
|
+
}),
|
|
231
|
+
...(stripOptional(c.description) !== undefined && {
|
|
232
|
+
description: stripOptional(c.description),
|
|
233
|
+
}),
|
|
234
|
+
...(stripOptional(c.buttonText) !== undefined && {
|
|
235
|
+
buttonText: stripOptional(c.buttonText),
|
|
236
|
+
}),
|
|
237
|
+
...(includeString(c.url) && { url: c.url }),
|
|
238
|
+
...(includeStyle(c.titleStyle) && { titleStyle: c.titleStyle }),
|
|
239
|
+
...(includeStyle(c.descriptionStyle) && {
|
|
240
|
+
descriptionStyle: c.descriptionStyle,
|
|
241
|
+
}),
|
|
242
|
+
...(includeStyle(c.buttonTextStyle) && {
|
|
243
|
+
buttonTextStyle: c.buttonTextStyle,
|
|
244
|
+
}),
|
|
245
|
+
};
|
|
246
|
+
case 'social-links':
|
|
247
|
+
return {
|
|
248
|
+
...base,
|
|
249
|
+
...(stripOptional(c.title) !== undefined && {
|
|
250
|
+
title: stripOptional(c.title),
|
|
251
|
+
}),
|
|
252
|
+
...(Array.isArray(c.links) && {
|
|
253
|
+
links: c.links.map((link, index) => ({
|
|
254
|
+
position: index + 1,
|
|
255
|
+
...(includeString(link.url) && { url: link.url }),
|
|
256
|
+
...(includeString(link.imageUrl) && { imageUrl: link.imageUrl }),
|
|
257
|
+
})),
|
|
258
|
+
}),
|
|
259
|
+
...(includeStyle(c.titleStyle) && { titleStyle: c.titleStyle }),
|
|
260
|
+
};
|
|
261
|
+
case 'divider-section':
|
|
262
|
+
return {
|
|
263
|
+
...base,
|
|
264
|
+
...(c.paddingStyle !== undefined && { paddingStyle: c.paddingStyle }),
|
|
265
|
+
...(includeString(c.dividerStyle) && { dividerStyle: c.dividerStyle }),
|
|
266
|
+
};
|
|
267
|
+
case 'shop-section':
|
|
268
|
+
return {
|
|
269
|
+
...base,
|
|
270
|
+
...(stripOptional(c.title) !== undefined && {
|
|
271
|
+
title: stripOptional(c.title),
|
|
272
|
+
}),
|
|
273
|
+
...(stripOptional(c.description) !== undefined && {
|
|
274
|
+
description: stripOptional(c.description),
|
|
275
|
+
}),
|
|
276
|
+
...(includeString(c.displayStyle) && { displayStyle: c.displayStyle }),
|
|
277
|
+
...(Array.isArray(c.items) && { items: c.items }),
|
|
278
|
+
...(includeStyle(c.titleStyle) && { titleStyle: c.titleStyle }),
|
|
279
|
+
...(includeStyle(c.descriptionStyle) && {
|
|
280
|
+
descriptionStyle: c.descriptionStyle,
|
|
281
|
+
}),
|
|
282
|
+
};
|
|
283
|
+
case 'image':
|
|
284
|
+
return {
|
|
285
|
+
...base,
|
|
286
|
+
...(includeString(c.imageUrl) && { imageUrl: c.imageUrl }),
|
|
287
|
+
...(stripOptional(c.imageTitle) !== undefined && {
|
|
288
|
+
imageTitle: stripOptional(c.imageTitle),
|
|
289
|
+
}),
|
|
290
|
+
};
|
|
291
|
+
case 'image-gallery':
|
|
292
|
+
return {
|
|
293
|
+
...base,
|
|
294
|
+
...(Array.isArray(c.images) && {
|
|
295
|
+
images: c.images.map((img, index) => ({
|
|
296
|
+
position: index + 1,
|
|
297
|
+
...(includeString(img.imageUrl) && { imageUrl: img.imageUrl }),
|
|
298
|
+
...(stripOptional(img.imageTitle) !== undefined && {
|
|
299
|
+
imageTitle: stripOptional(img.imageTitle),
|
|
300
|
+
}),
|
|
301
|
+
})),
|
|
302
|
+
}),
|
|
303
|
+
};
|
|
304
|
+
case 'video':
|
|
305
|
+
return {
|
|
306
|
+
...base,
|
|
307
|
+
...(includeString(c.videoUrl) && { videoUrl: c.videoUrl }),
|
|
308
|
+
...(includeString(c.displayStyle) && { displayStyle: c.displayStyle }),
|
|
309
|
+
};
|
|
310
|
+
case 'map':
|
|
311
|
+
return {
|
|
312
|
+
...base,
|
|
313
|
+
...(c.address && { address: c.address }),
|
|
314
|
+
};
|
|
315
|
+
case 'logo':
|
|
316
|
+
return base;
|
|
317
|
+
case 'request-payment':
|
|
318
|
+
case 'support-me':
|
|
319
|
+
return {
|
|
320
|
+
...base,
|
|
321
|
+
...(stripOptional(c.title) !== undefined && {
|
|
322
|
+
title: stripOptional(c.title),
|
|
323
|
+
}),
|
|
324
|
+
...(stripOptional(c.description) !== undefined && {
|
|
325
|
+
description: stripOptional(c.description),
|
|
326
|
+
}),
|
|
327
|
+
};
|
|
328
|
+
default:
|
|
329
|
+
return base;
|
|
330
|
+
}
|
|
331
|
+
};
|
|
332
|
+
const minifyPage = (page, nav) => ({
|
|
333
|
+
id: page.id,
|
|
334
|
+
title: page.title,
|
|
335
|
+
slug: nav.routes.find((r) => r.pageId === page.id)?.pageSlug ?? '',
|
|
336
|
+
...(page.isHidden && { isHidden: page.isHidden }),
|
|
337
|
+
contents: page.contents.map(minifyContent),
|
|
338
|
+
});
|
|
339
|
+
export const minifyBrandPageMetadata = (model) => ({
|
|
340
|
+
v: model.v,
|
|
341
|
+
styles: model.styles,
|
|
342
|
+
pages: model.pages.map((p) => minifyPage(p, model.nav)),
|
|
343
|
+
nav: model.nav,
|
|
344
|
+
});
|