@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.
|
@@ -42,18 +42,18 @@ export class UrlSlugComponent extends BaseEditComponent {
|
|
|
42
42
|
let event = { urlSlug: slugedText };
|
|
43
43
|
this.generating.emit(event);
|
|
44
44
|
this.setFormValue(this.controlName, event.urlSlug);
|
|
45
|
-
this.hrefGo = `${event.urlSlug}`;
|
|
46
45
|
}
|
|
47
46
|
startWatching() {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
47
|
+
this.subs.sink = this.formGroup.get(this.watchedControlName).valueChanges.subscribe(value => {
|
|
48
|
+
if (this.firstValue) {
|
|
49
|
+
this.firstValue = false;
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
this.generateUrlSlug(value);
|
|
53
|
+
});
|
|
54
|
+
this.subs.sink = this.formGroup.get(this.controlName).valueChanges.subscribe(value => {
|
|
55
|
+
this.hrefGo = value;
|
|
56
|
+
});
|
|
57
57
|
}
|
|
58
58
|
//Events
|
|
59
59
|
onUrlSlugChange() {
|
|
@@ -62,10 +62,10 @@ export class UrlSlugComponent extends BaseEditComponent {
|
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
64
|
UrlSlugComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: UrlSlugComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
65
|
-
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' (
|
|
65
|
+
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.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.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: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i3.NativeElementDirective, selector: "[formControl], [formControlName]" }, { kind: "component", type: i4.ItemValidationSummaryComponent, selector: "anatoly-item-validation-summary", inputs: ["controlName", "controlTitle"] }] });
|
|
66
66
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: UrlSlugComponent, decorators: [{
|
|
67
67
|
type: Component,
|
|
68
|
-
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' (
|
|
68
|
+
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" }]
|
|
69
69
|
}], ctorParameters: function () { return []; }, propDecorators: { title: [{
|
|
70
70
|
type: Input
|
|
71
71
|
}], isTitleVisible: [{
|
|
@@ -85,4 +85,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImpor
|
|
|
85
85
|
}], generating: [{
|
|
86
86
|
type: Output
|
|
87
87
|
}] } });
|
|
88
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
88
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXJsc2x1Zy5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9hbmF0b2x5L3NyYy9saWIvdWkvZm9ybXMvY29tcG9uZW50cy91cmxzbHVnL3VybHNsdWcuY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvYW5hd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nY29udHJvbFRpdGxlJz5cclxuICAgIDwvYW5hdG9seS1pdGVtLXZhbGlkYXRpb24tc3VtbWFyeT5cclxuICA8L2Rpdj5cclxuPC9kaXY+XHJcbiJdfQ==
|
|
@@ -3897,18 +3897,18 @@ class UrlSlugComponent extends BaseEditComponent {
|
|
|
3897
3897
|
let event = { urlSlug: slugedText };
|
|
3898
3898
|
this.generating.emit(event);
|
|
3899
3899
|
this.setFormValue(this.controlName, event.urlSlug);
|
|
3900
|
-
this.hrefGo = `${event.urlSlug}`;
|
|
3901
3900
|
}
|
|
3902
3901
|
startWatching() {
|
|
3903
|
-
|
|
3904
|
-
|
|
3905
|
-
|
|
3906
|
-
|
|
3907
|
-
|
|
3908
|
-
|
|
3909
|
-
|
|
3910
|
-
|
|
3911
|
-
|
|
3902
|
+
this.subs.sink = this.formGroup.get(this.watchedControlName).valueChanges.subscribe(value => {
|
|
3903
|
+
if (this.firstValue) {
|
|
3904
|
+
this.firstValue = false;
|
|
3905
|
+
return;
|
|
3906
|
+
}
|
|
3907
|
+
this.generateUrlSlug(value);
|
|
3908
|
+
});
|
|
3909
|
+
this.subs.sink = this.formGroup.get(this.controlName).valueChanges.subscribe(value => {
|
|
3910
|
+
this.hrefGo = value;
|
|
3911
|
+
});
|
|
3912
3912
|
}
|
|
3913
3913
|
//Events
|
|
3914
3914
|
onUrlSlugChange() {
|
|
@@ -3917,10 +3917,10 @@ class UrlSlugComponent extends BaseEditComponent {
|
|
|
3917
3917
|
}
|
|
3918
3918
|
}
|
|
3919
3919
|
UrlSlugComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: UrlSlugComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3920
|
-
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' (
|
|
3920
|
+
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"] }] });
|
|
3921
3921
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: UrlSlugComponent, decorators: [{
|
|
3922
3922
|
type: Component,
|
|
3923
|
-
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' (
|
|
3923
|
+
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" }]
|
|
3924
3924
|
}], ctorParameters: function () { return []; }, propDecorators: { title: [{
|
|
3925
3925
|
type: Input
|
|
3926
3926
|
}], isTitleVisible: [{
|