geoblacklight 2.1.2 → 2.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (121) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +6 -0
  3. data/.gitignore +3 -1
  4. data/.rubocop.yml +3 -1
  5. data/.rubocop_todo.yml +7 -15
  6. data/README.md +5 -6
  7. data/app/assets/images/blacklight/arrow-circle-down.svg +4 -0
  8. data/app/assets/images/blacklight/baruch-cuny.svg +6 -0
  9. data/app/assets/images/blacklight/berkeley.svg +7 -0
  10. data/app/assets/images/blacklight/book.svg +6 -0
  11. data/app/assets/images/blacklight/bookmark.svg +6 -0
  12. data/app/assets/images/blacklight/cd-rom.svg +6 -0
  13. data/app/assets/images/blacklight/chicago.svg +7 -0
  14. data/app/assets/images/blacklight/columbia.svg +6 -0
  15. data/app/assets/images/blacklight/cornell.svg +8 -0
  16. data/app/assets/images/blacklight/dvd-rom.svg +6 -0
  17. data/app/assets/images/blacklight/email.svg +6 -0
  18. data/app/assets/images/blacklight/esri-globe.svg +34 -37
  19. data/app/assets/images/blacklight/geoblacklight-icons.json +2079 -0
  20. data/app/assets/images/blacklight/globe.svg +4 -0
  21. data/app/assets/images/blacklight/harvard.svg +6 -0
  22. data/app/assets/images/blacklight/home.svg +4 -0
  23. data/app/assets/images/blacklight/illinois.svg +7 -0
  24. data/app/assets/images/blacklight/image.svg +6 -0
  25. data/app/assets/images/blacklight/indiana.svg +6 -0
  26. data/app/assets/images/blacklight/iowa.svg +6 -0
  27. data/app/assets/images/blacklight/leaf.svg +6 -0
  28. data/app/assets/images/blacklight/lewis-clark.svg +8 -0
  29. data/app/assets/images/blacklight/line.svg +7 -0
  30. data/app/assets/images/blacklight/logo.svg +1 -0
  31. data/app/assets/images/blacklight/map-marker.svg +6 -0
  32. data/app/assets/images/blacklight/map.svg +6 -0
  33. data/app/assets/images/blacklight/maryland.svg +6 -0
  34. data/app/assets/images/blacklight/massgis.svg +6 -0
  35. data/app/assets/images/blacklight/metadata.svg +6 -0
  36. data/app/assets/images/blacklight/michigan-state.svg +7 -0
  37. data/app/assets/images/blacklight/michigan.svg +6 -0
  38. data/app/assets/images/blacklight/minnesota.svg +6 -0
  39. data/app/assets/images/blacklight/mit.svg +6 -0
  40. data/app/assets/images/blacklight/mixed.svg +8 -0
  41. data/app/assets/images/blacklight/multilinestring.svg +9 -0
  42. data/app/assets/images/blacklight/multipoint.svg +6 -0
  43. data/app/assets/images/blacklight/multipolygon.svg +9 -0
  44. data/app/assets/images/blacklight/nyu.svg +9 -0
  45. data/app/assets/images/blacklight/ohio-state.svg +8 -0
  46. data/app/assets/images/blacklight/pagelines-brands.svg +6 -0
  47. data/app/assets/images/blacklight/paper-map.svg +6 -0
  48. data/app/assets/images/blacklight/penn-state.svg +7 -0
  49. data/app/assets/images/blacklight/point.svg +6 -0
  50. data/app/assets/images/blacklight/polygon.svg +7 -0
  51. data/app/assets/images/blacklight/polyline.svg +9 -0
  52. data/app/assets/images/blacklight/princeton.svg +6 -0
  53. data/app/assets/images/blacklight/public.svg +6 -0
  54. data/app/assets/images/blacklight/purdue.svg +7 -0
  55. data/app/assets/images/blacklight/raster.svg +6 -0
  56. data/app/assets/images/blacklight/restricted.svg +6 -0
  57. data/app/assets/images/blacklight/sms.svg +6 -0
  58. data/app/assets/images/blacklight/stanford.svg +6 -0
  59. data/app/assets/images/blacklight/table.svg +6 -0
  60. data/app/assets/images/blacklight/tags.svg +4 -0
  61. data/app/assets/images/blacklight/texas.svg +6 -0
  62. data/app/assets/images/blacklight/tufts.svg +6 -0
  63. data/app/assets/images/blacklight/ucla.svg +6 -0
  64. data/app/assets/images/blacklight/uva.svg +6 -0
  65. data/app/assets/images/blacklight/web_services.svg +6 -0
  66. data/app/assets/images/blacklight/wisconsin.svg +6 -0
  67. data/app/assets/javascripts/geoblacklight/modules/help_text.js +7 -0
  68. data/app/assets/javascripts/geoblacklight/modules/item.js +1 -3
  69. data/app/assets/javascripts/geoblacklight/viewers/oembed.js +13 -0
  70. data/app/assets/stylesheets/geoblacklight/_blacklight_overrides.scss +9 -1
  71. data/app/assets/stylesheets/geoblacklight/modules/icon-customization.scss +49 -59
  72. data/app/assets/stylesheets/geoblacklight/modules/item.scss +4 -0
  73. data/app/assets/stylesheets/geoblacklight/modules/results.scss +22 -0
  74. data/app/assets/stylesheets/geoblacklight/modules/toolbar.scss +4 -0
  75. data/app/helpers/geoblacklight_helper.rb +91 -5
  76. data/app/models/concerns/geoblacklight/solr_document.rb +4 -0
  77. data/app/models/concerns/geoblacklight/spatial_search_behavior.rb +5 -0
  78. data/app/views/catalog/_data_dictionary.html.erb +3 -2
  79. data/app/views/catalog/_document_action.html.erb +1 -1
  80. data/app/views/catalog/_exports.html.erb +2 -10
  81. data/app/views/catalog/_home_text.html.erb +4 -4
  82. data/app/views/catalog/_show_default_viewer_container.html.erb +5 -0
  83. data/app/views/catalog/_show_header_default.html.erb +2 -4
  84. data/app/views/relation/_ancestors.html.erb +2 -1
  85. data/app/views/relation/_descendants.html.erb +2 -1
  86. data/app/views/shared/_header_navbar.html.erb +2 -0
  87. data/config/locales/geoblacklight.en.yml +88 -0
  88. data/geoblacklight.gemspec +1 -0
  89. data/lib/generators/geoblacklight/templates/geoblacklight.js +1 -1
  90. data/lib/generators/geoblacklight/templates/settings.yml +19 -0
  91. data/lib/geoblacklight/constants.rb +3 -2
  92. data/lib/geoblacklight/item_viewer.rb +5 -1
  93. data/lib/geoblacklight/metadata/base.rb +15 -10
  94. data/lib/geoblacklight/reference.rb +2 -1
  95. data/lib/geoblacklight/version.rb +1 -1
  96. data/package.json +4 -0
  97. data/schema/references.md +2 -1
  98. data/spec/features/exports_spec.rb +9 -0
  99. data/spec/features/help_text_spec.rb +8 -0
  100. data/spec/features/metadata_panel_spec.rb +51 -8
  101. data/spec/features/oembed_spec.rb +9 -0
  102. data/spec/features/search_results_map_spec.rb +1 -1
  103. data/spec/features/split_view.html.erb_spec.rb +1 -1
  104. data/spec/features/suppressed_records_spec.rb +14 -0
  105. data/spec/fixtures/fgdc/harvard-g7064-s2-1834-k3.xml +1 -0
  106. data/spec/fixtures/iso19139/stanford-cg357zz0321.xml +581 -0
  107. data/spec/fixtures/mods/fb897vt9938.mods +111 -0
  108. data/spec/fixtures/mods/stanford-cg357zz0321.mods +113 -0
  109. data/spec/fixtures/solr_documents/iiif-eastern-hemisphere.json +1 -1
  110. data/spec/fixtures/solr_documents/oembed.json +24 -0
  111. data/spec/helpers/geoblacklight_helper_spec.rb +30 -7
  112. data/spec/javascripts/geoblacklight_spec.js +4 -0
  113. data/spec/javascripts/metadata_download_button_spec.js +1 -1
  114. data/spec/lib/geoblacklight/metadata/base_spec.rb +18 -4
  115. data/spec/lib/geoblacklight/reference_spec.rb +30 -0
  116. data/spec/models/concerns/geoblacklight/solr_document_spec.rb +20 -0
  117. data/spec/spec_helper.rb +8 -5
  118. data/vendor/assets/javascripts/readmore.js +618 -0
  119. data/vendor/assets/javascripts/readmore.js.map +1 -0
  120. metadata +96 -3
  121. data/vendor/assets/javascripts/readmore.min.js +0 -11
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["webpack://Readmore/webpack/universalModuleDefinition","webpack://Readmore/webpack/bootstrap","webpack://Readmore/./node_modules/@babel/runtime/helpers/classCallCheck.js","webpack://Readmore/./node_modules/@babel/runtime/helpers/createClass.js","webpack://Readmore/./node_modules/@babel/runtime/helpers/typeof.js","webpack://Readmore/./src/readmore.js"],"names":["uniqueIdCounter","isCssEmbeddedFor","removePolyfill","arr","forEach","item","Object","prototype","hasOwnProperty","call","defineProperty","configurable","enumerable","writable","value","remove","parentNode","removeChild","Element","CharacterData","DocumentType","callback","scope","i","length","extend","objects","hasProp","child","parent","args","keys","key","push","c1","shift","p1","unshift","debounce","func","wait","immediate","timeout","debouncedFunc","callNow","later","apply","clearTimeout","setTimeout","uniqueId","setBoxHeights","element","style","height","expandedHeight","parseInt","getBoundingClientRect","cssMaxHeight","window","getComputedStyle","maxHeight","defaultHeight","readmore","collapsedHeight","createElementFromString","htmlString","div","document","createElement","innerHTML","firstChild","embedCSS","selector","options","styles","blockCSS","speed","d","u","css","type","styleSheet","cssText","appendChild","createTextNode","getElementsByTagName","buildToggle","link","clickHandler","event","toggle","text","toggleLink","setAttribute","id","addEventListener","bind","isEnvironmentSupported","querySelectorAll","resizeBoxes","elements","expanded","getAttribute","defaults","heightMargin","moreLink","lessLink","startOpen","sourceOrder","blockProcessed","beforeToggle","afterToggle","Readmore","nodeName","instanceSelector","classList","add","substr","toggleElement","insertBefore","nextSibling","el","trigger","querySelector","newHeight","shouldContinueToggle","transitionendHandler","transitionEvent","stopPropagation","removeEventListener","target","replaceChild","Error","preventDefault","indexOf","filter","removeAttribute","VERSION"],"mappings":";;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;ACVA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,kDAA0C,gCAAgC;AAC1E;AACA;;AAEA;AACA;AACA;AACA,gEAAwD,kBAAkB;AAC1E;AACA,yDAAiD,cAAc;AAC/D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAyC,iCAAiC;AAC1E,wHAAgH,mBAAmB,EAAE;AACrI;AACA;;AAEA;AACA;AACA;AACA,mCAA2B,0BAA0B,EAAE;AACvD,yCAAiC,eAAe;AAChD;AACA;AACA;;AAEA;AACA,8DAAsD,+DAA+D;;AAErH;AACA;;;AAGA;AACA;;;;;;;;;;;;AClFA;AACA;AACA;AACA;AACA;;AAEA,iC;;;;;;;;;;;ACNA;AACA,iBAAiB,kBAAkB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,8B;;;;;;;;;;;AChBA,wBAAwB,2EAA2E,oCAAoC,mBAAmB,GAAG,EAAE,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;;AAED,cAAI,CAACiD,QAAL,GAAgB,MAAI,CAACA,QAAL,CAAcmC,MAAd,CAAqB,UAACd,EAAD;AAAA,iBAAQA,EAAE,KAAKtE,OAAf;AAAA,SAArB,CAAhB;;AAEA,YAAI,MAAI,CAAC+D,gBAAT,EAA2B;AACzB/D,iBAAO,CAACgE,SAAR,CAAkBpG,MAAlB,CAAyB,MAAI,CAACmG,gBAAL,CAAsBG,MAAtB,CAA6B,CAA7B,CAAzB;AACD;;AAED,eAAOlE,OAAO,CAACW,QAAf;AAEAX,eAAO,CAACC,KAAR,CAAcC,MAAd,GAAuB,SAAvB;AACAF,eAAO,CAACC,KAAR,CAAcQ,SAAd,GAA0B,SAA1B;AAEAT,eAAO,CAACqF,eAAR,CAAwB,eAAxB;AACArF,eAAO,CAACqF,eAAR,CAAwB,eAAxB;AAEA,YAAMd,OAAO,GAAGvD,QAAQ,CAACwD,aAAT,4BAA0CxE,OAAO,CAAC2C,EAAlD,SAAhB;;AACA,YAAI4B,OAAJ,EAAa;AACXA,iBAAO,CAAC3G,MAAR;AACD;;AAED,YAAIoC,OAAO,CAAC2C,EAAR,CAAWwC,OAAX,CAAmB,OAAnB,MAAgC,CAAC,CAArC,EAAwC;AACtCnF,iBAAO,CAACqF,eAAR,CAAwB,IAAxB;AACD;AACF,OA3BM,CAAP;AA6BA,aAAO,IAAP;AACD;;;;;;AAGHxB,QAAQ,CAACyB,OAAT;AAEezB,uEAAf,E","file":"readmore.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"Readmore\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"Readmore\"] = factory();\n\telse\n\t\troot[\"Readmore\"] = factory();\n})(window, function() {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 0);\n","function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nmodule.exports = _classCallCheck;","function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nmodule.exports = _createClass;","function _typeof2(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof2 = function _typeof2(obj) { return typeof obj; }; } else { _typeof2 = function _typeof2(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof2(obj); }\n\nfunction _typeof(obj) {\n if (typeof Symbol === \"function\" && _typeof2(Symbol.iterator) === \"symbol\") {\n module.exports = _typeof = function _typeof(obj) {\n return _typeof2(obj);\n };\n } else {\n module.exports = _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : _typeof2(obj);\n };\n }\n\n return _typeof(obj);\n}\n\nmodule.exports = _typeof;","let uniqueIdCounter = 0;\n\nconst isCssEmbeddedFor = [];\n\n// from:https://github.com/jserz/js_piece/blob/master/DOM/ChildNode/remove()/remove().md\n((function removePolyfill(arr) {\n arr.forEach((item) => {\n if (Object.prototype.hasOwnProperty.call(item, 'remove')) {\n return;\n }\n Object.defineProperty(item, 'remove', {\n configurable: true,\n enumerable: true,\n writable: true,\n value: function remove() {\n if (this.parentNode !== null) {\n this.parentNode.removeChild(this);\n }\n }\n });\n });\n})([Element.prototype, CharacterData.prototype, DocumentType.prototype]));\n\nfunction forEach(arr, callback, scope) {\n for (let i = 0; i < arr.length; i += 1) {\n callback.call(scope, arr[i], i);\n }\n}\n\nfunction extend(...objects) {\n const hasProp = {}.hasOwnProperty;\n let child = objects[0];\n let parent = objects[1];\n\n if (objects.length > 2) {\n const args = [];\n\n Object.keys(objects).forEach((key) => {\n args.push(objects[key]);\n });\n\n while (args.length > 2) {\n const c1 = args.shift();\n const p1 = args.shift();\n args.unshift(extend(c1, p1));\n }\n\n child = args.shift();\n parent = args.shift();\n }\n\n if (parent) {\n Object.keys(parent).forEach((key) => {\n if (hasProp.call(parent, key)) {\n if (typeof parent[key] === 'object') {\n child[key] = child[key] || {};\n child[key] = extend(child[key], parent[key]);\n } else {\n child[key] = parent[key];\n }\n }\n });\n }\n\n return child;\n}\n\nfunction debounce(func, wait, immediate) {\n let timeout;\n\n return function debouncedFunc(...args) {\n const callNow = immediate && !timeout;\n const later = () => {\n timeout = null;\n if (!immediate) func.apply(this, args);\n };\n\n clearTimeout(timeout);\n timeout = setTimeout(later, wait);\n\n if (callNow) func.apply(this, args);\n };\n}\n\nfunction uniqueId() {\n uniqueIdCounter += 1;\n\n return `rmjs-${uniqueIdCounter}`;\n}\n\nfunction setBoxHeights(element) {\n element.style.height = 'auto';\n\n const expandedHeight = parseInt(element.getBoundingClientRect().height, 10);\n const cssMaxHeight = parseInt(window.getComputedStyle(element).maxHeight, 10);\n const defaultHeight = parseInt(element.readmore.defaultHeight, 10);\n\n // Store our measurements.\n element.readmore.expandedHeight = expandedHeight;\n element.readmore.maxHeight = cssMaxHeight;\n element.readmore.collapsedHeight = cssMaxHeight || element.readmore.collapsedHeight || defaultHeight;\n\n element.style.maxHeight = 'none';\n}\n\nfunction createElementFromString(htmlString) {\n const div = document.createElement('div');\n div.innerHTML = htmlString;\n\n return div.firstChild;\n}\n\nfunction embedCSS(selector, options) {\n if (!isCssEmbeddedFor[selector]) {\n let styles = '';\n\n if (options.embedCSS && options.blockCSS !== '') {\n styles += `${selector} + [data-readmore-toggle], ${selector}[data-readmore] {\n ${options.blockCSS}\n }`;\n }\n\n // Include the transition CSS even if embedCSS is false\n styles += `${selector}[data-readmore] {\n transition: height ${options.speed}ms;\n overflow: hidden;\n }`;\n\n (((d, u) => {\n const css = d.createElement('style');\n css.type = 'text/css';\n\n if (css.styleSheet) {\n css.styleSheet.cssText = u;\n } else {\n css.appendChild(d.createTextNode(u));\n }\n\n d.getElementsByTagName('head')[0].appendChild(css);\n })(document, styles));\n\n isCssEmbeddedFor[selector] = true;\n }\n}\n\nfunction buildToggle(link, element, scope) {\n function clickHandler(event) {\n this.toggle(element, event);\n }\n\n let text = link;\n if (typeof link === 'function') {\n text = link(element);\n }\n\n const toggleLink = createElementFromString(text);\n toggleLink.setAttribute('data-readmore-toggle', element.id);\n toggleLink.setAttribute('aria-controls', element.id);\n toggleLink.addEventListener('click', clickHandler.bind(scope));\n\n return toggleLink;\n}\n\nfunction isEnvironmentSupported() {\n return (typeof window !== 'undefined' && typeof document !== 'undefined')\n && !!document.querySelectorAll && !!window.addEventListener;\n}\n\nconst resizeBoxes = debounce(() => {\n const elements = document.querySelectorAll('[data-readmore]');\n\n forEach(elements, (element) => {\n const expanded = element.getAttribute('aria-expanded') === 'true';\n\n setBoxHeights(element);\n\n element.style.height = `${expanded ? element.readmore.expandedHeight : element.readmore.collapsedHeight}px`;\n });\n}, 100);\n\nconst defaults = {\n speed: 100,\n collapsedHeight: 200,\n heightMargin: 16,\n moreLink: '<a href=\"#\">Read More</a>',\n lessLink: '<a href=\"#\">Close</a>',\n embedCSS: true,\n blockCSS: 'display: block; width: 100%;',\n startOpen: false,\n sourceOrder: 'after',\n\n // callbacks\n blockProcessed: () => {},\n beforeToggle: () => {},\n afterToggle: () => {}\n};\n\nclass Readmore {\n constructor(...args) {\n if (!isEnvironmentSupported()) return;\n\n const [selector, options] = args;\n let elements;\n\n if (typeof selector === 'string') {\n elements = document.querySelectorAll(selector);\n } else if (selector.nodeName) {\n elements = [selector]; // emulate a NodeList by casting a single Node as an array\n } else {\n elements = selector;\n }\n\n // After all that, if we _still_ don't have iteratable NodeList, bail out.\n if (!elements.length) return;\n\n this.options = extend({}, defaults, options);\n\n if (typeof selector === 'string') {\n embedCSS(selector, this.options);\n } else {\n // Instances need distinct selectors so they don't stomp on each other.\n this.instanceSelector = `.${uniqueId()}`;\n embedCSS(this.instanceSelector, this.options);\n }\n\n // Need to resize boxes when the page has fully loaded.\n window.addEventListener('load', resizeBoxes);\n window.addEventListener('resize', resizeBoxes);\n\n this.elements = [];\n\n forEach(elements, (element) => {\n if (this.instanceSelector) {\n element.classList.add(this.instanceSelector.substr(1));\n }\n\n const expanded = this.options.startOpen;\n\n element.readmore = {\n defaultHeight: this.options.collapsedHeight,\n heightMargin: this.options.heightMargin\n };\n\n setBoxHeights(element);\n\n const { heightMargin } = element.readmore;\n\n if (element.getBoundingClientRect().height <= element.readmore.collapsedHeight + heightMargin) {\n if (typeof this.options.blockProcessed === 'function') {\n this.options.blockProcessed(element, false);\n }\n return;\n }\n\n element.setAttribute('data-readmore', '');\n element.setAttribute('aria-expanded', expanded);\n element.id = element.id || uniqueId();\n\n const toggleLink = expanded ? this.options.lessLink : this.options.moreLink;\n const toggleElement = buildToggle(toggleLink, element, this);\n\n element.parentNode.insertBefore(toggleElement, (this.options.sourceOrder === 'before') ? element : element.nextSibling);\n\n element.style.height = `${expanded ? element.readmore.expandedHeight : element.readmore.collapsedHeight}px`;\n\n if (typeof this.options.blockProcessed === 'function') {\n this.options.blockProcessed(element, true);\n }\n\n this.elements.push(element);\n });\n }\n\n // Signature when called internally by the toggleLink click handler:\n // toggle(element, event)\n //\n // When called externally by an instance,\n // e.g. readmoreDemo.toggle(document.querySelector('article:nth-of-type(1)')):\n // toggle(elementOrQuerySelector)\n toggle(...args) {\n let el = args[0];\n\n const toggleElement = (element) => {\n const trigger = document.querySelector(`[aria-controls=\"${element.id}\"]`);\n const expanded = element.getBoundingClientRect().height <= element.readmore.collapsedHeight;\n const newHeight = expanded ? element.readmore.expandedHeight : element.readmore.collapsedHeight;\n\n // Fire beforeToggle callback\n // Since we determined the new \"expanded\" state above we're now out of sync\n // with our true current state, so we need to flip the value of `expanded`\n if (typeof this.options.beforeToggle === 'function') {\n const shouldContinueToggle = this.options.beforeToggle(trigger, element, !expanded);\n\n // if the beforeToggle callback returns false, stop toggling\n if (shouldContinueToggle === false) {\n return;\n }\n }\n\n element.style.height = `${newHeight}px`;\n\n const transitionendHandler = (transitionEvent) => {\n // Fire afterToggle callback\n if (typeof this.options.afterToggle === 'function') {\n this.options.afterToggle(trigger, element, expanded);\n }\n\n transitionEvent.stopPropagation();\n\n element.setAttribute('aria-expanded', expanded);\n element.removeEventListener('transitionend', transitionendHandler, false);\n };\n\n element.addEventListener('transitionend', transitionendHandler, false);\n\n if (this.options.speed < 1) {\n transitionendHandler.call(this, { target: element });\n }\n\n const toggleLink = expanded ? this.options.lessLink : this.options.moreLink;\n\n if (!toggleLink) {\n trigger.remove();\n } else if (trigger && trigger.parentNode) {\n trigger.parentNode.replaceChild(buildToggle(toggleLink, element, this), trigger);\n }\n };\n\n if (typeof el === 'string') {\n el = document.querySelectorAll(el);\n }\n\n if (!el) {\n throw new Error('Element MUST be either an HTML node or querySelector string');\n }\n\n const event = args[1];\n\n if (event) {\n event.preventDefault();\n event.stopPropagation();\n }\n\n if (typeof el === 'object' && !el.nodeName) { // element is likely a NodeList\n forEach(el, toggleElement);\n } else {\n toggleElement(el);\n }\n }\n\n destroy(selector) {\n let elements;\n\n if (!selector) {\n elements = this.elements; // eslint-disable-line\n } else if (typeof selector === 'string') {\n elements = document.querySelectorAll(selector);\n } else if (selector.nodeName) {\n elements = [selector]; // emulate a NodeList by casting a single Node as an array\n } else {\n elements = selector;\n }\n\n forEach(elements, (element) => {\n if (this.elements.indexOf(element) === -1) {\n return;\n }\n\n this.elements = this.elements.filter((el) => el !== element);\n\n if (this.instanceSelector) {\n element.classList.remove(this.instanceSelector.substr(1));\n }\n\n delete element.readmore;\n\n element.style.height = 'initial';\n element.style.maxHeight = 'initial';\n\n element.removeAttribute('data-readmore');\n element.removeAttribute('aria-expanded');\n\n const trigger = document.querySelector(`[aria-controls=\"${element.id}\"]`);\n if (trigger) {\n trigger.remove();\n }\n\n if (element.id.indexOf('rmjs-') !== -1) {\n element.removeAttribute('id');\n }\n });\n\n delete this;\n }\n}\n\nReadmore.VERSION = __VERSION__;\n\nexport default Readmore;\n"],"sourceRoot":""}
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: 2.1.2
4
+ version: 2.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Graves
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2019-06-05 00:00:00.000000000 Z
14
+ date: 2019-08-09 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: rails
@@ -363,6 +363,20 @@ dependencies:
363
363
  - - ">="
