@pisell/private-materials 6.4.62 → 6.4.64

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 (239) 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 +145 -145
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +8 -8
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +8 -8
  11. package/es/components/appointmentBooking/components/Cart/Item/Total.d.ts +1 -0
  12. package/es/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -1
  13. package/es/components/appointmentBooking/components/Cart/Item/index.js +3 -2
  14. package/es/components/appointmentBooking/components/Cart/index.d.ts +0 -1
  15. package/es/components/appointmentBooking/components/ConfirmInformation/index.js +267 -76
  16. package/es/components/appointmentBooking/components/ConfirmInformation/index.less +15 -0
  17. package/es/components/appointmentBooking/components/Deposit/index.d.ts +1 -0
  18. package/es/components/appointmentBooking/hooks.d.ts +1 -0
  19. package/es/components/appointmentBooking/hooks.js +30 -30
  20. package/es/components/appointmentBooking/locales.d.ts +3 -0
  21. package/es/components/appointmentBooking/locales.js +9 -6
  22. package/es/components/booking/components/TabProduct/productItem/index.d.ts +1 -0
  23. package/es/components/booking/components/footer/index.js +4 -1
  24. package/es/components/booking/components/footer/utils.js +80 -77
  25. package/es/components/booking/forms/single/index.d.ts +1 -0
  26. package/es/components/booking/info/clientVariant/hooks/useClientFn.d.ts +0 -1
  27. package/es/components/booking/info/clientVariant/hooks/useClientFn.js +2 -2
  28. package/es/components/booking/info/clientVariant/vertical/index.js +1 -1
  29. package/es/components/booking/info/main.js +3 -2
  30. package/es/components/booking/info/model.js +5 -0
  31. package/es/components/booking/info/service/Lists.d.ts +0 -1
  32. package/es/components/booking/info2/cartClientCard/index.js +30 -1
  33. package/es/components/booking/info2/index.js +3 -2
  34. package/es/components/booking/info2/service/contactInfoMode/index.d.ts +2 -0
  35. package/es/components/booking/info2/service/contactInfoMode/index.js +94 -0
  36. package/es/components/booking/locales.d.ts +3 -0
  37. package/es/components/booking/locales.js +9 -3
  38. package/es/components/booking/materiels/contacts/index.d.ts +1 -0
  39. package/es/components/booking/model.d.ts +4 -0
  40. package/es/components/booking/model.js +3 -0
  41. package/es/components/checkout/components/SearchAndClientModule/index.d.ts +1 -0
  42. package/es/components/checkout/components/WalletPassModule/components/DiscountWallet/index.d.ts +1 -0
  43. package/es/components/checkout/hooks/useWalletPass.d.ts +1 -1
  44. package/es/components/eftpos/form/index.d.ts +1 -0
  45. package/es/components/eftpos/hooks.d.ts +1 -0
  46. package/es/components/eftpos/index.d.ts +1 -0
  47. package/es/components/eftpos/pos.d.ts +1 -0
  48. package/es/components/eftposPay/component/fail/failCustom.d.ts +1 -0
  49. package/es/components/eftposPay/component/fail/index.d.ts +1 -0
  50. package/es/components/eftposPay/component/fail/network.d.ts +1 -0
  51. package/es/components/eftposPay/component/fail/unknow.d.ts +1 -0
  52. package/es/components/eftposPay/component/manual/index.d.ts +1 -0
  53. package/es/components/eftposPay/component/signature/index.d.ts +1 -0
  54. package/es/components/eftposPay/hooks.d.ts +1 -1
  55. package/es/components/eftposPay/pay.d.ts +1 -0
  56. package/es/components/eftposPay/store/index.d.ts +2 -2
  57. package/es/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +1 -0
  58. package/es/components/eventBooking/components/Provider/Cart/Item/index.d.ts +1 -0
  59. package/es/components/eventBooking/components/Provider/Content/index.d.ts +1 -0
  60. package/es/components/eventBooking/components/Provider/Event/index.d.ts +1 -0
  61. package/es/components/eventBooking/components/Provider/Footer/index.d.ts +1 -0
  62. package/es/components/eventBooking/components/Provider/Header/index.d.ts +1 -0
  63. package/es/components/eventBooking/components/Provider/Information/index.d.ts +1 -0
  64. package/es/components/eventBooking/components/Provider/Resource/index.d.ts +1 -0
  65. package/es/components/eventBooking/components/Provider/SelectHolderModal.d.ts +1 -0
  66. package/es/components/eventBooking/components/bookingDetailModal/components/BookingOptions.d.ts +1 -0
  67. package/es/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +1 -0
  68. package/es/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +1 -0
  69. package/es/components/eventBooking/components/scheduleCalendar/ProductItem/index.d.ts +1 -0
  70. package/es/components/list/styles/header.less +1 -0
  71. package/es/components/pay/toB/components/Cache/index.d.ts +1 -0
  72. package/es/components/pay/toB/components/ConfirmedPayment/index.d.ts +1 -0
  73. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +1 -0
  74. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +1 -0
  75. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +1 -0
  76. package/es/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +1 -0
  77. package/es/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +1 -0
  78. package/es/components/productSelect/components/productGroup/index.d.ts +1 -0
  79. package/es/components/schedules/components/ScheduleList/index.d.ts +1 -0
  80. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.d.ts +1 -0
  81. package/es/components/schedules/resources/index.d.ts +1 -0
  82. package/es/components/schedules/resources/relationProduct/index.d.ts +1 -0
  83. package/es/components/schedules/schedules/ScheduleDetailDrawer/index.d.ts +1 -0
  84. package/es/components/schedules/schedules/index.d.ts +1 -0
  85. package/es/components/ticketBooking/components/menuBar/index.d.ts +0 -1
  86. package/es/components/ticketBooking/components/menuBar/index.js +63 -5
  87. package/es/components/ticketBooking/components/ticketBooking/index.less +2 -1
  88. package/es/components/ticketBooking/hooks/pisellos/useShopDiscountModule.js +1 -0
  89. package/es/components/ticketBooking/index.js +1 -0
  90. package/es/index.d.ts +2 -0
  91. package/es/index.js +3 -1
  92. package/es/plus/clientCard/locales.js +3 -3
  93. package/es/plus/clinetSearch/index.js +28 -30
  94. package/es/plus/clinetSearch/locales.d.ts +3 -0
  95. package/es/plus/clinetSearch/locales.js +7 -4
  96. package/es/plus/clinetSearch/types.d.ts +12 -0
  97. package/es/plus/contactInfo/components/Avatar/index.d.ts +10 -0
  98. package/es/plus/contactInfo/components/Avatar/index.js +30 -0
  99. package/es/plus/contactInfo/components/SwipeAction/index.d.ts +46 -0
  100. package/es/plus/contactInfo/components/SwipeAction/index.js +360 -0
  101. package/es/plus/contactInfo/components/SwipeAction/index.less +74 -0
  102. package/es/plus/contactInfo/index.d.ts +6 -0
  103. package/es/plus/contactInfo/index.js +198 -0
  104. package/es/plus/contactInfo/index.less +621 -0
  105. package/es/plus/contactInfo/locales.d.ts +15 -0
  106. package/es/plus/contactInfo/locales.js +14 -0
  107. package/es/plus/contactInfo/types.d.ts +91 -0
  108. package/es/plus/contactInfo/types.js +1 -0
  109. package/es/plus/contactInfo/utils.d.ts +7 -0
  110. package/es/plus/contactInfo/utils.js +50 -0
  111. package/es/plus/contactInfoModal/ContactInfoContent.d.ts +3 -0
  112. package/es/plus/contactInfoModal/ContactInfoContent.js +74 -0
  113. package/es/plus/contactInfoModal/index.d.ts +40 -0
  114. package/es/plus/contactInfoModal/index.js +154 -0
  115. package/es/plus/contactInfoModal/index.less +19 -0
  116. package/es/plus/contactInfoModal/locales.d.ts +66 -0
  117. package/es/plus/contactInfoModal/locales.js +65 -0
  118. package/es/plus/productSelect/ProductCard/SkuCard/components/CardWrapper/index.d.ts +0 -1
  119. package/es/plus/productSelect/ProductCard/SkuCard/components/Price/index.d.ts +1 -0
  120. package/es/pro/comprehensiveSearch/components/searchSection/locales.js +3 -3
  121. package/es/pro/comprehensiveSearch/locales.js +1 -1
  122. package/lib/components/appointmentBooking/components/Cart/Item/Total.d.ts +1 -0
  123. package/lib/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -1
  124. package/lib/components/appointmentBooking/components/Cart/Item/index.js +5 -3
  125. package/lib/components/appointmentBooking/components/Cart/index.d.ts +0 -1
  126. package/lib/components/appointmentBooking/components/ConfirmInformation/index.js +151 -13
  127. package/lib/components/appointmentBooking/components/ConfirmInformation/index.less +15 -0
  128. package/lib/components/appointmentBooking/components/Deposit/index.d.ts +1 -0
  129. package/lib/components/appointmentBooking/hooks.d.ts +1 -0
  130. package/lib/components/appointmentBooking/hooks.js +73 -35
  131. package/lib/components/appointmentBooking/locales.d.ts +3 -0
  132. package/lib/components/appointmentBooking/locales.js +6 -3
  133. package/lib/components/booking/components/TabProduct/productItem/index.d.ts +1 -0
  134. package/lib/components/booking/components/footer/index.js +4 -1
  135. package/lib/components/booking/components/footer/utils.js +93 -67
  136. package/lib/components/booking/forms/single/index.d.ts +1 -0
  137. package/lib/components/booking/info/clientVariant/hooks/useClientFn.d.ts +0 -1
  138. package/lib/components/booking/info/clientVariant/hooks/useClientFn.js +1 -1
  139. package/lib/components/booking/info/clientVariant/vertical/index.js +34 -17
  140. package/lib/components/booking/info/main.js +5 -4
  141. package/lib/components/booking/info/model.js +5 -0
  142. package/lib/components/booking/info/service/Lists.d.ts +0 -1
  143. package/lib/components/booking/info2/cartClientCard/index.js +25 -0
  144. package/lib/components/booking/info2/index.js +11 -5
  145. package/lib/components/booking/info2/service/contactInfoMode/index.d.ts +2 -0
  146. package/lib/components/booking/info2/service/contactInfoMode/index.js +111 -0
  147. package/lib/components/booking/locales.d.ts +3 -0
  148. package/lib/components/booking/locales.js +9 -3
  149. package/lib/components/booking/materiels/contacts/index.d.ts +1 -0
  150. package/lib/components/booking/model.d.ts +4 -0
  151. package/lib/components/booking/model.js +3 -0
  152. package/lib/components/checkout/components/SearchAndClientModule/index.d.ts +1 -0
  153. package/lib/components/checkout/components/WalletPassModule/components/DiscountWallet/index.d.ts +1 -0
  154. package/lib/components/checkout/hooks/useWalletPass.d.ts +1 -1
  155. package/lib/components/eftpos/form/index.d.ts +1 -0
  156. package/lib/components/eftpos/hooks.d.ts +1 -0
  157. package/lib/components/eftpos/index.d.ts +1 -0
  158. package/lib/components/eftpos/pos.d.ts +1 -0
  159. package/lib/components/eftposPay/component/fail/failCustom.d.ts +1 -0
  160. package/lib/components/eftposPay/component/fail/index.d.ts +1 -0
  161. package/lib/components/eftposPay/component/fail/network.d.ts +1 -0
  162. package/lib/components/eftposPay/component/fail/unknow.d.ts +1 -0
  163. package/lib/components/eftposPay/component/manual/index.d.ts +1 -0
  164. package/lib/components/eftposPay/component/signature/index.d.ts +1 -0
  165. package/lib/components/eftposPay/hooks.d.ts +1 -1
  166. package/lib/components/eftposPay/pay.d.ts +1 -0
  167. package/lib/components/eftposPay/store/index.d.ts +2 -2
  168. package/lib/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +1 -0
  169. package/lib/components/eventBooking/components/Provider/Cart/Item/index.d.ts +1 -0
  170. package/lib/components/eventBooking/components/Provider/Content/index.d.ts +1 -0
  171. package/lib/components/eventBooking/components/Provider/Event/index.d.ts +1 -0
  172. package/lib/components/eventBooking/components/Provider/Footer/index.d.ts +1 -0
  173. package/lib/components/eventBooking/components/Provider/Header/index.d.ts +1 -0
  174. package/lib/components/eventBooking/components/Provider/Information/index.d.ts +1 -0
  175. package/lib/components/eventBooking/components/Provider/Resource/index.d.ts +1 -0
  176. package/lib/components/eventBooking/components/Provider/SelectHolderModal.d.ts +1 -0
  177. package/lib/components/eventBooking/components/bookingDetailModal/components/BookingOptions.d.ts +1 -0
  178. package/lib/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +1 -0
  179. package/lib/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +1 -0
  180. package/lib/components/eventBooking/components/scheduleCalendar/ProductItem/index.d.ts +1 -0
  181. package/lib/components/list/styles/header.less +1 -0
  182. package/lib/components/pay/toB/components/Cache/index.d.ts +1 -0
  183. package/lib/components/pay/toB/components/ConfirmedPayment/index.d.ts +1 -0
  184. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +1 -0
  185. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +1 -0
  186. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +1 -0
  187. package/lib/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +1 -0
  188. package/lib/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +1 -0
  189. package/lib/components/productSelect/components/productGroup/index.d.ts +1 -0
  190. package/lib/components/schedules/components/ScheduleList/index.d.ts +1 -0
  191. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.d.ts +1 -0
  192. package/lib/components/schedules/resources/index.d.ts +1 -0
  193. package/lib/components/schedules/resources/relationProduct/index.d.ts +1 -0
  194. package/lib/components/schedules/schedules/ScheduleDetailDrawer/index.d.ts +1 -0
  195. package/lib/components/schedules/schedules/index.d.ts +1 -0
  196. package/lib/components/ticketBooking/components/menuBar/index.d.ts +0 -1
  197. package/lib/components/ticketBooking/components/menuBar/index.js +21 -2
  198. package/lib/components/ticketBooking/components/ticketBooking/index.less +2 -1
  199. package/lib/components/ticketBooking/hooks/pisellos/useShopDiscountModule.js +1 -0
  200. package/lib/components/ticketBooking/index.js +1 -0
  201. package/lib/index.d.ts +2 -0
  202. package/lib/index.js +6 -0
  203. package/lib/plus/clientCard/locales.js +3 -3
  204. package/lib/plus/clinetSearch/index.js +17 -8
  205. package/lib/plus/clinetSearch/locales.d.ts +3 -0
  206. package/lib/plus/clinetSearch/locales.js +7 -4
  207. package/lib/plus/clinetSearch/types.d.ts +12 -0
  208. package/lib/plus/contactInfo/components/Avatar/index.d.ts +10 -0
  209. package/lib/plus/contactInfo/components/Avatar/index.js +56 -0
  210. package/lib/plus/contactInfo/components/SwipeAction/index.d.ts +46 -0
  211. package/lib/plus/contactInfo/components/SwipeAction/index.js +373 -0
  212. package/lib/plus/contactInfo/components/SwipeAction/index.less +74 -0
  213. package/lib/plus/contactInfo/index.d.ts +6 -0
  214. package/lib/plus/contactInfo/index.js +226 -0
  215. package/lib/plus/contactInfo/index.less +621 -0
  216. package/lib/plus/contactInfo/locales.d.ts +15 -0
  217. package/lib/plus/contactInfo/locales.js +38 -0
  218. package/lib/plus/contactInfo/types.d.ts +91 -0
  219. package/lib/plus/contactInfo/types.js +17 -0
  220. package/lib/plus/contactInfo/utils.d.ts +7 -0
  221. package/lib/plus/contactInfo/utils.js +64 -0
  222. package/lib/plus/contactInfoModal/ContactInfoContent.d.ts +3 -0
  223. package/lib/plus/contactInfoModal/ContactInfoContent.js +129 -0
  224. package/lib/plus/contactInfoModal/index.d.ts +40 -0
  225. package/lib/plus/contactInfoModal/index.js +138 -0
  226. package/lib/plus/contactInfoModal/index.less +19 -0
  227. package/lib/plus/contactInfoModal/locales.d.ts +66 -0
  228. package/lib/plus/contactInfoModal/locales.js +89 -0
  229. package/lib/plus/productSelect/ProductCard/SkuCard/components/CardWrapper/index.d.ts +0 -1
  230. package/lib/plus/productSelect/ProductCard/SkuCard/components/Price/index.d.ts +1 -0
  231. package/lib/pro/comprehensiveSearch/components/searchSection/locales.js +3 -3
  232. package/lib/pro/comprehensiveSearch/locales.js +1 -1
  233. package/lowcode/contact-info/fragments/cardStyle.ts +68 -0
  234. package/lowcode/contact-info/fragments/nameStyle.ts +33 -0
  235. package/lowcode/contact-info/fragments/pisellAvatar.ts +103 -0
  236. package/lowcode/contact-info/fragments/textStyle.ts +33 -0
  237. package/lowcode/contact-info/meta.ts +199 -0
  238. package/lowcode/contact-info-modal/meta.ts +98 -0
  239. package/package.json +5 -3
