@osovitny/anatoly 2.14.30 → 2.14.32
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 +9 -1
- package/fesm2015/osovitny-anatoly.mjs +8 -0
- package/fesm2015/osovitny-anatoly.mjs.map +1 -1
- package/fesm2020/osovitny-anatoly.mjs +8 -0
- package/fesm2020/osovitny-anatoly.mjs.map +1 -1
- package/lib/ui/forms/components/urlslug/urlslug.component.d.ts +5 -3
- package/package.json +1 -1
|
@@ -3889,6 +3889,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImpor
|
|
|
3889
3889
|
class UrlSlugComponent extends BaseEditComponent {
|
|
3890
3890
|
constructor() {
|
|
3891
3891
|
super();
|
|
3892
|
+
this.firstValue = true;
|
|
3892
3893
|
//Inputs
|
|
3893
3894
|
this.title = 'Permalink:';
|
|
3894
3895
|
this.isTitleVisible = true;
|
|
@@ -3896,6 +3897,9 @@ class UrlSlugComponent extends BaseEditComponent {
|
|
|
3896
3897
|
//Outputs
|
|
3897
3898
|
this.generating = new EventEmitter();
|
|
3898
3899
|
}
|
|
3900
|
+
ngOnInit() {
|
|
3901
|
+
this.startWatching();
|
|
3902
|
+
}
|
|
3899
3903
|
generateUrlSlug(text) {
|
|
3900
3904
|
let slugedText = Utils.slugify(text);
|
|
3901
3905
|
let event = { urlSlug: slugedText };
|
|
@@ -3906,6 +3910,10 @@ class UrlSlugComponent extends BaseEditComponent {
|
|
|
3906
3910
|
startWatching() {
|
|
3907
3911
|
if (this.watchedControlName) {
|
|
3908
3912
|
this.formGroup.get(this.watchedControlName).valueChanges.subscribe(value => {
|
|
3913
|
+
if (this.firstValue) {
|
|
3914
|
+
this.firstValue = false;
|
|
3915
|
+
return;
|
|
3916
|
+
}
|
|
3909
3917
|
this.generateUrlSlug(value);
|
|
3910
3918
|
});
|
|
3911
3919
|
}
|