wargerm 0.7.5 → 0.7.6

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
@@ -2,7 +2,7 @@ import 'antd/dist/reset.css';
2
2
  import React, { useRef, useEffect, useMemo, useState, useCallback, useImperativeHandle, memo, forwardRef, createRef } from 'react';
3
3
  import { cloneDeep, uniqBy, isEmpty } from 'lodash-es';
4
4
  import { useSyncExternalStore } from 'use-sync-external-store/shim';
5
- import { Menu, Dropdown, Button, Input, Upload as Upload$1, Modal as Modal$2, message, InputNumber, DatePicker, Radio, Space, Checkbox, Select, Switch, Tooltip, TreeSelect as TreeSelect$1, Cascader, Form, Row, Col, Spin, Pagination, Breadcrumb, ConfigProvider } from 'antd';
5
+ import { Menu, Dropdown, Button, Input, Upload as Upload$1, Modal as Modal$2, message, InputNumber, DatePicker, Radio, Space, Checkbox, Select, Switch, Tooltip, TreeSelect as TreeSelect$1, Cascader, Form, Row, Col, Spin, Pagination, Breadcrumb, ConfigProvider, notification } from 'antd';
6
6
  import { createFromIconfontCN, PlusOutlined, CloseCircleOutlined, SearchOutlined, ReloadOutlined, EllipsisOutlined, ExclamationCircleOutlined, EyeOutlined, EditOutlined, DeleteOutlined, LeftOutlined, RightOutlined, CloseOutlined } from '@ant-design/icons';
7
7
  import FileViewer from 'react-file-viewer';
8
8
  import classnames from 'classnames';
