@macrostrat/map-interface 1.5.3 → 1.5.4

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.
Files changed (47) hide show
  1. package/CHANGELOG.md +5 -0
  2. package/dist/cjs/index.js +1 -1
  3. package/dist/cjs/{map-interface.3c606eea.js → map-interface.0154f76c.js} +3 -3
  4. package/dist/{esm/map-interface.47191f77.js.map → cjs/map-interface.0154f76c.js.map} +1 -1
  5. package/dist/cjs/{map-interface.4c2f5ced.js → map-interface.2401af7a.js} +4 -3
  6. package/dist/cjs/map-interface.2401af7a.js.map +1 -0
  7. package/dist/cjs/{map-interface.ad03b0c2.js → map-interface.3bcda63a.js} +7 -5
  8. package/dist/cjs/map-interface.3bcda63a.js.map +1 -0
  9. package/dist/cjs/{map-interface.49704804.js → map-interface.e53278ff.js} +6 -4
  10. package/dist/cjs/map-interface.e53278ff.js.map +1 -0
  11. package/dist/esm/index.d.ts +5 -2
  12. package/dist/esm/index.d.ts.map +1 -1
  13. package/dist/esm/index.js +1 -1
  14. package/dist/esm/{map-interface.1f2a6325.js → map-interface.00ecf2ee.js} +7 -5
  15. package/dist/esm/map-interface.00ecf2ee.js.map +1 -0
  16. package/dist/esm/{map-interface.243c85c6.js → map-interface.9fac5fa6.js} +4 -3
  17. package/dist/esm/map-interface.9fac5fa6.js.map +1 -0
  18. package/dist/esm/{map-interface.47191f77.js → map-interface.cfc9c190.js} +3 -3
  19. package/dist/{cjs/map-interface.3c606eea.js.map → esm/map-interface.cfc9c190.js.map} +1 -1
  20. package/dist/esm/{map-interface.70768c2c.js → map-interface.f51caacc.js} +6 -4
  21. package/dist/esm/map-interface.f51caacc.js.map +1 -0
  22. package/dist/node/index.js +1 -1
  23. package/dist/node/index.js.map +1 -1
  24. package/dist/node/{map-interface.a50eb4e3.js → map-interface.48262cbb.js} +2 -2
  25. package/dist/node/map-interface.48262cbb.js.map +1 -0
  26. package/dist/node/{map-interface.3dbeec12.js → map-interface.9b24efb8.js} +2 -2
  27. package/dist/node/{map-interface.3dbeec12.js.map → map-interface.9b24efb8.js.map} +1 -1
  28. package/dist/node/map-interface.aa4d45ff.js +2 -0
  29. package/dist/node/map-interface.aa4d45ff.js.map +1 -0
  30. package/dist/node/map-interface.e8790ed0.js +2 -0
  31. package/dist/node/map-interface.e8790ed0.js.map +1 -0
  32. package/package.json +2 -2
  33. package/src/location-details/location-details.stories.ts +2 -2
  34. package/src/location-details/macrostrat-linked.ts +3 -2
  35. package/src/location-details/xdd-panel/Journal.tsx +3 -1
  36. package/src/location-details/xdd-panel/index.ts +14 -2
  37. package/dist/cjs/map-interface.49704804.js.map +0 -1
  38. package/dist/cjs/map-interface.4c2f5ced.js.map +0 -1
  39. package/dist/cjs/map-interface.ad03b0c2.js.map +0 -1
  40. package/dist/esm/map-interface.1f2a6325.js.map +0 -1
  41. package/dist/esm/map-interface.243c85c6.js.map +0 -1
  42. package/dist/esm/map-interface.70768c2c.js.map +0 -1
  43. package/dist/node/map-interface.73dfe675.js +0 -2
  44. package/dist/node/map-interface.73dfe675.js.map +0 -1
  45. package/dist/node/map-interface.97b93dd1.js +0 -2
  46. package/dist/node/map-interface.97b93dd1.js.map +0 -1
  47. package/dist/node/map-interface.a50eb4e3.js.map +0 -1
