zek 14.2.55 → 14.2.57

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.
package/fesm2020/zek.mjs CHANGED
@@ -574,10 +574,18 @@ class DateHelper {
574
574
  return date;
575
575
  }
576
576
  ;
577
+ static addHours(v, hours) {
578
+ if (!hours)
579
+ return v;
580
+ let date = new Date(v);
581
+ //todo need to check if this line needs --> date = new Date(date.getTime());
582
+ date.setHours(date.getHours() + hours);
583
+ return date;
584
+ }
577
585
  static addMinutes(v, minutes) {
578
586
  if (!minutes)
579
587
  return v;
580
- let date = v;
588
+ let date = new Date(v);
581
589
  //todo need to check if this line needs --> date = new Date(date.getTime());
582
590
  date.setMinutes(date.getMinutes() + minutes);
583
591
  return date;
@@ -628,13 +636,21 @@ class DateHelper {
628
636
  return Math.floor(timeDiff / 86400000); //86400000 = (1000 * 60 * 60 * 24) = 1000 millisecond * 60second * 60minute * 24hour
629
637
  }
630
638
  ;
639
+ static subtractHours(value, date) {
640
+ if (!date)
641
+ return null;
642
+ date = this.toDate(date);
643
+ let timeDiff = date.getTime() - value.getTime();
644
+ return Math.floor((timeDiff % 86400000) / 3600000);
645
+ }
646
+ ;
631
647
  static subtractMinutes(value, date) {
632
648
  if (!date)
633
649
  return null;
634
650
  date = this.toDate(date);
635
651
  let timeDiff = date.getTime() - value.getTime();
652
+ //
636
653
  return Math.floor(((timeDiff % 86400000) % 3600000) / 60000);
637
- ;
638
654
  }
639
655
  ;
640
656
  // 1 2 3 4 5 6 7 8 9 10 11
@@ -1065,6 +1081,17 @@ var firstBy = (function () {
1065
1081
  return tb;
1066
1082
  })();
1067
1083
 
1084
+ class UrlHelper {
1085
+ static getController(url) {
1086
+ return url.substring(0, url.lastIndexOf('/') + 1);
1087
+ }
1088
+ static getAction(url) {
1089
+ let action = url.substring(url.lastIndexOf('/') + 1);
1090
+ let i = action.indexOf(';');
1091
+ return i === -1 ? action : action.substring(0, i);
1092
+ }
1093
+ }
1094
+
1068
1095
  class AuthService {
1069
1096
  constructor() {
1070
1097
  this.subject = new BehaviorSubject(false); //todo check if need BehaviorSubject
@@ -1788,7 +1815,7 @@ class BaseComponent extends CoreComponent {
1788
1815
  this.route = route;
1789
1816
  this.router = router;
1790
1817
  this._readOnly = false;
1791
- this.url = this.router.url.split(';')[0];
1818
+ this._url = null;
1792
1819
  }
1793
1820
  get readOnly() {
1794
1821
  return this._readOnly;
@@ -1796,12 +1823,14 @@ class BaseComponent extends CoreComponent {
1796
1823
  set readOnly(v) {
1797
1824
  this._readOnly = Convert.toBoolean(v);
1798
1825
  }
1826
+ get url() {
1827
+ if (!this._url)
1828
+ this._url = this.router.url.split(';')[0];
1829
+ return this._url;
1830
+ }
1799
1831
  getParam(name) {
1800
1832
  return this.route.snapshot.paramMap.get(name);
1801
1833
  }
1802
- getAction() {
1803
- return this.url.substr(this.url.lastIndexOf('/') + 1);
1804
- }
1805
1834
  navigateReturnUrl() {
1806
1835
  const returnUrl = this.route.snapshot.paramMap.get('returnUrl');
1807
1836
  if (returnUrl) {
@@ -6479,5 +6508,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImpor
6479
6508
  * Generated bundle index. Do not edit.
6480
6509
  */
6481
6510
 
6482
- export { API_BASE_URL, AgeModule, AgePipe, Alert, AlertComponent, AlertModule, AlertService, AlertType, AppBaseModule, ApproveModalComponent, ArrayHelper, AuthGuardService, AuthService, AutoCompleteDirective, AutoCompleteModule, Base64Helper, BaseAlert, BaseComponent, BaseService, BitwiseHelper, BootstrapHelper, ButtonBrowseComponent, ButtonBrowseModalBaseComponent, ButtonBrowseModalToolbarComponent, ButtonBrowseModule, CallbackModule, CallbackPipe, CardComponent, CardModule, Color, ComponentType, Convert, CoreComponent, CoreUiComponent, CrudService, CssHelper, CustomHttpParamEncoder, DATE_FORMAT, DateAgoModule, DateAgoPipe, DateHelper, DateValueAccessor, DatepickerModule, DeleteModalComponent, DisapproveModalComponent, EditBase, EditBaseComponent, EditComponent, EditFormComponent, EditToolbarComponent, EditToolbarModule, FieldValidatorComponent, FileBase, FileBytes, FileHelper, FileModule, FileSizePipe, FileString, FileViewerComponent, FileViewerModule, FilterBase, FilterHelper, FilterModalComponent, Gender, GridToolbarBarComponent, GridToolbarComponent, GridToolbarModule, HtmlHelper, HttpErrorHandler, KeyPair, KeyPairChecked, KeyPairEx, KeyPairRequired, LANGUAGE, ListBase, ListBaseComponent, ListToolbarComponent, ListToolbarModule, LoadingComponent, LoadingModule, MathHelper, ModalComponent, ModalModule, Month, ObjectHelper, OverlapHelper, PageTitleComponent, PageTitleModule, PagedList, PagedListBase, Pager, PagerBase, PagerComponent, PagerHelper, PagerModule, PasswordComponent, PasswordModule, PeriodRelation, PrintType, ProgressModule, RECAPTCHA_SITE_KEY, RadioComponent, RadioModule, RandomHelper, RangeValidator, ReCaptchaService, ReadOnlyDirective, ReadOnlyModule, RecaptchaModule, RestoreModalComponent, SafeModule, SafePipe, Select2Component, Select2Module, Select2MultipleComponent, Select2MultipleModule, SortButtonGroupComponent, SortDirective, SortModule, StorageHelper, StringHelper, SubmitModalComponent, SumComponent, TimeHelper, TimeModule, TimePipe, TimerService, Toast, ToastComponent, Tree, ValidEventArgs, ValidationComponent, ValidatorModule, Validators, ValidatorsModule, WebApiClient, WebApiModule, WizardComponent, WizardComponent2, WizardModule, ZekProgress, ZekSelectModule, ZekSelectMultiple, firstBy, handler, nullValidator, rangeValidator };
6511
+ export { API_BASE_URL, AgeModule, AgePipe, Alert, AlertComponent, AlertModule, AlertService, AlertType, AppBaseModule, ApproveModalComponent, ArrayHelper, AuthGuardService, AuthService, AutoCompleteDirective, AutoCompleteModule, Base64Helper, BaseAlert, BaseComponent, BaseService, BitwiseHelper, BootstrapHelper, ButtonBrowseComponent, ButtonBrowseModalBaseComponent, ButtonBrowseModalToolbarComponent, ButtonBrowseModule, CallbackModule, CallbackPipe, CardComponent, CardModule, Color, ComponentType, Convert, CoreComponent, CoreUiComponent, CrudService, CssHelper, CustomHttpParamEncoder, DATE_FORMAT, DateAgoModule, DateAgoPipe, DateHelper, DateValueAccessor, DatepickerModule, DeleteModalComponent, DisapproveModalComponent, EditBase, EditBaseComponent, EditComponent, EditFormComponent, EditToolbarComponent, EditToolbarModule, FieldValidatorComponent, FileBase, FileBytes, FileHelper, FileModule, FileSizePipe, FileString, FileViewerComponent, FileViewerModule, FilterBase, FilterHelper, FilterModalComponent, Gender, GridToolbarBarComponent, GridToolbarComponent, GridToolbarModule, HtmlHelper, HttpErrorHandler, KeyPair, KeyPairChecked, KeyPairEx, KeyPairRequired, LANGUAGE, ListBase, ListBaseComponent, ListToolbarComponent, ListToolbarModule, LoadingComponent, LoadingModule, MathHelper, ModalComponent, ModalModule, Month, ObjectHelper, OverlapHelper, PageTitleComponent, PageTitleModule, PagedList, PagedListBase, Pager, PagerBase, PagerComponent, PagerHelper, PagerModule, PasswordComponent, PasswordModule, PeriodRelation, PrintType, ProgressModule, RECAPTCHA_SITE_KEY, RadioComponent, RadioModule, RandomHelper, RangeValidator, ReCaptchaService, ReadOnlyDirective, ReadOnlyModule, RecaptchaModule, RestoreModalComponent, SafeModule, SafePipe, Select2Component, Select2Module, Select2MultipleComponent, Select2MultipleModule, SortButtonGroupComponent, SortDirective, SortModule, StorageHelper, StringHelper, SubmitModalComponent, SumComponent, TimeHelper, TimeModule, TimePipe, TimerService, Toast, ToastComponent, Tree, UrlHelper, ValidEventArgs, ValidationComponent, ValidatorModule, Validators, ValidatorsModule, WebApiClient, WebApiModule, WizardComponent, WizardComponent2, WizardModule, ZekProgress, ZekSelectModule, ZekSelectMultiple, firstBy, handler, nullValidator, rangeValidator };
6483
6512
  //# sourceMappingURL=zek.mjs.map