@tachybase/client 1.3.11 → 1.3.13

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.
@@ -205,6 +205,14 @@ const TableIndex = (props)=>{
205
205
  children: index
206
206
  });
207
207
  };
208
+ const pageSizeOptions = [
209
+ 5,
210
+ 10,
211
+ 20,
212
+ 50,
213
+ 100,
214
+ 200
215
+ ];
208
216
  const usePaginationProps = (pagination1, pagination2)=>{
209
217
  const { t } = useTranslation();
210
218
  const showTotal = useCallback((total)=>t('Total {{count}} items', {
@@ -217,10 +225,11 @@ const usePaginationProps = (pagination1, pagination2)=>{
217
225
  const result = {
218
226
  showTotal,
219
227
  showSizeChanger: true,
228
+ pageSizeOptions,
220
229
  ...pagination1,
221
230
  ...pagination2
222
231
  };
223
- return result.total <= result.pageSize ? false : result;
232
+ return result.total ? result : false;
224
233
  };
225
234
  const Table_Table = withDynamicSchemaProps(observer((props)=>{
226
235
  var _schema_parent, _field_data, _field_value_slice_filter, _field_value_slice, _field_value_slice1, _field_value, _fieldSchema_parent_xdecoratorprops, _fieldSchema_parent;
@@ -24,7 +24,7 @@ var __webpack_modules__ = {
24
24
  "../../schema-component/antd/association-field/util": function(module) {
25
25
  module.exports = require("../../schema-component/antd/association-field/util.js");
26
26
  },
27
- "../../schema-component": function(module) {
27
+ ".././../schema-component": function(module) {
28
28
  module.exports = require("../../schema-component/index.js");
29
29
  },
30
30
  "../../user": function(module) {
@@ -189,7 +189,7 @@ var __webpack_exports__ = {};
189
189
  var _filter_provider_FilterProvider__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__("../../filter-provider/FilterProvider");
190
190
  var _filter_provider_utils__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__("../../filter-provider/utils");
191
191
  var _record_provider__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__("../../record-provider");
192
- var _schema_component__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__("../../schema-component");
192
+ var _schema_component__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(".././../schema-component");
193
193
  var _schema_component_antd_association_field_util__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__("../../schema-component/antd/association-field/util");
194
194
  var _user__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__("../../user");
195
195
  var _variables__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__("../../variables");
@@ -27,6 +27,7 @@ module.exports = {
27
27
  "Add condition": "Add condition",
28
28
  "Add condition group": "Add condition group",
29
29
  "Add exportable field": "Add exportable field",
30
+ "Add failed": "Add failed",
30
31
  "Add field": "Add field",
31
32
  "Add filter": "Add filter",
32
33
  "Add filter group": "Add filter group",
@@ -43,6 +44,7 @@ module.exports = {
43
44
  "Add record": "Add record",
44
45
  "Add role": "Add role",
45
46
  "Add sort field": "Add sort field",
47
+ "Add success": "Add success",
46
48
  "Add tab": "Add tab",
47
49
  "Add text": "Add text",
48
50
  "Add type": "Add type",
@@ -592,6 +594,7 @@ module.exports = {
592
594
  "Please enter search content": "Please enter search content",
593
595
  "Please fill in the iframe URL": "Please fill in the iframe URL",
594
596
  "Please select": "Please select",
597
+ "Please select content": "Please select content",
595
598
  "Please select the records to be updated": "Please select the records to be updated",
596
599
  "Please use a valid SELECT or WITH AS statement": "Please use a valid SELECT or WITH AS statement",
597
600
  "Plugin Zip File": "Plugin Zip File",
@@ -31,6 +31,7 @@ module.exports = {
31
31
  "Add condition group": "\u6DFB\u52A0\u6761\u4EF6\u5206\u7EC4",
32
32
  "Add custom field": "\u6DFB\u52A0\u81EA\u5B9A\u4E49\u5B57\u6BB5",
33
33
  "Add exportable field": "\u6DFB\u52A0\u53EF\u5BFC\u51FA\u5B57\u6BB5",
34
+ "Add failed": "\u6DFB\u52A0\u5931\u8D25",
34
35
  "Add field": "\u6DFB\u52A0\u5B57\u6BB5",
35
36
  "Add filter": "\u6DFB\u52A0\u7B5B\u9009\u6761\u4EF6",
36
37
  "Add filter group": "\u6DFB\u52A0\u7B5B\u9009\u5206\u7EC4",
@@ -48,6 +49,7 @@ module.exports = {
48
49
  "Add role": "\u6DFB\u52A0\u89D2\u8272",
49
50
  "Add sort field": "\u6DFB\u52A0\u6392\u5E8F\u5B57\u6BB5",
50
51
  "Add submenu": "\u6DFB\u52A0\u5B50\u83DC\u5355",
52
+ "Add success": "\u6DFB\u52A0\u6210\u529F",
51
53
  "Add tab": "\u6DFB\u52A0\u6807\u7B7E\u9875",
52
54
  "Add template": "\u6DFB\u52A0\u6A21\u677F",
53
55
  "Add text": "\u6DFB\u52A0\u6587\u672C",
@@ -700,6 +702,7 @@ module.exports = {
700
702
  "Please enter search content": "\u8BF7\u8F93\u5165\u67E5\u8BE2\u5185\u5BB9",
701
703
  "Please fill in the iframe URL": "\u8BF7\u586B\u5199\u5D4C\u5165\u7684\u5730\u5740",
702
704
  "Please select": "\u8BF7\u9009\u62E9",
705
+ "Please select content": "\u8BF7\u9009\u62E9\u5185\u5BB9",
703
706
  "Please select the records to be updated": "\u8BF7\u9009\u62E9\u8981\u66F4\u65B0\u7684\u8BB0\u5F55",
704
707
  "Please use a valid SELECT or WITH AS statement": "\u8BF7\u4F7F\u7528\u6709\u6548\u7684 SELECT \u6216 WITH AS \u8BED\u53E5",
705
708
  "Plugin Management": "\u63D2\u4EF6\u7BA1\u7406\u5668",
@@ -245,6 +245,14 @@ const TableIndex = (props)=>{
245
245
  children: index
246
246
  });
247
247
  };
248
+ const pageSizeOptions = [
249
+ 5,
250
+ 10,
251
+ 20,
252
+ 50,
253
+ 100,
254
+ 200
255
+ ];
248
256
  const usePaginationProps = (pagination1, pagination2)=>{
249
257
  const { t } = (0, external_react_i18next_namespaceObject.useTranslation)();
250
258
  const showTotal = (0, external_react_namespaceObject.useCallback)((total)=>t('Total {{count}} items', {
@@ -257,10 +265,11 @@ const usePaginationProps = (pagination1, pagination2)=>{
257
265
  const result = {
258
266
  showTotal,
259
267
  showSizeChanger: true,
268
+ pageSizeOptions,
260
269
  ...pagination1,
261
270
  ...pagination2
262
271
  };
263
- return result.total <= result.pageSize ? false : result;
272
+ return result.total ? result : false;
264
273
  };
265
274
  const Table = (0, withDynamicSchemaProps_js_namespaceObject.withDynamicSchemaProps)((0, schema_namespaceObject.observer)((props)=>{
266
275
  var _schema_parent, _field_data, _field_value_slice_filter, _field_value_slice, _field_value_slice1, _field_value, _fieldSchema_parent_xdecoratorprops, _fieldSchema_parent;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tachybase/client",
3
- "version": "1.3.11",
3
+ "version": "1.3.13",
4
4
  "license": "Apache-2.0",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.mjs",
@@ -50,7 +50,7 @@
50
50
  "react-drag-listview": "^0.1.9",
51
51
  "react-error-boundary": "^4.1.2",
52
52
  "react-helmet": "^6.1.0",
53
- "react-hotkeys-hook": "^3.4.7",
53
+ "react-hotkeys-hook": "^5.1.0",
54
54
  "react-i18next": "^15.2.0",
55
55
  "react-iframe": "~1.8.5",
56
56
  "react-intersection-observer": "^9.14.0",
@@ -66,12 +66,12 @@
66
66
  "sanitize-html": "2.14.0",
67
67
  "use-deep-compare-effect": "^1.8.1",
68
68
  "xlsx": "0.18.5",
69
- "@tachybase/components": "1.3.11",
70
- "@tachybase/evaluators": "1.3.11",
71
- "@tachybase/requirejs": "1.3.11",
72
- "@tachybase/schema": "1.3.11",
73
- "@tachybase/sdk": "1.3.11",
74
- "@tachybase/utils": "1.3.11"
69
+ "@tachybase/components": "1.3.13",
70
+ "@tachybase/evaluators": "1.3.13",
71
+ "@tachybase/sdk": "1.3.13",
72
+ "@tachybase/requirejs": "1.3.13",
73
+ "@tachybase/utils": "1.3.13",
74
+ "@tachybase/schema": "1.3.13"
75
75
  },
76
76
  "devDependencies": {
77
77
  "@testing-library/react": "^16.2.0",