@designcrowd/library.brand-page 5.15.15 → 5.15.16

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.
Files changed (51) hide show
  1. package/lib/src/{CreatedOnBrandCrowd-de-de-BNvtpPPA.js → CreatedOnBrandCrowd-de-de-DwjHHx8U.js} +1 -1
  2. package/lib/src/{CreatedOnBrandCrowd-en-us-vHU7i_Mj.js → CreatedOnBrandCrowd-en-us-wnQWDaLj.js} +1 -1
  3. package/lib/src/{CreatedOnBrandCrowd-es-es-C7pit2TS.js → CreatedOnBrandCrowd-es-es-BPLwmFYf.js} +1 -1
  4. package/lib/src/{CreatedOnBrandCrowd-fr-fr-e6WnPYat.js → CreatedOnBrandCrowd-fr-ca-ZLo9mFvK.js} +1 -1
  5. package/lib/src/{CreatedOnBrandCrowd-fr-ca-e6WnPYat.js → CreatedOnBrandCrowd-fr-fr-ZLo9mFvK.js} +1 -1
  6. package/lib/src/{CreatedOnBrandCrowd-pt-pt-B5aMx0wm.js → CreatedOnBrandCrowd-pt-br-PeE8kWqc.js} +1 -1
  7. package/lib/src/{CreatedOnBrandCrowd-pt-br-B5aMx0wm.js → CreatedOnBrandCrowd-pt-pt-PeE8kWqc.js} +1 -1
  8. package/lib/src/{CreatedOnDcom-de-de-DmuOIsHU.js → CreatedOnDcom-de-de-DckpvOP7.js} +1 -1
  9. package/lib/src/{CreatedOnDcom-en-us-DjslKboi.js → CreatedOnDcom-en-us-CFzquTUz.js} +1 -1
  10. package/lib/src/{CreatedOnDcom-es-es-4cMslgx6.js → CreatedOnDcom-es-es-BpbcQQtf.js} +1 -1
  11. package/lib/src/{CreatedOnDcom-fr-ca-BnbwaXKX.js → CreatedOnDcom-fr-ca-bV4zOxfZ.js} +1 -1
  12. package/lib/src/{CreatedOnDcom-fr-fr-CXnxo5vk.js → CreatedOnDcom-fr-fr-dGkZsGAG.js} +1 -1
  13. package/lib/src/{CreatedOnDcom-pt-br-I08Rppvc.js → CreatedOnDcom-pt-br-C2hFs0vl.js} +1 -1
  14. package/lib/src/{CreatedOnDcom-pt-pt-dGF21lwx.js → CreatedOnDcom-pt-pt-VWtI0WwK.js} +1 -1
  15. package/lib/src/brand-page-maker/components/action-bar/ActionBar.mixin.d.ts +1 -0
  16. package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.d.ts +5 -1
  17. package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.js +36 -3
  18. package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMakerTemplateSettings.mixin.d.ts +1 -0
  19. package/lib/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.d.ts +1 -0
  20. package/lib/src/brand-page-maker/components/brandpage-settings/ReplaceImageSettingsForBrandPageSettings.mixin.d.ts +1 -0
  21. package/lib/src/brand-page-maker/components/seo-settings/SeoPageSettings.mixin.d.ts +1 -0
  22. package/lib/src/brand-page-maker/components/seo-settings/UrlSettings.mixin.d.ts +1 -0
  23. package/lib/src/brand-page-maker/components/social-share/SocialShare.mixin.d.ts +1 -0
  24. package/lib/src/brand-page-maker/components/template-preview/TemplatePreview.mixin.d.ts +1 -0
  25. package/lib/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.d.ts +2 -0
  26. package/lib/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.js +4 -0
  27. package/lib/src/clients/asset-library-clients.d.ts +2 -0
  28. package/lib/src/clients/asset-library-clients.js +15 -0
  29. package/lib/src/css/library.brand-page-brandCrowd.min.css +6 -6
  30. package/lib/src/css/library.brand-page-brandPage.min.css +6 -6
  31. package/lib/src/css/library.brand-page-designCom.min.css +6 -6
  32. package/lib/src/css/library.brand-page-preview.min.css +6 -6
  33. package/lib/src/index.mjs +1 -1
  34. package/lib/src/{lib-CbIkCgrh.js → lib-DaxXE-vZ.js} +9055 -9008
  35. package/lib/src/shared/content-settings/components/content-settings/ContentSettings.mixin.d.ts +1 -0
  36. package/lib/src/shared/content-settings/components/content-settings/ReplaceImageSettingsForContent.mixin.d.ts +1 -0
  37. package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItemField.mixin.d.ts +1 -0
  38. package/lib/src/shared/logo-settings/components/LogoSettings.mixin.d.ts +1 -0
  39. package/lib/src/shared/page-settings/components/page-settings/PageSettings.mixin.d.ts +1 -0
  40. package/lib/src/shared/page-settings/components/page-settings-section-styles/PageSettingsSectionStyles.mixin.d.ts +1 -0
  41. package/lib/src/shared/publish-brand-page-with-state/PublishBrandPageModalWithState.mixin.d.ts +1 -0
  42. package/lib/src/shared/side-bar/components/SideBar.mixin.d.ts +1 -0
  43. package/lib/src/shared/side-bar/components/SideBar.mixin.js +6 -1
  44. package/lib/src/shared/style-settings/components/StyleSettings.mixin.d.ts +1 -0
  45. package/package.json +1 -1
  46. package/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.ts +40 -4
  47. package/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.vue +9 -1
  48. package/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.ts +5 -0
  49. package/src/clients/asset-library-clients.ts +20 -0
  50. package/src/shared/side-bar/components/SideBar.mixin.ts +7 -0
  51. package/src/shared/side-bar/components/SideBar.vue +9 -1
