@pisell/private-materials 3.0.191 → 3.0.193

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 (34) 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 +1 -1
  6. package/build/lowcode/render/default/view.js +1 -1
  7. package/build/lowcode/view.js +1 -1
  8. package/es/components/booking/addons/model.d.ts +1 -2
  9. package/es/components/booking/forms/model.d.ts +1 -2
  10. package/es/components/booking/notes/index.d.ts +1 -1
  11. package/es/components/booking/notes/model.d.ts +1 -2
  12. package/es/components/booking/payments/model.d.ts +1 -2
  13. package/es/components/eftposPay/amount.d.ts +1 -1
  14. package/es/components/eftposPay/device.d.ts +1 -1
  15. package/es/components/eftposPay/hooks.d.ts +1 -1
  16. package/es/components/eftposPay/payo/config.js +4 -3
  17. package/es/components/eftposPay/store/index.d.ts +4 -4
  18. package/es/components/ruleSetting/server.js +11 -4
  19. package/es/components/schedules/index.d.ts +1 -1
  20. package/es/components/schedules/model.d.ts +1 -2
  21. package/lib/components/booking/addons/model.d.ts +1 -2
  22. package/lib/components/booking/forms/model.d.ts +1 -2
  23. package/lib/components/booking/notes/index.d.ts +1 -1
  24. package/lib/components/booking/notes/model.d.ts +1 -2
  25. package/lib/components/booking/payments/model.d.ts +1 -2
  26. package/lib/components/eftposPay/amount.d.ts +1 -1
  27. package/lib/components/eftposPay/device.d.ts +1 -1
  28. package/lib/components/eftposPay/hooks.d.ts +1 -1
  29. package/lib/components/eftposPay/payo/config.js +5 -4
  30. package/lib/components/eftposPay/store/index.d.ts +4 -4
  31. package/lib/components/ruleSetting/server.js +5 -4
  32. package/lib/components/schedules/index.d.ts +1 -1
  33. package/lib/components/schedules/model.d.ts +1 -2
  34. package/package.json +4 -4
@@ -1,6 +1,5 @@
1
- /// <reference types="react" />
2
1
  import { FormState } from "../model";
