-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into ADA-1065-Bofa-Groupe-Connect-Ensure-dialog…
- Loading branch information
Showing
47 changed files
with
870 additions
and
175 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
export interface IconComponent { | ||
registerComponent(): any; | ||
getSvgIcon(): any; | ||
getComponentText(): any; | ||
} | ||
|
||
export class BottomBarRegistryManager { | ||
private _registry: Map<string, any>; | ||
|
||
constructor() { | ||
this._registry = new Map(); | ||
} | ||
|
||
public register(componentName: string, componentIcon: any): void { | ||
if (!this.getComponentItem(componentName)) { | ||
this._registry.set(componentName, componentIcon); | ||
} | ||
} | ||
|
||
public unregister(componentName: string): void { | ||
if (this.getComponentItem(componentName)) { | ||
this._registry.delete(componentName); | ||
} | ||
} | ||
|
||
public getComponentItem(componentName: string): any { | ||
return this._registry.get(componentName); | ||
} | ||
|
||
public clear(): void { | ||
this._registry.clear(); | ||
} | ||
} | ||
|
||
export const bottomBarRegistryManager: string = 'bottomBarRegistryManager'; | ||
|
||
export const registerToBottomBar = (componentName: string, player: any, getIconDtoCallback: () => any): void => { | ||
const bottomBarRegistry = (player?.getService(bottomBarRegistryManager) as BottomBarRegistryManager) || undefined; | ||
if (bottomBarRegistry && !bottomBarRegistry.getComponentItem(componentName)) { | ||
bottomBarRegistry.register(componentName, getIconDtoCallback()); | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
export {BottomBar} from './bottom-bar'; | ||
export * from './bottom-bar-registry-manager'; |
Oops, something went wrong.