@@ -1,15 +1,73 @@
1
- import React from 'react';
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 _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
3
+ 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."); }
4
+ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
5
+ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
6
+ 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; }
7
+ 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); } }
8
+ 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); }); }; }
9
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
10
+ 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."); }
11
+ 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); }
12
+ 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; }
13
+ 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; } }
14
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
15
+ import React, { useState, useEffect } from 'react';
2
16
  import { useNetworkStatus, NetworkStatus, NetworkStatusColor } from "../../hooks/useNetworkStatus";
3
17
  import "./index.less";
4
18
  import { Menu } from 'antd';
5
19
  import { ReloadOutlined, SettingOutlined } from '@ant-design/icons';
6
20
  import { locales } from '@pisell/utils';
7
21
  import { ConfigProvider, Iconfont } from '@pisell/materials';
22
+ import { getBookingConfig } from "../../serve";
8
23
  var index = function index(props) {
9
24
  var _props$activeNavKey = props.activeNavKey,
10
25
  activeNavKey = _props$activeNavKey === void 0 ? 'ticket' : _props$activeNavKey,
11
26
  onNavChange = props.onNavChange;
12
27
  var status = useNetworkStatus();
28
+ var _useState = useState(false),
29
+ _useState2 = _slicedToArray(_useState, 2),
30
+ showFoodMenu = _useState2[0],
31
+ setShowFoodMenu = _useState2[1];
32
+
33
+ // 检查是否显示 food 菜单
34
+ useEffect(function () {
35
+ var checkFoodConfig = /*#__PURE__*/function () {
36
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
37
+ var data;
38
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
39
+ while (1) switch (_context.prev = _context.next) {
40
+ case 0:
41
+ _context.prev = 0;
42
+ _context.next = 3;
43
+ return getBookingConfig({
44
+ item_type: 'appointment_booking',
45
+ sub_type: 'food',
46
+ source_type: 'pos'
47
+ });
48
+ case 3:
49
+ data = _context.sent;
50
+ if (data) {
51
+ setShowFoodMenu(true);
52
+ }
53
+ _context.next = 10;
54
+ break;
55
+ case 7:
56
+ _context.prev = 7;
57
+ _context.t0 = _context["catch"](0);
58
+ console.error('获取 food 配置失败:', _context.t0);
59
+ case 10:
60
+ case "end":
61
+ return _context.stop();
62
+ }
63
+ }, _callee, null, [[0, 7]]);
64
+ }));
65
+ return function checkFoodConfig() {
66
+ return _ref.apply(this, arguments);
67
+ };
68
+ }();
69
+ checkFoodConfig();
70
+ }, []);
13
71
 
