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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 63542249524bfb5d425f34738792bd6a39348c44ca2775cbfa616bfa07e3447b
4
- data.tar.gz: 595f004850b722dc40b80eec95c48b468919e8bf5e16dba3a9db67de34c71917
3
+ metadata.gz: 28bd8687f04b835aec548865b73ece402d5cdaa5392117e050e7817d1ce3e650
4
+ data.tar.gz: 2a37c6d24183a6edfc6f4036e20ceeb077a1715c5e21895300efaa0165459a18
5
5
  SHA512:
6
- metadata.gz: 15d0995ce4bf7f333ea22b83c11fea882cb506e16f148f515d50ed5381ae06cc089361374ec0e816a66cad99a0a9afed8f814714494c1d1d6d51db1602b80f0f
7
- data.tar.gz: 2e10d19b13ec49477ea5f8bab9c3dc805fba064a0d955c0986af869cbd62e37ca6d4e3a49c98cdf6eafd63c758444274531e8bd4d3cf21a94eebcbb77c9bd68c
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
- emptyInsertThreshold: 15,
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
- getNestableContainer(evt.item),
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
- bootstrap.Tab.getOrCreateInstance(tabElement).show();
5374
+ Tab.getOrCreateInstance(tabElement).show();
5359
5375
  }
5360
5376
  }
5361
5377
  }