@memberjunction/ng-entity-viewer 6.2.0-edge.5 → 6.2.0-edge.7

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 (93) hide show
  1. package/README.md +28 -0
  2. package/dist/lib/aggregate-setup-dialog/aggregate-setup-dialog.component.d.ts +48 -1
  3. package/dist/lib/aggregate-setup-dialog/aggregate-setup-dialog.component.d.ts.map +1 -1
  4. package/dist/lib/aggregate-setup-dialog/aggregate-setup-dialog.component.js +631 -279
  5. package/dist/lib/aggregate-setup-dialog/aggregate-setup-dialog.component.js.map +1 -1
  6. package/dist/lib/entity-cards/entity-cards.component.d.ts +2 -0
  7. package/dist/lib/entity-cards/entity-cards.component.d.ts.map +1 -1
  8. package/dist/lib/entity-cards/entity-cards.component.js +30 -2
  9. package/dist/lib/entity-cards/entity-cards.component.js.map +1 -1
  10. package/dist/lib/entity-data-grid/entity-data-grid.component.d.ts +162 -3
  11. package/dist/lib/entity-data-grid/entity-data-grid.component.d.ts.map +1 -1
  12. package/dist/lib/entity-data-grid/entity-data-grid.component.js +976 -300
  13. package/dist/lib/entity-data-grid/entity-data-grid.component.js.map +1 -1
  14. package/dist/lib/entity-data-grid/open-in-excel.d.ts +40 -0
  15. package/dist/lib/entity-data-grid/open-in-excel.d.ts.map +1 -0
  16. package/dist/lib/entity-data-grid/open-in-excel.js +60 -0
  17. package/dist/lib/entity-data-grid/open-in-excel.js.map +1 -0
  18. package/dist/lib/entity-record-detail-panel/entity-record-detail-panel.component.d.ts +42 -0
  19. package/dist/lib/entity-record-detail-panel/entity-record-detail-panel.component.d.ts.map +1 -1
  20. package/dist/lib/entity-record-detail-panel/entity-record-detail-panel.component.js +109 -11
  21. package/dist/lib/entity-record-detail-panel/entity-record-detail-panel.component.js.map +1 -1
  22. package/dist/lib/entity-viewer/entity-viewer.component.d.ts +51 -3
  23. package/dist/lib/entity-viewer/entity-viewer.component.d.ts.map +1 -1
  24. package/dist/lib/entity-viewer/entity-viewer.component.js +222 -53
  25. package/dist/lib/entity-viewer/entity-viewer.component.js.map +1 -1
  26. package/dist/lib/entity-viewer/view-property-chips.d.ts +17 -0
  27. package/dist/lib/entity-viewer/view-property-chips.d.ts.map +1 -0
  28. package/dist/lib/entity-viewer/view-property-chips.js +42 -0
  29. package/dist/lib/entity-viewer/view-property-chips.js.map +1 -0
  30. package/dist/lib/recycle-bin/recycle-bin-chip.component.d.ts.map +1 -1
  31. package/dist/lib/recycle-bin/recycle-bin-chip.component.js +5 -4
  32. package/dist/lib/recycle-bin/recycle-bin-chip.component.js.map +1 -1
  33. package/dist/lib/recycle-bin/recycle-bin.component.js +3 -3
  34. package/dist/lib/recycle-bin/recycle-bin.component.js.map +1 -1
  35. package/dist/lib/utils/record.util.d.ts +44 -1
  36. package/dist/lib/utils/record.util.d.ts.map +1 -1
  37. package/dist/lib/utils/record.util.js +142 -0
  38. package/dist/lib/utils/record.util.js.map +1 -1
  39. package/dist/lib/view-config-panel/view-config-panel.component.d.ts +408 -55
  40. package/dist/lib/view-config-panel/view-config-panel.component.d.ts.map +1 -1
  41. package/dist/lib/view-config-panel/view-config-panel.component.js +3922 -993
  42. package/dist/lib/view-config-panel/view-config-panel.component.js.map +1 -1
  43. package/dist/lib/view-properties-editor/view-properties-editor.component.d.ts +52 -0
  44. package/dist/lib/view-properties-editor/view-properties-editor.component.d.ts.map +1 -0
  45. package/dist/lib/view-properties-editor/view-properties-editor.component.js +445 -0
  46. package/dist/lib/view-properties-editor/view-properties-editor.component.js.map +1 -0
  47. package/dist/lib/view-selector/view-selector.component.d.ts +28 -1
  48. package/dist/lib/view-selector/view-selector.component.d.ts.map +1 -1
  49. package/dist/lib/view-selector/view-selector.component.js +322 -168
  50. package/dist/lib/view-selector/view-selector.component.js.map +1 -1
  51. package/dist/lib/view-types/descriptors/calendar-view-type.d.ts +22 -0
  52. package/dist/lib/view-types/descriptors/calendar-view-type.d.ts.map +1 -0
  53. package/dist/lib/view-types/descriptors/calendar-view-type.js +38 -0
  54. package/dist/lib/view-types/descriptors/calendar-view-type.js.map +1 -0
  55. package/dist/lib/view-types/index.d.ts +3 -2
  56. package/dist/lib/view-types/index.d.ts.map +1 -1
  57. package/dist/lib/view-types/index.js +5 -2
  58. package/dist/lib/view-types/index.js.map +1 -1
  59. package/dist/lib/view-types/renderers/calendar-placement.d.ts +97 -0
  60. package/dist/lib/view-types/renderers/calendar-placement.d.ts.map +1 -0
  61. package/dist/lib/view-types/renderers/calendar-placement.js +145 -0
  62. package/dist/lib/view-types/renderers/calendar-placement.js.map +1 -0
  63. package/dist/lib/view-types/renderers/calendar-view-prop-sheet.component.d.ts +36 -0
  64. package/dist/lib/view-types/renderers/calendar-view-prop-sheet.component.d.ts.map +1 -0
  65. package/dist/lib/view-types/renderers/calendar-view-prop-sheet.component.js +167 -0
  66. package/dist/lib/view-types/renderers/calendar-view-prop-sheet.component.js.map +1 -0
  67. package/dist/lib/view-types/renderers/calendar-view-renderer.component.d.ts +107 -0
  68. package/dist/lib/view-types/renderers/calendar-view-renderer.component.d.ts.map +1 -0
  69. package/dist/lib/view-types/renderers/calendar-view-renderer.component.js +501 -0
  70. package/dist/lib/view-types/renderers/calendar-view-renderer.component.js.map +1 -0
  71. package/dist/lib/view-types/renderers/grid-view-renderer.component.d.ts +9 -1
  72. package/dist/lib/view-types/renderers/grid-view-renderer.component.d.ts.map +1 -1
  73. package/dist/lib/view-types/renderers/grid-view-renderer.component.js +24 -5
  74. package/dist/lib/view-types/renderers/grid-view-renderer.component.js.map +1 -1
  75. package/dist/lib/view-types/renderers/map-view-renderer.component.d.ts.map +1 -1
  76. package/dist/lib/view-types/renderers/map-view-renderer.component.js +3 -3
  77. package/dist/lib/view-types/renderers/map-view-renderer.component.js.map +1 -1
  78. package/dist/lib/view-types/view-type.contracts.d.ts +6 -0
  79. package/dist/lib/view-types/view-type.contracts.d.ts.map +1 -1
  80. package/dist/lib/view-types/view-type.contracts.js.map +1 -1
  81. package/dist/lib/view-workspace/view-workspace.component.d.ts +54 -1
  82. package/dist/lib/view-workspace/view-workspace.component.d.ts.map +1 -1
  83. package/dist/lib/view-workspace/view-workspace.component.js +274 -27
  84. package/dist/lib/view-workspace/view-workspace.component.js.map +1 -1
  85. package/dist/module.d.ts +35 -31
  86. package/dist/module.d.ts.map +1 -1
  87. package/dist/module.js +21 -3
  88. package/dist/module.js.map +1 -1
  89. package/dist/public-api.d.ts +5 -0
  90. package/dist/public-api.d.ts.map +1 -1
  91. package/dist/public-api.js +5 -0
  92. package/dist/public-api.js.map +1 -1
  93. package/package.json +23 -21
@@ -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,EAAmD,SAAS,EAAU,MAAM,eAAe,CAAC;AAC3I,OAAO,EAAE,UAAU,EAAE,aAAa,EAAY,YAAY,EAA+B,MAAM,sBAAsB,CAAC;AACtH,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAC7D,OAAO,EAEL,KAAK,eAAe,EACpB,KAAK,WAAW,EAChB,KAAK,mBAAmB,EACzB,MAAM,iCAAiC,CAAC;AAEzC,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,OAA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,qBAAqB;yCA36BlB,yBAAyB;2CAAzB,yBAAyB;CAk7BrC;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,EAAmD,SAAS,EAAU,MAAM,eAAe,CAAC;AAC3I,OAAO,EAAE,UAAU,EAAE,aAAa,EAAY,YAAY,EAA+B,MAAM,sBAAsB,CAAC;AACtH,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAC7D,OAAO,EAEL,KAAK,eAAe,EACpB,KAAK,WAAW,EAChB,KAAK,mBAAmB,EACzB,MAAM,iCAAiC,CAAC;AAEzC,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,0BAA0B,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AACtG,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,2BAA2B,EAAE,MAAM,wBAAwB,CAAC;AACrG,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;AACtH,OAAO,EAAE,sBAAsB,EAAE,4BAA4B,EAAE,kBAAkB,EAAE,MAAM,2CAA2C,CAAC;AACrI,OAAO,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAEpD,OAAO,EAAE,uBAAuB,EAAE,MAAM,mDAAmD,CAAC;;AAE5F;;;;;;;;GAQG;AACH,MAAM,WAAW,cAAc;IAC7B;;;;OAIG;IACH,SAAS,CAAC,EAAE,aAAa,CAAC;IAC1B,+EAA+E;IAC/E,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,kEAAkE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endererComponent extends BaseAngularComponent {
186
186
  pageSize;
187
187
  /** Whether the host is currently (re)loading the record set. Accepted per contract; unused here. */
188
188
  isLoading;
189
+ /** Active alternate base view semantic name pushed by the host, forwarded into `EffectiveParams`. */
190
+ alternateBaseView = null;
191
+ /**
192
+ * ID of the persisted `MJ: User Views` record backing the current record set, or `null` for a
193
+ * dynamic / unsaved view. Forwarded to `[SavedViewID]` on `<mj-entity-data-grid>` so Open in Excel
194
+ * works when hosted inside `<mj-entity-viewer>` without handing `_viewEntity` persistence to the grid.
195
+ */
196
+ SavedViewID = null;
189
197
  // ---- IViewRenderer outputs (generic + navigation channels only) ----
190
198
  /** Emitted when a row is single-clicked — payload is the raw record object (host builds the key). */
191
199
  recordSelected = new EventEmitter();
@@ -309,10 +317,15 @@ export class GridViewRendererComponent extends BaseAngularComponent {
309
317
  */
310
318
  get EffectiveParams() {
311
319
  if (this.config.params) {
312
- return this.config.params;
320
+ return this.alternateBaseView && !this.config.params.AlternateBaseView
321
+ ? { ...this.config.params, AlternateBaseView: this.alternateBaseView }
322
+ : this.config.params;
313
323
  }
314
324
  if (this.entity) {
315
- return { EntityName: this.entity.Name };
325
+ return {
326
+ EntityName: this.entity.Name,
327
+ ...(this.alternateBaseView ? { AlternateBaseView: this.alternateBaseView } : {}),
328
+ };
316
329
  }
317
330
  return null;
318
331
  }
@@ -886,6 +899,7 @@ export class GridViewRendererComponent extends BaseAngularComponent {
886
899
  Fields: child.PrimaryKeys.map(f => f.Name),
887
900
  ResultType: 'simple',
888
901
  MaxRows: 1,
902
+ SkipTotalRowCount: true,
889
903
  })));
