@teamix/pro 1.3.11 → 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({
@@ -61456,78 +61442,6 @@ function renderPreviewProps(val, mode, render, options, beforeFormatter, customO
61456
61442
 
61457
61443
  /***/ }),
61458
61444
 
61459
- /***/ 94877:
61460
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
61461
-
61462
- "use strict";
61463
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
61464
- /* harmony export */ "ZP": () => (__WEBPACK_DEFAULT_EXPORT__),
61465
- /* harmony export */ "vm": () => (/* binding */ getTagColor)
61466
- /* harmony export */ });
61467
- /* unused harmony export color */
61468
- 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']];
61469
- 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)']];
61470
- 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']];
61471
- 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']];
61472
- 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']];
61473
- 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']];
61474
- 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)']];
61475
- var tagMapper = {
61476
- fail: 'error',
61477
- process: 'prompt',
61478
- pause: 'pause',
61479
- 'filter-tag': 'filter-tag'
61480
- };
61481
- var progressMapper = {
61482
- fail: 'error',
61483
- process: 'normal',
61484
- pause: 'pause',
61485
- help: 'Y50',
61486
- warning: 'O50',
61487
- mention: 'P50'
61488
- };
61489
- var statusIconMapper = {
61490
- 'cloud-running': {
61491
- icon: 'success-fill',
61492
- color: 'var(--color-success-5, #22b066)'
61493
- },
61494
- 'cloud-stopped': {
61495
- icon: 'pause-fill',
61496
- color: 'var(--color-warning-5, #f98e1a)'
61497
- },
61498
- 'cloud-fail': {
61499
- icon: 'prompt-fill',
61500
- color: 'var(--color-error-5, #e84738)'
61501
- },
61502
- 'cloud-useless': {
61503
- icon: 'minus-fill',
61504
- color: 'var(--color-line1-5, #ababab)'
61505
- },
61506
- 'cloud-loading': 'loading'
61507
- };
61508
- var color = new Map([].concat(brandColor, grey, error, success, warning, help, mention));
61509
-
61510
- var getColor = function getColor(symbol) {
61511
- var value = color.get((symbol !== null && symbol !== void 0 ? symbol : '').toLocaleLowerCase());
61512
- return value !== null && value !== void 0 ? value : symbol;
61513
- };
61514
-
61515
- var getTagColor = function getTagColor(color, type) {
61516
- var _mapper$type$color, _mapper$type;
61517
-
61518
- var mapper = {
61519
- tag: tagMapper,
61520
- progress: progressMapper,
61521
- statusIcon: statusIconMapper
61522
- };
61523
- 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;
61524
- };
61525
-
61526
-
61527
- /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (getColor);
61528
-
61529
- /***/ }),
61530
-
61531
61445
  /***/ 36463:
61532
61446
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
61533
61447
 
@@ -66107,7 +66021,6 @@ var QueryFilter = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.memo)(funct
66107
66021
  otherProps = _objectWithoutPropertiesLoose(props, _excluded);
66108
66022
 
66109
66023
  var _useSpecialProps = (0,_useSpecialProps__WEBPACK_IMPORTED_MODULE_14__/* ["default"] */ .Z)(props),
66110
- hasChangeDefault = _useSpecialProps.hasChangeDefault,
66111
66024
  hasRequired = _useSpecialProps.hasRequired;
66112
66025
 
66113
66026
  var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(!!expand),
@@ -66125,56 +66038,66 @@ var QueryFilter = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.memo)(funct
66125
66038
  var prefixCls = (0,_teamix_utils__WEBPACK_IMPORTED_MODULE_6__.usePrefixCls)('', {
66126
66039
  prefix: 'teamix-pro-form-query-filter'
66127
66040
  });
66128
- /**
66129
- * 处理onInit与onFilter事件的触发问题
66130
- */
66041
+ var debounceFun = lodash_debounce__WEBPACK_IMPORTED_MODULE_2___default()(function (fun, props) {
66042
+ return fun(props);
66043
+ }, filterDebounce); // onInit
66131
66044
 
66045
+ var initialRequestRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(!!(props != null && props.initialRequest));
66132
66046
  var filterEnable = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)('waiting');
66133
66047
 
