@pisell/private-materials 6.3.99 → 6.3.101

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 (113) 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 +1 -1
  6. package/build/lowcode/preview.js +7 -7
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +8 -8
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +9 -9
  11. package/es/components/booking/components/footer/index.js +26 -20
  12. package/es/components/booking/info/header/index.js +7 -7
  13. package/es/components/booking/info/header/index.less +5 -5
  14. package/es/components/ecocup/components/AddCustomerModal/index.js +3 -3
  15. package/es/components/ecocup/components/CupInfoCard/index.d.ts +3 -1
  16. package/es/components/ecocup/components/CupInfoCard/index.js +4 -2
  17. package/es/components/ecocup/components/CupStatusModal/hooks.d.ts +32 -1
  18. package/es/components/ecocup/components/CupStatusModal/hooks.js +109 -1
  19. package/es/components/ecocup/components/CupStatusModal/index.js +164 -30
  20. package/es/components/ecocup/components/CupStatusModal/index.less +48 -10
  21. package/es/components/ecocup/components/CustomerAndCupModal/index.js +1 -1
  22. package/es/components/ecocup/components/CustomerCard/index.d.ts +3 -1
  23. package/es/components/ecocup/components/CustomerCard/index.js +9 -6
  24. package/es/components/ecocup/components/PageHeader/index.d.ts +2 -0
  25. package/es/components/ecocup/components/PageHeader/index.js +15 -5
  26. package/es/components/ecocup/components/PageHeader/index.less +16 -4
  27. package/es/components/ecocup/components/SearchBar/index.d.ts +1 -0
  28. package/es/components/ecocup/components/SearchBar/index.js +33 -3
  29. package/es/components/ecocup/components/SettingModal/const.d.ts +6 -0
  30. package/es/components/ecocup/components/SettingModal/const.js +17 -0
  31. package/es/components/ecocup/components/SettingModal/index.d.ts +9 -0
  32. package/es/components/ecocup/components/SettingModal/index.js +253 -0
  33. package/es/components/ecocup/components/SettingModal/index.less +9 -0
  34. package/es/components/ecocup/cupList/const.d.ts +8 -1
  35. package/es/components/ecocup/cupList/const.js +14 -1
  36. package/es/components/ecocup/cupList/hooks/index.d.ts +2 -2
  37. package/es/components/ecocup/cupList/hooks/index.js +2 -2
  38. package/es/components/ecocup/cupList/hooks/useColumns.d.ts +2 -1
  39. package/es/components/ecocup/cupList/hooks/useColumns.js +4 -6
  40. package/es/components/ecocup/cupList/hooks/useCupApi.d.ts +12 -3
  41. package/es/components/ecocup/cupList/hooks/useCupApi.js +148 -8
  42. package/es/components/ecocup/cupList/hooks/useSummary.js +9 -7
  43. package/es/components/ecocup/cupList/index.js +60 -12
  44. package/es/components/ecocup/cupList/index.less +62 -16
  45. package/es/components/ecocup/cupProject/const.js +8 -2
  46. package/es/components/ecocup/cupProject/index.js +10 -1
  47. package/es/components/ecocup/hooks.d.ts +8 -0
  48. package/es/components/ecocup/hooks.js +29 -12
  49. package/es/components/ecocup/locales.d.ts +93 -3
  50. package/es/components/ecocup/locales.js +124 -25
  51. package/es/components/ecocup/utils/download.d.ts +7 -0
  52. package/es/components/ecocup/utils/download.js +34 -0
  53. package/es/components/ecocup/utils/index.d.ts +2 -0
  54. package/es/components/ecocup/utils/index.js +2 -0
  55. package/es/components/eftpos/hooks.d.ts +1 -0
  56. package/es/components/eftposPay/hooks.d.ts +1 -1
  57. package/es/components/eftposPay/store/index.d.ts +1 -1
  58. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +1 -0
  59. package/es/hooks/useLocale.js +8 -1
  60. package/es/pro/comprehensiveSearch/components/searchSection/index.js +3 -2
  61. package/lib/components/booking/components/footer/index.js +5 -0
  62. package/lib/components/booking/info/header/index.js +7 -7
  63. package/lib/components/booking/info/header/index.less +5 -5
  64. package/lib/components/ecocup/components/AddCustomerModal/index.js +2 -2
  65. package/lib/components/ecocup/components/CupInfoCard/index.d.ts +3 -1
  66. package/lib/components/ecocup/components/CupInfoCard/index.js +2 -2
  67. package/lib/components/ecocup/components/CupStatusModal/hooks.d.ts +32 -1
  68. package/lib/components/ecocup/components/CupStatusModal/hooks.js +62 -2
  69. package/lib/components/ecocup/components/CupStatusModal/index.js +103 -22
  70. package/lib/components/ecocup/components/CupStatusModal/index.less +48 -10
  71. package/lib/components/ecocup/components/CustomerAndCupModal/index.js +1 -1
  72. package/lib/components/ecocup/components/CustomerCard/index.d.ts +3 -1
  73. package/lib/components/ecocup/components/CustomerCard/index.js +13 -3
  74. package/lib/components/ecocup/components/PageHeader/index.d.ts +2 -0
  75. package/lib/components/ecocup/components/PageHeader/index.js +10 -3
  76. package/lib/components/ecocup/components/PageHeader/index.less +16 -4
  77. package/lib/components/ecocup/components/SearchBar/index.d.ts +1 -0
  78. package/lib/components/ecocup/components/SearchBar/index.js +15 -2
  79. package/lib/components/ecocup/components/SettingModal/const.d.ts +6 -0
  80. package/lib/components/ecocup/components/SettingModal/const.js +48 -0
  81. package/lib/components/ecocup/components/SettingModal/index.d.ts +9 -0
  82. package/lib/components/ecocup/components/SettingModal/index.js +199 -0
  83. package/lib/components/ecocup/components/SettingModal/index.less +9 -0
  84. package/lib/components/ecocup/cupList/const.d.ts +8 -1
  85. package/lib/components/ecocup/cupList/const.js +18 -0
  86. package/lib/components/ecocup/cupList/hooks/index.d.ts +2 -2
  87. package/lib/components/ecocup/cupList/hooks/index.js +4 -0
  88. package/lib/components/ecocup/cupList/hooks/useColumns.d.ts +2 -1
  89. package/lib/components/ecocup/cupList/hooks/useColumns.js +2 -4
  90. package/lib/components/ecocup/cupList/hooks/useCupApi.d.ts +12 -3
  91. package/lib/components/ecocup/cupList/hooks/useCupApi.js +123 -8
  92. package/lib/components/ecocup/cupList/hooks/useSummary.js +22 -14
  93. package/lib/components/ecocup/cupList/index.js +70 -16
  94. package/lib/components/ecocup/cupList/index.less +62 -16
  95. package/lib/components/ecocup/cupProject/const.js +8 -1
  96. package/lib/components/ecocup/cupProject/index.js +10 -1
  97. package/lib/components/ecocup/hooks.d.ts +8 -0
  98. package/lib/components/ecocup/hooks.js +18 -4
  99. package/lib/components/ecocup/locales.d.ts +93 -3
  100. package/lib/components/ecocup/locales.js +118 -25
  101. package/lib/components/ecocup/utils/download.d.ts +7 -0
  102. package/lib/components/ecocup/utils/download.js +47 -0
  103. package/lib/components/ecocup/utils/index.d.ts +2 -0
  104. package/lib/components/ecocup/utils/index.js +42 -0
  105. package/lib/components/eftpos/hooks.d.ts +1 -0
  106. package/lib/components/eftposPay/hooks.d.ts +1 -1
  107. package/lib/components/eftposPay/store/index.d.ts +1 -1
  108. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +1 -0
  109. package/lib/hooks/useLocale.js +7 -2
  110. package/lib/pro/comprehensiveSearch/components/searchSection/index.js +3 -2
  111. package/lowcode/eco-cup-list/meta.ts +1 -1
  112. package/lowcode/eco-customer-list/meta.ts +1 -1
  113. package/package.json +3 -3
