@pisell/materials 2.2.2 → 2.2.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.
Files changed (133) hide show
  1. package/build/lowcode/assets-daily.json +11 -11
  2. package/build/lowcode/assets-dev.json +2 -2
  3. package/build/lowcode/assets-prod.json +11 -11
  4. package/build/lowcode/index.js +1 -1
  5. package/build/lowcode/meta.js +2 -2
  6. package/build/lowcode/preview.js +8 -8
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +13 -13
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +12 -12
  11. package/es/components/MultipleContainersSortList/index.d.ts +5 -5
  12. package/es/components/MultipleContainersSortList/index.js +10 -10
  13. package/es/components/Pagination/index.d.ts +1 -1
  14. package/es/components/filter/components/FilterItem/index.js +5 -2
  15. package/es/components/filter/components/QuickFilter/index.js +2 -1
  16. package/es/components/filter/types.d.ts +1 -0
  17. package/es/components/sort/index.js +3 -1
  18. package/es/components/sort/index.less +3 -0
  19. package/es/components/sort/types.d.ts +1 -0
  20. package/es/components/table/Actions/component/ExportImport/components/ExportFile/index.d.ts +7 -0
  21. package/es/components/table/Actions/component/ExportImport/components/ExportFile/index.js +143 -0
  22. package/es/components/table/Actions/component/ExportImport/components/ExportFile/index.less +29 -0
  23. package/es/components/table/Actions/component/ExportImport/components/ExportTable/function.d.ts +7 -0
  24. package/es/components/table/Actions/component/ExportImport/components/ExportTable/function.js +87 -0
  25. package/es/components/table/Actions/component/ExportImport/components/ExportTable/index.d.ts +8 -0
  26. package/es/components/table/Actions/component/ExportImport/components/ExportTable/index.js +41 -0
  27. package/es/components/table/Actions/component/ExportImport/components/ExportTable/index.less +5 -0
  28. package/es/components/table/Actions/component/ExportImport/components/ImportLog/Detail.d.ts +4 -0
  29. package/es/components/table/Actions/component/ExportImport/components/ImportLog/Detail.js +97 -0
  30. package/es/components/table/Actions/component/ExportImport/components/ImportLog/index.d.ts +7 -0
  31. package/es/components/table/Actions/component/ExportImport/components/ImportLog/index.js +137 -0
  32. package/es/components/table/Actions/component/ExportImport/components/ImportLog/index.less +48 -0
  33. package/es/components/table/Actions/component/ExportImport/components/ImportTable/index.d.ts +10 -0
  34. package/es/components/table/Actions/component/ExportImport/components/ImportTable/index.js +149 -0
  35. package/es/components/table/Actions/component/ExportImport/components/ImportTable/index.less +97 -0
  36. package/es/components/table/Actions/component/ExportImport/index.d.ts +8 -0
  37. package/es/components/table/Actions/component/ExportImport/index.js +236 -0
  38. package/es/components/table/Actions/component/ExportImport/index.less +194 -0
  39. package/es/components/table/Actions/component/ExportImport/utils/date.d.ts +8 -0
  40. package/es/components/table/Actions/component/ExportImport/utils/date.js +19 -0
  41. package/es/components/table/Actions/component/ExportImport/utils/download.d.ts +3 -0
  42. package/es/components/table/Actions/component/ExportImport/utils/download.js +39 -0
  43. package/es/components/table/Actions/component/ExportImport/utils/file.d.ts +7 -0
  44. package/es/components/table/Actions/component/ExportImport/utils/file.js +21 -0
  45. package/es/components/table/Actions/component/Group/PopoverContent.d.ts +2 -2
  46. package/es/components/table/Actions/component/Group/PopoverContent.js +11 -7
  47. package/es/components/table/Actions/index.d.ts +3 -2
  48. package/es/components/table/Actions/index.js +12 -8
  49. package/es/components/table/BasicTable/index.js +11 -1
  50. package/es/components/table/Table/index.js +6 -0
  51. package/es/components/table/Table/utils.d.ts +1 -1
  52. package/es/components/table/hooks/useTableSetting.d.ts +2 -1
  53. package/es/components/table/hooks/useTableSetting.js +2 -1
  54. package/es/components/table/index.js +15 -13
  55. package/es/components/table/model.d.ts +2 -0
  56. package/es/components/table/model.js +15 -1
  57. package/es/components/table/serve.d.ts +11 -0
  58. package/es/components/table/serve.js +38 -0
  59. package/es/components/table/status.d.ts +19 -0
  60. package/es/components/table/status.js +26 -0
  61. package/es/components/table/types.d.ts +21 -0
  62. package/es/components/table/utils.d.ts +15 -0
  63. package/es/components/table/utils.js +26 -0
  64. package/es/components/virtual-keyboard/Time/index.js +1 -1
  65. package/es/locales/en-US.d.ts +46 -0
  66. package/es/locales/en-US.js +59 -1
  67. package/es/locales/zh-CN.d.ts +46 -0
  68. package/es/locales/zh-CN.js +59 -1
  69. package/es/locales/zh-TW.d.ts +46 -0
  70. package/es/locales/zh-TW.js +59 -1
  71. package/lib/components/MultipleContainersSortList/index.d.ts +5 -5
  72. package/lib/components/MultipleContainersSortList/index.js +16 -11
  73. package/lib/components/Pagination/index.d.ts +1 -1
  74. package/lib/components/filter/components/FilterItem/index.js +11 -2
  75. package/lib/components/filter/components/QuickFilter/index.js +2 -1
  76. package/lib/components/filter/types.d.ts +1 -0
  77. package/lib/components/sort/index.js +4 -9
  78. package/lib/components/sort/index.less +3 -0
  79. package/lib/components/sort/types.d.ts +1 -0
  80. package/lib/components/table/Actions/component/ExportImport/components/ExportFile/index.d.ts +7 -0
  81. package/lib/components/table/Actions/component/ExportImport/components/ExportFile/index.js +150 -0
  82. package/lib/components/table/Actions/component/ExportImport/components/ExportFile/index.less +29 -0
  83. package/lib/components/table/Actions/component/ExportImport/components/ExportTable/function.d.ts +7 -0
  84. package/lib/components/table/Actions/component/ExportImport/components/ExportTable/function.js +78 -0
  85. package/lib/components/table/Actions/component/ExportImport/components/ExportTable/index.d.ts +8 -0
  86. package/lib/components/table/Actions/component/ExportImport/components/ExportTable/index.js +60 -0
  87. package/lib/components/table/Actions/component/ExportImport/components/ExportTable/index.less +5 -0
  88. package/lib/components/table/Actions/component/ExportImport/components/ImportLog/Detail.d.ts +4 -0
  89. package/lib/components/table/Actions/component/ExportImport/components/ImportLog/Detail.js +117 -0
  90. package/lib/components/table/Actions/component/ExportImport/components/ImportLog/index.d.ts +7 -0
  91. package/lib/components/table/Actions/component/ExportImport/components/ImportLog/index.js +141 -0
  92. package/lib/components/table/Actions/component/ExportImport/components/ImportLog/index.less +48 -0
  93. package/lib/components/table/Actions/component/ExportImport/components/ImportTable/index.d.ts +10 -0
  94. package/lib/components/table/Actions/component/ExportImport/components/ImportTable/index.js +124 -0
  95. package/lib/components/table/Actions/component/ExportImport/components/ImportTable/index.less +97 -0
  96. package/lib/components/table/Actions/component/ExportImport/index.d.ts +8 -0
  97. package/lib/components/table/Actions/component/ExportImport/index.js +213 -0
  98. package/lib/components/table/Actions/component/ExportImport/index.less +194 -0
  99. package/lib/components/table/Actions/component/ExportImport/utils/date.d.ts +8 -0
  100. package/lib/components/table/Actions/component/ExportImport/utils/date.js +49 -0
  101. package/lib/components/table/Actions/component/ExportImport/utils/download.d.ts +3 -0
  102. package/lib/components/table/Actions/component/ExportImport/utils/download.js +62 -0
  103. package/lib/components/table/Actions/component/ExportImport/utils/file.d.ts +7 -0
  104. package/lib/components/table/Actions/component/ExportImport/utils/file.js +55 -0
  105. package/lib/components/table/Actions/component/Group/PopoverContent.d.ts +2 -2
  106. package/lib/components/table/Actions/component/Group/PopoverContent.js +2 -1
  107. package/lib/components/table/Actions/index.d.ts +3 -2
  108. package/lib/components/table/Actions/index.js +11 -7
  109. package/lib/components/table/BasicTable/index.js +9 -0
  110. package/lib/components/table/Table/index.js +6 -0
  111. package/lib/components/table/Table/utils.d.ts +1 -1
  112. package/lib/components/table/hooks/useTableSetting.d.ts +2 -1
  113. package/lib/components/table/hooks/useTableSetting.js +2 -1
  114. package/lib/components/table/index.js +14 -12
  115. package/lib/components/table/model.d.ts +2 -0
  116. package/lib/components/table/model.js +11 -1
  117. package/lib/components/table/serve.d.ts +11 -0
  118. package/lib/components/table/serve.js +41 -0
  119. package/lib/components/table/status.d.ts +19 -0
  120. package/lib/components/table/status.js +55 -0
  121. package/lib/components/table/types.d.ts +21 -0
  122. package/lib/components/table/utils.d.ts +15 -0
  123. package/lib/components/table/utils.js +40 -0
  124. package/lib/components/virtual-keyboard/Time/index.js +1 -1
  125. package/lib/locales/en-US.d.ts +46 -0
  126. package/lib/locales/en-US.js +51 -1
  127. package/lib/locales/zh-CN.d.ts +46 -0
  128. package/lib/locales/zh-CN.js +51 -1
  129. package/lib/locales/zh-TW.d.ts +46 -0
  130. package/lib/locales/zh-TW.js +51 -1
  131. package/lowcode/table/meta.ts +117 -1
  132. package/lowcode/table/snippets.ts +14 -0
  133. package/package.json +3 -3
