@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
@@ -4,13 +4,28 @@
4
4
  "shapeColor" : "Couleur de forme",
5
5
  "imageCaptionPlaceholder" : "Ajouter une légende d'image",
6
6
  "imageLink" : "Lien d'image",
7
- "imageCaption" : "Légende d'image",
7
+ "imageCaption" : "Légende du pop-up des images",
8
+ "imageCaptionSub" : "Cette légende n'apparaît que dans le pop-up des images",
8
9
  "addTitlePlaceholder" : "Ajouter un titre",
9
10
  "title" : "Titre",
10
11
  "addParagraphPlaceholder" : "Ajouter un paragraphe",
11
12
  "paragraph" : "Paragraphe",
12
13
  "addItemLabel" : "Ajouter un élément",
13
14
  "image" : "Image",
14
- "shape" : "Forme"
15
+ "shape" : "Forme",
16
+ "none" : "Aucune",
17
+ "popup" : "Pop-up",
18
+ "openLink" : "Ouvrir le lien",
19
+ "imageBehaviour" : "Comportement de l’image",
20
+ "button" : "Bouton",
21
+ "buttonText" : "Texte du bouton",
22
+ "getStarted" : "Commencez",
23
+ "buttonLink" : "Lien de bouton",
24
+ "url" : "Url",
25
+ "email" : "Adresse e-mail",
26
+ "telephone" : "Numéro de téléphone",
27
+ "buttonTextStyleLabel" : "Style de texte des boutons",
28
+ "selectPage" : "Sélectionnez une page",
29
+ "page" : "Page"
15
30
  }
16
- }
31
+ }
@@ -4,13 +4,29 @@
4
4
  "shapeColor": "Shape Color",
5
5
  "imageCaptionPlaceholder": "Add image caption",
6
6
  "imageLink": "Image link",
7
- "imageCaption": "Image caption",
7
+ "imageCaption": "Image pop-up caption",
8
+ "imageCaptionSub": "This caption only appears in the image pop-up",
8
9
  "addTitlePlaceholder": "Add title",
9
10
  "title": "Title",
10
11
  "addParagraphPlaceholder": "Add paragraph",
11
12
  "paragraph": "Paragraph",
12
13
  "addItemLabel": "Add Item",
13
14
  "image": "Image",
14
- "shape": "Shape"
15
+ "shape": "Shape",
16
+ "none": "None",
17
+ "popup": "Pop-up",
18
+ "openLink": "Open Link",
19
+ "imageBehaviour": "Image behaviour",
20
+ "button": "Button",
21
+ "buttonText": "Button text",
22
+ "getStarted": "Get Started",
23
+ "buttonLink": "Button Link",
24
+ "url": "Url",
25
+ "email": "Email Address",
26
+ "telephone": "Phone Number",
27
+ "buttonTextStyleLabel": "Button text Style",
28
+ "selectPage": "Select a page",
29
+ "page": "Page"
15
30
  }
16
31
  }
32
+
@@ -4,13 +4,28 @@
4
4
  "shapeColor" : "Cor da forma",
5
5
  "imageCaptionPlaceholder" : "Adicionar legenda à imagem",
6
6
  "imageLink" : "Link da imagem",
7
- "imageCaption" : "Legenda da imagem",
7
+ "imageCaption" : "Legenda da imagem pop-up",
8
+ "imageCaptionSub" : "Esta legenda só aparece no pop-up da imagem",
8
9
  "addTitlePlaceholder" : "Adicionar título",
9
10
  "title" : "Título",
10
11
  "addParagraphPlaceholder" : "Adicionar parágrafo",
11
12
  "paragraph" : "Parágrafo",
12
13
  "addItemLabel" : "Adicionar item",
13
14
  "image" : "Imagem",
14
- "shape" : "Forma"
15
+ "shape" : "Forma",
16
+ "none" : "Nenhum",
17
+ "popup" : "Pop-up",
18
+ "openLink" : "Abrir link",
19
+ "imageBehaviour" : "Comportamento da imagem",
20
+ "button" : "Botão",
21
+ "buttonText" : "Texto do botão",
22
+ "getStarted" : "Começar",
23
+ "buttonLink" : "Link do botão",
24
+ "url" : "URL",
25
+ "email" : "Endereço de e-mail",
26
+ "telephone" : "Número de telefone",
27
+ "buttonTextStyleLabel" : "Estilo do texto do botão",
28
+ "selectPage" : "Selecione uma página",
29
+ "page" : "Página"
15
30
  }
