pb-sxp-ui 1.0.67 → 1.0.69

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.
@@ -76,23 +76,29 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
76
76
  };
77
77
  const firstRef = useRef();
78
78
  useEffect(() => {
79
- if (!firstRef.current && !videoRef && (playerRef === null || playerRef === void 0 ? void 0 : playerRef.current)) {
79
+ var _a, _b, _c;
80
+ if (!firstRef.current && !videoRef && (playerRef === null || playerRef === void 0 ? void 0 : playerRef.current) && (data === null || data === void 0 ? void 0 : data.length) > 0) {
80
81
  firstRef.current = true;
81
82
  const player = TCPlayer('player-container-id', {
82
83
  licenseUrl,
83
84
  controls: false,
84
- autoplay: false,
85
85
  loop: false,
86
+ autoplay: true,
86
87
  muted: true,
87
88
  preload: 'auto',
88
89
  posterImage: false,
89
- bigPlayButton: true
90
+ bigPlayButton: true,
91
+ sources: [
92
+ {
93
+ src: (_c = (_b = (_a = data === null || data === void 0 ? void 0 : data[0]) === null || _a === void 0 ? void 0 : _a.video) === null || _b === void 0 ? void 0 : _b.url) !== null && _c !== void 0 ? _c : ''
94
+ }
95
+ ]
90
96
  });
91
97
  player === null || player === void 0 ? void 0 : player.ready(() => {
92
98
  setVideoRef(player);
93
99
  });
94
100
  }
95
- }, [videoRef, licenseUrl]);
101
+ }, [videoRef, licenseUrl, data]);
96
102
  useEffect(() => {
97
103
  if (!isInit)
98
104
  handleH5EnterLink();
@@ -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: {
86
88
  color: submitColor,
@@ -79,23 +79,29 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
79
79
  };
80
80
  const firstRef = (0, react_1.useRef)();
81
81
  (0, react_1.useEffect)(() => {
82
- if (!firstRef.current && !videoRef && (playerRef === null || playerRef === void 0 ? void 0 : playerRef.current)) {
82
+ var _a, _b, _c;
83
+ if (!firstRef.current && !videoRef && (playerRef === null || playerRef === void 0 ? void 0 : playerRef.current) && (data === null || data === void 0 ? void 0 : data.length) > 0) {
83
84
  firstRef.current = true;
84
85
  const player = TCPlayer('player-container-id', {
85
86
  licenseUrl,
86
87
  controls: false,
87
- autoplay: false,
88
88
  loop: false,
89
+ autoplay: true,
89
90
  muted: true,
90
91
  preload: 'auto',
91
92
  posterImage: false,
92
- bigPlayButton: true
93
+ bigPlayButton: true,
94
+ sources: [
95
+ {
96
+ src: (_c = (_b = (_a = data === null || data === void 0 ? void 0 : data[0]) === null || _a === void 0 ? void 0 : _a.video) === null || _b === void 0 ? void 0 : _b.url) !== null && _c !== void 0 ? _c : ''
97
+ }
98
+ ]
93
99
  });
94
100
  player === null || player === void 0 ? void 0 : player.ready(() => {
95
101
  setVideoRef(player);
96
102
  });
97
103
  }
98
- }, [videoRef, licenseUrl]);
104
+ }, [videoRef, licenseUrl, data]);
99
105
  (0, react_1.useEffect)(() => {
100
106
  if (!isInit)
101
107
  handleH5EnterLink();
@@ -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: {
88
90
  color: submitColor,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pb-sxp-ui",
3
- "version": "1.0.67",
3
+ "version": "1.0.69",
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",