66134
- var _onFormInit = function onFormInit(form, _ref) {
66135
- var initialRequest = _ref.initialRequest,
66136
- 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
66137
66058
 
66138
- if (!form.mounted) {
66139
- // 借用form的loading属性来判断initialValues和initialRequest是否完成
66140
- form.setState({
66141
- loading: !!initialRequest || !!initialValues
66142
- });
66143
- }
66059
+ loadingField = Object.values(form.fields).filter(function (field) {
66060
+ return !!field.loading;
66061
+ }); // 等待mounted + 字段loading结束 + initialRequest结束 => 表单默认值初始化完成
66144
66062
 
66145
- var loadingField = Object.values(form.fields).filter(function (field) {
66146
- return !!field.loading;
66147
- }); // 等待表单mounted + 字段loading结束 + form默认值初始化 => 表单初始化完成
66063
+ if (!(form.mounted && !loadingField.length && !form.loading)) {
66064
+ _context.next = 10;
66065
+ break;
66066
+ }
66148
66067
 
66149
- if (form.mounted && !loadingField.length && !form.loading) {
66150
- _onFormInit = function onFormInit() {}; // init后销毁 isFormInit 方法
66068
+ onFormInit = function onFormInit() {}; // init后销毁 isFormInit 方法
66151
66069
 
66152
66070
 
66153
- var values = (0,_teamix_utils__WEBPACK_IMPORTED_MODULE_6__.getValidValues)(form.values);
66071
+ filterEnable.current = 'filter';
66154
66072
 
66155
- if (!(0,_teamix_utils__WEBPACK_IMPORTED_MODULE_6__.isUsable)(values) || !hasChangeDefault) {
66156
- // 表单无默认值 或 无触发onChange的默认值配置,不会触发onFilter内的onInit,所以主动触发onInit
66157
- filterEnable.current = 'filter';
66158
- setTimeout(function () {
66159
- onInit == null ? void 0 : onInit((0,_formily_reactive__WEBPACK_IMPORTED_MODULE_5__.toJS)(form.values));
66160
- }, 0);
66073
+ if (!onInit) {
66074
+ _context.next = 10;
66075
+ break;
66076
+ }
66077
+
66078
+ _context.next = 8;
66079
+ return form.validate();
66161
66080
 
66162
- if (mode === 'panel') {
66163
- // 移除lightForm的默认值
66164
- // 设置Tag
66165
- configFilterItem(advancedForm);
66081
+ case 8:
66082
+ onInit == null ? void 0 : onInit((0,_formily_reactive__WEBPACK_IMPORTED_MODULE_5__.toJS)(form.values)); // 设置Tag
66166
66083
 
66167
- if (!panelVisible) {
66168
- setTimeout(function () {
66169
- configTag();
66170
- }, 0);
66084
+ if (mode === 'panel') {
66085
+ configFilterItem(advancedForm);
66086
+ !panelVisible && configTag();
66087
+ }
66088
+
66089
+ case 10:
66090
+ case "end":
66091
+ return _context.stop();
66171
66092
  }
66172
66093
  }
66173
- } else {
66174
- filterEnable.current = 'initialized';
66175
- }
66176
- }
66177
- }; // 配置当前激活的form实例
66094
+ }, _callee);
66095
+ }));
66096
+
66097
+ return function onFormInit(_x) {
66098
+ return _ref.apply(this, arguments);
66099
+ };
66100
+ }(); // 配置当前激活的form实例
66178
66101
 
66179
66102
 
