@pisell/materials 6.4.18 → 6.4.19

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 (186) hide show
  1. package/build/lowcode/index.js +1 -1
  2. package/build/lowcode/meta.js +3 -3
  3. package/build/lowcode/preview.js +8 -8
  4. package/build/lowcode/render/default/view.css +1 -1
  5. package/build/lowcode/render/default/view.js +15 -15
  6. package/build/lowcode/view.css +1 -1
  7. package/build/lowcode/view.js +15 -15
  8. package/es/components/dataSourceComponents/dataSourceForm/utils.d.ts +56 -0
  9. package/es/components/dataSourceComponents/dataSourceForm/utils.js +3 -1
  10. package/es/components/dataSourceComponents/fields/Input.Mobile/serve.d.ts +24 -0
  11. package/es/components/dataSourceComponents/fields/Input.Mobile/serve.js +2 -0
  12. package/es/components/dataSourceComponents/fields/Upload/index.d.ts +3 -0
  13. package/es/components/dataSourceComponents/fields/Upload/index.js +4 -3
  14. package/es/components/iconfont/index.d.ts +8 -0
  15. package/es/components/iconfont/index.js +1 -1
  16. package/es/components/pisellAdjustPrice/index.d.ts +0 -1
  17. package/es/components/pisellCardList/index.d.ts +103 -0
  18. package/es/components/pisellText/components/Editable/index.d.ts +29 -0
  19. package/es/components/pisellText/components/Editable/index.js +130 -0
  20. package/es/components/pisellText/components/Editable/index.less +40 -0
  21. package/es/components/pisellText/index.d.ts +9 -0
  22. package/es/components/pisellText/index.js +2 -0
  23. package/es/components/pisellWalletPassCard/index.d.ts +136 -0
  24. package/es/components/productCard/index.d.ts +7 -0
  25. package/es/components/productCard/utils.d.ts +31 -0
  26. package/es/components/productCard/utils.js +1 -8
  27. package/es/components/select/index.d.ts +9 -0
  28. package/es/components/select/index.js +4 -2
  29. package/es/components/sortableList/index.d.ts +11 -0
  30. package/es/components/sortableList/index.js +2 -1
  31. package/es/components/table/Actions/component/ExportImport/components/ExportTable/function.d.ts +7 -0
  32. package/es/components/table/Actions/component/ExportImport/components/ExportTable/function.js +9 -1
  33. package/es/components/table/Actions/component/ExportImport/index.js +55 -27
  34. package/es/components/table/Table/index.d.ts +4 -0
  35. package/es/components/table/Table/index.js +7 -3
  36. package/es/components/table/hooks/useTransColumns.d.ts +14 -0
  37. package/es/components/table/hooks/useTransColumns.js +1 -1
  38. package/es/components/table/index.d.ts +4 -0
  39. package/es/components/table/index.js +3 -1
  40. package/es/components/table/serve.d.ts +13 -0
  41. package/es/components/table/serve.js +8 -0
  42. package/es/components/tabs/index.d.ts +17 -0
  43. package/es/components/tabs/index.js +9 -0
  44. package/es/components/virtual-keyboard/Amount/index.d.ts +0 -1
  45. package/es/components/walletCard/index.d.ts +11 -11
  46. package/es/components/walletCard/index.js +51 -40
  47. package/es/index.d.ts +145 -0
  48. package/es/locales/en-US.d.ts +307 -0
  49. package/es/locales/en-US.js +2 -2
  50. package/es/locales/zh-CN.d.ts +302 -0
  51. package/es/locales/zh-CN.js +1 -1
  52. package/es/locales/zh-TW.d.ts +302 -0
  53. package/es/locales/zh-TW.js +1 -1
  54. package/es/typings.d.ts +7 -1
  55. package/lib/components/dataSourceComponents/dataSourceForm/utils.d.ts +56 -0
  56. package/lib/components/dataSourceComponents/dataSourceForm/utils.js +1 -1
  57. package/lib/components/dataSourceComponents/fields/Input.Mobile/serve.d.ts +24 -0
  58. package/lib/components/dataSourceComponents/fields/Input.Mobile/serve.js +2 -0
  59. package/lib/components/dataSourceComponents/fields/Upload/index.d.ts +3 -0
  60. package/lib/components/dataSourceComponents/fields/Upload/index.js +2 -1
  61. package/lib/components/iconfont/index.d.ts +8 -0
  62. package/lib/components/iconfont/index.js +1 -1
  63. package/lib/components/pisellAdjustPrice/index.d.ts +0 -1
  64. package/lib/components/pisellCardList/index.d.ts +103 -0
  65. package/lib/components/pisellText/components/Editable/index.d.ts +29 -0
  66. package/lib/components/pisellText/components/Editable/index.js +139 -0
  67. package/lib/components/pisellText/components/Editable/index.less +40 -0
  68. package/lib/components/pisellText/index.d.ts +9 -0
  69. package/lib/components/pisellText/index.js +2 -0
  70. package/lib/components/pisellWalletPassCard/index.d.ts +136 -0
  71. package/lib/components/productCard/index.d.ts +7 -0
  72. package/lib/components/productCard/utils.d.ts +31 -0
  73. package/lib/components/productCard/utils.js +1 -8
  74. package/lib/components/select/index.d.ts +9 -0
  75. package/lib/components/select/index.js +7 -2
  76. package/lib/components/sortableList/index.d.ts +11 -0
  77. package/lib/components/sortableList/index.js +2 -2
  78. package/lib/components/table/Actions/component/ExportImport/components/ExportTable/function.d.ts +7 -0
  79. package/lib/components/table/Actions/component/ExportImport/components/ExportTable/function.js +7 -1
  80. package/lib/components/table/Actions/component/ExportImport/index.js +37 -25
  81. package/lib/components/table/Table/index.d.ts +4 -0
  82. package/lib/components/table/Table/index.js +8 -4
  83. package/lib/components/table/hooks/useTransColumns.d.ts +14 -0
  84. package/lib/components/table/hooks/useTransColumns.js +1 -1
  85. package/lib/components/table/index.d.ts +4 -0
  86. package/lib/components/table/index.js +3 -1
  87. package/lib/components/table/serve.d.ts +13 -0
  88. package/lib/components/table/serve.js +8 -0
  89. package/lib/components/tabs/index.d.ts +17 -0
  90. package/lib/components/tabs/index.js +5 -0
  91. package/lib/components/virtual-keyboard/Amount/index.d.ts +0 -1
  92. package/lib/components/walletCard/index.d.ts +11 -11
  93. package/lib/components/walletCard/index.js +47 -29
  94. package/lib/index.d.ts +145 -0
  95. package/lib/locales/en-US.d.ts +307 -0
  96. package/lib/locales/en-US.js +2 -2
  97. package/lib/locales/zh-CN.d.ts +302 -0
  98. package/lib/locales/zh-CN.js +1 -1
  99. package/lib/locales/zh-TW.d.ts +302 -0
  100. package/lib/locales/zh-TW.js +1 -1
  101. package/lib/typings.d.ts +7 -1
  102. package/lowcode/pisell-text.editable/meta.ts +115 -0
  103. package/lowcode/pisell-text.editable/snippets.ts +15 -0
  104. package/lowcode/sortable-list/meta.ts +1 -1
  105. package/lowcode/wallet-card/meta.ts +16 -14
  106. package/package.json +2 -2
  107. package/es/components/auto-resize-text/auto-text-size-standalone.d.ts +0 -20
  108. package/es/components/auto-resize-text/index.d.ts +0 -6
  109. package/es/components/cardPro/index.d.ts +0 -4
  110. package/es/components/drag-sort-tree/TreeItem/index.d.ts +0 -18
  111. package/es/components/keyboard/index.d.ts +0 -22
  112. package/es/components/pisell-config-provider/context.d.ts +0 -22
  113. package/es/components/pisellAdjustPrice/status.d.ts +0 -32
  114. package/es/components/pisellAdjustPrice/type.d.ts +0 -22
  115. package/es/components/pisellCheckboxGroup/index.d.ts +0 -40
  116. package/es/components/pisellText/components/Amount/index.d.ts +0 -20
  117. package/es/components/pisellToast/index.d.ts +0 -17
  118. package/es/components/pisellToast/squareToast/methods.d.ts +0 -13
  119. package/es/components/pisellToast/squareToast/renderImperatively.d.ts +0 -29
  120. package/es/components/pisellToast/squareToast/toast.d.ts +0 -25
  121. package/es/components/productCard/cartSkuCard/components/AmountFooter/index.d.ts +0 -4
  122. package/es/components/productCard/cartSkuCard/components/MultiDay/index.d.ts +0 -4
  123. package/es/components/productCard/cartSkuCard/components/MultiDay/utils.d.ts +0 -14
  124. package/es/components/productCard/cartSkuCard/components/Note/index.d.ts +0 -4
  125. package/es/components/productCard/cartSkuCard/components/discountReason/index.d.ts +0 -3
  126. package/es/components/productCard/cartSkuCard/components/packages/index.d.ts +0 -11
  127. package/es/components/productCard/cartSkuCard/components/packages/utils.d.ts +0 -20
  128. package/es/components/productCard/cartSkuCard/components/resources/index.d.ts +0 -4
  129. package/es/components/productCard/cartSkuCard/components/sales/index.d.ts +0 -13
  130. package/es/components/productCard/cartSkuCard/components/specs/index.d.ts +0 -4
  131. package/es/components/productCard/cartSkuCard/components/swipeAction/index.d.ts +0 -46
  132. package/es/components/productCard/cartSkuCard/components/timeRange/index.d.ts +0 -7
  133. package/es/components/productCard/components/Action/index.d.ts +0 -4
  134. package/es/components/productCard/components/Header/index.d.ts +0 -4
  135. package/es/components/productCard/components/Sales/index.d.ts +0 -4
  136. package/es/components/productCard/components/Time/components/SelectHolderModal/index.d.ts +0 -14
  137. package/es/components/productCard/locales.d.ts +0 -84
  138. package/es/components/table/Table/AddFieldModal/index.d.ts +0 -4
  139. package/es/components/virtual-keyboard/Amount/themeConfig.d.ts +0 -32
  140. package/es/components/virtual-keyboard/BaseNumberKeyboard/Presets.d.ts +0 -15
  141. package/es/components/virtual-keyboard/Keyboard/index.d.ts +0 -21
  142. package/es/components/virtual-keyboard/Number/themeConfig.d.ts +0 -32
  143. package/es/components/virtual-keyboard/Number/types.d.ts +0 -26
  144. package/es/components/virtual-keyboard/VirtualKeyInput/index.d.ts +0 -13
  145. package/es/components/virtual-keyboard/index.d.ts +0 -25
  146. package/es/components/virtualInput/BaseVirtualInput/index.d.ts +0 -40
  147. package/lib/components/auto-resize-text/auto-text-size-standalone.d.ts +0 -20
  148. package/lib/components/auto-resize-text/index.d.ts +0 -6
  149. package/lib/components/cardPro/index.d.ts +0 -4
  150. package/lib/components/drag-sort-tree/TreeItem/index.d.ts +0 -18
  151. package/lib/components/keyboard/index.d.ts +0 -22
  152. package/lib/components/pisell-config-provider/context.d.ts +0 -22
  153. package/lib/components/pisellAdjustPrice/status.d.ts +0 -32
  154. package/lib/components/pisellAdjustPrice/type.d.ts +0 -22
  155. package/lib/components/pisellCheckboxGroup/index.d.ts +0 -40
  156. package/lib/components/pisellText/components/Amount/index.d.ts +0 -20
  157. package/lib/components/pisellToast/index.d.ts +0 -17
  158. package/lib/components/pisellToast/squareToast/methods.d.ts +0 -13
  159. package/lib/components/pisellToast/squareToast/renderImperatively.d.ts +0 -29
  160. package/lib/components/pisellToast/squareToast/toast.d.ts +0 -25
  161. package/lib/components/productCard/cartSkuCard/components/AmountFooter/index.d.ts +0 -4
  162. package/lib/components/productCard/cartSkuCard/components/MultiDay/index.d.ts +0 -4
  163. package/lib/components/productCard/cartSkuCard/components/MultiDay/utils.d.ts +0 -14
  164. package/lib/components/productCard/cartSkuCard/components/Note/index.d.ts +0 -4
  165. package/lib/components/productCard/cartSkuCard/components/discountReason/index.d.ts +0 -3
  166. package/lib/components/productCard/cartSkuCard/components/packages/index.d.ts +0 -11
  167. package/lib/components/productCard/cartSkuCard/components/packages/utils.d.ts +0 -20
  168. package/lib/components/productCard/cartSkuCard/components/resources/index.d.ts +0 -4
  169. package/lib/components/productCard/cartSkuCard/components/sales/index.d.ts +0 -13
  170. package/lib/components/productCard/cartSkuCard/components/specs/index.d.ts +0 -4
  171. package/lib/components/productCard/cartSkuCard/components/swipeAction/index.d.ts +0 -46
  172. package/lib/components/productCard/cartSkuCard/components/timeRange/index.d.ts +0 -7
  173. package/lib/components/productCard/components/Action/index.d.ts +0 -4
  174. package/lib/components/productCard/components/Header/index.d.ts +0 -4
  175. package/lib/components/productCard/components/Sales/index.d.ts +0 -4
  176. package/lib/components/productCard/components/Time/components/SelectHolderModal/index.d.ts +0 -14
  177. package/lib/components/productCard/locales.d.ts +0 -84
  178. package/lib/components/table/Table/AddFieldModal/index.d.ts +0 -4
  179. package/lib/components/virtual-keyboard/Amount/themeConfig.d.ts +0 -32
  180. package/lib/components/virtual-keyboard/BaseNumberKeyboard/Presets.d.ts +0 -15
  181. package/lib/components/virtual-keyboard/Keyboard/index.d.ts +0 -21
  182. package/lib/components/virtual-keyboard/Number/themeConfig.d.ts +0 -32
  183. package/lib/components/virtual-keyboard/Number/types.d.ts +0 -26
  184. package/lib/components/virtual-keyboard/VirtualKeyInput/index.d.ts +0 -13
  185. package/lib/components/virtual-keyboard/index.d.ts +0 -25
  186. package/lib/components/virtualInput/BaseVirtualInput/index.d.ts +0 -40
