@osovitny/anatoly 3.17.25 → 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.
@@ -5032,6 +5032,290 @@ class NativeElementDirective {
5032
5032
  }]
5033
5033
  }], () => [{ type: i0.ElementRef }, { type: i2.NgControl }], null); })();
5034
5034
 
5035
+ /*
5036
+ <file>
5037
+ Project:
5038
+ @osovitny/anatoly
5039
+
5040
+ Authors:
5041
+ Vadim Osovitny vadim@osovitny.com
5042
+ Anatoly Osovitny anatoly@osovitny.com
5043
+
5044
+ Created:
5045
+ 8 Dec 2017
5046
+
5047
+ Copyright (c) 2016-2022 Osovitny Inc. All rights reserved.
5048
+ </file>
5049
+ */
5050
+ //Node
5051
+ class ValidationSummaryComponent extends EditComponentBase {
5052
+ constructor() {
5053
+ super();
5054
+ }
5055
+ getControlTitle(control, name) {
5056
+ if (control?.nativeElement) {
5057
+ let value = this.getTitleAttribute(control.nativeElement);
5058
+ return value ? value : name;
5059
+ }
5060
+ return undefined;
5061
+ }
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
+ }
5101
+ });
5102
+ return messages;
5103
+ }
5104
+ getValidationMessages(control, title) {
5105
+ let messages = [];
5106
+ let thing;
5107
+ if (title) {
5108
+ thing = title;
5109
+ }
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
+ }
5141
+ }
5142
+ return messages;
5143
+ }
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 }); }
5146
+ }
5147
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ValidationSummaryComponent, [{
5148
+ type: Component,
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 }); })();
5154
+
5155
+ /*
5156
+ <file>
5157
+ Project:
5158
+ @osovitny/anatoly
5159
+
5160
+ Authors:
5161
+ Vadim Osovitny vadim@osovitny.com
5162
+ Anatoly Osovitny anatoly@osovitny.com
5163
+
5164
+ Created:
5165
+ 6 Dec 2017
5166
+
5167
+ Copyright (c) 2016-2022 Osovitny Inc. All rights reserved.
5168
+ </file>
5169
+ */
5170
+ //Node
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);
5179
+ } }
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);
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]));
5188
+ } }
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);
5221
+ i0.ɵɵtext(1);
5222
+ i0.ɵɵelementStart(2, "span", 8);
5223
+ i0.ɵɵtext(3);
5224
+ i0.ɵɵelementEnd()();
5225
+ } if (rf & 2) {
5226
+ const ctx_r0 = i0.ɵɵnextContext();
5227
+ i0.ɵɵadvance();
5228
+ i0.ɵɵtextInterpolate1(" ", ctx_r0.title, " ");
5229
+ i0.ɵɵadvance(2);
5230
+ i0.ɵɵtextInterpolate(ctx_r0.urlPrefix);
5231
+ } }
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");
5235
+ i0.ɵɵelementEnd()();
5236
+ } if (rf & 2) {
5237
+ const ctx_r1 = i0.ɵɵnextContext();
5238
+ i0.ɵɵadvance();
5239
+ i0.ɵɵpropertyInterpolate2("href", "", ctx_r1.urlPrefix, "", ctx_r1.hrefGo, "", i0.ɵɵsanitizeUrl);
5240
+ } }
5241
+ const _c0$9 = a0 => ({ "has-error": a0 });
5242
+ class UrlSlugComponent extends EditComponentBase {
5243
+ constructor() {
5244
+ super();
5245
+ this.firstValue = true;
5246
+ this.isGoButtonVisible = true;
5247
+ //Outputs
5248
+ this.generated = new EventEmitter();
5249
+ this.title = 'Permalink';
5250
+ }
5251
+ ngOnInit() {
5252
+ this.startWatching();
5253
+ }
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
+
5035
5319
  /*
5036
5320
  <file>
5037
5321
  Project:
@@ -5233,12 +5517,12 @@ class TimezoneDropdownlist extends EditComponentBase {
5233
5517
  </file>
5234
5518
  */
5235
5519
  //Node
5236
- const _c0$9 = [[["mex-card-header"]], [["mex-card-body"]], "*", [["mex-card-footer"]]];
5520
+ const _c0$8 = [[["mex-card-header"]], [["mex-card-body"]], "*", [["mex-card-footer"]]];
5237
5521
  const _c1 = ["mex-card-header", "mex-card-body", "*", "mex-card-footer"];
5238
5522
  class CardComponent extends ComponentBase {
5239
5523
  static { this.ɵfac = /*@__PURE__*/ (() => { let ɵCardComponent_BaseFactory; return function CardComponent_Factory(t) { return (ɵCardComponent_BaseFactory || (ɵCardComponent_BaseFactory = i0.ɵɵgetInheritedFactory(CardComponent)))(t || CardComponent); }; })(); }
5240
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) {
5241
- i0.ɵɵprojectionDef(_c0$9);
5525
+ i0.ɵɵprojectionDef(_c0$8);
5242
5526
  i0.ɵɵelementStart(0, "div");
5243
5527
  i0.ɵɵprojection(1);
5244
5528
  i0.ɵɵprojection(2, 1);
@@ -5280,10 +5564,10 @@ function CardHeaderComponent_h3_1_Template(rf, ctx) { if (rf & 1) {
5280
5564
  i0.ɵɵadvance();
5281
5565
  i0.ɵɵtextInterpolate(ctx_r0.title);
5282
5566
  } }
5283
- const _c0$8 = ["*"];
5567
+ const _c0$7 = ["*"];
5284
5568
  class CardHeaderComponent extends ComponentBase {
5285
5569
  static { this.ɵfac = /*@__PURE__*/ (() => { let ɵCardHeaderComponent_BaseFactory; return function CardHeaderComponent_Factory(t) { return (ɵCardHeaderComponent_BaseFactory || (ɵCardHeaderComponent_BaseFactory = i0.ɵɵgetInheritedFactory(CardHeaderComponent)))(t || CardHeaderComponent); }; })(); }
5286
- static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CardHeaderComponent, selectors: [["anatoly-card-header"]], features: [i0.ɵɵInheritDefinitionFeature], ngContentSelectors: _c0$8, decls: 3, vars: 4, consts: [["class", "card-title", 4, "ngIf"], [1, "card-title"]], template: function CardHeaderComponent_Template(rf, ctx) { if (rf & 1) {
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) {
5287
5571
  i0.ɵɵprojectionDef();
5288
5572
  i0.ɵɵelementStart(0, "div");
5289
5573
  i0.ɵɵtemplate(1, CardHeaderComponent_h3_1_Template, 2, 1, "h3", 0);
@@ -5317,10 +5601,10 @@ class CardHeaderComponent extends ComponentBase {
5317
5601
  </file>
5318
5602
  */
5319
5603
  //Node
5320
- const _c0$7 = ["*"];
5604
+ const _c0$6 = ["*"];
5321
5605
  class CardBodyComponent extends ComponentBase {
5322
5606
  static { this.ɵfac = /*@__PURE__*/ (() => { let ɵCardBodyComponent_BaseFactory; return function CardBodyComponent_Factory(t) { return (ɵCardBodyComponent_BaseFactory || (ɵCardBodyComponent_BaseFactory = i0.ɵɵgetInheritedFactory(CardBodyComponent)))(t || CardBodyComponent); }; })(); }
5323
- static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CardBodyComponent, selectors: [["anatoly-card-body"]], features: [i0.ɵɵInheritDefinitionFeature], ngContentSelectors: _c0$7, decls: 2, vars: 3, template: function CardBodyComponent_Template(rf, ctx) { if (rf & 1) {
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) {
5324
5608
  i0.ɵɵprojectionDef();
5325
5609
  i0.ɵɵelementStart(0, "div");
5326
5610
  i0.ɵɵprojection(1);
@@ -5351,10 +5635,10 @@ class CardBodyComponent extends ComponentBase {
5351
5635
  </file>
5352
5636
  */
5353
5637
  //Node
5354
- const _c0$6 = ["*"];
5638
+ const _c0$5 = ["*"];
5355
5639
  class CardFooterComponent extends ComponentBase {
5356
5640
  static { this.ɵfac = /*@__PURE__*/ (() => { let ɵCardFooterComponent_BaseFactory; return function CardFooterComponent_Factory(t) { return (ɵCardFooterComponent_BaseFactory || (ɵCardFooterComponent_BaseFactory = i0.ɵɵgetInheritedFactory(CardFooterComponent)))(t || CardFooterComponent); }; })(); }
5357
- static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CardFooterComponent, selectors: [["anatoly-card-footer"]], features: [i0.ɵɵInheritDefinitionFeature], ngContentSelectors: _c0$6, decls: 2, vars: 3, template: function CardFooterComponent_Template(rf, ctx) { if (rf & 1) {
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) {
5358
5642
  i0.ɵɵprojectionDef();
5359
5643
  i0.ɵɵelementStart(0, "div");
5360
5644
  i0.ɵɵprojection(1);
@@ -5486,230 +5770,62 @@ class HtmlEditorComponentBase extends EditComponentBase {
5486
5770
  that.froalaEditorInitialized = true;
5487
5771
  that.onInitialized();
5488
5772
  }, 300);
5489
- }
5490
- onInitialized() {
5491
- let actions = this.afterInitializedActions;
5492
- // Clear actions
5493
- this.afterInitializedActions = [];
5494
- if (actions) {
5495
- for (let i = 0; i < actions.length; i++) {
5496
- actions[i]();
5497
- }
5498
- }
5499
- }
5500
- getEditor() {
5501
- if (this.froalaEditor)
5502
- return this.froalaEditor.getEditor();
5503
- return null;
5504
- }
5505
- // Public Funcs
5506
- doAfterInitialized(action) {
5507
- const that = this;
5508
- if (!this.froalaEditorInitialized) {
5509
- this.afterInitializedActions.push(() => {
5510
- action(that);
5511
- });
5512
- }
5513
- else {
5514
- action(that);
5515
- }
5516
- }
5517
- initializeControl(control) {
5518
- this.froalaEditor = control;
5519
- this.froalaEditor.initialize();
5520
- }
5521
- setUploadParams(uploadType, uploadParentId) {
5522
- this.doAfterInitialized(function (that) {
5523
- const editor = that.getEditor();
5524
- if (typeof editor == "undefined" || editor == null) {
5525
- return;
5526
- }
5527
- editor.opts.imageUploadParams.uploadType = uploadType;
5528
- editor.opts.imageUploadParams.uploadParentId = uploadParentId;
5529
- });
5530
- }
5531
- static { this.ɵfac = function HtmlEditorComponentBase_Factory(t) { return new (t || HtmlEditorComponentBase)(); }; }
5532
- static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: HtmlEditorComponentBase, selectors: [["ng-component"]], inputs: { editorLabelText: "editorLabelText", editorOptions: "editorOptions" }, features: [i0.ɵɵInheritDefinitionFeature], decls: 0, vars: 0, template: function HtmlEditorComponentBase_Template(rf, ctx) { }, encapsulation: 2 }); }
5533
- }
5534
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(HtmlEditorComponentBase, [{
5535
- type: Component,
5536
- args: [{
5537
- template: "",
5538
- }]
5539
- }], () => [], { editorLabelText: [{
5540
- type: Input
5541
- }], editorOptions: [{
5542
- type: Input
5543
- }] }); })();
5544
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(HtmlEditorComponentBase, { className: "HtmlEditorComponentBase", filePath: "lib\\ui\\components\\html-editor\\base-html-editor.component.ts", lineNumber: 31 }); })();
5545
-
5546
- /*
5547
- <file>
5548
- Project:
5549
- @osovitny/anatoly
5550
-
5551
- Authors:
5552
- Vadim Osovitny vadim@osovitny.com
5553
- Anatoly Osovitny anatoly@osovitny.com
5554
-
5555
- Created:
5556
- 8 Dec 2017
5557
-
5558
- Copyright (c) 2016-2022 Osovitny Inc. All rights reserved.
5559
- </file>
5560
- */
5561
- //Node
5562
- class ValidationSummaryComponent extends EditComponentBase {
5563
- constructor() {
5564
- super();
5565
- }
5566
- getControlTitle(control, name) {
5567
- if (control?.nativeElement) {
5568
- let value = this.getTitleAttribute(control.nativeElement);
5569
- return value ? value : name;
5570
- }
5571
- return undefined;
5572
- }
5573
- getTitleAttribute(nativeElement) {
5574
- let title;
5575
- let element;
5576
- let tagName = nativeElement.tagName;
5577
- switch (tagName) {
5578
- // For Kendo time and date picker element title is assigned to the 4th child control.
5579
- case "KENDO-TIMEPICKER":
5580
- case "KENDO-DATEPICKER":
5581
- element = nativeElement.children[0]?.children[0]?.children[0]?.children[0];
5582
- break;
5583
- // For Kendo numaric element title is assigned to the 2nd child control.
5584
- case "KENDO-NUMERICTEXTBOX":
5585
- element = nativeElement.children[0]?.children[0];
5586
- break;
5587
- default:
5588
- element = nativeElement;
5589
- break;
5590
- }
5591
- if (element) {
5592
- title = element.getAttribute("formControlTitle");
5593
- if (!title) {
5594
- title = element.getAttribute("title");
5595
- }
5596
- }
5597
- return title;
5598
- }
5599
- getFormValidationMessages() {
5600
- let messages = [];
5601
- Object.keys(this.formGroup.controls).forEach((k) => {
5602
- let control = this.formGroup.controls[k];
5603
- if (control.controls != null) {
5604
- Object.keys(control.controls).forEach((k) => {
5605
- var child = control.controls[k];
5606
- this.getValidationMessages(child, this.getControlTitle(child, k)).forEach((m) => messages.push(m));
5607
- });
5608
- }
5609
- else {
5610
- this.getValidationMessages(control, this.getControlTitle(control, k)).forEach((m) => messages.push(m));
5773
+ }
5774
+ onInitialized() {
5775
+ let actions = this.afterInitializedActions;
5776
+ // Clear actions
5777
+ this.afterInitializedActions = [];
5778
+ if (actions) {
5779
+ for (let i = 0; i < actions.length; i++) {
5780
+ actions[i]();
5611
5781
  }
5612
- });
5613
- return messages;
5782
+ }
5614
5783
  }
5615
- getValidationMessages(control, title) {
5616
- let messages = [];
5617
- let thing;
5618
- if (title) {
5619
- thing = title;
5784
+ getEditor() {
5785
+ if (this.froalaEditor)
5786
+ return this.froalaEditor.getEditor();
5787
+ return null;
5788
+ }
5789
+ // Public Funcs
5790
+ doAfterInitialized(action) {
5791
+ const that = this;
5792
+ if (!this.froalaEditorInitialized) {
5793
+ this.afterInitializedActions.push(() => {
5794
+ action(that);
5795
+ });
5620
5796
  }
5621
5797
  else {
5622
- thing = this.getControlTitle(control, null);
5623
- if (!thing) {
5624
- thing = control.path;
5625
- }
5798
+ action(that);
5626
5799
  }
5627
- if (control.errors) {
5628
- for (let errorName in control.errors) {
5629
- if (control.errors.hasOwnProperty(errorName)) {
5630
- switch (errorName) {
5631
- case "required":
5632
- messages.push(`${thing} is required`);
5633
- break;
5634
- case "minlength":
5635
- messages.push(`${thing} must be at least ${control.errors["minlength"].requiredLength} characters`);
5636
- break;
5637
- case "pattern":
5638
- messages.push(`${thing} contains illegal characters`);
5639
- break;
5640
- case "format":
5641
- messages.push(`${thing} format mismatch`);
5642
- break;
5643
- case "maxlength":
5644
- messages.push(`${thing} must have maximum ${control.errors["maxlength"].requiredLength} characters`);
5645
- break;
5646
- case "specialcharacters":
5647
- messages.push(`${thing} contains special characters`);
5648
- break;
5649
- }
5650
- }
5800
+ }
5801
+ initializeControl(control) {
5802
+ this.froalaEditor = control;
5803
+ this.froalaEditor.initialize();
5804
+ }
5805
+ setUploadParams(uploadType, uploadParentId) {
5806
+ this.doAfterInitialized(function (that) {
5807
+ const editor = that.getEditor();
5808
+ if (typeof editor == "undefined" || editor == null) {
5809
+ return;
5651
5810
  }
5652
- }
5653
- return messages;
5811
+ editor.opts.imageUploadParams.uploadType = uploadType;
5812
+ editor.opts.imageUploadParams.uploadParentId = uploadParentId;
5813
+ });
5654
5814
  }
5655
- static { this.ɵfac = function ValidationSummaryComponent_Factory(t) { return new (t || ValidationSummaryComponent)(); }; }
5656
- 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 }); }
5815
+ static { this.ɵfac = function HtmlEditorComponentBase_Factory(t) { return new (t || HtmlEditorComponentBase)(); }; }
5816
+ static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: HtmlEditorComponentBase, selectors: [["ng-component"]], inputs: { editorLabelText: "editorLabelText", editorOptions: "editorOptions" }, features: [i0.ɵɵInheritDefinitionFeature], decls: 0, vars: 0, template: function HtmlEditorComponentBase_Template(rf, ctx) { }, encapsulation: 2 }); }
5657
5817
  }
5658
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ValidationSummaryComponent, [{
5818
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(HtmlEditorComponentBase, [{
5659
5819
  type: Component,
5660
5820
  args: [{
5661
- template: ''
5821
+ template: "",
5662
5822
  }]
5663
- }], () => [], null); })();
5664
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ValidationSummaryComponent, { className: "ValidationSummaryComponent", filePath: "lib\\ui\\validation\\validation-summary.component.ts", lineNumber: 27 }); })();
5665
-
5666
- /*
5667
- <file>
5668
- Project:
5669
- @osovitny/anatoly
5670
-
5671
- Authors:
5672
- Vadim Osovitny vadim@osovitny.com
5673
- Anatoly Osovitny anatoly@osovitny.com
5674
-
5675
- Created:
5676
- 6 Dec 2017
5677
-
5678
- Copyright (c) 2016-2022 Osovitny Inc. All rights reserved.
5679
- </file>
5680
- */
5681
- //Node
5682
- function ItemValidationSummaryComponent_ul_0_li_1_Template(rf, ctx) { if (rf & 1) {
5683
- i0.ɵɵelementStart(0, "li")(1, "span", 3);
5684
- i0.ɵɵtext(2);
5685
- i0.ɵɵelementEnd()();
5686
- } if (rf & 2) {
5687
- const error_r2 = ctx.$implicit;
5688
- i0.ɵɵadvance(2);
5689
- i0.ɵɵtextInterpolate(error_r2);
5690
- } }
5691
- function ItemValidationSummaryComponent_ul_0_Template(rf, ctx) { if (rf & 1) {
5692
- i0.ɵɵelementStart(0, "ul", 1);
5693
- i0.ɵɵtemplate(1, ItemValidationSummaryComponent_ul_0_li_1_Template, 3, 1, "li", 2);
5694
- i0.ɵɵelementEnd();
5695
- } if (rf & 2) {
5696
- const ctx_r0 = i0.ɵɵnextContext();
5697
- i0.ɵɵadvance();
5698
- i0.ɵɵproperty("ngForOf", ctx_r0.getValidationMessages(ctx_r0.formGroup.controls[ctx_r0.controlName]));
5699
- } }
5700
- class ItemValidationSummaryComponent extends ValidationSummaryComponent {
5701
- static { this.ɵfac = /*@__PURE__*/ (() => { let ɵItemValidationSummaryComponent_BaseFactory; return function ItemValidationSummaryComponent_Factory(t) { return (ɵItemValidationSummaryComponent_BaseFactory || (ɵItemValidationSummaryComponent_BaseFactory = i0.ɵɵgetInheritedFactory(ItemValidationSummaryComponent)))(t || ItemValidationSummaryComponent); }; })(); }
5702
- 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) {
5703
- i0.ɵɵtemplate(0, ItemValidationSummaryComponent_ul_0_Template, 2, 1, "ul", 0);
5704
- } if (rf & 2) {
5705
- i0.ɵɵproperty("ngIf", ctx.isControlInvalid(ctx.controlName));
5706
- } }, dependencies: [i1$2.NgForOf, i1$2.NgIf], encapsulation: 2 }); }
5707
- }
5708
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ItemValidationSummaryComponent, [{
5709
- type: Component,
5710
- 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" }]
5711
- }], null, null); })();
5712
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ItemValidationSummaryComponent, { className: "ItemValidationSummaryComponent", filePath: "lib\\ui\\validation\\item-validation-summary.component.ts", lineNumber: 27 }); })();
5823
+ }], () => [], { editorLabelText: [{
5824
+ type: Input
5825
+ }], editorOptions: [{
5826
+ type: Input
5827
+ }] }); })();
5828
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(HtmlEditorComponentBase, { className: "HtmlEditorComponentBase", filePath: "lib\\ui\\components\\html-editor\\base-html-editor.component.ts", lineNumber: 31 }); })();
5713
5829
 
