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/pb-ui.js
CHANGED
@@ -865,6 +865,14 @@
|
|
865
865
|
}
|
866
866
|
];
|
867
867
|
|
868
|
+
const fontOptions = [
|
869
|
+
{ label: '应用字体', value: 'appFont' },
|
870
|
+
{ label: '黑体', value: '黑体' }
|
871
|
+
];
|
872
|
+
var defaultSetting = {
|
873
|
+
fontOptions
|
874
|
+
};
|
875
|
+
|
868
876
|
/*
|
869
877
|
* @Author: binruan@chatlabs.com
|
870
878
|
* @Date: 2023-07-28 18:29:57
|
@@ -873,6 +881,7 @@
|
|
873
881
|
* @FilePath: \pb-sxp-ui\src\materials\sxp\popup\AppointForm\settingRender.tsx
|
874
882
|
*
|
875
883
|
*/
|
884
|
+
var _a$4;
|
876
885
|
var settingRender$5 = [
|
877
886
|
{
|
878
887
|
type: 'Text',
|
@@ -898,7 +907,8 @@
|
|
898
907
|
{
|
899
908
|
type: 'Select',
|
900
909
|
name: ['textStyle', 'fontFamily'],
|
901
|
-
options:
|
910
|
+
options: fontOptions,
|
911
|
+
initialValue: (_a$4 = fontOptions === null || fontOptions === void 0 ? void 0 : fontOptions[0]) === null || _a$4 === void 0 ? void 0 : _a$4.value
|
902
912
|
},
|
903
913
|
{
|
904
914
|
type: 'Number',
|
@@ -1055,6 +1065,14 @@
|
|
1055
1065
|
return component;
|
1056
1066
|
}
|
1057
1067
|
|
1068
|
+
/*
|
1069
|
+
* @Author: binruan@chatlabs.com
|
1070
|
+
* @Date: 2023-07-28 18:29:57
|
1071
|
+
* @LastEditors: binruan@chatlabs.com
|
1072
|
+
* @LastEditTime: 2024-04-12 17:35:22
|
1073
|
+
* @FilePath: \pb-sxp-ui\src\materials\sxp\popup\AppointForm\material.tsx
|
1074
|
+
*
|
1075
|
+
*/
|
1058
1076
|
const AppointForm = createMaterial(AppointFormComponent, {
|
1059
1077
|
displayName: '预约表单',
|
1060
1078
|
icon: '',
|
@@ -1078,7 +1096,6 @@
|
|
1078
1096
|
textStyle: {
|
1079
1097
|
fontSize: 14,
|
1080
1098
|
color: '#000',
|
1081
|
-
fontFamily: '黑体',
|
1082
1099
|
textAlign: 'center'
|
1083
1100
|
}
|
1084
1101
|
},
|
@@ -1091,10 +1108,11 @@
|
|
1091
1108
|
* @Author: binruan@chatlabs.com
|
1092
1109
|
* @Date: 2024-04-02 18:01:34
|
1093
1110
|
* @LastEditors: binruan@chatlabs.com
|
1094
|
-
* @LastEditTime: 2024-04-
|
1095
|
-
* @FilePath: \pb-sxp-ui\src\materials\sxp\popup\
|
1111
|
+
* @LastEditTime: 2024-04-12 16:46:04
|
1112
|
+
* @FilePath: \pb-sxp-ui\src\materials\sxp\popup\CommodityDetail\settingRender.tsx
|
1096
1113
|
*
|
1097
1114
|
*/
|
1115
|
+
var _a$3, _b$3;
|
1098
1116
|
/*
|
1099
1117
|
* @Author: binruan@chatlabs.com
|
1100
1118
|
* @Date: 2024-03-26 16:50:25
|
@@ -1170,8 +1188,9 @@
|
|
1170
1188
|
},
|
1171
1189
|
{
|
1172
1190
|
type: 'Select',
|
1173
|
-
options:
|
1174
|
-
name: ['fontFamily']
|
1191
|
+
options: fontOptions,
|
1192
|
+
name: ['fontFamily'],
|
1193
|
+
initialValue: (_a$3 = fontOptions === null || fontOptions === void 0 ? void 0 : fontOptions[0]) === null || _a$3 === void 0 ? void 0 : _a$3.value
|
1175
1194
|
},
|
1176
1195
|
{
|
1177
1196
|
type: 'Number',
|
@@ -1250,7 +1269,8 @@
|
|
1250
1269
|
{
|
1251
1270
|
type: 'Select',
|
1252
1271
|
name: ['props', 'buttonStyle', 'fontFamily'],
|
1253
|
-
options:
|
1272
|
+
options: fontOptions,
|
1273
|
+
initialValue: (_b$3 = fontOptions === null || fontOptions === void 0 ? void 0 : fontOptions[0]) === null || _b$3 === void 0 ? void 0 : _b$3.value
|
1254
1274
|
},
|
1255
1275
|
{
|
1256
1276
|
type: 'Number',
|
@@ -8078,7 +8098,7 @@
|
|
8078
8098
|
* @Author: binruan@chatlabs.com
|
8079
8099
|
* @Date: 2024-03-12 10:59:06
|
8080
8100
|
* @LastEditors: binruan@chatlabs.com
|
8081
|
-
* @LastEditTime: 2024-04-
|
8101
|
+
* @LastEditTime: 2024-04-12 15:10:39
|
8082
8102
|
* @FilePath: \pb-sxp-ui\src\core\hooks\useEventReport.ts
|
8083
8103
|
*
|
8084
8104
|
*/
|
@@ -8102,25 +8122,23 @@
|
|
8102
8122
|
else if (data === null || data === void 0 ? void 0 : data.product) {
|
8103
8123
|
fromKName = 'productPage';
|
8104
8124
|
}
|
8105
|
-
|
8106
|
-
|
8107
|
-
|
8108
|
-
|
8109
|
-
|
8110
|
-
|
8111
|
-
|
8112
|
-
|
8113
|
-
|
8114
|
-
|
8115
|
-
|
8116
|
-
|
8117
|
-
|
8118
|
-
|
8119
|
-
|
8120
|
-
|
8121
|
-
|
8122
|
-
});
|
8123
|
-
}
|
8125
|
+
bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
|
8126
|
+
eventInfo: {
|
8127
|
+
eventSubject: 'jumpToWeb',
|
8128
|
+
eventDescription: 'User jumped to website',
|
8129
|
+
productId: (_h = product === null || product === void 0 ? void 0 : product.itemId) !== null && _h !== void 0 ? _h : '',
|
8130
|
+
productName: (_j = product === null || product === void 0 ? void 0 : product.title) !== null && _j !== void 0 ? _j : '',
|
8131
|
+
price: (product === null || product === void 0 ? void 0 : product.price) ? (product === null || product === void 0 ? void 0 : product.price) + '' : '0',
|
8132
|
+
productCollection: (_k = product === null || product === void 0 ? void 0 : product.collection) !== null && _k !== void 0 ? _k : '',
|
8133
|
+
fromKName,
|
8134
|
+
fromKPage: location === null || location === void 0 ? void 0 : location.href,
|
8135
|
+
contentTags: (product === null || product === void 0 ? void 0 : product.tags) ? JSON.stringify(product === null || product === void 0 ? void 0 : product.tags) : '',
|
8136
|
+
position: (data === null || data === void 0 ? void 0 : data.position) + '',
|
8137
|
+
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 : '',
|
8138
|
+
relatedCtatId: (_o = cta === null || cta === void 0 ? void 0 : cta.itemId) !== null && _o !== void 0 ? _o : '',
|
8139
|
+
traceInfo: (_p = product === null || product === void 0 ? void 0 : product.traceInfo) !== null && _p !== void 0 ? _p : ''
|
8140
|
+
}
|
8141
|
+
});
|
8124
8142
|
}, [bffEventReport, popupDetailData, isFromHashtag]);
|
8125
8143
|
const productView = React.useCallback((data, product, cta, viewTime) => {
|
8126
8144
|
var _a, _b, _c, _d;
|
@@ -8131,26 +8149,24 @@
|
|
8131
8149
|
else if (data === null || data === void 0 ? void 0 : data.product) {
|
8132
8150
|
fromKName = 'productPage';
|
8133
8151
|
}
|
8134
|
-
|
8135
|
-
|
8136
|
-
|
8137
|
-
|
8138
|
-
|
8139
|
-
|
8140
|
-
|
8141
|
-
|
8142
|
-
|
8143
|
-
|
8144
|
-
|
8145
|
-
|
8146
|
-
|
8147
|
-
|
8148
|
-
|
8149
|
-
|
8150
|
-
|
8151
|
-
|
8152
|
-
});
|
8153
|
-
}
|
8152
|
+
bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
|
8153
|
+
eventInfo: {
|
8154
|
+
productId: product === null || product === void 0 ? void 0 : product.itemId,
|
8155
|
+
productName: product === null || product === void 0 ? void 0 : product.title,
|
8156
|
+
price: (product === null || product === void 0 ? void 0 : product.price) ? (product === null || product === void 0 ? void 0 : product.price) + '' : '0',
|
8157
|
+
productCollection: product === null || product === void 0 ? void 0 : product.collection,
|
8158
|
+
fromKName,
|
8159
|
+
fromKPage: location === null || location === void 0 ? void 0 : location.href,
|
8160
|
+
contentTags: JSON.stringify(product === null || product === void 0 ? void 0 : product.tags),
|
8161
|
+
position: (data === null || data === void 0 ? void 0 : data.position) + '',
|
8162
|
+
relatedContentId: (_d = data === null || data === void 0 ? void 0 : data.video) === null || _d === void 0 ? void 0 : _d.itemId,
|
8163
|
+
relatedCtatId: cta === null || cta === void 0 ? void 0 : cta.itemId,
|
8164
|
+
traceInfo: product === null || product === void 0 ? void 0 : product.traceInfo,
|
8165
|
+
timeOnSite: Math.floor((new Date() - viewTime) / 1000) + '',
|
8166
|
+
eventSubject: 'productView',
|
8167
|
+
eventDescription: 'User browsed the product'
|
8168
|
+
}
|
8169
|
+
});
|
8154
8170
|
}, [bffEventReport, popupDetailData]);
|
8155
8171
|
return {
|
8156
8172
|
jumpToWeb,
|
@@ -8550,11 +8566,12 @@
|
|
8550
8566
|
sort: 3
|
8551
8567
|
});
|
8552
8568
|
|
8569
|
+
var _a$2, _b$2;
|
8553
8570
|
/*
|
8554
8571
|
* @Author: binruan@chatlabs.com
|
8555
8572
|
* @Date: 2024-03-26 16:50:25
|
8556
8573
|
* @LastEditors: binruan@chatlabs.com
|
8557
|
-
* @LastEditTime: 2024-
|
8574
|
+
* @LastEditTime: 2024-04-12 17:37:19
|
8558
8575
|
* @FilePath: \pb-sxp-ui\src\materials\sxp\popup\CommodityDetailDiroNew\settingRender.tsx
|
8559
8576
|
*
|
8560
8577
|
*/
|
@@ -8629,8 +8646,9 @@
|
|
8629
8646
|
},
|
8630
8647
|
{
|
8631
8648
|
type: 'Select',
|
8632
|
-
options:
|
8633
|
-
name: ['fontFamily']
|
8649
|
+
options: fontOptions,
|
8650
|
+
name: ['fontFamily'],
|
8651
|
+
initialValue: (_a$2 = fontOptions === null || fontOptions === void 0 ? void 0 : fontOptions[0]) === null || _a$2 === void 0 ? void 0 : _a$2.value
|
8634
8652
|
},
|
8635
8653
|
{
|
8636
8654
|
type: 'Number',
|
@@ -8709,7 +8727,8 @@
|
|
8709
8727
|
{
|
8710
8728
|
type: 'Select',
|
8711
8729
|
name: ['props', 'buttonStyle', 'fontFamily'],
|
8712
|
-
options:
|
8730
|
+
options: fontOptions,
|
8731
|
+
initialValue: (_b$2 = fontOptions === null || fontOptions === void 0 ? void 0 : fontOptions[0]) === null || _b$2 === void 0 ? void 0 : _b$2.value
|
8713
8732
|
},
|
8714
8733
|
{
|
8715
8734
|
type: 'Number',
|
@@ -8898,11 +8917,12 @@ Made in Italy` })));
|
|
8898
8917
|
sort: 1
|
8899
8918
|
});
|
8900
8919
|
|
8920
|
+
var _a$1, _b$1;
|
8901
8921
|
/*
|
8902
8922
|
* @Author: binruan@chatlabs.com
|
8903
8923
|
* @Date: 2024-03-26 16:50:25
|
8904
8924
|
* @LastEditors: binruan@chatlabs.com
|
8905
|
-
* @LastEditTime: 2024-04-
|
8925
|
+
* @LastEditTime: 2024-04-12 17:38:12
|
8906
8926
|
* @FilePath: \pb-sxp-ui\src\materials\sxp\template\components\settingRender.tsx
|
8907
8927
|
*
|
8908
8928
|
*/
|
@@ -9020,8 +9040,9 @@ Made in Italy` })));
|
|
9020
9040
|
},
|
9021
9041
|
{
|
9022
9042
|
type: 'Select',
|
9023
|
-
options:
|
9024
|
-
name: ['props', 'ctaTempStyles', 'title', 'fontFamily']
|
9043
|
+
options: fontOptions,
|
9044
|
+
name: ['props', 'ctaTempStyles', 'title', 'fontFamily'],
|
9045
|
+
initialValue: (_a$1 = fontOptions === null || fontOptions === void 0 ? void 0 : fontOptions[0]) === null || _a$1 === void 0 ? void 0 : _a$1.value
|
9025
9046
|
},
|
9026
9047
|
{
|
9027
9048
|
type: 'Number',
|
@@ -9098,8 +9119,9 @@ Made in Italy` })));
|
|
9098
9119
|
},
|
9099
9120
|
{
|
9100
9121
|
type: 'Select',
|
9101
|
-
options:
|
9102
|
-
name: ['props', 'ctaTempStyles', 'ctaTitle', 'fontFamily']
|
9122
|
+
options: fontOptions,
|
9123
|
+
name: ['props', 'ctaTempStyles', 'ctaTitle', 'fontFamily'],
|
9124
|
+
initialValue: (_b$1 = fontOptions === null || fontOptions === void 0 ? void 0 : fontOptions[0]) === null || _b$1 === void 0 ? void 0 : _b$1.value
|
9103
9125
|
},
|
9104
9126
|
{
|
9105
9127
|
type: 'Number',
|
@@ -9986,11 +10008,12 @@ Made in Italy` })));
|
|
9986
10008
|
sort: 4
|
9987
10009
|
});
|
9988
10010
|
|
10011
|
+
var _a, _b;
|
9989
10012
|
/*
|
9990
10013
|
* @Author: binruan@chatlabs.com
|
9991
10014
|
* @Date: 2024-04-07 14:07:12
|
9992
10015
|
* @LastEditors: binruan@chatlabs.com
|
9993
|
-
* @LastEditTime: 2024-04-
|
10016
|
+
* @LastEditTime: 2024-04-12 17:39:45
|
9994
10017
|
* @FilePath: \pb-sxp-ui\src\materials\sxp\HashTag\settingRender.tsx
|
9995
10018
|
*
|
9996
10019
|
*/
|
@@ -10052,8 +10075,9 @@ Made in Italy` })));
|
|
10052
10075
|
},
|
10053
10076
|
{
|
10054
10077
|
type: 'Select',
|
10055
|
-
options:
|
10056
|
-
name: ['fontFamily']
|
10078
|
+
options: fontOptions,
|
10079
|
+
name: ['fontFamily'],
|
10080
|
+
initialValue: (_a = fontOptions === null || fontOptions === void 0 ? void 0 : fontOptions[0]) === null || _a === void 0 ? void 0 : _a.value
|
10057
10081
|
},
|
10058
10082
|
{
|
10059
10083
|
type: 'Number',
|
@@ -10127,7 +10151,8 @@ Made in Italy` })));
|
|
10127
10151
|
{
|
10128
10152
|
type: 'Select',
|
10129
10153
|
name: ['props', 'buttonStyle', 'fontFamily'],
|
10130
|
-
options:
|
10154
|
+
options: fontOptions,
|
10155
|
+
initialValue: (_b = fontOptions === null || fontOptions === void 0 ? void 0 : fontOptions[0]) === null || _b === void 0 ? void 0 : _b.value
|
10131
10156
|
},
|
10132
10157
|
{
|
10133
10158
|
type: 'Number',
|
@@ -12964,7 +12989,7 @@ Made in Italy` })));
|
|
12964
12989
|
* @Author : haocanweng@chatlabs.cn
|
12965
12990
|
* @Date : 2023-08-21 16:31:58
|
12966
12991
|
* @LastEditors: binruan@chatlabs.com
|
12967
|
-
* @LastEditTime:
|
12992
|
+
* @LastEditTime: 2024-04-12 16:59:53
|
12968
12993
|
* @FilePath: \pb-sxp-ui\src\index.ts
|
12969
12994
|
*/
|
12970
12995
|
|
@@ -12975,6 +13000,7 @@ Made in Italy` })));
|
|
12975
13000
|
exports.SxpPageRender = SxpPageRender;
|
12976
13001
|
exports.core = index$1;
|
12977
13002
|
exports.default = Pagebuilder;
|
13003
|
+
exports.defaultSetting = defaultSetting;
|
12978
13004
|
exports.materials = _materials_;
|
12979
13005
|
exports.useEditorDataProvider = useEditorDataProvider;
|
12980
13006
|
|