16
- }
31
+ }
@@ -4,13 +4,28 @@
4
4
  "shapeColor" : "Cor da Forma",
5
5
  "imageCaptionPlaceholder" : "Incluir legenda da imagem",
6
6
  "imageLink" : "Link da imagem",
7
- "imageCaption" : "Legenda da imagem",
7
+ "imageCaption" : "Legenda pop-up da imagem",
8
+ "imageCaptionSub" : "Esta legenda só aparece no pop-up da imagem",
8
9
  "addTitlePlaceholder" : "Adicionar título",
9
10
  "title" : "Título",
10
11
  "addParagraphPlaceholder" : "Adicionar parágrafo",
11
12
  "paragraph" : "Parágrafo",
12
13
  "addItemLabel" : "Adicionar Item",
13
14
  "image" : "Imagem",
14
- "shape" : "Forma"
15
+ "shape" : "Forma",
16
+ "none" : "Nenhum",
17
+ "popup" : "Pop-up",
18
+ "openLink" : "Abrir link",
19
+ "imageBehaviour" : "Comportamento da imagem",
20
+ "button" : "Botão",
21
+ "buttonText" : "Texto do botão",
22
+ "getStarted" : "Comece",
23
+ "buttonLink" : "Link de botão",
24
+ "url" : "URL",
25
+ "email" : "Endereço de email",
26
+ "telephone" : "Número de telefone",
27
+ "buttonTextStyleLabel" : "Estilo do texto do botão",
28
+ "selectPage" : "Selecione uma página",
29
+ "page" : "Página"
15
30
  }