@@ -59,5 +59,63 @@ export default {
59
59
  },
60
60
  'batch-editor-quick-edit-title-2': function batchEditorQuickEditTitle2(product) {
61
61
  return "\u60A8\u5DF2\u9009\u62E9 ".concat(product);
62
- }
62
+ },
63
+ // 导出
64
+ 'table-action-export-import-export-success': '导出成功!',
65
+ 'table-action-export-import-button': '导出',
66
+ 'table-action-export-import-export-range': '导出范围',
67
+ 'table-action-export-import-current-page': '当前页面',
68
+ 'table-action-export-import-all-records': '所有记录',
69
+ 'table-action-export-import-selected-records': '所选记录',
70
+ 'table-action-export-import-selected': '已选',
71
+ 'table-action-export-import-item': function tableActionExportImportItem(length) {
72
+ return "".concat(length, " \u6761");
73
+ },
74
+ 'table-action-export-import-product': '导出商品',
75
+ // 导入
76
+ 'table-action-export-import-table-text-input-title': '单击或拖动文件到该区域进行上传',
77
+ 'table-action-export-import-table-text-input-describe': '支持单个上传。严禁上传公司数据或其他band文件。',
78
+ 'table-action-export-import-table-error-file': '仅支持上传.csv,.xls,.xlsx格式的文件!',
79
+ 'table-action-export-import-import-success': '导入成功!',
80
+ 'table-action-export-import-import-phone': '手机相同的是否覆盖',
81
+ 'table-action-export-import-table-success-download': '下载成功',
82
+ 'table-action-export-import-table-textimport-product': '导入商品',
83
+ 'table-action-export-import-table-text-product-template': '导入模板',
84
+ 'table-action-export-import-table-text-click-download': '点击下载',
85
+ 'table-action-export-import-table-text-edit-file': '替换文件',
86
+ 'table-action-export-import-button-import': '导入',
87
+ 'table-action-export-import-cancel': '取消',
88
+ 'table-action-export-import-file-completed': '已完成',
89
+ 'table-action-export-import-file-processing': '处理中',
90
+ 'table-action-export-import-file-pending': '待处理',
91
+ 'table-action-export-import-file-refresh': '刷新',
92
+ 'table-action-export-import-export-title': '导出文件',
93
+ 'table-action-export-import-file-hint': '仅显示最近的10次导出记录',
94
+ 'table-action-export-import-file-name': '导出文件',
95
+ 'table-action-export-import-file-content': '导出内容',
96
+ 'table-action-export-import-file-content-all': '所有',
97
+ 'table-action-export-import-file-content-part': '所选',
98
+ 'table-action-export-import-file-status': '状态',
99
+ 'table-action-export-import-file-account': '操作人',
100
+ 'table-action-export-import-file-created': '操作时间',
101
+ 'table-action-export-import-file-record': function tableActionExportImportFileRecord(length) {
102
+ return "".concat(length, " \u6761\u8BB0\u5F55");
103
+ },
104
+ // 导入日志
105
+ 'table-action-export-import-import-title': '导入日志',
106
+ 'table-action-export-import-log-hint': '仅显示最近的10次导入记录',
107
+ 'table-action-export-import-log-name': '导入文件',
108
+ 'table-action-export-import-log-result': '导入结果',
109
+ 'table-action-export-import-log-ok': function tableActionExportImportLogOk(num) {
110
+ return "\u6210\u529F ".concat(num, " \u6761");
111
+ },
112
+ 'table-action-export-import-log-err': function tableActionExportImportLogErr(num) {
113
+ return ", \u5931\u8D25 ".concat(num, " \u6761");
114
+ },
115
+ 'table-action-export-import-log-check': "\u67E5\u770B\u539F\u56E0",
116
+ // 导入详情
117
+ 'table-action-export-import-log-detail-title': '导入详情',
118
+ 'table-action-export-import-log-err-log': '失败日志',
119
+ 'table-action-export-import-log-copy': '复制',
120
+ 'table-action-export-import-table-success-copy': '复制成功'
63
121
  };
