@pisell/materials 2.2.2 → 2.2.3

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 (111) 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/Pagination/index.d.ts +1 -1
  12. package/es/components/table/Actions/component/ExportImport/components/ExportFile/index.d.ts +7 -0
  13. package/es/components/table/Actions/component/ExportImport/components/ExportFile/index.js +143 -0
  14. package/es/components/table/Actions/component/ExportImport/components/ExportFile/index.less +29 -0
  15. package/es/components/table/Actions/component/ExportImport/components/ExportTable/function.d.ts +7 -0
  16. package/es/components/table/Actions/component/ExportImport/components/ExportTable/function.js +87 -0
  17. package/es/components/table/Actions/component/ExportImport/components/ExportTable/index.d.ts +8 -0
  18. package/es/components/table/Actions/component/ExportImport/components/ExportTable/index.js +41 -0
  19. package/es/components/table/Actions/component/ExportImport/components/ExportTable/index.less +5 -0
  20. package/es/components/table/Actions/component/ExportImport/components/ImportLog/Detail.d.ts +4 -0
  21. package/es/components/table/Actions/component/ExportImport/components/ImportLog/Detail.js +97 -0
  22. package/es/components/table/Actions/component/ExportImport/components/ImportLog/index.d.ts +7 -0
  23. package/es/components/table/Actions/component/ExportImport/components/ImportLog/index.js +137 -0
  24. package/es/components/table/Actions/component/ExportImport/components/ImportLog/index.less +48 -0
  25. package/es/components/table/Actions/component/ExportImport/components/ImportTable/index.d.ts +10 -0
  26. package/es/components/table/Actions/component/ExportImport/components/ImportTable/index.js +149 -0
  27. package/es/components/table/Actions/component/ExportImport/components/ImportTable/index.less +97 -0
  28. package/es/components/table/Actions/component/ExportImport/index.d.ts +8 -0
  29. package/es/components/table/Actions/component/ExportImport/index.js +232 -0
  30. package/es/components/table/Actions/component/ExportImport/index.less +194 -0
  31. package/es/components/table/Actions/component/ExportImport/utils/date.d.ts +8 -0
  32. package/es/components/table/Actions/component/ExportImport/utils/date.js +19 -0
  33. package/es/components/table/Actions/component/ExportImport/utils/download.d.ts +3 -0
  34. package/es/components/table/Actions/component/ExportImport/utils/download.js +39 -0
  35. package/es/components/table/Actions/component/ExportImport/utils/file.d.ts +7 -0
  36. package/es/components/table/Actions/component/ExportImport/utils/file.js +21 -0
  37. package/es/components/table/Actions/index.d.ts +3 -2
  38. package/es/components/table/Actions/index.js +12 -8
  39. package/es/components/table/BasicTable/index.js +11 -1
  40. package/es/components/table/Table/index.js +6 -0
  41. package/es/components/table/Table/utils.d.ts +1 -1
  42. package/es/components/table/hooks/useTableSetting.d.ts +2 -1
  43. package/es/components/table/hooks/useTableSetting.js +2 -1
  44. package/es/components/table/index.js +15 -13
  45. package/es/components/table/model.d.ts +2 -0
  46. package/es/components/table/model.js +15 -1
  47. package/es/components/table/serve.d.ts +11 -0
  48. package/es/components/table/serve.js +38 -0
  49. package/es/components/table/status.d.ts +19 -0
  50. package/es/components/table/status.js +26 -0
  51. package/es/components/table/types.d.ts +20 -0
  52. package/es/components/table/utils.d.ts +15 -0
  53. package/es/components/table/utils.js +26 -0
  54. package/es/locales/en-US.d.ts +46 -0
  55. package/es/locales/en-US.js +59 -1
  56. package/es/locales/zh-CN.d.ts +46 -0
  57. package/es/locales/zh-CN.js +59 -1
  58. package/es/locales/zh-TW.d.ts +46 -0
  59. package/es/locales/zh-TW.js +59 -1
  60. package/lib/components/Pagination/index.d.ts +1 -1
  61. package/lib/components/table/Actions/component/ExportImport/components/ExportFile/index.d.ts +7 -0
  62. package/lib/components/table/Actions/component/ExportImport/components/ExportFile/index.js +150 -0
  63. package/lib/components/table/Actions/component/ExportImport/components/ExportFile/index.less +29 -0
  64. package/lib/components/table/Actions/component/ExportImport/components/ExportTable/function.d.ts +7 -0
  65. package/lib/components/table/Actions/component/ExportImport/components/ExportTable/function.js +78 -0
  66. package/lib/components/table/Actions/component/ExportImport/components/ExportTable/index.d.ts +8 -0
  67. package/lib/components/table/Actions/component/ExportImport/components/ExportTable/index.js +60 -0
  68. package/lib/components/table/Actions/component/ExportImport/components/ExportTable/index.less +5 -0
  69. package/lib/components/table/Actions/component/ExportImport/components/ImportLog/Detail.d.ts +4 -0
  70. package/lib/components/table/Actions/component/ExportImport/components/ImportLog/Detail.js +117 -0
  71. package/lib/components/table/Actions/component/ExportImport/components/ImportLog/index.d.ts +7 -0
  72. package/lib/components/table/Actions/component/ExportImport/components/ImportLog/index.js +141 -0
  73. package/lib/components/table/Actions/component/ExportImport/components/ImportLog/index.less +48 -0
  74. package/lib/components/table/Actions/component/ExportImport/components/ImportTable/index.d.ts +10 -0
  75. package/lib/components/table/Actions/component/ExportImport/components/ImportTable/index.js +124 -0
  76. package/lib/components/table/Actions/component/ExportImport/components/ImportTable/index.less +97 -0
  77. package/lib/components/table/Actions/component/ExportImport/index.d.ts +8 -0
  78. package/lib/components/table/Actions/component/ExportImport/index.js +210 -0
  79. package/lib/components/table/Actions/component/ExportImport/index.less +194 -0
  80. package/lib/components/table/Actions/component/ExportImport/utils/date.d.ts +8 -0
  81. package/lib/components/table/Actions/component/ExportImport/utils/date.js +49 -0
  82. package/lib/components/table/Actions/component/ExportImport/utils/download.d.ts +3 -0
  83. package/lib/components/table/Actions/component/ExportImport/utils/download.js +62 -0
  84. package/lib/components/table/Actions/component/ExportImport/utils/file.d.ts +7 -0
  85. package/lib/components/table/Actions/component/ExportImport/utils/file.js +55 -0
  86. package/lib/components/table/Actions/index.d.ts +3 -2
  87. package/lib/components/table/Actions/index.js +11 -7
  88. package/lib/components/table/BasicTable/index.js +9 -0
  89. package/lib/components/table/Table/index.js +6 -0
  90. package/lib/components/table/Table/utils.d.ts +1 -1
  91. package/lib/components/table/hooks/useTableSetting.d.ts +2 -1
  92. package/lib/components/table/hooks/useTableSetting.js +2 -1
  93. package/lib/components/table/index.js +14 -12
  94. package/lib/components/table/model.d.ts +2 -0
  95. package/lib/components/table/model.js +11 -1
  96. package/lib/components/table/serve.d.ts +11 -0
  97. package/lib/components/table/serve.js +41 -0
  98. package/lib/components/table/status.d.ts +19 -0
  99. package/lib/components/table/status.js +55 -0
  100. package/lib/components/table/types.d.ts +20 -0
  101. package/lib/components/table/utils.d.ts +15 -0
  102. package/lib/components/table/utils.js +40 -0
  103. package/lib/locales/en-US.d.ts +46 -0
  104. package/lib/locales/en-US.js +51 -1
  105. package/lib/locales/zh-CN.d.ts +46 -0
  106. package/lib/locales/zh-CN.js +51 -1
  107. package/lib/locales/zh-TW.d.ts +46 -0
  108. package/lib/locales/zh-TW.js +51 -1
  109. package/lowcode/table/meta.ts +84 -1
  110. package/lowcode/table/snippets.ts +8 -0
  111. package/package.json +3 -3
