govuk_publishing_components 45.10.0 → 46.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/stylesheets/govuk_publishing_components/_all_components.scss +1 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_glance-metric.scss +75 -0
- data/app/views/govuk_publishing_components/components/_fieldset.html.erb +1 -2
- data/app/views/govuk_publishing_components/components/_glance_metric.html.erb +37 -0
- data/app/views/govuk_publishing_components/components/_metadata.html.erb +10 -8
- data/app/views/govuk_publishing_components/components/_notice.html.erb +9 -6
- data/app/views/govuk_publishing_components/components/_organisation_logo.html.erb +5 -7
- data/app/views/govuk_publishing_components/components/_panel.html.erb +4 -2
- data/app/views/govuk_publishing_components/components/_phase_banner.html.erb +15 -14
- data/app/views/govuk_publishing_components/components/docs/fieldset.yml +1 -0
- data/app/views/govuk_publishing_components/components/docs/glance_metric.yml +37 -0
- data/app/views/govuk_publishing_components/components/docs/metadata.yml +1 -0
- data/app/views/govuk_publishing_components/components/docs/notice.yml +1 -0
- data/app/views/govuk_publishing_components/components/docs/organisation_logo.yml +1 -0
- data/app/views/govuk_publishing_components/components/docs/panel.yml +1 -0
- data/app/views/govuk_publishing_components/components/docs/phase_banner.yml +1 -1
- data/lib/govuk_publishing_components/presenters/component_wrapper_helper.rb +1 -1
- data/lib/govuk_publishing_components/version.rb +1 -1
- data/node_modules/axe-core/axe.js +3 -3
- data/node_modules/axe-core/axe.min.js +2 -2
- data/node_modules/axe-core/package.json +1 -1
- data/node_modules/axe-core/sri-history.json +4 -0
- data/node_modules/sortablejs/Sortable.js +59 -34
- data/node_modules/sortablejs/Sortable.min.js +2 -2
- data/node_modules/sortablejs/modular/sortable.complete.esm.js +59 -34
- data/node_modules/sortablejs/modular/sortable.core.esm.js +59 -34
- data/node_modules/sortablejs/modular/sortable.esm.js +59 -34
- data/node_modules/sortablejs/package.json +1 -1
- data/node_modules/sortablejs/src/Sortable.js +28 -11
- metadata +5 -2
@@ -1,5 +1,5 @@
|
|
1
1
|
/**!
|
2
|
-
* Sortable 1.15.
|
2
|
+
* Sortable 1.15.6
|
3
3
|
* @author RubaXa <trash@rubaxa.org>
|
4
4
|
* @author owenm <owen23355@gmail.com>
|
5
5
|
* @license MIT
|
@@ -128,7 +128,7 @@ function _nonIterableSpread() {
|
|
128
128
|
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
129
129
|
}
|
130
130
|
|
131
|
-
var version = "1.15.
|
131
|
+
var version = "1.15.6";
|
132
132
|
|
133
133
|
function userAgent(pattern) {
|
134
134
|
if (typeof window !== 'undefined' && window.navigator) {
|
@@ -1121,7 +1121,8 @@ function Sortable(el, options) {
|
|
1121
1121
|
x: 0,
|
1122
1122
|
y: 0
|
1123
1123
|
},
|
1124
|
-
|
1124
|
+
// Disabled on Safari: #1571; Enabled on Safari IOS: #2244
|
1125
|
+
supportPointer: Sortable.supportPointer !== false && 'PointerEvent' in window && (!Safari || IOS),
|
1125
1126
|
emptyInsertThreshold: 5
|
1126
1127
|
};
|
1127
1128
|
PluginManager.initializePlugins(this, el, defaults);
|
@@ -1232,7 +1233,7 @@ Sortable.prototype = /** @lends Sortable.prototype */{
|
|
1232
1233
|
pluginEvent('filter', _this, {
|
1233
1234
|
evt: evt
|
1234
1235
|
});
|
1235
|
-
preventOnFilter && evt.
|
1236
|
+
preventOnFilter && evt.preventDefault();
|
1236
1237
|
return; // cancel dnd
|
1237
1238
|
}
|
1238
1239
|
} else if (filter) {
|
@@ -1254,7 +1255,7 @@ Sortable.prototype = /** @lends Sortable.prototype */{
|
|
1254
1255
|
}
|
1255
1256
|
});
|
1256
1257
|
if (filter) {
|
1257
|
-
preventOnFilter && evt.
|
1258
|
+
preventOnFilter && evt.preventDefault();
|
1258
1259
|
return; // cancel dnd
|
1259
1260
|
}
|
1260
1261
|
}
|
@@ -1326,9 +1327,15 @@ Sortable.prototype = /** @lends Sortable.prototype */{
|
|
1326
1327
|
on(ownerDocument, 'dragover', nearestEmptyInsertDetectEvent);
|
1327
1328
|
on(ownerDocument, 'mousemove', nearestEmptyInsertDetectEvent);
|
1328
1329
|
on(ownerDocument, 'touchmove', nearestEmptyInsertDetectEvent);
|
1329
|
-
|
1330
|
-
|
1331
|
-
|
1330
|
+
if (options.supportPointer) {
|
1331
|
+
on(ownerDocument, 'pointerup', _this._onDrop);
|
1332
|
+
// Native D&D triggers pointercancel
|
1333
|
+
!this.nativeDraggable && on(ownerDocument, 'pointercancel', _this._onDrop);
|
1334
|
+
} else {
|
1335
|
+
on(ownerDocument, 'mouseup', _this._onDrop);
|
1336
|
+
on(ownerDocument, 'touchend', _this._onDrop);
|
1337
|
+
on(ownerDocument, 'touchcancel', _this._onDrop);
|
1338
|
+
}
|
1332
1339
|
|
1333
1340
|
// Make dragEl draggable (must be before delay for FireFox)
|
1334
1341
|
if (FireFox && this.nativeDraggable) {
|
@@ -1348,9 +1355,14 @@ Sortable.prototype = /** @lends Sortable.prototype */{
|
|
1348
1355
|
// If the user moves the pointer or let go the click or touch
|
1349
1356
|
// before the delay has been reached:
|
1350
1357
|
// disable the delayed drag
|
1351
|
-
|
1352
|
-
|
1353
|
-
|
1358
|
+
if (options.supportPointer) {
|
1359
|
+
on(ownerDocument, 'pointerup', _this._disableDelayedDrag);
|
1360
|
+
on(ownerDocument, 'pointercancel', _this._disableDelayedDrag);
|
1361
|
+
} else {
|
1362
|
+
on(ownerDocument, 'mouseup', _this._disableDelayedDrag);
|
1363
|
+
on(ownerDocument, 'touchend', _this._disableDelayedDrag);
|
1364
|
+
on(ownerDocument, 'touchcancel', _this._disableDelayedDrag);
|
1365
|
+
}
|
1354
1366
|
on(ownerDocument, 'mousemove', _this._delayedDragTouchMoveHandler);
|
1355
1367
|
on(ownerDocument, 'touchmove', _this._delayedDragTouchMoveHandler);
|
1356
1368
|
options.supportPointer && on(ownerDocument, 'pointermove', _this._delayedDragTouchMoveHandler);
|
@@ -1376,6 +1388,8 @@ Sortable.prototype = /** @lends Sortable.prototype */{
|
|
1376
1388
|
off(ownerDocument, 'mouseup', this._disableDelayedDrag);
|
1377
1389
|
off(ownerDocument, 'touchend', this._disableDelayedDrag);
|
1378
1390
|
off(ownerDocument, 'touchcancel', this._disableDelayedDrag);
|
1391
|
+
off(ownerDocument, 'pointerup', this._disableDelayedDrag);
|
1392
|
+
off(ownerDocument, 'pointercancel', this._disableDelayedDrag);
|
1379
1393
|
off(ownerDocument, 'mousemove', this._delayedDragTouchMoveHandler);
|
1380
1394
|
off(ownerDocument, 'touchmove', this._delayedDragTouchMoveHandler);
|
1381
1395
|
off(ownerDocument, 'pointermove', this._delayedDragTouchMoveHandler);
|
@@ -1396,7 +1410,6 @@ Sortable.prototype = /** @lends Sortable.prototype */{
|
|
1396
1410
|
}
|
1397
1411
|
try {
|
1398
1412
|
if (document.selection) {
|
1399
|
-
// Timeout neccessary for IE9
|
1400
1413
|
_nextTick(function () {
|
1401
1414
|
document.selection.empty();
|
1402
1415
|
});
|
@@ -1618,6 +1631,7 @@ Sortable.prototype = /** @lends Sortable.prototype */{
|
|
1618
1631
|
_this._dragStartId = _nextTick(_this._dragStarted.bind(_this, fallback, evt));
|
1619
1632
|
on(document, 'selectstart', _this);
|
1620
1633
|
moved = true;
|
1634
|
+
window.getSelection().removeAllRanges();
|
1621
1635
|
if (Safari) {
|
1622
1636
|
css(document.body, 'user-select', 'none');
|
1623
1637
|
}
|
@@ -1889,6 +1903,7 @@ Sortable.prototype = /** @lends Sortable.prototype */{
|
|
1889
1903
|
off(ownerDocument, 'mouseup', this._onDrop);
|
1890
1904
|
off(ownerDocument, 'touchend', this._onDrop);
|
1891
1905
|
off(ownerDocument, 'pointerup', this._onDrop);
|
1906
|
+
off(ownerDocument, 'pointercancel', this._onDrop);
|
1892
1907
|
off(ownerDocument, 'touchcancel', this._onDrop);
|
1893
1908
|
off(document, 'selectstart', this);
|
1894
1909
|
},
|
@@ -3080,28 +3095,38 @@ function MultiDragPlugin() {
|
|
3080
3095
|
var lastIndex = index(lastMultiDragSelect),
|
3081
3096
|
currentIndex = index(dragEl$1);
|
3082
3097
|
if (~lastIndex && ~currentIndex && lastIndex !== currentIndex) {
|
3083
|
-
|
3084
|
-
|
3085
|
-
|
3086
|
-
|
3087
|
-
|
3088
|
-
|
3089
|
-
|
3090
|
-
|
3091
|
-
|
3092
|
-
|
3093
|
-
|
3094
|
-
|
3095
|
-
|
3096
|
-
|
3097
|
-
|
3098
|
-
|
3099
|
-
|
3100
|
-
|
3101
|
-
|
3102
|
-
|
3103
|
-
|
3104
|
-
|
3098
|
+
(function () {
|
3099
|
+
// Must include lastMultiDragSelect (select it), in case modified selection from no selection
|
3100
|
+
// (but previous selection existed)
|
3101
|
+
var n, i;
|
3102
|
+
if (currentIndex > lastIndex) {
|
3103
|
+
i = lastIndex;
|
3104
|
+
n = currentIndex;
|
3105
|
+
} else {
|
3106
|
+
i = currentIndex;
|
3107
|
+
n = lastIndex + 1;
|
3108
|
+
}
|
3109
|
+
var filter = options.filter;
|
3110
|
+
for (; i < n; i++) {
|
3111
|
+
if (~multiDragElements.indexOf(children[i])) continue;
|
3112
|
+
// Check if element is draggable
|
3113
|
+
if (!closest(children[i], options.draggable, parentEl, false)) continue;
|
3114
|
+
// Check if element is filtered
|
3115
|
+
var filtered = filter && (typeof filter === 'function' ? filter.call(sortable, evt, children[i], sortable) : filter.split(',').some(function (criteria) {
|
3116
|
+
return closest(children[i], criteria.trim(), parentEl, false);
|
3117
|
+
}));
|
3118
|
+
if (filtered) continue;
|
3119
|
+
toggleClass(children[i], options.selectedClass, true);
|
3120
|
+
multiDragElements.push(children[i]);
|
3121
|
+
dispatchEvent({
|
3122
|
+
sortable: sortable,
|
3123
|
+
rootEl: rootEl,
|
3124
|
+
name: 'select',
|
3125
|
+
targetEl: children[i],
|
3126
|
+
originalEvent: evt
|
3127
|
+
});
|
3128
|
+
}
|
3129
|
+
})();
|
3105
3130
|
}
|
3106
3131
|
} else {
|
3107
3132
|
lastMultiDragSelect = dragEl$1;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/**!
|
2
|
-
* Sortable 1.15.
|
2
|
+
* Sortable 1.15.6
|
3
3
|
* @author RubaXa <trash@rubaxa.org>
|
4
4
|
* @author owenm <owen23355@gmail.com>
|
5
5
|
* @license MIT
|
@@ -128,7 +128,7 @@ function _nonIterableSpread() {
|
|
128
128
|
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
129
129
|
}
|
130
130
|
|
131
|
-
var version = "1.15.
|
131
|
+
var version = "1.15.6";
|
132
132
|
|
133
133
|
function userAgent(pattern) {
|
134
134
|
if (typeof window !== 'undefined' && window.navigator) {
|
@@ -1121,7 +1121,8 @@ function Sortable(el, options) {
|
|
1121
1121
|
x: 0,
|
1122
1122
|
y: 0
|
1123
1123
|
},
|
1124
|
-
|
1124
|
+
// Disabled on Safari: #1571; Enabled on Safari IOS: #2244
|
1125
|
+
supportPointer: Sortable.supportPointer !== false && 'PointerEvent' in window && (!Safari || IOS),
|
1125
1126
|
emptyInsertThreshold: 5
|
1126
1127
|
};
|
1127
1128
|
PluginManager.initializePlugins(this, el, defaults);
|
@@ -1232,7 +1233,7 @@ Sortable.prototype = /** @lends Sortable.prototype */{
|
|
1232
1233
|
pluginEvent('filter', _this, {
|
1233
1234
|
evt: evt
|
1234
1235
|
});
|
1235
|
-
preventOnFilter && evt.
|
1236
|
+
preventOnFilter && evt.preventDefault();
|
1236
1237
|
return; // cancel dnd
|
1237
1238
|
}
|
1238
1239
|
} else if (filter) {
|
@@ -1254,7 +1255,7 @@ Sortable.prototype = /** @lends Sortable.prototype */{
|
|
1254
1255
|
}
|
1255
1256
|
});
|
1256
1257
|
if (filter) {
|
1257
|
-
preventOnFilter && evt.
|
1258
|
+
preventOnFilter && evt.preventDefault();
|
1258
1259
|
return; // cancel dnd
|
1259
1260
|
}
|
1260
1261
|
}
|
@@ -1326,9 +1327,15 @@ Sortable.prototype = /** @lends Sortable.prototype */{
|
|
1326
1327
|
on(ownerDocument, 'dragover', nearestEmptyInsertDetectEvent);
|
1327
1328
|
on(ownerDocument, 'mousemove', nearestEmptyInsertDetectEvent);
|
1328
1329
|
on(ownerDocument, 'touchmove', nearestEmptyInsertDetectEvent);
|
1329
|
-
|
1330
|
-
|
1331
|
-
|
1330
|
+
if (options.supportPointer) {
|
1331
|
+
on(ownerDocument, 'pointerup', _this._onDrop);
|
1332
|
+
// Native D&D triggers pointercancel
|
1333
|
+
!this.nativeDraggable && on(ownerDocument, 'pointercancel', _this._onDrop);
|
1334
|
+
} else {
|
1335
|
+
on(ownerDocument, 'mouseup', _this._onDrop);
|
1336
|
+
on(ownerDocument, 'touchend', _this._onDrop);
|
1337
|
+
on(ownerDocument, 'touchcancel', _this._onDrop);
|
1338
|
+
}
|
1332
1339
|
|
1333
1340
|
// Make dragEl draggable (must be before delay for FireFox)
|
1334
1341
|
if (FireFox && this.nativeDraggable) {
|
@@ -1348,9 +1355,14 @@ Sortable.prototype = /** @lends Sortable.prototype */{
|
|
1348
1355
|
// If the user moves the pointer or let go the click or touch
|
1349
1356
|
// before the delay has been reached:
|
1350
1357
|
// disable the delayed drag
|
1351
|
-
|
1352
|
-
|
1353
|
-
|
1358
|
+
if (options.supportPointer) {
|
1359
|
+
on(ownerDocument, 'pointerup', _this._disableDelayedDrag);
|
1360
|
+
on(ownerDocument, 'pointercancel', _this._disableDelayedDrag);
|
1361
|
+
} else {
|
1362
|
+
on(ownerDocument, 'mouseup', _this._disableDelayedDrag);
|
1363
|
+
on(ownerDocument, 'touchend', _this._disableDelayedDrag);
|
1364
|
+
on(ownerDocument, 'touchcancel', _this._disableDelayedDrag);
|
1365
|
+
}
|
1354
1366
|
on(ownerDocument, 'mousemove', _this._delayedDragTouchMoveHandler);
|
1355
1367
|
on(ownerDocument, 'touchmove', _this._delayedDragTouchMoveHandler);
|
1356
1368
|
options.supportPointer && on(ownerDocument, 'pointermove', _this._delayedDragTouchMoveHandler);
|
@@ -1376,6 +1388,8 @@ Sortable.prototype = /** @lends Sortable.prototype */{
|
|
1376
1388
|
off(ownerDocument, 'mouseup', this._disableDelayedDrag);
|
1377
1389
|
off(ownerDocument, 'touchend', this._disableDelayedDrag);
|
1378
1390
|
off(ownerDocument, 'touchcancel', this._disableDelayedDrag);
|
1391
|
+
off(ownerDocument, 'pointerup', this._disableDelayedDrag);
|
1392
|
+
off(ownerDocument, 'pointercancel', this._disableDelayedDrag);
|
1379
1393
|
off(ownerDocument, 'mousemove', this._delayedDragTouchMoveHandler);
|
1380
1394
|
off(ownerDocument, 'touchmove', this._delayedDragTouchMoveHandler);
|
1381
1395
|
off(ownerDocument, 'pointermove', this._delayedDragTouchMoveHandler);
|
@@ -1396,7 +1410,6 @@ Sortable.prototype = /** @lends Sortable.prototype */{
|
|
1396
1410
|
}
|
1397
1411
|
try {
|
1398
1412
|
if (document.selection) {
|
1399
|
-
// Timeout neccessary for IE9
|
1400
1413
|
_nextTick(function () {
|
1401
1414
|
document.selection.empty();
|
1402
1415
|
});
|
@@ -1618,6 +1631,7 @@ Sortable.prototype = /** @lends Sortable.prototype */{
|
|
1618
1631
|
_this._dragStartId = _nextTick(_this._dragStarted.bind(_this, fallback, evt));
|
1619
1632
|
on(document, 'selectstart', _this);
|
1620
1633
|
moved = true;
|
1634
|
+
window.getSelection().removeAllRanges();
|
1621
1635
|
if (Safari) {
|
1622
1636
|
css(document.body, 'user-select', 'none');
|
1623
1637
|
}
|
@@ -1889,6 +1903,7 @@ Sortable.prototype = /** @lends Sortable.prototype */{
|
|
1889
1903
|
off(ownerDocument, 'mouseup', this._onDrop);
|
1890
1904
|
off(ownerDocument, 'touchend', this._onDrop);
|
1891
1905
|
off(ownerDocument, 'pointerup', this._onDrop);
|
1906
|
+
off(ownerDocument, 'pointercancel', this._onDrop);
|
1892
1907
|
off(ownerDocument, 'touchcancel', this._onDrop);
|
1893
1908
|
off(document, 'selectstart', this);
|
1894
1909
|
},
|
@@ -3079,28 +3094,38 @@ function MultiDragPlugin() {
|
|
3079
3094
|
var lastIndex = index(lastMultiDragSelect),
|
3080
3095
|
currentIndex = index(dragEl$1);
|
3081
3096
|
if (~lastIndex && ~currentIndex && lastIndex !== currentIndex) {
|
3082
|
-
|
3083
|
-
|
3084
|
-
|
3085
|
-
|
3086
|
-
|
3087
|
-
|
3088
|
-
|
3089
|
-
|
3090
|
-
|
3091
|
-
|
3092
|
-
|
3093
|
-
|
3094
|
-
|
3095
|
-
|
3096
|
-
|
3097
|
-
|
3098
|
-
|
3099
|
-
|
3100
|
-
|
3101
|
-
|
3102
|
-
|
3103
|
-
|
3097
|
+
(function () {
|
3098
|
+
// Must include lastMultiDragSelect (select it), in case modified selection from no selection
|
3099
|
+
// (but previous selection existed)
|
3100
|
+
var n, i;
|
3101
|
+
if (currentIndex > lastIndex) {
|
3102
|
+
i = lastIndex;
|
3103
|
+
n = currentIndex;
|
3104
|
+
} else {
|
3105
|
+
i = currentIndex;
|
3106
|
+
n = lastIndex + 1;
|
3107
|
+
}
|
3108
|
+
var filter = options.filter;
|
3109
|
+
for (; i < n; i++) {
|
3110
|
+
if (~multiDragElements.indexOf(children[i])) continue;
|
3111
|
+
// Check if element is draggable
|
3112
|
+
if (!closest(children[i], options.draggable, parentEl, false)) continue;
|
3113
|
+
// Check if element is filtered
|
3114
|
+
var filtered = filter && (typeof filter === 'function' ? filter.call(sortable, evt, children[i], sortable) : filter.split(',').some(function (criteria) {
|
3115
|
+
return closest(children[i], criteria.trim(), parentEl, false);
|
3116
|
+
}));
|
3117
|
+
if (filtered) continue;
|
3118
|
+
toggleClass(children[i], options.selectedClass, true);
|
3119
|
+
multiDragElements.push(children[i]);
|
3120
|
+
dispatchEvent({
|
3121
|
+
sortable: sortable,
|
3122
|
+
rootEl: rootEl,
|
3123
|
+
name: 'select',
|
3124
|
+
targetEl: children[i],
|
3125
|
+
originalEvent: evt
|
3126
|
+
});
|
3127
|
+
}
|
3128
|
+
})();
|
3104
3129
|
}
|
3105
3130
|
} else {
|
3106
3131
|
lastMultiDragSelect = dragEl$1;
|
@@ -394,7 +394,8 @@ function Sortable(el, options) {
|
|
394
394
|
fallbackOnBody: false,
|
395
395
|
fallbackTolerance: 0,
|
396
396
|
fallbackOffset: {x: 0, y: 0},
|
397
|
-
|
397
|
+
// Disabled on Safari: #1571; Enabled on Safari IOS: #2244
|
398
|
+
supportPointer: Sortable.supportPointer !== false && ('PointerEvent' in window) && (!Safari || IOS),
|
398
399
|
emptyInsertThreshold: 5
|
399
400
|
};
|
400
401
|
|
@@ -519,7 +520,7 @@ Sortable.prototype = /** @lends Sortable.prototype */ {
|
|
519
520
|
fromEl: el
|
520
521
|
});
|
521
522
|
pluginEvent('filter', _this, { evt });
|
522
|
-
preventOnFilter && evt.
|
523
|
+
preventOnFilter && evt.preventDefault();
|
523
524
|
return; // cancel dnd
|
524
525
|
}
|
525
526
|
}
|
@@ -542,7 +543,7 @@ Sortable.prototype = /** @lends Sortable.prototype */ {
|
|
542
543
|
});
|
543
544
|
|
544
545
|
if (filter) {
|
545
|
-
preventOnFilter && evt.
|
546
|
+
preventOnFilter && evt.preventDefault();
|
546
547
|
return; // cancel dnd
|
547
548
|
}
|
548
549
|
}
|
@@ -624,9 +625,15 @@ Sortable.prototype = /** @lends Sortable.prototype */ {
|
|
624
625
|
on(ownerDocument, 'mousemove', nearestEmptyInsertDetectEvent);
|
625
626
|
on(ownerDocument, 'touchmove', nearestEmptyInsertDetectEvent);
|
626
627
|
|
627
|
-
|
628
|
-
|
629
|
-
|
628
|
+
if (options.supportPointer) {
|
629
|
+
on(ownerDocument, 'pointerup', _this._onDrop);
|
630
|
+
// Native D&D triggers pointercancel
|
631
|
+
!this.nativeDraggable && on(ownerDocument, 'pointercancel', _this._onDrop);
|
632
|
+
} else {
|
633
|
+
on(ownerDocument, 'mouseup', _this._onDrop);
|
634
|
+
on(ownerDocument, 'touchend', _this._onDrop);
|
635
|
+
on(ownerDocument, 'touchcancel', _this._onDrop);
|
636
|
+
}
|
630
637
|
|
631
638
|
// Make dragEl draggable (must be before delay for FireFox)
|
632
639
|
if (FireFox && this.nativeDraggable) {
|
@@ -645,9 +652,14 @@ Sortable.prototype = /** @lends Sortable.prototype */ {
|
|
645
652
|
// If the user moves the pointer or let go the click or touch
|
646
653
|
// before the delay has been reached:
|
647
654
|
// disable the delayed drag
|
648
|
-
|
649
|
-
|
650
|
-
|
655
|
+
if (options.supportPointer) {
|
656
|
+
on(ownerDocument, 'pointerup', _this._disableDelayedDrag);
|
657
|
+
on(ownerDocument, 'pointercancel', _this._disableDelayedDrag);
|
658
|
+
} else {
|
659
|
+
on(ownerDocument, 'mouseup', _this._disableDelayedDrag);
|
660
|
+
on(ownerDocument, 'touchend', _this._disableDelayedDrag);
|
661
|
+
on(ownerDocument, 'touchcancel', _this._disableDelayedDrag);
|
662
|
+
}
|
651
663
|
on(ownerDocument, 'mousemove', _this._delayedDragTouchMoveHandler);
|
652
664
|
on(ownerDocument, 'touchmove', _this._delayedDragTouchMoveHandler);
|
653
665
|
options.supportPointer && on(ownerDocument, 'pointermove', _this._delayedDragTouchMoveHandler);
|
@@ -680,6 +692,8 @@ Sortable.prototype = /** @lends Sortable.prototype */ {
|
|
680
692
|
off(ownerDocument, 'mouseup', this._disableDelayedDrag);
|
681
693
|
off(ownerDocument, 'touchend', this._disableDelayedDrag);
|
682
694
|
off(ownerDocument, 'touchcancel', this._disableDelayedDrag);
|
695
|
+
off(ownerDocument, 'pointerup', this._disableDelayedDrag);
|
696
|
+
off(ownerDocument, 'pointercancel', this._disableDelayedDrag);
|
683
697
|
off(ownerDocument, 'mousemove', this._delayedDragTouchMoveHandler);
|
684
698
|
off(ownerDocument, 'touchmove', this._delayedDragTouchMoveHandler);
|
685
699
|
off(ownerDocument, 'pointermove', this._delayedDragTouchMoveHandler);
|
@@ -702,9 +716,9 @@ Sortable.prototype = /** @lends Sortable.prototype */ {
|
|
702
716
|
}
|
703
717
|
|
704
718
|
try {
|
719
|
+
|
705
720
|
if (document.selection) {
|
706
|
-
|
707
|
-
_nextTick(function () {
|
721
|
+
_nextTick(() => {
|
708
722
|
document.selection.empty();
|
709
723
|
});
|
710
724
|
} else {
|
@@ -984,6 +998,8 @@ Sortable.prototype = /** @lends Sortable.prototype */ {
|
|
984
998
|
|
985
999
|
moved = true;
|
986
1000
|
|
1001
|
+
window.getSelection().removeAllRanges();
|
1002
|
+
|
987
1003
|
if (Safari) {
|
988
1004
|
css(document.body, 'user-select', 'none');
|
989
1005
|
}
|
@@ -1333,6 +1349,7 @@ Sortable.prototype = /** @lends Sortable.prototype */ {
|
|
1333
1349
|
off(ownerDocument, 'mouseup', this._onDrop);
|
1334
1350
|
off(ownerDocument, 'touchend', this._onDrop);
|
1335
1351
|
off(ownerDocument, 'pointerup', this._onDrop);
|
1352
|
+
off(ownerDocument, 'pointercancel', this._onDrop);
|
1336
1353
|
off(ownerDocument, 'touchcancel', this._onDrop);
|
1337
1354
|
off(document, 'selectstart', this);
|
1338
1355
|
},
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: govuk_publishing_components
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 46.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- GOV.UK Dev
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-12-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: chartkick
|
@@ -546,6 +546,7 @@ files:
|
|
546
546
|
- app/assets/stylesheets/govuk_publishing_components/components/_feedback.scss
|
547
547
|
- app/assets/stylesheets/govuk_publishing_components/components/_fieldset.scss
|
548
548
|
- app/assets/stylesheets/govuk_publishing_components/components/_file-upload.scss
|
549
|
+
- app/assets/stylesheets/govuk_publishing_components/components/_glance-metric.scss
|
549
550
|
- app/assets/stylesheets/govuk_publishing_components/components/_govspeak-html-publication.scss
|
550
551
|
- app/assets/stylesheets/govuk_publishing_components/components/_govspeak.scss
|
551
552
|
- app/assets/stylesheets/govuk_publishing_components/components/_heading.scss
|
@@ -689,6 +690,7 @@ files:
|
|
689
690
|
- app/views/govuk_publishing_components/components/_feedback.html.erb
|
690
691
|
- app/views/govuk_publishing_components/components/_fieldset.html.erb
|
691
692
|
- app/views/govuk_publishing_components/components/_file_upload.html.erb
|
693
|
+
- app/views/govuk_publishing_components/components/_glance_metric.html.erb
|
692
694
|
- app/views/govuk_publishing_components/components/_google_tag_manager_script.html.erb
|
693
695
|
- app/views/govuk_publishing_components/components/_govspeak.html.erb
|
694
696
|
- app/views/govuk_publishing_components/components/_govspeak_html_publication.html.erb
|
@@ -785,6 +787,7 @@ files:
|
|
785
787
|
- app/views/govuk_publishing_components/components/docs/feedback.yml
|
786
788
|
- app/views/govuk_publishing_components/components/docs/fieldset.yml
|
787
789
|
- app/views/govuk_publishing_components/components/docs/file_upload.yml
|
790
|
+
- app/views/govuk_publishing_components/components/docs/glance_metric.yml
|
788
791
|
- app/views/govuk_publishing_components/components/docs/google_tag_manager_script.yml
|
789
792
|
- app/views/govuk_publishing_components/components/docs/govspeak.yml
|
790
793
|
- app/views/govuk_publishing_components/components/docs/govspeak_html_publication.yml
|