@@ -42,6 +42,7 @@ var import_hooks = require("../../hooks");
42
42
  var import_const = require("./const");
43
43
  var import_hooks2 = require("./hooks");
44
44
  var import_CupStatusModal = __toESM(require("../CupStatusModal"));
45
+ var import_types = require("../../types");
45
46
  var import_dayjs = __toESM(require("dayjs"));
46
47
  var SearchBar = (props) => {
47
48
  var _a;
@@ -52,7 +53,8 @@ var SearchBar = (props) => {
52
53
  onSearch,
53
54
  searchType,
54
55
  onSearchResult,
55
- customerId
56
+ customerId,
57
+ onCupStatusValidate
56
58
  } = props;
57
59
  const [value, setValue] = (0, import_react.useState)("");
58
60
  const [searchResult, setSearchResult] = (0, import_react.useState)(null);
@@ -61,6 +63,7 @@ var SearchBar = (props) => {
61
63
  const searchHook = (0, import_hooks2.useSearch)();
62
64
  const { getCupScanStatus } = (0, import_hooks2.useCupScanStatus)();
63
65
  const cupStatusModal = (0, import_hooks.useModal)("ecocup-cup-status-modal");
66
+ const shopId = (0, import_hooks.useGetShopId)();
64
67
  const onSelectResult = (0, import_ahooks.useMemoizedFn)(
65
68
  (type, item) => {
66
69
  setSearchResult(null);
@@ -85,6 +88,16 @@ var SearchBar = (props) => {
85
88
  if ((res == null ? void 0 : res.type) === "cup") {
86
89
  const _cupData = ((_a2 = res == null ? void 0 : res.data) == null ? void 0 : _a2[0]) || null;
87
90
  const scanStatus = getCupScanStatus(_cupData, customerId);
91
+ console.log(scanStatus, _cupData, shopId, "sjdhfjj");
92
+ if (onCupStatusValidate) {
93
+ if (scanStatus && scanStatus === import_types.ECupScanStatus.OTHER_RENT) {
94
+ onCupStatusValidate == null ? void 0 : onCupStatusValidate({
95
+ data: _cupData || { code: str }
96
+ });
97
+ setValue("");
98
+ return;
99
+ }
100
+ }
88
101
  if (scanStatus) {
89
102
  cupStatusModal.open({
90
103
  data: {
@@ -206,7 +219,7 @@ var SearchBar = (props) => {
206
219
  /* @__PURE__ */ import_react.default.createElement("div", null, create_time ? (0, import_dayjs.default)(create_time).format("DD/MM/YYYY") : "-"),
207
220
  /* @__PURE__ */ import_react.default.createElement("div", null, phone ? `(${country_calling_code}) ${phone}` : "-"),
208
221
  /* @__PURE__ */ import_react.default.createElement("div", null, email || "-"),
209
- /* @__PURE__ */ import_react.default.createElement("div", null, /* @__PURE__ */ import_react.default.createElement("span", { className: "ecocup-cup-search-bar-result-content-item-membership" }, ((_a2 = tags == null ? void 0 : tags.find) == null ? void 0 : _a2.call(tags, (v) => (v == null ? void 0 : v.name) == "admin")) ? "Admin" : ((_b = tags == null ? void 0 : tags.find) == null ? void 0 : _b.call(tags, (v) => (v == null ? void 0 : v.name) == "business")) ? "Business" : "Normal"))
222
+ /* @__PURE__ */ import_react.default.createElement("div", null, /* @__PURE__ */ import_react.default.createElement("span", { className: "ecocup-cup-search-bar-result-content-item-membership" }, ((_a2 = tags == null ? void 0 : tags.find) == null ? void 0 : _a2.call(tags, (v) => (v == null ? void 0 : v.name) == "admin")) ? "Admin" : ((_b = tags == null ? void 0 : tags.find) == null ? void 0 : _b.call(tags, (v) => (v == null ? void 0 : v.name) == "business")) ? "Business" : "Regular"))
210
223
  );
211
224
  }))) : null, cupStatusModal.visible && /* @__PURE__ */ import_react.default.createElement(import_CupStatusModal.default, { ...cupStatusModal.modalProps }));
212
225
  };
@@ -0,0 +1,6 @@
1
+ export declare const formItemsConfig: {
2
+ name: string;
3
+ labelKey: string;
4
+ placeholderKey: string;
5
+ requiredMessageKey: string;
6
+ }[];
@@ -0,0 +1,48 @@
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/ecocup/components/SettingModal/const.ts
20
+ var const_exports = {};
21
+ __export(const_exports, {
22
+ formItemsConfig: () => formItemsConfig
23
+ });
24
+ module.exports = __toCommonJS(const_exports);
25
+ var formItemsConfig = [
26
+ {
27
+ name: "regular",
28
+ labelKey: "pisell2.text.ecocup.setting.regular",
29
+ placeholderKey: "pisell2.text.ecocup.setting.regular-placeholder",
30
+ requiredMessageKey: "pisell2.text.ecocup.setting.regular-required"
31
+ },
32
+ {
33
+ name: "business",
34
+ labelKey: "pisell2.text.ecocup.setting.business",
35
+ placeholderKey: "pisell2.text.ecocup.setting.business-placeholder",
36
+ requiredMessageKey: "pisell2.text.ecocup.setting.business-required"
37
+ },
38
+ {
39
+ name: "admin",
40
+ labelKey: "pisell2.text.ecocup.setting.admin",
41
+ placeholderKey: "pisell2.text.ecocup.setting.admin-placeholder",
42
+ requiredMessageKey: "pisell2.text.ecocup.setting.admin-required"
43
+ }
44
+ ];
45
+ // Annotate the CommonJS export names for ESM import in node:
46
+ 0 && (module.exports = {
47
+ formItemsConfig
48
+ });
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import './index.less';
3
+ interface IProps {
4
+ visible: boolean;
5
+ data?: Record<string, any>;
6
+ onCancel: () => void;
7
+ }
8
+ declare const SettingModal: (props: IProps) => React.JSX.Element;
9
+ export default SettingModal;
@@ -0,0 +1,199 @@
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/ecocup/components/SettingModal/index.tsx
30
+ var SettingModal_exports = {};
31
+ __export(SettingModal_exports, {
32
+ default: () => SettingModal_default
33
+ });
34
+ module.exports = __toCommonJS(SettingModal_exports);
35
+ var import_react = __toESM(require("react"));
36
+ var import_materials = require("@pisell/materials");
37
+ var import_utils = require("@pisell/utils");
38
+ var import_antd = require("antd");
39
+ var import_index = require("./index.less");
40
+ var import_hooks = require("../../hooks");
41
+ var import_const = require("./const");
42
+ var SettingModal = (props) => {
43
+ const { visible, onCancel } = props;
44
+ const [form] = import_antd.Form.useForm();
45
+ const { post, get } = (0, import_hooks.useRequest)();
46
+ const [loading, setLoading] = (0, import_react.useState)(false);
47
+ const _onCancel = () => {
48
+ if (loading) return;
49
+ onCancel == null ? void 0 : onCancel();
50
+ form.resetFields();
51
+ };
52
+ const _onOk = async () => {
53
+ if (loading) return;
54
+ try {
55
+ const values = await form.validateFields();
56
+ const result = await postSetting(values);
57
+ if (!result) {
58
+ return;
59
+ }
60
+ _onCancel();
61
+ } catch (error) {
62
+ console.error(error);
63
+ }
64
+ };
65
+ const getSetting = async () => {
66
+ const params = {
67
+ keys: ["eco_cup_customer_rent_config", "eco_cup_rent_expire_config"]
68
+ };
69
+ const res = await get("/shop/metadata/many", params);
70
+ if ((res == null ? void 0 : res.code) == 200) {
71
+ const { data } = res;
72
+ const expireConfig = (data == null ? void 0 : data.eco_cup_rent_expire_config) || {};
73
+ const rentConfig = (data == null ? void 0 : data.eco_cup_customer_rent_config) || [];
74
+ const formValues = {
75
+ expire: (expireConfig == null ? void 0 : expireConfig.expire) || 30
76
+ };
77
+ rentConfig.forEach((item) => {
78
+ if (item == null ? void 0 : item.name) {
79
+ formValues[item.name] = Number(item == null ? void 0 : item.max_rent_count) || void 0;
80
+ }
81
+ });
82
+ form.setFieldsValue(formValues);
83
+ }
84
+ };
85
+ (0, import_react.useEffect)(() => {
86
+ getSetting();
87
+ }, []);
88
+ const postSetting = async (values) => {
89
+ const { expire, ...membershipValues } = values;
90
+ const eco_cup_customer_rent_config = import_const.formItemsConfig.map((config) => ({
91
+ name: config.name,
92
+ max_rent_count: membershipValues[config.name]
93
+ }));
94
+ const params = {
95
+ eco_cup_customer_rent_config,
96
+ eco_cup_rent_expire_config: {
97
+ expire,
98
+ unit: "day"
99
+ }
100
+ };
101
+ try {
102
+ setLoading(true);
103
+ const res = await post("/shop/metadata/many", params);
104
+ if ((res == null ? void 0 : res.code) == 200) {
105
+ (0, import_materials.PisellToast)({
106
+ content: import_utils.locales.getText(
107
+ "pisell2.text.ecocup.setting.success"
108
+ )
109
+ });
110
+ return true;
111
+ }
112
+ return false;
113
+ } catch (error) {
114
+ console.error("提交设置失败:", error);
115
+ return false;
116
+ } finally {
117
+ setLoading(false);
118
+ }
119
+ };
120
+ return /* @__PURE__ */ import_react.default.createElement(
121
+ import_materials.PisellModal,
122
+ {
123
+ open: visible,
124
+ headerDivider: true,
125
+ title: import_utils.locales.getText("pisell2.text.cup-project.footer.button.setting"),
126
+ onCancel: _onCancel,
127
+ onOk: _onOk,
128
+ okText: import_utils.locales.getText("pisell2.text.ecocup.button.confirm"),
129
+ cancelText: import_utils.locales.getText("pisell2.text.ecocup.button.cancel"),
130
+ width: 680,
131
+ centered: true,
132
+ destroyOnClose: true,
133
+ wrapClassName: "pisell2-ecocup-add-customer-modal",
134
+ okButtonProps: { loading }
135
+ },
136
+ /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell2-ecocup-add-customer-modal-content" }, /* @__PURE__ */ import_react.default.createElement(import_antd.Form, { form, size: "large" }, import_const.formItemsConfig.map((config) => /* @__PURE__ */ import_react.default.createElement(
137
+ import_materials.FormItemInputNumber,
138
+ {
139
+ key: config.name,
140
+ renderMode: "edit",
141
+ name: config.name,
142
+ label: import_utils.locales.getText(config.labelKey),
143
+ placeholder: import_utils.locales.getText(config.placeholderKey),
144
+ maxobj: {
145
+ enabled: true,
146
+ max: 9999,
147
+ message: import_utils.locales.getText(
148
+ "pisell2.text.ecocup.setting.max-rent-count-max"
149
+ )
150
+ },
151
+ minobj: {
152
+ enabled: true,
153
+ min: 0,
154
+ message: import_utils.locales.getText(
155
+ "pisell2.text.ecocup.setting.max-rent-count-min"
156
+ )
157
+ },
158
+ requiredobj: {
159
+ required: true,
160
+ message: import_utils.locales.getText(config.requiredMessageKey)
161
+ }
162
+ }
163
+ )), /* @__PURE__ */ import_react.default.createElement(
164
+ import_materials.FormItemInputNumber,
165
+ {
166
+ renderMode: "edit",
167
+ name: "expire",
168
+ label: import_utils.locales.getText(
169
+ "pisell2.text.ecocup.setting.expire-time"
170
+ ),
171
+ placeholder: import_utils.locales.getText(
172
+ "pisell2.text.ecocup.setting.expire-time-placeholder"
173
+ ),
174
+ maxobj: {
175
+ enabled: true,
176
+ max: 365,
177
+ message: import_utils.locales.getText(
178
+ "pisell2.text.ecocup.setting.expire-time-max"
179
+ )
180
+ },
181
+ minobj: {
182
+ enabled: true,
183
+ min: 0,
184
+ message: import_utils.locales.getText(
185
+ "pisell2.text.ecocup.setting.expire-time-min"
186
+ )
187
+ },
188
+ suffix: import_utils.locales.getText("pisell2.text.ecocup.setting.days"),
189
+ requiredobj: {
190
+ required: true,
191
+ message: import_utils.locales.getText(
192
+ "pisell2.text.ecocup.setting.expire-time-required"
193
+ )
194
+ }
195
+ }
196
+ )))
197
+ );
198
+ };
199
+ var SettingModal_default = SettingModal;
@@ -0,0 +1,9 @@
1
+ .pisell2-ecocup-add-customer-modal-content {
2
+ padding: 24px 0;
3
+
4
+ .pisell2-ecocup-add-customer-modal-content-name-wrap {
5
+ display: flex;
6
+ flex-direction: row;
7
+ gap: 16px;
8
+ }
9
+ }
@@ -130,4 +130,11 @@ declare const FILTER: (locales: any, isNormalShop: boolean, ecoShopLists?: any,
130
130
  };
