pb-sxp-ui 1.0.2-alpha.1 → 1.0.3-alpha.1

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 (40) hide show
  1. package/dist/index.cjs +476 -411
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.css +4 -115
  4. package/dist/index.js +476 -411
  5. package/dist/index.js.map +1 -1
  6. package/dist/index.min.cjs +3 -3
  7. package/dist/index.min.cjs.map +1 -1
  8. package/dist/index.min.js +3 -3
  9. package/dist/index.min.js.map +1 -1
  10. package/dist/pb-ui.js +476 -411
  11. package/dist/pb-ui.js.map +1 -1
  12. package/dist/pb-ui.min.js +3 -3
  13. package/dist/pb-ui.min.js.map +1 -1
  14. package/es/core/components/SxpPageRender/ExpandableText.js +2 -2
  15. package/es/core/components/SxpPageRender/index.js +1 -1
  16. package/es/materials/sxp/popup/CommodityDetail/index.d.ts +20 -1
  17. package/es/materials/sxp/popup/CommodityDetail/index.js +44 -21
  18. package/es/materials/sxp/popup/CommodityDetail/material.js +36 -1
  19. package/es/materials/sxp/popup/CommodityDetail/settingRender.d.ts +134 -0
  20. package/es/materials/sxp/popup/CommodityDetail/settingRender.js +167 -0
  21. package/es/materials/sxp/popup/CommodityDetailDiroNew/index.js +3 -3
  22. package/es/materials/sxp/popup/CommodityDetailDiroNew/material.js +11 -0
  23. package/es/materials/sxp/popup/CommodityDetailDiroNew/settingRender.d.ts +6 -6
  24. package/es/materials/sxp/popup/CommodityDetailDiroNew/settingRender.js +4 -8
  25. package/es/materials/sxp/popup/index.d.ts +0 -1
  26. package/es/materials/sxp/popup/index.js +0 -1
  27. package/lib/core/components/SxpPageRender/ExpandableText.js +2 -2
  28. package/lib/core/components/SxpPageRender/index.js +1 -1
  29. package/lib/materials/sxp/popup/CommodityDetail/index.d.ts +20 -1
  30. package/lib/materials/sxp/popup/CommodityDetail/index.js +43 -20
  31. package/lib/materials/sxp/popup/CommodityDetail/material.js +36 -1
  32. package/lib/materials/sxp/popup/CommodityDetail/settingRender.d.ts +134 -0
  33. package/lib/materials/sxp/popup/CommodityDetail/settingRender.js +169 -0
  34. package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.js +3 -3
  35. package/lib/materials/sxp/popup/CommodityDetailDiroNew/material.js +11 -0
  36. package/lib/materials/sxp/popup/CommodityDetailDiroNew/settingRender.d.ts +6 -6
  37. package/lib/materials/sxp/popup/CommodityDetailDiroNew/settingRender.js +4 -8
  38. package/lib/materials/sxp/popup/index.d.ts +0 -1
  39. package/lib/materials/sxp/popup/index.js +0 -1
  40. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -867,7 +867,7 @@ var interactionRender$8 = [
867
867
  * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\AppointForm\settingRender.tsx
868
868
  *
869
869
  */
870
- var settingRender$3 = [
870
+ var settingRender$4 = [
871
871
  {
872
872
  type: 'Text',
873
873
  label: '组件名称',
@@ -1056,7 +1056,7 @@ const AppointForm = createMaterial(AppointFormComponent, {
1056
1056
  category: 'popup',
1057
1057
  type: 'AppointForm',
1058
1058
  related: {
1059
- settingRender: settingRender$3,
1059
+ settingRender: settingRender$4,
1060
1060
  bindableProps: [],
1061
1061
  interactionRender: interactionRender$8
1062
1062
  },
@@ -1082,6 +1082,190 @@ const AppointForm = createMaterial(AppointFormComponent, {
1082
1082
  sort: 2
1083
1083
  });
1084
1084
 
1085
+ /*
1086
+ * @Author: binruan@chatlabs.com
1087
+ * @Date: 2024-04-02 18:01:34
1088
+ * @LastEditors: binruan@chatlabs.com
1089
+ * @LastEditTime: 2024-04-02 18:01:41
1090
+ * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\CommodityDetailDiro\settingRender.tsx
1091
+ *
1092
+ */
1093
+ /*
1094
+ * @Author: binruan@chatlabs.com
1095
+ * @Date: 2024-03-26 16:50:25
1096
+ * @LastEditors: binruan@chatlabs.com
1097
+ * @LastEditTime: 2024-03-28 18:42:26
1098
+ * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\CommodityDetailDiroNew\settingRender.tsx
1099
+ *
1100
+ */
1101
+ var settingRender$3 = [
1102
+ {
1103
+ title: '商品图片',
1104
+ child: [
1105
+ {
1106
+ type: 'Radius',
1107
+ label: '轮播指示器',
1108
+ options: [
1109
+ {
1110
+ label: '居左',
1111
+ value: 'left'
1112
+ },
1113
+ {
1114
+ label: '居中',
1115
+ value: 'center'
1116
+ }
1117
+ ],
1118
+ name: ['props', 'swiper', 'dotsAlign']
1119
+ },
1120
+ {
1121
+ type: 'Number',
1122
+ name: ['props', 'swiper', 'delay'],
1123
+ addonAfter: 's'
1124
+ }
1125
+ ]
1126
+ },
1127
+ {
1128
+ title: '商品文本',
1129
+ child: [
1130
+ {
1131
+ name: ['props', 'commodityStyles'],
1132
+ type: 'SelectLinkage',
1133
+ child: [
1134
+ {
1135
+ label: '字段',
1136
+ type: 'Select',
1137
+ options: [
1138
+ {
1139
+ label: '商品名称',
1140
+ value: 'title'
1141
+ },
1142
+ {
1143
+ label: '系列名称',
1144
+ value: 'collection'
1145
+ },
1146
+ {
1147
+ label: '价格',
1148
+ value: 'price'
1149
+ },
1150
+ {
1151
+ label: '商品描述',
1152
+ value: 'info'
1153
+ }
1154
+ ],
1155
+ name: ['props', 'commodityStyles', 'field'],
1156
+ initialValue: 'title'
1157
+ },
1158
+ {
1159
+ type: 'Group',
1160
+ label: '标题字体',
1161
+ child: [
1162
+ {
1163
+ type: 'Color',
1164
+ name: ['color']
1165
+ },
1166
+ {
1167
+ type: 'Select',
1168
+ options: [{ label: '黑体', value: '黑体' }],
1169
+ name: ['fontFamily']
1170
+ },
1171
+ {
1172
+ type: 'Number',
1173
+ addonAfter: 'px',
1174
+ name: ['fontSize']
1175
+ }
1176
+ ]
1177
+ },
1178
+ {
1179
+ label: '标题样式',
1180
+ type: 'TextStyle'
1181
+ },
1182
+ {
1183
+ label: '标题对齐',
1184
+ type: 'TextAlign'
1185
+ },
1186
+ {
1187
+ label: '默认行数',
1188
+ type: 'Number',
1189
+ name: ['lineClamp']
1190
+ }
1191
+ ]
1192
+ }
1193
+ ]
1194
+ },
1195
+ {
1196
+ title: '购买按钮样式',
1197
+ child: [
1198
+ {
1199
+ type: 'Color',
1200
+ label: '背景色',
1201
+ name: ['props', 'buttonStyle', 'backgroundColor'],
1202
+ initialValue: '#000'
1203
+ },
1204
+ {
1205
+ type: 'Group',
1206
+ label: '尺寸',
1207
+ child: [
1208
+ {
1209
+ type: 'Number',
1210
+ name: ['props', 'buttonStyle', 'height'],
1211
+ addonAfter: 'H'
1212
+ }
1213
+ ]
1214
+ },
1215
+ {
1216
+ type: 'Group',
1217
+ label: '圆角',
1218
+ child: [
1219
+ {
1220
+ type: 'Slider',
1221
+ name: ['props', 'buttonStyle', 'borderRadius'],
1222
+ max: 100
1223
+ },
1224
+ {
1225
+ type: 'Number',
1226
+ name: ['props', 'buttonStyle', 'borderRadius'],
1227
+ addonAfter: 'px',
1228
+ max: 100
1229
+ }
1230
+ ]
1231
+ },
1232
+ {
1233
+ type: 'TextMargin',
1234
+ name: ['props', 'buttonStyle']
1235
+ },
1236
+ {
1237
+ type: 'Group',
1238
+ label: '字体',
1239
+ child: [
1240
+ {
1241
+ type: 'Color',
1242
+ name: ['props', 'buttonStyle', 'color'],
1243
+ initialValue: '#fff'
1244
+ },
1245
+ {
1246
+ type: 'Select',
1247
+ name: ['props', 'buttonStyle', 'fontFamily'],
1248
+ options: [{ label: '黑体', value: '黑体' }]
1249
+ },
1250
+ {
1251
+ type: 'Number',
1252
+ name: ['props', 'buttonStyle', 'fontSize'],
1253
+ addonAfter: 'px'
1254
+ }
1255
+ ]
1256
+ },
1257
+ {
1258
+ type: 'TextStyle',
1259
+ name: ['props', 'buttonStyle']
1260
+ },
1261
+ {
1262
+ type: 'TextAlign',
1263
+ name: ['props', 'buttonStyle']
1264
+ }
1265
+ ]
1266
+ }
1267
+ ];
1268
+
1085
1269
  /**
1086
1270
  * SSR Window 4.0.2
1087
1271
  * Better handling for window object in SSR environment
@@ -7965,100 +8149,278 @@ function useEventReport() {
7965
8149
  };
7966
8150
  }
7967
8151
 
7968
- const CommodityDetail$1 = (_a) => {
7969
- var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
7970
- var { content, style, bgImg, onClick, schema, isDefault, bottom_image } = _a, props = __rest(_a, ["content", "style", "bgImg", "onClick", "schema", "isDefault", "bottom_image"]);
7971
- const { sxpParameter } = useSxpDataSource();
7972
- const { popupDetailData, bffEventReport, isPreview, waterFallData } = useSxpDataSource();
7973
- const { jumpToWeb, productView } = useEventReport();
7974
- const curTimeRef = useRef(null);
7975
- const product = (_b = popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.video) === null || _b === void 0 ? void 0 : _b.bindProduct;
7976
- const cta = (_d = (_c = popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.video) === null || _c === void 0 ? void 0 : _c.bindProduct) === null || _d === void 0 ? void 0 : _d.bindCta;
7977
- const handleLink = () => {
7978
- if (product === null || product === void 0 ? void 0 : product.link) {
7979
- jumpToWeb(popupDetailData, product, cta);
7980
- productView(popupDetailData, product, cta, curTimeRef.current);
7981
- window.location.href = window.getJointUtmLink(product.link);
7982
- }
7983
- };
7984
- useEffect(() => {
7985
- const initTime = () => {
7986
- curTimeRef.current = new Date();
7987
- };
7988
- initTime();
7989
- window.addEventListener('pageshow', initTime);
7990
- return () => {
7991
- window.removeEventListener('pageshow', initTime);
7992
- };
7993
- }, []);
7994
- const priceText = useMemo(() => {
7995
- var _a, _b, _c, _d, _e;
7996
- if ((product === null || product === void 0 ? void 0 : product.currency) && (product === null || product === void 0 ? void 0 : product.price)) {
7997
- return `${(_c = (_b = (_a = product === null || product === void 0 ? void 0 : product.currency) === null || _a === void 0 ? void 0 : _a.split('-')[1]) === null || _b === void 0 ? void 0 : _b.toUpperCase()) !== null && _c !== void 0 ? _c : ''}${(_e = (_d = product === null || product === void 0 ? void 0 : product.price) === null || _d === void 0 ? void 0 : _d.toLocaleString('zh', {
7998
- minimumFractionDigits: 0
7999
- })) !== null && _e !== void 0 ? _e : ''}`;
8000
- }
8001
- else {
8002
- return '$7,000';
8003
- }
8004
- }, [product === null || product === void 0 ? void 0 : product.price, product === null || product === void 0 ? void 0 : product.currency]);
8005
- const width = isPreview ? 375 : window.innerWidth;
8006
- return (React.createElement("div", { className: 'pb-commondity' },
8007
- React.createElement("div", Object.assign({ className: css(Object.assign({}, style)) }, props),
8008
- product && ((_e = product === null || product === void 0 ? void 0 : product.homePage) === null || _e === void 0 ? void 0 : _e.length) > 0 && (React.createElement(Swiper, { height: width, modules: [Pagination, Autoplay], pagination: { clickable: true, bulletActiveClass: 'swipe-item-active-bullet' }, loop: true, autoplay: {
8009
- delay: 3000
8010
- } }, (_f = product === null || product === void 0 ? void 0 : product.homePage) === null || _f === void 0 ? void 0 : _f.map((src) => {
8011
- return (React.createElement(SwiperSlide, { key: src },
8012
- React.createElement("div", { style: {
8013
- overflow: 'hidden',
8014
- width,
8015
- height: width
8016
- } },
8017
- React.createElement("img", { src: src, style: { height: '100%', width: '100%', objectFit: 'cover' } }))));
8018
- }))),
8019
- !((_g = product === null || product === void 0 ? void 0 : product.homePage) === null || _g === void 0 ? void 0 : _g.length) && (React.createElement("div", { className: css({
8020
- position: 'relative',
8021
- height: 0,
8022
- width: '100%',
8023
- paddingBottom: '100%',
8024
- overflow: 'hidden'
8025
- }) },
8026
- React.createElement("img", { className: css({
8027
- position: 'absolute',
8028
- left: 0,
8029
- top: 0,
8030
- objectFit: 'cover',
8031
- width: '100%'
8032
- }), src: (_h = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _h !== void 0 ? _h : bottom_image, alt: '' }))),
8033
- React.createElement("div", { className: 'pb-commondity-content' },
8034
- React.createElement("div", { className: 'pb-commondity-content-collection' }, (_j = product === null || product === void 0 ? void 0 : product.collection) !== null && _j !== void 0 ? _j : 'Tiffany Lock'),
8035
- React.createElement("div", { className: 'pb-commondity-content-title' }, (_k = product === null || product === void 0 ? void 0 : product.title) !== null && _k !== void 0 ? _k : 'Pendant in Yellow Gold with Diamonds, Medium'),
8036
- React.createElement("div", { className: 'pb-commondity-content-price' }, priceText),
8037
- React.createElement("div", { className: 'pb-commondity-content-info' }, (_l = product === null || product === void 0 ? void 0 : product.info) !== null && _l !== void 0 ? _l : `The design inspiration of Tiffany Lock series comes from the power of connection and inclusiveness, and the
8038
- bold and avant-garde visual design interprets the emotional bond connecting my heart. The Tiffany Lock
8039
- collection is unisex and is inspired by the padlock pattern found in the Tiffany Antique Collection. This
8040
- necklace features a stylish and eye-catching oval clasp chain decorated with a lock pattern. Crafted from
8041
- 18-karat gold, this necklace is embellished with hand-set diamonds.`))),
8042
- (isDefault || (product === null || product === void 0 ? void 0 : product.link)) && (React.createElement("button", { onClick: handleLink, className: 'pb-commondity-btn' }, (_m = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _m !== void 0 ? _m : 'Purchase on Website'))));
8043
- };
8044
- var CommodityDetailComponent = memo(CommodityDetail$1);
8045
-
8046
8152
  /*
8047
8153
  * @Author: binruan@chatlabs.com
8048
- * @Date: 2023-07-28 18:29:57
8154
+ * @Date: 2023-11-02 18:34:34
8049
8155
  * @LastEditors: binruan@chatlabs.com
8050
- * @LastEditTime: 2024-03-20 15:52:25
8051
- * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\CommodityDetail\material.tsx
8156
+ * @LastEditTime: 2024-04-02 10:33:15
8157
+ * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Modal\index.tsx
8052
8158
  *
8053
8159
  */
8054
- const CommodityDetail = createMaterial(CommodityDetailComponent, {
8055
- displayName: '商品详情',
8056
- icon: '',
8057
- category: 'popup',
8058
- type: 'CommodityDetail',
8059
- defaulSetting: {
8060
- props: {},
8061
- style: {}
8160
+ const closeIcon = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAjhJREFUWEfFlztOw0AQhmeWiJ4CCmpQ5DiRQsIJyAWg5A0lR0AIChDiCJS8ER0cADgBeRSxt4CCDgkaKiq8i+zYeWx2413HEWmiJJv9v535Z2aN8M8vFPT9z3zETD0aAUChUJjwvPFHAJhBhB3Hqd6OAsK2yyucwykAvP38eJX398Z3AJDLlVYR8ToU9Rhj25TWr9KEsKy5dULIGQCMtfZly45TvwsAstm56UwG6wA4FUFwzrdctxZBDcWSy5XWEPG8I84/GcMipdWPtgcsaz5PCHtKG0IuTiqUvjT9U/WYMG2IOPE+AP+LtCB0xKUAAyA2Xbd2o2OG0NQXvTnvhL17D7EPtH9TRCIWwkRcGYGIQgYBABuqPuHXOQBc6pw80lBGwBQiiXhsBHQhkoprA6iM6acjhDQKu5YJZW6XeOI3XJdpvfsdTu52VfXEekD8owQiXGIubpSCbhDbLu8DwKEAd+A41SOdPpE4BS0viFOtvV2iKWqUgn5x/tmS70xR01GuDSCKc86/OCcLgTyyZ0ScDGNhFAktAJV4NFJ9YyaFiAWIE+9uVkkgBgLoig8DMWAa9ro9ynkUdlW5maZDCmB6clmz0k1HH4Cs1Ezbq2p2yEpUuBOKTSZZex00RUWIrltxuuK6EOGDSbGIOPZicpMx6fny650377qNRgBgWeVFQuA+6UjVgREhGIMlSqsPUQqIbZdOOIdZQmCv2axRnU1N1+TzJYsxOEaEV8ep7frPZ7Gd0FTEdP0ft0/kMNdg0eoAAAAASUVORK5CYII=';
8161
+ const Modal = ({ visible, onClose, children, modalStyle, padding, popupAniData }) => {
8162
+ const { popupAni } = useEditor();
8163
+ const cssAni = popupAniData !== null && popupAniData !== void 0 ? popupAniData : popupAni;
8164
+ const [isShow, setIsShow] = useState(false);
8165
+ const modalEleRef = useRef(null);
8166
+ useEffect(() => {
8167
+ const parentNode = document.getElementById('sxp-render');
8168
+ const node = document.getElementById('pb-modal');
8169
+ if (node) {
8170
+ modalEleRef.current = node;
8171
+ }
8172
+ else {
8173
+ modalEleRef.current = document.createElement('div');
8174
+ modalEleRef.current.setAttribute('id', 'pb-modal');
8175
+ parentNode === null || parentNode === void 0 ? void 0 : parentNode.appendChild(modalEleRef.current);
8176
+ }
8177
+ }, []);
8178
+ useEffect(() => {
8179
+ if (visible) {
8180
+ setIsShow(true);
8181
+ }
8182
+ else {
8183
+ setTimeout(() => {
8184
+ setIsShow(false);
8185
+ }, cssAni === null || cssAni === void 0 ? void 0 : cssAni.duration);
8186
+ }
8187
+ }, [visible, cssAni]);
8188
+ if (!modalEleRef.current)
8189
+ return null;
8190
+ const handleClose = debounce(() => {
8191
+ onClose === null || onClose === void 0 ? void 0 : onClose();
8192
+ }, 300);
8193
+ 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 },
8194
+ 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) => {
8195
+ e.stopPropagation();
8196
+ e.preventDefault();
8197
+ } },
8198
+ React.createElement("div", { onClick: onClose, className: 'modal-icon-wrapper' },
8199
+ React.createElement("img", { src: closeIcon, alt: 'close', className: 'modal-icon' })),
8200
+ children)), modalEleRef.current);
8201
+ };
8202
+ var Modal$1 = memo(Modal);
8203
+
8204
+ /*
8205
+ * @Author: binruan@chatlabs.com
8206
+ * @Date: 2023-12-26 16:11:34
8207
+ * @LastEditors: binruan@chatlabs.com
8208
+ * @LastEditTime: 2024-04-02 18:52:59
8209
+ * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\ExpandableText.tsx
8210
+ *
8211
+ */
8212
+ const limitTextLastWholeWord = (originalText = '', limit) => {
8213
+ // 匹配到中文
8214
+ const chineseRegex = /[\u4e00-\u9fa5]+/;
8215
+ if (chineseRegex.test(originalText)) {
8216
+ return originalText.slice(0, 54);
8217
+ }
8218
+ const words = originalText.split(' ');
8219
+ const newWords = [];
8220
+ for (let i = 0; i < words.length; i++) {
8221
+ newWords.push(words[i]);
8222
+ const tempText = newWords.join(' ');
8223
+ if (tempText.length >= limit)
8224
+ break;
8225
+ }
8226
+ // const _words = newWords.length === words.length ? newWords : newWords.slice(0, newWords.length - 1);
8227
+ const _words = newWords.length > 1 && newWords.length < words.length ? newWords.slice(0, newWords.length - 1) : newWords;
8228
+ return _words.join(' ') + ' ';
8229
+ };
8230
+ const ExpandableText = ({ text, maxStr = 108, style, className, onClick, foldText, unfoldText, isPost }) => {
8231
+ const [isShowMore, setIsShowMore] = useState(true);
8232
+ const [isShow, setIsShow] = useState(false);
8233
+ const lineClamp = Number((style === null || style === void 0 ? void 0 : style.lineClamp) || 2);
8234
+ const multiRow = useRef(null);
8235
+ const handleClick = useCallback(() => {
8236
+ setIsShowMore(!isShowMore);
8237
+ }, [isShowMore]);
8238
+ useMemo(() => {
8239
+ return !isShowMore && text.length > maxStr ? limitTextLastWholeWord(text, maxStr) + '...' : text;
8240
+ }, [text, maxStr, isShowMore]);
8241
+ useEffect(() => {
8242
+ if (multiRow.current && isPost) {
8243
+ setIsShowMore(true);
8244
+ setTimeout(() => {
8245
+ var _a;
8246
+ setIsShow(false);
8247
+ try {
8248
+ const cs = (_a = window === null || window === void 0 ? void 0 : window.getComputedStyle) === null || _a === void 0 ? void 0 : _a.call(window, multiRow.current);
8249
+ const height = parseFloat(cs === null || cs === void 0 ? void 0 : cs.height);
8250
+ const lh = parseFloat(cs === null || cs === void 0 ? void 0 : cs.lineHeight);
8251
+ const fs = parseFloat(cs === null || cs === void 0 ? void 0 : cs.fontSize) + 4;
8252
+ const lineHeight = isNaN(lh) ? fs : lh;
8253
+ if (text && height > lineHeight * lineClamp) {
8254
+ setIsShowMore(false);
8255
+ setIsShow(true);
8256
+ }
8257
+ }
8258
+ catch (_b) { }
8259
+ }, 100);
8260
+ }
8261
+ }, [multiRow, text, lineClamp, style, isPost]);
8262
+ return (React.createElement("div", { className: className, style: Object.assign({}, style), hidden: !text || text === '' },
8263
+ React.createElement("div", { ref: multiRow, style: {
8264
+ overflow: 'hidden',
8265
+ WebkitLineClamp: !isShowMore ? lineClamp : '',
8266
+ textOverflow: 'ellipsis',
8267
+ display: '-webkit-box',
8268
+ WebkitBoxOrient: 'vertical',
8269
+ wordBreak: 'break-word'
8270
+ }, dangerouslySetInnerHTML: { __html: text === null || text === void 0 ? void 0 : text.replace(/\n/g, '</br>') } }),
8271
+ isShow && text && (React.createElement("span", { style: { textDecoration: 'underline', cursor: 'pointer' }, onClick: onClick !== null && onClick !== void 0 ? onClick : handleClick }, isShowMore ? unfoldText || 'show less' : foldText || 'show more'))));
8272
+ };
8273
+ var ExpandableText$1 = memo(ExpandableText);
8274
+
8275
+ const CommodityDetail$1 = (_a) => {
8276
+ var _b, _c, _d, _e, _f, _g, _h, _j;
8277
+ var { content, style, bgImg, onClick, schema, isDefault, bottom_image, tipText, isPost, viewTime, rec, swiper, commodityStyles, buttonStyle } = _a, props = __rest(_a, ["content", "style", "bgImg", "onClick", "schema", "isDefault", "bottom_image", "tipText", "isPost", "viewTime", "rec", "swiper", "commodityStyles", "buttonStyle"]);
8278
+ const { sxpParameter } = useSxpDataSource();
8279
+ const { popupDetailData, bffEventReport, isPreview, waterFallData } = useSxpDataSource();
8280
+ const { jumpToWeb, productView } = useEventReport();
8281
+ const curTimeRef = useRef(null);
8282
+ const [showModal, setShowModal] = useState(false);
8283
+ const data = isPost ? rec : popupDetailData;
8284
+ const product = isPost ? data === null || data === void 0 ? void 0 : data.product : (_b = data === null || data === void 0 ? void 0 : data.video) === null || _b === void 0 ? void 0 : _b.bindProduct;
8285
+ const cta = isPost ? (_c = data === null || data === void 0 ? void 0 : data.product) === null || _c === void 0 ? void 0 : _c.bindCta : (_e = (_d = data === null || data === void 0 ? void 0 : data.video) === null || _d === void 0 ? void 0 : _d.bindProduct) === null || _e === void 0 ? void 0 : _e.bindCta;
8286
+ const handleLink = () => {
8287
+ if (product === null || product === void 0 ? void 0 : product.link) {
8288
+ jumpToWeb(popupDetailData, product, cta);
8289
+ if (!isPost) {
8290
+ productView(data, product, cta, viewTime || curTimeRef.current);
8291
+ }
8292
+ window.location.href = window.getJointUtmLink(product.link);
8293
+ }
8294
+ };
8295
+ useEffect(() => {
8296
+ const initTime = () => {
8297
+ curTimeRef.current = new Date();
8298
+ };
8299
+ initTime();
8300
+ window.addEventListener('pageshow', initTime);
8301
+ return () => {
8302
+ window.removeEventListener('pageshow', initTime);
8303
+ };
8304
+ }, []);
8305
+ const priceText = useMemo(() => {
8306
+ var _a, _b, _c, _d, _e;
8307
+ if ((product === null || product === void 0 ? void 0 : product.currency) && (product === null || product === void 0 ? void 0 : product.price)) {
8308
+ return `${(_c = (_b = (_a = product === null || product === void 0 ? void 0 : product.currency) === null || _a === void 0 ? void 0 : _a.split('-')[1]) === null || _b === void 0 ? void 0 : _b.toUpperCase()) !== null && _c !== void 0 ? _c : ''}${(_e = (_d = product === null || product === void 0 ? void 0 : product.price) === null || _d === void 0 ? void 0 : _d.toLocaleString('zh', {
8309
+ minimumFractionDigits: 0
8310
+ })) !== null && _e !== void 0 ? _e : ''}`;
8311
+ }
8312
+ else {
8313
+ return '$7,000';
8314
+ }
8315
+ }, [product === null || product === void 0 ? void 0 : product.price, product === null || product === void 0 ? void 0 : product.currency]);
8316
+ const width = isPreview ? 375 : window.innerWidth;
8317
+ const renderContent = ({ isPost }) => {
8318
+ var _a, _b, _c;
8319
+ return (React.createElement("div", { className: 'pb-commondity-content' },
8320
+ React.createElement("div", { className: 'pb-commondity-content-collection', style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.collection }, (_a = product === null || product === void 0 ? void 0 : product.collection) !== null && _a !== void 0 ? _a : 'Tiffany Lock'),
8321
+ React.createElement("div", { className: 'pb-commondity-content-title', style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.title }, (_b = product === null || product === void 0 ? void 0 : product.title) !== null && _b !== void 0 ? _b : 'Pendant in Yellow Gold with Diamonds, Medium'),
8322
+ React.createElement("div", { className: 'pb-commondity-content-price', style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price }, priceText),
8323
+ React.createElement(ExpandableText$1, { foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, onClick: () => setShowModal(true), isPost: isPost, text: (_c = product === null || product === void 0 ? void 0 : product.info) !== null && _c !== void 0 ? _c : `The design inspiration of Tiffany Lock series comes from the power of connection and inclusiveness, and the
8324
+ bold and avant-garde visual design interprets the emotional bond connecting my heart. The Tiffany Lock
8325
+ collection is unisex and is inspired by the padlock pattern found in the Tiffany Antique Collection. This
8326
+ necklace features a stylish and eye-catching oval clasp chain decorated with a lock pattern. Crafted from
8327
+ 18-karat gold, this necklace is embellished with hand-set diamonds.`, maxStr: 79, className: 'pb-commondity-content-info', style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.info })));
8328
+ };
8329
+ const renderBtn = () => {
8330
+ var _a;
8331
+ return (React.createElement(React.Fragment, null, (isDefault || (product === null || product === void 0 ? void 0 : product.link)) && (React.createElement("button", { onClick: handleLink, className: 'pb-commondity-btn', style: buttonStyle }, (_a = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _a !== void 0 ? _a : 'Purchase on Website'))));
8332
+ };
8333
+ return (React.createElement("div", { className: 'pb-commondity' },
8334
+ React.createElement("div", Object.assign({ className: css(Object.assign({}, style)) }, props),
8335
+ product && ((_f = product === null || product === void 0 ? void 0 : product.homePage) === null || _f === void 0 ? void 0 : _f.length) > 0 && (React.createElement(Swiper, { height: width, modules: [Pagination, Autoplay], pagination: {
8336
+ clickable: true,
8337
+ bulletActiveClass: 'swipe-item-active-bullet',
8338
+ clickableClass: (swiper === null || swiper === void 0 ? void 0 : swiper.dotsAlign) === 'left'
8339
+ ? 'commondityDetail-swiper-clickable-left'
8340
+ : 'commondityDetail-swiper-clickable-center'
8341
+ }, loop: true, autoplay: {
8342
+ delay: (swiper === null || swiper === void 0 ? void 0 : swiper.delay) * 1000
8343
+ } }, (_g = product === null || product === void 0 ? void 0 : product.homePage) === null || _g === void 0 ? void 0 : _g.map((src) => {
8344
+ return (React.createElement(SwiperSlide, { key: src },
8345
+ React.createElement("div", { style: {
8346
+ overflow: 'hidden',
8347
+ width,
8348
+ height: width
8349
+ } },
8350
+ React.createElement("img", { src: src, style: { height: '100%', width: '100%', objectFit: 'cover' } }))));
8351
+ }))),
8352
+ !((_h = product === null || product === void 0 ? void 0 : product.homePage) === null || _h === void 0 ? void 0 : _h.length) && (React.createElement("div", { className: css({
8353
+ position: 'relative',
8354
+ height: 0,
8355
+ width: '100%',
8356
+ paddingBottom: '100%',
8357
+ overflow: 'hidden'
8358
+ }) },
8359
+ React.createElement("img", { className: css({
8360
+ position: 'absolute',
8361
+ left: 0,
8362
+ top: 0,
8363
+ objectFit: 'cover',
8364
+ width: '100%'
8365
+ }), src: (_j = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _j !== void 0 ? _j : bottom_image, alt: '' }))),
8366
+ renderContent({ isPost })),
8367
+ renderBtn(),
8368
+ React.createElement(Modal$1, { visible: showModal, onClose: () => setShowModal(false) },
8369
+ renderContent({ isPost: false }),
8370
+ renderBtn())));
8371
+ };
8372
+ var CommodityDetailComponent = memo(CommodityDetail$1);
8373
+
8374
+ /*
8375
+ * @Author: binruan@chatlabs.com
8376
+ * @Date: 2023-07-28 18:29:57
8377
+ * @LastEditors: binruan@chatlabs.com
8378
+ * @LastEditTime: 2024-04-02 18:13:10
8379
+ * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\CommodityDetail\material.tsx
8380
+ *
8381
+ */
8382
+ const CommodityDetail = createMaterial(CommodityDetailComponent, {
8383
+ displayName: '商品详情',
8384
+ icon: '',
8385
+ category: 'popup',
8386
+ type: 'CommodityDetail',
8387
+ related: {
8388
+ settingRender: settingRender$3
8389
+ },
8390
+ defaulSetting: {
8391
+ props: {
8392
+ swiper: {
8393
+ dotsAlign: 'center',
8394
+ delay: 3
8395
+ },
8396
+ commodityStyles: {
8397
+ price: {
8398
+ color: '#000',
8399
+ fontSize: 18
8400
+ },
8401
+ title: {
8402
+ color: '#000',
8403
+ fontSize: 23
8404
+ },
8405
+ collection: {
8406
+ fontSize: 12,
8407
+ color: '#000'
8408
+ },
8409
+ info: {
8410
+ color: 'gray',
8411
+ fontSize: 12
8412
+ }
8413
+ },
8414
+ buttonStyle: {
8415
+ backgroundColor: '#000',
8416
+ fontSize: 12,
8417
+ height: 45,
8418
+ fontWeight: 'bold',
8419
+ textAlign: 'center',
8420
+ color: 'rgba(255, 255, 255, 0.9)'
8421
+ }
8422
+ },
8423
+ style: {}
8062
8424
  },
8063
8425
  w: 100,
8064
8426
  h: 40,
@@ -8104,7 +8466,7 @@ var settingRender$2 = [
8104
8466
  }
8105
8467
  ];
8106
8468
 
8107
- var img$3 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAAAXNSR0IArs4c6QAABHBJREFUeF7lmzuoFkcYhp/TihdIl0JBESubSCCCih4NXgJeUphCjyKmEEVtLRSjooWtShILRRJtgpCoeLzgLUZBQbTwAoooqLWoCWIXeZdd3bP++8/st7OX33+ac2Dn8r3Pvzv7zcy7A9RT5gDjgQnx3/T/iuA58Cz+m/7/StXhDVQ0gATOBhYCi4GxxnHeAKeAs8DfMSBjV52bhQTwBbApFj4YNMqPnV0GrgL7gJchxggFQMI3A5NDBOXRx+MYwn6Pul2rlAWwMv7VvykbiLH9TUAQjhnbYwUwA9gKLLIOHLjdGWAPcL1ovxYAG4G9wKiig1Vc/y2wBThQZJyiAA4Ba4sM0EDdw8CPvuMWAXAb+Mq344br3QGm+cTgC+B/n85aWMepz1kBOBknMy3U5wxJSdSSbrVcAPR+V9LRy0X5SW6+0A3AMuDPXlaeiv174K9OWvIAfA1cAMZ9JgBeA98Ct7J68gAMtyjJCfUbKFn6zgeA0tujoUZtWT9D2bS50x1wA2gqt6+al9YO09ODZAF8DrO+C+KIt0IagNbzIlTXktYVaKfr9+PNkSklchMtpXWHR/sJaQA7gJ8sUdXURuJ/AB7E4/0BLDeOvROQ3hEA/gFmGjusullWfDKeFcI1YFYawETgSdUqjP3niS8LYRLwNHkE1gM/GwOssplLfBkIG4BfEgBKE5dWqcTQt694da1td22YFikngGUJgH+B0UVaV1y3iHiFYpnA/wPGCICFXpX66xCfxD8oAKuA3wIpegToHW0tdYpXjKsFQLu7u60Rx+3exSCPG29HdVO3eI25TQB+BdaVAKCMSneRVpBJKfpMNiFesR4UgNOdlomeQF4AWj3quCpbfCE0JV7xDgvAXWCqp+B0tYfACkC7xXnFBaFJ8Yr5ngC8Mu78KHnS4+MqeRCaFq+4X5cB8MnmQoE7oQ3iPwCwPgJWEdZ2rjvNcj16BMpMghYxWsElS1pX0K45xNXedT2aBMu+BotCcAVlfZX69puuF70GQyRCoSFU/csnEKJEKFQqHApCXeIFIUqFQy6GykKoU7wARIuh6HVQwsmVffasEOoWLwfauASADkKU0oYqRSHULV465SsaSgAoqfk9lPq4H18ITYhXiJr7jiYAZGyUUzN0cUFoSrx0yrX6PH0ucEmTQmgCXdb5TYrX/uFcaa3rYCR7JzQpXro1vg5HRgCo+mhMEOT3/RKQYaGpkns0poD6+nA0+UX6+nhcEPreICEIfW2REQCZoc+30A9snTjlI57fyUzdzSYnU3RpP7414sDtNLl3NFG7jJK9YI52sepqnnYBUOe9ZJLOwnCapn0AqNO+NksnVHvJNO00SSeifO+ApH4vZIpdzdHZZ6QoALWXifqI8TTJNWGVua5drTV5pui8ji0A1JfM1Lta5CeWD3h7JzO0i6gVQNJv3342lwXbtx9OpkFoP0ET0LwKDZcyOF5s46ez2TtCxkt9OL0gBmJ1oMnJJcHnYo/wU9czXfR62TnAd7zWfj7/HrAAAKDnDZ8VAAAAAElFTkSuQmCC";
8469
+ var img$2 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAAAXNSR0IArs4c6QAABHBJREFUeF7lmzuoFkcYhp/TihdIl0JBESubSCCCih4NXgJeUphCjyKmEEVtLRSjooWtShILRRJtgpCoeLzgLUZBQbTwAoooqLWoCWIXeZdd3bP++8/st7OX33+ac2Dn8r3Pvzv7zcy7A9RT5gDjgQnx3/T/iuA58Cz+m/7/StXhDVQ0gATOBhYCi4GxxnHeAKeAs8DfMSBjV52bhQTwBbApFj4YNMqPnV0GrgL7gJchxggFQMI3A5NDBOXRx+MYwn6Pul2rlAWwMv7VvykbiLH9TUAQjhnbYwUwA9gKLLIOHLjdGWAPcL1ovxYAG4G9wKiig1Vc/y2wBThQZJyiAA4Ba4sM0EDdw8CPvuMWAXAb+Mq344br3QGm+cTgC+B/n85aWMepz1kBOBknMy3U5wxJSdSSbrVcAPR+V9LRy0X5SW6+0A3AMuDPXlaeiv174K9OWvIAfA1cAMZ9JgBeA98Ct7J68gAMtyjJCfUbKFn6zgeA0tujoUZtWT9D2bS50x1wA2gqt6+al9YO09ODZAF8DrO+C+KIt0IagNbzIlTXktYVaKfr9+PNkSklchMtpXWHR/sJaQA7gJ8sUdXURuJ/AB7E4/0BLDeOvROQ3hEA/gFmGjusullWfDKeFcI1YFYawETgSdUqjP3niS8LYRLwNHkE1gM/GwOssplLfBkIG4BfEgBKE5dWqcTQt694da1td22YFikngGUJgH+B0UVaV1y3iHiFYpnA/wPGCICFXpX66xCfxD8oAKuA3wIpegToHW0tdYpXjKsFQLu7u60Rx+3exSCPG29HdVO3eI25TQB+BdaVAKCMSneRVpBJKfpMNiFesR4UgNOdlomeQF4AWj3quCpbfCE0JV7xDgvAXWCqp+B0tYfACkC7xXnFBaFJ8Yr5ngC8Mu78KHnS4+MqeRCaFq+4X5cB8MnmQoE7oQ3iPwCwPgJWEdZ2rjvNcj16BMpMghYxWsElS1pX0K45xNXedT2aBMu+BotCcAVlfZX69puuF70GQyRCoSFU/csnEKJEKFQqHApCXeIFIUqFQy6GykKoU7wARIuh6HVQwsmVffasEOoWLwfauASADkKU0oYqRSHULV465SsaSgAoqfk9lPq4H18ITYhXiJr7jiYAZGyUUzN0cUFoSrx0yrX6PH0ucEmTQmgCXdb5TYrX/uFcaa3rYCR7JzQpXro1vg5HRgCo+mhMEOT3/RKQYaGpkns0poD6+nA0+UX6+nhcEPreICEIfW2REQCZoc+30A9snTjlI57fyUzdzSYnU3RpP7414sDtNLl3NFG7jJK9YI52sepqnnYBUOe9ZJLOwnCapn0AqNO+NksnVHvJNO00SSeifO+ApH4vZIpdzdHZZ6QoALWXifqI8TTJNWGVua5drTV5pui8ji0A1JfM1Lta5CeWD3h7JzO0i6gVQNJv3342lwXbtx9OpkFoP0ET0LwKDZcyOF5s46ez2TtCxkt9OL0gBmJ1oMnJJcHnYo/wU9czXfR62TnAd7zWfj7/HrAAAKDnDZ8VAAAAAElFTkSuQmCC";
8108
8470
 
8109
8471
  /*
8110
8472
  * @Author: binruan@chatlabs.com
@@ -8148,7 +8510,7 @@ const Prompt$1 = (_a) => {
8148
8510
  };
8149
8511
  return (React.createElement("div", Object.assign({ className: `pb-prompt ${css(Object.assign({}, style))}` }, props),
8150
8512
  React.createElement("div", { className: 'pb-prompt-icon' },
8151
- React.createElement("img", { width: '100%', src: iconSrc !== null && iconSrc !== void 0 ? iconSrc : img$3 })),
8513
+ React.createElement("img", { width: '100%', src: iconSrc !== null && iconSrc !== void 0 ? iconSrc : img$2 })),
8152
8514
  React.createElement("div", { className: 'pb-prompt-content' }, content),
8153
8515
  React.createElement("button", { className: 'pb-prompt-btn', onClick: handleOk }, btnText)));
8154
8516
  };
@@ -8166,7 +8528,7 @@ const Prompt = createMaterial(PromptComponent, {
8166
8528
  },
8167
8529
  defaulSetting: {
8168
8530
  props: {
8169
- icon: img$3,
8531
+ icon: img$2,
8170
8532
  content: 'You have successfully completed the appointment!',
8171
8533
  btnText: 'OK'
8172
8534
  },
@@ -8177,184 +8539,6 @@ const Prompt = createMaterial(PromptComponent, {
8177
8539
  sort: 3
8178
8540
  });
8179
8541
 
8180
- var img$2 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAAAXNSR0IArs4c6QAAAmhJREFUeF7t2dFKFFEcx/HvPkE3XvcA9hpedS2JhlioISKSEqESWkhUSISIiIomWiFCl973EvYM3XTnA7QHdmEb5sz8d+b8z+xh/guCwjj7/33md2bWY4eWvzotz48BWANaLmBLoOUFsJugLQFbAi0XsCXQ8gLYU8CWgC2BfIEHwBowCdwD34GDxLCeAzPAQ+AIuAL+ZjP4lsBj4DZz8A0wlQjCW2AnM6sDuZACfAWe5YS9BqZHHCEvvBv5Z6/R/43va8AicOIJ+gN4OqIIvvBu3E3go7QBY8Av4JEn6DdgdsQQisLfARPAHymAO268++XWvQ/hEpgbEYSy8E+A33mzln0OKENwNxV3c2nyVTm8G7oMQNKEc2C+IYFa4aUAEoQzYCEyQu3wwwBIEE6BF5EQgoQfFkCCcNy90y4pIwQLXwVAguA+di4rIQQNXxVAgnAIrARGCB6+DoAEwf3xtBoIQSV8XQAJwj7wsiaCWvgQABKEL8B6RQTV8KEAJAifu/sKr4ZEUA8fEkCCsAe8FiJECR8aQILwCdgoQYgWXgNAgvAB2PIgRA2vBSBBeA+8ySBED68JIEHYBbZ7CI2E1waQILzrAWQ3MPvlcDs53s0M4Q218DDJfkDd9ynbVPGdXz18jAb0ww2LECV8TADJcohW+8HKxVgCg+9X1oRoV74/VGyAoiZEDx97CRQ1oZHwTQIMNsF9r/qoK3qMNbEEsk1wP+f+06Lu81fy+00DSGZUPcYAVHkTOLk1IIGLpDqiNUCVN4GTWwMSuEiqI1oDVHkTOLk1IIGLpDqiNUCVN4GTWwMSuEiqI/4DSCuFQaIHE+8AAAAASUVORK5CYII=";
8181
-
8182
- const CommodityDetailDiro$1 = (_a) => {
8183
- var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
8184
- var { style, isDefault, rec, viewTime, isPost, bottom_image } = _a, props = __rest(_a, ["style", "isDefault", "rec", "viewTime", "isPost", "bottom_image"]);
8185
- const [spread, setSpread] = useState(true);
8186
- const { sxpParameter } = useSxpDataSource();
8187
- const { popupDetailData, bffEventReport, isPreview, swiperRef, waterFallData } = useSxpDataSource();
8188
- const { jumpToWeb, productView } = useEventReport();
8189
- const scrollRef = useRef(null);
8190
- const touchRef = useRef(null);
8191
- const touchMoveRef = useRef(null);
8192
- const [stopSlide, setStopSlide] = useState(false);
8193
- const [isBottom, setIsBottom] = useState(false);
8194
- const [isTop, setIsTop] = useState(true);
8195
- const curTimeRef = useRef(null);
8196
- const data = isPost ? rec : popupDetailData;
8197
- const product = isPost ? data === null || data === void 0 ? void 0 : data.product : (_b = data === null || data === void 0 ? void 0 : data.video) === null || _b === void 0 ? void 0 : _b.bindProduct;
8198
- const cta = isPost ? (_c = data === null || data === void 0 ? void 0 : data.product) === null || _c === void 0 ? void 0 : _c.bindCta : (_e = (_d = data === null || data === void 0 ? void 0 : data.video) === null || _d === void 0 ? void 0 : _d.bindProduct) === null || _e === void 0 ? void 0 : _e.bindCta;
8199
- const handleLink = () => {
8200
- if (product === null || product === void 0 ? void 0 : product.link) {
8201
- jumpToWeb(data, product, cta);
8202
- if (!isPost) {
8203
- productView(data, product, cta, viewTime || curTimeRef.current);
8204
- }
8205
- window.location.href = window.getJointUtmLink(product.link);
8206
- }
8207
- };
8208
- useEffect(() => {
8209
- const initTime = () => {
8210
- curTimeRef.current = new Date();
8211
- };
8212
- initTime();
8213
- window.addEventListener('pageshow', initTime);
8214
- return () => {
8215
- window.removeEventListener('pageshow', initTime);
8216
- };
8217
- }, []);
8218
- const priceText = useMemo(() => {
8219
- var _a, _b, _c, _d, _e;
8220
- if ((product === null || product === void 0 ? void 0 : product.currency) && (product === null || product === void 0 ? void 0 : product.price)) {
8221
- return `${(_c = (_b = (_a = product === null || product === void 0 ? void 0 : product.currency) === null || _a === void 0 ? void 0 : _a.split('-')[1]) === null || _b === void 0 ? void 0 : _b.toUpperCase()) !== null && _c !== void 0 ? _c : ''}${(_e = (_d = product === null || product === void 0 ? void 0 : product.price) === null || _d === void 0 ? void 0 : _d.toLocaleString('zh', {
8222
- minimumFractionDigits: 0
8223
- })) !== null && _e !== void 0 ? _e : ''}`;
8224
- }
8225
- else {
8226
- return '$7,000';
8227
- }
8228
- }, [product === null || product === void 0 ? void 0 : product.price, product === null || product === void 0 ? void 0 : product.currency]);
8229
- const width = isPreview ? 375 : window.innerWidth;
8230
- const handleClickCollapse = () => {
8231
- setSpread(!spread);
8232
- };
8233
- useEffect(() => {
8234
- var _a, _b;
8235
- console.log((_a = scrollRef === null || scrollRef === void 0 ? void 0 : scrollRef.current) === null || _a === void 0 ? void 0 : _a.scrollHeight, window.innerHeight);
8236
- if ((scrollRef === null || scrollRef === void 0 ? void 0 : scrollRef.current) && ((_b = scrollRef === null || scrollRef === void 0 ? void 0 : scrollRef.current) === null || _b === void 0 ? void 0 : _b.scrollHeight) > window.innerHeight) {
8237
- setStopSlide(true);
8238
- }
8239
- }, [scrollRef]);
8240
- useEffect(() => {
8241
- const handleScroll = () => {
8242
- if (scrollRef === null || scrollRef === void 0 ? void 0 : scrollRef.current) {
8243
- const { scrollTop, scrollHeight, clientHeight } = scrollRef.current;
8244
- const isBottom = scrollTop + clientHeight === scrollHeight;
8245
- if (isBottom) {
8246
- setIsBottom(true);
8247
- }
8248
- else {
8249
- setIsBottom(false);
8250
- }
8251
- if (scrollTop === 0) {
8252
- setIsTop(true);
8253
- }
8254
- else {
8255
- setIsTop(false);
8256
- }
8257
- }
8258
- };
8259
- if (scrollRef.current) {
8260
- scrollRef.current.addEventListener('scroll', handleScroll);
8261
- }
8262
- return () => {
8263
- if (scrollRef.current) {
8264
- scrollRef.current.removeEventListener('scroll', handleScroll);
8265
- }
8266
- };
8267
- }, [scrollRef]);
8268
- const handleTouchStart = (event) => {
8269
- event.stopPropagation();
8270
- touchRef.current = event.touches[0].clientY;
8271
- touchMoveRef.current = true;
8272
- };
8273
- const handleTouchMove = (event) => {
8274
- var _a, _b, _c, _d;
8275
- if (touchMoveRef.current) {
8276
- touchMoveRef.current = false;
8277
- const currentY = event.touches[0].clientY;
8278
- const diff = touchRef.current - currentY;
8279
- if (diff > 0 && (isBottom || !stopSlide)) {
8280
- (_b = (_a = swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) === null || _a === void 0 ? void 0 : _a.swiper) === null || _b === void 0 ? void 0 : _b.slideNext();
8281
- }
8282
- else if (diff < 0 && (isTop || !stopSlide)) {
8283
- (_d = (_c = swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) === null || _c === void 0 ? void 0 : _c.swiper) === null || _d === void 0 ? void 0 : _d.slidePrev();
8284
- }
8285
- }
8286
- };
8287
- return (React.createElement("div", { className: 'pb-commondityDiro' },
8288
- React.createElement("div", Object.assign({ ref: scrollRef, className: css(Object.assign({}, style)) }, props, { onTouchStart: handleTouchStart, onTouchMove: (e) => {
8289
- e.stopPropagation();
8290
- handleTouchMove(e);
8291
- } }),
8292
- product && ((_f = product === null || product === void 0 ? void 0 : product.homePage) === null || _f === void 0 ? void 0 : _f.length) > 0 && (React.createElement(Swiper, { height: width, modules: [Pagination, Autoplay], pagination: { clickable: true, bulletActiveClass: 'swipe-item-active-bullet' }, loop: true, autoplay: {
8293
- delay: 3000
8294
- } }, (_g = product === null || product === void 0 ? void 0 : product.homePage) === null || _g === void 0 ? void 0 : _g.map((src) => {
8295
- return (React.createElement(SwiperSlide, { key: src },
8296
- React.createElement("div", { style: {
8297
- overflow: 'hidden',
8298
- width,
8299
- height: width
8300
- } },
8301
- React.createElement("img", { src: src, style: { height: '100%', width: '100%', objectFit: 'cover' } }))));
8302
- }))),
8303
- !((_h = product === null || product === void 0 ? void 0 : product.homePage) === null || _h === void 0 ? void 0 : _h.length) && (React.createElement("div", { className: css({
8304
- position: 'relative',
8305
- height: 0,
8306
- width: '100%',
8307
- paddingBottom: '100%',
8308
- overflow: 'hidden'
8309
- }) },
8310
- React.createElement("img", { className: css({
8311
- position: 'absolute',
8312
- left: 0,
8313
- top: 0,
8314
- objectFit: 'cover',
8315
- width: '100%'
8316
- }), src: (_j = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _j !== void 0 ? _j : bottom_image, alt: '' }))),
8317
- React.createElement("div", { className: 'pb-commondityDiro-content' },
8318
- React.createElement("div", { className: 'pb-commondityDiro-content-title' }, (_k = product === null || product === void 0 ? void 0 : product.title) !== null && _k !== void 0 ? _k : 'MEDIUM LADY D-LITE BAG'),
8319
- React.createElement("div", { className: 'pb-commondityDiro-content-collection', hidden: !!product && (!(product === null || product === void 0 ? void 0 : product.collection) || (product === null || product === void 0 ? void 0 : product.collection) === '') }, (product === null || product === void 0 ? void 0 : product.collection) || 'Gold-Tone and White Butterfly Zodiac Embroidery'),
8320
- React.createElement("div", { className: 'pb-commondityDiro-content-scrollRef', hidden: !!product && !(product === null || product === void 0 ? void 0 : product.itemId) }, (product === null || product === void 0 ? void 0 : product.itemId) ? `Reference: ${product === null || product === void 0 ? void 0 : product.itemId}` : 'Reference: M0565OESU_M01E'),
8321
- React.createElement("div", { className: 'pb-commondityDiro-content-line' }),
8322
- React.createElement("div", { className: 'pb-commondityDiro-content-price' }, priceText)),
8323
- React.createElement("div", { className: 'pb-commondityDiro-desc', hidden: !!product && (!(product === null || product === void 0 ? void 0 : product.info) || (product === null || product === void 0 ? void 0 : product.info) === '') },
8324
- React.createElement("div", { className: 'pb-commondityDiro-desc-collapse', onClick: handleClickCollapse },
8325
- React.createElement("div", { className: 'pb-commondityDiro-desc-collapse-title' }, "DESCRIPTION"),
8326
- React.createElement("img", { className: `pb-commondityDiro-desc-collapse-icon ${spread ? 'pb-commondityDiro-desc-collapse-iconActive' : ''}`, src: img$2, alt: '' })),
8327
- React.createElement("div", { className: 'pb-commondityDiro-desc-info', hidden: !spread }, (product === null || product === void 0 ? void 0 : product.info) ||
8328
- 'The Lady D-Lite bag combines classic elegance with House modernity. The style is fully embroidered with a gold-tone and white Butterfly Zodiac motif by Pietro Ruffo, showcasing a constellation enhanced by astrological signs and adorned with butterflies. A Christian Dior Paris signature adorns the front, while D.I.O.R. charms in pale gold-finish metal further enhance and highlight the silhouette. Featuring a wide, removable embroidered shoulder strap, the medium Lady D-Lite bag can be carried by hand or worn crossbody.')),
8329
- (!product || (product === null || product === void 0 ? void 0 : product.link)) && (React.createElement(React.Fragment, null,
8330
- React.createElement("div", { className: 'pb-commondityDiro-h90' }),
8331
- React.createElement("div", { className: 'pb-commondityDiro-bottom' },
8332
- React.createElement("button", { onClick: handleLink, className: 'pb-commondityDiro-bottom-btn' }, (_l = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _l !== void 0 ? _l : 'SHOP NOW')))))));
8333
- };
8334
- var CommodityDetailDiroComponent = memo(CommodityDetailDiro$1);
8335
-
8336
- /*
8337
- * @Author: binruan@chatlabs.com
8338
- * @Date: 2023-07-28 18:29:57
8339
- * @LastEditors: binruan@chatlabs.com
8340
- * @LastEditTime: 2024-01-05 11:37:37
8341
- * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\CommodityDetailDiro\material.tsx
8342
- *
8343
- */
8344
- const CommodityDetailDiro = createMaterial(CommodityDetailDiroComponent, {
8345
- displayName: '商品详情',
8346
- icon: '',
8347
- category: 'popup',
8348
- type: 'CommodityDetailDiro',
8349
- defaulSetting: {
8350
- props: {},
8351
- style: {}
8352
- },
8353
- w: 100,
8354
- h: 40,
8355
- sort: 1
8356
- });
8357
-
8358
8542
  /*
8359
8543
  * @Author: binruan@chatlabs.com
8360
8544
  * @Date: 2024-03-26 16:50:25
@@ -8498,6 +8682,10 @@ var settingRender$1 = [
8498
8682
  }
8499
8683
  ]
8500
8684
  },
8685
+ {
8686
+ type: 'TextMargin',
8687
+ name: ['props', 'buttonStyle']
8688
+ },
8501
8689
  {
8502
8690
  type: 'Group',
8503
8691
  label: '字体',
@@ -8526,142 +8714,11 @@ var settingRender$1 = [
8526
8714
  {
8527
8715
  type: 'TextAlign',
8528
8716
  name: ['props', 'buttonStyle']
8529
- },
8530
- {
8531
- type: 'TextSpace',
8532
- name: ['props', 'buttonStyle']
8533
- },
8534
- {
8535
- type: 'TextMargin',
8536
- name: ['props', 'buttonStyle']
8537
8717
  }
8538
8718
  ]
8539
8719
  }
8540
8720
  ];
8541
8721
 
8542
- /*
8543
- * @Author: binruan@chatlabs.com
8544
- * @Date: 2023-11-02 18:34:34
8545
- * @LastEditors: binruan@chatlabs.com
8546
- * @LastEditTime: 2024-04-02 10:33:15
8547
- * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Modal\index.tsx
8548
- *
8549
- */
8550
- const closeIcon = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAjhJREFUWEfFlztOw0AQhmeWiJ4CCmpQ5DiRQsIJyAWg5A0lR0AIChDiCJS8ER0cADgBeRSxt4CCDgkaKiq8i+zYeWx2413HEWmiJJv9v535Z2aN8M8vFPT9z3zETD0aAUChUJjwvPFHAJhBhB3Hqd6OAsK2yyucwykAvP38eJX398Z3AJDLlVYR8ToU9Rhj25TWr9KEsKy5dULIGQCMtfZly45TvwsAstm56UwG6wA4FUFwzrdctxZBDcWSy5XWEPG8I84/GcMipdWPtgcsaz5PCHtKG0IuTiqUvjT9U/WYMG2IOPE+AP+LtCB0xKUAAyA2Xbd2o2OG0NQXvTnvhL17D7EPtH9TRCIWwkRcGYGIQgYBABuqPuHXOQBc6pw80lBGwBQiiXhsBHQhkoprA6iM6acjhDQKu5YJZW6XeOI3XJdpvfsdTu52VfXEekD8owQiXGIubpSCbhDbLu8DwKEAd+A41SOdPpE4BS0viFOtvV2iKWqUgn5x/tmS70xR01GuDSCKc86/OCcLgTyyZ0ScDGNhFAktAJV4NFJ9YyaFiAWIE+9uVkkgBgLoig8DMWAa9ro9ynkUdlW5maZDCmB6clmz0k1HH4Cs1Ezbq2p2yEpUuBOKTSZZex00RUWIrltxuuK6EOGDSbGIOPZicpMx6fny650377qNRgBgWeVFQuA+6UjVgREhGIMlSqsPUQqIbZdOOIdZQmCv2axRnU1N1+TzJYsxOEaEV8ep7frPZ7Gd0FTEdP0ft0/kMNdg0eoAAAAASUVORK5CYII=';
8551
- const Modal = ({ visible, onClose, children, modalStyle, padding, popupAniData }) => {
8552
- const { popupAni } = useEditor();
8553
- const cssAni = popupAniData !== null && popupAniData !== void 0 ? popupAniData : popupAni;
8554
- const [isShow, setIsShow] = useState(false);
8555
- const modalEleRef = useRef(null);
8556
- useEffect(() => {
8557
- const parentNode = document.getElementById('sxp-render');
8558
- const node = document.getElementById('pb-modal');
8559
- if (node) {
8560
- modalEleRef.current = node;
8561
- }
8562
- else {
8563
- modalEleRef.current = document.createElement('div');
8564
- modalEleRef.current.setAttribute('id', 'pb-modal');
8565
- parentNode === null || parentNode === void 0 ? void 0 : parentNode.appendChild(modalEleRef.current);
8566
- }
8567
- }, []);
8568
- useEffect(() => {
8569
- if (visible) {
8570
- setIsShow(true);
8571
- }
8572
- else {
8573
- setTimeout(() => {
8574
- setIsShow(false);
8575
- }, cssAni === null || cssAni === void 0 ? void 0 : cssAni.duration);
8576
- }
8577
- }, [visible, cssAni]);
8578
- if (!modalEleRef.current)
8579
- return null;
8580
- const handleClose = debounce(() => {
8581
- onClose === null || onClose === void 0 ? void 0 : onClose();
8582
- }, 300);
8583
- 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 },
8584
- 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) => {
8585
- e.stopPropagation();
8586
- e.preventDefault();
8587
- } },
8588
- React.createElement("div", { onClick: onClose, className: 'modal-icon-wrapper' },
8589
- React.createElement("img", { src: closeIcon, alt: 'close', className: 'modal-icon' })),
8590
- children)), modalEleRef.current);
8591
- };
8592
- var Modal$1 = memo(Modal);
8593
-
8594
- /*
8595
- * @Author: binruan@chatlabs.com
8596
- * @Date: 2023-12-26 16:11:34
8597
- * @LastEditors: binruan@chatlabs.com
8598
- * @LastEditTime: 2024-04-02 10:57:30
8599
- * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\ExpandableText.tsx
8600
- *
8601
- */
8602
- const limitTextLastWholeWord = (originalText = '', limit) => {
8603
- // 匹配到中文
8604
- const chineseRegex = /[\u4e00-\u9fa5]+/;
8605
- if (chineseRegex.test(originalText)) {
8606
- return originalText.slice(0, 54);
8607
- }
8608
- const words = originalText.split(' ');
8609
- const newWords = [];
8610
- for (let i = 0; i < words.length; i++) {
8611
- newWords.push(words[i]);
8612
- const tempText = newWords.join(' ');
8613
- if (tempText.length >= limit)
8614
- break;
8615
- }
8616
- // const _words = newWords.length === words.length ? newWords : newWords.slice(0, newWords.length - 1);
8617
- const _words = newWords.length > 1 && newWords.length < words.length ? newWords.slice(0, newWords.length - 1) : newWords;
8618
- return _words.join(' ') + ' ';
8619
- };
8620
- const ExpandableText = ({ text, maxStr = 108, style, className, onClick, foldText, unfoldText, isPost }) => {
8621
- const [isShowMore, setIsShowMore] = useState(true);
8622
- const [isShow, setIsShow] = useState(false);
8623
- const lineClamp = Number((style === null || style === void 0 ? void 0 : style.lineClamp) || 2);
8624
- const multiRow = useRef(null);
8625
- const handleClick = useCallback(() => {
8626
- setIsShowMore(!isShowMore);
8627
- }, [isShowMore]);
8628
- useMemo(() => {
8629
- return !isShowMore && text.length > maxStr ? limitTextLastWholeWord(text, maxStr) + '...' : text;
8630
- }, [text, maxStr, isShowMore]);
8631
- useEffect(() => {
8632
- if (multiRow.current && isPost) {
8633
- setIsShowMore(true);
8634
- setTimeout(() => {
8635
- var _a;
8636
- setIsShow(false);
8637
- try {
8638
- const cs = (_a = window === null || window === void 0 ? void 0 : window.getComputedStyle) === null || _a === void 0 ? void 0 : _a.call(window, multiRow.current);
8639
- const height = parseFloat(cs === null || cs === void 0 ? void 0 : cs.height);
8640
- const lh = parseFloat(cs === null || cs === void 0 ? void 0 : cs.lineHeight);
8641
- const fs = parseFloat(cs === null || cs === void 0 ? void 0 : cs.fontSize) + 4;
8642
- const lineHeight = isNaN(lh) ? fs : lh;
8643
- if (text && height > lineHeight * lineClamp) {
8644
- setIsShowMore(false);
8645
- setIsShow(true);
8646
- }
8647
- }
8648
- catch (_b) { }
8649
- }, 100);
8650
- }
8651
- }, [multiRow, text, lineClamp, style, isPost]);
8652
- return (React.createElement("div", { className: className, style: Object.assign({}, style) },
8653
- React.createElement("div", { ref: multiRow, style: {
8654
- overflow: 'hidden',
8655
- WebkitLineClamp: !isShowMore ? lineClamp : '',
8656
- textOverflow: 'ellipsis',
8657
- display: '-webkit-box',
8658
- WebkitBoxOrient: 'vertical',
8659
- wordBreak: 'break-word'
8660
- }, dangerouslySetInnerHTML: { __html: text ? text === null || text === void 0 ? void 0 : text.replace(/\n/g, '</br>') : React.createElement(React.Fragment, null) } }),
8661
- isShow && text && (React.createElement("span", { style: { textDecoration: 'underline', cursor: 'pointer' }, onClick: onClick !== null && onClick !== void 0 ? onClick : handleClick }, isShowMore ? unfoldText || 'show less' : foldText || 'show more'))));
8662
- };
8663
- var ExpandableText$1 = memo(ExpandableText);
8664
-
8665
8722
  const CommodityDetailDiroNew$1 = (_a) => {
8666
8723
  var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
8667
8724
  var { style, isDefault, rec, viewTime, isPost, bottom_image, tipText, swiper, commodityStyles, buttonStyle } = _a, props = __rest(_a, ["style", "isDefault", "rec", "viewTime", "isPost", "bottom_image", "tipText", "swiper", "commodityStyles", "buttonStyle"]);
@@ -8711,7 +8768,7 @@ const CommodityDetailDiroNew$1 = (_a) => {
8711
8768
  }
8712
8769
  }, [product === null || product === void 0 ? void 0 : product.price, product === null || product === void 0 ? void 0 : product.currency]);
