arclight 1.0.0.beta4 → 1.0.0.beta6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: de99e4c2ae0648272400bc3f6e1ebc44d72c4eba1dd5a5da249c24cc3c81fbd9
4
- data.tar.gz: 223999c19a620b8dfbabdf237799f2284aa45ca7eccfc2a9c78f9b3afd1454e2
3
+ metadata.gz: 978d99d3c0ba2a6ffbb24b50b7d0014514c56dd2329e269d3f3cd0b0a8823b54
4
+ data.tar.gz: 8b0aaf3ae67be3690a05c19cc331b58095fbacd7d7d46a94e951c3ee1966a14e
5
5
  SHA512:
6
- metadata.gz: dffd784bd5b96d60bc8ff647330ce887347437b22e6fdf3b02dd918bd94c9159f340491a47c41c12367d3681d749501992d1e00155477e152f2c9f4c9dbb631e
7
- data.tar.gz: 56ec25a1e40465b4ecee490243da9959c5559a1060813e8a5a579ea1275950f9d07b5222f378820ea584b7a922b0b00249496d1e6a4c8272eb2c1dbcee38d222
6
+ metadata.gz: 34349c3acd58a399977b48fcfd91879111dde724fd7508792760e3e183802fcfd175e9bea8adc4ae29903895f7297b1a3090ff1e637f26b73abf638f9e11b1f9
7
+ data.tar.gz: 7afeec4ed0a5107b2abfaa5f914d48a0cc898e77cd49a2674f37a1e270e00cd89a95f329eec00f00268ce5aa0bab731c205eddc2eae12ba0a87e9a1775325287
@@ -18,7 +18,7 @@ export default class OembedController extends Controller {
18
18
  throw new Error(`HTTP error, status = ${response.status}`)
19
19
  })
20
20
  .then((body) => {
21
- const oEmbedEndPoint = OembedController.findOEmbedEndPoint(body)
21
+ const oEmbedEndPoint = this.findOEmbedEndPoint(body)
22
22
  if (!oEmbedEndPoint || oEmbedEndPoint.length === 0) {
23
23
  console.warn(`No oEmbed endpoint found in <head> at ${this.urlValue}`)
24
24
  return
@@ -29,7 +29,10 @@ export default class OembedController extends Controller {
29
29
  })
30
30
  }
31
31
 
32
- static findOEmbedEndPoint(body, extraParams = {}) {
32
+ // We are choosing not to make this class static so that downstream classes
33
+ // can override it and access values to populate extraParams.
34
+ // E.g. https://github.com/sul-dlss/vt-arclight/blob/main/app/javascript/controllers/sul_embed_controller.js
35
+ findOEmbedEndPoint(body, extraParams = {}) { // eslint-disable-line class-methods-use-this
33
36
  // Parse out link elements so image assets are not loaded
34
37
  const template = document.createElement('template')
35
38
  template.innerHTML = body.match(/<link .*>/g).join('')
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Arclight
4
- VERSION = '1.0.0.beta4'
4
+ VERSION = '1.0.0.beta6'
5
5
  end
data/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "arclight",
3
- "version": "1.0.0-beta.4",
3
+ "version": "1.0.0-beta.6",
4
4
  "description": "The frontend for arclight",
5
5
  "main": "app/assets/javascript/arclight/arclight.js",
6
6
  "files": [
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: arclight
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.beta4
4
+ version: 1.0.0.beta6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Darren Hardy
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: exe
13
13
  cert_chain: []
14
- date: 2023-03-20 00:00:00.000000000 Z
14
+ date: 2023-03-24 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: blacklight
@@ -513,7 +513,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
513
513
  - !ruby/object:Gem::Version
514
514
  version: 1.3.1
515
515
  requirements: []
516
- rubygems_version: 3.3.26
516
+ rubygems_version: 3.3.7
517
517
  signing_key:
518
518
  specification_version: 4
519
519
  summary: A Blacklight-based environment to support discovery and delivery for archives