pb-sxp-ui 1.0.5 → 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 (75) hide show
  1. package/dist/index.cjs +98 -83
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.js +98 -84
  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 +98 -83
  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/components/SxpPageRender/Modal/index.d.ts +2 -2
  14. package/es/core/components/SxpPageRender/Modal/index.js +12 -11
  15. package/es/core/components/SxpPageRender/Popup/index.js +12 -12
  16. package/es/core/components/SxpPageRender/WaterFall/WaterfallList.js +3 -4
  17. package/es/core/components/SxpPageRender/WaterFall/index.js +1 -1
  18. package/es/core/context/EditorContext.d.ts +7 -5
  19. package/es/core/context/EditorContext.js +10 -25
  20. package/es/core/hooks/useEventReport.js +1 -1
  21. package/es/index.d.ts +1 -0
  22. package/es/index.js +1 -0
  23. package/es/materials/sxp/HashTag/settingRender.d.ts +4 -1
  24. package/es/materials/sxp/HashTag/settingRender.js +7 -3
  25. package/es/materials/sxp/defaultSetting.d.ts +11 -0
  26. package/es/materials/sxp/defaultSetting.js +7 -0
  27. package/es/materials/sxp/popup/AppointForm/index.js +1 -2
  28. package/es/materials/sxp/popup/AppointForm/material.js +0 -1
  29. package/es/materials/sxp/popup/AppointForm/settingRender.d.ts +3 -0
  30. package/es/materials/sxp/popup/AppointForm/settingRender.js +4 -1
  31. package/es/materials/sxp/popup/CommodityDetail/settingRender.d.ts +4 -1
  32. package/es/materials/sxp/popup/CommodityDetail/settingRender.js +7 -3
  33. package/es/materials/sxp/popup/CommodityDetailDiroNew/settingRender.d.ts +4 -1
  34. package/es/materials/sxp/popup/CommodityDetailDiroNew/settingRender.js +7 -3
  35. package/es/materials/sxp/popup/Prompt/index.js +0 -2
  36. package/es/materials/sxp/template/MultiCommodity/index.js +2 -2
  37. package/es/materials/sxp/template/MultiCommodityDiro/index.js +2 -2
  38. package/es/materials/sxp/template/MultiCommodityDiroNew/index.js +2 -2
  39. package/es/materials/sxp/template/components/EventProvider.js +2 -2
  40. package/es/materials/sxp/template/components/settingRender.d.ts +6 -0
  41. package/es/materials/sxp/template/components/settingRender.js +8 -4
  42. package/lib/core/components/SxpPageRender/Modal/index.d.ts +2 -2
  43. package/lib/core/components/SxpPageRender/Modal/index.js +11 -10
  44. package/lib/core/components/SxpPageRender/Popup/index.js +12 -12
  45. package/lib/core/components/SxpPageRender/WaterFall/WaterfallList.js +2 -3
  46. package/lib/core/components/SxpPageRender/WaterFall/index.js +1 -1
  47. package/lib/core/context/EditorContext.d.ts +7 -5
  48. package/lib/core/context/EditorContext.js +10 -25
  49. package/lib/core/hooks/useEventReport.js +1 -1
  50. package/lib/index.d.ts +1 -0
  51. package/lib/index.js +3 -1
  52. package/lib/materials/sxp/HashTag/settingRender.d.ts +4 -1
  53. package/lib/materials/sxp/HashTag/settingRender.js +7 -3
  54. package/lib/materials/sxp/defaultSetting.d.ts +11 -0
  55. package/lib/materials/sxp/defaultSetting.js +10 -0
  56. package/lib/materials/sxp/popup/AppointForm/index.js +0 -1
  57. package/lib/materials/sxp/popup/AppointForm/material.js +0 -1
  58. package/lib/materials/sxp/popup/AppointForm/settingRender.d.ts +3 -0
  59. package/lib/materials/sxp/popup/AppointForm/settingRender.js +4 -1
  60. package/lib/materials/sxp/popup/CommodityDetail/settingRender.d.ts +4 -1
  61. package/lib/materials/sxp/popup/CommodityDetail/settingRender.js +7 -3
  62. package/lib/materials/sxp/popup/CommodityDetailDiroNew/settingRender.d.ts +4 -1
  63. package/lib/materials/sxp/popup/CommodityDetailDiroNew/settingRender.js +7 -3
  64. package/lib/materials/sxp/popup/Prompt/index.js +0 -2
  65. package/lib/materials/sxp/template/MultiCommodity/index.js +2 -2
  66. package/lib/materials/sxp/template/MultiCommodityDiro/index.js +2 -2
  67. package/lib/materials/sxp/template/MultiCommodityDiroNew/index.js +2 -2
  68. package/lib/materials/sxp/template/components/EventProvider.js +2 -2
  69. package/lib/materials/sxp/template/components/settingRender.d.ts +6 -0
  70. package/lib/materials/sxp/template/components/settingRender.js +8 -4
  71. package/package.json +1 -1
  72. package/es/core/components/SxpPageRender/ProductInfo/index.d.ts +0 -14
  73. package/es/core/components/SxpPageRender/ProductInfo/index.js +0 -55
  74. package/lib/core/components/SxpPageRender/ProductInfo/index.d.ts +0 -14
  75. package/lib/core/components/SxpPageRender/ProductInfo/index.js +0 -58
