@designcrowd/library.brand-page 5.16.34 → 5.16.35
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-D91N-tbm.js → CreatedOnBrandCrowd-de-de-86kFDsjd.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-en-us-BmcF4WYm.js → CreatedOnBrandCrowd-en-us-BhFAL2r4.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-es-es-CRAWWkm0.js → CreatedOnBrandCrowd-es-es-spGcLYbG.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-fr-fr-Crg5ty-A.js → CreatedOnBrandCrowd-fr-ca-DKe-tShk.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-fr-ca-Crg5ty-A.js → CreatedOnBrandCrowd-fr-fr-DKe-tShk.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-pt-pt-IPV8Z-Ww.js → CreatedOnBrandCrowd-pt-br-DcT0oRzX.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-pt-br-IPV8Z-Ww.js → CreatedOnBrandCrowd-pt-pt-DcT0oRzX.js} +1 -1
- package/lib/src/{CreatedOnDcom-de-de-CmljZBtX.js → CreatedOnDcom-de-de-BMuHkNH2.js} +1 -1
- package/lib/src/{CreatedOnDcom-en-us-B-VY4Bpb.js → CreatedOnDcom-en-us-h174d2n3.js} +1 -1
- package/lib/src/{CreatedOnDcom-es-es-BH3XI3P0.js → CreatedOnDcom-es-es-B6D1xSPS.js} +1 -1
- package/lib/src/{CreatedOnDcom-fr-ca-BX8FjPKR.js → CreatedOnDcom-fr-ca-BE0ONxF_.js} +1 -1
- package/lib/src/{CreatedOnDcom-fr-fr-BM-qEmPv.js → CreatedOnDcom-fr-fr-6tXvojla.js} +1 -1
- package/lib/src/{CreatedOnDcom-pt-br-DX_aD3XN.js → CreatedOnDcom-pt-br-DZYu7pp5.js} +1 -1
- package/lib/src/{CreatedOnDcom-pt-pt-oFipORQP.js → CreatedOnDcom-pt-pt-DrGT23mO.js} +1 -1
- package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.d.ts +3 -0
- package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.stories.js +1 -0
- package/lib/src/brand-page-maker/stores/brandpage-container/brand-page-container-store.d.ts +1 -0
- package/lib/src/brand-page-maker/stores/brandpage-container/brand-page-container-store.js +5 -0
- package/lib/src/index.mjs +1 -1
- package/lib/src/{lib-R9y_fcgW.js → lib-WUyXDBI4.js} +341 -332
- package/lib/src/shared/template-settings/components/TemplatesSettings.mixin.d.ts +4 -0
- package/lib/src/shared/template-settings/components/TemplatesSettings.mixin.js +10 -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-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 +11 -3
- package/src/shared/template-settings/store/template-settings-store.ts +5 -0
|
@@ -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<{
|
|
@@ -512,6 +513,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
512
513
|
selectInitialTemplateCategory(payload: {
|
|
513
514
|
selectedCategory: string;
|
|
514
515
|
}): void;
|
|
516
|
+
setInitialSearchTerm(payload: {
|
|
517
|
+
initialSearchTerm: string;
|
|
518
|
+
}): void;
|
|
515
519
|
clearTemplates(): void;
|
|
516
520
|
getTemplateByTemplateId(id: string): TemplateSettingsTemplate | undefined;
|
|
517
521
|
setupLogoChangeWatcher(): void;
|
|
@@ -30,6 +30,7 @@ export default defineComponent({
|
|
|
30
30
|
pageCount: computed(() => templateSettingsStore.pageCount),
|
|
31
31
|
selectedTab: computed(() => templateSettingsStore.selectedTab),
|
|
32
32
|
searchTerm: computed(() => templateSettingsStore.searchTerm),
|
|
33
|
+
initialSearchTerm: computed(() => templateSettingsStore.initialSearchTerm),
|
|
33
34
|
selectedCategory: computed(() => templateSettingsStore.selectedCategory),
|
|
34
35
|
selectedTemplateId: computed(() => brandpageMakerStore.selectedTemplateId),
|
|
35
36
|
templateCategories: computed(() => templateSettingsStore.templateCategories),
|
|
@@ -114,9 +115,15 @@ export default defineComponent({
|
|
|
114
115
|
await this.checkAndRefreshS3TokenIfExpired();
|
|
115
116
|
// load templates on mounted if it is not initialised
|
|
116
117
|
if (!this.pageCount) {
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
118
|
+
if (this.initialSearchTerm) {
|
|
119
|
+
this.searchTextValue = this.initialSearchTerm;
|
|
120
|
+
this.setSearchText();
|
|
121
|
+
}
|
|
122
|
+
else {
|
|
123
|
+
await this.templateSettingsStore.loadPageNo({
|
|
124
|
+
pageNo: TEMPLATE_FIRST_PAGE_NO,
|
|
125
|
+
});
|
|
126
|
+
}
|
|
120
127
|
}
|
|
121
128
|
},
|
|
122
129
|
created() {
|
|
@@ -21,6 +21,7 @@ export interface TemplatesSettingState {
|
|
|
21
21
|
tabsWithTranslations: SelectedTabType[];
|
|
22
22
|
logoChangeWatcherInitialized: boolean;
|
|
23
23
|
renderAsImage: boolean;
|
|
24
|
+
initialSearchTerm: string | undefined;
|
|
24
25
|
}
|
|
25
26
|
export declare const useUiTemplateSettingsStore: import("pinia").StoreDefinition<"uiTemplateSettings", TemplatesSettingState, {}, {
|
|
26
27
|
_addTemplates({ templates }: {
|
|
@@ -71,6 +72,9 @@ export declare const useUiTemplateSettingsStore: import("pinia").StoreDefinition
|
|
|
71
72
|
selectInitialTemplateCategory(payload: {
|
|
72
73
|
selectedCategory: string;
|
|
73
74
|
}): void;
|
|
75
|
+
setInitialSearchTerm(payload: {
|
|
76
|
+
initialSearchTerm: string;
|
|
77
|
+
}): void;
|
|
74
78
|
clearTemplates(): void;
|
|
75
79
|
getTemplateByTemplateId(id: string): TemplateSettingsTemplate | undefined;
|
|
76
80
|
/**
|
|
@@ -51,6 +51,7 @@ export const useUiTemplateSettingsStore = defineStore('uiTemplateSettings', {
|
|
|
51
51
|
cachedTemplates: {},
|
|
52
52
|
logoChangeWatcherInitialized: false,
|
|
53
53
|
renderAsImage,
|
|
54
|
+
initialSearchTerm: undefined,
|
|
54
55
|
};
|
|
55
56
|
},
|
|
56
57
|
actions: {
|
|
@@ -329,6 +330,9 @@ export const useUiTemplateSettingsStore = defineStore('uiTemplateSettings', {
|
|
|
329
330
|
});
|
|
330
331
|
}
|
|
331
332
|
},
|
|
333
|
+
setInitialSearchTerm(payload) {
|
|
334
|
+
this.initialSearchTerm = payload.initialSearchTerm;
|
|
335
|
+
},
|
|
332
336
|
clearTemplates() {
|
|
333
337
|
this.templates.splice(0);
|
|
334
338
|
this.pageNo = 0;
|
package/package.json
CHANGED
|
@@ -268,6 +268,7 @@ const InitialiseMakerStores = (options: {
|
|
|
268
268
|
contextualUpgradeType: undefined,
|
|
269
269
|
isContextualUpgradeModalVisible: false,
|
|
270
270
|
gettyVideos: [],
|
|
271
|
+
templateSearchTerm: undefined,
|
|
271
272
|
});
|
|
272
273
|
|
|
273
274
|
userStore.setIsAdmin({ isAdmin: options.isAdmin || false });
|
|
@@ -37,6 +37,7 @@ import type { WebsiteSlugCheckResponse } from '../../../brand-page-maker/models/
|
|
|
37
37
|
import { errorTr, constantsTr } from '../../../composables/useTranslate';
|
|
38
38
|
import { findValuesByKey } from '../../../helpers/ts.helper';
|
|
39
39
|
import { WEBSITE_UPGRADE_CONTEXT_TYPES } from '@designcrowd/fe-shared-lib';
|
|
40
|
+
import { useUiTemplateSettingsStore } from '../../../shared/template-settings/store';
|
|
40
41
|
|
|
41
42
|
export type WebsiteContextUpgradeType =
|
|
42
43
|
keyof typeof WEBSITE_UPGRADE_CONTEXT_TYPES;
|
|
@@ -112,6 +113,7 @@ export type InitialisePayload = Omit<
|
|
|
112
113
|
logoTemplateAsset: LogoTemplateAsset | undefined;
|
|
113
114
|
logoDraftAssets: LogoDraftAsset[];
|
|
114
115
|
gettyVideos: GettyVideoEditorViewModelResponse[];
|
|
116
|
+
templateSearchTerm: string | undefined;
|
|
115
117
|
};
|
|
116
118
|
|
|
117
119
|
export const BRANDPAGE_STATUS = Object.freeze({
|
|
@@ -200,6 +202,7 @@ export const useBrandPageContainerStore = defineStore('brandPageContainer', {
|
|
|
200
202
|
}
|
|
201
203
|
|
|
202
204
|
const brandPageMakerStore = useBrandPageMakerStore();
|
|
205
|
+
const templateSettingsStore = useUiTemplateSettingsStore();
|
|
203
206
|
|
|
204
207
|
this.brandPageBaseUrl = payload.brandPageBaseUrl;
|
|
205
208
|
this.baseFabricRenderUrl = localisedRouteStore.baseFabricRenderDomain;
|
|
@@ -242,6 +245,10 @@ export const useBrandPageContainerStore = defineStore('brandPageContainer', {
|
|
|
242
245
|
logoDraftAssets: payload.logoDraftAssets || [],
|
|
243
246
|
});
|
|
244
247
|
|
|
248
|
+
templateSettingsStore.setInitialSearchTerm({
|
|
249
|
+
initialSearchTerm: payload.templateSearchTerm ?? '',
|
|
250
|
+
});
|
|
251
|
+
|
|
245
252
|
brandPageMakerStore.setSelectedTemplateId({
|
|
246
253
|
templateId: this.designTemplateToken,
|
|
247
254
|
});
|
|
@@ -50,6 +50,9 @@ export default defineComponent({
|
|
|
50
50
|
pageCount: computed(() => templateSettingsStore.pageCount),
|
|
51
51
|
selectedTab: computed(() => templateSettingsStore.selectedTab),
|
|
52
52
|
searchTerm: computed(() => templateSettingsStore.searchTerm),
|
|
53
|
+
initialSearchTerm: computed(
|
|
54
|
+
() => templateSettingsStore.initialSearchTerm,
|
|
55
|
+
),
|
|
53
56
|
selectedCategory: computed(() => templateSettingsStore.selectedCategory),
|
|
54
57
|
selectedTemplateId: computed(
|
|
55
58
|
() => brandpageMakerStore.selectedTemplateId,
|
|
@@ -166,9 +169,14 @@ export default defineComponent({
|
|
|
166
169
|
|
|
167
170
|
// load templates on mounted if it is not initialised
|
|
168
171
|
if (!this.pageCount) {
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
+
if (this.initialSearchTerm) {
|
|
173
|
+
this.searchTextValue = this.initialSearchTerm;
|
|
174
|
+
this.setSearchText();
|
|
175
|
+
} else {
|
|
176
|
+
await this.templateSettingsStore.loadPageNo({
|
|
177
|
+
pageNo: TEMPLATE_FIRST_PAGE_NO,
|
|
178
|
+
});
|
|
179
|
+
}
|
|
172
180
|
}
|
|
173
181
|
},
|
|
174
182
|
created() {
|
|
@@ -62,6 +62,7 @@ export interface TemplatesSettingState {
|
|
|
62
62
|
tabsWithTranslations: SelectedTabType[];
|
|
63
63
|
logoChangeWatcherInitialized: boolean;
|
|
64
64
|
renderAsImage: boolean;
|
|
65
|
+
initialSearchTerm: string | undefined;
|
|
65
66
|
}
|
|
66
67
|
|
|
67
68
|
export const useUiTemplateSettingsStore = defineStore('uiTemplateSettings', {
|
|
@@ -104,6 +105,7 @@ export const useUiTemplateSettingsStore = defineStore('uiTemplateSettings', {
|
|
|
104
105
|
cachedTemplates: {},
|
|
105
106
|
logoChangeWatcherInitialized: false,
|
|
106
107
|
renderAsImage,
|
|
108
|
+
initialSearchTerm: undefined,
|
|
107
109
|
};
|
|
108
110
|
},
|
|
109
111
|
actions: {
|
|
@@ -477,6 +479,9 @@ export const useUiTemplateSettingsStore = defineStore('uiTemplateSettings', {
|
|
|
477
479
|
});
|
|
478
480
|
}
|
|
479
481
|
},
|
|
482
|
+
setInitialSearchTerm(payload: { initialSearchTerm: string }) {
|
|
483
|
+
this.initialSearchTerm = payload.initialSearchTerm;
|
|
484
|
+
},
|
|
480
485
|
clearTemplates() {
|
|
481
486
|
this.templates.splice(0);
|
|
482
487
|
this.pageNo = 0;
|