66180
66103
  var setCurrentForm = function setCurrentForm(formName) {
@@ -66200,7 +66123,7 @@ var QueryFilter = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.memo)(funct
66200
66123
  effects: function effects() {
66201
66124
  (0,_formily_core__WEBPACK_IMPORTED_MODULE_4__.onFormReact)(function (form) {
66202
66125
  if (mode === 'inline') {
66203
- _onFormInit(form, props);
66126
+ onFormInit(form);
66204
66127
  }
66205
66128
  });
66206
66129
  }
@@ -66224,7 +66147,7 @@ var QueryFilter = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.memo)(funct
66224
66147
  effects: function effects() {
66225
66148
  (0,_formily_core__WEBPACK_IMPORTED_MODULE_4__.onFormReact)(function (form) {
66226
66149
  if (mode === 'panel') {
66227
- _onFormInit(form, props);
66150
+ onFormInit(form);
66228
66151
  }
66229
66152
  });
66230
66153
  (0,_formily_core__WEBPACK_IMPORTED_MODULE_4__.onFormInputChange)(function (form) {
@@ -66303,93 +66226,62 @@ var QueryFilter = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.memo)(funct
66303
66226
  }, [panelVisible, configTag]); // 简单搜索Filter
66304
66227
 
66305
66228
  var onSimpleFilter = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)( /*#__PURE__*/function () {
66306
- var _ref3 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(values) {
66307
- return regeneratorRuntime.wrap(function _callee$(_context) {
66229
+ var _ref3 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2(values) {
66230
+ return regeneratorRuntime.wrap(function _callee2$(_context2) {
66308
66231
  while (1) {
66309
- switch (_context.prev = _context.next) {
66232
+ switch (_context2.prev = _context2.next) {
66310
66233
  case 0:
66311
- if (!(currentForm.current === 'simple')) {
66312
- _context.next = 14;
66313
- break;
66314
- }
66315
-
66316
- if (!(filterEnable.current === 'initialized')) {
66317
- _context.next = 9;
66318
- break;
66319
- }
66320
-
66321
- filterEnable.current = 'filter';
66322
-
66323
- if (!hasRequired) {
66324
- _context.next = 6;
66325
- break;
66326
- }
66327
-
66328
- _context.next = 6;
66234
+ _context2.next = 2;
66329
66235
  return simpleForm.validate();
66330
66236
 
66331
- case 6:
66332
- onInit == null ? void 0 : onInit(values);
66333
- _context.next = 14;
66334
- break;
66335
-
66336
- case 9:
66337
- if (!(filterEnable.current === 'filter')) {
66338
- _context.next = 14;
66339
- break;
66340
- }
66341
-
66342
- if (!hasRequired) {
66343
- _context.next = 13;
66344
- break;
66345
- }
66346
-
66347
- _context.next = 13;
66348
- return simpleForm.validate();
66349
-
66350
- case 13:
66237
+ case 2:
66351
66238
  onFilter == null ? void 0 : onFilter(values);
66352
66239
 
66353
- case 14:
66240
+ case 3:
66354
66241
  case "end":
66355
- return _context.stop();
66242
+ return _context2.stop();
66356
66243
  }
66357
66244
  }
66358
- }, _callee);
66245
+ }, _callee2);
66359
66246
  }));
66360
66247
 
66361
- return function (_x) {
66248
+ return function (_x2) {
66362
66249
  return _ref3.apply(this, arguments);
66363
66250
  };
66364
- }(), [onFilter, hasRequired, onInit]); // 简单搜索Change
66251
+ }(), [onFilter]); // 简单搜索Change
66365
66252
 
66366
66253
  var onSimpleChange = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function (values, fieldValue, fieldName) {
66367
66254
  if (currentForm.current === 'simple') {
66368
66255
  onChange == null ? void 0 : onChange(values, fieldValue, fieldName);
66256
+
66257
+ if (filterEnable.current === 'filter') {
66258
+ debounceFun(onSimpleFilter, values);
66259
+ }
66369
66260
  }
66370
66261
  }, [onChange]); // 轻量搜索Filter
66371
66262
 
66372
66263
  var onLightFilter = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function (values) {
66373
- if (currentForm.current === 'light') {
66374
- if (filterEnable.current === 'filter') {
66375
- var _Object$keys;
66264
+ var _Object$keys;
66376
66265
 
66377
- onFilter == null ? void 0 : onFilter(values); // 清空advancedForm的值,配置Tag
66266
+ onFilter == null ? void 0 : onFilter(values); // 清空advancedForm的值
66378
66267
 
66379
- var clearKeys = {};
66380
- (_Object$keys = Object.keys(advancedForm.values)) == null ? void 0 : _Object$keys.forEach(function (key) {
66381
- clearKeys[key] = undefined;
66382
- });
66383
- advancedForm.setValues(clearKeys);
66384
- configFilterItem(advancedForm);
66385
- configTag();
66386
- }
66387
- }
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();
66388
66276
  }, [onFilter]); // 轻量搜索Change
66389
66277
 
66390
66278
  var onLightChange = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function (values, fieldValue, fieldName) {
66391
66279
  if (currentForm.current === 'light') {
66392
66280
  onChange == null ? void 0 : onChange(values, fieldValue, fieldName);
66281
+
66282
+ if (filterEnable.current === 'filter') {
66283
+ debounceFun(onLightFilter, values);
66284
+ }
66393
66285
  }
66394
66286
  }, [onChange]); // 高级搜索Filter
66395
66287
 
