@pisell/pisellos 0.0.325 → 0.0.327

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.
@@ -14,7 +14,7 @@ export declare class BaseModule {
14
14
  store: any;
15
15
  cacheKey: string[];
16
16
  }): void;
17
- effectsOn(eventType: string, callback: (payload: any) => void): void;
17
+ effectsOn(eventType: string, callback: (payload: any) => void): () => void;
18
18
  effectsOff(eventType: string, callback: (payload: any) => void): void;
19
- effectsOnce(eventType: string, callback: (payload: any) => void): void;
19
+ effectsOnce(eventType: string, callback: (payload: any) => void): () => void;
20
20
  }
@@ -69,17 +69,17 @@ export var BaseModule = /*#__PURE__*/function () {
69
69
  }, {
70
70
  key: "effectsOn",
71
71
  value: function effectsOn(eventType, callback) {
72
- this.core.effects.on("".concat(this.name, ":").concat(eventType), callback);
72
+ return this.core.effects.on("".concat(this.name, ":").concat(eventType), callback);
73
73
  }
74
74
  }, {
75
75
  key: "effectsOff",
76
76
  value: function effectsOff(eventType, callback) {
77
- this.core.effects.off("".concat(this.name, ":").concat(eventType), callback);
77
+ return this.core.effects.off("".concat(this.name, ":").concat(eventType), callback);
78
78
  }
79
79
  }, {
80
80
  key: "effectsOnce",
81
81
  value: function effectsOnce(eventType, callback) {
82
- this.core.effects.once("".concat(this.name, ":").concat(eventType), callback);
82
+ return this.core.effects.once("".concat(this.name, ":").concat(eventType), callback);
83
83
  }
84
84
  }]);
85
85
  return BaseModule;
@@ -1,8 +1,8 @@
1
1
  import { ICustomer } from "../AccountList/types";
