@osovitny/anatoly 3.17.24 → 3.17.26
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/esm2022/lib/core/utils/qsutils.mjs +4 -1
- package/esm2022/lib/iam/services/auth.service.mjs +2 -3
- package/esm2022/lib/ui/components/index.mjs +2 -1
- package/esm2022/lib/ui/components/urlslug/urlslug.component.mjs +125 -0
- package/esm2022/lib/ui/forms/index.mjs +1 -2
- package/esm2022/lib/ui/ui.module.mjs +6 -6
- package/fesm2022/osovitny-anatoly.mjs +414 -412
- package/fesm2022/osovitny-anatoly.mjs.map +1 -1
- package/lib/core/utils/qsutils.d.ts +1 -0
- package/lib/ui/components/index.d.ts +1 -0
- package/lib/ui/{forms/components → components}/urlslug/urlslug.component.d.ts +3 -3
- package/lib/ui/forms/index.d.ts +0 -1
- package/lib/ui/ui.module.d.ts +15 -15
- package/package.json +1 -1
- package/esm2022/lib/ui/forms/components/urlslug/urlslug.component.mjs +0 -125
|
@@ -1336,8 +1336,7 @@ class AuthService extends ApiServiceBase {
|
|
|
1336
1336
|
/*
|
|
1337
1337
|
https://learn.microsoft.com/en-us/entra/identity-platform/msal-js-sso
|
|
1338
1338
|
*/
|
|
1339
|
-
|
|
1340
|
-
if (sso) {
|
|
1339
|
+
if (QSUtils.isSSOinProgress()) {
|
|
1341
1340
|
let login = QSUtils.getValueByName("login");
|
|
1342
1341
|
let sid = QSUtils.getValueByName("sid");
|
|
1343
1342
|
let ssoSilentRequest;
|
|
@@ -3201,6 +3200,9 @@ class QSUtils {
|
|
|
3201
3200
|
catch (e) {
|
|
3202
3201
|
}
|
|
3203
3202
|
}
|
|
3203
|
+
static isSSOinProgress() {
|
|
3204
|
+
return location.search.indexOf("action=sso") > -1;
|
|
3205
|
+
}
|
|
3204
3206
|
static clearSSO() {
|
|
3205
3207
|
try {
|
|
3206
3208
|
if (location.href.indexOf("?action=sso") > -1) {
|
|
@@ -5040,79 +5042,115 @@ class NativeElementDirective {
|
|
|
5040
5042
|
Anatoly Osovitny anatoly@osovitny.com
|
|
5041
5043
|
|
|
5042
5044
|
Created:
|
|
5043
|
-
|
|
5045
|
+
8 Dec 2017
|
|
5044
5046
|
|
|
5045
|
-
Copyright (c)
|
|
5047
|
+
Copyright (c) 2016-2022 Osovitny Inc. All rights reserved.
|
|
5046
5048
|
</file>
|
|
5047
5049
|
*/
|
|
5048
5050
|
//Node
|
|
5049
|
-
|
|
5050
|
-
|
|
5051
|
-
} }
|
|
5052
|
-
function CountryDropdownlist_div_1_label_1_Template(rf, ctx) { if (rf & 1) {
|
|
5053
|
-
i0.ɵɵelementStart(0, "label", 6);
|
|
5054
|
-
i0.ɵɵtext(1, "Country");
|
|
5055
|
-
i0.ɵɵelementEnd();
|
|
5056
|
-
} }
|
|
5057
|
-
function CountryDropdownlist_div_1_option_3_Template(rf, ctx) { if (rf & 1) {
|
|
5058
|
-
i0.ɵɵelementStart(0, "option", 7);
|
|
5059
|
-
i0.ɵɵtext(1);
|
|
5060
|
-
i0.ɵɵelementEnd();
|
|
5061
|
-
} if (rf & 2) {
|
|
5062
|
-
const item_r4 = ctx.$implicit;
|
|
5063
|
-
i0.ɵɵproperty("value", item_r4.code);
|
|
5064
|
-
i0.ɵɵadvance();
|
|
5065
|
-
i0.ɵɵtextInterpolate1(" ", item_r4.name, " ");
|
|
5066
|
-
} }
|
|
5067
|
-
function CountryDropdownlist_div_1_Template(rf, ctx) { if (rf & 1) {
|
|
5068
|
-
i0.ɵɵelementStart(0, "div", 2);
|
|
5069
|
-
i0.ɵɵtemplate(1, CountryDropdownlist_div_1_label_1_Template, 2, 0, "label", 3);
|
|
5070
|
-
i0.ɵɵelementStart(2, "select", 4);
|
|
5071
|
-
i0.ɵɵtemplate(3, CountryDropdownlist_div_1_option_3_Template, 2, 2, "option", 5);
|
|
5072
|
-
i0.ɵɵelementEnd()();
|
|
5073
|
-
} if (rf & 2) {
|
|
5074
|
-
const ctx_r1 = i0.ɵɵnextContext();
|
|
5075
|
-
i0.ɵɵproperty("formGroup", ctx_r1.formGroup);
|
|
5076
|
-
i0.ɵɵadvance();
|
|
5077
|
-
i0.ɵɵproperty("ngIf", ctx_r1.isTitleVisible);
|
|
5078
|
-
i0.ɵɵadvance();
|
|
5079
|
-
i0.ɵɵproperty("formControlName", ctx_r1.controlName);
|
|
5080
|
-
i0.ɵɵadvance();
|
|
5081
|
-
i0.ɵɵproperty("ngForOf", ctx_r1.items);
|
|
5082
|
-
} }
|
|
5083
|
-
class CountryDropdownlist extends EditComponentBase {
|
|
5084
|
-
constructor(api, appContext) {
|
|
5051
|
+
class ValidationSummaryComponent extends EditComponentBase {
|
|
5052
|
+
constructor() {
|
|
5085
5053
|
super();
|
|
5086
|
-
this.api = api;
|
|
5087
|
-
this.appContext = appContext;
|
|
5088
|
-
this.title = 'Country';
|
|
5089
5054
|
}
|
|
5090
|
-
|
|
5091
|
-
|
|
5055
|
+
getControlTitle(control, name) {
|
|
5056
|
+
if (control?.nativeElement) {
|
|
5057
|
+
let value = this.getTitleAttribute(control.nativeElement);
|
|
5058
|
+
return value ? value : name;
|
|
5059
|
+
}
|
|
5060
|
+
return undefined;
|
|
5092
5061
|
}
|
|
5093
|
-
|
|
5094
|
-
|
|
5095
|
-
|
|
5062
|
+
getTitleAttribute(nativeElement) {
|
|
5063
|
+
let title;
|
|
5064
|
+
let element;
|
|
5065
|
+
let tagName = nativeElement.tagName;
|
|
5066
|
+
switch (tagName) {
|
|
5067
|
+
// For Kendo time and date picker element title is assigned to the 4th child control.
|
|
5068
|
+
case "KENDO-TIMEPICKER":
|
|
5069
|
+
case "KENDO-DATEPICKER":
|
|
5070
|
+
element = nativeElement.children[0]?.children[0]?.children[0]?.children[0];
|
|
5071
|
+
break;
|
|
5072
|
+
// For Kendo numaric element title is assigned to the 2nd child control.
|
|
5073
|
+
case "KENDO-NUMERICTEXTBOX":
|
|
5074
|
+
element = nativeElement.children[0]?.children[0];
|
|
5075
|
+
break;
|
|
5076
|
+
default:
|
|
5077
|
+
element = nativeElement;
|
|
5078
|
+
break;
|
|
5079
|
+
}
|
|
5080
|
+
if (element) {
|
|
5081
|
+
title = element.getAttribute("formControlTitle");
|
|
5082
|
+
if (!title) {
|
|
5083
|
+
title = element.getAttribute("title");
|
|
5084
|
+
}
|
|
5085
|
+
}
|
|
5086
|
+
return title;
|
|
5087
|
+
}
|
|
5088
|
+
getFormValidationMessages() {
|
|
5089
|
+
let messages = [];
|
|
5090
|
+
Object.keys(this.formGroup.controls).forEach((k) => {
|
|
5091
|
+
let control = this.formGroup.controls[k];
|
|
5092
|
+
if (control.controls != null) {
|
|
5093
|
+
Object.keys(control.controls).forEach((k) => {
|
|
5094
|
+
var child = control.controls[k];
|
|
5095
|
+
this.getValidationMessages(child, this.getControlTitle(child, k)).forEach((m) => messages.push(m));
|
|
5096
|
+
});
|
|
5097
|
+
}
|
|
5098
|
+
else {
|
|
5099
|
+
this.getValidationMessages(control, this.getControlTitle(control, k)).forEach((m) => messages.push(m));
|
|
5100
|
+
}
|
|
5096
5101
|
});
|
|
5097
|
-
|
|
5102
|
+
return messages;
|
|
5103
|
+
}
|
|
5104
|
+
getValidationMessages(control, title) {
|
|
5105
|
+
let messages = [];
|
|
5106
|
+
let thing;
|
|
5107
|
+
if (title) {
|
|
5108
|
+
thing = title;
|
|
5098
5109
|
}
|
|
5099
5110
|
else {
|
|
5111
|
+
thing = this.getControlTitle(control, null);
|
|
5112
|
+
if (!thing) {
|
|
5113
|
+
thing = control.path;
|
|
5114
|
+
}
|
|
5115
|
+
}
|
|
5116
|
+
if (control.errors) {
|
|
5117
|
+
for (let errorName in control.errors) {
|
|
5118
|
+
if (control.errors.hasOwnProperty(errorName)) {
|
|
5119
|
+
switch (errorName) {
|
|
5120
|
+
case "required":
|
|
5121
|
+
messages.push(`${thing} is required`);
|
|
5122
|
+
break;
|
|
5123
|
+
case "minlength":
|
|
5124
|
+
messages.push(`${thing} must be at least ${control.errors["minlength"].requiredLength} characters`);
|
|
5125
|
+
break;
|
|
5126
|
+
case "pattern":
|
|
5127
|
+
messages.push(`${thing} contains illegal characters`);
|
|
5128
|
+
break;
|
|
5129
|
+
case "format":
|
|
5130
|
+
messages.push(`${thing} format mismatch`);
|
|
5131
|
+
break;
|
|
5132
|
+
case "maxlength":
|
|
5133
|
+
messages.push(`${thing} must have maximum ${control.errors["maxlength"].requiredLength} characters`);
|
|
5134
|
+
break;
|
|
5135
|
+
case "specialcharacters":
|
|
5136
|
+
messages.push(`${thing} contains special characters`);
|
|
5137
|
+
break;
|
|
5138
|
+
}
|
|
5139
|
+
}
|
|
5140
|
+
}
|
|
5100
5141
|
}
|
|
5142
|
+
return messages;
|
|
5101
5143
|
}
|
|
5102
|
-
static { this.ɵfac = function
|
|
5103
|
-
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type:
|
|
5104
|
-
i0.ɵɵtemplate(0, CountryDropdownlist_div_0_Template, 1, 0, "div", 0)(1, CountryDropdownlist_div_1_Template, 4, 4, "div", 1);
|
|
5105
|
-
} if (rf & 2) {
|
|
5106
|
-
i0.ɵɵproperty("ngIf", ctx.isNgModelBased);
|
|
5107
|
-
i0.ɵɵadvance();
|
|
5108
|
-
i0.ɵɵproperty("ngIf", !ctx.isNgModelBased);
|
|
5109
|
-
} }, dependencies: [i1$2.NgForOf, i1$2.NgIf, i2.NgSelectOption, i2.ɵNgSelectMultipleOption, i2.SelectControlValueAccessor, i2.NgControlStatus, i2.NgControlStatusGroup, i2.FormGroupDirective, i2.FormControlName, NativeElementDirective], encapsulation: 2 }); }
|
|
5144
|
+
static { this.ɵfac = function ValidationSummaryComponent_Factory(t) { return new (t || ValidationSummaryComponent)(); }; }
|
|
5145
|
+
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ValidationSummaryComponent, selectors: [["ng-component"]], features: [i0.ɵɵInheritDefinitionFeature], decls: 0, vars: 0, template: function ValidationSummaryComponent_Template(rf, ctx) { }, encapsulation: 2 }); }
|
|
5110
5146
|
}
|
|
5111
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(
|
|
5147
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ValidationSummaryComponent, [{
|
|
5112
5148
|
type: Component,
|
|
5113
|
-
args: [{
|
|
5114
|
-
|
|
5115
|
-
|
|
5149
|
+
args: [{
|
|
5150
|
+
template: ''
|
|
5151
|
+
}]
|
|
5152
|
+
}], () => [], null); })();
|
|
5153
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ValidationSummaryComponent, { className: "ValidationSummaryComponent", filePath: "lib\\ui\\validation\\validation-summary.component.ts", lineNumber: 27 }); })();
|
|
5116
5154
|
|
|
5117
5155
|
/*
|
|
5118
5156
|
<file>
|
|
@@ -5124,60 +5162,308 @@ class CountryDropdownlist extends EditComponentBase {
|
|
|
5124
5162
|
Anatoly Osovitny anatoly@osovitny.com
|
|
5125
5163
|
|
|
5126
5164
|
Created:
|
|
5127
|
-
|
|
5165
|
+
6 Dec 2017
|
|
5128
5166
|
|
|
5129
|
-
Copyright (c)
|
|
5167
|
+
Copyright (c) 2016-2022 Osovitny Inc. All rights reserved.
|
|
5130
5168
|
</file>
|
|
5131
5169
|
*/
|
|
5132
5170
|
//Node
|
|
5133
|
-
function
|
|
5134
|
-
i0.ɵɵ
|
|
5171
|
+
function ItemValidationSummaryComponent_ul_0_li_1_Template(rf, ctx) { if (rf & 1) {
|
|
5172
|
+
i0.ɵɵelementStart(0, "li")(1, "span", 3);
|
|
5173
|
+
i0.ɵɵtext(2);
|
|
5174
|
+
i0.ɵɵelementEnd()();
|
|
5175
|
+
} if (rf & 2) {
|
|
5176
|
+
const error_r2 = ctx.$implicit;
|
|
5177
|
+
i0.ɵɵadvance(2);
|
|
5178
|
+
i0.ɵɵtextInterpolate(error_r2);
|
|
5135
5179
|
} }
|
|
5136
|
-
function
|
|
5137
|
-
i0.ɵɵelementStart(0, "
|
|
5138
|
-
i0.ɵɵ
|
|
5180
|
+
function ItemValidationSummaryComponent_ul_0_Template(rf, ctx) { if (rf & 1) {
|
|
5181
|
+
i0.ɵɵelementStart(0, "ul", 1);
|
|
5182
|
+
i0.ɵɵtemplate(1, ItemValidationSummaryComponent_ul_0_li_1_Template, 3, 1, "li", 2);
|
|
5139
5183
|
i0.ɵɵelementEnd();
|
|
5184
|
+
} if (rf & 2) {
|
|
5185
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
5186
|
+
i0.ɵɵadvance();
|
|
5187
|
+
i0.ɵɵproperty("ngForOf", ctx_r0.getValidationMessages(ctx_r0.formGroup.controls[ctx_r0.controlName]));
|
|
5140
5188
|
} }
|
|
5141
|
-
|
|
5142
|
-
i0.ɵɵ
|
|
5189
|
+
class ItemValidationSummaryComponent extends ValidationSummaryComponent {
|
|
5190
|
+
static { this.ɵfac = /*@__PURE__*/ (() => { let ɵItemValidationSummaryComponent_BaseFactory; return function ItemValidationSummaryComponent_Factory(t) { return (ɵItemValidationSummaryComponent_BaseFactory || (ɵItemValidationSummaryComponent_BaseFactory = i0.ɵɵgetInheritedFactory(ItemValidationSummaryComponent)))(t || ItemValidationSummaryComponent); }; })(); }
|
|
5191
|
+
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ItemValidationSummaryComponent, selectors: [["anatoly-item-validation-summary"]], features: [i0.ɵɵInheritDefinitionFeature], decls: 1, vars: 1, consts: [["class", "list-unstyled", 4, "ngIf"], [1, "list-unstyled"], [4, "ngFor", "ngForOf"], [1, "help-block"]], template: function ItemValidationSummaryComponent_Template(rf, ctx) { if (rf & 1) {
|
|
5192
|
+
i0.ɵɵtemplate(0, ItemValidationSummaryComponent_ul_0_Template, 2, 1, "ul", 0);
|
|
5193
|
+
} if (rf & 2) {
|
|
5194
|
+
i0.ɵɵproperty("ngIf", ctx.isControlInvalid(ctx.controlName));
|
|
5195
|
+
} }, dependencies: [i1$2.NgForOf, i1$2.NgIf], encapsulation: 2 }); }
|
|
5196
|
+
}
|
|
5197
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ItemValidationSummaryComponent, [{
|
|
5198
|
+
type: Component,
|
|
5199
|
+
args: [{ selector: "anatoly-item-validation-summary", template: "<ul class=\"list-unstyled\" *ngIf=\"isControlInvalid(controlName)\">\r\n <li *ngFor=\"let error of getValidationMessages(formGroup.controls[controlName])\">\r\n <span class=\"help-block\">{{ error }}</span>\r\n </li>\r\n</ul>\r\n\r\n" }]
|
|
5200
|
+
}], null, null); })();
|
|
5201
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ItemValidationSummaryComponent, { className: "ItemValidationSummaryComponent", filePath: "lib\\ui\\validation\\item-validation-summary.component.ts", lineNumber: 27 }); })();
|
|
5202
|
+
|
|
5203
|
+
/*
|
|
5204
|
+
<file>
|
|
5205
|
+
Project:
|
|
5206
|
+
@osovitny/anatoly
|
|
5207
|
+
|
|
5208
|
+
Authors:
|
|
5209
|
+
Vadim Osovitny vadim@osovitny.com
|
|
5210
|
+
Anatoly Osovitny anatoly@osovitny.com
|
|
5211
|
+
|
|
5212
|
+
Created:
|
|
5213
|
+
02 Aug 2022
|
|
5214
|
+
|
|
5215
|
+
Copyright (c) 2017-2022 Osovitny Inc. All rights reserved.
|
|
5216
|
+
</file>
|
|
5217
|
+
*/
|
|
5218
|
+
//Node
|
|
5219
|
+
function UrlSlugComponent_label_4_Template(rf, ctx) { if (rf & 1) {
|
|
5220
|
+
i0.ɵɵelementStart(0, "label", 7);
|
|
5143
5221
|
i0.ɵɵtext(1);
|
|
5144
|
-
i0.ɵɵ
|
|
5222
|
+
i0.ɵɵelementStart(2, "span", 8);
|
|
5223
|
+
i0.ɵɵtext(3);
|
|
5224
|
+
i0.ɵɵelementEnd()();
|
|
5145
5225
|
} if (rf & 2) {
|
|
5146
|
-
const
|
|
5147
|
-
i0.ɵɵproperty("value", item_r4.code);
|
|
5226
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
5148
5227
|
i0.ɵɵadvance();
|
|
5149
|
-
i0.ɵɵ
|
|
5228
|
+
i0.ɵɵtextInterpolate1(" ", ctx_r0.title, " ");
|
|
5229
|
+
i0.ɵɵadvance(2);
|
|
5230
|
+
i0.ɵɵtextInterpolate(ctx_r0.urlPrefix);
|
|
5150
5231
|
} }
|
|
5151
|
-
function
|
|
5152
|
-
i0.ɵɵelementStart(0, "div",
|
|
5153
|
-
i0.ɵɵ
|
|
5154
|
-
i0.ɵɵelementStart(2, "select", 4);
|
|
5155
|
-
i0.ɵɵtemplate(3, TimezoneDropdownlist_div_1_option_3_Template, 2, 3, "option", 5);
|
|
5232
|
+
function UrlSlugComponent_div_6_Template(rf, ctx) { if (rf & 1) {
|
|
5233
|
+
i0.ɵɵelementStart(0, "div", 9)(1, "a", 10);
|
|
5234
|
+
i0.ɵɵtext(2, "Go");
|
|
5156
5235
|
i0.ɵɵelementEnd()();
|
|
5157
5236
|
} if (rf & 2) {
|
|
5158
5237
|
const ctx_r1 = i0.ɵɵnextContext();
|
|
5159
|
-
i0.ɵɵproperty("formGroup", ctx_r1.formGroup);
|
|
5160
|
-
i0.ɵɵadvance();
|
|
5161
|
-
i0.ɵɵproperty("ngIf", ctx_r1.isTitleVisible);
|
|
5162
|
-
i0.ɵɵadvance();
|
|
5163
|
-
i0.ɵɵproperty("formControlName", ctx_r1.controlName);
|
|
5164
5238
|
i0.ɵɵadvance();
|
|
5165
|
-
i0.ɵɵ
|
|
5239
|
+
i0.ɵɵpropertyInterpolate2("href", "", ctx_r1.urlPrefix, "", ctx_r1.hrefGo, "", i0.ɵɵsanitizeUrl);
|
|
5166
5240
|
} }
|
|
5167
|
-
|
|
5168
|
-
|
|
5241
|
+
const _c0$9 = a0 => ({ "has-error": a0 });
|
|
5242
|
+
class UrlSlugComponent extends EditComponentBase {
|
|
5243
|
+
constructor() {
|
|
5169
5244
|
super();
|
|
5170
|
-
this.
|
|
5171
|
-
this.
|
|
5172
|
-
|
|
5245
|
+
this.firstValue = true;
|
|
5246
|
+
this.isGoButtonVisible = true;
|
|
5247
|
+
//Outputs
|
|
5248
|
+
this.generated = new EventEmitter();
|
|
5249
|
+
this.title = 'Permalink';
|
|
5173
5250
|
}
|
|
5174
5251
|
ngOnInit() {
|
|
5175
|
-
this.
|
|
5252
|
+
this.startWatching();
|
|
5176
5253
|
}
|
|
5177
|
-
|
|
5178
|
-
|
|
5179
|
-
|
|
5180
|
-
|
|
5254
|
+
generateUrlSlug(text) {
|
|
5255
|
+
let slugedText = Utils.slugify(text);
|
|
5256
|
+
let event = { urlSlug: slugedText };
|
|
5257
|
+
this.generated.emit(event);
|
|
5258
|
+
this.setFormValue(this.controlName, event.urlSlug);
|
|
5259
|
+
}
|
|
5260
|
+
startWatching() {
|
|
5261
|
+
this.subs.sink = this.formGroup.get(this.watchedControlName).valueChanges.subscribe({
|
|
5262
|
+
next: (value) => {
|
|
5263
|
+
if (this.firstValue) {
|
|
5264
|
+
this.firstValue = false;
|
|
5265
|
+
return;
|
|
5266
|
+
}
|
|
5267
|
+
this.generateUrlSlug(value);
|
|
5268
|
+
}
|
|
5269
|
+
});
|
|
5270
|
+
this.subs.sink = this.formGroup.get(this.controlName).valueChanges.subscribe({
|
|
5271
|
+
next: (value) => {
|
|
5272
|
+
this.hrefGo = value;
|
|
5273
|
+
}
|
|
5274
|
+
});
|
|
5275
|
+
}
|
|
5276
|
+
//Events
|
|
5277
|
+
onUrlSlugChange() {
|
|
5278
|
+
let text = this.getFormValue(this.controlName);
|
|
5279
|
+
this.generateUrlSlug(text);
|
|
5280
|
+
}
|
|
5281
|
+
static { this.ɵfac = function UrlSlugComponent_Factory(t) { return new (t || UrlSlugComponent)(); }; }
|
|
5282
|
+
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: 7, vars: 13, consts: [[3, "formGroup", "ngClass"], [1, "d-flex", "align-items-end"], [3, "formGroup", "formSubmitted", "formControlName"], [1, "form-group"], ["class", "col-form-label", 4, "ngIf"], ["type", "text", "placeholder", "Type url slug here", 1, "form-control", 3, "formControlName", "focusout"], ["class", "form-group flex-shrink-1", 4, "ngIf"], [1, "col-form-label"], [1, "urlPrefix"], [1, "form-group", "flex-shrink-1"], ["target", "_blank", 1, "btn", "btn-primary", 3, "href"]], template: function UrlSlugComponent_Template(rf, ctx) { if (rf & 1) {
|
|
5283
|
+
i0.ɵɵelementStart(0, "div", 0)(1, "div", 1);
|
|
5284
|
+
i0.ɵɵelement(2, "anatoly-item-validation-summary", 2);
|
|
5285
|
+
i0.ɵɵelementStart(3, "div", 3);
|
|
5286
|
+
i0.ɵɵtemplate(4, UrlSlugComponent_label_4_Template, 4, 2, "label", 4);
|
|
5287
|
+
i0.ɵɵelementStart(5, "input", 5);
|
|
5288
|
+
i0.ɵɵlistener("focusout", function UrlSlugComponent_Template_input_focusout_5_listener() { return ctx.onUrlSlugChange(); });
|
|
5289
|
+
i0.ɵɵelementEnd()();
|
|
5290
|
+
i0.ɵɵtemplate(6, UrlSlugComponent_div_6_Template, 3, 2, "div", 6);
|
|
5291
|
+
i0.ɵɵelementEnd()();
|
|
5292
|
+
} if (rf & 2) {
|
|
5293
|
+
i0.ɵɵclassMapInterpolate1("permalink form-group ", ctx.classes, "");
|
|
5294
|
+
i0.ɵɵproperty("formGroup", ctx.formGroup)("ngClass", i0.ɵɵpureFunction1(11, _c0$9, ctx.isControlInvalid(ctx.controlName)));
|
|
5295
|
+
i0.ɵɵadvance(2);
|
|
5296
|
+
i0.ɵɵproperty("formGroup", ctx.formGroup)("formSubmitted", ctx.formSubmitted)("formControlName", ctx.controlName);
|
|
5297
|
+
i0.ɵɵadvance(2);
|
|
5298
|
+
i0.ɵɵproperty("ngIf", ctx.isTitleVisible);
|
|
5299
|
+
i0.ɵɵadvance();
|
|
5300
|
+
i0.ɵɵproperty("formControlName", ctx.controlName);
|
|
5301
|
+
i0.ɵɵadvance();
|
|
5302
|
+
i0.ɵɵproperty("ngIf", ctx.isGoButtonVisible);
|
|
5303
|
+
} }, dependencies: [i1$2.NgClass, i1$2.NgIf, i2.DefaultValueAccessor, i2.NgControlStatus, i2.NgControlStatusGroup, i2.FormGroupDirective, i2.FormControlName, NativeElementDirective, ItemValidationSummaryComponent], encapsulation: 2 }); }
|
|
5304
|
+
}
|
|
5305
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(UrlSlugComponent, [{
|
|
5306
|
+
type: Component,
|
|
5307
|
+
args: [{ selector: 'anatoly-urlslug', template: "<div [formGroup]='formGroup' [ngClass]=\"{'has-error': isControlInvalid(controlName)}\"\r\n 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' class='col-form-label'>\r\n {{ title }}\r\n <span class=\"urlPrefix\">{{ urlPrefix }}</span>\r\n </label>\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" }]
|
|
5308
|
+
}], () => [], { urlPrefix: [{
|
|
5309
|
+
type: Input
|
|
5310
|
+
}], isGoButtonVisible: [{
|
|
5311
|
+
type: Input
|
|
5312
|
+
}], watchedControlName: [{
|
|
5313
|
+
type: Input
|
|
5314
|
+
}], generated: [{
|
|
5315
|
+
type: Output
|
|
5316
|
+
}] }); })();
|
|
5317
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(UrlSlugComponent, { className: "UrlSlugComponent", filePath: "lib\\ui\\components\\urlslug\\urlslug.component.ts", lineNumber: 28 }); })();
|
|
5318
|
+
|
|
5319
|
+
/*
|
|
5320
|
+
<file>
|
|
5321
|
+
Project:
|
|
5322
|
+
@osovitny/anatoly
|
|
5323
|
+
|
|
5324
|
+
Authors:
|
|
5325
|
+
Vadim Osovitny vadim@osovitny.com
|
|
5326
|
+
Anatoly Osovitny anatoly@osovitny.com
|
|
5327
|
+
|
|
5328
|
+
Created:
|
|
5329
|
+
2 Feb 2024
|
|
5330
|
+
|
|
5331
|
+
Copyright (c) 2017-2022 Osovitny Inc. All rights reserved.
|
|
5332
|
+
</file>
|
|
5333
|
+
*/
|
|
5334
|
+
//Node
|
|
5335
|
+
function CountryDropdownlist_div_0_Template(rf, ctx) { if (rf & 1) {
|
|
5336
|
+
i0.ɵɵelement(0, "div");
|
|
5337
|
+
} }
|
|
5338
|
+
function CountryDropdownlist_div_1_label_1_Template(rf, ctx) { if (rf & 1) {
|
|
5339
|
+
i0.ɵɵelementStart(0, "label", 6);
|
|
5340
|
+
i0.ɵɵtext(1, "Country");
|
|
5341
|
+
i0.ɵɵelementEnd();
|
|
5342
|
+
} }
|
|
5343
|
+
function CountryDropdownlist_div_1_option_3_Template(rf, ctx) { if (rf & 1) {
|
|
5344
|
+
i0.ɵɵelementStart(0, "option", 7);
|
|
5345
|
+
i0.ɵɵtext(1);
|
|
5346
|
+
i0.ɵɵelementEnd();
|
|
5347
|
+
} if (rf & 2) {
|
|
5348
|
+
const item_r4 = ctx.$implicit;
|
|
5349
|
+
i0.ɵɵproperty("value", item_r4.code);
|
|
5350
|
+
i0.ɵɵadvance();
|
|
5351
|
+
i0.ɵɵtextInterpolate1(" ", item_r4.name, " ");
|
|
5352
|
+
} }
|
|
5353
|
+
function CountryDropdownlist_div_1_Template(rf, ctx) { if (rf & 1) {
|
|
5354
|
+
i0.ɵɵelementStart(0, "div", 2);
|
|
5355
|
+
i0.ɵɵtemplate(1, CountryDropdownlist_div_1_label_1_Template, 2, 0, "label", 3);
|
|
5356
|
+
i0.ɵɵelementStart(2, "select", 4);
|
|
5357
|
+
i0.ɵɵtemplate(3, CountryDropdownlist_div_1_option_3_Template, 2, 2, "option", 5);
|
|
5358
|
+
i0.ɵɵelementEnd()();
|
|
5359
|
+
} if (rf & 2) {
|
|
5360
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
|
5361
|
+
i0.ɵɵproperty("formGroup", ctx_r1.formGroup);
|
|
5362
|
+
i0.ɵɵadvance();
|
|
5363
|
+
i0.ɵɵproperty("ngIf", ctx_r1.isTitleVisible);
|
|
5364
|
+
i0.ɵɵadvance();
|
|
5365
|
+
i0.ɵɵproperty("formControlName", ctx_r1.controlName);
|
|
5366
|
+
i0.ɵɵadvance();
|
|
5367
|
+
i0.ɵɵproperty("ngForOf", ctx_r1.items);
|
|
5368
|
+
} }
|
|
5369
|
+
class CountryDropdownlist extends EditComponentBase {
|
|
5370
|
+
constructor(api, appContext) {
|
|
5371
|
+
super();
|
|
5372
|
+
this.api = api;
|
|
5373
|
+
this.appContext = appContext;
|
|
5374
|
+
this.title = 'Country';
|
|
5375
|
+
}
|
|
5376
|
+
ngOnInit() {
|
|
5377
|
+
this.setValues();
|
|
5378
|
+
}
|
|
5379
|
+
setValues() {
|
|
5380
|
+
this.api.getCountriesJsonFile(data => {
|
|
5381
|
+
this.items = data.reverse();
|
|
5382
|
+
});
|
|
5383
|
+
if (this.isNgModelBased) {
|
|
5384
|
+
}
|
|
5385
|
+
else {
|
|
5386
|
+
}
|
|
5387
|
+
}
|
|
5388
|
+
static { this.ɵfac = function CountryDropdownlist_Factory(t) { return new (t || CountryDropdownlist)(i0.ɵɵdirectiveInject(CoreApiService), i0.ɵɵdirectiveInject(AppContextService)); }; }
|
|
5389
|
+
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CountryDropdownlist, selectors: [["anatoly-country-dropdownlist"]], features: [i0.ɵɵInheritDefinitionFeature], decls: 2, vars: 2, consts: [[4, "ngIf"], [3, "formGroup", 4, "ngIf"], [3, "formGroup"], ["class", "col-form-label", 4, "ngIf"], [1, "form-select", 3, "formControlName"], [3, "value", 4, "ngFor", "ngForOf"], [1, "col-form-label"], [3, "value"]], template: function CountryDropdownlist_Template(rf, ctx) { if (rf & 1) {
|
|
5390
|
+
i0.ɵɵtemplate(0, CountryDropdownlist_div_0_Template, 1, 0, "div", 0)(1, CountryDropdownlist_div_1_Template, 4, 4, "div", 1);
|
|
5391
|
+
} if (rf & 2) {
|
|
5392
|
+
i0.ɵɵproperty("ngIf", ctx.isNgModelBased);
|
|
5393
|
+
i0.ɵɵadvance();
|
|
5394
|
+
i0.ɵɵproperty("ngIf", !ctx.isNgModelBased);
|
|
5395
|
+
} }, dependencies: [i1$2.NgForOf, i1$2.NgIf, i2.NgSelectOption, i2.ɵNgSelectMultipleOption, i2.SelectControlValueAccessor, i2.NgControlStatus, i2.NgControlStatusGroup, i2.FormGroupDirective, i2.FormControlName, NativeElementDirective], encapsulation: 2 }); }
|
|
5396
|
+
}
|
|
5397
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CountryDropdownlist, [{
|
|
5398
|
+
type: Component,
|
|
5399
|
+
args: [{ selector: 'anatoly-country-dropdownlist', template: "<div *ngIf='isNgModelBased'>\r\n</div>\r\n\r\n<div *ngIf='!isNgModelBased' [formGroup]='formGroup'>\r\n <label *ngIf='isTitleVisible' class='col-form-label'>Country</label>\r\n <select [formControlName]='controlName' class='form-select'>\r\n <option *ngFor='let item of items' [value]='item.code'>\r\n {{ item.name }}\r\n </option>\r\n </select>\r\n</div>\r\n" }]
|
|
5400
|
+
}], () => [{ type: CoreApiService }, { type: AppContextService }], null); })();
|
|
5401
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CountryDropdownlist, { className: "CountryDropdownlist", filePath: "lib\\ui\\components\\dropdownlists\\country\\country.dropdownlist.ts", lineNumber: 29 }); })();
|
|
5402
|
+
|
|
5403
|
+
/*
|
|
5404
|
+
<file>
|
|
5405
|
+
Project:
|
|
5406
|
+
@osovitny/anatoly
|
|
5407
|
+
|
|
5408
|
+
Authors:
|
|
5409
|
+
Vadim Osovitny vadim@osovitny.com
|
|
5410
|
+
Anatoly Osovitny anatoly@osovitny.com
|
|
5411
|
+
|
|
5412
|
+
Created:
|
|
5413
|
+
02 Aug 2022
|
|
5414
|
+
|
|
5415
|
+
Copyright (c) 2017-2022 Osovitny Inc. All rights reserved.
|
|
5416
|
+
</file>
|
|
5417
|
+
*/
|
|
5418
|
+
//Node
|
|
5419
|
+
function TimezoneDropdownlist_div_0_Template(rf, ctx) { if (rf & 1) {
|
|
5420
|
+
i0.ɵɵelement(0, "div");
|
|
5421
|
+
} }
|
|
5422
|
+
function TimezoneDropdownlist_div_1_label_1_Template(rf, ctx) { if (rf & 1) {
|
|
5423
|
+
i0.ɵɵelementStart(0, "label", 6);
|
|
5424
|
+
i0.ɵɵtext(1, "Timezone");
|
|
5425
|
+
i0.ɵɵelementEnd();
|
|
5426
|
+
} }
|
|
5427
|
+
function TimezoneDropdownlist_div_1_option_3_Template(rf, ctx) { if (rf & 1) {
|
|
5428
|
+
i0.ɵɵelementStart(0, "option", 7);
|
|
5429
|
+
i0.ɵɵtext(1);
|
|
5430
|
+
i0.ɵɵelementEnd();
|
|
5431
|
+
} if (rf & 2) {
|
|
5432
|
+
const item_r4 = ctx.$implicit;
|
|
5433
|
+
i0.ɵɵproperty("value", item_r4.code);
|
|
5434
|
+
i0.ɵɵadvance();
|
|
5435
|
+
i0.ɵɵtextInterpolate2(" (", item_r4.offset, ") ", item_r4.name, " ");
|
|
5436
|
+
} }
|
|
5437
|
+
function TimezoneDropdownlist_div_1_Template(rf, ctx) { if (rf & 1) {
|
|
5438
|
+
i0.ɵɵelementStart(0, "div", 2);
|
|
5439
|
+
i0.ɵɵtemplate(1, TimezoneDropdownlist_div_1_label_1_Template, 2, 0, "label", 3);
|
|
5440
|
+
i0.ɵɵelementStart(2, "select", 4);
|
|
5441
|
+
i0.ɵɵtemplate(3, TimezoneDropdownlist_div_1_option_3_Template, 2, 3, "option", 5);
|
|
5442
|
+
i0.ɵɵelementEnd()();
|
|
5443
|
+
} if (rf & 2) {
|
|
5444
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
|
5445
|
+
i0.ɵɵproperty("formGroup", ctx_r1.formGroup);
|
|
5446
|
+
i0.ɵɵadvance();
|
|
5447
|
+
i0.ɵɵproperty("ngIf", ctx_r1.isTitleVisible);
|
|
5448
|
+
i0.ɵɵadvance();
|
|
5449
|
+
i0.ɵɵproperty("formControlName", ctx_r1.controlName);
|
|
5450
|
+
i0.ɵɵadvance();
|
|
5451
|
+
i0.ɵɵproperty("ngForOf", ctx_r1.items);
|
|
5452
|
+
} }
|
|
5453
|
+
class TimezoneDropdownlist extends EditComponentBase {
|
|
5454
|
+
constructor(api, appContext) {
|
|
5455
|
+
super();
|
|
5456
|
+
this.api = api;
|
|
5457
|
+
this.appContext = appContext;
|
|
5458
|
+
this.title = 'Timezone';
|
|
5459
|
+
}
|
|
5460
|
+
ngOnInit() {
|
|
5461
|
+
this.setValues();
|
|
5462
|
+
}
|
|
5463
|
+
setValues() {
|
|
5464
|
+
this.api.getTimezonesJsonFile(data => {
|
|
5465
|
+
this.items = data.reverse();
|
|
5466
|
+
});
|
|
5181
5467
|
if (this.isNgModelBased) {
|
|
5182
5468
|
}
|
|
5183
5469
|
else {
|
|
@@ -5231,12 +5517,12 @@ class TimezoneDropdownlist extends EditComponentBase {
|
|
|
5231
5517
|
</file>
|
|
5232
5518
|
*/
|
|
5233
5519
|
//Node
|
|
5234
|
-
const _c0$
|
|
5520
|
+
const _c0$8 = [[["mex-card-header"]], [["mex-card-body"]], "*", [["mex-card-footer"]]];
|
|
5235
5521
|
const _c1 = ["mex-card-header", "mex-card-body", "*", "mex-card-footer"];
|
|
5236
5522
|
class CardComponent extends ComponentBase {
|
|
5237
5523
|
static { this.ɵfac = /*@__PURE__*/ (() => { let ɵCardComponent_BaseFactory; return function CardComponent_Factory(t) { return (ɵCardComponent_BaseFactory || (ɵCardComponent_BaseFactory = i0.ɵɵgetInheritedFactory(CardComponent)))(t || CardComponent); }; })(); }
|
|
5238
5524
|
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CardComponent, selectors: [["anatoly-card"]], features: [i0.ɵɵInheritDefinitionFeature], ngContentSelectors: _c1, decls: 5, vars: 3, template: function CardComponent_Template(rf, ctx) { if (rf & 1) {
|
|
5239
|
-
i0.ɵɵprojectionDef(_c0$
|
|
5525
|
+
i0.ɵɵprojectionDef(_c0$8);
|
|
5240
5526
|
i0.ɵɵelementStart(0, "div");
|
|
5241
5527
|
i0.ɵɵprojection(1);
|
|
5242
5528
|
i0.ɵɵprojection(2, 1);
|
|
@@ -5278,10 +5564,10 @@ function CardHeaderComponent_h3_1_Template(rf, ctx) { if (rf & 1) {
|
|
|
5278
5564
|
i0.ɵɵadvance();
|
|
5279
5565
|
i0.ɵɵtextInterpolate(ctx_r0.title);
|
|
5280
5566
|
} }
|
|
5281
|
-
const _c0$
|
|
5567
|
+
const _c0$7 = ["*"];
|
|
5282
5568
|
class CardHeaderComponent extends ComponentBase {
|
|
5283
5569
|
static { this.ɵfac = /*@__PURE__*/ (() => { let ɵCardHeaderComponent_BaseFactory; return function CardHeaderComponent_Factory(t) { return (ɵCardHeaderComponent_BaseFactory || (ɵCardHeaderComponent_BaseFactory = i0.ɵɵgetInheritedFactory(CardHeaderComponent)))(t || CardHeaderComponent); }; })(); }
|
|
5284
|
-
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CardHeaderComponent, selectors: [["anatoly-card-header"]], features: [i0.ɵɵInheritDefinitionFeature], ngContentSelectors: _c0$
|
|
5570
|
+
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CardHeaderComponent, selectors: [["anatoly-card-header"]], features: [i0.ɵɵInheritDefinitionFeature], ngContentSelectors: _c0$7, decls: 3, vars: 4, consts: [["class", "card-title", 4, "ngIf"], [1, "card-title"]], template: function CardHeaderComponent_Template(rf, ctx) { if (rf & 1) {
|
|
5285
5571
|
i0.ɵɵprojectionDef();
|
|
5286
5572
|
i0.ɵɵelementStart(0, "div");
|
|
5287
5573
|
i0.ɵɵtemplate(1, CardHeaderComponent_h3_1_Template, 2, 1, "h3", 0);
|
|
@@ -5315,10 +5601,10 @@ class CardHeaderComponent extends ComponentBase {
|
|
|
5315
5601
|
</file>
|
|
5316
5602
|
*/
|
|
5317
5603
|
//Node
|
|
5318
|
-
const _c0$
|
|
5604
|
+
const _c0$6 = ["*"];
|
|
5319
5605
|
class CardBodyComponent extends ComponentBase {
|
|
5320
5606
|
static { this.ɵfac = /*@__PURE__*/ (() => { let ɵCardBodyComponent_BaseFactory; return function CardBodyComponent_Factory(t) { return (ɵCardBodyComponent_BaseFactory || (ɵCardBodyComponent_BaseFactory = i0.ɵɵgetInheritedFactory(CardBodyComponent)))(t || CardBodyComponent); }; })(); }
|
|
5321
|
-
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CardBodyComponent, selectors: [["anatoly-card-body"]], features: [i0.ɵɵInheritDefinitionFeature], ngContentSelectors: _c0$
|
|
5607
|
+
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CardBodyComponent, selectors: [["anatoly-card-body"]], features: [i0.ɵɵInheritDefinitionFeature], ngContentSelectors: _c0$6, decls: 2, vars: 3, template: function CardBodyComponent_Template(rf, ctx) { if (rf & 1) {
|
|
5322
5608
|
i0.ɵɵprojectionDef();
|
|
5323
5609
|
i0.ɵɵelementStart(0, "div");
|
|
5324
5610
|
i0.ɵɵprojection(1);
|
|
@@ -5349,10 +5635,10 @@ class CardBodyComponent extends ComponentBase {
|
|
|
5349
5635
|
</file>
|
|
5350
5636
|
*/
|
|
5351
5637
|
//Node
|
|
5352
|
-
const _c0$
|
|
5638
|
+
const _c0$5 = ["*"];
|
|
5353
5639
|
class CardFooterComponent extends ComponentBase {
|
|
5354
5640
|
static { this.ɵfac = /*@__PURE__*/ (() => { let ɵCardFooterComponent_BaseFactory; return function CardFooterComponent_Factory(t) { return (ɵCardFooterComponent_BaseFactory || (ɵCardFooterComponent_BaseFactory = i0.ɵɵgetInheritedFactory(CardFooterComponent)))(t || CardFooterComponent); }; })(); }
|
|
5355
|
-
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CardFooterComponent, selectors: [["anatoly-card-footer"]], features: [i0.ɵɵInheritDefinitionFeature], ngContentSelectors: _c0$
|
|
5641
|
+
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CardFooterComponent, selectors: [["anatoly-card-footer"]], features: [i0.ɵɵInheritDefinitionFeature], ngContentSelectors: _c0$5, decls: 2, vars: 3, template: function CardFooterComponent_Template(rf, ctx) { if (rf & 1) {
|
|
5356
5642
|
i0.ɵɵprojectionDef();
|
|
5357
5643
|
i0.ɵɵelementStart(0, "div");
|
|
5358
5644
|
i0.ɵɵprojection(1);
|
|
@@ -5541,174 +5827,6 @@ class HtmlEditorComponentBase extends EditComponentBase {
|
|
|
5541
5827
|
}] }); })();
|
|
5542
5828
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(HtmlEditorComponentBase, { className: "HtmlEditorComponentBase", filePath: "lib\\ui\\components\\html-editor\\base-html-editor.component.ts", lineNumber: 31 }); })();
|
|
5543
5829
|
|
|
5544
|
-
/*
|
|
5545
|
-
<file>
|
|
5546
|
-
Project:
|
|
5547
|
-
@osovitny/anatoly
|
|
5548
|
-
|
|
5549
|
-
Authors:
|
|
5550
|
-
Vadim Osovitny vadim@osovitny.com
|
|
5551
|
-
Anatoly Osovitny anatoly@osovitny.com
|
|
5552
|
-
|
|
5553
|
-
Created:
|
|
5554
|
-
8 Dec 2017
|
|
5555
|
-
|
|
5556
|
-
Copyright (c) 2016-2022 Osovitny Inc. All rights reserved.
|
|
5557
|
-
</file>
|
|
5558
|
-
*/
|
|
5559
|
-
//Node
|
|
5560
|
-
class ValidationSummaryComponent extends EditComponentBase {
|
|
5561
|
-
constructor() {
|
|
5562
|
-
super();
|
|
5563
|
-
}
|
|
5564
|
-
getControlTitle(control, name) {
|
|
5565
|
-
if (control?.nativeElement) {
|
|
5566
|
-
let value = this.getTitleAttribute(control.nativeElement);
|
|
5567
|
-
return value ? value : name;
|
|
5568
|
-
}
|
|
5569
|
-
return undefined;
|
|
5570
|
-
}
|
|
5571
|
-
getTitleAttribute(nativeElement) {
|
|
5572
|
-
let title;
|
|
5573
|
-
let element;
|
|
5574
|
-
let tagName = nativeElement.tagName;
|
|
5575
|
-
switch (tagName) {
|
|
5576
|
-
// For Kendo time and date picker element title is assigned to the 4th child control.
|
|
5577
|
-
case "KENDO-TIMEPICKER":
|
|
5578
|
-
case "KENDO-DATEPICKER":
|
|
5579
|
-
element = nativeElement.children[0]?.children[0]?.children[0]?.children[0];
|
|
5580
|
-
break;
|
|
5581
|
-
// For Kendo numaric element title is assigned to the 2nd child control.
|
|
5582
|
-
case "KENDO-NUMERICTEXTBOX":
|
|
5583
|
-
element = nativeElement.children[0]?.children[0];
|
|
5584
|
-
break;
|
|
5585
|
-
default:
|
|
5586
|
-
element = nativeElement;
|
|
5587
|
-
break;
|
|
5588
|
-
}
|
|
5589
|
-
if (element) {
|
|
5590
|
-
title = element.getAttribute("formControlTitle");
|
|
5591
|
-
if (!title) {
|
|
5592
|
-
title = element.getAttribute("title");
|
|
5593
|
-
}
|
|
5594
|
-
}
|
|
5595
|
-
return title;
|
|
5596
|
-
}
|
|
5597
|
-
getFormValidationMessages() {
|
|
5598
|
-
let messages = [];
|
|
5599
|
-
Object.keys(this.formGroup.controls).forEach((k) => {
|
|
5600
|
-
let control = this.formGroup.controls[k];
|
|
5601
|
-
if (control.controls != null) {
|
|
5602
|
-
Object.keys(control.controls).forEach((k) => {
|
|
5603
|
-
var child = control.controls[k];
|
|
5604
|
-
this.getValidationMessages(child, this.getControlTitle(child, k)).forEach((m) => messages.push(m));
|
|
5605
|
-
});
|
|
5606
|
-
}
|
|
5607
|
-
else {
|
|
5608
|
-
this.getValidationMessages(control, this.getControlTitle(control, k)).forEach((m) => messages.push(m));
|
|
5609
|
-
}
|
|
5610
|
-
});
|
|
5611
|
-
return messages;
|
|
5612
|
-
}
|
|
5613
|
-
getValidationMessages(control, title) {
|
|
5614
|
-
let messages = [];
|
|
5615
|
-
let thing;
|
|
5616
|
-
if (title) {
|
|
5617
|
-
thing = title;
|
|
5618
|
-
}
|
|
5619
|
-
else {
|
|
5620
|
-
thing = this.getControlTitle(control, null);
|
|
5621
|
-
if (!thing) {
|
|
5622
|
-
thing = control.path;
|
|
5623
|
-
}
|
|
5624
|
-
}
|
|
5625
|
-
if (control.errors) {
|
|
5626
|
-
for (let errorName in control.errors) {
|
|
5627
|
-
if (control.errors.hasOwnProperty(errorName)) {
|
|
5628
|
-
switch (errorName) {
|
|
5629
|
-
case "required":
|
|
5630
|
-
messages.push(`${thing} is required`);
|
|
5631
|
-
break;
|
|
5632
|
-
case "minlength":
|
|
5633
|
-
messages.push(`${thing} must be at least ${control.errors["minlength"].requiredLength} characters`);
|
|
5634
|
-
break;
|
|
5635
|
-
case "pattern":
|
|
5636
|
-
messages.push(`${thing} contains illegal characters`);
|
|
5637
|
-
break;
|
|
5638
|
-
case "format":
|
|
5639
|
-
messages.push(`${thing} format mismatch`);
|
|
5640
|
-
break;
|
|
5641
|
-
case "maxlength":
|
|
5642
|
-
messages.push(`${thing} must have maximum ${control.errors["maxlength"].requiredLength} characters`);
|
|
5643
|
-
break;
|
|
5644
|
-
case "specialcharacters":
|
|
5645
|
-
messages.push(`${thing} contains special characters`);
|
|
5646
|
-
break;
|
|
5647
|
-
}
|
|
5648
|
-
}
|
|
5649
|
-
}
|
|
5650
|
-
}
|
|
5651
|
-
return messages;
|
|
5652
|
-
}
|
|
5653
|
-
static { this.ɵfac = function ValidationSummaryComponent_Factory(t) { return new (t || ValidationSummaryComponent)(); }; }
|
|
5654
|
-
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ValidationSummaryComponent, selectors: [["ng-component"]], features: [i0.ɵɵInheritDefinitionFeature], decls: 0, vars: 0, template: function ValidationSummaryComponent_Template(rf, ctx) { }, encapsulation: 2 }); }
|
|
5655
|
-
}
|
|
5656
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ValidationSummaryComponent, [{
|
|
5657
|
-
type: Component,
|
|
5658
|
-
args: [{
|
|
5659
|
-
template: ''
|
|
5660
|
-
}]
|
|
5661
|
-
}], () => [], null); })();
|
|
5662
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ValidationSummaryComponent, { className: "ValidationSummaryComponent", filePath: "lib\\ui\\validation\\validation-summary.component.ts", lineNumber: 27 }); })();
|
|
5663
|
-
|
|
5664
|
-
/*
|
|
5665
|
-
<file>
|
|
5666
|
-
Project:
|
|
5667
|
-
@osovitny/anatoly
|
|
5668
|
-
|
|
5669
|
-
Authors:
|
|
5670
|
-
Vadim Osovitny vadim@osovitny.com
|
|
5671
|
-
Anatoly Osovitny anatoly@osovitny.com
|
|
5672
|
-
|
|
5673
|
-
Created:
|
|
5674
|
-
6 Dec 2017
|
|
5675
|
-
|
|
5676
|
-
Copyright (c) 2016-2022 Osovitny Inc. All rights reserved.
|
|
5677
|
-
</file>
|
|
5678
|
-
*/
|
|
5679
|
-
//Node
|
|
5680
|
-
function ItemValidationSummaryComponent_ul_0_li_1_Template(rf, ctx) { if (rf & 1) {
|
|
5681
|
-
i0.ɵɵelementStart(0, "li")(1, "span", 3);
|
|
5682
|
-
i0.ɵɵtext(2);
|
|
5683
|
-
i0.ɵɵelementEnd()();
|
|
5684
|
-
} if (rf & 2) {
|
|
5685
|
-
const error_r2 = ctx.$implicit;
|
|
5686
|
-
i0.ɵɵadvance(2);
|
|
5687
|
-
i0.ɵɵtextInterpolate(error_r2);
|
|
5688
|
-
} }
|
|
5689
|
-
function ItemValidationSummaryComponent_ul_0_Template(rf, ctx) { if (rf & 1) {
|
|
5690
|
-
i0.ɵɵelementStart(0, "ul", 1);
|
|
5691
|
-
i0.ɵɵtemplate(1, ItemValidationSummaryComponent_ul_0_li_1_Template, 3, 1, "li", 2);
|
|
5692
|
-
i0.ɵɵelementEnd();
|
|
5693
|
-
} if (rf & 2) {
|
|
5694
|
-
const ctx_r0 = i0.ɵɵnextContext();
|
|
5695
|
-
i0.ɵɵadvance();
|
|
5696
|
-
i0.ɵɵproperty("ngForOf", ctx_r0.getValidationMessages(ctx_r0.formGroup.controls[ctx_r0.controlName]));
|
|
5697
|
-
} }
|
|
5698
|
-
class ItemValidationSummaryComponent extends ValidationSummaryComponent {
|
|
5699
|
-
static { this.ɵfac = /*@__PURE__*/ (() => { let ɵItemValidationSummaryComponent_BaseFactory; return function ItemValidationSummaryComponent_Factory(t) { return (ɵItemValidationSummaryComponent_BaseFactory || (ɵItemValidationSummaryComponent_BaseFactory = i0.ɵɵgetInheritedFactory(ItemValidationSummaryComponent)))(t || ItemValidationSummaryComponent); }; })(); }
|
|
5700
|
-
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ItemValidationSummaryComponent, selectors: [["anatoly-item-validation-summary"]], features: [i0.ɵɵInheritDefinitionFeature], decls: 1, vars: 1, consts: [["class", "list-unstyled", 4, "ngIf"], [1, "list-unstyled"], [4, "ngFor", "ngForOf"], [1, "help-block"]], template: function ItemValidationSummaryComponent_Template(rf, ctx) { if (rf & 1) {
|
|
5701
|
-
i0.ɵɵtemplate(0, ItemValidationSummaryComponent_ul_0_Template, 2, 1, "ul", 0);
|
|
5702
|
-
} if (rf & 2) {
|
|
5703
|
-
i0.ɵɵproperty("ngIf", ctx.isControlInvalid(ctx.controlName));
|
|
5704
|
-
} }, dependencies: [i1$2.NgForOf, i1$2.NgIf], encapsulation: 2 }); }
|
|
5705
|
-
}
|
|
5706
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ItemValidationSummaryComponent, [{
|
|
5707
|
-
type: Component,
|
|
5708
|
-
args: [{ selector: "anatoly-item-validation-summary", template: "<ul class=\"list-unstyled\" *ngIf=\"isControlInvalid(controlName)\">\r\n <li *ngFor=\"let error of getValidationMessages(formGroup.controls[controlName])\">\r\n <span class=\"help-block\">{{ error }}</span>\r\n </li>\r\n</ul>\r\n\r\n" }]
|
|
5709
|
-
}], null, null); })();
|
|
5710
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ItemValidationSummaryComponent, { className: "ItemValidationSummaryComponent", filePath: "lib\\ui\\validation\\item-validation-summary.component.ts", lineNumber: 27 }); })();
|
|
5711
|
-
|
|
5712
5830
|
/*
|
|
5713
5831
|
<file>
|
|
5714
5832
|
Project:
|
|
@@ -5725,7 +5843,7 @@ class ItemValidationSummaryComponent extends ValidationSummaryComponent {
|
|
|
5725
5843
|
</file>
|
|
5726
5844
|
*/
|
|
5727
5845
|
//Node
|
|
5728
|
-
const _c0$
|
|
5846
|
+
const _c0$4 = a0 => ({ "has-error": a0 });
|
|
5729
5847
|
class FormsHtmlEditorComponent extends HtmlEditorComponentBase {
|
|
5730
5848
|
constructor() {
|
|
5731
5849
|
super();
|
|
@@ -5747,7 +5865,7 @@ class FormsHtmlEditorComponent extends HtmlEditorComponentBase {
|
|
|
5747
5865
|
i0.ɵɵelement(4, "anatoly-item-validation-summary", 3);
|
|
5748
5866
|
i0.ɵɵelementEnd();
|
|
5749
5867
|
} if (rf & 2) {
|
|
5750
|
-
i0.ɵɵproperty("formGroup", ctx.formGroup)("ngClass", i0.ɵɵpureFunction1(8, _c0$
|
|
5868
|
+
i0.ɵɵproperty("formGroup", ctx.formGroup)("ngClass", i0.ɵɵpureFunction1(8, _c0$4, ctx.isControlInvalid(ctx.editorFormKey)));
|
|
5751
5869
|
i0.ɵɵadvance(2);
|
|
5752
5870
|
i0.ɵɵtextInterpolate(ctx.editorLabelText);
|
|
5753
5871
|
i0.ɵɵadvance();
|
|
@@ -5962,7 +6080,7 @@ function ContactUsForm_button_38_Template(rf, ctx) { if (rf & 1) {
|
|
|
5962
6080
|
const ctx_r2 = i0.ɵɵnextContext();
|
|
5963
6081
|
i0.ɵɵclassProp("btn-primary", !ctx_r2.formGroup.invalid);
|
|
5964
6082
|
} }
|
|
5965
|
-
const _c0$
|
|
6083
|
+
const _c0$3 = a0 => ({ "has-error": a0 });
|
|
5966
6084
|
class ContactUsForm extends EditComponentBase {
|
|
5967
6085
|
constructor(reCaptcha, fb, appContext, api, notificationService) {
|
|
5968
6086
|
super();
|
|
@@ -6086,27 +6204,27 @@ class ContactUsForm extends EditComponentBase {
|
|
|
6086
6204
|
i0.ɵɵadvance();
|
|
6087
6205
|
i0.ɵɵproperty("formGroup", ctx.formGroup)("visible", ctx.formSubmitted && ctx.formGroup.invalid);
|
|
6088
6206
|
i0.ɵɵadvance(6);
|
|
6089
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(21, _c0$
|
|
6207
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(21, _c0$3, ctx.isControlInvalid("topic")));
|
|
6090
6208
|
i0.ɵɵadvance(5);
|
|
6091
6209
|
i0.ɵɵproperty("ngForOf", ctx.topicList);
|
|
6092
6210
|
i0.ɵɵadvance();
|
|
6093
6211
|
i0.ɵɵproperty("formGroup", ctx.formGroup)("formSubmitted", ctx.formSubmitted);
|
|
6094
6212
|
i0.ɵɵadvance();
|
|
6095
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(23, _c0$
|
|
6213
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(23, _c0$3, ctx.isControlInvalid("name")));
|
|
6096
6214
|
i0.ɵɵadvance(4);
|
|
6097
6215
|
i0.ɵɵproperty("formGroup", ctx.formGroup)("formSubmitted", ctx.formSubmitted);
|
|
6098
6216
|
i0.ɵɵadvance();
|
|
6099
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(25, _c0$
|
|
6217
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(25, _c0$3, ctx.isControlInvalid("email")));
|
|
6100
6218
|
i0.ɵɵadvance(4);
|
|
6101
6219
|
i0.ɵɵproperty("ngIf", !ctx.isUserSignedIn);
|
|
6102
6220
|
i0.ɵɵadvance();
|
|
6103
6221
|
i0.ɵɵproperty("formGroup", ctx.formGroup)("formSubmitted", ctx.formSubmitted);
|
|
6104
6222
|
i0.ɵɵadvance();
|
|
6105
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(27, _c0$
|
|
6223
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(27, _c0$3, ctx.isControlInvalid("subject")));
|
|
6106
6224
|
i0.ɵɵadvance(4);
|
|
6107
6225
|
i0.ɵɵproperty("formGroup", ctx.formGroup)("formSubmitted", ctx.formSubmitted);
|
|
6108
6226
|
i0.ɵɵadvance(2);
|
|
6109
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(29, _c0$
|
|
6227
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(29, _c0$3, ctx.isControlInvalid("message")));
|
|
6110
6228
|
i0.ɵɵadvance(4);
|
|
6111
6229
|
i0.ɵɵproperty("formGroup", ctx.formGroup)("formSubmitted", ctx.formSubmitted);
|
|
6112
6230
|
i0.ɵɵadvance(3);
|
|
@@ -6139,7 +6257,7 @@ class ContactUsForm extends EditComponentBase {
|
|
|
6139
6257
|
</file>
|
|
6140
6258
|
*/
|
|
6141
6259
|
//Node
|
|
6142
|
-
const _c0$
|
|
6260
|
+
const _c0$2 = ["contactusform"];
|
|
6143
6261
|
function ContactUsDialog_kendo_dialog_0_Template(rf, ctx) { if (rf & 1) {
|
|
6144
6262
|
const _r3 = i0.ɵɵgetCurrentView();
|
|
6145
6263
|
i0.ɵɵelementStart(0, "kendo-dialog", 1);
|
|
@@ -6176,7 +6294,7 @@ class ContactUsDialog extends DialogBase {
|
|
|
6176
6294
|
}
|
|
6177
6295
|
static { this.ɵfac = function ContactUsDialog_Factory(t) { return new (t || ContactUsDialog)(); }; }
|
|
6178
6296
|
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ContactUsDialog, selectors: [["anatoly-contactus-dialog"]], viewQuery: function ContactUsDialog_Query(rf, ctx) { if (rf & 1) {
|
|
6179
|
-
i0.ɵɵviewQuery(_c0$
|
|
6297
|
+
i0.ɵɵviewQuery(_c0$2, 5);
|
|
6180
6298
|
} if (rf & 2) {
|
|
6181
6299
|
let _t;
|
|
6182
6300
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.contactUsForm = _t.first);
|
|
@@ -6308,7 +6426,7 @@ function AddressComponent_div_17_option_4_Template(rf, ctx) { if (rf & 1) {
|
|
|
6308
6426
|
i0.ɵɵadvance();
|
|
6309
6427
|
i0.ɵɵtextInterpolate(state_r4.name);
|
|
6310
6428
|
} }
|
|
6311
|
-
const _c0$
|
|
6429
|
+
const _c0$1 = a0 => ({ "has-error": a0 });
|
|
6312
6430
|
function AddressComponent_div_17_Template(rf, ctx) { if (rf & 1) {
|
|
6313
6431
|
const _r6 = i0.ɵɵgetCurrentView();
|
|
6314
6432
|
i0.ɵɵelementStart(0, "div", 9)(1, "label", 4);
|
|
@@ -6322,7 +6440,7 @@ function AddressComponent_div_17_Template(rf, ctx) { if (rf & 1) {
|
|
|
6322
6440
|
i0.ɵɵelementEnd();
|
|
6323
6441
|
} if (rf & 2) {
|
|
6324
6442
|
const ctx_r1 = i0.ɵɵnextContext();
|
|
6325
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(4, _c0$
|
|
6443
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(4, _c0$1, ctx_r1.isControlInvalid("address_stateOrRegion")));
|
|
6326
6444
|
i0.ɵɵadvance(4);
|
|
6327
6445
|
i0.ɵɵproperty("ngForOf", ctx_r1.usStateData);
|
|
6328
6446
|
i0.ɵɵadvance();
|
|
@@ -6464,25 +6582,25 @@ class AddressComponent extends EditComponentBase {
|
|
|
6464
6582
|
i0.ɵɵadvance(2);
|
|
6465
6583
|
i0.ɵɵproperty("formGroup", ctx.formGroup);
|
|
6466
6584
|
i0.ɵɵadvance();
|
|
6467
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(19, _c0$
|
|
6585
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(19, _c0$1, ctx.isControlInvalid("address_street")));
|
|
6468
6586
|
i0.ɵɵadvance(4);
|
|
6469
6587
|
i0.ɵɵproperty("formGroup", ctx.formGroup)("formSubmitted", ctx.formSubmitted);
|
|
6470
6588
|
i0.ɵɵadvance();
|
|
6471
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(21, _c0$
|
|
6589
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(21, _c0$1, ctx.isControlInvalid("address_street2")));
|
|
6472
6590
|
i0.ɵɵadvance(2);
|
|
6473
6591
|
i0.ɵɵproperty("formGroup", ctx.formGroup)("formSubmitted", ctx.formSubmitted);
|
|
6474
6592
|
i0.ɵɵadvance();
|
|
6475
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(23, _c0$
|
|
6593
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(23, _c0$1, ctx.isControlInvalid("address_city")));
|
|
6476
6594
|
i0.ɵɵadvance(4);
|
|
6477
6595
|
i0.ɵɵproperty("formGroup", ctx.formGroup)("formSubmitted", ctx.formSubmitted);
|
|
6478
6596
|
i0.ɵɵadvance();
|
|
6479
6597
|
i0.ɵɵproperty("ngIf", ctx.formGroup.value.address_country == "US");
|
|
6480
6598
|
i0.ɵɵadvance();
|
|
6481
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(25, _c0$
|
|
6599
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(25, _c0$1, ctx.isControlInvalid("address_zipcode")));
|
|
6482
6600
|
i0.ɵɵadvance(4);
|
|
6483
6601
|
i0.ɵɵproperty("formGroup", ctx.formGroup)("formSubmitted", ctx.formSubmitted);
|
|
6484
6602
|
i0.ɵɵadvance();
|
|
6485
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(27, _c0$
|
|
6603
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(27, _c0$1, ctx.isControlInvalid("address_country")));
|
|
6486
6604
|
i0.ɵɵadvance(4);
|
|
6487
6605
|
i0.ɵɵproperty("ngForOf", ctx.countryData);
|
|
6488
6606
|
i0.ɵɵadvance();
|
|
@@ -6521,7 +6639,7 @@ function CompanyComponent_anatoly_card_header_1_Template(rf, ctx) { if (rf & 1)
|
|
|
6521
6639
|
const ctx_r0 = i0.ɵɵnextContext();
|
|
6522
6640
|
i0.ɵɵproperty("title", ctx_r0.title);
|
|
6523
6641
|
} }
|
|
6524
|
-
const _c0
|
|
6642
|
+
const _c0 = a0 => ({ "has-error": a0 });
|
|
6525
6643
|
class CompanyComponent extends EditComponentBase {
|
|
6526
6644
|
//Inputs
|
|
6527
6645
|
get company() {
|
|
@@ -6601,19 +6719,19 @@ class CompanyComponent extends EditComponentBase {
|
|
|
6601
6719
|
i0.ɵɵadvance(2);
|
|
6602
6720
|
i0.ɵɵproperty("formGroup", ctx.formGroup);
|
|
6603
6721
|
i0.ɵɵadvance();
|
|
6604
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(14, _c0
|
|
6722
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(14, _c0, ctx.isControlInvalid("company_name")));
|
|
6605
6723
|
i0.ɵɵadvance(4);
|
|
6606
6724
|
i0.ɵɵproperty("formGroup", ctx.formGroup)("formSubmitted", ctx.formSubmitted);
|
|
6607
6725
|
i0.ɵɵadvance();
|
|
6608
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(16, _c0
|
|
6726
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(16, _c0, ctx.isControlInvalid("company_phone")));
|
|
6609
6727
|
i0.ɵɵadvance(4);
|
|
6610
6728
|
i0.ɵɵproperty("formGroup", ctx.formGroup)("formSubmitted", ctx.formSubmitted);
|
|
6611
6729
|
i0.ɵɵadvance();
|
|
6612
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(18, _c0
|
|
6730
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(18, _c0, ctx.isControlInvalid("company_email")));
|
|
6613
6731
|
i0.ɵɵadvance(4);
|
|
6614
6732
|
i0.ɵɵproperty("formGroup", ctx.formGroup)("formSubmitted", ctx.formSubmitted);
|
|
6615
6733
|
i0.ɵɵadvance();
|
|
6616
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(20, _c0
|
|
6734
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(20, _c0, ctx.isControlInvalid("company_websiteUrl")));
|
|
6617
6735
|
i0.ɵɵadvance(4);
|
|
6618
6736
|
i0.ɵɵproperty("formGroup", ctx.formGroup)("formSubmitted", ctx.formSubmitted);
|
|
6619
6737
|
} }, dependencies: [i1$2.NgClass, i1$2.NgIf, i2.DefaultValueAccessor, i2.NgControlStatus, i2.NgControlStatusGroup, i2.PatternValidator, i2.FormGroupDirective, i2.FormControlName, CardComponent, CardHeaderComponent, CardBodyComponent, NativeElementDirective, ItemValidationSummaryComponent], encapsulation: 2 }); }
|
|
@@ -6626,122 +6744,6 @@ class CompanyComponent extends EditComponentBase {
|
|
|
6626
6744
|
}] }); })();
|
|
6627
6745
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CompanyComponent, { className: "CompanyComponent", filePath: "lib\\ui\\forms\\components\\company\\company.component.ts", lineNumber: 28 }); })();
|
|
6628
6746
|
|
|
6629
|
-
/*
|
|
6630
|
-
<file>
|
|
6631
|
-
Project:
|
|
6632
|
-
@osovitny/anatoly
|
|
6633
|
-
|
|
6634
|
-
Authors:
|
|
6635
|
-
Vadim Osovitny vadim@osovitny.com
|
|
6636
|
-
Anatoly Osovitny anatoly@osovitny.com
|
|
6637
|
-
|
|
6638
|
-
Created:
|
|
6639
|
-
02 Aug 2022
|
|
6640
|
-
|
|
6641
|
-
Copyright (c) 2017-2022 Osovitny Inc. All rights reserved.
|
|
6642
|
-
</file>
|
|
6643
|
-
*/
|
|
6644
|
-
//Node
|
|
6645
|
-
function UrlSlugComponent_label_4_Template(rf, ctx) { if (rf & 1) {
|
|
6646
|
-
i0.ɵɵelementStart(0, "label", 7);
|
|
6647
|
-
i0.ɵɵtext(1);
|
|
6648
|
-
i0.ɵɵelementStart(2, "span", 8);
|
|
6649
|
-
i0.ɵɵtext(3);
|
|
6650
|
-
i0.ɵɵelementEnd()();
|
|
6651
|
-
} if (rf & 2) {
|
|
6652
|
-
const ctx_r0 = i0.ɵɵnextContext();
|
|
6653
|
-
i0.ɵɵadvance();
|
|
6654
|
-
i0.ɵɵtextInterpolate1(" ", ctx_r0.title, " ");
|
|
6655
|
-
i0.ɵɵadvance(2);
|
|
6656
|
-
i0.ɵɵtextInterpolate(ctx_r0.urlPrefix);
|
|
6657
|
-
} }
|
|
6658
|
-
function UrlSlugComponent_div_6_Template(rf, ctx) { if (rf & 1) {
|
|
6659
|
-
i0.ɵɵelementStart(0, "div", 9)(1, "a", 10);
|
|
6660
|
-
i0.ɵɵtext(2, "Go");
|
|
6661
|
-
i0.ɵɵelementEnd()();
|
|
6662
|
-
} if (rf & 2) {
|
|
6663
|
-
const ctx_r1 = i0.ɵɵnextContext();
|
|
6664
|
-
i0.ɵɵadvance();
|
|
6665
|
-
i0.ɵɵpropertyInterpolate2("href", "", ctx_r1.urlPrefix, "", ctx_r1.hrefGo, "", i0.ɵɵsanitizeUrl);
|
|
6666
|
-
} }
|
|
6667
|
-
const _c0 = a0 => ({ "has-error": a0 });
|
|
6668
|
-
class UrlSlugComponent extends EditComponentBase {
|
|
6669
|
-
constructor() {
|
|
6670
|
-
super();
|
|
6671
|
-
this.firstValue = true;
|
|
6672
|
-
this.isGoButtonVisible = true;
|
|
6673
|
-
//Outputs
|
|
6674
|
-
this.generating = new EventEmitter();
|
|
6675
|
-
this.title = 'Permalink';
|
|
6676
|
-
}
|
|
6677
|
-
ngOnInit() {
|
|
6678
|
-
this.startWatching();
|
|
6679
|
-
}
|
|
6680
|
-
generateUrlSlug(text) {
|
|
6681
|
-
let slugedText = Utils.slugify(text);
|
|
6682
|
-
let event = { urlSlug: slugedText };
|
|
6683
|
-
this.generating.emit(event);
|
|
6684
|
-
this.setFormValue(this.controlName, event.urlSlug);
|
|
6685
|
-
}
|
|
6686
|
-
startWatching() {
|
|
6687
|
-
this.subs.sink = this.formGroup.get(this.watchedControlName).valueChanges.subscribe({
|
|
6688
|
-
next: (value) => {
|
|
6689
|
-
if (this.firstValue) {
|
|
6690
|
-
this.firstValue = false;
|
|
6691
|
-
return;
|
|
6692
|
-
}
|
|
6693
|
-
this.generateUrlSlug(value);
|
|
6694
|
-
}
|
|
6695
|
-
});
|
|
6696
|
-
this.subs.sink = this.formGroup.get(this.controlName).valueChanges.subscribe({
|
|
6697
|
-
next: (value) => {
|
|
6698
|
-
this.hrefGo = value;
|
|
6699
|
-
}
|
|
6700
|
-
});
|
|
6701
|
-
}
|
|
6702
|
-
//Events
|
|
6703
|
-
onUrlSlugChange() {
|
|
6704
|
-
let text = this.getFormValue(this.controlName);
|
|
6705
|
-
this.generateUrlSlug(text);
|
|
6706
|
-
}
|
|
6707
|
-
static { this.ɵfac = function UrlSlugComponent_Factory(t) { return new (t || UrlSlugComponent)(); }; }
|
|
6708
|
-
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: UrlSlugComponent, selectors: [["anatoly-forms-urlslug"]], inputs: { urlPrefix: "urlPrefix", isGoButtonVisible: "isGoButtonVisible", watchedControlName: "watchedControlName" }, outputs: { generating: "generating" }, features: [i0.ɵɵInheritDefinitionFeature], decls: 7, vars: 13, consts: [[3, "formGroup", "ngClass"], [1, "d-flex", "align-items-end"], [3, "formGroup", "formSubmitted", "formControlName"], [1, "form-group"], ["class", "col-form-label", 4, "ngIf"], ["type", "text", "placeholder", "Type url slug here", 1, "form-control", 3, "formControlName", "focusout"], ["class", "form-group flex-shrink-1", 4, "ngIf"], [1, "col-form-label"], [1, "urlPrefix"], [1, "form-group", "flex-shrink-1"], ["target", "_blank", 1, "btn", "btn-primary", 3, "href"]], template: function UrlSlugComponent_Template(rf, ctx) { if (rf & 1) {
|
|
6709
|
-
i0.ɵɵelementStart(0, "div", 0)(1, "div", 1);
|
|
6710
|
-
i0.ɵɵelement(2, "anatoly-item-validation-summary", 2);
|
|
6711
|
-
i0.ɵɵelementStart(3, "div", 3);
|
|
6712
|
-
i0.ɵɵtemplate(4, UrlSlugComponent_label_4_Template, 4, 2, "label", 4);
|
|
6713
|
-
i0.ɵɵelementStart(5, "input", 5);
|
|
6714
|
-
i0.ɵɵlistener("focusout", function UrlSlugComponent_Template_input_focusout_5_listener() { return ctx.onUrlSlugChange(); });
|
|
6715
|
-
i0.ɵɵelementEnd()();
|
|
6716
|
-
i0.ɵɵtemplate(6, UrlSlugComponent_div_6_Template, 3, 2, "div", 6);
|
|
6717
|
-
i0.ɵɵelementEnd()();
|
|
6718
|
-
} if (rf & 2) {
|
|
6719
|
-
i0.ɵɵclassMapInterpolate1("permalink form-group ", ctx.classes, "");
|
|
6720
|
-
i0.ɵɵproperty("formGroup", ctx.formGroup)("ngClass", i0.ɵɵpureFunction1(11, _c0, ctx.isControlInvalid(ctx.controlName)));
|
|
6721
|
-
i0.ɵɵadvance(2);
|
|
6722
|
-
i0.ɵɵproperty("formGroup", ctx.formGroup)("formSubmitted", ctx.formSubmitted)("formControlName", ctx.controlName);
|
|
6723
|
-
i0.ɵɵadvance(2);
|
|
6724
|
-
i0.ɵɵproperty("ngIf", ctx.isTitleVisible);
|
|
6725
|
-
i0.ɵɵadvance();
|
|
6726
|
-
i0.ɵɵproperty("formControlName", ctx.controlName);
|
|
6727
|
-
i0.ɵɵadvance();
|
|
6728
|
-
i0.ɵɵproperty("ngIf", ctx.isGoButtonVisible);
|
|
6729
|
-
} }, dependencies: [i1$2.NgClass, i1$2.NgIf, i2.DefaultValueAccessor, i2.NgControlStatus, i2.NgControlStatusGroup, i2.FormGroupDirective, i2.FormControlName, NativeElementDirective, ItemValidationSummaryComponent], encapsulation: 2 }); }
|
|
6730
|
-
}
|
|
6731
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(UrlSlugComponent, [{
|
|
6732
|
-
type: Component,
|
|
6733
|
-
args: [{ selector: 'anatoly-forms-urlslug', template: "<div [formGroup]='formGroup' [ngClass]=\"{'has-error': isControlInvalid(controlName)}\"\r\n 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' class='col-form-label'>\r\n {{ title }}\r\n <span class=\"urlPrefix\">{{ urlPrefix }}</span>\r\n </label>\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" }]
|
|
6734
|
-
}], () => [], { urlPrefix: [{
|
|
6735
|
-
type: Input
|
|
6736
|
-
}], isGoButtonVisible: [{
|
|
6737
|
-
type: Input
|
|
6738
|
-
}], watchedControlName: [{
|
|
6739
|
-
type: Input
|
|
6740
|
-
}], generating: [{
|
|
6741
|
-
type: Output
|
|
6742
|
-
}] }); })();
|
|
6743
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(UrlSlugComponent, { className: "UrlSlugComponent", filePath: "lib\\ui\\forms\\components\\urlslug\\urlslug.component.ts", lineNumber: 28 }); })();
|
|
6744
|
-
|
|
6745
6747
|
/*
|
|
6746
6748
|
<file>
|
|
6747
6749
|
Project:
|
|
@@ -7530,6 +7532,7 @@ const COMPONENTS = [
|
|
|
7530
7532
|
PageSpinnerComponent,
|
|
7531
7533
|
LoadingComponent,
|
|
7532
7534
|
Copy2ClipboardComponent,
|
|
7535
|
+
UrlSlugComponent,
|
|
7533
7536
|
//Dropdownlists
|
|
7534
7537
|
CountryDropdownlist,
|
|
7535
7538
|
TimezoneDropdownlist,
|
|
@@ -7549,7 +7552,6 @@ const COMPONENTS = [
|
|
|
7549
7552
|
//Forms
|
|
7550
7553
|
AddressComponent,
|
|
7551
7554
|
CompanyComponent,
|
|
7552
|
-
UrlSlugComponent,
|
|
7553
7555
|
ContactUsForm,
|
|
7554
7556
|
//Pipes
|
|
7555
7557
|
SafeHtmlPipe,
|
|
@@ -7603,6 +7605,7 @@ class AnatolyUIModule {
|
|
|
7603
7605
|
PageSpinnerComponent,
|
|
7604
7606
|
LoadingComponent,
|
|
7605
7607
|
Copy2ClipboardComponent,
|
|
7608
|
+
UrlSlugComponent,
|
|
7606
7609
|
//Dropdownlists
|
|
7607
7610
|
CountryDropdownlist,
|
|
7608
7611
|
TimezoneDropdownlist,
|
|
@@ -7622,7 +7625,6 @@ class AnatolyUIModule {
|
|
|
7622
7625
|
//Forms
|
|
7623
7626
|
AddressComponent,
|
|
7624
7627
|
CompanyComponent,
|
|
7625
|
-
UrlSlugComponent,
|
|
7626
7628
|
ContactUsForm,
|
|
7627
7629
|
//Pipes
|
|
7628
7630
|
SafeHtmlPipe,
|
|
@@ -7648,6 +7650,7 @@ class AnatolyUIModule {
|
|
|
7648
7650
|
PageSpinnerComponent,
|
|
7649
7651
|
LoadingComponent,
|
|
7650
7652
|
Copy2ClipboardComponent,
|
|
7653
|
+
UrlSlugComponent,
|
|
7651
7654
|
//Dropdownlists
|
|
7652
7655
|
CountryDropdownlist,
|
|
7653
7656
|
TimezoneDropdownlist,
|
|
@@ -7667,7 +7670,6 @@ class AnatolyUIModule {
|
|
|
7667
7670
|
//Forms
|
|
7668
7671
|
AddressComponent,
|
|
7669
7672
|
CompanyComponent,
|
|
7670
|
-
UrlSlugComponent,
|
|
7671
7673
|
ContactUsForm,
|
|
7672
7674
|
//Pipes
|
|
7673
7675
|
SafeHtmlPipe,
|