@teamix/pro 1.3.9 → 1.3.12

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/pro.js CHANGED
@@ -57382,8 +57382,6 @@ var CascaderText = function CascaderText(props) {
57382
57382
  /* harmony import */ var _teamix_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(80653);
57383
57383
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(59787);
57384
57384
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
57385
- /* harmony import */ var _utils_color__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(94877);
57386
-
57387
57385
 
57388
57386
 
57389
57387
  var cls = (0,_teamix_utils__WEBPACK_IMPORTED_MODULE_0__.baseClass)('teamix-pro-field-output-circle');
@@ -57393,7 +57391,7 @@ var Circle = function Circle(props) {
57393
57391
  color = props.color;
57394
57392
  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement("div", {
57395
57393
  style: {
57396
- backgroundColor: (0,_utils_color__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .ZP)(color)
57394
+ backgroundColor: (0,_teamix_utils__WEBPACK_IMPORTED_MODULE_0__.getColor)(color)
57397
57395
  },
57398
57396
  className: cls({
57399
57397
  '': true,
@@ -57890,8 +57888,6 @@ var Edit = function Edit(props) {
57890
57888
  /* harmony import */ var _teamix_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(80653);
57891
57889
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(59787);
57892
57890
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
57893
- /* harmony import */ var _utils_color__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(94877);
57894
-
57895
57891
 
57896
57892
 
57897
57893
  var cls = (0,_teamix_utils__WEBPACK_IMPORTED_MODULE_0__.baseClass)('teamix-pro-field-output-emphasize');
@@ -57907,7 +57903,7 @@ var Emphasize = function Emphasize(props) {
57907
57903
  // 强调数字需要重新实现Color颜色。否则不生效。
57908
57904
  // 这边的颜色只可能是string类型
57909
57905
  style: {
57910
- color: (_getColor = (0,_utils_color__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .ZP)(color)) !== null && _getColor !== void 0 ? _getColor : 'var(--color-text1-3, #333333)'
57906
+ color: (_getColor = (0,_teamix_utils__WEBPACK_IMPORTED_MODULE_0__.getColor)(color)) !== null && _getColor !== void 0 ? _getColor : 'var(--color-text1-3, #333333)'
57911
57907
  }
57912
57908
  }, result);
57913
57909
  };
@@ -57968,8 +57964,6 @@ var Head = function Head(props) {
57968
57964
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
57969
57965
  /* harmony import */ var _teamix_icon__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(89227);
57970
57966
  /* harmony import */ var _teamix_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(80653);
57971
- /* harmony import */ var _utils_color__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(94877);
57972
-
57973
57967
 
57974
57968
 
57975
57969
 
@@ -57994,11 +57988,11 @@ var Icon = function Icon(props) {
57994
57988
 
57995
57989
  var getIconColor = function getIconColor() {
57996
57990
  if (render.iconColor) {
57997
- return (0,_utils_color__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .ZP)(render === null || render === void 0 ? void 0 : render.iconColor);
57991
+ return (0,_teamix_utils__WEBPACK_IMPORTED_MODULE_2__.getColor)(render === null || render === void 0 ? void 0 : render.iconColor);
57998
57992
  }
57999
57993
 
58000
57994
  if (render.color && typeof render.color === 'string') {
58001
- return (0,_utils_color__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .ZP)(render === null || render === void 0 ? void 0 : render.color);
57995
+ return (0,_teamix_utils__WEBPACK_IMPORTED_MODULE_2__.getColor)(render === null || render === void 0 ? void 0 : render.color);
58002
57996
  }
58003
57997
 
58004
57998
  return '';
@@ -58050,13 +58044,12 @@ var Icon = function Icon(props) {
58050
58044
  /* harmony import */ var _Unit__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(9844);
58051
58045
  /* harmony import */ var _Emphasize__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(34141);
58052
58046
  /* harmony import */ var _Edit__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(15122);
58053
- /* harmony import */ var _utils_color__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(94877);
58054
- /* harmony import */ var _alicloudfe_components__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(33049);
58055
- /* harmony import */ var _alicloudfe_components__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_alicloudfe_components__WEBPACK_IMPORTED_MODULE_12__);
58056
- /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(28266);
58057
- /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_13__);
58058
- /* harmony import */ var _teamix_utils__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(80653);
58059
- /* harmony import */ var _ValueWithStatus__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(97609);
58047
+ /* harmony import */ var _alicloudfe_components__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(33049);
58048
+ /* harmony import */ var _alicloudfe_components__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_alicloudfe_components__WEBPACK_IMPORTED_MODULE_11__);
58049
+ /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(28266);
58050
+ /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_12__);
58051
+ /* harmony import */ var _teamix_utils__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(80653);
58052
+ /* harmony import */ var _ValueWithStatus__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(97609);
58060
58053
  var _excluded = ["isList", "overlay"];
58061
58054
 
58062
58055
  function _objectWithoutProperties(source, excluded) {
@@ -58111,8 +58104,7 @@ function _objectWithoutPropertiesLoose(source, excluded) {
58111
58104
 
58112
58105
 
58113
58106
 
58114
-
58115
- var Tooltip = _alicloudfe_components__WEBPACK_IMPORTED_MODULE_12__.Balloon.Tooltip;
58107
+ var Tooltip = _alicloudfe_components__WEBPACK_IMPORTED_MODULE_11__.Balloon.Tooltip;
58116
58108
  /**
58117
58109
  * 处理个性化输出
58118
58110
  * @param dom 已经完成option映射的dom
@@ -58133,7 +58125,7 @@ function individualization(dom, render, value, fieldValue) {
58133
58125
  if (Array.isArray(dom)) {
58134
58126
  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", null, dom.map(function (item, index) {
58135
58127
  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", {
58136
- className: classnames__WEBPACK_IMPORTED_MODULE_13___default()({
58128
+ className: classnames__WEBPACK_IMPORTED_MODULE_12___default()({
58137
58129
  'teamix-pro-field-field-checkbox-tag': true,
58138
58130
  'teamix-pro-field-field-checkbox-tag-over-line': render === null || render === void 0 ? void 0 : render.wrap
58139
58131
  }),
@@ -58168,7 +58160,7 @@ function individualization(dom, render, value, fieldValue) {
58168
58160
 
58169
58161
 
58170
58162
  if ((render === null || render === void 0 ? void 0 : render.color) && !render.type) {
58171
- var color = typeof render.color === 'string' ? (0,_utils_color__WEBPACK_IMPORTED_MODULE_11__/* ["default"] */ .ZP)(render.color) : 'var(--color-text1-3, #333333)';
58163
+ var color = typeof render.color === 'string' ? (0,_teamix_utils__WEBPACK_IMPORTED_MODULE_13__.getColor)(render.color) : 'var(--color-text1-3, #333333)';
58172
58164
  result = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", {
58173
58165
  style: {
58174
58166
  color: color
@@ -58189,7 +58181,7 @@ function individualization(dom, render, value, fieldValue) {
58189
58181
  if ((render === null || render === void 0 ? void 0 : render.type) !== 'statusTag' && (render === null || render === void 0 ? void 0 : render.type) !== 'statusIconTag') {
58190
58182
  var _render$rows;
58191
58183
 
58192
- result = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_teamix_utils__WEBPACK_IMPORTED_MODULE_14__.Ellipsis, {
58184
+ result = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_teamix_utils__WEBPACK_IMPORTED_MODULE_13__.Ellipsis, {
58193
58185
  className: "teamix-pro-field-output-tooltip",
58194
58186
  tooltip: tooltip,
58195
58187
  rows: (_render$rows = render === null || render === void 0 ? void 0 : render.rows) !== null && _render$rows !== void 0 ? _render$rows : 1
@@ -58268,7 +58260,7 @@ function individualization(dom, render, value, fieldValue) {
58268
58260
 
58269
58261
 
58270
58262
  if (render === null || render === void 0 ? void 0 : render.valueWithStatusConfig) {
58271
- result = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_ValueWithStatus__WEBPACK_IMPORTED_MODULE_15__/* ["default"] */ .Z, {
58263
+ result = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_ValueWithStatus__WEBPACK_IMPORTED_MODULE_14__/* ["default"] */ .Z, {
58272
58264
  render: render,
58273
58265
  result: result,
58274
58266
  fieldValue: fieldValue
@@ -58434,7 +58426,7 @@ var Link = function Link(props) {
58434
58426
  e.preventDefault();
58435
58427
  }
58436
58428
 
58437
- render === null || render === void 0 ? void 0 : (_render$linkOnClick = render.linkOnClick) === null || _render$linkOnClick === void 0 ? void 0 : _render$linkOnClick.call(render, fieldVal, e);
58429
+ render === null || render === void 0 ? void 0 : (_render$linkOnClick = render.linkOnClick) === null || _render$linkOnClick === void 0 ? void 0 : _render$linkOnClick.call(render, value, e);
58438
58430
  }
58439
58431
  }), result);
58440
58432
  };
@@ -58464,9 +58456,8 @@ var Link = function Link(props) {
58464
58456
  /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_6__);
58465
58457
  /* harmony import */ var _teamix_utils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(80653);
58466
58458
  /* harmony import */ var _CascaderText__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(92206);
58467
- /* harmony import */ var _utils_color__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(94877);
58468
- /* harmony import */ var _step__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(67491);
58469
- /* harmony import */ var _teamix_icon__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(89227);
58459
+ /* harmony import */ var _step__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(67491);
58460
+ /* harmony import */ var _teamix_icon__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(89227);
58470
58461
  var _excluded = ["isList", "overlay", "value"];
58471
58462
 
58472
58463
  function _objectWithoutProperties(source, excluded) {
@@ -58568,7 +58559,6 @@ function _typeof(obj) {
58568
58559
 
58569
58560
 
58570
58561
 
58571
-
58572
58562
  /**
58573
58563
  * 获取 options 最终输出值
58574
58564
  * @param fieldVal 绑定值
@@ -58831,7 +58821,7 @@ function mappingOptions(fieldVal, render, options, beforeFormatter, customOption
58831
58821
 
58832
58822
 
58833
58823
  if (render && (render === null || render === void 0 ? void 0 : render.type) === 'step') {
58834
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_step__WEBPACK_IMPORTED_MODULE_10__/* ["default"] */ .Z, {
58824
+ return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_step__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .Z, {
58835
58825
  render: render,
58836
58826
  value: value
58837
58827
  });
@@ -58998,7 +58988,7 @@ var renderStatusIconTag = function renderStatusIconTag(item, render) {
58998
58988
  }, color), item);
58999
58989
  }
59000
58990
 
59001
- var processColor = (0,_utils_color__WEBPACK_IMPORTED_MODULE_9__/* .getTagColor */ .vm)(color, 'statusIcon');
58991
+ var processColor = (0,_teamix_utils__WEBPACK_IMPORTED_MODULE_7__.getTagColor)(color, 'statusIcon');
59002
58992
  var colorTypeIsPreset = rules.test(processColor !== null && processColor !== void 0 ? processColor : '');
59003
58993
 
59004
58994
  if ((0,_utils__WEBPACK_IMPORTED_MODULE_3__/* .isNull */ .Ft)(item)) {
@@ -59012,7 +59002,7 @@ var renderStatusIconTag = function renderStatusIconTag(item, render) {
59012
59002
  if (typeof processColor === 'string') {
59013
59003
  colorObject = _objectSpread({}, (0,_utils__WEBPACK_IMPORTED_MODULE_3__/* .hasProps */ .s_)({
59014
59004
  status: colorTypeIsPreset ? processColor : false,
59015
- color: colorTypeIsPreset ? false : (0,_utils_color__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .ZP)(processColor),
59005
+ color: colorTypeIsPreset ? false : (0,_teamix_utils__WEBPACK_IMPORTED_MODULE_7__.getColor)(processColor),
59016
59006
  ellipsis: render.ellipsis
59017
59007
  }));
59018
59008
  } else {
@@ -59091,8 +59081,8 @@ var renderProgress = function renderProgress(item, render) {
59091
59081
  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_alicloudfe_components__WEBPACK_IMPORTED_MODULE_1__.Progress, _objectSpread(_objectSpread({
59092
59082
  percent: Number(item)
59093
59083
  }, (0,_utils__WEBPACK_IMPORTED_MODULE_3__/* .hasProps */ .s_)({
59094
- state: colorTypeIsPreset ? (0,_utils_color__WEBPACK_IMPORTED_MODULE_9__/* .getTagColor */ .vm)(color !== null && color !== void 0 ? color : 'normal', 'progress') : false,
59095
- color: !colorTypeIsPreset ? (0,_utils_color__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .ZP)((0,_utils_color__WEBPACK_IMPORTED_MODULE_9__/* .getTagColor */ .vm)(color !== null && color !== void 0 ? color : 'normal', 'progress')) : false
59084
+ state: colorTypeIsPreset ? (0,_teamix_utils__WEBPACK_IMPORTED_MODULE_7__.getTagColor)(color !== null && color !== void 0 ? color : 'normal', 'progress') : false,
59085
+ color: !colorTypeIsPreset ? (0,_teamix_utils__WEBPACK_IMPORTED_MODULE_7__.getColor)((0,_teamix_utils__WEBPACK_IMPORTED_MODULE_7__.getTagColor)(color !== null && color !== void 0 ? color : 'normal', 'progress')) : false
59096
59086
  })), render.progressProps));
59097
59087
  };
59098
59088
  /**
@@ -59188,7 +59178,7 @@ var processHidden = function processHidden(valueOptions, render, component, befo
59188
59178
  'teamix-pro-field-output-fold-tag': true
59189
59179
  })
59190
59180
  }, (render === null || render === void 0 ? void 0 : render.foldText) !== 'more' && (component === null || component === void 0 ? void 0 : component((_render$foldText = render === null || render === void 0 ? void 0 : render.foldText) !== null && _render$foldText !== void 0 ? _render$foldText : "+".concat(remainVals.length), render, beforeFormatter)), (render === null || render === void 0 ? void 0 : render.foldText) === 'more' && (0,_teamix_utils__WEBPACK_IMPORTED_MODULE_7__.renderTags)({
59191
- children: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_teamix_icon__WEBPACK_IMPORTED_MODULE_11__/* ["default"] */ .Z, {
59181
+ children: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_teamix_icon__WEBPACK_IMPORTED_MODULE_10__/* ["default"] */ .Z, {
59192
59182
  type: "more-line",
59193
59183
  size: "small"
59194
59184
  }),
@@ -59368,8 +59358,6 @@ var Overlay = function Overlay(props) {
59368
59358
  /* harmony import */ var _teamix_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(80653);
59369
59359
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(59787);
59370
59360
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
59371
- /* harmony import */ var _utils_color__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(94877);
59372
-
59373
59361
 
59374
59362
 
59375
59363
  var cls = (0,_teamix_utils__WEBPACK_IMPORTED_MODULE_0__.baseClass)('teamix-pro-field-output-rank');
@@ -59379,12 +59367,12 @@ var Rank = function Rank(props) {
59379
59367
  color = props.color;
59380
59368
  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement("div", {
59381
59369
  style: {
59382
- backgroundColor: (0,_utils_color__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .ZP)(color)
59370
+ backgroundColor: (0,_teamix_utils__WEBPACK_IMPORTED_MODULE_0__.getColor)(color)
59383
59371
  },
59384
59372
  className: cls({
59385
59373
  '': true,
59386
59374
  deep: result == 1 || result == 2 || result == 3,
59387
- hasColor: !!(0,_utils_color__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .ZP)(color)
59375
+ hasColor: !!(0,_teamix_utils__WEBPACK_IMPORTED_MODULE_0__.getColor)(color)
59388
59376
  })
59389
59377
  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement("span", {
59390
59378
  className: cls({
@@ -59408,8 +59396,6 @@ var Rank = function Rank(props) {
59408
59396
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
59409
59397
  /* harmony import */ var _teamix_icon__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(89227);
59410
59398
  /* harmony import */ var _teamix_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(80653);
59411
- /* harmony import */ var _utils_color__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(94877);
59412
-
59413
59399
 
59414
59400
 
59415
59401
 
@@ -59435,7 +59421,7 @@ var SuffixIcon = function SuffixIcon(props) {
59435
59421
  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, result, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_teamix_icon__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z, {
59436
59422
  type: render.suffixIcon,
59437
59423
  style: {
59438
- color: (_getColor = (0,_utils_color__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .ZP)(render === null || render === void 0 ? void 0 : render.suffixIconColor)) !== null && _getColor !== void 0 ? _getColor : 'var(--color-fill1-6, #848484)'
59424
+ color: (_getColor = (0,_teamix_utils__WEBPACK_IMPORTED_MODULE_2__.getColor)(render === null || render === void 0 ? void 0 : render.suffixIconColor)) !== null && _getColor !== void 0 ? _getColor : 'var(--color-fill1-6, #848484)'
59439
59425
  },
59440
59426
  // 如果是文字链需要修改间距
59441
59427
  className: cls({
@@ -59490,35 +59476,41 @@ var Unit = function Unit(props) {
59490
59476
  /* harmony export */ });
59491
59477
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(59787);
59492
59478
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
59493
- /* harmony import */ var _teamix_pro__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(42345);
59494
- /* harmony import */ var _teamix_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(80653);
59495
-
59479
+ /* harmony import */ var _teamix_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(80653);
59496
59480
 
59497
59481
 
59498
- var cls = (0,_teamix_utils__WEBPACK_IMPORTED_MODULE_2__.baseClass)('teamix-pro-field-output-value-with-status');
59482
+ var cls = (0,_teamix_utils__WEBPACK_IMPORTED_MODULE_1__.baseClass)('teamix-pro-field-output-value-with-status');
59499
59483
 
59500
59484
  var ValueWithStatus = function ValueWithStatus(props) {
59501
- var _render$valueWithStat, _render$valueWithStat2, _fieldValue$endValue, _render$valueWithStat3, _render$valueWithStat4;
59485
+ var _ref2;
59502
59486
 
59503
59487
  var fieldValue = props.fieldValue,
59504
59488
  result = props.result,
59505
59489
  render = props.render;
59490
+
59491
+ var _ref = fieldValue || {},
59492
+ endValue = _ref.endValue;
59493
+
59494
+ var _render$valueWithStat = render === null || render === void 0 ? void 0 : render.valueWithStatusConfig,
59495
+ frontValueWidth = _render$valueWithStat.frontValueWidth,
59496
+ fronValueWidth = _render$valueWithStat.fronValueWidth,
59497
+ endValueColor = _render$valueWithStat.endValueColor;
59498
+
59506
59499
  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
59507
59500
  className: cls('')
59508
59501
  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
59509
59502
  className: cls('result'),
59510
59503
  style: {
59511
- width: (fieldValue === null || fieldValue === void 0 ? void 0 : fieldValue.endValue) !== undefined ? (_render$valueWithStat = render === null || render === void 0 ? void 0 : (_render$valueWithStat2 = render.valueWithStatusConfig) === null || _render$valueWithStat2 === void 0 ? void 0 : _render$valueWithStat2.fronValueWidth) !== null && _render$valueWithStat !== void 0 ? _render$valueWithStat : 50 : 'unset'
59504
+ width: endValue !== undefined ? (_ref2 = frontValueWidth || fronValueWidth) !== null && _ref2 !== void 0 ? _ref2 : 50 : 'unset'
59512
59505
  }
59513
- }, result), (fieldValue === null || fieldValue === void 0 ? void 0 : fieldValue.endValue) !== undefined && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
59506
+ }, result), endValue ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
59514
59507
  className: cls('divider')
59515
- }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_teamix_pro__WEBPACK_IMPORTED_MODULE_1__.ProField, {
59516
- type: "text",
59517
- value: (_fieldValue$endValue = fieldValue === null || fieldValue === void 0 ? void 0 : fieldValue.endValue) !== null && _fieldValue$endValue !== void 0 ? _fieldValue$endValue : '',
59518
- render: {
59519
- color: (0,_teamix_utils__WEBPACK_IMPORTED_MODULE_2__.getColor)((_render$valueWithStat3 = render === null || render === void 0 ? void 0 : (_render$valueWithStat4 = render.valueWithStatusConfig) === null || _render$valueWithStat4 === void 0 ? void 0 : _render$valueWithStat4.endValueColor) !== null && _render$valueWithStat3 !== void 0 ? _render$valueWithStat3 : 'var(--color-text1-3, #333333)')
59508
+ }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
59509
+ className: cls('value-with-status'),
59510
+ style: {
59511
+ color: (0,_teamix_utils__WEBPACK_IMPORTED_MODULE_1__.getColor)(endValueColor !== null && endValueColor !== void 0 ? endValueColor : 'var(--color-text1-3, #333333)')
59520
59512
  }
59521
- }));
59513
+ }, endValue)) : null);
59522
59514
  };
59523
59515
 
59524
59516
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ValueWithStatus);
@@ -61450,78 +61442,6 @@ function renderPreviewProps(val, mode, render, options, beforeFormatter, customO
61450
61442
 
61451
61443
  /***/ }),
61452
61444
 
61453
- /***/ 94877:
61454
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
61455
-
61456
- "use strict";
61457
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
61458
- /* harmony export */ "ZP": () => (__WEBPACK_DEFAULT_EXPORT__),
61459
- /* harmony export */ "vm": () => (/* binding */ getTagColor)
61460
- /* harmony export */ });
61461
- /* unused harmony export color */
61462
- var brandColor = [['snow', 'var(--color-white, #fff)'], ['b0', 'var(--color-brand1-1, #f0f7ff)'], ['b10', 'var(--color-brand1-2, #cae3fd)'], ['b20', 'var(--color-brand1-3, #90c0ef)'], ['b30', 'var(--color-brand1-4, #589ad8)'], ['b40', 'var(--color-brand1-5, #2a7dd1)'], ['b50', 'var(--color-brand1-6, #0064c8)'], ['b60', 'var(--color-brand1-7, #0057ad)'], ['b70', 'var(--color-brand1-8, #003e7c)'], ['b80', '#003263'], ['b90', '#002953']];
61463
- var grey = [['g0', 'var(--color-fill1-2, #f7f7f7)'], ['g10', 'var(--color-line1-1, #eaeaea)'], ['g20', 'var(--color-line1-2, #d9d9d9)'], ['g30', 'var(--color-line1-3, #ccc)'], ['g40', 'var(--color-line1-5, #ababab)'], ['g50', 'var(--color-fill1-6, #848484)'], ['g60', 'var(--color-text1-2, #5a5a5a)'], ['g70', 'var(--color-text1-3, #333333)'], ['g80', 'var(--color-text1-5, #292929)'], ['g90', 'var(--color-text1-4, #1a1a1a)'], ['black', 'var(--color-black, #000)']];
61464
- var error = [['r0', 'var(--color-error-1, #fff1f0)'], ['r10', 'var(--color-error-2, #fcceca)'], ['r20', 'var(--color-error-3, #f7aaa3)'], ['r30', 'var(--color-error-7, #f2887e)'], ['r40', 'var(--color-error-4, #ed675a)'], ['r50', 'var(--color-error-5, #e84738)'], ['r60', 'var(--color-error-6, #c43123)'], ['r70', '#A11F13'], ['r80', '#7D1207'], ['r90', '#520700']];
61465
- var success = [['gn0', 'var(--color-success-1, #f0fff7)'], ['gn10', 'var(--color-success-2, #cdf8e1)'], ['gn20', 'var(--color-success-3, #90deb5)'], ['gn30', 'var(--color-success-7, #67cf98)'], ['gn40', 'var(--color-success-4, #43bf7d)'], ['gn50', 'var(--color-success-5, #22b066)'], ['gn60', 'var(--color-success-6, #159953)'], ['gn70', '#098243'], ['gn80', '#026B34'], ['gn90', '#005420']];
61466
- var warning = [['o0', 'var(--color-warning-1, #fff8f0)'], ['o10', 'var(--color-warning-2, #ffe0bf)'], ['o20', 'var(--color-warning-3, #ffcd96)'], ['o30', 'var(--color-warning-7, #ffb96e)'], ['o40', 'var(--color-warning-4, #ffa544)'], ['o50', 'var(--color-warning-5, #f98e1a)'], ['o60', 'var(--color-warning-6, #cf7412)'], ['o70', '#A35A0A'], ['o80', '#774106'], ['o90', '#522A00']];
61467
- var help = [['y0', 'var(--color-help-1, #fffcf0)'], ['y10', 'var(--color-help-2, #fff5c2)'], ['y20', 'var(--color-help-3, #ffee96)'], ['y30', 'var(--color-help-7, #ffe66b)'], ['y40', 'var(--color-help-4, #ffdf40)'], ['y50', 'var(--color-help-5, #fad414)'], ['y60', 'var(--color-help-6, #d1b10d)'], ['y70', '#A88E07'], ['y80', '#796702'], ['y90', '#524400']];
61468
- var mention = [['p0', 'var(--color-mention-1, #f0f0ff)'], ['p10', 'var(--color-mention-2, #c9cbf5)'], ['p20', 'var(--color-mention-3, #afb2f0)'], ['p30', 'var(--color-mention-4, #969aeb)'], ['p40', 'var(--color-mention-5, #7e83e6)'], ['p50', 'var(--color-mention-6, #666ce0)'], ['p60', 'var(--color-mention-7, #4046bd)'], ['p70', 'var(--color-mention-8, #232999)'], ['p80', 'var(--color-mention-9, #0e1375)'], ['p90', 'var(--color-mention-10, #000452)']];
61469
- var tagMapper = {
61470
- fail: 'error',
61471
- process: 'prompt',
61472
- pause: 'pause',
61473
- 'filter-tag': 'filter-tag'
61474
- };
61475
- var progressMapper = {
61476
- fail: 'error',
61477
- process: 'normal',
61478
- pause: 'pause',
61479
- help: 'Y50',
61480
- warning: 'O50',
61481
- mention: 'P50'
61482
- };
61483
- var statusIconMapper = {
61484
- 'cloud-running': {
61485
- icon: 'success-fill',
61486
- color: 'var(--color-success-5, #22b066)'
61487
- },
61488
- 'cloud-stopped': {
61489
- icon: 'pause-fill',
61490
- color: 'var(--color-warning-5, #f98e1a)'
61491
- },
61492
- 'cloud-fail': {
61493
- icon: 'prompt-fill',
61494
- color: 'var(--color-error-5, #e84738)'
61495
- },
61496
- 'cloud-useless': {
61497
- icon: 'minus-fill',
61498
- color: 'var(--color-line1-5, #ababab)'
61499
- },
61500
- 'cloud-loading': 'loading'
61501
- };
61502
- var color = new Map([].concat(brandColor, grey, error, success, warning, help, mention));
61503
-
61504
- var getColor = function getColor(symbol) {
61505
- var value = color.get((symbol !== null && symbol !== void 0 ? symbol : '').toLocaleLowerCase());
61506
- return value !== null && value !== void 0 ? value : symbol;
61507
- };
61508
-
61509
- var getTagColor = function getTagColor(color, type) {
61510
- var _mapper$type$color, _mapper$type;
61511
-
61512
- var mapper = {
61513
- tag: tagMapper,
61514
- progress: progressMapper,
61515
- statusIcon: statusIconMapper
61516
- };
61517
- return (_mapper$type$color = mapper === null || mapper === void 0 ? void 0 : (_mapper$type = mapper[type]) === null || _mapper$type === void 0 ? void 0 : _mapper$type[color]) !== null && _mapper$type$color !== void 0 ? _mapper$type$color : color;
61518
- };
61519
-
61520
-
61521
- /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (getColor);
61522
-
61523
- /***/ }),
61524
-
61525
61445
  /***/ 36463:
61526
61446
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
61527
61447
 
@@ -63404,7 +63324,7 @@ function useDialogFormAction(action, context) {
63404
63324
 
63405
63325
  _onFinish && _onFinish((_innerFormRef$current2 = innerFormRef.current) == null ? void 0 : _innerFormRef$current2.values);
63406
63326
  }
63407
- }, others), context);
63327
+ }, others), context, true);
63408
63328
  }