@@ -1 +0,0 @@
1
- {"mappings":"A,Q,gD,I,uB,Q,qB,uB,Q,qB,8B,Q,6B,S,uB,C,E,O,G,E,U,C,E,O,C,C,C,S,e,C,C,C,C,C,C,C,E,O,c,C,E,E,C,I,E,I,E,W,C,E,a,C,C,E,C,I,e,W,gB,C,E,c,C,E,c,e,iB,A,O,gB,A,C,c,S,C,E,G,K,gB,O,e,C,E,C,O,C,G,K,c,C,I,E,a,C,E,A,Q,a,C,E,C,I,E,C,G,E,Q,C,C,E,O,e,C,E,C,E,E,I,C,E,O,C,E,E,O,E,E,O,A,C,I,E,A,M,uB,E,I,O,E,I,C,mB,C,C,E,Q,C,S,C,C,C,E,a,C,E,C,C,E,e,iB,C,e,I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ages/map-interface/src/location-details/xdd-panel/index.ts"],"sourcesContent":["require(\"./map-interface.a50eb4e3.js\");\nvar $1Sxj6$blueprintjscore = require(\"@blueprintjs/core\");\nvar $1Sxj6$macrostrathyper = require(\"@macrostrat/hyper\");\nvar $1Sxj6$macrostratmapinterface = require(\"@macrostrat/map-interface\");\n\n\nfunction $parcel$interopDefault(a) {\n return a && a.__esModule ? a.default : a;\n}\n\nfunction $parcel$export(e, n, v, s) {\n Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});\n}\n\n var $parcel$global = globalThis;\n \nvar $parcel$modules = {};\nvar $parcel$inits = {};\n\nvar parcelRequire = $parcel$global[\"parcelRequirea149\"];\n\nif (parcelRequire == null) {\n parcelRequire = function(id) {\n if (id in $parcel$modules) {\n return $parcel$modules[id].exports;\n }\n if (id in $parcel$inits) {\n var init = $parcel$inits[id];\n delete $parcel$inits[id];\n var module = {id: id, exports: {}};\n $parcel$modules[id] = module;\n init.call(module.exports, module, module.exports);\n return module.exports;\n }\n var err = new Error(\"Cannot find module '\" + id + \"'\");\n err.code = 'MODULE_NOT_FOUND';\n throw err;\n };\n\n parcelRequire.register = function register(id, init) {\n $parcel$inits[id] = init;\n };\n\n $parcel$global[\"parcelRequirea149\"] = parcelRequire;\n}\n\nvar parcelRegister = parcelRequire.register;\n\n$parcel$export(module.exports, \"XddExpansion\", () => $fd8d9a1e86b96f9e$export$7bbcc612b1169c6f);\n$parcel$export(module.exports, \"xDDPanelCore\", () => $fd8d9a1e86b96f9e$export$223bda478756d1d9);\n\n\n\nvar $4VE1e = parcelRequire(\"4VE1e\");\n\nfunction $fd8d9a1e86b96f9e$export$7bbcc612b1169c6f({ xddInfo: xddInfo, expanded: expanded = false }) {\n return (0, ($parcel$interopDefault($1Sxj6$macrostrathyper)))($fd8d9a1e86b96f9e$export$223bda478756d1d9, {\n className: \"regional-panel\",\n data: xddInfo,\n isFetching: xddInfo == undefined || xddInfo.length === 0,\n expanded: expanded\n });\n}\nfunction $fd8d9a1e86b96f9e$export$223bda478756d1d9({ isFetching: isFetching, data: xddInfo, expanded: expanded, ...rest }) {\n const groupedData = $fd8d9a1e86b96f9e$var$groupSnippetsByJournal(xddInfo);\n console.log(\"expanded\", expanded);\n return (0, ($parcel$interopDefault($1Sxj6$macrostrathyper)))((0, $1Sxj6$macrostratmapinterface.ExpansionPanel), {\n className: \"regional-panel\",\n title: \"Primary literature\",\n helpText: \"via xDD\",\n ...rest,\n expanded: expanded\n }, [\n (0, ($parcel$interopDefault($1Sxj6$macrostrathyper))).if(isFetching)((0, $1Sxj6$blueprintjscore.Spinner)),\n (0, ($parcel$interopDefault($1Sxj6$macrostrathyper))).if(!isFetching && xddInfo.length > 0)([\n Array.from(groupedData.entries())?.map(([journal, snippets])=>{\n return (0, ($parcel$interopDefault($1Sxj6$macrostrathyper)))((0, $4VE1e.default), {\n name: journal,\n articles: snippets,\n publisher: snippets[0].publisher,\n key: journal\n });\n })\n ])\n ]);\n}\nfunction $fd8d9a1e86b96f9e$var$groupSnippetsByJournal(snippets) {\n const journals = new Map();\n if (!snippets || snippets.length === 0) return journals;\n for (let snippet of snippets){\n const { pubname: journal } = snippet;\n if (!journals.has(journal)) journals.set(journal, []);\n journals.get(journal).push(snippet);\n }\n return journals;\n}\n\n\n//# sourceMappingURL=map-interface.97b93dd1.js.map\n","import { Spinner } from \"@blueprintjs/core\";\nimport h from \"@macrostrat/hyper\";\nimport Journal from \"./Journal\";\nimport { ExpansionPanel } from \"@macrostrat/map-interface\";\n\nexport interface XDDSnippet {\n pubname: string;\n publisher: string;\n _gddid: string;\n title: string;\n doi: string;\n coverDate: string;\n URL: string;\n authors: string;\n hits: number;\n highlight: string[];\n}\n\nexport function XddExpansion({ xddInfo, expanded = false }) {\n return h(xDDPanelCore, {\n className: \"regional-panel\",\n data: xddInfo,\n isFetching: xddInfo == undefined || xddInfo.length === 0,\n expanded,\n });\n}\n\nexport function xDDPanelCore({ isFetching, data: xddInfo, expanded, ...rest }) {\n const groupedData = groupSnippetsByJournal(xddInfo);\n\n console.log(\"expanded\", expanded);\n\n return h(\n ExpansionPanel,\n {\n className: \"regional-panel\",\n title: \"Primary literature\",\n helpText: \"via xDD\",\n ...rest,\n expanded,\n },\n [\n h.if(isFetching)(Spinner),\n h.if(!isFetching && xddInfo.length > 0)([\n Array.from(groupedData.entries())?.map(([journal, snippets]) => {\n return h(Journal, {\n name: journal,\n articles: snippets,\n publisher: snippets[0].publisher,\n key: journal,\n });\n }),\n ]),\n ],\n );\n}\n\nfunction groupSnippetsByJournal(\n snippets: XDDSnippet[],\n): Map<string, XDDSnippet[]> {\n const journals = new Map<string, XDDSnippet[]>();\n if (!snippets || snippets.length === 0) {\n return journals;\n }\n for (let snippet of snippets) {\n const { pubname: journal } = snippet;\n if (!journals.has(journal)) {\n journals.set(journal, []);\n }\n journals.get(journal).push(snippet);\n }\n return journals;\n}\n"],"names":["require","$1Sxj6$blueprintjscore","$1Sxj6$macrostrathyper","$1Sxj6$macrostratmapinterface","$parcel$interopDefault","a","__esModule","default","$parcel$export","e","n","v","s","Object","defineProperty","get","set","enumerable","configurable","$parcel$global","globalThis","$parcel$modules","$parcel$inits","parcelRequire","id","exports","init","module","call","err","Error","code","register","parcelRegister","$fd8d9a1e86b96f9e$export$7bbcc612b1169c6f","$fd8d9a1e86b96f9e$export$223bda478756d1d9","$4VE1e","xddInfo","expanded","className","data","isFetching","undefined","length","rest","groupedData","$fd8d9a1e86b96f9e$var$groupSnippetsByJournal","console","log","ExpansionPanel","title","helpText","if","Spinner","Array","from","entries","map","journal","snippets","name","articles","publisher","key","journals","Map","snippet","pubname","has","push"],"version":3,"file":"map-interface.97b93dd1.js.map","sourceRoot":"../../../../"}
@@ -1 +0,0 @@
1
- {"mappings":"A,Q,gD,I,uB,Q,qB,uB,Q,qB,8B,Q,6B,S,uB,C,E,O,G,E,U,C,E,O,C,C,C,I,e,W,gB,C,E,c,C,E,c,e,iB,A,O,gB,A,C,c,S,C,E,G,K,gB,O,e,C,E,C,O,C,G,K,c,C,I,E,a,C,E,A,Q,a,C,E,C,I,E,C,G,E,Q,C,C,E,O,e,C,E,C,E,E,I,C,E,O,C,E,E,O,E,E,O,A,C,I,E,A,M,uB,E,I,O,E,I,C,mB,C,C,E,Q,C,S,C,C,C,E,a,C,E,C,C,E,e,iB,C,e,I,e,c,Q,C,O,c,SCMA,SAAS,8BAAQ,CAAK,EACpB,OAAO,AAAA,uBAAA,wBAAE,cAAe,CACtB,AAAA,uBAAA,wBAAE,oBAAqB,CACrB,AAAA,uBAAA,wBAAE,wBAAyB,CACzB,EAAM,IAAI,CAAC,IAAI,CACf,AAAA,uBAAA,wBAAE,uBAAwB,CAAC,EAAM,IAAI,CAAC,EACvC,EACF,EACD,AAAA,uBAAA,wBAAE,uBAAA,OAAM,EACR,EAAM,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,EAAS,IACzB,AAAA,uBAAA,wBAAE,OAAA,OAAM,CAAG,CAAE,IAAK,EAAG,KAAM,CAAQ,IAE7C,CACH,CASA,SAAS,+BAAS,CAAmB,EACnC,GAAM,CAAA,SAAE,CAAQ,CAAA,KAAE,CAAI,CAAA,UAAE,CAAS,CAAE,CAAG,EAItC,OAFiB,CAAQ,CAAC,EAAE,CAAC,OAAO,CAE7B,AAAA,uBAAA,wBACL,8BAAA,iBAAgB,CAChB,CACE,MAAO,EACP,SAAU,CACZ,EACA,CACE,EAAS,GAAG,CAAC,CAAC,EAAS,IACd,AAAA,uBAAA,wBAAE,OAAA,OAAM,CAAG,CAAE,IAAK,EAAG,KAAM,CAAQ,IAE7C,CAEL,CAEA,IAAA,yCAAe","sources":["<anon>","packages/map-interface/src/location-details/xdd-panel/Journal.tsx"],"sourcesContent":["require(\"./map-interface.9e6751ac.js\");\nvar $9Sepp$blueprintjscore = require(\"@blueprintjs/core\");\nvar $9Sepp$macrostrathyper = require(\"@macrostrat/hyper\");\nvar $9Sepp$macrostratmapinterface = require(\"@macrostrat/map-interface\");\n\n\nfunction $parcel$interopDefault(a) {\n return a && a.__esModule ? a.default : a;\n}\n\n var $parcel$global = globalThis;\n \nvar $parcel$modules = {};\nvar $parcel$inits = {};\n\nvar parcelRequire = $parcel$global[\"parcelRequirea149\"];\n\nif (parcelRequire == null) {\n parcelRequire = function(id) {\n if (id in $parcel$modules) {\n return $parcel$modules[id].exports;\n }\n if (id in $parcel$inits) {\n var init = $parcel$inits[id];\n delete $parcel$inits[id];\n var module = {id: id, exports: {}};\n $parcel$modules[id] = module;\n init.call(module.exports, module, module.exports);\n return module.exports;\n }\n var err = new Error(\"Cannot find module '\" + id + \"'\");\n err.code = 'MODULE_NOT_FOUND';\n throw err;\n };\n\n parcelRequire.register = function register(id, init) {\n $parcel$inits[id] = init;\n };\n\n $parcel$global[\"parcelRequirea149\"] = parcelRequire;\n}\n\nvar parcelRegister = parcelRequire.register;\n\nvar $9NWnl = parcelRequire(\"9NWnl\");\n\n\n\nfunction $eb1cce412d869334$var$Journal(props) {\n return (0, ($parcel$interopDefault($9Sepp$macrostrathyper)))(\"div.journal\", [\n (0, ($parcel$interopDefault($9Sepp$macrostrathyper)))(\"div.journal-title\", [\n (0, ($parcel$interopDefault($9Sepp$macrostrathyper)))(\"h2.journal-title-text\", [\n props.data.name,\n (0, ($parcel$interopDefault($9Sepp$macrostrathyper)))(\"small.journal-source\", [\n props.data\n ])\n ])\n ]),\n (0, ($parcel$interopDefault($9Sepp$macrostrathyper)))((0, $9Sepp$blueprintjscore.Divider)),\n props.data.articles.map((article, i)=>{\n return (0, ($parcel$interopDefault($9Sepp$macrostrathyper)))((0, $9NWnl.default), {\n key: i,\n data: article\n });\n })\n ]);\n}\n// Still up for review\nfunction $eb1cce412d869334$var$Journal_(props) {\n const { articles: articles, name: name, publisher: publisher } = props;\n const helpText = articles[0].pubname;\n return (0, ($parcel$interopDefault($9Sepp$macrostrathyper)))((0, $9Sepp$macrostratmapinterface.SubExpansionPanel), {\n title: name,\n helpText: publisher\n }, [\n articles.map((article, i)=>{\n return (0, ($parcel$interopDefault($9Sepp$macrostrathyper)))((0, $9NWnl.default), {\n key: i,\n data: article\n });\n })\n ]);\n}\nvar $eb1cce412d869334$export$2e2bcd8739ae039 = $eb1cce412d869334$var$Journal_;\n\n\n//# sourceMappingURL=map-interface.a50eb4e3.js.map\n","import Article from \"./Article\";\nimport { Divider } from \"@blueprintjs/core\";\nimport h from \"@macrostrat/hyper\";\nimport { SubExpansionPanel } from \"@macrostrat/map-interface\";\nimport { XDDSnippet } from \"./index\";\n\nfunction Journal(props) {\n return h(\"div.journal\", [\n h(\"div.journal-title\", [\n h(\"h2.journal-title-text\", [\n props.data.name,\n h(\"small.journal-source\", [props.data]),\n ]),\n ]),\n h(Divider),\n props.data.articles.map((article, i) => {\n return h(Article, { key: i, data: article });\n }),\n ]);\n}\n\ntype JournalProps = {\n articles: XDDSnippet[];\n name: string;\n publisher: string;\n};\n\n// Still up for review\nfunction Journal_(props: JournalProps) {\n const { articles, name, publisher } = props;\n\n const helpText = articles[0].pubname;\n\n return h(\n SubExpansionPanel,\n {\n title: name,\n helpText: publisher,\n },\n [\n articles.map((article, i) => {\n return h(Article, { key: i, data: article });\n }),\n ],\n );\n}\n\nexport default Journal_;\n"],"names":["require","$9Sepp$blueprintjscore","$9Sepp$macrostrathyper","$9Sepp$macrostratmapinterface","$parcel$interopDefault","a","__esModule","default","$parcel$global","globalThis","$parcel$modules","$parcel$inits","parcelRequire","id","exports","init","module","call","err","Error","code","register","parcelRegister","$9NWnl","$eb1cce412d869334$var$Journal","props","data","name","Divider","articles","map","article","i","key","$eb1cce412d869334$var$Journal_","publisher","pubname","SubExpansionPanel","title","helpText","$eb1cce412d869334$export$2e2bcd8739ae039"],"version":3,"file":"map-interface.a50eb4e3.js.map","sourceRoot":"../../../../"}