pb-sxp-ui 1.0.40 → 1.0.42
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/LICENSE +21 -21
- package/README.md +111 -111
- package/dist/index.cjs +560 -156
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +56 -4
- package/dist/index.js +559 -156
- 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 +563 -160
- 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/DiyPortalPreview/PictureGroup.d.ts +13 -0
- package/es/core/components/DiyPortalPreview/PictureGroup.js +11 -0
- package/es/core/components/DiyPortalPreview/VideoWidget.d.ts +15 -0
- package/es/core/components/DiyPortalPreview/VideoWidget.js +236 -0
- package/es/core/components/DiyPortalPreview/index.d.ts +6 -0
- package/es/core/components/DiyPortalPreview/index.js +127 -0
- package/es/core/components/SxpPageCore/index.js +2 -2
- package/es/core/components/SxpPageRender/Nudge/index.js +6 -5
- package/es/core/components/SxpPageRender/PictureGroup/Picture.js +1 -0
- package/es/core/components/SxpPageRender/Tagbar.d.ts +7 -0
- package/es/core/components/SxpPageRender/Tagbar.js +37 -0
- package/es/core/components/SxpPageRender/VideoWidget/index.js +46 -79
- package/es/core/components/SxpPageRender/WaterFall/index.js +1 -1
- package/es/core/components/SxpPageRender/index.d.ts +2 -0
- package/es/core/components/SxpPageRender/index.js +22 -18
- package/es/core/context/SxpDataSourceProvider.d.ts +3 -0
- package/es/core/context/SxpDataSourceProvider.js +29 -5
- package/es/core/hooks/useEventReport.js +4 -4
- package/es/index.d.ts +1 -0
- package/es/index.js +1 -0
- package/es/materials/sxp/popup/CommodityDetail/index.js +10 -10
- package/es/materials/sxp/popup/CommodityDetailDiroNew/index.js +10 -10
- package/lib/core/components/DiyPortalPreview/PictureGroup.d.ts +13 -0
- package/lib/core/components/DiyPortalPreview/PictureGroup.js +14 -0
- package/lib/core/components/DiyPortalPreview/VideoWidget.d.ts +15 -0
- package/lib/core/components/DiyPortalPreview/VideoWidget.js +239 -0
- package/lib/core/components/DiyPortalPreview/index.d.ts +6 -0
- package/lib/core/components/DiyPortalPreview/index.js +130 -0
- package/lib/core/components/SxpPageCore/index.js +2 -2
- package/lib/core/components/SxpPageRender/Nudge/index.js +6 -5
- package/lib/core/components/SxpPageRender/PictureGroup/Picture.js +1 -0
- package/lib/core/components/SxpPageRender/Tagbar.d.ts +7 -0
- package/lib/core/components/SxpPageRender/Tagbar.js +40 -0
- package/lib/core/components/SxpPageRender/VideoWidget/index.js +46 -79
- package/lib/core/components/SxpPageRender/WaterFall/index.js +1 -1
- package/lib/core/components/SxpPageRender/index.d.ts +2 -0
- package/lib/core/components/SxpPageRender/index.js +22 -18
- package/lib/core/context/SxpDataSourceProvider.d.ts +3 -0
- package/lib/core/context/SxpDataSourceProvider.js +29 -5
- package/lib/core/hooks/useEventReport.js +4 -4
- package/lib/index.d.ts +1 -0
- package/lib/index.js +3 -1
- package/lib/materials/sxp/popup/CommodityDetail/index.js +10 -10
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.js +10 -10
- package/package.json +115 -114
@@ -12,7 +12,7 @@ const ExpandableText_1 = tslib_1.__importDefault(require("../../../../core/compo
|
|
12
12
|
const useEventReport_1 = require("../../../../core/hooks/useEventReport");
|
13
13
|
const FormatImage_1 = tslib_1.__importDefault(require("../../../../core/components/SxpPageRender/FormatImage"));
|
14
14
|
const CommodityDetailDiroNew = (_a) => {
|
15
|
-
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
15
|
+
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
16
16
|
var { style, isDefault, rec, viewTime, isPost, bottom_image, tipText, swiper, commodityStyles, buttonStyle, index } = _a, props = tslib_1.__rest(_a, ["style", "isDefault", "rec", "viewTime", "isPost", "bottom_image", "tipText", "swiper", "commodityStyles", "buttonStyle", "index"]);
|
17
17
|
const [spread, setSpread] = (0, react_1.useState)(true);
|
18
18
|
const { sxpParameter } = (0, hooks_1.useSxpDataSource)();
|
@@ -60,7 +60,7 @@ const CommodityDetailDiroNew = (_a) => {
|
|
60
60
|
return '£102,300.00';
|
61
61
|
}
|
62
62
|
}, [product === null || product === void 0 ? void 0 : product.price, product === null || product === void 0 ? void 0 : product.currency]);
|
63
|
-
const width = isPreview ? 375 : window.innerWidth;
|
63
|
+
const width = isPreview ? 375 : (_f = style === null || style === void 0 ? void 0 : style.width) !== null && _f !== void 0 ? _f : window.innerWidth;
|
64
64
|
const handleClickCollapse = () => {
|
65
65
|
setSpread(!spread);
|
66
66
|
};
|
@@ -86,12 +86,12 @@ const CommodityDetailDiroNew = (_a) => {
|
|
86
86
|
const productInfoText = ({ isPost }) => {
|
87
87
|
return (react_1.default.createElement("div", { hidden: !!product && (!(product === null || product === void 0 ? void 0 : product.info) || (product === null || product === void 0 ? void 0 : product.info) === '') },
|
88
88
|
react_1.default.createElement(ExpandableText_1.default, { 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) ||
|
89
|
-
`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
|
89
|
+
`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
|
90
90
|
Made in Italy` })));
|
91
91
|
};
|
92
92
|
return (react_1.default.createElement("div", { className: 'pb-commondityDiroNew' },
|
93
93
|
react_1.default.createElement("div", Object.assign({ ref: scrollRef, className: (0, css_1.css)(Object.assign({}, style)) }, props),
|
94
|
-
product && ((
|
94
|
+
product && ((_g = product === null || product === void 0 ? void 0 : product.homePage) === null || _g === void 0 ? void 0 : _g.length) > 0 && (react_1.default.createElement(react_2.Swiper, { height: width, modules: [modules_1.Pagination, modules_1.Autoplay], pagination: {
|
95
95
|
clickable: true,
|
96
96
|
bulletActiveClass: 'commondityDiroNew-swipe-item-active-bullet',
|
97
97
|
clickableClass: (swiper === null || swiper === void 0 ? void 0 : swiper.dotsAlign) === 'left'
|
@@ -99,7 +99,7 @@ Made in Italy` })));
|
|
99
99
|
: 'commondityDiroNew-swiper-clickable-center'
|
100
100
|
}, loop: true, autoplay: {
|
101
101
|
delay: (swiper === null || swiper === void 0 ? void 0 : swiper.delay) * 1000
|
102
|
-
} }, (
|
102
|
+
} }, (_h = product === null || product === void 0 ? void 0 : product.homePage) === null || _h === void 0 ? void 0 : _h.map((src) => {
|
103
103
|
return (react_1.default.createElement(react_2.SwiperSlide, { key: src },
|
104
104
|
react_1.default.createElement("div", { style: {
|
105
105
|
overflow: 'hidden',
|
@@ -108,7 +108,7 @@ Made in Italy` })));
|
|
108
108
|
} },
|
109
109
|
react_1.default.createElement(FormatImage_1.default, { style: { height: '100%', width: '100%', objectFit: 'cover', display: 'block' }, src: src }))));
|
110
110
|
}))),
|
111
|
-
!((
|
111
|
+
!((_j = product === null || product === void 0 ? void 0 : product.homePage) === null || _j === void 0 ? void 0 : _j.length) && (react_1.default.createElement("div", { className: (0, css_1.css)({
|
112
112
|
position: 'relative',
|
113
113
|
height: 0,
|
114
114
|
width: '100%',
|
@@ -121,16 +121,16 @@ Made in Italy` })));
|
|
121
121
|
top: 0,
|
122
122
|
objectFit: 'cover',
|
123
123
|
width: '100%'
|
124
|
-
}), src: (
|
124
|
+
}), src: (_k = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _k !== void 0 ? _k : bottom_image, alt: '' }))),
|
125
125
|
react_1.default.createElement("div", { className: 'pb-commondityDiroNew-content' },
|
126
126
|
react_1.default.createElement("div", { className: 'pb-commondityDiroNew-content-top' },
|
127
127
|
react_1.default.createElement("div", { className: 'pb-commondityDiroNew-content-top-left' },
|
128
|
-
react_1.default.createElement("div", { className: 'pb-commondityDiroNew-content-top-left-title', style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.title }, (
|
128
|
+
react_1.default.createElement("div", { className: 'pb-commondityDiroNew-content-top-left-title', style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.title }, (_l = product === null || product === void 0 ? void 0 : product.title) !== null && _l !== void 0 ? _l : 'Large Dior Toujours Bag'),
|
129
129
|
react_1.default.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')),
|
130
130
|
react_1.default.createElement("div", { className: 'pb-commondityDiroNew-content-top-right' },
|
131
131
|
react_1.default.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),
|
132
|
-
react_1.default.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 }, (
|
133
|
-
(!product || (product === null || product === void 0 ? void 0 : product.link)) && (react_1.default.createElement("button", { onClick: handleLink, className: 'pb-commondityDiroNew-btn', style: buttonStyle }, (
|
132
|
+
react_1.default.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 }, (_m = product === null || product === void 0 ? void 0 : product.taxInfo) !== null && _m !== void 0 ? _m : '税费'))),
|
133
|
+
(!product || (product === null || product === void 0 ? void 0 : product.link)) && (react_1.default.createElement("button", { onClick: handleLink, className: 'pb-commondityDiroNew-btn', style: buttonStyle }, (_o = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _o !== void 0 ? _o : 'Shop now')),
|
134
134
|
productInfoText({ isPost }))),
|
135
135
|
react_1.default.createElement(Modal_1.default, { visible: showModal, onClose: () => setShowModal(false) }, productInfoText({ isPost: false }))));
|
136
136
|
};
|
package/package.json
CHANGED
@@ -1,114 +1,115 @@
|
|
1
|
-
{
|
2
|
-
"name": "pb-sxp-ui",
|
3
|
-
"version": "1.0.
|
4
|
-
"description": "React enterprise-class UI components",
|
5
|
-
"main": "dist/index.cjs",
|
6
|
-
"module": "dist/index.js",
|
7
|
-
"unpkg": "dist/pb-ui.min.js",
|
8
|
-
"typings": "es/index.d.ts",
|
9
|
-
"type": "module",
|
10
|
-
"scripts": {
|
11
|
-
"prebuild": "rimraf lib && rimraf es && rimraf dist",
|
12
|
-
"build": "tsc --build tsconfig.es.json && tsc --build tsconfig.cjs.json",
|
13
|
-
"postbuild": "tsc-alias -p tsconfig.es.json && tsc-alias -p tsconfig.cjs.json",
|
14
|
-
"package": "npm run build && cross-env NODE_ENV=production rollup -c --configPlugin typescript",
|
15
|
-
"start": "npm run build && cross-env NODE_ENV=development rollup -w -c",
|
16
|
-
"lint": "eslint .",
|
17
|
-
"lint:fix": "eslint --fix .",
|
18
|
-
"dev": "rollup -w -c",
|
19
|
-
"dev:package": "npm run build && rollup -w -c",
|
20
|
-
"pub": "zx ./scripts/publish.mjs"
|
21
|
-
},
|
22
|
-
"files": [
|
23
|
-
"dist",
|
24
|
-
"lib",
|
25
|
-
"es",
|
26
|
-
"package.json",
|
27
|
-
"README.md"
|
28
|
-
],
|
29
|
-
"keywords": [
|
30
|
-
"antd",
|
31
|
-
"react",
|
32
|
-
"react-component",
|
33
|
-
"ui",
|
34
|
-
"component",
|
35
|
-
"components"
|
36
|
-
],
|
37
|
-
"author": "frontend@chatlabs.cn",
|
38
|
-
"license": "MIT",
|
39
|
-
"dependencies": {
|
40
|
-
"@ant-design/pro-components": "^2.6.35",
|
41
|
-
"@emotion/css": "^11.11.2",
|
42
|
-
"antd": "^5.15.3",
|
43
|
-
"eslint": "^8.48.0",
|
44
|
-
"eventemitter3": "^5.0.1",
|
45
|
-
"
|
46
|
-
"
|
47
|
-
"
|
48
|
-
"
|
49
|
-
"
|
50
|
-
"
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
"@babel/
|
55
|
-
"@babel/
|
56
|
-
"@
|
57
|
-
"@rollup/plugin-
|
58
|
-
"@rollup/plugin-
|
59
|
-
"@rollup/plugin-
|
60
|
-
"@rollup/plugin-
|
61
|
-
"@rollup/plugin-
|
62
|
-
"@rollup/plugin-
|
63
|
-
"@rollup/plugin-
|
64
|
-
"@rollup/plugin-
|
65
|
-
"@
|
66
|
-
"@
|
67
|
-
"@types/
|
68
|
-
"@types/
|
69
|
-
"@types/
|
70
|
-
"@types/
|
71
|
-
"@types/
|
72
|
-
"@types/react
|
73
|
-
"@types/
|
74
|
-
"@
|
75
|
-
"@typescript-eslint/
|
76
|
-
"
|
77
|
-
"
|
78
|
-
"
|
79
|
-
"
|
80
|
-
"
|
81
|
-
"eslint-config-standard
|
82
|
-
"eslint-
|
83
|
-
"eslint-plugin-
|
84
|
-
"eslint-plugin-
|
85
|
-
"eslint-plugin-
|
86
|
-
"eslint-plugin-react
|
87
|
-
"eslint-plugin-
|
88
|
-
"
|
89
|
-
"
|
90
|
-
"
|
91
|
-
"react
|
92
|
-
"
|
93
|
-
"
|
94
|
-
"rollup
|
95
|
-
"rollup-plugin-
|
96
|
-
"rollup-plugin-
|
97
|
-
"
|
98
|
-
"
|
99
|
-
"
|
100
|
-
"
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
"react
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
"
|
109
|
-
"
|
110
|
-
"
|
111
|
-
"
|
112
|
-
"
|
113
|
-
|
114
|
-
|
1
|
+
{
|
2
|
+
"name": "pb-sxp-ui",
|
3
|
+
"version": "1.0.42",
|
4
|
+
"description": "React enterprise-class UI components",
|
5
|
+
"main": "dist/index.cjs",
|
6
|
+
"module": "dist/index.js",
|
7
|
+
"unpkg": "dist/pb-ui.min.js",
|
8
|
+
"typings": "es/index.d.ts",
|
9
|
+
"type": "module",
|
10
|
+
"scripts": {
|
11
|
+
"prebuild": "rimraf lib && rimraf es && rimraf dist",
|
12
|
+
"build": "tsc --build tsconfig.es.json && tsc --build tsconfig.cjs.json",
|
13
|
+
"postbuild": "tsc-alias -p tsconfig.es.json && tsc-alias -p tsconfig.cjs.json",
|
14
|
+
"package": "npm run build && cross-env NODE_ENV=production rollup -c --configPlugin typescript",
|
15
|
+
"start": "npm run build && cross-env NODE_ENV=development rollup -w -c",
|
16
|
+
"lint": "eslint .",
|
17
|
+
"lint:fix": "eslint --fix .",
|
18
|
+
"dev": "rollup -w -c",
|
19
|
+
"dev:package": "npm run build && rollup -w -c",
|
20
|
+
"pub": "zx ./scripts/publish.mjs"
|
21
|
+
},
|
22
|
+
"files": [
|
23
|
+
"dist",
|
24
|
+
"lib",
|
25
|
+
"es",
|
26
|
+
"package.json",
|
27
|
+
"README.md"
|
28
|
+
],
|
29
|
+
"keywords": [
|
30
|
+
"antd",
|
31
|
+
"react",
|
32
|
+
"react-component",
|
33
|
+
"ui",
|
34
|
+
"component",
|
35
|
+
"components"
|
36
|
+
],
|
37
|
+
"author": "frontend@chatlabs.cn",
|
38
|
+
"license": "MIT",
|
39
|
+
"dependencies": {
|
40
|
+
"@ant-design/pro-components": "^2.6.35",
|
41
|
+
"@emotion/css": "^11.11.2",
|
42
|
+
"antd": "^5.15.3",
|
43
|
+
"eslint": "^8.48.0",
|
44
|
+
"eventemitter3": "^5.0.1",
|
45
|
+
"hls.js": "^1.5.8",
|
46
|
+
"less": "^4.2.0",
|
47
|
+
"lodash": "^4.17.21",
|
48
|
+
"pako": "^2.1.0",
|
49
|
+
"qs": "^6.11.2",
|
50
|
+
"swiper": "^11.0.3",
|
51
|
+
"uuid": "^9.0.1"
|
52
|
+
},
|
53
|
+
"devDependencies": {
|
54
|
+
"@babel/core": "^7.22.11",
|
55
|
+
"@babel/plugin-transform-runtime": "^7.22.10",
|
56
|
+
"@babel/preset-env": "^7.22.10",
|
57
|
+
"@rollup/plugin-alias": "^5.0.0",
|
58
|
+
"@rollup/plugin-babel": "^6.0.3",
|
59
|
+
"@rollup/plugin-commonjs": "^25.0.4",
|
60
|
+
"@rollup/plugin-eslint": "^9.0.4",
|
61
|
+
"@rollup/plugin-image": "^3.0.2",
|
62
|
+
"@rollup/plugin-json": "^6.0.0",
|
63
|
+
"@rollup/plugin-node-resolve": "^15.2.0",
|
64
|
+
"@rollup/plugin-typescript": "^11.1.2",
|
65
|
+
"@rollup/plugin-url": "^8.0.1",
|
66
|
+
"@svgr/rollup": "^8.1.0",
|
67
|
+
"@types/crypto-js": "^4.1.3",
|
68
|
+
"@types/lodash": "^4.14.198",
|
69
|
+
"@types/node": "^20.5.3",
|
70
|
+
"@types/pako": "^2.0.3",
|
71
|
+
"@types/qs": "^6.9.8",
|
72
|
+
"@types/react": "^18.2.21",
|
73
|
+
"@types/react-dom": "^18.2.14",
|
74
|
+
"@types/uuid": "^9.0.7",
|
75
|
+
"@typescript-eslint/eslint-plugin": "^6.6.0",
|
76
|
+
"@typescript-eslint/parser": "^6.6.0",
|
77
|
+
"autoprefixer": "^10.4.15",
|
78
|
+
"cross-env": "^7.0.3",
|
79
|
+
"cssnano": "^6.0.1",
|
80
|
+
"esbuild": "^0.19.2",
|
81
|
+
"eslint-config-standard": "^17.1.0",
|
82
|
+
"eslint-config-standard-react": "^13.0.0",
|
83
|
+
"eslint-plugin-import": "^2.28.1",
|
84
|
+
"eslint-plugin-n": "^16.0.2",
|
85
|
+
"eslint-plugin-promise": "^6.1.1",
|
86
|
+
"eslint-plugin-react": "^7.33.2",
|
87
|
+
"eslint-plugin-react-hooks": "^4.6.0",
|
88
|
+
"eslint-plugin-unused-imports": "^3.0.0",
|
89
|
+
"postcss": "^8.4.28",
|
90
|
+
"querystring": "^0.2.1",
|
91
|
+
"react": "^18.2.0",
|
92
|
+
"react-dom": "^18.2.0",
|
93
|
+
"rimraf": "^5.0.1",
|
94
|
+
"rollup": "^3.28.1",
|
95
|
+
"rollup-plugin-esbuild": "^5.0.0",
|
96
|
+
"rollup-plugin-postcss": "^4.0.2",
|
97
|
+
"rollup-plugin-terser": "^7.0.2",
|
98
|
+
"tsc-alias": "^1.8.7",
|
99
|
+
"tslib": "^2.6.2",
|
100
|
+
"typescript": "^5.1.6",
|
101
|
+
"zx": "^7.2.3"
|
102
|
+
},
|
103
|
+
"peerDependencies": {
|
104
|
+
"react": ">=16.9.0",
|
105
|
+
"react-dom": ">=16.9.0"
|
106
|
+
},
|
107
|
+
"browserslist": [
|
108
|
+
"defaults",
|
109
|
+
"not ie < 8",
|
110
|
+
"last 2 versions",
|
111
|
+
"> 1%",
|
112
|
+
"iOS 7",
|
113
|
+
"last 3 iOS versions"
|
114
|
+
]
|
115
|
+
}
|