diff --git a/bower.json b/bower.json index 565a079..4683e67 100644 --- a/bower.json +++ b/bower.json @@ -22,6 +22,6 @@ "tests" ], "dependencies": { - "tether": "~0.6.5" + "tether": "~1.4.0" } } diff --git a/jl-tether.js b/jl-tether.js index fcea200..32c4ea5 100644 --- a/jl-tether.js +++ b/jl-tether.js @@ -2,7 +2,7 @@ if(typeof exports === 'object' && typeof module === 'object') module.exports = factory(); else if(typeof define === 'function' && define.amd) - define(factory); + define([], factory); else { var a = factory(); for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i]; @@ -11,58 +11,66 @@ return /******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; -/******/ + /******/ // The require function /******/ function __webpack_require__(moduleId) { -/******/ + /******/ // Check if module is in cache /******/ if(installedModules[moduleId]) /******/ return installedModules[moduleId].exports; -/******/ + /******/ // Create a new module (and put it into the cache) /******/ var module = installedModules[moduleId] = { /******/ exports: {}, /******/ id: moduleId, /******/ loaded: false /******/ }; -/******/ + /******/ // Execute the module function /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); -/******/ + /******/ // Flag the module as loaded /******/ module.loaded = true; -/******/ + /******/ // Return the exports of the module /******/ return module.exports; /******/ } -/******/ -/******/ + + /******/ // expose the modules object (__webpack_modules__) /******/ __webpack_require__.m = modules; -/******/ + /******/ // expose the module cache /******/ __webpack_require__.c = installedModules; -/******/ + /******/ // __webpack_public_path__ /******/ __webpack_require__.p = ""; -/******/ + /******/ // Load entry module and return exports /******/ return __webpack_require__(0); /******/ }) /************************************************************************/ /******/ ([ /* 0 */ -/***/ function(module, exports, __webpack_require__) { +/***/ (function(module, exports, __webpack_require__) { + + __webpack_require__(1); + module.exports = __webpack_require__(1); + + +/***/ }), +/* 1 */ +/***/ (function(module, exports, __webpack_require__) { /* AngularJS wrapper for HubSpots's Tether */ var Tether, jlTetherDire, optionsToEval, prefix, - __hasProp = {}.hasOwnProperty, - __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; }; + hasProp = {}.hasOwnProperty, + indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; }; - Tether = __webpack_require__(1); + Tether = __webpack_require__(2); prefix = 'jlTether'; @@ -75,12 +83,12 @@ return /******/ (function(modules) { // webpackBootstrap var evaledOptions, key, optionKey, strippedKey, tetherHandle, tetherOptions, value; tetherOptions = {}; for (key in attrs) { - if (!__hasProp.call(attrs, key)) continue; + if (!hasProp.call(attrs, key)) continue; value = attrs[key]; if (key !== prefix && (key.indexOf(prefix)) !== -1) { strippedKey = key.replace(prefix, ''); optionKey = strippedKey[0].toLowerCase() + strippedKey.slice(1); - if (__indexOf.call(optionsToEval, optionKey) >= 0) { + if (indexOf.call(optionsToEval, optionKey) >= 0) { tetherOptions[optionKey] = scope.$eval(value); } else { tetherOptions[optionKey] = value; @@ -91,7 +99,7 @@ return /******/ (function(modules) { // webpackBootstrap evaledOptions = (scope.$eval(tetherOptions.options)) || {}; delete tetherOptions.options; for (key in evaledOptions) { - if (!__hasProp.call(evaledOptions, key)) continue; + if (!hasProp.call(evaledOptions, key)) continue; value = evaledOptions[key]; tetherOptions[key] = value; } @@ -111,566 +119,695 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = angular.module('jlTether', []).directive(prefix, jlTetherDire); -/***/ }, -/* 1 */ -/***/ function(module, exports, __webpack_require__) { - - var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! tether 0.6.5 */ +/***/ }), +/* 2 */ +/***/ (function(module, exports, __webpack_require__) { + var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! tether 1.4.0 */ (function(root, factory) { if (true) { - !(__WEBPACK_AMD_DEFINE_FACTORY__ = (factory), (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_RESULT__ = __WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)) : module.exports = __WEBPACK_AMD_DEFINE_FACTORY__)); + !(__WEBPACK_AMD_DEFINE_FACTORY__ = (factory), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); } else if (typeof exports === 'object') { - module.exports = factory(require,exports,module); + module.exports = factory(require, exports, module); } else { root.Tether = factory(); } - }(this, function(require,exports,module) { - - (function() { - var Evented, addClass, defer, deferred, extend, flush, getBounds, getOffsetParent, getOrigin, getScrollBarSize, getScrollParent, hasClass, node, removeClass, uniqueId, updateClasses, zeroPosCache, - __hasProp = {}.hasOwnProperty, - __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; }, - __slice = [].slice; - - if (this.Tether == null) { - this.Tether = { - modules: [] - }; + }(this, function(require, exports, module) { + + 'use strict'; + + var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + + var TetherBase = undefined; + if (typeof TetherBase === 'undefined') { + TetherBase = { modules: [] }; + } + + var zeroElement = null; + + // Same as native getBoundingClientRect, except it takes into account parent offsets + // if the element lies within a nested document ( or