unpoly-rails 2.0.0 → 2.2.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of unpoly-rails might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/.yardopts +1 -1
- data/README.md +472 -50
- data/{dist → assets/unpoly}/unpoly-bootstrap3.css +1 -0
- data/assets/unpoly/unpoly-bootstrap3.js +54 -0
- data/{dist → assets/unpoly}/unpoly-bootstrap3.min.css +1 -0
- data/assets/unpoly/unpoly-bootstrap3.min.js +1 -0
- data/{dist → assets/unpoly}/unpoly-bootstrap4.css +1 -0
- data/assets/unpoly/unpoly-bootstrap4.js +54 -0
- data/{dist → assets/unpoly}/unpoly-bootstrap4.min.css +1 -0
- data/assets/unpoly/unpoly-bootstrap4.min.js +1 -0
- data/{dist → assets/unpoly}/unpoly-bootstrap5.css +1 -0
- data/assets/unpoly/unpoly-bootstrap5.js +56 -0
- data/{dist → assets/unpoly}/unpoly-bootstrap5.min.css +1 -0
- data/assets/unpoly/unpoly-bootstrap5.min.js +1 -0
- data/assets/unpoly/unpoly-migrate.js +1281 -0
- data/assets/unpoly/unpoly-migrate.min.js +1 -0
- data/{dist → assets/unpoly}/unpoly.css +23 -6
- data/assets/unpoly/unpoly.es5.js +23195 -0
- data/assets/unpoly/unpoly.es5.min.js +1 -0
- data/assets/unpoly/unpoly.js +21457 -0
- data/assets/unpoly/unpoly.min.css +10 -0
- data/assets/unpoly/unpoly.min.js +1 -0
- data/lib/unpoly-rails.rb +12 -12
- data/lib/unpoly/rails/controller.rb +1 -1
- data/lib/unpoly/rails/engine.rb +13 -20
- data/lib/unpoly/rails/request_echo_headers.rb +1 -1
- data/lib/unpoly/rails/version.rb +1 -1
- metadata +52 -26
- data/CHANGELOG.md +0 -2345
- data/README_RAILS.md +0 -418
- data/dist/unpoly-bootstrap3.js +0 -16
- data/dist/unpoly-bootstrap3.min.js +0 -1
- data/dist/unpoly-bootstrap4.js +0 -16
- data/dist/unpoly-bootstrap4.min.js +0 -1
- data/dist/unpoly-bootstrap5.js +0 -14
- data/dist/unpoly-bootstrap5.min.js +0 -1
- data/dist/unpoly-migrate.js +0 -1306
- data/dist/unpoly-migrate.min.js +0 -1
- data/dist/unpoly.js +0 -22134
- data/dist/unpoly.min.css +0 -1
- data/dist/unpoly.min.js +0 -6
- data/lib/unpoly/tasks.rb +0 -55
@@ -0,0 +1,54 @@
|
|
1
|
+
/******/ (function() { // webpackBootstrap
|
2
|
+
/******/ var __webpack_modules__ = ([
|
3
|
+
/* 0 */,
|
4
|
+
/* 1 */
|
5
|
+
/***/ (function() {
|
6
|
+
|
7
|
+
// extracted by mini-css-extract-plugin
|
8
|
+
|
9
|
+
/***/ })
|
10
|
+
/******/ ]);
|
11
|
+
/************************************************************************/
|
12
|
+
/******/ // The module cache
|
13
|
+
/******/ var __webpack_module_cache__ = {};
|
14
|
+
/******/
|
15
|
+
/******/ // The require function
|
16
|
+
/******/ function __webpack_require__(moduleId) {
|
17
|
+
/******/ // Check if module is in cache
|
18
|
+
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
19
|
+
/******/ if (cachedModule !== undefined) {
|
20
|
+
/******/ return cachedModule.exports;
|
21
|
+
/******/ }
|
22
|
+
/******/ // Create a new module (and put it into the cache)
|
23
|
+
/******/ var module = __webpack_module_cache__[moduleId] = {
|
24
|
+
/******/ // no module.id needed
|
25
|
+
/******/ // no module.loaded needed
|
26
|
+
/******/ exports: {}
|
27
|
+
/******/ };
|
28
|
+
/******/
|
29
|
+
/******/ // Execute the module function
|
30
|
+
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
31
|
+
/******/
|
32
|
+
/******/ // Return the exports of the module
|
33
|
+
/******/ return module.exports;
|
34
|
+
/******/ }
|
35
|
+
/******/
|
36
|
+
/************************************************************************/
|
37
|
+
/******/ /************************************************************************/
|
38
|
+
var __webpack_exports__ = {};
|
39
|
+
// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
|
40
|
+
!function() {
|
41
|
+
// Bootstrap uses the class `active` to highlight the current section
|
42
|
+
// of a navigation bar.
|
43
|
+
up.feedback.config.currentClasses.push('active');
|
44
|
+
up.feedback.config.navSelectors.push('.nav', '.navbar');
|
45
|
+
up.form.config.validateTargets.unshift('.form-group:has(:origin)');
|
46
|
+
up.viewport.config.fixedTop.push('.navbar-fixed-top');
|
47
|
+
up.viewport.config.fixedBottom.push('.navbar-fixed-bottom');
|
48
|
+
up.viewport.config.anchoredRight.push('.navbar-fixed-top', '.navbar-fixed-bottom');
|
49
|
+
up.fragment.config.badTargetClasses.push('row', /^col(-xs|-sm|-md|-lg)?(-\d+)?$/);
|
50
|
+
__webpack_require__(1);
|
51
|
+
|
52
|
+
}();
|
53
|
+
/******/ })()
|
54
|
+
;
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(){var o={303:function(){}},r={};up.feedback.config.currentClasses.push("active"),up.feedback.config.navSelectors.push(".nav",".navbar"),up.form.config.validateTargets.unshift(".form-group:has(:origin)"),up.viewport.config.fixedTop.push(".navbar-fixed-top"),up.viewport.config.fixedBottom.push(".navbar-fixed-bottom"),up.viewport.config.anchoredRight.push(".navbar-fixed-top",".navbar-fixed-bottom"),up.fragment.config.badTargetClasses.push("row",/^col(-xs|-sm|-md|-lg)?(-\d+)?$/),function e(t){var a=r[t];if(void 0!==a)return a.exports;var i=r[t]={exports:{}};return o[t](i,i.exports,e),i.exports}(303)}();
|
@@ -0,0 +1,54 @@
|
|
1
|
+
/******/ (function() { // webpackBootstrap
|
2
|
+
/******/ var __webpack_modules__ = ([
|
3
|
+
/* 0 */,
|
4
|
+
/* 1 */
|
5
|
+
/***/ (function() {
|
6
|
+
|
7
|
+
// extracted by mini-css-extract-plugin
|
8
|
+
|
9
|
+
/***/ })
|
10
|
+
/******/ ]);
|
11
|
+
/************************************************************************/
|
12
|
+
/******/ // The module cache
|
13
|
+
/******/ var __webpack_module_cache__ = {};
|
14
|
+
/******/
|
15
|
+
/******/ // The require function
|
16
|
+
/******/ function __webpack_require__(moduleId) {
|
17
|
+
/******/ // Check if module is in cache
|
18
|
+
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
19
|
+
/******/ if (cachedModule !== undefined) {
|
20
|
+
/******/ return cachedModule.exports;
|
21
|
+
/******/ }
|
22
|
+
/******/ // Create a new module (and put it into the cache)
|
23
|
+
/******/ var module = __webpack_module_cache__[moduleId] = {
|
24
|
+
/******/ // no module.id needed
|
25
|
+
/******/ // no module.loaded needed
|
26
|
+
/******/ exports: {}
|
27
|
+
/******/ };
|
28
|
+
/******/
|
29
|
+
/******/ // Execute the module function
|
30
|
+
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
31
|
+
/******/
|
32
|
+
/******/ // Return the exports of the module
|
33
|
+
/******/ return module.exports;
|
34
|
+
/******/ }
|
35
|
+
/******/
|
36
|
+
/************************************************************************/
|
37
|
+
/******/ /************************************************************************/
|
38
|
+
var __webpack_exports__ = {};
|
39
|
+
// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
|
40
|
+
!function() {
|
41
|
+
// Bootstrap uses the class `active` to highlight the current section
|
42
|
+
// of a navigation bar.
|
43
|
+
up.feedback.config.currentClasses.push('active');
|
44
|
+
up.feedback.config.navSelectors.push('.nav', '.navbar');
|
45
|
+
up.form.config.validateTargets.unshift('.form-group:has(:origin)');
|
46
|
+
up.viewport.config.fixedTop.push('.navbar.fixed-top');
|
47
|
+
up.viewport.config.fixedBottom.push('.navbar.fixed-bottom');
|
48
|
+
up.viewport.config.anchoredRight.push('.navbar.fixed-top', '.navbar.fixed-bottom');
|
49
|
+
up.fragment.config.badTargetClasses.push('row', /^col(-xs|-sm|-md|-lg|-xl)?(-\d+)?$/, /^[mp][tblrxy]?-\d+$/);
|
50
|
+
__webpack_require__(1);
|
51
|
+
|
52
|
+
}();
|
53
|
+
/******/ })()
|
54
|
+
;
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(){var o={79:function(){}},r={};up.feedback.config.currentClasses.push("active"),up.feedback.config.navSelectors.push(".nav",".navbar"),up.form.config.validateTargets.unshift(".form-group:has(:origin)"),up.viewport.config.fixedTop.push(".navbar.fixed-top"),up.viewport.config.fixedBottom.push(".navbar.fixed-bottom"),up.viewport.config.anchoredRight.push(".navbar.fixed-top",".navbar.fixed-bottom"),up.fragment.config.badTargetClasses.push("row",/^col(-xs|-sm|-md|-lg|-xl)?(-\d+)?$/,/^[mp][tblrxy]?-\d+$/),function e(t){var a=r[t];if(void 0!==a)return a.exports;var i=r[t]={exports:{}};return o[t](i,i.exports,e),i.exports}(79)}();
|
@@ -0,0 +1,56 @@
|
|
1
|
+
/******/ (function() { // webpackBootstrap
|
2
|
+
/******/ var __webpack_modules__ = ([
|
3
|
+
/* 0 */,
|
4
|
+
/* 1 */
|
5
|
+
/***/ (function() {
|
6
|
+
|
7
|
+
// extracted by mini-css-extract-plugin
|
8
|
+
|
9
|
+
/***/ })
|
10
|
+
/******/ ]);
|
11
|
+
/************************************************************************/
|
12
|
+
/******/ // The module cache
|
13
|
+
/******/ var __webpack_module_cache__ = {};
|
14
|
+
/******/
|
15
|
+
/******/ // The require function
|
16
|
+
/******/ function __webpack_require__(moduleId) {
|
17
|
+
/******/ // Check if module is in cache
|
18
|
+
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
19
|
+
/******/ if (cachedModule !== undefined) {
|
20
|
+
/******/ return cachedModule.exports;
|
21
|
+
/******/ }
|
22
|
+
/******/ // Create a new module (and put it into the cache)
|
23
|
+
/******/ var module = __webpack_module_cache__[moduleId] = {
|
24
|
+
/******/ // no module.id needed
|
25
|
+
/******/ // no module.loaded needed
|
26
|
+
/******/ exports: {}
|
27
|
+
/******/ };
|
28
|
+
/******/
|
29
|
+
/******/ // Execute the module function
|
30
|
+
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
31
|
+
/******/
|
32
|
+
/******/ // Return the exports of the module
|
33
|
+
/******/ return module.exports;
|
34
|
+
/******/ }
|
35
|
+
/******/
|
36
|
+
/************************************************************************/
|
37
|
+
/******/ /************************************************************************/
|
38
|
+
var __webpack_exports__ = {};
|
39
|
+
// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
|
40
|
+
!function() {
|
41
|
+
// Bootstrap uses the class `active` to highlight the current section
|
42
|
+
// of a navigation bar.
|
43
|
+
up.feedback.config.currentClasses.push('active');
|
44
|
+
up.feedback.config.navSelectors.push('.nav', '.navbar');
|
45
|
+
up.viewport.config.fixedTop.push('.navbar.fixed-top');
|
46
|
+
up.viewport.config.fixedBottom.push('.navbar.fixed-bottom');
|
47
|
+
up.viewport.config.anchoredRight.push('.navbar.fixed-top', '.navbar.fixed-bottom');
|
48
|
+
// We would really like to provide a nice default for up.form.config.validateTargets.
|
49
|
+
// Unfortunately Bootstrap 5 no longer has a selector like ".form-group" to group labels
|
50
|
+
// and inputs. All the examples now use <div class="mb-3"> .
|
51
|
+
up.fragment.config.badTargetClasses.push('row', /^col(-xs|-sm|-md|-lg|-xl|-xxl)?(-\d+)?$/, /^[mp][tbsexy]?-\d+$/);
|
52
|
+
__webpack_require__(1);
|
53
|
+
|
54
|
+
}();
|
55
|
+
/******/ })()
|
56
|
+
;
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(){var o={313:function(){}},e={};up.feedback.config.currentClasses.push("active"),up.feedback.config.navSelectors.push(".nav",".navbar"),up.viewport.config.fixedTop.push(".navbar.fixed-top"),up.viewport.config.fixedBottom.push(".navbar.fixed-bottom"),up.viewport.config.anchoredRight.push(".navbar.fixed-top",".navbar.fixed-bottom"),up.fragment.config.badTargetClasses.push("row",/^col(-xs|-sm|-md|-lg|-xl|-xxl)?(-\d+)?$/,/^[mp][tbsexy]?-\d+$/),function t(r){var a=e[r];if(void 0!==a)return a.exports;var n=e[r]={exports:{}};return o[r](n,n.exports,t),n.exports}(313)}();
|
@@ -0,0 +1,1281 @@
|
|
1
|
+
/******/ (function() { // webpackBootstrap
|
2
|
+
/******/ var __webpack_modules__ = ([
|
3
|
+
/* 0 */,
|
4
|
+
/* 1 */
|
5
|
+
/***/ (function() {
|
6
|
+
|
7
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from) {
|
8
|
+
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
|
9
|
+
to[j] = from[i];
|
10
|
+
return to;
|
11
|
+
};
|
12
|
+
var u = up.util;
|
13
|
+
/*-
|
14
|
+
@module up.migrate
|
15
|
+
*/
|
16
|
+
up.migrate = (function () {
|
17
|
+
var config = new up.Config(function () { return ({
|
18
|
+
logLevel: 'warn'
|
19
|
+
}); });
|
20
|
+
function renamedProperty(object, oldKey, newKey) {
|
21
|
+
var warning = function () { return warn('Property { %s } has been renamed to { %s } (found in %o)', oldKey, newKey, object); };
|
22
|
+
return Object.defineProperty(object, oldKey, {
|
23
|
+
get: function () {
|
24
|
+
warning();
|
25
|
+
return this[newKey];
|
26
|
+
},
|
27
|
+
set: function (newValue) {
|
28
|
+
warning();
|
29
|
+
this[newKey] = newValue;
|
30
|
+
}
|
31
|
+
});
|
32
|
+
}
|
33
|
+
function fixKey(object, oldKey, newKey) {
|
34
|
+
if (u.isDefined(object[oldKey])) {
|
35
|
+
warn('Property { %s } has been renamed to { %s } (found in %o)', oldKey, newKey, object);
|
36
|
+
u.renameKey(object, oldKey, newKey);
|
37
|
+
}
|
38
|
+
}
|
39
|
+
// Maps old event type to new event type
|
40
|
+
var renamedEvents = {};
|
41
|
+
function renamedEvent(oldType, newType) {
|
42
|
+
renamedEvents[oldType] = newType;
|
43
|
+
}
|
44
|
+
function fixEventType(eventType) {
|
45
|
+
var newEventType = renamedEvents[eventType];
|
46
|
+
if (newEventType) {
|
47
|
+
warn("Event " + eventType + " has been renamed to " + newEventType);
|
48
|
+
return newEventType;
|
49
|
+
}
|
50
|
+
else {
|
51
|
+
return eventType;
|
52
|
+
}
|
53
|
+
}
|
54
|
+
function fixEventTypes(eventTypes) {
|
55
|
+
// Remove duplicates as e.g. up:history:pushed and up:history:replaced
|
56
|
+
// both map to up:location:changed.
|
57
|
+
return u.uniq(u.map(eventTypes, fixEventType));
|
58
|
+
}
|
59
|
+
function renamedPackage(oldName, newName) {
|
60
|
+
Object.defineProperty(up, oldName, {
|
61
|
+
get: function () {
|
62
|
+
warn("up." + oldName + " has been renamed to up." + newName);
|
63
|
+
return up[newName];
|
64
|
+
}
|
65
|
+
});
|
66
|
+
}
|
67
|
+
var warnedMessages = {};
|
68
|
+
function warn(message) {
|
69
|
+
var _a;
|
70
|
+
var args = [];
|
71
|
+
for (var _i = 1; _i < arguments.length; _i++) {
|
72
|
+
args[_i - 1] = arguments[_i];
|
73
|
+
}
|
74
|
+
var formattedMessage = u.sprintf.apply(u, __spreadArray([message], args));
|
75
|
+
if (!warnedMessages[formattedMessage]) {
|
76
|
+
warnedMessages[formattedMessage] = true;
|
77
|
+
(_a = up.log)[config.logLevel].apply(_a, __spreadArray(['unpoly-migrate', message], args));
|
78
|
+
}
|
79
|
+
}
|
80
|
+
function deprecated(deprecatedExpression, replacementExpression) {
|
81
|
+
warn(deprecatedExpression + " has been deprecated. Use " + replacementExpression + " instead.");
|
82
|
+
}
|
83
|
+
// Returns a resolved promise that prints a warning when #then() is called.
|
84
|
+
function formerlyAsync(label) {
|
85
|
+
var promise = Promise.resolve();
|
86
|
+
var oldThen = promise.then;
|
87
|
+
promise.then = function () {
|
88
|
+
warn(label + " is now a sync function");
|
89
|
+
return oldThen.apply(this, arguments);
|
90
|
+
};
|
91
|
+
return promise;
|
92
|
+
}
|
93
|
+
function reset() {
|
94
|
+
config.reset();
|
95
|
+
}
|
96
|
+
up.on('up:framework:reset', reset);
|
97
|
+
return {
|
98
|
+
deprecated: deprecated,
|
99
|
+
renamedPackage: renamedPackage,
|
100
|
+
renamedProperty: renamedProperty,
|
101
|
+
formerlyAsync: formerlyAsync,
|
102
|
+
renamedEvent: renamedEvent,
|
103
|
+
fixEventTypes: fixEventTypes,
|
104
|
+
fixKey: fixKey,
|
105
|
+
warn: warn,
|
106
|
+
loaded: true,
|
107
|
+
config: config
|
108
|
+
};
|
109
|
+
})();
|
110
|
+
|
111
|
+
|
112
|
+
/***/ }),
|
113
|
+
/* 2 */
|
114
|
+
/***/ (function() {
|
115
|
+
|
116
|
+
/*-
|
117
|
+
@module up.util
|
118
|
+
*/
|
119
|
+
/*-
|
120
|
+
Returns a copy of the given object that only contains
|
121
|
+
the given keys.
|
122
|
+
|
123
|
+
@function up.util.only
|
124
|
+
@param {Object} object
|
125
|
+
@param {Array} ...keys
|
126
|
+
@deprecated
|
127
|
+
Use `up.util.pick()` instead.
|
128
|
+
*/
|
129
|
+
up.util.only = function (object) {
|
130
|
+
var keys = [];
|
131
|
+
for (var _i = 1; _i < arguments.length; _i++) {
|
132
|
+
keys[_i - 1] = arguments[_i];
|
133
|
+
}
|
134
|
+
up.migrate.deprecated('up.util.only(object, ...keys)', 'up.util.pick(object, keys)');
|
135
|
+
return up.util.pick(object, keys);
|
136
|
+
};
|
137
|
+
/*-
|
138
|
+
Returns a copy of the given object that contains all except
|
139
|
+
the given keys.
|
140
|
+
|
141
|
+
@function up.util.except
|
142
|
+
@param {Object} object
|
143
|
+
@param {Array} ...keys
|
144
|
+
@deprecated
|
145
|
+
Use `up.util.omit(object, keys)` (with an array argument) instead of `up.util.object(...keys)` (with rest arguments).
|
146
|
+
*/
|
147
|
+
up.util.except = function (object) {
|
148
|
+
var keys = [];
|
149
|
+
for (var _i = 1; _i < arguments.length; _i++) {
|
150
|
+
keys[_i - 1] = arguments[_i];
|
151
|
+
}
|
152
|
+
up.migrate.deprecated('up.util.except(object, ...keys)', 'up.util.omit(object, keys)');
|
153
|
+
return up.util.omit(object, keys);
|
154
|
+
};
|
155
|
+
up.util.parseUrl = function () {
|
156
|
+
var _a;
|
157
|
+
var args = [];
|
158
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
159
|
+
args[_i] = arguments[_i];
|
160
|
+
}
|
161
|
+
up.migrate.warn('up.util.parseUrl() has been renamed to up.util.parseURL()');
|
162
|
+
return (_a = up.util).parseURL.apply(_a, args);
|
163
|
+
};
|
164
|
+
up.util.any = function () {
|
165
|
+
var args = [];
|
166
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
167
|
+
args[_i] = arguments[_i];
|
168
|
+
}
|
169
|
+
up.migrate.warn('up.util.any() has been renamed to up.util.some()');
|
170
|
+
return some.apply(void 0, args);
|
171
|
+
};
|
172
|
+
up.util.all = function () {
|
173
|
+
var _a;
|
174
|
+
var args = [];
|
175
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
176
|
+
args[_i] = arguments[_i];
|
177
|
+
}
|
178
|
+
up.migrate.warn('up.util.all() has been renamed to up.util.every()');
|
179
|
+
return (_a = up.util).every.apply(_a, args);
|
180
|
+
};
|
181
|
+
up.util.detect = function () {
|
182
|
+
var _a;
|
183
|
+
var args = [];
|
184
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
185
|
+
args[_i] = arguments[_i];
|
186
|
+
}
|
187
|
+
up.migrate.warn('up.util.detect() has been renamed to up.util.find()');
|
188
|
+
return (_a = up.util).find.apply(_a, args);
|
189
|
+
};
|
190
|
+
up.util.select = function () {
|
191
|
+
var _a;
|
192
|
+
var args = [];
|
193
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
194
|
+
args[_i] = arguments[_i];
|
195
|
+
}
|
196
|
+
up.migrate.warn('up.util.select() has been renamed to up.util.filter()');
|
197
|
+
return (_a = up.util).filter.apply(_a, args);
|
198
|
+
};
|
199
|
+
up.util.setTimer = function () {
|
200
|
+
var _a;
|
201
|
+
var args = [];
|
202
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
203
|
+
args[_i] = arguments[_i];
|
204
|
+
}
|
205
|
+
up.migrate.warn('up.util.setTimer() has been renamed to up.util.timer()');
|
206
|
+
return (_a = up.util).timer.apply(_a, args);
|
207
|
+
};
|
208
|
+
up.util.escapeHtml = function () {
|
209
|
+
var _a;
|
210
|
+
var args = [];
|
211
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
212
|
+
args[_i] = arguments[_i];
|
213
|
+
}
|
214
|
+
up.migrate.deprecated('up.util.escapeHtml', 'up.util.escapeHTML');
|
215
|
+
return (_a = up.util).escapeHTML.apply(_a, args);
|
216
|
+
};
|
217
|
+
up.util.selectorForElement = function () {
|
218
|
+
var _a;
|
219
|
+
var args = [];
|
220
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
221
|
+
args[_i] = arguments[_i];
|
222
|
+
}
|
223
|
+
up.migrate.warn('up.util.selectorForElement() has been renamed to up.fragment.toTarget()');
|
224
|
+
return (_a = up.fragment).toTarget.apply(_a, args);
|
225
|
+
};
|
226
|
+
up.util.nextFrame = function () {
|
227
|
+
var _a;
|
228
|
+
var args = [];
|
229
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
230
|
+
args[_i] = arguments[_i];
|
231
|
+
}
|
232
|
+
up.migrate.warn('up.util.nextFrame() has been renamed to up.util.task()');
|
233
|
+
return (_a = up.util).task.apply(_a, args);
|
234
|
+
};
|
235
|
+
/*-
|
236
|
+
Calls the given function for the given number of times.
|
237
|
+
|
238
|
+
@function up.util.times
|
239
|
+
@param {number} count
|
240
|
+
@param {Function()} block
|
241
|
+
@deprecated
|
242
|
+
Use a `for` loop instead.
|
243
|
+
*/
|
244
|
+
up.util.times = function (count, block) {
|
245
|
+
for (var i = 0; i < count; i++) {
|
246
|
+
block();
|
247
|
+
}
|
248
|
+
};
|
249
|
+
|
250
|
+
|
251
|
+
/***/ }),
|
252
|
+
/* 3 */
|
253
|
+
/***/ (function() {
|
254
|
+
|
255
|
+
/*-
|
256
|
+
@module up.element
|
257
|
+
*/
|
258
|
+
/*-
|
259
|
+
Returns the first descendant element matching the given selector.
|
260
|
+
|
261
|
+
@function up.element.first
|
262
|
+
@param {Element} [parent=document]
|
263
|
+
The parent element whose descendants to search.
|
264
|
+
|
265
|
+
If omitted, all elements in the `document` will be searched.
|
266
|
+
@param {string} selector
|
267
|
+
The CSS selector to match.
|
268
|
+
@return {Element|undefined|null}
|
269
|
+
The first element matching the selector.
|
270
|
+
|
271
|
+
Returns `null` or `undefined` if no element macthes.
|
272
|
+
@deprecated
|
273
|
+
Use `up.element.get()` instead.
|
274
|
+
*/
|
275
|
+
up.element.first = function () {
|
276
|
+
var _a;
|
277
|
+
var args = [];
|
278
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
279
|
+
args[_i] = arguments[_i];
|
280
|
+
}
|
281
|
+
up.migrate.deprecated('up.element.first()', 'up.element.get()');
|
282
|
+
return (_a = up.element).get.apply(_a, args);
|
283
|
+
};
|
284
|
+
up.element.createFromHtml = function () {
|
285
|
+
var _a;
|
286
|
+
var args = [];
|
287
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
288
|
+
args[_i] = arguments[_i];
|
289
|
+
}
|
290
|
+
up.migrate.deprecated('up.element.createFromHtml', 'up.element.createFromHTML');
|
291
|
+
return (_a = up.element).createFromHTML.apply(_a, args);
|
292
|
+
};
|
293
|
+
|
294
|
+
|
295
|
+
/***/ }),
|
296
|
+
/* 4 */
|
297
|
+
/***/ (function() {
|
298
|
+
|
299
|
+
/*-
|
300
|
+
@module up.event
|
301
|
+
*/
|
302
|
+
up.migrate.renamedPackage('bus', 'event');
|
303
|
+
/*-
|
304
|
+
[Emits an event](/up.emit) and returns whether no listener
|
305
|
+
has prevented the default action.
|
306
|
+
|
307
|
+
### Example
|
308
|
+
|
309
|
+
```javascript
|
310
|
+
if (up.event.nobodyPrevents('disk:erase')) {
|
311
|
+
Disk.erase()
|
312
|
+
})
|
313
|
+
```
|
314
|
+
|
315
|
+
@function up.event.nobodyPrevents
|
316
|
+
@param {string} eventType
|
317
|
+
@param {Object} eventProps
|
318
|
+
@return {boolean}
|
319
|
+
whether no listener has prevented the default action
|
320
|
+
@deprecated
|
321
|
+
Use `!up.emit(type).defaultPrevented` instead.
|
322
|
+
*/
|
323
|
+
up.event.nobodyPrevents = function () {
|
324
|
+
var args = [];
|
325
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
326
|
+
args[_i] = arguments[_i];
|
327
|
+
}
|
328
|
+
up.migrate.deprecated('up.event.nobodyPrevents(type)', '!up.emit(type).defaultPrevented');
|
329
|
+
var event = up.emit.apply(up, args);
|
330
|
+
return !event.defaultPrevented;
|
331
|
+
};
|
332
|
+
|
333
|
+
|
334
|
+
/***/ }),
|
335
|
+
/* 5 */
|
336
|
+
/***/ (function() {
|
337
|
+
|
338
|
+
var u = up.util;
|
339
|
+
var e = up.element;
|
340
|
+
up.migrate.postCompile = function (elements, compiler) {
|
341
|
+
// up.compiler() has a legacy { keep } option that will automatically
|
342
|
+
// set [up-keep] on the elements it compiles
|
343
|
+
var keepValue;
|
344
|
+
if (keepValue = compiler.keep) {
|
345
|
+
up.migrate.warn('The { keep: true } option for up.compiler() has been removed. Have the compiler set [up-keep] attribute instead.');
|
346
|
+
var value = u.isString(keepValue) ? keepValue : '';
|
347
|
+
for (var _i = 0, elements_1 = elements; _i < elements_1.length; _i++) {
|
348
|
+
var element = elements_1[_i];
|
349
|
+
element.setAttribute('up-keep', value);
|
350
|
+
}
|
351
|
+
}
|
352
|
+
};
|
353
|
+
up.migrate.targetMacro = function (queryAttr, fixedResultAttrs, callback) {
|
354
|
+
up.macro("[" + queryAttr + "]", function (link) {
|
355
|
+
var optionalTarget;
|
356
|
+
var resultAttrs = u.copy(fixedResultAttrs);
|
357
|
+
if ((optionalTarget = link.getAttribute(queryAttr))) {
|
358
|
+
resultAttrs['up-target'] = optionalTarget;
|
359
|
+
}
|
360
|
+
else {
|
361
|
+
resultAttrs['up-follow'] = '';
|
362
|
+
}
|
363
|
+
e.setMissingAttrs(link, resultAttrs);
|
364
|
+
link.removeAttribute(queryAttr);
|
365
|
+
callback === null || callback === void 0 ? void 0 : callback();
|
366
|
+
});
|
367
|
+
};
|
368
|
+
|
369
|
+
|
370
|
+
/***/ }),
|
371
|
+
/* 6 */
|
372
|
+
/***/ (function() {
|
373
|
+
|
374
|
+
/*-
|
375
|
+
@module up.form
|
376
|
+
*/
|
377
|
+
up.migrate.renamedProperty(up.form.config, 'fields', 'fieldSelectors');
|
378
|
+
up.migrate.renamedProperty(up.form.config, 'submitButtons', 'submitButtonSelectors');
|
379
|
+
|
380
|
+
|
381
|
+
/***/ }),
|
382
|
+
/* 7 */
|
383
|
+
/***/ (function() {
|
384
|
+
|
385
|
+
var __assign = (this && this.__assign) || function () {
|
386
|
+
__assign = Object.assign || function(t) {
|
387
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
388
|
+
s = arguments[i];
|
389
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
390
|
+
t[p] = s[p];
|
391
|
+
}
|
392
|
+
return t;
|
393
|
+
};
|
394
|
+
return __assign.apply(this, arguments);
|
395
|
+
};
|
396
|
+
var u = up.util;
|
397
|
+
/*-
|
398
|
+
@module up.fragment
|
399
|
+
*/
|
400
|
+
up.migrate.renamedPackage('flow', 'fragment');
|
401
|
+
up.migrate.renamedPackage('dom', 'fragment');
|
402
|
+
up.migrate.renamedProperty(up.fragment.config, 'fallbacks', 'mainTargets');
|
403
|
+
up.migrate.handleResponseDocOptions = function (docOptions) { return up.migrate.fixKey(docOptions, 'html', 'document'); };
|
404
|
+
/*-
|
405
|
+
Replaces elements on the current page with corresponding elements
|
406
|
+
from a new page fetched from the server.
|
407
|
+
|
408
|
+
@function up.replace
|
409
|
+
@param {string|Element|jQuery} target
|
410
|
+
The CSS selector to update. You can also pass a DOM element or jQuery element
|
411
|
+
here, in which case a selector will be inferred from the element's class and ID.
|
412
|
+
@param {string} url
|
413
|
+
The URL to fetch from the server.
|
414
|
+
@param {Object} [options]
|
415
|
+
See `options` for `up.render()`.
|
416
|
+
@return {Promise}
|
417
|
+
A promise that fulfills when the page has been updated.
|
418
|
+
@deprecated
|
419
|
+
Use `up.render()` or `up.navigate()` instead.
|
420
|
+
*/
|
421
|
+
up.replace = function (target, url, options) {
|
422
|
+
up.migrate.deprecated('up.replace(target, url)', 'up.navigate(target, { url })');
|
423
|
+
return up.navigate(__assign(__assign({}, options), { target: target, url: url }));
|
424
|
+
};
|
425
|
+
/*-
|
426
|
+
Updates a selector on the current page with the
|
427
|
+
same selector from the given HTML string.
|
428
|
+
|
429
|
+
### Example
|
430
|
+
|
431
|
+
Let's say your current HTML looks like this:
|
432
|
+
|
433
|
+
<div class="one">old one</div>
|
434
|
+
<div class="two">old two</div>
|
435
|
+
|
436
|
+
We now replace the second `<div>`, using an HTML string
|
437
|
+
as the source:
|
438
|
+
|
439
|
+
html = '<div class="one">new one</div>' +
|
440
|
+
'<div class="two">new two</div>'
|
441
|
+
|
442
|
+
up.extract('.two', html)
|
443
|
+
|
444
|
+
Unpoly looks for the selector `.two` in the strings and updates its
|
445
|
+
contents in the current page. The current page now looks like this:
|
446
|
+
|
447
|
+
<div class="one">old one</div>
|
448
|
+
<div class="two">new two</div>
|
449
|
+
|
450
|
+
Note how only `.two` has changed. The update for `.one` was
|
451
|
+
discarded, since it didn't match the selector.
|
452
|
+
|
453
|
+
@function up.extract
|
454
|
+
@param {string|Element|jQuery} target
|
455
|
+
@param {string} html
|
456
|
+
@param {Object} [options]
|
457
|
+
See options for [`up.render()`](/up.render).
|
458
|
+
@return {Promise}
|
459
|
+
A promise that will be fulfilled when the selector was updated.
|
460
|
+
@deprecated
|
461
|
+
Use `up.render()` or `up.navigate()` instead.
|
462
|
+
*/
|
463
|
+
up.extract = function (target, document, options) {
|
464
|
+
up.migrate.deprecated('up.extract(target, document)', 'up.navigate(target, { document })');
|
465
|
+
return up.navigate(__assign(__assign({}, options), { target: target, document: document }));
|
466
|
+
};
|
467
|
+
/*-
|
468
|
+
Returns the first element matching the given selector, but
|
469
|
+
ignores elements that are being [destroyed](/up.destroy) or that are being
|
470
|
+
removed by a [transition](/up.morph).
|
471
|
+
|
472
|
+
Returns `undefined` if no element matches these conditions.
|
473
|
+
|
474
|
+
@function up.fragment.first
|
475
|
+
@param {Element|jQuery} [root=document]
|
476
|
+
The root element for the search. Only the root's children will be matched.
|
477
|
+
|
478
|
+
May be omitted to search through all elements in the `document`.
|
479
|
+
@param {string} selector
|
480
|
+
The selector to match
|
481
|
+
@param {string} [options.layer='current']
|
482
|
+
The the layer in which to find the element.
|
483
|
+
|
484
|
+
@see layer-option
|
485
|
+
@param {string|Element|jQuery} [options.origin]
|
486
|
+
An second element or selector that can be referenced as `:origin` in the first selector:
|
487
|
+
@return {Element|undefined}
|
488
|
+
The first element that is neither a ghost or being destroyed,
|
489
|
+
or `undefined` if no such element was found.
|
490
|
+
@deprecated
|
491
|
+
Use `up.fragment.get()` instead.
|
492
|
+
*/
|
493
|
+
up.fragment.first = function () {
|
494
|
+
var _a;
|
495
|
+
var args = [];
|
496
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
497
|
+
args[_i] = arguments[_i];
|
498
|
+
}
|
499
|
+
up.migrate.deprecated('up.fragment.first()', 'up.fragment.get()');
|
500
|
+
return (_a = up.fragment).get.apply(_a, args);
|
501
|
+
};
|
502
|
+
up.first = up.fragment.first;
|
503
|
+
up.migrate.handleScrollOptions = function (options) {
|
504
|
+
if (u.isUndefined(options.scroll)) {
|
505
|
+
// Rewrite deprecated { reveal } option (it had multiple variants)
|
506
|
+
if (u.isString(options.reveal)) {
|
507
|
+
up.migrate.deprecated("Option { reveal: '" + options.reveal + "' }", "{ scroll: '" + options.reveal + "' }");
|
508
|
+
options.scroll = options.reveal;
|
509
|
+
}
|
510
|
+
else if (options.reveal === true) {
|
511
|
+
up.migrate.deprecated('Option { reveal: true }', "{ scroll: 'target' }");
|
512
|
+
options.scroll = 'target';
|
513
|
+
}
|
514
|
+
else if (options.reveal === false) {
|
515
|
+
up.migrate.deprecated('Option { reveal: false }', "{ scroll: false }");
|
516
|
+
options.scroll = false;
|
517
|
+
}
|
518
|
+
// Rewrite deprecated { resetScroll } option
|
519
|
+
if (u.isDefined(options.resetScroll)) {
|
520
|
+
up.migrate.deprecated('Option { resetScroll: true }', "{ scroll: 'reset' }");
|
521
|
+
options.scroll = 'teset';
|
522
|
+
}
|
523
|
+
// Rewrite deprecated { restoreScroll } option
|
524
|
+
if (u.isDefined(options.restoreScroll)) {
|
525
|
+
up.migrate.deprecated('Option { restoreScroll: true }', "{ scroll: 'restore' }");
|
526
|
+
options.scroll = 'restore';
|
527
|
+
}
|
528
|
+
}
|
529
|
+
};
|
530
|
+
up.migrate.handleHistoryOption = function (options) {
|
531
|
+
if (u.isString(options.history) && (options.history !== 'auto')) {
|
532
|
+
up.migrate.warn("Passing a URL as { history } option is deprecated. Pass it as { location } instead.");
|
533
|
+
options.location = options.history;
|
534
|
+
// Also the URL in { history } is truthy, keeping a value in there would also inherit to failOptions,
|
535
|
+
// where it would be expanded to { failLocation }.
|
536
|
+
options.history = 'auto';
|
537
|
+
}
|
538
|
+
};
|
539
|
+
up.migrate.preprocessRenderOptions = function (options) {
|
540
|
+
up.migrate.handleHistoryOption(options);
|
541
|
+
for (var _i = 0, _a = ['target', 'origin']; _i < _a.length; _i++) {
|
542
|
+
var prop = _a[_i];
|
543
|
+
if (u.isJQuery(options[prop])) {
|
544
|
+
up.migrate.warn('Passing a jQuery collection as { %s } is deprecated. Pass it as a native element instead.', prop);
|
545
|
+
options[prop] = up.element.get(options[prop]);
|
546
|
+
}
|
547
|
+
}
|
548
|
+
};
|
549
|
+
|
550
|
+
|
551
|
+
/***/ }),
|
552
|
+
/* 8 */
|
553
|
+
/***/ (function() {
|
554
|
+
|
555
|
+
/*-
|
556
|
+
@module up.history
|
557
|
+
*/
|
558
|
+
up.migrate.renamedProperty(up.history.config, 'popTargets', 'restoreTargets');
|
559
|
+
/*-
|
560
|
+
Returns a normalized URL for the current history entry.
|
561
|
+
|
562
|
+
@function up.history.url
|
563
|
+
@return {string}
|
564
|
+
@deprecated Use the `up.history.location` property instead.
|
565
|
+
*/
|
566
|
+
up.history.url = function () {
|
567
|
+
up.migrate.deprecated('up.history.url()', 'up.history.location');
|
568
|
+
return up.history.location;
|
569
|
+
};
|
570
|
+
up.migrate.renamedEvent('up:history:push', 'up:location:changed');
|
571
|
+
up.migrate.renamedEvent('up:history:pushed', 'up:location:changed');
|
572
|
+
up.migrate.renamedEvent('up:history:restore', 'up:location:changed');
|
573
|
+
up.migrate.renamedEvent('up:history:restored', 'up:location:changed');
|
574
|
+
// There was never an up:history:replace (present tense) event
|
575
|
+
up.migrate.renamedEvent('up:history:replaced', 'up:location:changed');
|
576
|
+
|
577
|
+
|
578
|
+
/***/ }),
|
579
|
+
/* 9 */
|
580
|
+
/***/ (function() {
|
581
|
+
|
582
|
+
/*-
|
583
|
+
@module up.feedback
|
584
|
+
*/
|
585
|
+
up.migrate.renamedPackage('navigation', 'feedback');
|
586
|
+
up.migrate.renamedProperty(up.feedback.config, 'navs', 'navSelectors');
|
587
|
+
|
588
|
+
|
589
|
+
/***/ }),
|
590
|
+
/* 10 */
|
591
|
+
/***/ (function() {
|
592
|
+
|
593
|
+
/*-
|
594
|
+
@module up.link
|
595
|
+
*/
|
596
|
+
up.migrate.parseFollowOptions = function (parser) {
|
597
|
+
parser.string('flavor'); // Renamed to { mode }.
|
598
|
+
parser.string('width'); // Removed overlay option.
|
599
|
+
parser.string('height'); // Removed overlay option.
|
600
|
+
parser.boolean('closable'); // Renamed to { dismissable }.
|
601
|
+
parser.booleanOrString('reveal'); // legacy option for { scroll: 'target' }
|
602
|
+
parser.boolean('resetScroll'); // legacy option for { scroll: 'top' }
|
603
|
+
parser.boolean('restoreScroll'); // legacy option for { scroll: 'restore' }
|
604
|
+
parser.booleanOrString('historyVisible'); // short-lived legacy option for { history }
|
605
|
+
};
|
606
|
+
/*-
|
607
|
+
[Follows](/up.follow) this link as fast as possible.
|
608
|
+
|
609
|
+
This is done by:
|
610
|
+
|
611
|
+
- [Following the link through AJAX](/a-up-follow) instead of a full page load
|
612
|
+
- [Preloading the link's destination URL](/a-up-preload)
|
613
|
+
- [Triggering the link on `mousedown`](/a-up-instant) instead of on `click`
|
614
|
+
|
615
|
+
### Example
|
616
|
+
|
617
|
+
Use `[up-dash]` like this:
|
618
|
+
|
619
|
+
<a href="/users" up-dash=".main">User list</a>
|
620
|
+
|
621
|
+
This is shorthand for:
|
622
|
+
|
623
|
+
<a href="/users" up-target=".main" up-instant up-preload>User list</a>
|
624
|
+
|
625
|
+
@selector a[up-dash]
|
626
|
+
@param [up-dash='body']
|
627
|
+
The CSS selector to replace
|
628
|
+
|
629
|
+
Inside the CSS selector you may refer to this link as `&` ([like in Sass](https://sass-lang.com/documentation/file.SASS_REFERENCE.html#parent-selector)).
|
630
|
+
@deprecated
|
631
|
+
To accelerate all links use `up.link.config.instantSelectors` and `up.link.config.preloadSelectors`.
|
632
|
+
*/
|
633
|
+
up.migrate.targetMacro('up-dash', { 'up-preload': '', 'up-instant': '' }, function () { return up.migrate.deprecated('a[up-dash]', 'up.link.config.instantSelectors or up.link.config.preloadSelectors'); });
|
634
|
+
|
635
|
+
|
636
|
+
/***/ }),
|
637
|
+
/* 11 */
|
638
|
+
/***/ (function() {
|
639
|
+
|
640
|
+
/*-
|
641
|
+
@module up.layer
|
642
|
+
*/
|
643
|
+
up.migrate.handleLayerOptions = function (options) {
|
644
|
+
up.migrate.fixKey(options, 'flavor', 'mode');
|
645
|
+
up.migrate.fixKey(options, 'closable', 'dismissable');
|
646
|
+
up.migrate.fixKey(options, 'closeLabel', 'dismissLabel');
|
647
|
+
for (var _i = 0, _a = ['width', 'maxWidth', 'height']; _i < _a.length; _i++) {
|
648
|
+
var dimensionKey = _a[_i];
|
649
|
+
if (options[dimensionKey]) {
|
650
|
+
up.migrate.warn("Layer option { " + dimensionKey + " } has been removed. Use { size } or { class } instead.");
|
651
|
+
}
|
652
|
+
}
|
653
|
+
if (options.sticky) {
|
654
|
+
up.migrate.warn('Layer option { sticky } has been removed. Give links an [up-peel=false] attribute to prevent layer dismissal on click.');
|
655
|
+
}
|
656
|
+
if (options.template) {
|
657
|
+
up.migrate.warn('Layer option { template } has been removed. Use { class } or modify the layer HTML on up:layer:open.');
|
658
|
+
}
|
659
|
+
if (options.layer === 'page') {
|
660
|
+
up.migrate.warn("Option { layer: 'page' } has been renamed to { layer: 'root' }.");
|
661
|
+
options.layer = 'root';
|
662
|
+
}
|
663
|
+
if ((options.layer === 'modal') || (options.layer === 'popup')) {
|
664
|
+
up.migrate.warn("Option { layer: '" + options.layer + "' } has been removed. Did you mean { layer: 'overlay' }?");
|
665
|
+
options.layer = 'overlay';
|
666
|
+
}
|
667
|
+
};
|
668
|
+
up.migrate.handleTetherOptions = function (options) {
|
669
|
+
var _a = options.position.split('-'), position = _a[0], align = _a[1];
|
670
|
+
if (align) {
|
671
|
+
up.migrate.warn('The position value %o is deprecated. Use %o instead.', options.position, { position: position, align: align });
|
672
|
+
options.position = position;
|
673
|
+
options.align = align;
|
674
|
+
}
|
675
|
+
};
|
676
|
+
/*-
|
677
|
+
When this element is clicked, closes a currently open overlay.
|
678
|
+
|
679
|
+
Does nothing if no overlay is currently open.
|
680
|
+
|
681
|
+
To make a link that closes the current overlay, but follows to
|
682
|
+
a fallback destination on the root layer:
|
683
|
+
|
684
|
+
<a href="/fallback" up-close>Okay</a>
|
685
|
+
|
686
|
+
@selector a[up-close]
|
687
|
+
@deprecated
|
688
|
+
Use `a[up-dismiss]` instead.
|
689
|
+
*/
|
690
|
+
up.migrate.registerLayerCloser = function (layer) {
|
691
|
+
return layer.registerClickCloser('up-close', function (value, closeOptions) {
|
692
|
+
up.migrate.deprecated('[up-close]', '[up-dismiss]');
|
693
|
+
layer.dismiss(value, closeOptions);
|
694
|
+
});
|
695
|
+
};
|
696
|
+
up.migrate.handleLayerConfig = function (config) { return up.migrate.fixKey(config, 'historyVisible', 'history'); };
|
697
|
+
up.util.getter(up.Layer.prototype, 'historyVisible', function () {
|
698
|
+
up.migrate.deprecated('up.Layer#historyVisible', 'up.Layer#history');
|
699
|
+
return this.history;
|
700
|
+
});
|
701
|
+
|
702
|
+
|
703
|
+
/***/ }),
|
704
|
+
/* 12 */
|
705
|
+
/***/ (function() {
|
706
|
+
|
707
|
+
/*-
|
708
|
+
@module up.layer
|
709
|
+
*/
|
710
|
+
var __assign = (this && this.__assign) || function () {
|
711
|
+
__assign = Object.assign || function(t) {
|
712
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
713
|
+
s = arguments[i];
|
714
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
715
|
+
t[p] = s[p];
|
716
|
+
}
|
717
|
+
return t;
|
718
|
+
};
|
719
|
+
return __assign.apply(this, arguments);
|
720
|
+
};
|
721
|
+
var u = up.util;
|
722
|
+
var FLAVORS_ERROR = new Error('up.modal.flavors has been removed without direct replacement. You may give new layers a { class } or modify layer elements on up:layer:open.');
|
723
|
+
up.modal = {
|
724
|
+
/*-
|
725
|
+
Opens a modal overlay for the given URL.
|
726
|
+
|
727
|
+
@function up.modal.visit
|
728
|
+
@param {string} url
|
729
|
+
The URL to load.
|
730
|
+
@param {Object} options
|
731
|
+
See options for `up.render()`.
|
732
|
+
@deprecated
|
733
|
+
Use `up.layer.open({ url, mode: "modal" })` instead.
|
734
|
+
*/
|
735
|
+
visit: function (url, options) {
|
736
|
+
if (options === void 0) { options = {}; }
|
737
|
+
up.migrate.deprecated('up.modal.visit(url)', 'up.layer.open({ url, mode: "modal" })');
|
738
|
+
return up.layer.open(__assign(__assign({}, options), { url: url, mode: 'modal' }));
|
739
|
+
},
|
740
|
+
/*-
|
741
|
+
Opens the given link's destination in a modal overlay.
|
742
|
+
|
743
|
+
@function up.modal.follow
|
744
|
+
@param {Element|jQuery|string} linkOrSelector
|
745
|
+
The link to follow.
|
746
|
+
@param {string} [options]
|
747
|
+
See options for `up.render()`.
|
748
|
+
@return {Promise}
|
749
|
+
A promise that will be fulfilled when the modal has been opened.
|
750
|
+
@deprecated
|
751
|
+
Use `up.follow(link, { layer: "modal" })` instead.
|
752
|
+
*/
|
753
|
+
follow: function (link, options) {
|
754
|
+
if (options === void 0) { options = {}; }
|
755
|
+
up.migrate.deprecated('up.modal.follow(link)', 'up.follow(link, { layer: "modal" })');
|
756
|
+
return up.follow(link, __assign(__assign({}, options), { layer: 'modal' }));
|
757
|
+
},
|
758
|
+
/*-
|
759
|
+
[Extracts](/up.extract) the given CSS selector from the given HTML string and
|
760
|
+
opens the results in a modal overlay.
|
761
|
+
|
762
|
+
@function up.modal.extract
|
763
|
+
@param {string} selector
|
764
|
+
The CSS selector to extract from the HTML.
|
765
|
+
@param {string} document
|
766
|
+
The HTML containing the modal content.
|
767
|
+
@param {Object} options
|
768
|
+
See options for [`up.modal.follow()`](/up.modal.follow).
|
769
|
+
@return {Promise}
|
770
|
+
A promise that will be fulfilled when the modal has been opened.
|
771
|
+
@deprecated
|
772
|
+
Use `up.layer.open({ document, mode: "modal" })` instead.
|
773
|
+
*/
|
774
|
+
extract: function (target, html, options) {
|
775
|
+
if (options === void 0) { options = {}; }
|
776
|
+
up.migrate.deprecated('up.modal.extract(target, document)', 'up.layer.open({ document, mode: "modal" })');
|
777
|
+
return up.layer.open(__assign(__assign({}, options), { target: target, html: html, layer: 'modal' }));
|
778
|
+
},
|
779
|
+
/*-
|
780
|
+
Closes a currently open overlay.
|
781
|
+
|
782
|
+
@function up.modal.close
|
783
|
+
@param {Object} options
|
784
|
+
@return {Promise}
|
785
|
+
@deprecated
|
786
|
+
Use `up.layer.dismiss()` instead.
|
787
|
+
*/
|
788
|
+
close: function (options) {
|
789
|
+
if (options === void 0) { options = {}; }
|
790
|
+
up.migrate.deprecated('up.modal.close()', 'up.layer.dismiss()');
|
791
|
+
up.layer.dismiss(null, options);
|
792
|
+
return up.migrate.formerlyAsync('up.layer.dismiss()');
|
793
|
+
},
|
794
|
+
/*-
|
795
|
+
Returns the location URL of the fragment displayed in the current overlay.
|
796
|
+
|
797
|
+
@function up.modal.url
|
798
|
+
@return {string}
|
799
|
+
@deprecated
|
800
|
+
Use `up.layer.location` instead.
|
801
|
+
*/
|
802
|
+
url: function () {
|
803
|
+
up.migrate.deprecated('up.modal.url()', 'up.layer.location');
|
804
|
+
return up.layer.location;
|
805
|
+
},
|
806
|
+
/*-
|
807
|
+
Returns the location URL of the layer behind the current overlay.
|
808
|
+
|
809
|
+
@function up.modal.coveredUrl
|
810
|
+
@return {string}
|
811
|
+
@deprecated
|
812
|
+
Use `up.layer.parent.location` instead.
|
813
|
+
*/
|
814
|
+
coveredUrl: function () {
|
815
|
+
var _a;
|
816
|
+
up.migrate.deprecated('up.modal.coveredUrl()', 'up.layer.parent.location');
|
817
|
+
return (_a = up.layer.parent) === null || _a === void 0 ? void 0 : _a.location;
|
818
|
+
},
|
819
|
+
/*-
|
820
|
+
Sets default options for future modal overlays.
|
821
|
+
|
822
|
+
@property up.modal.config
|
823
|
+
@deprecated
|
824
|
+
Use `up.layer.config.modal` instead.
|
825
|
+
*/
|
826
|
+
get config() {
|
827
|
+
up.migrate.deprecated('up.modal.config', 'up.layer.config.modal');
|
828
|
+
return up.layer.config.modal;
|
829
|
+
},
|
830
|
+
/*-
|
831
|
+
Returns whether the given element or selector is contained
|
832
|
+
within the current layer.
|
833
|
+
|
834
|
+
@function up.modal.contains
|
835
|
+
@param {string} elementOrSelector
|
836
|
+
The element to test
|
837
|
+
@return {boolean}
|
838
|
+
@deprecated
|
839
|
+
Use `up.layer.contains()` instead.
|
840
|
+
*/
|
841
|
+
contains: function (element) {
|
842
|
+
up.migrate.deprecated('up.modal.contains()', 'up.layer.contains()');
|
843
|
+
return up.layer.contains(element);
|
844
|
+
},
|
845
|
+
/*-
|
846
|
+
Returns whether an overlay is currently open.
|
847
|
+
|
848
|
+
@function up.modal.isOpen
|
849
|
+
@return {boolean}
|
850
|
+
@deprecated
|
851
|
+
Use `up.layer.isOverlay()` instead.
|
852
|
+
*/
|
853
|
+
isOpen: function () {
|
854
|
+
up.migrate.deprecated('up.modal.isOpen()', 'up.layer.isOverlay()');
|
855
|
+
return up.layer.isOverlay();
|
856
|
+
},
|
857
|
+
get flavors() {
|
858
|
+
throw FLAVORS_ERROR;
|
859
|
+
},
|
860
|
+
flavor: function () {
|
861
|
+
throw FLAVORS_ERROR;
|
862
|
+
}
|
863
|
+
};
|
864
|
+
up.migrate.renamedEvent('up:modal:open', 'up:layer:open');
|
865
|
+
up.migrate.renamedEvent('up:modal:opened', 'up:layer:opened');
|
866
|
+
up.migrate.renamedEvent('up:modal:close', 'up:layer:dismiss');
|
867
|
+
up.migrate.renamedEvent('up:modal:closed', 'up:layer:dismissed');
|
868
|
+
/*-
|
869
|
+
Clicking this link will load the destination via AJAX and open
|
870
|
+
the given selector in a modal overlay.
|
871
|
+
|
872
|
+
@selector a[up-modal]
|
873
|
+
@params-note
|
874
|
+
All attributes for `a[up-layer=new]` may also be used.
|
875
|
+
@param {string} up-modal
|
876
|
+
The CSS selector that will be extracted from the response and displayed in a modal dialog.
|
877
|
+
@deprecated
|
878
|
+
Use `a[up-layer="new modal"]` instead.
|
879
|
+
*/
|
880
|
+
up.migrate.targetMacro('up-modal', { 'up-layer': 'new modal' }, function () { return up.migrate.deprecated('a[up-modal]', 'a[up-layer="new modal"]'); });
|
881
|
+
/*-
|
882
|
+
Clicking this link will load the destination via AJAX and open
|
883
|
+
the given selector in a modal drawer that slides in from the edge of the screen.
|
884
|
+
|
885
|
+
@selector a[up-drawer]
|
886
|
+
@params-note
|
887
|
+
All attributes for `a[up-layer=new]` may also be used.
|
888
|
+
@param {string} up-drawer
|
889
|
+
The CSS selector that will be extracted from the response and displayed in a modal dialog.
|
890
|
+
@deprecated
|
891
|
+
Use `a[up-layer="new drawer"]` instead.
|
892
|
+
*/
|
893
|
+
up.migrate.targetMacro('up-drawer', { 'up-layer': 'new drawer' }, function () { return up.migrate.deprecated('a[up-drawer]', 'a[up-layer="new drawer"]'); });
|
894
|
+
|
895
|
+
|
896
|
+
/***/ }),
|
897
|
+
/* 13 */
|
898
|
+
/***/ (function() {
|
899
|
+
|
900
|
+
/*-
|
901
|
+
@module up.layer
|
902
|
+
*/
|
903
|
+
var __assign = (this && this.__assign) || function () {
|
904
|
+
__assign = Object.assign || function(t) {
|
905
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
906
|
+
s = arguments[i];
|
907
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
908
|
+
t[p] = s[p];
|
909
|
+
}
|
910
|
+
return t;
|
911
|
+
};
|
912
|
+
return __assign.apply(this, arguments);
|
913
|
+
};
|
914
|
+
var u = up.util;
|
915
|
+
var e = up.element;
|
916
|
+
up.popup = {
|
917
|
+
/*-
|
918
|
+
Attaches a popup overlay to the given element or selector.
|
919
|
+
|
920
|
+
@function up.popup.attach
|
921
|
+
@param {Element|jQuery|string} anchor
|
922
|
+
The element to which the popup will be attached.
|
923
|
+
@param {Object} [options]
|
924
|
+
See options for `up.render()`.
|
925
|
+
@return {Promise}
|
926
|
+
@deprecated
|
927
|
+
Use `up.layer.open({ origin, layer: 'popup' })` instead.
|
928
|
+
*/
|
929
|
+
attach: function (origin, options) {
|
930
|
+
if (options === void 0) { options = {}; }
|
931
|
+
origin = up.fragment.get(origin);
|
932
|
+
up.migrate.deprecated('up.popup.attach(origin)', "up.layer.open({ origin, layer: 'popup' })");
|
933
|
+
return up.layer.open(__assign(__assign({}, options), { origin: origin, layer: 'popup' }));
|
934
|
+
},
|
935
|
+
/*-
|
936
|
+
Closes a currently open overlay.
|
937
|
+
|
938
|
+
@function up.popup.close
|
939
|
+
@param {Object} options
|
940
|
+
@return {Promise}
|
941
|
+
@deprecated
|
942
|
+
Use `up.layer.dismiss()` instead.
|
943
|
+
*/
|
944
|
+
close: function (options) {
|
945
|
+
if (options === void 0) { options = {}; }
|
946
|
+
up.migrate.deprecated('up.popup.close()', 'up.layer.dismiss()');
|
947
|
+
up.layer.dismiss(null, options);
|
948
|
+
return up.migrate.formerlyAsync('up.layer.dismiss()');
|
949
|
+
},
|
950
|
+
/*-
|
951
|
+
Returns the location URL of the fragment displayed in the current overlay.
|
952
|
+
|
953
|
+
@function up.popup.url
|
954
|
+
@return {string}
|
955
|
+
@deprecated
|
956
|
+
Use `up.layer.location` instead.
|
957
|
+
*/
|
958
|
+
url: function () {
|
959
|
+
up.migrate.deprecated('up.popup.url()', 'up.layer.location');
|
960
|
+
return up.layer.location;
|
961
|
+
},
|
962
|
+
/*-
|
963
|
+
Returns the location URL of the layer behind the current overlay.
|
964
|
+
|
965
|
+
@function up.popup.coveredUrl
|
966
|
+
@return {string}
|
967
|
+
@deprecated
|
968
|
+
Use `up.layer.parent.location` instead.
|
969
|
+
*/
|
970
|
+
coveredUrl: function () {
|
971
|
+
var _a;
|
972
|
+
up.migrate.deprecated('up.popup.coveredUrl()', 'up.layer.parent.location');
|
973
|
+
return (_a = up.layer.parent) === null || _a === void 0 ? void 0 : _a.location;
|
974
|
+
},
|
975
|
+
/*-
|
976
|
+
Sets default options for future popup overlays.
|
977
|
+
|
978
|
+
@property up.popup.config
|
979
|
+
@deprecated
|
980
|
+
Use `up.layer.config.popup` instead.
|
981
|
+
*/
|
982
|
+
get config() {
|
983
|
+
up.migrate.deprecated('up.popup.config', 'up.layer.config.popup');
|
984
|
+
return up.layer.config.popup;
|
985
|
+
},
|
986
|
+
/*-
|
987
|
+
Returns whether the given element or selector is contained
|
988
|
+
within the current layer.
|
989
|
+
|
990
|
+
@function up.popup.contains
|
991
|
+
@param {string} elementOrSelector
|
992
|
+
The element to test
|
993
|
+
@return {boolean}
|
994
|
+
@deprecated
|
995
|
+
Use `up.layer.contains()` instead.
|
996
|
+
*/
|
997
|
+
contains: function (element) {
|
998
|
+
up.migrate.deprecated('up.popup.contains()', 'up.layer.contains()');
|
999
|
+
return up.layer.contains(element);
|
1000
|
+
},
|
1001
|
+
/*-
|
1002
|
+
Returns whether an overlay is currently open.
|
1003
|
+
|
1004
|
+
@function up.popup.isOpen
|
1005
|
+
@return {boolean}
|
1006
|
+
@deprecated
|
1007
|
+
Use `up.layer.isOverlay()` instead.
|
1008
|
+
*/
|
1009
|
+
isOpen: function () {
|
1010
|
+
up.migrate.deprecated('up.popup.isOpen()', 'up.layer.isOverlay()');
|
1011
|
+
return up.layer.isOverlay();
|
1012
|
+
},
|
1013
|
+
sync: function () {
|
1014
|
+
up.migrate.deprecated('up.popup.sync()', 'up.layer.sync()');
|
1015
|
+
return up.layer.sync();
|
1016
|
+
}
|
1017
|
+
};
|
1018
|
+
up.migrate.renamedEvent('up:popup:open', 'up:layer:open');
|
1019
|
+
up.migrate.renamedEvent('up:popup:opened', 'up:layer:opened');
|
1020
|
+
up.migrate.renamedEvent('up:popup:close', 'up:layer:dismiss');
|
1021
|
+
up.migrate.renamedEvent('up:popup:closed', 'up:layer:dismissed');
|
1022
|
+
up.migrate.targetMacro('up-popup', { 'up-layer': 'new popup' }, function () { return up.migrate.deprecated('[up-popup]', '[up-layer="new popup"]'); });
|
1023
|
+
|
1024
|
+
|
1025
|
+
/***/ }),
|
1026
|
+
/* 14 */
|
1027
|
+
/***/ (function() {
|
1028
|
+
|
1029
|
+
/*-
|
1030
|
+
Tooltips
|
1031
|
+
========
|
1032
|
+
|
1033
|
+
Unpoly used to come with a basic tooltip implementation.
|
1034
|
+
This feature is now deprecated.
|
1035
|
+
|
1036
|
+
@module up.tooltip
|
1037
|
+
*/
|
1038
|
+
up.macro('[up-tooltip]', function (opener) {
|
1039
|
+
up.migrate.warn('[up-tooltip] has been deprecated. A [title] was set instead.');
|
1040
|
+
up.element.setMissingAttr(opener, 'title', opener.getAttribute('up-tooltip'));
|
1041
|
+
});
|
1042
|
+
|
1043
|
+
|
1044
|
+
/***/ }),
|
1045
|
+
/* 15 */
|
1046
|
+
/***/ (function() {
|
1047
|
+
|
1048
|
+
var u = up.util;
|
1049
|
+
/*-
|
1050
|
+
@module up.network
|
1051
|
+
*/
|
1052
|
+
up.migrate.renamedPackage('proxy', 'network');
|
1053
|
+
up.migrate.renamedEvent('up:proxy:load', 'up:request:load'); // renamed in 1.0.0
|
1054
|
+
up.migrate.renamedEvent('up:proxy:received', 'up:request:loaded'); // renamed in 0.50.0
|
1055
|
+
up.migrate.renamedEvent('up:proxy:loaded', 'up:request:loaded'); // renamed in 1.0.0
|
1056
|
+
up.migrate.renamedEvent('up:proxy:fatal', 'up:request:fatal'); // renamed in 1.0.0
|
1057
|
+
up.migrate.renamedEvent('up:proxy:aborted', 'up:request:aborted'); // renamed in 1.0.0
|
1058
|
+
up.migrate.renamedEvent('up:proxy:slow', 'up:request:late'); // renamed in 1.0.0
|
1059
|
+
up.migrate.renamedEvent('up:proxy:recover', 'up:request:recover'); // renamed in 1.0.0
|
1060
|
+
var preloadDelayMoved = function () { return up.migrate.deprecated('up.proxy.config.preloadDelay', 'up.link.config.preloadDelay'); };
|
1061
|
+
Object.defineProperty(up.network.config, 'preloadDelay', {
|
1062
|
+
get: function () {
|
1063
|
+
preloadDelayMoved();
|
1064
|
+
return up.link.config.preloadDelay;
|
1065
|
+
},
|
1066
|
+
set: function (value) {
|
1067
|
+
preloadDelayMoved();
|
1068
|
+
return up.link.config.preloadDelay = value;
|
1069
|
+
}
|
1070
|
+
});
|
1071
|
+
up.migrate.renamedProperty(up.network.config, 'maxRequests', 'concurrency');
|
1072
|
+
up.migrate.renamedProperty(up.network.config, 'slowDelay', 'badResponseTime');
|
1073
|
+
up.migrate.handleRequestOptions = function (options) { return up.migrate.fixKey(options, 'data', 'params'); };
|
1074
|
+
/*-
|
1075
|
+
Makes an AJAX request to the given URL and caches the response.
|
1076
|
+
|
1077
|
+
The function returns a promise that fulfills with the response text.
|
1078
|
+
|
1079
|
+
### Example
|
1080
|
+
|
1081
|
+
```
|
1082
|
+
up.ajax('/search', { params: { query: 'sunshine' } }).then(function(text) {
|
1083
|
+
console.log('The response text is %o', text)
|
1084
|
+
}).catch(function() {
|
1085
|
+
console.error('The request failed')
|
1086
|
+
})
|
1087
|
+
```
|
1088
|
+
|
1089
|
+
@function up.ajax
|
1090
|
+
@param {string} [url]
|
1091
|
+
The URL for the request.
|
1092
|
+
|
1093
|
+
Instead of passing the URL as a string argument, you can also pass it as an `{ url }` option.
|
1094
|
+
@param {Object} [options]
|
1095
|
+
See options for `up.request()`.
|
1096
|
+
@return {Promise<string>}
|
1097
|
+
A promise for the response text.
|
1098
|
+
@deprecated
|
1099
|
+
Use `up.request()` instead.
|
1100
|
+
*/
|
1101
|
+
up.ajax = function () {
|
1102
|
+
var args = [];
|
1103
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
1104
|
+
args[_i] = arguments[_i];
|
1105
|
+
}
|
1106
|
+
up.migrate.deprecated('up.ajax()', 'up.request()');
|
1107
|
+
var pickResponseText = function (response) { return response.text; };
|
1108
|
+
return up.request.apply(up, args).then(pickResponseText);
|
1109
|
+
};
|
1110
|
+
/*-
|
1111
|
+
Removes all cache entries.
|
1112
|
+
|
1113
|
+
@function up.proxy.clear
|
1114
|
+
@deprecated
|
1115
|
+
Use `up.cache.clear()` instead.
|
1116
|
+
*/
|
1117
|
+
up.network.clear = function () {
|
1118
|
+
up.migrate.deprecated('up.proxy.clear()', 'up.cache.clear()');
|
1119
|
+
up.cache.clear();
|
1120
|
+
};
|
1121
|
+
up.network.preload = function () {
|
1122
|
+
var _a;
|
1123
|
+
var args = [];
|
1124
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
1125
|
+
args[_i] = arguments[_i];
|
1126
|
+
}
|
1127
|
+
up.migrate.deprecated('up.proxy.preload(link)', 'up.link.preload(link)');
|
1128
|
+
return (_a = up.link).preload.apply(_a, args);
|
1129
|
+
};
|
1130
|
+
/*-
|
1131
|
+
@class up.Request
|
1132
|
+
*/
|
1133
|
+
up.Request.prototype.navigate = function () {
|
1134
|
+
up.migrate.deprecated('up.Request#navigate()', 'up.Request#loadPage()');
|
1135
|
+
this.loadPage();
|
1136
|
+
};
|
1137
|
+
/*-
|
1138
|
+
@class up.Response
|
1139
|
+
*/
|
1140
|
+
/*-
|
1141
|
+
Returns whether the server responded with a 2xx HTTP status.
|
1142
|
+
|
1143
|
+
@function up.Response#isSuccess
|
1144
|
+
@return {boolean}
|
1145
|
+
@deprecated
|
1146
|
+
Use `up.Response#ok` instead.
|
1147
|
+
*/
|
1148
|
+
up.Response.prototype.isSuccess = function () {
|
1149
|
+
up.migrate.deprecated('up.Response#isSuccess()', 'up.Response#ok');
|
1150
|
+
return this.ok;
|
1151
|
+
};
|
1152
|
+
/*-
|
1153
|
+
Returns whether the response was not [successful](/up.Response.prototype.ok).
|
1154
|
+
|
1155
|
+
@function up.Response#isError
|
1156
|
+
@return {boolean}
|
1157
|
+
@deprecated
|
1158
|
+
Use `!up.Response#ok` instead.
|
1159
|
+
*/
|
1160
|
+
up.Response.prototype.isError = function () {
|
1161
|
+
up.migrate.deprecated('up.Response#isError()', '!up.Response#ok');
|
1162
|
+
return !this.ok;
|
1163
|
+
};
|
1164
|
+
function mayHaveCustomIndicator() {
|
1165
|
+
var listeners = up.EventListener.allNonDefault(document);
|
1166
|
+
return u.find(listeners, function (listener) { return listener.eventType === 'up:request:late'; });
|
1167
|
+
}
|
1168
|
+
var progressBarDefault = up.network.config.progressBar;
|
1169
|
+
function disableProgressBarIfCustomIndicator() {
|
1170
|
+
up.network.config.progressBar = function () {
|
1171
|
+
if (mayHaveCustomIndicator()) {
|
1172
|
+
up.migrate.warn('Disabled the default progress bar as may have built a custom loading indicator with your up:request:late listener. Please set up.network.config.progressBar to true or false.');
|
1173
|
+
return false;
|
1174
|
+
}
|
1175
|
+
else {
|
1176
|
+
return progressBarDefault;
|
1177
|
+
}
|
1178
|
+
};
|
1179
|
+
}
|
1180
|
+
disableProgressBarIfCustomIndicator();
|
1181
|
+
up.on('up:framework:reset', disableProgressBarIfCustomIndicator);
|
1182
|
+
|
1183
|
+
|
1184
|
+
/***/ }),
|
1185
|
+
/* 16 */
|
1186
|
+
/***/ (function() {
|
1187
|
+
|
1188
|
+
/*-
|
1189
|
+
@module up.radio
|
1190
|
+
*/
|
1191
|
+
up.migrate.renamedProperty(up.radio.config, 'hungry', 'hungrySelectors');
|
1192
|
+
|
1193
|
+
|
1194
|
+
/***/ }),
|
1195
|
+
/* 17 */
|
1196
|
+
/***/ (function() {
|
1197
|
+
|
1198
|
+
/*-
|
1199
|
+
@module up.viewport
|
1200
|
+
*/
|
1201
|
+
up.migrate.renamedPackage('layout', 'viewport');
|
1202
|
+
up.migrate.renamedProperty(up.viewport.config, 'viewports', 'viewportSelectors');
|
1203
|
+
up.migrate.renamedProperty(up.viewport.config, 'snap', 'revealSnap');
|
1204
|
+
/*-
|
1205
|
+
Returns the scrolling container for the given element.
|
1206
|
+
|
1207
|
+
Returns the [document's scrolling element](/up.viewport.root)
|
1208
|
+
if no closer viewport exists.
|
1209
|
+
|
1210
|
+
@function up.viewport.closest
|
1211
|
+
@param {string|Element|jQuery} target
|
1212
|
+
@return {Element}
|
1213
|
+
@deprecated
|
1214
|
+
Use `up.viewport.get()` instead.
|
1215
|
+
*/
|
1216
|
+
up.viewport.closest = function () {
|
1217
|
+
var _a;
|
1218
|
+
var args = [];
|
1219
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
1220
|
+
args[_i] = arguments[_i];
|
1221
|
+
}
|
1222
|
+
up.migrate.deprecated('up.viewport.closest()', 'up.viewport.get()');
|
1223
|
+
return (_a = up.viewport).get.apply(_a, args);
|
1224
|
+
};
|
1225
|
+
|
1226
|
+
|
1227
|
+
/***/ })
|
1228
|
+
/******/ ]);
|
1229
|
+
/************************************************************************/
|
1230
|
+
/******/ // The module cache
|
1231
|
+
/******/ var __webpack_module_cache__ = {};
|
1232
|
+
/******/
|
1233
|
+
/******/ // The require function
|
1234
|
+
/******/ function __webpack_require__(moduleId) {
|
1235
|
+
/******/ // Check if module is in cache
|
1236
|
+
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
1237
|
+
/******/ if (cachedModule !== undefined) {
|
1238
|
+
/******/ return cachedModule.exports;
|
1239
|
+
/******/ }
|
1240
|
+
/******/ // Create a new module (and put it into the cache)
|
1241
|
+
/******/ var module = __webpack_module_cache__[moduleId] = {
|
1242
|
+
/******/ // no module.id needed
|
1243
|
+
/******/ // no module.loaded needed
|
1244
|
+
/******/ exports: {}
|
1245
|
+
/******/ };
|
1246
|
+
/******/
|
1247
|
+
/******/ // Execute the module function
|
1248
|
+
/******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
1249
|
+
/******/
|
1250
|
+
/******/ // Return the exports of the module
|
1251
|
+
/******/ return module.exports;
|
1252
|
+
/******/ }
|
1253
|
+
/******/
|
1254
|
+
/************************************************************************/
|
1255
|
+
var __webpack_exports__ = {};
|
1256
|
+
// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
|
1257
|
+
!function() {
|
1258
|
+
// We are going to add compilers and event handlers that should not be reset during specs.
|
1259
|
+
up.framework.startExtension();
|
1260
|
+
__webpack_require__(1);
|
1261
|
+
__webpack_require__(2);
|
1262
|
+
__webpack_require__(3);
|
1263
|
+
__webpack_require__(4);
|
1264
|
+
__webpack_require__(5);
|
1265
|
+
__webpack_require__(6);
|
1266
|
+
__webpack_require__(7);
|
1267
|
+
__webpack_require__(8);
|
1268
|
+
__webpack_require__(9);
|
1269
|
+
__webpack_require__(10);
|
1270
|
+
__webpack_require__(11);
|
1271
|
+
__webpack_require__(12);
|
1272
|
+
__webpack_require__(13);
|
1273
|
+
__webpack_require__(14);
|
1274
|
+
__webpack_require__(15);
|
1275
|
+
__webpack_require__(16);
|
1276
|
+
__webpack_require__(17);
|
1277
|
+
up.framework.stopExtension();
|
1278
|
+
|
1279
|
+
}();
|
1280
|
+
/******/ })()
|
1281
|
+
;
|