@designcrowd/library.brand-page 5.14.11 → 5.14.12

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 (95) hide show
  1. package/lib/src/{CreatedOnBrandCrowd-de-de-BJ3Foxao.js → CreatedOnBrandCrowd-de-de-C5tl1NwD.js} +1 -1
  2. package/lib/src/{CreatedOnBrandCrowd-en-us-BjI_fxWY.js → CreatedOnBrandCrowd-en-us-C7J2vGwU.js} +1 -1
  3. package/lib/src/{CreatedOnBrandCrowd-es-es-Dt8190BK.js → CreatedOnBrandCrowd-es-es-IREekVx2.js} +1 -1
  4. package/lib/src/{CreatedOnBrandCrowd-fr-fr-Ck6zCiIn.js → CreatedOnBrandCrowd-fr-fr-EJkAJ0iH.js} +1 -1
  5. package/lib/src/{CreatedOnBrandCrowd-pt-pt-CaNvmzQJ.js → CreatedOnBrandCrowd-pt-pt-mKBH6Ary.js} +1 -1
  6. package/lib/src/{CreatedOnDcom-de-de-DMEecXw8.js → CreatedOnDcom-de-de-CWWw2LBb.js} +1 -1
  7. package/lib/src/{CreatedOnDcom-en-us-BZIPLMxJ.js → CreatedOnDcom-en-us-Db6zzKtc.js} +1 -1
  8. package/lib/src/{CreatedOnDcom-es-es-D6ey1TnI.js → CreatedOnDcom-es-es-CsMu_iBW.js} +1 -1
  9. package/lib/src/{CreatedOnDcom-fr-fr-NaeiDsv-.js → CreatedOnDcom-fr-fr-oJRc8eop.js} +1 -1
  10. package/lib/src/{CreatedOnDcom-pt-pt-BwEUUii2.js → CreatedOnDcom-pt-pt-CQ_otC6l.js} +1 -1
  11. package/lib/src/brand-page/components/button/Button.mixin.js +4 -2
  12. package/lib/src/brand-page/models/index.d.ts +9 -2
  13. package/lib/src/brand-page/utils/migration/migration-06.d.ts +2 -0
  14. package/lib/src/brand-page/utils/migration/migration-06.js +48 -0
  15. package/lib/src/brand-page/utils/migration.util.js +6 -0
  16. package/lib/src/brand-page/utils/view-model.util.js +49 -11
  17. package/lib/src/brand-page/view-models.d.ts +10 -3
  18. package/lib/src/brand-page-maker/constants/config-settings-constant.js +8 -1
  19. package/lib/src/brand-page-maker/models/content-settings.js +7 -1
  20. package/lib/src/{bundled-translations-B54196Rf.js → bundled-translations-fWikWTfa.js} +15 -15
  21. package/lib/src/{bundled-translations.de-DE-CNESUsYJ.js → bundled-translations.de-DE-CwtsRCCr.js} +33 -33
  22. package/lib/src/{bundled-translations.es-ES-FWge029M.js → bundled-translations.es-ES-DELCLCbF.js} +9 -9
  23. package/lib/src/{bundled-translations.fr-CA-DlWfm29N.js → bundled-translations.fr-CA-PDBhYlx8.js} +17 -17
  24. package/lib/src/{bundled-translations.fr-FR-DRCMzVfh.js → bundled-translations.fr-FR-OuZj3i-r.js} +24 -24
  25. package/lib/src/{bundled-translations.pt-BR-llUnBWoL.js → bundled-translations.pt-BR-RPfprZOm.js} +36 -36
  26. package/lib/src/{bundled-translations.pt-PT-K74Dt682.js → bundled-translations.pt-PT-DF_GCXSl.js} +5 -5
  27. package/lib/src/bundles/bundled-translations.de-DE.json +18 -2
  28. package/lib/src/bundles/bundled-translations.es-ES.json +18 -2
  29. package/lib/src/bundles/bundled-translations.fr-CA.json +18 -2
  30. package/lib/src/bundles/bundled-translations.fr-FR.json +18 -2
  31. package/lib/src/bundles/bundled-translations.json +18 -2
  32. package/lib/src/bundles/bundled-translations.pt-BR.json +18 -2
  33. package/lib/src/bundles/bundled-translations.pt-PT.json +18 -2
  34. package/lib/src/css/library.brand-page-brandCrowd.min.css +31 -28
  35. package/lib/src/css/library.brand-page-brandPage.min.css +31 -28
  36. package/lib/src/css/library.brand-page-designCom.min.css +31 -28
  37. package/lib/src/css/library.brand-page-preview.min.css +31 -28
  38. package/lib/src/index.mjs +1 -1
  39. package/lib/src/{lib-C0mkZ8UD.js → lib-CwoD7AhY.js} +26687 -26581
  40. package/lib/src/shared/content-settings/components/items-field/ItemsField.mixin.d.ts +3 -3
  41. package/lib/src/shared/content-settings/components/items-field/ItemsField.mixin.js +3 -3
  42. package/lib/src/shared/page-settings/components/page-settings/PageSettings.mixin.d.ts +2 -2
  43. package/lib/src/shared/page-settings/components/page-settings-section-styles/PageSettingsSectionStyles.mixin.d.ts +2 -2
  44. package/package.json +1 -1
  45. package/src/brand-page/components/button/Button.mixin.ts +4 -2
  46. package/src/brand-page/components/fallback-image/FallbackImage.vue +1 -1
  47. package/src/brand-page/components/image/Image.vue +1 -1
  48. package/src/brand-page/components/images-section/ImagesSection.test.ts +230 -0
  49. package/src/brand-page/components/images-section/ImagesSection.vue +185 -18
  50. package/src/brand-page/components/shapes-section/ShapesSection.vue +19 -9
  51. package/src/brand-page/components/text-media-section/TextMediaSection.vue +166 -7
  52. package/src/brand-page/models/index.ts +10 -2
  53. package/src/brand-page/utils/__snapshots__/migration.util.test.ts.snap +3 -3
  54. package/src/brand-page/utils/migration/migration-06.ts +64 -0
  55. package/src/brand-page/utils/migration.util.ts +6 -0
  56. package/src/brand-page/utils/view-model.util.ts +62 -13
  57. package/src/brand-page/view-models.ts +8 -2
  58. package/src/brand-page-maker/constants/config-settings-constant.ts +7 -1
  59. package/src/brand-page-maker/models/content-settings.ts +7 -1
  60. package/src/bundles/bundled-translations.de-DE.json +18 -2
  61. package/src/bundles/bundled-translations.es-ES.json +18 -2
  62. package/src/bundles/bundled-translations.fr-CA.json +18 -2
  63. package/src/bundles/bundled-translations.fr-FR.json +18 -2
  64. package/src/bundles/bundled-translations.json +18 -2
  65. package/src/bundles/bundled-translations.pt-BR.json +18 -2
  66. package/src/bundles/bundled-translations.pt-PT.json +18 -2
  67. package/src/shared/content-settings/components/button-configuration-field/ButtonConfigurationField.vue +283 -0
  68. package/src/shared/content-settings/components/content-settings/i18n/content-settings.de-DE.json +1 -0
  69. package/src/shared/content-settings/components/content-settings/i18n/content-settings.es-ES.json +1 -0
  70. package/src/shared/content-settings/components/content-settings/i18n/content-settings.fr-CA.json +1 -0
  71. package/src/shared/content-settings/components/content-settings/i18n/content-settings.fr-FR.json +1 -0
  72. package/src/shared/content-settings/components/content-settings/i18n/content-settings.json +1 -0
  73. package/src/shared/content-settings/components/content-settings/i18n/content-settings.pt-BR.json +1 -0
  74. package/src/shared/content-settings/components/content-settings/i18n/content-settings.pt-PT.json +1 -0
  75. package/src/shared/content-settings/components/items-field/ItemsField.mixin.ts +3 -3
  76. package/src/shared/content-settings/components/text-image-field/TextImageField.vue +428 -92
  77. package/src/shared/content-settings/components/text-image-field/i18n/text-image-field.de-DE.json +18 -3
  78. package/src/shared/content-settings/components/text-image-field/i18n/text-image-field.es-ES.json +18 -3
  79. package/src/shared/content-settings/components/text-image-field/i18n/text-image-field.fr-CA.json +18 -3
  80. package/src/shared/content-settings/components/text-image-field/i18n/text-image-field.fr-FR.json +18 -3
  81. package/src/shared/content-settings/components/text-image-field/i18n/text-image-field.json +18 -2
  82. package/src/shared/content-settings/components/text-image-field/i18n/text-image-field.pt-BR.json +18 -3
  83. package/src/shared/content-settings/components/text-image-field/i18n/text-image-field.pt-PT.json +18 -3
  84. package/lib/src/brand-page/components/images-section/ImagesSection.mixin.d.ts +0 -86
  85. package/lib/src/brand-page/components/images-section/ImagesSection.mixin.js +0 -149
  86. package/lib/src/brand-page/components/shapes-section/ShapesSection.mixin.d.ts +0 -62
  87. package/lib/src/brand-page/components/shapes-section/ShapesSection.mixin.js +0 -25
  88. package/lib/src/brand-page/components/text-media-section/TextMediaSection.mixin.d.ts +0 -66
  89. package/lib/src/brand-page/components/text-media-section/TextMediaSection.mixin.js +0 -90
  90. package/lib/src/shared/content-settings/components/text-image-field/TextImageField.mixin.d.ts +0 -126
  91. package/lib/src/shared/content-settings/components/text-image-field/TextImageField.mixin.js +0 -192
  92. package/src/brand-page/components/images-section/ImagesSection.mixin.ts +0 -183
  93. package/src/brand-page/components/shapes-section/ShapesSection.mixin.ts +0 -29
  94. package/src/brand-page/components/text-media-section/TextMediaSection.mixin.ts +0 -124
  95. package/src/shared/content-settings/components/text-image-field/TextImageField.mixin.ts +0 -252
