wargerm 0.4.28 → 0.4.29

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.
@@ -8,6 +8,7 @@ interface IsliderTabs {
8
8
  tabClassName?: string;
9
9
  activeTabClassName?: string;
10
10
  components: Array<ReactNode>;
11
+ onChange?: (event: any) => void;
11
12
  }
12
13
  declare type Props = {
13
14
  title: ReactNode;
package/dist/index.esm.js CHANGED
@@ -9606,7 +9606,7 @@ var Index$b = function Index(_ref) {
9606
9606
  var _excluded$d = ["title", "className", "headerTail", "headerCenter", "sliderTabs"];
9607
9607
 
9608
9608
  var Index$c = function Index(_ref, ref) {
9609
- var _classNames;
9609
+ var _classNames, _sliderTabs$component;
9610
9610
 
9611
9611
  var title = _ref.title,
9612
9612
  _ref$className = _ref.className,
@@ -9641,14 +9641,15 @@ var Index$c = function Index(_ref, ref) {
9641
9641
  className: "dot"
9642
9642
  }), title), headerCenter, headerTail) : null, /*#__PURE__*/React.createElement("div", {
9643
9643
  className: "body"
9644
- }, sliderTabs ? sliderTabs.components[activeTab] : props.children)), sliderTabs && /*#__PURE__*/React.createElement("div", {
9644
+ }, (sliderTabs === null || sliderTabs === void 0 ? void 0 : (_sliderTabs$component = sliderTabs.components) === null || _sliderTabs$component === void 0 ? void 0 : _sliderTabs$component[activeTab]) || props.children)), sliderTabs && /*#__PURE__*/React.createElement("div", {
9645
9645
  className: "sliderTabs ".concat(sliderTabs.direction == 'left' ? "left ".concat(sliderTabs.className || '') : "right ".concat(sliderTabs.className || ''))
9646
9646
  }, sliderTabs.tabs.map(function (item, index) {
9647
9647
  return /*#__PURE__*/React.createElement("div", {
9648
9648
  className: "tab ".concat(index == activeTab ? 'active' : '', " ").concat(sliderTabs.tabClassName || '', " ").concat(sliderTabs.activeTabClassName || '')
9649
9649
  }, /*#__PURE__*/React.createElement("span", {
9650
9650
  onClick: function onClick() {
9651
- return setActiveTab(index);
9651
+ setActiveTab(index);
9652
+ sliderTabs.onChange && (sliderTabs === null || sliderTabs === void 0 ? void 0 : sliderTabs.onChange(index));
9652
9653
  }
9653
9654
  }, item));
9654
9655
  }))));
package/dist/index.js CHANGED
@@ -9665,7 +9665,7 @@ var Index$b = function Index(_ref) {
9665
9665
  var _excluded$d = ["title", "className", "headerTail", "headerCenter", "sliderTabs"];
9666
9666
 
9667
9667
  var Index$c = function Index(_ref, ref) {
9668
- var _classNames;
9668
+ var _classNames, _sliderTabs$component;
9669
9669
 
9670
9670
  var title = _ref.title,
9671
9671
  _ref$className = _ref.className,
@@ -9700,14 +9700,15 @@ var Index$c = function Index(_ref, ref) {
9700
9700
  className: "dot"
9701
9701
  }), title), headerCenter, headerTail) : null, /*#__PURE__*/React__default['default'].createElement("div", {
9702
9702
  className: "body"
9703
- }, sliderTabs ? sliderTabs.components[activeTab] : props.children)), sliderTabs && /*#__PURE__*/React__default['default'].createElement("div", {
9703
+ }, (sliderTabs === null || sliderTabs === void 0 ? void 0 : (_sliderTabs$component = sliderTabs.components) === null || _sliderTabs$component === void 0 ? void 0 : _sliderTabs$component[activeTab]) || props.children)), sliderTabs && /*#__PURE__*/React__default['default'].createElement("div", {
9704
9704
  className: "sliderTabs ".concat(sliderTabs.direction == 'left' ? "left ".concat(sliderTabs.className || '') : "right ".concat(sliderTabs.className || ''))
9705
9705
  }, sliderTabs.tabs.map(function (item, index) {
9706
9706
  return /*#__PURE__*/React__default['default'].createElement("div", {
9707
9707
  className: "tab ".concat(index == activeTab ? 'active' : '', " ").concat(sliderTabs.tabClassName || '', " ").concat(sliderTabs.activeTabClassName || '')
9708
9708
  }, /*#__PURE__*/React__default['default'].createElement("span", {
9709
9709
  onClick: function onClick() {
9710
- return setActiveTab(index);
9710
+ setActiveTab(index);
9711
+ sliderTabs.onChange && (sliderTabs === null || sliderTabs === void 0 ? void 0 : sliderTabs.onChange(index));
9711
9712
  }
9712
9713
  }, item));
9713
9714
  }))));
package/package.json CHANGED
@@ -1,88 +1,88 @@
1
- {
2
- "private": false,
3
- "name": "wargerm",
4
- "version": "0.4.28",
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-form": "^1.49.3",
50
- "@ant-design/pro-table": "^2.58.1",
51
- "animate.css": "^4.1.1",
52
- "react-countup": "^6.0.0",
53
- "react-dom": "^17.0.2",
54
- "echarts": "^5.2.2",
55
- "echarts-for-react": "^3.0.2",
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.4.29",
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-form": "^1.49.3",
50
+ "@ant-design/pro-table": "^2.58.1",
51
+ "animate.css": "^4.1.1",
52
+ "react-countup": "^6.0.0",
53
+ "react-dom": "^17.0.2",
54
+ "echarts": "^5.2.2",
55
+ "echarts-for-react": "^3.0.2",
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
+ }