@memberjunction/ng-entity-viewer 6.1.0-edge.4 → 6.1.0-edge.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/dist/lib/aggregate-panel/aggregate-panel.component.js +1 -1
  2. package/dist/lib/aggregate-setup-dialog/aggregate-setup-dialog.component.js +1 -1
  3. package/dist/lib/confirm-dialog/confirm-dialog.component.js +1 -1
  4. package/dist/lib/duplicate-view-dialog/duplicate-view-dialog.component.js +1 -1
  5. package/dist/lib/entity-cards/entity-cards.component.d.ts.map +1 -1
  6. package/dist/lib/entity-cards/entity-cards.component.js +20 -32
  7. package/dist/lib/entity-cards/entity-cards.component.js.map +1 -1
  8. package/dist/lib/entity-data-grid/entity-data-grid.component.d.ts +14 -1
  9. package/dist/lib/entity-data-grid/entity-data-grid.component.d.ts.map +1 -1
  10. package/dist/lib/entity-data-grid/entity-data-grid.component.js +253 -194
  11. package/dist/lib/entity-data-grid/entity-data-grid.component.js.map +1 -1
  12. package/dist/lib/entity-record-detail-panel/entity-record-detail-panel.component.js +1 -1
  13. package/dist/lib/entity-viewer/entity-viewer.component.d.ts +5 -0
  14. package/dist/lib/entity-viewer/entity-viewer.component.d.ts.map +1 -1
  15. package/dist/lib/entity-viewer/entity-viewer.component.js +51 -28
  16. package/dist/lib/entity-viewer/entity-viewer.component.js.map +1 -1
  17. package/dist/lib/quick-save-dialog/quick-save-dialog.component.js +1 -1
  18. package/dist/lib/recycle-bin/recycle-bin.component.d.ts.map +1 -1
  19. package/dist/lib/recycle-bin/recycle-bin.component.js +6 -1
  20. package/dist/lib/recycle-bin/recycle-bin.component.js.map +1 -1
  21. package/dist/lib/shared-view-warning-dialog/shared-view-warning-dialog.component.js +1 -1
  22. package/dist/lib/types.d.ts +21 -0
  23. package/dist/lib/types.d.ts.map +1 -1
  24. package/dist/lib/types.js +23 -0
  25. package/dist/lib/types.js.map +1 -1
  26. package/dist/lib/utils/record.util.d.ts.map +1 -1
  27. package/dist/lib/utils/record.util.js +1 -5
  28. package/dist/lib/utils/record.util.js.map +1 -1
  29. package/dist/lib/view-config-panel/view-config-panel.component.js +10 -10
  30. package/dist/lib/view-config-panel/view-config-panel.component.js.map +1 -1
  31. package/dist/lib/view-header/view-header.component.js +1 -1
  32. package/dist/lib/view-type-switcher/view-type-switcher.component.js +1 -1
  33. package/dist/lib/view-types/descriptors/map-view-type.d.ts +3 -2
  34. package/dist/lib/view-types/descriptors/map-view-type.d.ts.map +1 -1
  35. package/dist/lib/view-types/descriptors/map-view-type.js +5 -3
  36. package/dist/lib/view-types/descriptors/map-view-type.js.map +1 -1
  37. package/dist/lib/view-types/renderers/grid-view-renderer.component.d.ts +9 -3
  38. package/dist/lib/view-types/renderers/grid-view-renderer.component.d.ts.map +1 -1
  39. package/dist/lib/view-types/renderers/grid-view-renderer.component.js +24 -20
  40. package/dist/lib/view-types/renderers/grid-view-renderer.component.js.map +1 -1
  41. package/dist/lib/view-types/renderers/timeline-view-renderer.component.d.ts +2 -0
  42. package/dist/lib/view-types/renderers/timeline-view-renderer.component.d.ts.map +1 -1
  43. package/dist/lib/view-types/renderers/timeline-view-renderer.component.js +12 -0
  44. package/dist/lib/view-types/renderers/timeline-view-renderer.component.js.map +1 -1
  45. package/dist/lib/view-workspace/view-workspace.component.js +1 -1
  46. package/package.json +25 -25
@@ -188,7 +188,7 @@ export class ViewHeaderComponent {
188
188
  i0.ɵɵconditional(ctx.IsModified ? 5 : -1);
189
189
  i0.ɵɵadvance();
190
190
  i0.ɵɵconditional(ctx.IsModified && ctx.CanEdit ? 6 : -1);
191
- } }, dependencies: [i1.DefaultValueAccessor, i1.NgControlStatus, i1.NgModel], styles: [".view-header[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 12px;\n}\n\n.view-name-container[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n\n\n.view-name[_ngcontent-%COMP%] {\n font-size: 15px;\n font-weight: 500;\n color: var(--mj-text-primary);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n max-width: 250px;\n}\n\n.view-name.editable[_ngcontent-%COMP%] {\n cursor: pointer;\n border-bottom: 1px dashed transparent;\n transition: border-color 0.15s ease;\n}\n\n.view-name.editable[_ngcontent-%COMP%]:hover {\n border-bottom-color: var(--mj-brand-primary);\n color: var(--mj-brand-primary-hover);\n}\n\n\n\n.name-input[_ngcontent-%COMP%] {\n font-size: 15px;\n font-weight: 500;\n color: var(--mj-text-primary);\n padding: 2px 8px;\n border: 1px solid var(--mj-brand-primary);\n border-radius: 4px;\n outline: none;\n box-shadow: 0 0 0 3px color-mix(in srgb, var(--mj-brand-primary) 10%, transparent);\n max-width: 250px;\n}\n\n\n\n.shared-badge[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n color: var(--mj-text-muted);\n font-size: 13px;\n}\n\n.shared-badge[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 12px;\n}\n\n\n\n.modified-badge[_ngcontent-%COMP%] {\n display: inline-flex;\n align-items: center;\n padding: 2px 8px;\n background: var(--mj-status-warning-bg);\n color: var(--mj-status-warning-text);\n border-radius: 10px;\n font-size: 11px;\n font-weight: 600;\n text-transform: uppercase;\n letter-spacing: 0.5px;\n}\n\n\n\n.view-actions[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 4px;\n}\n\n.action-btn[_ngcontent-%COMP%] {\n width: 28px;\n height: 28px;\n border: none;\n border-radius: 6px;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n transition: all 0.15s ease;\n font-size: 12px;\n}\n\n.action-btn[_ngcontent-%COMP%]:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n}\n\n.action-btn.save-btn[_ngcontent-%COMP%] {\n background: var(--mj-brand-primary);\n color: var(--mj-text-inverse);\n}\n\n.action-btn.save-btn[_ngcontent-%COMP%]:hover:not(:disabled) {\n background: var(--mj-brand-primary-hover);\n}\n\n.action-btn.save-as-btn[_ngcontent-%COMP%] {\n background: var(--mj-bg-surface-sunken);\n color: var(--mj-text-secondary);\n}\n\n.action-btn.save-as-btn[_ngcontent-%COMP%]:hover:not(:disabled) {\n background: var(--mj-bg-surface-active);\n}\n\n.action-btn.revert-btn[_ngcontent-%COMP%] {\n background: var(--mj-bg-surface-sunken);\n color: var(--mj-text-secondary);\n}\n\n.action-btn.revert-btn[_ngcontent-%COMP%]:hover:not(:disabled) {\n background: var(--mj-status-error-bg);\n color: var(--mj-status-error);\n}"] });
191
+ } }, dependencies: [i1.DefaultValueAccessor, i1.NgControlStatus, i1.NgModel], styles: [".view-header[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 12px;\n}\n\n.view-name-container[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n\n.view-name[_ngcontent-%COMP%] {\n font-size: 15px;\n font-weight: 500;\n color: var(--mj-text-primary);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n max-width: 250px;\n}\n\n.view-name.editable[_ngcontent-%COMP%] {\n cursor: pointer;\n border-bottom: 1px dashed transparent;\n transition: border-color 0.15s ease;\n}\n\n.view-name.editable[_ngcontent-%COMP%]:hover {\n border-bottom-color: var(--mj-brand-primary);\n color: var(--mj-brand-primary-hover);\n}\n\n\n.name-input[_ngcontent-%COMP%] {\n font-size: 15px;\n font-weight: 500;\n color: var(--mj-text-primary);\n padding: 2px 8px;\n border: 1px solid var(--mj-brand-primary);\n border-radius: 4px;\n outline: none;\n box-shadow: 0 0 0 3px color-mix(in srgb, var(--mj-brand-primary) 10%, transparent);\n max-width: 250px;\n}\n\n\n.shared-badge[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n color: var(--mj-text-muted);\n font-size: 13px;\n}\n\n.shared-badge[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 12px;\n}\n\n\n.modified-badge[_ngcontent-%COMP%] {\n display: inline-flex;\n align-items: center;\n padding: 2px 8px;\n background: var(--mj-status-warning-bg);\n color: var(--mj-status-warning-text);\n border-radius: 10px;\n font-size: 11px;\n font-weight: 600;\n text-transform: uppercase;\n letter-spacing: 0.5px;\n}\n\n\n.view-actions[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 4px;\n}\n\n.action-btn[_ngcontent-%COMP%] {\n width: 28px;\n height: 28px;\n border: none;\n border-radius: 6px;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n transition: all 0.15s ease;\n font-size: 12px;\n}\n\n.action-btn[_ngcontent-%COMP%]:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n}\n\n.action-btn.save-btn[_ngcontent-%COMP%] {\n background: var(--mj-brand-primary);\n color: var(--mj-text-inverse);\n}\n\n.action-btn.save-btn[_ngcontent-%COMP%]:hover:not(:disabled) {\n background: var(--mj-brand-primary-hover);\n}\n\n.action-btn.save-as-btn[_ngcontent-%COMP%] {\n background: var(--mj-bg-surface-sunken);\n color: var(--mj-text-secondary);\n}\n\n.action-btn.save-as-btn[_ngcontent-%COMP%]:hover:not(:disabled) {\n background: var(--mj-bg-surface-active);\n}\n\n.action-btn.revert-btn[_ngcontent-%COMP%] {\n background: var(--mj-bg-surface-sunken);\n color: var(--mj-text-secondary);\n}\n\n.action-btn.revert-btn[_ngcontent-%COMP%]:hover:not(:disabled) {\n background: var(--mj-status-error-bg);\n color: var(--mj-status-error);\n}"] });
192
192
  }
