fan-standard-comp 4.0.2 → 4.0.4

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.
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.default = void 0;
7
7
  var _genStyleHook = require("../../theme/utils/genStyleHook");
8
8
  var _index = require("../../theme/index");
9
- var _tinycolor = require("@ctrl/tinycolor");
10
9
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
11
10
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
12
11
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
@@ -23,11 +22,10 @@ var StandardTableStyleFunc = function StandardTableStyleFunc(prefix) {
23
22
  var prefixCls = ".".concat(prefix);
24
23
  var rowTd = {
25
24
  '> td': {
26
- borderColor: new _tinycolor.TinyColor(token.colorPrimary).setAlpha(0.5).toRgbString(),
27
- // fade(@primary-color, 50%),
28
- '&::before': {
29
- borderTop: "1px solid ".concat(new _tinycolor.TinyColor(token.colorPrimary).setAlpha(0.5).toRgbString())
30
- }
25
+ // borderColor: new TinyColor(token.colorPrimary).setAlpha(0.5).toRgbString(), // fade(@primary-color, 50%),
26
+ // '&::before': {
27
+ // borderTop: `1px solid ${new TinyColor(token.colorPrimary).setAlpha(0.5).toRgbString()}`,
28
+ // }
31
29
  }
32
30
  };
33
31
  return [_defineProperty(_defineProperty(_defineProperty({}, prefixCls, {
@@ -46,22 +44,22 @@ var StandardTableStyleFunc = function StandardTableStyleFunc(prefix) {
46
44
  // 固定右侧列的样式
47
45
  '.ant-table-fixed-left table.ant-table-fixed': {
48
46
  '.ant-table-thead > tr > th, .ant-table-tbody > tr > td': {
49
- paddingRight: token.paddingMD / 2,
47
+ paddingRight: token.paddingMD,
50
48
  '&:first-child': {
51
49
  paddingLeft: token.paddingMD,
52
- paddingRight: token.paddingMD / 2
50
+ paddingRight: token.paddingMD
53
51
  }
54
52
  }
55
53
  },
56
54
  // 固定右侧列的样式
57
55
  '.ant-table-fixed-right': {
58
56
  '.ant-table-thead > tr > th, .ant-table-tbody > tr > td': {
59
- paddingRight: token.paddingMD / 2,
57
+ paddingRight: token.paddingMD,
60
58
  '&:first-child': {
61
- paddingLeft: token.paddingMD / 2
59
+ paddingLeft: token.paddingMD
62
60
  },
63
61
  '&:nth-last-child(1)': {
64
- paddingLeft: token.paddingMD / 2,
62
+ paddingLeft: token.paddingMD,
65
63
  paddingRight: token.paddingMD
66
64
  }
67
65
  }
@@ -89,7 +87,7 @@ var StandardTableStyleFunc = function StandardTableStyleFunc(prefix) {
89
87
  fontSize: token.fontSizeLG
90
88
  },
91
89
  '.ant-table-thead > tr > th': {
92
- padding: "12px ".concat(token.paddingMD / 2, "px"),
90
+ padding: "12px ".concat(token.paddingMD, "px"),
93
91
  '&:first-child': {
94
92
  paddingLeft: token.paddingMD
95
93
  },
@@ -98,7 +96,7 @@ var StandardTableStyleFunc = function StandardTableStyleFunc(prefix) {
98
96
  }
99
97
  },
100
98
  '.ant-table-tbody > tr > td ': {
101
- padding: "12px ".concat(token.paddingMD / 2, "px"),
99
+ padding: "12px ".concat(token.paddingMD, "px"),
102
100
  '&:first-child': {
103
101
  paddingLeft: token.paddingMD
104
102
  },
@@ -1,5 +1,5 @@
1
1
  declare const btnClickFunc: (fn: any, params?: {}) => any;
2
2
  declare const btnIsDisabled: (isDisabled: any, params?: {}) => any;
3
3
  declare const btnIsHide: (isHide: any, params?: {}) => any;
4
- declare const removeNoPermission: (array: any, permissionCodes: any, codes: any, params: any) => any[];
4
+ declare const removeNoPermission: (array: any, permissionCodes: any, codesList: any, params: any) => any[];
5
5
  export { removeNoPermission, btnIsHide, btnIsDisabled, btnClickFunc };
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.removeNoPermission = exports.btnIsHide = exports.btnIsDisabled = exports.btnClickFunc = void 0;
7
7
  var _lodash = _interopRequireDefault(require("lodash"));
8
+ var _index = require("../data/index");
8
9
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
9
10
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
10
11
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
@@ -58,7 +59,9 @@ var btnIsHide = exports.btnIsHide = function btnIsHide(isHide) {
58
59
  return isHide;
59
60
  };
60
61
  // 重新组合数据(排除不包含在permissionCodes内及isHide数据
61
- var removeNoPermission = exports.removeNoPermission = function removeNoPermission(array, permissionCodes, codes, params) {
62
+ var removeNoPermission = exports.removeNoPermission = function removeNoPermission(array, permissionCodes, codesList, params) {
63
+ // 合并本地的codes
64
+ var codes = _lodash.default.unionBy(codesList || [], _index.funcCode.btnFuncCodes, 'code');
62
65
  return Array.isArray(array) && array.filter(function (item) {
63
66
  if (item.children) {
64
67
  item.children = removeNoPermission(item.children, permissionCodes, codes, params);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fan-standard-comp",
3
- "version": "4.0.2",
3
+ "version": "4.0.4",
4
4
  "description": "FZ standard-comp,basic of antd5.0 and custom component.",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",
@@ -77,14 +77,13 @@
77
77
  "prettier": "^2.7.1",
78
78
  "prettier-plugin-organize-imports": "^3.0.0",
79
79
  "prettier-plugin-packagejson": "^2.2.18",
80
- "react": "^18.0.0",
81
- "react-dom": "^18.0.0",
80
+ "react": "18.2.0",
81
+ "react-dom": "18.2.0",
82
82
  "stylelint": "^14.9.1"
83
83
  },
84
84
  "dependencies": {
85
85
  "@babel/preset-react": "^7.24.1",
86
86
  "@types/lodash": "^4.17.0",
87
- "ant-design-draggable-modal": "^1.0.0",
88
87
  "antd": "5.18.1",
89
88
  "antd-style": "^3.6.1",
90
89
  "babel": "^6.23.0",