@bit-sun/business-component 3.0.0-alpha.33 → 3.0.0-alpha.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
@@ -32629,7 +32629,8 @@ var RuleObjectComponent = /*#__PURE__*/function (_Component) {
32629
32629
  var ruleClassData = _this.state.ruleClassData;
32630
32630
  var _this$props2 = _this.props,
32631
32631
  callBack = _this$props2.callBack,
32632
- ruleTypeData = _this$props2.ruleTypeData,
32632
+ _this$props2$ruleType = _this$props2.ruleTypeData,
32633
+ ruleTypeData = _this$props2$ruleType === void 0 ? [] : _this$props2$ruleType,
32633
32634
  ruleGroupInfo = _this$props2.ruleGroupInfo;
32634
32635
  var isRuleInstance = (ruleGroupInfo === null || ruleGroupInfo === void 0 ? void 0 : (_ruleGroupInfo$type2 = ruleGroupInfo.type) === null || _ruleGroupInfo$type2 === void 0 ? void 0 : _ruleGroupInfo$type2.indexOf('instance')) > -1;
32635
32636
  var initKongData = {
@@ -32646,7 +32647,7 @@ var RuleObjectComponent = /*#__PURE__*/function (_Component) {
32646
32647
  enable: false,
32647
32648
  value: ''
32648
32649
  },
32649
- execute: ruleTypeData.map(function (s) {
32650
+ execute: (ruleTypeData === null || ruleTypeData === void 0 ? void 0 : ruleTypeData.map(function (s) {
32650
32651
  return {
32651
32652
  priority: 1,
32652
32653
  code: s.code,
@@ -32654,7 +32655,7 @@ var RuleObjectComponent = /*#__PURE__*/function (_Component) {
32654
32655
  configPropertyCode: 'configPropertyValue'
32655
32656
  }
32656
32657
  };
32657
- })
32658
+ })) || []
32658
32659
  }
32659
32660
  };
32660
32661
  var initTemplateData = (ruleGroupInfo === null || ruleGroupInfo === void 0 ? void 0 : ruleGroupInfo.templateData) && ((_Object$keys2 = Object.keys(ruleGroupInfo === null || ruleGroupInfo === void 0 ? void 0 : ruleGroupInfo.templateData)) === null || _Object$keys2 === void 0 ? void 0 : _Object$keys2.length) ? _objectSpread2({
package/dist/index.js CHANGED
@@ -32651,7 +32651,8 @@ var RuleObjectComponent = /*#__PURE__*/function (_Component) {
32651
32651
  var ruleClassData = _this.state.ruleClassData;
32652
32652
  var _this$props2 = _this.props,
32653
32653
  callBack = _this$props2.callBack,
32654
- ruleTypeData = _this$props2.ruleTypeData,
32654
+ _this$props2$ruleType = _this$props2.ruleTypeData,
32655
+ ruleTypeData = _this$props2$ruleType === void 0 ? [] : _this$props2$ruleType,
32655
32656
  ruleGroupInfo = _this$props2.ruleGroupInfo;
32656
32657
  var isRuleInstance = (ruleGroupInfo === null || ruleGroupInfo === void 0 ? void 0 : (_ruleGroupInfo$type2 = ruleGroupInfo.type) === null || _ruleGroupInfo$type2 === void 0 ? void 0 : _ruleGroupInfo$type2.indexOf('instance')) > -1;
32657
32658
  var initKongData = {
@@ -32668,7 +32669,7 @@ var RuleObjectComponent = /*#__PURE__*/function (_Component) {
32668
32669
  enable: false,
32669
32670
  value: ''
32670
32671
  },
32671
- execute: ruleTypeData.map(function (s) {
32672
+ execute: (ruleTypeData === null || ruleTypeData === void 0 ? void 0 : ruleTypeData.map(function (s) {
32672
32673
  return {
32673
32674
  priority: 1,
32674
32675
  code: s.code,
@@ -32676,7 +32677,7 @@ var RuleObjectComponent = /*#__PURE__*/function (_Component) {
32676
32677
  configPropertyCode: 'configPropertyValue'
32677
32678
  }
32678
32679
  };
32679
- })
32680
+ })) || []
32680
32681
  }
32681
32682
  };
32682
32683
  var initTemplateData = (ruleGroupInfo === null || ruleGroupInfo === void 0 ? void 0 : ruleGroupInfo.templateData) && ((_Object$keys2 = Object.keys(ruleGroupInfo === null || ruleGroupInfo === void 0 ? void 0 : ruleGroupInfo.templateData)) === null || _Object$keys2 === void 0 ? void 0 : _Object$keys2.length) ? _objectSpread2({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bit-sun/business-component",
3
- "version": "3.0.0-alpha.33",
3
+ "version": "3.0.0-alpha.34",
4
4
  "scripts": {
5
5
  "start": "dumi dev",
6
6
  "docs:build": "dumi build",
@@ -529,7 +529,7 @@ class RuleObjectComponent extends Component {
529
529
 
530
530
  handleAddRule = () => {
531
531
  const { ruleClassData } = this.state;
532
- const { callBack, ruleTypeData, ruleGroupInfo } = this.props;
532
+ const { callBack, ruleTypeData=[], ruleGroupInfo } = this.props;
533
533
  const isRuleInstance = ruleGroupInfo?.type?.indexOf('instance') > -1;
534
534
  const initKongData = {
535
535
  ruleName: `规则${ruleClassData?.length + 1}`,
@@ -545,7 +545,7 @@ class RuleObjectComponent extends Component {
545
545
  enable: false,
546
546
  value: '',
547
547
  },
548
- execute: ruleTypeData.map((s) => {
548
+ execute: ruleTypeData?.map((s) => {
549
549
  return {
550
550
  priority: 1,
551
551
  code: s.code,
@@ -553,7 +553,7 @@ class RuleObjectComponent extends Component {
553
553
  configPropertyCode: 'configPropertyValue',
554
554
  },
555
555
  };
556
- }),
556
+ })||[],
557
557
  },
558
558
  }
559
559
  const initTemplateData = ruleGroupInfo?.templateData && Object.keys(ruleGroupInfo?.templateData)?.length ? {