@osovitny/anatoly 2.1.0 → 2.1.1

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.
@@ -103,6 +103,9 @@
103
103
  // this.router.navigate([this.route.url]);
104
104
  window.location.reload();
105
105
  };
106
+ BaseGoService.prototype.homeReload = function () {
107
+ window.location.href = "/";
108
+ };
106
109
  return BaseGoService;
107
110
  }());
108
111
  BaseGoService.decorators = [
@@ -680,6 +683,32 @@
680
683
  }
681
684
  return null;
682
685
  };
686
+ Convert.enumToString = function (enumeration, value) {
687
+ for (var k in enumeration)
688
+ if (enumeration[k] == value)
689
+ return k;
690
+ return null;
691
+ };
692
+ Convert.enumToArray = function (enumeration, notIncludes) {
693
+ var notIncludeFiler = function (value) {
694
+ if (isNaN(Number(value))) {
695
+ return false;
696
+ }
697
+ if (notIncludes) {
698
+ for (var i in notIncludes) {
699
+ if (notIncludes[i] == value)
700
+ return false;
701
+ }
702
+ }
703
+ return true;
704
+ };
705
+ return Object.keys(enumeration)
706
+ .filter(notIncludeFiler)
707
+ .map(function (key) { return ({
708
+ value: key,
709
+ text: enumeration[key]
710
+ }); });
711
+ };
683
712
  return Convert;
684
713
  }());
685
714