890
904
  if (results.some(r => !r.Success))
891
905
  return null;
@@ -962,7 +976,7 @@ export class GridViewRendererComponent extends BaseAngularComponent {
962
976
  } if (rf & 2) {
963
977
  let _t;
964
978
  i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.grid = _t.first);
965
- } }, inputs: { entity: "entity", records: "records", ExportDataProvider: "ExportDataProvider", 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: 6, vars: 25, consts: [["grid", ""], [3, "AfterRowClick", "AfterRowDoubleClick", "AfterSort", "GridStateChanged", "SelectionChange", "NewButtonClick", "RefreshButtonClick", "DeleteButtonClick", "AddToListRequested", "ForeignKeyClick", "PageChange", "ManageColumnsRequested", "MergeRecordsRequested", "Provider", "Data", "ExportDataProvider", "Params", "FilterText", "GridState", "Height", "AllowLoad", "AutoLoadEntityActions", "ShowToolbar", "ShowSearch", "ToolbarConfig", "SelectionMode", "ShowAddToListButton", "ShowPager", "PageSize", "TotalRowCount", "PagerPageNumber", "ShowMergeButton"], [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"], ["Size", "lg", 3, "Visible", "Closeable"], ["role", "status", 1, "mj-ev-merge-notice"], [3, "complete", "cancel", "Provider", "visible", "config"], ["Size", "lg", 3, "Close", "Visible", "Closeable"], ["role", "radiogroup", "aria-label", "Record to keep", 1, "mj-ev-merge-survivor"], ["type", "button", "mjButton", "", "size", "sm", "role", "radio", 3, "click", "variant", "disabled"], [1, "mj-ev-merge-survivor-note"], [3, "MergeConfirmed", "MergeCancelled", "Fields", "Config", "MergeEnabled", "IsMerging"], [1, "mj-ev-merge-deps"], [1, "mj-ev-merge-notice-text"], ["type", "button", "title", "Dismiss", "aria-label", "Dismiss", 1, "mj-ev-merge-notice-dismiss", 3, "click"], [1, "fa-solid", "fa-xmark"]], template: function GridViewRendererComponent_Template(rf, ctx) { if (rf & 1) {
979
+ } }, inputs: { entity: "entity", records: "records", ExportDataProvider: "ExportDataProvider", exportDataProvider: "exportDataProvider", selectedRecordId: "selectedRecordId", filterText: "filterText", config: "config", AutoLoadEntityActions: "AutoLoadEntityActions", totalRecordCount: "totalRecordCount", page: "page", pageSize: "pageSize", isLoading: "isLoading", alternateBaseView: "alternateBaseView", SavedViewID: "SavedViewID" }, outputs: { recordSelected: "recordSelected", recordOpened: "recordOpened", configChanged: "configChanged", dataRequest: "dataRequest", configureRequested: "configureRequested", openRelatedRecordRequested: "openRelatedRecordRequested", createRecordRequested: "createRecordRequested" }, standalone: false, features: [i0.ɵɵInheritDefinitionFeature], decls: 6, vars: 26, consts: [["grid", ""], [3, "AfterRowClick", "AfterRowDoubleClick", "AfterSort", "GridStateChanged", "SelectionChange", "NewButtonClick", "RefreshButtonClick", "DeleteButtonClick", "AddToListRequested", "ForeignKeyClick", "PageChange", "ManageColumnsRequested", "MergeRecordsRequested", "Provider", "Data", "ExportDataProvider", "Params", "SavedViewID", "FilterText", "GridState", "Height", "AllowLoad", "AutoLoadEntityActions", "ShowToolbar", "ShowSearch", "ToolbarConfig", "SelectionMode", "ShowAddToListButton", "ShowPager", "PageSize", "TotalRowCount", "PagerPageNumber", "ShowMergeButton"], [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"], ["Size", "lg", 3, "Visible", "Closeable"], ["role", "status", 1, "mj-ev-merge-notice"], [3, "complete", "cancel", "Provider", "visible", "config"], ["Size", "lg", 3, "Close", "Visible", "Closeable"], ["role", "radiogroup", "aria-label", "Record to keep", 1, "mj-ev-merge-survivor"], ["type", "button", "mjButton", "", "size", "sm", "role", "radio", 3, "click", "variant", "disabled"], [1, "mj-ev-merge-survivor-note"], [3, "MergeConfirmed", "MergeCancelled", "Fields", "Config", "MergeEnabled", "IsMerging"], [1, "mj-ev-merge-deps"], [1, "mj-ev-merge-notice-text"], ["type", "button", "title", "Dismiss", "aria-label", "Dismiss", 1, "mj-ev-merge-notice-dismiss", 3, "click"], [1, "fa-solid", "fa-xmark"]], template: function GridViewRendererComponent_Template(rf, ctx) { if (rf & 1) {
966
980
  i0.ɵɵelementStart(0, "mj-entity-data-grid", 1, 0);
967
981
  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(); })("MergeRecordsRequested", function GridViewRendererComponent_Template_mj_entity_data_grid_MergeRecordsRequested_0_listener($event) { return ctx.onMergeRequested($event); });
968
982
  i0.ɵɵelementEnd();
@@ -973,7 +987,7 @@ export class GridViewRendererComponent extends BaseAngularComponent {
973
987
  i0.ɵɵconditionalCreate(4, GridViewRendererComponent_Conditional_4_Template, 12, 16, "mj-dialog", 4);
974
988
  i0.ɵɵconditionalCreate(5, GridViewRendererComponent_Conditional_5_Template, 5, 1, "div", 5);
975
989
  } if (rf & 2) {
976
- 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(24, _c1))("SelectionMode", ctx.effectiveSelectionMode)("ShowAddToListButton", ctx.effectiveShowAddToListButton)("ShowPager", ctx.effectiveShowPager)("PageSize", ctx.effectivePageSize)("TotalRowCount", ctx.totalRecordCount ?? 0)("PagerPageNumber", ctx.page ?? 1)("ShowMergeButton", ctx.effectiveShowMergeButton);
990
+ i0.ɵɵproperty("Provider", ctx.Provider)("Data", ctx.records)("ExportDataProvider", ctx.exportDataProvider)("Params", ctx.effectiveParams)("SavedViewID", ctx.SavedViewID)("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(25, _c1))("SelectionMode", ctx.effectiveSelectionMode)("ShowAddToListButton", ctx.effectiveShowAddToListButton)("ShowPager", ctx.effectiveShowPager)("PageSize", ctx.effectivePageSize)("TotalRowCount", ctx.totalRecordCount ?? 0)("PagerPageNumber", ctx.page ?? 1)("ShowMergeButton", ctx.effectiveShowMergeButton);
977
991
  i0.ɵɵadvance(2);
978
992
  i0.ɵɵconditional(ctx.listManagementConfig ? 2 : -1);
979
993
  i0.ɵɵadvance();
@@ -993,6 +1007,7 @@ export class GridViewRendererComponent extends BaseAngularComponent {
993
1007
  [Data]="records"
994
1008
  [ExportDataProvider]="exportDataProvider"
995
1009
  [Params]="effectiveParams"
1010
+ [SavedViewID]="SavedViewID"
996
1011
  [FilterText]="filterText ?? ''"
997
1012
  [GridState]="config.gridState ?? null"
998
1013
  [Height]="'auto'"
@@ -1119,6 +1134,10 @@ export class GridViewRendererComponent extends BaseAngularComponent {
1119
1134
  type: Input
1120
1135
  }], isLoading: [{
1121
1136
  type: Input
1137
+ }], alternateBaseView: [{
1138
+ type: Input
1139
+ }], SavedViewID: [{
1140
+ type: Input
1122
1141
  }], recordSelected: [{
1123
1142
  type: Output
1124
1143
  }], recordOpened: [{
@@ -1137,7 +1156,7 @@ export class GridViewRendererComponent extends BaseAngularComponent {
1137
1156
  type: ViewChild,
1138
1157
  args: ['grid']
1139
1158
  }] }); })();
