@osovitny/anatoly 2.14.21 → 2.14.23
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/esm2020/lib/ui/forms/components/urlslug/urlslug.component.mjs +28 -12
- package/fesm2015/osovitny-anatoly.mjs +26 -10
- package/fesm2015/osovitny-anatoly.mjs.map +1 -1
- package/fesm2020/osovitny-anatoly.mjs +26 -10
- package/fesm2020/osovitny-anatoly.mjs.map +1 -1
- package/lib/ui/forms/components/urlslug/urlslug.component.d.ts +7 -3
- package/package.json +1 -1
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
</file>
|
|
15
15
|
*/
|
|
16
16
|
//Node
|
|
17
|
-
import { Component, Input } from '@angular/core';
|
|
17
|
+
import { Component, Input, EventEmitter, Output } from '@angular/core';
|
|
18
18
|
//App
|
|
19
19
|
import { BaseEditComponent } from '../../../components/base-edit.component';
|
|
20
20
|
import { Utils } from '../../../../core/utils';
|
|
@@ -27,32 +27,46 @@ export class UrlSlugComponent extends BaseEditComponent {
|
|
|
27
27
|
constructor() {
|
|
28
28
|
super();
|
|
29
29
|
//Inputs
|
|
30
|
-
this.title = 'Permalink';
|
|
30
|
+
this.title = 'Permalink:';
|
|
31
31
|
this.isTitleVisible = true;
|
|
32
|
+
this.isButtonVisible = true;
|
|
33
|
+
//Outputs
|
|
34
|
+
this.generating = new EventEmitter();
|
|
32
35
|
}
|
|
33
36
|
ngOnInit() {
|
|
34
37
|
this.setWatchers();
|
|
35
38
|
}
|
|
36
39
|
setWatchers() {
|
|
37
|
-
|
|
38
|
-
this.
|
|
39
|
-
|
|
40
|
+
if (this.watchedControlName) {
|
|
41
|
+
this.formGroup.get(this.watchedControlName).valueChanges.subscribe(val => {
|
|
42
|
+
let text = this.getFormValue(this.watchedControlName);
|
|
43
|
+
this.generateUrlSlug(text);
|
|
44
|
+
});
|
|
45
|
+
}
|
|
40
46
|
}
|
|
41
|
-
generateUrlSlug() {
|
|
42
|
-
let
|
|
43
|
-
let
|
|
44
|
-
this.
|
|
47
|
+
generateUrlSlug(text) {
|
|
48
|
+
let slugedText = Utils.slugify(text);
|
|
49
|
+
let event = { urlSlug: slugedText };
|
|
50
|
+
this.generating.emit(event);
|
|
51
|
+
this.setFormValue(this.controlName, event.urlSlug);
|
|
52
|
+
this.hrefGo = `${event.urlSlug}`;
|
|
53
|
+
}
|
|
54
|
+
onUrlSlugChange() {
|
|
55
|
+
let text = this.getFormValue(this.controlName);
|
|
56
|
+
this.generateUrlSlug(text);
|
|
45
57
|
}
|
|
46
58
|
}
|
|
47
59
|
UrlSlugComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: UrlSlugComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
48
|
-
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" }, usesInheritance: true, ngImport: i0, template: "<div [formGroup]='formGroup' class=\"{'has-error': isControlInvalid(controlName)}
|
|
60
|
+
UrlSlugComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.6", type: UrlSlugComponent, selector: "anatoly-forms-urlslug", inputs: { title: "title", isTitleVisible: "isTitleVisible", isButtonVisible: "isButtonVisible", controlName: "controlName", controlTitle: "controlTitle", class: "class", watchedControlName: "watchedControlName", urlPrefix: "urlPrefix" }, outputs: { generating: "generating" }, usesInheritance: true, ngImport: i0, template: "<div [formGroup]='formGroup' class=\"d-flex permalink form-group {'has-error': isControlInvalid(controlName)} {{class}}\">\r\n <label *ngIf='isTitleVisible' class='col-form-label'> {{ title }} <span> {{ urlPrefix }} </span></label>\r\n <input [formControlName]='controlName' type='text' placeholder='Type url slug here' class='form-control' (keyup)=onUrlSlugChange()/>\r\n <a *ngIf=\"isButtonVisible\" href=\"{{urlPrefix}}{{hrefGo}}\" target=\"_blank\" class=\"btn btn-outline-primary\">Go</a>\r\n <anatoly-item-validation-summary [formGroup]='formGroup'\r\n [formSubmitted]='formSubmitted'\r\n [controlName]='controlName'\r\n [controlTitle]='controlTitle'>\r\n </anatoly-item-validation-summary>\r\n</div>\r\n\r\n", dependencies: [{ 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"] }] });
|
|
49
61
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: UrlSlugComponent, decorators: [{
|
|
50
62
|
type: Component,
|
|
51
|
-
args: [{ selector: 'anatoly-forms-urlslug', template: "<div [formGroup]='formGroup' class=\"{'has-error': isControlInvalid(controlName)}
|
|
63
|
+
args: [{ selector: 'anatoly-forms-urlslug', template: "<div [formGroup]='formGroup' class=\"d-flex permalink form-group {'has-error': isControlInvalid(controlName)} {{class}}\">\r\n <label *ngIf='isTitleVisible' class='col-form-label'> {{ title }} <span> {{ urlPrefix }} </span></label>\r\n <input [formControlName]='controlName' type='text' placeholder='Type url slug here' class='form-control' (keyup)=onUrlSlugChange()/>\r\n <a *ngIf=\"isButtonVisible\" href=\"{{urlPrefix}}{{hrefGo}}\" target=\"_blank\" class=\"btn btn-outline-primary\">Go</a>\r\n <anatoly-item-validation-summary [formGroup]='formGroup'\r\n [formSubmitted]='formSubmitted'\r\n [controlName]='controlName'\r\n [controlTitle]='controlTitle'>\r\n </anatoly-item-validation-summary>\r\n</div>\r\n\r\n" }]
|
|
52
64
|
}], ctorParameters: function () { return []; }, propDecorators: { title: [{
|
|
53
65
|
type: Input
|
|
54
66
|
}], isTitleVisible: [{
|
|
55
67
|
type: Input
|
|
68
|
+
}], isButtonVisible: [{
|
|
69
|
+
type: Input
|
|
56
70
|
}], controlName: [{
|
|
57
71
|
type: Input
|
|
58
72
|
}], controlTitle: [{
|
|
@@ -63,5 +77,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImpor
|
|
|
63
77
|
type: Input
|
|
64
78
|
}], urlPrefix: [{
|
|
65
79
|
type: Input
|
|
80
|
+
}], generating: [{
|
|
81
|
+
type: Output
|
|
66
82
|
}] } });
|
|
67
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
83
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXJsc2x1Zy5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9hbmF0b2x5L3NyYy9saWIvdWkvZm9ybXMvY29tcG9uZW50cy91cmxzbHVnL3VybHNsdWcuY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvYW5hdG9seS9zcmMvbGliL3VpL2Zvcm1zL2NvbXBvb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1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFtmb3JtU3VibWl0dGVkXT0nZm9ybVN1Ym1pdHRlZCdcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbY29udHJvbE5hbWVdPSdjb250cm9sTmFtZSdcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbY29udHJvbFRpdGxlXT0nY29udHJvbFRpdGxlJz5cclxuICA8L2FuYXRvbHktaXRlbS12YWxpZGF0aW9uLXN1bW1hcnk+XHJcbjwvZGl2PlxyXG5cclxuIl19
|
|
@@ -3882,32 +3882,46 @@ class UrlSlugComponent extends BaseEditComponent {
|
|
|
3882
3882
|
constructor() {
|
|
3883
3883
|
super();
|
|
3884
3884
|
//Inputs
|
|
3885
|
-
this.title = 'Permalink';
|
|
3885
|
+
this.title = 'Permalink:';
|
|
3886
3886
|
this.isTitleVisible = true;
|
|
3887
|
+
this.isButtonVisible = true;
|
|
3888
|
+
//Outputs
|
|
3889
|
+
this.generating = new EventEmitter();
|
|
3887
3890
|
}
|
|
3888
3891
|
ngOnInit() {
|
|
3889
3892
|
this.setWatchers();
|
|
3890
3893
|
}
|
|
3891
3894
|
setWatchers() {
|
|
3892
|
-
|
|
3893
|
-
this.
|
|
3894
|
-
|
|
3895
|
+
if (this.watchedControlName) {
|
|
3896
|
+
this.formGroup.get(this.watchedControlName).valueChanges.subscribe(val => {
|
|
3897
|
+
let text = this.getFormValue(this.watchedControlName);
|
|
3898
|
+
this.generateUrlSlug(text);
|
|
3899
|
+
});
|
|
3900
|
+
}
|
|
3895
3901
|
}
|
|
3896
|
-
generateUrlSlug() {
|
|
3897
|
-
let
|
|
3898
|
-
let
|
|
3899
|
-
this.
|
|
3902
|
+
generateUrlSlug(text) {
|
|
3903
|
+
let slugedText = Utils.slugify(text);
|
|
3904
|
+
let event = { urlSlug: slugedText };
|
|
3905
|
+
this.generating.emit(event);
|
|
3906
|
+
this.setFormValue(this.controlName, event.urlSlug);
|
|
3907
|
+
this.hrefGo = `${event.urlSlug}`;
|
|
3908
|
+
}
|
|
3909
|
+
onUrlSlugChange() {
|
|
3910
|
+
let text = this.getFormValue(this.controlName);
|
|
3911
|
+
this.generateUrlSlug(text);
|
|
3900
3912
|
}
|
|
3901
3913
|
}
|
|
3902
3914
|
UrlSlugComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: UrlSlugComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3903
|
-
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" }, usesInheritance: true, ngImport: i0, template: "<div [formGroup]='formGroup' class=\"{'has-error': isControlInvalid(controlName)}
|
|
3915
|
+
UrlSlugComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.6", type: UrlSlugComponent, selector: "anatoly-forms-urlslug", inputs: { title: "title", isTitleVisible: "isTitleVisible", isButtonVisible: "isButtonVisible", controlName: "controlName", controlTitle: "controlTitle", class: "class", watchedControlName: "watchedControlName", urlPrefix: "urlPrefix" }, outputs: { generating: "generating" }, usesInheritance: true, ngImport: i0, template: "<div [formGroup]='formGroup' class=\"d-flex permalink form-group {'has-error': isControlInvalid(controlName)} {{class}}\">\r\n <label *ngIf='isTitleVisible' class='col-form-label'> {{ title }} <span> {{ urlPrefix }} </span></label>\r\n <input [formControlName]='controlName' type='text' placeholder='Type url slug here' class='form-control' (keyup)=onUrlSlugChange()/>\r\n <a *ngIf=\"isButtonVisible\" href=\"{{urlPrefix}}{{hrefGo}}\" target=\"_blank\" class=\"btn btn-outline-primary\">Go</a>\r\n <anatoly-item-validation-summary [formGroup]='formGroup'\r\n [formSubmitted]='formSubmitted'\r\n [controlName]='controlName'\r\n [controlTitle]='controlTitle'>\r\n </anatoly-item-validation-summary>\r\n</div>\r\n\r\n", dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$5.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$5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$5.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$5.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$5.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"] }] });
|
|
3904
3916
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: UrlSlugComponent, decorators: [{
|
|
3905
3917
|
type: Component,
|
|
3906
|
-
args: [{ selector: 'anatoly-forms-urlslug', template: "<div [formGroup]='formGroup' class=\"{'has-error': isControlInvalid(controlName)}
|
|
3918
|
+
args: [{ selector: 'anatoly-forms-urlslug', template: "<div [formGroup]='formGroup' class=\"d-flex permalink form-group {'has-error': isControlInvalid(controlName)} {{class}}\">\r\n <label *ngIf='isTitleVisible' class='col-form-label'> {{ title }} <span> {{ urlPrefix }} </span></label>\r\n <input [formControlName]='controlName' type='text' placeholder='Type url slug here' class='form-control' (keyup)=onUrlSlugChange()/>\r\n <a *ngIf=\"isButtonVisible\" href=\"{{urlPrefix}}{{hrefGo}}\" target=\"_blank\" class=\"btn btn-outline-primary\">Go</a>\r\n <anatoly-item-validation-summary [formGroup]='formGroup'\r\n [formSubmitted]='formSubmitted'\r\n [controlName]='controlName'\r\n [controlTitle]='controlTitle'>\r\n </anatoly-item-validation-summary>\r\n</div>\r\n\r\n" }]
|
|
3907
3919
|
}], ctorParameters: function () { return []; }, propDecorators: { title: [{
|
|
3908
3920
|
type: Input
|
|
3909
3921
|
}], isTitleVisible: [{
|
|
3910
3922
|
type: Input
|
|
3923
|
+
}], isButtonVisible: [{
|
|
3924
|
+
type: Input
|
|
3911
3925
|
}], controlName: [{
|
|
3912
3926
|
type: Input
|
|
3913
3927
|
}], controlTitle: [{
|
|
@@ -3918,6 +3932,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImpor
|
|
|
3918
3932
|
type: Input
|
|
3919
3933
|
}], urlPrefix: [{
|
|
3920
3934
|
type: Input
|
|
3935
|
+
}], generating: [{
|
|
3936
|
+
type: Output
|
|
3921
3937
|
}] } });
|
|
3922
3938
|
|
|
3923
3939
|
/*
|