@hanwenbo/x-web-pro-components 0.0.2 → 0.0.4

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.
@@ -155,6 +155,8 @@ var _checkbox = require("@hanwenbo/x-web-ui/checkbox");
155
155
  var _dropdown = require("@hanwenbo/x-web-ui/dropdown");
156
156
  var _form = require("@hanwenbo/x-web-ui/form");
157
157
  var _pagination = require("@hanwenbo/x-web-ui/pagination");
158
+ var _select = require("@hanwenbo/x-web-ui/select");
159
+ var _i18n = require("@hanwenbo/x-web-ui/i18n");
158
160
  var _table = require("@hanwenbo/x-web-ui/table");
159
161
  var _tooltip = require("@hanwenbo/x-web-ui/tooltip");
160
162
  var _cn = require("@hanwenbo/x-web-ui/utils/cn");
@@ -452,6 +454,10 @@ var BaseProTable = function BaseProTable(_ref3) {
452
454
  var _useForm = (0, _form.useForm)(),
453
455
  _useForm2 = _slicedToArray(_useForm, 1),
454
456
  searchForm = _useForm2[0];
457
+ var _useLocale = (0, _i18n.useLocale)(),
458
+ t = _useLocale.t;
459
+ var intl = (0, _provider.useIntl)();
460
+ var itemsPerPageLabel = t('common.itemsPerPage') !== 'common.itemsPerPage' ? t('common.itemsPerPage') : String(_i18n.zhCN['common.itemsPerPage']);
455
461
  var _useState = (0, _react.useState)(false),
456
462
  _useState2 = _slicedToArray(_useState, 2),
457
463
  requestLoading = _useState2[0],
@@ -836,7 +842,7 @@ var BaseProTable = function BaseProTable(_ref3) {
836
842
  setColumnVisibility(columnKey, checked);
837
843
  },
838
844
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
839
- className: "truncate text-sm text-foreground",
845
+ className: "text-foreground truncate text-sm",
840
846
  children: columnTitle
841
847
  })
842
848
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
@@ -844,7 +850,7 @@ var BaseProTable = function BaseProTable(_ref3) {
844
850
  children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
845
851
  className: "flex items-center gap-1",
846
852
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_tooltip.Tooltip, {
847
- title: fixed === 'left' ? '取消左侧固定' : '固定到左侧',
853
+ title: intl.getMessage(fixed === 'left' ? 'tableToolbar.unpinLeft' : 'tableToolbar.pinLeft'),
848
854
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
849
855
  className: "inline-flex",
850
856
  children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_button.Button, {
@@ -857,18 +863,18 @@ var BaseProTable = function BaseProTable(_ref3) {
857
863
  event.stopPropagation();
858
864
  toggleColumnFixed(columnKey, 'left');
859
865
  },
860
- "aria-label": fixed === 'left' ? '取消左侧固定' : '固定到左侧',
866
+ "aria-label": intl.getMessage(fixed === 'left' ? 'tableToolbar.unpinLeft' : 'tableToolbar.pinLeft'),
861
867
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_lucideReact.PanelLeft, {
862
868
  size: 16,
863
869
  className: "shrink-0"
864
870
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
865
871
  className: "sr-only",
866
- children: fixed === 'left' ? '取消左侧固定' : '固定到左侧'
872
+ children: intl.getMessage(fixed === 'left' ? 'tableToolbar.unpinLeft' : 'tableToolbar.pinLeft')
867
873
  })]
868
874
  })
869
875
  })
870
876
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_tooltip.Tooltip, {
871
- title: fixed === 'right' ? '取消右侧固定' : '固定到右侧',
877
+ title: intl.getMessage(fixed === 'right' ? 'tableToolbar.unpinRight' : 'tableToolbar.pinRight'),
872
878
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
873
879
  className: "inline-flex",
874
880
  children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_button.Button, {
@@ -881,13 +887,13 @@ var BaseProTable = function BaseProTable(_ref3) {
881
887
  event.stopPropagation();
882
888
  toggleColumnFixed(columnKey, 'right');
883
889
  },
884
- "aria-label": fixed === 'right' ? '取消右侧固定' : '固定到右侧',
890
+ "aria-label": intl.getMessage(fixed === 'right' ? 'tableToolbar.unpinRight' : 'tableToolbar.pinRight'),
885
891
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_lucideReact.PanelRight, {
886
892
  size: 16,
887
893
  className: "shrink-0"
888
894
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
889
895
  className: "sr-only",
890
- children: fixed === 'right' ? '取消右侧固定' : '固定到右侧'
896
+ children: intl.getMessage(fixed === 'right' ? 'tableToolbar.unpinRight' : 'tableToolbar.pinRight')
891
897
  })]
