@memberjunction/ng-base-application 6.2.0-edge.3 → 6.2.0-edge.5
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 +103 -0
- package/dist/lib/__tests__/base-application.test.js.map +1 -1
- package/dist/lib/__tests__/permission-constrained-boot.test.d.ts +2 -0
- package/dist/lib/__tests__/permission-constrained-boot.test.d.ts.map +1 -0
- package/dist/lib/__tests__/permission-constrained-boot.test.js +114 -0
- package/dist/lib/__tests__/permission-constrained-boot.test.js.map +1 -0
- package/dist/lib/__tests__/tab-service-url-replacement.test.d.ts +2 -0
- package/dist/lib/__tests__/tab-service-url-replacement.test.d.ts.map +1 -0
- package/dist/lib/__tests__/tab-service-url-replacement.test.js +33 -0
- package/dist/lib/__tests__/tab-service-url-replacement.test.js.map +1 -0
- package/dist/lib/__tests__/workspace-journal.test.d.ts +2 -0
- package/dist/lib/__tests__/workspace-journal.test.d.ts.map +1 -0
- package/dist/lib/__tests__/workspace-journal.test.js +317 -0
- package/dist/lib/__tests__/workspace-journal.test.js.map +1 -0
- package/dist/lib/application-manager.d.ts +21 -0
- package/dist/lib/application-manager.d.ts.map +1 -1
- package/dist/lib/application-manager.js +59 -5
- package/dist/lib/application-manager.js.map +1 -1
- package/dist/lib/tab.service.d.ts +21 -0
- package/dist/lib/tab.service.d.ts.map +1 -1
- package/dist/lib/tab.service.js +34 -0
- package/dist/lib/tab.service.js.map +1 -1
- package/dist/lib/workspace-journal.d.ts +87 -0
- package/dist/lib/workspace-journal.d.ts.map +1 -0
- package/dist/lib/workspace-journal.js +123 -0
- package/dist/lib/workspace-journal.js.map +1 -0
- package/dist/lib/workspace-state-manager.d.ts +57 -1
- package/dist/lib/workspace-state-manager.d.ts.map +1 -1
- package/dist/lib/workspace-state-manager.js +159 -11
- package/dist/lib/workspace-state-manager.js.map +1 -1
- package/dist/public-api.d.ts +1 -0
- package/dist/public-api.d.ts.map +1 -1
- package/dist/public-api.js +1 -0
- package/dist/public-api.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,IAAI,eAAe,CAAU,KAAK,CAAC,CAAC;IAC/C,cAAc,GAAG,IAAI,eAAe,CAAU,IAAI,CAAC,CAAC;IACpD,WAAW,GAAG,KAAK,CAAC;IAE5B;;;;;;;;;;;;OAYG;IACI,mBAAmB,GAA4C,IAAI,CAAC;IAE3E,wFAAwF;IAChF,eAAe,CAAC,GAAiB;QACvC,OAAO,IAAI,CAAC,mBAAmB,CAAC,CAAC,CAAC,IAAI,CAAC,mBAAmB,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IACzE,CAAC;IAED;;;;;;;;OAQG;IACI,wBAAwB,GAA4C,IAAI,CAAC;IAEhF,0EAA0E;IAClE,mBAAmB,CAAC,GAAiB;QAC3C,OAAO,IAAI,CAAC,wBAAwB,CAAC,CAAC,CAAC,IAAI,CAAC,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} 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 * Pin a tab, idempotently. Used to PROMOTE a records-region preview tab the\n * moment its form enters edit mode (VS Code's promote-on-modify): a promoted\n * tab is pinned, so it is neither replaceable by the next plain open nor\n * rendered italic. Unlike TogglePin this never unpins, and it emits NO\n * configuration update when the tab is already pinned or does not exist —\n * new-record tabs are born pinned and report edit mode on init, so a\n * non-idempotent pin would persist workspace state on every new record.\n */\n PinTab(tabId: string): void {\n const config = this.configuration$.value;\n if (!config) return;\n const tab = config.tabs.find(t => t.id === tabId);\n if (!tab || tab.isPinned) return;\n\n this.UpdateConfiguration({\n ...config,\n tabs: config.tabs.map(t => (t.id === tabId ? { ...t, isPinned: true } : t))\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,E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,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;+GA3/BU,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';\nimport {\n BrowserWorkspaceJournalStorage,\n ShouldUseWorkspaceJournal,\n WorkspaceJournal\n} from './workspace-journal';\n\n/**\n * Options for {@link WorkspaceStateManager.Initialize}.\n */\nexport interface WorkspaceInitializeOptions {\n /**\n * Adjusts the loaded configuration BEFORE it is published to any subscriber.\n *\n * The shell uses this to make a deep link win on a full page load: the URL's query params\n * are written into the matching restored tab before the tab container mounts that tab's\n * component. Applying them afterwards (when the resolver's queued tab request replays) is\n * too late — the component has already initialised from the saved params, and an async\n * init that writes its selection back can clobber the URL's params entirely.\n *\n * Return the same object for \"no change\"; a different object is published and persisted.\n */\n PrepareConfiguration?: (config: WorkspaceConfiguration) => WorkspaceConfiguration | Promise<WorkspaceConfiguration>;\n}\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 /** The user this manager was initialized for (journal key). */\n private userId: string | null = null;\n\n /** A configuration change has been requested but not yet handed to the database. */\n private savePending = false;\n\n /**\n * The database save currently running, if any. Saves run one at a time: they share one\n * `MJ: Workspaces` entity instance, and a flush on page hide must not start a second\n * `Save()` on it while the debounced one is still in flight.\n */\n private saveInFlight: Promise<void> | null = null;\n\n /** The serialized configuration the in-flight save is writing (journaled — see WorkspaceJournalEntry.InFlightConfiguration). */\n private inFlightConfiguration: string | null = null;\n\n /**\n * Synchronous browser-local snapshot of the newest configuration — see {@link WorkspaceJournal}.\n * Replaceable for tests.\n */\n public Journal: WorkspaceJournal = new WorkspaceJournal(BrowserWorkspaceJournalStorage);\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.runPendingSave();\n });\n\n // Flush the debounced save when the page is going away or being backgrounded, so a\n // refresh/close inside the debounce window doesn't drop the newest change. (The journal\n // already holds it locally; this gets it to the database too.) beforeunload is avoided\n // deliberately: registering it makes the page ineligible for the back/forward cache.\n if (typeof window !== 'undefined' && typeof window.addEventListener === 'function') {\n window.addEventListener('pagehide', () => { void this.FlushPendingSave(); });\n if (typeof document !== 'undefined') {\n document.addEventListener('visibilitychange', () => {\n if (document.visibilityState === 'hidden') {\n void this.FlushPendingSave();\n }\n });\n }\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, options?: WorkspaceInitializeOptions): Promise<void> {\n if (this.initialized) {\n return;\n }\n\n this.loading$.next(true);\n this.userId = userId;\n\n try {\n await this.loadWorkspace(userId, options);\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, options?: WorkspaceInitializeOptions): 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 // No server row to persist to, but the browser journal still carries this session's\n // tabs across a refresh.\n const journal = this.Journal.Read(userId);\n const base = ShouldUseWorkspaceJournal(journal, null, null) && journal\n ? journal.Configuration\n : CreateDefaultWorkspaceConfiguration();\n await this.publishInitialConfiguration(base, options, false);\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 serverConfig = configJson\n ? JSON.parse(configJson) as WorkspaceConfiguration\n : CreateDefaultWorkspaceConfiguration();\n\n // A refresh inside the debounce/save window left a newer snapshot in the journal than\n // the row we just read (or the row came from a stale local cache): the journal wins,\n // and is pushed to the database.\n const journal = this.Journal.Read(userId);\n const useJournal = ShouldUseWorkspaceJournal(journal, workspace.ID, workspace.__mj_UpdatedAt, configJson) && journal != null\n && JSON.stringify(journal.Configuration) !== JSON.stringify(serverConfig);\n if (useJournal) {\n LogStatus('[WorkspaceStateManager] Restoring workspace from the local journal (newer than the saved row)');\n }\n\n await this.publishInitialConfiguration(useJournal && journal ? journal.Configuration : serverConfig, options, useJournal);\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 // Through the same path as a loaded row, so a brand-new user's first boot also gets the\n // PrepareConfiguration hook (deep-link precedence) and a journal seeded on the new row.\n await this.publishInitialConfiguration(CreateDefaultWorkspaceConfiguration(), options, false);\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 * Runs the caller's {@link WorkspaceInitializeOptions.PrepareConfiguration} hook, then\n * publishes the result as the first configuration. Persists when the hook (or the journal)\n * changed what the server holds.\n */\n private async publishInitialConfiguration(\n config: WorkspaceConfiguration,\n options: WorkspaceInitializeOptions | undefined,\n alreadyDiffersFromServer: boolean\n ): Promise<void> {\n let prepared = config;\n if (options?.PrepareConfiguration) {\n try {\n prepared = await options.PrepareConfiguration(config);\n } catch (e) {\n // The hook is an enhancement (deep-link precedence); never let it block startup.\n console.error('[WorkspaceStateManager] PrepareConfiguration failed; using the loaded configuration', e);\n prepared = config;\n }\n }\n this.configuration$.next(prepared);\n if (alreadyDiffersFromServer || prepared !== config) {\n this.requestSave();\n }\n else {\n this.writeJournal(); // seed / re-base the snapshot on the row as loaded\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 const json = JSON.stringify(config);\n workspace.Configuration = json;\n // Journal what this save writes BEFORE it is sent: if the page unloads while it is in flight\n // and the write still lands, the next load recognises the newer row as this browser's own.\n this.inFlightConfiguration = json;\n this.writeJournal();\n try {\n await workspace.Save();\n } finally {\n this.inFlightConfiguration = null;\n // Re-base the journal on the stamp this save produced (a failed save leaves the stamp, and\n // so the base, unchanged). The CURRENT configuration is written, not the one just saved:\n // any change made while the save was in flight is newer still, and must keep winning.\n this.writeJournal();\n }\n }\n }\n\n /**\n * Runs the debounced save if one is still pending (a flush may already have run it). Saves are\n * serialised: a call while one is in flight waits for it, then saves whatever is still pending.\n */\n private runPendingSave(): Promise<void> {\n if (this.saveInFlight) {\n return this.saveInFlight.then(() => this.runPendingSave());\n }\n if (!this.savePending) {\n return Promise.resolve();\n }\n this.savePending = false;\n const run: Promise<void> = this.persistConfiguration()\n .catch((e: unknown) => {\n // A failed save leaves the change in the journal; the next change (or load) retries it.\n console.error('[WorkspaceStateManager] Workspace save failed', e);\n })\n .finally(() => {\n if (this.saveInFlight === run) {\n this.saveInFlight = null;\n }\n });\n this.saveInFlight = run;\n return run;\n }\n\n /**\n * Persist any change still waiting in the save debounce NOW. Called automatically on\n * `pagehide` and when the page becomes hidden; hosts may also call it before a deliberate\n * reload or sign-out. A no-op when nothing is pending.\n */\n FlushPendingSave(): Promise<void> {\n return this.runPendingSave();\n }\n\n /** True while a configuration change is waiting for the debounced database save. */\n get HasPendingSave(): boolean {\n return this.savePending;\n }\n\n /**\n * Request a save (will be debounced)\n */\n private requestSave(): void {\n this.savePending = true;\n this.writeJournal();\n this.saveRequest$.next();\n }\n\n /** Synchronously snapshot the current configuration to the browser journal. */\n private writeJournal(): void {\n const config = this.configuration$.value;\n if (!config || !this.userId || this.isEphemeral()) {\n return;\n }\n const workspace = this.workspace$.value;\n // Typed Date, but a value that crossed the wire can still be an ISO string at runtime.\n const base: Date | string | null | undefined = workspace?.__mj_UpdatedAt;\n this.Journal.Write({\n Version: 1,\n UserID: this.userId,\n WorkspaceID: workspace?.ID ?? null,\n BaseUpdatedAt: base instanceof Date ? base.toISOString() : (base ?? null),\n InFlightConfiguration: this.inFlightConfiguration,\n Configuration: config\n });\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 this.savePending = true;\n this.writeJournal(); // the reset must also replace a (possibly corrupt) local snapshot\n await this.runPendingSave(); // serialised with any save already in flight\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 * Pin a tab, idempotently. Used to PROMOTE a records-region preview tab the\n * moment its form enters edit mode (VS Code's promote-on-modify): a promoted\n * tab is pinned, so it is neither replaceable by the next plain open nor\n * rendered italic. Unlike TogglePin this never unpins, and it emits NO\n * configuration update when the tab is already pinned or does not exist —\n * new-record tabs are born pinned and report edit mode on init, so a\n * non-idempotent pin would persist workspace state on every new record.\n */\n PinTab(tabId: string): void {\n const config = this.configuration$.value;\n if (!config) return;\n const tab = config.tabs.find(t => t.id === tabId);\n if (!tab || tab.isPinned) return;\n\n this.UpdateConfiguration({\n ...config,\n tabs: config.tabs.map(t => (t.id === tabId ? { ...t, isPinned: true } : t))\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/dist/public-api.d.ts
CHANGED
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
export * from './lib/base-application';
|
|
8
8
|
export * from './lib/application-manager';
|
|
9
9
|
export * from './lib/workspace-state-manager';
|
|
10
|
+
export * from './lib/workspace-journal';
|
|
10
11
|
export * from './lib/golden-layout-manager';
|
|
11
12
|
export * from './lib/layout-transforms';
|
|
12
13
|
export * from './lib/tab.service';
|
package/dist/public-api.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"public-api.d.ts","sourceRoot":"","sources":["../src/public-api.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,cAAc,wBAAwB,CAAC;AACvC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,yBAAyB,CAAC;AACxC,cAAc,mBAAmB,CAAC;AAGlC,cAAc,qCAAqC,CAAC;AACpD,cAAc,wCAAwC,CAAC;AACvD,cAAc,oDAAoD,CAAC"}
|
|
1
|
+
{"version":3,"file":"public-api.d.ts","sourceRoot":"","sources":["../src/public-api.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,cAAc,wBAAwB,CAAC;AACvC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,yBAAyB,CAAC;AACxC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,yBAAyB,CAAC;AACxC,cAAc,mBAAmB,CAAC;AAGlC,cAAc,qCAAqC,CAAC;AACpD,cAAc,wCAAwC,CAAC;AACvD,cAAc,oDAAoD,CAAC"}
|
package/dist/public-api.js
CHANGED
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
export * from './lib/base-application';
|
|
9
9
|
export * from './lib/application-manager';
|
|
10
10
|
export * from './lib/workspace-state-manager';
|
|
11
|
+
export * from './lib/workspace-journal';
|
|
11
12
|
export * from './lib/golden-layout-manager';
|
|
12
13
|
export * from './lib/layout-transforms';
|
|
13
14
|
export * from './lib/tab.service';
|
package/dist/public-api.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"public-api.js","sourceRoot":"","sources":["../src/public-api.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,eAAe;AACf,cAAc,wBAAwB,CAAC;AACvC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,yBAAyB,CAAC;AACxC,cAAc,mBAAmB,CAAC;AAElC,aAAa;AACb,cAAc,qCAAqC,CAAC;AACpD,cAAc,wCAAwC,CAAC;AACvD,cAAc,oDAAoD,CAAC","sourcesContent":["/**\n * @memberjunction/ng-base-application\n *\n * BaseApplication class system for app-centric navigation in MemberJunction Explorer.\n * Provides extensible application classes, workspace configuration types, and state management.\n */\n\n// Core classes\nexport * from './lib/base-application';\nexport * from './lib/application-manager';\nexport * from './lib/workspace-state-manager';\nexport * from './lib/golden-layout-manager';\nexport * from './lib/layout-transforms';\nexport * from './lib/tab.service';\n\n// Interfaces\nexport * from './lib/interfaces/nav-item.interface';\nexport * from './lib/interfaces/tab-request.interface';\nexport * from './lib/interfaces/workspace-configuration.interface';\n"]}
|
|
1
|
+
{"version":3,"file":"public-api.js","sourceRoot":"","sources":["../src/public-api.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,eAAe;AACf,cAAc,wBAAwB,CAAC;AACvC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,yBAAyB,CAAC;AACxC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,yBAAyB,CAAC;AACxC,cAAc,mBAAmB,CAAC;AAElC,aAAa;AACb,cAAc,qCAAqC,CAAC;AACpD,cAAc,wCAAwC,CAAC;AACvD,cAAc,oDAAoD,CAAC","sourcesContent":["/**\n * @memberjunction/ng-base-application\n *\n * BaseApplication class system for app-centric navigation in MemberJunction Explorer.\n * Provides extensible application classes, workspace configuration types, and state management.\n */\n\n// Core classes\nexport * from './lib/base-application';\nexport * from './lib/application-manager';\nexport * from './lib/workspace-state-manager';\nexport * from './lib/workspace-journal';\nexport * from './lib/golden-layout-manager';\nexport * from './lib/layout-transforms';\nexport * from './lib/tab.service';\n\n// Interfaces\nexport * from './lib/interfaces/nav-item.interface';\nexport * from './lib/interfaces/tab-request.interface';\nexport * from './lib/interfaces/workspace-configuration.interface';\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@memberjunction/ng-base-application",
|
|
3
|
-
"version": "6.2.0-edge.
|
|
3
|
+
"version": "6.2.0-edge.5",
|
|
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.2.0-edge.
|
|
29
|
-
"@memberjunction/core": "6.2.0-edge.
|
|
30
|
-
"@memberjunction/core-entities": "6.2.0-edge.
|
|
28
|
+
"@memberjunction/global": "6.2.0-edge.5",
|
|
29
|
+
"@memberjunction/core": "6.2.0-edge.5",
|
|
30
|
+
"@memberjunction/core-entities": "6.2.0-edge.5",
|
|
31
31
|
"golden-layout": "^2.6.0",
|
|
32
32
|
"rxjs": "~7.8.2",
|
|
33
33
|
"tslib": "^2.8.1"
|