import _toConsumableArray from 'babel-runtime/helpers/toConsumableArray'; import _extends from 'babel-runtime/helpers/extends'; import _typeof from 'babel-runtime/helpers/typeof'; import _setImmediate from 'babel-runtime/core-js/set-immediate'; import _Object$getPrototypeOf from 'babel-runtime/core-js/object/get-prototype-of'; import _classCallCheck from 'babel-runtime/helpers/classCallCheck'; import _createClass from 'babel-runtime/helpers/createClass'; import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn'; import _get from 'babel-runtime/helpers/get'; import _inherits from 'babel-runtime/helpers/inherits'; import _Object$keys from 'babel-runtime/core-js/object/keys'; /* Copyright 2013-2015 ASIAL CORPORATION Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ import onsElements from '../../ons/elements'; import util from '../../ons/util'; import autoStyle from '../../ons/autostyle'; import ModifierUtil from '../../ons/internal/modifier-util'; import AnimatorFactory from '../../ons/internal/animator-factory'; import { PopoverAnimator, IOSFadePopoverAnimator, MDFadePopoverAnimator } from './animator'; import platform from '../../ons/platform'; import iPhoneXPatch from '../../ons/iphonex-patch'; import BaseDialogElement from '../base/base-dialog'; import contentReady from '../../ons/content-ready'; var scheme = { '.popover': 'popover--*', '.popover-mask': 'popover-mask--*', '.popover__content': 'popover--*__content', '.popover__arrow': 'popover--*__arrow' }; var _animatorDict = { 'default': function _default() { return platform.isAndroid() ? MDFadePopoverAnimator : IOSFadePopoverAnimator; }, 'none': PopoverAnimator, 'fade-ios': IOSFadePopoverAnimator, 'fade-md': MDFadePopoverAnimator }; var positions = { up: 'bottom', left: 'right', down: 'top', right: 'left' }; var directions = _Object$keys(positions); /** * @element ons-popover * @category dialog * @description * [en] * A component that displays a popover next to an element. The popover can be used to display extra information about a component or a tooltip. * * To use the element it can either be attached directly to the `` element or dynamically created from a template using the `ons.createPopover(template)` utility function and the `