@memberjunction/ng-explorer-core 5.38.0 → 5.40.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 (46) hide show
  1. package/dist/app-routing.module.d.ts.map +1 -1
  2. package/dist/app-routing.module.js +13 -13
  3. package/dist/app-routing.module.js.map +1 -1
  4. package/dist/generated/lazy-feature-config.d.ts +1 -1
  5. package/dist/generated/lazy-feature-config.d.ts.map +1 -1
  6. package/dist/generated/lazy-feature-config.js +3 -2
  7. package/dist/generated/lazy-feature-config.js.map +1 -1
  8. package/dist/lib/guards/app-lock-guard.service.d.ts +26 -0
  9. package/dist/lib/guards/app-lock-guard.service.d.ts.map +1 -0
  10. package/dist/lib/guards/app-lock-guard.service.js +55 -0
  11. package/dist/lib/guards/app-lock-guard.service.js.map +1 -0
  12. package/dist/lib/resource-wrappers/chat-conversations-resource.component.d.ts.map +1 -1
  13. package/dist/lib/resource-wrappers/chat-conversations-resource.component.js +40 -27
  14. package/dist/lib/resource-wrappers/chat-conversations-resource.component.js.map +1 -1
  15. package/dist/lib/resource-wrappers/view-resource.component.d.ts +6 -5
  16. package/dist/lib/resource-wrappers/view-resource.component.d.ts.map +1 -1
  17. package/dist/lib/resource-wrappers/view-resource.component.js +19 -24
  18. package/dist/lib/resource-wrappers/view-resource.component.js.map +1 -1
  19. package/dist/lib/shell/components/tabs/tab-container.component.d.ts.map +1 -1
  20. package/dist/lib/shell/components/tabs/tab-container.component.js +9 -0
  21. package/dist/lib/shell/components/tabs/tab-container.component.js.map +1 -1
  22. package/dist/lib/shell/shell.component.d.ts +24 -6
  23. package/dist/lib/shell/shell.component.d.ts.map +1 -1
  24. package/dist/lib/shell/shell.component.js +360 -191
  25. package/dist/lib/shell/shell.component.js.map +1 -1
  26. package/dist/lib/single-record/single-record.component.d.ts +31 -75
  27. package/dist/lib/single-record/single-record.component.d.ts.map +1 -1
  28. package/dist/lib/single-record/single-record.component.js +60 -471
  29. package/dist/lib/single-record/single-record.component.js.map +1 -1
  30. package/dist/lib/single-search-result/single-search-result.component.d.ts +3 -8
  31. package/dist/lib/single-search-result/single-search-result.component.d.ts.map +1 -1
  32. package/dist/lib/single-search-result/single-search-result.component.js +19 -68
  33. package/dist/lib/single-search-result/single-search-result.component.js.map +1 -1
  34. package/dist/public-api.d.ts +1 -0
  35. package/dist/public-api.d.ts.map +1 -1
  36. package/dist/public-api.js +1 -0
  37. package/dist/public-api.js.map +1 -1
  38. package/package.json +46 -46
  39. package/dist/lib/__tests__/form-resolver.service.test.d.ts +0 -2
  40. package/dist/lib/__tests__/form-resolver.service.test.d.ts.map +0 -1
  41. package/dist/lib/__tests__/form-resolver.service.test.js +0 -258
  42. package/dist/lib/__tests__/form-resolver.service.test.js.map +0 -1
  43. package/dist/lib/services/form-resolver.service.d.ts +0 -139
  44. package/dist/lib/services/form-resolver.service.d.ts.map +0 -1
  45. package/dist/lib/services/form-resolver.service.js +0 -235
  46. package/dist/lib/services/form-resolver.service.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"single-record.component.js","sourceRoot":"","sources":["../../../src/lib/single-record/single-record.component.ts","../../../src/lib/single-record/single-record.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAiB,iBAAiB,EAAE,SAAS,EAAgB,YAAY,EAAE,MAAM,EAAE,KAAK,EAAqB,MAAM,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE7J,OAAO,EAA0B,YAAY,EAA+B,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAElJ,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAiE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACxI,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAClG,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AAGxE,OAAO,EAAE,oBAAoB,EAAE,MAAM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D;QACpD,IAAI,CAAC,wBAAwB,EAAE,CAAC;QAEhC,qFAAqF;QACrF,IAAI,IAAI,CAAC,iBAAiB,EAAE,CAAC;YAC3B,IAAI,CAAC,iBAAiB,CAAC,OAAO,EAAE,CAAC;YACjC,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC;QAChC,CAAC;QAED,mEAAmE;QACnE,IAAI,IAAI,CAAC,yBAAyB,EAAE,CAAC;YACnC,IAAI,CAAC,yBAAyB,CAAC,WAAW,EAAE,CAAC;YAC7C,IAAI,CAAC,yBAAyB,GAAG,IAAI,CAAC;QACxC,CAAC;QAED,4BAA4B;QAC5B,IAAI,IAAI,CAAC,cAAc,EAAE,CAAC;YACxB,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC;QAC7B,CAAC;QAED,6DAA6D;QAC7D,IAAI,IAAI,CAAC,aAAa,EAAE,gBAAgB,EAAE,CAAC;YACzC,IAAI,CAAC,aAAa,CAAC,gBAAgB,CAAC,KAAK,EAAE,CAAC;QAC9C,CAAC;QAED,cAAc;QACd,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;QACpB,IAAI,CAAC,cAAc,GAAG,KAAK,CAAC;IAC9B,CAAC;+GAxfU,qBAAqB;6DAArB,qBAAqB;2BACrB,SAAS;;;;;YClBtB,8FAAe;YAGf,uFAAkB;YAYlB,sFAAyB;;YAfzB,sCAEC;YACD,cAWC;YAXD,yCAWC;;;iFDGY,qBAAqB;cANjC,SAAS;6BACI,KAAK,YACP,kBAAkB;;kBAK3B,SAAS;mBAAC,SAAS,EAAE,EAAC,MAAM,EAAE,IAAI,EAAC;;kBAGnC,KAAK;;kBAwBL,KAAK;;kBAYL,KAAK;;kBAEL,MAAM;;kBACN,MAAM;;kBAKN,MAAM;;kFAhDI,qBAAqB","sourcesContent":["import { AfterViewInit, ChangeDetectorRef, Component, ComponentRef, EventEmitter, inject, Input, OnDestroy, OnInit, Output, ViewChild } from '@angular/core';\nimport { ActivatedRoute } from '@angular/router'\nimport { Metadata, KeyValuePair, CompositeKey, BaseEntity, BaseEntityEvent, FieldValueCollection, EntityFieldTSType } from '@memberjunction/core';\nimport { Subscription } from 'rxjs';\nimport { Container } from '@memberjunction/ng-container-directives';\nimport { BaseFormComponent, FormNavigationEvent, FormNotificationEvent, InteractiveFormComponent } from '@memberjunction/ng-base-forms';\nimport { NavigationService, RecentAccessService, SharedService } from '@memberjunction/ng-shared';\nimport { FormResolverService } from '../services/form-resolver.service';\n\n\nimport { BaseAngularComponent } from '@memberjunction/ng-base-types';\n@Component({\n standalone: false,\n selector: 'mj-single-record',\n templateUrl: './single-record.component.html',\n styleUrls: ['./single-record.component.css']\n})\nexport class SingleRecordComponent extends BaseAngularComponent implements OnInit, AfterViewInit, OnDestroy {\n @ViewChild(Container, {static: true}) formContainer!: Container;\n\n private _primaryKey: CompositeKey = new CompositeKey();\n @Input()\n public set PrimaryKey(value: CompositeKey) {\n const changed = !this.compositeKeysEqual(this._primaryKey, value);\n this._primaryKey = value ?? new CompositeKey();\n if (!changed || !this._viewInitialized) {\n return;\n }\n // Skip reload when the incoming key just reflects the current record's now-saved PK.\n // After a new-record save, BaseResourceComponent updates parent.Data.ResourceRecordID,\n // the parent's PrimaryKey getter then returns a fresh CK with the saved ID, and Angular\n // pushes it down to us. The form already represents that record in-place — destroying\n // and rebuilding it here would lose edit state, refetch from DB, and spawn a redundant\n // GetRecordFavoriteStatus call. Genuine external swaps (parent rebinds to a different\n // record) still trigger the reload because `value` won't match `_currentRecord.PrimaryKey`.\n if (this._currentRecord && this.compositeKeysEqual(value, this._currentRecord.PrimaryKey)) {\n return;\n }\n this.reloadCurrentForm();\n }\n public get PrimaryKey(): CompositeKey {\n return this._primaryKey;\n }\n\n private _entityName: string | null = '';\n @Input()\n public set entityName(value: string | null) {\n const changed = this._entityName !== value;\n this._entityName = value;\n if (changed && this._viewInitialized) {\n this.reloadCurrentForm();\n }\n }\n public get entityName(): string | null {\n return this._entityName;\n }\n\n @Input() public newRecordValues: string | Record<string, unknown> | null = '';\n\n @Output() public loadComplete: EventEmitter<any> = new EventEmitter<any>();\n @Output() public recordSaved: EventEmitter<BaseEntity> = new EventEmitter<BaseEntity>();\n /**\n * Emitted when the hosted form asks to be dismissed (e.g., user clicked Discard on\n * a brand-new record). Parent components should close the tab / route the user back.\n */\n @Output() public recordDismissed: EventEmitter<void> = new EventEmitter<void>();\n\n private recentAccessService: RecentAccessService;\n private navigationService = inject(NavigationService);\n private sharedService = inject(SharedService);\n private cdr = inject(ChangeDetectorRef);\n private formResolver = inject(FormResolverService);\n\n constructor (private route: ActivatedRoute) {\n super();\n this.recentAccessService = new RecentAccessService();\n }\n\n public appDescription: string = ''\n public useGenericForm: boolean = false;\n public loading: boolean = true;\n public errorTitle: string | null = null;\n public errorDetail: string | null = null;\n\n // Track dynamically created components and entities for cleanup\n private _formComponentRef: ComponentRef<BaseFormComponent> | null = null;\n private _currentRecord: BaseEntity | null = null;\n private _eventHandlerSubscription: Subscription | null = null;\n private _formEventSubscriptions: Subscription[] = [];\n private _viewInitialized = false;\n\n ngOnInit(): void {\n }\n\n ngAfterViewInit() {\n this._viewInitialized = true;\n this.LoadForm(this._primaryKey, <string>this._entityName)\n }\n\n /**\n * Re-run LoadForm when an @Input changes after initial view init.\n *\n * Defense-in-depth: the tab/cache rekey on save (in TabContainerComponent) is the\n * primary fix that prevents stale-form bugs after creating a new record. This setter\n * path ensures we self-heal if a host ever swaps the bound inputs without recreating\n * the component — without it, LoadForm only ever runs once per component instance.\n *\n * Tears down the previous form (component, record, event handlers) before loading the\n * new one so we don't leak references or stack multiple forms in the container.\n */\n private reloadCurrentForm(): void {\n this.teardownActiveForm();\n if (!this._entityName) {\n return;\n }\n this.loading = true;\n this.LoadForm(this._primaryKey, this._entityName);\n }\n\n /**\n * Compare two CompositeKey instances by their key/value contents.\n * Two different instances representing the same key should NOT count as a change.\n *\n * Filters out KVPs with empty Values before comparing. Different callers represent\n * \"no key\" differently — some use an empty KeyValuePairs list, others use a single\n * KVP with an empty Value (e.g. `LoadFromURLSegment(entity, '')`). Both mean the\n * same thing semantically and must not trigger a change.\n */\n private compositeKeysEqual(a: CompositeKey | null | undefined, b: CompositeKey | null | undefined): boolean {\n if (a === b) return true;\n if (!a || !b) return false;\n const aKvps = (a.KeyValuePairs || []).filter(kvp => String(kvp.Value ?? '').length > 0);\n const bKvps = (b.KeyValuePairs || []).filter(kvp => String(kvp.Value ?? '').length > 0);\n if (aKvps.length !== bKvps.length) return false;\n for (let i = 0; i < aKvps.length; i++) {\n if (aKvps[i].FieldName !== bKvps[i].FieldName) return false;\n if (String(aKvps[i].Value ?? '') !== String(bKvps[i].Value ?? '')) return false;\n }\n return true;\n }\n\n /**\n * Tear down the currently rendered form so a new one can be loaded in its place.\n * Mirrors the cleanup done in ngOnDestroy, minus the final state reset.\n */\n private teardownActiveForm(): void {\n this.cleanupFormSubscriptions();\n\n if (this._eventHandlerSubscription) {\n this._eventHandlerSubscription.unsubscribe();\n this._eventHandlerSubscription = null;\n }\n\n if (this._formComponentRef) {\n try { this._formComponentRef.destroy(); } catch { /* noop */ }\n this._formComponentRef = null;\n }\n\n this._currentRecord = null;\n\n if (this.formContainer?.viewContainerRef) {\n this.formContainer.viewContainerRef.clear();\n }\n }\n\n public async LoadForm(primaryKey: CompositeKey, entityName: string) {\n // Perform any necessary actions with the ViewID, such as fetching data\n if (!entityName || entityName.trim().length === 0) {\n // No entity yet — caller will re-invoke once it has one. Don't emit loadComplete;\n // it would race the real load. The shell's recovery timer will surface the\n // \"taking longer than expected\" reset if this is the terminal state.\n return;\n }\n\n // Write through to backing fields directly. Going through the setters here would\n // re-trigger reloadCurrentForm() and recurse — we're already inside LoadForm.\n //\n // Use the parameter as-is rather than substituting `new CompositeKey()` for the\n // !HasValue branch. The parent's getter (e.g. EntityRecordResource.GetPrimaryKey)\n // builds its CK via `LoadFromURLSegment(entity, '')`, which yields `[{FieldName: 'ID',\n // Value: ''}]` for a new record — a single KVP with an empty value, NOT an empty\n // KVP list. Substituting an empty CK here creates a structural mismatch that makes\n // the setter's compositeKeysEqual see a phantom change on the very next CD cycle,\n // which triggers reload → LoadForm → CD → setter → reload (infinite loop).\n this._entityName = entityName;\n this._primaryKey = primaryKey ?? new CompositeKey();\n\n const md = this.ProviderToUse;\n const entity = md.EntityByName(entityName);\n const permissions = entity?.GetUserPermisions(md.CurrentUser);\n\n try {\n if (!entity) {\n this.failWithUserError(\n `Entity not found: \"${entityName}\"`,\n `This MemberJunction instance has no metadata for entity \"${entityName}\". Check that the entity name in the URL matches a row in __mj.Entity, and that the metadata cache is current.`\n );\n return;\n }\n\n // Resolve which form to render: User/Role/Global EntityFormOverride first,\n // then ClassFactory-registered Angular form, then nothing.\n const resolution = await this.formResolver.ResolveFormForEntity(entity, md.CurrentUser, md);\n\n if (resolution.kind === 'none') {\n this.failWithUserError(\n `No form is registered for \"${entityName}\".`,\n `MemberJunction could not find an EntityFormOverride or a class-based form for entity \"${entityName}\". This usually means CodeGen has not generated a form for this entity in the running build (forms live under packages/MJExplorer or your app's entity-form package). Run CodeGen, ensure the generated module is imported, register a custom form via @RegisterClass(BaseFormComponent, '${entityName}'), or create an EntityFormOverride row pointing at a runtime Component.`,\n { entityId: entity.ID, recordKey: primaryKey?.ToString?.() ?? '(none)' }\n );\n return;\n }\n\n const record = await md.GetEntityObject<BaseEntity>(entityName);\n if (!record) {\n throw new Error(`Unable to instantiate entity ${entityName} with primary key values: ${primaryKey.ToString()}`);\n }\n\n if (primaryKey.HasValue) {\n const loadOk = await record.InnerLoad(primaryKey);\n if (!loadOk) {\n this.failWithUserError(\n `Could not load ${entityName} record.`,\n record.LatestResult?.Message\n ? `Server error: ${record.LatestResult.Message}`\n : `InnerLoad returned false for entity \"${entityName}\" with key ${primaryKey.ToString()}. The record may not exist, you may lack permission to view it, or the load may have been blocked server-side.`,\n { recordKey: primaryKey.ToString() }\n );\n return;\n }\n // Log access to existing record (fire-and-forget, don't await)\n this.recentAccessService.logAccess(entityName, primaryKey, 'record');\n }\n else {\n record.NewRecord();\n this.SetNewRecordValues(record);\n }\n\n // CRITICAL: Track the event handler subscription for cleanup\n this._eventHandlerSubscription = record.RegisterEventHandler((eventType: BaseEntityEvent) => {\n if (eventType.type === 'save')\n this.recordSaved.emit(record);\n });\n\n const viewContainerRef = this.formContainer.viewContainerRef;\n viewContainerRef.clear();\n\n // Generated forms expose properties (e.g. `userPermissions`) that aren't\n // on the abstract `BaseFormComponent`. Widen the instance type for the\n // setter surface we share across class-based and interactive forms.\n const componentRef: ComponentRef<BaseFormComponent> = resolution.kind === 'interactive'\n ? viewContainerRef.createComponent(InteractiveFormComponent)\n : viewContainerRef.createComponent(resolution.subClass);\n\n if (resolution.kind === 'interactive') {\n (componentRef as ComponentRef<InteractiveFormComponent>).instance.ComponentID = resolution.override.ComponentID;\n }\n\n // Track component and record for cleanup\n this._formComponentRef = componentRef;\n this._currentRecord = record;\n\n const instance = componentRef.instance as BaseFormComponent & { userPermissions?: unknown };\n instance.record = record;\n instance.userPermissions = permissions;\n instance.EditMode = !primaryKey.HasValue; // for new records go direct into edit mode\n\n // Push variant list + active selection into the form so the\n // record-form-container's picker renders. The resolver returns\n // every applicable override regardless of status, but the runtime\n // picker should only surface **Active** ones — Inactive rows are\n // historical (e.g. the previous Component version that an agent\n // refinement superseded) and Pending rows are AI-authored work\n // awaiting activation in Form Builder. Picking either does\n // nothing at runtime (pickActive requires Status='Active'), so\n // including them in the picker was misleading the user into\n // thinking \"I can switch to this\" when they actually can't.\n //\n // Authorship of Pending/Inactive overrides happens in the Form\n // Builder cockpit, which intentionally shows the full lifecycle.\n instance.Variants = (resolution.variants ?? [])\n .filter(v => v.Status === 'Active')\n .map(v => ({\n ID: v.ID,\n Label: v.Name ?? `Override ${v.ID.substring(0, 8)}`,\n Scope: v.Scope,\n Status: v.Status,\n }));\n instance.CurrentVariantID = resolution.kind === 'interactive' ? resolution.override.ID : null;\n // Wire the handler: persist the selection in localStorage and reload\n // the form. Reload uses the existing entry path so all the resolver's\n // tier/priority semantics apply (and the saved choice now overrides).\n instance.OnVariantChanged = (variantID: string | null) => {\n // null from the picker = user picked the \"Default form\" row →\n // store the explicit-default sentinel so the resolver skips ALL\n // overrides and falls back to the CodeGen / @RegisterClass form.\n // Without this, clearing the preference let the resolver auto-pick\n // the first Active override again, making Default unreachable from\n // the UI for entities that have any user-scope overrides.\n if (variantID === null) {\n this.formResolver.SetExplicitDefault(entityName);\n } else {\n this.formResolver.SetSelectedVariant(entityName, variantID);\n }\n // Re-run the load with the same key — the resolver will honour the\n // updated session-local selection.\n this.LoadForm(this.PrimaryKey, entityName);\n };\n\n // Subscribe to form @Output events and map them to Explorer services\n this.subscribeToFormEvents(instance);\n\n this.useGenericForm = false;\n this.errorTitle = null;\n this.errorDetail = null;\n this.loadComplete.emit();\n } catch (err) {\n const msg = err instanceof Error ? err.message : String(err);\n this.failWithUserError(\n `Failed to load ${entityName} record.`,\n `An unexpected error occurred while loading this record: ${msg}`,\n { error: err }\n );\n }\n\n this.loading = false;\n this.cdr.detectChanges();\n }\n\n /**\n * Render a user-visible error state inside the record pane AND log a structured\n * console.error for developers. Always emits `loadComplete` so the Explorer shell\n * does not hang on its first-resource-load gate.\n */\n private failWithUserError(title: string, detail: string, context?: Record<string, unknown>): void {\n this.errorTitle = title;\n this.errorDetail = detail;\n this.loading = false;\n\n // Single structured console.error for devs — easy to grep, easy to read.\n console.error(\n `[SingleRecord] ${title}\\n${detail}` +\n (context ? `\\nContext: ${JSON.stringify(context, null, 2)}` : '')\n );\n\n // Clear any prior form/component so the error UI is what shows.\n if (this._formComponentRef) {\n try { this._formComponentRef.destroy(); } catch { /* noop */ }\n this._formComponentRef = null;\n }\n if (this.formContainer?.viewContainerRef) {\n this.formContainer.viewContainerRef.clear();\n }\n\n // Always unblock the shell.\n this.loadComplete.emit();\n this.cdr.detectChanges();\n }\n\n protected SetNewRecordValues(record: BaseEntity) {\n if (!this.newRecordValues) {\n return;\n }\n\n // Handle both object and string (URL segment) formats\n if (typeof this.newRecordValues === 'string') {\n if (this.newRecordValues.length === 0) {\n return;\n }\n // we have a URL segment string format: \"field1|value1||field2|value2\"\n const fv = new FieldValueCollection();\n fv.SimpleLoadFromURLSegment(this.newRecordValues);\n // now apply the values to the record\n fv.KeyValuePairs.filter(kvp => kvp.Value !== null && kvp.Value !== undefined).forEach(kvp => {\n const f = record.Fields.find(f => f.Name.trim().toLowerCase() === kvp.FieldName.trim().toLowerCase());\n if (f) {\n // make sure we set the value to the right type based on the f.TSType property\n switch (f.EntityFieldInfo.TSType) {\n case EntityFieldTSType.String:\n record.Set(kvp.FieldName, kvp.Value);\n break;\n case EntityFieldTSType.Number:\n record.Set(kvp.FieldName, parseFloat(kvp.Value));\n break;\n case EntityFieldTSType.Boolean:\n if (kvp.Value === 'false' || kvp.Value === '0' || kvp.Value.toString().trim().length === 0 )\n record.Set(kvp.FieldName, false);\n else\n record.Set(kvp.FieldName, true);\n break;\n case EntityFieldTSType.Date:\n record.Set(kvp.FieldName, new Date(kvp.Value));\n break;\n }\n }\n });\n }\n else {\n // we have a plain object format: { field1: value1, field2: value2 }\n const recordValues = this.newRecordValues as Record<string, unknown>;\n Object.keys(recordValues)\n .filter(key => recordValues[key] !== null && recordValues[key] !== undefined)\n .forEach(key => {\n const f = record.Fields.find(f => f.Name.trim().toLowerCase() === key.trim().toLowerCase());\n if (f) {\n const value = recordValues[key];\n // Set the value with proper type conversion\n switch (f.EntityFieldInfo.TSType) {\n case EntityFieldTSType.String:\n record.Set(key, value?.toString() || '');\n break;\n case EntityFieldTSType.Number:\n record.Set(key, typeof value === 'number' ? value : parseFloat(value?.toString() || '0'));\n break;\n case EntityFieldTSType.Boolean:\n if (typeof value === 'boolean') {\n record.Set(key, value);\n }\n else if (typeof value === 'string') {\n record.Set(key, value !== 'false' && value !== '0' && value.trim().length > 0);\n }\n else {\n record.Set(key, !!value);\n }\n break;\n case EntityFieldTSType.Date:\n record.Set(key, value instanceof Date ? value : new Date(value?.toString() || ''));\n break;\n default:\n record.Set(key, value);\n break;\n }\n }\n });\n }\n }\n\n /**\n * Subscribe to BaseFormComponent @Output events and map them to Explorer services.\n */\n private subscribeToFormEvents(form: BaseFormComponent): void {\n this.cleanupFormSubscriptions();\n\n this._formEventSubscriptions.push(\n form.Navigate.subscribe((event: FormNavigationEvent) => this.handleNavigation(event)),\n form.Notification.subscribe((event: FormNotificationEvent) => {\n this.sharedService.CreateSimpleNotification(event.Message, event.Type, event.Duration);\n })\n );\n }\n\n private handleNavigation(event: FormNavigationEvent): void {\n switch (event.Kind) {\n case 'record':\n this.navigationService.OpenEntityRecord(event.EntityName, event.PrimaryKey, { forceNewTab: event.OpenInNewTab });\n break;\n case 'new-record':\n // Creating a new related record from inside an open record form (e.g. + New\n // on a related-entity grid). Force a new tab so the parent record stays\n // intact — otherwise the new-record form silently replaces the parent in\n // single-resource mode and the user loses their context. This is the\n // original intent of dea32401ff, now stated explicitly at the call site\n // instead of as a global navigation heuristic.\n this.navigationService.OpenNewEntityRecord(event.EntityName, {\n newRecordValues: event.DefaultValues,\n forceNewTab: true,\n });\n break;\n case 'entity-hierarchy':\n this.navigationService.OpenEntityRecord(event.EntityName, event.PrimaryKey);\n break;\n case 'external-link':\n window.open(event.Url, '_blank');\n break;\n case 'email':\n window.open(`mailto:${event.EmailAddress}`, '_self');\n break;\n case 'dismiss':\n // Form asked to be dismissed (typically Discard on a new record).\n // Re-emit so the parent (EntityRecordResource) can close the tab.\n this.recordDismissed.emit();\n break;\n }\n }\n\n private cleanupFormSubscriptions(): void {\n for (const sub of this._formEventSubscriptions) {\n sub.unsubscribe();\n }\n this._formEventSubscriptions = [];\n }\n\n ngOnDestroy(): void {\n // CRITICAL: Clean up form event subscriptions first\n this.cleanupFormSubscriptions();\n\n // CRITICAL: Clean up dynamically created form component to prevent zombie components\n if (this._formComponentRef) {\n this._formComponentRef.destroy();\n this._formComponentRef = null;\n }\n\n // CRITICAL: Unsubscribe from event handler to prevent memory leaks\n if (this._eventHandlerSubscription) {\n this._eventHandlerSubscription.unsubscribe();\n this._eventHandlerSubscription = null;\n }\n \n // Clean up record reference\n if (this._currentRecord) {\n this._currentRecord = null;\n }\n \n // Clear the view container to ensure no lingering references\n if (this.formContainer?.viewContainerRef) {\n this.formContainer.viewContainerRef.clear();\n }\n \n // Reset state\n this.loading = true;\n this.useGenericForm = false;\n }\n}\n","@if (loading) {\n <mj-loading [showText]=\"false\" size=\"large\"></mj-loading>\n}\n@if (errorTitle) {\n <div class=\"single-record-error\" role=\"alert\">\n <div class=\"single-record-error__icon\">\n <i class=\"fa-solid fa-triangle-exclamation\"></i>\n </div>\n <h2 class=\"single-record-error__title\">{{ errorTitle }}</h2>\n @if (errorDetail) {\n <p class=\"single-record-error__detail\">{{ errorDetail }}</p>\n }\n <p class=\"single-record-error__hint\">See browser console for technical details.</p>\n </div>\n}\n<ng-template mjContainer></ng-template>\n"]}
