geoblacklight 2.3.0 → 2.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +17 -48
- data/.rubocop.yml +1 -1
- data/.rubocop_todo.yml +11 -177
- data/app/assets/images/blacklight/arrow-circle-down.svg +1 -2
- data/app/assets/images/blacklight/baruch-cuny.svg +1 -4
- data/app/assets/images/blacklight/berkeley.svg +1 -4
- data/app/assets/images/blacklight/book.svg +1 -4
- data/app/assets/images/blacklight/bookmark.svg +1 -4
- data/app/assets/images/blacklight/cd-rom.svg +1 -4
- data/app/assets/images/blacklight/chicago.svg +1 -4
- data/app/assets/images/blacklight/citation.svg +3 -0
- data/app/assets/images/blacklight/collection.svg +3 -0
- data/app/assets/images/blacklight/columbia.svg +1 -4
- data/app/assets/images/blacklight/cornell.svg +1 -4
- data/app/assets/images/blacklight/dvd-rom.svg +1 -4
- data/app/assets/images/blacklight/email.svg +1 -4
- data/app/assets/images/blacklight/esri-globe.svg +1 -4
- data/app/assets/images/blacklight/globe.svg +1 -2
- data/app/assets/images/blacklight/harvard.svg +1 -4
- data/app/assets/images/blacklight/home.svg +1 -2
- data/app/assets/images/blacklight/illinois.svg +1 -4
- data/app/assets/images/blacklight/image.svg +1 -4
- data/app/assets/images/blacklight/indiana.svg +1 -4
- data/app/assets/images/blacklight/iowa.svg +1 -4
- data/app/assets/images/blacklight/leaf.svg +1 -4
- data/app/assets/images/blacklight/lewis-clark.svg +1 -4
- data/app/assets/images/blacklight/line.svg +1 -4
- data/app/assets/images/blacklight/map-marker.svg +1 -4
- data/app/assets/images/blacklight/map.svg +1 -4
- data/app/assets/images/blacklight/maryland.svg +1 -4
- data/app/assets/images/blacklight/massgis.svg +1 -4
- data/app/assets/images/blacklight/metadata.svg +1 -4
- data/app/assets/images/blacklight/michigan-state.svg +1 -4
- data/app/assets/images/blacklight/michigan.svg +1 -4
- data/app/assets/images/blacklight/minnesota.svg +1 -4
- data/app/assets/images/blacklight/mit.svg +1 -4
- data/app/assets/images/blacklight/mixed.svg +1 -4
- data/app/assets/images/blacklight/multilinestring.svg +1 -4
- data/app/assets/images/blacklight/multipoint.svg +1 -4
- data/app/assets/images/blacklight/multipolygon.svg +1 -4
- data/app/assets/images/blacklight/nyu.svg +1 -4
- data/app/assets/images/blacklight/ohio-state.svg +1 -4
- data/app/assets/images/blacklight/pagelines-brands.svg +1 -4
- data/app/assets/images/blacklight/paper-map.svg +1 -4
- data/app/assets/images/blacklight/penn-state.svg +1 -4
- data/app/assets/images/blacklight/point.svg +1 -4
- data/app/assets/images/blacklight/polygon.svg +1 -4
- data/app/assets/images/blacklight/polyline.svg +1 -4
- data/app/assets/images/blacklight/princeton.svg +1 -4
- data/app/assets/images/blacklight/public.svg +1 -4
- data/app/assets/images/blacklight/purdue.svg +1 -4
- data/app/assets/images/blacklight/raster.svg +1 -4
- data/app/assets/images/blacklight/restricted.svg +1 -4
- data/app/assets/images/blacklight/sms.svg +1 -4
- data/app/assets/images/blacklight/stanford.svg +1 -4
- data/app/assets/images/blacklight/table.svg +1 -4
- data/app/assets/images/blacklight/tags.svg +1 -2
- data/app/assets/images/blacklight/texas.svg +1 -4
- data/app/assets/images/blacklight/tufts.svg +1 -4
- data/app/assets/images/blacklight/ucla.svg +1 -4
- data/app/assets/images/blacklight/uva.svg +1 -4
- data/app/assets/images/blacklight/web_services.svg +1 -4
- data/app/assets/images/blacklight/wisconsin.svg +1 -4
- data/app/assets/javascripts/geoblacklight/modules/geosearch.js +1 -1
- data/app/assets/javascripts/geoblacklight/modules/home.js +1 -1
- data/app/assets/javascripts/geoblacklight/modules/item.js +20 -1
- data/app/assets/stylesheets/geoblacklight/_blacklight_overrides.scss +0 -9
- data/app/assets/stylesheets/geoblacklight/modules/item.scss +12 -0
- data/app/assets/stylesheets/geoblacklight/modules/results.scss +38 -29
- data/app/helpers/geoblacklight_helper.rb +16 -7
- data/app/models/concerns/geoblacklight/solr_document.rb +7 -2
- data/app/models/concerns/geoblacklight/solr_document/citation.rb +28 -0
- data/app/views/catalog/_citation.html.erb +11 -0
- data/app/views/catalog/_data_dictionary.html.erb +1 -1
- data/app/views/catalog/_document_action.html.erb +1 -1
- data/app/views/catalog/_document_split.html.erb +1 -1
- data/app/views/catalog/_home_text.html.erb +1 -1
- data/app/views/catalog/_index_split_default.html.erb +18 -10
- data/app/views/catalog/_show_default_viewer_container.html.erb +1 -1
- data/app/views/catalog/_web_services_wfs.html.erb +3 -3
- data/app/views/catalog/_web_services_wms.html.erb +3 -3
- data/app/views/catalog/metadata.html.erb +3 -1
- data/app/views/catalog/web_services.html.erb +9 -7
- data/app/views/relation/_ancestors.html.erb +1 -1
- data/app/views/relation/_descendants.html.erb +1 -1
- data/config/locales/geoblacklight.en.yml +43 -59
- data/lib/generators/geoblacklight/templates/catalog_controller.rb +1 -0
- data/lib/generators/geoblacklight/templates/geoblacklight.js +0 -1
- data/lib/generators/geoblacklight/templates/settings.yml +4 -0
- data/lib/geoblacklight/catalog_helper_override.rb +1 -1
- data/lib/geoblacklight/relation/ancestors.rb +1 -1
- data/lib/geoblacklight/relation/descendants.rb +1 -1
- data/lib/geoblacklight/version.rb +1 -1
- data/lib/geoblacklight/view_helper_override.rb +1 -1
- data/lib/tasks/geoblacklight.rake +1 -1
- data/spec/features/relations_spec.rb +2 -1
- data/spec/features/split_view.html.erb_spec.rb +1 -1
- data/spec/helpers/geoblacklight_helper_spec.rb +13 -0
- data/spec/javascripts/geoblacklight_spec.js +0 -4
- data/spec/lib/geoblacklight/relation/ancestors_spec.rb +1 -1
- data/spec/lib/geoblacklight/relation/descendants_spec.rb +1 -1
- data/spec/models/concerns/geoblacklight/solr_document/citation_spec.rb +13 -0
- data/spec/models/concerns/geoblacklight/solr_document_spec.rb +26 -0
- data/spec/support/fixtures.rb +7 -0
- data/spec/tasks/geoblacklight_spec.rb +18 -0
- data/vendor/assets/javascripts/readmore.js +0 -618
- data/vendor/assets/javascripts/readmore.min.js +0 -0
- data/vendor/assets/stylesheets/leaflet.css +0 -1
- metadata +13 -4
- data/app/assets/javascripts/geoblacklight/modules/collapse.js +0 -7
- data/vendor/assets/javascripts/readmore.js.map +0 -1
File without changes
|
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.
|
4
|
+
version: 2.4.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: 2020-
|
14
|
+
date: 2020-07-08 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: rails
|
@@ -413,6 +413,8 @@ files:
|
|
413
413
|
- app/assets/images/blacklight/bookmark.svg
|
414
414
|
- app/assets/images/blacklight/cd-rom.svg
|
415
415
|
- app/assets/images/blacklight/chicago.svg
|
416
|
+
- app/assets/images/blacklight/citation.svg
|
417
|
+
- app/assets/images/blacklight/collection.svg
|
416
418
|
- app/assets/images/blacklight/columbia.svg
|
417
419
|
- app/assets/images/blacklight/cornell.svg
|
418
420
|
- app/assets/images/blacklight/dvd-rom.svg
|
@@ -474,7 +476,6 @@ files:
|
|
474
476
|
- app/assets/javascripts/geoblacklight/downloaders/hgl_downloader.js
|
475
477
|
- app/assets/javascripts/geoblacklight/geoblacklight.js
|
476
478
|
- app/assets/javascripts/geoblacklight/modules.js
|
477
|
-
- app/assets/javascripts/geoblacklight/modules/collapse.js
|
478
479
|
- app/assets/javascripts/geoblacklight/modules/download.js
|
479
480
|
- app/assets/javascripts/geoblacklight/modules/geosearch.js
|
480
481
|
- app/assets/javascripts/geoblacklight/modules/help_text.js
|
@@ -534,10 +535,12 @@ files:
|
|
534
535
|
- app/models/concerns/geoblacklight/solr_document.rb
|
535
536
|
- app/models/concerns/geoblacklight/solr_document/arcgis.rb
|
536
537
|
- app/models/concerns/geoblacklight/solr_document/carto.rb
|
538
|
+
- app/models/concerns/geoblacklight/solr_document/citation.rb
|
537
539
|
- app/models/concerns/geoblacklight/solr_document/finder.rb
|
538
540
|
- app/models/concerns/geoblacklight/solr_document/inspection.rb
|
539
541
|
- app/models/concerns/geoblacklight/spatial_search_behavior.rb
|
540
542
|
- app/presenters/geoblacklight/document_presenter.rb
|
543
|
+
- app/views/catalog/_citation.html.erb
|
541
544
|
- app/views/catalog/_data_dictionary.html.erb
|
542
545
|
- app/views/catalog/_document_action.html.erb
|
543
546
|
- app/views/catalog/_document_split.html.erb
|
@@ -768,6 +771,7 @@ files:
|
|
768
771
|
- spec/lib/geoblacklight/wms_layer/feature_info_response_spec.rb
|
769
772
|
- spec/lib/geoblacklight/wms_layer_spec.rb
|
770
773
|
- spec/models/concerns/geoblacklight/solr_document/carto_spec.rb
|
774
|
+
- spec/models/concerns/geoblacklight/solr_document/citation_spec.rb
|
771
775
|
- spec/models/concerns/geoblacklight/solr_document/finder_spec.rb
|
772
776
|
- spec/models/concerns/geoblacklight/solr_document/inspection_spec.rb
|
773
777
|
- spec/models/concerns/geoblacklight/solr_document_spec.rb
|
@@ -777,6 +781,8 @@ files:
|
|
777
781
|
- spec/support/backport_test_helpers.rb
|
778
782
|
- spec/support/features.rb
|
779
783
|
- spec/support/features/session_helpers.rb
|
784
|
+
- spec/support/fixtures.rb
|
785
|
+
- spec/tasks/geoblacklight_spec.rb
|
780
786
|
- spec/teaspoon_env.rb
|
781
787
|
- spec/test_app_templates/Gemfile.extra
|
782
788
|
- spec/test_app_templates/lib/generators/test_app_generator.rb
|
@@ -803,7 +809,7 @@ files:
|
|
803
809
|
- vendor/assets/javascripts/leaflet.js.erb
|
804
810
|
- vendor/assets/javascripts/native.history.js
|
805
811
|
- vendor/assets/javascripts/readmore.js
|
806
|
-
- vendor/assets/javascripts/readmore.js
|
812
|
+
- vendor/assets/javascripts/readmore.min.js
|
807
813
|
- vendor/assets/stylesheets/leaflet-label.css
|
808
814
|
- vendor/assets/stylesheets/leaflet.css
|
809
815
|
homepage: http://github.com/geoblacklight/geoblacklight
|
@@ -943,6 +949,7 @@ test_files:
|
|
943
949
|
- spec/lib/geoblacklight/wms_layer/feature_info_response_spec.rb
|
944
950
|
- spec/lib/geoblacklight/wms_layer_spec.rb
|
945
951
|
- spec/models/concerns/geoblacklight/solr_document/carto_spec.rb
|
952
|
+
- spec/models/concerns/geoblacklight/solr_document/citation_spec.rb
|
946
953
|
- spec/models/concerns/geoblacklight/solr_document/finder_spec.rb
|
947
954
|
- spec/models/concerns/geoblacklight/solr_document/inspection_spec.rb
|
948
955
|
- spec/models/concerns/geoblacklight/solr_document_spec.rb
|
@@ -952,6 +959,8 @@ test_files:
|
|
952
959
|
- spec/support/backport_test_helpers.rb
|
953
960
|
- spec/support/features.rb
|
954
961
|
- spec/support/features/session_helpers.rb
|
962
|
+
- spec/support/fixtures.rb
|
963
|
+
- spec/tasks/geoblacklight_spec.rb
|
955
964
|
- spec/teaspoon_env.rb
|
956
965
|
- spec/test_app_templates/Gemfile.extra
|
957
966
|
- spec/test_app_templates/lib/generators/test_app_generator.rb
|
@@ -1 +0,0 @@
|
|
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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B,YAAI,MAAI,CAACiD,QAAL,CAAckC,OAAd,CAAsBnF,OAAtB,MAAmC,CAAC,CAAxC,EAA2C;AACzC;AACD;;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":""}
|