UNPKG

@nebular/theme

Version:
1 lines 1.66 MB
{"version":3,"file":"nebular-theme.mjs","sources":["../../../src/framework/theme/theme.options.ts","../../../src/framework/theme/services/breakpoints.service.ts","../../../src/framework/theme/services/js-themes/default.theme.ts","../../../src/framework/theme/services/js-themes/cosmic.theme.ts","../../../src/framework/theme/services/js-themes/corporate.theme.ts","../../../src/framework/theme/services/js-themes/dark.theme.ts","../../../src/framework/theme/services/js-themes-registry.service.ts","../../../src/framework/theme/services/theme.service.ts","../../../src/framework/theme/services/spinner.service.ts","../../../src/framework/theme/services/direction.service.ts","../../../src/framework/theme/services/scroll.service.ts","../../../src/framework/theme/services/ruler.service.ts","../../../src/framework/theme/components/shared/shared.module.ts","../../../src/framework/theme/components/cdk/a11y/focus-trap.ts","../../../src/framework/theme/components/cdk/a11y/focus-key-manager.ts","../../../src/framework/theme/components/cdk/a11y/descendant-key-manager.ts","../../../src/framework/theme/components/cdk/a11y/a11y.module.ts","../../../src/framework/theme/components/cdk/overlay/mapping.ts","../../../src/framework/theme/components/cdk/overlay/position-helper.ts","../../../src/framework/theme/components/cdk/platform/platform-service.ts","../../../src/framework/theme/components/cdk/adapter/viewport-ruler-adapter.ts","../../../src/framework/theme/components/cdk/adapter/overlay-container-adapter.ts","../../../src/framework/theme/components/cdk/overlay/overlay-position.ts","../../../src/framework/theme/components/cdk/overlay/overlay-container.ts","../../../src/framework/theme/components/cdk/overlay/overlay-service.ts","../../../src/framework/theme/components/cdk/adapter/scroll-dispatcher-adapter.ts","../../../src/framework/theme/components/cdk/adapter/block-scroll-strategy-adapter.ts","../../../src/framework/theme/components/cdk/adapter/adapter.module.ts","../../../src/framework/theme/components/cdk/overlay/overlay-trigger.ts","../../../src/framework/theme/components/cdk/overlay/overlay.module.ts","../../../src/framework/theme/services/status.service.ts","../../../src/framework/theme/theme.module.ts","../../../src/framework/theme/services/color.helper.ts","../../../src/framework/theme/components/icon/icon-pack.ts","../../../src/framework/theme/components/icon/icon.ts","../../../src/framework/theme/components/icon/icon-libraries.ts","../../../src/framework/theme/components/icon/icon.component.ts","../../../src/framework/theme/components/icon/icon.module.ts","../../../src/framework/theme/components/card/card.component.ts","../../../src/framework/theme/components/card/reveal-card/reveal-card.component.ts","../../../src/framework/theme/components/card/flip-card/flip-card.component.ts","../../../src/framework/theme/components/card/shared/shared.component.ts","../../../src/framework/theme/components/card/card.module.ts","../../../src/framework/theme/components/calendar-kit/model.ts","../../../src/framework/theme/components/helpers.ts","../../../src/framework/theme/components/calendar-kit/services/date.service.ts","../../../src/framework/theme/components/calendar-kit/helpers.ts","../../../src/framework/theme/components/calendar-kit/services/calendar-year-model.service.ts","../../../src/framework/theme/components/button/base-button.ts","../../../src/framework/theme/components/button/button.component.ts","../../../src/framework/theme/components/calendar-kit/components/calendar-navigation/calendar-view-mode.component.ts","../../../src/framework/theme/components/calendar-kit/components/calendar-navigation/calendar-pageable-navigation.component.ts","../../../src/framework/theme/components/calendar-kit/components/calendar-year-picker/calendar-year-cell.component.ts","../../../src/framework/theme/components/calendar-kit/components/calendar-picker/calendar-picker-row.component.ts","../../../src/framework/theme/components/calendar-kit/components/calendar-picker/calendar-picker.component.ts","../../../src/framework/theme/components/calendar-kit/components/calendar-year-picker/calendar-year-picker.component.ts","../../../src/framework/theme/components/calendar-kit/components/calendar-month-picker/calendar-month-cell.component.ts","../../../src/framework/theme/components/calendar-kit/components/calendar-month-picker/calendar-month-picker.component.ts","../../../src/framework/theme/components/calendar-kit/components/calendar-day-picker/calendar-day-cell.component.ts","../../../src/framework/theme/components/calendar-kit/services/calendar-month-model.service.ts","../../../src/framework/theme/components/calendar-kit/components/calendar-days-names/calendar-days-names.component.ts","../../../src/framework/theme/components/calendar-kit/components/calendar-week-number/calendar-week-number.component.ts","../../../src/framework/theme/components/calendar-kit/components/calendar-day-picker/calendar-day-picker.component.ts","../../../src/framework/theme/components/calendar/base-calendar.component.ts","../../../src/framework/theme/components/calendar/base-calendar.component.html","../../../src/framework/theme/components/calendar/calendar.component.ts","../../../src/framework/theme/components/button/button.module.ts","../../../src/framework/theme/components/calendar-kit/services/native-date.service.ts","../../../src/framework/theme/components/calendar-kit/services/calendar-time-model.service.ts","../../../src/framework/theme/components/calendar-kit/components/calendar-actions/calendar-actions.component.ts","../../../src/framework/theme/components/calendar-kit/calendar-kit.module.ts","../../../src/framework/theme/components/calendar/base-calendar.module.ts","../../../src/framework/theme/components/calendar/calendar.module.ts","../../../src/framework/theme/components/calendar/base-calendar-range-cell.ts","../../../src/framework/theme/components/calendar/calendar-range-day-cell.component.ts","../../../src/framework/theme/components/calendar/calendar-range-year-cell.component.ts","../../../src/framework/theme/components/calendar/calendar-range-month-cell.component.ts","../../../src/framework/theme/components/calendar/calendar-range.component.ts","../../../src/framework/theme/components/calendar/calendar-range.module.ts","../../../src/framework/theme/components/timepicker/model.ts","../../../src/framework/theme/components/list/list.component.ts","../../../src/framework/theme/components/timepicker/timepicker-cell.component.ts","../../../src/framework/theme/components/timepicker/timepicker.component.ts","../../../src/framework/theme/components/timepicker/timepicker.component.html","../../../src/framework/theme/components/datepicker/calendar-with-time.component.ts","../../../src/framework/theme/components/datepicker/datepicker-container.component.ts","../../../src/framework/theme/components/datepicker/datepicker.directive.ts","../../../src/framework/theme/components/datepicker/datepicker.component.ts","../../../src/framework/theme/components/datepicker/date-timepicker.component.ts","../../../src/framework/theme/components/menu/url-matching-helpers.ts","../../../src/framework/theme/components/layout/restore-scroll-top.service.ts","../../../src/framework/theme/components/layout/layout.component.ts","../../../src/framework/theme/components/layout/layout-direction.directive.ts","../../../src/framework/theme/components/layout/layout.module.ts","../../../src/framework/theme/components/menu/menu.service.ts","../../../src/framework/theme/components/badge/badge.component.ts","../../../src/framework/theme/components/menu/menu.component.ts","../../../src/framework/theme/components/menu/menu-item.component.html","../../../src/framework/theme/components/badge/badge.module.ts","../../../src/framework/theme/components/menu/menu.module.ts","../../../src/framework/theme/components/route-tabset/merge-configs.pipe.ts","../../../src/framework/theme/components/route-tabset/route-tabset.component.ts","../../../src/framework/theme/components/route-tabset/route-tabset.module.ts","../../../src/framework/theme/components/sidebar/sidebar.service.ts","../../../src/framework/theme/components/sidebar/sidebar.component.ts","../../../src/framework/theme/components/sidebar/sidebar.module.ts","../../../src/framework/theme/components/tabset/tab-content.directive.ts","../../../src/framework/theme/components/tabset/tab-title.directive.ts","../../../src/framework/theme/components/tabset/tabset.component.ts","../../../src/framework/theme/components/tabset/tabset.module.ts","../../../src/framework/theme/components/user/user.component.ts","../../../src/framework/theme/components/user/user.component.html","../../../src/framework/theme/components/user/user.module.ts","../../../src/framework/theme/components/actions/actions.component.ts","../../../src/framework/theme/components/actions/actions.module.ts","../../../src/framework/theme/components/search/search.service.ts","../../../src/framework/theme/components/search/search.component.ts","../../../src/framework/theme/components/search/search.module.ts","../../../src/framework/theme/components/checkbox/checkbox.component.ts","../../../src/framework/theme/components/checkbox/checkbox.module.ts","../../../src/framework/theme/components/cdk/overlay/dynamic/dynamic-overlay.ts","../../../src/framework/theme/components/cdk/overlay/dynamic/dynamic-overlay-handler.ts","../../../src/framework/theme/components/popover/popover.component.ts","../../../src/framework/theme/components/popover/popover.directive.ts","../../../src/framework/theme/components/popover/popover.module.ts","../../../src/framework/theme/components/context-menu/context-menu.component.ts","../../../src/framework/theme/components/context-menu/context-menu.directive.ts","../../../src/framework/theme/components/context-menu/context-menu.module.ts","../../../src/framework/theme/components/progress-bar/progress-bar.component.ts","../../../src/framework/theme/components/progress-bar/progress-bar.module.ts","../../../src/framework/theme/components/alert/alert.component.ts","../../../src/framework/theme/components/alert/alert.module.ts","../../../src/framework/theme/components/form-field/form-field-control.ts","../../../src/framework/theme/components/input/input.directive.ts","../../../src/framework/theme/components/chat/chat-form.component.ts","../../../src/framework/theme/components/chat/chat-custom-message.service.ts","../../../src/framework/theme/components/chat/chat-message-text.component.ts","../../../src/framework/theme/components/chat/chat-message-file.component.ts","../../../src/framework/theme/components/chat/chat-message-quote.component.ts","../../../src/framework/theme/components/chat/chat.options.ts","../../../src/framework/theme/components/chat/chat-message-map.component.ts","../../../src/framework/theme/components/chat/chat-avatar.component.ts","../../../src/framework/theme/components/chat/chat-message.component.ts","../../../src/framework/theme/components/chat/chat-title.directive.ts","../../../src/framework/theme/components/chat/chat.component.ts","../../../src/framework/theme/components/input/input.module.ts","../../../src/framework/theme/components/chat/chat-custom-message.directive.ts","../../../src/framework/theme/components/chat/chat.module.ts","../../../src/framework/theme/components/spinner/spinner.component.ts","../../../src/framework/theme/components/spinner/spinner.directive.ts","../../../src/framework/theme/components/spinner/spinner.module.ts","../../../src/framework/theme/components/stepper/stepper-tokens.ts","../../../src/framework/theme/components/stepper/step.component.ts","../../../src/framework/theme/components/stepper/stepper.component.ts","../../../src/framework/theme/components/stepper/stepper.component.html","../../../src/framework/theme/components/stepper/stepper-button.directive.ts","../../../src/framework/theme/components/stepper/stepper.module.ts","../../../src/framework/theme/components/accordion/accordion.component.ts","../../../src/framework/theme/components/accordion/accordion-item.component.ts","../../../src/framework/theme/components/accordion/accordion-item-body.component.ts","../../../src/framework/theme/components/accordion/accordion-item-header.component.ts","../../../src/framework/theme/components/accordion/accordion.module.ts","../../../src/framework/theme/components/button-group/button-group-injection-tokens.ts","../../../src/framework/theme/components/button-group/button-toggle.directive.ts","../../../src/framework/theme/components/button-group/button-group.component.ts","../../../src/framework/theme/components/button-group/button-group.module.ts","../../../src/framework/theme/components/list/list-page-tracker.directive.ts","../../../src/framework/theme/components/list/infinite-list.directive.ts","../../../src/framework/theme/components/list/list.module.ts","../../../src/framework/theme/components/cdk/bidi/bidi-service.ts","../../../src/framework/theme/components/cdk/bidi/bidi.module.ts","../../../src/framework/theme/components/cdk/table/cell.ts","../../../src/framework/theme/components/cdk/table/data-source.ts","../../../src/framework/theme/components/cdk/table/row.ts","../../../src/framework/theme/components/cdk/table/type-mappings.ts","../../../src/framework/theme/components/cdk/table/table.module.ts","../../../src/framework/theme/components/dialog/dialog-config.ts","../../../src/framework/theme/components/dialog/dialog-ref.ts","../../../src/framework/theme/components/dialog/dialog-container.ts","../../../src/framework/theme/components/dialog/dialog.service.ts","../../../src/framework/theme/components/dialog/dialog.module.ts","../../../src/framework/theme/components/toastr/toast.component.ts","../../../src/framework/theme/components/toastr/toast.component.html","../../../src/framework/theme/components/toastr/toastr-container.component.ts","../../../src/framework/theme/components/toastr/toastr-config.ts","../../../src/framework/theme/components/toastr/toastr.service.ts","../../../src/framework/theme/components/toastr/toastr.module.ts","../../../src/framework/theme/components/toastr/model.ts","../../../src/framework/theme/components/tooltip/tooltip.component.ts","../../../src/framework/theme/components/tooltip/tooltip.directive.ts","../../../src/framework/theme/components/tooltip/tooltip.module.ts","../../../src/framework/theme/components/select/select-injection-tokens.ts","../../../src/framework/theme/components/option/option.component.ts","../../../src/framework/theme/components/option/option-list.component.ts","../../../src/framework/theme/components/select/select.component.ts","../../../src/framework/theme/components/select/select.component.html","../../../src/framework/theme/components/option/option-group.component.ts","../../../src/framework/theme/components/option/option-list.module.ts","../../../src/framework/theme/components/select/select.module.ts","../../../src/framework/theme/components/form-field/prefix.directive.ts","../../../src/framework/theme/components/form-field/suffix.directive.ts","../../../src/framework/theme/components/form-field/form-field.component.ts","../../../src/framework/theme/components/form-field/form-field.component.html","../../../src/framework/theme/components/select-with-autocomplete/select-with-autocomplete.component.ts","../../../src/framework/theme/components/select-with-autocomplete/select-with-autocomplete.component.html","../../../src/framework/theme/components/form-field/form-field.module.ts","../../../src/framework/theme/components/select-with-autocomplete/select-with-autocomplete.module.ts","../../../src/framework/theme/components/autocomplete/autocomplete.component.ts","../../../src/framework/theme/components/autocomplete/autocomplete.component.html","../../../src/framework/theme/components/autocomplete/autocomplete.directive.ts","../../../src/framework/theme/components/autocomplete/autocomplete.module.ts","../../../src/framework/theme/components/window/window.options.ts","../../../src/framework/theme/components/window/window-ref.ts","../../../src/framework/theme/components/window/windows-container.component.ts","../../../src/framework/theme/components/window/window.component.ts","../../../src/framework/theme/components/window/window.service.ts","../../../src/framework/theme/components/window/window.module.ts","../../../src/framework/theme/components/timepicker/timepicker.directive.ts","../../../src/framework/theme/components/timepicker/timepicker.module.ts","../../../src/framework/theme/components/datepicker/datepicker-adapter.ts","../../../src/framework/theme/components/datepicker/datepicker.module.ts","../../../src/framework/theme/components/radio/radio.component.ts","../../../src/framework/theme/components/radio/radio-group.component.ts","../../../src/framework/theme/components/radio/radio.module.ts","../../../src/framework/theme/components/tag/tag.component.ts","../../../src/framework/theme/components/tag/tag.component.html","../../../src/framework/theme/components/tag/tag-input.directive.ts","../../../src/framework/theme/components/tag/tag-list.component.ts","../../../src/framework/theme/components/tag/tag.module.ts","../../../src/framework/theme/components/tree-grid/data-source/tree-grid.model.ts","../../../src/framework/theme/components/tree-grid/data-source/tree-grid-filter.service.ts","../../../src/framework/theme/components/tree-grid/tree-grid-sort.component.ts","../../../src/framework/theme/components/tree-grid/data-source/tree-grid-sort.service.ts","../../../src/framework/theme/components/tree-grid/data-source/tree-grid.service.ts","../../../src/framework/theme/components/tree-grid/data-source/tree-grid-data.service.ts","../../../src/framework/theme/components/tree-grid/data-source/tree-grid-data-source.ts","../../../src/framework/theme/components/tree-grid/tree-grid-injection-tokens.ts","../../../src/framework/theme/components/tree-grid/tree-grid-columns.service.ts","../../../src/framework/theme/components/tree-grid/tree-grid.component.ts","../../../src/framework/theme/components/tree-grid/tree-grid-def.component.ts","../../../src/framework/theme/components/tree-grid/tree-grid-row.component.ts","../../../src/framework/theme/components/tree-grid/tree-grid-column-def.directive.ts","../../../src/framework/theme/components/tree-grid/tree-grid-cell.component.ts","../../../src/framework/theme/components/tree-grid/tree-grid-filter.ts","../../../src/framework/theme/components/tree-grid/tree-grid-row-toggle.directive.ts","../../../src/framework/theme/components/tree-grid/tree-grid-row-toggle.component.ts","../../../src/framework/theme/components/tree-grid/tree-grid.module.ts","../../../src/framework/theme/components/toggle/toggle.component.ts","../../../src/framework/theme/components/toggle/toggle.module.ts","../../../src/framework/theme/public_api.ts","../../../src/framework/theme/nebular-theme.ts"],"sourcesContent":["/**\n * @license\n * Copyright Akveo. All Rights Reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n */\n\nimport { InjectionToken } from '@angular/core';\nimport { NbMediaBreakpoint } from './services/breakpoints.service';\nimport { NbJSThemeOptions } from './services/js-themes/theme.options';\n\nexport interface NbThemeOptions {\n name: string;\n}\n\nexport const NB_THEME_OPTIONS = new InjectionToken<NbThemeOptions>('Nebular Theme Options');\nexport const NB_MEDIA_BREAKPOINTS = new InjectionToken<NbMediaBreakpoint[]>('Nebular Media Breakpoints');\nexport const NB_BUILT_IN_JS_THEMES = new InjectionToken<NbJSThemeOptions[]>('Nebular Built-in JS Themes');\nexport const NB_JS_THEMES = new InjectionToken<NbJSThemeOptions[]>('Nebular JS Themes');\n\n/**\n * We're providing browser apis with tokens to improve testing capabilities.\n * */\nexport const NB_WINDOW = new InjectionToken<Window>('Window');\nexport const NB_DOCUMENT = new InjectionToken<Document>('Document');\n","/**\n * @license\n * Copyright Akveo. All Rights Reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n */\n\nimport { Inject, Injectable } from '@angular/core';\nimport { NB_MEDIA_BREAKPOINTS } from '../theme.options';\n\n/**\n * Media breakpoint type\n *\n * Where `name` - breakpoint name alias (e.g. xs, sm, md, etc), and width - min breakpoint width\n */\nexport interface NbMediaBreakpoint {\n name: string;\n width: number;\n}\n\nexport const DEFAULT_MEDIA_BREAKPOINTS = [\n {\n name: 'xs',\n width: 0,\n },\n {\n name: 'is',\n width: 400,\n },\n {\n name: 'sm',\n width: 576,\n },\n {\n name: 'md',\n width: 768,\n },\n {\n name: 'lg',\n width: 992,\n },\n {\n name: 'xl',\n width: 1200,\n },\n {\n name: 'xxl',\n width: 1400,\n },\n {\n name: 'xxxl',\n width: 1600,\n },\n];\n\n/**\n * Manages media breakpoints\n *\n * Provides access to available media breakpoints to convert window width to a configured breakpoint,\n * e.g. 200px - *xs* breakpoint\n */\n@Injectable()\nexport class NbMediaBreakpointsService {\n\n private breakpointsMap: { [breakpoint: string]: number };\n\n constructor(@Inject(NB_MEDIA_BREAKPOINTS) private breakpoints) {\n this.breakpointsMap = this.breakpoints.reduce((res, b: NbMediaBreakpoint) => {\n res[b.name] = b.width;\n return res;\n }, {});\n }\n\n /**\n * Returns a configured breakpoint by width\n * @param width number\n * @returns {Z|{name: string, width: number}}\n */\n getByWidth(width: number): NbMediaBreakpoint {\n const unknown = { name: 'unknown', width: width };\n const breakpoints = this.getBreakpoints();\n\n return breakpoints\n .find((point: NbMediaBreakpoint, index: number) => {\n const next = breakpoints[index + 1];\n return width >= point.width && (!next || width < next.width);\n }) || unknown;\n }\n\n /**\n * Returns a configured breakpoint by name\n * @param name string\n * @returns NbMediaBreakpoint\n */\n getByName(name: string): NbMediaBreakpoint {\n const unknown = { name: 'unknown', width: NaN };\n const breakpoints = this.getBreakpoints();\n\n return breakpoints.find((point: NbMediaBreakpoint) => name === point.name) || unknown;\n }\n\n /**\n * Returns a list of configured breakpoints for the theme\n * @returns NbMediaBreakpoint[]\n */\n getBreakpoints(): NbMediaBreakpoint[] {\n return this.breakpoints;\n }\n\n /**\n * Returns a map of configured breakpoints for the theme\n * @returns {[p: string]: number}\n */\n getBreakpointsMap(): { [breakpoint: string]: number } {\n return this.breakpointsMap;\n }\n}\n","import { NbJSThemeOptions } from './theme.options';\n\nconst palette = {\n primary: '#3366ff',\n success: '#00d68f',\n info: '#0095ff',\n warning: '#ffaa00',\n danger: '#ff3d71',\n};\n\nexport const DEFAULT_THEME: NbJSThemeOptions = {\n name: 'default',\n variables: {\n fontMain: 'Open Sans, sans-serif',\n fontSecondary: 'Raleway, sans-serif',\n\n bg: '#ffffff',\n bg2: '#f7f9fc',\n bg3: '#edf1f7',\n bg4: '#e4e9f2',\n\n border: '#ffffff',\n border2: '#f7f9fc',\n border3: '#edf1f7',\n border4: '#e4e9f2',\n border5: '#c5cee0',\n\n fg: '#8f9bb3',\n fgHeading: '#1a2138',\n fgText: '#1a2138',\n fgHighlight: palette.primary,\n layoutBg: '#f7f9fc',\n separator: '#edf1f7',\n\n primary: palette.primary,\n success: palette.success,\n info: palette.info,\n warning: palette.warning,\n danger: palette.danger,\n\n primaryLight: '#598bff',\n successLight: '#2ce69b',\n infoLight: '#42aaff',\n warningLight: '#ffc94d',\n dangerLight: '#ff708d',\n },\n};\n","import { NbJSThemeOptions } from './theme.options';\n\nconst palette = {\n primary: '#a16eff',\n success: '#00d68f',\n info: '#0095ff',\n warning: '#ffaa00',\n danger: '#ff3d71',\n};\n\nexport const COSMIC_THEME: NbJSThemeOptions = {\n name: 'cosmic',\n variables: {\n fontMain: 'Open Sans, sans-serif',\n fontSecondary: 'Raleway, sans-serif',\n\n bg: '#323259',\n bg2: '#252547',\n bg3: '#1b1b38',\n bg4: '#13132b',\n\n border: '#323259',\n border2: '#252547',\n border3: '#1b1b38',\n border4: '#13132b',\n border5: '#13132b',\n\n fg: '#b4b4db',\n fgHeading: '#ffffff',\n fgText: '#ffffff',\n fgHighlight: palette.primary,\n layoutBg: '#151a30',\n separator: '#151a30',\n\n primary: palette.primary,\n success: palette.success,\n info: palette.info,\n warning: palette.warning,\n danger: palette.danger,\n\n primaryLight: '#b18aff',\n successLight: '#2ce69b',\n infoLight: '#42aaff',\n warningLight: '#ffc94d',\n dangerLight: '#ff708d',\n },\n};\n","import { NbJSThemeOptions } from './theme.options';\n\nconst palette = {\n primary: '#73a1ff',\n success: '#5dcfe3',\n info: '#ba7fec',\n warning: '#ffa36b',\n danger: '#ff6b83',\n};\n\nexport const CORPORATE_THEME: NbJSThemeOptions = {\n name: 'corporate',\n base: 'default',\n variables: {\n fontMain: 'Open Sans, sans-serif',\n fontSecondary: 'Raleway, sans-serif',\n\n bg: '#ffffff',\n bg2: '#f7f9fc',\n bg3: '#edf1f7',\n bg4: '#e4e9f2',\n\n border: '#ffffff',\n border2: '#f7f9fc',\n border3: '#edf1f7',\n border4: '#e4e9f2',\n border5: '#c5cee0',\n\n fg: '#8f9bb3',\n fgHeading: '#1a2138',\n fgText: '#1a2138',\n fgHighlight: palette.primary,\n layoutBg: '#f7f9fc',\n separator: '#edf1f7',\n\n primary: palette.primary,\n success: palette.success,\n info: palette.info,\n warning: palette.warning,\n danger: palette.danger,\n\n primaryLight: '#598bff',\n successLight: '#2ce69b',\n infoLight: '#42aaff',\n warningLight: '#ffc94d',\n dangerLight: '#ff708d',\n },\n};\n","import { NbJSThemeOptions } from './theme.options';\n\nconst palette = {\n primary: '#3366ff',\n success: '#00d68f',\n info: '#0095ff',\n warning: '#ffaa00',\n danger: '#ff3d71',\n};\n\nexport const DARK_THEME: NbJSThemeOptions = {\n name: 'dark',\n variables: {\n fontMain: 'Open Sans, sans-serif',\n fontSecondary: 'Raleway, sans-serif',\n\n bg: '#222b45',\n bg2: '#1a2138',\n bg3: '#151a30',\n bg4: '#101426',\n\n border: '#222b45',\n border2: '#1a2138',\n border3: '#151a30',\n border4: '#101426',\n border5: '#101426',\n\n fg: '#8f9bb3',\n fgHeading: '#ffffff',\n fgText: '#ffffff',\n fgHighlight: palette.primary,\n layoutBg: '#1b1b38',\n separator: '#1b1b38',\n\n primary: palette.primary,\n success: palette.success,\n info: palette.info,\n warning: palette.warning,\n danger: palette.danger,\n\n primaryLight: '#598bff',\n successLight: '#2ce69b',\n infoLight: '#42aaff',\n warningLight: '#ffc94d',\n dangerLight: '#ff708d',\n },\n};\n","/**\n * @license\n * Copyright Akveo. All Rights Reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n */\n\nimport { Inject, Injectable } from '@angular/core';\n\n\nimport { NbJSThemeOptions } from './js-themes/theme.options';\nimport { DEFAULT_THEME } from './js-themes/default.theme';\nimport { COSMIC_THEME } from './js-themes/cosmic.theme';\nimport { CORPORATE_THEME } from './js-themes/corporate.theme';\nimport { DARK_THEME } from './js-themes/dark.theme';\nimport { NB_BUILT_IN_JS_THEMES, NB_JS_THEMES } from '../theme.options';\n\nexport const BUILT_IN_THEMES: NbJSThemeOptions[] = [\n DEFAULT_THEME,\n COSMIC_THEME,\n CORPORATE_THEME,\n DARK_THEME,\n];\n\n/**\n * Js Themes registry - provides access to the JS themes' variables.\n * Usually shouldn't be used directly, but through the NbThemeService class methods (getJsTheme).\n */\n@Injectable()\nexport class NbJSThemesRegistry {\n\n private themes: any = {};\n\n constructor(@Inject(NB_BUILT_IN_JS_THEMES) builtInThemes: NbJSThemeOptions[],\n @Inject(NB_JS_THEMES) newThemes: NbJSThemeOptions[] = []) {\n\n const themes = this.combineByNames(newThemes, builtInThemes);\n\n themes.forEach((theme: any) => {\n this.register(theme, theme.name, theme.base);\n });\n }\n\n /**\n * Registers a new JS theme\n * @param config any\n * @param themeName string\n * @param baseTheme string\n */\n register(config: any, themeName: string, baseTheme: string) {\n const base = this.has(baseTheme) ? this.get(baseTheme) : {};\n this.themes[themeName] = this.mergeDeep({}, base, config);\n }\n\n /**\n * Checks whether the theme is registered\n * @param themeName\n * @returns boolean\n */\n has(themeName: string): boolean {\n return !!this.themes[themeName];\n }\n\n /**\n * Return a theme\n * @param themeName\n * @returns NbJSThemeOptions\n */\n get(themeName: string): NbJSThemeOptions {\n if (!this.themes[themeName]) {\n throw Error(`NbThemeConfig: no theme '${themeName}' found registered.`);\n }\n return JSON.parse(JSON.stringify(this.themes[themeName]));\n }\n\n private combineByNames(newThemes: NbJSThemeOptions[], oldThemes: NbJSThemeOptions[]): NbJSThemeOptions[] {\n if (newThemes) {\n const mergedThemes: NbJSThemeOptions[] = [];\n newThemes.forEach((theme: NbJSThemeOptions) => {\n const sameOld: NbJSThemeOptions = oldThemes.find((tm: NbJSThemeOptions) => tm.name === theme.name)\n || <NbJSThemeOptions>{};\n\n const mergedTheme = this.mergeDeep({}, sameOld, theme);\n mergedThemes.push(mergedTheme);\n });\n\n oldThemes.forEach((theme: NbJSThemeOptions) => {\n if (!mergedThemes.find((tm: NbJSThemeOptions) => tm.name === theme.name)) {\n mergedThemes.push(theme);\n }\n });\n return mergedThemes;\n }\n return oldThemes;\n }\n\n\n private isObject(item) {\n return item && typeof item === 'object' && !Array.isArray(item);\n }\n\n // TODO: move to helpers\n private mergeDeep(target, ...sources) {\n if (!sources.length) {\n return target;\n }\n const source = sources.shift();\n\n if (this.isObject(target) && this.isObject(source)) {\n for (const key in source) {\n if (this.isObject(source[key])) {\n if (!target[key]) {\n Object.assign(target, { [key]: {} });\n }\n this.mergeDeep(target[key], source[key]);\n } else {\n Object.assign(target, { [key]: source[key] });\n }\n }\n }\n return this.mergeDeep(target, ...sources);\n }\n}\n","/**\n * @license\n * Copyright Akveo. All Rights Reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n */\n\nimport { Inject, Injectable } from '@angular/core';\n\nimport { Observable, ReplaySubject, Subject } from 'rxjs';\nimport { map, filter, pairwise, distinctUntilChanged, startWith, share } from 'rxjs/operators';\n\nimport { NB_THEME_OPTIONS } from '../theme.options';\nimport { NbJSThemeOptions } from './js-themes/theme.options';\nimport { NbJSThemesRegistry } from './js-themes-registry.service';\nimport { NbMediaBreakpointsService, NbMediaBreakpoint } from './breakpoints.service';\n\n/**\n * Main Nebular service. Includes various helper methods.\n */\n@Injectable()\nexport class NbThemeService {\n\n // TODO: behavioral subject here?\n currentTheme: string;\n private themeChanges$ = new ReplaySubject(1);\n private appendLayoutClass$ = new Subject();\n private removeLayoutClass$ = new Subject();\n private changeWindowWidth$ = new ReplaySubject<number>(2);\n\n constructor(@Inject(NB_THEME_OPTIONS) protected options: any,\n private breakpointService: NbMediaBreakpointsService,\n private jsThemesRegistry: NbJSThemesRegistry) {\n if (options && options.name) {\n this.changeTheme(options.name);\n }\n }\n\n /**\n * Change current application theme\n * @param {string} name\n */\n changeTheme(name: string): void {\n this.themeChanges$.next({ name, previous: this.currentTheme });\n this.currentTheme = name;\n }\n\n changeWindowWidth(width: number): void {\n this.changeWindowWidth$.next(width);\n }\n\n /**\n * Returns a theme object with variables (color/paddings/etc) on a theme change.\n * Once subscribed - returns current theme.\n *\n * @returns {Observable<NbJSThemeOptions>}\n */\n getJsTheme(): Observable<NbJSThemeOptions> {\n return this.onThemeChange().pipe(\n map((theme: any) => {\n return this.jsThemesRegistry.get(theme.name);\n }),\n );\n }\n\n /**\n * Triggers media query breakpoint change\n * Returns a pair where the first item is previous media breakpoint and the second item is current breakpoit.\n * ```ts\n * [{ name: 'xs', width: 0 }, { name: 'md', width: 768 }] // change from `xs` to `md`\n * ```\n * @returns {Observable<[NbMediaBreakpoint, NbMediaBreakpoint]>}\n */\n onMediaQueryChange(): Observable<NbMediaBreakpoint[]> {\n return this.changeWindowWidth$\n .pipe(\n startWith(undefined),\n pairwise(),\n map(([prevWidth, width]: [number, number]) => {\n return [\n this.breakpointService.getByWidth(prevWidth),\n this.breakpointService.getByWidth(width),\n ] as [NbMediaBreakpoint, NbMediaBreakpoint];\n }),\n filter(([prevPoint, point]: [NbMediaBreakpoint, NbMediaBreakpoint]) => {\n return prevPoint.name !== point.name;\n }),\n distinctUntilChanged(null, params => params[0].name + params[1].name),\n share(),\n );\n }\n\n /**\n * Triggered when current theme is changed\n * @returns {Observable<any>}\n */\n onThemeChange(): Observable<any> {\n return this.themeChanges$.pipe(share());\n }\n\n /**\n * Append a class to nb-layout\n * @param {string} className\n */\n appendLayoutClass(className: string) {\n this.appendLayoutClass$.next(className);\n }\n\n /**\n * Triggered when a new class is added to nb-layout through `appendLayoutClass` method\n * @returns {Observable<any>}\n */\n onAppendLayoutClass(): Observable<any> {\n return this.appendLayoutClass$.pipe(share());\n }\n\n /**\n * Removes a class from nb-layout\n * @param {string} className\n */\n removeLayoutClass(className: string) {\n this.removeLayoutClass$.next(className);\n }\n\n /**\n * Triggered when a class is removed from nb-layout through `removeLayoutClass` method\n * @returns {Observable<any>}\n */\n onRemoveLayoutClass(): Observable<any> {\n return this.removeLayoutClass$.pipe(share());\n }\n}\n","/**\n * @license\n * Copyright Akveo. All Rights Reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n */\nimport { Injectable, Inject } from '@angular/core';\nimport { NB_DOCUMENT } from '../theme.options';\n\n/**\n * Service to control the global page spinner.\n */\n@Injectable()\nexport class NbSpinnerService {\n\n private loaders: Promise<any>[] = [];\n private selector: string = 'nb-global-spinner';\n\n constructor(@Inject(NB_DOCUMENT) private document) {}\n\n /**\n * Appends new loader to the list of loader to be completed before\n * spinner will be hidden\n * @param method Promise<any>\n */\n registerLoader(method: Promise<any>): void {\n this.loaders.push(method);\n }\n\n /**\n * Clears the list of loader\n */\n clear(): void {\n this.loaders = [];\n }\n\n /**\n * Start the loader process, show spinnder and execute loaders\n */\n load(): void {\n this.showSpinner();\n this.executeAll();\n }\n\n private executeAll(done = (values) => {}): void {\n Promise.all(this.loaders).then((values) => {\n this.hideSpinner();\n done.call(null, values);\n })\n .catch((error) => {\n // TODO: Promise.reject\n console.error(error);\n });\n }\n\n // TODO is there any better way of doing this?\n private showSpinner(): void {\n const el = this.getSpinnerElement();\n if (el) {\n el.style['display'] = 'block';\n }\n }\n\n private hideSpinner(): void {\n const el = this.getSpinnerElement();\n if (el) {\n el.style['display'] = 'none';\n }\n }\n\n private getSpinnerElement() {\n return this.document.getElementById(this.selector);\n }\n}\n","import { InjectionToken, Optional, Inject, Injectable } from '@angular/core';\nimport { Observable, ReplaySubject } from 'rxjs';\nimport { share } from 'rxjs/operators';\n\n/**\n * Layout direction.\n * */\nexport enum NbLayoutDirection {\n LTR = 'ltr',\n RTL = 'rtl',\n}\n\n/**\n * Layout direction setting injection token.\n * */\nexport const NB_LAYOUT_DIRECTION = new InjectionToken<NbLayoutDirection>('Layout direction');\n\n/**\n * Layout Direction Service.\n * Allows to set or get layout direction and listen to its changes\n */\n@Injectable()\nexport class NbLayoutDirectionService {\n private $directionChange = new ReplaySubject<NbLayoutDirection>(1);\n\n constructor(\n @Optional() @Inject(NB_LAYOUT_DIRECTION) private direction = NbLayoutDirection.LTR,\n ) {\n this.setDirection(direction);\n }\n\n /**\n * Returns true if layout direction set to left to right.\n * @returns boolean.\n * */\n public isLtr(): boolean {\n return this.direction === NbLayoutDirection.LTR;\n }\n\n /**\n * Returns true if layout direction set to right to left.\n * @returns boolean.\n * */\n public isRtl(): boolean {\n return this.direction === NbLayoutDirection.RTL;\n }\n\n /**\n * Returns current layout direction.\n * @returns NbLayoutDirection.\n * */\n getDirection(): NbLayoutDirection {\n return this.direction;\n }\n\n /**\n * Sets layout direction\n * @param {NbLayoutDirection} direction\n */\n setDirection(direction: NbLayoutDirection) {\n this.direction = direction;\n this.$directionChange.next(direction);\n }\n\n /**\n * Triggered when direction was changed.\n * @returns Observable<NbLayoutDirection>.\n */\n onDirectionChange(): Observable<NbLayoutDirection> {\n return this.$directionChange.pipe(share<NbLayoutDirection>());\n }\n}\n","import { Injectable } from '@angular/core';\nimport { Observable, Subject, Subscriber } from 'rxjs';\nimport { share } from 'rxjs/operators';\n\n/**\n * Scroll position type\n */\nexport interface NbScrollPosition {\n\n /**\n * x - left\n * @type {number}\n */\n x: number;\n\n /**\n * y - top\n * @type {number}\n */\n y: number;\n}\n\n/**\n * Layout scroll service. Provides information about current scroll position,\n * as well as methods to update position of the scroll.\n *\n * The reason we added this service is that in Nebular there are two scroll modes:\n * - the default mode when scroll is on body\n * - and the `withScroll` mode, when scroll is removed from the body and moved to an element inside of the\n * `nb-layout` component\n */\n@Injectable()\nexport class NbLayoutScrollService {\n\n private scrollPositionReq$ = new Subject<any>();\n private manualScroll$ = new Subject<NbScrollPosition>();\n private scroll$ = new Subject<any>();\n private scrollable$ = new Subject<boolean>();\n\n /**\n * Returns scroll position\n *\n * @returns {Observable<NbScrollPosition>}\n */\n getPosition(): Observable<NbScrollPosition> {\n return new Observable((observer: Subscriber<NbScrollPosition>) => {\n const listener = new Subject<NbScrollPosition>();\n listener.subscribe(observer);\n this.scrollPositionReq$.next({ listener });\n\n return () => listener.complete();\n });\n }\n\n /**\n * Sets scroll position\n *\n * @param {number} x\n * @param {number} y\n */\n scrollTo(x: number = null, y: number = null) {\n this.manualScroll$.next({ x, y });\n }\n\n /**\n * Returns a stream of scroll events\n *\n * @returns {Observable<any>}\n */\n onScroll() {\n return this.scroll$.pipe(share<any>());\n }\n\n /**\n * @private\n * @returns Observable<NbScrollPosition>.\n */\n onManualScroll(): Observable<NbScrollPosition> {\n return this.manualScroll$.pipe(share<NbScrollPosition>());\n }\n\n /**\n * @private\n * @returns {Subject<any>}\n */\n onGetPosition(): Subject<any> {\n return this.scrollPositionReq$;\n }\n\n onScrollableChange(): Observable<boolean> {\n return this.scrollable$.pipe(share());\n }\n\n /**\n * @private\n * @param {any} event\n */\n fireScrollChange(event: any) {\n this.scroll$.next(event);\n }\n\n scrollable(scrollable: boolean) {\n this.scrollable$.next(scrollable);\n }\n}\n","import { Injectable } from '@angular/core';\nimport { Observable, Subject, Subscriber } from 'rxjs';\n\n/**\n * Layout dimensions type\n */\nexport interface NbLayoutDimensions {\n\n /**\n * clientWidth\n * @type {number}\n */\n clientWidth: number;\n\n /**\n * clientHeight\n * @type {number}\n */\n clientHeight: number;\n\n /**\n * scrollWidth\n * @type {number}\n */\n scrollWidth: number;\n\n /**\n * scrollHeight\n * @type {number}\n */\n scrollHeight: number;\n}\n\n/**\n * Simple helper service to return Layout dimensions\n * Depending of current Layout scroll mode (default or `withScroll` when scroll is moved to an element\n * inside of the layout) corresponding dimensions will be returns - of `documentElement` in first case and\n * `.scrollable-container` in the second.\n */\n@Injectable()\nexport class NbLayoutRulerService {\n\n private contentDimensionsReq$ = new Subject();\n\n /**\n * Content dimensions\n * @returns {Observable<NbLayoutDimensions>}\n */\n getDimensions(): Observable<NbLayoutDimensions> {\n return new Observable((observer: Subscriber<NbLayoutDimensions>) => {\n const listener = new Subject<NbLayoutDimensions>();\n listener.subscribe(observer);\n this.contentDimensionsReq$.next({ listener });\n\n return () => listener.complete();\n });\n }\n\n /**\n * @private\n * @returns {Subject<any>}\n */\n onGetDimensions(): Subject<any> {\n return this.contentDimensionsReq$;\n }\n}\n","/**\n * @license\n * Copyright Akveo. All Rights Reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n */\n\nimport { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\nimport { RouterModule } from '@angular/router';\n\n@NgModule({\n exports: [\n CommonModule,\n // TODO: probably we don't need FormsModule in SharedModule\n FormsModule,\n RouterModule,\n ],\n})\nexport class NbSharedModule { }\n","import { Inject, Injectable, NgZone } from '@angular/core';\nimport { FocusTrap, FocusTrapFactory, InteractivityChecker } from '@angular/cdk/a11y';\n\nimport { NB_DOCUMENT } from '../../../theme.options';\n\n\n/**\n * Overrides angular cdk focus trap to keep restore functionality inside trap.\n * */\nexport class NbFocusTrap extends FocusTrap {\n protected previouslyFocusedElement: HTMLElement;\n\n constructor(\n protected element: HTMLElement,\n protected checker: InteractivityChecker,\n protected ngZone: NgZone,\n protected document: Document,\n deferAnchors) {\n super(element, checker, ngZone, document, deferAnchors);\n this.savePreviouslyFocusedElement();\n }\n\n restoreFocus() {\n this.previouslyFocusedElement.focus();\n this.destroy();\n }\n\n blurPreviouslyFocusedElement() {\n this.previouslyFocusedElement.blur();\n }\n\n protected savePreviouslyFocusedElement() {\n this.previouslyFocusedElement = this.document.activeElement as HTMLElement;\n }\n}\n\n@Injectable()\nexport class NbFocusTrapFactoryService extends FocusTrapFactory {\n constructor(\n protected checker: InteractivityChecker,\n protected ngZone: NgZone,\n @Inject(NB_DOCUMENT) private document) {\n super(checker, ngZone, document);\n }\n\n create(element: HTMLElement, deferCaptureElements?: boolean): NbFocusTrap {\n return new NbFocusTrap(element, this.checker, this.ngZone, this.document, deferCaptureElements);\n }\n}\n","import { QueryList } from '@angular/core';\nimport { FocusableOption, FocusKeyManager } from '@angular/cdk/a11y';\n\nexport type NbFocusableOption = FocusableOption;\nexport class NbFocusKeyManager<T> extends FocusKeyManager<T> {}\n\nexport class NbFocusKeyManagerFactoryService<T extends NbFocusableOption> {\n create(items: QueryList<T> | T[]): NbFocusKeyManager<T> {\n return new NbFocusKeyManager<T>(items);\n }\n}\n","import { ActiveDescendantKeyManager, Highlightable } from '@angular/cdk/a11y';\nimport { QueryList } from '@angular/core';\n\nexport type NbHighlightableOption = Highlightable;\nexport class NbActiveDescendantKeyManager<T> extends ActiveDescendantKeyManager<T> {}\n\nexport class NbActiveDescendantKeyManagerFactoryService<T extends NbHighlightableOption> {\n create(items: QueryList<T> | T[]): NbActiveDescendantKeyManager<T> {\n return new NbActiveDescendantKeyManager<T>(items);\n }\n}\n\nexport enum NbKeyManagerActiveItemMode {\n RESET_ACTIVE = -1,\n FIRST_ACTIVE = 0,\n}\n","import { ModuleWithProviders, NgModule, Injectable } from '@angular/core';\n\nimport { NbFocusTrapFactoryService } from './focus-trap';\nimport { NbFocusKeyManagerFactoryService } from './focus-key-manager';\nimport { NbActiveDescendantKeyManagerFactoryService } from './descendant-key-manager';\nimport { FocusMonitor } from '@angular/cdk/a11y';\n\n@Injectable()\nexport class NbFocusMonitor extends FocusMonitor {}\n\n@NgModule({})\nexport class NbA11yModule {\n static forRoot(): ModuleWithProviders<NbA11yModule> {\n return {\n ngModule: NbA11yModule,\n providers: [\n NbFocusTrapFactoryService,\n NbFocusKeyManagerFactoryService,\n NbActiveDescendantKeyManagerFactoryService,\n { provide: NbFocusMonitor, useClass: FocusMonitor },\n ],\n };\n }\n}\n","import { Directive, Injectable, ModuleWithProviders, NgModule, TemplateRef, ViewContainerRef } from '@angular/core';\nimport {\n CdkPortal,\n CdkPortalOutlet,\n ComponentPortal,\n Portal,\n PortalInjector,\n PortalModule,\n TemplatePortal,\n} from '@angular/cdk/portal';\nimport {\n ComponentType,\n ConnectedOverlayPositionChange,\n ConnectedPosition,\n ConnectionPositionPair,\n FlexibleConnectedPositionStrategy,\n Overlay,\n OverlayConfig,\n OverlayContainer,\n OverlayModule,\n OverlayPositionBuilder,\n OverlayRef,\n PositionStrategy,\n ScrollStrategy,\n} from '@angular/cdk/overlay';\nimport { NbScrollStrategyOptions } from '../adapter/block-scroll-strategy-adapter';\n\n@Directive({\n selector: '[nbPortal]',\n standalone: false\n})\nexport class NbPortalDirective extends CdkPortal {}\n\n@Directive({\n selector: '[nbPortalOutlet]',\n standalone: false\n})\nexport class NbPortalOutletDirective extends CdkPortalOutlet {}\n\nexport class NbComponentPortal<T = any> extends ComponentPortal<T> {}\n\n@Injectable()\nexport class NbOverlay extends Overlay {\n scrollStrategies: NbScrollStrategyOptions;\n}\n\n@Injectable()\nexport class NbOverlayPositionBuilder extends OverlayPositionBuilder {}\n\nexport class NbTemplatePortal<T = any> extends TemplatePortal<T> {\n constructor(template: TemplateRef<T>, viewContainerRef?: ViewContainerRef, context?: T) {\n super(template, viewContainerRef, context);\n }\n}\n\n@Injectable()\nexport class NbOverlayContainer extends OverlayContainer {}\n\nexport class NbFlexibleConnectedPositionStrategy extends FlexibleConnectedPositionStrategy {}\n\nexport class NbPortalInjector extends PortalInjector {}\n\nexport type NbPortal<T = any> = Portal<T>;\nexport type NbOverlayRef = OverlayRef;\nexport type NbComponentType<T = any> = ComponentType<T>;\nexport type NbPositionStrategy = PositionStrategy;\nexport type NbConnectedPosition = ConnectedPosition;\nexport type NbConnectedOverlayPositionChange = ConnectedOverlayPositionChange;\nexport type NbConnectionPositionPair = ConnectionPositionPair;\nexport type NbOverlayConfig = OverlayConfig;\nexport type NbScrollStrategy = ScrollStrategy;\n\nconst CDK_MODULES = [OverlayModule, PortalModule];\n\n/**\n * This module helps us to keep all angular/cdk deps inside our cdk module via providing aliases.\n * Approach will help us move cdk in separate npm package and refactor nebular/theme code.\n * */\n@NgModule({\n imports: [...CDK_MODULES],\n exports: [...CDK_MODULES, NbPortalDirective, NbPortalOutletDirective],\n declarations: [NbPortalDirective, NbPortalOutletDirective],\n})\nexport class NbCdkMappingModule {\n static forRoot(): ModuleWithProviders<NbCdkMappingModule> {\n return {\n ngModule: NbCdkMappingModule,\n providers: [NbOverlay, NbOverlayPositionBuilder],\n };\n }\n}\n","import { Injectable } from '@angular/core';\n\nimport { NbLayoutDirectionService } from '../../../services/direction.service';\n\nexport enum NbGlobalLogicalPosition {\n TOP_START = 'top-start',\n TOP_END = 'top-end',\n BOTTOM_START = 'bottom-start',\n BOTTOM_END = 'bottom-end',\n}\n\nexport enum NbGlobalPhysicalPosition {\n TOP_RIGHT = 'top-right',\n TOP_LEFT = 'top-left',\n BOTTOM_RIGHT = 'bottom-right',\n BOTTOM_LEFT = 'bottom-left',\n}\n\nexport type NbGlobalPosition = NbGlobalPhysicalPosition | NbGlobalLogicalPosition;\n\n@Injectable()\nexport class NbPositionHelper {\n constructor(protected layoutDirection: NbLayoutDirectionService) {}\n\n toLogicalPosition(position: NbGlobalPosition): NbGlobalLogicalPosition {\n if (Object.values(NbGlobalLogicalPosition).includes(position as NbGlobalLogicalPosition)) {\n return position as NbGlobalLogicalPosition;\n }\n\n if (this.layoutDirection.isLtr()) {\n return this.toLogicalPositionWhenLtr(position as NbGlobalPhysicalPosition);\n } else {\n return this.toLogicalPositionWhenRtl(position as NbGlobalPhysicalPosition);\n }\n }\n\n toPhysicalPosition(position: NbGlobalPosition): NbGlobalPhysicalPosition {\n if (Object