unpoly-rails 3.9.1 → 3.9.2.1
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.es6.js +21 -10
- data/assets/unpoly/unpoly.es6.min.js +1 -1
- data/assets/unpoly/unpoly.js +21 -10
- data/assets/unpoly/unpoly.min.js +1 -1
- data/lib/unpoly/rails/util.rb +13 -7
- data/lib/unpoly/rails/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 79d3f5ddf6f561f66076b280f84e1fd3ed1316a0f637dd523e7dd5b849ed3da2
|
4
|
+
data.tar.gz: 54c53c6d4b275b167ad05710d3bc27cab77c20e2ddf4cbc29583865c619a328d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b521facc126c240a43ad81f61b6db302f3756c3b6d6cea330b76f9e7381bd147d2e2274a9f5dba6cc8759f603a30ff9d7e7c2d68e5abbf4ce23c3e4d8023fc92
|
7
|
+
data.tar.gz: 81b3fcfab6706e0c0e9b78c64a6420eb148796c521ed4a7e0392addb82b1e7a6f7edc74dcfb8fe691977362499509685c5fd5913e57ec21b6d64f6f389e55683
|
data/assets/unpoly/unpoly.es6.js
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
/***/ (() => {
|
6
6
|
|
7
7
|
window.up = {
|
8
|
-
version: '3.9.
|
8
|
+
version: '3.9.2'
|
9
9
|
};
|
10
10
|
|
11
11
|
|
@@ -2966,7 +2966,7 @@ up.Change.FromContent = (_a = class FromContent extends up.Change {
|
|
2966
2966
|
super(options);
|
2967
2967
|
this._origin = options.origin;
|
2968
2968
|
this._preview = options.preview;
|
2969
|
-
this._layers = options
|
2969
|
+
this._layers = up.layer.getAll(options);
|
2970
2970
|
}
|
2971
2971
|
_getPlans() {
|
2972
2972
|
let plans = [];
|
@@ -5244,7 +5244,10 @@ up.LayerLookup = (_a = class LayerLookup {
|
|
5244
5244
|
}
|
5245
5245
|
}
|
5246
5246
|
_getOriginLayer() {
|
5247
|
-
let { origin } = this._options;
|
5247
|
+
let { origin, originLayer } = this._options;
|
5248
|
+
if (originLayer) {
|
5249
|
+
return originLayer;
|
5250
|
+
}
|
5248
5251
|
if (origin) {
|
5249
5252
|
return this._forElement(origin);
|
5250
5253
|
}
|
@@ -6045,6 +6048,7 @@ up.RenderOptions = (function () {
|
|
6045
6048
|
'confirm',
|
6046
6049
|
'feedback',
|
6047
6050
|
'origin',
|
6051
|
+
'originLayer',
|
6048
6052
|
'baseLayer',
|
6049
6053
|
'fail',
|
6050
6054
|
'onError',
|
@@ -6075,6 +6079,11 @@ up.RenderOptions = (function () {
|
|
6075
6079
|
return up.fragment.config.navigateOptions;
|
6076
6080
|
}
|
6077
6081
|
}
|
6082
|
+
function normalizeURL({ url }) {
|
6083
|
+
if (url) {
|
6084
|
+
return { url: u.normalizeURL(url) };
|
6085
|
+
}
|
6086
|
+
}
|
6078
6087
|
function preloadOverrides(options) {
|
6079
6088
|
if (options.preload) {
|
6080
6089
|
return PRELOAD_OVERRIDES;
|
@@ -6084,13 +6093,14 @@ up.RenderOptions = (function () {
|
|
6084
6093
|
var _a, _b;
|
6085
6094
|
(_b = (_a = up.migrate).preprocessRenderOptions) === null || _b === void 0 ? void 0 : _b.call(_a, options);
|
6086
6095
|
const defaults = u.merge(GLOBAL_DEFAULTS, navigateDefaults(options));
|
6087
|
-
return u.merge(u.omit(defaults, LATE_KEYS), { defaults }, { inputDevice: up.event.inputDevice }, options,
|
6096
|
+
return u.merge(u.omit(defaults, LATE_KEYS), { defaults }, { inputDevice: up.event.inputDevice }, options, normalizeURL(options), rememberOriginLayer(options), preloadOverrides(options));
|
6088
6097
|
}
|
6089
|
-
function
|
6090
|
-
|
6091
|
-
|
6092
|
-
|
6093
|
-
|
6098
|
+
function rememberOriginLayer({ origin, originLayer }) {
|
6099
|
+
if (origin && !originLayer) {
|
6100
|
+
return {
|
6101
|
+
originLayer: up.layer.get(origin),
|
6102
|
+
};
|
6103
|
+
}
|
6094
6104
|
}
|
6095
6105
|
function finalize(preprocessedOptions, lateDefaults) {
|
6096
6106
|
return u.merge(preprocessedOptions.defaults, lateDefaults, preprocessedOptions);
|
@@ -6118,7 +6128,7 @@ up.RenderOptions = (function () {
|
|
6118
6128
|
}
|
6119
6129
|
function deriveFailOptions(preprocessedOptions) {
|
6120
6130
|
let overrides = failOverrides(preprocessedOptions);
|
6121
|
-
let layers =
|
6131
|
+
let layers = rememberOriginLayer(overrides);
|
6122
6132
|
if (preprocessedOptions.failOptions) {
|
6123
6133
|
return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, preprocessedOptions.defaults), u.pick(preprocessedOptions, SHARED_KEYS)), overrides), layers), { failPrefixForced: true });
|
6124
6134
|
}
|
@@ -6131,6 +6141,7 @@ up.RenderOptions = (function () {
|
|
6131
6141
|
finalize,
|
6132
6142
|
assertContentGiven,
|
6133
6143
|
deriveFailOptions,
|
6144
|
+
lookupLayers: rememberOriginLayer,
|
6134
6145
|
};
|
6135
6146
|
})();
|
6136
6147
|
|