8713
8770
  const width = isPreview ? 375 : window.innerWidth;
8714
- const productInfoText = () => {
8771
+ const productInfoText = ({ isPost }) => {
8715
8772
  return (React.createElement("div", { hidden: !!product && (!(product === null || product === void 0 ? void 0 : product.info) || (product === null || product === void 0 ? void 0 : product.info) === '') },
8716
8773
  React.createElement(ExpandableText$1, { isPost: isPost, onClick: () => setShowModal(true), className: 'pb-commondityDiroNew-info', style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.info, foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, text: (product === null || product === void 0 ? void 0 : product.info) ||
8717
8774
  `Unveiled at the Spring-Summer 2023 fashion show, the Dior Toujours bag is distinguished by a casual and practical design. Crafted in black calfskin with Macrocannage topstitching, it showcases a spacious interior compartment with a matching pouch to organize essentials. Its leather strap closure keeps items secure while the D of the CD Lock closure twists to adjust the sides and enhance the bag's silhouette. The leather handles can be adjusted using the small notches in order to be able to carry the large bag by hand or wear it over the shoulder. CD Lock and strap closures D.I.O.R. charms Removable interior pouch Adjustable leather handles Dust bag included
@@ -8758,8 +8815,8 @@ Made in Italy` })));
8758
8815
  React.createElement("div", { className: 'pb-commondityDiroNew-content-top-price', hidden: !!product && !(product === null || product === void 0 ? void 0 : product.taxInfo), style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.taxInfo }, (_l = product === null || product === void 0 ? void 0 : product.taxInfo) !== null && _l !== void 0 ? _l : '税费'))),
