@memberjunction/ng-entity-viewer 5.42.0 → 5.43.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/entity-data-grid/entity-data-grid.component.d.ts +33 -2
- package/dist/lib/entity-data-grid/entity-data-grid.component.d.ts.map +1 -1
- package/dist/lib/entity-data-grid/entity-data-grid.component.js +240 -126
- package/dist/lib/entity-data-grid/entity-data-grid.component.js.map +1 -1
- package/dist/lib/entity-data-grid/models/grid-types.d.ts +8 -1
- package/dist/lib/entity-data-grid/models/grid-types.d.ts.map +1 -1
- package/dist/lib/entity-data-grid/models/grid-types.js.map +1 -1
- package/dist/lib/view-types/renderers/grid-view-renderer.component.d.ts +7 -1
- package/dist/lib/view-types/renderers/grid-view-renderer.component.d.ts.map +1 -1
- package/dist/lib/view-types/renderers/grid-view-renderer.component.js +12 -3
- package/dist/lib/view-types/renderers/grid-view-renderer.component.js.map +1 -1
- package/dist/module.d.ts +2 -1
- package/dist/module.d.ts.map +1 -1
- package/dist/module.js +10 -3
- package/dist/module.js.map +1 -1
- package/package.json +17 -15
|
@@ -384,7 +384,14 @@ export interface EntityActionConfig {
|
|
|
384
384
|
maxSelectedRecords?: number;
|
|
385
385
|
/** Invocation type (e.g., 'View', 'SingleRecord', 'MultiRecord') */
|
|
386
386
|
invocationType?: string;
|
|
387
|
-
/**
|
|
387
|
+
/**
|
|
388
|
+
* Optional runtime-UX driver key (the entity action invocation's `RuntimeUXDriverClass`). When present,
|
|
389
|
+
* the host should mount that interactive driver (e.g. the Record Process bulk-update runner in
|
|
390
|
+
* `@memberjunction/ng-entity-action-ux`) on `EntityActionRequested` instead of invoking the action
|
|
391
|
+
* blind. The grid stays generic — it only carries the key and emits the request; the parent mounts.
|
|
392
|
+
*/
|
|
393
|
+
runtimeUXDriverClass?: string;
|
|
394
|
+
/** Additional action metadata (e.g. the `RecordProcessID` a runtime-UX driver should run). */
|
|
388
395
|
metadata?: Record<string, unknown>;
|
|
389
396
|
}
|
|
390
397
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"grid-types.d.ts","sourceRoot":"","sources":["../../../../src/lib/entity-data-grid/models/grid-types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAI5C,OAAO,EACL,aAAa,EACb,SAAS,EACT,qBAAqB,EAErB,qBAAqB,EACrB,mBAAmB,EACnB,aAAa,EACd,MAAM,aAAa,CAAC;AAMrB;;;;;;GAMG;AACH,MAAM,MAAM,iBAAiB,GAAG,MAAM,GAAG,QAAQ,GAAG,UAAU,GAAG,UAAU,CAAC;AAE5E;;;;;;GAMG;AACH,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,MAAM,GAAG,KAAK,GAAG,OAAO,CAAC;AAE7D;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,YAAY,GAAG,UAAU,GAAG,MAAM,CAAC;AAExE;;GAEG;AACH,MAAM,MAAM,cAAc,GACtB,IAAI,GAAG,KAAK,GACZ,IAAI,GAAG,KAAK,GAAG,IAAI,GAAG,KAAK,GAC3B,UAAU,GAAG,YAAY,GAAG,UAAU,GACtC,QAAQ,GAAG,WAAW,GACtB,IAAI,GAAG,OAAO,CAAC;AAEnB;;GAEG;AACH,MAAM,MAAM,cAAc,GACtB,QAAQ,GACR,QAAQ,GACR,SAAS,GACT,MAAM,GACN,UAAU,GACV,UAAU,GACV,SAAS,GACT,QAAQ,CAAC;AAMb;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,+BAA+B;IAC/B,KAAK,EAAE,MAAM,CAAC;IAEd,6CAA6C;IAC7C,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,yCAAyC;IACzC,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAExB,iCAAiC;IACjC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,iCAAiC;IACjC,QAAQ,CAAC,EAAE,MAA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,kBAAkB;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,0BAA0B;IAC1B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,sBAAsB;IACtB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,4BAA4B;IAC5B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,yBAAyB;IACzB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,yBAAyB;IACzB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAMD;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IACjC,uBAAuB;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,mBAAmB;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,2BAA2B;IAC3B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,yCAAyC;IACzC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,mDAAmD;IACnD,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,kDAAkD;IAClD,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,iDAAiD;IACjD,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,oEAAoE;IACpE,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,
|
|
1
|
+
{"version":3,"file":"grid-types.d.ts","sourceRoot":"","sources":["../../../../src/lib/entity-data-grid/models/grid-types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAI5C,OAAO,EACL,aAAa,EACb,SAAS,EACT,qBAAqB,EAErB,qBAAqB,EACrB,mBAAmB,EACnB,aAAa,EACd,MAAM,aAAa,CAAC;AAMrB;;;;;;GAMG;AACH,MAAM,MAAM,iBAAiB,GAAG,MAAM,GAAG,QAAQ,GAAG,UAAU,GAAG,UAAU,CAAC;AAE5E;;;;;;GAMG;AACH,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,MAAM,GAAG,KAAK,GAAG,OAAO,CAAC;AAE7D;;GAEG;AACH,MAA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AC,EAAE,MAAM,CAAC;IACjC,6CAA6C;IAC7C,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,iCAAiC;IACjC,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAG7B,kEAAkE;IAClE,aAAa,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,QAAQ,CAAC;IACjD,4BAA4B;IAC5B,aAAa,CAAC,EAAE,MAAM,CAAC;IAGvB,oDAAoD;IACpD,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,sCAAsC;IACtC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAG1B,2CAA2C;IAC3C,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,gEAAgE;IAChE,WAAW,CAAC,EAAE,SAAS,GAAG,QAAQ,GAAG,aAAa,CAAC;IAGnD,oDAAoD;IACpD,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;GAEG;AACH,eAAO,MAAM,qBAAqB,EAAE,QAAQ,CAAC,gBAAgB,CAuC5D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"grid-types.js","sourceRoot":"","sources":["../../../../src/lib/entity-data-grid/models/grid-types.ts"],"names":[],"mappings":"AAEA,uEAAuE;AACvE,yEAAyE;AACzE,OAAO,EAOL,aAAa,EACd,MAAM,aAAa,CAAC;AAokBrB;;GAEG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAA+B;IAC/D,sCAAsC;IACtC,WAAW,EAAE,UAAU;IACvB,gBAAgB,EAAE,EAAE,EAAG,2BAA2B;IAClD,eAAe,EAAE,EAAE,EAAI,2BAA2B;IAClD,YAAY,EAAE,IAAI;IAElB,yDAAyD;IACzD,aAAa,EAAE,IAAI;IACnB,oBAAoB,EAAE,QAAQ;IAC9B,gBAAgB,EAAE,IAAI;IACtB,uBAAuB,EAAE,GAAG;IAE5B,mCAAmC;IACnC,iBAAiB,EAAE,IAAI;IACvB,aAAa,EAAE,IAAI;IACnB,eAAe,EAAE,IAAI;IACrB,YAAY,EAAE,IAAI;IAClB,aAAa,EAAE,IAAI;IAEnB,0EAA0E;IAC1E,uBAAuB,EAAE,EAAE,EAAG,+CAA+C;IAC7E,uBAAuB,EAAE,CAAC;IAC1B,mBAAmB,EAAE,EAAE,EAAG,kDAAkD;IAE5E,2BAA2B;IAC3B,aAAa,EAAE,SAAS;IACxB,aAAa,EAAE,EAAE,EAAG,8CAA8C;IAElE,qCAAqC;IACrC,eAAe,EAAE,IAAI;IACrB,gBAAgB,EAAE,CAAC;IAEnB,oBAAoB;IACpB,YAAY,EAAE,CAAC;IACf,WAAW,EAAE,QAAQ;IAErB,eAAe;IACf,WAAW,EAAE,EAAE,CAAE,8CAA8C;CAChE,CAAC","sourcesContent":["import { TemplateRef } from '@angular/core';\n\n// Re-export shared types from the main types file to avoid duplication\n// These are used by both EntityGridComponent and EntityDataGridComponent\nexport {\n SortDirection,\n SortState,\n GridStateChangedEvent,\n // View grid types - re-exported from types.ts which gets them from core-entities\n ViewGridColumnSetting,\n ViewGridSortSetting,\n ViewGridState\n} from '../../types';\n\n// ========================================\n// Enums and Union Types\n// ========================================\n\n/**\n * Selection mode for the grid\n * - 'none': No selection allowed\n * - 'single': Only one row can be selected at a time\n * - 'multiple': Multiple rows can be selected (click to toggle)\n * - 'checkbox': Checkbox column for selection\n */\nexport type GridSelectionMode = 'none' | 'single' | 'multiple' | 'checkbox';\n\n/**\n * Edit mode for the grid\n * - 'none': No editing allowed\n * - 'cell': Individual cell editing\n * - 'row': Full row editing\n * - 'batch': Batch editing with explicit save\n */\nexport type GridEditMode = 'none' | 'cell' | 'row' | 'batch';\n\n/**\n * Grid lines display mode\n */\nexport type GridLinesMode = 'none' | 'horizontal' | 'vertical' | 'both';\n\n/**\n * Filter operators for column filtering\n */\nexport type FilterOperator =\n | 'eq' | 'neq'\n | 'gt' | 'gte' | 'lt' | 'lte'\n | 'contains' | 'startswith' | 'endswith'\n | 'isnull' | 'isnotnull'\n | 'in' | 'notin';\n\n/**\n * Column data type for formatting and editing\n */\nexport type GridColumnType =\n | 'string'\n | 'number'\n | 'boolean'\n | 'date'\n | 'datetime'\n | 'currency'\n | 'percent'\n | 'custom';\n\n// ========================================\n// Column Configuration\n// ========================================\n\n/**\n * Configuration for a single grid column\n */\nexport interface GridColumnConfig {\n /** Field name on the entity */\n field: string;\n\n /** Display title (defaults to field name) */\n title?: string;\n\n /** Column width in pixels (or 'auto') */\n width?: number | 'auto';\n\n /** Minimum width for resizing */\n minWidth?: number;\n\n /** Maximum width for resizing */\n maxWidth?: number;\n\n /** Column is visible */\n visible?: boolean;\n\n /** Column is sortable */\n sortable?: boolean;\n\n /** Column is filterable */\n filterable?: boolean;\n\n /** Column is editable */\n editable?: boolean;\n\n /** Column is resizable */\n resizable?: boolean;\n\n /** Column is reorderable */\n reorderable?: boolean;\n\n /** Data type for formatting and editing */\n type?: GridColumnType;\n\n /** Format string (e.g., 'yyyy-MM-dd' for dates, '#,##0.00' for numbers) */\n format?: string;\n\n /** Text alignment */\n align?: 'left' | 'center' | 'right';\n\n /** Header alignment (defaults to align) */\n headerAlign?: 'left' | 'center' | 'right';\n\n /** CSS class for cells - can be string or function */\n cellClass?: string | ((row: Record<string, unknown>, column: GridColumnConfig) => string);\n\n /** CSS class for header */\n headerClass?: string;\n\n /** Custom cell template reference */\n cellTemplate?: TemplateRef<GridCellTemplateContext>;\n\n /** Custom header template reference */\n headerTemplate?: TemplateRef<GridHeaderTemplateContext>;\n\n /** Custom editor template reference */\n editorTemplate?: TemplateRef<GridEditorTemplateContext>;\n\n /** Cell value formatter function */\n formatter?: (value: unknown, row: Record<string, unknown>, column: GridColumnConfig) => string;\n\n /** Cell style function */\n cellStyle?: (row: Record<string, unknown>, column: GridColumnConfig) => Record<string, string>;\n\n /** Whether to show tooltip on hover */\n showTooltip?: boolean;\n\n /** Custom tooltip content */\n tooltip?: string | ((row: Record<string, unknown>, column: GridColumnConfig) => string);\n\n /** Frozen column position (alias for pinned, for backward compatibility) */\n frozen?: 'left' | 'right' | false;\n\n /** Column pinning position (AG Grid terminology) */\n pinned?: 'left' | 'right' | null;\n\n /** Flex grow factor for auto-sizing columns */\n flex?: number;\n\n /** Column group (for grouped headers) */\n group?: string;\n\n /** Filter options for dropdown filters */\n filterOptions?: Array<{ value: unknown; label: string }>;\n\n /** Sort order index (for default multi-sort) */\n sortIndex?: number;\n\n /** Sort direction (for default sort) */\n sortDirection?: 'asc' | 'desc';\n}\n\n/**\n * Context provided to custom cell templates\n */\nexport interface GridCellTemplateContext {\n /** The row data (entity) */\n row: Record<string, unknown>;\n /** Column configuration */\n column: GridColumnConfig;\n /** The cell value */\n value: unknown;\n /** Row index in the current view */\n rowIndex: number;\n /** Whether the cell is currently being edited */\n isEditing: boolean;\n}\n\n/**\n * Context provided to custom header templates\n */\nexport interface GridHeaderTemplateContext {\n /** Column configuration */\n column: GridColumnConfig;\n /** Current sort direction for this column */\n sortDirection: 'asc' | 'desc' | 'none';\n /** Current filter value for this column */\n filterValue: unknown;\n}\n\n/**\n * Context provided to custom editor templates\n */\nexport interface GridEditorTemplateContext {\n /** The row data (entity) */\n row: Record<string, unknown>;\n /** Column configuration */\n column: GridColumnConfig;\n /** Current cell value */\n value: unknown;\n /** Row index in the current view */\n rowIndex: number;\n /** Function to commit the edit with a new value */\n commitEdit: (newValue: unknown) => void;\n /** Function to cancel the edit */\n cancelEdit: () => void;\n}\n\n// ========================================\n// Toolbar Configuration\n// ========================================\n\n/**\n * Configuration for the grid toolbar\n */\nexport interface GridToolbarConfig {\n /** Show search input */\n showSearch?: boolean;\n\n /** Search placeholder text */\n searchPlaceholder?: string;\n\n /** Search debounce time in ms */\n searchDebounce?: number;\n\n /** Show refresh button */\n showRefresh?: boolean;\n\n /** Show add button */\n showAdd?: boolean;\n\n /** Show delete button (for selected rows) */\n showDelete?: boolean;\n\n /** Show export button */\n showExport?: boolean;\n\n /** Export formats available */\n exportFormats?: Array<'excel' | 'csv' | 'json'>;\n\n /** Show column chooser button */\n showColumnChooser?: boolean;\n\n /** Show filter toggle button */\n showFilterToggle?: boolean;\n\n /** Custom toolbar buttons */\n customButtons?: GridToolbarButton[];\n\n /** Toolbar position */\n position?: 'top' | 'bottom' | 'both';\n\n /** Show row count */\n showRowCount?: boolean;\n\n /** Show selection count */\n showSelectionCount?: boolean;\n}\n\n/**\n * Custom toolbar button configuration\n */\nexport interface GridToolbarButton {\n /** Unique button ID */\n id: string;\n\n /** Button text */\n text?: string;\n\n /** Button icon (Font Awesome class) */\n icon?: string;\n\n /** Button tooltip */\n tooltip?: string;\n\n /** Button is disabled - can be boolean or function */\n disabled?: boolean | (() => boolean);\n\n /** Button is visible - can be boolean or function */\n visible?: boolean | (() => boolean);\n\n /** Button CSS class */\n cssClass?: string;\n\n /** Button position: 'left' | 'right' */\n position?: 'left' | 'right';\n\n /** Click handler (if not using event) */\n onClick?: () => void;\n}\n\n// ========================================\n// State Types (Extended for EntityDataGrid)\n// ========================================\n\n/**\n * Extended sort state with multi-sort index\n * Extends the base SortState from types.ts with an index for multi-sort ordering\n */\nexport interface DataGridSortState {\n /** Field name being sorted */\n field: string;\n /** Sort direction */\n direction: 'asc' | 'desc';\n /** Index for multi-sort ordering */\n index: number;\n}\n\n/**\n * Filter state for a column\n */\nexport interface FilterState {\n /** Field name being filtered */\n field: string;\n /** Filter operator */\n operator: FilterOperator;\n /** Filter value */\n value: unknown;\n}\n\n/**\n * Pending change for batch editing\n */\nexport interface PendingChange {\n /** Row key (usually ID) */\n rowKey: string;\n /** The row entity */\n row: Record<string, unknown>;\n /** Field that was changed */\n field: string;\n /** Original value */\n oldValue: unknown;\n /** New value */\n newValue: unknown;\n /** Type of change */\n changeType: 'update' | 'insert' | 'delete';\n}\n\n/**\n * Complete grid state for persistence (internal to EntityDataGrid)\n * Note: For UserView persistence, use ViewGridState from @memberjunction/core-entities\n */\nexport interface GridState {\n /** Column states */\n columns: Array<{\n field: string;\n width: number;\n visible: boolean;\n order: number;\n /** Column pinning position */\n pinned?: 'left' | 'right' | null;\n /** Flex grow factor for auto-sizing */\n flex?: number;\n /** Minimum column width */\n minWidth?: number;\n /** Maximum column width */\n maxWidth?: number;\n }>;\n /** Sort state */\n sort: DataGridSortState[];\n /** Filter state */\n filters: FilterState[];\n /** Selected row keys */\n selection: string[];\n}\n\n/**\n * Export options for grid data\n */\nexport interface ExportOptions {\n /** Export only visible columns */\n visibleColumnsOnly?: boolean;\n\n /** Export only selected rows */\n selectedRowsOnly?: boolean;\n\n /** Include headers */\n includeHeaders?: boolean;\n\n /** Custom column mapping */\n columnMapping?: Record<string, string>;\n}\n\n// ========================================\n// Event Types\n// ========================================\n\n/**\n * Event emitted when a foreign key link is clicked in the grid.\n * The parent component should handle navigation to the related record.\n */\nexport interface ForeignKeyClickEvent {\n /** The ID of the related entity (from EntityFieldInfo.RelatedEntityID) */\n relatedEntityId: string;\n /** The ID of the related record (the FK value) */\n recordId: string;\n /** The field name that was clicked */\n fieldName: string;\n /** The entity name of the related entity (if available) */\n relatedEntityName?: string;\n}\n\n// ========================================\n// Internal Types\n// ========================================\n\n/**\n * Internal representation of a rendered row\n */\nexport interface GridRowData {\n /** Row key (usually ID) */\n key: string;\n /** Row index in the data array */\n index: number;\n /** The entity object */\n entity: Record<string, unknown>;\n /** Whether the row is selected */\n selected: boolean;\n /** Whether the row is being edited */\n editing: boolean;\n /** Whether the row has unsaved changes */\n dirty: boolean;\n /** CSS classes for the row */\n cssClasses: string[];\n}\n\n/**\n * Virtual scroll viewport info\n */\nexport interface VirtualScrollState {\n /** First visible row index */\n startIndex: number;\n /** Last visible row index */\n endIndex: number;\n /** Scroll offset from top */\n scrollTop: number;\n /** Total scroll height */\n totalHeight: number;\n /** Viewport height */\n viewportHeight: number;\n /** Number of buffer rows above and below */\n bufferSize: number;\n}\n\n/**\n * Column runtime state (internal)\n */\nexport interface ColumnRuntimeState {\n /** Column configuration */\n config: GridColumnConfig;\n /** Computed width */\n computedWidth: number;\n /** Current sort direction */\n sortDirection: 'asc' | 'desc' | 'none';\n /** Sort index for multi-sort */\n sortIndex: number;\n /** Current filter value */\n filterValue: unknown;\n /** Current visibility */\n visible: boolean;\n /** Current order/position */\n order: number;\n}\n\n/**\n * RunView parameters subset for data loading\n */\nexport interface GridRunViewParams {\n /** Entity name */\n entityName: string;\n /** Extra filter clause */\n extraFilter?: string;\n /** Order by clause */\n orderBy?: string;\n /** Maximum rows to fetch */\n maxRows?: number;\n /** Fields to retrieve */\n fields?: string[];\n /** User search string */\n searchString?: string;\n}\n\n// ========================================\n// Entity Action Types\n// ========================================\n\n/**\n * Configuration for an entity action displayed in the grid toolbar.\n * This is a simplified representation of EntityAction for the UI layer.\n */\nexport interface EntityActionConfig {\n /** Unique action ID */\n id: string;\n /** Display name */\n name: string;\n /** Optional description */\n description?: string;\n /** Optional icon (Font Awesome class) */\n icon?: string;\n /** Whether the action requires selected records */\n requiresSelection?: boolean;\n /** Minimum number of selected records required */\n minSelectedRecords?: number;\n /** Maximum number of selected records allowed */\n maxSelectedRecords?: number;\n /** Invocation type (e.g., 'View', 'SingleRecord', 'MultiRecord') */\n invocationType?: string;\n /** Additional action metadata */\n metadata?: Record<string, unknown>;\n}\n\n// ========================================\n// Visual Customization Types\n// ========================================\n\n/**\n * Header style preset options\n */\nexport type GridHeaderStyle = 'flat' | 'elevated' | 'gradient' | 'bold';\n\n/**\n * Configuration for grid visual appearance\n * All properties are optional - defaults provide an attractive \"out of the box\" experience\n */\nexport interface GridVisualConfig {\n // Header Styling\n /** Header style preset: 'flat' | 'elevated' | 'gradient' | 'bold' */\n headerStyle?: GridHeaderStyle;\n /** Custom header background color (overrides preset) */\n headerBackground?: string;\n /** Custom header text color */\n headerTextColor?: string;\n /** Show bottom shadow/border on header */\n headerShadow?: boolean;\n\n // Row Styling\n /** Enable alternating row colors (zebra striping) */\n alternateRows?: boolean;\n /** Contrast level for alternating rows: 'subtle' | 'medium' | 'strong' */\n alternateRowContrast?: 'subtle' | 'medium' | 'strong';\n /** Enable smooth hover transitions */\n hoverTransitions?: boolean;\n /** Hover transition duration in ms */\n hoverTransitionDuration?: number;\n\n // Cell Formatting\n /** Right-align numeric columns automatically */\n rightAlignNumbers?: boolean;\n /** Format dates with a friendly format (e.g., \"Jan 15, 2024\" instead of \"2024-01-15\") */\n friendlyDates?: boolean;\n /** Render email cells as clickable mailto links */\n clickableEmails?: boolean;\n /** Render boolean cells as checkmark/x icons instead of text */\n booleanIcons?: boolean;\n /** Render URL cells as clickable links */\n clickableUrls?: boolean;\n\n // Selection Styling\n /** Color for selection indicator (left border on selected rows) */\n selectionIndicatorColor?: string;\n /** Width of selection indicator in pixels */\n selectionIndicatorWidth?: number;\n /** Selection background color */\n selectionBackground?: string;\n\n // Checkbox Column\n /** Style for checkbox column: 'default' | 'rounded' | 'filled' */\n checkboxStyle?: 'default' | 'rounded' | 'filled';\n /** Checkbox accent color */\n checkboxColor?: string;\n\n // Loading States\n /** Show skeleton loading rows instead of spinner */\n skeletonLoading?: boolean;\n /** Number of skeleton rows to show */\n skeletonRowCount?: number;\n\n // Borders & Spacing\n /** Border radius for the grid container */\n borderRadius?: number;\n /** Cell padding preset: 'compact' | 'normal' | 'comfortable' */\n cellPadding?: 'compact' | 'normal' | 'comfortable';\n\n // Accent Color (used for sort indicators, focus states, etc.)\n /** Primary accent color for interactive elements */\n accentColor?: string;\n}\n\n/**\n * Default visual configuration - provides attractive defaults out of the box\n */\nexport const DEFAULT_VISUAL_CONFIG: Required<GridVisualConfig> = {\n // Header - elevated style with shadow\n headerStyle: 'elevated',\n headerBackground: '', // Empty = use CSS variable\n headerTextColor: '', // Empty = use CSS variable\n headerShadow: true,\n\n // Rows - medium contrast zebra striping with transitions\n alternateRows: true,\n alternateRowContrast: 'medium',\n hoverTransitions: true,\n hoverTransitionDuration: 150,\n\n // Cell formatting - smart defaults\n rightAlignNumbers: true,\n friendlyDates: true,\n clickableEmails: true,\n booleanIcons: true,\n clickableUrls: true,\n\n // Selection - mellow yellow accent (avoids conflict with blue hyperlinks)\n selectionIndicatorColor: '', // Empty = use CSS variable --mj-status-warning\n selectionIndicatorWidth: 3,\n selectionBackground: '', // Empty = use CSS variable --mj-status-warning-bg\n\n // Checkbox - rounded style\n checkboxStyle: 'rounded',\n checkboxColor: '', // Empty = use CSS variable --mj-brand-primary\n\n // Loading - skeleton for modern feel\n skeletonLoading: true,\n skeletonRowCount: 8,\n\n // Borders & Spacing\n borderRadius: 0,\n cellPadding: 'normal',\n\n // Accent color\n accentColor: '' // Empty = use CSS variable --mj-brand-primary\n};\n"]}
|
|
1
|
+
{"version":3,"file":"grid-types.js","sourceRoot":"","sources":["../../../../src/lib/entity-data-grid/models/grid-types.ts"],"names":[],"mappings":"AAEA,uEAAuE;AACvE,yEAAyE;AACzE,OAAO,EAOL,aAAa,EACd,MAAM,aAAa,CAAC;AA2kBrB;;GAEG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAA+B;IAC/D,sCAAsC;IACtC,WAAW,EAAE,UAAU;IACvB,gBAAgB,EAAE,EAAE,EAAG,2BAA2B;IAClD,eAAe,EAAE,EAAE,EAAI,2BAA2B;IAClD,YAAY,EAAE,IAAI;IAElB,yDAAyD;IACzD,aAAa,EAAE,IAAI;IACnB,oBAAoB,EAAE,QAAQ;IAC9B,gBAAgB,EAAE,IAAI;IACtB,uBAAuB,EAAE,GAAG;IAE5B,mCAAmC;IACnC,iBAAiB,EAAE,IAAI;IACvB,aAAa,EAAE,IAAI;IACnB,eAAe,EAAE,IAAI;IACrB,YAAY,EAAE,IAAI;IAClB,aAAa,EAAE,IAAI;IAEnB,0EAA0E;IAC1E,uBAAuB,EAAE,EAAE,EAAG,+CAA+C;IAC7E,uBAAuB,EAAE,CAAC;IAC1B,mBAAmB,EAAE,EAAE,EAAG,kDAAkD;IAE5E,2BAA2B;IAC3B,aAAa,EAAE,SAAS;IACxB,aAAa,EAAE,EAAE,EAAG,8CAA8C;IAElE,qCAAqC;IACrC,eAAe,EAAE,IAAI;IACrB,gBAAgB,EAAE,CAAC;IAEnB,oBAAoB;IACpB,YAAY,EAAE,CAAC;IACf,WAAW,EAAE,QAAQ;IAErB,eAAe;IACf,WAAW,EAAE,EAAE,CAAE,8CAA8C;CAChE,CAAC","sourcesContent":["import { TemplateRef } from '@angular/core';\n\n// Re-export shared types from the main types file to avoid duplication\n// These are used by both EntityGridComponent and EntityDataGridComponent\nexport {\n SortDirection,\n SortState,\n GridStateChangedEvent,\n // View grid types - re-exported from types.ts which gets them from core-entities\n ViewGridColumnSetting,\n ViewGridSortSetting,\n ViewGridState\n} from '../../types';\n\n// ========================================\n// Enums and Union Types\n// ========================================\n\n/**\n * Selection mode for the grid\n * - 'none': No selection allowed\n * - 'single': Only one row can be selected at a time\n * - 'multiple': Multiple rows can be selected (click to toggle)\n * - 'checkbox': Checkbox column for selection\n */\nexport type GridSelectionMode = 'none' | 'single' | 'multiple' | 'checkbox';\n\n/**\n * Edit mode for the grid\n * - 'none': No editing allowed\n * - 'cell': Individual cell editing\n * - 'row': Full row editing\n * - 'batch': Batch editing with explicit save\n */\nexport type GridEditMode = 'none' | 'cell' | 'row' | 'batch';\n\n/**\n * Grid lines display mode\n */\nexport type GridLinesMode = 'none' | 'horizontal' | 'vertical' | 'both';\n\n/**\n * Filter operators for column filtering\n */\nexport type FilterOperator =\n | 'eq' | 'neq'\n | 'gt' | 'gte' | 'lt' | 'lte'\n | 'contains' | 'startswith' | 'endswith'\n | 'isnull' | 'isnotnull'\n | 'in' | 'notin';\n\n/**\n * Column data type for formatting and editing\n */\nexport type GridColumnType =\n | 'string'\n | 'number'\n | 'boolean'\n | 'date'\n | 'datetime'\n | 'currency'\n | 'percent'\n | 'custom';\n\n// ========================================\n// Column Configuration\n// ========================================\n\n/**\n * Configuration for a single grid column\n */\nexport interface GridColumnConfig {\n /** Field name on the entity */\n field: string;\n\n /** Display title (defaults to field name) */\n title?: string;\n\n /** Column width in pixels (or 'auto') */\n width?: number | 'auto';\n\n /** Minimum width for resizing */\n minWidth?: number;\n\n /** Maximum width for resizing */\n maxWidth?: number;\n\n /** Column is visible */\n visible?: boolean;\n\n /** Column is sortable */\n sortable?: boolean;\n\n /** Column is filterable */\n filterable?: boolean;\n\n /** Column is editable */\n editable?: boolean;\n\n /** Column is resizable */\n resizable?: boolean;\n\n /** Column is reorderable */\n reorderable?: boolean;\n\n /** Data type for formatting and editing */\n type?: GridColumnType;\n\n /** Format string (e.g., 'yyyy-MM-dd' for dates, '#,##0.00' for numbers) */\n format?: string;\n\n /** Text alignment */\n align?: 'left' | 'center' | 'right';\n\n /** Header alignment (defaults to align) */\n headerAlign?: 'left' | 'center' | 'right';\n\n /** CSS class for cells - can be string or function */\n cellClass?: string | ((row: Record<string, unknown>, column: GridColumnConfig) => string);\n\n /** CSS class for header */\n headerClass?: string;\n\n /** Custom cell template reference */\n cellTemplate?: TemplateRef<GridCellTemplateContext>;\n\n /** Custom header template reference */\n headerTemplate?: TemplateRef<GridHeaderTemplateContext>;\n\n /** Custom editor template reference */\n editorTemplate?: TemplateRef<GridEditorTemplateContext>;\n\n /** Cell value formatter function */\n formatter?: (value: unknown, row: Record<string, unknown>, column: GridColumnConfig) => string;\n\n /** Cell style function */\n cellStyle?: (row: Record<string, unknown>, column: GridColumnConfig) => Record<string, string>;\n\n /** Whether to show tooltip on hover */\n showTooltip?: boolean;\n\n /** Custom tooltip content */\n tooltip?: string | ((row: Record<string, unknown>, column: GridColumnConfig) => string);\n\n /** Frozen column position (alias for pinned, for backward compatibility) */\n frozen?: 'left' | 'right' | false;\n\n /** Column pinning position (AG Grid terminology) */\n pinned?: 'left' | 'right' | null;\n\n /** Flex grow factor for auto-sizing columns */\n flex?: number;\n\n /** Column group (for grouped headers) */\n group?: string;\n\n /** Filter options for dropdown filters */\n filterOptions?: Array<{ value: unknown; label: string }>;\n\n /** Sort order index (for default multi-sort) */\n sortIndex?: number;\n\n /** Sort direction (for default sort) */\n sortDirection?: 'asc' | 'desc';\n}\n\n/**\n * Context provided to custom cell templates\n */\nexport interface GridCellTemplateContext {\n /** The row data (entity) */\n row: Record<string, unknown>;\n /** Column configuration */\n column: GridColumnConfig;\n /** The cell value */\n value: unknown;\n /** Row index in the current view */\n rowIndex: number;\n /** Whether the cell is currently being edited */\n isEditing: boolean;\n}\n\n/**\n * Context provided to custom header templates\n */\nexport interface GridHeaderTemplateContext {\n /** Column configuration */\n column: GridColumnConfig;\n /** Current sort direction for this column */\n sortDirection: 'asc' | 'desc' | 'none';\n /** Current filter value for this column */\n filterValue: unknown;\n}\n\n/**\n * Context provided to custom editor templates\n */\nexport interface GridEditorTemplateContext {\n /** The row data (entity) */\n row: Record<string, unknown>;\n /** Column configuration */\n column: GridColumnConfig;\n /** Current cell value */\n value: unknown;\n /** Row index in the current view */\n rowIndex: number;\n /** Function to commit the edit with a new value */\n commitEdit: (newValue: unknown) => void;\n /** Function to cancel the edit */\n cancelEdit: () => void;\n}\n\n// ========================================\n// Toolbar Configuration\n// ========================================\n\n/**\n * Configuration for the grid toolbar\n */\nexport interface GridToolbarConfig {\n /** Show search input */\n showSearch?: boolean;\n\n /** Search placeholder text */\n searchPlaceholder?: string;\n\n /** Search debounce time in ms */\n searchDebounce?: number;\n\n /** Show refresh button */\n showRefresh?: boolean;\n\n /** Show add button */\n showAdd?: boolean;\n\n /** Show delete button (for selected rows) */\n showDelete?: boolean;\n\n /** Show export button */\n showExport?: boolean;\n\n /** Export formats available */\n exportFormats?: Array<'excel' | 'csv' | 'json'>;\n\n /** Show column chooser button */\n showColumnChooser?: boolean;\n\n /** Show filter toggle button */\n showFilterToggle?: boolean;\n\n /** Custom toolbar buttons */\n customButtons?: GridToolbarButton[];\n\n /** Toolbar position */\n position?: 'top' | 'bottom' | 'both';\n\n /** Show row count */\n showRowCount?: boolean;\n\n /** Show selection count */\n showSelectionCount?: boolean;\n}\n\n/**\n * Custom toolbar button configuration\n */\nexport interface GridToolbarButton {\n /** Unique button ID */\n id: string;\n\n /** Button text */\n text?: string;\n\n /** Button icon (Font Awesome class) */\n icon?: string;\n\n /** Button tooltip */\n tooltip?: string;\n\n /** Button is disabled - can be boolean or function */\n disabled?: boolean | (() => boolean);\n\n /** Button is visible - can be boolean or function */\n visible?: boolean | (() => boolean);\n\n /** Button CSS class */\n cssClass?: string;\n\n /** Button position: 'left' | 'right' */\n position?: 'left' | 'right';\n\n /** Click handler (if not using event) */\n onClick?: () => void;\n}\n\n// ========================================\n// State Types (Extended for EntityDataGrid)\n// ========================================\n\n/**\n * Extended sort state with multi-sort index\n * Extends the base SortState from types.ts with an index for multi-sort ordering\n */\nexport interface DataGridSortState {\n /** Field name being sorted */\n field: string;\n /** Sort direction */\n direction: 'asc' | 'desc';\n /** Index for multi-sort ordering */\n index: number;\n}\n\n/**\n * Filter state for a column\n */\nexport interface FilterState {\n /** Field name being filtered */\n field: string;\n /** Filter operator */\n operator: FilterOperator;\n /** Filter value */\n value: unknown;\n}\n\n/**\n * Pending change for batch editing\n */\nexport interface PendingChange {\n /** Row key (usually ID) */\n rowKey: string;\n /** The row entity */\n row: Record<string, unknown>;\n /** Field that was changed */\n field: string;\n /** Original value */\n oldValue: unknown;\n /** New value */\n newValue: unknown;\n /** Type of change */\n changeType: 'update' | 'insert' | 'delete';\n}\n\n/**\n * Complete grid state for persistence (internal to EntityDataGrid)\n * Note: For UserView persistence, use ViewGridState from @memberjunction/core-entities\n */\nexport interface GridState {\n /** Column states */\n columns: Array<{\n field: string;\n width: number;\n visible: boolean;\n order: number;\n /** Column pinning position */\n pinned?: 'left' | 'right' | null;\n /** Flex grow factor for auto-sizing */\n flex?: number;\n /** Minimum column width */\n minWidth?: number;\n /** Maximum column width */\n maxWidth?: number;\n }>;\n /** Sort state */\n sort: DataGridSortState[];\n /** Filter state */\n filters: FilterState[];\n /** Selected row keys */\n selection: string[];\n}\n\n/**\n * Export options for grid data\n */\nexport interface ExportOptions {\n /** Export only visible columns */\n visibleColumnsOnly?: boolean;\n\n /** Export only selected rows */\n selectedRowsOnly?: boolean;\n\n /** Include headers */\n includeHeaders?: boolean;\n\n /** Custom column mapping */\n columnMapping?: Record<string, string>;\n}\n\n// ========================================\n// Event Types\n// ========================================\n\n/**\n * Event emitted when a foreign key link is clicked in the grid.\n * The parent component should handle navigation to the related record.\n */\nexport interface ForeignKeyClickEvent {\n /** The ID of the related entity (from EntityFieldInfo.RelatedEntityID) */\n relatedEntityId: string;\n /** The ID of the related record (the FK value) */\n recordId: string;\n /** The field name that was clicked */\n fieldName: string;\n /** The entity name of the related entity (if available) */\n relatedEntityName?: string;\n}\n\n// ========================================\n// Internal Types\n// ========================================\n\n/**\n * Internal representation of a rendered row\n */\nexport interface GridRowData {\n /** Row key (usually ID) */\n key: string;\n /** Row index in the data array */\n index: number;\n /** The entity object */\n entity: Record<string, unknown>;\n /** Whether the row is selected */\n selected: boolean;\n /** Whether the row is being edited */\n editing: boolean;\n /** Whether the row has unsaved changes */\n dirty: boolean;\n /** CSS classes for the row */\n cssClasses: string[];\n}\n\n/**\n * Virtual scroll viewport info\n */\nexport interface VirtualScrollState {\n /** First visible row index */\n startIndex: number;\n /** Last visible row index */\n endIndex: number;\n /** Scroll offset from top */\n scrollTop: number;\n /** Total scroll height */\n totalHeight: number;\n /** Viewport height */\n viewportHeight: number;\n /** Number of buffer rows above and below */\n bufferSize: number;\n}\n\n/**\n * Column runtime state (internal)\n */\nexport interface ColumnRuntimeState {\n /** Column configuration */\n config: GridColumnConfig;\n /** Computed width */\n computedWidth: number;\n /** Current sort direction */\n sortDirection: 'asc' | 'desc' | 'none';\n /** Sort index for multi-sort */\n sortIndex: number;\n /** Current filter value */\n filterValue: unknown;\n /** Current visibility */\n visible: boolean;\n /** Current order/position */\n order: number;\n}\n\n/**\n * RunView parameters subset for data loading\n */\nexport interface GridRunViewParams {\n /** Entity name */\n entityName: string;\n /** Extra filter clause */\n extraFilter?: string;\n /** Order by clause */\n orderBy?: string;\n /** Maximum rows to fetch */\n maxRows?: number;\n /** Fields to retrieve */\n fields?: string[];\n /** User search string */\n searchString?: string;\n}\n\n// ========================================\n// Entity Action Types\n// ========================================\n\n/**\n * Configuration for an entity action displayed in the grid toolbar.\n * This is a simplified representation of EntityAction for the UI layer.\n */\nexport interface EntityActionConfig {\n /** Unique action ID */\n id: string;\n /** Display name */\n name: string;\n /** Optional description */\n description?: string;\n /** Optional icon (Font Awesome class) */\n icon?: string;\n /** Whether the action requires selected records */\n requiresSelection?: boolean;\n /** Minimum number of selected records required */\n minSelectedRecords?: number;\n /** Maximum number of selected records allowed */\n maxSelectedRecords?: number;\n /** Invocation type (e.g., 'View', 'SingleRecord', 'MultiRecord') */\n invocationType?: string;\n /**\n * Optional runtime-UX driver key (the entity action invocation's `RuntimeUXDriverClass`). When present,\n * the host should mount that interactive driver (e.g. the Record Process bulk-update runner in\n * `@memberjunction/ng-entity-action-ux`) on `EntityActionRequested` instead of invoking the action\n * blind. The grid stays generic — it only carries the key and emits the request; the parent mounts.\n */\n runtimeUXDriverClass?: string;\n /** Additional action metadata (e.g. the `RecordProcessID` a runtime-UX driver should run). */\n metadata?: Record<string, unknown>;\n}\n\n// ========================================\n// Visual Customization Types\n// ========================================\n\n/**\n * Header style preset options\n */\nexport type GridHeaderStyle = 'flat' | 'elevated' | 'gradient' | 'bold';\n\n/**\n * Configuration for grid visual appearance\n * All properties are optional - defaults provide an attractive \"out of the box\" experience\n */\nexport interface GridVisualConfig {\n // Header Styling\n /** Header style preset: 'flat' | 'elevated' | 'gradient' | 'bold' */\n headerStyle?: GridHeaderStyle;\n /** Custom header background color (overrides preset) */\n headerBackground?: string;\n /** Custom header text color */\n headerTextColor?: string;\n /** Show bottom shadow/border on header */\n headerShadow?: boolean;\n\n // Row Styling\n /** Enable alternating row colors (zebra striping) */\n alternateRows?: boolean;\n /** Contrast level for alternating rows: 'subtle' | 'medium' | 'strong' */\n alternateRowContrast?: 'subtle' | 'medium' | 'strong';\n /** Enable smooth hover transitions */\n hoverTransitions?: boolean;\n /** Hover transition duration in ms */\n hoverTransitionDuration?: number;\n\n // Cell Formatting\n /** Right-align numeric columns automatically */\n rightAlignNumbers?: boolean;\n /** Format dates with a friendly format (e.g., \"Jan 15, 2024\" instead of \"2024-01-15\") */\n friendlyDates?: boolean;\n /** Render email cells as clickable mailto links */\n clickableEmails?: boolean;\n /** Render boolean cells as checkmark/x icons instead of text */\n booleanIcons?: boolean;\n /** Render URL cells as clickable links */\n clickableUrls?: boolean;\n\n // Selection Styling\n /** Color for selection indicator (left border on selected rows) */\n selectionIndicatorColor?: string;\n /** Width of selection indicator in pixels */\n selectionIndicatorWidth?: number;\n /** Selection background color */\n selectionBackground?: string;\n\n // Checkbox Column\n /** Style for checkbox column: 'default' | 'rounded' | 'filled' */\n checkboxStyle?: 'default' | 'rounded' | 'filled';\n /** Checkbox accent color */\n checkboxColor?: string;\n\n // Loading States\n /** Show skeleton loading rows instead of spinner */\n skeletonLoading?: boolean;\n /** Number of skeleton rows to show */\n skeletonRowCount?: number;\n\n // Borders & Spacing\n /** Border radius for the grid container */\n borderRadius?: number;\n /** Cell padding preset: 'compact' | 'normal' | 'comfortable' */\n cellPadding?: 'compact' | 'normal' | 'comfortable';\n\n // Accent Color (used for sort indicators, focus states, etc.)\n /** Primary accent color for interactive elements */\n accentColor?: string;\n}\n\n/**\n * Default visual configuration - provides attractive defaults out of the box\n */\nexport const DEFAULT_VISUAL_CONFIG: Required<GridVisualConfig> = {\n // Header - elevated style with shadow\n headerStyle: 'elevated',\n headerBackground: '', // Empty = use CSS variable\n headerTextColor: '', // Empty = use CSS variable\n headerShadow: true,\n\n // Rows - medium contrast zebra striping with transitions\n alternateRows: true,\n alternateRowContrast: 'medium',\n hoverTransitions: true,\n hoverTransitionDuration: 150,\n\n // Cell formatting - smart defaults\n rightAlignNumbers: true,\n friendlyDates: true,\n clickableEmails: true,\n booleanIcons: true,\n clickableUrls: true,\n\n // Selection - mellow yellow accent (avoids conflict with blue hyperlinks)\n selectionIndicatorColor: '', // Empty = use CSS variable --mj-status-warning\n selectionIndicatorWidth: 3,\n selectionBackground: '', // Empty = use CSS variable --mj-status-warning-bg\n\n // Checkbox - rounded style\n checkboxStyle: 'rounded',\n checkboxColor: '', // Empty = use CSS variable --mj-brand-primary\n\n // Loading - skeleton for modern feel\n skeletonLoading: true,\n skeletonRowCount: 8,\n\n // Borders & Spacing\n borderRadius: 0,\n cellPadding: 'normal',\n\n // Accent color\n accentColor: '' // Empty = use CSS variable --mj-brand-primary\n};\n"]}
|
|
@@ -114,6 +114,12 @@ export declare class GridViewRendererComponent extends BaseAngularComponent impl
|
|
|
114
114
|
filterText: string | null;
|
|
115
115
|
/** Opaque per-view configuration. Seeds the grid bindings; mutated + re-emitted on grid changes. */
|
|
116
116
|
config: GridViewConfig;
|
|
117
|
+
/**
|
|
118
|
+
* When true (default), the grid self-loads the entity's active EntityActions and shows them — buttons
|
|
119
|
+
* appear only for entities that actually have actions (data-driven). Actions whose invocation names a
|
|
120
|
+
* `RuntimeUXDriverClass` mount that interactive driver (e.g. the Record Process runner) in-place.
|
|
121
|
+
*/
|
|
122
|
+
AutoLoadEntityActions: boolean;
|
|
117
123
|
/** Total record count across all pages, for the grid's pager. Fed into `[TotalRowCount]`. */
|
|
118
124
|
totalRecordCount?: number;
|
|
119
125
|
/** One-based current page the host is showing. Fed into `[PagerPageNumber]` (already 1-based). */
|
|
@@ -262,7 +268,7 @@ export declare class GridViewRendererComponent extends BaseAngularComponent impl
|
|
|
262
268
|
*/
|
|
263
269
|
private resolveEntityNameById;
|
|
264
270
|
static ɵfac: i0.ɵɵFactoryDeclaration<GridViewRendererComponent, never>;
|
|
265
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<GridViewRendererComponent, "mj-grid-view-renderer", never, { "entity": { "alias": "entity"; "required": false; }; "records": { "alias": "records"; "required": false; }; "selectedRecordId": { "alias": "selectedRecordId"; "required": false; }; "filterText": { "alias": "filterText"; "required": false; }; "config": { "alias": "config"; "required": false; }; "totalRecordCount": { "alias": "totalRecordCount"; "required": false; }; "page": { "alias": "page"; "required": false; }; "pageSize": { "alias": "pageSize"; "required": false; }; "isLoading": { "alias": "isLoading"; "required": false; }; }, { "recordSelected": "recordSelected"; "recordOpened": "recordOpened"; "configChanged": "configChanged"; "dataRequest": "dataRequest"; "openRelatedRecordRequested": "openRelatedRecordRequested"; "createRecordRequested": "createRecordRequested"; }, never, never, false, never>;
|
|
271
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<GridViewRendererComponent, "mj-grid-view-renderer", never, { "entity": { "alias": "entity"; "required": false; }; "records": { "alias": "records"; "required": false; }; "selectedRecordId": { "alias": "selectedRecordId"; "required": false; }; "filterText": { "alias": "filterText"; "required": false; }; "config": { "alias": "config"; "required": false; }; "AutoLoadEntityActions": { "alias": "AutoLoadEntityActions"; "required": false; }; "totalRecordCount": { "alias": "totalRecordCount"; "required": false; }; "page": { "alias": "page"; "required": false; }; "pageSize": { "alias": "pageSize"; "required": false; }; "isLoading": { "alias": "isLoading"; "required": false; }; }, { "recordSelected": "recordSelected"; "recordOpened": "recordOpened"; "configChanged": "configChanged"; "dataRequest": "dataRequest"; "openRelatedRecordRequested": "openRelatedRecordRequested"; "createRecordRequested": "createRecordRequested"; }, never, never, false, never>;
|
|
266
272
|
}
|
|
267
273
|
/**
|
|
268
274
|
* Tree-shaking guard. Force-references this renderer so bundlers (ESBuild/Vite) don't drop the
|
|
@@ -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,EAAY,MAAM,sBAAsB,CAAC;AAE3E,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,MAAM,mDAAmD,CAAC;;AAE5F;;;;;;;;GAQG;AACH,MAAM,WAAW,cAAc;IAC7B;;;;OAIG;IACH,SAAS,CAAC,EAAE,aAAa,CAAC;IAC1B,+EAA+E;IAC/E,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,kEAAkE;IAClE,aAAa,CAAC,EAAE,iBAAiB,CAAC;IAClC,gEAAgE;IAChE,aAAa,CAAC,EAAE,iBAAiB,CAAC;IAClC,iFAAiF;IACjF,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,kEAAkE;IAClE,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,sFAAsF;IACtF,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,MAAM,CAAC,EAAE,aAAa,CAAC;CACxB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwDG;AACH,
|
|
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,EAAY,MAAM,sBAAsB,CAAC;AAE3E,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,0B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;IAClF,iBAAiB,IAAI,IAAI;IAUzB,mGAAmG;IACnG,OAAO,CAAC,sBAAsB;IAY9B;;;OAGG;IACH,OAAO,CAAC,qBAAqB;yCA7ZlB,yBAAyB;2CAAzB,yBAAyB;CAoarC;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,IAAI,IAAI,CAE3C"}
|
|
@@ -89,6 +89,12 @@ export class GridViewRendererComponent extends BaseAngularComponent {
|
|
|
89
89
|
filterText = null;
|
|
90
90
|
/** Opaque per-view configuration. Seeds the grid bindings; mutated + re-emitted on grid changes. */
|
|
91
91
|
config = {};
|
|
92
|
+
/**
|
|
93
|
+
* When true (default), the grid self-loads the entity's active EntityActions and shows them — buttons
|
|
94
|
+
* appear only for entities that actually have actions (data-driven). Actions whose invocation names a
|
|
95
|
+
* `RuntimeUXDriverClass` mount that interactive driver (e.g. the Record Process runner) in-place.
|
|
96
|
+
*/
|
|
97
|
+
AutoLoadEntityActions = true;
|
|
92
98
|
// ---- IViewRenderer generic data-context inputs ----
|
|
93
99
|
/** Total record count across all pages, for the grid's pager. Fed into `[TotalRowCount]`. */
|
|
94
100
|
totalRecordCount;
|
|
@@ -431,7 +437,7 @@ export class GridViewRendererComponent extends BaseAngularComponent {
|
|
|
431
437
|
} if (rf & 2) {
|
|
432
438
|
let _t;
|
|
433
439
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.grid = _t.first);
|
|
434
|
-
} }, inputs: { entity: "entity", records: "records", selectedRecordId: "selectedRecordId", filterText: "filterText", config: "config", totalRecordCount: "totalRecordCount", page: "page", pageSize: "pageSize", isLoading: "isLoading" }, outputs: { recordSelected: "recordSelected", recordOpened: "recordOpened", configChanged: "configChanged", dataRequest: "dataRequest", openRelatedRecordRequested: "openRelatedRecordRequested", createRecordRequested: "createRecordRequested" }, standalone: false, features: [i0.ɵɵInheritDefinitionFeature], decls: 4, vars:
|
|
440
|
+
} }, inputs: { entity: "entity", records: "records", selectedRecordId: "selectedRecordId", filterText: "filterText", config: "config", AutoLoadEntityActions: "AutoLoadEntityActions", totalRecordCount: "totalRecordCount", page: "page", pageSize: "pageSize", isLoading: "isLoading" }, outputs: { recordSelected: "recordSelected", recordOpened: "recordOpened", configChanged: "configChanged", dataRequest: "dataRequest", openRelatedRecordRequested: "openRelatedRecordRequested", createRecordRequested: "createRecordRequested" }, standalone: false, features: [i0.ɵɵInheritDefinitionFeature], decls: 4, vars: 20, consts: [["grid", ""], [3, "AfterRowClick", "AfterRowDoubleClick", "AfterSort", "GridStateChanged", "SelectionChange", "NewButtonClick", "RefreshButtonClick", "DeleteButtonClick", "AddToListRequested", "ForeignKeyClick", "PageChange", "Provider", "Data", "Params", "FilterText", "GridState", "Height", "AllowLoad", "AutoLoadEntityActions", "ShowToolbar", "ToolbarConfig", "SelectionMode", "ShowAddToListButton", "ShowPager", "PageSize", "TotalRowCount", "PagerPageNumber"], [3, "Provider", "visible", "config"], ["Title", "Delete Records", "DetailMessage", "This action cannot be undone.", "ConfirmText", "Delete", "ConfirmStyle", "danger", "Icon", "fa-solid fa-trash", 3, "Confirmed", "Cancelled", "IsOpen", "Message"], [3, "complete", "cancel", "Provider", "visible", "config"]], template: function GridViewRendererComponent_Template(rf, ctx) { if (rf & 1) {
|
|
435
441
|
const _r1 = i0.ɵɵgetCurrentView();
|
|
436
442
|
i0.ɵɵelementStart(0, "mj-entity-data-grid", 1, 0);
|
|
437
443
|
i0.ɵɵlistener("AfterRowClick", function GridViewRendererComponent_Template_mj_entity_data_grid_AfterRowClick_0_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onAfterRowClick($event)); })("AfterRowDoubleClick", function GridViewRendererComponent_Template_mj_entity_data_grid_AfterRowDoubleClick_0_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onAfterRowDoubleClick($event)); })("AfterSort", function GridViewRendererComponent_Template_mj_entity_data_grid_AfterSort_0_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onAfterSort($event)); })("GridStateChanged", function GridViewRendererComponent_Template_mj_entity_data_grid_GridStateChanged_0_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onGridStateChanged($event)); })("SelectionChange", function GridViewRendererComponent_Template_mj_entity_data_grid_SelectionChange_0_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onSelectionChange($event)); })("NewButtonClick", function GridViewRendererComponent_Template_mj_entity_data_grid_NewButtonClick_0_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onNewButtonClick()); })("RefreshButtonClick", function GridViewRendererComponent_Template_mj_entity_data_grid_RefreshButtonClick_0_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onRefreshButtonClick()); })("DeleteButtonClick", function GridViewRendererComponent_Template_mj_entity_data_grid_DeleteButtonClick_0_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onDeleteButtonClick($event)); })("AddToListRequested", function GridViewRendererComponent_Template_mj_entity_data_grid_AddToListRequested_0_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onAddToListRequested($event)); })("ForeignKeyClick", function GridViewRendererComponent_Template_mj_entity_data_grid_ForeignKeyClick_0_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onForeignKeyClick($event)); })("PageChange", function GridViewRendererComponent_Template_mj_entity_data_grid_PageChange_0_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onPageChange($event)); });
|
|
@@ -441,7 +447,7 @@ export class GridViewRendererComponent extends BaseAngularComponent {
|
|
|
441
447
|
i0.ɵɵlistener("Confirmed", function GridViewRendererComponent_Template_mj_ev_confirm_dialog_Confirmed_3_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onDeleteConfirmed()); })("Cancelled", function GridViewRendererComponent_Template_mj_ev_confirm_dialog_Cancelled_3_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onDeleteCancelled()); });
|
|
442
448
|
i0.ɵɵelementEnd();
|
|
443
449
|
} if (rf & 2) {
|
|
444
|
-
i0.ɵɵproperty("Provider", ctx.Provider)("Data", ctx.records)("Params", ctx.effectiveParams)("FilterText", ctx.filterText ?? "")("GridState", ctx.config.gridState ?? null)("Height", "auto")("AllowLoad", false)("ShowToolbar", ctx.effectiveShowToolbar)("ToolbarConfig", ctx.config.toolbarConfig ?? i0.ɵɵpureFunction0(
|
|
450
|
+
i0.ɵɵproperty("Provider", ctx.Provider)("Data", ctx.records)("Params", ctx.effectiveParams)("FilterText", ctx.filterText ?? "")("GridState", ctx.config.gridState ?? null)("Height", "auto")("AllowLoad", false)("AutoLoadEntityActions", ctx.AutoLoadEntityActions)("ShowToolbar", ctx.effectiveShowToolbar)("ToolbarConfig", ctx.config.toolbarConfig ?? i0.ɵɵpureFunction0(19, _c1))("SelectionMode", ctx.effectiveSelectionMode)("ShowAddToListButton", ctx.effectiveShowAddToListButton)("ShowPager", ctx.effectiveShowPager)("PageSize", ctx.effectivePageSize)("TotalRowCount", ctx.totalRecordCount ?? 0)("PagerPageNumber", ctx.page ?? 1);
|
|
445
451
|
i0.ɵɵadvance(2);
|
|
446
452
|
i0.ɵɵconditional(ctx.listManagementConfig ? 2 : -1);
|
|
447
453
|
i0.ɵɵadvance();
|
|
@@ -460,6 +466,7 @@ export class GridViewRendererComponent extends BaseAngularComponent {
|
|
|
460
466
|
[GridState]="config.gridState ?? null"
|
|
461
467
|
[Height]="'auto'"
|
|
462
468
|
[AllowLoad]="false"
|
|
469
|
+
[AutoLoadEntityActions]="AutoLoadEntityActions"
|
|
463
470
|
[ShowToolbar]="effectiveShowToolbar"
|
|
464
471
|
[ToolbarConfig]="config.toolbarConfig ?? {}"
|
|
465
472
|
[SelectionMode]="effectiveSelectionMode"
|
|
@@ -522,6 +529,8 @@ export class GridViewRendererComponent extends BaseAngularComponent {
|
|
|
522
529
|
type: Input
|
|
523
530
|
}], config: [{
|
|
524
531
|
type: Input
|
|
532
|
+
}], AutoLoadEntityActions: [{
|
|
533
|
+
type: Input
|
|
525
534
|
}], totalRecordCount: [{
|
|
526
535
|
type: Input
|
|
527
536
|
}], page: [{
|
|
@@ -546,7 +555,7 @@ export class GridViewRendererComponent extends BaseAngularComponent {
|
|
|
546
555
|
type: ViewChild,
|
|
547
556
|
args: ['grid']
|
|
548
557
|
}] }); })();
|
|
549
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(GridViewRendererComponent, { className: "GridViewRendererComponent", filePath: "src/lib/view-types/renderers/grid-view-renderer.component.ts", lineNumber:
|
|
558
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(GridViewRendererComponent, { className: "GridViewRendererComponent", filePath: "src/lib/view-types/renderers/grid-view-renderer.component.ts", lineNumber: 183 }); })();
|
|
550
559
|
/**
|
|
551
560
|
* Tree-shaking guard. Force-references this renderer so bundlers (ESBuild/Vite) don't drop the
|
|
552
561
|
* 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,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAC3E,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;;;;;;;;;IAyIrE,oDAMC;IADC,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BAKL,KAAK;;kBAGL,KAAK;;kBAGL,KAAK;;kBAGL,KAAK;;kBAKL,MAAM;;kBAGN,MAAM;;kBAGN,MAAM;;kBAGN,MAAM;;kBAMN,MAAM;;kBAGN,MAAM;;kBAMN,SAAS;mBAAC,MAAM;;kFA9DN,yBAAyB;AA+ZtC;;;;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 } 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 [Params]=\"effectiveParams\"\n [FilterText]=\"filterText ?? ''\"\n [GridState]=\"config.gridState ?? null\"\n [Height]=\"'auto'\"\n [AllowLoad]=\"false\"\n [ShowToolbar]=\"effectiveShowToolbar\"\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 >\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 /** 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 // ---- 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 * 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 // 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 /** 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 list of RAW primary-key values (not concatenated composite-key strings) used by list\n * membership matching. Mirrors the legacy host, which deliberately extracts the first PK field's\n * raw value so it matches how List Details store records.\n */\n private buildRawRecordIds(records: Record<string, unknown>[], entity: EntityInfo): string[] {\n const pkFieldName = entity.PrimaryKeys[0]?.Name;\n if (!pkFieldName) {\n return [];\n }\n return records\n .map((record) => {\n const value = record[pkFieldName];\n return value == null ? '' : String(value);\n })\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,MAAM,sBAAsB,CAAC;AAC3E,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB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6BACI,KAAK,YACP,uBAAuB,iBAClB,iBAAiB,CAAC,IAAI,YAC3B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8DT;;kBAiBA,KAAK;;kBAGL,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;;kBAMN,MAAM;;kBAGN,MAAM;;kBAMN,SAAS;mBAAC,MAAM;;kFArEN,yBAAyB;AAsatC;;;;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 } 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 [Params]=\"effectiveParams\"\n [FilterText]=\"filterText ?? ''\"\n [GridState]=\"config.gridState ?? null\"\n [Height]=\"'auto'\"\n [AllowLoad]=\"false\"\n [AutoLoadEntityActions]=\"AutoLoadEntityActions\"\n [ShowToolbar]=\"effectiveShowToolbar\"\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 >\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 /** 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 * 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 // 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 /** 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 list of RAW primary-key values (not concatenated composite-key strings) used by list\n * membership matching. Mirrors the legacy host, which deliberately extracts the first PK field's\n * raw value so it matches how List Details store records.\n */\n private buildRawRecordIds(records: Record<string, unknown>[], entity: EntityInfo): string[] {\n const pkFieldName = entity.PrimaryKeys[0]?.Name;\n if (!pkFieldName) {\n return [];\n }\n return records\n .map((record) => {\n const value = record[pkFieldName];\n return value == null ? '' : String(value);\n })\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"]}
|
package/dist/module.d.ts
CHANGED
|
@@ -33,6 +33,7 @@ import * as i31 from "@memberjunction/ng-map-view";
|
|
|
33
33
|
import * as i32 from "@memberjunction/ng-record-changes";
|
|
34
34
|
import * as i33 from "@memberjunction/ng-ui-components";
|
|
35
35
|
import * as i34 from "@memberjunction/ng-filter-builder";
|
|
36
|
+
import * as i35 from "@memberjunction/ng-entity-action-ux";
|
|
36
37
|
/**
|
|
37
38
|
* EntityViewerModule - Provides components for viewing entity data
|
|
38
39
|
*
|
|
@@ -56,7 +57,7 @@ import * as i34 from "@memberjunction/ng-filter-builder";
|
|
|
56
57
|
*/
|
|
57
58
|
export declare class EntityViewerModule {
|
|
58
59
|
static ɵfac: i0.ɵɵFactoryDeclaration<EntityViewerModule, never>;
|
|
59
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<EntityViewerModule, [typeof i1.EntityCardsComponent, typeof i2.EntityViewerComponent, typeof i3.EntityRecordDetailPanelComponent, typeof i4.PillComponent, typeof i5.EntityDataGridComponent, typeof i6.ViewConfigPanelComponent, typeof i7.AggregatePanelComponent, typeof i8.AggregateSetupDialogComponent, typeof i9.ConfirmDialogComponent, typeof i10.QuickSaveDialogComponent, typeof i11.ViewHeaderComponent, typeof i12.DuplicateViewDialogComponent, typeof i13.SharedViewWarningDialogComponent, typeof i14.RecycleBinComponent, typeof i15.RecycleBinChipComponent, typeof i16.ViewSelectorComponent, typeof i17.ViewWorkspaceComponent, typeof i18.ViewTypeSwitcherComponent, typeof i19.CardsViewRendererComponent, typeof i20.GridViewRendererComponent, typeof i21.TimelineViewRendererComponent, typeof i22.MapViewRendererComponent], [typeof i23.CommonModule, typeof i24.FormsModule, typeof i25.AgGridModule, typeof i26.SharedGenericModule, typeof i27.PaginationComponent, typeof i28.TimelineModule, typeof i29.ExportServiceModule, typeof i30.ListManagementModule, typeof i31.MapViewModule, typeof i32.RecordChangesModule, typeof i33.MjSlidePanelComponent, typeof i33.MJButtonDirective, typeof i34.FilterBuilderModule], [typeof i1.EntityCardsComponent, typeof i2.EntityViewerComponent, typeof i3.EntityRecordDetailPanelComponent, typeof i4.PillComponent, typeof i5.EntityDataGridComponent, typeof i6.ViewConfigPanelComponent, typeof i7.AggregatePanelComponent, typeof i8.AggregateSetupDialogComponent, typeof i9.ConfirmDialogComponent, typeof i10.QuickSaveDialogComponent, typeof i11.ViewHeaderComponent, typeof i12.DuplicateViewDialogComponent, typeof i13.SharedViewWarningDialogComponent, typeof i14.RecycleBinComponent, typeof i16.ViewSelectorComponent, typeof i17.ViewWorkspaceComponent, typeof i18.ViewTypeSwitcherComponent]>;
|
|
60
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<EntityViewerModule, [typeof i1.EntityCardsComponent, typeof i2.EntityViewerComponent, typeof i3.EntityRecordDetailPanelComponent, typeof i4.PillComponent, typeof i5.EntityDataGridComponent, typeof i6.ViewConfigPanelComponent, typeof i7.AggregatePanelComponent, typeof i8.AggregateSetupDialogComponent, typeof i9.ConfirmDialogComponent, typeof i10.QuickSaveDialogComponent, typeof i11.ViewHeaderComponent, typeof i12.DuplicateViewDialogComponent, typeof i13.SharedViewWarningDialogComponent, typeof i14.RecycleBinComponent, typeof i15.RecycleBinChipComponent, typeof i16.ViewSelectorComponent, typeof i17.ViewWorkspaceComponent, typeof i18.ViewTypeSwitcherComponent, typeof i19.CardsViewRendererComponent, typeof i20.GridViewRendererComponent, typeof i21.TimelineViewRendererComponent, typeof i22.MapViewRendererComponent], [typeof i23.CommonModule, typeof i24.FormsModule, typeof i25.AgGridModule, typeof i26.SharedGenericModule, typeof i27.PaginationComponent, typeof i28.TimelineModule, typeof i29.ExportServiceModule, typeof i30.ListManagementModule, typeof i31.MapViewModule, typeof i32.RecordChangesModule, typeof i33.MjSlidePanelComponent, typeof i33.MJButtonDirective, typeof i34.FilterBuilderModule, typeof i35.EntityActionUXHostComponent], [typeof i1.EntityCardsComponent, typeof i2.EntityViewerComponent, typeof i3.EntityRecordDetailPanelComponent, typeof i4.PillComponent, typeof i5.EntityDataGridComponent, typeof i6.ViewConfigPanelComponent, typeof i7.AggregatePanelComponent, typeof i8.AggregateSetupDialogComponent, typeof i9.ConfirmDialogComponent, typeof i10.QuickSaveDialogComponent, typeof i11.ViewHeaderComponent, typeof i12.DuplicateViewDialogComponent, typeof i13.SharedViewWarningDialogComponent, typeof i14.RecycleBinComponent, typeof i16.ViewSelectorComponent, typeof i17.ViewWorkspaceComponent, typeof i18.ViewTypeSwitcherComponent]>;
|
|
60
61
|
static ɵinj: i0.ɵɵInjectorDeclaration<EntityViewerModule>;
|
|
61
62
|
}
|
|
62
63
|
//# sourceMappingURL=module.d.ts.map
|
package/dist/module.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../src/module.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../src/module.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgDA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,qBA6Da,kBAAkB;yCAAlB,kBAAkB;0CAAlB,kBAAkB;0CAAlB,kBAAkB;CAAI"}
|
package/dist/module.js
CHANGED
|
@@ -34,11 +34,15 @@ import { GridViewRendererComponent } from './lib/view-types/renderers/grid-view-
|
|
|
34
34
|
import { TimelineViewRendererComponent } from './lib/view-types/renderers/timeline-view-renderer.component';
|
|
35
35
|
import { MapViewRendererComponent } from './lib/view-types/renderers/map-view-renderer.component';
|
|
36
36
|
import { LoadViewTypeDescriptors } from './lib/view-types';
|
|
37
|
+
import { EntityActionUXHostComponent, LoadEntityActionUX } from '@memberjunction/ng-entity-action-ux';
|
|
37
38
|
import * as i0 from "@angular/core";
|
|
38
39
|
// Register the built-in view-type descriptors with the ClassFactory at module load.
|
|
39
40
|
// This force-references each @RegisterClass-decorated descriptor so bundlers don't
|
|
40
41
|
// tree-shake them out, making them discoverable by the ViewTypeEngine via DriverClass.
|
|
41
42
|
LoadViewTypeDescriptors();
|
|
43
|
+
// Force-reference the entity-action runtime-UX drivers (e.g. RecordProcessRunnerUX) so the ClassFactory
|
|
44
|
+
// can resolve them when the grid mounts a driver named by an entity action's RuntimeUXDriverClass.
|
|
45
|
+
LoadEntityActionUX();
|
|
42
46
|
/**
|
|
43
47
|
* EntityViewerModule - Provides components for viewing entity data
|
|
44
48
|
*
|
|
@@ -74,7 +78,8 @@ export class EntityViewerModule {
|
|
|
74
78
|
MapViewModule,
|
|
75
79
|
RecordChangesModule,
|
|
76
80
|
MjSlidePanelComponent,
|
|
77
|
-
FilterBuilderModule
|
|
81
|
+
FilterBuilderModule,
|
|
82
|
+
EntityActionUXHostComponent] });
|
|
78
83
|
}
|
|
79
84
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(EntityViewerModule, [{
|
|
80
85
|
type: NgModule,
|
|
@@ -116,7 +121,8 @@ export class EntityViewerModule {
|
|
|
116
121
|
RecordChangesModule,
|
|
117
122
|
MjSlidePanelComponent,
|
|
118
123
|
MJButtonDirective,
|
|
119
|
-
FilterBuilderModule
|
|
124
|
+
FilterBuilderModule,
|
|
125
|
+
EntityActionUXHostComponent
|
|
120
126
|
],
|
|
121
127
|
exports: [
|
|
122
128
|
EntityCardsComponent,
|
|
@@ -172,7 +178,8 @@ export class EntityViewerModule {
|
|
|
172
178
|
RecordChangesModule,
|
|
173
179
|
MjSlidePanelComponent,
|
|
174
180
|
MJButtonDirective,
|
|
175
|
-
FilterBuilderModule
|
|
181
|
+
FilterBuilderModule,
|
|
182
|
+
EntityActionUXHostComponent], exports: [EntityCardsComponent,
|
|
176
183
|
EntityViewerComponent,
|
|
177
184
|
EntityRecordDetailPanelComponent,
|
|
178
185
|
PillComponent,
|