5714
5830
  /*
5715
5831
  <file>
@@ -5727,7 +5843,7 @@ class ItemValidationSummaryComponent extends ValidationSummaryComponent {
5727
5843
  </file>
5728
5844
  */
5729
5845
  //Node
5730
- const _c0$5 = a0 => ({ "has-error": a0 });
5846
+ const _c0$4 = a0 => ({ "has-error": a0 });
5731
5847
  class FormsHtmlEditorComponent extends HtmlEditorComponentBase {
5732
5848
  constructor() {
5733
5849
  super();
@@ -5749,7 +5865,7 @@ class FormsHtmlEditorComponent extends HtmlEditorComponentBase {
5749
5865
  i0.ɵɵelement(4, "anatoly-item-validation-summary", 3);
5750
5866
  i0.ɵɵelementEnd();
5751
5867
  } if (rf & 2) {
5752
- i0.ɵɵproperty("formGroup", ctx.formGroup)("ngClass", i0.ɵɵpureFunction1(8, _c0$5, ctx.isControlInvalid(ctx.editorFormKey)));
5868
+ i0.ɵɵproperty("formGroup", ctx.formGroup)("ngClass", i0.ɵɵpureFunction1(8, _c0$4, ctx.isControlInvalid(ctx.editorFormKey)));
5753
5869
  i0.ɵɵadvance(2);
5754
5870
  i0.ɵɵtextInterpolate(ctx.editorLabelText);
5755
5871
  i0.ɵɵadvance();
@@ -5964,7 +6080,7 @@ function ContactUsForm_button_38_Template(rf, ctx) { if (rf & 1) {
5964
6080
  const ctx_r2 = i0.ɵɵnextContext();
5965
6081
  i0.ɵɵclassProp("btn-primary", !ctx_r2.formGroup.invalid);
5966
6082
  } }
5967
- const _c0$4 = a0 => ({ "has-error": a0 });
6083
+ const _c0$3 = a0 => ({ "has-error": a0 });
5968
6084
  class ContactUsForm extends EditComponentBase {
5969
6085
  constructor(reCaptcha, fb, appContext, api, notificationService) {
5970
6086
  super();
@@ -6088,27 +6204,27 @@ class ContactUsForm extends EditComponentBase {
6088
6204
  i0.ɵɵadvance();
6089
6205
  i0.ɵɵproperty("formGroup", ctx.formGroup)("visible", ctx.formSubmitted && ctx.formGroup.invalid);
6090
6206
  i0.ɵɵadvance(6);
6091
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(21, _c0$4, ctx.isControlInvalid("topic")));
6207
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(21, _c0$3, ctx.isControlInvalid("topic")));
6092
6208
  i0.ɵɵadvance(5);
6093
6209
  i0.ɵɵproperty("ngForOf", ctx.topicList);
6094
6210
  i0.ɵɵadvance();
6095
6211
  i0.ɵɵproperty("formGroup", ctx.formGroup)("formSubmitted", ctx.formSubmitted);
6096
6212
  i0.ɵɵadvance();
6097
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(23, _c0$4, ctx.isControlInvalid("name")));
6213
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(23, _c0$3, ctx.isControlInvalid("name")));
6098
6214
  i0.ɵɵadvance(4);
6099
6215
  i0.ɵɵproperty("formGroup", ctx.formGroup)("formSubmitted", ctx.formSubmitted);
6100
6216
  i0.ɵɵadvance();
6101
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(25, _c0$4, ctx.isControlInvalid("email")));
6217
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(25, _c0$3, ctx.isControlInvalid("email")));
6102
6218
  i0.ɵɵadvance(4);