63409
63329
  /* unused harmony default export */ var __WEBPACK_DEFAULT_EXPORT__ = ((/* unused pure expression or super */ null && (useDialogFormAction)));
63410
63330
 
@@ -63545,7 +63465,7 @@ function getFooterAlignClass(isDrawer, align) {
63545
63465
  } // 弹窗 -> 请求(点击确认,发送数据请求)
63546
63466
 
63547
63467
 
63548
- function useDialogAction(action, actionContext) {
63468
+ function useDialogAction(action, actionContext, hasForm) {
63549
63469
  var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false),
63550
63470
  loading = _useState[0],
63551
63471
  setLoading = _useState[1];
@@ -63649,22 +63569,27 @@ function useDialogAction(action, actionContext) {
63649
63569
  case 6:
63650
63570
  onFinish && onFinish();
63651
63571
  resolve(true);
63652
- _context.next = 16;
63572
+ _context.next = 18;
63653
63573
  break;
63654
63574
 
63655
63575
  case 10:
63656
63576
  _context.prev = 10;
63657
63577
  _context.t0 = _context["catch"](2);
63658
- setLoading(false); // 如果 beforeRequest 中返回了 false,则直接关闭弹窗
63578
+ setLoading(false); // 如果 beforeRequest 中返回了 false 并且不是 dialog-form,则直接关闭弹窗
63659
63579
 
63660
- if (beforeRequest) {
63661
- resolve(true);
63580
+ if (!(beforeRequest && !hasForm)) {
63581
+ _context.next = 16;
63582
+ break;
63662
63583
  }
63663
63584
 
63664
- resolve(false);
63585
+ resolve(true);
63665
63586
  return _context.abrupt("return");
63666
63587
 
63667
63588
  case 16:
63589
+ resolve(false);
63590
+ return _context.abrupt("return");
63591
+
63592
+ case 18:
63668
63593
  case "end":
63669
63594
  return _context.stop();
63670
63595
  }
@@ -66096,7 +66021,6 @@ var QueryFilter = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.memo)(funct
66096
66021
  otherProps = _objectWithoutPropertiesLoose(props, _excluded);
66097
66022
 
66098
66023
  var _useSpecialProps = (0,_useSpecialProps__WEBPACK_IMPORTED_MODULE_14__/* ["default"] */ .Z)(props),
66099
- hasChangeDefault = _useSpecialProps.hasChangeDefault,
66100
66024
  hasRequired = _useSpecialProps.hasRequired;
66101
66025
 
66102
66026
  var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(!!expand),
@@ -66114,56 +66038,66 @@ var QueryFilter = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.memo)(funct
66114
66038
  var prefixCls = (0,_teamix_utils__WEBPACK_IMPORTED_MODULE_6__.usePrefixCls)('', {
66115
66039
  prefix: 'teamix-pro-form-query-filter'
66116
66040
  });
66117
- /**
66118
- * 处理onInit与onFilter事件的触发问题
66119
- */
66041
+ var debounceFun = lodash_debounce__WEBPACK_IMPORTED_MODULE_2___default()(function (fun, props) {
66042
+ return fun(props);
66043
+ }, filterDebounce); // onInit
66120
66044
 
66045
+ var initialRequestRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(!!(props != null && props.initialRequest));
66121
66046
  var filterEnable = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)('waiting');
66122
66047
 
66123
- var _onFormInit = function onFormInit(form, _ref) {
66124
- var initialRequest = _ref.initialRequest,
66125
- initialValues = _ref.initialValues;
66048
+ var onFormInit = /*#__PURE__*/function () {
66049
+ var _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(form) {
66050
+ var loadingField;
66051
+ return regeneratorRuntime.wrap(function _callee$(_context) {
66052
+ while (1) {
66053
+ switch (_context.prev = _context.next) {
66054
+ case 0:
66055
+ form.setState({
66056
+ loading: initialRequestRef.current
66057
+ }); // 借用 form.loading 触发 onFormReact
66126
66058
 
66127
- if (!form.mounted) {
66128
- // 借用form的loading属性来判断initialValues和initialRequest是否完成
66129
- form.setState({
66130
- loading: !!initialRequest || !!initialValues
66131
- });
66132
- }
66059
+ loadingField = Object.values(form.fields).filter(function (field) {
66060
+ return !!field.loading;
66061
+ }); // 等待mounted + 字段loading结束 + initialRequest结束 => 表单默认值初始化完成
66133
66062
 
66134
- var loadingField = Object.values(form.fields).filter(function (field) {
66135
- return !!field.loading;
66136
- }); // 等待表单mounted + 字段loading结束 + form默认值初始化 => 表单初始化完成
66063
+ if (!(form.mounted && !loadingField.length && !form.loading)) {
66064
+ _context.next = 10;
66065
+ break;
66066
+ }
66137
66067
 
66138
- if (form.mounted && !loadingField.length && !form.loading) {
66139
- _onFormInit = function onFormInit() {}; // init后销毁 isFormInit 方法
66068
+ onFormInit = function onFormInit() {}; // init后销毁 isFormInit 方法
66140
66069
 
66141
66070
 
66142
- var values = (0,_teamix_utils__WEBPACK_IMPORTED_MODULE_6__.getValidValues)(form.values);
66071
+ filterEnable.current = 'filter';
66143
66072
 
66144
- if (!(0,_teamix_utils__WEBPACK_IMPORTED_MODULE_6__.isUsable)(values) || !hasChangeDefault) {
66145
- // 表单无默认值 或 无触发onChange的默认值配置,不会触发onFilter内的onInit,所以主动触发onInit
66146
- filterEnable.current = 'filter';
66147
- setTimeout(function () {
66148
- onInit == null ? void 0 : onInit((0,_formily_reactive__WEBPACK_IMPORTED_MODULE_5__.toJS)(form.values));
66149
- }, 0);
66073
+ if (!onInit) {
66074
+ _context.next = 10;
66075
+ break;
66076
+ }
66150
66077
 
66151
- if (mode === 'panel') {
66152
- // 移除lightForm的默认值
66153
- // 设置Tag
66154
- configFilterItem(advancedForm);
66078
+ _context.next = 8;
66079
+ return form.validate();
66155
66080
 
66156
- if (!panelVisible) {
66157
- setTimeout(function () {
66158
- configTag();
66159
- }, 0);
66081
+ case 8:
66082
+ onInit == null ? void 0 : onInit((0,_formily_reactive__WEBPACK_IMPORTED_MODULE_5__.toJS)(form.values)); // 设置Tag
66083
+
66084
+ if (mode === 'panel') {
66085
+ configFilterItem(advancedForm);
66086
+ !panelVisible && configTag();
66087
+ }
66088
+
66089
+ case 10:
66090
+ case "end":
66091
+ return _context.stop();
66160
66092
  }
66161
66093
  }
66162
- } else {
66163
- filterEnable.current = 'initialized';
66164
- }
66165
- }
66166
- }; // 配置当前激活的form实例
66094
+ }, _callee);
66095
+ }));
66096
+
66097
+ return function onFormInit(_x) {
66098
+ return _ref.apply(this, arguments);
66099
+ };
66100
+ }(); // 配置当前激活的form实例
66167
66101
 
66168
66102
 
66169
66103
  var setCurrentForm = function setCurrentForm(formName) {
@@ -66189,7 +66123,7 @@ var QueryFilter = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.memo)(funct
66189
66123
  effects: function effects() {
66190
66124
  (0,_formily_core__WEBPACK_IMPORTED_MODULE_4__.onFormReact)(function (form) {
66191
66125
  if (mode === 'inline') {
66192
- _onFormInit(form, props);
66126
+ onFormInit(form);
66193
66127
  }
66194
66128
  });
66195
66129
  }
@@ -66213,7 +66147,7 @@ var QueryFilter = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.memo)(funct
66213
66147
  effects: function effects() {
66214
66148
  (0,_formily_core__WEBPACK_IMPORTED_MODULE_4__.onFormReact)(function (form) {
66215
66149
  if (mode === 'panel') {
66216
- _onFormInit(form, props);
66150
+ onFormInit(form);
66217
66151
  }
66218
66152
  });
66219
66153
  (0,_formily_core__WEBPACK_IMPORTED_MODULE_4__.onFormInputChange)(function (form) {
@@ -66292,93 +66226,62 @@ var QueryFilter = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.memo)(funct
66292
66226
  }, [panelVisible, configTag]); // 简单搜索Filter
66293
66227
 
66294
66228
  var onSimpleFilter = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)( /*#__PURE__*/function () {
66295
- var _ref3 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(values) {
66296
- return regeneratorRuntime.wrap(function _callee$(_context) {
66229
+ var _ref3 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2(values) {
66230
+ return regeneratorRuntime.wrap(function _callee2$(_context2) {
66297
66231
  while (1) {
66298
- switch (_context.prev = _context.next) {
66232
+ switch (_context2.prev = _context2.next) {
66299
66233
  case 0:
66300
- if (!(currentForm.current === 'simple')) {
66301
- _context.next = 14;
66302
- break;
66303
- }
66304
-
66305
- if (!(filterEnable.current === 'initialized')) {
66306
- _context.next = 9;
66307
- break;
66308
- }
66309
-
66310
- filterEnable.current = 'filter';
66311
-
66312
- if (!hasRequired) {
66313
- _context.next = 6;
66314
- break;
66315
- }
66316
-
66317
- _context.next = 6;
66234
+ _context2.next = 2;
66318
66235
  return simpleForm.validate();
66319
66236
 
66320
- case 6:
66321
- onInit == null ? void 0 : onInit(values);
66322
- _context.next = 14;
66323
- break;
66324
-
66325
- case 9:
66326
- if (!(filterEnable.current === 'filter')) {
66327
- _context.next = 14;
66328
- break;
66329
- }
66330
-
66331
- if (!hasRequired) {
66332
- _context.next = 13;
66333
- break;
66334
- }
66335
-
66336
- _context.next = 13;
66337
- return simpleForm.validate();
66338
-
66339
- case 13:
66237
+ case 2:
66340
66238
  onFilter == null ? void 0 : onFilter(values);
66341
66239
 
66342
- case 14:
66240
+ case 3:
66343
66241
  case "end":
66344
- return _context.stop();
66242
+ return _context2.stop();
66345
66243
  }
66346
66244
  }
66347
- }, _callee);
66245
+ }, _callee2);
66348
66246
  }));
66349
66247
 
66350
- return function (_x) {
66248
+ return function (_x2) {
66351
66249
  return _ref3.apply(this, arguments);
66352
66250
  };
66353
- }(), [onFilter, hasRequired, onInit]); // 简单搜索Change
66251
+ }(), [onFilter]); // 简单搜索Change
66354
66252
 
66355
66253
  var onSimpleChange = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function (values, fieldValue, fieldName) {
66356
66254
  if (currentForm.current === 'simple') {
66357
66255
  onChange == null ? void 0 : onChange(values, fieldValue, fieldName);
66256
+
66257
+ if (filterEnable.current === 'filter') {
66258
+ debounceFun(onSimpleFilter, values);
66259
+ }
66358
66260
  }
66359
66261
  }, [onChange]); // 轻量搜索Filter
