@osovitny/anatoly 2.14.33 → 2.14.36

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.
@@ -3905,18 +3905,18 @@ class UrlSlugComponent extends BaseEditComponent {
3905
3905
  let event = { urlSlug: slugedText };
3906
3906
  this.generating.emit(event);
3907
3907
  this.setFormValue(this.controlName, event.urlSlug);
3908
- this.hrefGo = `${event.urlSlug}`;
3909
3908
  }
3910
3909
  startWatching() {
3911
- if (this.watchedControlName) {
3912
- this.formGroup.get(this.watchedControlName).valueChanges.subscribe(value => {
3913
- if (this.firstValue) {
3914
- this.firstValue = false;
3915
- return;
3916
- }
3917
- this.generateUrlSlug(value);
3918
- });
3919
- }
3910
+ this.subs.sink = this.formGroup.get(this.watchedControlName).valueChanges.subscribe(value => {
3911
+ if (this.firstValue) {
3912
+ this.firstValue = false;
3913
+ return;
3914
+ }
3915
+ this.generateUrlSlug(value);
3916
+ });
3917
+ this.subs.sink = this.formGroup.get(this.controlName).valueChanges.subscribe(value => {
3918
+ this.hrefGo = value;
3919
+ });
3920
3920
  }
3921
3921
  //Events
3922
3922
  onUrlSlugChange() {
@@ -3925,10 +3925,10 @@ class UrlSlugComponent extends BaseEditComponent {
3925
3925
  }
3926
3926
  }
3927
3927
  UrlSlugComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: UrlSlugComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