package/dist/pb-ui.js CHANGED
@@ -716,6 +716,11 @@
716
716
  pathArr: [0],
717
717
  positionY: 0
718
718
  };
719
+ const popupInit = {
720
+ id: '',
721
+ duration: 0,
722
+ name: 'none'
723
+ };
719
724
  const EditorContext = React.createContext({
720
725
  resolver: {},
721
726
  currentNode: null,
@@ -735,12 +740,8 @@
735
740
  prePiontData: [],
736
741
  undoStack: [item],
737
742
  redoStack: [],
738
- popup: '',
739
- setPopup: () => { },
740
- popupAni: {
741
- name: 'none',
742
- duration: 0
743
- }
743
+ popup: popupInit,
744
+ setPopup: () => { }
744
745
  });
745
746
  const EditorCore = React.forwardRef(({ children, resolver, isSsr, schema, enableDataSource = true, utmVal }, ref) => {
746
747
  const [currentNode, setCurrentNode] = React.useState(null);
@@ -763,25 +764,10 @@
763
764
  */
764
765
  const [undoStack, setUndoStack] = React.useState([[item]]);
765
766
  const [redoStack, setRedoStack] = React.useState([]);
766
- const [popup, setPopup] = React.useState('');
767
- const [popupAni, setPopupAni] = React.useState({
768
- name: 'none',
769
- duration: 0
770
- });
767
+ const [popup, setPopup] = React.useState(popupInit);
771
768
  typeof window !== 'undefined' &&
772
769
  (window.sxpPopup = (type, aniType) => {
773
- if (aniType && (aniType === null || aniType === void 0 ? void 0 : aniType.name) !== 'none') {
774
- setPopupAni(Object.assign(Object.assign({}, popupAni), aniType));
775
- }
776
- else {
777
- setPopupAni({
778
- name: 'none',
779
- duration: 0
780
- });
781
- }
782
- setTimeout(() => {
783
- setPopup(type);
784
- });
770
+ setPopup(Object.assign(Object.assign(Object.assign({}, popupInit), { id: type }), aniType));
785
771
  });
786
772
  typeof window !== 'undefined' &&
787
773
  (window.getJointUtmLink = (url) => {
@@ -857,8 +843,7 @@
857
843
  setUndoStack,
858
844
  getCurPageConf,
859
845
  popup,
860
- setPopup,
861
- popupAni
846
+ setPopup
862
847
  } },
863
848
  React.createElement(DataSourceProvider$1, { isSsr: isSsr, enable: enableDataSource }, children)));
864
849
  });
@@ -880,6 +865,14 @@
880
865
  }
881
866
  ];
882
867
 
868
+ const fontOptions = [
869
+ { label: '应用字体', value: 'appFont' },
870
+ { label: '黑体', value: '黑体' }
871
+ ];
872
+ var defaultSetting = {
873
+ fontOptions
874
+ };
875
+
883
876
  /*
884
877
  * @Author: binruan@chatlabs.com
885
878
  * @Date: 2023-07-28 18:29:57
@@ -888,6 +881,7 @@
888
881
  * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\AppointForm\settingRender.tsx
889
882
  *
890
883
  */
