pb-sxp-ui 1.0.65 → 1.0.67
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 +29 -29
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +29 -29
- 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 +33 -32
- 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 +3 -20
- package/es/materials/sxp/popup/AppointForm/index.js +1 -3
- package/lib/core/components/SxpPageRender/FormatImage.js +3 -20
- package/lib/materials/sxp/popup/AppointForm/index.js +1 -3
- package/package.json +1 -3
@@ -7,28 +7,11 @@ const FormatImage = forwardRef((props, ref) => {
|
|
7
7
|
setImgSrc(v);
|
8
8
|
}
|
9
9
|
}));
|
10
|
-
const imgRef = useRef(null);
|
11
10
|
useEffect(() => {
|
12
|
-
|
13
|
-
const { current } = imgRef;
|
14
|
-
if (current) {
|
15
|
-
observer = new IntersectionObserver((entries) => {
|
16
|
-
entries.forEach((entry) => {
|
17
|
-
if (entry.isIntersecting) {
|
18
|
-
setImgSrc(src);
|
19
|
-
observer.unobserve(current);
|
20
|
-
}
|
21
|
-
});
|
22
|
-
}, { threshold: 0.1 });
|
23
|
-
observer.observe(current);
|
24
|
-
}
|
25
|
-
return () => {
|
26
|
-
if (observer && current) {
|
27
|
-
observer.unobserve(current);
|
28
|
-
}
|
29
|
-
};
|
11
|
+
setImgSrc(src);
|
30
12
|
}, [src]);
|
31
|
-
|
13
|
+
const imgRef = useRef(null);
|
14
|
+
return (React.createElement(React.Fragment, null, (imgSrc === null || imgSrc === void 0 ? void 0 : imgSrc.includes('.avif')) ? (React.createElement("picture", null,
|
32
15
|
React.createElement("source", { type: 'image/avif', srcSet: imgSrc }),
|
33
16
|
React.createElement("source", { type: 'image/webp', srcSet: `${imgSrc}?imageMogr2/format/webp` }),
|
34
17
|
React.createElement("source", { type: 'image/jpeg', srcSet: `${imgSrc}?imageMogr2/format/jpg` }),
|
@@ -1,7 +1,6 @@
|
|
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';
|
5
4
|
import { cloneDeep, debounce } from 'lodash';
|
6
5
|
import { useSxpDataSource } from '../../../../core/hooks';
|
7
6
|
import './index.less';
|
@@ -81,8 +80,7 @@ const AppointForm = (_a) => {
|
|
81
80
|
return (React.createElement("div", { className: 'pb-appoint-form' },
|
82
81
|
React.createElement("div", { className: `pb-appoint-form-title ${css(Object.assign({}, textStyle))}` }, title),
|
83
82
|
React.createElement("div", Object.assign({ className: css(Object.assign({}, style)) }, props),
|
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' }))),
|
83
|
+
React.createElement("div", { className: 'pb-appoint-form-container' })),
|
86
84
|
React.createElement("div", { className: 'pb-appoint-form-btn-wrapper' },
|
87
85
|
React.createElement("button", { onClick: handleSubmit, className: 'pb-appoint-form-btn', style: {
|
88
86
|
color: submitColor,
|
@@ -10,28 +10,11 @@ const FormatImage = (0, react_1.forwardRef)((props, ref) => {
|
|
10
10
|
setImgSrc(v);
|
11
11
|
}
|
12
12
|
}));
|
13
|
-
const imgRef = (0, react_1.useRef)(null);
|
14
13
|
(0, react_1.useEffect)(() => {
|
15
|
-
|
16
|
-
const { current } = imgRef;
|
17
|
-
if (current) {
|
18
|
-
observer = new IntersectionObserver((entries) => {
|
19
|
-
entries.forEach((entry) => {
|
20
|
-
if (entry.isIntersecting) {
|
21
|
-
setImgSrc(src);
|
22
|
-
observer.unobserve(current);
|
23
|
-
}
|
24
|
-
});
|
25
|
-
}, { threshold: 0.1 });
|
26
|
-
observer.observe(current);
|
27
|
-
}
|
28
|
-
return () => {
|
29
|
-
if (observer && current) {
|
30
|
-
observer.unobserve(current);
|
31
|
-
}
|
32
|
-
};
|
14
|
+
setImgSrc(src);
|
33
15
|
}, [src]);
|
34
|
-
|
16
|
+
const imgRef = (0, react_1.useRef)(null);
|
17
|
+
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,
|
35
18
|
react_1.default.createElement("source", { type: 'image/avif', srcSet: imgSrc }),
|
36
19
|
react_1.default.createElement("source", { type: 'image/webp', srcSet: `${imgSrc}?imageMogr2/format/webp` }),
|
37
20
|
react_1.default.createElement("source", { type: 'image/jpeg', srcSet: `${imgSrc}?imageMogr2/format/jpg` }),
|
@@ -3,7 +3,6 @@ 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");
|
7
6
|
const lodash_1 = require("lodash");
|
8
7
|
const hooks_1 = require("../../../../core/hooks");
|
9
8
|
require("./index.less");
|
@@ -83,8 +82,7 @@ const AppointForm = (_a) => {
|
|
83
82
|
return (react_1.default.createElement("div", { className: 'pb-appoint-form' },
|
84
83
|
react_1.default.createElement("div", { className: `pb-appoint-form-title ${(0, css_1.css)(Object.assign({}, textStyle))}` }, title),
|
85
84
|
react_1.default.createElement("div", Object.assign({ className: (0, css_1.css)(Object.assign({}, style)) }, props),
|
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' }))),
|
85
|
+
react_1.default.createElement("div", { className: 'pb-appoint-form-container' })),
|
88
86
|
react_1.default.createElement("div", { className: 'pb-appoint-form-btn-wrapper' },
|
89
87
|
react_1.default.createElement("button", { onClick: handleSubmit, className: 'pb-appoint-form-btn', style: {
|
90
88
|
color: submitColor,
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "pb-sxp-ui",
|
3
|
-
"version": "1.0.
|
3
|
+
"version": "1.0.67",
|
4
4
|
"description": "React enterprise-class UI components",
|
5
5
|
"main": "dist/index.cjs",
|
6
6
|
"module": "dist/index.js",
|
@@ -37,9 +37,7 @@
|
|
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",
|
45
43
|
"less": "^4.2.0",
|