8759
8816
  React.createElement("div", { className: 'pb-commondityDiroNew-content-collection', hidden: !!product && (!(product === null || product === void 0 ? void 0 : product.collection) || (product === null || product === void 0 ? void 0 : product.collection) === ''), style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.collection }, (product === null || product === void 0 ? void 0 : product.collection) || 'Black Macrocannage Calfskin'),
8760
8817
  (!product || (product === null || product === void 0 ? void 0 : product.link)) && (React.createElement("button", { onClick: handleLink, className: 'pb-commondityDiroNew-btn', style: buttonStyle }, (_m = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _m !== void 0 ? _m : 'Shop now')),
8761
- productInfoText())),
8762
- React.createElement(Modal$1, { visible: showModal, onClose: () => setShowModal(false) }, productInfoText())));
8818
+ productInfoText({ isPost }))),
8819
+ React.createElement(Modal$1, { visible: showModal, onClose: () => setShowModal(false) }, productInfoText({ isPost: false }))));
8763
8820
  };
8764
8821
  var CommodityDetailDiroNewComponent = memo(CommodityDetailDiroNew$1);
8765
8822
 
@@ -8767,7 +8824,7 @@ var CommodityDetailDiroNewComponent = memo(CommodityDetailDiroNew$1);
8767
8824
  * @Author: binruan@chatlabs.com