16
- }
31
+ }
@@ -1,86 +0,0 @@
1
- import type { PropType } from 'vue';
2
- import type { ImageViewModel, TextImageSectionViewModel } from '../../view-models';
3
- import type { BrandPageContext, ImageItem, TextMediaItem } from '../../models';
4
- declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
5
- viewModel: {
6
- type: PropType<TextImageSectionViewModel>;
7
- required: true;
8
- };
9
- context: {
10
- type: PropType<BrandPageContext>;
11
- required: true;
12
- };
13
- contentIndex: {
14
- type: NumberConstructor;
15
- required: false;
16
- default: undefined;
17
- };
18
- }>, {}, {
19
- imageModalSelectedImageIndex: number | undefined;
20
- imagesBroken: {};
21
- height: number;
22
- width: number;
23
- }, {
24
- textAlignClass(): "tw-items-center" | "tw-items-start";
25
- imgStyles(): BrandPageCssStyle;
26
- placeHolderStyles(): BrandPageCssStyle;
27
- images(): ImageItem[];
28
- isPreview(): boolean;
29
- shouldLimitHeight(): boolean;
30
- shouldLimitHeightForPlaceHolder(): boolean;
31
- hasAspectRatio(): boolean;
32
- itemImageAltText(): (item: TextMediaItem) => string;
33
- imageViewModel(): ImageViewModel | undefined;
34
- shouldRenderImage(): boolean;
35
- hasBottomMargin(): boolean;
36
- showDisplayImageInFullWidth(): boolean;
37
- }, {
38
- onSelectImage(item: ImageItem): void;
39
- onImageModalClose(): void;
40
- onImageError(index: number): void;
41
- hasImageError(index: number): any;
42
- resetImageBrokenList(): void;
43
- showPlaceholder(item: TextMediaItem): any;
44
- }, import("vue").DefineComponent<import("vue").ExtractPropTypes<{
45
- isPreview: {
46
- type: BooleanConstructor;
47
- required: false;
48
- default: boolean;
49
- };
50
- isMobileDevice: {
51
- type: BooleanConstructor;
52
- required: false;
53
- default: undefined;
54
- };
55
- }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
56
- isPreview: {
57
- type: BooleanConstructor;
58
- required: false;
59
- default: boolean;
60
- };
61
- isMobileDevice: {
62
- type: BooleanConstructor;
63
- required: false;
64
- default: undefined;
65
- };
66
- }>> & Readonly<{}>, {
67
- isPreview: boolean;
68
- isMobileDevice: boolean;
69
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
70
- viewModel: {
71
- type: PropType<TextImageSectionViewModel>;
72
- required: true;
73
- };
74
- context: {
75
- type: PropType<BrandPageContext>;
76
- required: true;
77
- };
78
- contentIndex: {
79
- type: NumberConstructor;
80
- required: false;
81
- default: undefined;
82
- };
83
- }>> & Readonly<{}>, {
84
- contentIndex: number;
85
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
86
- export default _default;
@@ -1,149 +0,0 @@
1
- import { defineComponent } from 'vue';
2
- import ComponentCommonMixin from '../mixins/component-common.mixin';
3
- import { ASPECT_RATIOS } from '../../models';
4
- import { ALIGN_CENTERED, MEDIA_ONLY } from '../../constants';
5
- import { getImageAltText, getImagesSectionAspectRatioByDisplayStyle, } from '../../utils';
6
- import isURL from 'validator/lib/isURL';
7
- const DEFAULT_CENTERED_ASPECT_RATIO = '2/1';
8
- export default defineComponent({
9
- mixins: [ComponentCommonMixin],
10
- props: {
11
- viewModel: {
12
- type: Object,
13
- required: true,
14
- },
15
- context: {
16
- type: Object,
17
- required: true,
18
- },
19
- contentIndex: {
20
- type: Number,
21
- required: false,
22
- default: undefined,
23
- },
24
- },
25
- data() {
26
- return {
27
- imageModalSelectedImageIndex: undefined,
28
- imagesBroken: {},
29
- height: 0,
30
- width: 0,
31
- };
32
- },
33
- watch: {
34
- viewModel: {
35
- handler(newVal, oldVal) {
36
- if (newVal.items !== oldVal.items) {
37
- this.resetImageBrokenList();
38
- }
39
- },
40
- deep: true,
41
- },
42
- },
43
- computed: {
44
- textAlignClass() {
45
- return this.viewModel.displayStyle === ALIGN_CENTERED
46
- ? 'tw-items-center'
47
- : 'tw-items-start';
48
- },
49
- imgStyles() {
50
- return getImagesSectionAspectRatioByDisplayStyle(this.viewModel.items.length, this.viewModel.displayStyle, this.viewModel.aspectRatio);
51
- },
52
- placeHolderStyles() {
53
- const aspectRatio = ASPECT_RATIOS[this.viewModel.aspectRatio];
54
- if (aspectRatio) {
55
- if (this.viewModel.aspectRatio === 'circle') {
56
- return {
57
- aspectRatio: '1/1',
58
- borderRadius: aspectRatio,
59
- overflow: 'hidden',
60
- };
61
- }
62
- else {
63
- return {
64
- aspectRatio: aspectRatio,
65
- };
66
- }
67
- }
68
- else {
69
- return {
70
- aspectRatio: DEFAULT_CENTERED_ASPECT_RATIO,
71
- };
72
- }
73
- },
74
- images() {
75
- return this.viewModel.items || [];
76
- },
77
- isPreview() {
78
- return this.context.isPreview;
79
- },
80
- shouldLimitHeight() {
81
- return (this.viewModel.displayStyle === MEDIA_ONLY &&
82
- this.viewModel.items.length === 1);
83
- },
84
- shouldLimitHeightForPlaceHolder() {
85
- return this.viewModel.items.length === 1;
86
- },
87
- hasAspectRatio() {
88
- return ASPECT_RATIOS[this.viewModel.aspectRatio] !== '';
89
- },
90
- itemImageAltText() {
91
- return (item) => getImageAltText(item, this.context);
92
- },
93
- imageViewModel() {
94
- const image = this.images[0];
95
- if (!image) {
96
- return;
97
- }
98
- return {
99
- id: this.viewModel.id,
100
- type: 'image',
101
- role: 'image',
102
- imageUrl: image.imageUrl,
103
- imageTitle: image.imageTitle,
104
- isFullWidth: this.viewModel.areImagesFullWidth,
105
- aspectRatio: this.viewModel.aspectRatio,
106
- height: image.height,
107
- width: image.width,
108
- };
109
- },
110
- shouldRenderImage() {
111
- return (this.context.isBrandPageOrIsBrandContact &&
112
- this.images.length === 1 &&
113
- this.viewModel.displayStyle === MEDIA_ONLY);
114
- },
115
- hasBottomMargin() {
116
- return this.context.isBrandPageOrIsBrandContact;
117
- },
118
- showDisplayImageInFullWidth() {
119
- return this.images.length == 1 || !this.shouldLimitHeight;
120
- },
121
- },
122
- methods: {
123
- onSelectImage(item) {
124
- if (item.imageLink && isURL(item.imageLink)) {
125
- window.open(item.imageLink, '_blank');
126
- }
127
- else {
128
- const index = this.images.findIndex((i) => i.imageUrl === item.imageUrl);
129
- this.imageModalSelectedImageIndex = index;
130
- }
131
- },
132
- onImageModalClose() {
133
- this.imageModalSelectedImageIndex = undefined;
134
- },
135
- onImageError(index) {
136
- this.imagesBroken[index] = true;
137
- },
138
- hasImageError(index) {
139
- return this.imagesBroken[index] || false;
140
- },
141
- resetImageBrokenList() {
142
- this.imagesBroken = {};
143
- },
144
- showPlaceholder(item) {
145
- return (this.context.isPreview &&
146
- (!item.imageUrl || this.hasImageError(item.itemsId)));
147
- },
148
- },
149
- });
@@ -1,62 +0,0 @@
1
- import type { PropType } from 'vue';
2
- import type { TextImageSectionViewModel } from '../../view-models';
3
- import type { BrandPageContext } from '../../models';
4
- declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
5
- viewModel: {
6
- type: PropType<TextImageSectionViewModel>;
7
- required: true;
8
- };
9
- context: {
10
- type: PropType<BrandPageContext>;
11
- required: true;
12
- };
13
- contentIndex: {
14
- type: NumberConstructor;
15
- required: false;
16
- default: undefined;
17
- };
18
- }>, {}, {
19
- imageModalSelectedImageIndex: number | undefined;
20
- }, {}, {}, import("vue").DefineComponent<import("vue").ExtractPropTypes<{
21
- isPreview: {
22
- type: BooleanConstructor;
23
- required: false;
24
- default: boolean;
25
- };
26
- isMobileDevice: {
27
- type: BooleanConstructor;
28
- required: false;
29
- default: undefined;
30
- };
31
- }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
32
- isPreview: {
33
- type: BooleanConstructor;
34
- required: false;
35
- default: boolean;
36
- };
37
- isMobileDevice: {
38
- type: BooleanConstructor;
39
- required: false;
40
- default: undefined;
41
- };
42
- }>> & Readonly<{}>, {
43
- isPreview: boolean;
44
- isMobileDevice: boolean;
45
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
46
- viewModel: {
47
- type: PropType<TextImageSectionViewModel>;
48
- required: true;
49
- };
50
- context: {
51
- type: PropType<BrandPageContext>;
52
- required: true;
53
- };
54
- contentIndex: {
55
- type: NumberConstructor;
56
- required: false;
57
- default: undefined;
58
- };
59
- }>> & Readonly<{}>, {
60
- contentIndex: number;
61
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
62
- export default _default;
@@ -1,25 +0,0 @@
1
- import { defineComponent } from 'vue';
2
- import ComponentCommonMixin from '../mixins/component-common.mixin';
3
- export default defineComponent({
4
- mixins: [ComponentCommonMixin],
5
- props: {
6
- viewModel: {
7
- type: Object,
8
- required: true,
9
- },
10
- context: {
11
- type: Object,
12
- required: true,
13
- },
14
- contentIndex: {
15
- type: Number,
16
- required: false,
17
- default: undefined,
18
- },
19
- },
20
- data() {
21
- return {
22
- imageModalSelectedImageIndex: undefined,
23
- };
24
- },
25
- });
@@ -1,66 +0,0 @@
1
- import type { PropType } from 'vue';
2
- import type { TextImageSectionViewModel } from '../../view-models';
3
- import type { BrandPageContext } from '../../models';
4
- declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
5
- viewModel: {
6
- type: PropType<TextImageSectionViewModel>;
7
- required: true;
8
- };
9
- context: {
10
- type: PropType<BrandPageContext>;
11
- required: true;
12
- };
13
- }>, {}, {}, {
14
- items(): any;
15
- shouldDisplayText(): boolean;
16
- isFullWidth(): any;
17
- hasTitle(): boolean;
18
- hasDescription(): boolean;
19
- shouldHorizontalAlign(): boolean;
20
- shouldCenterAlign(): boolean;
21
- isCardCenteredAlign(): boolean;
22
- isCardCenteredWithShapes(): any;
23
- isAlternateRow(): boolean;
24
- hasBackground(): boolean;
25
- hasNoPadding(): any;
26
- hasBrandSitePadding(): any;
27
- hasRoundedCorners(): boolean;
28
- shouldDisplayOnFullWidth(): boolean;
29
- }, {
30
- renderText(paragraph: any): string;
31
- }, import("vue").DefineComponent<import("vue").ExtractPropTypes<{
32
- isPreview: {
33
- type: BooleanConstructor;
34
- required: false;
35
- default: boolean;
36
- };
37
- isMobileDevice: {
38
- type: BooleanConstructor;
39
- required: false;
40
- default: undefined;
41
- };
42
- }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
43
- isPreview: {
44
- type: BooleanConstructor;
45
- required: false;
46
- default: boolean;
47
- };
48
- isMobileDevice: {
49
- type: BooleanConstructor;
50
- required: false;
51
- default: undefined;
52
- };
53
- }>> & Readonly<{}>, {
54
- isPreview: boolean;
55
- isMobileDevice: boolean;
56
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
57
- viewModel: {
58
- type: PropType<TextImageSectionViewModel>;
59
- required: true;
60
- };
61
- context: {
62
- type: PropType<BrandPageContext>;
63
- required: true;
64
- };
65
- }>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
66
- export default _default;
@@ -1,90 +0,0 @@
1
- import { defineComponent } from 'vue';
2
- import ComponentCommonMixin from '../mixins/component-common.mixin';
3
- import { ALIGN_CARD_CENTER_IMAGE, ALIGN_CENTERED, ALIGN_LEFT_ALIGNED, ALIGN_RIGHT_ALIGNED, ALTERNATE_IMAGE, MEDIA_ONLY, } from '../../constants';
4
- import { isHexTransparent } from '../../utils/color.util';
5
- import { escapeContentText, getRenderText } from '../../utils';
6
- export default defineComponent({
7
- mixins: [ComponentCommonMixin],
8
- props: {
9
- viewModel: {
10
- type: Object,
11
- required: true,
12
- },
13
- context: {
14
- type: Object,
15
- required: true,
16
- },
17
- },
18
- computed: {
19
- items() {
20
- return this.viewModel.items;
21
- },
22
- shouldDisplayText() {
23
- return this.viewModel.displayStyle !== MEDIA_ONLY;
24
- },
25
- isFullWidth() {
26
- return this.context.isBrandSite && this.viewModel.areImagesFullWidth;
27
- },
28
- hasTitle() {
29
- const sanitizedTitle = escapeContentText(this.viewModel.title) || '';
30
- return sanitizedTitle.length > 0;
31
- },
32
- hasDescription() {
33
- const sanitizedDescription = escapeContentText(this.viewModel.description) || '';
34
- return sanitizedDescription.length > 0;
35
- },
36
- shouldHorizontalAlign() {
37
- return (this.viewModel.displayStyle === ALIGN_LEFT_ALIGNED ||
38
- this.viewModel.displayStyle === ALIGN_RIGHT_ALIGNED);
39
- },
40
- shouldCenterAlign() {
41
- return (this.viewModel.displayStyle === ALIGN_CENTERED ||
42
- this.viewModel.displayStyle === MEDIA_ONLY ||
43
- this.viewModel.displayStyle === ALIGN_CARD_CENTER_IMAGE);
44
- },
45
- isCardCenteredAlign() {
46
- return this.viewModel.displayStyle === ALIGN_CARD_CENTER_IMAGE;
47
- },
48
- isCardCenteredWithShapes() {
49
- return (this.isCardCenteredAlign &&
50
- this.viewModel.role === 'shapes-section' &&
51
- !this.context.isTemplate &&
52
- !this.context.isBrandSite);
53
- },
54
- isAlternateRow() {
55
- return this.viewModel.displayStyle === ALTERNATE_IMAGE;
56
- },
57
- hasBackground() {
58
- if (!this.viewModel.backgroundStyle.backgroundColor) {
59
- return false;
60
- }
61
- return !isHexTransparent(this.viewModel.backgroundStyle.backgroundColor);
62
- },
63
- hasNoPadding() {
64
- if (this.context.isBrandPageOrIsBrandContact) {
65
- return !this.hasBackground;
66
- }
67
- return this.viewModel.areImagesFullWidth;
68
- },
69
- hasBrandSitePadding() {
70
- return this.context.isBrandSite && !this.viewModel.areImagesFullWidth;
71
- },
72
- hasRoundedCorners() {
73
- if (this.context.isBrandPageOrIsBrandContact) {
74
- return !this.viewModel.areImagesFullWidth;
75
- }
76
- return !this.hasNoPadding;
77
- },
78
- shouldDisplayOnFullWidth() {
79
- return !this.context.isMobile;
80
- },
81
- },
82
- methods: {
83
- renderText(paragraph) {
84
- if (!paragraph) {
85
- return '';
86
- }
87
- return getRenderText(paragraph);
88
- },
89
- },
90
- });