@memberjunction/ng-base-application 6.1.4 → 6.2.0-edge.1
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.
- package/dist/lib/__tests__/base-application.test.js +34 -34
- package/dist/lib/__tests__/base-application.test.js.map +1 -1
- package/dist/lib/golden-layout-manager.d.ts +2 -0
- package/dist/lib/golden-layout-manager.d.ts.map +1 -1
- package/dist/lib/golden-layout-manager.js +8 -4
- package/dist/lib/golden-layout-manager.js.map +1 -1
- package/dist/lib/interfaces/workspace-configuration.interface.d.ts +2 -0
- package/dist/lib/interfaces/workspace-configuration.interface.d.ts.map +1 -1
- package/dist/lib/interfaces/workspace-configuration.interface.js +5 -1
- package/dist/lib/interfaces/workspace-configuration.interface.js.map +1 -1
- package/dist/lib/workspace-state-manager.js +7 -7
- package/dist/lib/workspace-state-manager.js.map +1 -1
- package/package.json +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workspace-state-manager.js","sourceRoot":"","sources":["../../src/lib/workspace-state-manager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAc,OAAO,EAAE,MAAM,MAAM,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAqB,SAAS,EAA8B,MAAM,sBAAsB,CAAC;AAC1G,OAAO,EAAE,cAAc,EAAqB,MAAM,+BAA+B,CAAC;AAClF,OAAO,EAGL,mCAAmC,EACpC,MAAM,gDAAgD,CAAC;;AAGxD;;;;;GAKG;AAIH,MAAM,OAAO,qBAAqB;IACxB,UAAU,GAAG,IAAI,eAAe,CAA2B,IAAI,CAAC,CAAC;IACjE,cAAc,GAAG,IAAI,eAAe,CAAgC,IAAI,CAAC,CAAC;IAC1E,YAAY,GAAG,IAAI,OAAO,EAAQ,CAAC;IACnC,QAAQ,GAAG,IA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KAAK,KAAK,EAAE,CAAC;gBACrB,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,UAAU,EAAE,GAAG,GAAG,CAAC,aAAa,CAAC;gBAC3D,OAAO;oBACL,GAAG,GAAG;oBACN,gBAAgB,EAAE,WAAW;oBAC7B,aAAa,EAAE;wBACb,GAAG,UAAU;wBACb,QAAQ,EAAE,WAAW;qBACtB;iBACF,CAAC;YACJ,CAAC;YACD,OAAO,GAAG,CAAC;QACb,CAAC,CAAC,CAAC;QAEH,IAAI,CAAC,mBAAmB,CAAC;YACvB,GAAG,MAAM;YACT,IAAI,EAAE,WAAW;SAClB,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,cAAc;QACZ,OAAO,IAAI,CAAC,cAAc,CAAC,KAAK,EAAE,WAAW,IAAI,IAAI,CAAC;IACxD,CAAC;IAED;;OAEG;IACK,YAAY;QAClB,OAAO,sCAAsC,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE;YACnE,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC;YACnC,MAAM,CAAC,GAAG,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,GAAG,GAAG,CAAC;YAC1C,OAAO,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;QACxB,CAAC,CAAC,CAAC;IACL,CAAC;+GAr0BU,qBAAqB;gEAArB,qBAAqB,WAArB,qBAAqB,mBAFpB,MAAM;;iFAEP,qBAAqB;cAHjC,UAAU;eAAC;gBACV,UAAU,EAAE,MAAM;aACnB","sourcesContent":["import { Injectable } from '@angular/core';\nimport { BehaviorSubject, Observable, Subject } from 'rxjs';\nimport { debounceTime } from 'rxjs/operators';\nimport { Metadata, IMetadataProvider, LogStatus, PermissionConstrainedError } from '@memberjunction/core';\nimport { UserInfoEngine, MJWorkspaceEntity } from '@memberjunction/core-entities';\nimport {\n WorkspaceConfiguration,\n WorkspaceTab,\n createDefaultWorkspaceConfiguration\n} from './interfaces/workspace-configuration.interface';\nimport { TabRequest } from './interfaces/tab-request.interface';\n\n/**\n * Manages workspace state including tabs, layout, and persistence.\n *\n * Uses a single Workspace.Configuration JSON blob for all state,\n * with debounced saves to minimize database writes.\n */\n@Injectable({\n providedIn: 'root'\n})\nexport class WorkspaceStateManager {\n private workspace$ = new BehaviorSubject<MJWorkspaceEntity | null>(null);\n private configuration$ = new BehaviorSubject<WorkspaceConfiguration | null>(null);\n private saveRequest$ = new Subject<void>();\n private loading$ = new BehaviorSubject<boolean>(false);\n private tabBarVisible$ = new BehaviorSubject<boolean>(true);\n private initialized = false;\n\n /**\n * Optional predicate identifying tabs that belong to the MAIN layout.\n * Tabs failing the predicate (e.g. record tabs under the records-style\n * record-open model, which live in their own layout region) are excluded\n * from ALL main-layout semantics: they never force the main tab bar to\n * appear (shouldShowTabs), are never consumed as the replaceable\n * \"temporary tab\" by OpenTab, and skip the keep-last-tab-alive rule in\n * CloseTab. Null = every tab is a main-layout tab (classic behavior).\n * Kept as a settable predicate (not an import) because this package sits\n * below the package that owns the record-open style.\n * NOTE: record tabs DOCKED to the workspace (\"Move to Workspace\")\n * intentionally PASS this filter — they are main-layout tabs.\n */\n public MainLayoutTabFilter: ((tab: WorkspaceTab) => boolean) | null = null;\n\n /** True when the tab participates in main-layout semantics (see MainLayoutTabFilter) */\n private isMainLayoutTab(tab: WorkspaceTab): boolean {\n return this.MainLayoutTabFilter ? this.MainLayoutTabFilter(tab) : true;\n }\n\n /**\n * Optional predicate identifying tabs that may be CONSUMED as the\n * replaceable \"temporary tab\" by OpenTab. Record tabs (docked or not) are\n * deliberately unpinned yet must never be silently replaced by the next\n * nav click — the shell sets this to exclude ALL record tabs under the\n * records style. Null = every unpinned main-layout tab is consumable\n * (classic behavior). Settable predicate for the same layering reason as\n * MainLayoutTabFilter.\n */\n public TempTabConsumptionFilter: ((tab: WorkspaceTab) => boolean) | null = null;\n\n /** True when the tab may be consumed as OpenTab's replaceable temp tab */\n private isTempTabConsumable(tab: WorkspaceTab): boolean {\n return this.TempTabConsumptionFilter ? this.TempTabConsumptionFilter(tab) : true;\n }\n\n /**\n * Optional predicate identifying members of the records REGION — the second\n * temp-tab pool. Requests carrying `TempScope: 'records'` consume and cascade\n * within this set only, which is what gives records preview-tab behavior\n * without letting a nav click touch a record (TempTabConsumptionFilter keeps\n * guarding that direction) or a record open touch the nav tab.\n * Settable predicate for the same layering reason as MainLayoutTabFilter.\n * NOTE: record tabs DOCKED to the workspace (\"Move to Workspace\") must FAIL\n * this filter — docking is an act of investment, and a docked record is a\n * main-layout tab that nothing in either pool may consume.\n */\n public RecordsRegionTabFilter: ((tab: WorkspaceTab) => boolean) | null = null;\n\n /**\n * True when the tab belongs to the records region. A null filter means no\n * records region is active, so the pool is EMPTY — the inverse default from\n * isMainLayoutTab, and deliberately so: under the classic style a\n * records-scoped request must consume nothing rather than everything.\n */\n private isRecordsRegionTab(tab: WorkspaceTab): boolean {\n return this.RecordsRegionTabFilter ? this.RecordsRegionTabFilter(tab) : false;\n }\n\n /**\n * Optional explicit metadata provider. When set, used instead of falling back\n * to `Metadata.Provider`. The shell calls `setProvider(this.ProviderToUse)`\n * after acquiring this manager from DI.\n */\n private _provider: IMetadataProvider | null = null;\n\n public set Provider(value: IMetadataProvider | null) {\n this._provider = value;\n }\n\n public get Provider(): IMetadataProvider {\n return this._provider ?? Metadata.Provider;\n }\n\n constructor() {\n // Set up debounced saves\n this.saveRequest$.pipe(\n debounceTime(500) // Wait 500ms after last change\n ).subscribe(() => {\n this.persistConfiguration();\n });\n\n // Update tab bar visibility whenever configuration changes\n this.configuration$.subscribe(config => {\n if (config) {\n const shouldShow = this.shouldShowTabs(config);\n this.tabBarVisible$.next(shouldShow);\n }\n });\n }\n\n /**\n * Observable of the current workspace configuration\n */\n get Configuration(): Observable<WorkspaceConfiguration | null> {\n return this.configuration$.asObservable();\n }\n\n /**\n * Observable of loading state\n */\n get Loading(): Observable<boolean> {\n return this.loading$.asObservable();\n }\n\n /**\n * Observable of tab bar visibility\n * Returns false when only 1 tab exists and no tabs are pinned\n * Returns true when 2+ tabs exist OR any tabs are pinned\n */\n get TabBarVisible(): Observable<boolean> {\n return this.tabBarVisible$.asObservable();\n }\n\n /**\n * Get current configuration synchronously\n */\n GetConfiguration(): WorkspaceConfiguration | null {\n return this.configuration$.value;\n }\n\n /**\n * Determine if tab bar should be visible\n * - Hide if only 1 tab and no pinned tabs (single-resource view)\n * - Show if 2+ tabs OR any pinned tabs exist\n */\n private shouldShowTabs(config: WorkspaceConfiguration): boolean {\n // Main-layout tabs only — tabs excluded by the filter (e.g. record tabs\n // living in the separate records region) never force the main bar open.\n const tabs = (config.tabs || []).filter(t => this.isMainLayoutTab(t));\n\n // Always hide if no tabs (shouldn't happen, but defensive)\n if (tabs.length === 0) {\n return false;\n }\n\n // Check if any tabs are pinned\n const hasPinnedTabs = tabs.some(tab => tab.isPinned);\n\n // Show tabs if:\n // - 2 or more tabs exist, OR\n // - Any tab is pinned (user wants persistent workspace)\n return tabs.length > 1 || hasPinnedTabs;\n }\n\n /**\n * Initialize the workspace state for a user\n */\n async Initialize(userId: string): Promise<void> {\n if (this.initialized) {\n return;\n }\n\n this.loading$.next(true);\n\n try {\n await this.loadWorkspace(userId);\n this.initialized = true;\n } finally {\n this.loading$.next(false);\n }\n }\n\n /**\n * Ephemeral mode: when `window.__MJ_EPHEMERAL_WORKSPACE__ === true` is set\n * (only baked into the regression test Explorer build via Dockerfile.explorer),\n * the workspace neither loads from nor persists to the server. Every fresh\n * BrowserContext starts from a default workspace configuration, so tab/workspace\n * state can never leak across regression tests sharing a user. Production\n * deployments never set this flag, so behavior is unchanged.\n */\n private isEphemeral(): boolean {\n return typeof window !== 'undefined'\n && (window as Window & { __MJ_EPHEMERAL_WORKSPACE__?: boolean }).__MJ_EPHEMERAL_WORKSPACE__ === true;\n }\n\n /**\n * Load workspace from database using UserInfoEngine for centralized, cached access\n */\n private async loadWorkspace(userId: string): Promise<void> {\n if (this.isEphemeral()) {\n // Test mode — skip server load entirely. Just emit a default config so the\n // workspace starts clean for this BrowserContext. No MJWorkspaceEntity is\n // created or read; the DB row (if any) is ignored.\n this.configuration$.next(createDefaultWorkspaceConfiguration());\n return;\n }\n // Use UserInfoEngine for centralized, cached workspace loading\n const engine = UserInfoEngine.Instance;\n\n // Permission-denied ≠ empty — don't auto-create a workspace for denied users.\n if (engine.IsPermissionConstrained) {\n LogStatus('[WorkspaceStateManager] UserInfoEngine is permission-constrained, using default workspace configuration');\n this.configuration$.next(createDefaultWorkspaceConfiguration());\n return;\n }\n\n const workspaces = engine.Workspaces;\n\n if (workspaces.length > 0) {\n const workspace = workspaces[0];\n this.workspace$.next(workspace);\n\n // Parse configuration or create default\n const configJson = workspace.Configuration;\n\n const config = configJson\n ? JSON.parse(configJson) as WorkspaceConfiguration\n : createDefaultWorkspaceConfiguration();\n\n this.configuration$.next(config);\n }\n else {\n // Create new workspace for user\n const md = this.Provider;\n const workspace = await md.GetEntityObject<MJWorkspaceEntity>('MJ: Workspaces', md.CurrentUser);\n workspace.UserID = userId;\n workspace.Name = 'Default';\n workspace.Configuration = JSON.stringify(createDefaultWorkspaceConfiguration());\n\n const saveResult = await workspace.Save();\n\n if (saveResult) {\n this.workspace$.next(workspace);\n this.configuration$.next(createDefaultWorkspaceConfiguration());\n } else {\n console.error('[WorkspaceStateManager.loadWorkspace] Failed to save workspace');\n throw new Error('Failed to create default workspace');\n }\n }\n }\n\n /**\n * Persist configuration to database (debounced)\n */\n private async persistConfiguration(): Promise<void> {\n if (this.isEphemeral()) {\n // Test mode — no-op. We never persist workspace state in the regression\n // environment so tab/workspace state can't leak across tests.\n return;\n }\n const workspace = this.workspace$.value;\n const config = this.configuration$.value;\n\n if (workspace && config) {\n workspace.Configuration = JSON.stringify(config);\n await workspace.Save();\n }\n }\n\n /**\n * Request a save (will be debounced)\n */\n private requestSave(): void {\n this.saveRequest$.next();\n }\n\n /**\n * Update configuration and request save\n */\n UpdateConfiguration(config: WorkspaceConfiguration): void {\n this.configuration$.next(config);\n this.requestSave();\n }\n\n /**\n * Reset workspace to a clean default configuration and persist immediately.\n * Used for recovery when stale or corrupted workspace data prevents startup.\n */\n async ResetConfiguration(): Promise<void> {\n const defaultConfig = createDefaultWorkspaceConfiguration();\n this.configuration$.next(defaultConfig);\n await this.persistConfiguration();\n }\n\n /**\n * Force creation of a new tab, never replacing temporary tabs\n * Used for Shift+Click behavior - checks for existing tab first, only creates new if none exists\n */\n OpenTabForced(request: TabRequest, appColor: string): string {\n const config = this.configuration$.value;\n if (!config) {\n throw new Error('Configuration not initialized');\n }\n\n // Check for existing tab first - don't allow duplicate tabs\n const existingTab = config.tabs.find(tab => {\n if (tab.applicationId !== request.ApplicationId) return false;\n\n // For resource-based tabs, match by resourceType in configuration\n if (request.Configuration?.resourceType) {\n // Normalize empty/null/undefined to empty string for comparison\n const requestRecordId = request.ResourceRecordId || '';\n const tabRecordId = tab.resourceRecordId || '';\n\n // For Custom resource types, also compare navItemName or driverClass\n if (request.Configuration.resourceType === 'Custom') {\n const requestNavItem = request.Configuration.navItemName || '';\n const tabNavItem = tab.configuration?.navItemName || '';\n const requestDriverClass = request.Configuration.driverClass || '';\n const tabDriverClass = tab.configuration?.driverClass || '';\n\n return tab.configuration.resourceType === request.Configuration.resourceType &&\n tabRecordId === requestRecordId &&\n (requestNavItem === tabNavItem || requestDriverClass === tabDriverClass);\n }\n\n // For Records resource type, also match by Entity name to distinguish between different entity records\n if (request.Configuration.resourceType === 'Records') {\n const requestEntity = (request.Configuration.Entity as string)?.trim().toLowerCase() || '';\n const tabEntity = (tab.configuration?.Entity as string)?.trim().toLowerCase() || '';\n\n return tab.configuration.resourceType === request.Configuration.resourceType &&\n tabRecordId === requestRecordId &&\n requestEntity === tabEntity;\n }\n\n // For other standard resource types, match by resourceType and recordId\n return tab.configuration.resourceType === request.Configuration.resourceType &&\n tabRecordId === requestRecordId;\n }\n\n // Legacy: match by entity and viewId\n const requestRecordId = request.ResourceRecordId || '';\n const tabRecordId = tab.resourceRecordId || '';\n return tab.configuration.entity === request.Configuration?.entity &&\n tab.configuration.viewId === request.Configuration?.viewId &&\n tabRecordId === requestRecordId;\n });\n\n if (existingTab) {\n // Focus existing tab\n const updatedConfig = {\n ...config,\n activeTabId: existingTab.id\n };\n this.UpdateConfiguration(updatedConfig);\n return existingTab.id;\n }\n\n // No existing tab found - create new pinned tab\n const newTab: WorkspaceTab = {\n id: this.generateUUID(),\n applicationId: request.ApplicationId,\n title: request.Title,\n resourceTypeId: request.ResourceTypeId || '',\n resourceRecordId: request.ResourceRecordId || '',\n isPinned: request.IsPinned || false,\n sequence: config.tabs.length,\n lastAccessedAt: new Date().toISOString(),\n configuration: request.Configuration || {}\n };\n\n // CRITICAL: If creating a temporary tab, pin all existing temporary tabs\n // first. This ensures only ONE temporary tab exists at any time — per POOL,\n // now that the records region has its own (see TabRequest.TempScope).\n //\n // A records-scoped forced open (shift-click on a record) promotes the\n // region's previous temp record and leaves the nav temp tab alone; that\n // scoping is what replaced the blunt PreservePinState opt-out record opens\n // used to pass. PreservePinState still opts out of the cascade entirely.\n const inCascadeScope = request.TempScope === 'records'\n ? (tab: WorkspaceTab) => this.isRecordsRegionTab(tab)\n : () => true;\n const updatedTabs = !newTab.isPinned && !request.PreservePinState\n ? config.tabs.map(tab => !tab.isPinned && inCascadeScope(tab) ? { ...tab, isPinned: true } : tab)\n : config.tabs;\n\n this.UpdateConfiguration({\n ...config,\n tabs: [...updatedTabs, newTab],\n activeTabId: newTab.id\n });\n\n return newTab.id;\n }\n\n /**\n * Open a tab (new or focus existing)\n */\n OpenTab(request: TabRequest, appColor: string): string {\n const config = this.configuration$.value;\n if (!config) {\n throw new Error('Configuration not initialized');\n }\n\n // Check for existing tab - match by resource type and record ID for resource-based tabs\n const existingTab = config.tabs.find(tab => {\n const appIdMatch = tab.applicationId === request.ApplicationId;\n if (!appIdMatch) {\n return false;\n }\n\n // For resource-based tabs, match by resourceType in configuration\n if (request.Configuration?.resourceType) {\n // Normalize empty/null/undefined to empty string for comparison\n // IMPORTANT: Check both ResourceRecordId AND Configuration.recordId\n // because for nav items, the recordId is stored in Configuration, not ResourceRecordId\n const requestRecordId = request.ResourceRecordId || (request.Configuration?.recordId as string) || '';\n const tabRecordId = tab.resourceRecordId || (tab.configuration?.recordId as string) || '';\n\n // For Custom resource types, also compare navItemName or driverClass\n // to distinguish between different custom resources (Monitor vs Prompts vs Agents, etc.)\n if (request.Configuration.resourceType === 'Custom') {\n const requestNavItem = request.Configuration.navItemName || '';\n const tabNavItem = tab.configuration?.navItemName || '';\n const requestDriverClass = request.Configuration.driverClass || '';\n const tabDriverClass = tab.configuration?.driverClass || '';\n\n return tab.configuration.resourceType === request.Configuration.resourceType &&\n tabRecordId === requestRecordId &&\n (requestNavItem === tabNavItem || requestDriverClass === tabDriverClass);\n }\n\n // For Records resource type, also match by Entity name to distinguish between different entity records\n if (request.Configuration.resourceType === 'Records') {\n const requestEntity = (request.Configuration.Entity as string)?.trim().toLowerCase() || '';\n const tabEntity = (tab.configuration?.Entity as string)?.trim().toLowerCase() || '';\n\n return tab.configuration.resourceType === request.Configuration.resourceType &&\n tabRecordId === requestRecordId &&\n requestEntity === tabEntity;\n }\n\n // For other standard resource types, match by resourceType and recordId\n return tab.configuration.resourceType === request.Configuration.resourceType &&\n tabRecordId === requestRecordId;\n }\n\n // Legacy: match by entity and viewId\n const requestRecordId = request.ResourceRecordId || '';\n const tabRecordId = tab.resourceRecordId || '';\n return tab.configuration.entity === request.Configuration?.entity &&\n tab.configuration.viewId === request.Configuration?.viewId &&\n tabRecordId === requestRecordId;\n });\n\n if (existingTab) {\n // Focus existing tab AND update its title and configuration.\n // Title and config must be refreshed because in single-resource mode,\n // the same tab gets reused for different nav items within an app.\n const updatedTabs = config.tabs.map(tab =>\n tab.id === existingTab.id\n ? {\n ...tab,\n title: request.Title,\n configuration: { ...tab.configuration, ...request.Configuration }\n }\n : tab\n );\n const updatedConfig = {\n ...config,\n tabs: updatedTabs,\n activeTabId: existingTab.id\n };\n this.UpdateConfiguration(updatedConfig);\n return existingTab.id;\n }\n\n // Find the temporary tab to replace, within THIS request's pool.\n //\n // 'main' (the default): an unpinned tab from any app. NEVER consume a\n // non-main-layout tab (e.g. an open record under the records style —\n // they're deliberately unpinned, and replacing one here would silently\n // destroy an open record with zero user feedback).\n //\n // 'records': the records region's own temporary tab. Region membership,\n // not record identity, so a record docked to the workspace is excluded\n // from this pool as well as from the main one.\n const tempTab = request.TempScope === 'records'\n ? config.tabs.find(tab => !tab.isPinned && this.isRecordsRegionTab(tab))\n : config.tabs.find(tab => !tab.isPinned && this.isMainLayoutTab(tab) && this.isTempTabConsumable(tab));\n\n if (tempTab) {\n // Replace temporary tab\n const updatedTabs = config.tabs.map(tab =>\n tab.id === tempTab.id\n ? {\n ...tab,\n applicationId: request.ApplicationId, // Update app ID for cross-app navigation\n title: request.Title,\n resourceTypeId: request.ResourceTypeId || '',\n resourceRecordId: request.ResourceRecordId || '',\n configuration: request.Configuration || {},\n lastAccessedAt: new Date().toISOString()\n }\n : tab\n );\n this.UpdateConfiguration({\n ...config,\n tabs: updatedTabs,\n activeTabId: tempTab.id\n });\n\n return tempTab.id;\n }\n\n // Create new tab\n const newTab: WorkspaceTab = {\n id: this.generateUUID(),\n applicationId: request.ApplicationId,\n title: request.Title,\n resourceTypeId: request.ResourceTypeId || '',\n resourceRecordId: request.ResourceRecordId || '',\n isPinned: false,\n sequence: config.tabs.length,\n lastAccessedAt: new Date().toISOString(),\n configuration: request.Configuration || {}\n };\n\n this.UpdateConfiguration({\n ...config,\n tabs: [...config.tabs, newTab],\n activeTabId: newTab.id\n });\n\n return newTab.id;\n }\n\n /**\n * Close a tab\n */\n CloseTab(tabId: string): void {\n const config = this.configuration$.value;\n if (!config) return;\n\n // No-op when the tab is already gone — layout-driven close events can\n // arrive for tabs a configuration sync already removed; re-emitting an\n // unchanged config from inside a subscription pass invites re-entrancy.\n const closingTab = config.tabs.find(t => t.id === tabId);\n if (!closingTab) return;\n\n // Check if this is the last tab. The keep-alive rule (retain the tab,\n // just unpin) exists so the MAIN region never renders an empty\n // workspace — it must NOT apply to non-main-layout tabs (records):\n // keeping a closed record alive makes the records region re-create the\n // tab the user just closed, forever. Records close outright; the\n // records host is responsible for backfilling an empty workspace.\n const wouldBeLastTab = config.tabs.length === 1 && config.tabs[0].id === tabId\n && this.isMainLayoutTab(closingTab);\n\n // CRITICAL: If closing the last tab, keep it in the array but mark as unpinned\n // This allows single-resource mode to work while preserving tab data for nav highlighting\n let updatedTabs: typeof config.tabs;\n if (wouldBeLastTab) {\n // Keep the tab but ensure it's unpinned (triggers single-resource mode)\n updatedTabs = config.tabs.map(tab =>\n tab.id === tabId ? { ...tab, isPinned: false } : tab\n );\n } else {\n // Normal case: remove the tab from array\n updatedTabs = config.tabs.filter(tab => tab.id !== tabId);\n }\n\n // Update active tab if needed\n let activeTabId = config.activeTabId;\n if (activeTabId === tabId && !wouldBeLastTab) {\n // Find next tab to activate (only when not keeping the last tab)\n const closedIndex = config.tabs.findIndex(tab => tab.id === tabId);\n const nextTab = updatedTabs[closedIndex] || updatedTabs[closedIndex - 1];\n activeTabId = nextTab?.id || null;\n }\n\n this.UpdateConfiguration({\n ...config,\n tabs: updatedTabs,\n activeTabId\n });\n }\n\n /**\n * Close all tabs except the specified one\n */\n CloseOtherTabs(tabId: string): void {\n const config = this.configuration$.value;\n if (!config) return;\n\n // Keep only the specified tab\n const updatedTabs = config.tabs.filter(tab => tab.id === tabId);\n\n this.UpdateConfiguration({\n ...config,\n tabs: updatedTabs,\n activeTabId: tabId\n });\n }\n\n /**\n * Close all tabs to the right of the specified tab\n */\n CloseTabsToRight(tabId: string): void {\n const config = this.configuration$.value;\n if (!config) return;\n\n const tabIndex = config.tabs.findIndex(tab => tab.id === tabId);\n if (tabIndex === -1) return;\n\n // Keep only tabs up to and including the specified tab\n const updatedTabs = config.tabs.slice(0, tabIndex + 1);\n\n // Update active tab if it was closed\n let activeTabId = config.activeTabId;\n if (!updatedTabs.find(tab => tab.id === activeTabId)) {\n activeTabId = tabId;\n }\n\n this.UpdateConfiguration({\n ...config,\n tabs: updatedTabs,\n activeTabId\n });\n }\n\n /**\n * Clear the saved layout structure.\n * This is used to recover from corrupted layouts - tabs will be recreated fresh.\n */\n ClearLayout(): void {\n const config = this.configuration$.value;\n if (!config) return;\n\n this.UpdateConfiguration({\n ...config,\n layout: undefined // Clear the layout, tabs will be recreated fresh\n });\n }\n\n /**\n * Toggle pin state of a tab\n */\n TogglePin(tabId: string): void {\n const config = this.configuration$.value;\n if (!config) return;\n\n const updatedTabs = config.tabs.map(tab =>\n tab.id === tabId\n ? { ...tab, isPinned: !tab.isPinned }\n : tab\n );\n\n this.UpdateConfiguration({\n ...config,\n tabs: updatedTabs\n });\n }\n\n /**\n * Set active tab\n */\n SetActiveTab(tabId: string): void {\n const config = this.configuration$.value;\n if (!config) return;\n\n // Update last accessed time\n const updatedTabs = config.tabs.map(tab =>\n tab.id === tabId\n ? { ...tab, lastAccessedAt: new Date().toISOString() }\n : tab\n );\n\n this.UpdateConfiguration({\n ...config,\n tabs: updatedTabs,\n activeTabId: tabId\n });\n }\n\n /**\n * Update tab sequences after reorder\n */\n UpdateTabSequences(tabIds: string[]): void {\n const config = this.configuration$.value;\n if (!config) return;\n\n const updatedTabs = config.tabs.map(tab => {\n const newSequence = tabIds.indexOf(tab.id);\n return newSequence >= 0 ? { ...tab, sequence: newSequence } : tab;\n }).sort((a, b) => a.sequence - b.sequence);\n\n this.UpdateConfiguration({\n ...config,\n tabs: updatedTabs\n });\n }\n\n /**\n * Update layout configuration\n */\n UpdateLayout(layout: WorkspaceConfiguration['layout']): void {\n const config = this.configuration$.value;\n if (!config) return;\n\n this.UpdateConfiguration({\n ...config,\n layout\n });\n }\n\n /**\n * Update the RECORDS region layout (the separate Golden Layout hosting\n * record tabs under the records-style record-open model).\n */\n UpdateRecordsLayout(recordsLayout: WorkspaceConfiguration['recordsLayout']): void {\n const config = this.configuration$.value;\n if (!config) return;\n\n this.UpdateConfiguration({\n ...config,\n recordsLayout\n });\n }\n\n /**\n * Get tab by ID\n */\n GetTab(tabId: string): WorkspaceTab | undefined {\n return this.configuration$.value?.tabs.find(tab => tab.id === tabId);\n }\n\n /**\n * Get tabs for a specific application\n */\n GetAppTabs(appId: string): WorkspaceTab[] {\n return this.configuration$.value?.tabs.filter(tab => tab.applicationId === appId) || [];\n }\n\n /**\n * Update the title of a specific tab\n */\n UpdateTabTitle(tabId: string, newTitle: string): void {\n const config = this.configuration$.value;\n if (!config) {\n return;\n }\n\n const updatedTabs = config.tabs.map(tab =>\n tab.id === tabId ? { ...tab, title: newTitle } : tab\n );\n\n this.UpdateConfiguration({\n ...config,\n tabs: updatedTabs\n });\n }\n\n /**\n * Update the configuration of a specific tab.\n * Merges the provided partial configuration with the existing tab configuration.\n * @param tabId The ID of the tab to update\n * @param configUpdate Partial configuration to merge with existing configuration\n */\n UpdateTabConfiguration(tabId: string, configUpdate: Partial<WorkspaceTab['configuration']>): void {\n const config = this.configuration$.value;\n if (!config) {\n return;\n }\n\n const updatedTabs = config.tabs.map(tab => {\n if (tab.id === tabId) {\n return {\n ...tab,\n configuration: {\n ...tab.configuration,\n ...configUpdate\n }\n };\n }\n return tab;\n });\n\n this.UpdateConfiguration({\n ...config,\n tabs: updatedTabs\n });\n }\n\n /**\n * Update a tab's top-level `resourceRecordId` (and mirror it into `configuration.recordId`).\n *\n * Used when a \"new record\" tab transitions to a saved record — the tab was opened with\n * an empty recordId, but once the user saves, the tab now represents an actual record.\n * Without this, the next \"Create New Record\" request would match this tab (both have\n * empty `resourceRecordId`) and focus the stale form instead of opening a fresh one.\n *\n * Also clears `configuration.isNew` since the record now exists.\n */\n UpdateTabResourceRecordId(tabId: string, newRecordId: string): void {\n const config = this.configuration$.value;\n if (!config) {\n return;\n }\n\n const updatedTabs = config.tabs.map(tab => {\n if (tab.id === tabId) {\n const { isNew: _isNew, ...restConfig } = tab.configuration;\n return {\n ...tab,\n resourceRecordId: newRecordId,\n configuration: {\n ...restConfig,\n recordId: newRecordId\n }\n };\n }\n return tab;\n });\n\n this.UpdateConfiguration({\n ...config,\n tabs: updatedTabs\n });\n }\n\n /**\n * Get the ID of the currently active tab\n */\n GetActiveTabId(): string | null {\n return this.configuration$.value?.activeTabId ?? null;\n }\n\n /**\n * Generate UUID for new tabs\n */\n private generateUUID(): string {\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (c) => {\n const r = (Math.random() * 16) | 0;\n const v = c === 'x' ? r : (r & 0x3) | 0x8;\n return v.toString(16);\n });\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"workspace-state-manager.js","sourceRoot":"","sources":["../../src/lib/workspace-state-manager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAc,OAAO,EAAE,MAAM,MAAM,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAqB,SAAS,EAA8B,MAAM,sBAAsB,CAAC;AAC1G,OAAO,EAAE,cAAc,EAAqB,MAAM,+BAA+B,CAAC;AAClF,OAAO,EAGL,mCAAmC,EACpC,MAAM,gDAAgD,CAAC;;AAGxD;;;;;GAKG;AAIH,MAAM,OAAO,qBAAqB;IACxB,UAAU,GAAG,IAAI,eAAe,CAA2B,IAAI,CAAC,CAAC;IACjE,cAAc,GAAG,IAAI,eAAe,CAAgC,IAAI,CAAC,CAAC;IAC1E,YAAY,GAAG,IAAI,OAAO,EAAQ,CAAC;IACnC,QAAQ,GAAG,IAAI,eAAe,CAAU,KAAK,CAAC,CAAC;IAC/C,cAAc,GAAG,IAAI,eAAe,CAAU,IAAI,CAAC,CAAC;IACpD,WAAW,GAAG,KAAK,CAAC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AC3D,OAAO;oBACL,GAAG,GAAG;oBACN,gBAAgB,EAAE,WAAW;oBAC7B,aAAa,EAAE;wBACb,GAAG,UAAU;wBACb,QAAQ,EAAE,WAAW;qBACtB;iBACF,CAAC;YACJ,CAAC;YACD,OAAO,GAAG,CAAC;QACb,CAAC,CAAC,CAAC;QAEH,IAAI,CAAC,mBAAmB,CAAC;YACvB,GAAG,MAAM;YACT,IAAI,EAAE,WAAW;SAClB,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,cAAc;QACZ,OAAO,IAAI,CAAC,cAAc,CAAC,KAAK,EAAE,WAAW,IAAI,IAAI,CAAC;IACxD,CAAC;IAED;;OAEG;IACK,YAAY;QAClB,OAAO,sCAAsC,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE;YACnE,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC;YACnC,MAAM,CAAC,GAAG,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,GAAG,GAAG,CAAC;YAC1C,OAAO,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;QACxB,CAAC,CAAC,CAAC;IACL,CAAC;+GAr0BU,qBAAqB;gEAArB,qBAAqB,WAArB,qBAAqB,mBAFpB,MAAM;;iFAEP,qBAAqB;cAHjC,UAAU;eAAC;gBACV,UAAU,EAAE,MAAM;aACnB","sourcesContent":["import { Injectable } from '@angular/core';\nimport { BehaviorSubject, Observable, Subject } from 'rxjs';\nimport { debounceTime } from 'rxjs/operators';\nimport { Metadata, IMetadataProvider, LogStatus, PermissionConstrainedError } from '@memberjunction/core';\nimport { UserInfoEngine, MJWorkspaceEntity } from '@memberjunction/core-entities';\nimport {\n WorkspaceConfiguration,\n WorkspaceTab,\n CreateDefaultWorkspaceConfiguration\n} from './interfaces/workspace-configuration.interface';\nimport { TabRequest } from './interfaces/tab-request.interface';\n\n/**\n * Manages workspace state including tabs, layout, and persistence.\n *\n * Uses a single Workspace.Configuration JSON blob for all state,\n * with debounced saves to minimize database writes.\n */\n@Injectable({\n providedIn: 'root'\n})\nexport class WorkspaceStateManager {\n private workspace$ = new BehaviorSubject<MJWorkspaceEntity | null>(null);\n private configuration$ = new BehaviorSubject<WorkspaceConfiguration | null>(null);\n private saveRequest$ = new Subject<void>();\n private loading$ = new BehaviorSubject<boolean>(false);\n private tabBarVisible$ = new BehaviorSubject<boolean>(true);\n private initialized = false;\n\n /**\n * Optional predicate identifying tabs that belong to the MAIN layout.\n * Tabs failing the predicate (e.g. record tabs under the records-style\n * record-open model, which live in their own layout region) are excluded\n * from ALL main-layout semantics: they never force the main tab bar to\n * appear (shouldShowTabs), are never consumed as the replaceable\n * \"temporary tab\" by OpenTab, and skip the keep-last-tab-alive rule in\n * CloseTab. Null = every tab is a main-layout tab (classic behavior).\n * Kept as a settable predicate (not an import) because this package sits\n * below the package that owns the record-open style.\n * NOTE: record tabs DOCKED to the workspace (\"Move to Workspace\")\n * intentionally PASS this filter — they are main-layout tabs.\n */\n public MainLayoutTabFilter: ((tab: WorkspaceTab) => boolean) | null = null;\n\n /** True when the tab participates in main-layout semantics (see MainLayoutTabFilter) */\n private isMainLayoutTab(tab: WorkspaceTab): boolean {\n return this.MainLayoutTabFilter ? this.MainLayoutTabFilter(tab) : true;\n }\n\n /**\n * Optional predicate identifying tabs that may be CONSUMED as the\n * replaceable \"temporary tab\" by OpenTab. Record tabs (docked or not) are\n * deliberately unpinned yet must never be silently replaced by the next\n * nav click — the shell sets this to exclude ALL record tabs under the\n * records style. Null = every unpinned main-layout tab is consumable\n * (classic behavior). Settable predicate for the same layering reason as\n * MainLayoutTabFilter.\n */\n public TempTabConsumptionFilter: ((tab: WorkspaceTab) => boolean) | null = null;\n\n /** True when the tab may be consumed as OpenTab's replaceable temp tab */\n private isTempTabConsumable(tab: WorkspaceTab): boolean {\n return this.TempTabConsumptionFilter ? this.TempTabConsumptionFilter(tab) : true;\n }\n\n /**\n * Optional predicate identifying members of the records REGION — the second\n * temp-tab pool. Requests carrying `TempScope: 'records'` consume and cascade\n * within this set only, which is what gives records preview-tab behavior\n * without letting a nav click touch a record (TempTabConsumptionFilter keeps\n * guarding that direction) or a record open touch the nav tab.\n * Settable predicate for the same layering reason as MainLayoutTabFilter.\n * NOTE: record tabs DOCKED to the workspace (\"Move to Workspace\") must FAIL\n * this filter — docking is an act of investment, and a docked record is a\n * main-layout tab that nothing in either pool may consume.\n */\n public RecordsRegionTabFilter: ((tab: WorkspaceTab) => boolean) | null = null;\n\n /**\n * True when the tab belongs to the records region. A null filter means no\n * records region is active, so the pool is EMPTY — the inverse default from\n * isMainLayoutTab, and deliberately so: under the classic style a\n * records-scoped request must consume nothing rather than everything.\n */\n private isRecordsRegionTab(tab: WorkspaceTab): boolean {\n return this.RecordsRegionTabFilter ? this.RecordsRegionTabFilter(tab) : false;\n }\n\n /**\n * Optional explicit metadata provider. When set, used instead of falling back\n * to `Metadata.Provider`. The shell calls `setProvider(this.ProviderToUse)`\n * after acquiring this manager from DI.\n */\n private _provider: IMetadataProvider | null = null;\n\n public set Provider(value: IMetadataProvider | null) {\n this._provider = value;\n }\n\n public get Provider(): IMetadataProvider {\n return this._provider ?? Metadata.Provider;\n }\n\n constructor() {\n // Set up debounced saves\n this.saveRequest$.pipe(\n debounceTime(500) // Wait 500ms after last change\n ).subscribe(() => {\n this.persistConfiguration();\n });\n\n // Update tab bar visibility whenever configuration changes\n this.configuration$.subscribe(config => {\n if (config) {\n const shouldShow = this.shouldShowTabs(config);\n this.tabBarVisible$.next(shouldShow);\n }\n });\n }\n\n /**\n * Observable of the current workspace configuration\n */\n get Configuration(): Observable<WorkspaceConfiguration | null> {\n return this.configuration$.asObservable();\n }\n\n /**\n * Observable of loading state\n */\n get Loading(): Observable<boolean> {\n return this.loading$.asObservable();\n }\n\n /**\n * Observable of tab bar visibility\n * Returns false when only 1 tab exists and no tabs are pinned\n * Returns true when 2+ tabs exist OR any tabs are pinned\n */\n get TabBarVisible(): Observable<boolean> {\n return this.tabBarVisible$.asObservable();\n }\n\n /**\n * Get current configuration synchronously\n */\n GetConfiguration(): WorkspaceConfiguration | null {\n return this.configuration$.value;\n }\n\n /**\n * Determine if tab bar should be visible\n * - Hide if only 1 tab and no pinned tabs (single-resource view)\n * - Show if 2+ tabs OR any pinned tabs exist\n */\n private shouldShowTabs(config: WorkspaceConfiguration): boolean {\n // Main-layout tabs only — tabs excluded by the filter (e.g. record tabs\n // living in the separate records region) never force the main bar open.\n const tabs = (config.tabs || []).filter(t => this.isMainLayoutTab(t));\n\n // Always hide if no tabs (shouldn't happen, but defensive)\n if (tabs.length === 0) {\n return false;\n }\n\n // Check if any tabs are pinned\n const hasPinnedTabs = tabs.some(tab => tab.isPinned);\n\n // Show tabs if:\n // - 2 or more tabs exist, OR\n // - Any tab is pinned (user wants persistent workspace)\n return tabs.length > 1 || hasPinnedTabs;\n }\n\n /**\n * Initialize the workspace state for a user\n */\n async Initialize(userId: string): Promise<void> {\n if (this.initialized) {\n return;\n }\n\n this.loading$.next(true);\n\n try {\n await this.loadWorkspace(userId);\n this.initialized = true;\n } finally {\n this.loading$.next(false);\n }\n }\n\n /**\n * Ephemeral mode: when `window.__MJ_EPHEMERAL_WORKSPACE__ === true` is set\n * (only baked into the regression test Explorer build via Dockerfile.explorer),\n * the workspace neither loads from nor persists to the server. Every fresh\n * BrowserContext starts from a default workspace configuration, so tab/workspace\n * state can never leak across regression tests sharing a user. Production\n * deployments never set this flag, so behavior is unchanged.\n */\n private isEphemeral(): boolean {\n return typeof window !== 'undefined'\n && (window as Window & { __MJ_EPHEMERAL_WORKSPACE__?: boolean }).__MJ_EPHEMERAL_WORKSPACE__ === true;\n }\n\n /**\n * Load workspace from database using UserInfoEngine for centralized, cached access\n */\n private async loadWorkspace(userId: string): Promise<void> {\n if (this.isEphemeral()) {\n // Test mode — skip server load entirely. Just emit a default config so the\n // workspace starts clean for this BrowserContext. No MJWorkspaceEntity is\n // created or read; the DB row (if any) is ignored.\n this.configuration$.next(CreateDefaultWorkspaceConfiguration());\n return;\n }\n // Use UserInfoEngine for centralized, cached workspace loading\n const engine = UserInfoEngine.Instance;\n\n // Permission-denied ≠ empty — don't auto-create a workspace for denied users.\n if (engine.IsPermissionConstrained) {\n LogStatus('[WorkspaceStateManager] UserInfoEngine is permission-constrained, using default workspace configuration');\n this.configuration$.next(CreateDefaultWorkspaceConfiguration());\n return;\n }\n\n const workspaces = engine.Workspaces;\n\n if (workspaces.length > 0) {\n const workspace = workspaces[0];\n this.workspace$.next(workspace);\n\n // Parse configuration or create default\n const configJson = workspace.Configuration;\n\n const config = configJson\n ? JSON.parse(configJson) as WorkspaceConfiguration\n : CreateDefaultWorkspaceConfiguration();\n\n this.configuration$.next(config);\n }\n else {\n // Create new workspace for user\n const md = this.Provider;\n const workspace = await md.GetEntityObject<MJWorkspaceEntity>('MJ: Workspaces', md.CurrentUser);\n workspace.UserID = userId;\n workspace.Name = 'Default';\n workspace.Configuration = JSON.stringify(CreateDefaultWorkspaceConfiguration());\n\n const saveResult = await workspace.Save();\n\n if (saveResult) {\n this.workspace$.next(workspace);\n this.configuration$.next(CreateDefaultWorkspaceConfiguration());\n } else {\n console.error('[WorkspaceStateManager.loadWorkspace] Failed to save workspace');\n throw new Error('Failed to create default workspace');\n }\n }\n }\n\n /**\n * Persist configuration to database (debounced)\n */\n private async persistConfiguration(): Promise<void> {\n if (this.isEphemeral()) {\n // Test mode — no-op. We never persist workspace state in the regression\n // environment so tab/workspace state can't leak across tests.\n return;\n }\n const workspace = this.workspace$.value;\n const config = this.configuration$.value;\n\n if (workspace && config) {\n workspace.Configuration = JSON.stringify(config);\n await workspace.Save();\n }\n }\n\n /**\n * Request a save (will be debounced)\n */\n private requestSave(): void {\n this.saveRequest$.next();\n }\n\n /**\n * Update configuration and request save\n */\n UpdateConfiguration(config: WorkspaceConfiguration): void {\n this.configuration$.next(config);\n this.requestSave();\n }\n\n /**\n * Reset workspace to a clean default configuration and persist immediately.\n * Used for recovery when stale or corrupted workspace data prevents startup.\n */\n async ResetConfiguration(): Promise<void> {\n const defaultConfig = CreateDefaultWorkspaceConfiguration();\n this.configuration$.next(defaultConfig);\n await this.persistConfiguration();\n }\n\n /**\n * Force creation of a new tab, never replacing temporary tabs\n * Used for Shift+Click behavior - checks for existing tab first, only creates new if none exists\n */\n OpenTabForced(request: TabRequest, appColor: string): string {\n const config = this.configuration$.value;\n if (!config) {\n throw new Error('Configuration not initialized');\n }\n\n // Check for existing tab first - don't allow duplicate tabs\n const existingTab = config.tabs.find(tab => {\n if (tab.applicationId !== request.ApplicationId) return false;\n\n // For resource-based tabs, match by resourceType in configuration\n if (request.Configuration?.resourceType) {\n // Normalize empty/null/undefined to empty string for comparison\n const requestRecordId = request.ResourceRecordId || '';\n const tabRecordId = tab.resourceRecordId || '';\n\n // For Custom resource types, also compare navItemName or driverClass\n if (request.Configuration.resourceType === 'Custom') {\n const requestNavItem = request.Configuration.navItemName || '';\n const tabNavItem = tab.configuration?.navItemName || '';\n const requestDriverClass = request.Configuration.driverClass || '';\n const tabDriverClass = tab.configuration?.driverClass || '';\n\n return tab.configuration.resourceType === request.Configuration.resourceType &&\n tabRecordId === requestRecordId &&\n (requestNavItem === tabNavItem || requestDriverClass === tabDriverClass);\n }\n\n // For Records resource type, also match by Entity name to distinguish between different entity records\n if (request.Configuration.resourceType === 'Records') {\n const requestEntity = (request.Configuration.Entity as string)?.trim().toLowerCase() || '';\n const tabEntity = (tab.configuration?.Entity as string)?.trim().toLowerCase() || '';\n\n return tab.configuration.resourceType === request.Configuration.resourceType &&\n tabRecordId === requestRecordId &&\n requestEntity === tabEntity;\n }\n\n // For other standard resource types, match by resourceType and recordId\n return tab.configuration.resourceType === request.Configuration.resourceType &&\n tabRecordId === requestRecordId;\n }\n\n // Legacy: match by entity and viewId\n const requestRecordId = request.ResourceRecordId || '';\n const tabRecordId = tab.resourceRecordId || '';\n return tab.configuration.entity === request.Configuration?.entity &&\n tab.configuration.viewId === request.Configuration?.viewId &&\n tabRecordId === requestRecordId;\n });\n\n if (existingTab) {\n // Focus existing tab\n const updatedConfig = {\n ...config,\n activeTabId: existingTab.id\n };\n this.UpdateConfiguration(updatedConfig);\n return existingTab.id;\n }\n\n // No existing tab found - create new pinned tab\n const newTab: WorkspaceTab = {\n id: this.generateUUID(),\n applicationId: request.ApplicationId,\n title: request.Title,\n resourceTypeId: request.ResourceTypeId || '',\n resourceRecordId: request.ResourceRecordId || '',\n isPinned: request.IsPinned || false,\n sequence: config.tabs.length,\n lastAccessedAt: new Date().toISOString(),\n configuration: request.Configuration || {}\n };\n\n // CRITICAL: If creating a temporary tab, pin all existing temporary tabs\n // first. This ensures only ONE temporary tab exists at any time — per POOL,\n // now that the records region has its own (see TabRequest.TempScope).\n //\n // A records-scoped forced open (shift-click on a record) promotes the\n // region's previous temp record and leaves the nav temp tab alone; that\n // scoping is what replaced the blunt PreservePinState opt-out record opens\n // used to pass. PreservePinState still opts out of the cascade entirely.\n const inCascadeScope = request.TempScope === 'records'\n ? (tab: WorkspaceTab) => this.isRecordsRegionTab(tab)\n : () => true;\n const updatedTabs = !newTab.isPinned && !request.PreservePinState\n ? config.tabs.map(tab => !tab.isPinned && inCascadeScope(tab) ? { ...tab, isPinned: true } : tab)\n : config.tabs;\n\n this.UpdateConfiguration({\n ...config,\n tabs: [...updatedTabs, newTab],\n activeTabId: newTab.id\n });\n\n return newTab.id;\n }\n\n /**\n * Open a tab (new or focus existing)\n */\n OpenTab(request: TabRequest, appColor: string): string {\n const config = this.configuration$.value;\n if (!config) {\n throw new Error('Configuration not initialized');\n }\n\n // Check for existing tab - match by resource type and record ID for resource-based tabs\n const existingTab = config.tabs.find(tab => {\n const appIdMatch = tab.applicationId === request.ApplicationId;\n if (!appIdMatch) {\n return false;\n }\n\n // For resource-based tabs, match by resourceType in configuration\n if (request.Configuration?.resourceType) {\n // Normalize empty/null/undefined to empty string for comparison\n // IMPORTANT: Check both ResourceRecordId AND Configuration.recordId\n // because for nav items, the recordId is stored in Configuration, not ResourceRecordId\n const requestRecordId = request.ResourceRecordId || (request.Configuration?.recordId as string) || '';\n const tabRecordId = tab.resourceRecordId || (tab.configuration?.recordId as string) || '';\n\n // For Custom resource types, also compare navItemName or driverClass\n // to distinguish between different custom resources (Monitor vs Prompts vs Agents, etc.)\n if (request.Configuration.resourceType === 'Custom') {\n const requestNavItem = request.Configuration.navItemName || '';\n const tabNavItem = tab.configuration?.navItemName || '';\n const requestDriverClass = request.Configuration.driverClass || '';\n const tabDriverClass = tab.configuration?.driverClass || '';\n\n return tab.configuration.resourceType === request.Configuration.resourceType &&\n tabRecordId === requestRecordId &&\n (requestNavItem === tabNavItem || requestDriverClass === tabDriverClass);\n }\n\n // For Records resource type, also match by Entity name to distinguish between different entity records\n if (request.Configuration.resourceType === 'Records') {\n const requestEntity = (request.Configuration.Entity as string)?.trim().toLowerCase() || '';\n const tabEntity = (tab.configuration?.Entity as string)?.trim().toLowerCase() || '';\n\n return tab.configuration.resourceType === request.Configuration.resourceType &&\n tabRecordId === requestRecordId &&\n requestEntity === tabEntity;\n }\n\n // For other standard resource types, match by resourceType and recordId\n return tab.configuration.resourceType === request.Configuration.resourceType &&\n tabRecordId === requestRecordId;\n }\n\n // Legacy: match by entity and viewId\n const requestRecordId = request.ResourceRecordId || '';\n const tabRecordId = tab.resourceRecordId || '';\n return tab.configuration.entity === request.Configuration?.entity &&\n tab.configuration.viewId === request.Configuration?.viewId &&\n tabRecordId === requestRecordId;\n });\n\n if (existingTab) {\n // Focus existing tab AND update its title and configuration.\n // Title and config must be refreshed because in single-resource mode,\n // the same tab gets reused for different nav items within an app.\n const updatedTabs = config.tabs.map(tab =>\n tab.id === existingTab.id\n ? {\n ...tab,\n title: request.Title,\n configuration: { ...tab.configuration, ...request.Configuration }\n }\n : tab\n );\n const updatedConfig = {\n ...config,\n tabs: updatedTabs,\n activeTabId: existingTab.id\n };\n this.UpdateConfiguration(updatedConfig);\n return existingTab.id;\n }\n\n // Find the temporary tab to replace, within THIS request's pool.\n //\n // 'main' (the default): an unpinned tab from any app. NEVER consume a\n // non-main-layout tab (e.g. an open record under the records style —\n // they're deliberately unpinned, and replacing one here would silently\n // destroy an open record with zero user feedback).\n //\n // 'records': the records region's own temporary tab. Region membership,\n // not record identity, so a record docked to the workspace is excluded\n // from this pool as well as from the main one.\n const tempTab = request.TempScope === 'records'\n ? config.tabs.find(tab => !tab.isPinned && this.isRecordsRegionTab(tab))\n : config.tabs.find(tab => !tab.isPinned && this.isMainLayoutTab(tab) && this.isTempTabConsumable(tab));\n\n if (tempTab) {\n // Replace temporary tab\n const updatedTabs = config.tabs.map(tab =>\n tab.id === tempTab.id\n ? {\n ...tab,\n applicationId: request.ApplicationId, // Update app ID for cross-app navigation\n title: request.Title,\n resourceTypeId: request.ResourceTypeId || '',\n resourceRecordId: request.ResourceRecordId || '',\n configuration: request.Configuration || {},\n lastAccessedAt: new Date().toISOString()\n }\n : tab\n );\n this.UpdateConfiguration({\n ...config,\n tabs: updatedTabs,\n activeTabId: tempTab.id\n });\n\n return tempTab.id;\n }\n\n // Create new tab\n const newTab: WorkspaceTab = {\n id: this.generateUUID(),\n applicationId: request.ApplicationId,\n title: request.Title,\n resourceTypeId: request.ResourceTypeId || '',\n resourceRecordId: request.ResourceRecordId || '',\n isPinned: false,\n sequence: config.tabs.length,\n lastAccessedAt: new Date().toISOString(),\n configuration: request.Configuration || {}\n };\n\n this.UpdateConfiguration({\n ...config,\n tabs: [...config.tabs, newTab],\n activeTabId: newTab.id\n });\n\n return newTab.id;\n }\n\n /**\n * Close a tab\n */\n CloseTab(tabId: string): void {\n const config = this.configuration$.value;\n if (!config) return;\n\n // No-op when the tab is already gone — layout-driven close events can\n // arrive for tabs a configuration sync already removed; re-emitting an\n // unchanged config from inside a subscription pass invites re-entrancy.\n const closingTab = config.tabs.find(t => t.id === tabId);\n if (!closingTab) return;\n\n // Check if this is the last tab. The keep-alive rule (retain the tab,\n // just unpin) exists so the MAIN region never renders an empty\n // workspace — it must NOT apply to non-main-layout tabs (records):\n // keeping a closed record alive makes the records region re-create the\n // tab the user just closed, forever. Records close outright; the\n // records host is responsible for backfilling an empty workspace.\n const wouldBeLastTab = config.tabs.length === 1 && config.tabs[0].id === tabId\n && this.isMainLayoutTab(closingTab);\n\n // CRITICAL: If closing the last tab, keep it in the array but mark as unpinned\n // This allows single-resource mode to work while preserving tab data for nav highlighting\n let updatedTabs: typeof config.tabs;\n if (wouldBeLastTab) {\n // Keep the tab but ensure it's unpinned (triggers single-resource mode)\n updatedTabs = config.tabs.map(tab =>\n tab.id === tabId ? { ...tab, isPinned: false } : tab\n );\n } else {\n // Normal case: remove the tab from array\n updatedTabs = config.tabs.filter(tab => tab.id !== tabId);\n }\n\n // Update active tab if needed\n let activeTabId = config.activeTabId;\n if (activeTabId === tabId && !wouldBeLastTab) {\n // Find next tab to activate (only when not keeping the last tab)\n const closedIndex = config.tabs.findIndex(tab => tab.id === tabId);\n const nextTab = updatedTabs[closedIndex] || updatedTabs[closedIndex - 1];\n activeTabId = nextTab?.id || null;\n }\n\n this.UpdateConfiguration({\n ...config,\n tabs: updatedTabs,\n activeTabId\n });\n }\n\n /**\n * Close all tabs except the specified one\n */\n CloseOtherTabs(tabId: string): void {\n const config = this.configuration$.value;\n if (!config) return;\n\n // Keep only the specified tab\n const updatedTabs = config.tabs.filter(tab => tab.id === tabId);\n\n this.UpdateConfiguration({\n ...config,\n tabs: updatedTabs,\n activeTabId: tabId\n });\n }\n\n /**\n * Close all tabs to the right of the specified tab\n */\n CloseTabsToRight(tabId: string): void {\n const config = this.configuration$.value;\n if (!config) return;\n\n const tabIndex = config.tabs.findIndex(tab => tab.id === tabId);\n if (tabIndex === -1) return;\n\n // Keep only tabs up to and including the specified tab\n const updatedTabs = config.tabs.slice(0, tabIndex + 1);\n\n // Update active tab if it was closed\n let activeTabId = config.activeTabId;\n if (!updatedTabs.find(tab => tab.id === activeTabId)) {\n activeTabId = tabId;\n }\n\n this.UpdateConfiguration({\n ...config,\n tabs: updatedTabs,\n activeTabId\n });\n }\n\n /**\n * Clear the saved layout structure.\n * This is used to recover from corrupted layouts - tabs will be recreated fresh.\n */\n ClearLayout(): void {\n const config = this.configuration$.value;\n if (!config) return;\n\n this.UpdateConfiguration({\n ...config,\n layout: undefined // Clear the layout, tabs will be recreated fresh\n });\n }\n\n /**\n * Toggle pin state of a tab\n */\n TogglePin(tabId: string): void {\n const config = this.configuration$.value;\n if (!config) return;\n\n const updatedTabs = config.tabs.map(tab =>\n tab.id === tabId\n ? { ...tab, isPinned: !tab.isPinned }\n : tab\n );\n\n this.UpdateConfiguration({\n ...config,\n tabs: updatedTabs\n });\n }\n\n /**\n * Set active tab\n */\n SetActiveTab(tabId: string): void {\n const config = this.configuration$.value;\n if (!config) return;\n\n // Update last accessed time\n const updatedTabs = config.tabs.map(tab =>\n tab.id === tabId\n ? { ...tab, lastAccessedAt: new Date().toISOString() }\n : tab\n );\n\n this.UpdateConfiguration({\n ...config,\n tabs: updatedTabs,\n activeTabId: tabId\n });\n }\n\n /**\n * Update tab sequences after reorder\n */\n UpdateTabSequences(tabIds: string[]): void {\n const config = this.configuration$.value;\n if (!config) return;\n\n const updatedTabs = config.tabs.map(tab => {\n const newSequence = tabIds.indexOf(tab.id);\n return newSequence >= 0 ? { ...tab, sequence: newSequence } : tab;\n }).sort((a, b) => a.sequence - b.sequence);\n\n this.UpdateConfiguration({\n ...config,\n tabs: updatedTabs\n });\n }\n\n /**\n * Update layout configuration\n */\n UpdateLayout(layout: WorkspaceConfiguration['layout']): void {\n const config = this.configuration$.value;\n if (!config) return;\n\n this.UpdateConfiguration({\n ...config,\n layout\n });\n }\n\n /**\n * Update the RECORDS region layout (the separate Golden Layout hosting\n * record tabs under the records-style record-open model).\n */\n UpdateRecordsLayout(recordsLayout: WorkspaceConfiguration['recordsLayout']): void {\n const config = this.configuration$.value;\n if (!config) return;\n\n this.UpdateConfiguration({\n ...config,\n recordsLayout\n });\n }\n\n /**\n * Get tab by ID\n */\n GetTab(tabId: string): WorkspaceTab | undefined {\n return this.configuration$.value?.tabs.find(tab => tab.id === tabId);\n }\n\n /**\n * Get tabs for a specific application\n */\n GetAppTabs(appId: string): WorkspaceTab[] {\n return this.configuration$.value?.tabs.filter(tab => tab.applicationId === appId) || [];\n }\n\n /**\n * Update the title of a specific tab\n */\n UpdateTabTitle(tabId: string, newTitle: string): void {\n const config = this.configuration$.value;\n if (!config) {\n return;\n }\n\n const updatedTabs = config.tabs.map(tab =>\n tab.id === tabId ? { ...tab, title: newTitle } : tab\n );\n\n this.UpdateConfiguration({\n ...config,\n tabs: updatedTabs\n });\n }\n\n /**\n * Update the configuration of a specific tab.\n * Merges the provided partial configuration with the existing tab configuration.\n * @param tabId The ID of the tab to update\n * @param configUpdate Partial configuration to merge with existing configuration\n */\n UpdateTabConfiguration(tabId: string, configUpdate: Partial<WorkspaceTab['configuration']>): void {\n const config = this.configuration$.value;\n if (!config) {\n return;\n }\n\n const updatedTabs = config.tabs.map(tab => {\n if (tab.id === tabId) {\n return {\n ...tab,\n configuration: {\n ...tab.configuration,\n ...configUpdate\n }\n };\n }\n return tab;\n });\n\n this.UpdateConfiguration({\n ...config,\n tabs: updatedTabs\n });\n }\n\n /**\n * Update a tab's top-level `resourceRecordId` (and mirror it into `configuration.recordId`).\n *\n * Used when a \"new record\" tab transitions to a saved record — the tab was opened with\n * an empty recordId, but once the user saves, the tab now represents an actual record.\n * Without this, the next \"Create New Record\" request would match this tab (both have\n * empty `resourceRecordId`) and focus the stale form instead of opening a fresh one.\n *\n * Also clears `configuration.isNew` since the record now exists.\n */\n UpdateTabResourceRecordId(tabId: string, newRecordId: string): void {\n const config = this.configuration$.value;\n if (!config) {\n return;\n }\n\n const updatedTabs = config.tabs.map(tab => {\n if (tab.id === tabId) {\n const { isNew: _isNew, ...restConfig } = tab.configuration;\n return {\n ...tab,\n resourceRecordId: newRecordId,\n configuration: {\n ...restConfig,\n recordId: newRecordId\n }\n };\n }\n return tab;\n });\n\n this.UpdateConfiguration({\n ...config,\n tabs: updatedTabs\n });\n }\n\n /**\n * Get the ID of the currently active tab\n */\n GetActiveTabId(): string | null {\n return this.configuration$.value?.activeTabId ?? null;\n }\n\n /**\n * Generate UUID for new tabs\n */\n private generateUUID(): string {\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (c) => {\n const r = (Math.random() * 16) | 0;\n const v = c === 'x' ? r : (r & 0x3) | 0x8;\n return v.toString(16);\n });\n }\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@memberjunction/ng-base-application",
|
|
3
|
-
"version": "6.1
|
|
3
|
+
"version": "6.2.0-edge.1",
|
|
4
4
|
"description": "MemberJunction Explorer: BaseApplication class system for app-centric navigation",
|
|
5
5
|
"main": "./dist/public-api.js",
|
|
6
6
|
"typings": "./dist/public-api.d.ts",
|
|
@@ -25,9 +25,9 @@
|
|
|
25
25
|
"@angular/core": "^21.2.22"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@memberjunction/global": "6.1
|
|
29
|
-
"@memberjunction/core": "6.1
|
|
30
|
-
"@memberjunction/core-entities": "6.1
|
|
28
|
+
"@memberjunction/global": "6.2.0-edge.1",
|
|
29
|
+
"@memberjunction/core": "6.2.0-edge.1",
|
|
30
|
+
"@memberjunction/core-entities": "6.2.0-edge.1",
|
|
31
31
|
"golden-layout": "^2.6.0",
|
|
32
32
|
"rxjs": "~7.8.2",
|
|
33
33
|
"tslib": "^2.8.1"
|