unpoly-rails 3.9.1 → 3.9.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9b3e033836763ee60b20515f00296655df9b6bf18b4375c9914490fc30483241
4
- data.tar.gz: e4011d6357e3386499c905674fc95deb96ecaaccfce44c05576a6dcd2e01b391
3
+ metadata.gz: d2c3e3f16e60500d2464237ee852af167d26afeda07e02acb0169eb2925a7a88
4
+ data.tar.gz: a1cdcf1e69c6a2e5bfc5639f72e878b63323b6ea2fcdf7f2f7dd1fc30b250483
5
5
  SHA512:
6
- metadata.gz: 27f72dd8909578a5791049c58334546707be581ca0e5e3638f5a841fa960d01db2f11dc52a62c9e90129888562e4bb0e7e1f5c44e50821b99ab93f1f324efc9a
7
- data.tar.gz: f58dd3ed673d0276b1f00308378c89c184720d9a80b890c82784ac3114ca4844b24bb7ac077e60a94800d3d4b4ed820f28b2d77d4f6f8a3ac72b175e4d1a62a5
6
+ metadata.gz: d5f5815d06d9c08b26daa9d72adac45fc603f524d45b4c621b3a83f9418b916ba5aa6541c515610db36da0245744b85bdd1e63faf10bad2a5a632f84fcbcefbc
7
+ data.tar.gz: b3b940b2780ec684381eedf0b07eeea537f28227b7d86bf6882806a96ccaa6e50f70818f717ed45e504f245e141cab0137d1bdd21e75baf493a808cb90e7f160
@@ -5,7 +5,7 @@
5
5
  /***/ (() => {
6
6
 
7
7
  window.up = {
8
- version: '3.9.1'
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.layers;
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, lookupLayers(options), preloadOverrides(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 lookupLayers(options) {
6090
- return {
6091
- layers: up.layer.getAll(options),
6092
- normalizeLayerOptions: false,
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 = lookupLayers(overrides);
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
  }