364
364
  - !ruby/object:Gem::Version
365
365
  version: '0'
366
+ - !ruby/object:Gem::Dependency
367
+ name: teaspoon
368
+ requirement: !ruby/object:Gem::Requirement
369
+ requirements:
370
+ - - ">="
371
+ - !ruby/object:Gem::Version
372
+ version: '0'
373
+ type: :development
374
+ prerelease: false
375
+ version_requirements: !ruby/object:Gem::Requirement
376
+ requirements:
377
+ - - ">="
378
+ - !ruby/object:Gem::Version
379
+ version: '0'
366
380
  description: GeoBlacklight provides a world-class discovery platform for geospatial
367
381
  (GIS) holdings. It is an open collaborative project aiming to build off of the successes
368
382
  of the Blacklight Solr-powered discovery interface and the multi-institutional OpenGeoportal
@@ -392,8 +406,67 @@ files:
392
406
  - LICENSE.txt
393
407
  - README.md
394
408
  - Rakefile
409
+ - app/assets/images/blacklight/arrow-circle-down.svg
410
+ - app/assets/images/blacklight/baruch-cuny.svg
411
+ - app/assets/images/blacklight/berkeley.svg
412
+ - app/assets/images/blacklight/book.svg
413
+ - app/assets/images/blacklight/bookmark.svg
414
+ - app/assets/images/blacklight/cd-rom.svg
415
+ - app/assets/images/blacklight/chicago.svg
416
+ - app/assets/images/blacklight/columbia.svg
417
+ - app/assets/images/blacklight/cornell.svg
418
+ - app/assets/images/blacklight/dvd-rom.svg
419
+ - app/assets/images/blacklight/email.svg
395
420
  - app/assets/images/blacklight/esri-globe.svg
