@designcrowd/library.brand-page 5.6.4-fluid-6 → 5.6.4-scroll-2
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/brand-page/components/page/Page.mixin.d.ts +3 -4
- package/lib/src/brand-page/components/page/Page.mixin.js +22 -24
- package/lib/src/brand-page/components/text-wrapper/TextWrapper.mixin.d.ts +44 -0
- package/lib/src/brand-page/components/text-wrapper/TextWrapper.mixin.js +38 -0
- package/lib/src/brand-page/models/index.d.ts +0 -3
- package/lib/src/brand-page/utils/migration.util.js +0 -5
- package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.stories.js +2 -206
- package/lib/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.d.ts +3 -5
- package/lib/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.js +0 -11
- package/lib/src/brand-page-maker/convertors/text-size-value.convertor.js +3 -3
- package/lib/src/brand-page-maker/utils/text.util.d.ts +2 -2
- package/lib/src/brand-page-maker/utils/text.util.js +3 -3
- package/lib/src/css/library.brand-page-brandCrowd.min.css +19 -19
- package/lib/src/css/library.brand-page-brandPage.min.css +19 -19
- package/lib/src/css/library.brand-page-designCom.min.css +19 -19
- package/lib/src/css/library.brand-page-preview.min.css +19 -19
- package/lib/src/index.mjs +11361 -11414
- package/package.json +1 -1
- package/src/brand-page/components/page/Page.mixin.ts +36 -30
- package/src/brand-page/components/page/Page.vue +3 -7
- package/src/brand-page/components/text/Text.vue +6 -9
- package/src/brand-page/components/text-wrapper/TextWrapper.mixin.ts +41 -0
- package/src/brand-page/components/text-wrapper/TextWrapper.vue +12 -169
- package/src/brand-page/models/index.ts +0 -4
- package/src/brand-page/utils/__snapshots__/migration.util.test.ts.snap +27 -27
- package/src/brand-page/utils/migration.util.ts +0 -5
- package/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.stories.ts +5 -213
- package/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.ts +0 -13
- package/src/brand-page-maker/components/shop/ProductConfigModal.vue +1 -1
- package/src/brand-page-maker/convertors/text-size-value.convertor.ts +3 -3
- package/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.test.ts +3 -12
- package/src/brand-page-maker/utils/text.util.ts +3 -3
- package/lib/src/brand-page/utils/migration/migration-03.d.ts +0 -5
- package/lib/src/brand-page/utils/migration/migration-03.js +0 -35
- package/src/brand-page/utils/migration/migration-03.ts +0 -46
|
@@ -45,16 +45,15 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
45
45
|
required: false;
|
|
46
46
|
default: undefined;
|
|
47
47
|
};
|
|
48
|
-
}>, {
|
|
49
|
-
fluidText: string;
|
|
50
|
-
}, {
|
|
48
|
+
}>, {}, {
|
|
51
49
|
isSideMenuOpen: boolean;
|
|
52
50
|
styles: {};
|
|
53
51
|
}, {
|
|
54
52
|
brandPageToken(): string | null;
|
|
55
53
|
contents(): ContentViewModel[];
|
|
56
54
|
backgroundShapes(): BackgroundShape[];
|
|
57
|
-
|
|
55
|
+
rootElementStyles(): BrandPageCssStyle;
|
|
56
|
+
rootBackgroundStyles(): BrandPageCssStyle;
|
|
58
57
|
showBrandCrowdLogo(): boolean;
|
|
59
58
|
/**
|
|
60
59
|
* @function isRenderedForStorybook
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { defineComponent } from 'vue';
|
|
2
2
|
import { DEFAULT_FONT_FAMILY_KEY, FALLBACK_FONT_FAMILIES, FONT_FAMILY_CONFIGS, } from '../../constants';
|
|
3
3
|
import { getSlugFromContext } from '../../utils';
|
|
4
|
-
import { BRAND_PAGE_TYPES } from '../../models';
|
|
5
4
|
export default defineComponent({
|
|
6
5
|
props: {
|
|
7
6
|
context: {
|
|
@@ -55,15 +54,6 @@ export default defineComponent({
|
|
|
55
54
|
'page-header-container-click',
|
|
56
55
|
'page-footer-container-click',
|
|
57
56
|
],
|
|
58
|
-
setup(props) {
|
|
59
|
-
return {
|
|
60
|
-
fluidText: JSON.stringify({
|
|
61
|
-
default: props.context.brandPageType === BRAND_PAGE_TYPES.brandSite
|
|
62
|
-
? 1200
|
|
63
|
-
: 768,
|
|
64
|
-
}),
|
|
65
|
-
};
|
|
66
|
-
},
|
|
67
57
|
data() {
|
|
68
58
|
return {
|
|
69
59
|
isSideMenuOpen: false,
|
|
@@ -95,7 +85,21 @@ export default defineComponent({
|
|
|
95
85
|
}
|
|
96
86
|
return backgroundShapes;
|
|
97
87
|
},
|
|
98
|
-
|
|
88
|
+
rootElementStyles() {
|
|
89
|
+
const styles = {};
|
|
90
|
+
Object.assign(styles, this.viewModel?.styles?.textStyles?.style);
|
|
91
|
+
const textFontFamilyKey = this.viewModel.styles?.textStyles.textFontFamily ||
|
|
92
|
+
DEFAULT_FONT_FAMILY_KEY;
|
|
93
|
+
const textFontFamilyConfig = FONT_FAMILY_CONFIGS[textFontFamilyKey];
|
|
94
|
+
if (textFontFamilyConfig) {
|
|
95
|
+
styles.fontFamily = [
|
|
96
|
+
`"${textFontFamilyConfig.name}"`,
|
|
97
|
+
...FALLBACK_FONT_FAMILIES,
|
|
98
|
+
].join(', ');
|
|
99
|
+
}
|
|
100
|
+
return styles;
|
|
101
|
+
},
|
|
102
|
+
rootBackgroundStyles() {
|
|
99
103
|
const styles = {
|
|
100
104
|
...(this.viewModel?.styles?.backgroundStyles?.style || {}),
|
|
101
105
|
};
|
|
@@ -119,6 +123,7 @@ export default defineComponent({
|
|
|
119
123
|
if (!this.context.isTemplate) {
|
|
120
124
|
styles.position = 'fixed';
|
|
121
125
|
styles.width = '100%';
|
|
126
|
+
styles.height = '100%';
|
|
122
127
|
}
|
|
123
128
|
delete styles.background;
|
|
124
129
|
}
|
|
@@ -127,16 +132,6 @@ export default defineComponent({
|
|
|
127
132
|
if (this.viewModel.styles?.backgroundStyles.style.background?.startsWith('linear-gradient')) {
|
|
128
133
|
styles.backgroundAttachment = 'fixed';
|
|
129
134
|
}
|
|
130
|
-
Object.assign(styles, this.viewModel?.styles?.textStyles?.style);
|
|
131
|
-
const textFontFamilyKey = this.viewModel.styles?.textStyles.textFontFamily ||
|
|
132
|
-
DEFAULT_FONT_FAMILY_KEY;
|
|
133
|
-
const textFontFamilyConfig = FONT_FAMILY_CONFIGS[textFontFamilyKey];
|
|
134
|
-
if (textFontFamilyConfig) {
|
|
135
|
-
styles.fontFamily = [
|
|
136
|
-
`"${textFontFamilyConfig.name}"`,
|
|
137
|
-
...FALLBACK_FONT_FAMILIES,
|
|
138
|
-
].join(', ');
|
|
139
|
-
}
|
|
140
135
|
return styles;
|
|
141
136
|
},
|
|
142
137
|
showBrandCrowdLogo() {
|
|
@@ -247,7 +242,10 @@ export default defineComponent({
|
|
|
247
242
|
},
|
|
248
243
|
},
|
|
249
244
|
watch: {
|
|
250
|
-
|
|
245
|
+
rootElementStyles() {
|
|
246
|
+
this.setRootStyles();
|
|
247
|
+
},
|
|
248
|
+
rootBackgroundStyles() {
|
|
251
249
|
this.setRootStyles();
|
|
252
250
|
},
|
|
253
251
|
},
|
|
@@ -282,10 +280,10 @@ export default defineComponent({
|
|
|
282
280
|
*/
|
|
283
281
|
setRootStyles() {
|
|
284
282
|
if (this.context.isPreview) {
|
|
285
|
-
this.$emit('on-set-preview-styles', this.
|
|
283
|
+
this.$emit('on-set-preview-styles', Object.assign({}, this.rootElementStyles, this.rootBackgroundStyles));
|
|
286
284
|
return;
|
|
287
285
|
}
|
|
288
|
-
this.styles = Object.assign(this.styles, this.
|
|
286
|
+
this.styles = Object.assign(this.styles, this.rootElementStyles, this.rootBackgroundStyles);
|
|
289
287
|
},
|
|
290
288
|
scrollToLastContent() {
|
|
291
289
|
if (!this.contents.length) {
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { PropType } from 'vue';
|
|
2
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
3
|
+
textStyle: {
|
|
4
|
+
type: PropType<BrandPageCssStyle>;
|
|
5
|
+
required: false;
|
|
6
|
+
default: undefined;
|
|
7
|
+
};
|
|
8
|
+
text: {
|
|
9
|
+
type: StringConstructor;
|
|
10
|
+
required: true;
|
|
11
|
+
};
|
|
12
|
+
element: {
|
|
13
|
+
type: StringConstructor;
|
|
14
|
+
required: false;
|
|
15
|
+
default: () => string;
|
|
16
|
+
};
|
|
17
|
+
}>, {}, {
|
|
18
|
+
isCollapsed: boolean;
|
|
19
|
+
}, {
|
|
20
|
+
textStyles(): {
|
|
21
|
+
backgroundColor: any;
|
|
22
|
+
};
|
|
23
|
+
style(): any;
|
|
24
|
+
padding(): "" | "tw-py-2 tw-px-4";
|
|
25
|
+
}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
26
|
+
textStyle: {
|
|
27
|
+
type: PropType<BrandPageCssStyle>;
|
|
28
|
+
required: false;
|
|
29
|
+
default: undefined;
|
|
30
|
+
};
|
|
31
|
+
text: {
|
|
32
|
+
type: StringConstructor;
|
|
33
|
+
required: true;
|
|
34
|
+
};
|
|
35
|
+
element: {
|
|
36
|
+
type: StringConstructor;
|
|
37
|
+
required: false;
|
|
38
|
+
default: () => string;
|
|
39
|
+
};
|
|
40
|
+
}>> & Readonly<{}>, {
|
|
41
|
+
textStyle: BrandPageCssStyle;
|
|
42
|
+
element: string;
|
|
43
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
44
|
+
export default _default;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { defineComponent } from 'vue';
|
|
2
|
+
export default defineComponent({
|
|
3
|
+
props: {
|
|
4
|
+
textStyle: {
|
|
5
|
+
type: Object,
|
|
6
|
+
required: false,
|
|
7
|
+
default: undefined,
|
|
8
|
+
},
|
|
9
|
+
text: {
|
|
10
|
+
type: String,
|
|
11
|
+
required: true,
|
|
12
|
+
},
|
|
13
|
+
element: {
|
|
14
|
+
type: String,
|
|
15
|
+
required: false,
|
|
16
|
+
default: () => 'p',
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
data: () => ({
|
|
20
|
+
isCollapsed: false,
|
|
21
|
+
}),
|
|
22
|
+
computed: {
|
|
23
|
+
textStyles() {
|
|
24
|
+
return {
|
|
25
|
+
backgroundColor: this.textStyle.backgroundColor,
|
|
26
|
+
};
|
|
27
|
+
},
|
|
28
|
+
style() {
|
|
29
|
+
const { backgroundColor, ...textStyle } = this.textStyle;
|
|
30
|
+
return textStyle;
|
|
31
|
+
},
|
|
32
|
+
padding() {
|
|
33
|
+
return this.textStyle.backgroundColor ? 'tw-py-2 tw-px-4' : '';
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
watch: {},
|
|
37
|
+
methods: {},
|
|
38
|
+
});
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import {} from '../models';
|
|
2
2
|
import { migration01 } from './migration/migration-01';
|
|
3
3
|
import { migration02 } from './migration/migration-02';
|
|
4
|
-
import { migration03 } from './migration/migration-03';
|
|
5
4
|
const MIGRATION_TABLE = [
|
|
6
5
|
{
|
|
7
6
|
version: 1,
|
|
@@ -11,10 +10,6 @@ const MIGRATION_TABLE = [
|
|
|
11
10
|
version: 2,
|
|
12
11
|
migrateFn: migration02,
|
|
13
12
|
},
|
|
14
|
-
{
|
|
15
|
-
version: 3,
|
|
16
|
-
migrateFn: migration03,
|
|
17
|
-
},
|
|
18
13
|
];
|
|
19
14
|
export const GetLatestModelVersion = () => Math.max(...MIGRATION_TABLE.map((x) => x.version));
|
|
20
15
|
export const migrateBrandPageModel = (brandPageModel, options) => {
|
|
@@ -138,42 +138,7 @@ export const SampleBanner = () => {
|
|
|
138
138
|
const pinia = setupStoryPinia();
|
|
139
139
|
const brandPageMakerStore = useBrandPageMakerStore();
|
|
140
140
|
const bannerContent = createInitialBannerSectionContent();
|
|
141
|
-
bannerContent.
|
|
142
|
-
bannerContent.description = 'This Is Going To Be Epic';
|
|
143
|
-
bannerContent.buttonText = 'CONTACT US';
|
|
144
|
-
bannerContent.titleStyle.textStyleType = undefined;
|
|
145
|
-
bannerContent.titleStyle.fontSize = '6.25em';
|
|
146
|
-
bannerContent.titleStyle.fontFamily = 'Ubuntu';
|
|
147
|
-
bannerContent.titleStyle.lineHeight = '1';
|
|
148
|
-
bannerContent.titleStyle.textAlign = 'left';
|
|
149
|
-
bannerContent.displayStyle = 'left-aligned';
|
|
150
|
-
bannerContent.descriptionStyle.textStyleType = undefined;
|
|
151
|
-
bannerContent.descriptionStyle.fontFamily = 'Work Sans';
|
|
152
|
-
bannerContent.descriptionStyle.fontSize = '2.6875em';
|
|
153
|
-
bannerContent.descriptionStyle.textAlign = 'left';
|
|
154
|
-
bannerContent.buttonTextStyle.textStyleType = undefined;
|
|
155
|
-
bannerContent.buttonTextStyle.fontFamily = 'Ubuntu';
|
|
156
|
-
bannerContent.buttonTextStyle.fontSize = '1.5em';
|
|
157
|
-
bannerContent.buttonTextStyle.textAlign = 'left';
|
|
158
|
-
console.log('bannerContent', bannerContent);
|
|
159
|
-
const bannerContent2 = createInitialBannerSectionContent();
|
|
160
|
-
bannerContent2.title = 'LAUNCHING SOON';
|
|
161
|
-
bannerContent2.description = 'This Is Going To Be Epic2';
|
|
162
|
-
bannerContent2.buttonText = 'CONTACT US';
|
|
163
|
-
bannerContent2.titleStyle.textStyleType = undefined;
|
|
164
|
-
bannerContent2.titleStyle.fontSize = '6.25em';
|
|
165
|
-
bannerContent2.titleStyle.fontFamily = 'Ubuntu';
|
|
166
|
-
bannerContent2.titleStyle.lineHeight = '1';
|
|
167
|
-
bannerContent2.titleStyle.textAlign = 'left';
|
|
168
|
-
bannerContent2.displayStyle = 'left-aligned';
|
|
169
|
-
bannerContent2.descriptionStyle.textStyleType = undefined;
|
|
170
|
-
bannerContent2.descriptionStyle.fontFamily = 'Work Sans';
|
|
171
|
-
bannerContent2.descriptionStyle.fontSize = '2.6875em';
|
|
172
|
-
bannerContent2.descriptionStyle.textAlign = 'left';
|
|
173
|
-
bannerContent2.buttonTextStyle.textStyleType = undefined;
|
|
174
|
-
bannerContent2.buttonTextStyle.fontFamily = 'Ubuntu';
|
|
175
|
-
bannerContent2.buttonTextStyle.fontSize = '1.5em';
|
|
176
|
-
bannerContent2.buttonTextStyle.textAlign = 'left';
|
|
141
|
+
bannerContent.description = 'Lorem ipsum dolor sit amet';
|
|
177
142
|
brandPageMakerStore.setViewport({
|
|
178
143
|
viewport: VIEWPORTS.desktop,
|
|
179
144
|
});
|
|
@@ -190,176 +155,7 @@ export const SampleBanner = () => {
|
|
|
190
155
|
{
|
|
191
156
|
title: 'Home',
|
|
192
157
|
slug: 'home',
|
|
193
|
-
contents: [
|
|
194
|
-
{
|
|
195
|
-
id: 'acc69f79-8ecd-4c6e-9665-f0f7c06150ca',
|
|
196
|
-
url: '',
|
|
197
|
-
type: 'banner-section',
|
|
198
|
-
title: "SPORT'S KICKOFF",
|
|
199
|
-
imageUrl: '',
|
|
200
|
-
pageSlug: '',
|
|
201
|
-
cardStyle: {
|
|
202
|
-
backgroundColor: 'rgb(255,255,255)',
|
|
203
|
-
},
|
|
204
|
-
buttonText: 'Buy Tickets',
|
|
205
|
-
titleStyle: {
|
|
206
|
-
color: '#ffffff',
|
|
207
|
-
fontSize: '2.375em',
|
|
208
|
-
textAlign: 'center',
|
|
209
|
-
wordBreak: 'normal',
|
|
210
|
-
fontFamily: 'Jost',
|
|
211
|
-
fontWeight: 'bold',
|
|
212
|
-
lineHeight: '1.0',
|
|
213
|
-
overflowWrap: 'anywhere',
|
|
214
|
-
letterSpacing: '0.132em',
|
|
215
|
-
textDecoration: '',
|
|
216
|
-
},
|
|
217
|
-
description: 'SOCCER MATCH',
|
|
218
|
-
displayStyle: 'centered',
|
|
219
|
-
overlayColor: {
|
|
220
|
-
backgroundColor: 'rgb(0,0,0)',
|
|
221
|
-
},
|
|
222
|
-
buttonLinkType: 'url',
|
|
223
|
-
overlayOpacity: 50,
|
|
224
|
-
backgroundStyle: {
|
|
225
|
-
backgroundColor: '',
|
|
226
|
-
},
|
|
227
|
-
buttonTextStyle: {
|
|
228
|
-
color: '#fffbf4',
|
|
229
|
-
fontSize: '1.25em',
|
|
230
|
-
textAlign: 'center',
|
|
231
|
-
wordBreak: 'normal',
|
|
232
|
-
fontFamily: 'Jost',
|
|
233
|
-
fontWeight: 'bold',
|
|
234
|
-
lineHeight: '1.3',
|
|
235
|
-
overflowWrap: 'anywhere',
|
|
236
|
-
letterSpacing: '0',
|
|
237
|
-
textDecoration: '',
|
|
238
|
-
},
|
|
239
|
-
descriptionStyle: {
|
|
240
|
-
color: '#ffffff',
|
|
241
|
-
fontSize: '5.625em',
|
|
242
|
-
textAlign: 'center',
|
|
243
|
-
wordBreak: 'normal',
|
|
244
|
-
fontFamily: 'Alfa Slab One',
|
|
245
|
-
fontWeight: 'normal',
|
|
246
|
-
lineHeight: '1.0',
|
|
247
|
-
overflowWrap: 'anywhere',
|
|
248
|
-
letterSpacing: '0.011em',
|
|
249
|
-
textDecoration: '',
|
|
250
|
-
},
|
|
251
|
-
colorReplacements: [],
|
|
252
|
-
},
|
|
253
|
-
{
|
|
254
|
-
id: 'dfeafaf4-b5ab-435e-a902-adfa74d7c63b',
|
|
255
|
-
text: '',
|
|
256
|
-
type: 'text',
|
|
257
|
-
iconUrl: '',
|
|
258
|
-
textSize: {
|
|
259
|
-
fontSize: '1em',
|
|
260
|
-
lineHeight: '1.5',
|
|
261
|
-
},
|
|
262
|
-
textColor: {},
|
|
263
|
-
textItems: [
|
|
264
|
-
{
|
|
265
|
-
text: 'UPCOMING GAMES',
|
|
266
|
-
textStyle: {
|
|
267
|
-
color: '#d6ad7a',
|
|
268
|
-
fontSize: '3.4375em',
|
|
269
|
-
textAlign: 'center',
|
|
270
|
-
fontFamily: 'Alfa Slab One',
|
|
271
|
-
lineHeight: '1.4',
|
|
272
|
-
letterSpacing: '0.018em',
|
|
273
|
-
},
|
|
274
|
-
},
|
|
275
|
-
],
|
|
276
|
-
textStyle: {
|
|
277
|
-
textAlign: 'center',
|
|
278
|
-
textStyleType: 'paragraphs',
|
|
279
|
-
},
|
|
280
|
-
columnStyle: '1',
|
|
281
|
-
textAlignment: {},
|
|
282
|
-
backgroundColor: {
|
|
283
|
-
backgroundColor: '#fffbf4',
|
|
284
|
-
},
|
|
285
|
-
},
|
|
286
|
-
{
|
|
287
|
-
id: '943e80c0-3d77-4aed-84a0-ed51d351661a',
|
|
288
|
-
text: '',
|
|
289
|
-
type: 'text',
|
|
290
|
-
iconUrl: '',
|
|
291
|
-
textSize: {
|
|
292
|
-
fontSize: '1em',
|
|
293
|
-
lineHeight: '1.5',
|
|
294
|
-
},
|
|
295
|
-
textColor: {},
|
|
296
|
-
textItems: [
|
|
297
|
-
{
|
|
298
|
-
text: 'THURSDAY',
|
|
299
|
-
textStyle: {
|
|
300
|
-
color: '#d6ad7a',
|
|
301
|
-
fontSize: '1.875em',
|
|
302
|
-
textAlign: 'center',
|
|
303
|
-
fontFamily: 'Pridi',
|
|
304
|
-
fontWeight: 'bold',
|
|
305
|
-
lineHeight: '1.3',
|
|
306
|
-
letterSpacing: '0.033em',
|
|
307
|
-
textDecoration: '',
|
|
308
|
-
},
|
|
309
|
-
},
|
|
310
|
-
{
|
|
311
|
-
text: 'FRIDAY',
|
|
312
|
-
textStyle: {
|
|
313
|
-
color: '#d6ad7a',
|
|
314
|
-
fontSize: '1.875em',
|
|
315
|
-
textAlign: 'center',
|
|
316
|
-
fontFamily: 'Pridi',
|
|
317
|
-
fontWeight: 'bold',
|
|
318
|
-
lineHeight: '1.3',
|
|
319
|
-
letterSpacing: '0.033em',
|
|
320
|
-
textDecoration: '',
|
|
321
|
-
},
|
|
322
|
-
},
|
|
323
|
-
{
|
|
324
|
-
text: 'SATURDAY',
|
|
325
|
-
textStyle: {
|
|
326
|
-
color: '#d6ad7a',
|
|
327
|
-
fontSize: '1.875em',
|
|
328
|
-
textAlign: 'center',
|
|
329
|
-
fontFamily: 'Pridi',
|
|
330
|
-
fontWeight: 'bold',
|
|
331
|
-
lineHeight: '1.3',
|
|
332
|
-
letterSpacing: '0.033em',
|
|
333
|
-
textDecoration: '',
|
|
334
|
-
},
|
|
335
|
-
},
|
|
336
|
-
{
|
|
337
|
-
text: 'SUNDAY',
|
|
338
|
-
textStyle: {
|
|
339
|
-
color: '#d6ad7a',
|
|
340
|
-
fontSize: '1.875em',
|
|
341
|
-
textAlign: 'center',
|
|
342
|
-
fontFamily: 'Pridi',
|
|
343
|
-
fontWeight: 'bold',
|
|
344
|
-
lineHeight: '1.3',
|
|
345
|
-
letterSpacing: '0.033em',
|
|
346
|
-
textDecoration: '',
|
|
347
|
-
},
|
|
348
|
-
},
|
|
349
|
-
],
|
|
350
|
-
textStyle: {
|
|
351
|
-
textAlign: 'center',
|
|
352
|
-
textStyleType: 'paragraphs',
|
|
353
|
-
},
|
|
354
|
-
columnStyle: '4',
|
|
355
|
-
textAlignment: {},
|
|
356
|
-
backgroundColor: {
|
|
357
|
-
backgroundColor: '#fffbf4',
|
|
358
|
-
},
|
|
359
|
-
},
|
|
360
|
-
bannerContent,
|
|
361
|
-
bannerContent2,
|
|
362
|
-
],
|
|
158
|
+
contents: [bannerContent],
|
|
363
159
|
},
|
|
364
160
|
],
|
|
365
161
|
brandPageType: BRAND_PAGE_TYPES.brandSite,
|
package/lib/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.d.ts
CHANGED
|
@@ -834,7 +834,6 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
834
834
|
isDraggableEnabled(): boolean;
|
|
835
835
|
isItemSelected(): (itemIdx: any) => boolean;
|
|
836
836
|
}, {
|
|
837
|
-
dispatchViewPortChangeEvent(): void;
|
|
838
837
|
onDraggingStart(): void;
|
|
839
838
|
onDraggingEnd(ev: any): void;
|
|
840
839
|
onOverlayClick(item: ContentViewModel): void;
|
|
@@ -888,16 +887,15 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
888
887
|
required: false;
|
|
889
888
|
default: undefined;
|
|
890
889
|
};
|
|
891
|
-
}>, {
|
|
892
|
-
fluidText: string;
|
|
893
|
-
}, {
|
|
890
|
+
}>, {}, {
|
|
894
891
|
isSideMenuOpen: boolean;
|
|
895
892
|
styles: {};
|
|
896
893
|
}, {
|
|
897
894
|
brandPageToken(): string | null;
|
|
898
895
|
contents(): ContentViewModel[];
|
|
899
896
|
backgroundShapes(): import("../../../brand-page").BackgroundShape[];
|
|
900
|
-
|
|
897
|
+
rootElementStyles(): BrandPageCssStyle;
|
|
898
|
+
rootBackgroundStyles(): BrandPageCssStyle;
|
|
901
899
|
showBrandCrowdLogo(): boolean;
|
|
902
900
|
isRenderedForStorybook(): boolean;
|
|
903
901
|
pageViewModel(): import("../../../brand-page").PageViewModel | undefined;
|
package/lib/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.js
CHANGED
|
@@ -73,13 +73,7 @@ export default defineComponent({
|
|
|
73
73
|
};
|
|
74
74
|
},
|
|
75
75
|
},
|
|
76
|
-
mounted() {
|
|
77
|
-
this.dispatchViewPortChangeEvent();
|
|
78
|
-
},
|
|
79
76
|
watch: {
|
|
80
|
-
viewport() {
|
|
81
|
-
this.dispatchViewPortChangeEvent();
|
|
82
|
-
},
|
|
83
77
|
selectedItemId(itemId) {
|
|
84
78
|
this.scrollToContentItemByItemId(itemId);
|
|
85
79
|
},
|
|
@@ -99,11 +93,6 @@ export default defineComponent({
|
|
|
99
93
|
},
|
|
100
94
|
},
|
|
101
95
|
methods: {
|
|
102
|
-
dispatchViewPortChangeEvent() {
|
|
103
|
-
window.dispatchEvent(new CustomEvent('editor:viewport', {
|
|
104
|
-
detail: { viewport: this.viewport },
|
|
105
|
-
}));
|
|
106
|
-
},
|
|
107
96
|
onDraggingStart() {
|
|
108
97
|
this.isDraggingContent = true;
|
|
109
98
|
// Unable to set selected item id here because it will cause the draggable to be stuck
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { DEFAULT_FONT_SIZE } from '../../brand-page/constants/';
|
|
2
|
-
import {
|
|
2
|
+
import { pxToRem, remToPx } from '../utils/text.util';
|
|
3
3
|
export const textSizeValueConvertor = {
|
|
4
4
|
convertBackToMultipleValues: false,
|
|
5
5
|
convert(value) {
|
|
6
|
-
return (value.fontSize ?
|
|
6
|
+
return (value.fontSize ? remToPx(value.fontSize) : DEFAULT_FONT_SIZE).toString();
|
|
7
7
|
},
|
|
8
8
|
convertBack(valuePx) {
|
|
9
9
|
return {
|
|
10
|
-
fontSize:
|
|
10
|
+
fontSize: pxToRem(valuePx),
|
|
11
11
|
};
|
|
12
12
|
},
|
|
13
13
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const
|
|
2
|
-
export declare const
|
|
1
|
+
export declare const pxToRem: (px: string) => string;
|
|
2
|
+
export declare const remToPx: (rem: string) => string;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export const
|
|
1
|
+
export const pxToRem = (px) => {
|
|
2
2
|
const value = parseFloat(px) / 16;
|
|
3
|
-
return `${value}
|
|
3
|
+
return `${value}rem`;
|
|
4
4
|
};
|
|
5
|
-
export const
|
|
5
|
+
export const remToPx = (rem) => {
|
|
6
6
|
const value = parseFloat(rem) * 16;
|
|
7
7
|
return `${value}`;
|
|
8
8
|
};
|
|
@@ -5547,13 +5547,13 @@ to {
|
|
|
5547
5547
|
overflow-wrap: break-word;
|
|
5548
5548
|
}
|
|
5549
5549
|
|
|
5550
|
-
.c-text-container[data-v-
|
|
5550
|
+
.c-text-container[data-v-f2a561dc] {
|
|
5551
5551
|
max-width: var(--brandsite-max-width);
|
|
5552
5552
|
margin: 0 auto;
|
|
5553
5553
|
padding-left: var(--page-padding);
|
|
5554
5554
|
padding-right: var(--page-padding);
|
|
5555
5555
|
}
|
|
5556
|
-
.device--mobile .grid-container[data-v-
|
|
5556
|
+
.device--mobile .grid-container[data-v-f2a561dc] {
|
|
5557
5557
|
display: -webkit-box;
|
|
5558
5558
|
display: -ms-flexbox;
|
|
5559
5559
|
display: flex;
|
|
@@ -5563,7 +5563,7 @@ to {
|
|
|
5563
5563
|
flex-direction: column;
|
|
5564
5564
|
}
|
|
5565
5565
|
@media (max-width: 767px) {
|
|
5566
|
-
.grid-container[data-v-
|
|
5566
|
+
.grid-container[data-v-f2a561dc] {
|
|
5567
5567
|
display: -webkit-box;
|
|
5568
5568
|
display: -ms-flexbox;
|
|
5569
5569
|
display: flex;
|
|
@@ -5574,7 +5574,7 @@ to {
|
|
|
5574
5574
|
}
|
|
5575
5575
|
}
|
|
5576
5576
|
@media (min-width: 767px) {
|
|
5577
|
-
.grid-container[data-v-
|
|
5577
|
+
.grid-container[data-v-f2a561dc] {
|
|
5578
5578
|
display: grid;
|
|
5579
5579
|
}
|
|
5580
5580
|
}
|
|
@@ -7219,14 +7219,14 @@ body {
|
|
|
7219
7219
|
line-height: 1.5;
|
|
7220
7220
|
}
|
|
7221
7221
|
|
|
7222
|
-
.brand-page-root[data-v-
|
|
7222
|
+
.brand-page-root[data-v-a68b910c] {
|
|
7223
7223
|
height: 100%;
|
|
7224
7224
|
}
|
|
7225
|
-
.sortable[data-v-
|
|
7225
|
+
.sortable[data-v-a68b910c] {
|
|
7226
7226
|
outline-color: #F7768C;
|
|
7227
7227
|
outline-width: 0.2rem;
|
|
7228
7228
|
}
|
|
7229
|
-
.brand-page[data-v-
|
|
7229
|
+
.brand-page[data-v-a68b910c] {
|
|
7230
7230
|
-webkit-box-sizing: border-box;
|
|
7231
7231
|
box-sizing: border-box;
|
|
7232
7232
|
display: -webkit-box;
|
|
@@ -7238,7 +7238,7 @@ body {
|
|
|
7238
7238
|
-ms-flex-direction: column;
|
|
7239
7239
|
flex-direction: column;
|
|
7240
7240
|
}
|
|
7241
|
-
.brand-page__inner--default[data-v-
|
|
7241
|
+
.brand-page__inner--default[data-v-a68b910c] {
|
|
7242
7242
|
position: relative;
|
|
7243
7243
|
z-index: 10;
|
|
7244
7244
|
display: -webkit-box;
|
|
@@ -7250,16 +7250,16 @@ body {
|
|
|
7250
7250
|
-ms-flex-direction: column;
|
|
7251
7251
|
flex-direction: column;
|
|
7252
7252
|
}
|
|
7253
|
-
.brand-page__inner--desktop[data-v-
|
|
7253
|
+
.brand-page__inner--desktop[data-v-a68b910c] {
|
|
7254
7254
|
min-height: 100vh;
|
|
7255
7255
|
}
|
|
7256
|
-
.brand-site__header[data-v-
|
|
7256
|
+
.brand-site__header[data-v-a68b910c] {
|
|
7257
7257
|
container-type: inline-size;
|
|
7258
7258
|
}
|
|
7259
|
-
.brand-page__header[data-v-
|
|
7259
|
+
.brand-page__header[data-v-a68b910c] {
|
|
7260
7260
|
padding-top: var(--page-padding);
|
|
7261
7261
|
}
|
|
7262
|
-
.brand-page__content--default[data-v-
|
|
7262
|
+
.brand-page__content--default[data-v-a68b910c] {
|
|
7263
7263
|
margin-left: auto;
|
|
7264
7264
|
margin-right: auto;
|
|
7265
7265
|
margin-bottom: 2.5rem;
|
|
@@ -7276,7 +7276,7 @@ body {
|
|
|
7276
7276
|
flex-direction: column;
|
|
7277
7277
|
max-width: var(--page-max-width);
|
|
7278
7278
|
}
|
|
7279
|
-
.brand-page__content--desktop[data-v-
|
|
7279
|
+
.brand-page__content--desktop[data-v-a68b910c] {
|
|
7280
7280
|
margin-left: auto;
|
|
7281
7281
|
margin-right: auto;
|
|
7282
7282
|
display: -webkit-box;
|
|
@@ -7292,15 +7292,15 @@ body {
|
|
|
7292
7292
|
flex-direction: column;
|
|
7293
7293
|
max-width: 100%;
|
|
7294
7294
|
}
|
|
7295
|
-
.brand-page__content--inner[data-v-
|
|
7295
|
+
.brand-page__content--inner[data-v-a68b910c] {
|
|
7296
7296
|
padding-left: var(--page-padding);
|
|
7297
7297
|
padding-right: var(--page-padding);
|
|
7298
7298
|
}
|
|
7299
|
-
.brand-page__content--inner--brandsite[data-v-
|
|
7299
|
+
.brand-page__content--inner--brandsite[data-v-a68b910c] {
|
|
7300
7300
|
max-width: var(--brandsite-max-width);
|
|
7301
7301
|
margin: 0 auto;
|
|
7302
7302
|
}
|
|
7303
|
-
.brand-page__content--outline-selected[data-v-
|
|
7303
|
+
.brand-page__content--outline-selected[data-v-a68b910c] {
|
|
7304
7304
|
position: relative;
|
|
7305
7305
|
z-index: 10;
|
|
7306
7306
|
outline-color: #F7768C;
|
|
@@ -7308,20 +7308,20 @@ body {
|
|
|
7308
7308
|
outline-style: dashed;
|
|
7309
7309
|
outline-offset: -0.25rem;
|
|
7310
7310
|
}
|
|
7311
|
-
.brand-page__content--outline-footer-selected[data-v-
|
|
7311
|
+
.brand-page__content--outline-footer-selected[data-v-a68b910c] {
|
|
7312
7312
|
outline-color: #f7768c;
|
|
7313
7313
|
outline-width: 0.2rem;
|
|
7314
7314
|
outline-style: dashed;
|
|
7315
7315
|
outline-offset: -0.25rem;
|
|
7316
7316
|
}
|
|
7317
7317
|
@media (max-width: 640px) {
|
|
7318
|
-
.brand-page__content--inner--full-width[data-v-
|
|
7318
|
+
.brand-page__content--inner--full-width[data-v-a68b910c] {
|
|
7319
7319
|
padding-left: 0;
|
|
7320
7320
|
padding-right: 0;
|
|
7321
7321
|
}
|
|
7322
7322
|
}
|
|
7323
7323
|
@media (min-width: 640px) {
|
|
7324
|
-
.brand-page__content--inner--full-width[data-v-
|
|
7324
|
+
.brand-page__content--inner--full-width[data-v-a68b910c] {
|
|
7325
7325
|
padding-left: var(--page-padding);
|
|
7326
7326
|
padding-right: var(--page-padding);
|
|
7327
7327
|
}
|