@designcrowd/library.brand-page 6.2.3-ast-faq → 6.2.3
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-BRisMzFY.js → CreatedOnBrandCrowd-de-de-Cn0M-eZ1.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-en-us-CDDsL9GX.js → CreatedOnBrandCrowd-en-us-DRLMSDZr.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-es-es-BkZrEo4j.js → CreatedOnBrandCrowd-es-es-BglTu73U.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-fr-fr-sx_ury7R.js → CreatedOnBrandCrowd-fr-ca-Bj6YZ_el.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-fr-ca-sx_ury7R.js → CreatedOnBrandCrowd-fr-fr-Bj6YZ_el.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-pt-pt-DCWiAfkU.js → CreatedOnBrandCrowd-pt-br-DEoOmQ1F.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-pt-br-DCWiAfkU.js → CreatedOnBrandCrowd-pt-pt-DEoOmQ1F.js} +1 -1
- package/lib/src/{CreatedOnDcom-de-de-C1S7f22L.js → CreatedOnDcom-de-de-BZ7gTt4Z.js} +1 -1
- package/lib/src/{CreatedOnDcom-en-us-DgTlWaXE.js → CreatedOnDcom-en-us-CD6Km5sH.js} +1 -1
- package/lib/src/{CreatedOnDcom-es-es-CxSQJe_V.js → CreatedOnDcom-es-es-CNpZHvEl.js} +1 -1
- package/lib/src/{CreatedOnDcom-fr-ca-Bbam2tt6.js → CreatedOnDcom-fr-ca-URS-ydJ1.js} +1 -1
- package/lib/src/{CreatedOnDcom-fr-fr-Cb0XDRPL.js → CreatedOnDcom-fr-fr-D2AVeA3H.js} +1 -1
- package/lib/src/{CreatedOnDcom-pt-br-BjdX3-E3.js → CreatedOnDcom-pt-br-C32frnFs.js} +1 -1
- package/lib/src/{CreatedOnDcom-pt-pt-BXpbfopB.js → CreatedOnDcom-pt-pt-TDYGjRXS.js} +1 -1
- package/lib/src/brand-page/constants/misc.constants.d.ts +0 -8
- package/lib/src/brand-page/constants/misc.constants.js +0 -7
- package/lib/src/brand-page/constants/styles.constants.d.ts +0 -2
- package/lib/src/brand-page/constants/styles.constants.js +0 -2
- package/lib/src/brand-page/models/content.model.d.ts +0 -1
- package/lib/src/brand-page/models/content.model.js +0 -1
- package/lib/src/brand-page/models/index.d.ts +0 -19
- package/lib/src/brand-page/utils/content-callback-util.d.ts +1 -2
- package/lib/src/brand-page/utils/content-callback-util.js +0 -3
- package/lib/src/brand-page/utils/model.util.d.ts +1 -2
- package/lib/src/brand-page/utils/model.util.js +0 -3
- package/lib/src/brand-page/utils/view-model.util.d.ts +0 -2
- package/lib/src/brand-page/utils/view-model.util.js +0 -24
- package/lib/src/brand-page/view-models.d.ts +2 -9
- package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.d.ts +0 -10
- package/lib/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.d.ts +0 -10
- package/lib/src/brand-page-maker/composables/rich-text-editor/useRichTextEditor.d.ts +0 -13
- package/lib/src/brand-page-maker/composables/rich-text-editor/useRichTextEditor.js +30 -64
- package/lib/src/brand-page-maker/constants/config-settings-constant.d.ts +1 -2
- package/lib/src/brand-page-maker/constants/config-settings-constant.js +2 -101
- package/lib/src/brand-page-maker/models/content-settings-configs.d.ts +1 -22
- package/lib/src/brand-page-maker/models/content-settings-configs.js +0 -1
- package/lib/src/brand-page-maker/models/content-settings.d.ts +1 -4
- package/lib/src/brand-page-maker/models/content-settings.js +1 -45
- package/lib/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.js +0 -1
- package/lib/src/brand-page-maker/utils/apply-color-strategy.js +17 -47
- package/lib/src/brand-page-maker/utils/rich-text-editor.util.d.ts +0 -6
- package/lib/src/brand-page-maker/utils/rich-text-editor.util.js +1 -24
- package/lib/src/brand-page-maker/validators/field.validator.js +0 -2
- package/lib/src/bundled-translations-BYUfWBT3.js +179 -0
- package/lib/src/bundles/bundled-translations.json +2 -20
- 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 +36 -143
- package/lib/src/css/library.brand-page-brandPage.min.css +36 -143
- package/lib/src/css/library.brand-page-designCom.min.css +36 -143
- package/lib/src/css/library.brand-page-preview.min.css +36 -143
- package/lib/src/index.mjs +158 -159
- package/lib/src/{lib-DwpSAbLZ.js → lib-Dm9AuOJL.js} +26180 -26906
- package/lib/src/metadata-builder/parsers/section-tool-arguments.d.ts +1 -1
- package/lib/src/shared/color-strategies/color-strategies.js +0 -4
- package/lib/src/shared/color-strategies/rte-field-pairs.d.ts +0 -12
- package/lib/src/shared/color-strategies/rte-field-pairs.js +0 -10
- package/lib/src/shared/content-settings/components/content-settings/ContentSettings.mixin.d.ts +0 -10
- package/lib/src/shared/content-settings/components/content-settings/ReplaceImageSettingsForContent.mixin.d.ts +1 -11
- package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItem.mixin.d.ts +0 -10
- package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItemField.mixin.d.ts +0 -10
- package/lib/src/shared/content-settings/components/focused-content-item-settings/FocusedContentItemSettings.mixin.d.ts +0 -10
- package/lib/src/shared/content-settings/components/items-field/ItemsField.mixin.d.ts +1 -14
- package/lib/src/shared/content-settings/components/items-field/ItemsField.mixin.js +1 -11
- package/lib/src/shared/content-settings/components/textarea-field/TextareaField.mixin.d.ts +0 -12
- package/lib/src/shared/content-settings/components/textarea-field/TextareaField.mixin.js +0 -5
- package/lib/src/shared/content-settings/models.d.ts +0 -6
- package/lib/src/shared/content-settings/store/content-settings-store.d.ts +1 -14
- package/lib/src/shared/content-settings/store/content-settings-store.js +2 -24
- package/lib/src/shared/page-settings/components/page-settings/PageSettings.mixin.d.ts +0 -10
- package/lib/src/shared/page-settings/components/page-settings-section-styles/PageSettingsSectionStyles.mixin.d.ts +0 -10
- package/package.json +2 -2
- package/src/brand-page/components/page/PageComponent.vue +0 -2
- package/src/brand-page/constants/misc.constants.ts +0 -12
- package/src/brand-page/constants/styles.constants.ts +0 -2
- package/src/brand-page/models/content.model.ts +0 -1
- package/src/brand-page/models/index.ts +0 -21
- package/src/brand-page/utils/content-callback-util.ts +0 -5
- package/src/brand-page/utils/model.util.ts +0 -7
- package/src/brand-page/utils/view-model.util.test.ts +0 -96
- package/src/brand-page/utils/view-model.util.ts +0 -49
- package/src/brand-page/view-models.ts +1 -12
- package/src/brand-page-maker/components/rich-text-editor/RichTextEditor.vue +49 -37
- package/src/brand-page-maker/composables/rich-text-editor/useRichTextEditor.ts +30 -87
- package/src/brand-page-maker/constants/config-settings-constant.ts +0 -108
- package/src/brand-page-maker/convertors/i18n/converter.json +1 -4
- package/src/brand-page-maker/models/content-settings-configs.ts +0 -24
- package/src/brand-page-maker/models/content-settings.ts +0 -57
- package/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.ts +0 -2
- package/src/brand-page-maker/utils/__snapshots__/apply-color-strategy.golden.test.ts.snap +389 -3557
- package/src/brand-page-maker/utils/apply-color-strategy.test.ts +2 -104
- package/src/brand-page-maker/utils/apply-color-strategy.ts +19 -77
- package/src/brand-page-maker/utils/rich-text-editor.util.test.ts +0 -110
- package/src/brand-page-maker/utils/rich-text-editor.util.ts +0 -66
- package/src/brand-page-maker/validators/field.validator.ts +0 -2
- package/src/bundles/bundled-translations.json +2 -20
- package/src/composables/useTranslate.ts +1 -2
- package/src/metadata-builder/builders/item-id-utils.test.ts +0 -24
- package/src/metadata-builder/parsers/section-tool-arguments.ts +1 -2
- package/src/shared/color-strategies/color-strategies.ts +0 -4
- package/src/shared/color-strategies/rte-field-pairs.ts +0 -23
- package/src/shared/content-settings/components/content-settings/i18n/content-settings.json +1 -17
- package/src/shared/content-settings/components/content-settings-item/ContentSettingsItemField.vue +0 -3
- package/src/shared/content-settings/components/items-field/ItemsField.mixin.ts +1 -11
- package/src/shared/content-settings/components/items-field/ItemsField.vue +2 -8
- package/src/shared/content-settings/components/textarea-field/TextareaField.mixin.ts +0 -6
- package/src/shared/content-settings/components/textarea-field/TextareaField.vue +0 -1
- package/src/shared/content-settings/models.ts +0 -7
- package/src/shared/content-settings/store/content-settings-store.test.ts +0 -70
- package/src/shared/content-settings/store/content-settings-store.ts +3 -37
- package/src/shared/ecommerce-settings/util/refreshDuplicatedMetadata.test.ts +0 -19
- package/src/utils/minify-brand-page-metadata.test.ts +0 -35
- package/lib/src/brand-page-maker/convertors/faq-display-style.convertor.d.ts +0 -3
- package/lib/src/brand-page-maker/convertors/faq-display-style.convertor.js +0 -47
- package/lib/src/bundled-translations-DY9YvuL-.js +0 -179
- package/src/brand-page/components/faq-section/FaqSection.test.ts +0 -292
- package/src/brand-page/components/faq-section/FaqSection.vue +0 -299
- package/src/brand-page/components/section-heading/SectionHeading.vue +0 -52
- package/src/brand-page/components/text-wrapper/TextWrapper.test.ts +0 -33
- package/src/brand-page-maker/components/rich-text-editor/RichTextEditor.test.ts +0 -165
- package/src/brand-page-maker/constants/faq-section-config.test.ts +0 -151
- package/src/brand-page-maker/convertors/faq-display-style.convertor.ts +0 -59
- package/src/metadata-builder/parsers/section-tool-map.test.ts +0 -12
- package/src/shared/content-settings/components/list-items-field/ListItemsField.test.ts +0 -429
- package/src/shared/content-settings/components/list-items-field/ListItemsField.vue +0 -262
|
@@ -77,14 +77,6 @@ export declare const IMAGE_RESOLUTION_PRESETS: {
|
|
|
77
77
|
readonly ULTRA_HD: "q=80&w=2160";
|
|
78
78
|
};
|
|
79
79
|
export type ImagesSectionContentDisplayStyle = (typeof IMAGES_SECTION_CONTENT_DISPLAY_STYLES)[number];
|
|
80
|
-
/** Centered and split are accordions; grid shows every answer. */
|
|
81
|
-
export declare const FAQ_DISPLAY_STYLES: Readonly<{
|
|
82
|
-
readonly centered: "faq-centered";
|
|
83
|
-
readonly split: "faq-split";
|
|
84
|
-
readonly grid: "faq-grid";
|
|
85
|
-
}>;
|
|
86
|
-
export type FaqDisplayStyle = (typeof FAQ_DISPLAY_STYLES)[keyof typeof FAQ_DISPLAY_STYLES];
|
|
87
|
-
export declare const FAQ_MAX_ITEMS = 6;
|
|
88
80
|
export declare const HEADER_CSRF_TOKEN = "csrf-token";
|
|
89
81
|
export declare const STYLE_THEME_KEYS: Readonly<{
|
|
90
82
|
LogoTextColor: "logo-text-color";
|
|
@@ -103,13 +103,6 @@ export const IMAGE_RESOLUTION_PRESETS = {
|
|
|
103
103
|
FULL_HD: 'q=80&w=1080',
|
|
104
104
|
ULTRA_HD: 'q=80&w=2160',
|
|
105
105
|
};
|
|
106
|
-
/** Centered and split are accordions; grid shows every answer. */
|
|
107
|
-
export const FAQ_DISPLAY_STYLES = Object.freeze({
|
|
108
|
-
centered: 'faq-centered',
|
|
109
|
-
split: 'faq-split',
|
|
110
|
-
grid: 'faq-grid',
|
|
111
|
-
});
|
|
112
|
-
export const FAQ_MAX_ITEMS = 6;
|
|
113
106
|
export const HEADER_CSRF_TOKEN = 'csrf-token';
|
|
114
107
|
export const STYLE_THEME_KEYS = Object.freeze({
|
|
115
108
|
LogoTextColor: 'logo-text-color',
|
|
@@ -33,7 +33,5 @@ export declare const CONTENT_TEXT_STYLE_PROPERTY_KEYS: {
|
|
|
33
33
|
readonly buttonTextStyle: "buttonTextStyle";
|
|
34
34
|
readonly copyrightStyle: "copyrightStyle";
|
|
35
35
|
readonly successMessageStyle: "successMessageStyle";
|
|
36
|
-
readonly questionStyle: "questionStyle";
|
|
37
|
-
readonly answerStyle: "answerStyle";
|
|
38
36
|
};
|
|
39
37
|
export type ContentTextStylePropertyKey = keyof typeof CONTENT_TEXT_STYLE_PROPERTY_KEYS;
|
|
@@ -31,7 +31,6 @@ export declare const CONTENT_TYPES: {
|
|
|
31
31
|
readonly 'shapes-section': "shapes-section";
|
|
32
32
|
readonly 'shop-section': "shop-section";
|
|
33
33
|
readonly 'booking-section': "booking-section";
|
|
34
|
-
readonly 'faq-section': "faq-section";
|
|
35
34
|
};
|
|
36
35
|
export type ContentType = keyof typeof CONTENT_TYPES;
|
|
37
36
|
export declare const PERSONALISATION_ROLES: {
|
|
@@ -478,25 +478,6 @@ export interface BookingSectionContent extends Content {
|
|
|
478
478
|
buttonLinkType: ButtonLinkType;
|
|
479
479
|
buttonTextStyle: TextStyleDeclaration;
|
|
480
480
|
}
|
|
481
|
-
export interface FaqItem {
|
|
482
|
-
/** Stable per-item identifier. See ImageItem.id. */
|
|
483
|
-
id: string;
|
|
484
|
-
question: RichTextValue;
|
|
485
|
-
/** Drives `question`, per item — like a section's `titleStyle` drives its title. */
|
|
486
|
-
questionStyle: TextStyleDeclaration;
|
|
487
|
-
answer: RichTextValue;
|
|
488
|
-
answerStyle: TextStyleDeclaration;
|
|
489
|
-
}
|
|
490
|
-
export interface FaqSectionContent extends Content {
|
|
491
|
-
type: 'faq-section';
|
|
492
|
-
title: RichTextValue;
|
|
493
|
-
description: RichTextValue;
|
|
494
|
-
displayStyle: string;
|
|
495
|
-
items: FaqItem[];
|
|
496
|
-
titleStyle: TextStyleDeclaration;
|
|
497
|
-
descriptionStyle: TextStyleDeclaration;
|
|
498
|
-
backgroundStyle: BrandPageCssStyle;
|
|
499
|
-
}
|
|
500
481
|
export declare class PageModel {
|
|
501
482
|
title: string;
|
|
502
483
|
contents: Content[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ProfileContent, TextContent, ContactFormContent, ImageContent, BannerSectionContent, SocialLinksContent, ImageGalleryContent, TestimonialSectionContent, AboutSectionContent, ImagesSectionContent, MailingListContent, SupportMeContent, RequestPaymentContent, ShapesSectionContent, ShopContent, ButtonContent, PageModel, BookingSectionContent
|
|
1
|
+
import type { ProfileContent, TextContent, ContactFormContent, ImageContent, BannerSectionContent, SocialLinksContent, ImageGalleryContent, TestimonialSectionContent, AboutSectionContent, ImagesSectionContent, MailingListContent, SupportMeContent, RequestPaymentContent, ShapesSectionContent, ShopContent, ButtonContent, PageModel, BookingSectionContent } from '../models';
|
|
2
2
|
export type ContentCallback = {
|
|
3
3
|
profileContentCallback: (content: ProfileContent) => void;
|
|
4
4
|
textContentCallback: (content: TextContent) => void;
|
|
@@ -17,6 +17,5 @@ export type ContentCallback = {
|
|
|
17
17
|
shopSectionContentCallback: (content: ShopContent) => void;
|
|
18
18
|
buttonContentCallback: (content: ButtonContent) => void;
|
|
19
19
|
bookingSectionContentCallback: (content: BookingSectionContent) => void;
|
|
20
|
-
faqSectionContentCallback: (content: FaqSectionContent) => void;
|
|
21
20
|
};
|
|
22
21
|
export declare const forEachPageCallContentCallback: (page: PageModel, callbacks: ContentCallback) => void;
|
|
@@ -49,9 +49,6 @@ export const forEachPageCallContentCallback = (page, callbacks) => {
|
|
|
49
49
|
case 'booking-section':
|
|
50
50
|
callbacks.bookingSectionContentCallback(content);
|
|
51
51
|
break;
|
|
52
|
-
case 'faq-section':
|
|
53
|
-
callbacks.faqSectionContentCallback(content);
|
|
54
|
-
break;
|
|
55
52
|
case 'general-link':
|
|
56
53
|
case 'website':
|
|
57
54
|
case 'email':
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type Content, type AboutSectionContent, type BannerSectionContent, type BrandPageModel, type ButtonWithModalContent, type ImagesSectionContent, type LogoContent, type MailingListContent, type ProfileContent, type ShapesSectionContent, type SocialLinksContent, type SupportMeContent, type TestimonialSectionContent, type TextContent, type RequestPaymentContent, type ContactFormContent, type LogoImageModel, type ShopContent, type ImageContent, type ImageGalleryContent, type BookingSectionContent
|
|
1
|
+
import { type Content, type AboutSectionContent, type BannerSectionContent, type BrandPageModel, type ButtonWithModalContent, type ImagesSectionContent, type LogoContent, type MailingListContent, type ProfileContent, type ShapesSectionContent, type SocialLinksContent, type SupportMeContent, type TestimonialSectionContent, type TextContent, type RequestPaymentContent, type ContactFormContent, type LogoImageModel, type ShopContent, type ImageContent, type ImageGalleryContent, type BookingSectionContent } from '../models';
|
|
2
2
|
export declare const isLogoContent: (content?: Content) => content is LogoContent;
|
|
3
3
|
export declare const applyLogoImageToBrandPageModelLogoContents: (model: BrandPageModel, logoImage: LogoImageModel) => BrandPageModel;
|
|
4
4
|
export declare const isTextContent: (content?: Content) => content is TextContent;
|
|
@@ -8,7 +8,6 @@ export declare const isSupportMeContent: (content?: Content) => content is Suppo
|
|
|
8
8
|
export declare const isButtonContent: (content?: Content) => content is ButtonWithModalContent;
|
|
9
9
|
export declare const isBannerContent: (content?: Content) => content is BannerSectionContent;
|
|
10
10
|
export declare const isBookingContent: (content?: Content) => content is BookingSectionContent;
|
|
11
|
-
export declare const isFaqContent: (content?: Content) => content is FaqSectionContent;
|
|
12
11
|
export declare const isAboutContent: (content?: Content) => content is AboutSectionContent;
|
|
13
12
|
export declare const isTestimonialContent: (content?: Content) => content is TestimonialSectionContent;
|
|
14
13
|
export declare const isShapesContent: (content?: Content) => content is ShapesSectionContent;
|
|
@@ -43,9 +43,6 @@ export const isBannerContent = (content) => {
|
|
|
43
43
|
export const isBookingContent = (content) => {
|
|
44
44
|
return content?.type === 'booking-section';
|
|
45
45
|
};
|
|
46
|
-
export const isFaqContent = (content) => {
|
|
47
|
-
return content?.type === 'faq-section';
|
|
48
|
-
};
|
|
49
46
|
export const isAboutContent = (content) => {
|
|
50
47
|
return content?.type === 'about-section';
|
|
51
48
|
};
|
|
@@ -29,8 +29,6 @@ interface ViewModelMappingOptions {
|
|
|
29
29
|
previewImageUrl: string;
|
|
30
30
|
};
|
|
31
31
|
setVideoUrlsWithToken?: (token: string, videoUrl: string, previewImageUrl: string, assetId: string) => void;
|
|
32
|
-
/** Maker-only UI state: content id → the item its settings panel has open. Never persisted. */
|
|
33
|
-
activeItemIdByContentId?: Record<string, string | undefined>;
|
|
34
32
|
}
|
|
35
33
|
export declare const getBrandPageViewModelFromBrandPageModel: (model: BrandPageModel, brandPageToken: string | undefined, showBrandCrowdLogo: boolean | undefined, options: ViewModelMappingOptions) => BrandPageViewModel;
|
|
36
34
|
export declare const resolvePageIdsInRteJson: (doc: unknown, nav: NavViewModel, options: ViewModelMappingOptions) => unknown;
|
|
@@ -611,28 +611,6 @@ const mapToTestimonialSectionViewModel = (content, styles) => {
|
|
|
611
611
|
isFullWidth: true,
|
|
612
612
|
}, styles);
|
|
613
613
|
};
|
|
614
|
-
// An item's question/answer styles are CONTENT_TEXT_STYLE_PROPERTY_KEYS, so the section
|
|
615
|
-
// resolver handles them when handed the item.
|
|
616
|
-
const mapFaqItem = (item, styles) => applyViewModelTextStyles({
|
|
617
|
-
...item,
|
|
618
|
-
questionStyle: { ...item.questionStyle },
|
|
619
|
-
answerStyle: { ...item.answerStyle },
|
|
620
|
-
}, styles);
|
|
621
|
-
const mapToFaqSectionViewModel = (content, styles, brandPageType, options) => {
|
|
622
|
-
return applyViewModelTextStyles({
|
|
623
|
-
...content,
|
|
624
|
-
role: content.type,
|
|
625
|
-
type: 'faq-section',
|
|
626
|
-
// No `color` pre-seed — these styles are CONTENT_TEXT_STYLE_PROPERTY_KEYS
|
|
627
|
-
// (see the testimonial mapper), resolved per item for the item styles.
|
|
628
|
-
titleStyle: { ...content.titleStyle },
|
|
629
|
-
descriptionStyle: { ...content.descriptionStyle },
|
|
630
|
-
items: (content.items ?? []).map((item) => mapFaqItem(item, styles)),
|
|
631
|
-
isFullWidth: true,
|
|
632
|
-
isStacked: brandPageType !== BRAND_PAGE_TYPES.brandSite,
|
|
633
|
-
activeItemId: options.activeItemIdByContentId?.[content.id],
|
|
634
|
-
}, styles);
|
|
635
|
-
};
|
|
636
614
|
const mapToSocialLinksViewModel = (content, styles, brandPageType) => {
|
|
637
615
|
return applyViewModelTextStyles({
|
|
638
616
|
...content,
|
|
@@ -894,8 +872,6 @@ export const mapToViewModel = (styles, brandPageType, options) => (content) => {
|
|
|
894
872
|
return mapToBannerSectionViewModel(content, styles, options);
|
|
895
873
|
case 'booking-section':
|
|
896
874
|
return mapToBookingSectionViewModel(content, styles);
|
|
897
|
-
case 'faq-section':
|
|
898
|
-
return mapToFaqSectionViewModel(content, styles, brandPageType, options);
|
|
899
875
|
case 'about-section':
|
|
900
876
|
return mapToAboutSectionViewModel(content, styles);
|
|
901
877
|
case 'images-section':
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { ButtonWithModalContent, ProfileContent, TextContent, VideoContent, ImageContent, ContentType, ButtonStyles, LogoStyles, MapContent, ImageGalleryContent, GalleryStyles, MailingListContent, RequestPaymentContent, ShopContent, SupportMeContent, ContactFormContent, BannerSectionContent, BrandPageType, SocialLinksContent, TestimonialSectionContent, AboutSectionContent, DividerSectionContent, ShapesSectionContent, ButtonLinkType, PageHeaderMobile, PageHeaderDesktop, PageFooterMobile, PageFooterDesktop, TextMediaItem, TextShapeItem, TextStyleDeclaration, AspectRatio, LogoImageModel, LogoTemplateImageModel, CookieOptions, BookingSectionContent,
|
|
1
|
+
import type { ButtonWithModalContent, ProfileContent, TextContent, VideoContent, ImageContent, ContentType, ButtonStyles, LogoStyles, MapContent, ImageGalleryContent, GalleryStyles, MailingListContent, RequestPaymentContent, ShopContent, SupportMeContent, ContactFormContent, BannerSectionContent, BrandPageType, SocialLinksContent, TestimonialSectionContent, AboutSectionContent, DividerSectionContent, ShapesSectionContent, ButtonLinkType, PageHeaderMobile, PageHeaderDesktop, PageFooterMobile, PageFooterDesktop, TextMediaItem, TextShapeItem, TextStyleDeclaration, AspectRatio, LogoImageModel, LogoTemplateImageModel, CookieOptions, BookingSectionContent, MediaTypes, TextStyles, BackgroundStyle, BackgroundShape, PersonalisationRole, SaveContactOptions, ColorItem, RichTextValue } from './models';
|
|
2
2
|
import type { ImagesSectionContentDisplayStyle } from './constants';
|
|
3
|
-
export type ViewModelType = 'button' | 'image' | 'image-gallery' | 'logo' | 'map' | 'mailing-list' | 'profile' | 'support-me' | 'request-payment' | 'text' | 'video' | 'contact-form' | 'banner-section' | 'images-section' | 'about-section' | 'divider-section' | 'testimonial-section' | 'social-links' | 'shapes-section' | 'shop-section' | 'booking-section'
|
|
3
|
+
export type ViewModelType = 'button' | 'image' | 'image-gallery' | 'logo' | 'map' | 'mailing-list' | 'profile' | 'support-me' | 'request-payment' | 'text' | 'video' | 'contact-form' | 'banner-section' | 'images-section' | 'about-section' | 'divider-section' | 'testimonial-section' | 'social-links' | 'shapes-section' | 'shop-section' | 'booking-section';
|
|
4
4
|
export interface ContentViewModel {
|
|
5
5
|
id: string;
|
|
6
6
|
type: ViewModelType;
|
|
@@ -132,13 +132,6 @@ export interface BookingSectionViewModel extends ContentViewModel, Omit<BookingS
|
|
|
132
132
|
buttonViewModel: ButtonViewModel;
|
|
133
133
|
isFullWidth: boolean;
|
|
134
134
|
}
|
|
135
|
-
export interface FaqSectionViewModel extends ContentViewModel, Omit<FaqSectionContent, 'type'> {
|
|
136
|
-
isFullWidth: boolean;
|
|
137
|
-
/** brand.page / brand.contact: split and grid always use their stacked layout. */
|
|
138
|
-
isStacked: boolean;
|
|
139
|
-
/** Maker-only: the item the settings panel has open, so the canvas shows it. */
|
|
140
|
-
activeItemId?: string;
|
|
141
|
-
}
|
|
142
135
|
export interface PageHeaderViewModel extends Omit<PageHeaderDesktop | PageHeaderMobile, 'logoImage' | 'logoImageStyle' | 'isLogoOptional' | 'viewport' | 'isLogoVisible' | 'logoTemplateImage' | 'logoImageHeight' | 'logoImageWidth' | 'headerButton' | 'backgroundStyle'> {
|
|
143
136
|
logo: LogoViewModel;
|
|
144
137
|
pages: PageViewModel[];
|
|
@@ -606,7 +606,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
606
606
|
selectedItemValue: string | null;
|
|
607
607
|
selectedItemIndex: number | null;
|
|
608
608
|
activeCategoryTab: import("@brand-page-maker/models").ItemCategory;
|
|
609
|
-
activeItemIdByContentId: Record<string, string | undefined>;
|
|
610
609
|
} & import("pinia").PiniaCustomStateProperties<import("@shared/content-settings/store").ContentSettingsState>): (id: string) => import("@brand-page").Content | undefined;
|
|
611
610
|
getFieldSettings(state: {
|
|
612
611
|
addContentOptions: {
|
|
@@ -658,7 +657,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
658
657
|
selectedItemValue: string | null;
|
|
659
658
|
selectedItemIndex: number | null;
|
|
660
659
|
activeCategoryTab: import("@brand-page-maker/models").ItemCategory;
|
|
661
|
-
activeItemIdByContentId: Record<string, string | undefined>;
|
|
662
660
|
} & import("pinia").PiniaCustomStateProperties<import("@shared/content-settings/store").ContentSettingsState>): (id: string, fieldName: string) => import("../../../shared/content-settings/models").ContentItemFieldSettings | undefined;
|
|
663
661
|
getItem(state: {
|
|
664
662
|
addContentOptions: {
|
|
@@ -710,7 +708,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
710
708
|
selectedItemValue: string | null;
|
|
711
709
|
selectedItemIndex: number | null;
|
|
712
710
|
activeCategoryTab: import("@brand-page-maker/models").ItemCategory;
|
|
713
|
-
activeItemIdByContentId: Record<string, string | undefined>;
|
|
714
711
|
} & import("pinia").PiniaCustomStateProperties<import("@shared/content-settings/store").ContentSettingsState>): (id: string) => import("../../../shared/content-settings/models").ContentItem<any> | undefined;
|
|
715
712
|
getValue(state: {
|
|
716
713
|
addContentOptions: {
|
|
@@ -762,7 +759,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
762
759
|
selectedItemValue: string | null;
|
|
763
760
|
selectedItemIndex: number | null;
|
|
764
761
|
activeCategoryTab: import("@brand-page-maker/models").ItemCategory;
|
|
765
|
-
activeItemIdByContentId: Record<string, string | undefined>;
|
|
766
762
|
} & import("pinia").PiniaCustomStateProperties<import("@shared/content-settings/store").ContentSettingsState>): (id: string, fieldName: string) => import("@brand-page").Content | string | undefined;
|
|
767
763
|
getItemState(state: {
|
|
768
764
|
addContentOptions: {
|
|
@@ -814,7 +810,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
814
810
|
selectedItemValue: string | null;
|
|
815
811
|
selectedItemIndex: number | null;
|
|
816
812
|
activeCategoryTab: import("@brand-page-maker/models").ItemCategory;
|
|
817
|
-
activeItemIdByContentId: Record<string, string | undefined>;
|
|
818
813
|
} & import("pinia").PiniaCustomStateProperties<import("@shared/content-settings/store").ContentSettingsState>): (id: string) => import("../../../shared/content-settings/models").ContentSettingsItemState;
|
|
819
814
|
getItemGroupState(state: {
|
|
820
815
|
addContentOptions: {
|
|
@@ -866,13 +861,11 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
866
861
|
selectedItemValue: string | null;
|
|
867
862
|
selectedItemIndex: number | null;
|
|
868
863
|
activeCategoryTab: import("@brand-page-maker/models").ItemCategory;
|
|
869
|
-
activeItemIdByContentId: Record<string, string | undefined>;
|
|
870
864
|
} & import("pinia").PiniaCustomStateProperties<import("@shared/content-settings/store").ContentSettingsState>): (id: string, groupId: string) => import("../../../shared/content-settings/models").ContentSettingsItemGroupState;
|
|
871
865
|
mode(): import("@shared/content-settings/store").ContentSettingsMode;
|
|
872
866
|
selectedItem(): import("../../../shared/content-settings/models").ContentItem<any> | undefined;
|
|
873
867
|
selectedItemTemplate(): import("@brand-page-maker/models").ContentSettingsConfig<any> | undefined;
|
|
874
868
|
}, {
|
|
875
|
-
setActiveItem(contentId: string, itemId: string | undefined): void;
|
|
876
869
|
onContentChanged(): void;
|
|
877
870
|
_addItem({ item, index, }: {
|
|
878
871
|
item: import("../../../shared/content-settings/models").ContentItem<any>;
|
|
@@ -936,9 +929,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
936
929
|
}): void;
|
|
937
930
|
updateTextItemTextStyleType({ id, name, value, index, isHydrationWrite, }: import("../../../shared/content-settings/models").UpdateMultipleItemValuesPayload<any>): void;
|
|
938
931
|
updateTextItemTextStyleTypeWithStyles({ id, name, value, index, isHydrationWrite, }: import("../../../shared/content-settings/models").UpdateMultipleItemValuesPayload<any>): void;
|
|
939
|
-
updateListItemTextStyles({ id, name, value, target, isHydrationWrite, }: Omit<import("../../../shared/content-settings/models").UpdateMultipleItemValuesPayload<any>, "index"> & {
|
|
940
|
-
target: import("../../../shared/content-settings/models").RteItemStyleTarget;
|
|
941
|
-
}): void;
|
|
942
932
|
_setActiveCategoryTab({ activeCategoryTab, }: {
|
|
943
933
|
activeCategoryTab: import("@brand-page-maker/models").ItemCategory;
|
|
944
934
|
}): void;
|
package/lib/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.d.ts
CHANGED
|
@@ -90,7 +90,6 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
90
90
|
selectedItemValue: string | null;
|
|
91
91
|
selectedItemIndex: number | null;
|
|
92
92
|
activeCategoryTab: import("../../models").ItemCategory;
|
|
93
|
-
activeItemIdByContentId: Record<string, string | undefined>;
|
|
94
93
|
} & import("pinia").PiniaCustomStateProperties<import("@shared/content-settings/store").ContentSettingsState>): (id: string) => Content | undefined;
|
|
95
94
|
getFieldSettings(state: {
|
|
96
95
|
addContentOptions: {
|
|
@@ -142,7 +141,6 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
142
141
|
selectedItemValue: string | null;
|
|
143
142
|
selectedItemIndex: number | null;
|
|
144
143
|
activeCategoryTab: import("../../models").ItemCategory;
|
|
145
|
-
activeItemIdByContentId: Record<string, string | undefined>;
|
|
146
144
|
} & import("pinia").PiniaCustomStateProperties<import("@shared/content-settings/store").ContentSettingsState>): (id: string, fieldName: string) => import("@shared/content-settings/models").ContentItemFieldSettings | undefined;
|
|
147
145
|
getItem(state: {
|
|
148
146
|
addContentOptions: {
|
|
@@ -194,7 +192,6 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
194
192
|
selectedItemValue: string | null;
|
|
195
193
|
selectedItemIndex: number | null;
|
|
196
194
|
activeCategoryTab: import("../../models").ItemCategory;
|
|
197
|
-
activeItemIdByContentId: Record<string, string | undefined>;
|
|
198
195
|
} & import("pinia").PiniaCustomStateProperties<import("@shared/content-settings/store").ContentSettingsState>): (id: string) => ContentItem<any> | undefined;
|
|
199
196
|
getValue(state: {
|
|
200
197
|
addContentOptions: {
|
|
@@ -246,7 +243,6 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
246
243
|
selectedItemValue: string | null;
|
|
247
244
|
selectedItemIndex: number | null;
|
|
248
245
|
activeCategoryTab: import("../../models").ItemCategory;
|
|
249
|
-
activeItemIdByContentId: Record<string, string | undefined>;
|
|
250
246
|
} & import("pinia").PiniaCustomStateProperties<import("@shared/content-settings/store").ContentSettingsState>): (id: string, fieldName: string) => Content | string | undefined;
|
|
251
247
|
getItemState(state: {
|
|
252
248
|
addContentOptions: {
|
|
@@ -298,7 +294,6 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
298
294
|
selectedItemValue: string | null;
|
|
299
295
|
selectedItemIndex: number | null;
|
|
300
296
|
activeCategoryTab: import("../../models").ItemCategory;
|
|
301
|
-
activeItemIdByContentId: Record<string, string | undefined>;
|
|
302
297
|
} & import("pinia").PiniaCustomStateProperties<import("@shared/content-settings/store").ContentSettingsState>): (id: string) => import("@shared/content-settings/models").ContentSettingsItemState;
|
|
303
298
|
getItemGroupState(state: {
|
|
304
299
|
addContentOptions: {
|
|
@@ -350,13 +345,11 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
350
345
|
selectedItemValue: string | null;
|
|
351
346
|
selectedItemIndex: number | null;
|
|
352
347
|
activeCategoryTab: import("../../models").ItemCategory;
|
|
353
|
-
activeItemIdByContentId: Record<string, string | undefined>;
|
|
354
348
|
} & import("pinia").PiniaCustomStateProperties<import("@shared/content-settings/store").ContentSettingsState>): (id: string, groupId: string) => import("@shared/content-settings/models").ContentSettingsItemGroupState;
|
|
355
349
|
mode(): import("@shared/content-settings/store").ContentSettingsMode;
|
|
356
350
|
selectedItem(): ContentItem<any> | undefined;
|
|
357
351
|
selectedItemTemplate(): import("../../models").ContentSettingsConfig<any> | undefined;
|
|
358
352
|
}, {
|
|
359
|
-
setActiveItem(contentId: string, itemId: string | undefined): void;
|
|
360
353
|
onContentChanged(): void;
|
|
361
354
|
_addItem({ item, index, }: {
|
|
362
355
|
item: ContentItem<any>;
|
|
@@ -420,9 +413,6 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
420
413
|
}): void;
|
|
421
414
|
updateTextItemTextStyleType({ id, name, value, index, isHydrationWrite, }: import("@shared/content-settings/models").UpdateMultipleItemValuesPayload<any>): void;
|
|
422
415
|
updateTextItemTextStyleTypeWithStyles({ id, name, value, index, isHydrationWrite, }: import("@shared/content-settings/models").UpdateMultipleItemValuesPayload<any>): void;
|
|
423
|
-
updateListItemTextStyles({ id, name, value, target, isHydrationWrite, }: Omit<import("@shared/content-settings/models").UpdateMultipleItemValuesPayload<any>, "index"> & {
|
|
424
|
-
target: import("@shared/content-settings/models").RteItemStyleTarget;
|
|
425
|
-
}): void;
|
|
426
416
|
_setActiveCategoryTab({ activeCategoryTab, }: {
|
|
427
417
|
activeCategoryTab: import("../../models").ItemCategory;
|
|
428
418
|
}): void;
|
|
@@ -4,8 +4,6 @@ import type { StyleTextFontFamilyOption } from '@shared/style-settings/models';
|
|
|
4
4
|
import type { HyperlinkType, TextStyleOption } from '@brand-page';
|
|
5
5
|
import { type TextItem, type TextStyleDeclaration } from '@brand-page';
|
|
6
6
|
import type { ButtonGroupOption } from '@brand-page-maker/models/button-group.model';
|
|
7
|
-
import { useUiContentSettingsStore } from '@shared/content-settings/store';
|
|
8
|
-
import type { RteItemStyleTarget } from '@shared/content-settings/models';
|
|
9
7
|
interface UseRichTextEditorReturn {
|
|
10
8
|
editor: Editor;
|
|
11
9
|
onFocus: () => void;
|
|
@@ -57,16 +55,6 @@ interface EditorOptionType {
|
|
|
57
55
|
export declare const useExternalRichTextEditor: () => {
|
|
58
56
|
externalEditor: Editor;
|
|
59
57
|
};
|
|
60
|
-
/**
|
|
61
|
-
* An editor bound to a list item (`itemStyleTarget`) writes its toolbar styles to that
|
|
62
|
-
* item's own style field instead of the section-level `${name}Style`. Returns false when
|
|
63
|
-
* the editor has no item target, so the caller falls through to its section-level write.
|
|
64
|
-
*/
|
|
65
|
-
export declare const writeListItemStyles: (store: ReturnType<typeof useUiContentSettingsStore>, props: {
|
|
66
|
-
rawId: string;
|
|
67
|
-
name: string;
|
|
68
|
-
itemStyleTarget?: RteItemStyleTarget;
|
|
69
|
-
}, value: TextStyleDeclaration, isHydrationWrite?: boolean) => boolean;
|
|
70
58
|
export declare const useRichTextEditor: (model: ModelRef<any>, props: {
|
|
71
59
|
id: string;
|
|
72
60
|
name: string;
|
|
@@ -78,7 +66,6 @@ export declare const useRichTextEditor: (model: ModelRef<any>, props: {
|
|
|
78
66
|
textItemIndex: number;
|
|
79
67
|
item: TextItem;
|
|
80
68
|
contentType: string;
|
|
81
|
-
itemStyleTarget?: RteItemStyleTarget;
|
|
82
69
|
}, emit: (event: "focus" | "blur" | "update:modelValue", ...args: any[]) => void, fontSettings: {
|
|
83
70
|
selectedTextStyle: string;
|
|
84
71
|
selectedFont: string;
|