421
+ - app/assets/images/blacklight/geoblacklight-icons.json
422
+ - app/assets/images/blacklight/globe.svg
423
+ - app/assets/images/blacklight/harvard.svg
424
+ - app/assets/images/blacklight/home.svg
425
+ - app/assets/images/blacklight/illinois.svg
426
+ - app/assets/images/blacklight/image.svg
427
+ - app/assets/images/blacklight/indiana.svg
428
+ - app/assets/images/blacklight/iowa.svg
429
+ - app/assets/images/blacklight/leaf.svg
430
+ - app/assets/images/blacklight/lewis-clark.svg
431
+ - app/assets/images/blacklight/line.svg
396
432
  - app/assets/images/blacklight/logo.png
433
+ - app/assets/images/blacklight/logo.svg
434
+ - app/assets/images/blacklight/map-marker.svg
435
+ - app/assets/images/blacklight/map.svg
436
+ - app/assets/images/blacklight/maryland.svg
437
+ - app/assets/images/blacklight/massgis.svg
438
+ - app/assets/images/blacklight/metadata.svg
439
+ - app/assets/images/blacklight/michigan-state.svg
440
+ - app/assets/images/blacklight/michigan.svg
441
+ - app/assets/images/blacklight/minnesota.svg
442
+ - app/assets/images/blacklight/mit.svg
443
+ - app/assets/images/blacklight/mixed.svg
444
+ - app/assets/images/blacklight/multilinestring.svg
445
+ - app/assets/images/blacklight/multipoint.svg
446
+ - app/assets/images/blacklight/multipolygon.svg
447
+ - app/assets/images/blacklight/nyu.svg
448
+ - app/assets/images/blacklight/ohio-state.svg
449
+ - app/assets/images/blacklight/pagelines-brands.svg
450
+ - app/assets/images/blacklight/paper-map.svg
451
+ - app/assets/images/blacklight/penn-state.svg
452
+ - app/assets/images/blacklight/point.svg
453
+ - app/assets/images/blacklight/polygon.svg
454
+ - app/assets/images/blacklight/polyline.svg
455
+ - app/assets/images/blacklight/princeton.svg
456
+ - app/assets/images/blacklight/public.svg
457
+ - app/assets/images/blacklight/purdue.svg
458
+ - app/assets/images/blacklight/raster.svg
459
+ - app/assets/images/blacklight/restricted.svg
460
+ - app/assets/images/blacklight/sms.svg
461
+ - app/assets/images/blacklight/stanford.svg
462
+ - app/assets/images/blacklight/table.svg
463
+ - app/assets/images/blacklight/tags.svg
464
+ - app/assets/images/blacklight/texas.svg
465
+ - app/assets/images/blacklight/tufts.svg
466
+ - app/assets/images/blacklight/ucla.svg
467
+ - app/assets/images/blacklight/uva.svg
468
+ - app/assets/images/blacklight/web_services.svg
469
+ - app/assets/images/blacklight/wisconsin.svg
397
470
  - app/assets/javascripts/geoblacklight/basemaps.js