1140
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(GridViewRendererComponent, { className: "GridViewRendererComponent", filePath: "src/lib/view-types/renderers/grid-view-renderer.component.ts", lineNumber: 289 }); })();
1159
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(GridViewRendererComponent, { className: "GridViewRendererComponent", filePath: "src/lib/view-types/renderers/grid-view-renderer.component.ts", lineNumber: 290 }); })();
1141
1160
  /**
1142
1161
  * Tree-shaking guard. Force-references this renderer so bundlers (ESBuild/Vite) don't drop the
1143
1162
  * 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,EAAa,MAAM,EAAE,MAAM,eAAe,CAAC;AAC3I,OAAO,EAA6B,QAAQ,EAAE,YAAY,EAAE,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAEtH,OAAO,EACL,uBAAuB,GAIxB,MAAM,iCAAiC,CAAC;AACzC,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;;;;;;;;;;;IA+IrE,oDAMC;IADC,AADA,4NAAY,uCAAgC,KAAC,qMACnC,+BAAwB,KAAC;IAErC,iBAA4B;;;IAJ1B,AADA,AADA,0CAAqB,4CACe,uCACL;;;IAiD7B,6BAA4B;IAAA,YAA+B;IAAA,iBAAI;;;IAAnC,cAA+B;IAA/B,sDAA+B;;;;IAzB/D,oCAAuG;IAA7B,gMAAS,yBAAkB,KAAC;IAElG,AADF,8BAAgF,WACxE;IAAA,oBAAI;IAAA,iBAAO;IACjB,iCAIqC;IAAnC,6LAAS,wBAAiB,MAAM,CAAC,KAAC;IAAC,YAAiC;IAAA,iBAAS;IAC/E,iCAIsC;IAApC,6LAAS,wBAAiB,OAAO,CAAC,KAAC;IAAC,YAAkC;IAAA,iBAAS;IACjF,gCAAwC;IAAA,YAAsF;IAChI,AADgI,iBAAO,EACjI;IACN,kDAOC;IADC,AADA,qOAAkB,+BAAwB,KAAC,kNACzB,yBAAkB,KAAC;IAEvC,iBAAwB;IACxB,0GAAiC;IAGnC,iBAAY;;;IA3B0B,AAA3B,8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GN,MAAM;;kBAQN,MAAM;;kBAMN,MAAM;;kBAGN,MAAM;;kBAMN,SAAS;mBAAC,MAAM;;kFA5FN,yBAAyB;AAo7BtC;;;;GAIG;AACH,MAAM,UAAU,oBAAoB;IAClC,0DAA0D;AAC5D,CAAC","sourcesContent":["import { Component, Input, Output, EventEmitter, ViewEncapsulation, ViewChild, ChangeDetectorRef, OnDestroy, inject } from '@angular/core';\nimport { EntityInfo, RunViewParams, LogError, CompositeKey, RunView, RecordMergeRequest } from '@memberjunction/core';\nimport { ExportColumn } from '@memberjunction/export-engine';\nimport {\n RecordComparisonService,\n type FieldComparison,\n type MergeConfig,\n type MergeConfirmedEvent,\n} from '@memberjunction/ng-record-merge';\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 [ShowMergeButton]=\"effectiveShowMergeButton\"\n (MergeRecordsRequested)=\"onMergeRequested($event)\"\n >\n </mj-entity-data-grid>\n\n <!-- NOTE: Export is NOT handled here — mj-entity-data-grid hosts its OWN export dialog\n (its onExportClick opens it with formats/sampling via ExportService). Adding a second\n dialog here produced two stacked export dialogs. The grid owns export self-contained. -->\n\n <!-- Self-contained Add-to-List dialog (Generic) — owned by this wrapper, never bubbles up. -->\n @if (listManagementConfig) {\n <mj-list-management-dialog\n [Provider]=\"Provider\"\n [visible]=\"showListManagementDialog\"\n [config]=\"listManagementConfig\"\n (complete)=\"onListManagementComplete($event)\"\n (cancel)=\"onListManagementCancel()\"\n >\n </mj-list-management-dialog>\n }\n\n <!-- Self-contained Delete confirmation (Generic) — owned by this wrapper, never bubbles up. -->\n <mj-ev-confirm-dialog\n [IsOpen]=\"showDeleteConfirm\"\n Title=\"Delete Records\"\n [Message]=\"deleteConfirmMessage\"\n DetailMessage=\"This action cannot be undone.\"\n ConfirmText=\"Delete\"\n ConfirmStyle=\"danger\"\n Icon=\"fa-solid fa-trash\"\n (Confirmed)=\"onDeleteConfirmed()\"\n (Cancelled)=\"onDeleteCancelled()\"\n >\n </mj-ev-confirm-dialog>\n\n <!-- Self-contained merge panel (Generic) — owned by this wrapper, never bubbles up.\n Lives inside the @if so the panel rebuilds its comparison (ngOnInit) per request. -->\n @if (mergeState) {\n <mj-dialog [Visible]=\"true\" Size=\"lg\" [Closeable]=\"!mergeState.IsMerging\" (Close)=\"onMergeCancelled()\">\n <div class=\"mj-ev-merge-survivor\" role=\"radiogroup\" aria-label=\"Record to keep\">\n <span>Keep</span>\n <button type=\"button\" mjButton size=\"sm\" role=\"radio\"\n [variant]=\"mergeState.Config.SurvivorSide === 'left' ? 'primary' : 'secondary'\"\n [attr.aria-checked]=\"mergeState.Config.SurvivorSide === 'left'\"\n [disabled]=\"mergeState.IsMerging\"\n (click)=\"onSurvivorChange('left')\">{{ mergeState.Config.LeftLabel }}</button>\n <button type=\"button\" mjButton size=\"sm\" role=\"radio\"\n [variant]=\"mergeState.Config.SurvivorSide === 'right' ? 'primary' : 'secondary'\"\n [attr.aria-checked]=\"mergeState.Config.SurvivorSide === 'right'\"\n [disabled]=\"mergeState.IsMerging\"\n (click)=\"onSurvivorChange('right')\">{{ mergeState.Config.RightLabel }}</button>\n <span class=\"mj-ev-merge-survivor-note\">{{ mergeLoserLabel }} will be deleted; its linked records move to the record you keep.</span>\n </div>\n <mj-record-merge-panel\n [Fields]=\"mergeState.Fields\"\n [Config]=\"mergeState.Config\"\n [MergeEnabled]=\"!mergeState.IsMerging\"\n [IsMerging]=\"mergeState.IsMerging\"\n (MergeConfirmed)=\"onMergeConfirmed($event)\"\n (MergeCancelled)=\"onMergeCancelled()\"\n >\n </mj-record-merge-panel>\n @if (mergeState.DependencyNote) {\n <p class=\"mj-ev-merge-deps\">{{ mergeState.DependencyNote }}</p>\n }\n </mj-dialog>\n }\n @if (mergeNotice) {\n <div class=\"mj-ev-merge-notice\" role=\"status\">\n <span class=\"mj-ev-merge-notice-text\">{{ mergeNotice }}</span>\n <button type=\"button\" class=\"mj-ev-merge-notice-dismiss\" (click)=\"onDismissMergeNotice()\" title=\"Dismiss\" aria-label=\"Dismiss\">\n <i class=\"fa-solid fa-xmark\"></i>\n </button>\n </div>\n }\n `,\n styles: [\n `\n :host {\n display: block;\n height: 100%;\n }\n\n .mj-ev-merge-survivor {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: 8px;\n margin-bottom: 12px;\n font-size: var(--mj-text-sm);\n color: var(--mj-text-secondary);\n }\n\n .mj-ev-merge-survivor-note {\n color: var(--mj-text-muted);\n }\n\n .mj-ev-merge-deps {\n margin: 0;\n font-size: var(--mj-text-xs);\n color: var(--mj-text-muted);\n }\n\n .mj-ev-merge-notice {\n position: fixed;\n bottom: 16px;\n left: 50%;\n transform: translateX(-50%);\n z-index: 1001;\n padding: 8px 14px;\n border: 1px solid var(--mj-border-subtle);\n border-radius: var(--mj-radius-md);\n background: var(--mj-bg-surface-elevated);\n color: var(--mj-text-primary);\n font-size: var(--mj-text-sm);\n box-shadow: var(--mj-shadow-md);\n display: flex;\n align-items: center;\n gap: 10px;\n }\n\n .mj-ev-merge-notice-dismiss {\n flex-shrink: 0;\n background: none;\n border: none;\n padding: 0 2px;\n cursor: pointer;\n color: var(--mj-text-muted);\n font-size: var(--mj-text-sm);\n line-height: 1;\n }\n\n .mj-ev-merge-notice-dismiss:hover {\n color: var(--mj-text-primary);\n }\n `,\n ],\n})\nexport class GridViewRendererComponent extends BaseAngularComponent implements IViewRenderer<GridViewConfig>, OnDestroy {\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 /** @deprecated Use {@link ExportDataProvider}. */\n @Input() set exportDataProvider(value: (() => Promise<Record<string, unknown>[]>) | null) {\n this.ExportDataProvider = value;\n }\n /** @deprecated Use {@link ExportDataProvider}. */\n get exportDataProvider(): (() => Promise<Record<string, unknown>[]>) | null {\n return this.ExportDataProvider;\n }\n\n /** Primary-key string of the currently selected record, if any. */\n @Input() selectedRecordId: string | null = null;\n\n /** Active filter text — passed through for the grid's cell highlighting. */\n @Input() filterText: string | null = null;\n\n /** Opaque per-view configuration. Seeds the grid bindings; mutated + re-emitted on grid changes. */\n @Input() config: GridViewConfig = {};\n\n /**\n * When true (default), the grid self-loads the entity's active EntityActions and shows them — buttons\n * appear only for entities that actually have actions (data-driven). Actions whose invocation names a\n * `RuntimeUXDriverClass` mount that interactive driver (e.g. the Record Process runner) in-place.\n */\n @Input() AutoLoadEntityActions = true;\n\n // ---- IViewRenderer generic data-context inputs ----\n\n /** Total record count across all pages, for the grid's pager. Fed into `[TotalRowCount]`. */\n @Input() totalRecordCount?: number;\n\n /** One-based current page the host is showing. Fed into `[PagerPageNumber]` (already 1-based). */\n @Input() page?: number;\n\n /** Page size the host is using — fallback when `config.pageSize` is absent. */\n @Input() pageSize?: number;\n\n /** Whether the host is currently (re)loading the record set. Accepted per contract; unused here. */\n @Input() isLoading?: boolean;\n\n // ---- IViewRenderer outputs (generic + navigation channels only) ----\n\n /** Emitted when a row is single-clicked — payload is the raw record object (host builds the key). */\n @Output() recordSelected = new EventEmitter<unknown>();\n\n /** Emitted when a row is double-clicked — payload is the raw record object (host builds the key). */\n @Output() recordOpened = new EventEmitter<unknown>();\n\n /** Emitted when this renderer mutates its opaque {@link config} (sort / grid-state persistence). */\n @Output() configChanged = new EventEmitter<GridViewConfig>();\n\n /** Generic data-access channel: ask the host to re-load with different sort / page. */\n @Output() dataRequest = new EventEmitter<ViewDataRequest>();\n\n /**\n * Ask the host to open this view's configuration UI. Raised when the grid emits\n * `ManageColumnsRequested` (its \"Manage Columns\" toolbar affordance). Part of the generic\n * {@link IViewRenderer} contract; the container forwards it to the workspace, which opens the\n * config panel (Columns tab) — the canonical column editor.\n */\n @Output() configureRequested = new EventEmitter<void>();\n\n /**\n * NAVIGATION: open a related record on a (possibly different) entity from a foreign-key cell click.\n * Routing lives in the outer app, so this is one of the few signals that legitimately bubbles up.\n */\n @Output() openRelatedRecordRequested = new EventEmitter<ViewRelatedRecordNavigation>();\n\n /** NAVIGATION: create a new record of the current entity (grid \"New\" button). Bubbles up for routing. */\n @Output() createRecordRequested = new EventEmitter<void>();\n\n /**\n * Reference to the hosted grid. Currently only retained for parity / future selection resolution;\n * selection is mapped from the {@link records} input rather than read from the grid, per contract.\n */\n @ViewChild('grid') protected grid?: EntityDataGridComponent;\n\n /**\n * IMPERATIVE export entry point ({@link IViewRenderer.exportRecords}). Lets the host trigger\n * an export programmatically (ultimately for the AI agent) by delegating to the hosted grid's\n * self-contained {@link EntityDataGridComponent.Export} (which downloads the file). The grid's\n * toolbar export button remains the interactive path; this is the no-UI equivalent.\n *\n * @param format optional output format; the grid defaults to 'excel' when omitted.\n * @returns true when the export succeeded, false when the grid isn't ready or the export failed.\n */\n async exportRecords(format?: 'csv' | 'excel' | 'json'): Promise<boolean> {\n if (!this.grid) {\n return false;\n }\n const result = await this.grid.Export(format ? { format } : undefined, true);\n return !!result?.success;\n }\n\n /** The hosted grid's on-screen columns ({@link IViewRenderer.GetExportColumns}); empty before it mounts. */\n GetExportColumns(): ExportColumn[] {\n return this.grid?.GetExportColumns() ?? [];\n }\n\n // ================================================================\n // Self-contained dialog state (never surfaced to the host)\n // ================================================================\n // NOTE: Export has no state here — mj-entity-data-grid owns its export dialog.\n\n /** Whether the add-to-list dialog is visible. Toggled internally by {@link onAddToListRequested}. */\n protected showListManagementDialog = false;\n\n /** Config fed into `<mj-list-management-dialog>`. Built from the entity + selected records. */\n protected listManagementConfig: ListManagementDialogConfig | null = null;\n\n /** Whether the delete-confirmation dialog is visible. Toggled internally by {@link onDeleteButtonClick}. */\n protected showDeleteConfirm = false;\n\n /** Records staged for deletion while the confirm dialog is open. */\n private pendingDeleteRecords: Record<string, unknown>[] = [];\n\n /** Dynamic message for the delete-confirmation dialog (reflects the staged record count). */\n protected deleteConfirmMessage = 'Are you sure you want to delete the selected records?';\n\n // ================================================================\n // Effective binding accessors — seed grid inputs from config + defaults\n // ================================================================\n\n /** Effective toolbar visibility — defaults to `true` when not set in config. */\n get EffectiveShowToolbar(): boolean {\n return this.config.showToolbar ?? true;\n }\n\n /** @deprecated Use {@link EffectiveShowToolbar}. */\n get effectiveShowToolbar(): boolean {\n return this.EffectiveShowToolbar;\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 /** @deprecated Use {@link EffectiveShowSearch}. */\n get effectiveShowSearch(): boolean {\n return this.EffectiveShowSearch;\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 /** @deprecated Use {@link EffectiveSelectionMode}. */\n get effectiveSelectionMode(): GridSelectionMode {\n return this.EffectiveSelectionMode;\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 /** @deprecated Use {@link EffectiveShowAddToListButton}. */\n get effectiveShowAddToListButton(): boolean {\n return this.EffectiveShowAddToListButton;\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 /** @deprecated Use {@link EffectiveShowPager}. */\n get effectiveShowPager(): boolean {\n return this.EffectiveShowPager;\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 /** @deprecated Use {@link EffectivePageSize}. */\n get effectivePageSize(): number {\n return this.EffectivePageSize;\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 /** @deprecated Use {@link EffectiveParams}. */\n get effectiveParams(): RunViewParams | null {\n return this.EffectiveParams;\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 /** @deprecated Use {@link OnAfterRowClick}. */\n onAfterRowClick(event: AfterRowClickEventArgs): void {\n return this.OnAfterRowClick(event);\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 /** @deprecated Use {@link OnAfterRowDoubleClick}. */\n onAfterRowDoubleClick(event: AfterRowDoubleClickEventArgs): void {\n return this.OnAfterRowDoubleClick(event);\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 /** @deprecated Use {@link OnAfterSort}. */\n onAfterSort(event: AfterSortEventArgs): void {\n return this.OnAfterSort(event);\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 /** @deprecated Use {@link OnGridStateChanged}. */\n onGridStateChanged(event: GridStateChangedEvent): void {\n return this.OnGridStateChanged(event);\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 /** @deprecated Use {@link OnSelectionChange}. */\n onSelectionChange(_selectedKeys: string[]): void {\n return this.OnSelectionChange(_selectedKeys);\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 /** @deprecated Use {@link OnForeignKeyClick}. */\n onForeignKeyClick(event: ForeignKeyClickEvent): void {\n return this.OnForeignKeyClick(event);\n }\n\n /** New button → {@link createRecordRequested} (NAVIGATION) — opening the create form is routing. */\n OnNewButtonClick(): void {\n this.createRecordRequested.emit();\n }\n\n /** @deprecated Use {@link OnNewButtonClick}. */\n onNewButtonClick(): void {\n return this.OnNewButtonClick();\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 /** @deprecated Use {@link OnPageChange}. */\n onPageChange(event: PageChangeEvent): void {\n return this.OnPageChange(event);\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 /** @deprecated Use {@link OnRefreshButtonClick}. */\n onRefreshButtonClick(): void {\n return this.OnRefreshButtonClick();\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 /** @deprecated Use {@link OnAddToListRequested}. */\n onAddToListRequested(event: { entityInfo: EntityInfo; records: Record<string, unknown>[]; recordIds: string[] }): void {\n return this.OnAddToListRequested(event);\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 /** @deprecated Use {@link OnListManagementComplete}. */\n onListManagementComplete(_result: ListManagementResult): void {\n return this.OnListManagementComplete(_result);\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 /** @deprecated Use {@link OnListManagementCancel}. */\n onListManagementCancel(): void {\n return this.OnListManagementCancel();\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 /** @deprecated Use {@link OnDeleteButtonClick}. */\n onDeleteButtonClick(records: Record<string, unknown>[]): void {\n return this.OnDeleteButtonClick(records);\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 /** @deprecated Use {@link OnDeleteConfirmed}. */\n async onDeleteConfirmed(): Promise<void> {\n return this.OnDeleteConfirmed();\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 /** @deprecated Use {@link OnDeleteCancelled}. */\n onDeleteCancelled(): void {\n return this.OnDeleteCancelled();\n }\n\n // ================================================================\n // Record merge\n // ================================================================\n\n /**\n * The in-flight merge, or null when the panel is closed. Holds everything the panel needs\n * plus the dependency preview, so the panel itself stays a pure presentation component.\n */\n protected mergeState: {\n Config: MergeConfig;\n Fields: FieldComparison[];\n IsMerging: boolean;\n DependencyNote: string | null;\n /** The entity and the two records' real keys — the Config only carries their serialized form. */\n Entity: EntityInfo;\n Keys: [CompositeKey, CompositeKey];\n } | null = null;\n\n /** A one-line status shown under the grid — why a merge was refused, or how one ended. */\n protected mergeNotice: string | null = null;\n\n /** Auto-dismiss timer for {@link mergeNotice}; cleared whenever the notice is replaced. */\n private mergeNoticeTimer: ReturnType<typeof setTimeout> | null = null;\n\n /**\n * How long a merge notice stays up before dismissing itself. The banner is fixed-position over\n * the whole application, so leaving it until the next merge pins it across navigation and every\n * other record the user visits afterwards.\n */\n private static readonly MERGE_NOTICE_TIMEOUT_MS = 8000;\n\n private readonly comparison = inject(RecordComparisonService);\n\n ngOnDestroy(): void {\n // The notice's auto-dismiss outlives the view otherwise, and fires detectChanges on a\n // destroyed component.\n if (this.mergeNoticeTimer) {\n clearTimeout(this.mergeNoticeTimer);\n this.mergeNoticeTimer = null;\n }\n }\n\n /** Dismiss the merge notice from its own close button. */\n OnDismissMergeNotice(): void {\n this.setMergeNotice(null);\n this.cdr.detectChanges();\n }\n\n /** @deprecated Use {@link OnDismissMergeNotice}. */\n onDismissMergeNotice(): void {\n return this.OnDismissMergeNotice();\n }\n\n /**\n * Set (or clear) the merge notice, replacing any pending auto-dismiss. Every write to\n * `mergeNotice` goes through here so a notice cannot outlive its timer or strand an old one.\n */\n private setMergeNotice(message: string | null): void {\n if (this.mergeNoticeTimer) {\n clearTimeout(this.mergeNoticeTimer);\n this.mergeNoticeTimer = null;\n }\n this.mergeNotice = message;\n if (message) {\n this.mergeNoticeTimer = setTimeout(() => {\n this.mergeNoticeTimer = null;\n this.mergeNotice = null;\n this.cdr.detectChanges();\n }, GridViewRendererComponent.MERGE_NOTICE_TIMEOUT_MS);\n }\n }\n\n /**\n * Show the Merge button only where merging can actually succeed: the entity opts in and the\n * user can both update the survivor and delete the loser.\n */\n protected get effectiveShowMergeButton(): boolean {\n const entity = this.entity;\n const user = this.ProviderToUse?.CurrentUser;\n if (!entity?.AllowRecordMerge || !user) return false;\n const permissions = entity.GetUserPermisions(user);\n return !!permissions && permissions.CanUpdate && permissions.CanDelete;\n }\n\n /** The record that will be deleted, named so the user sees the choice before confirming. */\n protected get mergeLoserLabel(): string {\n const config = this.mergeState?.Config;\n if (!config) return '';\n return config.SurvivorSide === 'left' ? config.RightLabel : config.LeftLabel;\n }\n\n /**\n * The grid asked to merge the selected rows. Compare them, preview what will move, and open\n * the panel — nothing is written until the user confirms.\n */\n async OnMergeRequested(event: { entityInfo: EntityInfo; records: Record<string, unknown>[] }): Promise<void> {\n this.setMergeNotice(null);\n try {\n await this.prepareMerge(event);\n } catch (err) {\n // A transport failure in any pre-flight query must not leave the user with nothing.\n this.setMergeNotice(`Could not prepare the merge: ${err instanceof Error ? err.message : String(err)}`);\n this.cdr.detectChanges();\n }\n }\n\n /** @deprecated Use {@link OnMergeRequested}. */\n async onMergeRequested(event: { entityInfo: EntityInfo; records: Record<string, unknown>[] }): Promise<void> {\n return this.OnMergeRequested(event);\n }\n\n /** The user chose which record survives; differing fields default to that record's values. */\n OnSurvivorChange(side: 'left' | 'right'): void {\n if (!this.mergeState || this.mergeState.IsMerging) return;\n this.mergeState.Config = { ...this.mergeState.Config, SurvivorSide: side };\n for (const field of this.mergeState.Fields) {\n if (!field.IsReadOnly) field.SelectedSide = side;\n }\n this.cdr.detectChanges();\n }\n\n /** @deprecated Use {@link OnSurvivorChange}. */\n onSurvivorChange(side: 'left' | 'right'): void {\n return this.OnSurvivorChange(side);\n }\n\n private async prepareMerge(event: { entityInfo: EntityInfo; records: Record<string, unknown>[] }): Promise<void> {\n const entity = event.entityInfo ?? this.entity;\n if (!entity) return;\n\n // The merge panel is two-sided by construction, so n > 2 has nowhere to render.\n if (event.records.length !== 2) {\n this.setMergeNotice('Select exactly two records to merge.');\n this.cdr.detectChanges();\n return;\n }\n\n // Composite-key safe: the grid renders arbitrary entities, so never assume one key column.\n const keys = event.records.map(r => CompositeKey.FromEntityRecord(entity, r)) as [CompositeKey, CompositeKey];\n if (keys.some(k => k.KeyValuePairs.length === 0 || k.KeyValuePairs.some(kv => kv.Value == null || kv.Value === ''))) {\n this.setMergeNotice('Could not read the primary key of the selected records.');\n this.cdr.detectChanges();\n return;\n }\n // The merge panel's config is string-keyed, so keys travel through it as compact segments.\n const [left, right] = keys.map(k => k.ToCompactURLSegment());\n\n // Subtype records: the merge re-points only the keys that target this entity, then the loser's\n // delete follows the shared key into the parent row, whose own references never moved.\n if (entity.ParentID) {\n this.setMergeNotice(`${entity.DisplayName} records extend a parent type; merging subtype records is not supported yet.`);\n this.cdr.detectChanges();\n return;\n }\n const childRows = await this.hasIsAChildRows(entity, keys);\n if (childRows === null) {\n this.setMergeNotice('Could not verify whether the selected records have subtype rows, so the merge was not started.');\n this.cdr.detectChanges();\n return;\n }\n if (childRows) {\n this.setMergeNotice(\n `${entity.DisplayName} records that another app extends (shared-key subtype rows) cannot be merged yet — ` +\n 'the merge would collide on the shared key. Merge them from the extending app instead.',\n );\n this.cdr.detectChanges();\n return;\n }\n\n const result = await this.comparison.GetRecordComparison(\n {\n EntityName: entity.Name,\n Keys: keys.map(k => ({\n KeyValuePairs: k.KeyValuePairs.map(kv => ({ FieldName: kv.FieldName, Value: String(kv.Value) })),\n })),\n },\n this.ProviderToUse,\n );\n if (!result.Success || !result.Output) {\n this.setMergeNotice(result.ErrorMessage ?? 'Could not compare the selected records.');\n this.cdr.detectChanges();\n return;\n }\n\n this.mergeState = {\n Config: {\n EntityName: entity.Name,\n LeftRecordID: left,\n RightRecordID: right,\n SurvivorSide: 'left',\n LeftLabel: this.labelFor(event.records[0], entity, keys[0]),\n RightLabel: this.labelFor(event.records[1], entity, keys[1]),\n },\n Fields: result.Output.Fields.map(delta => ({\n FieldName: delta.FieldName,\n DisplayLabel: delta.DisplayName,\n LeftValue: delta.Cells[0]?.Value,\n RightValue: delta.Cells[1]?.Value,\n HasConflict: delta.Differs,\n SelectedSide: 'left' as const,\n // What the ORM will refuse to write — keys, AllowUpdateAPI = 0, timestamps. A field the\n // metadata does not know cannot be written either.\n IsReadOnly: entity.FieldByName(delta.FieldName)?.ReadOnly ?? true,\n DataType: 'string',\n })),\n IsMerging: false,\n DependencyNote: await this.describeDependencies(entity, keys),\n Entity: entity,\n Keys: keys,\n };\n this.cdr.detectChanges();\n }\n\n /** The user confirmed: merge, then reload the page so the loser disappears from the grid. */\n async OnMergeConfirmed(event: MergeConfirmedEvent): Promise<void> {\n if (!this.mergeState) return;\n this.mergeState.IsMerging = true;\n this.cdr.detectChanges();\n\n const survivorIsLeft = event.Config.SurvivorSide === 'left';\n const [leftKey, rightKey] = this.mergeState.Keys;\n const survivor = survivorIsLeft ? leftKey : rightKey;\n const loser = survivorIsLeft ? rightKey : leftKey;\n\n const request = new RecordMergeRequest();\n request.EntityName = event.Config.EntityName;\n request.SurvivingRecordCompositeKey = survivor;\n request.RecordsToMerge = [loser];\n request.FieldMap = this.buildFieldMap(event, survivorIsLeft);\n\n try {\n const result = await this.ProviderToUse.MergeRecords(request);\n this.mergeState = null;\n this.setMergeNotice(result.Success ? 'Records merged.' : `Merge failed: ${result.OverallStatus}`);\n if (result.Success) {\n this.dataRequest.emit(this.currentPageDataRequest());\n }\n } catch (err) {\n this.mergeState = null;\n this.setMergeNotice(`Merge failed: ${err instanceof Error ? err.message : String(err)}`);\n }\n this.cdr.detectChanges();\n }\n\n /** @deprecated Use {@link OnMergeConfirmed}. */\n async onMergeConfirmed(event: MergeConfirmedEvent): Promise<void> {\n return this.OnMergeConfirmed(event);\n }\n\n /** Merge cancelled → close the panel, write nothing. */\n OnMergeCancelled(): void {\n this.mergeState = null;\n this.cdr.detectChanges();\n }\n\n /** @deprecated Use {@link OnMergeCancelled}. */\n onMergeCancelled(): void {\n return this.OnMergeCancelled();\n }\n\n /**\n * Fields whose resolution has to travel, and only those: the survivor already holds the value\n * for any field resolved to its own side.\n *\n * The distinction that matters is \"the user did not change this\" versus \"the user chose the\n * blank side\". Both arrive as an absent value, so deciding from the value alone drops a real\n * resolution — the survivor silently keeps its old value on the one operation where someone is\n * reconciling two records field by field, and the loser is gone afterwards. So the skip is\n * decided from WHICH SIDE was chosen, and a chosen blank is written through as null.\n */\n private buildFieldMap(event: MergeConfirmedEvent, survivorIsLeft: boolean): { FieldName: string; Value: unknown }[] {\n const map: { FieldName: string; Value: unknown }[] = [];\n for (const field of event.ResolvedFields) {\n if (field.IsReadOnly || !field.HasConflict) continue;\n // Resolved to the survivor's own side — nothing to write, whatever the value is.\n if (field.SelectedSide !== 'custom' && (field.SelectedSide === 'left') === survivorIsLeft) continue;\n const chosen =\n field.SelectedSide === 'custom'\n ? field.CustomValue\n : (survivorIsLeft ? field.RightValue : field.LeftValue);\n // A chosen blank is a clear, not a no-op. Normalize undefined to null so the transport\n // carries an explicit value rather than an absent one.\n map.push({ FieldName: field.FieldName, Value: chosen === undefined ? null : chosen });\n }\n return map;\n }\n\n /**\n * True when any of these records has a row in an IS-A child entity, null when that could not be\n * determined (a child view the user cannot read answers `Success: false`, which must not pass\n * for \"no rows\"). `MergeRecords` has no subtype handling: the child rows share the parent's key,\n * so merging would collide. Refuse rather than half-merge.\n */\n private async hasIsAChildRows(entity: EntityInfo, keys: ReadonlyArray<CompositeKey>): Promise<boolean | null> {\n const children = entity.ChildEntities;\n if (children.length === 0) return false;\n\n // An IS-A child shares its parent's key SEMANTICALLY; nothing requires it to share the column\n // NAME. `CompositeKey.ToWhereClause()` emits the parent's names, so filtering a child view\n // with it fails wherever the names differ — and a failed probe refuses the merge, which would\n // disable merge for that entity permanently. Pair each key's values onto the child's own PK\n // columns instead, the way the platform's own child discovery does\n // (SQLServerDataProvider.BuildChildDiscoverySQL).\n const probes = children\n .map(child => ({ child, filter: this.buildChildKeyFilter(child, keys) }))\n .filter((probe): probe is { child: EntityInfo; filter: string } => probe.filter !== null);\n if (probes.length === 0) return false;\n\n const results = await RunView.FromMetadataProvider(this.ProviderToUse).RunViews(\n probes.map(({ child, filter }) => ({\n EntityName: child.Name,\n ExtraFilter: filter,\n Fields: child.PrimaryKeys.map(f => f.Name),\n ResultType: 'simple' as const,\n MaxRows: 1,\n })),\n );\n if (results.some(r => !r.Success)) return null;\n return results.some(r => r.Results.length > 0);\n }\n\n /**\n * `(childPk = v1) OR (childPk = v2)` against one child entity, built from the parent's key\n * VALUES and the child's own key COLUMN NAMES, paired positionally because an IS-A child shares\n * its parent's key by design. Null when the child's key arity differs, which means it does not\n * share the key and cannot hold a subtype row for these records.\n */\n private buildChildKeyFilter(child: EntityInfo, keys: ReadonlyArray<CompositeKey>): string | null {\n const childPkFields = child.PrimaryKeys;\n if (childPkFields.length === 0 || keys.some(k => k.KeyValuePairs.length !== childPkFields.length)) {\n return null;\n }\n const clauses = keys.map(key =>\n childPkFields\n .map((field, i) => `[${field.Name}] = '${String(key.KeyValuePairs[i].Value ?? '').replace(/'/g, \"''\")}'`)\n .join(' AND '),\n );\n return clauses.map(c => `(${c})`).join(' OR ');\n }\n\n /**\n * How many linked records will move to the survivor — the thing users most want to know.\n *\n * Indexes `counts[0]` / `counts[1]` directly: `onMergeRequested` refuses anything other than\n * exactly two records before reaching here, and the merge panel's config is two-sided by\n * construction, so this is only ever called with a pair. Widen both together.\n */\n private async describeDependencies(entity: EntityInfo, keys: ReadonlyArray<CompositeKey>): Promise<string | null> {\n try {\n const counts = await Promise.all(\n keys.map(key => this.ProviderToUse.GetRecordDependencies(entity.Name, key)),\n );\n return `Linked records that would move to the survivor: ${counts[0].length} on the left, ${counts[1].length} on the right.`;\n } catch (err) {\n LogError(`Could not load merge dependencies for ${entity.Name}: ${err instanceof Error ? err.message : String(err)}`);\n return null;\n }\n }\n\n /** A human label for a row — its name field when it has one, else its key. */\n private labelFor(row: Record<string, unknown>, entity: EntityInfo, key: CompositeKey): string {\n const nameField = entity.NameField?.Name;\n const name = nameField ? String(row[nameField] ?? '') : '';\n return name || key.ToCompactURLSegment();\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,EAAa,MAAM,EAAE,MAAM,eAAe,CAAC;AAC3I,OAAO,EAA6B,QAAQ,EAAE,YAAY,EAAE,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAEtH,OAAO,EACL,uBAAuB,GAIxB,MAAM,iCAAiC,CAAC;AACzC,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;;;;;;;;;;;IAgJrE,oDAMC;IADC,AADA,4NAAY,uCAAgC,KAAC,qMACnC,+BAAwB,KAAC;IAErC,iBAA4B;;;IAJ1B,AADA,AADA,0CAAqB,4CACe,uCACL;;;IAiD7B,6BAA4B;IAAA,YAA+B;IAAA,iBAAI;;;IAAnC,cAA+B;IAA/B,sDAA+B;;;;IAzB/D,oCAAuG;IAA7B,gMAAS,yBAAkB,KAAC;IAElG,AADF,8BAAgF,WACxE;IAAA,oBAAI;IAAA,iBAAO;IACjB,iCAIqC;I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;YAnEjB,AAbA,AADA,AADA,AADA,AADA,AADA,AADA,AADA,AADA,AADA,AADA,AADA,AADA,AADA,AADA,AADA,AADA,AADA,AADA,uCAAqB,qBACL,8CACyB,+BACf,gCACC,oCACI,2CACO,kBACrB,oBACE,oDAC4B,yCACX,uCACF,0EACU,6CACJ,yDACY,qCACpB,mCACF,4CACS,kCACV,iDAae;YAU9C,eASC;YATD,mDASC;YAIC,cAA4B;YAE5B,AAFA,8CAA4B,qCAEI;YAYlC,cA6BC;YA7BD,yCA6BC;YACD,cAOC;YAPD,0CAOC;;;iFAgEQ,yBAAyB;cAhLrC,SAAS;6BACI,KAAK,YACP,uBAAuB,iBAClB,iBAAiB,CAAC,IAAI,YAC3B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6GT;;kBAsEA,KAAK;;kBAGL,KAAK;;kBAML,KAAK;;kBAGL,KAAK;;kBASL,KAAK;;kBAGL,KAAK;;kBAGL,KAAK;;kBAOL,KAAK;;kBAKL,KAAK;;kBAGL,KAAK;;kBAGL,KAAK;;kBAGL,KAAK;;kBAGL,KAAK;;kBAOL,KAAK;;kBAKL,MAAM;;kBAGN,MAAM;;kBAGN,MAAM;;kBAGN,MAAM;;kBAQN,MAAM;;kBAMN,MAAM;;kBAGN,MAAM;;kBAMN,SAAS;mBAAC,MAAM;;kFAtGN,yBAAyB;AAo8BtC;;;;GAIG;AACH,MAAM,UAAU,oBAAoB;IAClC,0DAA0D;AAC5D,CAAC","sourcesContent":["import { Component, Input, Output, EventEmitter, ViewEncapsulation, ViewChild, ChangeDetectorRef, OnDestroy, inject } from '@angular/core';\nimport { EntityInfo, RunViewParams, LogError, CompositeKey, RunView, RecordMergeRequest } from '@memberjunction/core';\nimport { ExportColumn } from '@memberjunction/export-engine';\nimport {\n RecordComparisonService,\n type FieldComparison,\n type MergeConfig,\n type MergeConfirmedEvent,\n} from '@memberjunction/ng-record-merge';\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 [SavedViewID]=\"SavedViewID\"\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 [ShowMergeButton]=\"effectiveShowMergeButton\"\n (MergeRecordsRequested)=\"onMergeRequested($event)\"\n >\n </mj-entity-data-grid>\n\n <!-- NOTE: Export is NOT handled here — mj-entity-data-grid hosts its OWN export dialog\n (its onExportClick opens it with formats/sampling via ExportService). Adding a second\n dialog here produced two stacked export dialogs. The grid owns export self-contained. -->\n\n <!-- Self-contained Add-to-List dialog (Generic) — owned by this wrapper, never bubbles up. -->\n @if (listManagementConfig) {\n <mj-list-management-dialog\n [Provider]=\"Provider\"\n [visible]=\"showListManagementDialog\"\n [config]=\"listManagementConfig\"\n (complete)=\"onListManagementComplete($event)\"\n (cancel)=\"onListManagementCancel()\"\n >\n </mj-list-management-dialog>\n }\n\n <!-- Self-contained Delete confirmation (Generic) — owned by this wrapper, never bubbles up. -->\n <mj-ev-confirm-dialog\n [IsOpen]=\"showDeleteConfirm\"\n Title=\"Delete Records\"\n [Message]=\"deleteConfirmMessage\"\n DetailMessage=\"This action cannot be undone.\"\n ConfirmText=\"Delete\"\n ConfirmStyle=\"danger\"\n Icon=\"fa-solid fa-trash\"\n (Confirmed)=\"onDeleteConfirmed()\"\n (Cancelled)=\"onDeleteCancelled()\"\n >\n </mj-ev-confirm-dialog>\n\n <!-- Self-contained merge panel (Generic) — owned by this wrapper, never bubbles up.\n Lives inside the @if so the panel rebuilds its comparison (ngOnInit) per request. -->\n @if (mergeState) {\n <mj-dialog [Visible]=\"true\" Size=\"lg\" [Closeable]=\"!mergeState.IsMerging\" (Close)=\"onMergeCancelled()\">\n <div class=\"mj-ev-merge-survivor\" role=\"radiogroup\" aria-label=\"Record to keep\">\n <span>Keep</span>\n <button type=\"button\" mjButton size=\"sm\" role=\"radio\"\n [variant]=\"mergeState.Config.SurvivorSide === 'left' ? 'primary' : 'secondary'\"\n [attr.aria-checked]=\"mergeState.Config.SurvivorSide === 'left'\"\n [disabled]=\"mergeState.IsMerging\"\n (click)=\"onSurvivorChange('left')\">{{ mergeState.Config.LeftLabel }}</button>\n <button type=\"button\" mjButton size=\"sm\" role=\"radio\"\n [variant]=\"mergeState.Config.SurvivorSide === 'right' ? 'primary' : 'secondary'\"\n [attr.aria-checked]=\"mergeState.Config.SurvivorSide === 'right'\"\n [disabled]=\"mergeState.IsMerging\"\n (click)=\"onSurvivorChange('right')\">{{ mergeState.Config.RightLabel }}</button>\n <span class=\"mj-ev-merge-survivor-note\">{{ mergeLoserLabel }} will be deleted; its linked records move to the record you keep.</span>\n </div>\n <mj-record-merge-panel\n [Fields]=\"mergeState.Fields\"\n [Config]=\"mergeState.Config\"\n [MergeEnabled]=\"!mergeState.IsMerging\"\n [IsMerging]=\"mergeState.IsMerging\"\n (MergeConfirmed)=\"onMergeConfirmed($event)\"\n (MergeCancelled)=\"onMergeCancelled()\"\n >\n </mj-record-merge-panel>\n @if (mergeState.DependencyNote) {\n <p class=\"mj-ev-merge-deps\">{{ mergeState.DependencyNote }}</p>\n }\n </mj-dialog>\n }\n @if (mergeNotice) {\n <div class=\"mj-ev-merge-notice\" role=\"status\">\n <span class=\"mj-ev-merge-notice-text\">{{ mergeNotice }}</span>\n <button type=\"button\" class=\"mj-ev-merge-notice-dismiss\" (click)=\"onDismissMergeNotice()\" title=\"Dismiss\" aria-label=\"Dismiss\">\n <i class=\"fa-solid fa-xmark\"></i>\n </button>\n </div>\n }\n `,\n styles: [\n `\n :host {\n display: block;\n height: 100%;\n }\n\n .mj-ev-merge-survivor {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: 8px;\n margin-bottom: 12px;\n font-size: var(--mj-text-sm);\n color: var(--mj-text-secondary);\n }\n\n .mj-ev-merge-survivor-note {\n color: var(--mj-text-muted);\n }\n\n .mj-ev-merge-deps {\n margin: 0;\n font-size: var(--mj-text-xs);\n color: var(--mj-text-muted);\n }\n\n .mj-ev-merge-notice {\n position: fixed;\n bottom: 16px;\n left: 50%;\n transform: translateX(-50%);\n z-index: 1001;\n padding: 8px 14px;\n border: 1px solid var(--mj-border-subtle);\n border-radius: var(--mj-radius-md);\n background: var(--mj-bg-surface-elevated);\n color: var(--mj-text-primary);\n font-size: var(--mj-text-sm);\n box-shadow: var(--mj-shadow-md);\n display: flex;\n align-items: center;\n gap: 10px;\n }\n\n .mj-ev-merge-notice-dismiss {\n flex-shrink: 0;\n background: none;\n border: none;\n padding: 0 2px;\n cursor: pointer;\n color: var(--mj-text-muted);\n font-size: var(--mj-text-sm);\n line-height: 1;\n }\n\n .mj-ev-merge-notice-dismiss:hover {\n color: var(--mj-text-primary);\n }\n `,\n ],\n})\nexport class GridViewRendererComponent extends BaseAngularComponent implements IViewRenderer<GridViewConfig>, OnDestroy {\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 /** @deprecated Use {@link ExportDataProvider}. */\n @Input() set exportDataProvider(value: (() => Promise<Record<string, unknown>[]>) | null) {\n this.ExportDataProvider = value;\n }\n /** @deprecated Use {@link ExportDataProvider}. */\n get exportDataProvider(): (() => Promise<Record<string, unknown>[]>) | null {\n return this.ExportDataProvider;\n }\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 /** Active alternate base view semantic name pushed by the host, forwarded into `EffectiveParams`. */\n @Input() alternateBaseView: string | null = null;\n\n /**\n * ID of the persisted `MJ: User Views` record backing the current record set, or `null` for a\n * dynamic / unsaved view. Forwarded to `[SavedViewID]` on `<mj-entity-data-grid>` so Open in Excel\n * works when hosted inside `<mj-entity-viewer>` without handing `_viewEntity` persistence to the grid.\n */\n @Input() SavedViewID: string | null = null;\n\n // ---- IViewRenderer outputs (generic + navigation channels only) ----\n\n /** Emitted when a row is single-clicked — payload is the raw record object (host builds the key). */\n @Output() recordSelected = new EventEmitter<unknown>();\n\n /** Emitted when a row is double-clicked — payload is the raw record object (host builds the key). */\n @Output() recordOpened = new EventEmitter<unknown>();\n\n /** Emitted when this renderer mutates its opaque {@link config} (sort / grid-state persistence). */\n @Output() configChanged = new EventEmitter<GridViewConfig>();\n\n /** Generic data-access channel: ask the host to re-load with different sort / page. */\n @Output() dataRequest = new EventEmitter<ViewDataRequest>();\n\n /**\n * Ask the host to open this view's configuration UI. Raised when the grid emits\n * `ManageColumnsRequested` (its \"Manage Columns\" toolbar affordance). Part of the generic\n * {@link IViewRenderer} contract; the container forwards it to the workspace, which opens the\n * config panel (Columns tab) — the canonical column editor.\n */\n @Output() configureRequested = new EventEmitter<void>();\n\n /**\n * NAVIGATION: open a related record on a (possibly different) entity from a foreign-key cell click.\n * Routing lives in the outer app, so this is one of the few signals that legitimately bubbles up.\n */\n @Output() openRelatedRecordRequested = new EventEmitter<ViewRelatedRecordNavigation>();\n\n /** NAVIGATION: create a new record of the current entity (grid \"New\" button). Bubbles up for routing. */\n @Output() createRecordRequested = new EventEmitter<void>();\n\n /**\n * Reference to the hosted grid. Currently only retained for parity / future selection resolution;\n * selection is mapped from the {@link records} input rather than read from the grid, per contract.\n */\n @ViewChild('grid') protected grid?: EntityDataGridComponent;\n\n /**\n * IMPERATIVE export entry point ({@link IViewRenderer.exportRecords}). Lets the host trigger\n * an export programmatically (ultimately for the AI agent) by delegating to the hosted grid's\n * self-contained {@link EntityDataGridComponent.Export} (which downloads the file). The grid's\n * toolbar export button remains the interactive path; this is the no-UI equivalent.\n *\n * @param format optional output format; the grid defaults to 'excel' when omitted.\n * @returns true when the export succeeded, false when the grid isn't ready or the export failed.\n */\n async exportRecords(format?: 'csv' | 'excel' | 'json'): Promise<boolean> {\n if (!this.grid) {\n return false;\n }\n const result = await this.grid.Export(format ? { format } : undefined, true);\n return !!result?.success;\n }\n\n /** The hosted grid's on-screen columns ({@link IViewRenderer.GetExportColumns}); empty before it mounts. */\n GetExportColumns(): ExportColumn[] {\n return this.grid?.GetExportColumns() ?? [];\n }\n\n // ================================================================\n // Self-contained dialog state (never surfaced to the host)\n // ================================================================\n // NOTE: Export has no state here — mj-entity-data-grid owns its export dialog.\n\n /** Whether the add-to-list dialog is visible. Toggled internally by {@link onAddToListRequested}. */\n protected showListManagementDialog = false;\n\n /** Config fed into `<mj-list-management-dialog>`. Built from the entity + selected records. */\n protected listManagementConfig: ListManagementDialogConfig | null = null;\n\n /** Whether the delete-confirmation dialog is visible. Toggled internally by {@link onDeleteButtonClick}. */\n protected showDeleteConfirm = false;\n\n /** Records staged for deletion while the confirm dialog is open. */\n private pendingDeleteRecords: Record<string, unknown>[] = [];\n\n /** Dynamic message for the delete-confirmation dialog (reflects the staged record count). */\n protected deleteConfirmMessage = 'Are you sure you want to delete the selected records?';\n\n // ================================================================\n // Effective binding accessors — seed grid inputs from config + defaults\n // ================================================================\n\n /** Effective toolbar visibility — defaults to `true` when not set in config. */\n get EffectiveShowToolbar(): boolean {\n return this.config.showToolbar ?? true;\n }\n\n /** @deprecated Use {@link EffectiveShowToolbar}. */\n get effectiveShowToolbar(): boolean {\n return this.EffectiveShowToolbar;\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 /** @deprecated Use {@link EffectiveShowSearch}. */\n get effectiveShowSearch(): boolean {\n return this.EffectiveShowSearch;\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 /** @deprecated Use {@link EffectiveSelectionMode}. */\n get effectiveSelectionMode(): GridSelectionMode {\n return this.EffectiveSelectionMode;\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 /** @deprecated Use {@link EffectiveShowAddToListButton}. */\n get effectiveShowAddToListButton(): boolean {\n return this.EffectiveShowAddToListButton;\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 /** @deprecated Use {@link EffectiveShowPager}. */\n get effectiveShowPager(): boolean {\n return this.EffectiveShowPager;\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 /** @deprecated Use {@link EffectivePageSize}. */\n get effectivePageSize(): number {\n return this.EffectivePageSize;\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.alternateBaseView && !this.config.params.AlternateBaseView\n ? { ...this.config.params, AlternateBaseView: this.alternateBaseView }\n : this.config.params;\n }\n if (this.entity) {\n return {\n EntityName: this.entity.Name,\n ...(this.alternateBaseView ? { AlternateBaseView: this.alternateBaseView } : {}),\n };\n }\n return null;\n }\n\n /** @deprecated Use {@link EffectiveParams}. */\n get effectiveParams(): RunViewParams | null {\n return this.EffectiveParams;\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 /** @deprecated Use {@link OnAfterRowClick}. */\n onAfterRowClick(event: AfterRowClickEventArgs): void {\n return this.OnAfterRowClick(event);\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 /** @deprecated Use {@link OnAfterRowDoubleClick}. */\n onAfterRowDoubleClick(event: AfterRowDoubleClickEventArgs): void {\n return this.OnAfterRowDoubleClick(event);\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 /** @deprecated Use {@link OnAfterSort}. */\n onAfterSort(event: AfterSortEventArgs): void {\n return this.OnAfterSort(event);\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 /** @deprecated Use {@link OnGridStateChanged}. */\n onGridStateChanged(event: GridStateChangedEvent): void {\n return this.OnGridStateChanged(event);\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 /** @deprecated Use {@link OnSelectionChange}. */\n onSelectionChange(_selectedKeys: string[]): void {\n return this.OnSelectionChange(_selectedKeys);\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 /** @deprecated Use {@link OnForeignKeyClick}. */\n onForeignKeyClick(event: ForeignKeyClickEvent): void {\n return this.OnForeignKeyClick(event);\n }\n\n /** New button → {@link createRecordRequested} (NAVIGATION) — opening the create form is routing. */\n OnNewButtonClick(): void {\n this.createRecordRequested.emit();\n }\n\n /** @deprecated Use {@link OnNewButtonClick}. */\n onNewButtonClick(): void {\n return this.OnNewButtonClick();\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 /** @deprecated Use {@link OnPageChange}. */\n onPageChange(event: PageChangeEvent): void {\n return this.OnPageChange(event);\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 /** @deprecated Use {@link OnRefreshButtonClick}. */\n onRefreshButtonClick(): void {\n return this.OnRefreshButtonClick();\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 /** @deprecated Use {@link OnAddToListRequested}. */\n onAddToListRequested(event: { entityInfo: EntityInfo; records: Record<string, unknown>[]; recordIds: string[] }): void {\n return this.OnAddToListRequested(event);\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 /** @deprecated Use {@link OnListManagementComplete}. */\n onListManagementComplete(_result: ListManagementResult): void {\n return this.OnListManagementComplete(_result);\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 /** @deprecated Use {@link OnListManagementCancel}. */\n onListManagementCancel(): void {\n return this.OnListManagementCancel();\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 /** @deprecated Use {@link OnDeleteButtonClick}. */\n onDeleteButtonClick(records: Record<string, unknown>[]): void {\n return this.OnDeleteButtonClick(records);\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 /** @deprecated Use {@link OnDeleteConfirmed}. */\n async onDeleteConfirmed(): Promise<void> {\n return this.OnDeleteConfirmed();\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 /** @deprecated Use {@link OnDeleteCancelled}. */\n onDeleteCancelled(): void {\n return this.OnDeleteCancelled();\n }\n\n // ================================================================\n // Record merge\n // ================================================================\n\n /**\n * The in-flight merge, or null when the panel is closed. Holds everything the panel needs\n * plus the dependency preview, so the panel itself stays a pure presentation component.\n */\n protected mergeState: {\n Config: MergeConfig;\n Fields: FieldComparison[];\n IsMerging: boolean;\n DependencyNote: string | null;\n /** The entity and the two records' real keys — the Config only carries their serialized form. */\n Entity: EntityInfo;\n Keys: [CompositeKey, CompositeKey];\n } | null = null;\n\n /** A one-line status shown under the grid — why a merge was refused, or how one ended. */\n protected mergeNotice: string | null = null;\n\n /** Auto-dismiss timer for {@link mergeNotice}; cleared whenever the notice is replaced. */\n private mergeNoticeTimer: ReturnType<typeof setTimeout> | null = null;\n\n /**\n * How long a merge notice stays up before dismissing itself. The banner is fixed-position over\n * the whole application, so leaving it until the next merge pins it across navigation and every\n * other record the user visits afterwards.\n */\n private static readonly MERGE_NOTICE_TIMEOUT_MS = 8000;\n\n private readonly comparison = inject(RecordComparisonService);\n\n ngOnDestroy(): void {\n // The notice's auto-dismiss outlives the view otherwise, and fires detectChanges on a\n // destroyed component.\n if (this.mergeNoticeTimer) {\n clearTimeout(this.mergeNoticeTimer);\n this.mergeNoticeTimer = null;\n }\n }\n\n /** Dismiss the merge notice from its own close button. */\n OnDismissMergeNotice(): void {\n this.setMergeNotice(null);\n this.cdr.detectChanges();\n }\n\n /** @deprecated Use {@link OnDismissMergeNotice}. */\n onDismissMergeNotice(): void {\n return this.OnDismissMergeNotice();\n }\n\n /**\n * Set (or clear) the merge notice, replacing any pending auto-dismiss. Every write to\n * `mergeNotice` goes through here so a notice cannot outlive its timer or strand an old one.\n */\n private setMergeNotice(message: string | null): void {\n if (this.mergeNoticeTimer) {\n clearTimeout(this.mergeNoticeTimer);\n this.mergeNoticeTimer = null;\n }\n this.mergeNotice = message;\n if (message) {\n this.mergeNoticeTimer = setTimeout(() => {\n this.mergeNoticeTimer = null;\n this.mergeNotice = null;\n this.cdr.detectChanges();\n }, GridViewRendererComponent.MERGE_NOTICE_TIMEOUT_MS);\n }\n }\n\n /**\n * Show the Merge button only where merging can actually succeed: the entity opts in and the\n * user can both update the survivor and delete the loser.\n */\n protected get effectiveShowMergeButton(): boolean {\n const entity = this.entity;\n const user = this.ProviderToUse?.CurrentUser;\n if (!entity?.AllowRecordMerge || !user) return false;\n const permissions = entity.GetUserPermisions(user);\n return !!permissions && permissions.CanUpdate && permissions.CanDelete;\n }\n\n /** The record that will be deleted, named so the user sees the choice before confirming. */\n protected get mergeLoserLabel(): string {\n const config = this.mergeState?.Config;\n if (!config) return '';\n return config.SurvivorSide === 'left' ? config.RightLabel : config.LeftLabel;\n }\n\n /**\n * The grid asked to merge the selected rows. Compare them, preview what will move, and open\n * the panel — nothing is written until the user confirms.\n */\n async OnMergeRequested(event: { entityInfo: EntityInfo; records: Record<string, unknown>[] }): Promise<void> {\n this.setMergeNotice(null);\n try {\n await this.prepareMerge(event);\n } catch (err) {\n // A transport failure in any pre-flight query must not leave the user with nothing.\n this.setMergeNotice(`Could not prepare the merge: ${err instanceof Error ? err.message : String(err)}`);\n this.cdr.detectChanges();\n }\n }\n\n /** @deprecated Use {@link OnMergeRequested}. */\n async onMergeRequested(event: { entityInfo: EntityInfo; records: Record<string, unknown>[] }): Promise<void> {\n return this.OnMergeRequested(event);\n }\n\n /** The user chose which record survives; differing fields default to that record's values. */\n OnSurvivorChange(side: 'left' | 'right'): void {\n if (!this.mergeState || this.mergeState.IsMerging) return;\n this.mergeState.Config = { ...this.mergeState.Config, SurvivorSide: side };\n for (const field of this.mergeState.Fields) {\n if (!field.IsReadOnly) field.SelectedSide = side;\n }\n this.cdr.detectChanges();\n }\n\n /** @deprecated Use {@link OnSurvivorChange}. */\n onSurvivorChange(side: 'left' | 'right'): void {\n return this.OnSurvivorChange(side);\n }\n\n private async prepareMerge(event: { entityInfo: EntityInfo; records: Record<string, unknown>[] }): Promise<void> {\n const entity = event.entityInfo ?? this.entity;\n if (!entity) return;\n\n // The merge panel is two-sided by construction, so n > 2 has nowhere to render.\n if (event.records.length !== 2) {\n this.setMergeNotice('Select exactly two records to merge.');\n this.cdr.detectChanges();\n return;\n }\n\n // Composite-key safe: the grid renders arbitrary entities, so never assume one key column.\n const keys = event.records.map(r => CompositeKey.FromEntityRecord(entity, r)) as [CompositeKey, CompositeKey];\n if (keys.some(k => k.KeyValuePairs.length === 0 || k.KeyValuePairs.some(kv => kv.Value == null || kv.Value === ''))) {\n this.setMergeNotice('Could not read the primary key of the selected records.');\n this.cdr.detectChanges();\n return;\n }\n // The merge panel's config is string-keyed, so keys travel through it as compact segments.\n const [left, right] = keys.map(k => k.ToCompactURLSegment());\n\n // Subtype records: the merge re-points only the keys that target this entity, then the loser's\n // delete follows the shared key into the parent row, whose own references never moved.\n if (entity.ParentID) {\n this.setMergeNotice(`${entity.DisplayName} records extend a parent type; merging subtype records is not supported yet.`);\n this.cdr.detectChanges();\n return;\n }\n const childRows = await this.hasIsAChildRows(entity, keys);\n if (childRows === null) {\n this.setMergeNotice('Could not verify whether the selected records have subtype rows, so the merge was not started.');\n this.cdr.detectChanges();\n return;\n }\n if (childRows) {\n this.setMergeNotice(\n `${entity.DisplayName} records that another app extends (shared-key subtype rows) cannot be merged yet — ` +\n 'the merge would collide on the shared key. Merge them from the extending app instead.',\n );\n this.cdr.detectChanges();\n return;\n }\n\n const result = await this.comparison.GetRecordComparison(\n {\n EntityName: entity.Name,\n Keys: keys.map(k => ({\n KeyValuePairs: k.KeyValuePairs.map(kv => ({ FieldName: kv.FieldName, Value: String(kv.Value) })),\n })),\n },\n this.ProviderToUse,\n );\n if (!result.Success || !result.Output) {\n this.setMergeNotice(result.ErrorMessage ?? 'Could not compare the selected records.');\n this.cdr.detectChanges();\n return;\n }\n\n this.mergeState = {\n Config: {\n EntityName: entity.Name,\n LeftRecordID: left,\n RightRecordID: right,\n SurvivorSide: 'left',\n LeftLabel: this.labelFor(event.records[0], entity, keys[0]),\n RightLabel: this.labelFor(event.records[1], entity, keys[1]),\n },\n Fields: result.Output.Fields.map(delta => ({\n FieldName: delta.FieldName,\n DisplayLabel: delta.DisplayName,\n LeftValue: delta.Cells[0]?.Value,\n RightValue: delta.Cells[1]?.Value,\n HasConflict: delta.Differs,\n SelectedSide: 'left' as const,\n // What the ORM will refuse to write — keys, AllowUpdateAPI = 0, timestamps. A field the\n // metadata does not know cannot be written either.\n IsReadOnly: entity.FieldByName(delta.FieldName)?.ReadOnly ?? true,\n DataType: 'string',\n })),\n IsMerging: false,\n DependencyNote: await this.describeDependencies(entity, keys),\n Entity: entity,\n Keys: keys,\n };\n this.cdr.detectChanges();\n }\n\n /** The user confirmed: merge, then reload the page so the loser disappears from the grid. */\n async OnMergeConfirmed(event: MergeConfirmedEvent): Promise<void> {\n if (!this.mergeState) return;\n this.mergeState.IsMerging = true;\n this.cdr.detectChanges();\n\n const survivorIsLeft = event.Config.SurvivorSide === 'left';\n const [leftKey, rightKey] = this.mergeState.Keys;\n const survivor = survivorIsLeft ? leftKey : rightKey;\n const loser = survivorIsLeft ? rightKey : leftKey;\n\n const request = new RecordMergeRequest();\n request.EntityName = event.Config.EntityName;\n request.SurvivingRecordCompositeKey = survivor;\n request.RecordsToMerge = [loser];\n request.FieldMap = this.buildFieldMap(event, survivorIsLeft);\n\n try {\n const result = await this.ProviderToUse.MergeRecords(request);\n this.mergeState = null;\n this.setMergeNotice(result.Success ? 'Records merged.' : `Merge failed: ${result.OverallStatus}`);\n if (result.Success) {\n this.dataRequest.emit(this.currentPageDataRequest());\n }\n } catch (err) {\n this.mergeState = null;\n this.setMergeNotice(`Merge failed: ${err instanceof Error ? err.message : String(err)}`);\n }\n this.cdr.detectChanges();\n }\n\n /** @deprecated Use {@link OnMergeConfirmed}. */\n async onMergeConfirmed(event: MergeConfirmedEvent): Promise<void> {\n return this.OnMergeConfirmed(event);\n }\n\n /** Merge cancelled → close the panel, write nothing. */\n OnMergeCancelled(): void {\n this.mergeState = null;\n this.cdr.detectChanges();\n }\n\n /** @deprecated Use {@link OnMergeCancelled}. */\n onMergeCancelled(): void {\n return this.OnMergeCancelled();\n }\n\n /**\n * Fields whose resolution has to travel, and only those: the survivor already holds the value\n * for any field resolved to its own side.\n *\n * The distinction that matters is \"the user did not change this\" versus \"the user chose the\n * blank side\". Both arrive as an absent value, so deciding from the value alone drops a real\n * resolution — the survivor silently keeps its old value on the one operation where someone is\n * reconciling two records field by field, and the loser is gone afterwards. So the skip is\n * decided from WHICH SIDE was chosen, and a chosen blank is written through as null.\n */\n private buildFieldMap(event: MergeConfirmedEvent, survivorIsLeft: boolean): { FieldName: string; Value: unknown }[] {\n const map: { FieldName: string; Value: unknown }[] = [];\n for (const field of event.ResolvedFields) {\n if (field.IsReadOnly || !field.HasConflict) continue;\n // Resolved to the survivor's own side — nothing to write, whatever the value is.\n if (field.SelectedSide !== 'custom' && (field.SelectedSide === 'left') === survivorIsLeft) continue;\n const chosen =\n field.SelectedSide === 'custom'\n ? field.CustomValue\n : (survivorIsLeft ? field.RightValue : field.LeftValue);\n // A chosen blank is a clear, not a no-op. Normalize undefined to null so the transport\n // carries an explicit value rather than an absent one.\n map.push({ FieldName: field.FieldName, Value: chosen === undefined ? null : chosen });\n }\n return map;\n }\n\n /**\n * True when any of these records has a row in an IS-A child entity, null when that could not be\n * determined (a child view the user cannot read answers `Success: false`, which must not pass\n * for \"no rows\"). `MergeRecords` has no subtype handling: the child rows share the parent's key,\n * so merging would collide. Refuse rather than half-merge.\n */\n private async hasIsAChildRows(entity: EntityInfo, keys: ReadonlyArray<CompositeKey>): Promise<boolean | null> {\n const children = entity.ChildEntities;\n if (children.length === 0) return false;\n\n // An IS-A child shares its parent's key SEMANTICALLY; nothing requires it to share the column\n // NAME. `CompositeKey.ToWhereClause()` emits the parent's names, so filtering a child view\n // with it fails wherever the names differ — and a failed probe refuses the merge, which would\n // disable merge for that entity permanently. Pair each key's values onto the child's own PK\n // columns instead, the way the platform's own child discovery does\n // (SQLServerDataProvider.BuildChildDiscoverySQL).\n const probes = children\n .map(child => ({ child, filter: this.buildChildKeyFilter(child, keys) }))\n .filter((probe): probe is { child: EntityInfo; filter: string } => probe.filter !== null);\n if (probes.length === 0) return false;\n\n const results = await RunView.FromMetadataProvider(this.ProviderToUse).RunViews(\n probes.map(({ child, filter }) => ({\n EntityName: child.Name,\n ExtraFilter: filter,\n Fields: child.PrimaryKeys.map(f => f.Name),\n ResultType: 'simple' as const,\n MaxRows: 1,\n SkipTotalRowCount: true,\n })),\n );\n if (results.some(r => !r.Success)) return null;\n return results.some(r => r.Results.length > 0);\n }\n\n /**\n * `(childPk = v1) OR (childPk = v2)` against one child entity, built from the parent's key\n * VALUES and the child's own key COLUMN NAMES, paired positionally because an IS-A child shares\n * its parent's key by design. Null when the child's key arity differs, which means it does not\n * share the key and cannot hold a subtype row for these records.\n */\n private buildChildKeyFilter(child: EntityInfo, keys: ReadonlyArray<CompositeKey>): string | null {\n const childPkFields = child.PrimaryKeys;\n if (childPkFields.length === 0 || keys.some(k => k.KeyValuePairs.length !== childPkFields.length)) {\n return null;\n }\n const clauses = keys.map(key =>\n childPkFields\n .map((field, i) => `[${field.Name}] = '${String(key.KeyValuePairs[i].Value ?? '').replace(/'/g, \"''\")}'`)\n .join(' AND '),\n );\n return clauses.map(c => `(${c})`).join(' OR ');\n }\n\n /**\n * How many linked records will move to the survivor — the thing users most want to know.\n *\n * Indexes `counts[0]` / `counts[1]` directly: `onMergeRequested` refuses anything other than\n * exactly two records before reaching here, and the merge panel's config is two-sided by\n * construction, so this is only ever called with a pair. Widen both together.\n */\n private async describeDependencies(entity: EntityInfo, keys: ReadonlyArray<CompositeKey>): Promise<string | null> {\n try {\n const counts = await Promise.all(\n keys.map(key => this.ProviderToUse.GetRecordDependencies(entity.Name, key)),\n );\n return `Linked records that would move to the survivor: ${counts[0].length} on the left, ${counts[1].length} on the right.`;\n } catch (err) {\n LogError(`Could not load merge dependencies for ${entity.Name}: ${err instanceof Error ? err.message : String(err)}`);\n return null;\n }\n }\n\n /** A human label for a row — its name field when it has one, else its key. */\n private labelFor(row: Record<string, unknown>, entity: EntityInfo, key: CompositeKey): string {\n const nameField = entity.NameField?.Name;\n const name = nameField ? String(row[nameField] ?? '') : '';\n return name || key.ToCompactURLSegment();\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 +1 @@
