@lemon-fe/components 1.4.20 → 1.4.22-alpha.0

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.
@@ -81,7 +81,7 @@ declare class InternalDataGrid<TData extends Record<string, any>> extends Compon
81
81
  */
82
82
  private loadingChange;
83
83
  private getDataFromServer;
84
- private pagination;
84
+ pagination(page: number, pageSize: number): void;
85
85
  private init;
86
86
  private NoRowsOverlay;
87
87
  private getMainMenuItems;
@@ -712,15 +712,11 @@ var InternalDataGrid = /*#__PURE__*/function (_Component) {
712
712
  var enable = false;
713
713
  if (_typeof(pagination) === 'object') {
714
714
  enable = true;
715
- pageSize = pagination.defaultPageSize || pagination.pageSize || 20;
715
+ pageSize = pagination.defaultPageSize || pagination.pageSize || 50;
716
716
  page = pagination.defaultCurrent || pagination.current || 1;
717
717
  total = pagination.total || 0;
718
- } else if (pagination === true) {
719
- enable = true;
720
- } else if (pagination === false) {
721
- enable = false;
722
- total = Number.MAX_SAFE_INTEGER;
723
- pageSize = Number.MAX_SAFE_INTEGER;
718
+ } else if (typeof pagination === 'boolean') {
719
+ enable = pagination;
724
720
  } else if (fetch !== undefined) {
725
721
  enable = true;
726
722
  }
@@ -739,12 +735,19 @@ var InternalDataGrid = /*#__PURE__*/function (_Component) {
739
735
  columns = _this$props6.columns,
740
736
  rowSelection = _this$props6.rowSelection,
741
737
  dataSource = _this$props6.dataSource,
742
- context = _this$props6.context;
738
+ context = _this$props6.context,
739
+ pagination = _this$props6.pagination;
743
740
  if (!shallowEqual(context, prevProps.context)) {
744
741
  this.store.setState({
745
742
  context: context
746
743
  });
747
744
  }
745
+ if (!shallowEqual(pagination, prevProps.pagination)) {
746
+ var pageData = this.getPagination();
747
+ this.setState({
748
+ pagination: pageData.pagination
749
+ });
750
+ }
748
751
  if (!this.isReady) {
749
752
  return;
750
753
  }
@@ -35,7 +35,7 @@ var locale = {
35
35
  customColumnParentHeaderText: 'The corresponding superior header',
36
36
  summaryText: 'Summary or not',
37
37
  summaryTypeText: 'Rule',
38
- summaryTypeContentText: "\n <div>\n <p>1. The sum of custom column data values to get the total value</p>\n <p>\n 2. The total value is calculated based on the formula from the data source\n <br />\n Fields added in the formula are summed first, then the total is calculated based on the formula\n </p>\n </div>\n ",
38
+ summaryTypeContentText: "\n <div>\n <p>1. The sum of custom column data values to get the total value</p>\n <p>\n 2. The total value is calculated based on a formula from the data source (this total value is not available for export)\n <br />\n The total value of the field columns added to the formula is calculated based on the formula to derive the custom column total. This is typically used when the custom column represents a percentage, such as gross margin percentage\n </p>\n </div>\n ",
39
39
  customSummaryDataText: 'Sum of custom column data values to get the total value',
40
40
  dataSourceSummaryDataText: 'Total value calculated based on the formula from the data source',
41
41
  addFieldText: 'Add Field'
@@ -32,7 +32,7 @@ var locale = {
32
32
  customColumnParentHeaderText: 'Tiêu đề bảng cấp trên mà nó thuộc về',
33
33
  summaryText: 'Có thống kê tổng cộng không?',
34
34
  summaryTypeText: 'Quy tắc tính tổng cộng',
35
- summaryTypeContentText: "\n <div>\n <p>1. T\xEDnh t\u1ED5ng gi\xE1 tr\u1ECB d\u1EEF li\u1EC7u c\u1EE7a c\u1ED9t t\xF9y ch\u1EC9nh \u0111\u1EC3 c\xF3 \u0111\u01B0\u1EE3c gi\xE1 tr\u1ECB t\u1ED5ng c\u1ED9ng.</p>\n <p>\n 2. Ngu\u1ED3n d\u1EEF li\u1EC7u t\xEDnh to\xE1n gi\xE1 tr\u1ECB t\u1ED5ng c\u1ED9ng theo c\xF4ng th\u1EE9c t\xEDnh to\xE1n.\n <br />\n C\xE1c tr\u01B0\u1EDDng \u0111\u01B0\u1EE3c th\xEAm v\xE0o trong c\xF4ng th\u1EE9c s\u1EBD \u0111\u01B0\u1EE3c t\xEDnh t\u1ED5ng tr\u01B0\u1EDBc, sau \u0111\xF3 t\xEDnh to\xE1n gi\xE1 tr\u1ECB t\u1ED5ng c\u1ED9ng theo c\xF4ng th\u1EE9c.\n </p>\n </div>\n ",
35
+ summaryTypeContentText: "\n <div>\n <p>1. T\xEDnh t\u1ED5ng gi\xE1 tr\u1ECB d\u1EEF li\u1EC7u c\u1EE7a c\u1ED9t t\xF9y ch\u1EC9nh \u0111\u1EC3 c\xF3 \u0111\u01B0\u1EE3c gi\xE1 tr\u1ECB t\u1ED5ng c\u1ED9ng.</p>\n <p>\n 2. Gi\xE1 tr\u1ECB t\u1ED5ng \u0111\u01B0\u1EE3c t\xEDnh to\xE1n t\u1EEB ngu\u1ED3n d\u1EEF li\u1EC7u d\u1EF1a tr\xEAn c\xF4ng th\u1EE9c t\xEDnh (gi\xE1 tr\u1ECB t\u1ED5ng n\xE0y kh\xF4ng h\u1ED7 tr\u1EE3 xu\u1EA5t).\n <br />\n Gi\xE1 tr\u1ECB t\u1ED5ng c\u1EE7a c\xE1c c\u1ED9t d\u1EEF li\u1EC7u \u0111\u01B0\u1EE3c th\xEAm v\xE0o c\xF4ng th\u1EE9c \u0111\u01B0\u1EE3c t\xEDnh to\xE1n theo c\xF4ng th\u1EE9c \u0111\u1EC3 ra gi\xE1 tr\u1ECB t\u1ED5ng c\u1EE7a c\u1ED9t t\xF9y ch\u1EC9nh, th\u01B0\u1EDDng \u0111\u01B0\u1EE3c \xE1p d\u1EE5ng khi c\u1ED9t t\xF9y ch\u1EC9nh l\xE0 t\u1EF7 l\u1EC7 ph\u1EA7n tr\u0103m, ch\u1EB3ng h\u1EA1n nh\u01B0 t\u1EF7 su\u1EA5t l\u1EE3i nhu\u1EADn g\u1ED9p.\n </p>\n </div>\n ",
36
36
  customSummaryDataText: 'Tính tổng giá trị dữ liệu của cột tùy chỉnh để có được giá trị tổng cộng',
37
37
  dataSourceSummaryDataText: 'Nguồn dữ liệu tính toán giá trị tổng cộng theo công thức tính toán',
38
38
  addFieldText: 'Thêm trường'
@@ -32,7 +32,7 @@ var locale = {
32
32
  customColumnParentHeaderText: '所属上级表头',
33
33
  summaryText: '是否统计合计',
34
34
  summaryTypeText: '合计规则',
35
- summaryTypeContentText: "\n <div>\n <p>1\u3001\u81EA\u5B9A\u4E49\u5217\u6570\u636E\u503C\u6C42\u548C\u5F97\u51FA\u5408\u8BA1\u503C</p>\n <p>\n 2\u3001\u6570\u636E\u6E90\u6839\u636E\u8BA1\u7B97\u516C\u5F0F\u5F97\u51FA\u5408\u8BA1\u503C\n <br />\n \u516C\u5F0F\u4E2D\u6DFB\u52A0\u7684\u5B57\u6BB5\u5148\u6C42\u548C\uFF0C\u518D\u6839\u636E\u8BA1\u7B97\u516C\u5F0F\u8BA1\u7B97\u51FA\u5408\u8BA1\n </p>\n </div>\n ",
35
+ summaryTypeContentText: "\n <div>\n <p>1\u3001\u81EA\u5B9A\u4E49\u5217\u6570\u636E\u503C\u6C42\u548C\u5F97\u51FA\u5408\u8BA1\u503C</p>\n <p>\n 2\u3001\u6570\u636E\u6E90\u6839\u636E\u8BA1\u7B97\u516C\u5F0F\u5F97\u51FA\u5408\u8BA1\u503C(\u8BE5\u5408\u8BA1\u503C\u4E0D\u652F\u6301\u5BFC\u51FA)\n <br />\n \u516C\u5F0F\u4E2D\u6DFB\u52A0\u7684\u5B57\u6BB5\u5217\u6570\u636E\u5408\u8BA1\u503C\u6309\u8BA1\u7B97\u516C\u5F0F\u7B97\u51FA\u81EA\u5B9A\u4E49\u5217\u5408\u8BA1\u503C\uFF0C\u4E00\u822C\u7528\u4E8E\u81EA\u5B9A\u4E49\u5217\u662F\u767E\u5206\u6BD4\u7684\u60C5\u51B5\uFF0C\u6BD4\u5982\u6BDB\u5229\u7387\n </p>\n </div>\n ",
36
36
  customSummaryDataText: '自定义列数据值求和得出合计值',
37
37
  dataSourceSummaryDataText: '数据源根据计算公式得出合计值',
38
38
  addFieldText: '添加字段'
@@ -32,7 +32,7 @@ var locale = {
32
32
  customColumnParentHeaderText: '所屬上級表頭',
33
33
  summaryText: '是否統計合計',
34
34
  summaryTypeText: '合計規則',
35
- summaryTypeContentText: "\n <div>\n <p>1\u3001\u81EA\u5B9A\u7FA9\u5217\u6578\u64DA\u503C\u6C42\u548C\u5F97\u51FA\u5408\u8A08\u503C</p>\n <p>\n 2\u3001\u6578\u64DA\u6E90\u6839\u64DA\u8A08\u7B97\u516C\u5F0F\u5F97\u51FA\u5408\u8A08\u503C\n <br />\n \u516C\u5F0F\u4E2D\u6DFB\u52A0\u7684\u5B57\u6BB5\u5148\u6C42\u548C\uFF0C\u518D\u6839\u64DA\u8A08\u7B97\u516C\u5F0F\u8A08\u7B97\u51FA\u5408\u8A08\n </p>\n </div>\n ",
35
+ summaryTypeContentText: "\n <div>\n <p>1\u3001\u81EA\u5B9A\u7FA9\u5217\u6578\u64DA\u503C\u6C42\u548C\u5F97\u51FA\u5408\u8A08\u503C</p>\n <p>\n 2\u3001\u6578\u64DA\u6E90\u6839\u64DA\u8A08\u7B97\u516C\u5F0F\u5F97\u51FA\u7E3D\u8A08\u503C(\u8A72\u7E3D\u8A08\u503C\u4E0D\u652F\u63F4\u5C0E\u51FA)\n <br />\n \u516C\u5F0F\u4E2D\u6DFB\u52A0\u7684\u5B57\u6BB5\u5217\u6578\u64DA\u7E3D\u8A08\u503C\u6703\u6309\u8A08\u7B97\u516C\u5F0F\u5F97\u51FA\u81EA\u5B9A\u7FA9\u5217\u7684\u7E3D\u8A08\u503C\uFF0C\u6B64\u65B9\u6CD5\u901A\u5E38\u7528\u65BC\u81EA\u5B9A\u7FA9\u5217\u70BA\u767E\u5206\u6BD4\u7684\u60C5\u6CC1\uFF0C\u4F8B\u5982\u6BDB\u5229\u7387\n </p>\n </div>\n ",
36
36
  customSummaryDataText: '自定義列數據值求和得出合計值',
37
37
  dataSourceSummaryDataText: '數據源根據計算公式得出合計值',
38
38
  addFieldText: '添加字段'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lemon-fe/components",
3
- "version": "1.4.20",
3
+ "version": "1.4.22-alpha.0",
4
4
  "description": "> TODO: description",
5
5
  "homepage": "",
6
6
  "license": "MIT",
@@ -58,5 +58,5 @@
58
58
  "publishConfig": {
59
59
  "registry": "https://registry.npmjs.org"
60
60
  },
61
- "gitHead": "806fc74e144f613e073fc3d877e0c8299e19b884"
61
+ "gitHead": "3a59adbf192d7ae863eee648925fa83ad26aa208"
62
62
  }