@memberjunction/ng-entity-viewer 6.1.3 → 6.1.5

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.
Files changed (51) hide show
  1. package/dist/lib/aggregate-panel/aggregate-panel.component.d.ts +18 -2
  2. package/dist/lib/aggregate-panel/aggregate-panel.component.d.ts.map +1 -1
  3. package/dist/lib/aggregate-panel/aggregate-panel.component.js +47 -18
  4. package/dist/lib/aggregate-panel/aggregate-panel.component.js.map +1 -1
  5. package/dist/lib/entity-cards/entity-cards.component.d.ts +1 -0
  6. package/dist/lib/entity-cards/entity-cards.component.d.ts.map +1 -1
  7. package/dist/lib/entity-cards/entity-cards.component.js +11 -2
  8. package/dist/lib/entity-cards/entity-cards.component.js.map +1 -1
  9. package/dist/lib/entity-data-grid/entity-data-grid.component.d.ts +40 -7
  10. package/dist/lib/entity-data-grid/entity-data-grid.component.d.ts.map +1 -1
  11. package/dist/lib/entity-data-grid/entity-data-grid.component.js +137 -76
  12. package/dist/lib/entity-data-grid/entity-data-grid.component.js.map +1 -1
  13. package/dist/lib/entity-record-detail-panel/entity-record-detail-panel.component.d.ts.map +1 -1
  14. package/dist/lib/entity-record-detail-panel/entity-record-detail-panel.component.js +10 -8
  15. package/dist/lib/entity-record-detail-panel/entity-record-detail-panel.component.js.map +1 -1
  16. package/dist/lib/entity-viewer/entity-viewer.component.d.ts +6 -0
  17. package/dist/lib/entity-viewer/entity-viewer.component.d.ts.map +1 -1
  18. package/dist/lib/entity-viewer/entity-viewer.component.js +12 -1
  19. package/dist/lib/entity-viewer/entity-viewer.component.js.map +1 -1
  20. package/dist/lib/utils/aggregate-field.util.d.ts +21 -0
  21. package/dist/lib/utils/aggregate-field.util.d.ts.map +1 -0
  22. package/dist/lib/utils/aggregate-field.util.js +40 -0
  23. package/dist/lib/utils/aggregate-field.util.js.map +1 -0
  24. package/dist/lib/utils/export-column.util.d.ts +14 -0
  25. package/dist/lib/utils/export-column.util.d.ts.map +1 -0
  26. package/dist/lib/utils/export-column.util.js +34 -0
  27. package/dist/lib/utils/export-column.util.js.map +1 -0
  28. package/dist/lib/view-config-panel/view-config-panel.component.d.ts +5 -1
  29. package/dist/lib/view-config-panel/view-config-panel.component.d.ts.map +1 -1
  30. package/dist/lib/view-config-panel/view-config-panel.component.js +15 -8
  31. package/dist/lib/view-config-panel/view-config-panel.component.js.map +1 -1
  32. package/dist/lib/view-types/renderers/grid-view-renderer.component.d.ts +3 -0
  33. package/dist/lib/view-types/renderers/grid-view-renderer.component.d.ts.map +1 -1
  34. package/dist/lib/view-types/renderers/grid-view-renderer.component.js +5 -1
  35. package/dist/lib/view-types/renderers/grid-view-renderer.component.js.map +1 -1
  36. package/dist/lib/view-types/renderers/timeline-view-renderer.component.d.ts +2 -0
  37. package/dist/lib/view-types/renderers/timeline-view-renderer.component.d.ts.map +1 -1
  38. package/dist/lib/view-types/renderers/timeline-view-renderer.component.js +11 -2
  39. package/dist/lib/view-types/renderers/timeline-view-renderer.component.js.map +1 -1
  40. package/dist/lib/view-types/view-type.contracts.d.ts +8 -0
  41. package/dist/lib/view-types/view-type.contracts.d.ts.map +1 -1
  42. package/dist/lib/view-types/view-type.contracts.js.map +1 -1
  43. package/dist/lib/view-workspace/view-workspace.component.d.ts +9 -1
  44. package/dist/lib/view-workspace/view-workspace.component.d.ts.map +1 -1
  45. package/dist/lib/view-workspace/view-workspace.component.js +39 -8
  46. package/dist/lib/view-workspace/view-workspace.component.js.map +1 -1
  47. package/dist/public-api.d.ts +2 -0
  48. package/dist/public-api.d.ts.map +1 -1
  49. package/dist/public-api.js +2 -0
  50. package/dist/public-api.js.map +1 -1
  51. package/package.json +20 -19