892
898
  })
893
899
  })
@@ -926,17 +932,17 @@ var BaseProTable = function BaseProTable(_ref3) {
926
932
  disabled: true,
927
933
  label: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
928
934
  className: "x-pro-table-options-dropdown-section-label",
929
- children: "\u5BC6\u5EA6"
935
+ children: intl.getMessage('tableToolbar.density')
930
936
  })
931
937
  }, {
932
938
  key: 'density-large',
933
- label: '宽松'
939
+ label: intl.getMessage('tableToolbar.large')
934
940
  }, {
935
941
  key: 'density-middle',
936
- label: '中等'
942
+ label: intl.getMessage('tableToolbar.middle')
937
943
  }, {
938
944
  key: 'density-small',
939
- label: '紧凑'
945
+ label: intl.getMessage('tableToolbar.small')
940
946
  });
941
947
  }
942
948
  if (optionConfig.setting && columnSettingItems.length > 0) {
@@ -951,7 +957,7 @@ var BaseProTable = function BaseProTable(_ref3) {
951
957
  disabled: true,
952
958
  label: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
953
959
  className: "x-pro-table-options-dropdown-section-label",
954
- children: "\u5217\u8BBE\u7F6E"
960
+ children: intl.getMessage('tableToolbar.columns')
955
961
  })
956
962
  });
957
963
  dropdownItems.push.apply(dropdownItems, _toConsumableArray(columnSettingItems));
@@ -965,7 +971,7 @@ var BaseProTable = function BaseProTable(_ref3) {
965
971
  }
966
972
  dropdownItems.push({
967
973
  key: 'fullscreen',
968
- label: fullscreen ? '退出全屏' : '全屏'
974
+ label: intl.getMessage(fullscreen ? 'tableToolbar.exitFullscreen' : 'tableToolbar.fullscreen')
969
975
  });
970
976
  }
971
977
  if (!optionConfig.reload && dropdownItems.length === 0) {
@@ -981,7 +987,7 @@ var BaseProTable = function BaseProTable(_ref3) {
981
987
  onClick: function onClick() {
982
988
  action.reload();
983
989
  },
984
- children: (_optionConfig$dropdow = optionConfig.dropdownText) !== null && _optionConfig$dropdow !== void 0 ? _optionConfig$dropdow : '刷新'
990
+ children: (_optionConfig$dropdow = optionConfig.dropdownText) !== null && _optionConfig$dropdow !== void 0 ? _optionConfig$dropdow : intl.getMessage('tableToolbar.reload')
985
991
  }) : null, dropdownItems.length > 0 ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_dropdown.Dropdown, {
986
992
  placement: "bottomRight",
987
993
  dropdownClassName: "x-pro-table-options-dropdown-menu",
@@ -1018,14 +1024,14 @@ var BaseProTable = function BaseProTable(_ref3) {
1018
1024
  className: "x-pro-table-options-dropdown-icon"
1019
1025
  }),
1020
1026
  className: "x-pro-table-options-dropdown-trigger",
1021
- "aria-label": "\u6253\u5F00\u8868\u683C\u5DE5\u5177"
1027
+ "aria-label": intl.getMessage('tableToolbar.tools')
1022
1028
  })
1023
1029
  }) : null]
1024
1030
  }, "toolbar-options-split")];
1025
1031
  }
1026
1032
  if (optionConfig.reload) {
1027
1033
  nextSettings.push( /*#__PURE__*/(0, _jsxRuntime.jsx)(_tooltip.Tooltip, {
1028
- title: "\u5237\u65B0",
1034
+ title: intl.getMessage('tableToolbar.reload'),
1029
1035
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
1030
1036
  className: "inline-flex",
1031
1037
  children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_button.Button, {
@@ -1039,7 +1045,7 @@ var BaseProTable = function BaseProTable(_ref3) {
1039
1045
  className: "h-4 w-4"
1040
1046
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
1041
1047
  className: "sr-only",
1042
- children: "\u5237\u65B0"
1048
+ children: intl.getMessage('tableToolbar.reload')
1043
1049
  })]
1044
1050
  }, "toolbar-reload")
1045
1051
  })