1
+ {"version":3,"file":"single-record.component.js","sourceRoot":"","sources":["../../../src/lib/single-record/single-record.component.ts","../../../src/lib/single-record/single-record.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAC/E,OAAO,EAAE,YAAY,EAAc,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAA8C,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AACnH,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAClG,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;;;AAErE;;;;;;;;;;;;;GAaG;AAOH,MAAM,OAAO,qBAAsB,SAAQ,oBAAoB;IAC7C,UAAU,GAAiB,IAAI,YAAY,EAAE,CAAC;IAC9C,UAAU,GAAkB,EAAE,CAAC;IAC/B,eAAe,GAA4C,EAAE,CAAC;IAE7D,YAAY,GAAuB,IAAI,YAAY,EAAQ,CAAC;IAC5D,WAAW,GAA6B,IAAI,YAAY,EAA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AC,sHACrB,0BAAsB,IAAC,0GAC1B,0BAAsB,IAAC;YACtC,iBAAsB;;YARpB,AADA,AADA,AADA,2CAAyB,8BACA,wCACU,0BACd;;;iFDsBV,qBAAqB;cANjC,SAAS;6BACI,KAAK,YACP,kBAAkB;;kBAK3B,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBAEL,MAAM;;kBACN,MAAM;;kBAEN,MAAM;;kFARI,qBAAqB","sourcesContent":["import { Component, EventEmitter, inject, Input, Output } from '@angular/core';\nimport { CompositeKey, BaseEntity } from '@memberjunction/core';\nimport { FormNavigationEvent, FormNotificationEvent, MJFormPresenterService } from '@memberjunction/ng-base-forms';\nimport { NavigationService, RecentAccessService, SharedService } from '@memberjunction/ng-shared';\nimport { BaseAngularComponent } from '@memberjunction/ng-base-types';\n\n/**\n * Explorer-side host for a single entity record in the main tab area.\n *\n * This is now a **thin wrapper** around the Generic `<mj-entity-form-host>`\n * (in `@memberjunction/ng-base-forms`), which owns all the mechanics: resolving\n * the form (class / custom / interactive override + variants), loading the\n * record, dynamically creating the form, binding it, and tearing it down.\n *\n * SingleRecordComponent's only remaining job is the **Explorer mapping**:\n * translating the host's framework-agnostic events into Explorer services —\n * `Navigate` → {@link NavigationService}, `Notification` → {@link SharedService},\n * record loads → {@link RecentAccessService} — none of which belong in a Generic\n * component.\n */\n@Component({\n standalone: false,\n selector: 'mj-single-record',\n templateUrl: './single-record.component.html',\n styleUrls: ['./single-record.component.css']\n})\nexport class SingleRecordComponent extends BaseAngularComponent {\n @Input() public PrimaryKey: CompositeKey = new CompositeKey();\n @Input() public entityName: string | null = '';\n @Input() public newRecordValues: string | Record<string, unknown> | null = '';\n\n @Output() public loadComplete: EventEmitter<void> = new EventEmitter<void>();\n @Output() public recordSaved: EventEmitter<BaseEntity> = new EventEmitter<BaseEntity>();\n /** Emitted when the hosted form asks to be dismissed (e.g. Discard on a new record). */\n @Output() public recordDismissed: EventEmitter<void> = new EventEmitter<void>();\n\n private navigationService = inject(NavigationService);\n private sharedService = inject(SharedService);\n private formPresenter = inject(MJFormPresenterService);\n private recentAccessService = new RecentAccessService();\n\n /** Unblock the shell's first-resource-load gate (success or error). */\n onLoadComplete(): void {\n this.loadComplete.emit();\n }\n\n /** Log access for existing records once the form's record is ready. */\n onRecordReady(record: BaseEntity): void {\n if (record?.IsSaved) {\n this.recentAccessService.logAccess(record.EntityInfo.Name, record.PrimaryKey, 'record');\n }\n }\n\n onSaved(record: BaseEntity): void {\n this.recordSaved.emit(record);\n }\n\n onNotification(event: FormNotificationEvent): void {\n this.sharedService.CreateSimpleNotification(event.Message, event.Type, event.Duration);\n }\n\n /** Map the form's navigation requests onto Explorer's NavigationService. */\n handleNavigation(event: FormNavigationEvent): void {\n switch (event.Kind) {\n case 'record':\n this.navigationService.OpenEntityRecord(event.EntityName, event.PrimaryKey, { forceNewTab: event.OpenInNewTab });\n break;\n case 'new-record':\n // Creating a related record from inside an open form: force a new tab so the\n // parent record stays intact in single-resource mode.\n this.navigationService.OpenNewEntityRecord(event.EntityName, {\n newRecordValues: event.DefaultValues,\n forceNewTab: true,\n });\n break;\n case 'entity-hierarchy':\n this.navigationService.OpenEntityRecord(event.EntityName, event.PrimaryKey);\n break;\n case 'external-link':\n window.open(event.Url, '_blank');\n break;\n case 'email':\n window.open(`mailto:${event.EmailAddress}`, '_self');\n break;\n case 'dismiss':\n this.recordDismissed.emit();\n break;\n case 'create-related': {\n // A FK field wants a new related record created. Open the related entity's form\n // as a dialog/slide-in (prefilled), then hand the saved record back so the field\n // can select it.\n const ref = this.formPresenter.Open({\n EntityName: event.EntityName,\n Presentation: event.Presentation ?? 'dialog',\n NewRecordValues: event.NewRecordValues,\n Provider: event.Provider,\n });\n ref.AfterSaved().then(created => event.Complete(created));\n break;\n }\n }\n }\n}\n","<mj-entity-form-host\n [EntityName]=\"entityName\"\n [PrimaryKey]=\"PrimaryKey\"\n [NewRecordValues]=\"newRecordValues\"\n [Provider]=\"Provider\"\n (LoadComplete)=\"onLoadComplete()\"\n (LoadError)=\"onLoadComplete()\"\n (RecordReady)=\"onRecordReady($event)\"\n (Saved)=\"onSaved($event)\"\n (Navigate)=\"handleNavigation($event)\"\n (Notification)=\"onNotification($event)\"\n (Dismissed)=\"recordDismissed.emit()\">\n</mj-entity-form-host>\n"]}
@@ -1,7 +1,7 @@
1
1
  import { EventEmitter, ChangeDetectorRef, OnChanges, SimpleChanges } from '@angular/core';
2
2
  import { EntityInfo } from '@memberjunction/core';
3
3
  import { NavigationService } from '@memberjunction/ng-shared';
4
- import { DataLoadedEvent, RecordOpenedEvent, EntityViewerConfig, EntityViewMode, GridToolbarConfig } from '@memberjunction/ng-entity-viewer';
4
+ import { DataLoadedEvent, RecordOpenedEvent, EntityViewerConfig, ViewRelatedRecordNavigation } from '@memberjunction/ng-entity-viewer';
5
5
  import { BaseAngularComponent } from '@memberjunction/ng-base-types';
6
6
  import * as i0 from "@angular/core";
7
7
  type SearchState = 'loading' | 'no-results' | 'single-result' | 'viewer';
@@ -15,15 +15,10 @@ export declare class SingleSearchResultComponent extends BaseAngularComponent im
15
15
  SearchState: SearchState;
16
16
  ResultCount: number;
17
17
  EntityInfo: EntityInfo | null;
18
- CurrentViewMode: EntityViewMode;
19
- /** Whether the current entity has date fields (enables timeline view toggle) */
20
- get HasDateFields(): boolean;
21
18
  /** Resolved icon class for the entity, matching Data Explorer's format */
22
19
  get EntityIcon(): string;
23
20
  /** Configuration for the entity-viewer — matches the Data Explorer's setup */
24
21
  ViewerConfig: Partial<EntityViewerConfig>;
25
- /** Grid toolbar config — minimal action bar (no search, no column chooser) */
26
- GridToolbarConfig: Partial<GridToolbarConfig>;
27
22
  constructor(navigationService: NavigationService, cdr: ChangeDetectorRef);
28
23
  ngOnChanges(changes: SimpleChanges): void;
29
24
  /**
@@ -35,11 +30,11 @@ export declare class SingleSearchResultComponent extends BaseAngularComponent im
35
30
  private runPreQuery;
36
31
  private setNoResults;
37
32
  private navigateToSingleResult;
38
- SetViewMode(mode: EntityViewMode): void;
39
- OnViewModeChanged(mode: EntityViewMode): void;
40
33
  OnCreateNewRecord(): void;
41
34
  OnDataLoaded(event: DataLoadedEvent): void;
42
35
  OnRecordOpened(event: RecordOpenedEvent): void;
36
+ /** Navigate to a related record requested from within a view-type renderer (e.g. a foreign-key cell). */
37
+ OnOpenRelatedRecord(nav: ViewRelatedRecordNavigation): void;
43
38
  /** Format entity icon to ensure proper Font Awesome class format */
44
39
  private formatEntityIcon;
45
40
  static ɵfac: i0.ɵɵFactoryDeclaration<SingleSearchResultComponent, never>;
@@ -1 +1 @@
1
- {"version":3,"file":"single-search-result.component.d.ts","sourceRoot":"","sources":["../../../src/lib/single-search-result/single-search-result.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,YAAY,EAAiB,iBAAiB,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AACpH,OAAO,EAAyB,UAAU,EAA+B,MAAM,sBAAsB,CAAC;AACtG,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAE7I,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;;AACrE,KAAK,WAAW,GAAG,SAAS,GAAG,YAAY,GAAG,eAAe,GAAG,QAAQ,CAAC;AAEzE,qBAMa,2BAA4B,SAAQ,oBAAqB,YAAW,SAAS;IAiDtF,OAAO,CAAC,iBAAiB;IACzB,OAAO,CAAC,GAAG;IAjDG,MAAM,EAAE,MAAM,CAAM;IACpB,WAAW,EAAE,MAAM,CAAM;IACxB,YAAY,wBAA+B;IAC3C,WAAW,wBAA+B;IAEpD,WAAW,EAAE,WAAW,CAAa;IACrC,WAAW,SAAK;IAChB,UAAU,EAAE,UAAU,GAAG,IAAI,CAAQ;IACrC,eAAe,EAAE,cAAc,CAAU;IAEhD,gFAAgF;IAChF,IAAW,aAAa,IAAI,OAAO,CAGlC;IAED,0EAA0E;IAC1E,IAAW,UAAU,IAAI,MAAM,CAK9B;IAED,8EAA8E;IACvE,YAAY,EAAE,OAAO,CAAC,kBAAkB,CAAC,CAQ9C;IAEF,8EAA8E;IACvE,iBAAiB,EAAE,OAAO,CAAC,iBAAiB,CAAC,CASlD;gBAGQ,iBAAiB,EAAE,iBAAiB,EACpC,GAAG,EAAE,iBAAiB;IAIhC,WAAW,CAAC,OAAO,EAAE,aAAa,GAAG,IAAI;IAMzC;;;OAGG;YACW,aAAa;IAgC3B,OAAO,CAAC,cAAc;YAOR,WAAW;IAazB,OAAO,CAAC,YAAY;IAOpB,OAAO,CAAC,sBAAsB;IAavB,WAAW,CAAC,IAAI,EAAE,cAAc,GAAG,IAAI;IAKvC,iBAAiB,CAAC,IAAI,EAAE,cAAc,GAAG,IAAI;IAK7C,iBAAiB,IAAI,IAAI;IAQzB,YAAY,CAAC,KAAK,EAAE,eAAe,GAAG,IAAI;IAM1C,cAAc,CAAC,KAAK,EAAE,iBAAiB,GAAG,IAAI;IAIrD,oEAAoE;IACpE,OAAO,CAAC,gBAAgB;yCArKb,2BAA2B;2CAA3B,2BAA2B;CAmLvC"}
1
+ {"version":3,"file":"single-search-result.component.d.ts","sourceRoot":"","sources":["../../../src/lib/single-search-result/single-search-result.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,YAAY,EAAiB,iBAAiB,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AACpH,OAAO,EAAyB,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACzE,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAC;AAEvI,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;;AACrE,KAAK,WAAW,GAAG,SAAS,GAAG,YAAY,GAAG,eAAe,GAAG,QAAQ,CAAC;AAEzE,qBAMa,2BAA4B,SAAQ,oBAAqB,YAAW,SAAS;IA8BtF,OAAO,CAAC,iBAAiB;IACzB,OAAO,CAAC,GAAG;IA9BG,MAAM,EAAE,MAAM,CAAM;IACpB,WAAW,EAAE,MAAM,CAAM;IACxB,YAAY,wBAA+B;IAC3C,WAAW,wBAA+B;IAEpD,WAAW,EAAE,WAAW,CAAa;IACrC,WAAW,SAAK;IAChB,UAAU,EAAE,UAAU,GAAG,IAAI,CAAQ;IAE5C,0EAA0E;IAC1E,IAAW,UAAU,IAAI,MAAM,CAK9B;IAED,8EAA8E;IACvE,YAAY,EAAE,OAAO,CAAC,kBAAkB,CAAC,CAQ9C;gBAGQ,iBAAiB,EAAE,iBAAiB,EACpC,GAAG,EAAE,iBAAiB;IAIhC,WAAW,CAAC,OAAO,EAAE,aAAa,GAAG,IAAI;IAMzC;;;OAGG;YACW,aAAa;IA+B3B,OAAO,CAAC,cAAc;YAOR,WAAW;IAazB,OAAO,CAAC,YAAY;IAOpB,OAAO,CAAC,sBAAsB;IAavB,iBAAiB,IAAI,IAAI;IAQzB,YAAY,CAAC,KAAK,EAAE,eAAe,GAAG,IAAI;IAM1C,cAAc,CAAC,KAAK,EAAE,iBAAiB,GAAG,IAAI;IAIrD,yGAAyG;IAClG,mBAAmB,CAAC,GAAG,EAAE,2BAA2B,GAAG,IAAI;IAMlE,oEAAoE;IACpE,OAAO,CAAC,gBAAgB;yCA9Ib,2BAA2B;2CAA3B,2BAA2B;CA4JvC"}
@@ -1,5 +1,5 @@
1
1
  import { Component, EventEmitter, Input, Output } from '@angular/core';
2
- import { RunView, CompositeKey, EntityFieldTSType } from '@memberjunction/core';
2
+ import { RunView, CompositeKey } from '@memberjunction/core';
3
3
  import { BaseAngularComponent } from '@memberjunction/ng-base-types';
4
4
  import * as i0 from "@angular/core";
5
5
  import * as i1 from "@memberjunction/ng-shared";
@@ -34,49 +34,21 @@ function SingleSearchResultComponent_Conditional_8_Template(rf, ctx) { if (rf &
34
34
  i0.ɵɵadvance();
35
35
  i0.ɵɵtextInterpolate3("", i0.ɵɵpipeBind1(2, 3, ctx_r0.ResultCount), " ", ctx_r0.ResultCount === 1 ? "result" : "results", " for \"", ctx_r0.searchInput, "\"");
36
36
  } }
37
- function SingleSearchResultComponent_Conditional_9_Conditional_8_Template(rf, ctx) { if (rf & 1) {
38
- const _r3 = i0.ɵɵgetCurrentView();
39
- i0.ɵɵelementStart(0, "button", 19);
40
- i0.ɵɵlistener("click", function SingleSearchResultComponent_Conditional_9_Conditional_8_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r3); const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.SetViewMode("timeline")); });
41
- i0.ɵɵelement(1, "i", 20);
42
- i0.ɵɵelementEnd();
43
- } if (rf & 2) {
44
- const ctx_r0 = i0.ɵɵnextContext(2);
45
- i0.ɵɵclassProp("active", ctx_r0.CurrentViewMode === "timeline");
46
- } }
47
37
  function SingleSearchResultComponent_Conditional_9_Template(rf, ctx) { if (rf & 1) {
48
38
  const _r2 = i0.ɵɵgetCurrentView();
49
39
  i0.ɵɵelementStart(0, "div", 6)(1, "button", 11);
50
40
  i0.ɵɵlistener("click", function SingleSearchResultComponent_Conditional_9_Template_button_click_1_listener() { i0.ɵɵrestoreView(_r2); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.OnCreateNewRecord()); });
51
41
  i0.ɵɵelement(2, "i", 12);
52
- i0.ɵɵelementEnd();
53
- i0.ɵɵelementStart(3, "div", 13)(4, "button", 14);
54
- i0.ɵɵlistener("click", function SingleSearchResultComponent_Conditional_9_Template_button_click_4_listener() { i0.ɵɵrestoreView(_r2); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.SetViewMode("grid")); });
55
- i0.ɵɵelement(5, "i", 15);
56
- i0.ɵɵelementEnd();
57
- i0.ɵɵelementStart(6, "button", 16);
58
- i0.ɵɵlistener("click", function SingleSearchResultComponent_Conditional_9_Template_button_click_6_listener() { i0.ɵɵrestoreView(_r2); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.SetViewMode("cards")); });
59
- i0.ɵɵelement(7, "i", 17);
60
- i0.ɵɵelementEnd();
61
- i0.ɵɵconditionalCreate(8, SingleSearchResultComponent_Conditional_9_Conditional_8_Template, 2, 2, "button", 18);
62
42
  i0.ɵɵelementEnd()();
