@smartbit4all/ng-client 5.0.15 → 5.0.16

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.
@@ -11767,12 +11767,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.3", ngImpor
11767
11767
  }] } });
11768
11768
 
11769
11769
  class SmartGridComponent {
11770
- constructor(service, cfService, dialog, injector, uiActionDescriptorService, compLib, gridMenuIcon) {
11770
+ constructor(service, cfService, dialog, injector, uiActionDescriptorService, uiActionService, compLib, gridMenuIcon) {
11771
11771
  this.service = service;
11772
11772
  this.cfService = cfService;
11773
11773
  this.dialog = dialog;
11774
11774
  this.injector = injector;
11775
11775
  this.uiActionDescriptorService = uiActionDescriptorService;
11776
+ this.uiActionService = uiActionService;
11776
11777
  this.compLib = compLib;
11777
11778
  this.gridMenuIcon = gridMenuIcon;
11778
11779
  // private readonly defaultPageSize: number = 10;
@@ -12427,8 +12428,15 @@ class SmartGridComponent {
12427
12428
  if (this.smartGrid.options?.uiActionModelCallback) {
12428
12429
  uiActionModel = this.smartGrid.options.uiActionModelCallback(uiActionModel);
12429
12430
  }
12430
- this.smartGrid.uiActionService.uiActionModel = uiActionModel;
12431
- this.smartGrid.uiActionService.execute(_uiAction, {
12431
+ let uiActionSrv;
12432
+ if (this.smartGrid?.uiActionService) {
12433
+ uiActionSrv = this.smartGrid.uiActionService;
12434
+ }
12435
+ else {
12436
+ uiActionSrv = this.uiActionService;
12437
+ }
12438
+ uiActionSrv.uiActionModel = uiActionModel;
12439
+ uiActionSrv.execute(_uiAction, {
12432
12440
  widgetId: this.smartGrid.gridIdentifier,
12433
12441
  nodeId: row.id,
12434
12442
  });
@@ -12633,13 +12641,13 @@ class SmartGridComponent {
12633
12641
  getImageResourceStyle(resource) {
12634
12642
  return resource.style ? resource.style : {};
12635
12643
  }
12636
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.3", ngImport: i0, type: SmartGridComponent, deps: [{ token: SmartGridService }, { token: ComponentFactoryService }, { token: i1$1.MatDialog }, { token: i0.Injector }, { token: UiActionDescriptorService }, { token: COMPONENT_LIBRARY }, { token: 'gridMenuIcon' }], target: i0.ɵɵFactoryTarget.Component }); }
12644
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.3", ngImport: i0, type: SmartGridComponent, deps: [{ token: SmartGridService }, { token: ComponentFactoryService }, { token: i1$1.MatDialog }, { token: i0.Injector }, { token: UiActionDescriptorService }, { token: UiActionService }, { token: COMPONENT_LIBRARY }, { token: 'gridMenuIcon' }], target: i0.ɵɵFactoryTarget.Component }); }
12637
12645
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.3", type: SmartGridComponent, isStandalone: false, selector: "smart-grid", inputs: { smartGrid: "smartGrid", uuid: "uuid", dev: "dev" }, providers: [SmartGridService], viewQueries: [{ propertyName: "vcRefTable", first: true, predicate: ["table"], descendants: true, read: ViewContainerRef }, { propertyName: "toolbar", first: true, predicate: ["toolbar"], descendants: true }, { propertyName: "menu", first: true, predicate: ["menu"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "@if(compLib === componentLibrary.PRIMENG) {\r\n<div *ngIf=\"smartGrid\" class=\"primeSmartGrid-container\">\r\n <div class=\"smart-grid-toolbar\">\r\n <smart-ui-action-toolbar #toolbar [id]=\"'grid_not_initialized'\"></smart-ui-action-toolbar>\r\n </div>\r\n <p-table\r\n *ngIf=\"!smartGrid.layoutDef || smartGrid.layoutDef === layoutDef().TABLE\"\r\n #pTable\r\n [value]=\"smartGrid.gridModel.page.rows!\"\r\n (onSort)=\"gridSort($event)\"\r\n [customSort]=\"true\"\r\n [sortMode]=\"'multiple'\"\r\n [lazy]=\"true\"\r\n (onLazyLoad)=\"lazyLoad($event)\"\r\n [reorderableColumns]=\"smartGrid.gridModel.view?.descriptor?.showEditColumns\"\r\n [columns]=\"columns\"\r\n (onColReorder)=\"onColOrder($event)\"\r\n (onRowSelect)=\"onRowSelect($event)\"\r\n (onRowUnselect)=\"onRowUnselect($event)\"\r\n [selection]=\"selectedRows\"\r\n (onHeaderCheckboxToggle)=\"onSelectAllRow($event)\"\r\n dataKey=\"id\"\r\n >\r\n <ng-container *ngIf=\"smartGrid.gridModel.view?.descriptor?.showEditColumns\">\r\n <ng-template pTemplate=\"caption\">\r\n <div *ngIf=\"smartGrid.gridModel.view?.descriptor?.showEditColumns\">\r\n <p-multiSelect\r\n display=\"chip\"\r\n [options]=\"smartGrid.gridModel.view?.descriptor?.columns\"\r\n optionLabel=\"label\"\r\n [(ngModel)]=\"columns\"\r\n selectedItemsLabel=\"{0} columns selected\"\r\n [style]=\"{ 'min-width': '200px' }\"\r\n placeholder=\"Choose Columns\"\r\n (onChange)=\"headerChange($event)\"\r\n />\r\n </div>\r\n </ng-template>\r\n </ng-container>\r\n <ng-template pTemplate=\"header\">\r\n <tr *ngIf=\"smartGrid.gridModel.view?.descriptor?.showEditColumns\">\r\n <th\r\n *ngIf=\"isMultiple && (tableType === 'checkbox' || tableType === 'CheckBox')\"\r\n style=\"width: 4rem\"\r\n >\r\n <p-tableHeaderCheckbox />\r\n </th>\r\n <th\r\n *ngIf=\"!isMultiple && (tableType === 'checkbox' || tableType === 'CheckBox')\"\r\n style=\"width: 4rem\"\r\n ></th>\r\n <th [pSortableColumn]=\"col.propertyName\" *ngFor=\"let col of columns\" pReorderableColumn>\r\n <p-sortIcon [field]=\"col.propertyName\" />\r\n {{ col.label }}\r\n </th>\r\n <th></th>\r\n </tr>\r\n <tr *ngIf=\"!smartGrid.gridModel.view?.descriptor?.showEditColumns\">\r\n <th\r\n *ngIf=\"isMultiple && (tableType === 'checkbox' || tableType === 'CheckBox')\"\r\n style=\"width: 4rem\"\r\n >\r\n <p-tableHeaderCheckbox />\r\n </th>\r\n <th\r\n *ngIf=\"!isMultiple && (tableType === 'checkbox' || tableType === 'CheckBox')\"\r\n style=\"width: 4rem\"\r\n ></th>\r\n <th [pSortableColumn]=\"col.propertyName\" *ngFor=\"let col of columns\">\r\n <p-sortIcon [field]=\"col.propertyName\" />\r\n {{ col.label }}\r\n </th>\r\n <th></th>\r\n </tr>\r\n <!-- <tr>\r\n <th *ngFor=\"let col of smartGrid?.gridModel?.view?.orderedColumnNames\">\r\n <p-columnFilter\r\n type=\"text\"\r\n [field]=\"'data.' + col\"\r\n [placeholder]=\"'Search by ' + col\"\r\n [ariaLabel]=\"'Filter ' + col\"\r\n />\r\n </th>\r\n </tr> -->\r\n </ng-template>\r\n <ng-template pTemplate=\"body\" let-row>\r\n <tr (dblclick)=\"onDoubleClick(row)\" *ngIf=\"row && row.data\">\r\n <td *ngIf=\"isMultiple && (tableType === 'checkbox' || tableType === 'CheckBox')\">\r\n <p-tableCheckbox *ngIf=\"row.selectable != false\" [value]=\"row\" />\r\n </td>\r\n <td *ngIf=\"!isMultiple && (tableType === 'checkbox' || tableType === 'CheckBox')\">\r\n <p-tableRadioButton [value]=\"row\" />\r\n </td>\r\n <td *ngFor=\"let col of smartGrid?.gridModel?.view?.orderedColumnNames\">\r\n <div *ngIf=\"row.icons[col]\">\r\n <div class=\"smart-table-icon-container\">\r\n <div *ngFor=\"let ir of getImageResourceIcons(row, col)\">\r\n <div\r\n pTooltip=\"{{ ir.tooltip?.tooltip }}\"\r\n tooltipPosition=\"right\"\r\n placeholder=\"Right\"\r\n [ngStyle]=\"getImageResourceStyle(ir)\"\r\n ><smart-icon [icon]=\"ir.identifier!\" [color]=\"ir.color!\"> </smart-icon\r\n ></div>\r\n </div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"!row.icons[col]\" [innerHtml]=\"getColValue(col, row)\"> </div>\r\n </td>\r\n <td class=\"menu-button\">\r\n <p-button\r\n [rounded]=\"true\"\r\n [text]=\"true\"\r\n *ngIf=\"row.actions && row.actions.length > 0\"\r\n (onClick)=\"onOptionsClick($event, row)\"\r\n >\r\n <smart-icon icon=\"ellipsis-v\"></smart-icon>\r\n </p-button>\r\n </td>\r\n </tr>\r\n </ng-template>\r\n </p-table>\r\n <div\r\n *ngIf=\"smartGrid.layoutDef === layoutDef().CARD && smartGrid.dataLayoutDef\"\r\n class=\"cards-container\"\r\n [ngStyle]=\"{\r\n 'grid-template-columns':\r\n smartGrid.numberOfColumn !== undefined\r\n ? 'repeat(' + smartGrid.numberOfColumn + ', 1fr)'\r\n : ''\r\n }\"\r\n >\r\n <app-smart-grid-card\r\n class=\"smartGrid-card-container\"\r\n *ngFor=\"let task of smartGrid.gridModel.page.rows\"\r\n [item]=\"task\"\r\n [smartGrid]=\"smartGrid\"\r\n [onSelect]=\"onSelect.bind(this)\"\r\n ></app-smart-grid-card>\r\n </div>\r\n <p-paginator\r\n *ngIf=\"smartGrid.paginator\"\r\n [first]=\"pageIndex!\"\r\n [totalRecords]=\"length!\"\r\n [rows]=\"pageSize\"\r\n [rowsPerPageOptions]=\"pageSizeOptions\"\r\n (onPageChange)=\"onPrimeChangePage($event)\"\r\n [showCurrentPageReport]=\"true\"\r\n dropdownAppendTo=\"body\"\r\n />\r\n <p-menu #menu [model]=\"menuButtons\" [popup]=\"true\" appendTo=\"body\"> </p-menu>\r\n</div>\r\n}@else {\r\n<div *ngIf=\"smartGrid\" class=\"smartGrid-container\">\r\n <div class=\"smart-grid-toolbar\">\r\n <smart-ui-action-toolbar #toolbar [id]=\"'grid_not_initialized'\"></smart-ui-action-toolbar>\r\n <button\r\n (click)=\"editColumns()\"\r\n mat-mini-fab\r\n color=\"text-primary\"\r\n *ngIf=\"smartGrid.showEditColumns\"\r\n >\r\n <mat-icon aria-hidden=\"false\" aria-label=\"Columns\" class=\"smart-grid-edit-icon\"\r\n >view_columns</mat-icon\r\n >\r\n </button>\r\n </div>\r\n <!-- <div [ngClass]=\"isBlocked ? 'blocked' : ''\"></div> -->\r\n <div class=\"smartGridContent\">\r\n <div>\r\n <div *ngIf=\"smartGrid.showResultCount\">\r\n <div class=\"smartGrid-data-number\">\r\n {{ smartGrid.gridModel.totalRowCount }}\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"smart-grid-table-container\">\r\n <ng-template #table></ng-template>\r\n </div>\r\n\r\n <div *ngIf=\"smartGrid.layoutDef === layoutDef().EXPANDABLE\">\r\n <smart-expandable-section\r\n #gridExpandableSection\r\n *ngFor=\"let expandableSection of expandableSections\"\r\n [data]=\"expandableSection\"\r\n ></smart-expandable-section>\r\n </div>\r\n <div\r\n *ngIf=\"smartGrid.layoutDef === layoutDef().CARD && smartGrid.dataLayoutDef\"\r\n class=\"cards-container\"\r\n [ngStyle]=\"{\r\n 'grid-template-columns':\r\n smartGrid.numberOfColumn !== undefined\r\n ? 'repeat(' + smartGrid.numberOfColumn + ', 1fr)'\r\n : ''\r\n }\"\r\n >\r\n <app-smart-grid-card\r\n class=\"smartGrid-card-container\"\r\n *ngFor=\"let task of smartGrid.gridModel.page.rows\"\r\n [item]=\"task\"\r\n [smartGrid]=\"smartGrid\"\r\n [onSelect]=\"onSelect.bind(this)\"\r\n ></app-smart-grid-card>\r\n </div>\r\n <div\r\n *ngIf=\"smartGrid.layoutDef === layoutDef().TREE && treeControl\"\r\n class=\"tree-container\"\r\n [ngStyle]=\"{\r\n 'grid-template-columns':\r\n smartGrid.numberOfColumn !== undefined\r\n ? 'repeat(' + smartGrid.numberOfColumn + ', 1fr)'\r\n : ''\r\n }\"\r\n >\r\n <mat-tree [dataSource]=\"treeDataSource!\" [treeControl]=\"treeControl!\">\r\n <mat-tree-node\r\n *matTreeNodeDef=\"let node\"\r\n matTreeNodeToggle\r\n matTreeNodePadding\r\n matTreeNodePaddingIndent=\"24\"\r\n >\r\n <button mat-icon-button disabled class=\"tree-button\"></button>\r\n <mat-checkbox\r\n class=\"checklist-leaf-node\"\r\n [checked]=\"treeChecklistSelection?.isSelected(node)\"\r\n (change)=\"treeNodeSelectionToggle(node)\"\r\n >{{ getTreeItem(node) }}</mat-checkbox\r\n >\r\n </mat-tree-node>\r\n\r\n <mat-tree-node\r\n *matTreeNodeDef=\"let node; when: hasChild\"\r\n matTreeNodePadding\r\n matTreeNodePaddingIndent=\"24\"\r\n >\r\n <button\r\n mat-icon-button\r\n matTreeNodeToggle\r\n class=\"tree-button\"\r\n [attr.aria-label]=\"'Toggle ' + node.item\"\r\n >\r\n <mat-icon class=\"mat-icon-rtl-mirror\">\r\n {{ treeControl!.isExpanded(node) ? 'expand_more' : 'chevron_right' }}\r\n </mat-icon>\r\n </button>\r\n <mat-checkbox\r\n [checked]=\"treeChecklistSelection?.isSelected(node)\"\r\n [indeterminate]=\"descendantsPartiallySelected(node)\"\r\n (change)=\"treeNodeSelectionToggle(node)\"\r\n >{{ getTreeItem(node) }}</mat-checkbox\r\n >\r\n </mat-tree-node>\r\n </mat-tree>\r\n </div>\r\n </div>\r\n\r\n <mat-paginator\r\n *ngIf=\"smartGrid.paginator && !treeControl\"\r\n #paginator\r\n [length]=\"length\"\r\n [pageIndex]=\"pageIndex\"\r\n [pageSize]=\"pageSize\"\r\n [pageSizeOptions]=\"pageSizeOptions\"\r\n (page)=\"onChangePage($event)\"\r\n ></mat-paginator>\r\n</div>\r\n}\r\n", styles: [".smartGrid-container{position:relative;padding:1.5rem;display:flex;flex-direction:column;gap:1rem}.primeSmartGrid-container{display:flex;flex-direction:column;gap:1rem}.smartGrid-data-number{padding-bottom:1rem}.smart-table-icon-container{display:flex;flex-direction:row;justify-content:space-between;white-space:initial}.cards-container{display:grid;gap:1rem;padding:1rem}.smartGrid-card-container{height:auto;border:1px solid black;border-radius:8px}.smartGrid-container ::ng-deep .mat-form-field-appearance-legacy .mat-form-field-underline{bottom:0}.smartGridContent{width:100%;flex:1;overflow:auto}.blocked{position:absolute;width:calc(100% - 3rem);height:calc(100% - 3rem);z-index:110;background-color:#0003}.smart-grid-table-container{display:flex;flex-direction:column;gap:1rem}.smart-grid-toolbar{display:flex;flex-direction:row;justify-content:flex-end;align-items:center}.smart-grid-toolbar smart-ui-action-toolbar{width:100%}.smart-grid-edit-icon{color:var(--light-gray)}.tree-button{width:24px!important;height:24px!important}.menu-button{text-align:-webkit-right}\n"], dependencies: [{ kind: "directive", type: i10.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i10.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i6$3.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: SmartIconComponent, selector: "smart-icon", inputs: ["icon", "color"] }, { kind: "component", type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i2$1.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "component", type: i2$1.MatMiniFabButton, selector: "button[mat-mini-fab]", exportAs: ["matButton"] }, { kind: "component", type: i11$1.MatPaginator, selector: "mat-paginator", inputs: ["color", "pageIndex", "length", "pageSize", "pageSizeOptions", "hidePageSize", "showFirstLastButtons", "selectConfig", "disabled"], outputs: ["page"], exportAs: ["matPaginator"] }, { kind: "directive", type: i12.MatTreeNodeDef, selector: "[matTreeNodeDef]", inputs: ["matTreeNodeDefWhen", "matTreeNode"] }, { kind: "directive", type: i12.MatTreeNodePadding, selector: "[matTreeNodePadding]", inputs: ["matTreeNodePadding", "matTreeNodePaddingIndent"] }, { kind: "directive", type: i12.MatTreeNodeToggle, selector: "[matTreeNodeToggle]", inputs: ["matTreeNodeToggleRecursive"] }, { kind: "component", type: i12.MatTree, selector: "mat-tree", exportAs: ["matTree"] }, { kind: "directive", type: i12.MatTreeNode, selector: "mat-tree-node", inputs: ["tabIndex", "disabled"], outputs: ["activation", "expandedChange"], exportAs: ["matTreeNode"] }, { kind: "component", type: i4$2.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "component", type: ExpandableSectionComponent, selector: "smart-expandable-section", inputs: ["data", "index"] }, { kind: "component", type: UiActionToolbarComponent, selector: "smart-ui-action-toolbar", inputs: ["uiActionModels", "uiActionDescriptorService", "id"] }, { kind: "directive", type: ComparableMultiselectDirective, selector: "p-multiSelect", inputs: ["compareWith"] }, { kind: "component", type: i17$1.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "style", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorStyleClass", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "scrollDirection", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "responsive", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "autoLayout", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "size", "showGridlines", "stripedRows", "groupRowsByOrder", "responsiveLayout", "breakpoint", "paginatorLocale", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "virtualRowHeight", "selectAll"], outputs: ["contextMenuSelectionChange", "selectAllChange", "selectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { kind: "directive", type: i6.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i17$1.SortableColumn, selector: "[pSortableColumn]", inputs: ["pSortableColumn", "pSortableColumnDisabled"] }, { kind: "directive", type: i17$1.ReorderableColumn, selector: "[pReorderableColumn]", inputs: ["pReorderableColumnDisabled"] }, { kind: "component", type: i17$1.SortIcon, selector: "p-sortIcon", inputs: ["field"] }, { kind: "component", type: i17$1.TableRadioButton, selector: "p-tableRadioButton", inputs: ["disabled", "value", "index", "inputId", "name", "ariaLabel"] }, { kind: "component", type: i17$1.TableCheckbox, selector: "p-tableCheckbox", inputs: ["disabled", "value", "index", "inputId", "name", "required", "ariaLabel"] }, { kind: "component", type: i17$1.TableHeaderCheckbox, selector: "p-tableHeaderCheckbox", inputs: ["disabled", "inputId", "name", "ariaLabel"] }, { kind: "component", type: i3.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "raised", "rounded", "text", "plain", "severity", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "autofocus", "fluid", "buttonProps"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: i20$1.Menu, selector: "p-menu", inputs: ["model", "popup", "style", "styleClass", "appendTo", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "ariaLabel", "ariaLabelledBy", "id", "tabindex"], outputs: ["onShow", "onHide", "onBlur", "onFocus"] }, { kind: "component", type: i21$1.Paginator, selector: "p-paginator", inputs: ["pageLinkSize", "style", "styleClass", "alwaysShow", "dropdownAppendTo", "templateLeft", "templateRight", "appendTo", "dropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showFirstLastIcon", "totalRecords", "rows", "rowsPerPageOptions", "showJumpToPageDropdown", "showJumpToPageInput", "jumpToPageItemTemplate", "showPageLinks", "locale", "dropdownItemTemplate", "first"], outputs: ["onPageChange"] }, { kind: "component", type: i1$5.MultiSelect, selector: "p-multiSelect, p-multiselect, p-multi-select", inputs: ["id", "ariaLabel", "style", "styleClass", "panelStyle", "panelStyleClass", "inputId", "disabled", "fluid", "readonly", "group", "filter", "filterPlaceHolder", "filterLocale", "overlayVisible", "tabindex", "variant", "appendTo", "dataKey", "name", "ariaLabelledBy", "displaySelectedLabel", "maxSelectedLabels", "selectionLimit", "selectedItemsLabel", "showToggleAll", "emptyFilterMessage", "emptyMessage", "resetFilterOnHide", "dropdownIcon", "chipIcon", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "showHeader", "filterBy", "scrollHeight", "lazy", "virtualScroll", "loading", "virtualScrollItemSize", "loadingIcon", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "filterMatchMode", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "autofocusFilter", "display", "autocomplete", "size", "showClear", "autofocus", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "defaultLabel", "placeholder", "options", "filterValue", "itemSize", "selectAll", "focusOnHover", "filterFields", "selectOnFocus", "autoOptionFocus", "highlightOnSelect"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onClear", "onPanelShow", "onPanelHide", "onLazyLoad", "onRemove", "onSelectAllChange"] }, { kind: "component", type: SmartGridCardComponent, selector: "app-smart-grid-card", inputs: ["item", "smartGrid", "onSelect"] }] }); }
12638
12646
  }
12639
12647
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.3", ngImport: i0, type: SmartGridComponent, decorators: [{
12640
12648
  type: Component,
12641
12649
  args: [{ selector: 'smart-grid', providers: [SmartGridService], standalone: false, template: "@if(compLib === componentLibrary.PRIMENG) {\r\n<div *ngIf=\"smartGrid\" class=\"primeSmartGrid-container\">\r\n <div class=\"smart-grid-toolbar\">\r\n <smart-ui-action-toolbar #toolbar [id]=\"'grid_not_initialized'\"></smart-ui-action-toolbar>\r\n </div>\r\n <p-table\r\n *ngIf=\"!smartGrid.layoutDef || smartGrid.layoutDef === layoutDef().TABLE\"\r\n #pTable\r\n [value]=\"smartGrid.gridModel.page.rows!\"\r\n (onSort)=\"gridSort($event)\"\r\n [customSort]=\"true\"\r\n [sortMode]=\"'multiple'\"\r\n [lazy]=\"true\"\r\n (onLazyLoad)=\"lazyLoad($event)\"\r\n [reorderableColumns]=\"smartGrid.gridModel.view?.descriptor?.showEditColumns\"\r\n [columns]=\"columns\"\r\n (onColReorder)=\"onColOrder($event)\"\r\n (onRowSelect)=\"onRowSelect($event)\"\r\n (onRowUnselect)=\"onRowUnselect($event)\"\r\n [selection]=\"selectedRows\"\r\n (onHeaderCheckboxToggle)=\"onSelectAllRow($event)\"\r\n dataKey=\"id\"\r\n >\r\n <ng-container *ngIf=\"smartGrid.gridModel.view?.descriptor?.showEditColumns\">\r\n <ng-template pTemplate=\"caption\">\r\n <div *ngIf=\"smartGrid.gridModel.view?.descriptor?.showEditColumns\">\r\n <p-multiSelect\r\n display=\"chip\"\r\n [options]=\"smartGrid.gridModel.view?.descriptor?.columns\"\r\n optionLabel=\"label\"\r\n [(ngModel)]=\"columns\"\r\n selectedItemsLabel=\"{0} columns selected\"\r\n [style]=\"{ 'min-width': '200px' }\"\r\n placeholder=\"Choose Columns\"\r\n (onChange)=\"headerChange($event)\"\r\n />\r\n </div>\r\n </ng-template>\r\n </ng-container>\r\n <ng-template pTemplate=\"header\">\r\n <tr *ngIf=\"smartGrid.gridModel.view?.descriptor?.showEditColumns\">\r\n <th\r\n *ngIf=\"isMultiple && (tableType === 'checkbox' || tableType === 'CheckBox')\"\r\n style=\"width: 4rem\"\r\n >\r\n <p-tableHeaderCheckbox />\r\n </th>\r\n <th\r\n *ngIf=\"!isMultiple && (tableType === 'checkbox' || tableType === 'CheckBox')\"\r\n style=\"width: 4rem\"\r\n ></th>\r\n <th [pSortableColumn]=\"col.propertyName\" *ngFor=\"let col of columns\" pReorderableColumn>\r\n <p-sortIcon [field]=\"col.propertyName\" />\r\n {{ col.label }}\r\n </th>\r\n <th></th>\r\n </tr>\r\n <tr *ngIf=\"!smartGrid.gridModel.view?.descriptor?.showEditColumns\">\r\n <th\r\n *ngIf=\"isMultiple && (tableType === 'checkbox' || tableType === 'CheckBox')\"\r\n style=\"width: 4rem\"\r\n >\r\n <p-tableHeaderCheckbox />\r\n </th>\r\n <th\r\n *ngIf=\"!isMultiple && (tableType === 'checkbox' || tableType === 'CheckBox')\"\r\n style=\"width: 4rem\"\r\n ></th>\r\n <th [pSortableColumn]=\"col.propertyName\" *ngFor=\"let col of columns\">\r\n <p-sortIcon [field]=\"col.propertyName\" />\r\n {{ col.label }}\r\n </th>\r\n <th></th>\r\n </tr>\r\n <!-- <tr>\r\n <th *ngFor=\"let col of smartGrid?.gridModel?.view?.orderedColumnNames\">\r\n <p-columnFilter\r\n type=\"text\"\r\n [field]=\"'data.' + col\"\r\n [placeholder]=\"'Search by ' + col\"\r\n [ariaLabel]=\"'Filter ' + col\"\r\n />\r\n </th>\r\n </tr> -->\r\n </ng-template>\r\n <ng-template pTemplate=\"body\" let-row>\r\n <tr (dblclick)=\"onDoubleClick(row)\" *ngIf=\"row && row.data\">\r\n <td *ngIf=\"isMultiple && (tableType === 'checkbox' || tableType === 'CheckBox')\">\r\n <p-tableCheckbox *ngIf=\"row.selectable != false\" [value]=\"row\" />\r\n </td>\r\n <td *ngIf=\"!isMultiple && (tableType === 'checkbox' || tableType === 'CheckBox')\">\r\n <p-tableRadioButton [value]=\"row\" />\r\n </td>\r\n <td *ngFor=\"let col of smartGrid?.gridModel?.view?.orderedColumnNames\">\r\n <div *ngIf=\"row.icons[col]\">\r\n <div class=\"smart-table-icon-container\">\r\n <div *ngFor=\"let ir of getImageResourceIcons(row, col)\">\r\n <div\r\n pTooltip=\"{{ ir.tooltip?.tooltip }}\"\r\n tooltipPosition=\"right\"\r\n placeholder=\"Right\"\r\n [ngStyle]=\"getImageResourceStyle(ir)\"\r\n ><smart-icon [icon]=\"ir.identifier!\" [color]=\"ir.color!\"> </smart-icon\r\n ></div>\r\n </div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"!row.icons[col]\" [innerHtml]=\"getColValue(col, row)\"> </div>\r\n </td>\r\n <td class=\"menu-button\">\r\n <p-button\r\n [rounded]=\"true\"\r\n [text]=\"true\"\r\n *ngIf=\"row.actions && row.actions.length > 0\"\r\n (onClick)=\"onOptionsClick($event, row)\"\r\n >\r\n <smart-icon icon=\"ellipsis-v\"></smart-icon>\r\n </p-button>\r\n </td>\r\n </tr>\r\n </ng-template>\r\n </p-table>\r\n <div\r\n *ngIf=\"smartGrid.layoutDef === layoutDef().CARD && smartGrid.dataLayoutDef\"\r\n class=\"cards-container\"\r\n [ngStyle]=\"{\r\n 'grid-template-columns':\r\n smartGrid.numberOfColumn !== undefined\r\n ? 'repeat(' + smartGrid.numberOfColumn + ', 1fr)'\r\n : ''\r\n }\"\r\n >\r\n <app-smart-grid-card\r\n class=\"smartGrid-card-container\"\r\n *ngFor=\"let task of smartGrid.gridModel.page.rows\"\r\n [item]=\"task\"\r\n [smartGrid]=\"smartGrid\"\r\n [onSelect]=\"onSelect.bind(this)\"\r\n ></app-smart-grid-card>\r\n </div>\r\n <p-paginator\r\n *ngIf=\"smartGrid.paginator\"\r\n [first]=\"pageIndex!\"\r\n [totalRecords]=\"length!\"\r\n [rows]=\"pageSize\"\r\n [rowsPerPageOptions]=\"pageSizeOptions\"\r\n (onPageChange)=\"onPrimeChangePage($event)\"\r\n [showCurrentPageReport]=\"true\"\r\n dropdownAppendTo=\"body\"\r\n />\r\n <p-menu #menu [model]=\"menuButtons\" [popup]=\"true\" appendTo=\"body\"> </p-menu>\r\n</div>\r\n}@else {\r\n<div *ngIf=\"smartGrid\" class=\"smartGrid-container\">\r\n <div class=\"smart-grid-toolbar\">\r\n <smart-ui-action-toolbar #toolbar [id]=\"'grid_not_initialized'\"></smart-ui-action-toolbar>\r\n <button\r\n (click)=\"editColumns()\"\r\n mat-mini-fab\r\n color=\"text-primary\"\r\n *ngIf=\"smartGrid.showEditColumns\"\r\n >\r\n <mat-icon aria-hidden=\"false\" aria-label=\"Columns\" class=\"smart-grid-edit-icon\"\r\n >view_columns</mat-icon\r\n >\r\n </button>\r\n </div>\r\n <!-- <div [ngClass]=\"isBlocked ? 'blocked' : ''\"></div> -->\r\n <div class=\"smartGridContent\">\r\n <div>\r\n <div *ngIf=\"smartGrid.showResultCount\">\r\n <div class=\"smartGrid-data-number\">\r\n {{ smartGrid.gridModel.totalRowCount }}\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"smart-grid-table-container\">\r\n <ng-template #table></ng-template>\r\n </div>\r\n\r\n <div *ngIf=\"smartGrid.layoutDef === layoutDef().EXPANDABLE\">\r\n <smart-expandable-section\r\n #gridExpandableSection\r\n *ngFor=\"let expandableSection of expandableSections\"\r\n [data]=\"expandableSection\"\r\n ></smart-expandable-section>\r\n </div>\r\n <div\r\n *ngIf=\"smartGrid.layoutDef === layoutDef().CARD && smartGrid.dataLayoutDef\"\r\n class=\"cards-container\"\r\n [ngStyle]=\"{\r\n 'grid-template-columns':\r\n smartGrid.numberOfColumn !== undefined\r\n ? 'repeat(' + smartGrid.numberOfColumn + ', 1fr)'\r\n : ''\r\n }\"\r\n >\r\n <app-smart-grid-card\r\n class=\"smartGrid-card-container\"\r\n *ngFor=\"let task of smartGrid.gridModel.page.rows\"\r\n [item]=\"task\"\r\n [smartGrid]=\"smartGrid\"\r\n [onSelect]=\"onSelect.bind(this)\"\r\n ></app-smart-grid-card>\r\n </div>\r\n <div\r\n *ngIf=\"smartGrid.layoutDef === layoutDef().TREE && treeControl\"\r\n class=\"tree-container\"\r\n [ngStyle]=\"{\r\n 'grid-template-columns':\r\n smartGrid.numberOfColumn !== undefined\r\n ? 'repeat(' + smartGrid.numberOfColumn + ', 1fr)'\r\n : ''\r\n }\"\r\n >\r\n <mat-tree [dataSource]=\"treeDataSource!\" [treeControl]=\"treeControl!\">\r\n <mat-tree-node\r\n *matTreeNodeDef=\"let node\"\r\n matTreeNodeToggle\r\n matTreeNodePadding\r\n matTreeNodePaddingIndent=\"24\"\r\n >\r\n <button mat-icon-button disabled class=\"tree-button\"></button>\r\n <mat-checkbox\r\n class=\"checklist-leaf-node\"\r\n [checked]=\"treeChecklistSelection?.isSelected(node)\"\r\n (change)=\"treeNodeSelectionToggle(node)\"\r\n >{{ getTreeItem(node) }}</mat-checkbox\r\n >\r\n </mat-tree-node>\r\n\r\n <mat-tree-node\r\n *matTreeNodeDef=\"let node; when: hasChild\"\r\n matTreeNodePadding\r\n matTreeNodePaddingIndent=\"24\"\r\n >\r\n <button\r\n mat-icon-button\r\n matTreeNodeToggle\r\n class=\"tree-button\"\r\n [attr.aria-label]=\"'Toggle ' + node.item\"\r\n >\r\n <mat-icon class=\"mat-icon-rtl-mirror\">\r\n {{ treeControl!.isExpanded(node) ? 'expand_more' : 'chevron_right' }}\r\n </mat-icon>\r\n </button>\r\n <mat-checkbox\r\n [checked]=\"treeChecklistSelection?.isSelected(node)\"\r\n [indeterminate]=\"descendantsPartiallySelected(node)\"\r\n (change)=\"treeNodeSelectionToggle(node)\"\r\n >{{ getTreeItem(node) }}</mat-checkbox\r\n >\r\n </mat-tree-node>\r\n </mat-tree>\r\n </div>\r\n </div>\r\n\r\n <mat-paginator\r\n *ngIf=\"smartGrid.paginator && !treeControl\"\r\n #paginator\r\n [length]=\"length\"\r\n [pageIndex]=\"pageIndex\"\r\n [pageSize]=\"pageSize\"\r\n [pageSizeOptions]=\"pageSizeOptions\"\r\n (page)=\"onChangePage($event)\"\r\n ></mat-paginator>\r\n</div>\r\n}\r\n", styles: [".smartGrid-container{position:relative;padding:1.5rem;display:flex;flex-direction:column;gap:1rem}.primeSmartGrid-container{display:flex;flex-direction:column;gap:1rem}.smartGrid-data-number{padding-bottom:1rem}.smart-table-icon-container{display:flex;flex-direction:row;justify-content:space-between;white-space:initial}.cards-container{display:grid;gap:1rem;padding:1rem}.smartGrid-card-container{height:auto;border:1px solid black;border-radius:8px}.smartGrid-container ::ng-deep .mat-form-field-appearance-legacy .mat-form-field-underline{bottom:0}.smartGridContent{width:100%;flex:1;overflow:auto}.blocked{position:absolute;width:calc(100% - 3rem);height:calc(100% - 3rem);z-index:110;background-color:#0003}.smart-grid-table-container{display:flex;flex-direction:column;gap:1rem}.smart-grid-toolbar{display:flex;flex-direction:row;justify-content:flex-end;align-items:center}.smart-grid-toolbar smart-ui-action-toolbar{width:100%}.smart-grid-edit-icon{color:var(--light-gray)}.tree-button{width:24px!important;height:24px!important}.menu-button{text-align:-webkit-right}\n"] }]
12642
- }], ctorParameters: () => [{ type: SmartGridService }, { type: ComponentFactoryService }, { type: i1$1.MatDialog }, { type: i0.Injector }, { type: UiActionDescriptorService }, { type: ComponentLibrary, decorators: [{
12650
+ }], ctorParameters: () => [{ type: SmartGridService }, { type: ComponentFactoryService }, { type: i1$1.MatDialog }, { type: i0.Injector }, { type: UiActionDescriptorService }, { type: UiActionService }, { type: ComponentLibrary, decorators: [{
12643
12651
  type: Inject,
12644
12652
  args: [COMPONENT_LIBRARY]
12645
12653
  }] }, { type: undefined, decorators: [{