@@ -1050,13 +1056,13 @@ var BaseProTable = function BaseProTable(_ref3) {
1050
1056
  menu: {
1051
1057
  items: [{
1052
1058
  key: 'large',
1053
- label: '宽松'
1059
+ label: intl.getMessage('tableToolbar.large')
1054
1060
  }, {
1055
1061
  key: 'middle',
1056
- label: '中等'
1062
+ label: intl.getMessage('tableToolbar.middle')
1057
1063
  }, {
1058
1064
  key: 'small',
1059
- label: '紧凑'
1065
+ label: intl.getMessage('tableToolbar.small')
1060
1066
  }],
1061
1067
  onClick: function onClick(item) {
1062
1068
  var nextSize = mapTableSize(item.key);
@@ -1066,7 +1072,7 @@ var BaseProTable = function BaseProTable(_ref3) {
1066
1072
  selectedKeys: [tableSize]
1067
1073
  },
1068
1074
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_tooltip.Tooltip, {
1069
- title: "\u5BC6\u5EA6",
1075
+ title: intl.getMessage('tableToolbar.density'),
1070
1076
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
1071
1077
  className: "inline-flex",
1072
1078
  children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_button.Button, {
@@ -1077,7 +1083,7 @@ var BaseProTable = function BaseProTable(_ref3) {
1077
1083
  className: "h-4 w-4"
1078
1084
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
1079
1085
  className: "sr-only",
1080
- children: "\u5BC6\u5EA6"
1086
+ children: intl.getMessage('tableToolbar.density')
1081
1087
  })]
1082
1088
  })
1083
1089
  })
@@ -1095,7 +1101,7 @@ var BaseProTable = function BaseProTable(_ref3) {
1095
1101
  onClick: function onClick() {}
1096
1102
  },
1097
1103
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_tooltip.Tooltip, {
1098
- title: "\u5217\u8BBE\u7F6E",
1104
+ title: intl.getMessage('tableToolbar.columns'),
1099
1105
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
1100
1106
  className: "inline-flex",
1101
1107
  children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_button.Button, {
@@ -1106,7 +1112,7 @@ var BaseProTable = function BaseProTable(_ref3) {
1106
1112
  className: "h-4 w-4"
1107
1113
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
1108
1114
  className: "sr-only",
1109
- children: "\u5217\u8BBE\u7F6E"
1115
+ children: intl.getMessage('tableToolbar.columns')
1110
1116
  })]
1111
1117
  })
1112
1118
  })
@@ -1115,7 +1121,7 @@ var BaseProTable = function BaseProTable(_ref3) {
1115
1121
  }
1116
1122
  if (optionConfig.fullScreen) {
1117
1123
  nextSettings.push( /*#__PURE__*/(0, _jsxRuntime.jsx)(_tooltip.Tooltip, {
1118
- title: fullscreen ? '退出全屏' : '全屏',
1124
+ title: intl.getMessage(fullscreen ? 'tableToolbar.exitFullscreen' : 'tableToolbar.fullscreen'),
1119
1125
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
1120
1126
  className: "inline-flex",
1121
1127
  children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_button.Button, {
@@ -1132,14 +1138,14 @@ var BaseProTable = function BaseProTable(_ref3) {
1132
1138
  className: "h-4 w-4"
1133
1139
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
1134
1140
  className: "sr-only",
1135
- children: fullscreen ? '退出全屏' : '全屏'
1141
+ children: intl.getMessage(fullscreen ? 'tableToolbar.exitFullscreen' : 'tableToolbar.fullscreen')
1136
1142
  })]
1137
1143
  }, "toolbar-fullscreen")
1138
1144
  })
1139
1145
  }, "toolbar-fullscreen-tooltip"));
1140
1146
  }
1141
1147
  return nextSettings;