131
131
  })[];
132
132
  };
133
- export { STATUS_TEXT_MAP, STATUS_COLOR_MAP, SORT_SETTINGS, COLUMN_SETTING, FILTER, };
133
+ declare const HEADER_RIGHT_OPTIONS: {
134
+ languageKey: string;
135
+ key: string;
136
+ size: string;
137
+ icon: string;
138
+ type: string;
139
+ }[];
140
+ export { STATUS_TEXT_MAP, STATUS_COLOR_MAP, SORT_SETTINGS, COLUMN_SETTING, FILTER, HEADER_RIGHT_OPTIONS };
@@ -21,6 +21,7 @@ var const_exports = {};
21
21
  __export(const_exports, {
22
22
  COLUMN_SETTING: () => COLUMN_SETTING,
23
23
  FILTER: () => FILTER,
24
+ HEADER_RIGHT_OPTIONS: () => HEADER_RIGHT_OPTIONS,
24
25
  SORT_SETTINGS: () => SORT_SETTINGS,
25
26
  STATUS_COLOR_MAP: () => STATUS_COLOR_MAP,
26
27
  STATUS_TEXT_MAP: () => STATUS_TEXT_MAP
@@ -316,10 +317,27 @@ var FILTER = (locales, isNormalShop, ecoShopLists, isPartner, currentPagination)
316
317
  ]
317
318
  };