@@ -1 +1 @@
1
- {"version":3,"file":"view-type.contracts.js","sourceRoot":"","sources":["../../../src/lib/view-types/view-type.contracts.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAsQvD;;;;;;;;;;;;;;;;;;;;;;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 { 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,15 @@ 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. Each column carries the type the grid gives it, so a
303
+ * date-only field exports as its day (`YYYY-MM-DD`) here as it does from the grid.
304
+ */
297
305
  private buildExportColumns;
298
306
  private buildExportFileName;
299
307
  /** 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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;CA0xClC"}
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,EAAmB,UAAU,EAAY,MAAM,sBAAsB,CAAC;AAE7E,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;AAK3F,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,iBAAiB;IAChC,qGAAqG;IACrG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import { UUIDsEqual } from '@memberjunction/global';
5
5
  import { UserInfoEngine } from '@memberjunction/core-entities';
6
+ import { ExportColumnTypeForSQLType } from '../utils/export-column.util';
6
7
  import { MJNotificationService } from '@memberjunction/ng-notifications';
7
8
  import { EntityViewerComponent } from '../entity-viewer/entity-viewer.component';
8
9
  import { ViewSelectorComponent } from '../view-selector/view-selector.component';
@@ -403,20 +404,50 @@ export class ViewWorkspaceComponent extends BaseAngularComponent {
403
404
  this.exportDialogConfig = null;
404
405
  this.cdr.detectChanges();
405
406
  }
406
- /** Columns to export — from the active grid state, else the view's columns, else the entity fields. */
407
+ /**
408
+ * Columns to export: what the active renderer shows on screen (the grid), else the view's saved
409
+ * columns, else the entity fields. The fallbacks apply the grid's own rules, so Cards, Map and
410
+ * Timeline export the columns a grid of this view would show: saved settings are sorted by
411
+ * `orderIndex`, headed by the user's rename, resolved to the entity's field spelling (the export
412
+ * engine reads each row by that key), and dropped when the field no longer exists; fields the
413
+ * user is denied read access to are left out. Each column carries the type the grid gives it, so a
414
+ * date-only field exports as its day (`YYYY-MM-DD`) here as it does from the grid.
415
+ */
407
416
  buildExportColumns() {
408
- if (!this._entity) {
417
+ const entity = this._entity;
418
+ if (!entity) {
409
419
  return [];
410
420
  }
421
+ const onScreen = this.entityViewerRef?.GetExportColumns() ?? [];
422
+ if (onScreen.length > 0) {
423
+ return onScreen;
424
+ }
425
+ const user = this.ProviderToUse?.CurrentUser;
426
+ const denied = user ? entity.GetDeniedReadFields(user) : new Set();
427
+ const readable = (f) => !denied.has(f.Name.trim().toLowerCase());
411
428
  const gridCols = this.currentGridState?.columnSettings;
412
429
  if (gridCols && gridCols.length > 0) {
413
- return gridCols
430
+ const columns = [];
431
+ const sorted = [...gridCols]
414
432
  .filter(c => c.hidden !== true)
415
- .map(c => ({ name: c.Name, displayName: c.DisplayName || c.Name }));
433
+ .sort((a, b) => (a.orderIndex ?? 0) - (b.orderIndex ?? 0));
434
+ for (const c of sorted) {
435
+ const field = entity.Fields.find(f => f.Name.toLowerCase() === c.Name.toLowerCase());
436
+ if (field && readable(field)) {
437
+ columns.push({
438
+ name: field.Name,
439
+ displayName: c.userDisplayName || c.DisplayName || field.DisplayNameOrName,
440
+ dataType: ExportColumnTypeForSQLType(field.Type),
441
+ });
442
+ }
443
+ }
444
+ if (columns.length > 0) {
445
+ return columns;
446
+ }
416
447
  }
417
- return this._entity.Fields
418
- .filter(f => !f.IsVirtual)
419
- .map(f => ({ name: f.Name, displayName: f.DisplayNameOrName }));
448
+ return entity.Fields
449
+ .filter(f => !f.IsVirtual && readable(f))
450
+ .map(f => ({ name: f.Name, displayName: f.DisplayNameOrName, dataType: ExportColumnTypeForSQLType(f.Type) }));
420
451
  }
421
452
  buildExportFileName() {
422
453
  const viewName = this.currentViewEntity?.Name || 'Data';
@@ -1345,5 +1376,5 @@ export class ViewWorkspaceComponent extends BaseAngularComponent {
1345
1376
  type: ViewChild,
1346
1377
  args: [ViewConfigPanelComponent]
1347
1378
  }] }); })();
1348
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ViewWorkspaceComponent, { className: "ViewWorkspaceComponent", filePath: "src/lib/view-workspace/view-workspace.component.ts", lineNumber: 132 }); })();
1379
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ViewWorkspaceComponent, { className: "ViewWorkspaceComponent", filePath: "src/lib/view-workspace/view-workspace.component.ts", lineNumber: 133 }); })();
1349
1380
  //# sourceMappingURL=view-workspace.component.js.map