unpoly-rails 3.0.0.rc4 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/assets/unpoly/unpoly-migrate.js +3 -3
- data/assets/unpoly/unpoly-migrate.min.js +1 -1
- data/assets/unpoly/unpoly.es6.js +7 -12
- data/assets/unpoly/unpoly.es6.min.js +1 -1
- data/assets/unpoly/unpoly.js +7 -12
- data/assets/unpoly/unpoly.min.js +1 -1
- data/lib/unpoly/rails/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bdb72b1e025c00f0958892d0b371bdca7c14539519814aacb9464c28ef46ca00
|
4
|
+
data.tar.gz: df9dcc600472b97803101196756c50bb56b35ee22878a4ea52968172c5cce372
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1e1b0a41c53e2e0b1a91f501d15dd9dff067986edc2e7888d578fd783c45b014e1f11645bca9c1f97f304e3be4d4e9000e0b24c0e8d62809f6fcf57cdbbc36fb
|
7
|
+
data.tar.gz: 842bff82bee6a5d9b21b7efd124512985c36c80682819dfc446e61dd9b14aebdb8e4012329d66ea143769d3ea9bd1688605047fb780c8f61659ea55f5afe2a2f
|
@@ -430,11 +430,11 @@ up.migrate.preprocessRenderOptions = function (options) {
|
|
430
430
|
}
|
431
431
|
let solo = u.pluckKey(options, 'solo');
|
432
432
|
if (u.isString(solo)) {
|
433
|
-
up.migrate.warn("The up.render() option { solo } has been replaced
|
433
|
+
up.migrate.warn("The up.render() option { solo } has been replaced with { abort } and { abort } no longer accepts a URL pattern. Check if you can use { abort: 'target'} or use up.network.abort(pattern) instead.");
|
434
434
|
options.abort = (options) => up.network.abort(solo, options);
|
435
435
|
}
|
436
436
|
else if (u.isFunction(solo)) {
|
437
|
-
up.migrate.warn("The up.render() option { solo } has been replaced
|
437
|
+
up.migrate.warn("The up.render() option { solo } has been replaced with { abort } and { abort } no longer accepts a Function(up.Request): boolean. Check if you can use { abort: 'target'} or use up.network.abort(fn) instead.");
|
438
438
|
options.abort = (options) => { up.network.abort(solo, options); };
|
439
439
|
}
|
440
440
|
else if (solo === true) {
|
@@ -805,7 +805,7 @@ up.migrate.renamedProperty(up.network.config, 'maxRequests', 'concurrency');
|
|
805
805
|
up.migrate.renamedProperty(up.network.config, 'slowDelay', 'badResponseTime');
|
806
806
|
up.migrate.renamedProperty(up.network.config, 'cacheExpiry', 'cacheExpireAge', 'The configuration up.network.config.cacheExpiry has been renamed to up.network.config.cacheExpireAge. Note that Unpoly 3+ automatically reloads cached content after rendering to ensure users always see fresh data ("cache revalidation"). Setting a custom expiry may no longer be necessary.');
|
807
807
|
up.migrate.renamedProperty(up.network.config, 'clearCache', 'expireCache');
|
808
|
-
up.migrate.forbiddenPropertyValue(up.network.config, 'cacheSize', 0, 'Disabling the cache with up.network.config.cacheSize = 0 is no longer supported. To disable caching, set up.fragment.config.navigateOptions.cache = false instead.');
|
808
|
+
up.migrate.forbiddenPropertyValue(up.network.config, 'cacheSize', 0, 'Disabling the cache with up.network.config.cacheSize = 0 is no longer supported. To disable automatic caching during navigation, set up.fragment.config.navigateOptions.cache = false instead.');
|
809
809
|
up.network.config.requestMetaKeys = [];
|
810
810
|
up.migrate.removedProperty(up.network.config, 'requestMetaKeys', 'The configuration up.network.config.requestMetaKeys has been removed. Servers that optimize responses based on request headers should instead set a Vary response header.');
|
811
811
|
up.migrate.handleRequestOptions = function (options) {
|
@@ -1 +1 @@
|
|
1
|
-
(()=>{var e={294:()=>{up.browser.loadPage=function(...e){return up.migrate.deprecated("up.browser.loadPage()","up.network.loadPage()"),up.network.loadPage(...e)},up.browser.isSupported=function(...e){return up.migrate.deprecated("up.browser.isSupported()","up.framework.isSupported()"),up.framework.isSupported(...e)}},700:()=>{up.element.first=function(...e){return up.migrate.deprecated("up.element.first()","up.element.get()"),up.element.get(...e)},up.element.createFromHtml=function(...e){return up.migrate.deprecated("up.element.createFromHtml()","up.element.createFromHTML()"),up.element.createFromHTML(...e)},up.element.remove=function(e){return up.migrate.deprecated("up.element.remove()","Element#remove()"),e.remove()},up.element.matches=function(e,t){return up.migrate.deprecated("up.element.matches()","Element#matches()"),e.matches(t)},up.element.closest=function(e,t){return up.migrate.deprecated("up.element.closest()","Element#closest()"),e.closest(t)},up.element.replace=function(e,t){return up.migrate.deprecated("up.element.replace()","Element#replaceWith()"),e.replaceWith(t)},up.element.all=function(...e){up.migrate.deprecated("up.element.all()","Document#querySelectorAll() or Element#querySelectorAll()");const t=e.pop();return(e[0]||document).querySelectorAll(t)},up.element.toggleClass=function(e,t,r){const a=e.classList;return null==r&&(r=!a.contains(t)),r?a.add(t):a.remove(t)},up.element.toSelector=function(...e){return up.migrate.deprecated("up.element.toSelector()","up.fragment.toTarget()"),up.fragment.toTarget(...e)},up.element.isAttached=function(e){return up.migrate.deprecated("up.element.isAttached()","element.isConnected"),e.isConnected},up.element.isDetached=function(e){return up.migrate.deprecated("up.element.isDetached()","!element.isConnected"),!e.isConnected}},394:()=>{up.migrate.renamedPackage("bus","event"),up.event.nobodyPrevents=function(...e){return up.migrate.deprecated("up.event.nobodyPrevents(type)","!up.emit(type).defaultPrevented"),!up.emit(...e).defaultPrevented},up.$on=function(...e){let t=e.pop();up.on(...e,(function(e,r,a){let p=jQuery(r);t.call(p,e,p,a)}))},up.$off=up.event.off},729:()=>{up.migrate.renamedPackage("navigation","feedback"),up.migrate.renamedProperty(up.feedback.config,"navs","navSelectors")},305:()=>{up.migrate.renamedProperty(up.form.config,"fields","fieldSelectors"),up.migrate.renamedProperty(up.form.config,"submitButtons","submitButtonSelectors"),up.migrate.renamedProperty(up.form.config,"validateTargets","groupSelectors"),up.migrate.renamedProperty(up.form.config,"observeDelay","watchInputDelay"),up.migrate.migratedFormGroupSelectors=function(){return up.form.config.groupSelectors.map((e=>{let t=e.replace(/:has\(:origin\)$/,"");return e!==t&&up.migrate.warn('Selectors in up.form.config.groupSelectors must not contain ":has(:origin)". The suffix is added automatically where required. Found in "%s".',e),t}))},up.migrate.renamedAttribute("up-observe","up-watch"),up.migrate.renamedAttribute("up-fieldset","up-form-group"),up.migrate.renamedAttribute("up-delay","up-watch-delay",{scope:"[up-autosubmit]"}),up.migrate.renamedAttribute("up-delay","up-watch-delay",{scope:"[up-watch]"}),up.migrate.renamedAttribute("up-restore-scroll","up-scroll",{mapValue:e=>"true"===e?"restore":"reset"}),up.observe=function(...e){if(up.migrate.deprecated("up.observe()","up.watch()"),up.util.isList(e[0])&&e[0].length>1){let t=e.shift();up.migrate.warn("Calling up.observe() with a list of multiple elements is no longer supported by up.watch()");let r=up.util.map(t,(t=>up.watch(t,...e)));return up.util.sequence(r)}return up.watch(...e)}},354:()=>{const e=up.util;up.migrate.renamedPackage("flow","fragment"),up.migrate.renamedPackage("dom","fragment"),up.migrate.renamedProperty(up.fragment.config,"fallbacks","mainTargets"),up.migrate.handleResponseDocOptions=e=>up.migrate.fixKey(e,"html","document"),up.replace=function(e,t,r){return up.migrate.deprecated("up.replace(target, url)","up.navigate(target, { url })"),up.navigate(Object.assign(Object.assign({},r),{target:e,url:t}))},up.extract=function(e,t,r){return up.migrate.deprecated("up.extract(target, document)","up.navigate(target, { document })"),up.navigate(Object.assign(Object.assign({},r),{target:e,document:t}))},up.fragment.first=function(...e){return up.migrate.deprecated("up.fragment.first()","up.fragment.get()"),up.fragment.get(...e)},up.first=up.fragment.first,up.migrate.preprocessRenderOptions=function(t){e.isString(t.history)&&"auto"!==t.history&&(up.migrate.warn("Passing a URL as { history } option is deprecated. Pass it as { location } instead."),t.location=t.history,t.history="auto");for(let r of["target","origin"])e.isJQuery(t[r])&&(up.migrate.warn("Passing a jQuery collection as { %s } is deprecated. Pass it as a native element instead.",r),t[r]=up.element.get(t[r]));"auto"===t.fail&&(up.migrate.warn("The option { fail: 'auto' } is deprecated. Omit the option instead."),delete t.fail);let r=e.pluckKey(t,"solo");e.isString(r)?(up.migrate.warn("The up.render() option { solo } has been replaced by { abort } and { abort } no longer accepts a URL pattern. Check if you can use { abort: 'target'} or use up.network.abort(pattern) instead."),t.abort=e=>up.network.abort(r,e)):e.isFunction(r)?(up.migrate.warn("The up.render() option { solo } has been replaced by { abort } and { abort } no longer accepts a Function(up.Request): boolean. Check if you can use { abort: 'target'} or use up.network.abort(fn) instead."),t.abort=e=>{up.network.abort(r,e)}):!0===r?(up.migrate.deprecated("Option { solo: true }","{ abort: 'all' }"),t.abort="all"):!1===r&&(up.migrate.deprecated("Option { solo: false }","{ abort: false }"),up.migrate.warn("Unpoly 3+ only aborts requests targeting the same fragment. Setting [up-solo=false] or { solo: false } may no longer be necessary."),t.abort=!1),up.migrate.fixKey(t,"keep","useKeep"),up.migrate.fixKey(t,"hungry","useHungry"),up.migrate.fixKey(t,"failOnFinished","onFailFinished"),e.isString(t.reveal)?(up.migrate.deprecated(`Option { reveal: '${t.reveal}' }`,`{ scroll: '${t.reveal}' }`),t.scroll=t.reveal):!0===t.reveal?(up.migrate.deprecated("Option { reveal: true }","{ scroll: 'target' }"),t.scroll="target"):!1===t.reveal&&(up.migrate.deprecated("Option { reveal: false }","{ scroll: false }"),t.scroll=!1),e.isDefined(t.resetScroll)&&(up.migrate.deprecated("Option { resetScroll: true }","{ scroll: 'reset' }"),t.scroll="teset"),e.isDefined(t.restoreScroll)&&(up.migrate.deprecated("Option { restoreScroll: true }","{ scroll: 'restore' }"),t.scroll="restore")},up.migrate.postprocessReloadOptions=function(e){var t;let r,a=null===(t=e.headers)||void 0===t?void 0:t["If-Modified-Since"];r=a?Math.floor(.001*new Date(a)).toString():"0",e.headers[up.protocol.headerize("reloadFromTime")]=r};const t=/\[([\w-]+)(?:([~|^$*]?=)(["'])?([^\3\]]*?)\3)?]/g;up.migrate.resolveOrigin=function(e,{origin:r}={}){let a=new RegExp(t.source+"|&|:origin\\b","g");return e.replace(a,(function(t){return":origin"!==t&&"&"!==t?t:("&"===t&&up.migrate.deprecated("Origin shorthand '&'",":origin"),r?up.fragment.toTarget(r):void up.fail('Missing { origin } element to resolve "%s" reference (found in %s)',t,e))}))},up.migrate.removedEvent("up:fragment:kept","up:fragment:keep");let r=up.fragment.config.runScripts,a=!1;Object.defineProperty(up.fragment.config,"runScripts",{get:()=>r,set(e){r=e,a=!0}}),up.on("up:framework:boot",(function(){a||up.migrate.warn("Scripts within fragments are now executed. Configure up.fragment.config.runScripts to remove this warning.")})),up.compiler("[up-keep]",(function(t){let r=up.element.booleanOrStringAttr(t,"up-keep");e.isString(r)&&(up.migrate.warn('The [up-keep] attribute no longer supports a selector value. Elements will be matched by their derived target. You may prevent keeping with [up-on-keep="if(condition) event.preventDefault()"]. '),up.element.setMissingAttr(t,"up-on-keep",`if (!newFragment.matches(${JSON.stringify(r)})) event.preventDefault()`),t.setAttribute("up-keep",""))}))},234:()=>{up.migrate.renamedEvent("up:app:booted","up:framework:booted")},869:()=>{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:()=>{up.migrate.handleLayerOptions=function(e){up.migrate.fixKey(e,"flavor","mode"),up.migrate.fixKey(e,"closable","dismissable"),up.migrate.fixKey(e,"closeLabel","dismissLabel");for(let t of["width","maxWidth","height"])e[t]&&up.migrate.warn(`Layer option { ${t} } 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: '${e.layer}' } has been removed. Did you mean { layer: 'overlay' }?`),e.layer="overlay")},up.migrate.handleTetherOptions=function(e){const[t,r]=e.position.split("-");r&&(up.migrate.warn("The position value %o is deprecated. Use %o instead.",e.position,{position:t,align:r}),e.position=t,e.align=r)},up.migrate.registerLayerCloser=e=>e.registerClickCloser("up-close",((t,r)=>{up.migrate.deprecated("[up-close]","[up-dismiss]"),e.dismiss(t,r)})),up.migrate.handleLayerConfig=e=>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:()=>{up.migrate.parseFollowOptions=function(e){e.string("flavor"),e.string("width"),e.string("height"),e.boolean("closable"),e.booleanOrString("solo"),e.booleanOrString("reveal"),e.boolean("resetScroll"),e.boolean("restoreScroll"),e.booleanOrString("historyVisible"),e.booleanOrString("clearCache")},up.migrate.targetMacro("up-dash",{"up-preload":"","up-instant":""},(()=>up.migrate.deprecated("a[up-dash]","up.link.config.instantSelectors and up.link.config.preloadSelectors"))),up.migrate.renamedAttribute("up-delay","up-preload-delay",{scope:up.link.preloadSelector})},992:()=>{const e=up.util;up.migrate=function(){const t=new up.Config((()=>({logLevel:"warn"}))),r={},a={};function p(e){let t=r[e];if(t)return o(`Event ${e} has been renamed to ${t}`),t;if(e in a){let t=`Event ${e} has been removed`,r=a[e];return r&&(t+=`. Use ${r} instead.`),o(t),e}return e}const u={};function o(r,...a){const p=e.sprintf(r,...a);u[p]||(u[p]=!0,up.log[t.logLevel]("unpoly-migrate",r,...a))}return up.on("up:framework:reset",(function(){t.reset()})),{deprecated:function(e,t){o(`${e} has been deprecated. Use ${t} instead.`)},renamedPackage:function(e,t){Object.defineProperty(up,e,{get:()=>(o(`up.${e} has been renamed to up.${t}`),up[t])})},renamedProperty:function(t,r,a,p){const u=e.memoize((()=>p?o(p):o("Property { %s } has been renamed to { %s } (found in %o)",r,a,t)));Object.defineProperty(t,r,{get(){return u(),this[a]},set(e){u(),this[a]=e}})},removedProperty:function(t,r,a){const p=e.memoize((()=>a?o(a):o("Property { %s } has been removed without replacement (found in %o)",r,t)));let u=t[r];Object.defineProperty(t,r,{get:()=>(p(),u),set(e){p(),u=e}})},forbiddenPropertyValue:function(e,t,r,a){let p=e[t];Object.defineProperty(e,t,{get:()=>p,set(e){if(e===r)throw new Error(a);p=e}})},renamedAttribute:function(e,t,{scope:r,mapValue:a}={}){let p=r||`[${e}]`;up.macro(p,{priority:-1e3},(function(r){if(r.hasAttribute(e)){o("Attribute [%s] has been renamed to [%s] (found in %o)",e,t,r);let p=r.getAttribute(e);a&&(p=a(p)),r.setAttribute(t,p),r.removeAttribute(e)}}))},formerlyAsync:function(e){const t=Promise.resolve(),r=t.then;return t.then=function(){return o(`${e} no longer returns a promise`),r.apply(this,arguments)},t},renamedEvent:function(e,t){r[e]=t},removedEvent:function(e,t=null){a[e]=t},fixEventTypes:function(t){return e.uniq(e.map(t,p))},fixKey:function(t,r,a){e.isDefined(t[r])&&(o("Property { %s } has been renamed to { %s } (found in %o)",r,a,t),e.renameKey(t,r,a))},warn:o,loaded:!0,config:t}}()},413:()=>{const e=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:(e,t={})=>(up.migrate.deprecated("up.modal.visit(url)",'up.layer.open({ url, mode: "modal" })'),up.layer.open(Object.assign(Object.assign({},t),{url:e,mode:"modal"}))),follow:(e,t={})=>(up.migrate.deprecated("up.modal.follow(link)",'up.follow(link, { layer: "modal" })'),up.follow(e,Object.assign(Object.assign({},t),{layer:"modal"}))),extract:(e,t,r={})=>(up.migrate.deprecated("up.modal.extract(target, document)",'up.layer.open({ document, mode: "modal" })'),up.layer.open(Object.assign(Object.assign({},r),{target:e,html:t,layer:"modal"}))),close:(e={})=>(up.migrate.deprecated("up.modal.close()","up.layer.dismiss()"),up.layer.dismiss(null,e),up.migrate.formerlyAsync("up.layer.dismiss()")),url:()=>(up.migrate.deprecated("up.modal.url()","up.layer.location"),up.layer.location),coveredUrl(){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:e=>(up.migrate.deprecated("up.modal.contains()","up.layer.contains()"),up.layer.contains(e)),isOpen:()=>(up.migrate.deprecated("up.modal.isOpen()","up.layer.isOverlay()"),up.layer.isOverlay()),get flavors(){throw e},flavor(){throw e}},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"},(()=>up.migrate.deprecated("a[up-modal]",'a[up-layer="new modal"]'))),up.migrate.targetMacro("up-drawer",{"up-layer":"new drawer"},(()=>up.migrate.deprecated("a[up-drawer]",'a[up-layer="new drawer"]')))},885:()=>{const 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:offline"),up.migrate.renamedEvent("up:request:fatal","up:request:offline"),up.migrate.renamedEvent("up:proxy:aborted","up:request:aborted"),up.migrate.renamedEvent("up:proxy:slow","up:network:late"),up.migrate.renamedEvent("up:proxy:recover","up:network:recover"),up.migrate.renamedEvent("up:request:late","up:network:late"),up.migrate.renamedEvent("up:request:recover","up:network:recover");const t=()=>up.migrate.deprecated("up.proxy.config.preloadDelay","up.link.config.preloadDelay");Object.defineProperty(up.network.config,"preloadDelay",{get:()=>(t(),up.link.config.preloadDelay),set(e){t(),up.link.config.preloadDelay=e}}),up.migrate.renamedProperty(up.network.config,"maxRequests","concurrency"),up.migrate.renamedProperty(up.network.config,"slowDelay","badResponseTime"),up.migrate.renamedProperty(up.network.config,"cacheExpiry","cacheExpireAge",'The configuration up.network.config.cacheExpiry has been renamed to up.network.config.cacheExpireAge. Note that Unpoly 3+ automatically reloads cached content after rendering to ensure users always see fresh data ("cache revalidation"). Setting a custom expiry may no longer be necessary.'),up.migrate.renamedProperty(up.network.config,"clearCache","expireCache"),up.migrate.forbiddenPropertyValue(up.network.config,"cacheSize",0,"Disabling the cache with up.network.config.cacheSize = 0 is no longer supported. To disable caching, set up.fragment.config.navigateOptions.cache = false instead."),up.network.config.requestMetaKeys=[],up.migrate.removedProperty(up.network.config,"requestMetaKeys","The configuration up.network.config.requestMetaKeys has been removed. Servers that optimize responses based on request headers should instead set a Vary response header."),up.migrate.handleRequestOptions=function(e){up.migrate.fixKey(e,"clearCache","expireCache"),e.solo&&up.migrate.warn("The option up.request({ solo }) has been removed. Use up.network.abort() or up.fragment.abort() instead.")},up.ajax=function(...e){return up.migrate.deprecated("up.ajax()","up.request()"),up.request(...e).then((e=>e.text))},up.network.clear=function(){up.migrate.deprecated("up.proxy.clear()","up.cache.expire()"),up.cache.expire()},up.Request.Cache.prototype.clear=function(...e){up.migrate.deprecated("up.cache.clear()","up.cache.expire()"),this.expire(...e)},up.network.preload=function(...e){return up.migrate.deprecated("up.proxy.preload(link)","up.link.preload(link)"),up.link.preload(...e)},up.migrate.preprocessAbortArgs=function(t){2===t.length&&e.isString(t[1])&&(up.migrate.warn("up.network.abort() no longer takes a reason as a second argument. Pass it as { reason } option instead."),t[1]={reason:t[1]})},up.network.isIdle=function(){return up.migrate.deprecated("up.network.isIdle()","!up.network.isBusy()"),!up.network.isBusy()},up.Request.prototype.navigate=function(){up.migrate.deprecated("up.Request#navigate()","up.Request#loadPage()"),this.loadPage()},up.migrate.renamedProperty(up.Request.prototype,"preload","background"),up.Response.prototype.isSuccess=function(){return up.migrate.deprecated("up.Response#isSuccess()","up.Response#ok"),this.ok},up.Response.prototype.getHeader=function(e){return up.migrate.deprecated("up.Response#getHeader()","up.Response#header()"),this.header(e)},up.Response.prototype.isError=function(){return up.migrate.deprecated("up.Response#isError()","!up.Response#ok"),!this.ok};const r=up.network.config.progressBar;function a(){up.network.config.progressBar=function(){return function(){const t=up.EventListener.allNonDefault(document);return e.find(t,(e=>"up:network:late"===e.eventType))}()?(up.migrate.warn("Disabled the default progress bar as may have built a custom loading indicator with your up:network:late listener. Please set up.network.config.progressBar to true or false."),!1):r}}a(),up.on("up:framework:reset",a)},69:()=>{up.popup={attach:(e,t={})=>(e=up.fragment.get(e),up.migrate.deprecated("up.popup.attach(origin)","up.layer.open({ origin, layer: 'popup' })"),up.layer.open(Object.assign(Object.assign({},t),{origin:e,layer:"popup"}))),close:(e={})=>(up.migrate.deprecated("up.popup.close()","up.layer.dismiss()"),up.layer.dismiss(null,e),up.migrate.formerlyAsync("up.layer.dismiss()")),url:()=>(up.migrate.deprecated("up.popup.url()","up.layer.location"),up.layer.location),coveredUrl(){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:e=>(up.migrate.deprecated("up.popup.contains()","up.layer.contains()"),up.layer.contains(e)),isOpen:()=>(up.migrate.deprecated("up.popup.isOpen()","up.layer.isOverlay()"),up.layer.isOverlay()),sync:()=>(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"},(()=>up.migrate.deprecated("[up-popup]",'[up-layer="new popup"]')))},677:()=>{up.migrate.clearCacheFromXHR=function(e){let t=e.getResponseHeader("X-Up-Clear-Cache");if(t)return up.migrate.deprecated("X-Up-Clear-Cache","X-Up-Expire-Cache"),"false"!==t&&t},up.migrate.titleFromXHR=function(e){let t=e.getResponseHeader("X-Up-Title");if(t){if("false"===t)return!1;if('"'!==t[0])return up.migrate.warn("X-Up-Title must now be a JSON-encoded string"),t}}},228:()=>{up.migrate.renamedProperty(up.radio.config,"hungry","hungrySelectors")},629:()=>{const e=up.util,t=up.element;up.migrate.postCompile=function(t,r){let a;if(a=r.keep){up.migrate.warn("The { keep: true } option for up.compiler() has been removed. Have the compiler set [up-keep] attribute instead.");const r=e.isString(a)?a:"";for(let e of t)e.setAttribute("up-keep",r)}},up.migrate.targetMacro=function(r,a,p){up.macro(`[${r}]`,(function(u){let o;const n=e.copy(a);(o=u.getAttribute(r))?n["up-target"]=o:n["up-follow"]="",t.setMissingAttrs(u,n),u.removeAttribute(r),null==p||p()}))},up.$compiler=function(e,...t){let r=t.pop();up.compiler(...t,(function(e,...t){let a=jQuery(e);return r(a,...t)}))},up.$macro=function(e,...t){let r=t.pop();up.macro(...t,(function(e,...t){let a=jQuery(e);return r(a,...t)}))}},197:()=>{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:()=>{up.util.only=function(e,...t){return up.migrate.deprecated("up.util.only(object, ...keys)","up.util.pick(object, keys)"),up.util.pick(e,t)},up.util.except=function(e,...t){return up.migrate.deprecated("up.util.except(object, ...keys)","up.util.omit(object, keys)"),up.util.omit(e,t)},up.util.parseUrl=function(...e){return up.migrate.deprecated("up.util.parseUrl()","up.util.parseURL()"),up.util.parseURL(...e)},up.util.any=function(...e){return up.migrate.deprecated("up.util.any()","up.util.some()"),up.util.some(...e)},up.util.all=function(...e){return up.migrate.deprecated("up.util.all()","up.util.every()"),up.util.every(...e)},up.util.detect=function(...e){return up.migrate.deprecated("up.util.detect()","up.util.find()"),up.util.find(...e)},up.util.select=function(...e){return up.migrate.deprecated("up.util.select()","up.util.filter()"),up.util.filter(...e)},up.util.setTimer=function(...e){return up.migrate.deprecated("up.util.setTimer()","up.util.timer()"),up.util.timer(...e)},up.util.escapeHtml=function(...e){return up.migrate.deprecated("up.util.escapeHtml()","up.util.escapeHTML()"),up.util.escapeHTML(...e)},up.util.selectorForElement=function(...e){return up.migrate.deprecated("up.util.selectorForElement()","up.fragment.toTarget()"),up.fragment.toTarget(...e)},up.util.nextFrame=function(...e){return up.migrate.deprecated("up.util.nextFrame()","up.util.task()"),up.util.task(...e)},up.util.times=function(e,t){up.migrate.deprecated("up.util.times()","a `for` loop");for(let r=0;r<e;r++)t()},up.util.assign=function(...e){return up.migrate.deprecated("up.util.assign()","Object.assign()"),Object.assign(...e)},up.util.values=function(...e){return up.migrate.deprecated("up.util.values()","Object.values()"),Object.values(...e)}},338:()=>{up.migrate.renamedPackage("layout","viewport"),up.migrate.renamedProperty(up.viewport.config,"viewports","viewportSelectors"),up.migrate.renamedProperty(up.viewport.config,"snap","revealSnap"),up.migrate.removedProperty(up.viewport.config,"scrollSpeed"),up.viewport.closest=function(...e){return up.migrate.deprecated("up.viewport.closest()","up.viewport.get()"),up.viewport.get(...e)},up.viewport.scroll=function(e,t,r={}){return(e=up.fragment.get(e,r)).scrollTo(Object.assign(Object.assign({},r),{top:t})),up.migrate.formerlyAsync("up.scroll()")},up.scroll=up.viewport.scroll}},t={};function r(a){var p=t[a];if(void 0!==p)return p.exports;var u=t[a]={exports:{}};return e[a](u,u.exports,r),u.exports}up.framework.startExtension(),r(992),r(480),r(294),r(700),r(394),r(629),r(305),r(354),r(234),r(869),r(729),r(969),r(905),r(413),r(69),r(197),r(677),r(885),r(228),r(338),up.framework.stopExtension()})();
|
1
|
+
(()=>{var e={294:()=>{up.browser.loadPage=function(...e){return up.migrate.deprecated("up.browser.loadPage()","up.network.loadPage()"),up.network.loadPage(...e)},up.browser.isSupported=function(...e){return up.migrate.deprecated("up.browser.isSupported()","up.framework.isSupported()"),up.framework.isSupported(...e)}},700:()=>{up.element.first=function(...e){return up.migrate.deprecated("up.element.first()","up.element.get()"),up.element.get(...e)},up.element.createFromHtml=function(...e){return up.migrate.deprecated("up.element.createFromHtml()","up.element.createFromHTML()"),up.element.createFromHTML(...e)},up.element.remove=function(e){return up.migrate.deprecated("up.element.remove()","Element#remove()"),e.remove()},up.element.matches=function(e,t){return up.migrate.deprecated("up.element.matches()","Element#matches()"),e.matches(t)},up.element.closest=function(e,t){return up.migrate.deprecated("up.element.closest()","Element#closest()"),e.closest(t)},up.element.replace=function(e,t){return up.migrate.deprecated("up.element.replace()","Element#replaceWith()"),e.replaceWith(t)},up.element.all=function(...e){up.migrate.deprecated("up.element.all()","Document#querySelectorAll() or Element#querySelectorAll()");const t=e.pop();return(e[0]||document).querySelectorAll(t)},up.element.toggleClass=function(e,t,r){const a=e.classList;return null==r&&(r=!a.contains(t)),r?a.add(t):a.remove(t)},up.element.toSelector=function(...e){return up.migrate.deprecated("up.element.toSelector()","up.fragment.toTarget()"),up.fragment.toTarget(...e)},up.element.isAttached=function(e){return up.migrate.deprecated("up.element.isAttached()","element.isConnected"),e.isConnected},up.element.isDetached=function(e){return up.migrate.deprecated("up.element.isDetached()","!element.isConnected"),!e.isConnected}},394:()=>{up.migrate.renamedPackage("bus","event"),up.event.nobodyPrevents=function(...e){return up.migrate.deprecated("up.event.nobodyPrevents(type)","!up.emit(type).defaultPrevented"),!up.emit(...e).defaultPrevented},up.$on=function(...e){let t=e.pop();up.on(...e,(function(e,r,a){let p=jQuery(r);t.call(p,e,p,a)}))},up.$off=up.event.off},729:()=>{up.migrate.renamedPackage("navigation","feedback"),up.migrate.renamedProperty(up.feedback.config,"navs","navSelectors")},305:()=>{up.migrate.renamedProperty(up.form.config,"fields","fieldSelectors"),up.migrate.renamedProperty(up.form.config,"submitButtons","submitButtonSelectors"),up.migrate.renamedProperty(up.form.config,"validateTargets","groupSelectors"),up.migrate.renamedProperty(up.form.config,"observeDelay","watchInputDelay"),up.migrate.migratedFormGroupSelectors=function(){return up.form.config.groupSelectors.map((e=>{let t=e.replace(/:has\(:origin\)$/,"");return e!==t&&up.migrate.warn('Selectors in up.form.config.groupSelectors must not contain ":has(:origin)". The suffix is added automatically where required. Found in "%s".',e),t}))},up.migrate.renamedAttribute("up-observe","up-watch"),up.migrate.renamedAttribute("up-fieldset","up-form-group"),up.migrate.renamedAttribute("up-delay","up-watch-delay",{scope:"[up-autosubmit]"}),up.migrate.renamedAttribute("up-delay","up-watch-delay",{scope:"[up-watch]"}),up.migrate.renamedAttribute("up-restore-scroll","up-scroll",{mapValue:e=>"true"===e?"restore":"reset"}),up.observe=function(...e){if(up.migrate.deprecated("up.observe()","up.watch()"),up.util.isList(e[0])&&e[0].length>1){let t=e.shift();up.migrate.warn("Calling up.observe() with a list of multiple elements is no longer supported by up.watch()");let r=up.util.map(t,(t=>up.watch(t,...e)));return up.util.sequence(r)}return up.watch(...e)}},354:()=>{const e=up.util;up.migrate.renamedPackage("flow","fragment"),up.migrate.renamedPackage("dom","fragment"),up.migrate.renamedProperty(up.fragment.config,"fallbacks","mainTargets"),up.migrate.handleResponseDocOptions=e=>up.migrate.fixKey(e,"html","document"),up.replace=function(e,t,r){return up.migrate.deprecated("up.replace(target, url)","up.navigate(target, { url })"),up.navigate(Object.assign(Object.assign({},r),{target:e,url:t}))},up.extract=function(e,t,r){return up.migrate.deprecated("up.extract(target, document)","up.navigate(target, { document })"),up.navigate(Object.assign(Object.assign({},r),{target:e,document:t}))},up.fragment.first=function(...e){return up.migrate.deprecated("up.fragment.first()","up.fragment.get()"),up.fragment.get(...e)},up.first=up.fragment.first,up.migrate.preprocessRenderOptions=function(t){e.isString(t.history)&&"auto"!==t.history&&(up.migrate.warn("Passing a URL as { history } option is deprecated. Pass it as { location } instead."),t.location=t.history,t.history="auto");for(let r of["target","origin"])e.isJQuery(t[r])&&(up.migrate.warn("Passing a jQuery collection as { %s } is deprecated. Pass it as a native element instead.",r),t[r]=up.element.get(t[r]));"auto"===t.fail&&(up.migrate.warn("The option { fail: 'auto' } is deprecated. Omit the option instead."),delete t.fail);let r=e.pluckKey(t,"solo");e.isString(r)?(up.migrate.warn("The up.render() option { solo } has been replaced with { abort } and { abort } no longer accepts a URL pattern. Check if you can use { abort: 'target'} or use up.network.abort(pattern) instead."),t.abort=e=>up.network.abort(r,e)):e.isFunction(r)?(up.migrate.warn("The up.render() option { solo } has been replaced with { abort } and { abort } no longer accepts a Function(up.Request): boolean. Check if you can use { abort: 'target'} or use up.network.abort(fn) instead."),t.abort=e=>{up.network.abort(r,e)}):!0===r?(up.migrate.deprecated("Option { solo: true }","{ abort: 'all' }"),t.abort="all"):!1===r&&(up.migrate.deprecated("Option { solo: false }","{ abort: false }"),up.migrate.warn("Unpoly 3+ only aborts requests targeting the same fragment. Setting [up-solo=false] or { solo: false } may no longer be necessary."),t.abort=!1),up.migrate.fixKey(t,"keep","useKeep"),up.migrate.fixKey(t,"hungry","useHungry"),up.migrate.fixKey(t,"failOnFinished","onFailFinished"),e.isString(t.reveal)?(up.migrate.deprecated(`Option { reveal: '${t.reveal}' }`,`{ scroll: '${t.reveal}' }`),t.scroll=t.reveal):!0===t.reveal?(up.migrate.deprecated("Option { reveal: true }","{ scroll: 'target' }"),t.scroll="target"):!1===t.reveal&&(up.migrate.deprecated("Option { reveal: false }","{ scroll: false }"),t.scroll=!1),e.isDefined(t.resetScroll)&&(up.migrate.deprecated("Option { resetScroll: true }","{ scroll: 'reset' }"),t.scroll="teset"),e.isDefined(t.restoreScroll)&&(up.migrate.deprecated("Option { restoreScroll: true }","{ scroll: 'restore' }"),t.scroll="restore")},up.migrate.postprocessReloadOptions=function(e){var t;let r,a=null===(t=e.headers)||void 0===t?void 0:t["If-Modified-Since"];r=a?Math.floor(.001*new Date(a)).toString():"0",e.headers[up.protocol.headerize("reloadFromTime")]=r};const t=/\[([\w-]+)(?:([~|^$*]?=)(["'])?([^\3\]]*?)\3)?]/g;up.migrate.resolveOrigin=function(e,{origin:r}={}){let a=new RegExp(t.source+"|&|:origin\\b","g");return e.replace(a,(function(t){return":origin"!==t&&"&"!==t?t:("&"===t&&up.migrate.deprecated("Origin shorthand '&'",":origin"),r?up.fragment.toTarget(r):void up.fail('Missing { origin } element to resolve "%s" reference (found in %s)',t,e))}))},up.migrate.removedEvent("up:fragment:kept","up:fragment:keep");let r=up.fragment.config.runScripts,a=!1;Object.defineProperty(up.fragment.config,"runScripts",{get:()=>r,set(e){r=e,a=!0}}),up.on("up:framework:boot",(function(){a||up.migrate.warn("Scripts within fragments are now executed. Configure up.fragment.config.runScripts to remove this warning.")})),up.compiler("[up-keep]",(function(t){let r=up.element.booleanOrStringAttr(t,"up-keep");e.isString(r)&&(up.migrate.warn('The [up-keep] attribute no longer supports a selector value. Elements will be matched by their derived target. You may prevent keeping with [up-on-keep="if(condition) event.preventDefault()"]. '),up.element.setMissingAttr(t,"up-on-keep",`if (!newFragment.matches(${JSON.stringify(r)})) event.preventDefault()`),t.setAttribute("up-keep",""))}))},234:()=>{up.migrate.renamedEvent("up:app:booted","up:framework:booted")},869:()=>{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:()=>{up.migrate.handleLayerOptions=function(e){up.migrate.fixKey(e,"flavor","mode"),up.migrate.fixKey(e,"closable","dismissable"),up.migrate.fixKey(e,"closeLabel","dismissLabel");for(let t of["width","maxWidth","height"])e[t]&&up.migrate.warn(`Layer option { ${t} } 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: '${e.layer}' } has been removed. Did you mean { layer: 'overlay' }?`),e.layer="overlay")},up.migrate.handleTetherOptions=function(e){const[t,r]=e.position.split("-");r&&(up.migrate.warn("The position value %o is deprecated. Use %o instead.",e.position,{position:t,align:r}),e.position=t,e.align=r)},up.migrate.registerLayerCloser=e=>e.registerClickCloser("up-close",((t,r)=>{up.migrate.deprecated("[up-close]","[up-dismiss]"),e.dismiss(t,r)})),up.migrate.handleLayerConfig=e=>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:()=>{up.migrate.parseFollowOptions=function(e){e.string("flavor"),e.string("width"),e.string("height"),e.boolean("closable"),e.booleanOrString("solo"),e.booleanOrString("reveal"),e.boolean("resetScroll"),e.boolean("restoreScroll"),e.booleanOrString("historyVisible"),e.booleanOrString("clearCache")},up.migrate.targetMacro("up-dash",{"up-preload":"","up-instant":""},(()=>up.migrate.deprecated("a[up-dash]","up.link.config.instantSelectors and up.link.config.preloadSelectors"))),up.migrate.renamedAttribute("up-delay","up-preload-delay",{scope:up.link.preloadSelector})},992:()=>{const e=up.util;up.migrate=function(){const t=new up.Config((()=>({logLevel:"warn"}))),r={},a={};function p(e){let t=r[e];if(t)return o(`Event ${e} has been renamed to ${t}`),t;if(e in a){let t=`Event ${e} has been removed`,r=a[e];return r&&(t+=`. Use ${r} instead.`),o(t),e}return e}const u={};function o(r,...a){const p=e.sprintf(r,...a);u[p]||(u[p]=!0,up.log[t.logLevel]("unpoly-migrate",r,...a))}return up.on("up:framework:reset",(function(){t.reset()})),{deprecated:function(e,t){o(`${e} has been deprecated. Use ${t} instead.`)},renamedPackage:function(e,t){Object.defineProperty(up,e,{get:()=>(o(`up.${e} has been renamed to up.${t}`),up[t])})},renamedProperty:function(t,r,a,p){const u=e.memoize((()=>p?o(p):o("Property { %s } has been renamed to { %s } (found in %o)",r,a,t)));Object.defineProperty(t,r,{get(){return u(),this[a]},set(e){u(),this[a]=e}})},removedProperty:function(t,r,a){const p=e.memoize((()=>a?o(a):o("Property { %s } has been removed without replacement (found in %o)",r,t)));let u=t[r];Object.defineProperty(t,r,{get:()=>(p(),u),set(e){p(),u=e}})},forbiddenPropertyValue:function(e,t,r,a){let p=e[t];Object.defineProperty(e,t,{get:()=>p,set(e){if(e===r)throw new Error(a);p=e}})},renamedAttribute:function(e,t,{scope:r,mapValue:a}={}){let p=r||`[${e}]`;up.macro(p,{priority:-1e3},(function(r){if(r.hasAttribute(e)){o("Attribute [%s] has been renamed to [%s] (found in %o)",e,t,r);let p=r.getAttribute(e);a&&(p=a(p)),r.setAttribute(t,p),r.removeAttribute(e)}}))},formerlyAsync:function(e){const t=Promise.resolve(),r=t.then;return t.then=function(){return o(`${e} no longer returns a promise`),r.apply(this,arguments)},t},renamedEvent:function(e,t){r[e]=t},removedEvent:function(e,t=null){a[e]=t},fixEventTypes:function(t){return e.uniq(e.map(t,p))},fixKey:function(t,r,a){e.isDefined(t[r])&&(o("Property { %s } has been renamed to { %s } (found in %o)",r,a,t),e.renameKey(t,r,a))},warn:o,loaded:!0,config:t}}()},413:()=>{const e=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:(e,t={})=>(up.migrate.deprecated("up.modal.visit(url)",'up.layer.open({ url, mode: "modal" })'),up.layer.open(Object.assign(Object.assign({},t),{url:e,mode:"modal"}))),follow:(e,t={})=>(up.migrate.deprecated("up.modal.follow(link)",'up.follow(link, { layer: "modal" })'),up.follow(e,Object.assign(Object.assign({},t),{layer:"modal"}))),extract:(e,t,r={})=>(up.migrate.deprecated("up.modal.extract(target, document)",'up.layer.open({ document, mode: "modal" })'),up.layer.open(Object.assign(Object.assign({},r),{target:e,html:t,layer:"modal"}))),close:(e={})=>(up.migrate.deprecated("up.modal.close()","up.layer.dismiss()"),up.layer.dismiss(null,e),up.migrate.formerlyAsync("up.layer.dismiss()")),url:()=>(up.migrate.deprecated("up.modal.url()","up.layer.location"),up.layer.location),coveredUrl(){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:e=>(up.migrate.deprecated("up.modal.contains()","up.layer.contains()"),up.layer.contains(e)),isOpen:()=>(up.migrate.deprecated("up.modal.isOpen()","up.layer.isOverlay()"),up.layer.isOverlay()),get flavors(){throw e},flavor(){throw e}},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"},(()=>up.migrate.deprecated("a[up-modal]",'a[up-layer="new modal"]'))),up.migrate.targetMacro("up-drawer",{"up-layer":"new drawer"},(()=>up.migrate.deprecated("a[up-drawer]",'a[up-layer="new drawer"]')))},885:()=>{const 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:offline"),up.migrate.renamedEvent("up:request:fatal","up:request:offline"),up.migrate.renamedEvent("up:proxy:aborted","up:request:aborted"),up.migrate.renamedEvent("up:proxy:slow","up:network:late"),up.migrate.renamedEvent("up:proxy:recover","up:network:recover"),up.migrate.renamedEvent("up:request:late","up:network:late"),up.migrate.renamedEvent("up:request:recover","up:network:recover");const t=()=>up.migrate.deprecated("up.proxy.config.preloadDelay","up.link.config.preloadDelay");Object.defineProperty(up.network.config,"preloadDelay",{get:()=>(t(),up.link.config.preloadDelay),set(e){t(),up.link.config.preloadDelay=e}}),up.migrate.renamedProperty(up.network.config,"maxRequests","concurrency"),up.migrate.renamedProperty(up.network.config,"slowDelay","badResponseTime"),up.migrate.renamedProperty(up.network.config,"cacheExpiry","cacheExpireAge",'The configuration up.network.config.cacheExpiry has been renamed to up.network.config.cacheExpireAge. Note that Unpoly 3+ automatically reloads cached content after rendering to ensure users always see fresh data ("cache revalidation"). Setting a custom expiry may no longer be necessary.'),up.migrate.renamedProperty(up.network.config,"clearCache","expireCache"),up.migrate.forbiddenPropertyValue(up.network.config,"cacheSize",0,"Disabling the cache with up.network.config.cacheSize = 0 is no longer supported. To disable automatic caching during navigation, set up.fragment.config.navigateOptions.cache = false instead."),up.network.config.requestMetaKeys=[],up.migrate.removedProperty(up.network.config,"requestMetaKeys","The configuration up.network.config.requestMetaKeys has been removed. Servers that optimize responses based on request headers should instead set a Vary response header."),up.migrate.handleRequestOptions=function(e){up.migrate.fixKey(e,"clearCache","expireCache"),e.solo&&up.migrate.warn("The option up.request({ solo }) has been removed. Use up.network.abort() or up.fragment.abort() instead.")},up.ajax=function(...e){return up.migrate.deprecated("up.ajax()","up.request()"),up.request(...e).then((e=>e.text))},up.network.clear=function(){up.migrate.deprecated("up.proxy.clear()","up.cache.expire()"),up.cache.expire()},up.Request.Cache.prototype.clear=function(...e){up.migrate.deprecated("up.cache.clear()","up.cache.expire()"),this.expire(...e)},up.network.preload=function(...e){return up.migrate.deprecated("up.proxy.preload(link)","up.link.preload(link)"),up.link.preload(...e)},up.migrate.preprocessAbortArgs=function(t){2===t.length&&e.isString(t[1])&&(up.migrate.warn("up.network.abort() no longer takes a reason as a second argument. Pass it as { reason } option instead."),t[1]={reason:t[1]})},up.network.isIdle=function(){return up.migrate.deprecated("up.network.isIdle()","!up.network.isBusy()"),!up.network.isBusy()},up.Request.prototype.navigate=function(){up.migrate.deprecated("up.Request#navigate()","up.Request#loadPage()"),this.loadPage()},up.migrate.renamedProperty(up.Request.prototype,"preload","background"),up.Response.prototype.isSuccess=function(){return up.migrate.deprecated("up.Response#isSuccess()","up.Response#ok"),this.ok},up.Response.prototype.getHeader=function(e){return up.migrate.deprecated("up.Response#getHeader()","up.Response#header()"),this.header(e)},up.Response.prototype.isError=function(){return up.migrate.deprecated("up.Response#isError()","!up.Response#ok"),!this.ok};const r=up.network.config.progressBar;function a(){up.network.config.progressBar=function(){return function(){const t=up.EventListener.allNonDefault(document);return e.find(t,(e=>"up:network:late"===e.eventType))}()?(up.migrate.warn("Disabled the default progress bar as may have built a custom loading indicator with your up:network:late listener. Please set up.network.config.progressBar to true or false."),!1):r}}a(),up.on("up:framework:reset",a)},69:()=>{up.popup={attach:(e,t={})=>(e=up.fragment.get(e),up.migrate.deprecated("up.popup.attach(origin)","up.layer.open({ origin, layer: 'popup' })"),up.layer.open(Object.assign(Object.assign({},t),{origin:e,layer:"popup"}))),close:(e={})=>(up.migrate.deprecated("up.popup.close()","up.layer.dismiss()"),up.layer.dismiss(null,e),up.migrate.formerlyAsync("up.layer.dismiss()")),url:()=>(up.migrate.deprecated("up.popup.url()","up.layer.location"),up.layer.location),coveredUrl(){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:e=>(up.migrate.deprecated("up.popup.contains()","up.layer.contains()"),up.layer.contains(e)),isOpen:()=>(up.migrate.deprecated("up.popup.isOpen()","up.layer.isOverlay()"),up.layer.isOverlay()),sync:()=>(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"},(()=>up.migrate.deprecated("[up-popup]",'[up-layer="new popup"]')))},677:()=>{up.migrate.clearCacheFromXHR=function(e){let t=e.getResponseHeader("X-Up-Clear-Cache");if(t)return up.migrate.deprecated("X-Up-Clear-Cache","X-Up-Expire-Cache"),"false"!==t&&t},up.migrate.titleFromXHR=function(e){let t=e.getResponseHeader("X-Up-Title");if(t){if("false"===t)return!1;if('"'!==t[0])return up.migrate.warn("X-Up-Title must now be a JSON-encoded string"),t}}},228:()=>{up.migrate.renamedProperty(up.radio.config,"hungry","hungrySelectors")},629:()=>{const e=up.util,t=up.element;up.migrate.postCompile=function(t,r){let a;if(a=r.keep){up.migrate.warn("The { keep: true } option for up.compiler() has been removed. Have the compiler set [up-keep] attribute instead.");const r=e.isString(a)?a:"";for(let e of t)e.setAttribute("up-keep",r)}},up.migrate.targetMacro=function(r,a,p){up.macro(`[${r}]`,(function(u){let o;const n=e.copy(a);(o=u.getAttribute(r))?n["up-target"]=o:n["up-follow"]="",t.setMissingAttrs(u,n),u.removeAttribute(r),null==p||p()}))},up.$compiler=function(e,...t){let r=t.pop();up.compiler(...t,(function(e,...t){let a=jQuery(e);return r(a,...t)}))},up.$macro=function(e,...t){let r=t.pop();up.macro(...t,(function(e,...t){let a=jQuery(e);return r(a,...t)}))}},197:()=>{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:()=>{up.util.only=function(e,...t){return up.migrate.deprecated("up.util.only(object, ...keys)","up.util.pick(object, keys)"),up.util.pick(e,t)},up.util.except=function(e,...t){return up.migrate.deprecated("up.util.except(object, ...keys)","up.util.omit(object, keys)"),up.util.omit(e,t)},up.util.parseUrl=function(...e){return up.migrate.deprecated("up.util.parseUrl()","up.util.parseURL()"),up.util.parseURL(...e)},up.util.any=function(...e){return up.migrate.deprecated("up.util.any()","up.util.some()"),up.util.some(...e)},up.util.all=function(...e){return up.migrate.deprecated("up.util.all()","up.util.every()"),up.util.every(...e)},up.util.detect=function(...e){return up.migrate.deprecated("up.util.detect()","up.util.find()"),up.util.find(...e)},up.util.select=function(...e){return up.migrate.deprecated("up.util.select()","up.util.filter()"),up.util.filter(...e)},up.util.setTimer=function(...e){return up.migrate.deprecated("up.util.setTimer()","up.util.timer()"),up.util.timer(...e)},up.util.escapeHtml=function(...e){return up.migrate.deprecated("up.util.escapeHtml()","up.util.escapeHTML()"),up.util.escapeHTML(...e)},up.util.selectorForElement=function(...e){return up.migrate.deprecated("up.util.selectorForElement()","up.fragment.toTarget()"),up.fragment.toTarget(...e)},up.util.nextFrame=function(...e){return up.migrate.deprecated("up.util.nextFrame()","up.util.task()"),up.util.task(...e)},up.util.times=function(e,t){up.migrate.deprecated("up.util.times()","a `for` loop");for(let r=0;r<e;r++)t()},up.util.assign=function(...e){return up.migrate.deprecated("up.util.assign()","Object.assign()"),Object.assign(...e)},up.util.values=function(...e){return up.migrate.deprecated("up.util.values()","Object.values()"),Object.values(...e)}},338:()=>{up.migrate.renamedPackage("layout","viewport"),up.migrate.renamedProperty(up.viewport.config,"viewports","viewportSelectors"),up.migrate.renamedProperty(up.viewport.config,"snap","revealSnap"),up.migrate.removedProperty(up.viewport.config,"scrollSpeed"),up.viewport.closest=function(...e){return up.migrate.deprecated("up.viewport.closest()","up.viewport.get()"),up.viewport.get(...e)},up.viewport.scroll=function(e,t,r={}){return(e=up.fragment.get(e,r)).scrollTo(Object.assign(Object.assign({},r),{top:t})),up.migrate.formerlyAsync("up.scroll()")},up.scroll=up.viewport.scroll}},t={};function r(a){var p=t[a];if(void 0!==p)return p.exports;var u=t[a]={exports:{}};return e[a](u,u.exports,r),u.exports}up.framework.startExtension(),r(992),r(480),r(294),r(700),r(394),r(629),r(305),r(354),r(234),r(869),r(729),r(969),r(905),r(413),r(69),r(197),r(677),r(885),r(228),r(338),up.framework.stopExtension()})();
|
data/assets/unpoly/unpoly.es6.js
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
/***/ (() => {
|
6
6
|
|
7
7
|
window.up = {
|
8
|
-
version: '3.0.0
|
8
|
+
version: '3.0.0'
|
9
9
|
};
|
10
10
|
|
11
11
|
|
@@ -9715,19 +9715,14 @@ up.form = (function () {
|
|
9715
9715
|
function disableContainer(container) {
|
9716
9716
|
let focusedElement = document.activeElement;
|
9717
9717
|
let focusFallback;
|
9718
|
-
let
|
9719
|
-
|
9720
|
-
|
9721
|
-
|
9722
|
-
focusFallback = focusedGroup;
|
9723
|
-
}
|
9724
|
-
else {
|
9725
|
-
focusFallback = container;
|
9718
|
+
let controls = [...findFields(container), ...findSubmitButtons(container)];
|
9719
|
+
for (let control of controls) {
|
9720
|
+
if (control === focusedElement) {
|
9721
|
+
focusFallback = findGroup(focusedElement);
|
9726
9722
|
}
|
9723
|
+
raiseDisableStack(control);
|
9727
9724
|
}
|
9728
|
-
|
9729
|
-
controls.forEach(raiseDisableStack);
|
9730
|
-
if (focusFallback && !focusFallback.contains(document.activeElement)) {
|
9725
|
+
if (focusFallback) {
|
9731
9726
|
up.focus(focusFallback, { force: true, preventScroll: true });
|
9732
9727
|
}
|
9733
9728
|
return function () {
|