63
- } if (rf & 2) {
64
- const ctx_r0 = i0.ɵɵnextContext();
65
- i0.ɵɵadvance(4);
66
- i0.ɵɵclassProp("active", ctx_r0.CurrentViewMode === "grid");
67
- i0.ɵɵadvance(2);
68
- i0.ɵɵclassProp("active", ctx_r0.CurrentViewMode === "cards");
69
- i0.ɵɵadvance(2);
70
- i0.ɵɵconditional(ctx_r0.HasDateFields ? 8 : -1);
71
43
  } }
72
44
  function SingleSearchResultComponent_Conditional_10_Template(rf, ctx) { if (rf & 1) {
73
45
  i0.ɵɵelementStart(0, "div", 7);
74
- i0.ɵɵelement(1, "mj-loading", 21);
46
+ i0.ɵɵelement(1, "mj-loading", 13);
75
47
  i0.ɵɵelementEnd();
76
48
  } }
77
49
  function SingleSearchResultComponent_Conditional_11_Template(rf, ctx) { if (rf & 1) {
78
50
  i0.ɵɵelementStart(0, "div", 8);
79
- i0.ɵɵelement(1, "i", 22);
51
+ i0.ɵɵelement(1, "i", 14);
80
52
  i0.ɵɵelementStart(2, "p");
81
53
  i0.ɵɵtext(3, "No results found for \"");
82
54
  i0.ɵɵelementStart(4, "strong");
@@ -84,7 +56,7 @@ function SingleSearchResultComponent_Conditional_11_Template(rf, ctx) { if (rf &
84
56
  i0.ɵɵelementEnd();
85
57
  i0.ɵɵtext(6);
86
58
  i0.ɵɵelementEnd();
87
- i0.ɵɵelementStart(7, "p", 23);
59
+ i0.ɵɵelementStart(7, "p", 15);
88
60
  i0.ɵɵtext(8, "Try a different search term or entity");
89
61
  i0.ɵɵelementEnd()();
90
62
  } if (rf & 2) {
@@ -96,20 +68,20 @@ function SingleSearchResultComponent_Conditional_11_Template(rf, ctx) { if (rf &
96
68
  } }
97
69
  function SingleSearchResultComponent_Conditional_12_Template(rf, ctx) { if (rf & 1) {
98
70
  i0.ɵɵelementStart(0, "div", 9);
99
- i0.ɵɵelement(1, "i", 24);
71
+ i0.ɵɵelement(1, "i", 16);
100
72
  i0.ɵɵelementStart(2, "p");
101
73
  i0.ɵɵtext(3, "Found 1 result \u2014 opening record...");
102
74
  i0.ɵɵelementEnd()();
103
75
  } }
104
76
  function SingleSearchResultComponent_Conditional_13_Template(rf, ctx) { if (rf & 1) {
105
- const _r4 = i0.ɵɵgetCurrentView();
106
- i0.ɵɵelementStart(0, "div", 10)(1, "mj-entity-viewer", 25);
107
- i0.ɵɵlistener("viewModeChange", function SingleSearchResultComponent_Conditional_13_Template_mj_entity_viewer_viewModeChange_1_listener($event) { i0.ɵɵrestoreView(_r4); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.OnViewModeChanged($event)); })("dataLoaded", function SingleSearchResultComponent_Conditional_13_Template_mj_entity_viewer_dataLoaded_1_listener($event) { i0.ɵɵrestoreView(_r4); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.OnDataLoaded($event)); })("recordOpened", function SingleSearchResultComponent_Conditional_13_Template_mj_entity_viewer_recordOpened_1_listener($event) { i0.ɵɵrestoreView(_r4); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.OnRecordOpened($event)); })("addRequested", function SingleSearchResultComponent_Conditional_13_Template_mj_entity_viewer_addRequested_1_listener() { i0.ɵɵrestoreView(_r4); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.OnCreateNewRecord()); });
77
+ const _r3 = i0.ɵɵgetCurrentView();
78
+ i0.ɵɵelementStart(0, "div", 10)(1, "mj-entity-viewer", 17);
79
+ i0.ɵɵlistener("DataLoaded", function SingleSearchResultComponent_Conditional_13_Template_mj_entity_viewer_DataLoaded_1_listener($event) { i0.ɵɵrestoreView(_r3); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.OnDataLoaded($event)); })("RecordOpened", function SingleSearchResultComponent_Conditional_13_Template_mj_entity_viewer_RecordOpened_1_listener($event) { i0.ɵɵrestoreView(_r3); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.OnRecordOpened($event)); })("OpenRelatedRecordRequested", function SingleSearchResultComponent_Conditional_13_Template_mj_entity_viewer_OpenRelatedRecordRequested_1_listener($event) { i0.ɵɵrestoreView(_r3); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.OnOpenRelatedRecord($event)); })("CreateRecordRequested", function SingleSearchResultComponent_Conditional_13_Template_mj_entity_viewer_CreateRecordRequested_1_listener() { i0.ɵɵrestoreView(_r3); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.OnCreateNewRecord()); });
108
80
  i0.ɵɵelementEnd()();