@@ -6,7 +6,7 @@
6
6
  'tw-pl-0 tw-pr-0': hasNoPadding || !hasBrandSitePadding,
7
7
  'tw-rounded-md': hasRoundedCorners,
8
8
  }"
9
- :style="viewModel.backgroundStyle"
9
+ :style="viewModel.backgroundStyle as any"
10
10
  >
11
11
  <div
12
12
  :class="[
@@ -63,7 +63,9 @@
63
63
  'c_text-media--shape': isCardCenteredWithShapes,
64
64
  }"
65
65
  :style="
66
- isCardCenteredAlign && item.imageUrl ? viewModel.cardStyle : {}
66
+ isCardCenteredAlign && item.imageUrl
67
+ ? (viewModel.cardStyle as any)
68
+ : {}
67
69
  "
68
70
  >
69
71
  <div
@@ -112,6 +114,17 @@
112
114
  element="p"
113
115
  data-test-tag-image-paragraph
114
116
  />
117
+ <div
118
+ v-if="item.buttonViewModel"
119
+ class="tw-w-full tw-flex"
120
+ :class="buttonAlignClass"
121
+ >
122
+ <Button
123
+ :view-model="getbuttonViewModel(item)"
124
+ :context="context"
125
+ class="tw-w-fit"
126
+ />
127
+ </div>
115
128
  </div>
