@pisell/private-materials 3.3.82 → 3.3.83
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.
- package/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/preview.js +13 -13
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +5 -5
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +7 -7
- package/es/businessModel/SalesModel/Sales/index.js +4 -37
- package/es/components/Sales/Resource/index.js +2 -2
- package/es/components/Sales/Resource/serve.d.ts +0 -7
- package/es/components/Sales/Resource/serve.js +0 -10
- package/es/components/appointmentBooking/components/Cart/Item/index.less +3 -3
- package/es/components/appointmentBooking/components/Content/index.less +1 -1
- package/es/components/appointmentBooking/components/Header/index.js +14 -8
- package/es/components/appointmentBooking/components/Services/index.js +36 -38
- package/es/components/appointmentBooking/components/Voucher/index.js +1 -1
- package/es/components/appointmentBooking/index.js +0 -14
- package/es/components/appointmentBooking/index.less +1 -1
- package/es/components/appointmentBooking/locales.d.ts +3 -0
- package/es/components/appointmentBooking/locales.js +3 -0
- package/es/components/booking/addons/model.d.ts +1 -10
- package/es/components/booking/components/TabProduct/tabs/index.js +5 -1
- package/es/components/booking/components/browserSelect/index.js +1 -1
- package/es/components/booking/components/footer/utils.d.ts +0 -1
- package/es/components/booking/components/footer/utils.js +1 -1
- package/es/components/booking/components/voucher/index.js +2 -2
- package/es/components/booking/forms/model.d.ts +1 -10
- package/es/components/booking/forms/model.js +5 -5
- package/es/components/booking/info/model.d.ts +1 -10
- package/es/components/booking/info/service/addTimeModal/index.d.ts +0 -1
- package/es/components/booking/info/service/like/index.js +1 -1
- package/es/components/booking/info/service2/utils.d.ts +1 -1
- package/es/components/booking/info/service2/utils.js +2 -3
- package/es/components/booking/info/utils.d.ts +50 -0
- package/es/components/booking/info2/service/addService/utils.d.ts +0 -10
- package/es/components/booking/info2/service/addService/utils.js +13 -44
- package/es/components/booking/info2/service/addTimeModal/index.d.ts +0 -1
- package/es/components/booking/info2/service/editService/Resources/index.js +8 -22
- package/es/components/booking/info2/service/editService/Resources/index.less +0 -6
- package/es/components/booking/info2/utilsByBooking.js +0 -9
- package/es/components/booking/locales.d.ts +0 -3
- package/es/components/booking/locales.js +0 -3
- package/es/components/booking/materiels/startTime/index.js +1 -1
- package/es/components/booking/model.d.ts +1 -9
- package/es/components/booking/notes/NoteBlock/NoteItem/index.js +1 -1
- package/es/components/booking/notes/NoteBlock/index.js +11 -11
- package/es/components/booking/notes/model.d.ts +1 -10
- package/es/components/booking/notes/model.js +5 -5
- package/es/components/booking/payments/model.d.ts +1 -10
- package/es/components/booking/payments/model.js +5 -5
- package/es/components/eftposPay/amount.d.ts +1 -1
- package/es/components/eftposPay/device.d.ts +1 -1
- package/es/components/eftposPay/hooks.d.ts +2 -2
- package/es/components/eftposPay/store/index.d.ts +3 -3
- package/es/components/eventBooking/components/Provider/Event/index.js +4 -13
- package/es/components/eventBooking/components/bookingDetailModal/index.js +3 -19
- package/es/components/eventBooking/index.js +7 -21
- package/es/components/eventBooking/locales.js +3 -3
- package/es/components/index.d.ts +1 -3
- package/es/components/index.js +1 -3
- package/es/components/listComponent/index.js +5 -5
- package/es/components/pay/toC/PaymentMethods/index.js +4 -5
- package/es/components/pay/toC/model.d.ts +1 -9
- package/es/components/productExtension/card/index.js +3 -3
- package/es/components/productExtension/fields/Actor/CutOffTime/index.js +1 -1
- package/es/components/productExtension/fields/Forms/index.js +12 -12
- package/es/components/productExtension/fields/SelectProducts/ProductItemPreview/index.js +1 -1
- package/es/components/productExtension/fields/SelectProducts/server.js +2 -2
- package/es/components/productExtension/fields/SelectResourcesTable/server.js +2 -2
- package/es/components/productExtension/server.js +2 -2
- package/es/components/ruleSetting/ruleBorder/index.js +1 -1
- package/es/components/schedules/calendar/index.js +4 -4
- package/es/components/schedules/calendar/serve.js +2 -2
- package/es/components/schedules/components/CurrentDay/index.js +5 -5
- package/es/components/schedules/components/CurrentDay/serve.js +2 -2
- package/es/components/schedules/components/DropdownSort/index.js +1 -1
- package/es/components/schedules/components/ResourceList/index.js +1 -1
- package/es/components/schedules/components/Search/index.js +5 -5
- package/es/components/schedules/model.d.ts +1 -9
- package/es/components/schedules/model.js +5 -5
- package/es/components/schedules/openHours/index.js +1 -1
- package/es/components/schedules/openHours/serve.js +2 -2
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.js +1 -1
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.js +5 -5
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.js +4 -4
- package/es/components/schedules/products/ProductDetailDrawer/index.js +3 -3
- package/es/components/schedules/products/serve.js +2 -2
- package/es/components/schedules/products/utils.js +5 -5
- package/es/components/schedules/resources/detail/detailContent.js +2 -2
- package/es/components/schedules/resources/detail/index.js +10 -10
- package/es/components/schedules/resources/list/index.js +2 -2
- package/es/components/schedules/resources/relationProduct/index.js +1 -1
- package/es/components/schedules/resources/serve.js +2 -2
- package/es/components/schedules/schedules/ScheduleDetailDrawer/index.js +9 -9
- package/es/components/schedules/utils.d.ts +1 -1
- package/es/components/schedules/utils.js +4 -4
- package/es/components/selectModal/index.js +2 -2
- package/es/components/ticketBooking/components/addServiceVariant/addService.js +1 -1
- package/es/components/ticketBooking/components/ticketBooking/index.d.ts +0 -1
- package/es/components/ticketBooking/components/ticketBooking/index.js +138 -257
- package/es/components/ticketBooking/locales.d.ts +146 -164
- package/es/components/ticketBooking/locales.js +147 -195
- package/es/components/wallet/Detail/model.d.ts +1 -13
- package/es/components/wallet/DiscountCard/model.d.ts +1 -14
- package/es/components/wallet/PointCard/model.d.ts +1 -13
- package/es/components/wallet/RechargeableCard/model.d.ts +1 -29
- package/es/components/wallet/Voucher/model.d.ts +1 -13
- package/es/components/wallet/model.d.ts +1 -9
- package/es/hooks/useComponents.js +1 -1
- package/es/index.d.ts +0 -2
- package/es/index.js +1 -3
- package/es/utils/index.d.ts +1 -1
- package/lib/businessModel/SalesModel/Sales/index.js +8 -22
- package/lib/components/Sales/Resource/index.js +1 -1
- package/lib/components/Sales/Resource/serve.d.ts +0 -7
- package/lib/components/Sales/Resource/serve.js +2 -9
- package/lib/components/appointmentBooking/components/Cart/Item/index.less +3 -3
- package/lib/components/appointmentBooking/components/Content/index.less +1 -1
- package/lib/components/appointmentBooking/components/Header/index.js +3 -2
- package/lib/components/appointmentBooking/components/Services/index.js +18 -19
- package/lib/components/appointmentBooking/components/Voucher/index.js +1 -1
- package/lib/components/appointmentBooking/index.js +0 -11
- package/lib/components/appointmentBooking/index.less +1 -1
- package/lib/components/appointmentBooking/locales.d.ts +3 -0
- package/lib/components/appointmentBooking/locales.js +3 -0
- package/lib/components/booking/addons/model.d.ts +1 -10
- package/lib/components/booking/components/footer/utils.d.ts +0 -1
- package/lib/components/booking/components/footer/utils.js +0 -2
- package/lib/components/booking/components/voucher/index.js +23 -11
- package/lib/components/booking/forms/model.d.ts +1 -10
- package/lib/components/booking/info/model.d.ts +1 -10
- package/lib/components/booking/info/service/addTimeModal/index.d.ts +0 -1
- package/lib/components/booking/info/service2/utils.d.ts +1 -1
- package/lib/components/booking/info/service2/utils.js +2 -2
- package/lib/components/booking/info/utils.d.ts +50 -0
- package/lib/components/booking/info2/service/addService/utils.d.ts +0 -10
- package/lib/components/booking/info2/service/addService/utils.js +4 -27
- package/lib/components/booking/info2/service/addTimeModal/index.d.ts +0 -1
- package/lib/components/booking/info2/service/editService/Resources/index.js +10 -54
- package/lib/components/booking/info2/service/editService/Resources/index.less +0 -6
- package/lib/components/booking/info2/utilsByBooking.js +0 -6
- package/lib/components/booking/locales.d.ts +0 -3
- package/lib/components/booking/locales.js +0 -3
- package/lib/components/booking/model.d.ts +1 -9
- package/lib/components/booking/notes/model.d.ts +1 -10
- package/lib/components/booking/payments/model.d.ts +1 -10
- package/lib/components/eftposPay/amount.d.ts +1 -1
- package/lib/components/eftposPay/device.d.ts +1 -1
- package/lib/components/eftposPay/hooks.d.ts +2 -2
- package/lib/components/eftposPay/store/index.d.ts +3 -3
- package/lib/components/eventBooking/components/Provider/Event/index.js +3 -10
- package/lib/components/eventBooking/components/bookingDetailModal/index.js +3 -9
- package/lib/components/eventBooking/index.js +7 -11
- package/lib/components/eventBooking/locales.js +3 -3
- package/lib/components/index.d.ts +1 -3
- package/lib/components/index.js +0 -6
- package/lib/components/pay/toC/PaymentMethods/index.js +9 -10
- package/lib/components/pay/toC/model.d.ts +1 -9
- package/lib/components/schedules/model.d.ts +1 -9
- package/lib/components/schedules/utils.d.ts +1 -1
- package/lib/components/schedules/utils.js +1 -1
- package/lib/components/ticketBooking/components/addServiceVariant/addService.js +1 -1
- package/lib/components/ticketBooking/components/ticketBooking/index.d.ts +0 -1
- package/lib/components/ticketBooking/components/ticketBooking/index.js +139 -263
- package/lib/components/ticketBooking/locales.d.ts +146 -164
- package/lib/components/ticketBooking/locales.js +4 -22
- package/lib/components/wallet/Detail/model.d.ts +1 -13
- package/lib/components/wallet/DiscountCard/model.d.ts +1 -14
- package/lib/components/wallet/PointCard/model.d.ts +1 -13
- package/lib/components/wallet/RechargeableCard/model.d.ts +1 -29
- package/lib/components/wallet/Voucher/model.d.ts +1 -13
- package/lib/components/wallet/model.d.ts +1 -9
- package/lib/index.d.ts +0 -2
- package/lib/index.js +0 -6
- package/lib/utils/index.d.ts +1 -1
- package/package.json +4 -4
- package/es/components/booking/editBookingModal/index.d.ts +0 -5
- package/es/components/booking/editBookingModal/index.js +0 -386
- package/es/components/booking/editBookingModal/index.less +0 -8
- package/es/components/booking/editBookingModal/locales.d.ts +0 -21
- package/es/components/booking/editBookingModal/locales.js +0 -20
- package/es/components/booking/editBookingModal/mock.d.ts +0 -807
- package/es/components/booking/editBookingModal/mock.js +0 -2993
- package/es/components/booking/editBookingModal/serve.d.ts +0 -51
- package/es/components/booking/editBookingModal/serve.js +0 -288
- package/es/components/booking/editBookingModal/type.d.ts +0 -12
- package/es/components/booking/editBookingModal/type.js +0 -1
- package/es/components/booking/editBookingModal/utils.d.ts +0 -12
- package/es/components/booking/editBookingModal/utils.js +0 -157
- package/es/components/booking/info2/service/editService/ResourcesV2/MaxLengthSelect/index.d.ts +0 -7
- package/es/components/booking/info2/service/editService/ResourcesV2/MaxLengthSelect/index.js +0 -26
- package/es/components/booking/info2/service/editService/ResourcesV2/index.d.ts +0 -10
- package/es/components/booking/info2/service/editService/ResourcesV2/index.js +0 -308
- package/es/components/booking/info2/service/editService/ResourcesV2/index.less +0 -44
- package/es/components/stepController/components/Content/index.d.ts +0 -7
- package/es/components/stepController/components/Content/index.js +0 -9
- package/es/components/stepController/components/Content/index.less +0 -8
- package/es/components/stepController/components/Footer/index.d.ts +0 -8
- package/es/components/stepController/components/Footer/index.js +0 -15
- package/es/components/stepController/components/Footer/index.less +0 -39
- package/es/components/stepController/components/Header/index.d.ts +0 -20
- package/es/components/stepController/components/Header/index.js +0 -97
- package/es/components/stepController/components/Header/index.less +0 -21
- package/es/components/stepController/index.d.ts +0 -5
- package/es/components/stepController/index.js +0 -64
- package/es/components/stepController/index.less +0 -11
- package/es/components/stepController/locales.d.ts +0 -27
- package/es/components/stepController/locales.js +0 -32
- package/es/components/stepController/types.d.ts +0 -23
- package/es/components/stepController/types.js +0 -1
- package/es/components/ticketBooking/utils/formatProductMessage.d.ts +0 -2
- package/es/components/ticketBooking/utils/formatProductMessage.js +0 -62
- package/es/components/ticketBooking/utils/formatTime.d.ts +0 -31
- package/es/components/ticketBooking/utils/formatTime.js +0 -144
- package/es/hooks/useWindowSize.d.ts +0 -5
- package/es/hooks/useWindowSize.js +0 -26
- package/lib/components/booking/editBookingModal/index.d.ts +0 -5
- package/lib/components/booking/editBookingModal/index.js +0 -363
- package/lib/components/booking/editBookingModal/index.less +0 -8
- package/lib/components/booking/editBookingModal/locales.d.ts +0 -21
- package/lib/components/booking/editBookingModal/locales.js +0 -44
- package/lib/components/booking/editBookingModal/mock.d.ts +0 -807
- package/lib/components/booking/editBookingModal/mock.js +0 -3314
- package/lib/components/booking/editBookingModal/serve.d.ts +0 -51
- package/lib/components/booking/editBookingModal/serve.js +0 -178
- package/lib/components/booking/editBookingModal/type.d.ts +0 -12
- package/lib/components/booking/editBookingModal/type.js +0 -17
- package/lib/components/booking/editBookingModal/utils.d.ts +0 -12
- package/lib/components/booking/editBookingModal/utils.js +0 -158
- package/lib/components/booking/info2/service/editService/ResourcesV2/MaxLengthSelect/index.d.ts +0 -7
- package/lib/components/booking/info2/service/editService/ResourcesV2/MaxLengthSelect/index.js +0 -53
- package/lib/components/booking/info2/service/editService/ResourcesV2/index.d.ts +0 -10
- package/lib/components/booking/info2/service/editService/ResourcesV2/index.js +0 -311
- package/lib/components/booking/info2/service/editService/ResourcesV2/index.less +0 -44
- package/lib/components/stepController/components/Content/index.d.ts +0 -7
- package/lib/components/stepController/components/Content/index.js +0 -40
- package/lib/components/stepController/components/Content/index.less +0 -8
- package/lib/components/stepController/components/Footer/index.d.ts +0 -8
- package/lib/components/stepController/components/Footer/index.js +0 -49
- package/lib/components/stepController/components/Footer/index.less +0 -39
- package/lib/components/stepController/components/Header/index.d.ts +0 -20
- package/lib/components/stepController/components/Header/index.js +0 -104
- package/lib/components/stepController/components/Header/index.less +0 -21
- package/lib/components/stepController/index.d.ts +0 -5
- package/lib/components/stepController/index.js +0 -89
- package/lib/components/stepController/index.less +0 -11
- package/lib/components/stepController/locales.d.ts +0 -27
- package/lib/components/stepController/locales.js +0 -50
- package/lib/components/stepController/types.d.ts +0 -23
- package/lib/components/stepController/types.js +0 -17
- package/lib/components/ticketBooking/utils/formatProductMessage.d.ts +0 -2
- package/lib/components/ticketBooking/utils/formatProductMessage.js +0 -84
- package/lib/components/ticketBooking/utils/formatTime.d.ts +0 -31
- package/lib/components/ticketBooking/utils/formatTime.js +0 -139
- package/lib/hooks/useWindowSize.d.ts +0 -5
- package/lib/hooks/useWindowSize.js +0 -51
- package/lowcode/edit-booking-modal/meta.ts +0 -53
- package/lowcode/step-controller/meta.ts +0 -88
|
@@ -43,20 +43,7 @@ var import_lodash = require("lodash");
|
|
|
43
43
|
var import_utils2 = require("../utils");
|
|
44
44
|
var import_ahooks = require("ahooks");
|
|
45
45
|
var import_icons = require("@ant-design/icons");
|
|
46
|
-
var Resources = ({
|
|
47
|
-
state,
|
|
48
|
-
cacheItem,
|
|
49
|
-
getCurrentCacheItem,
|
|
50
|
-
onChange,
|
|
51
|
-
value,
|
|
52
|
-
config = {
|
|
53
|
-
// 是否显示自动分配
|
|
54
|
-
autoAllocation: true,
|
|
55
|
-
// 是否显示资源错误图标
|
|
56
|
-
resourceErrorIcon: true,
|
|
57
|
-
disabled: false
|
|
58
|
-
}
|
|
59
|
-
}, ref) => {
|
|
46
|
+
var Resources = ({ state, cacheItem, getCurrentCacheItem, onChange, value }, ref) => {
|
|
60
47
|
var _a, _b;
|
|
61
48
|
const [showError, setShowError] = (0, import_react.useState)(false);
|
|
62
49
|
const update = (0, import_ahooks.useUpdate)();
|
|
@@ -147,7 +134,7 @@ var Resources = ({
|
|
|
147
134
|
);
|
|
148
135
|
});
|
|
149
136
|
},
|
|
150
|
-
[
|
|
137
|
+
[]
|
|
151
138
|
);
|
|
152
139
|
const check = () => {
|
|
153
140
|
var _a2;
|
|
@@ -179,7 +166,6 @@ var Resources = ({
|
|
|
179
166
|
{
|
|
180
167
|
label: item.title,
|
|
181
168
|
required: true,
|
|
182
|
-
labelCol: config == null ? void 0 : config.labelCol,
|
|
183
169
|
extra: showError && item.select_type.min > (cur == null ? void 0 : cur.length) ? /* @__PURE__ */ import_react.default.createElement("span", { style: { color: "#ff4d4f" } }, import_utils.locales.getText(
|
|
184
170
|
"page.booking.text.resource.min-length-error"
|
|
185
171
|
)(item.select_type.min, item.title)) : void 0
|
|
@@ -187,12 +173,9 @@ var Resources = ({
|
|
|
187
173
|
/* @__PURE__ */ import_react.default.createElement("div", { className: "resource-col" }, item.select_type.type === "multiple" ? null : /* @__PURE__ */ import_react.default.createElement(
|
|
188
174
|
import_antd.Button,
|
|
189
175
|
{
|
|
190
|
-
className:
|
|
176
|
+
className: "resource-col-like-wrap",
|
|
191
177
|
onClick: () => {
|
|
192
178
|
var _a3;
|
|
193
|
-
if (config == null ? void 0 : config.disabled) {
|
|
194
|
-
return;
|
|
195
|
-
}
|
|
196
179
|
setLikeStatus(
|
|
197
180
|
((_a3 = cur == null ? void 0 : cur[0]) == null ? void 0 : _a3.like_status) === "like" ? "common" : "like",
|
|
198
181
|
item.form_id,
|
|
@@ -200,13 +183,7 @@ var Resources = ({
|
|
|
200
183
|
);
|
|
201
184
|
}
|
|
202
185
|
},
|
|
203
|
-
/* @__PURE__ */ import_react.default.createElement(
|
|
204
|
-
import_like.default,
|
|
205
|
-
{
|
|
206
|
-
status: (_a2 = cur == null ? void 0 : cur[0]) == null ? void 0 : _a2.like_status,
|
|
207
|
-
className: `${(config == null ? void 0 : config.disabled) ? "like-icon-disabled" : ""}`
|
|
208
|
-
}
|
|
209
|
-
)
|
|
186
|
+
/* @__PURE__ */ import_react.default.createElement(import_like.default, { status: (_a2 = cur == null ? void 0 : cur[0]) == null ? void 0 : _a2.like_status })
|
|
210
187
|
), /* @__PURE__ */ import_react.default.createElement(
|
|
211
188
|
import_MaxLengthSelect.default,
|
|
212
189
|
{
|
|
@@ -227,35 +204,14 @@ var Resources = ({
|
|
|
227
204
|
showSearch: true,
|
|
228
205
|
filterOption: (str, option) => {
|
|
229
206
|
return ((option == null ? void 0 : option.labelText) || "").toLowerCase().includes((str || "").toLowerCase());
|
|
230
|
-
},
|
|
231
|
-
disabled: config == null ? void 0 : config.disabled
|
|
232
|
-
},
|
|
233
|
-
renderOptions(
|
|
234
|
-
item.renderList,
|
|
235
|
-
"id",
|
|
236
|
-
(config == null ? void 0 : config.resourceErrorIcon) ? "label" : "labelText",
|
|
237
|
-
"resource"
|
|
238
|
-
)
|
|
239
|
-
), (config == null ? void 0 : config.autoAllocation) ? /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
|
|
240
|
-
import_antd.Checkbox,
|
|
241
|
-
{
|
|
242
|
-
checked: getIsAutoAllocation(item.form_id),
|
|
243
|
-
onChange: (e) => {
|
|
244
|
-
handleCheckAutoAllocation(
|
|
245
|
-
item.form_id,
|
|
246
|
-
e.target.checked
|
|
247
|
-
);
|
|
248
207
|
}
|
|
249
|
-
}
|
|
250
|
-
), /* @__PURE__ */ import_react.default.createElement(
|
|
251
|
-
import_antd.Tooltip,
|
|
252
|
-
{
|
|
253
|
-
title: import_utils.locales.getText(
|
|
254
|
-
"page.booking.text.resource.check-auto-allocation-tip"
|
|
255
|
-
)
|
|
256
208
|
},
|
|
257
|
-
|
|
258
|
-
)) :
|
|
209
|
+
renderOptions(item.renderList, "id", "label", "resource")
|
|
210
|
+
), /* @__PURE__ */ import_react.default.createElement(import_antd.Checkbox, { checked: getIsAutoAllocation(item.form_id), onChange: (e) => {
|
|
211
|
+
handleCheckAutoAllocation(item.form_id, e.target.checked);
|
|
212
|
+
} }), /* @__PURE__ */ import_react.default.createElement(import_antd.Tooltip, { title: import_utils.locales.getText(
|
|
213
|
+
"page.booking.text.resource.check-auto-allocation-tip"
|
|
214
|
+
) }, /* @__PURE__ */ import_react.default.createElement(import_icons.QuestionCircleOutlined, null)))
|
|
259
215
|
), state.renderType !== "eventBooking" && (errors || []).map((d) => {
|
|
260
216
|
return /* @__PURE__ */ import_react.default.createElement(
|
|
261
217
|
import_antd.Alert,
|
|
@@ -180,12 +180,6 @@ var getErrorList = (resource, cacheItem) => {
|
|
|
180
180
|
}
|
|
181
181
|
}
|
|
182
182
|
}
|
|
183
|
-
if (resource.unbound) {
|
|
184
|
-
list.push({
|
|
185
|
-
label: import_utils.locales.getText("pisell1.text.resource-error-message-unbound"),
|
|
186
|
-
type: "time"
|
|
187
|
-
});
|
|
188
|
-
}
|
|
189
183
|
return list;
|
|
190
184
|
};
|
|
191
185
|
var formatResource = (resourceItem, cacheItem, formatLabel) => {
|
|
@@ -110,7 +110,6 @@ declare const _default: {
|
|
|
110
110
|
'pisell1.text.resource-error-message-1': (x: string, y: string) => string;
|
|
111
111
|
'pisell1.text.resource-error-message-2': (x: string, y: string, z: string) => string;
|
|
112
112
|
'pisell1.text.resource-error-message-3': (x: string, y: string, z: string) => string;
|
|
113
|
-
'pisell1.text.resource-error-message-unbound': string;
|
|
114
113
|
'pisell1.text.no-addons': string;
|
|
115
114
|
'pisell1.text.no-resource': string;
|
|
116
115
|
'pisell1.text.no-payments': string;
|
|
@@ -390,7 +389,6 @@ declare const _default: {
|
|
|
390
389
|
'pisell1.text.resource-error-message-1': (x: string, y: string) => string;
|
|
391
390
|
'pisell1.text.resource-error-message-2': (x: string, y: string, z: string) => string;
|
|
392
391
|
'pisell1.text.resource-error-message-3': (x: string, y: string, z: string) => string;
|
|
393
|
-
'pisell1.text.resource-error-message-unbound': string;
|
|
394
392
|
'pisell2.text.flexible': string;
|
|
395
393
|
'pisell2.text.order-discount': string;
|
|
396
394
|
'pisell2.text.no-product-added': string;
|
|
@@ -662,7 +660,6 @@ declare const _default: {
|
|
|
662
660
|
'pisell1.text.resource-error-message-1': (x: string, y: string) => string;
|
|
663
661
|
'pisell1.text.resource-error-message-2': (x: string, y: string, z: string) => string;
|
|
664
662
|
'pisell1.text.resource-error-message-3': (x: string, y: string, z: string) => string;
|
|
665
|
-
'pisell1.text.resource-error-message-unbound': string;
|
|
666
663
|
'pisell2.text.flexible': string;
|
|
667
664
|
'pisell2.text.order-discount': string;
|
|
668
665
|
'pisell2.text.no-product-added': string;
|
|
@@ -154,7 +154,6 @@ var locales_default = {
|
|
|
154
154
|
"pisell1.text.resource-error-message-1": (x, y) => `${x} doesn't provide ${y}, but your team member can still book appointments.`,
|
|
155
155
|
"pisell1.text.resource-error-message-2": (x, y, z) => `${x} isn't available between ${y} and ${z}, but your team member can still book appointments.`,
|
|
156
156
|
"pisell1.text.resource-error-message-3": (x, y, z) => `${x} is fully booked between ${y} and ${z}, but your team member can still book appointments.`,
|
|
157
|
-
"pisell1.text.resource-error-message-unbound": "This booking product is not associated with the target resource.",
|
|
158
157
|
"pisell1.text.no-addons": "No addons",
|
|
159
158
|
"pisell1.text.no-resource": "No resource",
|
|
160
159
|
"pisell1.text.no-payments": "No payments",
|
|
@@ -466,7 +465,6 @@ var locales_default = {
|
|
|
466
465
|
"pisell1.text.resource-error-message-1": (x, y) => `${x} 不提供 ${y},但您的团队成员仍然可以预约。`,
|
|
467
466
|
"pisell1.text.resource-error-message-2": (x, y, z) => `${x}在${y}到${z}之间不提供服务,但您的团队成员仍然可以预约。`,
|
|
468
467
|
"pisell1.text.resource-error-message-3": (x, y, z) => `${x}在${y}到${z}之间已约满,但您的团队成员仍然可以预约。`,
|
|
469
|
-
"pisell1.text.resource-error-message-unbound": "该预约商品未关联目标资源。",
|
|
470
468
|
"pisell2.text.flexible": "灵活",
|
|
471
469
|
"pisell2.text.order-discount": "折扣",
|
|
472
470
|
"pisell2.text.no-product-added": "未添加商品",
|
|
@@ -770,7 +768,6 @@ var locales_default = {
|
|
|
770
768
|
"pisell1.text.resource-error-message-1": (x, y) => `${x} 不提供 ${y},但您的團隊成員仍然可以預約。`,
|
|
771
769
|
"pisell1.text.resource-error-message-2": (x, y, z) => `${x}在${y}到${z}之間不提供服務,但您的團隊成員仍然可以預約。`,
|
|
772
770
|
"pisell1.text.resource-error-message-3": (x, y, z) => `${x}在${y}到${z}之間已約滿,但您的團隊成員仍然可以預約。`,
|
|
773
|
-
"pisell1.text.resource-error-message-unbound": "該預約商品未關聯目標資源。",
|
|
774
771
|
"pisell2.text.flexible": "靈活",
|
|
775
772
|
"pisell2.text.order-discount": "折扣",
|
|
776
773
|
"pisell2.text.no-product-added": "未添加商品",
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
export interface FormState {
|
|
3
2
|
amountSymbol: string;
|
|
4
3
|
apis: {
|
|
@@ -105,11 +104,4 @@ export declare const walkInData: {
|
|
|
105
104
|
id: number;
|
|
106
105
|
nickname: string;
|
|
107
106
|
};
|
|
108
|
-
export declare const Provider:
|
|
109
|
-
state: FormState;
|
|
110
|
-
} & {
|
|
111
|
-
dispatch: (params: {
|
|
112
|
-
type: string;
|
|
113
|
-
payload: any;
|
|
114
|
-
}) => void;
|
|
115
|
-
}>;
|
|
107
|
+
export declare const Provider: any, Context: any;
|
|
@@ -1,10 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { FormState } from "../model";
|
|
3
|
-
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
4
|
-
state: FormState;
|
|
5
|
-
} & {
|
|
6
|
-
dispatch: (params: {
|
|
7
|
-
type: string;
|
|
8
|
-
payload: any;
|
|
9
|
-
}) => void;
|
|
10
|
-
}>;
|
|
1
|
+
export declare const Provider: any, Context: any;
|
|
@@ -1,10 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { FormState } from "../model";
|
|
3
|
-
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
4
|
-
state: FormState;
|
|
5
|
-
} & {
|
|
6
|
-
dispatch: (params: {
|
|
7
|
-
type: string;
|
|
8
|
-
payload: any;
|
|
9
|
-
}) => void;
|
|
10
|
-
}>;
|
|
1
|
+
export declare const Provider: any, Context: any;
|
|
@@ -8,7 +8,7 @@ import { PosProps } from './const';
|
|
|
8
8
|
*/
|
|
9
9
|
declare const _default: ({ className, onChange, onClose, formatAmount, isMobile, net, client }: {
|
|
10
10
|
className?: string | undefined;
|
|
11
|
-
onChange?: ((status: "
|
|
11
|
+
onChange?: ((status: "success" | "page" | "print" | "fail" | "mark_tx_processed", params?: string | {
|
|
12
12
|
[keys: string]: unknown;
|
|
13
13
|
} | undefined, other?: any) => void) | undefined;
|
|
14
14
|
onClose: () => void;
|
|
@@ -10,7 +10,7 @@ import './device.less';
|
|
|
10
10
|
declare const _default: ({ api, onChange, onClose, className, device_number, isMobile, net, client, formatAmount, }: {
|
|
11
11
|
api: PayProps['api'];
|
|
12
12
|
className?: string | undefined;
|
|
13
|
-
onChange?: ((status: "
|
|
13
|
+
onChange?: ((status: "success" | "page" | "print" | "fail" | "mark_tx_processed", params?: string | {
|
|
14
14
|
[keys: string]: unknown;
|
|
15
15
|
} | undefined, other?: any) => void) | undefined;
|
|
16
16
|
onClose: () => void;
|
|
@@ -15,11 +15,11 @@ export declare const useStoreRef: <T extends {
|
|
|
15
15
|
readonly numRef: React.MutableRefObject<string | number | undefined>;
|
|
16
16
|
readonly orderIdRef: React.MutableRefObject<string | number>;
|
|
17
17
|
readonly modeRef: React.MutableRefObject<ModeEnum>;
|
|
18
|
-
readonly statusRef: React.MutableRefObject<"
|
|
18
|
+
readonly statusRef: React.MutableRefObject<"success" | "loading" | "warn" | "fail" | "pedding" | "resove" | "reject" | "question">;
|
|
19
19
|
readonly netRef: React.MutableRefObject<boolean | undefined>;
|
|
20
20
|
readonly symbolRef: React.MutableRefObject<string>;
|
|
21
21
|
readonly amountRef: React.MutableRefObject<string | number>;
|
|
22
|
-
readonly eftposRef: React.MutableRefObject<"
|
|
22
|
+
readonly eftposRef: React.MutableRefObject<"tyro" | "windcave" | "stripe" | "payo">;
|
|
23
23
|
readonly clientRef: React.MutableRefObject<ClientEnum>;
|
|
24
24
|
readonly dataRef: React.MutableRefObject<import("./store").State>;
|
|
25
25
|
};
|
|
@@ -174,7 +174,7 @@ export declare const updateCustom: (payload: {
|
|
|
174
174
|
export declare const updateStatus: (status: 'loading' | 'warn' | 'fail' | 'success' | 'question') => {
|
|
175
175
|
type: EActionTypes;
|
|
176
176
|
payload: {
|
|
177
|
-
status: "
|
|
177
|
+
status: "success" | "loading" | "warn" | "fail" | "question";
|
|
178
178
|
};
|
|
179
179
|
};
|
|
180
180
|
/**
|
|
@@ -297,7 +297,7 @@ export declare const backUpFree: (payload: Partial<State>) => {
|
|
|
297
297
|
amount?: string | number | undefined;
|
|
298
298
|
mode?: "refund" | "pay" | "fullPay" | "query" | undefined;
|
|
299
299
|
order_id?: string | number | undefined;
|
|
300
|
-
eftpos?: "
|
|
300
|
+
eftpos?: "tyro" | "windcave" | "stripe" | "payo" | undefined;
|
|
301
301
|
action?: "amount" | "pay" | "deviceList" | undefined;
|
|
302
302
|
key?: number | undefined;
|
|
303
303
|
step?: number | undefined;
|
|
@@ -308,7 +308,7 @@ export declare const backUpFree: (payload: Partial<State>) => {
|
|
|
308
308
|
net?: boolean | undefined;
|
|
309
309
|
component?: string | undefined;
|
|
310
310
|
form?: string | undefined;
|
|
311
|
-
status?: "
|
|
311
|
+
status?: "success" | "loading" | "warn" | "fail" | "pedding" | "resove" | "reject" | "question" | undefined;
|
|
312
312
|
warn?: string | undefined;
|
|
313
313
|
steps?: {
|
|
314
314
|
/** 用于重置当前步骤 */
|
|
@@ -48,7 +48,6 @@ var Event = () => {
|
|
|
48
48
|
const { onOpenEventDetail, open } = (0, import_Sales.useEventDetail)();
|
|
49
49
|
const [lists, setLists] = (0, import_react.useState)();
|
|
50
50
|
const customer = (0, import_useLoginUser.default)();
|
|
51
|
-
const { appUtils } = (0, import_Sales.useCustomer)();
|
|
52
51
|
(0, import_react.useEffect)(() => {
|
|
53
52
|
var _a2;
|
|
54
53
|
const eventList = (eventData == null ? void 0 : eventData.eventList) || [];
|
|
@@ -60,22 +59,16 @@ var Event = () => {
|
|
|
60
59
|
}
|
|
61
60
|
}, [eventData == null ? void 0 : eventData.eventList]);
|
|
62
61
|
(0, import_react.useEffect)(() => {
|
|
63
|
-
var _a2, _b2
|
|
62
|
+
var _a2, _b2;
|
|
64
63
|
const id = (_b2 = (_a2 = data == null ? void 0 : data.resourceData) == null ? void 0 : _a2.currentResourceItem) == null ? void 0 : _b2.id;
|
|
65
64
|
if (!id) return;
|
|
66
|
-
|
|
67
|
-
const query = (_d = history == null ? void 0 : history.location) == null ? void 0 : _d.query;
|
|
68
|
-
const params = {
|
|
65
|
+
getEventList.run({
|
|
69
66
|
event_item_resource_id: id,
|
|
70
67
|
skip: 1,
|
|
71
68
|
num: 100,
|
|
72
69
|
customer_id: customer == null ? void 0 : customer.id,
|
|
73
70
|
open_quotation: 1
|
|
74
|
-
};
|
|
75
|
-
if (query == null ? void 0 : query.ids) {
|
|
76
|
-
params.ids = (_e = query == null ? void 0 : query.ids) == null ? void 0 : _e.split(",");
|
|
77
|
-
}
|
|
78
|
-
getEventList.run(params);
|
|
71
|
+
});
|
|
79
72
|
}, [(_b = (_a = data == null ? void 0 : data.resourceData) == null ? void 0 : _a.currentResourceItem) == null ? void 0 : _b.id, customer == null ? void 0 : customer.id]);
|
|
80
73
|
const handleClick = (item) => {
|
|
81
74
|
selectEvent(item);
|
|
@@ -44,7 +44,7 @@ var import_OrderProductModal = __toESM(require("../Provider/OrderProductModal/in
|
|
|
44
44
|
var import_index = require("./index.less");
|
|
45
45
|
var import_useEngineContext = __toESM(require("../../../../hooks/useEngineContext"));
|
|
46
46
|
var BookingDetailModal = (props) => {
|
|
47
|
-
var _a
|
|
47
|
+
var _a;
|
|
48
48
|
const modalContentRef = (0, import_react.useRef)(null);
|
|
49
49
|
const context = (0, import_useEngineContext.default)();
|
|
50
50
|
const { utils } = context.appHelper || {};
|
|
@@ -58,17 +58,11 @@ var BookingDetailModal = (props) => {
|
|
|
58
58
|
checkBeforeSelectEventDetail
|
|
59
59
|
} = (0, import_Sales.useEventDetail)();
|
|
60
60
|
const { addToCart, checkBeforeAddToCart, checkBeforeAddToCartResquest } = (0, import_Sales.useCart)();
|
|
61
|
-
const { initData } = (0, import_Sales.useInit)();
|
|
62
61
|
const [activeTab, setActiveTab] = (0, import_react.useState)("introduction");
|
|
63
62
|
const [isScrolling, setIsScrolling] = (0, import_react.useState)(false);
|
|
64
63
|
const [openCheckout, setOpenCheckout] = (0, import_react.useState)(false);
|
|
65
64
|
const isUserClickRef = (0, import_react.useRef)(false);
|
|
66
65
|
const scrollTimeoutRef = (0, import_react.useRef)(null);
|
|
67
|
-
const buttonText = (0, import_react.useMemo)(() => {
|
|
68
|
-
var _a2, _b2, _c2;
|
|
69
|
-
const config = ((_b2 = (_a2 = initData == null ? void 0 : initData.boardSetting) == null ? void 0 : _a2.config) == null ? void 0 : _b2.product_display_setting) || {};
|
|
70
|
-
return ((_c2 = utils == null ? void 0 : utils.translation) == null ? void 0 : _c2.call(utils, config == null ? void 0 : config.booking_event_v2_product_detail_button)) || import_utils.locales.getText("pisell2.event.add.to.cart");
|
|
71
|
-
}, [(_b = (_a = initData == null ? void 0 : initData.boardSetting) == null ? void 0 : _a.config) == null ? void 0 : _b.product_display_setting]);
|
|
72
66
|
const anchorOptions = (0, import_react.useMemo)(
|
|
73
67
|
() => [
|
|
74
68
|
{
|
|
@@ -97,7 +91,7 @@ var BookingDetailModal = (props) => {
|
|
|
97
91
|
const images = (0, import_react.useMemo)(() => {
|
|
98
92
|
var _a2;
|
|
99
93
|
return ((_a2 = detail == null ? void 0 : detail.introduction) == null ? void 0 : _a2.images) || [];
|
|
100
|
-
}, [(
|
|
94
|
+
}, [(_a = detail == null ? void 0 : detail.introduction) == null ? void 0 : _a.images]);
|
|
101
95
|
(0, import_react.useEffect)(() => {
|
|
102
96
|
if (!modalContentRef.current) return;
|
|
103
97
|
let isCurrentlyScrolling = false;
|
|
@@ -289,7 +283,7 @@ var BookingDetailModal = (props) => {
|
|
|
289
283
|
destroyOnClose: true,
|
|
290
284
|
className: "booking-detail-modal",
|
|
291
285
|
onCancel: onCloseEventDetail,
|
|
292
|
-
okText:
|
|
286
|
+
okText: import_utils.locales.getText("pisell2.event.add.to.cart"),
|
|
293
287
|
cancelVisible: false,
|
|
294
288
|
onOk: handleOk,
|
|
295
289
|
width: (0, import_utils.isMobile)() ? "100%" : 600,
|
|
@@ -55,17 +55,13 @@ var Content = () => {
|
|
|
55
55
|
getBoardSetting.run({ item_type: "event_booking_v2" });
|
|
56
56
|
}, []);
|
|
57
57
|
(0, import_react.useEffect)(() => {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
};
|
|
64
|
-
|
|
65
|
-
params.event_item_ids = (_c = query == null ? void 0 : query.ids) == null ? void 0 : _c.split(",");
|
|
66
|
-
}
|
|
67
|
-
getResourceList.run(params);
|
|
68
|
-
}, []);
|
|
58
|
+
if (!form_id) return;
|
|
59
|
+
getResourceList.run({
|
|
60
|
+
form_id,
|
|
61
|
+
shop_id,
|
|
62
|
+
form_data_status: "active"
|
|
63
|
+
});
|
|
64
|
+
}, [form_id]);
|
|
69
65
|
return /* @__PURE__ */ import_react.default.createElement(
|
|
70
66
|
"div",
|
|
71
67
|
{
|
|
@@ -51,7 +51,7 @@ var locales_default = {
|
|
|
51
51
|
"pisell2.event.campus": "Campus",
|
|
52
52
|
"pisell2.event.resource": "Location",
|
|
53
53
|
"pisell2.event.booking.options": "Booking options",
|
|
54
|
-
"pisell2.event.add.to.cart": "Add to
|
|
54
|
+
"pisell2.event.add.to.cart": "Add to cart",
|
|
55
55
|
"pisell2.event.description": "Description",
|
|
56
56
|
"pisell2.event.view.more": "View more",
|
|
57
57
|
"pisell2.event.view.less": "View less",
|
|
@@ -124,7 +124,7 @@ var locales_default = {
|
|
|
124
124
|
"pisell2.event.campus": "校区",
|
|
125
125
|
"pisell2.event.resource": "资源",
|
|
126
126
|
"pisell2.event.booking.options": "预约选项",
|
|
127
|
-
"pisell2.event.add.to.cart": "
|
|
127
|
+
"pisell2.event.add.to.cart": "添加到购物车",
|
|
128
128
|
"pisell2.event.description": "描述",
|
|
129
129
|
"pisell2.event.view.more": "查看更多",
|
|
130
130
|
"pisell2.event.view.less": "收起",
|
|
@@ -197,7 +197,7 @@ var locales_default = {
|
|
|
197
197
|
"pisell2.event.campus": "校區",
|
|
198
198
|
"pisell2.event.resource": "資源",
|
|
199
199
|
"pisell2.event.booking.options": "預約選項",
|
|
200
|
-
"pisell2.event.add.to.cart": "
|
|
200
|
+
"pisell2.event.add.to.cart": "添加到購物車",
|
|
201
201
|
"pisell2.event.description": "描述",
|
|
202
202
|
"pisell2.event.view.more": "查看更多",
|
|
203
203
|
"pisell2.event.view.less": "收起",
|
|
@@ -15,6 +15,4 @@ import WorkspaceListDetail from './workSpaceListDetail/';
|
|
|
15
15
|
import WorkspaceList from './workSpaceList';
|
|
16
16
|
import PisellSelectCustomerModal from './pisellSelectCustomerModal';
|
|
17
17
|
import SubTotal from './subTotal';
|
|
18
|
-
|
|
19
|
-
import EditBookingModal from './booking/editBookingModal';
|
|
20
|
-
export { Login, BookingInfo, Booking, BookingNotes, BookingAddons, BookingForms, Schedules, ProductExtension, RuleSetting, TaxSelect, ToCPay, PisellSelectCustomerModal, Wallet, WalletList, WorkspaceList, WorkspaceListDetail, SubTotal, StepController, EditBookingModal };
|
|
18
|
+
export { Login, BookingInfo, Booking, BookingNotes, BookingAddons, BookingForms, Schedules, ProductExtension, RuleSetting, TaxSelect, ToCPay, PisellSelectCustomerModal, Wallet, WalletList, WorkspaceList, WorkspaceListDetail, SubTotal, };
|
package/lib/components/index.js
CHANGED
|
@@ -34,13 +34,11 @@ __export(components_exports, {
|
|
|
34
34
|
BookingForms: () => import_forms.default,
|
|
35
35
|
BookingInfo: () => import_info.default,
|
|
36
36
|
BookingNotes: () => import_notes.default,
|
|
37
|
-
EditBookingModal: () => import_editBookingModal.default,
|
|
38
37
|
Login: () => import_login.default,
|
|
39
38
|
PisellSelectCustomerModal: () => import_pisellSelectCustomerModal.default,
|
|
40
39
|
ProductExtension: () => import_productExtension.default,
|
|
41
40
|
RuleSetting: () => import_ruleSetting.default,
|
|
42
41
|
Schedules: () => import_schedules.default,
|
|
43
|
-
StepController: () => import_stepController.default,
|
|
44
42
|
SubTotal: () => import_subTotal.default,
|
|
45
43
|
TaxSelect: () => import_taxSelect.default,
|
|
46
44
|
ToCPay: () => import_toC.default,
|
|
@@ -67,8 +65,6 @@ var import_workSpaceListDetail = __toESM(require("./workSpaceListDetail/"));
|
|
|
67
65
|
var import_workSpaceList = __toESM(require("./workSpaceList"));
|
|
68
66
|
var import_pisellSelectCustomerModal = __toESM(require("./pisellSelectCustomerModal"));
|
|
69
67
|
var import_subTotal = __toESM(require("./subTotal"));
|
|
70
|
-
var import_stepController = __toESM(require("./stepController"));
|
|
71
|
-
var import_editBookingModal = __toESM(require("./booking/editBookingModal"));
|
|
72
68
|
// Annotate the CommonJS export names for ESM import in node:
|
|
73
69
|
0 && (module.exports = {
|
|
74
70
|
Booking,
|
|
@@ -76,13 +72,11 @@ var import_editBookingModal = __toESM(require("./booking/editBookingModal"));
|
|
|
76
72
|
BookingForms,
|
|
77
73
|
BookingInfo,
|
|
78
74
|
BookingNotes,
|
|
79
|
-
EditBookingModal,
|
|
80
75
|
Login,
|
|
81
76
|
PisellSelectCustomerModal,
|
|
82
77
|
ProductExtension,
|
|
83
78
|
RuleSetting,
|
|
84
79
|
Schedules,
|
|
85
|
-
StepController,
|
|
86
80
|
SubTotal,
|
|
87
81
|
TaxSelect,
|
|
88
82
|
ToCPay,
|
|
@@ -65,7 +65,7 @@ var isOfflinePayment = (type) => {
|
|
|
65
65
|
].includes(type);
|
|
66
66
|
};
|
|
67
67
|
var PaymentMethods = (props, ref) => {
|
|
68
|
-
var _a
|
|
68
|
+
var _a;
|
|
69
69
|
const MWCreditCardRef2 = (0, import_react.useRef)(null);
|
|
70
70
|
const SuperPayAliPayH5Ref2 = (0, import_react.useRef)(null);
|
|
71
71
|
const StripePayRef2 = (0, import_react.useRef)(null);
|
|
@@ -83,9 +83,9 @@ var PaymentMethods = (props, ref) => {
|
|
|
83
83
|
const context = (0, import_useEngineContext.default)();
|
|
84
84
|
const { interaction } = (_a = context.appHelper) == null ? void 0 : _a.utils;
|
|
85
85
|
const init = async ({ type, payGroup }) => {
|
|
86
|
-
var _a2,
|
|
86
|
+
var _a2, _b;
|
|
87
87
|
const waitAmount = (payGroup == null ? void 0 : payGroup.wait_amount) || 0;
|
|
88
|
-
const cards = (
|
|
88
|
+
const cards = (_b = (_a2 = payGroup == null ? void 0 : payGroup.walletPass) == null ? void 0 : _a2.cards) == null ? void 0 : _b.length;
|
|
89
89
|
if (cards && (waitAmount <= 0 || isOfflinePayment(type))) {
|
|
90
90
|
try {
|
|
91
91
|
await (0, import_serve.walletPassPay)((0, import_utils.formatWalletPassParams)(payGroup));
|
|
@@ -115,11 +115,10 @@ var PaymentMethods = (props, ref) => {
|
|
|
115
115
|
}
|
|
116
116
|
await onPayByType({ type, payGroup });
|
|
117
117
|
};
|
|
118
|
-
console.log("paymentResult isAppEnv", (_c = (_b = interaction == null ? void 0 : interaction.utils) == null ? void 0 : _b.isAppEnv) == null ? void 0 : _c.call(_b), interaction, context);
|
|
119
118
|
(0, import_react.useEffect)(() => {
|
|
120
|
-
var _a2,
|
|
121
|
-
console.log("paymentResult isAppEnv", (
|
|
122
|
-
if ((_d = (
|
|
119
|
+
var _a2, _b, _c, _d;
|
|
120
|
+
console.log("paymentResult isAppEnv", (_b = (_a2 = interaction == null ? void 0 : interaction.utils) == null ? void 0 : _a2.isAppEnv) == null ? void 0 : _b.call(_a2));
|
|
121
|
+
if ((_d = (_c = interaction == null ? void 0 : interaction.utils) == null ? void 0 : _c.isAppEnv) == null ? void 0 : _d.call(_c)) {
|
|
123
122
|
interaction.utils.mountFunction("global", "paymentResult", (strResult) => {
|
|
124
123
|
console.log("paymentResult", strResult);
|
|
125
124
|
if (!(0, import_utils2.isJson)(strResult)) return;
|
|
@@ -135,18 +134,18 @@ var PaymentMethods = (props, ref) => {
|
|
|
135
134
|
}
|
|
136
135
|
}, []);
|
|
137
136
|
const onPayByType = async ({ type, payGroup }) => {
|
|
138
|
-
var _a2,
|
|
137
|
+
var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
|
|
139
138
|
console.log(type, payGroup);
|
|
140
139
|
if (type === "mw.apple") {
|
|
141
140
|
await ((_a2 = ApplePayRef2.current) == null ? void 0 : _a2.init({ payGroup }));
|
|
142
141
|
return;
|
|
143
142
|
}
|
|
144
143
|
if (type === "mw.google") {
|
|
145
|
-
await ((
|
|
144
|
+
await ((_b = GooglePayRef2.current) == null ? void 0 : _b.init({ payGroup }));
|
|
146
145
|
return;
|
|
147
146
|
}
|
|
148
147
|
if (type === "mw.credit_card") {
|
|
149
|
-
(
|
|
148
|
+
(_c = MWCreditCardRef2.current) == null ? void 0 : _c.init({ payGroup });
|
|
150
149
|
return;
|
|
151
150
|
}
|
|
152
151
|
if (type === "superpay.alipay.h5") {
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
export interface FormState {
|
|
3
2
|
platform: 'pc' | 'h5' | '' | undefined;
|
|
4
3
|
order: any;
|
|
@@ -29,11 +28,4 @@ export interface PayGroup {
|
|
|
29
28
|
pay_number?: string;
|
|
30
29
|
_order: any;
|
|
31
30
|
}
|
|
32
|
-
export declare const Provider:
|
|
33
|
-
state: FormState;
|
|
34
|
-
} & {
|
|
35
|
-
dispatch: (params: {
|
|
36
|
-
type: string;
|
|
37
|
-
payload: any;
|
|
38
|
-
}) => void;
|
|
39
|
-
}>;
|
|
31
|
+
export declare const Provider: any, Context: any;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { CalendarDataItem, ScheduleItem } from "./type";
|
|
3
2
|
import dayjs from "dayjs";
|
|
4
3
|
export interface FormState {
|
|
@@ -69,11 +68,4 @@ export interface FormState {
|
|
|
69
68
|
};
|
|
70
69
|
setGlobalState: Function | null;
|
|
71
70
|
}
|
|
72
|
-
export declare const Provider:
|
|
73
|
-
state: FormState;
|
|
74
|
-
} & {
|
|
75
|
-
dispatch: (params: {
|
|
76
|
-
type: string;
|
|
77
|
-
payload: any;
|
|
78
|
-
}) => void;
|
|
79
|
-
}>;
|
|
71
|
+
export declare const Provider: any, Context: any;
|
|
@@ -17,6 +17,6 @@ declare let modal: Omit<ModalStaticFunctions, "warn">;
|
|
|
17
17
|
export declare const setModal: (m: Omit<ModalStaticFunctions, "warn">) => void;
|
|
18
18
|
export declare const saveConfirm: () => Promise<{
|
|
19
19
|
destroy: () => void;
|
|
20
|
-
update: (configUpdate: import("antd").ModalFuncProps | ((prevConfig: import("antd").ModalFuncProps) => import("antd").ModalFuncProps)) => void;
|
|
20
|
+
update: (configUpdate: import("antd/es/modal/interface").ModalFuncProps | ((prevConfig: import("antd/es/modal/interface").ModalFuncProps) => import("antd/es/modal/interface").ModalFuncProps)) => void;
|
|
21
21
|
}>;
|
|
22
22
|
export { modal };
|