antd-management-fast-framework 1.11.5 → 1.11.10

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.
@@ -3,6 +3,7 @@ declare class AuthorizationWrapper extends SupplementWrapper {
3
3
  componentAuthority: any;
4
4
  doDidMountTask: () => void;
5
5
  checkAuthority: (auth: any) => boolean;
6
+ checkAuthorities: (auth: any) => boolean;
6
7
  getCurrentOperator: () => any;
7
8
  reloadCurrentOperator: (callback?: any) => void;
8
9
  }
@@ -83,6 +83,10 @@ var AuthorizationWrapper = /*#__PURE__*/function (_SupplementWrapper) {
83
83
  return (0, _authority.checkHasAuthority)(auth);
84
84
  };
85
85
 
86
+ _this.checkAuthorities = function (auth) {
87
+ return (0, _authority.checkHasAuthorities)(auth);
88
+ };
89
+
86
90
  _this.getCurrentOperator = function () {
87
91
  var currentOperator = _this.props.global.currentOperator;
88
92
  return currentOperator;
@@ -11,6 +11,10 @@ require("antd/es/row/style");
11
11
 
12
12
  var _row = _interopRequireDefault(require("antd/es/row"));
13
13
 
14
+ require("antd/es/empty/style");
15
+
16
+ var _empty = _interopRequireDefault(require("antd/es/empty"));
17
+
14
18
  require("antd/es/col/style");
15
19
 
16
20
  var _col = _interopRequireDefault(require("antd/es/col"));
@@ -1661,7 +1665,10 @@ var Common = /*#__PURE__*/function (_Core) {
1661
1665
  }), contentItem.imageBoxProps || {});
1662
1666
 
1663
1667
  var imageBoxContainorStyle = _objectSpread(_objectSpread({}, {
1664
- width: '120px'
1668
+ width: '100px',
1669
+ border: '1px solid #d9d9d9',
1670
+ borderRadius: '4px',
1671
+ padding: '8px'
1665
1672
  }), contentItem.imageBoxContainorStyle || {});
1666
1673
 