@@ -66411,54 +66303,7 @@ var QueryFilter = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.memo)(funct
66411
66303
  lightForm.reset('*', {
66412
66304
  forceClear: true
66413
66305
  });
66414
- }, [onReset]); // 高级搜索Init
66415
-
66416
- var onAdvancedInit = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)( /*#__PURE__*/function () {
66417
- var _ref4 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2(values) {
66418
- return regeneratorRuntime.wrap(function _callee2$(_context2) {
66419
- while (1) {
66420
- switch (_context2.prev = _context2.next) {
66421
- case 0:
66422
- if (!(currentForm.current === 'advanced')) {
66423
- _context2.next = 9;
66424
- break;
66425
- }
66426
-
66427
- if (!(filterEnable.current === 'initialized')) {
66428
- _context2.next = 9;
66429
- break;
66430
- }
66431
-
66432
- filterEnable.current = 'filter';
66433
-
66434
- if (!hasRequired) {
66435
- _context2.next = 6;
66436
- break;
66437
- }
66438
-
66439
- _context2.next = 6;
66440
- return advancedForm.validate();
66441
-
66442
- case 6:
66443
- onInit == null ? void 0 : onInit(values);
66444
- configFilterItem(advancedForm);
66445
-
66446
- if (!panelVisible) {
66447
- configTag();
66448
- }
66449
-
66450
- case 9:
66451
- case "end":
66452
- return _context2.stop();
66453
- }
66454
- }
66455
- }, _callee2);
66456
- }));
66457
-
66458
- return function (_x2) {
66459
- return _ref4.apply(this, arguments);
66460
- };
66461
- }(), [hasRequired, onInit]); // 高级搜索Change
66306
+ }, [onReset]); // 高级搜索Change
66462
66307
 
66463
66308
  var onAdvancedChange = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function (values, fieldValue, fieldName) {
66464
66309
  if (currentForm.current === 'advanced') {
@@ -66478,16 +66323,14 @@ var QueryFilter = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.memo)(funct
66478
66323
  configFilterItem(advancedForm);
66479
66324
  configTag();
66480
66325
  onFilter == null ? void 0 : onFilter((0,_formily_reactive__WEBPACK_IMPORTED_MODULE_5__.toJS)(advancedForm.values));
66481
- }, [onFilter]); // initialValues和initialRequest的回调
66326
+ }, [onFilter]); // initialRequest 的回调
66482
66327
 
66483
66328
  var onInitialComplete = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function (form) {
66329
+ initialRequestRef.current = false;
66484
66330
  form.setState({
66485
- loading: false
66331
+ loading: initialRequestRef.current
66486
66332
  });
66487
- }, []);
66488
- var debounceFun = lodash_debounce__WEBPACK_IMPORTED_MODULE_2___default()(function (fun, props) {
66489
- return fun(props);
66490
- }, filterDebounce); // 组件挂载
66333
+ }, []); // 组件挂载
66491
66334
 
66492
66335
  (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
66493
66336
  setCurrentForm(currentForm.current);
@@ -66507,37 +66350,28 @@ var QueryFilter = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.memo)(funct
66507
66350
  filterValues: filterValues,
66508
66351
  activeFilterValueRef: activeFilterValueRef,
66509
66352
  form: lightForm,
66510
- onChange: function onChange(values, fieldValue, fieldName) {
66511
- debounceFun(onLightFilter, values);
66512
- onLightChange(values, fieldValue, fieldName);
66513
- }
66353
+ onChange: onLightChange
66514
66354
  }))) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
66515
66355
  className: prefixCls + "-inline"
66516
66356
  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_SimpleFilter__WEBPACK_IMPORTED_MODULE_10__/* ["default"] */ .Z, _extends({}, otherProps, {
66517
66357
  form: simpleForm,
66518
- onChange: function onChange(values, fieldValue, fieldName) {
66519
- debounceFun(onSimpleFilter, values);
66520
- onSimpleChange(values, fieldValue, fieldName);
66521
- },
66358
+ onChange: onSimpleChange,
66522
66359
  onSubmit: onSimpleFilter,
66523
66360
  onInitialComplete: onInitialComplete
66524
66361
  }))),
66525
66362
  panelContent: mode === 'panel' ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_AdvancedFilter__WEBPACK_IMPORTED_MODULE_12__/* ["default"] */ .Z, _extends({}, otherProps, {
66526
66363
  form: advancedForm,
66527
- onChange: function onChange(values, fieldValue, fieldName) {
66528
- debounceFun(onAdvancedInit, values);
66529
- onAdvancedChange(values, fieldValue, fieldName);
66530
- },
66364
+ onChange: onAdvancedChange,
66531
66365
  onSubmit: onAdvancedFilter,
66532
66366
  onReset: onAdvancedReset,
66533
66367
  onInitialComplete: onInitialComplete
66534
66368
  })) : null