8768
8825
  * @Date: 2024-03-20 10:27:31
8769
8826
  * @LastEditors: binruan@chatlabs.com
8770
- * @LastEditTime: 2024-03-28 16:05:12
8827
+ * @LastEditTime: 2024-04-02 15:12:53
8771
8828
  * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\CommodityDetailDiroNew\material.tsx
8772
8829
  *
8773
8830
  */
@@ -8809,6 +8866,17 @@ const CommodityDetailDiroNew = createMaterial(CommodityDetailDiroNewComponent, {
8809
8866
  fontSize: 13,
8810
8867
  textAlign: 'right'
8811
8868
  }
8869
+ },
8870
+ buttonStyle: {
8871
+ backgroundColor: '#000',
8872
+ fontSize: 12,
8873
+ height: 52,
8874
+ fontWeight: 'bold',
8875
+ textAlign: 'center',
8876
+ color: '#fff',
8877
+ borderRadius: 25,
8878
+ marginTop: 16,
8879
+ marginBottom: 16
8812
8880
  }
8813
8881
  },
8814
8882
  style: {}
@@ -9858,7 +9926,6 @@ var _materials_ = /*#__PURE__*/Object.freeze({
9858
9926
  AppointForm: AppointForm,
9859
9927
  Commodity: Commodity,
9860
9928
  CommodityDetail: CommodityDetail,
9861
- CommodityDetailDiro: CommodityDetailDiro,
9862
9929
  CommodityDetailDiroNew: CommodityDetailDiroNew,
9863
9930
  CommodityDiro: CommodityDiro,
9864
9931
  CommodityDiroNew: CommodityDiroNew,
@@ -10924,9 +10991,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
10924
10991
  return (_d = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) === null || _d === void 0 ? void 0 : _d.map((value, index) => {
10925
10992
  var _a, _b, _c, _d, _e, _f;
10926
10993
  const Component = withBindDataSource(resolver[(_a = value === null || value === void 0 ? void 0 : value.item) === null || _a === void 0 ? void 0 : _a.type]);
10927
- return (React.createElement(Component, Object.assign({ key: index, textStyle: (_b = value === null || value === void 0 ? void 0 : value.item) === null || _b === void 0 ? void 0 : _b.textStyle, bindDatas: (_d = (_c = value === null || value === void 0 ? void 0 : value.item) === null || _c === void 0 ? void 0 : _c.bindDatas) !== null && _d !== void 0 ? _d : [] }, (_e = value === null || value === void 0 ? void 0 : value.item) === null || _e === void 0 ? void 0 : _e.props, { event: ((_f = value === null || value === void 0 ? void 0 : value.item) === null || _f === void 0 ? void 0 : _f.event) || {}, schema: schema, id: value === null || value === void 0 ? void 0 : value.id, viewTime: viewTime.current, rec: rec, isPost: true, tipText: tipText, style: { height: '100%', overflow: 'auto' },
10928
- // ProductInfo
10929
- data: rec, height: height, width: containerWidth })));
10994
+ return (React.createElement(Component, Object.assign({ key: index, textStyle: (_b = value === null || value === void 0 ? void 0 : value.item) === null || _b === void 0 ? void 0 : _b.textStyle, bindDatas: (_d = (_c = value === null || value === void 0 ? void 0 : value.item) === null || _c === void 0 ? void 0 : _c.bindDatas) !== null && _d !== void 0 ? _d : [] }, (_e = value === null || value === void 0 ? void 0 : value.item) === null || _e === void 0 ? void 0 : _e.props, { event: ((_f = value === null || value === void 0 ? void 0 : value.item) === null || _f === void 0 ? void 0 : _f.event) || {}, schema: schema, id: value === null || value === void 0 ? void 0 : value.id, viewTime: viewTime.current, rec: rec, isPost: true, tipText: tipText, style: { height: '100%', overflow: 'auto' } })));
10930
10995
  });
10931
10996
  }
10932
10997
  return null;