@pisell/private-materials 6.3.100 → 6.3.102

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 (115) 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 +8 -8
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +9 -9
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +10 -10
  11. package/es/components/booking/info/header/index.js +7 -7
  12. package/es/components/booking/info/header/index.less +5 -5
  13. package/es/components/ecocup/components/AddCustomerModal/index.js +3 -3
  14. package/es/components/ecocup/components/CupInfoCard/index.d.ts +3 -1
  15. package/es/components/ecocup/components/CupInfoCard/index.js +4 -2
  16. package/es/components/ecocup/components/CupStatusModal/hooks.d.ts +32 -1
  17. package/es/components/ecocup/components/CupStatusModal/hooks.js +109 -1
  18. package/es/components/ecocup/components/CupStatusModal/index.js +164 -30
  19. package/es/components/ecocup/components/CupStatusModal/index.less +48 -10
  20. package/es/components/ecocup/components/CustomerAndCupModal/index.js +1 -1
  21. package/es/components/ecocup/components/CustomerCard/index.d.ts +3 -1
  22. package/es/components/ecocup/components/CustomerCard/index.js +9 -6
  23. package/es/components/ecocup/components/PageHeader/index.d.ts +2 -0
  24. package/es/components/ecocup/components/PageHeader/index.js +15 -5
  25. package/es/components/ecocup/components/PageHeader/index.less +16 -4
  26. package/es/components/ecocup/components/SearchBar/index.d.ts +1 -0
  27. package/es/components/ecocup/components/SearchBar/index.js +33 -3
  28. package/es/components/ecocup/components/SettingModal/const.d.ts +6 -0
  29. package/es/components/ecocup/components/SettingModal/const.js +17 -0
  30. package/es/components/ecocup/components/SettingModal/index.d.ts +9 -0
  31. package/es/components/ecocup/components/SettingModal/index.js +253 -0
  32. package/es/components/ecocup/components/SettingModal/index.less +9 -0
  33. package/es/components/ecocup/cupList/const.d.ts +8 -1
  34. package/es/components/ecocup/cupList/const.js +14 -1
  35. package/es/components/ecocup/cupList/hooks/index.d.ts +2 -2
  36. package/es/components/ecocup/cupList/hooks/index.js +2 -2
  37. package/es/components/ecocup/cupList/hooks/useColumns.d.ts +2 -1
  38. package/es/components/ecocup/cupList/hooks/useColumns.js +4 -6
  39. package/es/components/ecocup/cupList/hooks/useCupApi.d.ts +12 -3
  40. package/es/components/ecocup/cupList/hooks/useCupApi.js +148 -8
  41. package/es/components/ecocup/cupList/hooks/useSummary.js +9 -7
  42. package/es/components/ecocup/cupList/index.js +60 -12
  43. package/es/components/ecocup/cupList/index.less +62 -16
  44. package/es/components/ecocup/cupProject/const.js +8 -2
  45. package/es/components/ecocup/cupProject/index.js +10 -1
  46. package/es/components/ecocup/hooks.d.ts +8 -0
  47. package/es/components/ecocup/hooks.js +29 -12
  48. package/es/components/ecocup/locales.d.ts +93 -3
  49. package/es/components/ecocup/locales.js +124 -25
  50. package/es/components/ecocup/utils/download.d.ts +7 -0
  51. package/es/components/ecocup/utils/download.js +34 -0
  52. package/es/components/ecocup/utils/index.d.ts +2 -0
  53. package/es/components/ecocup/utils/index.js +2 -0
  54. package/es/hooks/useLocale.js +8 -1
  55. package/es/pro/Cards/components/SKUCard/index.d.ts +0 -1
  56. package/es/pro/Cards/components/SKUCard/index.js +0 -1
  57. package/es/pro/Cards/components/SKUCard/types.d.ts +2 -2
  58. package/es/pro/Login2.0/Login2.js +8 -8
  59. package/es/pro/Login2.0/locales.d.ts +5 -0
  60. package/es/pro/Login2.0/locales.js +5 -0
  61. package/es/pro/comprehensiveSearch/components/searchSection/index.js +3 -2
  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/hooks/useLocale.js +7 -2
  106. package/lib/pro/Cards/components/SKUCard/index.d.ts +0 -1
  107. package/lib/pro/Cards/components/SKUCard/index.js +0 -1
  108. package/lib/pro/Cards/components/SKUCard/types.d.ts +2 -2
  109. package/lib/pro/Login2.0/Login2.js +8 -8
  110. package/lib/pro/Login2.0/locales.d.ts +5 -0
  111. package/lib/pro/Login2.0/locales.js +5 -0
  112. package/lib/pro/comprehensiveSearch/components/searchSection/index.js +3 -2
  113. package/lowcode/eco-cup-list/meta.ts +1 -1
  114. package/lowcode/eco-customer-list/meta.ts +1 -1
  115. package/package.json +3 -3
@@ -38,7 +38,6 @@ var import_dayjs = __toESM(require("dayjs"));
38
38
  var import_materials = require("@pisell/materials");
39
39
  var import_utils = require("@pisell/utils");