193
193
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ViewHeaderComponent, [{
194
194
  type: Component,
@@ -193,7 +193,7 @@ export class ViewTypeSwitcherComponent extends BaseAngularComponent {
193
193
  i0.ɵɵconditionalCreate(0, ViewTypeSwitcherComponent_Conditional_0_Template, 7, 7, "div", 0);
194
194
  } if (rf & 2) {
195
195
  i0.ɵɵconditional(ctx.AvailableViewTypes.length > 1 ? 0 : -1);
196
- } }, styles: ["[_nghost-%COMP%] {\n display: inline-flex;\n}\n\n\n\n.toggle-btn[_ngcontent-%COMP%] {\n height: 32px;\n border: none;\n background: transparent;\n border-radius: 4px;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n color: var(--mj-text-muted);\n transition: all 0.15s ease;\n}\n\n.toggle-btn[_ngcontent-%COMP%]:hover {\n color: var(--mj-text-secondary);\n}\n\n.toggle-btn.active[_ngcontent-%COMP%] {\n background: var(--mj-bg-surface);\n color: var(--mj-brand-primary);\n}\n\n\n\n.view-type-dropdown[_ngcontent-%COMP%] {\n position: relative;\n display: inline-flex;\n}\n\n.view-type-dropdown-trigger[_ngcontent-%COMP%] {\n width: auto;\n gap: 6px;\n padding: 0 10px;\n border: 1px solid var(--mj-border-default);\n}\n\n.view-type-dropdown-trigger[_ngcontent-%COMP%]:hover {\n border-color: var(--mj-border-strong);\n}\n\n.view-type-dropdown-label[_ngcontent-%COMP%] {\n font-size: 13px;\n font-weight: 500;\n}\n\n.view-type-dropdown-caret[_ngcontent-%COMP%] {\n font-size: 10px;\n opacity: 0.7;\n}\n\n.view-type-dropdown-menu[_ngcontent-%COMP%] {\n position: absolute;\n top: calc(100% + 4px);\n right: 0;\n z-index: 20;\n min-width: 180px;\n background: var(--mj-bg-surface-elevated);\n border: 1px solid var(--mj-border-default);\n border-radius: 8px;\n box-shadow: 0 8px 24px color-mix(in srgb, var(--mj-text-primary) 14%, transparent);\n padding: 4px;\n display: flex;\n flex-direction: column;\n}\n\n.view-type-dropdown-item[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 10px;\n width: 100%;\n padding: 8px 10px;\n border: none;\n background: transparent;\n border-radius: 6px;\n cursor: pointer;\n color: var(--mj-text-secondary);\n font-size: 13px;\n text-align: left;\n transition: background 0.12s ease, color 0.12s ease;\n}\n\n.view-type-dropdown-item[_ngcontent-%COMP%]:hover {\n background: var(--mj-bg-surface-hover);\n color: var(--mj-text-primary);\n}\n\n.view-type-dropdown-item.active[_ngcontent-%COMP%] {\n color: var(--mj-brand-primary);\n background: color-mix(in srgb, var(--mj-brand-primary) 10%, transparent);\n}\n\n.view-type-dropdown-item[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n width: 16px;\n text-align: center;\n}"] });
196
+ } }, styles: ["[_nghost-%COMP%] {\n display: inline-flex;\n}\n\n\n.toggle-btn[_ngcontent-%COMP%] {\n height: 32px;\n border: none;\n background: transparent;\n border-radius: 4px;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n color: var(--mj-text-muted);\n transition: all 0.15s ease;\n}\n\n.toggle-btn[_ngcontent-%COMP%]:hover {\n color: var(--mj-text-secondary);\n}\n\n.toggle-btn.active[_ngcontent-%COMP%] {\n background: var(--mj-bg-surface);\n color: var(--mj-brand-primary);\n}\n\n\n.view-type-dropdown[_ngcontent-%COMP%] {\n position: relative;\n display: inline-flex;\n}\n\n.view-type-dropdown-trigger[_ngcontent-%COMP%] {\n width: auto;\n gap: 6px;\n padding: 0 10px;\n border: 1px solid var(--mj-border-default);\n}\n\n.view-type-dropdown-trigger[_ngcontent-%COMP%]:hover {\n border-color: var(--mj-border-strong);\n}\n\n.view-type-dropdown-label[_ngcontent-%COMP%] {\n font-size: 13px;\n font-weight: 500;\n}\n\n.view-type-dropdown-caret[_ngcontent-%COMP%] {\n font-size: 10px;\n opacity: 0.7;\n}\n\n.view-type-dropdown-menu[_ngcontent-%COMP%] {\n position: absolute;\n top: calc(100% + 4px);\n right: 0;\n z-index: 20;\n min-width: 180px;\n background: var(--mj-bg-surface-elevated);\n border: 1px solid var(--mj-border-default);\n border-radius: 8px;\n box-shadow: 0 8px 24px color-mix(in srgb, var(--mj-text-primary) 14%, transparent);\n padding: 4px;\n display: flex;\n flex-direction: column;\n}\n\n.view-type-dropdown-item[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 10px;\n width: 100%;\n padding: 8px 10px;\n border: none;\n background: transparent;\n border-radius: 6px;\n cursor: pointer;\n color: var(--mj-text-secondary);\n font-size: 13px;\n text-align: left;\n transition: background 0.12s ease, color 0.12s ease;\n}\n\n.view-type-dropdown-item[_ngcontent-%COMP%]:hover {\n background: var(--mj-bg-surface-hover);\n color: var(--mj-text-primary);\n}\n\n.view-type-dropdown-item.active[_ngcontent-%COMP%] {\n color: var(--mj-brand-primary);\n background: color-mix(in srgb, var(--mj-brand-primary) 10%, transparent);\n}\n\n.view-type-dropdown-item[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n width: 16px;\n text-align: center;\n}"] });
197
197
  }