66360
66262
 
66361
66263
  var onLightFilter = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function (values) {
66362
- if (currentForm.current === 'light') {
66363
- if (filterEnable.current === 'filter') {
66364
- var _Object$keys;
66264
+ var _Object$keys;
66365
66265
 
66366
- onFilter == null ? void 0 : onFilter(values); // 清空advancedForm的值,配置Tag
66266
+ onFilter == null ? void 0 : onFilter(values); // 清空advancedForm的值
66367
66267
 
66368
- var clearKeys = {};
66369
- (_Object$keys = Object.keys(advancedForm.values)) == null ? void 0 : _Object$keys.forEach(function (key) {
66370
- clearKeys[key] = undefined;
66371
- });
66372
- advancedForm.setValues(clearKeys);
66373
- configFilterItem(advancedForm);
66374
- configTag();
66375
- }
66376
- }
66268
+ var clearKeys = {};
66269
+ (_Object$keys = Object.keys(advancedForm.values)) == null ? void 0 : _Object$keys.forEach(function (key) {
66270
+ clearKeys[key] = undefined;
66271
+ });
66272
+ advancedForm.setValues(clearKeys); // 配置Tag
66273
+
66274
+ configFilterItem(advancedForm);
66275
+ configTag();
66377
66276
  }, [onFilter]); // 轻量搜索Change
