@designcrowd/library.brand-page 5.12.16 → 5.12.17
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-BWNaSfFj.js → CreatedOnBrandCrowd-de-de-SuRBYEOK.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-en-us-BY9aeDMv.js → CreatedOnBrandCrowd-en-us-nRsOUZ3P.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-es-es-CS_1PWua.js → CreatedOnBrandCrowd-es-es-ClBEtWuB.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-fr-fr-BEvtF_4D.js → CreatedOnBrandCrowd-fr-fr-K4MC8Ylw.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-pt-pt-BhcDmSeh.js → CreatedOnBrandCrowd-pt-pt-CVu8GWB4.js} +1 -1
- package/lib/src/{CreatedOnDcom-de-de-H-eAS3dV.js → CreatedOnDcom-de-de-CKGT_xy8.js} +1 -1
- package/lib/src/{CreatedOnDcom-en-us-D-VcbUgW.js → CreatedOnDcom-en-us-DwqjHxyq.js} +1 -1
- package/lib/src/{CreatedOnDcom-es-es-DduS8A1F.js → CreatedOnDcom-es-es-BMx0XD9Y.js} +1 -1
- package/lib/src/{CreatedOnDcom-fr-fr-BcCjONur.js → CreatedOnDcom-fr-fr-WgW2vbbI.js} +1 -1
- package/lib/src/{CreatedOnDcom-pt-pt-Dzc9W3TD.js → CreatedOnDcom-pt-pt-BZJmhI7K.js} +1 -1
- package/lib/src/brand-page/components/icon/Icon.mixin.d.ts +1 -0
- package/lib/src/brand-page/components/icon/Icon.mixin.js +2 -0
- package/lib/src/brand-page/utils/migration/migration-051.d.ts +4 -0
- package/lib/src/brand-page/utils/migration/migration-051.js +18 -0
- package/lib/src/brand-page/utils/migration.util.js +5 -0
- package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.d.ts +5 -0
- package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.stories.js +1 -0
- package/lib/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.d.ts +2 -0
- package/lib/src/brand-page-maker/components/quick-link-bar/QuickLinkBar.mixin.d.ts +2 -0
- package/lib/src/brand-page-maker/components/seo-settings/SeoPageSettings.mixin.d.ts +2 -0
- package/lib/src/brand-page-maker/components/seo-settings/UrlSettings.mixin.d.ts +2 -0
- package/lib/src/brand-page-maker/components/seo-settings/UseExistingDomainModal.mixin.d.ts +2 -0
- package/lib/src/brand-page-maker/components/upgrade-to-premium-button/UpgradeToPremiumButton.mixin.d.ts +2 -0
- package/lib/src/brand-page-maker/stores/brandpage-container/brand-page-container-store.d.ts +3 -0
- package/lib/src/brand-page-maker/stores/brandpage-container/brand-page-container-store.js +5 -0
- package/lib/src/css/library.brand-page-brandCrowd.min.css +3 -3
- package/lib/src/css/library.brand-page-brandPage.min.css +3 -3
- package/lib/src/css/library.brand-page-designCom.min.css +3 -3
- package/lib/src/css/library.brand-page-preview.min.css +3 -3
- package/lib/src/index.mjs +1 -1
- package/lib/src/{lib-BAogQklh.js → lib-CiOvr9QV.js} +4644 -4613
- package/lib/src/shared/content-settings/components/payment-config-field/PaymentConfigField.mixin.d.ts +2 -0
- package/lib/src/shared/logo-settings/components/LogoSettings.mixin.d.ts +2 -0
- package/lib/src/shared/page-settings/components/page-settings/PageSettings.mixin.d.ts +2 -0
- package/lib/src/shared/page-settings/components/page-settings-section-styles/PageSettingsSectionStyles.mixin.d.ts +2 -0
- package/lib/src/shared/publish-brand-page-with-state/PublishBrandPageModalWithState.mixin.d.ts +2 -0
- package/lib/src/shared/side-bar/components/SideBar.mixin.d.ts +2 -0
- package/lib/src/shared/style-settings/components/StyleSettings.mixin.d.ts +2 -0
- package/lib/src/shared/template-settings/components/TemplatesSettings.mixin.d.ts +4 -0
- package/lib/src/shared/template-settings/components/TemplatesSettings.mixin.js +12 -3
- package/lib/src/shared/template-settings/store/template-settings-store.d.ts +4 -0
- package/lib/src/shared/template-settings/store/template-settings-store.js +4 -0
- package/package.json +1 -1
- package/src/brand-page/components/icon/Icon.mixin.ts +2 -0
- package/src/brand-page/components/icon/Icon.vue +1 -0
- package/src/brand-page/components/icon/icons/Twitter.vue +5 -0
- package/src/brand-page/utils/__snapshots__/migration.util.test.ts.snap +3 -3
- package/src/brand-page/utils/migration/migration-051.ts +24 -0
- package/src/brand-page/utils/migration.util.ts +5 -0
- package/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.stories.ts +1 -0
- package/src/brand-page-maker/stores/brandpage-container/brand-page-container-store.ts +7 -0
- package/src/shared/template-settings/components/TemplatesSettings.mixin.ts +13 -3
- package/src/shared/template-settings/store/template-settings-store.ts +5 -0
|
@@ -82,6 +82,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
82
82
|
eventButtonLocation?: string | undefined;
|
|
83
83
|
showPublishOptionModal?: boolean | undefined;
|
|
84
84
|
abTests: Record<string, string>;
|
|
85
|
+
logoBrandIndustry: string | undefined;
|
|
85
86
|
} & import("pinia").PiniaCustomStateProperties<import("../../../../brand-page-maker/stores").BrandPageContainerState>) => boolean;
|
|
86
87
|
isUserDraft: (state: {
|
|
87
88
|
availableTaxes: any[];
|
|
@@ -141,6 +142,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
141
142
|
eventButtonLocation?: string | undefined;
|
|
142
143
|
showPublishOptionModal?: boolean | undefined;
|
|
143
144
|
abTests: Record<string, string>;
|
|
145
|
+
logoBrandIndustry: string | undefined;
|
|
144
146
|
} & import("pinia").PiniaCustomStateProperties<import("../../../../brand-page-maker/stores").BrandPageContainerState>) => boolean;
|
|
145
147
|
}, {
|
|
146
148
|
clearTriggerSaveEventApiOnPublishModalClose(): void;
|
|
@@ -247,6 +247,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
247
247
|
eventButtonLocation?: string | undefined;
|
|
248
248
|
showPublishOptionModal?: boolean | undefined;
|
|
249
249
|
abTests: Record<string, string>;
|
|
250
|
+
logoBrandIndustry: string | undefined;
|
|
250
251
|
} & import("pinia").PiniaCustomStateProperties<import("../../../brand-page-maker/stores").BrandPageContainerState>) => boolean;
|
|
251
252
|
isUserDraft: (state: {
|
|
252
253
|
availableTaxes: any[];
|
|
@@ -306,6 +307,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
306
307
|
eventButtonLocation?: string | undefined;
|
|
307
308
|
showPublishOptionModal?: boolean | undefined;
|
|
308
309
|
abTests: Record<string, string>;
|
|
310
|
+
logoBrandIndustry: string | undefined;
|
|
309
311
|
} & import("pinia").PiniaCustomStateProperties<import("../../../brand-page-maker/stores").BrandPageContainerState>) => boolean;
|
|
310
312
|
}, {
|
|
311
313
|
clearTriggerSaveEventApiOnPublishModalClose(): void;
|
|
@@ -4504,6 +4504,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
4504
4504
|
eventButtonLocation?: string | undefined;
|
|
4505
4505
|
showPublishOptionModal?: boolean | undefined;
|
|
4506
4506
|
abTests: Record<string, string>;
|
|
4507
|
+
logoBrandIndustry: string | undefined;
|
|
4507
4508
|
} & import("pinia").PiniaCustomStateProperties<import("../../../../brand-page-maker/stores").BrandPageContainerState>) => boolean;
|
|
4508
4509
|
isUserDraft: (state: {
|
|
4509
4510
|
availableTaxes: any[];
|
|
@@ -4563,6 +4564,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
4563
4564
|
eventButtonLocation?: string | undefined;
|
|
4564
4565
|
showPublishOptionModal?: boolean | undefined;
|
|
4565
4566
|
abTests: Record<string, string>;
|
|
4567
|
+
logoBrandIndustry: string | undefined;
|
|
4566
4568
|
} & import("pinia").PiniaCustomStateProperties<import("../../../../brand-page-maker/stores").BrandPageContainerState>) => boolean;
|
|
4567
4569
|
}, {
|
|
4568
4570
|
clearTriggerSaveEventApiOnPublishModalClose(): void;
|
|
@@ -3935,6 +3935,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
3935
3935
|
eventButtonLocation?: string | undefined;
|
|
3936
3936
|
showPublishOptionModal?: boolean | undefined;
|
|
3937
3937
|
abTests: Record<string, string>;
|
|
3938
|
+
logoBrandIndustry: string | undefined;
|
|
3938
3939
|
} & import("pinia").PiniaCustomStateProperties<import("../../../../brand-page-maker/stores").BrandPageContainerState>) => boolean;
|
|
3939
3940
|
isUserDraft: (state: {
|
|
3940
3941
|
availableTaxes: any[];
|
|
@@ -3994,6 +3995,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
3994
3995
|
eventButtonLocation?: string | undefined;
|
|
3995
3996
|
showPublishOptionModal?: boolean | undefined;
|
|
3996
3997
|
abTests: Record<string, string>;
|
|
3998
|
+
logoBrandIndustry: string | undefined;
|
|
3997
3999
|
} & import("pinia").PiniaCustomStateProperties<import("../../../../brand-page-maker/stores").BrandPageContainerState>) => boolean;
|
|
3998
4000
|
}, {
|
|
3999
4001
|
clearTriggerSaveEventApiOnPublishModalClose(): void;
|
package/lib/src/shared/publish-brand-page-with-state/PublishBrandPageModalWithState.mixin.d.ts
CHANGED
|
@@ -239,6 +239,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
239
239
|
eventButtonLocation?: string | undefined;
|
|
240
240
|
showPublishOptionModal?: boolean | undefined;
|
|
241
241
|
abTests: Record<string, string>;
|
|
242
|
+
logoBrandIndustry: string | undefined;
|
|
242
243
|
} & import("pinia").PiniaCustomStateProperties<import("../../brand-page-maker/stores").BrandPageContainerState>) => boolean;
|
|
243
244
|
isUserDraft: (state: {
|
|
244
245
|
availableTaxes: any[];
|
|
@@ -298,6 +299,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
298
299
|
eventButtonLocation?: string | undefined;
|
|
299
300
|
showPublishOptionModal?: boolean | undefined;
|
|
300
301
|
abTests: Record<string, string>;
|
|
302
|
+
logoBrandIndustry: string | undefined;
|
|
301
303
|
} & import("pinia").PiniaCustomStateProperties<import("../../brand-page-maker/stores").BrandPageContainerState>) => boolean;
|
|
302
304
|
}, {
|
|
303
305
|
clearTriggerSaveEventApiOnPublishModalClose(): void;
|
|
@@ -75,6 +75,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
75
75
|
eventButtonLocation?: string | undefined;
|
|
76
76
|
showPublishOptionModal?: boolean | undefined;
|
|
77
77
|
abTests: Record<string, string>;
|
|
78
|
+
logoBrandIndustry: string | undefined;
|
|
78
79
|
} & import("pinia").PiniaCustomStateProperties<import("../../../brand-page-maker/stores").BrandPageContainerState>) => boolean;
|
|
79
80
|
isUserDraft: (state: {
|
|
80
81
|
availableTaxes: any[];
|
|
@@ -134,6 +135,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
134
135
|
eventButtonLocation?: string | undefined;
|
|
135
136
|
showPublishOptionModal?: boolean | undefined;
|
|
136
137
|
abTests: Record<string, string>;
|
|
138
|
+
logoBrandIndustry: string | undefined;
|
|
137
139
|
} & import("pinia").PiniaCustomStateProperties<import("../../../brand-page-maker/stores").BrandPageContainerState>) => boolean;
|
|
138
140
|
}, {
|
|
139
141
|
clearTriggerSaveEventApiOnPublishModalClose(): void;
|
|
@@ -652,6 +652,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
652
652
|
eventButtonLocation?: string | undefined;
|
|
653
653
|
showPublishOptionModal?: boolean | undefined;
|
|
654
654
|
abTests: Record<string, string>;
|
|
655
|
+
logoBrandIndustry: string | undefined;
|
|
655
656
|
} & import("pinia").PiniaCustomStateProperties<import("../../../brand-page-maker/stores").BrandPageContainerState>) => boolean;
|
|
656
657
|
isUserDraft: (state: {
|
|
657
658
|
availableTaxes: any[];
|
|
@@ -711,6 +712,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
711
712
|
eventButtonLocation?: string | undefined;
|
|
712
713
|
showPublishOptionModal?: boolean | undefined;
|
|
713
714
|
abTests: Record<string, string>;
|
|
715
|
+
logoBrandIndustry: string | undefined;
|
|
714
716
|
} & import("pinia").PiniaCustomStateProperties<import("../../../brand-page-maker/stores").BrandPageContainerState>) => boolean;
|
|
715
717
|
}, {
|
|
716
718
|
clearTriggerSaveEventApiOnPublishModalClose(): void;
|
|
@@ -17,6 +17,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
17
17
|
displayName: string;
|
|
18
18
|
}>;
|
|
19
19
|
searchTerm: import("vue").ComputedRef<string | undefined>;
|
|
20
|
+
initialSearchTerm: import("vue").ComputedRef<string | undefined>;
|
|
20
21
|
selectedCategory: import("vue").ComputedRef<string | undefined>;
|
|
21
22
|
selectedTemplateId: import("vue").ComputedRef<string | false>;
|
|
22
23
|
templateCategories: import("vue").ComputedRef<{
|
|
@@ -511,6 +512,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
511
512
|
selectInitialTemplateCategory(payload: {
|
|
512
513
|
selectedCategory: string;
|
|
513
514
|
}): void;
|
|
515
|
+
setInitialSearchTerm(payload: {
|
|
516
|
+
initialSearchTerm: string;
|
|
517
|
+
}): void;
|
|
514
518
|
clearTemplates(): void;
|
|
515
519
|
getTemplateByTemplateId(id: string): TemplateSettingsTemplate | undefined;
|
|
516
520
|
}>;
|
|
@@ -27,6 +27,7 @@ export default defineComponent({
|
|
|
27
27
|
pageCount: computed(() => templateSettingsStore.pageCount),
|
|
28
28
|
selectedTab: computed(() => templateSettingsStore.selectedTab),
|
|
29
29
|
searchTerm: computed(() => templateSettingsStore.searchTerm),
|
|
30
|
+
initialSearchTerm: computed(() => templateSettingsStore.initialSearchTerm),
|
|
30
31
|
selectedCategory: computed(() => templateSettingsStore.selectedCategory),
|
|
31
32
|
selectedTemplateId: computed(() => brandpageMakerStore.selectedTemplateId),
|
|
32
33
|
templateCategories: computed(() => templateSettingsStore.templateCategories),
|
|
@@ -109,9 +110,17 @@ export default defineComponent({
|
|
|
109
110
|
async mounted() {
|
|
110
111
|
// load templates on mounted if it is not initialised
|
|
111
112
|
if (!this.pageCount) {
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
113
|
+
if (this.initialSearchTerm) {
|
|
114
|
+
this.searchTextValue = this.initialSearchTerm;
|
|
115
|
+
await this.templateSettingsStore.onSearch({
|
|
116
|
+
searchTerm: this.searchTextValue,
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
else {
|
|
120
|
+
await this.templateSettingsStore.loadPageNo({
|
|
121
|
+
pageNo: TEMPLATE_FIRST_PAGE_NO,
|
|
122
|
+
});
|
|
123
|
+
}
|
|
115
124
|
}
|
|
116
125
|
},
|
|
117
126
|
created() {
|
|
@@ -18,6 +18,7 @@ export interface TemplatesSettingState {
|
|
|
18
18
|
selectedCategory: string | undefined;
|
|
19
19
|
searchTerm: string | undefined;
|
|
20
20
|
tabsWithTranslations: SelectedTabType[];
|
|
21
|
+
initialSearchTerm: string | undefined;
|
|
21
22
|
}
|
|
22
23
|
export declare const useUiTemplateSettingsStore: import("pinia").StoreDefinition<"uiTemplateSettings", TemplatesSettingState, {}, {
|
|
23
24
|
_addTemplates({ templates }: {
|
|
@@ -67,6 +68,9 @@ export declare const useUiTemplateSettingsStore: import("pinia").StoreDefinition
|
|
|
67
68
|
selectInitialTemplateCategory(payload: {
|
|
68
69
|
selectedCategory: string;
|
|
69
70
|
}): void;
|
|
71
|
+
setInitialSearchTerm(payload: {
|
|
72
|
+
initialSearchTerm: string;
|
|
73
|
+
}): void;
|
|
70
74
|
clearTemplates(): void;
|
|
71
75
|
getTemplateByTemplateId(id: string): TemplateSettingsTemplate | undefined;
|
|
72
76
|
}>;
|
|
@@ -42,6 +42,7 @@ export const useUiTemplateSettingsStore = defineStore('uiTemplateSettings', {
|
|
|
42
42
|
displayName: templateSettingsTr(`headerAi`),
|
|
43
43
|
},
|
|
44
44
|
],
|
|
45
|
+
initialSearchTerm: undefined,
|
|
45
46
|
}),
|
|
46
47
|
actions: {
|
|
47
48
|
_addTemplates({ templates }) {
|
|
@@ -240,6 +241,9 @@ export const useUiTemplateSettingsStore = defineStore('uiTemplateSettings', {
|
|
|
240
241
|
});
|
|
241
242
|
}
|
|
242
243
|
},
|
|
244
|
+
setInitialSearchTerm(payload) {
|
|
245
|
+
this.initialSearchTerm = payload.initialSearchTerm;
|
|
246
|
+
},
|
|
243
247
|
clearTemplates() {
|
|
244
248
|
this.templates.splice(0);
|
|
245
249
|
this.pageNo = 0;
|
package/package.json
CHANGED
|
@@ -63,6 +63,7 @@ import IconThumbsUp from './icons/ThumbsUp.vue';
|
|
|
63
63
|
import IconTikTok from './icons/TikTok.vue';
|
|
64
64
|
import IconTumblr from './icons/Tumblr.vue';
|
|
65
65
|
import IconTwitch from './icons/Twitch.vue';
|
|
66
|
+
import IconTwitter from './icons/Twitter.vue';
|
|
66
67
|
import IconX from './icons/X.vue';
|
|
67
68
|
import IconUser from './icons/User.vue';
|
|
68
69
|
import IconUtensils from './icons/Utensils.vue';
|
|
@@ -131,6 +132,7 @@ export default defineComponent({
|
|
|
131
132
|
IconTikTok,
|
|
132
133
|
IconTumblr,
|
|
133
134
|
IconTwitch,
|
|
135
|
+
IconTwitter,
|
|
134
136
|
IconX,
|
|
135
137
|
IconUser,
|
|
136
138
|
IconUtensils,
|
|
@@ -67,6 +67,7 @@
|
|
|
67
67
|
<IconTikTok v-if="name === 'tiktok'" />
|
|
68
68
|
<IconTumblr v-if="name === 'tumblr'" />
|
|
69
69
|
<IconTwitch v-if="name === 'twitch'" />
|
|
70
|
+
<IconTwitter v-if="name === 'twitter'" />
|
|
70
71
|
<IconX v-if="name === 'x'" />
|
|
71
72
|
<IconThreads v-if="name === 'threads'" />
|
|
72
73
|
<IconUser v-if="name === 'user'" />
|
|
@@ -426,7 +426,7 @@ BrandPageModel {
|
|
|
426
426
|
},
|
|
427
427
|
},
|
|
428
428
|
},
|
|
429
|
-
"v": 5,
|
|
429
|
+
"v": 5.1,
|
|
430
430
|
}
|
|
431
431
|
`;
|
|
432
432
|
|
|
@@ -839,7 +839,7 @@ BrandPageModel {
|
|
|
839
839
|
},
|
|
840
840
|
},
|
|
841
841
|
},
|
|
842
|
-
"v": 5,
|
|
842
|
+
"v": 5.1,
|
|
843
843
|
}
|
|
844
844
|
`;
|
|
845
845
|
|
|
@@ -1259,6 +1259,6 @@ BrandPageModel {
|
|
|
1259
1259
|
},
|
|
1260
1260
|
},
|
|
1261
1261
|
},
|
|
1262
|
-
"v": 5,
|
|
1262
|
+
"v": 5.1,
|
|
1263
1263
|
}
|
|
1264
1264
|
`;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { type BrandPageModel } from '../..';
|
|
2
|
+
|
|
3
|
+
export const migration051 = (
|
|
4
|
+
brandPageModel: BrandPageModel,
|
|
5
|
+
options: { isUserDraft: boolean },
|
|
6
|
+
): BrandPageModel => {
|
|
7
|
+
if (!options.isUserDraft) {
|
|
8
|
+
brandPageModel.pageFooterDesktop?.socialLinks?.forEach((link) => {
|
|
9
|
+
if (link.imageUrl === 'twitter') {
|
|
10
|
+
link.imageUrl = 'x';
|
|
11
|
+
link.url = 'https://www.x.com';
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
brandPageModel.pageFooterMobile?.socialLinks?.forEach((link) => {
|
|
16
|
+
if (link.imageUrl === 'twitter') {
|
|
17
|
+
link.imageUrl = 'x';
|
|
18
|
+
link.url = 'https://www.x.com';
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
return brandPageModel;
|
|
24
|
+
};
|
|
@@ -4,6 +4,7 @@ import { migration02 } from './migration/migration-02';
|
|
|
4
4
|
import { migration03 } from './migration/migration-03';
|
|
5
5
|
import { migration04 } from './migration/migration-04';
|
|
6
6
|
import { migration05 } from './migration/migration-05';
|
|
7
|
+
import { migration051 } from './migration/migration-051';
|
|
7
8
|
|
|
8
9
|
interface MigrationTableItem {
|
|
9
10
|
version: number;
|
|
@@ -37,6 +38,10 @@ const MIGRATION_TABLE = [
|
|
|
37
38
|
version: 5,
|
|
38
39
|
migrateFn: migration05,
|
|
39
40
|
},
|
|
41
|
+
{
|
|
42
|
+
version: 5.1,
|
|
43
|
+
migrateFn: migration051,
|
|
44
|
+
},
|
|
40
45
|
] as MigrationTableItem[];
|
|
41
46
|
|
|
42
47
|
export const GetLatestModelVersion = () =>
|
|
@@ -77,6 +77,7 @@ export interface BrandPageContainerState {
|
|
|
77
77
|
eventButtonLocation?: string;
|
|
78
78
|
showPublishOptionModal?: boolean; // select an option modal on publish
|
|
79
79
|
abTests: Record<string, string>;
|
|
80
|
+
logoBrandIndustry: string | undefined;
|
|
80
81
|
}
|
|
81
82
|
|
|
82
83
|
export type InitialisePayload = Omit<
|
|
@@ -142,6 +143,7 @@ export const useBrandPageContainerStore = defineStore('brandPageContainer', {
|
|
|
142
143
|
eventButtonLocation: undefined,
|
|
143
144
|
showPublishOptionModal: false,
|
|
144
145
|
abTests: {},
|
|
146
|
+
logoBrandIndustry: undefined,
|
|
145
147
|
};
|
|
146
148
|
},
|
|
147
149
|
actions: {
|
|
@@ -176,6 +178,7 @@ export const useBrandPageContainerStore = defineStore('brandPageContainer', {
|
|
|
176
178
|
}
|
|
177
179
|
|
|
178
180
|
const brandPageMakerStore = useBrandPageMakerStore();
|
|
181
|
+
const templateSettingsStore = useUiTemplateSettingsStore();
|
|
179
182
|
|
|
180
183
|
this.brandPageBaseUrl = payload.brandPageBaseUrl;
|
|
181
184
|
this.baseFabricRenderUrl = localisedRouteStore.baseFabricRenderDomain;
|
|
@@ -214,6 +217,10 @@ export const useBrandPageContainerStore = defineStore('brandPageContainer', {
|
|
|
214
217
|
|
|
215
218
|
const logoStore = useLogoStore();
|
|
216
219
|
|
|
220
|
+
templateSettingsStore.setInitialSearchTerm({
|
|
221
|
+
initialSearchTerm: payload.logoBrandIndustry ?? '',
|
|
222
|
+
});
|
|
223
|
+
|
|
217
224
|
logoStore.initialise({
|
|
218
225
|
logoTemplateAsset: payload.logoTemplateAsset,
|
|
219
226
|
logoDraftAssets: payload.logoDraftAssets || [],
|
|
@@ -44,6 +44,9 @@ export default defineComponent({
|
|
|
44
44
|
pageCount: computed(() => templateSettingsStore.pageCount),
|
|
45
45
|
selectedTab: computed(() => templateSettingsStore.selectedTab),
|
|
46
46
|
searchTerm: computed(() => templateSettingsStore.searchTerm),
|
|
47
|
+
initialSearchTerm: computed(
|
|
48
|
+
() => templateSettingsStore.initialSearchTerm,
|
|
49
|
+
),
|
|
47
50
|
selectedCategory: computed(() => templateSettingsStore.selectedCategory),
|
|
48
51
|
selectedTemplateId: computed(
|
|
49
52
|
() => brandpageMakerStore.selectedTemplateId,
|
|
@@ -157,9 +160,16 @@ export default defineComponent({
|
|
|
157
160
|
async mounted() {
|
|
158
161
|
// load templates on mounted if it is not initialised
|
|
159
162
|
if (!this.pageCount) {
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
+
if (this.initialSearchTerm) {
|
|
164
|
+
this.searchTextValue = this.initialSearchTerm;
|
|
165
|
+
await this.templateSettingsStore.onSearch({
|
|
166
|
+
searchTerm: this.searchTextValue,
|
|
167
|
+
});
|
|
168
|
+
} else {
|
|
169
|
+
await this.templateSettingsStore.loadPageNo({
|
|
170
|
+
pageNo: TEMPLATE_FIRST_PAGE_NO,
|
|
171
|
+
});
|
|
172
|
+
}
|
|
163
173
|
}
|
|
164
174
|
},
|
|
165
175
|
created() {
|
|
@@ -53,6 +53,7 @@ export interface TemplatesSettingState {
|
|
|
53
53
|
selectedCategory: string | undefined;
|
|
54
54
|
searchTerm: string | undefined;
|
|
55
55
|
tabsWithTranslations: SelectedTabType[];
|
|
56
|
+
initialSearchTerm: string | undefined;
|
|
56
57
|
}
|
|
57
58
|
|
|
58
59
|
export const useUiTemplateSettingsStore = defineStore('uiTemplateSettings', {
|
|
@@ -85,6 +86,7 @@ export const useUiTemplateSettingsStore = defineStore('uiTemplateSettings', {
|
|
|
85
86
|
displayName: templateSettingsTr(`headerAi`),
|
|
86
87
|
},
|
|
87
88
|
],
|
|
89
|
+
initialSearchTerm: undefined,
|
|
88
90
|
}),
|
|
89
91
|
actions: {
|
|
90
92
|
_addTemplates({ templates }: { templates: TemplateSettingsTemplate[] }) {
|
|
@@ -356,6 +358,9 @@ export const useUiTemplateSettingsStore = defineStore('uiTemplateSettings', {
|
|
|
356
358
|
});
|
|
357
359
|
}
|
|
358
360
|
},
|
|
361
|
+
setInitialSearchTerm(payload: { initialSearchTerm: string }) {
|
|
362
|
+
this.initialSearchTerm = payload.initialSearchTerm;
|
|
363
|
+
},
|
|
359
364
|
clearTemplates() {
|
|
360
365
|
this.templates.splice(0);
|
|
361
366
|
this.pageNo = 0;
|