398
471
  - app/assets/javascripts/geoblacklight/controls.js
399
472
  - app/assets/javascripts/geoblacklight/controls/opacity.js
@@ -405,6 +478,7 @@ files:
405
478
  - app/assets/javascripts/geoblacklight/modules/collapse.js
406
479
  - app/assets/javascripts/geoblacklight/modules/download.js
407
480
  - app/assets/javascripts/geoblacklight/modules/geosearch.js
481
+ - app/assets/javascripts/geoblacklight/modules/help_text.js
408
482
  - app/assets/javascripts/geoblacklight/modules/home.js
409
483
  - app/assets/javascripts/geoblacklight/modules/item.js
410
484
  - app/assets/javascripts/geoblacklight/modules/layer_opacity.js
@@ -424,6 +498,7 @@ files:
424
498
  - app/assets/javascripts/geoblacklight/viewers/iiif.js
425
499
  - app/assets/javascripts/geoblacklight/viewers/index_map.js
426
500
  - app/assets/javascripts/geoblacklight/viewers/map.js
501
+ - app/assets/javascripts/geoblacklight/viewers/oembed.js
427
502
  - app/assets/javascripts/geoblacklight/viewers/viewer.js
428
503
  - app/assets/javascripts/geoblacklight/viewers/wms.js
