spotlight-frontend 5.2.4 → 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.
- package/README.md +25 -5
- package/app/assets/javascripts/spotlight/spotlight.esm.js +1696 -1229
- package/app/assets/javascripts/spotlight/spotlight.esm.js.map +1 -1
- package/app/assets/javascripts/spotlight/spotlight.js +1718 -1232
- package/app/assets/javascripts/spotlight/spotlight.js.map +1 -1
- package/app/assets/stylesheets/spotlight/_multi_up_item_grid.scss +1 -10
- package/app/assets/stylesheets/spotlight/_nestable.scss +18 -1
- package/app/assets/stylesheets/spotlight/_pages.scss +3 -3
- package/app/assets/stylesheets/spotlight/_spotlight.scss +0 -2
- package/package.json +14 -5
- package/app/assets/stylesheets/spotlight/typeahead.scss +0 -77
- package/vendor/assets/javascripts/jquery.waitforimages.min.js +0 -2
|
@@ -1,8 +1,4 @@
|
|
|
1
1
|
.spotlight-flexbox {
|
|
2
|
-
display: -webkit-box;
|
|
3
|
-
display: -moz-box;
|
|
4
|
-
display: -ms-flexbox;
|
|
5
|
-
display: -webkit-flex;
|
|
6
2
|
display: flex;
|
|
7
3
|
flex-flow: row wrap;
|
|
8
4
|
|
|
@@ -13,7 +9,7 @@
|
|
|
13
9
|
|
|
14
10
|
@media (max-width: breakpoint-max("sm")) {
|
|
15
11
|
min-width: 200px;
|
|
16
|
-
|
|
12
|
+
flex: 1 1 200px;
|
|
17
13
|
}
|
|
18
14
|
|
|
19
15
|
.caption {
|
|
@@ -23,11 +19,6 @@
|
|
|
23
19
|
img {
|
|
24
20
|
max-width: 100%;
|
|
25
21
|
}
|
|
26
|
-
-webkit-box-flex: 1;
|
|
27
|
-
-moz-box-flex: 1;
|
|
28
|
-
-webkit-flex: 1;
|
|
29
|
-
-ms-flex: 1;
|
|
30
22
|
flex: 1;
|
|
31
|
-
-webkit-flex: 1 1 125px;
|
|
32
23
|
}
|
|
33
24
|
}
|
|
@@ -26,10 +26,27 @@ tr.dd-item {
|
|
|
26
26
|
position: relative;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
+
// SortableJS moves an item to the start of a list when the pointer is over the list more than
|
|
30
|
+
// 10px left of its items.
|
|
31
|
+
$dd-nested-list-padding-left: 5px;
|
|
32
|
+
|
|
29
33
|
.dd-list { display: block; position: relative; margin: 0; padding: 0 0 5px 0; list-style: none; }
|
|
30
|
-
.dd-list .dd-list { margin-left:
|
|
34
|
+
.dd-list .dd-list { margin-left: 25px; padding-left: $dd-nested-list-padding-left; padding-bottom: 0; }
|
|
31
35
|
.dd-collapsed .dd-list { display: none; }
|
|
32
36
|
|
|
37
|
+
// While a drag is in progress, extend each child list with a drop zone that covers the
|
|
38
|
+
// indented part of the next item. Dragging an item to the right then nests it.
|
|
39
|
+
.dd-nesting .dd-item > .dd-list::after {
|
|
40
|
+
content: "";
|
|
41
|
+
position: absolute;
|
|
42
|
+
top: 100%;
|
|
43
|
+
left: $dd-nested-list-padding-left; // Offset from the child list's padding box, so the zone starts where its items start
|
|
44
|
+
right: 0;
|
|
45
|
+
height: var(--dd-nesting-zone-height);
|
|
46
|
+
z-index: 1;
|
|
47
|
+
}
|
|
48
|
+
.dd-nesting .sortable-chosen > .dd-list::after { display: none; }
|
|
49
|
+
|
|
33
50
|
.dd-item,
|
|
34
51
|
.dd-empty,
|
|
35
52
|
.dd-placeholder { display: block; position: relative; margin: 0; padding: 0; min-height: 20px; font-size: 13px; line-height: 20px; }
|
|
@@ -237,14 +237,14 @@
|
|
|
237
237
|
|
|
238
238
|
.box {
|
|
239
239
|
min-width: 150px;
|
|
240
|
-
|
|
240
|
+
flex: 1 1 150px;
|
|
241
241
|
}
|
|
242
242
|
|
|
243
243
|
/* two items */
|
|
244
244
|
.box:first-child:nth-last-child(2),
|
|
245
245
|
.box:first-child:nth-last-child(2) ~ .box {
|
|
246
246
|
min-width: 250px;
|
|
247
|
-
|
|
247
|
+
flex: 1 1 250px;
|
|
248
248
|
}
|
|
249
249
|
|
|
250
250
|
/* only images, no text */
|
|
@@ -260,7 +260,7 @@
|
|
|
260
260
|
}
|
|
261
261
|
|
|
262
262
|
@media (max-width: breakpoint-max("md")) {
|
|
263
|
-
|
|
263
|
+
flex: 1 1 175px;
|
|
264
264
|
}
|
|
265
265
|
}
|
|
266
266
|
}
|
|
@@ -24,7 +24,6 @@
|
|
|
24
24
|
@import "upload";
|
|
25
25
|
@import "nestable";
|
|
26
26
|
@import "blacklight_configuration";
|
|
27
|
-
@import "typeahead";
|
|
28
27
|
@import "bootstrap_overrides";
|
|
29
28
|
@import "blacklight_overrides";
|
|
30
29
|
@import "report_a_problem";
|
|
@@ -38,7 +37,6 @@
|
|
|
38
37
|
@import "admin_users";
|
|
39
38
|
@import "autocomplete";
|
|
40
39
|
|
|
41
|
-
|
|
42
40
|
// Styles below keep footer at bottom of viewport
|
|
43
41
|
html {
|
|
44
42
|
position: relative;
|
package/package.json
CHANGED
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "spotlight-frontend",
|
|
3
|
-
"version": "5.2
|
|
3
|
+
"version": "5.3.2",
|
|
4
4
|
"description": "Exhibits plugin for blacklight",
|
|
5
5
|
"main": "app/assets/javascripts/spotlight",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"module": "app/assets/javascripts/spotlight/spotlight.esm.js",
|
|
8
8
|
"scripts": {
|
|
9
|
-
"prepare": "rollup --config rollup.config.js --sourcemap && ESM=true rollup --config rollup.config.js --sourcemap"
|
|
9
|
+
"prepare": "rollup --config rollup.config.js --sourcemap && ESM=true rollup --config rollup.config.js --sourcemap",
|
|
10
|
+
"format": "prettier --write \"app/javascript/**/*.js\"",
|
|
11
|
+
"format:check": "prettier --check \"app/javascript/**/*.js\"",
|
|
12
|
+
"lint": "eslint \"app/javascript/**/*.js\"",
|
|
13
|
+
"lint:fix": "eslint --fix \"app/javascript/**/*.js\""
|
|
10
14
|
},
|
|
11
15
|
"repository": {
|
|
12
16
|
"type": "git",
|
|
@@ -23,7 +27,11 @@
|
|
|
23
27
|
},
|
|
24
28
|
"homepage": "https://github.com/projectblacklight/spotlight#readme",
|
|
25
29
|
"devDependencies": {
|
|
30
|
+
"@eslint/js": "^10.0.1",
|
|
26
31
|
"@rollup/plugin-commonjs": "^26.0.1",
|
|
32
|
+
"eslint": "^10.5.0",
|
|
33
|
+
"globals": "^17.7.0",
|
|
34
|
+
"prettier": "^3.8.4",
|
|
27
35
|
"rollup": "^4.0.0",
|
|
28
36
|
"rollup-plugin-includepaths": "^0.2.4"
|
|
29
37
|
},
|
|
@@ -33,14 +41,15 @@
|
|
|
33
41
|
],
|
|
34
42
|
"dependencies": {
|
|
35
43
|
"blacklight-frontend": "^8.4.0",
|
|
36
|
-
"
|
|
37
|
-
"clipboard": "^2.0.11",
|
|
38
|
-
"jquery": "^3.7.1",
|
|
44
|
+
"jquery": ">=3.7.1",
|
|
39
45
|
"jquery-serializejson": "^3.2.1",
|
|
40
46
|
"leaflet": "^1.9.4",
|
|
41
47
|
"leaflet-iiif": "^3.0.0",
|
|
42
48
|
"openseadragon-rails": "^1.0.1",
|
|
43
49
|
"sir-trevor": "^0.8.2",
|
|
44
50
|
"sortablejs": "^1.15.3"
|
|
51
|
+
},
|
|
52
|
+
"peerDependencies": {
|
|
53
|
+
"bootstrap": ">=4.3.1 <6.0.0"
|
|
45
54
|
}
|
|
46
55
|
}
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
.twitter-typeahead {
|
|
2
|
-
width: 100%;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
.typeahead,
|
|
6
|
-
.tt-query,
|
|
7
|
-
.tt-hint {
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.typeahead {
|
|
11
|
-
background-color: #fff;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.typeahead:focus {
|
|
15
|
-
border: 2px solid #0097cf;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.tt-hint {
|
|
19
|
-
color: #999
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
.tt-dropdown-menu {
|
|
23
|
-
z-index: $zindex-dropdown !important;
|
|
24
|
-
margin-top: 2px;
|
|
25
|
-
max-height: 360px;
|
|
26
|
-
overflow-y: auto;
|
|
27
|
-
padding: 8px 0;
|
|
28
|
-
background-color: #fff;
|
|
29
|
-
border: 1px solid #ccc;
|
|
30
|
-
border: 1px solid rgba(0, 0, 0, 0.2);
|
|
31
|
-
-webkit-border-radius: 8px;
|
|
32
|
-
-moz-border-radius: 8px;
|
|
33
|
-
border-radius: 8px;
|
|
34
|
-
-webkit-box-shadow: 0 5px 10px rgba(0,0,0,.2);
|
|
35
|
-
-moz-box-shadow: 0 5px 10px rgba(0,0,0,.2);
|
|
36
|
-
box-shadow: 0 5px 10px rgba(0,0,0,.2);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
.twitter-typeahead {
|
|
40
|
-
z-index: $zindex-dropdown !important; /* get typeahead to float on top of e.g. leaflet */
|
|
41
|
-
.tt-suggestion {
|
|
42
|
-
font-size: 18px;
|
|
43
|
-
line-height: 24px;
|
|
44
|
-
padding: 3px 1rem 3px 1rem;
|
|
45
|
-
margin-bottom: 1em;
|
|
46
|
-
|
|
47
|
-
&.tt-cursor {
|
|
48
|
-
color: #fff;
|
|
49
|
-
background-color: #0097cf;
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
.tt-dataset-tags {
|
|
55
|
-
p {
|
|
56
|
-
white-space: nowrap !important;
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
.autocomplete-item {
|
|
61
|
-
display: flex;
|
|
62
|
-
|
|
63
|
-
p {
|
|
64
|
-
margin: 0;
|
|
65
|
-
}
|
|
66
|
-
.document-thumbnail {
|
|
67
|
-
margin-right: 1rem;
|
|
68
|
-
min-width: 60px;
|
|
69
|
-
padding: 0;
|
|
70
|
-
width: 60px;
|
|
71
|
-
|
|
72
|
-
img {
|
|
73
|
-
max-width: 60px;
|
|
74
|
-
max-height: 60px;
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! waitForImages jQuery Plugin 2013-07-20 */
|
|
2
|
-
!function(a){var b="waitForImages";a.waitForImages={hasImageProperties:["backgroundImage","listStyleImage","borderImage","borderCornerImage","cursor"]},a.expr[":"].uncached=function(b){if(!a(b).is('img[src!=""]'))return!1;var c=new Image;return c.src=b.src,!c.complete},a.fn.waitForImages=function(c,d,e){var f=0,g=0;if(a.isPlainObject(arguments[0])&&(e=arguments[0].waitForAll,d=arguments[0].each,c=arguments[0].finished),c=c||a.noop,d=d||a.noop,e=!!e,!a.isFunction(c)||!a.isFunction(d))throw new TypeError("An invalid callback was supplied.");return this.each(function(){var h=a(this),i=[],j=a.waitForImages.hasImageProperties||[],k=/url\(\s*(['"]?)(.*?)\1\s*\)/g;e?h.find("*").addBack().each(function(){var b=a(this);b.is("img:uncached")&&i.push({src:b.attr("src"),element:b[0]}),a.each(j,function(a,c){var d,e=b.css(c);if(!e)return!0;for(;d=k.exec(e);)i.push({src:d[2],element:b[0]})})}):h.find("img:uncached").each(function(){i.push({src:this.src,element:this})}),f=i.length,g=0,0===f&&c.call(h[0]),a.each(i,function(e,i){var j=new Image;a(j).on("load."+b+" error."+b,function(a){return g++,d.call(i.element,g,f,"load"==a.type),g==f?(c.call(h[0]),!1):void 0}),j.src=i.src})})}}(jQuery);
|