pb-sxp-ui 1.0.6 → 1.0.7
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/dist/index.cjs +87 -61
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +87 -62
- package/dist/index.js.map +1 -1
- package/dist/index.min.cjs +3 -3
- package/dist/index.min.cjs.map +1 -1
- package/dist/index.min.js +3 -3
- package/dist/index.min.js.map +1 -1
- package/dist/pb-ui.js +87 -61
- package/dist/pb-ui.js.map +1 -1
- package/dist/pb-ui.min.js +3 -3
- package/dist/pb-ui.min.js.map +1 -1
- package/es/core/hooks/useEventReport.js +35 -39
- package/es/index.d.ts +1 -0
- package/es/index.js +1 -0
- package/es/materials/sxp/HashTag/settingRender.d.ts +4 -1
- package/es/materials/sxp/HashTag/settingRender.js +7 -3
- package/es/materials/sxp/defaultSetting.d.ts +11 -0
- package/es/materials/sxp/defaultSetting.js +7 -0
- package/es/materials/sxp/popup/AppointForm/material.js +0 -1
- package/es/materials/sxp/popup/AppointForm/settingRender.d.ts +3 -0
- package/es/materials/sxp/popup/AppointForm/settingRender.js +4 -1
- package/es/materials/sxp/popup/CommodityDetail/settingRender.d.ts +4 -1
- package/es/materials/sxp/popup/CommodityDetail/settingRender.js +7 -3
- package/es/materials/sxp/popup/CommodityDetailDiroNew/settingRender.d.ts +4 -1
- package/es/materials/sxp/popup/CommodityDetailDiroNew/settingRender.js +7 -3
- package/es/materials/sxp/template/components/settingRender.d.ts +6 -0
- package/es/materials/sxp/template/components/settingRender.js +8 -4
- package/lib/core/hooks/useEventReport.js +35 -39
- package/lib/index.d.ts +1 -0
- package/lib/index.js +3 -1
- package/lib/materials/sxp/HashTag/settingRender.d.ts +4 -1
- package/lib/materials/sxp/HashTag/settingRender.js +7 -3
- package/lib/materials/sxp/defaultSetting.d.ts +11 -0
- package/lib/materials/sxp/defaultSetting.js +10 -0
- package/lib/materials/sxp/popup/AppointForm/material.js +0 -1
- package/lib/materials/sxp/popup/AppointForm/settingRender.d.ts +3 -0
- package/lib/materials/sxp/popup/AppointForm/settingRender.js +4 -1
- package/lib/materials/sxp/popup/CommodityDetail/settingRender.d.ts +4 -1
- package/lib/materials/sxp/popup/CommodityDetail/settingRender.js +7 -3
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/settingRender.d.ts +4 -1
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/settingRender.js +7 -3
- package/lib/materials/sxp/template/components/settingRender.d.ts +6 -0
- package/lib/materials/sxp/template/components/settingRender.js +8 -4
- package/package.json +1 -1
@@ -20,25 +20,23 @@ export function useEventReport() {
|
|
20
20
|
else if (data === null || data === void 0 ? void 0 : data.product) {
|
21
21
|
fromKName = 'productPage';
|
22
22
|
}
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
});
|
41
|
-
}
|
23
|
+
bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
|
24
|
+
eventInfo: {
|
25
|
+
eventSubject: 'jumpToWeb',
|
26
|
+
eventDescription: 'User jumped to website',
|
27
|
+
productId: (_h = product === null || product === void 0 ? void 0 : product.itemId) !== null && _h !== void 0 ? _h : '',
|
28
|
+
productName: (_j = product === null || product === void 0 ? void 0 : product.title) !== null && _j !== void 0 ? _j : '',
|
29
|
+
price: (product === null || product === void 0 ? void 0 : product.price) ? (product === null || product === void 0 ? void 0 : product.price) + '' : '0',
|
30
|
+
productCollection: (_k = product === null || product === void 0 ? void 0 : product.collection) !== null && _k !== void 0 ? _k : '',
|
31
|
+
fromKName,
|
32
|
+
fromKPage: location === null || location === void 0 ? void 0 : location.href,
|
33
|
+
contentTags: (product === null || product === void 0 ? void 0 : product.tags) ? JSON.stringify(product === null || product === void 0 ? void 0 : product.tags) : '',
|
34
|
+
position: (data === null || data === void 0 ? void 0 : data.position) + '',
|
35
|
+
relatedContentId: (_m = (_l = data === null || data === void 0 ? void 0 : data.video) === null || _l === void 0 ? void 0 : _l.itemId) !== null && _m !== void 0 ? _m : '',
|
36
|
+
relatedCtatId: (_o = cta === null || cta === void 0 ? void 0 : cta.itemId) !== null && _o !== void 0 ? _o : '',
|
37
|
+
traceInfo: (_p = product === null || product === void 0 ? void 0 : product.traceInfo) !== null && _p !== void 0 ? _p : ''
|
38
|
+
}
|
39
|
+
});
|
42
40
|
}, [bffEventReport, popupDetailData, isFromHashtag]);
|
43
41
|
const productView = useCallback((data, product, cta, viewTime) => {
|
44
42
|
var _a, _b, _c, _d;
|
@@ -49,26 +47,24 @@ export function useEventReport() {
|
|
49
47
|
else if (data === null || data === void 0 ? void 0 : data.product) {
|
50
48
|
fromKName = 'productPage';
|
51
49
|
}
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
});
|
71
|
-
}
|
50
|
+
bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
|
51
|
+
eventInfo: {
|
52
|
+
productId: product === null || product === void 0 ? void 0 : product.itemId,
|
53
|
+
productName: product === null || product === void 0 ? void 0 : product.title,
|
54
|
+
price: (product === null || product === void 0 ? void 0 : product.price) ? (product === null || product === void 0 ? void 0 : product.price) + '' : '0',
|
55
|
+
productCollection: product === null || product === void 0 ? void 0 : product.collection,
|
56
|
+
fromKName,
|
57
|
+
fromKPage: location === null || location === void 0 ? void 0 : location.href,
|
58
|
+
contentTags: JSON.stringify(product === null || product === void 0 ? void 0 : product.tags),
|
59
|
+
position: (data === null || data === void 0 ? void 0 : data.position) + '',
|
60
|
+
relatedContentId: (_d = data === null || data === void 0 ? void 0 : data.video) === null || _d === void 0 ? void 0 : _d.itemId,
|
61
|
+
relatedCtatId: cta === null || cta === void 0 ? void 0 : cta.itemId,
|
62
|
+
traceInfo: product === null || product === void 0 ? void 0 : product.traceInfo,
|
63
|
+
timeOnSite: Math.floor((new Date() - viewTime) / 1000) + '',
|
64
|
+
eventSubject: 'productView',
|
65
|
+
eventDescription: 'User browsed the product'
|
66
|
+
}
|
67
|
+
});
|
72
68
|
}, [bffEventReport, popupDetailData]);
|
73
69
|
return {
|
74
70
|
jumpToWeb,
|
package/es/index.d.ts
CHANGED
@@ -7,4 +7,5 @@ export { default as SxpDataSourceProvider } from './core/context/SxpDataSourcePr
|
|
7
7
|
export { default as SxpPageCore } from './core/components/SxpPageCore';
|
8
8
|
export { default as EditorDataProvider } from './core/context/EditorDataProvider';
|
9
9
|
export { useEditorDataProvider } from './core/context/EditorDataProvider';
|
10
|
+
export { default as defaultSetting } from './materials/sxp/defaultSetting';
|
10
11
|
export default Pagebuilder;
|
package/es/index.js
CHANGED
@@ -9,4 +9,5 @@ export { default as SxpDataSourceProvider } from './core/context/SxpDataSourcePr
|
|
9
9
|
export { default as SxpPageCore } from './core/components/SxpPageCore';
|
10
10
|
export { default as EditorDataProvider } from './core/context/EditorDataProvider';
|
11
11
|
export { useEditorDataProvider } from './core/context/EditorDataProvider';
|
12
|
+
export { default as defaultSetting } from './materials/sxp/defaultSetting';
|
12
13
|
export default Pagebuilder;
|
@@ -33,6 +33,7 @@ declare const _default: ({
|
|
33
33
|
type: string;
|
34
34
|
name: string[];
|
35
35
|
options?: undefined;
|
36
|
+
initialValue?: undefined;
|
36
37
|
addonAfter?: undefined;
|
37
38
|
} | {
|
38
39
|
type: string;
|
@@ -41,12 +42,14 @@ declare const _default: ({
|
|
41
42
|
value: string;
|
42
43
|
}[];
|
43
44
|
name: string[];
|
45
|
+
initialValue: string;
|
44
46
|
addonAfter?: undefined;
|
45
47
|
} | {
|
46
48
|
type: string;
|
47
49
|
addonAfter: string;
|
48
50
|
name: string[];
|
49
51
|
options?: undefined;
|
52
|
+
initialValue?: undefined;
|
50
53
|
})[];
|
51
54
|
options?: undefined;
|
52
55
|
name?: undefined;
|
@@ -106,7 +109,7 @@ declare const _default: ({
|
|
106
109
|
label: string;
|
107
110
|
value: string;
|
108
111
|
}[];
|
109
|
-
initialValue
|
112
|
+
initialValue: string;
|
110
113
|
addonAfter?: undefined;
|
111
114
|
} | {
|
112
115
|
type: string;
|
@@ -1,3 +1,5 @@
|
|
1
|
+
var _a, _b;
|
2
|
+
import { fontOptions } from '../defaultSetting';
|
1
3
|
export default [
|
2
4
|
{
|
3
5
|
title: '卡片样式',
|
@@ -56,8 +58,9 @@ export default [
|
|
56
58
|
},
|
57
59
|
{
|
58
60
|
type: 'Select',
|
59
|
-
options:
|
60
|
-
name: ['fontFamily']
|
61
|
+
options: fontOptions,
|
62
|
+
name: ['fontFamily'],
|
63
|
+
initialValue: (_a = fontOptions === null || fontOptions === void 0 ? void 0 : fontOptions[0]) === null || _a === void 0 ? void 0 : _a.value
|
61
64
|
},
|
62
65
|
{
|
63
66
|
type: 'Number',
|
@@ -131,7 +134,8 @@ export default [
|
|
131
134
|
{
|
132
135
|
type: 'Select',
|
133
136
|
name: ['props', 'buttonStyle', 'fontFamily'],
|
134
|
-
options:
|
137
|
+
options: fontOptions,
|
138
|
+
initialValue: (_b = fontOptions === null || fontOptions === void 0 ? void 0 : fontOptions[0]) === null || _b === void 0 ? void 0 : _b.value
|
135
139
|
},
|
136
140
|
{
|
137
141
|
type: 'Number',
|
@@ -19,6 +19,7 @@ declare const _default: ({
|
|
19
19
|
type: string;
|
20
20
|
name: string[];
|
21
21
|
options?: undefined;
|
22
|
+
initialValue?: undefined;
|
22
23
|
addonAfter?: undefined;
|
23
24
|
} | {
|
24
25
|
type: string;
|
@@ -27,12 +28,14 @@ declare const _default: ({
|
|
27
28
|
label: string;
|
28
29
|
value: string;
|
29
30
|
}[];
|
31
|
+
initialValue: string;
|
30
32
|
addonAfter?: undefined;
|
31
33
|
} | {
|
32
34
|
type: string;
|
33
35
|
name: string[];
|
34
36
|
addonAfter: string;
|
35
37
|
options?: undefined;
|
38
|
+
initialValue?: undefined;
|
36
39
|
})[];
|
37
40
|
name?: undefined;
|
38
41
|
options?: undefined;
|
@@ -1,3 +1,5 @@
|
|
1
|
+
var _a;
|
2
|
+
import { fontOptions } from '../../defaultSetting';
|
1
3
|
export default [
|
2
4
|
{
|
3
5
|
type: 'Text',
|
@@ -23,7 +25,8 @@ export default [
|
|
23
25
|
{
|
24
26
|
type: 'Select',
|
25
27
|
name: ['textStyle', 'fontFamily'],
|
26
|
-
options:
|
28
|
+
options: fontOptions,
|
29
|
+
initialValue: (_a = fontOptions === null || fontOptions === void 0 ? void 0 : fontOptions[0]) === null || _a === void 0 ? void 0 : _a.value
|
27
30
|
},
|
28
31
|
{
|
29
32
|
type: 'Number',
|
@@ -38,6 +38,7 @@ declare const _default: ({
|
|
38
38
|
type: string;
|
39
39
|
name: string[];
|
40
40
|
options?: undefined;
|
41
|
+
initialValue?: undefined;
|
41
42
|
addonAfter?: undefined;
|
42
43
|
} | {
|
43
44
|
type: string;
|
@@ -46,12 +47,14 @@ declare const _default: ({
|
|
46
47
|
value: string;
|
47
48
|
}[];
|
48
49
|
name: string[];
|
50
|
+
initialValue: string;
|
49
51
|
addonAfter?: undefined;
|
50
52
|
} | {
|
51
53
|
type: string;
|
52
54
|
addonAfter: string;
|
53
55
|
name: string[];
|
54
56
|
options?: undefined;
|
57
|
+
initialValue?: undefined;
|
55
58
|
})[];
|
56
59
|
options?: undefined;
|
57
60
|
name?: undefined;
|
@@ -118,7 +121,7 @@ declare const _default: ({
|
|
118
121
|
label: string;
|
119
122
|
value: string;
|
120
123
|
}[];
|
121
|
-
initialValue
|
124
|
+
initialValue: string;
|
122
125
|
addonAfter?: undefined;
|
123
126
|
} | {
|
124
127
|
type: string;
|
@@ -1,3 +1,5 @@
|
|
1
|
+
var _a, _b;
|
2
|
+
import { fontOptions } from '../../defaultSetting';
|
1
3
|
export default [
|
2
4
|
{
|
3
5
|
title: '商品图片',
|
@@ -65,8 +67,9 @@ export default [
|
|
65
67
|
},
|
66
68
|
{
|
67
69
|
type: 'Select',
|
68
|
-
options:
|
69
|
-
name: ['fontFamily']
|
70
|
+
options: fontOptions,
|
71
|
+
name: ['fontFamily'],
|
72
|
+
initialValue: (_a = fontOptions === null || fontOptions === void 0 ? void 0 : fontOptions[0]) === null || _a === void 0 ? void 0 : _a.value
|
70
73
|
},
|
71
74
|
{
|
72
75
|
type: 'Number',
|
@@ -145,7 +148,8 @@ export default [
|
|
145
148
|
{
|
146
149
|
type: 'Select',
|
147
150
|
name: ['props', 'buttonStyle', 'fontFamily'],
|
148
|
-
options:
|
151
|
+
options: fontOptions,
|
152
|
+
initialValue: (_b = fontOptions === null || fontOptions === void 0 ? void 0 : fontOptions[0]) === null || _b === void 0 ? void 0 : _b.value
|
149
153
|
},
|
150
154
|
{
|
151
155
|
type: 'Number',
|
@@ -38,6 +38,7 @@ declare const _default: ({
|
|
38
38
|
type: string;
|
39
39
|
name: string[];
|
40
40
|
options?: undefined;
|
41
|
+
initialValue?: undefined;
|
41
42
|
addonAfter?: undefined;
|
42
43
|
} | {
|
43
44
|
type: string;
|
@@ -46,12 +47,14 @@ declare const _default: ({
|
|
46
47
|
value: string;
|
47
48
|
}[];
|
48
49
|
name: string[];
|
50
|
+
initialValue: string;
|
49
51
|
addonAfter?: undefined;
|
50
52
|
} | {
|
51
53
|
type: string;
|
52
54
|
addonAfter: string;
|
53
55
|
name: string[];
|
54
56
|
options?: undefined;
|
57
|
+
initialValue?: undefined;
|
55
58
|
})[];
|
56
59
|
options?: undefined;
|
57
60
|
name?: undefined;
|
@@ -118,7 +121,7 @@ declare const _default: ({
|
|
118
121
|
label: string;
|
119
122
|
value: string;
|
120
123
|
}[];
|
121
|
-
initialValue
|
124
|
+
initialValue: string;
|
122
125
|
addonAfter?: undefined;
|
123
126
|
} | {
|
124
127
|
type: string;
|
@@ -1,3 +1,5 @@
|
|
1
|
+
var _a, _b;
|
2
|
+
import { fontOptions } from '../../defaultSetting';
|
1
3
|
export default [
|
2
4
|
{
|
3
5
|
title: '商品图片',
|
@@ -69,8 +71,9 @@ export default [
|
|
69
71
|
},
|
70
72
|
{
|
71
73
|
type: 'Select',
|
72
|
-
options:
|
73
|
-
name: ['fontFamily']
|
74
|
+
options: fontOptions,
|
75
|
+
name: ['fontFamily'],
|
76
|
+
initialValue: (_a = fontOptions === null || fontOptions === void 0 ? void 0 : fontOptions[0]) === null || _a === void 0 ? void 0 : _a.value
|
74
77
|
},
|
75
78
|
{
|
76
79
|
type: 'Number',
|
@@ -149,7 +152,8 @@ export default [
|
|
149
152
|
{
|
150
153
|
type: 'Select',
|
151
154
|
name: ['props', 'buttonStyle', 'fontFamily'],
|
152
|
-
options:
|
155
|
+
options: fontOptions,
|
156
|
+
initialValue: (_b = fontOptions === null || fontOptions === void 0 ? void 0 : fontOptions[0]) === null || _b === void 0 ? void 0 : _b.value
|
153
157
|
},
|
154
158
|
{
|
155
159
|
type: 'Number',
|
@@ -50,6 +50,7 @@ declare const _default: ({
|
|
50
50
|
type: string;
|
51
51
|
name: string[];
|
52
52
|
options?: undefined;
|
53
|
+
initialValue?: undefined;
|
53
54
|
addonAfter?: undefined;
|
54
55
|
} | {
|
55
56
|
type: string;
|
@@ -58,12 +59,14 @@ declare const _default: ({
|
|
58
59
|
value: string;
|
59
60
|
}[];
|
60
61
|
name: string[];
|
62
|
+
initialValue: string;
|
61
63
|
addonAfter?: undefined;
|
62
64
|
} | {
|
63
65
|
type: string;
|
64
66
|
addonAfter: string;
|
65
67
|
name: string[];
|
66
68
|
options?: undefined;
|
69
|
+
initialValue?: undefined;
|
67
70
|
})[];
|
68
71
|
name?: undefined;
|
69
72
|
} | {
|
@@ -101,6 +104,7 @@ declare const _default: ({
|
|
101
104
|
type: string;
|
102
105
|
name: string[];
|
103
106
|
options?: undefined;
|
107
|
+
initialValue?: undefined;
|
104
108
|
addonAfter?: undefined;
|
105
109
|
} | {
|
106
110
|
type: string;
|
@@ -109,12 +113,14 @@ declare const _default: ({
|
|
109
113
|
value: string;
|
110
114
|
}[];
|
111
115
|
name: string[];
|
116
|
+
initialValue: string;
|
112
117
|
addonAfter?: undefined;
|
113
118
|
} | {
|
114
119
|
type: string;
|
115
120
|
addonAfter: string;
|
116
121
|
name: string[];
|
117
122
|
options?: undefined;
|
123
|
+
initialValue?: undefined;
|
118
124
|
})[];
|
119
125
|
name?: undefined;
|
120
126
|
})[];
|
@@ -1,3 +1,5 @@
|
|
1
|
+
var _a, _b;
|
2
|
+
import { fontOptions } from '../../defaultSetting';
|
1
3
|
export default [
|
2
4
|
{
|
3
5
|
title: '主题样式',
|
@@ -112,8 +114,9 @@ export default [
|
|
112
114
|
},
|
113
115
|
{
|
114
116
|
type: 'Select',
|
115
|
-
options:
|
116
|
-
name: ['props', 'ctaTempStyles', 'title', 'fontFamily']
|
117
|
+
options: fontOptions,
|
118
|
+
name: ['props', 'ctaTempStyles', 'title', 'fontFamily'],
|
119
|
+
initialValue: (_a = fontOptions === null || fontOptions === void 0 ? void 0 : fontOptions[0]) === null || _a === void 0 ? void 0 : _a.value
|
117
120
|
},
|
118
121
|
{
|
119
122
|
type: 'Number',
|
@@ -190,8 +193,9 @@ export default [
|
|
190
193
|
},
|
191
194
|
{
|
192
195
|
type: 'Select',
|
193
|
-
options:
|
194
|
-
name: ['props', 'ctaTempStyles', 'ctaTitle', 'fontFamily']
|
196
|
+
options: fontOptions,
|
197
|
+
name: ['props', 'ctaTempStyles', 'ctaTitle', 'fontFamily'],
|
198
|
+
initialValue: (_b = fontOptions === null || fontOptions === void 0 ? void 0 : fontOptions[0]) === null || _b === void 0 ? void 0 : _b.value
|
195
199
|
},
|
196
200
|
{
|
197
201
|
type: 'Number',
|
@@ -23,25 +23,23 @@ function useEventReport() {
|
|
23
23
|
else if (data === null || data === void 0 ? void 0 : data.product) {
|
24
24
|
fromKName = 'productPage';
|
25
25
|
}
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
});
|
44
|
-
}
|
26
|
+
bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
|
27
|
+
eventInfo: {
|
28
|
+
eventSubject: 'jumpToWeb',
|
29
|
+
eventDescription: 'User jumped to website',
|
30
|
+
productId: (_h = product === null || product === void 0 ? void 0 : product.itemId) !== null && _h !== void 0 ? _h : '',
|
31
|
+
productName: (_j = product === null || product === void 0 ? void 0 : product.title) !== null && _j !== void 0 ? _j : '',
|
32
|
+
price: (product === null || product === void 0 ? void 0 : product.price) ? (product === null || product === void 0 ? void 0 : product.price) + '' : '0',
|
33
|
+
productCollection: (_k = product === null || product === void 0 ? void 0 : product.collection) !== null && _k !== void 0 ? _k : '',
|
34
|
+
fromKName,
|
35
|
+
fromKPage: location === null || location === void 0 ? void 0 : location.href,
|
36
|
+
contentTags: (product === null || product === void 0 ? void 0 : product.tags) ? JSON.stringify(product === null || product === void 0 ? void 0 : product.tags) : '',
|
37
|
+
position: (data === null || data === void 0 ? void 0 : data.position) + '',
|
38
|
+
relatedContentId: (_m = (_l = data === null || data === void 0 ? void 0 : data.video) === null || _l === void 0 ? void 0 : _l.itemId) !== null && _m !== void 0 ? _m : '',
|
39
|
+
relatedCtatId: (_o = cta === null || cta === void 0 ? void 0 : cta.itemId) !== null && _o !== void 0 ? _o : '',
|
40
|
+
traceInfo: (_p = product === null || product === void 0 ? void 0 : product.traceInfo) !== null && _p !== void 0 ? _p : ''
|
41
|
+
}
|
42
|
+
});
|
45
43
|
}, [bffEventReport, popupDetailData, isFromHashtag]);
|
46
44
|
const productView = (0, react_1.useCallback)((data, product, cta, viewTime) => {
|
47
45
|
var _a, _b, _c, _d;
|
@@ -52,26 +50,24 @@ function useEventReport() {
|
|
52
50
|
else if (data === null || data === void 0 ? void 0 : data.product) {
|
53
51
|
fromKName = 'productPage';
|
54
52
|
}
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
});
|
74
|
-
}
|
53
|
+
bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
|
54
|
+
eventInfo: {
|
55
|
+
productId: product === null || product === void 0 ? void 0 : product.itemId,
|
56
|
+
productName: product === null || product === void 0 ? void 0 : product.title,
|
57
|
+
price: (product === null || product === void 0 ? void 0 : product.price) ? (product === null || product === void 0 ? void 0 : product.price) + '' : '0',
|
58
|
+
productCollection: product === null || product === void 0 ? void 0 : product.collection,
|
59
|
+
fromKName,
|
60
|
+
fromKPage: location === null || location === void 0 ? void 0 : location.href,
|
61
|
+
contentTags: JSON.stringify(product === null || product === void 0 ? void 0 : product.tags),
|
62
|
+
position: (data === null || data === void 0 ? void 0 : data.position) + '',
|
63
|
+
relatedContentId: (_d = data === null || data === void 0 ? void 0 : data.video) === null || _d === void 0 ? void 0 : _d.itemId,
|
64
|
+
relatedCtatId: cta === null || cta === void 0 ? void 0 : cta.itemId,
|
65
|
+
traceInfo: product === null || product === void 0 ? void 0 : product.traceInfo,
|
66
|
+
timeOnSite: Math.floor((new Date() - viewTime) / 1000) + '',
|
67
|
+
eventSubject: 'productView',
|
68
|
+
eventDescription: 'User browsed the product'
|
69
|
+
}
|
70
|
+
});
|
75
71
|
}, [bffEventReport, popupDetailData]);
|
76
72
|
return {
|
77
73
|
jumpToWeb,
|
package/lib/index.d.ts
CHANGED
@@ -7,4 +7,5 @@ export { default as SxpDataSourceProvider } from './core/context/SxpDataSourcePr
|
|
7
7
|
export { default as SxpPageCore } from './core/components/SxpPageCore';
|
8
8
|
export { default as EditorDataProvider } from './core/context/EditorDataProvider';
|
9
9
|
export { useEditorDataProvider } from './core/context/EditorDataProvider';
|
10
|
+
export { default as defaultSetting } from './materials/sxp/defaultSetting';
|
10
11
|
export default Pagebuilder;
|
package/lib/index.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.useEditorDataProvider = exports.EditorDataProvider = exports.SxpPageCore = exports.SxpDataSourceProvider = exports.Modal = exports.SxpPageRender = exports.materials = exports.core = void 0;
|
3
|
+
exports.defaultSetting = exports.useEditorDataProvider = exports.EditorDataProvider = exports.SxpPageCore = exports.SxpDataSourceProvider = exports.Modal = exports.SxpPageRender = exports.materials = exports.core = void 0;
|
4
4
|
const tslib_1 = require("tslib");
|
5
5
|
const Pagebuilder_1 = require("./core/Pagebuilder");
|
6
6
|
exports.core = tslib_1.__importStar(require("./core"));
|
@@ -17,4 +17,6 @@ var EditorDataProvider_1 = require("./core/context/EditorDataProvider");
|
|
17
17
|
Object.defineProperty(exports, "EditorDataProvider", { enumerable: true, get: function () { return tslib_1.__importDefault(EditorDataProvider_1).default; } });
|
18
18
|
var EditorDataProvider_2 = require("./core/context/EditorDataProvider");
|
19
19
|
Object.defineProperty(exports, "useEditorDataProvider", { enumerable: true, get: function () { return EditorDataProvider_2.useEditorDataProvider; } });
|
20
|
+
var defaultSetting_1 = require("./materials/sxp/defaultSetting");
|
21
|
+
Object.defineProperty(exports, "defaultSetting", { enumerable: true, get: function () { return tslib_1.__importDefault(defaultSetting_1).default; } });
|
20
22
|
exports.default = Pagebuilder_1.Pagebuilder;
|
@@ -33,6 +33,7 @@ declare const _default: ({
|
|
33
33
|
type: string;
|
34
34
|
name: string[];
|
35
35
|
options?: undefined;
|
36
|
+
initialValue?: undefined;
|
36
37
|
addonAfter?: undefined;
|
37
38
|
} | {
|
38
39
|
type: string;
|
@@ -41,12 +42,14 @@ declare const _default: ({
|
|
41
42
|
value: string;
|
42
43
|
}[];
|
43
44
|
name: string[];
|
45
|
+
initialValue: string;
|
44
46
|
addonAfter?: undefined;
|
45
47
|
} | {
|
46
48
|
type: string;
|
47
49
|
addonAfter: string;
|
48
50
|
name: string[];
|
49
51
|
options?: undefined;
|
52
|
+
initialValue?: undefined;
|
50
53
|
})[];
|
51
54
|
options?: undefined;
|
52
55
|
name?: undefined;
|
@@ -106,7 +109,7 @@ declare const _default: ({
|
|
106
109
|
label: string;
|
107
110
|
value: string;
|
108
111
|
}[];
|
109
|
-
initialValue
|
112
|
+
initialValue: string;
|
110
113
|
addonAfter?: undefined;
|
111
114
|
} | {
|
112
115
|
type: string;
|
@@ -1,5 +1,7 @@
|
|
1
1
|
"use strict";
|
2
|
+
var _a, _b;
|
2
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
4
|
+
const defaultSetting_1 = require("../defaultSetting");
|
3
5
|
exports.default = [
|
4
6
|
{
|
5
7
|
title: '卡片样式',
|
@@ -58,8 +60,9 @@ exports.default = [
|
|
58
60
|
},
|
59
61
|
{
|
60
62
|
type: 'Select',
|
61
|
-
options:
|
62
|
-
name: ['fontFamily']
|
63
|
+
options: defaultSetting_1.fontOptions,
|
64
|
+
name: ['fontFamily'],
|
65
|
+
initialValue: (_a = defaultSetting_1.fontOptions === null || defaultSetting_1.fontOptions === void 0 ? void 0 : defaultSetting_1.fontOptions[0]) === null || _a === void 0 ? void 0 : _a.value
|
63
66
|
},
|
64
67
|
{
|
65
68
|
type: 'Number',
|
@@ -133,7 +136,8 @@ exports.default = [
|
|
133
136
|
{
|
134
137
|
type: 'Select',
|
135
138
|
name: ['props', 'buttonStyle', 'fontFamily'],
|
136
|
-
options:
|
139
|
+
options: defaultSetting_1.fontOptions,
|
140
|
+
initialValue: (_b = defaultSetting_1.fontOptions === null || defaultSetting_1.fontOptions === void 0 ? void 0 : defaultSetting_1.fontOptions[0]) === null || _b === void 0 ? void 0 : _b.value
|
137
141
|
},
|
138
142
|
{
|
139
143
|
type: 'Number',
|