@ant-design/pro-components 2.3.0 → 2.3.3

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.
@@ -9450,6 +9450,26 @@ var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
9450
9450
 
9451
9451
  /***/ }),
9452
9452
 
9453
+ /***/ 7805:
9454
+ /***/ (function(module) {
9455
+
9456
+ !function (e, t) {
9457
+ true ? module.exports = t() : 0;
9458
+ }(this, function () {
9459
+ "use strict";
9460
+
9461
+ return function (e, t) {
9462
+ t.prototype.weekday = function (e) {
9463
+ var t = this.$locale().weekStart || 0,
9464
+ i = this.$W,
9465
+ n = (i < t ? i + 7 : i) - t;
9466
+ return this.$utils().u(e) ? n : this.subtract(n, "day").add(e, "day");
9467
+ };
9468
+ };
9469
+ });
9470
+
9471
+ /***/ }),
9472
+
9453
9473
  /***/ 464:
9454
9474
  /***/ (function(module, __unused_webpack___webpack_exports__, __webpack_require__) {
9455
9475
 
@@ -38729,8 +38749,47 @@ StatisticCard.Group = StatisticCard_Group;
38729
38749
  ;// CONCATENATED MODULE: ./packages/card/es/components/TabPane/index.js
38730
38750
 
38731
38751
 
38732
- var TabPane = function TabPane() {
38733
- return (0,jsx_runtime.jsx)(jsx_runtime.Fragment, {});
38752
+ var TabPane_excluded = ["key", "tab", "tabKey", "disabled", "destroyInactiveTabPane", "children", "className", "style", "cardProps"];
38753
+
38754
+
38755
+
38756
+
38757
+
38758
+
38759
+ var TabPane = function TabPane(props) {
38760
+ var _useContext = (0,external_React_.useContext)(external_antd_.ConfigProvider.ConfigContext),
38761
+ getPrefixCls = _useContext.getPrefixCls; // 如果是antd v5 则返回为空
38762
+
38763
+
38764
+ if (external_antd_.version.startsWith('5')) {
38765
+ return (0,jsx_runtime.jsx)(jsx_runtime.Fragment, {});
38766
+ } else {
38767
+ var key = props.key,
38768
+ tab = props.tab,
38769
+ tabKey = props.tabKey,
38770
+ disabled = props.disabled,
38771
+ destroyInactiveTabPane = props.destroyInactiveTabPane,
38772
+ children = props.children,
38773
+ className = props.className,
38774
+ style = props.style,
38775
+ cardProps = props.cardProps,
38776
+ rest = objectWithoutProperties_objectWithoutProperties(props, TabPane_excluded);
38777
+
38778
+ var prefixCls = getPrefixCls('pro-card-tabpane');
38779
+ var tabPaneClassName = classnames_default()(prefixCls, className);
38780
+ return (0,jsx_runtime.jsx)(external_antd_.Tabs.TabPane, objectSpread2_objectSpread2(objectSpread2_objectSpread2({
38781
+ tabKey: tabKey,
38782
+ tab: tab,
38783
+ className: tabPaneClassName,
38784
+ style: style,
38785
+ disabled: disabled,
38786
+ destroyInactiveTabPane: destroyInactiveTabPane
38787
+ }, rest), {}, {
38788
+ children: (0,jsx_runtime.jsx)(components_Card, objectSpread2_objectSpread2(objectSpread2_objectSpread2({}, cardProps), {}, {
38789
+ children: children
38790
+ }))
38791
+ }), key);
38792
+ }
38734
38793
  };
38735
38794
 
38736
38795
  if (false) {}
@@ -44696,6 +44755,8 @@ var getValueOrLabel = function getValueOrLabel(valueMap, v) {
44696
44755
  };
44697
44756
 
44698
44757
  var LightSelect = function LightSelect(props, ref) {
44758
+ console.log(props);
44759
+
44699
44760
  var label = props.label,
44700
44761
  customizePrefixCls = props.prefixCls,
44701
44762
  _onChange = props.onChange,
@@ -44761,7 +44822,8 @@ var LightSelect = function LightSelect(props, ref) {
44761
44822
  }
44762
44823
  })), _$concat2));
44763
44824
  }),
44764
- wrapSSR = _useStyle.wrapSSR;
44825
+ wrapSSR = _useStyle.wrapSSR,
44826
+ hashId = _useStyle.hashId;
44765
44827
 
