unpoly-rails 3.6.0 → 3.6.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b26e62c5e7ca75356b1e887e80541b94a50061393bf794d5e455bb3e8257259b
4
- data.tar.gz: 3e9bc78d2b2cd9a07628bbe97c3ca167005c20faa00275e16354d5d9e1743556
3
+ metadata.gz: 305be7f4a49208ba4af3e8b4d1f9b7a2695311c62b0a95ce03d6ac458673e8b9
4
+ data.tar.gz: f876d195d0d14b4cfb8024272cbe05b2ad8366676e76dfce79eaf154c7512406
5
5
  SHA512:
6
- metadata.gz: a70923896bc671f3541a02c468e7ec1f3b8705d9954525650a1080e0abdb4b34d181cd47bf53150cfea0de5fd6e9b3c03fc214169ee594032d0ee3e6493e6297
7
- data.tar.gz: 7d888543baad42a70d485ac5b5d3b7d077a8befe7630ac9e19321f04313c5dad2a6c0367f4e8aeb24e42750845176b1c95b90389a4f786fe051173ee18c26ebd
6
+ metadata.gz: 79686bcaf90b78f5765e1395f83d77c33b12740dee97d4ce90541c0e8bacfc3e9e523beceee69307c33ffb5f729b50cb23e3de3d94acbf40fe26a0d115397670
7
+ data.tar.gz: d4af3079cf4b432686184797e3ce63891f02929d344e8927aed19d8edf83586de76f35ac22abf155f0c9c2965944be45792dbf7c847c99b805a67fa1ac42c94e
@@ -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);