66378
66277
 
66379
66278
  var onLightChange = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function (values, fieldValue, fieldName) {
66380
66279
  if (currentForm.current === 'light') {
66381
66280
  onChange == null ? void 0 : onChange(values, fieldValue, fieldName);
66281
+
66282
+ if (filterEnable.current === 'filter') {
66283
+ debounceFun(onLightFilter, values);
66284
+ }
66382
66285
  }
66383
66286
  }, [onChange]); // 高级搜索Filter
66384
66287
 
@@ -66400,54 +66303,7 @@ var QueryFilter = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.memo)(funct
66400
66303
  lightForm.reset('*', {
66401
66304
  forceClear: true
66402
66305
  });
66403
- }, [onReset]); // 高级搜索Init
66404
-
66405
- var onAdvancedInit = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)( /*#__PURE__*/function () {
66406
- var _ref4 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2(values) {
66407
- return regeneratorRuntime.wrap(function _callee2$(_context2) {
66408
- while (1) {
66409
- switch (_context2.prev = _context2.next) {
66410
- case 0:
66411
- if (!(currentForm.current === 'advanced')) {
66412
- _context2.next = 9;
66413
- break;
66414
- }
66415
-
66416
- if (!(filterEnable.current === 'initialized')) {
66417
- _context2.next = 9;
66418
- break;
66419
- }
66420
-
66421
- filterEnable.current = 'filter';
66422
-
66423
- if (!hasRequired) {
66424
- _context2.next = 6;
66425
- break;
66426
- }
66427
-
66428
- _context2.next = 6;
66429
- return advancedForm.validate();
66430
-
66431
- case 6:
66432
- onInit == null ? void 0 : onInit(values);
66433
- configFilterItem(advancedForm);
66434
-
66435
- if (!panelVisible) {
66436
- configTag();
66437
- }
66438
-
66439
- case 9:
66440
- case "end":
66441
- return _context2.stop();
66442
- }
66443
- }
66444
- }, _callee2);
66445
- }));
66446
-
66447
- return function (_x2) {
66448
- return _ref4.apply(this, arguments);
66449
- };
66450
- }(), [hasRequired, onInit]); // 高级搜索Change
66306
+ }, [onReset]); // 高级搜索Change
66451
66307
 
