@osovitny/anatoly 3.17.29 → 3.17.30
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.
|
@@ -24,20 +24,16 @@ import * as i2 from "@angular/forms";
|
|
|
24
24
|
import * as i3 from "../../directives/native-element.directive";
|
|
25
25
|
import * as i4 from "../../validation/item-validation-summary.component";
|
|
26
26
|
function UrlSlugComponent_label_4_Template(rf, ctx) { if (rf & 1) {
|
|
27
|
-
i0.ɵɵelementStart(0, "label"
|
|
27
|
+
i0.ɵɵelementStart(0, "label");
|
|
28
28
|
i0.ɵɵtext(1);
|
|
29
|
-
i0.ɵɵ
|
|
30
|
-
i0.ɵɵtext(3);
|
|
31
|
-
i0.ɵɵelementEnd()();
|
|
29
|
+
i0.ɵɵelementEnd();
|
|
32
30
|
} if (rf & 2) {
|
|
33
31
|
const ctx_r0 = i0.ɵɵnextContext();
|
|
34
32
|
i0.ɵɵadvance();
|
|
35
|
-
i0.ɵɵ
|
|
36
|
-
i0.ɵɵadvance(2);
|
|
37
|
-
i0.ɵɵtextInterpolate(ctx_r0.urlPrefix);
|
|
33
|
+
i0.ɵɵtextInterpolate(ctx_r0.title);
|
|
38
34
|
} }
|
|
39
|
-
function
|
|
40
|
-
i0.ɵɵelementStart(0, "div",
|
|
35
|
+
function UrlSlugComponent_div_8_Template(rf, ctx) { if (rf & 1) {
|
|
36
|
+
i0.ɵɵelementStart(0, "div", 8)(1, "a", 9);
|
|
41
37
|
i0.ɵɵtext(2, "Go");
|
|
42
38
|
i0.ɵɵelementEnd()();
|
|
43
39
|
} if (rf & 2) {
|
|
@@ -65,20 +61,22 @@ export class UrlSlugComponent extends EditComponentBase {
|
|
|
65
61
|
this.setFormValue(this.controlName, event.urlSlug);
|
|
66
62
|
}
|
|
67
63
|
startWatching() {
|
|
68
|
-
this.subs.sink = this.formGroup.get(this.watchedControlName).valueChanges.subscribe({
|
|
69
|
-
next: (value) => {
|
|
70
|
-
if (this.firstValue) {
|
|
71
|
-
this.firstValue = false;
|
|
72
|
-
return;
|
|
73
|
-
}
|
|
74
|
-
this.generateUrlSlug(value);
|
|
75
|
-
}
|
|
76
|
-
});
|
|
77
64
|
this.subs.sink = this.formGroup.get(this.controlName).valueChanges.subscribe({
|
|
78
65
|
next: (value) => {
|
|
79
66
|
this.hrefGo = value;
|
|
80
67
|
}
|
|
81
68
|
});
|
|
69
|
+
if (this.watchedControlName) {
|
|
70
|
+
this.subs.sink = this.formGroup.get(this.watchedControlName).valueChanges.subscribe({
|
|
71
|
+
next: (value) => {
|
|
72
|
+
if (this.firstValue) {
|
|
73
|
+
this.firstValue = false;
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
this.generateUrlSlug(value);
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
}
|
|
82
80
|
}
|
|
83
81
|
//Events
|
|
84
82
|
onUrlSlugChange() {
|
|
@@ -86,23 +84,28 @@ export class UrlSlugComponent extends EditComponentBase {
|
|
|
86
84
|
this.generateUrlSlug(text);
|
|
87
85
|
}
|
|
88
86
|
static { this.ɵfac = function UrlSlugComponent_Factory(t) { return new (t || UrlSlugComponent)(); }; }
|
|
89
|
-
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: UrlSlugComponent, selectors: [["anatoly-urlslug"]], inputs: { urlPrefix: "urlPrefix", isGoButtonVisible: "isGoButtonVisible", watchedControlName: "watchedControlName" }, outputs: { generated: "generated" }, features: [i0.ɵɵInheritDefinitionFeature], decls:
|
|
87
|
+
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: UrlSlugComponent, selectors: [["anatoly-urlslug"]], inputs: { urlPrefix: "urlPrefix", isGoButtonVisible: "isGoButtonVisible", watchedControlName: "watchedControlName" }, outputs: { generated: "generated" }, features: [i0.ɵɵInheritDefinitionFeature], decls: 9, vars: 14, consts: [[3, "formGroup", "ngClass"], [1, "d-flex", "align-items-end"], [3, "formGroup", "formSubmitted", "formControlName"], [1, "form-group"], [4, "ngIf"], [1, "urlPrefix"], ["type", "text", "placeholder", "Type url slug here", 1, "form-control", 3, "formControlName", "focusout"], ["class", "form-group flex-shrink-1", 4, "ngIf"], [1, "form-group", "flex-shrink-1"], ["target", "_blank", 1, "btn", "btn-primary", 3, "href"]], template: function UrlSlugComponent_Template(rf, ctx) { if (rf & 1) {
|
|
90
88
|
i0.ɵɵelementStart(0, "div", 0)(1, "div", 1);
|
|
91
89
|
i0.ɵɵelement(2, "anatoly-item-validation-summary", 2);
|
|
92
90
|
i0.ɵɵelementStart(3, "div", 3);
|
|
93
|
-
i0.ɵɵtemplate(4, UrlSlugComponent_label_4_Template,
|
|
94
|
-
i0.ɵɵelementStart(5, "
|
|
95
|
-
i0.ɵɵ
|
|
91
|
+
i0.ɵɵtemplate(4, UrlSlugComponent_label_4_Template, 2, 1, "label", 4);
|
|
92
|
+
i0.ɵɵelementStart(5, "span", 5);
|
|
93
|
+
i0.ɵɵtext(6);
|
|
94
|
+
i0.ɵɵelementEnd();
|
|
95
|
+
i0.ɵɵelementStart(7, "input", 6);
|
|
96
|
+
i0.ɵɵlistener("focusout", function UrlSlugComponent_Template_input_focusout_7_listener() { return ctx.onUrlSlugChange(); });
|
|
96
97
|
i0.ɵɵelementEnd()();
|
|
97
|
-
i0.ɵɵtemplate(
|
|
98
|
+
i0.ɵɵtemplate(8, UrlSlugComponent_div_8_Template, 3, 2, "div", 7);
|
|
98
99
|
i0.ɵɵelementEnd()();
|
|
99
100
|
} if (rf & 2) {
|
|
100
101
|
i0.ɵɵclassMapInterpolate1("permalink form-group ", ctx.classes, "");
|
|
101
|
-
i0.ɵɵproperty("formGroup", ctx.formGroup)("ngClass", i0.ɵɵpureFunction1(
|
|
102
|
+
i0.ɵɵproperty("formGroup", ctx.formGroup)("ngClass", i0.ɵɵpureFunction1(12, _c0, ctx.isControlInvalid(ctx.controlName)));
|
|
102
103
|
i0.ɵɵadvance(2);
|
|
103
104
|
i0.ɵɵproperty("formGroup", ctx.formGroup)("formSubmitted", ctx.formSubmitted)("formControlName", ctx.controlName);
|
|
104
105
|
i0.ɵɵadvance(2);
|
|
105
106
|
i0.ɵɵproperty("ngIf", ctx.isTitleVisible);
|
|
107
|
+
i0.ɵɵadvance(2);
|
|
108
|
+
i0.ɵɵtextInterpolate(ctx.urlPrefix);
|
|
106
109
|
i0.ɵɵadvance();
|
|
107
110
|
i0.ɵɵproperty("formControlName", ctx.controlName);
|
|
108
111
|
i0.ɵɵadvance();
|
|
@@ -111,7 +114,7 @@ export class UrlSlugComponent extends EditComponentBase {
|
|
|
111
114
|
}
|
|
112
115
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(UrlSlugComponent, [{
|
|
113
116
|
type: Component,
|
|
114
|
-
args: [{ selector: 'anatoly-urlslug', template: "<div [formGroup]='formGroup' [ngClass]=\"{'has-error': isControlInvalid(controlName)}\"
|
|
117
|
+
args: [{ selector: 'anatoly-urlslug', template: "<div [formGroup]='formGroup' [ngClass]=\"{'has-error': isControlInvalid(controlName)}\" class=\"permalink form-group {{ classes }}\">\r\n <div class=\"d-flex align-items-end\">\r\n <anatoly-item-validation-summary\r\n [formGroup]='formGroup'\r\n [formSubmitted]='formSubmitted'\r\n [formControlName]='controlName'>\r\n </anatoly-item-validation-summary>\r\n\r\n <div class=\"form-group\">\r\n <label *ngIf='isTitleVisible'>{{ title }}</label>\r\n <span class=\"urlPrefix\">{{ urlPrefix }}</span>\r\n <input type='text'\r\n class='form-control'\r\n placeholder='Type url slug here'\r\n [formControlName]='controlName'\r\n (focusout)='onUrlSlugChange()' />\r\n </div>\r\n\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 </div>\r\n</div>\r\n" }]
|
|
115
118
|
}], () => [], { urlPrefix: [{
|
|
116
119
|
type: Input
|
|
117
120
|
}], isGoButtonVisible: [{
|
|
@@ -122,4 +125,4 @@ export class UrlSlugComponent extends EditComponentBase {
|
|
|
122
125
|
type: Output
|
|
123
126
|
}] }); })();
|
|
124
127
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(UrlSlugComponent, { className: "UrlSlugComponent", filePath: "lib\\ui\\components\\urlslug\\urlslug.component.ts", lineNumber: 28 }); })();
|
|
125
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
128
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXJsc2x1Zy5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9hbmF0b2x5L3NyYy9saWIvdWkvY29tcG9uZW50cy91cmxzbHVnL3VybHNsdWcuY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvYW5hdG9seS9zcmMvbGliL3VpL2NvbXBvbmVudHMvdXJsc2x1Zy91cmxzbHVnLmNvbXBvbmVudC5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7Ozs7Ozs7Ozs7OztFQWNFO0FBRUYsTUFBTTtBQUNOLE9BQU8sRUFBRSxTQUFTLEVBQUUsS0FBSyxFQUFFLFlBQVksRUFBRSxNQUFNLEVBQVUsTUFBTSxlQUFlLENBQUM7QUFFL0UsS0FBSztBQUNMLE9BQU8sRUFBRSxpQkFBaUIsRUFBRSxNQUFNLGlEQUFpRCxDQUFDO0FBQ3BGLE9BQU8sRUFBRSxLQUFLLEVBQUUsTUFBTSwyQkFBMkIsQ0FBQzs7Ozs7OztJQ1o1Qyw2QkFBOEI7SUFBQSxZQUFXO0lBQUEsaUJBQVE7OztJQUFuQixjQUFXO0lBQVgsa0NBQVc7OztJQVMzQyw4QkFBZ0UsV0FBQTtJQUNZLGtCQUFFO0lB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RuLXByaW1hcnlcIj5HbzwvYT5cclxuICAgIDwvZGl2PlxyXG4gIDwvZGl2PlxyXG48L2Rpdj5cclxuIl19
|
|
@@ -5225,20 +5225,16 @@ class ItemValidationSummaryComponent extends ValidationSummaryComponent {
|
|
|
5225
5225
|
*/
|
|
5226
5226
|
//Node
|
|
5227
5227
|
function UrlSlugComponent_label_4_Template(rf, ctx) { if (rf & 1) {
|
|
5228
|
-
i0.ɵɵelementStart(0, "label"
|
|
5228
|
+
i0.ɵɵelementStart(0, "label");
|
|
5229
5229
|
i0.ɵɵtext(1);
|
|
5230
|
-
i0.ɵɵ
|
|
5231
|
-
i0.ɵɵtext(3);
|
|
5232
|
-
i0.ɵɵelementEnd()();
|
|
5230
|
+
i0.ɵɵelementEnd();
|
|
5233
5231
|
} if (rf & 2) {
|
|
5234
5232
|
const ctx_r0 = i0.ɵɵnextContext();
|
|
5235
5233
|
i0.ɵɵadvance();
|
|
5236
|
-
i0.ɵɵ
|
|
5237
|
-
i0.ɵɵadvance(2);
|
|
5238
|
-
i0.ɵɵtextInterpolate(ctx_r0.urlPrefix);
|
|
5234
|
+
i0.ɵɵtextInterpolate(ctx_r0.title);
|
|
5239
5235
|
} }
|
|
5240
|
-
function
|
|
5241
|
-
i0.ɵɵelementStart(0, "div",
|
|
5236
|
+
function UrlSlugComponent_div_8_Template(rf, ctx) { if (rf & 1) {
|
|
5237
|
+
i0.ɵɵelementStart(0, "div", 8)(1, "a", 9);
|
|
5242
5238
|
i0.ɵɵtext(2, "Go");
|
|
5243
5239
|
i0.ɵɵelementEnd()();
|
|
5244
5240
|
} if (rf & 2) {
|
|
@@ -5266,20 +5262,22 @@ class UrlSlugComponent extends EditComponentBase {
|
|
|
5266
5262
|
this.setFormValue(this.controlName, event.urlSlug);
|
|
5267
5263
|
}
|
|
5268
5264
|
startWatching() {
|
|
5269
|
-
this.subs.sink = this.formGroup.get(this.watchedControlName).valueChanges.subscribe({
|
|
5270
|
-
next: (value) => {
|
|
5271
|
-
if (this.firstValue) {
|
|
5272
|
-
this.firstValue = false;
|
|
5273
|
-
return;
|
|
5274
|
-
}
|
|
5275
|
-
this.generateUrlSlug(value);
|
|
5276
|
-
}
|
|
5277
|
-
});
|
|
5278
5265
|
this.subs.sink = this.formGroup.get(this.controlName).valueChanges.subscribe({
|
|
5279
5266
|
next: (value) => {
|
|
5280
5267
|
this.hrefGo = value;
|
|
5281
5268
|
}
|
|
5282
5269
|
});
|
|
5270
|
+
if (this.watchedControlName) {
|
|
5271
|
+
this.subs.sink = this.formGroup.get(this.watchedControlName).valueChanges.subscribe({
|
|
5272
|
+
next: (value) => {
|
|
5273
|
+
if (this.firstValue) {
|
|
5274
|
+
this.firstValue = false;
|
|
5275
|
+
return;
|
|
5276
|
+
}
|
|
5277
|
+
this.generateUrlSlug(value);
|
|
5278
|
+
}
|
|
5279
|
+
});
|
|
5280
|
+
}
|
|
5283
5281
|
}
|
|
5284
5282
|
//Events
|
|
5285
5283
|
onUrlSlugChange() {
|
|
@@ -5287,23 +5285,28 @@ class UrlSlugComponent extends EditComponentBase {
|
|
|
5287
5285
|
this.generateUrlSlug(text);
|
|
5288
5286
|
}
|
|
5289
5287
|
static { this.ɵfac = function UrlSlugComponent_Factory(t) { return new (t || UrlSlugComponent)(); }; }
|
|
5290
|
-
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: UrlSlugComponent, selectors: [["anatoly-urlslug"]], inputs: { urlPrefix: "urlPrefix", isGoButtonVisible: "isGoButtonVisible", watchedControlName: "watchedControlName" }, outputs: { generated: "generated" }, features: [i0.ɵɵInheritDefinitionFeature], decls:
|
|
5288
|
+
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: UrlSlugComponent, selectors: [["anatoly-urlslug"]], inputs: { urlPrefix: "urlPrefix", isGoButtonVisible: "isGoButtonVisible", watchedControlName: "watchedControlName" }, outputs: { generated: "generated" }, features: [i0.ɵɵInheritDefinitionFeature], decls: 9, vars: 14, consts: [[3, "formGroup", "ngClass"], [1, "d-flex", "align-items-end"], [3, "formGroup", "formSubmitted", "formControlName"], [1, "form-group"], [4, "ngIf"], [1, "urlPrefix"], ["type", "text", "placeholder", "Type url slug here", 1, "form-control", 3, "formControlName", "focusout"], ["class", "form-group flex-shrink-1", 4, "ngIf"], [1, "form-group", "flex-shrink-1"], ["target", "_blank", 1, "btn", "btn-primary", 3, "href"]], template: function UrlSlugComponent_Template(rf, ctx) { if (rf & 1) {
|
|
5291
5289
|
i0.ɵɵelementStart(0, "div", 0)(1, "div", 1);
|
|
5292
5290
|
i0.ɵɵelement(2, "anatoly-item-validation-summary", 2);
|
|
5293
5291
|
i0.ɵɵelementStart(3, "div", 3);
|
|
5294
|
-
i0.ɵɵtemplate(4, UrlSlugComponent_label_4_Template,
|
|
5295
|
-
i0.ɵɵelementStart(5, "
|
|
5296
|
-
i0.ɵɵ
|
|
5292
|
+
i0.ɵɵtemplate(4, UrlSlugComponent_label_4_Template, 2, 1, "label", 4);
|
|
5293
|
+
i0.ɵɵelementStart(5, "span", 5);
|
|
5294
|
+
i0.ɵɵtext(6);
|
|
5295
|
+
i0.ɵɵelementEnd();
|
|
5296
|
+
i0.ɵɵelementStart(7, "input", 6);
|
|
5297
|
+
i0.ɵɵlistener("focusout", function UrlSlugComponent_Template_input_focusout_7_listener() { return ctx.onUrlSlugChange(); });
|
|
5297
5298
|
i0.ɵɵelementEnd()();
|
|
5298
|
-
i0.ɵɵtemplate(
|
|
5299
|
+
i0.ɵɵtemplate(8, UrlSlugComponent_div_8_Template, 3, 2, "div", 7);
|
|
5299
5300
|
i0.ɵɵelementEnd()();
|
|
5300
5301
|
} if (rf & 2) {
|
|
5301
5302
|
i0.ɵɵclassMapInterpolate1("permalink form-group ", ctx.classes, "");
|
|
5302
|
-
i0.ɵɵproperty("formGroup", ctx.formGroup)("ngClass", i0.ɵɵpureFunction1(
|
|
5303
|
+
i0.ɵɵproperty("formGroup", ctx.formGroup)("ngClass", i0.ɵɵpureFunction1(12, _c0$9, ctx.isControlInvalid(ctx.controlName)));
|
|
5303
5304
|
i0.ɵɵadvance(2);
|
|
5304
5305
|
i0.ɵɵproperty("formGroup", ctx.formGroup)("formSubmitted", ctx.formSubmitted)("formControlName", ctx.controlName);
|
|
5305
5306
|
i0.ɵɵadvance(2);
|
|
5306
5307
|
i0.ɵɵproperty("ngIf", ctx.isTitleVisible);
|
|
5308
|
+
i0.ɵɵadvance(2);
|
|
5309
|
+
i0.ɵɵtextInterpolate(ctx.urlPrefix);
|
|
5307
5310
|
i0.ɵɵadvance();
|
|
5308
5311
|
i0.ɵɵproperty("formControlName", ctx.controlName);
|
|
5309
5312
|
i0.ɵɵadvance();
|
|
@@ -5312,7 +5315,7 @@ class UrlSlugComponent extends EditComponentBase {
|
|
|
5312
5315
|
}
|
|
5313
5316
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(UrlSlugComponent, [{
|
|
5314
5317
|
type: Component,
|
|
5315
|
-
args: [{ selector: 'anatoly-urlslug', template: "<div [formGroup]='formGroup' [ngClass]=\"{'has-error': isControlInvalid(controlName)}\"
|
|
5318
|
+
args: [{ selector: 'anatoly-urlslug', template: "<div [formGroup]='formGroup' [ngClass]=\"{'has-error': isControlInvalid(controlName)}\" class=\"permalink form-group {{ classes }}\">\r\n <div class=\"d-flex align-items-end\">\r\n <anatoly-item-validation-summary\r\n [formGroup]='formGroup'\r\n [formSubmitted]='formSubmitted'\r\n [formControlName]='controlName'>\r\n </anatoly-item-validation-summary>\r\n\r\n <div class=\"form-group\">\r\n <label *ngIf='isTitleVisible'>{{ title }}</label>\r\n <span class=\"urlPrefix\">{{ urlPrefix }}</span>\r\n <input type='text'\r\n class='form-control'\r\n placeholder='Type url slug here'\r\n [formControlName]='controlName'\r\n (focusout)='onUrlSlugChange()' />\r\n </div>\r\n\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 </div>\r\n</div>\r\n" }]
|
|
5316
5319
|
}], () => [], { urlPrefix: [{
|
|
5317
5320
|
type: Input
|
|
5318
5321
|
}], isGoButtonVisible: [{
|