feat(core): remember backlink open/close state (#9073)

fix AF-1850, AF-1883
This commit is contained in:
pengx17
2024-12-10 02:28:20 +00:00
parent 4335b0dc79
commit ec140da0d9
7 changed files with 132 additions and 25 deletions
@@ -1,17 +1,35 @@
export { GlobalCache, GlobalState } from './providers/global';
export { GlobalCacheService, GlobalStateService } from './services/global';
export {
GlobalCache,
GlobalSessionState,
GlobalState,
} from './providers/global';
export {
GlobalCacheService,
GlobalSessionStateService,
GlobalStateService,
} from './services/global';
import type { Framework } from '../../framework';
import { MemoryMemento } from '../../storage';
import { GlobalCache, GlobalState } from './providers/global';
import { GlobalCacheService, GlobalStateService } from './services/global';
import {
GlobalCache,
GlobalSessionState,
GlobalState,
} from './providers/global';
import {
GlobalCacheService,
GlobalSessionStateService,
GlobalStateService,
} from './services/global';
export const configureGlobalStorageModule = (framework: Framework) => {
framework.service(GlobalStateService, [GlobalState]);
framework.service(GlobalCacheService, [GlobalCache]);
framework.service(GlobalSessionStateService, [GlobalSessionState]);
};
export const configureTestingGlobalStorage = (framework: Framework) => {
framework.impl(GlobalCache, MemoryMemento);
framework.impl(GlobalState, MemoryMemento);
framework.impl(GlobalSessionState, MemoryMemento);
};