@designcrowd/library.brand-page 6.1.6-use-isadminmaker-2 → 6.1.6

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 (159) hide show
  1. package/lib/src/{CreatedOnBrandCrowd-de-de-CPLDYp5f.js → CreatedOnBrandCrowd-de-de-COw1kYDh.js} +1 -1
  2. package/lib/src/{CreatedOnBrandCrowd-en-us-Br3HqLLr.js → CreatedOnBrandCrowd-en-us-JRm1p0it.js} +1 -1
  3. package/lib/src/{CreatedOnBrandCrowd-es-es-DwkIQVgN.js → CreatedOnBrandCrowd-es-es-D-G9uI6b.js} +1 -1
  4. package/lib/src/{CreatedOnBrandCrowd-fr-fr-DqeI8mF_.js → CreatedOnBrandCrowd-fr-ca-DQCScohj.js} +1 -1
  5. package/lib/src/{CreatedOnBrandCrowd-fr-ca-DqeI8mF_.js → CreatedOnBrandCrowd-fr-fr-DQCScohj.js} +1 -1
  6. package/lib/src/{CreatedOnBrandCrowd-pt-pt-bvgq_CN8.js → CreatedOnBrandCrowd-pt-br-4RazAfO7.js} +1 -1
  7. package/lib/src/{CreatedOnBrandCrowd-pt-br-bvgq_CN8.js → CreatedOnBrandCrowd-pt-pt-4RazAfO7.js} +1 -1
  8. package/lib/src/{CreatedOnDcom-de-de-nT3MnRXy.js → CreatedOnDcom-de-de-DqvLTbhq.js} +1 -1
  9. package/lib/src/{CreatedOnDcom-en-us-D2TYrEzJ.js → CreatedOnDcom-en-us-DG1X0ero.js} +1 -1
  10. package/lib/src/{CreatedOnDcom-es-es-Q-5tnP12.js → CreatedOnDcom-es-es-BxHAIikP.js} +1 -1
  11. package/lib/src/{CreatedOnDcom-fr-ca-txkwqCzm.js → CreatedOnDcom-fr-ca-BGXoViAC.js} +1 -1
  12. package/lib/src/{CreatedOnDcom-fr-fr-CUnJXLgr.js → CreatedOnDcom-fr-fr-CsvmeK2T.js} +1 -1
  13. package/lib/src/{CreatedOnDcom-pt-br-7XAwvP9H.js → CreatedOnDcom-pt-br-DvWm7MjO.js} +1 -1
  14. package/lib/src/{CreatedOnDcom-pt-pt-DjhLiioZ.js → CreatedOnDcom-pt-pt-Bhz2YEVP.js} +1 -1
  15. package/lib/src/brand-page-maker/components/action-bar/ActionBar.mixin.d.ts +1 -1
  16. package/lib/src/brand-page-maker/components/action-bar/ActionBar.mixin.js +1 -1
  17. package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.d.ts +4 -1
  18. package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.js +1 -1
  19. package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.stories.js +6 -6
  20. package/lib/src/brand-page-maker/components/brand-page-maker/__fixtures__/store-fixture.d.ts +1 -1
  21. package/lib/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.d.ts +4 -1
  22. package/lib/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.js +2 -2
  23. package/lib/src/brand-page-maker/components/brandpage-settings/ReplaceImageSettingsForBrandPageSettings.mixin.d.ts +1 -1
  24. package/lib/src/brand-page-maker/components/brandpage-settings/ReplaceImageSettingsForBrandPageSettings.mixin.js +1 -1
  25. package/lib/src/brand-page-maker/components/navigation/Navigation.mixin.d.ts +3 -3
  26. package/lib/src/brand-page-maker/components/navigation/Navigation.mixin.js +1 -1
  27. package/lib/src/brand-page-maker/components/quick-link-bar/QuickLinkBar.mixin.d.ts +3 -0
  28. package/lib/src/brand-page-maker/components/seo-settings/SeoPageSettings.mixin.d.ts +3 -0
  29. package/lib/src/brand-page-maker/components/seo-settings/UrlSettings.mixin.d.ts +3 -0
  30. package/lib/src/brand-page-maker/components/seo-settings/UseExistingDomainModal.mixin.d.ts +3 -0
  31. package/lib/src/brand-page-maker/components/template-preview/TemplatePreview.mixin.d.ts +4 -1
  32. package/lib/src/brand-page-maker/components/template-preview/TemplatePreview.mixin.js +6 -6
  33. package/lib/src/brand-page-maker/components/upgrade-to-premium-button/UpgradeToPremiumButton.mixin.d.ts +3 -0
  34. package/lib/src/brand-page-maker/stores/brandpage-container/brand-page-container-store.d.ts +6 -1
  35. package/lib/src/brand-page-maker/stores/brandpage-container/brand-page-container-store.js +6 -0
  36. package/lib/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.js +6 -0
  37. package/lib/src/clients/fabric-render-client.d.ts +1 -0
  38. package/lib/src/css/library.brand-page-brandCrowd.min.css +57 -57
  39. package/lib/src/css/library.brand-page-brandPage.min.css +57 -57
  40. package/lib/src/css/library.brand-page-designCom.min.css +57 -57
  41. package/lib/src/css/library.brand-page-preview.min.css +57 -57
  42. package/lib/src/index.mjs +1 -1
  43. package/lib/src/{lib-dewphkuW.js → lib-Bg2K2ze6.js} +225 -213
  44. package/lib/src/shared/background-settings/components/background-shapes/BackgroundShapeSettings.mixin.d.ts +1 -1
  45. package/lib/src/shared/background-settings/components/background-shapes/BackgroundShapeSettings.mixin.js +1 -1
  46. package/lib/src/shared/content-settings/components/content-settings/ContentSettings.mixin.d.ts +1 -1
  47. package/lib/src/shared/content-settings/components/content-settings/ContentSettings.mixin.js +1 -1
  48. package/lib/src/shared/content-settings/components/content-settings/ReplaceImageSettingsForContent.mixin.d.ts +1 -1
  49. package/lib/src/shared/content-settings/components/content-settings/ReplaceImageSettingsForContent.mixin.js +2 -2
  50. package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItem.mixin.d.ts +1 -1
  51. package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItem.mixin.js +2 -2
  52. package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItemField.mixin.d.ts +1 -1
  53. package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItemField.mixin.js +3 -3
  54. package/lib/src/shared/content-settings/components/draggable-item-list/DraggableItemList.mixin.d.ts +2 -2
  55. package/lib/src/shared/content-settings/components/draggable-item-list/DraggableItemList.mixin.js +1 -1
  56. package/lib/src/shared/content-settings/components/focused-content-item-settings/FocusedContentItemSettings.mixin.d.ts +1 -1
  57. package/lib/src/shared/content-settings/components/focused-content-item-settings/FocusedContentItemSettings.mixin.js +2 -2
  58. package/lib/src/shared/content-settings/components/images-field/ImagesField.mixin.d.ts +2 -2
  59. package/lib/src/shared/content-settings/components/images-field/ImagesField.mixin.js +1 -1
  60. package/lib/src/shared/content-settings/components/links-field/LinksField.mixin.d.ts +2 -2
  61. package/lib/src/shared/content-settings/components/links-field/LinksField.mixin.js +1 -1
  62. package/lib/src/shared/content-settings/components/payment-config-field/PaymentConfigField.mixin.d.ts +3 -0
  63. package/lib/src/shared/content-settings/components/shape-field/ShapeField.mixin.d.ts +2 -2
  64. package/lib/src/shared/content-settings/components/shape-field/ShapeField.mixin.js +1 -1
  65. package/lib/src/shared/content-settings/components/testimonial-items-field/TestimonialItemsField.mixin.d.ts +2 -2
  66. package/lib/src/shared/content-settings/components/testimonial-items-field/TestimonialItemsField.mixin.js +1 -1
  67. package/lib/src/shared/content-settings/components/text-items-field/TextItemsField.mixin.d.ts +2 -2
  68. package/lib/src/shared/content-settings/components/text-items-field/TextItemsField.mixin.js +1 -1
  69. package/lib/src/shared/content-settings/components/text-style-field/TextStyleField.mixin.d.ts +2 -2
  70. package/lib/src/shared/content-settings/components/text-style-field/TextStyleField.mixin.js +1 -1
  71. package/lib/src/shared/logo-settings/components/EditLogoSettings.mixin.d.ts +1 -0
  72. package/lib/src/shared/logo-settings/components/LogoSettings.mixin.d.ts +4 -0
  73. package/lib/src/shared/logo-settings/store/editable-logo-store.d.ts +2 -0
  74. package/lib/src/shared/logo-settings/store/editable-logo-store.js +20 -1
  75. package/lib/src/shared/my-uploads/MyUploads.mixin.d.ts +1 -1
  76. package/lib/src/shared/my-uploads/MyUploads.mixin.js +1 -1
  77. package/lib/src/shared/navigation-style-settings/components/navigation-style-settings/NavigationStyleSettings.mixin.d.ts +2 -2
  78. package/lib/src/shared/navigation-style-settings/components/navigation-style-settings/NavigationStyleSettings.mixin.js +1 -1
  79. package/lib/src/shared/page-settings/components/page-settings/PageSettings.mixin.d.ts +4 -1
  80. package/lib/src/shared/page-settings/components/page-settings/PageSettings.mixin.js +1 -1
  81. package/lib/src/shared/page-settings/components/page-settings-section-styles/PageSettingsSectionStyles.mixin.d.ts +6 -2
  82. package/lib/src/shared/page-settings/components/page-settings-section-styles/PageSettingsSectionStyles.mixin.js +1 -1
  83. package/lib/src/shared/publish-brand-page-with-state/PublishBrandPageModalWithState.mixin.d.ts +3 -0
  84. package/lib/src/shared/side-bar/components/SideBar.mixin.d.ts +4 -1
  85. package/lib/src/shared/side-bar/components/SideBar.mixin.js +3 -3
  86. package/lib/src/shared/style-settings/components/StyleSettings.mixin.d.ts +4 -1
  87. package/lib/src/shared/style-settings/components/StyleSettings.mixin.js +2 -2
  88. package/package.json +1 -1
  89. package/src/brand-page-maker/components/action-bar/ActionBar.mixin.ts +1 -1
  90. package/src/brand-page-maker/components/action-bar/ActionBar.vue +1 -1
  91. package/src/brand-page-maker/components/action-bar/ActionBarNavigation.vue +5 -5
  92. package/src/brand-page-maker/components/admin-background-settings/AdminBackgroundSettings.vue +1 -1
  93. package/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.ts +1 -1
  94. package/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.stories.ts +7 -7
  95. package/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.vue +1 -1
  96. package/src/brand-page-maker/components/brand-page-maker/__fixtures__/store-fixture.ts +1 -1
  97. package/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.ts +2 -2
  98. package/src/brand-page-maker/components/brandpage-settings/BrandPageSettings.vue +3 -3
  99. package/src/brand-page-maker/components/brandpage-settings/ReplaceImageSettingsForBrandPageSettings.mixin.ts +1 -1
  100. package/src/brand-page-maker/components/brandpage-settings/ReplaceImageSettingsForBrandPageSettings.vue +1 -1
  101. package/src/brand-page-maker/components/navigation/Navigation.mixin.ts +1 -1
  102. package/src/brand-page-maker/components/navigation/Navigation.vue +3 -3
  103. package/src/brand-page-maker/components/rich-text-editor/RichTextEditor.vue +11 -11
  104. package/src/brand-page-maker/components/save-contact/SaveContact.vue +2 -2
  105. package/src/brand-page-maker/components/shop/ReplaceImageSettingsForShop.vue +1 -1
  106. package/src/brand-page-maker/components/template-preview/TemplatePreview.mixin.ts +6 -6
  107. package/src/brand-page-maker/stores/brandpage-container/brand-page-container-store.initialise.test.ts +53 -0
  108. package/src/brand-page-maker/stores/brandpage-container/brand-page-container-store.ts +20 -1
  109. package/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.ts +7 -0
  110. package/src/clients/fabric-render-client.ts +5 -0
  111. package/src/shared/background-settings/components/BackgroundSettings.vue +7 -7
  112. package/src/shared/background-settings/components/MultiBackgroundShapes.vue +5 -5
  113. package/src/shared/background-settings/components/ReplaceImageSettingsForBackgroundSettings.vue +2 -2
  114. package/src/shared/background-settings/components/SingleBackgroundShape.vue +3 -3
  115. package/src/shared/background-settings/components/background-color/BackgroundColorSettings.vue +4 -4
  116. package/src/shared/background-settings/components/background-shapes/BackgroundShapeSettings.mixin.ts +1 -1
  117. package/src/shared/background-settings/components/background-shapes/BackgroundShapeSettings.vue +1 -1
  118. package/src/shared/content-settings/components/button-configuration-field/ButtonConfigurationField.vue +2 -2
  119. package/src/shared/content-settings/components/color-field/ColorField.vue +6 -6
  120. package/src/shared/content-settings/components/color-replacements-field/ColorReplacementsField.vue +9 -7
  121. package/src/shared/content-settings/components/content-settings/ContentSettings.mixin.ts +1 -1
  122. package/src/shared/content-settings/components/content-settings/ReplaceImageSettingsForContent.mixin.ts +2 -2
  123. package/src/shared/content-settings/components/content-settings/ReplaceImageSettingsForContent.vue +1 -1
  124. package/src/shared/content-settings/components/content-settings-item/ContentSettingsItem.mixin.ts +2 -2
  125. package/src/shared/content-settings/components/content-settings-item/ContentSettingsItemField.mixin.ts +3 -3
  126. package/src/shared/content-settings/components/content-settings-item/ContentSettingsItemField.vue +1 -1
  127. package/src/shared/content-settings/components/draggable-item-list/DraggableItemList.mixin.ts +1 -1
  128. package/src/shared/content-settings/components/draggable-item-list/DraggableItemList.vue +1 -1
  129. package/src/shared/content-settings/components/focused-content-item-settings/FocusedContentItemSettings.mixin.ts +2 -2
  130. package/src/shared/content-settings/components/images-field/ImagesField.mixin.ts +1 -1
  131. package/src/shared/content-settings/components/images-field/ImagesField.vue +1 -1
  132. package/src/shared/content-settings/components/links-field/LinksField.mixin.ts +1 -1
  133. package/src/shared/content-settings/components/links-field/LinksField.vue +1 -1
  134. package/src/shared/content-settings/components/replace-image-base-settings/ReplaceImageBaseSettings.vue +2 -2
  135. package/src/shared/content-settings/components/shape-field/ShapeField.mixin.ts +1 -1
  136. package/src/shared/content-settings/components/shape-field/ShapeField.vue +1 -1
  137. package/src/shared/content-settings/components/testimonial-items-field/TestimonialItemsField.mixin.ts +1 -1
  138. package/src/shared/content-settings/components/testimonial-items-field/TestimonialItemsField.vue +5 -5
  139. package/src/shared/content-settings/components/text-image-field/TextImageField.vue +7 -7
  140. package/src/shared/content-settings/components/text-items-field/TextItemsField.mixin.test.ts +1 -1
  141. package/src/shared/content-settings/components/text-items-field/TextItemsField.mixin.ts +1 -1
  142. package/src/shared/content-settings/components/text-items-field/TextItemsField.vue +2 -2
  143. package/src/shared/content-settings/components/text-style-field/TextStyleField.mixin.ts +1 -1
  144. package/src/shared/content-settings/components/text-style-field/TextStyleField.vue +2 -2
  145. package/src/shared/logo-settings/store/editable-logo-store.test.ts +90 -0
  146. package/src/shared/logo-settings/store/editable-logo-store.ts +28 -1
  147. package/src/shared/my-uploads/MyUploads.mixin.ts +1 -1
  148. package/src/shared/my-uploads/MyUploads.vue +1 -1
  149. package/src/shared/navigation-style-settings/components/navigation-style-settings/NavigationStyleSettings.mixin.ts +1 -1
  150. package/src/shared/navigation-style-settings/components/navigation-style-settings/NavigationStyleSettings.vue +12 -9
  151. package/src/shared/page-settings/components/page-settings/PageSettings.mixin.ts +1 -1
  152. package/src/shared/page-settings/components/page-settings/PageSettings.vue +3 -3
  153. package/src/shared/page-settings/components/page-settings-section-styles/PageSettingsSectionStyles.mixin.ts +1 -1
  154. package/src/shared/page-settings/components/page-settings-section-styles/PageSettingsSectionStyles.vue +4 -4
  155. package/src/shared/shape-library/ShapeLibrary.vue +9 -9
  156. package/src/shared/side-bar/components/SideBar.mixin.ts +3 -3
  157. package/src/shared/style-settings/components/StyleSettings.mixin.ts +2 -2
  158. package/src/shared/style-settings/components/StyleSettings.vue +29 -23
  159. package/src/shared/style-settings/components/text-style-options-settings-with-state/TextStyleOptionsSettingsWithState.vue +2 -2