429
504
  - app/assets/stylesheets/geoblacklight/_blacklight_overrides.scss
@@ -554,6 +629,7 @@ files:
554
629
  - lib/geoblacklight/wms_layer.rb
555
630
  - lib/geoblacklight/wms_layer/feature_info_response.rb
556
631
  - lib/tasks/geoblacklight.rake
632
+ - package.json
557
633
  - schema/format-values.md
558
634
  - schema/geoblacklight-schema-deprecated.md
559
635
  - schema/geoblacklight-schema.json
@@ -592,6 +668,7 @@ files:
592
668
  - spec/features/empty_search_spec.rb
593
669
  - spec/features/esri_viewer_spec.rb
594
670
  - spec/features/exports_spec.rb
671
+ - spec/features/help_text_spec.rb
595
672
  - spec/features/home_page_spec.rb
596
673
  - spec/features/iiif_viewer_spec.rb
597
674
  - spec/features/index_map_spec.rb
@@ -602,6 +679,7 @@ files:
602
679
  - spec/features/linkified_attribute_table_spec.rb
603
680
  - spec/features/metadata_panel_spec.rb
604
681
  - spec/features/missing_metadata_spec.rb
682
+ - spec/features/oembed_spec.rb
605
683
  - spec/features/relations_spec.rb
