1 /* tslint:disable:array-type member-access variable-name typedef
2 only-arrow-functions directive-class-suffix component-class-suffix
3 component-selector one-variable-per-declaration
4 no-attribute-parameter-decorator*/
5 import {ConnectionPositionPair} from './index';
7 export const POSITION_MAP: any = {
21 {originX: 'start', originY: 'top', overlayX: 'start', overlayY: 'bottom'},
23 {originX: 'end', originY: 'top', overlayX: 'end', overlayY: 'bottom'},
85 export const DEFAULT_4_POSITIONS = _objectValues([
86 POSITION_MAP['top'], POSITION_MAP['right'], POSITION_MAP['bottom'],
89 export const DEFAULT_DROPDOWN_POSITIONS =
90 _objectValues([POSITION_MAP['bottomLeft'], POSITION_MAP['topLeft']]);
91 export const DEFAULT_DATEPICKER_POSITIONS = [
104 ] as ConnectionPositionPair[];
106 function arrayMap(array: any, iteratee: any) {
108 const length = array === null ? 0 : array.length, result = Array(length);
110 while (++index < length) {
111 result[index] = iteratee(array[index], index, array);
116 function baseValues(object: any, props: any) {
117 return arrayMap(props, function(key: any) {
122 function _objectValues(object: any) {
123 return object === null ? [] : baseValues(object, Object.keys(object));