@@ -43,7 +43,7 @@ export default defineComponent({
43
43
  type: Object as PropType<LogoTheme>,
44
44
  required: true,
45
45
  },
46
- isAdmin: {
46
+ isAdminMaker: {
47
47
  type: Boolean,
48
48
  required: true,
49
49
  },
@@ -51,7 +51,7 @@
51
51
  {{ testimonialMaxLengthErrorMessage }}
52
52
  </p>
53
53
  <PersonalisationOverrideField
54
- v-if="isAdmin && content.personalisationRole"
54
+ v-if="isAdminMaker && content.personalisationRole"
55
55
  :id="id"
56
56
  name="testimonialsOverride"
57
57
  :content="content"
@@ -72,7 +72,7 @@
72
72
  @update:model-value="onRemoveImage(option.index)"
73
73
  />
74
74
  <PersonalisationOverrideField
75
- v-if="isAdmin && content.personalisationRole"
75
+ v-if="isAdminMaker && content.personalisationRole"
76
76
  :id="id"
77
77
  name="imageUrlOverride"
78
78
  :content="content"
@@ -108,7 +108,7 @@
108
108
  : ''
109
109
  "
110
110
  :value="option.item.colorReplacements"
111
- :is-admin="isAdmin"
111
+ :is-admin-maker="isAdminMaker"
112
112
  :logo-theme="logoTheme"
113
113
  :toggle-unique-id="option.index.toString()"
114
114
  @update:model-value="
@@ -136,7 +136,7 @@
136
136
  {{ testimonialMaxLengthErrorMessage }}
137
137
  </p>
138
138
  <PersonalisationOverrideField
139
- v-if="isAdmin && content.personalisationRole"
139
+ v-if="isAdminMaker && content.personalisationRole"
140
140
  :id="id"
141
141
  name="nameOverride"
142
142
  :content="content"
@@ -167,7 +167,7 @@
167
167
  {{ testimonialMaxLengthErrorMessage }}
168
168
  </p>
169
169
  <PersonalisationOverrideField
170
- v-if="isAdmin && content.personalisationRole"
170
+ v-if="isAdminMaker && content.personalisationRole"
171
171
  :id="id"
172
172
  name="positionOverride"
173
173
  :content="content"
@@ -51,7 +51,7 @@
51
51
  />
52
52
 
53
53
  <PersonalisationOverrideField
54
- v-if="isAdmin && content.personalisationRole"
54
+ v-if="isAdminMaker && content.personalisationRole"
55
55
  :id="id"
56
56
  name="imageUrlOverride"
57
57
  :content="content"
@@ -80,7 +80,7 @@
80
80
  : ''
81
81
  "
82
82
  :value="option.item.colorReplacements"
83
- :is-admin="isAdmin"
83
+ :is-admin-maker="isAdminMaker"
84
84
  :logo-theme="logoTheme"
85
85
  :toggle-unique-id="option.index.toString()"
86
86
  @update:model-value="onColorReplacementsChange($event, option.index)"
@@ -106,7 +106,7 @@
106
106
  {{ maxLengthError }}
107
107
  </p>
108
108
  <PersonalisationOverrideField
109
- v-if="isAdmin && content.personalisationRole"
109
+ v-if="isAdminMaker && content.personalisationRole"
110
110
  :id="id"
111
111
  name="titleOverride"
112
112
  :content="content"
@@ -140,7 +140,7 @@
140
140
  @update:model-value="onTextAreaTextChange($event, option.index)"
141
141
  />
142
142
  <PersonalisationOverrideField
143
- v-if="isAdmin && content.personalisationRole"
143
+ v-if="isAdminMaker && content.personalisationRole"
144
144
  :id="id"
145
145
  name="paragraphOverride"
146
146
  :content="content"
@@ -179,7 +179,7 @@
179
179
  {{ maxLengthError }}
180
180
  </p>
181
181
  <PersonalisationOverrideField
182
- v-if="isAdmin && content.personalisationRole"
182
+ v-if="isAdminMaker && content.personalisationRole"
183
183
  :id="id"
184
184
  name="imageTitleOverride"
185
185
  :content="content"
@@ -193,7 +193,7 @@
193
193
  <ButtonConfigurationField
194
194
  :id="id"
195
195
  :index="option.index"
196
- :is-admin="isAdmin"
196
+ :is-admin-maker="isAdminMaker"
197
197
  :button-config="{
198
198
  buttonText: options[option.index].buttonText ?? false,
199
199
  buttonLinkType: options[option.index].buttonLinkType || 'url',
@@ -325,7 +325,7 @@ interface Props {
325
325
  maxLength?: number;
326
326
  logoTheme: LogoTheme;
327
327
  settings: any;
328
- isAdmin: boolean;
328
+ isAdminMaker: boolean;
329
329
  brandPageType?: string;
330
330
  }
331
331
 
@@ -41,7 +41,7 @@ const mountHost = () =>
41
41
  name: 'textItems',
42
42
  content: { id: 'item-1', type: 'text' } as Content,
43
43
  value: [makeTextItem('<p>one</p>'), makeTextItem('<p>two</p>')],
44
- isAdmin: false,
44
+ isAdminMaker: false,
45
45
  logoTheme: {
46
46
  logoTextColor: '#000000',
47
47
  logoBackgroundColor: '#ffffff',
@@ -43,7 +43,7 @@ export default defineComponent({
43
43
  type: Array as PropType<TextItem[]>,
44
44
  required: true,
45
45
  },
46
- isAdmin: {
46
+ isAdminMaker: {
47
47
  type: Boolean,
48
48
  required: true,
49
49
  },
@@ -43,7 +43,7 @@
43
43
  @update:model-value="onTextAreaTextChange($event, option.index)"
44
44
  />
45
45
  <PersonalisationOverrideField
46
- v-if="isAdmin && content.personalisationRole"
46
+ v-if="isAdminMaker && content.personalisationRole"
47
47
  :id="id"
48
48
  name="textOverride"
49
49
  :content="content"
@@ -57,7 +57,7 @@
57
57
  v-if="!showRichTextEditor"
58
58
  :id="`text-style-field-${option.index}`"
59
59
  :key="`text-style-field-${option.index}`"
60
- :is-admin="isAdmin"
60
+ :is-admin-maker="isAdminMaker"
61
61
  :value="options[option.index].textStyle"
62
62
  :logo-theme="logoTheme"
63
63
  :show-font-style-only="true"
@@ -83,7 +83,7 @@ export default defineComponent({
83
83
  type: Object as PropType<TextStyleDeclaration>,
84
84
  required: true,
85
85
  },
86
- isAdmin: {
86
+ isAdminMaker: {
87
87
  type: Boolean,
88
88
  required: true,
89
89
  },
@@ -134,7 +134,7 @@
134
134
  :name="name"
135
135
  :value="textColorValue"
136
136
  :options="textColorOptions"
137
- :is-admin="isAdmin"
137
+ :is-admin-maker="isAdminMaker"
138
138
  :logo-theme="logoTheme"
139
139
  :is-toggled="false"
140
140
  :disable-transparent="true"
@@ -153,7 +153,7 @@
153
153
  :name="name"
154
154
  :value="textBackgroundColorValue"
155
155
  :options="textBackgroundColorOptions"
156
- :is-admin="isAdmin"
156
+ :is-admin-maker="isAdminMaker"
157
157
  :logo-theme="logoTheme"
158
158
  :is-toggled="false"
159
159
  @update:model-value="onSelectBackgroundColor"
@@ -0,0 +1,90 @@
1
+ import { createPinia, setActivePinia } from 'pinia';
2
+ import { useLogoStore } from '@brand-page-maker/stores';
3
+ import { useUiEditableLogoStore } from './editable-logo-store';
4
+ import { FabricRenderClient } from '../../../clients/fabric-render-client';
5
+
6
+ const LOGO_TEMPLATE_TOKEN = '46059687-5bed-4fc0-b933-7563d236d66f';
7
+ const BRAND_KIT_DRAFT_TOKEN = '6bfd97ca-1359-4ad7-aa99-4ee70f334d7c';
8
+ const CLIENT_MINTED_TOKEN = '11111111-2222-3333-4444-555555555555';
9
+
10
+ describe('editable logo store — postEditableLogoRequestAsync body', () => {
11
+ let getModifiedLogoAsyncMock: ReturnType<typeof vi.fn>;
12
+
13
+ beforeEach(() => {
14
+ setActivePinia(createPinia());
15
+
16
+ const logoStore = useLogoStore();
17
+
18
+ logoStore.setLogoTemplateAsset({
19
+ token: LOGO_TEMPLATE_TOKEN,
20
+ version: 1,
21
+ } as any);
22
+
23
+ getModifiedLogoAsyncMock = vi.fn().mockResolvedValue({
24
+ base64: null,
25
+ metadata: '{"objects":[]}',
26
+ width: 0,
27
+ height: 0,
28
+ });
29
+ vi.spyOn(FabricRenderClient, 'getInstance').mockReturnValue({
30
+ getModifiedLogoAsync: getModifiedLogoAsyncMock,
31
+ } as unknown as FabricRenderClient);
32
+ });
33
+
34
+ afterEach(() => {
35
+ vi.restoreAllMocks();
36
+ });
37
+
38
+ async function requestBodyForState(state: {
39
+ logoDraftToken: string;
40
+ prePurchaseBrandKitLogoDraftToken: string;
41
+ }) {
42
+ const store = useUiEditableLogoStore();
43
+
44
+ store.logoDraftToken = state.logoDraftToken;
45
+ store.prePurchaseBrandKitLogoDraftToken =
46
+ state.prePurchaseBrandKitLogoDraftToken;
47
+
48
+ await store.postEditableLogoRequestAsync({
49
+ returnJson: true,
50
+ dimensionType: 'preview_image_transparent_no_buffer',
51
+ variationType: '',
52
+ });
53
+
54
+ expect(getModifiedLogoAsyncMock).toHaveBeenCalledTimes(1);
55
+
56
+ return getModifiedLogoAsyncMock.mock.calls[0][0];
57
+ }
58
+
59
+ it('sends the seeded draft AND disableAutoLayout on a Brand Kit render', async () => {
60
+ const body = await requestBodyForState({
61
+ logoDraftToken: BRAND_KIT_DRAFT_TOKEN,
62
+ prePurchaseBrandKitLogoDraftToken: BRAND_KIT_DRAFT_TOKEN,
63
+ });
64
+
65
+ // BP-6010: the draft's authored arrangement must survive the render, so
66
+ // the opt-out from fabric-render's default re-stack rides with the draft.
67
+ expect(body.logo.draft).toEqual({ token: BRAND_KIT_DRAFT_TOKEN });
68
+ expect(body.disableAutoLayout).toBe(true);
69
+ });
70
+
71
+ it('sends neither on a template-seeded render (no Brand Kit seed)', async () => {
72
+ const body = await requestBodyForState({
73
+ logoDraftToken: CLIENT_MINTED_TOKEN,
74
+ prePurchaseBrandKitLogoDraftToken: '',
75
+ });
76
+
77
+ expect(body.logo.draft).toBeNull();
78
+ expect(body.disableAutoLayout).toBeUndefined();
79
+ });
80
+
81
+ it('sends neither after a logo swap replaces the seeded draft', async () => {
82
+ const body = await requestBodyForState({
83
+ logoDraftToken: CLIENT_MINTED_TOKEN,
84
+ prePurchaseBrandKitLogoDraftToken: BRAND_KIT_DRAFT_TOKEN,
85
+ });
86
+
87
+ expect(body.logo.draft).toBeNull();
88
+ expect(body.disableAutoLayout).toBeUndefined();
89
+ });
90
+ });
@@ -110,6 +110,12 @@ export interface EditableLogoVariation {
110
110
  export interface EditableLogoState {
111
111
  enableEditMode: boolean;
112
112
  logoDraftToken: string;
113
+ // BP-5962: the REAL server draft this editor was seeded with (the Brand Kit
114
+ // Edit flow - a frozen copy of the user's logo), or '' for template-seeded
115
+ // flows. Distinct from logoDraftToken, which is often a client-minted uuid
116
+ // that does not exist on the server (the initialise fallback, in-editor
117
+ // logo swaps, BYO uploads) and must never be sent to fabric-render.
118
+ prePurchaseBrandKitLogoDraftToken: string;
113
119
  logoEdits: LogoEdits;
114
120
  makerFonts: MakerFontObject[];
115
121
  editableLogoVariations: EditableLogoVariation[];
@@ -133,6 +139,7 @@ export const useUiEditableLogoStore = defineStore('uiEditableLogo', {
133
139
  isTextOnlyLogo: false,
134
140
  enableEditMode: false,
135
141
  logoDraftToken: '',
142
+ prePurchaseBrandKitLogoDraftToken: '',
136
143
  editableLogoVariations: [
137
144
  {
138
145
  variationId: LOGO_VARIATION.LOGO_WITH_TRANSPARENT_BACKGROUND,
@@ -206,6 +213,8 @@ export const useUiEditableLogoStore = defineStore('uiEditableLogo', {
206
213
  }) {
207
214
  this.resetLogoEdits();
208
215
  this.setLogoDraftToken(payload.newState.logoDraftToken);
216
+ this.prePurchaseBrandKitLogoDraftToken =
217
+ payload.newState.prePurchaseBrandKitLogoDraftToken || '';
209
218
  this.makerFonts = payload.newState.makerFonts;
210
219
 
211
220
  const templateMetaResult = await this.postEditableLogoRequestAsync({
@@ -625,17 +634,35 @@ export const useUiEditableLogoStore = defineStore('uiEditableLogo', {
625
634
 
626
635
  const hasLayout = !!payload?.layout;
627
636
 
637
+ // BP-5962: render from the Brand Kit seeded draft (a frozen copy of the
638
+ // user's logo) so canvas-level edits - curved text, moved objects and
639
+ // anything else updateLogoEdit's whitelist can't express - survive into
640
+ // the editor; the changeRequest still layers the editor's own edits on
641
+ // top. Only while the current logo IS that draft: a logo swap or a BYO
642
+ // upload replaces logoDraftToken with a client-minted uuid that does not
643
+ // exist on the server, and template-seeded flows never seed one - both
644
+ // keep the template-only request exactly as before.
645
+ const isBrandKitSeededRender =
646
+ !!this.prePurchaseBrandKitLogoDraftToken &&
647
+ this.logoDraftToken === this.prePurchaseBrandKitLogoDraftToken;
648
+
628
649
  const body: ModifyLogoDataRequest = {
629
650
  returnJson: payload?.returnJson || false,
630
651
  generateS3Url: true,
631
652
  dimensionsType: payload?.dimensionType,
632
653
  variation: payload?.variationType,
654
+ // BP-6010: a draft-based render must keep the draft's authored
655
+ // arrangement - opt out of fabric-render's default re-stack. Rides the
656
+ // same condition as the draft so the two can never drift apart.
657
+ disableAutoLayout: isBrandKitSeededRender ? true : undefined,
633
658
  logo: {
634
659
  template: {
635
660
  token: logoStore.logoTemplateAsset!.token,
636
661
  version: logoStore.logoTemplateAsset!.version,
637
662
  },
638
- draft: null,
663
+ draft: isBrandKitSeededRender
664
+ ? { token: this.prePurchaseBrandKitLogoDraftToken }
665
+ : null,
639
666
  },
640
667
  changeRequest: {
641
668
  objects: {
@@ -69,7 +69,7 @@ export default defineComponent({
69
69
  dropzoneImageUploaderRef,
70
70
  endpoints: computed(() => uiStore.endpoints),
71
71
  uiStore,
72
- isAdmin: computed(() => !!containerStore.isAdminMaker),
72
+ isAdminMaker: computed(() => !!containerStore.isAdminMaker),
73
73
  isLoggedIn: computed(() => !!userStore.emailAddress),
74
74
  };
75
75
  },
@@ -1,6 +1,6 @@
1
1
  <!-- eslint-disable vue/no-deprecated-slot-attribute -->
2
2
  <template>
3
- <LoginRequiredMessage v-if="!isLoggedIn && !isAdmin" />
3
+ <LoginRequiredMessage v-if="!isLoggedIn && !isAdminMaker" />
4
4
  <div v-else>
5
5
  <DropzoneImageUploader
6
6
  ref="dropzoneImageUploaderRef"
@@ -25,7 +25,7 @@ export default defineComponent({
25
25
  type: Array as PropType<NavigationStyleConfig[]>,
26
26
  required: true,
27
27
  },
28
- isAdmin: {
28
+ isAdminMaker: {
29
29
  type: Boolean,
30
30
  required: true,
31
31
  },
@@ -13,7 +13,7 @@
13
13
  id="navigation-hamburger-default-button-style"
14
14
  key="navigation-hamburger-default-button-style"
15
15
  name="Default text style"
16
- :is-admin="isAdmin"
16
+ :is-admin-maker="isAdminMaker"
17
17
  :label="commonTr('defaultTextStyle')"
18
18
  :logo-theme="logoTheme"
19
19
  :value="value.hamburgerMenuStyle.defaultButtonStyle"
@@ -24,7 +24,7 @@
24
24
  id="navigation-default-button-style"
25
25
  key="navigation-default-button-style"
26
26
  name="Default text style"
27
- :is-admin="isAdmin"
27
+ :is-admin-maker="isAdminMaker"
28
28
  :label="commonTr('defaultTextStyle')"
29
29
  :logo-theme="logoTheme"
30
30
  :value="value.defaultButtonStyle"
@@ -41,8 +41,8 @@
41
41
  :key="index"
42
42
  class="tw-flex tw-justify-between tw-w-full"
43
43
  :class="{
44
- 'tw-items-start': isAdmin,
45
- 'tw-items-center': !isAdmin,
44
+ 'tw-items-start': isAdminMaker,
45
+ 'tw-items-center': !isAdminMaker,
46
46
  'tw-mb-4': index < navigationStyleOptions.length - 1,
47
47
  }"
48
48
  >
@@ -50,12 +50,12 @@
50
50
  <p
51
51
  class="tw-font-sans tw-font-bold tw-text-secondary-800 tw-text-sm tw-break-words"
52
52
  :class="{
53
- 'tw-mb-2': isAdmin,
53
+ 'tw-mb-2': isAdminMaker,
54
54
  }"
55
55
  >
56
56
  {{ navigationStyleConfigOptionTitles[option] }}
57
57
  </p>
58
- <div v-if="isAdmin">
58
+ <div v-if="isAdminMaker">
59
59
  <Toggle
60
60
  :id="`${option}-color-matched`"
61
61
  :model-value="isOptionColorMatched(option)"
@@ -69,14 +69,14 @@
69
69
 
70
70
  <!-- Start style option color picker -->
71
71
  <div
72
- v-if="(isAdmin && !isOptionColorMatched(option)) || !isAdmin"
72
+ v-if="(isAdminMaker && !isOptionColorMatched(option)) || !isAdminMaker"
73
73
  class="tw-flex-none"
74
74
  >
75
75
  <ColorField
76
76
  id="navigationStyle"
77
77
  name="navigationStyle"
78
78
  :value="colorPickerValue(option)"
79
- :is-admin="isAdmin"
79
+ :is-admin-maker="isAdminMaker"
80
80
  :is-toggled="false"
81
81
  :logo-theme="logoTheme"
82
82
  :disable-transparent="
@@ -89,7 +89,10 @@
89
89
  <!-- End style option color picker -->
90
90
 
91
91
  <!-- Start Admin Style Theme Key Select -->
92
- <div v-if="isAdmin && isOptionColorMatched(option)" class="tw-flex-none">
92
+ <div
93
+ v-if="isAdminMaker && isOptionColorMatched(option)"
94
+ class="tw-flex-none"
95
+ >
93
96
  <select
94
97
  class="c-select c-button-style tw-border tw-appearance-none tw-border-none tw-h-10 tw-pl-2 tw-pr-8 tw-rounded tw-cursor-pointer tw-transition-all tw-duration-300 tw-bg-white"
95
98
  @change.stop="onColorPickerInput(option, $event.target.value)"
@@ -231,7 +231,7 @@ export default defineComponent({
231
231
  ),
232
232
  sections: computed(() => pageSettingsStore.sections),
233
233
  features: computed(() => userStore.features),
234
- isAdmin: computed(() => brandPageContainerStore.isAdminMaker),
234
+ isAdminMaker: computed(() => brandPageContainerStore.isAdminMaker),
235
235
  isBrandSite: computed(() => brandPageMakerStore.isBrandSite),
236
236
  navigationStyleTypeConfigs: computed(
237
237
  () => navigationSettingsStore.navigationStyleTypeConfigs,
@@ -49,7 +49,7 @@
49
49
  >
50
50
  <PageSettingsSectionStyles
51
51
  section-name="header"
52
- :is-admin="isAdmin"
52
+ :is-admin-maker="isAdminMaker"
53
53
  :is-brand-site="isBrandSite"
54
54
  :logo-theme="logoTheme"
55
55
  :style-options="headerPageSectionStyleOptions"
@@ -66,14 +66,14 @@
66
66
  <PageSettingsSectionStyles
67
67
  section-name="footer"
68
68
  :font-settings-options="footerFontSettingsOptions"
69
- :is-admin="isAdmin"
69
+ :is-admin-maker="isAdminMaker"
70
70
  :is-brand-site="isBrandSite"
71
71
  :logo-theme="logoTheme"
72
72
  :style-options="footerPageSectionStyleOptions"
73
73
  />
74
74
 
75
75
  <div
76
- v-if="!isAdmin && !isPrePurchase && showBrandCrowdLogo"
76
+ v-if="!isAdminMaker && !isPrePurchase && showBrandCrowdLogo"
77
77
  class="tw-flex tw-items-center tw-justify-between tw-cursor-pointer"
78
78
  @click="onHideBrandPageLogoClickFromFooter"
79
79
  >
@@ -75,7 +75,7 @@ export default defineComponent({
75
75
  required: false,
76
76
  default: () => [],
77
77
  },
78
- isAdmin: {
78
+ isAdminMaker: {
79
79
  type: Boolean,
80
80
  required: true,
81
81
  },
@@ -85,7 +85,7 @@
85
85
 
86
86
  <NavigationStyleSettings
87
87
  :available-navigation-style-configs="availableNavigationStyleConfigs"
88
- :is-admin="isAdmin"
88
+ :is-admin-maker="isAdminMaker"
89
89
  :logo-theme="logoTheme"
90
90
  :value="navigation"
91
91
  @option-value-change="handleHeaderNavigationStyleOptionValueChange"
@@ -155,7 +155,7 @@
155
155
  :font-family-options="availableTextFontFamilyOptions"
156
156
  :value="fontStyle(option.propName)"
157
157
  :show-text-alignment-options="false"
158
- :is-admin="isAdmin"
158
+ :is-admin-maker="isAdminMaker"
159
159
  :logo-theme="logoTheme"
160
160
  @update:model-value="setTextStyleOption(option.propName, $event)"
161
161
  />
@@ -173,7 +173,7 @@
173
173
  name="fill"
174
174
  :label="commonTr('iconColor')"
175
175
  :value="iconColor"
176
- :is-admin="isAdmin"
176
+ :is-admin-maker="isAdminMaker"
177
177
  :logo-theme="logoTheme"
178
178
  :toggle-unique-id="sectionName"
179
179
  :disable-transparent="true"
@@ -194,7 +194,7 @@
194
194
  name="backgroundColor"
195
195
  :label="commonTr('backgroundColor')"
196
196
  :value="backgroundColor"
197
- :is-admin="isAdmin"
197
+ :is-admin-maker="isAdminMaker"
198
198
  :logo-theme="logoTheme"
199
199
  :toggle-unique-id="sectionName"
200
200
  @update:model-value="onSelectColor"
@@ -75,7 +75,7 @@
75
75
  <img :src="shape.url" alt="" />
76
76
  </figure>
77
77
  <div
78
- v-if="isAdmin && !shape.isEnabledToAdmin"
78
+ v-if="isAdminMaker && !shape.isEnabledToAdmin"
79
79
  class="tw-absolute tw-text-sm tw-w-full tw-h-full tw-top-0 tw-flex tw-items-end tw-justify-center"
80
80
  >
81
81
  <span class="tw-text-error-500 tw-mb-1">{{
@@ -94,7 +94,7 @@
94
94
  @click="handleShapeOrShapeCollectionSelection(shape)"
95
95
  >
96
96
  <div
97
- v-if="shape.numberOfVariants > 1 && !isAdmin"
97
+ v-if="shape.numberOfVariants > 1 && !isAdminMaker"
98
98
  class="tw-absolute tw-top-2 tw-right-2 tw-bg-grayscale-600 tw-rounded-full tw-flex tw-items-center tw-justify-center tw-h-5 tw-w-5 tw-z-5"
99
99
  >
100
100
  <span class="tw-text-xs tw-text-white">{{
@@ -105,7 +105,7 @@
105
105
  <img :src="shape.url" alt="" />
106
106
  </figure>
107
107
  <div
108
- v-if="isAdmin && !shape.isEnabledToAdmin"
108
+ v-if="isAdminMaker && !shape.isEnabledToAdmin"
109
109
  class="tw-absolute tw-text-sm tw-w-full tw-h-full tw-top-0 tw-flex tw-items-end tw-justify-center"
110
110
  >
111
111
  <span class="tw-text-error-500 tw-mb-1">{{
@@ -192,7 +192,7 @@ const containerStore = useBrandPageContainerStore();
192
192
  const makerStore = useBrandPageMakerStore();
193
193
  const sidebarStore = useUiSideBarStore();
194
194
 
195
- const isAdmin = computed(() => containerStore.isAdminMaker);
195
+ const isAdminMaker = computed(() => containerStore.isAdminMaker);
196
196
  const isBackgroundTab = computed(
197
197
  () => sidebarStore.selectedTabName === 'BackgroundSettings',
198
198
  );
@@ -257,7 +257,7 @@ async function getShapesCategories() {
257
257
  locale,
258
258
  )) as ShapeCategoryModel[];
259
259
  shapeLibraryCategories.value = categories.filter(
260
- (shape) => isAdmin.value || shape.isEnabled,
260
+ (shape) => isAdminMaker.value || shape.isEnabled,
261
261
  );
262
262
  } catch (e) {
263
263
  if (process.env.NODE_ENV !== 'production') console.error(e);
@@ -279,7 +279,7 @@ async function getShapes() {
279
279
  currentPageSize.value,
280
280
  locale,
281
281
  makerMode.value,
282
- isAdmin.value,
282
+ isAdminMaker.value,
283
283
  )) as ShapeSearchResponseModel;
284
284
  totalPageSize.value += newShapes.items.length;
285
285
  if (!shapeLibrary.value || !shapeLibrary.value.items) {
@@ -325,7 +325,7 @@ async function onCategoryClicked(shapeCategory: ShapeCategoryModel) {
325
325
  currentPageSize.value,
326
326
  locale,
327
327
  makerMode.value,
328
- isAdmin.value,
328
+ isAdminMaker.value,
329
329
  )) as ShapeSearchResponseModel;
330
330
  totalPageSize.value += res.items.length;
331
331
  if (!shapeLibrary.value || !shapeLibrary.value.items) {
@@ -370,7 +370,7 @@ async function handleShapeOrShapeCollectionSelection(shape: any) {
370
370
  if (
371
371
  shape.numberOfVariants > 1 &&
372
372
  shape.shapeCollectionToken &&
373
- !isAdmin.value
373
+ !isAdminMaker.value
374
374
  ) {
375
375
  try {
376
376
  const shapeCollection =
@@ -401,7 +401,7 @@ async function searchShapes() {
401
401
  currentPageSize.value,
402
402
  locale,
403
403
  makerMode.value,
404
- isAdmin.value,
404
+ isAdminMaker.value,
405
405
  )) as ShapeSearchResponseModel;
406
406
  totalPageSize.value += res.items.length;
407
407
  if (!shapeLibrary.value || !shapeLibrary.value.items) {
@@ -38,7 +38,7 @@ export default defineComponent({
38
38
  brandPageContainerStore,
39
39
  tabs: computed(() => sideBarStore.tabs),
40
40
  selectedTabName: computed(() => sideBarStore.selectedTabName),
41
- isAdmin: computed(() => brandPageContainerStore.isAdminMaker),
41
+ isAdminMaker: computed(() => brandPageContainerStore.isAdminMaker),
42
42
  contentSettingsMode: computed(() => contentSettingsStore.mode),
43
43
  contentSettingsSelectedItemId: computed(
44
44
  () => contentSettingsStore.selectedItemId,
@@ -91,11 +91,11 @@ export default defineComponent({
91
91
  return false;
92
92
  }
93
93
 
94
- if (this.isAdmin && tab.isDisabledForAdmin) {
94
+ if (this.isAdminMaker && tab.isDisabledForAdmin) {
95
95
  return false;
96
96
  }
97
97
 
98
- if (!this.isAdmin && tab.isEnabledForAdminOnly === true) {
98
+ if (!this.isAdminMaker && tab.isEnabledForAdminOnly === true) {
99
99
  return false;
100
100
  }
101
101
 
@@ -69,7 +69,7 @@ export default defineComponent({
69
69
  isDefaultTextColorRequired: computed(
70
70
  () => uiStore.isDefaultTextColorRequired,
71
71
  ),
72
- isAdmin: computed(() => brandPageContainerStore.isAdminMaker),
72
+ isAdminMaker: computed(() => brandPageContainerStore.isAdminMaker),
73
73
  brandPageType: computed(() => brandPageMakerStore.brandPageType),
74
74
  showBrandCrowdLogo: computed(
75
75
  () => brandPageMakerStore.showBrandCrowdLogo,
@@ -143,7 +143,7 @@ export default defineComponent({
143
143
  },
144
144
  },
145
145
  created() {
146
- if (this.isAdmin) {
146
+ if (this.isAdminMaker) {
147
147
  // check if the buttons styles are color matched
148
148
  Object.keys(this.isColorMatch).forEach((k) => {
149
149
  this.isColorMatch[k] =