@@ -1,6 +1,6 @@
1
1
  import React from "react";
2
2
  import { FilterType } from "../../filter/types";
3
- import { ColumnSettingType, DataSourceGroupType, GallerySettingType, GridViewType, SortType } from "../types";
3
+ import { ColumnSettingType, DataSourceGroupType, ExportImportType, GallerySettingType, GridViewType, SortType } from "../types";
4
4
  import "./index.less";
5
5
  declare type ActionsProps = {
6
6
  filter: FilterType;
@@ -12,6 +12,7 @@ declare type ActionsProps = {
12
12
  buttons: any[];
13
13
  view: GridViewType;
14
14
  gallery: GallerySettingType;
15
+ exportImport?: ExportImportType;
15
16
  };
16
- declare const Actions: ({ filter, sort, columnSetting, dataSourceGroup, tableId, localPagination, buttons, view, gallery, }: ActionsProps) => React.JSX.Element | null;
17
+ declare const Actions: ({ filter, sort, columnSetting, dataSourceGroup, tableId, localPagination, buttons, view, gallery, exportImport, }: ActionsProps) => React.JSX.Element | null;
17
18
  export default Actions;
@@ -32,17 +32,18 @@ __export(Actions_exports, {
32
32
  default: () => Actions_default
33
33
  });
34
34
  module.exports = __toCommonJS(Actions_exports);
35
- var import_react = __toESM(require("react"));
36
35
  var import_antd = require("antd");
36
+ var import_react = __toESM(require("react"));
37
37
  var import_filter = __toESM(require("../../filter"));
38
38
  var import_sort = __toESM(require("../../sort"));
39
+ var import_Buttons = __toESM(require("../Header/Buttons"));
39
40
  var import_ColumnsSetting = __toESM(require("./component/ColumnsSetting"));
41
+ var import_ExportImport = __toESM(require("./component/ExportImport"));
42
+ var import_GallerySetting = __toESM(require("./component/GallerySetting"));
40
43
  var import_Group = __toESM(require("./component/Group"));
41
- var import_Buttons = __toESM(require("../Header/Buttons"));
42
44
  var import_ViewMode = __toESM(require("./component/ViewMode"));
43
- var import_GallerySetting = __toESM(require("./component/GallerySetting"));
44
- var import_index = require("./index.less");
45
45
  var import_useIsMobileTable = __toESM(require("../hooks/useIsMobileTable"));
46
+ var import_index = require("./index.less");
46
47
  var Actions = ({
47
48
  filter,
48
49
  sort,
@@ -52,7 +53,8 @@ var Actions = ({
52
53
  localPagination,
53
54
  buttons,
54
55
  view,
55
- gallery
56
+ gallery,
57
+ exportImport
56
58
  }) => {
57
59
  const form = import_antd.Form.useFormInstance();
58
60
  const isMobileBool = (0, import_useIsMobileTable.default)();
@@ -61,13 +63,14 @@ var Actions = ({
61
63
  preserve: true
62
64
  });
63
65
  const showActions = (0, import_react.useMemo)(() => {
64
- return (filter == null ? void 0 : filter.show) || (sort == null ? void 0 : sort.show) || (columnSetting == null ? void 0 : columnSetting.show) || (dataSourceGroup == null ? void 0 : dataSourceGroup.show) || view.multiple;
66
+ return (filter == null ? void 0 : filter.show) || (sort == null ? void 0 : sort.show) || (columnSetting == null ? void 0 : columnSetting.show) || (dataSourceGroup == null ? void 0 : dataSourceGroup.show) || view.multiple || (exportImport == null ? void 0 : exportImport.show);
65
67
  }, [
66
68
  filter == null ? void 0 : filter.show,
67
69
  sort == null ? void 0 : sort.show,
68
70
  columnSetting == null ? void 0 : columnSetting.show,
69
71
  dataSourceGroup == null ? void 0 : dataSourceGroup.show,
70
- view.multiple
72
+ view.multiple,
73
+ exportImport == null ? void 0 : exportImport.show
71
74
  ]);
72
75
  return showActions ? /* @__PURE__ */ import_react.default.createElement("div", { className: "materials-grid-actions" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "left-wrap" }, /* @__PURE__ */ import_react.default.createElement(
73
76
  import_filter.default,
@@ -87,6 +90,7 @@ var Actions = ({
87
90
  }
88
91
  },
89
92
  view.multiple && /* @__PURE__ */ import_react.default.createElement(import_antd.Form.Item, { name: "view_mode", noStyle: true }, /* @__PURE__ */ import_react.default.createElement(import_ViewMode.default, { view })),
93
+ (exportImport == null ? void 0 : exportImport.show) ? /* @__PURE__ */ import_react.default.createElement(import_ExportImport.default, { exportImport }) : null,
90
94
  (dataSourceGroup == null ? void 0 : dataSourceGroup.show) && viewMode === "grid" && /* @__PURE__ */ import_react.default.createElement(import_antd.Form.Item, { name: "group_by", noStyle: true }, /* @__PURE__ */ import_react.default.createElement(import_Group.default, { setting: dataSourceGroup })),
91
95
  (columnSetting == null ? void 0 : columnSetting.show) && viewMode === "grid" && /* @__PURE__ */ import_react.default.createElement(import_antd.Form.Item, { name: ["column_setting"], noStyle: true }, /* @__PURE__ */ import_react.default.createElement(import_ColumnsSetting.default, null)),
92
96
  (columnSetting == null ? void 0 : columnSetting.show) && viewMode === "gallery" && /* @__PURE__ */ import_react.default.createElement(import_GallerySetting.default, { setting: gallery, currentViewMode: viewMode }),
@@ -36,6 +36,8 @@ var import_antd = require("antd");
36
36
  var import_react = __toESM(require("react"));
37
37
  var import_Pagination = require("../../Pagination");
38
38
  var import_utils = require("../Table/utils");
39
+ var import_hooks = require("../../../hooks");
40
+ var import_model = require("../model");
39
41
  var import_utils2 = require("@pisell/utils");
40
42
  var BasicTable = (props) => {
41
43
  var _a;
@@ -48,6 +50,7 @@ var BasicTable = (props) => {
48
50
  size: 10
49
51
  };
50
52
  const group = import_antd.Form.useWatch("group_by", { form, preserve: true });
53
+ const { dispatch } = (0, import_hooks.useSharedState)(import_model.Context);
51
54
  const isGroup = (0, import_react.useMemo)(() => (0, import_utils2.isArr)(group) && group.length > 0, [group]);
52
55
  const { showTotal, localPagination } = pagination;
53
56
  const _showTotal = (0, import_react.useCallback)(
@@ -103,6 +106,12 @@ var BasicTable = (props) => {
103
106
  });
104
107
  return _expandedRowKeys;
105
108
  }, [_dataSource == null ? void 0 : _dataSource.list]);
109
+ (0, import_react.useEffect)(() => {
110
+ dispatch({
111
+ type: "setCurrentDataSource",
112
+ payload: (_dataSource == null ? void 0 : _dataSource.list) || []
113
+ });
114
+ }, [_dataSource == null ? void 0 : _dataSource.list]);
106
115
  return /* @__PURE__ */ import_react.default.createElement("div", null, /* @__PURE__ */ import_react.default.createElement(
107
116
  import_antd.Table,
108
117
  {
@@ -98,6 +98,12 @@ var GridViewTable = ({
98
98
  rowKey: tableProps.rowKey,
99
99
  filter
100
100
  });
101
+ (0, import_react.useEffect)(() => {
102
+ dispatch({
103
+ type: "setOriginResultDataSource",
104
+ payload: dataSource || []
105
+ });
106
+ }, [dataSource]);
101
107
  (0, import_react.useEffect)(() => {
102
108
  onDataSourceChange == null ? void 0 : onDataSourceChange(dataSource);
103
109
  }, [JSON.stringify(dataSource)]);
@@ -155,7 +155,7 @@ export declare const getSettingKeyArrByMode: ({ filter, columnSetting, dataSourc
155
155
  sort?: SortType | undefined;
156
156
  mode: "" | "localStorage" | "remote";
157
157
  currentViewMode: ModeType;
158
- }) => ("view_mode" | "column_setting" | "order_by" | "group_by" | "gallery_setting" | "filter_setting")[];
158
+ }) => ("filter_setting" | "column_setting" | "gallery_setting" | "view_mode" | "group_by" | "order_by")[];
159
159
  export declare const omit: (obj: Record<string, any>, keys: string[]) => Record<string, any>;
160
160
  export declare const stringify: (obj: Record<string, any>) => string;
161
161
  export {};
@@ -1,5 +1,5 @@
1
1
  import { FilterType } from "../../filter/types";
2
- import { ColumnSettingType, DataSourceGroupType, GallerySettingType, GridViewType, ModeType, SortType } from "../types";
2
+ import { ColumnSettingType, DataSourceGroupType, GallerySettingType, GridViewType, ModeType, SortType, ExportImportModeType } from "../types";
3
3
  declare type UseTableSettingProps = {
4
4
  tableId?: string;
5
5
  filter: FilterType;
@@ -11,6 +11,7 @@ declare type UseTableSettingProps = {
11
11
  currentViewMode: ModeType;
12
12
  gallery?: GallerySettingType;
13
13
  currentSettingHash: string;
14
+ exportImport?: ExportImportModeType;
14
15
  };
15
16
  declare const useTableSetting: (params: UseTableSettingProps) => {
16
17
  setTableSetting: (values: Record<string, any>) => void;
@@ -35,7 +35,8 @@ var useTableSetting = (params) => {
35
35
  currentViewMode,
36
36
  columns: propsColumns,
37
37
  gallery,
38
- currentSettingHash
38
+ currentSettingHash,
39
+ exportImport
39
40
  } = params;
40
41
  const columnsMap = (0, import_react.useMemo)(() => {
41
42
  return new Map(propsColumns.map((item) => [item.key, item]));
@@ -32,22 +32,22 @@ __export(table_exports, {
32
32
  default: () => table_default
33
33
  });
34
34
  module.exports = __toCommonJS(table_exports);
35
- var import_react = __toESM(require("react"));
36
- var import_antd = require("antd");
37
35
  var import_ahooks = require("ahooks");
38
- var import_View = __toESM(require("./View"));
39
- var import_Header = __toESM(require("./Header"));
40
- var import_Actions = __toESM(require("./Actions"));
41
- var import_Summary = __toESM(require("./Summary"));
36
+ var import_antd = require("antd");
37
+ var import_react = __toESM(require("react"));
42
38
  var import_hooks = require("../../hooks");
43
- var import_model = require("./model");
44
39
  var import_useEngineContext = __toESM(require("../../hooks/useEngineContext"));
45
- var import_useTableSetting = __toESM(require("./hooks/useTableSetting"));
46
- var import_useTriggerValuesChange = __toESM(require("./hooks/useTriggerValuesChange"));
40
+ var import_Actions = __toESM(require("./Actions"));
41
+ var import_Header = __toESM(require("./Header"));
42
+ var import_Summary = __toESM(require("./Summary"));
47
43
  var import_utils = require("./Table/utils");
48
- var import_useTransSortSetting = __toESM(require("./hooks/useTransSortSetting"));
49
- var import_useTransFilterSetting = __toESM(require("./hooks/useTransFilterSetting"));
44
+ var import_View = __toESM(require("./View"));
45
+ var import_useTableSetting = __toESM(require("./hooks/useTableSetting"));
50
46
  var import_useTransDataSourceGroupSetting = __toESM(require("./hooks/useTransDataSourceGroupSetting"));
47
+ var import_useTransFilterSetting = __toESM(require("./hooks/useTransFilterSetting"));
48
+ var import_useTransSortSetting = __toESM(require("./hooks/useTransSortSetting"));
49
+ var import_useTriggerValuesChange = __toESM(require("./hooks/useTriggerValuesChange"));
50
+ var import_model = require("./model");
51
51
  var import_index = require("./index.less");
52
52
  var defaultView = {
53
53
  defaultViewMode: "grid",
@@ -75,6 +75,7 @@ var GridView = (0, import_model.Provider)(
75
75
  gallery,
76
76
  currentSettingKey,
77
77
  // pagination,
78
+ exportImport,
78
79
  ...other
79
80
  } = props;
80
81
  const modal = (0, import_hooks.useSharedState)(import_model.Context);
@@ -307,7 +308,8 @@ var GridView = (0, import_model.Provider)(
307
308
  sort,
308
309
  tableId,
309
310
  localPagination: (_e = other == null ? void 0 : other.pagination) == null ? void 0 : _e.localPagination,
310
- gallery
311
+ gallery,
312
+ exportImport
311
313
  }
312
314
  ), /* @__PURE__ */ import_react.default.createElement(import_Summary.default, { summary }), /* @__PURE__ */ import_react.default.createElement(
313
315
  import_View.default,
@@ -14,6 +14,8 @@ interface FormState {
14
14
  utils: any;
15
15
  localPagination: boolean;
16
16
  tableWidth: number;
17
+ currentDataSource: any[];
18
+ originResultDataSource: any[];
17
19
  }
18
20
  export declare const Provider: (ComponentUi: any) => (props: any, ref: any) => import("react").JSX.Element, Context: import("react").Context<{
19
21
  state: FormState;
@@ -59,7 +59,11 @@ var defaultState = {
59
59
  edit: 0
60
60
  }
61
61
  },
62
- tableWidth: 500
62
+ tableWidth: 500,
63
+ // 当前页展示的数据
64
+ currentDataSource: [],
65
+ // 经过一系列格式化之后的所有数据
66
+ originResultDataSource: []
63
67
  };
64
68
  var { Provider, Context } = (0, import_miniRedux.default)({
65
69
  namespace: "state",
@@ -114,6 +118,12 @@ var { Provider, Context } = (0, import_miniRedux.default)({
114
118
  },
115
119
  setTableWidth(state, payload) {
116
120
  return { ...state, tableWidth: payload };
121
+ },
122
+ setCurrentDataSource(state, payload) {
123
+ return { ...state, currentDataSource: payload };
124
+ },
125
+ setOriginResultDataSource(state, payload) {
126
+ return { ...state, originResultDataSource: payload };
117
127
  }
118
128
  }
119
129
  });
@@ -0,0 +1,11 @@
1
+ declare type exportParams = {
2
+ ids?: Array<string | number>;
3
+ file_name?: string;
4
+ form_id?: string | number;
5
+ code?: string;
6
+ };
7
+ export declare const exportData: (params: exportParams) => Promise<any>;
8
+ export declare const batchImport: (params: any) => Promise<any>;
9
+ export declare const importTemplate: (params: exportParams) => Promise<any>;
10
+ export declare const historyData: (params: any) => Promise<any>;
11
+ export {};
@@ -0,0 +1,41 @@
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/serve.ts
20
+ var serve_exports = {};
21
+ __export(serve_exports, {
22
+ batchImport: () => batchImport,
23
+ exportData: () => exportData,
24
+ historyData: () => historyData,
25
+ importTemplate: () => importTemplate
26
+ });
27
+ module.exports = __toCommonJS(serve_exports);
28
+ var import_utils = require("./utils");
29
+ var exportData = (params) => {
30
+ return import_utils.request.getRequest().post(`/shop/form/data/export`, params);
31
+ };
32
+ var batchImport = (params) => import_utils.request.getRequest().post("/shop/form/data/import", params);
33
+ var importTemplate = (params) => import_utils.request.getRequest().post("/shop/form/data/download-template", params);
34
+ var historyData = async (params) => await import_utils.request.getRequest().get("/shop/form/data/task", params);
35
+ // Annotate the CommonJS export names for ESM import in node:
36
+ 0 && (module.exports = {
37
+ batchImport,
38
+ exportData,
39
+ historyData,
40
+ importTemplate
41
+ });
@@ -0,0 +1,19 @@
1
+ interface defaultOptions {
2
+ exportType: string;
3
+ footerHintTypes: string[];
4
+ okShowButtonTypes: string[];
5
+ exportValue: string;
6
+ importValue: string;
7
+ }
8
+ export declare const defaultOptions: defaultOptions;
9
+ interface SomeArray {
10
+ [index: string]: string;
11
+ }
12
+ export declare const suffixOptions: SomeArray;
13
+ export declare const exportImportOptions: {
14
+ import: any;
15
+ export: any;
16
+ export_file: any;
17
+ import_log: any;
18
+ };
19
+ export {};
@@ -0,0 +1,55 @@
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/status.ts
20
+ var status_exports = {};
21
+ __export(status_exports, {
22
+ defaultOptions: () => defaultOptions,
23
+ exportImportOptions: () => exportImportOptions,
24
+ suffixOptions: () => suffixOptions
25
+ });
26
+ module.exports = __toCommonJS(status_exports);
27
+ var import_locales = require("../../locales/index");
28
+ var defaultOptions = {
29
+ exportType: "current-page",
30
+ footerHintTypes: ["export_file", "import_log"],
31
+ okShowButtonTypes: ["export", "import"],
32
+ exportValue: "export",
33
+ importValue: "import"
34
+ };
35
+ var suffixOptions = {
36
+ "1": `${(0, import_locales.getText)("page.customer.list.table.num")}`,
37
+ "2": `${(0, import_locales.getText)("page.customer.suffix")}`,
38
+ product: `${(0, import_locales.getText)("page.product.suffix")}`,
39
+ "4": `${(0, import_locales.getText)("page.voucher.suffix")}`,
40
+ "5": `${(0, import_locales.getText)("page.recharge.suffix")}`,
41
+ "6": `${(0, import_locales.getText)("page.ticket.suffix")}`,
42
+ "7": `${(0, import_locales.getText)("page.package.ticket.suffix")}`
43
+ };
44
+ var exportImportOptions = {
45
+ import: (0, import_locales.getText)("table-action-export-import-button-import"),
46
+ export: (0, import_locales.getText)("table-action-export-import-button"),
47
+ export_file: (0, import_locales.getText)("table-action-export-import-export-title"),
48
+ import_log: (0, import_locales.getText)("table-action-export-import-import-title")
49
+ };
50
+ // Annotate the CommonJS export names for ESM import in node:
51
+ 0 && (module.exports = {
52
+ defaultOptions,
53
+ exportImportOptions,
54
+ suffixOptions
55
+ });
@@ -158,6 +158,25 @@ declare type SortDetail = {
158
158
  fromItem: Record<string, any>;
159
159
  toItem: Record<string, any>;
160
160
  };
161
+ /** 导入导出模式 */
162
+ export declare type ExportImportModeType = "import" | "export" | "export_file" | "import_log";
163
+ /**
164
+ * 导入导出配置
165
+ */
166
+ export declare type ExportImportType = {
167
+ /** 是否展示 */
168
+ show: boolean;
169
+ /** 表id */
170
+ formId?: string;
171
+ /** 表key */
172
+ formCode?: string;
173
+ /** 当前所选项 */
174
+ selectLists: string[];
175
+ /** 导入模版链接 */
176
+ templateFileUrl: string;
177
+ /** 标题 */
178
+ title: string;
179
+ };
161
180
  export declare type GridViewProps = {
162
181
  columns: any;
163
182
  dataSource: any[];
@@ -177,6 +196,7 @@ export declare type GridViewProps = {
177
196
  actionButtons: any;
178
197
  sort: SortType;
179
198
  title: any;
199
+ exportImport: ExportImportType;
180
200
  onValuesChange: (changedValues: any, values: any) => void;
181
201
  summary: any;
182
202
  utils: any;
@@ -0,0 +1,15 @@
1
+ declare type RType = (url: string, data?: {} | undefined, config?: {} | undefined) => Promise<any>;
2
+ declare class Request {
3
+ private request;
4
+ constructor();
5
+ setRequest(val: any): void;
6
+ getRequest(): {
7
+ get: RType;
8
+ post: RType;
9
+ put: RType;
10
+ remove: RType;
11
+ custom: RType;
12
+ };
13
+ }
14
+ export declare const request: Request;
15
+ export {};
@@ -0,0 +1,40 @@
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/utils.ts
20
+ var utils_exports = {};
21
+ __export(utils_exports, {
22
+ request: () => request
23
+ });
24
+ module.exports = __toCommonJS(utils_exports);
25
+ var Request = class {
26
+ constructor() {
27
+ this.request = {};
28
+ }
29
+ setRequest(val) {
30
+ this.request = val;
31
+ }
32
+ getRequest() {
33
+ return this.request;
34
+ }
35
+ };
36
+ var request = new Request();
37
+ // Annotate the CommonJS export names for ESM import in node:
38
+ 0 && (module.exports = {
39
+ request
40
+ });
@@ -50,5 +50,51 @@ declare const _default: {
50
50
  'batch-editor-what-price': 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;
@@ -73,5 +73,55 @@ var en_US_default = {
73
73
  "batch-editor-quick-edit": "Quick edit",
74
74
  "batch-editor-what-price": "What price",
75
75
  "batch-editor-quick-edit-title": (product, num) => `You have selected ${num} products including ${product}`,
76
- "batch-editor-quick-edit-title-2": (product) => `You have selected ${product}`
76
+ "batch-editor-quick-edit-title-2": (product) => `You have selected ${product}`,
77
+ // 导出
78
+ "table-action-export-import-export-success": "Export successful! ",
79
+ "table-action-export-import-button": "Export",
80
+ "table-action-export-import-export-range": "Export Range",
81
+ "table-action-export-import-current-page": "Current Page",
82
+ "table-action-export-import-all-records": "All Records",
83
+ "table-action-export-import-selected-records": "Selected Records",
84
+ "table-action-export-import-selected": "Selected",
85
+ "table-action-export-import-item": (length) => `${length} ${length > 1 ? "items" : "item"}`,
86
+ "table-action-export-import-product": "Export Products",
87
+ // 导入
88
+ "table-action-export-import-table-text-input-title": "Click or drag file to this area to upload",
89
+ "table-action-export-import-table-text-input-describe": "Support both single and bulk uploads. Do not upload data file other than supported template.",
90
+ "table-action-export-import-table-error-file": "Only supports uploading files in.csv,.xls,.xlsx format.",
91
+ "table-action-export-import-import-success": "Import successful! ",
92
+ "table-action-export-import-import-phone": "Whether to replace data with the same mobile number?",
93
+ "table-action-export-import-table-success-download": "Download Success",
94
+ "table-action-export-import-table-textimport-product": "Import Products",
95
+ "table-action-export-import-table-text-product-template": "Import Template",
96
+ "table-action-export-import-table-text-click-download": "Click to download",
97
+ "table-action-export-import-table-text-edit-file": "Replace file",
98
+ "table-action-export-import-button-import": "Import",
99
+ "table-action-export-import-cancel": "Cancel",
100
+ "table-action-export-import-file-completed": "completed",
101
+ "table-action-export-import-file-processing": "processing",
102
+ "table-action-export-import-file-pending": "pending",
103
+ "table-action-export-import-file-refresh": "Refresh",
104
+ "table-action-export-import-export-title": "Export File",
105
+ "table-action-export-import-file-hint": "Display only the last 10 export histories",
106
+ "table-action-export-import-file-name": "Export File",
107
+ "table-action-export-import-file-content": "Content",
108
+ "table-action-export-import-file-content-all": "All",
109
+ "table-action-export-import-file-content-part": "Selected",
110
+ "table-action-export-import-file-status": "Status",
111
+ "table-action-export-import-file-account": "Operator",
112
+ "table-action-export-import-file-created": "Operation Time",
113
+ "table-action-export-import-file-record": (length) => `${length} ${length > 1 ? "records" : "record"}`,
114
+ // 导入日志
115
+ "table-action-export-import-import-title": "Import Log",
116
+ "table-action-export-import-log-hint": "Display only the last 10 import histories",
117
+ "table-action-export-import-log-name": "Import File",
118
+ "table-action-export-import-log-result": "Import Results",
119
+ "table-action-export-import-log-ok": (num) => `${num} successful`,
120
+ "table-action-export-import-log-err": (num) => `, ${num} failures`,
121
+ "table-action-export-import-log-check": `View more`,
122
+ // 导入详情
123
+ "table-action-export-import-log-detail-title": "Import Details",
124
+ "table-action-export-import-log-err-log": "Failure Log",
125
+ "table-action-export-import-log-copy": "Copy",
126
+ "table-action-export-import-table-success-copy": "Copy Success"
77
127
  };
@@ -50,5 +50,51 @@ declare const _default: {
50
50
  'batch-editor-what-price': 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;