unpoly-rails 3.9.2.1 → 3.9.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/assets/unpoly/unpoly.css +1 -0
- data/assets/unpoly/unpoly.es6.js +23 -16
- data/assets/unpoly/unpoly.es6.min.js +1 -1
- data/assets/unpoly/unpoly.js +23 -16
- data/assets/unpoly/unpoly.min.css +1 -1
- data/assets/unpoly/unpoly.min.js +1 -1
- data/lib/unpoly/rails/change/field_definition.rb +14 -12
- data/lib/unpoly/rails/change.rb +1 -1
- data/lib/unpoly/rails/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2d0961d6da17269704c3914a1bd6f463ac7f931d251b179453f3797820f7d2d1
|
4
|
+
data.tar.gz: 1c4bc996317ff4376f4e298b9d017dbb65942ae5067f2391aa065367752b187f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7e3a92a2971f56069461c95ff0362f9680a1d71c6d4c014825e390c18f1a7c082f5b361282c33cced2d2c5ef6bc623839d9492f49914cec9b1d1a11425bb47cb
|
7
|
+
data.tar.gz: 905a9721877b5730c41c0823f9a9a2c3760caf98a1c4fd17bf7f2eacae02768266612177c794b7008f7b6e110816faed18313ee64a1e2713d25bb3dda85f4a76
|
data/README.md
CHANGED
data/assets/unpoly/unpoly.css
CHANGED
data/assets/unpoly/unpoly.es6.js
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
/***/ (() => {
|
6
6
|
|
7
7
|
window.up = {
|
8
|
-
version: '3.9.
|
8
|
+
version: '3.9.3'
|
9
9
|
};
|
10
10
|
|
11
11
|
|
@@ -4743,6 +4743,7 @@ up.Layer.Overlay = class Overlay extends up.Layer {
|
|
4743
4743
|
'dismissable',
|
4744
4744
|
'dismissLabel',
|
4745
4745
|
'dismissAriaLabel',
|
4746
|
+
'trapFocus',
|
4746
4747
|
'onOpened',
|
4747
4748
|
'onAccept',
|
4748
4749
|
'onAccepted',
|
@@ -5671,33 +5672,38 @@ up.OverlayFocus = class OverlayFocus {
|
|
5671
5672
|
constructor(layer) {
|
5672
5673
|
this._layer = layer;
|
5673
5674
|
this._focusElement = this._layer.getFocusElement();
|
5675
|
+
this._trapFocus = this._layer.trapFocus;
|
5674
5676
|
}
|
5675
5677
|
moveToFront() {
|
5676
|
-
if (this.
|
5678
|
+
if (this._active) {
|
5677
5679
|
return;
|
5678
5680
|
}
|
5679
|
-
this.
|
5680
|
-
this._untrapFocus = up.on('focusin', event => this._onFocus(event));
|
5681
|
+
this._active = true;
|
5681
5682
|
this._unsetAttrs = e.setTemporaryAttrs(this._focusElement, {
|
5682
5683
|
'tabindex': '0',
|
5683
5684
|
'role': 'dialog',
|
5684
|
-
'aria-modal':
|
5685
|
+
'aria-modal': this._trapFocus.toString()
|
5685
5686
|
});
|
5686
|
-
|
5687
|
-
|
5687
|
+
if (this._trapFocus) {
|
5688
|
+
this._untrapFocus = up.on('focusin', event => this._onFocus(event));
|
5689
|
+
this._focusTrapBefore = e.affix(this._focusElement, 'beforebegin', 'up-focus-trap[tabindex=0]');
|
5690
|
+
this._focusTrapAfter = e.affix(this._focusElement, 'afterend', 'up-focus-trap[tabindex=0]');
|
5691
|
+
}
|
5688
5692
|
}
|
5689
5693
|
moveToBack() {
|
5690
5694
|
this.teardown();
|
5691
5695
|
}
|
5692
5696
|
teardown() {
|
5693
|
-
if (!this.
|
5697
|
+
if (!this._active) {
|
5694
5698
|
return;
|
5695
5699
|
}
|
5696
|
-
this.
|
5697
|
-
this._untrapFocus();
|
5700
|
+
this._active = false;
|
5698
5701
|
this._unsetAttrs();
|
5699
|
-
this.
|
5700
|
-
|
5702
|
+
if (this._trapFocus) {
|
5703
|
+
this._untrapFocus();
|
5704
|
+
this._focusTrapBefore.remove();
|
5705
|
+
this._focusTrapAfter.remove();
|
5706
|
+
}
|
5701
5707
|
}
|
5702
5708
|
_onFocus(event) {
|
5703
5709
|
const { target } = event;
|
@@ -6141,7 +6147,6 @@ up.RenderOptions = (function () {
|
|
6141
6147
|
finalize,
|
6142
6148
|
assertContentGiven,
|
6143
6149
|
deriveFailOptions,
|
6144
|
-
lookupLayers: rememberOriginLayer,
|
6145
6150
|
};
|
6146
6151
|
})();
|
6147
6152
|
|
@@ -6693,13 +6698,13 @@ up.Request.Cache = class Cache {
|
|
6693
6698
|
}
|
6694
6699
|
reindex(request) {
|
6695
6700
|
this._delete(request);
|
6701
|
+
delete request.cacheRoute;
|
6696
6702
|
this.put(request);
|
6697
6703
|
}
|
6698
6704
|
_delete(request) {
|
6699
6705
|
var _a;
|
6700
6706
|
u.remove(this._requests, request);
|
6701
6707
|
(_a = request.cacheRoute) === null || _a === void 0 ? void 0 : _a.delete(request);
|
6702
|
-
delete request.cacheRoute;
|
6703
6708
|
}
|
6704
6709
|
_getRoute(request) {
|
6705
6710
|
var _a, _b;
|
@@ -9695,7 +9700,8 @@ up.layer = (function () {
|
|
9695
9700
|
dismissLabel: '×',
|
9696
9701
|
dismissAriaLabel: 'Dismiss dialog',
|
9697
9702
|
dismissable: true,
|
9698
|
-
history: 'auto'
|
9703
|
+
history: 'auto',
|
9704
|
+
trapFocus: true,
|
9699
9705
|
},
|
9700
9706
|
cover: {
|
9701
9707
|
mainTargets: ['[up-main~=cover]']
|
@@ -9728,7 +9734,8 @@ up.layer = (function () {
|
|
9728
9734
|
position: 'bottom',
|
9729
9735
|
size: 'medium',
|
9730
9736
|
align: 'left',
|
9731
|
-
dismissable: 'outside key'
|
9737
|
+
dismissable: 'outside key',
|
9738
|
+
trapFocus: false,
|
9732
9739
|
},
|
9733
9740
|
foreignOverlaySelectors: ['dialog']
|
9734
9741
|
};
|