@memberjunction/ng-entity-viewer 6.1.3 → 6.1.4

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.
@@ -1,5 +1,6 @@
1
1
  import { EventEmitter } from '@angular/core';
2
2
  import { EntityInfo, RunViewParams } from '@memberjunction/core';
3
+ import { ExportColumn } from '@memberjunction/export-engine';
3
4
  import { BaseAngularComponent } from '@memberjunction/ng-base-types';
4
5
  import { PageChangeEvent } from '@memberjunction/ng-pagination';
5
6
  import { ListManagementDialogConfig, ListManagementResult } from '@memberjunction/ng-list-management';
@@ -170,6 +171,8 @@ export declare class GridViewRendererComponent extends BaseAngularComponent impl
170
171
  * @returns true when the export succeeded, false when the grid isn't ready or the export failed.
171
172
  */
172
173
  exportRecords(format?: 'csv' | 'excel' | 'json'): Promise<boolean>;
174
+ /** The hosted grid's on-screen columns ({@link IViewRenderer.GetExportColumns}); empty before it mounts. */
175
+ GetExportColumns(): ExportColumn[];
173
176
  /** Whether the add-to-list dialog is visible. Toggled internally by {@link onAddToListRequested}. */
174
177
  protected showListManagementDialog: boolean;
175
178
  /** Config fed into `<mj-list-management-dialog>`. Built from the entity + selected records. */
@@ -1 +1 @@
1
- {"version":3,"file":"grid-view-renderer.component.d.ts","sourceRoot":"","sources":["../../../../src/lib/view-types/renderers/grid-view-renderer.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,YAAY,EAA2D,MAAM,eAAe,CAAC;AAChI,OAAO,EAAE,UAAU,EAAE,aAAa,EAA0B,MAAM,sBAAsB,CAAC;AAEzF,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,0BAA0B,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AACtG,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,2BAA2B,EAAE,MAAM,wBAAwB,CAAC;AACrG,OAAO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;IACH,OAAO,CAAC,iBAAiB;IAazB;;;OAGG;IACH,mBAAmB,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG,IAAI;IAW7D;;;;;OAKG;IACG,iBAAiB,IAAI,OAAO,CAAC,IAAI,CAAC;IAqCxC,kFAAkF;IAClF,iBAAiB,IAAI,IAAI;IAUzB,mGAAmG;IACnG,OAAO,CAAC,sBAAsB;IAY9B;;;OAGG;IACH,OAAO,CAAC,qBAAqB;yCAjclB,yBAAyB;2CAAzB,yBAAyB;CAwcrC;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,IAAI,IAAI,CAE3C"}
1
+ {"version":3,"file":"grid-view-renderer.component.d.ts","sourceRoot":"","sources":["../../../../src/lib/view-types/renderers/grid-view-renderer.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,YAAY,EAA2D,MAAM,eAAe,CAAC;AAChI,OAAO,EAAE,UAAU,EAAE,aAAa,EAA0B,MAAM,sBAAsB,CAAC;AACzF,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAE7D,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,0BAA0B,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AACtG,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,2BAA2B,EAAE,MAAM,wBAAwB,CAAC;AACrG,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;AACtH,OAAO,EAAE,sBAAsB,EAAE,4BAA4B,EAAE,kBAAkB,EAAE,MAAM,2CAA2C,CAAC;AACrI,OAAO,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAEpD,OAAO,EAAE,uBAAuB,EAAE,MAA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AmG;IACnG,OAAO,CAAC,sBAAsB;IAY9B;;;OAGG;IACH,OAAO,CAAC,qBAAqB;yCAtclB,yBAAyB;2CAAzB,yBAAyB;CA6crC;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,IAAI,IAAI,CAE3C"}
@@ -153,6 +153,10 @@ export class GridViewRendererComponent extends BaseAngularComponent {
153
153
  const result = await this.grid.Export(format ? { format } : undefined, true);
154
154
  return !!result?.success;
155
155
  }
156
+ /** The hosted grid's on-screen columns ({@link IViewRenderer.GetExportColumns}); empty before it mounts. */
157
+ GetExportColumns() {
158
+ return this.grid?.GetExportColumns() ?? [];
159
+ }
156
160
  // ================================================================
157
161
  // Self-contained dialog state (never surfaced to the host)
158
162
  // ================================================================
@@ -593,7 +597,7 @@ export class GridViewRendererComponent extends BaseAngularComponent {
593
597
  type: ViewChild,
594
598
  args: ['grid']
595
599
  }] }); })();
