@osovitny/anatoly 3.17.25 → 3.17.27

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.
@@ -3605,10 +3605,19 @@ class ComponentBase {
3605
3605
  this.isDevMode = IsDevMode;
3606
3606
  }
3607
3607
  ngOnInit() {
3608
+ this.setDefaults();
3608
3609
  }
3609
3610
  ngOnDestroy() {
3610
3611
  this.subs.unsubscribe();
3611
3612
  }
3613
+ setDefaults() {
3614
+ this.applicationType = 1;
3615
+ }
3616
+ setValues() {
3617
+ if (AppSettings) {
3618
+ this.applicationType = AppSettings.id;
3619
+ }
3620
+ }
3612
3621
  getEntityId() {
3613
3622
  return QSUtils.getValueByName("id");
3614
3623
  }
@@ -5032,6 +5041,290 @@ class NativeElementDirective {
5032
5041
  }]
5033
5042
  }], () => [{ type: i0.ElementRef }, { type: i2.NgControl }], null); })();
5034
5043
 
5044
+ /*
5045
+ <file>
5046
+ Project:
5047
+ @osovitny/anatoly
5048
+
5049
+ Authors:
5050
+ Vadim Osovitny vadim@osovitny.com
5051
+ Anatoly Osovitny anatoly@osovitny.com
5052
+
5053
+ Created:
5054
+ 8 Dec 2017
5055
+
5056
+ Copyright (c) 2016-2022 Osovitny Inc. All rights reserved.
5057
+ </file>
5058
+ */
5059
+ //Node
5060
+ class ValidationSummaryComponent extends EditComponentBase {
5061
+ constructor() {
5062
+ super();
5063
+ }
5064
+ getControlTitle(control, name) {
5065
+ if (control?.nativeElement) {
5066
+ let value = this.getTitleAttribute(control.nativeElement);
5067
+ return value ? value : name;
5068
+ }
5069
+ return undefined;
5070
+ }
5071
+ getTitleAttribute(nativeElement) {
5072
+ let title;
5073
+ let element;
5074
+ let tagName = nativeElement.tagName;
5075
+ switch (tagName) {
5076
+ // For Kendo time and date picker element title is assigned to the 4th child control.
5077
+ case "KENDO-TIMEPICKER":
5078
+ case "KENDO-DATEPICKER":
5079
+ element = nativeElement.children[0]?.children[0]?.children[0]?.children[0];
5080
+ break;
5081
+ // For Kendo numaric element title is assigned to the 2nd child control.
5082
+ case "KENDO-NUMERICTEXTBOX":
5083
+ element = nativeElement.children[0]?.children[0];
5084
+ break;
5085
+ default:
5086
+ element = nativeElement;
5087
+ break;
5088
+ }
5089
+ if (element) {
5090
+ title = element.getAttribute("formControlTitle");
5091
+ if (!title) {
5092
+ title = element.getAttribute("title");
5093
+ }
5094
+ }
5095
+ return title;
5096
+ }
5097
+ getFormValidationMessages() {
5098
+ let messages = [];
5099
+ Object.keys(this.formGroup.controls).forEach((k) => {
5100
+ let control = this.formGroup.controls[k];
5101
+ if (control.controls != null) {
5102
+ Object.keys(control.controls).forEach((k) => {
5103
+ var child = control.controls[k];
5104
+ this.getValidationMessages(child, this.getControlTitle(child, k)).forEach((m) => messages.push(m));
5105
+ });
5106
+ }
5107
+ else {
5108
+ this.getValidationMessages(control, this.getControlTitle(control, k)).forEach((m) => messages.push(m));
5109
+ }
5110
+ });
5111
+ return messages;
5112
+ }
5113
+ getValidationMessages(control, title) {
5114
+ let messages = [];
5115
+ let thing;
5116
+ if (title) {
5117
+ thing = title;
5118
+ }
5119
+ else {
5120
+ thing = this.getControlTitle(control, null);
5121
+ if (!thing) {
5122
+ thing = control.path;
5123
+ }
5124
+ }
5125
+ if (control.errors) {
5126
+ for (let errorName in control.errors) {
5127
+ if (control.errors.hasOwnProperty(errorName)) {
5128
+ switch (errorName) {
5129
+ case "required":
5130
+ messages.push(`${thing} is required`);
5131
+ break;
5132
+ case "minlength":
5133
+ messages.push(`${thing} must be at least ${control.errors["minlength"].requiredLength} characters`);
5134
+ break;
5135
+ case "pattern":
5136
+ messages.push(`${thing} contains illegal characters`);
5137
+ break;
5138
+ case "format":
5139
+ messages.push(`${thing} format mismatch`);
5140
+ break;
5141
+ case "maxlength":
5142
+ messages.push(`${thing} must have maximum ${control.errors["maxlength"].requiredLength} characters`);
5143
+ break;
5144
+ case "specialcharacters":
5145
+ messages.push(`${thing} contains special characters`);
5146
+ break;
5147
+ }
5148
+ }
5149
+ }
5150
+ }
5151
+ return messages;
5152
+ }
5153
+ static { this.ɵfac = function ValidationSummaryComponent_Factory(t) { return new (t || ValidationSummaryComponent)(); }; }
5154
+ 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 }); }
5155
+ }
5156
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ValidationSummaryComponent, [{
5157
+ type: Component,
5158
+ args: [{
5159
+ template: ''
5160
+ }]
5161
+ }], () => [], null); })();
5162
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ValidationSummaryComponent, { className: "ValidationSummaryComponent", filePath: "lib\\ui\\validation\\validation-summary.component.ts", lineNumber: 27 }); })();
5163
+
5164
+ /*
5165
+ <file>
5166
+ Project:
5167
+ @osovitny/anatoly
5168
+
5169
+ Authors:
5170
+ Vadim Osovitny vadim@osovitny.com
5171
+ Anatoly Osovitny anatoly@osovitny.com
5172
+
5173
+ Created:
5174
+ 6 Dec 2017
5175
+
5176
+ Copyright (c) 2016-2022 Osovitny Inc. All rights reserved.
5177
+ </file>
5178
+ */
5179
+ //Node
5180
+ function ItemValidationSummaryComponent_ul_0_li_1_Template(rf, ctx) { if (rf & 1) {
5181
+ i0.ɵɵelementStart(0, "li")(1, "span", 3);
5182
+ i0.ɵɵtext(2);
5183
+ i0.ɵɵelementEnd()();
5184
+ } if (rf & 2) {
5185
+ const error_r2 = ctx.$implicit;
5186
+ i0.ɵɵadvance(2);
5187
+ i0.ɵɵtextInterpolate(error_r2);
5188
+ } }
5189
+ function ItemValidationSummaryComponent_ul_0_Template(rf, ctx) { if (rf & 1) {
5190
+ i0.ɵɵelementStart(0, "ul", 1);
5191
+ i0.ɵɵtemplate(1, ItemValidationSummaryComponent_ul_0_li_1_Template, 3, 1, "li", 2);
5192
+ i0.ɵɵelementEnd();
5193
+ } if (rf & 2) {
5194
+ const ctx_r0 = i0.ɵɵnextContext();
5195
+ i0.ɵɵadvance();
5196
+ i0.ɵɵproperty("ngForOf", ctx_r0.getValidationMessages(ctx_r0.formGroup.controls[ctx_r0.controlName]));
5197
+ } }
5198
+ class ItemValidationSummaryComponent extends ValidationSummaryComponent {
5199
+ static { this.ɵfac = /*@__PURE__*/ (() => { let ɵItemValidationSummaryComponent_BaseFactory; return function ItemValidationSummaryComponent_Factory(t) { return (ɵItemValidationSummaryComponent_BaseFactory || (ɵItemValidationSummaryComponent_BaseFactory = i0.ɵɵgetInheritedFactory(ItemValidationSummaryComponent)))(t || ItemValidationSummaryComponent); }; })(); }
5200
+ 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) {
5201
+ i0.ɵɵtemplate(0, ItemValidationSummaryComponent_ul_0_Template, 2, 1, "ul", 0);
5202
+ } if (rf & 2) {
5203
+ i0.ɵɵproperty("ngIf", ctx.isControlInvalid(ctx.controlName));
5204
+ } }, dependencies: [i1$2.NgForOf, i1$2.NgIf], encapsulation: 2 }); }
5205
+ }
5206
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ItemValidationSummaryComponent, [{
5207
+ type: Component,
5208
+ 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" }]
5209
+ }], null, null); })();
5210
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ItemValidationSummaryComponent, { className: "ItemValidationSummaryComponent", filePath: "lib\\ui\\validation\\item-validation-summary.component.ts", lineNumber: 27 }); })();
5211
+
5212
+ /*
5213
+ <file>
5214
+ Project:
5215
+ @osovitny/anatoly
5216
+
5217
+ Authors:
5218
+ Vadim Osovitny vadim@osovitny.com
5219
+ Anatoly Osovitny anatoly@osovitny.com
5220
+
5221
+ Created:
5222
+ 02 Aug 2022
5223
+
5224
+ Copyright (c) 2017-2022 Osovitny Inc. All rights reserved.
5225
+ </file>
5226
+ */
5227
+ //Node
5228
+ function UrlSlugComponent_label_4_Template(rf, ctx) { if (rf & 1) {
5229
+ i0.ɵɵelementStart(0, "label", 7);
5230
+ i0.ɵɵtext(1);
5231
+ i0.ɵɵelementStart(2, "span", 8);
5232
+ i0.ɵɵtext(3);
5233
+ i0.ɵɵelementEnd()();
5234
+ } if (rf & 2) {
5235
+ const ctx_r0 = i0.ɵɵnextContext();
5236
+ i0.ɵɵadvance();
5237
+ i0.ɵɵtextInterpolate1(" ", ctx_r0.title, " ");
5238
+ i0.ɵɵadvance(2);
5239
+ i0.ɵɵtextInterpolate(ctx_r0.urlPrefix);
5240
+ } }
5241
+ function UrlSlugComponent_div_6_Template(rf, ctx) { if (rf & 1) {
5242
+ i0.ɵɵelementStart(0, "div", 9)(1, "a", 10);
5243
+ i0.ɵɵtext(2, "Go");
5244
+ i0.ɵɵelementEnd()();
5245
+ } if (rf & 2) {
5246
+ const ctx_r1 = i0.ɵɵnextContext();
5247
+ i0.ɵɵadvance();
5248
+ i0.ɵɵpropertyInterpolate2("href", "", ctx_r1.urlPrefix, "", ctx_r1.hrefGo, "", i0.ɵɵsanitizeUrl);
5249
+ } }
5250
+ const _c0$9 = a0 => ({ "has-error": a0 });
5251
+ class UrlSlugComponent extends EditComponentBase {
5252
+ constructor() {
5253
+ super();
5254
+ this.firstValue = true;
5255
+ this.isGoButtonVisible = true;
5256
+ //Outputs
5257
+ this.generated = new EventEmitter();
5258
+ this.title = 'Permalink';
5259
+ }
5260
+ ngOnInit() {
5261
+ this.startWatching();
5262
+ }
5263
+ generateUrlSlug(text) {
5264
+ let slugedText = Utils.slugify(text);
5265
+ let event = { urlSlug: slugedText };
5266
+ this.generated.emit(event);
5267
+ this.setFormValue(this.controlName, event.urlSlug);
5268
+ }
5269
+ startWatching() {
5270
+ this.subs.sink = this.formGroup.get(this.watchedControlName).valueChanges.subscribe({
5271
+ next: (value) => {
5272
+ if (this.firstValue) {
5273
+ this.firstValue = false;
5274
+ return;
5275
+ }
5276
+ this.generateUrlSlug(value);
5277
+ }
5278
+ });
5279
+ this.subs.sink = this.formGroup.get(this.controlName).valueChanges.subscribe({
5280
+ next: (value) => {
5281
+ this.hrefGo = value;
5282
+ }
5283
+ });
5284
+ }
5285
+ //Events
5286
+ onUrlSlugChange() {
5287
+ let text = this.getFormValue(this.controlName);
5288
+ this.generateUrlSlug(text);
5289
+ }
5290
+ static { this.ɵfac = function UrlSlugComponent_Factory(t) { return new (t || UrlSlugComponent)(); }; }
5291
+ 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) {
5292
+ i0.ɵɵelementStart(0, "div", 0)(1, "div", 1);
5293
+ i0.ɵɵelement(2, "anatoly-item-validation-summary", 2);
5294
+ i0.ɵɵelementStart(3, "div", 3);
5295
+ i0.ɵɵtemplate(4, UrlSlugComponent_label_4_Template, 4, 2, "label", 4);
5296
+ i0.ɵɵelementStart(5, "input", 5);
5297
+ i0.ɵɵlistener("focusout", function UrlSlugComponent_Template_input_focusout_5_listener() { return ctx.onUrlSlugChange(); });
5298
+ i0.ɵɵelementEnd()();
5299
+ i0.ɵɵtemplate(6, UrlSlugComponent_div_6_Template, 3, 2, "div", 6);
5300
+ i0.ɵɵelementEnd()();
5301
+ } if (rf & 2) {
5302
+ i0.ɵɵclassMapInterpolate1("permalink form-group ", ctx.classes, "");
5303
+ i0.ɵɵproperty("formGroup", ctx.formGroup)("ngClass", i0.ɵɵpureFunction1(11, _c0$9, ctx.isControlInvalid(ctx.controlName)));
5304
+ i0.ɵɵadvance(2);
5305
+ i0.ɵɵproperty("formGroup", ctx.formGroup)("formSubmitted", ctx.formSubmitted)("formControlName", ctx.controlName);
5306
+ i0.ɵɵadvance(2);
5307
+ i0.ɵɵproperty("ngIf", ctx.isTitleVisible);
5308
+ i0.ɵɵadvance();
5309
+ i0.ɵɵproperty("formControlName", ctx.controlName);
5310
+ i0.ɵɵadvance();
5311
+ i0.ɵɵproperty("ngIf", ctx.isGoButtonVisible);
5312
+ } }, dependencies: [i1$2.NgClass, i1$2.NgIf, i2.DefaultValueAccessor, i2.NgControlStatus, i2.NgControlStatusGroup, i2.FormGroupDirective, i2.FormControlName, NativeElementDirective, ItemValidationSummaryComponent], encapsulation: 2 }); }
5313
+ }
5314
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(UrlSlugComponent, [{
5315
+ type: Component,
5316
+ 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" }]
5317
+ }], () => [], { urlPrefix: [{
5318
+ type: Input
5319
+ }], isGoButtonVisible: [{
5320
+ type: Input
5321
+ }], watchedControlName: [{
5322
+ type: Input
5323
+ }], generated: [{
5324
+ type: Output
5325
+ }] }); })();
5326
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(UrlSlugComponent, { className: "UrlSlugComponent", filePath: "lib\\ui\\components\\urlslug\\urlslug.component.ts", lineNumber: 28 }); })();
5327
+
5035
5328
  /*
5036
5329
  <file>
5037
5330
  Project:
@@ -5233,12 +5526,12 @@ class TimezoneDropdownlist extends EditComponentBase {
5233
5526
  </file>
5234
5527
  */
