@osovitny/anatoly 3.17.99 → 3.17.101

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.
@@ -6843,6 +6843,174 @@ class CountryDropdownlist extends EditComponentBase {
6843
6843
  </file>
6844
6844
  */
6845
6845
 
6846
+ /*
6847
+ <file>
6848
+ Project:
6849
+ @osovitny/anatoly
6850
+
6851
+ Authors:
6852
+ Vadim Osovitny vadim.osovitny@osovitny.com
6853
+ Anatoly Osovitny anatoly.osovitny@osovitny.com
6854
+
6855
+ Created:
6856
+ 8 Dec 2017
6857
+
6858
+ Copyright (c) 2016-2025 Osovitny Inc. All rights reserved.
6859
+ </file>
6860
+ */
6861
+ //Node
6862
+ class ValidationSummaryComponent extends EditComponentBase {
6863
+ constructor() {
6864
+ super();
6865
+ }
6866
+ getControlTitle(control, name) {
6867
+ let title = undefined;
6868
+ if (control?.nativeElement) {
6869
+ title = this.getTitleAttribute(control.nativeElement);
6870
+ }
6871
+ return title ?? name;
6872
+ }
6873
+ getTitleAttribute(nativeElement) {
6874
+ let title;
6875
+ let element;
6876
+ let tagName = nativeElement.tagName;
6877
+ switch (tagName) {
6878
+ // For Kendo time and date picker element title is assigned to the 4th child control.
6879
+ case "KENDO-TIMEPICKER":
6880
+ case "KENDO-DATEPICKER":
6881
+ element = nativeElement.children[0]?.children[0]?.children[0]?.children[0];
6882
+ break;
6883
+ // For Kendo numaric element title is assigned to the 2nd child control.
6884
+ case "KENDO-NUMERICTEXTBOX":
6885
+ element = nativeElement.children[0]?.children[0];
6886
+ break;
6887
+ default:
6888
+ element = nativeElement;
6889
+ break;
6890
+ }
6891
+ if (element) {
6892
+ title = element.getAttribute("formControlTitle");
6893
+ if (!title) {
6894
+ title = element.getAttribute("title");
6895
+ }
6896
+ }
6897
+ return title;
6898
+ }
6899
+ getFormValidationMessages() {
6900
+ let messages = [];
6901
+ Object.keys(this.formGroup.controls).forEach((name) => {
6902
+ let control = this.formGroup.controls[name];
6903
+ if (control.controls != null) {
6904
+ Object.keys(control.controls).forEach((k) => {
6905
+ var child = control.controls[k];
6906
+ this.getValidationMessages(child, k).forEach((m) => messages.push(m));
6907
+ });
6908
+ }
6909
+ else {
6910
+ this.getValidationMessages(control, name).forEach((m) => messages.push(m));
6911
+ }
6912
+ });
6913
+ return messages;
6914
+ }
6915
+ getValidationMessages(control, name, title) {
6916
+ let messages = [];
6917
+ let thing;
6918
+ if (title) {
6919
+ thing = title;
6920
+ }
6921
+ else {
6922
+ thing = this.getControlTitle(control, name);
6923
+ if (!thing) {
6924
+ thing = control.path;
6925
+ }
6926
+ }
6927
+ if (control.errors) {
6928
+ for (let errorName in control.errors) {
6929
+ if (control.errors.hasOwnProperty(errorName)) {
6930
+ switch (errorName) {
6931
+ case "required":
6932
+ messages.push(`${thing} is required`);
6933
+ break;
6934
+ case "minlength":
6935
+ messages.push(`${thing} must be at least ${control.errors["minlength"].requiredLength} characters`);
6936
+ break;
6937
+ case "pattern":
6938
+ messages.push(`${thing} contains illegal characters`);
6939
+ break;
6940
+ case "format":
6941
+ messages.push(`${thing} format mismatch`);
6942
+ break;
6943
+ case "maxlength":
6944
+ messages.push(`${thing} must have maximum ${control.errors["maxlength"].requiredLength} characters`);
6945
+ break;
6946
+ case "specialcharacters":
6947
+ messages.push(`${thing} contains special characters`);
6948
+ break;
6949
+ }
6950
+ }
6951
+ }
6952
+ }
6953
+ return messages;
6954
+ }
6955
+ static { this.ɵfac = function ValidationSummaryComponent_Factory(t) { return new (t || ValidationSummaryComponent)(); }; }
6956
+ 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 }); }
6957
+ }
6958
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ValidationSummaryComponent, [{
6959
+ type: Component,
6960
+ args: [{
6961
+ template: ''
6962
+ }]
6963
+ }], () => [], null); })();
6964
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ValidationSummaryComponent, { className: "ValidationSummaryComponent", filePath: "lib\\ui\\validation\\validation-summary.component.ts", lineNumber: 27 }); })();
6965
+
6966
+ /*
6967
+ <file>
6968
+ Project:
6969
+ @osovitny/anatoly
6970
+
6971
+ Authors:
6972
+ Vadim Osovitny vadim.osovitny@osovitny.com
6973
+ Anatoly Osovitny anatoly.osovitny@osovitny.com
6974
+
6975
+ Created:
6976
+ 6 Dec 2017
6977
+
6978
+ Copyright (c) 2016-2025 Osovitny Inc. All rights reserved.
6979
+ </file>
6980
+ */
6981
+ //Node
6982
+ function ItemValidationSummaryComponent_ul_0_li_1_Template(rf, ctx) { if (rf & 1) {
6983
+ i0.ɵɵelementStart(0, "li")(1, "span", 3);
6984
+ i0.ɵɵtext(2);
6985
+ i0.ɵɵelementEnd()();
6986
+ } if (rf & 2) {
6987
+ const error_r2 = ctx.$implicit;
6988
+ i0.ɵɵadvance(2);
6989
+ i0.ɵɵtextInterpolate(error_r2);
6990
+ } }
6991
+ function ItemValidationSummaryComponent_ul_0_Template(rf, ctx) { if (rf & 1) {
6992
+ i0.ɵɵelementStart(0, "ul", 1);
6993
+ i0.ɵɵtemplate(1, ItemValidationSummaryComponent_ul_0_li_1_Template, 3, 1, "li", 2);
6994
+ i0.ɵɵelementEnd();
6995
+ } if (rf & 2) {
6996
+ const ctx_r0 = i0.ɵɵnextContext();
6997
+ i0.ɵɵadvance();
6998
+ i0.ɵɵproperty("ngForOf", ctx_r0.getValidationMessages(ctx_r0.formGroup.controls[ctx_r0.controlName], ctx_r0.controlName, ctx_r0.controlTitle));
6999
+ } }
7000
+ class ItemValidationSummaryComponent extends ValidationSummaryComponent {
7001
+ static { this.ɵfac = /*@__PURE__*/ (() => { let ɵItemValidationSummaryComponent_BaseFactory; return function ItemValidationSummaryComponent_Factory(t) { return (ɵItemValidationSummaryComponent_BaseFactory || (ɵItemValidationSummaryComponent_BaseFactory = i0.ɵɵgetInheritedFactory(ItemValidationSummaryComponent)))(t || ItemValidationSummaryComponent); }; })(); }
7002
+ 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) {
7003
+ i0.ɵɵtemplate(0, ItemValidationSummaryComponent_ul_0_Template, 2, 1, "ul", 0);
7004
+ } if (rf & 2) {
7005
+ i0.ɵɵproperty("ngIf", ctx.isControlInvalid(ctx.controlName));
7006
+ } }, dependencies: [i1$2.NgForOf, i1$2.NgIf], encapsulation: 2 }); }
7007
+ }
7008
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ItemValidationSummaryComponent, [{
7009
+ type: Component,
7010
+ 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], controlName, controlTitle)\">\r\n <span class=\"help-block\">{{ error }}</span>\r\n </li>\r\n</ul>\r\n\r\n" }]
7011
+ }], null, null); })();
7012
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ItemValidationSummaryComponent, { className: "ItemValidationSummaryComponent", filePath: "lib\\ui\\validation\\item-validation-summary.component.ts", lineNumber: 27 }); })();
7013
+
6846
7014
  /*
6847
7015
  <file>
6848
7016
  Project:
@@ -6887,7 +7055,7 @@ function ModerationStatusDropdownlist_div_1_kendo_label_1_Template(rf, ctx) { if
6887
7055
  function ModerationStatusDropdownlist_div_1_Template(rf, ctx) { if (rf & 1) {
6888
7056
  i0.ɵɵelementStart(0, "div", 1);
6889
7057
  i0.ɵɵtemplate(1, ModerationStatusDropdownlist_div_1_kendo_label_1_Template, 1, 1, "kendo-label", 3);
6890
- i0.ɵɵelement(2, "kendo-dropdownlist", 6);
7058
+ i0.ɵɵelement(2, "kendo-dropdownlist", 6)(3, "anatoly-item-validation-summary", 7);
6891
7059
  i0.ɵɵelementEnd();
6892
7060
  } if (rf & 2) {
6893
7061
  const ctx_r1 = i0.ɵɵnextContext();
@@ -6895,6 +7063,8 @@ function ModerationStatusDropdownlist_div_1_Template(rf, ctx) { if (rf & 1) {
6895
7063
  i0.ɵɵproperty("ngIf", ctx_r1.isTitleVisible);
6896
7064
  i0.ɵɵadvance();
6897
7065
  i0.ɵɵproperty("data", ctx_r1.items)("valuePrimitive", true)("formControlName", ctx_r1.controlName);
7066
+ i0.ɵɵadvance();
7067
+ i0.ɵɵproperty("formGroup", ctx_r1.formGroup)("formSubmitted", ctx_r1.formSubmitted)("controlName", ctx_r1.controlName);
6898
7068
  } }
6899
7069
  class ModerationStatusDropdownlist extends EnumEditComponentBase {
6900
7070
  constructor() {
@@ -6903,17 +7073,17 @@ class ModerationStatusDropdownlist extends EnumEditComponentBase {
6903
7073
  this.enumeration = ModerationStatus;
6904
7074
  }
6905
7075
  static { this.ɵfac = function ModerationStatusDropdownlist_Factory(t) { return new (t || ModerationStatusDropdownlist)(); }; }
6906
- static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ModerationStatusDropdownlist, selectors: [["anatoly-moderationstatus-dropdownlist"]], features: [i0.ɵɵInheritDefinitionFeature], decls: 2, vars: 2, consts: [["class", "form-group", 4, "ngIf"], [1, "form-group"], [1, "controls"], [3, "text", 4, "ngIf"], ["valueField", "value", "textField", "text", 3, "data", "valuePrimitive", "ngModel", "ngModelChange", "valueChange"], [3, "text"], ["valueField", "value", "textField", "text", 3, "data", "valuePrimitive", "formControlName"]], template: function ModerationStatusDropdownlist_Template(rf, ctx) { if (rf & 1) {
6907
- i0.ɵɵtemplate(0, ModerationStatusDropdownlist_div_0_Template, 4, 4, "div", 0)(1, ModerationStatusDropdownlist_div_1_Template, 3, 4, "div", 0);
7076
+ static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ModerationStatusDropdownlist, selectors: [["anatoly-moderationstatus-dropdownlist"]], features: [i0.ɵɵInheritDefinitionFeature], decls: 2, vars: 2, consts: [["class", "form-group", 4, "ngIf"], [1, "form-group"], [1, "controls"], [3, "text", 4, "ngIf"], ["valueField", "value", "textField", "text", 3, "data", "valuePrimitive", "ngModel", "ngModelChange", "valueChange"], [3, "text"], ["valueField", "value", "textField", "text", 3, "data", "valuePrimitive", "formControlName"], [3, "formGroup", "formSubmitted", "controlName"]], template: function ModerationStatusDropdownlist_Template(rf, ctx) { if (rf & 1) {
7077
+ i0.ɵɵtemplate(0, ModerationStatusDropdownlist_div_0_Template, 4, 4, "div", 0)(1, ModerationStatusDropdownlist_div_1_Template, 4, 7, "div", 0);
6908
7078
  } if (rf & 2) {
6909
7079
  i0.ɵɵproperty("ngIf", ctx.isNgModelBased);
6910
7080
  i0.ɵɵadvance();
6911
7081
  i0.ɵɵproperty("ngIf", !ctx.isNgModelBased);
6912
- } }, dependencies: [i1$2.NgIf, i2.NgControlStatus, i2.FormControlName, i2.NgModel, i3.DropDownListComponent, i4$1.LabelComponent, NativeElementDirective], encapsulation: 2 }); }
7082
+ } }, dependencies: [i1$2.NgIf, i2.NgControlStatus, i2.NgControlStatusGroup, i2.FormGroupDirective, i2.FormControlName, i2.NgModel, i3.DropDownListComponent, i4$1.LabelComponent, NativeElementDirective, ItemValidationSummaryComponent], encapsulation: 2 }); }
6913
7083
  }
6914
7084
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ModerationStatusDropdownlist, [{
6915
7085
  type: Component,
6916
- args: [{ selector: 'anatoly-moderationstatus-dropdownlist', template: "<div class=\"form-group\" *ngIf='isNgModelBased'>\r\n <div class=\"controls\">\r\n <kendo-label text=\"{{ title }}\" *ngIf='isTitleVisible'></kendo-label>\r\n <kendo-dropdownlist [data]=\"items\"\r\n valueField=\"value\" textField=\"text\"\r\n [valuePrimitive]=\"true\"\r\n [(ngModel)]=\"sv\"\r\n (valueChange)=\"onChange($event)\" />\r\n </div>\r\n</div>\r\n\r\n<div class=\"form-group\" *ngIf='!isNgModelBased'>\r\n <kendo-label text=\"{{ title }}\" *ngIf='isTitleVisible'></kendo-label>\r\n <kendo-dropdownlist [data]=\"items\"\r\n valueField=\"value\" textField=\"text\"\r\n [valuePrimitive]=\"true\"\r\n [formControlName]='controlName' />\r\n</div>\r\n" }]
7086
+ args: [{ selector: 'anatoly-moderationstatus-dropdownlist', template: "<div class=\"form-group\" *ngIf='isNgModelBased'>\r\n <div class=\"controls\">\r\n <kendo-label text=\"{{ title }}\" *ngIf='isTitleVisible'></kendo-label>\r\n <kendo-dropdownlist [data]=\"items\"\r\n valueField=\"value\" textField=\"text\"\r\n [valuePrimitive]=\"true\"\r\n [(ngModel)]=\"sv\"\r\n (valueChange)=\"onChange($event)\" />\r\n </div>\r\n</div>\r\n\r\n<div class=\"form-group\" *ngIf='!isNgModelBased'>\r\n <kendo-label text=\"{{ title }}\" *ngIf='isTitleVisible'></kendo-label>\r\n <kendo-dropdownlist [data]=\"items\"\r\n valueField=\"value\" textField=\"text\"\r\n [valuePrimitive]=\"true\"\r\n [formControlName]='controlName' />\r\n <anatoly-item-validation-summary [formGroup]='formGroup'\r\n [formSubmitted]='formSubmitted'\r\n [controlName]='controlName' />\r\n</div>\r\n" }]
6917
7087
  }], () => [], null); })();
6918
7088
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ModerationStatusDropdownlist, { className: "ModerationStatusDropdownlist", filePath: "lib\\ui\\components\\dropdownlists\\moderationstatus\\moderationstatus.dropdownlist.ts", lineNumber: 27 }); })();
6919
7089
 
@@ -6940,7 +7110,7 @@ function PublishStatusDropdownlist_div_0_kendo_label_2_Template(rf, ctx) { if (r
6940
7110
  } }
6941
7111
  function PublishStatusDropdownlist_div_0_Template(rf, ctx) { if (rf & 1) {
6942
7112
  const _r4 = i0.ɵɵgetCurrentView();
6943
- i0.ɵɵelementStart(0, "div", 1)(1, "div", 2);
7113
+ i0.ɵɵelementStart(0, "div")(1, "div", 2);
6944
7114
  i0.ɵɵtemplate(2, PublishStatusDropdownlist_div_0_kendo_label_2_Template, 1, 1, "kendo-label", 3);
6945
7115
  i0.ɵɵelementStart(3, "kendo-dropdownlist", 4);
6946
7116
  i0.ɵɵlistener("ngModelChange", function PublishStatusDropdownlist_div_0_Template_kendo_dropdownlist_ngModelChange_3_listener($event) { i0.ɵɵrestoreView(_r4); const ctx_r3 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r3.sv = $event); })("valueChange", function PublishStatusDropdownlist_div_0_Template_kendo_dropdownlist_valueChange_3_listener($event) { i0.ɵɵrestoreView(_r4); const ctx_r5 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r5.onChange($event)); });
@@ -6959,16 +7129,19 @@ function PublishStatusDropdownlist_div_1_kendo_label_1_Template(rf, ctx) { if (r
6959
7129
  i0.ɵɵpropertyInterpolate("text", ctx_r6.title);
6960
7130
  } }
6961
7131
  function PublishStatusDropdownlist_div_1_Template(rf, ctx) { if (rf & 1) {
6962
- i0.ɵɵelementStart(0, "div", 1);
7132
+ i0.ɵɵelementStart(0, "div", 6);
6963
7133
  i0.ɵɵtemplate(1, PublishStatusDropdownlist_div_1_kendo_label_1_Template, 1, 1, "kendo-label", 3);
6964
- i0.ɵɵelement(2, "kendo-dropdownlist", 6);
7134
+ i0.ɵɵelement(2, "kendo-dropdownlist", 7)(3, "anatoly-item-validation-summary", 8);
6965
7135
  i0.ɵɵelementEnd();
6966
7136
  } if (rf & 2) {
6967
7137
  const ctx_r1 = i0.ɵɵnextContext();
7138
+ i0.ɵɵproperty("formGroup", ctx_r1.formGroup);
6968
7139
  i0.ɵɵadvance();
6969
7140
  i0.ɵɵproperty("ngIf", ctx_r1.isTitleVisible);
6970
7141
  i0.ɵɵadvance();
6971
7142
  i0.ɵɵproperty("data", ctx_r1.items)("valuePrimitive", true)("formControlName", ctx_r1.controlName);
7143
+ i0.ɵɵadvance();
7144
+ i0.ɵɵproperty("formGroup", ctx_r1.formGroup)("formSubmitted", ctx_r1.formSubmitted)("controlName", ctx_r1.controlName)("controlTitle", ctx_r1.controlTitle);
6972
7145
  } }
6973
7146
  class PublishStatusDropdownlist extends EnumEditComponentBase {
6974
7147
  constructor() {
@@ -6977,17 +7150,17 @@ class PublishStatusDropdownlist extends EnumEditComponentBase {
6977
7150
  this.enumeration = PublishStatus;
6978
7151
  }
6979
7152
  static { this.ɵfac = function PublishStatusDropdownlist_Factory(t) { return new (t || PublishStatusDropdownlist)(); }; }
6980
- static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: PublishStatusDropdownlist, selectors: [["anatoly-publishstatus-dropdownlist"]], features: [i0.ɵɵInheritDefinitionFeature], decls: 2, vars: 2, consts: [["class", "form-group", 4, "ngIf"], [1, "form-group"], [1, "controls"], [3, "text", 4, "ngIf"], ["valueField", "value", "textField", "text", 3, "data", "valuePrimitive", "ngModel", "ngModelChange", "valueChange"], [3, "text"], ["valueField", "value", "textField", "text", 3, "data", "valuePrimitive", "formControlName"]], template: function PublishStatusDropdownlist_Template(rf, ctx) { if (rf & 1) {
6981
- i0.ɵɵtemplate(0, PublishStatusDropdownlist_div_0_Template, 4, 4, "div", 0)(1, PublishStatusDropdownlist_div_1_Template, 3, 4, "div", 0);
7153
+ static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: PublishStatusDropdownlist, selectors: [["anatoly-publishstatus-dropdownlist"]], features: [i0.ɵɵInheritDefinitionFeature], decls: 2, vars: 2, consts: [[4, "ngIf"], [3, "formGroup", 4, "ngIf"], [1, "controls"], [3, "text", 4, "ngIf"], ["valueField", "value", "textField", "text", 3, "data", "valuePrimitive", "ngModel", "ngModelChange", "valueChange"], [3, "text"], [3, "formGroup"], ["valueField", "value", "textField", "text", 3, "data", "valuePrimitive", "formControlName"], [3, "formGroup", "formSubmitted", "controlName", "controlTitle"]], template: function PublishStatusDropdownlist_Template(rf, ctx) { if (rf & 1) {
7154
+ i0.ɵɵtemplate(0, PublishStatusDropdownlist_div_0_Template, 4, 4, "div", 0)(1, PublishStatusDropdownlist_div_1_Template, 4, 9, "div", 1);
6982
7155
  } if (rf & 2) {
6983
7156
  i0.ɵɵproperty("ngIf", ctx.isNgModelBased);
6984
7157
  i0.ɵɵadvance();
6985
7158
  i0.ɵɵproperty("ngIf", !ctx.isNgModelBased);
6986
- } }, dependencies: [i1$2.NgIf, i2.NgControlStatus, i2.FormControlName, i2.NgModel, i3.DropDownListComponent, i4$1.LabelComponent, NativeElementDirective], encapsulation: 2 }); }
7159
+ } }, dependencies: [i1$2.NgIf, i2.NgControlStatus, i2.NgControlStatusGroup, i2.FormGroupDirective, i2.FormControlName, i2.NgModel, i3.DropDownListComponent, i4$1.LabelComponent, NativeElementDirective, ItemValidationSummaryComponent], encapsulation: 2 }); }
6987
7160
  }
6988
7161
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(PublishStatusDropdownlist, [{
6989
7162
  type: Component,
6990
- args: [{ selector: 'anatoly-publishstatus-dropdownlist', template: "<div class=\"form-group\" *ngIf='isNgModelBased'>\r\n <div class=\"controls\">\r\n <kendo-label text=\"{{ title }}\" *ngIf='isTitleVisible'></kendo-label>\r\n <kendo-dropdownlist [data]=\"items\"\r\n valueField=\"value\" textField=\"text\"\r\n [valuePrimitive]=\"true\"\r\n [(ngModel)]=\"sv\"\r\n (valueChange)=\"onChange($event)\" />\r\n </div>\r\n</div>\r\n\r\n<div class=\"form-group\" *ngIf='!isNgModelBased'>\r\n <kendo-label text=\"{{ title }}\" *ngIf='isTitleVisible'></kendo-label>\r\n <kendo-dropdownlist [data]=\"items\"\r\n valueField=\"value\" textField=\"text\"\r\n [valuePrimitive]=\"true\"\r\n [formControlName]='controlName' />\r\n</div>\r\n" }]
7163
+ args: [{ selector: 'anatoly-publishstatus-dropdownlist', template: "<div *ngIf='isNgModelBased'>\r\n <div class=\"controls\">\r\n <kendo-label text=\"{{ title }}\" *ngIf='isTitleVisible'></kendo-label>\r\n <kendo-dropdownlist [data]=\"items\"\r\n valueField=\"value\" textField=\"text\"\r\n [valuePrimitive]=\"true\"\r\n [(ngModel)]=\"sv\"\r\n (valueChange)=\"onChange($event)\" />\r\n </div>\r\n</div>\r\n\r\n<div *ngIf='!isNgModelBased' [formGroup]='formGroup'>\r\n <kendo-label text=\"{{ title }}\" *ngIf='isTitleVisible'></kendo-label>\r\n <kendo-dropdownlist [data]=\"items\"\r\n valueField=\"value\" textField=\"text\"\r\n [valuePrimitive]=\"true\"\r\n [formControlName]='controlName' />\r\n <anatoly-item-validation-summary [formGroup]='formGroup'\r\n [formSubmitted]='formSubmitted'\r\n [controlName]='controlName'\r\n [controlTitle]='controlTitle' />\r\n</div>\r\n" }]
6991
7164
  }], () => [], null); })();
6992
7165
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(PublishStatusDropdownlist, { className: "PublishStatusDropdownlist", filePath: "lib\\ui\\components\\dropdownlists\\publishstatus\\publishstatus.dropdownlist.ts", lineNumber: 27 }); })();
6993
7166
 
@@ -7268,174 +7441,6 @@ class HtmlEditorComponentBase extends EditComponentBase {
7268
7441
  }] }); })();
7269
7442
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(HtmlEditorComponentBase, { className: "HtmlEditorComponentBase", filePath: "lib\\ui\\components\\html-editor\\base-html-editor.component.ts", lineNumber: 31 }); })();
7270
7443
 
7271
- /*
7272
- <file>
7273
- Project:
7274
- @osovitny/anatoly
7275
-
7276
- Authors:
7277
- Vadim Osovitny vadim.osovitny@osovitny.com
7278
- Anatoly Osovitny anatoly.osovitny@osovitny.com
7279
-
7280
- Created:
7281
- 8 Dec 2017
7282
-
7283
- Copyright (c) 2016-2025 Osovitny Inc. All rights reserved.
7284
- </file>
7285
- */
7286
- //Node
7287
- class ValidationSummaryComponent extends EditComponentBase {
7288
- constructor() {
7289
- super();
7290
- }
7291
- getControlTitle(control, name) {
7292
- if (control?.nativeElement) {
7293
- let value = this.getTitleAttribute(control.nativeElement);
7294
- return value ? value : name;
7295
- }
7296
- return undefined;
7297
- }
7298
- getTitleAttribute(nativeElement) {
7299
- let title;
7300
- let element;
7301
- let tagName = nativeElement.tagName;
7302
- switch (tagName) {
7303
- // For Kendo time and date picker element title is assigned to the 4th child control.
7304
- case "KENDO-TIMEPICKER":
7305
- case "KENDO-DATEPICKER":
7306
- element = nativeElement.children[0]?.children[0]?.children[0]?.children[0];
7307
- break;
7308
- // For Kendo numaric element title is assigned to the 2nd child control.
7309
- case "KENDO-NUMERICTEXTBOX":
7310
- element = nativeElement.children[0]?.children[0];
7311
- break;
7312
- default:
7313
- element = nativeElement;
7314
- break;
7315
- }
7316
- if (element) {
7317
- title = element.getAttribute("formControlTitle");
7318
- if (!title) {
7319
- title = element.getAttribute("title");
7320
- }
7321
- }
7322
- return title;
7323
- }
7324
- getFormValidationMessages() {
7325
- let messages = [];
7326
- Object.keys(this.formGroup.controls).forEach((k) => {
7327
- let control = this.formGroup.controls[k];
7328
- if (control.controls != null) {
7329
- Object.keys(control.controls).forEach((k) => {
7330
- var child = control.controls[k];
7331
- this.getValidationMessages(child, this.getControlTitle(child, k)).forEach((m) => messages.push(m));
7332
- });
7333
- }
7334
- else {
7335
- this.getValidationMessages(control, this.getControlTitle(control, k)).forEach((m) => messages.push(m));
7336
- }
7337
- });
7338
- return messages;
7339
- }
7340
- getValidationMessages(control, title) {
7341
- let messages = [];
7342
- let thing;
7343
- if (title) {
7344
- thing = title;
7345
- }
7346
- else {
7347
- thing = this.getControlTitle(control, null);
7348
- if (!thing) {
7349
- thing = control.path;
7350
- }
7351
- }
7352
- if (control.errors) {
7353
- for (let errorName in control.errors) {
7354
- if (control.errors.hasOwnProperty(errorName)) {
7355
- switch (errorName) {
7356
- case "required":
7357
- messages.push(`${thing} is required`);
7358
- break;
7359
- case "minlength":
7360
- messages.push(`${thing} must be at least ${control.errors["minlength"].requiredLength} characters`);
7361
- break;
7362
- case "pattern":
7363
- messages.push(`${thing} contains illegal characters`);
7364
- break;
7365
- case "format":
7366
- messages.push(`${thing} format mismatch`);
7367
- break;
7368
- case "maxlength":
7369
- messages.push(`${thing} must have maximum ${control.errors["maxlength"].requiredLength} characters`);
7370
- break;
7371
- case "specialcharacters":
7372
- messages.push(`${thing} contains special characters`);
7373
- break;
7374
- }
7375
- }
7376
- }
7377
- }
7378
- return messages;
7379
- }
7380
- static { this.ɵfac = function ValidationSummaryComponent_Factory(t) { return new (t || ValidationSummaryComponent)(); }; }
7381
- 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 }); }
7382
- }
7383
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ValidationSummaryComponent, [{
7384
- type: Component,
7385
- args: [{
7386
- template: ''
7387
- }]
7388
- }], () => [], null); })();
7389
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ValidationSummaryComponent, { className: "ValidationSummaryComponent", filePath: "lib\\ui\\validation\\validation-summary.component.ts", lineNumber: 27 }); })();
7390
-
7391
- /*
7392
- <file>
7393
- Project:
7394
- @osovitny/anatoly
7395
-
7396
- Authors:
7397
- Vadim Osovitny vadim.osovitny@osovitny.com
7398
- Anatoly Osovitny anatoly.osovitny@osovitny.com
7399
-
7400
- Created:
7401
- 6 Dec 2017
7402
-
7403
- Copyright (c) 2016-2025 Osovitny Inc. All rights reserved.
7404
- </file>
7405
- */
7406
- //Node
7407
- function ItemValidationSummaryComponent_ul_0_li_1_Template(rf, ctx) { if (rf & 1) {
7408
- i0.ɵɵelementStart(0, "li")(1, "span", 3);
7409
- i0.ɵɵtext(2);
7410
- i0.ɵɵelementEnd()();
7411
- } if (rf & 2) {
7412
- const error_r2 = ctx.$implicit;
7413
- i0.ɵɵadvance(2);
7414
- i0.ɵɵtextInterpolate(error_r2);
7415
- } }
7416
- function ItemValidationSummaryComponent_ul_0_Template(rf, ctx) { if (rf & 1) {
7417
- i0.ɵɵelementStart(0, "ul", 1);
7418
- i0.ɵɵtemplate(1, ItemValidationSummaryComponent_ul_0_li_1_Template, 3, 1, "li", 2);
7419
- i0.ɵɵelementEnd();
7420
- } if (rf & 2) {
7421
- const ctx_r0 = i0.ɵɵnextContext();
7422
- i0.ɵɵadvance();
7423
- i0.ɵɵproperty("ngForOf", ctx_r0.getValidationMessages(ctx_r0.formGroup.controls[ctx_r0.controlName]));
7424
- } }
7425
- class ItemValidationSummaryComponent extends ValidationSummaryComponent {
7426
- static { this.ɵfac = /*@__PURE__*/ (() => { let ɵItemValidationSummaryComponent_BaseFactory; return function ItemValidationSummaryComponent_Factory(t) { return (ɵItemValidationSummaryComponent_BaseFactory || (ɵItemValidationSummaryComponent_BaseFactory = i0.ɵɵgetInheritedFactory(ItemValidationSummaryComponent)))(t || ItemValidationSummaryComponent); }; })(); }
7427
- 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) {
7428
- i0.ɵɵtemplate(0, ItemValidationSummaryComponent_ul_0_Template, 2, 1, "ul", 0);
7429
- } if (rf & 2) {
7430
- i0.ɵɵproperty("ngIf", ctx.isControlInvalid(ctx.controlName));
7431
- } }, dependencies: [i1$2.NgForOf, i1$2.NgIf], encapsulation: 2 }); }
7432
- }
7433
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ItemValidationSummaryComponent, [{
7434
- type: Component,
7435
- 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" }]
7436
- }], null, null); })();
7437
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ItemValidationSummaryComponent, { className: "ItemValidationSummaryComponent", filePath: "lib\\ui\\validation\\item-validation-summary.component.ts", lineNumber: 27 }); })();
7438
-
7439
7444
  /*
7440
7445
  <file>
7441
7446
  Project: