@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.
Files changed (208) hide show
  1. package/build/lowcode/assets-daily.json +11 -11
  2. package/build/lowcode/assets-dev.json +2 -2
  3. package/build/lowcode/assets-prod.json +11 -11
  4. package/build/lowcode/index.js +1 -1
  5. package/build/lowcode/meta.js +2 -2
  6. package/build/lowcode/preview.js +7 -7
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +9 -9
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +10 -10
  11. package/es/components/booking/addons/model.d.ts +1 -10
  12. package/es/components/booking/forms/model.d.ts +1 -10
  13. package/es/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
  14. package/es/components/booking/info/hooks/useInfoHolder.d.ts +1 -0
  15. package/es/components/booking/info/model.d.ts +1 -10
  16. package/es/components/booking/info/service/addService/utils.d.ts +1 -1
  17. package/es/components/booking/info2/service/addService/utils.d.ts +1 -1
  18. package/es/components/booking/model.d.ts +1 -9
  19. package/es/components/booking/notes/model.d.ts +1 -10
  20. package/es/components/booking/payments/model.d.ts +1 -10
  21. package/es/components/booking/utils.d.ts +2 -2
  22. package/es/components/eftpos/hooks.d.ts +0 -1
  23. package/es/components/eftposPay/amount.d.ts +1 -1
  24. package/es/components/eftposPay/device.d.ts +1 -1
  25. package/es/components/eftposPay/hooks.d.ts +1 -1
  26. package/es/components/eftposPay/store/index.d.ts +2 -2
  27. package/es/components/eftposPay/tyro/hooks.d.ts +0 -1
  28. package/es/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
  29. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
  30. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
  31. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +0 -1
  32. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +0 -1
  33. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
  34. package/es/components/pay/toC/model.d.ts +1 -9
  35. package/es/components/schedules/model.d.ts +1 -9
  36. package/es/components/shoppingCart/components/Empty/index.d.ts +1 -0
  37. package/es/hooks/useTranslationOriginal.d.ts +1 -0
  38. package/es/hooks/useTranslationOriginal.js +10 -0
  39. package/es/index.d.ts +3 -0
  40. package/es/index.js +3 -0
  41. package/es/plus/clientCard/index.d.ts +7 -0
  42. package/es/plus/clientCard/index.js +462 -0
  43. package/es/plus/clientCard/index.less +515 -0
  44. package/es/plus/clientCard/line/index.d.ts +9 -0
  45. package/es/plus/clientCard/line/index.js +157 -0
  46. package/es/plus/clientCard/line/index.less +142 -0
  47. package/es/plus/clientCard/locales.d.ts +18 -0
  48. package/es/plus/clientCard/locales.js +17 -0
  49. package/es/plus/clientCard/types.d.ts +135 -0
  50. package/es/plus/clientCard/types.js +1 -0
  51. package/es/plus/clientCard/utils.d.ts +8 -0
  52. package/es/plus/clientCard/utils.js +59 -0
  53. package/es/plus/clinetSearch/Add/BirthdayField/index.d.ts +3 -0
  54. package/es/plus/clinetSearch/Add/BirthdayField/index.js +277 -0
  55. package/es/plus/clinetSearch/Add/GenderField/index.d.ts +3 -0
  56. package/es/plus/clinetSearch/Add/GenderField/index.js +18 -0
  57. package/es/plus/clinetSearch/Add/PhoneField/index.d.ts +3 -0
  58. package/es/plus/clinetSearch/Add/PhoneField/index.js +52 -0
  59. package/es/plus/clinetSearch/Add/PhoneField/serve.d.ts +2 -0
  60. package/es/plus/clinetSearch/Add/PhoneField/serve.js +166 -0
  61. package/es/plus/clinetSearch/Add/index.d.ts +18 -0
  62. package/es/plus/clinetSearch/Add/index.js +213 -0
  63. package/es/plus/clinetSearch/Add/index.less +30 -0
  64. package/es/plus/clinetSearch/InfiniteScroll/InfiniteScroll.d.ts +5 -0
  65. package/es/plus/clinetSearch/InfiniteScroll/InfiniteScroll.js +265 -0
  66. package/es/plus/clinetSearch/InfiniteScroll/index.d.ts +2 -0
  67. package/es/plus/clinetSearch/InfiniteScroll/index.js +1 -0
  68. package/es/plus/clinetSearch/InfiniteScroll/types.d.ts +46 -0
  69. package/es/plus/clinetSearch/InfiniteScroll/types.js +1 -0
  70. package/es/plus/clinetSearch/index.d.ts +18 -0
  71. package/es/plus/clinetSearch/index.js +234 -0
  72. package/es/plus/clinetSearch/index.less +95 -0
  73. package/es/plus/clinetSearch/locales.d.ts +108 -0
  74. package/es/plus/clinetSearch/locales.js +107 -0
  75. package/es/plus/clinetSearch/serve.d.ts +1 -0
  76. package/es/plus/clinetSearch/serve.js +31 -0
  77. package/es/plus/clinetSearch/types.d.ts +70 -0
  78. package/es/plus/clinetSearch/types.js +1 -0
  79. package/es/plus/saasAttendance/locales.d.ts +63 -0
  80. package/es/plus/saasAttendance/locales.js +71 -2
  81. package/es/plus/saasAttendance/settings/PermissonTab.d.ts +5 -0
  82. package/es/plus/saasAttendance/settings/PermissonTab.js +79 -0
  83. package/es/plus/saasAttendance/settings/ShiftScheduleTab.js +9 -3
  84. package/es/plus/saasAttendance/settings/components/MapField.js +69 -33
  85. package/es/plus/saasAttendance/settings/components/shiftModal/ShiftPreview.d.ts +7 -0
  86. package/es/plus/saasAttendance/settings/components/shiftModal/ShiftPreview.js +149 -0
  87. package/es/plus/saasAttendance/settings/components/shiftModal/ShiftPreview.less +119 -0
  88. package/es/plus/saasAttendance/settings/index.js +7 -0
  89. package/es/plus/saasAttendance/settings/index.less +15 -0
  90. package/es/plus/saasAttendance/settings/types.d.ts +6 -0
  91. package/es/plus/selectHolder/components/ErrorTip/index.d.ts +0 -1
  92. package/es/plus/walletPassGallery/components/passDetail/index.d.ts +2 -0
  93. package/es/plus/walletPassGallery/components/passDetail/index.js +104 -39
  94. package/es/plus/walletPassGallery/components/timelineSection/index.d.ts +2 -0
  95. package/es/plus/walletPassGallery/components/timelineSection/index.js +19 -2
  96. package/es/plus/walletPassGallery/index.d.ts +4 -0
  97. package/es/plus/walletPassGallery/index.js +121 -42
  98. package/es/plus/walletPassGallery/serve.d.ts +3 -1
  99. package/es/plus/walletPassGallery/serve.js +13 -13
  100. package/es/pro/pisellPhoneKeyboard/index.d.ts +13 -0
  101. package/es/pro/pisellPhoneKeyboard/index.js +210 -0
  102. package/es/pro/pisellPhoneKeyboard/index.less +157 -0
  103. package/es/pro/pisellPhoneKeyboard/locales.d.ts +12 -0
  104. package/es/pro/pisellPhoneKeyboard/locales.js +11 -0
  105. package/lib/components/booking/addons/model.d.ts +1 -10
  106. package/lib/components/booking/forms/model.d.ts +1 -10
  107. package/lib/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
  108. package/lib/components/booking/info/hooks/useInfoHolder.d.ts +1 -0
  109. package/lib/components/booking/info/model.d.ts +1 -10
  110. package/lib/components/booking/info/service/addService/utils.d.ts +1 -1
  111. package/lib/components/booking/info2/service/addService/utils.d.ts +1 -1
  112. package/lib/components/booking/model.d.ts +1 -9
  113. package/lib/components/booking/notes/model.d.ts +1 -10
  114. package/lib/components/booking/payments/model.d.ts +1 -10
  115. package/lib/components/booking/utils.d.ts +2 -2
  116. package/lib/components/eftpos/hooks.d.ts +0 -1
  117. package/lib/components/eftposPay/amount.d.ts +1 -1
  118. package/lib/components/eftposPay/device.d.ts +1 -1
  119. package/lib/components/eftposPay/hooks.d.ts +1 -1
  120. package/lib/components/eftposPay/store/index.d.ts +2 -2
  121. package/lib/components/eftposPay/tyro/hooks.d.ts +0 -1
  122. package/lib/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
  123. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
  124. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
  125. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +0 -1
  126. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +0 -1
  127. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
  128. package/lib/components/pay/toC/model.d.ts +1 -9
  129. package/lib/components/schedules/model.d.ts +1 -9
  130. package/lib/components/shoppingCart/components/Empty/index.d.ts +1 -0
  131. package/lib/hooks/useTranslationOriginal.d.ts +1 -0
  132. package/lib/hooks/useTranslationOriginal.js +42 -0
  133. package/lib/index.d.ts +3 -0
  134. package/lib/index.js +9 -0
  135. package/lib/plus/clientCard/index.d.ts +7 -0
  136. package/lib/plus/clientCard/index.js +457 -0
  137. package/lib/plus/clientCard/index.less +515 -0
  138. package/lib/plus/clientCard/line/index.d.ts +9 -0
  139. package/lib/plus/clientCard/line/index.js +153 -0
  140. package/lib/plus/clientCard/line/index.less +142 -0
  141. package/lib/plus/clientCard/locales.d.ts +18 -0
  142. package/lib/plus/clientCard/locales.js +41 -0
  143. package/lib/plus/clientCard/types.d.ts +135 -0
  144. package/lib/plus/clientCard/types.js +17 -0
  145. package/lib/plus/clientCard/utils.d.ts +8 -0
  146. package/lib/plus/clientCard/utils.js +75 -0
  147. package/lib/plus/clinetSearch/Add/BirthdayField/index.d.ts +3 -0
  148. package/lib/plus/clinetSearch/Add/BirthdayField/index.js +256 -0
  149. package/lib/plus/clinetSearch/Add/GenderField/index.d.ts +3 -0
  150. package/lib/plus/clinetSearch/Add/GenderField/index.js +52 -0
  151. package/lib/plus/clinetSearch/Add/PhoneField/index.d.ts +3 -0
  152. package/lib/plus/clinetSearch/Add/PhoneField/index.js +78 -0
  153. package/lib/plus/clinetSearch/Add/PhoneField/serve.d.ts +2 -0
  154. package/lib/plus/clinetSearch/Add/PhoneField/serve.js +193 -0
  155. package/lib/plus/clinetSearch/Add/index.d.ts +18 -0
  156. package/lib/plus/clinetSearch/Add/index.js +244 -0
  157. package/lib/plus/clinetSearch/Add/index.less +30 -0
  158. package/lib/plus/clinetSearch/InfiniteScroll/InfiniteScroll.d.ts +5 -0
  159. package/lib/plus/clinetSearch/InfiniteScroll/InfiniteScroll.js +235 -0
  160. package/lib/plus/clinetSearch/InfiniteScroll/index.d.ts +2 -0
  161. package/lib/plus/clinetSearch/InfiniteScroll/index.js +35 -0
  162. package/lib/plus/clinetSearch/InfiniteScroll/types.d.ts +46 -0
  163. package/lib/plus/clinetSearch/InfiniteScroll/types.js +17 -0
  164. package/lib/plus/clinetSearch/index.d.ts +18 -0
  165. package/lib/plus/clinetSearch/index.js +237 -0
  166. package/lib/plus/clinetSearch/index.less +95 -0
  167. package/lib/plus/clinetSearch/locales.d.ts +108 -0
  168. package/lib/plus/clinetSearch/locales.js +131 -0
  169. package/lib/plus/clinetSearch/serve.d.ts +1 -0
  170. package/lib/plus/clinetSearch/serve.js +33 -0
  171. package/lib/plus/clinetSearch/types.d.ts +70 -0
  172. package/lib/plus/clinetSearch/types.js +17 -0
  173. package/lib/plus/saasAttendance/locales.d.ts +63 -0
  174. package/lib/plus/saasAttendance/locales.js +65 -2
  175. package/lib/plus/saasAttendance/settings/PermissonTab.d.ts +5 -0
  176. package/lib/plus/saasAttendance/settings/PermissonTab.js +128 -0
  177. package/lib/plus/saasAttendance/settings/ShiftScheduleTab.js +2 -1
  178. package/lib/plus/saasAttendance/settings/components/MapField.js +50 -11
  179. package/lib/plus/saasAttendance/settings/components/shiftModal/ShiftPreview.d.ts +7 -0
  180. package/lib/plus/saasAttendance/settings/components/shiftModal/ShiftPreview.js +150 -0
  181. package/lib/plus/saasAttendance/settings/components/shiftModal/ShiftPreview.less +119 -0
  182. package/lib/plus/saasAttendance/settings/index.js +12 -0
  183. package/lib/plus/saasAttendance/settings/index.less +15 -0
  184. package/lib/plus/saasAttendance/settings/types.d.ts +6 -0
  185. package/lib/plus/selectHolder/components/ErrorTip/index.d.ts +0 -1
  186. package/lib/plus/walletPassGallery/components/passDetail/index.d.ts +2 -0
  187. package/lib/plus/walletPassGallery/components/passDetail/index.js +57 -5
  188. package/lib/plus/walletPassGallery/components/timelineSection/index.d.ts +2 -0
  189. package/lib/plus/walletPassGallery/components/timelineSection/index.js +17 -2
  190. package/lib/plus/walletPassGallery/index.d.ts +4 -0
  191. package/lib/plus/walletPassGallery/index.js +141 -42
  192. package/lib/plus/walletPassGallery/serve.d.ts +3 -1
  193. package/lib/plus/walletPassGallery/serve.js +2 -2
  194. package/lib/pro/pisellPhoneKeyboard/index.d.ts +13 -0
  195. package/lib/pro/pisellPhoneKeyboard/index.js +219 -0
  196. package/lib/pro/pisellPhoneKeyboard/index.less +157 -0
  197. package/lib/pro/pisellPhoneKeyboard/locales.d.ts +12 -0
  198. package/lib/pro/pisellPhoneKeyboard/locales.js +35 -0
  199. package/lowcode/client-card/fragments/cardStyle.ts +63 -0
  200. package/lowcode/client-card/fragments/nameStyle.ts +34 -0
  201. package/lowcode/client-card/fragments/pisellAvatar.ts +87 -0
  202. package/lowcode/client-card/fragments/tagConfig.ts +88 -0
  203. package/lowcode/client-card/meta.ts +343 -0
  204. package/lowcode/client-search/meta.ts +316 -0
  205. package/lowcode/eco-cup-list/meta.ts +1 -1
  206. package/lowcode/eco-customer-list/meta.ts +1 -1
  207. package/lowcode/wallet-pass-gallery/meta.ts +66 -1
  208. package/package.json +4 -4
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const PhoneField: ({ value, onChange }: any) => React.JSX.Element;
3
+ export default PhoneField;
@@ -0,0 +1,52 @@
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
4
+ 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; }
5
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
6
+ 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); }
7
+ import React, { useEffect } from 'react';
8
+ import { Select, Space } from 'antd';
9
+ import PisellNumberSelector from "../../../../pro/pisellPhoneKeyboard";
10
+ import { useRequest } from 'ahooks';
11
+ import { getCountries } from "./serve";
12
+ var defaultValue = {
13
+ code: '+61',
14
+ phone: ''
15
+ };
16
+ var PhoneField = function PhoneField(_ref) {
17
+ var value = _ref.value,
18
+ onChange = _ref.onChange;
19
+ var codes = useRequest(getCountries, {
20
+ manual: true
21
+ });
22
+ useEffect(function () {
23
+ codes.run();
24
+ }, []);
25
+ var _onChange = function _onChange(key, val) {
26
+ onChange(_objectSpread(_objectSpread(_objectSpread({}, defaultValue), value), {}, _defineProperty({}, key, val)));
27
+ };
28
+ return /*#__PURE__*/React.createElement(Space.Compact, {
29
+ style: {
30
+ width: '100%'
31
+ }
32
+ }, /*#__PURE__*/React.createElement(Select, {
33
+ options: codes.data || [],
34
+ onChange: function onChange(val) {
35
+ _onChange('code', val);
36
+ },
37
+ size: "large",
38
+ style: {
39
+ flex: '0 0 100px'
40
+ },
41
+ loading: codes.loading,
42
+ optionLabelProp: "value",
43
+ value: value === null || value === void 0 ? void 0 : value.code,
44
+ dropdownMatchSelectWidth: false
45
+ }), /*#__PURE__*/React.createElement(PisellNumberSelector, {
46
+ value: (value === null || value === void 0 ? void 0 : value.phone) || '',
47
+ onChange: function onChange(e) {
48
+ _onChange('phone', e);
49
+ }
50
+ }));
51
+ };
52
+ export default PhoneField;
@@ -0,0 +1,2 @@
1
+ export declare const defaultCodes: any;
2
+ export declare const getCountries: (params?: any) => Promise<any>;
@@ -0,0 +1,166 @@
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
3
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
4
+ 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); }); }; }
5
+ import { request } from "../../../../utils";
6
+ import { locales } from '@pisell/utils';
7
+ var formatData = function formatData(data) {
8
+ return data.map(function (item, i) {
9
+ return {
10
+ label: "".concat(item.name, " (+").concat(item.calling_code, ")"),
11
+ value: '+' + item.calling_code,
12
+ key: i
13
+ };
14
+ });
15
+ };
16
+ export var defaultCodes = formatData([{
17
+ "name": "Mexico",
18
+ "code": "MX",
19
+ "calling_code": "52",
20
+ "currency_code": "MXN"
21
+ }, {
22
+ "name": "美国",
23
+ "code": "US",
24
+ "calling_code": "1",
25
+ "currency_code": "USD"
26
+ }, {
27
+ "name": "加拿大",
28
+ "code": "CA",
29
+ "calling_code": "1",
30
+ "currency_code": "CAD"
31
+ }, {
32
+ "name": "澳大利亚",
33
+ "code": "AU",
34
+ "calling_code": "61",
35
+ "currency_code": "AUD"
36
+ }, {
37
+ "name": "新西兰",
38
+ "code": "NZ",
39
+ "calling_code": "64",
40
+ "currency_code": "NZD"
41
+ }, {
42
+ "name": "新加坡",
43
+ "code": "SG",
44
+ "calling_code": "65",
45
+ "currency_code": "SGD"
46
+ }, {
47
+ "name": "香港特别行政区",
48
+ "code": "HK",
49
+ "calling_code": "852",
50
+ "currency_code": "HKD"
51
+ }, {
52
+ "name": "中国",
53
+ "code": "CN",
54
+ "calling_code": "86",
55
+ "currency_code": "AUD"
56
+ }, {
57
+ "name": "日本",
58
+ "code": "JP",
59
+ "calling_code": "81",
60
+ "currency_code": "JPY"
61
+ }, {
62
+ "name": "马来西亚",
63
+ "code": "MY",
64
+ "calling_code": "60",
65
+ "currency_code": "USD"
66
+ }, {
67
+ "name": "英国",
68
+ "code": "GB",
69
+ "calling_code": "44",
70
+ "currency_code": "GBP"
71
+ }, {
72
+ "name": "法国",
73
+ "code": "FR",
74
+ "calling_code": "33",
75
+ "currency_code": "EUR"
76
+ }, {
77
+ "name": "意大利",
78
+ "code": "IT",
79
+ "calling_code": "39",
80
+ "currency_code": "EUR"
81
+ }, {
82
+ "name": "Ireland",
83
+ "code": "IE",
84
+ "calling_code": "353",
85
+ "currency_code": "EUR"
86
+ }, {
87
+ "name": "Netherlands",
88
+ "code": "NL",
89
+ "calling_code": "31",
90
+ "currency_code": "EUR"
91
+ }, {
92
+ "name": "Germany",
93
+ "code": "DE",
94
+ "calling_code": "49",
95
+ "currency_code": "EUR"
96
+ }, {
97
+ "name": "Spain",
98
+ "code": "ES",
99
+ "calling_code": "34",
100
+ "currency_code": "EUR"
101
+ }, {
102
+ "name": "India",
103
+ "code": "IND",
104
+ "calling_code": "91",
105
+ "currency_code": "INR"
106
+ }, {
107
+ "name": "Nigeria",
108
+ "code": "NG",
109
+ "calling_code": "234",
110
+ "currency_code": "NGN"
111
+ }, {
112
+ "name": "Islamic Republic of Pakistan‎",
113
+ "code": "PAK",
114
+ "calling_code": "92",
115
+ "currency_code": "PRK"
116
+ }, {
117
+ "name": "Philippines",
118
+ "code": "PH",
119
+ "calling_code": "63",
120
+ "currency_code": "PHP"
121
+ }, {
122
+ "name": "Thailand",
123
+ "code": "TH",
124
+ "calling_code": "66",
125
+ "currency_code": "THB"
126
+ }, {
127
+ "name": "South Africa",
128
+ "code": "ZA",
129
+ "calling_code": "27",
130
+ "currency_code": "ZAR"
131
+ }]);
132
+
133
+ // 全部国家
134
+ export var getCountries = /*#__PURE__*/function () {
135
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(params) {
136
+ var data;
137
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
138
+ while (1) switch (_context.prev = _context.next) {
139
+ case 0:
140
+ request.getRequest().get('/shop/area/country', {
141
+ 'translate-locale': locales.formatLocale(localStorage.getItem('umi_locale') || 'en')
142
+ }, {
143
+ abort: true,
144
+ useCache: true
145
+ }).then(function (res) {
146
+ localStorage.setItem('pisell2_data_countries', JSON.stringify(formatData(res.data || [])));
147
+ });
148
+ data = localStorage.getItem('pisell2_data_countries');
149
+ if (!data) {
150
+ _context.next = 7;
151
+ break;
152
+ }
153
+ data = JSON.parse(data);
154
+ return _context.abrupt("return", data);
155
+ case 7:
156
+ return _context.abrupt("return", defaultCodes);
157
+ case 8:
158
+ case "end":
159
+ return _context.stop();
160
+ }
161
+ }, _callee);
162
+ }));
163
+ return function getCountries(_x) {
164
+ return _ref.apply(this, arguments);
165
+ };
166
+ }();
@@ -0,0 +1,18 @@
1
+ import React from 'react';
2
+ import './index.less';
3
+ interface AddClientProps {
4
+ onChange: (value: any, isChecked: boolean) => void;
5
+ phone?: string;
6
+ containerProps: {
7
+ className?: string;
8
+ title?: string;
9
+ open?: boolean;
10
+ onCancel?: () => void;
11
+ width?: string | number;
12
+ };
13
+ }
14
+ export interface AddClientRef {
15
+ reset: () => void;
16
+ }
17
+ declare const AddClient: React.ForwardRefExoticComponent<AddClientProps & React.RefAttributes<unknown>>;
18
+ export default AddClient;
@@ -0,0 +1,213 @@
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ var _excluded = ["phone"];
3
+ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
4
+ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
5
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
6
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
7
+ 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; }
8
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
9
+ 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); }
10
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
11
+ 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."); }
12
+ 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); }
13
+ 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; }
14
+ 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; } }
15
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
16
+ import React, { useEffect, useImperativeHandle, forwardRef } from 'react';
17
+ import { Row, Col, Input, message, Button, Form, DatePicker } from 'antd';
18
+ import { useRequest } from 'ahooks';
19
+ import { PisellContainer } from '@pisell/materials';
20
+ import PhoneField from "./PhoneField";
21
+ import GenderField from "./GenderField";
22
+ import { locales } from '@pisell/utils';
23
+ import { addCustomer } from "../serve";
24
+ import { request } from "../../../utils";
25
+ import useEngineContext from "../../../hooks/useEngineContext";
26
+ import "./index.less";
27
+ var AddClient = /*#__PURE__*/forwardRef(function (props, ref) {
28
+ var _context$appHelper;
29
+ var context = useEngineContext();
30
+ request.setRequest((_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 || (_context$appHelper = _context$appHelper.utils) === null || _context$appHelper === void 0 ? void 0 : _context$appHelper.request);
31
+ var onChange = props.onChange,
32
+ phone = props.phone,
33
+ containerProps = props.containerProps;
34
+ var _Form$useForm = Form.useForm(),
35
+ _Form$useForm2 = _slicedToArray(_Form$useForm, 1),
36
+ form = _Form$useForm2[0];
37
+ var useIsChecked = Form.useWatch('is_checked', form);
38
+ useEffect(function () {
39
+ form.setFieldsValue({
40
+ phone: {
41
+ code: '+61',
42
+ phone: phone
43
+ }
44
+ });
45
+ }, [phone]);
46
+ useImperativeHandle(ref, function () {
47
+ return {
48
+ reset: function reset() {
49
+ form.resetFields();
50
+ }
51
+ };
52
+ });
53
+ var _addClient = useRequest(addCustomer, {
54
+ manual: true,
55
+ onSuccess: function onSuccess(res, param) {
56
+ var _param$;
57
+ onChange(_objectSpread(_objectSpread({}, (_param$ = param[0]) === null || _param$ === void 0 ? void 0 : _param$.customer), {}, {
58
+ id: res.customer_id
59
+ }), useIsChecked);
60
+ }
61
+ });
62
+ var onFinish = function onFinish(values) {
63
+ var _values$phone;
64
+ var phone = values.phone,
65
+ rest = _objectWithoutProperties(values, _excluded);
66
+ if (!values.first_name && !values.last_name && !values.email && !(values !== null && values !== void 0 && (_values$phone = values.phone) !== null && _values$phone !== void 0 && _values$phone.phone)) {
67
+ message.info(locales.getText('pisell2.text.add-client.confirm'));
68
+ return;
69
+ }
70
+ _addClient.run({
71
+ customer: _objectSpread(_objectSpread({
72
+ accepts_marketing: 0,
73
+ register_channel: 'pos',
74
+ tax_exempt: 1
75
+ }, rest), {}, {
76
+ first_name: rest.first_name || '',
77
+ last_name: rest.last_name || '',
78
+ note: rest.note || '',
79
+ email: rest.email || '',
80
+ country_calling_code: phone.code || '',
81
+ phone: phone.phone || ''
82
+ }),
83
+ address: {
84
+ first_name: '',
85
+ last_name: '',
86
+ company: '',
87
+ address1: '',
88
+ address2: '',
89
+ city: '',
90
+ country_code: 'AU',
91
+ province_code: 'ACT',
92
+ phone: '',
93
+ country: '澳大利亚',
94
+ province: 'Australian Capital Territory',
95
+ country_calling_code: '+61'
96
+ },
97
+ tags: []
98
+ });
99
+ };
100
+ var renderContent = function renderContent() {
101
+ return /*#__PURE__*/React.createElement(Form, {
102
+ form: form,
103
+ onFinish: onFinish,
104
+ layout: "vertical",
105
+ initialValues: {
106
+ is_checked: 0,
107
+ phone: {
108
+ code: '+61',
109
+ phone: ''
110
+ }
111
+ },
112
+ size: "large"
113
+ }, /*#__PURE__*/React.createElement(Row, {
114
+ gutter: [16, 0]
115
+ }, /*#__PURE__*/React.createElement(Col, {
116
+ span: 12
117
+ }, /*#__PURE__*/React.createElement(Form.Item, {
118
+ label: locales.getText('pisell2.text.firstname'),
119
+ name: "first_name"
120
+ }, /*#__PURE__*/React.createElement(Input, {
121
+ placeholder: locales.getText('pisell2.text.firstname'),
122
+ size: "large"
123
+ }))), /*#__PURE__*/React.createElement(Col, {
124
+ span: 12
125
+ }, /*#__PURE__*/React.createElement(Form.Item, {
126
+ label: locales.getText('pisell2.text.lastname'),
127
+ name: "last_name"
128
+ }, /*#__PURE__*/React.createElement(Input, {
129
+ placeholder: locales.getText('pisell2.text.lastname'),
130
+ size: "large"
131
+ }))), /*#__PURE__*/React.createElement(Col, {
132
+ span: 12
133
+ }, /*#__PURE__*/React.createElement(Form.Item, {
134
+ label: locales.getText('pisell2.text.gender'),
135
+ name: "gender"
136
+ }, /*#__PURE__*/React.createElement(GenderField, null))), /*#__PURE__*/React.createElement(Col, {
137
+ span: 12
138
+ }, /*#__PURE__*/React.createElement(Form.Item, {
139
+ label: locales.getText('pisell2.text.birthday'),
140
+ name: "birthday"
141
+ }, /*#__PURE__*/React.createElement(DatePicker, {
142
+ style: {
143
+ width: '100%'
144
+ },
145
+ size: "large",
146
+ format: "DD/MM/YYYY",
147
+ inputReadOnly: true,
148
+ placeholder: locales.getText('pisell2.text.birthday'),
149
+ placement: "bottomLeft"
150
+ }))), /*#__PURE__*/React.createElement(Col, {
151
+ span: 12
152
+ }, /*#__PURE__*/React.createElement(Form.Item, {
153
+ label: locales.getText('pisell2.text.phone'),
154
+ name: "phone"
155
+ }, /*#__PURE__*/React.createElement(PhoneField, null))), /*#__PURE__*/React.createElement(Col, {
156
+ span: 12
157
+ }, /*#__PURE__*/React.createElement(Form.Item, {
158
+ label: locales.getText('pisell2.text.email'),
159
+ name: "email",
160
+ rules: [{
161
+ pattern: /^([a-zA-Z0-9_\-\.+])+@([a-zA-Z0-9-]+\.)+([a-zA-Z]{2,63})+$/,
162
+ message: locales.getText('pisell2.text.email-error-message')
163
+ }]
164
+ }, /*#__PURE__*/React.createElement(Input, {
165
+ placeholder: locales.getText('pisell2.text.email'),
166
+ size: "large"
167
+ }))), /*#__PURE__*/React.createElement(Form.Item, {
168
+ hidden: true,
169
+ name: "is_checked"
170
+ }, /*#__PURE__*/React.createElement(Input, null))));
171
+ };
172
+ var renderFooter = function renderFooter() {
173
+ return /*#__PURE__*/React.createElement("div", {
174
+ className: "select-customer-right-panel-add-client__footer"
175
+ }, /*#__PURE__*/React.createElement(Button, {
176
+ size: "large",
177
+ style: {
178
+ flex: 1
179
+ },
180
+ onClick: function onClick() {
181
+ form.setFieldsValue({
182
+ is_checked: 0
183
+ });
184
+ form.submit();
185
+ },
186
+ loading: _addClient.loading && !useIsChecked
187
+ }, locales.getText('pisell2.text.save')), /*#__PURE__*/React.createElement(Button, {
188
+ type: "primary",
189
+ size: "large",
190
+ style: {
191
+ flex: 1
192
+ },
193
+ onClick: function onClick() {
194
+ form.setFieldsValue({
195
+ is_checked: 1
196
+ });
197
+ form.submit();
198
+ },
199
+ loading: _addClient.loading && useIsChecked
200
+ }, locales.getText('pisell2.text.save-and-select')));
201
+ };
202
+ return /*#__PURE__*/React.createElement(PisellContainer, {
203
+ renderType: "modal",
204
+ props: _objectSpread(_objectSpread({}, containerProps), {}, {
205
+ bodyStyle: {
206
+ padding: '24px 24px 0'
207
+ },
208
+ footer: renderFooter(),
209
+ destroyOnClose: true
210
+ })
211
+ }, renderContent());
212
+ });
213
+ export default AddClient;
@@ -0,0 +1,30 @@
1
+ .pisell-client-search__new-client-modal {
2
+
3
+ .select-customer-right-panel-add-client__footer {
4
+ position: sticky;
5
+ left: 0;
6
+ bottom: 0;
7
+ width: 100%;
8
+ background-color: #fff;
9
+ display: flex;
10
+ gap: 16px;
11
+ }
12
+ }
13
+
14
+ input::-webkit-inner-spin-button,
15
+ input::-webkit-outer-spin-button {
16
+ -webkit-appearance: none;
17
+ margin: 0;
18
+ }
19
+
20
+ input[type="number"]::-webkit-inner-spin-button,
21
+ input[type="number"]::-webkit-outer-spin-button {
22
+ -webkit-appearance: none;
23
+ margin: 0;
24
+ }
25
+
26
+ input[type="search"]::-webkit-search-decoration,
27
+ input[type="search"]::-webkit-search-cancel-button {
28
+ -webkit-appearance: none;
29
+ appearance: none;
30
+ }
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import type { InfiniteScrollProps } from './types';
3
+ declare const InfiniteScroll: React.FC<InfiniteScrollProps>;
4
+ export default InfiniteScroll;
5
+ export type { InfiniteScrollProps };