@performant-software/core-data 1.2.0-beta.1 → 1.2.0-beta.3

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/build/index.js CHANGED
@@ -1,2 +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})();
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("@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
2
  //# sourceMappingURL=index.js.map
@@ -1 +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,EA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AWH,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":""}
1
+ {"version":3,"file":"index.js","mappings":"mBACA,IAAIA,EAAsB,CCA1BA,EAAyBC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AAA,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/./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\");","// @flow\n\nimport { Thumbnail } from '@samvera/clover-iiif/primitives';\nimport React, { useState } from 'react';\nimport _ from 'underscore';\nimport type { AnnotationPage } from '../types/AnnotationPage';\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 React from 'react';\nimport _ from 'underscore';\nimport type { AnnotationPage } from '../types/AnnotationPage';\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 { Building2 } from 'lucide-react';\nimport React from 'react';\nimport type { AnnotationPage } from '../types/AnnotationPage';\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 { UserCircle } from 'lucide-react';\nimport React from 'react';\nimport type { AnnotationPage } from '../types/AnnotationPage';\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 { MapPin } from 'lucide-react';\nimport React from 'react';\nimport type { AnnotationPage } from '../types/AnnotationPage';\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 { ListTree } from 'lucide-react';\nimport React from 'react';\nimport type { AnnotationPage } from '../types/AnnotationPage';\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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@performant-software/core-data",
3
- "version": "1.2.0-beta.1",
3
+ "version": "1.2.0-beta.3",
4
4
  "description": "A package of components used for Core Data",
5
5
  "license": "MIT",
6
6
  "main": "./build/index.js",
@@ -9,8 +9,7 @@
9
9
  "build": "webpack --mode production && flow-copy-source -v src types"
10
10
  },
11
11
  "dependencies": {
12
- "@performant-software/geospatial": "^1.2.0-beta.1",
13
- "@peripleo/peripleo": "^0.3.2",
12
+ "@performant-software/geospatial": "^1.2.0-beta.3",
14
13
  "@radix-ui/react-accordion": "^1.1.2",
15
14
  "@radix-ui/react-dialog": "^1.0.5",
16
15
  "@samvera/clover-iiif": "^2.3.2",
@@ -1,8 +1,8 @@
1
1
  // @flow
2
2
 
3
- import { AnnotationPage } from '@peripleo/peripleo';
4
3
  import React from 'react';
5
4
  import _ from 'underscore';
5
+ import type { AnnotationPage } from '../types/AnnotationPage';
6
6
 
7
7
  type Item = {
8
8
  id: string
@@ -1,9 +1,9 @@
1
1
  // @flow
2
2
 
3
- import { AnnotationPage } from '@peripleo/peripleo';
4
3
  import { Thumbnail } from '@samvera/clover-iiif/primitives';
5
4
  import React, { useState } from 'react';
6
5
  import _ from 'underscore';
6
+ import type { AnnotationPage } from '../types/AnnotationPage';
7
7
  import type { MediaContent } from '../types/MediaContent';
8
8
  import MediaGallery from './MediaGallery';
9
9
 
@@ -1,8 +1,8 @@
1
1
  // @flow
2
2
 
3
- import { AnnotationPage } from '@peripleo/peripleo';
4
3
  import { Building2 } from 'lucide-react';
5
4
  import React from 'react';
5
+ import type { AnnotationPage } from '../types/AnnotationPage';
6
6
  import type { Organization } from '../types/Organization';
7
7
  import RelatedList from './RelatedList';
8
8
 
@@ -1,8 +1,8 @@
1
1
  // @flow
2
2
 
3
- import { AnnotationPage } from '@peripleo/peripleo';
4
3
  import { UserCircle } from 'lucide-react';
5
4
  import React from 'react';
5
+ import type { AnnotationPage } from '../types/AnnotationPage';
6
6
  import type { Person } from '../types/Person';
7
7
  import RelatedList from './RelatedList';
8
8
 
@@ -1,8 +1,8 @@
1
1
  // @flow
2
2
 
3
- import { AnnotationPage } from '@peripleo/peripleo';
4
3
  import { MapPin } from 'lucide-react';
5
4
  import React from 'react';
5
+ import type { AnnotationPage } from '../types/AnnotationPage';
6
6
  import type { Place } from '../types/Place';
7
7
  import RelatedList from './RelatedList';
8
8
 
@@ -1,8 +1,8 @@
1
1
  // @flow
2
2
 
3
- import { AnnotationPage } from '@peripleo/peripleo';
4
3
  import { ListTree } from 'lucide-react';
5
4
  import React from 'react';
5
+ import type { AnnotationPage } from '../types/AnnotationPage';
6
6
  import RelatedList from './RelatedList';
7
7
  import type { Taxonomy } from '../types/Taxonomy';
8
8
 
@@ -0,0 +1,15 @@
1
+ // @flow
2
+
3
+ import type { Annotation } from './Annotation';
4
+
5
+ export type AnnotationPage = {
6
+ '@context': 'http://www.w3.org/ns/anno.jsonld';
7
+ id: string;
8
+ type: 'AnnotationPage';
9
+ partOf: {
10
+ id: string;
11
+ label: string;
12
+ total: number;
13
+ };
14
+ items: Annotation<T>[];
15
+ };
@@ -0,0 +1,6 @@
1
+ // @flow
2
+
3
+ export type FeatureGeometry = {
4
+ type: 'Point' | 'Polygon' | 'Polyline' | 'GeometryCollection';
5
+ coordinates: number[] | number[][] | number[][][];
6
+ };
@@ -1,7 +1,7 @@
1
1
  // @flow
2
2
 
3
- import type { FeatureGeometry } from '@peripleo/peripleo';
4
3
  import type { Annotation } from './Annotation';
4
+ import type { FeatureGeometry } from './FeatureGeometry';
5
5
 
6
6
  export type Place = Annotation & {
7
7
  type: 'Place',
@@ -1,7 +1,7 @@
1
1
  // @flow
2
2
 
3
- import { AnnotationPage } from '@peripleo/peripleo';
4
3
  import type { Annotation } from './Annotation';
4
+ import type { AnnotationPage } from './AnnotationPage';
5
5
 
6
6
  export type RelatedItems = {
7
7
  endpoint: string,
@@ -1,8 +1,8 @@
1
1
  // @flow
2
2
 
3
- import { AnnotationPage } from '@peripleo/peripleo';
4
3
  import React from 'react';
5
4
  import _ from 'underscore';
5
+ import type { AnnotationPage } from '../types/AnnotationPage';
6
6
 
7
7
  type Item = {
8
8
  id: string
@@ -1,9 +1,9 @@
1
1
  // @flow
2
2
 
3
- import { AnnotationPage } from '@peripleo/peripleo';
4
3
  import { Thumbnail } from '@samvera/clover-iiif/primitives';
5
4
  import React, { useState } from 'react';
6
5
  import _ from 'underscore';
6
+ import type { AnnotationPage } from '../types/AnnotationPage';
7
7
  import type { MediaContent } from '../types/MediaContent';
8
8
  import MediaGallery from './MediaGallery';
9
9
 
@@ -1,8 +1,8 @@
1
1
  // @flow
2
2
 
3
- import { AnnotationPage } from '@peripleo/peripleo';
4
3
  import { Building2 } from 'lucide-react';
5
4
  import React from 'react';
5
+ import type { AnnotationPage } from '../types/AnnotationPage';
6
6
  import type { Organization } from '../types/Organization';
7
7
  import RelatedList from './RelatedList';
8
8
 
@@ -1,8 +1,8 @@
1
1
  // @flow
2
2
 
3
- import { AnnotationPage } from '@peripleo/peripleo';
4
3
  import { UserCircle } from 'lucide-react';
5
4
  import React from 'react';
5
+ import type { AnnotationPage } from '../types/AnnotationPage';
6
6
  import type { Person } from '../types/Person';
7
7
  import RelatedList from './RelatedList';
8
8
 
@@ -1,8 +1,8 @@
1
1
  // @flow
2
2
 
3
- import { AnnotationPage } from '@peripleo/peripleo';
4
3
  import { MapPin } from 'lucide-react';
5
4
  import React from 'react';
5
+ import type { AnnotationPage } from '../types/AnnotationPage';
6
6
  import type { Place } from '../types/Place';
7
7
  import RelatedList from './RelatedList';
8
8
 
@@ -1,8 +1,8 @@
1
1
  // @flow
2
2
 
3
- import { AnnotationPage } from '@peripleo/peripleo';
4
3
  import { ListTree } from 'lucide-react';
5
4
  import React from 'react';
5
+ import type { AnnotationPage } from '../types/AnnotationPage';
6
6
  import RelatedList from './RelatedList';
7
7
  import type { Taxonomy } from '../types/Taxonomy';
8
8
 
@@ -0,0 +1,15 @@
1
+ // @flow
2
+
3
+ import type { Annotation } from './Annotation';
4
+
5
+ export type AnnotationPage = {
6
+ '@context': 'http://www.w3.org/ns/anno.jsonld';
7
+ id: string;
8
+ type: 'AnnotationPage';
9
+ partOf: {
10
+ id: string;
11
+ label: string;
12
+ total: number;
13
+ };
14
+ items: Annotation<T>[];
15
+ };
@@ -0,0 +1,6 @@
1
+ // @flow
2
+
3
+ export type FeatureGeometry = {
4
+ type: 'Point' | 'Polygon' | 'Polyline' | 'GeometryCollection';
5
+ coordinates: number[] | number[][] | number[][][];
6
+ };
@@ -1,7 +1,7 @@
1
1
  // @flow
2
2
 
3
- import type { FeatureGeometry } from '@peripleo/peripleo';
4
3
  import type { Annotation } from './Annotation';
4
+ import type { FeatureGeometry } from './FeatureGeometry';
5
5
 
6
6
  export type Place = Annotation & {
7
7
  type: 'Place',
@@ -1,7 +1,7 @@
1
1
  // @flow
2
2
 
3
- import { AnnotationPage } from '@peripleo/peripleo';
4
3
  import type { Annotation } from './Annotation';
4
+ import type { AnnotationPage } from './AnnotationPage';
5
5
 
6
6
  export type RelatedItems = {
7
7
  endpoint: string,