UNPKG

@ng-doc/ui-kit

Version:

<!-- PROJECT LOGO --> <br /> <div align="center"> <a href="https://github.com/ng-doc/ng-doc"> <img src="https://ng-doc.com/assets/images/ng-doc.svg?raw=true" alt="Logo" height="150px"> </a>

42 lines (37 loc) 1.01 kB
import { isPresent } from '@ng-doc/core/helpers/is-present'; import { ElementRef } from '@angular/core'; /** * @param defaultConfig * @param currentConfig * @param hostConfig */ /** * * @param defaultConfig * @param currentConfig * @param hostConfig */ function mergeOverlayConfigs(defaultConfig, currentConfig, hostConfig = {}) { const configKeys = Object.keys({ ...defaultConfig, ...currentConfig, }); const newConfig = {}; for (const key of configKeys) { newConfig[key] = (defaultConfig[key] !== currentConfig[key] && isPresent(currentConfig[key]) ? currentConfig[key] : (hostConfig && hostConfig[key]) ?? defaultConfig[key]); } return newConfig; } /** * @param element */ function toElement(element) { return element instanceof ElementRef ? element.nativeElement : element; } /** * Generated bundle index. Do not edit. */ export { mergeOverlayConfigs, toElement }; //# sourceMappingURL=ng-doc-ui-kit-helpers.mjs.map