@performant-software/core-data 1.2.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +0 -0
- package/build/index.js +2 -0
- package/build/index.js.map +1 -0
- package/build/main.css +133 -0
- package/index.js +1 -0
- package/package.json +29 -0
- package/src/components/LoadAnimation.css +40 -0
- package/src/components/LoadAnimation.js +24 -0
- package/src/components/MediaGallery.css +64 -0
- package/src/components/MediaGallery.js +80 -0
- package/src/components/PlaceDetailsPanel.css +37 -0
- package/src/components/PlaceDetailsPanel.js +113 -0
- package/src/components/PlaceMarker.js +59 -0
- package/src/components/RelatedItemsList.js +94 -0
- package/src/components/RelatedList.js +46 -0
- package/src/components/RelatedMedia.js +52 -0
- package/src/components/RelatedOrganizations.js +28 -0
- package/src/components/RelatedPeople.js +28 -0
- package/src/components/RelatedPlaces.js +28 -0
- package/src/components/RelatedTaxonomies.js +28 -0
- package/src/index.js +14 -0
- package/src/types/Annotation.js +13 -0
- package/src/types/MediaContent.js +13 -0
- package/src/types/Organization.js +8 -0
- package/src/types/Person.js +11 -0
- package/src/types/Place.js +9 -0
- package/src/types/RelatedItems.js +12 -0
- package/src/types/Taxonomy.js +7 -0
- package/src/types/UserDefinedField.js +6 -0
- package/types/components/LoadAnimation.js.flow +24 -0
- package/types/components/MediaGallery.js.flow +80 -0
- package/types/components/PlaceDetailsPanel.js.flow +113 -0
- package/types/components/PlaceMarker.js.flow +59 -0
- package/types/components/RelatedItemsList.js.flow +94 -0
- package/types/components/RelatedList.js.flow +46 -0
- package/types/components/RelatedMedia.js.flow +52 -0
- package/types/components/RelatedOrganizations.js.flow +28 -0
- package/types/components/RelatedPeople.js.flow +28 -0
- package/types/components/RelatedPlaces.js.flow +28 -0
- package/types/components/RelatedTaxonomies.js.flow +28 -0
- package/types/index.js.flow +14 -0
- package/types/types/Annotation.js.flow +13 -0
- package/types/types/MediaContent.js.flow +13 -0
- package/types/types/Organization.js.flow +8 -0
- package/types/types/Person.js.flow +11 -0
- package/types/types/Place.js.flow +9 -0
- package/types/types/RelatedItems.js.flow +12 -0
- package/types/types/Taxonomy.js.flow +7 -0
- package/types/types/UserDefinedField.js.flow +6 -0
- package/webpack.config.js +3 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2022 Performant Software Solutions LLC
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
File without changes
|
package/build/index.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
(()=>{"use strict";var e={n:t=>{var r=t&&t.__esModule?()=>t.default:()=>t;return e.d(r,{a:r}),r},d:(t,r)=>{for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{LoadAnimation:()=>a,MediaGallery:()=>u,PlaceDetailsPanel:()=>j,PlaceMarker:()=>M,RelatedItemsList:()=>N,RelatedList:()=>v,RelatedMedia:()=>y,RelatedOrganization:()=>g,RelatedPeople:()=>h,RelatedPlaces:()=>E,RelatedTaxonomies:()=>w});const r=require("react");var n=e.n(r);const a=function(e){var t="".concat(e.className||""," loader three-dots").trim();return n().createElement("span",{className:t})},l=require("@radix-ui/react-dialog"),o=require("@samvera/clover-iiif/viewer");var i=e.n(o);const c=require("lucide-react"),u=function(e){return n().createElement(l.Root,{onOpenChange:e.onClose,open:Boolean(e.defaultItem)},n().createElement(l.Portal,null,n().createElement(l.Overlay,{className:"dialog-overlay"}),n().createElement(l.Content,{className:"dialog-content"},n().createElement(l.Title,{className:"dialog-title flex items-center"},n().createElement(c.Image,{className:"h-4 w-4 mr-1.5"}),e.title),n().createElement("div",{className:"pt-6 pb-2 text-sm w-full text-muted min-h-20"},Boolean(e.defaultItem)&&n().createElement(i(),{iiifContent:e.defaultItem.manifest_url,options:{informationPanel:{open:!1}}})),n().createElement(l.Close,{asChild:!0},n().createElement("button",{className:"dialog-close rounded-full",type:"button"},n().createElement(c.X,{className:"h-7 w-7 p-1.5"}))))))},m=require("underscore");var s=e.n(m);const d=require("@radix-ui/react-accordion"),f=(require("@peripleo/peripleo"),require("@samvera/clover-iiif/primitives"));function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var b=function(e){var t,a,l,o=(a=(0,r.useState)(),l=2,function(e){if(Array.isArray(e))return e}(a)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,l,o,i=[],c=!0,u=!1;try{if(l=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=l.call(r)).done)&&(i.push(n.value),i.length!==t);c=!0);}catch(e){u=!0,a=e}finally{try{if(!c&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw a}}return i}}(a,l)||function(e,t){if(e){if("string"==typeof e)return p(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?p(e,t):void 0}}(a,l)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),i=o[0],c=o[1];return n().createElement("div",{className:"p-3 pb-4 grid grid-cols-3 gap-1"},s().map(null===(t=e.data)||void 0===t?void 0:t.items,(function(t){return n().createElement(f.Thumbnail,{key:t.body.id,className:"rounded shadow cursor-pointer",onClick:function(){return c(t.body)},thumbnail:[{id:t.body.content_thumbnail_url,type:"Image",width:e.thumbnailWidth,height:e.thumbnailHeight}]})})),n().createElement(u,{defaultItem:i,onClose:function(){return c(void 0)}}))};b.defaultProps={thumbnailHeight:80,thumbnailWidth:80};const y=b,v=function(e){var t=e.data.items;return s().isEmpty(t)?n().createElement("div",{className:"pt-6 pl-3 pr-6 pb-8 flex items-center justify-center text-muted/50 italic"},e.emptyMessage):n().createElement("ul",{className:"p-3 pt-1 pb-4"},s().map(t,(function(t){return n().createElement("li",{key:t.id,className:"flex items-center"},e.renderItem(t))})))},g=function(e){return n().createElement(v,{data:e.data,emptyMessage:"No related organization",renderItem:function(e){return n().createElement(n().Fragment,null,n().createElement(c.Building2,{className:"h-4 w-4 mr-1.5"}),e.body.title)}})},h=function(e){return n().createElement(v,{data:e.data,emptyMessage:"No related people",renderItem:function(e){return n().createElement(n().Fragment,null,n().createElement(c.UserCircle,{className:"h-4 w-4 mr-1.5"}),e.body.title)}})},E=function(e){return n().createElement(v,{data:e.data,emptyMessage:"No related places",renderItem:function(e){return n().createElement(n().Fragment,null,n().createElement(c.MapPin,{className:"h-4 w-4 mr-0.5 inline-block mb-0.5"}),e.body.title)}})},w=function(e){return n().createElement(v,{data:e.data,emptyMessage:"No related taxonomies",renderItem:function(e){return n().createElement(n().Fragment,null,n().createElement(c.ListTree,{className:"h-4 w-4 mr-1.5"}),e.body.title)}})};var O=["data","error"];const N=function(e){return s().isEmpty(e.items)?null:n().createElement(d.Root,{type:"multiple"},s().map(e.items,(function(e){var t=e.data,r=e.error,l=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,O);return n().createElement(d.Item,{key:l.endpoint,value:l.endpoint},n().createElement(d.Header,null,n().createElement(d.Trigger,{className:"accordion-trigger border-black/20 border border-t border-b-0 border-l-0 border-r-0 border-solid rounded-none w-full flex justify-between items-center px-3 py-3 text-sm"},n().createElement("div",null,l.ui_label,t&&n().createElement("span",{className:"ml-1"},"(",t.items.length,")"),r&&n().createElement(c.AlertCircle,{className:"inline ml-1.5 h-4 w-4 text-red-600 align-text-bottom"}),!(t||r)&&n().createElement(a,{className:"text-muted/60 ml-4"})),n().createElement(c.ChevronDown,{className:"accordion-chevron h-4 w-4"}))),n().createElement(d.Content,{className:"accordion-content text-sm leading-6"},"media_contents"===l.endpoint&&n().createElement(y,{data:t}),"organizations"===l.endpoint&&n().createElement(g,{data:t}),"people"===l.endpoint&&n().createElement(h,{data:t}),"places"===l.endpoint&&n().createElement(E,{data:t}),"taxonomies"===l.endpoint&&n().createElement(w,{data:t})))})))},j=function(e){var t=(0,r.useRef)(null),a=(0,r.useMemo)((function(){var t=e.related.find((function(e){var t;return"media_contents"===e.endpoint&&!s().isEmpty(null===(t=e.data)||void 0===t?void 0:t.items)}));return t?t.data&&t.data.items[0].body:void 0}),[e.related]),l=(0,r.useMemo)((function(){var t;return null!==(t=e.place)&&void 0!==t&&t.user_defined?Object.values(e.place.user_defined):[]}),[e.place]);return n().createElement("aside",{className:"flex flex-col absolute z-10 h-full w-[280px] bg-white/80 backdrop-blur shadow overflow-y-auto",ref:t},n().createElement("button",{className:"absolute top-2 right-2 p-1.5 rounded-full z-10 bg-slate-200/60 hover:bg-slate-200 focus:outline-2 focus:outline-offset-2 focus:outline-teal-700",onClick:e.onClose,type:"button"},n().createElement(c.X,{className:"h-4 w-4"})),e.place&&n().createElement(n().Fragment,null,a&&n().createElement("div",{className:"relative w-full h-[200px] flex-grow-0 flex-shrink-0 bg-muted/20 z-0"},n().createElement("div",{className:"absolute top-0 left-0 w-full h-full flex justify-center items-center"},n().createElement(c.Image,{className:"h-20 w-20 text-gray-400",strokeWidth:1})),n().createElement("div",{className:"absolute top-0 left-0 w-full h-full flex justify-center items-center"},n().createElement("img",{className:"object-cover h-full w-full",src:a.content_url,alt:a.title}))),n().createElement("div",{className:"p-3"},n().createElement("h1",{className:"pr-6 font-medium"},e.place.properties.title),n().createElement("ol",{className:"text-sm mt-4 leading-6 overflow-hidden"},s().map(l,(function(e){var t=e.label,r=e.value;return n().createElement("li",{key:t,className:"mb-2"},n().createElement("div",{className:"text-muted"},t),n().createElement("div",{className:"font-medium overflow-hidden text-ellipsis"},r))})))),n().createElement(N,{items:e.related})))},x=require("@performant-software/geospatial");function S(e){return S="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},S(e)}function P(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function I(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?P(Object(r),!0).forEach((function(t){var n,a,l,o;n=e,a=t,l=r[t],o=function(e,t){if("object"!=S(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=S(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(a),(a="symbol"==S(o)?o:String(o))in n?Object.defineProperty(n,a,{value:l,enumerable:!0,configurable:!0,writable:!0}):n[a]=l})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):P(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function C(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}const M=function(e){var t,a,l=(t=(0,r.useState)(),a=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,l,o,i=[],c=!0,u=!1;try{if(l=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=l.call(r)).done)&&(i.push(n.value),i.length!==t);c=!0);}catch(e){u=!0,a=e}finally{try{if(!c&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw a}}return i}}(t,a)||function(e,t){if(e){if("string"==typeof e)return C(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?C(e,t):void 0}}(t,a)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),o=l[0],i=l[1],c=(0,r.useCallback)((function(e){var t={type:"FeatureCollection",features:[I(I({},e),{},{properties:I(I({},e.properties),{},{record_id:e.record_id})})]};i(t)}),[]);return(0,r.useEffect)((function(){fetch(e.url).then((function(e){return e.json()})).then(c)}),[e.url]),o?n().createElement(x.LocationMarker,{data:o}):null};module.exports=t})();
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","mappings":"mBACA,IAAIA,EAAsB,CCA1BA,EAAyBC,IACxB,IAAIC,EAASD,GAAUA,EAAOE,WAC7B,IAAOF,EAAiB,QACxB,IAAM,EAEP,OADAD,EAAoBI,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,CAAM,ECLdF,EAAwB,CAACM,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXP,EAAoBS,EAAEF,EAAYC,KAASR,EAAoBS,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDR,EAAwB,CAACc,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFf,EAAyBM,IACH,oBAAXa,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeL,EAASa,OAAOC,YAAa,CAAEC,MAAO,WAE7DX,OAAOC,eAAeL,EAAS,aAAc,CAAEe,OAAO,GAAO,G,4PCL9D,MAAM,EAA+BC,QAAQ,S,aCuB7C,QARsB,SAACC,GACrB,IAAMC,EAAY,GAAAC,OAAGF,EAAMC,WAAa,GAAE,sBAAqBE,OAE/D,OACEC,IAAAA,cAAA,QAAMH,UAAWA,GAErB,ECrBM,EAA+BF,QAAQ,0BCAvC,EAA+BA,QAAQ,+B,aCA7C,MAAM,EAA+BA,QAAQ,gBC+E7C,EAjDqB,SAACC,GAAY,OACh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0CAER0B,IAAAA,IAAMqD,GAAa,SAAAxB,GAAA,IAAGkC,EAAKlC,EAALkC,MAAO5F,EAAK0D,EAAL1D,MAAK,OAClCM,IAAAA,cAAA,MACEnB,IAAKyG,EACLzF,UAAU,QAEVG,IAAAA,cAAA,OACEH,UAAU,cAERyF,GAEJtF,IAAAA,cAAA,OACEH,UAAU,6CAERH,GAED,MAIXM,IAAAA,cAACuF,EAAgB,CACf9D,MAAO7B,EAAM4E,WAMzB,EC9GM,EAA+B7E,QAAQ,mC,8vCC0D7C,QA3CoB,SAACC,GACnB,I,IAAoCuB,G,GAAVC,EAAAA,EAAAA,Y,EAAU,E,k5BAA7B2B,EAAK5B,EAAA,GAAEqE,EAAQrE,EAAA,GAOhBsE,GAASC,EAAAA,EAAAA,cAAY,SAAClE,GAC1B,IAAMmE,EAAoB,CACxB5E,KAAM,oBACN6E,SAAU,CAAAC,EAAAA,EAAA,GACLrE,GAAI,IACP6D,WAAUQ,EAAAA,EAAA,GACLrE,EAAK6D,YAAU,IAClBS,UAAWtE,EAAKsE,gBAKtBN,EAASG,EACX,GAAG,IAWH,OANAI,EAAAA,EAAAA,YAAU,WACRC,MAAMpG,EAAMqG,KACTC,MAAK,SAACC,GAAG,OAAKA,EAAIC,MAAM,IACxBF,KAAKT,EACV,GAAG,CAAC7F,EAAMqG,MAELlD,EAKH/C,IAAAA,cAACqG,EAAAA,eAAc,CACb7E,KAAMuB,IALD,IAQX,E","sources":["webpack://@performant-software/core-data/webpack/bootstrap","webpack://@performant-software/core-data/webpack/runtime/compat get default export","webpack://@performant-software/core-data/webpack/runtime/define property getters","webpack://@performant-software/core-data/webpack/runtime/hasOwnProperty shorthand","webpack://@performant-software/core-data/webpack/runtime/make namespace object","webpack://@performant-software/core-data/external commonjs2 \"react\"","webpack://@performant-software/core-data/./src/components/LoadAnimation.js","webpack://@performant-software/core-data/external commonjs \"@radix-ui/react-dialog\"","webpack://@performant-software/core-data/external commonjs \"@samvera/clover-iiif/viewer\"","webpack://@performant-software/core-data/external commonjs \"lucide-react\"","webpack://@performant-software/core-data/./src/components/MediaGallery.js","webpack://@performant-software/core-data/external commonjs \"underscore\"","webpack://@performant-software/core-data/external commonjs \"@radix-ui/react-accordion\"","webpack://@performant-software/core-data/external commonjs \"@samvera/clover-iiif/primitives\"","webpack://@performant-software/core-data/external commonjs \"@peripleo/peripleo\"","webpack://@performant-software/core-data/./src/components/RelatedMedia.js","webpack://@performant-software/core-data/./src/components/RelatedList.js","webpack://@performant-software/core-data/./src/components/RelatedOrganizations.js","webpack://@performant-software/core-data/./src/components/RelatedPeople.js","webpack://@performant-software/core-data/./src/components/RelatedPlaces.js","webpack://@performant-software/core-data/./src/components/RelatedTaxonomies.js","webpack://@performant-software/core-data/./src/components/RelatedItemsList.js","webpack://@performant-software/core-data/./src/components/PlaceDetailsPanel.js","webpack://@performant-software/core-data/external commonjs \"@performant-software/geospatial\"","webpack://@performant-software/core-data/./src/components/PlaceMarker.js"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"react\");","// @flow\n\nimport React from 'react';\nimport './LoadAnimation.css';\n\ntype Props = {\n /**\n * Additional class name to apply to the element.\n */\n className?: string\n};\n\n/**\n * This component renders a basic loading animation.\n */\nconst LoadAnimation = (props: Props) => {\n const className = `${props.className || ''} loader three-dots`.trim();\n\n return (\n <span className={className} />\n );\n};\n\nexport default LoadAnimation;\n","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@radix-ui/react-dialog\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@samvera/clover-iiif/viewer\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"lucide-react\");","// @flow\n\nimport * as Dialog from '@radix-ui/react-dialog';\nimport Viewer from '@samvera/clover-iiif/viewer';\nimport { Image, X } from 'lucide-react';\nimport React from 'react';\nimport type { MediaContent } from '../types/MediaContent';\n\nimport './MediaGallery.css';\n\ntype Props = {\n /**\n * The MediaContent record contain the IIIF manifest URL.\n */\n defaultItem: MediaContent,\n\n /**\n * Callback fired when the dialog is closed.\n */\n onClose: () => void,\n\n /**\n * Title text to display at the top of the dialog.\n */\n title?: string\n};\n\n/**\n * This component renders a IIIF Viewer for the passed MediaContent record.\n */\nconst MediaGallery = (props: Props) => (\n <Dialog.Root\n onOpenChange={props.onClose}\n open={Boolean(props.defaultItem)}\n >\n <Dialog.Portal>\n <Dialog.Overlay\n className='dialog-overlay'\n />\n <Dialog.Content\n className='dialog-content'\n >\n <Dialog.Title\n className='dialog-title flex items-center'\n >\n <Image\n className='h-4 w-4 mr-1.5'\n />\n { props.title }\n </Dialog.Title>\n <div\n className='pt-6 pb-2 text-sm w-full text-muted min-h-20'\n >\n { Boolean(props.defaultItem) && (\n <Viewer\n iiifContent={props.defaultItem.manifest_url}\n options={{\n informationPanel: {\n open: false\n }\n }}\n />\n )}\n </div>\n <Dialog.Close\n asChild\n >\n <button\n className='dialog-close rounded-full'\n type='button'\n >\n <X className='h-7 w-7 p-1.5' />\n </button>\n </Dialog.Close>\n </Dialog.Content>\n </Dialog.Portal>\n </Dialog.Root>\n);\n\nexport default MediaGallery;\n","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"underscore\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@radix-ui/react-accordion\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@samvera/clover-iiif/primitives\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@peripleo/peripleo\");","// @flow\n\nimport { AnnotationPage } from '@peripleo/peripleo';\nimport { Thumbnail } from '@samvera/clover-iiif/primitives';\nimport React, { useState } from 'react';\nimport _ from 'underscore';\nimport type { MediaContent } from '../types/MediaContent';\nimport MediaGallery from './MediaGallery';\n\ntype Props = {\n data: AnnotationPage<MediaContent>,\n thumbnailHeight?: number,\n thumbnailWidth?: number\n};\n\nconst DEFAULT_THUMBNAIL_HEIGHT = 80;\nconst DEFAULT_THUMBNAIL_WIDTH = 80;\n\nconst RelatedMedia = (props: Props) => {\n const [showGallery, setShowGallery] = useState<MediaContent>();\n\n return (\n <div\n className='p-3 pb-4 grid grid-cols-3 gap-1'\n >\n { _.map(props.data?.items, (item) => (\n <Thumbnail\n key={item.body.id}\n className='rounded shadow cursor-pointer'\n onClick={() => setShowGallery(item.body)}\n thumbnail={[{\n id: item.body.content_thumbnail_url,\n type: 'Image',\n width: props.thumbnailWidth,\n height: props.thumbnailHeight\n }]}\n />\n ))}\n <MediaGallery\n defaultItem={showGallery}\n onClose={() => setShowGallery(undefined)}\n />\n </div>\n );\n};\n\nRelatedMedia.defaultProps = {\n thumbnailHeight: DEFAULT_THUMBNAIL_HEIGHT,\n thumbnailWidth: DEFAULT_THUMBNAIL_WIDTH\n};\n\nexport default RelatedMedia;\n","// @flow\n\nimport { AnnotationPage } from '@peripleo/peripleo';\nimport React from 'react';\nimport _ from 'underscore';\n\ntype Item = {\n id: string\n};\n\ntype Props = {\n data: AnnotationPage<Item>,\n emptyMessage?: string,\n renderItem: (item: Item) => JSX.Element\n};\n\nconst RelatedList = (props: Props) => {\n const { items } = props.data;\n\n if (_.isEmpty(items)) {\n return (\n <div\n className='pt-6 pl-3 pr-6 pb-8 flex items-center justify-center text-muted/50 italic'\n >\n { props.emptyMessage }\n </div>\n );\n }\n\n return (\n <ul\n className='p-3 pt-1 pb-4'\n >\n { _.map(items, (item) => (\n <li\n key={item.id}\n className='flex items-center'\n >\n { props.renderItem(item) }\n </li>\n ))}\n </ul>\n );\n};\n\nexport default RelatedList;\n","// @flow\n\nimport { AnnotationPage } from '@peripleo/peripleo';\nimport { Building2 } from 'lucide-react';\nimport React from 'react';\nimport type { Organization } from '../types/Organization';\nimport RelatedList from './RelatedList';\n\ntype Props = {\n data: AnnotationPage<Organization>\n};\n\nconst RelatedOrganizations = (props: Props) => (\n <RelatedList\n data={props.data}\n emptyMessage={'No related organization'}\n renderItem={(organization) => (\n <>\n <Building2\n className='h-4 w-4 mr-1.5'\n />\n { organization.body.title }\n </>\n )}\n />\n);\n\nexport default RelatedOrganizations;\n","// @flow\n\nimport { AnnotationPage } from '@peripleo/peripleo';\nimport { UserCircle } from 'lucide-react';\nimport React from 'react';\nimport type { Person } from '../types/Person';\nimport RelatedList from './RelatedList';\n\ntype Props = {\n data: AnnotationPage<Person>\n};\n\nconst RelatedPeople = (props: Props) => (\n <RelatedList\n data={props.data}\n emptyMessage={'No related people'}\n renderItem={(person) => (\n <>\n <UserCircle\n className='h-4 w-4 mr-1.5'\n />\n { person.body.title }\n </>\n )}\n />\n);\n\nexport default RelatedPeople;\n","// @flow\n\nimport { AnnotationPage } from '@peripleo/peripleo';\nimport { MapPin } from 'lucide-react';\nimport React from 'react';\nimport type { Place } from '../types/Place';\nimport RelatedList from './RelatedList';\n\ntype Props = {\n data: AnnotationPage<Place>\n};\n\nconst RelatedPlaces = (props: Props) => (\n <RelatedList\n data={props.data}\n emptyMessage={'No related places'}\n renderItem={(place) => (\n <>\n <MapPin\n className='h-4 w-4 mr-0.5 inline-block mb-0.5'\n />\n { place.body.title }\n </>\n )}\n />\n);\n\nexport default RelatedPlaces;\n","// @flow\n\nimport { AnnotationPage } from '@peripleo/peripleo';\nimport { ListTree } from 'lucide-react';\nimport React from 'react';\nimport RelatedList from './RelatedList';\nimport type { Taxonomy } from '../types/Taxonomy';\n\ntype Props = {\n data: AnnotationPage<Taxonomy>\n};\n\nconst RelatedTaxonomies = (props: Props) => (\n <RelatedList\n data={props.data}\n emptyMessage={'No related taxonomies'}\n renderItem={(taxonomy) => (\n <>\n <ListTree\n className='h-4 w-4 mr-1.5'\n />\n { taxonomy.body.title }\n </>\n )}\n />\n);\n\nexport default RelatedTaxonomies;\n","// @flow\n\nimport * as Accordion from '@radix-ui/react-accordion';\nimport { AlertCircle, ChevronDown } from 'lucide-react';\nimport React from 'react';\nimport _ from 'underscore';\nimport LoadAnimation from './LoadAnimation';\nimport RelatedMedia from './RelatedMedia';\nimport RelatedOrganizations from './RelatedOrganizations';\nimport RelatedPeople from './RelatedPeople';\nimport RelatedPlaces from './RelatedPlaces';\nimport RelatedTaxonomies from './RelatedTaxonomies';\nimport type { RelatedItems } from '../types/RelatedItems';\n\ntype Props = {\n items: Array<RelatedItems>\n};\n\nconst RelatedItemsList = (props: Props) => {\n if (_.isEmpty(props.items)) {\n return null;\n }\n\n return (\n <Accordion.Root type='multiple'>\n { _.map(props.items, ({ data, error, ...conf }) => (\n <Accordion.Item\n key={conf.endpoint}\n value={conf.endpoint}\n >\n <Accordion.Header>\n <Accordion.Trigger\n className='accordion-trigger border-black/20 border border-t border-b-0 border-l-0 border-r-0 border-solid\n rounded-none w-full flex justify-between items-center px-3 py-3 text-sm'\n >\n <div>\n { conf.ui_label }\n { data && (\n <span className='ml-1'>\n ({ data.items.length })\n </span>\n )}\n { error && (\n <AlertCircle\n className='inline ml-1.5 h-4 w-4 text-red-600 align-text-bottom'\n />\n )}\n { !(data || error) && (\n <LoadAnimation\n className='text-muted/60 ml-4'\n />\n )}\n </div>\n <ChevronDown\n className='accordion-chevron h-4 w-4'\n />\n </Accordion.Trigger>\n </Accordion.Header>\n <Accordion.Content\n className='accordion-content text-sm leading-6'\n >\n { conf.endpoint === 'media_contents' && (\n <RelatedMedia\n data={data}\n />\n )}\n { conf.endpoint === 'organizations' && (\n <RelatedOrganizations\n data={data}\n />\n )}\n { conf.endpoint === 'people' && (\n <RelatedPeople\n data={data}\n />\n )}\n { conf.endpoint === 'places' && (\n <RelatedPlaces\n data={data}\n />\n )}\n { conf.endpoint === 'taxonomies' && (\n <RelatedTaxonomies\n data={data}\n />\n )}\n </Accordion.Content>\n </Accordion.Item>\n ))}\n </Accordion.Root>\n );\n};\n\nexport default RelatedItemsList;\n","// @flow\n\nimport { Image, X } from 'lucide-react';\nimport React, { useMemo, useRef } from 'react';\nimport _ from 'underscore';\nimport type { Place } from '../types/Place';\nimport type { RelatedItems } from '../types/RelatedItems';\nimport RelatedItemsList from './RelatedItemsList';\nimport './PlaceDetailsPanel.css';\n\ntype Props = {\n place?: Place,\n related: Array<RelatedItems>,\n onClose: () => void\n};\n\nconst PlaceDetailsPanel = (props: Props) => {\n const el = useRef<HTMLElement>(null);\n\n /**\n * Returns the first image for the passed related items.\n */\n const firstImage = useMemo(() => {\n const images = props.related.find((i) => i.endpoint === 'media_contents' && !_.isEmpty(i.data?.items));\n return images ? (images.data && images.data.items[0].body) : undefined;\n }, [props.related]);\n\n /**\n * Sets the user defined field values.\n *\n * @type {UserDefinedField[]|*[]}\n */\n const userDefined = useMemo(() => (\n props.place?.user_defined ? Object.values(props.place.user_defined) : []\n ), [props.place]);\n\n return (\n <aside\n className='flex flex-col absolute z-10 h-full w-[280px] bg-white/80 backdrop-blur shadow overflow-y-auto'\n ref={el}\n >\n <button\n className='absolute top-2 right-2 p-1.5 rounded-full z-10 bg-slate-200/60 hover:bg-slate-200 focus:outline-2 focus:outline-offset-2 focus:outline-teal-700'\n onClick={props.onClose}\n type='button'\n >\n <X className='h-4 w-4' />\n </button>\n { props.place && (\n <>\n { firstImage && (\n <div\n className='relative w-full h-[200px] flex-grow-0 flex-shrink-0 bg-muted/20 z-0'\n >\n <div\n className='absolute top-0 left-0 w-full h-full flex justify-center items-center'\n >\n <Image\n className='h-20 w-20 text-gray-400'\n strokeWidth={1}\n />\n </div>\n <div\n className='absolute top-0 left-0 w-full h-full flex justify-center items-center'\n >\n <img\n className='object-cover h-full w-full'\n src={firstImage.content_url}\n alt={firstImage.title}\n />\n </div>\n </div>\n )}\n <div\n className='p-3'\n >\n <h1\n className='pr-6 font-medium'\n >\n { props.place.properties.title }\n </h1>\n <ol\n className='text-sm mt-4 leading-6 overflow-hidden'\n >\n { _.map(userDefined, ({ label, value }) => (\n <li\n key={label}\n className='mb-2'\n >\n <div\n className='text-muted'\n >\n { label }\n </div>\n <div\n className='font-medium overflow-hidden text-ellipsis'\n >\n { value }\n </div>\n </li>\n ))}\n </ol>\n </div>\n <RelatedItemsList\n items={props.related}\n />\n </>\n )}\n </aside>\n );\n};\n\nexport default PlaceDetailsPanel;\n","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@performant-software/geospatial\");","// @flow\n\nimport { LocationMarker } from '@performant-software/geospatial';\nimport React, { useCallback, useEffect, useState } from 'react';\n\ntype Props = {\n /**\n * The URL of the Core Data place record.\n */\n url: string\n};\n\n/**\n * This component renders a map marker for a given Core Data Place record.\n */\nconst PlaceMarker = (props: Props) => {\n const [place, setPlace] = useState();\n\n /**\n * Converts the passed data to a feature collection and sets it on the state.\n *\n * @type {(function(*): void)|*}\n */\n const onLoad = useCallback((data) => {\n const featureCollection = {\n type: 'FeatureCollection',\n features: [{\n ...data,\n properties: {\n ...data.properties,\n record_id: data.record_id\n }\n }]\n };\n\n setPlace(featureCollection);\n }, []);\n\n /**\n * Fetch the place record from the passed URL.\n */\n useEffect(() => {\n fetch(props.url)\n .then((res) => res.json())\n .then(onLoad);\n }, [props.url]);\n\n if (!place) {\n return null;\n }\n\n return (\n <LocationMarker\n data={place}\n />\n );\n};\n\nexport default PlaceMarker;\n"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","require","props","className","concat","trim","React","Dialog","onOpenChange","onClose","open","Boolean","defaultItem","Image","title","Viewer","iiifContent","manifest_url","options","informationPanel","asChild","type","X","RelatedMedia","_props$data","_useState2","useState","showGallery","setShowGallery","_","data","items","item","Thumbnail","body","id","onClick","thumbnail","content_thumbnail_url","width","thumbnailWidth","height","thumbnailHeight","MediaGallery","undefined","defaultProps","emptyMessage","renderItem","RelatedList","organization","Building2","person","UserCircle","place","MapPin","taxonomy","ListTree","Accordion","_ref","error","conf","_objectWithoutProperties","_excluded","endpoint","ui_label","length","AlertCircle","LoadAnimation","ChevronDown","RelatedOrganizations","RelatedPeople","RelatedPlaces","RelatedTaxonomies","el","useRef","firstImage","useMemo","images","related","find","i","_i$data","userDefined","_props$place","user_defined","values","ref","strokeWidth","src","content_url","alt","properties","label","RelatedItemsList","setPlace","onLoad","useCallback","featureCollection","features","_objectSpread","record_id","useEffect","fetch","url","then","res","json","LocationMarker"],"sourceRoot":""}
|
package/build/main.css
ADDED
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
/** https://cssloaders.github.io/ MIT License **/
|
|
2
|
+
.loader.three-dots,
|
|
3
|
+
.loader.three-dots::before,
|
|
4
|
+
.loader.three-dots::after {
|
|
5
|
+
display: inline-block;
|
|
6
|
+
border-radius: 50%;
|
|
7
|
+
width: 2.2em;
|
|
8
|
+
height: 2.2em;
|
|
9
|
+
animation-fill-mode: both;
|
|
10
|
+
animation: bblFadInOut 1.8s infinite ease-in-out;
|
|
11
|
+
}
|
|
12
|
+
.loader.three-dots {
|
|
13
|
+
font-size: 2px;
|
|
14
|
+
position: relative;
|
|
15
|
+
text-indent: -9999em;
|
|
16
|
+
transform: translateZ(0);
|
|
17
|
+
top: -3em;
|
|
18
|
+
animation-delay: -0.16s;
|
|
19
|
+
}
|
|
20
|
+
.loader.three-dots::before,
|
|
21
|
+
.loader.three-dots::after {
|
|
22
|
+
content: '';
|
|
23
|
+
position: absolute;
|
|
24
|
+
top: 0;
|
|
25
|
+
}
|
|
26
|
+
.loader.three-dots::before {
|
|
27
|
+
left: -3.3em;
|
|
28
|
+
animation-delay: -0.32s;
|
|
29
|
+
}
|
|
30
|
+
.loader.three-dots::after {
|
|
31
|
+
left: 3.3em;
|
|
32
|
+
}
|
|
33
|
+
@keyframes bblFadInOut {
|
|
34
|
+
0%,
|
|
35
|
+
80%,
|
|
36
|
+
100% {
|
|
37
|
+
box-shadow: 0 2.5em 0 -1.3em;
|
|
38
|
+
}
|
|
39
|
+
40% {
|
|
40
|
+
box-shadow: 0 2.5em 0 0;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.dialog-overlay {
|
|
45
|
+
background-color: rgba(0, 0, 0, 0.5);
|
|
46
|
+
inset: 0;
|
|
47
|
+
position: fixed;
|
|
48
|
+
animation: overlayShow 150ms cubic-bezier(0.16, 1, 0.3, 1);
|
|
49
|
+
z-index: 98;
|
|
50
|
+
}
|
|
51
|
+
.dialog-content {
|
|
52
|
+
background-color: #fff;
|
|
53
|
+
border-radius: 6px;
|
|
54
|
+
box-shadow: rgba(14, 18, 22, 0.35) 0px 10px 38px -10px, rgba(14, 18, 22, 0.2) 0px 10px 20px -15px;
|
|
55
|
+
position: fixed;
|
|
56
|
+
top: 50%;
|
|
57
|
+
left: 50%;
|
|
58
|
+
transform: translate(-50%, -50%);
|
|
59
|
+
width: 90vw;
|
|
60
|
+
max-width: 1000px;
|
|
61
|
+
max-height: 90vh;
|
|
62
|
+
padding: 25px;
|
|
63
|
+
animation: contentShow 150ms cubic-bezier(0.16, 1, 0.3, 1);
|
|
64
|
+
z-index: 99;
|
|
65
|
+
}
|
|
66
|
+
.dialog-content:focus {
|
|
67
|
+
outline: none;
|
|
68
|
+
}
|
|
69
|
+
.dialog-close {
|
|
70
|
+
position: absolute;
|
|
71
|
+
right: 10px;
|
|
72
|
+
top: 10px;
|
|
73
|
+
}
|
|
74
|
+
@keyframes overlayShow {
|
|
75
|
+
from {
|
|
76
|
+
opacity: 0;
|
|
77
|
+
}
|
|
78
|
+
to {
|
|
79
|
+
opacity: 1;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
@keyframes contentShow {
|
|
83
|
+
from {
|
|
84
|
+
opacity: 0;
|
|
85
|
+
transform: translate(-50%, -48%) scale(0.96);
|
|
86
|
+
}
|
|
87
|
+
to {
|
|
88
|
+
opacity: 1;
|
|
89
|
+
transform: translate(-50%, -50%) scale(1);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
.clover-viewer-header {
|
|
93
|
+
font-weight: 500;
|
|
94
|
+
align-items: center !important;
|
|
95
|
+
}
|
|
96
|
+
.clover-viewer-header > span {
|
|
97
|
+
font-size: 1rem !important;
|
|
98
|
+
padding-top: 1.3rem;
|
|
99
|
+
padding-left: 0 !important;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.accordion-chevron {
|
|
103
|
+
transition: transform 300ms cubic-bezier(0.87, 0, 0.13, 1);
|
|
104
|
+
}
|
|
105
|
+
.accordion-trigger[data-state='open'] > .accordion-chevron {
|
|
106
|
+
transform: rotate(180deg);
|
|
107
|
+
}
|
|
108
|
+
.accordion-content {
|
|
109
|
+
overflow: hidden;
|
|
110
|
+
}
|
|
111
|
+
.accordion-content[data-state='open'] {
|
|
112
|
+
animation: slideDown 300ms cubic-bezier(0.87, 0, 0.13, 1);
|
|
113
|
+
}
|
|
114
|
+
.accordion-content[data-state='closed'] {
|
|
115
|
+
animation: slideUp 300ms cubic-bezier(0.87, 0, 0.13, 1);
|
|
116
|
+
}
|
|
117
|
+
@keyframes slideDown {
|
|
118
|
+
from {
|
|
119
|
+
height: 0;
|
|
120
|
+
}
|
|
121
|
+
to {
|
|
122
|
+
height: var(--radix-accordion-content-height);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
@keyframes slideUp {
|
|
126
|
+
from {
|
|
127
|
+
height: var(--radix-accordion-content-height);
|
|
128
|
+
}
|
|
129
|
+
to {
|
|
130
|
+
height: 0;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
package/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('./build/index');
|
package/package.json
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@performant-software/core-data",
|
|
3
|
+
"version": "1.2.0-beta.1",
|
|
4
|
+
"description": "A package of components used for Core Data",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"main": "./build/index.js",
|
|
7
|
+
"style": "./build/main.css",
|
|
8
|
+
"scripts": {
|
|
9
|
+
"build": "webpack --mode production && flow-copy-source -v src types"
|
|
10
|
+
},
|
|
11
|
+
"dependencies": {
|
|
12
|
+
"@performant-software/geospatial": "^1.2.0-beta.1",
|
|
13
|
+
"@peripleo/peripleo": "^0.3.2",
|
|
14
|
+
"@radix-ui/react-accordion": "^1.1.2",
|
|
15
|
+
"@radix-ui/react-dialog": "^1.0.5",
|
|
16
|
+
"@samvera/clover-iiif": "^2.3.2",
|
|
17
|
+
"lucide-react": "^0.321.0",
|
|
18
|
+
"underscore": "^1.13.2"
|
|
19
|
+
},
|
|
20
|
+
"peerDependencies": {
|
|
21
|
+
"react": ">= 16.13.1 < 19.0.0",
|
|
22
|
+
"react-dom": ">= 16.13.1 < 19.0.0"
|
|
23
|
+
},
|
|
24
|
+
"devDependencies": {
|
|
25
|
+
"@performant-software/webpack-config": "^1.0.0",
|
|
26
|
+
"react": "^18.2.0",
|
|
27
|
+
"react-dom": "^18.2.0"
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/** https://cssloaders.github.io/ MIT License **/
|
|
2
|
+
.loader.three-dots, .loader.three-dots::before, .loader.three-dots::after {
|
|
3
|
+
display:inline-block;
|
|
4
|
+
border-radius: 50%;
|
|
5
|
+
width: 2.2em;
|
|
6
|
+
height: 2.2em;
|
|
7
|
+
animation-fill-mode: both;
|
|
8
|
+
animation: bblFadInOut 1.8s infinite ease-in-out;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.loader.three-dots {
|
|
12
|
+
font-size: 2px;
|
|
13
|
+
position: relative;
|
|
14
|
+
text-indent: -9999em;
|
|
15
|
+
transform: translateZ(0);
|
|
16
|
+
top: -3em;
|
|
17
|
+
animation-delay: -0.16s;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.loader.three-dots::before,
|
|
21
|
+
.loader.three-dots::after {
|
|
22
|
+
content: '';
|
|
23
|
+
position: absolute;
|
|
24
|
+
top: 0;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.loader.three-dots::before {
|
|
28
|
+
left: -3.3em;
|
|
29
|
+
animation-delay: -0.32s;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.loader.three-dots::after {
|
|
33
|
+
left: 3.3em;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
@keyframes bblFadInOut {
|
|
37
|
+
0%, 80%, 100% { box-shadow: 0 2.5em 0 -1.3em }
|
|
38
|
+
40% { box-shadow: 0 2.5em 0 0 }
|
|
39
|
+
}
|
|
40
|
+
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// @flow
|
|
2
|
+
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import './LoadAnimation.css';
|
|
5
|
+
|
|
6
|
+
type Props = {
|
|
7
|
+
/**
|
|
8
|
+
* Additional class name to apply to the element.
|
|
9
|
+
*/
|
|
10
|
+
className?: string
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* This component renders a basic loading animation.
|
|
15
|
+
*/
|
|
16
|
+
const LoadAnimation = (props: Props) => {
|
|
17
|
+
const className = `${props.className || ''} loader three-dots`.trim();
|
|
18
|
+
|
|
19
|
+
return (
|
|
20
|
+
<span className={className} />
|
|
21
|
+
);
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export default LoadAnimation;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
.dialog-overlay {
|
|
2
|
+
background-color: rgba(0, 0, 0, 0.5);
|
|
3
|
+
inset: 0;
|
|
4
|
+
position: fixed;
|
|
5
|
+
animation: overlayShow 150ms cubic-bezier(0.16, 1, 0.3, 1);
|
|
6
|
+
z-index: 98;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.dialog-content {
|
|
10
|
+
background-color: #fff;
|
|
11
|
+
border-radius: 6px;
|
|
12
|
+
box-shadow: rgba(14, 18, 22, 0.35) 0px 10px 38px -10px, rgba(14, 18, 22, 0.2) 0px 10px 20px -15px;
|
|
13
|
+
position: fixed;
|
|
14
|
+
top: 50%;
|
|
15
|
+
left: 50%;
|
|
16
|
+
transform: translate(-50%, -50%);
|
|
17
|
+
width: 90vw;
|
|
18
|
+
max-width: 1000px;
|
|
19
|
+
max-height: 90vh;
|
|
20
|
+
padding: 25px;
|
|
21
|
+
animation: contentShow 150ms cubic-bezier(0.16, 1, 0.3, 1);
|
|
22
|
+
z-index: 99;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.dialog-content:focus {
|
|
26
|
+
outline: none;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.dialog-close {
|
|
30
|
+
position: absolute;
|
|
31
|
+
right: 10px;
|
|
32
|
+
top: 10px;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
@keyframes overlayShow {
|
|
36
|
+
from {
|
|
37
|
+
opacity: 0;
|
|
38
|
+
}
|
|
39
|
+
to {
|
|
40
|
+
opacity: 1;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
@keyframes contentShow {
|
|
45
|
+
from {
|
|
46
|
+
opacity: 0;
|
|
47
|
+
transform: translate(-50%, -48%) scale(0.96);
|
|
48
|
+
}
|
|
49
|
+
to {
|
|
50
|
+
opacity: 1;
|
|
51
|
+
transform: translate(-50%, -50%) scale(1);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.clover-viewer-header {
|
|
56
|
+
font-weight: 500;
|
|
57
|
+
align-items: center !important;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.clover-viewer-header > span {
|
|
61
|
+
font-size: 1rem !important;
|
|
62
|
+
padding-top: 1.3rem;
|
|
63
|
+
padding-left: 0 !important;
|
|
64
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
// @flow
|
|
2
|
+
|
|
3
|
+
import * as Dialog from '@radix-ui/react-dialog';
|
|
4
|
+
import Viewer from '@samvera/clover-iiif/viewer';
|
|
5
|
+
import { Image, X } from 'lucide-react';
|
|
6
|
+
import React from 'react';
|
|
7
|
+
import type { MediaContent } from '../types/MediaContent';
|
|
8
|
+
|
|
9
|
+
import './MediaGallery.css';
|
|
10
|
+
|
|
11
|
+
type Props = {
|
|
12
|
+
/**
|
|
13
|
+
* The MediaContent record contain the IIIF manifest URL.
|
|
14
|
+
*/
|
|
15
|
+
defaultItem: MediaContent,
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Callback fired when the dialog is closed.
|
|
19
|
+
*/
|
|
20
|
+
onClose: () => void,
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Title text to display at the top of the dialog.
|
|
24
|
+
*/
|
|
25
|
+
title?: string
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* This component renders a IIIF Viewer for the passed MediaContent record.
|
|
30
|
+
*/
|
|
31
|
+
const MediaGallery = (props: Props) => (
|
|
32
|
+
<Dialog.Root
|
|
33
|
+
onOpenChange={props.onClose}
|
|
34
|
+
open={Boolean(props.defaultItem)}
|
|
35
|
+
>
|
|
36
|
+
<Dialog.Portal>
|
|
37
|
+
<Dialog.Overlay
|
|
38
|
+
className='dialog-overlay'
|
|
39
|
+
/>
|
|
40
|
+
<Dialog.Content
|
|
41
|
+
className='dialog-content'
|
|
42
|
+
>
|
|
43
|
+
<Dialog.Title
|
|
44
|
+
className='dialog-title flex items-center'
|
|
45
|
+
>
|
|
46
|
+
<Image
|
|
47
|
+
className='h-4 w-4 mr-1.5'
|
|
48
|
+
/>
|
|
49
|
+
{ props.title }
|
|
50
|
+
</Dialog.Title>
|
|
51
|
+
<div
|
|
52
|
+
className='pt-6 pb-2 text-sm w-full text-muted min-h-20'
|
|
53
|
+
>
|
|
54
|
+
{ Boolean(props.defaultItem) && (
|
|
55
|
+
<Viewer
|
|
56
|
+
iiifContent={props.defaultItem.manifest_url}
|
|
57
|
+
options={{
|
|
58
|
+
informationPanel: {
|
|
59
|
+
open: false
|
|
60
|
+
}
|
|
61
|
+
}}
|
|
62
|
+
/>
|
|
63
|
+
)}
|
|
64
|
+
</div>
|
|
65
|
+
<Dialog.Close
|
|
66
|
+
asChild
|
|
67
|
+
>
|
|
68
|
+
<button
|
|
69
|
+
className='dialog-close rounded-full'
|
|
70
|
+
type='button'
|
|
71
|
+
>
|
|
72
|
+
<X className='h-7 w-7 p-1.5' />
|
|
73
|
+
</button>
|
|
74
|
+
</Dialog.Close>
|
|
75
|
+
</Dialog.Content>
|
|
76
|
+
</Dialog.Portal>
|
|
77
|
+
</Dialog.Root>
|
|
78
|
+
);
|
|
79
|
+
|
|
80
|
+
export default MediaGallery;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
.accordion-chevron {
|
|
2
|
+
transition: transform 300ms cubic-bezier(0.87, 0, 0.13, 1);
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.accordion-trigger[data-state='open'] > .accordion-chevron {
|
|
6
|
+
transform: rotate(180deg);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.accordion-content {
|
|
10
|
+
overflow: hidden;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.accordion-content[data-state='open'] {
|
|
14
|
+
animation: slideDown 300ms cubic-bezier(0.87, 0, 0.13, 1);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.accordion-content[data-state='closed'] {
|
|
18
|
+
animation: slideUp 300ms cubic-bezier(0.87, 0, 0.13, 1);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
@keyframes slideDown {
|
|
22
|
+
from {
|
|
23
|
+
height: 0;
|
|
24
|
+
}
|
|
25
|
+
to {
|
|
26
|
+
height: var(--radix-accordion-content-height);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
@keyframes slideUp {
|
|
31
|
+
from {
|
|
32
|
+
height: var(--radix-accordion-content-height);
|
|
33
|
+
}
|
|
34
|
+
to {
|
|
35
|
+
height: 0;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
// @flow
|
|
2
|
+
|
|
3
|
+
import { Image, X } from 'lucide-react';
|
|
4
|
+
import React, { useMemo, useRef } from 'react';
|
|
5
|
+
import _ from 'underscore';
|
|
6
|
+
import type { Place } from '../types/Place';
|
|
7
|
+
import type { RelatedItems } from '../types/RelatedItems';
|
|
8
|
+
import RelatedItemsList from './RelatedItemsList';
|
|
9
|
+
import './PlaceDetailsPanel.css';
|
|
10
|
+
|
|
11
|
+
type Props = {
|
|
12
|
+
place?: Place,
|
|
13
|
+
related: Array<RelatedItems>,
|
|
14
|
+
onClose: () => void
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
const PlaceDetailsPanel = (props: Props) => {
|
|
18
|
+
const el = useRef<HTMLElement>(null);
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Returns the first image for the passed related items.
|
|
22
|
+
*/
|
|
23
|
+
const firstImage = useMemo(() => {
|
|
24
|
+
const images = props.related.find((i) => i.endpoint === 'media_contents' && !_.isEmpty(i.data?.items));
|
|
25
|
+
return images ? (images.data && images.data.items[0].body) : undefined;
|
|
26
|
+
}, [props.related]);
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Sets the user defined field values.
|
|
30
|
+
*
|
|
31
|
+
* @type {UserDefinedField[]|*[]}
|
|
32
|
+
*/
|
|
33
|
+
const userDefined = useMemo(() => (
|
|
34
|
+
props.place?.user_defined ? Object.values(props.place.user_defined) : []
|
|
35
|
+
), [props.place]);
|
|
36
|
+
|
|
37
|
+
return (
|
|
38
|
+
<aside
|
|
39
|
+
className='flex flex-col absolute z-10 h-full w-[280px] bg-white/80 backdrop-blur shadow overflow-y-auto'
|
|
40
|
+
ref={el}
|
|
41
|
+
>
|
|
42
|
+
<button
|
|
43
|
+
className='absolute top-2 right-2 p-1.5 rounded-full z-10 bg-slate-200/60 hover:bg-slate-200 focus:outline-2 focus:outline-offset-2 focus:outline-teal-700'
|
|
44
|
+
onClick={props.onClose}
|
|
45
|
+
type='button'
|
|
46
|
+
>
|
|
47
|
+
<X className='h-4 w-4' />
|
|
48
|
+
</button>
|
|
49
|
+
{ props.place && (
|
|
50
|
+
<>
|
|
51
|
+
{ firstImage && (
|
|
52
|
+
<div
|
|
53
|
+
className='relative w-full h-[200px] flex-grow-0 flex-shrink-0 bg-muted/20 z-0'
|
|
54
|
+
>
|
|
55
|
+
<div
|
|
56
|
+
className='absolute top-0 left-0 w-full h-full flex justify-center items-center'
|
|
57
|
+
>
|
|
58
|
+
<Image
|
|
59
|
+
className='h-20 w-20 text-gray-400'
|
|
60
|
+
strokeWidth={1}
|
|
61
|
+
/>
|
|
62
|
+
</div>
|
|
63
|
+
<div
|
|
64
|
+
className='absolute top-0 left-0 w-full h-full flex justify-center items-center'
|
|
65
|
+
>
|
|
66
|
+
<img
|
|
67
|
+
className='object-cover h-full w-full'
|
|
68
|
+
src={firstImage.content_url}
|
|
69
|
+
alt={firstImage.title}
|
|
70
|
+
/>
|
|
71
|
+
</div>
|
|
72
|
+
</div>
|
|
73
|
+
)}
|
|
74
|
+
<div
|
|
75
|
+
className='p-3'
|
|
76
|
+
>
|
|
77
|
+
<h1
|
|
78
|
+
className='pr-6 font-medium'
|
|
79
|
+
>
|
|
80
|
+
{ props.place.properties.title }
|
|
81
|
+
</h1>
|
|
82
|
+
<ol
|
|
83
|
+
className='text-sm mt-4 leading-6 overflow-hidden'
|
|
84
|
+
>
|
|
85
|
+
{ _.map(userDefined, ({ label, value }) => (
|
|
86
|
+
<li
|
|
87
|
+
key={label}
|
|
88
|
+
className='mb-2'
|
|
89
|
+
>
|
|
90
|
+
<div
|
|
91
|
+
className='text-muted'
|
|
92
|
+
>
|
|
93
|
+
{ label }
|
|
94
|
+
</div>
|
|
95
|
+
<div
|
|
96
|
+
className='font-medium overflow-hidden text-ellipsis'
|
|
97
|
+
>
|
|
98
|
+
{ value }
|
|
99
|
+
</div>
|
|
100
|
+
</li>
|
|
101
|
+
))}
|
|
102
|
+
</ol>
|
|
103
|
+
</div>
|
|
104
|
+
<RelatedItemsList
|
|
105
|
+
items={props.related}
|
|
106
|
+
/>
|
|
107
|
+
</>
|
|
108
|
+
)}
|
|
109
|
+
</aside>
|
|
110
|
+
);
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
export default PlaceDetailsPanel;
|