3928
- UrlSlugComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.6", type: UrlSlugComponent, selector: "anatoly-forms-urlslug", inputs: { title: "title", isTitleVisible: "isTitleVisible", controlName: "controlName", controlTitle: "controlTitle", class: "class", watchedControlName: "watchedControlName", urlPrefix: "urlPrefix", isGoButtonVisible: "isGoButtonVisible" }, outputs: { generating: "generating" }, usesInheritance: true, ngImport: i0, template: "<div [formGroup]='formGroup' [ngClass]=\"{'has-error': isControlInvalid(controlName)}\"\r\n class=\"permalink form-group {{class}}\">\r\n <div class=\"d-flex align-items-end\">\r\n\r\n <div class=\"form-group\">\r\n <label *ngIf='isTitleVisible' class='col-form-label'>\r\n {{ title }}\r\n <span class=\"urlPrefix\">\r\n {{ urlPrefix }}\r\n </span>\r\n </label>\r\n </div>\r\n <div class='form-group flex-fill'>\r\n <input [formControlName]='controlName' type='text' placeholder='Type url slug here' (onfocusout)=onUrlSlugChange()\r\n class='form-control' />\r\n </div>\r\n <div class=\"form-group flex-shrink-1\" *ngIf=\"isGoButtonVisible\">\r\n <a href=\"{{urlPrefix}}{{hrefGo}}\" target=\"_blank\" class=\"btn btn-primary\">Go</a>\r\n </div>\r\n <anatoly-item-validation-summary [formGroup]='formGroup' [formSubmitted]='formSubmitted' [controlName]='controlName'\r\n [controlTitle]='controlTitle'>\r\n </anatoly-item-validation-summary>\r\n </div>\r\n</div>\r\n", dependencies: [{ kind: "directive", type: i1$5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$6.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$6.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$6.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$6.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$6.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: NativeElementDirective, selector: "[formControl], [formControlName]" }, { kind: "component", type: ItemValidationSummaryComponent, selector: "anatoly-item-validation-summary", inputs: ["controlName", "controlTitle"] }] });
3928
+ UrlSlugComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.6", type: UrlSlugComponent, selector: "anatoly-forms-urlslug", inputs: { title: "title", isTitleVisible: "isTitleVisible", controlName: "controlName", controlTitle: "controlTitle", class: "class", watchedControlName: "watchedControlName", urlPrefix: "urlPrefix", isGoButtonVisible: "isGoButtonVisible" }, outputs: { generating: "generating" }, usesInheritance: true, ngImport: i0, template: "<div [formGroup]='formGroup' [ngClass]=\"{'has-error': isControlInvalid(controlName)}\"\r\n class=\"permalink form-group {{class}}\">\r\n <div class=\"d-flex align-items-end\">\r\n\r\n <div class=\"form-group\">\r\n <label *ngIf='isTitleVisible' class='col-form-label'>\r\n {{ title }}\r\n <span class=\"urlPrefix\">\r\n {{ urlPrefix }}\r\n </span>\r\n </label>\r\n </div>\r\n <div class='form-group flex-fill'>\r\n <input [formControlName]='controlName' type='text' placeholder='Type url slug here' (focusout)='onUrlSlugChange()'\r\n class='form-control' />\r\n </div>\r\n <div class=\"form-group flex-shrink-1\" *ngIf=\"isGoButtonVisible\">\r\n <a href=\"{{urlPrefix}}{{hrefGo}}\" target=\"_blank\" class=\"btn btn-primary\">Go</a>\r\n </div>\r\n <anatoly-item-validation-summary [formGroup]='formGroup' [formSubmitted]='formSubmitted' [controlName]='controlName'\r\n [controlTitle]='controlTitle'>\r\n </anatoly-item-validation-summary>\r\n </div>\r\n</div>\r\n", dependencies: [{ kind: "directive", type: i1$5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$6.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$6.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$6.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$6.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$6.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: NativeElementDirective, selector: "[formControl], [formControlName]" }, { kind: "component", type: ItemValidationSummaryComponent, selector: "anatoly-item-validation-summary", inputs: ["controlName", "controlTitle"] }] });
3929
3929
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: UrlSlugComponent, decorators: [{
3930
3930
  type: Component,
3931
- args: [{ selector: 'anatoly-forms-urlslug', template: "<div [formGroup]='formGroup' [ngClass]=\"{'has-error': isControlInvalid(controlName)}\"\r\n class=\"permalink form-group {{class}}\">\r\n <div class=\"d-flex align-items-end\">\r\n\r\n <div class=\"form-group\">\r\n <label *ngIf='isTitleVisible' class='col-form-label'>\r\n {{ title }}\r\n <span class=\"urlPrefix\">\r\n {{ urlPrefix }}\r\n </span>\r\n </label>\r\n </div>\r\n <div class='form-group flex-fill'>\r\n <input [formControlName]='controlName' type='text' placeholder='Type url slug here' (onfocusout)=onUrlSlugChange()\r\n class='form-control' />\r\n </div>\r\n <div class=\"form-group flex-shrink-1\" *ngIf=\"isGoButtonVisible\">\r\n <a href=\"{{urlPrefix}}{{hrefGo}}\" target=\"_blank\" class=\"btn btn-primary\">Go</a>\r\n </div>\r\n <anatoly-item-validation-summary [formGroup]='formGroup' [formSubmitted]='formSubmitted' [controlName]='controlName'\r\n [controlTitle]='controlTitle'>\r\n </anatoly-item-validation-summary>\r\n </div>\r\n</div>\r\n" }]
3931
+ args: [{ selector: 'anatoly-forms-urlslug', template: "<div [formGroup]='formGroup' [ngClass]=\"{'has-error': isControlInvalid(controlName)}\"\r\n class=\"permalink form-group {{class}}\">\r\n <div class=\"d-flex align-items-end\">\r\n\r\n <div class=\"form-group\">\r\n <label *ngIf='isTitleVisible' class='col-form-label'>\r\n {{ title }}\r\n <span class=\"urlPrefix\">\r\n {{ urlPrefix }}\r\n </span>\r\n </label>\r\n </div>\r\n <div class='form-group flex-fill'>\r\n <input [formControlName]='controlName' type='text' placeholder='Type url slug here' (focusout)='onUrlSlugChange()'\r\n class='form-control' />\r\n </div>\r\n <div class=\"form-group flex-shrink-1\" *ngIf=\"isGoButtonVisible\">\r\n <a href=\"{{urlPrefix}}{{hrefGo}}\" target=\"_blank\" class=\"btn btn-primary\">Go</a>\r\n </div>\r\n <anatoly-item-validation-summary [formGroup]='formGroup' [formSubmitted]='formSubmitted' [controlName]='controlName'\r\n [controlTitle]='controlTitle'>\r\n </anatoly-item-validation-summary>\r\n </div>\r\n</div>\r\n" }]
3932
3932
  }], ctorParameters: function () { return []; }, propDecorators: { title: [{
3933
3933
  type: Input
3934
3934
  }], isTitleVisible: [{