@@ -95,13 +95,6 @@ var getServiceTime = (item, currentDate) => {
95
95
  } else {
96
96
  dateTime = `${startDate.format(dateFormat)} ${startTime} ~ ${endDate.format(dateFormat)} ${endTime}`;
97
97
  }
98
- if (durationType === "days") {
99
- dateTime = formatMultiDayDate({
100
- start_date: startDate.format("YYYY-MM-DD"),
101
- end_date: endDate.format("YYYY-MM-DD"),
102
- locale
103
- });
104
- }
105
98
  }
106
99
  const startDateTime = `${startDate.format("YYYY-MM-DD")} ${startTime}`;
107
100
  const endDateTime = `${endDate.format("YYYY-MM-DD")} ${endTime}`;
@@ -112,7 +105,7 @@ var getServiceTime = (item, currentDate) => {
112
105
  const minutes = _duration % 60;
113
106
  durationText = import_utils.locales.getText("pisell2.product.card.hour.minute")(hours, minutes);
114
107
  } else if (durationType === "days") {
115
- durationText = `${_duration}${import_utils.locales.getText("pisell2.product.card.day")(_duration)}`;
108
+ durationText = import_utils.locales.getText("pisell2.product.card.day")(_duration);
116
109
  } else {
117
110
  durationText = `${_duration}`;
118
111
  }
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import { Select as OriginalSelect } from 'antd';
3
+ import type { SelectProps } from 'antd';
4
+ import './index.less';
5
+ interface CompoundedComponent extends React.ForwardRefExoticComponent<SelectProps> {
6
+ Option: typeof OriginalSelect.Option;
7
+ }
8
+ declare const Select: CompoundedComponent;
9
+ export default Select;
@@ -51,6 +51,7 @@ var SelectBase = (0, import_react.forwardRef)((props, ref) => {
51
51
  options,
52
52
  dropdownRender: propsDropdownRender,
53
53
  showSearch,
54
+ onSearch,
54
55
  styleType,
55
56
  optionFilterProp = "value",
56
57
  popupClassName,
@@ -111,7 +112,10 @@ var SelectBase = (0, import_react.forwardRef)((props, ref) => {
111
112
  size: "middle",
112
113
  placeholder: (0, import_locales.getText)("select-dropdown-render-search"),
113
114
  value: searchValue,
114
- onChange: (e) => setSearchValue(e.target.value),
115
+ onChange: (e) => {
116
+ onSearch == null ? void 0 : onSearch(e.target.value);
117
+ setSearchValue(e.target.value);
118
+ },
115
119
  bordered: false,
116
120
  allowClear: true,
117
121
  prefix: /* @__PURE__ */ import_react.default.createElement(import_iconfont.default, { style: { color: "#98A2B3" }, type: "pisell2-search-lg" })
@@ -142,7 +146,8 @@ var SelectBase = (0, import_react.forwardRef)((props, ref) => {
142
146
  checkboxChecked,
143
147
  propsDropdownRender,
144
148
  searchValue,
145
- showSearch
149
+ showSearch,
150
+ onSearch
146
151
  ]
147
152
  );
148
153
  if (styleType === "system") {
@@ -0,0 +1,11 @@
1
+ import React from "react";
2
+ import { Props } from "../DragSortList";
3
+ export interface SortableListProps<T> {
4
+ dataSource: Props<T>["list"];
5
+ onChange: Props<T>["onChange"];
6
+ rowKey: Props<T>["rowKey"];
7
+ renderItem?: (item: T, index: number) => React.ReactNode;
8
+ activationConstraint?: Props<T>["activationConstraint"];
9
+ }
10
+ declare const SortableList: React.FC<SortableListProps<any>>;
11
+ export default SortableList;
@@ -54,8 +54,8 @@ var SortableList = (props) => {
54
54
  activationConstraint
55
55
  },
56
56
  (params) => {
57
- const { item, props: p, attributes, listeners, style } = params;
58
- return /* @__PURE__ */ import_react.default.createElement("div", { ...p, ...attributes, ...listeners, style }, renderItem == null ? void 0 : renderItem(item));
57
+ const { item, index, props: p, attributes, listeners, style } = params;
58
+ return /* @__PURE__ */ import_react.default.createElement("div", { ...p, ...attributes, ...listeners, style }, renderItem == null ? void 0 : renderItem(item, index));
59
59
  }
60
60
  );
61
61
  };
@@ -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 {};
@@ -27,6 +27,11 @@ var import_locales = require("../../../../../../../locales/index");
27
27
  var import_serve = require("../../../../../serve");
28
28
  var import_status = require("../../../../../status");
29
29
  var import_file = require("../../utils/file");
30
+ var exportImportTypeMap = {
31
+ "current-page": "page",
32
+ "all-records": "all",
33
+ "selected-records": "select"
34
+ };
30
35
  var _batchExport = async (params) => {
31
36
  let { status } = await (0, import_serve.exportData)(params);
32
37
  if (status) {
@@ -42,7 +47,7 @@ var _batchExport = async (params) => {
42
47
  var batchExport = (exportParams, exportImport) => {
43
48
  const { selectLists, apiUrl, otherParams } = exportImport;
44
49
  let _name = (0, import_file.getFileDateName)();
45
- let params = { ...otherParams };
50
+ let params = (otherParams == null ? void 0 : otherParams.export) ? { ...otherParams == null ? void 0 : otherParams.export } : { ...otherParams };
46
51
  params.url = apiUrl == null ? void 0 : apiUrl.export;
47
52
  console.log("exportParams", exportParams);
48
53
  const type = (exportParams == null ? void 0 : exportParams.type) || import_status.defaultOptions.exportType;
@@ -74,6 +79,7 @@ var batchExport = (exportParams, exportImport) => {
74
79
  } else {
75
80
  params == null ? true : delete params.ids;
76
81
  }
82
+ params.export_select = exportImportTypeMap[type];
77
83
  return _batchExport(params);
78
84
  };
79
85
  // Annotate the CommonJS export names for ESM import in node:
@@ -63,6 +63,7 @@ var ExportImport = ({ exportImport }) => {
63
63
  const [type, setType] = (0, import_react.useState)(import_status.defaultOptions.exportType);
64
64
  const [value, setValue] = (0, import_react.useState)("");
65
65
  const [errorStatus, setErrorStatus] = (0, import_react.useState)();
66
+ const [loading, setLoading] = (0, import_react.useState)(false);
66
67
  const { state } = (0, import_hooks.useSharedState)(import_model.Context);
67
68
  const { originResultDataSource, currentDataSource } = state;
68
69
  const context = (0, import_useEngineContext.default)();
@@ -142,33 +143,43 @@ var ExportImport = ({ exportImport }) => {
142
143
  });
143
144
  const onOk = async () => {
144
145
  const { apiUrl, otherParams } = exportImport;
145
- if (value === import_status.defaultOptions.exportValue) {
146
- const _params = {
147
- type,
148
- originDataSource: originResultDataSource,
149
- currentDataSource
150
- };
151
- const result = await (0, import_function.batchExport)(_params, exportImport);
152
- if (result) {
153
- onCancel();
154
- }
155
- } else if (value === import_status.defaultOptions.importValue) {
156
- const formData = new FormData();
157
- formData.append("file", file);
158
- const formId = otherParams == null ? void 0 : otherParams.form_id;
159
- const formCode = otherParams == null ? void 0 : otherParams.code;
160
- if (formId) {
161
- formData.append("form_id", formId);
162
- }
163
- if (formCode) {
164
- formData.append("code", formCode);
165
- }
166
- formData.append("url", (apiUrl == null ? void 0 : apiUrl.export) || "");
167
- if (formData) {
168
- import_antd.message.loading({ content: "Loading...", key: value });
169
- _batchImport.run(formData);
146
+ setLoading(true);
147
+ try {
148
+ if (value === import_status.defaultOptions.exportValue) {
149
+ const _params = {
150
+ type,
151
+ originDataSource: originResultDataSource,
152
+ currentDataSource
153
+ };
154
+ const result = await (0, import_function.batchExport)(_params, exportImport);
155
+ if (result) {
156
+ onCancel();
157
+ }
158
+ } else if (value === import_status.defaultOptions.importValue) {
159
+ const formData = new FormData();
160
+ formData.append("file", file);
161
+ const formId = otherParams == null ? void 0 : otherParams.form_id;
162
+ const formCode = otherParams == null ? void 0 : otherParams.code;
163
+ if (formId) {
164
+ formData.append("form_id", formId);
165
+ }
166
+ if (formCode) {
167
+ formData.append("code", formCode);
168
+ }
169
+ formData.append("url", (apiUrl == null ? void 0 : apiUrl.import) || "");
170
+ if (otherParams.import) {
171
+ Object.entries(otherParams.import).forEach(([key, value2]) => {
172
+ formData.append(key, value2);
173
+ });
174
+ }
175
+ if (formData) {
176
+ import_antd.message.loading({ content: "Loading...", key: value });
177
+ await _batchImport.run(formData);
178
+ }
170
179
  }
180
+ } catch (error) {
171
181
  }
182
+ setLoading(false);
172
183
  };
173
184
  return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
174
185
  import_antd.Dropdown,
@@ -196,6 +207,7 @@ var ExportImport = ({ exportImport }) => {
196
207
  onOk,
197
208
  cancelText: (0, import_locales.getText)("table-action-export-import-cancel"),
198
209
  okButtonProps: {
210
+ loading,
199
211
  disabled: value === import_status.defaultOptions.importValue && (!file || !!errorStatus)
200
212
  }
201
213
  },
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import './index.less';
3
+ declare const _default: React.NamedExoticComponent<any>;
4
+ export default _default;
@@ -71,10 +71,13 @@ var GridViewTable = ({
71
71
  payload: newData
72
72
  });
73
73
  });
74
- const handleResize = (index) => (e, { size }) => {
75
- const nextColumns = [...columns];
76
- nextColumns[index] = {
77
- ...nextColumns[index],
74
+ const handleResize = (index, record) => (e, { size }) => {
75
+ const findIndex = column_setting.findIndex(
76
+ (item) => item.dataIndex === record.dataIndex
77
+ );
78
+ const nextColumns = [...column_setting];
79
+ nextColumns[findIndex] = {
80
+ ...nextColumns[findIndex],
78
81
  width: size.width
79
82
  };
80
83
  form.setFieldValue("column_setting", nextColumns);
@@ -108,6 +111,7 @@ var GridViewTable = ({
108
111
  const components = (0, import_useGenTableComponents.default)({
109
112
  form
110
113
  });
114
+ console.log(columns, "columns12");
111
115
  const showTotal = (0, import_react.useCallback)(
112
116
  (total, range, pageSize) => {
113
117
  let start = range[0] - 1;
@@ -0,0 +1,14 @@
1
+ import { FormInstance } from "antd/es/form";
2
+ declare type UseTransColumnsProps = {
3
+ columns: Record<string, any>[];
4
+ form: FormInstance;
5
+ localPagination: boolean;
6
+ handleSave?: (row: Record<string, any>) => void;
7
+ handleResize?: (index: number, record: Record<string, any>) => (e: any, p2: any) => void;
8
+ dragSort: boolean;
9
+ bordered: boolean;
10
+ };
11
+ declare const useTransColumns: (params: UseTransColumnsProps) => {
12
+ columns: any[];
13
+ };
14
+ export default useTransColumns;
@@ -196,7 +196,7 @@ var useTransColumns = (params) => {
196
196
  onHeaderCell: (record) => ({
197
197
  record,
198
198
  ...item,
199
- onResize: handleResize == null ? void 0 : handleResize(index),
199
+ onResize: handleResize == null ? void 0 : handleResize(index, record),
200
200
  position
201
201
  })
202
202
  };
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import './index.less';
3
+ declare const _default: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<unknown>>;
4
+ export default _default;
@@ -266,7 +266,9 @@ var GridView = (0, import_model.Provider)(
266
266
  try {
267
267
  if (!tableId) return {};
268
268
  const setting = (0, import_utils.getTableSettingByCurrentViewMode)(tableId, currentViewMode);
269
- return (setting == null ? void 0 : setting.filters) || {};
269
+ const filters = (setting == null ? void 0 : setting.filters) || {};
270
+ filters.order_by = (setting == null ? void 0 : setting.order_by) || "";
271
+ return filters;
270
272
  } catch (e) {
271
273
  return {};
272
274
  }
@@ -0,0 +1,13 @@
1
+ declare type exportParams = {
2
+ ids?: Array<string | number>;
3
+ file_name?: string;
4
+ form_id?: string | number;
5
+ code?: string;
6
+ url?: string;
7
+ };
8
+ export declare const exportData: (params: exportParams) => Promise<any>;
9
+ export declare const batchImport: (params: any) => Promise<any>;
10
+ export declare const importTemplate: (params: exportParams) => Promise<any>;
11
+ export declare const getExportFile: (params: any) => Promise<any>;
12
+ export declare const getImportLog: (params: any) => Promise<any>;
13
+ export {};
@@ -35,6 +35,14 @@ var defaultUrl = {
35
35
  template: "/shop/form/data/download-template"
36
36
  };
37
37
  var formatApiParams = (params, type) => {
38
+ if (params instanceof FormData) {
39
+ let url = params.get("url");
40
+ params.delete("url");
41
+ return {
42
+ url: url || (defaultUrl == null ? void 0 : defaultUrl[type]),
43
+ params
44
+ };
45
+ }
38
46
  const _url = (params == null ? void 0 : params.url) || (defaultUrl == null ? void 0 : defaultUrl[type]);
39
47
  let _params = { ...params };
40
48
  delete _params.url;
@@ -0,0 +1,17 @@
1
+ import { Component } from 'react';
2
+ import { TabsProps } from 'antd';
3
+ import './index.less';
4
+ declare class Tabs extends Component<any> {
5
+ state: {
6
+ activeKey: any;
7
+ };
8
+ componentDidMount(): void;
9
+ componentDidUpdate(prevProps: Readonly<any>): void;
10
+ private _handleChange;
11
+ setActiveKey: (key: string) => void;
12
+ getActiveKey: () => any;
13
+ renderIconLabelTabBar: TabsProps['renderTabBar'];
14
+ filterHiddenTabs: (tabs: any[]) => any[];
15
+ render(): JSX.Element;
16
+ }
17
+ export default Tabs;
@@ -46,6 +46,11 @@ var Tabs = class extends import_react.Component {
46
46
  componentDidMount() {
47
47
  document.body.id = "body";
48
48
  }
49
+ componentDidUpdate(prevProps) {
50
+ if (prevProps.activeKey !== this.props.activeKey) {
51
+ this.setState({ activeKey: this.props.activeKey });
52
+ }
53
+ }
49
54
  _handleChange = (key) => {
50
55
  this.setActiveKey(key);
51
56
  };
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { AmountProps, RightItemsStyleProps } from './types';
3
2
  import './index.less';
4
3
  export type { AmountProps, RightItemsStyleProps };
@@ -1,19 +1,19 @@
1
1
  import React from 'react';
2
2
  import './index.less';
3
- declare global {
4
- namespace JSX {
5
- interface IntrinsicElements {
6
- [elemName: string]: any;
7
- }
8
- }
9
- }
10
3
  export interface WalletCardItem {
11
- key: string;
12
- label?: string;
13
- hidden?: boolean;
4
+ type: string;
5
+ custom_title?: string | {
6
+ original: string;
7
+ en: string;
8
+ 'zh-CN': string;
9
+ 'zh-HK': string;
10
+ };
11
+ display?: 0 | 1;
14
12
  value?: number;
15
13
  }
16
14
  export interface WalletCardProps {
15
+ /** 钱包ID */
16
+ id?: string;
17
17
  /** 二维码弹窗适配平台 */
18
18
  platform?: 'pc' | 'h5' | 'ipad';
19
19
  /** 卡片主题 */
@@ -21,7 +21,7 @@ export interface WalletCardProps {
21
21
  /** 默认还是完整显示code */
22
22
  cardStyle?: 'normal' | 'full';
23
23
  /** 条形码还是二维码 */
24
- codeType?: 'barCode' | 'orCode';
24
+ codeType?: 'barCode' | 'qrCode';
25
25
  /** 二维码方向 */
26
26
  codeDirection?: 'bottom' | 'top';
27
27
  /** 自定义背景图 */
@@ -53,7 +53,7 @@ var DEFAULT_PROPS = {
53
53
  showWalletName: true,
54
54
  shopName: "Store name",
55
55
  showShopName: true,
56
- cardNo: "Wallet number",
56
+ cardNo: "WL0000000001",
57
57
  cardStyle: "normal",
58
58
  codeType: "barCode",
59
59
  platform: "pc",
@@ -64,24 +64,44 @@ var DEFAULT_PROPS = {
64
64
  isLogin: true,
65
65
  items: [
66
66
  {
67
- key: "rechargeable",
68
- label: "rechargeable",
69
- value: 0
67
+ type: "rechargeable",
68
+ display: 1,
69
+ custom_title: {
70
+ original: "Balance",
71
+ "zh-CN": "充值卡",
72
+ "zh-HK": "充值卡",
73
+ en: "Balance"
74
+ }
70
75
  },
71
76
  {
72
- key: "piont",
73
- label: "piont",
74
- value: 10
77
+ type: "point",
78
+ display: 1,
79
+ custom_title: {
80
+ original: "Points",
81
+ "zh-CN": "积分卡",
82
+ "zh-HK": "積分卡",
83
+ en: "Points"
84
+ }
75
85
  },
76
86
  {
77
- key: "voucher",
78
- label: "Discount cardvoucher",
79
- value: 0
87
+ type: "voucher",
88
+ display: 1,
89
+ custom_title: {
90
+ original: "Voucher",
91
+ "zh-CN": "代金券",
92
+ "zh-HK": "代金券",
93
+ en: "Voucher"
94
+ }
80
95
  },
81
96
  {
82
- key: "discount",
83
- label: "discount",
84
- value: 0
97
+ type: "discount",
98
+ display: 1,
99
+ custom_title: {
100
+ original: "Discount",
101
+ "zh-CN": "折扣卡",
102
+ "zh-HK": "折扣卡",
103
+ en: "Discount"
104
+ }
85
105
  }
86
106
  ]
87
107
  };
@@ -101,7 +121,7 @@ var useCodeModal = (cardNo, onCodeClick, codeType) => {
101
121
  e.stopPropagation();
102
122
  if ((_b = (_a2 = interaction == null ? void 0 : interaction.utils) == null ? void 0 : _a2.isAppEnv) == null ? void 0 : _b.call(_a2)) {
103
123
  const typeMap = {
104
- orCode: "qrCode",
124
+ qrCode: "qrCode",
105
125
  barCode: "barCode"
106
126
  };
107
127
  (_d = (_c = interaction == null ? void 0 : interaction.utils) == null ? void 0 : _c.postMessageToApp) == null ? void 0 : _d.call(_c, {
@@ -188,8 +208,12 @@ var CardHeader = ({
188
208
  )));
189
209
  };
190
210
  var CardItem = ({ item, symbol }) => {
191
- const { key, label, value } = item;
192
- return /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-wallet-card-item" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-wallet-card-item-label" }, (0, import_locales.getText)(`walletCard-${label}`) || ""), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-wallet-card-item-value" }, key === "rechargeable" ? /* @__PURE__ */ import_react.default.createElement(
211
+ var _a;
212
+ const { type, custom_title, value } = item;
213
+ const context = (0, import_useEngineContext.default)();
214
+ const utils = (_a = context == null ? void 0 : context.appHelper) == null ? void 0 : _a.utils;
215
+ const translationOriginal = (utils == null ? void 0 : utils.translationOriginal) || (utils == null ? void 0 : utils.translation);
216
+ return /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-wallet-card-item" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-wallet-card-item-label" }, translationOriginal(custom_title || "") || ""), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-wallet-card-item-value" }, type === "rechargeable" ? /* @__PURE__ */ import_react.default.createElement(
193
217
  import_Amount.default,
194
218
  {
195
219
  className: "pisell-card-amount-item-value",
@@ -199,27 +223,19 @@ var CardItem = ({ item, symbol }) => {
199
223
  showCurrencySymbol: true,
200
224
  value
201
225
  }
202
- ) : value));
226
+ ) : value || "0"));
203
227
  };
204
228
  var CardContent = ({ items, symbol }) => {
205
- const expectedOrder = ["piont", "balance", "discount", "voucher"];
206
- const sortedItems = (0, import_react.useMemo)(() => {
207
- if (!(items == null ? void 0 : items.length)) return [];
208
- return [...items].sort((a, b) => {
209
- const indexA = expectedOrder.indexOf(a.key);
210
- const indexB = expectedOrder.indexOf(b.key);
211
- return indexA - indexB;
212
- });
213
- }, [items]);
229
+ const filteredItems = (items || []).filter((item) => item.display !== 0);
214
230
  return /* @__PURE__ */ import_react.default.createElement(
215
231
  "div",
216
232
  {
217
233
  className: "pisell-wallet-card-list",
218
234
  style: {
219
- justifyContent: (sortedItems || []).length > 1 ? "space-between" : "flex-start"
235
+ justifyContent: filteredItems.length > 1 ? "space-between" : "flex-start"
220
236
  }
221
237
  },
222
- (sortedItems || []).map((item, index) => /* @__PURE__ */ import_react.default.createElement(CardItem, { key: index, item, symbol }))
238
+ filteredItems.map((item, index) => /* @__PURE__ */ import_react.default.createElement(CardItem, { key: index, item, symbol }))
223
239
  );
224
240
  };
225
241
  var CodeDisplay = ({ codeType, cardNo }) => {
@@ -336,7 +352,9 @@ var WalletCard = (props) => {
336
352
  }
337
353
  utils == null ? void 0 : utils.action({
338
354
  type: "pisell1.goWallet",
339
- data: {},
355
+ data: {
356
+ id: props.id
357
+ },
340
358
  callback: () => {
341
359
  }
342
360
  });