198
198
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ViewTypeSwitcherComponent, [{
199
199
  type: Component,
@@ -3,8 +3,9 @@ import { EntityInfo, IMetadataProvider } from '@memberjunction/core';
3
3
  import { BaseViewTypeDescriptor } from '../view-type.contracts';
4
4
  /**
5
5
  * Map view type — renders geocoded records as markers on an interactive map. Available
6
- * only for entities that support geocoding (lifted from the host's `updateGeoCodingSupport`
7
- * logic, which checks `entity.SupportsGeoCoding`).
6
+ * when `SupportsGeoCoding` is on **or** the entity has GeoLatitude/GeoLongitude (including
7
+ * virtual display fields such as PrimaryAddressLatitude). GeoCodeSyncService is a separate
8
+ * write-side gate (writable Geo* only).
8
9
  *
9
10
  * Registration key (`DriverClass`) matches the `MJ: View Types` metadata seed:
10
11
  * `metadata/view-types/.view-types.json` → "MapViewType".
@@ -1 +1 @@
1
- {"version":3,"file":"map-view-type.d.ts","sourceRoot":"","sources":["../../../../src/lib/view-types/descriptors/map-view-type.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACrC,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAErE,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAGhE;;;;;;;GAOG;AACH,qBACa,WAAY,SAAQ,sBAAsB;IACrD,QAAQ,CAAC,IAAI,iBAAiB;IAC9B,QAAQ,CAAC,WAAW,SAAS;IAC7B,QAAQ,CAAC,IAAI,kCAAkC;IAC/C,QAAQ,CAAC,iBAAiB,EAAE,IAAI,CAAC,OAAO,CAAC,CAA4B;IAE5D,cAAc,CAAC,MAAM,EAAE,UAAU,EAAE,SAAS,CAAC,EAAE,iBAAiB,GAAG,OAAO;CAGpF;AAED,qFAAqF;AACrF,wBAAgB,eAAe,IAAI,IAAI,CAEtC"}
1
+ {"version":3,"file":"map-view-type.d.ts","sourceRoot":"","sources":["../../../../src/lib/view-types/descriptors/map-view-type.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACrC,OAAO,EAA2B,UAAU,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAE9F,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAGhE;;;;;;;;GAQG;AACH,qBACa,WAAY,SAAQ,sBAAsB;IACrD,QAAQ,CAAC,IAAI,iBAAiB;IAC9B,QAAQ,CAAC,WAAW,SAAS;IAC7B,QAAQ,CAAC,IAAI,kCAAkC;IAC/C,QAAQ,CAAC,iBAAiB,EAAE,IAAI,CAAC,OAAO,CAAC,CAA4B;IAE5D,cAAc,CAAC,MAAM,EAAE,UAAU,EAAE,SAAS,CAAC,EAAE,iBAAiB,GAAG,OAAO;CAGpF;AAED,qFAAqF;AACrF,wBAAgB,eAAe,IAAI,IAAI,CAEtC"}
@@ -4,13 +4,15 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
4
4
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
5
  return c > 3 && r && Object.defineProperty(target, key, r), r;
6
6
  };
7
+ import { EntityHasMapCoordinates } from '@memberjunction/core';
7
8
  import { RegisterClass } from '@memberjunction/global';
8
9
  import { BaseViewTypeDescriptor } from '../view-type.contracts';
9
10
  import { MapViewRendererComponent } from '../renderers/map-view-renderer.component';
10
11
  /**
11
12
  * Map view type — renders geocoded records as markers on an interactive map. Available
12
- * only for entities that support geocoding (lifted from the host's `updateGeoCodingSupport`
13
- * logic, which checks `entity.SupportsGeoCoding`).
13
+ * when `SupportsGeoCoding` is on **or** the entity has GeoLatitude/GeoLongitude (including
14
+ * virtual display fields such as PrimaryAddressLatitude). GeoCodeSyncService is a separate
15
+ * write-side gate (writable Geo* only).
14
16
  *
15
17
  * Registration key (`DriverClass`) matches the `MJ: View Types` metadata seed:
16
18
  * `metadata/view-types/.view-types.json` → "MapViewType".
@@ -21,7 +23,7 @@ let MapViewType = class MapViewType extends BaseViewTypeDescriptor {
21
23
  Icon = 'fa-solid fa-map-location-dot';
22
24
  RendererComponent = MapViewRendererComponent;
23
25
  IsAvailableFor(entity, _provider) {
24
- return !!(entity && entity.SupportsGeoCoding);
26
+ return !!(entity && EntityHasMapCoordinates(entity));
25
27
  }
26
28
  };
27
29
  MapViewType = __decorate([
@@ -1 +1 @@
1
- {"version":3,"file":"map-view-type.js","sourceRoot":"","sources":["../../../../src/lib/view-types/descriptors/map-view-type.ts"],"names":[],"mappings":";;;;;;AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,EAAE,wBAAwB,EAAE,MAAM,0CAA0C,CAAC;AAEpF;;;;;;;GAOG;AAEI,IAAM,WAAW,GAAjB,MAAM,WAAY,SAAQ,sBAAsB;IAC5C,IAAI,GAAG,aAAa,CAAC;IACrB,WAAW,GAAG,KAAK,CAAC;IACpB,IAAI,GAAG,8BAA8B,CAAC;IACtC,iBAAiB,GAAkB,wBAAwB,CAAC;IAE5D,cAAc,CAAC,MAAkB,EAAE,SAA6B;QACvE,OAAO,CAAC,CAAC,CAAC,MAAM,IAAI,MAAM,CAAC,iBAAiB,CAAC,CAAC;IAChD,CAAC;CACF,CAAA;AATY,WAAW;IADvB,aAAa,CAAC,sBAAsB,EAAE,aAAa,CAAC;GACxC,WAAW,CASvB;;AAED,qFAAqF;AACrF,MAAM,UAAU,eAAe;IAC7B,QAAQ;AACV,CAAC","sourcesContent":["import { Type } from '@angular/core';\nimport { EntityInfo, IMetadataProvider } from '@memberjunction/core';\nimport { RegisterClass } from '@memberjunction/global';\nimport { BaseViewTypeDescriptor } from '../view-type.contracts';\nimport { MapViewRendererComponent } from '../renderers/map-view-renderer.component';\n\n/**\n * Map view type — renders geocoded records as markers on an interactive map. Available\n * only for entities that support geocoding (lifted from the host's `updateGeoCodingSupport`\n * logic, which checks `entity.SupportsGeoCoding`).\n *\n * Registration key (`DriverClass`) matches the `MJ: View Types` metadata seed:\n * `metadata/view-types/.view-types.json` → \"MapViewType\".\n */\n@RegisterClass(BaseViewTypeDescriptor, 'MapViewType')\nexport class MapViewType extends BaseViewTypeDescriptor {\n readonly Name = 'MapViewType';\n readonly DisplayName = 'Map';\n readonly Icon = 'fa-solid fa-map-location-dot';\n readonly RendererComponent: Type<unknown> = MapViewRendererComponent;\n\n override IsAvailableFor(entity: EntityInfo, _provider?: IMetadataProvider): boolean {\n return !!(entity && entity.SupportsGeoCoding);\n }\n}\n\n/** Tree-shaking guard — call from a barrel/module to keep the registration alive. */\nexport function LoadMapViewType(): void {\n // no-op\n}\n"]}
1
+ {"version":3,"file":"map-view-type.js","sourceRoot":"","sources":["../../../../src/lib/view-types/descriptors/map-view-type.ts"],"names":[],"mappings":";;;;;;AACA,OAAO,EAAE,uBAAuB,EAAiC,MAAM,sBAAsB,CAAC;AAC9F,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,EAAE,wBAAwB,EAAE,MAAM,0CAA0C,CAAC;AAEpF;;;;;;;;GAQG;AAEI,IAAM,WAAW,GAAjB,MAAM,WAAY,SAAQ,sBAAsB;IAC5C,IAAI,GAAG,aAAa,CAAC;IACrB,WAAW,GAAG,KAAK,CAAC;IACpB,IAAI,GAAG,8BAA8B,CAAC;IACtC,iBAAiB,GAAkB,wBAAwB,CAAC;IAE5D,cAAc,CAAC,MAAkB,EAAE,SAA6B;QACvE,OAAO,CAAC,CAAC,CAAC,MAAM,IAAI,uBAAuB,CAAC,MAAM,CAAC,CAAC,CAAC;IACvD,CAAC;CACF,CAAA;AATY,WAAW;IADvB,aAAa,CAAC,sBAAsB,EAAE,aAAa,CAAC;GACxC,WAAW,CASvB;;AAED,qFAAqF;AACrF,MAAM,UAAU,eAAe;IAC7B,QAAQ;AACV,CAAC","sourcesContent":["import { Type } from '@angular/core';\nimport { EntityHasMapCoordinates, EntityInfo, IMetadataProvider } from '@memberjunction/core';\nimport { RegisterClass } from '@memberjunction/global';\nimport { BaseViewTypeDescriptor } from '../view-type.contracts';\nimport { MapViewRendererComponent } from '../renderers/map-view-renderer.component';\n\n/**\n * Map view type — renders geocoded records as markers on an interactive map. Available\n * when `SupportsGeoCoding` is on **or** the entity has GeoLatitude/GeoLongitude (including\n * virtual display fields such as PrimaryAddressLatitude). GeoCodeSyncService is a separate\n * write-side gate (writable Geo* only).\n *\n * Registration key (`DriverClass`) matches the `MJ: View Types` metadata seed:\n * `metadata/view-types/.view-types.json` → \"MapViewType\".\n */\n@RegisterClass(BaseViewTypeDescriptor, 'MapViewType')\nexport class MapViewType extends BaseViewTypeDescriptor {\n readonly Name = 'MapViewType';\n readonly DisplayName = 'Map';\n readonly Icon = 'fa-solid fa-map-location-dot';\n readonly RendererComponent: Type<unknown> = MapViewRendererComponent;\n\n override IsAvailableFor(entity: EntityInfo, _provider?: IMetadataProvider): boolean {\n return !!(entity && EntityHasMapCoordinates(entity));\n }\n}\n\n/** Tree-shaking guard — call from a barrel/module to keep the registration alive. */\nexport function LoadMapViewType(): void {\n // no-op\n}\n"]}
@@ -182,6 +182,11 @@ export declare class GridViewRendererComponent extends BaseAngularComponent impl
182
182
  protected deleteConfirmMessage: string;
183
183
  /** Effective toolbar visibility — defaults to `true` when not set in config. */
184
184
  get effectiveShowToolbar(): boolean;
185
+ /**
186
+ * Grid search defaults OFF when hosted in entity-viewer. The container already owns
187
+ * `filterText` ("Filter records..."). Opt in with `toolbarConfig.showSearch: true`.
188
+ */
189
+ get effectiveShowSearch(): boolean;
185
190
  /** Effective selection mode — defaults to `'checkbox'` when not set in config. */
186
191
  get effectiveSelectionMode(): GridSelectionMode;
187
192
  /** Effective add-to-list button visibility — defaults to `true` when not set in config. */
@@ -263,9 +268,10 @@ export declare class GridViewRendererComponent extends BaseAngularComponent impl
263
268
  */
264
269
  private getRecordDisplayName;
265
270
  /**
266
- * Build the list of RAW primary-key values (not concatenated composite-key strings) used by list
267
- * membership matching. Mirrors the legacy host, which deliberately extracts the first PK field's
268
- * raw value so it matches how List Details store records.
271
+ * Build the record-id strings used by list membership matching, in the compact form `MJ: List Details`
272
+ * stores in `RecordID`: the bare value for a single-column primary key (whatever the column is called),
273
+ * or the full `Field1|Value1||Field2|Value2` segment for a composite key. The entity is arbitrary, so the
274
+ * key is built from all of its primary-key columns rather than assuming a single `ID`.
269
275
  */
270
276
  private buildRawRecordIds;
271
277
  /**
@@ -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,i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EAAE,GAAG,IAAI;IAW7D;;;;;OAKG;IACG,iBAAiB,IAAI,OAAO,CAAC,IAAI,CAAC;IAqCxC,kFAAkF;IAClF,iBAAiB,IAAI,IAAI;IAUzB,mGAAmG;IACnG,OAAO,CAAC,sBAAsB;IAY9B;;;OAGG;IACH,OAAO,CAAC,qBAAqB;yCA5blB,yBAAyB;2CAAzB,yBAAyB;CAmcrC;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,IAAI,IAAI,CAE3C"}
1
+ {"version":3,"file":"grid-view-renderer.component.d.ts","sourceRoot":"","sources":["../../../../src/lib/view-types/renderers/grid-view-renderer.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,YAAY,EAA2D,MAAM,eAAe,CAAC;AAChI,OAAO,EAAE,UAAU,EAAE,aAAa,EAA0B,MAAM,sBAAsB,CAAC;AAEzF,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,0BAA0B,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AACtG,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,2BAA2B,EAAE,MAAM,wBAAwB,CAAC;AACrG,OAAO,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,OAA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Output, EventEmitter, ViewEncapsulation, ViewChild, ChangeDetectorRef, inject } from '@angular/core';
2
- import { LogError } from '@memberjunction/core';
2
+ import { LogError, CompositeKey } from '@memberjunction/core';
3
3
  import { UUIDsEqual } from '@memberjunction/global';
4
4
  import { BaseAngularComponent } from '@memberjunction/ng-base-types';
5
5
  import { buildPkString, buildCompositeKey } from '../../utils/record.util';
@@ -10,13 +10,13 @@ import * as i3 from "../../confirm-dialog/confirm-dialog.component";
10
10
  const _c0 = ["grid"];
11
11
  const _c1 = () => ({});
12
12
  function GridViewRendererComponent_Conditional_2_Template(rf, ctx) { if (rf & 1) {
13
- const _r2 = i0.ɵɵgetCurrentView();
13
+ const _r1 = i0.ɵɵgetCurrentView();
14
14
  i0.ɵɵelementStart(0, "mj-list-management-dialog", 4);
15
- i0.ɵɵlistener("complete", function GridViewRendererComponent_Conditional_2_Template_mj_list_management_dialog_complete_0_listener($event) { i0.ɵɵrestoreView(_r2); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.onListManagementComplete($event)); })("cancel", function GridViewRendererComponent_Conditional_2_Template_mj_list_management_dialog_cancel_0_listener() { i0.ɵɵrestoreView(_r2); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.onListManagementCancel()); });
15
+ i0.ɵɵlistener("complete", function GridViewRendererComponent_Conditional_2_Template_mj_list_management_dialog_complete_0_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onListManagementComplete($event)); })("cancel", function GridViewRendererComponent_Conditional_2_Template_mj_list_management_dialog_cancel_0_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onListManagementCancel()); });
16
16
  i0.ɵɵelementEnd();
17
17
  } if (rf & 2) {
18
- const ctx_r2 = i0.ɵɵnextContext();
19
- i0.ɵɵproperty("Provider", ctx_r2.Provider)("visible", ctx_r2.showListManagementDialog)("config", ctx_r2.listManagementConfig);
18
+ const ctx_r1 = i0.ɵɵnextContext();
19
+ i0.ɵɵproperty("Provider", ctx_r1.Provider)("visible", ctx_r1.showListManagementDialog)("config", ctx_r1.listManagementConfig);
20
20
  } }
21
21
  /**
22
22
  * GridViewRendererComponent
@@ -174,6 +174,13 @@ export class GridViewRendererComponent extends BaseAngularComponent {
174
174
  get effectiveShowToolbar() {
175
175
  return this.config.showToolbar ?? true;
176
176
  }
177
+ /**
178
+ * Grid search defaults OFF when hosted in entity-viewer. The container already owns
179
+ * `filterText` ("Filter records..."). Opt in with `toolbarConfig.showSearch: true`.
180
+ */
181
+ get effectiveShowSearch() {
182
+ return this.config.toolbarConfig?.showSearch ?? false;
183
+ }
177
184
  /** Effective selection mode — defaults to `'checkbox'` when not set in config. */
178
185
  get effectiveSelectionMode() {
179
186
  return this.config.selectionMode ?? 'checkbox';
@@ -354,20 +361,17 @@ export class GridViewRendererComponent extends BaseAngularComponent {
354
361
  return buildPkString(record, entity) || 'Unknown';
355
362
  }
356
363
  /**
357
- * Build the list of RAW primary-key values (not concatenated composite-key strings) used by list
358
- * membership matching. Mirrors the legacy host, which deliberately extracts the first PK field's
359
- * raw value so it matches how List Details store records.
364
+ * Build the record-id strings used by list membership matching, in the compact form `MJ: List Details`
365
+ * stores in `RecordID`: the bare value for a single-column primary key (whatever the column is called),
366
+ * or the full `Field1|Value1||Field2|Value2` segment for a composite key. The entity is arbitrary, so the
367
+ * key is built from all of its primary-key columns rather than assuming a single `ID`.
360
368
  */
361
369
  buildRawRecordIds(records, entity) {
362
- const pkFieldName = entity.PrimaryKeys[0]?.Name;
363
- if (!pkFieldName) {
370
+ if (entity.PrimaryKeys.length === 0) {
364
371
  return [];
365
372
  }
366
373
  return records
367
- .map((record) => {
368
- const value = record[pkFieldName];
369
- return value == null ? '' : String(value);
370
- })
374
+ .map((record) => CompositeKey.FromEntityRecord(entity, record).ToCompactURLSegment())
371
375
  .filter((id) => id !== '');
372
376
  }
373
377
  // ================================================================
@@ -465,17 +469,16 @@ export class GridViewRendererComponent extends BaseAngularComponent {
465
469
  } if (rf & 2) {
466
470
  let _t;
467
471
  i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.grid = _t.first);
468
- } }, inputs: { entity: "entity", records: "records", exportDataProvider: "exportDataProvider", 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", configureRequested: "configureRequested", openRelatedRecordRequested: "openRelatedRecordRequested", createRecordRequested: "createRecordRequested" }, standalone: false, features: [i0.ɵɵInheritDefinitionFeature], decls: 4, vars: 21, consts: [["grid", ""], [3, "AfterRowClick", "AfterRowDoubleClick", "AfterSort", "GridStateChanged", "SelectionChange", "NewButtonClick", "RefreshButtonClick", "DeleteButtonClick", "AddToListRequested", "ForeignKeyClick", "PageChange", "ManageColumnsRequested", "Provider", "Data", "ExportDataProvider", "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) {
469
- const _r1 = i0.ɵɵgetCurrentView();
472
+ } }, inputs: { entity: "entity", records: "records", exportDataProvider: "exportDataProvider", 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", configureRequested: "configureRequested", openRelatedRecordRequested: "openRelatedRecordRequested", createRecordRequested: "createRecordRequested" }, standalone: false, features: [i0.ɵɵInheritDefinitionFeature], decls: 4, vars: 22, consts: [["grid", ""], [3, "AfterRowClick", "AfterRowDoubleClick", "AfterSort", "GridStateChanged", "SelectionChange", "NewButtonClick", "RefreshButtonClick", "DeleteButtonClick", "AddToListRequested", "ForeignKeyClick", "PageChange", "ManageColumnsRequested", "Provider", "Data", "ExportDataProvider", "Params", "FilterText", "GridState", "Height", "AllowLoad", "AutoLoadEntityActions", "ShowToolbar", "ShowSearch", "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) {
470
473
  i0.ɵɵelementStart(0, "mj-entity-data-grid", 1, 0);
471
- 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)); })("ManageColumnsRequested", function GridViewRendererComponent_Template_mj_entity_data_grid_ManageColumnsRequested_0_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.configureRequested.emit()); });
474
+ i0.ɵɵlistener("AfterRowClick", function GridViewRendererComponent_Template_mj_entity_data_grid_AfterRowClick_0_listener($event) { return ctx.onAfterRowClick($event); })("AfterRowDoubleClick", function GridViewRendererComponent_Template_mj_entity_data_grid_AfterRowDoubleClick_0_listener($event) { return ctx.onAfterRowDoubleClick($event); })("AfterSort", function GridViewRendererComponent_Template_mj_entity_data_grid_AfterSort_0_listener($event) { return ctx.onAfterSort($event); })("GridStateChanged", function GridViewRendererComponent_Template_mj_entity_data_grid_GridStateChanged_0_listener($event) { return ctx.onGridStateChanged($event); })("SelectionChange", function GridViewRendererComponent_Template_mj_entity_data_grid_SelectionChange_0_listener($event) { return ctx.onSelectionChange($event); })("NewButtonClick", function GridViewRendererComponent_Template_mj_entity_data_grid_NewButtonClick_0_listener() { return ctx.onNewButtonClick(); })("RefreshButtonClick", function GridViewRendererComponent_Template_mj_entity_data_grid_RefreshButtonClick_0_listener() { return ctx.onRefreshButtonClick(); })("DeleteButtonClick", function GridViewRendererComponent_Template_mj_entity_data_grid_DeleteButtonClick_0_listener($event) { return ctx.onDeleteButtonClick($event); })("AddToListRequested", function GridViewRendererComponent_Template_mj_entity_data_grid_AddToListRequested_0_listener($event) { return ctx.onAddToListRequested($event); })("ForeignKeyClick", function GridViewRendererComponent_Template_mj_entity_data_grid_ForeignKeyClick_0_listener($event) { return ctx.onForeignKeyClick($event); })("PageChange", function GridViewRendererComponent_Template_mj_entity_data_grid_PageChange_0_listener($event) { return ctx.onPageChange($event); })("ManageColumnsRequested", function GridViewRendererComponent_Template_mj_entity_data_grid_ManageColumnsRequested_0_listener() { return ctx.configureRequested.emit(); });
472
475
  i0.ɵɵelementEnd();
