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.cjs CHANGED
@@ -724,6 +724,11 @@ const item = {
724
724
  pathArr: [0],
725
725
  positionY: 0
726
726
  };
727
+ const popupInit = {
728
+ id: '',
729
+ duration: 0,
730
+ name: 'none'
731
+ };
727
732
  const EditorContext = React.createContext({
728
733
  resolver: {},
729
734
  currentNode: null,
@@ -743,12 +748,8 @@ const EditorContext = React.createContext({
743
748
  prePiontData: [],
744
749
  undoStack: [item],
745
750
  redoStack: [],
746
- popup: '',
747
- setPopup: () => { },
748
- popupAni: {
749
- name: 'none',
750
- duration: 0
751
- }
751
+ popup: popupInit,
752
+ setPopup: () => { }
752
753
  });
753
754
  const EditorCore = React.forwardRef(({ children, resolver, isSsr, schema, enableDataSource = true, utmVal }, ref) => {
754
755
  const [currentNode, setCurrentNode] = React.useState(null);
@@ -771,25 +772,10 @@ const EditorCore = React.forwardRef(({ children, resolver, isSsr, schema, enable
771
772
  */
772
773
  const [undoStack, setUndoStack] = React.useState([[item]]);
773
774
  const [redoStack, setRedoStack] = React.useState([]);
774
- const [popup, setPopup] = React.useState('');
775
- const [popupAni, setPopupAni] = React.useState({
776
- name: 'none',
777
- duration: 0
778
- });
775
+ const [popup, setPopup] = React.useState(popupInit);
779
776
  typeof window !== 'undefined' &&
780
777
  (window.sxpPopup = (type, aniType) => {
781
- if (aniType && (aniType === null || aniType === void 0 ? void 0 : aniType.name) !== 'none') {
782
- setPopupAni(Object.assign(Object.assign({}, popupAni), aniType));
783
- }
784
- else {
785
- setPopupAni({
786
- name: 'none',
787
- duration: 0
788
- });
789
- }
790
- setTimeout(() => {
791
- setPopup(type);
792
- });
778
+ setPopup(Object.assign(Object.assign(Object.assign({}, popupInit), { id: type }), aniType));
793
779
  });
794
780
  typeof window !== 'undefined' &&
795
781
  (window.getJointUtmLink = (url) => {
@@ -865,8 +851,7 @@ const EditorCore = React.forwardRef(({ children, resolver, isSsr, schema, enable
865
851
  setUndoStack,
866
852
  getCurPageConf,
867
853
  popup,
868
- setPopup,
869
- popupAni
854
+ setPopup
870
855
  } },
871
856
  React.createElement(DataSourceProvider$1, { isSsr: isSsr, enable: enableDataSource }, children)));
872
857
  });
@@ -888,6 +873,14 @@ var interactionRender$8 = [
888
873
  }
889
874
  ];
890
875
 
876
+ const fontOptions = [
877
+ { label: '应用字体', value: 'appFont' },
878
+ { label: '黑体', value: '黑体' }
879
+ ];
880
+ var defaultSetting = {
881
+ fontOptions
882
+ };
883
+
891
884
  /*
892
885
  * @Author: binruan@chatlabs.com
893
886
  * @Date: 2023-07-28 18:29:57
@@ -896,6 +889,7 @@ var interactionRender$8 = [
896
889
  * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\AppointForm\settingRender.tsx
897
890
  *
898
891
  */
892
+ var _a$4;
899
893
  var settingRender$5 = [
900
894
  {
901
895
  type: 'Text',
@@ -921,7 +915,8 @@ var settingRender$5 = [
921
915
  {
922
916
  type: 'Select',
923
917
  name: ['textStyle', 'fontFamily'],
924
- options: [{ label: '黑体', value: '黑体' }]
918
+ options: fontOptions,
919
+ initialValue: (_a$4 = fontOptions === null || fontOptions === void 0 ? void 0 : fontOptions[0]) === null || _a$4 === void 0 ? void 0 : _a$4.value
925
920
  },
926
921
  {
927
922
  type: 'Number',
@@ -1005,7 +1000,6 @@ var settingRender$5 = [
1005
1000
 
1006
1001
  const AppointForm$1 = (_a) => {
1007
1002
  var { columns, style, title, textStyle, submitBgColor, submitColor, submitText, layoutType, onClick } = _a, props = __rest(_a, ["columns", "style", "title", "textStyle", "submitBgColor", "submitColor", "submitText", "layoutType", "onClick"]);
1008
- useEditor();
1009
1003
  const { submitForm } = useSxpDataSource();
1010
1004
  const formRef = React.useRef();
1011
1005
  const [loading, setLoading] = React.useState(false);
@@ -1079,6 +1073,14 @@ function createMaterial(component, options) {
1079
1073
  return component;
1080
1074
  }
1081
1075
 
1076
+ /*
1077
+ * @Author: binruan@chatlabs.com
1078
+ * @Date: 2023-07-28 18:29:57
1079
+ * @LastEditors: binruan@chatlabs.com
1080
+ * @LastEditTime: 2024-04-12 17:35:22
1081
+ * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\AppointForm\material.tsx
1082
+ *
1083
+ */
1082
1084
  const AppointForm = createMaterial(AppointFormComponent, {
1083
1085
  displayName: '预约表单',
1084
1086
  icon: '',
@@ -1102,7 +1104,6 @@ const AppointForm = createMaterial(AppointFormComponent, {
1102
1104
  textStyle: {
1103
1105
  fontSize: 14,
1104
1106
  color: '#000',
1105
- fontFamily: '黑体',
1106
1107
  textAlign: 'center'
1107
1108
  }
1108
1109
  },
@@ -1115,10 +1116,11 @@ const AppointForm = createMaterial(AppointFormComponent, {
1115
1116
  * @Author: binruan@chatlabs.com
1116
1117
  * @Date: 2024-04-02 18:01:34
1117
1118
  * @LastEditors: binruan@chatlabs.com
1118
- * @LastEditTime: 2024-04-02 18:01:41
1119
- * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\CommodityDetailDiro\settingRender.tsx
1119
+ * @LastEditTime: 2024-04-12 16:46:04
1120
+ * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\CommodityDetail\settingRender.tsx
1120
1121
  *
1121
1122
  */
1123
+ var _a$3, _b$3;
1122
1124
  /*
1123
1125
  * @Author: binruan@chatlabs.com
1124
1126
  * @Date: 2024-03-26 16:50:25
@@ -1194,8 +1196,9 @@ var settingRender$4 = [
1194
1196
  },
1195
1197
  {
1196
1198
  type: 'Select',
1197
- options: [{ label: '黑体', value: '黑体' }],
1198
- name: ['fontFamily']
1199
+ options: fontOptions,
1200
+ name: ['fontFamily'],
1201
+ initialValue: (_a$3 = fontOptions === null || fontOptions === void 0 ? void 0 : fontOptions[0]) === null || _a$3 === void 0 ? void 0 : _a$3.value
1199
1202
  },
1200
1203
  {
1201
1204
  type: 'Number',
@@ -1274,7 +1277,8 @@ var settingRender$4 = [
1274
1277
  {
1275
1278
  type: 'Select',
1276
1279
  name: ['props', 'buttonStyle', 'fontFamily'],
1277
- options: [{ label: '黑体', value: '黑体' }]
1280
+ options: fontOptions,
1281
+ initialValue: (_b$3 = fontOptions === null || fontOptions === void 0 ? void 0 : fontOptions[0]) === null || _b$3 === void 0 ? void 0 : _b$3.value
1278
1282
  },
1279
1283
  {
1280
1284
  type: 'Number',
@@ -8102,7 +8106,7 @@ SwiperSlide.displayName = 'SwiperSlide';
8102
8106
  * @Author: binruan@chatlabs.com
8103
8107
  * @Date: 2024-03-12 10:59:06
8104
8108
  * @LastEditors: binruan@chatlabs.com
8105
- * @LastEditTime: 2024-03-18 17:38:46
8109
+ * @LastEditTime: 2024-04-12 15:10:39
8106
8110
  * @FilePath: \pb-sxp-ui\src\core\hooks\useEventReport.ts
8107
8111
  *
8108
8112
  */
@@ -8157,7 +8161,7 @@ function useEventReport() {
8157
8161
  eventInfo: {
8158
8162
  productId: product === null || product === void 0 ? void 0 : product.itemId,
8159
8163
  productName: product === null || product === void 0 ? void 0 : product.title,
8160
- price: (product === null || product === void 0 ? void 0 : product.price) + '',
8164
+ price: (product === null || product === void 0 ? void 0 : product.price) ? (product === null || product === void 0 ? void 0 : product.price) + '' : '0',
8161
8165
  productCollection: product === null || product === void 0 ? void 0 : product.collection,
8162
8166
  fromKName,
8163
8167
  fromKPage: location === null || location === void 0 ? void 0 : location.href,
@@ -8182,14 +8186,13 @@ function useEventReport() {
8182
8186
  * @Author: binruan@chatlabs.com
8183
8187
  * @Date: 2023-11-02 18:34:34
8184
8188
  * @LastEditors: binruan@chatlabs.com
8185
- * @LastEditTime: 2024-04-10 18:40:21
8189
+ * @LastEditTime: 2024-04-12 11:23:00
8186
8190
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Modal\index.tsx
8187
8191
  *
8188
8192
  */
8189
8193
  const closeIcon = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAjhJREFUWEfFlztOw0AQhmeWiJ4CCmpQ5DiRQsIJyAWg5A0lR0AIChDiCJS8ER0cADgBeRSxt4CCDgkaKiq8i+zYeWx2413HEWmiJJv9v535Z2aN8M8vFPT9z3zETD0aAUChUJjwvPFHAJhBhB3Hqd6OAsK2yyucwykAvP38eJX398Z3AJDLlVYR8ToU9Rhj25TWr9KEsKy5dULIGQCMtfZly45TvwsAstm56UwG6wA4FUFwzrdctxZBDcWSy5XWEPG8I84/GcMipdWPtgcsaz5PCHtKG0IuTiqUvjT9U/WYMG2IOPE+AP+LtCB0xKUAAyA2Xbd2o2OG0NQXvTnvhL17D7EPtH9TRCIWwkRcGYGIQgYBABuqPuHXOQBc6pw80lBGwBQiiXhsBHQhkoprA6iM6acjhDQKu5YJZW6XeOI3XJdpvfsdTu52VfXEekD8owQiXGIubpSCbhDbLu8DwKEAd+A41SOdPpE4BS0viFOtvV2iKWqUgn5x/tmS70xR01GuDSCKc86/OCcLgTyyZ0ScDGNhFAktAJV4NFJ9YyaFiAWIE+9uVkkgBgLoig8DMWAa9ro9ynkUdlW5maZDCmB6clmz0k1HH4Cs1Ezbq2p2yEpUuBOKTSZZex00RUWIrltxuuK6EOGDSbGIOPZicpMx6fny650377qNRgBgWeVFQuA+6UjVgREhGIMlSqsPUQqIbZdOOIdZQmCv2axRnU1N1+TzJYsxOEaEV8ep7frPZ7Gd0FTEdP0ft0/kMNdg0eoAAAAASUVORK5CYII=';
8190
- const Modal = ({ visible, onClose, children, modalStyle, padding, popupAniData }) => {
8191
- const { popupAni } = useEditor();
8192
- const cssAni = popupAniData !== null && popupAniData !== void 0 ? popupAniData : popupAni;
8194
+ const Modal = ({ visible, onClose, children, modalStyle, padding, popup }) => {
8195
+ var _a;
8193
8196
  const [isShow, setIsShow] = React.useState(false);
8194
8197
  const modalEleRef = React.useRef(null);
8195
8198
  React.useEffect(() => {
@@ -8204,29 +8207,32 @@ const Modal = ({ visible, onClose, children, modalStyle, padding, popupAniData }
8204
8207
  parentNode === null || parentNode === void 0 ? void 0 : parentNode.appendChild(modalEleRef.current);
8205
8208
  }
8206
8209
  }, []);
8210
+ const isOpen = React.useMemo(() => {
8211
+ return ((popup === null || popup === void 0 ? void 0 : popup.id) && (popup === null || popup === void 0 ? void 0 : popup.id) !== '') || visible;
8212
+ }, [visible, popup]);
8207
8213
  React.useEffect(() => {
8208
- if (visible) {
8214
+ if (isOpen) {
8209
8215
  setIsShow(true);
8210
8216
  }
8211
8217
  else {
8212
8218
  setTimeout(() => {
8213
8219
  setIsShow(false);
8214
- }, cssAni === null || cssAni === void 0 ? void 0 : cssAni.duration);
8220
+ }, popup === null || popup === void 0 ? void 0 : popup.duration);
8215
8221
  }
8216
- }, [visible, cssAni]);
8222
+ }, [isOpen, popup]);
8217
8223
  if (!modalEleRef.current)
8218
8224
  return null;
8219
8225
  const handleClose = lodash.debounce(() => {
8220
8226
  onClose === null || onClose === void 0 ? void 0 : onClose();
8221
8227
  }, 300);
8222
- 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 },
8223
- 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) => {
8228
+ 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 },
8229
+ 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) => {
8224
8230
  e.stopPropagation();
8225
8231
  e.preventDefault();
8226
8232
  } },
8227
8233
  React.createElement("div", { onClick: onClose, className: 'modal-icon-wrapper' },
8228
8234
  React.createElement("img", { src: closeIcon, alt: 'close', className: 'modal-icon' })),
8229
- children)), modalEleRef.current);
8235
+ children)))), modalEleRef.current);
8230
8236
  };
8231
8237
  var Modal$1 = React.memo(Modal);
8232
8238
 
@@ -8532,7 +8538,6 @@ const getMediaValueByMode = (obj) => {
8532
8538
 
8533
8539
  const Prompt$1 = (_a) => {
8534
8540
  var { content, btnText, style, icon, onClick } = _a, props = __rest(_a, ["content", "btnText", "style", "icon", "onClick"]);
8535
- useEditor();
8536
8541
  const iconSrc = typeof icon === 'string' ? icon : getMediaValueByMode(icon);
8537
8542
  const handleOk = () => {
8538
8543
  window === null || window === void 0 ? void 0 : window.sxpPopup('');
@@ -8569,11 +8574,12 @@ const Prompt = createMaterial(PromptComponent, {
8569
8574
  sort: 3
8570
8575
  });
8571
8576
 
8577
+ var _a$2, _b$2;
8572
8578
  /*
8573
8579
  * @Author: binruan@chatlabs.com
8574
8580
  * @Date: 2024-03-26 16:50:25
8575
8581
  * @LastEditors: binruan@chatlabs.com
8576
- * @LastEditTime: 2024-03-28 18:42:26
8582
+ * @LastEditTime: 2024-04-12 17:37:19
8577
8583
  * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\CommodityDetailDiroNew\settingRender.tsx
8578
8584
  *
8579
8585
  */
@@ -8648,8 +8654,9 @@ var settingRender$2 = [
8648
8654
  },
8649
8655
  {
8650
8656
  type: 'Select',
8651
- options: [{ label: '黑体', value: '黑体' }],
8652
- name: ['fontFamily']
8657
+ options: fontOptions,
8658
+ name: ['fontFamily'],
8659
+ initialValue: (_a$2 = fontOptions === null || fontOptions === void 0 ? void 0 : fontOptions[0]) === null || _a$2 === void 0 ? void 0 : _a$2.value
8653
8660
  },
8654
8661
  {
8655
8662
  type: 'Number',
@@ -8728,7 +8735,8 @@ var settingRender$2 = [
8728
8735
  {
8729
8736
  type: 'Select',
8730
8737
  name: ['props', 'buttonStyle', 'fontFamily'],
8731
- options: [{ label: '黑体', value: '黑体' }]
8738
+ options: fontOptions,
8739
+ initialValue: (_b$2 = fontOptions === null || fontOptions === void 0 ? void 0 : fontOptions[0]) === null || _b$2 === void 0 ? void 0 : _b$2.value
8732
8740
  },
8733
8741
  {
8734
8742
  type: 'Number',
@@ -8917,11 +8925,12 @@ const CommodityDetailDiroNew = createMaterial(CommodityDetailDiroNewComponent, {
8917
8925
  sort: 1
8918
8926
  });
8919
8927
 
8928
+ var _a$1, _b$1;
8920
8929
  /*
8921
8930
  * @Author: binruan@chatlabs.com
8922
8931
  * @Date: 2024-03-26 16:50:25
8923
8932
  * @LastEditors: binruan@chatlabs.com
8924
- * @LastEditTime: 2024-04-09 21:40:18
8933
+ * @LastEditTime: 2024-04-12 17:38:12
8925
8934
  * @FilePath: \pb-sxp-ui\src\materials\sxp\template\components\settingRender.tsx
8926
8935
  *
8927
8936
  */
@@ -9039,8 +9048,9 @@ var settingRender$1 = [
9039
9048
  },
9040
9049
  {
9041
9050
  type: 'Select',
9042
- options: [{ label: '黑体', value: '黑体' }],
9043
- name: ['props', 'ctaTempStyles', 'title', 'fontFamily']
9051
+ options: fontOptions,
9052
+ name: ['props', 'ctaTempStyles', 'title', 'fontFamily'],
9053
+ initialValue: (_a$1 = fontOptions === null || fontOptions === void 0 ? void 0 : fontOptions[0]) === null || _a$1 === void 0 ? void 0 : _a$1.value
9044
9054
  },
9045
9055
  {
9046
9056
  type: 'Number',
@@ -9117,8 +9127,9 @@ var settingRender$1 = [
9117
9127
  },
9118
9128
  {
9119
9129
  type: 'Select',
9120
- options: [{ label: '黑体', value: '黑体' }],
9121
- name: ['props', 'ctaTempStyles', 'ctaTitle', 'fontFamily']
9130
+ options: fontOptions,
9131
+ name: ['props', 'ctaTempStyles', 'ctaTitle', 'fontFamily'],
9132
+ initialValue: (_b$1 = fontOptions === null || fontOptions === void 0 ? void 0 : fontOptions[0]) === null || _b$1 === void 0 ? void 0 : _b$1.value
9122
9133
  },
9123
9134
  {
9124
9135
  type: 'Number',
@@ -9184,7 +9195,7 @@ const EventProvider = (_a) => {
9184
9195
  var { rec, children, className, onClick, style, isExternalLink = false } = _a; __rest(_a, ["rec", "children", "className", "onClick", "style", "isExternalLink"]);
9185
9196
  const ref = React.useRef(null);
9186
9197
  const isOnScreen = useOnScreen(ref);
9187
- const { popupAni } = useEditor();
9198
+ const { popup } = useEditor();
9188
9199
  const { setPopupDetailData, ctaEvent } = useSxpDataSource();
9189
9200
  const { jumpToWeb } = useEventReport();
9190
9201
  React.useEffect(() => {
@@ -9216,7 +9227,7 @@ const EventProvider = (_a) => {
9216
9227
  else {
9217
9228
  onClick === null || onClick === void 0 ? void 0 : onClick();
9218
9229
  }
9219
- }, popupAni === null || popupAni === void 0 ? void 0 : popupAni.duration);
9230
+ }, popup === null || popup === void 0 ? void 0 : popup.duration);
9220
9231
  return (React.createElement("div", { ref: ref, className: className, style: style, onClick: handleClick }, children));
9221
9232
  };
9222
9233
  var EventProvider$1 = React.memo(EventProvider);
@@ -9684,7 +9695,7 @@ const MultiCommodityDiro$1 = (_a) => {
9684
9695
  var _b, _c;
9685
9696
  var { content, style, bgImg, recData, onClick, bottom_image, ctaTempStyles, isExternalLink } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "onClick", "bottom_image", "ctaTempStyles", "isExternalLink"]);
9686
9697
  const { ctaEvent, setPopupDetailData, sxpParameter } = useSxpDataSource();
9687
- const { popupAni } = useEditor();
9698
+ const { popup } = useEditor();
9688
9699
  const { jumpToWeb } = useEventReport();
9689
9700
  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]);
9690
9701
  const handleClick = lodash.throttle((item) => {
@@ -9702,7 +9713,7 @@ const MultiCommodityDiro$1 = (_a) => {
9702
9713
  else {
9703
9714
  onClick === null || onClick === void 0 ? void 0 : onClick();
9704
9715
  }
9705
- }, popupAni === null || popupAni === void 0 ? void 0 : popupAni.duration);
9716
+ }, popup === null || popup === void 0 ? void 0 : popup.duration);
9706
9717
  return (React.createElement(Scroll$1, { isPadding: !!recData }, products === null || products === void 0 ? void 0 : products.map((item) => {
9707
9718
  var _a, _b, _c, _d, _e, _f;
9708
9719
  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) }),
@@ -9797,7 +9808,7 @@ const MultiCommodity$1 = (_a) => {
9797
9808
  var { content, style, bgImg, recData, onClick, bottom_image, ctaTempStyles, isExternalLink } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "onClick", "bottom_image", "ctaTempStyles", "isExternalLink"]);
9798
9809
  const { sxpParameter } = useSxpDataSource();
9799
9810
  const { ctaEvent, setPopupDetailData } = useSxpDataSource();
9800
- const { popupAni } = useEditor();
9811
+ const { popup } = useEditor();
9801
9812
  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]);
9802
9813
  const { jumpToWeb } = useEventReport();
9803
9814
  const handleClick = lodash.throttle((item) => {
@@ -9815,7 +9826,7 @@ const MultiCommodity$1 = (_a) => {
9815
9826
  else {
9816
9827
  onClick === null || onClick === void 0 ? void 0 : onClick();
9817
9828
  }
9818
- }, popupAni === null || popupAni === void 0 ? void 0 : popupAni.duration);
9829
+ }, popup === null || popup === void 0 ? void 0 : popup.duration);
9819
9830
  return (React.createElement(Scroll$1, { isPadding: !!recData }, products === null || products === void 0 ? void 0 : products.map((item) => {
9820
9831
  var _a, _b, _c, _d, _e, _f;
9821
9832
  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) }),
@@ -9909,7 +9920,7 @@ const MultiCommodityDiroNew$1 = (_a) => {
9909
9920
  var _b, _c;
9910
9921
  var { content, style, bgImg, recData, onClick, bottom_image, ctaTempStyles, isExternalLink } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "onClick", "bottom_image", "ctaTempStyles", "isExternalLink"]);
9911
9922
  const { ctaEvent, setPopupDetailData, sxpParameter } = useSxpDataSource();
9912
- const { popupAni } = useEditor();
9923
+ const { popup } = useEditor();
9913
9924
  const { jumpToWeb } = useEventReport();
9914
9925
  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]);
9915
9926
  const handleClick = lodash.throttle((item) => {
@@ -9927,7 +9938,7 @@ const MultiCommodityDiroNew$1 = (_a) => {
9927
9938
  else {
9928
9939
  onClick === null || onClick === void 0 ? void 0 : onClick();
9929
9940
  }
9930
- }, popupAni === null || popupAni === void 0 ? void 0 : popupAni.duration);
9941
+ }, popup === null || popup === void 0 ? void 0 : popup.duration);
9931
9942
  return (React.createElement(Scroll$1, { isPadding: !!recData }, products === null || products === void 0 ? void 0 : products.map((item) => {
9932
9943
  var _a, _b, _c, _d, _e, _f;
9933
9944
  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) }),
@@ -10005,11 +10016,12 @@ const MultiCommodityDiroNew = createMaterial(MultiCommodityDiroNewComponent, {
10005
10016
  sort: 4
10006
10017
  });
10007
10018
 
10019
+ var _a, _b;
10008
10020
  /*
10009
10021
  * @Author: binruan@chatlabs.com
10010
10022
  * @Date: 2024-04-07 14:07:12
10011
10023
  * @LastEditors: binruan@chatlabs.com
10012
- * @LastEditTime: 2024-04-07 14:54:11
10024
+ * @LastEditTime: 2024-04-12 17:39:45
10013
10025
  * @FilePath: \pb-sxp-ui\src\materials\sxp\HashTag\settingRender.tsx
10014
10026
  *
10015
10027
  */
@@ -10071,8 +10083,9 @@ var settingRender = [
10071
10083
  },
10072
10084
  {
10073
10085
  type: 'Select',
10074
- options: [{ label: '黑体', value: '黑体' }],
10075
- name: ['fontFamily']
10086
+ options: fontOptions,
10087
+ name: ['fontFamily'],
10088
+ initialValue: (_a = fontOptions === null || fontOptions === void 0 ? void 0 : fontOptions[0]) === null || _a === void 0 ? void 0 : _a.value
10076
10089
  },
10077
10090
  {
10078
10091
  type: 'Number',
@@ -10146,7 +10159,8 @@ var settingRender = [
10146
10159
  {
10147
10160
  type: 'Select',
10148
10161
  name: ['props', 'buttonStyle', 'fontFamily'],
10149
- options: [{ label: '黑体', value: '黑体' }]
10162
+ options: fontOptions,
10163
+ initialValue: (_b = fontOptions === null || fontOptions === void 0 ? void 0 : fontOptions[0]) === null || _b === void 0 ? void 0 : _b.value
10150
10164
  },
10151
10165
  {
10152
10166
  type: 'Number',
@@ -11683,7 +11697,7 @@ var img$1 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeA
11683
11697
  * @Author: binruan@chatlabs.com
11684
11698
  * @Date: 2024-01-10 10:58:24
11685
11699
  * @LastEditors: binruan@chatlabs.com
11686
- * @LastEditTime: 2024-04-07 15:18:35
11700
+ * @LastEditTime: 2024-04-12 11:29:01
11687
11701
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\WaterFall\index.tsx
11688
11702
  *
11689
11703
  */
@@ -11747,7 +11761,7 @@ const WaterFall = (props) => {
11747
11761
  relatedContentId: (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.itemId,
11748
11762
  position: rec === null || rec === void 0 ? void 0 : rec.position,
11749
11763
  contentTags: JSON.stringify((_e = rec === null || rec === void 0 ? void 0 : rec.video) === null || _e === void 0 ? void 0 : _e.tags),
11750
- traceInfo: JSON.stringify((_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.traceInfo),
11764
+ traceInfo: (_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.traceInfo,
11751
11765
  hashTags: JSON.stringify([recData === null || recData === void 0 ? void 0 : recData.hashTag]),
11752
11766
  fromKName,
11753
11767
  fromKPage: location === null || location === void 0 ? void 0 : location.href,
@@ -12851,15 +12865,15 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
12851
12865
  * @Author: binruan@chatlabs.com
12852
12866
  * @Date: 2023-10-31 10:56:01
12853
12867
  * @LastEditors: binruan@chatlabs.com
12854
- * @LastEditTime: 2024-04-10 09:57:19
12868
+ * @LastEditTime: 2024-04-12 09:50:58
12855
12869
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Popup\index.tsx
12856
12870
  *
12857
12871
  */
12858
12872
  const Popup = () => {
12859
- const { schema, resolver, popup, popupAni } = useEditor();
12873
+ const { schema, resolver, popup } = useEditor();
12860
12874
  const { setPopupDetailData, popupDetailData, bffEventReport } = useSxpDataSource();
12861
12875
  const { productView } = useEventReport();
12862
- const [visible, setVisible] = React.useState(false);
12876
+ const [visible, setVisible] = React.useState();
12863
12877
  const curTimeRef = React.useRef(null);
12864
12878
  React.useEffect(() => {
12865
12879
  const initTime = () => {
@@ -12872,33 +12886,33 @@ const Popup = () => {
12872
12886
  };
12873
12887
  }, []);
12874
12888
  React.useEffect(() => {
12875
- if (popup && popup !== '') {
12889
+ if (popup && (popup === null || popup === void 0 ? void 0 : popup.id) && (popup === null || popup === void 0 ? void 0 : popup.id) !== '') {
12876
12890
  curTimeRef.current = new Date();
12877
- setVisible(true);
12891
+ setVisible(popup);
12878
12892
  }
12879
12893
  }, [popup]);
12880
12894
  const handleClose = () => {
12881
- var _a, _b, _c;
12882
- if (!popup || popup === '' || !visible || new Date() - curTimeRef.current < (popupAni === null || popupAni === void 0 ? void 0 : popupAni.duration)) {
12895
+ var _a, _b, _c, _d;
12896
+ 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)) {
12883
12897
  return;
12884
12898
  }
12885
- setVisible(false);
12899
+ setVisible(Object.assign(Object.assign({}, popup), { id: '' }));
12886
12900
  const data = popupDetailData;
12887
- const product = (_a = data === null || data === void 0 ? void 0 : data.video) === null || _a === void 0 ? void 0 : _a.bindProduct;
12888
- 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;
12901
+ const product = (_b = data === null || data === void 0 ? void 0 : data.video) === null || _b === void 0 ? void 0 : _b.bindProduct;
12902
+ 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;
12889
12903
  if (product && cta) {
12890
12904
  productView(data, product, cta, curTimeRef.current);
12891
12905
  }
12892
12906
  setTimeout(() => {
12893
12907
  window === null || window === void 0 ? void 0 : window.sxpPopup('');
12894
12908
  setPopupDetailData === null || setPopupDetailData === void 0 ? void 0 : setPopupDetailData(null);
12895
- }, popupAni === null || popupAni === void 0 ? void 0 : popupAni.duration);
12909
+ }, popup === null || popup === void 0 ? void 0 : popup.duration);
12896
12910
  };
12897
12911
  const renderPopupDetail = React.useMemo(() => {
12898
12912
  var _a, _b, _c;
12899
12913
  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) => {
12900
12914
  var _a, _b, _c, _d, _e, _f, _g, _h;
12901
- if ((value === null || value === void 0 ? void 0 : value.id) === popup) {
12915
+ if ((value === null || value === void 0 ? void 0 : value.id) === (popup === null || popup === void 0 ? void 0 : popup.id)) {
12902
12916
  const t = resolver[(_a = value === null || value === void 0 ? void 0 : value.item) === null || _a === void 0 ? void 0 : _a.type];
12903
12917
  const Component = withBindDataSource(t);
12904
12918
  const defaulSetting = (_b = t === null || t === void 0 ? void 0 : t.extend) === null || _b === void 0 ? void 0 : _b.defaulSetting;
@@ -12909,7 +12923,7 @@ const Popup = () => {
12909
12923
  }
12910
12924
  });
12911
12925
  }, [schema, popup, resolver]);
12912
- return (React.createElement(Modal$1, { visible: !!visible, onClose: handleClose, padding: 0, modalStyle: { position: 'fixed' } }, renderPopupDetail));
12926
+ return (React.createElement(Modal$1, { popup: visible, onClose: handleClose, padding: 0, modalStyle: { position: 'fixed' } }, renderPopupDetail));
12913
12927
  };
12914
12928
 
12915
12929
  /*
@@ -12983,7 +12997,7 @@ function useEditorDataProvider() {
12983
12997
  * @Author : haocanweng@chatlabs.cn
12984
12998
  * @Date : 2023-08-21 16:31:58
12985
12999
  * @LastEditors: binruan@chatlabs.com
12986
- * @LastEditTime: 2023-12-26 13:56:34
13000
+ * @LastEditTime: 2024-04-12 16:59:53
12987
13001
  * @FilePath: \pb-sxp-ui\src\index.ts
12988
13002
  */
12989
13003
 
@@ -12994,6 +13008,7 @@ exports.SxpPageCore = index;
12994
13008
  exports.SxpPageRender = SxpPageRender;
12995
13009
  exports.core = index$1;
12996
13010
  exports.default = Pagebuilder;
13011
+ exports.defaultSetting = defaultSetting;
12997
13012
  exports.materials = _materials_;
12998
13013
  exports.useEditorDataProvider = useEditorDataProvider;
12999
13014
  //# sourceMappingURL=index.cjs.map