6103
6219
  i0.ɵɵproperty("ngIf", !ctx.isUserSignedIn);
6104
6220
  i0.ɵɵadvance();
6105
6221
  i0.ɵɵproperty("formGroup", ctx.formGroup)("formSubmitted", ctx.formSubmitted);
6106
6222
  i0.ɵɵadvance();
6107
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(27, _c0$4, ctx.isControlInvalid("subject")));
6223
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(27, _c0$3, ctx.isControlInvalid("subject")));
6108
6224
  i0.ɵɵadvance(4);
6109
6225
  i0.ɵɵproperty("formGroup", ctx.formGroup)("formSubmitted", ctx.formSubmitted);
6110
6226
  i0.ɵɵadvance(2);
6111
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(29, _c0$4, ctx.isControlInvalid("message")));
6227
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(29, _c0$3, ctx.isControlInvalid("message")));
6112
6228
  i0.ɵɵadvance(4);
6113
6229
  i0.ɵɵproperty("formGroup", ctx.formGroup)("formSubmitted", ctx.formSubmitted);
6114
6230
  i0.ɵɵadvance(3);
@@ -6141,7 +6257,7 @@ class ContactUsForm extends EditComponentBase {
6141
6257
  </file>
6142
6258
  */
6143
6259
  //Node
6144
- const _c0$3 = ["contactusform"];
6260
+ const _c0$2 = ["contactusform"];
6145
6261
  function ContactUsDialog_kendo_dialog_0_Template(rf, ctx) { if (rf & 1) {
6146
6262
  const _r3 = i0.ɵɵgetCurrentView();
6147
6263
  i0.ɵɵelementStart(0, "kendo-dialog", 1);
@@ -6178,7 +6294,7 @@ class ContactUsDialog extends DialogBase {
6178
6294
  }
6179
6295
  static { this.ɵfac = function ContactUsDialog_Factory(t) { return new (t || ContactUsDialog)(); }; }
6180
6296
  static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ContactUsDialog, selectors: [["anatoly-contactus-dialog"]], viewQuery: function ContactUsDialog_Query(rf, ctx) { if (rf & 1) {
6181
- i0.ɵɵviewQuery(_c0$3, 5);
6297
+ i0.ɵɵviewQuery(_c0$2, 5);
6182
6298
  } if (rf & 2) {
6183
6299
  let _t;
6184
6300
  i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.contactUsForm = _t.first);
@@ -6310,7 +6426,7 @@ function AddressComponent_div_17_option_4_Template(rf, ctx) { if (rf & 1) {
6310
6426
  i0.ɵɵadvance();
6311
6427
  i0.ɵɵtextInterpolate(state_r4.name);
6312
6428
  } }
6313
- const _c0$2 = a0 => ({ "has-error": a0 });
6429
+ const _c0$1 = a0 => ({ "has-error": a0 });
6314
6430
  function AddressComponent_div_17_Template(rf, ctx) { if (rf & 1) {
6315
6431
  const _r6 = i0.ɵɵgetCurrentView();
6316
6432
  i0.ɵɵelementStart(0, "div", 9)(1, "label", 4);
@@ -6324,7 +6440,7 @@ function AddressComponent_div_17_Template(rf, ctx) { if (rf & 1) {
6324
6440
  i0.ɵɵelementEnd();
6325
6441
  } if (rf & 2) {
6326
6442
  const ctx_r1 = i0.ɵɵnextContext();
6327
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(4, _c0$2, ctx_r1.isControlInvalid("address_stateOrRegion")));
6443
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(4, _c0$1, ctx_r1.isControlInvalid("address_stateOrRegion")));
6328
6444
  i0.ɵɵadvance(4);
6329
6445
  i0.ɵɵproperty("ngForOf", ctx_r1.usStateData);
6330
6446
  i0.ɵɵadvance();
@@ -6466,25 +6582,25 @@ class AddressComponent extends EditComponentBase {
6466
6582
  i0.ɵɵadvance(2);
6467
6583
  i0.ɵɵproperty("formGroup", ctx.formGroup);
6468
6584
  i0.ɵɵadvance();
6469
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(19, _c0$2, ctx.isControlInvalid("address_street")));
6585
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(19, _c0$1, ctx.isControlInvalid("address_street")));
6470
6586
  i0.ɵɵadvance(4);
6471
6587
  i0.ɵɵproperty("formGroup", ctx.formGroup)("formSubmitted", ctx.formSubmitted);
6472
6588
  i0.ɵɵadvance();
6473
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(21, _c0$2, ctx.isControlInvalid("address_street2")));
6589
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(21, _c0$1, ctx.isControlInvalid("address_street2")));
6474
6590
  i0.ɵɵadvance(2);
6475
6591
  i0.ɵɵproperty("formGroup", ctx.formGroup)("formSubmitted", ctx.formSubmitted);
6476
6592
  i0.ɵɵadvance();
6477
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(23, _c0$2, ctx.isControlInvalid("address_city")));
6593
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(23, _c0$1, ctx.isControlInvalid("address_city")));
6478
6594
  i0.ɵɵadvance(4);
6479
6595
  i0.ɵɵproperty("formGroup", ctx.formGroup)("formSubmitted", ctx.formSubmitted);
6480
6596
  i0.ɵɵadvance();
6481
6597
  i0.ɵɵproperty("ngIf", ctx.formGroup.value.address_country == "US");
6482
6598
  i0.ɵɵadvance();
6483
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(25, _c0$2, ctx.isControlInvalid("address_zipcode")));
6599
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(25, _c0$1, ctx.isControlInvalid("address_zipcode")));
6484
6600
  i0.ɵɵadvance(4);
