unpoly-rails 2.6.1 → 2.7.1.1
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/assets/unpoly/unpoly-migrate.min.js +1 -1
- data/assets/unpoly/unpoly.css +2 -1
- data/assets/unpoly/unpoly.es5.js +55 -63
- data/assets/unpoly/unpoly.es5.min.js +1 -1
- data/assets/unpoly/unpoly.es6.js +24688 -0
- data/assets/unpoly/unpoly.js +50 -49
- data/assets/unpoly/unpoly.min.css +1 -1
- data/assets/unpoly/unpoly.min.js +1 -1
- data/lib/unpoly/rails/change.rb +8 -4
- data/lib/unpoly/rails/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ad85104cc814b313ff3bcd6654c160b3aae1cb971819bc8340f561d06dffc3fa
|
4
|
+
data.tar.gz: 985aa046d230d3fb980773758dc4cb23f01209971577c7a12a085e479cd074d1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8c42e8437a3f6ef95777de7eddd2f94b0a4fb3f200721ba7b47c8ebb7b89c228ae1d5bddd10d58652aa080730858705f27b017be59ea6109e36b1197d27a3d49
|
7
|
+
data.tar.gz: 6ddb288df58b2de7e9022e877f5087f49e536b562fe0bc65cf7d299f896755138860b42764695178c9d889984b1f42fe98c6273411ea0c7371a4bd7ef9314db6
|
@@ -1 +1 @@
|
|
1
|
-
!function(){var e={294:function(){up.browser.loadPage=function(){for(var e,r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];return up.migrate.deprecated("up.browser.loadPage","up.network.loadPage"),(e=up.network).loadPage.apply(e,r)},up.browser.isSupported=function(){for(var e,r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];return up.migrate.deprecated("up.browser.isSupported","up.framework.isSupported"),(e=up.framework).isSupported.apply(e,r)}},700:function(){up.element.first=function(){for(var e,r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];return up.migrate.deprecated("up.element.first()","up.element.get()"),(e=up.element).get.apply(e,r)},up.element.createFromHtml=function(){for(var e,r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];return up.migrate.deprecated("up.element.createFromHtml","up.element.createFromHTML"),(e=up.element).createFromHTML.apply(e,r)}},394:function(){up.migrate.renamedPackage("bus","event"),up.event.nobodyPrevents=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];up.migrate.deprecated("up.event.nobodyPrevents(type)","!up.emit(type).defaultPrevented");var t=up.emit.apply(up,e);return!t.defaultPrevented}},729:function(){up.migrate.renamedPackage("navigation","feedback"),up.migrate.renamedProperty(up.feedback.config,"navs","navSelectors")},305:function(){up.migrate.renamedProperty(up.form.config,"fields","fieldSelectors"),up.migrate.renamedProperty(up.form.config,"submitButtons","submitButtonSelectors")},354:function(){var e=this&&this.__assign||function(){return(e=Object.assign||function(e){for(var r,t=1,a=arguments.length;t<a;t++)for(var n in r=arguments[t])Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n]);return e}).apply(this,arguments)},r=up.util;up.migrate.renamedPackage("flow","fragment"),up.migrate.renamedPackage("dom","fragment"),up.migrate.renamedProperty(up.fragment.config,"fallbacks","mainTargets"),up.migrate.handleResponseDocOptions=function(e){return up.migrate.fixKey(e,"html","document")},up.replace=function(r,t,a){return up.migrate.deprecated("up.replace(target, url)","up.navigate(target, { url })"),up.navigate(e(e({},a),{target:r,url:t}))},up.extract=function(r,t,a){return up.migrate.deprecated("up.extract(target, document)","up.navigate(target, { document })"),up.navigate(e(e({},a),{target:r,document:t}))},up.fragment.first=function(){for(var e,r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];return up.migrate.deprecated("up.fragment.first()","up.fragment.get()"),(e=up.fragment).get.apply(e,r)},up.first=up.fragment.first,up.migrate.handleScrollOptions=function(e){r.isUndefined(e.scroll)&&(r.isString(e.reveal)?(up.migrate.deprecated("Option { reveal: '".concat(e.reveal,"' }"),"{ scroll: '".concat(e.reveal,"' }")),e.scroll=e.reveal):!0===e.reveal?(up.migrate.deprecated("Option { reveal: true }","{ scroll: 'target' }"),e.scroll="target"):!1===e.reveal&&(up.migrate.deprecated("Option { reveal: false }","{ scroll: false }"),e.scroll=!1),r.isDefined(e.resetScroll)&&(up.migrate.deprecated("Option { resetScroll: true }","{ scroll: 'reset' }"),e.scroll="teset"),r.isDefined(e.restoreScroll)&&(up.migrate.deprecated("Option { restoreScroll: true }","{ scroll: 'restore' }"),e.scroll="restore"))},up.migrate.handleHistoryOption=function(e){r.isString(e.history)&&"auto"!==e.history&&(up.migrate.warn("Passing a URL as { history } option is deprecated. Pass it as { location } instead."),e.location=e.history,e.history="auto")},up.migrate.preprocessRenderOptions=function(e){up.migrate.handleHistoryOption(e);for(var t=0,a=["target","origin"];t<a.length;t++){var n=a[t];r.isJQuery(e[n])&&(up.migrate.warn("Passing a jQuery collection as { %s } is deprecated. Pass it as a native element instead.",n),e[n]=up.element.get(e[n]))}}},869:function(){up.migrate.renamedProperty(up.history.config,"popTargets","restoreTargets"),up.history.url=function(){return up.migrate.deprecated("up.history.url()","up.history.location"),up.history.location},up.migrate.renamedEvent("up:history:push","up:location:changed"),up.migrate.renamedEvent("up:history:pushed","up:location:changed"),up.migrate.renamedEvent("up:history:restore","up:location:changed"),up.migrate.renamedEvent("up:history:restored","up:location:changed"),up.migrate.renamedEvent("up:history:replaced","up:location:changed")},905:function(){up.migrate.handleLayerOptions=function(e){up.migrate.fixKey(e,"flavor","mode"),up.migrate.fixKey(e,"closable","dismissable"),up.migrate.fixKey(e,"closeLabel","dismissLabel");for(var r=0,t=["width","maxWidth","height"];r<t.length;r++){var a=t[r];e[a]&&up.migrate.warn("Layer option { ".concat(a," } has been removed. Use { size } or { class } instead."))}e.sticky&&up.migrate.warn("Layer option { sticky } has been removed. Give links an [up-peel=false] attribute to prevent layer dismissal on click."),e.template&&up.migrate.warn("Layer option { template } has been removed. Use { class } or modify the layer HTML on up:layer:open."),"page"===e.layer&&(up.migrate.warn("Option { layer: 'page' } has been renamed to { layer: 'root' }."),e.layer="root"),"modal"!==e.layer&&"popup"!==e.layer||(up.migrate.warn("Option { layer: '".concat(e.layer,"' } has been removed. Did you mean { layer: 'overlay' }?")),e.layer="overlay")},up.migrate.handleTetherOptions=function(e){var r=e.position.split("-"),t=r[0],a=r[1];a&&(up.migrate.warn("The position value %o is deprecated. Use %o instead.",e.position,{position:t,align:a}),e.position=t,e.align=a)},up.migrate.registerLayerCloser=function(e){return e.registerClickCloser("up-close",(function(r,t){up.migrate.deprecated("[up-close]","[up-dismiss]"),e.dismiss(r,t)}))},up.migrate.handleLayerConfig=function(e){return up.migrate.fixKey(e,"historyVisible","history")},up.util.getter(up.Layer.prototype,"historyVisible",(function(){return up.migrate.deprecated("up.Layer#historyVisible","up.Layer#history"),this.history}))},969:function(){up.migrate.parseFollowOptions=function(e){e.string("flavor"),e.string("width"),e.string("height"),e.boolean("closable"),e.booleanOrString("reveal"),e.boolean("resetScroll"),e.boolean("restoreScroll"),e.booleanOrString("historyVisible")},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")}))},992:function(){var e=this&&this.__spreadArray||function(e,r,t){if(t||2===arguments.length)for(var a,n=0,p=r.length;n<p;n++)!a&&n in r||(a||(a=Array.prototype.slice.call(r,0,n)),a[n]=r[n]);return e.concat(a||Array.prototype.slice.call(r))},r=up.util;up.migrate=function(){var t=new up.Config((function(){return{logLevel:"warn"}})),a={};function n(e){var r=a[e];return r?(u("Event ".concat(e," has been renamed to ").concat(r)),r):e}var p={};function u(a){for(var n,u=[],o=1;o<arguments.length;o++)u[o-1]=arguments[o];var i=r.sprintf.apply(r,e([a],u,!1));p[i]||(p[i]=!0,(n=up.log)[t.logLevel].apply(n,e(["unpoly-migrate",a],u,!1)))}return up.on("up:framework:reset",(function(){t.reset()})),{deprecated:function(e,r){u("".concat(e," has been deprecated. Use ").concat(r," instead."))},renamedPackage:function(e,r){Object.defineProperty(up,e,{get:function(){return u("up.".concat(e," has been renamed to up.").concat(r)),up[r]}})},renamedProperty:function(e,r,t){var a=function(){return u("Property { %s } has been renamed to { %s } (found in %o)",r,t,e)};return Object.defineProperty(e,r,{get:function(){return a(),this[t]},set:function(e){a(),this[t]=e}})},formerlyAsync:function(e){var r=Promise.resolve(),t=r.then;return r.then=function(){return u("".concat(e," is now a sync function")),t.apply(this,arguments)},r},renamedEvent:function(e,r){a[e]=r},fixEventTypes:function(e){return r.uniq(r.map(e,n))},fixKey:function(e,t,a){r.isDefined(e[t])&&(u("Property { %s } has been renamed to { %s } (found in %o)",t,a,e),r.renameKey(e,t,a))},warn:u,loaded:!0,config:t}}()},413:function(){var e=this&&this.__assign||function(){return(e=Object.assign||function(e){for(var r,t=1,a=arguments.length;t<a;t++)for(var n in r=arguments[t])Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n]);return e}).apply(this,arguments)},r=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.");up.modal={visit:function(r,t){return void 0===t&&(t={}),up.migrate.deprecated("up.modal.visit(url)",'up.layer.open({ url, mode: "modal" })'),up.layer.open(e(e({},t),{url:r,mode:"modal"}))},follow:function(r,t){return void 0===t&&(t={}),up.migrate.deprecated("up.modal.follow(link)",'up.follow(link, { layer: "modal" })'),up.follow(r,e(e({},t),{layer:"modal"}))},extract:function(r,t,a){return void 0===a&&(a={}),up.migrate.deprecated("up.modal.extract(target, document)",'up.layer.open({ document, mode: "modal" })'),up.layer.open(e(e({},a),{target:r,html:t,layer:"modal"}))},close:function(e){return void 0===e&&(e={}),up.migrate.deprecated("up.modal.close()","up.layer.dismiss()"),up.layer.dismiss(null,e),up.migrate.formerlyAsync("up.layer.dismiss()")},url:function(){return up.migrate.deprecated("up.modal.url()","up.layer.location"),up.layer.location},coveredUrl:function(){var e;return up.migrate.deprecated("up.modal.coveredUrl()","up.layer.parent.location"),null===(e=up.layer.parent)||void 0===e?void 0:e.location},get config(){return up.migrate.deprecated("up.modal.config","up.layer.config.modal"),up.layer.config.modal},contains:function(e){return up.migrate.deprecated("up.modal.contains()","up.layer.contains()"),up.layer.contains(e)},isOpen:function(){return up.migrate.deprecated("up.modal.isOpen()","up.layer.isOverlay()"),up.layer.isOverlay()},get flavors(){throw r},flavor:function(){throw r}},up.migrate.renamedEvent("up:modal:open","up:layer:open"),up.migrate.renamedEvent("up:modal:opened","up:layer:opened"),up.migrate.renamedEvent("up:modal:close","up:layer:dismiss"),up.migrate.renamedEvent("up:modal:closed","up:layer:dismissed"),up.migrate.targetMacro("up-modal",{"up-layer":"new modal"},(function(){return up.migrate.deprecated("a[up-modal]",'a[up-layer="new modal"]')})),up.migrate.targetMacro("up-drawer",{"up-layer":"new drawer"},(function(){return up.migrate.deprecated("a[up-drawer]",'a[up-layer="new drawer"]')}))},885:function(){var e=up.util;up.migrate.renamedPackage("proxy","network"),up.migrate.renamedEvent("up:proxy:load","up:request:load"),up.migrate.renamedEvent("up:proxy:received","up:request:loaded"),up.migrate.renamedEvent("up:proxy:loaded","up:request:loaded"),up.migrate.renamedEvent("up:proxy:fatal","up:request:fatal"),up.migrate.renamedEvent("up:proxy:aborted","up:request:aborted"),up.migrate.renamedEvent("up:proxy:slow","up:request:late"),up.migrate.renamedEvent("up:proxy:recover","up:request:recover");var r=function(){return up.migrate.deprecated("up.proxy.config.preloadDelay","up.link.config.preloadDelay")};Object.defineProperty(up.network.config,"preloadDelay",{get:function(){return r(),up.link.config.preloadDelay},set:function(e){r(),up.link.config.preloadDelay=e}}),up.migrate.renamedProperty(up.network.config,"maxRequests","concurrency"),up.migrate.renamedProperty(up.network.config,"slowDelay","badResponseTime"),up.migrate.handleRequestOptions=function(e){return up.migrate.fixKey(e,"data","params")},up.ajax=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];up.migrate.deprecated("up.ajax()","up.request()");var t=function(e){return e.text};return up.request.apply(up,e).then(t)},up.network.clear=function(){up.migrate.deprecated("up.proxy.clear()","up.cache.clear()"),up.cache.clear()},up.network.preload=function(){for(var e,r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];return up.migrate.deprecated("up.proxy.preload(link)","up.link.preload(link)"),(e=up.link).preload.apply(e,r)},up.Request.prototype.navigate=function(){up.migrate.deprecated("up.Request#navigate()","up.Request#loadPage()"),this.loadPage()},up.Response.prototype.isSuccess=function(){return up.migrate.deprecated("up.Response#isSuccess()","up.Response#ok"),this.ok},up.Response.prototype.isError=function(){return up.migrate.deprecated("up.Response#isError()","!up.Response#ok"),!this.ok};var t=up.network.config.progressBar;function a(){up.network.config.progressBar=function(){return r=up.EventListener.allNonDefault(document),e.find(r,(function(e){return"up:request:late"===e.eventType}))?(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."),!1):t;var r}}a(),up.on("up:framework:reset",a)},69:function(){var e=this&&this.__assign||function(){return(e=Object.assign||function(e){for(var r,t=1,a=arguments.length;t<a;t++)for(var n in r=arguments[t])Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n]);return e}).apply(this,arguments)};up.popup={attach:function(r,t){return void 0===t&&(t={}),r=up.fragment.get(r),up.migrate.deprecated("up.popup.attach(origin)","up.layer.open({ origin, layer: 'popup' })"),up.layer.open(e(e({},t),{origin:r,layer:"popup"}))},close:function(e){return void 0===e&&(e={}),up.migrate.deprecated("up.popup.close()","up.layer.dismiss()"),up.layer.dismiss(null,e),up.migrate.formerlyAsync("up.layer.dismiss()")},url:function(){return up.migrate.deprecated("up.popup.url()","up.layer.location"),up.layer.location},coveredUrl:function(){var e;return up.migrate.deprecated("up.popup.coveredUrl()","up.layer.parent.location"),null===(e=up.layer.parent)||void 0===e?void 0:e.location},get config(){return up.migrate.deprecated("up.popup.config","up.layer.config.popup"),up.layer.config.popup},contains:function(e){return up.migrate.deprecated("up.popup.contains()","up.layer.contains()"),up.layer.contains(e)},isOpen:function(){return up.migrate.deprecated("up.popup.isOpen()","up.layer.isOverlay()"),up.layer.isOverlay()},sync:function(){return up.migrate.deprecated("up.popup.sync()","up.layer.sync()"),up.layer.sync()}},up.migrate.renamedEvent("up:popup:open","up:layer:open"),up.migrate.renamedEvent("up:popup:opened","up:layer:opened"),up.migrate.renamedEvent("up:popup:close","up:layer:dismiss"),up.migrate.renamedEvent("up:popup:closed","up:layer:dismissed"),up.migrate.targetMacro("up-popup",{"up-layer":"new popup"},(function(){return up.migrate.deprecated("[up-popup]",'[up-layer="new popup"]')}))},228:function(){up.migrate.renamedProperty(up.radio.config,"hungry","hungrySelectors")},629:function(){var e=up.util,r=up.element;up.migrate.postCompile=function(r,t){var a;if(a=t.keep){up.migrate.warn("The { keep: true } option for up.compiler() has been removed. Have the compiler set [up-keep] attribute instead.");for(var n=e.isString(a)?a:"",p=0,u=r;p<u.length;p++)u[p].setAttribute("up-keep",n)}},up.migrate.targetMacro=function(t,a,n){up.macro("[".concat(t,"]"),(function(p){var u,o=e.copy(a);(u=p.getAttribute(t))?o["up-target"]=u:o["up-follow"]="",r.setMissingAttrs(p,o),p.removeAttribute(t),null==n||n()}))}},197:function(){up.macro("[up-tooltip]",(function(e){up.migrate.warn("[up-tooltip] has been deprecated. A [title] was set instead."),up.element.setMissingAttr(e,"title",e.getAttribute("up-tooltip"))}))},480:function(){up.util.only=function(e){for(var r=[],t=1;t<arguments.length;t++)r[t-1]=arguments[t];return up.migrate.deprecated("up.util.only(object, ...keys)","up.util.pick(object, keys)"),up.util.pick(e,r)},up.util.except=function(e){for(var r=[],t=1;t<arguments.length;t++)r[t-1]=arguments[t];return up.migrate.deprecated("up.util.except(object, ...keys)","up.util.omit(object, keys)"),up.util.omit(e,r)},up.util.parseUrl=function(){for(var e,r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];return up.migrate.warn("up.util.parseUrl() has been renamed to up.util.parseURL()"),(e=up.util).parseURL.apply(e,r)},up.util.any=function(){for(var e,r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];return up.migrate.warn("up.util.any() has been renamed to up.util.some()"),(e=up.util).some.apply(e,r)},up.util.all=function(){for(var e,r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];return up.migrate.warn("up.util.all() has been renamed to up.util.every()"),(e=up.util).every.apply(e,r)},up.util.detect=function(){for(var e,r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];return up.migrate.warn("up.util.detect() has been renamed to up.util.find()"),(e=up.util).find.apply(e,r)},up.util.select=function(){for(var e,r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];return up.migrate.warn("up.util.select() has been renamed to up.util.filter()"),(e=up.util).filter.apply(e,r)},up.util.setTimer=function(){for(var e,r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];return up.migrate.warn("up.util.setTimer() has been renamed to up.util.timer()"),(e=up.util).timer.apply(e,r)},up.util.escapeHtml=function(){for(var e,r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];return up.migrate.deprecated("up.util.escapeHtml","up.util.escapeHTML"),(e=up.util).escapeHTML.apply(e,r)},up.util.selectorForElement=function(){for(var e,r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];return up.migrate.warn("up.util.selectorForElement() has been renamed to up.fragment.toTarget()"),(e=up.fragment).toTarget.apply(e,r)},up.util.nextFrame=function(){for(var e,r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];return up.migrate.warn("up.util.nextFrame() has been renamed to up.util.task()"),(e=up.util).task.apply(e,r)},up.util.times=function(e,r){for(var t=0;t<e;t++)r()}},338:function(){up.migrate.renamedPackage("layout","viewport"),up.migrate.renamedProperty(up.viewport.config,"viewports","viewportSelectors"),up.migrate.renamedProperty(up.viewport.config,"snap","revealSnap"),up.viewport.closest=function(){for(var e,r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];return up.migrate.deprecated("up.viewport.closest()","up.viewport.get()"),(e=up.viewport).get.apply(e,r)}}},r={};function t(a){var n=r[a];if(void 0!==n)return n.exports;var p=r[a]={exports:{}};return e[a].call(p.exports,p,p.exports,t),p.exports}up.framework.startExtension(),t(992),t(480),t(294),t(700),t(394),t(629),t(305),t(354),t(869),t(729),t(969),t(905),t(413),t(69),t(197),t(885),t(228),t(338),up.framework.stopExtension()}();
|
1
|
+
!function(){var e={294:function(){up.browser.loadPage=function(){for(var e,r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];return up.migrate.deprecated("up.browser.loadPage","up.network.loadPage"),(e=up.network).loadPage.apply(e,r)},up.browser.isSupported=function(){for(var e,r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];return up.migrate.deprecated("up.browser.isSupported","up.framework.isSupported"),(e=up.framework).isSupported.apply(e,r)}},700:function(){up.element.first=function(){for(var e,r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];return up.migrate.deprecated("up.element.first()","up.element.get()"),(e=up.element).get.apply(e,r)},up.element.createFromHtml=function(){for(var e,r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];return up.migrate.deprecated("up.element.createFromHtml","up.element.createFromHTML"),(e=up.element).createFromHTML.apply(e,r)}},394:function(){up.migrate.renamedPackage("bus","event"),up.event.nobodyPrevents=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];up.migrate.deprecated("up.event.nobodyPrevents(type)","!up.emit(type).defaultPrevented");var t=up.emit.apply(up,e);return!t.defaultPrevented}},729:function(){up.migrate.renamedPackage("navigation","feedback"),up.migrate.renamedProperty(up.feedback.config,"navs","navSelectors")},305:function(){up.migrate.renamedProperty(up.form.config,"fields","fieldSelectors"),up.migrate.renamedProperty(up.form.config,"submitButtons","submitButtonSelectors")},354:function(){var e=this&&this.__assign||function(){return e=Object.assign||function(e){for(var r,t=1,a=arguments.length;t<a;t++)for(var n in r=arguments[t])Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n]);return e},e.apply(this,arguments)},r=up.util;up.migrate.renamedPackage("flow","fragment"),up.migrate.renamedPackage("dom","fragment"),up.migrate.renamedProperty(up.fragment.config,"fallbacks","mainTargets"),up.migrate.handleResponseDocOptions=function(e){return up.migrate.fixKey(e,"html","document")},up.replace=function(r,t,a){return up.migrate.deprecated("up.replace(target, url)","up.navigate(target, { url })"),up.navigate(e(e({},a),{target:r,url:t}))},up.extract=function(r,t,a){return up.migrate.deprecated("up.extract(target, document)","up.navigate(target, { document })"),up.navigate(e(e({},a),{target:r,document:t}))},up.fragment.first=function(){for(var e,r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];return up.migrate.deprecated("up.fragment.first()","up.fragment.get()"),(e=up.fragment).get.apply(e,r)},up.first=up.fragment.first,up.migrate.handleScrollOptions=function(e){r.isUndefined(e.scroll)&&(r.isString(e.reveal)?(up.migrate.deprecated("Option { reveal: '".concat(e.reveal,"' }"),"{ scroll: '".concat(e.reveal,"' }")),e.scroll=e.reveal):!0===e.reveal?(up.migrate.deprecated("Option { reveal: true }","{ scroll: 'target' }"),e.scroll="target"):!1===e.reveal&&(up.migrate.deprecated("Option { reveal: false }","{ scroll: false }"),e.scroll=!1),r.isDefined(e.resetScroll)&&(up.migrate.deprecated("Option { resetScroll: true }","{ scroll: 'reset' }"),e.scroll="teset"),r.isDefined(e.restoreScroll)&&(up.migrate.deprecated("Option { restoreScroll: true }","{ scroll: 'restore' }"),e.scroll="restore"))},up.migrate.handleHistoryOption=function(e){r.isString(e.history)&&"auto"!==e.history&&(up.migrate.warn("Passing a URL as { history } option is deprecated. Pass it as { location } instead."),e.location=e.history,e.history="auto")},up.migrate.preprocessRenderOptions=function(e){up.migrate.handleHistoryOption(e);for(var t=0,a=["target","origin"];t<a.length;t++){var n=a[t];r.isJQuery(e[n])&&(up.migrate.warn("Passing a jQuery collection as { %s } is deprecated. Pass it as a native element instead.",n),e[n]=up.element.get(e[n]))}}},869:function(){up.migrate.renamedProperty(up.history.config,"popTargets","restoreTargets"),up.history.url=function(){return up.migrate.deprecated("up.history.url()","up.history.location"),up.history.location},up.migrate.renamedEvent("up:history:push","up:location:changed"),up.migrate.renamedEvent("up:history:pushed","up:location:changed"),up.migrate.renamedEvent("up:history:restore","up:location:changed"),up.migrate.renamedEvent("up:history:restored","up:location:changed"),up.migrate.renamedEvent("up:history:replaced","up:location:changed")},905:function(){up.migrate.handleLayerOptions=function(e){up.migrate.fixKey(e,"flavor","mode"),up.migrate.fixKey(e,"closable","dismissable"),up.migrate.fixKey(e,"closeLabel","dismissLabel");for(var r=0,t=["width","maxWidth","height"];r<t.length;r++){var a=t[r];e[a]&&up.migrate.warn("Layer option { ".concat(a," } has been removed. Use { size } or { class } instead."))}e.sticky&&up.migrate.warn("Layer option { sticky } has been removed. Give links an [up-peel=false] attribute to prevent layer dismissal on click."),e.template&&up.migrate.warn("Layer option { template } has been removed. Use { class } or modify the layer HTML on up:layer:open."),"page"===e.layer&&(up.migrate.warn("Option { layer: 'page' } has been renamed to { layer: 'root' }."),e.layer="root"),"modal"!==e.layer&&"popup"!==e.layer||(up.migrate.warn("Option { layer: '".concat(e.layer,"' } has been removed. Did you mean { layer: 'overlay' }?")),e.layer="overlay")},up.migrate.handleTetherOptions=function(e){var r=e.position.split("-"),t=r[0],a=r[1];a&&(up.migrate.warn("The position value %o is deprecated. Use %o instead.",e.position,{position:t,align:a}),e.position=t,e.align=a)},up.migrate.registerLayerCloser=function(e){return e.registerClickCloser("up-close",(function(r,t){up.migrate.deprecated("[up-close]","[up-dismiss]"),e.dismiss(r,t)}))},up.migrate.handleLayerConfig=function(e){return up.migrate.fixKey(e,"historyVisible","history")},up.util.getter(up.Layer.prototype,"historyVisible",(function(){return up.migrate.deprecated("up.Layer#historyVisible","up.Layer#history"),this.history}))},969:function(){up.migrate.parseFollowOptions=function(e){e.string("flavor"),e.string("width"),e.string("height"),e.boolean("closable"),e.booleanOrString("reveal"),e.boolean("resetScroll"),e.boolean("restoreScroll"),e.booleanOrString("historyVisible")},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")}))},992:function(){var e=this&&this.__spreadArray||function(e,r,t){if(t||2===arguments.length)for(var a,n=0,p=r.length;n<p;n++)!a&&n in r||(a||(a=Array.prototype.slice.call(r,0,n)),a[n]=r[n]);return e.concat(a||Array.prototype.slice.call(r))},r=up.util;up.migrate=function(){var t=new up.Config((function(){return{logLevel:"warn"}})),a={};function n(e){var r=a[e];return r?(u("Event ".concat(e," has been renamed to ").concat(r)),r):e}var p={};function u(a){for(var n,u=[],o=1;o<arguments.length;o++)u[o-1]=arguments[o];var i=r.sprintf.apply(r,e([a],u,!1));p[i]||(p[i]=!0,(n=up.log)[t.logLevel].apply(n,e(["unpoly-migrate",a],u,!1)))}return up.on("up:framework:reset",(function(){t.reset()})),{deprecated:function(e,r){u("".concat(e," has been deprecated. Use ").concat(r," instead."))},renamedPackage:function(e,r){Object.defineProperty(up,e,{get:function(){return u("up.".concat(e," has been renamed to up.").concat(r)),up[r]}})},renamedProperty:function(e,r,t){var a=function(){return u("Property { %s } has been renamed to { %s } (found in %o)",r,t,e)};return Object.defineProperty(e,r,{get:function(){return a(),this[t]},set:function(e){a(),this[t]=e}})},formerlyAsync:function(e){var r=Promise.resolve(),t=r.then;return r.then=function(){return u("".concat(e," is now a sync function")),t.apply(this,arguments)},r},renamedEvent:function(e,r){a[e]=r},fixEventTypes:function(e){return r.uniq(r.map(e,n))},fixKey:function(e,t,a){r.isDefined(e[t])&&(u("Property { %s } has been renamed to { %s } (found in %o)",t,a,e),r.renameKey(e,t,a))},warn:u,loaded:!0,config:t}}()},413:function(){var e=this&&this.__assign||function(){return e=Object.assign||function(e){for(var r,t=1,a=arguments.length;t<a;t++)for(var n in r=arguments[t])Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n]);return e},e.apply(this,arguments)},r=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.");up.modal={visit:function(r,t){return void 0===t&&(t={}),up.migrate.deprecated("up.modal.visit(url)",'up.layer.open({ url, mode: "modal" })'),up.layer.open(e(e({},t),{url:r,mode:"modal"}))},follow:function(r,t){return void 0===t&&(t={}),up.migrate.deprecated("up.modal.follow(link)",'up.follow(link, { layer: "modal" })'),up.follow(r,e(e({},t),{layer:"modal"}))},extract:function(r,t,a){return void 0===a&&(a={}),up.migrate.deprecated("up.modal.extract(target, document)",'up.layer.open({ document, mode: "modal" })'),up.layer.open(e(e({},a),{target:r,html:t,layer:"modal"}))},close:function(e){return void 0===e&&(e={}),up.migrate.deprecated("up.modal.close()","up.layer.dismiss()"),up.layer.dismiss(null,e),up.migrate.formerlyAsync("up.layer.dismiss()")},url:function(){return up.migrate.deprecated("up.modal.url()","up.layer.location"),up.layer.location},coveredUrl:function(){var e;return up.migrate.deprecated("up.modal.coveredUrl()","up.layer.parent.location"),null===(e=up.layer.parent)||void 0===e?void 0:e.location},get config(){return up.migrate.deprecated("up.modal.config","up.layer.config.modal"),up.layer.config.modal},contains:function(e){return up.migrate.deprecated("up.modal.contains()","up.layer.contains()"),up.layer.contains(e)},isOpen:function(){return up.migrate.deprecated("up.modal.isOpen()","up.layer.isOverlay()"),up.layer.isOverlay()},get flavors(){throw r},flavor:function(){throw r}},up.migrate.renamedEvent("up:modal:open","up:layer:open"),up.migrate.renamedEvent("up:modal:opened","up:layer:opened"),up.migrate.renamedEvent("up:modal:close","up:layer:dismiss"),up.migrate.renamedEvent("up:modal:closed","up:layer:dismissed"),up.migrate.targetMacro("up-modal",{"up-layer":"new modal"},(function(){return up.migrate.deprecated("a[up-modal]",'a[up-layer="new modal"]')})),up.migrate.targetMacro("up-drawer",{"up-layer":"new drawer"},(function(){return up.migrate.deprecated("a[up-drawer]",'a[up-layer="new drawer"]')}))},885:function(){var e=up.util;up.migrate.renamedPackage("proxy","network"),up.migrate.renamedEvent("up:proxy:load","up:request:load"),up.migrate.renamedEvent("up:proxy:received","up:request:loaded"),up.migrate.renamedEvent("up:proxy:loaded","up:request:loaded"),up.migrate.renamedEvent("up:proxy:fatal","up:request:fatal"),up.migrate.renamedEvent("up:proxy:aborted","up:request:aborted"),up.migrate.renamedEvent("up:proxy:slow","up:request:late"),up.migrate.renamedEvent("up:proxy:recover","up:request:recover");var r=function(){return up.migrate.deprecated("up.proxy.config.preloadDelay","up.link.config.preloadDelay")};Object.defineProperty(up.network.config,"preloadDelay",{get:function(){return r(),up.link.config.preloadDelay},set:function(e){r(),up.link.config.preloadDelay=e}}),up.migrate.renamedProperty(up.network.config,"maxRequests","concurrency"),up.migrate.renamedProperty(up.network.config,"slowDelay","badResponseTime"),up.migrate.handleRequestOptions=function(e){return up.migrate.fixKey(e,"data","params")},up.ajax=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];up.migrate.deprecated("up.ajax()","up.request()");var t=function(e){return e.text};return up.request.apply(up,e).then(t)},up.network.clear=function(){up.migrate.deprecated("up.proxy.clear()","up.cache.clear()"),up.cache.clear()},up.network.preload=function(){for(var e,r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];return up.migrate.deprecated("up.proxy.preload(link)","up.link.preload(link)"),(e=up.link).preload.apply(e,r)},up.Request.prototype.navigate=function(){up.migrate.deprecated("up.Request#navigate()","up.Request#loadPage()"),this.loadPage()},up.Response.prototype.isSuccess=function(){return up.migrate.deprecated("up.Response#isSuccess()","up.Response#ok"),this.ok},up.Response.prototype.isError=function(){return up.migrate.deprecated("up.Response#isError()","!up.Response#ok"),!this.ok};var t=up.network.config.progressBar;function a(){up.network.config.progressBar=function(){return r=up.EventListener.allNonDefault(document),e.find(r,(function(e){return"up:request:late"===e.eventType}))?(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."),!1):t;var r}}a(),up.on("up:framework:reset",a)},69:function(){var e=this&&this.__assign||function(){return e=Object.assign||function(e){for(var r,t=1,a=arguments.length;t<a;t++)for(var n in r=arguments[t])Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n]);return e},e.apply(this,arguments)};up.popup={attach:function(r,t){return void 0===t&&(t={}),r=up.fragment.get(r),up.migrate.deprecated("up.popup.attach(origin)","up.layer.open({ origin, layer: 'popup' })"),up.layer.open(e(e({},t),{origin:r,layer:"popup"}))},close:function(e){return void 0===e&&(e={}),up.migrate.deprecated("up.popup.close()","up.layer.dismiss()"),up.layer.dismiss(null,e),up.migrate.formerlyAsync("up.layer.dismiss()")},url:function(){return up.migrate.deprecated("up.popup.url()","up.layer.location"),up.layer.location},coveredUrl:function(){var e;return up.migrate.deprecated("up.popup.coveredUrl()","up.layer.parent.location"),null===(e=up.layer.parent)||void 0===e?void 0:e.location},get config(){return up.migrate.deprecated("up.popup.config","up.layer.config.popup"),up.layer.config.popup},contains:function(e){return up.migrate.deprecated("up.popup.contains()","up.layer.contains()"),up.layer.contains(e)},isOpen:function(){return up.migrate.deprecated("up.popup.isOpen()","up.layer.isOverlay()"),up.layer.isOverlay()},sync:function(){return up.migrate.deprecated("up.popup.sync()","up.layer.sync()"),up.layer.sync()}},up.migrate.renamedEvent("up:popup:open","up:layer:open"),up.migrate.renamedEvent("up:popup:opened","up:layer:opened"),up.migrate.renamedEvent("up:popup:close","up:layer:dismiss"),up.migrate.renamedEvent("up:popup:closed","up:layer:dismissed"),up.migrate.targetMacro("up-popup",{"up-layer":"new popup"},(function(){return up.migrate.deprecated("[up-popup]",'[up-layer="new popup"]')}))},228:function(){up.migrate.renamedProperty(up.radio.config,"hungry","hungrySelectors")},629:function(){var e=up.util,r=up.element;up.migrate.postCompile=function(r,t){var a;if(a=t.keep){up.migrate.warn("The { keep: true } option for up.compiler() has been removed. Have the compiler set [up-keep] attribute instead.");for(var n=e.isString(a)?a:"",p=0,u=r;p<u.length;p++)u[p].setAttribute("up-keep",n)}},up.migrate.targetMacro=function(t,a,n){up.macro("[".concat(t,"]"),(function(p){var u,o=e.copy(a);(u=p.getAttribute(t))?o["up-target"]=u:o["up-follow"]="",r.setMissingAttrs(p,o),p.removeAttribute(t),null==n||n()}))}},197:function(){up.macro("[up-tooltip]",(function(e){up.migrate.warn("[up-tooltip] has been deprecated. A [title] was set instead."),up.element.setMissingAttr(e,"title",e.getAttribute("up-tooltip"))}))},480:function(){up.util.only=function(e){for(var r=[],t=1;t<arguments.length;t++)r[t-1]=arguments[t];return up.migrate.deprecated("up.util.only(object, ...keys)","up.util.pick(object, keys)"),up.util.pick(e,r)},up.util.except=function(e){for(var r=[],t=1;t<arguments.length;t++)r[t-1]=arguments[t];return up.migrate.deprecated("up.util.except(object, ...keys)","up.util.omit(object, keys)"),up.util.omit(e,r)},up.util.parseUrl=function(){for(var e,r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];return up.migrate.warn("up.util.parseUrl() has been renamed to up.util.parseURL()"),(e=up.util).parseURL.apply(e,r)},up.util.any=function(){for(var e,r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];return up.migrate.warn("up.util.any() has been renamed to up.util.some()"),(e=up.util).some.apply(e,r)},up.util.all=function(){for(var e,r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];return up.migrate.warn("up.util.all() has been renamed to up.util.every()"),(e=up.util).every.apply(e,r)},up.util.detect=function(){for(var e,r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];return up.migrate.warn("up.util.detect() has been renamed to up.util.find()"),(e=up.util).find.apply(e,r)},up.util.select=function(){for(var e,r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];return up.migrate.warn("up.util.select() has been renamed to up.util.filter()"),(e=up.util).filter.apply(e,r)},up.util.setTimer=function(){for(var e,r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];return up.migrate.warn("up.util.setTimer() has been renamed to up.util.timer()"),(e=up.util).timer.apply(e,r)},up.util.escapeHtml=function(){for(var e,r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];return up.migrate.deprecated("up.util.escapeHtml","up.util.escapeHTML"),(e=up.util).escapeHTML.apply(e,r)},up.util.selectorForElement=function(){for(var e,r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];return up.migrate.warn("up.util.selectorForElement() has been renamed to up.fragment.toTarget()"),(e=up.fragment).toTarget.apply(e,r)},up.util.nextFrame=function(){for(var e,r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];return up.migrate.warn("up.util.nextFrame() has been renamed to up.util.task()"),(e=up.util).task.apply(e,r)},up.util.times=function(e,r){for(var t=0;t<e;t++)r()}},338:function(){up.migrate.renamedPackage("layout","viewport"),up.migrate.renamedProperty(up.viewport.config,"viewports","viewportSelectors"),up.migrate.renamedProperty(up.viewport.config,"snap","revealSnap"),up.viewport.closest=function(){for(var e,r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];return up.migrate.deprecated("up.viewport.closest()","up.viewport.get()"),(e=up.viewport).get.apply(e,r)}}},r={};function t(a){var n=r[a];if(void 0!==n)return n.exports;var p=r[a]={exports:{}};return e[a].call(p.exports,p,p.exports,t),p.exports}up.framework.startExtension(),t(992),t(480),t(294),t(700),t(394),t(629),t(305),t(354),t(869),t(729),t(969),t(905),t(413),t(69),t(197),t(885),t(228),t(338),up.framework.stopExtension()}();
|
data/assets/unpoly/unpoly.css
CHANGED
data/assets/unpoly/unpoly.es5.js
CHANGED
@@ -8,7 +8,7 @@
|
|
8
8
|
@module up
|
9
9
|
*/
|
10
10
|
window.up = {
|
11
|
-
version: '2.
|
11
|
+
version: '2.7.1'
|
12
12
|
};
|
13
13
|
|
14
14
|
|
@@ -3748,15 +3748,6 @@ up.Config = /** @class */ (function () {
|
|
3748
3748
|
/* 11 */
|
3749
3749
|
/***/ (function() {
|
3750
3750
|
|
3751
|
-
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
3752
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
3753
|
-
if (ar || !(i in from)) {
|
3754
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
3755
|
-
ar[i] = from[i];
|
3756
|
-
}
|
3757
|
-
}
|
3758
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
3759
|
-
};
|
3760
3751
|
var u = up.util;
|
3761
3752
|
/*-
|
3762
3753
|
@class up.Cache
|
@@ -3771,8 +3762,6 @@ up.Cache = /** @class */ (function () {
|
|
3771
3762
|
@param {number|Function(): number} [config.expiry]
|
3772
3763
|
The number of milliseconds after which a cache entry
|
3773
3764
|
will be discarded.
|
3774
|
-
@param {string} [config.logPrefix]
|
3775
|
-
A prefix for log entries printed by this cache object.
|
3776
3765
|
@param {Function(entry): string} [config.key]
|
3777
3766
|
A function that takes an argument and returns a string key
|
3778
3767
|
for storage. If omitted, `toString()` is called on the argument.
|
@@ -3810,16 +3799,6 @@ up.Cache = /** @class */ (function () {
|
|
3810
3799
|
Cache.prototype.clear = function () {
|
3811
3800
|
this.store.clear();
|
3812
3801
|
};
|
3813
|
-
Cache.prototype.log = function () {
|
3814
|
-
var args = [];
|
3815
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
3816
|
-
args[_i] = arguments[_i];
|
3817
|
-
}
|
3818
|
-
if (this.config.logPrefix) {
|
3819
|
-
args[0] = "[".concat(this.config.logPrefix, "] ").concat(args[0]);
|
3820
|
-
up.puts.apply(up, __spreadArray(['up.Cache'], args, false));
|
3821
|
-
}
|
3822
|
-
};
|
3823
3802
|
Cache.prototype.keys = function () {
|
3824
3803
|
return this.store.keys();
|
3825
3804
|
};
|
@@ -3884,29 +3863,17 @@ up.Cache = /** @class */ (function () {
|
|
3884
3863
|
return true;
|
3885
3864
|
}
|
3886
3865
|
};
|
3887
|
-
Cache.prototype.get = function (key
|
3888
|
-
if (options === void 0) { options = {}; }
|
3866
|
+
Cache.prototype.get = function (key) {
|
3889
3867
|
var storeKey = this.normalizeStoreKey(key);
|
3890
3868
|
var entry = this.store.get(storeKey);
|
3891
3869
|
if (entry) {
|
3892
3870
|
if (this.isFresh(entry)) {
|
3893
|
-
if (!options.silent) {
|
3894
|
-
this.log("Cache hit for '%s'", key);
|
3895
|
-
}
|
3896
3871
|
return entry.value;
|
3897
3872
|
}
|
3898
3873
|
else {
|
3899
|
-
if (!options.silent) {
|
3900
|
-
this.log("Discarding stale cache entry for '%s'", key);
|
3901
|
-
}
|
3902
3874
|
this.remove(key);
|
3903
3875
|
}
|
3904
3876
|
}
|
3905
|
-
else {
|
3906
|
-
if (!options.silent) {
|
3907
|
-
this.log("Cache miss for '%s'", key);
|
3908
|
-
}
|
3909
|
-
}
|
3910
3877
|
};
|
3911
3878
|
return Cache;
|
3912
3879
|
}());
|
@@ -5071,10 +5038,13 @@ up.Change.CloseLayer = /** @class */ (function (_super) {
|
|
5071
5038
|
};
|
5072
5039
|
CloseLayer.prototype.emitCloseEvent = function () {
|
5073
5040
|
// The close event is emitted on the layer that is about to close.
|
5074
|
-
|
5041
|
+
var event = this.layer.emit(this.buildEvent("up:layer:".concat(this.verb)), {
|
5075
5042
|
callback: this.layer.callback("on".concat(u.upperCaseFirst(this.verb))),
|
5076
5043
|
log: ["Will ".concat(this.verb, " ").concat(this.layer, " with value %o"), this.value]
|
5077
5044
|
});
|
5045
|
+
// Allow an event listener to replace event.value with a new value.
|
5046
|
+
this.value = event.value;
|
5047
|
+
return event;
|
5078
5048
|
};
|
5079
5049
|
CloseLayer.prototype.emitClosedEvent = function (formerParent) {
|
5080
5050
|
var verbPast = "".concat(this.verb, "ed");
|
@@ -7652,7 +7622,7 @@ up.Layer = /** @class */ (function (_super) {
|
|
7652
7622
|
}
|
7653
7623
|
},
|
7654
7624
|
set: function (location) {
|
7655
|
-
var previousLocation = this.
|
7625
|
+
var previousLocation = this.location;
|
7656
7626
|
location = up.history.normalizeURL(location);
|
7657
7627
|
if (previousLocation !== location) {
|
7658
7628
|
this.savedLocation = location;
|
@@ -10632,6 +10602,23 @@ up.Request = /** @class */ (function (_super) {
|
|
10632
10602
|
'onQueued'
|
10633
10603
|
];
|
10634
10604
|
};
|
10605
|
+
Object.defineProperty(Request.prototype, "xhr", {
|
10606
|
+
/*-
|
10607
|
+
Returns the underlying `XMLHttpRequest` instance.
|
10608
|
+
|
10609
|
+
@property up.Request#xhr
|
10610
|
+
@param {XMLHttpRequest} xhr
|
10611
|
+
@stable
|
10612
|
+
*/
|
10613
|
+
get: function () {
|
10614
|
+
var _a;
|
10615
|
+
// Initialize the xhr request on first access,
|
10616
|
+
// so listeners on up:request:send events have a chance to access the xhr.
|
10617
|
+
return (_a = this._xhr) !== null && _a !== void 0 ? _a : (this._xhr = new XMLHttpRequest());
|
10618
|
+
},
|
10619
|
+
enumerable: false,
|
10620
|
+
configurable: true
|
10621
|
+
});
|
10635
10622
|
Request.prototype.followState = function (sourceRequest) {
|
10636
10623
|
u.delegate(this, ['deferred', 'state', 'preload'], function () { return sourceRequest; });
|
10637
10624
|
};
|
@@ -10713,7 +10700,7 @@ up.Request = /** @class */ (function (_super) {
|
|
10713
10700
|
}
|
10714
10701
|
this.state = 'loading';
|
10715
10702
|
// Convert from XHR's callback-based API to up.Request's promise-based API
|
10716
|
-
|
10703
|
+
new up.Request.XHRRenderer(this).buildAndSend({
|
10717
10704
|
onload: function () { return _this.onXHRLoad(); },
|
10718
10705
|
onerror: function () { return _this.onXHRError(); },
|
10719
10706
|
ontimeout: function () { return _this.onXHRTimeout(); },
|
@@ -10806,8 +10793,8 @@ up.Request = /** @class */ (function (_super) {
|
|
10806
10793
|
Request.prototype.abort = function () {
|
10807
10794
|
// setAbortedState() must be called before xhr.abort(), since xhr's event handlers
|
10808
10795
|
// will call setAbortedState() a second time, without a message.
|
10809
|
-
if (this.setAbortedState() && this.
|
10810
|
-
this.
|
10796
|
+
if (this.setAbortedState() && this._xhr) {
|
10797
|
+
this._xhr.abort();
|
10811
10798
|
}
|
10812
10799
|
};
|
10813
10800
|
Request.prototype.setAbortedState = function (reason) {
|
@@ -11247,40 +11234,39 @@ up.Request.XHRRenderer = /** @class */ (function () {
|
|
11247
11234
|
this.request = request;
|
11248
11235
|
}
|
11249
11236
|
XHRRenderer.prototype.buildAndSend = function (handlers) {
|
11250
|
-
|
11237
|
+
var xhr = this.request.xhr;
|
11251
11238
|
// We copy params since we will modify them below.
|
11252
11239
|
// This would confuse API clients and cache key logic in up.network.
|
11253
11240
|
this.params = u.copy(this.request.params);
|
11254
11241
|
// IE11 explodes it we're setting an undefined timeout property
|
11255
11242
|
if (this.request.timeout) {
|
11256
|
-
|
11243
|
+
xhr.timeout = this.request.timeout;
|
11257
11244
|
}
|
11258
11245
|
// The XMLHttpRequest method must be opened before we can add headers to it.
|
11259
|
-
|
11260
|
-
// Add information about the response's intended use so the server may
|
11246
|
+
xhr.open(this.getMethod(), this.request.url);
|
11247
|
+
// Add information about the response's intended use, so the server may
|
11261
11248
|
// customize or shorten its response.
|
11262
11249
|
var metaProps = this.request.metaProps();
|
11263
11250
|
for (var key in metaProps) {
|
11264
|
-
this.addHeader(up.protocol.headerize(key), metaProps[key]);
|
11251
|
+
this.addHeader(xhr, up.protocol.headerize(key), metaProps[key]);
|
11265
11252
|
}
|
11266
11253
|
for (var header in this.request.headers) {
|
11267
|
-
this.addHeader(header, this.request.headers[header]);
|
11254
|
+
this.addHeader(xhr, header, this.request.headers[header]);
|
11268
11255
|
}
|
11269
11256
|
var csrfHeader, csrfToken;
|
11270
11257
|
if ((csrfHeader = this.request.csrfHeader()) && (csrfToken = this.request.csrfToken())) {
|
11271
|
-
this.addHeader(csrfHeader, csrfToken);
|
11258
|
+
this.addHeader(xhr, csrfHeader, csrfToken);
|
11272
11259
|
}
|
11273
|
-
this.addHeader(up.protocol.headerize('version'), up.version);
|
11260
|
+
this.addHeader(xhr, up.protocol.headerize('version'), up.version);
|
11274
11261
|
// The { contentType } will be missing in case of a FormData payload.
|
11275
11262
|
// In this case the browser will choose a content-type with MIME boundary,
|
11276
11263
|
// like: multipart/form-data; boundary=----WebKitFormBoundaryHkiKAbOweEFUtny8
|
11277
11264
|
var contentType = this.getContentType();
|
11278
11265
|
if (contentType) {
|
11279
|
-
this.addHeader('Content-Type', contentType);
|
11266
|
+
this.addHeader(xhr, 'Content-Type', contentType);
|
11280
11267
|
}
|
11281
|
-
u.assign(
|
11282
|
-
|
11283
|
-
return this.xhr;
|
11268
|
+
u.assign(xhr, handlers);
|
11269
|
+
xhr.send(this.getPayload());
|
11284
11270
|
};
|
11285
11271
|
XHRRenderer.prototype.getMethod = function () {
|
11286
11272
|
// By default HTTP methods other than `GET` or `POST` will be converted into a `POST`
|
@@ -11303,11 +11289,11 @@ up.Request.XHRRenderer = /** @class */ (function () {
|
|
11303
11289
|
this.finalizePayload();
|
11304
11290
|
return this.payload;
|
11305
11291
|
};
|
11306
|
-
XHRRenderer.prototype.addHeader = function (header, value) {
|
11292
|
+
XHRRenderer.prototype.addHeader = function (xhr, header, value) {
|
11307
11293
|
if (u.isOptions(value) || u.isArray(value)) {
|
11308
11294
|
value = JSON.stringify(value);
|
11309
11295
|
}
|
11310
|
-
|
11296
|
+
xhr.setRequestHeader(header, value);
|
11311
11297
|
};
|
11312
11298
|
XHRRenderer.prototype.finalizePayload = function () {
|
11313
11299
|
if (this.payloadFinalized) {
|
@@ -11764,7 +11750,8 @@ up.RevealMotion = /** @class */ (function () {
|
|
11764
11750
|
elementRect.height += 2 * this.padding;
|
11765
11751
|
};
|
11766
11752
|
RevealMotion.prototype.selectObstructions = function (selectors) {
|
11767
|
-
|
11753
|
+
var elements = up.fragment.all(selectors.join(','), { layer: this.obstructionsLayer });
|
11754
|
+
return u.filter(elements, e.isVisible);
|
11768
11755
|
};
|
11769
11756
|
RevealMotion.prototype.substractObstructions = function (viewportRect) {
|
11770
11757
|
for (var _i = 0, _a = this.selectObstructions(this.topObstructions); _i < _a.length; _i++) {
|
@@ -18132,8 +18119,9 @@ up.motion = (function () {
|
|
18132
18119
|
This event is emitted on an animating element by `up.motion.finish()` to
|
18133
18120
|
request the animation to instantly finish and skip to the last frame.
|
18134
18121
|
|
18135
|
-
|
18136
|
-
to settle
|
18122
|
+
Custom [animation](/up.animation) and [transition](/up.transition) functions are expected
|
18123
|
+
to instantly settle their promises when this event is observed on the
|
18124
|
+
animating element.
|
18137
18125
|
|
18138
18126
|
Animations started by `up.animate()` already handle this event.
|
18139
18127
|
|
@@ -20543,7 +20531,7 @@ up.layer = (function () {
|
|
20543
20531
|
@stable
|
20544
20532
|
*/
|
20545
20533
|
/*-
|
20546
|
-
This event is emitted before a layer is [accepted](/closing-overlays).
|
20534
|
+
This event is emitted *before* a layer is [accepted](/closing-overlays).
|
20547
20535
|
|
20548
20536
|
The event is emitted on the [element of the layer](/up.layer.element) that is about to close.
|
20549
20537
|
|
@@ -20552,6 +20540,8 @@ up.layer = (function () {
|
|
20552
20540
|
The layer that is about to close.
|
20553
20541
|
@param {Element} [event.value]
|
20554
20542
|
The overlay's [acceptance value](/closing-overlays#overlay-result-values).
|
20543
|
+
|
20544
|
+
Listeners may replace or mutate this value.
|
20555
20545
|
@param {Element} [event.origin]
|
20556
20546
|
The element that is causing the layer to close.
|
20557
20547
|
@param event.preventDefault()
|
@@ -20559,7 +20549,7 @@ up.layer = (function () {
|
|
20559
20549
|
@stable
|
20560
20550
|
*/
|
20561
20551
|
/*-
|
20562
|
-
This event is emitted after a layer was [accepted](/closing-overlays).
|
20552
|
+
This event is emitted *after* a layer was [accepted](/closing-overlays).
|
20563
20553
|
|
20564
20554
|
The event is emitted on the [layer's](/up.layer.element) when the close animation
|
20565
20555
|
is starting. If the layer has no close animaton and was already removed from the DOM,
|
@@ -20569,7 +20559,7 @@ up.layer = (function () {
|
|
20569
20559
|
@param {up.Layer} event.layer
|
20570
20560
|
The layer that was closed.
|
20571
20561
|
@param {Element} [event.value]
|
20572
|
-
The overlay's [acceptance value](/closing-overlays#overlay-result-values).
|
20562
|
+
The overlay's final [acceptance value](/closing-overlays#overlay-result-values).
|
20573
20563
|
@param {Element} [event.origin]
|
20574
20564
|
The element that has caused the layer to close.
|
20575
20565
|
@stable
|
@@ -20586,7 +20576,7 @@ up.layer = (function () {
|
|
20586
20576
|
@stable
|
20587
20577
|
*/
|
20588
20578
|
/*-
|
20589
|
-
This event is emitted before a layer is [dismissed](/closing-overlays).
|
20579
|
+
This event is emitted *before* a layer is [dismissed](/closing-overlays).
|
20590
20580
|
|
20591
20581
|
The event is emitted on the [element of the layer](/up.layer.element) that is about to close.
|
20592
20582
|
|
@@ -20595,6 +20585,8 @@ up.layer = (function () {
|
|
20595
20585
|
The layer that is about to close.
|
20596
20586
|
@param {Element} [event.value]
|
20597
20587
|
The overlay's [dismissal value](/closing-overlays#overlay-result-values).
|
20588
|
+
|
20589
|
+
Listeners may replace or mutate this value.
|
20598
20590
|
@param {Element} [event.origin]
|
20599
20591
|
The element that is causing the layer to close.
|
20600
20592
|
@param event.preventDefault()
|
@@ -20602,7 +20594,7 @@ up.layer = (function () {
|
|
20602
20594
|
@stable
|
20603
20595
|
*/
|
20604
20596
|
/*-
|
20605
|
-
This event is emitted after a layer was [dismissed](/closing-overlays).
|
20597
|
+
This event is emitted *after* a layer was [dismissed](/closing-overlays).
|
20606
20598
|
|
20607
20599
|
The event is emitted on the [layer's](/up.layer.element) when the close animation
|
20608
20600
|
is starting. If the layer has no close animaton and was already removed from the DOM,
|
@@ -20612,7 +20604,7 @@ up.layer = (function () {
|
|
20612
20604
|
@param {up.Layer} event.layer
|
20613
20605
|
The layer that was closed.
|
20614
20606
|
@param {Element} [event.value]
|
20615
|
-
The overlay's [dismissal value](/closing-overlays#overlay-result-values).
|
20607
|
+
The overlay's final [dismissal value](/closing-overlays#overlay-result-values).
|
20616
20608
|
@param {Element} [event.origin]
|
20617
20609
|
The element that has caused the layer to close.
|
20618
20610
|
@stable
|