@pisell/private-materials 6.2.1 → 6.2.2

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 (37) 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/preview.js +13 -13
  7. package/build/lowcode/render/default/view.js +1 -1
  8. package/build/lowcode/view.js +8 -8
  9. package/es/components/booking/info/addServiceVariant/index.d.ts +1 -0
  10. package/es/components/booking/info/hooks/useInfoHolder.d.ts +1 -0
  11. package/es/components/booking/info/index.d.ts +1 -0
  12. package/es/components/booking/info/service/Lists.d.ts +1 -0
  13. package/es/components/booking/info/service/editService/BookingList/index.d.ts +1 -0
  14. package/es/components/booking/info/service2/Lists.d.ts +1 -0
  15. package/es/components/booking/info/service2/utils.d.ts +1 -1
  16. package/es/components/booking/info2/index.js +10 -2
  17. package/es/components/booking/materiels/holder/index.d.ts +1 -0
  18. package/es/components/eftposPay/hooks.d.ts +2 -2
  19. package/es/components/eftposPay/store/index.d.ts +4 -4
  20. package/es/components/productExtension/fields/Forms/index.d.ts +1 -0
  21. package/es/components/schedules/utils.d.ts +1 -1
  22. package/es/utils/index.d.ts +1 -1
  23. package/lib/components/booking/info/addServiceVariant/index.d.ts +1 -0
  24. package/lib/components/booking/info/hooks/useInfoHolder.d.ts +1 -0
  25. package/lib/components/booking/info/index.d.ts +1 -0
  26. package/lib/components/booking/info/service/Lists.d.ts +1 -0
  27. package/lib/components/booking/info/service/editService/BookingList/index.d.ts +1 -0
  28. package/lib/components/booking/info/service2/Lists.d.ts +1 -0
  29. package/lib/components/booking/info/service2/utils.d.ts +1 -1
  30. package/lib/components/booking/info2/index.js +10 -5
  31. package/lib/components/booking/materiels/holder/index.d.ts +1 -0
  32. package/lib/components/eftposPay/hooks.d.ts +2 -2
  33. package/lib/components/eftposPay/store/index.d.ts +4 -4
  34. package/lib/components/productExtension/fields/Forms/index.d.ts +1 -0
  35. package/lib/components/schedules/utils.d.ts +1 -1
  36. package/lib/utils/index.d.ts +1 -1
  37. package/package.json +1 -1
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  interface AddServiceVariantProps {
2
3
  globalState: any;
3
4
  setGlobalState: any;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { EditServiceRef } from "../service/editService";
2
3
  declare const useInfoHolder: (state: any, dispatch: any) => {
3
4
  detailRef: import("react").MutableRefObject<EditServiceRef | undefined>;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { InfoProps } from './main';
2
3
  declare const APP: (props: InfoProps) => JSX.Element;
3
4
  export default APP;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const Lists: ({ onEdit, onChange, onAction, isParallelResource }: any) => JSX.Element;
2
3
  export default Lists;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  declare const BookingList: ({ items }: {
2
3
  items: any[];
3
4
  }) => JSX.Element;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const Lists: ({ onEdit, onChange }: any) => JSX.Element;
2
3
  export default Lists;
@@ -244,4 +244,4 @@ export declare const updateAppointmentServicePrice: (state: any, { start_date, e
244
244
  * @Author: WangHan
245
245
  * @Date: 2024-12-24 11:32
246
246
  */
247
- export declare const updateServicePrice: (state: any) => never[] | Promise<any>;
247
+ export declare const updateServicePrice: (state: any) => Promise<any> | never[];
@@ -20,6 +20,7 @@ import Header from "../info/header";
20
20
  import localeTexts from "../locales";
21
21
  import { locales } from '@pisell/utils';
22
22
  import ReloadResourceModal from "../components/reloadResourceModal";
23
+ import { sendWarningLog } from '@pisell/utils';
23
24
  import { findNextDuration, flexibleObj, sliceDayIntoFiveMinutes, request } from "../utils";
24
25
  import { formatResource } from "./utilsByBooking";
25
26
  import { getErrorList } from "./utilsByBooking";
@@ -190,11 +191,18 @@ var Info = Provider(function (props) {
190
191
  })
191
192
  });
192
193
  resolve(data);
193
- _context.next = 14;
194
+ _context.next = 15;
194
195
  break;
195
196
  case 10:
196
197
  _context.prev = 10;
197
198
  _context.t0 = _context["catch"](0);
199
+ sendWarningLog({
200
+ title: "\u83B7\u53D6\u8D44\u6E90\u6570\u636E\u5931\u8D25",
201
+ content: [{
202
+ key: 'error',
203
+ value: JSON.stringify(_context.t0)
204
+ }]
205
+ });
198
206
  modal.dispatch({
199
207
  type: 'setService',
200
208
  payload: _objectSpread(_objectSpread({}, stateRef.current.service), {}, {
@@ -202,7 +210,7 @@ var Info = Provider(function (props) {
202
210
  })
203
211
  });
204
212
  reject(_context.t0);
205
- case 14:
213
+ case 15:
206
214
  case "end":
207
215
  return _context.stop();
208
216
  }
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { SelectProps } from 'antd';
2
3
  interface HolderProps extends SelectProps {
3
4
  selectProps?: SelectProps;
@@ -15,11 +15,11 @@ 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" | "success" | "warn" | "fail" | "pedding" | "resove" | "reject" | "question">;
18
+ readonly statusRef: React.MutableRefObject<"success" | "loading" | "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>;
22
- readonly eftposRef: React.MutableRefObject<"stripe" | "tyro" | "windcave" | "payo" | "linkly">;
22
+ readonly eftposRef: React.MutableRefObject<"tyro" | "windcave" | "stripe" | "payo" | "linkly">;
23
23
  readonly clientRef: React.MutableRefObject<ClientEnum>;
24
24
  readonly dataRef: React.MutableRefObject<import("./store").State>;
25
25
  };
@@ -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" | "success" | "warn" | "fail" | "question";
177
+ status: "success" | "loading" | "warn" | "fail" | "question";
178
178
  };
179
179
  };
180
180
  /**
@@ -297,18 +297,18 @@ 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?: "stripe" | "tyro" | "windcave" | "payo" | "linkly" | undefined;
300
+ eftpos?: "tyro" | "windcave" | "stripe" | "payo" | "linkly" | undefined;
301
301
  action?: "amount" | "pay" | "deviceList" | undefined;
302
302
  key?: number | undefined;
303
303
  step?: number | undefined;
304
304
  title?: string | undefined;
305
305
  subTitle?: string | undefined;
306
- type?: "step" | "unset" | undefined;
306
+ type?: "unset" | "step" | undefined;
307
307
  render?: boolean | undefined;
308
308
  net?: boolean | undefined;
309
309
  component?: string | undefined;
310
310
  form?: string | undefined;
311
- status?: "loading" | "success" | "warn" | "fail" | "pedding" | "resove" | "reject" | "question" | undefined;
311
+ status?: "success" | "loading" | "warn" | "fail" | "pedding" | "resove" | "reject" | "question" | undefined;
312
312
  warn?: string | undefined;
313
313
  steps?: {
314
314
  /** 用于重置当前步骤 */
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  export interface InfoProps {
2
3
  relation_id: any;
3
4
  action: any;
@@ -17,6 +17,6 @@ declare let modal: Omit<ModalStaticFunctions, "warn">;
17
17
  export declare const setModal: (m: Omit<ModalStaticFunctions, "warn">) => void;
18
18
  export declare const saveConfirm: () => Promise<{
19
19
  destroy: () => void;
20
- update: (configUpdate: import("antd/es/modal/interface").ModalFuncProps | ((prevConfig: import("antd/es/modal/interface").ModalFuncProps) => import("antd/es/modal/interface").ModalFuncProps)) => void;
20
+ update: (configUpdate: import("antd").ModalFuncProps | ((prevConfig: import("antd").ModalFuncProps) => import("antd").ModalFuncProps)) => void;
21
21
  }>;
22
22
  export { modal };
@@ -18,6 +18,6 @@ declare let modal: Omit<ModalStaticFunctions, 'warn'>;
18
18
  export declare const setModal: (m: Omit<ModalStaticFunctions, 'warn'>) => void;
19
19
  export declare const saveConfirm: () => Promise<{
20
20
  destroy: () => void;
21
- update: (configUpdate: import("antd/es/modal/interface").ModalFuncProps | ((prevConfig: import("antd/es/modal/interface").ModalFuncProps) => import("antd/es/modal/interface").ModalFuncProps)) => void;
21
+ update: (configUpdate: import("antd").ModalFuncProps | ((prevConfig: import("antd").ModalFuncProps) => import("antd").ModalFuncProps)) => void;
22
22
  }>;
23
23
  export { modal };
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  interface AddServiceVariantProps {
2
3
  globalState: any;
3
4
  setGlobalState: any;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { EditServiceRef } from "../service/editService";
2
3
  declare const useInfoHolder: (state: any, dispatch: any) => {
3
4
  detailRef: import("react").MutableRefObject<EditServiceRef | undefined>;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { InfoProps } from './main';
2
3
  declare const APP: (props: InfoProps) => JSX.Element;
3
4
  export default APP;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const Lists: ({ onEdit, onChange, onAction, isParallelResource }: any) => JSX.Element;
2
3
  export default Lists;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  declare const BookingList: ({ items }: {
2
3
  items: any[];
3
4
  }) => JSX.Element;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const Lists: ({ onEdit, onChange }: any) => JSX.Element;
2
3
  export default Lists;
@@ -244,4 +244,4 @@ export declare const updateAppointmentServicePrice: (state: any, { start_date, e
244
244
  * @Author: WangHan
245
245
  * @Date: 2024-12-24 11:32
246
246
  */
247
- export declare const updateServicePrice: (state: any) => never[] | Promise<any>;
247
+ export declare const updateServicePrice: (state: any) => Promise<any> | never[];
@@ -45,7 +45,8 @@ var import_header = __toESM(require("../info/header"));
45
45
  var import_locales = __toESM(require("../locales"));
46
46
  var import_utils = require("@pisell/utils");
47
47
  var import_reloadResourceModal = __toESM(require("../components/reloadResourceModal"));
48
- var import_utils2 = require("../utils");
48
+ var import_utils2 = require("@pisell/utils");
49
+ var import_utils3 = require("../utils");
49
50
  var import_utilsByBooking = require("./utilsByBooking");
50
51
  var import_utilsByBooking2 = require("./utilsByBooking");
51
52
  var import_serve = require("./serve");
@@ -71,7 +72,7 @@ var Info = (0, import_model.Provider)((props) => {
71
72
  const { style, globalState, modules = defaultModules, slot } = props;
72
73
  const modal = (0, import_react.useContext)(import_model.Context);
73
74
  const context = (0, import_useEngineContext.default)();
74
- import_utils2.request.setRequest(context.appHelper.utils.request);
75
+ import_utils3.request.setRequest(context.appHelper.utils.request);
75
76
  const params = (0, import_react.useMemo)(() => {
76
77
  var _a2, _b2, _c2, _d2;
77
78
  return ((_d2 = (_c2 = (_b2 = (_a2 = modal.state) == null ? void 0 : _a2.bookingConfig) == null ? void 0 : _b2.config) == null ? void 0 : _c2.basic) == null ? void 0 : _d2.appointment_subject) || {};
@@ -86,9 +87,9 @@ var Info = (0, import_model.Provider)((props) => {
86
87
  bookingFunctions: {
87
88
  formatResource: import_utilsByBooking.formatResource,
88
89
  getErrorList: import_utilsByBooking2.getErrorList,
89
- sliceDayIntoFiveMinutes: import_utils2.sliceDayIntoFiveMinutes,
90
- findNextDuration: import_utils2.findNextDuration,
91
- flexibleObj: import_utils2.flexibleObj,
90
+ sliceDayIntoFiveMinutes: import_utils3.sliceDayIntoFiveMinutes,
91
+ findNextDuration: import_utils3.findNextDuration,
92
+ flexibleObj: import_utils3.flexibleObj,
92
93
  updateServiceDate: import_date2.updateServiceDate
93
94
  }
94
95
  });
@@ -187,6 +188,10 @@ var Info = (0, import_model.Provider)((props) => {
187
188
  });
188
189
  resolve(data);
189
190
  } catch (error) {
191
+ (0, import_utils2.sendWarningLog)({
192
+ title: `获取资源数据失败`,
193
+ content: [{ key: "error", value: JSON.stringify(error) }]
194
+ });
190
195
  modal.dispatch({
191
196
  type: "setService",
192
197
  payload: {
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { SelectProps } from 'antd';
2
3
  interface HolderProps extends SelectProps {
3
4
  selectProps?: SelectProps;
@@ -15,11 +15,11 @@ 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" | "success" | "warn" | "fail" | "pedding" | "resove" | "reject" | "question">;
18
+ readonly statusRef: React.MutableRefObject<"success" | "loading" | "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>;
22
- readonly eftposRef: React.MutableRefObject<"stripe" | "tyro" | "windcave" | "payo" | "linkly">;
22
+ readonly eftposRef: React.MutableRefObject<"tyro" | "windcave" | "stripe" | "payo" | "linkly">;
23
23
  readonly clientRef: React.MutableRefObject<ClientEnum>;
24
24
  readonly dataRef: React.MutableRefObject<import("./store").State>;
25
25
  };
@@ -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" | "success" | "warn" | "fail" | "question";
177
+ status: "success" | "loading" | "warn" | "fail" | "question";
178
178
  };
179
179
  };
180
180
  /**
@@ -297,18 +297,18 @@ 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?: "stripe" | "tyro" | "windcave" | "payo" | "linkly" | undefined;
300
+ eftpos?: "tyro" | "windcave" | "stripe" | "payo" | "linkly" | undefined;
301
301
  action?: "amount" | "pay" | "deviceList" | undefined;
302
302
  key?: number | undefined;
303
303
  step?: number | undefined;
304
304
  title?: string | undefined;
305
305
  subTitle?: string | undefined;
306
- type?: "step" | "unset" | undefined;
306
+ type?: "unset" | "step" | undefined;
307
307
  render?: boolean | undefined;
308
308
  net?: boolean | undefined;
309
309
  component?: string | undefined;
310
310
  form?: string | undefined;
311
- status?: "loading" | "success" | "warn" | "fail" | "pedding" | "resove" | "reject" | "question" | undefined;
311
+ status?: "success" | "loading" | "warn" | "fail" | "pedding" | "resove" | "reject" | "question" | undefined;
312
312
  warn?: string | undefined;
313
313
  steps?: {
314
314
  /** 用于重置当前步骤 */
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  export interface InfoProps {
2
3
  relation_id: any;
3
4
  action: any;
@@ -17,6 +17,6 @@ declare let modal: Omit<ModalStaticFunctions, "warn">;
17
17
  export declare const setModal: (m: Omit<ModalStaticFunctions, "warn">) => void;
18
18
  export declare const saveConfirm: () => Promise<{
19
19
  destroy: () => void;
20
- update: (configUpdate: import("antd/es/modal/interface").ModalFuncProps | ((prevConfig: import("antd/es/modal/interface").ModalFuncProps) => import("antd/es/modal/interface").ModalFuncProps)) => void;
20
+ update: (configUpdate: import("antd").ModalFuncProps | ((prevConfig: import("antd").ModalFuncProps) => import("antd").ModalFuncProps)) => void;
21
21
  }>;
22
22
  export { modal };
@@ -18,6 +18,6 @@ declare let modal: Omit<ModalStaticFunctions, 'warn'>;
18
18
  export declare const setModal: (m: Omit<ModalStaticFunctions, 'warn'>) => void;
19
19
  export declare const saveConfirm: () => Promise<{
20
20
  destroy: () => void;
21
- update: (configUpdate: import("antd/es/modal/interface").ModalFuncProps | ((prevConfig: import("antd/es/modal/interface").ModalFuncProps) => import("antd/es/modal/interface").ModalFuncProps)) => void;
21
+ update: (configUpdate: import("antd").ModalFuncProps | ((prevConfig: import("antd").ModalFuncProps) => import("antd").ModalFuncProps)) => void;
22
22
  }>;
23
23
  export { modal };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pisell/private-materials",
3
- "version": "6.2.1",
3
+ "version": "6.2.2",
4
4
  "main": "./lib/index.js",
5
5
  "module": "./es/index.js",
6
6
  "types": "./lib/index.d.ts",