@memberjunction/ng-entity-viewer 5.30.1 → 5.32.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. package/dist/lib/entity-cards/entity-cards.component.d.ts +2 -1
  2. package/dist/lib/entity-cards/entity-cards.component.d.ts.map +1 -1
  3. package/dist/lib/entity-cards/entity-cards.component.js +6 -4
  4. package/dist/lib/entity-cards/entity-cards.component.js.map +1 -1
  5. package/dist/lib/entity-data-grid/entity-data-grid.component.d.ts +2 -1
  6. package/dist/lib/entity-data-grid/entity-data-grid.component.d.ts.map +1 -1
  7. package/dist/lib/entity-data-grid/entity-data-grid.component.js +11 -9
  8. package/dist/lib/entity-data-grid/entity-data-grid.component.js.map +1 -1
  9. package/dist/lib/entity-record-detail-panel/entity-record-detail-panel.component.d.ts +2 -1
  10. package/dist/lib/entity-record-detail-panel/entity-record-detail-panel.component.d.ts.map +1 -1
  11. package/dist/lib/entity-record-detail-panel/entity-record-detail-panel.component.js +11 -9
  12. package/dist/lib/entity-record-detail-panel/entity-record-detail-panel.component.js.map +1 -1
  13. package/dist/lib/entity-viewer/entity-viewer.component.d.ts +2 -1
  14. package/dist/lib/entity-viewer/entity-viewer.component.d.ts.map +1 -1
  15. package/dist/lib/entity-viewer/entity-viewer.component.js +9 -7
  16. package/dist/lib/entity-viewer/entity-viewer.component.js.map +1 -1
  17. package/dist/lib/recycle-bin/recycle-bin-chip.component.d.ts +3 -2
  18. package/dist/lib/recycle-bin/recycle-bin-chip.component.d.ts.map +1 -1
  19. package/dist/lib/recycle-bin/recycle-bin-chip.component.js +9 -7
  20. package/dist/lib/recycle-bin/recycle-bin-chip.component.js.map +1 -1
  21. package/dist/lib/recycle-bin/recycle-bin.component.d.ts +3 -2
  22. package/dist/lib/recycle-bin/recycle-bin.component.d.ts.map +1 -1
  23. package/dist/lib/recycle-bin/recycle-bin.component.js +10 -8
  24. package/dist/lib/recycle-bin/recycle-bin.component.js.map +1 -1
  25. package/dist/lib/view-config-panel/view-config-panel.component.d.ts +2 -1
  26. package/dist/lib/view-config-panel/view-config-panel.component.d.ts.map +1 -1
  27. package/dist/lib/view-config-panel/view-config-panel.component.js +6 -5
  28. package/dist/lib/view-config-panel/view-config-panel.component.js.map +1 -1
  29. package/package.json +16 -15
@@ -1,5 +1,6 @@
1
1
  import { Component, ChangeDetectionStrategy, EventEmitter, Input, Output, ViewEncapsulation, } from '@angular/core';
2
- import { Metadata, RunView } from '@memberjunction/core';
2
+ import { RunView } from '@memberjunction/core';
3
+ import { BaseAngularComponent } from '@memberjunction/ng-base-types';
3
4
  import * as i0 from "@angular/core";
4
5
  import * as i1 from "./recycle-bin.component";