66452
66308
  var onAdvancedChange = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function (values, fieldValue, fieldName) {
66453
66309
  if (currentForm.current === 'advanced') {
@@ -66467,16 +66323,14 @@ var QueryFilter = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.memo)(funct
66467
66323
  configFilterItem(advancedForm);
66468
66324
  configTag();
66469
66325
  onFilter == null ? void 0 : onFilter((0,_formily_reactive__WEBPACK_IMPORTED_MODULE_5__.toJS)(advancedForm.values));
66470
- }, [onFilter]); // initialValues和initialRequest的回调
66326
+ }, [onFilter]); // initialRequest 的回调
66471
66327
 
66472
66328
  var onInitialComplete = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function (form) {
66329
+ initialRequestRef.current = false;
66473
66330
  form.setState({
66474
- loading: false
66331
+ loading: initialRequestRef.current
66475
66332
  });
66476
- }, []);
66477
- var debounceFun = lodash_debounce__WEBPACK_IMPORTED_MODULE_2___default()(function (fun, props) {
66478
- return fun(props);
66479
- }, filterDebounce); // 组件挂载
66333
+ }, []); // 组件挂载
66480
66334
 
66481
66335
  (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
66482
66336
  setCurrentForm(currentForm.current);
@@ -66496,37 +66350,28 @@ var QueryFilter = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.memo)(funct
66496
66350
  filterValues: filterValues,
66497
66351
  activeFilterValueRef: activeFilterValueRef,
66498
66352
  form: lightForm,
66499
- onChange: function onChange(values, fieldValue, fieldName) {
66500
- debounceFun(onLightFilter, values);
66501
- onLightChange(values, fieldValue, fieldName);
66502
- }
66353
+ onChange: onLightChange
66503
66354
  }))) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