606
684
  - spec/features/saved_searches_spec.rb
607
685
  - spec/features/search_bar_spec.rb
@@ -611,7 +689,12 @@ files:
611
689
  - spec/features/show_page_metadata_spec.rb
612
690
  - spec/features/sms_spec.rb
613
691
  - spec/features/split_view.html.erb_spec.rb
692
+ - spec/features/suppressed_records_spec.rb
614
693
  - spec/features/web_services_modal_spec.rb
694
+ - spec/fixtures/fgdc/harvard-g7064-s2-1834-k3.xml
695
+ - spec/fixtures/iso19139/stanford-cg357zz0321.xml
696
+ - spec/fixtures/mods/fb897vt9938.mods
697
+ - spec/fixtures/mods/stanford-cg357zz0321.mods
615
698
  - spec/fixtures/solr_documents/README.md
616
699
  - spec/fixtures/solr_documents/actual-papermap1.json
617
700
  - spec/fixtures/solr_documents/actual-point1.json
@@ -635,6 +718,7 @@ files:
635
718
  - spec/fixtures/solr_documents/index-map-stanford.json
636
719
  - spec/fixtures/solr_documents/index_map_point.json
637
720
  - spec/fixtures/solr_documents/no_spatial.json
721
+ - spec/fixtures/solr_documents/oembed.json
638
722
  - spec/fixtures/solr_documents/princeton-child1.json
