@pisell/pisellos 0.0.18 → 0.0.19

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.
@@ -90,10 +90,10 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
90
90
  moduleArr.forEach(function (step) {
91
91
  var targetModule = createModule(step, _this2.name);
92
92
  if (targetModule) {
93
- var _this2$otherParams, _this2$otherParams2;
93
+ var _targetCacheData, _this2$otherParams, _this2$otherParams2;
94
94
  _this2.store[step] = targetModule;
95
95
  _this2.core.registerModule(targetModule, {
96
- initialState: targetCacheData[targetModule.name],
96
+ initialState: (_targetCacheData = targetCacheData) === null || _targetCacheData === void 0 ? void 0 : _targetCacheData[targetModule.name],
97
97
  otherParams: _objectSpread(_objectSpread({}, _this2.otherParams), {}, {
98
98
  fatherModule: _this2.name,
99
99
  openCache: (_this2$otherParams = _this2.otherParams) !== null && _this2$otherParams !== void 0 && _this2$otherParams.cacheId ? true : false,
@@ -154,7 +154,7 @@ export var ShopDiscountImpl = /*#__PURE__*/function (_BaseModule) {
154
154
  }, {
155
155
  key: "registerDependentModules",
156
156
  value: function registerDependentModules() {
157
- var _this$options$otherPa, _this$options$otherPa2, _this$options$otherPa3, _this$options$otherPa4, _this$options$otherPa5;
157
+ var _this$options$otherPa, _targetCacheData, _this$options$otherPa2, _this$options$otherPa3, _this$options$otherPa4, _this$options$otherPa5;
158
158
  // 如果有传 cacheid,默认需要收集上面这些模块里用户操作选中的数据
159
159
  // 并且在上面 registerModule 的时候,读取 sessionStroage 里的数据,塞进默认值
160
160
  var targetCacheData = {};
@@ -169,7 +169,7 @@ export var ShopDiscountImpl = /*#__PURE__*/function (_BaseModule) {
169
169
  // 注册优惠模块
170
170
  var discount = new DiscountModule("".concat(this.name, "_discount"));
171
171
  this.core.registerModule(discount, {
172
- initialState: targetCacheData[discount.name],
172
+ initialState: (_targetCacheData = targetCacheData) === null || _targetCacheData === void 0 ? void 0 : _targetCacheData[discount.name],
173
173
  hooks: (_this$options$otherPa2 = this.options.otherParams) === null || _this$options$otherPa2 === void 0 || (_this$options$otherPa2 = _this$options$otherPa2.discount) === null || _this$options$otherPa2 === void 0 ? void 0 : _this$options$otherPa2.hooks,
174
174
  otherParams: {
175
175
  fatherModule: this.name,
@@ -82,7 +82,7 @@ var BookingByStepImpl = class extends import_BaseModule.BaseModule {
82
82
  const targetModule = (0, import_types.createModule)(step, this.name);
83
83
  if (targetModule) {
84
84
  this.store[step] = targetModule;
85
- this.core.registerModule(targetModule, { initialState: targetCacheData[targetModule.name], otherParams: {
85
+ this.core.registerModule(targetModule, { initialState: targetCacheData == null ? void 0 : targetCacheData[targetModule.name], otherParams: {
86
86
  ...this.otherParams,
87
87
  fatherModule: this.name,
88
88
  openCache: ((_a2 = this.otherParams) == null ? void 0 : _a2.cacheId) ? true : false,
@@ -93,7 +93,7 @@ var ShopDiscountImpl = class extends import_BaseModule.BaseModule {
93
93
  }
94
94
  const discount = new import_Discount.DiscountModule(`${this.name}_discount`);
95
95
  this.core.registerModule(discount, {
96
- initialState: targetCacheData[discount.name],
96
+ initialState: targetCacheData == null ? void 0 : targetCacheData[discount.name],
97
97
  hooks: (_c = (_b = this.options.otherParams) == null ? void 0 : _b.discount) == null ? void 0 : _c.hooks,
98
98
  otherParams: {
99
99
  fatherModule: this.name,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "private": false,
3
3
  "name": "@pisell/pisellos",
4
- "version": "0.0.18",
4
+ "version": "0.0.19",
5
5
  "description": "一个可扩展的前端模块化SDK框架,支持插件系统",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",