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
package/dist/index.js
CHANGED
@@ -850,6 +850,14 @@ var interactionRender$8 = [
|
|
850
850
|
}
|
851
851
|
];
|
852
852
|
|
853
|
+
const fontOptions = [
|
854
|
+
{ label: '应用字体', value: 'appFont' },
|
855
|
+
{ label: '黑体', value: '黑体' }
|
856
|
+
];
|
857
|
+
var defaultSetting = {
|
858
|
+
fontOptions
|
859
|
+
};
|
860
|
+
|
853
861
|
/*
|
854
862
|
* @Author: binruan@chatlabs.com
|
855
863
|
* @Date: 2023-07-28 18:29:57
|
@@ -858,6 +866,7 @@ var interactionRender$8 = [
|
|
858
866
|
* @FilePath: \pb-sxp-ui\src\materials\sxp\popup\AppointForm\settingRender.tsx
|
859
867
|
*
|
860
868
|
*/
|
869
|
+
var _a$4;
|
861
870
|
var settingRender$5 = [
|
862
871
|
{
|
863
872
|
type: 'Text',
|
@@ -883,7 +892,8 @@ var settingRender$5 = [
|
|
883
892
|
{
|
884
893
|
type: 'Select',
|
885
894
|
name: ['textStyle', 'fontFamily'],
|
886
|
-
options:
|
895
|
+
options: fontOptions,
|
896
|
+
initialValue: (_a$4 = fontOptions === null || fontOptions === void 0 ? void 0 : fontOptions[0]) === null || _a$4 === void 0 ? void 0 : _a$4.value
|
887
897
|
},
|
888
898
|
{
|
889
899
|
type: 'Number',
|
@@ -1040,6 +1050,14 @@ function createMaterial(component, options) {
|
|
1040
1050
|
return component;
|
1041
1051
|
}
|
1042
1052
|
|
1053
|
+
/*
|
1054
|
+
* @Author: binruan@chatlabs.com
|
1055
|
+
* @Date: 2023-07-28 18:29:57
|
1056
|
+
* @LastEditors: binruan@chatlabs.com
|
1057
|
+
* @LastEditTime: 2024-04-12 17:35:22
|
1058
|
+
* @FilePath: \pb-sxp-ui\src\materials\sxp\popup\AppointForm\material.tsx
|
1059
|
+
*
|
1060
|
+
*/
|
1043
1061
|
const AppointForm = createMaterial(AppointFormComponent, {
|
1044
1062
|
displayName: '预约表单',
|
1045
1063
|
icon: '',
|
@@ -1063,7 +1081,6 @@ const AppointForm = createMaterial(AppointFormComponent, {
|
|
1063
1081
|
textStyle: {
|
1064
1082
|
fontSize: 14,
|
1065
1083
|
color: '#000',
|
1066
|
-
fontFamily: '黑体',
|
1067
1084
|
textAlign: 'center'
|
1068
1085
|
}
|
1069
1086
|
},
|
@@ -1076,10 +1093,11 @@ const AppointForm = createMaterial(AppointFormComponent, {
|
|
1076
1093
|
* @Author: binruan@chatlabs.com
|
1077
1094
|
* @Date: 2024-04-02 18:01:34
|
1078
1095
|
* @LastEditors: binruan@chatlabs.com
|
1079
|
-
* @LastEditTime: 2024-04-
|
1080
|
-
* @FilePath: \pb-sxp-ui\src\materials\sxp\popup\
|
1096
|
+
* @LastEditTime: 2024-04-12 16:46:04
|
1097
|
+
* @FilePath: \pb-sxp-ui\src\materials\sxp\popup\CommodityDetail\settingRender.tsx
|
1081
1098
|
*
|
1082
1099
|
*/
|
1100
|
+
var _a$3, _b$3;
|
1083
1101
|
/*
|
1084
1102
|
* @Author: binruan@chatlabs.com
|
1085
1103
|
* @Date: 2024-03-26 16:50:25
|
@@ -1155,8 +1173,9 @@ var settingRender$4 = [
|
|
1155
1173
|
},
|
1156
1174
|
{
|
1157
1175
|
type: 'Select',
|
1158
|
-
options:
|
1159
|
-
name: ['fontFamily']
|
1176
|
+
options: fontOptions,
|
1177
|
+
name: ['fontFamily'],
|
1178
|
+
initialValue: (_a$3 = fontOptions === null || fontOptions === void 0 ? void 0 : fontOptions[0]) === null || _a$3 === void 0 ? void 0 : _a$3.value
|
1160
1179
|
},
|
1161
1180
|
{
|
1162
1181
|
type: 'Number',
|
@@ -1235,7 +1254,8 @@ var settingRender$4 = [
|
|
1235
1254
|
{
|
1236
1255
|
type: 'Select',
|
1237
1256
|
name: ['props', 'buttonStyle', 'fontFamily'],
|
1238
|
-
options:
|
1257
|
+
options: fontOptions,
|
1258
|
+
initialValue: (_b$3 = fontOptions === null || fontOptions === void 0 ? void 0 : fontOptions[0]) === null || _b$3 === void 0 ? void 0 : _b$3.value
|
1239
1259
|
},
|
1240
1260
|
{
|
1241
1261
|
type: 'Number',
|
@@ -8063,7 +8083,7 @@ SwiperSlide.displayName = 'SwiperSlide';
|
|
8063
8083
|
* @Author: binruan@chatlabs.com
|
8064
8084
|
* @Date: 2024-03-12 10:59:06
|
8065
8085
|
* @LastEditors: binruan@chatlabs.com
|
8066
|
-
* @LastEditTime: 2024-04-
|
8086
|
+
* @LastEditTime: 2024-04-12 15:10:39
|
8067
8087
|
* @FilePath: \pb-sxp-ui\src\core\hooks\useEventReport.ts
|
8068
8088
|
*
|
8069
8089
|
*/
|
@@ -8087,25 +8107,23 @@ function useEventReport() {
|
|
8087
8107
|
else if (data === null || data === void 0 ? void 0 : data.product) {
|
8088
8108
|
fromKName = 'productPage';
|
8089
8109
|
}
|
8090
|
-
|
8091
|
-
|
8092
|
-
|
8093
|
-
|
8094
|
-
|
8095
|
-
|
8096
|
-
|
8097
|
-
|
8098
|
-
|
8099
|
-
|
8100
|
-
|
8101
|
-
|
8102
|
-
|
8103
|
-
|
8104
|
-
|
8105
|
-
|
8106
|
-
|
8107
|
-
});
|
8108
|
-
}
|
8110
|
+
bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
|
8111
|
+
eventInfo: {
|
8112
|
+
eventSubject: 'jumpToWeb',
|
8113
|
+
eventDescription: 'User jumped to website',
|
8114
|
+
productId: (_h = product === null || product === void 0 ? void 0 : product.itemId) !== null && _h !== void 0 ? _h : '',
|
8115
|
+
productName: (_j = product === null || product === void 0 ? void 0 : product.title) !== null && _j !== void 0 ? _j : '',
|
8116
|
+
price: (product === null || product === void 0 ? void 0 : product.price) ? (product === null || product === void 0 ? void 0 : product.price) + '' : '0',
|
8117
|
+
productCollection: (_k = product === null || product === void 0 ? void 0 : product.collection) !== null && _k !== void 0 ? _k : '',
|
8118
|
+
fromKName,
|
8119
|
+
fromKPage: location === null || location === void 0 ? void 0 : location.href,
|
8120
|
+
contentTags: (product === null || product === void 0 ? void 0 : product.tags) ? JSON.stringify(product === null || product === void 0 ? void 0 : product.tags) : '',
|
8121
|
+
position: (data === null || data === void 0 ? void 0 : data.position) + '',
|
8122
|
+
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 : '',
|
8123
|
+
relatedCtatId: (_o = cta === null || cta === void 0 ? void 0 : cta.itemId) !== null && _o !== void 0 ? _o : '',
|
8124
|
+
traceInfo: (_p = product === null || product === void 0 ? void 0 : product.traceInfo) !== null && _p !== void 0 ? _p : ''
|
8125
|
+
}
|
8126
|
+
});
|
8109
8127
|
}, [bffEventReport, popupDetailData, isFromHashtag]);
|
8110
8128
|
const productView = useCallback((data, product, cta, viewTime) => {
|
8111
8129
|
var _a, _b, _c, _d;
|
@@ -8116,26 +8134,24 @@ function useEventReport() {
|
|
8116
8134
|
else if (data === null || data === void 0 ? void 0 : data.product) {
|
8117
8135
|
fromKName = 'productPage';
|
8118
8136
|
}
|
8119
|
-
|
8120
|
-
|
8121
|
-
|
8122
|
-
|
8123
|
-
|
8124
|
-
|
8125
|
-
|
8126
|
-
|
8127
|
-
|
8128
|
-
|
8129
|
-
|
8130
|
-
|
8131
|
-
|
8132
|
-
|
8133
|
-
|
8134
|
-
|
8135
|
-
|
8136
|
-
|
8137
|
-
});
|
8138
|
-
}
|
8137
|
+
bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
|
8138
|
+
eventInfo: {
|
8139
|
+
productId: product === null || product === void 0 ? void 0 : product.itemId,
|
8140
|
+
productName: product === null || product === void 0 ? void 0 : product.title,
|
8141
|
+
price: (product === null || product === void 0 ? void 0 : product.price) ? (product === null || product === void 0 ? void 0 : product.price) + '' : '0',
|
8142
|
+
productCollection: product === null || product === void 0 ? void 0 : product.collection,
|
8143
|
+
fromKName,
|
8144
|
+
fromKPage: location === null || location === void 0 ? void 0 : location.href,
|
8145
|
+
contentTags: JSON.stringify(product === null || product === void 0 ? void 0 : product.tags),
|
8146
|
+
position: (data === null || data === void 0 ? void 0 : data.position) + '',
|
8147
|
+
relatedContentId: (_d = data === null || data === void 0 ? void 0 : data.video) === null || _d === void 0 ? void 0 : _d.itemId,
|
8148
|
+
relatedCtatId: cta === null || cta === void 0 ? void 0 : cta.itemId,
|
8149
|
+
traceInfo: product === null || product === void 0 ? void 0 : product.traceInfo,
|
8150
|
+
timeOnSite: Math.floor((new Date() - viewTime) / 1000) + '',
|
8151
|
+
eventSubject: 'productView',
|
8152
|
+
eventDescription: 'User browsed the product'
|
8153
|
+
}
|
8154
|
+
});
|
8139
8155
|
}, [bffEventReport, popupDetailData]);
|
8140
8156
|
return {
|
8141
8157
|
jumpToWeb,
|
@@ -8535,11 +8551,12 @@ const Prompt = createMaterial(PromptComponent, {
|
|
8535
8551
|
sort: 3
|
8536
8552
|
});
|
8537
8553
|
|
8554
|
+
var _a$2, _b$2;
|
8538
8555
|
/*
|
8539
8556
|
* @Author: binruan@chatlabs.com
|
8540
8557
|
* @Date: 2024-03-26 16:50:25
|
8541
8558
|
* @LastEditors: binruan@chatlabs.com
|
8542
|
-
* @LastEditTime: 2024-
|
8559
|
+
* @LastEditTime: 2024-04-12 17:37:19
|
8543
8560
|
* @FilePath: \pb-sxp-ui\src\materials\sxp\popup\CommodityDetailDiroNew\settingRender.tsx
|
8544
8561
|
*
|
8545
8562
|
*/
|
@@ -8614,8 +8631,9 @@ var settingRender$2 = [
|
|
8614
8631
|
},
|
8615
8632
|
{
|
8616
8633
|
type: 'Select',
|
8617
|
-
options:
|
8618
|
-
name: ['fontFamily']
|
8634
|
+
options: fontOptions,
|
8635
|
+
name: ['fontFamily'],
|
8636
|
+
initialValue: (_a$2 = fontOptions === null || fontOptions === void 0 ? void 0 : fontOptions[0]) === null || _a$2 === void 0 ? void 0 : _a$2.value
|
8619
8637
|
},
|
8620
8638
|
{
|
8621
8639
|
type: 'Number',
|
@@ -8694,7 +8712,8 @@ var settingRender$2 = [
|
|
8694
8712
|
{
|
8695
8713
|
type: 'Select',
|
8696
8714
|
name: ['props', 'buttonStyle', 'fontFamily'],
|
8697
|
-
options:
|
8715
|
+
options: fontOptions,
|
8716
|
+
initialValue: (_b$2 = fontOptions === null || fontOptions === void 0 ? void 0 : fontOptions[0]) === null || _b$2 === void 0 ? void 0 : _b$2.value
|
8698
8717
|
},
|
8699
8718
|
{
|
8700
8719
|
type: 'Number',
|
@@ -8883,11 +8902,12 @@ const CommodityDetailDiroNew = createMaterial(CommodityDetailDiroNewComponent, {
|
|
8883
8902
|
sort: 1
|
8884
8903
|
});
|
8885
8904
|
|
8905
|
+
var _a$1, _b$1;
|
8886
8906
|
/*
|
8887
8907
|
* @Author: binruan@chatlabs.com
|
8888
8908
|
* @Date: 2024-03-26 16:50:25
|
8889
8909
|
* @LastEditors: binruan@chatlabs.com
|
8890
|
-
* @LastEditTime: 2024-04-
|
8910
|
+
* @LastEditTime: 2024-04-12 17:38:12
|
8891
8911
|
* @FilePath: \pb-sxp-ui\src\materials\sxp\template\components\settingRender.tsx
|
8892
8912
|
*
|
8893
8913
|
*/
|
@@ -9005,8 +9025,9 @@ var settingRender$1 = [
|
|
9005
9025
|
},
|
9006
9026
|
{
|
9007
9027
|
type: 'Select',
|
9008
|
-
options:
|
9009
|
-
name: ['props', 'ctaTempStyles', 'title', 'fontFamily']
|
9028
|
+
options: fontOptions,
|
9029
|
+
name: ['props', 'ctaTempStyles', 'title', 'fontFamily'],
|
9030
|
+
initialValue: (_a$1 = fontOptions === null || fontOptions === void 0 ? void 0 : fontOptions[0]) === null || _a$1 === void 0 ? void 0 : _a$1.value
|
9010
9031
|
},
|
9011
9032
|
{
|
9012
9033
|
type: 'Number',
|
@@ -9083,8 +9104,9 @@ var settingRender$1 = [
|
|
9083
9104
|
},
|
9084
9105
|
{
|
9085
9106
|
type: 'Select',
|
9086
|
-
options:
|
9087
|
-
name: ['props', 'ctaTempStyles', 'ctaTitle', 'fontFamily']
|
9107
|
+
options: fontOptions,
|
9108
|
+
name: ['props', 'ctaTempStyles', 'ctaTitle', 'fontFamily'],
|
9109
|
+
initialValue: (_b$1 = fontOptions === null || fontOptions === void 0 ? void 0 : fontOptions[0]) === null || _b$1 === void 0 ? void 0 : _b$1.value
|
9088
9110
|
},
|
9089
9111
|
{
|
9090
9112
|
type: 'Number',
|
@@ -9971,11 +9993,12 @@ const MultiCommodityDiroNew = createMaterial(MultiCommodityDiroNewComponent, {
|
|
9971
9993
|
sort: 4
|
9972
9994
|
});
|
9973
9995
|
|
9996
|
+
var _a, _b;
|
9974
9997
|
/*
|
9975
9998
|
* @Author: binruan@chatlabs.com
|
9976
9999
|
* @Date: 2024-04-07 14:07:12
|
9977
10000
|
* @LastEditors: binruan@chatlabs.com
|
9978
|
-
* @LastEditTime: 2024-04-
|
10001
|
+
* @LastEditTime: 2024-04-12 17:39:45
|
9979
10002
|
* @FilePath: \pb-sxp-ui\src\materials\sxp\HashTag\settingRender.tsx
|
9980
10003
|
*
|
9981
10004
|
*/
|
@@ -10037,8 +10060,9 @@ var settingRender = [
|
|
10037
10060
|
},
|
10038
10061
|
{
|
10039
10062
|
type: 'Select',
|
10040
|
-
options:
|
10041
|
-
name: ['fontFamily']
|
10063
|
+
options: fontOptions,
|
10064
|
+
name: ['fontFamily'],
|
10065
|
+
initialValue: (_a = fontOptions === null || fontOptions === void 0 ? void 0 : fontOptions[0]) === null || _a === void 0 ? void 0 : _a.value
|
10042
10066
|
},
|
10043
10067
|
{
|
10044
10068
|
type: 'Number',
|
@@ -10112,7 +10136,8 @@ var settingRender = [
|
|
10112
10136
|
{
|
10113
10137
|
type: 'Select',
|
10114
10138
|
name: ['props', 'buttonStyle', 'fontFamily'],
|
10115
|
-
options:
|
10139
|
+
options: fontOptions,
|
10140
|
+
initialValue: (_b = fontOptions === null || fontOptions === void 0 ? void 0 : fontOptions[0]) === null || _b === void 0 ? void 0 : _b.value
|
10116
10141
|
},
|
10117
10142
|
{
|
10118
10143
|
type: 'Number',
|
@@ -12949,9 +12974,9 @@ function useEditorDataProvider() {
|
|
12949
12974
|
* @Author : haocanweng@chatlabs.cn
|
12950
12975
|
* @Date : 2023-08-21 16:31:58
|
12951
12976
|
* @LastEditors: binruan@chatlabs.com
|
12952
|
-
* @LastEditTime:
|
12977
|
+
* @LastEditTime: 2024-04-12 16:59:53
|
12953
12978
|
* @FilePath: \pb-sxp-ui\src\index.ts
|
12954
12979
|
*/
|
12955
12980
|
|
12956
|
-
export { EditorDataProvider, Modal$1 as Modal, SxpDataSourceProvider$1 as SxpDataSourceProvider, index as SxpPageCore, SxpPageRender, index$1 as core, Pagebuilder as default, _materials_ as materials, useEditorDataProvider };
|
12981
|
+
export { EditorDataProvider, Modal$1 as Modal, SxpDataSourceProvider$1 as SxpDataSourceProvider, index as SxpPageCore, SxpPageRender, index$1 as core, Pagebuilder as default, defaultSetting, _materials_ as materials, useEditorDataProvider };
|
12957
12982
|
//# sourceMappingURL=index.js.map
|