318
319
  };
320
+ var HEADER_RIGHT_OPTIONS = [
321
+ {
322
+ languageKey: "pisell2.text.ecocup.share.title",
323
+ key: "share",
324
+ size: "large",
325
+ icon: "pisell2-share-06",
326
+ type: "default"
327
+ },
328
+ {
329
+ languageKey: "pisell2.text.ecocup.export.title",
330
+ key: "export",
331
+ size: "large",
332
+ icon: "pisell2-download-01",
333
+ type: "default"
334
+ }
335
+ ];
319
336
  // Annotate the CommonJS export names for ESM import in node:
320
337
  0 && (module.exports = {
321
338
  COLUMN_SETTING,
322
339
  FILTER,
340
+ HEADER_RIGHT_OPTIONS,
323
341
  SORT_SETTINGS,
324
342
  STATUS_COLOR_MAP,
325
343
  STATUS_TEXT_MAP
@@ -1,4 +1,4 @@
1
1
  import { useColumns } from './useColumns';
2
2
  import { useSummary } from './useSummary';
3
- import { useCupListsApi, useStatisticsApi, useEcoShopListsApi } from './useCupApi';
4
- export { useColumns, useSummary, useCupListsApi, useStatisticsApi, useEcoShopListsApi, };
3
+ import { useCupListsApi, useStatisticsApi, useEcoShopListsApi, useExportApi, useShareApi } from './useCupApi';
4
+ export { useColumns, useSummary, useCupListsApi, useStatisticsApi, useEcoShopListsApi, useExportApi, useShareApi };
@@ -22,6 +22,8 @@ __export(hooks_exports, {
22
22
  useColumns: () => import_useColumns.useColumns,
23
23
  useCupListsApi: () => import_useCupApi.useCupListsApi,
24
24
  useEcoShopListsApi: () => import_useCupApi.useEcoShopListsApi,
25
+ useExportApi: () => import_useCupApi.useExportApi,
26
+ useShareApi: () => import_useCupApi.useShareApi,
25
27
  useStatisticsApi: () => import_useCupApi.useStatisticsApi,
26
28
  useSummary: () => import_useSummary.useSummary
27
29
  });
@@ -34,6 +36,8 @@ var import_useCupApi = require("./useCupApi");
34
36
  useColumns,
35
37
  useCupListsApi,
36
38
  useEcoShopListsApi,
39
+ useExportApi,
40
+ useShareApi,
37
41
  useStatisticsApi,
38
42
  useSummary
39
43
  });
