@pisell/private-materials 3.4.42 → 3.4.44

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 (185) 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 +9 -1
  6. package/build/lowcode/preview.js +150 -155
  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/Sales/Summary/utils.d.ts +1 -1
  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/ConfirmInformation/index.js +273 -76
  15. package/es/components/appointmentBooking/components/ConfirmInformation/index.less +15 -0
  16. package/es/components/appointmentBooking/components/Services/index.js +22 -8
  17. package/es/components/appointmentBooking/hooks.d.ts +1 -0
  18. package/es/components/appointmentBooking/hooks.js +30 -30
  19. package/es/components/appointmentBooking/locales.d.ts +3 -0
  20. package/es/components/appointmentBooking/locales.js +9 -6
  21. package/es/components/booking/addons/model.d.ts +10 -1
  22. package/es/components/booking/components/customSelect/index.js +1 -1
  23. package/es/components/booking/components/footer/index.js +4 -1
  24. package/es/components/booking/components/footer/utils.js +75 -73
  25. package/es/components/booking/forms/footer.js +24 -10
  26. package/es/components/booking/forms/model.d.ts +10 -1
  27. package/es/components/booking/forms/sendModal/useSendModal.d.ts +1 -1
  28. package/es/components/booking/info/client/index.js +28 -13
  29. package/es/components/booking/info/clientVariant/hooks/useClientFn.js +16 -10
  30. package/es/components/booking/info/clientVariant/vertical/SelectDrawer.js +10 -2
  31. package/es/components/booking/info/clientVariant/vertical/index.js +1 -1
  32. package/es/components/booking/info/main.js +3 -2
  33. package/es/components/booking/info/model.d.ts +10 -1
  34. package/es/components/booking/info/model.js +5 -0
  35. package/es/components/booking/info/service/addService/utils.d.ts +1 -1
  36. package/es/components/booking/info2/index.js +3 -2
  37. package/es/components/booking/info2/service/addService/utils.d.ts +1 -1
  38. package/es/components/booking/info2/service/contactInfoMode/index.d.ts +2 -0
  39. package/es/components/booking/info2/service/contactInfoMode/index.js +94 -0
  40. package/es/components/booking/locales.d.ts +6 -0
  41. package/es/components/booking/locales.js +12 -3
  42. package/es/components/booking/model.d.ts +13 -1
  43. package/es/components/booking/model.js +3 -0
  44. package/es/components/booking/notes/model.d.ts +10 -1
  45. package/es/components/booking/payments/model.d.ts +10 -1
  46. package/es/components/eftposPay/app.d.ts +1 -1
  47. package/es/components/eftposPay/hooks.d.ts +1 -1
  48. package/es/components/eftposPay/store/index.d.ts +1 -1
  49. package/es/components/pay/toC/PaymentMethods/ApplePay/index.js +1 -1
  50. package/es/components/pay/toC/PaymentMethods/GooglePay/index.js +1 -1
  51. package/es/components/pay/toC/model.d.ts +9 -1
  52. package/es/components/schedules/model.d.ts +9 -1
  53. package/es/components/ticketBooking/components/ticketBooking/index.less +2 -1
  54. package/es/components/wallet/Detail/model.d.ts +13 -1
  55. package/es/components/wallet/DiscountCard/model.d.ts +14 -1
  56. package/es/components/wallet/PointCard/model.d.ts +13 -1
  57. package/es/components/wallet/RechargeableCard/model.d.ts +29 -1
  58. package/es/components/wallet/Voucher/model.d.ts +13 -1
  59. package/es/components/wallet/model.d.ts +9 -1
  60. package/es/index.d.ts +2 -0
  61. package/es/index.js +3 -1
  62. package/es/plus/clientName/index.d.ts +4 -0
  63. package/es/plus/clientName/index.js +18 -0
  64. package/es/plus/clientName/index.less +10 -0
  65. package/es/plus/clientName/type.d.ts +13 -0
  66. package/es/plus/clientName/type.js +1 -0
  67. package/es/plus/clientName/utils.d.ts +2 -0
  68. package/es/plus/clientName/utils.js +18 -0
  69. package/es/plus/contactInfo/components/Avatar/index.d.ts +10 -0
  70. package/es/plus/contactInfo/components/Avatar/index.js +30 -0
  71. package/es/plus/contactInfo/components/SwipeAction/index.d.ts +46 -0
  72. package/es/plus/contactInfo/components/SwipeAction/index.js +360 -0
  73. package/es/plus/contactInfo/components/SwipeAction/index.less +74 -0
  74. package/es/plus/contactInfo/index.d.ts +6 -0
  75. package/es/plus/contactInfo/index.js +198 -0
  76. package/es/plus/contactInfo/index.less +621 -0
  77. package/es/plus/contactInfo/locales.d.ts +15 -0
  78. package/es/plus/contactInfo/locales.js +14 -0
  79. package/es/plus/contactInfo/types.d.ts +91 -0
  80. package/es/plus/contactInfo/types.js +1 -0
  81. package/es/plus/contactInfo/utils.d.ts +7 -0
  82. package/es/plus/contactInfo/utils.js +50 -0
  83. package/es/plus/contactInfoModal/ContactInfoContent.d.ts +3 -0
  84. package/es/plus/contactInfoModal/ContactInfoContent.js +74 -0
  85. package/es/plus/contactInfoModal/index.d.ts +41 -0
  86. package/es/plus/contactInfoModal/index.js +155 -0
  87. package/es/plus/contactInfoModal/index.less +19 -0
  88. package/es/plus/contactInfoModal/locales.d.ts +66 -0
  89. package/es/plus/contactInfoModal/locales.js +65 -0
  90. package/es/plus/productSelect/ProductCard/index.d.ts +3 -1
  91. package/es/plus/productSelect/ProductCard/index.js +14 -5
  92. package/es/plus/productSelect/index.d.ts +3 -2
  93. package/es/plus/productSelect/index.js +33 -8
  94. package/es/plus/productSelect/index.less +4 -0
  95. package/lib/components/Sales/Summary/utils.d.ts +1 -1
  96. package/lib/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -1
  97. package/lib/components/appointmentBooking/components/Cart/Item/index.js +5 -3
  98. package/lib/components/appointmentBooking/components/ConfirmInformation/index.js +156 -13
  99. package/lib/components/appointmentBooking/components/ConfirmInformation/index.less +15 -0
  100. package/lib/components/appointmentBooking/components/Services/index.js +8 -3
  101. package/lib/components/appointmentBooking/hooks.d.ts +1 -0
  102. package/lib/components/appointmentBooking/hooks.js +73 -35
  103. package/lib/components/appointmentBooking/locales.d.ts +3 -0
  104. package/lib/components/appointmentBooking/locales.js +6 -3
  105. package/lib/components/booking/addons/model.d.ts +10 -1
  106. package/lib/components/booking/components/customSelect/index.js +1 -1
  107. package/lib/components/booking/components/footer/index.js +4 -1
  108. package/lib/components/booking/components/footer/utils.js +93 -68
  109. package/lib/components/booking/forms/footer.js +29 -11
  110. package/lib/components/booking/forms/model.d.ts +10 -1
  111. package/lib/components/booking/forms/sendModal/useSendModal.d.ts +1 -1
  112. package/lib/components/booking/info/client/index.js +14 -1
  113. package/lib/components/booking/info/clientVariant/hooks/useClientFn.js +7 -2
  114. package/lib/components/booking/info/clientVariant/vertical/SelectDrawer.js +11 -4
  115. package/lib/components/booking/info/clientVariant/vertical/index.js +34 -17
  116. package/lib/components/booking/info/main.js +5 -4
  117. package/lib/components/booking/info/model.d.ts +10 -1
  118. package/lib/components/booking/info/model.js +5 -0
  119. package/lib/components/booking/info/service/addService/utils.d.ts +1 -1
  120. package/lib/components/booking/info2/index.js +5 -4
  121. package/lib/components/booking/info2/service/addService/utils.d.ts +1 -1
  122. package/lib/components/booking/info2/service/contactInfoMode/index.d.ts +2 -0
  123. package/lib/components/booking/info2/service/contactInfoMode/index.js +111 -0
  124. package/lib/components/booking/locales.d.ts +6 -0
  125. package/lib/components/booking/locales.js +12 -3
  126. package/lib/components/booking/model.d.ts +13 -1
  127. package/lib/components/booking/model.js +3 -0
  128. package/lib/components/booking/notes/model.d.ts +10 -1
  129. package/lib/components/booking/payments/model.d.ts +10 -1
  130. package/lib/components/eftposPay/app.d.ts +1 -1
  131. package/lib/components/eftposPay/hooks.d.ts +1 -1
  132. package/lib/components/eftposPay/store/index.d.ts +1 -1
  133. package/lib/components/pay/toC/PaymentMethods/ApplePay/index.js +1 -1
  134. package/lib/components/pay/toC/PaymentMethods/GooglePay/index.js +1 -1
  135. package/lib/components/pay/toC/model.d.ts +9 -1
  136. package/lib/components/schedules/model.d.ts +9 -1
  137. package/lib/components/ticketBooking/components/ticketBooking/index.less +2 -1
  138. package/lib/components/wallet/Detail/model.d.ts +13 -1
  139. package/lib/components/wallet/DiscountCard/model.d.ts +14 -1
  140. package/lib/components/wallet/PointCard/model.d.ts +13 -1
  141. package/lib/components/wallet/RechargeableCard/model.d.ts +29 -1
  142. package/lib/components/wallet/Voucher/model.d.ts +13 -1
  143. package/lib/components/wallet/model.d.ts +9 -1
  144. package/lib/index.d.ts +2 -0
  145. package/lib/index.js +6 -0
  146. package/lib/plus/clientName/index.d.ts +4 -0
  147. package/lib/plus/clientName/index.js +53 -0
  148. package/lib/plus/clientName/index.less +10 -0
  149. package/lib/plus/clientName/type.d.ts +13 -0
  150. package/lib/plus/clientName/type.js +17 -0
  151. package/lib/plus/clientName/utils.d.ts +2 -0
  152. package/lib/plus/clientName/utils.js +43 -0
  153. package/lib/plus/contactInfo/components/Avatar/index.d.ts +10 -0
  154. package/lib/plus/contactInfo/components/Avatar/index.js +56 -0
  155. package/lib/plus/contactInfo/components/SwipeAction/index.d.ts +46 -0
  156. package/lib/plus/contactInfo/components/SwipeAction/index.js +373 -0
  157. package/lib/plus/contactInfo/components/SwipeAction/index.less +74 -0
  158. package/lib/plus/contactInfo/index.d.ts +6 -0
  159. package/lib/plus/contactInfo/index.js +226 -0
  160. package/lib/plus/contactInfo/index.less +621 -0
  161. package/lib/plus/contactInfo/locales.d.ts +15 -0
  162. package/lib/plus/contactInfo/locales.js +38 -0
  163. package/lib/plus/contactInfo/types.d.ts +91 -0
  164. package/lib/plus/contactInfo/types.js +17 -0
  165. package/lib/plus/contactInfo/utils.d.ts +7 -0
  166. package/lib/plus/contactInfo/utils.js +64 -0
  167. package/lib/plus/contactInfoModal/ContactInfoContent.d.ts +3 -0
  168. package/lib/plus/contactInfoModal/ContactInfoContent.js +129 -0
  169. package/lib/plus/contactInfoModal/index.d.ts +41 -0
  170. package/lib/plus/contactInfoModal/index.js +139 -0
  171. package/lib/plus/contactInfoModal/index.less +19 -0
  172. package/lib/plus/contactInfoModal/locales.d.ts +66 -0
  173. package/lib/plus/contactInfoModal/locales.js +89 -0
  174. package/lib/plus/productSelect/ProductCard/index.d.ts +3 -1
  175. package/lib/plus/productSelect/ProductCard/index.js +18 -4
  176. package/lib/plus/productSelect/index.d.ts +3 -2
  177. package/lib/plus/productSelect/index.js +20 -6
  178. package/lib/plus/productSelect/index.less +4 -0
  179. package/lowcode/contact-info/fragments/cardStyle.ts +68 -0
  180. package/lowcode/contact-info/fragments/nameStyle.ts +33 -0
  181. package/lowcode/contact-info/fragments/pisellAvatar.ts +103 -0
  182. package/lowcode/contact-info/fragments/textStyle.ts +33 -0
  183. package/lowcode/contact-info/meta.ts +199 -0
  184. package/lowcode/contact-info-modal/meta.ts +98 -0
  185. package/package.json +6 -4
