@osovitny/anatoly 3.17.98 → 3.17.100

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