@designcrowd/library.brand-page 5.18.1 → 5.18.2-ast-padding-1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/src/{CreatedOnBrandCrowd-de-de-DFpjIAUv.js → CreatedOnBrandCrowd-de-de-GFYl8DtL.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-en-us-BapIT2xO.js → CreatedOnBrandCrowd-en-us-D5CcXf2I.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-es-es-DaSf3Dt6.js → CreatedOnBrandCrowd-es-es-Cr7J3ooe.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-fr-fr-Cvgei7yn.js → CreatedOnBrandCrowd-fr-ca-BC1NFFIW.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-fr-ca-Cvgei7yn.js → CreatedOnBrandCrowd-fr-fr-BC1NFFIW.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-pt-pt-Duxd2NmR.js → CreatedOnBrandCrowd-pt-br-BdiCcpwi.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-pt-br-Duxd2NmR.js → CreatedOnBrandCrowd-pt-pt-BdiCcpwi.js} +1 -1
- package/lib/src/{CreatedOnDcom-de-de-DXwNbruv.js → CreatedOnDcom-de-de-d4TmC_lo.js} +1 -1
- package/lib/src/{CreatedOnDcom-en-us-CkNGwN-p.js → CreatedOnDcom-en-us-DlvLEF-R.js} +1 -1
- package/lib/src/{CreatedOnDcom-es-es-Csyf5yhI.js → CreatedOnDcom-es-es-BulpVp3k.js} +1 -1
- package/lib/src/{CreatedOnDcom-fr-ca-GOIUmIdy.js → CreatedOnDcom-fr-ca-M4xqunZe.js} +1 -1
- package/lib/src/{CreatedOnDcom-fr-fr-DF63cL2a.js → CreatedOnDcom-fr-fr-BFqUXgzb.js} +1 -1
- package/lib/src/{CreatedOnDcom-pt-br-Ct6FWj7D.js → CreatedOnDcom-pt-br-CUVcVkV2.js} +1 -1
- package/lib/src/{CreatedOnDcom-pt-pt-D22yb8Ci.js → CreatedOnDcom-pt-pt-Dc4CZ4xW.js} +1 -1
- package/lib/src/brand-page/components/contact-form/ContactForm.mixin.d.ts +4 -0
- package/lib/src/brand-page/components/contact-form/ContactForm.mixin.js +8 -4
- package/lib/src/brand-page/components/image-gallery/ImageGallery.mixin.d.ts +4 -0
- package/lib/src/brand-page/components/image-gallery/ImageGallery.mixin.js +4 -0
- package/lib/src/brand-page/components/mailing-list/MailingList.mixin.d.ts +4 -0
- package/lib/src/brand-page/components/mailing-list/MailingList.mixin.js +4 -1
- package/lib/src/brand-page/components/page/Page.mixin.d.ts +1 -1
- package/lib/src/brand-page/components/page/PageComponent.mixin.d.ts +1 -1
- package/lib/src/brand-page/components/payment/request-payment/RequestPayment.mixin.d.ts +4 -0
- package/lib/src/brand-page/components/payment/request-payment/RequestPayment.mixin.js +4 -0
- package/lib/src/brand-page/components/payment/support-me/SupportMe.mixin.d.ts +4 -0
- package/lib/src/brand-page/components/payment/support-me/SupportMe.mixin.js +4 -1
- package/lib/src/brand-page/components/video/Video.mixin.d.ts +4 -0
- package/lib/src/brand-page/components/video/Video.mixin.js +4 -0
- package/lib/src/brand-page/constants/misc.constants.d.ts +17 -0
- package/lib/src/brand-page/constants/misc.constants.js +25 -0
- package/lib/src/brand-page/models/content.model.d.ts +2 -0
- package/lib/src/brand-page/utils/content-padding.util.d.ts +13 -0
- package/lib/src/brand-page/utils/content-padding.util.js +10 -0
- package/lib/src/brand-page/utils/index.d.ts +1 -0
- package/lib/src/brand-page/utils/index.js +1 -0
- package/lib/src/brand-page/utils/migration/migration-16.d.ts +2 -0
- package/lib/src/brand-page/utils/migration/migration-16.js +37 -0
- package/lib/src/brand-page/utils/migration.util.js +6 -0
- package/lib/src/brand-page-maker/components/admin-logo-settings/AdminLogoSettings.mixin.d.ts +2 -0
- package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.d.ts +12 -0
- package/lib/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.d.ts +15 -1
- package/lib/src/brand-page-maker/constants/config-settings-constant.js +34 -0
- package/lib/src/brand-page-maker/convertors/banner-align-display-style.convertor.js +56 -2
- package/lib/src/brand-page-maker/convertors/contact-layout-style.convertor.js +6 -1
- package/lib/src/brand-page-maker/models/content-settings.js +30 -2
- package/lib/src/brand-page-maker/stores/ai-checkpoint/ai-checkpoint-store.d.ts +12 -0
- package/lib/src/{bundled-translations-CnareLWC.js → bundled-translations-DYd5oFZv.js} +1 -1
- package/lib/src/bundles/bundled-translations.json +2 -0
- package/lib/src/css/library.brand-page-brandCrowd.min.css +152 -140
- package/lib/src/css/library.brand-page-brandPage.min.css +153 -140
- package/lib/src/css/library.brand-page-designCom.min.css +152 -140
- package/lib/src/css/library.brand-page-preview.min.css +152 -140
- package/lib/src/index.mjs +1 -1
- package/lib/src/{lib-_iwoSD1Z.js → lib-CRihSxY0.js} +20195 -19572
- package/lib/src/shared/content-settings/components/content-settings/ContentSettings.mixin.d.ts +14 -0
- package/lib/src/shared/content-settings/components/content-settings/ReplaceImageSettingsForContent.mixin.d.ts +14 -0
- package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItem.mixin.d.ts +12 -0
- package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItemField.mixin.d.ts +12 -0
- package/lib/src/shared/content-settings/components/focused-content-item-settings/FocusedContentItemSettings.mixin.d.ts +12 -0
- package/lib/src/shared/content-settings/components/slider-field/SliderField.mixin.js +9 -0
- package/lib/src/shared/content-settings/store/content-settings-store.d.ts +12 -0
- package/lib/src/shared/page-settings/components/page-settings/PageSettings.mixin.d.ts +16 -0
- package/lib/src/shared/page-settings/components/page-settings-section-styles/PageSettingsSectionStyles.mixin.d.ts +14 -0
- package/lib/src/utils/minify-brand-page-metadata.js +11 -1
- package/package.json +2 -2
- package/src/brand-page/components/banner-section/BannerSection.vue +360 -12
- package/src/brand-page/components/banner-section/BannerSection.vue.test.ts +201 -0
- package/src/brand-page/components/booking-section/BookingSection.vue +11 -3
- package/src/brand-page/components/contact-form/ContactForm.mixin.ts +12 -6
- package/src/brand-page/components/contact-form/ContactForm.vue +115 -118
- package/src/brand-page/components/image-gallery/ImageGallery.mixin.ts +5 -0
- package/src/brand-page/components/image-gallery/ImageGallery.vue +1 -1
- package/src/brand-page/components/mailing-list/MailingList.mixin.ts +8 -1
- package/src/brand-page/components/mailing-list/MailingList.vue +1 -1
- package/src/brand-page/components/map/Map.vue +5 -1
- package/src/brand-page/components/payment/request-payment/RequestPayment.mixin.ts +5 -0
- package/src/brand-page/components/payment/request-payment/RequestPayment.vue +1 -0
- package/src/brand-page/components/payment/support-me/SupportMe.mixin.ts +8 -1
- package/src/brand-page/components/payment/support-me/SupportMe.vue +1 -0
- package/src/brand-page/components/placeholder/Placeholder.vue +39 -100
- package/src/brand-page/components/social-links/SocialLinks.vue +7 -3
- package/src/brand-page/components/text/Text.vue +12 -5
- package/src/brand-page/components/text-media-section/TextMediaSection.vue +11 -3
- package/src/brand-page/components/video/Video.mixin.ts +5 -0
- package/src/brand-page/components/video/Video.vue +1 -1
- package/src/brand-page/constants/misc.constants.ts +26 -0
- package/src/brand-page/models/content.model.ts +2 -0
- package/src/brand-page/utils/__snapshots__/migration.util.test.ts.snap +7 -3
- package/src/brand-page/utils/content-padding.util.test.ts +29 -0
- package/src/brand-page/utils/content-padding.util.ts +13 -0
- package/src/brand-page/utils/index.ts +1 -0
- package/src/brand-page/utils/migration/migration-16.ts +51 -0
- package/src/brand-page/utils/migration.util.test.ts +64 -0
- package/src/brand-page/utils/migration.util.ts +7 -0
- package/src/brand-page-maker/constants/config-settings-constant.ts +40 -0
- package/src/brand-page-maker/convertors/banner-align-display-style.convertor.ts +61 -1
- package/src/brand-page-maker/convertors/contact-layout-style.convertor.test.ts +50 -0
- package/src/brand-page-maker/convertors/contact-layout-style.convertor.ts +8 -0
- package/src/brand-page-maker/models/content-settings.ts +32 -2
- package/src/bundles/bundled-translations.json +2 -0
- package/src/shared/content-settings/components/content-settings/i18n/content-settings.json +2 -0
- package/src/shared/content-settings/components/content-settings-item/ContentSettingsItem.vue +1 -1
- package/src/shared/content-settings/components/focused-content-item-settings/FocusedContentItemSettings.vue +2 -2
- package/src/shared/content-settings/components/slider-field/SliderField.mixin.ts +9 -0
- package/src/utils/minify-brand-page-metadata.ts +11 -1
- package/lib/src/brand-page/components/banner-section/BannerSection.mixin.d.ts +0 -103
- package/lib/src/brand-page/components/banner-section/BannerSection.mixin.js +0 -178
- package/src/brand-page/components/banner-section/BannerSection.mixin.ts +0 -213
|
@@ -1,213 +0,0 @@
|
|
|
1
|
-
import { defineComponent } from 'vue';
|
|
2
|
-
import type { PropType } from 'vue';
|
|
3
|
-
import ComponentCommonMixin from '../mixins/component-common.mixin';
|
|
4
|
-
import type {
|
|
5
|
-
BannerSectionViewModel,
|
|
6
|
-
ButtonViewModel,
|
|
7
|
-
} from '@brand-page/view-models';
|
|
8
|
-
import {
|
|
9
|
-
isURL,
|
|
10
|
-
hasValidButton as shouldShowButtonUtil,
|
|
11
|
-
} from '../../../utils/validator.util';
|
|
12
|
-
import type { BrandPageContext } from '@brand-page/models';
|
|
13
|
-
import {
|
|
14
|
-
ALIGN_CENTERED,
|
|
15
|
-
ALIGN_LEFT_ALIGNED,
|
|
16
|
-
ALIGN_RIGHT_ALIGNED,
|
|
17
|
-
BIG_IMAGE,
|
|
18
|
-
ALIGN_LEFT_BIG_IMAGE,
|
|
19
|
-
ALIGN_RIGHT_FULL_IMAGE,
|
|
20
|
-
ALIGN_LEFT_FULL_IMAGE,
|
|
21
|
-
ALIGN_CARD_CENTER_IMAGE,
|
|
22
|
-
ALIGN_CARD_LEFT_IMAGE,
|
|
23
|
-
} from '../../constants';
|
|
24
|
-
import { getRenderText, escapeContentText } from '@brand-page/utils';
|
|
25
|
-
import { hasRTEContent } from '@brand-page-maker/utils';
|
|
26
|
-
|
|
27
|
-
export default defineComponent({
|
|
28
|
-
mixins: [ComponentCommonMixin],
|
|
29
|
-
props: {
|
|
30
|
-
viewModel: {
|
|
31
|
-
type: Object as PropType<BannerSectionViewModel>,
|
|
32
|
-
required: true,
|
|
33
|
-
},
|
|
34
|
-
context: {
|
|
35
|
-
type: Object as PropType<BrandPageContext>,
|
|
36
|
-
required: true,
|
|
37
|
-
},
|
|
38
|
-
containerClientWidth: {
|
|
39
|
-
type: Number as PropType<number | undefined>,
|
|
40
|
-
required: false,
|
|
41
|
-
default: undefined,
|
|
42
|
-
},
|
|
43
|
-
containerClientHeight: {
|
|
44
|
-
type: Number as PropType<number | undefined>,
|
|
45
|
-
required: false,
|
|
46
|
-
default: undefined,
|
|
47
|
-
},
|
|
48
|
-
contentIndex: {
|
|
49
|
-
type: Number,
|
|
50
|
-
required: false,
|
|
51
|
-
default: undefined,
|
|
52
|
-
},
|
|
53
|
-
},
|
|
54
|
-
data() {
|
|
55
|
-
return {
|
|
56
|
-
shouldStackOnTop: false,
|
|
57
|
-
};
|
|
58
|
-
},
|
|
59
|
-
mounted() {
|
|
60
|
-
this.$nextTick(() => {
|
|
61
|
-
window.addEventListener('resize', this.onResize);
|
|
62
|
-
});
|
|
63
|
-
},
|
|
64
|
-
unmounted() {
|
|
65
|
-
if (typeof window !== undefined) {
|
|
66
|
-
window.removeEventListener(`resize`, this.onResize);
|
|
67
|
-
}
|
|
68
|
-
},
|
|
69
|
-
computed: {
|
|
70
|
-
displayAlignClass() {
|
|
71
|
-
switch (this.viewModel.displayStyle) {
|
|
72
|
-
case ALIGN_CENTERED:
|
|
73
|
-
return 'tw-items-center tw-w-full';
|
|
74
|
-
case BIG_IMAGE:
|
|
75
|
-
return 'tw-items-center tw-w-full';
|
|
76
|
-
case ALIGN_LEFT_ALIGNED:
|
|
77
|
-
return 'tw-items-start tw-w-2/3';
|
|
78
|
-
case ALIGN_RIGHT_ALIGNED:
|
|
79
|
-
return 'tw-items-end tw-w-2/3';
|
|
80
|
-
case ALIGN_LEFT_BIG_IMAGE:
|
|
81
|
-
return 'tw-items-start tw-w-2/3';
|
|
82
|
-
case ALIGN_CARD_CENTER_IMAGE:
|
|
83
|
-
return 'tw-items-center tw-w-full';
|
|
84
|
-
case ALIGN_CARD_LEFT_IMAGE:
|
|
85
|
-
return 'tw-items-end';
|
|
86
|
-
default:
|
|
87
|
-
return '';
|
|
88
|
-
}
|
|
89
|
-
},
|
|
90
|
-
displayButtonClass() {
|
|
91
|
-
if (this.viewModel.buttonTextStyle) {
|
|
92
|
-
switch (this.viewModel.buttonTextStyle.textAlign) {
|
|
93
|
-
case 'left':
|
|
94
|
-
return 'tw-justify-start';
|
|
95
|
-
case 'center':
|
|
96
|
-
return 'tw-justify-center';
|
|
97
|
-
case 'right':
|
|
98
|
-
return 'tw-justify-end';
|
|
99
|
-
default:
|
|
100
|
-
return '';
|
|
101
|
-
}
|
|
102
|
-
} else {
|
|
103
|
-
return this.viewModel.displayStyle === ALIGN_CARD_CENTER_IMAGE ||
|
|
104
|
-
this.viewModel.displayStyle === ALIGN_CENTERED
|
|
105
|
-
? 'tw-justify-center'
|
|
106
|
-
: 'tw-justify-start';
|
|
107
|
-
}
|
|
108
|
-
},
|
|
109
|
-
isLeftImageAligned(): boolean {
|
|
110
|
-
if (this.viewModel.displayStyle === ALIGN_LEFT_FULL_IMAGE) {
|
|
111
|
-
return true;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
return false;
|
|
115
|
-
},
|
|
116
|
-
isRightImageAligned(): boolean {
|
|
117
|
-
if (this.viewModel.displayStyle === ALIGN_RIGHT_FULL_IMAGE) {
|
|
118
|
-
return true;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
return false;
|
|
122
|
-
},
|
|
123
|
-
|
|
124
|
-
isDividedContent(): boolean {
|
|
125
|
-
if (
|
|
126
|
-
this.viewModel.displayStyle === ALIGN_RIGHT_FULL_IMAGE ||
|
|
127
|
-
this.viewModel.displayStyle === ALIGN_LEFT_FULL_IMAGE
|
|
128
|
-
) {
|
|
129
|
-
return true;
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
return false;
|
|
133
|
-
},
|
|
134
|
-
isCardBannerContent(): boolean {
|
|
135
|
-
if (
|
|
136
|
-
this.viewModel.displayStyle === ALIGN_CARD_CENTER_IMAGE ||
|
|
137
|
-
this.viewModel.displayStyle === ALIGN_CARD_LEFT_IMAGE
|
|
138
|
-
) {
|
|
139
|
-
return true;
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
return false;
|
|
143
|
-
},
|
|
144
|
-
isCardAlignedOnLeft() {
|
|
145
|
-
return this.viewModel.displayStyle === ALIGN_CARD_LEFT_IMAGE;
|
|
146
|
-
},
|
|
147
|
-
getbuttonViewModel(): ButtonViewModel {
|
|
148
|
-
const { buttonViewModel, buttonLinkType, pageSlug } = this.viewModel;
|
|
149
|
-
|
|
150
|
-
buttonViewModel.buttonLinkType = buttonLinkType;
|
|
151
|
-
buttonViewModel.pageSlug = pageSlug;
|
|
152
|
-
|
|
153
|
-
return buttonViewModel;
|
|
154
|
-
},
|
|
155
|
-
|
|
156
|
-
shouldShowButton(): boolean {
|
|
157
|
-
return shouldShowButtonUtil({
|
|
158
|
-
buttonText: this.viewModel.buttonText,
|
|
159
|
-
buttonViewModel: this.viewModel.buttonViewModel,
|
|
160
|
-
});
|
|
161
|
-
},
|
|
162
|
-
|
|
163
|
-
isHorizontalAligned(): boolean {
|
|
164
|
-
return (
|
|
165
|
-
this.viewModel.displayStyle === ALIGN_LEFT_ALIGNED ||
|
|
166
|
-
this.viewModel.displayStyle === ALIGN_RIGHT_ALIGNED ||
|
|
167
|
-
this.viewModel.displayStyle === ALIGN_LEFT_FULL_IMAGE ||
|
|
168
|
-
this.viewModel.displayStyle === ALIGN_RIGHT_FULL_IMAGE
|
|
169
|
-
);
|
|
170
|
-
},
|
|
171
|
-
isBigImageAligned(): boolean {
|
|
172
|
-
return (
|
|
173
|
-
this.viewModel.displayStyle === ALIGN_LEFT_BIG_IMAGE ||
|
|
174
|
-
this.viewModel.displayStyle === ALIGN_CARD_LEFT_IMAGE
|
|
175
|
-
);
|
|
176
|
-
},
|
|
177
|
-
renderText(): string {
|
|
178
|
-
if (!this.viewModel.description) {
|
|
179
|
-
return '';
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
if (hasRTEContent(this.viewModel.description)) {
|
|
183
|
-
return this.viewModel.description;
|
|
184
|
-
} else {
|
|
185
|
-
return getRenderText(this.viewModel.description);
|
|
186
|
-
}
|
|
187
|
-
},
|
|
188
|
-
hasDescriptionText(): boolean {
|
|
189
|
-
if (hasRTEContent(this.viewModel.description)) {
|
|
190
|
-
return escapeContentText(this.viewModel.description) !== '';
|
|
191
|
-
} else {
|
|
192
|
-
return this.viewModel?.description?.length > 0;
|
|
193
|
-
}
|
|
194
|
-
},
|
|
195
|
-
overlayColor(): BrandPageCssStyle {
|
|
196
|
-
return this.viewModel.overlayColor || 'rgb(0,0,0)';
|
|
197
|
-
},
|
|
198
|
-
opacity(): number {
|
|
199
|
-
return this.viewModel.overlayOpacity;
|
|
200
|
-
},
|
|
201
|
-
backgroundOverlay(): BrandPageCssStyle {
|
|
202
|
-
return {
|
|
203
|
-
background: this.overlayColor.backgroundColor,
|
|
204
|
-
opacity: `${this.opacity}%`,
|
|
205
|
-
};
|
|
206
|
-
},
|
|
207
|
-
},
|
|
208
|
-
methods: {
|
|
209
|
-
onResize() {
|
|
210
|
-
this.shouldStackOnTop = window.innerWidth < 640;
|
|
211
|
-
},
|
|
212
|
-
},
|
|
213
|
-
});
|