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.
Files changed (45) hide show
  1. package/dist/index.cjs +87 -61
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.js +87 -62
  4. package/dist/index.js.map +1 -1
  5. package/dist/index.min.cjs +3 -3
  6. package/dist/index.min.cjs.map +1 -1
  7. package/dist/index.min.js +3 -3
  8. package/dist/index.min.js.map +1 -1
  9. package/dist/pb-ui.js +87 -61
  10. package/dist/pb-ui.js.map +1 -1
  11. package/dist/pb-ui.min.js +3 -3
  12. package/dist/pb-ui.min.js.map +1 -1
  13. package/es/core/hooks/useEventReport.js +35 -39
  14. package/es/index.d.ts +1 -0
  15. package/es/index.js +1 -0
  16. package/es/materials/sxp/HashTag/settingRender.d.ts +4 -1
  17. package/es/materials/sxp/HashTag/settingRender.js +7 -3
  18. package/es/materials/sxp/defaultSetting.d.ts +11 -0
  19. package/es/materials/sxp/defaultSetting.js +7 -0
  20. package/es/materials/sxp/popup/AppointForm/material.js +0 -1
  21. package/es/materials/sxp/popup/AppointForm/settingRender.d.ts +3 -0
  22. package/es/materials/sxp/popup/AppointForm/settingRender.js +4 -1
  23. package/es/materials/sxp/popup/CommodityDetail/settingRender.d.ts +4 -1
  24. package/es/materials/sxp/popup/CommodityDetail/settingRender.js +7 -3
  25. package/es/materials/sxp/popup/CommodityDetailDiroNew/settingRender.d.ts +4 -1
  26. package/es/materials/sxp/popup/CommodityDetailDiroNew/settingRender.js +7 -3
  27. package/es/materials/sxp/template/components/settingRender.d.ts +6 -0
  28. package/es/materials/sxp/template/components/settingRender.js +8 -4
  29. package/lib/core/hooks/useEventReport.js +35 -39
  30. package/lib/index.d.ts +1 -0
  31. package/lib/index.js +3 -1
  32. package/lib/materials/sxp/HashTag/settingRender.d.ts +4 -1
  33. package/lib/materials/sxp/HashTag/settingRender.js +7 -3
  34. package/lib/materials/sxp/defaultSetting.d.ts +11 -0
  35. package/lib/materials/sxp/defaultSetting.js +10 -0
  36. package/lib/materials/sxp/popup/AppointForm/material.js +0 -1
  37. package/lib/materials/sxp/popup/AppointForm/settingRender.d.ts +3 -0
  38. package/lib/materials/sxp/popup/AppointForm/settingRender.js +4 -1
  39. package/lib/materials/sxp/popup/CommodityDetail/settingRender.d.ts +4 -1
  40. package/lib/materials/sxp/popup/CommodityDetail/settingRender.js +7 -3
  41. package/lib/materials/sxp/popup/CommodityDetailDiroNew/settingRender.d.ts +4 -1
  42. package/lib/materials/sxp/popup/CommodityDetailDiroNew/settingRender.js +7 -3
  43. package/lib/materials/sxp/template/components/settingRender.d.ts +6 -0
  44. package/lib/materials/sxp/template/components/settingRender.js +8 -4
  45. 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: [{ label: '黑体', value: '黑体' }]
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-02 18:01:41
1095
- * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\CommodityDetailDiro\settingRender.tsx
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: [{ label: '黑体', value: '黑体' }],
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: [{ label: '黑体', value: '黑体' }]
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-11 22:30:45
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
- if (product === null || product === void 0 ? void 0 : product.price) {
8106
- bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
8107
- eventInfo: {
8108
- eventSubject: 'jumpToWeb',
8109
- eventDescription: 'User jumped to website',
8110
- productId: (_h = product === null || product === void 0 ? void 0 : product.itemId) !== null && _h !== void 0 ? _h : '',
8111
- productName: (_j = product === null || product === void 0 ? void 0 : product.title) !== null && _j !== void 0 ? _j : '',
8112
- price: (product === null || product === void 0 ? void 0 : product.price) ? (product === null || product === void 0 ? void 0 : product.price) + '' : '0',
8113
- productCollection: (_k = product === null || product === void 0 ? void 0 : product.collection) !== null && _k !== void 0 ? _k : '',
8114
- fromKName,
8115
- fromKPage: location === null || location === void 0 ? void 0 : location.href,
8116
- contentTags: (product === null || product === void 0 ? void 0 : product.tags) ? JSON.stringify(product === null || product === void 0 ? void 0 : product.tags) : '',
8117
- position: (data === null || data === void 0 ? void 0 : data.position) + '',
8118
- 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 : '',
8119
- relatedCtatId: (_o = cta === null || cta === void 0 ? void 0 : cta.itemId) !== null && _o !== void 0 ? _o : '',
8120
- traceInfo: (_p = product === null || product === void 0 ? void 0 : product.traceInfo) !== null && _p !== void 0 ? _p : ''
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
- if (product === null || product === void 0 ? void 0 : product.price) {
8135
- bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
8136
- eventInfo: {
8137
- productId: product === null || product === void 0 ? void 0 : product.itemId,
8138
- productName: product === null || product === void 0 ? void 0 : product.title,
8139
- price: (product === null || product === void 0 ? void 0 : product.price) + '',
8140
- productCollection: product === null || product === void 0 ? void 0 : product.collection,
8141
- fromKName,
8142
- fromKPage: location === null || location === void 0 ? void 0 : location.href,
8143
- contentTags: JSON.stringify(product === null || product === void 0 ? void 0 : product.tags),
8144
- position: (data === null || data === void 0 ? void 0 : data.position) + '',
8145
- relatedContentId: (_d = data === null || data === void 0 ? void 0 : data.video) === null || _d === void 0 ? void 0 : _d.itemId,
8146
- relatedCtatId: cta === null || cta === void 0 ? void 0 : cta.itemId,
8147
- traceInfo: product === null || product === void 0 ? void 0 : product.traceInfo,
8148
- timeOnSite: Math.floor((new Date() - viewTime) / 1000) + '',
8149
- eventSubject: 'productView',
8150
- eventDescription: 'User browsed the product'
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-03-28 18:42:26
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: [{ label: '黑体', value: '黑体' }],
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: [{ label: '黑体', value: '黑体' }]
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-09 21:40:18
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: [{ label: '黑体', value: '黑体' }],
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: [{ label: '黑体', value: '黑体' }],
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-07 14:54:11
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: [{ label: '黑体', value: '黑体' }],
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: [{ label: '黑体', value: '黑体' }]
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: 2023-12-26 13:56:34
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