@memberjunction/ng-base-forms 6.2.0-edge.5 → 6.2.0-edge.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (95) hide show
  1. package/README.md +195 -2
  2. package/dist/lib/base-form-component.d.ts +23 -1
  3. package/dist/lib/base-form-component.d.ts.map +1 -1
  4. package/dist/lib/base-form-component.js +54 -10
  5. package/dist/lib/base-form-component.js.map +1 -1
  6. package/dist/lib/chrome/form-composition-snapshot.d.ts +52 -0
  7. package/dist/lib/chrome/form-composition-snapshot.d.ts.map +1 -1
  8. package/dist/lib/chrome/form-composition-snapshot.js +4 -0
  9. package/dist/lib/chrome/form-composition-snapshot.js.map +1 -1
  10. package/dist/lib/container/record-form-container.component.d.ts +107 -1
  11. package/dist/lib/container/record-form-container.component.d.ts.map +1 -1
  12. package/dist/lib/container/record-form-container.component.js +1494 -316
  13. package/dist/lib/container/record-form-container.component.js.map +1 -1
  14. package/dist/lib/field/form-field.component.d.ts +159 -14
  15. package/dist/lib/field/form-field.component.d.ts.map +1 -1
  16. package/dist/lib/field/form-field.component.js +1360 -469
  17. package/dist/lib/field/form-field.component.js.map +1 -1
  18. package/dist/lib/form-record-refresh.coordinator.d.ts +124 -0
  19. package/dist/lib/form-record-refresh.coordinator.d.ts.map +1 -1
  20. package/dist/lib/form-record-refresh.coordinator.js +93 -13
  21. package/dist/lib/form-record-refresh.coordinator.js.map +1 -1
  22. package/dist/lib/host/entity-form-host.component.d.ts +104 -2
  23. package/dist/lib/host/entity-form-host.component.d.ts.map +1 -1
  24. package/dist/lib/host/entity-form-host.component.js +272 -34
  25. package/dist/lib/host/entity-form-host.component.js.map +1 -1
  26. package/dist/lib/isa-related-panel/isa-related-card.component.js +7 -4
  27. package/dist/lib/isa-related-panel/isa-related-card.component.js.map +1 -1
  28. package/dist/lib/isa-related-panel/isa-related-panel.component.js +1 -2
  29. package/dist/lib/isa-related-panel/isa-related-panel.component.js.map +1 -1
  30. package/dist/lib/links/record-link-utils.d.ts +83 -0
  31. package/dist/lib/links/record-link-utils.d.ts.map +1 -0
  32. package/dist/lib/links/record-link-utils.js +232 -0
  33. package/dist/lib/links/record-link-utils.js.map +1 -0
  34. package/dist/lib/links/record-link.component.d.ts +50 -0
  35. package/dist/lib/links/record-link.component.d.ts.map +1 -0
  36. package/dist/lib/links/record-link.component.js +319 -0
  37. package/dist/lib/links/record-link.component.js.map +1 -0
  38. package/dist/lib/links/record-link.directive.d.ts +94 -0
  39. package/dist/lib/links/record-link.directive.d.ts.map +1 -0
  40. package/dist/lib/links/record-link.directive.js +277 -0
  41. package/dist/lib/links/record-link.directive.js.map +1 -0
  42. package/dist/lib/links/record-links-drawer.component.d.ts +21 -0
  43. package/dist/lib/links/record-links-drawer.component.d.ts.map +1 -0
  44. package/dist/lib/links/record-links-drawer.component.js +61 -0
  45. package/dist/lib/links/record-links-drawer.component.js.map +1 -0
  46. package/dist/lib/links/record-links.component.d.ts +249 -0
  47. package/dist/lib/links/record-links.component.d.ts.map +1 -0
  48. package/dist/lib/links/record-links.component.js +1523 -0
  49. package/dist/lib/links/record-links.component.js.map +1 -0
  50. package/dist/lib/panel-slot/form-field-panel-slot.component.d.ts.map +1 -1
  51. package/dist/lib/panel-slot/form-field-panel-slot.component.js +3 -1
  52. package/dist/lib/panel-slot/form-field-panel-slot.component.js.map +1 -1
  53. package/dist/lib/panel-slot/form-panel-slot.component.d.ts.map +1 -1
  54. package/dist/lib/panel-slot/form-panel-slot.component.js +6 -0
  55. package/dist/lib/panel-slot/form-panel-slot.component.js.map +1 -1
  56. package/dist/lib/preview-popover/record-preview-popover.component.d.ts +187 -0
  57. package/dist/lib/preview-popover/record-preview-popover.component.d.ts.map +1 -0
  58. package/dist/lib/preview-popover/record-preview-popover.component.js +1060 -0
  59. package/dist/lib/preview-popover/record-preview-popover.component.js.map +1 -0
  60. package/dist/lib/preview-popover/record-preview-popover.service.d.ts +105 -0
  61. package/dist/lib/preview-popover/record-preview-popover.service.d.ts.map +1 -0
  62. package/dist/lib/preview-popover/record-preview-popover.service.js +278 -0
  63. package/dist/lib/preview-popover/record-preview-popover.service.js.map +1 -0
  64. package/dist/lib/resolver/form-resolver.service.d.ts +44 -1
  65. package/dist/lib/resolver/form-resolver.service.d.ts.map +1 -1
  66. package/dist/lib/resolver/form-resolver.service.js +51 -3
  67. package/dist/lib/resolver/form-resolver.service.js.map +1 -1
  68. package/dist/lib/toolbar/actions/record-links-toolbar-action.d.ts +21 -0
  69. package/dist/lib/toolbar/actions/record-links-toolbar-action.d.ts.map +1 -0
  70. package/dist/lib/toolbar/actions/record-links-toolbar-action.js +90 -0
  71. package/dist/lib/toolbar/actions/record-links-toolbar-action.js.map +1 -0
  72. package/dist/lib/toolbar/base-form-toolbar-action.d.ts +189 -0
  73. package/dist/lib/toolbar/base-form-toolbar-action.d.ts.map +1 -0
  74. package/dist/lib/toolbar/base-form-toolbar-action.js +274 -0
  75. package/dist/lib/toolbar/base-form-toolbar-action.js.map +1 -0
  76. package/dist/lib/toolbar/form-toolbar.component.d.ts +21 -1
  77. package/dist/lib/toolbar/form-toolbar.component.d.ts.map +1 -1
  78. package/dist/lib/toolbar/form-toolbar.component.js +295 -195
  79. package/dist/lib/toolbar/form-toolbar.component.js.map +1 -1
  80. package/dist/lib/types/form-toolbar-item.d.ts +1 -1
  81. package/dist/lib/types/form-toolbar-item.d.ts.map +1 -1
  82. package/dist/lib/types/form-toolbar-item.js.map +1 -1
  83. package/dist/lib/types/toolbar-config.d.ts +4 -0
  84. package/dist/lib/types/toolbar-config.d.ts.map +1 -1
  85. package/dist/lib/types/toolbar-config.js +6 -0
  86. package/dist/lib/types/toolbar-config.js.map +1 -1
  87. package/dist/module.d.ts +19 -14
  88. package/dist/module.d.ts.map +1 -1
  89. package/dist/module.js +39 -6
  90. package/dist/module.js.map +1 -1
  91. package/dist/public-api.d.ts +9 -0
  92. package/dist/public-api.d.ts.map +1 -1
  93. package/dist/public-api.js +9 -0
  94. package/dist/public-api.js.map +1 -1
  95. package/package.json +20 -20
