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.cjs CHANGED
@@ -890,7 +890,7 @@ var interactionRender$8 = [
890
890
  * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\AppointForm\settingRender.tsx
891
891
  *
892
892
  */
893
- var settingRender$3 = [
893
+ var settingRender$4 = [
894
894
  {
895
895
  type: 'Text',
896
896
  label: '组件名称',
@@ -1079,7 +1079,7 @@ const AppointForm = createMaterial(AppointFormComponent, {
1079
1079
  category: 'popup',
1080
1080
  type: 'AppointForm',
1081
1081
  related: {
1082
- settingRender: settingRender$3,
1082
+ settingRender: settingRender$4,
1083
1083
  bindableProps: [],
1084
1084
  interactionRender: interactionRender$8
1085
1085
  },
@@ -1105,6 +1105,190 @@ const AppointForm = createMaterial(AppointFormComponent, {
1105
1105
  sort: 2
1106
1106
  });
1107
1107
 
1108
+ /*
1109
+ * @Author: binruan@chatlabs.com
1110
+ * @Date: 2024-04-02 18:01:34
1111
+ * @LastEditors: binruan@chatlabs.com
1112
+ * @LastEditTime: 2024-04-02 18:01:41
1113
+ * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\CommodityDetailDiro\settingRender.tsx
1114
+ *
1115
+ */
1116
+ /*
1117
+ * @Author: binruan@chatlabs.com
1118
+ * @Date: 2024-03-26 16:50:25
1119
+ * @LastEditors: binruan@chatlabs.com
1120
+ * @LastEditTime: 2024-03-28 18:42:26
1121
+ * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\CommodityDetailDiroNew\settingRender.tsx
1122
+ *
1123
+ */
1124
+ var settingRender$3 = [
1125
+ {
1126
+ title: '商品图片',
1127
+ child: [
1128
+ {
1129
+ type: 'Radius',
1130
+ label: '轮播指示器',
1131
+ options: [
1132
+ {
1133
+ label: '居左',
1134
+ value: 'left'
1135
+ },
1136
+ {
1137
+ label: '居中',
1138
+ value: 'center'
1139
+ }
1140
+ ],
1141
+ name: ['props', 'swiper', 'dotsAlign']
1142
+ },
1143
+ {
1144
+ type: 'Number',
1145
+ name: ['props', 'swiper', 'delay'],
1146
+ addonAfter: 's'
1147
+ }
1148
+ ]
1149
+ },
1150
+ {
1151
+ title: '商品文本',
1152
+ child: [
1153
+ {
1154
+ name: ['props', 'commodityStyles'],
1155
+ type: 'SelectLinkage',
1156
+ child: [
1157
+ {
1158
+ label: '字段',
1159
+ type: 'Select',
1160
+ options: [
1161
+ {
1162
+ label: '商品名称',
1163
+ value: 'title'
1164
+ },
1165
+ {
1166
+ label: '系列名称',
1167
+ value: 'collection'
1168
+ },
1169
+ {
1170
+ label: '价格',
1171
+ value: 'price'
1172
+ },
1173
+ {
1174
+ label: '商品描述',
1175
+ value: 'info'
1176
+ }
1177
+ ],
1178
+ name: ['props', 'commodityStyles', 'field'],
1179
+ initialValue: 'title'
1180
+ },
1181
+ {
1182
+ type: 'Group',
1183
+ label: '标题字体',
1184
+ child: [
1185
+ {
1186
+ type: 'Color',
1187
+ name: ['color']
1188
+ },
1189
+ {
1190
+ type: 'Select',
1191
+ options: [{ label: '黑体', value: '黑体' }],
1192
+ name: ['fontFamily']
1193
+ },
1194
+ {
1195
+ type: 'Number',
1196
+ addonAfter: 'px',
1197
+ name: ['fontSize']
1198
+ }
1199
+ ]
1200
+ },
1201
+ {
1202
+ label: '标题样式',
1203
+ type: 'TextStyle'
1204
+ },
1205
+ {
1206
+ label: '标题对齐',
1207
+ type: 'TextAlign'
1208
+ },
1209
+ {
1210
+ label: '默认行数',
1211
+ type: 'Number',
1212
+ name: ['lineClamp']
1213
+ }
1214
+ ]
1215
+ }
1216
+ ]
1217
+ },
1218
+ {
1219
+ title: '购买按钮样式',
1220
+ child: [
1221
+ {
1222
+ type: 'Color',
1223
+ label: '背景色',
1224
+ name: ['props', 'buttonStyle', 'backgroundColor'],
1225
+ initialValue: '#000'
1226
+ },
1227
+ {
1228
+ type: 'Group',
1229
+ label: '尺寸',
1230
+ child: [
1231
+ {
1232
+ type: 'Number',
1233
+ name: ['props', 'buttonStyle', 'height'],
1234
+ addonAfter: 'H'
1235
+ }
1236
+ ]
1237
+ },
1238
+ {
1239
+ type: 'Group',
1240
+ label: '圆角',
1241
+ child: [
1242
+ {
1243
+ type: 'Slider',
1244
+ name: ['props', 'buttonStyle', 'borderRadius'],
1245
+ max: 100
1246
+ },
1247
+ {
1248
+ type: 'Number',
1249
+ name: ['props', 'buttonStyle', 'borderRadius'],
1250
+ addonAfter: 'px',
1251
+ max: 100
1252
+ }
1253
+ ]
1254
+ },
1255
+ {
1256
+ type: 'TextMargin',
1257
+ name: ['props', 'buttonStyle']
1258
+ },
1259
+ {
1260
+ type: 'Group',
1261
+ label: '字体',
1262
+ child: [
1263
+ {
1264
+ type: 'Color',
1265
+ name: ['props', 'buttonStyle', 'color'],
1266
+ initialValue: '#fff'
1267
+ },
1268
+ {
1269
+ type: 'Select',
1270
+ name: ['props', 'buttonStyle', 'fontFamily'],
1271
+ options: [{ label: '黑体', value: '黑体' }]
1272
+ },
1273
+ {
1274
+ type: 'Number',
1275
+ name: ['props', 'buttonStyle', 'fontSize'],
1276
+ addonAfter: 'px'
1277
+ }
1278
+ ]
1279
+ },
1280
+ {
1281
+ type: 'TextStyle',
1282
+ name: ['props', 'buttonStyle']
1283
+ },
1284
+ {
1285
+ type: 'TextAlign',
1286
+ name: ['props', 'buttonStyle']
1287
+ }
1288
+ ]
1289
+ }
1290
+ ];
1291
+
1108
1292
  /**
1109
1293
  * SSR Window 4.0.2
1110
1294
  * Better handling for window object in SSR environment
@@ -7988,100 +8172,278 @@ function useEventReport() {
7988
8172
  };
7989
8173
  }
7990
8174
 
7991
- const CommodityDetail$1 = (_a) => {
7992
- var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
7993
- var { content, style, bgImg, onClick, schema, isDefault, bottom_image } = _a, props = __rest(_a, ["content", "style", "bgImg", "onClick", "schema", "isDefault", "bottom_image"]);
7994
- const { sxpParameter } = useSxpDataSource();
7995
- const { popupDetailData, bffEventReport, isPreview, waterFallData } = useSxpDataSource();
7996
- const { jumpToWeb, productView } = useEventReport();
7997
- const curTimeRef = React.useRef(null);
7998
- const product = (_b = popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.video) === null || _b === void 0 ? void 0 : _b.bindProduct;
7999
- 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;
8000
- const handleLink = () => {
8001
- if (product === null || product === void 0 ? void 0 : product.link) {
8002
- jumpToWeb(popupDetailData, product, cta);
8003
- productView(popupDetailData, product, cta, curTimeRef.current);
8004
- window.location.href = window.getJointUtmLink(product.link);
8005
- }
8006
- };
8007
- React.useEffect(() => {
8008
- const initTime = () => {
8009
- curTimeRef.current = new Date();
8010
- };
8011
- initTime();
8012
- window.addEventListener('pageshow', initTime);
8013
- return () => {
8014
- window.removeEventListener('pageshow', initTime);
8015
- };
8016
- }, []);
8017
- const priceText = React.useMemo(() => {
8018
- var _a, _b, _c, _d, _e;
8019
- if ((product === null || product === void 0 ? void 0 : product.currency) && (product === null || product === void 0 ? void 0 : product.price)) {
8020
- 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', {
8021
- minimumFractionDigits: 0
8022
- })) !== null && _e !== void 0 ? _e : ''}`;
8023
- }
8024
- else {
8025
- return '$7,000';
8026
- }
8027
- }, [product === null || product === void 0 ? void 0 : product.price, product === null || product === void 0 ? void 0 : product.currency]);
8028
- const width = isPreview ? 375 : window.innerWidth;
8029
- return (React.createElement("div", { className: 'pb-commondity' },
8030
- React.createElement("div", Object.assign({ className: css.css(Object.assign({}, style)) }, props),
8031
- 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: {
8032
- delay: 3000
8033
- } }, (_f = product === null || product === void 0 ? void 0 : product.homePage) === null || _f === void 0 ? void 0 : _f.map((src) => {
8034
- return (React.createElement(SwiperSlide, { key: src },
8035
- React.createElement("div", { style: {
8036
- overflow: 'hidden',
8037
- width,
8038
- height: width
8039
- } },
8040
- React.createElement("img", { src: src, style: { height: '100%', width: '100%', objectFit: 'cover' } }))));
8041
- }))),
8042
- !((_g = product === null || product === void 0 ? void 0 : product.homePage) === null || _g === void 0 ? void 0 : _g.length) && (React.createElement("div", { className: css.css({
8043
- position: 'relative',
8044
- height: 0,
8045
- width: '100%',
8046
- paddingBottom: '100%',
8047
- overflow: 'hidden'
8048
- }) },
8049
- React.createElement("img", { className: css.css({
8050
- position: 'absolute',
8051
- left: 0,
8052
- top: 0,
8053
- objectFit: 'cover',
8054
- width: '100%'
8055
- }), src: (_h = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _h !== void 0 ? _h : bottom_image, alt: '' }))),
8056
- React.createElement("div", { className: 'pb-commondity-content' },
8057
- 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'),
8058
- 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'),
8059
- React.createElement("div", { className: 'pb-commondity-content-price' }, priceText),
8060
- 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
8061
- bold and avant-garde visual design interprets the emotional bond connecting my heart. The Tiffany Lock
8062
- collection is unisex and is inspired by the padlock pattern found in the Tiffany Antique Collection. This
8063
- necklace features a stylish and eye-catching oval clasp chain decorated with a lock pattern. Crafted from
8064
- 18-karat gold, this necklace is embellished with hand-set diamonds.`))),
8065
- (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'))));
8066
- };
8067
- var CommodityDetailComponent = React.memo(CommodityDetail$1);
8068
-
8069
8175
  /*
8070
8176
  * @Author: binruan@chatlabs.com
8071
- * @Date: 2023-07-28 18:29:57
8177
+ * @Date: 2023-11-02 18:34:34
8072
8178
  * @LastEditors: binruan@chatlabs.com
8073
- * @LastEditTime: 2024-03-20 15:52:25
8074
- * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\CommodityDetail\material.tsx
8179
+ * @LastEditTime: 2024-04-02 10:33:15
8180
+ * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Modal\index.tsx
8075
8181
  *
8076
8182
  */
8077
- const CommodityDetail = createMaterial(CommodityDetailComponent, {
8078
- displayName: '商品详情',
8079
- icon: '',
8080
- category: 'popup',
8081
- type: 'CommodityDetail',
8082
- defaulSetting: {
8083
- props: {},
8084
- style: {}
8183
+ const closeIcon = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAjhJREFUWEfFlztOw0AQhmeWiJ4CCmpQ5DiRQsIJyAWg5A0lR0AIChDiCJS8ER0cADgBeRSxt4CCDgkaKiq8i+zYeWx2413HEWmiJJv9v535Z2aN8M8vFPT9z3zETD0aAUChUJjwvPFHAJhBhB3Hqd6OAsK2yyucwykAvP38eJX398Z3AJDLlVYR8ToU9Rhj25TWr9KEsKy5dULIGQCMtfZly45TvwsAstm56UwG6wA4FUFwzrdctxZBDcWSy5XWEPG8I84/GcMipdWPtgcsaz5PCHtKG0IuTiqUvjT9U/WYMG2IOPE+AP+LtCB0xKUAAyA2Xbd2o2OG0NQXvTnvhL17D7EPtH9TRCIWwkRcGYGIQgYBABuqPuHXOQBc6pw80lBGwBQiiXhsBHQhkoprA6iM6acjhDQKu5YJZW6XeOI3XJdpvfsdTu52VfXEekD8owQiXGIubpSCbhDbLu8DwKEAd+A41SOdPpE4BS0viFOtvV2iKWqUgn5x/tmS70xR01GuDSCKc86/OCcLgTyyZ0ScDGNhFAktAJV4NFJ9YyaFiAWIE+9uVkkgBgLoig8DMWAa9ro9ynkUdlW5maZDCmB6clmz0k1HH4Cs1Ezbq2p2yEpUuBOKTSZZex00RUWIrltxuuK6EOGDSbGIOPZicpMx6fny650377qNRgBgWeVFQuA+6UjVgREhGIMlSqsPUQqIbZdOOIdZQmCv2axRnU1N1+TzJYsxOEaEV8ep7frPZ7Gd0FTEdP0ft0/kMNdg0eoAAAAASUVORK5CYII=';
8184
+ const Modal = ({ visible, onClose, children, modalStyle, padding, popupAniData }) => {
8185
+ const { popupAni } = useEditor();
8186
+ const cssAni = popupAniData !== null && popupAniData !== void 0 ? popupAniData : popupAni;
8187
+ const [isShow, setIsShow] = React.useState(false);
8188
+ const modalEleRef = React.useRef(null);
8189
+ React.useEffect(() => {
8190
+ const parentNode = document.getElementById('sxp-render');
8191
+ const node = document.getElementById('pb-modal');
8192
+ if (node) {
8193
+ modalEleRef.current = node;
8194
+ }
8195
+ else {
8196
+ modalEleRef.current = document.createElement('div');
8197
+ modalEleRef.current.setAttribute('id', 'pb-modal');
8198
+ parentNode === null || parentNode === void 0 ? void 0 : parentNode.appendChild(modalEleRef.current);
8199
+ }
8200
+ }, []);
8201
+ React.useEffect(() => {
8202
+ if (visible) {
8203
+ setIsShow(true);
8204
+ }
8205
+ else {
8206
+ setTimeout(() => {
8207
+ setIsShow(false);
8208
+ }, cssAni === null || cssAni === void 0 ? void 0 : cssAni.duration);
8209
+ }
8210
+ }, [visible, cssAni]);
8211
+ if (!modalEleRef.current)
8212
+ return null;
8213
+ const handleClose = lodash.debounce(() => {
8214
+ onClose === null || onClose === void 0 ? void 0 : onClose();
8215
+ }, 300);
8216
+ 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 },
8217
+ 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) => {
8218
+ e.stopPropagation();
8219
+ e.preventDefault();
8220
+ } },
8221
+ React.createElement("div", { onClick: onClose, className: 'modal-icon-wrapper' },
8222
+ React.createElement("img", { src: closeIcon, alt: 'close', className: 'modal-icon' })),
8223
+ children)), modalEleRef.current);
8224
+ };
8225
+ var Modal$1 = React.memo(Modal);
8226
+
8227
+ /*
8228
+ * @Author: binruan@chatlabs.com
8229
+ * @Date: 2023-12-26 16:11:34
8230
+ * @LastEditors: binruan@chatlabs.com
8231
+ * @LastEditTime: 2024-04-02 18:52:59
8232
+ * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\ExpandableText.tsx
8233
+ *
8234
+ */
8235
+ const limitTextLastWholeWord = (originalText = '', limit) => {
8236
+ // 匹配到中文
8237
+ const chineseRegex = /[\u4e00-\u9fa5]+/;
8238
+ if (chineseRegex.test(originalText)) {
8239
+ return originalText.slice(0, 54);
8240
+ }
8241
+ const words = originalText.split(' ');
8242
+ const newWords = [];
8243
+ for (let i = 0; i < words.length; i++) {
8244
+ newWords.push(words[i]);
8245
+ const tempText = newWords.join(' ');
8246
+ if (tempText.length >= limit)
8247
+ break;
8248
+ }
8249
+ // const _words = newWords.length === words.length ? newWords : newWords.slice(0, newWords.length - 1);
8250
+ const _words = newWords.length > 1 && newWords.length < words.length ? newWords.slice(0, newWords.length - 1) : newWords;
8251
+ return _words.join(' ') + ' ';
8252
+ };
8253
+ const ExpandableText = ({ text, maxStr = 108, style, className, onClick, foldText, unfoldText, isPost }) => {
8254
+ const [isShowMore, setIsShowMore] = React.useState(true);
8255
+ const [isShow, setIsShow] = React.useState(false);
8256
+ const lineClamp = Number((style === null || style === void 0 ? void 0 : style.lineClamp) || 2);
8257
+ const multiRow = React.useRef(null);
8258
+ const handleClick = React.useCallback(() => {
8259
+ setIsShowMore(!isShowMore);
8260
+ }, [isShowMore]);
8261
+ React.useMemo(() => {
8262
+ return !isShowMore && text.length > maxStr ? limitTextLastWholeWord(text, maxStr) + '...' : text;
8263
+ }, [text, maxStr, isShowMore]);
8264
+ React.useEffect(() => {
8265
+ if (multiRow.current && isPost) {
8266
+ setIsShowMore(true);
8267
+ setTimeout(() => {
8268
+ var _a;
8269
+ setIsShow(false);
8270
+ try {
8271
+ const cs = (_a = window === null || window === void 0 ? void 0 : window.getComputedStyle) === null || _a === void 0 ? void 0 : _a.call(window, multiRow.current);
8272
+ const height = parseFloat(cs === null || cs === void 0 ? void 0 : cs.height);
8273
+ const lh = parseFloat(cs === null || cs === void 0 ? void 0 : cs.lineHeight);
8274
+ const fs = parseFloat(cs === null || cs === void 0 ? void 0 : cs.fontSize) + 4;
8275
+ const lineHeight = isNaN(lh) ? fs : lh;
8276
+ if (text && height > lineHeight * lineClamp) {
8277
+ setIsShowMore(false);
8278
+ setIsShow(true);
8279
+ }
8280
+ }
8281
+ catch (_b) { }
8282
+ }, 100);
8283
+ }
8284
+ }, [multiRow, text, lineClamp, style, isPost]);
8285
+ return (React.createElement("div", { className: className, style: Object.assign({}, style), hidden: !text || text === '' },
8286
+ React.createElement("div", { ref: multiRow, style: {
8287
+ overflow: 'hidden',
8288
+ WebkitLineClamp: !isShowMore ? lineClamp : '',
8289
+ textOverflow: 'ellipsis',
8290
+ display: '-webkit-box',
8291
+ WebkitBoxOrient: 'vertical',
8292
+ wordBreak: 'break-word'
8293
+ }, dangerouslySetInnerHTML: { __html: text === null || text === void 0 ? void 0 : text.replace(/\n/g, '</br>') } }),
8294
+ 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'))));
8295
+ };
8296
+ var ExpandableText$1 = React.memo(ExpandableText);
8297
+
8298
+ const CommodityDetail$1 = (_a) => {
8299
+ var _b, _c, _d, _e, _f, _g, _h, _j;
8300
+ 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"]);
8301
+ const { sxpParameter } = useSxpDataSource();
8302
+ const { popupDetailData, bffEventReport, isPreview, waterFallData } = useSxpDataSource();
8303
+ const { jumpToWeb, productView } = useEventReport();
8304
+ const curTimeRef = React.useRef(null);
8305
+ const [showModal, setShowModal] = React.useState(false);
8306
+ const data = isPost ? rec : popupDetailData;
8307
+ 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;
8308
+ 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;
8309
+ const handleLink = () => {
8310
+ if (product === null || product === void 0 ? void 0 : product.link) {
8311
+ jumpToWeb(popupDetailData, product, cta);
8312
+ if (!isPost) {
8313
+ productView(data, product, cta, viewTime || curTimeRef.current);
8314
+ }
8315
+ window.location.href = window.getJointUtmLink(product.link);
8316
+ }
8317
+ };
8318
+ React.useEffect(() => {
8319
+ const initTime = () => {
8320
+ curTimeRef.current = new Date();
8321
+ };
8322
+ initTime();
8323
+ window.addEventListener('pageshow', initTime);
8324
+ return () => {
8325
+ window.removeEventListener('pageshow', initTime);
8326
+ };
8327
+ }, []);
8328
+ const priceText = React.useMemo(() => {
8329
+ var _a, _b, _c, _d, _e;
8330
+ if ((product === null || product === void 0 ? void 0 : product.currency) && (product === null || product === void 0 ? void 0 : product.price)) {
8331
+ 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', {
8332
+ minimumFractionDigits: 0
8333
+ })) !== null && _e !== void 0 ? _e : ''}`;
8334
+ }
8335
+ else {
8336
+ return '$7,000';
8337
+ }
8338
+ }, [product === null || product === void 0 ? void 0 : product.price, product === null || product === void 0 ? void 0 : product.currency]);
8339
+ const width = isPreview ? 375 : window.innerWidth;
8340
+ const renderContent = ({ isPost }) => {
8341
+ var _a, _b, _c;
8342
+ return (React.createElement("div", { className: 'pb-commondity-content' },
8343
+ 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'),
8344
+ 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'),
8345
+ React.createElement("div", { className: 'pb-commondity-content-price', style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price }, priceText),
8346
+ 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
8347
+ bold and avant-garde visual design interprets the emotional bond connecting my heart. The Tiffany Lock
8348
+ collection is unisex and is inspired by the padlock pattern found in the Tiffany Antique Collection. This
8349
+ necklace features a stylish and eye-catching oval clasp chain decorated with a lock pattern. Crafted from
8350
+ 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 })));
8351
+ };
8352
+ const renderBtn = () => {
8353
+ var _a;
8354
+ 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'))));
8355
+ };
8356
+ return (React.createElement("div", { className: 'pb-commondity' },
8357
+ React.createElement("div", Object.assign({ className: css.css(Object.assign({}, style)) }, props),
8358
+ 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: {
8359
+ clickable: true,
8360
+ bulletActiveClass: 'swipe-item-active-bullet',
8361
+ clickableClass: (swiper === null || swiper === void 0 ? void 0 : swiper.dotsAlign) === 'left'
8362
+ ? 'commondityDetail-swiper-clickable-left'
8363
+ : 'commondityDetail-swiper-clickable-center'
8364
+ }, loop: true, autoplay: {
8365
+ delay: (swiper === null || swiper === void 0 ? void 0 : swiper.delay) * 1000
8366
+ } }, (_g = product === null || product === void 0 ? void 0 : product.homePage) === null || _g === void 0 ? void 0 : _g.map((src) => {
8367
+ return (React.createElement(SwiperSlide, { key: src },
8368
+ React.createElement("div", { style: {
8369
+ overflow: 'hidden',
8370
+ width,
8371
+ height: width
8372
+ } },
8373
+ React.createElement("img", { src: src, style: { height: '100%', width: '100%', objectFit: 'cover' } }))));
8374
+ }))),
8375
+ !((_h = product === null || product === void 0 ? void 0 : product.homePage) === null || _h === void 0 ? void 0 : _h.length) && (React.createElement("div", { className: css.css({
8376
+ position: 'relative',
8377
+ height: 0,
8378
+ width: '100%',
8379
+ paddingBottom: '100%',
8380
+ overflow: 'hidden'
8381
+ }) },
8382
+ React.createElement("img", { className: css.css({
8383
+ position: 'absolute',
8384
+ left: 0,
8385
+ top: 0,
8386
+ objectFit: 'cover',
8387
+ width: '100%'
8388
+ }), src: (_j = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _j !== void 0 ? _j : bottom_image, alt: '' }))),
8389
+ renderContent({ isPost })),
8390
+ renderBtn(),
8391
+ React.createElement(Modal$1, { visible: showModal, onClose: () => setShowModal(false) },
8392
+ renderContent({ isPost: false }),
8393
+ renderBtn())));
8394
+ };
8395
+ var CommodityDetailComponent = React.memo(CommodityDetail$1);
8396
+
8397
+ /*
8398
+ * @Author: binruan@chatlabs.com
8399
+ * @Date: 2023-07-28 18:29:57
8400
+ * @LastEditors: binruan@chatlabs.com
8401
+ * @LastEditTime: 2024-04-02 18:13:10
8402
+ * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\CommodityDetail\material.tsx
8403
+ *
8404
+ */
8405
+ const CommodityDetail = createMaterial(CommodityDetailComponent, {
8406
+ displayName: '商品详情',
8407
+ icon: '',
8408
+ category: 'popup',
8409
+ type: 'CommodityDetail',
8410
+ related: {
8411
+ settingRender: settingRender$3
8412
+ },
8413
+ defaulSetting: {
8414
+ props: {
8415
+ swiper: {
8416
+ dotsAlign: 'center',
8417
+ delay: 3
8418
+ },
8419
+ commodityStyles: {
8420
+ price: {
8421
+ color: '#000',
8422
+ fontSize: 18
8423
+ },
8424
+ title: {
8425
+ color: '#000',
8426
+ fontSize: 23
8427
+ },
8428
+ collection: {
8429
+ fontSize: 12,
8430
+ color: '#000'
8431
+ },
8432
+ info: {
8433
+ color: 'gray',
8434
+ fontSize: 12
8435
+ }
8436
+ },
8437
+ buttonStyle: {
8438
+ backgroundColor: '#000',
8439
+ fontSize: 12,
8440
+ height: 45,
8441
+ fontWeight: 'bold',
8442
+ textAlign: 'center',
8443
+ color: 'rgba(255, 255, 255, 0.9)'
8444
+ }
8445
+ },
8446
+ style: {}
8085
8447
  },
8086
8448
  w: 100,
8087
8449
  h: 40,
@@ -8127,7 +8489,7 @@ var settingRender$2 = [
8127
8489
  }
8128
8490
  ];
8129
8491
 
8130
- 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";
8492
+ 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";
8131
8493
 
8132
8494
  /*
8133
8495
  * @Author: binruan@chatlabs.com
@@ -8171,7 +8533,7 @@ const Prompt$1 = (_a) => {
8171
8533
  };
8172
8534
  return (React.createElement("div", Object.assign({ className: `pb-prompt ${css.css(Object.assign({}, style))}` }, props),
8173
8535
  React.createElement("div", { className: 'pb-prompt-icon' },
8174
- React.createElement("img", { width: '100%', src: iconSrc !== null && iconSrc !== void 0 ? iconSrc : img$3 })),
8536
+ React.createElement("img", { width: '100%', src: iconSrc !== null && iconSrc !== void 0 ? iconSrc : img$2 })),
8175
8537
  React.createElement("div", { className: 'pb-prompt-content' }, content),
8176
8538
  React.createElement("button", { className: 'pb-prompt-btn', onClick: handleOk }, btnText)));
8177
8539
  };
@@ -8189,7 +8551,7 @@ const Prompt = createMaterial(PromptComponent, {
8189
8551
  },
8190
8552
  defaulSetting: {
8191
8553
  props: {
8192
- icon: img$3,
8554
+ icon: img$2,
8193
8555
  content: 'You have successfully completed the appointment!',
8194
8556
  btnText: 'OK'
8195
8557
  },
@@ -8200,184 +8562,6 @@ const Prompt = createMaterial(PromptComponent, {
8200
8562
  sort: 3
8201
8563
  });
8202
8564
 
8203
- 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=";
8204
-
8205
- const CommodityDetailDiro$1 = (_a) => {
8206
- var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
8207
- var { style, isDefault, rec, viewTime, isPost, bottom_image } = _a, props = __rest(_a, ["style", "isDefault", "rec", "viewTime", "isPost", "bottom_image"]);
8208
- const [spread, setSpread] = React.useState(true);
8209
- const { sxpParameter } = useSxpDataSource();
8210
- const { popupDetailData, bffEventReport, isPreview, swiperRef, waterFallData } = useSxpDataSource();
8211
- const { jumpToWeb, productView } = useEventReport();
8212
- const scrollRef = React.useRef(null);
8213
- const touchRef = React.useRef(null);
8214
- const touchMoveRef = React.useRef(null);
8215
- const [stopSlide, setStopSlide] = React.useState(false);
8216
- const [isBottom, setIsBottom] = React.useState(false);
8217
- const [isTop, setIsTop] = React.useState(true);
8218
- const curTimeRef = React.useRef(null);
8219
- const data = isPost ? rec : popupDetailData;
8220
- 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;
8221
- 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;
8222
- const handleLink = () => {
8223
- if (product === null || product === void 0 ? void 0 : product.link) {
8224
- jumpToWeb(data, product, cta);
8225
- if (!isPost) {
8226
- productView(data, product, cta, viewTime || curTimeRef.current);
8227
- }
8228
- window.location.href = window.getJointUtmLink(product.link);
8229
- }
8230
- };
8231
- React.useEffect(() => {
8232
- const initTime = () => {
8233
- curTimeRef.current = new Date();
8234
- };
8235
- initTime();
8236
- window.addEventListener('pageshow', initTime);
8237
- return () => {
8238
- window.removeEventListener('pageshow', initTime);
8239
- };
8240
- }, []);
8241
- const priceText = React.useMemo(() => {
8242
- var _a, _b, _c, _d, _e;
8243
- if ((product === null || product === void 0 ? void 0 : product.currency) && (product === null || product === void 0 ? void 0 : product.price)) {
8244
- 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', {
8245
- minimumFractionDigits: 0
8246
- })) !== null && _e !== void 0 ? _e : ''}`;
8247
- }
8248
- else {
8249
- return '$7,000';
8250
- }
8251
- }, [product === null || product === void 0 ? void 0 : product.price, product === null || product === void 0 ? void 0 : product.currency]);
8252
- const width = isPreview ? 375 : window.innerWidth;
8253
- const handleClickCollapse = () => {
8254
- setSpread(!spread);
8255
- };
8256
- React.useEffect(() => {
8257
- var _a, _b;
8258
- console.log((_a = scrollRef === null || scrollRef === void 0 ? void 0 : scrollRef.current) === null || _a === void 0 ? void 0 : _a.scrollHeight, window.innerHeight);
8259
- 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) {
8260
- setStopSlide(true);
8261
- }
8262
- }, [scrollRef]);
8263
- React.useEffect(() => {
8264
- const handleScroll = () => {
8265
- if (scrollRef === null || scrollRef === void 0 ? void 0 : scrollRef.current) {
8266
- const { scrollTop, scrollHeight, clientHeight } = scrollRef.current;
8267
- const isBottom = scrollTop + clientHeight === scrollHeight;
8268
- if (isBottom) {
8269
- setIsBottom(true);
8270
- }
8271
- else {
8272
- setIsBottom(false);
8273
- }
8274
- if (scrollTop === 0) {
8275
- setIsTop(true);
8276
- }
8277
- else {
8278
- setIsTop(false);
8279
- }
8280
- }
8281
- };
8282
- if (scrollRef.current) {
8283
- scrollRef.current.addEventListener('scroll', handleScroll);
8284
- }
8285
- return () => {
8286
- if (scrollRef.current) {
8287
- scrollRef.current.removeEventListener('scroll', handleScroll);
8288
- }
8289
- };
8290
- }, [scrollRef]);
8291
- const handleTouchStart = (event) => {
8292
- event.stopPropagation();
8293
- touchRef.current = event.touches[0].clientY;
8294
- touchMoveRef.current = true;
8295
- };
8296
- const handleTouchMove = (event) => {
8297
- var _a, _b, _c, _d;
8298
- if (touchMoveRef.current) {
8299
- touchMoveRef.current = false;
8300
- const currentY = event.touches[0].clientY;
8301
- const diff = touchRef.current - currentY;
8302
- if (diff > 0 && (isBottom || !stopSlide)) {
8303
- (_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();
8304
- }
8305
- else if (diff < 0 && (isTop || !stopSlide)) {
8306
- (_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();
8307
- }
8308
- }
8309
- };
8310
- return (React.createElement("div", { className: 'pb-commondityDiro' },
8311
- React.createElement("div", Object.assign({ ref: scrollRef, className: css.css(Object.assign({}, style)) }, props, { onTouchStart: handleTouchStart, onTouchMove: (e) => {
8312
- e.stopPropagation();
8313
- handleTouchMove(e);
8314
- } }),
8315
- 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: {
8316
- delay: 3000
8317
- } }, (_g = product === null || product === void 0 ? void 0 : product.homePage) === null || _g === void 0 ? void 0 : _g.map((src) => {
8318
- return (React.createElement(SwiperSlide, { key: src },
8319
- React.createElement("div", { style: {
8320
- overflow: 'hidden',
8321
- width,
8322
- height: width
8323
- } },
8324
- React.createElement("img", { src: src, style: { height: '100%', width: '100%', objectFit: 'cover' } }))));
8325
- }))),
8326
- !((_h = product === null || product === void 0 ? void 0 : product.homePage) === null || _h === void 0 ? void 0 : _h.length) && (React.createElement("div", { className: css.css({
8327
- position: 'relative',
8328
- height: 0,
8329
- width: '100%',
8330
- paddingBottom: '100%',
8331
- overflow: 'hidden'
8332
- }) },
8333
- React.createElement("img", { className: css.css({
8334
- position: 'absolute',
8335
- left: 0,
8336
- top: 0,
8337
- objectFit: 'cover',
8338
- width: '100%'
8339
- }), src: (_j = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _j !== void 0 ? _j : bottom_image, alt: '' }))),
8340
- React.createElement("div", { className: 'pb-commondityDiro-content' },
8341
- 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'),
8342
- 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'),
8343
- 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'),
8344
- React.createElement("div", { className: 'pb-commondityDiro-content-line' }),
8345
- React.createElement("div", { className: 'pb-commondityDiro-content-price' }, priceText)),
8346
- 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) === '') },
8347
- React.createElement("div", { className: 'pb-commondityDiro-desc-collapse', onClick: handleClickCollapse },
8348
- React.createElement("div", { className: 'pb-commondityDiro-desc-collapse-title' }, "DESCRIPTION"),
8349
- React.createElement("img", { className: `pb-commondityDiro-desc-collapse-icon ${spread ? 'pb-commondityDiro-desc-collapse-iconActive' : ''}`, src: img$2, alt: '' })),
8350
- React.createElement("div", { className: 'pb-commondityDiro-desc-info', hidden: !spread }, (product === null || product === void 0 ? void 0 : product.info) ||
8351
- '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.')),
8352
- (!product || (product === null || product === void 0 ? void 0 : product.link)) && (React.createElement(React.Fragment, null,
8353
- React.createElement("div", { className: 'pb-commondityDiro-h90' }),
8354
- React.createElement("div", { className: 'pb-commondityDiro-bottom' },
8355
- 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')))))));
8356
- };
8357
- var CommodityDetailDiroComponent = React.memo(CommodityDetailDiro$1);
8358
-
8359
- /*
8360
- * @Author: binruan@chatlabs.com
8361
- * @Date: 2023-07-28 18:29:57
8362
- * @LastEditors: binruan@chatlabs.com
8363
- * @LastEditTime: 2024-01-05 11:37:37
8364
- * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\CommodityDetailDiro\material.tsx
8365
- *
8366
- */
8367
- const CommodityDetailDiro = createMaterial(CommodityDetailDiroComponent, {
8368
- displayName: '商品详情',
8369
- icon: '',
8370
- category: 'popup',
8371
- type: 'CommodityDetailDiro',
8372
- defaulSetting: {
8373
- props: {},
8374
- style: {}
8375
- },
8376
- w: 100,
8377
- h: 40,
8378
- sort: 1
8379
- });
8380
-
8381
8565
  /*
8382
8566
  * @Author: binruan@chatlabs.com
8383
8567
  * @Date: 2024-03-26 16:50:25
@@ -8521,6 +8705,10 @@ var settingRender$1 = [
8521
8705
  }
8522
8706
  ]
8523
8707
  },
8708
+ {
8709
+ type: 'TextMargin',
8710
+ name: ['props', 'buttonStyle']
8711
+ },
8524
8712
  {
8525
8713
  type: 'Group',
8526
8714
  label: '字体',
@@ -8549,142 +8737,11 @@ var settingRender$1 = [
8549
8737
  {
8550
8738
  type: 'TextAlign',
8551
8739
  name: ['props', 'buttonStyle']
8552
- },
8553
- {
8554
- type: 'TextSpace',
8555
- name: ['props', 'buttonStyle']
8556
- },
8557
- {
8558
- type: 'TextMargin',
8559
- name: ['props', 'buttonStyle']
8560
8740
  }
8561
8741
  ]
8562
8742
  }
8563
8743
  ];
8564
8744
 
8565
- /*
8566
- * @Author: binruan@chatlabs.com
8567
- * @Date: 2023-11-02 18:34:34
8568
- * @LastEditors: binruan@chatlabs.com
8569
- * @LastEditTime: 2024-04-02 10:33:15
8570
- * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Modal\index.tsx
8571
- *
8572
- */
8573
- const closeIcon = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAjhJREFUWEfFlztOw0AQhmeWiJ4CCmpQ5DiRQsIJyAWg5A0lR0AIChDiCJS8ER0cADgBeRSxt4CCDgkaKiq8i+zYeWx2413HEWmiJJv9v535Z2aN8M8vFPT9z3zETD0aAUChUJjwvPFHAJhBhB3Hqd6OAsK2yyucwykAvP38eJX398Z3AJDLlVYR8ToU9Rhj25TWr9KEsKy5dULIGQCMtfZly45TvwsAstm56UwG6wA4FUFwzrdctxZBDcWSy5XWEPG8I84/GcMipdWPtgcsaz5PCHtKG0IuTiqUvjT9U/WYMG2IOPE+AP+LtCB0xKUAAyA2Xbd2o2OG0NQXvTnvhL17D7EPtH9TRCIWwkRcGYGIQgYBABuqPuHXOQBc6pw80lBGwBQiiXhsBHQhkoprA6iM6acjhDQKu5YJZW6XeOI3XJdpvfsdTu52VfXEekD8owQiXGIubpSCbhDbLu8DwKEAd+A41SOdPpE4BS0viFOtvV2iKWqUgn5x/tmS70xR01GuDSCKc86/OCcLgTyyZ0ScDGNhFAktAJV4NFJ9YyaFiAWIE+9uVkkgBgLoig8DMWAa9ro9ynkUdlW5maZDCmB6clmz0k1HH4Cs1Ezbq2p2yEpUuBOKTSZZex00RUWIrltxuuK6EOGDSbGIOPZicpMx6fny650377qNRgBgWeVFQuA+6UjVgREhGIMlSqsPUQqIbZdOOIdZQmCv2axRnU1N1+TzJYsxOEaEV8ep7frPZ7Gd0FTEdP0ft0/kMNdg0eoAAAAASUVORK5CYII=';
8574
- const Modal = ({ visible, onClose, children, modalStyle, padding, popupAniData }) => {
8575
- const { popupAni } = useEditor();
8576
- const cssAni = popupAniData !== null && popupAniData !== void 0 ? popupAniData : popupAni;
8577
- const [isShow, setIsShow] = React.useState(false);
8578
- const modalEleRef = React.useRef(null);
8579
- React.useEffect(() => {
8580
- const parentNode = document.getElementById('sxp-render');
8581
- const node = document.getElementById('pb-modal');
8582
- if (node) {
8583
- modalEleRef.current = node;
8584
- }
8585
- else {
8586
- modalEleRef.current = document.createElement('div');
8587
- modalEleRef.current.setAttribute('id', 'pb-modal');
8588
- parentNode === null || parentNode === void 0 ? void 0 : parentNode.appendChild(modalEleRef.current);
8589
- }
8590
- }, []);
8591
- React.useEffect(() => {
8592
- if (visible) {
8593
- setIsShow(true);
8594
- }
8595
- else {
8596
- setTimeout(() => {
8597
- setIsShow(false);
8598
- }, cssAni === null || cssAni === void 0 ? void 0 : cssAni.duration);
8599
- }
8600
- }, [visible, cssAni]);
8601
- if (!modalEleRef.current)
8602
- return null;
8603
- const handleClose = lodash.debounce(() => {
8604
- onClose === null || onClose === void 0 ? void 0 : onClose();
8605
- }, 300);
8606
- 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 },
8607
- 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) => {
8608
- e.stopPropagation();
8609
- e.preventDefault();
8610
- } },
8611
- React.createElement("div", { onClick: onClose, className: 'modal-icon-wrapper' },
8612
- React.createElement("img", { src: closeIcon, alt: 'close', className: 'modal-icon' })),
8613
- children)), modalEleRef.current);
8614
- };
8615
- var Modal$1 = React.memo(Modal);
8616
-
8617
- /*
8618
- * @Author: binruan@chatlabs.com
8619
- * @Date: 2023-12-26 16:11:34
8620
- * @LastEditors: binruan@chatlabs.com
8621
- * @LastEditTime: 2024-04-02 10:57:30
8622
- * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\ExpandableText.tsx
8623
- *
8624
- */
8625
- const limitTextLastWholeWord = (originalText = '', limit) => {
8626
- // 匹配到中文
8627
- const chineseRegex = /[\u4e00-\u9fa5]+/;
8628
- if (chineseRegex.test(originalText)) {
8629
- return originalText.slice(0, 54);
8630
- }
8631
- const words = originalText.split(' ');
8632
- const newWords = [];
8633
- for (let i = 0; i < words.length; i++) {
8634
- newWords.push(words[i]);
8635
- const tempText = newWords.join(' ');
8636
- if (tempText.length >= limit)
8637
- break;
8638
- }
8639
- // const _words = newWords.length === words.length ? newWords : newWords.slice(0, newWords.length - 1);
8640
- const _words = newWords.length > 1 && newWords.length < words.length ? newWords.slice(0, newWords.length - 1) : newWords;
8641
- return _words.join(' ') + ' ';
8642
- };
8643
- const ExpandableText = ({ text, maxStr = 108, style, className, onClick, foldText, unfoldText, isPost }) => {
8644
- const [isShowMore, setIsShowMore] = React.useState(true);
8645
- const [isShow, setIsShow] = React.useState(false);
8646
- const lineClamp = Number((style === null || style === void 0 ? void 0 : style.lineClamp) || 2);
8647
- const multiRow = React.useRef(null);
8648
- const handleClick = React.useCallback(() => {
8649
- setIsShowMore(!isShowMore);
8650
- }, [isShowMore]);
8651
- React.useMemo(() => {
8652
- return !isShowMore && text.length > maxStr ? limitTextLastWholeWord(text, maxStr) + '...' : text;
8653
- }, [text, maxStr, isShowMore]);
8654
- React.useEffect(() => {
8655
- if (multiRow.current && isPost) {
8656
- setIsShowMore(true);
8657
- setTimeout(() => {
8658
- var _a;
8659
- setIsShow(false);
8660
- try {
8661
- const cs = (_a = window === null || window === void 0 ? void 0 : window.getComputedStyle) === null || _a === void 0 ? void 0 : _a.call(window, multiRow.current);
8662
- const height = parseFloat(cs === null || cs === void 0 ? void 0 : cs.height);
8663
- const lh = parseFloat(cs === null || cs === void 0 ? void 0 : cs.lineHeight);
8664
- const fs = parseFloat(cs === null || cs === void 0 ? void 0 : cs.fontSize) + 4;
8665
- const lineHeight = isNaN(lh) ? fs : lh;
8666
- if (text && height > lineHeight * lineClamp) {
8667
- setIsShowMore(false);
8668
- setIsShow(true);
8669
- }
8670
- }
8671
- catch (_b) { }
8672
- }, 100);
8673
- }
8674
- }, [multiRow, text, lineClamp, style, isPost]);
8675
- return (React.createElement("div", { className: className, style: Object.assign({}, style) },
8676
- React.createElement("div", { ref: multiRow, style: {
8677
- overflow: 'hidden',
8678
- WebkitLineClamp: !isShowMore ? lineClamp : '',
8679
- textOverflow: 'ellipsis',
8680
- display: '-webkit-box',
8681
- WebkitBoxOrient: 'vertical',
8682
- wordBreak: 'break-word'
8683
- }, dangerouslySetInnerHTML: { __html: text ? text === null || text === void 0 ? void 0 : text.replace(/\n/g, '</br>') : React.createElement(React.Fragment, null) } }),
8684
- 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'))));
8685
- };
8686
- var ExpandableText$1 = React.memo(ExpandableText);
8687
-
8688
8745
  const CommodityDetailDiroNew$1 = (_a) => {
8689
8746
  var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
8690
8747
  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"]);
@@ -8734,7 +8791,7 @@ const CommodityDetailDiroNew$1 = (_a) => {
8734
8791
  }
8735
8792
  }, [product === null || product === void 0 ? void 0 : product.price, product === null || product === void 0 ? void 0 : product.currency]);
8736
8793
  const width = isPreview ? 375 : window.innerWidth;
8737
- const productInfoText = () => {
8794
+ const productInfoText = ({ isPost }) => {
8738
8795
  return (React.createElement("div", { hidden: !!product && (!(product === null || product === void 0 ? void 0 : product.info) || (product === null || product === void 0 ? void 0 : product.info) === '') },
8739
8796
  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) ||
8740
8797
  `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
@@ -8781,8 +8838,8 @@ Made in Italy` })));
8781
8838
  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 : '税费'))),
