pb-sxp-ui 1.0.3-alpha.3 → 1.0.3-alpha.4
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.
- package/dist/index.cjs +14 -13
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +7 -3
- package/dist/index.js +14 -13
- package/dist/index.js.map +1 -1
- package/dist/index.min.cjs +3 -3
- package/dist/index.min.cjs.map +1 -1
- package/dist/index.min.js +3 -3
- package/dist/index.min.js.map +1 -1
- package/dist/pb-ui.js +14 -13
- package/dist/pb-ui.js.map +1 -1
- package/dist/pb-ui.min.js +3 -3
- package/dist/pb-ui.min.js.map +1 -1
- package/es/core/components/SxpPageRender/ExpandableText.js +1 -1
- package/es/materials/sxp/popup/CommodityDetail/index.js +9 -8
- package/es/materials/sxp/popup/CommodityDetailDiroNew/index.js +3 -3
- package/lib/core/components/SxpPageRender/ExpandableText.js +1 -1
- package/lib/materials/sxp/popup/CommodityDetail/index.js +9 -8
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.js +3 -3
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
@@ -8232,7 +8232,7 @@ var Modal$1 = React.memo(Modal);
|
|
8232
8232
|
* @Author: binruan@chatlabs.com
|
8233
8233
|
* @Date: 2023-12-26 16:11:34
|
8234
8234
|
* @LastEditors: binruan@chatlabs.com
|
8235
|
-
* @LastEditTime: 2024-04-
|
8235
|
+
* @LastEditTime: 2024-04-09 11:00:07
|
8236
8236
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\ExpandableText.tsx
|
8237
8237
|
*
|
8238
8238
|
*/
|
@@ -8275,7 +8275,7 @@ const ExpandableText = ({ text, maxStr = 108, style, className, onClick, foldTex
|
|
8275
8275
|
const cs = (_a = window === null || window === void 0 ? void 0 : window.getComputedStyle) === null || _a === void 0 ? void 0 : _a.call(window, multiRow.current);
|
8276
8276
|
const height = parseFloat(cs === null || cs === void 0 ? void 0 : cs.height);
|
8277
8277
|
const lh = parseFloat(cs === null || cs === void 0 ? void 0 : cs.lineHeight);
|
8278
|
-
const fs = parseFloat(cs === null || cs === void 0 ? void 0 : cs.fontSize) +
|
8278
|
+
const fs = parseFloat(cs === null || cs === void 0 ? void 0 : cs.fontSize) + 6;
|
8279
8279
|
const lineHeight = isNaN(lh) ? fs : lh;
|
8280
8280
|
if (text && height > lineHeight * lineClamp) {
|
8281
8281
|
setIsShowMore(false);
|
@@ -8343,15 +8343,16 @@ const CommodityDetail$1 = (_a) => {
|
|
8343
8343
|
const width = isPreview ? 375 : window.innerWidth;
|
8344
8344
|
const renderContent = ({ isPost }) => {
|
8345
8345
|
var _a, _b, _c;
|
8346
|
-
return (React.createElement("div",
|
8347
|
-
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'),
|
8348
|
-
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'),
|
8349
|
-
React.createElement("div", { className: 'pb-commondity-content-price', style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price }, priceText),
|
8350
|
-
React.createElement(
|
8346
|
+
return (React.createElement("div", null,
|
8347
|
+
React.createElement("div", { className: 'pb-commondity-content-collection', style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.collection, hidden: !!product && (!(product === null || product === void 0 ? void 0 : product.collection) || (product === null || product === void 0 ? void 0 : product.collection) === '') }, (_a = product === null || product === void 0 ? void 0 : product.collection) !== null && _a !== void 0 ? _a : 'Tiffany Lock'),
|
8348
|
+
React.createElement("div", { className: 'pb-commondity-content-title', style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.title, hidden: !!product && !(product === null || product === void 0 ? void 0 : product.title) }, (_b = product === null || product === void 0 ? void 0 : product.title) !== null && _b !== void 0 ? _b : 'Pendant in Yellow Gold with Diamonds, Medium'),
|
8349
|
+
React.createElement("div", { className: 'pb-commondity-content-price', style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price, hidden: !!product && !(product === null || product === void 0 ? void 0 : product.price) }, priceText),
|
8350
|
+
React.createElement("div", { hidden: !!product && (!(product === null || product === void 0 ? void 0 : product.info) || (product === null || product === void 0 ? void 0 : product.info) === '') },
|
8351
|
+
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
|
8351
8352
|
bold and avant-garde visual design interprets the emotional bond connecting my heart. The Tiffany Lock
|
8352
8353
|
collection is unisex and is inspired by the padlock pattern found in the Tiffany Antique Collection. This
|
8353
8354
|
necklace features a stylish and eye-catching oval clasp chain decorated with a lock pattern. Crafted from
|
8354
|
-
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 })));
|
8355
|
+
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 }))));
|
8355
8356
|
};
|
8356
8357
|
const renderBtn = () => {
|
8357
8358
|
var _a;
|
@@ -8390,10 +8391,10 @@ const CommodityDetail$1 = (_a) => {
|
|
8390
8391
|
objectFit: 'cover',
|
8391
8392
|
width: '100%'
|
8392
8393
|
}), src: (_j = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _j !== void 0 ? _j : bottom_image, alt: '' }))),
|
8393
|
-
renderContent({ isPost })),
|
8394
|
+
React.createElement("div", { className: 'pb-commondity-content' }, renderContent({ isPost }))),
|
8394
8395
|
renderBtn(),
|
8395
8396
|
React.createElement(Modal$1, { visible: showModal, onClose: () => setShowModal(false) },
|
8396
|
-
renderContent({ isPost: false }),
|
8397
|
+
React.createElement("div", { style: { paddingBottom: '80px' } }, renderContent({ isPost: false })),
|
8397
8398
|
renderBtn())));
|
8398
8399
|
};
|
8399
8400
|
var CommodityDetailComponent = React.memo(CommodityDetail$1);
|
@@ -8839,9 +8840,9 @@ Made in Italy` })));
|
|
8839
8840
|
React.createElement("div", null,
|
8840
8841
|
React.createElement("div", { className: 'pb-commondityDiroNew-content-top-title', style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.title }, (_k = product === null || product === void 0 ? void 0 : product.title) !== null && _k !== void 0 ? _k : 'Large Dior Toujours Bag'),
|
8841
8842
|
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')),
|
8842
|
-
React.createElement("div",
|
8843
|
-
React.createElement("div", { className: 'pb-commondityDiroNew-content-top-price', hidden: !!product && !(product === null || product === void 0 ? void 0 : product.price), style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price }, priceText),
|
8844
|
-
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 : '税费'))),
|
8843
|
+
React.createElement("div", { className: 'pb-commondityDiroNew-content-top-right' },
|
8844
|
+
React.createElement("div", { className: 'pb-commondityDiroNew-content-top-right-price', hidden: !!product && !(product === null || product === void 0 ? void 0 : product.price), style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price }, priceText),
|
8845
|
+
React.createElement("div", { className: 'pb-commondityDiroNew-content-top-right-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 : '税费'))),
|
8845
8846
|
(!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')),
|
8846
8847
|
productInfoText({ isPost }))),
|
8847
8848
|
React.createElement(Modal$1, { visible: showModal, onClose: () => setShowModal(false) }, productInfoText({ isPost: false }))));
|