@@ -0,0 +1,277 @@
1
+ import { ChangeDetectorRef, Directive, ElementRef, EventEmitter, HostBinding, HostListener, Input, Output, inject } from '@angular/core';
2
+ import { MjRecordPreviewPopoverService } from '../preview-popover/record-preview-popover.service';
3
+ import { MjRecordFormContainerComponent } from '../container/record-form-container.component';
4
+ import { FormPanelSlotComponent } from '../panel-slot/form-panel-slot.component';
5
+ import { FormFieldPanelSlotComponent } from '../panel-slot/form-field-panel-slot.component';
6
+ import { ApplyQuickEditToHostRecord, ResolveLinkMetadataProvider, ResolveRecordLinkTarget } from './record-link-utils';
7
+ import * as i0 from "@angular/core";
8
+ let nextDirectiveId = 1;
9
+ /**
10
+ * Declarative `[mjRecordLink]` directive that attaches MemberJunction's full record-linking UX
11
+ * to any `<button>`, `<a>`, `<span>`, or chip element:
12
+ * - **Hover-intent preview popover** (`<mj-record-preview-popover>`) with summary fields and status badge
13
+ * - **Inline Quick Edit** inside the hover popover with automatic propagation back to virtual display fields on `Record`
14
+ * - **Standard & Polymorphic FK resolution** (`EntityField.RelatedEntity` + `EntityField.EntityIDFieldName`)
15
+ * - **Click & Ctrl/Cmd+Click navigation** (`FormNavigationEvent` with `OpenInNewTab`)
16
+ *
17
+ * ### Usage Modes
18
+ * 1. **Field-Driven Mode** (resolves target entity, PK, and companion virtual display field from `Record` metadata):
19
+ * ```html
20
+ * <button type="button" [mjRecordLink]="Record" FieldName="CurrentOrganizationID" (Navigate)="Navigate.emit($event)">
21
+ * {{ Record.CurrentOrganizationName }}
22
+ * </button>
23
+ * ```
24
+ * 2. **Direct Mode** (explicit `EntityName` and `RecordID` or `PrimaryKey`):
25
+ * ```html
26
+ * <button type="button" mjRecordLink [EntityName]="'MJ_BizApps_Common: People'" [RecordID]="row.PersonID">
27
+ * {{ row.PersonName }}
28
+ * </button>
29
+ * ```
30
+ */
31
+ export class MjRecordLinkDirective {
32
+ hostEl = inject(ElementRef);
33
+ cdr = inject(ChangeDetectorRef);
34
+ previewService = inject(MjRecordPreviewPopoverService);
35
+ formContainer = inject(MjRecordFormContainerComponent, { optional: true });
36
+ panelSlot = inject(FormPanelSlotComponent, { optional: true });
37
+ fieldPanelSlot = inject(FormFieldPanelSlotComponent, { optional: true });
38
+ sourceId = `mj-record-link-${nextDirectiveId++}`;
39
+ _recordInput = null;
40
+ _dispatchingSyntheticClick = false;
41
+ /**
42
+ * Primary input bound via `[mjRecordLink]="Record"` (Field-driven mode) or bare `mjRecordLink` (`""` in Direct mode).
43
+ */
44
+ set MjRecordLinkInput(value) {
45
+ this._recordInput = value && typeof value === 'object' ? value : null;
46
+ }
47
+ get MjRecordLinkInput() {
48
+ return this._recordInput;
49
+ }
50
+ /** Optional explicit `[Record]` input when using bare `mjRecordLink` attribute. */
51
+ Record = null;
52
+ /** Foreign-key or polymorphic-FK field name on `Record` (e.g. `'CurrentOrganizationID'`, `'RecordID'`). */
53
+ FieldName = null;
54
+ /** Explicit target entity name (or UUID) for Direct mode, or fallback when `FieldName` metadata is absent. */
55
+ EntityName = null;
56
+ /** Explicit target record ID for Direct mode. */
57
+ RecordID = null;
58
+ /** Explicit target `CompositeKey` for Direct mode. */
59
+ PrimaryKey = null;
60
+ /** Optional pre-resolved display name for the target record. */
61
+ DisplayName = null;
62
+ /** Optional explicit virtual display-name field on `Record` to update when Quick Edit saves. */
63
+ NameFieldMap = null;
64
+ /** Whether record link navigation and hover preview are enabled (defaults to `true`). */
65
+ RecordLinksEnabled = true;
66
+ /** Whether hovering the element opens the `<mj-record-preview-popover>` card (defaults to `true`). */
67
+ ShowHoverPreview = true;
68
+ /** Hover intent delay in milliseconds before opening the preview popover (defaults to `260`). */
69
+ HoverDelayMs = 260;
70
+ /**
71
+ * Controls whether clicking the host element is intercepted by `[mjRecordLink]` to emit `FormNavigationEvent`:
72
+ * - `'auto'` (default): intercepts clicks when `(Navigate)` has subscribers or when inside a form container/slot;
73
+ * otherwise lets any existing `(click)` handler on the host element run naturally.
74
+ * - `true`: always intercepts clicks and dispatches `FormNavigationEvent`.
75
+ * - `false`: never intercepts host element clicks (hover preview + Quick Edit only).
76
+ */
77
+ HandleClick = 'auto';
78
+ /** Optional metadata provider override. */
79
+ Provider = null;
80
+ /** Emitted when the user clicks the link or clicks "Open Record" inside the hover preview popover. */
81
+ Navigate = new EventEmitter();
82
+ /** Emitted when the user saves inline Quick Edit changes inside the hover preview popover. */
83
+ RecordUpdated = new EventEmitter();
84
+ /** Effective `BaseEntity` record from `[mjRecordLink]="Record"` or `[Record]="Record"`. */
85
+ get EffectiveRecord() {
86
+ return this._recordInput ?? this.Record ?? null;
87
+ }
88
+ /** Resolves the current target record descriptor from the directive's inputs. */
89
+ get ResolvedTarget() {
90
+ return ResolveRecordLinkTarget({
91
+ Record: this.EffectiveRecord,
92
+ FieldName: this.FieldName,
93
+ EntityName: this.EntityName,
94
+ RecordID: this.RecordID,
95
+ PrimaryKey: this.PrimaryKey,
96
+ DisplayName: this.DisplayName,
97
+ NameFieldMap: this.NameFieldMap,
98
+ Provider: this.Provider
99
+ });
100
+ }
101
+ get IsLinkActive() {
102
+ return Boolean(this.RecordLinksEnabled && this.ResolvedTarget);
103
+ }
104
+ OnMouseEnter() {
105
+ if (!this.RecordLinksEnabled || !this.ShowHoverPreview) {
106
+ return;
107
+ }
108
+ const target = this.ResolvedTarget;
109
+ if (!target) {
110
+ return;
111
+ }
112
+ const provider = ResolveLinkMetadataProvider(this.Provider, this.EffectiveRecord);
113
+ const hostText = this.hostEl.nativeElement?.textContent?.trim() || null;
114
+ const effectiveDisplayName = this.DisplayName?.trim() || target.DisplayName || hostText;
115
+ this.previewService.RequestOpen({
116
+ SourceID: this.sourceId,
117
+ EntityName: target.EntityName,
118
+ PrimaryKey: target.PrimaryKey,
119
+ RecordID: target.RecordID,
120
+ DisplayName: effectiveDisplayName,
121
+ AnchorElement: this.hostEl.nativeElement,
122
+ Provider: provider,
123
+ HoverDelayMs: this.HoverDelayMs,
124
+ OnNavigate: (navEvent) => this.handlePopoverNavigate(navEvent),
125
+ OnRecordUpdated: (updatedEvent) => this.handlePopoverRecordUpdated(target, updatedEvent)
126
+ });
127
+ }
128
+ OnMouseLeave() {
129
+ this.previewService.RequestClose(this.sourceId);
130
+ }
131
+ OnHostClick(event) {
132
+ if (this._dispatchingSyntheticClick || !this.RecordLinksEnabled || this.HandleClick === false) {
133
+ return;
134
+ }
135
+ const target = this.ResolvedTarget;
136
+ if (!target) {
137
+ return;
138
+ }
139
+ const shouldIntercept = this.HandleClick === true ||
140
+ this.Navigate.observed ||
141
+ this.hasAncestorFormNavigationTarget();
142
+ this.previewService.CloseImmediately(this.sourceId);
143
+ if (!shouldIntercept) {
144
+ return;
145
+ }
146
+ event.preventDefault();
147
+ event.stopPropagation();
148
+ const openInNewTab = Boolean(event.ctrlKey || event.metaKey);
149
+ const navEvent = openInNewTab
150
+ ? {
151
+ Kind: 'record',
152
+ EntityName: target.EntityName,
153
+ PrimaryKey: target.PrimaryKey,
154
+ OpenInNewTab: true
155
+ }
156
+ : {
157
+ Kind: 'record',
158
+ EntityName: target.EntityName,
159
+ PrimaryKey: target.PrimaryKey
160
+ };
161
+ this.dispatchNavigationEvent(navEvent);
162
+ }
163
+ ngOnDestroy() {
164
+ this.previewService.CloseImmediately(this.sourceId);
165
+ }
166
+ handlePopoverNavigate(navEvent) {
167
+ if (this.Navigate.observed || this.hasAncestorFormNavigationTarget() || MjRecordPreviewPopoverService.FallbackNavigationHandler) {
168
+ this.dispatchNavigationEvent(navEvent);
169
+ return;
170
+ }
171
+ // Fallback for standalone dashboard buttons that bound `(click)="..."` instead of `(Navigate)`:
172
+ const el = this.hostEl.nativeElement;
173
+ if (el && typeof el.click === 'function') {
174
+ this._dispatchingSyntheticClick = true;
175
+ try {
176
+ el.click();
177
+ }
178
+ finally {
179
+ this._dispatchingSyntheticClick = false;
180
+ }
181
+ }
182
+ }
183
+ handlePopoverRecordUpdated(target, updatedEvent) {
184
+ ApplyQuickEditToHostRecord(this.EffectiveRecord, target, updatedEvent.UpdatedFields);
185
+ this.RecordUpdated.emit(updatedEvent);
186
+ this.cdr.markForCheck();
187
+ }
188
+ hasAncestorFormNavigationTarget() {
189
+ return Boolean(this.panelSlot?.FormComponent ||
190
+ this.fieldPanelSlot?.FormComponent ||
191
+ this.formContainer);
192
+ }
193
+ dispatchNavigationEvent(navEvent) {
194
+ if (this.Navigate.observed) {
195
+ this.Navigate.emit(navEvent);
196
+ return;
197
+ }
198
+ if (this.panelSlot?.FormComponent) {
199
+ this.panelSlot.FormComponent.OnFormNavigate(navEvent);
200
+ return;
201
+ }
202
+ if (this.fieldPanelSlot?.FormComponent) {
203
+ this.fieldPanelSlot.FormComponent.OnFormNavigate(navEvent);
204
+ return;
205
+ }
206
+ if (this.formContainer) {
207
+ if (this.formContainer.FormComponent) {
208
+ this.formContainer.FormComponent.OnFormNavigate(navEvent);
209
+ }
210
+ else {
211
+ this.formContainer.Navigate.emit(navEvent);
212
+ }
213
+ return;
214
+ }
215
+ if (MjRecordPreviewPopoverService.FallbackNavigationHandler) {
216
+ MjRecordPreviewPopoverService.FallbackNavigationHandler(navEvent);
217
+ }
218
+ }
219
+ static ɵfac = function MjRecordLinkDirective_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || MjRecordLinkDirective)(); };
220
+ static ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: MjRecordLinkDirective, selectors: [["", "mjRecordLink", ""]], hostVars: 2, hostBindings: function MjRecordLinkDirective_HostBindings(rf, ctx) { if (rf & 1) {
221
+ i0.ɵɵlistener("mouseenter", function MjRecordLinkDirective_mouseenter_HostBindingHandler() { return ctx.OnMouseEnter(); })("mouseleave", function MjRecordLinkDirective_mouseleave_HostBindingHandler() { return ctx.OnMouseLeave(); })("click", function MjRecordLinkDirective_click_HostBindingHandler($event) { return ctx.OnHostClick($event); });
222
+ } if (rf & 2) {
223
+ i0.ɵɵclassProp("mj-record-link-active", ctx.IsLinkActive);
224
+ } }, inputs: { MjRecordLinkInput: [0, "mjRecordLink", "MjRecordLinkInput"], Record: "Record", FieldName: "FieldName", EntityName: "EntityName", RecordID: "RecordID", PrimaryKey: "PrimaryKey", DisplayName: "DisplayName", NameFieldMap: "NameFieldMap", RecordLinksEnabled: "RecordLinksEnabled", ShowHoverPreview: "ShowHoverPreview", HoverDelayMs: "HoverDelayMs", HandleClick: "HandleClick", Provider: "Provider" }, outputs: { Navigate: "Navigate", RecordUpdated: "RecordUpdated" }, exportAs: ["mjRecordLink"], standalone: false });
225
+ }
226
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MjRecordLinkDirective, [{
227
+ type: Directive,
228
+ args: [{
229
+ standalone: false,
230
+ selector: '[mjRecordLink]',
231
+ exportAs: 'mjRecordLink'
232
+ }]
233
+ }], null, { MjRecordLinkInput: [{
234
+ type: Input,
235
+ args: ['mjRecordLink']
236
+ }], Record: [{
237
+ type: Input
238
+ }], FieldName: [{
239
+ type: Input
240
+ }], EntityName: [{
241
+ type: Input
242
+ }], RecordID: [{
243
+ type: Input
244
+ }], PrimaryKey: [{
245
+ type: Input
246
+ }], DisplayName: [{
247
+ type: Input
248
+ }], NameFieldMap: [{
249
+ type: Input
250
+ }], RecordLinksEnabled: [{
251
+ type: Input
252
+ }], ShowHoverPreview: [{
253
+ type: Input
254
+ }], HoverDelayMs: [{
255
+ type: Input
256
+ }], HandleClick: [{
257
+ type: Input
258
+ }], Provider: [{
259
+ type: Input
260
+ }], Navigate: [{
261
+ type: Output
262
+ }], RecordUpdated: [{
263
+ type: Output
264
+ }], IsLinkActive: [{
265
+ type: HostBinding,
266
+ args: ['class.mj-record-link-active']
267
+ }], OnMouseEnter: [{
268
+ type: HostListener,
269
+ args: ['mouseenter']
270
+ }], OnMouseLeave: [{
271
+ type: HostListener,
272
+ args: ['mouseleave']
273
+ }], OnHostClick: [{
274
+ type: HostListener,
275
+ args: ['click', ['$event']]
276
+ }] }); })();
277
+ //# sourceMappingURL=record-link.directive.js.map
@@ -0,0 +1 @@
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AM;;kBAqBN,WAAW;mBAAC,6BAA6B;;kBAKzC,YAAY;mBAAC,YAAY;;kBA2BzB,YAAY;mBAAC,YAAY;;kBAKzB,YAAY;mBAAC,OAAO,EAAE,CAAC,QAAQ,CAAC","sourcesContent":["import {\n ChangeDetectorRef,\n Directive,\n ElementRef,\n EventEmitter,\n HostBinding,\n HostListener,\n Input,\n OnDestroy,\n Output,\n inject\n} from '@angular/core';\nimport { BaseEntity, CompositeKey, IMetadataProvider } from '@memberjunction/core';\nimport { FormNavigationEvent } from '../types/navigation-events';\nimport { MjRecordPreviewPopoverService } from '../preview-popover/record-preview-popover.service';\nimport { RecordPreviewUpdatedEvent } from '../preview-popover/record-preview-popover.component';\nimport { MjRecordFormContainerComponent } from '../container/record-form-container.component';\nimport { FormPanelSlotComponent } from '../panel-slot/form-panel-slot.component';\nimport { FormFieldPanelSlotComponent } from '../panel-slot/form-field-panel-slot.component';\nimport {\n ApplyQuickEditToHostRecord,\n ResolveLinkMetadataProvider,\n ResolveRecordLinkTarget,\n ResolvedRecordLinkTarget\n} from './record-link-utils';\n\nlet nextDirectiveId = 1;\n\n/**\n * Declarative `[mjRecordLink]` directive that attaches MemberJunction's full record-linking UX\n * to any `<button>`, `<a>`, `<span>`, or chip element:\n * - **Hover-intent preview popover** (`<mj-record-preview-popover>`) with summary fields and status badge\n * - **Inline Quick Edit** inside the hover popover with automatic propagation back to virtual display fields on `Record`\n * - **Standard & Polymorphic FK resolution** (`EntityField.RelatedEntity` + `EntityField.EntityIDFieldName`)\n * - **Click & Ctrl/Cmd+Click navigation** (`FormNavigationEvent` with `OpenInNewTab`)\n *\n * ### Usage Modes\n * 1. **Field-Driven Mode** (resolves target entity, PK, and companion virtual display field from `Record` metadata):\n * ```html\n * <button type=\"button\" [mjRecordLink]=\"Record\" FieldName=\"CurrentOrganizationID\" (Navigate)=\"Navigate.emit($event)\">\n * {{ Record.CurrentOrganizationName }}\n * </button>\n * ```\n * 2. **Direct Mode** (explicit `EntityName` and `RecordID` or `PrimaryKey`):\n * ```html\n * <button type=\"button\" mjRecordLink [EntityName]=\"'MJ_BizApps_Common: People'\" [RecordID]=\"row.PersonID\">\n * {{ row.PersonName }}\n * </button>\n * ```\n */\n@Directive({\n standalone: false,\n selector: '[mjRecordLink]',\n exportAs: 'mjRecordLink'\n})\nexport class MjRecordLinkDirective implements OnDestroy {\n private readonly hostEl = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly cdr = inject(ChangeDetectorRef);\n private readonly previewService = inject(MjRecordPreviewPopoverService);\n private readonly formContainer = inject(MjRecordFormContainerComponent, { optional: true });\n private readonly panelSlot = inject(FormPanelSlotComponent, { optional: true });\n private readonly fieldPanelSlot = inject(FormFieldPanelSlotComponent, { optional: true });\n\n private readonly sourceId = `mj-record-link-${nextDirectiveId++}`;\n private _recordInput: BaseEntity | null = null;\n private _dispatchingSyntheticClick = false;\n\n /**\n * Primary input bound via `[mjRecordLink]=\"Record\"` (Field-driven mode) or bare `mjRecordLink` (`\"\"` in Direct mode).\n */\n @Input('mjRecordLink')\n public set MjRecordLinkInput(value: BaseEntity | '' | null | undefined) {\n this._recordInput = value && typeof value === 'object' ? value : null;\n }\n public get MjRecordLinkInput(): BaseEntity | null {\n return this._recordInput;\n }\n\n /** Optional explicit `[Record]` input when using bare `mjRecordLink` attribute. */\n @Input() public Record: BaseEntity | null = null;\n\n /** Foreign-key or polymorphic-FK field name on `Record` (e.g. `'CurrentOrganizationID'`, `'RecordID'`). */\n @Input() public FieldName: string | null = null;\n\n /** Explicit target entity name (or UUID) for Direct mode, or fallback when `FieldName` metadata is absent. */\n @Input() public EntityName: string | null = null;\n\n /** Explicit target record ID for Direct mode. */\n @Input() public RecordID: string | number | null = null;\n\n /** Explicit target `CompositeKey` for Direct mode. */\n @Input() public PrimaryKey: CompositeKey | null = null;\n\n /** Optional pre-resolved display name for the target record. */\n @Input() public DisplayName: string | null = null;\n\n /** Optional explicit virtual display-name field on `Record` to update when Quick Edit saves. */\n @Input() public NameFieldMap: string | null = null;\n\n /** Whether record link navigation and hover preview are enabled (defaults to `true`). */\n @Input() public RecordLinksEnabled = true;\n\n /** Whether hovering the element opens the `<mj-record-preview-popover>` card (defaults to `true`). */\n @Input() public ShowHoverPreview = true;\n\n /** Hover intent delay in milliseconds before opening the preview popover (defaults to `260`). */\n @Input() public HoverDelayMs = 260;\n\n /**\n * Controls whether clicking the host element is intercepted by `[mjRecordLink]` to emit `FormNavigationEvent`:\n * - `'auto'` (default): intercepts clicks when `(Navigate)` has subscribers or when inside a form container/slot;\n * otherwise lets any existing `(click)` handler on the host element run naturally.\n * - `true`: always intercepts clicks and dispatches `FormNavigationEvent`.\n * - `false`: never intercepts host element clicks (hover preview + Quick Edit only).\n */\n @Input() public HandleClick: boolean | 'auto' = 'auto';\n\n /** Optional metadata provider override. */\n @Input() public Provider: IMetadataProvider | null = null;\n\n /** Emitted when the user clicks the link or clicks \"Open Record\" inside the hover preview popover. */\n @Output() public readonly Navigate = new EventEmitter<FormNavigationEvent>();\n\n /** Emitted when the user saves inline Quick Edit changes inside the hover preview popover. */\n @Output() public readonly RecordUpdated = new EventEmitter<RecordPreviewUpdatedEvent>();\n\n /** Effective `BaseEntity` record from `[mjRecordLink]=\"Record\"` or `[Record]=\"Record\"`. */\n public get EffectiveRecord(): BaseEntity | null {\n return this._recordInput ?? this.Record ?? null;\n }\n\n /** Resolves the current target record descriptor from the directive's inputs. */\n public get ResolvedTarget(): ResolvedRecordLinkTarget | null {\n return ResolveRecordLinkTarget({\n Record: this.EffectiveRecord,\n FieldName: this.FieldName,\n EntityName: this.EntityName,\n RecordID: this.RecordID,\n PrimaryKey: this.PrimaryKey,\n DisplayName: this.DisplayName,\n NameFieldMap: this.NameFieldMap,\n Provider: this.Provider\n });\n }\n\n @HostBinding('class.mj-record-link-active')\n public get IsLinkActive(): boolean {\n return Boolean(this.RecordLinksEnabled && this.ResolvedTarget);\n }\n\n @HostListener('mouseenter')\n public OnMouseEnter(): void {\n if (!this.RecordLinksEnabled || !this.ShowHoverPreview) {\n return;\n }\n const target = this.ResolvedTarget;\n if (!target) {\n return;\n }\n const provider = ResolveLinkMetadataProvider(this.Provider, this.EffectiveRecord);\n const hostText = this.hostEl.nativeElement?.textContent?.trim() || null;\n const effectiveDisplayName = this.DisplayName?.trim() || target.DisplayName || hostText;\n\n this.previewService.RequestOpen({\n SourceID: this.sourceId,\n EntityName: target.EntityName,\n PrimaryKey: target.PrimaryKey,\n RecordID: target.RecordID,\n DisplayName: effectiveDisplayName,\n AnchorElement: this.hostEl.nativeElement,\n Provider: provider,\n HoverDelayMs: this.HoverDelayMs,\n OnNavigate: (navEvent: FormNavigationEvent) => this.handlePopoverNavigate(navEvent),\n OnRecordUpdated: (updatedEvent: RecordPreviewUpdatedEvent) => this.handlePopoverRecordUpdated(target, updatedEvent)\n });\n }\n\n @HostListener('mouseleave')\n public OnMouseLeave(): void {\n this.previewService.RequestClose(this.sourceId);\n }\n\n @HostListener('click', ['$event'])\n public OnHostClick(event: MouseEvent): void {\n if (this._dispatchingSyntheticClick || !this.RecordLinksEnabled || this.HandleClick === false) {\n return;\n }\n const target = this.ResolvedTarget;\n if (!target) {\n return;\n }\n\n const shouldIntercept =\n this.HandleClick === true ||\n this.Navigate.observed ||\n this.hasAncestorFormNavigationTarget();\n\n this.previewService.CloseImmediately(this.sourceId);\n\n if (!shouldIntercept) {\n return;\n }\n\n event.preventDefault();\n event.stopPropagation();\n\n const openInNewTab = Boolean(event.ctrlKey || event.metaKey);\n const navEvent: FormNavigationEvent = openInNewTab\n ? {\n Kind: 'record',\n EntityName: target.EntityName,\n PrimaryKey: target.PrimaryKey,\n OpenInNewTab: true\n }\n : {\n Kind: 'record',\n EntityName: target.EntityName,\n PrimaryKey: target.PrimaryKey\n };\n\n this.dispatchNavigationEvent(navEvent);\n }\n\n public ngOnDestroy(): void {\n this.previewService.CloseImmediately(this.sourceId);\n }\n\n private handlePopoverNavigate(navEvent: FormNavigationEvent): void {\n if (this.Navigate.observed || this.hasAncestorFormNavigationTarget() || MjRecordPreviewPopoverService.FallbackNavigationHandler) {\n this.dispatchNavigationEvent(navEvent);\n return;\n }\n // Fallback for standalone dashboard buttons that bound `(click)=\"...\"` instead of `(Navigate)`:\n const el = this.hostEl.nativeElement;\n if (el && typeof el.click === 'function') {\n this._dispatchingSyntheticClick = true;\n try {\n el.click();\n } finally {\n this._dispatchingSyntheticClick = false;\n }\n }\n }\n\n private handlePopoverRecordUpdated(\n target: ResolvedRecordLinkTarget,\n updatedEvent: RecordPreviewUpdatedEvent\n ): void {\n ApplyQuickEditToHostRecord(this.EffectiveRecord, target, updatedEvent.UpdatedFields);\n this.RecordUpdated.emit(updatedEvent);\n this.cdr.markForCheck();\n }\n\n private hasAncestorFormNavigationTarget(): boolean {\n return Boolean(\n this.panelSlot?.FormComponent ||\n this.fieldPanelSlot?.FormComponent ||\n this.formContainer\n );\n }\n\n private dispatchNavigationEvent(navEvent: FormNavigationEvent): void {\n if (this.Navigate.observed) {\n this.Navigate.emit(navEvent);\n return;\n }\n if (this.panelSlot?.FormComponent) {\n this.panelSlot.FormComponent.OnFormNavigate(navEvent);\n return;\n }\n if (this.fieldPanelSlot?.FormComponent) {\n this.fieldPanelSlot.FormComponent.OnFormNavigate(navEvent);\n return;\n }\n if (this.formContainer) {\n if (this.formContainer.FormComponent) {\n this.formContainer.FormComponent.OnFormNavigate(navEvent);\n } else {\n this.formContainer.Navigate.emit(navEvent);\n }\n return;\n }\n if (MjRecordPreviewPopoverService.FallbackNavigationHandler) {\n MjRecordPreviewPopoverService.FallbackNavigationHandler(navEvent);\n }\n }\n}\n"]}
@@ -0,0 +1,21 @@
1
+ import { EventEmitter } from '@angular/core';
2
+ import { BaseEntity } from '@memberjunction/core';
3
+ import { BaseAngularComponent } from '@memberjunction/ng-base-types';
4
+ import { FormNavigationEvent } from '../types/navigation-events';
5
+ import { RecordLinkFilterType, RecordLinksSummary } from './record-links.component';
6
+ import * as i0 from "@angular/core";
7
+ /**
8
+ * Convenience slide-in drawer component `<mj-record-links-drawer>` wrapping `<mj-record-links [Mode]="'drawer'">`.
9
+ */
10
+ export declare class MjRecordLinksDrawerComponent extends BaseAngularComponent {
11
+ Record: BaseEntity | null;
12
+ InitialLinkFilter: RecordLinkFilterType;
13
+ IsOpen: boolean;
14
+ Navigate: EventEmitter<FormNavigationEvent>;
15
+ Close: EventEmitter<void>;
16
+ LinkCountChange: EventEmitter<number>;
17
+ LinksSummaryChange: EventEmitter<RecordLinksSummary>;
18
+ static ɵfac: i0.ɵɵFactoryDeclaration<MjRecordLinksDrawerComponent, never>;
19
+ static ɵcmp: i0.ɵɵComponentDeclaration<MjRecordLinksDrawerComponent, "mj-record-links-drawer", never, { "Record": { "alias": "Record"; "required": false; }; "InitialLinkFilter": { "alias": "InitialLinkFilter"; "required": false; }; "IsOpen": { "alias": "IsOpen"; "required": false; }; }, { "Navigate": "Navigate"; "Close": "Close"; "LinkCountChange": "LinkCountChange"; "LinksSummaryChange": "LinksSummaryChange"; }, never, never, false, never>;
20
+ }
21
+ //# sourceMappingURL=record-links-drawer.component.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"record-links-drawer.component.d.ts","sourceRoot":"","sources":["../../../src/lib/links/record-links-drawer.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAIH,YAAY,EAEf,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;;AAEpF;;GAEG;AACH,qBAkBa,4BAA6B,SAAQ,oBAAoB;IACzD,MAAM,EAAE,UAAU,GAAG,IAAI,CAAQ;IACjC,iBAAiB,EAAE,oBAAoB,CAAU;IACjD,MAAM,UAAS;IAEd,QAAQ,oCAA2C;IACnD,KAAK,qBAA4B;IACjC,eAAe,uBAA8B;IAC7C,kBAAkB,mCAA0C;yCAR7D,4BAA4B;2CAA5B,4BAA4B;CASxC"}
@@ -0,0 +1,61 @@
1
+ import { Component, Input, Output, EventEmitter, ChangeDetectionStrategy } from '@angular/core';
2
+ import { BaseAngularComponent } from '@memberjunction/ng-base-types';
3
+ import * as i0 from "@angular/core";
4
+ import * as i1 from "./record-links.component";
5
+ /**
6
+ * Convenience slide-in drawer component `<mj-record-links-drawer>` wrapping `<mj-record-links [Mode]="'drawer'">`.
7
+ */
8
+ export class MjRecordLinksDrawerComponent extends BaseAngularComponent {
9
+ Record = null;
10
+ InitialLinkFilter = 'both';
11
+ IsOpen = false;
12
+ Navigate = new EventEmitter();
13
+ Close = new EventEmitter();
14
+ LinkCountChange = new EventEmitter();
15
+ LinksSummaryChange = new EventEmitter();
16
+ static ɵfac = /*@__PURE__*/ (() => { let ɵMjRecordLinksDrawerComponent_BaseFactory; return function MjRecordLinksDrawerComponent_Factory(__ngFactoryType__) { return (ɵMjRecordLinksDrawerComponent_BaseFactory || (ɵMjRecordLinksDrawerComponent_BaseFactory = i0.ɵɵgetInheritedFactory(MjRecordLinksDrawerComponent)))(__ngFactoryType__ || MjRecordLinksDrawerComponent); }; })();
17
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: MjRecordLinksDrawerComponent, selectors: [["mj-record-links-drawer"]], inputs: { Record: "Record", InitialLinkFilter: "InitialLinkFilter", IsOpen: "IsOpen" }, outputs: { Navigate: "Navigate", Close: "Close", LinkCountChange: "LinkCountChange", LinksSummaryChange: "LinksSummaryChange" }, standalone: false, features: [i0.ɵɵInheritDefinitionFeature], decls: 1, vars: 5, consts: [[3, "Navigate", "Close", "LinkCountChange", "LinksSummaryChange", "Provider", "Record", "InitialLinkFilter", "Mode", "IsOpen"]], template: function MjRecordLinksDrawerComponent_Template(rf, ctx) { if (rf & 1) {
18
+ i0.ɵɵelementStart(0, "mj-record-links", 0);
19
+ i0.ɵɵlistener("Navigate", function MjRecordLinksDrawerComponent_Template_mj_record_links_Navigate_0_listener($event) { return ctx.Navigate.emit($event); })("Close", function MjRecordLinksDrawerComponent_Template_mj_record_links_Close_0_listener() { return ctx.Close.emit(); })("LinkCountChange", function MjRecordLinksDrawerComponent_Template_mj_record_links_LinkCountChange_0_listener($event) { return ctx.LinkCountChange.emit($event); })("LinksSummaryChange", function MjRecordLinksDrawerComponent_Template_mj_record_links_LinksSummaryChange_0_listener($event) { return ctx.LinksSummaryChange.emit($event); });
20
+ i0.ɵɵelementEnd();
21
+ } if (rf & 2) {
22
+ i0.ɵɵproperty("Provider", ctx.Provider)("Record", ctx.Record)("InitialLinkFilter", ctx.InitialLinkFilter)("Mode", "drawer")("IsOpen", ctx.IsOpen);
23
+ } }, dependencies: [i1.MjRecordLinksComponent], encapsulation: 2, changeDetection: 0 });
24
+ }
25
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MjRecordLinksDrawerComponent, [{
26
+ type: Component,
27
+ args: [{
28
+ standalone: false,
29
+ selector: 'mj-record-links-drawer',
30
+ template: `
31
+ <mj-record-links
32
+ [Provider]="Provider"
33
+ [Record]="Record"
34
+ [InitialLinkFilter]="InitialLinkFilter"
35
+ [Mode]="'drawer'"
36
+ [IsOpen]="IsOpen"
37
+ (Navigate)="Navigate.emit($event)"
38
+ (Close)="Close.emit()"
39
+ (LinkCountChange)="LinkCountChange.emit($event)"
40
+ (LinksSummaryChange)="LinksSummaryChange.emit($event)">
41
+ </mj-record-links>
42
+ `,
43
+ changeDetection: ChangeDetectionStrategy.OnPush
44
+ }]
45
+ }], null, { Record: [{
46
+ type: Input
47
+ }], InitialLinkFilter: [{
48
+ type: Input
49
+ }], IsOpen: [{
50
+ type: Input
51
+ }], Navigate: [{
52
+ type: Output
53
+ }], Close: [{
54
+ type: Output
55
+ }], LinkCountChange: [{
56
+ type: Output
57
+ }], LinksSummaryChange: [{
58
+ type: Output
59
+ }] }); })();
60
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(MjRecordLinksDrawerComponent, { className: "MjRecordLinksDrawerComponent", filePath: "src/lib/links/record-links-drawer.component.ts", lineNumber: 34 }); })();
61
+ //# sourceMappingURL=record-links-drawer.component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"record-links-drawer.component.js","sourceRoot":"","sources":["../../../src/lib/links/record-links-drawer.component.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,SAAS,EACT,KAAK,EACL,MAAM,EACN,YAAY,EACZ,uBAAuB,EAC1B,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;;;AAIrE;;GAEG;AAmBH,MAAM,OAAO,4BAA6B,SAAQ,oBAAoB;IACzD,MAAM,GAAsB,IAAI,CAAC;IACjC,iBAAiB,GAAyB,MAAM,CAAC;IACjD,MAAM,GAAG,KAAK,CAAC;IAEd,QAAQ,GAAG,IAAI,YAAY,EAAuB,CAAC;IACnD,KAAK,GAAG,IAAI,YAAY,EAAQ,CAAC;IACjC,eAAe,GAAG,IAAI,YAAY,EAAU,CAAC;IAC7C,kBAAkB,GAAG,IAAI,YAAY,EAAsB,CAAC;6RAR7D,4BAA4B,yBAA5B,4BAA4B;6DAA5B,4BAA4B;YAdjC,0CAS2D;YAAvD,AADA,AADA,AADA,8HAAY,yBAAqB,IAAC,qGACzB,gBAAY,IAAC,+HACH,gCAA4B,IAAC,qIAC1B,mCAA+B,IAAC;YAC1D,iBAAkB;;YALd,AADA,AADA,AADA,AADA,uCAAqB,sBACJ,4CACsB,kBACtB,sBACA;;;iFAShB,4BAA4B;cAlBxC,SAAS;eAAC;gBACP,UAAU,EAAE,KAAK;gBACjB,QAAQ,EAAE,wBAAwB;gBAClC,QAAQ,EAAE;;;;;;;;;;;;KAYT;gBACD,eAAe,EAAE,uBAAuB,CAAC,MAAM;aAClD;;kBAEI,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBAEL,MAAM;;kBACN,MAAM;;kBACN,MAAM;;kBACN,MAAM;;kFARE,4BAA4B","sourcesContent":["import {\n Component,\n Input,\n Output,\n EventEmitter,\n ChangeDetectionStrategy\n} from '@angular/core';\nimport { BaseEntity } from '@memberjunction/core';\nimport { BaseAngularComponent } from '@memberjunction/ng-base-types';\nimport { FormNavigationEvent } from '../types/navigation-events';\nimport { RecordLinkFilterType, RecordLinksSummary } from './record-links.component';\n\n/**\n * Convenience slide-in drawer component `<mj-record-links-drawer>` wrapping `<mj-record-links [Mode]=\"'drawer'\">`.\n */\n@Component({\n standalone: false,\n selector: 'mj-record-links-drawer',\n template: `\n <mj-record-links\n [Provider]=\"Provider\"\n [Record]=\"Record\"\n [InitialLinkFilter]=\"InitialLinkFilter\"\n [Mode]=\"'drawer'\"\n [IsOpen]=\"IsOpen\"\n (Navigate)=\"Navigate.emit($event)\"\n (Close)=\"Close.emit()\"\n (LinkCountChange)=\"LinkCountChange.emit($event)\"\n (LinksSummaryChange)=\"LinksSummaryChange.emit($event)\">\n </mj-record-links>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class MjRecordLinksDrawerComponent extends BaseAngularComponent {\n @Input() Record: BaseEntity | null = null;\n @Input() InitialLinkFilter: RecordLinkFilterType = 'both';\n @Input() IsOpen = false;\n\n @Output() Navigate = new EventEmitter<FormNavigationEvent>();\n @Output() Close = new EventEmitter<void>();\n @Output() LinkCountChange = new EventEmitter<number>();\n @Output() LinksSummaryChange = new EventEmitter<RecordLinksSummary>();\n}\n"]}