3
- export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
2
+ export declare const Provider: (ComponentUi: any) => (props: any) => JSX.Element, Context: import("react").Context<{
4
3
  state: FormState;
5
4
  } & {
6
5
  dispatch: (params: {
@@ -1,6 +1,5 @@
1
- /// <reference types="react" />
2
1
  import { FormState } from "../model";
3
- export declare const Provider: (ComponentUi: any) => (props: any) => any, Context: import("react").Context<{
2
+ export declare const Provider: (ComponentUi: any) => (props: any) => JSX.Element, Context: import("react").Context<{
4
3
  state: FormState;
5
4
  } & {
6
5
  dispatch: (params: {
@@ -4,5 +4,5 @@ export interface InfoProps {
4
4
  globalState: any;
5
5
  setGlobalState: any;
6
6
  }
7
- declare const Notes: (props: any) => any;
7
+ declare const Notes: any;
8
8
  export default Notes;
@@ -1,6 +1,5 @@
1
- /// <reference types="react" />
2
1
  import { FormState } from "../model";
3
- export declare const Provider: (ComponentUi: any) => (props: any) => any, Context: import("react").Context<{
2
+ export declare const Provider: (ComponentUi: any) => (props: any) => JSX.Element, Context: import("react").Context<{
4
3
  state: FormState;
5
4
  } & {
6
5
  dispatch: (params: {
@@ -1,6 +1,5 @@
1
- /// <reference types="react" />
2
1
  import { FormState } from "../model";
3
- export declare const Provider: (ComponentUi: any) => (props: any) => any, Context: import("react").Context<{
2
+ export declare const Provider: (ComponentUi: any) => (props: any) => JSX.Element, Context: import("react").Context<{
4
3
  state: FormState;
5
4
  } & {
6
5
  dispatch: (params: {
@@ -9,7 +9,7 @@ import { PosProps } from './const';
9
9
  */
10
10
  declare const _default: ({ className, onChange, onClose, formatAmount, isMobile, net, client }: {
11
11
  className?: string | undefined;
12
- onChange?: ((status: "page" | "fail" | "success", params?: string | {
12
+ onChange?: ((status: "page" | "success" | "fail", params?: string | {
13
13
  [keys: string]: unknown;
14
14
  } | undefined, other?: any) => void) | undefined;
15
15
  onClose: () => void;
@@ -11,7 +11,7 @@ import './device.less';
11
11
  declare const _default: ({ api, onChange, onClose, className, device_number, isMobile, net, client, formatAmount, }: {
12
12
  api: PayProps['api'];
13
13
  className?: string | undefined;
14
- onChange?: ((status: "page" | "fail" | "success", params?: string | {
14
+ onChange?: ((status: "page" | "success" | "fail", params?: string | {
15
15
  [keys: string]: unknown;
16
16
  } | undefined, other?: any) => void) | undefined;
17
17
  onClose: () => void;
@@ -15,7 +15,7 @@ export declare const useStoreRef: <T extends {
15
15
  readonly numRef: React.MutableRefObject<string | number | undefined>;
16
16
  readonly orderIdRef: React.MutableRefObject<string | number>;
17
17
  readonly modeRef: React.MutableRefObject<ModeEnum>;
18
- readonly statusRef: React.MutableRefObject<"loading" | "warn" | "fail" | "success" | "pedding" | "resove" | "reject" | "question">;
18
+ readonly statusRef: React.MutableRefObject<"loading" | "success" | "warn" | "fail" | "pedding" | "resove" | "reject" | "question">;
19
19
  readonly netRef: React.MutableRefObject<boolean | undefined>;
20
20
  readonly symbolRef: React.MutableRefObject<string>;
21
21
  readonly amountRef: React.MutableRefObject<string | number>;
@@ -69,12 +69,13 @@ export var POS = function POS(_ref) {
69
69
  * @Date: 2024-01-30 16:34
70
70
  */
71
71
  var success = function success(res) {
72
+ var _res$data;
72
73
  dispatch(updateNextStep());
73
74
  dispatch(updateCustom({
74
- card_reader_surcharge: (res === null || res === void 0 ? void 0 : res.card_reader_surcharge) || 0
75
+ card_reader_surcharge: (res === null || res === void 0 ? void 0 : (_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.card_reader_surcharge) || 0
75
76
  }));
76
77
  clearRef.current = setTimeout(function () {
77
- var _deviceRef$current, _deviceRef$current$se;
78
+ var _res$data2, _deviceRef$current, _deviceRef$current$se;
78
79
  var params = getPayParams({
79
80
  mode: modeRef.current,
80
81
  amount: amountRef.current,
@@ -83,7 +84,7 @@ export var POS = function POS(_ref) {
83
84
  device: deviceRef.current,
84
85
  pay: payRef.current,
85
86
  custom: {
86
- card_reader_surcharge: (res === null || res === void 0 ? void 0 : res.card_reader_surcharge) || 0
87
+ card_reader_surcharge: (res === null || res === void 0 ? void 0 : (_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : _res$data2.card_reader_surcharge) || 0
87
88
  }
88
89
  }, 'success');
89
90
  var receipt = Array.isArray(res.receipt) ? res.receipt : [res.receipt];
@@ -174,7 +174,7 @@ export declare const updateCustom: (payload: {
174
174
  export declare const updateStatus: (status: 'loading' | 'warn' | 'fail' | 'success' | 'question') => {
175
175
  type: EActionTypes;
176
176
  payload: {
177
- status: "loading" | "warn" | "fail" | "success" | "question";
177
+ status: "loading" | "success" | "warn" | "fail" | "question";
178
178
  };
179
179
  };
180
180
  /**
@@ -295,9 +295,9 @@ export declare const backUpFree: (payload: Partial<State>) => {
295
295
  name?: string | undefined;
296
296
  symbol?: string | undefined;
297
297
  amount?: string | number | undefined;
298
- mode?: "pay" | "fullPay" | "refund" | "query" | undefined;
298
+ mode?: "refund" | "pay" | "fullPay" | "query" | undefined;
299
299
  order_id?: string | number | undefined;
300
- eftpos?: "payo" | "tyro" | "windcave" | "stripe" | undefined;
300
+ eftpos?: "tyro" | "windcave" | "payo" | "stripe" | undefined;
301
301
  action?: "amount" | "deviceList" | "pay" | undefined;
302
302
  key?: number | undefined;
303
303
  step?: number | undefined;
@@ -308,7 +308,7 @@ export declare const backUpFree: (payload: Partial<State>) => {
308
308
  net?: boolean | undefined;
309
309
  component?: string | undefined;
310
310
  form?: string | undefined;
311
- status?: "loading" | "warn" | "fail" | "success" | "pedding" | "resove" | "reject" | "question" | undefined;
311
+ status?: "loading" | "success" | "warn" | "fail" | "pedding" | "resove" | "reject" | "question" | undefined;
312
312
  warn?: string | undefined;
313
313
  steps?: {
314
314
  /** 用于重置当前步骤 */
@@ -17,7 +17,8 @@ export var getStaffList = /*#__PURE__*/function () {
17
17
  case 0:
18
18
  _context.next = 2;
19
19
  return request.getRequest().get('/shop/shop/setting/staff', {}, {
20
- useCache: true
20
+ useCache: true,
21
+ fullResult: true
21
22
  });
22
23
  case 2:
23
24
  _yield$request$getReq = _context.sent;
@@ -54,7 +55,9 @@ export var getProductChannel = /*#__PURE__*/function () {
54
55
  while (1) switch (_context2.prev = _context2.next) {
55
56
  case 0:
56
57
  _context2.next = 2;
57
- return request.getRequest().get('/shop/order/platform-list');
58
+ return request.getRequest().get('/shop/order/platform-list', {}, {
59
+ fullResult: true
60
+ });
58
61
  case 2:
59
62
  _yield$request$getReq2 = _context2.sent;
60
63
  data = _yield$request$getReq2.data;
@@ -87,7 +90,9 @@ export var getOrderTypes = /*#__PURE__*/function () {
87
90
  while (1) switch (_context3.prev = _context3.next) {
88
91
  case 0:
89
92
  _context3.next = 2;
90
- return request.getRequest().get('/shop/order/aggregation-type');
93
+ return request.getRequest().get('/shop/order/aggregation-type', {}, {
94
+ fullResult: true
95
+ });
91
96
  case 2:
92
97
  _yield$request$getReq3 = _context3.sent;
93
98
  data = _yield$request$getReq3.data;
@@ -120,7 +125,9 @@ export var getPaymentTypes = /*#__PURE__*/function () {
120
125
  while (1) switch (_context4.prev = _context4.next) {
121
126
  case 0:
122
127
  _context4.next = 2;
123
- return request.getRequest().get('/shop/till/opened-payment-method');
128
+ return request.getRequest().get('/shop/till/opened-payment-method', {}, {
129
+ fullResult: true
130
+ });
124
131
  case 2:
125
132
  _yield$request$getReq4 = _context4.sent;
126
133
  data = _yield$request$getReq4.data;
@@ -1,3 +1,3 @@
1
1
  import "./index.less";
2
- declare const Schedules: (props: any) => any;
2
+ declare const Schedules: (props: any) => JSX.Element;
3
3
  export default Schedules;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { CalendarDataItem, ScheduleItem } from "./type";
3
2
  import dayjs from "dayjs";
4
3
  export interface FormState {
@@ -69,7 +68,7 @@ export interface FormState {
69
68
  };
70
69
  setGlobalState: Function | null;
71
70
  }
72
- export declare const Provider: (ComponentUi: any) => (props: any) => any, Context: import("react").Context<{
71
+ export declare const Provider: (ComponentUi: any) => (props: any) => JSX.Element, Context: import("react").Context<{
73
72
  state: FormState;
74
73
  } & {
75
74
  dispatch: (params: {
@@ -1,6 +1,5 @@
1
- /// <reference types="react" />
2
1
  import { FormState } from "../model";
3
- export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
2
+ export declare const Provider: (ComponentUi: any) => (props: any) => JSX.Element, Context: import("react").Context<{
4
3
  state: FormState;
5
4
  } & {
6
5
  dispatch: (params: {
@@ -1,6 +1,5 @@
1
- /// <reference types="react" />
2
1
  import { FormState } from "../model";
3
- export declare const Provider: (ComponentUi: any) => (props: any) => any, Context: import("react").Context<{
2
+ export declare const Provider: (ComponentUi: any) => (props: any) => JSX.Element, Context: import("react").Context<{
4
3
  state: FormState;
5
4
  } & {
6
5
  dispatch: (params: {
@@ -4,5 +4,5 @@ export interface InfoProps {
4
4
  globalState: any;
5
5
  setGlobalState: any;
6
6
  }
7
- declare const Notes: (props: any) => any;
7
+ declare const Notes: any;
8
8
  export default Notes;
@@ -1,6 +1,5 @@
1
- /// <reference types="react" />
2
1
  import { FormState } from "../model";
3
- export declare const Provider: (ComponentUi: any) => (props: any) => any, Context: import("react").Context<{
2
+ export declare const Provider: (ComponentUi: any) => (props: any) => JSX.Element, Context: import("react").Context<{
4
3
  state: FormState;
5
4
  } & {
6
5
  dispatch: (params: {
@@ -1,6 +1,5 @@
1
- /// <reference types="react" />
2
1
  import { FormState } from "../model";
3
- export declare const Provider: (ComponentUi: any) => (props: any) => any, Context: import("react").Context<{
2
+ export declare const Provider: (ComponentUi: any) => (props: any) => JSX.Element, Context: import("react").Context<{
4
3
  state: FormState;
5
4
  } & {
6
5
  dispatch: (params: {
@@ -9,7 +9,7 @@ import { PosProps } from './const';
9
9
  */
10
10
  declare const _default: ({ className, onChange, onClose, formatAmount, isMobile, net, client }: {
11
11
  className?: string | undefined;
12
- onChange?: ((status: "page" | "fail" | "success", params?: string | {
12
+ onChange?: ((status: "page" | "success" | "fail", params?: string | {
13
13
  [keys: string]: unknown;
14
14
  } | undefined, other?: any) => void) | undefined;
15
15
  onClose: () => void;
@@ -11,7 +11,7 @@ import './device.less';
11
11
  declare const _default: ({ api, onChange, onClose, className, device_number, isMobile, net, client, formatAmount, }: {
12
12
  api: PayProps['api'];
13
13
  className?: string | undefined;
14
- onChange?: ((status: "page" | "fail" | "success", params?: string | {
14
+ onChange?: ((status: "page" | "success" | "fail", params?: string | {
15
15
  [keys: string]: unknown;
16
16
  } | undefined, other?: any) => void) | undefined;
17
17
  onClose: () => void;
@@ -15,7 +15,7 @@ export declare const useStoreRef: <T extends {
15
15
  readonly numRef: React.MutableRefObject<string | number | undefined>;
16
16
  readonly orderIdRef: React.MutableRefObject<string | number>;
17
17
  readonly modeRef: React.MutableRefObject<ModeEnum>;
18
- readonly statusRef: React.MutableRefObject<"loading" | "warn" | "fail" | "success" | "pedding" | "resove" | "reject" | "question">;
18
+ readonly statusRef: React.MutableRefObject<"loading" | "success" | "warn" | "fail" | "pedding" | "resove" | "reject" | "question">;
19
19
  readonly netRef: React.MutableRefObject<boolean | undefined>;
20
20
  readonly symbolRef: React.MutableRefObject<string>;
21
21
  readonly amountRef: React.MutableRefObject<string | number>;
@@ -71,14 +71,15 @@ var POS = ({
71
71
  failRef.current = fail;
72
72
  }, [fail]);
73
73
  const success = (res) => {
74
+ var _a;
74
75
  dispatch((0, import_store.updateNextStep)());
75
76
  dispatch(
76
77
  (0, import_store.updateCustom)({
77
- card_reader_surcharge: (res == null ? void 0 : res.card_reader_surcharge) || 0
78
+ card_reader_surcharge: ((_a = res == null ? void 0 : res.data) == null ? void 0 : _a.card_reader_surcharge) || 0
78
79
  })
79
80
  );
80
81
  clearRef.current = setTimeout(() => {
81
- var _a, _b;
82
+ var _a2, _b, _c;
82
83
  const params = (0, import_helper.getPayParams)(
83
84
  {
84
85
  mode: modeRef.current,
@@ -88,7 +89,7 @@ var POS = ({
88
89
  device: deviceRef.current,
89
90
  pay: payRef.current,
90
91
  custom: {
91
- card_reader_surcharge: (res == null ? void 0 : res.card_reader_surcharge) || 0
92
+ card_reader_surcharge: ((_a2 = res == null ? void 0 : res.data) == null ? void 0 : _a2.card_reader_surcharge) || 0
92
93
  }
93
94
  },
94
95
  "success"
@@ -96,7 +97,7 @@ var POS = ({
96
97
  const receipt = Array.isArray(res.receipt) ? res.receipt : [res.receipt];
97
98
  onChange("success", {
98
99
  ...params,
99
- receipt: ((_b = (_a = deviceRef.current) == null ? void 0 : _a.setting) == null ? void 0 : _b.receipts) ? [] : receipt
100
+ receipt: ((_c = (_b = deviceRef.current) == null ? void 0 : _b.setting) == null ? void 0 : _c.receipts) ? [] : receipt
100
101
  });
101
102
  }, 1e3);
102
103
  };
@@ -174,7 +174,7 @@ export declare const updateCustom: (payload: {
174
174
  export declare const updateStatus: (status: 'loading' | 'warn' | 'fail' | 'success' | 'question') => {
175
175
  type: EActionTypes;
176
176
  payload: {
177
- status: "loading" | "warn" | "fail" | "success" | "question";
177
+ status: "loading" | "success" | "warn" | "fail" | "question";
178
178
  };
179
179
  };
180
180
  /**
@@ -295,9 +295,9 @@ export declare const backUpFree: (payload: Partial<State>) => {
295
295
  name?: string | undefined;
296
296
  symbol?: string | undefined;
297
297
  amount?: string | number | undefined;
298
- mode?: "pay" | "fullPay" | "refund" | "query" | undefined;
298
+ mode?: "refund" | "pay" | "fullPay" | "query" | undefined;
299
299
  order_id?: string | number | undefined;
300
- eftpos?: "payo" | "tyro" | "windcave" | "stripe" | undefined;
300
+ eftpos?: "tyro" | "windcave" | "payo" | "stripe" | undefined;
301
301
  action?: "amount" | "deviceList" | "pay" | undefined;
302
302
  key?: number | undefined;
303
303
  step?: number | undefined;
@@ -308,7 +308,7 @@ export declare const backUpFree: (payload: Partial<State>) => {
308
308
  net?: boolean | undefined;
309
309
  component?: string | undefined;
310
310
  form?: string | undefined;
311
- status?: "loading" | "warn" | "fail" | "success" | "pedding" | "resove" | "reject" | "question" | undefined;
311
+ status?: "loading" | "success" | "warn" | "fail" | "pedding" | "resove" | "reject" | "question" | undefined;
312
312
  warn?: string | undefined;
313
313
  steps?: {
314
314
  /** 用于重置当前步骤 */
@@ -32,7 +32,8 @@ var getStaffList = async () => {
32
32
  "/shop/shop/setting/staff",
33
33
  {},
34
34
  {
35
- useCache: true
35
+ useCache: true,
36
+ fullResult: true
36
37
  }
37
38
  );
38
39
  let _list = ((data == null ? void 0 : data.staff) || []).map((d) => {
@@ -53,7 +54,7 @@ var getStaffList = async () => {
53
54
  return _list;
54
55
  };
55
56
  var getProductChannel = async () => {
56
- const { data } = await import_utils2.request.getRequest().get("/shop/order/platform-list");
57
+ const { data } = await import_utils2.request.getRequest().get("/shop/order/platform-list", {}, { fullResult: true });
57
58
  let _list = (data || []).map((d) => {
58
59
  return {
59
60
  label: d.name,
@@ -68,7 +69,7 @@ var getProductChannel = async () => {
68
69
  };
69
70
  var getOrderTypes = async () => {
70
71
  var _a;
71
- let { data } = await import_utils2.request.getRequest().get("/shop/order/aggregation-type");
72
+ let { data } = await import_utils2.request.getRequest().get("/shop/order/aggregation-type", {}, { fullResult: true });
72
73
  let _list = (_a = data || []) == null ? void 0 : _a.map((d) => {
73
74
  return {
74
75
  ...d,
@@ -84,7 +85,7 @@ var getOrderTypes = async () => {
84
85
  };
85
86
  var getPaymentTypes = async () => {
86
87
  var _a;
87
- let { data } = await import_utils2.request.getRequest().get("/shop/till/opened-payment-method");
88
+ let { data } = await import_utils2.request.getRequest().get("/shop/till/opened-payment-method", {}, { fullResult: true });
88
89
  let _list = (_a = data || []) == null ? void 0 : _a.map((d) => {
89
90
  return {
90
91
  ...d,
@@ -1,3 +1,3 @@
1
1
  import "./index.less";
2
- declare const Schedules: (props: any) => any;
2
+ declare const Schedules: (props: any) => JSX.Element;
3
3
  export default Schedules;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { CalendarDataItem, ScheduleItem } from "./type";
3
2
  import dayjs from "dayjs";
4
3
  export interface FormState {
@@ -69,7 +68,7 @@ export interface FormState {
69
68
  };
70
69
  setGlobalState: Function | null;
71
70
  }
72
- export declare const Provider: (ComponentUi: any) => (props: any) => any, Context: import("react").Context<{
71
+ export declare const Provider: (ComponentUi: any) => (props: any) => JSX.Element, Context: import("react").Context<{
73
72
  state: FormState;
74
73
  } & {
75
74
  dispatch: (params: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pisell/private-materials",
3
- "version": "3.0.191",
3
+ "version": "3.0.193",
4
4
  "main": "./lib/index.js",
5
5
  "module": "./es/index.js",
6
6
  "types": "./lib/index.d.ts",
@@ -59,10 +59,10 @@
59
59
  "react-infinite-scroll-component": "^6.1.0",
60
60
  "rc-virtual-list": "^3.11.3",
61
61
  "decimal.js": "^10.4.3",
62
- "@pisell/utils": "1.0.42",
62
+ "@pisell/materials": "3.0.55",
63
63
  "@pisell/icon": "0.0.11",
64
- "@pisell/date-picker": "1.0.100",
65
- "@pisell/materials": "3.0.55"
64
+ "@pisell/utils": "1.0.42",
65
+ "@pisell/date-picker": "1.0.100"
66
66
  },
67
67
  "peerDependencies": {
68
68
  "react": "^18.0.0",