wargerm 0.5.33 → 0.5.34

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
@@ -11459,6 +11459,7 @@ function Calendar(_ref, ref) {
11459
11459
  type = _ref.type,
11460
11460
  toolBarSolt = _ref.toolBarSolt,
11461
11461
  dateCellRender = _ref.dateCellRender,
11462
+ onCell = _ref.onCell,
11462
11463
  calendarBodyClassName = _ref.calendarBodyClassName;
11463
11464
 
11464
11465
  var _useState = useState(initCalendar()),
@@ -11569,6 +11570,7 @@ function Calendar(_ref, ref) {
11569
11570
  type: "text",
11570
11571
  onClick: handleUp
11571
11572
  }), type == 'day' ? /*#__PURE__*/React.createElement(_DatePicker, {
11573
+ allowClear: false,
11572
11574
  value: datevalue,
11573
11575
  onChange: function onChange(date) {
11574
11576
  setOneWeekDays(['时间'].concat(_toConsumableArray(getweekDay(date))));
@@ -11579,6 +11581,7 @@ function Calendar(_ref, ref) {
11579
11581
  width: '250px'
11580
11582
  }
11581
11583
  }) : type == 'week' ? /*#__PURE__*/React.createElement(_DatePicker, {
11584
+ allowClear: false,
11582
11585
  value: datevalue,
11583
11586
  style: {
11584
11587
  width: '250px'
@@ -11591,6 +11594,7 @@ function Calendar(_ref, ref) {
11591
11594
  setDatevalue(date);
11592
11595
  }
11593
11596
  }) : /*#__PURE__*/React.createElement(_DatePicker, {
11597
+ allowClear: false,
11594
11598
  value: datevalue,
11595
11599
  picker: "month",
11596
11600
  onChange: function onChange(date) {
@@ -11625,13 +11629,20 @@ function Calendar(_ref, ref) {
11625
11629
  gridTemplateColumns: type == 'week' ? 'repeat(8, 1fr)' : '1fr 7fr'
11626
11630
  }
11627
11631
  }, days === null || days === void 0 ? void 0 : days.map(function (day, index) {
11628
- return /*#__PURE__*/React.createElement("div", {
11632
+ var _onCell;
11633
+
11634
+ var number = onCell && ((_onCell = onCell(days, day)) === null || _onCell === void 0 ? void 0 : _onCell.rowSpan) || 1;
11635
+ return number ? /*#__PURE__*/React.createElement("div", {
11629
11636
  onClick: function onClick() {
11630
11637
  return cellClick(day);
11631
11638
  },
11639
+ style: {
11640
+ gridRowStart: "span ".concat(number),
11641
+ height: number * 100
11642
+ },
11632
11643
  className: "day_container ".concat(day.isCurrentDay ? 'isCurrentDay' : '', " ").concat(day.isCurrentMonth ? 'isCurrentMonth' : ''),
11633
11644
  key: index
11634
- }, dateCellRender ? dateCellRender(day) : day.text);
11645
+ }, dateCellRender ? dateCellRender(day) : day.text) : null;
11635
11646
  }))) : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
11636
11647
  className: "calendar_header_wrapper"
11637
11648
  }, weekLabelArray.map(function (weekLabel) {
@@ -11965,11 +11976,14 @@ function VideoPlayer(_ref, ref) {
11965
11976
  currentLayoutIndex = _useState2[0],
11966
11977
  setCurrentLayoutIndex = _useState2[1];
11967
11978
 
11968
- var _useState3 = useState(url),
11979
+ var _useState3 = useState([]),
11969
11980
  _useState4 = _slicedToArray(_useState3, 2),
11970
11981
  urls = _useState4[0],
11971
11982
  setUrls = _useState4[1];
11972
11983
 
11984
+ useEffect(function () {
11985
+ setUrls(url);
11986
+ }, [url]);
11973
11987
  var initPlayerIndex = allLayouts[layoutIndex || 0].span >= url.length ? url.length - 1 >= 0 ? url.length - 1 : 0 : allLayouts[layoutIndex || 0].span - 1;
11974
11988
 
11975
11989
  var _useState5 = useState(initPlayerIndex),
package/dist/index.js CHANGED
@@ -11521,6 +11521,7 @@ function Calendar(_ref, ref) {
11521
11521
  type = _ref.type,
11522
11522
  toolBarSolt = _ref.toolBarSolt,
11523
11523
  dateCellRender = _ref.dateCellRender,
11524
+ onCell = _ref.onCell,
11524
11525
  calendarBodyClassName = _ref.calendarBodyClassName;
11525
11526
 
11526
11527
  var _useState = React.useState(initCalendar()),
@@ -11631,6 +11632,7 @@ function Calendar(_ref, ref) {
11631
11632
  type: "text",
11632
11633
  onClick: handleUp
11633
11634
  }), type == 'day' ? /*#__PURE__*/React__default['default'].createElement(_DatePicker__default['default'], {
11635
+ allowClear: false,
11634
11636
  value: datevalue,
11635
11637
  onChange: function onChange(date) {
11636
11638
  setOneWeekDays(['时间'].concat(_toConsumableArray(getweekDay(date))));
@@ -11641,6 +11643,7 @@ function Calendar(_ref, ref) {
11641
11643
  width: '250px'
11642
11644
  }
11643
11645
  }) : type == 'week' ? /*#__PURE__*/React__default['default'].createElement(_DatePicker__default['default'], {
11646
+ allowClear: false,
11644
11647
  value: datevalue,
11645
11648
  style: {
11646
11649
  width: '250px'
@@ -11653,6 +11656,7 @@ function Calendar(_ref, ref) {
11653
11656
  setDatevalue(date);
11654
11657
  }
11655
11658
  }) : /*#__PURE__*/React__default['default'].createElement(_DatePicker__default['default'], {
11659
+ allowClear: false,
11656
11660
  value: datevalue,
11657
11661
  picker: "month",
11658
11662
  onChange: function onChange(date) {
@@ -11687,13 +11691,20 @@ function Calendar(_ref, ref) {
11687
11691
  gridTemplateColumns: type == 'week' ? 'repeat(8, 1fr)' : '1fr 7fr'
11688
11692
  }
11689
11693
  }, days === null || days === void 0 ? void 0 : days.map(function (day, index) {
11690
- return /*#__PURE__*/React__default['default'].createElement("div", {
11694
+ var _onCell;
11695
+
11696
+ var number = onCell && ((_onCell = onCell(days, day)) === null || _onCell === void 0 ? void 0 : _onCell.rowSpan) || 1;
11697
+ return number ? /*#__PURE__*/React__default['default'].createElement("div", {
11691
11698
  onClick: function onClick() {
11692
11699
  return cellClick(day);
11693
11700
  },
11701
+ style: {
11702
+ gridRowStart: "span ".concat(number),
11703
+ height: number * 100
11704
+ },
11694
11705
  className: "day_container ".concat(day.isCurrentDay ? 'isCurrentDay' : '', " ").concat(day.isCurrentMonth ? 'isCurrentMonth' : ''),
11695
11706
  key: index
11696
- }, dateCellRender ? dateCellRender(day) : day.text);
11707
+ }, dateCellRender ? dateCellRender(day) : day.text) : null;
11697
11708
  }))) : /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement("div", {
11698
11709
  className: "calendar_header_wrapper"
11699
11710
  }, weekLabelArray.map(function (weekLabel) {
@@ -12027,11 +12038,14 @@ function VideoPlayer(_ref, ref) {
12027
12038
  currentLayoutIndex = _useState2[0],
12028
12039
  setCurrentLayoutIndex = _useState2[1];
12029
12040
 
12030
- var _useState3 = React.useState(url),
12041
+ var _useState3 = React.useState([]),
12031
12042
  _useState4 = _slicedToArray(_useState3, 2),
12032
12043
  urls = _useState4[0],
12033
12044
  setUrls = _useState4[1];
12034
12045
 
12046
+ React.useEffect(function () {
12047
+ setUrls(url);
12048
+ }, [url]);
12035
12049
  var initPlayerIndex = allLayouts[layoutIndex || 0].span >= url.length ? url.length - 1 >= 0 ? url.length - 1 : 0 : allLayouts[layoutIndex || 0].span - 1;
12036
12050
 
12037
12051
  var _useState5 = React.useState(initPlayerIndex),
package/package.json CHANGED
@@ -1,88 +1,88 @@
1
- {
2
- "private": false,
3
- "name": "wargerm",
4
- "version": "0.5.33",
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": "^2.79.0",
50
- "animate.css": "^4.1.1",
51
- "echarts": "^5.2.2",
52
- "echarts-for-react": "^3.0.2",
53
- "react-countup": "^6.0.0",
54
- "react-dom": "^17.0.2",
55
- "react-file-viewer": "^1.2.1",
56
- "swiper": "^6.7.0",
57
- "xgplayer": "^2.31.6",
58
- "xgplayer-flv": "^2.5.1",
59
- "xgplayer-flv.js": "^2.3.0",
60
- "xgplayer-hls": "^2.5.2",
61
- "xgplayer-hls.js": "^2.6.1"
62
- },
63
- "peerDependencies": {
64
- "@ant-design/icons": ">=4.2.0",
65
- "antd": ">=4.7.0",
66
- "classnames": ">=2.2.0",
67
- "echarts": "^5.2.2",
68
- "echarts-for-react": "^3.0.2",
69
- "lodash": ">=4.0.0",
70
- "react": ">=17.0.0"
71
- },
72
- "devDependencies": {
73
- "@ant-design/icons": "^4.6.4",
74
- "@types/lodash": "^4.14.173",
75
- "@types/react-dom": "^17.0.11",
76
- "@umijs/test": "^3.0.5",
77
- "antd": "^4.16.13",
78
- "babel-plugin-import": "^1.13.3",
79
- "classnames": "^2.3.1",
80
- "dumi": "^1.1.31",
81
- "father-build": "^1.19.1",
82
- "gh-pages": "^3.0.0",
83
- "lint-staged": "^10.0.7",
84
- "prettier": "^1.19.1",
85
- "react": "^16.12.0",
86
- "yorkie": "^2.0.0"
87
- }
88
- }
1
+ {
2
+ "private": false,
3
+ "name": "wargerm",
4
+ "version": "0.5.34",
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": "^2.79.0",
50
+ "animate.css": "^4.1.1",
51
+ "echarts": "^5.2.2",
52
+ "echarts-for-react": "^3.0.2",
53
+ "react-countup": "^6.0.0",
54
+ "react-dom": "^17.0.2",
55
+ "react-file-viewer": "^1.2.1",
56
+ "swiper": "^6.7.0",
57
+ "xgplayer": "^2.31.6",
58
+ "xgplayer-flv": "^2.5.1",
59
+ "xgplayer-flv.js": "^2.3.0",
60
+ "xgplayer-hls": "^2.5.2",
61
+ "xgplayer-hls.js": "^2.6.1"
62
+ },
63
+ "peerDependencies": {
64
+ "@ant-design/icons": ">=4.2.0",
65
+ "antd": ">=4.7.0",
66
+ "classnames": ">=2.2.0",
67
+ "echarts": "^5.2.2",
68
+ "echarts-for-react": "^3.0.2",
69
+ "lodash": ">=4.0.0",
70
+ "react": ">=17.0.0"
71
+ },
72
+ "devDependencies": {
73
+ "@ant-design/icons": "^4.6.4",
74
+ "@types/lodash": "^4.14.173",
75
+ "@types/react-dom": "^17.0.11",
76
+ "@umijs/test": "^3.0.5",
77
+ "antd": "^4.16.13",
78
+ "babel-plugin-import": "^1.13.3",
79
+ "classnames": "^2.3.1",
80
+ "dumi": "^1.1.31",
81
+ "father-build": "^1.19.1",
82
+ "gh-pages": "^3.0.0",
83
+ "lint-staged": "^10.0.7",
84
+ "prettier": "^1.19.1",
85
+ "react": "^16.12.0",
86
+ "yorkie": "^2.0.0"
87
+ }
88
+ }