pb-sxp-ui 1.0.72 → 1.0.73
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 +28 -26
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +28 -26
- 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 +31 -30
- 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/FormatImage.js +7 -2
- package/es/core/components/SxpPageRender/Popup/index.js +2 -2
- package/es/materials/sxp/popup/AppointForm/index.js +3 -1
- package/es/materials/sxp/popup/AppointForm/settingRender.js +0 -5
- package/es/materials/sxp/popup/CommodityDetail/index.js +1 -1
- package/es/materials/sxp/popup/CommodityDetail/settingRender.js +1 -1
- package/es/materials/sxp/popup/CommodityDetailDiro/index.js +2 -3
- package/es/materials/sxp/popup/CommodityDetailDiroNew/index.js +1 -1
- package/es/materials/sxp/popup/CommodityDetailDiroNew/settingRender.js +1 -1
- package/es/materials/sxp/template/Commodity/index.js +1 -1
- package/es/materials/sxp/template/CommodityDiro/index.js +1 -1
- package/es/materials/sxp/template/CommodityDiroNew/index.js +1 -1
- package/es/materials/sxp/template/MultiCommodity/index.js +1 -1
- package/es/materials/sxp/template/MultiCommodityDiro/index.js +1 -1
- package/es/materials/sxp/template/MultiCommodityDiroNew/index.js +1 -1
- package/es/materials/sxp/template/components/settingRender.js +1 -1
- package/lib/core/components/SxpPageRender/FormatImage.js +7 -2
- package/lib/core/components/SxpPageRender/Popup/index.js +2 -2
- package/lib/materials/sxp/popup/AppointForm/index.js +3 -1
- package/lib/materials/sxp/popup/AppointForm/settingRender.js +0 -5
- package/lib/materials/sxp/popup/CommodityDetail/index.js +1 -1
- package/lib/materials/sxp/popup/CommodityDetail/settingRender.js +1 -1
- package/lib/materials/sxp/popup/CommodityDetailDiro/index.js +2 -3
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.js +1 -1
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/settingRender.js +1 -1
- package/lib/materials/sxp/template/Commodity/index.js +1 -1
- package/lib/materials/sxp/template/CommodityDiro/index.js +1 -1
- package/lib/materials/sxp/template/CommodityDiroNew/index.js +1 -1
- package/lib/materials/sxp/template/MultiCommodity/index.js +1 -1
- package/lib/materials/sxp/template/MultiCommodityDiro/index.js +1 -1
- package/lib/materials/sxp/template/MultiCommodityDiroNew/index.js +1 -1
- package/lib/materials/sxp/template/components/settingRender.js +1 -1
- package/package.json +3 -1
@@ -1,15 +1,20 @@
|
|
1
1
|
import React, { forwardRef, memo, useEffect, useImperativeHandle, useRef, useState } from 'react';
|
2
|
+
import { useSxpDataSource } from '../../../core/hooks';
|
2
3
|
const FormatImage = forwardRef((props, ref) => {
|
3
4
|
const { src, onLoad, style, className, loading } = props;
|
4
5
|
const [imgSrc, setImgSrc] = useState();
|
6
|
+
const { swiperRef } = useSxpDataSource();
|
5
7
|
useImperativeHandle(ref, () => ({
|
6
8
|
setSrc: (v) => {
|
7
9
|
setImgSrc(v);
|
8
10
|
}
|
9
11
|
}));
|
10
12
|
useEffect(() => {
|
11
|
-
|
12
|
-
|
13
|
+
var _a, _b;
|
14
|
+
const index = (_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.activeIndex;
|
15
|
+
if (index === 0 || index > 0)
|
16
|
+
setImgSrc(src);
|
17
|
+
}, [src, swiperRef]);
|
13
18
|
const imgRef = useRef(null);
|
14
19
|
return (React.createElement(React.Fragment, null, (imgSrc === null || imgSrc === void 0 ? void 0 : imgSrc.includes('.avif')) ? (React.createElement("picture", null,
|
15
20
|
React.createElement("source", { type: 'image/avif', srcSet: imgSrc }),
|
@@ -45,14 +45,14 @@ const Popup = () => {
|
|
45
45
|
const renderPopupDetail = useMemo(() => {
|
46
46
|
var _a, _b, _c;
|
47
47
|
return (_c = (_b = (_a = schema === null || schema === void 0 ? void 0 : schema.sxpPageConf) === null || _a === void 0 ? void 0 : _a.globalConfig) === null || _b === void 0 ? void 0 : _b.popupList) === null || _c === void 0 ? void 0 : _c.map((value, index) => {
|
48
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
48
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
49
49
|
if ((value === null || value === void 0 ? void 0 : value.id) === (popup === null || popup === void 0 ? void 0 : popup.id)) {
|
50
50
|
const t = resolver[(_a = value === null || value === void 0 ? void 0 : value.item) === null || _a === void 0 ? void 0 : _a.type];
|
51
51
|
const Component = withBindDataSource(t);
|
52
52
|
const isExternalLink = ((_d = (_c = (_b = value === null || value === void 0 ? void 0 : value.item) === null || _b === void 0 ? void 0 : _b.event) === null || _c === void 0 ? void 0 : _c.onClick) === null || _d === void 0 ? void 0 : _d.linkType) === 'externalLink';
|
53
53
|
const isPopup = ((_g = (_f = (_e = value === null || value === void 0 ? void 0 : value.item) === null || _e === void 0 ? void 0 : _e.event) === null || _f === void 0 ? void 0 : _f.onClick) === null || _g === void 0 ? void 0 : _g.linkType) === 'popup';
|
54
54
|
const defaulSetting = (_h = t === null || t === void 0 ? void 0 : t.extend) === null || _h === void 0 ? void 0 : _h.defaulSetting;
|
55
|
-
return (React.createElement(Component, Object.assign({ key: index, style: Object.assign(Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.style), (_j = value === null || value === void 0 ? void 0 : value.item) === null || _j === void 0 ? void 0 : _j.style), { width: '
|
55
|
+
return (React.createElement(Component, Object.assign({ key: index, style: Object.assign(Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.style), (_j = value === null || value === void 0 ? void 0 : value.item) === null || _j === void 0 ? void 0 : _j.style), { width: (_k = window.innerWidth) !== null && _k !== void 0 ? _k : '100vw', height: '80vh', overflow: 'auto' }), textStyle: Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.textStyle), (_l = value === null || value === void 0 ? void 0 : value.item) === null || _l === void 0 ? void 0 : _l.textStyle), bindDatas: (_o = (_m = value === null || value === void 0 ? void 0 : value.item) === null || _m === void 0 ? void 0 : _m.bindDatas) !== null && _o !== void 0 ? _o : [] }, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.props, (_p = value === null || value === void 0 ? void 0 : value.item) === null || _p === void 0 ? void 0 : _p.props, { event: ((_q = value === null || value === void 0 ? void 0 : value.item) === null || _q === void 0 ? void 0 : _q.event) || {}, schema: schema, id: value === null || value === void 0 ? void 0 : value.id, isExternalLink: isExternalLink, isPopup: isPopup, onClose: handleClose })));
|
56
56
|
}
|
57
57
|
else {
|
58
58
|
return React.createElement(React.Fragment, null);
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import { __awaiter, __rest } from "tslib";
|
2
2
|
import { css } from '@emotion/css';
|
3
3
|
import React, { memo, useMemo, useRef, useState } from 'react';
|
4
|
+
import { BetaSchemaForm } from '@ant-design/pro-components';
|
4
5
|
import { cloneDeep, debounce } from 'lodash';
|
5
6
|
import { useSxpDataSource } from '../../../../core/hooks';
|
6
7
|
import './index.less';
|
@@ -80,7 +81,8 @@ const AppointForm = (_a) => {
|
|
80
81
|
return (React.createElement("div", { className: 'pb-appoint-form' },
|
81
82
|
React.createElement("div", { className: `pb-appoint-form-title ${css(Object.assign({}, textStyle))}` }, title),
|
82
83
|
React.createElement("div", Object.assign({ className: css(Object.assign({}, style)) }, props),
|
83
|
-
React.createElement("div", { className: 'pb-appoint-form-container' }
|
84
|
+
React.createElement("div", { className: 'pb-appoint-form-container' },
|
85
|
+
React.createElement(BetaSchemaForm, { columns: columnsData, submitter: false, layout: layoutType, autoFocusFirstInput: false, size: 'large', formRef: formRef, className: 'panel-reset' }))),
|
84
86
|
React.createElement("div", { className: 'pb-appoint-form-btn-wrapper' },
|
85
87
|
React.createElement("button", { onClick: handleSubmit, className: 'pb-appoint-form-btn', style: Object.assign({ color: submitColor, background: submitBgColor }, submitButtonStyle) }, loading ? React.createElement(React.Fragment, null, "loading...") : submitText))));
|
86
88
|
};
|
@@ -98,7 +98,7 @@ const CommodityDetail = (_a) => {
|
|
98
98
|
width: '100%',
|
99
99
|
objectFit: 'cover',
|
100
100
|
display: 'block',
|
101
|
-
|
101
|
+
objectPosition: `50% ${(swiper === null || swiper === void 0 ? void 0 : swiper.translateY) ? -(swiper === null || swiper === void 0 ? void 0 : swiper.translateY) + 50 : 50}%`
|
102
102
|
}, src: src }))));
|
103
103
|
}))),
|
104
104
|
!((_j = product === null || product === void 0 ? void 0 : product.homePage) === null || _j === void 0 ? void 0 : _j.length) && (React.createElement("div", { className: css({
|
@@ -68,9 +68,8 @@ const CommodityDetailDiro = (_a) => {
|
|
68
68
|
setSpread(!spread);
|
69
69
|
};
|
70
70
|
useEffect(() => {
|
71
|
-
var _a
|
72
|
-
|
73
|
-
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) {
|
71
|
+
var _a;
|
72
|
+
if ((scrollRef === null || scrollRef === void 0 ? void 0 : scrollRef.current) && ((_a = scrollRef === null || scrollRef === void 0 ? void 0 : scrollRef.current) === null || _a === void 0 ? void 0 : _a.scrollHeight) > window.innerHeight) {
|
74
73
|
setStopSlide(true);
|
75
74
|
}
|
76
75
|
}, [scrollRef]);
|
@@ -116,7 +116,7 @@ Made in Italy` })));
|
|
116
116
|
width: '100%',
|
117
117
|
objectFit: 'cover',
|
118
118
|
display: 'block',
|
119
|
-
|
119
|
+
objectPosition: `50% ${(swiper === null || swiper === void 0 ? void 0 : swiper.translateY) ? -(swiper === null || swiper === void 0 ? void 0 : swiper.translateY) + 50 : 50}%`
|
120
120
|
}, src: src }))));
|
121
121
|
}))),
|
122
122
|
!((_j = product === null || product === void 0 ? void 0 : product.homePage) === null || _j === void 0 ? void 0 : _j.length) && (React.createElement("div", { className: css({
|
@@ -18,7 +18,7 @@ const Commodity = (_a) => {
|
|
18
18
|
objectFit: 'cover',
|
19
19
|
height: '100%',
|
20
20
|
display: 'block',
|
21
|
-
|
21
|
+
objectPosition: `50% ${translateY ? -translateY + 50 : 50}%`
|
22
22
|
}), src: src })),
|
23
23
|
React.createElement("div", { className: css({
|
24
24
|
color: '#fff',
|
@@ -18,7 +18,7 @@ const CommodityDiro = (_a) => {
|
|
18
18
|
objectFit: 'cover',
|
19
19
|
height: '100%',
|
20
20
|
display: 'block',
|
21
|
-
|
21
|
+
objectPosition: `50% ${translateY ? -translateY + 50 : 50}%`
|
22
22
|
}), src: src })),
|
23
23
|
React.createElement("div", { className: css({
|
24
24
|
color: '#fff',
|
@@ -18,7 +18,7 @@ const CommodityDiroNew = (_a) => {
|
|
18
18
|
objectFit: 'cover',
|
19
19
|
height: '100%',
|
20
20
|
display: 'block',
|
21
|
-
|
21
|
+
objectPosition: `50% ${translateY ? -translateY + 50 : 50}%`
|
22
22
|
}), src: src })),
|
23
23
|
React.createElement("div", { className: css({
|
24
24
|
color: '#fff',
|
@@ -37,7 +37,7 @@ const MultiCommodity = (_a) => {
|
|
37
37
|
return (React.createElement(SwiperSlide, Object.assign({ hidden: recData && !(item === null || item === void 0 ? void 0 : item.bindCta), key: item.itemId, className: css(Object.assign(Object.assign({}, style), { display: 'flex', flexShrink: 0, marginLeft: 0, marginRight: '8px' })) }, props, { onClick: () => handleClick(item) }),
|
38
38
|
React.createElement("div", { className: css(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
|
39
39
|
React.createElement(Img, { 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: {
|
40
|
-
|
40
|
+
objectPosition: `50% ${translateY ? -translateY + 50 : 50}%`
|
41
41
|
} })),
|
42
42
|
React.createElement("div", { className: css({
|
43
43
|
color: '#fff',
|
@@ -36,7 +36,7 @@ const MultiCommodityDiro = (_a) => {
|
|
36
36
|
return (React.createElement(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: css(Object.assign(Object.assign({}, style), { display: 'flex', flexShrink: 0, marginLeft: 0, marginRight: '8px' })) }, props, { onClick: () => handleClick(item) }),
|
37
37
|
React.createElement("div", { className: css(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
|
38
38
|
React.createElement(Img, { 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: {
|
39
|
-
|
39
|
+
objectPosition: `50% ${translateY ? -translateY + 50 : 50}%`
|
40
40
|
} })),
|
41
41
|
React.createElement("div", { className: css({
|
42
42
|
color: '#000',
|
@@ -36,7 +36,7 @@ const MultiCommodityDiroNew = (_a) => {
|
|
36
36
|
return (React.createElement(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: css(Object.assign(Object.assign({}, style), { display: 'flex', flexShrink: 0, marginLeft: 0, marginRight: '8px' })) }, props, { onClick: () => handleClick(item) }),
|
37
37
|
React.createElement("div", { className: css(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
|
38
38
|
React.createElement(Img, { 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: {
|
39
|
-
|
39
|
+
objectPosition: `50% ${translateY ? -translateY + 50 : 50}%`
|
40
40
|
} })),
|
41
41
|
React.createElement("div", { className: css({
|
42
42
|
color: '#fff',
|
@@ -2,17 +2,22 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
const tslib_1 = require("tslib");
|
4
4
|
const react_1 = tslib_1.__importStar(require("react"));
|
5
|
+
const hooks_1 = require("../../../core/hooks");
|
5
6
|
const FormatImage = (0, react_1.forwardRef)((props, ref) => {
|
6
7
|
const { src, onLoad, style, className, loading } = props;
|
7
8
|
const [imgSrc, setImgSrc] = (0, react_1.useState)();
|
9
|
+
const { swiperRef } = (0, hooks_1.useSxpDataSource)();
|
8
10
|
(0, react_1.useImperativeHandle)(ref, () => ({
|
9
11
|
setSrc: (v) => {
|
10
12
|
setImgSrc(v);
|
11
13
|
}
|
12
14
|
}));
|
13
15
|
(0, react_1.useEffect)(() => {
|
14
|
-
|
15
|
-
|
16
|
+
var _a, _b;
|
17
|
+
const index = (_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.activeIndex;
|
18
|
+
if (index === 0 || index > 0)
|
19
|
+
setImgSrc(src);
|
20
|
+
}, [src, swiperRef]);
|
16
21
|
const imgRef = (0, react_1.useRef)(null);
|
17
22
|
return (react_1.default.createElement(react_1.default.Fragment, null, (imgSrc === null || imgSrc === void 0 ? void 0 : imgSrc.includes('.avif')) ? (react_1.default.createElement("picture", null,
|
18
23
|
react_1.default.createElement("source", { type: 'image/avif', srcSet: imgSrc }),
|
@@ -48,14 +48,14 @@ const Popup = () => {
|
|
48
48
|
const renderPopupDetail = (0, react_1.useMemo)(() => {
|
49
49
|
var _a, _b, _c;
|
50
50
|
return (_c = (_b = (_a = schema === null || schema === void 0 ? void 0 : schema.sxpPageConf) === null || _a === void 0 ? void 0 : _a.globalConfig) === null || _b === void 0 ? void 0 : _b.popupList) === null || _c === void 0 ? void 0 : _c.map((value, index) => {
|
51
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
51
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
52
52
|
if ((value === null || value === void 0 ? void 0 : value.id) === (popup === null || popup === void 0 ? void 0 : popup.id)) {
|
53
53
|
const t = resolver[(_a = value === null || value === void 0 ? void 0 : value.item) === null || _a === void 0 ? void 0 : _a.type];
|
54
54
|
const Component = (0, withBindDataSource_1.default)(t);
|
55
55
|
const isExternalLink = ((_d = (_c = (_b = value === null || value === void 0 ? void 0 : value.item) === null || _b === void 0 ? void 0 : _b.event) === null || _c === void 0 ? void 0 : _c.onClick) === null || _d === void 0 ? void 0 : _d.linkType) === 'externalLink';
|
56
56
|
const isPopup = ((_g = (_f = (_e = value === null || value === void 0 ? void 0 : value.item) === null || _e === void 0 ? void 0 : _e.event) === null || _f === void 0 ? void 0 : _f.onClick) === null || _g === void 0 ? void 0 : _g.linkType) === 'popup';
|
57
57
|
const defaulSetting = (_h = t === null || t === void 0 ? void 0 : t.extend) === null || _h === void 0 ? void 0 : _h.defaulSetting;
|
58
|
-
return (react_1.default.createElement(Component, Object.assign({ key: index, style: Object.assign(Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.style), (_j = value === null || value === void 0 ? void 0 : value.item) === null || _j === void 0 ? void 0 : _j.style), { width: '
|
58
|
+
return (react_1.default.createElement(Component, Object.assign({ key: index, style: Object.assign(Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.style), (_j = value === null || value === void 0 ? void 0 : value.item) === null || _j === void 0 ? void 0 : _j.style), { width: (_k = window.innerWidth) !== null && _k !== void 0 ? _k : '100vw', height: '80vh', overflow: 'auto' }), textStyle: Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.textStyle), (_l = value === null || value === void 0 ? void 0 : value.item) === null || _l === void 0 ? void 0 : _l.textStyle), bindDatas: (_o = (_m = value === null || value === void 0 ? void 0 : value.item) === null || _m === void 0 ? void 0 : _m.bindDatas) !== null && _o !== void 0 ? _o : [] }, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.props, (_p = value === null || value === void 0 ? void 0 : value.item) === null || _p === void 0 ? void 0 : _p.props, { event: ((_q = value === null || value === void 0 ? void 0 : value.item) === null || _q === void 0 ? void 0 : _q.event) || {}, schema: schema, id: value === null || value === void 0 ? void 0 : value.id, isExternalLink: isExternalLink, isPopup: isPopup, onClose: handleClose })));
|
59
59
|
}
|
60
60
|
else {
|
61
61
|
return react_1.default.createElement(react_1.default.Fragment, null);
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
4
4
|
const css_1 = require("@emotion/css");
|
5
5
|
const react_1 = tslib_1.__importStar(require("react"));
|
6
|
+
const pro_components_1 = require("@ant-design/pro-components");
|
6
7
|
const lodash_1 = require("lodash");
|
7
8
|
const hooks_1 = require("../../../../core/hooks");
|
8
9
|
require("./index.less");
|
@@ -82,7 +83,8 @@ const AppointForm = (_a) => {
|
|
82
83
|
return (react_1.default.createElement("div", { className: 'pb-appoint-form' },
|
83
84
|
react_1.default.createElement("div", { className: `pb-appoint-form-title ${(0, css_1.css)(Object.assign({}, textStyle))}` }, title),
|
84
85
|
react_1.default.createElement("div", Object.assign({ className: (0, css_1.css)(Object.assign({}, style)) }, props),
|
85
|
-
react_1.default.createElement("div", { className: 'pb-appoint-form-container' }
|
86
|
+
react_1.default.createElement("div", { className: 'pb-appoint-form-container' },
|
87
|
+
react_1.default.createElement(pro_components_1.BetaSchemaForm, { columns: columnsData, submitter: false, layout: layoutType, autoFocusFirstInput: false, size: 'large', formRef: formRef, className: 'panel-reset' }))),
|
86
88
|
react_1.default.createElement("div", { className: 'pb-appoint-form-btn-wrapper' },
|
87
89
|
react_1.default.createElement("button", { onClick: handleSubmit, className: 'pb-appoint-form-btn', style: Object.assign({ color: submitColor, background: submitBgColor }, submitButtonStyle) }, loading ? react_1.default.createElement(react_1.default.Fragment, null, "loading...") : submitText))));
|
88
90
|
};
|
@@ -100,7 +100,7 @@ const CommodityDetail = (_a) => {
|
|
100
100
|
width: '100%',
|
101
101
|
objectFit: 'cover',
|
102
102
|
display: 'block',
|
103
|
-
|
103
|
+
objectPosition: `50% ${(swiper === null || swiper === void 0 ? void 0 : swiper.translateY) ? -(swiper === null || swiper === void 0 ? void 0 : swiper.translateY) + 50 : 50}%`
|
104
104
|
}, src: src }))));
|
105
105
|
}))),
|
106
106
|
!((_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)({
|
@@ -70,9 +70,8 @@ const CommodityDetailDiro = (_a) => {
|
|
70
70
|
setSpread(!spread);
|
71
71
|
};
|
72
72
|
(0, react_1.useEffect)(() => {
|
73
|
-
var _a
|
74
|
-
|
75
|
-
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) {
|
73
|
+
var _a;
|
74
|
+
if ((scrollRef === null || scrollRef === void 0 ? void 0 : scrollRef.current) && ((_a = scrollRef === null || scrollRef === void 0 ? void 0 : scrollRef.current) === null || _a === void 0 ? void 0 : _a.scrollHeight) > window.innerHeight) {
|
76
75
|
setStopSlide(true);
|
77
76
|
}
|
78
77
|
}, [scrollRef]);
|
@@ -118,7 +118,7 @@ Made in Italy` })));
|
|
118
118
|
width: '100%',
|
119
119
|
objectFit: 'cover',
|
120
120
|
display: 'block',
|
121
|
-
|
121
|
+
objectPosition: `50% ${(swiper === null || swiper === void 0 ? void 0 : swiper.translateY) ? -(swiper === null || swiper === void 0 ? void 0 : swiper.translateY) + 50 : 50}%`
|
122
122
|
}, src: src }))));
|
123
123
|
}))),
|
124
124
|
!((_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)({
|
@@ -20,7 +20,7 @@ const Commodity = (_a) => {
|
|
20
20
|
objectFit: 'cover',
|
21
21
|
height: '100%',
|
22
22
|
display: 'block',
|
23
|
-
|
23
|
+
objectPosition: `50% ${translateY ? -translateY + 50 : 50}%`
|
24
24
|
}), src: src })),
|
25
25
|
react_1.default.createElement("div", { className: (0, css_1.css)({
|
26
26
|
color: '#fff',
|
@@ -20,7 +20,7 @@ const CommodityDiro = (_a) => {
|
|
20
20
|
objectFit: 'cover',
|
21
21
|
height: '100%',
|
22
22
|
display: 'block',
|
23
|
-
|
23
|
+
objectPosition: `50% ${translateY ? -translateY + 50 : 50}%`
|
24
24
|
}), src: src })),
|
25
25
|
react_1.default.createElement("div", { className: (0, css_1.css)({
|
26
26
|
color: '#fff',
|
@@ -20,7 +20,7 @@ const CommodityDiroNew = (_a) => {
|
|
20
20
|
objectFit: 'cover',
|
21
21
|
height: '100%',
|
22
22
|
display: 'block',
|
23
|
-
|
23
|
+
objectPosition: `50% ${translateY ? -translateY + 50 : 50}%`
|
24
24
|
}), src: src })),
|
25
25
|
react_1.default.createElement("div", { className: (0, css_1.css)({
|
26
26
|
color: '#fff',
|
@@ -39,7 +39,7 @@ const MultiCommodity = (_a) => {
|
|
39
39
|
return (react_1.default.createElement(react_2.SwiperSlide, Object.assign({ hidden: recData && !(item === null || item === void 0 ? void 0 : item.bindCta), key: item.itemId, className: (0, css_1.css)(Object.assign(Object.assign({}, style), { display: 'flex', flexShrink: 0, marginLeft: 0, marginRight: '8px' })) }, props, { onClick: () => handleClick(item) }),
|
40
40
|
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)) },
|
41
41
|
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: {
|
42
|
-
|
42
|
+
objectPosition: `50% ${translateY ? -translateY + 50 : 50}%`
|
43
43
|
} })),
|
44
44
|
react_1.default.createElement("div", { className: (0, css_1.css)({
|
45
45
|
color: '#fff',
|
@@ -38,7 +38,7 @@ const MultiCommodityDiro = (_a) => {
|
|
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
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
|
-
|
41
|
+
objectPosition: `50% ${translateY ? -translateY + 50 : 50}%`
|
42
42
|
} })),
|
43
43
|
react_1.default.createElement("div", { className: (0, css_1.css)({
|
44
44
|
color: '#000',
|
@@ -38,7 +38,7 @@ const MultiCommodityDiroNew = (_a) => {
|
|
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
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
|
-
|
41
|
+
objectPosition: `50% ${translateY ? -translateY + 50 : 50}%`
|
42
42
|
} })),
|
43
43
|
react_1.default.createElement("div", { className: (0, css_1.css)({
|
44
44
|
color: '#fff',
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "pb-sxp-ui",
|
3
|
-
"version": "1.0.
|
3
|
+
"version": "1.0.73",
|
4
4
|
"description": "React enterprise-class UI components",
|
5
5
|
"main": "dist/index.cjs",
|
6
6
|
"module": "dist/index.js",
|
@@ -37,7 +37,9 @@
|
|
37
37
|
"author": "frontend@chatlabs.cn",
|
38
38
|
"license": "MIT",
|
39
39
|
"dependencies": {
|
40
|
+
"@ant-design/pro-components": "^2.6.35",
|
40
41
|
"@emotion/css": "^11.11.2",
|
42
|
+
"antd": "^5.15.3",
|
41
43
|
"eslint": "^8.48.0",
|
42
44
|
"eventemitter3": "^5.0.1",
|
43
45
|
"less": "^4.2.0",
|