ngx-smz-ui 3.4.13 → 3.4.14

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.
@@ -5761,26 +5761,42 @@
5761
5761
  button.onClick(response);
5762
5762
  };
5763
5763
  DialogFooterComponent.prototype.isValid = function () {
5764
- var e_1, _g;
5765
- var _a, _b, _c, _d, _e, _f;
5764
+ var e_1, _o;
5765
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
5766
5766
  // const isValid = this.dialogConfig.data._context.injectables.every(x => x.ref?.componentRef?.instance?.isValid);
5767
5767
  // console.log('----------------------- isValid', this.visibilityService);
5768
5768
  // console.log('--- isValid() ');
5769
5769
  // console.log('context', this.dialogConfig.data._context);
5770
5770
  var isValid = true;
5771
+ if (this.rbkConfig.debugMode) {
5772
+ console.log(' Calling isValid()');
5773
+ }
5771
5774
  try {
5772
- for (var _h = __values(this.dialogConfig.data._context.injectables), _j = _h.next(); !_j.done; _j = _h.next()) {
5773
- var injectable = _j.value;
5775
+ for (var _p = __values(this.dialogConfig.data._context.injectables), _q = _p.next(); !_q.done; _q = _p.next()) {
5776
+ var injectable = _q.value;
5777
+ if (this.rbkConfig.debugMode)
5778
+ console.log(' >> injectable', injectable);
5774
5779
  if (injectable.visibilityDependsOn != null) {
5780
+ if (this.rbkConfig.debugMode)
5781
+ console.log(' >> injectable visibilityDependsOn');
5775
5782
  var observer = this.visibilityService.observers[injectable.componentId + injectable.component.name];
5783
+ if (this.rbkConfig.debugMode)
5784
+ console.log(' >> injectable observer', observer);
5776
5785
  var isVisible = !injectable.visibilityDependsOn.reversed && (observer === null || observer === void 0 ? void 0 : observer.visibility$.value.state) || injectable.visibilityDependsOn.reversed && !(observer === null || observer === void 0 ? void 0 : observer.visibility$.value.state);
5777
- if (isVisible && !((_c = (_b = (_a = injectable.ref) === null || _a === void 0 ? void 0 : _a.componentRef) === null || _b === void 0 ? void 0 : _b.instance) === null || _c === void 0 ? void 0 : _c.isValid)) {
5786
+ if (this.rbkConfig.debugMode)
5787
+ console.log(' >> injectable isVisible', isVisible);
5788
+ if (this.rbkConfig.debugMode)
5789
+ console.log(' >> injectable componentRef isValid', (_c = (_b = (_a = injectable.ref) === null || _a === void 0 ? void 0 : _a.componentRef) === null || _b === void 0 ? void 0 : _b.instance) === null || _c === void 0 ? void 0 : _c.isValid);
5790
+ if (isVisible && !((_f = (_e = (_d = injectable.ref) === null || _d === void 0 ? void 0 : _d.componentRef) === null || _e === void 0 ? void 0 : _e.instance) === null || _f === void 0 ? void 0 : _f.isValid)) {
5778
5791
  isValid = false;
5779
5792
  }
5780
5793
  }
5781
5794
  else {
5782
5795
  // console.log(' instance isValid', injectable.ref?.componentRef?.instance?.isValid);
5783
- if (!((_f = (_e = (_d = injectable.ref) === null || _d === void 0 ? void 0 : _d.componentRef) === null || _e === void 0 ? void 0 : _e.instance) === null || _f === void 0 ? void 0 : _f.isValid)) {
5796
+ if (this.rbkConfig.debugMode) {
5797
+ console.log(' >> injectable componentRef isValid', (_j = (_h = (_g = injectable.ref) === null || _g === void 0 ? void 0 : _g.componentRef) === null || _h === void 0 ? void 0 : _h.instance) === null || _j === void 0 ? void 0 : _j.isValid);
5798
+ }
5799
+ if (!((_m = (_l = (_k = injectable.ref) === null || _k === void 0 ? void 0 : _k.componentRef) === null || _l === void 0 ? void 0 : _l.instance) === null || _m === void 0 ? void 0 : _m.isValid)) {
5784
5800
  isValid = false;
5785
5801
  }
5786
5802
  }
@@ -5789,10 +5805,13 @@
5789
5805
  catch (e_1_1) { e_1 = { error: e_1_1 }; }
5790
5806
  finally {
5791
5807
  try {
5792
- if (_j && !_j.done && (_g = _h.return)) _g.call(_h);
5808
+ if (_q && !_q.done && (_o = _p.return)) _o.call(_p);
5793
5809
  }
5794
5810
  finally { if (e_1) throw e_1.error; }
5795
5811
  }
5812
+ if (this.rbkConfig.debugMode) {
5813
+ console.log(' isValid() => ', isValid);
5814
+ }
5796
5815
  return isValid;
5797
5816
  };
5798
5817
  DialogFooterComponent.prototype.responsePostProcesses = function () {
@@ -23122,6 +23141,8 @@
23122
23141
  var states = snapshot.routeConfig.data.requiredStates;
23123
23142
  if (snapshot.routeConfig.data.requiredStates == null ||
23124
23143
  ((_a = snapshot.routeConfig.data.requiredStates) === null || _a === void 0 ? void 0 : _a.length) === 0) {
23144
+ if (this.config.debugMode)
23145
+ console.groupEnd();
23125
23146
  return rxjs.of(true);
23126
23147
  }
23127
23148
  if (this.config.debugMode)
@@ -23129,13 +23150,19 @@
23129
23150
  var _loop_1 = function (name) {
23130
23151
  var stateConfig = this_1.config.state.database[name];
23131
23152
  if (stateConfig == null) {
23153
+ if (this_1.config.debugMode)
23154
+ console.groupEnd();
23132
23155
  throw new Error('The route is asking for a state that is not setup in the config file');
23133
23156
  }
23134
23157
  var stateValue = this_1.store.selectSnapshot(function (x) { return x.database[name]; });
23135
23158
  if (stateValue == null) {
23159
+ if (this_1.config.debugMode)
23160
+ console.groupEnd();
23136
23161
  throw new Error(name + ' state is null, is it properly initialized with a default value?');
23137
23162
  }
23138
23163
  if (stateValue.lastUpdated === undefined) {
23164
+ if (this_1.config.debugMode)
23165
+ console.groupEnd();
23139
23166
  throw new Error('For a state to be automatically loaded by the route it needs to have a "lastUpdated" property');
23140
23167
  }
23141
23168
  var dispatchAction = false;