@@ -111,6 +111,7 @@ declare const _default: import("vue").DefineComponent<{}, {
111
111
  setIsInitialising(payload: {
112
112
  isInitialising: boolean;
113
113
  }): void;
114
+ setIsBrandPageLoaded(isLoaded: boolean): void;
114
115
  setIsModifiedAfterTemplateApplied({ isModified, }?: import("../../../../brand-page-maker/stores").SetIsModifiedPayload): void;
115
116
  setSelectedTemplateId(payload: {
116
117
  templateId: string | false;
@@ -625,6 +625,7 @@ declare const _default: import("vue").DefineComponent<{}, {
625
625
  setIsInitialising(payload: {
626
626
  isInitialising: boolean;
627
627
  }): void;
628
+ setIsBrandPageLoaded(isLoaded: boolean): void;
628
629
  setIsModifiedAfterTemplateApplied({ isModified, }?: import("../../../../brand-page-maker/stores").SetIsModifiedPayload): void;
629
630
  setSelectedTemplateId(payload: {
630
631
  templateId: string | false;
@@ -570,6 +570,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
570
570
  setIsInitialising(payload: {
571
571
  isInitialising: boolean;
572
572
  }): void;
573
+ setIsBrandPageLoaded(isLoaded: boolean): void;
573
574
  setIsModifiedAfterTemplateApplied({ isModified, }?: import("../../../../brand-page-maker/stores").SetIsModifiedPayload): void;
574
575
  setSelectedTemplateId(payload: {
575
576
  templateId: string | false;
@@ -101,6 +101,7 @@ declare const _default: import("vue").DefineComponent<{}, {
101
101
  setIsInitialising(payload: {
102
102
  isInitialising: boolean;
103
103
  }): void;
104
+ setIsBrandPageLoaded(isLoaded: boolean): void;
104
105
  setIsModifiedAfterTemplateApplied({ isModified, }?: import("../../../brand-page-maker/stores").SetIsModifiedPayload): void;
105
106
  setSelectedTemplateId(payload: {
106
107
  templateId: string | false;
@@ -3791,6 +3791,7 @@ declare const _default: import("vue").DefineComponent<{}, {
3791
3791
  setIsInitialising(payload: {
3792
3792
  isInitialising: boolean;
3793
3793
  }): void;
3794
+ setIsBrandPageLoaded(isLoaded: boolean): void;
3794
3795
  setIsModifiedAfterTemplateApplied({ isModified, }?: import("../../../../brand-page-maker/stores").SetIsModifiedPayload): void;
3795
3796
  setSelectedTemplateId(payload: {
3796
3797
  templateId: string | false;
@@ -4291,6 +4291,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
4291
4291
  setIsInitialising(payload: {
4292
4292
  isInitialising: boolean;
4293
4293
  }): void;
4294
+ setIsBrandPageLoaded(isLoaded: boolean): void;
4294
4295
  setIsModifiedAfterTemplateApplied({ isModified, }?: import("../../../../brand-page-maker/stores").SetIsModifiedPayload): void;
4295
4296
  setSelectedTemplateId(payload: {
4296
4297
  templateId: string | false;
@@ -135,6 +135,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
135
135
  setIsInitialising(payload: {
136
136
  isInitialising: boolean;
137
137
  }): void;
138
+ setIsBrandPageLoaded(isLoaded: boolean): void;
138
139
  setIsModifiedAfterTemplateApplied({ isModified, }?: import("../../brand-page-maker/stores").SetIsModifiedPayload): void;
139
140
  setSelectedTemplateId(payload: {
140
141
  templateId: string | false;
@@ -264,6 +264,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
264
264
  }>;
265
265
  'side-bar-content': import("vue").Ref<null, null>;
266
266
  isPrepurchase: import("vue").ComputedRef<boolean>;
267
+ isBrandPageLoaded: import("vue").ComputedRef<boolean>;
267
268
  }, {
268
269
  SIDE_BAR_CONTENT_ID: string;
269
270
  sideBarContentRef: string;
@@ -1,6 +1,6 @@
1
1
  import { defineComponent, computed, ref } from 'vue';
2
2
  import { useUiSideBarStore } from '../store';
3
- import { useBrandPageContainerStore, useBrandPageMakerUserStore, } from '../../../brand-page-maker/stores';
3
+ import { useBrandPageContainerStore, useBrandPageMakerUserStore, useBrandPageMakerStore, } from '../../../brand-page-maker/stores';
4
4
  import { SIDE_BAR_CONTENT_ID } from '../../content-settings/constants';
5
5
  import { useUiContentSettingsStore } from '../../content-settings/store';
6
6
  export default defineComponent({
@@ -24,6 +24,7 @@ export default defineComponent({
24
24
  const brandPageContainerStore = useBrandPageContainerStore();
25
25
  const userStore = useBrandPageMakerUserStore();
26
26
  const contentSettingsStore = useUiContentSettingsStore();
27
+ const brandPageMakerStore = useBrandPageMakerStore();
27
28
  return {
28
29
  brandPageContainerStore,
29
30
  tabs: computed(() => sideBarStore.tabs),
@@ -35,6 +36,7 @@ export default defineComponent({
35
36
  userStore,
36
37
  'side-bar-content': ref(null),
37
38
  isPrepurchase: computed(() => brandPageContainerStore.isPrePurchase),
39
+ isBrandPageLoaded: computed(() => brandPageMakerStore.isBrandPageLoaded),
38
40
  };
39
41
  },
40
42
  data: () => ({ SIDE_BAR_CONTENT_ID, sideBarContentRef: 'side-bar-content' }),
@@ -68,6 +70,9 @@ export default defineComponent({
68
70
  }
69
71
  },
70
72
  shouldDisplayTab(tab) {
73
+ if (this.isBrandPageLoaded === false && this.isPrePurchase === false) {
74
+ return false;
75
+ }
71
76
  if (this.isAdmin && tab.isDisabledForAdmin) {
72
77
  return false;
73
78
  }
@@ -541,6 +541,7 @@ declare const _default: import("vue").DefineComponent<{}, {
541
541
  setIsInitialising(payload: {
542
542
  isInitialising: boolean;
543
543
  }): void;
544
+ setIsBrandPageLoaded(isLoaded: boolean): void;
544
545
  setIsModifiedAfterTemplateApplied({ isModified, }?: import("../../../brand-page-maker/stores").SetIsModifiedPayload): void;
545
546
  setSelectedTemplateId(payload: {
546
547
  templateId: string | false;
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": "5.15.15",
4
+ "version": "5.15.16",
5
5
  "author": "Design.com Eng",
6
6
  "license": "UNLICENSED",
7
7
  "type": "module",
@@ -39,6 +39,7 @@ import { useUiTemplateSettingsStore } from '../../../shared/template-settings/st
39
39
  import { useUiPageSettingsStore } from '../../../shared/page-settings/store';
40
40
  import { useRouter } from 'vue-router';
41
41
  import { FabricRenderClient } from '../../../clients/fabric-render-client';
42
+ import AssetLibraryClient from '../../../clients/asset-library-clients';
42
43
  import { useShopConfigStore } from '../../../shared/ecommerce-settings/store/shop-settings-store';
43
44
  import type { ShopConfigData } from '../../../brand-page/models/shop.model';
44
45
  import { useProductConfigStore } from '../../../brand-page-maker/stores/product-config/product-config-store';
@@ -49,6 +50,7 @@ import { commonTr } from '../../../composables/useTranslate';
49
50
  export interface BrandPageMakerViewModel {
50
51
  adminPreviewLogoTemplateModels?: AdminPreviewLogoTemplateModel[];
51
52
  brandPageData?: string;
53
+ brandPageMetadataS3Url?: string;
52
54
  emailAddress: string;
53
55
  features: UserFeatures;
54
56
  logoVariationImageUrls: string[];
@@ -139,6 +141,7 @@ export default defineComponent({
139
141
  data() {
140
142
  return {
141
143
  mounted: false,
144
+ isBrandPageLoaded: false,
142
145
  debounceOnResize: undefined as DebounceHandle | undefined,
143
146
  showSaveSuccessMessage: false,
144
147
  };
@@ -156,10 +159,24 @@ export default defineComponent({
156
159
  console.error('logo theme is missing');
157
160
  }
158
161
 
159
- const brandPage =
160
- typeof this.viewModel?.brandPageData === 'string'
161
- ? (JSON.parse(this.viewModel.brandPageData!) as BrandPageData)
162
- : createInitialBrandPage(this.viewModel.brandPageType);
162
+ let brandPage: BrandPageData;
163
+
164
+ if (this.viewModel?.brandPageMetadataS3Url) {
165
+ const assetClient = new AssetLibraryClient({
166
+ baseUrl: '',
167
+ });
168
+ const metadata = await assetClient.getBrandPageMetadataAsync(
169
+ this.viewModel.brandPageMetadataS3Url,
170
+ );
171
+
172
+ if (metadata) {
173
+ brandPage = metadata;
174
+ } else {
175
+ brandPage = this.getBrandPageFromFallback(this.viewModel);
176
+ }
177
+ } else {
178
+ brandPage = this.getBrandPageFromFallback(this.viewModel);
179
+ }
163
180
 
164
181
  const shopConfigData = this.viewModel?.shopConfigData?.trim()
165
182
  ? (JSON.parse(this.viewModel.shopConfigData) as ShopConfigData)
@@ -226,6 +243,17 @@ export default defineComponent({
226
243
  this.viewModel.initialCategories,
227
244
  );
228
245
 
246
+ // Mark brand page as fully loaded
247
+ this.isBrandPageLoaded = true;
248
+ this.brandPageMakerStore.setIsBrandPageLoaded(true);
249
+
250
+ // set initial screen size mode
251
+ if (this.isBrandPageOrIsBrandContact) {
252
+ this.brandPageMakerStore.setViewport({ viewport: VIEWPORTS.mobile });
253
+ } else {
254
+ this.setViewportBasedOnDeviceWidth(true);
255
+ }
256
+
229
257
  this.$emit(EVENTS.Initialised);
230
258
  },
231
259
  mounted() {
@@ -256,6 +284,14 @@ export default defineComponent({
256
284
  }, 800);
257
285
  },
258
286
  methods: {
287
+ getBrandPageFromFallback(viewModel): BrandPageData {
288
+ if (typeof viewModel?.brandPageData === 'string') {
289
+ return JSON.parse(viewModel.brandPageData!) as BrandPageData;
290
+ } else {
291
+ return createInitialBrandPage(viewModel.brandPageType);
292
+ }
293
+ },
294
+
259
295
  onResizeWithDebounce() {
260
296
  if (this.debounceOnResize) {
261
297
  this.debounceOnResize();
@@ -52,6 +52,7 @@
52
52
  class="c-brand-page-maker__inner tw-bg-grayscale-200 tw-box-border tw-flex tw-flex-col tw-w-full tw-items-center lg:tw-pt-4 tw-relative tw-overflow-auto"
53
53
  >
54
54
  <Device
55
+ v-if="isBrandPageLoaded"
55
56
  :is-mobile-device="isMobileDevice"
56
57
  :is-design-com="isDesignCom"
57
58
  :has-quick-links="isPublished"
@@ -61,6 +62,12 @@
61
62
  <PreviewWithState :device-mode="deviceMode" />
62
63
  </div>
63
64
  </Device>
65
+ <div
66
+ v-else
67
+ class="tw-flex tw-items-center tw-justify-center tw-h-full tw-text-grayscale-600"
68
+ >
69
+ <Loader />
70
+ </div>
64
71
  </div>
65
72
  <div
66
73
  class="js-bp-action-bar tw-hidden lg:tw-block tw-order-first lg:tw-order-last tw-w-full lg:tw-mb-0"
@@ -98,7 +105,7 @@
98
105
  </template>
99
106
  <script>
100
107
  import { computed } from 'vue';
101
- import { HelloBar } from '@designcrowd/fe-shared-lib';
108
+ import { HelloBar, Loader } from '@designcrowd/fe-shared-lib';
102
109
  import ActionBar from '../action-bar/ActionBar.vue';
103
110
  import BrandPageBackgroundSettings from '../brandpage-background-settings/BrandPageBackgroundSettings.vue';
104
111
  import ContentSettings from '../../../shared/content-settings/components/content-settings/ContentSettings.vue';
@@ -125,6 +132,7 @@ import { useLocalisedRouteStore } from '../../stores/route/localised-route-store
125
132
  export default {
126
133
  components: {
127
134
  HelloBar,
135
+ Loader,
128
136
  ActionBar,
129
137
  AdminBackgroundSettings,
130
138
  BackgroundSettings: BrandPageBackgroundSettings,
@@ -133,6 +133,7 @@ export interface BrandPageMakerState {
133
133
  isPageNavigating: boolean;
134
134
  isChangeTemplateConfirmModalVisible: boolean;
135
135
  isInitialising: boolean;
136
+ isBrandPageLoaded: boolean;
136
137
  isModifiedAfterTemplateApplied: boolean;
137
138
  notificationMessageQueue: NotificationMessage[];
138
139
  selectedTemplateId: string | false;
@@ -199,6 +200,7 @@ export const useBrandPageMakerStore = defineStore('brandPageMaker', {
199
200
  isApplyingTemplate: false,
200
201
  isChangeTemplateConfirmModalVisible: false,
201
202
  isInitialising: false,
203
+ isBrandPageLoaded: false,
202
204
  isPageNavigating: false,
203
205
  isModifiedAfterTemplateApplied: false,
204
206
  notificationMessageQueue: [],
@@ -315,6 +317,9 @@ export const useBrandPageMakerStore = defineStore('brandPageMaker', {
315
317
  setIsInitialising(payload: { isInitialising: boolean }): void {
316
318
  this.isInitialising = payload.isInitialising;
317
319
  },
320
+ setIsBrandPageLoaded(isLoaded: boolean): void {
321
+ this.isBrandPageLoaded = isLoaded;
322
+ },
318
323
  setIsModifiedAfterTemplateApplied({
319
324
  isModified,
320
325
  }: SetIsModifiedPayload = {}) {
@@ -4,6 +4,7 @@ import type {
4
4
  ShapeCategoryModel,
5
5
  ShapeSearchResponseModel,
6
6
  } from '../models/shapeModels';
7
+ import type { BrandPageData } from '../brand-page';
7
8
 
8
9
  export default class AssetLibraryClient {
9
10
  baseUrl: string;
@@ -121,4 +122,23 @@ export default class AssetLibraryClient {
121
122
  return response.data;
122
123
  });
123
124
  }
125
+
126
+ async getBrandPageMetadataAsync(
127
+ s3Url: string,
128
+ ): Promise<BrandPageData | null> {
129
+ try {
130
+ const response = await axios.get(s3Url, {
131
+ timeout: 30000,
132
+ headers: {
133
+ Accept: 'application/json',
134
+ },
135
+ });
136
+
137
+ return response.data;
138
+ } catch (error) {
139
+ console.error('Error fetching brand page metadata:', error);
140
+
141
+ return null;
142
+ }
143
+ }
124
144
  }
@@ -5,6 +5,7 @@ import type { SideBarTab } from '../models';
5
5
  import {
6
6
  useBrandPageContainerStore,
7
7
  useBrandPageMakerUserStore,
8
+ useBrandPageMakerStore,
8
9
  } from '../../../brand-page-maker/stores';
9
10
  import { SIDE_BAR_CONTENT_ID } from '../../content-settings/constants';
10
11
  import { useUiContentSettingsStore } from '../../content-settings/store';
@@ -30,6 +31,7 @@ export default defineComponent({
30
31
  const brandPageContainerStore = useBrandPageContainerStore();
31
32
  const userStore = useBrandPageMakerUserStore();
32
33
  const contentSettingsStore = useUiContentSettingsStore();
34
+ const brandPageMakerStore = useBrandPageMakerStore();
33
35
 
34
36
  return {
35
37
  brandPageContainerStore,
@@ -44,6 +46,7 @@ export default defineComponent({
44
46
  userStore,
45
47
  'side-bar-content': ref(null),
46
48
  isPrepurchase: computed(() => brandPageContainerStore.isPrePurchase),
49
+ isBrandPageLoaded: computed(() => brandPageMakerStore.isBrandPageLoaded),
47
50
  };
48
51
  },
49
52
  data: () => ({ SIDE_BAR_CONTENT_ID, sideBarContentRef: 'side-bar-content' }),
@@ -78,6 +81,10 @@ export default defineComponent({
78
81
  }
79
82
  },
80
83
  shouldDisplayTab(tab: SideBarTab): boolean {
84
+ if (this.isBrandPageLoaded === false && this.isPrePurchase === false) {
85
+ return false;
86
+ }
87
+
81
88
  if (this.isAdmin && tab.isDisabledForAdmin) {
82
89
  return false;
83
90
  }
@@ -20,18 +20,26 @@
20
20
  'tw-pt-36': hasQuickLinks,
21
21
  }"
22
22
  >
23
- <div class="c-sidebar-content__inner">
23
+ <div
24
+ v-if="!isBrandPageLoaded && !isPrepurchase"
25
+ class="tw-flex tw-items-center tw-justify-center tw-h-full"
26
+ >
27
+ <Loader />
28
+ </div>
29
+ <div v-else class="c-sidebar-content__inner">
24
30
  <slot name="tab" />
25
31
  </div>
26
32
  </div>
27
33
  </div>
28
34
  </template>
29
35
  <script>
36
+ import { Loader } from '@designcrowd/fe-shared-lib';
30
37
  import SidebarMixin from './SideBar.mixin.ts';
31
38
  import SideBarTabButton from './SideBarTabButton.vue';
32
39
 
33
40
  export default {
34
41
  components: {
42
+ Loader,
35
43
  SideBarTabButton,
36
44
  },
37
45
  mixins: [SidebarMixin],