116
129
  </div>
117
130
  </div>
@@ -119,13 +132,159 @@
119
132
  </div>
120
133
  </section>
121
134
  </template>
122
- <script>
123
- import TextMediaSectionMixin from './TextMediaSection.mixin.ts';
135
+ <script setup lang="ts">
136
+ import type { PropType } from 'vue';
137
+ import { computed } from 'vue';
124
138
  import TextWrapper from '../text-wrapper/TextWrapper.vue';
139
+ import Button from '../button/Button.vue';
140
+ import type {
141
+ TextImageSectionViewModel,
142
+ ButtonViewModel,
143
+ } from '../../view-models';
144
+ import type { BrandPageContext } from '../../models';
145
+ import type { TextMediaItem } from '../../models';
146
+ import {
147
+ ALIGN_CARD_CENTER_IMAGE,
148
+ ALIGN_CENTERED,
149
+ ALIGN_LEFT_ALIGNED,
150
+ ALIGN_RIGHT_ALIGNED,
151
+ ALTERNATE_IMAGE,
152
+ MEDIA_ONLY,
153
+ } from '../../constants';
154
+ import { isHexTransparent } from '../../utils/color.util';
155
+ import { escapeContentText, getRenderText } from '../../utils';
125
156
 
126
- export default {
127
- components: { TextWrapper },
128
- mixins: [TextMediaSectionMixin],
157
+ const props = defineProps({
158
+ viewModel: {
159
+ type: Object as PropType<TextImageSectionViewModel>,
160
+ required: true,
161
+ },
162
+ context: {
163
+ type: Object as PropType<BrandPageContext>,
164
+ required: true,
165
+ },
166
+ isPreview: {
167
+ type: Boolean,
168
+ required: false,
169
+ default: false,
170
+ },
171
+ isMobileDevice: {
172
+ type: Boolean,
173
+ required: false,
174
+ default: undefined,
175
+ },
176
+ });
177
+
178
+ const items = computed(() => props.viewModel.items);
179
+
180
+ const shouldDisplayText = computed(
181
+ () => props.viewModel.displayStyle !== MEDIA_ONLY,
182
+ );
183
+
184
+ const isFullWidth = computed(
185
+ () => props.context.isBrandSite && props.viewModel.areImagesFullWidth,
186
+ );
187
+
188
+ const hasTitle = computed(() => {
189
+ const sanitizedTitle = escapeContentText(props.viewModel.title) || '';
190
+ return sanitizedTitle.length > 0;
191
+ });
192
+
193
+ const shouldHorizontalAlign = computed(() => {
194
+ return (
195
+ props.viewModel.displayStyle === ALIGN_LEFT_ALIGNED ||
196
+ props.viewModel.displayStyle === ALIGN_RIGHT_ALIGNED
197
+ );
198
+ });
199
+
200
+ const shouldCenterAlign = computed(() => {
201
+ return (
202
+ props.viewModel.displayStyle === ALIGN_CENTERED ||
203
+ props.viewModel.displayStyle === MEDIA_ONLY ||
204
+ props.viewModel.displayStyle === ALIGN_CARD_CENTER_IMAGE
205
+ );
206
+ });
207
+
208
+ const isCardCenteredAlign = computed(
209
+ () => props.viewModel.displayStyle === ALIGN_CARD_CENTER_IMAGE,
210
+ );
211
+
212
+ const isCardCenteredWithShapes = computed(() => {
213
+ return (
214
+ isCardCenteredAlign.value &&
215
+ props.viewModel.role === 'shapes-section' &&
216
+ !props.context.isTemplate &&
217
+ !props.context.isBrandSite
218
+ );
219
+ });
220
+
221
+ const isAlternateRow = computed(
222
+ () => props.viewModel.displayStyle === ALTERNATE_IMAGE,
223
+ );
224
+
225
+ const hasBackground = computed((): boolean => {
226
+ if (!props.viewModel.backgroundStyle.backgroundColor) {
227
+ return false;
228
+ }
229
+ return !isHexTransparent(props.viewModel.backgroundStyle.backgroundColor);
230
+ });
231
+
232
+ const hasNoPadding = computed(() => {
233
+ if (props.context.isBrandPageOrIsBrandContact) {
234
+ return !hasBackground.value;
235
+ }
236
+ return props.viewModel.areImagesFullWidth;
237
+ });
238
+
239
+ const hasBrandSitePadding = computed(
240
+ () => props.context.isBrandSite && !props.viewModel.areImagesFullWidth,
241
+ );
242
+
243
+ const buttonAlignClass = computed(() => {
244
+ return props.viewModel.displayStyle === ALIGN_LEFT_ALIGNED ||
245
+ props.viewModel.displayStyle === ALIGN_RIGHT_ALIGNED ||
246
+ props.viewModel.displayStyle === ALTERNATE_IMAGE
247
+ ? 'tw-justify-start'
248
+ : 'tw-justify-center';
249
+ });
250
+
251
+ const hasRoundedCorners = computed(() => {
252
+ if (props.context.isBrandPageOrIsBrandContact) {
253
+ return !props.viewModel.areImagesFullWidth;
254
+ }
255
+ return !hasNoPadding.value;
256
+ });
257
+
258
+ const shouldDisplayOnFullWidth = computed(() => !props.context.isMobile);
259
+
260
+ const hasDescription = computed(() => {
261
+ const sanitizedDescription =
262
+ escapeContentText(props.viewModel.description) || '';
263
+
264
+ return sanitizedDescription.length > 0;
265
+ });
266
+
267
+ const renderText = (paragraph: any): string => {
268
+ if (!paragraph) {
269
+ return '';
270
+ }
271
+ return getRenderText(paragraph);
272
+ };
273
+
274
+ const getbuttonViewModel = (
275
+ item: TextMediaItem & { buttonViewModel?: ButtonViewModel },
276
+ ): ButtonViewModel => {
277
+ if (!item.buttonViewModel) {
278
+ return {} as ButtonViewModel;
279
+ }
280
+
281
+ const buttonViewModel = { ...item.buttonViewModel };
282
+
283
+ buttonViewModel.buttonLinkType = item.buttonLinkType || 'url';
284
+ buttonViewModel.pageSlug = item.pageSlug || '';
285
+ buttonViewModel.url = item.url || '';
286
+
287
+ return buttonViewModel;
129
288
  };
130
289
  </script>
131
290
 
@@ -236,7 +236,7 @@ export interface ImageItem {
236
236
  mediaType?: MediaType;
237
237
  colorReplacements?: ColorReplacement[];
238
238
  size?: string;
239
- imageLink: string;
239
+ imageLink: string | false;
240
240
 
241
241
  // overrides for personalisation
242
242
  imageUrlOverride?: string;
@@ -425,9 +425,15 @@ export type MediaType = keyof typeof MEDIA_TYPES;
425
425
  export interface TextMediaItem extends ImageItem {
426
426
  title: string;
427
427
  paragraph: string;
428
- imageLink: string;
429
428
  itemsId: number;
430
429
 
430
+ buttonText?: string | false;
431
+ pageSlug?: string;
432
+ buttonLinkType?: ButtonLinkType;
433
+ url?: string;
434
+ email?: string;
435
+ tel?: string;
436
+
431
437
  // overrides for personalisation
432
438
  titleOverride?: string;
433
439
  paragraphOverride?: string;
@@ -485,6 +491,7 @@ export interface ImagesSectionContent extends Content, MediaSection {
485
491
  aspectRatio: AspectRatio;
486
492
  areImagesFullWidth: boolean;
487
493
  cardStyle: BrandPageCssStyle;
494
+ enablePopup: boolean;
488
495
  }
489
496
 
490
497
  export interface MediaSection extends Content {
@@ -497,6 +504,7 @@ export interface MediaSection extends Content {
497
504
  headingStyle: TextStyleDeclaration;
498
505
  paragraphStyle: TextStyleDeclaration;
499
506
  backgroundStyle: BrandPageCssStyle;
507
+ buttonTextStyle?: TextStyleDeclaration;
500
508
  }
501
509
 
502
510
  export interface ColorReplacement {
@@ -426,7 +426,7 @@ BrandPageModel {
426
426
  },
427
427
  },
428
428
  },
429
- "v": 5.2,
429
+ "v": 6,
430
430
  }
431
431
  `;
432
432
 
@@ -839,7 +839,7 @@ BrandPageModel {
839
839
  },
840
840
  },
841
841
  },
842
- "v": 5.2,
842
+ "v": 6,
843
843
  }
844
844
  `;
845
845
 
@@ -1259,6 +1259,6 @@ BrandPageModel {
1259
1259
  },
1260
1260
  },
1261
1261
  },
