wargerm 0.7.66 → 0.7.68

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.js CHANGED
@@ -12,6 +12,7 @@ var classnames = require('classnames');
12
12
  var zhCN = require('antd/es/date-picker/locale/zh_CN');
13
13
  var dayjs = require('dayjs');
14
14
  require('dayjs/locale/zh-cn');
15
+ var lib = require('antd/lib');
15
16
  var CountUp = require('react-countup');
16
17
  var react = require('swiper/react');
17
18
  var SwiperCore = require('swiper');
@@ -3343,7 +3344,145 @@ var WCascader = function WCascader(props) {
3343
3344
  }, extraProps));
3344
3345
  };
3345
3346
 
3346
- var _excluded$9 = ["columns", "extraColumns", "className", "style", "search", "disabled", "disabledHideInSearch", "disabledRuler", "onFormChange", "onSubmit", "onReset", "setForm", "deps"];
3347
+ var _excluded$9 = ["request", "valueEnum", "onLoad", "params"];
3348
+ var WRadioGroup = function WRadioGroup(props) {
3349
+ var request = props.request,
3350
+ valueEnum = props.valueEnum,
3351
+ onLoad = props.onLoad,
3352
+ params = props.params,
3353
+ extraProps = _objectWithoutProperties(props, _excluded$9);
3354
+ var _useState = React.useState([]),
3355
+ _useState2 = _slicedToArray(_useState, 2),
3356
+ options = _useState2[0],
3357
+ setOptions = _useState2[1];
3358
+ React.useEffect(function () {
3359
+ var isMounted = true;
3360
+ _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
3361
+ var res;
3362
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
3363
+ while (1) switch (_context.prev = _context.next) {
3364
+ case 0:
3365
+ if (!request) {
3366
+ _context.next = 8;
3367
+ break;
3368
+ }
3369
+ _context.next = 3;
3370
+ return request();
3371
+ case 3:
3372
+ res = _context.sent;
3373
+ if (isMounted) {
3374
+ _context.next = 6;
3375
+ break;
3376
+ }
3377
+ return _context.abrupt("return");
3378
+ case 6:
3379
+ setOptions(res);
3380
+ onLoad && onLoad(res);
3381
+ case 8:
3382
+ case "end":
3383
+ return _context.stop();
3384
+ }
3385
+ }, _callee);
3386
+ }))();
3387
+ var valueEnumOptions = [];
3388
+ if (valueEnum) {
3389
+ for (var key in valueEnum) {
3390
+ var text = '';
3391
+ if (typeof valueEnum[key] === 'string') {
3392
+ text = valueEnum[key];
3393
+ } else {
3394
+ var _valueEnum$key;
3395
+ text = (_valueEnum$key = valueEnum[key]) === null || _valueEnum$key === void 0 ? void 0 : _valueEnum$key.text;
3396
+ }
3397
+ valueEnumOptions.push({
3398
+ label: text,
3399
+ value: key
3400
+ });
3401
+ }
3402
+ }
3403
+ if (!isMounted) return;
3404
+ onLoad && onLoad(valueEnumOptions);
3405
+ setOptions(valueEnumOptions);
3406
+ return function () {
3407
+ isMounted = false;
3408
+ };
3409
+ }, [JSON.stringify(params || {})]);
3410
+ return /*#__PURE__*/React__default['default'].createElement(antd.Radio.Group, _objectSpread2({
3411
+ options: options
3412
+ }, extraProps));
3413
+ };
3414
+ WRadioGroup.defaultProps = {};
3415
+
3416
+ var _excluded$a = ["request", "valueEnum", "onLoad", "params"];
3417
+ var WCheckboxGroup = function WCheckboxGroup(props) {
3418
+ var request = props.request,
3419
+ valueEnum = props.valueEnum,
3420
+ onLoad = props.onLoad,
3421
+ params = props.params,
3422
+ extraProps = _objectWithoutProperties(props, _excluded$a);
3423
+ var _useState = React.useState([]),
3424
+ _useState2 = _slicedToArray(_useState, 2),
3425
+ options = _useState2[0],
3426
+ setOptions = _useState2[1];
3427
+ React.useEffect(function () {
3428
+ var isMounted = true;
3429
+ _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
3430
+ var res;
3431
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
3432
+ while (1) switch (_context.prev = _context.next) {
3433
+ case 0:
3434
+ if (!request) {
3435
+ _context.next = 8;
3436
+ break;
3437
+ }
3438
+ _context.next = 3;
3439
+ return request();
3440
+ case 3:
3441
+ res = _context.sent;
3442
+ if (isMounted) {
3443
+ _context.next = 6;
3444
+ break;
3445
+ }
3446
+ return _context.abrupt("return");
3447
+ case 6:
3448
+ setOptions(res);
3449
+ onLoad && onLoad(res);
3450
+ case 8:
3451
+ case "end":
3452
+ return _context.stop();
3453
+ }
3454
+ }, _callee);
3455
+ }))();
3456
+ var valueEnumOptions = [];
3457
+ if (valueEnum) {
3458
+ for (var key in valueEnum) {
3459
+ var text = '';
3460
+ if (typeof valueEnum[key] === 'string') {
3461
+ text = valueEnum[key];
3462
+ } else {
3463
+ var _valueEnum$key;
3464
+ text = (_valueEnum$key = valueEnum[key]) === null || _valueEnum$key === void 0 ? void 0 : _valueEnum$key.text;
3465
+ }
3466
+ valueEnumOptions.push({
3467
+ label: text,
3468
+ value: key
3469
+ });
3470
+ }
3471
+ }
3472
+ if (!isMounted) return;
3473
+ onLoad && onLoad(valueEnumOptions);
3474
+ setOptions(valueEnumOptions);
3475
+ return function () {
3476
+ isMounted = false;
3477
+ };
3478
+ }, [JSON.stringify(params || {})]);
3479
+ return /*#__PURE__*/React__default['default'].createElement(lib.Checkbox.Group, _objectSpread2({
3480
+ options: options
3481
+ }, extraProps));
3482
+ };
3483
+ WCheckboxGroup.defaultProps = {};
3484
+
3485
+ var _excluded$b = ["columns", "extraColumns", "className", "style", "search", "disabled", "disabledHideInSearch", "disabledRuler", "onFormChange", "onSubmit", "onReset", "setForm", "deps"];
3347
3486
  var RangePicker$2 = Index$6.RangePicker;