@@ -27,6 +27,9 @@ var apis = {
27
27
  },
28
28
  getFormData: function getFormData() {
29
29
  return [];
30
+ },
31
+ getContactsInfo: function getContactsInfo() {
32
+ return null;
30
33
  }
31
34
  };
32
35
  export var walkInData = {
@@ -1 +1,10 @@
1
- export declare const Provider: any, Context: any;
1
+ /// <reference types="react" />
2
+ import { FormState } from "../model";
3
+ export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
4
+ state: FormState;
5
+ } & {
6
+ dispatch: (params: {
7
+ type: string;
8
+ payload: any;
9
+ }) => void;
10
+ }>;
@@ -1 +1,10 @@
1
- export declare const Provider: any, Context: any;
1
+ /// <reference types="react" />
2
+ import { FormState } from "../model";
3
+ export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
4
+ state: FormState;
5
+ } & {
6
+ dispatch: (params: {
7
+ type: string;
8
+ payload: any;
9
+ }) => void;
10
+ }>;
@@ -1,5 +1,5 @@
1
1
  import { PosProps, RouteType } from './const';
2
- declare const App: ({ action, api, device_number, terminal, tyroUrl, tyroVersion, onChangeParams, isMobile, channel, formatAmount, ...props }: Omit<PosProps, "mode" | "type" | "getApi"> & {
2
+ declare const App: ({ action, api, device_number, terminal, tyroUrl, tyroVersion, onChangeParams, isMobile, channel, formatAmount, ...props }: Omit<PosProps, "type" | "mode" | "getApi"> & {
3
3
  action: RouteType;
4
4
  device_number: string | number;
5
5
  api: ReturnType<PosProps['getApi']>;
@@ -19,7 +19,7 @@ export declare const useStoreRef: <T extends {
19
19
  readonly netRef: React.MutableRefObject<boolean | undefined>;
20
20
  readonly symbolRef: React.MutableRefObject<string>;
21
21
  readonly amountRef: React.MutableRefObject<string | number>;
22
- readonly eftposRef: React.MutableRefObject<"tyro" | "windcave" | "payo" | "stripe" | "linkly">;
22
+ readonly eftposRef: React.MutableRefObject<"stripe" | "tyro" | "windcave" | "payo" | "linkly">;
23
23
  readonly clientRef: React.MutableRefObject<ClientEnum>;
24
24
  readonly dataRef: React.MutableRefObject<import("./store").State>;
25
25
  };
@@ -297,7 +297,7 @@ export declare const backUpFree: (payload: Partial<State>) => {
297
297
  amount?: string | number | undefined;
298
298
  mode?: "refund" | "pay" | "fullPay" | "query" | undefined;
299
299
  order_id?: string | number | undefined;
300
- eftpos?: "tyro" | "windcave" | "payo" | "stripe" | "linkly" | undefined;
300
+ eftpos?: "stripe" | "tyro" | "windcave" | "payo" | "linkly" | undefined;
301
301
  action?: "amount" | "pay" | "deviceList" | undefined;
302
302
  key?: number | undefined;
303
303
  step?: number | undefined;
@@ -116,7 +116,7 @@ var ApplePay = function ApplePay(props, ref) {
116
116
 
117
117
  // 提取域名
118
118
  shop_domain = linkElement.hostname;
119
- _href = "".concat(config.pay).concat(formatFranchiseeRoute("/apple-pay?order_id=".concat((_state$payGroup3 = state.payGroup) === null || _state$payGroup3 === void 0 ? void 0 : _state$payGroup3.order_id, "&shop_id=").concat(shopId, "&locale=").concat(locale, "&shop_domain=").concat(shop_domain, "&total_amount=").concat(values.amount, "&payment_group_id=").concat(values.payment_group_id, "&front_order_uuid=").concat(state.front_order_uuid), state.history)); // 记录即将跳转到ApplePay
119
+ _href = "".concat(config.pay).concat(formatFranchiseeRoute("/apple-pay?order_id=".concat((_state$payGroup3 = state.payGroup) === null || _state$payGroup3 === void 0 ? void 0 : _state$payGroup3.order_id, "&shop_id=").concat(shopId, "&locale=").concat(locale, "&shop_domain=").concat(shop_domain, "&total_amount=").concat(values.amount, "&payment_group_id=").concat(values.payment_group_id, "&front_order_uuid=").concat(state.front_order_uuid, "&is_replace_router=1"), state.history)); // 记录即将跳转到ApplePay
120
120
  paymentLogger.addLog({
121
121
  key: 'ApplePay准备跳转',
122
122
  value: ""
@@ -131,7 +131,7 @@ var GooglePay = function GooglePay(props, ref) {
131
131
 
132
132
  // 提取域名
133
133
  shop_domain = linkElement.hostname;
134
- _href = "".concat(config.pay).concat(formatFranchiseeRoute("/google-pay?order_id=".concat((_state$payGroup3 = state.payGroup) === null || _state$payGroup3 === void 0 ? void 0 : _state$payGroup3.order_id, "&shop_id=").concat(shopId, "&locale=").concat(locale, "&shop_domain=").concat(shop_domain, "&total_amount=").concat(values.amount, "&payment_group_id=").concat(values.payment_group_id, "&front_order_uuid=").concat(state.front_order_uuid), state.history)); // 记录即将跳转到GooglePay
134
+ _href = "".concat(config.pay).concat(formatFranchiseeRoute("/google-pay?order_id=".concat((_state$payGroup3 = state.payGroup) === null || _state$payGroup3 === void 0 ? void 0 : _state$payGroup3.order_id, "&shop_id=").concat(shopId, "&locale=").concat(locale, "&shop_domain=").concat(shop_domain, "&total_amount=").concat(values.amount, "&payment_group_id=").concat(values.payment_group_id, "&front_order_uuid=").concat(state.front_order_uuid, "&is_replace_router=1"), state.history)); // 记录即将跳转到GooglePay
135
135
  paymentLogger.addLog({
136
136
  key: 'GooglePay准备跳转',
137
137
  value: ''
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  export interface FormState {
2
3
  platform: 'pc' | 'h5' | '' | undefined;
3
4
  order: any;
@@ -29,4 +30,11 @@ export interface PayGroup {
29
30
  _order: any;
30
31
  front_order_uuid?: string;
31
32
  }
32
- export declare const Provider: any, Context: any;
33
+ export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
34
+ state: FormState;
35
+ } & {
36
+ dispatch: (params: {
37
+ type: string;
38
+ payload: any;
39
+ }) => void;
40
+ }>;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { CalendarDataItem, ScheduleItem } from "./type";
2
3
  import dayjs from "dayjs";
3
4
  export interface FormState {
@@ -68,4 +69,11 @@ export interface FormState {
68
69
  };
69
70
  setGlobalState: Function | null;
70
71
  }
71
- export declare const Provider: any, Context: any;
72
+ export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
73
+ state: FormState;
74
+ } & {
75
+ dispatch: (params: {
76
+ type: string;
77
+ payload: any;
78
+ }) => void;
79
+ }>;
@@ -8,7 +8,8 @@
8
8
  .booking-info-create-new,
9
9
  .pisell-lowcode__booking-field-title,
10
10
  .pisell-lowcode__shopping-cart-empty,
11
- .pisell-lowcode__booking-service-clear-btn {
11
+ .pisell-lowcode__booking-service-clear-btn,
12
+ .pisell-lowcode__booking-contact-info-title {
12
13
  color: #ffffff;
13
14
  }
14
15
  }
@@ -1 +1,13 @@
1
- export declare const Provider: any, Context: any;
1
+ /// <reference types="react" />
2
+ interface RechargeState {
3
+ addWalletCard: any;
4
+ }
5
+ export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
6
+ walletDetailState: RechargeState;
7
+ } & {
8
+ dispatch: (params: {
9
+ type: string;
10
+ payload: any;
11
+ }) => void;
12
+ }>;
13
+ export {};
@@ -1 +1,14 @@
1
- export declare const Provider: any, Context: any;
1
+ /// <reference types="react" />
2
+ interface RechargeState {
3
+ total: number;
4
+ setup?: 'menu' | 'list' | 'detail' | string;
5
+ }
6
+ export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
7
+ state: RechargeState;
8
+ } & {
9
+ dispatch: (params: {
10
+ type: string;
11
+ payload: any;
12
+ }) => void;
13
+ }>;
14
+ export {};
@@ -1 +1,13 @@
1
- export declare const Provider: any, Context: any;
1
+ /// <reference types="react" />
2
+ interface RechargeState {
3
+ total: number;
4
+ }
5
+ export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
6
+ state: RechargeState;
7
+ } & {
8
+ dispatch: (params: {
9
+ type: string;
10
+ payload: any;
11
+ }) => void;
12
+ }>;
13
+ export {};
@@ -1 +1,29 @@
1
- export declare const Provider: any, Context: any;
1
+ /// <reference types="react" />
2
+ interface RechargeState {
3
+ selectedGiftOptionId: string | null;
4
+ cardList: Array<{
5
+ id: string;
6
+ name: string;
7
+ price: number;
8
+ }>;
9
+ selectedItem: {
10
+ id?: string;
11
+ gift_price?: number;
12
+ price?: number;
13
+ name?: string;
14
+ variant_id?: string;
15
+ };
16
+ productId?: string;
17
+ detailId?: string;
18
+ total: string | number;
19
+ rechargeModalOpen: boolean;
20
+ }
21
+ export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
22
+ state: RechargeState;
23
+ } & {
24
+ dispatch: (params: {
25
+ type: string;
26
+ payload: any;
27
+ }) => void;
28
+ }>;
29
+ export {};
@@ -1 +1,13 @@
1
- export declare const Provider: any, Context: any;
1
+ /// <reference types="react" />
2
+ interface RechargeState {
3
+ total: 0;
4
+ }
5
+ export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
6
+ state: RechargeState;
7
+ } & {
8
+ dispatch: (params: {
9
+ type: string;
10
+ payload: any;
11
+ }) => void;
12
+ }>;
13
+ export {};
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { IWalletListItemProps } from './serve';
2
3
  export interface WalletCardItemProps {
3
4
  id: string;
@@ -26,4 +27,11 @@ export interface WalletListProps {
26
27
  currentSearchListItemCode?: string;
27
28
  [key: string]: any;
28
29
  }
29
- export declare const Provider: any, Context: any;
30
+ export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
31
+ global_wallet: WalletListProps;
32
+ } & {
33
+ dispatch: (params: {
34
+ type: string;
35
+ payload: any;
36
+ }) => void;
37
+ }>;
package/es/index.d.ts CHANGED
@@ -52,3 +52,5 @@ export { default as PinModal } from './components/pinModal';
52
52
  export { default as PinVerifyModal } from './components/pinVerifyModal';
53
53
  export { OAuthConfig, SaaSAdminAuth, OrgAdminAuth, CustomerAuth, CustomerOAuthConfig, DeviceAuth, POSOperatorAuth, OnlineShopAuth, SaaSManagermentAuth } from './components/authentication/admin';
54
54
  export type { SaaSAdminAuthProps, OrgAdminAuthProps, DeviceAuthProps, POSOperatorAuthProps, CustomerOAuthConfigProps } from './components/authentication/admin';
55
+ export { default as ContactInfo } from './plus/contactInfo';
56
+ export { default as ContactInfoModal } from './plus/contactInfoModal';
package/es/index.js CHANGED
@@ -54,4 +54,6 @@ export { default as SaasRegister } from "./plus/saasRegister";
54
54
  export { default as SaasCreateOrganization } from "./plus/saasCreateOrganization";
55
55
  export { default as PinModal } from "./components/pinModal";
56
56
  export { default as PinVerifyModal } from "./components/pinVerifyModal";
57
- export { OAuthConfig, SaaSAdminAuth, OrgAdminAuth, CustomerAuth, CustomerOAuthConfig, DeviceAuth, POSOperatorAuth, OnlineShopAuth, SaaSManagermentAuth } from "./components/authentication/admin";
57
+ export { OAuthConfig, SaaSAdminAuth, OrgAdminAuth, CustomerAuth, CustomerOAuthConfig, DeviceAuth, POSOperatorAuth, OnlineShopAuth, SaaSManagermentAuth } from "./components/authentication/admin";
58
+ export { default as ContactInfo } from "./plus/contactInfo";
59
+ export { default as ContactInfoModal } from "./plus/contactInfoModal";
@@ -0,0 +1,4 @@
1
+ import './index.less';
2
+ import { IClientNameProps } from './type';
3
+ declare const ClientName: ({ className, dataSource, style }: IClientNameProps) => JSX.Element | null;
4
+ export default ClientName;
@@ -0,0 +1,18 @@
1
+ import React, { useMemo } from 'react';
2
+ import classNames from 'classnames';
3
+ import "./index.less";
4
+ import { getClientName } from "./utils";
5
+ var ClientName = function ClientName(_ref) {
6
+ var className = _ref.className,
7
+ dataSource = _ref.dataSource,
8
+ style = _ref.style;
9
+ var name = useMemo(function () {
10
+ return getClientName(dataSource);
11
+ }, [dataSource]);
12
+ if (!dataSource) return null;
13
+ return /*#__PURE__*/React.createElement("div", {
14
+ className: classNames('pisell-client-name', className),
15
+ style: style || {}
16
+ }, name);
17
+ };
18
+ export default ClientName;
@@ -0,0 +1,10 @@
1
+ .pisell-client-name {
2
+ color: var(--Base-Black, #000);
3
+ font-size: 16px;
4
+ font-style: normal;
5
+ font-weight: 600;
6
+ line-height: 20px;
7
+ white-space: nowrap;
8
+ overflow: hidden;
9
+ text-overflow: ellipsis;
10
+ }
@@ -0,0 +1,13 @@
1
+ /// <reference types="react" />
2
+ export declare type ClientData = {
3
+ display_name?: string;
4
+ nickname?: string;
5
+ first_name?: string;
6
+ last_name?: string;
7
+ [key: string]: any;
8
+ };
9
+ export interface IClientNameProps {
10
+ dataSource?: string | ClientData | null;
11
+ className?: string;
12
+ style?: React.CSSProperties;
13
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ import { ClientData } from './type';
2
+ export declare const getClientName: (dataSource: string | ClientData | null) => string | null;
@@ -0,0 +1,18 @@
1
+ export var getClientName = function getClientName(dataSource) {
2
+ if (!dataSource || typeof dataSource === 'string') {
3
+ return dataSource;
4
+ }
5
+ var first_name = dataSource.first_name,
6
+ last_name = dataSource.last_name,
7
+ display_name = dataSource.display_name,
8
+ nickname = dataSource.nickname;
9
+ var finalName = '';
10
+ if (display_name) {
11
+ finalName = display_name;
12
+ } else if (nickname) {
13
+ finalName = nickname;
14
+ } else if (first_name || last_name) {
15
+ finalName = "".concat(first_name, " ").concat(last_name).trim();
16
+ }
17
+ return finalName;
18
+ };
@@ -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 {};