2
2
  export declare enum CustomerHooks {
3
- OnCustomerListUpdate = "customer:onUpdate",
3
+ OnCustomerListUpdate = "customer:onCustomerListUpdate",
4
4
  OnCustomerListError = "customer:onError",
5
- OnCustomerSelected = "customer:onSelected",
5
+ OnCustomerSelected = "customer:onCustomerSelected",
6
6
  OnPaginationChange = "customer:onPaginationChange",
7
7
  OnScrollLoadMore = "customer:onScrollLoadMore",
8
8
  OnScrollLoadComplete = "customer:onScrollLoadComplete"
@@ -1,7 +1,7 @@
1
1
  export var CustomerHooks = /*#__PURE__*/function (CustomerHooks) {
2
- CustomerHooks["OnCustomerListUpdate"] = "customer:onUpdate";
2
+ CustomerHooks["OnCustomerListUpdate"] = "customer:onCustomerListUpdate";
3
3
  CustomerHooks["OnCustomerListError"] = "customer:onError";
4
- CustomerHooks["OnCustomerSelected"] = "customer:onSelected";
4
+ CustomerHooks["OnCustomerSelected"] = "customer:onCustomerSelected";
5
5
  CustomerHooks["OnPaginationChange"] = "customer:onPaginationChange";
6
6
  CustomerHooks["OnScrollLoadMore"] = "customer:onScrollLoadMore";
7
7
  CustomerHooks["OnScrollLoadComplete"] = "customer:onScrollLoadComplete";
@@ -35,7 +35,7 @@ export var OrderModule = /*#__PURE__*/function (_BaseModule) {
35
35
  function OrderModule(name, version) {
36
36
  var _this;
37
37
  _classCallCheck(this, OrderModule);
38
- _this = _super.call(this, name, version);
38
+ _this = _super.call(this, name || "order", version);
39
39
  _defineProperty(_assertThisInitialized(_this), "defaultName", 'order');
40
40
  _defineProperty(_assertThisInitialized(_this), "defaultVersion", '1.0.0');
41
41
  _defineProperty(_assertThisInitialized(_this), "store", void 0);
@@ -73,7 +73,7 @@ export var PaymentModule = /*#__PURE__*/function (_BaseModule) {
73
73
  function PaymentModule(name, version) {
74
74
  var _this;
75
75
  _classCallCheck(this, PaymentModule);
76
- _this = _super.call(this, name, version);
76
+ _this = _super.call(this, name || "payment", version);
77
77
  // 初始化支付方式实例
78
78
  _defineProperty(_assertThisInitialized(_this), "defaultName", 'pay');
79
79
  _defineProperty(_assertThisInitialized(_this), "defaultVersion", '1.0.0');
@@ -14,7 +14,7 @@ export declare class BaseModule {
14
14
  store: any;
15
15
  cacheKey: string[];
16
16
  }): void;
17
- effectsOn(eventType: string, callback: (payload: any) => void): void;
17
+ effectsOn(eventType: string, callback: (payload: any) => void): () => void;
18
18
  effectsOff(eventType: string, callback: (payload: any) => void): void;
19
- effectsOnce(eventType: string, callback: (payload: any) => void): void;
19
+ effectsOnce(eventType: string, callback: (payload: any) => void): () => void;
20
20
  }
@@ -85,13 +85,13 @@ var BaseModule = class {
85
85
  }
86
86
  }
87
87
  effectsOn(eventType, callback) {
88
- this.core.effects.on(`${this.name}:${eventType}`, callback);
88
+ return this.core.effects.on(`${this.name}:${eventType}`, callback);
89
89
  }
90
90
  effectsOff(eventType, callback) {
91
- this.core.effects.off(`${this.name}:${eventType}`, callback);
91
+ return this.core.effects.off(`${this.name}:${eventType}`, callback);
92
92
  }
93
93
  effectsOnce(eventType, callback) {
94
- this.core.effects.once(`${this.name}:${eventType}`, callback);
94
+ return this.core.effects.once(`${this.name}:${eventType}`, callback);
95
95
  }
96
96
  };
97
97
  // Annotate the CommonJS export names for ESM import in node:
@@ -1,8 +1,8 @@
1
1
  import { ICustomer } from "../AccountList/types";
2
2
  export declare enum CustomerHooks {
3
- OnCustomerListUpdate = "customer:onUpdate",
3
+ OnCustomerListUpdate = "customer:onCustomerListUpdate",
4
4
  OnCustomerListError = "customer:onError",
5
- OnCustomerSelected = "customer:onSelected",
5
+ OnCustomerSelected = "customer:onCustomerSelected",
6
6
  OnPaginationChange = "customer:onPaginationChange",
7
7
  OnScrollLoadMore = "customer:onScrollLoadMore",
8
8
  OnScrollLoadComplete = "customer:onScrollLoadComplete"
@@ -23,9 +23,9 @@ __export(types_exports, {
23
23
  });
24
24
  module.exports = __toCommonJS(types_exports);
25
25
  var CustomerHooks = /* @__PURE__ */ ((CustomerHooks2) => {
26
- CustomerHooks2["OnCustomerListUpdate"] = "customer:onUpdate";
26
+ CustomerHooks2["OnCustomerListUpdate"] = "customer:onCustomerListUpdate";
27
27
  CustomerHooks2["OnCustomerListError"] = "customer:onError";
28
- CustomerHooks2["OnCustomerSelected"] = "customer:onSelected";
28
+ CustomerHooks2["OnCustomerSelected"] = "customer:onCustomerSelected";
29
29
  CustomerHooks2["OnPaginationChange"] = "customer:onPaginationChange";
30
30
  CustomerHooks2["OnScrollLoadMore"] = "customer:onScrollLoadMore";
31
31
  CustomerHooks2["OnScrollLoadComplete"] = "customer:onScrollLoadComplete";
@@ -39,7 +39,7 @@ var import_dayjs = __toESM(require("dayjs"));
39
39
  var OrderModule = class extends import_BaseModule.BaseModule {
40
40
  // LoggerManager 实例
41
41
  constructor(name, version) {
42
- super(name, version);
42
+ super(name || "order", version);
43
43
  this.defaultName = "order";
44
44
  this.defaultVersion = "1.0.0";
45
45
  }
@@ -55,7 +55,7 @@ function generateRequestUniqueId() {
55
55
  }
56
56
  var PaymentModule = class extends import_BaseModule.BaseModule {
57
57
  constructor(name, version) {
58
- super(name, version);
58
+ super(name || "payment", version);
59
59
  this.defaultName = "pay";
60
60
  this.defaultVersion = "1.0.0";
61
61
  // LoggerManager 实例
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "private": false,
3
3
  "name": "@pisell/pisellos",
4
- "version": "0.0.325",
4
+ "version": "0.0.327",
5
5
  "description": "一个可扩展的前端模块化SDK框架,支持插件系统",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",