venus-design 1.1.11 → 1.1.14

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.
@@ -638,10 +638,7 @@ export var builtInMap = {
638
638
  return (dayjs().month() >= 3 ? dayjs().year() : dayjs().year() - 1).toString();
639
639
  },
640
640
  // 财年(3 月起)
641
- uuid: function uuid() {
642
- return crypto.randomUUID();
643
- },
644
- // RFC4122 v4
641
+ //uuid: () => crypto.randomUUID(), // RFC4122 v4
645
642
  random6: function random6() {
646
643
  return String(Math.floor(Math.random() * 1e6)).padStart(6, '0');
647
644
  },
@@ -55,7 +55,7 @@ var _excluded = ["children", "pageLoading", "pageFormClassName", "submitter", "s
55
55
  _excluded27 = ["comAttr", "valueEnum", "options", "placeholder", "disabled"],
56
56
  _excluded28 = ["comAttr", "valueEnum", "options", "placeholder", "disabled"],
57
57
  _excluded29 = ["comAttr", "placeholder", "disabled", "minRows"],
58
- _excluded30 = ["comAttr", "placeholder", "span", "disabled"],
58
+ _excluded30 = ["comAttr", "placeholder", "disabled"],
59
59
  _excluded31 = ["comAttr", "placeholder", "disabled", "isDuo"],
60
60
  _excluded32 = ["comAttr", "placeholder", "disabled", "unit", "unitName"],
61
61
  _excluded33 = ["comAttr", "placeholder", "disabled"],
@@ -544,16 +544,25 @@ export var VenusFormSelect = function VenusFormSelect(props) {
544
544
  disabled = props.disabled,
545
545
  key = props.key,
546
546
  others = _objectWithoutProperties(props, _excluded23);
547
+ // 过滤函数:检查值是否在排除列表中
548
+ var isVisible = function isVisible(value) {
549
+ var _comAttr$excludedValu;
550
+ return !(comAttr !== null && comAttr !== void 0 && (_comAttr$excludedValu = comAttr.excludedValues) !== null && _comAttr$excludedValu !== void 0 && _comAttr$excludedValu.includes(value));
551
+ };
547
552
  var renderOps = function renderOps() {
548
553
  if (options) {
549
- return options.map(function (ls) {
554
+ return options.filter(function (ls) {
555
+ return isVisible(ls.value);
556
+ }).map(function (ls) {
550
557
  return /*#__PURE__*/React.createElement(_Select.Option, {
551
558
  value: ls.value,
552
559
  key: ls.value
553
560
  }, ls.label);
554
561
  });
555
562
  }
556
- return Object.keys(valueEnum).map(function (ls) {
563
+ return Object.keys(valueEnum).filter(function (ls) {
564
+ return isVisible(ls);
565
+ }).map(function (ls) {
557
566
  return /*#__PURE__*/React.createElement(_Select.Option, {
558
567
  value: ls,
559
568
  key: ls
@@ -714,7 +723,6 @@ export var VenusFormNumber = function VenusFormNumber(props) {
714
723
  var _props$comAttr25 = props.comAttr,
715
724
  comAttr = _props$comAttr25 === void 0 ? {} : _props$comAttr25,
716
725
  placeholder = props.placeholder,
717
- span = props.span,
718
726
  disabled = props.disabled,
719
727
  others = _objectWithoutProperties(props, _excluded30);
720
728
  return /*#__PURE__*/React.createElement(FormItem2, others, /*#__PURE__*/React.createElement(_InputNumber, _extends({
@@ -410,31 +410,33 @@ export var VENUS_TABLE_COLUMNRENDER_TYPE = {
410
410
  },
411
411
  "renderStatus": function renderStatus(column, actions) {
412
412
  return function (text, record, _, action) {
413
- return [record.approvalState == "DRAFT" ? /*#__PURE__*/React.createElement(_Badge, {
413
+ //@ts-ignore
414
+ var approvalState = record[column.fieldId];
415
+ return [record[approvalState] == "DRAFT" ? /*#__PURE__*/React.createElement(_Badge, {
414
416
  color: "rgb(255, 183, 0)",
415
417
  text: text,
416
418
  style: {
417
419
  marginRight: 3
418
420
  }
419
- }) : record.approvalState == "ADJUSTAPPROVAL" ? /*#__PURE__*/React.createElement(_Badge, {
421
+ }) : record[approvalState] == "ADJUSTAPPROVAL" ? /*#__PURE__*/React.createElement(_Badge, {
420
422
  color: "rgba(255, 0, 119, 0.89)",
421
423
  text: text,
422
424
  style: {
423
425
  marginRight: 3
424
426
  }
425
- }) : record.approvalState == "APPROVAL" ? /*#__PURE__*/React.createElement(_Badge, {
427
+ }) : record[approvalState] == "APPROVAL" ? /*#__PURE__*/React.createElement(_Badge, {
426
428
  color: "rgb(255, 0, 72)",
427
429
  text: text,
428
430
  style: {
429
431
  marginRight: 3
430
432
  }
431
- }) : record.approvalState == "COMPLETED" ? /*#__PURE__*/React.createElement(_Badge, {
433
+ }) : record[approvalState] == "COMPLETED" ? /*#__PURE__*/React.createElement(_Badge, {
432
434
  color: "rgb(0, 255, 119)",
433
435
  text: text,
434
436
  style: {
435
437
  marginRight: 3
436
438
  }
437
- }) : record.approvalState == "DISAGREE" ? /*#__PURE__*/React.createElement(_Badge, {
439
+ }) : record[approvalState] == "DISAGREE" ? /*#__PURE__*/React.createElement(_Badge, {
438
440
  color: "rgb(0, 217, 255)",
439
441
  text: text,
440
442
  style: {
@@ -554,13 +556,13 @@ export var VENUS_TABLE_COLUMNRENDER_TYPE = {
554
556
  if (!Component) return /*#__PURE__*/React.createElement("span", null, text); // 没配就回退纯文本
555
557
 
556
558
  /* 公共属性 */
557
- var commonProps = {
559
+ var commonProps = _objectSpread({
558
560
  autoFocus: true,
559
561
  defaultValue: text,
560
562
  style: {
561
563
  width: '100%'
562
564
  }
563
- };
565
+ }, actions.commonProps);
564
566
 
565
567
  /* 需要 onChange 的组件 */
566
568
  var changeTypes = ['Select', 'SecurityLevel', 'DatePicker', 'UserPicker', 'DeptPicker'];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "venus-design",
3
- "version": "1.1.11",
3
+ "version": "1.1.14",
4
4
  "description": "venus all compoments",
5
5
  "module": "dist/index.js",
6
6
  "types": "dist/index.d.ts",