1142
- }, [action, columns, fullscreen, mergedColumnsState, onSizeChange, optionConfig, setColumnVisibility, tableSize, toggleColumnFixed]);
1148
+ }, [action, intl, columns, fullscreen, mergedColumnsState, onSizeChange, optionConfig, setColumnVisibility, tableSize, toggleColumnFixed]);
1143
1149
  var mergedRowSelection = (0, _react.useMemo)(function () {
1144
1150
  if (!rowSelection) {
1145
1151
  return undefined;
@@ -1164,7 +1170,7 @@ var BaseProTable = function BaseProTable(_ref3) {
1164
1170
  }
1165
1171
  var searchConfig = toolSearchConfig === true ? {} : toolSearchConfig;
1166
1172
  return {
1167
- placeholder: searchConfig.placeholder || '请输入关键词',
1173
+ placeholder: searchConfig.placeholder || intl.getMessage('tableToolbar.keyword'),
1168
1174
  allowClear: true,
1169
1175
  onSearch: function () {
1170
1176
  var _onSearch = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(keyword) {
@@ -1203,7 +1209,7 @@ var BaseProTable = function BaseProTable(_ref3) {
1203
1209
  return onSearch;
1204
1210
  }()
1205
1211
  };
1206
- }, [optionConfig, toolbar === null || toolbar === void 0 ? void 0 : toolbar.search]);
1212
+ }, [intl, optionConfig, toolbar === null || toolbar === void 0 ? void 0 : toolbar.search]);
1207
1213
  var toolbarOptionNodes = (0, _react.useMemo)(function () {
1208
1214
  if (optionsRender === false) {
1209
1215
  return [];
@@ -1299,7 +1305,7 @@ var BaseProTable = function BaseProTable(_ref3) {
1299
1305
  mode: "edit",
1300
1306
  valueType: searchValueType,
1301
1307
  valueEnum: columnItem.valueEnum,
1302
- placeholder: typeof columnItem.title === 'string' ? ['select', 'tag', 'treeSelect', 'cascader', 'segmented', 'date', 'dateMonth', 'dateQuarter', 'dateTime', 'dateRange', 'dateMonthRange', 'dateQuarterRange', 'dateTimeRange', 'dateWeek', 'dateWeekRange', 'dateYear', 'dateYearRange', 'time', 'timeRange'].includes(valueTypeName) ? "\u8BF7\u9009\u62E9".concat(columnItem.title) : "\u8BF7\u8F93\u5165".concat(columnItem.title) : undefined,
1308
+ placeholder: typeof columnItem.title === 'string' ? ['select', 'tag', 'treeSelect', 'cascader', 'segmented', 'date', 'dateMonth', 'dateQuarter', 'dateTime', 'dateRange', 'dateMonthRange', 'dateQuarterRange', 'dateTimeRange', 'dateWeek', 'dateWeekRange', 'dateYear', 'dateYearRange', 'time', 'timeRange'].includes(valueTypeName) ? "".concat(intl.getMessage('form.selectPrefix')).concat(columnItem.title) : "".concat(intl.getMessage('form.inputPrefix')).concat(columnItem.title) : undefined,
1303
1309
  fieldProps: _objectSpread(_objectSpread({}, resolvedFieldProps || {}), {}, {
1304
1310
  className: (0, _cn.cn)(stableChoiceWidth && 'min-w-0 w-full', resolvedFieldProps === null || resolvedFieldProps === void 0 ? void 0 : resolvedFieldProps.className),
1305
1311
  style: _objectSpread(_objectSpread({}, stableChoiceWidth ? {
@@ -1349,7 +1355,7 @@ var BaseProTable = function BaseProTable(_ref3) {
1349
1355
  className: className
1350
1356
  }, tableProps), defaultSearchNode)) : defaultSearchNode;
1351
1357
  return rendered === null ? null : rendered;
1352
- }, [action, className, columns, controlledDataSource, controlledLoading, columnsState, headerTitle, _onChange3, onDataSourceChange, onLoad, onLoadingChange, onRequestError, onSizeChange, options, optionsRender, params, pagination, request, resolveSearchValues, rowSelection, search, searchColumns, searchForm, searchFormRender, hasSearchForm, tableAlertOptionRender, tableAlertRender, tableClassName, tableExtraRender, tableProps, tableStyle, toolbar, toolBarRender]);
1358
+ }, [action, className, intl, columns, controlledDataSource, controlledLoading, columnsState, headerTitle, _onChange3, onDataSourceChange, onLoad, onLoadingChange, onRequestError, onSizeChange, options, optionsRender, params, pagination, request, resolveSearchValues, rowSelection, search, searchColumns, searchForm, searchFormRender, hasSearchForm, tableAlertOptionRender, tableAlertRender, tableClassName, tableExtraRender, tableProps, tableStyle, toolbar, toolBarRender]);
1353
1359
 
1354
1360
  // ProTable 为了保持 hooks 顺序会始终创建 searchForm;没有搜索字段时仍需让
1355
1361
  // rc-field-form 连接到一个 Form,否则它会在开发环境延迟输出未连接告警。
@@ -1375,7 +1381,7 @@ var BaseProTable = function BaseProTable(_ref3) {
1375
1381
  var messageNode = tableAlertRender ? tableAlertRender({
1376
1382
  selectedRowKeys: selectedRowKeys,
1377
1383
  selectedRows: selectedRows
1378
- }) : selectedCount ? "\u5DF2\u9009 ".concat(selectedCount) : null;
1384
+ }) : selectedCount ? "".concat(intl.getMessage('tableToolbar.selected'), " ").concat(selectedCount) : null;
1379
1385
  if (!messageNode) {
1380
1386
  return null;
1381
1387
  }
@@ -1388,7 +1394,7 @@ var BaseProTable = function BaseProTable(_ref3) {
1388
1394
  children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
1389
1395
  className: "flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",
1390
1396
  children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
1391
- className: "flex items-center gap-2 text-sm text-foreground",
1397
+ className: "text-foreground flex items-center gap-2 text-sm",
1392
1398
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
1393
1399
  className: "text-primary",
1394
1400
  children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("svg", {
@@ -1421,12 +1427,12 @@ var BaseProTable = function BaseProTable(_ref3) {
1421
1427
  size: "small",
1422
1428
  variant: "ghost",
1423
1429
  onClick: clearSelectionState,
1424
- children: "\u6E05\u7A7A"
1430
+ children: intl.getMessage('tableToolbar.clear')
1425
1431
  }) : null)
1426
1432
  })]
