@pisell/private-materials 3.4.86 → 3.4.88
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/meta.js +2 -2
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +2 -2
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +2 -2
- package/es/components/booking/addons/model.d.ts +1 -10
- package/es/components/booking/forms/model.d.ts +1 -10
- package/es/components/booking/forms/sendModal/useSendModal.d.ts +1 -0
- package/es/components/booking/hooks/useClearCart.d.ts +1 -1
- package/es/components/booking/hooks/useClearCart.js +39 -9
- package/es/components/booking/info/hooks/useInfoHolder.d.ts +1 -0
- package/es/components/booking/info/model.d.ts +1 -10
- package/es/components/booking/info/service/addService/utils.d.ts +1 -1
- package/es/components/booking/info/service/index.less +4 -2
- package/es/components/booking/info2/service/addService/utils.d.ts +1 -1
- package/es/components/booking/locales.d.ts +20 -0
- package/es/components/booking/locales.js +20 -0
- package/es/components/booking/model.d.ts +1 -9
- package/es/components/booking/notes/model.d.ts +1 -10
- package/es/components/booking/payments/model.d.ts +1 -10
- package/es/components/booking/utils.d.ts +2 -2
- 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 +6 -6
- package/es/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +1 -0
- package/es/components/pay/toC/PaymentList/serve.js +2 -2
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +1 -0
- package/es/components/pay/toC/model.d.ts +1 -9
- package/es/components/pay/toC/serve.js +2 -2
- package/es/components/schedules/model.d.ts +1 -9
- package/es/components/shoppingCart/components/Cart/index.less +1 -0
- package/es/components/shoppingCart/components/Empty/index.d.ts +1 -0
- package/es/components/shoppingCart/hooks/useClearCart.d.ts +1 -1
- package/es/components/shoppingCart/hooks/useClearCart.js +41 -11
- package/es/plus/pisellSalesManagement/components/BookingFormsPreview.js +11 -1
- package/es/plus/pisellSalesManagement/config/booking.d.ts +7 -6
- package/es/plus/selectHolder/components/ErrorTip/index.d.ts +1 -0
- package/es/plus/walletEditor/components/ImageUpload/index.d.ts +1 -1
- package/es/plus/walletPassGallery/components/recharge/index.js +13 -5
- package/es/plus/walletPassGallery/components/recharge/index.less +70 -1
- package/es/plus/walletPassGallery/locales.d.ts +10 -0
- package/es/plus/walletPassGallery/locales.js +26 -5
- package/es/pro/Selector/Selector.d.ts +1 -1
- package/lib/components/booking/addons/model.d.ts +1 -10
- package/lib/components/booking/forms/model.d.ts +1 -10
- package/lib/components/booking/forms/sendModal/useSendModal.d.ts +1 -0
- package/lib/components/booking/hooks/useClearCart.d.ts +1 -1
- package/lib/components/booking/hooks/useClearCart.js +28 -6
- package/lib/components/booking/info/hooks/useInfoHolder.d.ts +1 -0
- package/lib/components/booking/info/model.d.ts +1 -10
- package/lib/components/booking/info/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/info/service/index.less +4 -2
- package/lib/components/booking/info2/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/locales.d.ts +20 -0
- package/lib/components/booking/locales.js +20 -0
- 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/booking/utils.d.ts +2 -2
- 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 +6 -6
- package/lib/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +1 -0
- package/lib/components/pay/toC/PaymentList/serve.js +1 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +1 -0
- package/lib/components/pay/toC/model.d.ts +1 -9
- package/lib/components/pay/toC/serve.js +1 -1
- package/lib/components/schedules/model.d.ts +1 -9
- package/lib/components/shoppingCart/components/Cart/index.less +1 -0
- package/lib/components/shoppingCart/components/Empty/index.d.ts +1 -0
- package/lib/components/shoppingCart/hooks/useClearCart.d.ts +1 -1
- package/lib/components/shoppingCart/hooks/useClearCart.js +42 -11
- package/lib/plus/pisellSalesManagement/components/BookingFormsPreview.js +5 -2
- package/lib/plus/pisellSalesManagement/config/booking.d.ts +7 -6
- package/lib/plus/selectHolder/components/ErrorTip/index.d.ts +1 -0
- package/lib/plus/walletEditor/components/ImageUpload/index.d.ts +1 -1
- package/lib/plus/walletPassGallery/components/recharge/index.js +7 -5
- package/lib/plus/walletPassGallery/components/recharge/index.less +70 -1
- package/lib/plus/walletPassGallery/locales.d.ts +10 -0
- package/lib/plus/walletPassGallery/locales.js +20 -5
- package/lib/pro/Selector/Selector.d.ts +1 -1
- package/lowcode/eco-cup-list/meta.ts +20 -56
- package/lowcode/eco-customer-list/meta.ts +20 -56
- package/package.json +4 -4
|
@@ -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;
|
|
@@ -2,29 +2,59 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
2
2
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
3
3
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
4
4
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
5
|
-
|
|
5
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
6
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
7
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
8
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
9
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
10
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
11
|
+
import React, { useMemo, useState, useCallback } from 'react';
|
|
6
12
|
import classNames from 'classnames';
|
|
7
|
-
import { Iconfont } from '@pisell/materials';
|
|
13
|
+
import { Iconfont, PisellModal } from '@pisell/materials';
|
|
8
14
|
import { locales } from "@pisell/utils";
|
|
9
15
|
var useClearCart = function useClearCart(state, dispatch) {
|
|
10
16
|
var _state$service3;
|
|
11
|
-
var
|
|
12
|
-
|
|
17
|
+
var _useState = useState(false),
|
|
18
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
19
|
+
open = _useState2[0],
|
|
20
|
+
setOpen = _useState2[1];
|
|
21
|
+
var handleOpenModal = useCallback(function () {
|
|
22
|
+
setOpen(true);
|
|
23
|
+
}, []);
|
|
24
|
+
var handleConfirm = useCallback(function () {
|
|
13
25
|
dispatch({
|
|
14
26
|
type: 'setService',
|
|
15
27
|
payload: {
|
|
16
28
|
value: []
|
|
17
29
|
}
|
|
18
30
|
});
|
|
19
|
-
|
|
31
|
+
setOpen(false);
|
|
32
|
+
}, []);
|
|
33
|
+
var handleCancel = useCallback(function () {
|
|
34
|
+
setOpen(false);
|
|
35
|
+
}, []);
|
|
20
36
|
return useMemo(function () {
|
|
21
37
|
var _state$service, _state$service2;
|
|
22
|
-
|
|
38
|
+
var showClearBtn = !!((_state$service = state.service) !== null && _state$service !== void 0 && (_state$service = _state$service.value) !== null && _state$service !== void 0 && _state$service.length) && !state.channelDisabledEdit;
|
|
39
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, showClearBtn && /*#__PURE__*/React.createElement("span", {
|
|
23
40
|
className: classNames('pisell-lowcode__booking-service-clear-btn', _defineProperty({}, 'pisell-lowcode__booking-service-clear-btn-disabled', !((_state$service2 = state.service) !== null && _state$service2 !== void 0 && (_state$service2 = _state$service2.value) !== null && _state$service2 !== void 0 && _state$service2.length))),
|
|
24
|
-
onClick:
|
|
41
|
+
onClick: handleOpenModal
|
|
25
42
|
}, /*#__PURE__*/React.createElement(Iconfont, {
|
|
26
43
|
type: "pisell2-trash-01"
|
|
27
|
-
}), " ", /*#__PURE__*/React.createElement("span", null, locales.getText('pisell2.booking.info.text.clear-cart')))
|
|
28
|
-
|
|
44
|
+
}), " ", /*#__PURE__*/React.createElement("span", null, locales.getText('pisell2.booking.info.text.clear-cart'))), /*#__PURE__*/React.createElement(PisellModal, {
|
|
45
|
+
open: open,
|
|
46
|
+
platform: "pc",
|
|
47
|
+
title: locales.getText('pisell2.booking.info.text.clear-cart-modal.title'),
|
|
48
|
+
onOk: handleConfirm,
|
|
49
|
+
onCancel: handleCancel,
|
|
50
|
+
okText: locales.getText('pisell2.booking.info.text.clear-cart-modal.confirm'),
|
|
51
|
+
cancelText: locales.getText('pisell2.booking.info.text.clear-cart-modal.cancel'),
|
|
52
|
+
destroyOnClose: true
|
|
53
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
54
|
+
style: {
|
|
55
|
+
margin: '24px 0'
|
|
56
|
+
}
|
|
57
|
+
}, /*#__PURE__*/React.createElement("span", null, locales.getText('pisell2.booking.info.text.clear-cart-modal.content')))));
|
|
58
|
+
}, [(_state$service3 = state.service) === null || _state$service3 === void 0 || (_state$service3 = _state$service3.value) === null || _state$service3 === void 0 ? void 0 : _state$service3.length, state.channelDisabledEdit, open]);
|
|
29
59
|
};
|
|
30
60
|
export default useClearCart;
|
|
@@ -1,14 +1,5 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { FormState } from '../model';
|
|
3
1
|
export declare const walkInData: {
|
|
4
2
|
id: number;
|
|
5
3
|
nickname: string;
|
|
6
4
|
};
|
|
7
|
-
export declare const Provider:
|
|
8
|
-
state: FormState;
|
|
9
|
-
} & {
|
|
10
|
-
dispatch: (params: {
|
|
11
|
-
type: string;
|
|
12
|
-
payload: any;
|
|
13
|
-
}) => void;
|
|
14
|
-
}>;
|
|
5
|
+
export declare const Provider: any, Context: any;
|
|
@@ -8,8 +8,10 @@
|
|
|
8
8
|
line-height: 24px; /* 150% */
|
|
9
9
|
display: flex;
|
|
10
10
|
align-items: center;
|
|
11
|
-
margin-bottom:
|
|
12
|
-
padding: 12px 0;
|
|
11
|
+
margin-bottom: 16px !important;
|
|
12
|
+
// padding: 12px 0;
|
|
13
|
+
padding: 0 !important;
|
|
14
|
+
width: max-content;
|
|
13
15
|
.anticon {
|
|
14
16
|
font-size: 18px;
|
|
15
17
|
margin-right: 6px;
|
|
@@ -227,6 +227,10 @@ declare const _default: {
|
|
|
227
227
|
'pisell2.booking.dashboard.default': string;
|
|
228
228
|
'pisell2.booking.info.text.clear-cart': string;
|
|
229
229
|
'pisell2.booking.info.text.clear-all': string;
|
|
230
|
+
'pisell2.booking.info.text.clear-cart-modal.title': string;
|
|
231
|
+
'pisell2.booking.info.text.clear-cart-modal.content': string;
|
|
232
|
+
'pisell2.booking.info.text.clear-cart-modal.confirm': string;
|
|
233
|
+
'pisell2.booking.info.text.clear-cart-modal.cancel': string;
|
|
230
234
|
'pisell2.booking.info.text.create-new': string;
|
|
231
235
|
'pisell2.booking.info.text.form-agreement-yes': string;
|
|
232
236
|
'pisell2.booking.info.text.form-agreement-no': string;
|
|
@@ -505,6 +509,10 @@ declare const _default: {
|
|
|
505
509
|
'pisell2.booking.dashboard.default': string;
|
|
506
510
|
'pisell2.booking.info.text.clear-cart': string;
|
|
507
511
|
'pisell2.booking.info.text.clear-all': string;
|
|
512
|
+
'pisell2.booking.info.text.clear-cart-modal.title': string;
|
|
513
|
+
'pisell2.booking.info.text.clear-cart-modal.content': string;
|
|
514
|
+
'pisell2.booking.info.text.clear-cart-modal.confirm': string;
|
|
515
|
+
'pisell2.booking.info.text.clear-cart-modal.cancel': string;
|
|
508
516
|
'pisell2.booking.info.text.create-new': string;
|
|
509
517
|
'pisell2.booking.info.text.form-agreement-yes': string;
|
|
510
518
|
'pisell2.booking.info.text.form-agreement-no': string;
|
|
@@ -783,6 +791,10 @@ declare const _default: {
|
|
|
783
791
|
'pisell2.booking.dashboard.default': string;
|
|
784
792
|
'pisell2.booking.info.text.clear-cart': string;
|
|
785
793
|
'pisell2.booking.info.text.clear-all': string;
|
|
794
|
+
'pisell2.booking.info.text.clear-cart-modal.title': string;
|
|
795
|
+
'pisell2.booking.info.text.clear-cart-modal.content': string;
|
|
796
|
+
'pisell2.booking.info.text.clear-cart-modal.confirm': string;
|
|
797
|
+
'pisell2.booking.info.text.clear-cart-modal.cancel': string;
|
|
786
798
|
'pisell2.booking.info.text.create-new': string;
|
|
787
799
|
'pisell2.booking.info.text.form-agreement-yes': string;
|
|
788
800
|
'pisell2.booking.info.text.form-agreement-no': string;
|
|
@@ -1067,6 +1079,10 @@ declare const _default: {
|
|
|
1067
1079
|
'pisell2.booking.info.text.clear': string;
|
|
1068
1080
|
'pisell2.booking.info.text.clear-cart': string;
|
|
1069
1081
|
'pisell2.booking.info.text.clear-all': string;
|
|
1082
|
+
'pisell2.booking.info.text.clear-cart-modal.title': string;
|
|
1083
|
+
'pisell2.booking.info.text.clear-cart-modal.content': string;
|
|
1084
|
+
'pisell2.booking.info.text.clear-cart-modal.confirm': string;
|
|
1085
|
+
'pisell2.booking.info.text.clear-cart-modal.cancel': string;
|
|
1070
1086
|
'pisell2.booking.info.text.add-holder': string;
|
|
1071
1087
|
'pisell2.booking.info.text.select-holder-title': string;
|
|
1072
1088
|
'pisell2.booking.info.text.create-new': string;
|
|
@@ -1381,6 +1397,10 @@ declare const _default: {
|
|
|
1381
1397
|
'pisell2.booking.info.text.clear': string;
|
|
1382
1398
|
'pisell2.booking.info.text.clear-cart': string;
|
|
1383
1399
|
'pisell2.booking.info.text.clear-all': string;
|
|
1400
|
+
'pisell2.booking.info.text.clear-cart-modal.title': string;
|
|
1401
|
+
'pisell2.booking.info.text.clear-cart-modal.content': string;
|
|
1402
|
+
'pisell2.booking.info.text.clear-cart-modal.confirm': string;
|
|
1403
|
+
'pisell2.booking.info.text.clear-cart-modal.cancel': string;
|
|
1384
1404
|
'pisell2.booking.info.text.add-holder': string;
|
|
1385
1405
|
'pisell2.booking.info.text.select-holder-title': string;
|
|
1386
1406
|
'pisell2.booking.info.text.create-new': string;
|
|
@@ -264,6 +264,10 @@ export default {
|
|
|
264
264
|
'pisell2.booking.dashboard.default': "Default",
|
|
265
265
|
'pisell2.booking.info.text.clear-cart': "Clear cart",
|
|
266
266
|
'pisell2.booking.info.text.clear-all': "Clear all",
|
|
267
|
+
'pisell2.booking.info.text.clear-cart-modal.title': 'Clear Cart',
|
|
268
|
+
'pisell2.booking.info.text.clear-cart-modal.content': 'This will remove all items from the cart and cannot be undone. Continue?',
|
|
269
|
+
'pisell2.booking.info.text.clear-cart-modal.confirm': 'Clear All',
|
|
270
|
+
'pisell2.booking.info.text.clear-cart-modal.cancel': 'Cancel',
|
|
267
271
|
'pisell2.booking.info.text.create-new': "Create new",
|
|
268
272
|
'pisell2.booking.info.text.form-agreement-yes': "Yes",
|
|
269
273
|
'pisell2.booking.info.text.form-agreement-no': "No",
|
|
@@ -592,6 +596,10 @@ export default {
|
|
|
592
596
|
'pisell2.booking.dashboard.default': "默认",
|
|
593
597
|
'pisell2.booking.info.text.clear-cart': "清空购物车",
|
|
594
598
|
'pisell2.booking.info.text.clear-all': "清空",
|
|
599
|
+
'pisell2.booking.info.text.clear-cart-modal.title': '清空购物车',
|
|
600
|
+
'pisell2.booking.info.text.clear-cart-modal.content': '此操作将移除购物车中的所有商品,且无法恢复,是否继续?',
|
|
601
|
+
'pisell2.booking.info.text.clear-cart-modal.confirm': '确认清空',
|
|
602
|
+
'pisell2.booking.info.text.clear-cart-modal.cancel': '取消',
|
|
595
603
|
'pisell2.booking.info.text.create-new': "新建",
|
|
596
604
|
'pisell2.booking.info.text.form-agreement-yes': "是",
|
|
597
605
|
'pisell2.booking.info.text.form-agreement-no': "否",
|
|
@@ -920,6 +928,10 @@ export default {
|
|
|
920
928
|
'pisell2.booking.dashboard.default': "默认",
|
|
921
929
|
'pisell2.booking.info.text.clear-cart': "清空購物車",
|
|
922
930
|
'pisell2.booking.info.text.clear-all': "清空",
|
|
931
|
+
'pisell2.booking.info.text.clear-cart-modal.title': '清空購物車',
|
|
932
|
+
'pisell2.booking.info.text.clear-cart-modal.content': '此操作將移除購物車中的所有商品,且無法恢復,是否繼續?',
|
|
933
|
+
'pisell2.booking.info.text.clear-cart-modal.confirm': '確認清空',
|
|
934
|
+
'pisell2.booking.info.text.clear-cart-modal.cancel': '取消',
|
|
923
935
|
'pisell2.booking.info.text.create-new': "新建",
|
|
924
936
|
'pisell2.booking.info.text.form-agreement-yes': "是",
|
|
925
937
|
'pisell2.booking.info.text.form-agreement-no': "否",
|
|
@@ -1250,6 +1262,10 @@ export default {
|
|
|
1250
1262
|
'pisell2.booking.info.text.clear': "クリア",
|
|
1251
1263
|
'pisell2.booking.info.text.clear-cart': "カートをクリア",
|
|
1252
1264
|
'pisell2.booking.info.text.clear-all': "すべてクリア",
|
|
1265
|
+
'pisell2.booking.info.text.clear-cart-modal.title': 'カートを空にする',
|
|
1266
|
+
'pisell2.booking.info.text.clear-cart-modal.content': 'この操作によりカート内のすべての商品が削除され、元に戻せません。続行しますか?',
|
|
1267
|
+
'pisell2.booking.info.text.clear-cart-modal.confirm': 'すべて削除',
|
|
1268
|
+
'pisell2.booking.info.text.clear-cart-modal.cancel': 'キャンセル',
|
|
1253
1269
|
'pisell2.booking.info.text.add-holder': "選択",
|
|
1254
1270
|
'pisell2.booking.info.text.select-holder-title': "このイベントを誰のために予約しますか?",
|
|
1255
1271
|
'pisell2.booking.info.text.create-new': "新規作成",
|
|
@@ -1611,6 +1627,10 @@ export default {
|
|
|
1611
1627
|
'pisell2.booking.info.text.clear': "Limpar",
|
|
1612
1628
|
'pisell2.booking.info.text.clear-cart': "Limpar carrinho",
|
|
1613
1629
|
'pisell2.booking.info.text.clear-all': "Limpar tudo",
|
|
1630
|
+
'pisell2.booking.info.text.clear-cart-modal.title': 'Esvaziar carrinho',
|
|
1631
|
+
'pisell2.booking.info.text.clear-cart-modal.content': 'Esta ação irá remover todos os itens do carrinho e não pode ser desfeita. Deseja continuar?',
|
|
1632
|
+
'pisell2.booking.info.text.clear-cart-modal.confirm': 'Esvaziar tudo',
|
|
1633
|
+
'pisell2.booking.info.text.clear-cart-modal.cancel': 'Cancelar',
|
|
1614
1634
|
'pisell2.booking.info.text.add-holder': "Selecionar",
|
|
1615
1635
|
'pisell2.booking.info.text.select-holder-title': "Para quem você gostaria de reservar este evento?",
|
|
1616
1636
|
'pisell2.booking.info.text.create-new': "Criar novo",
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
export interface FormState {
|
|
3
2
|
amountSymbol: string;
|
|
4
3
|
apis: {
|
|
@@ -109,11 +108,4 @@ export declare const walkInData: {
|
|
|
109
108
|
id: number;
|
|
110
109
|
nickname: string;
|
|
111
110
|
};
|
|
112
|
-
export declare const Provider:
|
|
113
|
-
state: FormState;
|
|
114
|
-
} & {
|
|
115
|
-
dispatch: (params: {
|
|
116
|
-
type: string;
|
|
117
|
-
payload: any;
|
|
118
|
-
}) => void;
|
|
119
|
-
}>;
|
|
111
|
+
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;
|
|
@@ -166,10 +166,10 @@ export declare const getProductTotalPrice: (item: any) => number;
|
|
|
166
166
|
export declare const getDuration: (duration: number | {
|
|
167
167
|
type: string;
|
|
168
168
|
value: number;
|
|
169
|
-
}) => number |
|
|
169
|
+
}) => number | {
|
|
170
170
|
type: string;
|
|
171
171
|
value: number;
|
|
172
|
-
};
|
|
172
|
+
} | "flexible";
|
|
173
173
|
export declare const isWalkIn: (customer_id?: number | string) => boolean;
|
|
174
174
|
export declare const getIsEdit: (state: any) => boolean;
|
|
175
175
|
export {};
|
|
@@ -9,7 +9,7 @@ import { PosProps } from './const';
|
|
|
9
9
|
*/
|
|
10
10
|
declare const _default: ({ className, onChange, onClose, formatAmount, isMobile, net, client }: {
|
|
11
11
|
className?: string | undefined;
|
|
12
|
-
onChange?: ((status: "
|
|
12
|
+
onChange?: ((status: "page" | "success" | "fail" | "print" | "mark_tx_processed", params?: string | {
|
|
13
13
|
[keys: string]: unknown;
|
|
14
14
|
} | undefined, other?: any) => void) | undefined;
|
|
15
15
|
onClose: () => void;
|
|
@@ -11,7 +11,7 @@ import './device.less';
|
|
|
11
11
|
declare const _default: ({ api, onChange, onClose, className, device_number, isMobile, net, client, formatAmount, }: {
|
|
12
12
|
api: PayProps['api'];
|
|
13
13
|
className?: string | undefined;
|
|
14
|
-
onChange?: ((status: "
|
|
14
|
+
onChange?: ((status: "page" | "success" | "fail" | "print" | "mark_tx_processed", params?: string | {
|
|
15
15
|
[keys: string]: unknown;
|
|
16
16
|
} | undefined, other?: any) => void) | undefined;
|
|
17
17
|
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<"loading" | "success" | "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<"payo" | "tyro" | "windcave" | "stripe" | "linkly">;
|
|
23
23
|
readonly clientRef: React.MutableRefObject<ClientEnum>;
|
|
24
24
|
readonly dataRef: React.MutableRefObject<import("./store").State>;
|
|
25
25
|
};
|
|
@@ -176,7 +176,7 @@ export declare const updateCustom: (payload: {
|
|
|
176
176
|
export declare const updateStatus: (status: 'loading' | 'warn' | 'fail' | 'success' | 'question') => {
|
|
177
177
|
type: EActionTypes;
|
|
178
178
|
payload: {
|
|
179
|
-
status: "
|
|
179
|
+
status: "loading" | "success" | "warn" | "fail" | "question";
|
|
180
180
|
};
|
|
181
181
|
};
|
|
182
182
|
/**
|
|
@@ -197,7 +197,7 @@ export declare const updateComponent: (component: string, render?: boolean) => {
|
|
|
197
197
|
} | {
|
|
198
198
|
readonly type: "step";
|
|
199
199
|
readonly render: boolean;
|
|
200
|
-
component?: undefined;
|
|
200
|
+
readonly component?: undefined;
|
|
201
201
|
};
|
|
202
202
|
};
|
|
203
203
|
/**
|
|
@@ -297,10 +297,10 @@ export declare const backUpFree: (payload: Partial<State>) => {
|
|
|
297
297
|
name?: string | undefined;
|
|
298
298
|
symbol?: string | undefined;
|
|
299
299
|
amount?: string | number | undefined;
|
|
300
|
-
mode?: "
|
|
300
|
+
mode?: "pay" | "fullPay" | "refund" | "query" | undefined;
|
|
301
301
|
order_id?: string | number | undefined;
|
|
302
|
-
eftpos?: "
|
|
303
|
-
action?: "
|
|
302
|
+
eftpos?: "payo" | "tyro" | "windcave" | "stripe" | "linkly" | undefined;
|
|
303
|
+
action?: "pay" | "amount" | "deviceList" | undefined;
|
|
304
304
|
key?: number | undefined;
|
|
305
305
|
step?: number | undefined;
|
|
306
306
|
title?: string | undefined;
|
|
@@ -310,7 +310,7 @@ export declare const backUpFree: (payload: Partial<State>) => {
|
|
|
310
310
|
net?: boolean | undefined;
|
|
311
311
|
component?: string | undefined;
|
|
312
312
|
form?: string | undefined;
|
|
313
|
-
status?: "
|
|
313
|
+
status?: "loading" | "success" | "warn" | "fail" | "pedding" | "resove" | "reject" | "question" | undefined;
|
|
314
314
|
warn?: string | undefined;
|
|
315
315
|
steps?: {
|
|
316
316
|
/** 用于重置当前步骤 */
|
|
@@ -15,7 +15,7 @@ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try
|
|
|
15
15
|
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
16
16
|
import { request } from "../../../../utils";
|
|
17
17
|
import { paymentKeys } from "./status";
|
|
18
|
-
import { isWx, isIOS } from '@pisell/utils';
|
|
18
|
+
import { isWx, isSafari, isIOS } from '@pisell/utils';
|
|
19
19
|
import { paymentTypes, isCustomPayment } from "./status";
|
|
20
20
|
import { formatCreditCardSurchargeList, formatCreditCardSurchargeText } from "./utils";
|
|
21
21
|
|
|
@@ -106,7 +106,7 @@ export var filterPaymentList = function filterPaymentList(list) {
|
|
|
106
106
|
// }
|
|
107
107
|
|
|
108
108
|
// 非IOS 隐藏苹果支付
|
|
109
|
-
if (!isIOS()) {
|
|
109
|
+
if (!isIOS() && !isSafari()) {
|
|
110
110
|
arr = arr.concat(['mw.apple']);
|
|
111
111
|
}
|
|
112
112
|
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
export interface FormState {
|
|
3
2
|
platform: 'pc' | 'h5' | '' | undefined;
|
|
4
3
|
order: any;
|
|
@@ -30,11 +29,4 @@ export interface PayGroup {
|
|
|
30
29
|
_order: any;
|
|
31
30
|
front_order_uuid?: string;
|
|
32
31
|
}
|
|
33
|
-
export declare const Provider:
|
|
34
|
-
state: FormState;
|
|
35
|
-
} & {
|
|
36
|
-
dispatch: (params: {
|
|
37
|
-
type: string;
|
|
38
|
-
payload: any;
|
|
39
|
-
}) => void;
|
|
40
|
-
}>;
|
|
32
|
+
export declare const Provider: any, Context: any;
|
|
@@ -9,7 +9,7 @@ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try
|
|
|
9
9
|
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
10
10
|
import { request } from "../../../utils";
|
|
11
11
|
import { paymentKeys } from "./status";
|
|
12
|
-
import { isWx, isIOS } from '@pisell/utils';
|
|
12
|
+
import { isWx, isSafari, isIOS } from '@pisell/utils';
|
|
13
13
|
|
|
14
14
|
// 获取支付列表
|
|
15
15
|
export var getPaymentList = /*#__PURE__*/function () {
|
|
@@ -44,7 +44,7 @@ export var getPaymentList = /*#__PURE__*/function () {
|
|
|
44
44
|
// }
|
|
45
45
|
|
|
46
46
|
// 非IOS 隐藏苹果支付
|
|
47
|
-
if (!isIOS()) {
|
|
47
|
+
if (!isIOS() && !isSafari()) {
|
|
48
48
|
arr = arr.concat(['mw.apple']);
|
|
49
49
|
}
|
|
50
50
|
|
|
@@ -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;
|
|
@@ -1,15 +1,23 @@
|
|
|
1
1
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
2
2
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
3
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
4
3
|
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
5
4
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
5
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
6
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
7
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
6
8
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
7
|
-
|
|
9
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
10
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
11
|
+
import React, { useState, useCallback, useMemo } from 'react';
|
|
8
12
|
import classNames from 'classnames';
|
|
9
|
-
import { Iconfont } from '@pisell/materials';
|
|
13
|
+
import { Iconfont, PisellModal } from '@pisell/materials';
|
|
10
14
|
import { useContext } from "./useContext";
|
|
11
15
|
import { locales } from '@pisell/utils';
|
|
12
16
|
var useClearCart = function useClearCart(key) {
|
|
17
|
+
var _useState = useState(false),
|
|
18
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
19
|
+
open = _useState2[0],
|
|
20
|
+
setOpen = _useState2[1];
|
|
13
21
|
var _useContext = useContext(),
|
|
14
22
|
state = _useContext.state,
|
|
15
23
|
onChange = _useContext.onChange;
|
|
@@ -36,6 +44,7 @@ var useClearCart = function useClearCart(key) {
|
|
|
36
44
|
return item === null || item === void 0 ? void 0 : item._id;
|
|
37
45
|
});
|
|
38
46
|
onChange(ids, 'delete_holders', key);
|
|
47
|
+
setOpen(false);
|
|
39
48
|
return;
|
|
40
49
|
products = products.filter(function (item) {
|
|
41
50
|
return (item === null || item === void 0 ? void 0 : item.holder_id) !== key;
|
|
@@ -46,13 +55,34 @@ var useClearCart = function useClearCart(key) {
|
|
|
46
55
|
// updateState(updateProduct(state, products));
|
|
47
56
|
// onChange(products);
|
|
48
57
|
};
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
},
|
|
55
|
-
|
|
56
|
-
|
|
58
|
+
var handleOpenModal = useCallback(function () {
|
|
59
|
+
setOpen(true);
|
|
60
|
+
}, []);
|
|
61
|
+
var handleCancel = useCallback(function () {
|
|
62
|
+
setOpen(false);
|
|
63
|
+
}, []);
|
|
64
|
+
return useMemo(function () {
|
|
65
|
+
var showClearBtn = !disabledEdit && (holders === null || holders === void 0 ? void 0 : holders.length) > 0 && !isHideClearCart;
|
|
66
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, showClearBtn ? /*#__PURE__*/React.createElement("span", {
|
|
67
|
+
className: classNames('pisell-lowcode__shopping-cart-clear-btn', {
|
|
68
|
+
'pisell-lowcode__shopping-cart-clear-btn-empty': isProductList
|
|
69
|
+
}),
|
|
70
|
+
onClick: handleOpenModal
|
|
71
|
+
}, /*#__PURE__*/React.createElement(Iconfont, {
|
|
72
|
+
type: "pisell2-trash-01"
|
|
73
|
+
}), /*#__PURE__*/React.createElement("span", null, locales.getText('pisell2.booking.info.text.clear-cart'))) : null, /*#__PURE__*/React.createElement(PisellModal, {
|
|
74
|
+
open: open,
|
|
75
|
+
title: locales.getText('pisell2.booking.info.text.clear-cart-modal.title'),
|
|
76
|
+
onOk: handleClear,
|
|
77
|
+
onCancel: handleCancel,
|
|
78
|
+
okText: locales.getText('pisell2.booking.info.text.clear-cart-modal.confirm'),
|
|
79
|
+
cancelText: locales.getText('pisell2.booking.info.text.clear-cart-modal.cancel'),
|
|
80
|
+
destroyOnClose: true
|
|
81
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
82
|
+
style: {
|
|
83
|
+
margin: '24px 0'
|
|
84
|
+
}
|
|
85
|
+
}, /*#__PURE__*/React.createElement("span", null, locales.getText('pisell2.booking.info.text.clear-cart-modal.content')))));
|
|
86
|
+
}, [open, disabledEdit, holders === null || holders === void 0 ? void 0 : holders.length, isHideClearCart, isProductList]);
|
|
57
87
|
};
|
|
58
88
|
export default useClearCart;
|