473
476
  i0.ɵɵconditionalCreate(2, GridViewRendererComponent_Conditional_2_Template, 1, 3, "mj-list-management-dialog", 2);
474
477
  i0.ɵɵelementStart(3, "mj-ev-confirm-dialog", 3);
475
- 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()); });
478
+ i0.ɵɵlistener("Confirmed", function GridViewRendererComponent_Template_mj_ev_confirm_dialog_Confirmed_3_listener() { return ctx.onDeleteConfirmed(); })("Cancelled", function GridViewRendererComponent_Template_mj_ev_confirm_dialog_Cancelled_3_listener() { return ctx.onDeleteCancelled(); });
476
479
  i0.ɵɵelementEnd();
477
480
  } if (rf & 2) {
478
- i0.ɵɵproperty("Provider", ctx.Provider)("Data", ctx.records)("ExportDataProvider", ctx.exportDataProvider)("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(20, _c1))("SelectionMode", ctx.effectiveSelectionMode)("ShowAddToListButton", ctx.effectiveShowAddToListButton)("ShowPager", ctx.effectiveShowPager)("PageSize", ctx.effectivePageSize)("TotalRowCount", ctx.totalRecordCount ?? 0)("PagerPageNumber", ctx.page ?? 1);
481
+ i0.ɵɵproperty("Provider", ctx.Provider)("Data", ctx.records)("ExportDataProvider", ctx.exportDataProvider)("Params", ctx.effectiveParams)("FilterText", ctx.filterText ?? "")("GridState", ctx.config.gridState ?? null)("Height", "auto")("AllowLoad", false)("AutoLoadEntityActions", ctx.AutoLoadEntityActions)("ShowToolbar", ctx.effectiveShowToolbar)("ShowSearch", ctx.effectiveShowSearch)("ToolbarConfig", ctx.config.toolbarConfig ?? i0.ɵɵpureFunction0(21, _c1))("SelectionMode", ctx.effectiveSelectionMode)("ShowAddToListButton", ctx.effectiveShowAddToListButton)("ShowPager", ctx.effectiveShowPager)("PageSize", ctx.effectivePageSize)("TotalRowCount", ctx.totalRecordCount ?? 0)("PagerPageNumber", ctx.page ?? 1);
479
482
  i0.ɵɵadvance(2);
480
483
  i0.ɵɵconditional(ctx.listManagementConfig ? 2 : -1);
481
484
  i0.ɵɵadvance();
@@ -497,6 +500,7 @@ export class GridViewRendererComponent extends BaseAngularComponent {
497
500
  [AllowLoad]="false"
498
501
  [AutoLoadEntityActions]="AutoLoadEntityActions"
499
502
  [ShowToolbar]="effectiveShowToolbar"
503
+ [ShowSearch]="effectiveShowSearch"
500
504
  [ToolbarConfig]="config.toolbarConfig ?? {}"
501
505
  [SelectionMode]="effectiveSelectionMode"
502
506
  [ShowAddToListButton]="effectiveShowAddToListButton"
@@ -589,7 +593,7 @@ export class GridViewRendererComponent extends BaseAngularComponent {
589
593
  type: ViewChild,
590
594
  args: ['grid']
591
595
  }] }); })();