@@ -50,5 +50,51 @@ declare const _default: {
50
50
  'batch-editor-quick-edit': string;
51
51
  'batch-editor-quick-edit-title': (product: string, num: string) => string;
52
52
  'batch-editor-quick-edit-title-2': (product: string) => string;
53
+ 'table-action-export-import-export-success': string;
54
+ 'table-action-export-import-button': string;
55
+ 'table-action-export-import-export-range': string;
56
+ 'table-action-export-import-current-page': string;
57
+ 'table-action-export-import-all-records': string;
58
+ 'table-action-export-import-selected-records': string;
59
+ 'table-action-export-import-selected': string;
60
+ 'table-action-export-import-item': (length: number) => string;
61
+ 'table-action-export-import-product': string;
62
+ 'table-action-export-import-table-text-input-title': string;
63
+ 'table-action-export-import-table-text-input-describe': string;
64
+ 'table-action-export-import-table-error-file': string;
65
+ 'table-action-export-import-import-success': string;
66
+ 'table-action-export-import-import-phone': string;
67
+ 'table-action-export-import-table-success-download': string;
68
+ 'table-action-export-import-table-textimport-product': string;
69
+ 'table-action-export-import-table-text-product-template': string;
70
+ 'table-action-export-import-table-text-click-download': string;
71
+ 'table-action-export-import-table-text-edit-file': string;
72
+ 'table-action-export-import-button-import': string;
73
+ 'table-action-export-import-cancel': string;
74
+ 'table-action-export-import-file-completed': string;
75
+ 'table-action-export-import-file-processing': string;
76
+ 'table-action-export-import-file-pending': string;
77
+ 'table-action-export-import-file-refresh': string;
78
+ 'table-action-export-import-export-title': string;
79
+ 'table-action-export-import-file-hint': string;
80
+ 'table-action-export-import-file-name': string;
81
+ 'table-action-export-import-file-content': string;
82
+ 'table-action-export-import-file-content-all': string;
83
+ 'table-action-export-import-file-content-part': string;
84
+ 'table-action-export-import-file-status': string;
85
+ 'table-action-export-import-file-account': string;
86
+ 'table-action-export-import-file-created': string;
87
+ 'table-action-export-import-file-record': (length: number) => string;
88
+ 'table-action-export-import-import-title': string;
89
+ 'table-action-export-import-log-hint': string;
90
+ 'table-action-export-import-log-name': string;
91
+ 'table-action-export-import-log-result': string;
92
+ 'table-action-export-import-log-ok': (num: number) => string;
93
+ 'table-action-export-import-log-err': (num: number) => string;
94
+ 'table-action-export-import-log-check': string;
95
+ 'table-action-export-import-log-detail-title': string;
96
+ 'table-action-export-import-log-err-log': string;
97
+ 'table-action-export-import-log-copy': string;
98
+ 'table-action-export-import-table-success-copy': string;
53
99
  };