5235
5528
  //Node
5236
- const _c0$9 = [[["mex-card-header"]], [["mex-card-body"]], "*", [["mex-card-footer"]]];
5529
+ const _c0$8 = [[["mex-card-header"]], [["mex-card-body"]], "*", [["mex-card-footer"]]];
5237
5530
  const _c1 = ["mex-card-header", "mex-card-body", "*", "mex-card-footer"];
5238
5531
  class CardComponent extends ComponentBase {
5239
5532
  static { this.ɵfac = /*@__PURE__*/ (() => { let ɵCardComponent_BaseFactory; return function CardComponent_Factory(t) { return (ɵCardComponent_BaseFactory || (ɵCardComponent_BaseFactory = i0.ɵɵgetInheritedFactory(CardComponent)))(t || CardComponent); }; })(); }
5240
5533
  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);
5534
+ i0.ɵɵprojectionDef(_c0$8);
5242
5535
  i0.ɵɵelementStart(0, "div");
5243
5536
  i0.ɵɵprojection(1);
5244
5537
  i0.ɵɵprojection(2, 1);
@@ -5280,10 +5573,10 @@ function CardHeaderComponent_h3_1_Template(rf, ctx) { if (rf & 1) {
5280
5573
  i0.ɵɵadvance();
5281
5574
  i0.ɵɵtextInterpolate(ctx_r0.title);
5282
5575
  } }
