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
|
@@ -4,6 +4,25 @@
|
|
|
4
4
|
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Spotlight = factory(global.OpenSeadragon, global.SirTrevor, global.Sortable, global.bootstrap, global.Stimulus));
|
|
5
5
|
})(this, (function (OpenSeadragon, SirTrevor$1, Sortable, bootstrap, stimulus) { 'use strict';
|
|
6
6
|
|
|
7
|
+
function _interopNamespaceDefault(e) {
|
|
8
|
+
const n = Object.create(null, { [Symbol.toStringTag]: { value: 'Module' } });
|
|
9
|
+
if (e) {
|
|
10
|
+
for (const k in e) {
|
|
11
|
+
if (k !== 'default') {
|
|
12
|
+
const d = Object.getOwnPropertyDescriptor(e, k);
|
|
13
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
14
|
+
enumerable: true,
|
|
15
|
+
get: () => e[k]
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
n.default = e;
|
|
21
|
+
return Object.freeze(n);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
const bootstrap__namespace = /*#__PURE__*/_interopNamespaceDefault(bootstrap);
|
|
25
|
+
|
|
7
26
|
// Includes an unreleased RTL support pull request: https://github.com/ganlanyuan/tiny-slider/pull/658
|
|
8
27
|
// Includes "export default tns" at the end of the file for spotlight/user/browse_group_categories.js
|
|
9
28
|
var tns = (function (){
|
|
@@ -5138,7 +5157,10 @@
|
|
|
5138
5157
|
handle: ".dd-handle",
|
|
5139
5158
|
fallbackOnBody: true,
|
|
5140
5159
|
swapThreshold: 0.65,
|
|
5141
|
-
|
|
5160
|
+
// 0 turns off SortableJS's "drop near an empty list" check. The .dd-nesting drop
|
|
5161
|
+
// zones in _nestable.scss decide nesting, so a vertical drag past an item's edge
|
|
5162
|
+
// does not nest it by accident.
|
|
5163
|
+
emptyInsertThreshold: 0,
|
|
5142
5164
|
onStart: onStartHandler,
|
|
5143
5165
|
onEnd: onEndHandler,
|
|
5144
5166
|
onMove: onMoveHandler,
|
|
@@ -5147,6 +5169,7 @@
|
|
|
5147
5169
|
const nestedSortableClass = "dd-list";
|
|
5148
5170
|
const nestedSortableSelector = ".dd-list";
|
|
5149
5171
|
const nestedSortableNodeName = "ol";
|
|
5172
|
+
const nestingClass = "dd-nesting";
|
|
5150
5173
|
const findNode = (id, container) =>
|
|
5151
5174
|
container.querySelector(`[data-id="${id}"]`);
|
|
5152
5175
|
const setWeight = (node, weight) => (weightField(node).value = weight);
|
|
@@ -5188,14 +5211,23 @@
|
|
|
5188
5211
|
}
|
|
5189
5212
|
|
|
5190
5213
|
function onStartHandler(evt) {
|
|
5214
|
+
const nestableContainer = getNestableContainer(evt.item);
|
|
5191
5215
|
makeEmptyChildSortablesForEligibleParents(
|
|
5192
|
-
|
|
5216
|
+
nestableContainer,
|
|
5193
5217
|
getMaxNestingLevelSetting(evt.item),
|
|
5194
5218
|
);
|
|
5219
|
+
// Size the drop zone below each child list to match the dragged item, so that
|
|
5220
|
+
// a drag straight to the right lands in the list of the item above.
|
|
5221
|
+
nestableContainer.style.setProperty(
|
|
5222
|
+
"--dd-nesting-zone-height",
|
|
5223
|
+
`${evt.item.querySelector(sortableOptions.handle).offsetHeight}px`,
|
|
5224
|
+
);
|
|
5225
|
+
nestableContainer.classList.add(nestingClass);
|
|
5195
5226
|
}
|
|
5196
5227
|
|
|
5197
5228
|
function onEndHandler(evt) {
|
|
5198
5229
|
const nestableContainer = getNestableContainer(evt.item);
|
|
5230
|
+
nestableContainer.classList.remove(nestingClass);
|
|
5199
5231
|
removeEmptySortables(nestableContainer);
|
|
5200
5232
|
updateWeightsAndRelationships(nestableContainer);
|
|
5201
5233
|
}
|
|
@@ -5340,6 +5372,9 @@
|
|
|
5340
5372
|
}
|
|
5341
5373
|
})();
|
|
5342
5374
|
|
|
5375
|
+
// Bootstrap's ESM build exports Tab by name; CDN-converted UMD builds (e.g. ga.jspm.io) only have a default export
|
|
5376
|
+
const Tab = bootstrap__namespace.Tab ?? bootstrap__namespace.default?.Tab;
|
|
5377
|
+
|
|
5343
5378
|
class Tabs {
|
|
5344
5379
|
connect() {
|
|
5345
5380
|
if (document.querySelector("[role=tabpanel]") && window.location.hash) {
|
|
@@ -5355,7 +5390,7 @@
|
|
|
5355
5390
|
);
|
|
5356
5391
|
if (!tabElement) return
|
|
5357
5392
|
|
|
5358
|
-
|
|
5393
|
+
Tab.getOrCreateInstance(tabElement).show();
|
|
5359
5394
|
}
|
|
5360
5395
|
}
|
|
5361
5396
|
}
|