54
100
  export default _default;
@@ -59,5 +59,63 @@ export default {
59
59
  },
60
60
  'batch-editor-quick-edit-title-2': function batchEditorQuickEditTitle2(product) {
61
61
  return "\u60A8\u5DF2\u9078\u64C7 ".concat(product);
62
- }
62
+ },
63
+ // 导出
64
+ 'table-action-export-import-export-success': '導出成功!',
65
+ 'table-action-export-import-button': '匯出',
66
+ 'table-action-export-import-export-range': '導出範圍',
67
+ 'table-action-export-import-current-page': '當前頁面',
68
+ 'table-action-export-import-all-records': '所有記錄',
69
+ 'table-action-export-import-selected-records': '所選記錄',
70
+ 'table-action-export-import-selected': '已選',
71
+ 'table-action-export-import-item': function tableActionExportImportItem(length) {
72
+ return "".concat(length, " \u689D");
73
+ },
74
+ 'table-action-export-import-product': '導出商品',
75
+ // 导入
76
+ 'table-action-export-import-table-text-input-title': '單擊或拖動文件到該區域進行上傳',
77
+ 'table-action-export-import-table-text-input-describe': '支持單個上傳。嚴禁上傳公司數據或其他band文件。',
78
+ 'table-action-export-import-table-error-file': '僅支持上傳.csv,.xls,.xlsx格式的文件!',
79
+ 'table-action-export-import-import-success': '導入成功!',
80
+ 'table-action-export-import-import-phone': '手機相同的是否覆蓋',
81
+ 'table-action-export-import-table-success-download': '下載成功',
82
+ 'table-action-export-import-table-textimport-product': '導入商品',
83
+ 'table-action-export-import-table-text-product-template': '導入模板',
84
+ 'table-action-export-import-table-text-click-download': '點擊下載',
85
+ 'table-action-export-import-table-text-edit-file': '替換文件',
86
+ 'table-action-export-import-button-import': '導入',
87
+ 'table-action-export-import-cancel': '取消',
88
+ 'table-action-export-import-file-completed': '已完成',
89
+ 'table-action-export-import-file-processing': '處理中',
90
+ 'table-action-export-import-file-pending': '待處理',
91
+ 'table-action-export-import-file-refresh': '刷新',
92
+ 'table-action-export-import-export-title': '導出文件',
93
+ 'table-action-export-import-file-hint': '僅顯示最近的10次導出記錄',
94
+ 'table-action-export-import-file-name': '導出文件',
95
+ 'table-action-export-import-file-content': '導出內容',
96
+ 'table-action-export-import-file-content-all': '所有',
97
+ 'table-action-export-import-file-content-part': '所選',
98
+ 'table-action-export-import-file-status': '狀態',
99
+ 'table-action-export-import-file-account': '操作人',
100
+ 'table-action-export-import-file-created': '操作時間',
101
+ 'table-action-export-import-file-record': function tableActionExportImportFileRecord(length) {
102
+ return "".concat(length, " \u689D\u8A18\u9304");
103
+ },
104
+ // 导入日志
105
+ 'table-action-export-import-import-title': '導入日誌',
106
+ 'table-action-export-import-log-hint': '僅顯示最近的10次導入記錄',
107
+ 'table-action-export-import-log-name': '導入文件',
108
+ 'table-action-export-import-log-result': '導入結果',
109
+ 'table-action-export-import-log-ok': function tableActionExportImportLogOk(num) {
110
+ return "\u6210\u529F ".concat(num, " \u689D");
111
+ },
112
+ 'table-action-export-import-log-err': function tableActionExportImportLogErr(num) {
113
+ return ", \u5931\u8D25 ".concat(num, " \u689D");
114
+ },
115
+ 'table-action-export-import-log-check': "\u67E5\u770B\u539F\u56E0",
116
+ // 导入详情
117
+ 'table-action-export-import-log-detail-title': '導入詳情',
118
+ 'table-action-export-import-log-err-log': '失敗日誌',
119
+ 'table-action-export-import-log-copy': '復製',
120
+ 'table-action-export-import-table-success-copy': '復製成功'
63
121
  };