5283
- const _c0$8 = ["*"];
5576
+ const _c0$7 = ["*"];
5284
5577
  class CardHeaderComponent extends ComponentBase {
5285
5578
  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) {
5579
+ 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
5580
  i0.ɵɵprojectionDef();
5288
5581
  i0.ɵɵelementStart(0, "div");
5289
5582
  i0.ɵɵtemplate(1, CardHeaderComponent_h3_1_Template, 2, 1, "h3", 0);
@@ -5317,10 +5610,10 @@ class CardHeaderComponent extends ComponentBase {
5317
5610
  </file>
5318
5611
  */
5319
5612
  //Node
5320
- const _c0$7 = ["*"];
5613
+ const _c0$6 = ["*"];
5321
5614
  class CardBodyComponent extends ComponentBase {
5322
5615
  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) {
5616
+ 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
5617
  i0.ɵɵprojectionDef();
5325
5618
  i0.ɵɵelementStart(0, "div");
5326
5619
  i0.ɵɵprojection(1);
@@ -5351,10 +5644,10 @@ class CardBodyComponent extends ComponentBase {
5351
5644
  </file>
5352
5645
  */
5353
5646
  //Node
5354
- const _c0$6 = ["*"];
5647
+ const _c0$5 = ["*"];
5355
5648
  class CardFooterComponent extends ComponentBase {
5356
5649
  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) {
5650
+ 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
5651
  i0.ɵɵprojectionDef();
5359
5652
  i0.ɵɵelementStart(0, "div");
5360
5653
  i0.ɵɵprojection(1);
@@ -5486,230 +5779,62 @@ class HtmlEditorComponentBase extends EditComponentBase {
5486
5779
  that.froalaEditorInitialized = true;
5487
5780
  that.onInitialized();
5488
5781
  }, 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));
5782
+ }
5783
+ onInitialized() {
5784
+ let actions = this.afterInitializedActions;
5785
+ // Clear actions
5786
+ this.afterInitializedActions = [];
5787
+ if (actions) {
5788
+ for (let i = 0; i < actions.length; i++) {
5789
+ actions[i]();
5611
5790
  }
5612
- });
5613
- return messages;
5791
+ }
5614
5792
  }
