unpoly-rails 3.6.0 → 3.6.1

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: b26e62c5e7ca75356b1e887e80541b94a50061393bf794d5e455bb3e8257259b
4
- data.tar.gz: 3e9bc78d2b2cd9a07628bbe97c3ca167005c20faa00275e16354d5d9e1743556
3
+ metadata.gz: 7c8c2c02b348c0256c77c48d3d590a46fa3ae51221271377fc1638ddb544cb8b
4
+ data.tar.gz: 610b68d2d8826dc24d966b361de922d0adda7679e84464d4752a70adffe35cf5
5
5
  SHA512:
6
- metadata.gz: a70923896bc671f3541a02c468e7ec1f3b8705d9954525650a1080e0abdb4b34d181cd47bf53150cfea0de5fd6e9b3c03fc214169ee594032d0ee3e6493e6297
7
- data.tar.gz: 7d888543baad42a70d485ac5b5d3b7d077a8befe7630ac9e19321f04313c5dad2a6c0367f4e8aeb24e42750845176b1c95b90389a4f786fe051173ee18c26ebd
6
+ metadata.gz: 5213014b96a1027a6c580cbbe9921ac7a1bf5206289c6d0ea57406d974d693f970757b3b61cb0f5e74663186ff24a0fd68d9bb4d30138ba4c6d5db49efe7e345
7
+ data.tar.gz: 680456e68afb8bfad1419410943725d8f482eae74dc40f3cad6646d888a558f647d6a484af8d4c7c430604d47214b38603f0b4a546abfd165b49dfff75da76f3
@@ -5,7 +5,7 @@
5
5
  /***/ (() => {
6
6
 
7
7
  window.up = {
8
- version: '3.6.0'
8
+ version: '3.6.1'
9
9
  };
10
10
 
11
11
 
@@ -2299,7 +2299,7 @@ up.Change.OpenLayer = class OpenLayer extends up.Change.Addition {
2299
2299
  _handleHistory() {
2300
2300
  var _a;
2301
2301
  if (this.layer.history === 'auto') {
2302
- this.layer.history = up.fragment.hasAutoHistory(this._content);
2302
+ this.layer.history = up.fragment.hasAutoHistory([this._content], this.layer);
2303
2303
  }
2304
2304
  let { parent } = this.layer;
2305
2305
  (_a = this.layer).history && (_a.history = parent.history);
@@ -2477,7 +2477,7 @@ up.Change.UpdateLayer = (_a = class UpdateLayer extends up.Change.Addition {
2477
2477
  }
2478
2478
  _hasAutoHistory() {
2479
2479
  const oldFragments = u.map(this._steps, 'oldElement');
2480
- return u.some(oldFragments, up.fragment.hasAutoHistory);
2480
+ return up.fragment.hasAutoHistory(oldFragments, this.layer);
2481
2481
  }
2482
2482
  _getEffectiveRenderOptions() {
2483
2483
  return Object.assign(Object.assign({}, this.options), { layer: this.layer, history: this._hasHistory() });
@@ -8664,14 +8664,15 @@ up.fragment = (function () {
8664
8664
  }
8665
8665
  return steps;
8666
8666
  }
8667
- function hasAutoHistory(fragment) {
8668
- if (contains(fragment, config.autoHistoryTargets)) {
8669
- return true;
8670
- }
8671
- else {
8672
- up.puts('up.render()', "Will not auto-update history because fragment doesn't contain a selector from up.fragment.config.autoHistoryTargets");
8673
- return false;
8667
+ function hasAutoHistory(newFragments, layer) {
8668
+ let vanillaSelector = expandTargets(config.autoHistoryTargets, { layer }).join();
8669
+ for (let newFragment of newFragments) {
8670
+ if (e.subtree(newFragment, vanillaSelector).length) {
8671
+ return true;
8672
+ }
8674
8673
  }
8674
+ up.puts('up.render()', "Will not auto-update history because fragment doesn't contain a selector from up.fragment.config.autoHistoryTargets");
8675
+ return false;
8675
8676
  }
8676
8677
  function matches(element, selector, options = {}) {
8677
8678
  element = e.get(element);