1
- {"version":3,"file":"map-view-renderer.component.d.ts","sourceRoot":"","sources":["../../../../src/lib/view-types/renderers/map-view-renderer.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,YAAY,EAAqB,MAAM,EAAE,MAAM,eAAe,CAAC;AAClG,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EAEL,aAAa,EACb,eAAe,EACf,mBAAmB,EACpB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;;AAExE;;;;;;;;GAQG;AACH,MAAM,WAAW,aAAa;IAC5B,uHAAuH;IACvH,UAAU,CAAC,EAAE,aAAa,CAAC;IAC3B,6FAA6F;IAC7F,YAAY,CAAC,EAAE,eAAe,CAAC;CAChC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,qBAqCa,wBAAyB,SAAQ,oBAAqB,YAAW,aAAa,CAAC,aAAa,CAAC,EAAE,MAAM;IAGhH,+GAA+G;IACtG,MAAM,EAAE,UAAU,GAAG,IAAI,CAAQ;IAE1C,0EAA0E;IACjE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAM;IAEjD,iG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IACH,kBAAkB,CAAC,IAAI,EAAE,aAAa,GAAG,IAAI;IAM7C,kDAAkD;IAClD,kBAAkB,CAAC,IAAI,EAAE,aAAa,GAAG,IAAI;IAI7C;;;;OAIG;IACH,oBAAoB,CAAC,KAAK,EAAE,eAAe,GAAG,IAAI;IAMlD,oDAAoD;IACpD,oBAAoB,CAAC,KAAK,EAAE,eAAe,GAAG,IAAI;yCAnJvC,wBAAwB;2CAAxB,wBAAwB;CAsJpC;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,IAAI,IAAI,CAE1C"}
1
+ {"version":3,"file":"map-view-renderer.component.d.ts","sourceRoot":"","sources":["../../../../src/lib/view-types/renderers/map-view-renderer.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,YAAY,EAAqB,MAAM,EAAE,MAAM,eAAe,CAAC;AAClG,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EAEL,aAAa,EACb,eAAe,EACf,mBAAmB,EACpB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;;AAExE;;;;;;;;GAQG;AACH,MAAM,WAAW,aAAa;IAC5B,uHAAuH;IACvH,UAAU,CAAC,EAAE,aAAa,CAAC;IAC3B,6FAA6F;IAC7F,YAAY,CAAC,EAAE,eAAe,CAAC;CAChC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,qBA2Ca,wBAAyB,SAAQ,oBAAqB,YAAW,aAAa,CAAC,aAAa,CAAC,EAAE,MAAM;IAGhH,+GAA+G;IACtG,MAAM,EAAE,UAAU,GAAG,IAAI,CAAQ;IAE1C,0EAA0E;IACjE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAM;IAEjD,iGAAiG;IACxF,gBAAgB,EAAE,MAAM,GAAG,I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AG,IAAI;IAM7C,kDAAkD;IAClD,kBAAkB,CAAC,IAAI,EAAE,aAAa,GAAG,IAAI;IAI7C;;;;OAIG;IACH,oBAAoB,CAAC,KAAK,EAAE,eAAe,GAAG,IAAI;IAMlD,oDAAoD;IACpD,oBAAoB,CAAC,KAAK,EAAE,eAAe,GAAG,IAAI;yCAnJvC,wBAAwB;2CAAxB,wBAAwB;CAsJpC;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,IAAI,IAAI,CAE1C"}
@@ -178,7 +178,7 @@ export class MapViewRendererComponent extends BaseAngularComponent {
178
178
  i0.ɵɵconditionalCreate(0, MapViewRendererComponent_Conditional_0_Template, 1, 5, "mj-map-view", 0)(1, MapViewRendererComponent_Conditional_1_Template, 1, 0, "mj-empty-state", 1);
179
179
  } if (rf & 2) {
180
180
  i0.ɵɵconditional(ctx.entity ? 0 : 1);
181
- } }, dependencies: [i1.MapViewComponent, i2.MJEmptyStateComponent], styles: ["\n :host {\n display: block;\n height: 100%;\n }\n /* Fill the map area (the host centers its content but does not grow). */\n .map-view-renderer-empty-fill {\n height: 100%;\n }\n "], encapsulation: 2 });
181
+ } }, dependencies: [i1.MapViewComponent, i2.MJEmptyStateComponent], styles: ["\n /* Isolate Leaflet's internal z-index: 400..1000 panes inside the map renderer\n so they stay below Data Explorer's .content-header (z-index: 2) and dropdown menus (#2701)\n without trapping fixed-position overlays in sibling view renderers like Grid. */\n mj-map-view-renderer {\n display: block;\n height: 100%;\n isolation: isolate;\n position: relative;\n z-index: 1;\n }\n /* Fill the map area (the host centers its content but does not grow). */\n .map-view-renderer-empty-fill {\n height: 100%;\n }\n "], encapsulation: 2 });
182
182
  }