5615
- getValidationMessages(control, title) {
5616
- let messages = [];
5617
- let thing;
5618
- if (title) {
5619
- thing = title;
5793
+ getEditor() {
5794
+ if (this.froalaEditor)
5795
+ return this.froalaEditor.getEditor();
5796
+ return null;
5797
+ }
5798
+ // Public Funcs
5799
+ doAfterInitialized(action) {
5800
+ const that = this;
5801
+ if (!this.froalaEditorInitialized) {
5802
+ this.afterInitializedActions.push(() => {
5803
+ action(that);
5804
+ });
5620
5805
  }
5621
5806
  else {
5622
- thing = this.getControlTitle(control, null);
5623
- if (!thing) {
5624
- thing = control.path;
5625
- }
5807
+ action(that);
5626
5808
  }
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
- }
5809
+ }
5810
+ initializeControl(control) {
5811
+ this.froalaEditor = control;
5812
+ this.froalaEditor.initialize();
5813
+ }
5814
+ setUploadParams(uploadType, uploadParentId) {
5815
+ this.doAfterInitialized(function (that) {
5816
+ const editor = that.getEditor();
5817
+ if (typeof editor == "undefined" || editor == null) {
5818
+ return;
5651
5819
  }
5652
- }
5653
- return messages;
5820
+ editor.opts.imageUploadParams.uploadType = uploadType;
5821
+ editor.opts.imageUploadParams.uploadParentId = uploadParentId;
5822
+ });
5654
5823
  }
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 }); }
5824
+ static { this.ɵfac = function HtmlEditorComponentBase_Factory(t) { return new (t || HtmlEditorComponentBase)(); }; }
5825
+ 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
5826
  }