6485
6601
  i0.ɵɵproperty("formGroup", ctx.formGroup)("formSubmitted", ctx.formSubmitted);
6486
6602
  i0.ɵɵadvance();
6487
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(27, _c0$2, ctx.isControlInvalid("address_country")));
6603
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(27, _c0$1, ctx.isControlInvalid("address_country")));
6488
6604
  i0.ɵɵadvance(4);
6489
6605
  i0.ɵɵproperty("ngForOf", ctx.countryData);
6490
6606
  i0.ɵɵadvance();
@@ -6523,7 +6639,7 @@ function CompanyComponent_anatoly_card_header_1_Template(rf, ctx) { if (rf & 1)
6523
6639
  const ctx_r0 = i0.ɵɵnextContext();
6524
6640
  i0.ɵɵproperty("title", ctx_r0.title);
6525
6641
  } }
6526
- const _c0$1 = a0 => ({ "has-error": a0 });
6642
+ const _c0 = a0 => ({ "has-error": a0 });
6527
6643
  class CompanyComponent extends EditComponentBase {
6528
6644
  //Inputs
6529
6645
  get company() {
@@ -6603,19 +6719,19 @@ class CompanyComponent extends EditComponentBase {
6603
6719
  i0.ɵɵadvance(2);
6604
6720
  i0.ɵɵproperty("formGroup", ctx.formGroup);
6605
6721
  i0.ɵɵadvance();
6606
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(14, _c0$1, ctx.isControlInvalid("company_name")));
6722
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(14, _c0, ctx.isControlInvalid("company_name")));
6607
6723
  i0.ɵɵadvance(4);
6608
6724
  i0.ɵɵproperty("formGroup", ctx.formGroup)("formSubmitted", ctx.formSubmitted);
6609
6725
  i0.ɵɵadvance();
6610
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(16, _c0$1, ctx.isControlInvalid("company_phone")));
6726
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(16, _c0, ctx.isControlInvalid("company_phone")));
6611
6727
  i0.ɵɵadvance(4);
