1 | (function webpackUniversalModuleDefinition(root, factory) {
|
2 | if(typeof exports === 'object' && typeof module === 'object')
|
3 | module.exports = factory(require("./foundation.core"), require("./foundation.util.keyboard"), require("./foundation.util.mediaQuery"), require("./foundation.util.motion"), require("./foundation.util.touch"), require("jquery"));
|
4 | else if(typeof define === 'function' && define.amd)
|
5 | define(["./foundation.core", "./foundation.util.keyboard", "./foundation.util.mediaQuery", "./foundation.util.motion", "./foundation.util.touch", "jquery"], factory);
|
6 | else if(typeof exports === 'object')
|
7 | exports["foundation.reveal"] = factory(require("./foundation.core"), require("./foundation.util.keyboard"), require("./foundation.util.mediaQuery"), require("./foundation.util.motion"), require("./foundation.util.touch"), require("jquery"));
|
8 | else
|
9 | root["__FOUNDATION_EXTERNAL__"] = root["__FOUNDATION_EXTERNAL__"] || {}, root["__FOUNDATION_EXTERNAL__"]["foundation.reveal"] = factory(root["__FOUNDATION_EXTERNAL__"]["foundation.core"], root["__FOUNDATION_EXTERNAL__"]["foundation.util.keyboard"], root["__FOUNDATION_EXTERNAL__"]["foundation.util.mediaQuery"], root["__FOUNDATION_EXTERNAL__"]["foundation.util.motion"], root["__FOUNDATION_EXTERNAL__"]["foundation.util.touch"], root["jQuery"]);
|
10 | })(window, function(__WEBPACK_EXTERNAL_MODULE__foundation_core__, __WEBPACK_EXTERNAL_MODULE__foundation_util_keyboard__, __WEBPACK_EXTERNAL_MODULE__foundation_util_mediaQuery__, __WEBPACK_EXTERNAL_MODULE__foundation_util_motion__, __WEBPACK_EXTERNAL_MODULE__foundation_util_touch__, __WEBPACK_EXTERNAL_MODULE_jquery__) {
|
11 | return (function(modules) {
|
12 |
|
13 | var installedModules = {};
|
14 |
|
15 |
|
16 | function __webpack_require__(moduleId) {
|
17 |
|
18 |
|
19 | if(installedModules[moduleId]) {
|
20 | return installedModules[moduleId].exports;
|
21 | }
|
22 |
|
23 | var module = installedModules[moduleId] = {
|
24 | i: moduleId,
|
25 | l: false,
|
26 | exports: {}
|
27 | };
|
28 |
|
29 |
|
30 | modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
31 |
|
32 |
|
33 | module.l = true;
|
34 |
|
35 |
|
36 | return module.exports;
|
37 | }
|
38 |
|
39 |
|
40 |
|
41 | __webpack_require__.m = modules;
|
42 |
|
43 |
|
44 | __webpack_require__.c = installedModules;
|
45 |
|
46 |
|
47 | __webpack_require__.d = function(exports, name, getter) {
|
48 | if(!__webpack_require__.o(exports, name)) {
|
49 | Object.defineProperty(exports, name, { enumerable: true, get: getter });
|
50 | }
|
51 | };
|
52 |
|
53 |
|
54 | __webpack_require__.r = function(exports) {
|
55 | if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
56 | Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
57 | }
|
58 | Object.defineProperty(exports, '__esModule', { value: true });
|
59 | };
|
60 |
|
61 |
|
62 |
|
63 |
|
64 |
|
65 |
|
66 | __webpack_require__.t = function(value, mode) {
|
67 | if(mode & 1) value = __webpack_require__(value);
|
68 | if(mode & 8) return value;
|
69 | if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
|
70 | var ns = Object.create(null);
|
71 | __webpack_require__.r(ns);
|
72 | Object.defineProperty(ns, 'default', { enumerable: true, value: value });
|
73 | if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
|
74 | return ns;
|
75 | };
|
76 |
|
77 |
|
78 | __webpack_require__.n = function(module) {
|
79 | var getter = module && module.__esModule ?
|
80 | function getDefault() { return module['default']; } :
|
81 | function getModuleExports() { return module; };
|
82 | __webpack_require__.d(getter, 'a', getter);
|
83 | return getter;
|
84 | };
|
85 |
|
86 |
|
87 | __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
88 |
|
89 |
|
90 | __webpack_require__.p = "";
|
91 |
|
92 |
|
93 |
|
94 | return __webpack_require__(__webpack_require__.s = 14);
|
95 | })
|
96 |
|
97 | ({
|
98 |
|
99 | "./foundation.core":
|
100 |
|
101 |
|
102 |
|
103 |
|
104 | (function(module, exports) {
|
105 |
|
106 | module.exports = __WEBPACK_EXTERNAL_MODULE__foundation_core__;
|
107 |
|
108 | }),
|
109 |
|
110 | "./foundation.util.keyboard":
|
111 |
|
112 |
|
113 |
|
114 |
|
115 | (function(module, exports) {
|
116 |
|
117 | module.exports = __WEBPACK_EXTERNAL_MODULE__foundation_util_keyboard__;
|
118 |
|
119 | }),
|
120 |
|
121 | "./foundation.util.mediaQuery":
|
122 |
|
123 |
|
124 |
|
125 |
|
126 | (function(module, exports) {
|
127 |
|
128 | module.exports = __WEBPACK_EXTERNAL_MODULE__foundation_util_mediaQuery__;
|
129 |
|
130 | }),
|
131 |
|
132 | "./foundation.util.motion":
|
133 |
|
134 |
|
135 |
|
136 |
|
137 | (function(module, exports) {
|
138 |
|
139 | module.exports = __WEBPACK_EXTERNAL_MODULE__foundation_util_motion__;
|
140 |
|
141 | }),
|
142 |
|
143 | "./foundation.util.touch":
|
144 |
|
145 |
|
146 |
|
147 |
|
148 | (function(module, exports) {
|
149 |
|
150 | module.exports = __WEBPACK_EXTERNAL_MODULE__foundation_util_touch__;
|
151 |
|
152 | }),
|
153 |
|
154 | "./js/entries/plugins/foundation.reveal.js":
|
155 |
|
156 |
|
157 |
|
158 |
|
159 | (function(module, __webpack_exports__, __webpack_require__) {
|
160 |
|
161 | "use strict";
|
162 | __webpack_require__.r(__webpack_exports__);
|
163 | var _foundation_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__( "./foundation.core");
|
164 | var _foundation_core__WEBPACK_IMPORTED_MODULE_0___default = __webpack_require__.n(_foundation_core__WEBPACK_IMPORTED_MODULE_0__);
|
165 | __webpack_require__.d(__webpack_exports__, "Foundation", function() { return _foundation_core__WEBPACK_IMPORTED_MODULE_0__["Foundation"]; });
|
166 |
|
167 | var _foundation_reveal__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__( "./js/foundation.reveal.js");
|
168 | __webpack_require__.d(__webpack_exports__, "Reveal", function() { return _foundation_reveal__WEBPACK_IMPORTED_MODULE_1__["Reveal"]; });
|
169 |
|
170 |
|
171 |
|
172 | _foundation_core__WEBPACK_IMPORTED_MODULE_0__["Foundation"].plugin(_foundation_reveal__WEBPACK_IMPORTED_MODULE_1__["Reveal"], 'Reveal');
|
173 |
|
174 |
|
175 | }),
|
176 |
|
177 | "./js/foundation.reveal.js":
|
178 |
|
179 |
|
180 |
|
181 |
|
182 | (function(module, __webpack_exports__, __webpack_require__) {
|
183 |
|
184 | "use strict";
|
185 | __webpack_require__.r(__webpack_exports__);
|
186 | __webpack_require__.d(__webpack_exports__, "Reveal", function() { return Reveal; });
|
187 | var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__( "jquery");
|
188 | var jquery__WEBPACK_IMPORTED_MODULE_0___default = __webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__);
|
189 | var _foundation_core_plugin__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__( "./foundation.core");
|
190 | var _foundation_core_plugin__WEBPACK_IMPORTED_MODULE_1___default = __webpack_require__.n(_foundation_core_plugin__WEBPACK_IMPORTED_MODULE_1__);
|
191 | var _foundation_util_keyboard__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__( "./foundation.util.keyboard");
|
192 | var _foundation_util_keyboard__WEBPACK_IMPORTED_MODULE_2___default = __webpack_require__.n(_foundation_util_keyboard__WEBPACK_IMPORTED_MODULE_2__);
|
193 | var _foundation_util_mediaQuery__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__( "./foundation.util.mediaQuery");
|
194 | var _foundation_util_mediaQuery__WEBPACK_IMPORTED_MODULE_3___default = __webpack_require__.n(_foundation_util_mediaQuery__WEBPACK_IMPORTED_MODULE_3__);
|
195 | var _foundation_util_motion__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__( "./foundation.util.motion");
|
196 | var _foundation_util_motion__WEBPACK_IMPORTED_MODULE_4___default = __webpack_require__.n(_foundation_util_motion__WEBPACK_IMPORTED_MODULE_4__);
|
197 | var _foundation_util_triggers__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__( "./js/foundation.util.triggers.js");
|
198 | var _foundation_util_touch__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__( "./foundation.util.touch");
|
199 | var _foundation_util_touch__WEBPACK_IMPORTED_MODULE_6___default = __webpack_require__.n(_foundation_util_touch__WEBPACK_IMPORTED_MODULE_6__);
|
200 |
|
201 |
|
202 | function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
203 |
|
204 | function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
205 |
|
206 | 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); } }
|
207 |
|
208 | function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
209 |
|
210 | function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
211 |
|
212 | function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
213 |
|
214 | function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
215 |
|
216 | function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
217 |
|
218 | function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
219 |
|
220 |
|
221 |
|
222 |
|
223 |
|
224 |
|
225 |
|
226 |
|
227 |
|
228 |
|
229 |
|
230 |
|
231 |
|
232 |
|
233 |
|
234 |
|
235 |
|
236 |
|
237 |
|
238 | var Reveal =
|
239 |
|
240 | function (_Plugin) {
|
241 | _inherits(Reveal, _Plugin);
|
242 |
|
243 | function Reveal() {
|
244 | _classCallCheck(this, Reveal);
|
245 |
|
246 | return _possibleConstructorReturn(this, _getPrototypeOf(Reveal).apply(this, arguments));
|
247 | }
|
248 |
|
249 | _createClass(Reveal, [{
|
250 | key: "_setup",
|
251 |
|
252 | |
253 |
|
254 |
|
255 |
|
256 |
|
257 |
|
258 |
|
259 | value: function _setup(element, options) {
|
260 | this.$element = element;
|
261 | this.options = jquery__WEBPACK_IMPORTED_MODULE_0___default.a.extend({}, Reveal.defaults, this.$element.data(), options);
|
262 | this.className = 'Reveal';
|
263 |
|
264 | this._init();
|
265 |
|
266 |
|
267 | _foundation_util_touch__WEBPACK_IMPORTED_MODULE_6__["Touch"].init(jquery__WEBPACK_IMPORTED_MODULE_0___default.a);
|
268 | _foundation_util_triggers__WEBPACK_IMPORTED_MODULE_5__["Triggers"].init(jquery__WEBPACK_IMPORTED_MODULE_0___default.a);
|
269 | _foundation_util_keyboard__WEBPACK_IMPORTED_MODULE_2__["Keyboard"].register('Reveal', {
|
270 | 'ESCAPE': 'close'
|
271 | });
|
272 | }
|
273 | |
274 |
|
275 |
|
276 |
|
277 |
|
278 | }, {
|
279 | key: "_init",
|
280 | value: function _init() {
|
281 | var _this2 = this;
|
282 |
|
283 | _foundation_util_mediaQuery__WEBPACK_IMPORTED_MODULE_3__["MediaQuery"]._init();
|
284 |
|
285 | this.id = this.$element.attr('id');
|
286 | this.isActive = false;
|
287 | this.cached = {
|
288 | mq: _foundation_util_mediaQuery__WEBPACK_IMPORTED_MODULE_3__["MediaQuery"].current
|
289 | };
|
290 | this.$anchor = jquery__WEBPACK_IMPORTED_MODULE_0___default()("[data-open=\"".concat(this.id, "\"]")).length ? jquery__WEBPACK_IMPORTED_MODULE_0___default()("[data-open=\"".concat(this.id, "\"]")) : jquery__WEBPACK_IMPORTED_MODULE_0___default()("[data-toggle=\"".concat(this.id, "\"]"));
|
291 | this.$anchor.attr({
|
292 | 'aria-controls': this.id,
|
293 | 'aria-haspopup': true,
|
294 | 'tabindex': 0
|
295 | });
|
296 |
|
297 | if (this.options.fullScreen || this.$element.hasClass('full')) {
|
298 | this.options.fullScreen = true;
|
299 | this.options.overlay = false;
|
300 | }
|
301 |
|
302 | if (this.options.overlay && !this.$overlay) {
|
303 | this.$overlay = this._makeOverlay(this.id);
|
304 | }
|
305 |
|
306 | this.$element.attr({
|
307 | 'role': 'dialog',
|
308 | 'aria-hidden': true,
|
309 | 'data-yeti-box': this.id,
|
310 | 'data-resize': this.id
|
311 | });
|
312 |
|
313 | if (this.$overlay) {
|
314 | this.$element.detach().appendTo(this.$overlay);
|
315 | } else {
|
316 | this.$element.detach().appendTo(jquery__WEBPACK_IMPORTED_MODULE_0___default()(this.options.appendTo));
|
317 | this.$element.addClass('without-overlay');
|
318 | }
|
319 |
|
320 | this._events();
|
321 |
|
322 | if (this.options.deepLink && window.location.hash === "#".concat(this.id)) {
|
323 | this.onLoadListener = Object(_foundation_core_plugin__WEBPACK_IMPORTED_MODULE_1__["onLoad"])(jquery__WEBPACK_IMPORTED_MODULE_0___default()(window), function () {
|
324 | return _this2.open();
|
325 | });
|
326 | }
|
327 | }
|
328 | |
329 |
|
330 |
|
331 |
|
332 |
|
333 | }, {
|
334 | key: "_makeOverlay",
|
335 | value: function _makeOverlay() {
|
336 | var additionalOverlayClasses = '';
|
337 |
|
338 | if (this.options.additionalOverlayClasses) {
|
339 | additionalOverlayClasses = ' ' + this.options.additionalOverlayClasses;
|
340 | }
|
341 |
|
342 | return jquery__WEBPACK_IMPORTED_MODULE_0___default()('<div></div>').addClass('reveal-overlay' + additionalOverlayClasses).appendTo(this.options.appendTo);
|
343 | }
|
344 | |
345 |
|
346 |
|
347 |
|
348 |
|
349 |
|
350 | }, {
|
351 | key: "_updatePosition",
|
352 | value: function _updatePosition() {
|
353 | var width = this.$element.outerWidth();
|
354 | var outerWidth = jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).width();
|
355 | var height = this.$element.outerHeight();
|
356 | var outerHeight = jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).height();
|
357 | var left,
|
358 | top = null;
|
359 |
|
360 | if (this.options.hOffset === 'auto') {
|
361 | left = parseInt((outerWidth - width) / 2, 10);
|
362 | } else {
|
363 | left = parseInt(this.options.hOffset, 10);
|
364 | }
|
365 |
|
366 | if (this.options.vOffset === 'auto') {
|
367 | if (height > outerHeight) {
|
368 | top = parseInt(Math.min(100, outerHeight / 10), 10);
|
369 | } else {
|
370 | top = parseInt((outerHeight - height) / 4, 10);
|
371 | }
|
372 | } else if (this.options.vOffset !== null) {
|
373 | top = parseInt(this.options.vOffset, 10);
|
374 | }
|
375 |
|
376 | if (top !== null) {
|
377 | this.$element.css({
|
378 | top: top + 'px'
|
379 | });
|
380 | }
|
381 |
|
382 |
|
383 |
|
384 | if (!this.$overlay || this.options.hOffset !== 'auto') {
|
385 | this.$element.css({
|
386 | left: left + 'px'
|
387 | });
|
388 | this.$element.css({
|
389 | margin: '0px'
|
390 | });
|
391 | }
|
392 | }
|
393 | |
394 |
|
395 |
|
396 |
|
397 |
|
398 | }, {
|
399 | key: "_events",
|
400 | value: function _events() {
|
401 | var _this3 = this;
|
402 |
|
403 | var _this = this;
|
404 |
|
405 | this.$element.on({
|
406 | 'open.zf.trigger': this.open.bind(this),
|
407 | 'close.zf.trigger': function closeZfTrigger(event, $element) {
|
408 | if (event.target === _this.$element[0] || jquery__WEBPACK_IMPORTED_MODULE_0___default()(event.target).parents('[data-closable]')[0] === $element) {
|
409 |
|
410 | return _this3.close.apply(_this3);
|
411 | }
|
412 | },
|
413 | 'toggle.zf.trigger': this.toggle.bind(this),
|
414 | 'resizeme.zf.trigger': function resizemeZfTrigger() {
|
415 | _this._updatePosition();
|
416 | }
|
417 | });
|
418 |
|
419 | if (this.options.closeOnClick && this.options.overlay) {
|
420 | this.$overlay.off('.zf.reveal').on('click.zf.dropdown tap.zf.dropdown', function (e) {
|
421 | if (e.target === _this.$element[0] || jquery__WEBPACK_IMPORTED_MODULE_0___default.a.contains(_this.$element[0], e.target) || !jquery__WEBPACK_IMPORTED_MODULE_0___default.a.contains(document, e.target)) {
|
422 | return;
|
423 | }
|
424 |
|
425 | _this.close();
|
426 | });
|
427 | }
|
428 |
|
429 | if (this.options.deepLink) {
|
430 | jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).on("hashchange.zf.reveal:".concat(this.id), this._handleState.bind(this));
|
431 | }
|
432 | }
|
433 | |
434 |
|
435 |
|
436 |
|
437 |
|
438 | }, {
|
439 | key: "_handleState",
|
440 | value: function _handleState(e) {
|
441 | if (window.location.hash === '#' + this.id && !this.isActive) {
|
442 | this.open();
|
443 | } else {
|
444 | this.close();
|
445 | }
|
446 | }
|
447 | |
448 |
|
449 |
|
450 |
|
451 |
|
452 | }, {
|
453 | key: "_disableScroll",
|
454 | value: function _disableScroll(scrollTop) {
|
455 | scrollTop = scrollTop || jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).scrollTop();
|
456 |
|
457 | if (jquery__WEBPACK_IMPORTED_MODULE_0___default()(document).height() > jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).height()) {
|
458 | jquery__WEBPACK_IMPORTED_MODULE_0___default()("html").css("top", -scrollTop);
|
459 | }
|
460 | }
|
461 | |
462 |
|
463 |
|
464 |
|
465 |
|
466 | }, {
|
467 | key: "_enableScroll",
|
468 | value: function _enableScroll(scrollTop) {
|
469 | scrollTop = scrollTop || parseInt(jquery__WEBPACK_IMPORTED_MODULE_0___default()("html").css("top"));
|
470 |
|
471 | if (jquery__WEBPACK_IMPORTED_MODULE_0___default()(document).height() > jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).height()) {
|
472 | jquery__WEBPACK_IMPORTED_MODULE_0___default()("html").css("top", "");
|
473 | jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).scrollTop(-scrollTop);
|
474 | }
|
475 | }
|
476 | |
477 |
|
478 |
|
479 |
|
480 |
|
481 |
|
482 |
|
483 | }, {
|
484 | key: "open",
|
485 | value: function open() {
|
486 | var _this4 = this;
|
487 |
|
488 |
|
489 | var hash = "#".concat(this.id);
|
490 |
|
491 | if (this.options.deepLink && window.location.hash !== hash) {
|
492 | if (window.history.pushState) {
|
493 | if (this.options.updateHistory) {
|
494 | window.history.pushState({}, '', hash);
|
495 | } else {
|
496 | window.history.replaceState({}, '', hash);
|
497 | }
|
498 | } else {
|
499 | window.location.hash = hash;
|
500 | }
|
501 | }
|
502 |
|
503 |
|
504 | this.$activeAnchor = jquery__WEBPACK_IMPORTED_MODULE_0___default()(document.activeElement).is(this.$anchor) ? jquery__WEBPACK_IMPORTED_MODULE_0___default()(document.activeElement) : this.$anchor;
|
505 | this.isActive = true;
|
506 |
|
507 | this.$element.css({
|
508 | 'visibility': 'hidden'
|
509 | }).show().scrollTop(0);
|
510 |
|
511 | if (this.options.overlay) {
|
512 | this.$overlay.css({
|
513 | 'visibility': 'hidden'
|
514 | }).show();
|
515 | }
|
516 |
|
517 | this._updatePosition();
|
518 |
|
519 | this.$element.hide().css({
|
520 | 'visibility': ''
|
521 | });
|
522 |
|
523 | if (this.$overlay) {
|
524 | this.$overlay.css({
|
525 | 'visibility': ''
|
526 | }).hide();
|
527 |
|
528 | if (this.$element.hasClass('fast')) {
|
529 | this.$overlay.addClass('fast');
|
530 | } else if (this.$element.hasClass('slow')) {
|
531 | this.$overlay.addClass('slow');
|
532 | }
|
533 | }
|
534 |
|
535 | if (!this.options.multipleOpened) {
|
536 | |
537 |
|
538 |
|
539 |
|
540 |
|
541 | this.$element.trigger('closeme.zf.reveal', this.id);
|
542 | }
|
543 |
|
544 | if (jquery__WEBPACK_IMPORTED_MODULE_0___default()('.reveal:visible').length === 0) {
|
545 | this._disableScroll();
|
546 | }
|
547 |
|
548 | var _this = this;
|
549 |
|
550 |
|
551 | if (this.options.animationIn) {
|
552 | var afterAnimation = function afterAnimation() {
|
553 | _this.$element.attr({
|
554 | 'aria-hidden': false,
|
555 | 'tabindex': -1
|
556 | }).focus();
|
557 |
|
558 | _this._addGlobalClasses();
|
559 |
|
560 | _foundation_util_keyboard__WEBPACK_IMPORTED_MODULE_2__["Keyboard"].trapFocus(_this.$element);
|
561 | };
|
562 |
|
563 | if (this.options.overlay) {
|
564 | _foundation_util_motion__WEBPACK_IMPORTED_MODULE_4__["Motion"].animateIn(this.$overlay, 'fade-in');
|
565 | }
|
566 |
|
567 | _foundation_util_motion__WEBPACK_IMPORTED_MODULE_4__["Motion"].animateIn(this.$element, this.options.animationIn, function () {
|
568 | if (_this4.$element) {
|
569 |
|
570 | _this4.focusableElements = _foundation_util_keyboard__WEBPACK_IMPORTED_MODULE_2__["Keyboard"].findFocusable(_this4.$element);
|
571 | afterAnimation();
|
572 | }
|
573 | });
|
574 | }
|
575 | else {
|
576 | if (this.options.overlay) {
|
577 | this.$overlay.show(0);
|
578 | }
|
579 |
|
580 | this.$element.show(this.options.showDelay);
|
581 | }
|
582 |
|
583 |
|
584 | this.$element.attr({
|
585 | 'aria-hidden': false,
|
586 | 'tabindex': -1
|
587 | }).focus();
|
588 | _foundation_util_keyboard__WEBPACK_IMPORTED_MODULE_2__["Keyboard"].trapFocus(this.$element);
|
589 |
|
590 | this._addGlobalClasses();
|
591 |
|
592 | this._addGlobalListeners();
|
593 | |
594 |
|
595 |
|
596 |
|
597 |
|
598 |
|
599 | this.$element.trigger('open.zf.reveal');
|
600 | }
|
601 | |
602 |
|
603 |
|
604 |
|
605 |
|
606 |
|
607 |
|
608 |
|
609 |
|
610 |
|
611 |
|
612 |
|
613 | }, {
|
614 | key: "_addGlobalClasses",
|
615 | value: function _addGlobalClasses() {
|
616 | var updateScrollbarClass = function updateScrollbarClass() {
|
617 | jquery__WEBPACK_IMPORTED_MODULE_0___default()('html').toggleClass('zf-has-scroll', !!(jquery__WEBPACK_IMPORTED_MODULE_0___default()(document).height() > jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).height()));
|
618 | };
|
619 |
|
620 | this.$element.on('resizeme.zf.trigger.revealScrollbarListener', function () {
|
621 | return updateScrollbarClass();
|
622 | });
|
623 | updateScrollbarClass();
|
624 | jquery__WEBPACK_IMPORTED_MODULE_0___default()('html').addClass('is-reveal-open');
|
625 | }
|
626 | |
627 |
|
628 |
|
629 |
|
630 |
|
631 | }, {
|
632 | key: "_removeGlobalClasses",
|
633 | value: function _removeGlobalClasses() {
|
634 | this.$element.off('resizeme.zf.trigger.revealScrollbarListener');
|
635 | jquery__WEBPACK_IMPORTED_MODULE_0___default()('html').removeClass('is-reveal-open');
|
636 | jquery__WEBPACK_IMPORTED_MODULE_0___default()('html').removeClass('zf-has-scroll');
|
637 | }
|
638 | |
639 |
|
640 |
|
641 |
|
642 |
|
643 | }, {
|
644 | key: "_addGlobalListeners",
|
645 | value: function _addGlobalListeners() {
|
646 | var _this = this;
|
647 |
|
648 | if (!this.$element) {
|
649 | return;
|
650 | }
|
651 |
|
652 |
|
653 | this.focusableElements = _foundation_util_keyboard__WEBPACK_IMPORTED_MODULE_2__["Keyboard"].findFocusable(this.$element);
|
654 |
|
655 | if (!this.options.overlay && this.options.closeOnClick && !this.options.fullScreen) {
|
656 | jquery__WEBPACK_IMPORTED_MODULE_0___default()('body').on('click.zf.dropdown tap.zf.dropdown', function (e) {
|
657 | if (e.target === _this.$element[0] || jquery__WEBPACK_IMPORTED_MODULE_0___default.a.contains(_this.$element[0], e.target) || !jquery__WEBPACK_IMPORTED_MODULE_0___default.a.contains(document, e.target)) {
|
658 | return;
|
659 | }
|
660 |
|
661 | _this.close();
|
662 | });
|
663 | }
|
664 |
|
665 | if (this.options.closeOnEsc) {
|
666 | jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).on('keydown.zf.reveal', function (e) {
|
667 | _foundation_util_keyboard__WEBPACK_IMPORTED_MODULE_2__["Keyboard"].handleKey(e, 'Reveal', {
|
668 | close: function close() {
|
669 | if (_this.options.closeOnEsc) {
|
670 | _this.close();
|
671 | }
|
672 | }
|
673 | });
|
674 | });
|
675 | }
|
676 | }
|
677 | |
678 |
|
679 |
|
680 |
|
681 |
|
682 |
|
683 | }, {
|
684 | key: "close",
|
685 | value: function close() {
|
686 | if (!this.isActive || !this.$element.is(':visible')) {
|
687 | return false;
|
688 | }
|
689 |
|
690 | var _this = this;
|
691 |
|
692 |
|
693 | if (this.options.animationOut) {
|
694 | if (this.options.overlay) {
|
695 | _foundation_util_motion__WEBPACK_IMPORTED_MODULE_4__["Motion"].animateOut(this.$overlay, 'fade-out');
|
696 | }
|
697 |
|
698 | _foundation_util_motion__WEBPACK_IMPORTED_MODULE_4__["Motion"].animateOut(this.$element, this.options.animationOut, finishUp);
|
699 | }
|
700 | else {
|
701 | this.$element.hide(this.options.hideDelay);
|
702 |
|
703 | if (this.options.overlay) {
|
704 | this.$overlay.hide(0, finishUp);
|
705 | } else {
|
706 | finishUp();
|
707 | }
|
708 | }
|
709 |
|
710 |
|
711 | if (this.options.closeOnEsc) {
|
712 | jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).off('keydown.zf.reveal');
|
713 | }
|
714 |
|
715 | if (!this.options.overlay && this.options.closeOnClick) {
|
716 | jquery__WEBPACK_IMPORTED_MODULE_0___default()('body').off('click.zf.dropdown tap.zf.dropdown');
|
717 | }
|
718 |
|
719 | this.$element.off('keydown.zf.reveal');
|
720 |
|
721 | function finishUp() {
|
722 |
|
723 |
|
724 |
|
725 | var scrollTop = parseInt(jquery__WEBPACK_IMPORTED_MODULE_0___default()("html").css("top"));
|
726 |
|
727 | if (jquery__WEBPACK_IMPORTED_MODULE_0___default()('.reveal:visible').length === 0) {
|
728 | _this._removeGlobalClasses();
|
729 |
|
730 | }
|
731 |
|
732 | _foundation_util_keyboard__WEBPACK_IMPORTED_MODULE_2__["Keyboard"].releaseFocus(_this.$element);
|
733 |
|
734 | _this.$element.attr('aria-hidden', true);
|
735 |
|
736 | if (jquery__WEBPACK_IMPORTED_MODULE_0___default()('.reveal:visible').length === 0) {
|
737 | _this._enableScroll(scrollTop);
|
738 | }
|
739 | |
740 |
|
741 |
|
742 |
|
743 |
|
744 |
|
745 | _this.$element.trigger('closed.zf.reveal');
|
746 | }
|
747 | |
748 |
|
749 |
|
750 |
|
751 |
|
752 |
|
753 | if (this.options.resetOnClose) {
|
754 | this.$element.html(this.$element.html());
|
755 | }
|
756 |
|
757 | this.isActive = false;
|
758 |
|
759 | if (_this.options.deepLink && window.location.hash === "#".concat(this.id)) {
|
760 |
|
761 | if (window.history.replaceState) {
|
762 | var urlWithoutHash = window.location.pathname + window.location.search;
|
763 |
|
764 | if (this.options.updateHistory) {
|
765 | window.history.pushState({}, '', urlWithoutHash);
|
766 | } else {
|
767 | window.history.replaceState('', document.title, urlWithoutHash);
|
768 | }
|
769 | } else {
|
770 | window.location.hash = '';
|
771 | }
|
772 | }
|
773 |
|
774 | this.$activeAnchor.focus();
|
775 | }
|
776 | |
777 |
|
778 |
|
779 |
|
780 |
|
781 | }, {
|
782 | key: "toggle",
|
783 | value: function toggle() {
|
784 | if (this.isActive) {
|
785 | this.close();
|
786 | } else {
|
787 | this.open();
|
788 | }
|
789 | }
|
790 | }, {
|
791 | key: "_destroy",
|
792 |
|
793 | |
794 |
|
795 |
|
796 |
|
797 | value: function _destroy() {
|
798 | if (this.options.overlay) {
|
799 | this.$element.appendTo(jquery__WEBPACK_IMPORTED_MODULE_0___default()(this.options.appendTo));
|
800 |
|
801 | this.$overlay.hide().off().remove();
|
802 | }
|
803 |
|
804 | this.$element.hide().off();
|
805 | this.$anchor.off('.zf');
|
806 | jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).off(".zf.reveal:".concat(this.id));
|
807 | if (this.onLoadListener) jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).off(this.onLoadListener);
|
808 |
|
809 | if (jquery__WEBPACK_IMPORTED_MODULE_0___default()('.reveal:visible').length === 0) {
|
810 | this._removeGlobalClasses();
|
811 |
|
812 | }
|
813 | }
|
814 | }]);
|
815 |
|
816 | return Reveal;
|
817 | }(_foundation_core_plugin__WEBPACK_IMPORTED_MODULE_1__["Plugin"]);
|
818 |
|
819 | Reveal.defaults = {
|
820 | |
821 |
|
822 |
|
823 |
|
824 |
|
825 |
|
826 | animationIn: '',
|
827 |
|
828 | |
829 |
|
830 |
|
831 |
|
832 |
|
833 |
|
834 | animationOut: '',
|
835 |
|
836 | |
837 |
|
838 |
|
839 |
|
840 |
|
841 |
|
842 | showDelay: 0,
|
843 |
|
844 | |
845 |
|
846 |
|
847 |
|
848 |
|
849 |
|
850 | hideDelay: 0,
|
851 |
|
852 | |
853 |
|
854 |
|
855 |
|
856 |
|
857 |
|
858 | closeOnClick: true,
|
859 |
|
860 | |
861 |
|
862 |
|
863 |
|
864 |
|
865 |
|
866 | closeOnEsc: true,
|
867 |
|
868 | |
869 |
|
870 |
|
871 |
|
872 |
|
873 |
|
874 | multipleOpened: false,
|
875 |
|
876 | |
877 |
|
878 |
|
879 |
|
880 |
|
881 |
|
882 | vOffset: 'auto',
|
883 |
|
884 | |
885 |
|
886 |
|
887 |
|
888 |
|
889 |
|
890 | hOffset: 'auto',
|
891 |
|
892 | |
893 |
|
894 |
|
895 |
|
896 |
|
897 |
|
898 | fullScreen: false,
|
899 |
|
900 | |
901 |
|
902 |
|
903 |
|
904 |
|
905 |
|
906 | overlay: true,
|
907 |
|
908 | |
909 |
|
910 |
|
911 |
|
912 |
|
913 |
|
914 | resetOnClose: false,
|
915 |
|
916 | |
917 |
|
918 |
|
919 |
|
920 |
|
921 |
|
922 |
|
923 | deepLink: false,
|
924 |
|
925 | |
926 |
|
927 |
|
928 |
|
929 |
|
930 | updateHistory: false,
|
931 |
|
932 | |
933 |
|
934 |
|
935 |
|
936 |
|
937 |
|
938 | appendTo: "body",
|
939 |
|
940 | |
941 |
|
942 |
|
943 |
|
944 |
|
945 |
|
946 | additionalOverlayClasses: ''
|
947 | };
|
948 |
|
949 |
|
950 | }),
|
951 |
|
952 | "./js/foundation.util.triggers.js":
|
953 |
|
954 |
|
955 |
|
956 |
|
957 | (function(module, __webpack_exports__, __webpack_require__) {
|
958 |
|
959 | "use strict";
|
960 | __webpack_require__.r(__webpack_exports__);
|
961 | __webpack_require__.d(__webpack_exports__, "Triggers", function() { return Triggers; });
|
962 | var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__( "jquery");
|
963 | var jquery__WEBPACK_IMPORTED_MODULE_0___default = __webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__);
|
964 | var _foundation_core_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__( "./foundation.core");
|
965 | var _foundation_core_utils__WEBPACK_IMPORTED_MODULE_1___default = __webpack_require__.n(_foundation_core_utils__WEBPACK_IMPORTED_MODULE_1__);
|
966 | var _foundation_util_motion__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__( "./foundation.util.motion");
|
967 | var _foundation_util_motion__WEBPACK_IMPORTED_MODULE_2___default = __webpack_require__.n(_foundation_util_motion__WEBPACK_IMPORTED_MODULE_2__);
|
968 |
|
969 |
|
970 | function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
971 |
|
972 |
|
973 |
|
974 |
|
975 |
|
976 | var MutationObserver = function () {
|
977 | var prefixes = ['WebKit', 'Moz', 'O', 'Ms', ''];
|
978 |
|
979 | for (var i = 0; i < prefixes.length; i++) {
|
980 | if ("".concat(prefixes[i], "MutationObserver") in window) {
|
981 | return window["".concat(prefixes[i], "MutationObserver")];
|
982 | }
|
983 | }
|
984 |
|
985 | return false;
|
986 | }();
|
987 |
|
988 | var triggers = function triggers(el, type) {
|
989 | el.data(type).split(' ').forEach(function (id) {
|
990 | jquery__WEBPACK_IMPORTED_MODULE_0___default()("#".concat(id))[type === 'close' ? 'trigger' : 'triggerHandler']("".concat(type, ".zf.trigger"), [el]);
|
991 | });
|
992 | };
|
993 |
|
994 | var Triggers = {
|
995 | Listeners: {
|
996 | Basic: {},
|
997 | Global: {}
|
998 | },
|
999 | Initializers: {}
|
1000 | };
|
1001 | Triggers.Listeners.Basic = {
|
1002 | openListener: function openListener() {
|
1003 | triggers(jquery__WEBPACK_IMPORTED_MODULE_0___default()(this), 'open');
|
1004 | },
|
1005 | closeListener: function closeListener() {
|
1006 | var id = jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).data('close');
|
1007 |
|
1008 | if (id) {
|
1009 | triggers(jquery__WEBPACK_IMPORTED_MODULE_0___default()(this), 'close');
|
1010 | } else {
|
1011 | jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).trigger('close.zf.trigger');
|
1012 | }
|
1013 | },
|
1014 | toggleListener: function toggleListener() {
|
1015 | var id = jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).data('toggle');
|
1016 |
|
1017 | if (id) {
|
1018 | triggers(jquery__WEBPACK_IMPORTED_MODULE_0___default()(this), 'toggle');
|
1019 | } else {
|
1020 | jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).trigger('toggle.zf.trigger');
|
1021 | }
|
1022 | },
|
1023 | closeableListener: function closeableListener(e) {
|
1024 | var animation = jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).data('closable');
|
1025 |
|
1026 | e.stopPropagation();
|
1027 |
|
1028 | if (animation !== '') {
|
1029 | _foundation_util_motion__WEBPACK_IMPORTED_MODULE_2__["Motion"].animateOut(jquery__WEBPACK_IMPORTED_MODULE_0___default()(this), animation, function () {
|
1030 | jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).trigger('closed.zf');
|
1031 | });
|
1032 | } else {
|
1033 | jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).fadeOut().trigger('closed.zf');
|
1034 | }
|
1035 | },
|
1036 | toggleFocusListener: function toggleFocusListener() {
|
1037 | var id = jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).data('toggle-focus');
|
1038 | jquery__WEBPACK_IMPORTED_MODULE_0___default()("#".concat(id)).triggerHandler('toggle.zf.trigger', [jquery__WEBPACK_IMPORTED_MODULE_0___default()(this)]);
|
1039 | }
|
1040 | };
|
1041 |
|
1042 | Triggers.Initializers.addOpenListener = function ($elem) {
|
1043 | $elem.off('click.zf.trigger', Triggers.Listeners.Basic.openListener);
|
1044 | $elem.on('click.zf.trigger', '[data-open]', Triggers.Listeners.Basic.openListener);
|
1045 | };
|
1046 |
|
1047 |
|
1048 |
|
1049 | Triggers.Initializers.addCloseListener = function ($elem) {
|
1050 | $elem.off('click.zf.trigger', Triggers.Listeners.Basic.closeListener);
|
1051 | $elem.on('click.zf.trigger', '[data-close]', Triggers.Listeners.Basic.closeListener);
|
1052 | };
|
1053 |
|
1054 |
|
1055 | Triggers.Initializers.addToggleListener = function ($elem) {
|
1056 | $elem.off('click.zf.trigger', Triggers.Listeners.Basic.toggleListener);
|
1057 | $elem.on('click.zf.trigger', '[data-toggle]', Triggers.Listeners.Basic.toggleListener);
|
1058 | };
|
1059 |
|
1060 |
|
1061 | Triggers.Initializers.addCloseableListener = function ($elem) {
|
1062 | $elem.off('close.zf.trigger', Triggers.Listeners.Basic.closeableListener);
|
1063 | $elem.on('close.zf.trigger', '[data-closeable], [data-closable]', Triggers.Listeners.Basic.closeableListener);
|
1064 | };
|
1065 |
|
1066 |
|
1067 | Triggers.Initializers.addToggleFocusListener = function ($elem) {
|
1068 | $elem.off('focus.zf.trigger blur.zf.trigger', Triggers.Listeners.Basic.toggleFocusListener);
|
1069 | $elem.on('focus.zf.trigger blur.zf.trigger', '[data-toggle-focus]', Triggers.Listeners.Basic.toggleFocusListener);
|
1070 | };
|
1071 |
|
1072 |
|
1073 | Triggers.Listeners.Global = {
|
1074 | resizeListener: function resizeListener($nodes) {
|
1075 | if (!MutationObserver) {
|
1076 |
|
1077 | $nodes.each(function () {
|
1078 | jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).triggerHandler('resizeme.zf.trigger');
|
1079 | });
|
1080 | }
|
1081 |
|
1082 |
|
1083 | $nodes.attr('data-events', "resize");
|
1084 | },
|
1085 | scrollListener: function scrollListener($nodes) {
|
1086 | if (!MutationObserver) {
|
1087 |
|
1088 | $nodes.each(function () {
|
1089 | jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).triggerHandler('scrollme.zf.trigger');
|
1090 | });
|
1091 | }
|
1092 |
|
1093 |
|
1094 | $nodes.attr('data-events', "scroll");
|
1095 | },
|
1096 | closeMeListener: function closeMeListener(e, pluginId) {
|
1097 | var plugin = e.namespace.split('.')[0];
|
1098 | var plugins = jquery__WEBPACK_IMPORTED_MODULE_0___default()("[data-".concat(plugin, "]")).not("[data-yeti-box=\"".concat(pluginId, "\"]"));
|
1099 | plugins.each(function () {
|
1100 | var _this = jquery__WEBPACK_IMPORTED_MODULE_0___default()(this);
|
1101 |
|
1102 | _this.triggerHandler('close.zf.trigger', [_this]);
|
1103 | });
|
1104 | }
|
1105 |
|
1106 | };
|
1107 |
|
1108 | Triggers.Initializers.addClosemeListener = function (pluginName) {
|
1109 | var yetiBoxes = jquery__WEBPACK_IMPORTED_MODULE_0___default()('[data-yeti-box]'),
|
1110 | plugNames = ['dropdown', 'tooltip', 'reveal'];
|
1111 |
|
1112 | if (pluginName) {
|
1113 | if (typeof pluginName === 'string') {
|
1114 | plugNames.push(pluginName);
|
1115 | } else if (_typeof(pluginName) === 'object' && typeof pluginName[0] === 'string') {
|
1116 | plugNames = plugNames.concat(pluginName);
|
1117 | } else {
|
1118 | console.error('Plugin names must be strings');
|
1119 | }
|
1120 | }
|
1121 |
|
1122 | if (yetiBoxes.length) {
|
1123 | var listeners = plugNames.map(function (name) {
|
1124 | return "closeme.zf.".concat(name);
|
1125 | }).join(' ');
|
1126 | jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).off(listeners).on(listeners, Triggers.Listeners.Global.closeMeListener);
|
1127 | }
|
1128 | };
|
1129 |
|
1130 | function debounceGlobalListener(debounce, trigger, listener) {
|
1131 | var timer,
|
1132 | args = Array.prototype.slice.call(arguments, 3);
|
1133 | jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).off(trigger).on(trigger, function (e) {
|
1134 | if (timer) {
|
1135 | clearTimeout(timer);
|
1136 | }
|
1137 |
|
1138 | timer = setTimeout(function () {
|
1139 | listener.apply(null, args);
|
1140 | }, debounce || 10);
|
1141 | });
|
1142 | }
|
1143 |
|
1144 | Triggers.Initializers.addResizeListener = function (debounce) {
|
1145 | var $nodes = jquery__WEBPACK_IMPORTED_MODULE_0___default()('[data-resize]');
|
1146 |
|
1147 | if ($nodes.length) {
|
1148 | debounceGlobalListener(debounce, 'resize.zf.trigger', Triggers.Listeners.Global.resizeListener, $nodes);
|
1149 | }
|
1150 | };
|
1151 |
|
1152 | Triggers.Initializers.addScrollListener = function (debounce) {
|
1153 | var $nodes = jquery__WEBPACK_IMPORTED_MODULE_0___default()('[data-scroll]');
|
1154 |
|
1155 | if ($nodes.length) {
|
1156 | debounceGlobalListener(debounce, 'scroll.zf.trigger', Triggers.Listeners.Global.scrollListener, $nodes);
|
1157 | }
|
1158 | };
|
1159 |
|
1160 | Triggers.Initializers.addMutationEventsListener = function ($elem) {
|
1161 | if (!MutationObserver) {
|
1162 | return false;
|
1163 | }
|
1164 |
|
1165 | var $nodes = $elem.find('[data-resize], [data-scroll], [data-mutate]');
|
1166 |
|
1167 | var listeningElementsMutation = function listeningElementsMutation(mutationRecordsList) {
|
1168 | var $target = jquery__WEBPACK_IMPORTED_MODULE_0___default()(mutationRecordsList[0].target);
|
1169 |
|
1170 | switch (mutationRecordsList[0].type) {
|
1171 | case "attributes":
|
1172 | if ($target.attr("data-events") === "scroll" && mutationRecordsList[0].attributeName === "data-events") {
|
1173 | $target.triggerHandler('scrollme.zf.trigger', [$target, window.pageYOffset]);
|
1174 | }
|
1175 |
|
1176 | if ($target.attr("data-events") === "resize" && mutationRecordsList[0].attributeName === "data-events") {
|
1177 | $target.triggerHandler('resizeme.zf.trigger', [$target]);
|
1178 | }
|
1179 |
|
1180 | if (mutationRecordsList[0].attributeName === "style") {
|
1181 | $target.closest("[data-mutate]").attr("data-events", "mutate");
|
1182 | $target.closest("[data-mutate]").triggerHandler('mutateme.zf.trigger', [$target.closest("[data-mutate]")]);
|
1183 | }
|
1184 |
|
1185 | break;
|
1186 |
|
1187 | case "childList":
|
1188 | $target.closest("[data-mutate]").attr("data-events", "mutate");
|
1189 | $target.closest("[data-mutate]").triggerHandler('mutateme.zf.trigger', [$target.closest("[data-mutate]")]);
|
1190 | break;
|
1191 |
|
1192 | default:
|
1193 | return false;
|
1194 |
|
1195 | }
|
1196 | };
|
1197 |
|
1198 | if ($nodes.length) {
|
1199 |
|
1200 | for (var i = 0; i <= $nodes.length - 1; i++) {
|
1201 | var elementObserver = new MutationObserver(listeningElementsMutation);
|
1202 | elementObserver.observe($nodes[i], {
|
1203 | attributes: true,
|
1204 | childList: true,
|
1205 | characterData: false,
|
1206 | subtree: true,
|
1207 | attributeFilter: ["data-events", "style"]
|
1208 | });
|
1209 | }
|
1210 | }
|
1211 | };
|
1212 |
|
1213 | Triggers.Initializers.addSimpleListeners = function () {
|
1214 | var $document = jquery__WEBPACK_IMPORTED_MODULE_0___default()(document);
|
1215 | Triggers.Initializers.addOpenListener($document);
|
1216 | Triggers.Initializers.addCloseListener($document);
|
1217 | Triggers.Initializers.addToggleListener($document);
|
1218 | Triggers.Initializers.addCloseableListener($document);
|
1219 | Triggers.Initializers.addToggleFocusListener($document);
|
1220 | };
|
1221 |
|
1222 | Triggers.Initializers.addGlobalListeners = function () {
|
1223 | var $document = jquery__WEBPACK_IMPORTED_MODULE_0___default()(document);
|
1224 | Triggers.Initializers.addMutationEventsListener($document);
|
1225 | Triggers.Initializers.addResizeListener();
|
1226 | Triggers.Initializers.addScrollListener();
|
1227 | Triggers.Initializers.addClosemeListener();
|
1228 | };
|
1229 |
|
1230 | Triggers.init = function ($, Foundation) {
|
1231 | Object(_foundation_core_utils__WEBPACK_IMPORTED_MODULE_1__["onLoad"])($(window), function () {
|
1232 | if ($.triggersInitialized !== true) {
|
1233 | Triggers.Initializers.addSimpleListeners();
|
1234 | Triggers.Initializers.addGlobalListeners();
|
1235 | $.triggersInitialized = true;
|
1236 | }
|
1237 | });
|
1238 |
|
1239 | if (Foundation) {
|
1240 | Foundation.Triggers = Triggers;
|
1241 |
|
1242 | Foundation.IHearYou = Triggers.Initializers.addGlobalListeners;
|
1243 | }
|
1244 | };
|
1245 |
|
1246 |
|
1247 |
|
1248 | }),
|
1249 |
|
1250 | 14:
|
1251 |
|
1252 |
|
1253 |
|
1254 |
|
1255 | (function(module, exports, __webpack_require__) {
|
1256 |
|
1257 | module.exports = __webpack_require__("./js/entries/plugins/foundation.reveal.js");
|
1258 |
|
1259 |
|
1260 | }),
|
1261 |
|
1262 | "jquery":
|
1263 |
|
1264 |
|
1265 |
|
1266 |
|
1267 | (function(module, exports) {
|
1268 |
|
1269 | module.exports = __WEBPACK_EXTERNAL_MODULE_jquery__;
|
1270 |
|
1271 | })
|
1272 |
|
1273 | });
|
1274 | });
|
1275 |
|
\ | No newline at end of file |