@ant-design/pro-components 2.3.9 → 2.3.11

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.
@@ -33172,7 +33172,7 @@ var conversionMomentValue = function conversionMomentValue(value, dateFormatter,
33172
33172
 
33173
33173
  if (Array.isArray(itemValue)) {
33174
33174
  tmpValue[key] = itemValue.map(function (arrayValue, index) {
33175
- if (dayjs_min_default().isDayjs(arrayValue) || isMoment(itemValue)) {
33175
+ if (dayjs_min_default().isDayjs(arrayValue) || isMoment(arrayValue)) {
33176
33176
  return convertMoment(arrayValue, dateFormat || dateFormatter, valueType);
33177
33177
  }
33178
33178
 
@@ -37119,7 +37119,7 @@ var genColStyle = function genColStyle(index, token) {
37119
37119
 
37120
37120
  return defineProperty_defineProperty({}, "".concat(componentCls, "-col-").concat(index), {
37121
37121
  flexShrink: 0,
37122
- width: "".concat(Math.round(index / GRID_COLUMNS * 100), "%")
37122
+ width: "".concat(index / GRID_COLUMNS * 100, "%")
37123
37123
  });
37124
37124
  };
37125
37125
 
@@ -61179,29 +61179,32 @@ function genStringToTheme(val) {
61179
61179
  }
61180
61180
  function clearMenuItem(menusData) {
61181
61181
  return menusData.map(function (item) {
61182
- var children = item.children || item.routes;
61182
+ var children = item.children || [];
61183
61183
 
61184
61184
  var finalItem = objectSpread2_objectSpread2({}, item);
61185
61185
 
61186
+ if (!finalItem.children && finalItem.routes) {
61187
+ finalItem.children = finalItem.routes;
61188
+ }
61189
+
61186
61190
  if (!finalItem.name || finalItem.hideInMenu) {
61187
61191
  return null;
61188
61192
  }
61189
61193
 
61190
- if (finalItem && (finalItem === null || finalItem === void 0 ? void 0 : finalItem.routes)) {
61194
+ if (finalItem && (finalItem === null || finalItem === void 0 ? void 0 : finalItem.children)) {
61191
61195
  if (!finalItem.hideChildrenInMenu && children.some(function (child) {
61192
61196
  return child && child.name && !child.hideInMenu;
61193
61197
  })) {
61194
61198
  return objectSpread2_objectSpread2(objectSpread2_objectSpread2({}, item), {}, {
61195
- children: clearMenuItem(children),
61196
- routes: clearMenuItem(children)
61199
+ children: clearMenuItem(children)
61197
61200
  });
61198
61201
  } // children 为空就直接删掉
61199
61202
 
61200
61203
 
61201
- delete finalItem.routes;
61202
61204
  delete finalItem.children;
61203
61205
  }
61204
61206
 
61207
+ delete finalItem.routes;
61205
61208
  return finalItem;
61206
61209
  }).filter(function (item) {
61207
61210
  return item;
@@ -62054,6 +62057,8 @@ var genProLayoutBaseMenuStyle = function genProLayoutBaseMenuStyle(token) {
62054
62057
  paddingInline: 0
62055
62058
  })), _collapsed)), defineProperty_defineProperty(_$concat4, "".concat(token.componentCls, "-item-icon"), {
62056
62059
  height: '14px',
62060
+ width: '14px',
62061
+ opacity: '0.85',
62057
62062
  '.anticon': {
62058
62063
  lineHeight: '14px',
62059
62064
  height: '14px'
@@ -62140,6 +62145,7 @@ function menu_useStyle(prefixCls) {
62140
62145
 
62141
62146
 
62142
62147
 
62148
+
62143
62149
  var IconFont = create({
62144
62150
  scriptUrl: defaultSettings.iconfontUrl
62145
62151
  }); // Allow menu.js config icon as string or ReactNode
@@ -62214,6 +62220,7 @@ var MenuUtil = /*#__PURE__*/_createClass(function MenuUtil(props) {
62214
62220
  var name = _this.getIntlName(item);
62215
62221
 
62216
62222
  var children = (item === null || item === void 0 ? void 0 : item.children) || (item === null || item === void 0 ? void 0 : item.routes);
62223
+ (0,lib_warning["default"])(!(item === null || item === void 0 ? void 0 : item.routes), 'routes 将会废弃,为了保证兼容请使用 children 作为子节点定义方式');
62217
62224
  var menuType = isGroup && level === 0 ? 'group' : undefined;
62218
62225
 
62219
62226
  if (Array.isArray(children) && children.length > 0) {
@@ -64908,6 +64915,14 @@ var SettingDrawer = function SettingDrawer(props) {
64908
64915
  }, []);
64909
64916
  (0,external_React_.useEffect)(function () {
64910
64917
  updateTheme(settingState.navTheme === 'realDark');
64918
+
64919
+ if (compareVersions(external_antd_.version, '5.0.0') < 0) {
64920
+ external_antd_.ConfigProvider.config({
64921
+ theme: {
64922
+ primaryColor: settingState.colorPrimary
64923
+ }
64924
+ });
64925
+ }
64911
64926
  }, [settingState.colorPrimary, settingState.navTheme]);
64912
64927
  /**
64913
64928
  * 修改设置
@@ -74149,8 +74164,10 @@ function genProColumnToColumn(params) {
74149
74164
  var Table_excluded = ["rowKey", "tableClassName", "action", "tableColumn", "type", "pagination", "rowSelection", "size", "defaultSize", "tableStyle", "toolbarDom", "searchNode", "style", "cardProps", "alertDom", "name", "onSortChange", "onFilterChange", "options", "isLightFilter", "className", "cardBordered", "editableUtils", "getRowKey"],
74150
74165
  Table_excluded2 = ["cardBordered", "request", "className", "params", "defaultData", "headerTitle", "postData", "ghost", "pagination", "actionRef", "columns", "toolBarRender", "onLoad", "onRequestError", "style", "cardProps", "tableStyle", "tableClassName", "columnsStateMap", "onColumnsStateChange", "options", "search", "name", "onLoadingChange", "rowSelection", "beforeSearchSubmit", "tableAlertRender", "defaultClassName", "formRef", "type", "columnEmptyText", "toolbar", "rowKey", "manualRequest", "polling", "tooltip", "revalidateOnFocus"];
74151
74166
 
74167
+ // 兼容代码-----------
74168
+
74152
74169
 
74153
- /* eslint max-classes-per-file: ["error", 3] */
74170
+ //----------------------
74154
74171
 
74155
74172
 
74156
74173
 
@@ -75730,10 +75747,6 @@ function FieldEditableTable(props) {
75730
75747
  FieldEditableTable.RecordCreator = RecordCreator;
75731
75748
  /* harmony default export */ var components_EditableTable = (FieldEditableTable);
75732
75749
  ;// CONCATENATED MODULE: ./packages/table/es/index.js
75733
- // 兼容代码-----------
75734
-
75735
- //----------------------
75736
-
75737
75750
 
75738
75751
 
75739
75752
 
@@ -97502,17 +97515,17 @@ function BaseProList(props) {
97502
97515
  /* harmony default export */ var list_es = ((/* unused pure expression or super */ null && (ProList)));
97503
97516
  ;// CONCATENATED MODULE: ./packages/components/src/version.ts
97504
97517
  var version_version = {
97505
- "@ant-design/pro-card": "2.0.6",
97506
- "@ant-design/pro-components": "2.3.8",
97507
- "@ant-design/pro-descriptions": "2.0.7",
97508
- "@ant-design/pro-field": "2.1.0",
97509
- "@ant-design/pro-form": "2.1.0",
97510
- "@ant-design/pro-layout": "7.0.6",
97511
- "@ant-design/pro-list": "2.0.7",
97518
+ "@ant-design/pro-card": "2.0.8",
97519
+ "@ant-design/pro-components": "2.3.10",
97520
+ "@ant-design/pro-descriptions": "2.0.9",
97521
+ "@ant-design/pro-field": "2.1.2",
97522
+ "@ant-design/pro-form": "2.2.0",
97523
+ "@ant-design/pro-layout": "7.1.0",
97524
+ "@ant-design/pro-list": "2.0.9",
97512
97525
  "@ant-design/pro-provider": "2.0.3",
97513
97526
  "@ant-design/pro-skeleton": "2.0.3",
97514
- "@ant-design/pro-table": "3.0.7",
97515
- "@ant-design/pro-utils": "2.1.0"
97527
+ "@ant-design/pro-table": "3.0.9",
97528
+ "@ant-design/pro-utils": "2.2.0"
97516
97529
  };
97517
97530
  ;// CONCATENATED MODULE: ./packages/components/src/index.tsx
97518
97531