884
+ var _a$4;
891
885
  var settingRender$5 = [
892
886
  {
893
887
  type: 'Text',
@@ -913,7 +907,8 @@
913
907
  {
914
908
  type: 'Select',
915
909
  name: ['textStyle', 'fontFamily'],
916
- 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
917
912
  },
918
913
  {
919
914
  type: 'Number',
@@ -997,7 +992,6 @@
997
992
 
998
993
  const AppointForm$1 = (_a) => {
999
994
  var { columns, style, title, textStyle, submitBgColor, submitColor, submitText, layoutType, onClick } = _a, props = __rest(_a, ["columns", "style", "title", "textStyle", "submitBgColor", "submitColor", "submitText", "layoutType", "onClick"]);
1000
- useEditor();
1001
995
  const { submitForm } = useSxpDataSource();
1002
996
  const formRef = React.useRef();
1003
997
  const [loading, setLoading] = React.useState(false);
@@ -1071,6 +1065,14 @@
1071
1065
  return component;
1072
1066
  }
1073
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
+ */
1074
1076
  const AppointForm = createMaterial(AppointFormComponent, {
1075
1077
  displayName: '预约表单',
1076
1078
  icon: '',
@@ -1094,7 +1096,6 @@
1094
1096
  textStyle: {
1095
1097
  fontSize: 14,
1096
1098
  color: '#000',
1097
- fontFamily: '黑体',
1098
1099
  textAlign: 'center'
1099
1100
  }
1100
1101
  },
@@ -1107,10 +1108,11 @@
1107
1108
  * @Author: binruan@chatlabs.com
1108
1109
  * @Date: 2024-04-02 18:01:34
1109
1110
  * @LastEditors: binruan@chatlabs.com
1110
- * @LastEditTime: 2024-04-02 18:01:41
1111
- * @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
1112
1113
  *
1113
1114
  */
1115
+ var _a$3, _b$3;
1114
1116
  /*
1115
1117
  * @Author: binruan@chatlabs.com
1116
1118
  * @Date: 2024-03-26 16:50:25
@@ -1186,8 +1188,9 @@
1186
1188
  },
1187
1189
  {
1188
1190
  type: 'Select',
1189
- options: [{ label: '黑体', value: '黑体' }],
1190
- 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
1191
1194
  },
1192
1195
  {
1193
1196
  type: 'Number',
@@ -1266,7 +1269,8 @@
1266
1269
  {
1267
1270
  type: 'Select',
1268
1271
  name: ['props', 'buttonStyle', 'fontFamily'],
1269
- 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
1270
1274
  },
1271
1275
  {
1272
1276
  type: 'Number',
@@ -8094,7 +8098,7 @@
8094
8098
  * @Author: binruan@chatlabs.com
8095
8099
  * @Date: 2024-03-12 10:59:06
8096
8100
  * @LastEditors: binruan@chatlabs.com
8097
- * @LastEditTime: 2024-03-18 17:38:46
8101
+ * @LastEditTime: 2024-04-12 15:10:39
8098
8102
  * @FilePath: \pb-sxp-ui\src\core\hooks\useEventReport.ts
8099
8103
  *
8100
8104
  */
@@ -8149,7 +8153,7 @@
8149
8153
  eventInfo: {
8150
8154
  productId: product === null || product === void 0 ? void 0 : product.itemId,
8151
8155
  productName: product === null || product === void 0 ? void 0 : product.title,
8152
- price: (product === null || product === void 0 ? void 0 : product.price) + '',
8156
+ price: (product === null || product === void 0 ? void 0 : product.price) ? (product === null || product === void 0 ? void 0 : product.price) + '' : '0',
8153
8157
  productCollection: product === null || product === void 0 ? void 0 : product.collection,
8154
8158
  fromKName,
8155
8159
  fromKPage: location === null || location === void 0 ? void 0 : location.href,
@@ -8174,14 +8178,13 @@
8174
8178
  * @Author: binruan@chatlabs.com
8175
8179
  * @Date: 2023-11-02 18:34:34
8176
8180
  * @LastEditors: binruan@chatlabs.com
8177
- * @LastEditTime: 2024-04-10 18:40:21
8181
+ * @LastEditTime: 2024-04-12 11:23:00
8178
8182
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Modal\index.tsx
8179
8183
  *
8180
8184
  */
8181
8185
  const closeIcon = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAjhJREFUWEfFlztOw0AQhmeWiJ4CCmpQ5DiRQsIJyAWg5A0lR0AIChDiCJS8ER0cADgBeRSxt4CCDgkaKiq8i+zYeWx2413HEWmiJJv9v535Z2aN8M8vFPT9z3zETD0aAUChUJjwvPFHAJhBhB3Hqd6OAsK2yyucwykAvP38eJX398Z3AJDLlVYR8ToU9Rhj25TWr9KEsKy5dULIGQCMtfZly45TvwsAstm56UwG6wA4FUFwzrdctxZBDcWSy5XWEPG8I84/GcMipdWPtgcsaz5PCHtKG0IuTiqUvjT9U/WYMG2IOPE+AP+LtCB0xKUAAyA2Xbd2o2OG0NQXvTnvhL17D7EPtH9TRCIWwkRcGYGIQgYBABuqPuHXOQBc6pw80lBGwBQiiXhsBHQhkoprA6iM6acjhDQKu5YJZW6XeOI3XJdpvfsdTu52VfXEekD8owQiXGIubpSCbhDbLu8DwKEAd+A41SOdPpE4BS0viFOtvV2iKWqUgn5x/tmS70xR01GuDSCKc86/OCcLgTyyZ0ScDGNhFAktAJV4NFJ9YyaFiAWIE+9uVkkgBgLoig8DMWAa9ro9ynkUdlW5maZDCmB6clmz0k1HH4Cs1Ezbq2p2yEpUuBOKTSZZex00RUWIrltxuuK6EOGDSbGIOPZicpMx6fny650377qNRgBgWeVFQuA+6UjVgREhGIMlSqsPUQqIbZdOOIdZQmCv2axRnU1N1+TzJYsxOEaEV8ep7frPZ7Gd0FTEdP0ft0/kMNdg0eoAAAAASUVORK5CYII=';
8182
- const Modal = ({ visible, onClose, children, modalStyle, padding, popupAniData }) => {
8183
- const { popupAni } = useEditor();
8184
- const cssAni = popupAniData !== null && popupAniData !== void 0 ? popupAniData : popupAni;
8186
+ const Modal = ({ visible, onClose, children, modalStyle, padding, popup }) => {
8187
+ var _a;
8185
8188
  const [isShow, setIsShow] = React.useState(false);
8186
8189
  const modalEleRef = React.useRef(null);
8187
8190
  React.useEffect(() => {
@@ -8196,29 +8199,32 @@
8196
8199
  parentNode === null || parentNode === void 0 ? void 0 : parentNode.appendChild(modalEleRef.current);
8197
8200
  }
8198
8201
  }, []);
8202
+ const isOpen = React.useMemo(() => {
8203
+ return ((popup === null || popup === void 0 ? void 0 : popup.id) && (popup === null || popup === void 0 ? void 0 : popup.id) !== '') || visible;
8204
+ }, [visible, popup]);
8199
8205
  React.useEffect(() => {
8200
- if (visible) {
8206
+ if (isOpen) {
8201
8207
  setIsShow(true);
8202
8208
  }
8203
8209
  else {
8204
8210
  setTimeout(() => {
8205
8211
  setIsShow(false);
8206
- }, cssAni === null || cssAni === void 0 ? void 0 : cssAni.duration);
8212
+ }, popup === null || popup === void 0 ? void 0 : popup.duration);
8207
8213
  }
8208
- }, [visible, cssAni]);
8214
+ }, [isOpen, popup]);
8209
8215
  if (!modalEleRef.current)
8210
8216
  return null;
8211
8217
  const handleClose = lodash.debounce(() => {
8212
8218
  onClose === null || onClose === void 0 ? void 0 : onClose();
8213
8219
  }, 300);
8214
- return ReactDOM__namespace.createPortal(React.createElement("div", { className: 'modal-bg', style: Object.assign({ display: isShow ? 'flex' : 'none', backgroundColor: visible ? 'rgba(0, 0, 0, 0.7)' : 'rgba(0, 0, 0, 0)' }, modalStyle), onClick: handleClose },
8215
- React.createElement("div", { className: `modal-container ${visible ? 'modal-popIn' : 'modal-popOut'}`, style: { padding, animationDuration: (cssAni === null || cssAni === void 0 ? void 0 : cssAni.duration) / 1000 + 's' }, onClick: (e) => {
8220
+ return ReactDOM__namespace.createPortal(React.createElement(React.Fragment, null, isShow && (React.createElement("div", { className: 'modal-bg', style: Object.assign({ display: 'flex', backgroundColor: isOpen ? 'rgba(0, 0, 0, 0.7)' : 'rgba(0, 0, 0, 0)' }, modalStyle), onClick: handleClose },
8221
+ React.createElement("div", { className: `modal-container ${isOpen ? 'modal-popIn' : 'modal-popOut'}`, style: { padding, animationDuration: ((_a = popup === null || popup === void 0 ? void 0 : popup.duration) !== null && _a !== void 0 ? _a : 0) / 1000 + 's' }, onClick: (e) => {
8216
8222
  e.stopPropagation();
8217
8223
  e.preventDefault();
8218
8224
  } },
8219
8225
  React.createElement("div", { onClick: onClose, className: 'modal-icon-wrapper' },
8220
8226
  React.createElement("img", { src: closeIcon, alt: 'close', className: 'modal-icon' })),
8221
- children)), modalEleRef.current);
8227
+ children)))), modalEleRef.current);
8222
8228
  };
8223
8229
  var Modal$1 = React.memo(Modal);
8224
8230
 
@@ -8524,7 +8530,6 @@
8524
8530
 
8525
8531
  const Prompt$1 = (_a) => {
8526
8532
  var { content, btnText, style, icon, onClick } = _a, props = __rest(_a, ["content", "btnText", "style", "icon", "onClick"]);
8527
- useEditor();
8528
8533
  const iconSrc = typeof icon === 'string' ? icon : getMediaValueByMode(icon);
8529
8534
  const handleOk = () => {
8530
8535
  window === null || window === void 0 ? void 0 : window.sxpPopup('');
@@ -8561,11 +8566,12 @@
8561
8566
  sort: 3
8562
8567
  });
8563
8568
 
8569
+ var _a$2, _b$2;
8564
8570
  /*
8565
8571
  * @Author: binruan@chatlabs.com
8566
8572
  * @Date: 2024-03-26 16:50:25
8567
8573
  * @LastEditors: binruan@chatlabs.com
8568
- * @LastEditTime: 2024-03-28 18:42:26
8574
+ * @LastEditTime: 2024-04-12 17:37:19
8569
8575
  * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\CommodityDetailDiroNew\settingRender.tsx
8570
8576
  *
8571
8577
  */
@@ -8640,8 +8646,9 @@
8640
8646
  },
8641
8647
  {
8642
8648
  type: 'Select',
8643
- options: [{ label: '黑体', value: '黑体' }],
8644
- 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
8645
8652
  },
8646
8653
  {
8647
8654
  type: 'Number',
@@ -8720,7 +8727,8 @@
8720
8727
  {
8721
8728
  type: 'Select',
8722
8729
  name: ['props', 'buttonStyle', 'fontFamily'],
8723
- 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
8724
8732
  },
8725
8733
  {
8726
8734
  type: 'Number',
@@ -8909,11 +8917,12 @@ Made in Italy` })));
8909
8917
  sort: 1
8910
8918
  });
8911
8919
 
8920
+ var _a$1, _b$1;
8912
8921
  /*
8913
8922
  * @Author: binruan@chatlabs.com
8914
8923
  * @Date: 2024-03-26 16:50:25
8915
8924
  * @LastEditors: binruan@chatlabs.com
8916
- * @LastEditTime: 2024-04-09 21:40:18
8925
+ * @LastEditTime: 2024-04-12 17:38:12
8917
8926
  * @FilePath: \pb-sxp-ui\src\materials\sxp\template\components\settingRender.tsx
8918
8927
  *
8919
8928
  */
@@ -9031,8 +9040,9 @@ Made in Italy` })));
9031
9040
  },