14
72
  // 导航项配置
15
73
  var navItems = [{
@@ -21,7 +79,7 @@ var index = function index(props) {
21
79
  }
22
80
  }),
23
81
  label: ''
24
- }, {
82
+ }].concat(_toConsumableArray(showFoodMenu ? [{
25
83
  key: 'food',
26
84
  label: '',
27
85
  icon: /*#__PURE__*/React.createElement(Iconfont, {
@@ -30,7 +88,7 @@ var index = function index(props) {
30
88
  fontSize: 32
31
89
  }
32
90
  })
33
- }];
91
+ }] : []));
34
92
  var items = [{
35
93
  key: 'reload',
36
94
  label: locales.getText('pisell2.ticket-booking.reload'),
@@ -59,8 +117,8 @@ var index = function index(props) {
59
117
  return 'Offline';
60
118
  }
61
119
  };
62
- var handleClick = function handleClick(_ref) {
63
- var key = _ref.key;
120
+ var handleClick = function handleClick(_ref2) {
121
+ var key = _ref2.key;
64
122
  if (key === 'reload') {
65
123
  window.location.reload();
66
124
  }
@@ -36,7 +36,8 @@
36
36
  .booking-info-create-new,
37
37
  .pisell-lowcode__booking-field-title,
38
38
  .pisell-lowcode__shopping-cart-empty,
39
- .pisell-lowcode__booking-service-clear-btn {
39
+ .pisell-lowcode__booking-service-clear-btn,
40
+ .pisell-lowcode__booking-contact-info-title {
40
41
  color: #ffffff;
41
42
  }
42
43
  }
@@ -13,5 +13,6 @@ export var useShopDiscountModule = function useShopDiscountModule() {
13
13
 
14
14
  // 根据 osKey 生成模块名称
15
15
  var moduleKey = getShopDiscountKey(osKey || 'ticket');
16
+ console.log(pisellOS, pisellOS, moduleKey, 'pisellOS');
16
17
  return pisellOS.getModule(moduleKey);
17
18
  };
@@ -211,6 +211,7 @@ export default (function (props) {
211
211
  }));
212
212
  storeRef.current = store;
213
213
  }, [bookingConfigParams, productExtensionType]);
