@trudb/tru-common-lib 0.1.162 → 0.1.164
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/esm2022/lib/classes/tru-report.mjs +3 -0
- package/esm2022/lib/components/data-grid/tru-data-grid.mjs +7 -3
- package/esm2022/lib/components/desktop/services/tru-desktop-manager.mjs +4 -1
- package/esm2022/lib/services/tru-action-invoke.mjs +139 -0
- package/esm2022/lib/services/tru-entity-accessor.mjs +24 -1
- package/esm2022/lib/services/tru-global-data-context.mjs +24 -0
- package/esm2022/lib/services/tru-report-manager.mjs +125 -0
- package/esm2022/lib/services/tru-text-manager.mjs +23 -1
- package/esm2022/public-api.mjs +3 -1
- package/fesm2022/trudb-tru-common-lib.mjs +321 -3
- package/fesm2022/trudb-tru-common-lib.mjs.map +1 -1
- package/lib/classes/tru-report.d.ts +8 -0
- package/lib/components/data-grid/tru-data-grid.d.ts +4 -0
- package/lib/components/desktop/services/tru-desktop-manager.d.ts +1 -0
- package/lib/services/tru-action-invoke.d.ts +71 -0
- package/lib/services/tru-entity-accessor.d.ts +10 -1
- package/lib/services/tru-global-data-context.d.ts +10 -0
- package/lib/services/tru-report-manager.d.ts +20 -0
- package/lib/services/tru-text-manager.d.ts +7 -0
- package/package.json +1 -1
- package/public-api.d.ts +2 -0
|
@@ -1127,6 +1127,29 @@ class TruEntityAccessor {
|
|
|
1127
1127
|
this.saveDownloadedFile(response);
|
|
1128
1128
|
});
|
|
1129
1129
|
};
|
|
1130
|
+
downloadFromService = (serviceName, data) => {
|
|
1131
|
+
this.downloadFromUrl(this._baseUrl + '/' + serviceName, data);
|
|
1132
|
+
};
|
|
1133
|
+
/**
|
|
1134
|
+
* Request an action.
|
|
1135
|
+
* @param {string} actionName - Name of the action.
|
|
1136
|
+
* @param {string} entityRefs - Comma separated list of entity pkey values.
|
|
1137
|
+
* @returns {promise} on success, passes the results to success handler;
|
|
1138
|
+
* on failure, passes exception to fail handler.
|
|
1139
|
+
*/
|
|
1140
|
+
requestAction = (actionName, entityRefs) => {
|
|
1141
|
+
var query = this._breezeContext.createQuery('RequestAction' + actionName)
|
|
1142
|
+
.withParameters({
|
|
1143
|
+
$method: 'POST',
|
|
1144
|
+
$encoding: 'JSON',
|
|
1145
|
+
$data: { refs: entityRefs }
|
|
1146
|
+
});
|
|
1147
|
+
return defer(() => from(this._entityManager.executeQuery(query).then((queryData) => {
|
|
1148
|
+
;
|
|
1149
|
+
return queryData.results;
|
|
1150
|
+
})));
|
|
1151
|
+
``;
|
|
1152
|
+
};
|
|
1130
1153
|
saveDownloadedFile = (response) => {
|
|
1131
1154
|
var headers = response.headers;
|
|
1132
1155
|
var contentDisposition = headers('content-disposition');
|
|
@@ -1562,6 +1585,28 @@ class TruTextManager {
|
|
|
1562
1585
|
return 'Duplicate key error';
|
|
1563
1586
|
return typeName;
|
|
1564
1587
|
};
|
|
1588
|
+
/**
|
|
1589
|
+
* Serializes an object as URL parameters. The object should be a base type or have
|
|
1590
|
+
* properties that are each base types. Does not support a property with structure.
|
|
1591
|
+
* @param {Object} data
|
|
1592
|
+
* @returns {String}
|
|
1593
|
+
*/
|
|
1594
|
+
formatAsUrlParameters = (data) => {
|
|
1595
|
+
if (typeof data !== 'object')
|
|
1596
|
+
return (data == null ? '' : data.toString());
|
|
1597
|
+
var buffer = [];
|
|
1598
|
+
for (var name in data) {
|
|
1599
|
+
if (!data.hasOwnProperty(name)) {
|
|
1600
|
+
continue;
|
|
1601
|
+
}
|
|
1602
|
+
var value = data[name];
|
|
1603
|
+
buffer.push(encodeURIComponent(name) +
|
|
1604
|
+
'=' + encodeURIComponent(value == null ? '' : value));
|
|
1605
|
+
}
|
|
1606
|
+
var source = buffer.join('&')
|
|
1607
|
+
.replace(/%20/g, '+');
|
|
1608
|
+
return (source);
|
|
1609
|
+
};
|
|
1565
1610
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: TruTextManager, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1566
1611
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: TruTextManager, providedIn: 'root' });
|
|
1567
1612
|
}
|
|
@@ -1842,6 +1887,9 @@ class TruDesktopManager {
|
|
|
1842
1887
|
addWindow = (tableName, tablePluralName, tablePluralLabel, componentName, entities = [], openAsDetaiView = false, showNavigation = true, showIfExists) => {
|
|
1843
1888
|
this.windowEventHandler.open(this.getWindowEvent(tableName, tablePluralName, tablePluralLabel, componentName, entities, openAsDetaiView));
|
|
1844
1889
|
};
|
|
1890
|
+
addWindowForQueryResult = (tableName, tablePluralName, tablePluralLabel, componentName, entities = [], openAsDetaiView = false, showNavigation = true, showIfExists) => {
|
|
1891
|
+
this.windowEventHandler.open(this.getWindowEvent(tableName, tablePluralName, tablePluralLabel, componentName, entities, openAsDetaiView));
|
|
1892
|
+
};
|
|
1845
1893
|
windowTitlesByBaseText = {};
|
|
1846
1894
|
/**
|
|
1847
1895
|
* Returns a unique string for the base name of a window. At first, returns the input.
|
|
@@ -3918,6 +3966,8 @@ class TruDataGrid {
|
|
|
3918
3966
|
selectedViewChoice;
|
|
3919
3967
|
unassociatedChoices = [];
|
|
3920
3968
|
selectedUnassociatedChoice;
|
|
3969
|
+
reports = [];
|
|
3970
|
+
selectedReport = null;
|
|
3921
3971
|
gridType = TruDataGridTypes.Search;
|
|
3922
3972
|
unsavedEntities = [];
|
|
3923
3973
|
loadedEntities = [];
|
|
@@ -4311,6 +4361,8 @@ class TruDataGrid {
|
|
|
4311
4361
|
};
|
|
4312
4362
|
onUnassociatedChoiceChanged = (option) => {
|
|
4313
4363
|
};
|
|
4364
|
+
onSelectedReportChanged = (option) => {
|
|
4365
|
+
};
|
|
4314
4366
|
canAdd = () => {
|
|
4315
4367
|
if (!this.config.tableConfig.canAdd)
|
|
4316
4368
|
return false;
|
|
@@ -4372,11 +4424,11 @@ class TruDataGrid {
|
|
|
4372
4424
|
this.subs.forEach(s => s.unsubscribe());
|
|
4373
4425
|
}
|
|
4374
4426
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: TruDataGrid, deps: [{ token: TruDataContext }, { token: TruDesktopViewEventNotifier }, { token: TruSearchResultViewManager }, { token: TruAppEnvironment }, { token: TruSearchViewEventHandler }, { token: TruUiNotification }, { token: TruConnectionHub }, { token: i0.ApplicationRef }, { token: TruTabGroupEventNotifier, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
4375
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.5", type: TruDataGrid, selector: "tru-data-grid", inputs: { config: "config", entity: "entity", name: "name" }, host: { properties: { "class.tru-data-grid": "true" } }, 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 <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>\r\n </div>\r\n <div 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]=\"25\"\r\n [rowBuffer]=\"50\"\r\n [enterNavigatesVertically]=\"true\"\r\n [enterNavigatesVerticallyAfterEdit]=\"true\"\r\n [suppressRowHoverHighlight]=\"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 (cellMouseOver)=\"onCellMouseOver($event)\"\r\n (cellMouseOut)=\"onCellMouseOut($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\">{{getRowCount()}}</p>\r\n <p class=\"tru-data-grid-statusbar-values-text\">{{getSelectedRowCount()}}</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}.detail-container .tru-data-grid{position:relative}.detail-container .mat-mdc-tab-body-content{height:100%;overflow:hidden!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;height:calc(100% - 23px)}.ag-root.ag-layout-normal{height:calc(100% - 23px)!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 .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{padding-left:0!important}.ag-cell-inline-editing{height:24px!important}.ag-cell{border-right:solid #dde2eb 1px!important}.ag-has-focus .ag-cell-focus:not(.invalid){border-right:solid #2196f3 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:#006dcc;font-weight:700;background-color:#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-pinned-left-cols-container .ag-cell:hover{background-color:#2196f31a!important}.ag-popup-editor{background:#fff;padding:10px;border:solid 1px #006dcc}.ag-overlay-loading-center{border:none!important;box-shadow:none!important}.ag-cell.invalid .invalid-flag{box-sizing:border-box;position:absolute;left:0;top:0;width:8px;height:8px;border-bottom:solid 4px transparent;border-right:solid 4px transparent;border-left:solid 4px red;border-top:solid 4px 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: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { 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: "component", type: i10$1.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", "suppressFieldDotNotation", "headerHeight", "groupHeaderHeight", "floatingFiltersHeight", "pivotHeaderHeight", "pivotGroupHeaderHeight", "allowDragFromColumnsToolPanel", "suppressMovableColumns", "suppressColumnMoveAnimation", "suppressDragLeaveHidesColumns", "suppressRowGroupHidesColumns", "colResizeDefault", "suppressAutoSize", "autoSizePadding", "skipHeaderOnAutoSize", "autoSizeStrategy", "components", "editType", "singleClickEdit", "suppressClickEdit", "readOnlyEdit", "stopEditingWhenCellsLoseFocus", "enterMovesDown", "enterMovesDownAfterEdit", "enterNavigatesVertically", "enterNavigatesVerticallyAfterEdit", "enableCellEditingOnBackspace", "undoRedoCellEditing", "undoRedoCellEditingLimit", "defaultCsvExportParams", "suppressCsvExport", "defaultExcelExportParams", "suppressExcelExport", "excelStyles", "quickFilterText", "cacheQuickFilter", "excludeHiddenColumnsFromQuickFilter", "includeHiddenColumnsInQuickFilter", "quickFilterParser", "quickFilterMatcher", "excludeChildrenWhenTreeDataFiltering", "enableAdvancedFilter", "advancedFilterModel", "includeHiddenColumnsInAdvancedFilter", "advancedFilterParent", "advancedFilterBuilderParams", "enableCharts", "chartThemes", "customChartThemes", "chartThemeOverrides", "enableChartToolPanelsButton", "suppressChartToolPanelsButton", "chartToolPanelsDef", "chartMenuItems", "loadingCellRenderer", "loadingCellRendererParams", "loadingCellRendererSelector", "localeText", "masterDetail", "keepDetailRows", "keepDetailRowsCount", "detailCellRenderer", "detailCellRendererParams", "detailRowHeight", "detailRowAutoHeight", "context", "alignedGrids", "tabIndex", "rowBuffer", "valueCache", "valueCacheNeverExpires", "enableCellExpressions", "suppressParentsInRowNodes", "suppressTouch", "suppressFocusAfterRefresh", "suppressAsyncEvents", "suppressBrowserResizeObserver", "suppressPropertyNamesCheck", "suppressChangeDetection", "debug", "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", "suppressAggAtRootLevel", "aggregateOnlyChangedColumns", "suppressAggFilteredOnly", "removePivotHeaderRowWhenSingleValueColumn", "animateRows", "enableCellChangeFlash", "cellFlashDuration", "cellFlashDelay", "cellFadeDuration", "cellFadeDelay", "allowShowChangeAfterFilter", "domLayout", "ensureDomOrder", "enableRtl", "suppressColumnVirtualisation", "suppressMaxRenderedRowRestriction", "suppressRowVirtualisation", "rowDragManaged", "suppressRowDrag", "suppressMoveWhenRowDragging", "rowDragEntireRow", "rowDragMultiRow", "rowDragText", "fullWidthCellRenderer", "fullWidthCellRendererParams", "embedFullWidthRows", "suppressGroupMaintainValueType", "groupDisplayType", "groupDefaultExpanded", "autoGroupColumnDef", "groupMaintainOrder", "groupSelectsChildren", "groupLockGroupColumns", "groupAggFiltering", "groupIncludeFooter", "groupIncludeTotalFooter", "groupSuppressBlankHeader", "groupSelectsFiltered", "showOpenedGroup", "groupRemoveSingleChildren", "groupRemoveLowestSingleChildren", "groupHideOpenParents", "groupAllowUnbalanced", "rowGroupPanelShow", "groupRowRenderer", "groupRowRendererParams", "suppressMakeColumnVisibleAfterUnGroup", "treeData", "rowGroupPanelSuppressSort", "suppressGroupRowsSticky", "pinnedTopRowData", "pinnedBottomRowData", "rowModelType", "rowData", "asyncTransactionWaitMillis", "suppressModelUpdateAfterUpdateTransaction", "datasource", "cacheOverflowSize", "infiniteInitialRowCount", "serverSideInitialRowCount", "suppressServerSideInfiniteScroll", "cacheBlockSize", "maxBlocksInCache", "maxConcurrentDatasourceRequests", "blockLoadDebounceMillis", "purgeClosedRowNodes", "serverSideDatasource", "serverSideSortAllLevels", "serverSideEnableClientSideSort", "serverSideOnlyRefreshFilteredGroups", "serverSideFilterAllLevels", "serverSideSortOnServer", "serverSideFilterOnServer", "serverSidePivotResultFieldSeparator", "viewportDatasource", "viewportRowModelPageSize", "viewportRowModelBufferSize", "alwaysShowHorizontalScroll", "alwaysShowVerticalScroll", "debounceVerticalScrollbar", "suppressHorizontalScroll", "suppressScrollOnNewData", "suppressScrollWhenPopupsAreOpen", "suppressAnimationFrame", "suppressMiddleClickScrolls", "suppressPreventDefaultOnMouseWheel", "scrollbarWidth", "rowSelection", "rowMultiSelectWithClick", "suppressRowDeselection", "suppressRowClickSelection", "suppressCellFocus", "suppressHeaderFocus", "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", "functionsPassive", "enableGroupEdit", "initialState", "getContextMenuItems", "getMainMenuItems", "postProcessPopup", "processUnpinnedColumns", "processCellForClipboard", "processHeaderForClipboard", "processGroupHeaderForClipboard", "processCellFromClipboard", "sendToClipboard", "processDataFromClipboard", "isExternalFilterPresent", "doesExternalFilterPass", "getChartToolbarItems", "createChartContainer", "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", "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", "rangeDeleteStart", "rangeDeleteEnd", "filterOpened", "filterChanged", "filterModified", "advancedFilterBuilderVisibleChanged", "chartCreated", "chartRangeSelectionChanged", "chartOptionsChanged", "chartDestroyed", "cellKeyDown", "gridReady", "gridPreDestroyed", "firstDataRendered", "gridSizeChanged", "modelUpdated", "virtualRowRemoved", "viewportChanged", "bodyScroll", "bodyScrollEnd", "dragStarted", "dragStopped", "stateUpdated", "paginationChanged", "rowDragEnter", "rowDragMove", "rowDragLeave", "rowDragEnd", "columnRowGroupChanged", "rowGroupOpened", "expandOrCollapseAll", "pivotMaxColumnsExceeded", "pinnedRowDataChanged", "rowDataUpdated", "asyncTransactionsFlushed", "storeRefreshed", "cellClicked", "cellDoubleClicked", "cellFocused", "cellMouseOver", "cellMouseOut", "cellMouseDown", "rowClicked", "rowDoubleClicked", "rowSelected", "selectionChanged", "cellContextMenu", "rangeSelectionChanged", "tooltipShow", "tooltipHide", "sortChanged", "columnRowGroupChangeRequest", "columnPivotChangeRequest", "columnValueChangeRequest", "columnAggFuncChangeRequest"] }, { 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", "selectedOption", "disabled"], outputs: ["selectedOptionChange", "selectionChange"] }, { kind: "component", type: TruToolbarSeparator, selector: "tru-toolbar-separator" }], encapsulation: i0.ViewEncapsulation.None });
|
|
4427
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.5", type: TruDataGrid, selector: "tru-data-grid", inputs: { config: "config", entity: "entity", name: "name" }, host: { properties: { "class.tru-data-grid": "true" } }, 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 <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-dropdown [options]=\"reports\"\r\n [(selectedOption)]=\"selectedReport\"\r\n (selectionChange)=\"onSelectedReportChanged($event)\"\r\n *ngIf=\"reports.length\">\r\n </tru-toolbar-dropdown>-->\r\n </tru-toolbar>\r\n </div>\r\n <div 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]=\"25\"\r\n [rowBuffer]=\"50\"\r\n [enterNavigatesVertically]=\"true\"\r\n [enterNavigatesVerticallyAfterEdit]=\"true\"\r\n [suppressRowHoverHighlight]=\"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 (cellMouseOver)=\"onCellMouseOver($event)\"\r\n (cellMouseOut)=\"onCellMouseOut($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\">{{getRowCount()}}</p>\r\n <p class=\"tru-data-grid-statusbar-values-text\">{{getSelectedRowCount()}}</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}.detail-container .tru-data-grid{position:relative}.detail-container .mat-mdc-tab-body-content{height:100%;overflow:hidden!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;height:calc(100% - 23px)}.ag-root.ag-layout-normal{height:calc(100% - 23px)!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 .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{padding-left:0!important}.ag-cell-inline-editing{height:24px!important}.ag-cell{border-right:solid #dde2eb 1px!important}.ag-has-focus .ag-cell-focus:not(.invalid){border-right:solid #2196f3 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:#006dcc;font-weight:700;background-color:#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-pinned-left-cols-container .ag-cell:hover{background-color:#2196f31a!important}.ag-popup-editor{background:#fff;padding:10px;border:solid 1px #006dcc}.ag-overlay-loading-center{border:none!important;box-shadow:none!important}.ag-cell.invalid .invalid-flag{box-sizing:border-box;position:absolute;left:0;top:0;width:8px;height:8px;border-bottom:solid 4px transparent;border-right:solid 4px transparent;border-left:solid 4px red;border-top:solid 4px 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: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { 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: "component", type: i10$1.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", "suppressFieldDotNotation", "headerHeight", "groupHeaderHeight", "floatingFiltersHeight", "pivotHeaderHeight", "pivotGroupHeaderHeight", "allowDragFromColumnsToolPanel", "suppressMovableColumns", "suppressColumnMoveAnimation", "suppressDragLeaveHidesColumns", "suppressRowGroupHidesColumns", "colResizeDefault", "suppressAutoSize", "autoSizePadding", "skipHeaderOnAutoSize", "autoSizeStrategy", "components", "editType", "singleClickEdit", "suppressClickEdit", "readOnlyEdit", "stopEditingWhenCellsLoseFocus", "enterMovesDown", "enterMovesDownAfterEdit", "enterNavigatesVertically", "enterNavigatesVerticallyAfterEdit", "enableCellEditingOnBackspace", "undoRedoCellEditing", "undoRedoCellEditingLimit", "defaultCsvExportParams", "suppressCsvExport", "defaultExcelExportParams", "suppressExcelExport", "excelStyles", "quickFilterText", "cacheQuickFilter", "excludeHiddenColumnsFromQuickFilter", "includeHiddenColumnsInQuickFilter", "quickFilterParser", "quickFilterMatcher", "excludeChildrenWhenTreeDataFiltering", "enableAdvancedFilter", "advancedFilterModel", "includeHiddenColumnsInAdvancedFilter", "advancedFilterParent", "advancedFilterBuilderParams", "enableCharts", "chartThemes", "customChartThemes", "chartThemeOverrides", "enableChartToolPanelsButton", "suppressChartToolPanelsButton", "chartToolPanelsDef", "chartMenuItems", "loadingCellRenderer", "loadingCellRendererParams", "loadingCellRendererSelector", "localeText", "masterDetail", "keepDetailRows", "keepDetailRowsCount", "detailCellRenderer", "detailCellRendererParams", "detailRowHeight", "detailRowAutoHeight", "context", "alignedGrids", "tabIndex", "rowBuffer", "valueCache", "valueCacheNeverExpires", "enableCellExpressions", "suppressParentsInRowNodes", "suppressTouch", "suppressFocusAfterRefresh", "suppressAsyncEvents", "suppressBrowserResizeObserver", "suppressPropertyNamesCheck", "suppressChangeDetection", "debug", "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", "suppressAggAtRootLevel", "aggregateOnlyChangedColumns", "suppressAggFilteredOnly", "removePivotHeaderRowWhenSingleValueColumn", "animateRows", "enableCellChangeFlash", "cellFlashDuration", "cellFlashDelay", "cellFadeDuration", "cellFadeDelay", "allowShowChangeAfterFilter", "domLayout", "ensureDomOrder", "enableRtl", "suppressColumnVirtualisation", "suppressMaxRenderedRowRestriction", "suppressRowVirtualisation", "rowDragManaged", "suppressRowDrag", "suppressMoveWhenRowDragging", "rowDragEntireRow", "rowDragMultiRow", "rowDragText", "fullWidthCellRenderer", "fullWidthCellRendererParams", "embedFullWidthRows", "suppressGroupMaintainValueType", "groupDisplayType", "groupDefaultExpanded", "autoGroupColumnDef", "groupMaintainOrder", "groupSelectsChildren", "groupLockGroupColumns", "groupAggFiltering", "groupIncludeFooter", "groupIncludeTotalFooter", "groupSuppressBlankHeader", "groupSelectsFiltered", "showOpenedGroup", "groupRemoveSingleChildren", "groupRemoveLowestSingleChildren", "groupHideOpenParents", "groupAllowUnbalanced", "rowGroupPanelShow", "groupRowRenderer", "groupRowRendererParams", "suppressMakeColumnVisibleAfterUnGroup", "treeData", "rowGroupPanelSuppressSort", "suppressGroupRowsSticky", "pinnedTopRowData", "pinnedBottomRowData", "rowModelType", "rowData", "asyncTransactionWaitMillis", "suppressModelUpdateAfterUpdateTransaction", "datasource", "cacheOverflowSize", "infiniteInitialRowCount", "serverSideInitialRowCount", "suppressServerSideInfiniteScroll", "cacheBlockSize", "maxBlocksInCache", "maxConcurrentDatasourceRequests", "blockLoadDebounceMillis", "purgeClosedRowNodes", "serverSideDatasource", "serverSideSortAllLevels", "serverSideEnableClientSideSort", "serverSideOnlyRefreshFilteredGroups", "serverSideFilterAllLevels", "serverSideSortOnServer", "serverSideFilterOnServer", "serverSidePivotResultFieldSeparator", "viewportDatasource", "viewportRowModelPageSize", "viewportRowModelBufferSize", "alwaysShowHorizontalScroll", "alwaysShowVerticalScroll", "debounceVerticalScrollbar", "suppressHorizontalScroll", "suppressScrollOnNewData", "suppressScrollWhenPopupsAreOpen", "suppressAnimationFrame", "suppressMiddleClickScrolls", "suppressPreventDefaultOnMouseWheel", "scrollbarWidth", "rowSelection", "rowMultiSelectWithClick", "suppressRowDeselection", "suppressRowClickSelection", "suppressCellFocus", "suppressHeaderFocus", "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", "functionsPassive", "enableGroupEdit", "initialState", "getContextMenuItems", "getMainMenuItems", "postProcessPopup", "processUnpinnedColumns", "processCellForClipboard", "processHeaderForClipboard", "processGroupHeaderForClipboard", "processCellFromClipboard", "sendToClipboard", "processDataFromClipboard", "isExternalFilterPresent", "doesExternalFilterPass", "getChartToolbarItems", "createChartContainer", "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", "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", "rangeDeleteStart", "rangeDeleteEnd", "filterOpened", "filterChanged", "filterModified", "advancedFilterBuilderVisibleChanged", "chartCreated", "chartRangeSelectionChanged", "chartOptionsChanged", "chartDestroyed", "cellKeyDown", "gridReady", "gridPreDestroyed", "firstDataRendered", "gridSizeChanged", "modelUpdated", "virtualRowRemoved", "viewportChanged", "bodyScroll", "bodyScrollEnd", "dragStarted", "dragStopped", "stateUpdated", "paginationChanged", "rowDragEnter", "rowDragMove", "rowDragLeave", "rowDragEnd", "columnRowGroupChanged", "rowGroupOpened", "expandOrCollapseAll", "pivotMaxColumnsExceeded", "pinnedRowDataChanged", "rowDataUpdated", "asyncTransactionsFlushed", "storeRefreshed", "cellClicked", "cellDoubleClicked", "cellFocused", "cellMouseOver", "cellMouseOut", "cellMouseDown", "rowClicked", "rowDoubleClicked", "rowSelected", "selectionChanged", "cellContextMenu", "rangeSelectionChanged", "tooltipShow", "tooltipHide", "sortChanged", "columnRowGroupChangeRequest", "columnPivotChangeRequest", "columnValueChangeRequest", "columnAggFuncChangeRequest"] }, { 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", "selectedOption", "disabled"], outputs: ["selectedOptionChange", "selectionChange"] }, { kind: "component", type: TruToolbarSeparator, selector: "tru-toolbar-separator" }], encapsulation: i0.ViewEncapsulation.None });
|
|
4376
4428
|
}
|
|
4377
4429
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: TruDataGrid, decorators: [{
|
|
4378
4430
|
type: Component,
|
|
4379
|
-
args: [{ selector: 'tru-data-grid', encapsulation: ViewEncapsulation.None, host: { '[class.tru-data-grid]': 'true' }, 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 <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>\r\n </div>\r\n <div 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]=\"25\"\r\n [rowBuffer]=\"50\"\r\n [enterNavigatesVertically]=\"true\"\r\n [enterNavigatesVerticallyAfterEdit]=\"true\"\r\n [suppressRowHoverHighlight]=\"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 (cellMouseOver)=\"onCellMouseOver($event)\"\r\n (cellMouseOut)=\"onCellMouseOut($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\">{{getRowCount()}}</p>\r\n <p class=\"tru-data-grid-statusbar-values-text\">{{getSelectedRowCount()}}</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}.detail-container .tru-data-grid{position:relative}.detail-container .mat-mdc-tab-body-content{height:100%;overflow:hidden!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;height:calc(100% - 23px)}.ag-root.ag-layout-normal{height:calc(100% - 23px)!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 .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{padding-left:0!important}.ag-cell-inline-editing{height:24px!important}.ag-cell{border-right:solid #dde2eb 1px!important}.ag-has-focus .ag-cell-focus:not(.invalid){border-right:solid #2196f3 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:#006dcc;font-weight:700;background-color:#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-pinned-left-cols-container .ag-cell:hover{background-color:#2196f31a!important}.ag-popup-editor{background:#fff;padding:10px;border:solid 1px #006dcc}.ag-overlay-loading-center{border:none!important;box-shadow:none!important}.ag-cell.invalid .invalid-flag{box-sizing:border-box;position:absolute;left:0;top:0;width:8px;height:8px;border-bottom:solid 4px transparent;border-right:solid 4px transparent;border-left:solid 4px red;border-top:solid 4px 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"] }]
|
|
4431
|
+
args: [{ selector: 'tru-data-grid', encapsulation: ViewEncapsulation.None, host: { '[class.tru-data-grid]': 'true' }, 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 <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-dropdown [options]=\"reports\"\r\n [(selectedOption)]=\"selectedReport\"\r\n (selectionChange)=\"onSelectedReportChanged($event)\"\r\n *ngIf=\"reports.length\">\r\n </tru-toolbar-dropdown>-->\r\n </tru-toolbar>\r\n </div>\r\n <div 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]=\"25\"\r\n [rowBuffer]=\"50\"\r\n [enterNavigatesVertically]=\"true\"\r\n [enterNavigatesVerticallyAfterEdit]=\"true\"\r\n [suppressRowHoverHighlight]=\"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 (cellMouseOver)=\"onCellMouseOver($event)\"\r\n (cellMouseOut)=\"onCellMouseOut($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\">{{getRowCount()}}</p>\r\n <p class=\"tru-data-grid-statusbar-values-text\">{{getSelectedRowCount()}}</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}.detail-container .tru-data-grid{position:relative}.detail-container .mat-mdc-tab-body-content{height:100%;overflow:hidden!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;height:calc(100% - 23px)}.ag-root.ag-layout-normal{height:calc(100% - 23px)!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 .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{padding-left:0!important}.ag-cell-inline-editing{height:24px!important}.ag-cell{border-right:solid #dde2eb 1px!important}.ag-has-focus .ag-cell-focus:not(.invalid){border-right:solid #2196f3 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:#006dcc;font-weight:700;background-color:#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-pinned-left-cols-container .ag-cell:hover{background-color:#2196f31a!important}.ag-popup-editor{background:#fff;padding:10px;border:solid 1px #006dcc}.ag-overlay-loading-center{border:none!important;box-shadow:none!important}.ag-cell.invalid .invalid-flag{box-sizing:border-box;position:absolute;left:0;top:0;width:8px;height:8px;border-bottom:solid 4px transparent;border-right:solid 4px transparent;border-left:solid 4px red;border-top:solid 4px 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"] }]
|
|
4380
4432
|
}], ctorParameters: () => [{ type: TruDataContext }, { type: TruDesktopViewEventNotifier }, { type: TruSearchResultViewManager }, { type: TruAppEnvironment }, { type: TruSearchViewEventHandler }, { type: TruUiNotification }, { type: TruConnectionHub }, { type: i0.ApplicationRef }, { type: TruTabGroupEventNotifier, decorators: [{
|
|
4381
4433
|
type: Optional
|
|
4382
4434
|
}] }], propDecorators: { config: [{
|
|
@@ -7643,6 +7695,155 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImpor
|
|
|
7643
7695
|
}]
|
|
7644
7696
|
}] });
|
|
7645
7697
|
|
|
7698
|
+
class TruGlobalDataContext {
|
|
7699
|
+
_dataContext = null;
|
|
7700
|
+
constructor() { }
|
|
7701
|
+
get dataContext() {
|
|
7702
|
+
return this._dataContext;
|
|
7703
|
+
}
|
|
7704
|
+
set dataContext(dataContext) {
|
|
7705
|
+
if (this._dataContext !== null)
|
|
7706
|
+
this._dataContext = dataContext;
|
|
7707
|
+
else
|
|
7708
|
+
console.log('Global Data Context is alreay set and can not be modified.');
|
|
7709
|
+
}
|
|
7710
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: TruGlobalDataContext, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
7711
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: TruGlobalDataContext, providedIn: 'root' });
|
|
7712
|
+
}
|
|
7713
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: TruGlobalDataContext, decorators: [{
|
|
7714
|
+
type: Injectable,
|
|
7715
|
+
args: [{
|
|
7716
|
+
providedIn: 'root',
|
|
7717
|
+
}]
|
|
7718
|
+
}], ctorParameters: () => [] });
|
|
7719
|
+
|
|
7720
|
+
class TruActionInvoke {
|
|
7721
|
+
dataContext;
|
|
7722
|
+
textManager;
|
|
7723
|
+
desktopManager;
|
|
7724
|
+
windowEventHandler;
|
|
7725
|
+
uiNotification;
|
|
7726
|
+
modelTypeLookup;
|
|
7727
|
+
globalDataContext;
|
|
7728
|
+
user;
|
|
7729
|
+
constructor(dataContext, textManager, desktopManager, windowEventHandler, uiNotification, modelTypeLookup, globalDataContext, user) {
|
|
7730
|
+
this.dataContext = dataContext;
|
|
7731
|
+
this.textManager = textManager;
|
|
7732
|
+
this.desktopManager = desktopManager;
|
|
7733
|
+
this.windowEventHandler = windowEventHandler;
|
|
7734
|
+
this.uiNotification = uiNotification;
|
|
7735
|
+
this.modelTypeLookup = modelTypeLookup;
|
|
7736
|
+
this.globalDataContext = globalDataContext;
|
|
7737
|
+
this.user = user;
|
|
7738
|
+
}
|
|
7739
|
+
/**
|
|
7740
|
+
* Creates an array of menu item config objects.
|
|
7741
|
+
* @param {object[]} menuItemConfigs - Menu item config configs(!)
|
|
7742
|
+
* @returns {object[]} - Configs.
|
|
7743
|
+
*/
|
|
7744
|
+
createMenuConfigs = (menuItemConfigs) => {
|
|
7745
|
+
var executableConfigs = ___default.filter(menuItemConfigs, function (c) {
|
|
7746
|
+
var hasAccess = typeof c.item.hasAccess != 'function' ? true : c.item.hasAccess();
|
|
7747
|
+
return c.canExecute && hasAccess;
|
|
7748
|
+
});
|
|
7749
|
+
return ___default.pluck(executableConfigs, 'item');
|
|
7750
|
+
};
|
|
7751
|
+
/**
|
|
7752
|
+
* Post to a URL that results in a file download.
|
|
7753
|
+
* @param {string} url
|
|
7754
|
+
* @param {string} entityRefs - Comma separated list of record refs.
|
|
7755
|
+
*/
|
|
7756
|
+
executeHttpPostActionForDownload = (url, entityRefs) => {
|
|
7757
|
+
var data = this.textManager.formatAsUrlParameters({ refs: entityRefs });
|
|
7758
|
+
this.dataContext.entityAccess().downloadFromUrl(url, data);
|
|
7759
|
+
};
|
|
7760
|
+
/**
|
|
7761
|
+
* Execute an action that downloads a file.
|
|
7762
|
+
* @param {string} actionName
|
|
7763
|
+
* @param {string} entityRefs - Comma separated list of record refs.
|
|
7764
|
+
*/
|
|
7765
|
+
executeActionForDownload = (actionName, entityRefs) => {
|
|
7766
|
+
var data = this.textManager.formatAsUrlParameters({ refs: entityRefs });
|
|
7767
|
+
this.dataContext.entityAccess().downloadFromService('RequestAction' + actionName, data);
|
|
7768
|
+
};
|
|
7769
|
+
/**
|
|
7770
|
+
* Execute an action and show the resulting message.
|
|
7771
|
+
* @param {string} actionName - Name of an action.
|
|
7772
|
+
* @param {string} entityRefs - Comma separated list of record refs.
|
|
7773
|
+
*/
|
|
7774
|
+
executeActionForMessage = (actionName, entityRefs) => {
|
|
7775
|
+
this.dataContext.entityAccess().requestAction(actionName, entityRefs).subscribe({
|
|
7776
|
+
next: (results) => {
|
|
7777
|
+
this.uiNotification.info(results[0].Message);
|
|
7778
|
+
}, error: error => {
|
|
7779
|
+
this.uiNotification.error(error.message);
|
|
7780
|
+
}
|
|
7781
|
+
});
|
|
7782
|
+
};
|
|
7783
|
+
/**
|
|
7784
|
+
* Queue the execution of an action.
|
|
7785
|
+
* @param {string} actionName - Name of an action.
|
|
7786
|
+
* @param {string} entityRefs - Comma separated list of record refs.
|
|
7787
|
+
* @param {string} actionLabel - Display name of the action.
|
|
7788
|
+
*/
|
|
7789
|
+
queueAction = (actionName, entityRefs, actionLabel) => {
|
|
7790
|
+
this.dataContext.entityAccess().requestAction(actionName, entityRefs).subscribe({
|
|
7791
|
+
next: (results) => {
|
|
7792
|
+
this.uiNotification.info(actionLabel + ' queued');
|
|
7793
|
+
}, error: error => {
|
|
7794
|
+
this.uiNotification.error(error.message);
|
|
7795
|
+
}
|
|
7796
|
+
});
|
|
7797
|
+
};
|
|
7798
|
+
/**
|
|
7799
|
+
* Open a new window with a query function to an action that accepts a list of
|
|
7800
|
+
* record refs.
|
|
7801
|
+
* @param {string} actionName - Name of an action.
|
|
7802
|
+
* @param {string} entityRefs - Comma separated list of record refs.
|
|
7803
|
+
* @param {string} componentName - Name of the directive for the window view.
|
|
7804
|
+
* @param {object} data - Passed to view.
|
|
7805
|
+
*/
|
|
7806
|
+
openWindowForQueryResultFromAction = (actionName, entityRefs, componentName, data) => {
|
|
7807
|
+
let itemsQuery = (dataContext) => {
|
|
7808
|
+
this.dataContext.entityAccess().requestAction(actionName, entityRefs).subscribe({
|
|
7809
|
+
next: (results) => {
|
|
7810
|
+
return results;
|
|
7811
|
+
}, error: error => {
|
|
7812
|
+
this.uiNotification.error(error.message);
|
|
7813
|
+
}
|
|
7814
|
+
});
|
|
7815
|
+
};
|
|
7816
|
+
//this.desktopManager.addWindowForQueryResult(componentName, itemsQuery, data);
|
|
7817
|
+
};
|
|
7818
|
+
/**
|
|
7819
|
+
* Open a new view with a URL and a list of record refs.
|
|
7820
|
+
* @param {string} url
|
|
7821
|
+
* @param {string} entityRefs - Comma separated list of record refs.
|
|
7822
|
+
* @param {string} actionLabel - Action label.
|
|
7823
|
+
* @param {string} windowCtrl - window manager.
|
|
7824
|
+
*/
|
|
7825
|
+
openViewForReportFromUrl = (url, entityRefs, actionLabel, windowCtrl) => {
|
|
7826
|
+
let windowAddViewEventArgs = new TruDesktopViewConfig();
|
|
7827
|
+
windowAddViewEventArgs.componentName = 'TruReportViewer';
|
|
7828
|
+
this.windowEventHandler.addView(windowAddViewEventArgs);
|
|
7829
|
+
};
|
|
7830
|
+
processCustomReport = (reportRef, entityRefs, mimeRef) => {
|
|
7831
|
+
this.dataContext.entityAccess().downloadFromService('ProcessReportTemplate', {
|
|
7832
|
+
reportRef: reportRef,
|
|
7833
|
+
refs: entityRefs,
|
|
7834
|
+
mimeRef
|
|
7835
|
+
});
|
|
7836
|
+
};
|
|
7837
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: TruActionInvoke, deps: [{ token: TruDataContext }, { token: TruTextManager }, { token: TruDesktopManager }, { token: TruWindowEventHandler }, { token: TruUiNotification }, { token: TruModelTypeLookup }, { token: TruGlobalDataContext }, { token: TruUser }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
7838
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: TruActionInvoke, providedIn: 'root' });
|
|
7839
|
+
}
|
|
7840
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: TruActionInvoke, decorators: [{
|
|
7841
|
+
type: Injectable,
|
|
7842
|
+
args: [{
|
|
7843
|
+
providedIn: 'root',
|
|
7844
|
+
}]
|
|
7845
|
+
}], ctorParameters: () => [{ type: TruDataContext }, { type: TruTextManager }, { type: TruDesktopManager }, { type: TruWindowEventHandler }, { type: TruUiNotification }, { type: TruModelTypeLookup }, { type: TruGlobalDataContext }, { type: TruUser }] });
|
|
7846
|
+
|
|
7646
7847
|
class TruCloudFileManager {
|
|
7647
7848
|
appEnvironment;
|
|
7648
7849
|
util;
|
|
@@ -7803,6 +8004,123 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImpor
|
|
|
7803
8004
|
type: Injectable
|
|
7804
8005
|
}], ctorParameters: () => [] });
|
|
7805
8006
|
|
|
8007
|
+
class TruReportManager {
|
|
8008
|
+
dataContext;
|
|
8009
|
+
actionInvoke;
|
|
8010
|
+
modelTypeLookup;
|
|
8011
|
+
globalDataContext;
|
|
8012
|
+
user;
|
|
8013
|
+
constructor(dataContext, actionInvoke, modelTypeLookup, globalDataContext, user) {
|
|
8014
|
+
this.dataContext = dataContext;
|
|
8015
|
+
this.actionInvoke = actionInvoke;
|
|
8016
|
+
this.modelTypeLookup = modelTypeLookup;
|
|
8017
|
+
this.globalDataContext = globalDataContext;
|
|
8018
|
+
this.user = user;
|
|
8019
|
+
}
|
|
8020
|
+
setupMenuImpl(report, menu, getActionRefs, enabled) {
|
|
8021
|
+
var reportRef = report.Ref;
|
|
8022
|
+
var mimeRef = report.ReportMimeTypeStdMimeTypeRef;
|
|
8023
|
+
menu[0].choices.push({
|
|
8024
|
+
hasAccess: function () {
|
|
8025
|
+
return true;
|
|
8026
|
+
},
|
|
8027
|
+
label: report.ReportName,
|
|
8028
|
+
enabled: function () {
|
|
8029
|
+
return enabled();
|
|
8030
|
+
},
|
|
8031
|
+
reportRef: reportRef,
|
|
8032
|
+
mimeRef: mimeRef,
|
|
8033
|
+
fire: function () {
|
|
8034
|
+
this.actionInvoke.processCustomReport(this.reportRef, getActionRefs(), this.mimeRef);
|
|
8035
|
+
}
|
|
8036
|
+
});
|
|
8037
|
+
}
|
|
8038
|
+
get(url, method, callback, params = null) {
|
|
8039
|
+
let obj = new XMLHttpRequest();
|
|
8040
|
+
try {
|
|
8041
|
+
obj = new XMLHttpRequest();
|
|
8042
|
+
}
|
|
8043
|
+
catch (e) {
|
|
8044
|
+
alert("Your browser does not support Ajax.");
|
|
8045
|
+
}
|
|
8046
|
+
obj.onreadystatechange = function () {
|
|
8047
|
+
if (obj.readyState == 4) {
|
|
8048
|
+
callback(obj);
|
|
8049
|
+
}
|
|
8050
|
+
};
|
|
8051
|
+
obj.open(method, url, true);
|
|
8052
|
+
obj.send(params);
|
|
8053
|
+
return obj;
|
|
8054
|
+
}
|
|
8055
|
+
setupMenu(report, menu, getActionRefs, enabled) {
|
|
8056
|
+
this.dataContext.entityAccess().search(this.modelTypeLookup.getType('TruDbCloudFile'), (query) => {
|
|
8057
|
+
var predicate = new breeze.Predicate('TruDbCloudFileRef', breeze.FilterQueryOp.Equals, report.ReportTruDbCloudFileRef);
|
|
8058
|
+
return query.where(predicate);
|
|
8059
|
+
}, null, false).subscribe((cloudFiles) => {
|
|
8060
|
+
if (cloudFiles.length) {
|
|
8061
|
+
//there is a cloud file associated with this report
|
|
8062
|
+
if (cloudFiles[0].Filename.endsWith(".mrt")) {
|
|
8063
|
+
//this is a stimulsoft report, check if license file exists
|
|
8064
|
+
this.dataContext.entityAccess().search(this.modelTypeLookup.getType('TruDbConfig'), (query) => {
|
|
8065
|
+
var predicate = new breeze.Predicate('Key', breeze.FilterQueryOp.Equals, 'StimulsoftLicensePath');
|
|
8066
|
+
return query.where(predicate);
|
|
8067
|
+
}, null, false).subscribe((config) => {
|
|
8068
|
+
if (!config.length || !config[0].Value) {
|
|
8069
|
+
//do nothing, no menu option will be pushed into the dom since
|
|
8070
|
+
//we couldn't find the required license path info in the config
|
|
8071
|
+
}
|
|
8072
|
+
else {
|
|
8073
|
+
var path = config[0].Value.replace("~", "");
|
|
8074
|
+
this.get(path, 'get', (data) => {
|
|
8075
|
+
if (data.length) {
|
|
8076
|
+
this.setupMenuImpl(report, menu, getActionRefs, enabled);
|
|
8077
|
+
}
|
|
8078
|
+
});
|
|
8079
|
+
}
|
|
8080
|
+
});
|
|
8081
|
+
}
|
|
8082
|
+
else {
|
|
8083
|
+
//there is a cloud file associated with this report, but it isn't an mrt report push menu option
|
|
8084
|
+
//since this a different type of report (word, excel)
|
|
8085
|
+
this.setupMenuImpl(report, menu, getActionRefs, enabled);
|
|
8086
|
+
}
|
|
8087
|
+
}
|
|
8088
|
+
else {
|
|
8089
|
+
//no cloud file, so no need to check for license, push menu option
|
|
8090
|
+
//since this could be a non mrt report (word, excel)
|
|
8091
|
+
this.setupMenuImpl(report, menu, getActionRefs, enabled);
|
|
8092
|
+
}
|
|
8093
|
+
});
|
|
8094
|
+
}
|
|
8095
|
+
queryReports = (tableName, menu, getActionRefs, enabled) => {
|
|
8096
|
+
this.globalDataContext.dataContext?.entityAccess().searchCacheOnly(this.modelTypeLookup.getType('TruDbReport'), (query) => {
|
|
8097
|
+
var predicate = new breeze.Predicate('OwnerTruDbUserRef', breeze.FilterQueryOp.Equals, this.user.activeUserRef)
|
|
8098
|
+
.or('OwnerTruDbUserRef', breeze.FilterQueryOp.Equals, null)
|
|
8099
|
+
.or('Public', breeze.FilterQueryOp.Equals, true)
|
|
8100
|
+
.and('TableName', breeze.FilterQueryOp.Equals, tableName)
|
|
8101
|
+
.and('', breeze.FilterQueryOp.NotEquals, null);
|
|
8102
|
+
return query.where(predicate);
|
|
8103
|
+
}).subscribe((reports) => {
|
|
8104
|
+
if (reports.length) {
|
|
8105
|
+
for (var i = 0; i < reports.length; i++) {
|
|
8106
|
+
this.setupMenu(reports[i], menu, getActionRefs, enabled);
|
|
8107
|
+
}
|
|
8108
|
+
}
|
|
8109
|
+
else {
|
|
8110
|
+
return menu;
|
|
8111
|
+
}
|
|
8112
|
+
});
|
|
8113
|
+
};
|
|
8114
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: TruReportManager, deps: [{ token: TruDataContext }, { token: TruActionInvoke }, { token: TruModelTypeLookup }, { token: TruGlobalDataContext }, { token: TruUser }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
8115
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: TruReportManager, providedIn: 'root' });
|
|
8116
|
+
}
|
|
8117
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: TruReportManager, decorators: [{
|
|
8118
|
+
type: Injectable,
|
|
8119
|
+
args: [{
|
|
8120
|
+
providedIn: 'root',
|
|
8121
|
+
}]
|
|
8122
|
+
}], ctorParameters: () => [{ type: TruDataContext }, { type: TruActionInvoke }, { type: TruModelTypeLookup }, { type: TruGlobalDataContext }, { type: TruUser }] });
|
|
8123
|
+
|
|
7806
8124
|
class TruSort {
|
|
7807
8125
|
constructor() { }
|
|
7808
8126
|
/**
|
|
@@ -8059,5 +8377,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImpor
|
|
|
8059
8377
|
* Generated bundle index. Do not edit.
|
|
8060
8378
|
*/
|
|
8061
8379
|
|
|
8062
|
-
export { DetailViewModule, TruAppEnvironment, TruAuth, TruAuthInterceptor, TruBreezeContext, TruBreezeContextFactory, TruBreezeMetadataProvider, TruBreezeValidator, TruBreezeValidatorModule, TruChoice, TruCloudFileManager, TruColumn, TruColumnModule, TruCommonModule, TruComponentConfigBase, TruComponentLookup, TruConfirmDialog, TruConfirmDialogConfig, TruConfirmDialogModule, TruConnectionHub, TruContextFilter, TruContextFilterChoice, TruContextFilters, TruControlComponentConfigBase, TruDataChange, TruDataContext, TruDataGrid, TruDataGridCellRenderer, TruDataGridHeader, TruDataGridModule, TruDataGridPkeyCellRenderer, TruDataGridRefHeader, TruDataGridTypes, TruDataGridUtil, TruDesktop, TruDesktopManager, TruDesktopModule, TruDesktopViewConfig, TruDetailViewBase, TruEditControlBase, TruEditControlConfigBase, TruEditParentControlConfigBase, TruEditPkeyControlConfigBase, TruEntityAccessor, TruEntityBase, TruExportDialog, TruExportDialogConfig, TruExportDialogModule, TruForm, TruFormModule, TruFormulaEval, TruGroupBox, TruGroupBoxModule, TruIconModule, TruListControlConfigBase, TruLogin, TruLoginModule, TruMatSelectPanel, TruMatSelectPanelModule, TruModelPropertyLookup, TruModelTypeLookup, TruNameValue, TruPasswordDialog, TruPasswordDialogModule, TruPredicate, TruPredicateMap, TruPropertyConfigBase, TruPropertyConfigCloudFile, TruPropertyConfigDate, TruPropertyConfigDecimal, TruPropertyConfigFile, TruPropertyConfigForeignKey, TruPropertyConfigInteger, TruPropertyConfigPassword, TruPropertyConfigPercentage, TruPropertyConfigScientific, TruPropertyConfigText, TruPropertyConfigTextChoices, TruPropertyConfigUsaAddress, TruPropertyConfigZipCode, TruQueryPredicateManager, TruRow, TruRowModule, TruSearchConfigBase, TruSearchControlBase, TruSearchControlConfigBase, TruSearchControlRangeBase, TruSearchIconModule, TruSearchPanelPositionManager, TruSearchPanelPositionManagerModule, TruSearchResultViewBase, TruSearchResultViewBaseModule, TruSearchResultViewManager, TruSearchViewBase, TruSearchViewBaseModule, TruSearchViewControlEventHandler, TruSearchViewEventHandler, TruSort, TruTab, TruTabGroup, TruTabGroupModule, TruTabModule, TruTableConfigBase, TruTableRegistry, TruTextManager, TruToolbar, TruToolbarButton, TruToolbarButtonModule, TruToolbarContextFilter, TruToolbarContextFilterModule, TruToolbarDropdown, TruToolbarDropdownModule, TruToolbarMenu, TruToolbarMenuModule, TruToolbarModule, TruToolbarSeparator, TruToolbarSeparatorModule, TruToolbarText, TruToolbarTextModule, TruToolbarUserProfile, TruToolbarUserProfileModule, TruUiNotification, TruUser, TruUtil, TruValidationDialog, TruValidationDialogConfig, TruValidationDialogContext, TruValidationDialogModule, TruValidatorFactory, TruWindowActionEventHandler, TruWindowEventArgs, TruWindowEventHandler };
|
|
8380
|
+
export { DetailViewModule, TruActionInvoke, TruAppEnvironment, TruAuth, TruAuthInterceptor, TruBreezeContext, TruBreezeContextFactory, TruBreezeMetadataProvider, TruBreezeValidator, TruBreezeValidatorModule, TruChoice, TruCloudFileManager, TruColumn, TruColumnModule, TruCommonModule, TruComponentConfigBase, TruComponentLookup, TruConfirmDialog, TruConfirmDialogConfig, TruConfirmDialogModule, TruConnectionHub, TruContextFilter, TruContextFilterChoice, TruContextFilters, TruControlComponentConfigBase, TruDataChange, TruDataContext, TruDataGrid, TruDataGridCellRenderer, TruDataGridHeader, TruDataGridModule, TruDataGridPkeyCellRenderer, TruDataGridRefHeader, TruDataGridTypes, TruDataGridUtil, TruDesktop, TruDesktopManager, TruDesktopModule, TruDesktopViewConfig, TruDetailViewBase, TruEditControlBase, TruEditControlConfigBase, TruEditParentControlConfigBase, TruEditPkeyControlConfigBase, TruEntityAccessor, TruEntityBase, TruExportDialog, TruExportDialogConfig, TruExportDialogModule, TruForm, TruFormModule, TruFormulaEval, TruGroupBox, TruGroupBoxModule, TruIconModule, TruListControlConfigBase, TruLogin, TruLoginModule, TruMatSelectPanel, TruMatSelectPanelModule, TruModelPropertyLookup, TruModelTypeLookup, TruNameValue, TruPasswordDialog, TruPasswordDialogModule, TruPredicate, TruPredicateMap, TruPropertyConfigBase, TruPropertyConfigCloudFile, TruPropertyConfigDate, TruPropertyConfigDecimal, TruPropertyConfigFile, TruPropertyConfigForeignKey, TruPropertyConfigInteger, TruPropertyConfigPassword, TruPropertyConfigPercentage, TruPropertyConfigScientific, TruPropertyConfigText, TruPropertyConfigTextChoices, TruPropertyConfigUsaAddress, TruPropertyConfigZipCode, TruQueryPredicateManager, TruReportManager, TruRow, TruRowModule, TruSearchConfigBase, TruSearchControlBase, TruSearchControlConfigBase, TruSearchControlRangeBase, TruSearchIconModule, TruSearchPanelPositionManager, TruSearchPanelPositionManagerModule, TruSearchResultViewBase, TruSearchResultViewBaseModule, TruSearchResultViewManager, TruSearchViewBase, TruSearchViewBaseModule, TruSearchViewControlEventHandler, TruSearchViewEventHandler, TruSort, TruTab, TruTabGroup, TruTabGroupModule, TruTabModule, TruTableConfigBase, TruTableRegistry, TruTextManager, TruToolbar, TruToolbarButton, TruToolbarButtonModule, TruToolbarContextFilter, TruToolbarContextFilterModule, TruToolbarDropdown, TruToolbarDropdownModule, TruToolbarMenu, TruToolbarMenuModule, TruToolbarModule, TruToolbarSeparator, TruToolbarSeparatorModule, TruToolbarText, TruToolbarTextModule, TruToolbarUserProfile, TruToolbarUserProfileModule, TruUiNotification, TruUser, TruUtil, TruValidationDialog, TruValidationDialogConfig, TruValidationDialogContext, TruValidationDialogModule, TruValidatorFactory, TruWindowActionEventHandler, TruWindowEventArgs, TruWindowEventHandler };
|
|
8063
8381
|
//# sourceMappingURL=trudb-tru-common-lib.mjs.map
|