@@ -3,6 +3,7 @@ import '../index.less';
3
3
  interface IProps {
4
4
  onClickAction: (type: string, record: any) => void;
5
5
  locales: any;
6
+ isEcoShare?: boolean;
6
7
  }
7
8
  export declare const useColumns: (props: IProps) => ({
8
9
  title: any;
@@ -35,7 +36,7 @@ export declare const useColumns: (props: IProps) => ({
35
36
  title: any;
36
37
  dataIndex: string;
37
38
  key: string;
38
- hidden: boolean;
39
+ hidden: boolean | undefined;
39
40
  width: number;
40
41
  render: (text: string, record: any) => React.JSX.Element | null;
41
42
  align?: undefined;
@@ -41,10 +41,8 @@ var import_hooks = require("../../hooks");
41
41
  var import__ = require("../index.less");
42
42
  var prefixCls = "ecocup-cup-list";
43
43
  var useColumns = (props) => {
44
- const { onClickAction, locales } = props;
45
- const { isNormalShop } = (0, import_hooks.useGetGoalShopInfo)();
44
+ const { onClickAction, locales, isEcoShare } = props;
46
45
  const isApp = (0, import_hooks.useIsApp)();
47
- const hiddenColumn = isApp ? false : isNormalShop;
48
46
  const getRelativeTime = (text) => {
49
47
  if (!text) return "";
50
48
  const diff = (0, import_dayjs.default)().diff((0, import_dayjs.default)(text), "day");
@@ -172,7 +170,7 @@ var useColumns = (props) => {
172
170
  title: locales.getText("pisell2.text.ecocup.table.actions"),
173
171
  dataIndex: "actions",
174
172
  key: "actions",
175
- hidden: isApp,
173
+ hidden: isApp || isEcoShare,
176
174
  width: 180,
177
175
  render: (text, record) => {
178
176
  const _status = (record == null ? void 0 : record.status) || "";
@@ -16,17 +16,26 @@ interface GetStatisticsParams {
16
16
  type?: 'eco' | 'normal';
17
17
  partner_shop_id?: number;
18
18
  }
19
- export declare const useCupListsApi: () => {
19
+ interface IProps {
20
+ isEcoShare?: boolean;
21
+ }
22
+ export declare const useCupListsApi: (props: IProps) => {
20
23
  loading: boolean;
21
24
  data: any;
22
25
  run: (params: GetCupListsParams) => Promise<void>;
23
26
  };
24
- export declare const useStatisticsApi: () => {
27
+ export declare const useStatisticsApi: (props: IProps) => {
25
28
  data: any;
26
29
  getStatics: (params: GetStatisticsParams) => Promise<void>;
27
30
  };
28
- export declare const useEcoShopListsApi: () => {
31
+ export declare const useEcoShopListsApi: (props: IProps) => {
29
32
  data: any;
30
33
  getEcoShopLists: (params?: any) => Promise<void>;
31
34
  };
35
+ export declare const useShareApi: () => {
36
+ postShareApi: () => Promise<void>;
37
+ };
38
+ export declare const useExportApi: () => {
39
+ postExportApi: (params?: any) => Promise<void>;
40
+ };
32
41
  export {};