66504
66355
  className: prefixCls + "-inline"
66505
66356
  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_SimpleFilter__WEBPACK_IMPORTED_MODULE_10__/* ["default"] */ .Z, _extends({}, otherProps, {
66506
66357
  form: simpleForm,
66507
- onChange: function onChange(values, fieldValue, fieldName) {
66508
- debounceFun(onSimpleFilter, values);
66509
- onSimpleChange(values, fieldValue, fieldName);
66510
- },
66358
+ onChange: onSimpleChange,
66511
66359
  onSubmit: onSimpleFilter,
66512
66360
  onInitialComplete: onInitialComplete
66513
66361
  }))),
66514
66362
  panelContent: mode === 'panel' ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_AdvancedFilter__WEBPACK_IMPORTED_MODULE_12__/* ["default"] */ .Z, _extends({}, otherProps, {
66515
66363
  form: advancedForm,
66516
- onChange: function onChange(values, fieldValue, fieldName) {
66517
- debounceFun(onAdvancedInit, values);
66518
- onAdvancedChange(values, fieldValue, fieldName);
66519
- },
66364
+ onChange: onAdvancedChange,
66520
66365
  onSubmit: onAdvancedFilter,
66521
66366
  onReset: onAdvancedReset,
66522
66367
  onInitialComplete: onInitialComplete
66523
66368
  })) : null