214
+ console.log(osKey, pisellos, 'osKeyosKey');
214
215
  useMemo(function () {
215
216
  if (BookingTicket) {
216
217
  pisellos === null || pisellos === void 0 || pisellos.registerModule(new BookingTicket(getBookingTicketKey(osKey)), {
package/es/index.d.ts CHANGED
@@ -63,3 +63,5 @@ export { default as SkuCard } from './plus/productSelect/ProductCard/SkuCard';
63
63
  export { default as PinModal } from './components/pinModal';
64
64
  export { default as PinVerifyModal } from './components/pinVerifyModal';
65
65
  export { ResponsiveList as SkuList } from './components/list';
66
+ export { default as ContactInfo } from './plus/contactInfo';
67
+ export { default as ContactInfoModal } from './plus/contactInfoModal';
package/es/index.js CHANGED
@@ -66,4 +66,6 @@ export { default as SaasCreateOrganization } from "./plus/saasCreateOrganization
66
66
  export { default as SkuCard } from "./plus/productSelect/ProductCard/SkuCard";
67
67
  export { default as PinModal } from "./components/pinModal";
68
68
  export { default as PinVerifyModal } from "./components/pinVerifyModal";
69
- export { ResponsiveList as SkuList } from "./components/list";
69
+ export { ResponsiveList as SkuList } from "./components/list";
70
+ export { default as ContactInfo } from "./plus/contactInfo";
71
+ export { default as ContactInfoModal } from "./plus/contactInfoModal";
@@ -1,8 +1,8 @@
1
1
  export default {
2
2
  en: {
3
- 'pisell2.text.add-client': 'Add client',
4
- 'pisell2.text.change-client': 'Change Client',
5
- 'pisell2.text.remove-client': ' Remove Client'
3
+ 'pisell2.text.add-client': 'Add Customer',
4
+ 'pisell2.text.change-client': 'Change Customer',
5
+ 'pisell2.text.remove-client': ' Remove Customer'
6
6
  },
7
7
  'zh-CN': {
8
8
  'pisell2.text.add-client': '添加客户',
@@ -55,7 +55,7 @@ var ClientSearch = /*#__PURE__*/forwardRef(function (_ref, ref) {
55
55
  }, /*#__PURE__*/React.createElement("div", {
56
56
  className: "header-item",
57
57
  style: {
58
- width: 110
58
+ width: 180
59
59
  }
60
60
  }, locales.getText('pisell2.text.client-search.name')), /*#__PURE__*/React.createElement("div", {
61
61
  className: "header-item",
@@ -65,19 +65,14 @@ var ClientSearch = /*#__PURE__*/forwardRef(function (_ref, ref) {
65
65
  }, locales.getText('pisell2.text.client-search.register-time')), /*#__PURE__*/React.createElement("div", {
66
66
  className: "header-item",
67
67
  style: {
68
- width: 120
69
- }
70
- }, locales.getText('pisell2.text.client-search.phone')), /*#__PURE__*/React.createElement("div", {
71
- className: "header-item",
72
- style: {
73
- width: 135
68
+ width: 125
74
69
  }
75
- }, locales.getText('pisell2.text.client-search.email')), /*#__PURE__*/React.createElement("div", {
70
+ }, locales.getText('pisell2.text.client-search.membership')), /*#__PURE__*/React.createElement("div", {
76
71
  className: "header-item",
77
72
  style: {
78
- width: 120
73
+ width: 180
79
74
  }
80
- }, locales.getText('pisell2.text.client-search.membership')));
75
+ }, locales.getText('pisell2.text.client-search.contact-info')));
81
76
  };
82
77
 
83
78
  // 自定义结果展示组件
@@ -119,7 +114,7 @@ var ClientSearch = /*#__PURE__*/forwardRef(function (_ref, ref) {
119
114
  }, /*#__PURE__*/React.createElement(List, {
120
115
  dataSource: searchResults,
121
116
  renderItem: function renderItem(item, index) {
122
- var _latest_wallet_detail;
117
+ var _latest_wallet_detail, _item$contacts_info, _item$contacts_info2, _item$contacts_info3;
123
118
  var membershipText = (_latest_wallet_detail = item.latest_wallet_detail) === null || _latest_wallet_detail === void 0 || (_latest_wallet_detail = _latest_wallet_detail.wallet) === null || _latest_wallet_detail === void 0 ? void 0 : _latest_wallet_detail.name;
124
119
  return /*#__PURE__*/React.createElement(List.Item, {
125
120
  key: item.id,
@@ -135,26 +130,11 @@ var ClientSearch = /*#__PURE__*/forwardRef(function (_ref, ref) {
135
130
  }, /*#__PURE__*/React.createElement("div", {
136
131
  className: "item-cell",
137
132
  style: {
138
- width: 110
133
+ width: 180
139
134
  }
140
135
  }, /*#__PURE__*/React.createElement(ClientName, {
141
136
  dataSource: item
142
- })), /*#__PURE__*/React.createElement("div", {
143
- className: "item-cell",
144
- style: {
145
- width: 110
146
- }
147
- }, dayjs(item.created_at).format('YYYY-MM-DD') || '-'), /*#__PURE__*/React.createElement("div", {
148
- className: "item-cell",
149
- style: {
150
- width: 120
151
- }
152
- }, item.phone || '-'), /*#__PURE__*/React.createElement("div", {
153
- className: "item-cell",
154
- style: {
155
- width: 135
156
- }
157
- }, /*#__PURE__*/React.createElement("div", {
137
+ }), /*#__PURE__*/React.createElement("div", null, item.phone || '-'), /*#__PURE__*/React.createElement("div", {
158
138
  style: {
159
139
  overflow: 'hidden',
160
140
  textOverflow: 'ellipsis',
@@ -163,7 +143,12 @@ var ClientSearch = /*#__PURE__*/forwardRef(function (_ref, ref) {
163
143
  }, item.email || '-')), /*#__PURE__*/React.createElement("div", {
164
144
  className: "item-cell",
165
145
  style: {
166
- width: 120
146
+ width: 110
147
+ }
148
+ }, dayjs(item.created_at).format('YYYY-MM-DD') || '-'), /*#__PURE__*/React.createElement("div", {
149
+ className: "item-cell",
150
+ style: {
151
+ width: 125
167
152
  }
168
153
  }, membershipText && translationOriginal !== null && translationOriginal !== void 0 && translationOriginal(membershipText) ? /*#__PURE__*/React.createElement(Tag, {
169
154
  color: "gold",
@@ -177,7 +162,20 @@ var ClientSearch = /*#__PURE__*/forwardRef(function (_ref, ref) {
177
162
  borderRadius: 16,
178
163
  marginRight: 0
179
164
  }
180
- }, translationOriginal === null || translationOriginal === void 0 ? void 0 : translationOriginal(membershipText)) : '-')));
165
+ }, translationOriginal === null || translationOriginal === void 0 ? void 0 : translationOriginal(membershipText)) : '-'), /*#__PURE__*/React.createElement("div", {
166
+ className: "item-cell",
167
+ style: {
168
+ width: 180
169
+ }
170
+ }, /*#__PURE__*/React.createElement(ClientName, {
171
+ dataSource: item === null || item === void 0 || (_item$contacts_info = item.contacts_info) === null || _item$contacts_info === void 0 ? void 0 : _item$contacts_info.value
172
+ }), (item === null || item === void 0 || (_item$contacts_info2 = item.contacts_info) === null || _item$contacts_info2 === void 0 || (_item$contacts_info2 = _item$contacts_info2.value) === null || _item$contacts_info2 === void 0 || (_item$contacts_info2 = _item$contacts_info2.phone) === null || _item$contacts_info2 === void 0 ? void 0 : _item$contacts_info2.phone) || '-', /*#__PURE__*/React.createElement("div", {
173
+ style: {
174
+ overflow: 'hidden',
175
+ textOverflow: 'ellipsis',
176
+ whiteSpace: 'nowrap'
177
+ }
178
+ }, (item === null || item === void 0 || (_item$contacts_info3 = item.contacts_info) === null || _item$contacts_info3 === void 0 || (_item$contacts_info3 = _item$contacts_info3.value) === null || _item$contacts_info3 === void 0 ? void 0 : _item$contacts_info3.email) || '-'))));
181
179
  }
182
180
  }))));
183
181
  };
@@ -31,6 +31,7 @@ declare const _default: {
31
31
  'pisell2.text.client-search.phone': string;
32
32
  'pisell2.text.client-search.email': string;
33
33
  'pisell2.text.client-search.membership': string;
34
+ 'pisell2.text.client-search.contact-info': string;
34
35
  };
35
36
  'zh-CN': {
36
37
  'pisell2.text.leave-empty-for-walk-in': string;
@@ -64,6 +65,7 @@ declare const _default: {
64
65
  'pisell2.text.client-search.phone': string;
65
66
  'pisell2.text.client-search.email': string;
66
67
  'pisell2.text.client-search.membership': string;
68
+ 'pisell2.text.client-search.contact-info': string;
67
69
  };
68
70
  'zh-HK': {
69
71
  'pisell2.text.leave-empty-for-walk-in': string;
@@ -97,6 +99,7 @@ declare const _default: {
97
99
  'pisell2.text.client-search.phone': string;
98
100
  'pisell2.text.client-search.email': string;
99
101
  'pisell2.text.client-search.membership': string;
102
+ 'pisell2.text.client-search.contact-info': string;
100
103
  };
101
104
  };
102
105
  export default _default;
@@ -17,7 +17,7 @@ export default {
17
17
  'pisell2.text.save': 'Save',
18
18
  'pisell2.text.save-and-select': 'Save and select',
19
19
  'pisell2.text.no-results-found': 'No results found.',
20
- 'pisell2.text.create-new-client': 'Create new client',
20
+ 'pisell2.text.create-new-client': 'Create new customer',
21
21
  'pisell2.text.result-found': 'Result found',
22
22
  'pisell2.text.personnel-list': 'Personnel list',
23
23
  'pisell2.text.load-more': 'Load more',
@@ -30,7 +30,8 @@ export default {
30
30
  'pisell2.text.client-search.register-time': 'Registration Time',
31
31
  'pisell2.text.client-search.phone': 'Phone Number',
32
32
  'pisell2.text.client-search.email': 'Email Address',
33
- 'pisell2.text.client-search.membership': 'Membership'
33
+ 'pisell2.text.client-search.membership': 'Membership',
34
+ 'pisell2.text.client-search.contact-info': 'Contact info'
34
35
  },
35
36
  'zh-CN': {
36
37
  'pisell2.text.leave-empty-for-walk-in': '如未注册游客则留空',
@@ -63,7 +64,8 @@ export default {
63
64
  'pisell2.text.client-search.register-time': '注册时间',
64
65
  'pisell2.text.client-search.phone': '电话号码',
65
66
  'pisell2.text.client-search.email': '邮箱',
66
- 'pisell2.text.client-search.membership': '会员'
67
+ 'pisell2.text.client-search.membership': '会员',
68
+ 'pisell2.text.client-search.contact-info': '联系信息'
67
69
  },
68
70
  'zh-HK': {
69
71
  'pisell2.text.leave-empty-for-walk-in': '如未註冊遊客則留空',
@@ -96,6 +98,7 @@ export default {
96
98
  'pisell2.text.client-search.register-time': '註冊時間',
97
99
  'pisell2.text.client-search.phone': '電話號碼',
98
100
  'pisell2.text.client-search.email': '電郵地址',
99
- 'pisell2.text.client-search.membership': '會員'
101
+ 'pisell2.text.client-search.membership': '會員',
102
+ 'pisell2.text.client-search.contact-info': '聯繫信息'
100
103
  }
101
104
  };
@@ -10,6 +10,18 @@ export interface ClientData {
10
10
  nickname: string;
11
11
  shop_id: number;
12
12
  updated_at: string;
13
+ contacts_info: {
14
+ value: {
15
+ first_name?: string;
16
+ last_name?: string;
17
+ phone?: {
18
+ phone?: string;
19
+ country_calling_code?: string;
20
+ country_code?: string;
21
+ };
22
+ email?: string;
23
+ };
24
+ };
13
25
  }
14
26
  export interface ClientSearchProps {
15
27
  dataSource?: any;
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import { AvatarConfig } from '../../types';
3
+ import '../../index.less';
4
+ interface AvatarProps {
5
+ config?: AvatarConfig;
6
+ name: string;
7
+ cover?: string;
8
+ }
9
+ declare const Avatar: React.FC<AvatarProps>;
10
+ export default Avatar;
@@ -0,0 +1,30 @@
1
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
+ import React from 'react';
3
+ import { PisellAvatar } from '@pisell/materials';
4
+ import { getAvatarText } from "../../utils";
5
+ import { PREFIX } from "../../index";
6
+ import "../../index.less";
7
+ var Avatar = function Avatar(props) {
8
+ var config = props.config,
9
+ name = props.name,
10
+ cover = props.cover;
11
+ var _ref = config || {},
12
+ useTextAvatar = _ref.useTextAvatar,
13
+ children = _ref.children;
14
+ if (useTextAvatar) {
15
+ var text = children || getAvatarText(name);
16
+ return /*#__PURE__*/React.createElement("div", {
17
+ className: "".concat(PREFIX, "__avatar-wrapper")
18
+ }, /*#__PURE__*/React.createElement(PisellAvatar, _extends({
19
+ className: "".concat(PREFIX, "__avatar")
20
+ }, config || {}), text));
21
+ }
22
+ return /*#__PURE__*/React.createElement("div", {
23
+ className: "".concat(PREFIX, "__avatar-wrapper")
24
+ }, /*#__PURE__*/React.createElement(PisellAvatar, _extends({
25
+ className: "".concat(PREFIX, "__avatar")
26
+ }, config || {}, {
27
+ src: cover || ''
28
+ })));
29
+ };
30
+ export default Avatar;
@@ -0,0 +1,46 @@
1
+ import type { ReactNode } from 'react';
2
+ import React from 'react';
3
+ declare type NativeProps<S extends string = never> = {
4
+ className?: string;
5
+ style?: React.CSSProperties & Partial<Record<S, string>>;
6
+ };
7
+ declare type PropagationEvent = 'click';
8
+ import './index.less';
9
+ declare type SideType = 'left' | 'right';
10
+ export declare type SwipeActionRef = {
11
+ close: () => void;
12
+ show: (side?: SideType) => void;
13
+ };
14
+ declare type ActionColor = 'light' | 'weak' | 'primary' | 'success' | 'warning' | 'danger';
15
+ export declare type Action = {
16
+ key: string | number;
17
+ text: ReactNode;
18
+ color?: ActionColor | string;
19
+ onClick?: (e: React.MouseEvent) => void;
20
+ style?: React.CSSProperties;
21
+ };
22
+ export declare type SwipeActionProps = {
23
+ rightActions?: Action[];
24
+ leftActions?: Action[];
25
+ onAction?: (action: Action, e: React.MouseEvent) => void;
26
+ closeOnTouchOutside?: boolean;
27
+ closeOnAction?: boolean;
28
+ children: ReactNode;
29
+ stopPropagation?: PropagationEvent[];
30
+ onActionsReveal?: (side: SideType) => void;
31
+ onClose?: () => void;
32
+ escapeDom?: string;
33
+ } & NativeProps<'--background'>;
34
+ export declare const SwipeAction: React.ForwardRefExoticComponent<{
35
+ rightActions?: Action[] | undefined;
36
+ leftActions?: Action[] | undefined;
37
+ onAction?: ((action: Action, e: React.MouseEvent) => void) | undefined;
38
+ closeOnTouchOutside?: boolean | undefined;
39
+ closeOnAction?: boolean | undefined;
40
+ children: ReactNode;
41
+ stopPropagation?: "click"[] | undefined;
42
+ onActionsReveal?: ((side: SideType) => void) | undefined;
43
+ onClose?: (() => void) | undefined;
44
+ escapeDom?: string | undefined;
45
+ } & NativeProps<"--background"> & React.RefAttributes<SwipeActionRef>>;
46
+ export {};