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/index.js CHANGED
@@ -701,6 +701,11 @@ const item = {
701
701
  pathArr: [0],
702
702
  positionY: 0
703
703
  };
704
+ const popupInit = {
705
+ id: '',
706
+ duration: 0,
707
+ name: 'none'
708
+ };
704
709
  const EditorContext = React.createContext({
705
710
  resolver: {},
706
711
  currentNode: null,
@@ -720,12 +725,8 @@ const EditorContext = React.createContext({
720
725
  prePiontData: [],
721
726
  undoStack: [item],
722
727
  redoStack: [],
723
- popup: '',
724
- setPopup: () => { },
725
- popupAni: {
726
- name: 'none',
727
- duration: 0
728
- }
728
+ popup: popupInit,
729
+ setPopup: () => { }
729
730
  });
730
731
  const EditorCore = forwardRef(({ children, resolver, isSsr, schema, enableDataSource = true, utmVal }, ref) => {
731
732
  const [currentNode, setCurrentNode] = useState(null);
@@ -748,25 +749,10 @@ const EditorCore = forwardRef(({ children, resolver, isSsr, schema, enableDataSo
748
749
  */
749
750
  const [undoStack, setUndoStack] = useState([[item]]);
750
751
  const [redoStack, setRedoStack] = useState([]);
751
- const [popup, setPopup] = useState('');
752
- const [popupAni, setPopupAni] = useState({
753
- name: 'none',
754
- duration: 0
755
- });
752
+ const [popup, setPopup] = useState(popupInit);
756
753
  typeof window !== 'undefined' &&
757
754
  (window.sxpPopup = (type, aniType) => {
758
- if (aniType && (aniType === null || aniType === void 0 ? void 0 : aniType.name) !== 'none') {
759
- setPopupAni(Object.assign(Object.assign({}, popupAni), aniType));
760
- }
761
- else {
762
- setPopupAni({
763
- name: 'none',
764
- duration: 0
765
- });
766
- }
767
- setTimeout(() => {
768
- setPopup(type);
769
- });
755
+ setPopup(Object.assign(Object.assign(Object.assign({}, popupInit), { id: type }), aniType));
770
756
  });
771
757
  typeof window !== 'undefined' &&
772
758
  (window.getJointUtmLink = (url) => {
@@ -842,8 +828,7 @@ const EditorCore = forwardRef(({ children, resolver, isSsr, schema, enableDataSo
842
828
  setUndoStack,
843
829
  getCurPageConf,
844
830
  popup,
845
- setPopup,
846
- popupAni
831
+ setPopup
847
832
  } },
848
833
  React.createElement(DataSourceProvider$1, { isSsr: isSsr, enable: enableDataSource }, children)));
849
834
  });
@@ -865,6 +850,14 @@ var interactionRender$8 = [
865
850
  }
866
851
  ];
867
852
 
853
+ const fontOptions = [
854
+ { label: '应用字体', value: 'appFont' },
855
+ { label: '黑体', value: '黑体' }
856
+ ];
857
+ var defaultSetting = {
858
+ fontOptions
859
+ };
860
+
868
861
  /*
869
862
  * @Author: binruan@chatlabs.com
870
863
  * @Date: 2023-07-28 18:29:57
@@ -873,6 +866,7 @@ var interactionRender$8 = [
873
866
  * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\AppointForm\settingRender.tsx
874
867
  *
875
868
  */
869
+ var _a$4;
876
870
  var settingRender$5 = [
877
871
  {
878
872
  type: 'Text',
@@ -898,7 +892,8 @@ var settingRender$5 = [
898
892
  {
899
893
  type: 'Select',
900
894
  name: ['textStyle', 'fontFamily'],
901
- options: [{ label: '黑体', value: '黑体' }]
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
902
897
  },
903
898
  {
904
899
  type: 'Number',
@@ -982,7 +977,6 @@ var settingRender$5 = [
982
977
 
983
978
  const AppointForm$1 = (_a) => {
984
979
  var { columns, style, title, textStyle, submitBgColor, submitColor, submitText, layoutType, onClick } = _a, props = __rest(_a, ["columns", "style", "title", "textStyle", "submitBgColor", "submitColor", "submitText", "layoutType", "onClick"]);
985
- useEditor();
986
980
  const { submitForm } = useSxpDataSource();
987
981
  const formRef = useRef();
988
982
  const [loading, setLoading] = useState(false);
@@ -1056,6 +1050,14 @@ function createMaterial(component, options) {
1056
1050
  return component;
1057
1051
  }
1058
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
+ */
1059
1061
  const AppointForm = createMaterial(AppointFormComponent, {
1060
1062
  displayName: '预约表单',
1061
1063
  icon: '',
@@ -1079,7 +1081,6 @@ const AppointForm = createMaterial(AppointFormComponent, {
1079
1081
  textStyle: {
1080
1082
  fontSize: 14,
1081
1083
  color: '#000',
1082
- fontFamily: '黑体',
1083
1084
  textAlign: 'center'
1084
1085
  }
1085
1086
  },
@@ -1092,10 +1093,11 @@ const AppointForm = createMaterial(AppointFormComponent, {
1092
1093
  * @Author: binruan@chatlabs.com
1093
1094
  * @Date: 2024-04-02 18:01:34
1094
1095
  * @LastEditors: binruan@chatlabs.com
1095
- * @LastEditTime: 2024-04-02 18:01:41
1096
- * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\CommodityDetailDiro\settingRender.tsx
1096
+ * @LastEditTime: 2024-04-12 16:46:04
1097
+ * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\CommodityDetail\settingRender.tsx
1097
1098
  *
1098
1099
  */
1100
+ var _a$3, _b$3;
1099
1101
  /*
1100
1102
  * @Author: binruan@chatlabs.com
1101
1103
  * @Date: 2024-03-26 16:50:25
@@ -1171,8 +1173,9 @@ var settingRender$4 = [
1171
1173
  },
1172
1174
  {
1173
1175
  type: 'Select',
1174
- options: [{ label: '黑体', value: '黑体' }],
1175
- 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
1176
1179
  },
1177
1180
  {
1178
1181
  type: 'Number',
@@ -1251,7 +1254,8 @@ var settingRender$4 = [
1251
1254
  {
1252
1255
  type: 'Select',
1253
1256
  name: ['props', 'buttonStyle', 'fontFamily'],
1254
- options: [{ label: '黑体', value: '黑体' }]
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
1255
1259
  },
1256
1260
  {
1257
1261
  type: 'Number',
@@ -8079,7 +8083,7 @@ SwiperSlide.displayName = 'SwiperSlide';
8079
8083
  * @Author: binruan@chatlabs.com
8080
8084
  * @Date: 2024-03-12 10:59:06
8081
8085
  * @LastEditors: binruan@chatlabs.com
8082
- * @LastEditTime: 2024-03-18 17:38:46
8086
+ * @LastEditTime: 2024-04-12 15:10:39
8083
8087
  * @FilePath: \pb-sxp-ui\src\core\hooks\useEventReport.ts
8084
8088
  *
8085
8089
  */
@@ -8134,7 +8138,7 @@ function useEventReport() {
8134
8138
  eventInfo: {
8135
8139
  productId: product === null || product === void 0 ? void 0 : product.itemId,
8136
8140
  productName: product === null || product === void 0 ? void 0 : product.title,
8137
- price: (product === null || product === void 0 ? void 0 : product.price) + '',
8141
+ price: (product === null || product === void 0 ? void 0 : product.price) ? (product === null || product === void 0 ? void 0 : product.price) + '' : '0',
8138
8142
  productCollection: product === null || product === void 0 ? void 0 : product.collection,
8139
8143
  fromKName,
8140
8144
  fromKPage: location === null || location === void 0 ? void 0 : location.href,
@@ -8159,14 +8163,13 @@ function useEventReport() {
8159
8163
  * @Author: binruan@chatlabs.com
8160
8164
  * @Date: 2023-11-02 18:34:34
8161
8165
  * @LastEditors: binruan@chatlabs.com
8162
- * @LastEditTime: 2024-04-10 18:40:21
8166
+ * @LastEditTime: 2024-04-12 11:23:00
8163
8167
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Modal\index.tsx
8164
8168
  *
8165
8169
  */
8166
8170
  const closeIcon = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAjhJREFUWEfFlztOw0AQhmeWiJ4CCmpQ5DiRQsIJyAWg5A0lR0AIChDiCJS8ER0cADgBeRSxt4CCDgkaKiq8i+zYeWx2413HEWmiJJv9v535Z2aN8M8vFPT9z3zETD0aAUChUJjwvPFHAJhBhB3Hqd6OAsK2yyucwykAvP38eJX398Z3AJDLlVYR8ToU9Rhj25TWr9KEsKy5dULIGQCMtfZly45TvwsAstm56UwG6wA4FUFwzrdctxZBDcWSy5XWEPG8I84/GcMipdWPtgcsaz5PCHtKG0IuTiqUvjT9U/WYMG2IOPE+AP+LtCB0xKUAAyA2Xbd2o2OG0NQXvTnvhL17D7EPtH9TRCIWwkRcGYGIQgYBABuqPuHXOQBc6pw80lBGwBQiiXhsBHQhkoprA6iM6acjhDQKu5YJZW6XeOI3XJdpvfsdTu52VfXEekD8owQiXGIubpSCbhDbLu8DwKEAd+A41SOdPpE4BS0viFOtvV2iKWqUgn5x/tmS70xR01GuDSCKc86/OCcLgTyyZ0ScDGNhFAktAJV4NFJ9YyaFiAWIE+9uVkkgBgLoig8DMWAa9ro9ynkUdlW5maZDCmB6clmz0k1HH4Cs1Ezbq2p2yEpUuBOKTSZZex00RUWIrltxuuK6EOGDSbGIOPZicpMx6fny650377qNRgBgWeVFQuA+6UjVgREhGIMlSqsPUQqIbZdOOIdZQmCv2axRnU1N1+TzJYsxOEaEV8ep7frPZ7Gd0FTEdP0ft0/kMNdg0eoAAAAASUVORK5CYII=';
8167
- const Modal = ({ visible, onClose, children, modalStyle, padding, popupAniData }) => {
8168
- const { popupAni } = useEditor();
8169
- const cssAni = popupAniData !== null && popupAniData !== void 0 ? popupAniData : popupAni;
8171
+ const Modal = ({ visible, onClose, children, modalStyle, padding, popup }) => {
8172
+ var _a;
8170
8173
  const [isShow, setIsShow] = useState(false);
8171
8174
  const modalEleRef = useRef(null);
8172
8175
  useEffect(() => {
@@ -8181,29 +8184,32 @@ const Modal = ({ visible, onClose, children, modalStyle, padding, popupAniData }
8181
8184
  parentNode === null || parentNode === void 0 ? void 0 : parentNode.appendChild(modalEleRef.current);
8182
8185
  }
8183
8186
  }, []);
8187
+ const isOpen = useMemo(() => {
8188
+ return ((popup === null || popup === void 0 ? void 0 : popup.id) && (popup === null || popup === void 0 ? void 0 : popup.id) !== '') || visible;
8189
+ }, [visible, popup]);
8184
8190
  useEffect(() => {
8185
- if (visible) {
8191
+ if (isOpen) {
8186
8192
  setIsShow(true);
8187
8193
  }
8188
8194
  else {
8189
8195
  setTimeout(() => {
8190
8196
  setIsShow(false);
8191
- }, cssAni === null || cssAni === void 0 ? void 0 : cssAni.duration);
8197
+ }, popup === null || popup === void 0 ? void 0 : popup.duration);
8192
8198
  }
8193
- }, [visible, cssAni]);
8199
+ }, [isOpen, popup]);
8194
8200
  if (!modalEleRef.current)
8195
8201
  return null;
8196
8202
  const handleClose = debounce(() => {
8197
8203
  onClose === null || onClose === void 0 ? void 0 : onClose();
8198
8204
  }, 300);
8199
- return ReactDOM.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 },
8200
- 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) => {
8205
+ return ReactDOM.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 },
8206
+ 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) => {
8201
8207
  e.stopPropagation();
8202
8208
  e.preventDefault();
8203
8209
  } },
8204
8210
  React.createElement("div", { onClick: onClose, className: 'modal-icon-wrapper' },
8205
8211
  React.createElement("img", { src: closeIcon, alt: 'close', className: 'modal-icon' })),
8206
- children)), modalEleRef.current);
8212
+ children)))), modalEleRef.current);
8207
8213
  };
8208
8214
  var Modal$1 = memo(Modal);
8209
8215
 
@@ -8509,7 +8515,6 @@ const getMediaValueByMode = (obj) => {
8509
8515
 
8510
8516
  const Prompt$1 = (_a) => {
8511
8517
  var { content, btnText, style, icon, onClick } = _a, props = __rest(_a, ["content", "btnText", "style", "icon", "onClick"]);
8512
- useEditor();
8513
8518
  const iconSrc = typeof icon === 'string' ? icon : getMediaValueByMode(icon);
8514
8519
  const handleOk = () => {
8515
8520
  window === null || window === void 0 ? void 0 : window.sxpPopup('');
@@ -8546,11 +8551,12 @@ const Prompt = createMaterial(PromptComponent, {
8546
8551
  sort: 3
8547
8552
  });
8548
8553
 
8554
+ var _a$2, _b$2;
8549
8555
  /*
8550
8556
  * @Author: binruan@chatlabs.com
8551
8557
  * @Date: 2024-03-26 16:50:25
8552
8558
  * @LastEditors: binruan@chatlabs.com
8553
- * @LastEditTime: 2024-03-28 18:42:26
8559
+ * @LastEditTime: 2024-04-12 17:37:19
8554
8560
  * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\CommodityDetailDiroNew\settingRender.tsx
8555
8561
  *
8556
8562
  */
@@ -8625,8 +8631,9 @@ var settingRender$2 = [
8625
8631
  },
8626
8632
  {
8627
8633
  type: 'Select',
8628
- options: [{ label: '黑体', value: '黑体' }],
8629
- 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
8630
8637
  },
8631
8638
  {
8632
8639
  type: 'Number',
@@ -8705,7 +8712,8 @@ var settingRender$2 = [
8705
8712
  {
8706
8713
  type: 'Select',
8707
8714
  name: ['props', 'buttonStyle', 'fontFamily'],
8708
- options: [{ label: '黑体', value: '黑体' }]
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
8709
8717
  },
8710
8718
  {
8711
8719
  type: 'Number',
@@ -8894,11 +8902,12 @@ const CommodityDetailDiroNew = createMaterial(CommodityDetailDiroNewComponent, {
8894
8902
  sort: 1
8895
8903
  });
8896
8904
 
8905
+ var _a$1, _b$1;
8897
8906
  /*
8898
8907
  * @Author: binruan@chatlabs.com
8899
8908
  * @Date: 2024-03-26 16:50:25
8900
8909
  * @LastEditors: binruan@chatlabs.com
8901
- * @LastEditTime: 2024-04-09 21:40:18
8910
+ * @LastEditTime: 2024-04-12 17:38:12
8902
8911
  * @FilePath: \pb-sxp-ui\src\materials\sxp\template\components\settingRender.tsx
8903
8912
  *
8904
8913
  */
@@ -9016,8 +9025,9 @@ var settingRender$1 = [
9016
9025
  },
9017
9026
  {
9018
9027
  type: 'Select',
9019
- options: [{ label: '黑体', value: '黑体' }],
9020
- 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
9021
9031
  },
9022
9032
  {
9023
9033
  type: 'Number',
@@ -9094,8 +9104,9 @@ var settingRender$1 = [
9094
9104
  },
9095
9105
  {
9096
9106
  type: 'Select',
9097
- options: [{ label: '黑体', value: '黑体' }],
9098
- 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
9099
9110
  },
9100
9111
  {
9101
9112
  type: 'Number',
@@ -9161,7 +9172,7 @@ const EventProvider = (_a) => {
9161
9172
  var { rec, children, className, onClick, style, isExternalLink = false } = _a; __rest(_a, ["rec", "children", "className", "onClick", "style", "isExternalLink"]);
9162
9173
  const ref = useRef(null);
9163
9174
  const isOnScreen = useOnScreen(ref);
9164
- const { popupAni } = useEditor();
9175
+ const { popup } = useEditor();
9165
9176
  const { setPopupDetailData, ctaEvent } = useSxpDataSource();
9166
9177
  const { jumpToWeb } = useEventReport();
9167
9178
  useEffect(() => {
@@ -9193,7 +9204,7 @@ const EventProvider = (_a) => {
9193
9204
  else {
9194
9205
  onClick === null || onClick === void 0 ? void 0 : onClick();
9195
9206
  }
9196
- }, popupAni === null || popupAni === void 0 ? void 0 : popupAni.duration);
9207
+ }, popup === null || popup === void 0 ? void 0 : popup.duration);
9197
9208
  return (React.createElement("div", { ref: ref, className: className, style: style, onClick: handleClick }, children));
9198
9209
  };
9199
9210
  var EventProvider$1 = memo(EventProvider);
@@ -9661,7 +9672,7 @@ const MultiCommodityDiro$1 = (_a) => {
9661
9672
  var _b, _c;
9662
9673
  var { content, style, bgImg, recData, onClick, bottom_image, ctaTempStyles, isExternalLink } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "onClick", "bottom_image", "ctaTempStyles", "isExternalLink"]);
9663
9674
  const { ctaEvent, setPopupDetailData, sxpParameter } = useSxpDataSource();
9664
- const { popupAni } = useEditor();
9675
+ const { popup } = useEditor();
9665
9676
  const { jumpToWeb } = useEventReport();
9666
9677
  const [products, setProducts] = 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]);
9667
9678
  const handleClick = throttle((item) => {
@@ -9679,7 +9690,7 @@ const MultiCommodityDiro$1 = (_a) => {
9679
9690
  else {
9680
9691
  onClick === null || onClick === void 0 ? void 0 : onClick();
9681
9692
  }
9682
- }, popupAni === null || popupAni === void 0 ? void 0 : popupAni.duration);
9693
+ }, popup === null || popup === void 0 ? void 0 : popup.duration);
9683
9694
  return (React.createElement(Scroll$1, { isPadding: !!recData }, products === null || products === void 0 ? void 0 : products.map((item) => {
9684
9695
  var _a, _b, _c, _d, _e, _f;
9685
9696
  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(Object.assign(Object.assign({}, style), { display: 'flex', flexShrink: 0, marginLeft: 0, marginRight: '8px' })) }, props, { onClick: () => handleClick(item) }),
@@ -9774,7 +9785,7 @@ const MultiCommodity$1 = (_a) => {
9774
9785
  var { content, style, bgImg, recData, onClick, bottom_image, ctaTempStyles, isExternalLink } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "onClick", "bottom_image", "ctaTempStyles", "isExternalLink"]);
9775
9786
  const { sxpParameter } = useSxpDataSource();
9776
9787
  const { ctaEvent, setPopupDetailData } = useSxpDataSource();
9777
- const { popupAni } = useEditor();
9788
+ const { popup } = useEditor();
9778
9789
  const [products, setProducts] = 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]);
9779
9790
  const { jumpToWeb } = useEventReport();
9780
9791
  const handleClick = throttle((item) => {
@@ -9792,7 +9803,7 @@ const MultiCommodity$1 = (_a) => {
9792
9803
  else {
9793
9804
  onClick === null || onClick === void 0 ? void 0 : onClick();
9794
9805
  }
9795
- }, popupAni === null || popupAni === void 0 ? void 0 : popupAni.duration);
9806
+ }, popup === null || popup === void 0 ? void 0 : popup.duration);
9796
9807
  return (React.createElement(Scroll$1, { isPadding: !!recData }, products === null || products === void 0 ? void 0 : products.map((item) => {
9797
9808
  var _a, _b, _c, _d, _e, _f;
9798
9809
  return (React.createElement(SwiperSlide, Object.assign({ hidden: recData && !(item === null || item === void 0 ? void 0 : item.bindCta), key: item.itemId, className: css(Object.assign(Object.assign({}, style), { display: 'flex', flexShrink: 0, marginLeft: 0, marginRight: '8px' })) }, props, { onClick: () => handleClick(item) }),
@@ -9886,7 +9897,7 @@ const MultiCommodityDiroNew$1 = (_a) => {
9886
9897
  var _b, _c;
9887
9898
  var { content, style, bgImg, recData, onClick, bottom_image, ctaTempStyles, isExternalLink } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "onClick", "bottom_image", "ctaTempStyles", "isExternalLink"]);
9888
9899
  const { ctaEvent, setPopupDetailData, sxpParameter } = useSxpDataSource();
9889
- const { popupAni } = useEditor();
9900
+ const { popup } = useEditor();
9890
9901
  const { jumpToWeb } = useEventReport();
9891
9902
  const [products, setProducts] = 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]);
9892
9903
  const handleClick = throttle((item) => {
@@ -9904,7 +9915,7 @@ const MultiCommodityDiroNew$1 = (_a) => {
9904
9915
  else {
9905
9916
  onClick === null || onClick === void 0 ? void 0 : onClick();
9906
9917
  }
9907
- }, popupAni === null || popupAni === void 0 ? void 0 : popupAni.duration);
9918
+ }, popup === null || popup === void 0 ? void 0 : popup.duration);
9908
9919
  return (React.createElement(Scroll$1, { isPadding: !!recData }, products === null || products === void 0 ? void 0 : products.map((item) => {
9909
9920
  var _a, _b, _c, _d, _e, _f;
9910
9921
  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(Object.assign(Object.assign({}, style), { display: 'flex', flexShrink: 0, marginLeft: 0, marginRight: '8px' })) }, props, { onClick: () => handleClick(item) }),
@@ -9982,11 +9993,12 @@ const MultiCommodityDiroNew = createMaterial(MultiCommodityDiroNewComponent, {
9982
9993
  sort: 4
9983
9994
  });
9984
9995
 
9996
+ var _a, _b;
9985
9997
  /*
9986
9998
  * @Author: binruan@chatlabs.com
9987
9999
  * @Date: 2024-04-07 14:07:12
9988
10000
  * @LastEditors: binruan@chatlabs.com
9989
- * @LastEditTime: 2024-04-07 14:54:11
10001
+ * @LastEditTime: 2024-04-12 17:39:45
9990
10002
  * @FilePath: \pb-sxp-ui\src\materials\sxp\HashTag\settingRender.tsx
9991
10003
  *
9992
10004
  */
@@ -10048,8 +10060,9 @@ var settingRender = [
10048
10060
  },
10049
10061
  {
10050
10062
  type: 'Select',
10051
- options: [{ label: '黑体', value: '黑体' }],
10052
- 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
10053
10066
  },
10054
10067
  {
10055
10068
  type: 'Number',
@@ -10123,7 +10136,8 @@ var settingRender = [
10123
10136
  {
10124
10137
  type: 'Select',
10125
10138
  name: ['props', 'buttonStyle', 'fontFamily'],
10126
- options: [{ label: '黑体', value: '黑体' }]
10139
+ options: fontOptions,
10140
+ initialValue: (_b = fontOptions === null || fontOptions === void 0 ? void 0 : fontOptions[0]) === null || _b === void 0 ? void 0 : _b.value
10127
10141
  },
10128
10142
  {
10129
10143
  type: 'Number',
@@ -11660,7 +11674,7 @@ var img$1 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeA
11660
11674
  * @Author: binruan@chatlabs.com
11661
11675
  * @Date: 2024-01-10 10:58:24
11662
11676
  * @LastEditors: binruan@chatlabs.com
11663
- * @LastEditTime: 2024-04-07 15:18:35
11677
+ * @LastEditTime: 2024-04-12 11:29:01
11664
11678
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\WaterFall\index.tsx
11665
11679
  *
11666
11680
  */
@@ -11724,7 +11738,7 @@ const WaterFall = (props) => {
11724
11738
  relatedContentId: (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.itemId,
11725
11739
  position: rec === null || rec === void 0 ? void 0 : rec.position,
11726
11740
  contentTags: JSON.stringify((_e = rec === null || rec === void 0 ? void 0 : rec.video) === null || _e === void 0 ? void 0 : _e.tags),
11727
- traceInfo: JSON.stringify((_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.traceInfo),
11741
+ traceInfo: (_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.traceInfo,
11728
11742
  hashTags: JSON.stringify([recData === null || recData === void 0 ? void 0 : recData.hashTag]),
11729
11743
  fromKName,
11730
11744
  fromKPage: location === null || location === void 0 ? void 0 : location.href,
@@ -12828,15 +12842,15 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
12828
12842
  * @Author: binruan@chatlabs.com
12829
12843
  * @Date: 2023-10-31 10:56:01
12830
12844
  * @LastEditors: binruan@chatlabs.com
12831
- * @LastEditTime: 2024-04-10 09:57:19
12845
+ * @LastEditTime: 2024-04-12 09:50:58
12832
12846
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Popup\index.tsx
12833
12847
  *
12834
12848
  */
12835
12849
  const Popup = () => {
12836
- const { schema, resolver, popup, popupAni } = useEditor();
12850
+ const { schema, resolver, popup } = useEditor();
12837
12851
  const { setPopupDetailData, popupDetailData, bffEventReport } = useSxpDataSource();
12838
12852
  const { productView } = useEventReport();
12839
- const [visible, setVisible] = useState(false);
12853
+ const [visible, setVisible] = useState();
12840
12854
  const curTimeRef = useRef(null);
12841
12855
  useEffect(() => {
12842
12856
  const initTime = () => {
@@ -12849,33 +12863,33 @@ const Popup = () => {
12849
12863
  };
12850
12864
  }, []);
12851
12865
  useEffect(() => {
12852
- if (popup && popup !== '') {
12866
+ if (popup && (popup === null || popup === void 0 ? void 0 : popup.id) && (popup === null || popup === void 0 ? void 0 : popup.id) !== '') {
12853
12867
  curTimeRef.current = new Date();
12854
- setVisible(true);
12868
+ setVisible(popup);
12855
12869
  }
12856
12870
  }, [popup]);
12857
12871
  const handleClose = () => {
12858
- var _a, _b, _c;
12859
- if (!popup || popup === '' || !visible || new Date() - curTimeRef.current < (popupAni === null || popupAni === void 0 ? void 0 : popupAni.duration)) {
12872
+ var _a, _b, _c, _d;
12873
+ 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)) {
12860
12874
  return;
12861
12875
  }
12862
- setVisible(false);
12876
+ setVisible(Object.assign(Object.assign({}, popup), { id: '' }));
12863
12877
  const data = popupDetailData;
12864
- const product = (_a = data === null || data === void 0 ? void 0 : data.video) === null || _a === void 0 ? void 0 : _a.bindProduct;
12865
- 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;
12878
+ const product = (_b = data === null || data === void 0 ? void 0 : data.video) === null || _b === void 0 ? void 0 : _b.bindProduct;
12879
+ 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;
12866
12880
  if (product && cta) {
12867
12881
  productView(data, product, cta, curTimeRef.current);
12868
12882
  }
12869
12883
  setTimeout(() => {
12870
12884
  window === null || window === void 0 ? void 0 : window.sxpPopup('');
12871
12885
  setPopupDetailData === null || setPopupDetailData === void 0 ? void 0 : setPopupDetailData(null);
12872
- }, popupAni === null || popupAni === void 0 ? void 0 : popupAni.duration);
12886
+ }, popup === null || popup === void 0 ? void 0 : popup.duration);
12873
12887
  };
12874
12888
  const renderPopupDetail = useMemo(() => {
12875
12889
  var _a, _b, _c;
12876
12890
  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) => {
12877
12891
  var _a, _b, _c, _d, _e, _f, _g, _h;
12878
- if ((value === null || value === void 0 ? void 0 : value.id) === popup) {
12892
+ if ((value === null || value === void 0 ? void 0 : value.id) === (popup === null || popup === void 0 ? void 0 : popup.id)) {
12879
12893
  const t = resolver[(_a = value === null || value === void 0 ? void 0 : value.item) === null || _a === void 0 ? void 0 : _a.type];
12880
12894
  const Component = withBindDataSource(t);
12881
12895
  const defaulSetting = (_b = t === null || t === void 0 ? void 0 : t.extend) === null || _b === void 0 ? void 0 : _b.defaulSetting;
@@ -12886,7 +12900,7 @@ const Popup = () => {
12886
12900
  }
12887
12901
  });
12888
12902
  }, [schema, popup, resolver]);
12889
- return (React.createElement(Modal$1, { visible: !!visible, onClose: handleClose, padding: 0, modalStyle: { position: 'fixed' } }, renderPopupDetail));
12903
+ return (React.createElement(Modal$1, { popup: visible, onClose: handleClose, padding: 0, modalStyle: { position: 'fixed' } }, renderPopupDetail));
12890
12904
  };
12891
12905
 
12892
12906
  /*
@@ -12960,9 +12974,9 @@ function useEditorDataProvider() {
12960
12974
  * @Author : haocanweng@chatlabs.cn
12961
12975
  * @Date : 2023-08-21 16:31:58
12962
12976
  * @LastEditors: binruan@chatlabs.com
12963
- * @LastEditTime: 2023-12-26 13:56:34
12977
+ * @LastEditTime: 2024-04-12 16:59:53
12964
12978
  * @FilePath: \pb-sxp-ui\src\index.ts
12965
12979
  */
12966
12980
 
12967
- 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 };
12968
12982
  //# sourceMappingURL=index.js.map