@@ -1,15 +1,15 @@
1
- import React from "react";
2
- import { SortableItemProps } from "../DragSortList";
3
- import "./index.less";
1
+ import React from 'react';
2
+ import { SortableItemProps } from '../DragSortList';
3
+ import './index.less';
4
4
  declare type IdType = string | number;
5
5
  export interface MultipleContainersSortListProps<T> {
6
6
  list: Record<string, T[]>;
7
7
  vertical?: boolean;
8
8
  wrapStyle?: React.CSSProperties;
9
9
  onChange: (val: Record<string, T[]>) => void;
10
- renderContainer?: DefaultRenderContainerProps["renderContainer"];
10
+ renderContainer?: DefaultRenderContainerProps['renderContainer'];
11
11
  rowKey: IdType | ((val: T) => IdType);
12
- children: SortableItemProps<T>["children"];
12
+ children: SortableItemProps<T>['children'];
13
13
  quickFilterMaxLength: number;
14
14
  }
15
15
  export declare const TRASH_ID = "void";
@@ -123,7 +123,10 @@ var MultipleContainersSortList = (props) => {
123
123
  if (overContainer === "quickFilter" && newList[overContainer].length > quickFilterMaxLength) {
124
124
  newList = {
125
125
  ...newList,
126
- [overContainer]: newList[overContainer].slice(0, quickFilterMaxLength),
126
+ [overContainer]: newList[overContainer].slice(
127
+ 0,
128
+ quickFilterMaxLength
129
+ ),
127
130
  [activeContainer]: [
128
131
  ...newList[overContainer].slice(quickFilterMaxLength),
129
132
  ...newList[activeContainer]
@@ -174,16 +177,18 @@ var MultipleContainersSortList = (props) => {
174
177
  items: list[container].map((item) => getRowKey(item)),
175
178
  strategy: import_sortable.verticalListSortingStrategy
176
179
  },
177
- list[container].length ? list[container].map((item, index) => /* @__PURE__ */ import_react.default.createElement(
178
- import_DragSortList.SortableItem,
179
- {
180
- key: getRowKey(item),
181
- id: getRowKey(item),
182
- item,
183
- index
184
- },
185
- children
186
- )) : /* @__PURE__ */ import_react.default.createElement("span", { className: "materials-sort-list-empty" }, (0, import_locales.getText)("table-action-filter-no-filter"))
180
+ list[container].length ? list[container].map(
181
+ (item, index) => !(item == null ? void 0 : item.isHidden) ? /* @__PURE__ */ import_react.default.createElement(
182
+ import_DragSortList.SortableItem,
183
+ {
184
+ key: getRowKey(item),
185
+ id: getRowKey(item),
186
+ item,
187
+ index
188
+ },
189
+ children
190
+ ) : null
191
+ ) : /* @__PURE__ */ import_react.default.createElement("span", { className: "materials-sort-list-empty" }, (0, import_locales.getText)("table-action-filter-no-filter"))
187
192
  )
188
193
  ))));
189
194
  };
@@ -5,7 +5,7 @@ export declare const paginationConfig: {
5
5
  className: string;
6
6
  defaultCurrent: number;
7
7
  showTotal: (total: number, range: [number, number]) => string;
8
- itemRender: (page: number, type: "page" | "next" | "prev" | "jump-prev" | "jump-next", element: React.ReactNode) => React.ReactNode;
8
+ itemRender: (page: number, type: "next" | "page" | "prev" | "jump-prev" | "jump-next", element: React.ReactNode) => React.ReactNode;
9
9
  responsive: boolean;
10
10
  size: string;
11
11
  };