6612
6728
  i0.ɵɵproperty("formGroup", ctx.formGroup)("formSubmitted", ctx.formSubmitted);
6613
6729
  i0.ɵɵadvance();
6614
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(18, _c0$1, ctx.isControlInvalid("company_email")));
6730
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(18, _c0, ctx.isControlInvalid("company_email")));
6615
6731
  i0.ɵɵadvance(4);
6616
6732
  i0.ɵɵproperty("formGroup", ctx.formGroup)("formSubmitted", ctx.formSubmitted);
6617
6733
  i0.ɵɵadvance();
6618
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(20, _c0$1, ctx.isControlInvalid("company_websiteUrl")));
6734
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(20, _c0, ctx.isControlInvalid("company_websiteUrl")));
6619
6735
  i0.ɵɵadvance(4);
6620
6736
  i0.ɵɵproperty("formGroup", ctx.formGroup)("formSubmitted", ctx.formSubmitted);
6621
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 }); }
@@ -6628,122 +6744,6 @@ class CompanyComponent extends EditComponentBase {
6628
6744
  }] }); })();
6629
6745
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CompanyComponent, { className: "CompanyComponent", filePath: "lib\\ui\\forms\\components\\company\\company.component.ts", lineNumber: 28 }); })();
6630
6746
 