5
6
  function RecycleBinChipComponent_Conditional_0_Template(rf, ctx) { if (rf & 1) {
@@ -49,7 +50,7 @@ function RecycleBinChipComponent_Conditional_0_Template(rf, ctx) { if (rf & 1) {
49
50
  * Consumers who want to intercept any bin action can pass through the
50
51
  * standard cancelable Before/After events.
51
52
  */
52
- export class RecycleBinChipComponent {
53
+ export class RecycleBinChipComponent extends BaseAngularComponent {
53
54
  cdr;
54
55
  /**
55
56
  * Entity name whose deleted records will be surfaced. When null/empty,
@@ -68,7 +69,7 @@ export class RecycleBinChipComponent {
68
69
  }
69
70
  /**
70
71
  * Optional context user for permission checks. Falls back to
71
- * `Metadata.Provider.CurrentUser` when omitted.
72
+ * `this.ProviderToUse.CurrentUser` when omitted.
72
73
  */
73
74
  ContextUser = null;
74
75
  // ─── Re-emitted events from the inner panel ────────────────────
@@ -86,6 +87,7 @@ export class RecycleBinChipComponent {
86
87
  TracksChanges = false;
87
88
  isInitialized = false;
88
89
  constructor(cdr) {
90
+ super();
89
91
  this.cdr = cdr;
90
92
  }
91
93
  ngOnInit() {
@@ -128,7 +130,7 @@ export class RecycleBinChipComponent {
128
130
  this.cdr.markForCheck();
129
131
  return;
130
132
  }
131
- const md = new Metadata();
133
+ const md = this.ProviderToUse;
132
134
  const entityInfo = md.Entities.find(e => e.Name.trim().toLowerCase() === this._entityName.trim().toLowerCase());
133
135
  if (!entityInfo) {
134
136
  this.cdr.markForCheck();
@@ -152,7 +154,7 @@ export class RecycleBinChipComponent {
152
154
  }
153
155
  // Cheap count query — just IDs, capped low
154
156
  try {
155
- const rv = new RunView();
157
+ const rv = RunView.FromMetadataProvider(this.ProviderToUse);
156
158
  const result = await rv.RunView({
157
159
  EntityName: 'MJ: Record Changes',
158
160
  Fields: ['ID', 'RecordID'],
@@ -174,7 +176,7 @@ export class RecycleBinChipComponent {
174
176
  this.cdr.markForCheck();
175
177
  }
176
178
  static ɵfac = function RecycleBinChipComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || RecycleBinChipComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef)); };
177
- static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: RecycleBinChipComponent, selectors: [["mj-recycle-bin-chip"]], inputs: { EntityName: "EntityName", ContextUser: "ContextUser" }, outputs: { BeforeRecycleBinOpen: "BeforeRecycleBinOpen", AfterRecycleBinOpen: "AfterRecycleBinOpen", BeforeRecordRestore: "BeforeRecordRestore", AfterRecordRestore: "AfterRecordRestore", BeforeRestoreCommit: "BeforeRestoreCommit", AfterRestoreCommit: "AfterRestoreCommit" }, standalone: false, decls: 1, vars: 1, consts: [["type", "button", 1, "rbc-chip", 3, "click"], ["aria-hidden", "true", 1, "fa-solid", "fa-trash-can-arrow-up"], [1, "rbc-chip-label"], [1, "rbc-chip-count"], [3, "Closed", "BeforeRecycleBinOpen", "AfterRecycleBinOpen", "BeforeRecordRestore", "AfterRecordRestore", "BeforeRestoreCommit", "AfterRestoreCommit", "Visible", "EntityName", "ContextUser"]], template: function RecycleBinChipComponent_Template(rf, ctx) { if (rf & 1) {
179
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: RecycleBinChipComponent, selectors: [["mj-recycle-bin-chip"]], inputs: { EntityName: "EntityName", ContextUser: "ContextUser" }, outputs: { BeforeRecycleBinOpen: "BeforeRecycleBinOpen", AfterRecycleBinOpen: "AfterRecycleBinOpen", BeforeRecordRestore: "BeforeRecordRestore", AfterRecordRestore: "AfterRecordRestore", BeforeRestoreCommit: "BeforeRestoreCommit", AfterRestoreCommit: "AfterRestoreCommit" }, standalone: false, features: [i0.ɵɵInheritDefinitionFeature], decls: 1, vars: 1, consts: [["type", "button", 1, "rbc-chip", 3, "click"], ["aria-hidden", "true", 1, "fa-solid", "fa-trash-can-arrow-up"], [1, "rbc-chip-label"], [1, "rbc-chip-count"], [3, "Closed", "BeforeRecycleBinOpen", "AfterRecycleBinOpen", "BeforeRecordRestore", "AfterRecordRestore", "BeforeRestoreCommit", "AfterRestoreCommit", "Visible", "EntityName", "ContextUser"]], template: function RecycleBinChipComponent_Template(rf, ctx) { if (rf & 1) {
178
180
  i0.ɵɵconditionalCreate(0, RecycleBinChipComponent_Conditional_0_Template, 7, 5);
179
181
  } if (rf & 2) {
180
182
  i0.ɵɵconditional(ctx.IsVisible ? 0 : -1);
@@ -224,5 +226,5 @@ export class RecycleBinChipComponent {
224
226
  }], AfterRestoreCommit: [{
225
227
  type: Output
226
228
  }] }); })();
227
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(RecycleBinChipComponent, { className: "RecycleBinChipComponent", filePath: "src/lib/recycle-bin/recycle-bin-chip.component.ts", lineNumber: 109 }); })();
229
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(RecycleBinChipComponent, { className: "RecycleBinChipComponent", filePath: "src/lib/recycle-bin/recycle-bin-chip.component.ts", lineNumber: 110 }); })();
228
230
  //# sourceMappingURL=recycle-bin-chip.component.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"recycle-bin-chip.component.js","sourceRoot":"","sources":["../../../src/lib/recycle-bin/recycle-bin-chip.component.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,uBAAuB,EAEvB,YAAY,EACZ,K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eDetectorRef,\n EventEmitter,\n Input,\n OnInit,\n Output,\n ViewEncapsulation,\n} from '@angular/core';\nimport { Metadata, RunView, UserInfo } from '@memberjunction/core';\nimport {\n AfterRecordRestoreEventArgs,\n AfterRecycleBinOpenEventArgs,\n AfterRestoreCommitEventArgs,\n BeforeRecordRestoreEventArgs,\n BeforeRecycleBinOpenEventArgs,\n BeforeRestoreCommitEventArgs,\n} from './events/recycle-bin-events';\n\n/**\n * Tiny composite that renders a Recycle Bin **chip button** (with live\n * deleted-record count badge) and hosts the {@link RecycleBinComponent}\n * slide-in panel that opens when clicked.\n *\n * Designed to be dropped into any toolbar in three lines:\n *\n * @example\n * <mj-recycle-bin-chip\n * *ngIf=\"ShowRecycleBin\"\n * [EntityName]=\"effectiveEntity?.Name\">\n * </mj-recycle-bin-chip>\n *\n * The chip auto-hides itself when:\n * - No `EntityName` is provided\n * - The entity has `TrackRecordChanges = false`\n * - The user lacks `CanDelete` permission on the entity\n * - The deleted-record count is zero\n *\n * Each of those is the right behavior to avoid cluttering toolbars on\n * entities where the bin is irrelevant.\n *\n * Consumers who want to intercept any bin action can pass through the\n * standard cancelable Before/After events.\n */\n@Component({\n standalone: false,\n selector: 'mj-recycle-bin-chip',\n template: `\n @if (IsVisible) {\n <button class=\"rbc-chip\"\n type=\"button\"\n (click)=\"Toggle()\"\n [attr.title]=\"'Recycle Bin · ' + DeletedCount + ' deleted record' + (DeletedCount === 1 ? '' : 's')\">\n <i class=\"fa-solid fa-trash-can-arrow-up\" aria-hidden=\"true\"></i>\n <span class=\"rbc-chip-label\">Recycle Bin</span>\n <span class=\"rbc-chip-count\">{{ DeletedCount }}</span>\n </button>\n\n <mj-recycle-bin\n [Visible]=\"PanelVisible\"\n [EntityName]=\"EntityName\"\n [ContextUser]=\"ContextUser\"\n (Closed)=\"OnPanelClosed()\"\n (BeforeRecycleBinOpen)=\"BeforeRecycleBinOpen.emit($event)\"\n (AfterRecycleBinOpen)=\"OnAfterRecycleBinOpen($event)\"\n (BeforeRecordRestore)=\"BeforeRecordRestore.emit($event)\"\n (AfterRecordRestore)=\"AfterRecordRestore.emit($event)\"\n (BeforeRestoreCommit)=\"BeforeRestoreCommit.emit($event)\"\n (AfterRestoreCommit)=\"OnAfterRestoreCommit($event)\">\n </mj-recycle-bin>\n }\n `,\n styles: [`\n .rbc-chip {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n padding: 6px 11px;\n border-radius: 16px;\n font-size: 12px;\n font-weight: 500;\n background: color-mix(in srgb, var(--mj-status-info) 8%, var(--mj-bg-surface));\n color: color-mix(in srgb, var(--mj-status-info) 80%, var(--mj-text-secondary));\n border: 1px solid color-mix(in srgb, var(--mj-status-info) 25%, var(--mj-border-default));\n cursor: pointer;\n font-family: inherit;\n transition: background-color 0.1s, border-color 0.1s;\n }\n .rbc-chip:hover {\n background: color-mix(in srgb, var(--mj-status-info) 14%, var(--mj-bg-surface));\n border-color: var(--mj-status-info);\n }\n .rbc-chip-label {\n /* always show on wider screens; hide on narrow if needed */\n }\n .rbc-chip-count {\n background: var(--mj-status-info);\n color: var(--mj-text-inverse, #fff);\n border-radius: 10px;\n padding: 1px 7px;\n font-size: 10px;\n font-weight: 700;\n }\n `],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class RecycleBinChipComponent implements OnInit {\n /**\n * Entity name whose deleted records will be surfaced. When null/empty,\n * the chip hides itself entirely.\n */\n private _entityName: string | null = null;\n @Input()\n set EntityName(value: string | null) {\n if (value !== this._entityName) {\n this._entityName = value;\n if (this.isInitialized) this.refreshCount();\n }\n }\n get EntityName(): string | null {\n return this._entityName;\n }\n\n /**\n * Optional context user for permission checks. Falls back to\n * `Metadata.Provider.CurrentUser` when omitted.\n */\n @Input() ContextUser: UserInfo | null = null;\n\n // ─── Re-emitted events from the inner panel ────────────────────\n\n @Output() BeforeRecycleBinOpen = new EventEmitter<BeforeRecycleBinOpenEventArgs>();\n @Output() AfterRecycleBinOpen = new EventEmitter<AfterRecycleBinOpenEventArgs>();\n @Output() BeforeRecordRestore = new EventEmitter<BeforeRecordRestoreEventArgs>();\n @Output() AfterRecordRestore = new EventEmitter<AfterRecordRestoreEventArgs>();\n @Output() BeforeRestoreCommit = new EventEmitter<BeforeRestoreCommitEventArgs>();\n @Output() AfterRestoreCommit = new EventEmitter<AfterRestoreCommitEventArgs>();\n\n // ─── Public template state ──────────────────────────────────────\n\n public DeletedCount = 0;\n public PanelVisible = false;\n public IsVisible = false;\n public CanDelete = false;\n public TracksChanges = false;\n\n private isInitialized = false;\n\n constructor(private cdr: ChangeDetectorRef) {}\n\n ngOnInit(): void {\n this.isInitialized = true;\n this.refreshCount();\n }\n\n public Toggle(): void {\n this.PanelVisible = !this.PanelVisible;\n this.cdr.markForCheck();\n }\n\n public OnPanelClosed(): void {\n this.PanelVisible = false;\n // Refresh count — a restore may have removed an entry from the bin\n this.refreshCount();\n }\n\n /**\n * After-events bubble through but we also use them to refresh the count\n * — restoring a record means it's no longer \"deleted\".\n */\n public OnAfterRecycleBinOpen(e: AfterRecycleBinOpenEventArgs): void {\n this.DeletedCount = e.deletedRecordCount;\n this.AfterRecycleBinOpen.emit(e);\n this.cdr.markForCheck();\n }\n\n public OnAfterRestoreCommit(e: AfterRestoreCommitEventArgs): void {\n if (e.success) this.DeletedCount = Math.max(0, this.DeletedCount - 1);\n this.AfterRestoreCommit.emit(e);\n this.cdr.markForCheck();\n }\n\n /**\n * Loads the deleted-record count and visibility flags. Called on init,\n * when EntityName changes, and after the panel closes (so a restore\n * decrements the badge).\n */\n private async refreshCount(): Promise<void> {\n this.IsVisible = false;\n this.DeletedCount = 0;\n\n if (!this._entityName) {\n this.cdr.markForCheck();\n return;\n }\n\n const md = new Metadata();\n const entityInfo = md.Entities.find(\n e => e.Name.trim().toLowerCase() === this._entityName!.trim().toLowerCase(),\n );\n if (!entityInfo) {\n this.cdr.markForCheck();\n return;\n }\n\n this.TracksChanges = !!entityInfo.TrackRecordChanges;\n if (!this.TracksChanges) {\n this.cdr.markForCheck();\n return;\n }\n\n const effectiveUser = this.ContextUser ?? md.CurrentUser;\n if (!effectiveUser) {\n this.cdr.markForCheck();\n return;\n }\n const perms = entityInfo.GetUserPermisions(effectiveUser);\n this.CanDelete = perms?.CanDelete ?? false;\n if (!this.CanDelete) {\n this.cdr.markForCheck();\n return;\n }\n\n // Cheap count query — just IDs, capped low\n try {\n const rv = new RunView();\n const result = await rv.RunView<{ ID: string; RecordID: string }>({\n EntityName: 'MJ: Record Changes',\n Fields: ['ID', 'RecordID'],\n ExtraFilter: `EntityID='${entityInfo.ID}' AND Type='Delete'`,\n OrderBy: 'ChangedAt DESC',\n MaxRows: 500,\n ResultType: 'simple',\n }, this.ContextUser ?? undefined);\n\n if (result.Success) {\n // Distinct RecordIDs (a record might have been deleted, recreated, deleted again)\n const distinct = new Set(result.Results.map(r => r.RecordID));\n this.DeletedCount = distinct.size;\n }\n } catch {\n // Silently ignore — chip just won't show\n }\n\n this.IsVisible = this.DeletedCount > 0;\n this.cdr.markForCheck();\n }\n}\n"]}
1
+ {"version":3,"file":"recycle-bin-chip.component.js","sourceRoot":"","sources":["../../../src/lib/recycle-bin/recycle-bin-chip.component.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,uBAAuB,EAEvB,YAAY,EACZ,KAAK,EAEL,MAAM,EACN,iBAAiB,GAClB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAY,OAAO,EAAY,MAAM,sBAAsB,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;;;;;IAwC/D,iCAGuG;IADrG,2LAAS,eAAQ,KAAC;IAElB,uBAAiE;IACjE,+BAA6B;IAAA,2BAAW;IAAA,iBAAO;IAC/C,+BAA6B;IAAA,YAAkB;IACjD,AADiD,iBAAO,EAC/C;IAET,yCAUsD;IAApD,AADA,AADA,AADA,AADA,AADA,AADA,qMAAU,sBAAe,KAAC,0NACF,wCAAiC,KAAC,wNACnC,oCAA6B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AAU,EAAE,QAAQ;aACrB,EAAE,IAAI,CAAC,WAAW,IAAI,SAAS,CAAC,CAAC;YAElC,IAAI,MAAM,CAAC,OAAO,EAAE,CAAC;gBACnB,kFAAkF;gBAClF,MAAM,QAAQ,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC;gBAC9D,IAAI,CAAC,YAAY,GAAG,QAAQ,CAAC,IAAI,CAAC;YACpC,CAAC;QACH,CAAC;QAAC,MAAM,CAAC;YACP,yCAAyC;QAC3C,CAAC;QAED,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,YAAY,GAAG,CAAC,CAAC;QACvC,IAAI,CAAC,GAAG,CAAC,YAAY,EAAE,CAAC;IAC1B,CAAC;iHA7IU,uBAAuB;6DAAvB,uBAAuB;YA3DhC,+EAAiB;;YAAjB,wCAsBC;;;iFAqCQ,uBAAuB;cA/DnC,SAAS;6BACI,KAAK,YACP,qBAAqB,YACrB;;;;;;;;;;;;;;;;;;;;;;;;GAwBT,mBAiCgB,uBAAuB,CAAC,MAAM,iBAChC,iBAAiB,CAAC,IAAI;;kBAQpC,KAAK;;kBAeL,KAAK;;kBAIL,MAAM;;kBACN,MAAM;;kBACN,MAAM;;kBACN,MAAM;;kBACN,MAAM;;kBACN,MAAM;;kFA9BI,uBAAuB","sourcesContent":["import {\n Component,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n EventEmitter,\n Input,\n OnInit,\n Output,\n ViewEncapsulation,\n} from '@angular/core';\nimport { Metadata, RunView, UserInfo } from '@memberjunction/core';\nimport { BaseAngularComponent } from '@memberjunction/ng-base-types';\nimport {\n AfterRecordRestoreEventArgs,\n AfterRecycleBinOpenEventArgs,\n AfterRestoreCommitEventArgs,\n BeforeRecordRestoreEventArgs,\n BeforeRecycleBinOpenEventArgs,\n BeforeRestoreCommitEventArgs,\n} from './events/recycle-bin-events';\n\n/**\n * Tiny composite that renders a Recycle Bin **chip button** (with live\n * deleted-record count badge) and hosts the {@link RecycleBinComponent}\n * slide-in panel that opens when clicked.\n *\n * Designed to be dropped into any toolbar in three lines:\n *\n * @example\n * <mj-recycle-bin-chip\n * *ngIf=\"ShowRecycleBin\"\n * [EntityName]=\"effectiveEntity?.Name\">\n * </mj-recycle-bin-chip>\n *\n * The chip auto-hides itself when:\n * - No `EntityName` is provided\n * - The entity has `TrackRecordChanges = false`\n * - The user lacks `CanDelete` permission on the entity\n * - The deleted-record count is zero\n *\n * Each of those is the right behavior to avoid cluttering toolbars on\n * entities where the bin is irrelevant.\n *\n * Consumers who want to intercept any bin action can pass through the\n * standard cancelable Before/After events.\n */\n@Component({\n standalone: false,\n selector: 'mj-recycle-bin-chip',\n template: `\n @if (IsVisible) {\n <button class=\"rbc-chip\"\n type=\"button\"\n (click)=\"Toggle()\"\n [attr.title]=\"'Recycle Bin · ' + DeletedCount + ' deleted record' + (DeletedCount === 1 ? '' : 's')\">\n <i class=\"fa-solid fa-trash-can-arrow-up\" aria-hidden=\"true\"></i>\n <span class=\"rbc-chip-label\">Recycle Bin</span>\n <span class=\"rbc-chip-count\">{{ DeletedCount }}</span>\n </button>\n\n <mj-recycle-bin\n [Visible]=\"PanelVisible\"\n [EntityName]=\"EntityName\"\n [ContextUser]=\"ContextUser\"\n (Closed)=\"OnPanelClosed()\"\n (BeforeRecycleBinOpen)=\"BeforeRecycleBinOpen.emit($event)\"\n (AfterRecycleBinOpen)=\"OnAfterRecycleBinOpen($event)\"\n (BeforeRecordRestore)=\"BeforeRecordRestore.emit($event)\"\n (AfterRecordRestore)=\"AfterRecordRestore.emit($event)\"\n (BeforeRestoreCommit)=\"BeforeRestoreCommit.emit($event)\"\n (AfterRestoreCommit)=\"OnAfterRestoreCommit($event)\">\n </mj-recycle-bin>\n }\n `,\n styles: [`\n .rbc-chip {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n padding: 6px 11px;\n border-radius: 16px;\n font-size: 12px;\n font-weight: 500;\n background: color-mix(in srgb, var(--mj-status-info) 8%, var(--mj-bg-surface));\n color: color-mix(in srgb, var(--mj-status-info) 80%, var(--mj-text-secondary));\n border: 1px solid color-mix(in srgb, var(--mj-status-info) 25%, var(--mj-border-default));\n cursor: pointer;\n font-family: inherit;\n transition: background-color 0.1s, border-color 0.1s;\n }\n .rbc-chip:hover {\n background: color-mix(in srgb, var(--mj-status-info) 14%, var(--mj-bg-surface));\n border-color: var(--mj-status-info);\n }\n .rbc-chip-label {\n /* always show on wider screens; hide on narrow if needed */\n }\n .rbc-chip-count {\n background: var(--mj-status-info);\n color: var(--mj-text-inverse, #fff);\n border-radius: 10px;\n padding: 1px 7px;\n font-size: 10px;\n font-weight: 700;\n }\n `],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class RecycleBinChipComponent extends BaseAngularComponent implements OnInit {\n /**\n * Entity name whose deleted records will be surfaced. When null/empty,\n * the chip hides itself entirely.\n */\n private _entityName: string | null = null;\n @Input()\n set EntityName(value: string | null) {\n if (value !== this._entityName) {\n this._entityName = value;\n if (this.isInitialized) this.refreshCount();\n }\n }\n get EntityName(): string | null {\n return this._entityName;\n }\n\n /**\n * Optional context user for permission checks. Falls back to\n * `this.ProviderToUse.CurrentUser` when omitted.\n */\n @Input() ContextUser: UserInfo | null = null;\n\n // ─── Re-emitted events from the inner panel ────────────────────\n\n @Output() BeforeRecycleBinOpen = new EventEmitter<BeforeRecycleBinOpenEventArgs>();\n @Output() AfterRecycleBinOpen = new EventEmitter<AfterRecycleBinOpenEventArgs>();\n @Output() BeforeRecordRestore = new EventEmitter<BeforeRecordRestoreEventArgs>();\n @Output() AfterRecordRestore = new EventEmitter<AfterRecordRestoreEventArgs>();\n @Output() BeforeRestoreCommit = new EventEmitter<BeforeRestoreCommitEventArgs>();\n @Output() AfterRestoreCommit = new EventEmitter<AfterRestoreCommitEventArgs>();\n\n // ─── Public template state ──────────────────────────────────────\n\n public DeletedCount = 0;\n public PanelVisible = false;\n public IsVisible = false;\n public CanDelete = false;\n public TracksChanges = false;\n\n private isInitialized = false;\n\n constructor(private cdr: ChangeDetectorRef) {\n super();}\n\n ngOnInit(): void {\n this.isInitialized = true;\n this.refreshCount();\n }\n\n public Toggle(): void {\n this.PanelVisible = !this.PanelVisible;\n this.cdr.markForCheck();\n }\n\n public OnPanelClosed(): void {\n this.PanelVisible = false;\n // Refresh count — a restore may have removed an entry from the bin\n this.refreshCount();\n }\n\n /**\n * After-events bubble through but we also use them to refresh the count\n * — restoring a record means it's no longer \"deleted\".\n */\n public OnAfterRecycleBinOpen(e: AfterRecycleBinOpenEventArgs): void {\n this.DeletedCount = e.deletedRecordCount;\n this.AfterRecycleBinOpen.emit(e);\n this.cdr.markForCheck();\n }\n\n public OnAfterRestoreCommit(e: AfterRestoreCommitEventArgs): void {\n if (e.success) this.DeletedCount = Math.max(0, this.DeletedCount - 1);\n this.AfterRestoreCommit.emit(e);\n this.cdr.markForCheck();\n }\n\n /**\n * Loads the deleted-record count and visibility flags. Called on init,\n * when EntityName changes, and after the panel closes (so a restore\n * decrements the badge).\n */\n private async refreshCount(): Promise<void> {\n this.IsVisible = false;\n this.DeletedCount = 0;\n\n if (!this._entityName) {\n this.cdr.markForCheck();\n return;\n }\n\n const md = this.ProviderToUse;\n const entityInfo = md.Entities.find(\n e => e.Name.trim().toLowerCase() === this._entityName!.trim().toLowerCase(),\n );\n if (!entityInfo) {\n this.cdr.markForCheck();\n return;\n }\n\n this.TracksChanges = !!entityInfo.TrackRecordChanges;\n if (!this.TracksChanges) {\n this.cdr.markForCheck();\n return;\n }\n\n const effectiveUser = this.ContextUser ?? md.CurrentUser;\n if (!effectiveUser) {\n this.cdr.markForCheck();\n return;\n }\n const perms = entityInfo.GetUserPermisions(effectiveUser);\n this.CanDelete = perms?.CanDelete ?? false;\n if (!this.CanDelete) {\n this.cdr.markForCheck();\n return;\n }\n\n // Cheap count query — just IDs, capped low\n try {\n const rv = RunView.FromMetadataProvider(this.ProviderToUse);\n const result = await rv.RunView<{ ID: string; RecordID: string }>({\n EntityName: 'MJ: Record Changes',\n Fields: ['ID', 'RecordID'],\n ExtraFilter: `EntityID='${entityInfo.ID}' AND Type='Delete'`,\n OrderBy: 'ChangedAt DESC',\n MaxRows: 500,\n ResultType: 'simple',\n }, this.ContextUser ?? undefined);\n\n if (result.Success) {\n // Distinct RecordIDs (a record might have been deleted, recreated, deleted again)\n const distinct = new Set(result.Results.map(r => r.RecordID));\n this.DeletedCount = distinct.size;\n }\n } catch {\n // Silently ignore — chip just won't show\n }\n\n this.IsVisible = this.DeletedCount > 0;\n this.cdr.markForCheck();\n }\n}\n"]}
@@ -1,5 +1,6 @@
1
1
  import { ChangeDetectorRef, EventEmitter, OnInit } from '@angular/core';
2
2
  import { UserInfo } from '@memberjunction/core';
3
+ import { BaseAngularComponent } from '@memberjunction/ng-base-types';
3
4
  import { RestoreCommitEvent } from '@memberjunction/ng-record-changes';
4
5
  import { AfterRecordRestoreEventArgs, AfterRecycleBinOpenEventArgs, AfterRestoreCommitEventArgs, BeforeRecordRestoreEventArgs, BeforeRecycleBinOpenEventArgs, BeforeRestoreCommitEventArgs, RecycleBinEntry } from './events/recycle-bin-events';
5
6
  import * as i0 from "@angular/core";
@@ -58,7 +59,7 @@ import * as i0 from "@angular/core";
58
59
  * }
59
60
  * }
60
61
  */
61
- export declare class RecycleBinComponent implements OnInit {
62
+ export declare class RecycleBinComponent extends BaseAngularComponent implements OnInit {
62
63
  private cdr;
63
64
  /**
64
65
  * Controls panel visibility. Set to true to slide in (and trigger an
@@ -73,7 +74,7 @@ export declare class RecycleBinComponent implements OnInit {
73
74
  EntityName: string | null;
74
75
  /**
75
76
  * Optional context user. When omitted, falls back to
76
- * {@link Metadata.Provider.CurrentUser} per standard MJ conventions.
77
+ * {@link this.ProviderToUse.CurrentUser} per standard MJ conventions.
77
78
  */
78
79
  ContextUser: UserInfo | null;
79
80
  /**
@@ -1 +1 @@
1
-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cAAc,IAAI,MAAM,CAIlC;IAED;;;OAGG;IACH,IAAW,SAAS,IAAI,OAAO,CAE9B;IAID;;;;OAIG;IACU,kBAAkB,IAAI,OAAO,CAAC,IAAI,CAAC;IA4FhD;;;OAGG;IACI,gBAAgB,CAAC,KAAK,EAAE,eAAe,GAAG,IAAI;IAmBrD;;;OAGG;IACU,kBAAkB,CAAC,MAAM,EAAE,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC;IA+FnE,kBAAkB,IAAI,IAAI;IAM1B,OAAO,IAAI,IAAI;IAQtB;;;;;OAKG;IACH,OAAO,CAAC,qBAAqB;IA2B7B;;;OAGG;IACH,OAAO,CAAC,mBAAmB;IAc3B;;;;OAIG;IACH,OAAO,CAAC,qBAAqB;IAyB7B,OAAO,CAAC,gBAAgB;IAYxB,OAAO,CAAC,aAAa;IAWd,eAAe,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,GAAG,IAAI,GAAG,MAAM;IAYnD,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM;yCAtdvC,mBAAmB;2CAAnB,mBAAmB;CA2d/B"}
@@ -1,5 +1,6 @@
1
1
  import { Component, ChangeDetectionStrategy, EventEmitter, Input, Output, ViewEncapsulation, } from '@angular/core';
2
- import { Metadata, RunView, } from '@memberjunction/core';
2
+ import { RunView, } from '@memberjunction/core';
3
+ import { BaseAngularComponent } from '@memberjunction/ng-base-types';
3
4
  import * as i0 from "@angular/core";
4
5
  import * as i1 from "@memberjunction/ng-shared-generic";
5
6
  import * as i2 from "@memberjunction/ng-record-changes";
@@ -179,7 +180,7 @@ function RecycleBinComponent_Conditional_13_Template(rf, ctx) { if (rf & 1) {
179
180
  * }
180
181
  * }
181
182
  */
182
- export class RecycleBinComponent {
183
+ export class RecycleBinComponent extends BaseAngularComponent {
183
184
  cdr;
184
185
  // ─── Inputs ─────────────────────────────────────────────────────
185
186
  /**
@@ -203,7 +204,7 @@ export class RecycleBinComponent {
203
204
  EntityName = null;
204
205
  /**
205
206
  * Optional context user. When omitted, falls back to
206
- * {@link Metadata.Provider.CurrentUser} per standard MJ conventions.
207
+ * {@link this.ProviderToUse.CurrentUser} per standard MJ conventions.
207
208
  */
208
209
  ContextUser = null;
209
210
  /**
@@ -257,6 +258,7 @@ export class RecycleBinComponent {
257
258
  isInitialized = false;
258
259
  resolvedEntityInfo = null;
259
260
  constructor(cdr) {
261
+ super();
260
262
  this.cdr = cdr;
261
263
  }
262
264
  ngOnInit() {
@@ -290,7 +292,7 @@ export class RecycleBinComponent {
290
292
  return;
291
293
  }
292
294
  // Resolve metadata + permissions
293
- const md = new Metadata();
295
+ const md = this.ProviderToUse;
294
296
  const entityInfo = md.Entities.find(e => e.Name.trim().toLowerCase() === this.EntityName.trim().toLowerCase());
295
297
  if (!entityInfo) {
296
298
  this.LoadError = `Entity '${this.EntityName}' not found`;
@@ -333,7 +335,7 @@ export class RecycleBinComponent {
333
335
  this.Entries = [];
334
336
  this.cdr.markForCheck();
335
337
  try {
336
- const rv = new RunView();
338
+ const rv = RunView.FromMetadataProvider(this.ProviderToUse);
337
339
  // Get the most recent Delete change per RecordID. We over-fetch and
338
340
  // dedupe in JS — the data is small and SQL grouping with the latest
339
341
  // change per ID is awkward across dialects.
@@ -417,7 +419,7 @@ export class RecycleBinComponent {
417
419
  let errorMessage;
418
420
  let newRecordID;
419
421
  try {
420
- const md = new Metadata();
422
+ const md = this.ProviderToUse;
421
423
  const entity = await md.GetEntityObject(this.resolvedEntityInfo.Name, this.ContextUser ?? undefined);
422
424
  // Apply the snapshot fields, including the original primary key
423
425
  // (preserves any FK references that still point at this ID).
@@ -613,7 +615,7 @@ export class RecycleBinComponent {
613
615
  return user;
614
616
  }
615
617
  static ɵfac = function RecycleBinComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || RecycleBinComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef)); };
616
- static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: RecycleBinComponent, selectors: [["mj-recycle-bin"]], inputs: { Visible: "Visible", EntityName: "EntityName", ContextUser: "ContextUser", MaxRecords: "MaxRecords" }, outputs: { Closed: "Closed", BeforeRecycleBinOpen: "BeforeRecycleBinOpen", AfterRecycleBinOpen: "AfterRecycleBinOpen", BeforeRecordRestore: "BeforeRecordRestore", AfterRecordRestore: "AfterRecordRestore", BeforeRestoreCommit: "BeforeRestoreCommit", AfterRestoreCommit: "AfterRestoreCommit" }, standalone: false, decls: 15, vars: 16, consts: [[3, "Closed", "Mode", "Title", "Visible", "Resizable", "MinWidthPx", "MaxWidthRatio"], [1, "rb-container"], [1, "rb-header"], [1, "rb-header-icon"], ["aria-hidden", "true", 1, "fa-solid", "fa-trash-can-arrow-up"], [1, "rb-header-text"], [1, "rb-header-title"], [1, "rb-header-subtitle"], [1, "rb-state", "rb-state-denied"], ["text", "Loading deleted records...", "size", "medium"], [1, "rb-state", "rb-state-error"], [1, "rb-state", "rb-state-empty"], [1, "rb-list"], [3, "RestoreConfirmed", "RestoreCancelled", "Visible", "Mode", "RecordChange", "EntityName"], ["aria-hidden", "true", 1, "fa-solid", "fa-lock"], ["aria-hidden", "true", 1, "fa-solid", "fa-triangle-exclamation"], ["aria-hidden", "true", 1, "fa-solid", "fa-trash-can"], [1, "rb-card"], [1, "rb-card-info"], [1, "rb-card-name"], [1, "rb-card-fields"], [1, "rb-card-meta"], ["aria-hidden", "true", 1, "fa-solid", "fa-trash"], [1, "rb-card-actions"], ["type", "button", 1, "rb-btn", "rb-btn-restore", 3, "click", "disabled", "title"], ["aria-hidden", "true", 1, "fa-solid", "fa-rotate-left"], [1, "rb-card-field"]], template: function RecycleBinComponent_Template(rf, ctx) { if (rf & 1) {
618
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: RecycleBinComponent, selectors: [["mj-recycle-bin"]], inputs: { Visible: "Visible", EntityName: "EntityName", ContextUser: "ContextUser", MaxRecords: "MaxRecords" }, outputs: { Closed: "Closed", BeforeRecycleBinOpen: "BeforeRecycleBinOpen", AfterRecycleBinOpen: "AfterRecycleBinOpen", BeforeRecordRestore: "BeforeRecordRestore", AfterRecordRestore: "AfterRecordRestore", BeforeRestoreCommit: "BeforeRestoreCommit", AfterRestoreCommit: "AfterRestoreCommit" }, standalone: false, features: [i0.ɵɵInheritDefinitionFeature], decls: 15, vars: 16, consts: [[3, "Closed", "Mode", "Title", "Visible", "Resizable", "MinWidthPx", "MaxWidthRatio"], [1, "rb-container"], [1, "rb-header"], [1, "rb-header-icon"], ["aria-hidden", "true", 1, "fa-solid", "fa-trash-can-arrow-up"], [1, "rb-header-text"], [1, "rb-header-title"], [1, "rb-header-subtitle"], [1, "rb-state", "rb-state-denied"], ["text", "Loading deleted records...", "size", "medium"], [1, "rb-state", "rb-state-error"], [1, "rb-state", "rb-state-empty"], [1, "rb-list"], [3, "RestoreConfirmed", "RestoreCancelled", "Visible", "Mode", "RecordChange", "EntityName"], ["aria-hidden", "true", 1, "fa-solid", "fa-lock"], ["aria-hidden", "true", 1, "fa-solid", "fa-triangle-exclamation"], ["aria-hidden", "true", 1, "fa-solid", "fa-trash-can"], [1, "rb-card"], [1, "rb-card-info"], [1, "rb-card-name"], [1, "rb-card-fields"], [1, "rb-card-meta"], ["aria-hidden", "true", 1, "fa-solid", "fa-trash"], [1, "rb-card-actions"], ["type", "button", 1, "rb-btn", "rb-btn-restore", 3, "click", "disabled", "title"], ["aria-hidden", "true", 1, "fa-solid", "fa-rotate-left"], [1, "rb-card-field"]], template: function RecycleBinComponent_Template(rf, ctx) { if (rf & 1) {
617
619
  i0.ɵɵelementStart(0, "mj-slide-panel", 0);
618
620
  i0.ɵɵlistener("Closed", function RecycleBinComponent_Template_mj_slide_panel_Closed_0_listener() { return ctx.OnClose(); });
619
621
  i0.ɵɵelementStart(1, "div", 1)(2, "div", 2)(3, "div", 3);
@@ -677,5 +679,5 @@ export class RecycleBinComponent {
677
679
  }], AfterRestoreCommit: [{
678
680
  type: Output
679
681
  }] }); })();
680
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(RecycleBinComponent, { className: "RecycleBinComponent", filePath: "src/lib/recycle-bin/recycle-bin.component.ts", lineNumber: 93 }); })();
682
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(RecycleBinComponent, { className: "RecycleBinComponent", filePath: "src/lib/recycle-bin/recycle-bin.component.ts", lineNumber: 94 }); })();
681
683
  //# sourceMappingURL=recycle-bin.component.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"recycle-bin.component.js","sourceRoot":"","sources":["../../../src/lib/recycle-bin/recycle-bin.component.ts","../../../src/lib/recycle-bin/recycle-bin.component.html"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,uBAAuB,EAEvB,YAAY,EACZ,KAAK,EAEL,MAAM,EACN,iBAAiB,GAClB,MAAM,eAAe,CAAC;AACvB,OAAO,EAGL,QAAQ,EACR,OAAO,GAER,MAAM,sBAAsB,CAAC;;;;;;;;ICGpB,8BAAgC;IAAA,YAAoB;IAAA,iBAAM;;;IAA1B,cAAoB;IAApB,2CAAoB;;;IAOxD,8BAAsC;IACpC,wBAAmD;IACnD,0BAAI;IAAA,6BAAa;IAAA,iBAAK;IACtB,yBAAG;IAAA,YAAe;IACpB,AADoB,iBAAI,EAClB;;;IADD,eAAe;IAAf,sCAAe;;;IAMpB,gCAAyE;;;IAKzE,+BAAqC;IACnC,wBAAmE;IACnE,0BAAI;IAAA,8CAA8B;IAAA,iBAAK;IACvC,yBAAG;IAAA,YAAe;IACpB,AADoB,iBAAI,EAClB;;;IADD,eAAe;IAAf,sCAAe;;;IAMpB,+BAAqC;IACnC,wBAAwD;IACxD,0BAAI;IAAA,oCAAoB;IAAA,iBAAK;IAC7B,yBAAG;IAAA,qGACkB;IACvB,AADuB,iBAAI,EACrB;;;IAcU,AADF,gCAA4B,aAClB;IAAA,YAAqB;IAAA,iBAAS;IAAC,YACzC;IAAA,iBAAO;;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ACG;YAAA,2BAAW;YAAA,iBAAM;YAC9C,qFAAkB;YAItB,AADE,iBAAM,EACF;YAGN,qFAA6C;YAS7C,8FAAiB;YAKjB,wFAA4C;YAS5C,wFAAqE;YAUrE,wFAAsD;YAsCxD,iBAAM;YAGN,qDAM4C;YAA1C,AADA,+IAAoB,8BAA0B,IAAC,4HAC3B,wBAAoB,IAAC;YAG7C,AAFE,iBAA2B,EAEZ;;YAtGf,AADA,AADA,AADA,AADA,AADA,8BAAgB,yDAC+B,wBAC5B,mBACD,mBACA,sBACG;YAYf,eAEC;YAFD,yCAEC;YAKL,cAMC;YAND,4EAMC;YAGD,cAEC;YAFD,yCAEC;YAGD,cAMC;YAND,4EAMC;YAGD,cAOC;YAPD,yGAOC;YAGD,cAoCC;YApCD,sFAoCC;YAMD,cAA0B;YAG1B,AADA,AADA,AADA,4CAA0B,oBACP,6FACiC,8BAC3B;;;iFDXhB,mBAAmB;cAR/B,SAAS;6BACI,KAAK,YACP,gBAAgB,mBAGT,uBAAuB,CAAC,MAAM,iBAChC,iBAAiB,CAAC,IAAI;;kBAUpC,KAAK;;kBAeL,KAAK;;kBAML,KAAK;;kBAQL,KAAK;;kBAKL,MAAM;;kBAON,MAAM;;kBAGN,MAAM;;kBAQN,MAAM;;kBAMN,MAAM;;kBAON,MAAM;;kBAGN,MAAM;;kFA5EI,mBAAmB","sourcesContent":["import {\n Component,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n EventEmitter,\n Input,\n OnInit,\n Output,\n ViewEncapsulation,\n} from '@angular/core';\nimport {\n EntityFieldInfo,\n EntityInfo,\n Metadata,\n RunView,\n UserInfo,\n} from '@memberjunction/core';\nimport { MJRecordChangeEntity } from '@memberjunction/core-entities';\nimport { RestoreCommitEvent } from '@memberjunction/ng-record-changes';\nimport {\n AfterRecordRestoreEventArgs,\n AfterRecycleBinOpenEventArgs,\n AfterRestoreCommitEventArgs,\n BeforeRecordRestoreEventArgs,\n BeforeRecycleBinOpenEventArgs,\n BeforeRestoreCommitEventArgs,\n RecycleBinEntry,\n} from './events/recycle-bin-events';\n\n/**\n * Slide-in panel that lists all hard-deleted records for a single entity\n * and lets a user with `Delete` permission re-create any of them from its\n * historical RecordChange snapshot.\n *\n * ### When to use\n *\n * Surface this component from any entity-viewing context where the user\n * might need to restore a hard-deleted record. The {@link EntityViewerComponent},\n * {@link EntityDataGridComponent}, and {@link EntityCardsComponent}\n * already expose a `ShowRecycleBin` input (default `true`) that renders a\n * chip in their toolbar — you only need to use this component directly if\n * you're building a custom viewer.\n *\n * ### Permissions\n *\n * The chip / panel is gated on `entity.UserPermissions.CanDelete` —\n * rationale: there is no native \"undelete\" permission in MemberJunction,\n * but if a user has the higher-trust permission to *delete* records of an\n * entity, restoring deleted ones is well within scope. The actual\n * re-create action additionally requires `CanCreate`; without it the\n * Restore button on each card disables with a tooltip.\n *\n * ### Soft deletes vs hard deletes\n *\n * This component only surfaces *hard*-deleted records. Soft-deletes (e.g.,\n * `IsDeleted` flags, `Status='Inactive'`, etc.) leave the record visible\n * in normal entity views, so the standard Record Changes panel + restore\n * preview already handles them — no Recycle Bin needed.\n *\n * ### Cancelable Before/After event surface\n *\n * Every meaningful action emits a paired `before*` / `after*` event. The\n * `before*` event carries `cancel: boolean` so consumers can intercept\n * — useful for custom approval workflows, audit logging, or to take over\n * the actual restore execution entirely. See {@link BeforeRecordRestoreEventArgs}\n * and friends.\n *\n * @example Basic usage (rare — usually embedded by entity-viewer)\n * <mj-recycle-bin\n * [Visible]=\"showBin\"\n * [EntityName]=\"'Customers'\"\n * (Closed)=\"showBin = false\"\n * (BeforeRecordRestore)=\"auditRestore($event)\"\n * (AfterRestoreCommit)=\"onRestored($event)\">\n * </mj-recycle-bin>\n *\n * @example Intercepting a restore\n * onBeforeRecordRestore(e: BeforeRecordRestoreEventArgs) {\n * if (!myCustomApproval(e.entry)) {\n * e.cancel = true;\n * e.cancelReason = 'Awaiting compliance approval';\n * }\n * }\n */\n@Component({\n standalone: false,\n selector: 'mj-recycle-bin',\n templateUrl: './recycle-bin.component.html',\n styleUrls: ['./recycle-bin.component.css'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class RecycleBinComponent implements OnInit {\n // ─── Inputs ─────────────────────────────────────────────────────\n\n /**\n * Controls panel visibility. Set to true to slide in (and trigger an\n * initial load); false to slide out.\n */\n private _visible = false;\n @Input()\n set Visible(value: boolean) {\n const wasVisible = this._visible;\n this._visible = value;\n if (value && !wasVisible && this.isInitialized) {\n this.LoadDeletedRecords();\n }\n }\n get Visible(): boolean {\n return this._visible;\n }\n\n /**\n * The name of the entity whose deleted records will be listed. Required.\n */\n @Input() EntityName: string | null = null;\n\n /**\n * Optional context user. When omitted, falls back to\n * {@link Metadata.Provider.CurrentUser} per standard MJ conventions.\n */\n @Input() ContextUser: UserInfo | null = null;\n\n /**\n * Maximum number of deleted-record cards to load. Defaults to 200 — this\n * is a UI affordance, not a hard limit; consumers needing pagination\n * should listen to {@link AfterRecycleBinOpen} and surface their own UI\n * if `deletedRecordCount === MaxRecords`.\n */\n @Input() MaxRecords = 200;\n\n // ─── Outputs ────────────────────────────────────────────────────\n\n /** Fires when the user closes the panel. */\n @Output() Closed = new EventEmitter<void>();\n\n /**\n * Cancelable. Fires when {@link Visible} flips to true and the bin is\n * about to query for deleted records. Setting `cancel = true` aborts\n * the query (and the panel will show the empty state).\n */\n @Output() BeforeRecycleBinOpen = new EventEmitter<BeforeRecycleBinOpenEventArgs>();\n\n /** Fires after the deleted-record query completes. */\n @Output() AfterRecycleBinOpen = new EventEmitter<AfterRecycleBinOpenEventArgs>();\n\n /**\n * Cancelable. Fires when the user clicks Restore on a deleted-record\n * card, before the preview panel opens. Setting `cancel = true` skips\n * the preview entirely — useful for consumers that want to take over\n * the restore flow themselves.\n */\n @Output() BeforeRecordRestore = new EventEmitter<BeforeRecordRestoreEventArgs>();\n\n /**\n * Fires after the user closes the restore preview, with `success`\n * indicating whether the actual insert worked.\n */\n @Output() AfterRecordRestore = new EventEmitter<AfterRecordRestoreEventArgs>();\n\n /**\n * Cancelable. Fires after the user clicks Restore in the preview but\n * before the entity is inserted. Setting `cancel = true` aborts the\n * insert.\n */\n @Output() BeforeRestoreCommit = new EventEmitter<BeforeRestoreCommitEventArgs>();\n\n /** Fires after the insert completes (success or failure). */\n @Output() AfterRestoreCommit = new EventEmitter<AfterRestoreCommitEventArgs>();\n\n // ─── Public template state ──────────────────────────────────────\n\n public IsLoading = false;\n public LoadError: string | null = null;\n public Entries: RecycleBinEntry[] = [];\n\n /** The currently selected entry whose preview is open. */\n public SelectedEntry: RecycleBinEntry | null = null;\n public PreviewVisible = false;\n\n /** Permission flags (computed once when EntityName is set). */\n public CanDelete = false;\n public CanCreate = false;\n\n private isInitialized = false;\n private resolvedEntityInfo: EntityInfo | null = null;\n\n constructor(private cdr: ChangeDetectorRef) {}\n\n ngOnInit(): void {\n this.isInitialized = true;\n if (this.Visible) this.LoadDeletedRecords();\n }\n\n // ─── Derived state ──────────────────────────────────────────────\n\n public get HeaderSubtitle(): string {\n if (!this.EntityName) return '';\n const n = this.Entries.length;\n return `${n} record${n === 1 ? '' : 's'} have been deleted from ${this.EntityName}.`;\n }\n\n /**\n * The user has Delete permission and may browse the bin. The Restore\n * button on each card additionally requires {@link CanCreate}.\n */\n public get HasAccess(): boolean {\n return this.CanDelete;\n }\n\n // ─── Public actions ─────────────────────────────────────────────\n\n /**\n * Manually trigger a re-load — useful for consumers who want to refresh\n * after some external event (e.g., a delete happened and they want the\n * bin to re-populate immediately).\n */\n public async LoadDeletedRecords(): Promise<void> {\n if (!this.EntityName) {\n this.LoadError = 'EntityName is required';\n return;\n }\n\n // Resolve metadata + permissions\n const md = new Metadata();\n const entityInfo = md.Entities.find(\n e => e.Name.trim().toLowerCase() === this.EntityName!.trim().toLowerCase(),\n );\n if (!entityInfo) {\n this.LoadError = `Entity '${this.EntityName}' not found`;\n this.cdr.markForCheck();\n return;\n }\n this.resolvedEntityInfo = entityInfo;\n const effectiveUser = this.ContextUser ?? md.CurrentUser;\n if (effectiveUser) {\n const perms = entityInfo.GetUserPermisions(effectiveUser);\n this.CanDelete = perms?.CanDelete ?? false;\n this.CanCreate = perms?.CanCreate ?? false;\n } else {\n this.CanDelete = false;\n this.CanCreate = false;\n }\n\n if (!this.CanDelete) {\n this.Entries = [];\n this.LoadError = 'You do not have Delete permission for this entity.';\n this.cdr.markForCheck();\n return;\n }\n\n // Fire BeforeRecycleBinOpen — consumer may cancel\n const beforeArgs: BeforeRecycleBinOpenEventArgs = {\n bin: this,\n timestamp: new Date(),\n entityName: this.EntityName,\n cancel: false,\n _kind: 'beforeRecycleBinOpen',\n };\n this.BeforeRecycleBinOpen.emit(beforeArgs);\n if (beforeArgs.cancel) {\n this.LoadError = beforeArgs.cancelReason ?? 'Cancelled by host';\n this.cdr.markForCheck();\n return;\n }\n\n this.IsLoading = true;\n this.LoadError = null;\n this.Entries = [];\n this.cdr.markForCheck();\n\n try {\n const rv = new RunView();\n // Get the most recent Delete change per RecordID. We over-fetch and\n // dedupe in JS — the data is small and SQL grouping with the latest\n // change per ID is awkward across dialects.\n const result = await rv.RunView<MJRecordChangeEntity>(\n {\n EntityName: 'MJ: Record Changes',\n ExtraFilter: `EntityID='${entityInfo.ID}' AND Type='Delete'`,\n OrderBy: 'ChangedAt DESC',\n MaxRows: this.MaxRecords * 2, // dedupe headroom\n ResultType: 'entity_object',\n },\n this.ContextUser ?? undefined,\n );\n\n if (!result.Success) {\n this.LoadError = result.ErrorMessage || 'Failed to load deleted records';\n } else {\n this.Entries = this.dedupeAndBuildEntries(result.Results, entityInfo);\n }\n } catch (e) {\n this.LoadError = e instanceof Error ? e.message : 'Unknown error';\n } finally {\n this.IsLoading = false;\n this.cdr.markForCheck();\n }\n\n // Fire AfterRecycleBinOpen\n this.AfterRecycleBinOpen.emit({\n bin: this,\n timestamp: new Date(),\n entityName: this.EntityName,\n deletedRecordCount: this.Entries.length,\n _kind: 'afterRecycleBinOpen',\n });\n }\n\n /**\n * User clicked Restore on a card — open the preview panel (unless a\n * BeforeRecordRestore handler cancelled).\n */\n public OnRestoreClicked(entry: RecycleBinEntry): void {\n if (!this.CanCreate) return; // gated in template too\n\n const beforeArgs: BeforeRecordRestoreEventArgs = {\n bin: this,\n timestamp: new Date(),\n entityName: this.EntityName ?? '',\n entry,\n cancel: false,\n _kind: 'beforeRecordRestore',\n };\n this.BeforeRecordRestore.emit(beforeArgs);\n if (beforeArgs.cancel) return;\n\n this.SelectedEntry = entry;\n this.PreviewVisible = true;\n this.cdr.markForCheck();\n }\n\n /**\n * Preview panel emitted RestoreConfirmed — perform the insert and emit\n * the matching after* events.\n */\n public async OnPreviewConfirmed(commit: RestoreCommitEvent): Promise<void> {\n if (!this.SelectedEntry || !this.resolvedEntityInfo) return;\n const entry = this.SelectedEntry;\n\n const beforeArgs: BeforeRestoreCommitEventArgs = {\n bin: this,\n timestamp: new Date(),\n entityName: this.EntityName ?? '',\n entry,\n fieldValues: commit.FieldValues,\n reason: commit.Reason,\n cancel: false,\n _kind: 'beforeRestoreCommit',\n };\n this.BeforeRestoreCommit.emit(beforeArgs);\n if (beforeArgs.cancel) {\n this.PreviewVisible = false;\n this.cdr.markForCheck();\n return;\n }\n\n let success = false;\n let errorMessage: string | undefined;\n let newRecordID: string | undefined;\n\n try {\n const md = new Metadata();\n const entity = await md.GetEntityObject(this.resolvedEntityInfo.Name, this.ContextUser ?? undefined);\n\n // Apply the snapshot fields, including the original primary key\n // (preserves any FK references that still point at this ID).\n for (const fv of commit.FieldValues) {\n entity.Set(fv.FieldName, fv.Value);\n }\n // Also re-apply the original primary key from the snapshot so dangling\n // FK references continue to work. Set() on a fresh entity treats this\n // as the new record's PK.\n try {\n const snapshotData = JSON.parse(entry.RecordChange.FullRecordJSON || '{}');\n for (const pk of this.resolvedEntityInfo.PrimaryKeys) {\n if (snapshotData[pk.Name] != null) {\n entity.Set(pk.Name, snapshotData[pk.Name]);\n }\n }\n } catch {\n // PK preservation is best-effort\n }\n\n entity.SetRestoreContext(commit.SourceChangeID, commit.Reason);\n\n try {\n success = await entity.Save();\n if (success) {\n newRecordID = entity.PrimaryKey.ToString();\n } else {\n errorMessage = entity.LatestResult?.CompleteMessage ?? 'Save returned false';\n }\n } finally {\n entity.ClearRestoreContext();\n }\n } catch (e) {\n success = false;\n errorMessage = e instanceof Error ? e.message : 'Unknown error';\n }\n\n this.AfterRestoreCommit.emit({\n bin: this,\n timestamp: new Date(),\n entityName: this.EntityName ?? '',\n entry,\n success,\n newRecordID,\n errorMessage,\n _kind: 'afterRestoreCommit',\n });\n\n this.AfterRecordRestore.emit({\n bin: this,\n timestamp: new Date(),\n entityName: this.EntityName ?? '',\n entry,\n success,\n errorMessage,\n _kind: 'afterRecordRestore',\n });\n\n if (success) {\n // Remove the restored entry from the list and close preview\n this.Entries = this.Entries.filter(e => e !== entry);\n }\n this.PreviewVisible = false;\n this.SelectedEntry = null;\n this.cdr.markForCheck();\n }\n\n public OnPreviewCancelled(): void {\n this.PreviewVisible = false;\n this.SelectedEntry = null;\n this.cdr.markForCheck();\n }\n\n public OnClose(): void {\n this._visible = false;\n this.cdr.markForCheck();\n this.Closed.emit();\n }\n\n // ─── Internal: build entries from raw RecordChange rows ─────────\n\n /**\n * Dedupes the raw delete-change rows: keeps only the most recent Delete\n * per RecordID (since a record could in principle have been recreated\n * and re-deleted). Builds the display fields heuristically by reading\n * the snapshot JSON.\n */\n private dedupeAndBuildEntries(\n rows: MJRecordChangeEntity[],\n entityInfo: EntityInfo,\n ): RecycleBinEntry[] {\n const seen = new Set<string>();\n const entries: RecycleBinEntry[] = [];\n\n for (const row of rows) {\n if (entries.length >= this.MaxRecords) break;\n if (seen.has(row.RecordID)) continue;\n seen.add(row.RecordID);\n\n const snapshot = this.parseSnapshot(row.FullRecordJSON);\n if (!snapshot) continue;\n\n const entry: RecycleBinEntry = {\n RecordChange: row,\n RecordID: row.RecordID,\n DisplaySummary: this.buildDisplaySummary(snapshot, entityInfo),\n SupportingFields: this.buildSupportingFields(snapshot, entityInfo),\n };\n entries.push(entry);\n }\n\n return entries;\n }\n\n /**\n * Builds the headline of the card. Prefers the entity's name field, then\n * any non-PK string field, then the RecordID itself as a last resort.\n */\n private buildDisplaySummary(snapshot: Record<string, unknown>, entityInfo: EntityInfo): string {\n const nameField = entityInfo.NameField;\n if (nameField && snapshot[nameField.Name] != null && snapshot[nameField.Name] !== '') {\n return String(snapshot[nameField.Name]);\n }\n // Fallback: first non-PK, non-empty string field\n for (const f of entityInfo.Fields) {\n if (f.IsPrimaryKey) continue;\n const v = snapshot[f.Name];\n if (typeof v === 'string' && v.trim().length > 0) return v;\n }\n return `Record ${snapshot[entityInfo.PrimaryKeys[0]?.Name] ?? ''}`;\n }\n\n /**\n * Picks up to 3 \"interesting\" fields from the snapshot to render as\n * supporting metadata under the headline. Heuristic: prefer fields that\n * are non-empty, non-PK, non-system, and have a display name.\n */\n private buildSupportingFields(\n snapshot: Record<string, unknown>,\n entityInfo: EntityInfo,\n ): Array<{ Name: string; DisplayName: string; Value: string }> {\n const out: Array<{ Name: string; DisplayName: string; Value: string }> = [];\n const nameFieldName = entityInfo.NameField?.Name;\n\n for (const f of entityInfo.Fields) {\n if (out.length >= 3) break;\n if (f.IsPrimaryKey) continue;\n if (f.Name.startsWith('__mj_')) continue;\n if (f.Name === nameFieldName) continue;\n\n const v = snapshot[f.Name];\n if (v == null || v === '') continue;\n\n out.push({\n Name: f.Name,\n DisplayName: f.DisplayNameOrName,\n Value: this.formatFieldValue(v, f),\n });\n }\n return out;\n }\n\n private formatFieldValue(value: unknown, _field: EntityFieldInfo): string {\n if (value == null) return '';\n if (typeof value === 'object') {\n try {\n return JSON.stringify(value);\n } catch {\n return String(value);\n }\n }\n return String(value);\n }\n\n private parseSnapshot(json: string | null | undefined): Record<string, unknown> | null {\n if (!json) return null;\n try {\n return JSON.parse(json) as Record<string, unknown>;\n } catch {\n return null;\n }\n }\n\n // ─── Display helpers (template) ─────────────────────────────────\n\n public formatTimestamp(date: Date | string | null): string {\n if (!date) return '';\n return new Intl.DateTimeFormat('en-US', {\n year: 'numeric',\n month: 'short',\n day: 'numeric',\n hour: 'numeric',\n minute: '2-digit',\n hour12: true,\n }).format(new Date(date));\n }\n\n public getUserDisplay(user: string | null): string {\n if (!user) return 'Unknown';\n if (user.includes('@')) return user.split('@')[0];\n return user;\n }\n}\n","<mj-slide-panel\n [Mode]=\"'slide'\"\n [Title]=\"'Recycle Bin · ' + (EntityName || '')\"\n [Visible]=\"Visible\"\n [Resizable]=\"true\"\n [MinWidthPx]=\"480\"\n [MaxWidthRatio]=\"0.6\"\n (Closed)=\"OnClose()\">\n\n <div class=\"rb-container\">\n\n <!-- Header -->\n <div class=\"rb-header\">\n <div class=\"rb-header-icon\">\n <i class=\"fa-solid fa-trash-can-arrow-up\" aria-hidden=\"true\"></i>\n </div>\n <div class=\"rb-header-text\">\n <div class=\"rb-header-title\">Recycle Bin</div>\n @if (EntityName) {\n <div class=\"rb-header-subtitle\">{{ HeaderSubtitle }}</div>\n }\n </div>\n </div>\n\n <!-- No-permission state -->\n @if (!IsLoading && LoadError && !HasAccess) {\n <div class=\"rb-state rb-state-denied\">\n <i class=\"fa-solid fa-lock\" aria-hidden=\"true\"></i>\n <h3>Access denied</h3>\n <p>{{ LoadError }}</p>\n </div>\n }\n\n <!-- Loading -->\n @if (IsLoading) {\n <mj-loading text=\"Loading deleted records...\" size=\"medium\"></mj-loading>\n }\n\n <!-- Generic error -->\n @if (!IsLoading && LoadError && HasAccess) {\n <div class=\"rb-state rb-state-error\">\n <i class=\"fa-solid fa-triangle-exclamation\" aria-hidden=\"true\"></i>\n <h3>Could not load deleted records</h3>\n <p>{{ LoadError }}</p>\n </div>\n }\n\n <!-- Empty state -->\n @if (!IsLoading && !LoadError && HasAccess && Entries.length === 0) {\n <div class=\"rb-state rb-state-empty\">\n <i class=\"fa-solid fa-trash-can\" aria-hidden=\"true\"></i>\n <h3>Recycle Bin is empty</h3>\n <p>No records have been deleted from this entity, or change tracking\n isn't enabled here.</p>\n </div>\n }\n\n <!-- Entries -->\n @if (!IsLoading && !LoadError && Entries.length > 0) {\n <div class=\"rb-list\">\n @for (entry of Entries; track entry.RecordChange.ID) {\n <div class=\"rb-card\">\n <div class=\"rb-card-info\">\n <div class=\"rb-card-name\">{{ entry.DisplaySummary }}</div>\n @if (entry.SupportingFields.length > 0) {\n <div class=\"rb-card-fields\">\n @for (sf of entry.SupportingFields; track sf.Name) {\n <span class=\"rb-card-field\">\n <strong>{{ sf.DisplayName }}:</strong> {{ sf.Value }}\n </span>\n }\n </div>\n }\n <div class=\"rb-card-meta\">\n <i class=\"fa-solid fa-trash\" aria-hidden=\"true\"></i>\n Deleted {{ formatTimestamp(entry.RecordChange.ChangedAt) }}\n @if (entry.RecordChange.User) {\n by {{ getUserDisplay(entry.RecordChange.User) }}\n }\n </div>\n </div>\n <div class=\"rb-card-actions\">\n <button class=\"rb-btn rb-btn-restore\"\n [disabled]=\"!CanCreate\"\n [title]=\"CanCreate ? 'Re-create this record from its snapshot' : 'You do not have Create permission for this entity'\"\n (click)=\"OnRestoreClicked(entry)\"\n type=\"button\">\n <i class=\"fa-solid fa-rotate-left\" aria-hidden=\"true\"></i>\n Restore\n </button>\n </div>\n </div>\n }\n </div>\n }\n\n </div>\n\n <!-- Restore preview slide-in (reused from ng-record-changes) -->\n <mj-restore-preview-panel\n [Visible]=\"PreviewVisible\"\n [Mode]=\"'undelete'\"\n [RecordChange]=\"SelectedEntry?.RecordChange ?? null\"\n [EntityName]=\"EntityName\"\n (RestoreConfirmed)=\"OnPreviewConfirmed($event)\"\n (RestoreCancelled)=\"OnPreviewCancelled()\">\n </mj-restore-preview-panel>\n\n</mj-slide-panel>\n"]}
1
+ {"version":3,"file":"recycle-bin.component.js","sourceRoot":"","sources":["../../../src/lib/recycle-bin/recycle-bin.component.ts","../../../src/lib/recycle-bin/recycle-bin.component.html"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,uBAAuB,EAEvB,Y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YAGD,cAEC;YAFD,yCAEC;YAGD,cAMC;YAND,4EAMC;YAGD,cAOC;YAPD,yGAOC;YAGD,cAoCC;YApCD,sFAoCC;YAMD,cAA0B;YAG1B,AADA,AADA,AADA,4CAA0B,oBACP,6FACiC,8BAC3B;;;iFDVhB,mBAAmB;cAR/B,SAAS;6BACI,KAAK,YACP,gBAAgB,mBAGT,uBAAuB,CAAC,MAAM,iBAChC,iBAAiB,CAAC,IAAI;;kBAUpC,KAAK;;kBAeL,KAAK;;kBAML,KAAK;;kBAQL,KAAK;;kBAKL,MAAM;;kBAON,MAAM;;kBAGN,MAAM;;kBAQN,MAAM;;kBAMN,MAAM;;kBAON,MAAM;;kBAGN,MAAM;;kFA5EI,mBAAmB","sourcesContent":["import {\n Component,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n EventEmitter,\n Input,\n OnInit,\n Output,\n ViewEncapsulation,\n} from '@angular/core';\nimport {\n EntityFieldInfo,\n EntityInfo,\n Metadata,\n RunView,\n UserInfo,\n} from '@memberjunction/core';\nimport { MJRecordChangeEntity } from '@memberjunction/core-entities';\nimport { BaseAngularComponent } from '@memberjunction/ng-base-types';\nimport { RestoreCommitEvent } from '@memberjunction/ng-record-changes';\nimport {\n AfterRecordRestoreEventArgs,\n AfterRecycleBinOpenEventArgs,\n AfterRestoreCommitEventArgs,\n BeforeRecordRestoreEventArgs,\n BeforeRecycleBinOpenEventArgs,\n BeforeRestoreCommitEventArgs,\n RecycleBinEntry,\n} from './events/recycle-bin-events';\n\n/**\n * Slide-in panel that lists all hard-deleted records for a single entity\n * and lets a user with `Delete` permission re-create any of them from its\n * historical RecordChange snapshot.\n *\n * ### When to use\n *\n * Surface this component from any entity-viewing context where the user\n * might need to restore a hard-deleted record. The {@link EntityViewerComponent},\n * {@link EntityDataGridComponent}, and {@link EntityCardsComponent}\n * already expose a `ShowRecycleBin` input (default `true`) that renders a\n * chip in their toolbar — you only need to use this component directly if\n * you're building a custom viewer.\n *\n * ### Permissions\n *\n * The chip / panel is gated on `entity.UserPermissions.CanDelete` —\n * rationale: there is no native \"undelete\" permission in MemberJunction,\n * but if a user has the higher-trust permission to *delete* records of an\n * entity, restoring deleted ones is well within scope. The actual\n * re-create action additionally requires `CanCreate`; without it the\n * Restore button on each card disables with a tooltip.\n *\n * ### Soft deletes vs hard deletes\n *\n * This component only surfaces *hard*-deleted records. Soft-deletes (e.g.,\n * `IsDeleted` flags, `Status='Inactive'`, etc.) leave the record visible\n * in normal entity views, so the standard Record Changes panel + restore\n * preview already handles them — no Recycle Bin needed.\n *\n * ### Cancelable Before/After event surface\n *\n * Every meaningful action emits a paired `before*` / `after*` event. The\n * `before*` event carries `cancel: boolean` so consumers can intercept\n * — useful for custom approval workflows, audit logging, or to take over\n * the actual restore execution entirely. See {@link BeforeRecordRestoreEventArgs}\n * and friends.\n *\n * @example Basic usage (rare — usually embedded by entity-viewer)\n * <mj-recycle-bin\n * [Visible]=\"showBin\"\n * [EntityName]=\"'Customers'\"\n * (Closed)=\"showBin = false\"\n * (BeforeRecordRestore)=\"auditRestore($event)\"\n * (AfterRestoreCommit)=\"onRestored($event)\">\n * </mj-recycle-bin>\n *\n * @example Intercepting a restore\n * onBeforeRecordRestore(e: BeforeRecordRestoreEventArgs) {\n * if (!myCustomApproval(e.entry)) {\n * e.cancel = true;\n * e.cancelReason = 'Awaiting compliance approval';\n * }\n * }\n */\n@Component({\n standalone: false,\n selector: 'mj-recycle-bin',\n templateUrl: './recycle-bin.component.html',\n styleUrls: ['./recycle-bin.component.css'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class RecycleBinComponent extends BaseAngularComponent implements OnInit {\n // ─── Inputs ─────────────────────────────────────────────────────\n\n /**\n * Controls panel visibility. Set to true to slide in (and trigger an\n * initial load); false to slide out.\n */\n private _visible = false;\n @Input()\n set Visible(value: boolean) {\n const wasVisible = this._visible;\n this._visible = value;\n if (value && !wasVisible && this.isInitialized) {\n this.LoadDeletedRecords();\n }\n }\n get Visible(): boolean {\n return this._visible;\n }\n\n /**\n * The name of the entity whose deleted records will be listed. Required.\n */\n @Input() EntityName: string | null = null;\n\n /**\n * Optional context user. When omitted, falls back to\n * {@link this.ProviderToUse.CurrentUser} per standard MJ conventions.\n */\n @Input() ContextUser: UserInfo | null = null;\n\n /**\n * Maximum number of deleted-record cards to load. Defaults to 200 — this\n * is a UI affordance, not a hard limit; consumers needing pagination\n * should listen to {@link AfterRecycleBinOpen} and surface their own UI\n * if `deletedRecordCount === MaxRecords`.\n */\n @Input() MaxRecords = 200;\n\n // ─── Outputs ────────────────────────────────────────────────────\n\n /** Fires when the user closes the panel. */\n @Output() Closed = new EventEmitter<void>();\n\n /**\n * Cancelable. Fires when {@link Visible} flips to true and the bin is\n * about to query for deleted records. Setting `cancel = true` aborts\n * the query (and the panel will show the empty state).\n */\n @Output() BeforeRecycleBinOpen = new EventEmitter<BeforeRecycleBinOpenEventArgs>();\n\n /** Fires after the deleted-record query completes. */\n @Output() AfterRecycleBinOpen = new EventEmitter<AfterRecycleBinOpenEventArgs>();\n\n /**\n * Cancelable. Fires when the user clicks Restore on a deleted-record\n * card, before the preview panel opens. Setting `cancel = true` skips\n * the preview entirely — useful for consumers that want to take over\n * the restore flow themselves.\n */\n @Output() BeforeRecordRestore = new EventEmitter<BeforeRecordRestoreEventArgs>();\n\n /**\n * Fires after the user closes the restore preview, with `success`\n * indicating whether the actual insert worked.\n */\n @Output() AfterRecordRestore = new EventEmitter<AfterRecordRestoreEventArgs>();\n\n /**\n * Cancelable. Fires after the user clicks Restore in the preview but\n * before the entity is inserted. Setting `cancel = true` aborts the\n * insert.\n */\n @Output() BeforeRestoreCommit = new EventEmitter<BeforeRestoreCommitEventArgs>();\n\n /** Fires after the insert completes (success or failure). */\n @Output() AfterRestoreCommit = new EventEmitter<AfterRestoreCommitEventArgs>();\n\n // ─── Public template state ──────────────────────────────────────\n\n public IsLoading = false;\n public LoadError: string | null = null;\n public Entries: RecycleBinEntry[] = [];\n\n /** The currently selected entry whose preview is open. */\n public SelectedEntry: RecycleBinEntry | null = null;\n public PreviewVisible = false;\n\n /** Permission flags (computed once when EntityName is set). */\n public CanDelete = false;\n public CanCreate = false;\n\n private isInitialized = false;\n private resolvedEntityInfo: EntityInfo | null = null;\n\n constructor(private cdr: ChangeDetectorRef) {\n super();}\n\n ngOnInit(): void {\n this.isInitialized = true;\n if (this.Visible) this.LoadDeletedRecords();\n }\n\n // ─── Derived state ──────────────────────────────────────────────\n\n public get HeaderSubtitle(): string {\n if (!this.EntityName) return '';\n const n = this.Entries.length;\n return `${n} record${n === 1 ? '' : 's'} have been deleted from ${this.EntityName}.`;\n }\n\n /**\n * The user has Delete permission and may browse the bin. The Restore\n * button on each card additionally requires {@link CanCreate}.\n */\n public get HasAccess(): boolean {\n return this.CanDelete;\n }\n\n // ─── Public actions ─────────────────────────────────────────────\n\n /**\n * Manually trigger a re-load — useful for consumers who want to refresh\n * after some external event (e.g., a delete happened and they want the\n * bin to re-populate immediately).\n */\n public async LoadDeletedRecords(): Promise<void> {\n if (!this.EntityName) {\n this.LoadError = 'EntityName is required';\n return;\n }\n\n // Resolve metadata + permissions\n const md = this.ProviderToUse;\n const entityInfo = md.Entities.find(\n e => e.Name.trim().toLowerCase() === this.EntityName!.trim().toLowerCase(),\n );\n if (!entityInfo) {\n this.LoadError = `Entity '${this.EntityName}' not found`;\n this.cdr.markForCheck();\n return;\n }\n this.resolvedEntityInfo = entityInfo;\n const effectiveUser = this.ContextUser ?? md.CurrentUser;\n if (effectiveUser) {\n const perms = entityInfo.GetUserPermisions(effectiveUser);\n this.CanDelete = perms?.CanDelete ?? false;\n this.CanCreate = perms?.CanCreate ?? false;\n } else {\n this.CanDelete = false;\n this.CanCreate = false;\n }\n\n if (!this.CanDelete) {\n this.Entries = [];\n this.LoadError = 'You do not have Delete permission for this entity.';\n this.cdr.markForCheck();\n return;\n }\n\n // Fire BeforeRecycleBinOpen — consumer may cancel\n const beforeArgs: BeforeRecycleBinOpenEventArgs = {\n bin: this,\n timestamp: new Date(),\n entityName: this.EntityName,\n cancel: false,\n _kind: 'beforeRecycleBinOpen',\n };\n this.BeforeRecycleBinOpen.emit(beforeArgs);\n if (beforeArgs.cancel) {\n this.LoadError = beforeArgs.cancelReason ?? 'Cancelled by host';\n this.cdr.markForCheck();\n return;\n }\n\n this.IsLoading = true;\n this.LoadError = null;\n this.Entries = [];\n this.cdr.markForCheck();\n\n try {\n const rv = RunView.FromMetadataProvider(this.ProviderToUse);\n // Get the most recent Delete change per RecordID. We over-fetch and\n // dedupe in JS — the data is small and SQL grouping with the latest\n // change per ID is awkward across dialects.\n const result = await rv.RunView<MJRecordChangeEntity>(\n {\n EntityName: 'MJ: Record Changes',\n ExtraFilter: `EntityID='${entityInfo.ID}' AND Type='Delete'`,\n OrderBy: 'ChangedAt DESC',\n MaxRows: this.MaxRecords * 2, // dedupe headroom\n ResultType: 'entity_object',\n },\n this.ContextUser ?? undefined,\n );\n\n if (!result.Success) {\n this.LoadError = result.ErrorMessage || 'Failed to load deleted records';\n } else {\n this.Entries = this.dedupeAndBuildEntries(result.Results, entityInfo);\n }\n } catch (e) {\n this.LoadError = e instanceof Error ? e.message : 'Unknown error';\n } finally {\n this.IsLoading = false;\n this.cdr.markForCheck();\n }\n\n // Fire AfterRecycleBinOpen\n this.AfterRecycleBinOpen.emit({\n bin: this,\n timestamp: new Date(),\n entityName: this.EntityName,\n deletedRecordCount: this.Entries.length,\n _kind: 'afterRecycleBinOpen',\n });\n }\n\n /**\n * User clicked Restore on a card — open the preview panel (unless a\n * BeforeRecordRestore handler cancelled).\n */\n public OnRestoreClicked(entry: RecycleBinEntry): void {\n if (!this.CanCreate) return; // gated in template too\n\n const beforeArgs: BeforeRecordRestoreEventArgs = {\n bin: this,\n timestamp: new Date(),\n entityName: this.EntityName ?? '',\n entry,\n cancel: false,\n _kind: 'beforeRecordRestore',\n };\n this.BeforeRecordRestore.emit(beforeArgs);\n if (beforeArgs.cancel) return;\n\n this.SelectedEntry = entry;\n this.PreviewVisible = true;\n this.cdr.markForCheck();\n }\n\n /**\n * Preview panel emitted RestoreConfirmed — perform the insert and emit\n * the matching after* events.\n */\n public async OnPreviewConfirmed(commit: RestoreCommitEvent): Promise<void> {\n if (!this.SelectedEntry || !this.resolvedEntityInfo) return;\n const entry = this.SelectedEntry;\n\n const beforeArgs: BeforeRestoreCommitEventArgs = {\n bin: this,\n timestamp: new Date(),\n entityName: this.EntityName ?? '',\n entry,\n fieldValues: commit.FieldValues,\n reason: commit.Reason,\n cancel: false,\n _kind: 'beforeRestoreCommit',\n };\n this.BeforeRestoreCommit.emit(beforeArgs);\n if (beforeArgs.cancel) {\n this.PreviewVisible = false;\n this.cdr.markForCheck();\n return;\n }\n\n let success = false;\n let errorMessage: string | undefined;\n let newRecordID: string | undefined;\n\n try {\n const md = this.ProviderToUse;\n const entity = await md.GetEntityObject(this.resolvedEntityInfo.Name, this.ContextUser ?? undefined);\n\n // Apply the snapshot fields, including the original primary key\n // (preserves any FK references that still point at this ID).\n for (const fv of commit.FieldValues) {\n entity.Set(fv.FieldName, fv.Value);\n }\n // Also re-apply the original primary key from the snapshot so dangling\n // FK references continue to work. Set() on a fresh entity treats this\n // as the new record's PK.\n try {\n const snapshotData = JSON.parse(entry.RecordChange.FullRecordJSON || '{}');\n for (const pk of this.resolvedEntityInfo.PrimaryKeys) {\n if (snapshotData[pk.Name] != null) {\n entity.Set(pk.Name, snapshotData[pk.Name]);\n }\n }\n } catch {\n // PK preservation is best-effort\n }\n\n entity.SetRestoreContext(commit.SourceChangeID, commit.Reason);\n\n try {\n success = await entity.Save();\n if (success) {\n newRecordID = entity.PrimaryKey.ToString();\n } else {\n errorMessage = entity.LatestResult?.CompleteMessage ?? 'Save returned false';\n }\n } finally {\n entity.ClearRestoreContext();\n }\n } catch (e) {\n success = false;\n errorMessage = e instanceof Error ? e.message : 'Unknown error';\n }\n\n this.AfterRestoreCommit.emit({\n bin: this,\n timestamp: new Date(),\n entityName: this.EntityName ?? '',\n entry,\n success,\n newRecordID,\n errorMessage,\n _kind: 'afterRestoreCommit',\n });\n\n this.AfterRecordRestore.emit({\n bin: this,\n timestamp: new Date(),\n entityName: this.EntityName ?? '',\n entry,\n success,\n errorMessage,\n _kind: 'afterRecordRestore',\n });\n\n if (success) {\n // Remove the restored entry from the list and close preview\n this.Entries = this.Entries.filter(e => e !== entry);\n }\n this.PreviewVisible = false;\n this.SelectedEntry = null;\n this.cdr.markForCheck();\n }\n\n public OnPreviewCancelled(): void {\n this.PreviewVisible = false;\n this.SelectedEntry = null;\n this.cdr.markForCheck();\n }\n\n public OnClose(): void {\n this._visible = false;\n this.cdr.markForCheck();\n this.Closed.emit();\n }\n\n // ─── Internal: build entries from raw RecordChange rows ─────────\n\n /**\n * Dedupes the raw delete-change rows: keeps only the most recent Delete\n * per RecordID (since a record could in principle have been recreated\n * and re-deleted). Builds the display fields heuristically by reading\n * the snapshot JSON.\n */\n private dedupeAndBuildEntries(\n rows: MJRecordChangeEntity[],\n entityInfo: EntityInfo,\n ): RecycleBinEntry[] {\n const seen = new Set<string>();\n const entries: RecycleBinEntry[] = [];\n\n for (const row of rows) {\n if (entries.length >= this.MaxRecords) break;\n if (seen.has(row.RecordID)) continue;\n seen.add(row.RecordID);\n\n const snapshot = this.parseSnapshot(row.FullRecordJSON);\n if (!snapshot) continue;\n\n const entry: RecycleBinEntry = {\n RecordChange: row,\n RecordID: row.RecordID,\n DisplaySummary: this.buildDisplaySummary(snapshot, entityInfo),\n SupportingFields: this.buildSupportingFields(snapshot, entityInfo),\n };\n entries.push(entry);\n }\n\n return entries;\n }\n\n /**\n * Builds the headline of the card. Prefers the entity's name field, then\n * any non-PK string field, then the RecordID itself as a last resort.\n */\n private buildDisplaySummary(snapshot: Record<string, unknown>, entityInfo: EntityInfo): string {\n const nameField = entityInfo.NameField;\n if (nameField && snapshot[nameField.Name] != null && snapshot[nameField.Name] !== '') {\n return String(snapshot[nameField.Name]);\n }\n // Fallback: first non-PK, non-empty string field\n for (const f of entityInfo.Fields) {\n if (f.IsPrimaryKey) continue;\n const v = snapshot[f.Name];\n if (typeof v === 'string' && v.trim().length > 0) return v;\n }\n return `Record ${snapshot[entityInfo.PrimaryKeys[0]?.Name] ?? ''}`;\n }\n\n /**\n * Picks up to 3 \"interesting\" fields from the snapshot to render as\n * supporting metadata under the headline. Heuristic: prefer fields that\n * are non-empty, non-PK, non-system, and have a display name.\n */\n private buildSupportingFields(\n snapshot: Record<string, unknown>,\n entityInfo: EntityInfo,\n ): Array<{ Name: string; DisplayName: string; Value: string }> {\n const out: Array<{ Name: string; DisplayName: string; Value: string }> = [];\n const nameFieldName = entityInfo.NameField?.Name;\n\n for (const f of entityInfo.Fields) {\n if (out.length >= 3) break;\n if (f.IsPrimaryKey) continue;\n if (f.Name.startsWith('__mj_')) continue;\n if (f.Name === nameFieldName) continue;\n\n const v = snapshot[f.Name];\n if (v == null || v === '') continue;\n\n out.push({\n Name: f.Name,\n DisplayName: f.DisplayNameOrName,\n Value: this.formatFieldValue(v, f),\n });\n }\n return out;\n }\n\n private formatFieldValue(value: unknown, _field: EntityFieldInfo): string {\n if (value == null) return '';\n if (typeof value === 'object') {\n try {\n return JSON.stringify(value);\n } catch {\n return String(value);\n }\n }\n return String(value);\n }\n\n private parseSnapshot(json: string | null | undefined): Record<string, unknown> | null {\n if (!json) return null;\n try {\n return JSON.parse(json) as Record<string, unknown>;\n } catch {\n return null;\n }\n }\n\n // ─── Display helpers (template) ─────────────────────────────────\n\n public formatTimestamp(date: Date | string | null): string {\n if (!date) return '';\n return new Intl.DateTimeFormat('en-US', {\n year: 'numeric',\n month: 'short',\n day: 'numeric',\n hour: 'numeric',\n minute: '2-digit',\n hour12: true,\n }).format(new Date(date));\n }\n\n public getUserDisplay(user: string | null): string {\n if (!user) return 'Unknown';\n if (user.includes('@')) return user.split('@')[0];\n return user;\n }\n}\n","<mj-slide-panel\n [Mode]=\"'slide'\"\n [Title]=\"'Recycle Bin · ' + (EntityName || '')\"\n [Visible]=\"Visible\"\n [Resizable]=\"true\"\n [MinWidthPx]=\"480\"\n [MaxWidthRatio]=\"0.6\"\n (Closed)=\"OnClose()\">\n\n <div class=\"rb-container\">\n\n <!-- Header -->\n <div class=\"rb-header\">\n <div class=\"rb-header-icon\">\n <i class=\"fa-solid fa-trash-can-arrow-up\" aria-hidden=\"true\"></i>\n </div>\n <div class=\"rb-header-text\">\n <div class=\"rb-header-title\">Recycle Bin</div>\n @if (EntityName) {\n <div class=\"rb-header-subtitle\">{{ HeaderSubtitle }}</div>\n }\n </div>\n </div>\n\n <!-- No-permission state -->\n @if (!IsLoading && LoadError && !HasAccess) {\n <div class=\"rb-state rb-state-denied\">\n <i class=\"fa-solid fa-lock\" aria-hidden=\"true\"></i>\n <h3>Access denied</h3>\n <p>{{ LoadError }}</p>\n </div>\n }\n\n <!-- Loading -->\n @if (IsLoading) {\n <mj-loading text=\"Loading deleted records...\" size=\"medium\"></mj-loading>\n }\n\n <!-- Generic error -->\n @if (!IsLoading && LoadError && HasAccess) {\n <div class=\"rb-state rb-state-error\">\n <i class=\"fa-solid fa-triangle-exclamation\" aria-hidden=\"true\"></i>\n <h3>Could not load deleted records</h3>\n <p>{{ LoadError }}</p>\n </div>\n }\n\n <!-- Empty state -->\n @if (!IsLoading && !LoadError && HasAccess && Entries.length === 0) {\n <div class=\"rb-state rb-state-empty\">\n <i class=\"fa-solid fa-trash-can\" aria-hidden=\"true\"></i>\n <h3>Recycle Bin is empty</h3>\n <p>No records have been deleted from this entity, or change tracking\n isn't enabled here.</p>\n </div>\n }\n\n <!-- Entries -->\n @if (!IsLoading && !LoadError && Entries.length > 0) {\n <div class=\"rb-list\">\n @for (entry of Entries; track entry.RecordChange.ID) {\n <div class=\"rb-card\">\n <div class=\"rb-card-info\">\n <div class=\"rb-card-name\">{{ entry.DisplaySummary }}</div>\n @if (entry.SupportingFields.length > 0) {\n <div class=\"rb-card-fields\">\n @for (sf of entry.SupportingFields; track sf.Name) {\n <span class=\"rb-card-field\">\n <strong>{{ sf.DisplayName }}:</strong> {{ sf.Value }}\n </span>\n }\n </div>\n }\n <div class=\"rb-card-meta\">\n <i class=\"fa-solid fa-trash\" aria-hidden=\"true\"></i>\n Deleted {{ formatTimestamp(entry.RecordChange.ChangedAt) }}\n @if (entry.RecordChange.User) {\n by {{ getUserDisplay(entry.RecordChange.User) }}\n }\n </div>\n </div>\n <div class=\"rb-card-actions\">\n <button class=\"rb-btn rb-btn-restore\"\n [disabled]=\"!CanCreate\"\n [title]=\"CanCreate ? 'Re-create this record from its snapshot' : 'You do not have Create permission for this entity'\"\n (click)=\"OnRestoreClicked(entry)\"\n type=\"button\">\n <i class=\"fa-solid fa-rotate-left\" aria-hidden=\"true\"></i>\n Restore\n </button>\n </div>\n </div>\n }\n </div>\n }\n\n </div>\n\n <!-- Restore preview slide-in (reused from ng-record-changes) -->\n <mj-restore-preview-panel\n [Visible]=\"PreviewVisible\"\n [Mode]=\"'undelete'\"\n [RecordChange]=\"SelectedEntry?.RecordChange ?? null\"\n [EntityName]=\"EntityName\"\n (RestoreConfirmed)=\"OnPreviewConfirmed($event)\"\n (RestoreCancelled)=\"OnPreviewCancelled()\">\n </mj-restore-preview-panel>\n\n</mj-slide-panel>\n"]}
@@ -1,4 +1,5 @@
1
1
  import { EventEmitter, OnChanges, OnInit, SimpleChanges, ChangeDetectorRef } from '@angular/core';
2
+ import { BaseAngularComponent } from '@memberjunction/ng-base-types';
2
3
  import { EntityInfo, EntityFieldInfo } from '@memberjunction/core';
3
4
  import { MJUserViewEntityExtended, ViewGridState, MJUserViewEntity_IColumnFormat as ColumnFormat, MJUserViewEntity_IColumnTextStyle as ColumnTextStyle, MJUserViewEntity_IGridAggregatesConfig as ViewGridAggregatesConfig, MJUserViewEntity_IGridAggregate as ViewGridAggregate } from '@memberjunction/core-entities';
4
5
  import { CompositeFilterDescriptor, FilterFieldInfo } from '@memberjunction/ng-filter-builder';
@@ -61,7 +62,7 @@ export interface ViewSaveEvent {
61
62
  * - Share settings
62
63
  * - Save / Save As New / Cancel actions
63
64
  */
64
- export declare class ViewConfigPanelComponent implements OnInit, OnChanges {
65
+ export declare class ViewConfigPanelComponent extends BaseAngularComponent implements OnInit, OnChanges {
65
66
  private cdr;
66
67
  /**
67
68
  * The entity being viewed
@@ -1 +1 @@
1
- {"version":3,"file":"view-config-panel.component.d.ts","sourceRoot":"","sources":["../../../src/lib/view-config-panel/view-config-panel.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,YAAY,EAAE,SAAS,EAAE,MAAM,EAAE,aAAa,EAAE,iBAAiB,EAAgB,MAAM,eAAe,CAAC;AAC1I,OAAO,EAAE,UAAU,EAAE,eAAe,EAAY,MAAM,sBAAsB,CAAC;AAC7E,OAAO,EACL,wBAAwB,EAExB,aAAa,EAEb,8BAA8B,IAAI,YAAY,EAC9C,iCAAiC,IAAI,eAAe,EAEpD,sCAAsC,IAAI,wBAAwB,EAClE,+BAA+B,IAAI,iBAAiB,EAGrD,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,yBAAyB,EACzB,eAAe,EAGhB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;;AAE7C;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,iDAAiD;IACjD,WAAW,EAAE,MAAM,CAAC;IACpB,wEAAwE;IACxE,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,eAAe,CAAC;IACvB,sCAAsC;IACtC,MAAM,CAAC,EAAE,YAAY,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,QAAQ;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,KAAK,GAAG,MAAM,CAAC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AAiB,GAAG,IAAI;IAWrD;;OAEG;IACH,IAAI,sBAAsB,IAAI,MAAM,CAEnC;IAED;;OAEG;IACH,IAAI,cAAc,IAAI,iBAAiB,EAAE,CAExC;IAED;;OAEG;IACH,IAAI,gBAAgB,IAAI,iBAAiB,EAAE,CAE1C;IAED;;OAEG;IACH,OAAO,CAAC,qBAAqB;yCAltDlB,wBAAwB;2CAAxB,wBAAwB;CA0tDpC"}
1
+ {"version":3,"file":"view-config-panel.component.d.ts","sourceRoot":"","sources":["../../../src/lib/view-config-panel/view-config-panel.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,YAAY,EAAE,SAAS,EAAE,MAAM,EAAE,aAAa,EAAE,iBAAiB,EAAgB,MAAM,eAAe,CAAC;AAC1I,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EAAE,UAAU,EAAE,eAAe,EAAY,MAAM,sBAAsB,CAAC;AAC7E,OAAO,EACL,wBAAwB,EAExB,aAAa,EAEb,8BAA8B,IAAI,YAAY,EAC9C,iCAAiC,IAAI,eAAe,EAEpD,sCAAsC,IAAI,wBAAwB,EAClE,+BAA+B,IAAI,iBAAiB,EAGrD,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,yBAAyB,EACzB,eAAe,EAGhB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;;AAE7C;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,iDAAiD;IACjD,WAAW,EAAE,MAAM,CAAC;IACpB,wEAAwE;IACxE,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,eAAe,CAAC;IACvB,sCAAsC;IACtC,MAAM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