@memberjunction/ng-entity-viewer 5.48.0 → 5.50.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/dist/lib/entity-data-grid/entity-data-grid.component.d.ts +23 -6
- package/dist/lib/entity-data-grid/entity-data-grid.component.d.ts.map +1 -1
- package/dist/lib/entity-data-grid/entity-data-grid.component.js +142 -55
- package/dist/lib/entity-data-grid/entity-data-grid.component.js.map +1 -1
- package/dist/lib/entity-viewer/entity-viewer.component.d.ts +29 -0
- package/dist/lib/entity-viewer/entity-viewer.component.d.ts.map +1 -1
- package/dist/lib/entity-viewer/entity-viewer.component.js +90 -1
- package/dist/lib/entity-viewer/entity-viewer.component.js.map +1 -1
- package/dist/lib/view-selector/view-selector.component.js +2 -2
- package/dist/lib/view-selector/view-selector.component.js.map +1 -1
- package/dist/lib/view-types/descriptors/grid-view-type.d.ts +6 -0
- package/dist/lib/view-types/descriptors/grid-view-type.d.ts.map +1 -1
- package/dist/lib/view-types/descriptors/grid-view-type.js +6 -0
- package/dist/lib/view-types/descriptors/grid-view-type.js.map +1 -1
- package/dist/lib/view-types/renderers/grid-view-renderer.component.d.ts +6 -1
- package/dist/lib/view-types/renderers/grid-view-renderer.component.d.ts.map +1 -1
- package/dist/lib/view-types/renderers/grid-view-renderer.component.js +11 -3
- package/dist/lib/view-types/renderers/grid-view-renderer.component.js.map +1 -1
- package/dist/lib/view-types/view-type.contracts.d.ts +15 -0
- package/dist/lib/view-types/view-type.contracts.d.ts.map +1 -1
- package/dist/lib/view-types/view-type.contracts.js +6 -0
- package/dist/lib/view-types/view-type.contracts.js.map +1 -1
- package/dist/lib/view-workspace/view-workspace.component.d.ts +19 -0
- package/dist/lib/view-workspace/view-workspace.component.d.ts.map +1 -1
- package/dist/lib/view-workspace/view-workspace.component.js +100 -24
- package/dist/lib/view-workspace/view-workspace.component.js.map +1 -1
- package/package.json +19 -18
|
@@ -113,6 +113,14 @@ export declare class EntityViewerComponent extends BaseAngularComponent implemen
|
|
|
113
113
|
* queries on very large entities. Generic — not tied to any specific view type.
|
|
114
114
|
*/
|
|
115
115
|
private static readonly LOAD_ALL_MAX_RECORDS;
|
|
116
|
+
/**
|
|
117
|
+
* Safety cap for the EXPORT / add-all-to-list path (distinct from the in-memory render cap above).
|
|
118
|
+
* Exports must cover the full result set, so this is deliberately large; it exists only to prevent
|
|
119
|
+
* a runaway browser (out-of-memory) on a pathologically large entity. When the true result count
|
|
120
|
+
* exceeds this, the user is warned that the export/add was capped rather than silently truncated.
|
|
121
|
+
* Kept in lockstep with the query-viewer's equivalent so Export behaves the same everywhere.
|
|
122
|
+
*/
|
|
123
|
+
private static readonly EXPORT_MAX_RECORDS;
|
|
116
124
|
private _entity;
|
|
117
125
|
private _records;
|
|
118
126
|
private _config;
|
|
@@ -460,6 +468,15 @@ export declare class EntityViewerComponent extends BaseAngularComponent implemen
|
|
|
460
468
|
private resetPaginationState;
|
|
461
469
|
private _loadSequence;
|
|
462
470
|
private _pendingReload;
|
|
471
|
+
/**
|
|
472
|
+
* Fetches the FULL result set for the current entity/view (up to {@link EXPORT_MAX_RECORDS}),
|
|
473
|
+
* honoring the active sort, business filter (WhereClause) and user search — used by the grid's
|
|
474
|
+
* export and add-all-to-list flows so they aren't capped at the on-screen page (bugs C1/E3). Bound
|
|
475
|
+
* as an arrow property so it can be pushed to a dynamically-mounted renderer's `exportDataProvider`
|
|
476
|
+
* input without losing `this`. If the true result count exceeds the cap, the user is warned that
|
|
477
|
+
* the set was capped (rather than silently truncated). Returns the currently-loaded page on failure.
|
|
478
|
+
*/
|
|
479
|
+
FetchAllRowsForExport: () => Promise<Record<string, unknown>[]>;
|
|
463
480
|
/**
|
|
464
481
|
* Load data for the current entity with server-side filtering/sorting/pagination
|
|
465
482
|
*/
|
|
@@ -521,6 +538,18 @@ export declare class EntityViewerComponent extends BaseAngularComponent implemen
|
|
|
521
538
|
* the file itself; this is the no-UI entry point for an external driver (the AI agent).
|
|
522
539
|
*/
|
|
523
540
|
ExportRecords(format?: 'csv' | 'excel' | 'json'): Promise<boolean>;
|
|
541
|
+
/**
|
|
542
|
+
* Whether the ACTIVE view type provides its own export UI. Today only the Grid does (it has an
|
|
543
|
+
* in-toolbar Export button); Cards, Map and Timeline do not. Hosts use this to decide whether to
|
|
544
|
+
* render a FALLBACK export affordance for the view types that lack one — so those keep export,
|
|
545
|
+
* without a duplicate button on the grid.
|
|
546
|
+
*
|
|
547
|
+
* This reads the view type's DESCRIPTOR ({@link IViewTypeDescriptor.ProvidesOwnExport}), which is
|
|
548
|
+
* resolved synchronously the moment the active view type changes — NOT the mounted renderer
|
|
549
|
+
* instance, which lags a change-detection tick behind (reading the instance made the flag stale on
|
|
550
|
+
* the grid, so the fallback button wrongly appeared there).
|
|
551
|
+
*/
|
|
552
|
+
get ActiveViewTypeHasOwnExport(): boolean;
|
|
524
553
|
/**
|
|
525
554
|
* Loads the ViewTypeEngine once, then recomputes the available view types for the
|
|
526
555
|
* current entity. Fire-and-forget from lifecycle/setters — failures simply leave the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entity-viewer.component.d.ts","sourceRoot":"","sources":["../../../src/lib/entity-viewer/entity-viewer.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,YAAY,EAAE,MAAM,EAAE,SAAS,EAAE,aAAa,EAAE,iBAAiB,EAAE,UAAU,EAAa,MAAM,EAAwD,MAAM,eAAe,CAAC;AACjN,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAGrE,OAAO,EAAE,UAAU,EAAsC,MAAM,sBAAsB,CAAC;AAEtF,OAAO,EAAE,wBAAwB,EAAkB,MAAM,+BAA+B,CAAC;AAEzF,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"entity-viewer.component.d.ts","sourceRoot":"","sources":["../../../src/lib/entity-viewer/entity-viewer.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4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E;IACvE,OAAO,CAAC,qBAAqB;IAK7B,sGAAsG;IACtG,OAAO,CAAC,sBAAsB;IAY9B,mFAAmF;IACnF,OAAO,CAAC,wBAAwB;IAIhC;;;;;;OAMG;IACH,OAAO,CAAC,wBAAwB;IAUhC;;;OAGG;YACW,YAAY;IAc1B,+EAA+E;IAC/E,OAAO,CAAC,sBAAsB;IAgB9B;;;;;OAKG;IACH,OAAO,CAAC,0BAA0B;IAiBlC;;;;OAIG;IACH,OAAO,CAAC,qBAAqB;IAuB7B;;;;OAIG;IACH,OAAO,CAAC,qBAAqB;IAuC7B;;;;;;;OAOG;IACH,OAAO,CAAC,kBAAkB;IAU1B;;;;OAIG;IACH,OAAO,CAAC,yBAAyB;IAUjC;;;;OAIG;IACH,OAAO,CAAC,yBAAyB;IA0BjC;;;;;;OAMG;IACH,OAAO,CAAC,uBAAuB;IAS/B;;;;;;;OAOG;IACH,OAAO,CAAC,yBAAyB;IAajC;;;;OAIG;IACH,OAAO,CAAC,mBAAmB;IAK3B;;;;;OAKG;IACH,OAAO,CAAC,iCAAiC;IAUzC;;;;;OAKG;YACW,yBAAyB;IASvC;;;;;OAKG;IACH,OAAO,CAAC,eAAe;IAMvB,OAAO,CAAC,uBAAuB;IAQ/B,OAAO,CAAC,qBAAqB;IAQ7B,OAAO,CAAC,sBAAsB;IAkC9B;;;;OAIG;IACH,OAAO,CAAC,oBAAoB;IAgD5B;;OAEG;IACH,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAKnC;;OAEG;IACH,WAAW,IAAI,IAAI;yCAriER,qBAAqB;2CAArB,qBAAqB;CA0iEjC"}
|
|
@@ -6,6 +6,7 @@ import { RunView, LogError } from '@memberjunction/core';
|
|
|
6
6
|
import { UUIDsEqual } from '@memberjunction/global';
|
|
7
7
|
import { UserInfoEngine } from '@memberjunction/core-entities';
|
|
8
8
|
import { buildCompositeKey, buildPkString } from '../utils/record.util';
|
|
9
|
+
import { MJNotificationService } from '@memberjunction/ng-notifications';
|
|
9
10
|
import { DEFAULT_VIEWER_CONFIG } from '../types';
|
|
10
11
|
import { ViewTypeEngine } from '../view-types';
|
|
11
12
|
import * as i0 from "@angular/core";
|
|
@@ -153,6 +154,14 @@ export class EntityViewerComponent extends BaseAngularComponent {
|
|
|
153
154
|
* queries on very large entities. Generic — not tied to any specific view type.
|
|
154
155
|
*/
|
|
155
156
|
static LOAD_ALL_MAX_RECORDS = 10000;
|
|
157
|
+
/**
|
|
158
|
+
* Safety cap for the EXPORT / add-all-to-list path (distinct from the in-memory render cap above).
|
|
159
|
+
* Exports must cover the full result set, so this is deliberately large; it exists only to prevent
|
|
160
|
+
* a runaway browser (out-of-memory) on a pathologically large entity. When the true result count
|
|
161
|
+
* exceeds this, the user is warned that the export/add was capped rather than silently truncated.
|
|
162
|
+
* Kept in lockstep with the query-viewer's equivalent so Export behaves the same everywhere.
|
|
163
|
+
*/
|
|
164
|
+
static EXPORT_MAX_RECORDS = 100000;
|
|
156
165
|
// ========================================
|
|
157
166
|
// INPUTS (using getter/setter pattern)
|
|
158
167
|
// ========================================
|
|
@@ -1049,6 +1058,64 @@ export class EntityViewerComponent extends BaseAngularComponent {
|
|
|
1049
1058
|
_loadSequence = 0;
|
|
1050
1059
|
// Flag: a reload was requested while a load was already in progress
|
|
1051
1060
|
_pendingReload = false;
|
|
1061
|
+
/**
|
|
1062
|
+
* Fetches the FULL result set for the current entity/view (up to {@link EXPORT_MAX_RECORDS}),
|
|
1063
|
+
* honoring the active sort, business filter (WhereClause) and user search — used by the grid's
|
|
1064
|
+
* export and add-all-to-list flows so they aren't capped at the on-screen page (bugs C1/E3). Bound
|
|
1065
|
+
* as an arrow property so it can be pushed to a dynamically-mounted renderer's `exportDataProvider`
|
|
1066
|
+
* input without losing `this`. If the true result count exceeds the cap, the user is warned that
|
|
1067
|
+
* the set was capped (rather than silently truncated). Returns the currently-loaded page on failure.
|
|
1068
|
+
*/
|
|
1069
|
+
FetchAllRowsForExport = async () => {
|
|
1070
|
+
const entity = this.EffectiveEntity;
|
|
1071
|
+
if (!entity) {
|
|
1072
|
+
return this.InternalRecords;
|
|
1073
|
+
}
|
|
1074
|
+
try {
|
|
1075
|
+
const rv = RunView.FromMetadataProvider(this.ProviderToUse);
|
|
1076
|
+
const config = this.EffectiveConfig;
|
|
1077
|
+
// Mirror the OrderBy resolution used by LoadData so the export matches the on-screen ordering.
|
|
1078
|
+
let orderBy;
|
|
1079
|
+
const sortState = this.EffectiveSortState;
|
|
1080
|
+
if (config.serverSideSorting && sortState?.field && sortState.direction) {
|
|
1081
|
+
orderBy = `${sortState.field} ${sortState.direction.toUpperCase()}`;
|
|
1082
|
+
}
|
|
1083
|
+
else if (this.ViewEntity?.OrderByClause) {
|
|
1084
|
+
orderBy = this.ViewEntity.OrderByClause;
|
|
1085
|
+
}
|
|
1086
|
+
else if (this.GridState?.sortSettings?.length) {
|
|
1087
|
+
orderBy = this.GridState.sortSettings
|
|
1088
|
+
.map(s => `${s.field} ${(s.dir || 'asc').toUpperCase()}`)
|
|
1089
|
+
.join(', ');
|
|
1090
|
+
}
|
|
1091
|
+
const result = await rv.RunView({
|
|
1092
|
+
EntityName: entity.Name,
|
|
1093
|
+
ResultType: 'simple',
|
|
1094
|
+
// No page window — load every matching row up to the safety cap, honoring the same
|
|
1095
|
+
// business filter + user search as the paged load path.
|
|
1096
|
+
MaxRows: EntityViewerComponent.EXPORT_MAX_RECORDS,
|
|
1097
|
+
StartRow: 0,
|
|
1098
|
+
OrderBy: orderBy,
|
|
1099
|
+
ExtraFilter: this.ViewEntity?.WhereClause || undefined,
|
|
1100
|
+
UserSearchString: config.serverSideFiltering && !this.ViewEntity?.SmartFilterEnabled
|
|
1101
|
+
? this.DebouncedFilterText || undefined
|
|
1102
|
+
: undefined
|
|
1103
|
+
});
|
|
1104
|
+
if (result.Success) {
|
|
1105
|
+
// Non-silent cap: if the entity has more matching rows than we're allowed to pull at once,
|
|
1106
|
+
// tell the user the operation covered the first N — don't let it look like the full set.
|
|
1107
|
+
if (result.TotalRowCount > EntityViewerComponent.EXPORT_MAX_RECORDS) {
|
|
1108
|
+
MJNotificationService.Instance.CreateSimpleNotification(`This operation is limited to the first ${EntityViewerComponent.EXPORT_MAX_RECORDS.toLocaleString()} of ` +
|
|
1109
|
+
`${result.TotalRowCount.toLocaleString()} matching records. Narrow the view with a filter to include the rest.`, 'warning', 6000);
|
|
1110
|
+
}
|
|
1111
|
+
return result.Results;
|
|
1112
|
+
}
|
|
1113
|
+
}
|
|
1114
|
+
catch {
|
|
1115
|
+
// Fall through to the loaded page.
|
|
1116
|
+
}
|
|
1117
|
+
return this.InternalRecords;
|
|
1118
|
+
};
|
|
1052
1119
|
/**
|
|
1053
1120
|
* Load data for the current entity with server-side filtering/sorting/pagination
|
|
1054
1121
|
*/
|
|
@@ -1309,6 +1376,27 @@ export class EntityViewerComponent extends BaseAngularComponent {
|
|
|
1309
1376
|
}
|
|
1310
1377
|
return renderer.exportRecords(format);
|
|
1311
1378
|
}
|
|
1379
|
+
/**
|
|
1380
|
+
* Whether the ACTIVE view type provides its own export UI. Today only the Grid does (it has an
|
|
1381
|
+
* in-toolbar Export button); Cards, Map and Timeline do not. Hosts use this to decide whether to
|
|
1382
|
+
* render a FALLBACK export affordance for the view types that lack one — so those keep export,
|
|
1383
|
+
* without a duplicate button on the grid.
|
|
1384
|
+
*
|
|
1385
|
+
* This reads the view type's DESCRIPTOR ({@link IViewTypeDescriptor.ProvidesOwnExport}), which is
|
|
1386
|
+
* resolved synchronously the moment the active view type changes — NOT the mounted renderer
|
|
1387
|
+
* instance, which lags a change-detection tick behind (reading the instance made the flag stale on
|
|
1388
|
+
* the grid, so the fallback button wrongly appeared there).
|
|
1389
|
+
*/
|
|
1390
|
+
get ActiveViewTypeHasOwnExport() {
|
|
1391
|
+
const opt = this.ActiveDynamicOption;
|
|
1392
|
+
if (!opt) {
|
|
1393
|
+
return false;
|
|
1394
|
+
}
|
|
1395
|
+
// Primary signal: the descriptor's declarative capability flag. Belt-and-suspenders: also match
|
|
1396
|
+
// the grid's stable DriverClass key, in case a descriptor was resolved via the hardcoded fallback
|
|
1397
|
+
// path (un-seeded MJ: View Types) as a shape that didn't carry the flag.
|
|
1398
|
+
return opt.descriptor?.ProvidesOwnExport === true || opt.key === 'GridViewType';
|
|
1399
|
+
}
|
|
1312
1400
|
// ========================================
|
|
1313
1401
|
// VIEW MODE
|
|
1314
1402
|
// ========================================
|
|
@@ -1726,6 +1814,7 @@ export class EntityViewerComponent extends BaseAngularComponent {
|
|
|
1726
1814
|
this.setDynamicInput(ref, 'provider', this.ProviderToUse);
|
|
1727
1815
|
this.setDynamicInput(ref, 'Provider', this.Provider);
|
|
1728
1816
|
this.setDynamicInput(ref, 'records', this.FilteredRecords);
|
|
1817
|
+
this.setDynamicInput(ref, 'exportDataProvider', this.FetchAllRowsForExport);
|
|
1729
1818
|
this.setDynamicInput(ref, 'selectedRecordId', this.SelectedRecordID);
|
|
1730
1819
|
this.setDynamicInput(ref, 'filterText', this.DebouncedFilterText);
|
|
1731
1820
|
this.setDynamicInput(ref, 'config', this.effectiveRendererConfig(option));
|
|
@@ -2034,5 +2123,5 @@ export class EntityViewerComponent extends BaseAngularComponent {
|
|
|
2034
2123
|
type: ViewChild,
|
|
2035
2124
|
args: ['dynamicViewHost', { read: ViewContainerRef }]
|
|
2036
2125
|
}] }); })();
|
|
2037
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(EntityViewerComponent, { className: "EntityViewerComponent", filePath: "src/lib/entity-viewer/entity-viewer.component.ts", lineNumber:
|
|
2126
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(EntityViewerComponent, { className: "EntityViewerComponent", filePath: "src/lib/entity-viewer/entity-viewer.component.ts", lineNumber: 135 }); })();
|
|
2038
2127
|
//# sourceMappingURL=entity-viewer.component.js.map
|