5658
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ValidationSummaryComponent, [{
5827
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(HtmlEditorComponentBase, [{
5659
5828
  type: Component,
5660
5829
  args: [{
5661
- template: ''
5830
+ template: "",
5662
5831
  }]
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 }); })();
5832
+ }], () => [], { editorLabelText: [{
5833
+ type: Input
5834
+ }], editorOptions: [{
5835
+ type: Input
5836
+ }] }); })();
5837
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(HtmlEditorComponentBase, { className: "HtmlEditorComponentBase", filePath: "lib\\ui\\components\\html-editor\\base-html-editor.component.ts", lineNumber: 31 }); })();
5713
5838
 
5714
5839
  /*
5715
5840
  <file>
@@ -5727,7 +5852,7 @@ class ItemValidationSummaryComponent extends ValidationSummaryComponent {
5727
5852
  </file>
5728
5853
  */
5729
5854
  //Node
5730
- const _c0$5 = a0 => ({ "has-error": a0 });
5855
+ const _c0$4 = a0 => ({ "has-error": a0 });
5731
5856
  class FormsHtmlEditorComponent extends HtmlEditorComponentBase {
5732
5857
  constructor() {
5733
5858
  super();
@@ -5749,7 +5874,7 @@ class FormsHtmlEditorComponent extends HtmlEditorComponentBase {
5749
5874
  i0.ɵɵelement(4, "anatoly-item-validation-summary", 3);
5750
5875
  i0.ɵɵelementEnd();
5751
5876
  } if (rf & 2) {
5752
- i0.ɵɵproperty("formGroup", ctx.formGroup)("ngClass", i0.ɵɵpureFunction1(8, _c0$5, ctx.isControlInvalid(ctx.editorFormKey)));
5877
+ i0.ɵɵproperty("formGroup", ctx.formGroup)("ngClass", i0.ɵɵpureFunction1(8, _c0$4, ctx.isControlInvalid(ctx.editorFormKey)));
5753
5878
  i0.ɵɵadvance(2);
5754
5879
  i0.ɵɵtextInterpolate(ctx.editorLabelText);
5755
5880
  i0.ɵɵadvance();
@@ -5964,7 +6089,7 @@ function ContactUsForm_button_38_Template(rf, ctx) { if (rf & 1) {
5964
6089
  const ctx_r2 = i0.ɵɵnextContext();
5965
6090
  i0.ɵɵclassProp("btn-primary", !ctx_r2.formGroup.invalid);
5966
6091
  } }
5967
- const _c0$4 = a0 => ({ "has-error": a0 });
6092
+ const _c0$3 = a0 => ({ "has-error": a0 });
5968
6093
  class ContactUsForm extends EditComponentBase {
5969
6094
  constructor(reCaptcha, fb, appContext, api, notificationService) {
5970
6095
  super();
@@ -6088,27 +6213,27 @@ class ContactUsForm extends EditComponentBase {
6088
6213
  i0.ɵɵadvance();
6089
6214
  i0.ɵɵproperty("formGroup", ctx.formGroup)("visible", ctx.formSubmitted && ctx.formGroup.invalid);
6090
6215
  i0.ɵɵadvance(6);
6091
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(21, _c0$4, ctx.isControlInvalid("topic")));
6216
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(21, _c0$3, ctx.isControlInvalid("topic")));
6092
6217
  i0.ɵɵadvance(5);
6093
6218
  i0.ɵɵproperty("ngForOf", ctx.topicList);
6094
6219
  i0.ɵɵadvance();
6095
6220
  i0.ɵɵproperty("formGroup", ctx.formGroup)("formSubmitted", ctx.formSubmitted);
6096
6221
  i0.ɵɵadvance();
6097
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(23, _c0$4, ctx.isControlInvalid("name")));
6222
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(23, _c0$3, ctx.isControlInvalid("name")));
6098
6223
  i0.ɵɵadvance(4);
6099
6224
  i0.ɵɵproperty("formGroup", ctx.formGroup)("formSubmitted", ctx.formSubmitted);
6100
6225
  i0.ɵɵadvance();
6101
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(25, _c0$4, ctx.isControlInvalid("email")));
6226
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(25, _c0$3, ctx.isControlInvalid("email")));
6102
6227
  i0.ɵɵadvance(4);