66535
- }, mode === 'panel' && !panelVisible ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_alicloudfe_components__WEBPACK_IMPORTED_MODULE_3__.Tag.Group, null, tagDataSource.map(function (_ref5) {
66536
- var key = _ref5.key,
66537
- label = _ref5.label,
66538
- value = _ref5.value,
66539
- type = _ref5.type,
66540
- 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;
66541
66375
  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_alicloudfe_components__WEBPACK_IMPORTED_MODULE_3__.Tag.Closeable, {
66542
66376
  key: (0,_teamix_utils__WEBPACK_IMPORTED_MODULE_6__.isNum)(index) ? key + label : key,
66543
66377
  afterClose: function afterClose() {
@@ -66855,7 +66689,7 @@ var customComponent = function customComponent(component) {
66855
66689
  /* harmony import */ var _useAutoSubmit__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(86924);
66856
66690
  /* harmony import */ var _useInitialRequest__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(8550);
66857
66691
  /* harmony import */ var _locales_validate__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(67315);
66858
- 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"];
66859
66693
 
66860
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); }
66861
66695
 
@@ -66896,6 +66730,7 @@ var ProForm = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.memo)(function
66896
66730
  wrapperCol = _ref.wrapperCol,
66897
66731
  breakpoints = _ref.breakpoints,
66898
66732
  onChange = _ref.onChange,
66733
+ onChangeType = _ref.onChangeType,
66899
66734
  onSubmit = _ref.onSubmit,
66900
66735
  onSubmitFailed = _ref.onSubmitFailed,
66901
66736
  onInitialComplete = _ref.onInitialComplete,
@@ -66942,35 +66777,44 @@ var ProForm = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.memo)(function
66942
66777
  labelCol: (0,_utils__WEBPACK_IMPORTED_MODULE_7__/* .mergeArrayValue */ .UT)([24], labelCol),
66943
66778
  wrapperCol: (0,_utils__WEBPACK_IMPORTED_MODULE_7__/* .mergeArrayValue */ .UT)([24], wrapperCol)
66944
66779
  };
66945
- }, [breakpoints, layout, labelAlign, wrapperAlign, labelCol, wrapperCol]); // 添加onChange
66946
-
66947
- (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
66948
- form.removeEffects('onFieldValueChange');
66949
- form.addEffects('onFieldValueChange', function () {
66950
- (0,_formily_core__WEBPACK_IMPORTED_MODULE_2__.onFieldValueChange)('*', function (field, form) {
66951
- var _field$props;
66952
-
66953
- 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);
66954
- });
66955
- });
66956
- }, [form, onChange]); // 配置表单默认值
66957
-
66958
- (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
+ // 配置表单默认值
66959
66783
  if (initialValues) {
66960
66784
  form.setInitialValues(initialValues);
66961
- onInitialComplete == null ? void 0 : onInitialComplete(form);
66962
66785
  } else if (initialRequest) {
66963
66786
  (0,_useInitialRequest__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .Z)(initialRequest).then(function (values) {
66964
66787
  form.setInitialValues(values);
66965
66788
  })["finally"](function () {
66966
66789
  onInitialComplete == null ? void 0 : onInitialComplete(form);
66967
66790
  });
66968
- }
66969
- }, []); // 配置国际化
66791
+ } // 配置国际化
66792
+
66970
66793
 
66971
- (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
66972
66794
  (0,_formily_core__WEBPACK_IMPORTED_MODULE_2__.setValidateLanguage)((0,_teamix_utils__WEBPACK_IMPORTED_MODULE_5__.getLanguage)() || 'zh-cn');
66973
- }, []);
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]);
66974
66818
  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_teamix_formily__WEBPACK_IMPORTED_MODULE_4__.Form, _extends({
66975
66819
  className: classnames__WEBPACK_IMPORTED_MODULE_1___default()(prefixCls, className)
66976
66820
  }, otherProps, getTeamixLayout, {
@@ -69299,7 +69143,7 @@ _teamix_icon__WEBPACK_IMPORTED_MODULE_15__/* ["default"].setConfig */ .Z.setConf
69299
69143
  // export * from './sidebar';
69300
69144
 
69301
69145
 
69302
- var version = '1.3.11';
69146
+ var version = '1.3.12';
69303
69147
 
69304
69148
 
69305
69149
  /***/ }),