mmhglobal-dynamicform 1.1.40 → 1.1.43

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -3,6 +3,15 @@
3
3
  This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 11.2.13.
4
4
 
5
5
  ## Changelog
6
+ `1.1.43`<br/>
7
+ [ztree] - enhance to have expand & select 1 node and collapse 1 node<br/>
8
+
9
+ `1.1.42`<br/>
10
+ [zselectmultiple] - enhance to support ButtonList for zselectmultiple.<br/>
11
+
12
+ `1.1.41`<br/>
13
+ [mainservice] check event if not null, check for zudf form if applicable.<br/>
14
+
6
15
  `1.1.40`<br/>
7
16
  [ztextarea] enhance to allow onchange.<br/>
8
17
 
@@ -1551,8 +1551,10 @@
1551
1551
  MainService.prototype.newModel = function (event, group) {
1552
1552
  var _this = this;
1553
1553
  var _group = group;
1554
- if (event.data && event.data.SubType) {
1555
- _group = group['_' + event.data.SubType];
1554
+ if (event) {
1555
+ if (event.data && event.data.SubType) {
1556
+ _group = group['_' + event.data.SubType];
1557
+ }
1556
1558
  }
1557
1559
  rxjs.of([])
1558
1560
  .pipe(operators.switchMap(function (zmodel) {
@@ -1606,9 +1608,11 @@
1606
1608
  var createModelres = null;
1607
1609
  var fg = group.form;
1608
1610
  var _group = group;
1609
- if (event.data && event.data.SubType) {
1610
- fg = group['_' + event.data.SubType].form;
1611
- _group = group['_' + event.data.SubType];
1611
+ if (event) {
1612
+ if (event.data && event.data.SubType) {
1613
+ fg = group['_' + event.data.SubType].form;
1614
+ _group = group['_' + event.data.SubType];
1615
+ }
1612
1616
  }
1613
1617
  if (!fg.dirty) {
1614
1618
  console.warn("Form is not dirty hence record is not save.");
@@ -1683,9 +1687,11 @@
1683
1687
  var _this = this;
1684
1688
  var fg = group.form;
1685
1689
  var _group = group;
1686
- if (event.data && event.data.SubType) {
1687
- fg = group['_' + event.data.SubType].form;
1688
- _group = group['_' + event.data.SubType];
1690
+ if (event) {
1691
+ if (event.data && event.data.SubType) {
1692
+ fg = group['_' + event.data.SubType].form;
1693
+ _group = group['_' + event.data.SubType];
1694
+ }
1689
1695
  }
1690
1696
  if (!fg.dirty) {
1691
1697
  console.warn("Form is not dirty hence record is not save.");
@@ -1736,8 +1742,10 @@
1736
1742
  };
1737
1743
  MainService.prototype.cloneNewModel = function (event, group) {
1738
1744
  var _group = group;
1739
- if (event.data && event.data.SubType) {
1740
- _group = group['_' + event.data.SubType];
1745
+ if (event) {
1746
+ if (event.data && event.data.SubType) {
1747
+ _group = group['_' + event.data.SubType];
1748
+ }
1741
1749
  }
1742
1750
  Object.assign(_group.zModel, _group.form.value);
1743
1751
  _group.zModel.Id = 0;
@@ -1756,9 +1764,11 @@
1756
1764
  var _this = this;
1757
1765
  var fg = group.form;
1758
1766
  var _group = group;
1759
- if (event.data && event.data.SubType) {
1760
- fg = group['_' + event.data.SubType].form;
1761
- _group = group['_' + event.data.SubType];
1767
+ if (event) {
1768
+ if (event.data && event.data.SubType) {
1769
+ fg = group['_' + event.data.SubType].form;
1770
+ _group = group['_' + event.data.SubType];
1771
+ }
1762
1772
  }
1763
1773
  rxjs.of(_group.zModel)
1764
1774
  .pipe(operators.switchMap(function (zmodel) {
@@ -8716,6 +8726,16 @@
8716
8726
  });
8717
8727
  }
8718
8728
  }
8729
+ // Handle Button beside dropdown
8730
+ this.buttonList = this.data.ButtonList;
8731
+ if (this.buttonList) {
8732
+ this.buttonList.forEach(function (button) {
8733
+ if (button.tooltip) {
8734
+ button.tooltip = i3.ZComponentHelper.getGroupEvalValue.call(_this, button.tooltip);
8735
+ }
8736
+ });
8737
+ }
8738
+ // dropdown configuration
8719
8739
  this.allowCustomValue = this.data.AllowCustomValue || false; // Allow enter text in dropdownbox
8720
8740
  var fieldValue = this.data.Value;
8721
8741
  var data = this.data;
@@ -9142,12 +9162,15 @@
9142
9162
  }
9143
9163
  return 'ion-row divselectmultiple';
9144
9164
  };
9165
+ ZselectmultipleComponent.prototype.getFontAwesome = function (iconName) {
9166
+ return i3.ZComponentHelper.getFontAwesome(iconName);
9167
+ };
9145
9168
  return ZselectmultipleComponent;
9146
9169
  }());
9147
9170
  ZselectmultipleComponent.decorators = [
9148
9171
  { type: i0.Component, args: [{
9149
9172
  selector: "app-zselectmultiple",
9150
- template: "<ion-item [ngClass]=\"getClass(form, data)\" *ngIf=\"(!!componentProperties.isVisibleField ? group[componentProperties.isVisibleField] : componentProperties.isVisible) && isMobileScreen()\">\r\n\r\n <ion-label *ngIf=\"data.ShowLabel === undefined || data.ShowLabel\" position=\"stacked\">\r\n {{data.Label}}\r\n <ion-text *ngIf=\"componentProperties.isRequired\" color=\"danger\">*</ion-text>\r\n </ion-label>\r\n\r\n <kendo-label *ngIf=\"data.TooltipsInfo && !showTooltipsInfoIcon && !showTooltipsInfoBySide\"\r\n [text]=\"tooltipsDisplayText\"\r\n [class]=\"setTooltipsInfoClass()\"\r\n [style.color]=\"setTooltipsInfoColor()\"></kendo-label>\r\n <div [class]=\"setTooltipsInfoSideBySide()\" *ngIf=\"!isLoading\">\r\n <div style=\"flex-grow: 1;\">\r\n <ionic-selectable #selectComponent item-content\r\n searchFailText=\"Nothing found :(\"\r\n headerColor=\"primary\"\r\n clearButtonText=\"Clear\"\r\n [(ngModel)]=\"group.zModel[data.Value]\"\r\n [id]=\"data.Value\"\r\n [items]=\"getItemsData()\"\r\n [itemValueField]=\"itemValueField\"\r\n [itemTextField]=\"itemTextField\"\r\n [canAddItem]=\"!!data.OnAddItem\"\r\n [canClear]=\"true\"\r\n [placeholder]=\"data.PlaceHolder\"\r\n [canSearch]=\"!data['disable-search']\"\r\n [shouldFocusSearchbar]=\"!data['disable-search']\"\r\n [hasInfiniteScroll]=\"!!data.HasInfiniteScroll\"\r\n [isMultiple]=\"data.Multiple\"\r\n [isEnabled]=\"!(!!componentProperties.isReadOnlyField ? group[componentProperties.isReadOnlyField] : componentProperties.isReadOnly)\"\r\n [shouldStoreItemValue]=\"true\"\r\n (onSearch)=\"onSearch($event)\"\r\n (onInfiniteScroll)=\"getInfiniteData($event)\"\r\n (onAddItem)=\"onAddItem($event)\"\r\n (onChange)=\"onChange($event)\">\r\n\r\n <ng-template ionicSelectableItemIconTemplate\r\n let-item=\"item\"\r\n let-isItemSelected=\"isItemSelected\">\r\n <fa-icon slot=\"start\"\r\n class=\"isItemSelected\"\r\n size=\"sm\"\r\n [icon]=\"['far', isItemSelected ? 'check-circle': 'circle']\"\r\n [styles]=\"{'color': isItemSelected ? 'dodgerBlue' : 'lightGray'}\"></fa-icon>\r\n </ng-template>\r\n\r\n <ng-template ionicSelectableCloseButtonTemplate>\r\n <!-- <ion-icon name=\"close-circle\"></ion-icon> -->\r\n <fa-icon [icon]=\"'times-circle'\" size=\"md\"></fa-icon>\r\n </ng-template>\r\n\r\n <ng-template ionicSelectableTitleTemplate>\r\n {{data.Label}}\r\n <ion-text *ngIf=\"getIsRequiredValue()\" color=\"danger\">*</ion-text>\r\n </ng-template>\r\n\r\n <ng-template ionicSelectableItemTemplate let-item=\"item\">\r\n {{ getItemTemplate(item, data, group, itemValueField, itemTextField) }}\r\n <!-- <ng-template zselectitemelement [item]=\"item\"></ng-template> -->\r\n </ng-template>\r\n\r\n <!--<ng-template ionicSelectableFooterTemplate>\r\n <ion-toolbar>\r\n <ion-row>\r\n <ion-col>\r\n <ion-button expand=\"full\" ng-reflect-disabled=\"false\" ng-reflect-expand=\"full\" class=\"button button-full button-solid ion-activatable ion-focusable hydrated\" (click)=\"clearItems()\">\r\n Clear\r\n </ion-button>\r\n </ion-col>\r\n <ion-col>\r\n <ion-button expand=\"full\" ng-reflect-disabled=\"false\" ng-reflect-expand=\"full\" class=\"button button-full button-solid ion-activatable ion-focusable hydrated\" (click)=\"confirmItems()\">\r\n OK\r\n </ion-button>\r\n </ion-col>\r\n </ion-row>\r\n </ion-toolbar>\r\n </ng-template>-->\r\n </ionic-selectable>\r\n </div>\r\n <app-uivalidationmessage [group]=\"group\" [data]=\"data\" [form]=\"form\"></app-uivalidationmessage>\r\n <!-- side by side and desktop tooltipsinfo -->\r\n <kendo-label *ngIf=\"tooltipsInfo && !showTooltipsInfoIcon && showTooltipsInfoBySide\"\r\n [text]=\"tooltipsDisplayText\"\r\n [class]=\"setTooltipsInfoClass()\"\r\n [style.color]=\"setTooltipsInfoColor()\"></kendo-label>\r\n </div>\r\n</ion-item>\r\n\r\n\r\n\r\n<ion-item [ngClass]=\"getClass(form, data)\" [formGroup]=\"form\" *ngIf=\"(!!componentProperties.isVisibleField ? group[componentProperties.isVisibleField] : componentProperties.isVisible) && !isMobileScreen()\" [ngClass]=\"getIon_InvalidClass(form, data)\">\r\n <ion-label [attr.for]=\"data.Value\" *ngIf=\"data.ShowLabel === undefined || data.ShowLabel\" position=\"stacked\">\r\n {{data.Label}}\r\n <ion-text *ngIf=\"(!!componentProperties.isRequiredField ? group[componentProperties.isRequiredField] : componentProperties.isRequired)\" color=\"danger\">*</ion-text>\r\n <span kendoTooltip\r\n *ngIf=\"data.TooltipsInfo && showTooltipsInfoIcon\"\r\n [title]=\"tooltipsDisplayText\">\r\n <fa-icon [icon]=\"tooltipsDisplayIcon\"\r\n class=\"tooltipsinfo-icon\">\r\n </fa-icon>\r\n </span>\r\n </ion-label>\r\n <!-- mobile tooltipsinfo below label-->\r\n <div [class]=\"setTooltipsInfoSideBySide()\">\r\n <div style=\"flex: 1;\">\r\n <kendo-combobox *ngIf=\"!data.Multiple\"\r\n #comboboxComponent\r\n [data]=\"getItemsData()\"\r\n [valueField]=\"itemValueField\"\r\n [textField]=\"itemTextField\"\r\n [formControlName]=\"data.Value\"\r\n [valuePrimitive]=\"true\"\r\n [placeholder]=\"data.PlaceHolder\"\r\n [allowCustom]=\"allowCustomValue\"\r\n [suggest]=\"true\"\r\n [filterable]=\"!!data.HasInfiniteScroll\"\r\n [openOnFocus]=\"disableOpenOnFocus(comboboxComponent)\"\r\n [readonly]=\"(!!componentProperties.isReadOnlyField ? group[componentProperties.isReadOnlyField] : componentProperties.isReadOnly)\"\r\n [ngClass]=\"{'disabled' : (!!componentProperties.isReadOnlyField ? group[componentProperties.isReadOnlyField] : componentProperties.isReadOnly)}\"\r\n [loading]=\"isLoading\"\r\n (valueChange)=\"onValueChange($event)\"\r\n (filterChange)=\"handleFilter($event)\"\r\n [virtual]=\"virtual\"\r\n (open)=\"handleOpen()\"\r\n (close)=\"handleClose()\"\r\n (blur)=\"handleBlur()\"\r\n style=\"margin-top: 7px; width: 100%;\">\r\n <ng-template kendoComboBoxItemTemplate let-dataItem>\r\n {{ getItemTemplate(dataItem, data, group, itemValueField, itemTextField) }}\r\n <!-- <span class=\"template\">{{ dataItem.value }}</span> {{ dataItem.text }} -->\r\n </ng-template>\r\n <ng-template kendoTextBoxSuffixTemplate>\r\n\r\n <!-- For Validation feature -->\r\n <app-uivalidationmessage [group]=\"group\"\r\n [data]=\"data\"\r\n [form]=\"form\"\r\n class=\"validation-icon\"></app-uivalidationmessage>\r\n </ng-template>\r\n </kendo-combobox>\r\n <kendo-multiselect *ngIf=\"data.Multiple\"\r\n [data]=\"getItemsData()\"\r\n [valueField]=\"itemValueField\"\r\n [textField]=\"itemTextField\"\r\n [formControlName]=\"data.Value\"\r\n [valuePrimitive]=\"true\"\r\n [placeholder]=\"data.PlaceHolder\"\r\n [allowCustom]=\"allowCustomValue\"\r\n [filterable]=\"!!data.HasInfiniteScroll\"\r\n [checkboxes]=\"data.EnableCheckbox\"\r\n [loading]=\"isLoading\"\r\n [autoClose]=\"autoClose\"\r\n [readonly]=\"(!!componentProperties.isReadOnlyField ? group[componentProperties.isReadOnlyField] : componentProperties.isReadOnly)\"\r\n [ngClass]=\"{'disabled' : (!!componentProperties.isReadOnlyField ? group[componentProperties.isReadOnlyField] : componentProperties.isReadOnly)}\"\r\n (valueChange)=\"onValueChange($event)\"\r\n (filterChange)=\"handleFilter($event)\"\r\n (open)=\"handleOpen()\"\r\n (close)=\"handleClose()\"\r\n (blur)=\"handleBlur()\"\r\n style=\"margin-top: 7px; width: 100%;\">\r\n <ng-template kendoMultiSelectItemTemplate let-dataItem>\r\n {{ getItemTemplate(dataItem, data, group, itemValueField, itemTextField) }}\r\n <!-- <span class=\"template\">{{ dataItem.value }}</span> {{ dataItem.text }} -->\r\n </ng-template>\r\n </kendo-multiselect>\r\n </div>\r\n\r\n <div *ngFor=\"let item of iconList\">\r\n <div kendoTooltip style=\"text-align: center; padding-top: 10px;\"\r\n showOn=\"hover\"\r\n [tooltipWidth]=\"item.Width\"\r\n [position]=\"item.Position\">\r\n <span *ngIf=\"!!item && item.Color\"\r\n (click)=\"onIconClick(item.Click)\"\r\n [title]=\"item.Tooltip\"\r\n style=\"margin-top: 10px;\">\r\n <fa-icon [icon]=\"item.Icon\"\r\n [ngStyle]=\"{'padding': '4px 6px', 'color': (item.Color ? item.Color : 'black')}\"></fa-icon>\r\n </span>\r\n </div>\r\n </div>\r\n\r\n <app-uivalidationmessage [group]=\"group\"\r\n [data]=\"data\"\r\n [form]=\"form\"></app-uivalidationmessage>\r\n\r\n <!-- side by side and desktop tooltipsinfo -->\r\n <kendo-label *ngIf=\"tooltipsInfo && !showTooltipsInfoIcon && ((showTooltipsInfoBySide && isMobileScreen()) || !isMobileScreen())\"\r\n [text]=\"tooltipsDisplayText\"\r\n [class]=\"setTooltipsInfoClass()\"\r\n [style.color]=\"setTooltipsInfoColor()\"></kendo-label>\r\n\r\n </div>\r\n</ion-item>\r\n",
9173
+ template: "<ion-item [ngClass]=\"getClass(form, data)\" *ngIf=\"(!!componentProperties.isVisibleField ? group[componentProperties.isVisibleField] : componentProperties.isVisible) && isMobileScreen()\">\r\n\r\n <ion-label *ngIf=\"data.ShowLabel === undefined || data.ShowLabel\" position=\"stacked\">\r\n {{data.Label}}\r\n <ion-text *ngIf=\"componentProperties.isRequired\" color=\"danger\">*</ion-text>\r\n </ion-label>\r\n\r\n <kendo-label *ngIf=\"data.TooltipsInfo && !showTooltipsInfoIcon && !showTooltipsInfoBySide\"\r\n [text]=\"tooltipsDisplayText\"\r\n [class]=\"setTooltipsInfoClass()\"\r\n [style.color]=\"setTooltipsInfoColor()\"></kendo-label>\r\n <div [class]=\"setTooltipsInfoSideBySide()\" *ngIf=\"!isLoading\">\r\n <div style=\"flex-grow: 1;\">\r\n <ionic-selectable #selectComponent item-content\r\n searchFailText=\"Nothing found :(\"\r\n headerColor=\"primary\"\r\n clearButtonText=\"Clear\"\r\n [(ngModel)]=\"group.zModel[data.Value]\"\r\n [id]=\"data.Value\"\r\n [items]=\"getItemsData()\"\r\n [itemValueField]=\"itemValueField\"\r\n [itemTextField]=\"itemTextField\"\r\n [canAddItem]=\"!!data.OnAddItem\"\r\n [canClear]=\"true\"\r\n [placeholder]=\"data.PlaceHolder\"\r\n [canSearch]=\"!data['disable-search']\"\r\n [shouldFocusSearchbar]=\"!data['disable-search']\"\r\n [hasInfiniteScroll]=\"!!data.HasInfiniteScroll\"\r\n [isMultiple]=\"data.Multiple\"\r\n [isEnabled]=\"!(!!componentProperties.isReadOnlyField ? group[componentProperties.isReadOnlyField] : componentProperties.isReadOnly)\"\r\n [shouldStoreItemValue]=\"true\"\r\n (onSearch)=\"onSearch($event)\"\r\n (onInfiniteScroll)=\"getInfiniteData($event)\"\r\n (onAddItem)=\"onAddItem($event)\"\r\n (onChange)=\"onChange($event)\">\r\n\r\n <ng-template ionicSelectableItemIconTemplate\r\n let-item=\"item\"\r\n let-isItemSelected=\"isItemSelected\">\r\n <fa-icon slot=\"start\"\r\n class=\"isItemSelected\"\r\n size=\"sm\"\r\n [icon]=\"['far', isItemSelected ? 'check-circle': 'circle']\"\r\n [styles]=\"{'color': isItemSelected ? 'dodgerBlue' : 'lightGray'}\"></fa-icon>\r\n </ng-template>\r\n\r\n <ng-template ionicSelectableCloseButtonTemplate>\r\n <!-- <ion-icon name=\"close-circle\"></ion-icon> -->\r\n <fa-icon [icon]=\"'times-circle'\" size=\"md\"></fa-icon>\r\n </ng-template>\r\n\r\n <ng-template ionicSelectableTitleTemplate>\r\n {{data.Label}}\r\n <ion-text *ngIf=\"getIsRequiredValue()\" color=\"danger\">*</ion-text>\r\n </ng-template>\r\n\r\n <ng-template ionicSelectableItemTemplate let-item=\"item\">\r\n {{ getItemTemplate(item, data, group, itemValueField, itemTextField) }}\r\n <!-- <ng-template zselectitemelement [item]=\"item\"></ng-template> -->\r\n </ng-template>\r\n\r\n <!--<ng-template ionicSelectableFooterTemplate>\r\n <ion-toolbar>\r\n <ion-row>\r\n <ion-col>\r\n <ion-button expand=\"full\" ng-reflect-disabled=\"false\" ng-reflect-expand=\"full\" class=\"button button-full button-solid ion-activatable ion-focusable hydrated\" (click)=\"clearItems()\">\r\n Clear\r\n </ion-button>\r\n </ion-col>\r\n <ion-col>\r\n <ion-button expand=\"full\" ng-reflect-disabled=\"false\" ng-reflect-expand=\"full\" class=\"button button-full button-solid ion-activatable ion-focusable hydrated\" (click)=\"confirmItems()\">\r\n OK\r\n </ion-button>\r\n </ion-col>\r\n </ion-row>\r\n </ion-toolbar>\r\n </ng-template>-->\r\n </ionic-selectable>\r\n </div>\r\n <app-uivalidationmessage [group]=\"group\" [data]=\"data\" [form]=\"form\"></app-uivalidationmessage>\r\n <!-- side by side and desktop tooltipsinfo -->\r\n <kendo-label *ngIf=\"tooltipsInfo && !showTooltipsInfoIcon && showTooltipsInfoBySide\"\r\n [text]=\"tooltipsDisplayText\"\r\n [class]=\"setTooltipsInfoClass()\"\r\n [style.color]=\"setTooltipsInfoColor()\"></kendo-label>\r\n </div>\r\n</ion-item>\r\n\r\n\r\n\r\n<ion-item [ngClass]=\"getClass(form, data)\" [formGroup]=\"form\" *ngIf=\"(!!componentProperties.isVisibleField ? group[componentProperties.isVisibleField] : componentProperties.isVisible) && !isMobileScreen()\">\r\n <ion-label [attr.for]=\"data.Value\" *ngIf=\"data.ShowLabel === undefined || data.ShowLabel\" position=\"stacked\">\r\n {{data.Label}}\r\n <ion-text *ngIf=\"(!!componentProperties.isRequiredField ? group[componentProperties.isRequiredField] : componentProperties.isRequired)\" color=\"danger\">*</ion-text>\r\n <span kendoTooltip\r\n *ngIf=\"data.TooltipsInfo && showTooltipsInfoIcon\"\r\n [title]=\"tooltipsDisplayText\">\r\n <fa-icon [icon]=\"tooltipsDisplayIcon\"\r\n class=\"tooltipsinfo-icon\">\r\n </fa-icon>\r\n </span>\r\n </ion-label>\r\n <!-- mobile tooltipsinfo below label-->\r\n <div [class]=\"setTooltipsInfoSideBySide()\">\r\n <div style=\"flex: 1;\">\r\n <kendo-combobox *ngIf=\"!data.Multiple\"\r\n #comboboxComponent\r\n [data]=\"getItemsData()\"\r\n [valueField]=\"itemValueField\"\r\n [textField]=\"itemTextField\"\r\n [formControlName]=\"data.Value\"\r\n [valuePrimitive]=\"true\"\r\n [placeholder]=\"data.PlaceHolder\"\r\n [allowCustom]=\"allowCustomValue\"\r\n [suggest]=\"true\"\r\n [filterable]=\"!!data.HasInfiniteScroll\"\r\n [openOnFocus]=\"disableOpenOnFocus(comboboxComponent)\"\r\n [readonly]=\"(!!componentProperties.isReadOnlyField ? group[componentProperties.isReadOnlyField] : componentProperties.isReadOnly)\"\r\n [ngClass]=\"{'disabled' : (!!componentProperties.isReadOnlyField ? group[componentProperties.isReadOnlyField] : componentProperties.isReadOnly)}\"\r\n [loading]=\"isLoading\"\r\n (valueChange)=\"onValueChange($event)\"\r\n (filterChange)=\"handleFilter($event)\"\r\n [virtual]=\"virtual\"\r\n (open)=\"handleOpen()\"\r\n (close)=\"handleClose()\"\r\n (blur)=\"handleBlur()\"\r\n style=\"margin-top: 7px; width: 100%;\">\r\n <ng-template kendoComboBoxItemTemplate let-dataItem>\r\n {{ getItemTemplate(dataItem, data, group, itemValueField, itemTextField) }}\r\n <!-- <span class=\"template\">{{ dataItem.value }}</span> {{ dataItem.text }} -->\r\n </ng-template>\r\n <ng-template kendoTextBoxSuffixTemplate>\r\n\r\n <!-- For Validation feature -->\r\n <app-uivalidationmessage [group]=\"group\"\r\n [data]=\"data\"\r\n [form]=\"form\"\r\n class=\"validation-icon\"></app-uivalidationmessage>\r\n </ng-template>\r\n </kendo-combobox>\r\n <kendo-multiselect *ngIf=\"data.Multiple\"\r\n [data]=\"getItemsData()\"\r\n [valueField]=\"itemValueField\"\r\n [textField]=\"itemTextField\"\r\n [formControlName]=\"data.Value\"\r\n [valuePrimitive]=\"true\"\r\n [placeholder]=\"data.PlaceHolder\"\r\n [allowCustom]=\"allowCustomValue\"\r\n [filterable]=\"!!data.HasInfiniteScroll\"\r\n [checkboxes]=\"data.EnableCheckbox\"\r\n [loading]=\"isLoading\"\r\n [autoClose]=\"autoClose\"\r\n [readonly]=\"(!!componentProperties.isReadOnlyField ? group[componentProperties.isReadOnlyField] : componentProperties.isReadOnly)\"\r\n [ngClass]=\"{'disabled' : (!!componentProperties.isReadOnlyField ? group[componentProperties.isReadOnlyField] : componentProperties.isReadOnly)}\"\r\n (valueChange)=\"onValueChange($event)\"\r\n (filterChange)=\"handleFilter($event)\"\r\n (open)=\"handleOpen()\"\r\n (close)=\"handleClose()\"\r\n (blur)=\"handleBlur()\"\r\n style=\"margin-top: 7px; width: 100%;\">\r\n <ng-template kendoMultiSelectItemTemplate let-dataItem>\r\n {{ getItemTemplate(dataItem, data, group, itemValueField, itemTextField) }}\r\n <!-- <span class=\"template\">{{ dataItem.value }}</span> {{ dataItem.text }} -->\r\n </ng-template>\r\n </kendo-multiselect>\r\n </div>\r\n\r\n <div *ngFor=\"let item of iconList\">\r\n <div kendoTooltip style=\"text-align: center; padding-top: 10px;\"\r\n showOn=\"hover\"\r\n [tooltipWidth]=\"item.Width\"\r\n [position]=\"item.Position\">\r\n <span *ngIf=\"!!item && item.Color\"\r\n (click)=\"onIconClick(item.Click)\"\r\n [title]=\"item.Tooltip\"\r\n style=\"margin-top: 10px;\">\r\n <fa-icon [icon]=\"item.Icon\"\r\n [ngStyle]=\"{'padding': '4px 6px', 'color': (item.Color ? item.Color : 'black')}\"></fa-icon>\r\n </span>\r\n </div>\r\n </div>\r\n\r\n <ion-button *ngFor=\"let button of buttonList; let i = button\"\r\n fill=\"outline\"\r\n color=\"dark\"\r\n size=\"small\"\r\n strong=\"false\"\r\n class=\"button-container\"\r\n style=\"margin-top: 7px;\"\r\n (click)=\"onIconClick(button.click)\"\r\n [hidden]=\"!button.visible\"\r\n [disabled]=\"group.isTriggered || button.disabled\">\r\n <fa-icon *ngIf=\"button.icon\" [icon]=\"getFontAwesome(button.icon)\" style=\"padding-right: 5px;\"></fa-icon>\r\n <span class=\"ion-text-capitalize\">{{ button.text }}</span>\r\n </ion-button>\r\n\r\n <app-uivalidationmessage [group]=\"group\"\r\n [data]=\"data\"\r\n [form]=\"form\"></app-uivalidationmessage>\r\n\r\n <!-- side by side and desktop tooltipsinfo -->\r\n <kendo-label *ngIf=\"tooltipsInfo && !showTooltipsInfoIcon && ((showTooltipsInfoBySide && isMobileScreen()) || !isMobileScreen())\"\r\n [text]=\"tooltipsDisplayText\"\r\n [class]=\"setTooltipsInfoClass()\"\r\n [style.color]=\"setTooltipsInfoColor()\"></kendo-label>\r\n\r\n </div>\r\n</ion-item>\r\n",
9151
9174
  styles: ["fa-icon.isItemSelected{display:inline-block;width:1em;height:1em;contain:strict;fill:currentcolor;box-sizing:initial!important;font-size:20px;margin-top:10px;margin-bottom:14px;margin-right:unset;margin-inline-end:20px}.gridInlineEdit{--background:transparent}.item.sc-ion-label-md-h,.item .sc-ion-label-md-h{font-weight:var(--z-label-weight);color:var(--z-label-color);text-shadow:var(--z-label-shadow)}.divselectmultiple{justify-content:space-between;width:100%;color:#000}.tooltipsinfo-text{margin-left:5px}.tooltipsinfo-text,.tooltipsinfo-text-wide{text-align:justify;text-justify:inter-word;word-wrap:break-word;font-size:10px;margin-top:6px}.tooltipsinfo-text-wide{width:100%;padding-bottom:5px}.tooltipsinfo-right{display:grid;grid-template-columns:1.2fr .05fr 1fr;grid-gap:0}.tooltipsinfo-icon{padding-left:10px;color:#3880ff}"]
9152
9175
  },] }
9153
9176
  ];
@@ -9161,6 +9184,7 @@
9161
9184
  group: [{ type: i0.Input }],
9162
9185
  form: [{ type: i0.Input }],
9163
9186
  iconList: [{ type: i0.Input }],
9187
+ buttonList: [{ type: i0.Input }],
9164
9188
  selectComponent: [{ type: i0.ViewChild, args: ["selectComponent",] }]
9165
9189
  };
9166
9190
 
@@ -9802,12 +9826,56 @@
9802
9826
  this.nodeCounter = 1;
9803
9827
  this.clickActName = null;
9804
9828
  this.state = { expandedkeys: [] };
9829
+ this.itemIndex = [];
9830
+ this.selectedKeys = [];
9805
9831
  this.componentProperties = new i3.ZComponentProperties();
9806
9832
  this.isExpanded = function (dataItem, index) {
9807
9833
  // console.log(index);
9808
9834
  return _this.state.expandedkeys.indexOf(index) > -1;
9809
9835
  // return true;
9810
9836
  };
9837
+ this.expandNode = function (field, value, setAsSelected) {
9838
+ _this.itemIndex = [];
9839
+ var node = _this.getItems();
9840
+ _this.searchNodeIndex(node, value, '', field);
9841
+ var index = _this.itemIndex;
9842
+ if (setAsSelected) {
9843
+ _this.selectedKeys = index;
9844
+ }
9845
+ var indexArr = [];
9846
+ index.forEach(function (i) {
9847
+ var arr = i.split('_');
9848
+ var indexs = "";
9849
+ arr.forEach(function (x) {
9850
+ indexs = indexs.concat("_").concat(x);
9851
+ indexArr.push(indexs.substring(1));
9852
+ });
9853
+ });
9854
+ _this.state.expandedkeys = _this.state.expandedkeys.concat(indexArr);
9855
+ };
9856
+ this.collapseNode = function (field, value, collapseParent) {
9857
+ _this.itemIndex = [];
9858
+ var node = _this.getItems();
9859
+ _this.searchNodeIndex(node, value, '', field);
9860
+ var index = _this.itemIndex;
9861
+ var indexArr = [];
9862
+ if (collapseParent) {
9863
+ index.forEach(function (i) {
9864
+ var arr = i.split('_');
9865
+ var indexs = "";
9866
+ arr.forEach(function (x) {
9867
+ indexs = indexs.concat("_").concat(x);
9868
+ indexArr.push(indexs.substring(1));
9869
+ });
9870
+ });
9871
+ }
9872
+ else {
9873
+ indexArr = index;
9874
+ }
9875
+ _this.state.expandedkeys = _this.state.expandedkeys.filter(function (v) {
9876
+ return !indexArr.includes(v);
9877
+ });
9878
+ };
9811
9879
  this.expandAll = function () {
9812
9880
  var node = _this.getItems();
9813
9881
  _this.expandAllNode(node, '');
@@ -9864,6 +9932,21 @@
9864
9932
  // console.warn('ztree field Value is not set correctly. ', fieldValue);
9865
9933
  // }
9866
9934
  };
9935
+ ZtreeComponent.prototype.searchNodeIndex = function (node, value, key, field) {
9936
+ var _this = this;
9937
+ if (key) {
9938
+ key = key + '_';
9939
+ }
9940
+ node.forEach(function (d, i) {
9941
+ if (d[field] === Number(value) || d[field] === value) {
9942
+ _this.itemIndex = _this.itemIndex.concat(key + '' + i);
9943
+ }
9944
+ if (Array.isArray(d.Value)) {
9945
+ var k = key + '' + i;
9946
+ _this.searchNodeIndex(d.Value, value, k, field);
9947
+ }
9948
+ });
9949
+ };
9867
9950
  ZtreeComponent.prototype.expandAllNode = function (node, key) {
9868
9951
  var _this = this;
9869
9952
  if (key) {
@@ -10088,7 +10171,7 @@
10088
10171
  ZtreeComponent.decorators = [
10089
10172
  { type: i0.Component, args: [{
10090
10173
  selector: "app-ztree",
10091
- template: "<div style=\"width:100%\"\r\n *ngIf=\"(!!componentProperties.isVisibleField ? group[componentProperties.isVisibleField] : componentProperties.isVisible)\">\r\n <kendo-treeview [nodes]=\"getItems()\"\r\n kendoTreeViewExpandable\r\n kendoTreeViewSelectable\r\n kendoTreeViewDragAndDrop\r\n kendoTreeViewDragAndDropEditing\r\n [isExpanded]=\"isExpanded\"\r\n (collapse)=\"handleCollapse($event)\"\r\n (expand)=\"handleExpand($event)\"\r\n (nodeDrop)=\"handleNodeDrop($event)\"\r\n (nodeDragEnd)=\"handleNodeDragEnd($event)\"\r\n (selectionChange)=\"onSelectionChange($event)\"\r\n kendoTreeViewHierarchyBinding\r\n childrenField=\"Value\"\r\n [filterable]=\"data.Filterable\"\r\n textField=\"Name\"\r\n (filterChange)=\"handleFilter($event)\">\r\n\r\n <ng-template kendoTreeViewNodeTemplate let-dataItem #nodetemplate>\r\n\r\n <ion-button *ngIf=\"!!data.OnAddNode\"\r\n (click)=\"onAddNode($event, dataItem, data, group)\"\r\n style=\"zoom: 0.6;margin: 0 0 0 2px;\" mat-raised-button color=\"primary\" size=\"medium\"\r\n [hidden]=\"(!!dataItem.OnAddNodeVisible)\">\r\n <!-- <ion-icon name=\"add\" slot=\"icon-only\"></ion-icon> -->\r\n <fa-icon [icon]=\"'plus'\"></fa-icon>\r\n </ion-button>\r\n <ion-button *ngIf=\"!!data.OnRemoveNode\" (click)=\"onRemoveNode($event, dataItem, data, group)\"\r\n style=\"zoom: 0.6;margin: 0 15px 0 10px;\" color=\"danger\" mat-raised-button size=\"medium\"\r\n [hidden]=\"(!!dataItem.OnRemoveNodeVisible)\">\r\n <!-- <ion-icon name=\"close\" slot=\"icon-only\"></ion-icon> -->\r\n <fa-icon [icon]=\"'minus'\"></fa-icon>\r\n </ion-button>\r\n\r\n {{ getTemplate(dataItem, data, group) }}\r\n\r\n </ng-template>\r\n </kendo-treeview>\r\n</div>\r\n",
10174
+ template: "<div style=\"width:100%\"\r\n *ngIf=\"(!!componentProperties.isVisibleField ? group[componentProperties.isVisibleField] : componentProperties.isVisible)\">\r\n <kendo-treeview [nodes]=\"getItems()\"\r\n kendoTreeViewExpandable\r\n kendoTreeViewSelectable\r\n kendoTreeViewDragAndDrop\r\n kendoTreeViewDragAndDropEditing\r\n [isExpanded]=\"isExpanded\"\r\n (collapse)=\"handleCollapse($event)\"\r\n (expand)=\"handleExpand($event)\"\r\n (nodeDrop)=\"handleNodeDrop($event)\"\r\n (nodeDragEnd)=\"handleNodeDragEnd($event)\"\r\n (selectionChange)=\"onSelectionChange($event)\"\r\n [selectedKeys]=\"selectedKeys\"\r\n kendoTreeViewHierarchyBinding\r\n childrenField=\"Value\"\r\n [filterable]=\"data.Filterable\"\r\n textField=\"Name\"\r\n (filterChange)=\"handleFilter($event)\">\r\n\r\n <ng-template kendoTreeViewNodeTemplate let-dataItem #nodetemplate>\r\n\r\n <ion-button *ngIf=\"!!data.OnAddNode\"\r\n (click)=\"onAddNode($event, dataItem, data, group)\"\r\n style=\"zoom: 0.6;margin: 0 0 0 2px;\" mat-raised-button color=\"primary\" size=\"medium\"\r\n [hidden]=\"(!!dataItem.OnAddNodeVisible)\">\r\n <!-- <ion-icon name=\"add\" slot=\"icon-only\"></ion-icon> -->\r\n <fa-icon [icon]=\"'plus'\"></fa-icon>\r\n </ion-button>\r\n <ion-button *ngIf=\"!!data.OnRemoveNode\" (click)=\"onRemoveNode($event, dataItem, data, group)\"\r\n style=\"zoom: 0.6;margin: 0 15px 0 10px;\" color=\"danger\" mat-raised-button size=\"medium\"\r\n [hidden]=\"(!!dataItem.OnRemoveNodeVisible)\">\r\n <!-- <ion-icon name=\"close\" slot=\"icon-only\"></ion-icon> -->\r\n <fa-icon [icon]=\"'minus'\"></fa-icon>\r\n </ion-button>\r\n\r\n {{ getTemplate(dataItem, data, group) }}\r\n\r\n </ng-template>\r\n </kendo-treeview>\r\n</div>\r\n",
10092
10175
  styles: [":host{--ion-color-primary:#479400;--ion-color-primary-rgb:56,128,255;--ion-color-primary-contrast:#fff;--ion-color-primary-contrast-rgb:255,255,255;--ion-color-primary-shade:#3171e0;--ion-color-primary-tint:#4c8dff}:host ::ng-deep .k-treeview .k-in{border-radius:2px;border:1px solid #c8dbf5;background-color:#e3ecf8}:host ::ng-deep .k-treeview .k-in,:host ::ng-deep .k-treeview .k-in.k-state-selected{width:100%;margin:5px;padding:9px 20px 9px 8px;color:#0a45ab;font-size:13px;cursor:pointer}:host ::ng-deep .k-treeview .k-in.k-state-selected{border-radius:2px;background-color:#a9c3e8}:host ::ng-deep .k-treeview .k-in.k-state-hover,:host ::ng-deep .k-treeview .k-in:hover{width:100%;margin:5px;padding:9px 20px 9px 8px;border-radius:2px;background-color:#c9daf2;color:#0a45ab;font-size:13px;cursor:pointer}"]
10093
10176
  },] }
10094
10177
  ];