ag-studio-angular 2.1.2 → 3.1.0
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/LICENSE.html +394 -7137
- package/README.md +21 -21
- package/fesm2022/ag-studio-angular.mjs +351 -49
- package/fesm2022/ag-studio-angular.mjs.map +1 -1
- package/index.d.ts +208 -31
- package/package.json +6 -4
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, ViewContainerRef, Component, Injectable, NgZone, EventEmitter, booleanAttribute, Output, Input, ViewEncapsulation, NgModule } from '@angular/core';
|
|
3
|
-
import { _BaseComponentWrapper, _VanillaFrameworkOverrides, _combineAttributesAndStudioProperties, _createStudio, _processPropertyChanges, _BOOLEAN_MIXED_STUDIO_PROPERTIES } from 'ag-studio';
|
|
2
|
+
import { inject, ViewContainerRef, Component, Injectable, NgZone, ViewChild, EventEmitter, booleanAttribute, Output, Input, ViewEncapsulation, NgModule } from '@angular/core';
|
|
3
|
+
import { _BaseComponentWrapper, _VanillaFrameworkOverrides, _STUDIO_GRID_MODULES, _AgLogger, _GridWidgetCore, _PivotGridWidgetCore, _createWidgetDefaults, _combineAttributesAndStudioProperties, _createStudio, _processPropertyChanges, _BOOLEAN_MIXED_STUDIO_PROPERTIES, _createWidgets } from 'ag-studio';
|
|
4
4
|
import { _removeFromParent } from 'ag-stack';
|
|
5
|
+
import { AgGridAngular } from 'ag-grid-angular';
|
|
5
6
|
|
|
6
7
|
// To speed up the removal of custom components we create a number of shards to contain them.
|
|
7
8
|
// Removing a single component calls a function within Angular called removeFromArray.
|
|
@@ -10,10 +11,10 @@ class AgComponentContainer {
|
|
|
10
11
|
constructor() {
|
|
11
12
|
this.vcr = inject(ViewContainerRef);
|
|
12
13
|
}
|
|
13
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
14
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.
|
|
14
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: AgComponentContainer, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
15
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.30", type: AgComponentContainer, isStandalone: false, selector: "ag-component-container", ngImport: i0, template: '', isInline: true }); }
|
|
15
16
|
}
|
|
16
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
17
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: AgComponentContainer, decorators: [{
|
|
17
18
|
type: Component,
|
|
18
19
|
args: [{
|
|
19
20
|
selector: 'ag-component-container',
|
|
@@ -46,10 +47,10 @@ class AngularFrameworkComponentWrapper extends _BaseComponentWrapper {
|
|
|
46
47
|
const container = this.compShards.get(shardIdx);
|
|
47
48
|
return container.instance.vcr.createComponent(componentType);
|
|
48
49
|
}
|
|
49
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
50
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
50
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: AngularFrameworkComponentWrapper, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
51
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: AngularFrameworkComponentWrapper }); }
|
|
51
52
|
}
|
|
52
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
53
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: AngularFrameworkComponentWrapper, decorators: [{
|
|
53
54
|
type: Injectable
|
|
54
55
|
}] });
|
|
55
56
|
class DynamicAgNg2Component {
|
|
@@ -58,6 +59,11 @@ class DynamicAgNg2Component {
|
|
|
58
59
|
this.frameworkCompWrapper = frameworkCompWrapper;
|
|
59
60
|
this.OriginalConstructor = OriginalConstructor;
|
|
60
61
|
}
|
|
62
|
+
// Never list 'wireBeans' in CUSTOM_WIDGET_TYPE's method lists: `addMethod` would replace this
|
|
63
|
+
// with a null-returning proxy.
|
|
64
|
+
wireBeans(beans) {
|
|
65
|
+
this._beans = beans;
|
|
66
|
+
}
|
|
61
67
|
init(params) {
|
|
62
68
|
return new Promise((resolve) => {
|
|
63
69
|
this.frameworkOverrides.runInsideAngular(() => {
|
|
@@ -75,6 +81,10 @@ class DynamicAgNg2Component {
|
|
|
75
81
|
this._eGui = this._componentRef.location.nativeElement;
|
|
76
82
|
// Angular appends the component to the DOM, so remove it
|
|
77
83
|
_removeFromParent(this._eGui);
|
|
84
|
+
const beans = this._beans;
|
|
85
|
+
if (beans) {
|
|
86
|
+
instance.wireBeans?.(beans);
|
|
87
|
+
}
|
|
78
88
|
return instance.agInit?.(params);
|
|
79
89
|
}
|
|
80
90
|
async refresh(params) {
|
|
@@ -133,7 +143,7 @@ class AngularFrameworkOverrides extends _VanillaFrameworkOverrides {
|
|
|
133
143
|
else if (this.isRunningWithinTestZone) {
|
|
134
144
|
this.runOutside = (callback, source) => {
|
|
135
145
|
if (source === 'resize-observer' || source === 'popupPositioning') {
|
|
136
|
-
// ensure resize observer callbacks are run outside of Angular even under test due to
|
|
146
|
+
// ensure resize observer callbacks are run outside of Angular even under test due to the test environment not supporting ResizeObserver
|
|
137
147
|
// which means it just loops continuously with a setTimeout with no way to flush the queue or have fixture.whenStable() resolve.
|
|
138
148
|
return this._ngZone.runOutsideAngular(callback);
|
|
139
149
|
}
|
|
@@ -171,13 +181,212 @@ class AngularFrameworkOverrides extends _VanillaFrameworkOverrides {
|
|
|
171
181
|
runOutsideAngular(callback, source) {
|
|
172
182
|
return this.runOutside(callback, source);
|
|
173
183
|
}
|
|
174
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
175
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
184
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: AngularFrameworkOverrides, deps: [{ token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
185
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: AngularFrameworkOverrides }); }
|
|
176
186
|
}
|
|
177
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
187
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: AngularFrameworkOverrides, decorators: [{
|
|
178
188
|
type: Injectable
|
|
179
189
|
}], ctorParameters: () => [{ type: i0.NgZone }] });
|
|
180
190
|
|
|
191
|
+
// False positive lint error, ChangeDetectorRef and co can't be type imports
|
|
192
|
+
/**
|
|
193
|
+
* The studio's grid widget as a framework-native Angular component. Register it as the `comp` of a
|
|
194
|
+
* grid widget definition to host the grid inside the consumer's own Angular application.
|
|
195
|
+
*/
|
|
196
|
+
class GridWidget {
|
|
197
|
+
constructor(changeDetectorRef) {
|
|
198
|
+
this.changeDetectorRef = changeDetectorRef;
|
|
199
|
+
this.cssProperties = {};
|
|
200
|
+
this.modules = _STUDIO_GRID_MODULES;
|
|
201
|
+
this.destroyed = false;
|
|
202
|
+
}
|
|
203
|
+
/** Receives the studio's beans, before `agInit` runs. */
|
|
204
|
+
wireBeans(beans) {
|
|
205
|
+
this.beans = beans;
|
|
206
|
+
}
|
|
207
|
+
agInit(params) {
|
|
208
|
+
const { beans, eRoot } = this;
|
|
209
|
+
if (!beans) {
|
|
210
|
+
_AgLogger.error('GridWidget can only be used as the component of a studio grid widget.');
|
|
211
|
+
return;
|
|
212
|
+
}
|
|
213
|
+
const core = new _GridWidgetCore({
|
|
214
|
+
beans,
|
|
215
|
+
createGrid: (gridOptions) => new Promise((resolve) => {
|
|
216
|
+
this.cancelCreate = () => resolve(undefined);
|
|
217
|
+
this.gridOptions = {
|
|
218
|
+
...gridOptions,
|
|
219
|
+
onGridReady: (event) => {
|
|
220
|
+
this.cancelCreate = undefined;
|
|
221
|
+
// `finally`, so a throwing consumer callback cannot leave the promise
|
|
222
|
+
// pending - the core would then never finish initialising.
|
|
223
|
+
try {
|
|
224
|
+
gridOptions.onGridReady?.(event);
|
|
225
|
+
}
|
|
226
|
+
finally {
|
|
227
|
+
resolve(event.api);
|
|
228
|
+
}
|
|
229
|
+
},
|
|
230
|
+
};
|
|
231
|
+
this.changeDetectorRef.detectChanges();
|
|
232
|
+
}),
|
|
233
|
+
setCssProperties: (properties) => this.applyCssProperties(properties),
|
|
234
|
+
getWidth: () => eRoot.nativeElement.offsetWidth,
|
|
235
|
+
});
|
|
236
|
+
this.core = core;
|
|
237
|
+
return core.init(params);
|
|
238
|
+
}
|
|
239
|
+
refresh(params) {
|
|
240
|
+
return this.core?.refresh(params);
|
|
241
|
+
}
|
|
242
|
+
/** Forwarded so a click on the grid's empty space can clear the cross filters. */
|
|
243
|
+
onBodyPointerDown({ target }) {
|
|
244
|
+
this.core?.onBodyPointerDown(target);
|
|
245
|
+
}
|
|
246
|
+
onBodyClick({ target }) {
|
|
247
|
+
this.core?.onBodyClick(target);
|
|
248
|
+
}
|
|
249
|
+
ngOnDestroy() {
|
|
250
|
+
this.destroyed = true;
|
|
251
|
+
this.cancelCreate?.();
|
|
252
|
+
this.cancelCreate = undefined;
|
|
253
|
+
this.core?.destroy();
|
|
254
|
+
this.core = undefined;
|
|
255
|
+
}
|
|
256
|
+
applyCssProperties(properties) {
|
|
257
|
+
this.cssProperties = properties;
|
|
258
|
+
if (!this.destroyed) {
|
|
259
|
+
// The studio drives its refreshes from outside Angular, so nothing else would run a
|
|
260
|
+
// change detection pass to get the new properties onto the element.
|
|
261
|
+
this.changeDetectorRef.detectChanges();
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: GridWidget, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
265
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.30", type: GridWidget, isStandalone: true, selector: "ng-component", viewQueries: [{ propertyName: "eRoot", first: true, predicate: ["eRoot"], descendants: true, static: true }], ngImport: i0, template: `
|
|
266
|
+
<div
|
|
267
|
+
#eRoot
|
|
268
|
+
class="ag-studio-grid-widget"
|
|
269
|
+
[style]="cssProperties"
|
|
270
|
+
(pointerdown)="onBodyPointerDown($event)"
|
|
271
|
+
(click)="onBodyClick($event)"
|
|
272
|
+
>
|
|
273
|
+
@if (gridOptions) {
|
|
274
|
+
<ag-grid-angular [gridOptions]="gridOptions" [modules]="modules" />
|
|
275
|
+
}
|
|
276
|
+
</div>
|
|
277
|
+
`, isInline: true, styles: [":host{display:block;height:100%;width:100%}ag-grid-angular{display:block;height:100%;width:100%}\n"], dependencies: [{ kind: "component", type: AgGridAngular, selector: "ag-grid-angular", inputs: ["gridOptions", "modules", "toolbar", "statusBar", "sideBar", "suppressContextMenu", "preventDefaultOnContextMenu", "allowContextMenuWithControlKey", "columnMenu", "suppressMenuHide", "enableBrowserTooltips", "tooltipTrigger", "tooltipShowDelay", "tooltipSwitchShowDelay", "tooltipHideDelay", "tooltipMouseTrack", "tooltipShowMode", "tooltipInteraction", "popupParent", "copyHeadersToClipboard", "copyGroupHeadersToClipboard", "clipboardDelimiter", "suppressCopyRowsToClipboard", "suppressCopySingleCellRanges", "suppressLastEmptyLineOnPaste", "suppressClipboardPaste", "suppressClipboardApi", "suppressCutToClipboard", "columnDefs", "defaultColDef", "defaultColGroupDef", "columnTypes", "dataTypeDefinitions", "calculatedColumns", "columnHeaderEdit", "maintainColumnOrder", "enableStrictPivotColumnOrder", "suppressFieldDotNotation", "headerHeight", "groupHeaderHeight", "floatingFiltersHeight", "pivotHeaderHeight", "pivotGroupHeaderHeight", "hidePaddedHeaderRows", "allowDragFromColumnsToolPanel", "suppressMovableColumns", "suppressColumnMoveAnimation", "suppressMoveWhenColumnDragging", "suppressDragLeaveHidesColumns", "suppressGroupChangesColumnVisibility", "suppressMakeColumnVisibleAfterUnGroup", "suppressRowGroupHidesColumns", "colResizeDefault", "suppressAutoSize", "autoSizePadding", "skipHeaderOnAutoSize", "autoSizeStrategy", "animateColumnResizing", "components", "editType", "suppressStartEditOnTab", "getFullRowEditValidationErrors", "invalidEditValueMode", "singleClickEdit", "suppressClickEdit", "readOnlyEdit", "stopEditingWhenCellsLoseFocus", "enterNavigatesVertically", "enterNavigatesVerticallyAfterEdit", "enableCellEditingOnBackspace", "undoRedoCellEditing", "undoRedoCellEditingLimit", "defaultCsvExportParams", "suppressCsvExport", "defaultExcelExportParams", "suppressExcelExport", "defaultPdfExportParams", "suppressPdfExport", "excelStyles", "findSearchValue", "findOptions", "quickFilterText", "cacheQuickFilter", "includeHiddenColumnsInQuickFilter", "quickFilterParser", "quickFilterMatcher", "applyQuickFilterBeforePivotOrAgg", "excludeChildrenWhenTreeDataFiltering", "enableAdvancedFilter", "alwaysPassFilter", "includeHiddenColumnsInAdvancedFilter", "advancedFilterParent", "advancedFilterBuilderParams", "advancedFilterParams", "suppressAdvancedFilterEval", "suppressSetFilterByDefault", "enableFilterHandlers", "filterHandlers", "enableCharts", "includeHiddenColumnsInCharts", "chartThemes", "customChartThemes", "chartThemeOverrides", "chartToolPanelsDef", "chartMenuItems", "loadingCellRenderer", "loadingCellRendererParams", "loadingCellRendererSelector", "localeText", "masterDetail", "keepDetailRows", "keepDetailRowsCount", "detailCellRenderer", "detailCellRendererParams", "detailRowHeight", "detailRowAutoHeight", "context", "alignedGrids", "tabIndex", "suppressInputClearButton", "enableInputAutoComplete", "rowBuffer", "valueCache", "valueCacheNeverExpires", "enableCellExpressions", "suppressTouch", "suppressFocusAfterRefresh", "suppressBrowserResizeObserver", "suppressPropertyNamesCheck", "suppressChangeDetection", "debug", "loading", "loadingRows", "overlayLoadingTemplate", "loadingOverlayComponent", "loadingOverlayComponentParams", "suppressLoadingOverlay", "overlayNoRowsTemplate", "noRowsOverlayComponent", "noRowsOverlayComponentParams", "suppressNoRowsOverlay", "suppressOverlays", "overlayComponent", "overlayComponentParams", "overlayComponentSelector", "activeOverlay", "activeOverlayParams", "processFileInput", "pagination", "paginationPageSize", "paginationPageSizeSelector", "paginationAutoPageSize", "paginateChildRows", "suppressPaginationPanel", "paginationPanels", "pivotMode", "pivotPanelShow", "pivotMaxGeneratedColumns", "pivotDefaultExpanded", "pivotColumnGroupTotals", "pivotRowTotals", "pivotSuppressAutoColumn", "suppressExpandablePivotGroups", "functionsReadOnly", "aggFuncs", "formulaDataSource", "notesDataSource", "noteTrigger", "noteShowDelay", "noteHideDelay", "formulaFuncs", "suppressAggFuncInHeader", "alwaysAggregateAtRootLevel", "aggregateOnlyChangedColumns", "suppressAggFilteredOnly", "removePivotHeaderRowWhenSingleValueColumn", "animateRows", "cellFlashDuration", "cellFadeDuration", "allowShowChangeAfterFilter", "domLayout", "ensureDomOrder", "enableCellSpan", "enableRtl", "suppressColumnVirtualisation", "suppressMaxRenderedRowRestriction", "suppressRowVirtualisation", "rowDragManaged", "refreshAfterGroupEdit", "rowDragInsertDelay", "suppressRowDrag", "suppressMoveWhenRowDragging", "rowDragEntireRow", "rowDragMultiRow", "rowDragText", "dragAndDropImageComponent", "dragAndDropImageComponentParams", "fullWidthCellRenderer", "fullWidthCellRendererParams", "embedFullWidthRows", "groupDisplayType", "groupDefaultExpanded", "masterDefaultExpanded", "autoGroupColumnDef", "groupMaintainOrder", "groupSelectsChildren", "groupLockGroupColumns", "groupAggFiltering", "groupTotalRow", "grandTotalRow", "alwaysShowGrandTotalRow", "suppressStickyTotalRow", "groupSuppressBlankHeader", "groupSelectsFiltered", "showOpenedGroup", "groupHideParentOfSingleChild", "groupRemoveSingleChildren", "groupRemoveLowestSingleChildren", "groupHideOpenParents", "groupHideColumnsUntilExpanded", "groupAllowUnbalanced", "rowGroupPanelShow", "groupRowRenderer", "groupRowRendererParams", "treeData", "treeDataChildrenField", "treeDataParentIdField", "rowGroupPanelSuppressSort", "pivotPanelSuppressSort", "suppressGroupRowsSticky", "stickyRowsMaxViewportRatio", "groupHierarchyConfig", "pinnedTopRowData", "pinnedBottomRowData", "enableRowPinning", "isRowPinnable", "isRowPinned", "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", "suppressContentVisibilityAuto", "enableContentVisibilityAuto", "contentVisibilityAutoDelay", "columnHoverHighlight", "gridId", "deltaSort", "treeDataDisplayType", "enableGroupEdit", "initialState", "theme", "loadThemeGoogleFonts", "themeCssLayer", "styleNonce", "themeStyleContainer", "getContextMenuItems", "getMainMenuItems", "getColumnMenuItems", "getColumnDropZoneMenuItems", "postProcessPopup", "processUnpinnedColumns", "processCellForClipboard", "processHeaderForClipboard", "processGroupHeaderForClipboard", "processCellFromClipboard", "sendToClipboard", "processDataFromClipboard", "isExternalFilterPresent", "doesExternalFilterPass", "getChartToolbarItems", "createChartContainer", "focusGridInnerElement", "navigateToNextHeader", "tabToNextHeader", "navigateToNextCell", "tabToNextCell", "tabToNextGridContainer", "getLocaleText", "getDocument", "paginationNumberFormatter", "getGroupRowAgg", "isGroupOpenByDefault", "isMasterOpenByDefault", "ssrmExpandAllAffectsAllRows", "initialGroupOrderComparator", "processPivotResultColDef", "processPivotResultColGroupDef", "getDataPath", "getChildCount", "getServerSideGroupLevelParams", "isServerSideGroupOpenByDefault", "isApplyServerSideTransaction", "isServerSideGroup", "getServerSideGroupKey", "getBusinessKeyForNode", "getRowId", "resetRowDataOnUpdate", "autoGenerateColumnDefs", "processAutoGeneratedColumnDefs", "processRowPostCreate", "isRowSelectable", "isRowMaster", "fillOperation", "postSortRows", "getRowStyle", "getRowClass", "getRowHeight", "isFullWidthRow", "isRowValidDropPosition"], outputs: ["toolPanelVisibleChanged", "toolPanelSizeChanged", "columnMenuVisibleChanged", "contextMenuVisibleChanged", "cutStart", "cutEnd", "pasteStart", "pasteEnd", "calculatedColumnCreated", "calculatedColumnChanged", "calculatedColumnExpressionChanged", "calculatedColumnRemoved", "calculatedColumnValidationStateChanged", "columnVisible", "columnPinned", "columnHeaderNameChanged", "columnResized", "columnMoved", "columnValueChanged", "columnPivotModeChanged", "columnPivotChanged", "columnGroupOpened", "newColumnsLoaded", "gridColumnsChanged", "displayedColumnsChanged", "virtualColumnsChanged", "columnEverythingChanged", "columnsReset", "columnHeaderMouseOver", "columnHeaderMouseLeave", "columnHeaderClicked", "columnHeaderContextMenu", "componentStateChanged", "cellValueChanged", "cellEditRequest", "rowValueChanged", "cellEditingStarted", "cellEditingStopped", "rowEditingStarted", "rowEditingStopped", "bulkEditingStarted", "bulkEditingStopped", "batchEditingStarted", "batchEditingStopped", "undoStarted", "undoEnded", "redoStarted", "redoEnded", "cellSelectionDeleteStart", "cellSelectionDeleteEnd", "rangeDeleteStart", "rangeDeleteEnd", "fillStart", "fillEnd", "filterOpened", "filterChanged", "filterModified", "filterUiChanged", "floatingFilterUiChanged", "advancedFilterBuilderVisibleChanged", "findChanged", "chartCreated", "chartRangeSelectionChanged", "chartOptionsChanged", "chartDestroyed", "cellKeyDown", "gridReady", "firstDataRendered", "gridSizeChanged", "modelUpdated", "virtualRowRemoved", "viewportChanged", "bodyScroll", "bodyScrollEnd", "dragStarted", "dragStopped", "dragCancelled", "stateUpdated", "issueRaised", "paginationChanged", "rowDragEnter", "rowDragMove", "rowDragLeave", "rowDragEnd", "rowDragCancel", "rowResizeStarted", "rowResizeEnded", "columnRowGroupChanged", "rowGroupOpened", "expandOrCollapseAll", "pivotMaxColumnsExceeded", "pinnedRowDataChanged", "pinnedRowsChanged", "rowDataUpdated", "asyncTransactionsFlushed", "storeRefreshed", "headerFocused", "cellClicked", "cellDoubleClicked", "cellFocused", "cellMouseOver", "cellMouseOut", "cellMouseDown", "rowClicked", "rowDoubleClicked", "rowSelected", "selectionChanged", "cellContextMenu", "rangeSelectionChanged", "cellSelectionChanged", "tooltipShow", "tooltipHide", "sortChanged"] }] }); }
|
|
278
|
+
}
|
|
279
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: GridWidget, decorators: [{
|
|
280
|
+
type: Component,
|
|
281
|
+
args: [{ standalone: true, imports: [AgGridAngular], template: `
|
|
282
|
+
<div
|
|
283
|
+
#eRoot
|
|
284
|
+
class="ag-studio-grid-widget"
|
|
285
|
+
[style]="cssProperties"
|
|
286
|
+
(pointerdown)="onBodyPointerDown($event)"
|
|
287
|
+
(click)="onBodyClick($event)"
|
|
288
|
+
>
|
|
289
|
+
@if (gridOptions) {
|
|
290
|
+
<ag-grid-angular [gridOptions]="gridOptions" [modules]="modules" />
|
|
291
|
+
}
|
|
292
|
+
</div>
|
|
293
|
+
`, styles: [":host{display:block;height:100%;width:100%}ag-grid-angular{display:block;height:100%;width:100%}\n"] }]
|
|
294
|
+
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { eRoot: [{
|
|
295
|
+
type: ViewChild,
|
|
296
|
+
args: ['eRoot', { static: true }]
|
|
297
|
+
}] } });
|
|
298
|
+
|
|
299
|
+
// False positive lint error, ChangeDetectorRef and co can't be type imports
|
|
300
|
+
/**
|
|
301
|
+
* The studio's pivot grid widget as a framework-native Angular component. Register it as the `comp`
|
|
302
|
+
* of a pivot grid widget definition to host the grid inside the consumer's own Angular application.
|
|
303
|
+
*/
|
|
304
|
+
class PivotGridWidget {
|
|
305
|
+
constructor(changeDetectorRef) {
|
|
306
|
+
this.changeDetectorRef = changeDetectorRef;
|
|
307
|
+
this.cssProperties = {};
|
|
308
|
+
this.modules = _STUDIO_GRID_MODULES;
|
|
309
|
+
this.destroyed = false;
|
|
310
|
+
}
|
|
311
|
+
/** Receives the studio's beans, before `agInit` runs. */
|
|
312
|
+
wireBeans(beans) {
|
|
313
|
+
this.beans = beans;
|
|
314
|
+
}
|
|
315
|
+
agInit(params) {
|
|
316
|
+
const { beans } = this;
|
|
317
|
+
if (!beans) {
|
|
318
|
+
_AgLogger.error('PivotGridWidget can only be used as the component of a studio pivot grid widget.');
|
|
319
|
+
return;
|
|
320
|
+
}
|
|
321
|
+
const core = new _PivotGridWidgetCore({
|
|
322
|
+
beans,
|
|
323
|
+
createGrid: (gridOptions) => new Promise((resolve) => {
|
|
324
|
+
this.cancelCreate = () => resolve(undefined);
|
|
325
|
+
this.gridOptions = {
|
|
326
|
+
...gridOptions,
|
|
327
|
+
onGridReady: (event) => {
|
|
328
|
+
this.cancelCreate = undefined;
|
|
329
|
+
// `finally`, so a throwing consumer callback cannot leave the promise
|
|
330
|
+
// pending - the core would then never finish initialising.
|
|
331
|
+
try {
|
|
332
|
+
gridOptions.onGridReady?.(event);
|
|
333
|
+
}
|
|
334
|
+
finally {
|
|
335
|
+
resolve(event.api);
|
|
336
|
+
}
|
|
337
|
+
},
|
|
338
|
+
};
|
|
339
|
+
this.changeDetectorRef.detectChanges();
|
|
340
|
+
}),
|
|
341
|
+
setCssProperties: (properties) => this.applyCssProperties(properties),
|
|
342
|
+
});
|
|
343
|
+
this.core = core;
|
|
344
|
+
return core.init(params);
|
|
345
|
+
}
|
|
346
|
+
refresh(params) {
|
|
347
|
+
return this.core?.refresh(params);
|
|
348
|
+
}
|
|
349
|
+
ngOnDestroy() {
|
|
350
|
+
this.destroyed = true;
|
|
351
|
+
this.cancelCreate?.();
|
|
352
|
+
this.cancelCreate = undefined;
|
|
353
|
+
this.core?.destroy();
|
|
354
|
+
this.core = undefined;
|
|
355
|
+
}
|
|
356
|
+
applyCssProperties(properties) {
|
|
357
|
+
this.cssProperties = properties;
|
|
358
|
+
if (!this.destroyed) {
|
|
359
|
+
// The studio drives its refreshes from outside Angular, so nothing else would run a
|
|
360
|
+
// change detection pass to get the new properties onto the element.
|
|
361
|
+
this.changeDetectorRef.detectChanges();
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: PivotGridWidget, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
365
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.30", type: PivotGridWidget, isStandalone: true, selector: "ng-component", ngImport: i0, template: `
|
|
366
|
+
<div class="ag-studio-pivot-grid-widget" [style]="cssProperties">
|
|
367
|
+
@if (gridOptions) {
|
|
368
|
+
<ag-grid-angular [gridOptions]="gridOptions" [modules]="modules" />
|
|
369
|
+
}
|
|
370
|
+
</div>
|
|
371
|
+
`, isInline: true, styles: [":host{display:block;height:100%;width:100%}ag-grid-angular{display:block;height:100%;width:100%}\n"], dependencies: [{ kind: "component", type: AgGridAngular, selector: "ag-grid-angular", inputs: ["gridOptions", "modules", "toolbar", "statusBar", "sideBar", "suppressContextMenu", "preventDefaultOnContextMenu", "allowContextMenuWithControlKey", "columnMenu", "suppressMenuHide", "enableBrowserTooltips", "tooltipTrigger", "tooltipShowDelay", "tooltipSwitchShowDelay", "tooltipHideDelay", "tooltipMouseTrack", "tooltipShowMode", "tooltipInteraction", "popupParent", "copyHeadersToClipboard", "copyGroupHeadersToClipboard", "clipboardDelimiter", "suppressCopyRowsToClipboard", "suppressCopySingleCellRanges", "suppressLastEmptyLineOnPaste", "suppressClipboardPaste", "suppressClipboardApi", "suppressCutToClipboard", "columnDefs", "defaultColDef", "defaultColGroupDef", "columnTypes", "dataTypeDefinitions", "calculatedColumns", "columnHeaderEdit", "maintainColumnOrder", "enableStrictPivotColumnOrder", "suppressFieldDotNotation", "headerHeight", "groupHeaderHeight", "floatingFiltersHeight", "pivotHeaderHeight", "pivotGroupHeaderHeight", "hidePaddedHeaderRows", "allowDragFromColumnsToolPanel", "suppressMovableColumns", "suppressColumnMoveAnimation", "suppressMoveWhenColumnDragging", "suppressDragLeaveHidesColumns", "suppressGroupChangesColumnVisibility", "suppressMakeColumnVisibleAfterUnGroup", "suppressRowGroupHidesColumns", "colResizeDefault", "suppressAutoSize", "autoSizePadding", "skipHeaderOnAutoSize", "autoSizeStrategy", "animateColumnResizing", "components", "editType", "suppressStartEditOnTab", "getFullRowEditValidationErrors", "invalidEditValueMode", "singleClickEdit", "suppressClickEdit", "readOnlyEdit", "stopEditingWhenCellsLoseFocus", "enterNavigatesVertically", "enterNavigatesVerticallyAfterEdit", "enableCellEditingOnBackspace", "undoRedoCellEditing", "undoRedoCellEditingLimit", "defaultCsvExportParams", "suppressCsvExport", "defaultExcelExportParams", "suppressExcelExport", "defaultPdfExportParams", "suppressPdfExport", "excelStyles", "findSearchValue", "findOptions", "quickFilterText", "cacheQuickFilter", "includeHiddenColumnsInQuickFilter", "quickFilterParser", "quickFilterMatcher", "applyQuickFilterBeforePivotOrAgg", "excludeChildrenWhenTreeDataFiltering", "enableAdvancedFilter", "alwaysPassFilter", "includeHiddenColumnsInAdvancedFilter", "advancedFilterParent", "advancedFilterBuilderParams", "advancedFilterParams", "suppressAdvancedFilterEval", "suppressSetFilterByDefault", "enableFilterHandlers", "filterHandlers", "enableCharts", "includeHiddenColumnsInCharts", "chartThemes", "customChartThemes", "chartThemeOverrides", "chartToolPanelsDef", "chartMenuItems", "loadingCellRenderer", "loadingCellRendererParams", "loadingCellRendererSelector", "localeText", "masterDetail", "keepDetailRows", "keepDetailRowsCount", "detailCellRenderer", "detailCellRendererParams", "detailRowHeight", "detailRowAutoHeight", "context", "alignedGrids", "tabIndex", "suppressInputClearButton", "enableInputAutoComplete", "rowBuffer", "valueCache", "valueCacheNeverExpires", "enableCellExpressions", "suppressTouch", "suppressFocusAfterRefresh", "suppressBrowserResizeObserver", "suppressPropertyNamesCheck", "suppressChangeDetection", "debug", "loading", "loadingRows", "overlayLoadingTemplate", "loadingOverlayComponent", "loadingOverlayComponentParams", "suppressLoadingOverlay", "overlayNoRowsTemplate", "noRowsOverlayComponent", "noRowsOverlayComponentParams", "suppressNoRowsOverlay", "suppressOverlays", "overlayComponent", "overlayComponentParams", "overlayComponentSelector", "activeOverlay", "activeOverlayParams", "processFileInput", "pagination", "paginationPageSize", "paginationPageSizeSelector", "paginationAutoPageSize", "paginateChildRows", "suppressPaginationPanel", "paginationPanels", "pivotMode", "pivotPanelShow", "pivotMaxGeneratedColumns", "pivotDefaultExpanded", "pivotColumnGroupTotals", "pivotRowTotals", "pivotSuppressAutoColumn", "suppressExpandablePivotGroups", "functionsReadOnly", "aggFuncs", "formulaDataSource", "notesDataSource", "noteTrigger", "noteShowDelay", "noteHideDelay", "formulaFuncs", "suppressAggFuncInHeader", "alwaysAggregateAtRootLevel", "aggregateOnlyChangedColumns", "suppressAggFilteredOnly", "removePivotHeaderRowWhenSingleValueColumn", "animateRows", "cellFlashDuration", "cellFadeDuration", "allowShowChangeAfterFilter", "domLayout", "ensureDomOrder", "enableCellSpan", "enableRtl", "suppressColumnVirtualisation", "suppressMaxRenderedRowRestriction", "suppressRowVirtualisation", "rowDragManaged", "refreshAfterGroupEdit", "rowDragInsertDelay", "suppressRowDrag", "suppressMoveWhenRowDragging", "rowDragEntireRow", "rowDragMultiRow", "rowDragText", "dragAndDropImageComponent", "dragAndDropImageComponentParams", "fullWidthCellRenderer", "fullWidthCellRendererParams", "embedFullWidthRows", "groupDisplayType", "groupDefaultExpanded", "masterDefaultExpanded", "autoGroupColumnDef", "groupMaintainOrder", "groupSelectsChildren", "groupLockGroupColumns", "groupAggFiltering", "groupTotalRow", "grandTotalRow", "alwaysShowGrandTotalRow", "suppressStickyTotalRow", "groupSuppressBlankHeader", "groupSelectsFiltered", "showOpenedGroup", "groupHideParentOfSingleChild", "groupRemoveSingleChildren", "groupRemoveLowestSingleChildren", "groupHideOpenParents", "groupHideColumnsUntilExpanded", "groupAllowUnbalanced", "rowGroupPanelShow", "groupRowRenderer", "groupRowRendererParams", "treeData", "treeDataChildrenField", "treeDataParentIdField", "rowGroupPanelSuppressSort", "pivotPanelSuppressSort", "suppressGroupRowsSticky", "stickyRowsMaxViewportRatio", "groupHierarchyConfig", "pinnedTopRowData", "pinnedBottomRowData", "enableRowPinning", "isRowPinnable", "isRowPinned", "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", "suppressContentVisibilityAuto", "enableContentVisibilityAuto", "contentVisibilityAutoDelay", "columnHoverHighlight", "gridId", "deltaSort", "treeDataDisplayType", "enableGroupEdit", "initialState", "theme", "loadThemeGoogleFonts", "themeCssLayer", "styleNonce", "themeStyleContainer", "getContextMenuItems", "getMainMenuItems", "getColumnMenuItems", "getColumnDropZoneMenuItems", "postProcessPopup", "processUnpinnedColumns", "processCellForClipboard", "processHeaderForClipboard", "processGroupHeaderForClipboard", "processCellFromClipboard", "sendToClipboard", "processDataFromClipboard", "isExternalFilterPresent", "doesExternalFilterPass", "getChartToolbarItems", "createChartContainer", "focusGridInnerElement", "navigateToNextHeader", "tabToNextHeader", "navigateToNextCell", "tabToNextCell", "tabToNextGridContainer", "getLocaleText", "getDocument", "paginationNumberFormatter", "getGroupRowAgg", "isGroupOpenByDefault", "isMasterOpenByDefault", "ssrmExpandAllAffectsAllRows", "initialGroupOrderComparator", "processPivotResultColDef", "processPivotResultColGroupDef", "getDataPath", "getChildCount", "getServerSideGroupLevelParams", "isServerSideGroupOpenByDefault", "isApplyServerSideTransaction", "isServerSideGroup", "getServerSideGroupKey", "getBusinessKeyForNode", "getRowId", "resetRowDataOnUpdate", "autoGenerateColumnDefs", "processAutoGeneratedColumnDefs", "processRowPostCreate", "isRowSelectable", "isRowMaster", "fillOperation", "postSortRows", "getRowStyle", "getRowClass", "getRowHeight", "isFullWidthRow", "isRowValidDropPosition"], outputs: ["toolPanelVisibleChanged", "toolPanelSizeChanged", "columnMenuVisibleChanged", "contextMenuVisibleChanged", "cutStart", "cutEnd", "pasteStart", "pasteEnd", "calculatedColumnCreated", "calculatedColumnChanged", "calculatedColumnExpressionChanged", "calculatedColumnRemoved", "calculatedColumnValidationStateChanged", "columnVisible", "columnPinned", "columnHeaderNameChanged", "columnResized", "columnMoved", "columnValueChanged", "columnPivotModeChanged", "columnPivotChanged", "columnGroupOpened", "newColumnsLoaded", "gridColumnsChanged", "displayedColumnsChanged", "virtualColumnsChanged", "columnEverythingChanged", "columnsReset", "columnHeaderMouseOver", "columnHeaderMouseLeave", "columnHeaderClicked", "columnHeaderContextMenu", "componentStateChanged", "cellValueChanged", "cellEditRequest", "rowValueChanged", "cellEditingStarted", "cellEditingStopped", "rowEditingStarted", "rowEditingStopped", "bulkEditingStarted", "bulkEditingStopped", "batchEditingStarted", "batchEditingStopped", "undoStarted", "undoEnded", "redoStarted", "redoEnded", "cellSelectionDeleteStart", "cellSelectionDeleteEnd", "rangeDeleteStart", "rangeDeleteEnd", "fillStart", "fillEnd", "filterOpened", "filterChanged", "filterModified", "filterUiChanged", "floatingFilterUiChanged", "advancedFilterBuilderVisibleChanged", "findChanged", "chartCreated", "chartRangeSelectionChanged", "chartOptionsChanged", "chartDestroyed", "cellKeyDown", "gridReady", "firstDataRendered", "gridSizeChanged", "modelUpdated", "virtualRowRemoved", "viewportChanged", "bodyScroll", "bodyScrollEnd", "dragStarted", "dragStopped", "dragCancelled", "stateUpdated", "issueRaised", "paginationChanged", "rowDragEnter", "rowDragMove", "rowDragLeave", "rowDragEnd", "rowDragCancel", "rowResizeStarted", "rowResizeEnded", "columnRowGroupChanged", "rowGroupOpened", "expandOrCollapseAll", "pivotMaxColumnsExceeded", "pinnedRowDataChanged", "pinnedRowsChanged", "rowDataUpdated", "asyncTransactionsFlushed", "storeRefreshed", "headerFocused", "cellClicked", "cellDoubleClicked", "cellFocused", "cellMouseOver", "cellMouseOut", "cellMouseDown", "rowClicked", "rowDoubleClicked", "rowSelected", "selectionChanged", "cellContextMenu", "rangeSelectionChanged", "cellSelectionChanged", "tooltipShow", "tooltipHide", "sortChanged"] }] }); }
|
|
372
|
+
}
|
|
373
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: PivotGridWidget, decorators: [{
|
|
374
|
+
type: Component,
|
|
375
|
+
args: [{ standalone: true, imports: [AgGridAngular], template: `
|
|
376
|
+
<div class="ag-studio-pivot-grid-widget" [style]="cssProperties">
|
|
377
|
+
@if (gridOptions) {
|
|
378
|
+
<ag-grid-angular [gridOptions]="gridOptions" [modules]="modules" />
|
|
379
|
+
}
|
|
380
|
+
</div>
|
|
381
|
+
`, styles: [":host{display:block;height:100%;width:100%}ag-grid-angular{display:block;height:100%;width:100%}\n"] }]
|
|
382
|
+
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }] });
|
|
383
|
+
|
|
384
|
+
/** The widget defaults for Angular Studio: the vanilla defs with the Angular widgets swapped in. */
|
|
385
|
+
const WIDGET_DEFAULTS = _createWidgetDefaults({
|
|
386
|
+
grid: GridWidget,
|
|
387
|
+
'pivot-grid': PivotGridWidget,
|
|
388
|
+
});
|
|
389
|
+
|
|
181
390
|
// False positive lint error, ElementRef and co can't be type imports
|
|
182
391
|
class AgStudio {
|
|
183
392
|
constructor(elementDef, _viewContainerRef, _angularFrameworkOverrides, _frameworkCompWrapper) {
|
|
@@ -202,9 +411,6 @@ class AgStudio {
|
|
|
202
411
|
* @initial
|
|
203
412
|
*/
|
|
204
413
|
this.enableRtl = undefined;
|
|
205
|
-
/** DOM element to use as the popup parent for Studio popups (context menus, etc.).
|
|
206
|
-
*/
|
|
207
|
-
this.popupParent = undefined;
|
|
208
414
|
/** Theme to apply to Studio.
|
|
209
415
|
*
|
|
210
416
|
* @default studioTheme
|
|
@@ -233,27 +439,16 @@ class AgStudio {
|
|
|
233
439
|
* every one must have the same styleNonce set.
|
|
234
440
|
*/
|
|
235
441
|
this.styleNonce = undefined;
|
|
236
|
-
/** An element to insert style elements into when injecting styles into the
|
|
237
|
-
* Studio. Styles are inserted at the start of the element.
|
|
238
|
-
*
|
|
239
|
-
* If undefined, styles will be added to the document head for Studio components
|
|
240
|
-
* rendered in the main document fragment, or to Studio wrapper element
|
|
241
|
-
* for other Studio components (e.g. those rendered in a shadow DOM or detached from the
|
|
242
|
-
* document).
|
|
243
|
-
*
|
|
244
|
-
* @initial
|
|
245
|
-
*/
|
|
246
|
-
this.themeStyleContainer = undefined;
|
|
247
|
-
/** Allows overriding what `document` is used.
|
|
248
|
-
* Use this when you want Studio to use a different `document` than the one available on the global scope.
|
|
249
|
-
* This can happen if docking out components (something which Electron supports).
|
|
250
|
-
*/
|
|
251
|
-
this.getDocument = undefined;
|
|
252
442
|
/** Disables touch support (but does not remove the browser's efforts to simulate mouse events on touch).
|
|
253
443
|
* @default false
|
|
254
444
|
* @initial
|
|
255
445
|
*/
|
|
256
446
|
this.suppressTouch = undefined;
|
|
447
|
+
/** Keyboard shortcuts Studio should not handle, so an application can bind them itself.
|
|
448
|
+
* Each shortcut is suppressed independently, e.g. `{ redo: true }` keeps undo on ctrl/cmd+Z and
|
|
449
|
+
* leaves ctrl/cmd+shift+Z to the application.
|
|
450
|
+
*/
|
|
451
|
+
this.suppressKeyboard = undefined;
|
|
257
452
|
/** A map of key->value pairs for localising text within Studio.
|
|
258
453
|
* @initial
|
|
259
454
|
*/
|
|
@@ -276,9 +471,23 @@ class AgStudio {
|
|
|
276
471
|
*/
|
|
277
472
|
this.context = undefined;
|
|
278
473
|
/** Initial state for Studio. Only read once on initialization. Can be used in conjunction with `api.getState()` to save and restore Studio state.
|
|
474
|
+
*
|
|
475
|
+
* Pass what `api.getHistory()` returned, rather than what `api.getState()` did, to restore the
|
|
476
|
+
* undo and redo history alongside the report state it was recorded against - the history carries
|
|
477
|
+
* that state as its `current`. See {@link AgHistoryOptions} for what a restored history
|
|
478
|
+
* keeps.
|
|
279
479
|
* @initial
|
|
280
480
|
*/
|
|
281
481
|
this.initialState = undefined;
|
|
482
|
+
/** Supplies an inbound drill-through filter to constrain the report, for example when the
|
|
483
|
+
* user has navigated in from another report or page.
|
|
484
|
+
*
|
|
485
|
+
* The filter is applied alongside the page filters on every data request, and is shown to
|
|
486
|
+
* the user in the Filters Panel, but cannot be edited or removed there. It is not included
|
|
487
|
+
* when the report's state is read or saved. Rank filters are not supported in a drill-through filter
|
|
488
|
+
* and are ignored with a warning.
|
|
489
|
+
*/
|
|
490
|
+
this.drillThrough = undefined;
|
|
282
491
|
/** Defines the data sources used by Studio.
|
|
283
492
|
*
|
|
284
493
|
* If updated after initially being set, only changes to synchronous data will be processed.
|
|
@@ -286,16 +495,47 @@ class AgStudio {
|
|
|
286
495
|
*/
|
|
287
496
|
this.data = undefined;
|
|
288
497
|
/** Which mode Studio is in.
|
|
498
|
+
* Changing this only changes what is shown and what is editable: the active state is
|
|
499
|
+
* neither saved nor restored on a mode change, and carries across the switch unchanged.
|
|
500
|
+
* The undo and redo history also carries across by default; set `history.onModeChange` to
|
|
501
|
+
* discard it instead.
|
|
289
502
|
* @default 'view'
|
|
290
503
|
*/
|
|
291
504
|
this.mode = undefined;
|
|
505
|
+
/** How Studio's undo and redo history behaves. */
|
|
506
|
+
this.history = undefined;
|
|
507
|
+
/** Allows filters to be added to, and removed from, the filters panel while in view mode.
|
|
508
|
+
*
|
|
509
|
+
* When `false`, filters can only be added and removed in edit mode.
|
|
510
|
+
*
|
|
511
|
+
* Studio does not store filters added this way. Listen to `onStateUpdated` and persist the
|
|
512
|
+
* state yourself if it needs to survive a reload.
|
|
513
|
+
* @default false
|
|
514
|
+
*/
|
|
515
|
+
this.enableFilterEditingInViewMode = undefined;
|
|
516
|
+
/** Breakpoints that lay widgets out differently on narrower canvases while in view mode.
|
|
517
|
+
*
|
|
518
|
+
* The first breakpoint whose range contains the canvas width is the one used, so list narrower ranges
|
|
519
|
+
* before wider ones that also contain them. Either bound can be omitted to leave that end of the range
|
|
520
|
+
* open, and canvas widths no breakpoint covers keep the layout the dashboard was authored with.
|
|
521
|
+
*
|
|
522
|
+
* The canvas is never drawn narrower than the page's own minimum width, so a breakpoint below that
|
|
523
|
+
* width is never used. Lower the page's minimum width to bring it into range.
|
|
524
|
+
*/
|
|
525
|
+
this.responsiveLayoutBreakpoints = undefined;
|
|
526
|
+
/** Set to `true` to open the Studio context menu when the user right-clicks with the Ctrl key (Cmd on macOS)
|
|
527
|
+
* held.
|
|
528
|
+
*
|
|
529
|
+
* By default, a right-click with Ctrl or Cmd held shows the browser's own context menu instead, everywhere in
|
|
530
|
+
* the dashboard including grids and charts.
|
|
531
|
+
* @default false
|
|
532
|
+
*/
|
|
533
|
+
this.allowContextMenuWithControlKey = undefined;
|
|
292
534
|
/** Default layout styling.
|
|
293
535
|
*/
|
|
294
536
|
this.layout = undefined;
|
|
295
|
-
/** AI Assistant
|
|
296
|
-
*
|
|
297
|
-
* NOTE: The **AI Assistant** is an experimental feature. Behaviour will be
|
|
298
|
-
* slightly different depending on the LLM being used, and results can vary across queries.
|
|
537
|
+
/** The agent harness powering the AI Assistant panel: either a harness, or a function building
|
|
538
|
+
* one from the Studio API. Results vary with the LLM you supply.
|
|
299
539
|
*
|
|
300
540
|
* @initial
|
|
301
541
|
*/
|
|
@@ -314,6 +554,42 @@ class AgStudio {
|
|
|
314
554
|
* Used to share components which can then be referenced directly by key in the definitions.
|
|
315
555
|
*/
|
|
316
556
|
this.components = undefined;
|
|
557
|
+
/** How each tool's calls are presented in the AI Assistant panel, keyed by tool name: the words
|
|
558
|
+
* on the step, an optional component for the body that opens beneath it, or `hidden` to leave
|
|
559
|
+
* the tool out of the transcript. Studio's own tools come pre-declared; an entry here overrides
|
|
560
|
+
* them, and any tool of your own needs one to render as more than its name.
|
|
561
|
+
*
|
|
562
|
+
* Keyed by name because a call replayed from history no longer carries the tool that ran it,
|
|
563
|
+
* only the name it was called by. Applies whichever harness is driving the panel.
|
|
564
|
+
*
|
|
565
|
+
* `detail` is checked against the component type of the framework you are using.
|
|
566
|
+
*/
|
|
567
|
+
this.aiToolDisplay = undefined;
|
|
568
|
+
/** DOM element to use as the popup parent for Studio popups (context menus, etc.).
|
|
569
|
+
*/
|
|
570
|
+
this.popupParent = undefined;
|
|
571
|
+
/** An element to insert style elements into when injecting styles into the
|
|
572
|
+
* Studio. Styles are inserted at the start of the element.
|
|
573
|
+
*
|
|
574
|
+
* If undefined, styles will be added to the document head for Studio components
|
|
575
|
+
* rendered in the main document fragment, or to Studio wrapper element
|
|
576
|
+
* for other Studio components (e.g. those rendered in a shadow DOM or detached from the
|
|
577
|
+
* document).
|
|
578
|
+
*
|
|
579
|
+
* @initial
|
|
580
|
+
*/
|
|
581
|
+
this.themeStyleContainer = undefined;
|
|
582
|
+
/** Allows overriding what `document` is used.
|
|
583
|
+
* Use this when you want Studio to use a different `document` than the one available on the global scope.
|
|
584
|
+
* This can happen if docking out components (something which Electron supports).
|
|
585
|
+
*/
|
|
586
|
+
this.getDocument = undefined;
|
|
587
|
+
/** Called when the user right-clicks in the dashboard canvas. Studio opens a context menu showing the returned
|
|
588
|
+
* items. Return an empty array to show no menu. When this property is not set, Studio shows no menu of its own
|
|
589
|
+
* and the browser's context menu appears. A right-click with the Ctrl key (Cmd on macOS) held also shows the
|
|
590
|
+
* browser's context menu, unless `allowContextMenuWithControlKey` is `true`.
|
|
591
|
+
*/
|
|
592
|
+
this.getContextMenuItems = undefined;
|
|
317
593
|
/** State has been updated.
|
|
318
594
|
*/
|
|
319
595
|
this.stateUpdated = new EventEmitter();
|
|
@@ -359,6 +635,7 @@ class AgStudio {
|
|
|
359
635
|
modules: this.modules,
|
|
360
636
|
providedBeanInstances: {
|
|
361
637
|
frameworkCompWrapper: this._frameworkCompWrapper,
|
|
638
|
+
widgetDefaults: WIDGET_DEFAULTS,
|
|
362
639
|
},
|
|
363
640
|
};
|
|
364
641
|
const api = _createStudio(this._nativeElement, mergedStudioProperties, studioParams);
|
|
@@ -426,10 +703,10 @@ class AgStudio {
|
|
|
426
703
|
}
|
|
427
704
|
}
|
|
428
705
|
}
|
|
429
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
430
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "20.3.
|
|
706
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: AgStudio, deps: [{ token: i0.ElementRef }, { token: i0.ViewContainerRef }, { token: AngularFrameworkOverrides }, { token: AngularFrameworkComponentWrapper }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
707
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "20.3.30", type: AgStudio, isStandalone: true, selector: "ag-studio", inputs: { studioProperties: "studioProperties", modules: "modules", tabIndex: "tabIndex", enableRtl: ["enableRtl", "enableRtl", booleanAttribute], theme: "theme", loadThemeGoogleFonts: ["loadThemeGoogleFonts", "loadThemeGoogleFonts", booleanAttribute], themeCssLayer: "themeCssLayer", styleNonce: "styleNonce", suppressTouch: ["suppressTouch", "suppressTouch", booleanAttribute], suppressKeyboard: "suppressKeyboard", localeText: "localeText", aiText: "aiText", getLocaleText: "getLocaleText", studioId: "studioId", context: "context", initialState: "initialState", drillThrough: "drillThrough", data: "data", mode: "mode", history: "history", enableFilterEditingInViewMode: ["enableFilterEditingInViewMode", "enableFilterEditingInViewMode", booleanAttribute], responsiveLayoutBreakpoints: "responsiveLayoutBreakpoints", allowContextMenuWithControlKey: ["allowContextMenuWithControlKey", "allowContextMenuWithControlKey", booleanAttribute], layout: "layout", ai: "ai", dataOptions: "dataOptions", panels: "panels", page: "page", widgets: "widgets", components: "components", aiToolDisplay: "aiToolDisplay", popupParent: "popupParent", themeStyleContainer: "themeStyleContainer", getDocument: "getDocument", getContextMenuItems: "getContextMenuItems" }, outputs: { stateUpdated: "stateUpdated", apiReady: "apiReady", studioReady: "studioReady", renderStateChanged: "renderStateChanged", errorRaised: "errorRaised" }, providers: [AngularFrameworkOverrides, AngularFrameworkComponentWrapper], usesOnChanges: true, ngImport: i0, template: '', isInline: true, encapsulation: i0.ViewEncapsulation.None }); }
|
|
431
708
|
}
|
|
432
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
709
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: AgStudio, decorators: [{
|
|
433
710
|
type: Component,
|
|
434
711
|
args: [{
|
|
435
712
|
selector: 'ag-studio',
|
|
@@ -448,8 +725,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImpo
|
|
|
448
725
|
}], enableRtl: [{
|
|
449
726
|
type: Input,
|
|
450
727
|
args: [{ transform: booleanAttribute }]
|
|
451
|
-
}], popupParent: [{
|
|
452
|
-
type: Input
|
|
453
728
|
}], theme: [{
|
|
454
729
|
type: Input
|
|
455
730
|
}], loadThemeGoogleFonts: [{
|
|
@@ -459,13 +734,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImpo
|
|
|
459
734
|
type: Input
|
|
460
735
|
}], styleNonce: [{
|
|
461
736
|
type: Input
|
|
462
|
-
}], themeStyleContainer: [{
|
|
463
|
-
type: Input
|
|
464
|
-
}], getDocument: [{
|
|
465
|
-
type: Input
|
|
466
737
|
}], suppressTouch: [{
|
|
467
738
|
type: Input,
|
|
468
739
|
args: [{ transform: booleanAttribute }]
|
|
740
|
+
}], suppressKeyboard: [{
|
|
741
|
+
type: Input
|
|
469
742
|
}], localeText: [{
|
|
470
743
|
type: Input
|
|
471
744
|
}], aiText: [{
|
|
@@ -478,10 +751,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImpo
|
|
|
478
751
|
type: Input
|
|
479
752
|
}], initialState: [{
|
|
480
753
|
type: Input
|
|
754
|
+
}], drillThrough: [{
|
|
755
|
+
type: Input
|
|
481
756
|
}], data: [{
|
|
482
757
|
type: Input
|
|
483
758
|
}], mode: [{
|
|
484
759
|
type: Input
|
|
760
|
+
}], history: [{
|
|
761
|
+
type: Input
|
|
762
|
+
}], enableFilterEditingInViewMode: [{
|
|
763
|
+
type: Input,
|
|
764
|
+
args: [{ transform: booleanAttribute }]
|
|
765
|
+
}], responsiveLayoutBreakpoints: [{
|
|
766
|
+
type: Input
|
|
767
|
+
}], allowContextMenuWithControlKey: [{
|
|
768
|
+
type: Input,
|
|
769
|
+
args: [{ transform: booleanAttribute }]
|
|
485
770
|
}], layout: [{
|
|
486
771
|
type: Input
|
|
487
772
|
}], ai: [{
|
|
@@ -496,6 +781,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImpo
|
|
|
496
781
|
type: Input
|
|
497
782
|
}], components: [{
|
|
498
783
|
type: Input
|
|
784
|
+
}], aiToolDisplay: [{
|
|
785
|
+
type: Input
|
|
786
|
+
}], popupParent: [{
|
|
787
|
+
type: Input
|
|
788
|
+
}], themeStyleContainer: [{
|
|
789
|
+
type: Input
|
|
790
|
+
}], getDocument: [{
|
|
791
|
+
type: Input
|
|
792
|
+
}], getContextMenuItems: [{
|
|
793
|
+
type: Input
|
|
499
794
|
}], stateUpdated: [{
|
|
500
795
|
type: Output
|
|
501
796
|
}], apiReady: [{
|
|
@@ -523,11 +818,11 @@ function getValueOrCoercedValue(key, valueToUse) {
|
|
|
523
818
|
}
|
|
524
819
|
|
|
525
820
|
class AgStudioModule {
|
|
526
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
527
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.
|
|
528
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.
|
|
821
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: AgStudioModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
822
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.30", ngImport: i0, type: AgStudioModule, imports: [AgStudio], exports: [AgStudio] }); }
|
|
823
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: AgStudioModule }); }
|
|
529
824
|
}
|
|
530
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
825
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: AgStudioModule, decorators: [{
|
|
531
826
|
type: NgModule,
|
|
532
827
|
args: [{
|
|
533
828
|
imports: [AgStudio],
|
|
@@ -535,9 +830,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImpo
|
|
|
535
830
|
}]
|
|
536
831
|
}] });
|
|
537
832
|
|
|
833
|
+
/**
|
|
834
|
+
* Helper function for the `widgets` Studio property.
|
|
835
|
+
*/
|
|
836
|
+
function createWidgets(params) {
|
|
837
|
+
return _createWidgets(params, WIDGET_DEFAULTS);
|
|
838
|
+
}
|
|
839
|
+
|
|
538
840
|
/**
|
|
539
841
|
* Generated bundle index. Do not edit.
|
|
540
842
|
*/
|
|
541
843
|
|
|
542
|
-
export { AgComponentContainer, AgStudio, AgStudioModule, AngularFrameworkComponentWrapper, AngularFrameworkOverrides };
|
|
844
|
+
export { AgComponentContainer, AgStudio, AgStudioModule, AngularFrameworkComponentWrapper, AngularFrameworkOverrides, GridWidget, PivotGridWidget, createWidgets };
|
|
543
845
|
//# sourceMappingURL=ag-studio-angular.mjs.map
|