9032
9041
  {
9033
9042
  type: 'Select',
9034
- options: [{ label: '黑体', value: '黑体' }],
9035
- 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
9036
9046
  },
9037
9047
  {
9038
9048
  type: 'Number',
@@ -9109,8 +9119,9 @@ Made in Italy` })));
9109
9119
  },
9110
9120
  {
9111
9121
  type: 'Select',
9112
- options: [{ label: '黑体', value: '黑体' }],
9113
- 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
9114
9125
  },
9115
9126
  {
9116
9127
  type: 'Number',
@@ -9176,7 +9187,7 @@ Made in Italy` })));
9176
9187
  var { rec, children, className, onClick, style, isExternalLink = false } = _a; __rest(_a, ["rec", "children", "className", "onClick", "style", "isExternalLink"]);
9177
9188
  const ref = React.useRef(null);
9178
9189
  const isOnScreen = useOnScreen(ref);
9179
- const { popupAni } = useEditor();
9190
+ const { popup } = useEditor();
9180
9191
  const { setPopupDetailData, ctaEvent } = useSxpDataSource();
9181
9192
  const { jumpToWeb } = useEventReport();
9182
9193
  React.useEffect(() => {
@@ -9208,7 +9219,7 @@ Made in Italy` })));
9208
9219
  else {
9209
9220
  onClick === null || onClick === void 0 ? void 0 : onClick();
9210
9221
  }
9211
- }, popupAni === null || popupAni === void 0 ? void 0 : popupAni.duration);
9222
+ }, popup === null || popup === void 0 ? void 0 : popup.duration);
9212
9223
  return (React.createElement("div", { ref: ref, className: className, style: style, onClick: handleClick }, children));
9213
9224
  };
9214
9225
  var EventProvider$1 = React.memo(EventProvider);
@@ -9676,7 +9687,7 @@ Made in Italy` })));
9676
9687
  var _b, _c;
