@designcrowd/library.brand-page 6.1.16 → 6.1.17-ast-header-button
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-CmNhDMIf.js → CreatedOnBrandCrowd-de-de-Cwq9enJs.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-en-us-DgplxxWa.js → CreatedOnBrandCrowd-en-us-ILK04gFj.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-es-es-DFdhFOa1.js → CreatedOnBrandCrowd-es-es-CbjxLxtu.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-fr-fr-DjLCWBLB.js → CreatedOnBrandCrowd-fr-ca-BwBDiK9z.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-fr-ca-DjLCWBLB.js → CreatedOnBrandCrowd-fr-fr-BwBDiK9z.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-pt-pt-CI2XD0OS.js → CreatedOnBrandCrowd-pt-br-DvhJROpG.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-pt-br-CI2XD0OS.js → CreatedOnBrandCrowd-pt-pt-DvhJROpG.js} +1 -1
- package/lib/src/{CreatedOnDcom-de-de-CkLkBztx.js → CreatedOnDcom-de-de-BK9imWOh.js} +1 -1
- package/lib/src/{CreatedOnDcom-en-us-frnxBJJv.js → CreatedOnDcom-en-us-CyH-_qz1.js} +1 -1
- package/lib/src/{CreatedOnDcom-es-es-CrqgiERj.js → CreatedOnDcom-es-es-Dh51qYEA.js} +1 -1
- package/lib/src/{CreatedOnDcom-fr-ca-CPoEcusj.js → CreatedOnDcom-fr-ca-BArRxwWX.js} +1 -1
- package/lib/src/{CreatedOnDcom-fr-fr-BqrRH3dV.js → CreatedOnDcom-fr-fr-CdglI-ZB.js} +1 -1
- package/lib/src/{CreatedOnDcom-pt-br-CpbVi3Sw.js → CreatedOnDcom-pt-br-DCehns-G.js} +1 -1
- package/lib/src/{CreatedOnDcom-pt-pt-s0XZ3c7y.js → CreatedOnDcom-pt-pt-B8hl-oew.js} +1 -1
- package/lib/src/brand-page/components/navigation/navigation-side-menu/NavigationSideMenu.mixin.d.ts +27 -2
- package/lib/src/brand-page/components/navigation/navigation-side-menu/NavigationSideMenu.mixin.js +26 -0
- package/lib/src/brand-page/components/page-header/PageHeader.mixin.d.ts +3 -1
- package/lib/src/brand-page/components/page-header/PageHeader.mixin.js +12 -0
- package/lib/src/brand-page/models/index.d.ts +12 -0
- package/lib/src/brand-page/models/index.js +3 -0
- package/lib/src/brand-page/utils/button.util.d.ts +5 -0
- package/lib/src/brand-page/utils/button.util.js +4 -0
- package/lib/src/brand-page/utils/view-model.util.d.ts +1 -0
- package/lib/src/brand-page/utils/view-model.util.js +51 -1
- package/lib/src/brand-page/view-models.d.ts +3 -1
- package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.d.ts +1 -1
- package/lib/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.d.ts +1 -1
- package/lib/src/brand-page-maker/stores/ai-checkpoint/ai-checkpoint-store.d.ts +1008 -0
- package/lib/src/{bundled-translations-B2q5GWTQ.js → bundled-translations-B8fAEel0.js} +1 -1
- package/lib/src/bundles/bundled-translations.json +7 -1
- package/lib/src/css/library.brand-page-brandCrowd.min.css +315 -122
- package/lib/src/css/library.brand-page-brandPage.min.css +315 -122
- package/lib/src/css/library.brand-page-designCom.min.css +315 -122
- package/lib/src/css/library.brand-page-preview.min.css +315 -122
- package/lib/src/index.d.ts +1 -0
- package/lib/src/index.mjs +45 -44
- package/lib/src/{lib-O_eJgJHP.js → lib-KFjPFfxn.js} +31522 -31118
- package/lib/src/lib.js +1 -0
- package/lib/src/shared/content-settings/components/content-settings/ContentSettings.mixin.d.ts +1 -1
- package/lib/src/shared/content-settings/components/content-settings/ReplaceImageSettingsForContent.mixin.d.ts +1 -1
- package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItemField.mixin.d.ts +1 -1
- package/lib/src/shared/content-settings/components/payment-config-field/PaymentConfigField.mixin.d.ts +1 -1
- package/lib/src/shared/ecommerce-settings/util/refreshDuplicatedMetadata.d.ts +11 -0
- package/lib/src/shared/ecommerce-settings/util/refreshDuplicatedMetadata.js +80 -0
- package/lib/src/shared/logo-settings/components/LogoSettings.mixin.d.ts +1 -1
- package/lib/src/shared/page-settings/components/delete-page-modal/DeletePageModal.mixin.d.ts +1 -1
- package/lib/src/shared/page-settings/components/new-page-modal/NewPageModal.mixin.d.ts +1 -1
- package/lib/src/shared/page-settings/components/page-settings/PageSettings.mixin.d.ts +113 -1
- package/lib/src/shared/page-settings/components/page-settings-section-styles/PageSettingsSectionStyles.mixin.d.ts +117 -2
- package/lib/src/shared/page-settings/components/page-settings-section-styles/PageSettingsSectionStyles.mixin.js +43 -1
- package/lib/src/shared/page-settings/store/page-settings-store.d.ts +2 -2
- package/package.json +1 -1
- package/src/brand-page/components/button/Button.vue +35 -8
- package/src/brand-page/components/button/Button.vue.test.ts +59 -0
- package/src/brand-page/components/navigation/navigation-side-menu/NavigationSideMenu.mixin.ts +29 -1
- package/src/brand-page/components/navigation/navigation-side-menu/NavigationSideMenu.vue +36 -0
- package/src/brand-page/components/navigation/navigation-side-menu/NavigationSideMenu.vue.test.ts +175 -0
- package/src/brand-page/components/page/Page.vue +6 -0
- package/src/brand-page/components/page-header/HeaderLayout.vue +198 -4
- package/src/brand-page/components/page-header/PageHeader.mixin.ts +16 -1
- package/src/brand-page/components/page-header/PageHeader.vue +23 -1
- package/src/brand-page/components/page-header/PageHeader.vue.test.ts +378 -0
- package/src/brand-page/models/header-button.model.test.ts +86 -0
- package/src/brand-page/models/index.ts +16 -0
- package/src/brand-page/utils/__snapshots__/migration.util.test.ts.snap +6 -0
- package/src/brand-page/utils/__snapshots__/migration2.util.test.ts.snap +2 -0
- package/src/brand-page/utils/__snapshots__/model.util.test.ts.snap +4 -0
- package/src/brand-page/utils/button.util.ts +8 -0
- package/src/brand-page/utils/view-model.util.test.ts +146 -1
- package/src/brand-page/utils/view-model.util.ts +71 -1
- package/src/brand-page/view-models.ts +3 -0
- package/src/bundles/bundled-translations.json +7 -1
- package/src/lib.ts +1 -0
- package/src/shared/ecommerce-settings/util/refreshDuplicatedMetadata.test.ts +399 -0
- package/src/shared/ecommerce-settings/util/refreshDuplicatedMetadata.ts +99 -0
- package/src/shared/page-settings/components/header-settings-panel/HeaderSettingsPanel.button-section.test.ts +126 -0
- package/src/shared/page-settings/components/header-settings-panel/HeaderSettingsPanel.vue +43 -6
- package/src/shared/page-settings/components/page-settings-section-styles/HeaderButtonSettings.test.ts +167 -0
- package/src/shared/page-settings/components/page-settings-section-styles/HeaderButtonSettings.vue +237 -0
- package/src/shared/page-settings/components/page-settings-section-styles/HeaderDisplayStyle.test.ts +160 -0
- package/src/shared/page-settings/components/page-settings-section-styles/HeaderDisplayStyle.vue +37 -8
- package/src/shared/page-settings/components/page-settings-section-styles/PageSettingsSectionStyles.mixin.header-button.test.ts +113 -0
- package/src/shared/page-settings/components/page-settings-section-styles/PageSettingsSectionStyles.mixin.ts +47 -0
- package/src/shared/page-settings/components/page-settings-section-styles/i18n/page-settings-section.json +7 -1
- package/src/shared/page-settings/store/page-settings-store.ts +2 -0
package/lib/src/lib.js
CHANGED
|
@@ -48,6 +48,7 @@ export { tiptapJsonToHtml } from './metadata-builder/helpers/rte.helpers';
|
|
|
48
48
|
// stores
|
|
49
49
|
export { useBrandPageMakerStore, useBrandPageMakerUserStore, useUiStore, useBrandPageContainerStore, useEventManagerStore, useLocalisedRouteStore, useVideoStore, useRouteStore, } from './brand-page-maker/stores';
|
|
50
50
|
export { useShopConfigStore } from './shared/ecommerce-settings/store/shop-settings-store';
|
|
51
|
+
export { refreshDuplicatedMetadata } from './shared/ecommerce-settings/util/refreshDuplicatedMetadata';
|
|
51
52
|
// for jest, need to set active pinia in library.brand-page as well
|
|
52
53
|
import { createPinia, setActivePinia } from 'pinia';
|
|
53
54
|
import { useCartStore } from './shared/ecommerce-settings/store/cart-settings-store';
|
package/lib/src/shared/content-settings/components/content-settings/ContentSettings.mixin.d.ts
CHANGED
|
@@ -527,7 +527,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
527
527
|
sectionName: import("../../../page-settings/store").PageSettingsSection;
|
|
528
528
|
propName: keyof import("../../../page-settings/store").PageSettingsStateSectionStyles;
|
|
529
529
|
index?: number;
|
|
530
|
-
value: string | boolean | import("@brand-page").LinksItem[] | BrandPageCssStyle | Partial<import("@brand-page").ImageGalleryItem> | number | null | undefined;
|
|
530
|
+
value: string | boolean | import("@brand-page").LinksItem[] | BrandPageCssStyle | Partial<import("@brand-page").ImageGalleryItem> | import("@brand-page").HeaderButton | number | null | undefined;
|
|
531
531
|
merge?: boolean;
|
|
532
532
|
viewport: import("@brand-page").ViewportsType;
|
|
533
533
|
}): void;
|
|
@@ -536,7 +536,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
536
536
|
sectionName: import("../../../page-settings/store").PageSettingsSection;
|
|
537
537
|
propName: keyof PageSettingsStateSectionStyles;
|
|
538
538
|
index?: number;
|
|
539
|
-
value: string | boolean | import("@brand-page").LinksItem[] | BrandPageCssStyle | Partial<import("@brand-page").ImageGalleryItem> | number | null | undefined;
|
|
539
|
+
value: string | boolean | import("@brand-page").LinksItem[] | BrandPageCssStyle | Partial<import("@brand-page").ImageGalleryItem> | import("@brand-page").HeaderButton | number | null | undefined;
|
|
540
540
|
merge?: boolean;
|
|
541
541
|
viewport: import("@brand-page").ViewportsType;
|
|
542
542
|
}): void;
|
|
@@ -758,7 +758,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
758
758
|
sectionName: import("../../../page-settings/store").PageSettingsSection;
|
|
759
759
|
propName: keyof import("../../../page-settings/store").PageSettingsStateSectionStyles;
|
|
760
760
|
index?: number;
|
|
761
|
-
value: string | boolean | import("@brand-page").LinksItem[] | BrandPageCssStyle | Partial<import("@brand-page").ImageGalleryItem> | number | null | undefined;
|
|
761
|
+
value: string | boolean | import("@brand-page").LinksItem[] | BrandPageCssStyle | Partial<import("@brand-page").ImageGalleryItem> | import("@brand-page").HeaderButton | number | null | undefined;
|
|
762
762
|
merge?: boolean;
|
|
763
763
|
viewport: import("@brand-page").ViewportsType;
|
|
764
764
|
}): void;
|
|
@@ -560,7 +560,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
560
560
|
sectionName: import("@shared/page-settings/store").PageSettingsSection;
|
|
561
561
|
propName: keyof import("@shared/page-settings/store").PageSettingsStateSectionStyles;
|
|
562
562
|
index?: number;
|
|
563
|
-
value: string | boolean | import("@brand-page").LinksItem[] | BrandPageCssStyle | Partial<import("@brand-page").ImageGalleryItem> | number | null | undefined;
|
|
563
|
+
value: string | boolean | import("@brand-page").LinksItem[] | BrandPageCssStyle | Partial<import("@brand-page").ImageGalleryItem> | import("@brand-page").HeaderButton | number | null | undefined;
|
|
564
564
|
merge?: boolean;
|
|
565
565
|
viewport: import("@brand-page").ViewportsType;
|
|
566
566
|
}): void;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { BrandPageModel } from '@brand-page/models';
|
|
2
|
+
/**
|
|
3
|
+
* Refresh a (migrated, current-version) BrandPageModel so it is safe to persist as a *duplicate*.
|
|
4
|
+
* Two things travel with a verbatim copy that must not: client-minted identifiers that the
|
|
5
|
+
* brand-page-api keys a global row on, and the source owner's embedded payment connection. This
|
|
6
|
+
* rotates the former to fresh values and removes the latter, in place — the new owner reconnects
|
|
7
|
+
* a payment provider explicitly. Runs after migration, so it only ever sees the current shape.
|
|
8
|
+
*
|
|
9
|
+
* See docs/architecture/capabilities/shop-duplication.md.
|
|
10
|
+
*/
|
|
11
|
+
export declare function refreshDuplicatedMetadata(model: BrandPageModel): BrandPageModel;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { v4 as uuid } from 'uuid';
|
|
2
|
+
import { isPayment, isShopContent, isSupportMe } from '@brand-page/utils';
|
|
3
|
+
import { generateSku } from './skuUtils';
|
|
4
|
+
/**
|
|
5
|
+
* Refresh a (migrated, current-version) BrandPageModel so it is safe to persist as a *duplicate*.
|
|
6
|
+
* Two things travel with a verbatim copy that must not: client-minted identifiers that the
|
|
7
|
+
* brand-page-api keys a global row on, and the source owner's embedded payment connection. This
|
|
8
|
+
* rotates the former to fresh values and removes the latter, in place — the new owner reconnects
|
|
9
|
+
* a payment provider explicitly. Runs after migration, so it only ever sees the current shape.
|
|
10
|
+
*
|
|
11
|
+
* See docs/architecture/capabilities/shop-duplication.md.
|
|
12
|
+
*/
|
|
13
|
+
export function refreshDuplicatedMetadata(model) {
|
|
14
|
+
// Site-level payment connection: the authoritative one at checkout — `initialiseShopStore` prefers
|
|
15
|
+
// it over any content-level config — so it leaks the source owner's account even after the
|
|
16
|
+
// content-level connections below are cleared. Disconnect it too; the new owner reconnects.
|
|
17
|
+
model.paymentConfig = undefined;
|
|
18
|
+
model.pages.forEach((page) => page.contents.forEach((content) => {
|
|
19
|
+
if (isShopContent(content)) {
|
|
20
|
+
// Shop products collide on the global product / sku_key tables. The shop's payment-config
|
|
21
|
+
// link is written with throwaway ids (not the content id), so only the product ids rotate.
|
|
22
|
+
content.products.forEach(rotateProductIds);
|
|
23
|
+
disconnectPayment(content.shopPaymentConfig);
|
|
24
|
+
}
|
|
25
|
+
else if (isPayment(content)) {
|
|
26
|
+
resetPaymentBlock(content, content.requestPaymentConfig);
|
|
27
|
+
}
|
|
28
|
+
else if (isSupportMe(content)) {
|
|
29
|
+
resetPaymentBlock(content, content.supportMeConfig);
|
|
30
|
+
}
|
|
31
|
+
}));
|
|
32
|
+
return model;
|
|
33
|
+
}
|
|
34
|
+
function rotateProductIds(product) {
|
|
35
|
+
product.id = uuid();
|
|
36
|
+
// The option id is the only value cross-referenced inside a product — SKUs point at product
|
|
37
|
+
// options by id and each skuKey embeds it — so it is remapped through one old→new map and
|
|
38
|
+
// reused everywhere it reappears. Every other id is standalone and just gets a fresh uuid.
|
|
39
|
+
const optionIdMap = new Map();
|
|
40
|
+
product.variant.forEach((variant) => {
|
|
41
|
+
variant.id = uuid();
|
|
42
|
+
variant.options.forEach((option) => {
|
|
43
|
+
const newId = uuid();
|
|
44
|
+
optionIdMap.set(option.id, newId);
|
|
45
|
+
option.id = newId;
|
|
46
|
+
});
|
|
47
|
+
});
|
|
48
|
+
product.skus.forEach((sku) => {
|
|
49
|
+
sku.id = uuid();
|
|
50
|
+
sku.variant.forEach((skuVariant) => {
|
|
51
|
+
skuVariant.id = uuid();
|
|
52
|
+
skuVariant.option.id = optionIdMap.get(skuVariant.option.id) ?? uuid();
|
|
53
|
+
});
|
|
54
|
+
// Regenerate from the now-remapped option so the key embeds the new option id and a fresh
|
|
55
|
+
// random suffix — this is what keeps sku_key globally unique on the copy's first upsert.
|
|
56
|
+
sku.skuKey = generateSku(product.name, sku.variant[0]?.option);
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* request-payment / support-me content. The api keys `content_block_payment_config` on the content
|
|
61
|
+
* id (PK) and `brand_page_product` on the payment-option id (PK), both global. A verbatim copy
|
|
62
|
+
* would, on its next payment upsert, repoint the source's config link and adopt its product rows —
|
|
63
|
+
* so rotate both to make the copy independent, then drop the connection.
|
|
64
|
+
*/
|
|
65
|
+
function resetPaymentBlock(content, config) {
|
|
66
|
+
content.id = uuid();
|
|
67
|
+
config.paymentOptions.forEach((option) => {
|
|
68
|
+
option.id = uuid();
|
|
69
|
+
});
|
|
70
|
+
disconnectPayment(config);
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Drop the embedded payment connection (the source owner's payment/Stripe account). The section
|
|
74
|
+
* keeps its options and amounts but reverts to "not connected"; the new owner reconnects.
|
|
75
|
+
*/
|
|
76
|
+
function disconnectPayment(config) {
|
|
77
|
+
if (config) {
|
|
78
|
+
config.paymentConfig = undefined;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
@@ -727,7 +727,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
727
727
|
sectionName: import("@shared/page-settings/store").PageSettingsSection;
|
|
728
728
|
propName: keyof import("@shared/page-settings/store").PageSettingsStateSectionStyles;
|
|
729
729
|
index?: number;
|
|
730
|
-
value: string | boolean | import("../../../brand-page").LinksItem[] | BrandPageCssStyle | Partial<import("../../../brand-page").ImageGalleryItem> | number | null | undefined;
|
|
730
|
+
value: string | boolean | import("../../../brand-page").LinksItem[] | BrandPageCssStyle | Partial<import("../../../brand-page").ImageGalleryItem> | import("../../../brand-page").HeaderButton | number | null | undefined;
|
|
731
731
|
merge?: boolean;
|
|
732
732
|
viewport: import("../../../brand-page").ViewportsType;
|
|
733
733
|
}): void;
|
package/lib/src/shared/page-settings/components/delete-page-modal/DeletePageModal.mixin.d.ts
CHANGED
|
@@ -35,8 +35,8 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
35
35
|
onCancel?: ((...args: any[]) => any) | undefined;
|
|
36
36
|
onConfirm?: ((...args: any[]) => any) | undefined;
|
|
37
37
|
}>, {
|
|
38
|
+
isVisible: boolean;
|
|
38
39
|
pageId: string;
|
|
39
40
|
pageTitle: string;
|
|
40
|
-
isVisible: boolean;
|
|
41
41
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
42
42
|
export default _default;
|
|
@@ -37,7 +37,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
37
37
|
sectionName: import("../../store").PageSettingsSection;
|
|
38
38
|
propName: keyof import("../../store").PageSettingsStateSectionStyles;
|
|
39
39
|
index?: number;
|
|
40
|
-
value: string | boolean | import("../../../../brand-page").LinksItem[] | BrandPageCssStyle | Partial<import("../../../../brand-page").ImageGalleryItem> | number | null | undefined;
|
|
40
|
+
value: string | boolean | import("../../../../brand-page").LinksItem[] | BrandPageCssStyle | Partial<import("../../../../brand-page").ImageGalleryItem> | import("../../../../brand-page").HeaderButton | number | null | undefined;
|
|
41
41
|
merge?: boolean;
|
|
42
42
|
viewport: import("../../../../brand-page").ViewportsType;
|
|
43
43
|
}): void;
|
|
@@ -1368,6 +1368,62 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
1368
1368
|
wordBreak?: string | undefined;
|
|
1369
1369
|
};
|
|
1370
1370
|
viewport: import("@brand-page").ViewportsType;
|
|
1371
|
+
headerButton?: {
|
|
1372
|
+
isVisible: boolean;
|
|
1373
|
+
text: string;
|
|
1374
|
+
buttonLinkType: import("@brand-page").ButtonLinkType;
|
|
1375
|
+
url?: string | undefined;
|
|
1376
|
+
buttonPageId?: string | undefined;
|
|
1377
|
+
buttonTextStyle?: {
|
|
1378
|
+
aspectRatio?: string | undefined;
|
|
1379
|
+
backgroundAttachment?: string | undefined;
|
|
1380
|
+
background?: string | undefined;
|
|
1381
|
+
backgroundColor?: string | undefined;
|
|
1382
|
+
backgroundImage?: string | undefined;
|
|
1383
|
+
backgroundPosition?: string | undefined;
|
|
1384
|
+
backgroundRepeat?: string | undefined;
|
|
1385
|
+
backgroundSize?: string | undefined;
|
|
1386
|
+
border?: string | undefined;
|
|
1387
|
+
borderBottomWidth?: string | undefined;
|
|
1388
|
+
borderColor?: string | undefined;
|
|
1389
|
+
borderLeftWidth?: string | undefined;
|
|
1390
|
+
borderRadius?: string | undefined;
|
|
1391
|
+
borderRightWidth?: string | undefined;
|
|
1392
|
+
borderStyle?: string | undefined;
|
|
1393
|
+
borderTopWidth?: string | undefined;
|
|
1394
|
+
borderWidth?: string | undefined;
|
|
1395
|
+
boxShadow?: string | undefined;
|
|
1396
|
+
color?: string | undefined;
|
|
1397
|
+
fill?: string | undefined;
|
|
1398
|
+
fontFamily?: string | undefined;
|
|
1399
|
+
fontStyle?: string | undefined;
|
|
1400
|
+
fontSize?: string | undefined;
|
|
1401
|
+
fontWeight?: string | undefined;
|
|
1402
|
+
height?: string | undefined;
|
|
1403
|
+
left?: string | undefined;
|
|
1404
|
+
letterSpacing?: string | undefined;
|
|
1405
|
+
lineHeight?: string | undefined;
|
|
1406
|
+
marginBottom?: string | undefined;
|
|
1407
|
+
maxWidth?: string | undefined;
|
|
1408
|
+
opacity?: string | undefined;
|
|
1409
|
+
overflow?: string | undefined;
|
|
1410
|
+
overflowWrap?: string | undefined;
|
|
1411
|
+
paddingTop?: string | undefined;
|
|
1412
|
+
position?: string | undefined;
|
|
1413
|
+
textAlign?: string | undefined;
|
|
1414
|
+
textDecoration?: string | undefined;
|
|
1415
|
+
top?: string | undefined;
|
|
1416
|
+
transform?: string | undefined;
|
|
1417
|
+
transformOrigin?: string | undefined;
|
|
1418
|
+
transition?: string | undefined;
|
|
1419
|
+
width?: string | undefined;
|
|
1420
|
+
wordBreak?: string | undefined;
|
|
1421
|
+
textStyleType?: import("@brand-page").TextStyleType | undefined;
|
|
1422
|
+
applyAutoScale?: boolean | undefined;
|
|
1423
|
+
} | undefined;
|
|
1424
|
+
fillColor?: string | undefined;
|
|
1425
|
+
borderColor?: string | undefined;
|
|
1426
|
+
} | undefined;
|
|
1371
1427
|
};
|
|
1372
1428
|
mobile: {
|
|
1373
1429
|
displayStyle: import("@brand-page").HeaderDisplayStyle;
|
|
@@ -2661,6 +2717,62 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
2661
2717
|
wordBreak?: string | undefined;
|
|
2662
2718
|
};
|
|
2663
2719
|
viewport: import("@brand-page").ViewportsType;
|
|
2720
|
+
headerButton?: {
|
|
2721
|
+
isVisible: boolean;
|
|
2722
|
+
text: string;
|
|
2723
|
+
buttonLinkType: import("@brand-page").ButtonLinkType;
|
|
2724
|
+
url?: string | undefined;
|
|
2725
|
+
buttonPageId?: string | undefined;
|
|
2726
|
+
buttonTextStyle?: {
|
|
2727
|
+
aspectRatio?: string | undefined;
|
|
2728
|
+
backgroundAttachment?: string | undefined;
|
|
2729
|
+
background?: string | undefined;
|
|
2730
|
+
backgroundColor?: string | undefined;
|
|
2731
|
+
backgroundImage?: string | undefined;
|
|
2732
|
+
backgroundPosition?: string | undefined;
|
|
2733
|
+
backgroundRepeat?: string | undefined;
|
|
2734
|
+
backgroundSize?: string | undefined;
|
|
2735
|
+
border?: string | undefined;
|
|
2736
|
+
borderBottomWidth?: string | undefined;
|
|
2737
|
+
borderColor?: string | undefined;
|
|
2738
|
+
borderLeftWidth?: string | undefined;
|
|
2739
|
+
borderRadius?: string | undefined;
|
|
2740
|
+
borderRightWidth?: string | undefined;
|
|
2741
|
+
borderStyle?: string | undefined;
|
|
2742
|
+
borderTopWidth?: string | undefined;
|
|
2743
|
+
borderWidth?: string | undefined;
|
|
2744
|
+
boxShadow?: string | undefined;
|
|
2745
|
+
color?: string | undefined;
|
|
2746
|
+
fill?: string | undefined;
|
|
2747
|
+
fontFamily?: string | undefined;
|
|
2748
|
+
fontStyle?: string | undefined;
|
|
2749
|
+
fontSize?: string | undefined;
|
|
2750
|
+
fontWeight?: string | undefined;
|
|
2751
|
+
height?: string | undefined;
|
|
2752
|
+
left?: string | undefined;
|
|
2753
|
+
letterSpacing?: string | undefined;
|
|
2754
|
+
lineHeight?: string | undefined;
|
|
2755
|
+
marginBottom?: string | undefined;
|
|
2756
|
+
maxWidth?: string | undefined;
|
|
2757
|
+
opacity?: string | undefined;
|
|
2758
|
+
overflow?: string | undefined;
|
|
2759
|
+
overflowWrap?: string | undefined;
|
|
2760
|
+
paddingTop?: string | undefined;
|
|
2761
|
+
position?: string | undefined;
|
|
2762
|
+
textAlign?: string | undefined;
|
|
2763
|
+
textDecoration?: string | undefined;
|
|
2764
|
+
top?: string | undefined;
|
|
2765
|
+
transform?: string | undefined;
|
|
2766
|
+
transformOrigin?: string | undefined;
|
|
2767
|
+
transition?: string | undefined;
|
|
2768
|
+
width?: string | undefined;
|
|
2769
|
+
wordBreak?: string | undefined;
|
|
2770
|
+
textStyleType?: import("@brand-page").TextStyleType | undefined;
|
|
2771
|
+
applyAutoScale?: boolean | undefined;
|
|
2772
|
+
} | undefined;
|
|
2773
|
+
fillColor?: string | undefined;
|
|
2774
|
+
borderColor?: string | undefined;
|
|
2775
|
+
} | undefined;
|
|
2664
2776
|
};
|
|
2665
2777
|
};
|
|
2666
2778
|
footer: {
|
|
@@ -3983,7 +4095,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
3983
4095
|
sectionName: PageSettingsSection;
|
|
3984
4096
|
propName: keyof import("../../store").PageSettingsStateSectionStyles;
|
|
3985
4097
|
index?: number;
|
|
3986
|
-
value: string | boolean | import("@brand-page").LinksItem[] | BrandPageCssStyle | Partial<import("@brand-page").ImageGalleryItem> | number | null | undefined;
|
|
4098
|
+
value: string | boolean | import("@brand-page").LinksItem[] | BrandPageCssStyle | Partial<import("@brand-page").ImageGalleryItem> | import("@brand-page").HeaderButton | number | null | undefined;
|
|
3987
4099
|
merge?: boolean;
|
|
3988
4100
|
viewport: import("@brand-page").ViewportsType;
|
|
3989
4101
|
}): void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { PropType } from 'vue';
|
|
2
2
|
import type { PageSectionStyleOption } from '@brand-page-maker/models/page-section-style.model';
|
|
3
3
|
import type { NavigationStyleOptionValueChangeEvent, PageSection, PageSettingsFontSettingsOption } from '../../models';
|
|
4
|
-
import type { LogoTheme, NavigationDisplayType, NavigationType, LinksItem, HeaderDisplayStyle, FooterDisplayStyle, ViewportsType, NavigationDesktop, NavigationMobile, PageHeaderDesktop, PageHeaderMobile, PageFooterDesktop, PageFooterMobile, LogoImageModel, LogoViewModel } from '@brand-page';
|
|
4
|
+
import type { HeaderButton, LogoTheme, NavigationDisplayType, NavigationType, LinksItem, HeaderDisplayStyle, FooterDisplayStyle, ViewportsType, NavigationDesktop, NavigationMobile, PageHeaderDesktop, PageHeaderMobile, PageFooterDesktop, PageFooterMobile, LogoImageModel, LogoViewModel } from '@brand-page';
|
|
5
5
|
import type { ContentItemFieldSettings, UpdateItemValuePayload } from '../../../content-settings/models';
|
|
6
6
|
import type { PageSettingsStateSectionStyles } from '../../store';
|
|
7
7
|
import type { DisplayLogoDraftAsset } from '../../../../clients/models';
|
|
@@ -1326,6 +1326,62 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
1326
1326
|
wordBreak?: string | undefined;
|
|
1327
1327
|
};
|
|
1328
1328
|
viewport: ViewportsType;
|
|
1329
|
+
headerButton?: {
|
|
1330
|
+
isVisible: boolean;
|
|
1331
|
+
text: string;
|
|
1332
|
+
buttonLinkType: import("@brand-page").ButtonLinkType;
|
|
1333
|
+
url?: string | undefined;
|
|
1334
|
+
buttonPageId?: string | undefined;
|
|
1335
|
+
buttonTextStyle?: {
|
|
1336
|
+
aspectRatio?: string | undefined;
|
|
1337
|
+
backgroundAttachment?: string | undefined;
|
|
1338
|
+
background?: string | undefined;
|
|
1339
|
+
backgroundColor?: string | undefined;
|
|
1340
|
+
backgroundImage?: string | undefined;
|
|
1341
|
+
backgroundPosition?: string | undefined;
|
|
1342
|
+
backgroundRepeat?: string | undefined;
|
|
1343
|
+
backgroundSize?: string | undefined;
|
|
1344
|
+
border?: string | undefined;
|
|
1345
|
+
borderBottomWidth?: string | undefined;
|
|
1346
|
+
borderColor?: string | undefined;
|
|
1347
|
+
borderLeftWidth?: string | undefined;
|
|
1348
|
+
borderRadius?: string | undefined;
|
|
1349
|
+
borderRightWidth?: string | undefined;
|
|
1350
|
+
borderStyle?: string | undefined;
|
|
1351
|
+
borderTopWidth?: string | undefined;
|
|
1352
|
+
borderWidth?: string | undefined;
|
|
1353
|
+
boxShadow?: string | undefined;
|
|
1354
|
+
color?: string | undefined;
|
|
1355
|
+
fill?: string | undefined;
|
|
1356
|
+
fontFamily?: string | undefined;
|
|
1357
|
+
fontStyle?: string | undefined;
|
|
1358
|
+
fontSize?: string | undefined;
|
|
1359
|
+
fontWeight?: string | undefined;
|
|
1360
|
+
height?: string | undefined;
|
|
1361
|
+
left?: string | undefined;
|
|
1362
|
+
letterSpacing?: string | undefined;
|
|
1363
|
+
lineHeight?: string | undefined;
|
|
1364
|
+
marginBottom?: string | undefined;
|
|
1365
|
+
maxWidth?: string | undefined;
|
|
1366
|
+
opacity?: string | undefined;
|
|
1367
|
+
overflow?: string | undefined;
|
|
1368
|
+
overflowWrap?: string | undefined;
|
|
1369
|
+
paddingTop?: string | undefined;
|
|
1370
|
+
position?: string | undefined;
|
|
1371
|
+
textAlign?: string | undefined;
|
|
1372
|
+
textDecoration?: string | undefined;
|
|
1373
|
+
top?: string | undefined;
|
|
1374
|
+
transform?: string | undefined;
|
|
1375
|
+
transformOrigin?: string | undefined;
|
|
1376
|
+
transition?: string | undefined;
|
|
1377
|
+
width?: string | undefined;
|
|
1378
|
+
wordBreak?: string | undefined;
|
|
1379
|
+
textStyleType?: import("@brand-page").TextStyleType | undefined;
|
|
1380
|
+
applyAutoScale?: boolean | undefined;
|
|
1381
|
+
} | undefined;
|
|
1382
|
+
fillColor?: string | undefined;
|
|
1383
|
+
borderColor?: string | undefined;
|
|
1384
|
+
} | undefined;
|
|
1329
1385
|
};
|
|
1330
1386
|
mobile: {
|
|
1331
1387
|
displayStyle: HeaderDisplayStyle;
|
|
@@ -2619,6 +2675,62 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
2619
2675
|
wordBreak?: string | undefined;
|
|
2620
2676
|
};
|
|
2621
2677
|
viewport: ViewportsType;
|
|
2678
|
+
headerButton?: {
|
|
2679
|
+
isVisible: boolean;
|
|
2680
|
+
text: string;
|
|
2681
|
+
buttonLinkType: import("@brand-page").ButtonLinkType;
|
|
2682
|
+
url?: string | undefined;
|
|
2683
|
+
buttonPageId?: string | undefined;
|
|
2684
|
+
buttonTextStyle?: {
|
|
2685
|
+
aspectRatio?: string | undefined;
|
|
2686
|
+
backgroundAttachment?: string | undefined;
|
|
2687
|
+
background?: string | undefined;
|
|
2688
|
+
backgroundColor?: string | undefined;
|
|
2689
|
+
backgroundImage?: string | undefined;
|
|
2690
|
+
backgroundPosition?: string | undefined;
|
|
2691
|
+
backgroundRepeat?: string | undefined;
|
|
2692
|
+
backgroundSize?: string | undefined;
|
|
2693
|
+
border?: string | undefined;
|
|
2694
|
+
borderBottomWidth?: string | undefined;
|
|
2695
|
+
borderColor?: string | undefined;
|
|
2696
|
+
borderLeftWidth?: string | undefined;
|
|
2697
|
+
borderRadius?: string | undefined;
|
|
2698
|
+
borderRightWidth?: string | undefined;
|
|
2699
|
+
borderStyle?: string | undefined;
|
|
2700
|
+
borderTopWidth?: string | undefined;
|
|
2701
|
+
borderWidth?: string | undefined;
|
|
2702
|
+
boxShadow?: string | undefined;
|
|
2703
|
+
color?: string | undefined;
|
|
2704
|
+
fill?: string | undefined;
|
|
2705
|
+
fontFamily?: string | undefined;
|
|
2706
|
+
fontStyle?: string | undefined;
|
|
2707
|
+
fontSize?: string | undefined;
|
|
2708
|
+
fontWeight?: string | undefined;
|
|
2709
|
+
height?: string | undefined;
|
|
2710
|
+
left?: string | undefined;
|
|
2711
|
+
letterSpacing?: string | undefined;
|
|
2712
|
+
lineHeight?: string | undefined;
|
|
2713
|
+
marginBottom?: string | undefined;
|
|
2714
|
+
maxWidth?: string | undefined;
|
|
2715
|
+
opacity?: string | undefined;
|
|
2716
|
+
overflow?: string | undefined;
|
|
2717
|
+
overflowWrap?: string | undefined;
|
|
2718
|
+
paddingTop?: string | undefined;
|
|
2719
|
+
position?: string | undefined;
|
|
2720
|
+
textAlign?: string | undefined;
|
|
2721
|
+
textDecoration?: string | undefined;
|
|
2722
|
+
top?: string | undefined;
|
|
2723
|
+
transform?: string | undefined;
|
|
2724
|
+
transformOrigin?: string | undefined;
|
|
2725
|
+
transition?: string | undefined;
|
|
2726
|
+
width?: string | undefined;
|
|
2727
|
+
wordBreak?: string | undefined;
|
|
2728
|
+
textStyleType?: import("@brand-page").TextStyleType | undefined;
|
|
2729
|
+
applyAutoScale?: boolean | undefined;
|
|
2730
|
+
} | undefined;
|
|
2731
|
+
fillColor?: string | undefined;
|
|
2732
|
+
borderColor?: string | undefined;
|
|
2733
|
+
} | undefined;
|
|
2622
2734
|
};
|
|
2623
2735
|
};
|
|
2624
2736
|
footer: {
|
|
@@ -3271,7 +3383,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
3271
3383
|
sectionName: import("../../store").PageSettingsSection;
|
|
3272
3384
|
propName: keyof PageSettingsStateSectionStyles;
|
|
3273
3385
|
index?: number;
|
|
3274
|
-
value: string | boolean | LinksItem[] | BrandPageCssStyle | Partial<import("@brand-page").ImageGalleryItem> | number | null | undefined;
|
|
3386
|
+
value: string | boolean | LinksItem[] | BrandPageCssStyle | Partial<import("@brand-page").ImageGalleryItem> | HeaderButton | number | null | undefined;
|
|
3275
3387
|
merge?: boolean;
|
|
3276
3388
|
viewport: ViewportsType;
|
|
3277
3389
|
}): void;
|
|
@@ -4630,6 +4742,8 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
4630
4742
|
isRenderAfterLogo(): any;
|
|
4631
4743
|
navigation(): NavigationDesktop | NavigationMobile;
|
|
4632
4744
|
header(): PageHeaderDesktop | PageHeaderMobile;
|
|
4745
|
+
headerButton(): HeaderButton | undefined;
|
|
4746
|
+
isHeaderButtonVisible(): boolean;
|
|
4633
4747
|
navigationType(): NavigationType;
|
|
4634
4748
|
footer(): PageFooterDesktop | PageFooterMobile;
|
|
4635
4749
|
showDeviceWarning(): boolean;
|
|
@@ -4680,6 +4794,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
4680
4794
|
onCopyrightTextChange({ value }: {
|
|
4681
4795
|
value: string;
|
|
4682
4796
|
}): void;
|
|
4797
|
+
onHeaderButtonChange(patch: Partial<HeaderButton>): void;
|
|
4683
4798
|
onItemListIntentImageReplace(name: PageSectionStyleOption, { index }: {
|
|
4684
4799
|
index: number;
|
|
4685
4800
|
}): void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent, computed } from 'vue';
|
|
2
2
|
import { PAGE_SECTION_STYLE_OPTIONS } from '@brand-page-maker/models/page-section-style.model';
|
|
3
3
|
import { PAGE_SECTIONS } from '../../models';
|
|
4
|
-
import { LOGO_SLIDER_DESKTOP_MAX, LOGO_SLIDER_DESKTOP_MIN, LOGO_SLIDER_MOBILE_MAX, LOGO_SLIDER_MOBILE_MIN, VIEWPORTS, getNavigationType, NAVIGATION_TYPE_DEFAULT_DISPLAY_TYPE, } from '@brand-page';
|
|
4
|
+
import { BUTTON_LINK_TYPE, LOGO_SLIDER_DESKTOP_MAX, LOGO_SLIDER_DESKTOP_MIN, LOGO_SLIDER_MOBILE_MAX, LOGO_SLIDER_MOBILE_MIN, VIEWPORTS, getNavigationType, NAVIGATION_TYPE_DEFAULT_DISPLAY_TYPE, } from '@brand-page';
|
|
5
5
|
import { UI_DEVICE_MODES, UI_EVENT_SOURCES } from '../../../models';
|
|
6
6
|
import { isTransparentColour } from '@brand-page/utils/color.util';
|
|
7
7
|
import { useUiPageSettingsStore } from '../../store';
|
|
@@ -13,6 +13,16 @@ import { useUiEditableLogoStore, useUiLogoSettingsStore, } from '@shared/logo-se
|
|
|
13
13
|
import { FabricRenderClient } from '../../../../clients/fabric-render-client';
|
|
14
14
|
import { parseLogoThemeToCssStyles } from '@brand-page/utils';
|
|
15
15
|
import { commonTr } from '@src/composables/useTranslate';
|
|
16
|
+
/**
|
|
17
|
+
* Seed for the first write to `headerButton` (the model deliberately holds no
|
|
18
|
+
* default — absent means "no button"). Url is the link kind the Figma shows
|
|
19
|
+
* pre-selected.
|
|
20
|
+
*/
|
|
21
|
+
const NEW_HEADER_BUTTON = {
|
|
22
|
+
isVisible: false,
|
|
23
|
+
text: '',
|
|
24
|
+
buttonLinkType: BUTTON_LINK_TYPE.url,
|
|
25
|
+
};
|
|
16
26
|
const viewportsWithTr = () => [
|
|
17
27
|
{
|
|
18
28
|
key: VIEWPORTS.desktop,
|
|
@@ -100,6 +110,12 @@ export default defineComponent({
|
|
|
100
110
|
header() {
|
|
101
111
|
return this.sections[PAGE_SECTIONS.header][this.viewport];
|
|
102
112
|
},
|
|
113
|
+
headerButton() {
|
|
114
|
+
return this.header.headerButton;
|
|
115
|
+
},
|
|
116
|
+
isHeaderButtonVisible() {
|
|
117
|
+
return this.headerButton?.isVisible === true;
|
|
118
|
+
},
|
|
103
119
|
navigationType() {
|
|
104
120
|
return getNavigationType(this.navigation.displayType);
|
|
105
121
|
},
|
|
@@ -327,6 +343,32 @@ export default defineComponent({
|
|
|
327
343
|
viewport: VIEWPORTS.desktop,
|
|
328
344
|
});
|
|
329
345
|
},
|
|
346
|
+
onHeaderButtonChange(patch) {
|
|
347
|
+
const value = {
|
|
348
|
+
...NEW_HEADER_BUTTON,
|
|
349
|
+
...this.headerButton,
|
|
350
|
+
...patch,
|
|
351
|
+
};
|
|
352
|
+
// Desktop and mobile must hold the SAME button config (BP-5852 AC). The
|
|
353
|
+
// whole object is written to both from one source rather than merged
|
|
354
|
+
// per-viewport, so a pair that somehow diverged is reconciled instead of
|
|
355
|
+
// each side keeping its own leftovers.
|
|
356
|
+
//
|
|
357
|
+
// Each viewport gets its own copy: one shared object would alias the two
|
|
358
|
+
// branches of store state to a single instance.
|
|
359
|
+
this.pageSettingsStore.setPageSettingsSectionValue({
|
|
360
|
+
sectionName: PAGE_SECTIONS.header,
|
|
361
|
+
propName: 'headerButton',
|
|
362
|
+
value: { ...value },
|
|
363
|
+
viewport: VIEWPORTS.mobile,
|
|
364
|
+
});
|
|
365
|
+
this.pageSettingsStore.setPageSettingsSectionValue({
|
|
366
|
+
sectionName: PAGE_SECTIONS.header,
|
|
367
|
+
propName: 'headerButton',
|
|
368
|
+
value: { ...value },
|
|
369
|
+
viewport: VIEWPORTS.desktop,
|
|
370
|
+
});
|
|
371
|
+
},
|
|
330
372
|
onItemListIntentImageReplace(name, { index }) {
|
|
331
373
|
this.contentSettingsStore.setSelectedItemAndFieldName({
|
|
332
374
|
id: this.sectionName,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ContentItem } from '../../content-settings/models';
|
|
2
2
|
import { PageHeaderDesktop, PageHeaderMobile, PageFooterDesktop, PageFooterMobile, VIEWPORTS } from '@brand-page';
|
|
3
3
|
import type { NavigationType } from '@brand-page';
|
|
4
|
-
import type { Content, ImageGalleryItem, LinksItem, LogoImageModel, ViewportsType, LogoTemplateImageModel, BrandPagePaymentConfig, BrandPagePaymentConfigCurrency } from '@brand-page';
|
|
4
|
+
import type { Content, HeaderButton, ImageGalleryItem, LinksItem, LogoImageModel, ViewportsType, LogoTemplateImageModel, BrandPagePaymentConfig, BrandPagePaymentConfigCurrency } from '@brand-page';
|
|
5
5
|
import type { ContentPage } from '../models';
|
|
6
6
|
import { PAGE_SECTIONS } from '../models';
|
|
7
7
|
export type PageSettingsStateSectionStyles = Partial<PageHeaderDesktop & PageHeaderMobile & PageFooterDesktop & PageFooterMobile>;
|
|
@@ -74,7 +74,7 @@ export declare const useUiPageSettingsStore: import("pinia").StoreDefinition<"ui
|
|
|
74
74
|
sectionName: PageSettingsSection;
|
|
75
75
|
propName: keyof PageSettingsStateSectionStyles;
|
|
76
76
|
index?: number;
|
|
77
|
-
value: string | boolean | LinksItem[] | BrandPageCssStyle | Partial<ImageGalleryItem> | number | null | undefined;
|
|
77
|
+
value: string | boolean | LinksItem[] | BrandPageCssStyle | Partial<ImageGalleryItem> | HeaderButton | number | null | undefined;
|
|
78
78
|
merge?: boolean;
|
|
79
79
|
viewport: ViewportsType;
|
|
80
80
|
}): void;
|
package/package.json
CHANGED