66524
- }, mode === 'panel' && !panelVisible ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_alicloudfe_components__WEBPACK_IMPORTED_MODULE_3__.Tag.Group, null, tagDataSource.map(function (_ref5) {
66525
- var key = _ref5.key,
66526
- label = _ref5.label,
66527
- value = _ref5.value,
66528
- type = _ref5.type,
66529
- index = _ref5.index;
66369
+ }, mode === 'panel' && !panelVisible ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_alicloudfe_components__WEBPACK_IMPORTED_MODULE_3__.Tag.Group, null, tagDataSource.map(function (_ref4) {
66370
+ var key = _ref4.key,
66371
+ label = _ref4.label,
66372
+ value = _ref4.value,
66373
+ type = _ref4.type,
66374
+ index = _ref4.index;
66530
66375
  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_alicloudfe_components__WEBPACK_IMPORTED_MODULE_3__.Tag.Closeable, {
66531
66376
  key: (0,_teamix_utils__WEBPACK_IMPORTED_MODULE_6__.isNum)(index) ? key + label : key,
66532
66377
  afterClose: function afterClose() {
@@ -66844,7 +66689,7 @@ var customComponent = function customComponent(component) {
66844
66689
  /* harmony import */ var _useAutoSubmit__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(86924);
66845
66690
  /* harmony import */ var _useInitialRequest__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(8550);
66846
66691
  /* harmony import */ var _locales_validate__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(67315);
66847
- var _excluded = ["form", "initialValues", "initialRequest", "schema", "scope", "context", "components", "children", "layout", "labelAlign", "wrapperAlign", "labelCol", "wrapperCol", "breakpoints", "onChange", "onSubmit", "onSubmitFailed", "onInitialComplete", "className", "validateFirst"];
66692
+ var _excluded = ["form", "initialValues", "initialRequest", "schema", "scope", "context", "components", "children", "layout", "labelAlign", "wrapperAlign", "labelCol", "wrapperCol", "breakpoints", "onChange", "onChangeType", "onSubmit", "onSubmitFailed", "onInitialComplete", "className", "validateFirst"];
66848
66693
 
66849
66694
  function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
66850
66695
 
@@ -66885,6 +66730,7 @@ var ProForm = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.memo)(function
66885
66730
  wrapperCol = _ref.wrapperCol,
66886
66731
  breakpoints = _ref.breakpoints,
66887
66732
  onChange = _ref.onChange,
66733
+ onChangeType = _ref.onChangeType,
66888
66734
  onSubmit = _ref.onSubmit,
66889
66735
  onSubmitFailed = _ref.onSubmitFailed,
66890
66736
  onInitialComplete = _ref.onInitialComplete,
@@ -66931,35 +66777,44 @@ var ProForm = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.memo)(function
66931
66777
  labelCol: (0,_utils__WEBPACK_IMPORTED_MODULE_7__/* .mergeArrayValue */ .UT)([24], labelCol),
66932
66778
  wrapperCol: (0,_utils__WEBPACK_IMPORTED_MODULE_7__/* .mergeArrayValue */ .UT)([24], wrapperCol)
66933
66779
  };
66934
- }, [breakpoints, layout, labelAlign, wrapperAlign, labelCol, wrapperCol]); // 添加onChange
66935
-
66936
- (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
66937
- form.removeEffects('onFieldValueChange');
66938
- form.addEffects('onFieldValueChange', function () {
66939
- (0,_formily_core__WEBPACK_IMPORTED_MODULE_2__.onFieldValueChange)('*', function (field, form) {
66940
- var _field$props;
66941
-
66942
- onChange && onChange((0,_formily_reactive__WEBPACK_IMPORTED_MODULE_3__.toJS)(form.values), (0,_formily_reactive__WEBPACK_IMPORTED_MODULE_3__.toJS)(field.value), (_field$props = field.props) == null ? void 0 : _field$props.name);
66943
- });
66944
- });
66945
- }, [form, onChange]); // 配置表单默认值
66946
-
66947
- (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
66780
+ }, [breakpoints, layout, labelAlign, wrapperAlign, labelCol, wrapperCol]);
66781
+ (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(function () {
66782
+ // 配置表单默认值
66948
66783
  if (initialValues) {
66949
66784
  form.setInitialValues(initialValues);
66950
- onInitialComplete == null ? void 0 : onInitialComplete(form);
66951
66785
  } else if (initialRequest) {
66952
66786
  (0,_useInitialRequest__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .Z)(initialRequest).then(function (values) {
66953
66787
  form.setInitialValues(values);
66954
66788
  })["finally"](function () {
66955
66789
  onInitialComplete == null ? void 0 : onInitialComplete(form);
66956
66790
  });
66957
- }
66958
- }, []); // 配置国际化
66791
+ } // 配置国际化
66792
+
66959
66793
 
66960
- (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
66961
66794
  (0,_formily_core__WEBPACK_IMPORTED_MODULE_2__.setValidateLanguage)((0,_teamix_utils__WEBPACK_IMPORTED_MODULE_5__.getLanguage)() || 'zh-cn');
66962
- }, []);
66795
+ }, []); // 添加 onChange 事件
66796
+
66797
+ (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(function () {
66798
+ if (onChangeType === 'form') {
66799
+ // 使用 onFormValuesChange 无法监听具体变化字段
66800
+ form.removeEffects('onChangeByFormValuesChange');
66801
+ form.addEffects('onChangeByFormValuesChange', function () {
66802
+ (0,_formily_core__WEBPACK_IMPORTED_MODULE_2__.onFormValuesChange)(function (form) {
66803
+ onChange == null ? void 0 : onChange((0,_formily_reactive__WEBPACK_IMPORTED_MODULE_3__.toJS)(form.values));
66804
+ });
66805
+ });
66806
+ } else {
66807
+ // 使用 onFieldValueChange 无法监听数组类型值的增删
66808
+ form.removeEffects('onChangeByFieldValueChange');
66809
+ form.addEffects('onChangeByFieldValueChange', function () {
66810
+ (0,_formily_core__WEBPACK_IMPORTED_MODULE_2__.onFieldValueChange)('*', function (field, form) {
66811
+ var _field$props;
66812
+
66813
+ onChange == null ? void 0 : onChange((0,_formily_reactive__WEBPACK_IMPORTED_MODULE_3__.toJS)(form.values), (0,_formily_reactive__WEBPACK_IMPORTED_MODULE_3__.toJS)(field.value), (_field$props = field.props) == null ? void 0 : _field$props.name);
66814
+ });
66815
+ });
66816
+ }
66817
+ }, [onChange]);
66963
66818
  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_teamix_formily__WEBPACK_IMPORTED_MODULE_4__.Form, _extends({
66964
66819
  className: classnames__WEBPACK_IMPORTED_MODULE_1___default()(prefixCls, className)
66965
66820
  }, otherProps, getTeamixLayout, {
@@ -69288,7 +69143,7 @@ _teamix_icon__WEBPACK_IMPORTED_MODULE_15__/* ["default"].setConfig */ .Z.setConf
69288
69143
  // export * from './sidebar';
69289
69144
 
69290
69145
 
69291
- var version = '1.3.9';
69146
+ var version = '1.3.12';
69292
69147
 
69293
69148
 
69294
69149
  /***/ }),
@@ -69869,33 +69724,23 @@ var ProBaseInfo = function ProBaseInfo(props) {
69869
69724
  var formItemLayout = JSON.parse(JSON.stringify(defaultLayout.formItemLayout)); // 自定义布局
69870
69725
 
69871
69726
  if (layout) {
69872
- var _layout$labelCol, _layout$wrapperCol, _layout$span;
69727
+ var _layout$labelCol, _layout$wrapperCol;
69873
69728
 
69874
69729
  var labelCol = (_layout$labelCol = layout == null ? void 0 : layout.labelCol) != null ? _layout$labelCol : defaultLayout.formItemLayout.labelCol;
69875
69730
  var wrapperCol = (_layout$wrapperCol = layout == null ? void 0 : layout.wrapperCol) != null ? _layout$wrapperCol : defaultLayout.formItemLayout.wrapperCol;
69876
- var span = (_layout$span = layout == null ? void 0 : layout.span) != null ? _layout$span : defaultLayout.span;
69877
-
69878
- if (layout != null && layout.colNum && layout.colNum > 0 && layout.colNum <= 4) {
69879
- span = 24 / layout.colNum;
69880
- }
69881
-
69882
- formItemLayout.span = span;
69883
69731
  formItemLayout.labelCol = labelCol;
69884
69732
  formItemLayout.wrapperCol = wrapperCol;
69885
69733
  }
69886
69734
 
69887
- var newSpan = formItemLayout.span;
69888
69735
  var newLabelSpan = formItemLayout.labelCol.span;
69889
69736
  var newWrapperSpan = formItemLayout.wrapperCol.span; // 计算合并列情况。label与wrapper需要重新计算
69890
69737
 
69891
69738
  if (colspan) {
69892
- newSpan = newSpan * (colspan != null ? colspan : 1);
69893
69739
  newLabelSpan = newLabelSpan / colspan;
69894
69740
  newWrapperSpan = newWrapperSpan + (formItemLayout.labelCol.span - newLabelSpan);
69895
69741
  }
69896
69742
 
69897
69743
  var newFormItemLayout = {
69898
- span: newSpan,
69899
69744
  labelCol: {
69900
69745
  span: newLabelSpan
69901
69746
  },
@@ -69908,10 +69753,12 @@ var ProBaseInfo = function ProBaseInfo(props) {
69908
69753
 
69909
69754
  var renderContent = function renderContent() {
69910
69755
  return columns.map(function (item, index) {
69911
- var _getFormItemLayout, _item$colSpan, _item$title, _item$valueType, _ref, _item$colSpan2;
69756
+ var _layout$span, _layout$span2, _item$title, _item$valueType, _ref, _item$colSpan;
69912
69757
 
69758
+ var span = item.colSpan ? defaultLayout.span * item.colSpan : defaultLayout.span;
69759
+ var layoutSpan = item.colSpan ? ((_layout$span = layout == null ? void 0 : layout.span) != null ? _layout$span : span) * item.colSpan : (_layout$span2 = layout == null ? void 0 : layout.span) != null ? _layout$span2 : span;
69913
69760
  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(Col, {
69914
- span: (_getFormItemLayout = getFormItemLayout((_item$colSpan = item == null ? void 0 : item.colSpan) != null ? _item$colSpan : 0)) == null ? void 0 : _getFormItemLayout.span,
69761
+ span: layoutSpan,
69915
69762
  key: index
69916
69763
  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_ProInfoItem__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z, {
69917
69764
  label: (_item$title = item == null ? void 0 : item.title) != null ? _item$title : '',
@@ -69927,7 +69774,7 @@ var ProBaseInfo = function ProBaseInfo(props) {
69927
69774
  context: context,
69928
69775
  props: item.props
69929
69776
  }),
69930
- baseInfoLayout: getFormItemLayout((_item$colSpan2 = item == null ? void 0 : item.colSpan) != null ? _item$colSpan2 : 0),
69777
+ baseInfoLayout: getFormItemLayout((_item$colSpan = item == null ? void 0 : item.colSpan) != null ? _item$colSpan : 0),
69931
69778
  tooltip: item.tooltip,
69932
69779
  tooltipIcon: item.tooltipIcon
69933
69780
  }));
@@ -79401,6 +79248,31 @@ function getCookie(name) {
79401
79248
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
79402
79249
  /* harmony export */ "M": () => (/* binding */ autoWidth)
79403
79250
  /* harmony export */ });
79251
+ /**
79252
+ * 获取某个宽度在宽度集中的无效空间
79253
+ * @param array 宽度集
79254
+ * @param used 使用此宽度计算宽度集无效空间
79255
+ * @returns 使用此宽度的闲置空间和溢出空间
79256
+ */
79257
+ var getInvalidSpace = function getInvalidSpace(array, used) {
79258
+ return array.reduce(function (prev, current) {
79259
+ if (used > current) {
79260
+ prev[0] += used - current; // 闲置值
79261
+ }
79262
+
79263
+ if (used < current) {
79264
+ prev[1] += current - used; // 溢出值
79265
+ }
79266
+
79267
+ return prev;
79268
+ }, [0, 0]);
79269
+ };
79270
+
79271
+ /**
79272
+ * 根据宽度集获取合适的宽度
79273
+ * @param array
79274
+ * @returns
79275
+ */
79404
79276
  var autoWidth = function autoWidth(array) {
79405
79277
  var consoleArray = []; // 日志记录
79406
79278
 
@@ -79408,56 +79280,30 @@ var autoWidth = function autoWidth(array) {
79408
79280
 
79409
79281
  var expectedWidth = 0; // 期望宽度
79410
79282
 
79411
- var getInvalidSpace = function getInvalidSpace(value) {
79412
- var idleflowRate = 0.7; // 闲置宽度权重,越大则内容紧密性越好,反之信息呈现性越好。
79413
-
79414
- var overflowRate = 2; // 溢出宽度权重,越大则信息呈现性越好,反之内容紧密性越好。
79415
-
79416
- var idleSpace = 0; // 空间闲置总量
79417
-
79418
- var overflowSpace = 0; // 空间溢出总量
79419
-
79420
- array.forEach(function (width) {
79421
- if (value > width) {
79422
- idleSpace += (value - width) * idleflowRate; // 闲置值
79423
- }
79424
-
79425
- if (value < width) {
79426
- overflowSpace += (width - value) * overflowRate; // 溢出值
79427
- }
79428
- });
79429
- return {
79430
- idleSpace: idleSpace,
79431
- // 闲置空间
79432
- overflowSpace: overflowSpace,
79433
- // 溢出空间
79434
- invalidSpace: idleSpace + overflowSpace // 无效空间
79435
-
79436
- };
79437
- };
79438
-
79439
79283
  array == null ? void 0 : array.forEach(function (width, index) {
79440
- var _getInvalidSpace = getInvalidSpace(width),
79441
- idleSpace = _getInvalidSpace.idleSpace,
79442
- overflowSpace = _getInvalidSpace.overflowSpace,
79443
- invalidSpace = _getInvalidSpace.invalidSpace;
79284
+ var _getInvalidSpace = getInvalidSpace(array, width),
79285
+ idleSpace = _getInvalidSpace[0],
79286
+ overflowSpace = _getInvalidSpace[1];
79444
79287
 
79445
- consoleArray.push({
79446
- width: Math.ceil(width),
79447
- idleSpace: idleSpace,
79448
- overflowSpace: overflowSpace,
79449
- invalidSpace: invalidSpace
79450
- });
79288
+ var invalidSpace = idleSpace + overflowSpace; // 使用第一个作为比对基准
79451
79289
 
79452
79290
  if (index === 0) {
79453
79291
  minInvalidSpace = invalidSpace;
79454
79292
  expectedWidth = width;
79455
- }
79293
+ } // 如果新宽度的无效空间小于等于缓存基准,则使用新的。
79294
+
79456
79295
 
79457
79296
  if (invalidSpace <= minInvalidSpace) {
79458
79297
  minInvalidSpace = invalidSpace;
79459
79298
  expectedWidth = width;
79460
79299
  }
79300
+
79301
+ consoleArray.push({
79302
+ width: Math.ceil(width),
79303
+ idleSpace: idleSpace,
79304
+ overflowSpace: overflowSpace,
79305
+ invalidSpace: invalidSpace
79306
+ });
79461
79307
  });
79462
79308
  return {
79463
79309
  expectedWidth: Math.ceil(expectedWidth),