1667
1674
  var imageBox = /*#__PURE__*/_react.default.createElement(_ImageBox.default, _extends({
@@ -1695,7 +1702,10 @@ var Common = /*#__PURE__*/function (_Core) {
1695
1702
  }
1696
1703
 
1697
1704
  var _imageBoxContainorStyle = _objectSpread(_objectSpread({}, {
1698
- width: '120px'
1705
+ width: '100px',
1706
+ border: '1px solid #d9d9d9',
1707
+ borderRadius: '4px',
1708
+ padding: '8px'
1699
1709
  }), contentItem.imageBoxContainorStyle || {});
1700
1710
 
1701
1711
  var imageItemShowList = [];
@@ -1726,7 +1736,9 @@ var Common = /*#__PURE__*/function (_Core) {
1726
1736
  }
1727
1737
  });
1728
1738
 
1729
- var imageListContainor = /*#__PURE__*/_react.default.createElement(_space.default, null, imageItemShowList.map(function (o) {
1739
+ var imageListContainor = /*#__PURE__*/_react.default.createElement(_space.default, null, imageItemShowList.length <= 0 ? /*#__PURE__*/_react.default.createElement(_empty.default, {
1740
+ image: _empty.default.PRESENTED_IMAGE_SIMPLE
1741
+ }) : imageItemShowList.map(function (o) {
1730
1742
  return /*#__PURE__*/_react.default.createElement("div", {
1731
1743
  key: o.key,
1732
1744
  style: o.imageBoxContainorStyle
@@ -1,5 +1,6 @@
1
1
  export function getAllAuthority(): any;
2
2
  export function checkIsSuper(): boolean;
3
+ export function checkHasAuthorities(authCollection: any): boolean;
3
4
  export function checkHasAuthority(auth: any): boolean;
4
5
  /**
5
6
  * 缓存用户权限数据体
@@ -3,6 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
+ exports.checkHasAuthorities = checkHasAuthorities;
6
7
  exports.checkHasAuthority = checkHasAuthority;
7
8
  exports.checkIsSuper = checkIsSuper;
8
9
  exports.getAllAuthority = getAllAuthority;
@@ -76,6 +77,44 @@ function checkIsSuper() {
76
77
  return false;
77
78
  }
78
79
 
80
+ function checkHasAuthorities(authCollection) {
81
+ var result = false;
82
+
83
+ if ((0, _tools.isArray)(authCollection)) {
84
+ authCollection.forEach(function (auth) {
85
+ result = checkHasAuthority(auth);
86
+
87
+ if (result) {
88
+ return true;
89
+ }
90
+ });
91
+
92
+ for (var _auth in authCollection) {
93
+ result = checkHasAuthority(_auth);
94
+
95
+ if (result) {
96
+ break;
97
+ }
98
+ }
99
+
100
+ return result;
101
+ }
102
+
103
+ if ((0, _tools.isString)(authCollection)) {
104
+ result = checkHasAuthority(authCollection);
105
+ return result;
106
+ }
107
+
108
+ var text = '无效的待验证权限';
109
+ (0, _tools.showErrorMessage)({
110
+ message: text
111
+ });
112
+ (0, _tools.recordError)({
113
+ auth: auth
114
+ });
115
+ return result;
116
+ }
117
+
79
118
  function checkHasAuthority(auth) {
80
119
  var _accessWayCollection$;
81
120
 
@@ -81,6 +81,7 @@ export const convertCollection: {
81
81
  string: string;
82
82
  moment: string;
83
83
  money: string;
84
+ array: string;
84
85
  };
85
86
  export namespace formatCollection {
86
87
  export const money: string;
@@ -110,7 +110,8 @@ var convertCollection = {
110
110
  datetime: 'datetime',
111
111
  string: 'string',
112
112
  moment: 'moment',
113
- money: 'money'
113
+ money: 'money',
114
+ array: 'array'
114
115
  };
115
116
  exports.convertCollection = convertCollection;
116
117
  var formatCollection = {
package/es/utils/tools.js CHANGED
@@ -1049,6 +1049,10 @@ function getValueByKey(_ref14) {
1049
1049
  result = toMoney(v);
1050
1050
  break;
1051
1051
 
1052
+ case _constants.convertCollection.array:
1053
+ result = (v || null) == null ? [] : isArray(v) ? v : [v];
1054
+ break;
1055
+
1052
1056
  default:
1053
1057
  result = v;
1054
1058
  break;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "antd-management-fast-framework",
3
- "version": "1.11.5",
3
+ "version": "1.11.10",
4
4
  "description": "antd-management-fast-framework",
5
5
  "keywords": [
6
6
  "antd-management-fast-framework"
@@ -40,7 +40,7 @@
40
40
  "classnames": "^2.3.1",
41
41
  "copy-to-clipboard": "^3.3.1",
42
42
  "enquire-js": "^0.2.1",
43
- "html-react-parser": "^1.4.0",
43
+ "html-react-parser": "^1.4.1",
44
44
  "lodash": "^4.17.21",
45
45
  "lodash-decorators": "^6.0.1",
46
46
  "lodash.debounce": "^4.0.8",
@@ -124,10 +124,10 @@
124
124
  "lint-staged": "^12.1.2",
125
125
  "npm-run-all": "^4.1.5",
126
126
  "pify": "^5.0.0",
127
- "postcss": "^8.4.3",
127
+ "postcss": "^8.4.4",
128
128
  "postcss-less": "^5.0.0",
129
129
  "prettier": "^2.5.0",
130
- "puppeteer": "^11.0.0",
130
+ "puppeteer": "^12.0.0",
131
131
  "query-string": "^7.0.1",
132
132
  "react": "^17.0.2",
133
133
  "react-dom": "^17.0.2",
@@ -167,5 +167,5 @@
167
167
  "bugs": {
168
168
  "url": "https://github.com/kityandhero/antd-management-fast-framework/issues"
169
169
  },
170
- "gitHead": "aa387c8a9a319bb8141de51b028950207cb027b3"
170
+ "gitHead": "48e23cd378dbe7cda1566614180397fdc06e066d"
171
171
  }
package/License.txt DELETED
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2021 luzhitao
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.