@kmkf-fe-packages/basic-components 0.8.21-alpha.10 → 0.8.21-alpha.11

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.esm.js CHANGED
@@ -6854,7 +6854,6 @@ hooks.HTML5_FMT = {
6854
6854
  };
6855
6855
 
6856
6856
  var _excluded$7 = ["maxCount", "maxSize", "onChange", "value", "accept", "disabled", "uniqueKey", "hostUrl", "actionUrl", "platform"];
6857
- // import { getInfo } from 'react-mediainfo';
6858
6857
  var Dragger = Upload.Dragger;
6859
6858
  var fn$2 = function fn() {
6860
6859
  return void 0;
@@ -6878,7 +6877,6 @@ var ApaasUploadAsync$1 = function ApaasUploadAsync(_ref) {
6878
6877
  _ref$actionUrl = _ref.actionUrl,
6879
6878
  actionUrl = _ref$actionUrl === void 0 ? '/qy/common/uploadWorkOrderImg' : _ref$actionUrl,
6880
6879
  _ref$platform = _ref.platform,
6881
- platform = _ref$platform === void 0 ? '' : _ref$platform,
6882
6880
  resetProps = _objectWithoutProperties(_ref, _excluded$7);
6883
6881
  var inputRef = useRef(null);
6884
6882
  var _useState = useState(false),
@@ -7020,58 +7018,43 @@ var ApaasUploadAsync$1 = function ApaasUploadAsync(_ref) {
7020
7018
  valueRef.current = list;
7021
7019
  onChange(list);
7022
7020
  };
7023
- var verificationFormat = /*#__PURE__*/function () {
7024
- var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(file) {
7025
- var _yield$require, getInfo;
7026
- return _regeneratorRuntime().wrap(function _callee3$(_context3) {
7027
- while (1) switch (_context3.prev = _context3.next) {
7028
- case 0:
7029
- if (!(platform !== 'fxg')) {
7030
- _context3.next = 8;
7031
- break;
7032
- }
7033
- _context3.next = 3;
7034
- return require('react-mediainfo');
7035
- case 3:
7036
- _yield$require = _context3.sent;
7037
- getInfo = _yield$require.getInfo;
7038
- getInfo(file).then(function (res) {
7039
- var track = res.media.track;
7040
- console.log(res);
7041
- var videoItem = track.find(function (item) {
7042
- return item['@type'] === 'Video';
7043
- });
7044
- var generalItem = track.find(function (item) {
7045
- return item['@type'] === 'General';
7046
- });
7047
- if (videoItem && blackList[generalItem === null || generalItem === void 0 ? void 0 : generalItem.Format.toUpperCase()] && blackList[generalItem === null || generalItem === void 0 ? void 0 : generalItem.Format.toUpperCase()].includes(videoItem === null || videoItem === void 0 ? void 0 : videoItem.Format.toUpperCase())) {
7048
- Modal.confirm({
7049
- title: '提示',
7050
- content: '上传的视频可能无法播放,确认要上传吗?',
7051
- okText: '确定',
7052
- cancelText: '取消',
7053
- onOk: function onOk() {
7054
- asyncUpload(file);
7055
- }
7056
- });
7057
- } else {
7058
- asyncUpload(file);
7059
- }
7060
- });
7061
- _context3.next = 9;
7062
- break;
7063
- case 8:
7064
- asyncUpload(file);
7065
- case 9:
7066
- case "end":
7067
- return _context3.stop();
7068
- }
7069
- }, _callee3);
7070
- }));
7071
- return function verificationFormat(_x2) {
7072
- return _ref4.apply(this, arguments);
7073
- };
7074
- }();
7021
+ // const verificationFormat = async (file: any) => {
7022
+ // //飞鸽端不支持worker没有办法使用react-mediainfo插件
7023
+ // if (platform !== 'fxg') {
7024
+ // const { getInfo } = await require('react-mediainfo');
7025
+ // getInfo(file).then((res: any) => {
7026
+ // const {
7027
+ // media: { track },
7028
+ // } = res;
7029
+ // console.log(res);
7030
+ // const videoItem = track.find((item: any) => item['@type'] === 'Video');
7031
+ // const generalItem = track.find(
7032
+ // (item: any) => item['@type'] === 'General',
7033
+ // );
7034
+ // if (
7035
+ // videoItem &&
7036
+ // blackList[generalItem?.Format.toUpperCase()] &&
7037
+ // blackList[generalItem?.Format.toUpperCase()].includes(
7038
+ // videoItem?.Format.toUpperCase(),
7039
+ // )
7040
+ // ) {
7041
+ // Modal.confirm({
7042
+ // title: '提示',
7043
+ // content: '上传的视频可能无法播放,确认要上传吗?',
7044
+ // okText: '确定',
7045
+ // cancelText: '取消',
7046
+ // onOk: () => {
7047
+ // asyncUpload(file);
7048
+ // },
7049
+ // });
7050
+ // } else {
7051
+ // asyncUpload(file);
7052
+ // }
7053
+ // });
7054
+ // } else {
7055
+ // asyncUpload(file);
7056
+ // }
7057
+ // };
7075
7058
  // 手动上传模式, 一直返回false