1262
- "v": 5.2,
1262
+ "v": 6,
1263
1263
  }
1264
1264
  `;
@@ -0,0 +1,64 @@
1
+ import {
2
+ type BrandPageModel,
3
+ type ImagesSectionContent,
4
+ type TextMediaItem,
5
+ } from '../..';
6
+ import { isImagesContent } from '../model.util';
7
+
8
+ export const migration06 = (brandPageModel: BrandPageModel): BrandPageModel => {
9
+ brandPageModel.pages.forEach((page) => {
10
+ page.contents.forEach((content) => {
11
+ // Migration for ImagesSection content
12
+ if (isImagesContent(content)) {
13
+ const imagesSectionContent = content as ImagesSectionContent;
14
+
15
+ // Add content-level buttonTextStyle if it doesn't exist
16
+ if (imagesSectionContent.buttonTextStyle === undefined) {
17
+ imagesSectionContent.buttonTextStyle = {};
18
+ }
19
+
20
+ // Add content-level buttonTextStyle if it doesn't exist
21
+ if (imagesSectionContent.enablePopup === undefined) {
22
+ imagesSectionContent.enablePopup = true;
23
+ }
24
+
25
+ imagesSectionContent.items?.forEach((item) => {
26
+ const mediaItem = item as TextMediaItem;
27
+
28
+ // Add buttonText if it doesn't exist
29
+ if (mediaItem.buttonText === undefined) {
30
+ mediaItem.buttonText = false;
31
+ }
32
+
33
+ // Remove item-level buttonTextStyle as it's now at content level
34
+ if ((mediaItem as any).buttonTextStyle !== undefined) {
35
+ delete (mediaItem as any).buttonTextStyle;
36
+ }
37
+
38
+ // Add button link properties if they don't exist
39
+ if (mediaItem.buttonLinkType === undefined) {
40
+ mediaItem.buttonLinkType = 'url';
41
+ }
42
+
43
+ if (mediaItem.url === undefined) {
44
+ mediaItem.url = '';
45
+ }
46
+
47
+ if (mediaItem.email === undefined) {
48
+ mediaItem.email = '';
49
+ }
50
+
51
+ if (mediaItem.tel === undefined) {
52
+ mediaItem.tel = '';
53
+ }
54
+
55
+ if (mediaItem.pageSlug === undefined) {
56
+ mediaItem.pageSlug = '';
57
+ }
58
+ });
59
+ }
60
+ });
61
+ });
62
+
63
+ return brandPageModel;
64
+ };
@@ -7,6 +7,7 @@ import { migration04 } from './migration/migration-04';
7
7
  import { migration05 } from './migration/migration-05';
8
8
  import { migration05_1 } from './migration/migration-05_1';
9
9
  import { migration05_2 } from './migration/migration-05_2';
10
+ import { migration06 } from './migration/migration-06';
10
11
 
11
12
  interface MigrationTableItem {
12
13
  version: number;
@@ -64,6 +65,11 @@ const MIGRATION_TABLE = [
64
65
  migrateFn: migration05_2,
65
66
  description: 'Migrating twitter content to x content',
66
67
  },
68
+ {
69
+ version: 6,
70
+ migrateFn: migration06,
71
+ description: 'Migrating new fields for images section',
72
+ },
67
73
  ] as MigrationTableItem[];
68
74
 
69
75
  export const GetLatestModelVersion = () =>
@@ -37,6 +37,7 @@ import type {
37
37
  ShopContent,
38
38
  SensitiveContent,
39
39
  BookingSectionContent,
40
+ TextShapeItem,
40
41
  } from '../models';
41
42
  import { ButtonStyles, SENSITIVE_CONTENT_TYPES, VIEWPORTS } from '../models';
42
43
  import {
@@ -393,10 +394,24 @@ const mapToButtonViewModel = (
393
394
  selectedButtonStyleId: styles.buttonStyles.selectedButtonStyleId,
394
395
  };
395
396
 
397
+ // Extract only text-related properties from titleStyle, excluding button styling properties
398
+ const textOnlyProperties = {
399
+ color: options.titleStyle.color,
400
+ fontFamily: options.titleStyle.fontFamily,
401
+ fontSize: options.titleStyle.fontSize,
402
+ fontWeight: options.titleStyle.fontWeight,
403
+ textAlign: options.titleStyle.textAlign,
404
+ letterSpacing: options.titleStyle.letterSpacing,
405
+ lineHeight: options.titleStyle.lineHeight || LINE_HEIGHT_HEADINGS,
406
+ textStyleType: options.titleStyle.textStyleType,
407
+ applyAutoScale: options.titleStyle.applyAutoScale,
408
+ textDecoration: options.titleStyle.textDecoration,
409
+ fontStyle: options.titleStyle.fontStyle,
410
+ };
411
+
396
412
  /* For text content text style backward compatibility */
397
413
  const titleStyle: TextStyleDeclaration = {
398
- lineHeight: LINE_HEIGHT_HEADINGS,
399
- ...options.titleStyle,
414
+ ...textOnlyProperties,
400
415
  };
401
416
 
402
417
  return applyViewModelTextStyles(
@@ -707,27 +722,55 @@ export const mapToImagesSectionViewModel = (
707
722
  styles: PageStyles,
708
723
  brandPageType: BrandPageType,
709
724
  ): TextImageSectionViewModel => {
725
+ const processedItems = content.items
726
+ .map((item, index) => ({
727
+ ...item,
728
+ itemsId: index,
729
+ }))
730
+ .filter((item) =>
731
+ content.displayStyle === ALIGN_LEFT_ALIGNED ||
732
+ content.displayStyle === ALIGN_RIGHT_ALIGNED
733
+ ? item.itemsId < MAX_IMAGES_SECTION_ALIGNMENT_ITEMS_LENGTH
734
+ : true,
735
+ )
736
+ .map((item) => ({
737
+ ...item,
738
+ buttonViewModel:
739
+ item.buttonText && typeof item.buttonText === 'string'
740
+ ? mapToButtonViewModel(
741
+ {
742
+ ...content,
743
+ clickActionField: 'url',
744
+ iconUrl: '',
745
+ modalImageUrl: '',
746
+ url: item.url,
747
+ title: item.buttonText || '',
748
+ page: item.pageSlug || '',
749
+ colorReplacements: [],
750
+ titleStyle:
751
+ content.buttonTextStyle || styles.buttonStyles.style,
752
+ },
753
+ styles,
754
+ {
755
+ titleStyle:
756
+ content.buttonTextStyle || styles.buttonStyles.style,
757
+ },
758
+ )
759
+ : undefined,
760
+ }));
761
+
710
762
  return applyViewModelTextStyles(
711
763
  {
712
764
  ...content,
713
765
  role: content.type,
714
766
  type: 'images-section',
767
+ buttonTextStyle: styles.buttonStyles.style,
715
768
  isFullWidth:
716
769
  brandPageType === BRAND_PAGE_TYPES.brandSite ||
717
770
  ((brandPageType === BRAND_PAGE_TYPES.default ||
718
771
  brandPageType === BRAND_PAGE_TYPES.brandContact) &&
719
772
  content.areImagesFullWidth),
720
- items: content.items
721
- .map((item, index) => ({
722
- ...item,
723
- itemsId: index,
724
- }))
725
- .filter((item) =>
726
- content.displayStyle === ALIGN_LEFT_ALIGNED ||
727
- content.displayStyle === ALIGN_RIGHT_ALIGNED
728
- ? item.itemsId < MAX_IMAGES_SECTION_ALIGNMENT_ITEMS_LENGTH
729
- : true,
730
- ),
773
+ items: processedItems,
731
774
  },
732
775
  styles,
733
776
  );
@@ -738,12 +781,18 @@ const mapToShapesSectionViewModel = (
738
781
  styles: PageStyles,
739
782
  brandPageType: BrandPageType,
740
783
  ): ShapesSectionViewModel => {
784
+ const processedItems: TextShapeItem[] = content.items.map((item, index) => ({
785
+ ...item,
786
+ itemsId: index,
787
+ }));
788
+
741
789
  return applyViewModelTextStyles(
742
790
  {
743
791
  ...content,
744
792
  role: content.type,
745
793
  type: 'shapes-section',
746
794
  isFullWidth: brandPageType === BRAND_PAGE_TYPES.brandSite,
795
+ items: processedItems,
747
796
  },
748
797
  styles,
749
798
  );
@@ -29,6 +29,7 @@ import type {
29
29
  PageFooterMobile,
30
30
  PageFooterDesktop,
31
31
  TextMediaItem,
32
+ TextShapeItem,
32
33
  TextStyleDeclaration,
33
34
  AspectRatio,
34
35
  LogoVariation,
@@ -113,7 +114,8 @@ export interface ProfileViewModel
113
114
 
114
115
  export interface ShapesSectionViewModel
115
116
  extends ContentViewModel,
116
- Omit<ShapesSectionContent, 'type'> {
117
+ Omit<ShapesSectionContent, 'type' | 'items'> {
118
+ items: TextShapeItem[];
117
119
  isFullWidth: boolean;
118
120
  }
119
121
 
@@ -175,15 +177,19 @@ export interface TextImageSectionViewModel {
175
177
  type: 'images-section';
176
178
  role: ContentType;
177
179
  title: string;
180
+ description: string;
178
181
  displayStyle: ImagesSectionContentDisplayStyle;
179
182
  aspectRatio: AspectRatio;
180
183
  areImagesFullWidth: boolean;
181
- items: TextMediaItem[];
184
+ enablePopup: boolean;
185
+ items: (TextMediaItem & { buttonViewModel?: ButtonViewModel })[];
182
186
  backgroundStyle: BrandPageCssStyle;
183
187
  titleStyle: TextStyleDeclaration;
188
+ descriptionStyle: TextStyleDeclaration;
184
189
  headingStyle: TextStyleDeclaration;
185
190
  paragraphStyle: TextStyleDeclaration;
186
191
  cardStyle: BrandPageCssStyle;
192
+ buttonTextStyle?: TextStyleDeclaration;
187
193
  isFullWidth: boolean;
188
194
  }
189
195
 
@@ -127,7 +127,6 @@ import {
127
127
  colorReplacementProfileVisibilityTypeAssessor,
128
128
  colorReplacementIconVisibilityTypeAssessor,
129
129
  imagesSectionCardStyleVisibilityAssessor,
130
- contactBackgroundDisplayTypeVisibilityAssessor,
131
130
  contactCardDisplayTypeVisibilityAssessor,
132
131
  imageUrlVisibilityAssessor,
133
132
  displayTypeVisibilityAssessor,
@@ -2569,6 +2568,12 @@ export const IMAGES_SECTION_SETTINGS_CONFIG =
2569
2568
  ? VARIANT_DISPLAY_MODES.custom
2570
2569
  : VARIANT_DISPLAY_MODES.none,
2571
2570
  },
2571
+ enablePopup: {
2572
+ type: 'toggle',
2573
+ label: contentSettingsTr(`enablePopupLabel`),
2574
+ defaultValue: true,
2575
+ groupId: SETTINGS_STYLE_FIELD_GROUP_IDS.style,
2576
+ },
2572
2577
  areImagesFullWidth: {
2573
2578
  type: 'toggle',
2574
2579
  label: contentSettingsTr(`fullWidthLabel`),
@@ -2587,6 +2592,7 @@ export const IMAGES_SECTION_SETTINGS_CONFIG =
2587
2592
  descriptionStyle: TEXT_MEDIA_DESCRIPTION_STYLE_FIELD(),
2588
2593
  headingStyle: TEXT_MEDIA_HEADING_STYLE_FIELD(),
2589
2594
  paragraphStyle: TEXT_MEDIA_PARAGRAPH_STYLE_FIELD(),
2595
+ buttonTextStyle: DEFAULT_BUTTON_TEXT_STYLE_FIELD(),
2590
2596
  cardStyle: {
2591
2597
  type: 'color',
2592
2598
  groupId: SETTINGS_STYLE_FIELD_GROUP_IDS.style,
@@ -560,6 +560,7 @@ export const createInitialImagesSectionContent: CreateInitialContentFunction<
560
560
  displayStyle: 'centered',
561
561
  aspectRatio: 'Default',
562
562
  areImagesFullWidth: false,
563
+ enablePopup: true,
563
564
  items: [
564
565
  {
565
566
  height: -1,
@@ -569,7 +570,7 @@ export const createInitialImagesSectionContent: CreateInitialContentFunction<
569
570
  paragraph: '',
570
571
  title: '',
571
572
  width: -1,
572
- imageLink: '',
573
+ imageLink: false,
573
574
  itemsId: -1,
574
575
  },
575
576
  ],
@@ -595,6 +596,11 @@ export const createInitialImagesSectionContent: CreateInitialContentFunction<
595
596
  textStyleType: TEXT_STYLE_TYPES.paragraphs,
596
597
  textAlign: 'center',
597
598
  },
599
+ buttonTextStyle: {
600
+ applyAutoScale: options?.brandPageType === BRAND_PAGE_TYPES.brandSite,
601
+ textStyleType: TEXT_STYLE_TYPES.buttons,
602
+ textAlign: 'center',
603
+ },
598
604
  };
599
605
  };
600
606
 
@@ -528,6 +528,7 @@
528
528
  "sendPlaceholder": "Senden",
529
529
  "formSuccessMessage": "Vielen Dank! Wir werden uns so schnell wie möglich mit Ihnen in Verbindung setzen.",
530
530
  "fullWidthLabel": "Volle Breite",
531
+ "enablePopupLabel": "Bilder in einem Pop-up öffnen",
531
532
  "autoplayLabel": "Autoplay",
532
533
  "muteLabel": "Stumm",
533
534
  "headingStyleLabel": "Überschriftstil",
@@ -643,14 +644,29 @@
643
644
  "shapeColor": "Formfarbe",
644
645
  "imageCaptionPlaceholder": "Bildunterschrift hinzufügen",
645
646
  "imageLink": "Bildlink",
646
- "imageCaption": "Bildunterschrift",
647
+ "imageCaption": "Bild-Popup-Beschriftung",
648
+ "imageCaptionSub": "Diese Bildunterschrift erscheint nur im Bild-Pop-up",
647
649
  "addTitlePlaceholder": "Titel hinzufügen",
648
650
  "title": "Titel",
649
651
  "addParagraphPlaceholder": "Absatz hinzufügen",
650
652
  "paragraph": "Absatz",
651
653
  "addItemLabel": "Artikel hinzufügen",
652
654
  "image": "Bild",
653
- "shape": "Form"
655
+ "shape": "Form",
656
+ "none": "Keine",
657
+ "popup": "Pop-up",
658
+ "openLink": "Link öffnen",
659
+ "imageBehaviour": "Bildverhalten",
660
+ "button": "Schaltfläche",
661
+ "buttonText": "Schaltflächentext",
662
+ "getStarted": "Los geht’s",
663
+ "buttonLink": "Schaltflächen-Link",
664
+ "url": "URL",
665
+ "email": "E-Mail-Adresse",
666
+ "telephone": "Telefonnummer",
667
+ "buttonTextStyleLabel": "Schaltflächentextstil",
668
+ "selectPage": "Eine Seite auswählen",
669
+ "page": "Seite"
654
670
  },
655
671
  "textItemsField": {
656
672
  "fontSettings": "Schriftart-Einstellungen",
@@ -528,6 +528,7 @@
528
528
  "sendPlaceholder": "Enviar",
529
529
  "formSuccessMessage": "¡Gracias! Nos pondremos en contacto contigo lo antes posible.",
530
530
  "fullWidthLabel": "Ancho total",
531
+ "enablePopupLabel": "Abre imágenes en una ventana emergente",
531
532
  "autoplayLabel": "Reproducción automática",
532
533
  "muteLabel": "Silenciar",
533
534
  "headingStyleLabel": "Estilo de encabezado",
@@ -643,14 +644,29 @@
643
644
  "shapeColor": "Color de forma",
644
645
  "imageCaptionPlaceholder": "Añade pie de foto",
645
646
  "imageLink": "Enlace de imagen",
646
- "imageCaption": "Pie de imagen",
647
+ "imageCaption": "Pie de foto en ventana emergente",
648
+ "imageCaptionSub": "Este pie de foto solo aparece en la ventana emergente de la imagen",
647
649
  "addTitlePlaceholder": "Añadir título",
648
650
  "title": "Título",
649
651
  "addParagraphPlaceholder": "Añadir párrafo",
650
652
  "paragraph": "Párrafo",
651
653
  "addItemLabel": "Añadir artículo",
652
654
  "image": "Imagen",
653
- "shape": "Forma"
655
+ "shape": "Forma",
656
+ "none": "Ninguno",
657
+ "popup": "Ventana emergente",
658
+ "openLink": "Abrir enlace",
659
+ "imageBehaviour": "Comportamiento de la imagen",
660
+ "button": "Botón",
661
+ "buttonText": "Texto del botón",
662
+ "getStarted": "Comienza",
663
+ "buttonLink": "Enlace de botón",
664
+ "url": "URL",
665
+ "email": "Dirección de correo electrónico",
666
+ "telephone": "Número de teléfono",
667
+ "buttonTextStyleLabel": "Estilo del texto del botón",
668
+ "selectPage": "Selecciona una página",
669
+ "page": "Página"
654
670
  },
655
671
  "textItemsField": {
656
672
  "fontSettings": "Configuración de fuentes",
@@ -528,6 +528,7 @@
528
528
  "sendPlaceholder": "Envoyer",
529
529
  "formSuccessMessage": "Merci ! Nous vous contacterons dès que possible.",
530
530
  "fullWidthLabel": "Pleine largeur",
531
+ "enablePopupLabel": "Ouvrir des images dans une fenêtre contextuelle",
531
532
  "autoplayLabel": "Lecture automatique",
532
533
  "muteLabel": "Muet",
533
534
  "headingStyleLabel": "Style de titre",
@@ -643,14 +644,29 @@
643
644
  "shapeColor": "Couleur de forme",
644
645
  "imageCaptionPlaceholder": "Ajouter une légende d'image",
645
646
  "imageLink": "Lien d'image",
646
- "imageCaption": "Légende d'image",
647
+ "imageCaption": "Légende de l’image contextuelle",
648
+ "imageCaptionSub": "Cette légende n'apparaît que dans la fenêtre contextuelle de l'image",
647
649
  "addTitlePlaceholder": "Ajouter un titre",
648
650
  "title": "Titre",
649
651
  "addParagraphPlaceholder": "Ajouter un paragraphe",
650
652
  "paragraph": "Paragraphe",
651
653
  "addItemLabel": "Ajouter un élément",
652
654
  "image": "Image",
653
- "shape": "Forme"
655
+ "shape": "Forme",
656
+ "none": "Aucune",
657
+ "popup": "Fenêtre contextuelle",
658
+ "openLink": "Ouvrir le lien",
659
+ "imageBehaviour": "Comportement de l’image",
660
+ "button": "Bouton",
661
+ "buttonText": "Texte du bouton",
662
+ "getStarted": "Commencez",
663
+ "buttonLink": "Lien de bouton",
664
+ "url": "Url",
665
+ "email": "Adresse courriel",
666
+ "telephone": "Numéro de téléphone",
667
+ "buttonTextStyleLabel": "Style de texte des boutons",
668
+ "selectPage": "Sélectionnez une page",
669
+ "page": "Page"
654
670
  },
655
671
  "textItemsField": {
656
672
  "fontSettings": "Paramètres de police",