183
183
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MapViewRendererComponent, [{
184
184
  type: Component,
@@ -201,7 +201,7 @@ export class MapViewRendererComponent extends BaseAngularComponent {
201
201
  Icon="fa-solid fa-map-location-dot"
202
202
  Title="No entity selected to map." />
203
203
  }
204
- `, styles: ["\n :host {\n display: block;\n height: 100%;\n }\n /* Fill the map area (the host centers its content but does not grow). */\n .map-view-renderer-empty-fill {\n height: 100%;\n }\n "] }]
204
+ `, styles: ["\n /* Isolate Leaflet's internal z-index: 400..1000 panes inside the map renderer\n so they stay below Data Explorer's .content-header (z-index: 2) and dropdown menus (#2701)\n without trapping fixed-position overlays in sibling view renderers like Grid. */\n mj-map-view-renderer {\n display: block;\n height: 100%;\n isolation: isolate;\n position: relative;\n z-index: 1;\n }\n /* Fill the map area (the host centers its content but does not grow). */\n .map-view-renderer-empty-fill {\n height: 100%;\n }\n "] }]
205
205
  }], null, { entity: [{
206
206
  type: Input
207
207
  }], records: [{
@@ -229,7 +229,7 @@ export class MapViewRendererComponent extends BaseAngularComponent {
229
229
  }], dataRequest: [{
230
230
  type: Output
231
231
  }] }); })();
232
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(MapViewRendererComponent, { className: "MapViewRendererComponent", filePath: "src/lib/view-types/renderers/map-view-renderer.component.ts", lineNumber: 101 }); })();
232
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(MapViewRendererComponent, { className: "MapViewRendererComponent", filePath: "src/lib/view-types/renderers/map-view-renderer.component.ts", lineNumber: 107 }); })();
233
233
  /**
234
234
  * Tree-shaking guard. Force-references this renderer so bundlers (ESBuild/Vite) don't drop the
235
235
  * component in builds that only mount it dynamically via the ClassFactory/descriptor. Mirrors the