9677
9688
  var { content, style, bgImg, recData, onClick, bottom_image, ctaTempStyles, isExternalLink } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "onClick", "bottom_image", "ctaTempStyles", "isExternalLink"]);
9678
9689
  const { ctaEvent, setPopupDetailData, sxpParameter } = useSxpDataSource();
9679
- const { popupAni } = useEditor();
9690
+ const { popup } = useEditor();
9680
9691
  const { jumpToWeb } = useEventReport();
9681
9692
  const [products, setProducts] = React.useState((_c = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProducts) !== null && _c !== void 0 ? _c : [1, 2]);
9682
9693
  const handleClick = lodash.throttle((item) => {
@@ -9694,7 +9705,7 @@ Made in Italy` })));
9694
9705
  else {
9695
9706
  onClick === null || onClick === void 0 ? void 0 : onClick();
9696
9707
  }
9697
- }, popupAni === null || popupAni === void 0 ? void 0 : popupAni.duration);
9708
+ }, popup === null || popup === void 0 ? void 0 : popup.duration);
9698
9709
  return (React.createElement(Scroll$1, { isPadding: !!recData }, products === null || products === void 0 ? void 0 : products.map((item) => {
9699
9710
  var _a, _b, _c, _d, _e, _f;
9700
9711
  return (React.createElement(SwiperSlide, Object.assign({ hidden: recData && !(item === null || item === void 0 ? void 0 : item.bindCta), key: item === null || item === void 0 ? void 0 : item.itemId, className: css.css(Object.assign(Object.assign({}, style), { display: 'flex', flexShrink: 0, marginLeft: 0, marginRight: '8px' })) }, props, { onClick: () => handleClick(item) }),
@@ -9789,7 +9800,7 @@ Made in Italy` })));
9789
9800
  var { content, style, bgImg, recData, onClick, bottom_image, ctaTempStyles, isExternalLink } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "onClick", "bottom_image", "ctaTempStyles", "isExternalLink"]);