596
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(GridViewRendererComponent, { className: "GridViewRendererComponent", filePath: "src/lib/view-types/renderers/grid-view-renderer.component.ts", lineNumber: 186 }); })();
600
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(GridViewRendererComponent, { className: "GridViewRendererComponent", filePath: "src/lib/view-types/renderers/grid-view-renderer.component.ts", lineNumber: 187 }); })();
597
601
  /**
598
602
  * Tree-shaking guard. Force-references this renderer so bundlers (ESBuild/Vite) don't drop the
599
603
  * component in builds that only mount it dynamically via the ClassFactory/descriptor. Mirrors the
@@ -1 +1 @@
1
- {"version":3,"file":"grid-view-renderer.component.js","sourceRoot":"","sources":["../../../../src/lib/view-types/renderers/grid-view-renderer.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,iBAAiB,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAChI,OAAO,EAA6B,QAA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wHAC3B,sBAAkB,IAAC,gIACf,0BAAsB,IAAC,oIACxB,+BAA2B,IAAC,sIAC3B,gCAA4B,IAAC,gIAChC,6BAAyB,IAAC,sHAC/B,wBAAoB,IAAC,wIACT,6BAAyB,IAAC;YAEtD,iBAAsB;YAOtB,iHAA4B;YAY5B,+CAUC;YADC,AADA,4HAAa,uBAAmB,IAAC,+GACpB,uBAAmB,IAAC;YAEnC,iBAAuB;;YA5CrB,AADA,AADA,AADA,AADA,AADA,AADA,AADA,AADA,AADA,AADA,AADA,AADA,AADA,AADA,AADA,AADA,AADA,uCAAqB,qBACL,8CACyB,+BACf,oCACK,2CACO,kBACrB,oBACE,oDAC4B,yCACX,uCACF,0EACU,6CACJ,yDACY,qCACpB,mCACF,4CACS,kCACV;YAqB/B,eASC;YATD,mDASC;YAIC,cAA4B;YAE5B,AAFA,8CAA4B,qCAEI;;;iFAmBzB,yBAAyB;cA/ErC,SAAS;6BACI,KAAK,YACP,uBAAuB,iBAClB,iBAAiB,CAAC,IAAI,YAC3B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiET;;kBAiBA,KAAK;;kBAGL,KAAK;;kBAML,KAAK;;kBAGL,KAAK;;kBAGL,KAAK;;kBAGL,KAAK;;kBAOL,KAAK;;kBAKL,KAAK;;kBAGL,KAAK;;kBAGL,KAAK;;kBAGL,KAAK;;kBAKL,MAAM;;kBAGN,MAAM;;kBAGN,MAAM;;kBAGN,MAAM;;kBAQN,MAAM;;kBAMN,MAAM;;kBAGN,MAAM;;kBAMN,SAAS;mBAAC,MAAM;;kFAnFN,yBAAyB;AA0ctC;;;;GAIG;AACH,MAAM,UAAU,oBAAoB;IAClC,0DAA0D;AAC5D,CAAC","sourcesContent":["import { Component, Input, Output, EventEmitter, ViewEncapsulation, ViewChild, ChangeDetectorRef, inject } from '@angular/core';\nimport { EntityInfo, RunViewParams, LogError, CompositeKey } from '@memberjunction/core';\nimport { UUIDsEqual } from '@memberjunction/global';\nimport { BaseAngularComponent } from '@memberjunction/ng-base-types';\nimport { PageChangeEvent } from '@memberjunction/ng-pagination';\nimport { ListManagementDialogConfig, ListManagementResult } from '@memberjunction/ng-list-management';\nimport { IViewRenderer, ViewDataRequest, ViewRelatedRecordNavigation } from '../view-type.contracts';\nimport { ViewGridState } from '../../types';\nimport { GridSelectionMode, GridToolbarConfig, ForeignKeyClickEvent } from '../../entity-data-grid/models/grid-types';\nimport { AfterRowClickEventArgs, AfterRowDoubleClickEventArgs, AfterSortEventArgs } from '../../entity-data-grid/events/grid-events';\nimport { GridStateChangedEvent } from '../../types';\nimport { buildPkString, buildCompositeKey } from '../../utils/record.util';\nimport { EntityDataGridComponent } from '../../entity-data-grid/entity-data-grid.component';\n\n/**\n * Opaque per-view configuration for the Grid view type.\n * -----------------------------------------------------\n * This is the blob the host persists verbatim against the active `ViewTypeID` and never\n * inspects (see {@link IViewRenderer.configChanged}). The renderer seeds the\n * `<mj-entity-data-grid>` bindings from these fields, applying sensible defaults when a\n * field is absent (see {@link GridViewRendererComponent}). It is intentionally a plain,\n * fully-serializable shape — every field is optional so an empty `{}` is a valid config.\n */\nexport interface GridViewConfig {\n /**\n * Persisted grid state (columns/widths/order/sort) from a User View. Mutated in place when\n * the grid emits sort or generic grid-state changes, then surfaced via `configChanged` so the\n * host persists it. Fed straight into `[GridState]`.\n */\n gridState?: ViewGridState;\n /** Whether the grid's own toolbar is shown. Defaults to `true` when absent. */\n showToolbar?: boolean;\n /** The grid toolbar configuration. Fed into `[ToolbarConfig]`. */\n toolbarConfig?: GridToolbarConfig;\n /** Row selection mode. Defaults to `'checkbox'` when absent. */\n selectionMode?: GridSelectionMode;\n /** Whether the \"Add to List\" button is shown. Defaults to `true` when absent. */\n showAddToListButton?: boolean;\n /** Whether the pager is shown. Defaults to `true` when absent. */\n showPager?: boolean;\n /** Page size for the grid's pager. Falls back to the `pageSize` input when absent. */\n pageSize?: number;\n /**\n * Explicit RunViewParams for the grid's data source. When absent the renderer builds a minimal\n * dynamic-view params object from {@link entity}. Fed into `[Params]`.\n */\n params?: RunViewParams;\n}\n\n/**\n * GridViewRendererComponent\n * -------------------------\n * The Grid **view type** renderer — a fully self-contained {@link IViewRenderer} adapter that hosts\n * the existing {@link EntityDataGridComponent} (`<mj-entity-data-grid>`) inside the entity-viewer's\n * pluggable view-type system. It is the dynamic-mounted plug-in that the `GridViewType` descriptor\n * points at.\n *\n * **Architectural intent — the container knows nothing about grids, and grid *features* never bubble\n * up.** The host (entity-viewer) binds only the generic {@link IViewRenderer} surface: the core\n * inputs (`entity` / `provider` / `records` / `selectedRecordId` / `filterText` / `config`), the\n * generic data-context inputs (`totalRecordCount` / `page` / `pageSize` / `isLoading`), and a small\n * set of generic outputs. There is **no opaque `hostAction` channel** — everything a grid does is\n * resolved through one of these three categories:\n *\n * 1. **Self-contained (owned end-to-end — never bubbles up):**\n * - **Export** → owned entirely by `<mj-entity-data-grid>` itself (its `onExportClick` opens its\n * OWN export dialog with format/sampling via `ExportService`). This wrapper does NOT host an\n * export dialog — doing so produced two stacked dialogs.\n * - **Add to List** → hosts `<mj-list-management-dialog>` ({@link ListManagementModule}). On\n * `(AddToListRequested)` the wrapper builds a {@link ListManagementDialogConfig} from the\n * entity + selected records and opens the dialog.\n * - **Delete** → hosts the Generic `<mj-ev-confirm-dialog>` (from {@link EntityViewerModule}).\n * On `(DeleteButtonClick)` the wrapper confirms, deletes via the MJ entity layer, then\n * re-requests data so the host reloads the current page.\n * - **Refresh** → on `(RefreshButtonClick)` the wrapper re-emits {@link dataRequest} so the host\n * reloads. No feature event leaves the wrapper.\n * - **Selection** → kept INTERNAL; it only drives the wrapper's own add-to-list. Never bubbles.\n *\n * 2. **Navigation (the ONLY legitimate upward signals — routing lives in the outer app):**\n * - Row double-click → {@link recordOpened}.\n * - Foreign-key cell click `(ForeignKeyClick)` → {@link openRelatedRecordRequested}.\n * - New button `(NewButtonClick)` → {@link createRecordRequested}.\n *\n * 3. **Container ↔ plug-in generic coordination (NOT outer-app signals):**\n * - Sort `(AfterSort)` → {@link dataRequest} (`sort`) + persisted into `config.gridState` via\n * {@link configChanged}.\n * - Pager `(PageChange)` → {@link dataRequest} (`page` / `pageSize`).\n * - Generic grid-state `(GridStateChanged)` → merged into `config.gridState` + {@link configChanged}.\n *\n * **Seeding the grid from `config` with defaults:** absent config fields fall back to sensible\n * defaults so a brand-new view (`config === {}`) renders a fully-functional grid — toolbar on,\n * checkbox selection, add-to-list on, pager on. The grid never loads its own data\n * (`[AllowLoad]=\"false\"`) — the host owns the fetch.\n *\n * This is an NgModule-declared (`standalone: false`) component, declared in `EntityViewerModule`.\n * It renders `<mj-entity-data-grid>` + the Generic `<mj-list-management-dialog>` / `<mj-ev-confirm-dialog>`\n * straight from the module's compilation scope (the module imports `ListManagementModule` and declares\n * the grid + confirm dialog; the grid component brings its own export dialog) — so there's\n * no `imports` array and, crucially, no self-import of `EntityViewerModule`: the module loads the\n * view-type descriptors, which reference these wrappers, so a wrapper importing the module back would\n * form a runtime import cycle (NG0919).\n *\n * Inputs use the camelCase names mandated by the {@link IViewRenderer} contract (the host binds them\n * by those exact names via `setInput`), rather than MJ's usual PascalCase for public members —\n * mirroring the Cards and Cluster renderers.\n */\n@Component({\n standalone: false,\n selector: 'mj-grid-view-renderer',\n encapsulation: ViewEncapsulation.None,\n template: `\n <mj-entity-data-grid\n #grid\n [Provider]=\"Provider\"\n [Data]=\"records\"\n [ExportDataProvider]=\"exportDataProvider\"\n [Params]=\"effectiveParams\"\n [FilterText]=\"filterText ?? ''\"\n [GridState]=\"config.gridState ?? null\"\n [Height]=\"'auto'\"\n [AllowLoad]=\"false\"\n [AutoLoadEntityActions]=\"AutoLoadEntityActions\"\n [ShowToolbar]=\"effectiveShowToolbar\"\n [ShowSearch]=\"effectiveShowSearch\"\n [ToolbarConfig]=\"config.toolbarConfig ?? {}\"\n [SelectionMode]=\"effectiveSelectionMode\"\n [ShowAddToListButton]=\"effectiveShowAddToListButton\"\n [ShowPager]=\"effectiveShowPager\"\n [PageSize]=\"effectivePageSize\"\n [TotalRowCount]=\"totalRecordCount ?? 0\"\n [PagerPageNumber]=\"page ?? 1\"\n (AfterRowClick)=\"onAfterRowClick($event)\"\n (AfterRowDoubleClick)=\"onAfterRowDoubleClick($event)\"\n (AfterSort)=\"onAfterSort($event)\"\n (GridStateChanged)=\"onGridStateChanged($event)\"\n (SelectionChange)=\"onSelectionChange($event)\"\n (NewButtonClick)=\"onNewButtonClick()\"\n (RefreshButtonClick)=\"onRefreshButtonClick()\"\n (DeleteButtonClick)=\"onDeleteButtonClick($event)\"\n (AddToListRequested)=\"onAddToListRequested($event)\"\n (ForeignKeyClick)=\"onForeignKeyClick($event)\"\n (PageChange)=\"onPageChange($event)\"\n (ManageColumnsRequested)=\"configureRequested.emit()\"\n >\n </mj-entity-data-grid>\n\n <!-- NOTE: Export is NOT handled here — mj-entity-data-grid hosts its OWN export dialog\n (its onExportClick opens it with formats/sampling via ExportService). Adding a second\n dialog here produced two stacked export dialogs. The grid owns export self-contained. -->\n\n <!-- Self-contained Add-to-List dialog (Generic) — owned by this wrapper, never bubbles up. -->\n @if (listManagementConfig) {\n <mj-list-management-dialog\n [Provider]=\"Provider\"\n [visible]=\"showListManagementDialog\"\n [config]=\"listManagementConfig\"\n (complete)=\"onListManagementComplete($event)\"\n (cancel)=\"onListManagementCancel()\"\n >\n </mj-list-management-dialog>\n }\n\n <!-- Self-contained Delete confirmation (Generic) — owned by this wrapper, never bubbles up. -->\n <mj-ev-confirm-dialog\n [IsOpen]=\"showDeleteConfirm\"\n Title=\"Delete Records\"\n [Message]=\"deleteConfirmMessage\"\n DetailMessage=\"This action cannot be undone.\"\n ConfirmText=\"Delete\"\n ConfirmStyle=\"danger\"\n Icon=\"fa-solid fa-trash\"\n (Confirmed)=\"onDeleteConfirmed()\"\n (Cancelled)=\"onDeleteCancelled()\"\n >\n </mj-ev-confirm-dialog>\n `,\n styles: [\n `\n :host {\n display: block;\n height: 100%;\n }\n `,\n ],\n})\nexport class GridViewRendererComponent extends BaseAngularComponent implements IViewRenderer<GridViewConfig> {\n /** Change detection ref used to flush dialog visibility toggles driven by grid events. */\n private cdr = inject(ChangeDetectorRef);\n\n // ---- IViewRenderer core inputs (camelCase per the host contract) ----\n\n /** The entity whose records are being rendered. Used to build default params + resolve selection. */\n @Input() entity: EntityInfo | null = null;\n\n /** The records to render (already loaded / filtered / paged by the host). Fed into `[Data]`. */\n @Input() records: Record<string, unknown>[] = [];\n\n /**\n * Optional full-result-set fetcher supplied by the host, forwarded to the grid's ExportDataProvider\n * so exports cover every matching row rather than just the loaded page (bug C1).\n */\n @Input() exportDataProvider: (() => Promise<Record<string, unknown>[]>) | null = null;\n\n /** Primary-key string of the currently selected record, if any. */\n @Input() selectedRecordId: string | null = null;\n\n /** Active filter text — passed through for the grid's cell highlighting. */\n @Input() filterText: string | null = null;\n\n /** Opaque per-view configuration. Seeds the grid bindings; mutated + re-emitted on grid changes. */\n @Input() config: GridViewConfig = {};\n\n /**\n * When true (default), the grid self-loads the entity's active EntityActions and shows them — buttons\n * appear only for entities that actually have actions (data-driven). Actions whose invocation names a\n * `RuntimeUXDriverClass` mount that interactive driver (e.g. the Record Process runner) in-place.\n */\n @Input() AutoLoadEntityActions = true;\n\n // ---- IViewRenderer generic data-context inputs ----\n\n /** Total record count across all pages, for the grid's pager. Fed into `[TotalRowCount]`. */\n @Input() totalRecordCount?: number;\n\n /** One-based current page the host is showing. Fed into `[PagerPageNumber]` (already 1-based). */\n @Input() page?: number;\n\n /** Page size the host is using — fallback when `config.pageSize` is absent. */\n @Input() pageSize?: number;\n\n /** Whether the host is currently (re)loading the record set. Accepted per contract; unused here. */\n @Input() isLoading?: boolean;\n\n // ---- IViewRenderer outputs (generic + navigation channels only) ----\n\n /** Emitted when a row is single-clicked — payload is the raw record object (host builds the key). */\n @Output() recordSelected = new EventEmitter<unknown>();\n\n /** Emitted when a row is double-clicked — payload is the raw record object (host builds the key). */\n @Output() recordOpened = new EventEmitter<unknown>();\n\n /** Emitted when this renderer mutates its opaque {@link config} (sort / grid-state persistence). */\n @Output() configChanged = new EventEmitter<GridViewConfig>();\n\n /** Generic data-access channel: ask the host to re-load with different sort / page. */\n @Output() dataRequest = new EventEmitter<ViewDataRequest>();\n\n /**\n * Ask the host to open this view's configuration UI. Raised when the grid emits\n * `ManageColumnsRequested` (its \"Manage Columns\" toolbar affordance). Part of the generic\n * {@link IViewRenderer} contract; the container forwards it to the workspace, which opens the\n * config panel (Columns tab) — the canonical column editor.\n */\n @Output() configureRequested = new EventEmitter<void>();\n\n /**\n * NAVIGATION: open a related record on a (possibly different) entity from a foreign-key cell click.\n * Routing lives in the outer app, so this is one of the few signals that legitimately bubbles up.\n */\n @Output() openRelatedRecordRequested = new EventEmitter<ViewRelatedRecordNavigation>();\n\n /** NAVIGATION: create a new record of the current entity (grid \"New\" button). Bubbles up for routing. */\n @Output() createRecordRequested = new EventEmitter<void>();\n\n /**\n * Reference to the hosted grid. Currently only retained for parity / future selection resolution;\n * selection is mapped from the {@link records} input rather than read from the grid, per contract.\n */\n @ViewChild('grid') protected grid?: EntityDataGridComponent;\n\n /**\n * IMPERATIVE export entry point ({@link IViewRenderer.exportRecords}). Lets the host trigger\n * an export programmatically (ultimately for the AI agent) by delegating to the hosted grid's\n * self-contained {@link EntityDataGridComponent.Export} (which downloads the file). The grid's\n * toolbar export button remains the interactive path; this is the no-UI equivalent.\n *\n * @param format optional output format; the grid defaults to 'excel' when omitted.\n * @returns true when the export succeeded, false when the grid isn't ready or the export failed.\n */\n async exportRecords(format?: 'csv' | 'excel' | 'json'): Promise<boolean> {\n if (!this.grid) {\n return false;\n }\n const result = await this.grid.Export(format ? { format } : undefined, true);\n return !!result?.success;\n }\n\n // ================================================================\n // Self-contained dialog state (never surfaced to the host)\n // ================================================================\n // NOTE: Export has no state here — mj-entity-data-grid owns its export dialog.\n\n /** Whether the add-to-list dialog is visible. Toggled internally by {@link onAddToListRequested}. */\n protected showListManagementDialog = false;\n\n /** Config fed into `<mj-list-management-dialog>`. Built from the entity + selected records. */\n protected listManagementConfig: ListManagementDialogConfig | null = null;\n\n /** Whether the delete-confirmation dialog is visible. Toggled internally by {@link onDeleteButtonClick}. */\n protected showDeleteConfirm = false;\n\n /** Records staged for deletion while the confirm dialog is open. */\n private pendingDeleteRecords: Record<string, unknown>[] = [];\n\n /** Dynamic message for the delete-confirmation dialog (reflects the staged record count). */\n protected deleteConfirmMessage = 'Are you sure you want to delete the selected records?';\n\n // ================================================================\n // Effective binding accessors — seed grid inputs from config + defaults\n // ================================================================\n\n /** Effective toolbar visibility — defaults to `true` when not set in config. */\n get effectiveShowToolbar(): boolean {\n return this.config.showToolbar ?? true;\n }\n\n /**\n * Grid search defaults OFF when hosted in entity-viewer. The container already owns\n * `filterText` (\"Filter records...\"). Opt in with `toolbarConfig.showSearch: true`.\n */\n get effectiveShowSearch(): boolean {\n return this.config.toolbarConfig?.showSearch ?? false;\n }\n\n /** Effective selection mode — defaults to `'checkbox'` when not set in config. */\n get effectiveSelectionMode(): GridSelectionMode {\n return this.config.selectionMode ?? 'checkbox';\n }\n\n /** Effective add-to-list button visibility — defaults to `true` when not set in config. */\n get effectiveShowAddToListButton(): boolean {\n return this.config.showAddToListButton ?? true;\n }\n\n /** Effective pager visibility — defaults to `true` when not set in config. */\n get effectiveShowPager(): boolean {\n return this.config.showPager ?? true;\n }\n\n /** Effective page size — config wins, else the generic `pageSize` input, else the grid's own default. */\n get effectivePageSize(): number {\n return this.config.pageSize ?? this.pageSize ?? 100;\n }\n\n /**\n * Effective RunViewParams for the grid. Uses `config.params` when supplied; otherwise builds a\n * minimal dynamic-view params object from {@link entity}. Returns `null` when no entity is known\n * yet (the grid renders empty until the host provides one).\n */\n get effectiveParams(): RunViewParams | null {\n if (this.config.params) {\n return this.config.params;\n }\n if (this.entity) {\n return { EntityName: this.entity.Name };\n }\n return null;\n }\n\n // ================================================================\n // Navigation + generic coordination output mapping\n // ================================================================\n\n /**\n * Row single-click → {@link recordSelected}. Extracts the raw record (`event.row`) so the host\n * builds the composite key itself, matching the other renderers.\n */\n onAfterRowClick(event: AfterRowClickEventArgs): void {\n if (event.row) {\n this.recordSelected.emit(event.row);\n }\n }\n\n /** Row double-click → {@link recordOpened} (NAVIGATION), emitting the raw record object. */\n onAfterRowDoubleClick(event: AfterRowDoubleClickEventArgs): void {\n if (event.row) {\n this.recordOpened.emit(event.row);\n }\n }\n\n /**\n * Sort change → both generic coordination channels:\n * 1. {@link dataRequest} with the generic `sort` shape so the host re-loads with a new OrderBy.\n * 2. persists the sort into `config.gridState.sortSettings` and emits {@link configChanged} so\n * the grid's sort survives view reloads via the opaque config channel.\n */\n onAfterSort(event: AfterSortEventArgs): void {\n const sort = (event.newSortState ?? []).map((s) => ({ field: s.field, direction: s.direction }));\n this.dataRequest.emit({ sort });\n\n const gridState: ViewGridState = { ...(this.config.gridState ?? {}) };\n gridState.sortSettings = (event.newSortState ?? []).map((s) => ({ field: s.field, dir: s.direction }));\n this.config = { ...this.config, gridState };\n this.configChanged.emit(this.config);\n }\n\n /**\n * Generic grid-state change (column resize / reorder / visibility) → merge the grid's updated\n * {@link ViewGridState} into the opaque config and emit {@link configChanged}; the host persists\n * the blob verbatim. No `dataRequest` here — column changes don't alter the loaded record set.\n */\n onGridStateChanged(event: GridStateChangedEvent): void {\n this.config = { ...this.config, gridState: event.gridState };\n this.configChanged.emit(this.config);\n }\n\n /**\n * Selection change → kept INTERNAL. The grid drives its own add-to-list from the selection, so the\n * wrapper has no need to surface it. We intentionally do not bubble selection anywhere.\n */\n onSelectionChange(_selectedKeys: string[]): void {\n // No-op: selection is internal to the grid + this wrapper's add-to-list. It never bubbles up.\n }\n\n /**\n * Foreign-key link click → {@link openRelatedRecordRequested} (NAVIGATION). Maps the grid's\n * {@link ForeignKeyClickEvent} (which carries the related entity + the FK value) onto the generic\n * {@link ViewRelatedRecordNavigation} the container forwards to the outer app for routing. The\n * related entity name is taken from the event when present, else resolved from the metadata by ID.\n */\n onForeignKeyClick(event: ForeignKeyClickEvent): void {\n const entityName = event.relatedEntityName ?? this.resolveEntityNameById(event.relatedEntityId);\n if (!entityName) {\n return;\n }\n this.openRelatedRecordRequested.emit({ entityName, recordKey: event.recordId });\n }\n\n /** New button → {@link createRecordRequested} (NAVIGATION) — opening the create form is routing. */\n onNewButtonClick(): void {\n this.createRecordRequested.emit();\n }\n\n /**\n * Pager navigation → generic {@link dataRequest}. Maps the grid's {@link PageChangeEvent}\n * (`PageNumber` is already 1-based, `PageSize`) onto the generic `{ page, pageSize }` shape the\n * host honors against its own RunView.\n */\n onPageChange(event: PageChangeEvent): void {\n this.dataRequest.emit({ page: event.PageNumber, pageSize: event.PageSize });\n }\n\n // ================================================================\n // Self-contained: Refresh\n // ================================================================\n\n /**\n * Refresh button → re-emit {@link dataRequest} so the host reloads the current page. This is\n * generic container ↔ plug-in coordination (a data-access request), NOT a feature event surfaced\n * to the outer app.\n */\n onRefreshButtonClick(): void {\n this.dataRequest.emit(this.currentPageDataRequest());\n }\n\n // ================================================================\n // Export: handled entirely by mj-entity-data-grid (its onExportClick opens its own export dialog\n // via ExportService). This wrapper intentionally does NOT host an export dialog — doing so produced\n // two stacked dialogs. Nothing to do here.\n // ================================================================\n\n // ================================================================\n // Self-contained: Add to List (hosts <mj-list-management-dialog>)\n // ================================================================\n\n /**\n * Add-to-list button → build a {@link ListManagementDialogConfig} from the entity + the records the\n * grid supplied, then open the Generic list-management dialog. The dialog persists membership\n * changes itself — nothing bubbles up. Mirrors the config construction the legacy host did in\n * `data-explorer-dashboard`'s `onAddToListRequested()`.\n */\n onAddToListRequested(event: { entityInfo: EntityInfo; records: Record<string, unknown>[]; recordIds: string[] }): void {\n const entity = event.entityInfo ?? this.entity;\n if (!entity || !event.records || event.records.length === 0) {\n return;\n }\n\n const recordDisplayNames = event.records.map((record) => this.getRecordDisplayName(record, entity));\n const recordIds = this.buildRawRecordIds(event.records, entity);\n if (recordIds.length === 0) {\n return;\n }\n\n const recordCount = event.records.length;\n const dialogTitle = recordCount === 1 ? `Manage Lists for \"${recordDisplayNames[0]}\"` : `Add ${recordCount} Records to List`;\n\n this.listManagementConfig = {\n mode: 'manage',\n entityId: entity.ID,\n entityName: entity.Name,\n recordIds,\n recordDisplayNames,\n allowCreate: true,\n allowRemove: recordCount === 1,\n showMembership: recordCount === 1,\n dialogTitle,\n };\n this.showListManagementDialog = true;\n this.cdr.detectChanges();\n }\n\n /** List-management dialog completed (membership changes applied) → tear down state. */\n onListManagementComplete(_result: ListManagementResult): void {\n this.showListManagementDialog = false;\n this.listManagementConfig = null;\n this.cdr.detectChanges();\n }\n\n /** List-management dialog cancelled → tear down state. */\n onListManagementCancel(): void {\n this.showListManagementDialog = false;\n this.listManagementConfig = null;\n this.cdr.detectChanges();\n }\n\n /**\n * Resolve a human-friendly display name for a record using the entity's NameField, falling back to\n * the composite-key string. Mirrors the legacy host's display-name resolution.\n */\n private getRecordDisplayName(record: Record<string, unknown>, entity: EntityInfo): string {\n if (entity.NameField) {\n const nameValue = record[entity.NameField.Name];\n if (nameValue != null) {\n return String(nameValue);\n }\n }\n return buildPkString(record, entity) || 'Unknown';\n }\n\n /**\n * Build the record-id strings used by list membership matching, in the compact form `MJ: List Details`\n * stores in `RecordID`: the bare value for a single-column primary key (whatever the column is called),\n * or the full `Field1|Value1||Field2|Value2` segment for a composite key. The entity is arbitrary, so the\n * key is built from all of its primary-key columns rather than assuming a single `ID`.\n */\n private buildRawRecordIds(records: Record<string, unknown>[], entity: EntityInfo): string[] {\n if (entity.PrimaryKeys.length === 0) {\n return [];\n }\n return records\n .map((record) => CompositeKey.FromEntityRecord(entity, record).ToCompactURLSegment())\n .filter((id) => id !== '');\n }\n\n // ================================================================\n // Self-contained: Delete (hosts <mj-ev-confirm-dialog> + MJ entity layer)\n // ================================================================\n\n /**\n * Delete button → stage the records and open the Generic confirm dialog. The actual delete happens\n * in {@link onDeleteConfirmed} after the user confirms — nothing bubbles up.\n */\n onDeleteButtonClick(records: Record<string, unknown>[]): void {\n if (!records || records.length === 0) {\n return;\n }\n this.pendingDeleteRecords = records;\n const count = records.length;\n this.deleteConfirmMessage = count === 1 ? 'Are you sure you want to delete this record?' : `Are you sure you want to delete these ${count} records?`;\n this.showDeleteConfirm = true;\n this.cdr.detectChanges();\n }\n\n /**\n * Delete confirmed → delete each staged record through the MJ entity layer\n * (`ProviderToUse.GetEntityObject(name, compositeKey, user)` → `Delete`), checking the boolean\n * result and surfacing failures via {@link LogError}. After deletion, re-request the current page\n * so the host reloads. Self-contained — no feature event leaves the wrapper.\n */\n async onDeleteConfirmed(): Promise<void> {\n this.showDeleteConfirm = false;\n const entity = this.entity;\n const records = this.pendingDeleteRecords;\n this.pendingDeleteRecords = [];\n\n if (!entity || records.length === 0) {\n return;\n }\n\n let anyDeleted = false;\n const provider = this.ProviderToUse;\n const user = provider.CurrentUser;\n\n for (const record of records) {\n const key = buildCompositeKey(record, entity);\n try {\n // The (name, key, user) overload instantiates AND loads in one call (throws if it can't load).\n const obj = await provider.GetEntityObject(entity.Name, key, user);\n const deleted = await obj.Delete();\n if (deleted) {\n anyDeleted = true;\n } else {\n LogError(`Delete failed: ${obj.LatestResult?.CompleteMessage ?? 'unknown error'}`);\n }\n } catch (err) {\n LogError(`Delete failed for ${entity.Name} (${key.ToString()}): ${err instanceof Error ? err.message : String(err)}`);\n }\n }\n\n if (anyDeleted) {\n // Re-request the current page so the host reloads the (now smaller) record set.\n this.dataRequest.emit(this.currentPageDataRequest());\n }\n this.cdr.detectChanges();\n }\n\n /** Delete cancelled → discard the staged records and close the confirm dialog. */\n onDeleteCancelled(): void {\n this.showDeleteConfirm = false;\n this.pendingDeleteRecords = [];\n this.cdr.detectChanges();\n }\n\n // ================================================================\n // Helpers\n // ================================================================\n\n /** Build a {@link ViewDataRequest} that re-requests the host's current page/pageSize, if known. */\n private currentPageDataRequest(): ViewDataRequest {\n const req: ViewDataRequest = {};\n if (this.page != null) {\n req.page = this.page;\n }\n const ps = this.config.pageSize ?? this.pageSize;\n if (ps != null) {\n req.pageSize = ps;\n }\n return req;\n }\n\n /**\n * Resolve an entity's name from its ID via the active provider's metadata. Used when a foreign-key\n * click event omits the related entity name and only carries its ID.\n */\n private resolveEntityNameById(entityId: string): string | null {\n if (!entityId) {\n return null;\n }\n const match = this.ProviderToUse.Entities.find((e) => UUIDsEqual(e.ID, entityId));\n return match ? match.Name : null;\n }\n}\n\n/**\n * Tree-shaking guard. Force-references this renderer so bundlers (ESBuild/Vite) don't drop the\n * component in builds that only mount it dynamically via the ClassFactory/descriptor. Mirrors the\n * Cards/Cluster renderers' load guards; the parent wires this into a barrel/module load path.\n */\nexport function LoadGridViewRenderer(): void {\n // no-op; presence prevents tree-shaking of this component\n}\n"]}
1
+ {"version":3,"file":"grid-view-renderer.component.js","sourceRoot":"","sources":["../../../../src/lib/view-types/renderers/grid-view-renderer.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,iBAAiB,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAChI,OAAO,EAA6B,QAAQ,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEzF,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAQrE,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;;;;;;;;;IA6IrE,oDAMC;IADC,AADA,4NAAY,uCAAgC,KAAC,qMACnC,+BAAwB,KAAC;IAErC,iBAA4B;;;IAJ1B,AADA,AADA,0CAAqB,4CACe,uCACL;;AA1GvC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwDG;AAgFH,MAAM,OAAO,yBAA0B,SAAQ,oBAAoB;IACjE,0FAA0F;IAClF,GAAG,GAAG,MAAM,CAAC,i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ACE,oDAC4B,yCACX,uCACF,0EACU,6CACJ,yDACY,qCACpB,mCACF,4CACS,kCACV;YAqB/B,eASC;YATD,mDASC;YAIC,cAA4B;YAE5B,AAFA,8CAA4B,qCAEI;;;iFAmBzB,yBAAyB;cA/ErC,SAAS;6BACI,KAAK,YACP,uBAAuB,iBAClB,iBAAiB,CAAC,IAAI,YAC3B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiET;;kBAiBA,KAAK;;kBAGL,KAAK;;kBAML,KAAK;;kBAGL,KAAK;;kBAGL,KAAK;;kBAGL,KAAK;;kBAOL,KAAK;;kBAKL,KAAK;;kBAGL,KAAK;;kBAGL,KAAK;;kBAGL,KAAK;;kBAKL,MAAM;;kBAGN,MAAM;;kBAGN,MAAM;;kBAGN,MAAM;;kBAQN,MAAM;;kBAMN,MAAM;;kBAGN,MAAM;;kBAMN,SAAS;mBAAC,MAAM;;kFAnFN,yBAAyB;AA+ctC;;;;GAIG;AACH,MAAM,UAAU,oBAAoB;IAClC,0DAA0D;AAC5D,CAAC","sourcesContent":["import { Component, Input, Output, EventEmitter, ViewEncapsulation, ViewChild, ChangeDetectorRef, inject } from '@angular/core';\nimport { EntityInfo, RunViewParams, LogError, CompositeKey } from '@memberjunction/core';\nimport { ExportColumn } from '@memberjunction/export-engine';\nimport { UUIDsEqual } from '@memberjunction/global';\nimport { BaseAngularComponent } from '@memberjunction/ng-base-types';\nimport { PageChangeEvent } from '@memberjunction/ng-pagination';\nimport { ListManagementDialogConfig, ListManagementResult } from '@memberjunction/ng-list-management';\nimport { IViewRenderer, ViewDataRequest, ViewRelatedRecordNavigation } from '../view-type.contracts';\nimport { ViewGridState } from '../../types';\nimport { GridSelectionMode, GridToolbarConfig, ForeignKeyClickEvent } from '../../entity-data-grid/models/grid-types';\nimport { AfterRowClickEventArgs, AfterRowDoubleClickEventArgs, AfterSortEventArgs } from '../../entity-data-grid/events/grid-events';\nimport { GridStateChangedEvent } from '../../types';\nimport { buildPkString, buildCompositeKey } from '../../utils/record.util';\nimport { EntityDataGridComponent } from '../../entity-data-grid/entity-data-grid.component';\n\n/**\n * Opaque per-view configuration for the Grid view type.\n * -----------------------------------------------------\n * This is the blob the host persists verbatim against the active `ViewTypeID` and never\n * inspects (see {@link IViewRenderer.configChanged}). The renderer seeds the\n * `<mj-entity-data-grid>` bindings from these fields, applying sensible defaults when a\n * field is absent (see {@link GridViewRendererComponent}). It is intentionally a plain,\n * fully-serializable shape — every field is optional so an empty `{}` is a valid config.\n */\nexport interface GridViewConfig {\n /**\n * Persisted grid state (columns/widths/order/sort) from a User View. Mutated in place when\n * the grid emits sort or generic grid-state changes, then surfaced via `configChanged` so the\n * host persists it. Fed straight into `[GridState]`.\n */\n gridState?: ViewGridState;\n /** Whether the grid's own toolbar is shown. Defaults to `true` when absent. */\n showToolbar?: boolean;\n /** The grid toolbar configuration. Fed into `[ToolbarConfig]`. */\n toolbarConfig?: GridToolbarConfig;\n /** Row selection mode. Defaults to `'checkbox'` when absent. */\n selectionMode?: GridSelectionMode;\n /** Whether the \"Add to List\" button is shown. Defaults to `true` when absent. */\n showAddToListButton?: boolean;\n /** Whether the pager is shown. Defaults to `true` when absent. */\n showPager?: boolean;\n /** Page size for the grid's pager. Falls back to the `pageSize` input when absent. */\n pageSize?: number;\n /**\n * Explicit RunViewParams for the grid's data source. When absent the renderer builds a minimal\n * dynamic-view params object from {@link entity}. Fed into `[Params]`.\n */\n params?: RunViewParams;\n}\n\n/**\n * GridViewRendererComponent\n * -------------------------\n * The Grid **view type** renderer — a fully self-contained {@link IViewRenderer} adapter that hosts\n * the existing {@link EntityDataGridComponent} (`<mj-entity-data-grid>`) inside the entity-viewer's\n * pluggable view-type system. It is the dynamic-mounted plug-in that the `GridViewType` descriptor\n * points at.\n *\n * **Architectural intent — the container knows nothing about grids, and grid *features* never bubble\n * up.** The host (entity-viewer) binds only the generic {@link IViewRenderer} surface: the core\n * inputs (`entity` / `provider` / `records` / `selectedRecordId` / `filterText` / `config`), the\n * generic data-context inputs (`totalRecordCount` / `page` / `pageSize` / `isLoading`), and a small\n * set of generic outputs. There is **no opaque `hostAction` channel** — everything a grid does is\n * resolved through one of these three categories:\n *\n * 1. **Self-contained (owned end-to-end — never bubbles up):**\n * - **Export** → owned entirely by `<mj-entity-data-grid>` itself (its `onExportClick` opens its\n * OWN export dialog with format/sampling via `ExportService`). This wrapper does NOT host an\n * export dialog — doing so produced two stacked dialogs.\n * - **Add to List** → hosts `<mj-list-management-dialog>` ({@link ListManagementModule}). On\n * `(AddToListRequested)` the wrapper builds a {@link ListManagementDialogConfig} from the\n * entity + selected records and opens the dialog.\n * - **Delete** → hosts the Generic `<mj-ev-confirm-dialog>` (from {@link EntityViewerModule}).\n * On `(DeleteButtonClick)` the wrapper confirms, deletes via the MJ entity layer, then\n * re-requests data so the host reloads the current page.\n * - **Refresh** → on `(RefreshButtonClick)` the wrapper re-emits {@link dataRequest} so the host\n * reloads. No feature event leaves the wrapper.\n * - **Selection** → kept INTERNAL; it only drives the wrapper's own add-to-list. Never bubbles.\n *\n * 2. **Navigation (the ONLY legitimate upward signals — routing lives in the outer app):**\n * - Row double-click → {@link recordOpened}.\n * - Foreign-key cell click `(ForeignKeyClick)` → {@link openRelatedRecordRequested}.\n * - New button `(NewButtonClick)` → {@link createRecordRequested}.\n *\n * 3. **Container ↔ plug-in generic coordination (NOT outer-app signals):**\n * - Sort `(AfterSort)` → {@link dataRequest} (`sort`) + persisted into `config.gridState` via\n * {@link configChanged}.\n * - Pager `(PageChange)` → {@link dataRequest} (`page` / `pageSize`).\n * - Generic grid-state `(GridStateChanged)` → merged into `config.gridState` + {@link configChanged}.\n *\n * **Seeding the grid from `config` with defaults:** absent config fields fall back to sensible\n * defaults so a brand-new view (`config === {}`) renders a fully-functional grid — toolbar on,\n * checkbox selection, add-to-list on, pager on. The grid never loads its own data\n * (`[AllowLoad]=\"false\"`) — the host owns the fetch.\n *\n * This is an NgModule-declared (`standalone: false`) component, declared in `EntityViewerModule`.\n * It renders `<mj-entity-data-grid>` + the Generic `<mj-list-management-dialog>` / `<mj-ev-confirm-dialog>`\n * straight from the module's compilation scope (the module imports `ListManagementModule` and declares\n * the grid + confirm dialog; the grid component brings its own export dialog) — so there's\n * no `imports` array and, crucially, no self-import of `EntityViewerModule`: the module loads the\n * view-type descriptors, which reference these wrappers, so a wrapper importing the module back would\n * form a runtime import cycle (NG0919).\n *\n * Inputs use the camelCase names mandated by the {@link IViewRenderer} contract (the host binds them\n * by those exact names via `setInput`), rather than MJ's usual PascalCase for public members —\n * mirroring the Cards and Cluster renderers.\n */\n@Component({\n standalone: false,\n selector: 'mj-grid-view-renderer',\n encapsulation: ViewEncapsulation.None,\n template: `\n <mj-entity-data-grid\n #grid\n [Provider]=\"Provider\"\n [Data]=\"records\"\n [ExportDataProvider]=\"exportDataProvider\"\n [Params]=\"effectiveParams\"\n [FilterText]=\"filterText ?? ''\"\n [GridState]=\"config.gridState ?? null\"\n [Height]=\"'auto'\"\n [AllowLoad]=\"false\"\n [AutoLoadEntityActions]=\"AutoLoadEntityActions\"\n [ShowToolbar]=\"effectiveShowToolbar\"\n [ShowSearch]=\"effectiveShowSearch\"\n [ToolbarConfig]=\"config.toolbarConfig ?? {}\"\n [SelectionMode]=\"effectiveSelectionMode\"\n [ShowAddToListButton]=\"effectiveShowAddToListButton\"\n [ShowPager]=\"effectiveShowPager\"\n [PageSize]=\"effectivePageSize\"\n [TotalRowCount]=\"totalRecordCount ?? 0\"\n [PagerPageNumber]=\"page ?? 1\"\n (AfterRowClick)=\"onAfterRowClick($event)\"\n (AfterRowDoubleClick)=\"onAfterRowDoubleClick($event)\"\n (AfterSort)=\"onAfterSort($event)\"\n (GridStateChanged)=\"onGridStateChanged($event)\"\n (SelectionChange)=\"onSelectionChange($event)\"\n (NewButtonClick)=\"onNewButtonClick()\"\n (RefreshButtonClick)=\"onRefreshButtonClick()\"\n (DeleteButtonClick)=\"onDeleteButtonClick($event)\"\n (AddToListRequested)=\"onAddToListRequested($event)\"\n (ForeignKeyClick)=\"onForeignKeyClick($event)\"\n (PageChange)=\"onPageChange($event)\"\n (ManageColumnsRequested)=\"configureRequested.emit()\"\n >\n </mj-entity-data-grid>\n\n <!-- NOTE: Export is NOT handled here — mj-entity-data-grid hosts its OWN export dialog\n (its onExportClick opens it with formats/sampling via ExportService). Adding a second\n dialog here produced two stacked export dialogs. The grid owns export self-contained. -->\n\n <!-- Self-contained Add-to-List dialog (Generic) — owned by this wrapper, never bubbles up. -->\n @if (listManagementConfig) {\n <mj-list-management-dialog\n [Provider]=\"Provider\"\n [visible]=\"showListManagementDialog\"\n [config]=\"listManagementConfig\"\n (complete)=\"onListManagementComplete($event)\"\n (cancel)=\"onListManagementCancel()\"\n >\n </mj-list-management-dialog>\n }\n\n <!-- Self-contained Delete confirmation (Generic) — owned by this wrapper, never bubbles up. -->\n <mj-ev-confirm-dialog\n [IsOpen]=\"showDeleteConfirm\"\n Title=\"Delete Records\"\n [Message]=\"deleteConfirmMessage\"\n DetailMessage=\"This action cannot be undone.\"\n ConfirmText=\"Delete\"\n ConfirmStyle=\"danger\"\n Icon=\"fa-solid fa-trash\"\n (Confirmed)=\"onDeleteConfirmed()\"\n (Cancelled)=\"onDeleteCancelled()\"\n >\n </mj-ev-confirm-dialog>\n `,\n styles: [\n `\n :host {\n display: block;\n height: 100%;\n }\n `,\n ],\n})\nexport class GridViewRendererComponent extends BaseAngularComponent implements IViewRenderer<GridViewConfig> {\n /** Change detection ref used to flush dialog visibility toggles driven by grid events. */\n private cdr = inject(ChangeDetectorRef);\n\n // ---- IViewRenderer core inputs (camelCase per the host contract) ----\n\n /** The entity whose records are being rendered. Used to build default params + resolve selection. */\n @Input() entity: EntityInfo | null = null;\n\n /** The records to render (already loaded / filtered / paged by the host). Fed into `[Data]`. */\n @Input() records: Record<string, unknown>[] = [];\n\n /**\n * Optional full-result-set fetcher supplied by the host, forwarded to the grid's ExportDataProvider\n * so exports cover every matching row rather than just the loaded page (bug C1).\n */\n @Input() exportDataProvider: (() => Promise<Record<string, unknown>[]>) | null = null;\n\n /** Primary-key string of the currently selected record, if any. */\n @Input() selectedRecordId: string | null = null;\n\n /** Active filter text — passed through for the grid's cell highlighting. */\n @Input() filterText: string | null = null;\n\n /** Opaque per-view configuration. Seeds the grid bindings; mutated + re-emitted on grid changes. */\n @Input() config: GridViewConfig = {};\n\n /**\n * When true (default), the grid self-loads the entity's active EntityActions and shows them — buttons\n * appear only for entities that actually have actions (data-driven). Actions whose invocation names a\n * `RuntimeUXDriverClass` mount that interactive driver (e.g. the Record Process runner) in-place.\n */\n @Input() AutoLoadEntityActions = true;\n\n // ---- IViewRenderer generic data-context inputs ----\n\n /** Total record count across all pages, for the grid's pager. Fed into `[TotalRowCount]`. */\n @Input() totalRecordCount?: number;\n\n /** One-based current page the host is showing. Fed into `[PagerPageNumber]` (already 1-based). */\n @Input() page?: number;\n\n /** Page size the host is using — fallback when `config.pageSize` is absent. */\n @Input() pageSize?: number;\n\n /** Whether the host is currently (re)loading the record set. Accepted per contract; unused here. */\n @Input() isLoading?: boolean;\n\n // ---- IViewRenderer outputs (generic + navigation channels only) ----\n\n /** Emitted when a row is single-clicked — payload is the raw record object (host builds the key). */\n @Output() recordSelected = new EventEmitter<unknown>();\n\n /** Emitted when a row is double-clicked — payload is the raw record object (host builds the key). */\n @Output() recordOpened = new EventEmitter<unknown>();\n\n /** Emitted when this renderer mutates its opaque {@link config} (sort / grid-state persistence). */\n @Output() configChanged = new EventEmitter<GridViewConfig>();\n\n /** Generic data-access channel: ask the host to re-load with different sort / page. */\n @Output() dataRequest = new EventEmitter<ViewDataRequest>();\n\n /**\n * Ask the host to open this view's configuration UI. Raised when the grid emits\n * `ManageColumnsRequested` (its \"Manage Columns\" toolbar affordance). Part of the generic\n * {@link IViewRenderer} contract; the container forwards it to the workspace, which opens the\n * config panel (Columns tab) — the canonical column editor.\n */\n @Output() configureRequested = new EventEmitter<void>();\n\n /**\n * NAVIGATION: open a related record on a (possibly different) entity from a foreign-key cell click.\n * Routing lives in the outer app, so this is one of the few signals that legitimately bubbles up.\n */\n @Output() openRelatedRecordRequested = new EventEmitter<ViewRelatedRecordNavigation>();\n\n /** NAVIGATION: create a new record of the current entity (grid \"New\" button). Bubbles up for routing. */\n @Output() createRecordRequested = new EventEmitter<void>();\n\n /**\n * Reference to the hosted grid. Currently only retained for parity / future selection resolution;\n * selection is mapped from the {@link records} input rather than read from the grid, per contract.\n */\n @ViewChild('grid') protected grid?: EntityDataGridComponent;\n\n /**\n * IMPERATIVE export entry point ({@link IViewRenderer.exportRecords}). Lets the host trigger\n * an export programmatically (ultimately for the AI agent) by delegating to the hosted grid's\n * self-contained {@link EntityDataGridComponent.Export} (which downloads the file). The grid's\n * toolbar export button remains the interactive path; this is the no-UI equivalent.\n *\n * @param format optional output format; the grid defaults to 'excel' when omitted.\n * @returns true when the export succeeded, false when the grid isn't ready or the export failed.\n */\n async exportRecords(format?: 'csv' | 'excel' | 'json'): Promise<boolean> {\n if (!this.grid) {\n return false;\n }\n const result = await this.grid.Export(format ? { format } : undefined, true);\n return !!result?.success;\n }\n\n /** The hosted grid's on-screen columns ({@link IViewRenderer.GetExportColumns}); empty before it mounts. */\n GetExportColumns(): ExportColumn[] {\n return this.grid?.GetExportColumns() ?? [];\n }\n\n // ================================================================\n // Self-contained dialog state (never surfaced to the host)\n // ================================================================\n // NOTE: Export has no state here — mj-entity-data-grid owns its export dialog.\n\n /** Whether the add-to-list dialog is visible. Toggled internally by {@link onAddToListRequested}. */\n protected showListManagementDialog = false;\n\n /** Config fed into `<mj-list-management-dialog>`. Built from the entity + selected records. */\n protected listManagementConfig: ListManagementDialogConfig | null = null;\n\n /** Whether the delete-confirmation dialog is visible. Toggled internally by {@link onDeleteButtonClick}. */\n protected showDeleteConfirm = false;\n\n /** Records staged for deletion while the confirm dialog is open. */\n private pendingDeleteRecords: Record<string, unknown>[] = [];\n\n /** Dynamic message for the delete-confirmation dialog (reflects the staged record count). */\n protected deleteConfirmMessage = 'Are you sure you want to delete the selected records?';\n\n // ================================================================\n // Effective binding accessors — seed grid inputs from config + defaults\n // ================================================================\n\n /** Effective toolbar visibility — defaults to `true` when not set in config. */\n get effectiveShowToolbar(): boolean {\n return this.config.showToolbar ?? true;\n }\n\n /**\n * Grid search defaults OFF when hosted in entity-viewer. The container already owns\n * `filterText` (\"Filter records...\"). Opt in with `toolbarConfig.showSearch: true`.\n */\n get effectiveShowSearch(): boolean {\n return this.config.toolbarConfig?.showSearch ?? false;\n }\n\n /** Effective selection mode — defaults to `'checkbox'` when not set in config. */\n get effectiveSelectionMode(): GridSelectionMode {\n return this.config.selectionMode ?? 'checkbox';\n }\n\n /** Effective add-to-list button visibility — defaults to `true` when not set in config. */\n get effectiveShowAddToListButton(): boolean {\n return this.config.showAddToListButton ?? true;\n }\n\n /** Effective pager visibility — defaults to `true` when not set in config. */\n get effectiveShowPager(): boolean {\n return this.config.showPager ?? true;\n }\n\n /** Effective page size — config wins, else the generic `pageSize` input, else the grid's own default. */\n get effectivePageSize(): number {\n return this.config.pageSize ?? this.pageSize ?? 100;\n }\n\n /**\n * Effective RunViewParams for the grid. Uses `config.params` when supplied; otherwise builds a\n * minimal dynamic-view params object from {@link entity}. Returns `null` when no entity is known\n * yet (the grid renders empty until the host provides one).\n */\n get effectiveParams(): RunViewParams | null {\n if (this.config.params) {\n return this.config.params;\n }\n if (this.entity) {\n return { EntityName: this.entity.Name };\n }\n return null;\n }\n\n // ================================================================\n // Navigation + generic coordination output mapping\n // ================================================================\n\n /**\n * Row single-click → {@link recordSelected}. Extracts the raw record (`event.row`) so the host\n * builds the composite key itself, matching the other renderers.\n */\n onAfterRowClick(event: AfterRowClickEventArgs): void {\n if (event.row) {\n this.recordSelected.emit(event.row);\n }\n }\n\n /** Row double-click → {@link recordOpened} (NAVIGATION), emitting the raw record object. */\n onAfterRowDoubleClick(event: AfterRowDoubleClickEventArgs): void {\n if (event.row) {\n this.recordOpened.emit(event.row);\n }\n }\n\n /**\n * Sort change → both generic coordination channels:\n * 1. {@link dataRequest} with the generic `sort` shape so the host re-loads with a new OrderBy.\n * 2. persists the sort into `config.gridState.sortSettings` and emits {@link configChanged} so\n * the grid's sort survives view reloads via the opaque config channel.\n */\n onAfterSort(event: AfterSortEventArgs): void {\n const sort = (event.newSortState ?? []).map((s) => ({ field: s.field, direction: s.direction }));\n this.dataRequest.emit({ sort });\n\n const gridState: ViewGridState = { ...(this.config.gridState ?? {}) };\n gridState.sortSettings = (event.newSortState ?? []).map((s) => ({ field: s.field, dir: s.direction }));\n this.config = { ...this.config, gridState };\n this.configChanged.emit(this.config);\n }\n\n /**\n * Generic grid-state change (column resize / reorder / visibility) → merge the grid's updated\n * {@link ViewGridState} into the opaque config and emit {@link configChanged}; the host persists\n * the blob verbatim. No `dataRequest` here — column changes don't alter the loaded record set.\n */\n onGridStateChanged(event: GridStateChangedEvent): void {\n this.config = { ...this.config, gridState: event.gridState };\n this.configChanged.emit(this.config);\n }\n\n /**\n * Selection change → kept INTERNAL. The grid drives its own add-to-list from the selection, so the\n * wrapper has no need to surface it. We intentionally do not bubble selection anywhere.\n */\n onSelectionChange(_selectedKeys: string[]): void {\n // No-op: selection is internal to the grid + this wrapper's add-to-list. It never bubbles up.\n }\n\n /**\n * Foreign-key link click → {@link openRelatedRecordRequested} (NAVIGATION). Maps the grid's\n * {@link ForeignKeyClickEvent} (which carries the related entity + the FK value) onto the generic\n * {@link ViewRelatedRecordNavigation} the container forwards to the outer app for routing. The\n * related entity name is taken from the event when present, else resolved from the metadata by ID.\n */\n onForeignKeyClick(event: ForeignKeyClickEvent): void {\n const entityName = event.relatedEntityName ?? this.resolveEntityNameById(event.relatedEntityId);\n if (!entityName) {\n return;\n }\n this.openRelatedRecordRequested.emit({ entityName, recordKey: event.recordId });\n }\n\n /** New button → {@link createRecordRequested} (NAVIGATION) — opening the create form is routing. */\n onNewButtonClick(): void {\n this.createRecordRequested.emit();\n }\n\n /**\n * Pager navigation → generic {@link dataRequest}. Maps the grid's {@link PageChangeEvent}\n * (`PageNumber` is already 1-based, `PageSize`) onto the generic `{ page, pageSize }` shape the\n * host honors against its own RunView.\n */\n onPageChange(event: PageChangeEvent): void {\n this.dataRequest.emit({ page: event.PageNumber, pageSize: event.PageSize });\n }\n\n // ================================================================\n // Self-contained: Refresh\n // ================================================================\n\n /**\n * Refresh button → re-emit {@link dataRequest} so the host reloads the current page. This is\n * generic container ↔ plug-in coordination (a data-access request), NOT a feature event surfaced\n * to the outer app.\n */\n onRefreshButtonClick(): void {\n this.dataRequest.emit(this.currentPageDataRequest());\n }\n\n // ================================================================\n // Export: handled entirely by mj-entity-data-grid (its onExportClick opens its own export dialog\n // via ExportService). This wrapper intentionally does NOT host an export dialog — doing so produced\n // two stacked dialogs. Nothing to do here.\n // ================================================================\n\n // ================================================================\n // Self-contained: Add to List (hosts <mj-list-management-dialog>)\n // ================================================================\n\n /**\n * Add-to-list button → build a {@link ListManagementDialogConfig} from the entity + the records the\n * grid supplied, then open the Generic list-management dialog. The dialog persists membership\n * changes itself — nothing bubbles up. Mirrors the config construction the legacy host did in\n * `data-explorer-dashboard`'s `onAddToListRequested()`.\n */\n onAddToListRequested(event: { entityInfo: EntityInfo; records: Record<string, unknown>[]; recordIds: string[] }): void {\n const entity = event.entityInfo ?? this.entity;\n if (!entity || !event.records || event.records.length === 0) {\n return;\n }\n\n const recordDisplayNames = event.records.map((record) => this.getRecordDisplayName(record, entity));\n const recordIds = this.buildRawRecordIds(event.records, entity);\n if (recordIds.length === 0) {\n return;\n }\n\n const recordCount = event.records.length;\n const dialogTitle = recordCount === 1 ? `Manage Lists for \"${recordDisplayNames[0]}\"` : `Add ${recordCount} Records to List`;\n\n this.listManagementConfig = {\n mode: 'manage',\n entityId: entity.ID,\n entityName: entity.Name,\n recordIds,\n recordDisplayNames,\n allowCreate: true,\n allowRemove: recordCount === 1,\n showMembership: recordCount === 1,\n dialogTitle,\n };\n this.showListManagementDialog = true;\n this.cdr.detectChanges();\n }\n\n /** List-management dialog completed (membership changes applied) → tear down state. */\n onListManagementComplete(_result: ListManagementResult): void {\n this.showListManagementDialog = false;\n this.listManagementConfig = null;\n this.cdr.detectChanges();\n }\n\n /** List-management dialog cancelled → tear down state. */\n onListManagementCancel(): void {\n this.showListManagementDialog = false;\n this.listManagementConfig = null;\n this.cdr.detectChanges();\n }\n\n /**\n * Resolve a human-friendly display name for a record using the entity's NameField, falling back to\n * the composite-key string. Mirrors the legacy host's display-name resolution.\n */\n private getRecordDisplayName(record: Record<string, unknown>, entity: EntityInfo): string {\n if (entity.NameField) {\n const nameValue = record[entity.NameField.Name];\n if (nameValue != null) {\n return String(nameValue);\n }\n }\n return buildPkString(record, entity) || 'Unknown';\n }\n\n /**\n * Build the record-id strings used by list membership matching, in the compact form `MJ: List Details`\n * stores in `RecordID`: the bare value for a single-column primary key (whatever the column is called),\n * or the full `Field1|Value1||Field2|Value2` segment for a composite key. The entity is arbitrary, so the\n * key is built from all of its primary-key columns rather than assuming a single `ID`.\n */\n private buildRawRecordIds(records: Record<string, unknown>[], entity: EntityInfo): string[] {\n if (entity.PrimaryKeys.length === 0) {\n return [];\n }\n return records\n .map((record) => CompositeKey.FromEntityRecord(entity, record).ToCompactURLSegment())\n .filter((id) => id !== '');\n }\n\n // ================================================================\n // Self-contained: Delete (hosts <mj-ev-confirm-dialog> + MJ entity layer)\n // ================================================================\n\n /**\n * Delete button → stage the records and open the Generic confirm dialog. The actual delete happens\n * in {@link onDeleteConfirmed} after the user confirms — nothing bubbles up.\n */\n onDeleteButtonClick(records: Record<string, unknown>[]): void {\n if (!records || records.length === 0) {\n return;\n }\n this.pendingDeleteRecords = records;\n const count = records.length;\n this.deleteConfirmMessage = count === 1 ? 'Are you sure you want to delete this record?' : `Are you sure you want to delete these ${count} records?`;\n this.showDeleteConfirm = true;\n this.cdr.detectChanges();\n }\n\n /**\n * Delete confirmed → delete each staged record through the MJ entity layer\n * (`ProviderToUse.GetEntityObject(name, compositeKey, user)` → `Delete`), checking the boolean\n * result and surfacing failures via {@link LogError}. After deletion, re-request the current page\n * so the host reloads. Self-contained — no feature event leaves the wrapper.\n */\n async onDeleteConfirmed(): Promise<void> {\n this.showDeleteConfirm = false;\n const entity = this.entity;\n const records = this.pendingDeleteRecords;\n this.pendingDeleteRecords = [];\n\n if (!entity || records.length === 0) {\n return;\n }\n\n let anyDeleted = false;\n const provider = this.ProviderToUse;\n const user = provider.CurrentUser;\n\n for (const record of records) {\n const key = buildCompositeKey(record, entity);\n try {\n // The (name, key, user) overload instantiates AND loads in one call (throws if it can't load).\n const obj = await provider.GetEntityObject(entity.Name, key, user);\n const deleted = await obj.Delete();\n if (deleted) {\n anyDeleted = true;\n } else {\n LogError(`Delete failed: ${obj.LatestResult?.CompleteMessage ?? 'unknown error'}`);\n }\n } catch (err) {\n LogError(`Delete failed for ${entity.Name} (${key.ToString()}): ${err instanceof Error ? err.message : String(err)}`);\n }\n }\n\n if (anyDeleted) {\n // Re-request the current page so the host reloads the (now smaller) record set.\n this.dataRequest.emit(this.currentPageDataRequest());\n }\n this.cdr.detectChanges();\n }\n\n /** Delete cancelled → discard the staged records and close the confirm dialog. */\n onDeleteCancelled(): void {\n this.showDeleteConfirm = false;\n this.pendingDeleteRecords = [];\n this.cdr.detectChanges();\n }\n\n // ================================================================\n // Helpers\n // ================================================================\n\n /** Build a {@link ViewDataRequest} that re-requests the host's current page/pageSize, if known. */\n private currentPageDataRequest(): ViewDataRequest {\n const req: ViewDataRequest = {};\n if (this.page != null) {\n req.page = this.page;\n }\n const ps = this.config.pageSize ?? this.pageSize;\n if (ps != null) {\n req.pageSize = ps;\n }\n return req;\n }\n\n /**\n * Resolve an entity's name from its ID via the active provider's metadata. Used when a foreign-key\n * click event omits the related entity name and only carries its ID.\n */\n private resolveEntityNameById(entityId: string): string | null {\n if (!entityId) {\n return null;\n }\n const match = this.ProviderToUse.Entities.find((e) => UUIDsEqual(e.ID, entityId));\n return match ? match.Name : null;\n }\n}\n\n/**\n * Tree-shaking guard. Force-references this renderer so bundlers (ESBuild/Vite) don't drop the\n * component in builds that only mount it dynamically via the ClassFactory/descriptor. Mirrors the\n * Cards/Cluster renderers' load guards; the parent wires this into a barrel/module load path.\n */\nexport function LoadGridViewRenderer(): void {\n // no-op; presence prevents tree-shaking of this component\n}\n"]}
@@ -1,5 +1,6 @@
1
1
  import { Type, EventEmitter } from '@angular/core';
2
2
  import { EntityInfo, IMetadataProvider } from '@memberjunction/core';
3
+ import { ExportColumn } from '@memberjunction/export-engine';
3
4
  /**
4
5
  * View-Type Plugin Architecture — Contracts
5
6
  * -----------------------------------------
@@ -190,6 +191,13 @@ export interface IViewRenderer<TConfig = unknown> {
190
191
  * @returns true when the export was initiated, false when it couldn't be (no data / unsupported).
191
192
  */
192
193
  exportRecords?(format?: 'csv' | 'excel' | 'json'): Promise<boolean>;
194
+ /**
195
+ * Optional: the columns this renderer is showing, in on-screen order and with on-screen headers.
196
+ * A host that exports on the renderer's behalf (the workspace toolbar's Export) uses this so its
197
+ * export matches the screen. Renderers without a column layout (Cards, Map, Timeline) omit it and
198
+ * the host falls back to the view's saved columns.
199
+ */
200
+ GetExportColumns?(): ExportColumn[];
193
201
  }
194
202
  /**
195
203
  * A generic, view-type-agnostic request from a renderer for the host to change how it loads the
@@ -1 +1 @@
1
- {"version":3,"file":"view-type.contracts.d.ts","sourceRoot":"","sources":["../../../src/lib/view-types/view-type.contracts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAGrE;;;;;;;;;;;;;;;;;;GAkBG;AAEH;;;;;;;;GAQG;AACH,MAAM,WAAW,mBAAmB;IAClC;;;;OAIG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAEtB,oFAAoF;IACpF,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAE7B,gFAAgF;IAChF,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AgB,sBAAsB;IAKjC,kBAAkB,CAAiB;IAE5C;;;;OAIG;IACM,sBAAsB,GAAY,KAAK,CAAC;IAEjD;;;;OAIG;IACM,iBAAiB,GAAY,KAAK,CAAC;IAE5C;;;OAGG;IACH,cAAc,CAAC,OAAmB,EAAE,SAA6B;QAC/D,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,sBAAsB,CAAC,SAA6B;QACxD,mBAAmB;IACrB,CAAC;CACF;AAED;;;;;GAKG;AACH,MAAM,UAAU,qBAAqB;IACnC,kFAAkF;IAClF,KAAK,aAAa,CAAC;AACrB,CAAC","sourcesContent":["import { Type, EventEmitter } from '@angular/core';\nimport { EntityInfo, IMetadataProvider } from '@memberjunction/core';\nimport { RegisterClass } from '@memberjunction/global';\n\n/**\n * View-Type Plugin Architecture — Contracts\n * -----------------------------------------\n * This file defines the framework-level contracts for the entity-viewer's pluggable\n * view-type system. A \"view type\" is a way of rendering a set of entity records — the\n * built-in ones being Grid, Cards, Timeline, and Map, with future additions like\n * Cluster and Tag Cloud.\n *\n * The design separates three concerns:\n * 1. {@link IViewTypeDescriptor} — metadata + availability + the component types to mount.\n * Descriptors are discovered at runtime via the {@link https MemberJunction ClassFactory}\n * keyed off the `DriverClass` stored in the `MJ: View Types` entity.\n * 2. {@link IViewRenderer} — the contract a renderer component honors so the host can\n * feed it data and listen for selection/open/config events uniformly.\n * 3. {@link IViewPropSheet} — the contract a configuration prop-sheet component honors.\n *\n * Because this lives in an Angular package, it is acceptable for the descriptor to reference\n * Angular's `Type<T>` (it points at the concrete component classes to instantiate).\n */\n\n/**\n * Framework-agnostic-ish descriptor for a single view type.\n *\n * A descriptor is the bridge between the `MJ: View Types` metadata row (which stores\n * the `DriverClass` name) and the concrete Angular components that actually render the\n * view and edit its configuration. Descriptors are registered with the ClassFactory via\n * `@RegisterClass(BaseViewTypeDescriptor, '<DriverClass>')` so they can be discovered by\n * name without a hard import from the host.\n */\nexport interface IViewTypeDescriptor {\n /**\n * Stable internal key for the view type — matches the `DriverClass` column on the\n * `MJ: View Types` entity and the `@RegisterClass` registration key\n * (e.g. \"GridViewType\", \"CardsViewType\").\n */\n readonly Name: string;\n\n /** User-facing label shown in the view-mode switcher (e.g. \"Grid\", \"Tag Cloud\"). */\n readonly DisplayName: string;\n\n /** Font Awesome icon class shown in the switcher (e.g. \"fa-solid fa-table\"). */\n readonly Icon: string;\n\n /**\n * The Angular component class that renders this view type. The host instantiates /\n * mounts this component and feeds it data per the {@link IViewRenderer} contract.\n */\n readonly RendererComponent: Type<unknown>;\n\n /**\n * Optional Angular component class for this view type's configuration prop-sheet\n * (honors {@link IViewPropSheet}). Undefined when the view type has no configurable\n * options.\n */\n readonly PropSheetComponent?: Type<unknown>;\n\n /**\n * When `true`, this view type's `config.gridState` is backed by the **canonical**\n * `UserView.GridState` column (the single, framework-wide store for a view's\n * columns / sort / filter / aggregates — also read by `MJUserViewEntity.Columns`,\n * the GraphQL data provider's field list, and export) rather than by an opaque\n * per-view-type blob in `DisplayState.viewTypeConfigs`.\n *\n * The container honors this by (a) seeding the renderer's `config.gridState` from\n * the canonical store and (b) routing the renderer's `configChanged.gridState`\n * back to it on persist. This keeps the grid, the config panel, the server query,\n * and export all reading/writing one source of truth. Defaults to `false`, so\n * non-grid view types (Cards/Timeline/Map) keep their opaque per-type config.\n */\n readonly UsesCanonicalGridState?: boolean;\n\n /**\n * When `true`, this view type ships its OWN in-view export affordance (e.g. the Grid renderer's\n * in-toolbar \"Export\" button + {@link IViewRenderer.exportRecords}). Hosts use this to decide\n * whether to render a FALLBACK export button for view types that DON'T (Cards / Map / Timeline),\n * so every view type can export without a duplicate button on the ones that already have one.\n * Defaults to `false`. This is read off the (synchronously-resolved) descriptor rather than the\n * mounted renderer instance, so it's correct the instant the active view type changes.\n */\n readonly ProvidesOwnExport?: boolean;\n\n /**\n * Predicate that decides whether this view type is available for a given entity.\n * For example, Timeline requires a date field; Map requires geocoding support.\n * Grid and Cards are always available.\n *\n * @param entity the entity the viewer is currently displaying\n * @param provider optional metadata provider (for multi-provider scenarios)\n */\n IsAvailableFor(entity: EntityInfo, provider?: IMetadataProvider): boolean;\n\n /**\n * Optional async hook to load any data this descriptor's {@link IsAvailableFor} predicate\n * depends on (e.g. the Cluster view type needs the set of entities that have an active\n * Entity Document with vectors). The host awaits this once — before computing availability —\n * so the synchronous predicate can read from a now-populated cache. Implementations should\n * be cheap/idempotent (typically `await SomeEngine.Instance.Config(false, ...)`). Omit when\n * availability is computable purely from the {@link EntityInfo} (Grid/Cards/Timeline/Map).\n *\n * @param provider optional metadata provider (for multi-provider scenarios)\n */\n EnsureAvailabilityData?(provider?: IMetadataProvider): Promise<void>;\n}\n\n/**\n * Contract honored by a view renderer component. The host binds these inputs and\n * subscribes to these outputs uniformly across all view types.\n *\n * @typeParam TConfig the shape of this view type's configuration object\n */\nexport interface IViewRenderer<TConfig = unknown> {\n /** The entity whose records are being rendered. */\n entity: EntityInfo | null;\n\n /** The records to render (already loaded/filtered by the host). */\n records: Record<string, unknown>[];\n\n /** Primary-key string of the currently selected record, if any. */\n selectedRecordId: string | null;\n\n /** Active filter text (for highlighting / client-side concerns). */\n filterText: string | null;\n\n /** View-type-specific configuration. */\n config: TConfig;\n\n /**\n * Optional: the metadata provider, handed to plug-ins that issue their own data calls\n * (multi-provider safety). Generic — not specific to any one view type.\n */\n provider?: IMetadataProvider | null;\n\n /**\n * Optional generic data-context the host supplies alongside {@link records}. These are\n * universal \"a view of records\" concepts (counts, current page, loading) — NOT specific to any\n * view type — so a renderer that paginates or shows a total can read them, and one that doesn't\n * simply ignores them. The host owns the actual data fetch; these describe its current result.\n */\n totalRecordCount?: number;\n /** One-based current page of {@link records} when the host is paginating. */\n page?: number;\n /** Page size the host is using. */\n pageSize?: number;\n /** Whether the host is currently (re)loading the record set. */\n isLoading?: boolean;\n\n /** Emitted when a record is selected (single click). Payload is the raw record object. */\n recordSelected: EventEmitter<unknown>;\n\n /**\n * Emitted when THIS entity's record should be opened (double-click / open). Payload is the raw\n * record. This is a NAVIGATION request — the only category of signal that legitimately bubbles\n * to the outer app (routing lives there). Everything else a view does (export, add-to-list,\n * delete, …) is self-contained in the plug-in via Generic dialogs and never bubbles up.\n */\n recordOpened: EventEmitter<unknown>;\n\n /**\n * Optional: NAVIGATION request to open a *related* record on a DIFFERENT entity (e.g. a\n * foreign-key drill-through in a grid cell). Bubbles to the outer app for routing. Generic —\n * the container forwards it without acting on it.\n */\n openRelatedRecordRequested?: EventEmitter<ViewRelatedRecordNavigation>;\n\n /**\n * Optional: NAVIGATION request to create a new record of the current entity (e.g. a grid's\n * \"New\" button) — opening the create form is a routing concern owned by the outer app. Bubbles\n * up; the container forwards it without acting on it.\n */\n createRecordRequested?: EventEmitter<void>;\n\n /**\n * Emitted when the renderer mutates its own opaque {@link config} (e.g. timeline date field,\n * grid columns/sort/widths, map render mode). The container persists the blob verbatim against\n * the active `ViewTypeID` and never inspects it. (Container ↔ plug-in coordination inside the\n * Generic layer — NOT a signal that drives the outer app.)\n */\n configChanged: EventEmitter<TConfig>;\n\n /**\n * Optional: ask the container to (re)load the record set differently. The ONLY data-access\n * channel a plug-in has, fully generic — the container honors the request (sort / page /\n * load-all) without knowing which plug-in asked or why. A grid emits sort/page; a map emits\n * `{ loadAll: true }`; a plug-in happy with the records it's given emits nothing. The container\n * owns the actual `RunView`; no per-view-type branching. (Container ↔ plug-in coordination —\n * NOT a signal that drives the outer app.)\n */\n dataRequest?: EventEmitter<ViewDataRequest>;\n\n /**\n * Optional: ask the host to open this view's configuration UI (e.g. the workspace's config\n * panel). Generic — every view type has configurable settings (the descriptor's\n * {@link IViewTypeDescriptor.PropSheetComponent}); a plug-in raises this when the user invokes\n * an in-renderer affordance for it (e.g. the grid's \"Manage Columns\" toolbar item). The\n * container forwards it to the host, which owns the config UI; no per-view-type branching.\n * (Container ↔ plug-in coordination — NOT a signal that drives the outer app.)\n */\n configureRequested?: EventEmitter<void>;\n\n /**\n * Optional IMPERATIVE export entry point. A renderer that owns a self-contained export\n * affordance (e.g. the grid's export dialog) may expose this so an external driver — the\n * host's programmatic API, ultimately the AI agent — can trigger an export of the current\n * record set WITHOUT going through the renderer's own toolbar UI. Renderers that don't\n * support export simply don't implement it (the host treats absence as \"not exportable\").\n *\n * This is NOT a navigation/UI-coordination signal — it's a direct method call the host makes\n * on the active renderer, mirroring how export is otherwise self-contained in the plug-in.\n *\n * @param format optional output format ('csv' | 'excel' | 'json'); the renderer picks a sensible\n * default (typically 'excel') when omitted.\n * @returns true when the export was initiated, false when it couldn't be (no data / unsupported).\n */\n exportRecords?(format?: 'csv' | 'excel' | 'json'): Promise<boolean>;\n}\n\n/**\n * A generic, view-type-agnostic request from a renderer for the host to change how it loads the\n * record set. Every field is optional; the host applies whatever is present. No field names a\n * specific view type — these are universal data-access concepts.\n */\nexport interface ViewDataRequest {\n /** Desired sort, applied to the host's RunView OrderBy. Empty/omitted clears sorting. */\n sort?: Array<{ field: string; direction: 'asc' | 'desc' }>;\n /** One-based page to load (for paginated views). */\n page?: number;\n /** Page size to load. */\n pageSize?: number;\n /** When true, the host loads the full result set (up to its safety cap) instead of paginating. */\n loadAll?: boolean;\n}\n\n/**\n * A NAVIGATION request to open a record on a (possibly different) entity — the generic payload\n * for {@link IViewRenderer.openRelatedRecordRequested}. Routing lives in the outer app, so this\n * is one of the few signals that legitimately bubbles up. The container forwards it untouched.\n */\nexport interface ViewRelatedRecordNavigation {\n /** The entity whose record should be opened. */\n entityName: string;\n /** The record's key — a composite-key string or the raw key value(s). Opaque to the container. */\n recordKey: unknown;\n}\n\n/**\n * Contract honored by a view-type configuration prop-sheet component.\n *\n * @typeParam TConfig the shape of the configuration object being edited\n */\nexport interface IViewPropSheet<TConfig = unknown> {\n /** The entity the configuration applies to. */\n entity: EntityInfo | null;\n\n /** The current configuration being edited. */\n config: TConfig;\n\n /** Emitted when the user changes the configuration. */\n configChange: EventEmitter<TConfig>;\n}\n\n/**\n * Abstract base class for all view-type descriptors.\n *\n * Concrete descriptors extend this and register themselves with the ClassFactory:\n *\n * ```typescript\n * @RegisterClass(BaseViewTypeDescriptor, 'GridViewType')\n * export class GridViewType extends BaseViewTypeDescriptor {\n * readonly Name = 'GridViewType';\n * readonly DisplayName = 'Grid';\n * readonly Icon = 'fa-solid fa-table';\n * readonly RendererComponent = EntityDataGridComponent;\n * IsAvailableFor(): boolean { return true; }\n * }\n * ```\n *\n * The {@link ViewTypeEngine} resolves descriptors by `DriverClass` name after\n * probing ClassFactory registrations, then `CreateInstance`. Unregistered keys\n * (e.g. a seeded TagCloud row) are omitted rather than falling back to this base.\n *\n * NOTE: This class is registered with the ClassFactory itself (via subclasses) and is\n * intentionally NOT decorated — only concrete subclasses carry `@RegisterClass`.\n */\nexport abstract class BaseViewTypeDescriptor implements IViewTypeDescriptor {\n abstract readonly Name: string;\n abstract readonly DisplayName: string;\n abstract readonly Icon: string;\n abstract readonly RendererComponent: Type<unknown>;\n readonly PropSheetComponent?: Type<unknown>;\n\n /**\n * Default: this view type uses its own opaque per-view-type config (stored in\n * `DisplayState.viewTypeConfigs`). Override to `true` in a view type that renders the\n * canonical grid columns (see {@link IViewTypeDescriptor.UsesCanonicalGridState}).\n */\n readonly UsesCanonicalGridState: boolean = false;\n\n /**\n * Default: this view type has no built-in export UI, so a host should provide a fallback Export\n * affordance. Override to `true` in a view type that ships its own export (see\n * {@link IViewTypeDescriptor.ProvidesOwnExport}).\n */\n readonly ProvidesOwnExport: boolean = false;\n\n /**\n * Default availability: available for every entity. Override in subclasses that have\n * requirements (e.g. Timeline needs a date field, Map needs geocoding).\n */\n IsAvailableFor(_entity: EntityInfo, _provider?: IMetadataProvider): boolean {\n return true;\n }\n\n /**\n * Default: nothing to preload. Override in subclasses whose availability predicate needs\n * async data (e.g. the Cluster view type loading which entities have Entity Documents).\n */\n async EnsureAvailabilityData(_provider?: IMetadataProvider): Promise<void> {\n // no-op by default\n }\n}\n\n/**\n * Tree-shaking guard. Force-references {@link RegisterClass} so bundlers don't drop the\n * decorator import in builds that only touch this contracts module. Concrete descriptor\n * modules each carry their own `@RegisterClass` and load guard, but this keeps the base\n * module self-consistent.\n */\nexport function LoadViewTypeContracts(): void {\n // no-op; presence prevents tree-shaking of this module's side-effect-free exports\n void RegisterClass;\n}\n"]}
1
+ {"version":3,"file":"view-type.contracts.js","sourceRoot":"","sources":["../../../src/lib/view-types/view-type.contracts.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AA8QvD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,OAAgB,sBAAsB;IAKjC,kBAAkB,CAAiB;IAE5C;;;;OAIG;IACM,sBAAsB,GAAY,KAAK,CAAC;IAEjD;;;;OAIG;IACM,iBAAiB,GAAY,KAAK,CAAC;IAE5C;;;OAGG;IACH,cAAc,CAAC,OAAmB,EAAE,SAA6B;QAC/D,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,sBAAsB,CAAC,SAA6B;QACxD,mBAAmB;IACrB,CAAC;CACF;AAED;;;;;GAKG;AACH,MAAM,UAAU,qBAAqB;IACnC,kFAAkF;IAClF,KAAK,aAAa,CAAC;AACrB,CAAC","sourcesContent":["import { Type, EventEmitter } from '@angular/core';\nimport { EntityInfo, IMetadataProvider } from '@memberjunction/core';\nimport { ExportColumn } from '@memberjunction/export-engine';\nimport { RegisterClass } from '@memberjunction/global';\n\n/**\n * View-Type Plugin Architecture — Contracts\n * -----------------------------------------\n * This file defines the framework-level contracts for the entity-viewer's pluggable\n * view-type system. A \"view type\" is a way of rendering a set of entity records — the\n * built-in ones being Grid, Cards, Timeline, and Map, with future additions like\n * Cluster and Tag Cloud.\n *\n * The design separates three concerns:\n * 1. {@link IViewTypeDescriptor} — metadata + availability + the component types to mount.\n * Descriptors are discovered at runtime via the {@link https MemberJunction ClassFactory}\n * keyed off the `DriverClass` stored in the `MJ: View Types` entity.\n * 2. {@link IViewRenderer} — the contract a renderer component honors so the host can\n * feed it data and listen for selection/open/config events uniformly.\n * 3. {@link IViewPropSheet} — the contract a configuration prop-sheet component honors.\n *\n * Because this lives in an Angular package, it is acceptable for the descriptor to reference\n * Angular's `Type<T>` (it points at the concrete component classes to instantiate).\n */\n\n/**\n * Framework-agnostic-ish descriptor for a single view type.\n *\n * A descriptor is the bridge between the `MJ: View Types` metadata row (which stores\n * the `DriverClass` name) and the concrete Angular components that actually render the\n * view and edit its configuration. Descriptors are registered with the ClassFactory via\n * `@RegisterClass(BaseViewTypeDescriptor, '<DriverClass>')` so they can be discovered by\n * name without a hard import from the host.\n */\nexport interface IViewTypeDescriptor {\n /**\n * Stable internal key for the view type — matches the `DriverClass` column on the\n * `MJ: View Types` entity and the `@RegisterClass` registration key\n * (e.g. \"GridViewType\", \"CardsViewType\").\n */\n readonly Name: string;\n\n /** User-facing label shown in the view-mode switcher (e.g. \"Grid\", \"Tag Cloud\"). */\n readonly DisplayName: string;\n\n /** Font Awesome icon class shown in the switcher (e.g. \"fa-solid fa-table\"). */\n readonly Icon: string;\n\n /**\n * The Angular component class that renders this view type. The host instantiates /\n * mounts this component and feeds it data per the {@link IViewRenderer} contract.\n */\n readonly RendererComponent: Type<unknown>;\n\n /**\n * Optional Angular component class for this view type's configuration prop-sheet\n * (honors {@link IViewPropSheet}). Undefined when the view type has no configurable\n * options.\n */\n readonly PropSheetComponent?: Type<unknown>;\n\n /**\n * When `true`, this view type's `config.gridState` is backed by the **canonical**\n * `UserView.GridState` column (the single, framework-wide store for a view's\n * columns / sort / filter / aggregates — also read by `MJUserViewEntity.Columns`,\n * the GraphQL data provider's field list, and export) rather than by an opaque\n * per-view-type blob in `DisplayState.viewTypeConfigs`.\n *\n * The container honors this by (a) seeding the renderer's `config.gridState` from\n * the canonical store and (b) routing the renderer's `configChanged.gridState`\n * back to it on persist. This keeps the grid, the config panel, the server query,\n * and export all reading/writing one source of truth. Defaults to `false`, so\n * non-grid view types (Cards/Timeline/Map) keep their opaque per-type config.\n */\n readonly UsesCanonicalGridState?: boolean;\n\n /**\n * When `true`, this view type ships its OWN in-view export affordance (e.g. the Grid renderer's\n * in-toolbar \"Export\" button + {@link IViewRenderer.exportRecords}). Hosts use this to decide\n * whether to render a FALLBACK export button for view types that DON'T (Cards / Map / Timeline),\n * so every view type can export without a duplicate button on the ones that already have one.\n * Defaults to `false`. This is read off the (synchronously-resolved) descriptor rather than the\n * mounted renderer instance, so it's correct the instant the active view type changes.\n */\n readonly ProvidesOwnExport?: boolean;\n\n /**\n * Predicate that decides whether this view type is available for a given entity.\n * For example, Timeline requires a date field; Map requires geocoding support.\n * Grid and Cards are always available.\n *\n * @param entity the entity the viewer is currently displaying\n * @param provider optional metadata provider (for multi-provider scenarios)\n */\n IsAvailableFor(entity: EntityInfo, provider?: IMetadataProvider): boolean;\n\n /**\n * Optional async hook to load any data this descriptor's {@link IsAvailableFor} predicate\n * depends on (e.g. the Cluster view type needs the set of entities that have an active\n * Entity Document with vectors). The host awaits this once — before computing availability —\n * so the synchronous predicate can read from a now-populated cache. Implementations should\n * be cheap/idempotent (typically `await SomeEngine.Instance.Config(false, ...)`). Omit when\n * availability is computable purely from the {@link EntityInfo} (Grid/Cards/Timeline/Map).\n *\n * @param provider optional metadata provider (for multi-provider scenarios)\n */\n EnsureAvailabilityData?(provider?: IMetadataProvider): Promise<void>;\n}\n\n/**\n * Contract honored by a view renderer component. The host binds these inputs and\n * subscribes to these outputs uniformly across all view types.\n *\n * @typeParam TConfig the shape of this view type's configuration object\n */\nexport interface IViewRenderer<TConfig = unknown> {\n /** The entity whose records are being rendered. */\n entity: EntityInfo | null;\n\n /** The records to render (already loaded/filtered by the host). */\n records: Record<string, unknown>[];\n\n /** Primary-key string of the currently selected record, if any. */\n selectedRecordId: string | null;\n\n /** Active filter text (for highlighting / client-side concerns). */\n filterText: string | null;\n\n /** View-type-specific configuration. */\n config: TConfig;\n\n /**\n * Optional: the metadata provider, handed to plug-ins that issue their own data calls\n * (multi-provider safety). Generic — not specific to any one view type.\n */\n provider?: IMetadataProvider | null;\n\n /**\n * Optional generic data-context the host supplies alongside {@link records}. These are\n * universal \"a view of records\" concepts (counts, current page, loading) — NOT specific to any\n * view type — so a renderer that paginates or shows a total can read them, and one that doesn't\n * simply ignores them. The host owns the actual data fetch; these describe its current result.\n */\n totalRecordCount?: number;\n /** One-based current page of {@link records} when the host is paginating. */\n page?: number;\n /** Page size the host is using. */\n pageSize?: number;\n /** Whether the host is currently (re)loading the record set. */\n isLoading?: boolean;\n\n /** Emitted when a record is selected (single click). Payload is the raw record object. */\n recordSelected: EventEmitter<unknown>;\n\n /**\n * Emitted when THIS entity's record should be opened (double-click / open). Payload is the raw\n * record. This is a NAVIGATION request — the only category of signal that legitimately bubbles\n * to the outer app (routing lives there). Everything else a view does (export, add-to-list,\n * delete, …) is self-contained in the plug-in via Generic dialogs and never bubbles up.\n */\n recordOpened: EventEmitter<unknown>;\n\n /**\n * Optional: NAVIGATION request to open a *related* record on a DIFFERENT entity (e.g. a\n * foreign-key drill-through in a grid cell). Bubbles to the outer app for routing. Generic —\n * the container forwards it without acting on it.\n */\n openRelatedRecordRequested?: EventEmitter<ViewRelatedRecordNavigation>;\n\n /**\n * Optional: NAVIGATION request to create a new record of the current entity (e.g. a grid's\n * \"New\" button) — opening the create form is a routing concern owned by the outer app. Bubbles\n * up; the container forwards it without acting on it.\n */\n createRecordRequested?: EventEmitter<void>;\n\n /**\n * Emitted when the renderer mutates its own opaque {@link config} (e.g. timeline date field,\n * grid columns/sort/widths, map render mode). The container persists the blob verbatim against\n * the active `ViewTypeID` and never inspects it. (Container ↔ plug-in coordination inside the\n * Generic layer — NOT a signal that drives the outer app.)\n */\n configChanged: EventEmitter<TConfig>;\n\n /**\n * Optional: ask the container to (re)load the record set differently. The ONLY data-access\n * channel a plug-in has, fully generic — the container honors the request (sort / page /\n * load-all) without knowing which plug-in asked or why. A grid emits sort/page; a map emits\n * `{ loadAll: true }`; a plug-in happy with the records it's given emits nothing. The container\n * owns the actual `RunView`; no per-view-type branching. (Container ↔ plug-in coordination —\n * NOT a signal that drives the outer app.)\n */\n dataRequest?: EventEmitter<ViewDataRequest>;\n\n /**\n * Optional: ask the host to open this view's configuration UI (e.g. the workspace's config\n * panel). Generic — every view type has configurable settings (the descriptor's\n * {@link IViewTypeDescriptor.PropSheetComponent}); a plug-in raises this when the user invokes\n * an in-renderer affordance for it (e.g. the grid's \"Manage Columns\" toolbar item). The\n * container forwards it to the host, which owns the config UI; no per-view-type branching.\n * (Container ↔ plug-in coordination — NOT a signal that drives the outer app.)\n */\n configureRequested?: EventEmitter<void>;\n\n /**\n * Optional IMPERATIVE export entry point. A renderer that owns a self-contained export\n * affordance (e.g. the grid's export dialog) may expose this so an external driver — the\n * host's programmatic API, ultimately the AI agent — can trigger an export of the current\n * record set WITHOUT going through the renderer's own toolbar UI. Renderers that don't\n * support export simply don't implement it (the host treats absence as \"not exportable\").\n *\n * This is NOT a navigation/UI-coordination signal — it's a direct method call the host makes\n * on the active renderer, mirroring how export is otherwise self-contained in the plug-in.\n *\n * @param format optional output format ('csv' | 'excel' | 'json'); the renderer picks a sensible\n * default (typically 'excel') when omitted.\n * @returns true when the export was initiated, false when it couldn't be (no data / unsupported).\n */\n exportRecords?(format?: 'csv' | 'excel' | 'json'): Promise<boolean>;\n\n /**\n * Optional: the columns this renderer is showing, in on-screen order and with on-screen headers.\n * A host that exports on the renderer's behalf (the workspace toolbar's Export) uses this so its\n * export matches the screen. Renderers without a column layout (Cards, Map, Timeline) omit it and\n * the host falls back to the view's saved columns.\n */\n GetExportColumns?(): ExportColumn[];\n}\n\n/**\n * A generic, view-type-agnostic request from a renderer for the host to change how it loads the\n * record set. Every field is optional; the host applies whatever is present. No field names a\n * specific view type — these are universal data-access concepts.\n */\nexport interface ViewDataRequest {\n /** Desired sort, applied to the host's RunView OrderBy. Empty/omitted clears sorting. */\n sort?: Array<{ field: string; direction: 'asc' | 'desc' }>;\n /** One-based page to load (for paginated views). */\n page?: number;\n /** Page size to load. */\n pageSize?: number;\n /** When true, the host loads the full result set (up to its safety cap) instead of paginating. */\n loadAll?: boolean;\n}\n\n/**\n * A NAVIGATION request to open a record on a (possibly different) entity — the generic payload\n * for {@link IViewRenderer.openRelatedRecordRequested}. Routing lives in the outer app, so this\n * is one of the few signals that legitimately bubbles up. The container forwards it untouched.\n */\nexport interface ViewRelatedRecordNavigation {\n /** The entity whose record should be opened. */\n entityName: string;\n /** The record's key — a composite-key string or the raw key value(s). Opaque to the container. */\n recordKey: unknown;\n}\n\n/**\n * Contract honored by a view-type configuration prop-sheet component.\n *\n * @typeParam TConfig the shape of the configuration object being edited\n */\nexport interface IViewPropSheet<TConfig = unknown> {\n /** The entity the configuration applies to. */\n entity: EntityInfo | null;\n\n /** The current configuration being edited. */\n config: TConfig;\n\n /** Emitted when the user changes the configuration. */\n configChange: EventEmitter<TConfig>;\n}\n\n/**\n * Abstract base class for all view-type descriptors.\n *\n * Concrete descriptors extend this and register themselves with the ClassFactory:\n *\n * ```typescript\n * @RegisterClass(BaseViewTypeDescriptor, 'GridViewType')\n * export class GridViewType extends BaseViewTypeDescriptor {\n * readonly Name = 'GridViewType';\n * readonly DisplayName = 'Grid';\n * readonly Icon = 'fa-solid fa-table';\n * readonly RendererComponent = EntityDataGridComponent;\n * IsAvailableFor(): boolean { return true; }\n * }\n * ```\n *\n * The {@link ViewTypeEngine} resolves descriptors by `DriverClass` name after\n * probing ClassFactory registrations, then `CreateInstance`. Unregistered keys\n * (e.g. a seeded TagCloud row) are omitted rather than falling back to this base.\n *\n * NOTE: This class is registered with the ClassFactory itself (via subclasses) and is\n * intentionally NOT decorated — only concrete subclasses carry `@RegisterClass`.\n */\nexport abstract class BaseViewTypeDescriptor implements IViewTypeDescriptor {\n abstract readonly Name: string;\n abstract readonly DisplayName: string;\n abstract readonly Icon: string;\n abstract readonly RendererComponent: Type<unknown>;\n readonly PropSheetComponent?: Type<unknown>;\n\n /**\n * Default: this view type uses its own opaque per-view-type config (stored in\n * `DisplayState.viewTypeConfigs`). Override to `true` in a view type that renders the\n * canonical grid columns (see {@link IViewTypeDescriptor.UsesCanonicalGridState}).\n */\n readonly UsesCanonicalGridState: boolean = false;\n\n /**\n * Default: this view type has no built-in export UI, so a host should provide a fallback Export\n * affordance. Override to `true` in a view type that ships its own export (see\n * {@link IViewTypeDescriptor.ProvidesOwnExport}).\n */\n readonly ProvidesOwnExport: boolean = false;\n\n /**\n * Default availability: available for every entity. Override in subclasses that have\n * requirements (e.g. Timeline needs a date field, Map needs geocoding).\n */\n IsAvailableFor(_entity: EntityInfo, _provider?: IMetadataProvider): boolean {\n return true;\n }\n\n /**\n * Default: nothing to preload. Override in subclasses whose availability predicate needs\n * async data (e.g. the Cluster view type loading which entities have Entity Documents).\n */\n async EnsureAvailabilityData(_provider?: IMetadataProvider): Promise<void> {\n // no-op by default\n }\n}\n\n/**\n * Tree-shaking guard. Force-references {@link RegisterClass} so bundlers don't drop the\n * decorator import in builds that only touch this contracts module. Concrete descriptor\n * modules each carry their own `@RegisterClass` and load guard, but this keeps the base\n * module self-consistent.\n */\nexport function LoadViewTypeContracts(): void {\n // no-op; presence prevents tree-shaking of this module's side-effect-free exports\n void RegisterClass;\n}\n"]}
@@ -293,7 +293,14 @@ export declare class ViewWorkspaceComponent extends BaseAngularComponent impleme
293
293
  onExportRequested(): Promise<void>;
294
294
  /** Closes the workspace export dialog (the dialog performs the export + download itself). */
295
295
  onExportDialogClosed(_result: ExportDialogResult): void;
296
- /** Columns to export — from the active grid state, else the view's columns, else the entity fields. */
296
+ /**
297
+ * Columns to export: what the active renderer shows on screen (the grid), else the view's saved
298
+ * columns, else the entity fields. The fallbacks apply the grid's own rules, so Cards, Map and
299
+ * Timeline export the columns a grid of this view would show: saved settings are sorted by
300
+ * `orderIndex`, headed by the user's rename, resolved to the entity's field spelling (the export
301
+ * engine reads each row by that key), and dropped when the field no longer exists; fields the
302
+ * user is denied read access to are left out.
303
+ */
297
304
  private buildExportColumns;
298
305
  private buildExportFileName;
299
306
  /** Initializes the workspace and loads the per-user default grid state for the entity. */
@@ -1 +1 @@
1
- {"version":3,"file":"view-workspace.component.d.ts","sourceRoot":"","sources":["../../../src/lib/view-workspace/view-workspace.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,YAAY,EACZ,MAAM,EACN,iBAAiB,EAElB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EAAE,UAAU,EAAY,MAAM,sBAAsB,CAAC;AAE5D,OAAO,EACL,wBAAwB,EAExB,aAAa,EAKd,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,yBAAyB,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AAC/F,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AAI3F,OAAO,EACL,mBAAmB,EACnB,iBAAiB,EACjB,iBAAiB,EACjB,cAAc,EACd,sBAAsB,EACtB,eAAe,EACf,yBAAyB,EACzB,kBAAkB,EAClB,SAAS,EACT,aAAa,EACd,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,qBAAqB,EAAE,MAAM,0CAA0C,CAAC;AACjF,OAAO,EAAE,2BAA2B,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,0CAA0C,CAAC;AAC5H,OAAO,EAAE,wBAAwB,EAAE,aAAa,EAAE,MAAM,kDAAkD,CAAC;AAC3G,OAAO,EAAE,gBAAgB,EAAE,MAAM,oEAAoE,CAAC;AACtG,OAAO,EAAE,kBAAkB,EAAE,MAAM,0DAA0D,CAAC;;AAE9F;;;;;;;GAOG;AACH,MAAM,WAAW,wBAAwB,CAAC,CAAC,GAAG,OAAO;IACnD,mEAAmE;IACnE,IAAI,EAAE,CAAC,CAAC;IACR,4EAA4E;IAC5E,MAAM,EAAE,OAAO,CAAC;CACjB;AAED;;;;GAIG;AACH,MAAM,WAAW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AAoB,CAAC,SAAS,EAAE,OAAO,GAAG,IAAI;IAOrD;;;OAGG;IACU,WAAW,CAAC,KAAK,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;IAa9D,0FAA0F;YAC5E,gBAAgB;IAkB9B,8EAA8E;IACjE,kBAAkB,CAAC,MAAM,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC;IAgBxE,6CAA6C;IACtC,yBAAyB,IAAI,IAAI;IAMxC,0CAA0C;IACnC,gBAAgB,IAAI,IAAI;IAK/B,4FAA4F;IACrF,uBAAuB,CAAC,KAAK,EAAE,sBAAsB,GAAG,IAAI;IAcnE;;;OAGG;IACI,wBAAwB,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI;IAetD,qFAAqF;IACrF,OAAO,CAAC,qBAAqB;IA2C7B;;;;OAIG;IACU,oBAAoB,CAAC,KAAK,EAAE,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC;IAgB3E,sFAAsF;YACxE,gBAAgB;IAiC9B,0CAA0C;IACnC,iBAAiB,IAAI,IAAI;IAMhC,sFAAsF;IAC/E,oBAAoB,IAAI,IAAI;IAWnC;;;OAGG;IACU,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC;IAkB1C;;;OAGG;IACH,OAAO,CAAC,cAAc;IA2CtB,mGAAmG;IACnG,OAAO,CAAC,qBAAqB;IAa7B,mGAAmG;IACnG,OAAO,CAAC,cAAc;IAUtB,+EAA+E;IAC/E,OAAO,CAAC,oBAAoB;IAU5B;;;OAGG;IACH,OAAO,CAAC,kBAAkB;IAiC1B;;;OAGG;IACH,OAAO,CAAC,wBAAwB;yCA1xCrB,sBAAsB;2CAAtB,sBAAsB;CAozClC"}
@@ -403,19 +403,44 @@ export class ViewWorkspaceComponent extends BaseAngularComponent {
403
403
  this.exportDialogConfig = null;
404
404
  this.cdr.detectChanges();
405
405
  }
406
- /** Columns to export — from the active grid state, else the view's columns, else the entity fields. */
406
+ /**
407
+ * Columns to export: what the active renderer shows on screen (the grid), else the view's saved
408
+ * columns, else the entity fields. The fallbacks apply the grid's own rules, so Cards, Map and
409
+ * Timeline export the columns a grid of this view would show: saved settings are sorted by
410
+ * `orderIndex`, headed by the user's rename, resolved to the entity's field spelling (the export
411
+ * engine reads each row by that key), and dropped when the field no longer exists; fields the
412
+ * user is denied read access to are left out.
413
+ */
407
414
  buildExportColumns() {
408
- if (!this._entity) {
415
+ const entity = this._entity;
416
+ if (!entity) {
409
417
  return [];
410
418
  }
419
+ const onScreen = this.entityViewerRef?.GetExportColumns() ?? [];
420
+ if (onScreen.length > 0) {
421
+ return onScreen;
422
+ }
423
+ const user = this.ProviderToUse?.CurrentUser;
424
+ const denied = user ? entity.GetDeniedReadFields(user) : new Set();
425
+ const readable = (f) => !denied.has(f.Name.trim().toLowerCase());
411
426
  const gridCols = this.currentGridState?.columnSettings;
412
427
  if (gridCols && gridCols.length > 0) {
413
- return gridCols
428
+ const columns = [];
429
+ const sorted = [...gridCols]
414
430
  .filter(c => c.hidden !== true)
415
- .map(c => ({ name: c.Name, displayName: c.DisplayName || c.Name }));
431
+ .sort((a, b) => (a.orderIndex ?? 0) - (b.orderIndex ?? 0));
432
+ for (const c of sorted) {
433
+ const field = entity.Fields.find(f => f.Name.toLowerCase() === c.Name.toLowerCase());
434
+ if (field && readable(field)) {
435
+ columns.push({ name: field.Name, displayName: c.userDisplayName || c.DisplayName || field.DisplayNameOrName });
436
+ }
437
+ }
438
+ if (columns.length > 0) {
439
+ return columns;
440
+ }
416
441
  }
417
- return this._entity.Fields
418
- .filter(f => !f.IsVirtual)
442
+ return entity.Fields
443
+ .filter(f => !f.IsVirtual && readable(f))
419
444
  .map(f => ({ name: f.Name, displayName: f.DisplayNameOrName }));
420
445
  }
421
446
  buildExportFileName() {