1427
1433
  })
1428
1434
  });
1429
- }, [clearSelectionState, hasCustomToolbarActions, mergedRowSelection, selectedRows, mergedSelectedRowKeys, tableAlertOptionRender, tableAlertRender]);
1435
+ }, [clearSelectionState, intl, hasCustomToolbarActions, mergedRowSelection, selectedRows, mergedSelectedRowKeys, tableAlertOptionRender, tableAlertRender]);
1430
1436
  var toolbarSectionNode = (0, _react.useMemo)(function () {
1431
1437
  if (!toolbarNode) {
1432
1438
  return null;
@@ -1441,7 +1447,7 @@ var BaseProTable = function BaseProTable(_ref3) {
1441
1447
  }
1442
1448
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_card.Card, {
1443
1449
  variant: "default",
1444
- className: "overflow-visible rounded-xl border-0 bg-card shadow-none",
1450
+ className: "bg-card overflow-visible rounded-xl border-0 shadow-none",
1445
1451
  bodyClassName: "px-4 py-4",
1446
1452
  children: searchNode
1447
1453
  });
@@ -1514,25 +1520,20 @@ var BaseProTable = function BaseProTable(_ref3) {
1514
1520
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
1515
1521
  className: (0, _cn.cn)(PRO_TABLE_STACK_CLASS, 'w-full sm:flex-row sm:items-center sm:justify-between'),
1516
1522
  children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
1517
- className: "flex flex-wrap items-center text-sm text-muted-foreground [gap:var(--x-space-4)]",
1518
- children: [normalizedPaginationConfig.showTotal ? normalizedPaginationConfig.showTotal(total, range) : null, normalizedPaginationConfig.showSizeChanger ? /*#__PURE__*/(0, _jsxRuntime.jsxs)("label", {
1519
- className: "flex items-center gap-2",
1520
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
1521
- className: "text-xs uppercase tracking-wide text-muted-foreground",
1522
- children: "Page Size"
1523
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)("select", {
1524
- className: "h-9 rounded-lg border border-border bg-background px-3 text-sm text-foreground outline-none transition-colors focus:border-primary",
1525
- value: pageInfo.pageSize,
1526
- onChange: function onChange(event) {
1527
- void handleExternalPaginationChange(1, Number(event.target.value));
1528
- },
1529
- children: (normalizedPaginationConfig.pageSizeOptions || [10, 20, 50, 100]).map(function (option) {
1530
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)("option", {
1531
- value: option,
1532
- children: [option, " / page"]
1533
- }, option);
1534
- })
1535
- })]
1523
+ className: "text-muted-foreground flex flex-wrap items-center [gap:var(--x-space-4)] text-sm",
1524
+ children: [normalizedPaginationConfig.showTotal ? normalizedPaginationConfig.showTotal(total, range) : null, normalizedPaginationConfig.showSizeChanger ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_select.Select, {
1525
+ "aria-label": itemsPerPageLabel,
1526
+ size: resolvedPaginationSize,
1527
+ value: pageInfo.pageSize,
1528
+ options: (normalizedPaginationConfig.pageSizeOptions || [10, 20, 50, 100]).map(function (option) {
1529
+ return {
1530
+ value: option,
1531
+ label: "".concat(option, " ").concat(itemsPerPageLabel)
1532
+ };
1533
+ }),
1534
+ onChange: function onChange(value) {
1535
+ void handleExternalPaginationChange(1, Number(value));
1536
+ }
1536
1537
  }) : null]
1537
1538
  }), shouldRenderPager ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_pagination.Pagination, {
1538
1539
  current: pageInfo.current,
@@ -1545,7 +1546,7 @@ var BaseProTable = function BaseProTable(_ref3) {
1545
1546
  }
1546
1547
  }) : null]
