@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
|
@@ -55,15 +55,8 @@ export const useUiContentSettingsStore = defineStore('uiContentSettings', {
|
|
|
55
55
|
selectedItemIndex: null,
|
|
56
56
|
selectedItemValue: null,
|
|
57
57
|
activeCategoryTab: 'all',
|
|
58
|
-
activeItemIdByContentId: {},
|
|
59
58
|
}),
|
|
60
59
|
actions: {
|
|
61
|
-
setActiveItem(contentId, itemId) {
|
|
62
|
-
this.activeItemIdByContentId = {
|
|
63
|
-
...this.activeItemIdByContentId,
|
|
64
|
-
[contentId]: itemId,
|
|
65
|
-
};
|
|
66
|
-
},
|
|
67
60
|
onContentChanged() {
|
|
68
61
|
const uiStore = useUiStore();
|
|
69
62
|
uiStore.onContentChanged();
|
|
@@ -323,27 +316,12 @@ export const useUiContentSettingsStore = defineStore('uiContentSettings', {
|
|
|
323
316
|
this.onContentChanged();
|
|
324
317
|
},
|
|
325
318
|
updateTextItemTextStyleTypeWithStyles({ id, name, value, index, isHydrationWrite, }) {
|
|
326
|
-
this.updateListItemTextStyles({
|
|
327
|
-
id,
|
|
328
|
-
name,
|
|
329
|
-
value,
|
|
330
|
-
isHydrationWrite,
|
|
331
|
-
target: {
|
|
332
|
-
itemsField: 'textItems',
|
|
333
|
-
index: index,
|
|
334
|
-
styleField: 'textStyle',
|
|
335
|
-
},
|
|
336
|
-
});
|
|
337
|
-
},
|
|
338
|
-
/** Merge into the style of one list item, e.g. `items[2].questionStyle`. */
|
|
339
|
-
updateListItemTextStyles({ id, name, value, target, isHydrationWrite, }) {
|
|
340
319
|
const item = this.items.find((i) => i.id === id);
|
|
341
|
-
|
|
342
|
-
if (!item || !listItem) {
|
|
320
|
+
if (!item) {
|
|
343
321
|
return;
|
|
344
322
|
}
|
|
345
323
|
armHistoryMergeForHydrationWrite(isHydrationWrite);
|
|
346
|
-
|
|
324
|
+
item.settings.content.textItems[index].textStyle = vueDeepMerge(item.settings.content.textItems[index].textStyle, value);
|
|
347
325
|
this.validateItem({ id, name });
|
|
348
326
|
this.onContentChanged();
|
|
349
327
|
},
|
|
@@ -4296,7 +4296,6 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
4296
4296
|
selectedItemValue: string | null;
|
|
4297
4297
|
selectedItemIndex: number | null;
|
|
4298
4298
|
activeCategoryTab: import("../../../../brand-page-maker/models").ItemCategory;
|
|
4299
|
-
activeItemIdByContentId: Record<string, string | undefined>;
|
|
4300
4299
|
} & import("pinia").PiniaCustomStateProperties<import("../../../content-settings/store").ContentSettingsState>): (id: string) => Content | undefined;
|
|
4301
4300
|
getFieldSettings(state: {
|
|
4302
4301
|
addContentOptions: {
|
|
@@ -4348,7 +4347,6 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
4348
4347
|
selectedItemValue: string | null;
|
|
4349
4348
|
selectedItemIndex: number | null;
|
|
4350
4349
|
activeCategoryTab: import("../../../../brand-page-maker/models").ItemCategory;
|
|
4351
|
-
activeItemIdByContentId: Record<string, string | undefined>;
|
|
4352
4350
|
} & import("pinia").PiniaCustomStateProperties<import("../../../content-settings/store").ContentSettingsState>): (id: string, fieldName: string) => import("../../../content-settings/models").ContentItemFieldSettings | undefined;
|
|
4353
4351
|
getItem(state: {
|
|
4354
4352
|
addContentOptions: {
|
|
@@ -4400,7 +4398,6 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
4400
4398
|
selectedItemValue: string | null;
|
|
4401
4399
|
selectedItemIndex: number | null;
|
|
4402
4400
|
activeCategoryTab: import("../../../../brand-page-maker/models").ItemCategory;
|
|
4403
|
-
activeItemIdByContentId: Record<string, string | undefined>;
|
|
4404
4401
|
} & import("pinia").PiniaCustomStateProperties<import("../../../content-settings/store").ContentSettingsState>): (id: string) => ContentItem<any> | undefined;
|
|
4405
4402
|
getValue(state: {
|
|
4406
4403
|
addContentOptions: {
|
|
@@ -4452,7 +4449,6 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
4452
4449
|
selectedItemValue: string | null;
|
|
4453
4450
|
selectedItemIndex: number | null;
|
|
4454
4451
|
activeCategoryTab: import("../../../../brand-page-maker/models").ItemCategory;
|
|
4455
|
-
activeItemIdByContentId: Record<string, string | undefined>;
|
|
4456
4452
|
} & import("pinia").PiniaCustomStateProperties<import("../../../content-settings/store").ContentSettingsState>): (id: string, fieldName: string) => Content | string | undefined;
|
|
4457
4453
|
getItemState(state: {
|
|
4458
4454
|
addContentOptions: {
|
|
@@ -4504,7 +4500,6 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
4504
4500
|
selectedItemValue: string | null;
|
|
4505
4501
|
selectedItemIndex: number | null;
|
|
4506
4502
|
activeCategoryTab: import("../../../../brand-page-maker/models").ItemCategory;
|
|
4507
|
-
activeItemIdByContentId: Record<string, string | undefined>;
|
|
4508
4503
|
} & import("pinia").PiniaCustomStateProperties<import("../../../content-settings/store").ContentSettingsState>): (id: string) => import("../../../content-settings/models").ContentSettingsItemState;
|
|
4509
4504
|
getItemGroupState(state: {
|
|
4510
4505
|
addContentOptions: {
|
|
@@ -4556,13 +4551,11 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
4556
4551
|
selectedItemValue: string | null;
|
|
4557
4552
|
selectedItemIndex: number | null;
|
|
4558
4553
|
activeCategoryTab: import("../../../../brand-page-maker/models").ItemCategory;
|
|
4559
|
-
activeItemIdByContentId: Record<string, string | undefined>;
|
|
4560
4554
|
} & import("pinia").PiniaCustomStateProperties<import("../../../content-settings/store").ContentSettingsState>): (id: string, groupId: string) => import("../../../content-settings/models").ContentSettingsItemGroupState;
|
|
4561
4555
|
mode(): import("../../../content-settings/store").ContentSettingsMode;
|
|
4562
4556
|
selectedItem(): ContentItem<any> | undefined;
|
|
4563
4557
|
selectedItemTemplate(): import("../../../../brand-page-maker/models").ContentSettingsConfig<any> | undefined;
|
|
4564
4558
|
}, {
|
|
4565
|
-
setActiveItem(contentId: string, itemId: string | undefined): void;
|
|
4566
4559
|
onContentChanged(): void;
|
|
4567
4560
|
_addItem({ item, index, }: {
|
|
4568
4561
|
item: ContentItem<any>;
|
|
@@ -4626,9 +4619,6 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
4626
4619
|
}): void;
|
|
4627
4620
|
updateTextItemTextStyleType({ id, name, value, index, isHydrationWrite, }: import("../../../content-settings/models").UpdateMultipleItemValuesPayload<any>): void;
|
|
4628
4621
|
updateTextItemTextStyleTypeWithStyles({ id, name, value, index, isHydrationWrite, }: import("../../../content-settings/models").UpdateMultipleItemValuesPayload<any>): void;
|
|
4629
|
-
updateListItemTextStyles({ id, name, value, target, isHydrationWrite, }: Omit<import("../../../content-settings/models").UpdateMultipleItemValuesPayload<any>, "index"> & {
|
|
4630
|
-
target: import("../../../content-settings/models").RteItemStyleTarget;
|
|
4631
|
-
}): void;
|
|
4632
4622
|
_setActiveCategoryTab({ activeCategoryTab, }: {
|
|
4633
4623
|
activeCategoryTab: import("../../../../brand-page-maker/models").ItemCategory;
|
|
4634
4624
|
}): void;
|
|
@@ -3661,7 +3661,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
3661
3661
|
selectedItemValue: string | null;
|
|
3662
3662
|
selectedItemIndex: number | null;
|
|
3663
3663
|
activeCategoryTab: import("../../../../brand-page-maker/models").ItemCategory;
|
|
3664
|
-
activeItemIdByContentId: Record<string, string | undefined>;
|
|
3665
3664
|
} & import("pinia").PiniaCustomStateProperties<import("../../../content-settings/store").ContentSettingsState>): (id: string) => import("@brand-page").Content | undefined;
|
|
3666
3665
|
getFieldSettings(state: {
|
|
3667
3666
|
addContentOptions: {
|
|
@@ -3713,7 +3712,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
3713
3712
|
selectedItemValue: string | null;
|
|
3714
3713
|
selectedItemIndex: number | null;
|
|
3715
3714
|
activeCategoryTab: import("../../../../brand-page-maker/models").ItemCategory;
|
|
3716
|
-
activeItemIdByContentId: Record<string, string | undefined>;
|
|
3717
3715
|
} & import("pinia").PiniaCustomStateProperties<import("../../../content-settings/store").ContentSettingsState>): (id: string, fieldName: string) => ContentItemFieldSettings | undefined;
|
|
3718
3716
|
getItem(state: {
|
|
3719
3717
|
addContentOptions: {
|
|
@@ -3765,7 +3763,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
3765
3763
|
selectedItemValue: string | null;
|
|
3766
3764
|
selectedItemIndex: number | null;
|
|
3767
3765
|
activeCategoryTab: import("../../../../brand-page-maker/models").ItemCategory;
|
|
3768
|
-
activeItemIdByContentId: Record<string, string | undefined>;
|
|
3769
3766
|
} & import("pinia").PiniaCustomStateProperties<import("../../../content-settings/store").ContentSettingsState>): (id: string) => import("../../../content-settings/models").ContentItem<any> | undefined;
|
|
3770
3767
|
getValue(state: {
|
|
3771
3768
|
addContentOptions: {
|
|
@@ -3817,7 +3814,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
3817
3814
|
selectedItemValue: string | null;
|
|
3818
3815
|
selectedItemIndex: number | null;
|
|
3819
3816
|
activeCategoryTab: import("../../../../brand-page-maker/models").ItemCategory;
|
|
3820
|
-
activeItemIdByContentId: Record<string, string | undefined>;
|
|
3821
3817
|
} & import("pinia").PiniaCustomStateProperties<import("../../../content-settings/store").ContentSettingsState>): (id: string, fieldName: string) => import("@brand-page").Content | string | undefined;
|
|
3822
3818
|
getItemState(state: {
|
|
3823
3819
|
addContentOptions: {
|
|
@@ -3869,7 +3865,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
3869
3865
|
selectedItemValue: string | null;
|
|
3870
3866
|
selectedItemIndex: number | null;
|
|
3871
3867
|
activeCategoryTab: import("../../../../brand-page-maker/models").ItemCategory;
|
|
3872
|
-
activeItemIdByContentId: Record<string, string | undefined>;
|
|
3873
3868
|
} & import("pinia").PiniaCustomStateProperties<import("../../../content-settings/store").ContentSettingsState>): (id: string) => import("../../../content-settings/models").ContentSettingsItemState;
|
|
3874
3869
|
getItemGroupState(state: {
|
|
3875
3870
|
addContentOptions: {
|
|
@@ -3921,13 +3916,11 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
3921
3916
|
selectedItemValue: string | null;
|
|
3922
3917
|
selectedItemIndex: number | null;
|
|
3923
3918
|
activeCategoryTab: import("../../../../brand-page-maker/models").ItemCategory;
|
|
3924
|
-
activeItemIdByContentId: Record<string, string | undefined>;
|
|
3925
3919
|
} & import("pinia").PiniaCustomStateProperties<import("../../../content-settings/store").ContentSettingsState>): (id: string, groupId: string) => import("../../../content-settings/models").ContentSettingsItemGroupState;
|
|
3926
3920
|
mode(): import("../../../content-settings/store").ContentSettingsMode;
|
|
3927
3921
|
selectedItem(): import("../../../content-settings/models").ContentItem<any> | undefined;
|
|
3928
3922
|
selectedItemTemplate(): import("../../../../brand-page-maker/models").ContentSettingsConfig<any> | undefined;
|
|
3929
3923
|
}, {
|
|
3930
|
-
setActiveItem(contentId: string, itemId: string | undefined): void;
|
|
3931
3924
|
onContentChanged(): void;
|
|
3932
3925
|
_addItem({ item, index, }: {
|
|
3933
3926
|
item: import("../../../content-settings/models").ContentItem<any>;
|
|
@@ -3991,9 +3984,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
3991
3984
|
}): void;
|
|
3992
3985
|
updateTextItemTextStyleType({ id, name, value, index, isHydrationWrite, }: import("../../../content-settings/models").UpdateMultipleItemValuesPayload<any>): void;
|
|
3993
3986
|
updateTextItemTextStyleTypeWithStyles({ id, name, value, index, isHydrationWrite, }: import("../../../content-settings/models").UpdateMultipleItemValuesPayload<any>): void;
|
|
3994
|
-
updateListItemTextStyles({ id, name, value, target, isHydrationWrite, }: Omit<import("../../../content-settings/models").UpdateMultipleItemValuesPayload<any>, "index"> & {
|
|
3995
|
-
target: import("../../../content-settings/models").RteItemStyleTarget;
|
|
3996
|
-
}): void;
|
|
3997
3987
|
_setActiveCategoryTab({ activeCategoryTab, }: {
|
|
3998
3988
|
activeCategoryTab: import("../../../../brand-page-maker/models").ItemCategory;
|
|
3999
3989
|
}): void;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@designcrowd/library.brand-page",
|
|
3
3
|
"description": "A collection of Maker/Designer applications",
|
|
4
|
-
"version": "6.2.3
|
|
4
|
+
"version": "6.2.3",
|
|
5
5
|
"author": "Design.com Eng",
|
|
6
6
|
"license": "UNLICENSED",
|
|
7
7
|
"type": "module",
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
},
|
|
72
72
|
"dependencies": {
|
|
73
73
|
"@ckpack/vue-color": "1.6.0",
|
|
74
|
-
"@designcrowd/fe-shared-lib": "2.1.2
|
|
74
|
+
"@designcrowd/fe-shared-lib": "2.1.2",
|
|
75
75
|
"@pinia/nuxt": "0.11.3",
|
|
76
76
|
"@storybook/react": "9.0.4",
|
|
77
77
|
"@tiptap/extension-bubble-menu": "3.28.0",
|
|
@@ -35,7 +35,6 @@ import ShapesSection from '../shapes-section/ShapesSection.vue';
|
|
|
35
35
|
import PageComponentMixin from './PageComponent.mixin.ts';
|
|
36
36
|
import Shop from '../shop/Shop.vue';
|
|
37
37
|
import BookingSection from '../booking-section/BookingSection.vue';
|
|
38
|
-
import FaqSection from '../faq-section/FaqSection.vue';
|
|
39
38
|
|
|
40
39
|
export default {
|
|
41
40
|
components: {
|
|
@@ -61,7 +60,6 @@ export default {
|
|
|
61
60
|
'bp-shapes-section': ShapesSection,
|
|
62
61
|
'bp-shop-section': Shop,
|
|
63
62
|
'bp-booking-section': BookingSection,
|
|
64
|
-
'bp-faq-section': FaqSection,
|
|
65
63
|
},
|
|
66
64
|
mixins: [PageComponentMixin],
|
|
67
65
|
};
|
|
@@ -126,18 +126,6 @@ export const IMAGE_RESOLUTION_PRESETS = {
|
|
|
126
126
|
export type ImagesSectionContentDisplayStyle =
|
|
127
127
|
(typeof IMAGES_SECTION_CONTENT_DISPLAY_STYLES)[number];
|
|
128
128
|
|
|
129
|
-
/** Centered and split are accordions; grid shows every answer. */
|
|
130
|
-
export const FAQ_DISPLAY_STYLES = Object.freeze({
|
|
131
|
-
centered: 'faq-centered',
|
|
132
|
-
split: 'faq-split',
|
|
133
|
-
grid: 'faq-grid',
|
|
134
|
-
} as const);
|
|
135
|
-
|
|
136
|
-
export type FaqDisplayStyle =
|
|
137
|
-
(typeof FAQ_DISPLAY_STYLES)[keyof typeof FAQ_DISPLAY_STYLES];
|
|
138
|
-
|
|
139
|
-
export const FAQ_MAX_ITEMS = 6;
|
|
140
|
-
|
|
141
129
|
export const HEADER_CSRF_TOKEN = 'csrf-token';
|
|
142
130
|
|
|
143
131
|
export const STYLE_THEME_KEYS = Object.freeze({
|
|
@@ -40,8 +40,6 @@ export const CONTENT_TEXT_STYLE_PROPERTY_KEYS = {
|
|
|
40
40
|
buttonTextStyle: 'buttonTextStyle',
|
|
41
41
|
copyrightStyle: 'copyrightStyle',
|
|
42
42
|
successMessageStyle: 'successMessageStyle',
|
|
43
|
-
questionStyle: 'questionStyle',
|
|
44
|
-
answerStyle: 'answerStyle',
|
|
45
43
|
} as const;
|
|
46
44
|
|
|
47
45
|
export type ContentTextStylePropertyKey =
|
|
@@ -672,27 +672,6 @@ export interface BookingSectionContent extends Content {
|
|
|
672
672
|
buttonTextStyle: TextStyleDeclaration;
|
|
673
673
|
}
|
|
674
674
|
|
|
675
|
-
export interface FaqItem {
|
|
676
|
-
/** Stable per-item identifier. See ImageItem.id. */
|
|
677
|
-
id: string;
|
|
678
|
-
question: RichTextValue;
|
|
679
|
-
/** Drives `question`, per item — like a section's `titleStyle` drives its title. */
|
|
680
|
-
questionStyle: TextStyleDeclaration;
|
|
681
|
-
answer: RichTextValue;
|
|
682
|
-
answerStyle: TextStyleDeclaration;
|
|
683
|
-
}
|
|
684
|
-
|
|
685
|
-
export interface FaqSectionContent extends Content {
|
|
686
|
-
type: 'faq-section';
|
|
687
|
-
title: RichTextValue;
|
|
688
|
-
description: RichTextValue;
|
|
689
|
-
displayStyle: string;
|
|
690
|
-
items: FaqItem[];
|
|
691
|
-
titleStyle: TextStyleDeclaration;
|
|
692
|
-
descriptionStyle: TextStyleDeclaration;
|
|
693
|
-
backgroundStyle: BrandPageCssStyle;
|
|
694
|
-
}
|
|
695
|
-
|
|
696
675
|
export class PageModel {
|
|
697
676
|
title: string;
|
|
698
677
|
contents: Content[];
|
|
@@ -17,7 +17,6 @@ import type {
|
|
|
17
17
|
ButtonContent,
|
|
18
18
|
PageModel,
|
|
19
19
|
BookingSectionContent,
|
|
20
|
-
FaqSectionContent,
|
|
21
20
|
} from '../models';
|
|
22
21
|
|
|
23
22
|
export type ContentCallback = {
|
|
@@ -40,7 +39,6 @@ export type ContentCallback = {
|
|
|
40
39
|
shopSectionContentCallback: (content: ShopContent) => void;
|
|
41
40
|
buttonContentCallback: (content: ButtonContent) => void;
|
|
42
41
|
bookingSectionContentCallback: (content: BookingSectionContent) => void;
|
|
43
|
-
faqSectionContentCallback: (content: FaqSectionContent) => void;
|
|
44
42
|
};
|
|
45
43
|
|
|
46
44
|
export const forEachPageCallContentCallback = (
|
|
@@ -103,9 +101,6 @@ export const forEachPageCallContentCallback = (
|
|
|
103
101
|
content as BookingSectionContent,
|
|
104
102
|
);
|
|
105
103
|
break;
|
|
106
|
-
case 'faq-section':
|
|
107
|
-
callbacks.faqSectionContentCallback(content as FaqSectionContent);
|
|
108
|
-
break;
|
|
109
104
|
case 'general-link':
|
|
110
105
|
case 'website':
|
|
111
106
|
case 'email':
|
|
@@ -21,7 +21,6 @@ import {
|
|
|
21
21
|
type ImageContent,
|
|
22
22
|
type ImageGalleryContent,
|
|
23
23
|
type BookingSectionContent,
|
|
24
|
-
type FaqSectionContent,
|
|
25
24
|
} from '../models';
|
|
26
25
|
|
|
27
26
|
export const isLogoContent = (content?: Content): content is LogoContent => {
|
|
@@ -98,12 +97,6 @@ export const isBookingContent = (
|
|
|
98
97
|
return content?.type === 'booking-section';
|
|
99
98
|
};
|
|
100
99
|
|
|
101
|
-
export const isFaqContent = (
|
|
102
|
-
content?: Content,
|
|
103
|
-
): content is FaqSectionContent => {
|
|
104
|
-
return content?.type === 'faq-section';
|
|
105
|
-
};
|
|
106
|
-
|
|
107
100
|
export const isAboutContent = (
|
|
108
101
|
content?: Content,
|
|
109
102
|
): content is AboutSectionContent => {
|
|
@@ -1121,102 +1121,6 @@ describe('container-aware text colour defaults (view-model layer)', () => {
|
|
|
1121
1121
|
});
|
|
1122
1122
|
});
|
|
1123
1123
|
|
|
1124
|
-
describe('faq-section view model', () => {
|
|
1125
|
-
const faqContent = (overrides: Record<string, unknown> = {}): any => ({
|
|
1126
|
-
id: 'faq-1',
|
|
1127
|
-
type: 'faq-section',
|
|
1128
|
-
title: 'FAQ',
|
|
1129
|
-
description: '',
|
|
1130
|
-
displayStyle: 'faq-split',
|
|
1131
|
-
items: [
|
|
1132
|
-
{
|
|
1133
|
-
id: 'q1',
|
|
1134
|
-
question: 'Q1',
|
|
1135
|
-
questionStyle: { textStyleType: 'headings' },
|
|
1136
|
-
answer: 'A1',
|
|
1137
|
-
answerStyle: { textStyleType: 'paragraphs' },
|
|
1138
|
-
},
|
|
1139
|
-
{
|
|
1140
|
-
id: 'q2',
|
|
1141
|
-
question: 'Q2',
|
|
1142
|
-
questionStyle: { fontSize: '1.5rem' }, // detached
|
|
1143
|
-
answer: 'A2',
|
|
1144
|
-
answerStyle: { textStyleType: 'paragraphs' },
|
|
1145
|
-
},
|
|
1146
|
-
],
|
|
1147
|
-
titleStyle: { textStyleType: 'titles' },
|
|
1148
|
-
descriptionStyle: { textStyleType: 'paragraphs' },
|
|
1149
|
-
backgroundStyle: {},
|
|
1150
|
-
topPadding: 32,
|
|
1151
|
-
bottomPadding: 32,
|
|
1152
|
-
...overrides,
|
|
1153
|
-
});
|
|
1154
|
-
|
|
1155
|
-
test.each([
|
|
1156
|
-
[BRAND_PAGE_TYPES.default, true],
|
|
1157
|
-
[BRAND_PAGE_TYPES.brandContact, true],
|
|
1158
|
-
[BRAND_PAGE_TYPES.brandSite, false],
|
|
1159
|
-
])('%s → isStacked %s', (brandPageType, isStacked) => {
|
|
1160
|
-
const viewModel: any = mapToViewModel(
|
|
1161
|
-
new PageStyles(),
|
|
1162
|
-
brandPageType,
|
|
1163
|
-
{},
|
|
1164
|
-
)(faqContent());
|
|
1165
|
-
|
|
1166
|
-
expect(viewModel.type).toBe('faq-section');
|
|
1167
|
-
expect(viewModel.isStacked).toBe(isStacked);
|
|
1168
|
-
expect(viewModel.items).toHaveLength(2);
|
|
1169
|
-
});
|
|
1170
|
-
|
|
1171
|
-
test('carries the maker panel’s open item only for its own content', () => {
|
|
1172
|
-
const map = (contentId: string): any =>
|
|
1173
|
-
mapToViewModel(new PageStyles(), BRAND_PAGE_TYPES.brandSite, {
|
|
1174
|
-
activeItemIdByContentId: { [contentId]: 'q2' },
|
|
1175
|
-
})(faqContent());
|
|
1176
|
-
|
|
1177
|
-
expect(map('faq-1').activeItemId).toBe('q2');
|
|
1178
|
-
expect(map('another-section').activeItemId).toBeUndefined();
|
|
1179
|
-
});
|
|
1180
|
-
|
|
1181
|
-
test("each item's question and answer follow their global text roles until detached", () => {
|
|
1182
|
-
const pageStyles = new PageStyles();
|
|
1183
|
-
const { headings, paragraphs } = pageStyles.textStyles.textStyleOptions;
|
|
1184
|
-
|
|
1185
|
-
headings.style.fontSize = '1.875rem';
|
|
1186
|
-
headings.style.color = '#00ff00';
|
|
1187
|
-
headings.isModified = true;
|
|
1188
|
-
paragraphs.style.color = '#0000ff';
|
|
1189
|
-
|
|
1190
|
-
const content = faqContent();
|
|
1191
|
-
const viewModel: any = mapToViewModel(
|
|
1192
|
-
pageStyles,
|
|
1193
|
-
BRAND_PAGE_TYPES.brandSite,
|
|
1194
|
-
{},
|
|
1195
|
-
)(content);
|
|
1196
|
-
const [linked, detached] = viewModel.items;
|
|
1197
|
-
|
|
1198
|
-
expect(linked.questionStyle.fontSize).toBe('1.875rem');
|
|
1199
|
-
expect(linked.questionStyle.color).toBe('#00ff00');
|
|
1200
|
-
expect(linked.answerStyle.color).toBe('#0000ff');
|
|
1201
|
-
expect(detached.questionStyle.fontSize).toBe('1.5rem');
|
|
1202
|
-
expect(detached.answerStyle.color).toBe('#0000ff');
|
|
1203
|
-
// Resolution copies; the stored item keeps only its link.
|
|
1204
|
-
expect(content.items[0].questionStyle).toEqual({
|
|
1205
|
-
textStyleType: 'headings',
|
|
1206
|
-
});
|
|
1207
|
-
});
|
|
1208
|
-
|
|
1209
|
-
test('content without items maps without throwing', () => {
|
|
1210
|
-
const viewModel: any = mapToViewModel(
|
|
1211
|
-
new PageStyles(),
|
|
1212
|
-
BRAND_PAGE_TYPES.brandSite,
|
|
1213
|
-
{},
|
|
1214
|
-
)(faqContent({ items: undefined }));
|
|
1215
|
-
|
|
1216
|
-
expect(viewModel.items).toEqual([]);
|
|
1217
|
-
});
|
|
1218
|
-
});
|
|
1219
|
-
|
|
1220
1124
|
describe('mapToPageHeaderViewModel header button', () => {
|
|
1221
1125
|
const headerButton: HeaderButton = {
|
|
1222
1126
|
isVisible: true,
|
|
@@ -36,7 +36,6 @@ import type {
|
|
|
36
36
|
LogoTemplateImageModel,
|
|
37
37
|
ShopContent,
|
|
38
38
|
BookingSectionContent,
|
|
39
|
-
FaqSectionContent,
|
|
40
39
|
TextShapeItem,
|
|
41
40
|
GettyVideoMedia,
|
|
42
41
|
AbstractMedia,
|
|
@@ -57,7 +56,6 @@ import {
|
|
|
57
56
|
BUTTON_LINK_TYPE,
|
|
58
57
|
NavigationMenuStyles,
|
|
59
58
|
type TextItem,
|
|
60
|
-
type FaqItem,
|
|
61
59
|
} from '../models';
|
|
62
60
|
import type {
|
|
63
61
|
ImageViewModel,
|
|
@@ -86,7 +84,6 @@ import type {
|
|
|
86
84
|
ShapesSectionViewModel,
|
|
87
85
|
ShopViewModel,
|
|
88
86
|
BookingSectionViewModel,
|
|
89
|
-
FaqSectionViewModel,
|
|
90
87
|
GettyVideoViewModel,
|
|
91
88
|
PageStylesViewModel,
|
|
92
89
|
BackgroundStylesViewModel,
|
|
@@ -1041,42 +1038,6 @@ const mapToTestimonialSectionViewModel = (
|
|
|
1041
1038
|
);
|
|
1042
1039
|
};
|
|
1043
1040
|
|
|
1044
|
-
// An item's question/answer styles are CONTENT_TEXT_STYLE_PROPERTY_KEYS, so the section
|
|
1045
|
-
// resolver handles them when handed the item.
|
|
1046
|
-
const mapFaqItem = (item: FaqItem, styles: PageStyles): FaqItem =>
|
|
1047
|
-
applyViewModelTextStyles(
|
|
1048
|
-
{
|
|
1049
|
-
...item,
|
|
1050
|
-
questionStyle: { ...item.questionStyle },
|
|
1051
|
-
answerStyle: { ...item.answerStyle },
|
|
1052
|
-
} as unknown as ContentViewModel,
|
|
1053
|
-
styles,
|
|
1054
|
-
) as unknown as FaqItem;
|
|
1055
|
-
|
|
1056
|
-
const mapToFaqSectionViewModel = (
|
|
1057
|
-
content: FaqSectionContent,
|
|
1058
|
-
styles: PageStyles,
|
|
1059
|
-
brandPageType: BrandPageType,
|
|
1060
|
-
options: ViewModelMappingOptions,
|
|
1061
|
-
): FaqSectionViewModel => {
|
|
1062
|
-
return applyViewModelTextStyles(
|
|
1063
|
-
{
|
|
1064
|
-
...content,
|
|
1065
|
-
role: content.type,
|
|
1066
|
-
type: 'faq-section',
|
|
1067
|
-
// No `color` pre-seed — these styles are CONTENT_TEXT_STYLE_PROPERTY_KEYS
|
|
1068
|
-
// (see the testimonial mapper), resolved per item for the item styles.
|
|
1069
|
-
titleStyle: { ...content.titleStyle },
|
|
1070
|
-
descriptionStyle: { ...content.descriptionStyle },
|
|
1071
|
-
items: (content.items ?? []).map((item) => mapFaqItem(item, styles)),
|
|
1072
|
-
isFullWidth: true,
|
|
1073
|
-
isStacked: brandPageType !== BRAND_PAGE_TYPES.brandSite,
|
|
1074
|
-
activeItemId: options.activeItemIdByContentId?.[content.id],
|
|
1075
|
-
},
|
|
1076
|
-
styles,
|
|
1077
|
-
);
|
|
1078
|
-
};
|
|
1079
|
-
|
|
1080
1041
|
const mapToSocialLinksViewModel = (
|
|
1081
1042
|
content: SocialLinksContent,
|
|
1082
1043
|
styles: PageStyles,
|
|
@@ -1550,14 +1511,6 @@ export const mapToViewModel =
|
|
|
1550
1511
|
styles,
|
|
1551
1512
|
);
|
|
1552
1513
|
|
|
1553
|
-
case 'faq-section':
|
|
1554
|
-
return mapToFaqSectionViewModel(
|
|
1555
|
-
content as FaqSectionContent,
|
|
1556
|
-
styles,
|
|
1557
|
-
brandPageType,
|
|
1558
|
-
options,
|
|
1559
|
-
);
|
|
1560
|
-
|
|
1561
1514
|
case 'about-section':
|
|
1562
1515
|
return mapToAboutSectionViewModel(
|
|
1563
1516
|
content as AboutSectionContent,
|
|
@@ -1633,8 +1586,6 @@ interface ViewModelMappingOptions {
|
|
|
1633
1586
|
previewImageUrl: string,
|
|
1634
1587
|
assetId: string,
|
|
1635
1588
|
) => void;
|
|
1636
|
-
/** Maker-only UI state: content id → the item its settings panel has open. Never persisted. */
|
|
1637
|
-
activeItemIdByContentId?: Record<string, string | undefined>;
|
|
1638
1589
|
}
|
|
1639
1590
|
|
|
1640
1591
|
const mapBackgroundStylesToViewModel = (
|
|
@@ -35,7 +35,6 @@ import type {
|
|
|
35
35
|
LogoTemplateImageModel,
|
|
36
36
|
CookieOptions,
|
|
37
37
|
BookingSectionContent,
|
|
38
|
-
FaqSectionContent,
|
|
39
38
|
MediaTypes,
|
|
40
39
|
TextStyles,
|
|
41
40
|
BackgroundStyle,
|
|
@@ -68,8 +67,7 @@ export type ViewModelType =
|
|
|
68
67
|
| 'social-links'
|
|
69
68
|
| 'shapes-section'
|
|
70
69
|
| 'shop-section'
|
|
71
|
-
| 'booking-section'
|
|
72
|
-
| 'faq-section';
|
|
70
|
+
| 'booking-section';
|
|
73
71
|
|
|
74
72
|
export interface ContentViewModel {
|
|
75
73
|
id: string;
|
|
@@ -251,15 +249,6 @@ export interface BookingSectionViewModel
|
|
|
251
249
|
isFullWidth: boolean;
|
|
252
250
|
}
|
|
253
251
|
|
|
254
|
-
export interface FaqSectionViewModel
|
|
255
|
-
extends ContentViewModel, Omit<FaqSectionContent, 'type'> {
|
|
256
|
-
isFullWidth: boolean;
|
|
257
|
-
/** brand.page / brand.contact: split and grid always use their stacked layout. */
|
|
258
|
-
isStacked: boolean;
|
|
259
|
-
/** Maker-only: the item the settings panel has open, so the canvas shows it. */
|
|
260
|
-
activeItemId?: string;
|
|
261
|
-
}
|
|
262
|
-
|
|
263
252
|
export interface PageHeaderViewModel extends Omit<
|
|
264
253
|
PageHeaderDesktop | PageHeaderMobile,
|
|
265
254
|
| 'logoImage'
|