@pisell/private-materials 3.4.76 → 3.4.78
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 +2 -2
- package/build/lowcode/preview.js +7 -7
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +9 -9
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +10 -10
- package/es/components/booking/addons/model.d.ts +1 -10
- package/es/components/booking/forms/model.d.ts +1 -10
- package/es/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
- 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/info2/service/addService/utils.d.ts +1 -1
- 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/eftpos/hooks.d.ts +0 -1
- 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 +1 -1
- package/es/components/eftposPay/store/index.d.ts +2 -2
- package/es/components/eftposPay/tyro/hooks.d.ts +0 -1
- package/es/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
- package/es/components/pay/toC/model.d.ts +1 -9
- package/es/components/schedules/model.d.ts +1 -9
- package/es/components/shoppingCart/components/Empty/index.d.ts +1 -0
- package/es/hooks/useTranslationOriginal.d.ts +1 -0
- package/es/hooks/useTranslationOriginal.js +10 -0
- package/es/index.d.ts +3 -0
- package/es/index.js +3 -0
- package/es/plus/clientCard/index.d.ts +7 -0
- package/es/plus/clientCard/index.js +462 -0
- package/es/plus/clientCard/index.less +515 -0
- package/es/plus/clientCard/line/index.d.ts +9 -0
- package/es/plus/clientCard/line/index.js +157 -0
- package/es/plus/clientCard/line/index.less +142 -0
- package/es/plus/clientCard/locales.d.ts +18 -0
- package/es/plus/clientCard/locales.js +17 -0
- package/es/plus/clientCard/types.d.ts +135 -0
- package/es/plus/clientCard/types.js +1 -0
- package/es/plus/clientCard/utils.d.ts +8 -0
- package/es/plus/clientCard/utils.js +59 -0
- package/es/plus/clinetSearch/Add/BirthdayField/index.d.ts +3 -0
- package/es/plus/clinetSearch/Add/BirthdayField/index.js +277 -0
- package/es/plus/clinetSearch/Add/GenderField/index.d.ts +3 -0
- package/es/plus/clinetSearch/Add/GenderField/index.js +18 -0
- package/es/plus/clinetSearch/Add/PhoneField/index.d.ts +3 -0
- package/es/plus/clinetSearch/Add/PhoneField/index.js +52 -0
- package/es/plus/clinetSearch/Add/PhoneField/serve.d.ts +2 -0
- package/es/plus/clinetSearch/Add/PhoneField/serve.js +166 -0
- package/es/plus/clinetSearch/Add/index.d.ts +18 -0
- package/es/plus/clinetSearch/Add/index.js +213 -0
- package/es/plus/clinetSearch/Add/index.less +30 -0
- package/es/plus/clinetSearch/InfiniteScroll/InfiniteScroll.d.ts +5 -0
- package/es/plus/clinetSearch/InfiniteScroll/InfiniteScroll.js +265 -0
- package/es/plus/clinetSearch/InfiniteScroll/index.d.ts +2 -0
- package/es/plus/clinetSearch/InfiniteScroll/index.js +1 -0
- package/es/plus/clinetSearch/InfiniteScroll/types.d.ts +46 -0
- package/es/plus/clinetSearch/InfiniteScroll/types.js +1 -0
- package/es/plus/clinetSearch/index.d.ts +18 -0
- package/es/plus/clinetSearch/index.js +234 -0
- package/es/plus/clinetSearch/index.less +95 -0
- package/es/plus/clinetSearch/locales.d.ts +108 -0
- package/es/plus/clinetSearch/locales.js +107 -0
- package/es/plus/clinetSearch/serve.d.ts +1 -0
- package/es/plus/clinetSearch/serve.js +31 -0
- package/es/plus/clinetSearch/types.d.ts +70 -0
- package/es/plus/clinetSearch/types.js +1 -0
- package/es/plus/saasAttendance/locales.d.ts +63 -0
- package/es/plus/saasAttendance/locales.js +71 -2
- package/es/plus/saasAttendance/settings/PermissonTab.d.ts +5 -0
- package/es/plus/saasAttendance/settings/PermissonTab.js +79 -0
- package/es/plus/saasAttendance/settings/ShiftScheduleTab.js +9 -3
- package/es/plus/saasAttendance/settings/components/MapField.js +69 -33
- package/es/plus/saasAttendance/settings/components/shiftModal/ShiftPreview.d.ts +7 -0
- package/es/plus/saasAttendance/settings/components/shiftModal/ShiftPreview.js +149 -0
- package/es/plus/saasAttendance/settings/components/shiftModal/ShiftPreview.less +119 -0
- package/es/plus/saasAttendance/settings/index.js +7 -0
- package/es/plus/saasAttendance/settings/index.less +15 -0
- package/es/plus/saasAttendance/settings/types.d.ts +6 -0
- package/es/plus/selectHolder/components/ErrorTip/index.d.ts +0 -1
- package/es/plus/walletPassGallery/components/passDetail/index.d.ts +2 -0
- package/es/plus/walletPassGallery/components/passDetail/index.js +104 -39
- package/es/plus/walletPassGallery/components/timelineSection/index.d.ts +2 -0
- package/es/plus/walletPassGallery/components/timelineSection/index.js +19 -2
- package/es/plus/walletPassGallery/index.d.ts +4 -0
- package/es/plus/walletPassGallery/index.js +121 -42
- package/es/plus/walletPassGallery/serve.d.ts +3 -1
- package/es/plus/walletPassGallery/serve.js +13 -13
- package/es/pro/pisellPhoneKeyboard/index.d.ts +13 -0
- package/es/pro/pisellPhoneKeyboard/index.js +210 -0
- package/es/pro/pisellPhoneKeyboard/index.less +157 -0
- package/es/pro/pisellPhoneKeyboard/locales.d.ts +12 -0
- package/es/pro/pisellPhoneKeyboard/locales.js +11 -0
- package/lib/components/booking/addons/model.d.ts +1 -10
- package/lib/components/booking/forms/model.d.ts +1 -10
- package/lib/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
- 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/info2/service/addService/utils.d.ts +1 -1
- 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/eftpos/hooks.d.ts +0 -1
- 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 +1 -1
- package/lib/components/eftposPay/store/index.d.ts +2 -2
- package/lib/components/eftposPay/tyro/hooks.d.ts +0 -1
- package/lib/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
- package/lib/components/pay/toC/model.d.ts +1 -9
- package/lib/components/schedules/model.d.ts +1 -9
- package/lib/components/shoppingCart/components/Empty/index.d.ts +1 -0
- package/lib/hooks/useTranslationOriginal.d.ts +1 -0
- package/lib/hooks/useTranslationOriginal.js +42 -0
- package/lib/index.d.ts +3 -0
- package/lib/index.js +9 -0
- package/lib/plus/clientCard/index.d.ts +7 -0
- package/lib/plus/clientCard/index.js +457 -0
- package/lib/plus/clientCard/index.less +515 -0
- package/lib/plus/clientCard/line/index.d.ts +9 -0
- package/lib/plus/clientCard/line/index.js +153 -0
- package/lib/plus/clientCard/line/index.less +142 -0
- package/lib/plus/clientCard/locales.d.ts +18 -0
- package/lib/plus/clientCard/locales.js +41 -0
- package/lib/plus/clientCard/types.d.ts +135 -0
- package/lib/plus/clientCard/types.js +17 -0
- package/lib/plus/clientCard/utils.d.ts +8 -0
- package/lib/plus/clientCard/utils.js +75 -0
- package/lib/plus/clinetSearch/Add/BirthdayField/index.d.ts +3 -0
- package/lib/plus/clinetSearch/Add/BirthdayField/index.js +256 -0
- package/lib/plus/clinetSearch/Add/GenderField/index.d.ts +3 -0
- package/lib/plus/clinetSearch/Add/GenderField/index.js +52 -0
- package/lib/plus/clinetSearch/Add/PhoneField/index.d.ts +3 -0
- package/lib/plus/clinetSearch/Add/PhoneField/index.js +78 -0
- package/lib/plus/clinetSearch/Add/PhoneField/serve.d.ts +2 -0
- package/lib/plus/clinetSearch/Add/PhoneField/serve.js +193 -0
- package/lib/plus/clinetSearch/Add/index.d.ts +18 -0
- package/lib/plus/clinetSearch/Add/index.js +244 -0
- package/lib/plus/clinetSearch/Add/index.less +30 -0
- package/lib/plus/clinetSearch/InfiniteScroll/InfiniteScroll.d.ts +5 -0
- package/lib/plus/clinetSearch/InfiniteScroll/InfiniteScroll.js +235 -0
- package/lib/plus/clinetSearch/InfiniteScroll/index.d.ts +2 -0
- package/lib/plus/clinetSearch/InfiniteScroll/index.js +35 -0
- package/lib/plus/clinetSearch/InfiniteScroll/types.d.ts +46 -0
- package/lib/plus/clinetSearch/InfiniteScroll/types.js +17 -0
- package/lib/plus/clinetSearch/index.d.ts +18 -0
- package/lib/plus/clinetSearch/index.js +237 -0
- package/lib/plus/clinetSearch/index.less +95 -0
- package/lib/plus/clinetSearch/locales.d.ts +108 -0
- package/lib/plus/clinetSearch/locales.js +131 -0
- package/lib/plus/clinetSearch/serve.d.ts +1 -0
- package/lib/plus/clinetSearch/serve.js +33 -0
- package/lib/plus/clinetSearch/types.d.ts +70 -0
- package/lib/plus/clinetSearch/types.js +17 -0
- package/lib/plus/saasAttendance/locales.d.ts +63 -0
- package/lib/plus/saasAttendance/locales.js +65 -2
- package/lib/plus/saasAttendance/settings/PermissonTab.d.ts +5 -0
- package/lib/plus/saasAttendance/settings/PermissonTab.js +128 -0
- package/lib/plus/saasAttendance/settings/ShiftScheduleTab.js +2 -1
- package/lib/plus/saasAttendance/settings/components/MapField.js +50 -11
- package/lib/plus/saasAttendance/settings/components/shiftModal/ShiftPreview.d.ts +7 -0
- package/lib/plus/saasAttendance/settings/components/shiftModal/ShiftPreview.js +150 -0
- package/lib/plus/saasAttendance/settings/components/shiftModal/ShiftPreview.less +119 -0
- package/lib/plus/saasAttendance/settings/index.js +12 -0
- package/lib/plus/saasAttendance/settings/index.less +15 -0
- package/lib/plus/saasAttendance/settings/types.d.ts +6 -0
- package/lib/plus/selectHolder/components/ErrorTip/index.d.ts +0 -1
- package/lib/plus/walletPassGallery/components/passDetail/index.d.ts +2 -0
- package/lib/plus/walletPassGallery/components/passDetail/index.js +57 -5
- package/lib/plus/walletPassGallery/components/timelineSection/index.d.ts +2 -0
- package/lib/plus/walletPassGallery/components/timelineSection/index.js +17 -2
- package/lib/plus/walletPassGallery/index.d.ts +4 -0
- package/lib/plus/walletPassGallery/index.js +141 -42
- package/lib/plus/walletPassGallery/serve.d.ts +3 -1
- package/lib/plus/walletPassGallery/serve.js +2 -2
- package/lib/pro/pisellPhoneKeyboard/index.d.ts +13 -0
- package/lib/pro/pisellPhoneKeyboard/index.js +219 -0
- package/lib/pro/pisellPhoneKeyboard/index.less +157 -0
- package/lib/pro/pisellPhoneKeyboard/locales.d.ts +12 -0
- package/lib/pro/pisellPhoneKeyboard/locales.js +35 -0
- package/lowcode/client-card/fragments/cardStyle.ts +63 -0
- package/lowcode/client-card/fragments/nameStyle.ts +34 -0
- package/lowcode/client-card/fragments/pisellAvatar.ts +87 -0
- package/lowcode/client-card/fragments/tagConfig.ts +88 -0
- package/lowcode/client-card/meta.ts +343 -0
- package/lowcode/client-search/meta.ts +316 -0
- package/lowcode/eco-cup-list/meta.ts +1 -1
- package/lowcode/eco-customer-list/meta.ts +1 -1
- package/lowcode/wallet-pass-gallery/meta.ts +66 -1
- package/package.json +4 -4
|
@@ -46,7 +46,11 @@ var ARow = Row;
|
|
|
46
46
|
var ACol = Col;
|
|
47
47
|
var TAGS = ['gift_card', 'point_card', 'product_discount_card', 'good_pass', 'product_voucher'];
|
|
48
48
|
var WalletPassGallery = function WalletPassGallery(props) {
|
|
49
|
-
var _context$appHelper,
|
|
49
|
+
var _context$appHelper, _context$appHelper2, _context$engine, _utils$translation, _getWalletDetail$data;
|
|
50
|
+
var hideAddButton = props.hideAddButton,
|
|
51
|
+
hideTitle = props.hideTitle,
|
|
52
|
+
customer = props.customer,
|
|
53
|
+
platformProp = props.platform;
|
|
50
54
|
var _useState = useState('available'),
|
|
51
55
|
_useState2 = _slicedToArray(_useState, 2),
|
|
52
56
|
activeKey = _useState2[0],
|
|
@@ -75,22 +79,31 @@ var WalletPassGallery = function WalletPassGallery(props) {
|
|
|
75
79
|
setUpdateHolderLoading = _useState12[1];
|
|
76
80
|
var context = useEngineContext();
|
|
77
81
|
var utils = (context === null || context === void 0 || (_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 ? void 0 : _context$appHelper.utils) || {};
|
|
82
|
+
var _ref = ((_context$appHelper2 = context.appHelper) === null || _context$appHelper2 === void 0 ? void 0 : _context$appHelper2.constants) || {
|
|
83
|
+
apiPrefix: '/h5'
|
|
84
|
+
},
|
|
85
|
+
apiPrefix = _ref.apiPrefix;
|
|
86
|
+
var isTerminal = utils.isTerminal,
|
|
87
|
+
isApp = utils.isApp,
|
|
88
|
+
interaction = utils.interaction;
|
|
89
|
+
var isTerminalEnv = (typeof isTerminal === 'function' ? isTerminal() : !!isTerminal) || (isApp === null || isApp === void 0 ? void 0 : isApp());
|
|
78
90
|
var platform = useMemo(function () {
|
|
91
|
+
if (platformProp) return platformProp;
|
|
79
92
|
if (utils.isMobile) {
|
|
80
93
|
return utils.isMobile() ? 'h5' : 'pc';
|
|
81
94
|
}
|
|
82
95
|
if (typeof window !== 'undefined') {
|
|
83
96
|
return window.innerWidth <= 768 ? 'h5' : 'pc';
|
|
84
97
|
}
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
locales.init(localeTexts, (
|
|
98
|
+
return 'pc';
|
|
99
|
+
}, [utils, platformProp]);
|
|
100
|
+
locales.init(localeTexts, (context === null || context === void 0 || (_context$engine = context.engine) === null || _context$engine === void 0 || (_context$engine = _context$engine.props) === null || _context$engine === void 0 ? void 0 : _context$engine.locale) || 'en');
|
|
88
101
|
request.setRequest(utils === null || utils === void 0 ? void 0 : utils.request);
|
|
89
102
|
var _getWalletDetail = useRequest(getWalletDetail, {
|
|
90
103
|
manual: true
|
|
91
104
|
});
|
|
92
105
|
var _getAvailableList = useInfiniteScroll( /*#__PURE__*/function () {
|
|
93
|
-
var
|
|
106
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(d) {
|
|
94
107
|
var _searchParams, walletId, holderId, res;
|
|
95
108
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
96
109
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -106,7 +119,10 @@ var WalletPassGallery = function WalletPassGallery(props) {
|
|
|
106
119
|
tags: TAGS,
|
|
107
120
|
filter_wallet_id: walletId || undefined,
|
|
108
121
|
filter_holder_id: holderId || undefined,
|
|
109
|
-
with: ['customScheduleSnapshot', 'holder.detail']
|
|
122
|
+
with: ['customScheduleSnapshot', 'holder.detail'],
|
|
123
|
+
customer_id: customer === null || customer === void 0 ? void 0 : customer.id
|
|
124
|
+
}, {
|
|
125
|
+
apiPrefix: apiPrefix
|
|
110
126
|
});
|
|
111
127
|
case 5:
|
|
112
128
|
res = _context.sent;
|
|
@@ -122,7 +138,7 @@ var WalletPassGallery = function WalletPassGallery(props) {
|
|
|
122
138
|
}, _callee);
|
|
123
139
|
}));
|
|
124
140
|
return function (_x) {
|
|
125
|
-
return
|
|
141
|
+
return _ref2.apply(this, arguments);
|
|
126
142
|
};
|
|
127
143
|
}(), {
|
|
128
144
|
manual: true,
|
|
@@ -133,7 +149,7 @@ var WalletPassGallery = function WalletPassGallery(props) {
|
|
|
133
149
|
}
|
|
134
150
|
});
|
|
135
151
|
var _getUnavailableList = useInfiniteScroll( /*#__PURE__*/function () {
|
|
136
|
-
var
|
|
152
|
+
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(d) {
|
|
137
153
|
var _searchParams, walletId, holderId, res;
|
|
138
154
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
139
155
|
while (1) switch (_context2.prev = _context2.next) {
|
|
@@ -149,7 +165,10 @@ var WalletPassGallery = function WalletPassGallery(props) {
|
|
|
149
165
|
tags: TAGS,
|
|
150
166
|
filter_wallet_id: walletId || undefined,
|
|
151
167
|
filter_holder_id: holderId || undefined,
|
|
152
|
-
with: ['customScheduleSnapshot', 'holder.detail']
|
|
168
|
+
with: ['customScheduleSnapshot', 'holder.detail'],
|
|
169
|
+
customer_id: customer === null || customer === void 0 ? void 0 : customer.id
|
|
170
|
+
}, {
|
|
171
|
+
apiPrefix: apiPrefix
|
|
153
172
|
});
|
|
154
173
|
case 5:
|
|
155
174
|
res = _context2.sent;
|
|
@@ -165,7 +184,7 @@ var WalletPassGallery = function WalletPassGallery(props) {
|
|
|
165
184
|
}, _callee2);
|
|
166
185
|
}));
|
|
167
186
|
return function (_x2) {
|
|
168
|
-
return
|
|
187
|
+
return _ref3.apply(this, arguments);
|
|
169
188
|
};
|
|
170
189
|
}(), {
|
|
171
190
|
manual: true,
|
|
@@ -180,16 +199,16 @@ var WalletPassGallery = function WalletPassGallery(props) {
|
|
|
180
199
|
if (walletId) {
|
|
181
200
|
_getWalletDetail.runAsync(walletId);
|
|
182
201
|
}
|
|
183
|
-
var req1 = _getAvailableList.
|
|
184
|
-
var req2 = _getUnavailableList.
|
|
202
|
+
var req1 = _getAvailableList.reloadAsync();
|
|
203
|
+
var req2 = _getUnavailableList.reloadAsync();
|
|
185
204
|
var req3 = passId ? getWalletPassDetail(passId, {
|
|
186
205
|
with: ['holder.detail']
|
|
187
206
|
}) : Promise.resolve();
|
|
188
|
-
Promise.all([req1, req2, req3]).then(function (
|
|
189
|
-
var
|
|
190
|
-
data1 =
|
|
191
|
-
data2 =
|
|
192
|
-
data3 =
|
|
207
|
+
Promise.all([req1, req2, req3]).then(function (_ref4) {
|
|
208
|
+
var _ref5 = _slicedToArray(_ref4, 3),
|
|
209
|
+
data1 = _ref5[0],
|
|
210
|
+
data2 = _ref5[1],
|
|
211
|
+
data3 = _ref5[2];
|
|
193
212
|
if (platform !== 'h5') {
|
|
194
213
|
var list1 = (data1 === null || data1 === void 0 ? void 0 : data1.list) || [];
|
|
195
214
|
var list2 = (data2 === null || data2 === void 0 ? void 0 : data2.list) || [];
|
|
@@ -271,7 +290,22 @@ var WalletPassGallery = function WalletPassGallery(props) {
|
|
|
271
290
|
}
|
|
272
291
|
}
|
|
273
292
|
});
|
|
293
|
+
}, [customer]);
|
|
294
|
+
useEffect(function () {
|
|
295
|
+
var _interaction$utils, _interaction$utils$mo;
|
|
296
|
+
interaction === null || interaction === void 0 || (_interaction$utils = interaction.utils) === null || _interaction$utils === void 0 || (_interaction$utils$mo = _interaction$utils.mountFunction) === null || _interaction$utils$mo === void 0 || _interaction$utils$mo.call(_interaction$utils, 'customer', 'new', function () {
|
|
297
|
+
try {
|
|
298
|
+
_getAvailableList.reloadAsync();
|
|
299
|
+
_getUnavailableList.reloadAsync();
|
|
300
|
+
} catch (err) {
|
|
301
|
+
console.error(err);
|
|
302
|
+
}
|
|
303
|
+
});
|
|
274
304
|
}, []);
|
|
305
|
+
var listReload = function listReload() {
|
|
306
|
+
_getAvailableList.reloadAsync();
|
|
307
|
+
_getUnavailableList.reloadAsync();
|
|
308
|
+
};
|
|
275
309
|
var _getUnbindList = useRequest(getUnbindList, {
|
|
276
310
|
manual: true,
|
|
277
311
|
onSuccess: function onSuccess(data) {
|
|
@@ -316,6 +350,20 @@ var WalletPassGallery = function WalletPassGallery(props) {
|
|
|
316
350
|
var newId = key === KEYS.unavailable ? (_unavailable$ = _unavailable[0]) === null || _unavailable$ === void 0 ? void 0 : _unavailable$.id : (_avaliable$ = _avaliable[0]) === null || _avaliable$ === void 0 ? void 0 : _avaliable$.id;
|
|
317
351
|
setCurrentItemId(newId);
|
|
318
352
|
};
|
|
353
|
+
var handleAddClick = function handleAddClick() {
|
|
354
|
+
if (isTerminalEnv) {
|
|
355
|
+
var _interaction$utils2, _interaction$utils2$p;
|
|
356
|
+
interaction === null || interaction === void 0 || (_interaction$utils2 = interaction.utils) === null || _interaction$utils2 === void 0 || (_interaction$utils2$p = _interaction$utils2.postMessageToApp) === null || _interaction$utils2$p === void 0 || _interaction$utils2$p.call(_interaction$utils2, {
|
|
357
|
+
module: 'customer',
|
|
358
|
+
key: 'new',
|
|
359
|
+
data: {
|
|
360
|
+
customer_id: String((customer === null || customer === void 0 ? void 0 : customer.id) || '')
|
|
361
|
+
}
|
|
362
|
+
});
|
|
363
|
+
return;
|
|
364
|
+
}
|
|
365
|
+
setIsOpenAddModal(true);
|
|
366
|
+
};
|
|
319
367
|
var _resetSearchState = function _resetSearchState() {
|
|
320
368
|
setCurrentUnbindItem(null);
|
|
321
369
|
_getUnbindList.mutate([]);
|
|
@@ -329,7 +377,7 @@ var WalletPassGallery = function WalletPassGallery(props) {
|
|
|
329
377
|
|
|
330
378
|
// 通过code搜索卡券
|
|
331
379
|
var _handleSearchByCode = /*#__PURE__*/function () {
|
|
332
|
-
var
|
|
380
|
+
var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(code) {
|
|
333
381
|
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
334
382
|
while (1) switch (_context3.prev = _context3.next) {
|
|
335
383
|
case 0:
|
|
@@ -363,11 +411,11 @@ var WalletPassGallery = function WalletPassGallery(props) {
|
|
|
363
411
|
}, _callee3, null, [[3, 8]]);
|
|
364
412
|
}));
|
|
365
413
|
return function _handleSearchByCode(_x3) {
|
|
366
|
-
return
|
|
414
|
+
return _ref6.apply(this, arguments);
|
|
367
415
|
};
|
|
368
416
|
}();
|
|
369
417
|
var _handleBind = /*#__PURE__*/function () {
|
|
370
|
-
var
|
|
418
|
+
var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
|
|
371
419
|
var data;
|
|
372
420
|
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
373
421
|
while (1) switch (_context4.prev = _context4.next) {
|
|
@@ -415,7 +463,7 @@ var WalletPassGallery = function WalletPassGallery(props) {
|
|
|
415
463
|
}, _callee4, null, [[2, 12]]);
|
|
416
464
|
}));
|
|
417
465
|
return function _handleBind() {
|
|
418
|
-
return
|
|
466
|
+
return _ref7.apply(this, arguments);
|
|
419
467
|
};
|
|
420
468
|
}();
|
|
421
469
|
var _handleHolderChange = function _handleHolderChange(passId, holder) {
|
|
@@ -450,8 +498,36 @@ var WalletPassGallery = function WalletPassGallery(props) {
|
|
|
450
498
|
console.log('pass not found', passId);
|
|
451
499
|
}
|
|
452
500
|
};
|
|
501
|
+
var _handleDetailRefresh = function _handleDetailRefresh(passId, patch) {
|
|
502
|
+
if (_avaliable.find(function (item) {
|
|
503
|
+
return item.id === passId;
|
|
504
|
+
})) {
|
|
505
|
+
_getAvailableList.mutate(function (data) {
|
|
506
|
+
var newList = data.list.map(function (item) {
|
|
507
|
+
return item.id === passId ? _objectSpread(_objectSpread({}, item), patch) : item;
|
|
508
|
+
});
|
|
509
|
+
return _objectSpread(_objectSpread({}, data), {}, {
|
|
510
|
+
list: newList
|
|
511
|
+
});
|
|
512
|
+
});
|
|
513
|
+
return;
|
|
514
|
+
}
|
|
515
|
+
if (_unavailable.find(function (item) {
|
|
516
|
+
return item.id === passId;
|
|
517
|
+
})) {
|
|
518
|
+
_getUnavailableList.mutate(function (data) {
|
|
519
|
+
var newList = data.list.map(function (item) {
|
|
520
|
+
return item.id === passId ? _objectSpread(_objectSpread({}, item), patch) : item;
|
|
521
|
+
});
|
|
522
|
+
return _objectSpread(_objectSpread({}, data), {}, {
|
|
523
|
+
list: newList
|
|
524
|
+
});
|
|
525
|
+
});
|
|
526
|
+
return;
|
|
527
|
+
}
|
|
528
|
+
};
|
|
453
529
|
var _handleBindHolder = /*#__PURE__*/function () {
|
|
454
|
-
var
|
|
530
|
+
var _ref8 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(holderId) {
|
|
455
531
|
var passId, res;
|
|
456
532
|
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
457
533
|
while (1) switch (_context5.prev = _context5.next) {
|
|
@@ -491,7 +567,7 @@ var WalletPassGallery = function WalletPassGallery(props) {
|
|
|
491
567
|
}, _callee5, null, [[2, 10, 13, 16]]);
|
|
492
568
|
}));
|
|
493
569
|
return function _handleBindHolder(_x4) {
|
|
494
|
-
return
|
|
570
|
+
return _ref8.apply(this, arguments);
|
|
495
571
|
};
|
|
496
572
|
}();
|
|
497
573
|
var _currentItem = useMemo(function () {
|
|
@@ -507,15 +583,7 @@ var WalletPassGallery = function WalletPassGallery(props) {
|
|
|
507
583
|
}, [currentItemId, _avaliable, _unavailable]);
|
|
508
584
|
var _pcTitle = /*#__PURE__*/React.createElement("div", {
|
|
509
585
|
className: "pisell-wallet-pass-gallery_title"
|
|
510
|
-
}, /*#__PURE__*/React.createElement(Title, null, (utils === null || utils === void 0 || (_utils$translation = utils.translation) === null || _utils$translation === void 0 ? void 0 : _utils$translation.call(utils, (_getWalletDetail$data = _getWalletDetail.data) === null || _getWalletDetail$data === void 0 || (_getWalletDetail$data = _getWalletDetail$data.data) === null || _getWalletDetail$data === void 0 ? void 0 : _getWalletDetail$data.name)) || locales.getText('wallet-pass-gallery.wallet'))
|
|
511
|
-
icon: /*#__PURE__*/React.createElement(Icon, {
|
|
512
|
-
type: "pisell2-plus"
|
|
513
|
-
}),
|
|
514
|
-
size: "large",
|
|
515
|
-
onClick: function onClick() {
|
|
516
|
-
return setIsOpenAddModal(true);
|
|
517
|
-
}
|
|
518
|
-
}, locales.getText('wallet-pass-gallery.add')) : null);
|
|
586
|
+
}, hideTitle ? null : /*#__PURE__*/React.createElement(Title, null, (utils === null || utils === void 0 || (_utils$translation = utils.translation) === null || _utils$translation === void 0 ? void 0 : _utils$translation.call(utils, (_getWalletDetail$data = _getWalletDetail.data) === null || _getWalletDetail$data === void 0 || (_getWalletDetail$data = _getWalletDetail$data.data) === null || _getWalletDetail$data === void 0 ? void 0 : _getWalletDetail$data.name)) || locales.getText('wallet-pass-gallery.wallet')));
|
|
519
587
|
var renderAvaliableList = function renderAvaliableList() {
|
|
520
588
|
if (platform === 'h5') {
|
|
521
589
|
return /*#__PURE__*/React.createElement(PassList, {
|
|
@@ -549,7 +617,9 @@ var WalletPassGallery = function WalletPassGallery(props) {
|
|
|
549
617
|
flex: "auto"
|
|
550
618
|
}, /*#__PURE__*/React.createElement(PassDetail, {
|
|
551
619
|
dataSource: _currentItem,
|
|
552
|
-
platform: platform
|
|
620
|
+
platform: platform,
|
|
621
|
+
onDetailRefresh: _handleDetailRefresh,
|
|
622
|
+
onListRefresh: listReload
|
|
553
623
|
})));
|
|
554
624
|
};
|
|
555
625
|
var renderUnavailableList = function renderUnavailableList() {
|
|
@@ -585,7 +655,9 @@ var WalletPassGallery = function WalletPassGallery(props) {
|
|
|
585
655
|
flex: "auto"
|
|
586
656
|
}, /*#__PURE__*/React.createElement(PassDetail, {
|
|
587
657
|
dataSource: _currentItem,
|
|
588
|
-
platform: platform
|
|
658
|
+
platform: platform,
|
|
659
|
+
onDetailRefresh: _handleDetailRefresh,
|
|
660
|
+
onListRefresh: listReload
|
|
589
661
|
})));
|
|
590
662
|
};
|
|
591
663
|
var renderTabBar = function renderTabBar(props, DefaultTabBar) {
|
|
@@ -621,7 +693,14 @@ var WalletPassGallery = function WalletPassGallery(props) {
|
|
|
621
693
|
label: locales.getText('wallet-pass-gallery.unavailable'),
|
|
622
694
|
children: renderUnavailableList(),
|
|
623
695
|
badge: ((_getUnavailableList$d2 = _getUnavailableList.data) === null || _getUnavailableList$d2 === void 0 ? void 0 : _getUnavailableList$d2.count) || 0
|
|
624
|
-
}]
|
|
696
|
+
}],
|
|
697
|
+
tabBarExtraContent: platform === 'pc' && !hideAddButton ? /*#__PURE__*/React.createElement(Button, {
|
|
698
|
+
icon: /*#__PURE__*/React.createElement(Icon, {
|
|
699
|
+
type: "pisell2-plus"
|
|
700
|
+
}),
|
|
701
|
+
size: "large",
|
|
702
|
+
onClick: handleAddClick
|
|
703
|
+
}, locales.getText('wallet-pass-gallery.add')) : null
|
|
625
704
|
}));
|
|
626
705
|
};
|
|
627
706
|
var renderPcContent = function renderPcContent() {
|
|
@@ -702,8 +781,8 @@ var WalletPassGallery = function WalletPassGallery(props) {
|
|
|
702
781
|
}));
|
|
703
782
|
};
|
|
704
783
|
var renderH5Content = function renderH5Content() {
|
|
705
|
-
var _utils$
|
|
706
|
-
var _walletBar = !(utils !== null && utils !== void 0 && (_utils$
|
|
784
|
+
var _utils$isApp, _utils$translation2, _getWalletDetail$data2;
|
|
785
|
+
var _walletBar = !(utils !== null && utils !== void 0 && (_utils$isApp = utils.isApp) !== null && _utils$isApp !== void 0 && _utils$isApp.call(utils)) && /*#__PURE__*/React.createElement("div", {
|
|
707
786
|
className: "pisell-wallet-pass-gallery-bar"
|
|
708
787
|
}, /*#__PURE__*/React.createElement("div", {
|
|
709
788
|
className: "pisell-wallet-pass-gallery-header-bar-arrow",
|
|
@@ -715,15 +794,13 @@ var WalletPassGallery = function WalletPassGallery(props) {
|
|
|
715
794
|
})), /*#__PURE__*/React.createElement("span", {
|
|
716
795
|
className: "header-title"
|
|
717
796
|
}, (utils === null || utils === void 0 || (_utils$translation2 = utils.translation) === null || _utils$translation2 === void 0 ? void 0 : _utils$translation2.call(utils, (_getWalletDetail$data2 = _getWalletDetail.data) === null || _getWalletDetail$data2 === void 0 || (_getWalletDetail$data2 = _getWalletDetail$data2.data) === null || _getWalletDetail$data2 === void 0 ? void 0 : _getWalletDetail$data2.name)) || locales.getText('wallet-pass-gallery.wallet')));
|
|
718
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, _walletBar, renderContent(), /*#__PURE__*/React.createElement("div", {
|
|
797
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, _walletBar, renderContent(), hideAddButton ? null : /*#__PURE__*/React.createElement("div", {
|
|
719
798
|
style: {
|
|
720
799
|
padding: 24
|
|
721
800
|
}
|
|
722
801
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
723
802
|
size: "large",
|
|
724
|
-
onClick:
|
|
725
|
-
return setIsOpenAddModal(true);
|
|
726
|
-
},
|
|
803
|
+
onClick: handleAddClick,
|
|
727
804
|
block: true
|
|
728
805
|
}, locales.getText('wallet-pass-gallery.button.add'))), /*#__PURE__*/React.createElement(PisellModal, {
|
|
729
806
|
zIndex: 997,
|
|
@@ -737,7 +814,9 @@ var WalletPassGallery = function WalletPassGallery(props) {
|
|
|
737
814
|
title: locales.getText('wallet-pass-gallery.details')
|
|
738
815
|
}, /*#__PURE__*/React.createElement(PassDetail, {
|
|
739
816
|
dataSource: _currentItem,
|
|
740
|
-
platform: platform
|
|
817
|
+
platform: platform,
|
|
818
|
+
onDetailRefresh: _handleDetailRefresh,
|
|
819
|
+
onListRefresh: listReload
|
|
741
820
|
})));
|
|
742
821
|
};
|
|
743
822
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
@@ -87,7 +87,9 @@ export declare type ErrorCallback = () => void;
|
|
|
87
87
|
* @returns Promise<{list: IWalletListItemProps[], count: number}> 钱包列表和总数
|
|
88
88
|
* @throws 请求失败时抛出错误
|
|
89
89
|
*/
|
|
90
|
-
export declare const getWalletPassList: (params
|
|
90
|
+
export declare const getWalletPassList: (params: IWalletListParmsProps, options?: {
|
|
91
|
+
apiPrefix: string;
|
|
92
|
+
}) => Promise<{
|
|
91
93
|
list: IWalletListItemProps[];
|
|
92
94
|
count: number;
|
|
93
95
|
}>;
|
|
@@ -36,14 +36,14 @@ import { locales } from '@pisell/utils';
|
|
|
36
36
|
* @throws 请求失败时抛出错误
|
|
37
37
|
*/
|
|
38
38
|
export var getWalletPassList = /*#__PURE__*/function () {
|
|
39
|
-
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(params) {
|
|
39
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(params, options) {
|
|
40
40
|
var _yield$request$getReq, data;
|
|
41
41
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
42
42
|
while (1) switch (_context.prev = _context.next) {
|
|
43
43
|
case 0:
|
|
44
44
|
_context.prev = 0;
|
|
45
45
|
_context.next = 3;
|
|
46
|
-
return request.getRequest().get("/h5/machinecode/lowcode/list", params);
|
|
46
|
+
return request.getRequest().get("".concat((options === null || options === void 0 ? void 0 : options.apiPrefix) || '/h5', "/machinecode/lowcode/list"), params);
|
|
47
47
|
case 3:
|
|
48
48
|
_yield$request$getReq = _context.sent;
|
|
49
49
|
data = _yield$request$getReq.data;
|
|
@@ -65,7 +65,7 @@ export var getWalletPassList = /*#__PURE__*/function () {
|
|
|
65
65
|
}
|
|
66
66
|
}, _callee, null, [[0, 8]]);
|
|
67
67
|
}));
|
|
68
|
-
return function getWalletPassList(_x) {
|
|
68
|
+
return function getWalletPassList(_x, _x2) {
|
|
69
69
|
return _ref.apply(this, arguments);
|
|
70
70
|
};
|
|
71
71
|
}();
|
|
@@ -94,7 +94,7 @@ export var bindCodeToCustomer = /*#__PURE__*/function () {
|
|
|
94
94
|
}
|
|
95
95
|
}, _callee2);
|
|
96
96
|
}));
|
|
97
|
-
return function bindCodeToCustomer(
|
|
97
|
+
return function bindCodeToCustomer(_x3) {
|
|
98
98
|
return _ref2.apply(this, arguments);
|
|
99
99
|
};
|
|
100
100
|
}();
|
|
@@ -123,7 +123,7 @@ export var getUnbindList = /*#__PURE__*/function () {
|
|
|
123
123
|
}
|
|
124
124
|
}, _callee3);
|
|
125
125
|
}));
|
|
126
|
-
return function getUnbindList(
|
|
126
|
+
return function getUnbindList(_x4) {
|
|
127
127
|
return _ref3.apply(this, arguments);
|
|
128
128
|
};
|
|
129
129
|
}();
|
|
@@ -162,7 +162,7 @@ export var goOrder = /*#__PURE__*/function () {
|
|
|
162
162
|
}
|
|
163
163
|
}, _callee4, null, [[0, 8]]);
|
|
164
164
|
}));
|
|
165
|
-
return function goOrder(
|
|
165
|
+
return function goOrder(_x5) {
|
|
166
166
|
return _ref4.apply(this, arguments);
|
|
167
167
|
};
|
|
168
168
|
}();
|
|
@@ -197,7 +197,7 @@ export var getAssetList = /*#__PURE__*/function () {
|
|
|
197
197
|
}
|
|
198
198
|
}, _callee5);
|
|
199
199
|
}));
|
|
200
|
-
return function getAssetList(
|
|
200
|
+
return function getAssetList(_x6) {
|
|
201
201
|
return _ref5.apply(this, arguments);
|
|
202
202
|
};
|
|
203
203
|
}();
|
|
@@ -223,7 +223,7 @@ export var getActiveLogs = /*#__PURE__*/function () {
|
|
|
223
223
|
}
|
|
224
224
|
}, _callee6);
|
|
225
225
|
}));
|
|
226
|
-
return function getActiveLogs(
|
|
226
|
+
return function getActiveLogs(_x7) {
|
|
227
227
|
return _ref6.apply(this, arguments);
|
|
228
228
|
};
|
|
229
229
|
}();
|
|
@@ -259,7 +259,7 @@ export var getDetailApi = /*#__PURE__*/function () {
|
|
|
259
259
|
}
|
|
260
260
|
}, _callee7);
|
|
261
261
|
}));
|
|
262
|
-
return function getDetailApi(
|
|
262
|
+
return function getDetailApi(_x8) {
|
|
263
263
|
return _ref7.apply(this, arguments);
|
|
264
264
|
};
|
|
265
265
|
}();
|
|
@@ -291,7 +291,7 @@ export var orderRechargeProduct = /*#__PURE__*/function () {
|
|
|
291
291
|
}
|
|
292
292
|
}, _callee8);
|
|
293
293
|
}));
|
|
294
|
-
return function orderRechargeProduct(
|
|
294
|
+
return function orderRechargeProduct(_x9) {
|
|
295
295
|
return _ref8.apply(this, arguments);
|
|
296
296
|
};
|
|
297
297
|
}();
|
|
@@ -313,7 +313,7 @@ export var getWalletDetail = /*#__PURE__*/function () {
|
|
|
313
313
|
}
|
|
314
314
|
}, _callee9);
|
|
315
315
|
}));
|
|
316
|
-
return function getWalletDetail(
|
|
316
|
+
return function getWalletDetail(_x10) {
|
|
317
317
|
return _ref9.apply(this, arguments);
|
|
318
318
|
};
|
|
319
319
|
}();
|
|
@@ -342,7 +342,7 @@ export var updateWalletPassHolder = /*#__PURE__*/function () {
|
|
|
342
342
|
}
|
|
343
343
|
}, _callee10);
|
|
344
344
|
}));
|
|
345
|
-
return function updateWalletPassHolder(
|
|
345
|
+
return function updateWalletPassHolder(_x11, _x12) {
|
|
346
346
|
return _ref10.apply(this, arguments);
|
|
347
347
|
};
|
|
348
348
|
}();
|
|
@@ -370,7 +370,7 @@ export var getWalletPassDetail = /*#__PURE__*/function () {
|
|
|
370
370
|
}
|
|
371
371
|
}, _callee11);
|
|
372
372
|
}));
|
|
373
|
-
return function getWalletPassDetail(
|
|
373
|
+
return function getWalletPassDetail(_x13, _x14) {
|
|
374
374
|
return _ref11.apply(this, arguments);
|
|
375
375
|
};
|
|
376
376
|
}();
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { PopoverProps } from 'antd';
|
|
3
|
+
import './index.less';
|
|
4
|
+
interface PisellPhoneKeyboardProps {
|
|
5
|
+
value?: string;
|
|
6
|
+
onChange: (e: string) => void;
|
|
7
|
+
popoverProps: PopoverProps;
|
|
8
|
+
virtualKeyboardProps?: any;
|
|
9
|
+
keyboardProps?: any;
|
|
10
|
+
virtualKeyInputProps?: any;
|
|
11
|
+
}
|
|
12
|
+
declare const PisellPhoneKeyboard: (props: PisellPhoneKeyboardProps) => React.JSX.Element;
|
|
13
|
+
export default PisellPhoneKeyboard;
|