@pisell/private-materials 6.4.40 → 6.4.42

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.
@@ -17,7 +17,7 @@ export declare const useWalletPass: (props: {
17
17
  cardData: any;
18
18
  handleSelectWallet: (value: number[]) => void;
19
19
  selectedWalletIds: any[];
20
- expiredWalletIds: any;
20
+ expiredWalletIds: any[];
21
21
  expiredWalletData: any;
22
22
  disabledWalletData: any[];
23
23
  clearAllSelectedWallet: () => void;
@@ -62,7 +62,7 @@ export var useCustomer = function useCustomer(props) {
62
62
  if (!pisellos) {
63
63
  return;
64
64
  }
65
- pisellos.effects.on('customer:onUpdate', function (state) {
65
+ var unlisten1 = pisellos.effects.on('customer:onUpdate', function (state) {
66
66
  setCustomers(state.customerList);
67
67
  setHasMore(state.hasMore);
68
68
  setPagination(function (prev) {
@@ -73,20 +73,20 @@ export var useCustomer = function useCustomer(props) {
73
73
  });
74
74
  });
75
75
  });
76
- pisellos.effects.on('customer:onSelected', function (customer) {
76
+ var unlisten2 = pisellos.effects.on('customer:onSelected', function (customer) {
77
77
  var _props$changeCustomer;
78
78
  setSelectedCustomer(customer);
79
79
  (_props$changeCustomer = props.changeCustomerToGlobalState) === null || _props$changeCustomer === void 0 || _props$changeCustomer.call(props, customer);
80
80
  });
81
- pisellos.effects.on('customer:onPaginationChange', function (paginationInfo) {
81
+ var unlisten3 = pisellos.effects.on('customer:onPaginationChange', function (paginationInfo) {
82
82
  setPagination(paginationInfo);
83
83
  });
84
84
  return function () {
85
- pisellos.effects.off('customer:onUpdate');
86
- pisellos.effects.off('customer:onSelected');
87
- pisellos.effects.off('customer:onPaginationChange');
85
+ unlisten1();
86
+ unlisten2();
87
+ unlisten3();
88
88
  };
89
- }, [bookingTicket]);
89
+ }, []);
90
90
 
91
91
  // 加载客户列表
92
92
  var loadCustomers = useMemoizedFn( /*#__PURE__*/function () {
@@ -17,7 +17,7 @@ export declare const useWalletPass: (props: {
17
17
  cardData: any;
18
18
  handleSelectWallet: (value: number[]) => void;
19
19
  selectedWalletIds: any[];
20
- expiredWalletIds: any;
20
+ expiredWalletIds: any[];
21
21
  expiredWalletData: any;
22
22
  disabledWalletData: any[];
23
23
  clearAllSelectedWallet: () => void;
@@ -46,7 +46,7 @@ var useCustomer = (props) => {
46
46
  if (!pisellos) {
47
47
  return;
48
48
  }
49
- pisellos.effects.on("customer:onUpdate", (state) => {
49
+ const unlisten1 = pisellos.effects.on("customer:onUpdate", (state) => {
50
50
  setCustomers(state.customerList);
51
51
  setHasMore(state.hasMore);
52
52
  setPagination((prev) => ({
@@ -56,23 +56,23 @@ var useCustomer = (props) => {
56
56
  pageSize: state.pageSize
57
57
  }));
58
58
  });
59
- pisellos.effects.on("customer:onSelected", (customer) => {
59
+ const unlisten2 = pisellos.effects.on("customer:onSelected", (customer) => {
60
60
  var _a;
61
61
  setSelectedCustomer(customer);
62
62
  (_a = props.changeCustomerToGlobalState) == null ? void 0 : _a.call(props, customer);
63
63
  });
64
- pisellos.effects.on(
64
+ const unlisten3 = pisellos.effects.on(
65
65
  "customer:onPaginationChange",
66
66
  (paginationInfo) => {
67
67
  setPagination(paginationInfo);
68
68
  }
69
69
  );
70
70
  return () => {
71
- pisellos.effects.off("customer:onUpdate");
72
- pisellos.effects.off("customer:onSelected");
73
- pisellos.effects.off("customer:onPaginationChange");
71
+ unlisten1();
72
+ unlisten2();
73
+ unlisten3();
74
74
  };
75
- }, [bookingTicket]);
75
+ }, []);
76
76
  const loadCustomers = (0, import_ahooks.useMemoizedFn)(
77
77
  async (params) => {
78
78
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pisell/private-materials",
3
- "version": "6.4.40",
3
+ "version": "6.4.42",
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
  "react-resizable": "^3.0.5",
61
61
  "styled-components": "^6.0.0-rc.3",
62
- "@pisell/date-picker": "3.0.7",
63
- "@pisell/materials": "6.4.7",
64
62
  "@pisell/icon": "0.0.11",
65
- "@pisell/utils": "3.0.2"
63
+ "@pisell/utils": "3.0.2",
64
+ "@pisell/materials": "6.4.8",
65
+ "@pisell/date-picker": "3.0.7"
66
66
  },
67
67
  "peerDependencies": {
68
68
  "react": "^18.0.0",