@pisell/private-materials 3.4.76 → 3.4.77

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 (164) 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/forms/sendModal/useSendModal.d.ts +1 -0
  12. package/es/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
  13. package/es/components/booking/info/hooks/useInfoHolder.d.ts +1 -0
  14. package/es/components/booking/utils.d.ts +2 -2
  15. package/es/components/eftpos/hooks.d.ts +0 -1
  16. package/es/components/eftposPay/amount.d.ts +1 -1
  17. package/es/components/eftposPay/device.d.ts +1 -1
  18. package/es/components/eftposPay/hooks.d.ts +2 -2
  19. package/es/components/eftposPay/store/index.d.ts +5 -5
  20. package/es/components/eftposPay/tyro/hooks.d.ts +0 -1
  21. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +1 -0
  22. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +0 -1
  23. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +0 -1
  24. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
  25. package/es/components/shoppingCart/components/Empty/index.d.ts +1 -0
  26. package/es/hooks/useTranslationOriginal.d.ts +1 -0
  27. package/es/hooks/useTranslationOriginal.js +10 -0
  28. package/es/index.d.ts +3 -0
  29. package/es/index.js +3 -0
  30. package/es/plus/clientCard/index.d.ts +7 -0
  31. package/es/plus/clientCard/index.js +462 -0
  32. package/es/plus/clientCard/index.less +515 -0
  33. package/es/plus/clientCard/line/index.d.ts +9 -0
  34. package/es/plus/clientCard/line/index.js +157 -0
  35. package/es/plus/clientCard/line/index.less +142 -0
  36. package/es/plus/clientCard/locales.d.ts +18 -0
  37. package/es/plus/clientCard/locales.js +17 -0
  38. package/es/plus/clientCard/types.d.ts +135 -0
  39. package/es/plus/clientCard/types.js +1 -0
  40. package/es/plus/clientCard/utils.d.ts +8 -0
  41. package/es/plus/clientCard/utils.js +59 -0
  42. package/es/plus/clinetSearch/Add/BirthdayField/index.d.ts +3 -0
  43. package/es/plus/clinetSearch/Add/BirthdayField/index.js +277 -0
  44. package/es/plus/clinetSearch/Add/GenderField/index.d.ts +3 -0
  45. package/es/plus/clinetSearch/Add/GenderField/index.js +18 -0
  46. package/es/plus/clinetSearch/Add/PhoneField/index.d.ts +3 -0
  47. package/es/plus/clinetSearch/Add/PhoneField/index.js +52 -0
  48. package/es/plus/clinetSearch/Add/PhoneField/serve.d.ts +2 -0
  49. package/es/plus/clinetSearch/Add/PhoneField/serve.js +166 -0
  50. package/es/plus/clinetSearch/Add/index.d.ts +18 -0
  51. package/es/plus/clinetSearch/Add/index.js +213 -0
  52. package/es/plus/clinetSearch/Add/index.less +30 -0
  53. package/es/plus/clinetSearch/InfiniteScroll/InfiniteScroll.d.ts +5 -0
  54. package/es/plus/clinetSearch/InfiniteScroll/InfiniteScroll.js +265 -0
  55. package/es/plus/clinetSearch/InfiniteScroll/index.d.ts +2 -0
  56. package/es/plus/clinetSearch/InfiniteScroll/index.js +1 -0
  57. package/es/plus/clinetSearch/InfiniteScroll/types.d.ts +46 -0
  58. package/es/plus/clinetSearch/InfiniteScroll/types.js +1 -0
  59. package/es/plus/clinetSearch/index.d.ts +18 -0
  60. package/es/plus/clinetSearch/index.js +234 -0
  61. package/es/plus/clinetSearch/index.less +95 -0
  62. package/es/plus/clinetSearch/locales.d.ts +108 -0
  63. package/es/plus/clinetSearch/locales.js +107 -0
  64. package/es/plus/clinetSearch/serve.d.ts +1 -0
  65. package/es/plus/clinetSearch/serve.js +31 -0
  66. package/es/plus/clinetSearch/types.d.ts +70 -0
  67. package/es/plus/clinetSearch/types.js +1 -0
  68. package/es/plus/walletEditor/components/ImageUpload/index.d.ts +1 -1
  69. package/es/plus/walletPassGallery/components/passDetail/index.d.ts +2 -0
  70. package/es/plus/walletPassGallery/components/passDetail/index.js +104 -39
  71. package/es/plus/walletPassGallery/components/timelineSection/index.d.ts +2 -0
  72. package/es/plus/walletPassGallery/components/timelineSection/index.js +19 -2
  73. package/es/plus/walletPassGallery/index.d.ts +4 -0
  74. package/es/plus/walletPassGallery/index.js +121 -42
  75. package/es/plus/walletPassGallery/serve.d.ts +3 -1
  76. package/es/plus/walletPassGallery/serve.js +13 -13
  77. package/es/pro/Selector/Selector.d.ts +1 -1
  78. package/es/pro/pisellPhoneKeyboard/index.d.ts +13 -0
  79. package/es/pro/pisellPhoneKeyboard/index.js +210 -0
  80. package/es/pro/pisellPhoneKeyboard/index.less +157 -0
  81. package/es/pro/pisellPhoneKeyboard/locales.d.ts +12 -0
  82. package/es/pro/pisellPhoneKeyboard/locales.js +11 -0
  83. package/lib/components/booking/forms/sendModal/useSendModal.d.ts +1 -0
  84. package/lib/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
  85. package/lib/components/booking/info/hooks/useInfoHolder.d.ts +1 -0
  86. package/lib/components/booking/utils.d.ts +2 -2
  87. package/lib/components/eftpos/hooks.d.ts +0 -1
  88. package/lib/components/eftposPay/amount.d.ts +1 -1
  89. package/lib/components/eftposPay/device.d.ts +1 -1
  90. package/lib/components/eftposPay/hooks.d.ts +2 -2
  91. package/lib/components/eftposPay/store/index.d.ts +5 -5
  92. package/lib/components/eftposPay/tyro/hooks.d.ts +0 -1
  93. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +1 -0
  94. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +0 -1
  95. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +0 -1
  96. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
  97. package/lib/components/shoppingCart/components/Empty/index.d.ts +1 -0
  98. package/lib/hooks/useTranslationOriginal.d.ts +1 -0
  99. package/lib/hooks/useTranslationOriginal.js +42 -0
  100. package/lib/index.d.ts +3 -0
  101. package/lib/index.js +9 -0
  102. package/lib/plus/clientCard/index.d.ts +7 -0
  103. package/lib/plus/clientCard/index.js +457 -0
  104. package/lib/plus/clientCard/index.less +515 -0
  105. package/lib/plus/clientCard/line/index.d.ts +9 -0
  106. package/lib/plus/clientCard/line/index.js +153 -0
  107. package/lib/plus/clientCard/line/index.less +142 -0
  108. package/lib/plus/clientCard/locales.d.ts +18 -0
  109. package/lib/plus/clientCard/locales.js +41 -0
  110. package/lib/plus/clientCard/types.d.ts +135 -0
  111. package/lib/plus/clientCard/types.js +17 -0
  112. package/lib/plus/clientCard/utils.d.ts +8 -0
  113. package/lib/plus/clientCard/utils.js +75 -0
  114. package/lib/plus/clinetSearch/Add/BirthdayField/index.d.ts +3 -0
  115. package/lib/plus/clinetSearch/Add/BirthdayField/index.js +256 -0
  116. package/lib/plus/clinetSearch/Add/GenderField/index.d.ts +3 -0
  117. package/lib/plus/clinetSearch/Add/GenderField/index.js +52 -0
  118. package/lib/plus/clinetSearch/Add/PhoneField/index.d.ts +3 -0
  119. package/lib/plus/clinetSearch/Add/PhoneField/index.js +78 -0
  120. package/lib/plus/clinetSearch/Add/PhoneField/serve.d.ts +2 -0
  121. package/lib/plus/clinetSearch/Add/PhoneField/serve.js +193 -0
  122. package/lib/plus/clinetSearch/Add/index.d.ts +18 -0
  123. package/lib/plus/clinetSearch/Add/index.js +244 -0
  124. package/lib/plus/clinetSearch/Add/index.less +30 -0
  125. package/lib/plus/clinetSearch/InfiniteScroll/InfiniteScroll.d.ts +5 -0
  126. package/lib/plus/clinetSearch/InfiniteScroll/InfiniteScroll.js +235 -0
  127. package/lib/plus/clinetSearch/InfiniteScroll/index.d.ts +2 -0
  128. package/lib/plus/clinetSearch/InfiniteScroll/index.js +35 -0
  129. package/lib/plus/clinetSearch/InfiniteScroll/types.d.ts +46 -0
  130. package/lib/plus/clinetSearch/InfiniteScroll/types.js +17 -0
  131. package/lib/plus/clinetSearch/index.d.ts +18 -0
  132. package/lib/plus/clinetSearch/index.js +237 -0
  133. package/lib/plus/clinetSearch/index.less +95 -0
  134. package/lib/plus/clinetSearch/locales.d.ts +108 -0
  135. package/lib/plus/clinetSearch/locales.js +131 -0
  136. package/lib/plus/clinetSearch/serve.d.ts +1 -0
  137. package/lib/plus/clinetSearch/serve.js +33 -0
  138. package/lib/plus/clinetSearch/types.d.ts +70 -0
  139. package/lib/plus/clinetSearch/types.js +17 -0
  140. package/lib/plus/walletEditor/components/ImageUpload/index.d.ts +1 -1
  141. package/lib/plus/walletPassGallery/components/passDetail/index.d.ts +2 -0
  142. package/lib/plus/walletPassGallery/components/passDetail/index.js +57 -5
  143. package/lib/plus/walletPassGallery/components/timelineSection/index.d.ts +2 -0
  144. package/lib/plus/walletPassGallery/components/timelineSection/index.js +17 -2
  145. package/lib/plus/walletPassGallery/index.d.ts +4 -0
  146. package/lib/plus/walletPassGallery/index.js +141 -42
  147. package/lib/plus/walletPassGallery/serve.d.ts +3 -1
  148. package/lib/plus/walletPassGallery/serve.js +2 -2
  149. package/lib/pro/Selector/Selector.d.ts +1 -1
  150. package/lib/pro/pisellPhoneKeyboard/index.d.ts +13 -0
  151. package/lib/pro/pisellPhoneKeyboard/index.js +219 -0
  152. package/lib/pro/pisellPhoneKeyboard/index.less +157 -0
  153. package/lib/pro/pisellPhoneKeyboard/locales.d.ts +12 -0
  154. package/lib/pro/pisellPhoneKeyboard/locales.js +35 -0
  155. package/lowcode/client-card/fragments/cardStyle.ts +63 -0
  156. package/lowcode/client-card/fragments/nameStyle.ts +34 -0
  157. package/lowcode/client-card/fragments/pisellAvatar.ts +87 -0
  158. package/lowcode/client-card/fragments/tagConfig.ts +88 -0
  159. package/lowcode/client-card/meta.ts +343 -0
  160. package/lowcode/client-search/meta.ts +316 -0
  161. package/lowcode/eco-cup-list/meta.ts +1 -1
  162. package/lowcode/eco-customer-list/meta.ts +1 -1
  163. package/lowcode/wallet-pass-gallery/meta.ts +66 -1
  164. package/package.json +2 -2
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const GenderField: (props: any) => React.JSX.Element;
3
+ export default GenderField;
@@ -0,0 +1,52 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
+
29
+ // src/plus/clinetSearch/Add/GenderField/index.tsx
30
+ var GenderField_exports = {};
31
+ __export(GenderField_exports, {
32
+ default: () => GenderField_default
33
+ });
34
+ module.exports = __toCommonJS(GenderField_exports);
35
+ var import_react = __toESM(require("react"));
36
+ var import_antd = require("antd");
37
+ var import_utils = require("@pisell/utils");
38
+ var GenderField = (props) => {
39
+ return /* @__PURE__ */ import_react.default.createElement(
40
+ import_antd.Select,
41
+ {
42
+ size: "large",
43
+ placeholder: import_utils.locales.getText("pisell2.text.gender"),
44
+ options: [
45
+ { label: import_utils.locales.getText("pisell2.text.gender.male"), value: "1" },
46
+ { label: import_utils.locales.getText("pisell2.text.gender.female"), value: "2" }
47
+ ],
48
+ ...props
49
+ }
50
+ );
51
+ };
52
+ var GenderField_default = GenderField;
@@ -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,78 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
+
29
+ // src/plus/clinetSearch/Add/PhoneField/index.tsx
30
+ var PhoneField_exports = {};
31
+ __export(PhoneField_exports, {
32
+ default: () => PhoneField_default
33
+ });
34
+ module.exports = __toCommonJS(PhoneField_exports);
35
+ var import_react = __toESM(require("react"));
36
+ var import_antd = require("antd");
37
+ var import_pisellPhoneKeyboard = __toESM(require("../../../../pro/pisellPhoneKeyboard"));
38
+ var import_ahooks = require("ahooks");
39
+ var import_serve = require("./serve");
40
+ var defaultValue = {
41
+ code: "+61",
42
+ phone: ""
43
+ };
44
+ var PhoneField = ({ value, onChange }) => {
45
+ const codes = (0, import_ahooks.useRequest)(import_serve.getCountries, {
46
+ manual: true
47
+ });
48
+ (0, import_react.useEffect)(() => {
49
+ codes.run();
50
+ }, []);
51
+ const _onChange = (key, val) => {
52
+ onChange({ ...defaultValue, ...value, [key]: val });
53
+ };
54
+ return /* @__PURE__ */ import_react.default.createElement(import_antd.Space.Compact, { style: { width: "100%" } }, /* @__PURE__ */ import_react.default.createElement(
55
+ import_antd.Select,
56
+ {
57
+ options: codes.data || [],
58
+ onChange: (val) => {
59
+ _onChange("code", val);
60
+ },
61
+ size: "large",
62
+ style: { flex: "0 0 100px" },
63
+ loading: codes.loading,
64
+ optionLabelProp: "value",
65
+ value: value == null ? void 0 : value.code,
66
+ dropdownMatchSelectWidth: false
67
+ }
68
+ ), /* @__PURE__ */ import_react.default.createElement(
69
+ import_pisellPhoneKeyboard.default,
70
+ {
71
+ value: (value == null ? void 0 : value.phone) || "",
72
+ onChange: (e) => {
73
+ _onChange("phone", e);
74
+ }
75
+ }
76
+ ));
77
+ };
78
+ var PhoneField_default = PhoneField;
@@ -0,0 +1,2 @@
1
+ export declare const defaultCodes: any;
2
+ export declare const getCountries: (params?: any) => Promise<any>;
@@ -0,0 +1,193 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+
19
+ // src/plus/clinetSearch/Add/PhoneField/serve.ts
20
+ var serve_exports = {};
21
+ __export(serve_exports, {
22
+ defaultCodes: () => defaultCodes,
23
+ getCountries: () => getCountries
24
+ });
25
+ module.exports = __toCommonJS(serve_exports);
26
+ var import_utils = require("../../../../utils");
27
+ var import_utils2 = require("@pisell/utils");
28
+ var formatData = (data) => {
29
+ return data.map((item, i) => {
30
+ return {
31
+ label: `${item.name} (+${item.calling_code})`,
32
+ value: "+" + item.calling_code,
33
+ key: i
34
+ };
35
+ });
36
+ };
37
+ var defaultCodes = formatData([
38
+ {
39
+ "name": "Mexico",
40
+ "code": "MX",
41
+ "calling_code": "52",
42
+ "currency_code": "MXN"
43
+ },
44
+ {
45
+ "name": "美国",
46
+ "code": "US",
47
+ "calling_code": "1",
48
+ "currency_code": "USD"
49
+ },
50
+ {
51
+ "name": "加拿大",
52
+ "code": "CA",
53
+ "calling_code": "1",
54
+ "currency_code": "CAD"
55
+ },
56
+ {
57
+ "name": "澳大利亚",
58
+ "code": "AU",
59
+ "calling_code": "61",
60
+ "currency_code": "AUD"
61
+ },
62
+ {
63
+ "name": "新西兰",
64
+ "code": "NZ",
65
+ "calling_code": "64",
66
+ "currency_code": "NZD"
67
+ },
68
+ {
69
+ "name": "新加坡",
70
+ "code": "SG",
71
+ "calling_code": "65",
72
+ "currency_code": "SGD"
73
+ },
74
+ {
75
+ "name": "香港特别行政区",
76
+ "code": "HK",
77
+ "calling_code": "852",
78
+ "currency_code": "HKD"
79
+ },
80
+ {
81
+ "name": "中国",
82
+ "code": "CN",
83
+ "calling_code": "86",
84
+ "currency_code": "AUD"
85
+ },
86
+ {
87
+ "name": "日本",
88
+ "code": "JP",
89
+ "calling_code": "81",
90
+ "currency_code": "JPY"
91
+ },
92
+ {
93
+ "name": "马来西亚",
94
+ "code": "MY",
95
+ "calling_code": "60",
96
+ "currency_code": "USD"
97
+ },
98
+ {
99
+ "name": "英国",
100
+ "code": "GB",
101
+ "calling_code": "44",
102
+ "currency_code": "GBP"
103
+ },
104
+ {
105
+ "name": "法国",
106
+ "code": "FR",
107
+ "calling_code": "33",
108
+ "currency_code": "EUR"
109
+ },
110
+ {
111
+ "name": "意大利",
112
+ "code": "IT",
113
+ "calling_code": "39",
114
+ "currency_code": "EUR"
115
+ },
116
+ {
117
+ "name": "Ireland",
118
+ "code": "IE",
119
+ "calling_code": "353",
120
+ "currency_code": "EUR"
121
+ },
122
+ {
123
+ "name": "Netherlands",
124
+ "code": "NL",
125
+ "calling_code": "31",
126
+ "currency_code": "EUR"
127
+ },
128
+ {
129
+ "name": "Germany",
130
+ "code": "DE",
131
+ "calling_code": "49",
132
+ "currency_code": "EUR"
133
+ },
134
+ {
135
+ "name": "Spain",
136
+ "code": "ES",
137
+ "calling_code": "34",
138
+ "currency_code": "EUR"
139
+ },
140
+ {
141
+ "name": "India",
142
+ "code": "IND",
143
+ "calling_code": "91",
144
+ "currency_code": "INR"
145
+ },
146
+ {
147
+ "name": "Nigeria",
148
+ "code": "NG",
149
+ "calling_code": "234",
150
+ "currency_code": "NGN"
151
+ },
152
+ {
153
+ "name": "Islamic Republic of Pakistan‎",
154
+ "code": "PAK",
155
+ "calling_code": "92",
156
+ "currency_code": "PRK"
157
+ },
158
+ {
159
+ "name": "Philippines",
160
+ "code": "PH",
161
+ "calling_code": "63",
162
+ "currency_code": "PHP"
163
+ },
164
+ {
165
+ "name": "Thailand",
166
+ "code": "TH",
167
+ "calling_code": "66",
168
+ "currency_code": "THB"
169
+ },
170
+ {
171
+ "name": "South Africa",
172
+ "code": "ZA",
173
+ "calling_code": "27",
174
+ "currency_code": "ZAR"
175
+ }
176
+ ]);
177
+ var getCountries = async (params) => {
178
+ import_utils.request.getRequest().get("/shop/area/country", { "translate-locale": import_utils2.locales.formatLocale(localStorage.getItem("umi_locale") || "en") }, { abort: true, useCache: true }).then((res) => {
179
+ localStorage.setItem("pisell2_data_countries", JSON.stringify(formatData(res.data || [])));
180
+ });
181
+ let data = localStorage.getItem("pisell2_data_countries");
182
+ if (data) {
183
+ data = JSON.parse(data);
184
+ return data;
185
+ } else {
186
+ return defaultCodes;
187
+ }
188
+ };
189
+ // Annotate the CommonJS export names for ESM import in node:
190
+ 0 && (module.exports = {
191
+ defaultCodes,
192
+ getCountries
193
+ });
@@ -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,244 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
+
29
+ // src/plus/clinetSearch/Add/index.tsx
30
+ var Add_exports = {};
31
+ __export(Add_exports, {
32
+ default: () => Add_default
33
+ });
34
+ module.exports = __toCommonJS(Add_exports);
35
+ var import_react = __toESM(require("react"));
36
+ var import_antd = require("antd");
37
+ var import_ahooks = require("ahooks");
38
+ var import_materials = require("@pisell/materials");
39
+ var import_PhoneField = __toESM(require("./PhoneField"));
40
+ var import_GenderField = __toESM(require("./GenderField"));
41
+ var import_utils = require("@pisell/utils");
42
+ var import_serve = require("../serve");
43
+ var import_utils2 = require("../../../utils");
44
+ var import_useEngineContext = __toESM(require("../../../hooks/useEngineContext"));
45
+ var import_index = require("./index.less");
46
+ var AddClient = (0, import_react.forwardRef)((props, ref) => {
47
+ var _a, _b;
48
+ const context = (0, import_useEngineContext.default)();
49
+ import_utils2.request.setRequest((_b = (_a = context.appHelper) == null ? void 0 : _a.utils) == null ? void 0 : _b.request);
50
+ const { onChange, phone, containerProps } = props;
51
+ const [form] = import_antd.Form.useForm();
52
+ const useIsChecked = import_antd.Form.useWatch("is_checked", form);
53
+ (0, import_react.useEffect)(() => {
54
+ form.setFieldsValue({ phone: { code: "+61", phone } });
55
+ }, [phone]);
56
+ (0, import_react.useImperativeHandle)(ref, () => ({
57
+ reset: () => {
58
+ form.resetFields();
59
+ }
60
+ }));
61
+ const _addClient = (0, import_ahooks.useRequest)(import_serve.addCustomer, {
62
+ manual: true,
63
+ onSuccess: (res, param) => {
64
+ var _a2;
65
+ onChange({ ...(_a2 = param[0]) == null ? void 0 : _a2.customer, id: res.customer_id }, useIsChecked);
66
+ }
67
+ });
68
+ const onFinish = (values) => {
69
+ var _a2;
70
+ const { phone: phone2, ...rest } = values;
71
+ if (!values.first_name && !values.last_name && !values.email && !((_a2 = values == null ? void 0 : values.phone) == null ? void 0 : _a2.phone)) {
72
+ import_antd.message.info(import_utils.locales.getText("pisell2.text.add-client.confirm"));
73
+ return;
74
+ }
75
+ _addClient.run({
76
+ customer: {
77
+ accepts_marketing: 0,
78
+ register_channel: "pos",
79
+ tax_exempt: 1,
80
+ ...rest,
81
+ first_name: rest.first_name || "",
82
+ last_name: rest.last_name || "",
83
+ note: rest.note || "",
84
+ email: rest.email || "",
85
+ country_calling_code: phone2.code || "",
86
+ phone: phone2.phone || ""
87
+ },
88
+ address: {
89
+ first_name: "",
90
+ last_name: "",
91
+ company: "",
92
+ address1: "",
93
+ address2: "",
94
+ city: "",
95
+ country_code: "AU",
96
+ province_code: "ACT",
97
+ phone: "",
98
+ country: "澳大利亚",
99
+ province: "Australian Capital Territory",
100
+ country_calling_code: "+61"
101
+ },
102
+ tags: []
103
+ });
104
+ };
105
+ const renderContent = () => {
106
+ return /* @__PURE__ */ import_react.default.createElement(
107
+ import_antd.Form,
108
+ {
109
+ form,
110
+ onFinish,
111
+ layout: "vertical",
112
+ initialValues: {
113
+ is_checked: 0,
114
+ phone: {
115
+ code: "+61",
116
+ phone: ""
117
+ }
118
+ },
119
+ size: "large"
120
+ },
121
+ /* @__PURE__ */ import_react.default.createElement(import_antd.Row, { gutter: [16, 0] }, /* @__PURE__ */ import_react.default.createElement(import_antd.Col, { span: 12 }, /* @__PURE__ */ import_react.default.createElement(
122
+ import_antd.Form.Item,
123
+ {
124
+ label: import_utils.locales.getText("pisell2.text.firstname"),
125
+ name: "first_name"
126
+ },
127
+ /* @__PURE__ */ import_react.default.createElement(
128
+ import_antd.Input,
129
+ {
130
+ placeholder: import_utils.locales.getText("pisell2.text.firstname"),
131
+ size: "large"
132
+ }
133
+ )
134
+ )), /* @__PURE__ */ import_react.default.createElement(import_antd.Col, { span: 12 }, /* @__PURE__ */ import_react.default.createElement(
135
+ import_antd.Form.Item,
136
+ {
137
+ label: import_utils.locales.getText("pisell2.text.lastname"),
138
+ name: "last_name"
139
+ },
140
+ /* @__PURE__ */ import_react.default.createElement(
141
+ import_antd.Input,
142
+ {
143
+ placeholder: import_utils.locales.getText("pisell2.text.lastname"),
144
+ size: "large"
145
+ }
146
+ )
147
+ )), /* @__PURE__ */ import_react.default.createElement(import_antd.Col, { span: 12 }, /* @__PURE__ */ import_react.default.createElement(
148
+ import_antd.Form.Item,
149
+ {
150
+ label: import_utils.locales.getText("pisell2.text.gender"),
151
+ name: "gender"
152
+ },
153
+ /* @__PURE__ */ import_react.default.createElement(import_GenderField.default, null)
154
+ )), /* @__PURE__ */ import_react.default.createElement(import_antd.Col, { span: 12 }, /* @__PURE__ */ import_react.default.createElement(
155
+ import_antd.Form.Item,
156
+ {
157
+ label: import_utils.locales.getText("pisell2.text.birthday"),
158
+ name: "birthday"
159
+ },
160
+ /* @__PURE__ */ import_react.default.createElement(
161
+ import_antd.DatePicker,
162
+ {
163
+ style: { width: "100%" },
164
+ size: "large",
165
+ format: "DD/MM/YYYY",
166
+ inputReadOnly: true,
167
+ placeholder: import_utils.locales.getText("pisell2.text.birthday"),
168
+ placement: "bottomLeft"
169
+ }
170
+ )
171
+ )), /* @__PURE__ */ import_react.default.createElement(import_antd.Col, { span: 12 }, /* @__PURE__ */ import_react.default.createElement(
172
+ import_antd.Form.Item,
173
+ {
174
+ label: import_utils.locales.getText("pisell2.text.phone"),
175
+ name: "phone"
176
+ },
177
+ /* @__PURE__ */ import_react.default.createElement(import_PhoneField.default, null)
178
+ )), /* @__PURE__ */ import_react.default.createElement(import_antd.Col, { span: 12 }, /* @__PURE__ */ import_react.default.createElement(
179
+ import_antd.Form.Item,
180
+ {
181
+ label: import_utils.locales.getText("pisell2.text.email"),
182
+ name: "email",
183
+ rules: [
184
+ {
185
+ pattern: /^([a-zA-Z0-9_\-\.+])+@([a-zA-Z0-9-]+\.)+([a-zA-Z]{2,63})+$/,
186
+ message: import_utils.locales.getText("pisell2.text.email-error-message")
187
+ }
188
+ ]
189
+ },
190
+ /* @__PURE__ */ import_react.default.createElement(
191
+ import_antd.Input,
192
+ {
193
+ placeholder: import_utils.locales.getText("pisell2.text.email"),
194
+ size: "large"
195
+ }
196
+ )
197
+ )), /* @__PURE__ */ import_react.default.createElement(import_antd.Form.Item, { hidden: true, name: "is_checked" }, /* @__PURE__ */ import_react.default.createElement(import_antd.Input, null)))
198
+ );
199
+ };
200
+ const renderFooter = () => {
201
+ return /* @__PURE__ */ import_react.default.createElement("div", { className: "select-customer-right-panel-add-client__footer" }, /* @__PURE__ */ import_react.default.createElement(
202
+ import_antd.Button,
203
+ {
204
+ size: "large",
205
+ style: { flex: 1 },
206
+ onClick: () => {
207
+ form.setFieldsValue({ is_checked: 0 });
208
+ form.submit();
209
+ },
210
+ loading: _addClient.loading && !useIsChecked
211
+ },
212
+ import_utils.locales.getText("pisell2.text.save")
213
+ ), /* @__PURE__ */ import_react.default.createElement(
214
+ import_antd.Button,
215
+ {
216
+ type: "primary",
217
+ size: "large",
218
+ style: { flex: 1 },
219
+ onClick: () => {
220
+ form.setFieldsValue({ is_checked: 1 });
221
+ form.submit();
222
+ },
223
+ loading: _addClient.loading && useIsChecked
224
+ },
225
+ import_utils.locales.getText("pisell2.text.save-and-select")
226
+ ));
227
+ };
228
+ return /* @__PURE__ */ import_react.default.createElement(
229
+ import_materials.PisellContainer,
230
+ {
231
+ renderType: "modal",
232
+ props: {
233
+ ...containerProps,
234
+ bodyStyle: {
235
+ padding: "24px 24px 0"
236
+ },
237
+ footer: renderFooter(),
238
+ destroyOnClose: true
239
+ }
240
+ },
241
+ renderContent()
242
+ );
243
+ });
244
+ var Add_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 };