@@ -37,11 +37,20 @@ var import_antd = require("antd");
37
37
  var import_fields = require("../../../table/Table/fields");
38
38
  var import_index = require("./index.less");
39
39
  var FilterItem = (props) => {
40
- const { label, type, name, other } = props;
40
+ const { label, type, name, other, isHidden } = props;
41
41
  const Com = (0, import_react.useMemo)(() => {
42
42
  var _a;
43
43
  return (_a = import_fields.fieldMaps[type]) == null ? void 0 : _a.edit;
44
44
  }, [type]);
45
- return /* @__PURE__ */ import_react.default.createElement(import_antd.Form.Item, { label, name, ...(other == null ? void 0 : other.formItemProps) || {} }, /* @__PURE__ */ import_react.default.createElement(Com, { ...other }));
45
+ return /* @__PURE__ */ import_react.default.createElement(
46
+ import_antd.Form.Item,
47
+ {
48
+ label,
49
+ name,
50
+ ...(other == null ? void 0 : other.formItemProps) || {},
51
+ hidden: isHidden
52
+ },
53
+ /* @__PURE__ */ import_react.default.createElement(Com, { ...other })
54
+ );
46
55
  };
47
56
  var FilterItem_default = FilterItem;
@@ -51,7 +51,8 @@ var QuickFilter = (props) => {
51
51
  name,
52
52
  type: item.type,
53
53
  other: item.other,
54
- props: item.props
54
+ props: item.props,
55
+ isHidden: item.isHidden
55
56
  }
56
57
  );
57
58
  }));
@@ -28,6 +28,7 @@ export declare type FilterItemProps = {
28
28
  other: Record<string, any>;
29
29
  isCustom?: boolean;
30
30
  columnKey?: string;
31
+ isHidden?: boolean;
31
32
  };
32
33
  /**
33
34
  * 筛选组件属性
@@ -102,7 +102,9 @@ var Sort = ({
102
102
  key: d.name,
103
103
  label: d.label,
104
104
  children: sortChildrenMap[d.type](d.name, !!(d == null ? void 0 : d.localFilter)),
105
- popupClassName: `${prefix}sort-sub-menu-popup-wrap`
105
+ popupClassName: `${prefix}sort-sub-menu-popup-wrap`,
106
+ // 增加显示隐藏配置
107
+ className: `${d.isHidden ? `${prefix}sort-menu-wrap-hide` : ""}`
106
108
  };
107
109
  });
108
110
  }, [list, localPagination]);
@@ -130,14 +132,7 @@ var Sort = ({
130
132
  );
131
133
  }, [button, style, value, isMobileBool]);
132
134
  const content = (0, import_react.useMemo)(() => {
133
- return /* @__PURE__ */ import_react.default.createElement(
134
- import_InlineMenu.default,
135
- {
136
- items: sortItems,
137
- value: value || "",
138
- onChange
139
- }
140
- );
135
+ return /* @__PURE__ */ import_react.default.createElement(import_InlineMenu.default, { items: sortItems, value: value || "", onChange });
141
136
  }, [value, sortItems, onChange]);
142
137
  if ((0, import_platform.isMobile)()) {
143
138
  return /* @__PURE__ */ import_react.default.createElement(
@@ -31,4 +31,7 @@
31
31
  }
32
32
  }
33
33
  }
34
+ &-sort-menu-wrap-hide{
35
+ display: none!important;
36
+ }
34
37
  }
@@ -7,6 +7,7 @@ export declare type SortItemProps = {
7
7
  isCustom: boolean;
8
8
  columnKey?: string;
9
9
  localFilter?: boolean;
10
+ isHidden?: boolean;
10
11
  };