@@ -10986,6 +10986,11 @@ function DhPlayer(_ref, ref) {
10986
10986
  dhErrorMsg = _useState6[0],
10987
10987
  setDhErrorMsg = _useState6[1];
10988
10988
 
10989
+ var _notification$useNoti = notification.useNotification(),
10990
+ _notification$useNoti2 = _slicedToArray(_notification$useNoti, 2),
10991
+ api = _notification$useNoti2[0],
10992
+ contextHolder = _notification$useNoti2[1];
10993
+
10989
10994
  var initVideo = function initVideo() {
10990
10995
  var vmPlayer = new VideoPlayer({
10991
10996
  videoId: videoId,
@@ -11015,6 +11020,18 @@ function DhPlayer(_ref, ref) {
11015
11020
  console.log('-----播放器加载失败,错误原因:', err);
11016
11021
  sessionStorage.setItem('dhplayer-info', err.message);
11017
11022
  setDhErrorMsg(err.message);
11023
+
11024
+ if (err.code == 1001) {
11025
+ api.error({
11026
+ message: "".concat(err.message),
11027
+ description: /*#__PURE__*/React.createElement("span", null, "\u8BF7\u4E0B\u8F7D\u63D2\u4EF6\u540E\uFF0C\u53CC\u51FB\u8FD0\u884C\uFF1A", /*#__PURE__*/React.createElement("a", {
11028
+ href: "https://static.eblssmart.com/lfhz/DHPlayer_x64.zip"
11029
+ }, "\u70B9\u51FB\u4E0B\u8F7D")),
11030
+ placement: 'top',
11031
+ duration: null
11032
+ });
11033
+ }
11034
+
11018
11035
  _createError && _createError(err);
11019
11036
  },
11020
11037
  //抓图成功
@@ -11236,7 +11253,7 @@ function DhPlayer(_ref, ref) {
11236
11253
  style: {
11237
11254
  height: "".concat(height ? height + 'px' : '100%')
11238
11255
  }
11239
- }, /*#__PURE__*/React.createElement("div", {
11256
+ }, contextHolder, /*#__PURE__*/React.createElement("div", {
11240
11257
  id: videoId,
11241
11258
  className: "dh-bg",
11242
11259
  style: {
package/dist/index.js CHANGED
@@ -11030,6 +11030,11 @@ function DhPlayer(_ref, ref) {
11030
11030
  dhErrorMsg = _useState6[0],
11031
11031
  setDhErrorMsg = _useState6[1];
11032
11032
 
11033
+ var _notification$useNoti = antd.notification.useNotification(),
11034
+ _notification$useNoti2 = _slicedToArray(_notification$useNoti, 2),
11035
+ api = _notification$useNoti2[0],
11036
+ contextHolder = _notification$useNoti2[1];
11037
+
11033
11038
  var initVideo = function initVideo() {
11034
11039
  var vmPlayer = new VideoPlayer({
11035
11040
  videoId: videoId,
@@ -11059,6 +11064,18 @@ function DhPlayer(_ref, ref) {
11059
11064
  console.log('-----播放器加载失败,错误原因:', err);
11060
11065
  sessionStorage.setItem('dhplayer-info', err.message);
11061
11066
  setDhErrorMsg(err.message);
11067
+
11068
+ if (err.code == 1001) {
11069
+ api.error({
11070
+ message: "".concat(err.message),
11071
+ description: /*#__PURE__*/React__default['default'].createElement("span", null, "\u8BF7\u4E0B\u8F7D\u63D2\u4EF6\u540E\uFF0C\u53CC\u51FB\u8FD0\u884C\uFF1A", /*#__PURE__*/React__default['default'].createElement("a", {
11072
+ href: "https://static.eblssmart.com/lfhz/DHPlayer_x64.zip"
11073
+ }, "\u70B9\u51FB\u4E0B\u8F7D")),
11074
+ placement: 'top',
11075
+ duration: null
11076
+ });
11077
+ }
11078
+
11062
11079
  _createError && _createError(err);
11063
11080
  },
11064
11081
  //抓图成功
@@ -11280,7 +11297,7 @@ function DhPlayer(_ref, ref) {
11280
11297
  style: {
11281
11298
  height: "".concat(height ? height + 'px' : '100%')
11282
11299
  }
11283
- }, /*#__PURE__*/React__default['default'].createElement("div", {
11300
+ }, contextHolder, /*#__PURE__*/React__default['default'].createElement("div", {
11284
11301
  id: videoId,
11285
11302
  className: "dh-bg",
11286
11303
  style: {
package/package.json CHANGED
@@ -1,91 +1,91 @@
1
- {
2
- "private": false,
3
- "name": "wargerm",
4
- "version": "0.7.5",
5
- "scripts": {
6
- "dev": "dumi dev",
7
- "docs:build": "dumi build",
8
- "docs:deploy": "gh-pages -d docs-dist",
9
- "build": "father-build",
10
- "deploy": "npm run docs:build && npm run docs:deploy",
11
- "release": "npm run build && npm publish",
12
- "prettier": "prettier --write \"**/*.{js,jsx,tsx,ts,less,md,json}\"",
13
- "test": "umi-test",
14
- "test:coverage": "umi-test --coverage"
15
- },
16
- "main": "dist/index.js",
17
- "module": "dist/index.esm.js",
18
- "unpkg": "dist/index.umd.min.js",
19
- "typings": "dist/index.d.ts",
20
- "author": "jinly2",
21
- "license": "MIT",
22
- "keywords": [
23
- "React",
24
- "Component"
25
- ],
26
- "gitHooks": {
27
- "pre-commit": "lint-staged"
28
- },
29
- "repository": {
30
- "type": "git",
31
- "url": "http://code.eblssmart.com/platform/web/wargerm-components.git",
32
- "branch": "main"
33
- },
34
- "files": [
35
- "dist",
36
- "es",
37
- "lib",
38
- "index.css"
39
- ],
40
- "lint-staged": {
41
- "*.{js,jsx,less,md,json}": [
42
- "prettier --write"
43
- ],
44
- "*.ts?(x)": [
45
- "prettier --parser=typescript --write"
46
- ]
47
- },
48
- "dependencies": {
49
- "@ant-design/pro-table": "^3.3.1",
50
- "animate.css": "^4.1.1",
51
- "dayjs": "^1.11.7",
52
- "echarts": "^5.2.2",
53
- "echarts-for-react": "^3.0.2",
54
- "lodash-es": "^4.17.21",
55
- "react-countup": "^6.0.0",
56
- "react-dom": "^17.0.2",
57
- "react-file-viewer": "^1.2.1",
58
- "swiper": "^6.7.0",
59
- "use-sync-external-store": "^1.2.0",
60
- "xgplayer": "^2.31.6",
61
- "xgplayer-flv": "^2.5.1",
62
- "xgplayer-flv.js": "^2.3.0",
63
- "xgplayer-hls": "^2.5.2",
64
- "xgplayer-hls.js": "^2.6.1"
65
- },
66
- "peerDependencies": {
67
- "@ant-design/icons": ">=4.2.0",
68
- "antd": ">=4.7.0",
69
- "classnames": ">=2.2.0",
70
- "echarts": "^5.2.2",
71
- "echarts-for-react": "^3.0.2",
72
- "lodash-es": ">=4.17.21",
73
- "react": ">=17.0.0"
74
- },
75
- "devDependencies": {
76
- "@ant-design/icons": "^4.6.4",
77
- "@types/lodash-es": "^4.17.6",
78
- "@types/react-dom": "^17.0.11",
79
- "@types/use-sync-external-store": "^0.0.3",
80
- "@umijs/test": "^3.0.5",
81
- "antd": "^5.2.2",
82
- "classnames": "^2.3.1",
83
- "dumi": "^1.1.31",
84
- "father-build": "^1.19.1",
85
- "gh-pages": "^3.0.0",
86
- "lint-staged": "^10.0.7",
87
- "prettier": "^1.19.1",
88
- "react": "^16.12.0",
89
- "yorkie": "^2.0.0"
90
- }
1
+ {
2
+ "private": false,
3
+ "name": "wargerm",
4
+ "version": "0.7.6",
5
+ "scripts": {
6
+ "dev": "dumi dev",
7
+ "docs:build": "dumi build",
8
+ "docs:deploy": "gh-pages -d docs-dist",
9
+ "build": "father-build",
10
+ "deploy": "npm run docs:build && npm run docs:deploy",
11
+ "release": "npm run build && npm publish",
12
+ "prettier": "prettier --write \"**/*.{js,jsx,tsx,ts,less,md,json}\"",
13
+ "test": "umi-test",
14
+ "test:coverage": "umi-test --coverage"
15
+ },
16
+ "main": "dist/index.js",
17
+ "module": "dist/index.esm.js",
18
+ "unpkg": "dist/index.umd.min.js",
19
+ "typings": "dist/index.d.ts",
20
+ "author": "jinly2",
21
+ "license": "MIT",
22
+ "keywords": [
23
+ "React",
24
+ "Component"
25
+ ],
26
+ "gitHooks": {
27
+ "pre-commit": "lint-staged"
28
+ },
29
+ "repository": {
30
+ "type": "git",
31
+ "url": "http://code.eblssmart.com/platform/web/wargerm-components.git",
32
+ "branch": "main"
33
+ },
34
+ "files": [
35
+ "dist",
36
+ "es",
37
+ "lib",
38
+ "index.css"
39
+ ],
40
+ "lint-staged": {
41
+ "*.{js,jsx,less,md,json}": [
42
+ "prettier --write"
43
+ ],
44
+ "*.ts?(x)": [
45
+ "prettier --parser=typescript --write"
46
+ ]
47
+ },
48
+ "dependencies": {
49
+ "@ant-design/pro-table": "^3.3.1",
50
+ "animate.css": "^4.1.1",
51
+ "dayjs": "^1.11.7",
52
+ "echarts": "^5.2.2",
53
+ "echarts-for-react": "^3.0.2",
54
+ "lodash-es": "^4.17.21",
55
+ "react-countup": "^6.0.0",
56
+ "react-dom": "^17.0.2",
57
+ "react-file-viewer": "^1.2.1",
58
+ "swiper": "^6.7.0",
59
+ "use-sync-external-store": "^1.2.0",
60
+ "xgplayer": "^2.31.6",
61
+ "xgplayer-flv": "^2.5.1",
62
+ "xgplayer-flv.js": "^2.3.0",
63
+ "xgplayer-hls": "^2.5.2",
64
+ "xgplayer-hls.js": "^2.6.1"
65
+ },
66
+ "peerDependencies": {
67
+ "@ant-design/icons": ">=4.2.0",
68
+ "antd": ">=4.7.0",
69
+ "classnames": ">=2.2.0",
70
+ "echarts": "^5.2.2",
71
+ "echarts-for-react": "^3.0.2",
72
+ "lodash-es": ">=4.17.21",
73
+ "react": ">=17.0.0"
74
+ },
75
+ "devDependencies": {
76
+ "@ant-design/icons": "^4.6.4",
77
+ "@types/lodash-es": "^4.17.6",
78
+ "@types/react-dom": "^17.0.11",
79
+ "@types/use-sync-external-store": "^0.0.3",
80
+ "@umijs/test": "^3.0.5",
81
+ "antd": "^5.2.2",
82
+ "classnames": "^2.3.1",
83
+ "dumi": "^1.1.31",
84
+ "father-build": "^1.19.1",
85
+ "gh-pages": "^3.0.0",
86
+ "lint-staged": "^10.0.7",
87
+ "prettier": "^1.19.1",
88
+ "react": "^16.12.0",
89
+ "yorkie": "^2.0.0"
90
+ }
91
91
  }