7076
7059
  var beforeUpload = function beforeUpload(file) {
7077
7060
  console.log('beforeUpload', file);
@@ -7084,8 +7067,8 @@ var ApaasUploadAsync$1 = function ApaasUploadAsync(_ref) {
7084
7067
  message.error("\u6587\u4EF6\u4E0D\u80FD\u5927\u4E8E".concat(maxSize, "MB"));
7085
7068
  return Upload.LIST_IGNORE;
7086
7069
  }
7087
- verificationFormat(file);
7088
- // asyncUpload(file);
7070
+ // verificationFormat(file);
7071
+ asyncUpload(file);
7089
7072
  return Upload.LIST_IGNORE;
7090
7073
  };
7091
7074
  var onRemove = function onRemove(file) {
@@ -7146,24 +7129,25 @@ var ApaasUploadAsync$1 = function ApaasUploadAsync(_ref) {
7146
7129
  return;
7147
7130
  }
7148
7131
  reader.onload = /*#__PURE__*/function () {
7149
- var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(e) {
7132
+ var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(e) {
7150
7133
  var _e$target;
7151
7134
  var result, fileName, file;
7152
- return _regeneratorRuntime().wrap(function _callee4$(_context4) {
7153
- while (1) switch (_context4.prev = _context4.next) {
7135
+ return _regeneratorRuntime().wrap(function _callee3$(_context3) {
7136
+ while (1) switch (_context3.prev = _context3.next) {
7154
7137
  case 0:
7155
7138
  result = e === null || e === void 0 ? void 0 : (_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.result;
7156
7139
  fileName = blob.name;
7157
- file = dataURLtoFile(result, fileName); // asyncUpload(file);
7158
- verificationFormat(file);
7140
+ file = dataURLtoFile(result, fileName);
7141
+ asyncUpload(file);
7142
+ // verificationFormat(file);
7159
7143
  case 4:
7160
7144
  case "end":
7161
- return _context4.stop();
7145
+ return _context3.stop();
7162
7146
  }
7163
- }, _callee4);
7147
+ }, _callee3);
7164
7148
  }));
7165
- return function (_x3) {
7166
- return _ref5.apply(this, arguments);
7149
+ return function (_x2) {
7150
+ return _ref4.apply(this, arguments);
7167
7151
  };
7168
7152
  }();
7169
7153
  reader.readAsDataURL(blob);
package/dist/index.js CHANGED
@@ -6865,7 +6865,6 @@ hooks.HTML5_FMT = {
6865
6865
  };
6866
6866
 
6867
6867
  var _excluded$7 = ["maxCount", "maxSize", "onChange", "value", "accept", "disabled", "uniqueKey", "hostUrl", "actionUrl", "platform"];
6868
- // import { getInfo } from 'react-mediainfo';
6869
6868
  var Dragger = antd.Upload.Dragger;
6870
6869
  var fn$2 = function fn() {
6871
6870
  return void 0;
@@ -6889,7 +6888,6 @@ var ApaasUploadAsync$1 = function ApaasUploadAsync(_ref) {
6889
6888
  _ref$actionUrl = _ref.actionUrl,
6890
6889
  actionUrl = _ref$actionUrl === void 0 ? '/qy/common/uploadWorkOrderImg' : _ref$actionUrl,
6891
6890
  _ref$platform = _ref.platform,
6892
- platform = _ref$platform === void 0 ? '' : _ref$platform,
6893
6891
  resetProps = _objectWithoutProperties(_ref, _excluded$7);
6894
6892
  var inputRef = React.useRef(null);
6895
6893
  var _useState = React.useState(false),
@@ -7031,58 +7029,43 @@ var ApaasUploadAsync$1 = function ApaasUploadAsync(_ref) {
7031
7029
  valueRef.current = list;
7032
7030
  onChange(list);
7033
7031
  };
7034
- var verificationFormat = /*#__PURE__*/function () {
7035
- var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(file) {
7036
- var _yield$require, getInfo;
7037
- return _regeneratorRuntime().wrap(function _callee3$(_context3) {
7038
- while (1) switch (_context3.prev = _context3.next) {
7039
- case 0:
7040
- if (!(platform !== 'fxg')) {
7041
- _context3.next = 8;
7042
- break;
7043
- }
7044
- _context3.next = 3;
7045
- return require('react-mediainfo');
7046
- case 3:
7047
- _yield$require = _context3.sent;
7048
- getInfo = _yield$require.getInfo;
7049
- getInfo(file).then(function (res) {
7050
- var track = res.media.track;
7051
- console.log(res);
7052
- var videoItem = track.find(function (item) {
7053
- return item['@type'] === 'Video';
7054
- });
7055
- var generalItem = track.find(function (item) {
7056
- return item['@type'] === 'General';
7057
- });
7058
- if (videoItem && blackList[generalItem === null || generalItem === void 0 ? void 0 : generalItem.Format.toUpperCase()] && blackList[generalItem === null || generalItem === void 0 ? void 0 : generalItem.Format.toUpperCase()].includes(videoItem === null || videoItem === void 0 ? void 0 : videoItem.Format.toUpperCase())) {
7059
- antd.Modal.confirm({
7060
- title: '提示',
7061
- content: '上传的视频可能无法播放,确认要上传吗?',
7062
- okText: '确定',
7063
- cancelText: '取消',
7064
- onOk: function onOk() {
7065
- asyncUpload(file);
7066
- }
7067
- });
7068
- } else {
7069
- asyncUpload(file);
7070
- }
7071
- });
7072
- _context3.next = 9;
7073
- break;
7074
- case 8:
7075
- asyncUpload(file);
7076
- case 9:
7077
- case "end":
7078
- return _context3.stop();
7079
- }
7080
- }, _callee3);
7081
- }));
7082
- return function verificationFormat(_x2) {
7083
- return _ref4.apply(this, arguments);
7084
- };
7085
- }();
7032
+ // const verificationFormat = async (file: any) => {
7033
+ // //飞鸽端不支持worker没有办法使用react-mediainfo插件
7034
+ // if (platform !== 'fxg') {
7035
+ // const { getInfo } = await require('react-mediainfo');
7036
+ // getInfo(file).then((res: any) => {
7037
+ // const {
7038
+ // media: { track },
7039
+ // } = res;
7040
+ // console.log(res);
7041
+ // const videoItem = track.find((item: any) => item['@type'] === 'Video');
7042
+ // const generalItem = track.find(
7043
+ // (item: any) => item['@type'] === 'General',
7044
+ // );
7045
+ // if (
7046
+ // videoItem &&
7047
+ // blackList[generalItem?.Format.toUpperCase()] &&
7048
+ // blackList[generalItem?.Format.toUpperCase()].includes(
7049
+ // videoItem?.Format.toUpperCase(),
7050
+ // )
7051
+ // ) {
7052
+ // Modal.confirm({
7053
+ // title: '提示',
7054
+ // content: '上传的视频可能无法播放,确认要上传吗?',
7055
+ // okText: '确定',
7056
+ // cancelText: '取消',
7057
+ // onOk: () => {
7058
+ // asyncUpload(file);
7059
+ // },
7060
+ // });
7061
+ // } else {
7062
+ // asyncUpload(file);
7063
+ // }
7064
+ // });
7065
+ // } else {
7066
+ // asyncUpload(file);
7067
+ // }
7068
+ // };
7086
7069
  // 手动上传模式, 一直返回false
7087
7070
  var beforeUpload = function beforeUpload(file) {
7088
7071
  console.log('beforeUpload', file);
@@ -7095,8 +7078,8 @@ var ApaasUploadAsync$1 = function ApaasUploadAsync(_ref) {
7095
7078
  antd.message.error("\u6587\u4EF6\u4E0D\u80FD\u5927\u4E8E".concat(maxSize, "MB"));
7096
7079
  return antd.Upload.LIST_IGNORE;
7097
7080
  }
7098
- verificationFormat(file);
7099
- // asyncUpload(file);
7081
+ // verificationFormat(file);
7082
+ asyncUpload(file);
7100
7083
  return antd.Upload.LIST_IGNORE;
7101
7084
  };
7102
7085
  var onRemove = function onRemove(file) {
@@ -7157,24 +7140,25 @@ var ApaasUploadAsync$1 = function ApaasUploadAsync(_ref) {
7157
7140
  return;
7158
7141
  }
7159
7142
  reader.onload = /*#__PURE__*/function () {
7160
- var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(e) {
7143
+ var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(e) {
7161
7144
  var _e$target;
7162
7145
  var result, fileName, file;
7163
- return _regeneratorRuntime().wrap(function _callee4$(_context4) {
7164
- while (1) switch (_context4.prev = _context4.next) {
7146
+ return _regeneratorRuntime().wrap(function _callee3$(_context3) {
7147
+ while (1) switch (_context3.prev = _context3.next) {
7165
7148
  case 0:
7166
7149
  result = e === null || e === void 0 ? void 0 : (_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.result;
7167
7150
  fileName = blob.name;
7168
- file = dataURLtoFile(result, fileName); // asyncUpload(file);
7169
- verificationFormat(file);
7151
+ file = dataURLtoFile(result, fileName);
7152
+ asyncUpload(file);
7153
+ // verificationFormat(file);
7170
7154
  case 4:
7171
7155
  case "end":
7172
- return _context4.stop();
7156
+ return _context3.stop();
7173
7157
  }
7174
- }, _callee4);
7158
+ }, _callee3);
7175
7159
  }));
7176
- return function (_x3) {
7177
- return _ref5.apply(this, arguments);
7160
+ return function (_x2) {
7161
+ return _ref4.apply(this, arguments);
7178
7162
  };
7179
7163
  }();
7180
7164
  reader.readAsDataURL(blob);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/basic-components",
3
- "version": "0.8.21-alpha.10",
3
+ "version": "0.8.21-alpha.11",
4
4
  "description": "> TODO: description",
5
5
  "homepage": "",
6
6
  "license": "ISC",
@@ -61,5 +61,5 @@
61
61
  "publishConfig": {
62
62
  "access": "public"
63
63
  },
64
- "gitHead": "8a843a5781b214063eae2bdf8a14386b9de483a2"
64
+ "gitHead": "d9d1510fac31bb5083dab360e7b9ed22830bd33e"
65
65
  }