blacklight-spotlight 5.3.1 → 5.3.2
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/app/assets/javascripts/spotlight/spotlight.esm.js +20 -4
- data/app/assets/javascripts/spotlight/spotlight.esm.js.map +1 -1
- data/app/assets/javascripts/spotlight/spotlight.js +38 -3
- data/app/assets/javascripts/spotlight/spotlight.js.map +1 -1
- data/app/assets/stylesheets/spotlight/_multi_up_item_grid.scss +1 -10
- data/app/assets/stylesheets/spotlight/_nestable.scss +18 -1
- data/app/assets/stylesheets/spotlight/_pages.scss +3 -3
- data/app/javascript/spotlight/admin/spotlight_nestable.js +15 -2
- data/app/javascript/spotlight/admin/tabs.js +5 -2
- data/lib/spotlight/version.rb +1 -1
- data/spec/support/features/test_features_helpers.rb +31 -0
- 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: 28bd8687f04b835aec548865b73ece402d5cdaa5392117e050e7817d1ce3e650
|
|
4
|
+
data.tar.gz: 2a37c6d24183a6edfc6f4036e20ceeb077a1715c5e21895300efaa0165459a18
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e8498080a3e2445c4b14cf50a2df4b6f1df3c657bae2cb15c04142b013aba8bde0811d21d4936a2edfc8b0c76f78898ccfb17d00cc3fc5dced7fada5b99ca56c
|
|
7
|
+
data.tar.gz: d5827e68e97dd74823ae3319047ae554c2c15cf9f757740112d1f73b9eeae833cb6d9f36846414652c1820809ce1c3e575dd5bfdf50edf7a2de470febcb230e3
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import OpenSeadragon from 'openseadragon';
|
|
2
2
|
import SirTrevor$1 from 'sir-trevor';
|
|
3
3
|
import Sortable from 'sortablejs';
|
|
4
|
-
import bootstrap from 'bootstrap';
|
|
4
|
+
import * as bootstrap from 'bootstrap';
|
|
5
5
|
import { Controller } from '@hotwired/stimulus';
|
|
6
6
|
|
|
7
7
|
// Includes an unreleased RTL support pull request: https://github.com/ganlanyuan/tiny-slider/pull/658
|
|
@@ -5138,7 +5138,10 @@ const Module = (function () {
|
|
|
5138
5138
|
handle: ".dd-handle",
|
|
5139
5139
|
fallbackOnBody: true,
|
|
5140
5140
|
swapThreshold: 0.65,
|
|
5141
|
-
|
|
5141
|
+
// 0 turns off SortableJS's "drop near an empty list" check. The .dd-nesting drop
|
|
5142
|
+
// zones in _nestable.scss decide nesting, so a vertical drag past an item's edge
|
|
5143
|
+
// does not nest it by accident.
|
|
5144
|
+
emptyInsertThreshold: 0,
|
|
5142
5145
|
onStart: onStartHandler,
|
|
5143
5146
|
onEnd: onEndHandler,
|
|
5144
5147
|
onMove: onMoveHandler,
|
|
@@ -5147,6 +5150,7 @@ const Module = (function () {
|
|
|
5147
5150
|
const nestedSortableClass = "dd-list";
|
|
5148
5151
|
const nestedSortableSelector = ".dd-list";
|
|
5149
5152
|
const nestedSortableNodeName = "ol";
|
|
5153
|
+
const nestingClass = "dd-nesting";
|
|
5150
5154
|
const findNode = (id, container) =>
|
|
5151
5155
|
container.querySelector(`[data-id="${id}"]`);
|
|
5152
5156
|
const setWeight = (node, weight) => (weightField(node).value = weight);
|
|
@@ -5188,14 +5192,23 @@ const Module = (function () {
|
|
|
5188
5192
|
}
|
|
5189
5193
|
|
|
5190
5194
|
function onStartHandler(evt) {
|
|
5195
|
+
const nestableContainer = getNestableContainer(evt.item);
|
|
5191
5196
|
makeEmptyChildSortablesForEligibleParents(
|
|
5192
|
-
|
|
5197
|
+
nestableContainer,
|
|
5193
5198
|
getMaxNestingLevelSetting(evt.item),
|
|
5194
5199
|
);
|
|
5200
|
+
// Size the drop zone below each child list to match the dragged item, so that
|
|
5201
|
+
// a drag straight to the right lands in the list of the item above.
|
|
5202
|
+
nestableContainer.style.setProperty(
|
|
5203
|
+
"--dd-nesting-zone-height",
|
|
5204
|
+
`${evt.item.querySelector(sortableOptions.handle).offsetHeight}px`,
|
|
5205
|
+
);
|
|
5206
|
+
nestableContainer.classList.add(nestingClass);
|
|
5195
5207
|
}
|
|
5196
5208
|
|
|
5197
5209
|
function onEndHandler(evt) {
|
|
5198
5210
|
const nestableContainer = getNestableContainer(evt.item);
|
|
5211
|
+
nestableContainer.classList.remove(nestingClass);
|
|
5199
5212
|
removeEmptySortables(nestableContainer);
|
|
5200
5213
|
updateWeightsAndRelationships(nestableContainer);
|
|
5201
5214
|
}
|
|
@@ -5340,6 +5353,9 @@ const Module = (function () {
|
|
|
5340
5353
|
}
|
|
5341
5354
|
})();
|
|
5342
5355
|
|
|
5356
|
+
// Bootstrap's ESM build exports Tab by name; CDN-converted UMD builds (e.g. ga.jspm.io) only have a default export
|
|
5357
|
+
const Tab = bootstrap.Tab ?? bootstrap.default?.Tab;
|
|
5358
|
+
|
|
5343
5359
|
class Tabs {
|
|
5344
5360
|
connect() {
|
|
5345
5361
|
if (document.querySelector("[role=tabpanel]") && window.location.hash) {
|
|
@@ -5355,7 +5371,7 @@ class Tabs {
|
|
|
5355
5371
|
);
|
|
5356
5372
|
if (!tabElement) return
|
|
5357
5373
|
|
|
5358
|
-
|
|
5374
|
+
Tab.getOrCreateInstance(tabElement).show();
|
|
5359
5375
|
}
|
|
5360
5376
|
}
|
|
5361
5377
|
}
|