11
12
  export declare type SortListProps = {
12
13
  list: SortItemProps[];
@@ -0,0 +1,7 @@
1
+ import React from "react";
2
+ import { ExportImportType } from "../../../../../types";
3
+ import "./index.less";
4
+ declare const ExportFile: (props: {
5
+ exportImport: ExportImportType;
6
+ }) => React.JSX.Element;
7
+ export default ExportFile;
@@ -0,0 +1,150 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
+
29
+ // src/components/table/Actions/component/ExportImport/components/ExportFile/index.tsx
30
+ var ExportFile_exports = {};
31
+ __export(ExportFile_exports, {
32
+ default: () => ExportFile_default
33
+ });
34
+ module.exports = __toCommonJS(ExportFile_exports);
35
+ var import_ahooks = require("ahooks");
36
+ var import_antd = require("antd");
37
+ var import_react = __toESM(require("react"));
38
+ var import_useEngineContext = __toESM(require("../../../../../../../hooks/useEngineContext"));
39
+ var import_locales = require("../../../../../../../locales/index");
40
+ var import_serve = require("../../../../../serve");
41
+ var import_status = require("../../../../../status");
42
+ var import_utils = require("../../../../../utils");
43
+ var import_date = require("../../utils/date");
44
+ var import_download = __toESM(require("../../utils/download"));
45
+ var import_index = require("./index.less");
46
+ var defaultData = {
47
+ type: import_status.defaultOptions.exportValue,
48
+ skip: 1,
49
+ num: 10
50
+ };
51
+ var exportStatusOptions = {
52
+ pending: (0, import_locales.getText)("table-action-export-import-file-pending"),
53
+ processing: (0, import_locales.getText)("table-action-export-import-file-processing"),
54
+ completed: (0, import_locales.getText)("table-action-export-import-file-completed"),
55
+ complete: (0, import_locales.getText)("table-action-export-import-file-completed")
56
+ };
57
+ var ExportFile = (props) => {
58
+ const { exportImport } = props;
59
+ const { formId, formCode } = exportImport;
60
+ const [list, setList] = (0, import_react.useState)([]);
61
+ const [defaultParams, setDefaultParams] = (0, import_react.useState)(defaultData);
62
+ const context = (0, import_useEngineContext.default)();
63
+ import_utils.request.setRequest(context.appHelper.utils.request);
64
+ (0, import_react.useEffect)(() => {
65
+ let params = {};
66
+ if (formId) {
67
+ params.form_id = formId;
68
+ }
69
+ if (formCode) {
70
+ params.code = formCode;
71
+ }
72
+ setDefaultParams({
73
+ ...defaultParams,
74
+ ...params
75
+ });
76
+ }, [formId, formCode]);
77
+ const _historyList = (0, import_ahooks.useRequest)(import_serve.historyData, {
78
+ manual: true,
79
+ onSuccess: (res) => {
80
+ var _a;
81
+ if (res.code == 200) {
82
+ setList(((_a = res.data) == null ? void 0 : _a.list) || []);
83
+ }
84
+ }
85
+ });
86
+ const init = () => {
87
+ if ((defaultParams == null ? void 0 : defaultParams.form_id) || (defaultParams == null ? void 0 : defaultParams.code)) {
88
+ _historyList.run(defaultParams);
89
+ }
90
+ };
91
+ (0, import_react.useEffect)(() => {
92
+ init();
93
+ }, [defaultParams]);
94
+ const columns = [
95
+ {
96
+ title: (0, import_locales.getText)("table-action-export-import-file-name"),
97
+ dataIndex: "file_name",
98
+ render: (text, record) => {
99
+ return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, record.status == "completed" || record.status == "complete" ? /* @__PURE__ */ import_react.default.createElement(
100
+ "a",
101
+ {
102
+ onClick: () => {
103
+ (0, import_download.default)(record.url, text);
104
+ }
105
+ },
106
+ text
107
+ ) : /* @__PURE__ */ import_react.default.createElement("span", null, text));
108
+ }
109
+ },
110
+ {
111
+ title: (0, import_locales.getText)("table-action-export-import-file-content"),
112
+ dataIndex: "setting",
113
+ render: (text, record) => {
114
+ var _a, _b, _c;
115
+ return /* @__PURE__ */ import_react.default.createElement("div", null, ((_b = (_a = text == null ? void 0 : text.params) == null ? void 0 : _a.ids) == null ? void 0 : _b.length) ? (0, import_locales.getText)("table-action-export-import-file-content-part") : (0, import_locales.getText)("table-action-export-import-file-content-all"), " ", (0, import_locales.getText)("table-action-export-import-file-record")(
116
+ `${((_c = record == null ? void 0 : record.result) == null ? void 0 : _c.total) || 0}`
117
+ ));
118
+ }
119
+ },
120
+ {
121
+ title: (0, import_locales.getText)("table-action-export-import-file-status"),
122
+ dataIndex: "status",
123
+ render: (text) => exportStatusOptions[text]
124
+ },
125
+ {
126
+ title: (0, import_locales.getText)("table-action-export-import-file-account"),
127
+ dataIndex: "account",
128
+ render: (text) => {
129
+ return text ? /* @__PURE__ */ import_react.default.createElement("div", null, `${(text == null ? void 0 : text.first_name) || ""} ${(text == null ? void 0 : text.last_name) || ""}`) : null;
130
+ }
131
+ },
132
+ {
133
+ title: (0, import_locales.getText)("table-action-export-import-file-created"),
134
+ dataIndex: "created_at",
135
+ render: (text) => (0, import_date.formatDate)(text)
136
+ }
137
+ ];
138
+ return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement("div", { className: "export-history-content" }, /* @__PURE__ */ import_react.default.createElement(import_antd.Spin, { spinning: _historyList == null ? void 0 : _historyList.loading }, /* @__PURE__ */ import_react.default.createElement("div", { className: "content-hint" }, (0, import_locales.getText)("table-action-export-import-file-hint"), /* @__PURE__ */ import_react.default.createElement("a", { onClick: () => init() }, (0, import_locales.getText)("table-action-export-import-file-refresh"))), /* @__PURE__ */ import_react.default.createElement(
139
+ import_antd.Table,
140
+ {
141
+ rowClassName: "antd-table-row",
142
+ columns,
143
+ dataSource: list,
144
+ pagination: false,
145
+ rowKey: (record) => record.id,
146
+ scroll: { x: true }
147
+ }
148
+ ))));
149
+ };
150
+ var ExportFile_default = ExportFile;
@@ -0,0 +1,29 @@
1
+ .export-history {
2
+ font-size: 14px;
3
+ font-weight: 650;
4
+ color: #252a2d;
5
+ cursor: pointer;
6
+ }
7
+
8
+ .export-history-modal {
9
+ :global {
10
+ .ant-modal-body {
11
+ padding: 0;
12
+ }
13
+ }
14
+ }
15
+
16
+ .export-history-content {
17
+ max-height: calc(100vh * 0.7 - 120px);
18
+ min-height: 200px;
19
+ overflow-y: auto;
20
+ overflow-x: hidden;
21
+
22
+ .content-hint {
23
+ margin-bottom: 10px;
24
+ display: flex;
25
+ align-items: center;
26
+ justify-content: space-between;
27
+ color: #8c8c8c;
28
+ }
29
+ }
@@ -0,0 +1,7 @@
1
+ interface IExportParams {
2
+ type: string;
3
+ originDataSource: any[];
4
+ currentDataSource: any[];
5
+ }
6
+ export declare const batchExport: (exportParams: IExportParams, exportImport: any) => Promise<true | undefined>;
7
+ export {};
@@ -0,0 +1,78 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+
19
+ // src/components/table/Actions/component/ExportImport/components/ExportTable/function.ts
20
+ var function_exports = {};
21
+ __export(function_exports, {
22
+ batchExport: () => batchExport
23
+ });
24
+ module.exports = __toCommonJS(function_exports);
25
+ var import_antd = require("antd");
26
+ var import_locales = require("../../../../../../../locales/index");
27
+ var import_serve = require("../../../../../serve");
28
+ var import_status = require("../../../../../status");
29
+ var import_file = require("../../utils/file");
30
+ var _batchExport = async (params) => {
31
+ let { status } = await (0, import_serve.exportData)(params);
32
+ if (status) {
33
+ import_antd.message.success({
34
+ content: (0, import_locales.getText)("table-action-export-import-export-success"),
35
+ key: import_status.defaultOptions.exportValue
36
+ });
37
+ return true;
38
+ } else {
39
+ import_antd.message.destroy();
40
+ }
41
+ };
42
+ var batchExport = (exportParams, exportImport) => {
43
+ const { selectLists, formId, formCode } = exportImport;
44
+ let _name = (0, import_file.getFileDateName)();
45
+ let params = {};
46
+ if (formId) {
47
+ params.form_id = formId;
48
+ }
49
+ if (formCode) {
50
+ params.code = formCode;
51
+ }
52
+ console.log("exportParams", exportParams);
53
+ const type = (exportParams == null ? void 0 : exportParams.type) || import_status.defaultOptions.exportType;
54
+ if (type === import_status.defaultOptions.exportType) {
55
+ _name = `${(0, import_locales.getText)("table-action-export-import-current-page")}${_name}`;
56
+ const lists = (exportParams == null ? void 0 : exportParams.currentDataSource) || [];
57
+ params.ids = lists.map((item) => (item == null ? void 0 : item.id) || (item == null ? void 0 : item.form_record_id));
58
+ params.file_name = _name;
59
+ }
60
+ if (type === "all-records") {
61
+ _name = `${(0, import_locales.getText)("table-action-export-import-all-records")}${_name}`;
62
+ const lists = (exportParams == null ? void 0 : exportParams.originDataSource) || [];
63
+ params.ids = lists.map((item) => (item == null ? void 0 : item.id) || (item == null ? void 0 : item.form_record_id));
64
+ params.file_name = _name;
65
+ }
66
+ if (type === "selected-records") {
67
+ _name = `${(0, import_locales.getText)(
68
+ "table-action-export-import-selected-records"
69
+ )}(${(0, import_locales.getText)("table-action-export-import-selected")} ${(0, import_locales.getText)("table-action-export-import-item")(selectLists == null ? void 0 : selectLists.length)}) ${_name}`;
70
+ params.ids = selectLists || [];
71
+ params.file_name = _name;
72
+ }
73
+ return _batchExport(params);
74
+ };
75
+ // Annotate the CommonJS export names for ESM import in node:
76
+ 0 && (module.exports = {
77
+ batchExport
78
+ });
@@ -0,0 +1,8 @@
1
+ import React from "react";
2
+ import { ExportImportType } from "../../../../../types";
3
+ import "./index.less";
4
+ declare const ExportTable: (props: {
5
+ onChange: any;
6
+ exportImport: ExportImportType;
7
+ }) => React.JSX.Element;
8
+ export default ExportTable;