bways-grid 0.0.14 → 0.0.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/bways-grid.mjs +112 -114
- package/fesm2022/bways-grid.mjs.map +1 -1
- package/lib/components/filter-tool-panel/filter-tool-panel.component.d.ts +4 -5
- package/lib/components/side-bar/side-bar.component.d.ts +3 -3
- package/lib/components/ultra-grid/ultra-grid.component.d.ts +9 -5
- package/package.json +1 -1
package/fesm2022/bways-grid.mjs
CHANGED
|
@@ -1657,12 +1657,11 @@ class FilterToolPanelComponent {
|
|
|
1657
1657
|
rowData = [];
|
|
1658
1658
|
activeFilters = new Map();
|
|
1659
1659
|
conditionFilters = new Map();
|
|
1660
|
-
savedReportNames = [];
|
|
1661
1660
|
filterApplied = new EventEmitter();
|
|
1662
1661
|
conditionFilterChanged = new EventEmitter();
|
|
1663
1662
|
clearAllFilters = new EventEmitter();
|
|
1664
1663
|
saveReportRequested = new EventEmitter();
|
|
1665
|
-
|
|
1664
|
+
importReportRequested = new EventEmitter();
|
|
1666
1665
|
sections = [];
|
|
1667
1666
|
_loadedFields = new Set();
|
|
1668
1667
|
constructor(cdr) {
|
|
@@ -1932,19 +1931,49 @@ class FilterToolPanelComponent {
|
|
|
1932
1931
|
onSaveReportPrompt() {
|
|
1933
1932
|
const name = prompt('Enter a name for this report:');
|
|
1934
1933
|
if (name && name.trim()) {
|
|
1935
|
-
|
|
1934
|
+
const reportObj = {
|
|
1935
|
+
reportName: name.trim(),
|
|
1936
|
+
activeFilters: {},
|
|
1937
|
+
conditionFilters: {}
|
|
1938
|
+
};
|
|
1939
|
+
// Convert Map<string, Set<any>> to Record<string, any[]>
|
|
1940
|
+
if (this.activeFilters.size > 0) {
|
|
1941
|
+
for (const [field, selectedSet] of this.activeFilters.entries()) {
|
|
1942
|
+
reportObj.activeFilters[field] = Array.from(selectedSet);
|
|
1943
|
+
}
|
|
1944
|
+
}
|
|
1945
|
+
// Convert Map to Object
|
|
1946
|
+
if (this.conditionFilters.size > 0) {
|
|
1947
|
+
reportObj.conditionFilters = Object.fromEntries(this.conditionFilters);
|
|
1948
|
+
}
|
|
1949
|
+
this.saveReportRequested.emit(reportObj);
|
|
1936
1950
|
}
|
|
1937
1951
|
}
|
|
1938
|
-
|
|
1939
|
-
const
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1952
|
+
onImportReport() {
|
|
1953
|
+
const input = document.createElement('input');
|
|
1954
|
+
input.type = 'file';
|
|
1955
|
+
input.accept = '.json';
|
|
1956
|
+
input.onchange = (event) => {
|
|
1957
|
+
const file = event.target.files[0];
|
|
1958
|
+
if (!file)
|
|
1959
|
+
return;
|
|
1960
|
+
const reader = new FileReader();
|
|
1961
|
+
reader.onload = (e) => {
|
|
1962
|
+
try {
|
|
1963
|
+
const reportData = JSON.parse(e.target.result);
|
|
1964
|
+
this.importReportRequested.emit(reportData);
|
|
1965
|
+
}
|
|
1966
|
+
catch (err) {
|
|
1967
|
+
alert('Invalid JSON file. Please select a valid report file.');
|
|
1968
|
+
console.error('Failed to parse imported report JSON:', err);
|
|
1969
|
+
}
|
|
1970
|
+
};
|
|
1971
|
+
reader.readAsText(file);
|
|
1972
|
+
};
|
|
1973
|
+
input.click();
|
|
1945
1974
|
}
|
|
1946
1975
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: FilterToolPanelComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
1947
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.18", type: FilterToolPanelComponent, isStandalone: true, selector: "ug-filter-tool-panel", inputs: { columns: "columns", rowData: "rowData", activeFilters: "activeFilters", conditionFilters: "conditionFilters"
|
|
1976
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.18", type: FilterToolPanelComponent, isStandalone: true, selector: "ug-filter-tool-panel", inputs: { columns: "columns", rowData: "rowData", activeFilters: "activeFilters", conditionFilters: "conditionFilters" }, outputs: { filterApplied: "filterApplied", conditionFilterChanged: "conditionFilterChanged", clearAllFilters: "clearAllFilters", saveReportRequested: "saveReportRequested", importReportRequested: "importReportRequested" }, usesOnChanges: true, ngImport: i0, template: `
|
|
1948
1977
|
<div class="ug-ftp-wrapper">
|
|
1949
1978
|
<!-- Global Toolbar -->
|
|
1950
1979
|
<div class="ug-ftp-toolbar">
|
|
@@ -1967,11 +1996,11 @@ class FilterToolPanelComponent {
|
|
|
1967
1996
|
<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z"></path><polyline points="17 21 17 13 7 13 7 21"></polyline><polyline points="7 3 7 8 15 8"></polyline></svg>
|
|
1968
1997
|
Save
|
|
1969
1998
|
</button>
|
|
1970
|
-
|
|
1971
|
-
<
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
</
|
|
1999
|
+
|
|
2000
|
+
<button class="ug-ftp-btn" (click)="onImportReport()" title="Import Saved Report">
|
|
2001
|
+
<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><polyline points="7 10 12 15 17 10"></polyline><line x1="12" y1="15" x2="12" y2="3"></line></svg>
|
|
2002
|
+
Import
|
|
2003
|
+
</button>
|
|
1975
2004
|
</div>
|
|
1976
2005
|
|
|
1977
2006
|
<!-- Column Filter Sections -->
|
|
@@ -2095,11 +2124,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
|
|
|
2095
2124
|
<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z"></path><polyline points="17 21 17 13 7 13 7 21"></polyline><polyline points="7 3 7 8 15 8"></polyline></svg>
|
|
2096
2125
|
Save
|
|
2097
2126
|
</button>
|
|
2098
|
-
|
|
2099
|
-
<
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
</
|
|
2127
|
+
|
|
2128
|
+
<button class="ug-ftp-btn" (click)="onImportReport()" title="Import Saved Report">
|
|
2129
|
+
<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><polyline points="7 10 12 15 17 10"></polyline><line x1="12" y1="15" x2="12" y2="3"></line></svg>
|
|
2130
|
+
Import
|
|
2131
|
+
</button>
|
|
2103
2132
|
</div>
|
|
2104
2133
|
|
|
2105
2134
|
<!-- Column Filter Sections -->
|
|
@@ -2205,8 +2234,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
|
|
|
2205
2234
|
type: Input
|
|
2206
2235
|
}], conditionFilters: [{
|
|
2207
2236
|
type: Input
|
|
2208
|
-
}], savedReportNames: [{
|
|
2209
|
-
type: Input
|
|
2210
2237
|
}], filterApplied: [{
|
|
2211
2238
|
type: Output
|
|
2212
2239
|
}], conditionFilterChanged: [{
|
|
@@ -2215,7 +2242,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
|
|
|
2215
2242
|
type: Output
|
|
2216
2243
|
}], saveReportRequested: [{
|
|
2217
2244
|
type: Output
|
|
2218
|
-
}],
|
|
2245
|
+
}], importReportRequested: [{
|
|
2219
2246
|
type: Output
|
|
2220
2247
|
}] } });
|
|
2221
2248
|
|
|
@@ -2228,7 +2255,7 @@ class SideBarComponent {
|
|
|
2228
2255
|
valuesModel = [];
|
|
2229
2256
|
pivotMode = false;
|
|
2230
2257
|
pivotColumns = [];
|
|
2231
|
-
savedReportNames = [];
|
|
2258
|
+
savedReportNames = []; // Kept for backward compat but no longer used
|
|
2232
2259
|
columnsUpdated = new EventEmitter();
|
|
2233
2260
|
groupModelUpdated = new EventEmitter();
|
|
2234
2261
|
valuesModelUpdated = new EventEmitter();
|
|
@@ -2239,7 +2266,7 @@ class SideBarComponent {
|
|
|
2239
2266
|
conditionFilterChanged = new EventEmitter();
|
|
2240
2267
|
clearAllFilters = new EventEmitter();
|
|
2241
2268
|
saveReportRequested = new EventEmitter();
|
|
2242
|
-
|
|
2269
|
+
importReportRequested = new EventEmitter();
|
|
2243
2270
|
activeTab = null;
|
|
2244
2271
|
cdr = inject(ChangeDetectorRef);
|
|
2245
2272
|
constructor() {
|
|
@@ -2292,7 +2319,7 @@ class SideBarComponent {
|
|
|
2292
2319
|
this.pivotModelUpdated.emit(model);
|
|
2293
2320
|
}
|
|
2294
2321
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: SideBarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2295
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.18", type: SideBarComponent, isStandalone: true, selector: "ug-side-bar", inputs: { columns: "columns", rowData: "rowData", activeFilters: "activeFilters", conditionFilters: "conditionFilters", groupModel: "groupModel", valuesModel: "valuesModel", pivotMode: "pivotMode", pivotColumns: "pivotColumns", savedReportNames: "savedReportNames", activeTab: "activeTab" }, outputs: { columnsUpdated: "columnsUpdated", groupModelUpdated: "groupModelUpdated", valuesModelUpdated: "valuesModelUpdated", pivotModeUpdated: "pivotModeUpdated", pivotModelUpdated: "pivotModelUpdated", exportExcelClicked: "exportExcelClicked", filterApplied: "filterApplied", conditionFilterChanged: "conditionFilterChanged", clearAllFilters: "clearAllFilters", saveReportRequested: "saveReportRequested",
|
|
2322
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.18", type: SideBarComponent, isStandalone: true, selector: "ug-side-bar", inputs: { columns: "columns", rowData: "rowData", activeFilters: "activeFilters", conditionFilters: "conditionFilters", groupModel: "groupModel", valuesModel: "valuesModel", pivotMode: "pivotMode", pivotColumns: "pivotColumns", savedReportNames: "savedReportNames", activeTab: "activeTab" }, outputs: { columnsUpdated: "columnsUpdated", groupModelUpdated: "groupModelUpdated", valuesModelUpdated: "valuesModelUpdated", pivotModeUpdated: "pivotModeUpdated", pivotModelUpdated: "pivotModelUpdated", exportExcelClicked: "exportExcelClicked", filterApplied: "filterApplied", conditionFilterChanged: "conditionFilterChanged", clearAllFilters: "clearAllFilters", saveReportRequested: "saveReportRequested", importReportRequested: "importReportRequested" }, usesOnChanges: true, ngImport: i0, template: `
|
|
2296
2323
|
<div class="ug-side-bar-wrapper">
|
|
2297
2324
|
<!-- Content Area -->
|
|
2298
2325
|
<div class="ug-side-bar-content" *ngIf="activeTab">
|
|
@@ -2325,12 +2352,11 @@ class SideBarComponent {
|
|
|
2325
2352
|
[rowData]="rowData"
|
|
2326
2353
|
[activeFilters]="activeFilters"
|
|
2327
2354
|
[conditionFilters]="conditionFilters"
|
|
2328
|
-
[savedReportNames]="savedReportNames"
|
|
2329
2355
|
(filterApplied)="onFilterApplied($event)"
|
|
2330
2356
|
(conditionFilterChanged)="onConditionFilterChanged($event)"
|
|
2331
2357
|
(clearAllFilters)="onClearAllFilters()"
|
|
2332
2358
|
(saveReportRequested)="saveReportRequested.emit($event)"
|
|
2333
|
-
(
|
|
2359
|
+
(importReportRequested)="importReportRequested.emit($event)">
|
|
2334
2360
|
</ug-filter-tool-panel>
|
|
2335
2361
|
</div>
|
|
2336
2362
|
</div>
|
|
@@ -2352,7 +2378,7 @@ class SideBarComponent {
|
|
|
2352
2378
|
</div>
|
|
2353
2379
|
</div>
|
|
2354
2380
|
</div>
|
|
2355
|
-
`, isInline: true, styles: [".ug-side-bar-wrapper{display:flex;flex-direction:row;height:100%;background-color:var(--ug-panel-bg);border-left:1px solid var(--ug-border-color);font-family:var(--ug-font-family, sans-serif);font-size:var(--ug-font-size, 13px);color:var(--ug-header-color)}.ug-side-bar-content{display:flex;flex-direction:column;width:250px;height:100%;border-right:1px solid var(--ug-border-color)}.ug-side-bar-header{display:flex;justify-content:space-between;align-items:center;padding:12px 16px;border-bottom:1px solid var(--ug-border-color);background-color:var(--ug-header-bg)}.ug-side-bar-title{font-family:var(--ug-font-family, sans-serif);font-size:var(--ug-font-size, 13px);font-weight:var(--ug-header-font-weight, 500);color:var(--ug-header-color)}.ug-side-bar-close{cursor:pointer;color:var(--ug-icon-color);display:flex;align-items:center;justify-content:center}.ug-side-bar-close:hover{color:var(--ug-primary-color)}.ug-side-bar-body{flex:1;overflow-y:auto;overflow-x:hidden;background-color:var(--ug-panel-bg)}.ug-side-bar-toolbar{display:flex;flex-direction:column;width:40px;height:100%;background-color:var(--ug-header-bg);padding-top:8px;gap:8px;align-items:center}.ug-side-bar-tab{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:8px 4px;cursor:pointer;color:var(--ug-icon-color);border-left:2px solid transparent;width:100%;box-sizing:border-box}.ug-side-bar-tab span{writing-mode:vertical-rl;transform:rotate(180deg);margin-top:12px;font-family:var(--ug-font-family, sans-serif);font-weight:var(--ug-header-font-weight, 500);font-size:var(--ug-font-size, 13px);letter-spacing:.5px}.ug-side-bar-tab:hover{color:var(--ug-primary-color);background-color:var(--ug-row-hover-bg)}.ug-side-bar-tab.active{color:var(--ug-primary-color);background-color:var(--ug-panel-bg);border-left:2px solid var(--ug-primary-color)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: ColumnToolPanelComponent, selector: "ug-column-tool-panel", inputs: ["columns", "groupModel", "valuesModel", "pivotMode", "pivotColumns"], outputs: ["columnsUpdated", "groupModelChanged", "valuesModelChanged", "pivotModeChanged", "pivotModelChanged", "exportExcelClicked"] }, { kind: "component", type: FilterToolPanelComponent, selector: "ug-filter-tool-panel", inputs: ["columns", "rowData", "activeFilters", "conditionFilters"
|
|
2381
|
+
`, isInline: true, styles: [".ug-side-bar-wrapper{display:flex;flex-direction:row;height:100%;background-color:var(--ug-panel-bg);border-left:1px solid var(--ug-border-color);font-family:var(--ug-font-family, sans-serif);font-size:var(--ug-font-size, 13px);color:var(--ug-header-color)}.ug-side-bar-content{display:flex;flex-direction:column;width:250px;height:100%;border-right:1px solid var(--ug-border-color)}.ug-side-bar-header{display:flex;justify-content:space-between;align-items:center;padding:12px 16px;border-bottom:1px solid var(--ug-border-color);background-color:var(--ug-header-bg)}.ug-side-bar-title{font-family:var(--ug-font-family, sans-serif);font-size:var(--ug-font-size, 13px);font-weight:var(--ug-header-font-weight, 500);color:var(--ug-header-color)}.ug-side-bar-close{cursor:pointer;color:var(--ug-icon-color);display:flex;align-items:center;justify-content:center}.ug-side-bar-close:hover{color:var(--ug-primary-color)}.ug-side-bar-body{flex:1;overflow-y:auto;overflow-x:hidden;background-color:var(--ug-panel-bg)}.ug-side-bar-toolbar{display:flex;flex-direction:column;width:40px;height:100%;background-color:var(--ug-header-bg);padding-top:8px;gap:8px;align-items:center}.ug-side-bar-tab{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:8px 4px;cursor:pointer;color:var(--ug-icon-color);border-left:2px solid transparent;width:100%;box-sizing:border-box}.ug-side-bar-tab span{writing-mode:vertical-rl;transform:rotate(180deg);margin-top:12px;font-family:var(--ug-font-family, sans-serif);font-weight:var(--ug-header-font-weight, 500);font-size:var(--ug-font-size, 13px);letter-spacing:.5px}.ug-side-bar-tab:hover{color:var(--ug-primary-color);background-color:var(--ug-row-hover-bg)}.ug-side-bar-tab.active{color:var(--ug-primary-color);background-color:var(--ug-panel-bg);border-left:2px solid var(--ug-primary-color)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: ColumnToolPanelComponent, selector: "ug-column-tool-panel", inputs: ["columns", "groupModel", "valuesModel", "pivotMode", "pivotColumns"], outputs: ["columnsUpdated", "groupModelChanged", "valuesModelChanged", "pivotModeChanged", "pivotModelChanged", "exportExcelClicked"] }, { kind: "component", type: FilterToolPanelComponent, selector: "ug-filter-tool-panel", inputs: ["columns", "rowData", "activeFilters", "conditionFilters"], outputs: ["filterApplied", "conditionFilterChanged", "clearAllFilters", "saveReportRequested", "importReportRequested"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
2356
2382
|
}
|
|
2357
2383
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: SideBarComponent, decorators: [{
|
|
2358
2384
|
type: Component,
|
|
@@ -2389,12 +2415,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
|
|
|
2389
2415
|
[rowData]="rowData"
|
|
2390
2416
|
[activeFilters]="activeFilters"
|
|
2391
2417
|
[conditionFilters]="conditionFilters"
|
|
2392
|
-
[savedReportNames]="savedReportNames"
|
|
2393
2418
|
(filterApplied)="onFilterApplied($event)"
|
|
2394
2419
|
(conditionFilterChanged)="onConditionFilterChanged($event)"
|
|
2395
2420
|
(clearAllFilters)="onClearAllFilters()"
|
|
2396
2421
|
(saveReportRequested)="saveReportRequested.emit($event)"
|
|
2397
|
-
(
|
|
2422
|
+
(importReportRequested)="importReportRequested.emit($event)">
|
|
2398
2423
|
</ug-filter-tool-panel>
|
|
2399
2424
|
</div>
|
|
2400
2425
|
</div>
|
|
@@ -2455,7 +2480,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
|
|
|
2455
2480
|
type: Output
|
|
2456
2481
|
}], saveReportRequested: [{
|
|
2457
2482
|
type: Output
|
|
2458
|
-
}],
|
|
2483
|
+
}], importReportRequested: [{
|
|
2459
2484
|
type: Output
|
|
2460
2485
|
}], activeTab: [{
|
|
2461
2486
|
type: Input
|
|
@@ -2694,6 +2719,7 @@ class UltraGridComponent {
|
|
|
2694
2719
|
rowClicked = new EventEmitter();
|
|
2695
2720
|
sortChanged = new EventEmitter();
|
|
2696
2721
|
selectionChanged = new EventEmitter();
|
|
2722
|
+
reportSaved = new EventEmitter();
|
|
2697
2723
|
getSelectedRows() {
|
|
2698
2724
|
if (!this._mappedRowData)
|
|
2699
2725
|
return [];
|
|
@@ -2729,9 +2755,13 @@ class UltraGridComponent {
|
|
|
2729
2755
|
activeFilters = new Map();
|
|
2730
2756
|
// Tracks condition-based filters per column
|
|
2731
2757
|
conditionFilters = new Map();
|
|
2758
|
+
/**
|
|
2759
|
+
* Input to apply filters via a JSON object or string.
|
|
2760
|
+
* Expected format: { activeFilters: Record<string, any[]>, conditionFilters: Record<string, ColumnConditionFilter> }
|
|
2761
|
+
*/
|
|
2762
|
+
filterModel;
|
|
2732
2763
|
isChooseColumnsOpen = false;
|
|
2733
2764
|
chooseColumnsPosition = { x: 0, y: 0 };
|
|
2734
|
-
savedReportNames = [];
|
|
2735
2765
|
destroy$ = new Subject();
|
|
2736
2766
|
sortingWorker;
|
|
2737
2767
|
sortingWorkerUrl;
|
|
@@ -2760,9 +2790,6 @@ class UltraGridComponent {
|
|
|
2760
2790
|
this.fetchServerPage(1);
|
|
2761
2791
|
}
|
|
2762
2792
|
}
|
|
2763
|
-
if (this.isBrowser) {
|
|
2764
|
-
this.loadSavedReportNames();
|
|
2765
|
-
}
|
|
2766
2793
|
}
|
|
2767
2794
|
get selectedRowsCount() {
|
|
2768
2795
|
if (!this._mappedRowData)
|
|
@@ -2781,8 +2808,6 @@ class UltraGridComponent {
|
|
|
2781
2808
|
if (this.sortingWorker) {
|
|
2782
2809
|
this.sortingWorker.postMessage({ action: 'INIT', rows: this._mappedRowData });
|
|
2783
2810
|
}
|
|
2784
|
-
// We do not immediately `applyLocalData()` here anymore if we have a worker,
|
|
2785
|
-
// because INIT needs to finish first. If no worker, we apply directly.
|
|
2786
2811
|
if (!this.sortingWorker) {
|
|
2787
2812
|
this.applyLocalData();
|
|
2788
2813
|
}
|
|
@@ -2790,6 +2815,13 @@ class UltraGridComponent {
|
|
|
2790
2815
|
this.ssrData = this.renderedLocalData.slice(0, 50);
|
|
2791
2816
|
}
|
|
2792
2817
|
}
|
|
2818
|
+
// If filters are changed from outside (e.g. loading a report), refresh the grid
|
|
2819
|
+
if (changes['activeFilters'] || changes['conditionFilters']) {
|
|
2820
|
+
this.applyLocalData();
|
|
2821
|
+
}
|
|
2822
|
+
if (changes['filterModel'] && this.filterModel) {
|
|
2823
|
+
this.applyImportedFilters(this.filterModel);
|
|
2824
|
+
}
|
|
2793
2825
|
}
|
|
2794
2826
|
ngOnDestroy() {
|
|
2795
2827
|
this.destroy$.next();
|
|
@@ -3588,84 +3620,47 @@ class UltraGridComponent {
|
|
|
3588
3620
|
}
|
|
3589
3621
|
this.applyLocalData();
|
|
3590
3622
|
}
|
|
3591
|
-
// --- Save / Import Filters
|
|
3592
|
-
|
|
3593
|
-
if (!
|
|
3623
|
+
// --- Save / Import Filters ---
|
|
3624
|
+
handleSaveReport(reportObj) {
|
|
3625
|
+
if (!reportObj)
|
|
3594
3626
|
return;
|
|
3595
|
-
|
|
3596
|
-
|
|
3597
|
-
|
|
3598
|
-
|
|
3599
|
-
this.savedReportNames = Object.keys(parsed);
|
|
3600
|
-
this.cdr.markForCheck();
|
|
3601
|
-
}
|
|
3602
|
-
}
|
|
3603
|
-
catch (e) { }
|
|
3627
|
+
console.log('=== SAVED REPORT OBJECT ===');
|
|
3628
|
+
console.log(JSON.stringify(reportObj, null, 2));
|
|
3629
|
+
console.log('=== END REPORT OBJECT ===');
|
|
3630
|
+
this.reportSaved.emit(reportObj);
|
|
3604
3631
|
}
|
|
3605
|
-
|
|
3606
|
-
if (!
|
|
3632
|
+
handleImportReport(reportData) {
|
|
3633
|
+
if (!reportData)
|
|
3607
3634
|
return;
|
|
3608
|
-
|
|
3609
|
-
|
|
3610
|
-
|
|
3611
|
-
|
|
3612
|
-
|
|
3613
|
-
|
|
3614
|
-
|
|
3615
|
-
|
|
3616
|
-
}
|
|
3617
|
-
}
|
|
3618
|
-
// Convert Map to Object
|
|
3619
|
-
if (this.conditionFilters.size > 0) {
|
|
3620
|
-
state.conditionFilters = Object.fromEntries(this.conditionFilters);
|
|
3621
|
-
}
|
|
3622
|
-
if (this.isBrowser) {
|
|
3635
|
+
console.log('Importing report:', reportData.reportName || 'unnamed');
|
|
3636
|
+
this.applyImportedFilters(reportData);
|
|
3637
|
+
}
|
|
3638
|
+
applyImportedFilters(data) {
|
|
3639
|
+
if (!data)
|
|
3640
|
+
return;
|
|
3641
|
+
let parsedData = data;
|
|
3642
|
+
if (typeof data === 'string') {
|
|
3623
3643
|
try {
|
|
3624
|
-
|
|
3625
|
-
const reports = stored ? JSON.parse(stored) : {};
|
|
3626
|
-
reports[reportName] = state;
|
|
3627
|
-
localStorage.setItem('ug-saved-reports', JSON.stringify(reports));
|
|
3628
|
-
this.loadSavedReportNames();
|
|
3629
|
-
console.log(`Report '${reportName}' saved successfully locally.`);
|
|
3644
|
+
parsedData = JSON.parse(data);
|
|
3630
3645
|
}
|
|
3631
3646
|
catch (err) {
|
|
3632
|
-
console.error('
|
|
3633
|
-
|
|
3634
|
-
}
|
|
3635
|
-
}
|
|
3636
|
-
handleLoadReport(reportName) {
|
|
3637
|
-
if (!reportName || !this.isBrowser)
|
|
3638
|
-
return;
|
|
3639
|
-
try {
|
|
3640
|
-
const stored = localStorage.getItem('ug-saved-reports');
|
|
3641
|
-
if (stored) {
|
|
3642
|
-
const reports = JSON.parse(stored);
|
|
3643
|
-
const data = reports[reportName];
|
|
3644
|
-
if (data) {
|
|
3645
|
-
this.applyImportedFilters(data);
|
|
3646
|
-
}
|
|
3647
|
+
console.error('Error parsing filter JSON string:', err);
|
|
3648
|
+
return;
|
|
3647
3649
|
}
|
|
3648
3650
|
}
|
|
3649
|
-
catch (err) {
|
|
3650
|
-
console.error('Error loading report locally.', err);
|
|
3651
|
-
}
|
|
3652
|
-
}
|
|
3653
|
-
applyImportedFilters(data) {
|
|
3654
|
-
if (!data)
|
|
3655
|
-
return;
|
|
3656
3651
|
try {
|
|
3657
3652
|
// Restore activeFilters (Record -> Map<string, Set>)
|
|
3658
3653
|
// Important: We create a NEW Map instance to trigger Output/Input change detection
|
|
3659
3654
|
const newActiveFilters = new Map();
|
|
3660
|
-
if (
|
|
3661
|
-
Object.keys(
|
|
3662
|
-
newActiveFilters.set(field, new Set(
|
|
3655
|
+
if (parsedData.activeFilters) {
|
|
3656
|
+
Object.keys(parsedData.activeFilters).forEach(field => {
|
|
3657
|
+
newActiveFilters.set(field, new Set(parsedData.activeFilters[field]));
|
|
3663
3658
|
});
|
|
3664
3659
|
}
|
|
3665
3660
|
this.activeFilters = newActiveFilters;
|
|
3666
3661
|
// Restore conditionFilters (Object -> Map)
|
|
3667
|
-
if (
|
|
3668
|
-
this.conditionFilters = new Map(Object.entries(
|
|
3662
|
+
if (parsedData.conditionFilters) {
|
|
3663
|
+
this.conditionFilters = new Map(Object.entries(parsedData.conditionFilters));
|
|
3669
3664
|
}
|
|
3670
3665
|
else {
|
|
3671
3666
|
this.conditionFilters = new Map();
|
|
@@ -3674,15 +3669,14 @@ class UltraGridComponent {
|
|
|
3674
3669
|
this.currentPage = 1;
|
|
3675
3670
|
this.applyLocalData();
|
|
3676
3671
|
this.cdr.markForCheck();
|
|
3677
|
-
console.log('Filters
|
|
3672
|
+
console.log('Filters imported and applied successfully.');
|
|
3678
3673
|
}
|
|
3679
3674
|
catch (err) {
|
|
3680
|
-
console.error('Error applying
|
|
3681
|
-
alert('Error loading report. Please ensure local storage data is not corrupted.');
|
|
3675
|
+
console.error('Error applying imported filters:', err);
|
|
3682
3676
|
}
|
|
3683
3677
|
}
|
|
3684
3678
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: UltraGridComponent, deps: [{ token: PLATFORM_ID }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }, { token: GridFlattenerService }, { token: ExcelExportService }], target: i0.ɵɵFactoryTarget.Component });
|
|
3685
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.18", type: UltraGridComponent, isStandalone: true, selector: "bways-grid", inputs: { columns: "columns", rowData: "rowData", serverDataSource: "serverDataSource", config: "config", pagination: "pagination", pageSize: "pageSize", groupModel: "groupModel", valuesModel: "valuesModel", pivotColumns: "pivotColumns" }, outputs: { rowClicked: "rowClicked", sortChanged: "sortChanged", selectionChanged: "selectionChanged" }, viewQueries: [{ propertyName: "headerElement", first: true, predicate: ["headerComponent"], descendants: true, read: ElementRef }, { propertyName: "viewport", first: true, predicate: ["viewport"], descendants: true }], usesOnChanges: true, ngImport: i0, template: `
|
|
3679
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.18", type: UltraGridComponent, isStandalone: true, selector: "bways-grid", inputs: { columns: "columns", rowData: "rowData", serverDataSource: "serverDataSource", config: "config", pagination: "pagination", pageSize: "pageSize", groupModel: "groupModel", valuesModel: "valuesModel", pivotColumns: "pivotColumns", activeFilters: "activeFilters", conditionFilters: "conditionFilters", filterModel: "filterModel" }, outputs: { rowClicked: "rowClicked", sortChanged: "sortChanged", selectionChanged: "selectionChanged", reportSaved: "reportSaved" }, viewQueries: [{ propertyName: "headerElement", first: true, predicate: ["headerComponent"], descendants: true, read: ElementRef }, { propertyName: "viewport", first: true, predicate: ["viewport"], descendants: true }], usesOnChanges: true, ngImport: i0, template: `
|
|
3686
3680
|
<div class="ug-wrapper" [ngClass]="config.theme || 'ag-theme-alpine'">
|
|
3687
3681
|
|
|
3688
3682
|
<div class="ug-main">
|
|
@@ -3750,8 +3744,7 @@ class UltraGridComponent {
|
|
|
3750
3744
|
</div>
|
|
3751
3745
|
|
|
3752
3746
|
<ug-side-bar
|
|
3753
|
-
*ngIf="config.sideBar"
|
|
3754
|
-
[activeTab]="config.sideBarDefaultTab || null"
|
|
3747
|
+
*ngIf="config.sideBar"
|
|
3755
3748
|
[columns]="columns"
|
|
3756
3749
|
[rowData]="rowData"
|
|
3757
3750
|
[activeFilters]="activeFilters"
|
|
@@ -3760,7 +3753,6 @@ class UltraGridComponent {
|
|
|
3760
3753
|
[valuesModel]="valuesModel"
|
|
3761
3754
|
[pivotMode]="!!config.pivotMode"
|
|
3762
3755
|
[pivotColumns]="pivotColumns"
|
|
3763
|
-
[savedReportNames]="savedReportNames"
|
|
3764
3756
|
(columnsUpdated)="onSideBarColumnsUpdated($event)"
|
|
3765
3757
|
(groupModelUpdated)="onSideBarGroupModelUpdated($event)"
|
|
3766
3758
|
(valuesModelUpdated)="onValuesModelUpdated($event)"
|
|
@@ -3771,7 +3763,7 @@ class UltraGridComponent {
|
|
|
3771
3763
|
(conditionFilterChanged)="onConditionFilterChanged($event)"
|
|
3772
3764
|
(clearAllFilters)="onClearAllFilters()"
|
|
3773
3765
|
(saveReportRequested)="handleSaveReport($event)"
|
|
3774
|
-
(
|
|
3766
|
+
(importReportRequested)="handleImportReport($event)">
|
|
3775
3767
|
</ug-side-bar>
|
|
3776
3768
|
|
|
3777
3769
|
</div>
|
|
@@ -3807,7 +3799,7 @@ class UltraGridComponent {
|
|
|
3807
3799
|
(closePanel)="isChooseColumnsOpen = false">
|
|
3808
3800
|
</ug-choose-columns>
|
|
3809
3801
|
</div>
|
|
3810
|
-
`, isInline: true, styles: ["@charset \"UTF-8\";bways-grid{display:block;height:100%;width:100%;--ug-border-color: rgba(221, 226, 235, .4);--ug-bg-color: transparent;--ug-header-bg: rgba(255, 255, 255, .25);--ug-header-color: #3f332f;--ug-header-hover-bg: rgba(255, 255, 255, .4);--ug-row-bg: rgba(255, 255, 255, .15);--ug-row-hover-bg: rgba(216, 48, 24, .05);--ug-row-selected-bg: rgba(216, 48, 24, .15);--ug-primary-color: #d83018;--ug-panel-bg: #ffffff;--ug-footer-bg: rgba(255, 255, 255, .25);--ug-footer-color: #554440;--ug-icon-color: #7b6d69;--ug-font-family: -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Oxygen-Sans, Ubuntu, Cantarell, \"Helvetica Neue\", sans-serif;--ug-font-size: 13px;--ug-header-font-weight: 600}.ug-wrapper{display:flex;flex-direction:row;height:100%;width:100%;border:1px solid var(--ug-border-color);background-color:var(--ug-bg-color);background-image:url(\"data:image/svg+xml;utf8,<svg viewBox='0 0 800 800' xmlns='http://www.w3.org/2000/svg'><g fill='rgba(0,0,0,0.02)'><path transform='translate(150,150) scale(1.6)' d='M-20 -30c0-10 40-10 40 0v60c0 10-40 10-40 0z M-20 -10c0 10 40 10 40 0 M-20 10c0 10 40 10 40 0'/><path transform='translate(600,250) scale(1.8)' d='M-40 10a30 30 0 0 1 50-10 40 40 0 0 1 30 60h-80a20 20 0 0 1 0-50z'/><g transform='translate(350,550) scale(1.7)'><circle cx='0' cy='-20' r='10'/><circle cx='-30' cy='10' r='8'/><circle cx='30' cy='10' r='8'/><path d='M0 -20l-30 30m30-30l30 30' stroke='rgba(0,0,0,0.02)' stroke-width='4'/></g><path transform='translate(700,700) scale(1.4)' d='M-20 -30c0-10 40-10 40 0v60c0 10-40 10-40 0z M-20 -10c0 10 40 10 40 0 M-20 10c0 10 40 10 40 0'/><path transform='translate(100,600) scale(1.5)' d='M-40 10a30 30 0 0 1 50-10 40 40 0 0 1 30 60h-80a20 20 0 0 1 0-50z'/><g transform='translate(450,100) scale(1.3)'><circle cx='0' cy='-20' r='10'/><circle cx='-30' cy='10' r='8'/><circle cx='30' cy='10' r='8'/><path d='M0 -20l-30 30m30-30l30 30' stroke='rgba(0,0,0,0.02)' stroke-width='4'/></g></g></svg>\"),radial-gradient(circle at 10% 20%,#fdf5f5 0%,transparent 60%),radial-gradient(circle at 80% 10%,#eefbf6 0%,transparent 60%),radial-gradient(circle at 50% 80%,#f9f5f0,#f1efe9);background-size:800px 800px,100% 100%,100% 100%,100% 100%;background-position:center;background-repeat:repeat,no-repeat,no-repeat,no-repeat;box-sizing:border-box;font-family:var(--ug-font-family);font-size:var(--ug-font-size);color:var(--ug-header-color);overflow:hidden;backdrop-filter:blur(8px)}.ug-main{display:flex;flex-direction:column;flex:1;min-width:0;overflow:hidden}.ug-body{flex:1;overflow:hidden;position:relative}.ug-viewport{height:100%;width:100%;overflow:auto}.ug-ssr-container{height:100%;width:100%;overflow:hidden}.ug-status-bar{display:flex;align-items:center;padding:0 16px;min-height:48px;border-top:1px solid var(--ug-border-color);font-weight:500;font-size:13px;color:var(--ug-header-color);background-color:var(--ug-footer-bg)}.ug-cc-overlay-container{position:fixed;z-index:1002}bways-grid.ag-theme-alpine-dark{--ug-border-color: #334155;--ug-bg-color: #1e293b;--ug-header-bg: #0f172a;--ug-header-color: #e2e8f0;--ug-header-hover-bg: #1e293b;--ug-row-bg: #1e293b;--ug-row-hover-bg: #334155;--ug-row-selected-bg: #0f172a;--ug-primary-color: #60a5fa;--ug-footer-bg: #0f172a;--ug-footer-color: #94a3b8;--ug-icon-color: #94a3b8}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: ScrollingModule }, { kind: "directive", type: i3$1.CdkFixedSizeVirtualScroll, selector: "cdk-virtual-scroll-viewport[itemSize]", inputs: ["itemSize", "minBufferPx", "maxBufferPx"] }, { kind: "directive", type: i3$1.CdkVirtualForOf, selector: "[cdkVirtualFor][cdkVirtualForOf]", inputs: ["cdkVirtualForOf", "cdkVirtualForTrackBy", "cdkVirtualForTemplate", "cdkVirtualForTemplateCacheSize"] }, { kind: "component", type: i3$1.CdkVirtualScrollViewport, selector: "cdk-virtual-scroll-viewport", inputs: ["orientation", "appendOnly"], outputs: ["scrolledIndexChange"] }, { kind: "component", type: HeaderComponent, selector: "ug-header", inputs: ["columns", "sortModel", "isAllSelected"], outputs: ["sortChanged", "columnsReordered", "columnResized", "headerCheckboxClicked", "menuClicked", "filterClicked"] }, { kind: "component", type: RowComponent, selector: "ug-row", inputs: ["columns", "row", "rowHeight", "isExpanded", "selectionVersion"], outputs: ["groupToggled"] }, { kind: "component", type: PaginationComponent, selector: "ug-pagination", inputs: ["totalCount", "pageSize", "currentPage"], outputs: ["pageChanged", "pageSizeChanged"] }, { kind: "component", type: HeaderMenuComponent, selector: "ug-header-menu", inputs: ["column", "isOpen", "position", "groupModel"], outputs: ["closeMenu", "sort", "pin", "autosize", "group", "chooseColumns"] }, { kind: "component", type: ChooseColumnsComponent, selector: "ug-choose-columns", inputs: ["columns"], outputs: ["columnsChanged", "closePanel"] }, { kind: "component", type: HeaderFilterComponent, selector: "ug-header-filter", inputs: ["column", "isOpen", "position", "uniqueValues", "activeFilterSet"], outputs: ["closeFilter", "filterApplied"] }, { kind: "component", type: SideBarComponent, selector: "ug-side-bar", inputs: ["columns", "rowData", "activeFilters", "conditionFilters", "groupModel", "valuesModel", "pivotMode", "pivotColumns", "savedReportNames", "activeTab"], outputs: ["columnsUpdated", "groupModelUpdated", "valuesModelUpdated", "pivotModeUpdated", "pivotModelUpdated", "exportExcelClicked", "filterApplied", "conditionFilterChanged", "clearAllFilters", "saveReportRequested", "
|
|
3802
|
+
`, isInline: true, styles: ["@charset \"UTF-8\";bways-grid{display:block;height:100%;width:100%;--ug-border-color: rgba(221, 226, 235, .4);--ug-bg-color: transparent;--ug-header-bg: rgba(255, 255, 255, .25);--ug-header-color: #3f332f;--ug-header-hover-bg: rgba(255, 255, 255, .4);--ug-row-bg: rgba(255, 255, 255, .15);--ug-row-hover-bg: rgba(216, 48, 24, .05);--ug-row-selected-bg: rgba(216, 48, 24, .15);--ug-primary-color: #d83018;--ug-panel-bg: #ffffff;--ug-footer-bg: rgba(255, 255, 255, .25);--ug-footer-color: #554440;--ug-icon-color: #7b6d69;--ug-font-family: -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Oxygen-Sans, Ubuntu, Cantarell, \"Helvetica Neue\", sans-serif;--ug-font-size: 13px;--ug-header-font-weight: 600}.ug-wrapper{display:flex;flex-direction:row;height:100%;width:100%;border:1px solid var(--ug-border-color);background-color:var(--ug-bg-color);background-image:url(\"data:image/svg+xml;utf8,<svg viewBox='0 0 800 800' xmlns='http://www.w3.org/2000/svg'><g fill='rgba(0,0,0,0.02)'><path transform='translate(150,150) scale(1.6)' d='M-20 -30c0-10 40-10 40 0v60c0 10-40 10-40 0z M-20 -10c0 10 40 10 40 0 M-20 10c0 10 40 10 40 0'/><path transform='translate(600,250) scale(1.8)' d='M-40 10a30 30 0 0 1 50-10 40 40 0 0 1 30 60h-80a20 20 0 0 1 0-50z'/><g transform='translate(350,550) scale(1.7)'><circle cx='0' cy='-20' r='10'/><circle cx='-30' cy='10' r='8'/><circle cx='30' cy='10' r='8'/><path d='M0 -20l-30 30m30-30l30 30' stroke='rgba(0,0,0,0.02)' stroke-width='4'/></g><path transform='translate(700,700) scale(1.4)' d='M-20 -30c0-10 40-10 40 0v60c0 10-40 10-40 0z M-20 -10c0 10 40 10 40 0 M-20 10c0 10 40 10 40 0'/><path transform='translate(100,600) scale(1.5)' d='M-40 10a30 30 0 0 1 50-10 40 40 0 0 1 30 60h-80a20 20 0 0 1 0-50z'/><g transform='translate(450,100) scale(1.3)'><circle cx='0' cy='-20' r='10'/><circle cx='-30' cy='10' r='8'/><circle cx='30' cy='10' r='8'/><path d='M0 -20l-30 30m30-30l30 30' stroke='rgba(0,0,0,0.02)' stroke-width='4'/></g></g></svg>\"),radial-gradient(circle at 10% 20%,#fdf5f5 0%,transparent 60%),radial-gradient(circle at 80% 10%,#eefbf6 0%,transparent 60%),radial-gradient(circle at 50% 80%,#f9f5f0,#f1efe9);background-size:800px 800px,100% 100%,100% 100%,100% 100%;background-position:center;background-repeat:repeat,no-repeat,no-repeat,no-repeat;box-sizing:border-box;font-family:var(--ug-font-family);font-size:var(--ug-font-size);color:var(--ug-header-color);overflow:hidden;backdrop-filter:blur(8px)}.ug-main{display:flex;flex-direction:column;flex:1;min-width:0;overflow:hidden}.ug-body{flex:1;overflow:hidden;position:relative}.ug-viewport{height:100%;width:100%;overflow:auto}.ug-ssr-container{height:100%;width:100%;overflow:hidden}.ug-status-bar{display:flex;align-items:center;padding:0 16px;min-height:48px;border-top:1px solid var(--ug-border-color);font-weight:500;font-size:13px;color:var(--ug-header-color);background-color:var(--ug-footer-bg)}.ug-cc-overlay-container{position:fixed;z-index:1002}bways-grid.ag-theme-alpine-dark{--ug-border-color: #334155;--ug-bg-color: #1e293b;--ug-header-bg: #0f172a;--ug-header-color: #e2e8f0;--ug-header-hover-bg: #1e293b;--ug-row-bg: #1e293b;--ug-row-hover-bg: #334155;--ug-row-selected-bg: #0f172a;--ug-primary-color: #60a5fa;--ug-footer-bg: #0f172a;--ug-footer-color: #94a3b8;--ug-icon-color: #94a3b8}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: ScrollingModule }, { kind: "directive", type: i3$1.CdkFixedSizeVirtualScroll, selector: "cdk-virtual-scroll-viewport[itemSize]", inputs: ["itemSize", "minBufferPx", "maxBufferPx"] }, { kind: "directive", type: i3$1.CdkVirtualForOf, selector: "[cdkVirtualFor][cdkVirtualForOf]", inputs: ["cdkVirtualForOf", "cdkVirtualForTrackBy", "cdkVirtualForTemplate", "cdkVirtualForTemplateCacheSize"] }, { kind: "component", type: i3$1.CdkVirtualScrollViewport, selector: "cdk-virtual-scroll-viewport", inputs: ["orientation", "appendOnly"], outputs: ["scrolledIndexChange"] }, { kind: "component", type: HeaderComponent, selector: "ug-header", inputs: ["columns", "sortModel", "isAllSelected"], outputs: ["sortChanged", "columnsReordered", "columnResized", "headerCheckboxClicked", "menuClicked", "filterClicked"] }, { kind: "component", type: RowComponent, selector: "ug-row", inputs: ["columns", "row", "rowHeight", "isExpanded", "selectionVersion"], outputs: ["groupToggled"] }, { kind: "component", type: PaginationComponent, selector: "ug-pagination", inputs: ["totalCount", "pageSize", "currentPage"], outputs: ["pageChanged", "pageSizeChanged"] }, { kind: "component", type: HeaderMenuComponent, selector: "ug-header-menu", inputs: ["column", "isOpen", "position", "groupModel"], outputs: ["closeMenu", "sort", "pin", "autosize", "group", "chooseColumns"] }, { kind: "component", type: ChooseColumnsComponent, selector: "ug-choose-columns", inputs: ["columns"], outputs: ["columnsChanged", "closePanel"] }, { kind: "component", type: HeaderFilterComponent, selector: "ug-header-filter", inputs: ["column", "isOpen", "position", "uniqueValues", "activeFilterSet"], outputs: ["closeFilter", "filterApplied"] }, { kind: "component", type: SideBarComponent, selector: "ug-side-bar", inputs: ["columns", "rowData", "activeFilters", "conditionFilters", "groupModel", "valuesModel", "pivotMode", "pivotColumns", "savedReportNames", "activeTab"], outputs: ["columnsUpdated", "groupModelUpdated", "valuesModelUpdated", "pivotModeUpdated", "pivotModelUpdated", "exportExcelClicked", "filterApplied", "conditionFilterChanged", "clearAllFilters", "saveReportRequested", "importReportRequested"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
3811
3803
|
}
|
|
3812
3804
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: UltraGridComponent, decorators: [{
|
|
3813
3805
|
type: Component,
|
|
@@ -3889,8 +3881,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
|
|
|
3889
3881
|
</div>
|
|
3890
3882
|
|
|
3891
3883
|
<ug-side-bar
|
|
3892
|
-
*ngIf="config.sideBar"
|
|
3893
|
-
[activeTab]="config.sideBarDefaultTab || null"
|
|
3884
|
+
*ngIf="config.sideBar"
|
|
3894
3885
|
[columns]="columns"
|
|
3895
3886
|
[rowData]="rowData"
|
|
3896
3887
|
[activeFilters]="activeFilters"
|
|
@@ -3899,7 +3890,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
|
|
|
3899
3890
|
[valuesModel]="valuesModel"
|
|
3900
3891
|
[pivotMode]="!!config.pivotMode"
|
|
3901
3892
|
[pivotColumns]="pivotColumns"
|
|
3902
|
-
[savedReportNames]="savedReportNames"
|
|
3903
3893
|
(columnsUpdated)="onSideBarColumnsUpdated($event)"
|
|
3904
3894
|
(groupModelUpdated)="onSideBarGroupModelUpdated($event)"
|
|
3905
3895
|
(valuesModelUpdated)="onValuesModelUpdated($event)"
|
|
@@ -3910,7 +3900,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
|
|
|
3910
3900
|
(conditionFilterChanged)="onConditionFilterChanged($event)"
|
|
3911
3901
|
(clearAllFilters)="onClearAllFilters()"
|
|
3912
3902
|
(saveReportRequested)="handleSaveReport($event)"
|
|
3913
|
-
(
|
|
3903
|
+
(importReportRequested)="handleImportReport($event)">
|
|
3914
3904
|
</ug-side-bar>
|
|
3915
3905
|
|
|
3916
3906
|
</div>
|
|
@@ -3974,12 +3964,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
|
|
|
3974
3964
|
type: Output
|
|
3975
3965
|
}], selectionChanged: [{
|
|
3976
3966
|
type: Output
|
|
3967
|
+
}], reportSaved: [{
|
|
3968
|
+
type: Output
|
|
3977
3969
|
}], groupModel: [{
|
|
3978
3970
|
type: Input
|
|
3979
3971
|
}], valuesModel: [{
|
|
3980
3972
|
type: Input
|
|
3981
3973
|
}], pivotColumns: [{
|
|
3982
3974
|
type: Input
|
|
3975
|
+
}], activeFilters: [{
|
|
3976
|
+
type: Input
|
|
3977
|
+
}], conditionFilters: [{
|
|
3978
|
+
type: Input
|
|
3979
|
+
}], filterModel: [{
|
|
3980
|
+
type: Input
|
|
3983
3981
|
}] } });
|
|
3984
3982
|
|
|
3985
3983
|
const COMPONENTS = [
|