44766
44828
  var valueMap = (0,external_React_.useMemo)(function () {
44767
44829
  var values = {};
@@ -44776,7 +44838,7 @@ var LightSelect = function LightSelect(props, ref) {
44776
44838
  return getValueOrLabel(valueMap, v);
44777
44839
  }) : getValueOrLabel(valueMap, value);
44778
44840
  return wrapSSR((0,jsx_runtime.jsxs)("div", {
44779
- className: classnames_default()(prefixCls, defineProperty_defineProperty({}, "".concat(prefixCls, "-searchable"), showSearch), className),
44841
+ className: classnames_default()(prefixCls, hashId, defineProperty_defineProperty({}, "".concat(prefixCls, "-searchable"), showSearch), className),
44780
44842
  style: style,
44781
44843
  onClick: function onClick(e) {
44782
44844
  var _lightLabel$current, _lightLabel$current$l, _lightLabel$current$l2;
@@ -51273,9 +51335,19 @@ var FieldDigit = function FieldDigit(_ref, ref) {
51273
51335
  renderFormItem = _ref.renderFormItem,
51274
51336
  fieldProps = _ref.fieldProps;
51275
51337
  var proxyChange = (0,external_React_.useCallback)(function (value) {
51276
- var _fieldProps$precision;
51338
+ var val = value;
51339
+
51340
+ if (typeof value === 'string') {
51341
+ val = Number(val);
51342
+ }
51343
+
51344
+ if (typeof val === 'number') {
51345
+ var _val, _val$toFixed, _fieldProps$precision;
51346
+
51347
+ val = (_val = val) === null || _val === void 0 ? void 0 : (_val$toFixed = _val.toFixed) === null || _val$toFixed === void 0 ? void 0 : _val$toFixed.call(_val, (_fieldProps$precision = fieldProps.precision) !== null && _fieldProps$precision !== void 0 ? _fieldProps$precision : 0);
51348
+ val = Number(val);
51349
+ }
51277
51350
 
51278
- var val = Number(value === null || value === void 0 ? void 0 : value.toFixed((_fieldProps$precision = fieldProps.precision) !== null && _fieldProps$precision !== void 0 ? _fieldProps$precision : 0));
51279
51351
  return fieldProps === null || fieldProps === void 0 ? void 0 : fieldProps.onChange(val);
51280
51352
  }, [fieldProps]);
51281
51353
 
@@ -51486,6 +51558,7 @@ var relativeTime_default = /*#__PURE__*/__webpack_require__.n(relativeTime);
51486
51558
 
51487
51559
  // 兼容代码-----------
51488
51560
 
51561
+
51489
51562
  //----------------------
51490
51563
 
51491
51564
  dayjs_min_default().extend((relativeTime_default()));
@@ -51495,7 +51568,7 @@ dayjs_min_default().extend((relativeTime_default()));
51495
51568
  * @param
51496
51569
  */
51497
51570
 
51498
- var FieldFromNow = function FieldFromNow(_ref) {
51571
+ var FieldFromNow = function FieldFromNow(_ref, ref) {
51499
51572
  var text = _ref.text,
51500
51573
  mode = _ref.mode,
51501
51574
  render = _ref.render,
@@ -51528,6 +51601,7 @@ var FieldFromNow = function FieldFromNow(_ref) {
51528
51601
  var momentValue = parseValueToDay(fieldProps.value);
51529
51602
 
51530
51603
  var _dom = (0,jsx_runtime.jsx)(external_antd_.DatePicker, objectSpread2_objectSpread2(objectSpread2_objectSpread2({
51604
+ ref: ref,
51531
51605
  placeholder: placeholder,
51532
51606
  showTime: true
51533
51607
  }, fieldProps), {}, {
@@ -51546,7 +51620,7 @@ var FieldFromNow = function FieldFromNow(_ref) {
51546
51620
  return null;
51547
51621
  };
51548
51622
 
51549
- /* harmony default export */ var FromNow = (FieldFromNow);
51623
+ /* harmony default export */ var FromNow = (/*#__PURE__*/external_React_default().forwardRef(FieldFromNow));
51550
51624
  ;// CONCATENATED MODULE: ./node_modules/antd/es/style/motion/fade.js
51551
51625
 
51552
51626
 
@@ -53914,7 +53988,7 @@ var FieldRadio = function FieldRadio(_ref, ref) {
53914
53988
  });
53915
53989
  }); // css
53916
53990
 
53917
- var _useStyle = useStyle('checkbox', function (token) {
53991
+ var _useStyle = useStyle('FieldRadioRadio', function (token) {
53918
53992
  return defineProperty_defineProperty({}, ".".concat(layoutClassName, "-horizontal"), defineProperty_defineProperty({}, "".concat(token.antCls, "-radio-wrapper"), {
53919
53993
  display: 'block',
53920
53994
  marginInlineEnd: 0
@@ -55993,6 +56067,9 @@ function FieldHOC(props) {
55993
56067
  }
55994
56068
 
55995
56069
  /* harmony default export */ var es_FieldHOC = (FieldHOC);
56070
+ // EXTERNAL MODULE: ./node_modules/dayjs/plugin/weekday.js
56071
+ var weekday = __webpack_require__(7805);
56072
+ var weekday_default = /*#__PURE__*/__webpack_require__.n(weekday);
55996
56073
  ;// CONCATENATED MODULE: ./packages/field/es/index.js
55997
56074
 
55998
56075
 
@@ -56033,6 +56110,9 @@ var es_excluded = ["text", "valueType", "mode", "onChange", "renderFormItem", "v
56033
56110
 
56034
56111
 
56035
56112
 
56113
+
56114
+
56115
+ dayjs_min_default().extend((weekday_default()));
56036
56116
  var REQUEST_VALUE_TYPE = ['select', 'radio', 'radioButton', 'checkbook'];
56037
56117
  /**
56038
56118
  * Render valueType object
@@ -58555,7 +58635,7 @@ var Group_style_genProStyle = function genProStyle(token) {
58555
58635
  }), defineProperty_defineProperty(_twoLine, "".concat(token.componentCls, "-container"), {
58556
58636
  paddingInlineStart: 16
58557
58637
  }), defineProperty_defineProperty(_twoLine, "".concat(token.antCls, "-space-item,").concat(token.antCls, "-form-item"), {
58558
- maxWidth: '100%'
58638
+ width: '100%'
58559
58639
  }), defineProperty_defineProperty(_twoLine, "".concat(token.antCls, "-form-item"), {
58560
58640
  '&-control': {
58561
58641
  display: 'flex',
@@ -82001,7 +82081,8 @@ function TableAlert(_ref) {
82001
82081
  var className = getPrefixCls('pro-table-alert');
82002
82082
 
82003
82083
  var _useStyle = Alert_style_useStyle(className),
82004
- wrapSSR = _useStyle.wrapSSR;
82084
+ wrapSSR = _useStyle.wrapSSR,
82085
+ hashId = _useStyle.hashId;
82005
82086
 
82006
82087
  if (alertInfoRender === false) {
82007
82088
  return null;
@@ -82022,12 +82103,12 @@ function TableAlert(_ref) {
82022
82103
  className: className,
82023
82104
  children: (0,jsx_runtime.jsx)(external_antd_.Alert, {
82024
82105
  message: (0,jsx_runtime.jsxs)("div", {
82025
- className: "".concat(className, "-info"),
82106
+ className: "".concat(className, "-info ").concat(hashId),
82026
82107
  children: [(0,jsx_runtime.jsx)("div", {
82027
- className: "".concat(className, "-info-content"),
82108
+ className: "".concat(className, "-info-content ").concat(hashId),
82028
82109
  children: dom
82029
82110
  }), option ? (0,jsx_runtime.jsx)("div", {
82030
- className: "".concat(className, "-info-option"),
82111
+ className: "".concat(className, "-info-option ").concat(hashId),
82031
82112
  children: option
82032
82113
  }) : null]
82033
82114
  }),
@@ -105965,17 +106046,17 @@ function BaseProList(props) {
105965
106046
  /* harmony default export */ var list_es = ((/* unused pure expression or super */ null && (ProList)));
105966
106047
  ;// CONCATENATED MODULE: ./packages/components/src/version.ts
105967
106048
  var version_version = {
105968
- "@ant-design/pro-card": "2.0.0-experimental.23",
105969
- "@ant-design/pro-components": "2.2.1",
105970
- "@ant-design/pro-descriptions": "2.0.0-experimental.24",
105971
- "@ant-design/pro-field": "2.0.0-experimental.23",
105972
- "@ant-design/pro-form": "2.0.0-experimental.24",
105973
- "@ant-design/pro-layout": "7.0.0-experimental.35",
105974
- "@ant-design/pro-list": "2.0.0-experimental.25",
105975
- "@ant-design/pro-provider": "2.0.0-experimental.14",
105976
- "@ant-design/pro-skeleton": "2.0.0-experimental.9",
105977
- "@ant-design/pro-table": "3.0.0-experimental.25",
105978
- "@ant-design/pro-utils": "2.0.0-experimental.22"
106049
+ "@ant-design/pro-card": "2.0.1",
106050
+ "@ant-design/pro-components": "2.3.2",
106051
+ "@ant-design/pro-descriptions": "2.0.1",
106052
+ "@ant-design/pro-field": "2.0.1",
106053
+ "@ant-design/pro-form": "2.0.1",
106054
+ "@ant-design/pro-layout": "7.0.1",
106055
+ "@ant-design/pro-list": "2.0.1",
106056
+ "@ant-design/pro-provider": "2.0.1",
106057
+ "@ant-design/pro-skeleton": "2.0.1",
106058
+ "@ant-design/pro-table": "3.0.1",
106059
+ "@ant-design/pro-utils": "2.0.1"
105979
106060
  };
105980
106061
  ;// CONCATENATED MODULE: ./packages/components/src/index.tsx
105981
106062