9790
9801
  const { sxpParameter } = useSxpDataSource();
9791
9802
  const { ctaEvent, setPopupDetailData } = useSxpDataSource();
9792
- const { popupAni } = useEditor();
9803
+ const { popup } = useEditor();
9793
9804
  const [products, setProducts] = React.useState((_c = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProducts) !== null && _c !== void 0 ? _c : [1, 2]);
9794
9805
  const { jumpToWeb } = useEventReport();
9795
9806
  const handleClick = lodash.throttle((item) => {
@@ -9807,7 +9818,7 @@ Made in Italy` })));
9807
9818
  else {
9808
9819
  onClick === null || onClick === void 0 ? void 0 : onClick();
9809
9820
  }
9810
- }, popupAni === null || popupAni === void 0 ? void 0 : popupAni.duration);
9821
+ }, popup === null || popup === void 0 ? void 0 : popup.duration);
9811
9822
  return (React.createElement(Scroll$1, { isPadding: !!recData }, products === null || products === void 0 ? void 0 : products.map((item) => {
9812
9823
  var _a, _b, _c, _d, _e, _f;
9813
9824
  return (React.createElement(SwiperSlide, Object.assign({ hidden: recData && !(item === null || item === void 0 ? void 0 : item.bindCta), key: item.itemId, className: css.css(Object.assign(Object.assign({}, style), { display: 'flex', flexShrink: 0, marginLeft: 0, marginRight: '8px' })) }, props, { onClick: () => handleClick(item) }),
@@ -9901,7 +9912,7 @@ Made in Italy` })));
9901
9912
  var _b, _c;
9902
9913
  var { content, style, bgImg, recData, onClick, bottom_image, ctaTempStyles, isExternalLink } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "onClick", "bottom_image", "ctaTempStyles", "isExternalLink"]);
9903
9914
  const { ctaEvent, setPopupDetailData, sxpParameter } = useSxpDataSource();
9904
- const { popupAni } = useEditor();
9915
+ const { popup } = useEditor();
9905
9916
  const { jumpToWeb } = useEventReport();
9906
9917
  const [products, setProducts] = React.useState((_c = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProducts) !== null && _c !== void 0 ? _c : [1, 2]);
9907
9918
  const handleClick = lodash.throttle((item) => {
@@ -9919,7 +9930,7 @@ Made in Italy` })));
9919
9930
  else {
9920
9931
  onClick === null || onClick === void 0 ? void 0 : onClick();
9921
9932
  }
9922
- }, popupAni === null || popupAni === void 0 ? void 0 : popupAni.duration);
9933
+ }, popup === null || popup === void 0 ? void 0 : popup.duration);
9923
9934
  return (React.createElement(Scroll$1, { isPadding: !!recData }, products === null || products === void 0 ? void 0 : products.map((item) => {
9924
9935
  var _a, _b, _c, _d, _e, _f;
9925
9936
  return (React.createElement(SwiperSlide, Object.assign({ hidden: recData && !(item === null || item === void 0 ? void 0 : item.bindCta), key: item === null || item === void 0 ? void 0 : item.itemId, className: css.css(Object.assign(Object.assign({}, style), { display: 'flex', flexShrink: 0, marginLeft: 0, marginRight: '8px' })) }, props, { onClick: () => handleClick(item) }),
@@ -9997,11 +10008,12 @@ Made in Italy` })));
9997
10008
  sort: 4