639
723
  - spec/fixtures/solr_documents/princeton-child2.json
640
724
  - spec/fixtures/solr_documents/princeton-child3.json
@@ -715,7 +799,8 @@ files:
715
799
  - vendor/assets/javascripts/leaflet-src.js.map
716
800
  - vendor/assets/javascripts/leaflet.js.erb
717
801
  - vendor/assets/javascripts/native.history.js
718
- - vendor/assets/javascripts/readmore.min.js
802
+ - vendor/assets/javascripts/readmore.js
803
+ - vendor/assets/javascripts/readmore.js.map
719
804
  - vendor/assets/stylesheets/leaflet-label.css
720
805
  - vendor/assets/stylesheets/leaflet.css
721
806
  homepage: http://github.com/geoblacklight/geoblacklight
@@ -754,6 +839,7 @@ test_files:
754
839
  - spec/features/empty_search_spec.rb
755
840
  - spec/features/esri_viewer_spec.rb
756
841
  - spec/features/exports_spec.rb
842
+ - spec/features/help_text_spec.rb
757
843
  - spec/features/home_page_spec.rb
758
844
  - spec/features/iiif_viewer_spec.rb
759
845
  - spec/features/index_map_spec.rb
@@ -764,6 +850,7 @@ test_files:
764
850
  - spec/features/linkified_attribute_table_spec.rb
765
851
  - spec/features/metadata_panel_spec.rb
766
852
  - spec/features/missing_metadata_spec.rb
853
+ - spec/features/oembed_spec.rb
767
854
  - spec/features/relations_spec.rb
768
855
  - spec/features/saved_searches_spec.rb
769
856
  - spec/features/search_bar_spec.rb
@@ -773,7 +860,12 @@ test_files:
773
860
  - spec/features/show_page_metadata_spec.rb
774
861
  - spec/features/sms_spec.rb
775
862
  - spec/features/split_view.html.erb_spec.rb
863
+ - spec/features/suppressed_records_spec.rb
776
864
  - spec/features/web_services_modal_spec.rb
865
+ - spec/fixtures/fgdc/harvard-g7064-s2-1834-k3.xml
866
+ - spec/fixtures/iso19139/stanford-cg357zz0321.xml
867
+ - spec/fixtures/mods/fb897vt9938.mods
868
+ - spec/fixtures/mods/stanford-cg357zz0321.mods
777
869
  - spec/fixtures/solr_documents/README.md
778
870
  - spec/fixtures/solr_documents/actual-papermap1.json
779
871
  - spec/fixtures/solr_documents/actual-point1.json