592
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(GridViewRendererComponent, { className: "GridViewRendererComponent", filePath: "src/lib/view-types/renderers/grid-view-renderer.component.ts", lineNumber: 185 }); })();
596
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(GridViewRendererComponent, { className: "GridViewRendererComponent", filePath: "src/lib/view-types/renderers/grid-view-renderer.component.ts", lineNumber: 186 }); })();
593
597
  /**
594
598
  * Tree-shaking guard. Force-references this renderer so bundlers (ESBuild/Vite) don't drop the
595
599
  * 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;;;;;;;;;IA4IrE,oDAMC;IADC,AAD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KAAC,qJACpB,uBAAmB,KAAC;YAEnC,iBAAuB;;YA5CrB,AADA,AADA,AADA,AADA,AADA,AADA,AADA,AADA,AADA,AADA,AADA,AADA,AADA,AADA,AADA,AADA,uCAAqB,qBACL,8CACyB,+BACf,oCACK,2CACO,kBACrB,oBACE,oDAC4B,yCACX,0EACQ,6CACJ,yDACY,qCACpB,mCACF,4CACS,kCACV;YAqB/B,eASC;YATD,mDASC;YAIC,cAA4B;YAE5B,AAFA,8CAA4B,qCAEI;;;iFAmBzB,yBAAyB;cA9ErC,SAAS;6BACI,KAAK,YACP,uBAAuB,iBAClB,iBAAiB,CAAC,IAAI,YAC3B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgET;;kBAiBA,KAAK;;kBAGL,KAAK;;kBAML,KAAK;;kBAGL,KAAK;;kBAGL,KAAK;;kBAGL,KAAK;;kBAOL,KAAK;;kBAKL,KAAK;;kBAGL,KAAK;;kBAGL,KAAK;;kBAGL,KAAK;;kBAKL,MAAM;;kBAGN,MAAM;;kBAGN,MAAM;;kBAGN,MAAM;;kBAQN,MAAM;;kBAMN,MAAM;;kBAGN,MAAM;;kBAMN,SAAS;mBAAC,MAAM;;kFAnFN,yBAAyB;AAqctC;;;;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 [ExportDataProvider]=\"exportDataProvider\"\n [Params]=\"effectiveParams\"\n [FilterText]=\"filterText ?? ''\"\n [GridState]=\"config.gridState ?? null\"\n [Height]=\"'auto'\"\n [AllowLoad]=\"false\"\n [AutoLoadEntityActions]=\"AutoLoadEntityActions\"\n [ShowToolbar]=\"effectiveShowToolbar\"\n [ToolbarConfig]=\"config.toolbarConfig ?? {}\"\n [SelectionMode]=\"effectiveSelectionMode\"\n [ShowAddToListButton]=\"effectiveShowAddToListButton\"\n [ShowPager]=\"effectiveShowPager\"\n [PageSize]=\"effectivePageSize\"\n [TotalRowCount]=\"totalRecordCount ?? 0\"\n [PagerPageNumber]=\"page ?? 1\"\n (AfterRowClick)=\"onAfterRowClick($event)\"\n (AfterRowDoubleClick)=\"onAfterRowDoubleClick($event)\"\n (AfterSort)=\"onAfterSort($event)\"\n (GridStateChanged)=\"onGridStateChanged($event)\"\n (SelectionChange)=\"onSelectionChange($event)\"\n (NewButtonClick)=\"onNewButtonClick()\"\n (RefreshButtonClick)=\"onRefreshButtonClick()\"\n (DeleteButtonClick)=\"onDeleteButtonClick($event)\"\n (AddToListRequested)=\"onAddToListRequested($event)\"\n (ForeignKeyClick)=\"onForeignKeyClick($event)\"\n (PageChange)=\"onPageChange($event)\"\n (ManageColumnsRequested)=\"configureRequested.emit()\"\n >\n </mj-entity-data-grid>\n\n <!-- NOTE: Export is NOT handled here — mj-entity-data-grid hosts its OWN export dialog\n (its onExportClick opens it with formats/sampling via ExportService). Adding a second\n dialog here produced two stacked export dialogs. The grid owns export self-contained. -->\n\n <!-- Self-contained Add-to-List dialog (Generic) — owned by this wrapper, never bubbles up. -->\n @if (listManagementConfig) {\n <mj-list-management-dialog\n [Provider]=\"Provider\"\n [visible]=\"showListManagementDialog\"\n [config]=\"listManagementConfig\"\n (complete)=\"onListManagementComplete($event)\"\n (cancel)=\"onListManagementCancel()\"\n >\n </mj-list-management-dialog>\n }\n\n <!-- Self-contained Delete confirmation (Generic) — owned by this wrapper, never bubbles up. -->\n <mj-ev-confirm-dialog\n [IsOpen]=\"showDeleteConfirm\"\n Title=\"Delete Records\"\n [Message]=\"deleteConfirmMessage\"\n DetailMessage=\"This action cannot be undone.\"\n ConfirmText=\"Delete\"\n ConfirmStyle=\"danger\"\n Icon=\"fa-solid fa-trash\"\n (Confirmed)=\"onDeleteConfirmed()\"\n (Cancelled)=\"onDeleteCancelled()\"\n >\n </mj-ev-confirm-dialog>\n `,\n styles: [\n `\n :host {\n display: block;\n height: 100%;\n }\n `,\n ],\n})\nexport class GridViewRendererComponent extends BaseAngularComponent implements IViewRenderer<GridViewConfig> {\n /** Change detection ref used to flush dialog visibility toggles driven by grid events. */\n private cdr = inject(ChangeDetectorRef);\n\n // ---- IViewRenderer core inputs (camelCase per the host contract) ----\n\n /** The entity whose records are being rendered. Used to build default params + resolve selection. */\n @Input() entity: EntityInfo | null = null;\n\n /** The records to render (already loaded / filtered / paged by the host). Fed into `[Data]`. */\n @Input() records: Record<string, unknown>[] = [];\n\n /**\n * Optional full-result-set fetcher supplied by the host, forwarded to the grid's ExportDataProvider\n * so exports cover every matching row rather than just the loaded page (bug C1).\n */\n @Input() exportDataProvider: (() => Promise<Record<string, unknown>[]>) | null = null;\n\n /** Primary-key string of the currently selected record, if any. */\n @Input() selectedRecordId: string | null = null;\n\n /** Active filter text — passed through for the grid's cell highlighting. */\n @Input() filterText: string | null = null;\n\n /** Opaque per-view configuration. Seeds the grid bindings; mutated + re-emitted on grid changes. */\n @Input() config: GridViewConfig = {};\n\n /**\n * When true (default), the grid self-loads the entity's active EntityActions and shows them — buttons\n * appear only for entities that actually have actions (data-driven). Actions whose invocation names a\n * `RuntimeUXDriverClass` mount that interactive driver (e.g. the Record Process runner) in-place.\n */\n @Input() AutoLoadEntityActions = true;\n\n // ---- IViewRenderer generic data-context inputs ----\n\n /** Total record count across all pages, for the grid's pager. Fed into `[TotalRowCount]`. */\n @Input() totalRecordCount?: number;\n\n /** One-based current page the host is showing. Fed into `[PagerPageNumber]` (already 1-based). */\n @Input() page?: number;\n\n /** Page size the host is using — fallback when `config.pageSize` is absent. */\n @Input() pageSize?: number;\n\n /** Whether the host is currently (re)loading the record set. Accepted per contract; unused here. */\n @Input() isLoading?: boolean;\n\n // ---- IViewRenderer outputs (generic + navigation channels only) ----\n\n /** Emitted when a row is single-clicked — payload is the raw record object (host builds the key). */\n @Output() recordSelected = new EventEmitter<unknown>();\n\n /** Emitted when a row is double-clicked — payload is the raw record object (host builds the key). */\n @Output() recordOpened = new EventEmitter<unknown>();\n\n /** Emitted when this renderer mutates its opaque {@link config} (sort / grid-state persistence). */\n @Output() configChanged = new EventEmitter<GridViewConfig>();\n\n /** Generic data-access channel: ask the host to re-load with different sort / page. */\n @Output() dataRequest = new EventEmitter<ViewDataRequest>();\n\n /**\n * Ask the host to open this view's configuration UI. Raised when the grid emits\n * `ManageColumnsRequested` (its \"Manage Columns\" toolbar affordance). Part of the generic\n * {@link IViewRenderer} contract; the container forwards it to the workspace, which opens the\n * config panel (Columns tab) — the canonical column editor.\n */\n @Output() configureRequested = new EventEmitter<void>();\n\n /**\n * NAVIGATION: open a related record on a (possibly different) entity from a foreign-key cell click.\n * Routing lives in the outer app, so this is one of the few signals that legitimately bubbles up.\n */\n @Output() openRelatedRecordRequested = new EventEmitter<ViewRelatedRecordNavigation>();\n\n /** NAVIGATION: create a new record of the current entity (grid \"New\" button). Bubbles up for routing. */\n @Output() createRecordRequested = new EventEmitter<void>();\n\n /**\n * Reference to the hosted grid. Currently only retained for parity / future selection resolution;\n * selection is mapped from the {@link records} input rather than read from the grid, per contract.\n */\n @ViewChild('grid') protected grid?: EntityDataGridComponent;\n\n /**\n * IMPERATIVE export entry point ({@link IViewRenderer.exportRecords}). Lets the host trigger\n * an export programmatically (ultimately for the AI agent) by delegating to the hosted grid's\n * self-contained {@link EntityDataGridComponent.Export} (which downloads the file). The grid's\n * toolbar export button remains the interactive path; this is the no-UI equivalent.\n *\n * @param format optional output format; the grid defaults to 'excel' when omitted.\n * @returns true when the export succeeded, false when the grid isn't ready or the export failed.\n */\n async exportRecords(format?: 'csv' | 'excel' | 'json'): Promise<boolean> {\n if (!this.grid) {\n return false;\n }\n const result = await this.grid.Export(format ? { format } : undefined, true);\n return !!result?.success;\n }\n\n // ================================================================\n // Self-contained dialog state (never surfaced to the host)\n // ================================================================\n // NOTE: Export has no state here — mj-entity-data-grid owns its export dialog.\n\n /** Whether the add-to-list dialog is visible. Toggled internally by {@link onAddToListRequested}. */\n protected showListManagementDialog = false;\n\n /** Config fed into `<mj-list-management-dialog>`. Built from the entity + selected records. */\n protected listManagementConfig: ListManagementDialogConfig | null = null;\n\n /** Whether the delete-confirmation dialog is visible. Toggled internally by {@link onDeleteButtonClick}. */\n protected showDeleteConfirm = false;\n\n /** Records staged for deletion while the confirm dialog is open. */\n private pendingDeleteRecords: Record<string, unknown>[] = [];\n\n /** Dynamic message for the delete-confirmation dialog (reflects the staged record count). */\n protected deleteConfirmMessage = 'Are you sure you want to delete the selected records?';\n\n // ================================================================\n // Effective binding accessors — seed grid inputs from config + defaults\n // ================================================================\n\n /** Effective toolbar visibility — defaults to `true` when not set in config. */\n get effectiveShowToolbar(): boolean {\n return this.config.showToolbar ?? true;\n }\n\n /** 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,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACzF,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAQrE,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;;;;;;;;;IA6IrE,oDAMC;IADC,AADA,4NAAY,uCAAgC,KAAC,qMACnC,+BAAwB,KAAC;IAErC,iBAA4B;;;IAJ1B,AADA,AADA,0CAAqB,4CACe,uCACL;;AA1GvC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwDG;AAgFH,MAAM,OAAO,yBAA0B,SAAQ,oBAAoB;IACjE,0FAA0F;IAClF,GAAG,GAAG,MAAM,CAAC,iBAAiB,CAAC,CAAC;IAExC,wEAAwE;IAExE,qGAAqG;IAC5F,MAAM,GAAsB,IAAI,CAAC;IAE1C,gGAAgG;IACvF,OAAO,GAA8B,EAAE,CAAC;IAEjD;;;OAGG;IACM,kBAAkB,GAAsD,IAAI,CAAC;IAEtF,mEAAmE;IAC1D,gBAAgB,GAAkB,IAAI,CAAC;IAEhD,4EAA4E;IACnE,UAAU,GAAkB,IAAI,CAAC;IAE1C,oGAAoG;IAC3F,MAAM,GAAmB,EAAE,CAAC;IAErC;;;;OAIG;IACM,qBAAqB,GAAG,IAAI,CAAC;IAEtC,sDAAsD;IAEtD,6FAA6F;IACpF,gBAAgB,CAAU;IAEnC,kGAAkG;IACzF,IAAI,CAAU;IAEvB,+EAA+E;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N,SAAS;mBAAC,MAAM;;kFAnFN,yBAAyB;AA0ctC;;;;GAIG;AACH,MAAM,UAAU,oBAAoB;IAClC,0DAA0D;AAC5D,CAAC","sourcesContent":["import { Component, Input, Output, EventEmitter, ViewEncapsulation, ViewChild, ChangeDetectorRef, inject } from '@angular/core';\nimport { EntityInfo, RunViewParams, LogError, CompositeKey } from '@memberjunction/core';\nimport { UUIDsEqual } from '@memberjunction/global';\nimport { BaseAngularComponent } from '@memberjunction/ng-base-types';\nimport { PageChangeEvent } from '@memberjunction/ng-pagination';\nimport { ListManagementDialogConfig, ListManagementResult } from '@memberjunction/ng-list-management';\nimport { IViewRenderer, ViewDataRequest, ViewRelatedRecordNavigation } from '../view-type.contracts';\nimport { ViewGridState } from '../../types';\nimport { GridSelectionMode, GridToolbarConfig, ForeignKeyClickEvent } from '../../entity-data-grid/models/grid-types';\nimport { AfterRowClickEventArgs, AfterRowDoubleClickEventArgs, AfterSortEventArgs } from '../../entity-data-grid/events/grid-events';\nimport { GridStateChangedEvent } from '../../types';\nimport { buildPkString, buildCompositeKey } from '../../utils/record.util';\nimport { EntityDataGridComponent } from '../../entity-data-grid/entity-data-grid.component';\n\n/**\n * Opaque per-view configuration for the Grid view type.\n * -----------------------------------------------------\n * This is the blob the host persists verbatim against the active `ViewTypeID` and never\n * inspects (see {@link IViewRenderer.configChanged}). The renderer seeds the\n * `<mj-entity-data-grid>` bindings from these fields, applying sensible defaults when a\n * field is absent (see {@link GridViewRendererComponent}). It is intentionally a plain,\n * fully-serializable shape — every field is optional so an empty `{}` is a valid config.\n */\nexport interface GridViewConfig {\n /**\n * Persisted grid state (columns/widths/order/sort) from a User View. Mutated in place when\n * the grid emits sort or generic grid-state changes, then surfaced via `configChanged` so the\n * host persists it. Fed straight into `[GridState]`.\n */\n gridState?: ViewGridState;\n /** Whether the grid's own toolbar is shown. Defaults to `true` when absent. */\n showToolbar?: boolean;\n /** The grid toolbar configuration. Fed into `[ToolbarConfig]`. */\n toolbarConfig?: GridToolbarConfig;\n /** Row selection mode. Defaults to `'checkbox'` when absent. */\n selectionMode?: GridSelectionMode;\n /** Whether the \"Add to List\" button is shown. Defaults to `true` when absent. */\n showAddToListButton?: boolean;\n /** Whether the pager is shown. Defaults to `true` when absent. */\n showPager?: boolean;\n /** Page size for the grid's pager. Falls back to the `pageSize` input when absent. */\n pageSize?: number;\n /**\n * Explicit RunViewParams for the grid's data source. When absent the renderer builds a minimal\n * dynamic-view params object from {@link entity}. Fed into `[Params]`.\n */\n params?: RunViewParams;\n}\n\n/**\n * GridViewRendererComponent\n * -------------------------\n * The Grid **view type** renderer — a fully self-contained {@link IViewRenderer} adapter that hosts\n * the existing {@link EntityDataGridComponent} (`<mj-entity-data-grid>`) inside the entity-viewer's\n * pluggable view-type system. It is the dynamic-mounted plug-in that the `GridViewType` descriptor\n * points at.\n *\n * **Architectural intent — the container knows nothing about grids, and grid *features* never bubble\n * up.** The host (entity-viewer) binds only the generic {@link IViewRenderer} surface: the core\n * inputs (`entity` / `provider` / `records` / `selectedRecordId` / `filterText` / `config`), the\n * generic data-context inputs (`totalRecordCount` / `page` / `pageSize` / `isLoading`), and a small\n * set of generic outputs. There is **no opaque `hostAction` channel** — everything a grid does is\n * resolved through one of these three categories:\n *\n * 1. **Self-contained (owned end-to-end — never bubbles up):**\n * - **Export** → owned entirely by `<mj-entity-data-grid>` itself (its `onExportClick` opens its\n * OWN export dialog with format/sampling via `ExportService`). This wrapper does NOT host an\n * export dialog — doing so produced two stacked dialogs.\n * - **Add to List** → hosts `<mj-list-management-dialog>` ({@link ListManagementModule}). On\n * `(AddToListRequested)` the wrapper builds a {@link ListManagementDialogConfig} from the\n * entity + selected records and opens the dialog.\n * - **Delete** → hosts the Generic `<mj-ev-confirm-dialog>` (from {@link EntityViewerModule}).\n * On `(DeleteButtonClick)` the wrapper confirms, deletes via the MJ entity layer, then\n * re-requests data so the host reloads the current page.\n * - **Refresh** → on `(RefreshButtonClick)` the wrapper re-emits {@link dataRequest} so the host\n * reloads. No feature event leaves the wrapper.\n * - **Selection** → kept INTERNAL; it only drives the wrapper's own add-to-list. Never bubbles.\n *\n * 2. **Navigation (the ONLY legitimate upward signals — routing lives in the outer app):**\n * - Row double-click → {@link recordOpened}.\n * - Foreign-key cell click `(ForeignKeyClick)` → {@link openRelatedRecordRequested}.\n * - New button `(NewButtonClick)` → {@link createRecordRequested}.\n *\n * 3. **Container ↔ plug-in generic coordination (NOT outer-app signals):**\n * - Sort `(AfterSort)` → {@link dataRequest} (`sort`) + persisted into `config.gridState` via\n * {@link configChanged}.\n * - Pager `(PageChange)` → {@link dataRequest} (`page` / `pageSize`).\n * - Generic grid-state `(GridStateChanged)` → merged into `config.gridState` + {@link configChanged}.\n *\n * **Seeding the grid from `config` with defaults:** absent config fields fall back to sensible\n * defaults so a brand-new view (`config === {}`) renders a fully-functional grid — toolbar on,\n * checkbox selection, add-to-list on, pager on. The grid never loads its own data\n * (`[AllowLoad]=\"false\"`) — the host owns the fetch.\n *\n * This is an NgModule-declared (`standalone: false`) component, declared in `EntityViewerModule`.\n * It renders `<mj-entity-data-grid>` + the Generic `<mj-list-management-dialog>` / `<mj-ev-confirm-dialog>`\n * straight from the module's compilation scope (the module imports `ListManagementModule` and declares\n * the grid + confirm dialog; the grid component brings its own export dialog) — so there's\n * no `imports` array and, crucially, no self-import of `EntityViewerModule`: the module loads the\n * view-type descriptors, which reference these wrappers, so a wrapper importing the module back would\n * form a runtime import cycle (NG0919).\n *\n * Inputs use the camelCase names mandated by the {@link IViewRenderer} contract (the host binds them\n * by those exact names via `setInput`), rather than MJ's usual PascalCase for public members —\n * mirroring the Cards and Cluster renderers.\n */\n@Component({\n standalone: false,\n selector: 'mj-grid-view-renderer',\n encapsulation: ViewEncapsulation.None,\n template: `\n <mj-entity-data-grid\n #grid\n [Provider]=\"Provider\"\n [Data]=\"records\"\n [ExportDataProvider]=\"exportDataProvider\"\n [Params]=\"effectiveParams\"\n [FilterText]=\"filterText ?? ''\"\n [GridState]=\"config.gridState ?? null\"\n [Height]=\"'auto'\"\n [AllowLoad]=\"false\"\n [AutoLoadEntityActions]=\"AutoLoadEntityActions\"\n [ShowToolbar]=\"effectiveShowToolbar\"\n [ShowSearch]=\"effectiveShowSearch\"\n [ToolbarConfig]=\"config.toolbarConfig ?? {}\"\n [SelectionMode]=\"effectiveSelectionMode\"\n [ShowAddToListButton]=\"effectiveShowAddToListButton\"\n [ShowPager]=\"effectiveShowPager\"\n [PageSize]=\"effectivePageSize\"\n [TotalRowCount]=\"totalRecordCount ?? 0\"\n [PagerPageNumber]=\"page ?? 1\"\n (AfterRowClick)=\"onAfterRowClick($event)\"\n (AfterRowDoubleClick)=\"onAfterRowDoubleClick($event)\"\n (AfterSort)=\"onAfterSort($event)\"\n (GridStateChanged)=\"onGridStateChanged($event)\"\n (SelectionChange)=\"onSelectionChange($event)\"\n (NewButtonClick)=\"onNewButtonClick()\"\n (RefreshButtonClick)=\"onRefreshButtonClick()\"\n (DeleteButtonClick)=\"onDeleteButtonClick($event)\"\n (AddToListRequested)=\"onAddToListRequested($event)\"\n (ForeignKeyClick)=\"onForeignKeyClick($event)\"\n (PageChange)=\"onPageChange($event)\"\n (ManageColumnsRequested)=\"configureRequested.emit()\"\n >\n </mj-entity-data-grid>\n\n <!-- NOTE: Export is NOT handled here — mj-entity-data-grid hosts its OWN export dialog\n (its onExportClick opens it with formats/sampling via ExportService). Adding a second\n dialog here produced two stacked export dialogs. The grid owns export self-contained. -->\n\n <!-- Self-contained Add-to-List dialog (Generic) — owned by this wrapper, never bubbles up. -->\n @if (listManagementConfig) {\n <mj-list-management-dialog\n [Provider]=\"Provider\"\n [visible]=\"showListManagementDialog\"\n [config]=\"listManagementConfig\"\n (complete)=\"onListManagementComplete($event)\"\n (cancel)=\"onListManagementCancel()\"\n >\n </mj-list-management-dialog>\n }\n\n <!-- Self-contained Delete confirmation (Generic) — owned by this wrapper, never bubbles up. -->\n <mj-ev-confirm-dialog\n [IsOpen]=\"showDeleteConfirm\"\n Title=\"Delete Records\"\n [Message]=\"deleteConfirmMessage\"\n DetailMessage=\"This action cannot be undone.\"\n ConfirmText=\"Delete\"\n ConfirmStyle=\"danger\"\n Icon=\"fa-solid fa-trash\"\n (Confirmed)=\"onDeleteConfirmed()\"\n (Cancelled)=\"onDeleteCancelled()\"\n >\n </mj-ev-confirm-dialog>\n `,\n styles: [\n `\n :host {\n display: block;\n height: 100%;\n }\n `,\n ],\n})\nexport class GridViewRendererComponent extends BaseAngularComponent implements IViewRenderer<GridViewConfig> {\n /** Change detection ref used to flush dialog visibility toggles driven by grid events. */\n private cdr = inject(ChangeDetectorRef);\n\n // ---- IViewRenderer core inputs (camelCase per the host contract) ----\n\n /** The entity whose records are being rendered. Used to build default params + resolve selection. */\n @Input() entity: EntityInfo | null = null;\n\n /** The records to render (already loaded / filtered / paged by the host). Fed into `[Data]`. */\n @Input() records: Record<string, unknown>[] = [];\n\n /**\n * Optional full-result-set fetcher supplied by the host, forwarded to the grid's ExportDataProvider\n * so exports cover every matching row rather than just the loaded page (bug C1).\n */\n @Input() exportDataProvider: (() => Promise<Record<string, unknown>[]>) | null = null;\n\n /** Primary-key string of the currently selected record, if any. */\n @Input() selectedRecordId: string | null = null;\n\n /** Active filter text — passed through for the grid's cell highlighting. */\n @Input() filterText: string | null = null;\n\n /** Opaque per-view configuration. Seeds the grid bindings; mutated + re-emitted on grid changes. */\n @Input() config: GridViewConfig = {};\n\n /**\n * When true (default), the grid self-loads the entity's active EntityActions and shows them — buttons\n * appear only for entities that actually have actions (data-driven). Actions whose invocation names a\n * `RuntimeUXDriverClass` mount that interactive driver (e.g. the Record Process runner) in-place.\n */\n @Input() AutoLoadEntityActions = true;\n\n // ---- IViewRenderer generic data-context inputs ----\n\n /** Total record count across all pages, for the grid's pager. Fed into `[TotalRowCount]`. */\n @Input() totalRecordCount?: number;\n\n /** One-based current page the host is showing. Fed into `[PagerPageNumber]` (already 1-based). */\n @Input() page?: number;\n\n /** Page size the host is using — fallback when `config.pageSize` is absent. */\n @Input() pageSize?: number;\n\n /** Whether the host is currently (re)loading the record set. Accepted per contract; unused here. */\n @Input() isLoading?: boolean;\n\n // ---- IViewRenderer outputs (generic + navigation channels only) ----\n\n /** Emitted when a row is single-clicked — payload is the raw record object (host builds the key). */\n @Output() recordSelected = new EventEmitter<unknown>();\n\n /** Emitted when a row is double-clicked — payload is the raw record object (host builds the key). */\n @Output() recordOpened = new EventEmitter<unknown>();\n\n /** Emitted when this renderer mutates its opaque {@link config} (sort / grid-state persistence). */\n @Output() configChanged = new EventEmitter<GridViewConfig>();\n\n /** Generic data-access channel: ask the host to re-load with different sort / page. */\n @Output() dataRequest = new EventEmitter<ViewDataRequest>();\n\n /**\n * Ask the host to open this view's configuration UI. Raised when the grid emits\n * `ManageColumnsRequested` (its \"Manage Columns\" toolbar affordance). Part of the generic\n * {@link IViewRenderer} contract; the container forwards it to the workspace, which opens the\n * config panel (Columns tab) — the canonical column editor.\n */\n @Output() configureRequested = new EventEmitter<void>();\n\n /**\n * NAVIGATION: open a related record on a (possibly different) entity from a foreign-key cell click.\n * Routing lives in the outer app, so this is one of the few signals that legitimately bubbles up.\n */\n @Output() openRelatedRecordRequested = new EventEmitter<ViewRelatedRecordNavigation>();\n\n /** NAVIGATION: create a new record of the current entity (grid \"New\" button). Bubbles up for routing. */\n @Output() createRecordRequested = new EventEmitter<void>();\n\n /**\n * Reference to the hosted grid. Currently only retained for parity / future selection resolution;\n * selection is mapped from the {@link records} input rather than read from the grid, per contract.\n */\n @ViewChild('grid') protected grid?: EntityDataGridComponent;\n\n /**\n * IMPERATIVE export entry point ({@link IViewRenderer.exportRecords}). Lets the host trigger\n * an export programmatically (ultimately for the AI agent) by delegating to the hosted grid's\n * self-contained {@link EntityDataGridComponent.Export} (which downloads the file). The grid's\n * toolbar export button remains the interactive path; this is the no-UI equivalent.\n *\n * @param format optional output format; the grid defaults to 'excel' when omitted.\n * @returns true when the export succeeded, false when the grid isn't ready or the export failed.\n */\n async exportRecords(format?: 'csv' | 'excel' | 'json'): Promise<boolean> {\n if (!this.grid) {\n return false;\n }\n const result = await this.grid.Export(format ? { format } : undefined, true);\n return !!result?.success;\n }\n\n // ================================================================\n // Self-contained dialog state (never surfaced to the host)\n // ================================================================\n // NOTE: Export has no state here — mj-entity-data-grid owns its export dialog.\n\n /** Whether the add-to-list dialog is visible. Toggled internally by {@link onAddToListRequested}. */\n protected showListManagementDialog = false;\n\n /** Config fed into `<mj-list-management-dialog>`. Built from the entity + selected records. */\n protected listManagementConfig: ListManagementDialogConfig | null = null;\n\n /** Whether the delete-confirmation dialog is visible. Toggled internally by {@link onDeleteButtonClick}. */\n protected showDeleteConfirm = false;\n\n /** Records staged for deletion while the confirm dialog is open. */\n private pendingDeleteRecords: Record<string, unknown>[] = [];\n\n /** Dynamic message for the delete-confirmation dialog (reflects the staged record count). */\n protected deleteConfirmMessage = 'Are you sure you want to delete the selected records?';\n\n // ================================================================\n // Effective binding accessors — seed grid inputs from config + defaults\n // ================================================================\n\n /** Effective toolbar visibility — defaults to `true` when not set in config. */\n get effectiveShowToolbar(): boolean {\n return this.config.showToolbar ?? true;\n }\n\n /**\n * Grid search defaults OFF when hosted in entity-viewer. The container already owns\n * `filterText` (\"Filter records...\"). Opt in with `toolbarConfig.showSearch: true`.\n */\n get effectiveShowSearch(): boolean {\n return this.config.toolbarConfig?.showSearch ?? false;\n }\n\n /** Effective selection mode — defaults to `'checkbox'` when not set in config. */\n get effectiveSelectionMode(): GridSelectionMode {\n return this.config.selectionMode ?? 'checkbox';\n }\n\n /** Effective add-to-list button visibility — defaults to `true` when not set in config. */\n get effectiveShowAddToListButton(): boolean {\n return this.config.showAddToListButton ?? true;\n }\n\n /** Effective pager visibility — defaults to `true` when not set in config. */\n get effectiveShowPager(): boolean {\n return this.config.showPager ?? true;\n }\n\n /** Effective page size — config wins, else the generic `pageSize` input, else the grid's own default. */\n get effectivePageSize(): number {\n return this.config.pageSize ?? this.pageSize ?? 100;\n }\n\n /**\n * Effective RunViewParams for the grid. Uses `config.params` when supplied; otherwise builds a\n * minimal dynamic-view params object from {@link entity}. Returns `null` when no entity is known\n * yet (the grid renders empty until the host provides one).\n */\n get effectiveParams(): RunViewParams | null {\n if (this.config.params) {\n return this.config.params;\n }\n if (this.entity) {\n return { EntityName: this.entity.Name };\n }\n return null;\n }\n\n // ================================================================\n // Navigation + generic coordination output mapping\n // ================================================================\n\n /**\n * Row single-click → {@link recordSelected}. Extracts the raw record (`event.row`) so the host\n * builds the composite key itself, matching the other renderers.\n */\n onAfterRowClick(event: AfterRowClickEventArgs): void {\n if (event.row) {\n this.recordSelected.emit(event.row);\n }\n }\n\n /** Row double-click → {@link recordOpened} (NAVIGATION), emitting the raw record object. */\n onAfterRowDoubleClick(event: AfterRowDoubleClickEventArgs): void {\n if (event.row) {\n this.recordOpened.emit(event.row);\n }\n }\n\n /**\n * Sort change → both generic coordination channels:\n * 1. {@link dataRequest} with the generic `sort` shape so the host re-loads with a new OrderBy.\n * 2. persists the sort into `config.gridState.sortSettings` and emits {@link configChanged} so\n * the grid's sort survives view reloads via the opaque config channel.\n */\n onAfterSort(event: AfterSortEventArgs): void {\n const sort = (event.newSortState ?? []).map((s) => ({ field: s.field, direction: s.direction }));\n this.dataRequest.emit({ sort });\n\n const gridState: ViewGridState = { ...(this.config.gridState ?? {}) };\n gridState.sortSettings = (event.newSortState ?? []).map((s) => ({ field: s.field, dir: s.direction }));\n this.config = { ...this.config, gridState };\n this.configChanged.emit(this.config);\n }\n\n /**\n * Generic grid-state change (column resize / reorder / visibility) → merge the grid's updated\n * {@link ViewGridState} into the opaque config and emit {@link configChanged}; the host persists\n * the blob verbatim. No `dataRequest` here — column changes don't alter the loaded record set.\n */\n onGridStateChanged(event: GridStateChangedEvent): void {\n this.config = { ...this.config, gridState: event.gridState };\n this.configChanged.emit(this.config);\n }\n\n /**\n * Selection change → kept INTERNAL. The grid drives its own add-to-list from the selection, so the\n * wrapper has no need to surface it. We intentionally do not bubble selection anywhere.\n */\n onSelectionChange(_selectedKeys: string[]): void {\n // No-op: selection is internal to the grid + this wrapper's add-to-list. It never bubbles up.\n }\n\n /**\n * Foreign-key link click → {@link openRelatedRecordRequested} (NAVIGATION). Maps the grid's\n * {@link ForeignKeyClickEvent} (which carries the related entity + the FK value) onto the generic\n * {@link ViewRelatedRecordNavigation} the container forwards to the outer app for routing. The\n * related entity name is taken from the event when present, else resolved from the metadata by ID.\n */\n onForeignKeyClick(event: ForeignKeyClickEvent): void {\n const entityName = event.relatedEntityName ?? this.resolveEntityNameById(event.relatedEntityId);\n if (!entityName) {\n return;\n }\n this.openRelatedRecordRequested.emit({ entityName, recordKey: event.recordId });\n }\n\n /** New button → {@link createRecordRequested} (NAVIGATION) — opening the create form is routing. */\n onNewButtonClick(): void {\n this.createRecordRequested.emit();\n }\n\n /**\n * Pager navigation → generic {@link dataRequest}. Maps the grid's {@link PageChangeEvent}\n * (`PageNumber` is already 1-based, `PageSize`) onto the generic `{ page, pageSize }` shape the\n * host honors against its own RunView.\n */\n onPageChange(event: PageChangeEvent): void {\n this.dataRequest.emit({ page: event.PageNumber, pageSize: event.PageSize });\n }\n\n // ================================================================\n // Self-contained: Refresh\n // ================================================================\n\n /**\n * Refresh button → re-emit {@link dataRequest} so the host reloads the current page. This is\n * generic container ↔ plug-in coordination (a data-access request), NOT a feature event surfaced\n * to the outer app.\n */\n onRefreshButtonClick(): void {\n this.dataRequest.emit(this.currentPageDataRequest());\n }\n\n // ================================================================\n // Export: handled entirely by mj-entity-data-grid (its onExportClick opens its own export dialog\n // via ExportService). This wrapper intentionally does NOT host an export dialog — doing so produced\n // two stacked dialogs. Nothing to do here.\n // ================================================================\n\n // ================================================================\n // Self-contained: Add to List (hosts <mj-list-management-dialog>)\n // ================================================================\n\n /**\n * Add-to-list button → build a {@link ListManagementDialogConfig} from the entity + the records the\n * grid supplied, then open the Generic list-management dialog. The dialog persists membership\n * changes itself — nothing bubbles up. Mirrors the config construction the legacy host did in\n * `data-explorer-dashboard`'s `onAddToListRequested()`.\n */\n onAddToListRequested(event: { entityInfo: EntityInfo; records: Record<string, unknown>[]; recordIds: string[] }): void {\n const entity = event.entityInfo ?? this.entity;\n if (!entity || !event.records || event.records.length === 0) {\n return;\n }\n\n const recordDisplayNames = event.records.map((record) => this.getRecordDisplayName(record, entity));\n const recordIds = this.buildRawRecordIds(event.records, entity);\n if (recordIds.length === 0) {\n return;\n }\n\n const recordCount = event.records.length;\n const dialogTitle = recordCount === 1 ? `Manage Lists for \"${recordDisplayNames[0]}\"` : `Add ${recordCount} Records to List`;\n\n this.listManagementConfig = {\n mode: 'manage',\n entityId: entity.ID,\n entityName: entity.Name,\n recordIds,\n recordDisplayNames,\n allowCreate: true,\n allowRemove: recordCount === 1,\n showMembership: recordCount === 1,\n dialogTitle,\n };\n this.showListManagementDialog = true;\n this.cdr.detectChanges();\n }\n\n /** List-management dialog completed (membership changes applied) → tear down state. */\n onListManagementComplete(_result: ListManagementResult): void {\n this.showListManagementDialog = false;\n this.listManagementConfig = null;\n this.cdr.detectChanges();\n }\n\n /** List-management dialog cancelled → tear down state. */\n onListManagementCancel(): void {\n this.showListManagementDialog = false;\n this.listManagementConfig = null;\n this.cdr.detectChanges();\n }\n\n /**\n * Resolve a human-friendly display name for a record using the entity's NameField, falling back to\n * the composite-key string. Mirrors the legacy host's display-name resolution.\n */\n private getRecordDisplayName(record: Record<string, unknown>, entity: EntityInfo): string {\n if (entity.NameField) {\n const nameValue = record[entity.NameField.Name];\n if (nameValue != null) {\n return String(nameValue);\n }\n }\n return buildPkString(record, entity) || 'Unknown';\n }\n\n /**\n * Build the record-id strings used by list membership matching, in the compact form `MJ: List Details`\n * stores in `RecordID`: the bare value for a single-column primary key (whatever the column is called),\n * or the full `Field1|Value1||Field2|Value2` segment for a composite key. The entity is arbitrary, so the\n * key is built from all of its primary-key columns rather than assuming a single `ID`.\n */\n private buildRawRecordIds(records: Record<string, unknown>[], entity: EntityInfo): string[] {\n if (entity.PrimaryKeys.length === 0) {\n return [];\n }\n return records\n .map((record) => CompositeKey.FromEntityRecord(entity, record).ToCompactURLSegment())\n .filter((id) => id !== '');\n }\n\n // ================================================================\n // Self-contained: Delete (hosts <mj-ev-confirm-dialog> + MJ entity layer)\n // ================================================================\n\n /**\n * Delete button → stage the records and open the Generic confirm dialog. The actual delete happens\n * in {@link onDeleteConfirmed} after the user confirms — nothing bubbles up.\n */\n onDeleteButtonClick(records: Record<string, unknown>[]): void {\n if (!records || records.length === 0) {\n return;\n }\n this.pendingDeleteRecords = records;\n const count = records.length;\n this.deleteConfirmMessage = count === 1 ? 'Are you sure you want to delete this record?' : `Are you sure you want to delete these ${count} records?`;\n this.showDeleteConfirm = true;\n this.cdr.detectChanges();\n }\n\n /**\n * Delete confirmed → delete each staged record through the MJ entity layer\n * (`ProviderToUse.GetEntityObject(name, compositeKey, user)` → `Delete`), checking the boolean\n * result and surfacing failures via {@link LogError}. After deletion, re-request the current page\n * so the host reloads. Self-contained — no feature event leaves the wrapper.\n */\n async onDeleteConfirmed(): Promise<void> {\n this.showDeleteConfirm = false;\n const entity = this.entity;\n const records = this.pendingDeleteRecords;\n this.pendingDeleteRecords = [];\n\n if (!entity || records.length === 0) {\n return;\n }\n\n let anyDeleted = false;\n const provider = this.ProviderToUse;\n const user = provider.CurrentUser;\n\n for (const record of records) {\n const key = buildCompositeKey(record, entity);\n try {\n // The (name, key, user) overload instantiates AND loads in one call (throws if it can't load).\n const obj = await provider.GetEntityObject(entity.Name, key, user);\n const deleted = await obj.Delete();\n if (deleted) {\n anyDeleted = true;\n } else {\n LogError(`Delete failed: ${obj.LatestResult?.CompleteMessage ?? 'unknown error'}`);\n }\n } catch (err) {\n LogError(`Delete failed for ${entity.Name} (${key.ToString()}): ${err instanceof Error ? err.message : String(err)}`);\n }\n }\n\n if (anyDeleted) {\n // Re-request the current page so the host reloads the (now smaller) record set.\n this.dataRequest.emit(this.currentPageDataRequest());\n }\n this.cdr.detectChanges();\n }\n\n /** Delete cancelled → discard the staged records and close the confirm dialog. */\n onDeleteCancelled(): void {\n this.showDeleteConfirm = false;\n this.pendingDeleteRecords = [];\n this.cdr.detectChanges();\n }\n\n // ================================================================\n // Helpers\n // ================================================================\n\n /** Build a {@link ViewDataRequest} that re-requests the host's current page/pageSize, if known. */\n private currentPageDataRequest(): ViewDataRequest {\n const req: ViewDataRequest = {};\n if (this.page != null) {\n req.page = this.page;\n }\n const ps = this.config.pageSize ?? this.pageSize;\n if (ps != null) {\n req.pageSize = ps;\n }\n return req;\n }\n\n /**\n * Resolve an entity's name from its ID via the active provider's metadata. Used when a foreign-key\n * click event omits the related entity name and only carries its ID.\n */\n private resolveEntityNameById(entityId: string): string | null {\n if (!entityId) {\n return null;\n }\n const match = this.ProviderToUse.Entities.find((e) => UUIDsEqual(e.ID, entityId));\n return match ? match.Name : null;\n }\n}\n\n/**\n * Tree-shaking guard. Force-references this renderer so bundlers (ESBuild/Vite) don't drop the\n * component in builds that only mount it dynamically via the ClassFactory/descriptor. Mirrors the\n * Cards/Cluster renderers' load guards; the parent wires this into a barrel/module load path.\n */\nexport function LoadGridViewRenderer(): void {\n // no-op; presence prevents tree-shaking of this component\n}\n"]}