3348
3487
  var WForm = function WForm(props, ref) {
3349
3488
  var columns = props.columns,
@@ -3359,7 +3498,7 @@ var WForm = function WForm(props, ref) {
3359
3498
  onReset = props.onReset,
3360
3499
  setForm = props.setForm,
3361
3500
  deps = props.deps,
3362
- extraProps = _objectWithoutProperties(props, _excluded$9);
3501
+ extraProps = _objectWithoutProperties(props, _excluded$b);
3363
3502
  var _Form$useForm = antd.Form.useForm(),
3364
3503
  _Form$useForm2 = _slicedToArray(_Form$useForm, 1),
3365
3504
  form = _Form$useForm2[0];
@@ -3588,31 +3727,25 @@ var WForm = function WForm(props, ref) {
3588
3727
  disabled: disabled
3589
3728
  }, _showTime), c.fieldProps))));
3590
3729
  } else if (c.valueType === 'checkbox') {
3591
- var options = [];
3592
- if (c.valueEnum) {
3593
- for (var key in c.valueEnum) {
3594
- var text = c.valueEnum[key].text;
3595
- options.push({
3596
- label: text,
3597
- value: key
3598
- });
3599
- }
3600
- }
3601
- if (c.options) {
3602
- options = c.options;
3730
+ var _extraProps4 = {};
3731
+ if (c.request) {
3732
+ _extraProps4.request = c.request;
3733
+ } else if (c.valueEnum) {
3734
+ _extraProps4.valueEnum = c.valueEnum;
3735
+ } else {
3736
+ _extraProps4.options = c.options;
3603
3737
  }
3604
- // if (columnsFieldsRef.current) {
3605
- // columnsFieldsRef.current[c.dataIndex] = options;
3606
- // }
3607
- setColumnsFields(function (preColumnsFields) {
3608
- return _objectSpread2(_objectSpread2({}, preColumnsFields), {}, _defineProperty({}, c.dataIndex, options));
3609
- });
3610
3738
  var _labelCol6 = {};
3611
3739
  if (search && search.labelWidth) {
3612
3740
  _labelCol6.style = {
3613
3741
  width: search.labelWidth
3614
3742
  };
3615
3743
  }
3744
+ if (c.options) {
3745
+ setColumnsFields(function (preColumnsFields) {
3746
+ return _objectSpread2(_objectSpread2({}, preColumnsFields), {}, _defineProperty({}, c.dataIndex, c.options));
3747
+ });
3748
+ }
3616
3749
  return /*#__PURE__*/React__default['default'].createElement(antd.Col, _objectSpread2(_objectSpread2({
3617
3750
  className: "pl12 pr12"
3618
3751
  }, colProps), {}, {
@@ -3623,30 +3756,23 @@ var WForm = function WForm(props, ref) {
3623
3756
  name: c.dataIndex,
3624
3757
  label: c.title,
3625
3758
  labelCol: _labelCol6
3626
- }), /*#__PURE__*/React__default['default'].createElement(Index$4.Group, _objectSpread2({
3627
- disabled: disabled,
3628
- options: options
3629
- }, c.fieldProps))));
3630
- } else if (c.valueType === 'radio' || c.valueType === 'radioButton') {
3631
- var _options = [];
3632
- if (c.options) {
3633
- _options = c.options;
3634
- }
3635
- if (c.valueEnum) {
3636
- for (var _key in c.valueEnum) {
3637
- var _text = c.valueEnum[_key].text;
3638
- _options.push({
3639
- label: _text,
3640
- value: _key
3759
+ }), /*#__PURE__*/React__default['default'].createElement(WCheckboxGroup, _objectSpread2(_objectSpread2({
3760
+ onLoad: function onLoad(opt) {
3761
+ setColumnsFields(function (preColumnsFields) {
3762
+ return _objectSpread2(_objectSpread2({}, preColumnsFields), {}, _defineProperty({}, c.dataIndex, opt));
3641
3763
  });
3642
- }
3764
+ },
3765
+ disabled: disabled
3766
+ }, c.fieldProps), _extraProps4))));
3767
+ } else if (c.valueType === 'radio' || c.valueType === 'radioButton') {
3768
+ var _extraProps5 = {};
3769
+ if (c.request) {
3770
+ _extraProps5.request = c.request;
3771
+ } else if (c.valueEnum) {
3772
+ _extraProps5.valueEnum = c.valueEnum;
3773
+ } else {
3774
+ _extraProps5.options = c.options;
3643
3775
  }
3644
- // if (columnsFieldsRef.current) {
3645
- // columnsFieldsRef.current[c.dataIndex] = options;
3646
- // }
3647
- setColumnsFields(function (preColumnsFields) {
3648
- return _objectSpread2(_objectSpread2({}, preColumnsFields), {}, _defineProperty({}, c.dataIndex, _options));
3649
- });
3650
3776
  var _labelCol7 = {};
3651
3777
  if (search && search.labelWidth) {
3652
3778
  _labelCol7.style = {
@@ -3660,6 +3786,11 @@ var WForm = function WForm(props, ref) {
3660
3786
  buttonStyle: 'solid'
3661
3787
  };
3662
3788
  }
3789
+ if (c.options) {
3790
+ setColumnsFields(function (preColumnsFields) {
3791
+ return _objectSpread2(_objectSpread2({}, preColumnsFields), {}, _defineProperty({}, c.dataIndex, c.options));
3792
+ });
3793
+ }
3663
3794
  return /*#__PURE__*/React__default['default'].createElement(antd.Col, _objectSpread2(_objectSpread2({
3664
3795
  className: "pl12 pr12"
3665
3796
  }, colProps), {}, {
@@ -3670,19 +3801,22 @@ var WForm = function WForm(props, ref) {
3670
3801
  name: c.dataIndex,
3671
3802
  label: c.title,
3672
3803
  labelCol: _labelCol7
3673
- }), /*#__PURE__*/React__default['default'].createElement(Index$3.Group, _objectSpread2(_objectSpread2({
3804
+ }), /*#__PURE__*/React__default['default'].createElement(WRadioGroup, _objectSpread2(_objectSpread2(_objectSpread2({
3805
+ onLoad: function onLoad(opt) {
3806
+ setColumnsFields(function (preColumnsFields) {
3807
+ return _objectSpread2(_objectSpread2({}, preColumnsFields), {}, _defineProperty({}, c.dataIndex, opt));
3808
+ });
3809
+ },
3674
3810
  disabled: disabled
3675
- }, radioButtonProps), {}, {
3676
- options: _options
3677
- }, c.fieldProps))));
3811
+ }, radioButtonProps), c.fieldProps), _extraProps5))));
3678
3812
  } else if (c.valueType === 'switch') {
3679
- var _options2 = [];
3813
+ var options = [];
3680
3814
  if (c.valueEnum) {
3681
- for (var _key2 in c.valueEnum) {
3682
- var _text2 = c.valueEnum[_key2].text;
3683
- _options2.push({
3684
- label: _text2,
3685
- value: _key2
3815
+ for (var key in c.valueEnum) {
3816
+ var text = c.valueEnum[key].text;
3817
+ options.push({
3818
+ label: text,
3819
+ value: key
3686
3820
  });
3687
3821
  }
3688
3822
  }
@@ -3696,7 +3830,7 @@ var WForm = function WForm(props, ref) {
3696
3830
  // columnsFieldsRef.current[c.dataIndex] = options;
3697
3831
  // }
3698
3832
  setColumnsFields(function (preColumnsFields) {
3699
- return _objectSpread2(_objectSpread2({}, preColumnsFields), {}, _defineProperty({}, c.dataIndex, _options2));
3833
+ return _objectSpread2(_objectSpread2({}, preColumnsFields), {}, _defineProperty({}, c.dataIndex, options));
3700
3834
  });
3701
3835
  return /*#__PURE__*/React__default['default'].createElement(antd.Col, _objectSpread2(_objectSpread2({
3702
3836
  className: "pl12 pr12"
@@ -4055,7 +4189,7 @@ var WForm = function WForm(props, ref) {
4055
4189
  };
4056
4190
  var WForm$1 = /*#__PURE__*/React__default['default'].forwardRef(WForm);
4057
4191
 
4058
- var _excluded$a = ["columns", "dataSource", "request", "onLoad", "params", "onSubmit", "rowKey", "onRow", "className", "rowClassName", "rowSelection", "style", "tbodyStyle", "thStyle", "border", "scroll", "pagination", "search", "frameBoxTable", "frameBoxDirection", "formRef", "none"];
4192
+ var _excluded$c = ["columns", "dataSource", "request", "onLoad", "params", "onSubmit", "rowKey", "onRow", "className", "rowClassName", "rowSelection", "style", "tbodyStyle", "thStyle", "border", "scroll", "pagination", "search", "frameBoxTable", "frameBoxDirection", "formRef", "none"];
4059
4193
  function Table(_ref) {
4060
4194
  var _formSearchRef$curren4, _columns$, _columns$2;
4061
4195
  var columns = _ref.columns,
@@ -4086,7 +4220,7 @@ function Table(_ref) {
4086
4220
  frameBoxDirection = _ref$frameBoxDirectio === void 0 ? 'out' : _ref$frameBoxDirectio,
4087
4221
  formRef = _ref.formRef,
4088
4222
  none = _ref.none,
4089
- props = _objectWithoutProperties(_ref, _excluded$a);
4223
+ props = _objectWithoutProperties(_ref, _excluded$c);
4090
4224
  var _useState = React.useState(_toConsumableArray((rowSelection === null || rowSelection === void 0 ? void 0 : rowSelection.selectedRowKeys) || [])),
4091
4225
  _useState2 = _slicedToArray(_useState, 2),
4092
4226
  selectedRowKeys = _useState2[0],
@@ -4573,7 +4707,7 @@ Table.defaultProps = {
4573
4707
  };
4574
4708
  var index = /*#__PURE__*/React.memo(Table);
4575
4709
 
4576
- var _excluded$b = ["value", "renderDom", "onLoad", "params", "onChange", "request"];
4710
+ var _excluded$d = ["value", "renderDom", "onLoad", "params", "onChange", "request"];
4577
4711
  function Index$8(props, ref) {
4578
4712
  var value = props.value,
4579
4713
  renderDom = props.renderDom,
@@ -4581,7 +4715,7 @@ function Index$8(props, ref) {
4581
4715
  params = props.params,
4582
4716
  onChange = props.onChange,
4583
4717
  request = props.request,
4584
- rest = _objectWithoutProperties(props, _excluded$b);
4718
+ rest = _objectWithoutProperties(props, _excluded$d);
4585
4719
  var _useState = React.useState(''),
4586
4720
  _useState2 = _slicedToArray(_useState, 2),
4587
4721
  areaValue = _useState2[0],
@@ -4636,7 +4770,7 @@ function Index$8(props, ref) {
4636
4770
  }
4637
4771
  var index$1 = /*#__PURE__*/React__default['default'].forwardRef(Index$8);
4638
4772
 
4639
- var _excluded$c = ["height", "width", "count", "style", "numberStyle"],
4773
+ var _excluded$e = ["height", "width", "count", "style", "numberStyle"],
4640
4774
  _excluded2$2 = ["count", "numberCount", "width", "height", "marginRight"];
4641
4775
  var Number$1 = function Number(_ref) {
4642
4776
  var height = _ref.height,
@@ -4645,7 +4779,7 @@ var Number$1 = function Number(_ref) {
4645
4779
  count = _ref$count === void 0 ? 0 : _ref$count,
4646
4780
  style = _ref.style,
4647
4781
  numberStyle = _ref.numberStyle,
4648
- props = _objectWithoutProperties(_ref, _excluded$c);
4782
+ props = _objectWithoutProperties(_ref, _excluded$e);
4649
4783
  // 上次的值
4650
4784
  var _useState = React.useState(0),
4651
4785
  _useState2 = _slicedToArray(_useState, 2),
@@ -4795,12 +4929,12 @@ var Index$9 = function Index(props) {
4795
4929
  }));
4796
4930
  };
4797
4931
 
4798
- var _excluded$d = ["duration", "className"];
4932
+ var _excluded$f = ["duration", "className"];
4799
4933
  var Index$a = function Index(props) {
4800
4934
  var _props$duration = props.duration,
4801
4935
  duration = _props$duration === void 0 ? 2.75 : _props$duration,
4802
4936
  className = props.className,
4803
- extraProps = _objectWithoutProperties(props, _excluded$d);
4937
+ extraProps = _objectWithoutProperties(props, _excluded$f);
4804
4938
  return /*#__PURE__*/React__default['default'].createElement(CountUp__default['default'], _objectSpread2(_objectSpread2({
4805
4939
  duration: duration
4806
4940
  }, extraProps), {}, {
@@ -4809,7 +4943,7 @@ var Index$a = function Index(props) {
4809
4943
  };
4810
4944
  Index$a.defaultProps = {};
4811
4945
 
4812
- var _excluded$e = ["list", "render", "none", "partSize"];
4946
+ var _excluded$g = ["list", "render", "none", "partSize"];
4813
4947
  function AutoScroll(props) {
4814
4948
  var inner1 = React.useRef();
4815
4949
  var inner2 = React.useRef();
@@ -4886,7 +5020,7 @@ var Index$b = function Index(_ref) {
4886
5020
  none = _ref.none,
4887
5021
  _ref$partSize = _ref.partSize,
4888
5022
  partSize = _ref$partSize === void 0 ? 4 : _ref$partSize,
4889
- otherProps = _objectWithoutProperties(_ref, _excluded$e);
5023
+ otherProps = _objectWithoutProperties(_ref, _excluded$g);
4890
5024
  var _useState = React.useState([]),
4891
5025
  _useState2 = _slicedToArray(_useState, 2),
4892
5026
  partA = _useState2[0],
@@ -4960,7 +5094,7 @@ var Index$b = function Index(_ref) {
4960
5094
  }, none || '暂无数据'));
4961
5095
  };
4962
5096
 
4963
- var _excluded$f = ["data", "onClick", "slidesPerView", "rowKey", "onSwiperChange", "renderItem", "noMove"];
5097
+ var _excluded$h = ["data", "onClick", "slidesPerView", "rowKey", "onSwiperChange", "renderItem", "noMove"];
4964
5098
  // install Swiper modules
4965
5099
  SwiperCore__default['default'].use([SwiperCore.Pagination, SwiperCore.Navigation, SwiperCore.Autoplay, SwiperCore.Virtual]);
4966
5100
  var Index$c = /*#__PURE__*/React.forwardRef(function (props, ref) {
@@ -4972,7 +5106,7 @@ var Index$c = /*#__PURE__*/React.forwardRef(function (props, ref) {
4972
5106
  onSwiperChange = props.onSwiperChange,
4973
5107
  renderItem = props.renderItem,
4974
5108
  noMove = props.noMove,
4975
- extraProps = _objectWithoutProperties(props, _excluded$f);
5109
+ extraProps = _objectWithoutProperties(props, _excluded$h);
4976
5110
  var _useState = React.useState(null),
4977
5111
  _useState2 = _slicedToArray(_useState, 2),
4978
5112
  controlledSwiper = _useState2[0],
@@ -5621,7 +5755,7 @@ function createBrowserHistory(props) {
5621
5755
  return history;
5622
5756
  }
5623
5757
 
5624
- var _excluded$g = ["routes", "className"];
5758
+ var _excluded$i = ["routes", "className"];
5625
5759
  var history = createBrowserHistory();
5626
5760
  function itemRender(route, params, routes, paths) {
5627
5761
  var last = routes.indexOf(route) === routes.length - 1;
@@ -5637,7 +5771,7 @@ function itemRender(route, params, routes, paths) {
5637
5771
  var Index$d = function Index(_ref) {
5638
5772
  var routes = _ref.routes,
5639
5773
  className = _ref.className,
5640
- props = _objectWithoutProperties(_ref, _excluded$g);
5774
+ props = _objectWithoutProperties(_ref, _excluded$i);
5641
5775
  return /*#__PURE__*/React__default['default'].createElement(antd.Breadcrumb, _objectSpread2({
5642
5776
  className: className || 'default',
5643
5777
  separator: ">>",
@@ -5646,7 +5780,7 @@ var Index$d = function Index(_ref) {
5646
5780
  }, props));
5647
5781
  };
5648
5782
 
5649
- var _excluded$h = ["title", "className", "headerTail", "headerCenter", "sliderTabs"];
5783
+ var _excluded$j = ["title", "className", "headerTail", "headerCenter", "sliderTabs"];
5650
5784
  var Index$e = function Index(_ref, ref) {
5651
5785
  var _sliderTabs$component, _sliderTabs$tabs;
5652
5786
  var title = _ref.title,
@@ -5655,7 +5789,7 @@ var Index$e = function Index(_ref, ref) {
5655
5789
  headerTail = _ref.headerTail,
5656
5790
  headerCenter = _ref.headerCenter,
5657
5791
  sliderTabs = _ref.sliderTabs,
5658
- props = _objectWithoutProperties(_ref, _excluded$h);
5792
+ props = _objectWithoutProperties(_ref, _excluded$j);
5659
5793
  React.useImperativeHandle(ref, function () {
5660
5794
  return {
5661
5795
  activeTab: activeTab
@@ -5871,7 +6005,7 @@ function DialogModel(props, ref) {
5871
6005
  }
5872
6006
  var Dialog = /*#__PURE__*/React__default['default'].forwardRef(DialogModel);
5873
6007
 
5874
- var _excluded$i = ["open", "width", "closeCb", "onClose", "className", "style", "isDrag", "wrapClassName"],
6008
+ var _excluded$k = ["open", "width", "closeCb", "onClose", "className", "style", "isDrag", "wrapClassName"],
5875
6009
  _excluded2$3 = ["open"];
5876
6010
  var Modal = /*#__PURE__*/function (_React$PureComponent) {
5877
6011
  _inherits(Modal, _React$PureComponent);
@@ -6003,7 +6137,7 @@ var Modal = /*#__PURE__*/function (_React$PureComponent) {
6003
6137
  style = _this$props4.style,
6004
6138
  isDrag = _this$props4.isDrag,
6005
6139
  wrapClassName = _this$props4.wrapClassName,
6006
- other = _objectWithoutProperties(_this$props4, _excluded$i);
6140
+ other = _objectWithoutProperties(_this$props4, _excluded$k);
6007
6141
  return /*#__PURE__*/React__default['default'].createElement(Dialog, _objectSpread2({
6008
6142
  ref: this.containerRef,
6009
6143
  closeCb: closeCb,
@@ -6168,7 +6302,7 @@ function DialogModel$1(props) {
6168
6302
  return renderChildren;
6169
6303
  }
6170
6304
 
6171
- var _excluded$j = ["open"];
6305
+ var _excluded$l = ["open"];
6172
6306
  var Modal$1 = /*#__PURE__*/function (_React$PureComponent) {
6173
6307
  _inherits(Modal, _React$PureComponent);
6174
6308
  var _super = _createSuper(Modal);
@@ -6290,7 +6424,7 @@ Modal$1.show = function (config) {
6290
6424
  setShow = _useState2[1];
6291
6425
  manager.setShow = setShow;
6292
6426
  var open = props.open,
6293
- trueProps = _objectWithoutProperties(props, _excluded$j);
6427
+ trueProps = _objectWithoutProperties(props, _excluded$l);
6294
6428
  React.useEffect(function () {
6295
6429
  manager.mounted = true;
6296
6430
  setShow(open);
@@ -6462,7 +6596,7 @@ function DragBox(_ref) {
6462
6596
  }, children))) : ( /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null));
6463
6597
  }
6464
6598
 
6465
- var _excluded$k = ["columns", "extraColumns", "search", "open", "setOpen", "modalFormOpend", "disabled", "submitMethod", "onSubmitSuccess", "title", "record", "onFormChange", "formItemChild", "onCancel", "modalHeaderSlot", "modalFooterSlot", "formProps"];
6599
+ var _excluded$m = ["columns", "extraColumns", "search", "open", "setOpen", "modalFormOpend", "disabled", "submitMethod", "onSubmitSuccess", "title", "record", "onFormChange", "formItemChild", "onCancel", "modalHeaderSlot", "modalFooterSlot", "formProps"];
6466
6600
  var ModalForm = function ModalForm(props, ref) {
6467
6601
  var columns = props.columns,
6468
6602
  extraColumns = props.extraColumns,
@@ -6481,7 +6615,7 @@ var ModalForm = function ModalForm(props, ref) {
6481
6615
  modalHeaderSlot = props.modalHeaderSlot,
6482
6616
  modalFooterSlot = props.modalFooterSlot,
6483
6617
  formProps = props.formProps,
6484
- extraProps = _objectWithoutProperties(props, _excluded$k);
6618
+ extraProps = _objectWithoutProperties(props, _excluded$m);
6485
6619
  var formRef = React.useRef(null);
6486
6620
  var _useState = React.useState(false),
6487
6621
  _useState2 = _slicedToArray(_useState, 2),
@@ -6606,7 +6740,7 @@ var ModalForm = function ModalForm(props, ref) {
6606
6740
  };
6607
6741
  var ModalForm$1 = /*#__PURE__*/React__default['default'].forwardRef(ModalForm);
6608
6742
 
6609
- var _excluded$l = ["columns", "extraColumns", "request", "modalFormSearch", "search", "tableAction", "filterAction", "renderTableBar", "renderTableBarDeps", "className", "style", "onFormChange", "modalConfig", "searchFormConfig", "optionColumnConfig", "pagination", "noBordered", "showIndex", "searchTableSlot"];
6743
+ var _excluded$n = ["columns", "extraColumns", "request", "modalFormSearch", "search", "tableAction", "filterAction", "renderTableBar", "renderTableBarDeps", "className", "style", "onFormChange", "modalConfig", "searchFormConfig", "optionColumnConfig", "pagination", "noBordered", "showIndex", "searchTableSlot"];
6610
6744
  var TabelCard = function TabelCard(props, ref) {
6611
6745
  var columns = props.columns,
6612
6746
  extraColumns = props.extraColumns,
@@ -6630,7 +6764,7 @@ var TabelCard = function TabelCard(props, ref) {
6630
6764
  noBordered = props.noBordered,
6631
6765
  showIndex = props.showIndex,
6632
6766
  searchTableSlot = props.searchTableSlot,
6633
- extraProps = _objectWithoutProperties(props, _excluded$l);
6767
+ extraProps = _objectWithoutProperties(props, _excluded$n);
6634
6768
  var actionRef = React.useRef();
6635
6769
  var modalFormRef = React.useRef(null);
6636
6770
  var searchFormRef = React.useRef(null);
@@ -7138,6 +7272,15 @@ var TabelCard = function TabelCard(props, ref) {
7138
7272
  if (item.hiddenInModalForm || item.hideInModalForm) {
7139
7273
  return false;
7140
7274
  }
7275
+ if (item.type === 'group') {
7276
+ var _item$children;
7277
+ item.children = (_item$children = item.children) === null || _item$children === void 0 ? void 0 : _item$children.filter(function (itm) {
7278
+ if (itm.hiddenInModalForm || itm.hideInModalForm) {
7279
+ return false;
7280
+ }
7281
+ return true;
7282
+ });
7283
+ }
7141
7284
  if (item.onlyShowInView) {
7142
7285
  if (modalFormConfig.type === '查看') {
7143
7286
  return true;
@@ -7149,8 +7292,8 @@ var TabelCard = function TabelCard(props, ref) {
7149
7292
  }).map(function (item) {
7150
7293
  var _item$renderColumn;
7151
7294
  if (item.type === 'group') {
7152
- var _item$children;
7153
- item.children = (_item$children = item.children) === null || _item$children === void 0 ? void 0 : _item$children.map(function (itm) {
7295
+ var _item$children2;
7296
+ item.children = (_item$children2 = item.children) === null || _item$children2 === void 0 ? void 0 : _item$children2.map(function (itm) {
7154
7297
  var _itm$renderColumn;
7155
7298
  return (itm === null || itm === void 0 ? void 0 : (_itm$renderColumn = itm.renderColumn) === null || _itm$renderColumn === void 0 ? void 0 : _itm$renderColumn.call(itm, itm, modalFormConfig)) || itm;
7156
7299
  });
@@ -7161,6 +7304,15 @@ var TabelCard = function TabelCard(props, ref) {
7161
7304
  if (item.hiddenInModalForm || item.hideInModalForm) {
7162
7305
  return false;
7163
7306
  }
7307
+ if (item.type === 'group') {
7308
+ var _item$children3;
7309
+ item.children = (_item$children3 = item.children) === null || _item$children3 === void 0 ? void 0 : _item$children3.filter(function (itm) {
7310
+ if (itm.hiddenInModalForm || itm.hideInModalForm) {
7311
+ return false;
7312
+ }
7313
+ return true;
7314
+ });
7315
+ }
7164
7316
  if (item.onlyShowInView) {
7165
7317
  if (modalFormConfig.type === '查看') {
7166
7318
  return true;
@@ -7172,8 +7324,8 @@ var TabelCard = function TabelCard(props, ref) {
7172
7324
  }).map(function (item) {
7173
7325
  var _item$renderColumn2;
7174
7326
  if (item.type === 'group') {
7175
- var _item$children2;
7176
- item.children = (_item$children2 = item.children) === null || _item$children2 === void 0 ? void 0 : _item$children2.map(function (itm) {
7327
+ var _item$children4;
7328
+ item.children = (_item$children4 = item.children) === null || _item$children4 === void 0 ? void 0 : _item$children4.map(function (itm) {
7177
7329
  var _itm$renderColumn2;
7178
7330
  return (itm === null || itm === void 0 ? void 0 : (_itm$renderColumn2 = itm.renderColumn) === null || _itm$renderColumn2 === void 0 ? void 0 : _itm$renderColumn2.call(itm, itm, modalFormConfig)) || itm;
7179
7331
  });
@@ -10868,7 +11020,7 @@ function DhPlayer(_ref, ref) {
10868
11020
  }
10869
11021
  var index$6 = /*#__PURE__*/React.forwardRef(DhPlayer);
10870
11022
 
10871
- var _excluded$m = ["id", "videoUrls", "definitionList", "isLoop", "muted", "currentIndex", "setCurrentIndex", "className", "style", "open", "autoplay", "videoInit", "enableMemory", "lastPlayTimeHideDelay"];
11023
+ var _excluded$o = ["id", "videoUrls", "definitionList", "isLoop", "muted", "currentIndex", "setCurrentIndex", "className", "style", "open", "autoplay", "videoInit", "enableMemory", "lastPlayTimeHideDelay"];
10872
11024
  // 默认速度控制
10873
11025
  var DEFAULT_PLAY_BACK_RATE = [0.5, 0.75, 1, 1.5, 2];
10874
11026
  // 默认记忆提示文字展示时长(s)
@@ -10899,7 +11051,7 @@ var index$7 = (function (_ref) {
10899
11051
  enableMemory = _ref$enableMemory === void 0 ? false : _ref$enableMemory,
10900
11052
  _ref$lastPlayTimeHide = _ref.lastPlayTimeHideDelay,
10901
11053
  lastPlayTimeHideDelay = _ref$lastPlayTimeHide === void 0 ? DEFAULT_LAST_PLAY_TIME_DELAY : _ref$lastPlayTimeHide,
10902
- props = _objectWithoutProperties(_ref, _excluded$m);
11054
+ props = _objectWithoutProperties(_ref, _excluded$o);
10903
11055
  var player = React.useRef();
10904
11056
  var currentPlayerIndex = React.useRef(0);
10905
11057
  // 内置的 index 状态管理
@@ -11069,7 +11221,7 @@ var index$7 = (function (_ref) {
11069
11221
  });
11070
11222
  });
11071
11223
 
11072
- var _excluded$n = ["className", "frameStyle", "style", "direction", "children"];
11224
+ var _excluded$p = ["className", "frameStyle", "style", "direction", "children"];
11073
11225
  function FrameBox$1(_ref) {
11074
11226
  var className = _ref.className,
11075
11227
  frameStyle = _ref.frameStyle,
@@ -11077,7 +11229,7 @@ function FrameBox$1(_ref) {
11077
11229
  _ref$direction = _ref.direction,
11078
11230
  direction = _ref$direction === void 0 ? 'in' : _ref$direction,
11079
11231
  children = _ref.children,
11080
- props = _objectWithoutProperties(_ref, _excluded$n);
11232
+ props = _objectWithoutProperties(_ref, _excluded$p);
11081
11233
  return /*#__PURE__*/React__default['default'].createElement("div", _objectSpread2({
11082
11234
  className: classnames__default['default'](_defineProperty(_defineProperty({}, 'frame', true), className || '', true)),
11083
11235
  style: style
@@ -11104,7 +11256,7 @@ function FrameBox$1(_ref) {
11104
11256
  }), children);
11105
11257
  }
11106
11258
 
11107
- var _excluded$o = ["columns", "dataSource", "request", "onLoad", "params", "onSubmit", "rowKey", "onRow", "className", "rowClassName", "rowSelection", "style", "tbodyStyle", "thStyle", "border", "scroll", "pagination", "search", "frameBoxTable", "frameBoxDirection", "formRef", "none"];
11259
+ var _excluded$q = ["columns", "dataSource", "request", "onLoad", "params", "onSubmit", "rowKey", "onRow", "className", "rowClassName", "rowSelection", "style", "tbodyStyle", "thStyle", "border", "scroll", "pagination", "search", "frameBoxTable", "frameBoxDirection", "formRef", "none"];
11108
11260
  function NtTable(_ref, ref) {
11109
11261
  var _formSearchRef$curren4, _columns$, _columns$2;
11110
11262
  var columns = _ref.columns,
@@ -11135,7 +11287,7 @@ function NtTable(_ref, ref) {
11135
11287
  frameBoxDirection = _ref$frameBoxDirectio === void 0 ? 'out' : _ref$frameBoxDirectio,
11136
11288
  formRef = _ref.formRef,
11137
11289
  none = _ref.none,
11138
- props = _objectWithoutProperties(_ref, _excluded$o);
11290
+ props = _objectWithoutProperties(_ref, _excluded$q);
11139
11291
  var _useState = React.useState(_toConsumableArray((rowSelection === null || rowSelection === void 0 ? void 0 : rowSelection.selectedRowKeys) || [])),
11140
11292
  _useState2 = _slicedToArray(_useState, 2),
11141
11293
  selectedRowKeys = _useState2[0],
@@ -12391,7 +12543,7 @@ function WaterLevelCharts(config) {
12391
12543
  /*
12392
12544
  * @Author: lijin
12393
12545
  * @Date: 2021-09-09 11:02:54
12394
- * @LastEditTime: 2023-09-18 17:44:13
12546
+ * @LastEditTime: 2023-12-25 19:04:08
12395
12547
  * @LastEditors: lijin
12396
12548
  * @Description:
12397
12549
  * @FilePath: \wargerm\src\index.ts
@@ -12410,6 +12562,7 @@ exports.Calendar = index$4;
12410
12562
  exports.Card = index$2;
12411
12563
  exports.Cascader = WCascader;
12412
12564
  exports.Checkbox = Index$4;
12565
+ exports.CheckboxGroup = WCheckboxGroup;
12413
12566
  exports.CountUp = Index$a;
12414
12567
  exports.DatePicker = Index$2;
12415
12568
  exports.DhPlayer = index$6;
@@ -12425,6 +12578,7 @@ exports.NtTable = index$8;
12425
12578
  exports.Number = Index$9;
12426
12579
  exports.NumericInput = NumericInput;
12427
12580
  exports.Radio = Index$3;
12581
+ exports.RadioGroup = WRadioGroup;
12428
12582
  exports.RequestRenderDom = index$1;
12429
12583
  exports.Select = Index$5;
12430
12584
  exports.Swiper = Index$c;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "private": false,
3
3
  "name": "wargerm",
4
- "version": "0.7.66",
4
+ "version": "0.7.68",
5
5
  "scripts": {
6
6
  "dev": "dumi dev",
7
7
  "docs:build": "dumi build",