unpoly-rails 3.9.0 → 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: f7c1e0f71ada21392d778afe64b9bfb7ed2b495c9d2d4a7973d665e6f99c397b
4
- data.tar.gz: cb220c5418937ddb3b410b3ff7faf8a9a76f1600feb4e378ea61a08426f99d63
3
+ metadata.gz: d2c3e3f16e60500d2464237ee852af167d26afeda07e02acb0169eb2925a7a88
4
+ data.tar.gz: a1cdcf1e69c6a2e5bfc5639f72e878b63323b6ea2fcdf7f2f7dd1fc30b250483
5
5
  SHA512:
6
- metadata.gz: 5509a646c9b670ca295c80fa72147e17878aea0b996feb77800400f6cd0abc455dede0fd446634befe19021fbf714b14882cb33861883e5f872dc379d73eeb53
7
- data.tar.gz: a93767ae96294e4cc78fefb618daa0d775e04716e82134afe07bf8cd03874ea9151512fd9af28cf1caacebadf2ff7b1d3f6a435556822f1f9e8e774376a86c70
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.0'
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
  }
@@ -9923,7 +9933,7 @@ up.link = (function () {
9923
9933
  noInstantSelectors: ['[up-instant=false]', '[onclick]'],
9924
9934
  preloadSelectors: ['[up-preload]'],
9925
9935
  noPreloadSelectors: ['[up-preload=false]'],
9926
- clickableSelectors: ['[up-clickable]', '[up-follow]', '[up-emit]', '[up-accept]', '[up-dismiss]', ATTRS_SUGGESTING_FOLLOW],
9936
+ clickableSelectors: ['[up-clickable]', '[up-follow]', '[up-emit]', '[up-accept]', '[up-dismiss]', `a:is(${ATTRS_SUGGESTING_FOLLOW})`],
9927
9937
  noClickableSelectors: ['[up-clickable=false]', DEFAULT_INTERACTIVE_ELEMENT],
9928
9938
  preloadDelay: 90,
9929
9939
  }));