6103
6228
  i0.ɵɵproperty("ngIf", !ctx.isUserSignedIn);
6104
6229
  i0.ɵɵadvance();
6105
6230
  i0.ɵɵproperty("formGroup", ctx.formGroup)("formSubmitted", ctx.formSubmitted);
6106
6231
  i0.ɵɵadvance();
6107
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(27, _c0$4, ctx.isControlInvalid("subject")));
6232
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(27, _c0$3, ctx.isControlInvalid("subject")));
6108
6233
  i0.ɵɵadvance(4);
6109
6234
  i0.ɵɵproperty("formGroup", ctx.formGroup)("formSubmitted", ctx.formSubmitted);
6110
6235
  i0.ɵɵadvance(2);
6111
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(29, _c0$4, ctx.isControlInvalid("message")));
6236
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(29, _c0$3, ctx.isControlInvalid("message")));
6112
6237
  i0.ɵɵadvance(4);
6113
6238
  i0.ɵɵproperty("formGroup", ctx.formGroup)("formSubmitted", ctx.formSubmitted);
6114
6239
  i0.ɵɵadvance(3);
@@ -6141,7 +6266,7 @@ class ContactUsForm extends EditComponentBase {
6141
6266
  </file>
6142
6267
  */
6143
6268
  //Node
6144
- const _c0$3 = ["contactusform"];
6269
+ const _c0$2 = ["contactusform"];
6145
6270
  function ContactUsDialog_kendo_dialog_0_Template(rf, ctx) { if (rf & 1) {
6146
6271
  const _r3 = i0.ɵɵgetCurrentView();
6147
6272
  i0.ɵɵelementStart(0, "kendo-dialog", 1);
@@ -6178,7 +6303,7 @@ class ContactUsDialog extends DialogBase {
6178
6303
  }
6179
6304
  static { this.ɵfac = function ContactUsDialog_Factory(t) { return new (t || ContactUsDialog)(); }; }
6180
6305
  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);
6306
+ i0.ɵɵviewQuery(_c0$2, 5);
6182
6307
  } if (rf & 2) {
6183
6308
  let _t;
6184
6309
  i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.contactUsForm = _t.first);
@@ -6310,7 +6435,7 @@ function AddressComponent_div_17_option_4_Template(rf, ctx) { if (rf & 1) {
6310
6435
  i0.ɵɵadvance();
6311
6436
  i0.ɵɵtextInterpolate(state_r4.name);
6312
6437
  } }
6313
- const _c0$2 = a0 => ({ "has-error": a0 });
6438
+ const _c0$1 = a0 => ({ "has-error": a0 });
6314
6439
  function AddressComponent_div_17_Template(rf, ctx) { if (rf & 1) {
6315
6440
  const _r6 = i0.ɵɵgetCurrentView();
6316
6441
  i0.ɵɵelementStart(0, "div", 9)(1, "label", 4);
@@ -6324,7 +6449,7 @@ function AddressComponent_div_17_Template(rf, ctx) { if (rf & 1) {
6324
6449
  i0.ɵɵelementEnd();
6325
6450
  } if (rf & 2) {
6326
6451
  const ctx_r1 = i0.ɵɵnextContext();
6327
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(4, _c0$2, ctx_r1.isControlInvalid("address_stateOrRegion")));
6452
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(4, _c0$1, ctx_r1.isControlInvalid("address_stateOrRegion")));
6328
6453
  i0.ɵɵadvance(4);
6329
6454
  i0.ɵɵproperty("ngForOf", ctx_r1.usStateData);
6330
6455
  i0.ɵɵadvance();
@@ -6466,25 +6591,25 @@ class AddressComponent extends EditComponentBase {
6466
6591
  i0.ɵɵadvance(2);
6467
6592
  i0.ɵɵproperty("formGroup", ctx.formGroup);
6468
6593
  i0.ɵɵadvance();
6469
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(19, _c0$2, ctx.isControlInvalid("address_street")));
6594
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(19, _c0$1, ctx.isControlInvalid("address_street")));
6470
6595
  i0.ɵɵadvance(4);
6471
6596
  i0.ɵɵproperty("formGroup", ctx.formGroup)("formSubmitted", ctx.formSubmitted);
6472
6597
  i0.ɵɵadvance();
6473
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(21, _c0$2, ctx.isControlInvalid("address_street2")));
6598
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(21, _c0$1, ctx.isControlInvalid("address_street2")));
6474
6599
  i0.ɵɵadvance(2);
