@trudb/tru-common-lib 0.2.351 → 0.2.355

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.
@@ -2182,6 +2182,9 @@ class TruDataContext {
2182
2182
  get onHasChanged() {
2183
2183
  return this._breezeContext.entityManager.hasChangesChanged;
2184
2184
  }
2185
+ hasChanged = () => {
2186
+ return this._breezeContext.entityManager.getChanges();
2187
+ };
2185
2188
  hasChanges = (entityTypes = []) => {
2186
2189
  if (entityTypes.length)
2187
2190
  return this._breezeContext.entityManager.getChanges(entityTypes);
@@ -7623,6 +7626,8 @@ class TruDataGrid {
7623
7626
  util;
7624
7627
  app;
7625
7628
  cdr;
7629
+ hostElement;
7630
+ desktopViewEventNotifier;
7626
7631
  tabGroupEventNotifier;
7627
7632
  dataGridContainer;
7628
7633
  customToolbarContainer;
@@ -7702,7 +7707,7 @@ class TruDataGrid {
7702
7707
  rowSelectedOnMousedown = null;
7703
7708
  rowFocuedOnMousedown = null;
7704
7709
  copiedRowData = [];
7705
- constructor(dataContext, componentLookup, searchResultViewManager, appEnvironment, searchViewEventHandler, uiNotification, connectionHub, windowEventHandler, dataGridClipboard, util, app, cdr, tabGroupEventNotifier) {
7710
+ constructor(dataContext, componentLookup, searchResultViewManager, appEnvironment, searchViewEventHandler, uiNotification, connectionHub, windowEventHandler, dataGridClipboard, util, app, cdr, hostElement, desktopViewEventNotifier, tabGroupEventNotifier) {
7706
7711
  this.dataContext = dataContext;
7707
7712
  this.componentLookup = componentLookup;
7708
7713
  this.searchResultViewManager = searchResultViewManager;
@@ -7715,6 +7720,8 @@ class TruDataGrid {
7715
7720
  this.util = util;
7716
7721
  this.app = app;
7717
7722
  this.cdr = cdr;
7723
+ this.hostElement = hostElement;
7724
+ this.desktopViewEventNotifier = desktopViewEventNotifier;
7718
7725
  this.tabGroupEventNotifier = tabGroupEventNotifier;
7719
7726
  }
7720
7727
  enhanceRowDataForEntity = (entity) => {
@@ -7734,6 +7741,8 @@ class TruDataGrid {
7734
7741
  let unassociatedType = this.config.resultConfig.entityManyToManyType;
7735
7742
  let ref = this.selectedUnassociatedChoice.value.$;
7736
7743
  let childToAssociate = this.dataContext.entityAccess().searchByRefCacheOnly(unassociatedType, ref, true);
7744
+ if (!childToAssociate)
7745
+ childToAssociate = this.appEnvironment.globalDataContext?.entityAccess().searchByRefCacheOnly(unassociatedType, ref, true);
7737
7746
  if (childToAssociate) {
7738
7747
  let enhancedEntity = this.enhanceRowDataForEntity(newEntity);
7739
7748
  enhancedEntity.$entity[this.config.resultConfig.entityManyToManyTypeNameWithPrefix + 'Ref'] = childToAssociate[unassociatedType.name + 'Ref'];
@@ -8276,7 +8285,7 @@ class TruDataGrid {
8276
8285
  this.subscribeTo();
8277
8286
  this.label = this.config.resultConfig.label;
8278
8287
  this.columnDefs = this.config.resultConfig.columnDefs;
8279
- this.gridType = this.config.resultConfig.gridType;
8288
+ this.gridType = this.config.gridType ?? this.config.resultConfig.gridType;
8280
8289
  }
8281
8290
  ngAfterViewInit() {
8282
8291
  //setTimeout to prevent: ERROR Error: NG0100: ExpressionChangedAfterItHasBeenCheckedError.
@@ -8287,15 +8296,75 @@ class TruDataGrid {
8287
8296
  this.customToolbarComponents = this.config.customToolbarComponents;
8288
8297
  this.renderCustomToolbarComponents();
8289
8298
  this.runSearch();
8299
+ this.resizeGrid();
8290
8300
  }, 0);
8301
+ this.subs.push(fromEvent(window, 'resize').subscribe(() => this.resizeGrid()));
8302
+ if (this.tabGroupEventNotifier) {
8303
+ this.subs.push(this.tabGroupEventNotifier.onActiveStateChanged().pipe(skip(1)).subscribe(() => this.resizeGrid()));
8304
+ }
8305
+ if (this.config?.view && this.desktopViewEventNotifier) {
8306
+ this.subs.push(this.desktopViewEventNotifier.onActiveStateChanged().pipe(skip(1)).subscribe(() => this.resizeGrid()));
8307
+ }
8291
8308
  }
8292
8309
  ngOnChanges(changes) {
8293
8310
  this.runSearch();
8311
+ this.resizeGrid();
8294
8312
  }
8295
8313
  ngOnDestroy() {
8296
8314
  this.subs.forEach(s => s.unsubscribe());
8297
8315
  }
8298
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.3", ngImport: i0, type: TruDataGrid, deps: [{ token: TruDataContext }, { token: TruComponentLookup }, { token: TruSearchResultViewManager }, { token: TruAppEnvironment }, { token: TruSearchViewEventHandler }, { token: TruUiNotification }, { token: TruConnectionHub }, { token: TruWindowEventHandler }, { token: TruDataGridClipboard }, { token: TruUtil }, { token: i0.ApplicationRef }, { token: i0.ChangeDetectorRef }, { token: TruTabGroupEventNotifier, optional: true }], target: i0.ɵɵFactoryTarget.Component });
8316
+ //Adjusts grid height to fill available detail space, honoring fill/min/max rows.
8317
+ //this doesn't affect search grids.
8318
+ resizeGrid = () => {
8319
+ const gridType = this.gridType;
8320
+ if (gridType === TruDataGridTypes.Search)
8321
+ return;
8322
+ if (!this.dataGridContainer || !this.dataGridContainer.nativeElement)
8323
+ return;
8324
+ const hostEl = this.hostElement.nativeElement;
8325
+ const detailContent = hostEl.closest('.detail-content');
8326
+ if (!detailContent)
8327
+ return;
8328
+ // Only split height among grids stacked in the same column, not side-by-side columns.
8329
+ const column = hostEl.closest('.tvl-container-grid-col');
8330
+ const siblingGrids = column ? Array.from(column.querySelectorAll('tru-data-grid')) : [hostEl];
8331
+ const firstGridTop = siblingGrids.length ? siblingGrids[0].getBoundingClientRect().top : hostEl.getBoundingClientRect().top;
8332
+ const detailRect = detailContent.getBoundingClientRect();
8333
+ const availableTotal = detailContent.clientHeight - (firstGridTop - detailRect.top) - 10; // small bottom padding
8334
+ if (availableTotal <= 0)
8335
+ return;
8336
+ const perGridOverhead = 45; // toolbar + statusbar overhead (v6 does something similar i am just porting here)
8337
+ const distributedHeight = siblingGrids.length > 1
8338
+ ? (availableTotal - (siblingGrids.length - 1) * perGridOverhead) / siblingGrids.length
8339
+ : availableTotal;
8340
+ const rowHeight = this.gridOptions?.rowHeight ?? 22;
8341
+ const headerHeight = 25;
8342
+ const minRows = this.config.minimumRows ?? 0;
8343
+ const maxRows = this.config.maximumRows;
8344
+ const gridTopOffset = this.label ? 48 : 28;
8345
+ const gridBottomOffset = 23; // status bar height/bottom offset
8346
+ const gridChromePx = gridTopOffset + gridBottomOffset;
8347
+ // Ensure space for either the minimum rows or the overlay box (50px high).
8348
+ const overlayMinPx = 50;
8349
+ const contentMinPx = Math.max((minRows * rowHeight) + headerHeight, overlayMinPx);
8350
+ const minPx = contentMinPx + gridChromePx;
8351
+ const maxPx = typeof maxRows === 'number' ? ((maxRows * rowHeight) + headerHeight + gridChromePx) : undefined;
8352
+ let targetHeight = distributedHeight;
8353
+ if (!this.config.fill) {
8354
+ if (maxPx !== undefined && maxPx < targetHeight)
8355
+ targetHeight = maxPx;
8356
+ if (minPx > targetHeight)
8357
+ targetHeight = minPx;
8358
+ }
8359
+ // Prevent negative/NaN
8360
+ targetHeight = Math.max(minPx || 0, targetHeight || 0);
8361
+ hostEl.style.height = `${targetHeight}px`;
8362
+ const apiAny = this.api;
8363
+ if (apiAny?.doLayout) {
8364
+ apiAny.doLayout();
8365
+ }
8366
+ };
8367
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.3", ngImport: i0, type: TruDataGrid, deps: [{ token: TruDataContext }, { token: TruComponentLookup }, { token: TruSearchResultViewManager }, { token: TruAppEnvironment }, { token: TruSearchViewEventHandler }, { token: TruUiNotification }, { token: TruConnectionHub }, { token: TruWindowEventHandler }, { token: TruDataGridClipboard }, { token: TruUtil }, { token: i0.ApplicationRef }, { token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: TruDesktopViewEventNotifier }, { token: TruTabGroupEventNotifier, optional: true }], target: i0.ɵɵFactoryTarget.Component });
8299
8368
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.3", type: TruDataGrid, isStandalone: true, selector: "tru-data-grid", inputs: { config: "config", entity: "entity", name: "name" }, host: { properties: { "class.tru-data-grid": "true" } }, viewQueries: [{ propertyName: "dataGridContainer", first: true, predicate: ["dataGridContainer"], descendants: true }, { propertyName: "customToolbarContainer", first: true, predicate: ["customToolbarContainer"], descendants: true, read: ViewContainerRef }], usesOnChanges: true, ngImport: i0, template: "<div [ngClass]=\"{'tru-data-grid-label-offset': label}\">\r\n <span class=\"tru-data-grid-label\" *ngIf=\"label\">{{label}}</span>\r\n <div class=\"tru-data-grid-toolbar-container\">\r\n <tru-toolbar>\r\n <tru-toolbar-dropdown [options]=\"unassociatedChoices\"\r\n [(selectedOption)]=\"selectedUnassociatedChoice\"\r\n [disabled]=\"!this.config.tableConfig.canAdd\"\r\n (selectionChange)=\"onUnassociatedChoiceChanged($event)\"\r\n *ngIf=\"gridType == TruDataGridTypes.DetailManyToMany\">\r\n </tru-toolbar-dropdown>\r\n <tru-toolbar-button [icon]=\"'tru-toolbar-add-icon'\" [tooltip]=\"'Add - [Ctrl + I]'\" [disabled]=\"!canAdd()\" (onClick)=\"onAdd()\"></tru-toolbar-button>\r\n <tru-toolbar-button [icon]=\"'tru-toolbar-delete-icon'\" [tooltip]=\"'Delete - [Ctrl + D]'\" (click)=\"onDelete()\"></tru-toolbar-button>\r\n <tru-toolbar-button [icon]=\"'tru-toolbar-keep-icon'\" [tooltip]=\"'Keep selected records - [Ctrl + K]'\" (click)=\"onKeep()\"></tru-toolbar-button>\r\n <tru-toolbar-button [icon]=\"'tru-toolbar-remove-icon'\" [tooltip]=\"'Remove selected records - [Ctrl + R]'\" (click)=\"onRemove()\"></tru-toolbar-button>\r\n <tru-toolbar-separator *ngIf=\"parentToolbarTemplate\"></tru-toolbar-separator>\r\n <ng-container *ngTemplateOutlet=\"parentToolbarTemplate\"></ng-container>\r\n <tru-toolbar-separator></tru-toolbar-separator>\r\n <tru-toolbar-button [icon]=\"'tru-toolbar-export-icon'\" [tooltip]=\"'Export'\" (click)=\"onExport()\"></tru-toolbar-button>\r\n <tru-toolbar-separator *ngIf=\"viewMenuItems.length\"></tru-toolbar-separator>\r\n <div *ngIf=\"viewMenuItems.length\">\r\n <tru-toolbar-menu *ngFor=\"let viewMenuItem of viewMenuItems\" [config]=\"viewMenuItem\"></tru-toolbar-menu>\r\n </div>\r\n <ng-container #customToolbarContainer></ng-container>\r\n </tru-toolbar>\r\n </div>\r\n <div #dataGridContainer class=\"tru-data-grid-container\">\r\n <ag-grid-angular class=\"ag-theme-alpine\"\r\n [gridOptions]=\"gridOptions\"\r\n [rowData]=\"rowData\"\r\n [columnDefs]=\"columnDefs\"\r\n [defaultColDef]=\"defaultColDef\"\r\n [headerHeight]=\"25\"\r\n [rowHeight]=\"22\"\r\n [rowBuffer]=\"50\"\r\n [enterNavigatesVertically]=\"true\"\r\n [enterNavigatesVerticallyAfterEdit]=\"true\"\r\n [suppressRowHoverHighlight]=\"true\"\r\n [suppressRowClickSelection]=\"true\"\r\n [stopEditingWhenCellsLoseFocus]=\"false\"\r\n (cellClicked)=\"onCellClicked($event)\"\r\n (cellDoubleClicked)=\"onCellDoubleClicked($event)\"\r\n (cellKeyDown)=\"onCellKeyDown($event)\"\r\n (rowDataChanged)=\"onRowDataChanged($event)\"\r\n (cellMouseDown)=\"onCellMouseDown($event)\"\r\n (cellMouseOver)=\"onCellMouseOver($event)\"\r\n (cellMouseOut)=\"onCellMouseOut($event)\"\r\n (contextmenu)=\"onRightClick($event)\"\r\n (rowClicked)=\"onRowClicked($event)\">\r\n </ag-grid-angular>\r\n </div>\r\n <div class=\"tru-data-grid-statusbar-container\">\r\n <div class=\"tru-data-grid-statusbar-values-container\">\r\n <p class=\"tru-data-grid-statusbar-values-text\">{{rowCount}}</p>\r\n <p class=\"tru-data-grid-statusbar-values-text\">Selected: {{api ? api.getSelectedRows().length : 0}}</p>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".tru-data-grid-label{font-size:14px;font-weight:700;margin-bottom:5px;display:flex}.tru-data-grid:first-of-type+.tru-data-grid{margin-left:5px}.tru-data-grid-toolbar-container{display:inline-flex}.tru-data-grid-container{min-height:200px}.tru-data-grid-statusbar-container{position:absolute!important;left:0;right:0;bottom:0;height:23px;background:#006dcc;border-bottom-left-radius:0;border-bottom-right-radius:0;border-top:1px solid #e7e7e7}.tru-data-grid-statusbar-container p{float:left;color:#fff;font-weight:700;margin-left:10px;margin-top:0!important;line-height:23px;font-size:12px}.detail-container .tru-data-grid{position:relative}.detail-container .mat-mdc-tab-body-content{height:100%;overflow:hidden!important}.detail-container .ag-root-wrapper{height:calc(100% - 50px)!important}ag-grid-angular{position:absolute;inset:28px 0 23px;width:100%;height:100%}.tru-data-grid-label-offset ag-grid-angular{top:48px;height:calc(100% - 70px)}.ag-root-wrapper{border-top:0px!important}.ag-root{top:0;bottom:23px!important}::ng-deep .mat-mdc-tab-group .ag-root.ag-layout-normal{height:calc(100% - 50px)!important}.search-container .ag-root.ag-layout-normal{height:calc(100% - 50px)!important}.ag-header-cell{padding-left:0!important;padding-right:0!important}.ag-header-cell-resize:after{top:unset!important;height:25px!important}.ag-header-row{font-weight:500!important}.ag-header-cell-label{justify-content:center}.ag-row{border-color:#d8dbe3}.ag-row.popup-editing{z-index:unset!important}.ag-row .ag-cell-value{padding-left:2px!important;padding-right:2px!important}.ag-row .ag-cell-value.invalid{border:1px solid red!important;border-radius:0}.ag-row .ag-cell-value.ag-cell-inline-editing:not(.invalid){border-color:#006dcc!important}.ag-ltr .ag-header-cell-resize{right:-5px}.ag-header-cell-text{font-size:12px!important}.ag-cell-inline-editing{height:21px!important}.ag-cell{height:21px;border-right:solid #d8dbe3 1px!important}.ag-cell ng-component{pointer-events:none}.ag-has-focus .ag-cell-focus:not(.invalid){border:solid #006dcc 1px!important}.ag-pinned-left-cols-container .ag-cell.ag-cell-focus{border:solid #dde2eb 1px!important;border-top:0px!important;border-bottom:0px!important}.ag-pinned-left-cols-container .ag-row-selected .ag-cell,.ag-pinned-left-cols-container .ag-row-focus .ag-cell{border:0px solid #dde2eb!important;border-right:2px solid #006dcc!important;color:#fff;font-weight:700;background-color:#006dcc}.ag-pinned-left-cols-container *:not(.ag-row-selected):not(.ag-row-focus) .ag-cell{background-color:#f5f5f5!important}.ag-pinned-left-cols-container *:not(.ag-row-selected):not(.ag-row-focus) .ag-cell:hover{background-color:#2196f31a!important}.ag-header-cell{background-color:#f5f5f5}.ag-column-focus .ag-header-control-sort-container rect{fill:#ddd}.ag-header-cell.ag-column-focus{border:0px solid #dde2eb!important;border-bottom:2px solid #006dcc!important;color:#006dcc;font-weight:700;background-color:#ddd}.ag-header-cell-comp-wrapper{display:block!important}.ag-cell-label-container{padding:0!important}.ag-pk-aligned-cell{text-align:center}.ag-horizontal-left-spacer{overflow:hidden}.ag-popup-editor{background:#fff;padding:10px;border:solid 1px #006dcc}.ag-overlay-loading-center{border:none!important;box-shadow:none!important}.ag-viewport .ag-row-selected .ag-cell{background-color:#efefef!important}.ag-row-selected~.ag-row-selected .ag-cell{border-top-color:#dde2eb}*:not(.ag-row-selected):not(.ag-row-inline-editing)+.ag-row-selected .ag-cell{border-top-color:#006dcc}.ag-row-selected:has(+:not(.ag-row-selected)):not(.ag-row-inline-editing) .ag-cell{border-bottom-color:#006dcc}.ag-cell.invalid .invalid-flag{box-sizing:border-box;position:absolute;left:0;top:0;width:3px;height:3px;border-bottom:solid 3px transparent;border-right:solid 3px transparent;border-left:solid 3px red;border-top:solid 3px red}.ag-grid-row-has-changes-gradient{background-color:#fff;filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr=#fff,endColorstr=#ffffff);background-image:-moz-linear-gradient(top,#fff 0%,#ffffff 25%,#dbffdf 100%);background-image:linear-gradient(top,#fff 0% 25%,#dbffdf);background-image:-webkit-linear-gradient(top,#fff 0%,#ffffff 25%,#dbffdf 100%);background-image:-o-linear-gradient(top,#fff 0%,#ffffff 25%,#dbffdf 100%);background-image:-ms-linear-gradient(top,#fff 0%,#ffffff 25%,#dbffdf 100%);background-image:-webkit-gradient(linear,right top,right bottom,color-stop(0%,#fff),color-stop(25%,#ffffff),color-stop(100%,#dbffdf))}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.spin{animation-name:spin;animation-duration:4s;animation-iteration-count:infinite;animation-timing-function:linear}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: MatIconModule }, { kind: "ngmodule", type: MatButtonModule }, { kind: "ngmodule", type: MatMenuModule }, { kind: "component", type: AgGridAngular, selector: "ag-grid-angular", inputs: ["gridOptions", "modules", "statusBar", "sideBar", "suppressContextMenu", "preventDefaultOnContextMenu", "allowContextMenuWithControlKey", "columnMenu", "suppressMenuHide", "enableBrowserTooltips", "tooltipTrigger", "tooltipShowDelay", "tooltipHideDelay", "tooltipMouseTrack", "tooltipShowMode", "tooltipInteraction", "popupParent", "copyHeadersToClipboard", "copyGroupHeadersToClipboard", "clipboardDelimiter", "suppressCopyRowsToClipboard", "suppressCopySingleCellRanges", "suppressLastEmptyLineOnPaste", "suppressClipboardPaste", "suppressClipboardApi", "suppressCutToClipboard", "columnDefs", "defaultColDef", "defaultColGroupDef", "columnTypes", "dataTypeDefinitions", "maintainColumnOrder", "enableStrictPivotColumnOrder", "suppressFieldDotNotation", "headerHeight", "groupHeaderHeight", "floatingFiltersHeight", "pivotHeaderHeight", "pivotGroupHeaderHeight", "allowDragFromColumnsToolPanel", "suppressMovableColumns", "suppressColumnMoveAnimation", "suppressMoveWhenColumnDragging", "suppressDragLeaveHidesColumns", "suppressGroupChangesColumnVisibility", "suppressMakeColumnVisibleAfterUnGroup", "suppressRowGroupHidesColumns", "colResizeDefault", "suppressAutoSize", "autoSizePadding", "skipHeaderOnAutoSize", "autoSizeStrategy", "components", "editType", "singleClickEdit", "suppressClickEdit", "readOnlyEdit", "stopEditingWhenCellsLoseFocus", "enterNavigatesVertically", "enterNavigatesVerticallyAfterEdit", "enableCellEditingOnBackspace", "undoRedoCellEditing", "undoRedoCellEditingLimit", "defaultCsvExportParams", "suppressCsvExport", "defaultExcelExportParams", "suppressExcelExport", "excelStyles", "findSearchValue", "findOptions", "quickFilterText", "cacheQuickFilter", "includeHiddenColumnsInQuickFilter", "quickFilterParser", "quickFilterMatcher", "applyQuickFilterBeforePivotOrAgg", "excludeChildrenWhenTreeDataFiltering", "enableAdvancedFilter", "alwaysPassFilter", "includeHiddenColumnsInAdvancedFilter", "advancedFilterParent", "advancedFilterBuilderParams", "suppressAdvancedFilterEval", "suppressSetFilterByDefault", "enableCharts", "chartThemes", "customChartThemes", "chartThemeOverrides", "chartToolPanelsDef", "chartMenuItems", "loadingCellRenderer", "loadingCellRendererParams", "loadingCellRendererSelector", "localeText", "masterDetail", "keepDetailRows", "keepDetailRowsCount", "detailCellRenderer", "detailCellRendererParams", "detailRowHeight", "detailRowAutoHeight", "context", "dragAndDropImageComponent", "dragAndDropImageComponentParams", "alignedGrids", "tabIndex", "rowBuffer", "valueCache", "valueCacheNeverExpires", "enableCellExpressions", "suppressTouch", "suppressFocusAfterRefresh", "suppressBrowserResizeObserver", "suppressPropertyNamesCheck", "suppressChangeDetection", "debug", "loading", "overlayLoadingTemplate", "loadingOverlayComponent", "loadingOverlayComponentParams", "suppressLoadingOverlay", "overlayNoRowsTemplate", "noRowsOverlayComponent", "noRowsOverlayComponentParams", "suppressNoRowsOverlay", "pagination", "paginationPageSize", "paginationPageSizeSelector", "paginationAutoPageSize", "paginateChildRows", "suppressPaginationPanel", "pivotMode", "pivotPanelShow", "pivotMaxGeneratedColumns", "pivotDefaultExpanded", "pivotColumnGroupTotals", "pivotRowTotals", "pivotSuppressAutoColumn", "suppressExpandablePivotGroups", "functionsReadOnly", "aggFuncs", "suppressAggFuncInHeader", "alwaysAggregateAtRootLevel", "aggregateOnlyChangedColumns", "suppressAggFilteredOnly", "removePivotHeaderRowWhenSingleValueColumn", "animateRows", "cellFlashDuration", "cellFadeDuration", "allowShowChangeAfterFilter", "domLayout", "ensureDomOrder", "enableCellSpan", "enableRtl", "suppressColumnVirtualisation", "suppressMaxRenderedRowRestriction", "suppressRowVirtualisation", "rowDragManaged", "suppressRowDrag", "suppressMoveWhenRowDragging", "rowDragEntireRow", "rowDragMultiRow", "rowDragText", "fullWidthCellRenderer", "fullWidthCellRendererParams", "embedFullWidthRows", "groupDisplayType", "groupDefaultExpanded", "autoGroupColumnDef", "groupMaintainOrder", "groupSelectsChildren", "groupLockGroupColumns", "groupAggFiltering", "groupTotalRow", "grandTotalRow", "suppressStickyTotalRow", "groupSuppressBlankHeader", "groupSelectsFiltered", "showOpenedGroup", "groupHideParentOfSingleChild", "groupRemoveSingleChildren", "groupRemoveLowestSingleChildren", "groupHideOpenParents", "groupAllowUnbalanced", "rowGroupPanelShow", "groupRowRenderer", "groupRowRendererParams", "treeData", "treeDataChildrenField", "treeDataParentIdField", "rowGroupPanelSuppressSort", "suppressGroupRowsSticky", "pinnedTopRowData", "pinnedBottomRowData", "rowModelType", "rowData", "asyncTransactionWaitMillis", "suppressModelUpdateAfterUpdateTransaction", "datasource", "cacheOverflowSize", "infiniteInitialRowCount", "serverSideInitialRowCount", "suppressServerSideFullWidthLoadingRow", "cacheBlockSize", "maxBlocksInCache", "maxConcurrentDatasourceRequests", "blockLoadDebounceMillis", "purgeClosedRowNodes", "serverSideDatasource", "serverSideSortAllLevels", "serverSideEnableClientSideSort", "serverSideOnlyRefreshFilteredGroups", "serverSidePivotResultFieldSeparator", "viewportDatasource", "viewportRowModelPageSize", "viewportRowModelBufferSize", "alwaysShowHorizontalScroll", "alwaysShowVerticalScroll", "debounceVerticalScrollbar", "suppressHorizontalScroll", "suppressScrollOnNewData", "suppressScrollWhenPopupsAreOpen", "suppressAnimationFrame", "suppressMiddleClickScrolls", "suppressPreventDefaultOnMouseWheel", "scrollbarWidth", "rowSelection", "cellSelection", "rowMultiSelectWithClick", "suppressRowDeselection", "suppressRowClickSelection", "suppressCellFocus", "suppressHeaderFocus", "selectionColumnDef", "rowNumbers", "suppressMultiRangeSelection", "enableCellTextSelection", "enableRangeSelection", "enableRangeHandle", "enableFillHandle", "fillHandleDirection", "suppressClearOnFillReduction", "sortingOrder", "accentedSort", "unSortIcon", "suppressMultiSort", "alwaysMultiSort", "multiSortKey", "suppressMaintainUnsortedOrder", "icons", "rowHeight", "rowStyle", "rowClass", "rowClassRules", "suppressRowHoverHighlight", "suppressRowTransform", "columnHoverHighlight", "gridId", "deltaSort", "treeDataDisplayType", "enableGroupEdit", "initialState", "theme", "loadThemeGoogleFonts", "themeCssLayer", "styleNonce", "themeStyleContainer", "getContextMenuItems", "getMainMenuItems", "postProcessPopup", "processUnpinnedColumns", "processCellForClipboard", "processHeaderForClipboard", "processGroupHeaderForClipboard", "processCellFromClipboard", "sendToClipboard", "processDataFromClipboard", "isExternalFilterPresent", "doesExternalFilterPass", "getChartToolbarItems", "createChartContainer", "focusGridInnerElement", "navigateToNextHeader", "tabToNextHeader", "navigateToNextCell", "tabToNextCell", "getLocaleText", "getDocument", "paginationNumberFormatter", "getGroupRowAgg", "isGroupOpenByDefault", "initialGroupOrderComparator", "processPivotResultColDef", "processPivotResultColGroupDef", "getDataPath", "getChildCount", "getServerSideGroupLevelParams", "isServerSideGroupOpenByDefault", "isApplyServerSideTransaction", "isServerSideGroup", "getServerSideGroupKey", "getBusinessKeyForNode", "getRowId", "resetRowDataOnUpdate", "processRowPostCreate", "isRowSelectable", "isRowMaster", "fillOperation", "postSortRows", "getRowStyle", "getRowClass", "getRowHeight", "isFullWidthRow"], outputs: ["toolPanelVisibleChanged", "toolPanelSizeChanged", "columnMenuVisibleChanged", "contextMenuVisibleChanged", "cutStart", "cutEnd", "pasteStart", "pasteEnd", "columnVisible", "columnPinned", "columnResized", "columnMoved", "columnValueChanged", "columnPivotModeChanged", "columnPivotChanged", "columnGroupOpened", "newColumnsLoaded", "gridColumnsChanged", "displayedColumnsChanged", "virtualColumnsChanged", "columnEverythingChanged", "columnHeaderMouseOver", "columnHeaderMouseLeave", "columnHeaderClicked", "columnHeaderContextMenu", "componentStateChanged", "cellValueChanged", "cellEditRequest", "rowValueChanged", "cellEditingStarted", "cellEditingStopped", "rowEditingStarted", "rowEditingStopped", "undoStarted", "undoEnded", "redoStarted", "redoEnded", "cellSelectionDeleteStart", "cellSelectionDeleteEnd", "rangeDeleteStart", "rangeDeleteEnd", "fillStart", "fillEnd", "filterOpened", "filterChanged", "filterModified", "advancedFilterBuilderVisibleChanged", "findChanged", "chartCreated", "chartRangeSelectionChanged", "chartOptionsChanged", "chartDestroyed", "cellKeyDown", "gridReady", "firstDataRendered", "gridSizeChanged", "modelUpdated", "virtualRowRemoved", "viewportChanged", "bodyScroll", "bodyScrollEnd", "dragStarted", "dragStopped", "dragCancelled", "stateUpdated", "paginationChanged", "rowDragEnter", "rowDragMove", "rowDragLeave", "rowDragEnd", "rowDragCancel", "columnRowGroupChanged", "rowGroupOpened", "expandOrCollapseAll", "pivotMaxColumnsExceeded", "pinnedRowDataChanged", "rowDataUpdated", "asyncTransactionsFlushed", "storeRefreshed", "headerFocused", "cellClicked", "cellDoubleClicked", "cellFocused", "cellMouseOver", "cellMouseOut", "cellMouseDown", "rowClicked", "rowDoubleClicked", "rowSelected", "selectionChanged", "cellContextMenu", "rangeSelectionChanged", "cellSelectionChanged", "tooltipShow", "tooltipHide", "sortChanged"] }, { kind: "component", type: TruToolbar, selector: "tru-toolbar", inputs: ["config"] }, { kind: "component", type: TruToolbarButton, selector: "tru-toolbar-button", inputs: ["config", "icon", "text", "disabled", "tooltip", "type"], outputs: ["onClick", "onKeydown"] }, { kind: "component", type: TruToolbarDropdown, selector: "tru-toolbar-dropdown", inputs: ["config", "options", "tooltip", "multiple", "filterable", "filterTooltip", "width", "selectedOption", "disabled"], outputs: ["selectedOptionChange", "selectionChange"] }, { kind: "component", type: TruToolbarSeparator, selector: "tru-toolbar-separator" }, { kind: "component", type: TruToolbarMenu, selector: "tru-toolbar-menu", inputs: ["config"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
8300
8369
  }
8301
8370
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.3", ngImport: i0, type: TruDataGrid, decorators: [{
@@ -8314,7 +8383,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.3", ngImpor
8314
8383
  TruToolbarSeparator,
8315
8384
  TruToolbarMenu
8316
8385
  ], template: "<div [ngClass]=\"{'tru-data-grid-label-offset': label}\">\r\n <span class=\"tru-data-grid-label\" *ngIf=\"label\">{{label}}</span>\r\n <div class=\"tru-data-grid-toolbar-container\">\r\n <tru-toolbar>\r\n <tru-toolbar-dropdown [options]=\"unassociatedChoices\"\r\n [(selectedOption)]=\"selectedUnassociatedChoice\"\r\n [disabled]=\"!this.config.tableConfig.canAdd\"\r\n (selectionChange)=\"onUnassociatedChoiceChanged($event)\"\r\n *ngIf=\"gridType == TruDataGridTypes.DetailManyToMany\">\r\n </tru-toolbar-dropdown>\r\n <tru-toolbar-button [icon]=\"'tru-toolbar-add-icon'\" [tooltip]=\"'Add - [Ctrl + I]'\" [disabled]=\"!canAdd()\" (onClick)=\"onAdd()\"></tru-toolbar-button>\r\n <tru-toolbar-button [icon]=\"'tru-toolbar-delete-icon'\" [tooltip]=\"'Delete - [Ctrl + D]'\" (click)=\"onDelete()\"></tru-toolbar-button>\r\n <tru-toolbar-button [icon]=\"'tru-toolbar-keep-icon'\" [tooltip]=\"'Keep selected records - [Ctrl + K]'\" (click)=\"onKeep()\"></tru-toolbar-button>\r\n <tru-toolbar-button [icon]=\"'tru-toolbar-remove-icon'\" [tooltip]=\"'Remove selected records - [Ctrl + R]'\" (click)=\"onRemove()\"></tru-toolbar-button>\r\n <tru-toolbar-separator *ngIf=\"parentToolbarTemplate\"></tru-toolbar-separator>\r\n <ng-container *ngTemplateOutlet=\"parentToolbarTemplate\"></ng-container>\r\n <tru-toolbar-separator></tru-toolbar-separator>\r\n <tru-toolbar-button [icon]=\"'tru-toolbar-export-icon'\" [tooltip]=\"'Export'\" (click)=\"onExport()\"></tru-toolbar-button>\r\n <tru-toolbar-separator *ngIf=\"viewMenuItems.length\"></tru-toolbar-separator>\r\n <div *ngIf=\"viewMenuItems.length\">\r\n <tru-toolbar-menu *ngFor=\"let viewMenuItem of viewMenuItems\" [config]=\"viewMenuItem\"></tru-toolbar-menu>\r\n </div>\r\n <ng-container #customToolbarContainer></ng-container>\r\n </tru-toolbar>\r\n </div>\r\n <div #dataGridContainer class=\"tru-data-grid-container\">\r\n <ag-grid-angular class=\"ag-theme-alpine\"\r\n [gridOptions]=\"gridOptions\"\r\n [rowData]=\"rowData\"\r\n [columnDefs]=\"columnDefs\"\r\n [defaultColDef]=\"defaultColDef\"\r\n [headerHeight]=\"25\"\r\n [rowHeight]=\"22\"\r\n [rowBuffer]=\"50\"\r\n [enterNavigatesVertically]=\"true\"\r\n [enterNavigatesVerticallyAfterEdit]=\"true\"\r\n [suppressRowHoverHighlight]=\"true\"\r\n [suppressRowClickSelection]=\"true\"\r\n [stopEditingWhenCellsLoseFocus]=\"false\"\r\n (cellClicked)=\"onCellClicked($event)\"\r\n (cellDoubleClicked)=\"onCellDoubleClicked($event)\"\r\n (cellKeyDown)=\"onCellKeyDown($event)\"\r\n (rowDataChanged)=\"onRowDataChanged($event)\"\r\n (cellMouseDown)=\"onCellMouseDown($event)\"\r\n (cellMouseOver)=\"onCellMouseOver($event)\"\r\n (cellMouseOut)=\"onCellMouseOut($event)\"\r\n (contextmenu)=\"onRightClick($event)\"\r\n (rowClicked)=\"onRowClicked($event)\">\r\n </ag-grid-angular>\r\n </div>\r\n <div class=\"tru-data-grid-statusbar-container\">\r\n <div class=\"tru-data-grid-statusbar-values-container\">\r\n <p class=\"tru-data-grid-statusbar-values-text\">{{rowCount}}</p>\r\n <p class=\"tru-data-grid-statusbar-values-text\">Selected: {{api ? api.getSelectedRows().length : 0}}</p>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".tru-data-grid-label{font-size:14px;font-weight:700;margin-bottom:5px;display:flex}.tru-data-grid:first-of-type+.tru-data-grid{margin-left:5px}.tru-data-grid-toolbar-container{display:inline-flex}.tru-data-grid-container{min-height:200px}.tru-data-grid-statusbar-container{position:absolute!important;left:0;right:0;bottom:0;height:23px;background:#006dcc;border-bottom-left-radius:0;border-bottom-right-radius:0;border-top:1px solid #e7e7e7}.tru-data-grid-statusbar-container p{float:left;color:#fff;font-weight:700;margin-left:10px;margin-top:0!important;line-height:23px;font-size:12px}.detail-container .tru-data-grid{position:relative}.detail-container .mat-mdc-tab-body-content{height:100%;overflow:hidden!important}.detail-container .ag-root-wrapper{height:calc(100% - 50px)!important}ag-grid-angular{position:absolute;inset:28px 0 23px;width:100%;height:100%}.tru-data-grid-label-offset ag-grid-angular{top:48px;height:calc(100% - 70px)}.ag-root-wrapper{border-top:0px!important}.ag-root{top:0;bottom:23px!important}::ng-deep .mat-mdc-tab-group .ag-root.ag-layout-normal{height:calc(100% - 50px)!important}.search-container .ag-root.ag-layout-normal{height:calc(100% - 50px)!important}.ag-header-cell{padding-left:0!important;padding-right:0!important}.ag-header-cell-resize:after{top:unset!important;height:25px!important}.ag-header-row{font-weight:500!important}.ag-header-cell-label{justify-content:center}.ag-row{border-color:#d8dbe3}.ag-row.popup-editing{z-index:unset!important}.ag-row .ag-cell-value{padding-left:2px!important;padding-right:2px!important}.ag-row .ag-cell-value.invalid{border:1px solid red!important;border-radius:0}.ag-row .ag-cell-value.ag-cell-inline-editing:not(.invalid){border-color:#006dcc!important}.ag-ltr .ag-header-cell-resize{right:-5px}.ag-header-cell-text{font-size:12px!important}.ag-cell-inline-editing{height:21px!important}.ag-cell{height:21px;border-right:solid #d8dbe3 1px!important}.ag-cell ng-component{pointer-events:none}.ag-has-focus .ag-cell-focus:not(.invalid){border:solid #006dcc 1px!important}.ag-pinned-left-cols-container .ag-cell.ag-cell-focus{border:solid #dde2eb 1px!important;border-top:0px!important;border-bottom:0px!important}.ag-pinned-left-cols-container .ag-row-selected .ag-cell,.ag-pinned-left-cols-container .ag-row-focus .ag-cell{border:0px solid #dde2eb!important;border-right:2px solid #006dcc!important;color:#fff;font-weight:700;background-color:#006dcc}.ag-pinned-left-cols-container *:not(.ag-row-selected):not(.ag-row-focus) .ag-cell{background-color:#f5f5f5!important}.ag-pinned-left-cols-container *:not(.ag-row-selected):not(.ag-row-focus) .ag-cell:hover{background-color:#2196f31a!important}.ag-header-cell{background-color:#f5f5f5}.ag-column-focus .ag-header-control-sort-container rect{fill:#ddd}.ag-header-cell.ag-column-focus{border:0px solid #dde2eb!important;border-bottom:2px solid #006dcc!important;color:#006dcc;font-weight:700;background-color:#ddd}.ag-header-cell-comp-wrapper{display:block!important}.ag-cell-label-container{padding:0!important}.ag-pk-aligned-cell{text-align:center}.ag-horizontal-left-spacer{overflow:hidden}.ag-popup-editor{background:#fff;padding:10px;border:solid 1px #006dcc}.ag-overlay-loading-center{border:none!important;box-shadow:none!important}.ag-viewport .ag-row-selected .ag-cell{background-color:#efefef!important}.ag-row-selected~.ag-row-selected .ag-cell{border-top-color:#dde2eb}*:not(.ag-row-selected):not(.ag-row-inline-editing)+.ag-row-selected .ag-cell{border-top-color:#006dcc}.ag-row-selected:has(+:not(.ag-row-selected)):not(.ag-row-inline-editing) .ag-cell{border-bottom-color:#006dcc}.ag-cell.invalid .invalid-flag{box-sizing:border-box;position:absolute;left:0;top:0;width:3px;height:3px;border-bottom:solid 3px transparent;border-right:solid 3px transparent;border-left:solid 3px red;border-top:solid 3px red}.ag-grid-row-has-changes-gradient{background-color:#fff;filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr=#fff,endColorstr=#ffffff);background-image:-moz-linear-gradient(top,#fff 0%,#ffffff 25%,#dbffdf 100%);background-image:linear-gradient(top,#fff 0% 25%,#dbffdf);background-image:-webkit-linear-gradient(top,#fff 0%,#ffffff 25%,#dbffdf 100%);background-image:-o-linear-gradient(top,#fff 0%,#ffffff 25%,#dbffdf 100%);background-image:-ms-linear-gradient(top,#fff 0%,#ffffff 25%,#dbffdf 100%);background-image:-webkit-gradient(linear,right top,right bottom,color-stop(0%,#fff),color-stop(25%,#ffffff),color-stop(100%,#dbffdf))}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.spin{animation-name:spin;animation-duration:4s;animation-iteration-count:infinite;animation-timing-function:linear}\n"] }]
8317
- }], ctorParameters: () => [{ type: TruDataContext }, { type: TruComponentLookup }, { type: TruSearchResultViewManager }, { type: TruAppEnvironment }, { type: TruSearchViewEventHandler }, { type: TruUiNotification }, { type: TruConnectionHub }, { type: TruWindowEventHandler }, { type: TruDataGridClipboard }, { type: TruUtil }, { type: i0.ApplicationRef }, { type: i0.ChangeDetectorRef }, { type: TruTabGroupEventNotifier, decorators: [{
8386
+ }], ctorParameters: () => [{ type: TruDataContext }, { type: TruComponentLookup }, { type: TruSearchResultViewManager }, { type: TruAppEnvironment }, { type: TruSearchViewEventHandler }, { type: TruUiNotification }, { type: TruConnectionHub }, { type: TruWindowEventHandler }, { type: TruDataGridClipboard }, { type: TruUtil }, { type: i0.ApplicationRef }, { type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: TruDesktopViewEventNotifier }, { type: TruTabGroupEventNotifier, decorators: [{
8318
8387
  type: Optional
8319
8388
  }] }], propDecorators: { dataGridContainer: [{
8320
8389
  type: ViewChild,