109
81
  } if (rf & 2) {
110
82
  const ctx_r0 = i0.ɵɵnextContext();
111
83
  i0.ɵɵadvance();
112
- i0.ɵɵproperty("entity", ctx_r0.EntityInfo)("viewMode", ctx_r0.CurrentViewMode)("filterText", ctx_r0.searchInput)("config", ctx_r0.ViewerConfig)("showGridToolbar", true)("gridToolbarConfig", ctx_r0.GridToolbarConfig);
84
+ i0.ɵɵproperty("Entity", ctx_r0.EntityInfo)("Provider", ctx_r0.Provider)("FilterText", ctx_r0.searchInput)("Config", ctx_r0.ViewerConfig);
113
85
  } }
114
86
  export class SingleSearchResultComponent extends BaseAngularComponent {
115
87
  navigationService;
@@ -121,13 +93,6 @@ export class SingleSearchResultComponent extends BaseAngularComponent {
121
93
  SearchState = 'loading';
122
94
  ResultCount = 0;
123
95
  EntityInfo = null;
124
- CurrentViewMode = 'grid';
125
- /** Whether the current entity has date fields (enables timeline view toggle) */
126
- get HasDateFields() {
127
- if (!this.EntityInfo)
128
- return false;
129
- return this.EntityInfo.Fields.some(f => f.TSType === EntityFieldTSType.Date);
130
- }
131
96
  /** Resolved icon class for the entity, matching Data Explorer's format */
132
97
  get EntityIcon() {
133
98
  if (this.EntityInfo?.Icon) {
@@ -145,17 +110,6 @@ export class SingleSearchResultComponent extends BaseAngularComponent {
145
110
  serverSideSorting: true,
146
111
  height: '100%'
147
112
  };
148
- /** Grid toolbar config — minimal action bar (no search, no column chooser) */
149
- GridToolbarConfig = {
150
- showSearch: false,
151
- showRefresh: true,
152
- showAdd: true,
153
- showExport: true,
154
- showDelete: false,
155
- showColumnChooser: false,
156
- showRowCount: false,
157
- showSelectionCount: false
158
- };
159
113
  constructor(navigationService, cdr) {
160
114
  super();
161
115
  this.navigationService = navigationService;
@@ -173,7 +127,6 @@ export class SingleSearchResultComponent extends BaseAngularComponent {
173
127
  async ExecuteSearch() {
174
128
  this.SearchState = 'loading';
175
129
  this.ResultCount = 0;
176
- this.CurrentViewMode = 'grid';
177
130
  this.loadStarted.emit(true);
178
131
  // Resolve EntityInfo early so the header can show icon + display name during loading
179
132
  const entityInfo = this.findEntityInfo();
@@ -228,14 +181,6 @@ export class SingleSearchResultComponent extends BaseAngularComponent {
228
181
  this.loadComplete.emit(true);
229
182
  }
230
183
  // ── Header action handlers ──
231
- SetViewMode(mode) {
232
- this.CurrentViewMode = mode;
233
- this.cdr.detectChanges();
234
- }
235
- OnViewModeChanged(mode) {
236
- this.CurrentViewMode = mode;
237
- this.cdr.detectChanges();
238
- }
239
184
  OnCreateNewRecord() {
240
185
  if (this.EntityInfo) {
241
186
  this.navigationService.OpenNewEntityRecord(this.EntityInfo.Name);
@@ -250,6 +195,12 @@ export class SingleSearchResultComponent extends BaseAngularComponent {
250
195
  OnRecordOpened(event) {
251
196
  this.navigationService.OpenEntityRecord(event.entity.Name, event.compositeKey);
252
197
  }
198
+ /** Navigate to a related record requested from within a view-type renderer (e.g. a foreign-key cell). */
199
+ OnOpenRelatedRecord(nav) {
200
+ if (nav?.entityName && nav.recordKey != null) {
201
+ this.navigationService.OpenEntityRecord(nav.entityName, CompositeKey.FromID(String(nav.recordKey)));
202
+ }
203
+ }
253
204
  /** Format entity icon to ensure proper Font Awesome class format */
254
205
  formatEntityIcon(icon) {
255
206
  if (!icon) {
@@ -266,7 +217,7 @@ export class SingleSearchResultComponent extends BaseAngularComponent {
266
217
  return `fa-solid fa-${icon}`;
267
218
  }
268
219
  static ɵfac = function SingleSearchResultComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || SingleSearchResultComponent)(i0.ɵɵdirectiveInject(i1.NavigationService), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef)); };
269
- static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: SingleSearchResultComponent, selectors: [["mj-single-search-result"]], inputs: { entity: "entity", searchInput: "searchInput" }, outputs: { loadComplete: "loadComplete", loadStarted: "loadStarted" }, standalone: false, features: [i0.ɵɵInheritDefinitionFeature, i0.ɵɵNgOnChangesFeature], decls: 14, vars: 9, consts: [[1, "search-result-container"], [1, "content-header"], [1, "header-left"], [1, "entity-icon"], [1, "entity-title"], [1, "record-count"], [1, "header-right"], [1, "loading-container"], [1, "empty-state"], [1, "single-result-state"], [1, "viewer-container"], ["title", "New Record", 1, "header-action-btn", 3, "click"], [1, "fa-solid", "fa-plus"], [1, "view-mode-toggle"], ["title", "Grid View", 1, "toggle-btn", 3, "click"], [1, "fa-solid", "fa-list"], ["title", "Cards View", 1, "toggle-btn", 3, "click"], [1, "fa-solid", "fa-grip"], ["title", "Timeline View", 1, "toggle-btn", 3, "active"], ["title", "Timeline View", 1, "toggle-btn", 3, "click"], [1, "fa-solid", "fa-timeline"], ["text", "Searching..."], [1, "fa-solid", "fa-magnifying-glass", "empty-icon"], [1, "empty-hint"], [1, "fa-solid", "fa-arrow-right", "redirect-icon"], [3, "viewModeChange", "dataLoaded", "recordOpened", "addRequested", "entity", "viewMode", "filterText", "config", "showGridToolbar", "gridToolbarConfig"]], template: function SingleSearchResultComponent_Template(rf, ctx) { if (rf & 1) {
220
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: SingleSearchResultComponent, selectors: [["mj-single-search-result"]], inputs: { entity: "entity", searchInput: "searchInput" }, outputs: { loadComplete: "loadComplete", loadStarted: "loadStarted" }, standalone: false, features: [i0.ɵɵInheritDefinitionFeature, i0.ɵɵNgOnChangesFeature], decls: 14, vars: 9, consts: [[1, "search-result-container"], [1, "content-header"], [1, "header-left"], [1, "entity-icon"], [1, "entity-title"], [1, "record-count"], [1, "header-right"], [1, "loading-container"], [1, "empty-state"], [1, "single-result-state"], [1, "viewer-container"], ["title", "New Record", 1, "header-action-btn", 3, "click"], [1, "fa-solid", "fa-plus"], ["text", "Searching..."], [1, "fa-solid", "fa-magnifying-glass", "empty-icon"], [1, "empty-hint"], [1, "fa-solid", "fa-arrow-right", "redirect-icon"], [3, "DataLoaded", "RecordOpened", "OpenRelatedRecordRequested", "CreateRecordRequested", "Entity", "Provider", "FilterText", "Config"]], template: function SingleSearchResultComponent_Template(rf, ctx) { if (rf & 1) {
270
221
  i0.ɵɵelementStart(0, "div", 0)(1, "div", 1)(2, "div", 2);
271
222
  i0.ɵɵelement(3, "i", 3);
272
223
  i0.ɵɵelementStart(4, "h2", 4);
@@ -274,12 +225,12 @@ export class SingleSearchResultComponent extends BaseAngularComponent {
274
225
  i0.ɵɵelementEnd();
275
226
  i0.ɵɵconditionalCreate(6, SingleSearchResultComponent_Conditional_6_Template, 2, 1, "span", 5)(7, SingleSearchResultComponent_Conditional_7_Template, 2, 1, "span", 5)(8, SingleSearchResultComponent_Conditional_8_Template, 3, 5, "span", 5);
276
227
  i0.ɵɵelementEnd();
277
- i0.ɵɵconditionalCreate(9, SingleSearchResultComponent_Conditional_9_Template, 9, 5, "div", 6);
228
+ i0.ɵɵconditionalCreate(9, SingleSearchResultComponent_Conditional_9_Template, 3, 0, "div", 6);
278
229
  i0.ɵɵelementEnd();
279
230
  i0.ɵɵconditionalCreate(10, SingleSearchResultComponent_Conditional_10_Template, 2, 0, "div", 7);
280
231
  i0.ɵɵconditionalCreate(11, SingleSearchResultComponent_Conditional_11_Template, 9, 2, "div", 8);
281
232
  i0.ɵɵconditionalCreate(12, SingleSearchResultComponent_Conditional_12_Template, 4, 0, "div", 9);
282
- i0.ɵɵconditionalCreate(13, SingleSearchResultComponent_Conditional_13_Template, 2, 6, "div", 10);
233
+ i0.ɵɵconditionalCreate(13, SingleSearchResultComponent_Conditional_13_Template, 2, 4, "div", 10);
283
234
  i0.ɵɵelementEnd();
284
235
  } if (rf & 2) {
285
236
  i0.ɵɵadvance(3);
@@ -302,7 +253,7 @@ export class SingleSearchResultComponent extends BaseAngularComponent {
302
253
  }
303
254
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SingleSearchResultComponent, [{
304
255
  type: Component,
305
- args: [{ standalone: false, selector: 'mj-single-search-result', template: "<div class=\"search-result-container\">\n <!-- Content Header \u2014 matches Data Explorer layout -->\n <div class=\"content-header\">\n <div class=\"header-left\">\n <i [class]=\"EntityIcon\" class=\"entity-icon\"></i>\n <h2 class=\"entity-title\">{{ EntityInfo?.DisplayNameOrName || entity }}</h2>\n @if (SearchState === 'loading') {\n <span class=\"record-count\">Searching for \"{{ searchInput }}\"...</span>\n } @else if (SearchState === 'no-results') {\n <span class=\"record-count\">No results for \"{{ searchInput }}\"</span>\n } @else if (ResultCount > 0) {\n <span class=\"record-count\">{{ ResultCount | number }} {{ ResultCount === 1 ? 'result' : 'results' }} for \"{{ searchInput }}\"</span>\n }\n </div>\n\n @if (SearchState === 'viewer' && EntityInfo) {\n <div class=\"header-right\">\n <!-- New Record -->\n <button\n class=\"header-action-btn\"\n (click)=\"OnCreateNewRecord()\"\n title=\"New Record\">\n <i class=\"fa-solid fa-plus\"></i>\n </button>\n\n <!-- View Mode Toggle -->\n <div class=\"view-mode-toggle\">\n <button\n class=\"toggle-btn\"\n [class.active]=\"CurrentViewMode === 'grid'\"\n (click)=\"SetViewMode('grid')\"\n title=\"Grid View\">\n <i class=\"fa-solid fa-list\"></i>\n </button>\n <button\n class=\"toggle-btn\"\n [class.active]=\"CurrentViewMode === 'cards'\"\n (click)=\"SetViewMode('cards')\"\n title=\"Cards View\">\n <i class=\"fa-solid fa-grip\"></i>\n </button>\n @if (HasDateFields) {\n <button\n class=\"toggle-btn\"\n [class.active]=\"CurrentViewMode === 'timeline'\"\n (click)=\"SetViewMode('timeline')\"\n title=\"Timeline View\">\n <i class=\"fa-solid fa-timeline\"></i>\n </button>\n }\n </div>\n </div>\n }\n </div>\n\n <!-- Loading state -->\n @if (SearchState === 'loading') {\n <div class=\"loading-container\">\n <mj-loading text=\"Searching...\"></mj-loading>\n </div>\n }\n\n <!-- No results -->\n @if (SearchState === 'no-results') {\n <div class=\"empty-state\">\n <i class=\"fa-solid fa-magnifying-glass empty-icon\"></i>\n <p>No results found for \"<strong>{{ searchInput }}</strong>\" in {{ entity }}</p>\n <p class=\"empty-hint\">Try a different search term or entity</p>\n </div>\n }\n\n <!-- Single result \u2014 auto-navigating to entity form -->\n @if (SearchState === 'single-result') {\n <div class=\"single-result-state\">\n <i class=\"fa-solid fa-arrow-right redirect-icon\"></i>\n <p>Found 1 result &mdash; opening record...</p>\n </div>\n }\n\n <!-- Entity Viewer (2+ results) -->\n @if (SearchState === 'viewer' && EntityInfo) {\n <div class=\"viewer-container\">\n <mj-entity-viewer\n [entity]=\"EntityInfo\"\n [viewMode]=\"CurrentViewMode\"\n [filterText]=\"searchInput\"\n [config]=\"ViewerConfig\"\n [showGridToolbar]=\"true\"\n [gridToolbarConfig]=\"GridToolbarConfig\"\n (viewModeChange)=\"OnViewModeChanged($event)\"\n (dataLoaded)=\"OnDataLoaded($event)\"\n (recordOpened)=\"OnRecordOpened($event)\"\n (addRequested)=\"OnCreateNewRecord()\">\n </mj-entity-viewer>\n </div>\n }\n</div>\n", styles: [".search-result-container {\n display: flex;\n flex-direction: column;\n height: 100%;\n}\n\n/* ============================================\n CONTENT HEADER \u2014 matches Data Explorer layout\n ============================================ */\n\n.content-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 16px 24px;\n background: var(--mj-bg-surface);\n border-bottom: 1px solid var(--mj-border-default);\n flex-shrink: 0;\n gap: 24px;\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);\n}\n\n.header-left {\n display: flex;\n align-items: center;\n gap: 12px;\n flex-shrink: 0;\n flex-wrap: wrap;\n}\n\n.entity-icon {\n font-size: 20px;\n color: var(--mj-brand-primary);\n}\n\n.entity-title {\n margin: 0;\n font-size: 20px;\n font-weight: 600;\n color: var(--mj-text-primary);\n}\n\n.record-count {\n font-size: 13px;\n color: var(--mj-text-secondary);\n font-weight: 500;\n}\n\n/* ============================================\n HEADER RIGHT \u2014 action buttons, view mode toggle\n ============================================ */\n\n.header-right {\n display: flex;\n align-items: center;\n gap: 16px;\n flex-shrink: 0;\n}\n\n/* Action Button (New Record, Export, etc.) */\n.header-action-btn {\n position: relative;\n width: 36px;\n height: 36px;\n border: 1px solid var(--mj-border-default);\n background: var(--mj-bg-surface);\n border-radius: 8px;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n color: var(--mj-text-secondary);\n transition: all 0.15s ease;\n}\n.header-action-btn:hover {\n border-color: var(--mj-brand-primary);\n color: var(--mj-brand-primary);\n background: color-mix(in srgb, var(--mj-brand-primary) 5%, var(--mj-bg-surface));\n}\n.header-action-btn i {\n font-size: 14px;\n}\n\n/* View Mode Toggle */\n.view-mode-toggle {\n display: flex;\n background: var(--mj-bg-surface-sunken);\n border-radius: 8px;\n padding: 3px;\n}\n\n.toggle-btn {\n width: 36px;\n height: 32px;\n border: none;\n background: transparent;\n border-radius: 6px;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n color: var(--mj-text-secondary);\n transition: all 0.15s ease;\n}\n.toggle-btn:hover {\n color: var(--mj-text-primary);\n}\n.toggle-btn.active {\n background: var(--mj-bg-surface);\n color: var(--mj-brand-primary);\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);\n}\n\n/* ============================================\n LOADING STATE\n ============================================ */\n\n.loading-container {\n display: flex;\n justify-content: center;\n align-items: center;\n padding: 48px 0;\n}\n\n/* ============================================\n EMPTY STATE\n ============================================ */\n\n.empty-state {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding: 64px 0;\n color: var(--mj-text-secondary);\n}\n\n.empty-icon {\n font-size: 48px;\n color: var(--mj-border-strong);\n margin-bottom: 16px;\n}\n\n.empty-state p {\n margin: 4px 0;\n font-size: 15px;\n}\n\n.empty-hint {\n color: var(--mj-text-disabled);\n font-size: 13px !important;\n}\n\n/* ============================================\n SINGLE RESULT \u2014 auto-nav state\n ============================================ */\n\n.single-result-state {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding: 64px 0;\n color: var(--mj-text-secondary);\n}\n\n.redirect-icon {\n font-size: 32px;\n color: var(--mj-brand-primary);\n margin-bottom: 16px;\n}\n\n.single-result-state p {\n font-size: 15px;\n margin: 4px 0;\n}\n\n/* ============================================\n VIEWER CONTAINER\n ============================================ */\n\n.viewer-container {\n flex: 1;\n min-height: 0;\n}\n"] }]
256
+ args: [{ standalone: false, selector: 'mj-single-search-result', template: "<div class=\"search-result-container\">\n <!-- Content Header \u2014 matches Data Explorer layout -->\n <div class=\"content-header\">\n <div class=\"header-left\">\n <i [class]=\"EntityIcon\" class=\"entity-icon\"></i>\n <h2 class=\"entity-title\">{{ EntityInfo?.DisplayNameOrName || entity }}</h2>\n @if (SearchState === 'loading') {\n <span class=\"record-count\">Searching for \"{{ searchInput }}\"...</span>\n } @else if (SearchState === 'no-results') {\n <span class=\"record-count\">No results for \"{{ searchInput }}\"</span>\n } @else if (ResultCount > 0) {\n <span class=\"record-count\">{{ ResultCount | number }} {{ ResultCount === 1 ? 'result' : 'results' }} for \"{{ searchInput }}\"</span>\n }\n </div>\n\n @if (SearchState === 'viewer' && EntityInfo) {\n <div class=\"header-right\">\n <!-- New Record -->\n <button\n class=\"header-action-btn\"\n (click)=\"OnCreateNewRecord()\"\n title=\"New Record\">\n <i class=\"fa-solid fa-plus\"></i>\n </button>\n </div>\n }\n </div>\n\n <!-- Loading state -->\n @if (SearchState === 'loading') {\n <div class=\"loading-container\">\n <mj-loading text=\"Searching...\"></mj-loading>\n </div>\n }\n\n <!-- No results -->\n @if (SearchState === 'no-results') {\n <div class=\"empty-state\">\n <i class=\"fa-solid fa-magnifying-glass empty-icon\"></i>\n <p>No results found for \"<strong>{{ searchInput }}</strong>\" in {{ entity }}</p>\n <p class=\"empty-hint\">Try a different search term or entity</p>\n </div>\n }\n\n <!-- Single result \u2014 auto-navigating to entity form -->\n @if (SearchState === 'single-result') {\n <div class=\"single-result-state\">\n <i class=\"fa-solid fa-arrow-right redirect-icon\"></i>\n <p>Found 1 result &mdash; opening record...</p>\n </div>\n }\n\n <!-- Entity Viewer (2+ results) -->\n @if (SearchState === 'viewer' && EntityInfo) {\n <div class=\"viewer-container\">\n <mj-entity-viewer\n [Entity]=\"EntityInfo\"\n [Provider]=\"Provider\"\n [FilterText]=\"searchInput\"\n [Config]=\"ViewerConfig\"\n (DataLoaded)=\"OnDataLoaded($event)\"\n (RecordOpened)=\"OnRecordOpened($event)\"\n (OpenRelatedRecordRequested)=\"OnOpenRelatedRecord($event)\"\n (CreateRecordRequested)=\"OnCreateNewRecord()\">\n </mj-entity-viewer>\n </div>\n }\n</div>\n", styles: [".search-result-container {\n display: flex;\n flex-direction: column;\n height: 100%;\n}\n\n/* ============================================\n CONTENT HEADER \u2014 matches Data Explorer layout\n ============================================ */\n\n.content-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 16px 24px;\n background: var(--mj-bg-surface);\n border-bottom: 1px solid var(--mj-border-default);\n flex-shrink: 0;\n gap: 24px;\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);\n}\n\n.header-left {\n display: flex;\n align-items: center;\n gap: 12px;\n flex-shrink: 0;\n flex-wrap: wrap;\n}\n\n.entity-icon {\n font-size: 20px;\n color: var(--mj-brand-primary);\n}\n\n.entity-title {\n margin: 0;\n font-size: 20px;\n font-weight: 600;\n color: var(--mj-text-primary);\n}\n\n.record-count {\n font-size: 13px;\n color: var(--mj-text-secondary);\n font-weight: 500;\n}\n\n/* ============================================\n HEADER RIGHT \u2014 action buttons, view mode toggle\n ============================================ */\n\n.header-right {\n display: flex;\n align-items: center;\n gap: 16px;\n flex-shrink: 0;\n}\n\n/* Action Button (New Record, Export, etc.) */\n.header-action-btn {\n position: relative;\n width: 36px;\n height: 36px;\n border: 1px solid var(--mj-border-default);\n background: var(--mj-bg-surface);\n border-radius: 8px;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n color: var(--mj-text-secondary);\n transition: all 0.15s ease;\n}\n.header-action-btn:hover {\n border-color: var(--mj-brand-primary);\n color: var(--mj-brand-primary);\n background: color-mix(in srgb, var(--mj-brand-primary) 5%, var(--mj-bg-surface));\n}\n.header-action-btn i {\n font-size: 14px;\n}\n\n/* View Mode Toggle */\n.view-mode-toggle {\n display: flex;\n background: var(--mj-bg-surface-sunken);\n border-radius: 8px;\n padding: 3px;\n}\n\n.toggle-btn {\n width: 36px;\n height: 32px;\n border: none;\n background: transparent;\n border-radius: 6px;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n color: var(--mj-text-secondary);\n transition: all 0.15s ease;\n}\n.toggle-btn:hover {\n color: var(--mj-text-primary);\n}\n.toggle-btn.active {\n background: var(--mj-bg-surface);\n color: var(--mj-brand-primary);\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);\n}\n\n/* ============================================\n LOADING STATE\n ============================================ */\n\n.loading-container {\n display: flex;\n justify-content: center;\n align-items: center;\n padding: 48px 0;\n}\n\n/* ============================================\n EMPTY STATE\n ============================================ */\n\n.empty-state {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding: 64px 0;\n color: var(--mj-text-secondary);\n}\n\n.empty-icon {\n font-size: 48px;\n color: var(--mj-border-strong);\n margin-bottom: 16px;\n}\n\n.empty-state p {\n margin: 4px 0;\n font-size: 15px;\n}\n\n.empty-hint {\n color: var(--mj-text-disabled);\n font-size: 13px !important;\n}\n\n/* ============================================\n SINGLE RESULT \u2014 auto-nav state\n ============================================ */\n\n.single-result-state {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding: 64px 0;\n color: var(--mj-text-secondary);\n}\n\n.redirect-icon {\n font-size: 32px;\n color: var(--mj-brand-primary);\n margin-bottom: 16px;\n}\n\n.single-result-state p {\n font-size: 15px;\n margin: 4px 0;\n}\n\n/* ============================================\n VIEWER CONTAINER\n ============================================ */\n\n.viewer-container {\n flex: 1;\n min-height: 0;\n}\n"] }]
306
257
  }], () => [{ type: i1.NavigationService }, { type: i0.ChangeDetectorRef }], { entity: [{
307
258
  type: Input
308
259
  }], searchInput: [{
@@ -1 +1 @@
1
- {"version":3,"file":"single-search-result.component.js","sourceRoot":"","sources":["../../../src/lib/single-search-result/single-search-result.component.ts","../../../src/lib/single-search-result/single-search-result.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,EAA+C,MAAM,eAAe,CAAC;AACpH,OAAO,EAAE,OAAO,EAAE,YAAY,EAAc,iBAAiB,EAAY,MAAM,sBAAsB,CAAC;AAItG,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;;;;;;;ICE7D,+BAA2B;IAAA,YAAoC;IAAA,iBAAO;;;IAA3C,cAAoC;IAApC,sEAAoC;;;IAE/D,+BAA2B;IAAA,YAAkC;IAAA,iBAAO;;;IAAzC,cAAkC;IAAlC,oEAAkC;;;IAE7D,+BAA2B;IAAA,YAAiG;;IAAA,iBAAO;;;IAAxG,cAAiG;IAAjG,8JAAiG;;;;IA+BxH,kCAIwB;IADtB,8MAAS,mBAAY,UAAU,CAAC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YAC5D,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,IAAI,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC;YAC3D,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE,CAAC;YAC3B,OAAO,IAAI,CAAC;QACd,CAAC;QACD,IAAI,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE,CAAC;YAC3B,OAAO,YAAY,IAAI,EAAE,CAAC;QAC5B,CAAC;QACD,OAAO,eAAe,IAAI,EAAE,CAAC;IAC/B,CAAC;qHAlLU,2BAA2B;6DAA3B,2BAA2B;YCXpC,AADF,AAFF,8BAAqC,aAEP,aACD;YACvB,uBAAgD;YAChD,6BAAyB;YAAA,YAA6C;YAAA,iBAAK;YAKzE,AAFA,AAFF,8FAAiC,wEAEU,wEAEb;YAGhC,iBAAM;YAEN,6FAA8C;YAsChD,iBAAM;YAGN,+FAAiC;YAOjC,+FAAoC;YASpC,+FAAuC;YAQvC,gGAA8C;YAgBhD,iBAAM;;YA5FG,eAAoB;YAApB,6BAAoB;YACE,eAA6C;YAA7C,sGAA6C;YACtE,cAMC;YAND,yHAMC;YAGH,eAqCC;YArCD,yEAqCC;YAIH,cAIC;YAJD,yDAIC;YAGD,cAMC;YAND,4DAMC;YAGD,cAKC;YALD,+DAKC;YAGD,cAeC;YAfD,0EAeC;;;iFDjFU,2BAA2B;cANvC,SAAS;6BACI,KAAK,YACP,yBAAyB;;kBAKlC,KAAK;;kBACL,KAAK;;kBACL,MAAM;;kBACN,MAAM;;kFAJI,2BAA2B","sourcesContent":["import { Component, EventEmitter, Input, Output, ChangeDetectorRef, OnChanges, SimpleChanges } from '@angular/core';\nimport { RunView, CompositeKey, EntityInfo, EntityFieldTSType, Metadata } from '@memberjunction/core';\nimport { NavigationService } from '@memberjunction/ng-shared';\nimport { DataLoadedEvent, RecordOpenedEvent, EntityViewerConfig, EntityViewMode, GridToolbarConfig } from '@memberjunction/ng-entity-viewer';\n\nimport { BaseAngularComponent } from '@memberjunction/ng-base-types';\ntype SearchState = 'loading' | 'no-results' | 'single-result' | 'viewer';\n\n@Component({\n standalone: false,\n selector: 'mj-single-search-result',\n templateUrl: './single-search-result.component.html',\n styleUrls: ['./single-search-result.component.css']\n})\nexport class SingleSearchResultComponent extends BaseAngularComponent implements OnChanges {\n @Input() public entity: string = '';\n @Input() public searchInput: string = '';\n @Output() public loadComplete = new EventEmitter<boolean>();\n @Output() public loadStarted = new EventEmitter<boolean>();\n\n public SearchState: SearchState = 'loading';\n public ResultCount = 0;\n public EntityInfo: EntityInfo | null = null;\n public CurrentViewMode: EntityViewMode = 'grid';\n\n /** Whether the current entity has date fields (enables timeline view toggle) */\n public get HasDateFields(): boolean {\n if (!this.EntityInfo) return false;\n return this.EntityInfo.Fields.some(f => f.TSType === EntityFieldTSType.Date);\n }\n\n /** Resolved icon class for the entity, matching Data Explorer's format */\n public get EntityIcon(): string {\n if (this.EntityInfo?.Icon) {\n return this.formatEntityIcon(this.EntityInfo.Icon);\n }\n return 'fa-solid fa-table';\n }\n\n /** Configuration for the entity-viewer — matches the Data Explorer's setup */\n public ViewerConfig: Partial<EntityViewerConfig> = {\n showFilter: false,\n showViewModeToggle: false,\n showRecordCount: false,\n showPagination: true,\n serverSideFiltering: true,\n serverSideSorting: true,\n height: '100%'\n };\n\n /** Grid toolbar config — minimal action bar (no search, no column chooser) */\n public GridToolbarConfig: Partial<GridToolbarConfig> = {\n showSearch: false,\n showRefresh: true,\n showAdd: true,\n showExport: true,\n showDelete: false,\n showColumnChooser: false,\n showRowCount: false,\n showSelectionCount: false\n };\n\n constructor(\n private navigationService: NavigationService,\n private cdr: ChangeDetectorRef\n ) {\n super();}\n\n ngOnChanges(changes: SimpleChanges): void {\n if ((changes['entity'] || changes['searchInput']) && this.entity && this.searchInput) {\n this.ExecuteSearch();\n }\n }\n\n /**\n * Runs a lightweight pre-query (MaxRows: 2, PK fields only) to determine result count,\n * then routes to the appropriate state: no-results, single-result auto-nav, or viewer.\n */\n private async ExecuteSearch(): Promise<void> {\n this.SearchState = 'loading';\n this.ResultCount = 0;\n this.CurrentViewMode = 'grid';\n this.loadStarted.emit(true);\n\n // Resolve EntityInfo early so the header can show icon + display name during loading\n const entityInfo = this.findEntityInfo();\n this.EntityInfo = entityInfo ?? null;\n this.cdr.detectChanges();\n\n if (!entityInfo) {\n this.setNoResults();\n return;\n }\n\n const result = await this.runPreQuery(entityInfo);\n if (!result.Success || result.Results.length === 0) {\n this.setNoResults();\n return;\n }\n\n if (result.Results.length === 1) {\n this.navigateToSingleResult(entityInfo, result.Results[0]);\n return;\n }\n\n // 2+ results — show the entity-viewer\n this.SearchState = 'viewer';\n this.cdr.detectChanges();\n }\n\n private findEntityInfo(): EntityInfo | undefined {\n const md = this.ProviderToUse;\n return md.Entities.find(e =>\n e.Name.trim().toLowerCase() === this.entity.trim().toLowerCase()\n );\n }\n\n private async runPreQuery(entityInfo: EntityInfo) {\n const rv = RunView.FromMetadataProvider(this.ProviderToUse);\n const pkFields = entityInfo.PrimaryKeys.map(pk => pk.Name);\n return rv.RunView<Record<string, unknown>>({\n EntityName: this.entity,\n ExtraFilter: 'ID IS NOT NULL',\n UserSearchString: this.searchInput,\n Fields: pkFields,\n ResultType: 'simple',\n MaxRows: 2,\n });\n }\n\n private setNoResults(): void {\n this.SearchState = 'no-results';\n this.ResultCount = 0;\n this.loadComplete.emit(true);\n this.cdr.detectChanges();\n }\n\n private navigateToSingleResult(entityInfo: EntityInfo, record: Record<string, unknown>): void {\n this.SearchState = 'single-result';\n this.ResultCount = 1;\n this.cdr.detectChanges();\n\n const compositeKey = new CompositeKey();\n compositeKey.LoadFromEntityInfoAndRecord(entityInfo, record);\n this.navigationService.OpenEntityRecord(entityInfo.Name, compositeKey);\n this.loadComplete.emit(true);\n }\n\n // ── Header action handlers ──\n\n public SetViewMode(mode: EntityViewMode): void {\n this.CurrentViewMode = mode;\n this.cdr.detectChanges();\n }\n\n public OnViewModeChanged(mode: EntityViewMode): void {\n this.CurrentViewMode = mode;\n this.cdr.detectChanges();\n }\n\n public OnCreateNewRecord(): void {\n if (this.EntityInfo) {\n this.navigationService.OpenNewEntityRecord(this.EntityInfo.Name);\n }\n }\n\n // ── Entity-viewer event handlers ──\n\n public OnDataLoaded(event: DataLoadedEvent): void {\n this.ResultCount = event.totalRowCount;\n this.loadComplete.emit(true);\n this.cdr.detectChanges();\n }\n\n public OnRecordOpened(event: RecordOpenedEvent): void {\n this.navigationService.OpenEntityRecord(event.entity.Name, event.compositeKey);\n }\n\n /** Format entity icon to ensure proper Font Awesome class format */\n private formatEntityIcon(icon: string): string {\n if (!icon) {\n return 'fa-solid fa-table';\n }\n if (icon.startsWith('fa-solid') || icon.startsWith('fa-regular') ||\n icon.startsWith('fa-light') || icon.startsWith('fa-brands') ||\n icon.startsWith('fa ')) {\n return icon;\n }\n if (icon.startsWith('fa-')) {\n return `fa-solid ${icon}`;\n }\n return `fa-solid fa-${icon}`;\n }\n}\n","<div class=\"search-result-container\">\n <!-- Content Header — matches Data Explorer layout -->\n <div class=\"content-header\">\n <div class=\"header-left\">\n <i [class]=\"EntityIcon\" class=\"entity-icon\"></i>\n <h2 class=\"entity-title\">{{ EntityInfo?.DisplayNameOrName || entity }}</h2>\n @if (SearchState === 'loading') {\n <span class=\"record-count\">Searching for \"{{ searchInput }}\"...</span>\n } @else if (SearchState === 'no-results') {\n <span class=\"record-count\">No results for \"{{ searchInput }}\"</span>\n } @else if (ResultCount > 0) {\n <span class=\"record-count\">{{ ResultCount | number }} {{ ResultCount === 1 ? 'result' : 'results' }} for \"{{ searchInput }}\"</span>\n }\n </div>\n\n @if (SearchState === 'viewer' && EntityInfo) {\n <div class=\"header-right\">\n <!-- New Record -->\n <button\n class=\"header-action-btn\"\n (click)=\"OnCreateNewRecord()\"\n title=\"New Record\">\n <i class=\"fa-solid fa-plus\"></i>\n </button>\n\n <!-- View Mode Toggle -->\n <div class=\"view-mode-toggle\">\n <button\n class=\"toggle-btn\"\n [class.active]=\"CurrentViewMode === 'grid'\"\n (click)=\"SetViewMode('grid')\"\n title=\"Grid View\">\n <i class=\"fa-solid fa-list\"></i>\n </button>\n <button\n class=\"toggle-btn\"\n [class.active]=\"CurrentViewMode === 'cards'\"\n (click)=\"SetViewMode('cards')\"\n title=\"Cards View\">\n <i class=\"fa-solid fa-grip\"></i>\n </button>\n @if (HasDateFields) {\n <button\n class=\"toggle-btn\"\n [class.active]=\"CurrentViewMode === 'timeline'\"\n (click)=\"SetViewMode('timeline')\"\n title=\"Timeline View\">\n <i class=\"fa-solid fa-timeline\"></i>\n </button>\n }\n </div>\n </div>\n }\n </div>\n\n <!-- Loading state -->\n @if (SearchState === 'loading') {\n <div class=\"loading-container\">\n <mj-loading text=\"Searching...\"></mj-loading>\n </div>\n }\n\n <!-- No results -->\n @if (SearchState === 'no-results') {\n <div class=\"empty-state\">\n <i class=\"fa-solid fa-magnifying-glass empty-icon\"></i>\n <p>No results found for \"<strong>{{ searchInput }}</strong>\" in {{ entity }}</p>\n <p class=\"empty-hint\">Try a different search term or entity</p>\n </div>\n }\n\n <!-- Single result — auto-navigating to entity form -->\n @if (SearchState === 'single-result') {\n <div class=\"single-result-state\">\n <i class=\"fa-solid fa-arrow-right redirect-icon\"></i>\n <p>Found 1 result &mdash; opening record...</p>\n </div>\n }\n\n <!-- Entity Viewer (2+ results) -->\n @if (SearchState === 'viewer' && EntityInfo) {\n <div class=\"viewer-container\">\n <mj-entity-viewer\n [entity]=\"EntityInfo\"\n [viewMode]=\"CurrentViewMode\"\n [filterText]=\"searchInput\"\n [config]=\"ViewerConfig\"\n [showGridToolbar]=\"true\"\n [gridToolbarConfig]=\"GridToolbarConfig\"\n (viewModeChange)=\"OnViewModeChanged($event)\"\n (dataLoaded)=\"OnDataLoaded($event)\"\n (recordOpened)=\"OnRecordOpened($event)\"\n (addRequested)=\"OnCreateNewRecord()\">\n </mj-entity-viewer>\n </div>\n }\n</div>\n"]}
1
+ {"version":3,"file":"single-search-result.component.js","sourceRoot":"","sources":["../../../src/lib/single-search-result/single-search-result.component.ts","../../../src/lib/single-search-result/single-search-result.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,EAA+C,MAAM,eAAe,CAAC;AACpH,OAAO,EAAE,OAAO,EAAE,YAAY,EAAc,MAAM,sBAAsB,CAAC;AAIzE,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;;;;;;;ICE7D,+BAA2B;IAAA,YAAoC;IAAA,iBAAO;;;IAA3C,cAAoC;IAApC,sEAAoC;;;IAE/D,+BAA2B;IAAA,YAAkC;IAAA,iBAAO;;;IAAzC,cAAkC;IAAlC,oEAAkC;;;IAE7D,+BAA2B;IAAA,YAAiG;;IAAA,iBAAO;;;IAAxG,cAAiG;IAAjG,8JAAiG;;;;IAO5H,AAFF,8BAA0B,iBAKH;IADnB,+LAAS,0BAAmB,KAAC;IAE7B,wBAAgC;IAEpC,AADE,iBAAS,EACL;;;IAMR,8BAA+B;IAC7B,iCAA6C;IAC/C,iBAAM;;;IAKN,8BAAyB;IACvB,wBAAuD;IACvD,yBAAG;IAAA,uCAAsB;IAAA,8BAAQ;IAAA,YAAiB;IAAA,iBAAS;IAAA,YAAiB;IAAA,iBAAI;IAChF,6BAAsB;IAAA,qDAAqC;IAC7D,AAD6D,iBAAI,EAC3D;;;IAF6B,eAAiB;IAAjB,wCAAiB;IAAS,cAAiB;IAAjB,8CAAiB;;;IAO9E,8BAAiC;IAC/B,wBAAqD;IACrD,yBAAG;IAAA,uDAAwC;IAC7C,AAD6C,iBAAI,EAC3C;;;;IAMJ,AADF,+BAA8B,2BASoB;IAA9C,AADA,AADA,AADA,0NAAc,2BAAoB,KAAC,iNACnB,6BAAsB,KAAC,6OACT,kCAA2B,KAAC,6NACjC,0BAAmB,KAAC;IAEjD,AADE,iBAAmB,EACf;;;IATF,cAAqB;IAGrB,AADA,AADA,AADA,0CAAqB,6BACA,kCACK,+BACH;;AD7C/B,MAAM,OA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P,aACD;YACvB,uBAAgD;YAChD,6BAAyB;YAAA,YAA6C;YAAA,iBAAK;YAKzE,AAFA,AAFF,8FAAiC,wEAEU,wEAEb;YAGhC,iBAAM;YAEN,6FAA8C;YAWhD,iBAAM;YAGN,+FAAiC;YAOjC,+FAAoC;YASpC,+FAAuC;YAQvC,gGAA8C;YAchD,iBAAM;;YA/DG,eAAoB;YAApB,6BAAoB;YACE,eAA6C;YAA7C,sGAA6C;YACtE,cAMC;YAND,yHAMC;YAGH,eAUC;YAVD,yEAUC;YAIH,cAIC;YAJD,yDAIC;YAGD,cAMC;YAND,4DAMC;YAGD,cAKC;YALD,+DAKC;YAGD,cAaC;YAbD,0EAaC;;;iFDpDU,2BAA2B;cANvC,SAAS;6BACI,KAAK,YACP,yBAAyB;;kBAKlC,KAAK;;kBACL,KAAK;;kBACL,MAAM;;kBACN,MAAM;;kFAJI,2BAA2B","sourcesContent":["import { Component, EventEmitter, Input, Output, ChangeDetectorRef, OnChanges, SimpleChanges } from '@angular/core';\nimport { RunView, CompositeKey, EntityInfo } from '@memberjunction/core';\nimport { NavigationService } from '@memberjunction/ng-shared';\nimport { DataLoadedEvent, RecordOpenedEvent, EntityViewerConfig, ViewRelatedRecordNavigation } from '@memberjunction/ng-entity-viewer';\n\nimport { BaseAngularComponent } from '@memberjunction/ng-base-types';\ntype SearchState = 'loading' | 'no-results' | 'single-result' | 'viewer';\n\n@Component({\n standalone: false,\n selector: 'mj-single-search-result',\n templateUrl: './single-search-result.component.html',\n styleUrls: ['./single-search-result.component.css']\n})\nexport class SingleSearchResultComponent extends BaseAngularComponent implements OnChanges {\n @Input() public entity: string = '';\n @Input() public searchInput: string = '';\n @Output() public loadComplete = new EventEmitter<boolean>();\n @Output() public loadStarted = new EventEmitter<boolean>();\n\n public SearchState: SearchState = 'loading';\n public ResultCount = 0;\n public EntityInfo: EntityInfo | null = null;\n\n /** Resolved icon class for the entity, matching Data Explorer's format */\n public get EntityIcon(): string {\n if (this.EntityInfo?.Icon) {\n return this.formatEntityIcon(this.EntityInfo.Icon);\n }\n return 'fa-solid fa-table';\n }\n\n /** Configuration for the entity-viewer — matches the Data Explorer's setup */\n public ViewerConfig: Partial<EntityViewerConfig> = {\n showFilter: false,\n showViewModeToggle: false,\n showRecordCount: false,\n showPagination: true,\n serverSideFiltering: true,\n serverSideSorting: true,\n height: '100%'\n };\n\n constructor(\n private navigationService: NavigationService,\n private cdr: ChangeDetectorRef\n ) {\n super();}\n\n ngOnChanges(changes: SimpleChanges): void {\n if ((changes['entity'] || changes['searchInput']) && this.entity && this.searchInput) {\n this.ExecuteSearch();\n }\n }\n\n /**\n * Runs a lightweight pre-query (MaxRows: 2, PK fields only) to determine result count,\n * then routes to the appropriate state: no-results, single-result auto-nav, or viewer.\n */\n private async ExecuteSearch(): Promise<void> {\n this.SearchState = 'loading';\n this.ResultCount = 0;\n this.loadStarted.emit(true);\n\n // Resolve EntityInfo early so the header can show icon + display name during loading\n const entityInfo = this.findEntityInfo();\n this.EntityInfo = entityInfo ?? null;\n this.cdr.detectChanges();\n\n if (!entityInfo) {\n this.setNoResults();\n return;\n }\n\n const result = await this.runPreQuery(entityInfo);\n if (!result.Success || result.Results.length === 0) {\n this.setNoResults();\n return;\n }\n\n if (result.Results.length === 1) {\n this.navigateToSingleResult(entityInfo, result.Results[0]);\n return;\n }\n\n // 2+ results — show the entity-viewer\n this.SearchState = 'viewer';\n this.cdr.detectChanges();\n }\n\n private findEntityInfo(): EntityInfo | undefined {\n const md = this.ProviderToUse;\n return md.Entities.find(e =>\n e.Name.trim().toLowerCase() === this.entity.trim().toLowerCase()\n );\n }\n\n private async runPreQuery(entityInfo: EntityInfo) {\n const rv = RunView.FromMetadataProvider(this.ProviderToUse);\n const pkFields = entityInfo.PrimaryKeys.map(pk => pk.Name);\n return rv.RunView<Record<string, unknown>>({\n EntityName: this.entity,\n ExtraFilter: 'ID IS NOT NULL',\n UserSearchString: this.searchInput,\n Fields: pkFields,\n ResultType: 'simple',\n MaxRows: 2,\n });\n }\n\n private setNoResults(): void {\n this.SearchState = 'no-results';\n this.ResultCount = 0;\n this.loadComplete.emit(true);\n this.cdr.detectChanges();\n }\n\n private navigateToSingleResult(entityInfo: EntityInfo, record: Record<string, unknown>): void {\n this.SearchState = 'single-result';\n this.ResultCount = 1;\n this.cdr.detectChanges();\n\n const compositeKey = new CompositeKey();\n compositeKey.LoadFromEntityInfoAndRecord(entityInfo, record);\n this.navigationService.OpenEntityRecord(entityInfo.Name, compositeKey);\n this.loadComplete.emit(true);\n }\n\n // ── Header action handlers ──\n\n public OnCreateNewRecord(): void {\n if (this.EntityInfo) {\n this.navigationService.OpenNewEntityRecord(this.EntityInfo.Name);\n }\n }\n\n // ── Entity-viewer event handlers ──\n\n public OnDataLoaded(event: DataLoadedEvent): void {\n this.ResultCount = event.totalRowCount;\n this.loadComplete.emit(true);\n this.cdr.detectChanges();\n }\n\n public OnRecordOpened(event: RecordOpenedEvent): void {\n this.navigationService.OpenEntityRecord(event.entity.Name, event.compositeKey);\n }\n\n /** Navigate to a related record requested from within a view-type renderer (e.g. a foreign-key cell). */\n public OnOpenRelatedRecord(nav: ViewRelatedRecordNavigation): void {\n if (nav?.entityName && nav.recordKey != null) {\n this.navigationService.OpenEntityRecord(nav.entityName, CompositeKey.FromID(String(nav.recordKey)));\n }\n }\n\n /** Format entity icon to ensure proper Font Awesome class format */\n private formatEntityIcon(icon: string): string {\n if (!icon) {\n return 'fa-solid fa-table';\n }\n if (icon.startsWith('fa-solid') || icon.startsWith('fa-regular') ||\n icon.startsWith('fa-light') || icon.startsWith('fa-brands') ||\n icon.startsWith('fa ')) {\n return icon;\n }\n if (icon.startsWith('fa-')) {\n return `fa-solid ${icon}`;\n }\n return `fa-solid fa-${icon}`;\n }\n}\n","<div class=\"search-result-container\">\n <!-- Content Header — matches Data Explorer layout -->\n <div class=\"content-header\">\n <div class=\"header-left\">\n <i [class]=\"EntityIcon\" class=\"entity-icon\"></i>\n <h2 class=\"entity-title\">{{ EntityInfo?.DisplayNameOrName || entity }}</h2>\n @if (SearchState === 'loading') {\n <span class=\"record-count\">Searching for \"{{ searchInput }}\"...</span>\n } @else if (SearchState === 'no-results') {\n <span class=\"record-count\">No results for \"{{ searchInput }}\"</span>\n } @else if (ResultCount > 0) {\n <span class=\"record-count\">{{ ResultCount | number }} {{ ResultCount === 1 ? 'result' : 'results' }} for \"{{ searchInput }}\"</span>\n }\n </div>\n\n @if (SearchState === 'viewer' && EntityInfo) {\n <div class=\"header-right\">\n <!-- New Record -->\n <button\n class=\"header-action-btn\"\n (click)=\"OnCreateNewRecord()\"\n title=\"New Record\">\n <i class=\"fa-solid fa-plus\"></i>\n </button>\n </div>\n }\n </div>\n\n <!-- Loading state -->\n @if (SearchState === 'loading') {\n <div class=\"loading-container\">\n <mj-loading text=\"Searching...\"></mj-loading>\n </div>\n }\n\n <!-- No results -->\n @if (SearchState === 'no-results') {\n <div class=\"empty-state\">\n <i class=\"fa-solid fa-magnifying-glass empty-icon\"></i>\n <p>No results found for \"<strong>{{ searchInput }}</strong>\" in {{ entity }}</p>\n <p class=\"empty-hint\">Try a different search term or entity</p>\n </div>\n }\n\n <!-- Single result — auto-navigating to entity form -->\n @if (SearchState === 'single-result') {\n <div class=\"single-result-state\">\n <i class=\"fa-solid fa-arrow-right redirect-icon\"></i>\n <p>Found 1 result &mdash; opening record...</p>\n </div>\n }\n\n <!-- Entity Viewer (2+ results) -->\n @if (SearchState === 'viewer' && EntityInfo) {\n <div class=\"viewer-container\">\n <mj-entity-viewer\n [Entity]=\"EntityInfo\"\n [Provider]=\"Provider\"\n [FilterText]=\"searchInput\"\n [Config]=\"ViewerConfig\"\n (DataLoaded)=\"OnDataLoaded($event)\"\n (RecordOpened)=\"OnRecordOpened($event)\"\n (OpenRelatedRecordRequested)=\"OnOpenRelatedRecord($event)\"\n (CreateRecordRequested)=\"OnCreateNewRecord()\">\n </mj-entity-viewer>\n </div>\n }\n</div>\n"]}
@@ -22,6 +22,7 @@ export * from './lib/single-list-detail/single-list-detail.component';
22
22
  export * from './lib/user-profile/user-profile.component';
23
23
  export * from './lib/user-notifications/user-notifications.component';
24
24
  export * from './lib/guards/auth-guard.service';
25
+ export * from './lib/guards/app-lock-guard.service';
25
26
  export * from './lib/guards/entities.guard';
26
27
  export * from './lib/single-query/single-query.component';
27
28
  export * from './lib/resource-wrappers/query-resource.component';
@@ -1 +1 @@
1
- {"version":3,"file":"public-api.d.ts","sourceRoot":"","sources":["../src/public-api.ts"],"names":[],"mappings":"AAIA,cAAc,4CAA4C,CAAC;AAE3D,cAAc,sDAAsD,CAAA;AACpE,cAAc,2EAA2E,CAAA;AACzF,cAAc,mDAAmD,CAAA;AAEjE,cAAc,2DAA2D,CAAA;AACzE,cAAc,iDAAiD,CAAA;AAC/D,cAAc,wDAAwD,CAAA;AACtE,cAAc,+DAA+D,CAAA;AAC7E,cAAc,qDAAqD,CAAA;AACnE,cAAc,6BAA6B,CAAA;AAG3C,cAAc,iDAAiD,CAAC;AAChE,cAAc,+CAA+C,CAAC;AAG9D,cAAc,0BAA0B,CAAA;AACxC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,6CAA6C,CAAA;AAC3D,cAAc,2DAA2D,CAAA;AACzE,cAAc,mDAAmD,CAAA;AACjE,cAAc,+DAA+D,CAAA;AAC7E,cAAc,qEAAqE,CAAA;AACnF,cAAc,2EAA2E,CAAA;AACzF,cAAc,uDAAuD,CAAA;AACrE,cAAc,2CAA2C,CAAA;AACzD,cAAc,uDAAuD,CAAC;AACtE,cAAc,iCAAiC,CAAC;AAChD,cAAc,6BAA6B,CAAC;AAE5C,cAAc,2CAA2C,CAAA;AACzD,cAAc,kDAAkD,CAAA;AAGhE,cAAc,0CAA0C,CAAA;AACxD,cAAc,2CAA2C,CAAA;AAGzD,cAAc,4CAA4C,CAAA;AAC1D,cAAc,gEAAgE,CAAA;AAG9E,cAAc,qCAAqC,CAAA;AACnD,cAAc,iCAAiC,CAAA;AAC/C,cAAc,4DAA4D,CAAA;AAG1E,c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AAc,4DAA4D,CAAA;AAG1E,cAAc,iBAAiB,CAAA;AAG/B,cAAc,oCAAoC,CAAA;AAClD,cAAc,2CAA2C,CAAA;AAGzD,cAAc,wCAAwC,CAAA;AACtD,cAAc,6CAA6C,CAAA;AAG3D,cAAc,0BAA0B,CAAA;AACxC,cAAc,sCAAsC,CAAA;AAGpD,cAAc,sBAAsB,CAAA;AAEpC,cAAc,UAAU,CAAC"}
@@ -28,6 +28,7 @@ export * from './lib/single-list-detail/single-list-detail.component';
28
28
  export * from './lib/user-profile/user-profile.component';
29
29
  export * from './lib/user-notifications/user-notifications.component';
30
30
  export * from './lib/guards/auth-guard.service';
31
+ export * from './lib/guards/app-lock-guard.service';
31
32
  export * from './lib/guards/entities.guard';
32
33
  export * from './lib/single-query/single-query.component';
33
34
  export * from './lib/resource-wrappers/query-resource.component';
@@ -1 +1 @@
1
- {"version":3,"file":"public-api.js","sourceRoot":"","sources":["../src/public-api.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,4CAA4C,CAAC;AAE3D,cAAc,sDAAsD,CAAA;AACpE,cAAc,2EAA2E,CAAA;AACzF,cAAc,mDAAmD,CAAA;AACjE,mEAAmE;AACnE,cAAc,2DAA2D,CAAA;AACzE,cAAc,iDAAiD,CAAA;AAC/D,cAAc,wDAAwD,CAAA;AACtE,cAAc,+DAA+D,CAAA;AAC7E,cAAc,qDAAqD,CAAA;AACnE,cAAc,6BAA6B,CAAA;AAE3C,0DAA0D;AAC1D,cAAc,iDAAiD,CAAC;AAChE,cAAc,+CAA+C,CAAC;AAE9D,qCAAqC;AACrC,cAAc,0BAA0B,CAAA;AACxC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,6CAA6C,CAAA;AAC3D,cAAc,2DAA2D,CAAA;AACzE,cAAc,mDAAmD,CAAA;AACjE,cAAc,+DAA+D,CAAA;AAC7E,cAAc,qEAAqE,CAAA;AACnF,cAAc,2EAA2E,CAAA;AACzF,cAAc,uDAAuD,CAAA;AACrE,cAAc,2CAA2C,CAAA;AACzD,cAAc,uDAAuD,CAAC;AACtE,cAAc,iCAAiC,CAAC;AAChD,cAAc,6BAA6B,CAAC;AAE5C,cAAc,2CAA2C,CAAA;AACzD,cAAc,kDAAkD,CAAA;AAEhE,sBAAsB;AACtB,cAAc,0CAA0C,CAAA;AACxD,cAAc,2CAA2C,CAAA;AAEzD,sBAAsB;AACtB,cAAc,4CAA4C,CAAA;AAC1D,cAAc,gEAAgE,CAAA;AAE9E,8BAA8B;AAC9B,cAAc,qCAAqC,CAAA;AACnD,cAAc,iCAAiC,CAAA;AAC/C,cAAc,4DAA4D,CAAA;AAE1E,0BAA0B;AAC1B,cAAc,iBAAiB,CAAA;AAE/B,eAAe;AACf,cAAc,oCAAoC,CAAA;AAClD,cAAc,2CAA2C,CAAA;AAEzD,iCAAiC;AACjC,cAAc,wCAAwC,CAAA;AACtD,cAAc,6CAA6C,CAAA;AAE3D,eAAe;AACf,cAAc,0BAA0B,CAAA;AACxC,cAAc,sCAAsC,CAAA;AAEpD,gEAAgE;AAChE,cAAc,sBAAsB,CAAA;AAEpC,cAAc,UAAU,CAAC","sourcesContent":["/*\n * Public API Surface \n */\n\nexport * from './lib/generic/resource-container-component';\n\nexport * from './lib/resource-wrappers/dashboard-resource.component'\nexport * from './lib/dashboard-preferences-dialog/dashboard-preferences-dialog.component'\nexport * from './lib/resource-wrappers/record-resource.component'\n// export * from './lib/resource-wrappers/resource-wrappers-loader'\nexport * from './lib/resource-wrappers/search-results-resource.component'\nexport * from './lib/resource-wrappers/view-resource.component'\nexport * from './lib/resource-wrappers/list-detail-resource.component'\nexport * from './lib/resource-wrappers/chat-conversations-resource.component'\nexport * from './lib/resource-wrappers/artifact-resource.component'\nexport * from './lib/conversation-feedback'\n\n// Command Palette (only component and service, no module)\nexport * from './lib/command-palette/command-palette.component';\nexport * from './lib/command-palette/command-palette.service';\n\n// New Shell Module (New Explorer UX)\nexport * from './lib/shell/shell.module'\nexport * from './lib/shell/shell.component'\nexport * from './lib/single-record/single-record.component'\nexport * from './lib/single-search-result/single-search-result.component'\nexport * from './lib/single-dashboard/single-dashboard.component'\nexport * from './lib/single-dashboard/Components/add-item/add-item.component'\nexport * from './lib/single-dashboard/Components/delete-item/delete-item.component'\nexport * from './lib/single-dashboard/Components/edit-dashboard/edit-dashboard.component'\nexport * from './lib/single-list-detail/single-list-detail.component'\nexport * from './lib/user-profile/user-profile.component'\nexport * from './lib/user-notifications/user-notifications.component';\nexport * from './lib/guards/auth-guard.service';\nexport * from './lib/guards/entities.guard';\n\nexport * from './lib/single-query/single-query.component'\nexport * from './lib/resource-wrappers/query-resource.component'\n\n// Validation services\nexport * from './lib/services/system-validation.service'\nexport * from './lib/services/startup-validation.service'\n\n// Server connectivity\nexport * from './lib/services/server-connectivity.service'\nexport * from './lib/server-connectivity/server-connectivity-banner.component'\n\n// Lazy loading infrastructure\nexport * from './lib/services/lazy-module-registry'\nexport * from './generated/lazy-feature-config'\nexport * from './lib/system-validation/system-validation-banner.component'\n\n// User Menu Plugin System\nexport * from './lib/user-menu'\n\n// About Dialog\nexport * from './lib/about/about-dialog.component'\nexport * from './lib/shell/services/about-dialog.service'\n\n// Profile Dialog (Identity Card)\nexport * from './lib/profile/profile-dialog.component'\nexport * from './lib/shell/services/profile-dialog.service'\n\n// OAuth Module\nexport * from './lib/oauth/oauth.module'\nexport * from './lib/oauth/oauth-callback.component'\n\n// Routing Module - must be imported directly in root app module\nexport * from './app-routing.module'\n\nexport * from './module';"]}
1
+ {"version":3,"file":"public-api.js","sourceRoot":"","sources":["../src/public-api.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,4CAA4C,CAAC;AAE3D,cAAc,sDAAsD,CAAA;AACpE,cAAc,2EAA2E,CAAA;AACzF,cAAc,mDAAmD,CAAA;AACjE,mEAAmE;AACnE,cAAc,2DAA2D,CAAA;AACzE,cAAc,iDAAiD,CAAA;AAC/D,cAAc,wDAAwD,CAAA;AACtE,cAAc,+DAA+D,CAAA;AAC7E,cAAc,qDAAqD,CAAA;AACnE,cAAc,6BAA6B,CAAA;AAE3C,0DAA0D;AAC1D,cAAc,iDAAiD,CAAC;AAChE,cAAc,+CAA+C,CAAC;AAE9D,qCAAqC;AACrC,cAAc,0BAA0B,CAAA;AACxC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,6CAA6C,CAAA;AAC3D,cAAc,2DAA2D,CAAA;AACzE,cAAc,mDAAmD,CAAA;AACjE,cAAc,+DAA+D,CAAA;AAC7E,cAAc,qEAAqE,CAAA;AACnF,cAAc,2EAA2E,CAAA;AACzF,cAAc,uDAAuD,CAAA;AACrE,cAAc,2CAA2C,CAAA;AACzD,cAAc,uDAAuD,CAAC;AACtE,cAAc,iCAAiC,CAAC;AAChD,cAAc,qCAAqC,CAAC;AACpD,cAAc,6BAA6B,CAAC;AAE5C,cAAc,2CAA2C,CAAA;AACzD,cAAc,kDAAkD,CAAA;AAEhE,sBAAsB;AACtB,cAAc,0CAA0C,CAAA;AACxD,cAAc,2CAA2C,CAAA;AAEzD,sBAAsB;AACtB,cAAc,4CAA4C,CAAA;AAC1D,cAAc,gEAAgE,CAAA;AAE9E,8BAA8B;AAC9B,cAAc,qCAAqC,CAAA;AACnD,cAAc,iCAAiC,CAAA;AAC/C,cAAc,4DAA4D,CAAA;AAE1E,0BAA0B;AAC1B,cAAc,iBAAiB,CAAA;AAE/B,eAAe;AACf,cAAc,oCAAoC,CAAA;AAClD,cAAc,2CAA2C,CAAA;AAEzD,iCAAiC;AACjC,cAAc,wCAAwC,CAAA;AACtD,cAAc,6CAA6C,CAAA;AAE3D,eAAe;AACf,cAAc,0BAA0B,CAAA;AACxC,cAAc,sCAAsC,CAAA;AAEpD,gEAAgE;AAChE,cAAc,sBAAsB,CAAA;AAEpC,cAAc,UAAU,CAAC","sourcesContent":["/*\n * Public API Surface \n */\n\nexport * from './lib/generic/resource-container-component';\n\nexport * from './lib/resource-wrappers/dashboard-resource.component'\nexport * from './lib/dashboard-preferences-dialog/dashboard-preferences-dialog.component'\nexport * from './lib/resource-wrappers/record-resource.component'\n// export * from './lib/resource-wrappers/resource-wrappers-loader'\nexport * from './lib/resource-wrappers/search-results-resource.component'\nexport * from './lib/resource-wrappers/view-resource.component'\nexport * from './lib/resource-wrappers/list-detail-resource.component'\nexport * from './lib/resource-wrappers/chat-conversations-resource.component'\nexport * from './lib/resource-wrappers/artifact-resource.component'\nexport * from './lib/conversation-feedback'\n\n// Command Palette (only component and service, no module)\nexport * from './lib/command-palette/command-palette.component';\nexport * from './lib/command-palette/command-palette.service';\n\n// New Shell Module (New Explorer UX)\nexport * from './lib/shell/shell.module'\nexport * from './lib/shell/shell.component'\nexport * from './lib/single-record/single-record.component'\nexport * from './lib/single-search-result/single-search-result.component'\nexport * from './lib/single-dashboard/single-dashboard.component'\nexport * from './lib/single-dashboard/Components/add-item/add-item.component'\nexport * from './lib/single-dashboard/Components/delete-item/delete-item.component'\nexport * from './lib/single-dashboard/Components/edit-dashboard/edit-dashboard.component'\nexport * from './lib/single-list-detail/single-list-detail.component'\nexport * from './lib/user-profile/user-profile.component'\nexport * from './lib/user-notifications/user-notifications.component';\nexport * from './lib/guards/auth-guard.service';\nexport * from './lib/guards/app-lock-guard.service';\nexport * from './lib/guards/entities.guard';\n\nexport * from './lib/single-query/single-query.component'\nexport * from './lib/resource-wrappers/query-resource.component'\n\n// Validation services\nexport * from './lib/services/system-validation.service'\nexport * from './lib/services/startup-validation.service'\n\n// Server connectivity\nexport * from './lib/services/server-connectivity.service'\nexport * from './lib/server-connectivity/server-connectivity-banner.component'\n\n// Lazy loading infrastructure\nexport * from './lib/services/lazy-module-registry'\nexport * from './generated/lazy-feature-config'\nexport * from './lib/system-validation/system-validation-banner.component'\n\n// User Menu Plugin System\nexport * from './lib/user-menu'\n\n// About Dialog\nexport * from './lib/about/about-dialog.component'\nexport * from './lib/shell/services/about-dialog.service'\n\n// Profile Dialog (Identity Card)\nexport * from './lib/profile/profile-dialog.component'\nexport * from './lib/shell/services/profile-dialog.service'\n\n// OAuth Module\nexport * from './lib/oauth/oauth.module'\nexport * from './lib/oauth/oauth-callback.component'\n\n// Routing Module - must be imported directly in root app module\nexport * from './app-routing.module'\n\nexport * from './module';"]}