geoblacklight 5.0.0.pre.alpha.11 → 5.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/build-demo-app.yml +7 -4
- data/.github/workflows/ruby.yml +12 -15
- data/Rakefile +9 -1
- data/app/assets/stylesheets/geoblacklight/modules/_base.scss +0 -1
- data/app/assets/stylesheets/geoblacklight/modules/results.scss +4 -0
- data/app/components/geoblacklight/static_map_component.rb +3 -1
- data/app/javascript/geoblacklight/controllers/leaflet_viewer_controller.js +6 -3
- data/app/javascript/geoblacklight/leaflet/controls/sleep.js +100 -0
- data/geoblacklight.gemspec +2 -1
- data/lib/generators/geoblacklight/assets/importmap_generator.rb +0 -5
- data/lib/generators/geoblacklight/assets/vite_generator.rb +23 -21
- data/lib/generators/geoblacklight/templates/base.html.erb +4 -7
- data/lib/generators/geoblacklight/templates/settings.yml +8 -0
- data/lib/geoblacklight/version.rb +1 -1
- data/package.json +3 -3
- data/spec/spec_helper.rb +1 -0
- data/spec/test_app_templates/lib/generators/test_app_generator.rb +0 -10
- data/template.rb +9 -2
- metadata +5 -6
- data/app/assets/stylesheets/geoblacklight/modules/facets.scss +0 -5
- data/lib/generators/geoblacklight/templates/package.json +0 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 32d2ec143ca4a50dfdd5d7e36ad36cb539cda3ff0e5ba40ce6cde8c0b802bd5f
|
4
|
+
data.tar.gz: 4f013411904f03021301a8ea9c1512c81214c2de7b954a1cddd1803d541ecb58
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2cd1132286bfa264ea43924f9eefb38700570bec0b4475f49d0ee597677b1e10c2ec79370b78d5d5900b8b26f687adf68dc4dedc4c8def7c8dd0854d77cc3aa2
|
7
|
+
data.tar.gz: 4f986b1125c2032891fe7d1666f83f8725d75cb63604e9daafec9b0271271de3a3e360fcdc31058dc9bef58e6e65c324c5a6d3a7b781299f00f9bf8ad337525b
|
@@ -29,13 +29,16 @@ jobs:
|
|
29
29
|
- name: Install dependencies
|
30
30
|
run: bundle install
|
31
31
|
env:
|
32
|
-
RAILS_VERSION: 7.1
|
32
|
+
RAILS_VERSION: "7.2.2.1"
|
33
33
|
|
34
|
-
- name:
|
35
|
-
run:
|
34
|
+
- name: Build frontend package
|
35
|
+
run: |
|
36
|
+
yarn install
|
37
|
+
yarn build
|
38
|
+
yarn link
|
36
39
|
|
37
40
|
- name: Build
|
38
|
-
run: BRANCH=${{ env.BRANCH }} rails new build -m template.rb -a propshaft
|
41
|
+
run: BRANCH=${{ env.BRANCH }} rails new build -m template.rb -a propshaft --css bootstrap --js rollup
|
39
42
|
|
40
43
|
- name: Cleanup
|
41
44
|
run: rm -rf build/node_modules build/Gemfile.lock build/yarn.lock build/tmp
|
data/.github/workflows/ruby.yml
CHANGED
@@ -30,24 +30,17 @@ jobs:
|
|
30
30
|
ruby-version: 3.2
|
31
31
|
- name: Install json schema validator
|
32
32
|
run: gem install json_schemer
|
33
|
-
- name: Run json_schemer against
|
33
|
+
- name: Run json_schemer against aardvark fixtures
|
34
34
|
run: find spec/fixtures/solr_documents -type f -name "*.json" | xargs json_schemer schema/geoblacklight-schema-aardvark.json
|
35
35
|
|
36
36
|
test:
|
37
37
|
runs-on: ubuntu-latest
|
38
38
|
strategy:
|
39
39
|
matrix:
|
40
|
-
ruby_version: ["3.2", "3.3"]
|
41
|
-
rails_version: ["7.
|
40
|
+
ruby_version: ["3.2", "3.3", "3.4"]
|
41
|
+
rails_version: ["7.1.5.1", "7.2.2.1", "8.0.1"]
|
42
42
|
asset_pipeline: ["vite"]
|
43
|
-
additional_engine_cart_rails_options: [""]
|
44
|
-
# this build has failing tests that aren't easy to replicate locally
|
45
|
-
# https://github.com/geoblacklight/geoblacklight/issues/1585
|
46
|
-
# include:
|
47
|
-
# - ruby_version: "3.2"
|
48
|
-
# rails_version: "7.1.3.4"
|
49
|
-
# additional_engine_cart_rails_options: "--css bootstrap"
|
50
|
-
# asset_pipeline: "importmap"
|
43
|
+
additional_engine_cart_rails_options: ["--js rollup"]
|
51
44
|
|
52
45
|
name: test ruby ${{ matrix.ruby_version }} / rails ${{ matrix.rails_version }} / ${{ matrix.asset_pipeline }}
|
53
46
|
steps:
|
@@ -56,18 +49,22 @@ jobs:
|
|
56
49
|
uses: ruby/setup-ruby@v1
|
57
50
|
with:
|
58
51
|
ruby-version: ${{ matrix.ruby_version }}
|
59
|
-
- name: Install dependencies
|
52
|
+
- name: Install Ruby dependencies
|
60
53
|
run: bundle install
|
61
54
|
env:
|
62
55
|
RAILS_VERSION: ${{ matrix.rails_version }}
|
63
|
-
- name:
|
64
|
-
|
56
|
+
- name: Build and link frontend package, if using vite
|
57
|
+
if: matrix.asset_pipeline == 'vite'
|
58
|
+
run: |
|
59
|
+
yarn install
|
60
|
+
yarn build
|
61
|
+
yarn link
|
65
62
|
- name: Run tests
|
66
63
|
run: bundle exec rake ci
|
67
64
|
env:
|
68
65
|
RAILS_VERSION: ${{ matrix.rails_version }}
|
69
66
|
ASSET_PIPELINE: ${{ matrix.asset_pipeline }}
|
70
|
-
ENGINE_CART_RAILS_OPTIONS: "--skip-
|
67
|
+
ENGINE_CART_RAILS_OPTIONS: "--skip-docker --skip-action-cable --skip-rubocop --skip-brakeman --skip-kamal --skip-solid -a propshaft --css bootstrap ${{ matrix.additional_engine_cart_rails_options }}"
|
71
68
|
SOLR_URL: http://solr:SolrRocks@localhost:8983/solr/blacklight-core
|
72
69
|
- name: Upload coverage artifacts
|
73
70
|
uses: actions/upload-artifact@v4
|
data/Rakefile
CHANGED
@@ -14,7 +14,15 @@ require "open3"
|
|
14
14
|
|
15
15
|
# Ensure the app generates with Propshaft; sprockets is no longer supported
|
16
16
|
# https://github.com/geoblacklight/geoblacklight/issues/1265
|
17
|
-
ENV["ENGINE_CART_RAILS_OPTIONS"] = ENV["ENGINE_CART_RAILS_OPTIONS"].to_s + " -a propshaft"
|
17
|
+
ENV["ENGINE_CART_RAILS_OPTIONS"] = ENV["ENGINE_CART_RAILS_OPTIONS"].to_s + " -a propshaft --css bootstrap"
|
18
|
+
|
19
|
+
# Ensure the app generates with the correct javascript pipeline; rollup
|
20
|
+
# (for Vite) is the default
|
21
|
+
ENV["ENGINE_CART_RAILS_OPTIONS"] += if ENV["ASSET_PIPELINE"] == "importmap"
|
22
|
+
" --js importmap"
|
23
|
+
else
|
24
|
+
" --js rollup"
|
25
|
+
end
|
18
26
|
|
19
27
|
def system_with_error_handling(*args)
|
20
28
|
Open3.popen3(*args) do |_stdin, stdout, stderr, thread|
|
@@ -18,6 +18,8 @@ module Geoblacklight
|
|
18
18
|
end
|
19
19
|
|
20
20
|
def viewer_tag
|
21
|
+
leaflet_options = helpers.leaflet_options.deep_dup
|
22
|
+
leaflet_options.SLEEP.SLEEP = false
|
21
23
|
tag.div(nil,
|
22
24
|
id: "static-map",
|
23
25
|
aria: {
|
@@ -28,7 +30,7 @@ module Geoblacklight
|
|
28
30
|
"leaflet-viewer-basemap-value" => helpers.geoblacklight_basemap,
|
29
31
|
"leaflet-viewer-page-value" => "STATIC_MAP",
|
30
32
|
"leaflet-viewer-map-geom-value" => @document.geometry.geojson,
|
31
|
-
"leaflet-viewer-options-value" =>
|
33
|
+
"leaflet-viewer-options-value" => leaflet_options,
|
32
34
|
"leaflet-viewer-draw-initial-bounds-value" => true
|
33
35
|
})
|
34
36
|
end
|
@@ -6,6 +6,7 @@ import { Controller } from "@hotwired/stimulus";
|
|
6
6
|
import basemaps from "geoblacklight/leaflet/basemaps";
|
7
7
|
import LayerOpacityControl from "geoblacklight/leaflet/controls/layer_opacity";
|
8
8
|
import GeoSearchControl from "geoblacklight/leaflet/controls/geosearch";
|
9
|
+
import Sleep from "geoblacklight/leaflet/controls/sleep";
|
9
10
|
import { wmsInspection,
|
10
11
|
tiledMapLayerInspection,
|
11
12
|
featureLayerInspection,
|
@@ -38,8 +39,7 @@ export default class LeafletViewerController extends Controller {
|
|
38
39
|
};
|
39
40
|
|
40
41
|
connect() {
|
41
|
-
//
|
42
|
-
// TODO: figure out why vite @leaftlet_images alias is not working.
|
42
|
+
// Use leaflet icon images from CDN
|
43
43
|
Icon.Default.imagePath = "https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.9.4/images/";
|
44
44
|
|
45
45
|
// Set up layers
|
@@ -65,7 +65,10 @@ export default class LeafletViewerController extends Controller {
|
|
65
65
|
if (this.map) return;
|
66
66
|
|
67
67
|
// Set up the map and fit to bounds
|
68
|
-
|
68
|
+
const sleepSettings = this.optionsValue.SLEEP || { 'SLEEP' : false }
|
69
|
+
this.map = map(this.element, sleepSettings);
|
70
|
+
if (sleepSettings.SLEEP) this.map.addHandler('SLEEP', Sleep);
|
71
|
+
|
69
72
|
this.map.addLayer(this.basemap);
|
70
73
|
this.map.addLayer(this.overlay);
|
71
74
|
this.fitBounds(this.bounds);
|
@@ -0,0 +1,100 @@
|
|
1
|
+
import { DomUtil, DomEvent, Handler } from "leaflet";
|
2
|
+
|
3
|
+
export default class Sleep extends Handler {
|
4
|
+
addHooks() {
|
5
|
+
const container = DomUtil.create("div", "wake-overlay w-100 h-100 position-absolute align-items-center justify-content-center", this._map._container);
|
6
|
+
const button = DomUtil.create("button", "btn btn-primary wake-button", container)
|
7
|
+
|
8
|
+
button.innerHTML = this._map.options.MESSAGE;
|
9
|
+
button.setAttribute("tabindex", "0");
|
10
|
+
button.style.zIndex = 2000;
|
11
|
+
container.style.zIndex = 1999;
|
12
|
+
const background = String(this._map.options.BACKGROUND);
|
13
|
+
container.style.background = background;
|
14
|
+
this.container = container;
|
15
|
+
if (this._map.options.MARGIN_DISTANCE) {
|
16
|
+
this.updateBasedOnSize()
|
17
|
+
} else {
|
18
|
+
this.sleepMap();
|
19
|
+
}
|
20
|
+
this.setListeners()
|
21
|
+
}
|
22
|
+
|
23
|
+
sleepMap() {
|
24
|
+
this._map.dragging.disable();
|
25
|
+
this._map.touchZoom.disable();
|
26
|
+
this._map.scrollWheelZoom.disable();
|
27
|
+
this._map.doubleClickZoom.disable();
|
28
|
+
this._map.boxZoom.disable();
|
29
|
+
this._map.keyboard.disable();
|
30
|
+
this.container.classList.add('d-flex');
|
31
|
+
this.container.classList.remove('d-none');
|
32
|
+
}
|
33
|
+
|
34
|
+
wakeMap() {
|
35
|
+
this._map.dragging.enable();
|
36
|
+
this._map.touchZoom.enable();
|
37
|
+
this._map.scrollWheelZoom.enable();
|
38
|
+
this._map.doubleClickZoom.enable();
|
39
|
+
this._map.boxZoom.enable();
|
40
|
+
this._map.keyboard.enable();
|
41
|
+
this.container.classList.remove('d-flex');
|
42
|
+
this.container.classList.add('d-none');
|
43
|
+
}
|
44
|
+
|
45
|
+
updateBasedOnSize() {
|
46
|
+
const rect = this._map._container.getBoundingClientRect();
|
47
|
+
// sometimes the left/right side has larger margin, so we take an average
|
48
|
+
const calculation = ((window.innerWidth - rect.right) + rect.left) / 2;
|
49
|
+
if (calculation < this._map.options.MARGIN_DISTANCE) {
|
50
|
+
this.sleepMap();
|
51
|
+
} else {
|
52
|
+
this.wakeMap();
|
53
|
+
}
|
54
|
+
}
|
55
|
+
|
56
|
+
setListeners() {
|
57
|
+
const _this = this;
|
58
|
+
let timer;
|
59
|
+
let sleeptimer;
|
60
|
+
|
61
|
+
if (_this._map.options.MARGIN_DISTANCE){
|
62
|
+
window.addEventListener("resize", (event) => {
|
63
|
+
console.log(event)
|
64
|
+
_this.updateBasedOnSize();
|
65
|
+
})
|
66
|
+
}
|
67
|
+
|
68
|
+
DomEvent.on(_this.container, "click", (e) => {
|
69
|
+
_this.wakeMap()
|
70
|
+
});
|
71
|
+
|
72
|
+
DomEvent.on(_this.container, "focus", (e) => {
|
73
|
+
_this.wakeMap()
|
74
|
+
});
|
75
|
+
|
76
|
+
if (this._map.options.HOVERTOWAKE) {
|
77
|
+
DomEvent.on(this._map._container, "mouseenter", (e) => {
|
78
|
+
clearTimeout(sleeptimer);
|
79
|
+
|
80
|
+
timer = setTimeout(function() {
|
81
|
+
_this.wakeMap()
|
82
|
+
}, _this._map.options.WAKETIME);
|
83
|
+
|
84
|
+
});
|
85
|
+
|
86
|
+
DomEvent.on(this._map._container, "mouseleave", (e) => {
|
87
|
+
clearTimeout(timer);
|
88
|
+
|
89
|
+
sleeptimer = setTimeout(function() {
|
90
|
+
_this.sleepMap()
|
91
|
+
}, _this._map.options.SLEEPTIME);
|
92
|
+
});
|
93
|
+
}
|
94
|
+
|
95
|
+
DomEvent.on(this.container, "touchstart", (e) => {
|
96
|
+
_this.wakeMap()
|
97
|
+
});
|
98
|
+
}
|
99
|
+
}
|
100
|
+
|
data/geoblacklight.gemspec
CHANGED
@@ -15,9 +15,10 @@ Gem::Specification.new do |spec|
|
|
15
15
|
spec.files = `git ls-files -z`.split(%(\x0))
|
16
16
|
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
17
17
|
spec.require_paths = ["lib"]
|
18
|
+
spec.required_ruby_version = ">= 3.2.0"
|
18
19
|
spec.required_rubygems_version = ">= 2.5.2"
|
19
20
|
|
20
|
-
spec.add_dependency "rails", ">= 6.1", "<
|
21
|
+
spec.add_dependency "rails", ">= 6.1", "< 9"
|
21
22
|
spec.add_dependency "blacklight", "~> 8.0"
|
22
23
|
spec.add_dependency "config"
|
23
24
|
spec.add_dependency "faraday", "~> 2.0"
|
@@ -27,11 +27,6 @@ module Geoblacklight
|
|
27
27
|
run "yarn link @geoblacklight/frontend" if options[:test]
|
28
28
|
end
|
29
29
|
|
30
|
-
# Workaround for https://github.com/projectblacklight/blacklight/pull/3285
|
31
|
-
def update_blacklight_frontend
|
32
|
-
run "yarn add blacklight-frontend@8.3"
|
33
|
-
end
|
34
|
-
|
35
30
|
# Add the customization overrides and insert before bootstrap import
|
36
31
|
def add_customizations
|
37
32
|
copy_file "assets/_customizations.scss", "app/assets/stylesheets/_customizations.scss"
|
@@ -21,7 +21,7 @@ module Geoblacklight
|
|
21
21
|
DESCRIPTION
|
22
22
|
|
23
23
|
# Install Vite
|
24
|
-
def
|
24
|
+
def install_vite_rails
|
25
25
|
gem "vite_rails", "~> 3.0"
|
26
26
|
run "bundle install"
|
27
27
|
end
|
@@ -37,33 +37,16 @@ module Geoblacklight
|
|
37
37
|
copy_file "vite.config.ts", "vite.config.ts"
|
38
38
|
end
|
39
39
|
|
40
|
-
#
|
41
|
-
def
|
42
|
-
copy_file "package.json", "package.json"
|
43
|
-
run "yarn install"
|
44
|
-
end
|
45
|
-
|
46
|
-
# This will write its own package.json if one doesn't exist, causing a
|
47
|
-
# conflict, so it needs to happen after we copy ours
|
48
|
-
def bundle_install
|
40
|
+
# Run the vite install generator (create binstubs, etc.)
|
41
|
+
def setup_vite
|
49
42
|
run "bundle exec vite install"
|
50
43
|
end
|
51
44
|
|
52
45
|
# Pick a version of the frontend asset package and install it.
|
53
46
|
def add_frontend
|
54
|
-
# If in local development or CI, install the version we made linkable in
|
55
|
-
# the test app generator. This will make it so changes made in the outer
|
56
|
-
# directory are picked up automatically, like a symlink. Note that this
|
57
|
-
# does NOT install the dependencies of the package, so we have to make
|
58
|
-
# sure to install those separately. See:
|
59
|
-
# https://classic.yarnpkg.com/lang/en/docs/cli/link/
|
60
|
-
# https://github.com/yarnpkg/yarn/issues/2914
|
61
|
-
if options[:test]
|
62
|
-
run "yarn link @geoblacklight/frontend"
|
63
|
-
|
64
47
|
# If a branch was specified (e.g. you are running a template.rb build
|
65
48
|
# against a test branch), use the latest version available on npm
|
66
|
-
|
49
|
+
if ENV["BRANCH"]
|
67
50
|
run "yarn add @geoblacklight/frontend@latest"
|
68
51
|
|
69
52
|
# Otherwise, pick the version from npm that matches our Geoblacklight
|
@@ -71,6 +54,25 @@ module Geoblacklight
|
|
71
54
|
else
|
72
55
|
run "yarn add @geoblacklight/frontend@#{Geoblacklight::VERSION}"
|
73
56
|
end
|
57
|
+
|
58
|
+
# If in local development or CI, also create a link. This will make it so
|
59
|
+
# changes made in the outer directory are picked up automatically.
|
60
|
+
# `yarn link` has to have already been run in the outer directory first.
|
61
|
+
run "yarn link @geoblacklight/frontend" if options[:test]
|
62
|
+
end
|
63
|
+
|
64
|
+
# The vite_rails gem doesn't currently install the vite-plugin-rails
|
65
|
+
# node package, so we need to do that manually.
|
66
|
+
def install_dev_dependencies
|
67
|
+
run "yarn add --dev vite-plugin-rails"
|
68
|
+
end
|
69
|
+
|
70
|
+
# Remove generated npm scripts from rollup and replace with our own.
|
71
|
+
# Adds a shortcut so that 'yarn build' runs our vite pipeline
|
72
|
+
# No easy way to do this with yarn, so we use `npm pkg`...
|
73
|
+
def setup_npm_scripts
|
74
|
+
run "npm pkg delete scripts"
|
75
|
+
run "npm pkg set scripts.build=\"vite build\""
|
74
76
|
end
|
75
77
|
|
76
78
|
# Add our own stylesheets that reference the versions from npm
|
@@ -24,13 +24,10 @@
|
|
24
24
|
<%= content_for(:head) %>
|
25
25
|
</head>
|
26
26
|
<body class="<%= render_body_class %>">
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
<%= content_for(:skip_links) %>
|
32
|
-
</div>
|
33
|
-
</nav>
|
27
|
+
<%= render blacklight_config.skip_link_component.new do %>
|
28
|
+
<%= content_for(:skip_links) %>
|
29
|
+
<% end %>
|
30
|
+
|
34
31
|
<%= render partial: 'shared/header_navbar' %>
|
35
32
|
|
36
33
|
<main id="main-container" class="<%= container_classes %>" role="main" aria-label="<%= t('blacklight.main.aria.main_container') %>">
|
@@ -239,6 +239,14 @@ LEAFLET:
|
|
239
239
|
STATIC_MAP:
|
240
240
|
color: '#3388ff'
|
241
241
|
SELECTED_COLOR: "#2C7FB8"
|
242
|
+
SLEEP:
|
243
|
+
SLEEP: true # set to false to disable
|
244
|
+
MARGIN_DISTANCE: 100 # set to zero / false if you want to disable this check
|
245
|
+
SLEEPTIME: 750
|
246
|
+
WAKETIME: 750
|
247
|
+
HOVERTOWAKE: false
|
248
|
+
MESSAGE: 'Click to Wake'
|
249
|
+
BACKGROUND: 'rgba(214, 214, 214, .7)'
|
242
250
|
LAYERS:
|
243
251
|
DETECT_RETINA: true
|
244
252
|
INDEX:
|
data/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@geoblacklight/frontend",
|
3
3
|
"type": "module",
|
4
|
-
"version": "5.0.0
|
4
|
+
"version": "5.0.0",
|
5
5
|
"license": "Apache-2.0",
|
6
6
|
"publishConfig": {
|
7
7
|
"access": "public"
|
@@ -23,12 +23,12 @@
|
|
23
23
|
"@hotwired/stimulus": "^3.2.2",
|
24
24
|
"@popperjs/core": "^2.11.8",
|
25
25
|
"@samvera/clover-iiif": "^2.3.2",
|
26
|
-
"blacklight-frontend": "
|
26
|
+
"blacklight-frontend": "8",
|
27
27
|
"bootstrap": "^5.3.3",
|
28
28
|
"esri-leaflet": "^3.0.12",
|
29
29
|
"leaflet": "^1.9.4",
|
30
|
-
"leaflet-fullscreen": "^1.0.2",
|
31
30
|
"leaflet-iiif": "^3.0.0",
|
31
|
+
"leaflet-fullscreen": "^1.0.2",
|
32
32
|
"ol": "8.1.0",
|
33
33
|
"ol-pmtiles": "^0.3.0",
|
34
34
|
"react": "^18.2.0",
|
data/spec/spec_helper.rb
CHANGED
@@ -13,6 +13,7 @@ end
|
|
13
13
|
SimpleCov.start "rails" do
|
14
14
|
add_filter "lib/generators/geoblacklight/install_generator.rb"
|
15
15
|
add_filter "lib/geoblacklight/version.rb"
|
16
|
+
add_filter "lib/geoblacklight/engine.rb"
|
16
17
|
add_filter "lib/generators"
|
17
18
|
add_filter "lib/tasks/geoblacklight.rake"
|
18
19
|
add_filter "/spec"
|
@@ -13,16 +13,6 @@ class TestAppGenerator < Rails::Generators::Base
|
|
13
13
|
end
|
14
14
|
end
|
15
15
|
|
16
|
-
def build_frontend
|
17
|
-
run "yarn install && yarn build"
|
18
|
-
end
|
19
|
-
|
20
|
-
# This makes the assets available in the test app so that changes made in
|
21
|
-
# local development can be picked up automatically
|
22
|
-
def link_frontend
|
23
|
-
run "yarn link"
|
24
|
-
end
|
25
|
-
|
26
16
|
def run_blacklight_generator
|
27
17
|
say_status("warning", "GENERATING BL", :yellow)
|
28
18
|
|
data/template.rb
CHANGED
@@ -4,14 +4,21 @@ gem "blacklight", "~> 8.0"
|
|
4
4
|
|
5
5
|
# Ensure the app generates with Propshaft; sprockets is no longer supported
|
6
6
|
# https://github.com/geoblacklight/geoblacklight/issues/1265
|
7
|
-
ENV["ENGINE_CART_RAILS_OPTIONS"] = ENV["ENGINE_CART_RAILS_OPTIONS"].to_s + " -a propshaft"
|
7
|
+
ENV["ENGINE_CART_RAILS_OPTIONS"] = ENV["ENGINE_CART_RAILS_OPTIONS"].to_s + " -a propshaft --css bootstrap"
|
8
|
+
|
9
|
+
# Use importmaps for JS if requested, otherwise default to vite
|
10
|
+
ENV["ENGINE_CART_RAILS_OPTIONS"] += if ENV["ASSET_PIPELINE"] == "importmap"
|
11
|
+
" --js importmap"
|
12
|
+
else
|
13
|
+
" --js rollup"
|
14
|
+
end
|
8
15
|
|
9
16
|
# Install latest version of geoblacklight gem if running
|
10
17
|
# generator with a development branch.
|
11
18
|
if ENV["BRANCH"]
|
12
19
|
gem "geoblacklight", github: "geoblacklight/geoblacklight", branch: ENV["BRANCH"]
|
13
20
|
else
|
14
|
-
gem "geoblacklight", "~>
|
21
|
+
gem "geoblacklight", "~> 5.0"
|
15
22
|
end
|
16
23
|
|
17
24
|
run "bundle install"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: geoblacklight
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.0.0
|
4
|
+
version: 5.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mike Graves
|
@@ -22,7 +22,7 @@ dependencies:
|
|
22
22
|
version: '6.1'
|
23
23
|
- - "<"
|
24
24
|
- !ruby/object:Gem::Version
|
25
|
-
version: '
|
25
|
+
version: '9'
|
26
26
|
type: :runtime
|
27
27
|
prerelease: false
|
28
28
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -32,7 +32,7 @@ dependencies:
|
|
32
32
|
version: '6.1'
|
33
33
|
- - "<"
|
34
34
|
- !ruby/object:Gem::Version
|
35
|
-
version: '
|
35
|
+
version: '9'
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: blacklight
|
38
38
|
requirement: !ruby/object:Gem::Requirement
|
@@ -389,7 +389,6 @@ files:
|
|
389
389
|
- app/assets/stylesheets/geoblacklight/modules/_blacklight_overrides.scss
|
390
390
|
- app/assets/stylesheets/geoblacklight/modules/_styles.scss
|
391
391
|
- app/assets/stylesheets/geoblacklight/modules/downloads.scss
|
392
|
-
- app/assets/stylesheets/geoblacklight/modules/facets.scss
|
393
392
|
- app/assets/stylesheets/geoblacklight/modules/geosearch.scss
|
394
393
|
- app/assets/stylesheets/geoblacklight/modules/home.scss
|
395
394
|
- app/assets/stylesheets/geoblacklight/modules/icon-customization.scss
|
@@ -561,6 +560,7 @@ files:
|
|
561
560
|
- app/javascript/geoblacklight/leaflet/constants.js
|
562
561
|
- app/javascript/geoblacklight/leaflet/controls/geosearch.js
|
563
562
|
- app/javascript/geoblacklight/leaflet/controls/layer_opacity.js
|
563
|
+
- app/javascript/geoblacklight/leaflet/controls/sleep.js
|
564
564
|
- app/javascript/geoblacklight/leaflet/inspection.js
|
565
565
|
- app/javascript/geoblacklight/leaflet/layer_index_map.js
|
566
566
|
- app/javascript/geoblacklight/leaflet/layer_wmts.js
|
@@ -610,7 +610,6 @@ files:
|
|
610
610
|
- lib/generators/geoblacklight/templates/demo-app/Dockerfile
|
611
611
|
- lib/generators/geoblacklight/templates/demo-app/compose.yml
|
612
612
|
- lib/generators/geoblacklight/templates/demo-app/start-server.sh
|
613
|
-
- lib/generators/geoblacklight/templates/package.json
|
614
613
|
- lib/generators/geoblacklight/templates/settings.yml
|
615
614
|
- lib/generators/geoblacklight/templates/vite.config.ts
|
616
615
|
- lib/generators/geoblacklight/templates/vite.json
|
@@ -948,7 +947,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
948
947
|
requirements:
|
949
948
|
- - ">="
|
950
949
|
- !ruby/object:Gem::Version
|
951
|
-
version:
|
950
|
+
version: 3.2.0
|
952
951
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
953
952
|
requirements:
|
954
953
|
- - ">="
|
@@ -1,16 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"dependencies": {
|
3
|
-
"@github/auto-complete-element": "3.6.2",
|
4
|
-
"@hotwired/stimulus": "^3.2.2",
|
5
|
-
"@hotwired/turbo-rails": "^8.0.4",
|
6
|
-
"@popperjs/core": "2.11.8",
|
7
|
-
"blacklight-frontend": "8.3.0",
|
8
|
-
"bootstrap": "^5.3.3",
|
9
|
-
"sass": "^1.77.7"
|
10
|
-
},
|
11
|
-
"devDependencies": {
|
12
|
-
"vite": "^5.1.5",
|
13
|
-
"vite-plugin-ruby": "^5.0.0",
|
14
|
-
"vite-plugin-rails": "^0.5.0"
|
15
|
-
}
|
16
|
-
}
|