6475
6600
  i0.ɵɵproperty("formGroup", ctx.formGroup)("formSubmitted", ctx.formSubmitted);
6476
6601
  i0.ɵɵadvance();
6477
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(23, _c0$2, ctx.isControlInvalid("address_city")));
6602
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(23, _c0$1, ctx.isControlInvalid("address_city")));
6478
6603
  i0.ɵɵadvance(4);
6479
6604
  i0.ɵɵproperty("formGroup", ctx.formGroup)("formSubmitted", ctx.formSubmitted);
6480
6605
  i0.ɵɵadvance();
6481
6606
  i0.ɵɵproperty("ngIf", ctx.formGroup.value.address_country == "US");
6482
6607
  i0.ɵɵadvance();
6483
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(25, _c0$2, ctx.isControlInvalid("address_zipcode")));
6608
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(25, _c0$1, ctx.isControlInvalid("address_zipcode")));
6484
6609
  i0.ɵɵadvance(4);
6485
6610
  i0.ɵɵproperty("formGroup", ctx.formGroup)("formSubmitted", ctx.formSubmitted);
6486
6611
  i0.ɵɵadvance();
6487
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(27, _c0$2, ctx.isControlInvalid("address_country")));
6612
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(27, _c0$1, ctx.isControlInvalid("address_country")));
6488
6613
  i0.ɵɵadvance(4);
6489
6614
  i0.ɵɵproperty("ngForOf", ctx.countryData);
6490
6615
  i0.ɵɵadvance();
@@ -6523,7 +6648,7 @@ function CompanyComponent_anatoly_card_header_1_Template(rf, ctx) { if (rf & 1)
6523
6648
  const ctx_r0 = i0.ɵɵnextContext();
6524
6649
  i0.ɵɵproperty("title", ctx_r0.title);
6525
6650
  } }
