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 +4 -4
- data/assets/unpoly/unpoly.es6.js +11 -10
- data/assets/unpoly/unpoly.es6.min.js +1 -1
- data/assets/unpoly/unpoly.js +11 -10
- data/assets/unpoly/unpoly.min.js +1 -1
- data/lib/unpoly/rails/change/field_definition.rb +1 -1
- data/lib/unpoly/rails/change.rb +2 -1
- data/lib/unpoly/rails/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 305be7f4a49208ba4af3e8b4d1f9b7a2695311c62b0a95ce03d6ac458673e8b9
|
4
|
+
data.tar.gz: f876d195d0d14b4cfb8024272cbe05b2ad8366676e76dfce79eaf154c7512406
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 79686bcaf90b78f5765e1395f83d77c33b12740dee97d4ce90541c0e8bacfc3e9e523beceee69307c33ffb5f729b50cb23e3de3d94acbf40fe26a0d115397670
|
7
|
+
data.tar.gz: d4af3079cf4b432686184797e3ce63891f02929d344e8927aed19d8edf83586de76f35ac22abf155f0c9c2965944be45792dbf7c847c99b805a67fa1ac42c94e
|
data/assets/unpoly/unpoly.es6.js
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
/***/ (() => {
|
6
6
|
|
7
7
|
window.up = {
|
8
|
-
version: '3.6.
|
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
|
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(
|
8668
|
-
|
8669
|
-
|
8670
|
-
|
8671
|
-
|
8672
|
-
|
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);
|