@@ -165,6 +165,8 @@ export declare class TimelineViewRendererComponent extends BaseAngularComponent
165
165
  * field, else null.
166
166
  */
167
167
  private findSubtitleField;
168
+ /** Image field (ExtendedType='Image') so timeline cards crop a thumbnail, same as grid/cards. */
169
+ private findImageField;
168
170
  static ɵfac: i0.ɵɵFactoryDeclaration<TimelineViewRendererComponent, never>;
169
171
  static ɵcmp: i0.ɵɵComponentDeclaration<TimelineViewRendererComponent, "mj-timeline-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; }; }, { "recordSelected": "recordSelected"; "recordOpened": "recordOpened"; "configChanged": "configChanged"; }, never, never, false, never>;
170
172
  }
@@ -1 +1 @@
1
- {"version":3,"file":"timeline-view-renderer.component.d.ts","sourceRoot":"","sources":["../../../../src/lib/view-types/renderers/timeline-view-renderer.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,YAAY,EAEZ,MAAM,EAGP,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,UAAU,EAAE,eAAe,EAAqB,MAAM,sBAAsB,CAAC;AAEtF,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EACL,aAAa,EACb,mBAAmB,EACnB,iBAAiB,EACjB,mBAAmB,EACpB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;;AAEvD;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,kBAAkB;IACjC,2FAA2F;IAC3F,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,0EAA0E;IAC1E,WAAW,CAAC,EAAE,mBAAmB,CAAC;IAClC,qEAAqE;IACrE,SAAS,CAAC,EAAE,iBAAiB,CAAC;IAC9B,8EAA8E;IAC9E,eAAe,CAAC,EAAE,mBAAmB,CAAC;CACvC;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,qBAuKa,6BACX,SAAQ,oBACR,YAAW,aAAa,CAAC,kBAAkB,CAAC,EAAE,MAAM;IAMpD,OAAO,CAAC,OAAO,CAA2B;IAC1C,uGAAuG;IACvG,IACI,MAAM,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI,EAOlC;IACD,IAAI,MAAM,IAAI,UAAU,GAAG,IAAI,CAE9B;IAED,OAAO,CAAC,QAAQ,CAAiC;IACjD,8FAA8F;IAC9F,IACI,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,EAI3C;IACD,IAAI,OAAO,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAEvC;IAED,2FAA2F;IAClF,gB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,OAAO,CAAC,gBAAgB;IAcxB;;;;OAIG;IACH,OAAO,CAAC,gBAAgB;IAsBxB;;;OAGG;IACH,OAAO,CAAC,wBAAwB;IAMhC;;;OAGG;IACH,OAAO,CAAC,6BAA6B;IAcrC;;;;OAIG;IACH,OAAO,CAAC,oBAAoB;IAyC5B;;;OAGG;IACH,OAAO,CAAC,cAAc;IAuBtB,2EAA2E;IAC3E,OAAO,CAAC,oBAAoB;IAiB5B;;;;OAIG;IACH,OAAO,CAAC,iBAAiB;yCA1Xd,6BAA6B;2CAA7B,6BAA6B;CAiZzC;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,IAAI,IAAI,CAG/C"}
1
+ {"version":3,"file":"timeline-view-renderer.component.d.ts","sourceRoot":"","sources":["../../../../src/lib/view-types/renderers/timeline-view-renderer.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,YAAY,EAEZ,MAAM,EAGP,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,UAAU,EAAE,eAAe,EAAqB,MAAM,sBAAsB,CAAC;AAEtF,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EACL,aAAa,EACb,mBAAmB,EACnB,iBAAiB,EACjB,mBAAmB,EACpB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;;AAEvD;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,kBAAkB;IACjC,2FAA2F;IAC3F,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,0EAA0E;IAC1E,WAAW,CAAC,EAAE,mBAAmB,CAAC;IAClC,qEAAqE;IACrE,SAAS,CAAC,EAAE,iBAAiB,CAAC;IAC9B,8EAA8E;IAC9E,eAAe,CAAC,EAAE,mBAAmB,CAAC;CACvC;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,qBAuKa,6BACX,SAAQ,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B;IAMxC,QAAQ,IAAI,IAAI;IAahB,kEAAkE;IAClE,IAAI,4BAA4B,IAAI,MAAM,CAMzC;IAED;;;;OAIG;IACH,IAAI,uBAAuB,IAAI,MAAM,GAAG,IAAI,CAa3C;IAMD,4FAA4F;IAC5F,yBAAyB,IAAI,IAAI;IAMjC,mGAAmG;IACnG,uBAAuB,IAAI,IAAI;IAM/B,4FAA4F;IAC5F,oBAAoB,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI;IAa7C;;;;OAIG;IACH,oBAAoB,CAAC,KAAK,EAAE,mBAAmB,GAAG,IAAI;IAWtD;;;;OAIG;IACH,OAAO,CAAC,kBAAkB;IAO1B,8EAA8E;IAC9E,OAAO,CAAC,gBAAgB;IAcxB;;;;OAIG;IACH,OAAO,CAAC,gBAAgB;IAsBxB;;;OAGG;IACH,OAAO,CAAC,wBAAwB;IAMhC;;;OAGG;IACH,OAAO,CAAC,6BAA6B;IAcrC;;;;OAIG;IACH,OAAO,CAAC,oBAAoB;IA6C5B;;;OAGG;IACH,OAAO,CAAC,cAAc;IAuBtB,2EAA2E;IAC3E,OAAO,CAAC,oBAAoB;IAiB5B;;;;OAIG;IACH,OAAO,CAAC,iBAAiB;IAwBzB,iGAAiG;IACjG,OAAO,CAAC,cAAc;yCAvZX,6BAA6B;2CAA7B,6BAA6B;CAgazC;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,IAAI,IAAI,CAG/C"}
@@ -343,11 +343,15 @@ export class TimelineViewRendererComponent extends BaseAngularComponent {
343
343
  if (subtitleField) {
344
344
  group.SubtitleFieldName = subtitleField;
345
345
  }
346
+ const imageField = this.findImageField();
346
347
  group.CardConfig = {
347
348
  collapsible: true,
348
349
  defaultExpanded: false,
349
350
  showDate: true,
350
351
  dateFormat: 'MMM d, yyyy h:mm a',
352
+ ...(imageField
353
+ ? { imageField, imagePosition: 'left', imageSize: 'small' }
354
+ : {}),
351
355
  };
352
356
  this.TimelineGroups = [group];
353
357
  }
@@ -410,6 +414,14 @@ export class TimelineViewRendererComponent extends BaseAngularComponent {
410
414
  const firstOther = fields.find((f) => f.Name !== excludeField);
411
415
  return firstOther?.Name || null;
412
416
  }
417
+ /** Image field (ExtendedType='Image') so timeline cards crop a thumbnail, same as grid/cards. */
418
+ findImageField() {
419
+ if (!this._entity) {
420
+ return null;
421
+ }
422
+ const match = this._entity.Fields.find((f) => f.ExtendedType === 'Image' && f.TSType === EntityFieldTSType.String);
423
+ return match?.Name ?? null;
424
+ }
413
425
  static ɵfac = /*@__PURE__*/ (() => { let ɵTimelineViewRendererComponent_BaseFactory; return function TimelineViewRendererComponent_Factory(__ngFactoryType__) { return (ɵTimelineViewRendererComponent_BaseFactory || (ɵTimelineViewRendererComponent_BaseFactory = i0.ɵɵgetInheritedFactory(TimelineViewRendererComponent)))(__ngFactoryType__ || TimelineViewRendererComponent); }; })();
414
426
  static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: TimelineViewRendererComponent, selectors: [["mj-timeline-view-renderer"]], inputs: { entity: "entity", records: "records", selectedRecordId: "selectedRecordId", filterText: "filterText", config: "config" }, outputs: { recordSelected: "recordSelected", recordOpened: "recordOpened", configChanged: "configChanged" }, standalone: false, features: [i0.ɵɵInheritDefinitionFeature], decls: 13, vars: 8, consts: [[1, "timeline-view-chrome"], [1, "timeline-date-selector"], [1, "fa-solid", "fa-calendar-days"], [1, "date-field-label"], [1, "date-field-select", 3, "value"], [1, "timeline-orientation-toggle"], [1, "toggle-btn", 3, "click", "title"], [1, "timeline-sort-toggle"], [3, "groups", "orientation", "layout", "sortOrder", "segmentGrouping", "segmentsCollapsible", "segmentsDefaultExpanded", "selectedEventId"], ["Variant", "warning", "Icon", "fa-solid fa-calendar-xmark", "Title", "This entity has no date fields to plot on a timeline.", 1, "timeline-view-empty-fill"], [1, "date-field-select", 3, "change", "value"], [3, "value"], [3, "afterEventClick", "groups", "orientation", "layout", "sortOrder", "segmentGrouping", "segmentsCollapsible", "segmentsDefaultExpanded", "selectedEventId"]], template: function TimelineViewRendererComponent_Template(rf, ctx) { if (rf & 1) {
415
427
  i0.ɵɵelementStart(0, "div", 0)(1, "div", 1);