8782
8839
  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'),
8783
8840
  (!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')),
8784
- productInfoText())),
8785
- React.createElement(Modal$1, { visible: showModal, onClose: () => setShowModal(false) }, productInfoText())));
8841
+ productInfoText({ isPost }))),
8842
+ React.createElement(Modal$1, { visible: showModal, onClose: () => setShowModal(false) }, productInfoText({ isPost: false }))));
8786
8843
  };
8787
8844
  var CommodityDetailDiroNewComponent = React.memo(CommodityDetailDiroNew$1);
8788
8845
 
@@ -8790,7 +8847,7 @@ var CommodityDetailDiroNewComponent = React.memo(CommodityDetailDiroNew$1);
8790
8847
  * @Author: binruan@chatlabs.com
8791
8848
  * @Date: 2024-03-20 10:27:31
8792
8849
  * @LastEditors: binruan@chatlabs.com
8793
- * @LastEditTime: 2024-03-28 16:05:12
8850
+ * @LastEditTime: 2024-04-02 15:12:53
8794
8851
  * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\CommodityDetailDiroNew\material.tsx
8795
8852
  *
8796
8853
  */
@@ -8832,6 +8889,17 @@ const CommodityDetailDiroNew = createMaterial(CommodityDetailDiroNewComponent, {
8832
8889
  fontSize: 13,
8833
8890
  textAlign: 'right'
8834
8891
  }
8892
+ },
8893
+ buttonStyle: {
8894
+ backgroundColor: '#000',
8895
+ fontSize: 12,
8896
+ height: 52,
8897
+ fontWeight: 'bold',
8898
+ textAlign: 'center',
8899
+ color: '#fff',
8900
+ borderRadius: 25,
8901
+ marginTop: 16,
8902
+ marginBottom: 16
8835
8903
  }
8836
8904
  },
8837
8905
  style: {}
@@ -9881,7 +9949,6 @@ var _materials_ = /*#__PURE__*/Object.freeze({
9881
9949
  AppointForm: AppointForm,
9882
9950
  Commodity: Commodity,
9883
9951
  CommodityDetail: CommodityDetail,
9884
- CommodityDetailDiro: CommodityDetailDiro,
9885
9952
  CommodityDetailDiroNew: CommodityDetailDiroNew,
9886
9953
  CommodityDiro: CommodityDiro,
9887
9954
  CommodityDiroNew: CommodityDiroNew,
@@ -10947,9 +11014,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
10947
11014
  return (_d = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) === null || _d === void 0 ? void 0 : _d.map((value, index) => {
10948
11015
  var _a, _b, _c, _d, _e, _f;
10949
11016
  const Component = withBindDataSource(resolver[(_a = value === null || value === void 0 ? void 0 : value.item) === null || _a === void 0 ? void 0 : _a.type]);
10950
- 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' },
10951
- // ProductInfo
10952
- data: rec, height: height, width: containerWidth })));
11017
+ 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' } })));
10953
11018
  });
10954
11019
  }
10955
11020
  return null;