6526
- const _c0$1 = a0 => ({ "has-error": a0 });
6651
+ const _c0 = a0 => ({ "has-error": a0 });
6527
6652
  class CompanyComponent extends EditComponentBase {
6528
6653
  //Inputs
6529
6654
  get company() {
@@ -6603,19 +6728,19 @@ class CompanyComponent extends EditComponentBase {
6603
6728
  i0.ɵɵadvance(2);
6604
6729
  i0.ɵɵproperty("formGroup", ctx.formGroup);
6605
6730
  i0.ɵɵadvance();
6606
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(14, _c0$1, ctx.isControlInvalid("company_name")));
6731
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(14, _c0, ctx.isControlInvalid("company_name")));
6607
6732
  i0.ɵɵadvance(4);
6608
6733
  i0.ɵɵproperty("formGroup", ctx.formGroup)("formSubmitted", ctx.formSubmitted);
6609
6734
  i0.ɵɵadvance();
6610
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(16, _c0$1, ctx.isControlInvalid("company_phone")));
6735
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(16, _c0, ctx.isControlInvalid("company_phone")));
6611
6736
  i0.ɵɵadvance(4);
6612
6737
  i0.ɵɵproperty("formGroup", ctx.formGroup)("formSubmitted", ctx.formSubmitted);
6613
6738
  i0.ɵɵadvance();
6614
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(18, _c0$1, ctx.isControlInvalid("company_email")));
6739
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(18, _c0, ctx.isControlInvalid("company_email")));
6615
6740
  i0.ɵɵadvance(4);
6616
6741
  i0.ɵɵproperty("formGroup", ctx.formGroup)("formSubmitted", ctx.formSubmitted);
6617
6742
  i0.ɵɵadvance();
6618
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(20, _c0$1, ctx.isControlInvalid("company_websiteUrl")));
6743
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(20, _c0, ctx.isControlInvalid("company_websiteUrl")));
6619
6744
  i0.ɵɵadvance(4);
6620
6745
  i0.ɵɵproperty("formGroup", ctx.formGroup)("formSubmitted", ctx.formSubmitted);
6621
6746
  } }, 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 +6753,6 @@ class CompanyComponent extends EditComponentBase {
6628
6753
  }] }); })();
6629
6754
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CompanyComponent, { className: "CompanyComponent", filePath: "lib\\ui\\forms\\components\\company\\company.component.ts", lineNumber: 28 }); })();
6630
6755
 
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
6756
  /*
6748
6757
  <file>
6749
6758
  Project:
@@ -7532,6 +7541,7 @@ const COMPONENTS = [
7532
7541
  PageSpinnerComponent,
7533
7542
  LoadingComponent,
7534
7543
  Copy2ClipboardComponent,
7544
+ UrlSlugComponent,
7535
7545
  //Dropdownlists
7536
7546
  CountryDropdownlist,
7537
7547
  TimezoneDropdownlist,
@@ -7551,7 +7561,6 @@ const COMPONENTS = [
7551
7561
  //Forms
7552
7562
  AddressComponent,
7553
7563
  CompanyComponent,
7554
- UrlSlugComponent,
7555
7564
  ContactUsForm,
7556
7565
  //Pipes
7557
7566
  SafeHtmlPipe,
@@ -7605,6 +7614,7 @@ class AnatolyUIModule {
7605
7614
  PageSpinnerComponent,
7606
7615
  LoadingComponent,
7607
7616
  Copy2ClipboardComponent,
7617
+ UrlSlugComponent,
7608
7618
  //Dropdownlists
7609
7619
  CountryDropdownlist,
7610
7620
  TimezoneDropdownlist,
@@ -7624,7 +7634,6 @@ class AnatolyUIModule {
7624
7634
  //Forms
7625
7635
  AddressComponent,
7626
7636
  CompanyComponent,
7627
- UrlSlugComponent,
7628
7637
  ContactUsForm,
7629
7638
  //Pipes
7630
7639
  SafeHtmlPipe,
@@ -7650,6 +7659,7 @@ class AnatolyUIModule {
7650
7659
  PageSpinnerComponent,
7651
7660
  LoadingComponent,
7652
7661
  Copy2ClipboardComponent,
7662
+ UrlSlugComponent,
7653
7663
  //Dropdownlists
7654
7664
  CountryDropdownlist,
7655
7665
  TimezoneDropdownlist,
@@ -7669,7 +7679,6 @@ class AnatolyUIModule {
7669
7679
  //Forms
7670
7680
  AddressComponent,
7671
7681
  CompanyComponent,
7672
- UrlSlugComponent,
7673
7682
  ContactUsForm,
7674
7683
  //Pipes
7675
7684
  SafeHtmlPipe,