pb-sxp-ui 1.0.66 → 1.0.68

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/pb-ui.js CHANGED
@@ -1,8 +1,8 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('lodash'), require('uuid'), require('pako'), require('react'), require('qs'), require('eventemitter3'), require('@emotion/css'), require('react-dom')) :
3
- typeof define === 'function' && define.amd ? define(['exports', 'lodash', 'uuid', 'pako', 'react', 'qs', 'eventemitter3', '@emotion/css', 'react-dom'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.PUI = {}, global.lodash, global.uuid$1, global.pako, global.React, global.qs, global.EventEmitter, global.css, global.ReactDOM));
5
- })(this, (function (exports, lodash, uuid$1, pako, React, qs, EventEmitter, css, ReactDOM) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('lodash'), require('uuid'), require('pako'), require('react'), require('qs'), require('eventemitter3'), require('@emotion/css'), require('@ant-design/pro-components'), require('react-dom')) :
3
+ typeof define === 'function' && define.amd ? define(['exports', 'lodash', 'uuid', 'pako', 'react', 'qs', 'eventemitter3', '@emotion/css', '@ant-design/pro-components', 'react-dom'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.PUI = {}, global.lodash, global.uuid$1, global.pako, global.React, global.qs, global.EventEmitter, global.css, global.proComponents, global.ReactDOM));
5
+ })(this, (function (exports, lodash, uuid$1, pako, React, qs, EventEmitter, css, proComponents, ReactDOM) { 'use strict';
6
6
 
7
7
  function _interopNamespaceDefault(e) {
8
8
  var n = Object.create(null);
@@ -1175,7 +1175,7 @@
1175
1175
  key: '4'
1176
1176
  }
1177
1177
  ], []);
1178
- React.useMemo(() => {
1178
+ const columnsData = React.useMemo(() => {
1179
1179
  if (layoutType === undefined) {
1180
1180
  const list = lodash.cloneDeep(columns) || defaultColumns;
1181
1181
  return list === null || list === void 0 ? void 0 : list.map((obj) => (Object.assign(Object.assign({}, obj), { title: undefined, fieldProps: { placeholder: obj === null || obj === void 0 ? void 0 : obj.title } })));
@@ -1218,7 +1218,8 @@
1218
1218
  return (React.createElement("div", { className: 'pb-appoint-form' },
1219
1219
  React.createElement("div", { className: `pb-appoint-form-title ${css.css(Object.assign({}, textStyle))}` }, title),
1220
1220
  React.createElement("div", Object.assign({ className: css.css(Object.assign({}, style)) }, props),
1221
- React.createElement("div", { className: 'pb-appoint-form-container' })),
1221
+ React.createElement("div", { className: 'pb-appoint-form-container' },
1222
+ React.createElement(proComponents.BetaSchemaForm, { columns: columnsData, submitter: false, layout: layoutType, autoFocusFirstInput: false, size: 'large', formRef: formRef, className: 'panel-reset' }))),
1222
1223
  React.createElement("div", { className: 'pb-appoint-form-btn-wrapper' },
1223
1224
  React.createElement("button", { onClick: handleSubmit, className: 'pb-appoint-form-btn', style: {
1224
1225
  color: submitColor,
@@ -8382,7 +8383,7 @@
8382
8383
  * @Author: binruan@chatlabs.com
8383
8384
  * @Date: 2024-03-20 10:27:31
8384
8385
  * @LastEditors: binruan@chatlabs.com
8385
- * @LastEditTime: 2024-05-17 16:53:11
8386
+ * @LastEditTime: 2024-05-20 15:53:04
8386
8387
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\FormatImage.tsx
8387
8388
  *
8388
8389
  */
@@ -8394,32 +8395,34 @@
8394
8395
  setImgSrc(v);
8395
8396
  }
8396
8397
  }));
8397
- // useEffect(() => {
8398
- // setImgSrc(src);
8399
- // }, [src]);
8400
- const imgRef = React.useRef(null);
8401
8398
  React.useEffect(() => {
8402
- let observer = null;
8403
- const { current } = imgRef;
8404
- if (current) {
8405
- observer = new IntersectionObserver((entries) => {
8406
- entries.forEach((entry) => {
8407
- if (entry.isIntersecting) {
8408
- setImgSrc(src);
8409
- observer.unobserve(current);
8410
- }
8411
- });
8412
- }, { threshold: 0.1 } // 触发阈值,可根据需要调整
8413
- );
8414
- observer.observe(current);
8415
- }
8416
- return () => {
8417
- if (observer && current) {
8418
- observer.unobserve(current);
8419
- }
8420
- };
8399
+ setImgSrc(src);
8421
8400
  }, [src]);
8422
- return (React.createElement("div", { ref: imgRef }, (imgSrc === null || imgSrc === void 0 ? void 0 : imgSrc.includes('.avif')) ? (React.createElement("picture", null,
8401
+ React.useRef(null);
8402
+ // useEffect(() => {
8403
+ // let observer: any = null;
8404
+ // const { current } = imgRef;
8405
+ // if (current) {
8406
+ // observer = new IntersectionObserver(
8407
+ // (entries) => {
8408
+ // entries.forEach((entry) => {
8409
+ // if (entry.isIntersecting) {
8410
+ // setImgSrc(src);
8411
+ // observer.unobserve(current);
8412
+ // }
8413
+ // });
8414
+ // },
8415
+ // { threshold: 0.1 } // 触发阈值,可根据需要调整
8416
+ // );
8417
+ // observer.observe(current);
8418
+ // }
8419
+ // return () => {
8420
+ // if (observer && current) {
8421
+ // observer.unobserve(current);
8422
+ // }
8423
+ // };
8424
+ // }, [src]);
8425
+ return (React.createElement(React.Fragment, null, (imgSrc === null || imgSrc === void 0 ? void 0 : imgSrc.includes('.avif')) ? (React.createElement("picture", null,
8423
8426
  React.createElement("source", { type: 'image/avif', srcSet: imgSrc }),
8424
8427
  React.createElement("source", { type: 'image/webp', srcSet: `${imgSrc}?imageMogr2/format/webp` }),
8425
8428
  React.createElement("source", { type: 'image/jpeg', srcSet: `${imgSrc}?imageMogr2/format/jpg` }),