9998
10009
  });
9999
10010
 
10011
+ var _a, _b;
10000
10012
  /*
10001
10013
  * @Author: binruan@chatlabs.com
10002
10014
  * @Date: 2024-04-07 14:07:12
10003
10015
  * @LastEditors: binruan@chatlabs.com
10004
- * @LastEditTime: 2024-04-07 14:54:11
10016
+ * @LastEditTime: 2024-04-12 17:39:45
10005
10017
  * @FilePath: \pb-sxp-ui\src\materials\sxp\HashTag\settingRender.tsx
10006
10018
  *
10007
10019
  */
@@ -10063,8 +10075,9 @@ Made in Italy` })));
10063
10075
  },
10064
10076
  {
10065
10077
  type: 'Select',
10066
- options: [{ label: '黑体', value: '黑体' }],
10067
- 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
10068
10081
  },
10069
10082
  {
10070
10083
  type: 'Number',
@@ -10138,7 +10151,8 @@ Made in Italy` })));
10138
10151
  {
10139
10152
  type: 'Select',
10140
10153
  name: ['props', 'buttonStyle', 'fontFamily'],
10141
- 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
10142
10156
  },
10143
10157
  {
10144
10158
  type: 'Number',
@@ -11675,7 +11689,7 @@ Made in Italy` })));
11675
11689
  * @Author: binruan@chatlabs.com
11676
11690
  * @Date: 2024-01-10 10:58:24
11677
11691
  * @LastEditors: binruan@chatlabs.com
11678
- * @LastEditTime: 2024-04-07 15:18:35
11692
+ * @LastEditTime: 2024-04-12 11:29:01
11679
11693
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\WaterFall\index.tsx
11680
11694
  *
11681
11695
  */
@@ -11739,7 +11753,7 @@ Made in Italy` })));
11739
11753
  relatedContentId: (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.itemId,
11740
11754
  position: rec === null || rec === void 0 ? void 0 : rec.position,
11741
11755
  contentTags: JSON.stringify((_e = rec === null || rec === void 0 ? void 0 : rec.video) === null || _e === void 0 ? void 0 : _e.tags),
11742
- traceInfo: JSON.stringify((_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.traceInfo),
11756
+ traceInfo: (_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.traceInfo,
11743
11757
  hashTags: JSON.stringify([recData === null || recData === void 0 ? void 0 : recData.hashTag]),
11744
11758
  fromKName,
11745
11759
  fromKPage: location === null || location === void 0 ? void 0 : location.href,
@@ -12843,15 +12857,15 @@ Made in Italy` })));
12843
12857
  * @Author: binruan@chatlabs.com
12844
12858
  * @Date: 2023-10-31 10:56:01
12845
12859
  * @LastEditors: binruan@chatlabs.com
12846
- * @LastEditTime: 2024-04-10 09:57:19
12860
+ * @LastEditTime: 2024-04-12 09:50:58
12847
12861
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Popup\index.tsx
12848
12862
  *
12849
12863
  */
12850
12864
  const Popup = () => {
12851
- const { schema, resolver, popup, popupAni } = useEditor();
12865
+ const { schema, resolver, popup } = useEditor();
12852
12866
  const { setPopupDetailData, popupDetailData, bffEventReport } = useSxpDataSource();
12853
12867
  const { productView } = useEventReport();
12854
- const [visible, setVisible] = React.useState(false);
12868
+ const [visible, setVisible] = React.useState();
12855
12869
  const curTimeRef = React.useRef(null);
12856
12870
  React.useEffect(() => {
12857
12871
  const initTime = () => {
@@ -12864,33 +12878,33 @@ Made in Italy` })));
12864
12878
  };
12865
12879
  }, []);
