* feat(singleton-manager): lazifyInstation functionality * Update getLocalizeManager to register itself lazily Co-authored by: Thijs Louisse <Thijs.Louisse@ing.com> --------- Co-authored-by: Byoungyoung Kim <Byoungyoung.Kim@ing.com>
16 lines
512 B
JavaScript
16 lines
512 B
JavaScript
import { singletonManager, lazifyInstantiation } from 'singleton-manager';
|
|
import { OverlaysManager } from './OverlaysManager.js';
|
|
|
|
/**
|
|
* @returns {OverlaysManager}
|
|
*/
|
|
function getOverlaysManager() {
|
|
if (!singletonManager.has('@lion/ui::overlays::0.x')) {
|
|
const overlaysManager = new OverlaysManager();
|
|
singletonManager.set('@lion/ui::overlays::0.x', overlaysManager);
|
|
}
|
|
|
|
return singletonManager.get('@lion/ui::overlays::0.x');
|
|
}
|
|
|
|
export const overlays = lazifyInstantiation(getOverlaysManager);
|