1547
1548
  });
1548
- }, [dataSource.length, handleExternalPaginationChange, normalizedPaginationConfig, pageInfo.current, pageInfo.pageSize, pageInfo.total, resolvedPaginationSize, showExternalBottomPagination, tableSize]);
1549
+ }, [itemsPerPageLabel, dataSource.length, handleExternalPaginationChange, normalizedPaginationConfig, pageInfo.current, pageInfo.pageSize, pageInfo.total, resolvedPaginationSize, showExternalBottomPagination, tableSize]);
1549
1550
  var defaultTableNode = /*#__PURE__*/(0, _jsxRuntime.jsx)(_table.Table, _objectSpread(_objectSpread({}, tableProps), {}, {
1550
1551
  className: (0, _cn.cn)(tableClassName),
1551
1552
  style: tableStyle,
@@ -1671,7 +1672,7 @@ var BaseProTable = function BaseProTable(_ref3) {
1671
1672
  cardStyle = _ref10.style,
1672
1673
  restCardProps = _objectWithoutProperties(_ref10, _excluded2);
1673
1674
  var tableCardNode = /*#__PURE__*/(0, _jsxRuntime.jsxs)(_card.Card, _objectSpread(_objectSpread({}, restCardProps), {}, {
1674
- className: (0, _cn.cn)('overflow-visible rounded-xl border-0 bg-card shadow-none', fullscreen && 'fixed inset-4 z-40 overflow-auto bg-background p-2 shadow-2xl', className, cardClassName),
1675
+ className: (0, _cn.cn)('bg-card overflow-visible rounded-xl border-0 shadow-none', fullscreen && 'bg-background fixed inset-4 z-40 overflow-auto p-2 shadow-2xl', className, cardClassName),
1675
1676
  style: cardStyle,
1676
1677
  children: [searchFormConnectionNode, tableContent]
1677
1678
  }));
package/lib/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const version = "0.0.1";
1
+ export declare const version = "0.0.4";
2
2
  export default version;
package/lib/version.js CHANGED
@@ -4,5 +4,5 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.version = exports.default = void 0;
7
- var version = exports.version = '0.0.1';
7
+ var version = exports.version = '0.0.4';
8
8
  var _default = exports.default = version;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hanwenbo/x-web-pro-components",
3
- "version": "0.0.2",
3
+ "version": "0.0.4",
4
4
  "description": "Enterprise-ready pro components built on x-web-ui",
5
5
  "author": "9476400@qq.com",
6
6
  "license": "MIT",
@@ -44,7 +44,7 @@
44
44
  "dependencies": {
45
45
  "dayjs": "^1.11.3",
46
46
  "lucide-react": "^0.460.0",
47
- "@hanwenbo/x-web-ui": "0.0.2"
47
+ "@hanwenbo/x-web-ui": "0.0.5"
48
48
  },
49
49
  "peerDependencies": {
50
50
  "react": ">=18.0.0",