pb-sxp-ui 1.0.69 → 1.0.71
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 +301 -174
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +1 -2
- package/dist/index.js +301 -174
- 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 +304 -177
- 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/VideoWidget.js +3 -2
- package/es/core/components/SxpPageCore/index.js +2 -2
- package/es/core/components/SxpPageRender/FingerSwipeTip/index.d.ts +2 -1
- package/es/core/components/SxpPageRender/FingerSwipeTip/index.js +2 -2
- package/es/core/components/SxpPageRender/FormatImage.js +1 -2
- package/es/core/components/SxpPageRender/Nudge/index.js +2 -2
- package/es/core/components/SxpPageRender/VideoWidget/index.js +1 -1
- package/es/core/components/SxpPageRender/WaterFall/List.js +5 -9
- package/es/core/components/SxpPageRender/index.d.ts +5 -0
- package/es/core/components/SxpPageRender/index.js +21 -24
- package/es/core/components/SxpPageRender/typing.d.ts +1 -0
- package/es/core/context/SxpDataSourceProvider.d.ts +0 -1
- package/es/core/context/SxpDataSourceProvider.js +12 -4
- package/es/materials/sxp/HashTag/settingRender.d.ts +2 -7
- package/es/materials/sxp/HashTag/settingRender.js +0 -5
- package/es/materials/sxp/defaultSetting.d.ts +1 -4
- package/es/materials/sxp/defaultSetting.js +4 -5
- package/es/materials/sxp/popup/AppointForm/index.d.ts +2 -1
- package/es/materials/sxp/popup/AppointForm/index.js +3 -8
- package/es/materials/sxp/popup/AppointForm/settingRender.d.ts +29 -8
- package/es/materials/sxp/popup/AppointForm/settingRender.js +33 -2
- package/es/materials/sxp/popup/CommodityDetail/index.d.ts +1 -0
- package/es/materials/sxp/popup/CommodityDetail/index.js +7 -1
- package/es/materials/sxp/popup/CommodityDetail/material.js +5 -2
- package/es/materials/sxp/popup/CommodityDetail/settingRender.d.ts +28 -0
- package/es/materials/sxp/popup/CommodityDetail/settingRender.js +30 -0
- package/es/materials/sxp/popup/CommodityDetailDiroNew/index.d.ts +1 -0
- package/es/materials/sxp/popup/CommodityDetailDiroNew/index.js +7 -1
- package/es/materials/sxp/popup/CommodityDetailDiroNew/settingRender.d.ts +16 -0
- package/es/materials/sxp/popup/CommodityDetailDiroNew/settingRender.js +13 -0
- package/es/materials/sxp/popup/Prompt/index.d.ts +2 -1
- package/es/materials/sxp/popup/Prompt/index.js +2 -2
- package/es/materials/sxp/popup/Prompt/settingRender.d.ts +46 -11
- package/es/materials/sxp/popup/Prompt/settingRender.js +57 -14
- package/es/materials/sxp/template/Commodity/index.d.ts +1 -0
- package/es/materials/sxp/template/Commodity/index.js +12 -6
- package/es/materials/sxp/template/CommodityDiro/index.d.ts +1 -0
- package/es/materials/sxp/template/CommodityDiro/index.js +12 -6
- package/es/materials/sxp/template/CommodityDiroNew/index.d.ts +1 -0
- package/es/materials/sxp/template/CommodityDiroNew/index.js +12 -6
- package/es/materials/sxp/template/MultiCommodity/index.d.ts +1 -0
- package/es/materials/sxp/template/MultiCommodity/index.js +7 -5
- package/es/materials/sxp/template/MultiCommodityDiro/index.d.ts +1 -0
- package/es/materials/sxp/template/MultiCommodityDiro/index.js +7 -5
- package/es/materials/sxp/template/MultiCommodityDiroNew/index.d.ts +1 -0
- package/es/materials/sxp/template/MultiCommodityDiroNew/index.js +7 -5
- package/es/materials/sxp/template/components/Img.d.ts +2 -1
- package/es/materials/sxp/template/components/Img.js +2 -2
- package/es/materials/sxp/template/components/settingRender.d.ts +50 -0
- package/es/materials/sxp/template/components/settingRender.js +8 -0
- package/lib/core/components/DiyPortalPreview/VideoWidget.js +3 -2
- package/lib/core/components/SxpPageCore/index.js +2 -2
- package/lib/core/components/SxpPageRender/FingerSwipeTip/index.d.ts +2 -1
- package/lib/core/components/SxpPageRender/FingerSwipeTip/index.js +2 -2
- package/lib/core/components/SxpPageRender/FormatImage.js +0 -1
- package/lib/core/components/SxpPageRender/Nudge/index.js +2 -2
- package/lib/core/components/SxpPageRender/VideoWidget/index.js +1 -1
- package/lib/core/components/SxpPageRender/WaterFall/List.js +5 -9
- package/lib/core/components/SxpPageRender/index.d.ts +5 -0
- package/lib/core/components/SxpPageRender/index.js +21 -24
- package/lib/core/components/SxpPageRender/typing.d.ts +1 -0
- package/lib/core/context/SxpDataSourceProvider.d.ts +0 -1
- package/lib/core/context/SxpDataSourceProvider.js +12 -4
- package/lib/materials/sxp/HashTag/settingRender.d.ts +2 -7
- package/lib/materials/sxp/HashTag/settingRender.js +0 -5
- package/lib/materials/sxp/defaultSetting.d.ts +1 -4
- package/lib/materials/sxp/defaultSetting.js +4 -5
- package/lib/materials/sxp/popup/AppointForm/index.d.ts +2 -1
- package/lib/materials/sxp/popup/AppointForm/index.js +3 -8
- package/lib/materials/sxp/popup/AppointForm/settingRender.d.ts +29 -8
- package/lib/materials/sxp/popup/AppointForm/settingRender.js +34 -2
- package/lib/materials/sxp/popup/CommodityDetail/index.d.ts +1 -0
- package/lib/materials/sxp/popup/CommodityDetail/index.js +7 -1
- package/lib/materials/sxp/popup/CommodityDetail/material.js +5 -2
- package/lib/materials/sxp/popup/CommodityDetail/settingRender.d.ts +28 -0
- package/lib/materials/sxp/popup/CommodityDetail/settingRender.js +30 -0
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.d.ts +1 -0
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.js +7 -1
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/settingRender.d.ts +16 -0
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/settingRender.js +13 -0
- package/lib/materials/sxp/popup/Prompt/index.d.ts +2 -1
- package/lib/materials/sxp/popup/Prompt/index.js +2 -2
- package/lib/materials/sxp/popup/Prompt/settingRender.d.ts +46 -11
- package/lib/materials/sxp/popup/Prompt/settingRender.js +58 -14
- package/lib/materials/sxp/template/Commodity/index.d.ts +1 -0
- package/lib/materials/sxp/template/Commodity/index.js +12 -6
- package/lib/materials/sxp/template/CommodityDiro/index.d.ts +1 -0
- package/lib/materials/sxp/template/CommodityDiro/index.js +12 -6
- package/lib/materials/sxp/template/CommodityDiroNew/index.d.ts +1 -0
- package/lib/materials/sxp/template/CommodityDiroNew/index.js +12 -6
- package/lib/materials/sxp/template/MultiCommodity/index.d.ts +1 -0
- package/lib/materials/sxp/template/MultiCommodity/index.js +7 -5
- package/lib/materials/sxp/template/MultiCommodityDiro/index.d.ts +1 -0
- package/lib/materials/sxp/template/MultiCommodityDiro/index.js +7 -5
- package/lib/materials/sxp/template/MultiCommodityDiroNew/index.d.ts +1 -0
- package/lib/materials/sxp/template/MultiCommodityDiroNew/index.js +7 -5
- package/lib/materials/sxp/template/components/Img.d.ts +2 -1
- package/lib/materials/sxp/template/components/Img.js +2 -2
- package/lib/materials/sxp/template/components/settingRender.d.ts +50 -0
- package/lib/materials/sxp/template/components/settingRender.js +8 -0
- package/package.json +2 -3
@@ -12,7 +12,7 @@ const hooks_1 = require("../../../../core/hooks");
|
|
12
12
|
const useEventReport_1 = require("../../../../core/hooks/useEventReport");
|
13
13
|
const MultiCommodityDiroNew = (_a) => {
|
14
14
|
var _b, _c;
|
15
|
-
var { content, style, bgImg, recData, onClick, bottom_image, ctaTempStyles, isExternalLink, index } = _a, props = tslib_1.__rest(_a, ["content", "style", "bgImg", "recData", "onClick", "bottom_image", "ctaTempStyles", "isExternalLink", "index"]);
|
15
|
+
var { content, style, bgImg, recData, onClick, bottom_image, ctaTempStyles, isExternalLink, index, translateY = 0 } = _a, props = tslib_1.__rest(_a, ["content", "style", "bgImg", "recData", "onClick", "bottom_image", "ctaTempStyles", "isExternalLink", "index", "translateY"]);
|
16
16
|
const { ctaEvent, setPopupDetailData, sxpParameter } = (0, hooks_1.useSxpDataSource)();
|
17
17
|
const { popup } = (0, hooks_1.useEditor)();
|
18
18
|
const { jumpToWeb } = (0, useEventReport_1.useEventReport)();
|
@@ -34,10 +34,12 @@ const MultiCommodityDiroNew = (_a) => {
|
|
34
34
|
}
|
35
35
|
}, popup === null || popup === void 0 ? void 0 : popup.duration);
|
36
36
|
return (react_1.default.createElement(Scroll_1.default, { isPadding: !!recData }, products === null || products === void 0 ? void 0 : products.map((item) => {
|
37
|
-
var _a, _b, _c, _d, _e, _f;
|
37
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
38
38
|
return (react_1.default.createElement(react_2.SwiperSlide, Object.assign({ hidden: recData && !(item === null || item === void 0 ? void 0 : item.bindCta), key: item === null || item === void 0 ? void 0 : item.itemId, className: (0, css_1.css)(Object.assign(Object.assign({}, style), { display: 'flex', flexShrink: 0, marginLeft: 0, marginRight: '8px' })) }, props, { onClick: () => handleClick(item) }),
|
39
39
|
react_1.default.createElement("div", { className: (0, css_1.css)(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
|
40
|
-
react_1.default.createElement(Img_1.default, { src: (
|
40
|
+
react_1.default.createElement(Img_1.default, { src: (_d = (_c = (_a = item === null || item === void 0 ? void 0 : item.cover) !== null && _a !== void 0 ? _a : (_b = item === null || item === void 0 ? void 0 : item.homePage) === null || _b === void 0 ? void 0 : _b[0]) !== null && _c !== void 0 ? _c : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _d !== void 0 ? _d : bottom_image, rec: recData, item: item, index: index, style: {
|
41
|
+
transform: `translateY(${translateY}%)`
|
42
|
+
} })),
|
41
43
|
react_1.default.createElement("div", { className: (0, css_1.css)({
|
42
44
|
color: '#fff',
|
43
45
|
display: 'flex',
|
@@ -47,8 +49,8 @@ const MultiCommodityDiroNew = (_a) => {
|
|
47
49
|
overflow: 'hidden',
|
48
50
|
lineHeight: '20px'
|
49
51
|
}) },
|
50
|
-
react_1.default.createElement("div", { className: index_module_less_1.default['tow-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title }, (
|
51
|
-
react_1.default.createElement("div", { className: (0, css_1.css)(Object.assign({ textOverflow: 'ellipsis', overflow: 'hidden', whiteSpace: 'nowrap' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)) }, (
|
52
|
+
react_1.default.createElement("div", { className: index_module_less_1.default['tow-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title }, (_e = item === null || item === void 0 ? void 0 : item.title) !== null && _e !== void 0 ? _e : 'Product Name'),
|
53
|
+
react_1.default.createElement("div", { className: (0, css_1.css)(Object.assign({ textOverflow: 'ellipsis', overflow: 'hidden', whiteSpace: 'nowrap' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)) }, (_g = (_f = item === null || item === void 0 ? void 0 : item.bindCta) === null || _f === void 0 ? void 0 : _f.enTitle) !== null && _g !== void 0 ? _g : 'Shop now'))));
|
52
54
|
})));
|
53
55
|
};
|
54
56
|
exports.default = (0, react_1.memo)(MultiCommodityDiroNew);
|
@@ -1,10 +1,11 @@
|
|
1
|
-
import React from 'react';
|
1
|
+
import React, { CSSProperties } from 'react';
|
2
2
|
import { ProductInfoType, RecItemType } from '../../../../core/components/SxpPageRender/typing';
|
3
3
|
export interface IImgProps {
|
4
4
|
src: string;
|
5
5
|
rec?: RecItemType;
|
6
6
|
item?: ProductInfoType;
|
7
7
|
index?: number;
|
8
|
+
style?: CSSProperties;
|
8
9
|
}
|
9
10
|
declare const _default: React.NamedExoticComponent<IImgProps>;
|
10
11
|
export default _default;
|
@@ -6,7 +6,7 @@ const react_1 = tslib_1.__importStar(require("react"));
|
|
6
6
|
const useOnScreen_1 = tslib_1.__importDefault(require("../../../../core/hooks/useOnScreen"));
|
7
7
|
const hooks_1 = require("../../../../core/hooks");
|
8
8
|
const FormatImage_1 = tslib_1.__importDefault(require("../../../../core/components/SxpPageRender/FormatImage"));
|
9
|
-
const Img = ({ src, rec, item, index }) => {
|
9
|
+
const Img = ({ src, rec, item, index, style }) => {
|
10
10
|
const ref = (0, react_1.useRef)(null);
|
11
11
|
const isOnScreen = (0, useOnScreen_1.default)(ref);
|
12
12
|
const { ctaEvent } = (0, hooks_1.useSxpDataSource)();
|
@@ -19,6 +19,6 @@ const Img = ({ src, rec, item, index }) => {
|
|
19
19
|
}
|
20
20
|
}, [isOnScreen, src, ref, rec, ctaEvent, item, index]);
|
21
21
|
return (react_1.default.createElement("div", { ref: ref, hidden: !src, className: (0, css_1.css)({ width: '100%', height: '100%' }) },
|
22
|
-
react_1.default.createElement(FormatImage_1.default, { className: (0, css_1.css)({ width: '100%', objectFit: 'cover', height: '100%', display: 'block' }), src: src })));
|
22
|
+
react_1.default.createElement(FormatImage_1.default, { className: (0, css_1.css)(Object.assign({ width: '100%', objectFit: 'cover', height: '100%', display: 'block' }, style)), src: src })));
|
23
23
|
};
|
24
24
|
exports.default = (0, react_1.memo)(Img);
|
@@ -40,6 +40,56 @@ declare const _default: ({
|
|
40
40
|
child?: undefined;
|
41
41
|
})[];
|
42
42
|
type?: undefined;
|
43
|
+
} | {
|
44
|
+
title: string;
|
45
|
+
child: ({
|
46
|
+
type: string;
|
47
|
+
label: string;
|
48
|
+
child: {
|
49
|
+
type: string;
|
50
|
+
name: string[];
|
51
|
+
addonAfter: string;
|
52
|
+
}[];
|
53
|
+
addonAfter?: undefined;
|
54
|
+
name?: undefined;
|
55
|
+
min?: undefined;
|
56
|
+
initialValue?: undefined;
|
57
|
+
} | {
|
58
|
+
type: string;
|
59
|
+
label: string;
|
60
|
+
child: ({
|
61
|
+
type: string;
|
62
|
+
name: string[];
|
63
|
+
max: number;
|
64
|
+
addonAfter?: undefined;
|
65
|
+
} | {
|
66
|
+
type: string;
|
67
|
+
name: string[];
|
68
|
+
addonAfter: string;
|
69
|
+
max: number;
|
70
|
+
})[];
|
71
|
+
addonAfter?: undefined;
|
72
|
+
name?: undefined;
|
73
|
+
min?: undefined;
|
74
|
+
initialValue?: undefined;
|
75
|
+
} | {
|
76
|
+
type: string;
|
77
|
+
label: string;
|
78
|
+
addonAfter: string;
|
79
|
+
name: string[];
|
80
|
+
child?: undefined;
|
81
|
+
min?: undefined;
|
82
|
+
initialValue?: undefined;
|
83
|
+
} | {
|
84
|
+
label: string;
|
85
|
+
type: string;
|
86
|
+
name: string[];
|
87
|
+
min: number;
|
88
|
+
addonAfter: string;
|
89
|
+
initialValue: number;
|
90
|
+
child?: undefined;
|
91
|
+
})[];
|
92
|
+
type?: undefined;
|
43
93
|
} | {
|
44
94
|
title: string;
|
45
95
|
type: string;
|
@@ -99,6 +99,14 @@ exports.default = [
|
|
99
99
|
label: '与右侧边距',
|
100
100
|
addonAfter: 'px',
|
101
101
|
name: ['props', 'ctaTempStyles', 'img', 'marginRight']
|
102
|
+
},
|
103
|
+
{
|
104
|
+
label: '居中垂直偏移',
|
105
|
+
type: 'Number',
|
106
|
+
name: ['props', 'translateY'],
|
107
|
+
min: -100,
|
108
|
+
addonAfter: '%',
|
109
|
+
initialValue: 0
|
102
110
|
}
|
103
111
|
]
|
104
112
|
},
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "pb-sxp-ui",
|
3
|
-
"version": "1.0.
|
3
|
+
"version": "1.0.71",
|
4
4
|
"description": "React enterprise-class UI components",
|
5
5
|
"main": "dist/index.cjs",
|
6
6
|
"module": "dist/index.js",
|
@@ -37,11 +37,10 @@
|
|
37
37
|
"author": "frontend@chatlabs.cn",
|
38
38
|
"license": "MIT",
|
39
39
|
"dependencies": {
|
40
|
-
"@ant-design/pro-components": "^2.6.35",
|
41
40
|
"@emotion/css": "^11.11.2",
|
42
|
-
"antd": "^5.15.3",
|
43
41
|
"eslint": "^8.48.0",
|
44
42
|
"eventemitter3": "^5.0.1",
|
43
|
+
"hls.js": "^1.5.8",
|
45
44
|
"less": "^4.2.0",
|
46
45
|
"lodash": "^4.17.21",
|
47
46
|
"pako": "^2.1.0",
|