40
40
  var import_icons = require("@ant-design/icons");
41
- var import_useEngineContext = require("../../../hooks/useEngineContext");
42
41
  var import_hooks = require("./hooks");
43
42
  var import_const = require("./const");
44
43
  var import_PageHeader = __toESM(require("../components/PageHeader"));
@@ -46,39 +45,51 @@ var import_CupActionModal = __toESM(require("../components/CupActionModal"));
46
45
  var import_SearchBar = __toESM(require("../components/SearchBar"));
47
46
  var import_hooks2 = require("../hooks");
48
47
  var import_locales = __toESM(require("../locales"));
48
+ var import_hooks3 = require("../hooks");
49
49
  var import_index = require("./index.less");
50
50
  var prefixCls = "ecocup-cup-list";
51
51
  var SCAN_LISTENER_KEY = "eco-cup-list-scan-listener";
52
52
  var PAGE_SIZE = 10;
53
53
  var FORMAT = "YYYY-MM-DD HH:mm:ss";
54
54
  var CupList = (props) => {
55
- const [date, setDate] = (0, import_react.useState)([(0, import_dayjs.default)().startOf("day"), (0, import_dayjs.default)().endOf("day")]);
55
+ const [date, setDate] = (0, import_react.useState)([
56
+ (0, import_dayjs.default)().startOf("day"),
57
+ (0, import_dayjs.default)().endOf("day")
58
+ ]);
56
59
  const cupActionModal = (0, import_hooks2.useModal)("ecocup-list-action-modal");
57
60
  const { isNormalShop } = (0, import_hooks2.useGetGoalShopInfo)();
61
+ const shopId = (0, import_hooks2.useGetShopId)();
58
62
  const isApp = (0, import_hooks2.useIsApp)();
59
- const platform = (0, import_useEngineContext.usePlatform)();
60
63
  const language = (0, import_hooks2.useLanguage)();
64
+ const { isEcoShare } = (0, import_hooks3.useGetShare)();
61
65
  import_utils.locales.init(import_locales.default, language);
62
66
  const [listParams, setListParams] = (0, import_react.useState)({
63
67
  skip: 1,
64
68
  num: PAGE_SIZE
65
69
  });
66
70
  const listParamsRef = (0, import_react.useRef)(listParams);
67
- const { loading, data, run } = (0, import_hooks.useCupListsApi)();
68
- const { data: staticsData, getStatics } = (0, import_hooks.useStatisticsApi)();
69
- const { data: ecoShopLists, getEcoShopLists } = (0, import_hooks.useEcoShopListsApi)();
71
+ const { loading, data, run } = (0, import_hooks.useCupListsApi)({ isEcoShare });
72
+ const { data: staticsData, getStatics } = (0, import_hooks.useStatisticsApi)({ isEcoShare });
73
+ const { data: ecoShopLists, getEcoShopLists } = (0, import_hooks.useEcoShopListsApi)({
74
+ isEcoShare
75
+ });
76
+ const { postExportApi } = (0, import_hooks.useExportApi)();
77
+ const { postShareApi } = (0, import_hooks.useShareApi)();
70
78
  const isPartner = (0, import_react.useMemo)(() => {
71
79
  return !!(isNormalShop || (listParams == null ? void 0 : listParams.partner_shop_id));
72
80
  }, [isNormalShop, listParams == null ? void 0 : listParams.partner_shop_id]);
73
81
  (0, import_react.useEffect)(() => {
74
82
  listParamsRef.current = listParams;
75
83
  }, [listParams]);
76
- const getLists = (0, import_react.useCallback)((params) => {
77
- run({
78
- ...(listParamsRef == null ? void 0 : listParamsRef.current) || {},
79
- ...params
80
- });
81
- }, [listParams]);
84
+ const getLists = (0, import_react.useCallback)(
85
+ (params) => {
86
+ run({
87
+ ...(listParamsRef == null ? void 0 : listParamsRef.current) || {},
88
+ ...params
89
+ });
90
+ },
91
+ [listParams]
92
+ );
82
93
  (0, import_react.useEffect)(() => {
83
94
  var _a, _b;
84
95
  if (isApp) return;
@@ -110,7 +121,8 @@ var CupList = (props) => {
110
121
  );
111
122
  const columns = (0, import_hooks.useColumns)({
112
123
  onClickAction: handleClickAction,
113
- locales: import_utils.locales
124
+ locales: import_utils.locales,
125
+ isEcoShare
114
126
  });
115
127
  const summary = (0, import_hooks.useSummary)(import_utils.locales, staticsData, isPartner);
116
128
  const handleValuesChange = (changedValues, values) => {
@@ -158,12 +170,46 @@ var CupList = (props) => {
158
170
  localPagination: false
159
171
  };
160
172
  }, [data == null ? void 0 : data.count, listParams == null ? void 0 : listParams.skip]);
173
+ const onClickButton = (0, import_ahooks.useMemoizedFn)((key) => {
174
+ if (key === "export") {
175
+ postExportApi({
176
+ isPartner,
177
+ listParams
178
+ });
179
+ } else if (key === "share") {
180
+ postShareApi();
181
+ }
182
+ });
183
+ const headerRightContent = (0, import_react.useMemo)(() => {
184
+ if (isNormalShop || isEcoShare) {
185
+ return null;
186
+ }
187
+ return /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefixCls}-header-right-content` }, import_const.HEADER_RIGHT_OPTIONS.map((button) => /* @__PURE__ */ import_react.default.createElement(
188
+ import_materials.Button,
189
+ {
190
+ key: button.key,
191
+ type: button.type,
192
+ size: "large",
193
+ icon: /* @__PURE__ */ import_react.default.createElement(import_materials.Icon, { type: button.icon, size: 22 }),
194
+ onClick: () => onClickButton(button.key),
195
+ className: `${prefixCls}-header-right-content-button`
196
+ },
197
+ import_utils.locales.getText(button.languageKey)
198
+ )));
199
+ }, [isNormalShop, onClickButton, isEcoShare]);
161
200
  return /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefixCls}-container` }, /* @__PURE__ */ import_react.default.createElement(import_materials.Page, { style: { height: "100%" } }, /* @__PURE__ */ import_react.default.createElement(
162
201
  import_materials.Table,
163
202
  {
164
203
  dataSource: (data == null ? void 0 : data.list) || [],
165
204
  columns,
166
- title: !isApp ? /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(import_PageHeader.default, { title: import_utils.locales.getText("pisell2.text.ecocup.title") }), /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefixCls}-header` }, /* @__PURE__ */ import_react.default.createElement(
205
+ title: !isApp ? /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
206
+ import_PageHeader.default,
207
+ {
208
+ title: import_utils.locales.getText("pisell2.text.ecocup.title"),
209
+ rightContent: headerRightContent,
210
+ isReturn: !isEcoShare
211
+ }
212
+ ), /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefixCls}-header` }, /* @__PURE__ */ import_react.default.createElement(
167
213
  import_materials.DatePicker.RangePicker,
168
214
  {
169
215
  inputReadOnly: true,
@@ -181,7 +227,9 @@ var CupList = (props) => {
181
227
  {
182
228
  scanListenerKey: SCAN_LISTENER_KEY,
183
229
  size: "small",
184
- placeholder: import_utils.locales.getText("pisell2.text.ecocup.scan-or-search"),
230
+ placeholder: import_utils.locales.getText(
231
+ "pisell2.text.ecocup.scan-or-search"
232
+ ),
185
233
  onSearch: (value) => handleChange(value, "search")
186
234
  }
187
235
  ))) : null,
@@ -189,7 +237,13 @@ var CupList = (props) => {
189
237
  pagination,
190
238
  columnSetting: !isApp ? import_const.COLUMN_SETTING : null,
191
239
  sort: !isApp ? import_const.SORT_SETTINGS : null,
192
- filter: !isApp ? (0, import_const.FILTER)(import_utils.locales, isNormalShop, ecoShopLists, isPartner, listParams == null ? void 0 : listParams.skip) : null,
240
+ filter: !isApp ? (0, import_const.FILTER)(
241
+ import_utils.locales,
242
+ isNormalShop,
243
+ ecoShopLists,
244
+ isPartner,
245
+ listParams == null ? void 0 : listParams.skip
246
+ ) : null,
193
247
  summary: !isApp ? summary : null,
194
248
  className: `${prefixCls}-table`,
195
249
  rowClassName: `${prefixCls}-table-row`,
@@ -7,19 +7,21 @@
7
7
  display: flex;
8
8
  flex-direction: column;
9
9
  padding: 38px 12px 12px;
10
-
11
- .pisell-lowcode-page-header-left{
10
+
11
+ .pisell-lowcode-page-header-left {
12
12
  flex: 1;
13
13
  }
14
- .pisell-lowcode-action-btn-icon{
15
- color: #fff!important;
16
- &:hover{
17
- color: #101828!important;
14
+
15
+ .pisell-lowcode-action-btn-icon {
16
+ color: #fff !important;
17
+
18
+ &:hover {
19
+ color: #101828 !important;
18
20
  }
19
21
  }
20
22
 
21
- .materials-grid-table-wrap{
22
- .grid-view-table-wrap{
23
+ .materials-grid-table-wrap {
24
+ .grid-view-table-wrap {
23
25
  border-radius: 0 0 10px 10px;
24
26
  overflow: hidden;
25
27
  }
@@ -37,64 +39,84 @@
37
39
  width: 240px !important;
38
40
  background: #916ce0;
39
41
  border-radius: 8px;
40
- > div > div {
42
+
43
+ >div>div {
41
44
  font-size: 14px;
42
45
  color: #fff;
43
46
  font-weight: 600;
44
47
  line-height: 20px;
45
- input{
48
+
49
+ input {
46
50
  height: 38px !important;
47
51
  line-height: 38px !important;
48
52
  padding: 0 0 0 14px !important;
49
- &::selection {
50
- background: transparent;
51
- }
53
+
54
+ &::selection {
55
+ background: transparent;
56
+ }
52
57
  }
53
58
  }
54
59
  }
55
60
 
56
61
  &-summary {
57
62
  &-card {
58
- height: 80px;
63
+ min-height: 80px;
64
+ border: none;
65
+
59
66
  .pisell-lowcode-card-body {
60
67
  padding: 0;
61
68
  display: flex;
62
69
  align-items: center;
63
70
  justify-content: center;
64
71
  height: 100%;
72
+ min-height: 80px;
65
73
  }
74
+
66
75
  &-statistic {
67
76
  display: flex;
68
77
  flex-direction: column;
69
78
  text-align: center;
70
79
  gap: 8px;
71
80
  font-weight: 600;
81
+
72
82
  .pisell-lowcode-statistic-title,
73
83
  .pisell-lowcode-statistic-content-value {
74
- // color: #5d3f9f !important;
75
84
  line-height: 24px;
76
85
  margin: 0;
77
86
  }
87
+
78
88
  .pisell-lowcode-statistic-content-value {
79
89
  font-size: 28px;
80
90
  }
91
+
81
92
  .pisell-lowcode-statistic-content {
82
93
  line-height: 28px;
83
94
  }
84
95
  }
85
96
  }
97
+
98
+ &-primary {
99
+ background: #916ce0;
100
+
101
+ .pisell-lowcode-statistic-title,
102
+ .pisell-lowcode-statistic-content-value {
103
+ color: #ffffff !important;
104
+ }
105
+ }
86
106
  }
87
107
 
88
108
  &-table {
89
109
  td {
90
110
  text-align: center;
91
111
  }
112
+
92
113
  &-table-row {
93
114
  &:hover {
94
115
  cursor: pointer;
95
116
  }
96
117
  }
97
118
  }
119
+
98
120
  &-table-status {
99
121
  padding: 4px 8px;
100
122
  border-radius: 16px;
@@ -104,10 +126,34 @@
104
126
  width: max-content;
105
127
  margin: 0 auto;
106
128
  }
129
+
107
130
  &-table-actions {
108
131
  display: flex;
109
132
  align-items: center;
110
133
  justify-content: center;
111
134
  gap: 10px;
112
135
  }
113
- }
136
+
137
+ &-header-right-content {
138
+ display: flex;
139
+ align-items: center;
140
+ gap: 16px;
141
+
142
+ &-button {
143
+ width: 100px;
144
+ height: 40px;
145
+ display: flex;
146
+ align-items: center;
147
+ justify-content: center;
148
+ font-size: 14px;
149
+ box-shadow: none;
150
+ border: 1px solid #7f56d9;
151
+ color: #7f56d9;
152
+ font-weight: bold;
153
+ &:hover {
154
+ background: #7f56d9;
155
+ color: #fff;
156
+ }
157
+ }
158
+ }
159
+ }
@@ -43,7 +43,7 @@ var CUP_PROJECT_FOOTER_BUTTONS = [
43
43
  type: "primary",
44
44
  size: "large",
45
45
  languageKey: "pisell2.text.cup-project.footer.button.cup-list"
46
- }
46
+ },
47
47
  // {
48
48
  // key: 'register-cups',
49
49
  // icon: 'RestOutlined',
@@ -51,6 +51,13 @@ var CUP_PROJECT_FOOTER_BUTTONS = [
51
51
  // size: 'large',
52
52
  // languageKey: 'pisell2.text.cup-project.footer.button.register-cups',
53
53
  // },
54
+ {
55
+ key: "setting",
56
+ icon: "pisell2-settings-02",
57
+ type: "primary",
58
+ size: "large",
59
+ languageKey: "pisell2.text.cup-project.footer.button.setting"
60
+ }
54
61
  ];
55
62
  // Annotate the CommonJS export names for ESM import in node:
56
63
  0 && (module.exports = {
@@ -42,12 +42,14 @@ var import_const = require("./const");
42
42
  var import_SearchBar = __toESM(require("../components/SearchBar"));
43
43
  var import_AddCustomerModal = __toESM(require("../components/AddCustomerModal"));
44
44
  var import_CustomerAndCupModal = __toESM(require("../components/CustomerAndCupModal"));
45
+ var import_SettingModal = __toESM(require("../components/SettingModal"));
45
46
  var SCAN_LISTENER_KEY = "eco-cup-project-scan-listener";
46
47
  function EcoCupProject() {
47
48
  const language = (0, import_hooks.useLanguage)();
48
49
  import_utils.locales.init(import_locales.default, language);
49
50
  const getApp = (0, import_hooks.useGetApp)();
50
51
  const addCustomerModal = (0, import_hooks.useModal)("ecocup-add-customer-modal");
52
+ const settingModal = (0, import_hooks.useModal)("ecocup-setting-modal");
51
53
  const customerAndCupModal = (0, import_hooks.useModal)("ecocup-customer-and-cup-modal");
52
54
  const { goalShopId } = (0, import_hooks.useGetGoalShopInfo)();
53
55
  const onSearchResult = (result) => {
@@ -72,6 +74,10 @@ function EcoCupProject() {
72
74
  console.log("onClickNewCustomer");
73
75
  addCustomerModal.open();
74
76
  };
77
+ const onClickSetting = () => {
78
+ console.log("onClickSetting");
79
+ settingModal.open();
80
+ };
75
81
  const onClickCustomerList = () => {
76
82
  var _a, _b;
77
83
  console.log("onClickCustomerList");
@@ -103,6 +109,9 @@ function EcoCupProject() {
103
109
  case "cup-list":
104
110
  onClickCupList();
105
111
  break;
112
+ case "setting":
113
+ onClickSetting();
114
+ break;
106
115
  }
107
116
  };
108
117
  return /* @__PURE__ */ import_react.default.createElement("div", { className: "ecocup-cup-project" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "ecocup-cup-project-title" }, import_utils.locales.getText("pisell2.text.cup-project.title")), /* @__PURE__ */ import_react.default.createElement("div", { className: "ecocup-cup-project-search-bar" }, /* @__PURE__ */ import_react.default.createElement(
@@ -122,5 +131,5 @@ function EcoCupProject() {
122
131
  className: "ecocup-cup-project-actions-button"
123
132
  },
124
133
  import_utils.locales.getText(button.languageKey)
125
- ))), addCustomerModal.visible && /* @__PURE__ */ import_react.default.createElement(import_AddCustomerModal.default, { ...addCustomerModal.modalProps }), customerAndCupModal.visible && /* @__PURE__ */ import_react.default.createElement(import_CustomerAndCupModal.default, { ...customerAndCupModal.modalProps }));
134
+ ))), addCustomerModal.visible && /* @__PURE__ */ import_react.default.createElement(import_AddCustomerModal.default, { ...addCustomerModal.modalProps }), customerAndCupModal.visible && /* @__PURE__ */ import_react.default.createElement(import_CustomerAndCupModal.default, { ...customerAndCupModal.modalProps }), settingModal.visible && /* @__PURE__ */ import_react.default.createElement(import_SettingModal.default, { ...settingModal.modalProps }));
126
135
  }
@@ -47,3 +47,11 @@ export declare const useGetShopId: () => any;
47
47
  * @return {*}
48
48
  */
49
49
  export declare const useIsApp: () => boolean;
50
+ /**
51
+ * @description: 获取分享场景
52
+ * @return {*}
53
+ */
54
+ export declare const useGetShare: () => {
55
+ source: string | null;
56
+ isEcoShare: boolean;
57
+ };
@@ -31,6 +31,7 @@ var hooks_exports = {};
31
31
  __export(hooks_exports, {
32
32
  useGetApp: () => useGetApp,
33
33
  useGetGoalShopInfo: () => useGetGoalShopInfo,
34
+ useGetShare: () => useGetShare,
34
35
  useGetShopId: () => useGetShopId,
35
36
  useIsApp: () => useIsApp,
36
37
  useLanguage: () => useLanguage,
@@ -41,11 +42,11 @@ __export(hooks_exports, {
41
42
  module.exports = __toCommonJS(hooks_exports);
42
43
  var import_react = require("react");
43
44
  var import_useEngineContext = __toESM(require("../../hooks/useEngineContext"));
45
+ var import_useLocale = __toESM(require("../../hooks/useLocale"));
44
46
  var import_scanListener = __toESM(require("./utils/scanListener"));
45
47
  var useLanguage = () => {
46
- var _a, _b, _c;
47
- const context = (0, import_useEngineContext.default)();
48
- return ((_c = (_b = (_a = context == null ? void 0 : context.appHelper) == null ? void 0 : _a.utils) == null ? void 0 : _b.storage) == null ? void 0 : _c.get("umi_locale")) || "en";
48
+ const locale = (0, import_useLocale.default)();
49
+ return locale || "en";
49
50
  };
50
51
  var useScanListener = () => {
51
52
  var _a;
@@ -57,10 +58,13 @@ var useScanListener = () => {
57
58
  const removeListener = (key) => {
58
59
  import_scanListener.default.removeListener(key);
59
60
  };
61
+ const setActiveListener = (key) => {
62
+ import_scanListener.default.setActiveListener(key);
63
+ };
60
64
  return {
61
65
  addListener,
62
66
  removeListener,
63
- setActiveListener: import_scanListener.default.setActiveListener
67
+ setActiveListener
64
68
  };
65
69
  };
66
70
  var useGetApp = () => {
@@ -142,10 +146,20 @@ var useIsApp = () => {
142
146
  const platform = (0, import_useEngineContext.usePlatform)();
143
147
  return platform === "h5" || platform === "pc";
144
148
  };
149
+ var useGetShare = () => {
150
+ var _a;
151
+ const search = ((_a = window == null ? void 0 : window.location) == null ? void 0 : _a.search) || {};
152
+ const source = new URLSearchParams(search).get("source");
153
+ return {
154
+ source,
155
+ isEcoShare: source ? source === "ecoShare" : false
156
+ };
157
+ };
145
158
  // Annotate the CommonJS export names for ESM import in node:
146
159
  0 && (module.exports = {
147
160
  useGetApp,
148
161
  useGetGoalShopInfo,
162
+ useGetShare,
149
163
  useGetShopId,
150
164
  useIsApp,
151
165
  useLanguage,
@@ -24,6 +24,7 @@ declare const _default: {
24
24
  'pisell2.text.cup-project.footer.button.new-customer': string;
25
25
  'pisell2.text.cup-project.footer.button.customer-list': string;
26
26
  'pisell2.text.cup-project.footer.button.cup-list': string;
27
+ 'pisell2.text.cup-project.footer.button.setting': string;
27
28
  'pisell2.text.cup-project.footer.button.register-cups': string;
28
29
  'pisell2.text.cup-project.search-bar.result.header.name': string;
29
30
  'pisell2.text.cup-project.search-bar.result.header.registrationTime': string;
@@ -64,6 +65,8 @@ declare const _default: {
64
65
  'pisell2.text.ecocup.action.more.broken': string;
65
66
  'pisell2.text.ecocup.table.time-of-rent.relative': (num: number) => string;
66
67
  'pisell2.text.ecocup.table.time-of-return.today': string;
68
+ 'pisell2.text.ecocup.share.title': string;
69
+ 'pisell2.text.ecocup.export.title': string;
67
70
  'pisell2.text.ecocup.customer.list.title': string;
68
71
  'pisell2.text.ecocup.customer.list.customer': string;
69
72
  'pisell2.text.ecocup.customer.list.registed': string;
@@ -97,6 +100,10 @@ declare const _default: {
97
100
  'pisell2.text.ecocup.cup-info-card.title.rentInfo': string;
98
101
  'pisell2.text.ecocup.cup-info-card.title.markInfo': string;
99
102
  'pisell2.text.ecocup.cup-info-card.title.belongInfo': string;
103
+ 'pisell2.text.ecocup.cup-info-card.title.otherBelongInfo': string;
104
+ 'pisell2.text.ecocup.cup-info-card.title.multiple-shop': string;
105
+ 'pisell2.text.ecocup.cup-info-card.title.multiple-time': string;
106
+ 'pisell2.text.ecocup.cup-info-card.title.multiple-customer': string;
100
107
  'pisell2.text.ecocup.customer-first-modal.title': string;
101
108
  'pisell2.text.ecocup.customer-first-modal.search-tip': string;
102
109
  'pisell2.text.ecocup.customer-first-modal.search-bar.placeholder': string;
@@ -104,12 +111,35 @@ declare const _default: {
104
111
  'pisell2.text.ecocup.customer-first-modal.over-max': string;
105
112
  'pisell2.text.ecocup.customer-first-modal.no-customer': string;
106
113
  'pisell2.text.ecocup.search-bar.search-tip': string;
107
- 'pisell2.text.ecocup.cup-status-modal.title-other_rent': string;
114
+ 'pisell2.text.ecocup.cup-status-modal.title-other_rent': (num: number) => string;
108
115
  'pisell2.text.ecocup.cup-status-modal.title-other_in_stock': string;
109
116
  'pisell2.text.ecocup.cup-status-modal.title-missing': string;
110
117
  'pisell2.text.ecocup.cup-status-modal.title-broken': string;
111
118
  'pisell2.text.ecocup.cup-status-modal.title-not_found': string;
112
119
  'pisell2.text.ecocup.cup-status-modal.tip': string;
120
+ 'pisell2.text.ecocup.cup-status-modal.tip-in-stock': string;
121
+ 'pisell2.text.ecocup.setting.expire-time': string;
122
+ 'pisell2.text.ecocup.setting.expire-time-placeholder': string;
123
+ 'pisell2.text.ecocup.setting.expire-time-required': string;
124
+ 'pisell2.text.ecocup.setting.expire-time-max': string;
125
+ 'pisell2.text.ecocup.setting.expire-time-min': string;
126
+ 'pisell2.text.ecocup.setting.max-rent-count-max': string;
127
+ 'pisell2.text.ecocup.setting.max-rent-count-min': string;
128
+ 'pisell2.text.ecocup.setting.days': string;
129
+ 'pisell2.text.ecocup.setting.regular': string;
130
+ 'pisell2.text.ecocup.setting.regular-placeholder': string;
131
+ 'pisell2.text.ecocup.setting.regular-required': string;
132
+ 'pisell2.text.ecocup.setting.business': string;
133
+ 'pisell2.text.ecocup.setting.business-placeholder': string;
134
+ 'pisell2.text.ecocup.setting.business-required': string;
135
+ 'pisell2.text.ecocup.setting.admin': string;
136
+ 'pisell2.text.ecocup.setting.admin-placeholder': string;
137
+ 'pisell2.text.ecocup.setting.admin-required': string;
138
+ 'pisell2.text.ecocup.setting.success': string;
139
+ 'pisell2.text.ecocup.export.fail': string;
140
+ 'pisell2.text.ecocup.export.success': string;
141
+ 'pisell2.text.ecocup.cup-status-modal.search-bar.title': string;
142
+ 'pisell2.text.ecocup.toast.success-copy-link': string;
113
143
  };
114
144
  'zh-CN': {
115
145
  'pisell2.text.ecocup.cup-id': string;
@@ -136,6 +166,7 @@ declare const _default: {
136
166
  'pisell2.text.cup-project.footer.button.new-customer': string;
137
167
  'pisell2.text.cup-project.footer.button.customer-list': string;
138
168
  'pisell2.text.cup-project.footer.button.cup-list': string;
169
+ 'pisell2.text.cup-project.footer.button.setting': string;
139
170
  'pisell2.text.cup-project.footer.button.register-cups': string;
140
171
  'pisell2.text.cup-project.search-bar.result.header.name': string;
141
172
  'pisell2.text.cup-project.search-bar.result.header.registrationTime': string;
@@ -176,6 +207,8 @@ declare const _default: {
176
207
  'pisell2.text.ecocup.action.more.broken': string;
177
208
  'pisell2.text.ecocup.table.time-of-rent.relative': (num: number) => string;
178
209
  'pisell2.text.ecocup.table.time-of-return.today': string;
210
+ 'pisell2.text.ecocup.share.title': string;
211
+ 'pisell2.text.ecocup.export.title': string;
179
212
  'pisell2.text.ecocup.customer.list.title': string;
180
213
  'pisell2.text.ecocup.customer.list.customer': string;
181
214
  'pisell2.text.ecocup.customer.list.registed': string;
@@ -209,6 +242,10 @@ declare const _default: {
209
242
  'pisell2.text.ecocup.cup-info-card.title.rentInfo': string;
210
243
  'pisell2.text.ecocup.cup-info-card.title.markInfo': string;
211
244
  'pisell2.text.ecocup.cup-info-card.title.belongInfo': string;
245
+ 'pisell2.text.ecocup.cup-info-card.title.otherBelongInfo': string;
246
+ 'pisell2.text.ecocup.cup-info-card.title.multiple-shop': string;
247
+ 'pisell2.text.ecocup.cup-info-card.title.multiple-time': string;
248
+ 'pisell2.text.ecocup.cup-info-card.title.multiple-customer': string;
212
249
  'pisell2.text.ecocup.customer-first-modal.title': string;
213
250
  'pisell2.text.ecocup.customer-first-modal.search-tip': string;
214
251
  'pisell2.text.ecocup.customer-first-modal.search-bar.placeholder': string;
@@ -216,12 +253,35 @@ declare const _default: {
216
253
  'pisell2.text.ecocup.customer-first-modal.over-max': string;
217
254
  'pisell2.text.ecocup.customer-first-modal.no-customer': string;
218
255
  'pisell2.text.ecocup.search-bar.search-tip': string;
219
- 'pisell2.text.ecocup.cup-status-modal.title-other_rent': string;
256
+ 'pisell2.text.ecocup.cup-status-modal.title-other_rent': (num: number) => string;
220
257
  'pisell2.text.ecocup.cup-status-modal.title-other_in_stock': string;
221
258
  'pisell2.text.ecocup.cup-status-modal.title-missing': string;
222
259
  'pisell2.text.ecocup.cup-status-modal.title-broken': string;
223
260
  'pisell2.text.ecocup.cup-status-modal.title-not_found': string;
224
261
  'pisell2.text.ecocup.cup-status-modal.tip': string;
262
+ 'pisell2.text.ecocup.cup-status-modal.tip-in-stock': string;
263
+ 'pisell2.text.ecocup.setting.expire-time': string;
264
+ 'pisell2.text.ecocup.setting.expire-time-placeholder': string;
265
+ 'pisell2.text.ecocup.setting.expire-time-required': string;
266
+ 'pisell2.text.ecocup.setting.expire-time-max': string;
267
+ 'pisell2.text.ecocup.setting.expire-time-min': string;
268
+ 'pisell2.text.ecocup.setting.max-rent-count-max': string;
269
+ 'pisell2.text.ecocup.setting.max-rent-count-min': string;
270
+ 'pisell2.text.ecocup.setting.days': string;
271
+ 'pisell2.text.ecocup.setting.regular': string;
272
+ 'pisell2.text.ecocup.setting.regular-placeholder': string;
273
+ 'pisell2.text.ecocup.setting.regular-required': string;
274
+ 'pisell2.text.ecocup.setting.business': string;
275
+ 'pisell2.text.ecocup.setting.business-placeholder': string;
276
+ 'pisell2.text.ecocup.setting.business-required': string;
277
+ 'pisell2.text.ecocup.setting.admin': string;
278
+ 'pisell2.text.ecocup.setting.admin-placeholder': string;
279
+ 'pisell2.text.ecocup.setting.admin-required': string;
280
+ 'pisell2.text.ecocup.setting.success': string;
281
+ 'pisell2.text.ecocup.export.fail': string;
282
+ 'pisell2.text.ecocup.export.success': string;
283
+ 'pisell2.text.ecocup.cup-status-modal.search-bar.title': string;
284
+ 'pisell2.text.ecocup.toast.success-copy-link': string;
225
285
  };
226
286
  'zh-HK': {
227
287
  'pisell2.text.ecocup.cup-id': string;
@@ -248,6 +308,7 @@ declare const _default: {
248
308
  'pisell2.text.cup-project.footer.button.new-customer': string;
249
309
  'pisell2.text.cup-project.footer.button.customer-list': string;
250
310
  'pisell2.text.cup-project.footer.button.cup-list': string;
311
+ 'pisell2.text.cup-project.footer.button.setting': string;
251
312
  'pisell2.text.cup-project.footer.button.register-cups': string;
252
313
  'pisell2.text.cup-project.search-bar.result.header.name': string;
253
314
  'pisell2.text.cup-project.search-bar.result.header.registrationTime': string;
@@ -288,6 +349,8 @@ declare const _default: {
288
349
  'pisell2.text.ecocup.action.more.broken': string;
289
350
  'pisell2.text.ecocup.table.time-of-rent.relative': (num: number) => string;
290
351
  'pisell2.text.ecocup.table.time-of-return.today': string;
352
+ 'pisell2.text.ecocup.share.title': string;
353
+ 'pisell2.text.ecocup.export.title': string;
291
354
  'pisell2.text.ecocup.customer.list.title': string;
292
355
  'pisell2.text.ecocup.customer.list.customer': string;
293
356
  'pisell2.text.ecocup.customer.list.registed': string;
@@ -321,6 +384,10 @@ declare const _default: {
321
384
  'pisell2.text.ecocup.cup-info-card.title.rentInfo': string;
322
385
  'pisell2.text.ecocup.cup-info-card.title.markInfo': string;
323
386
  'pisell2.text.ecocup.cup-info-card.title.belongInfo': string;
387
+ 'pisell2.text.ecocup.cup-info-card.title.otherBelongInfo': string;
388
+ 'pisell2.text.ecocup.cup-info-card.title.multiple-shop': string;
389
+ 'pisell2.text.ecocup.cup-info-card.title.multiple-time': string;
390
+ 'pisell2.text.ecocup.cup-info-card.title.multiple-customer': string;
324
391
  'pisell2.text.ecocup.customer-first-modal.title': string;
325
392
  'pisell2.text.ecocup.customer-first-modal.search-tip': string;
326
393
  'pisell2.text.ecocup.customer-first-modal.search-bar.placeholder': string;
@@ -328,12 +395,35 @@ declare const _default: {
328
395
  'pisell2.text.ecocup.customer-first-modal.over-max': string;
329
396
  'pisell2.text.ecocup.customer-first-modal.no-customer': string;
330
397
  'pisell2.text.ecocup.search-bar.search-tip': string;
331
- 'pisell2.text.ecocup.cup-status-modal.title-other_rent': string;
398
+ 'pisell2.text.ecocup.cup-status-modal.title-other_rent': (num: number) => string;
332
399
  'pisell2.text.ecocup.cup-status-modal.title-other_in_stock': string;
333
400
  'pisell2.text.ecocup.cup-status-modal.title-missing': string;
334
401
  'pisell2.text.ecocup.cup-status-modal.title-broken': string;
335
402
  'pisell2.text.ecocup.cup-status-modal.title-not_found': string;
336
403
  'pisell2.text.ecocup.cup-status-modal.tip': string;
404
+ 'pisell2.text.ecocup.cup-status-modal.tip-in-stock': string;
405
+ 'pisell2.text.ecocup.setting.expire-time': string;
406
+ 'pisell2.text.ecocup.setting.expire-time-placeholder': string;
407
+ 'pisell2.text.ecocup.setting.expire-time-required': string;
408
+ 'pisell2.text.ecocup.setting.expire-time-max': string;
409
+ 'pisell2.text.ecocup.setting.expire-time-min': string;
410
+ 'pisell2.text.ecocup.setting.max-rent-count-max': string;
411
+ 'pisell2.text.ecocup.setting.max-rent-count-min': string;
412
+ 'pisell2.text.ecocup.setting.days': string;
413
+ 'pisell2.text.ecocup.setting.regular': string;
414
+ 'pisell2.text.ecocup.setting.regular-placeholder': string;
415
+ 'pisell2.text.ecocup.setting.regular-required': string;
416
+ 'pisell2.text.ecocup.setting.business': string;
417
+ 'pisell2.text.ecocup.setting.business-placeholder': string;
418
+ 'pisell2.text.ecocup.setting.business-required': string;
419
+ 'pisell2.text.ecocup.setting.admin': string;
420
+ 'pisell2.text.ecocup.setting.admin-placeholder': string;
421
+ 'pisell2.text.ecocup.setting.admin-required': string;
422
+ 'pisell2.text.ecocup.setting.success': string;
423
+ 'pisell2.text.ecocup.export.fail': string;
424
+ 'pisell2.text.ecocup.export.success': string;
425
+ 'pisell2.text.ecocup.cup-status-modal.search-bar.title': string;
426
+ 'pisell2.text.ecocup.toast.success-copy-link': string;
337
427
  };
338
428
  ja: {
339
429
  'pisell2.text.ecocup.cup-id': string;