12866
12880
  React.useEffect(() => {
12867
- if (popup && popup !== '') {
12881
+ if (popup && (popup === null || popup === void 0 ? void 0 : popup.id) && (popup === null || popup === void 0 ? void 0 : popup.id) !== '') {
12868
12882
  curTimeRef.current = new Date();
12869
- setVisible(true);
12883
+ setVisible(popup);
12870
12884
  }
12871
12885
  }, [popup]);
12872
12886
  const handleClose = () => {
12873
- var _a, _b, _c;
12874
- if (!popup || popup === '' || !visible || new Date() - curTimeRef.current < (popupAni === null || popupAni === void 0 ? void 0 : popupAni.duration)) {
12887
+ var _a, _b, _c, _d;
12888
+ if (!popup || (popup === null || popup === void 0 ? void 0 : popup.id) === '' || !visible || new Date() - curTimeRef.current < ((_a = popup === null || popup === void 0 ? void 0 : popup.duration) !== null && _a !== void 0 ? _a : 0)) {
12875
12889
  return;
12876
12890
  }
12877
- setVisible(false);
12891
+ setVisible(Object.assign(Object.assign({}, popup), { id: '' }));
12878
12892
  const data = popupDetailData;
12879
- const product = (_a = data === null || data === void 0 ? void 0 : data.video) === null || _a === void 0 ? void 0 : _a.bindProduct;
12880
- const cta = (_c = (_b = data === null || data === void 0 ? void 0 : data.video) === null || _b === void 0 ? void 0 : _b.bindProduct) === null || _c === void 0 ? void 0 : _c.bindCta;
12893
+ const product = (_b = data === null || data === void 0 ? void 0 : data.video) === null || _b === void 0 ? void 0 : _b.bindProduct;
12894
+ const cta = (_d = (_c = data === null || data === void 0 ? void 0 : data.video) === null || _c === void 0 ? void 0 : _c.bindProduct) === null || _d === void 0 ? void 0 : _d.bindCta;
12881
12895
  if (product && cta) {
12882
12896
  productView(data, product, cta, curTimeRef.current);
12883
12897
  }
12884
12898
  setTimeout(() => {
12885
12899
  window === null || window === void 0 ? void 0 : window.sxpPopup('');
12886
12900
  setPopupDetailData === null || setPopupDetailData === void 0 ? void 0 : setPopupDetailData(null);
12887
- }, popupAni === null || popupAni === void 0 ? void 0 : popupAni.duration);
12901
+ }, popup === null || popup === void 0 ? void 0 : popup.duration);
12888
12902
  };
12889
12903
  const renderPopupDetail = React.useMemo(() => {
12890
12904
  var _a, _b, _c;
12891
12905
  return (_c = (_b = (_a = schema === null || schema === void 0 ? void 0 : schema.sxpPageConf) === null || _a === void 0 ? void 0 : _a.globalConfig) === null || _b === void 0 ? void 0 : _b.popupList) === null || _c === void 0 ? void 0 : _c.map((value, index) => {
12892
12906
  var _a, _b, _c, _d, _e, _f, _g, _h;
12893
- if ((value === null || value === void 0 ? void 0 : value.id) === popup) {
12907
+ if ((value === null || value === void 0 ? void 0 : value.id) === (popup === null || popup === void 0 ? void 0 : popup.id)) {
12894
12908
  const t = resolver[(_a = value === null || value === void 0 ? void 0 : value.item) === null || _a === void 0 ? void 0 : _a.type];
12895
12909
  const Component = withBindDataSource(t);
12896
12910
  const defaulSetting = (_b = t === null || t === void 0 ? void 0 : t.extend) === null || _b === void 0 ? void 0 : _b.defaulSetting;
@@ -12901,7 +12915,7 @@ Made in Italy` })));
12901
12915
  }
12902
12916
  });
12903
12917
  }, [schema, popup, resolver]);
12904
- return (React.createElement(Modal$1, { visible: !!visible, onClose: handleClose, padding: 0, modalStyle: { position: 'fixed' } }, renderPopupDetail));
12918
+ return (React.createElement(Modal$1, { popup: visible, onClose: handleClose, padding: 0, modalStyle: { position: 'fixed' } }, renderPopupDetail));
12905
12919
  };
12906
12920
 
12907
12921
  /*
@@ -12975,7 +12989,7 @@ Made in Italy` })));
12975
12989
  * @Author : haocanweng@chatlabs.cn
12976
12990
  * @Date : 2023-08-21 16:31:58
12977
12991
  * @LastEditors: binruan@chatlabs.com
12978
- * @LastEditTime: 2023-12-26 13:56:34
12992
+ * @LastEditTime: 2024-04-12 16:59:53
12979
12993
  * @FilePath: \pb-sxp-ui\src\index.ts
12980
12994
  */
12981
12995
 
@@ -12986,6 +13000,7 @@ Made in Italy` })));
12986
13000
  exports.SxpPageRender = SxpPageRender;
12987
13001
  exports.core = index$1;
12988
13002
  exports.default = Pagebuilder;
13003
+ exports.defaultSetting = defaultSetting;
12989
13004
  exports.materials = _materials_;
12990
13005
  exports.useEditorDataProvider = useEditorDataProvider;
12991
13006