6631
- /*
6632
- <file>
6633
- Project:
6634
- @osovitny/anatoly
6635
-
6636
- Authors:
6637
- Vadim Osovitny vadim@osovitny.com
6638
- Anatoly Osovitny anatoly@osovitny.com
6639
-
6640
- Created:
6641
- 02 Aug 2022
6642
-
6643
- Copyright (c) 2017-2022 Osovitny Inc. All rights reserved.
6644
- </file>
6645
- */
6646
- //Node
6647
- function UrlSlugComponent_label_4_Template(rf, ctx) { if (rf & 1) {
6648
- i0.ɵɵelementStart(0, "label", 7);
6649
- i0.ɵɵtext(1);
6650
- i0.ɵɵelementStart(2, "span", 8);
6651
- i0.ɵɵtext(3);
6652
- i0.ɵɵelementEnd()();
6653
- } if (rf & 2) {
6654
- const ctx_r0 = i0.ɵɵnextContext();
6655
- i0.ɵɵadvance();
6656
- i0.ɵɵtextInterpolate1(" ", ctx_r0.title, " ");
6657
- i0.ɵɵadvance(2);
6658
- i0.ɵɵtextInterpolate(ctx_r0.urlPrefix);
6659
- } }
6660
- function UrlSlugComponent_div_6_Template(rf, ctx) { if (rf & 1) {
6661
- i0.ɵɵelementStart(0, "div", 9)(1, "a", 10);
6662
- i0.ɵɵtext(2, "Go");
6663
- i0.ɵɵelementEnd()();
6664
- } if (rf & 2) {
6665
- const ctx_r1 = i0.ɵɵnextContext();
6666
- i0.ɵɵadvance();
6667
- i0.ɵɵpropertyInterpolate2("href", "", ctx_r1.urlPrefix, "", ctx_r1.hrefGo, "", i0.ɵɵsanitizeUrl);
6668
- } }
6669
- const _c0 = a0 => ({ "has-error": a0 });
6670
- class UrlSlugComponent extends EditComponentBase {
6671
- constructor() {
6672
- super();
6673
- this.firstValue = true;
6674
- this.isGoButtonVisible = true;
6675
- //Outputs
6676
- this.generating = new EventEmitter();
6677
- this.title = 'Permalink';
6678
- }
6679
- ngOnInit() {
6680
- this.startWatching();
6681
- }
6682
- generateUrlSlug(text) {
6683
- let slugedText = Utils.slugify(text);
6684
- let event = { urlSlug: slugedText };
6685
- this.generating.emit(event);
6686
- this.setFormValue(this.controlName, event.urlSlug);
6687
- }
6688
- startWatching() {
6689
- this.subs.sink = this.formGroup.get(this.watchedControlName).valueChanges.subscribe({
6690
- next: (value) => {
6691
- if (this.firstValue) {
6692
- this.firstValue = false;
6693
- return;
6694
- }
6695
- this.generateUrlSlug(value);
6696
- }
6697
- });
6698
- this.subs.sink = this.formGroup.get(this.controlName).valueChanges.subscribe({
6699
- next: (value) => {
6700
- this.hrefGo = value;
6701
- }
6702
- });
6703
- }
6704
- //Events
6705
- onUrlSlugChange() {
6706
- let text = this.getFormValue(this.controlName);
6707
- this.generateUrlSlug(text);
6708
- }
6709
- static { this.ɵfac = function UrlSlugComponent_Factory(t) { return new (t || UrlSlugComponent)(); }; }
6710
- 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) {
6711
- i0.ɵɵelementStart(0, "div", 0)(1, "div", 1);
6712
- i0.ɵɵelement(2, "anatoly-item-validation-summary", 2);
6713
- i0.ɵɵelementStart(3, "div", 3);
6714
- i0.ɵɵtemplate(4, UrlSlugComponent_label_4_Template, 4, 2, "label", 4);
6715
- i0.ɵɵelementStart(5, "input", 5);
6716
- i0.ɵɵlistener("focusout", function UrlSlugComponent_Template_input_focusout_5_listener() { return ctx.onUrlSlugChange(); });
6717
- i0.ɵɵelementEnd()();
6718
- i0.ɵɵtemplate(6, UrlSlugComponent_div_6_Template, 3, 2, "div", 6);
6719
- i0.ɵɵelementEnd()();
6720
- } if (rf & 2) {
6721
- i0.ɵɵclassMapInterpolate1("permalink form-group ", ctx.classes, "");
6722
- i0.ɵɵproperty("formGroup", ctx.formGroup)("ngClass", i0.ɵɵpureFunction1(11, _c0, ctx.isControlInvalid(ctx.controlName)));
6723
- i0.ɵɵadvance(2);
6724
- i0.ɵɵproperty("formGroup", ctx.formGroup)("formSubmitted", ctx.formSubmitted)("formControlName", ctx.controlName);
6725
- i0.ɵɵadvance(2);
6726
- i0.ɵɵproperty("ngIf", ctx.isTitleVisible);
6727
- i0.ɵɵadvance();
6728
- i0.ɵɵproperty("formControlName", ctx.controlName);
6729
- i0.ɵɵadvance();
6730
- i0.ɵɵproperty("ngIf", ctx.isGoButtonVisible);
6731
- } }, dependencies: [i1$2.NgClass, i1$2.NgIf, i2.DefaultValueAccessor, i2.NgControlStatus, i2.NgControlStatusGroup, i2.FormGroupDirective, i2.FormControlName, NativeElementDirective, ItemValidationSummaryComponent], encapsulation: 2 }); }
6732
- }
6733
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(UrlSlugComponent, [{
6734
- type: Component,
6735
- 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" }]
6736
- }], () => [], { urlPrefix: [{
6737
- type: Input
6738
- }], isGoButtonVisible: [{
6739
- type: Input
6740
- }], watchedControlName: [{
6741
- type: Input
6742
- }], generating: [{
6743
- type: Output
6744
- }] }); })();
6745
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(UrlSlugComponent, { className: "UrlSlugComponent", filePath: "lib\\ui\\forms\\components\\urlslug\\urlslug.component.ts", lineNumber: 28 }); })();
6746
-
6747
6747
  /*
6748
6748
  <file>
6749
6749
  Project:
@@ -7532,6 +7532,7 @@ const COMPONENTS = [
7532
7532
  PageSpinnerComponent,
7533
7533
  LoadingComponent,
7534
7534
  Copy2ClipboardComponent,
7535
+ UrlSlugComponent,
7535
7536
  //Dropdownlists
7536
7537
  CountryDropdownlist,
7537
7538
  TimezoneDropdownlist,
@@ -7551,7 +7552,6 @@ const COMPONENTS = [
7551
7552
  //Forms
7552
7553
  AddressComponent,
7553
7554
  CompanyComponent,
7554
- UrlSlugComponent,
7555
7555
  ContactUsForm,
7556
7556
  //Pipes
7557
7557
  SafeHtmlPipe,
@@ -7605,6 +7605,7 @@ class AnatolyUIModule {
7605
7605
  PageSpinnerComponent,
7606
7606
  LoadingComponent,
7607
7607
  Copy2ClipboardComponent,
7608
+ UrlSlugComponent,
7608
7609
  //Dropdownlists
7609
7610
  CountryDropdownlist,
7610
7611
  TimezoneDropdownlist,
@@ -7624,7 +7625,6 @@ class AnatolyUIModule {
7624
7625
  //Forms
7625
7626
  AddressComponent,
7626
7627
  CompanyComponent,
7627
- UrlSlugComponent,
7628
7628
  ContactUsForm,
7629
7629
  //Pipes
7630
7630
  SafeHtmlPipe,
@@ -7650,6 +7650,7 @@ class AnatolyUIModule {
7650
7650
  PageSpinnerComponent,
7651
7651
  LoadingComponent,
7652
7652
  Copy2ClipboardComponent,
7653
+ UrlSlugComponent,
7653
7654
  //Dropdownlists
7654
7655
  CountryDropdownlist,
7655
7656
  TimezoneDropdownlist,
@@ -7669,7 +7670,6 @@ class AnatolyUIModule {
7669
7670
  //Forms
7670
7671
  AddressComponent,
7671
7672
  CompanyComponent,
7672
- UrlSlugComponent,
7673
7673
  ContactUsForm,
7674
7674
  //Pipes
7675
7675
  SafeHtmlPipe,