monkey-front-core 0.0.288 → 0.0.290

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.
@@ -193,7 +193,7 @@ class MonkeyEcxUtils {
193
193
  return dvCalc === dgv;
194
194
  }
195
195
  static isValidUrl(txt) {
196
- const regex = new RegExp(/^(http:\/\/www\.|https:\/\/www\.|http:\/\/|https:\/\/)+[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,10}(:[0-9]{1,5})?(\/.*)?$/gm);
196
+ const regex = /(https?:\/\/(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z0-9][a-z0-9-]{0,61}[a-z0-9])(:?\d*)\/?([a-z_\\/0-9\-#.]*)\??([a-z_\\/0-9\-#=&]*)/g;
197
197
  return regex.test(txt);
198
198
  }
199
199
  static isValidZipCode(zipCode, country) {
@@ -4886,8 +4886,15 @@ class MonkeyEcxFeatureByProgramDirective {
4886
4886
  this.feature = '';
4887
4887
  this.monkeyConfigService.config().subscribe((_) => {
4888
4888
  this.config = _;
4889
+ this.init();
4889
4890
  });
4890
4891
  }
4892
+ init() {
4893
+ if (!this.feature)
4894
+ return;
4895
+ this.cdr.detectChanges();
4896
+ this.handleDisplay();
4897
+ }
4891
4898
  handleDisplay() {
4892
4899
  const { feature, config } = this;
4893
4900
  let display = 'none';
@@ -4906,10 +4913,7 @@ class MonkeyEcxFeatureByProgramDirective {
4906
4913
  this.cdr.detectChanges();
4907
4914
  }
4908
4915
  ngOnInit() {
4909
- if (!this.feature)
4910
- return;
4911
- this.cdr.detectChanges();
4912
- this.handleDisplay();
4916
+ this.init();
4913
4917
  }
4914
4918
  }
4915
4919
  MonkeyEcxFeatureByProgramDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxFeatureByProgramDirective, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: MonkeyEcxConfigService }], target: i0.ɵɵFactoryTarget.Directive });