@@ -797,6 +889,7 @@ test_files:
797
889
  - spec/fixtures/solr_documents/index-map-stanford.json
798
890
  - spec/fixtures/solr_documents/index_map_point.json
799
891
  - spec/fixtures/solr_documents/no_spatial.json
892
+ - spec/fixtures/solr_documents/oembed.json
800
893
  - spec/fixtures/solr_documents/princeton-child1.json
801
894
  - spec/fixtures/solr_documents/princeton-child2.json
802
895
  - spec/fixtures/solr_documents/princeton-child3.json
@@ -1,11 +0,0 @@
1
- /*!
2
- * @preserve
3
- *
4
- * Readmore.js jQuery plugin
5
- * Author: @jed_foster
6
- * Project home: http://jedfoster.github.io/Readmore.js
7
- * Licensed under the MIT license
8
- *
9
- * Debounce function from http://davidwalsh.name/javascript-debounce-function
10
- */
11
- !function(e){"use strict";function t(e,t,a){var i;return function(){var n=this,o=arguments,r=function(){i=null,a||e.apply(n,o)},s=a&&!i;clearTimeout(i),i=setTimeout(r,t),s&&e.apply(n,o)}}function a(e){var t=++h;return String(null==e?"rmjs-":e)+t}function i(e){var t=e.clone().css({height:"auto",width:e.width(),maxHeight:"none",overflow:"hidden"}).insertAfter(e),a=t.outerHeight(),i=parseInt(t.css({maxHeight:""}).css("max-height").replace(/[^-\d\.]/g,""),10),n=e.data("defaultHeight");t.remove();var o=i||e.data("collapsedHeight")||n;e.data({expandedHeight:a,maxHeight:i,collapsedHeight:o}).css({maxHeight:"none"})}function n(e){if(!d[e.selector]){var t=" ";e.embedCSS&&""!==e.blockCSS&&(t+=e.selector+" + [data-readmore-toggle], "+e.selector+"[data-readmore]{"+e.blockCSS+"}"),t+=e.selector+"[data-readmore]{transition: height "+e.speed+"ms;overflow: hidden;}",function(e,t){var a=e.createElement("style");a.type="text/css",a.styleSheet?a.styleSheet.cssText=t:a.appendChild(e.createTextNode(t)),e.getElementsByTagName("head")[0].appendChild(a)}(document,t),d[e.selector]=!0}}function o(t,a){this.element=t,this.options=e.extend({},s,a),n(this.options),this._defaults=s,this._name=r,this.init(),window.addEventListener("load",l),window.addEventListener("resize",l)}var r="readmore",s={speed:100,collapsedHeight:200,heightMargin:16,moreLink:'<a href="#">Read More</a>',lessLink:'<a href="#">Close</a>',embedCSS:!0,blockCSS:"display: block; width: 100%;",startOpen:!1,beforeToggle:function(){},afterToggle:function(){}},d={},h=0,l=t(function(){e("[data-readmore]").each(function(){var t=e(this),a="true"===t.attr("aria-expanded");i(t),t.css({height:t.data(a?"expandedHeight":"collapsedHeight")})})},100);o.prototype={init:function(){var t=this,n=e(this.element);n.data({defaultHeight:this.options.collapsedHeight,heightMargin:this.options.heightMargin}),i(n);var o=n.data("collapsedHeight"),r=n.data("heightMargin");if(n.outerHeight(!0)<=o+r)return!0;var s=n.attr("id")||a(),d=t.options.startOpen?t.options.lessLink:t.options.moreLink;n.attr({"data-readmore":"","aria-expanded":!1,id:s}),n.after(e(d).on("click",function(e){t.toggle(this,n[0],e)}).attr({"data-readmore-toggle":"","aria-controls":s})),t.options.startOpen||n.css({height:o})},toggle:function(t,a,i){i&&i.preventDefault(),t||(t=e('[aria-controls="'+this.element.id+'"]')[0]),a||(a=this.element);var n=this,o=e(a),r="",s="",d=!1,h=o.data("collapsedHeight");o.height()<=h?(r=o.data("expandedHeight")+"px",s="lessLink",d=!0):(r=h,s="moreLink"),n.options.beforeToggle(t,a,!d),o.css({height:r}),o.on("transitionend",function(){n.options.afterToggle(t,a,d),e(this).attr({"aria-expanded":d}).off("transitionend")}),e(t).replaceWith(e(n.options[s]).on("click",function(e){n.toggle(this,a,e)}).attr({"data-readmore-toggle":"","aria-controls":o.attr("id")}))},destroy:function(){e(this.element).each(function(){var t=e(this);t.attr({"data-readmore":null,"aria-expanded":null}).css({maxHeight:"",height:""}).next("[data-readmore-toggle]").remove(),t.removeData()})}},e.fn.readmore=function(t){var a=arguments,i=this.selector;return t=t||{},"object"==typeof t?this.each(function(){if(e.data(this,"plugin_"+r)){var a=e.data(this,"plugin_"+r);a.destroy.apply(a)}t.selector=i,e.data(this,"plugin_"+r,new o(this,t))}):"string"==typeof t&&"_"!==t[0]&&"init"!==t?this.each(function(){var i=e.data(this,"plugin_"+r);i instanceof o&&"function"==typeof i[t]&&i[t].apply(i,Array.prototype.slice.call(a,1))}):void 0}}(jQuery);