@eodash/eodash 5.0.0-processing → 5.0.0-rc.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.
Files changed (112) hide show
  1. package/core/client/asWebComponent.js +2 -3
  2. package/core/client/components/DashboardLayout.vue +35 -17
  3. package/core/client/components/Loading.vue +6 -9
  4. package/core/client/components/MobileLayout.vue +16 -14
  5. package/core/client/composables/DefineEodash.js +13 -3
  6. package/core/client/composables/DefineTemplate.js +67 -0
  7. package/core/client/composables/DefineWidgets.js +3 -2
  8. package/core/client/composables/EodashMap.js +23 -12
  9. package/core/client/composables/EodashProcess.js +10 -11
  10. package/core/client/composables/index.js +35 -10
  11. package/core/client/eodash.js +381 -139
  12. package/core/client/{utils/eodashSTAC.js → eodashSTAC/EodashCollection.js} +75 -42
  13. package/core/client/{utils → eodashSTAC}/createLayers.js +10 -8
  14. package/core/client/{utils → eodashSTAC}/helpers.js +45 -68
  15. package/core/client/eodashSTAC/triggers.js +43 -0
  16. package/core/client/plugins/vuetify.js +2 -1
  17. package/core/client/store/{Actions.js → actions.js} +16 -2
  18. package/core/client/store/index.js +4 -18
  19. package/core/client/store/stac.js +4 -4
  20. package/core/client/store/{States.js → states.js} +2 -0
  21. package/{dist/types/core/client/types.d.ts → core/client/types.ts} +47 -8
  22. package/core/client/utils/states.js +8 -3
  23. package/core/client/views/Dashboard.vue +6 -4
  24. package/core/client/vite-env.d.ts +1 -1
  25. package/dist/client/{DashboardLayout-CVMJ4l8M.js → DashboardLayout-FS5inBIm.js} +12 -15
  26. package/dist/client/{DynamicWebComponent-Cv8n457T.js → DynamicWebComponent-CBSgT677.js} +1 -1
  27. package/dist/client/{EodashDatePicker-VVkiPmpc.js → EodashDatePicker-BGSS2ZYK.js} +75 -163
  28. package/dist/client/EodashItemFilter-CFNKjm_Z.js +151 -0
  29. package/dist/client/{EodashLayerControl-53WghA8G.js → EodashLayerControl-CzffoPUs.js} +17 -7
  30. package/dist/client/EodashLayoutSwitcher-DM0zDhvI.js +52 -0
  31. package/dist/client/{EodashMap-CQnOePpy.js → EodashMap-BdFZ657e.js} +101 -38
  32. package/dist/client/EodashMapBtns-rC_IPD-Z.js +107 -0
  33. package/dist/client/EodashProcess-SLsTISKV.js +714 -0
  34. package/dist/client/EodashStacInfo-DFD0gtWm.js +85 -0
  35. package/dist/client/EodashTools-ImohD2ys.js +103 -0
  36. package/dist/client/{ExportState-BT8MLAW7.js → ExportState-LNZAovzM.js} +13 -13
  37. package/dist/client/{Footer-C6GUG84G.js → Footer-c19dV1ZR.js} +1 -1
  38. package/dist/client/{Header-D2dtCWp8.js → Header-CcvXFqqt.js} +3 -3
  39. package/dist/client/{MobileLayout-BAo8Wr8T.js → MobileLayout-OM6Wc-vj.js} +28 -31
  40. package/dist/client/{PopUp-Bm01q7Ko.js → PopUp-B0_c0207.js} +29 -8
  41. package/dist/client/{VImg-B8AbetCE.js → VImg-BpDhCbL0.js} +2 -2
  42. package/dist/client/{VMain-DnGlQUyr.js → VMain-DC05bDwX.js} +1 -1
  43. package/dist/client/{VOverlay-B8Qj7LRG.js → VOverlay-C7EUyVe_.js} +3 -3
  44. package/dist/client/VTooltip-C78suika.js +86 -0
  45. package/dist/client/{WidgetsContainer-CwXRRLS1.js → WidgetsContainer-sD1vDnhF.js} +1 -1
  46. package/dist/client/{asWebComponent-DUUoR7MZ.js → asWebComponent-D8bMMCEr.js} +1374 -1052
  47. package/dist/client/{style.css → eo-dash.css} +1 -1
  48. package/dist/client/eo-dash.js +1 -1
  49. package/dist/client/{forwardRefs-CZJhEAKW.js → forwardRefs-yw6tFXER.js} +1 -1
  50. package/dist/client/{index-DlIO7sJ3.js → index-CpK_Yaom.js} +1 -1
  51. package/dist/client/{transition-BiR8wMn1.js → transition-B2YwqAYJ.js} +1 -1
  52. package/dist/node/cli.js +2 -2
  53. package/package.json +48 -37
  54. package/widgets/EodashDatePicker.vue +68 -54
  55. package/widgets/EodashItemFilter.vue +60 -105
  56. package/widgets/EodashLayerControl.vue +17 -4
  57. package/widgets/EodashLayoutSwitcher.vue +36 -0
  58. package/widgets/EodashMap.vue +26 -27
  59. package/widgets/EodashMapBtns.vue +41 -4
  60. package/widgets/EodashProcess.vue +4 -12
  61. package/widgets/EodashStacInfo.vue +82 -0
  62. package/widgets/EodashTools.vue +83 -0
  63. package/widgets/ExportState.vue +12 -12
  64. package/widgets/PopUp.vue +24 -2
  65. package/core/client/asWebComponent.d.ts +0 -23
  66. package/core/client/types.d.ts +0 -279
  67. package/dist/client/EodashItemFilter-CugWNQ86.js +0 -194
  68. package/dist/client/EodashMapBtns-uaRwFtfB.js +0 -66
  69. package/dist/client/EodashProcess-cF0unIy8.js +0 -1477
  70. package/dist/types/core/client/App.vue.d.ts +0 -7
  71. package/dist/types/core/client/asWebComponent.d.ts +0 -9
  72. package/dist/types/core/client/components/DashboardLayout.vue.d.ts +0 -2
  73. package/dist/types/core/client/components/DynamicWebComponent.vue.d.ts +0 -18
  74. package/dist/types/core/client/components/ErrorAlert.vue.d.ts +0 -2
  75. package/dist/types/core/client/components/Footer.vue.d.ts +0 -2
  76. package/dist/types/core/client/components/Header.vue.d.ts +0 -2
  77. package/dist/types/core/client/components/IframeWrapper.vue.d.ts +0 -7
  78. package/dist/types/core/client/components/Loading.vue.d.ts +0 -2
  79. package/dist/types/core/client/components/MobileLayout.vue.d.ts +0 -2
  80. package/dist/types/core/client/composables/DefineEodash.d.ts +0 -2
  81. package/dist/types/core/client/composables/DefineTemplate.d.ts +0 -15
  82. package/dist/types/core/client/composables/DefineWidgets.d.ts +0 -14
  83. package/dist/types/core/client/composables/EodashMap.d.ts +0 -5
  84. package/dist/types/core/client/composables/index.d.ts +0 -30
  85. package/dist/types/core/client/eodash.d.ts +0 -8
  86. package/dist/types/core/client/main.d.ts +0 -2
  87. package/dist/types/core/client/plugins/axios.d.ts +0 -2
  88. package/dist/types/core/client/plugins/index.d.ts +0 -3
  89. package/dist/types/core/client/plugins/vuetify.d.ts +0 -82
  90. package/dist/types/core/client/render.d.ts +0 -1
  91. package/dist/types/core/client/store/Actions.d.ts +0 -12
  92. package/dist/types/core/client/store/States.d.ts +0 -22
  93. package/dist/types/core/client/store/index.d.ts +0 -2
  94. package/dist/types/core/client/store/stac.d.ts +0 -25
  95. package/dist/types/core/client/utils/createLayers.d.ts +0 -45
  96. package/dist/types/core/client/utils/eodashSTAC.d.ts +0 -82
  97. package/dist/types/core/client/utils/helpers.d.ts +0 -84
  98. package/dist/types/core/client/utils/index.d.ts +0 -2
  99. package/dist/types/core/client/utils/keys.d.ts +0 -6
  100. package/dist/types/core/client/utils/states.d.ts +0 -14
  101. package/dist/types/core/client/views/Dashboard.vue.d.ts +0 -9
  102. package/dist/types/widgets/EodashDatePicker.vue.d.ts +0 -7
  103. package/dist/types/widgets/EodashItemFilter.vue.d.ts +0 -42
  104. package/dist/types/widgets/EodashLayerControl.vue.d.ts +0 -11
  105. package/dist/types/widgets/EodashLayoutSwitcher.vue.d.ts +0 -9
  106. package/dist/types/widgets/EodashMap.vue.d.ts +0 -7
  107. package/dist/types/widgets/EodashMapBtns.vue.d.ts +0 -11
  108. package/dist/types/widgets/EodashStacInfo.vue.d.ts +0 -21
  109. package/dist/types/widgets/EodashTools.vue.d.ts +0 -15
  110. package/dist/types/widgets/ExportState.vue.d.ts +0 -7
  111. package/dist/types/widgets/PopUp.vue.d.ts +0 -22
  112. package/dist/types/widgets/WidgetsContainer.vue.d.ts +0 -7
@@ -1,2 +1,2 @@
1
- export { aQ as Eodash, aR as register, aS as store } from './asWebComponent-DUUoR7MZ.js';
1
+ export { aW as EodashConstructor, aX as register, aY as store } from './asWebComponent-D8bMMCEr.js';
2
2
  import 'vue';
@@ -1,5 +1,5 @@
1
1
  import { shallowRef, computed, watch } from 'vue';
2
- import { p as propsFactory, aC as getCurrentInstance } from './asWebComponent-DUUoR7MZ.js';
2
+ import { p as propsFactory, aH as getCurrentInstance } from './asWebComponent-D8bMMCEr.js';
3
3
 
4
4
  class Box {
5
5
  constructor(_ref) {
@@ -1,5 +1,5 @@
1
1
  import { TransitionGroup, Transition, h, camelize } from 'vue';
2
- import { g as genericComponent, p as propsFactory } from './asWebComponent-DUUoR7MZ.js';
2
+ import { g as genericComponent, p as propsFactory } from './asWebComponent-D8bMMCEr.js';
3
3
 
4
4
  // Utilities
5
5
  const makeTransitionProps = propsFactory({
@@ -1,5 +1,5 @@
1
1
  import { h, mergeProps, TransitionGroup, Transition } from 'vue';
2
- import { p as propsFactory } from './asWebComponent-DUUoR7MZ.js';
2
+ import { p as propsFactory } from './asWebComponent-D8bMMCEr.js';
3
3
 
4
4
  // Utilities
5
5
  const makeTransitionProps = propsFactory({
package/dist/node/cli.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{createLogger as S,defineConfig as w,searchForWorkspaceRoot as W,mergeConfig as F,createServer as O,preview as U,build as N}from"vite";import{readFileSync as y,existsSync as u}from"fs";import t from"path";import{Command as E}from"commander";import{fileURLToPath as I}from"url";import{readFile as L,writeFile as T,rm as $,cp as A}from"fs/promises";import H from"@vitejs/plugin-vue";import M,{transformAssetUrls as J}from"vite-plugin-vuetify";const h=new E("eodash"),c=b(),s=b(process.cwd());JSON.parse(y(t.join(s,"package.json"),"utf-8"));const j=JSON.parse(y(t.join(c,"package.json"),"utf-8"))??{},R=["commander","vite","@vitejs/plugin-vue","vite-plugin-vuetify","axios"],V=Object.keys(j?.dependencies).filter(e=>!R.includes(e));h.version(j.version,"-v, --version","output the current version"),h.option("--publicDir <path>","path to statically served assets folder").option("--no-publicDir","stop serving static assets").option("--outDir <path>","minified output folder").option("-e, --entryPoint <path>","file exporting `createEodash`").option("-w, --widgets <path>","folder that contains vue components as internal widgets").option("--cacheDir <path>","cache folder").option("-r, --runtime <path>","file exporting eodash client runtime config").option("-b, --base <path>","base public path").option("-p, --port <port>","serving port").option("-o, --open","open default browser when the server starts").option("-c, --config <path>","path to eodash server and build configuration file").option("--host [IP address]","specify which IP addresses the server should listen on").option("-l, --lib","builds eodash as a web component library").option("--no-lib","builds eodash as an SPA").option("--no-host","do not expose server to the network").parse(process.argv);const i=await B(h.opts(),process.argv?.[2]),z=i.publicDir?t.resolve(s,i.publicDir):t.join(s,"./public"),f=t.join(s,"/src"),p=i.runtime?t.resolve(s,i.runtime):t.join(f,"./runtime.js"),m=i.entryPoint?t.resolve(s,i.entryPoint):t.join(f,"/main.js"),D=i.widgets?t.resolve(s,i.widgets):t.join(f,"widgets"),x=t.join(s,"/.eodash"),v=i.outDir?t.resolve(s,i.outDir):t.join(x,"/dist"),Y=i.cacheDir?t.resolve(s,i.cacheDir):t.join(x,"cache"),g=S(void 0,{prefix:"[eodash]"});async function B(e,a){let r=e.config?t.resolve(s,e.config):t.join(s,"eodash.config.js"),o={};return u(r)?o=await import(r).then(n=>n.default instanceof Function?n.default():n.default).catch(n=>{console.error(n)}):r=null,{base:e.base??o?.base,port:Number(e.port??o?.[a]?.port),host:e.host??o?.[a]?.host,open:e.open??o?.[a]?.open,cacheDir:e.cacheDir??o?.cacheDir,entryPoint:e.entryPoint??o?.entryPoint,outDir:e.outDir??o?.outDir,publicDir:e.publicDir??o?.publicDir,runtime:e.runtime??o?.runtime,widgets:e.widgets??o?.widgets,lib:e.lib??o?.lib,vite:o.vite}}function b(e=import.meta.dirname??t.dirname(I(import.meta.url))){if(e?.split("/").length)return u(t.resolve(e,"package.json"))?e:b(t.resolve(e,".."));throw new Error("no package root found from "+e)}const P=`
2
+ import{createLogger as S,defineConfig as w,searchForWorkspaceRoot as W,mergeConfig as F,createServer as O,preview as U,build as N}from"vite";import{readFileSync as y,existsSync as u}from"fs";import t from"path";import{Command as E}from"commander";import{fileURLToPath as I}from"url";import{readFile as L,writeFile as T,rm as $,cp as A}from"fs/promises";import H from"@vitejs/plugin-vue";import M,{transformAssetUrls as J}from"vite-plugin-vuetify";const h=new E("eodash"),c=b(),s=b(process.cwd());JSON.parse(y(t.join(s,"package.json"),"utf-8"));const j=JSON.parse(y(t.join(c,"package.json"),"utf-8"))??{},R=["commander","vite","@vitejs/plugin-vue","vite-plugin-vuetify","axios"],V=Object.keys(j?.dependencies).filter(e=>!R.includes(e));h.version(j.version,"-v, --version","output the current version"),h.option("--publicDir <path>","path to statically served assets folder").option("--no-publicDir","stop serving static assets").option("--outDir <path>","minified output folder").option("-e, --entryPoint <path>","file exporting `createEodash`").option("-w, --widgets <path>","folder that contains vue components as internal widgets").option("--cacheDir <path>","cache folder").option("-r, --runtime <path>","file exporting eodash client runtime config").option("-b, --base <path>","base public path").option("-p, --port <port>","serving port").option("-o, --open","open default browser when the server starts").option("-c, --config <path>","path to eodash server and build configuration file").option("--host [IP address]","specify which IP addresses the server should listen on").option("-l, --lib","builds eodash as a web component library").option("--no-lib","builds eodash as an SPA").option("--no-host","do not expose server to the network").parse(process.argv);const i=await B(h.opts(),process.argv?.[2]),z=i.publicDir?t.resolve(s,i.publicDir):t.join(s,"./public"),m=t.join(s,"/src"),p=i.runtime?t.resolve(s,i.runtime):t.join(m,"./runtime.js"),f=i.entryPoint?t.resolve(s,i.entryPoint):t.join(m,"/main.js"),D=i.widgets?t.resolve(s,i.widgets):t.join(m,"widgets"),x=t.join(s,"/.eodash"),v=i.outDir?t.resolve(s,i.outDir):t.join(x,"/dist"),Y=i.cacheDir?t.resolve(s,i.cacheDir):t.join(x,"cache"),g=S(void 0,{prefix:"[eodash]"});async function B(e,a){let r=e.config?t.resolve(s,e.config):t.join(s,"eodash.config.js"),o={};return u(r)?o=await import(r).then(n=>n.default instanceof Function?n.default():n.default).catch(n=>{console.error(n)}):r=null,{base:e.base??o?.base,port:Number(e.port??o?.[a]?.port),host:e.host??o?.[a]?.host,open:e.open??o?.[a]?.open,cacheDir:e.cacheDir??o?.cacheDir,entryPoint:e.entryPoint??o?.entryPoint,outDir:e.outDir??o?.outDir,publicDir:e.publicDir??o?.publicDir,runtime:e.runtime??o?.runtime,widgets:e.widgets??o?.widgets,lib:e.lib??o?.lib,vite:o.vite}}function b(e=import.meta.dirname??t.dirname(I(import.meta.url))){if(e?.split("/").length)return u(t.resolve(e,"package.json"))?e:b(t.resolve(e,".."));throw new Error("no package root found from "+e)}const P=`
3
3
  <!DOCTYPE html>
4
4
  <html lang="en" style="overflow: hidden">
5
5
 
@@ -17,4 +17,4 @@ ${i.lib?`<eo-dash style="height:100dvh;"/>
17
17
  <script type="module" src="${t.resolve(`/@fs/${c}`,"core/client/render.js")}"><\/script>
18
18
  `}
19
19
  </body>
20
- </html>`,C=w(async({mode:e,command:a})=>({base:i.base??"",cacheDir:Y,plugins:[H({template:{transformAssetUrls:J,compilerOptions:{isCustomElement:r=>!r.includes("v-")&&r.includes("-")}}}),M({autoImport:!0}),e==="development"&&{name:"inject-html",configureServer:G}],customLogger:g,define:{"process.env":{}},resolve:{alias:{"@":t.join(c,"core/client"),"^":t.join(c,"widgets"),"user:config":m,"user:widgets":D},extensions:[".js",".json",".jsx",".mjs",".ts",".tsx",".vue"]},server:{warmup:{clientFiles:[t.join(c,"core/client/**"),m]},port:i.port??3e3,open:i.open,fs:{allow:[W(process.cwd())]},host:i.host},root:c,...e==="development"&&{optimizeDeps:{include:["webfontloader","vuetify","vue","pinia","stac-js","urijs","loglevel","vega","vega-lite","vega-embed","@eox/map","@eox/map/src/plugins/advancedLayersAndSources","@eox/drawtools","@eox/jsonform","@eox/chart","@eox/layercontrol","@eox/itemfilter","@eox/timecontrol","@eox/stacinfo"],noDiscovery:!0}},publicDir:i.publicDir===!1?!1:z,build:{outDir:v,emptyOutDir:!0,target:"esnext",cssMinify:!0,...i.lib&&a==="build"&&{minify:!1,lib:{entry:t.join(c,"core/client/asWebComponent.js"),fileName:"eo-dash",formats:["es"],name:"@eodash/eodash"},rollupOptions:{input:t.join(c,"core/client/asWebComponent.js"),external:r=>{const o=r.includes("vuetify")||r.endsWith(".css")||r.endsWith("styles"),n=V.some(l=>r.startsWith(l));return!o&&n}}}}})),k=w(async e=>i.vite?F(await C(e),i.vite):C(e));async function G(e){e.watcher.add([m,p,t.join(D,"**/*.vue")]);let a="";const r=g.info;return g.info=(o,n)=>{if(o.includes("core")){const l=o.split("/")[0].split(" ");l.pop();const d=l.join(" ")+" "+a.replace(s,"");return r(d,n)}return r(o,n)},e.watcher.on("change",async o=>{a=o,o===p&&e.ws.send({type:"full-reload",path:o})}),()=>{e.middlewares.use(async(o,n,l)=>{if(o.originalUrl==="/@fs/config.js"||o.originalUrl==="/config.js"){n.statusCode=200,n.setHeader("Content-Type","text/javascript"),u(p)&&await L(p).then(d=>{n.write(d)}),n.end();return}if(o.url?.endsWith(".html")){n.statusCode=200,n.setHeader("Content-Type","text/html");const d=await e.transformIndexHtml(o.url,P,o.originalUrl);n.end(d);return}l()})}}const K=async()=>{const e=await O(await k({mode:"development",command:"serve"}));await e.listen(),e.printUrls(),e.bindCLIShortcuts({print:!0})},Q=async()=>{const e=async()=>{const a=await k({mode:"production",command:"build"});await N(a),u(p)&&await A(p,t.join(v,"config.js"),{recursive:!0}).catch(r=>{console.error(r)})};if(i.lib)await e();else{const a=t.join(c,"/index.html");await T(a,P).then(async()=>{await e(),await $(a).catch(()=>{console.error("failed to remove index.html")})})}};async function X(){(await U({root:s,base:i.base??"",preview:{port:isNaN(i.port)?8080:i.port,open:i.open,host:i.host},build:{outDir:v}})).printUrls()}const Z=process.argv?.[2];(async()=>{switch(Z){case"dev":await K();break;case"build":await Q();break;case"preview":await X();break;default:console.error("command not found");break}})();
20
+ </html>`,C=w(async({mode:e,command:a})=>({base:i.base??"",cacheDir:Y,plugins:[H({template:{transformAssetUrls:J,compilerOptions:{isCustomElement:r=>!r.includes("v-")&&r.includes("-")}}}),M({autoImport:!0}),e==="development"&&{name:"inject-html",configureServer:G}],customLogger:g,define:{"process.env":{}},resolve:{alias:{"@":t.join(c,"core/client"),"^":t.join(c,"widgets"),"user:config":f,"user:widgets":D},extensions:[".js",".json",".jsx",".mjs",".ts",".tsx",".vue"]},server:{warmup:{clientFiles:[t.join(c,"core/client/**"),f]},port:i.port??3e3,open:i.open,fs:{allow:[W(process.cwd())]},host:i.host},root:c,...e==="development"&&{optimizeDeps:{include:["webfontloader","vuetify","vue","pinia","stac-js","urijs","loglevel","vega","vega-lite","vega-embed","@eox/map","@eox/map/src/plugins/advancedLayersAndSources","@eox/layercontrol","@eox/drawtools","@eox/chart","@eox/jsonform","@eox/layout","@eox/itemfilter","@eox/timecontrol","@eox/stacinfo","color-legend-element"],noDiscovery:!0}},publicDir:i.publicDir===!1?!1:z,build:{outDir:v,emptyOutDir:!0,target:"esnext",cssMinify:!0,...i.lib&&a==="build"&&{minify:!1,lib:{entry:t.join(c,"core/client/asWebComponent.js"),fileName:"eo-dash",formats:["es"],name:"@eodash/eodash"},rollupOptions:{input:t.join(c,"core/client/asWebComponent.js"),external:r=>{const o=r.includes("vuetify")||r.endsWith(".css")||r.endsWith("styles"),n=V.some(l=>r.startsWith(l));return!o&&n}}}}})),k=w(async e=>i.vite?F(await C(e),i.vite):C(e));async function G(e){e.watcher.add([f,p,t.join(D,"**/*.vue")]);let a="";const r=g.info;return g.info=(o,n)=>{if(o.includes("core")){const l=o.split("/")[0].split(" ");l.pop();const d=l.join(" ")+" "+a.replace(s,"");return r(d,n)}return r(o,n)},e.watcher.on("change",async o=>{a=o,o===p&&e.ws.send({type:"full-reload",path:o})}),()=>{e.middlewares.use(async(o,n,l)=>{if(o.originalUrl==="/@fs/config.js"||o.originalUrl==="/config.js"){n.statusCode=200,n.setHeader("Content-Type","text/javascript"),u(p)&&await L(p).then(d=>{n.write(d)}),n.end();return}if(o.url?.endsWith(".html")){n.statusCode=200,n.setHeader("Content-Type","text/html");const d=await e.transformIndexHtml(o.url,P,o.originalUrl);n.end(d);return}l()})}}const K=async()=>{const e=await O(await k({mode:"development",command:"serve"}));await e.listen(),e.printUrls(),e.bindCLIShortcuts({print:!0})},Q=async()=>{const e=async()=>{const a=await k({mode:"production",command:"build"});await N(a),u(p)&&await A(p,t.join(v,"config.js"),{recursive:!0}).catch(r=>{console.error(r)})};if(i.lib)await e();else{const a=t.join(c,"/index.html");await T(a,P).then(async()=>{await e(),await $(a).catch(()=>{console.error("failed to remove index.html")})})}};async function X(){(await U({root:s,base:i.base??"",preview:{port:isNaN(i.port)?8080:i.port,open:i.open,host:i.host},build:{outDir:v}})).printUrls()}const Z=process.argv?.[2];(async()=>{switch(Z){case"dev":await K();break;case"build":await Q();break;case"preview":await X();break;default:console.error("command not found");break}})();
package/package.json CHANGED
@@ -1,24 +1,35 @@
1
1
  {
2
2
  "name": "@eodash/eodash",
3
- "version": "5.0.0-processing",
3
+ "version": "5.0.0-rc.1",
4
4
  "type": "module",
5
+ "types": "./dist/types/core/client/types.d.ts",
5
6
  "files": [
6
7
  "core/client",
7
8
  "widgets",
8
9
  "dist"
9
10
  ],
11
+ "typesVersions": {
12
+ "*": {
13
+ ".": [
14
+ "./dist/types/core/client/types.d.ts"
15
+ ],
16
+ "webcomponent": [
17
+ "./dist/types/core/client/asWebComponent.d.ts"
18
+ ],
19
+ "config": [
20
+ "./dist/node/types.d.ts"
21
+ ]
22
+ }
23
+ },
10
24
  "exports": {
11
25
  ".": {
12
- "types": "./dist/types/core/client/types.d.ts",
13
26
  "default": "./core/client/main.js"
14
27
  },
15
28
  "./webcomponent": {
16
- "types": "./dist/types/core/client/asWebComponent.d.ts",
17
29
  "default": "./dist/client/eo-dash.js"
18
30
  },
19
- "./webcomponent.css": "./dist/client/style.css",
31
+ "./webcomponent.css": "./dist/client/eo-dash.css",
20
32
  "./config": {
21
- "types": "./dist/node/types.d.ts",
22
33
  "default": "./dist/node/main.js"
23
34
  }
24
35
  },
@@ -32,7 +43,7 @@
32
43
  "build": "npx eodash build --entryPoint core/client/eodash.js",
33
44
  "build:lib": "npx eodash build --entryPoint core/client/eodash.js --lib --outDir dist/client",
34
45
  "build:cli": "rollup -c",
35
- "build:types": "vue-tsc --declaration --emitDeclarationOnly && cp -rf ./core/client/types.d.ts ./dist/types/core/client/types.d.ts && tsc-alias",
46
+ "build:types": "vue-tsc --declaration --emitDeclarationOnly && tsc-alias",
36
47
  "check": "vue-tsc --noEmit --skipLibCheck && eslint .",
37
48
  "format": "prettier . --write --ignore-unknown",
38
49
  "preview": "npx eodash preview",
@@ -49,61 +60,61 @@
49
60
  },
50
61
  "dependencies": {
51
62
  "@eox/chart": "^0.3.0",
52
- "@eox/drawtools": "^0.13.1",
53
- "@eox/itemfilter": "^1.6.2",
54
- "@eox/jsonform": "^0.11.0",
55
- "@eox/layercontrol": "^0.26.0",
63
+ "@eox/drawtools": "^0.13.2",
64
+ "@eox/itemfilter": "^1.7.0",
65
+ "@eox/jsonform": "0.11.3-dev.1734708668.0",
66
+ "@eox/layercontrol": "^0.28.0",
56
67
  "@eox/layout": "^0.3.0",
57
- "@eox/map": "^1.17.0",
68
+ "@eox/map": "^1.19.0",
58
69
  "@eox/stacinfo": "^0.6.0",
59
- "@eox/timecontrol": "^0.10.0",
70
+ "@eox/timecontrol": "^0.12.0",
60
71
  "@mdi/js": "^7.4.47",
61
- "@vitejs/plugin-vue": "^5.1.4",
62
- "@vueuse/core": "^11.1.0",
72
+ "@vitejs/plugin-vue": "^5.2.1",
73
+ "@vueuse/core": "^12.0.0",
63
74
  "animated-details": "gist:2912bb049fa906671807415eb0e87188",
64
- "axios": "^1.7.7",
75
+ "axios": "^1.7.9",
65
76
  "axios-cache-interceptor": "^1.6.2",
66
- "commander": "^12.1.0",
67
77
  "color-legend-element": "^1.3.0",
78
+ "commander": "^12.1.0",
68
79
  "core-js": "^3.39.0",
69
80
  "loglevel": "^1.9.2",
70
- "pinia": "^2.2.6",
71
- "sass": "^1.80.6",
81
+ "mustache": "^4.2.0",
82
+ "pinia": "^2.3.0",
83
+ "sass": "^1.83.0",
72
84
  "stac-js": "^0.0.9",
73
85
  "v-calendar": "3.0.0",
74
86
  "vega": "^5.30.0",
75
- "vega-embed": "^6.28.0",
76
- "vega-lite": "^5.21.0",
77
- "vite": "^5.4.10",
87
+ "vega-embed": "^6.29.0",
88
+ "vega-lite": "^5.23.0",
89
+ "vite": "^6.0.5",
78
90
  "vite-plugin-vuetify": "^2.0.4",
79
91
  "vue": "^3.5.0",
80
- "vuetify": "^3.7.4",
92
+ "vuetify": "^3.7.6",
81
93
  "webfontloader": "^1.6.28"
82
94
  },
83
95
  "devDependencies": {
84
- "@babel/types": "^7.26.0",
96
+ "@babel/types": "^7.26.3",
85
97
  "@eox/eslint-config": "^2.0.0",
86
98
  "@pinia/testing": "^0.1.7",
87
99
  "@types/mustache": "^4.2.5",
88
- "@types/node": "^22.9.0",
100
+ "@types/node": "^22.10.2",
89
101
  "@types/openlayers": "^4.6.23",
90
102
  "@types/webfontloader": "^1.6.38",
91
- "cypress": "^13.15.2",
92
- "eslint": "^9.14.0",
93
- "eslint-plugin-vue": "^9.30.0",
94
- "mustache": "^4.2.0",
95
- "prettier": "^3.3.3",
96
- "rollup": "^4.24.4",
103
+ "cypress": "^13.17.0",
104
+ "eslint": "^9.17.0",
105
+ "eslint-plugin-vue": "^9.32.0",
106
+ "prettier": "^3.4.2",
107
+ "rollup": "^4.28.1",
97
108
  "stac-ts": "^1.0.4",
98
109
  "terminate": "^2.8.0",
99
- "typedoc": "^0.27.0",
100
- "typedoc-plugin-markdown": "^4.2.10",
101
- "typedoc-plugin-vue": "^1.2.0",
102
- "typedoc-vitepress-theme": "^1.0.2",
103
- "typescript": "^5.6.3",
104
- "unplugin-fonts": "^1.1.1",
105
- "vitepress": "^1.5.0",
106
110
  "tsc-alias": "^1.8.10",
111
+ "typedoc": "^0.27.5",
112
+ "typedoc-plugin-markdown": "^4.3.3",
113
+ "typedoc-plugin-vue": "^1.3.0",
114
+ "typedoc-vitepress-theme": "^1.1.1",
115
+ "typescript": "^5.7.2",
116
+ "unplugin-fonts": "^1.3.1",
117
+ "vitepress": "^1.5.0",
107
118
  "vitest": "^1.6.0",
108
119
  "vue-tsc": "2.0.22"
109
120
  },
@@ -1,57 +1,59 @@
1
1
  <template>
2
- <VCDatePicker
3
- v-model.number="currentDate"
4
- :masks="masks"
5
- :attributes="attributes"
6
- >
7
- <template #default="{ inputValue, inputEvents }">
8
- <div
9
- class="flex rounded-lg border border-gray-300 dark:border-gray-600"
10
- style="margin: 2px"
11
- >
12
- <input
13
- :value="inputValue"
14
- v-on="inputEvents"
15
- style="margin: 1px"
16
- class="flex-grow px-1 py-1 bg-white dark:bg-gray-700"
17
- />
18
- </div>
19
- </template>
20
- <template #footer v-if="hintText">
21
- <div class="w-full px-4 pb-3" style="font-size: 12px">
22
- <span v-html="hintText" />
23
- </div>
24
- </template>
25
- </VCDatePicker>
26
- <v-row align="center" justify="center" style="margin-top: 6px">
27
- <v-btn
28
- style="padding: 0px; margin-right: 4px"
29
- density="compact"
30
- v-tooltip:bottom="'Set date to oldest available dataset'"
31
- @click="jumpDate(true)"
2
+ <div ref="rootRef" class="datePicker">
3
+ <VCDatePicker
4
+ v-model.number="currentDate"
5
+ :attributes="attributes"
6
+ :masks="masks"
7
+ expanded
8
+ class="bg-surface overflow-auto"
9
+ style="background-color: transparent; max-width: 100%"
32
10
  >
33
- <v-icon :icon="[mdiRayEndArrow]" />
34
- </v-btn>
35
- <v-btn
36
- style="padding: 0px; margin-left: 4px"
37
- density="compact"
38
- v-tooltip:bottom="'Set date to latest available dataset'"
39
- @click="jumpDate(false)"
40
- >
41
- <v-icon :icon="[mdiRayStartArrow]" />
42
- </v-btn>
43
- </v-row>
11
+ <template #footer>
12
+ <div class="d-flex flex-row align-center justify-center pb-1">
13
+ <v-btn
14
+ v-if="!hideArrows"
15
+ density="compact"
16
+ v-tooltip:bottom="'Set date to oldest available dataset'"
17
+ variant="text"
18
+ @click="jumpDate(true)"
19
+ >
20
+ <v-icon :icon="[mdiRayEndArrow]" />
21
+ </v-btn>
22
+ <div
23
+ class="flex rounded-lg border border-gray-300 dark:border-gray-600"
24
+ style="margin: 2px"
25
+ >
26
+ <input
27
+ v-if="!hideInputField"
28
+ :value="new Date(currentDate).toLocaleDateString()"
29
+ style="margin: 1px"
30
+ class="flex-grow px-1 py-1 dark:bg-gray-700"
31
+ />
32
+ </div>
33
+ <v-btn
34
+ v-if="!hideArrows"
35
+ density="compact"
36
+ variant="text"
37
+ v-tooltip:bottom="'Set date to latest available dataset'"
38
+ @click="jumpDate(false)"
39
+ >
40
+ <v-icon :icon="[mdiRayStartArrow]" />
41
+ </v-btn>
42
+ </div>
43
+ </template>
44
+ </VCDatePicker>
45
+ </div>
44
46
  </template>
45
47
  <script setup>
46
48
  import { DatePicker as VCDatePicker } from "v-calendar";
47
49
  import "v-calendar/style.css";
48
- import { watch, reactive, ref, customRef, onMounted } from "vue";
49
- import { storeToRefs } from "pinia";
50
+ import { watch, reactive, ref, customRef, toRef } from "vue";
50
51
  import { useSTAcStore } from "@/store/stac";
51
- import { datetime } from "@/store/States";
52
+ import { datetime } from "@/store/states";
52
53
  import { mdiRayStartArrow, mdiRayEndArrow } from "@mdi/js";
53
54
  import { eodashCollections } from "@/utils/states";
54
55
  import log from "loglevel";
56
+ import { makePanelTransparent } from "@/composables";
55
57
 
56
58
  // holds the number value of the datetime
57
59
  const currentDate = customRef((track, trigger) => ({
@@ -76,6 +78,14 @@ defineProps({
76
78
  type: String,
77
79
  default: null,
78
80
  },
81
+ hideArrows: {
82
+ type: Boolean,
83
+ default: false,
84
+ },
85
+ hideInputField: {
86
+ type: Boolean,
87
+ default: false,
88
+ },
79
89
  });
80
90
 
81
91
  /**
@@ -90,7 +100,10 @@ defineProps({
90
100
  */
91
101
  const attributes = reactive([]);
92
102
 
93
- const { selectedStac } = storeToRefs(useSTAcStore());
103
+ /** @type {import("vue").Ref<HTMLDivElement|null>} */
104
+ const rootRef = ref(null);
105
+
106
+ const selectedStac = toRef(useSTAcStore(), "selectedStac");
94
107
 
95
108
  watch(
96
109
  selectedStac,
@@ -169,21 +182,22 @@ function jumpDate(reverse) {
169
182
  }
170
183
  }
171
184
 
172
- // fixes calendar dispalcement on lib mode
173
- const transform = ref("");
174
- onMounted(() => {
175
- transform.value = document.querySelector("eo-dash")
176
- ? "translate3d(50px,-80px,0)"
177
- : "translate3d(0px,-80px,0)";
178
- });
185
+ makePanelTransparent(rootRef);
179
186
  </script>
180
187
  <style>
188
+ @media (min-width: 960px) {
189
+ .datePicker {
190
+ position: absolute;
191
+ bottom: 0;
192
+ width: 100%;
193
+ }
194
+ }
181
195
  .vc-day-content {
182
196
  color: #5e5e5e;
183
197
  font-weight: normal;
184
198
  }
185
199
 
186
- .vc-popover-content-wrapper {
187
- transform: v-bind("transform") !important;
200
+ .vc-highlight-content-solid {
201
+ color: white !important;
188
202
  }
189
203
  </style>
@@ -3,8 +3,9 @@
3
3
  class="fill-height"
4
4
  v-bind="config"
5
5
  ref="eoxItemFilter"
6
- style="overflow: auto"
6
+ style="overflow: auto; --background-color: none"
7
7
  @select="onSelect"
8
+ .items='store.stac?.filter((item) => item.rel === "child")'
8
9
  >
9
10
  <h4 slot="filterstitle" style="margin: 14px 8px">{{ filtersTitle }}</h4>
10
11
 
@@ -14,7 +15,11 @@
14
15
  <script setup>
15
16
  import { useSTAcStore } from "@/store/stac";
16
17
  import "@eox/itemfilter";
17
- import { onMounted, ref } from "vue";
18
+
19
+ import { computed, ref } from "vue";
20
+ import { useDisplay } from "vuetify/lib/framework.mjs";
21
+
22
+ const emit = defineEmits(["select"]);
18
23
 
19
24
  const props = defineProps({
20
25
  enableCompare: {
@@ -27,16 +32,31 @@ const props = defineProps({
27
32
  },
28
33
  resultsTitle: {
29
34
  type: String,
30
- default: "",
35
+ default: "Results",
31
36
  },
32
37
  titleProperty: {
33
38
  type: String,
34
39
  default: "title",
35
40
  },
36
-
37
41
  aggregateResults: {
38
42
  type: String,
39
- default: "themes",
43
+ default: undefined,
44
+ },
45
+ imageProperty: {
46
+ type: String,
47
+ default: "",
48
+ },
49
+ subTitleProperty: {
50
+ type: String,
51
+ default: "",
52
+ },
53
+ resultType: {
54
+ type: String,
55
+ default: "",
56
+ },
57
+ cssVars: {
58
+ type: [String, Object],
59
+ default: "",
40
60
  },
41
61
  enableHighlighting: { type: Boolean, default: true },
42
62
  expandMultipleFilters: { type: Boolean, default: true },
@@ -63,119 +83,54 @@ const props = defineProps({
63
83
  ],
64
84
  },
65
85
  });
66
- /** @param {any} evt*/
67
- const onSelect = async (evt) => {
68
- // reset the style of all compare buttons
69
- eoxItemFilter.value?.shadowRoot
70
- ?.querySelectorAll(".compareMapButton")
71
- .forEach((res) => res.setAttribute("style", defaultStyle));
72
- const item = /** @type {import('stac-ts').StacLink} */ evt.detail;
86
+ /**
87
+ * @param {import("stac-ts").StacLink} item
88
+ */
89
+ const selectIndicator = async (item) => {
73
90
  if (item) {
74
91
  // Reset compare stac to empty
75
92
  store.resetSelectedCompareSTAC();
76
93
  await store.loadSelectedSTAC(item.href);
94
+ emit("select", item);
77
95
  } else {
78
- // TODO: it is possible to unselect items now
79
- // we need to consider how to reset to "default"
80
- // if that happens here
96
+ store.selectedStac = null;
81
97
  }
82
98
  };
83
- const config = {
99
+ /**
100
+ * @param {import("stac-ts").StacLink} item
101
+ */
102
+ const selectCompareIndicator = (item) => {
103
+ if (item) {
104
+ store.loadSelectedCompareSTAC(item.href);
105
+ emit("select", item);
106
+ } else {
107
+ // TODO
108
+ }
109
+ };
110
+ /** @param {any} evt*/
111
+ const onSelect = async (evt) => {
112
+ const item = /** @type {import('stac-ts').StacLink} */ evt.detail;
113
+ if (props.enableCompare) {
114
+ selectCompareIndicator(item);
115
+ } else {
116
+ selectIndicator(item);
117
+ }
118
+ };
119
+ const { smAndDown } = useDisplay();
120
+ const config = computed(() => ({
84
121
  titleProperty: props.titleProperty,
85
- filterProperties: props.filterProperties,
86
- aggregateResults: props.aggregateResults,
87
122
  enableHighlighting: props.enableHighlighting,
88
123
  expandMultipleFilters: props.expandMultipleFilters,
89
124
  expandMultipleResults: props.expandMultipleResults,
90
- };
125
+ subTitleProperty: props.subTitleProperty,
126
+ resultType: props.resultType,
127
+ imageProperty: props.imageProperty,
128
+ aggregateResults: props.aggregateResults,
129
+ style: props.cssVars,
130
+ filterProperties: smAndDown.value ? "" : props.filterProperties,
131
+ }));
91
132
  /** @type {import("vue").Ref<HTMLElement & Record<string,any> | null>} */
92
133
  const eoxItemFilter = ref(null);
93
134
 
94
135
  const store = useSTAcStore();
95
-
96
- const defaultStyle =
97
- "float:right; height:15px; padding:4px; margin-top:-4px; background-color:white;";
98
- const highlightStyle =
99
- "float:right; height:15px; padding:4px; margin-top:-4px; background-color:#9bcaeb;";
100
-
101
- const injectCompareButtons = () => {
102
- setTimeout(() => {
103
- /** @type {any} */
104
- (eoxItemFilter.value)?.shadowRoot
105
- .querySelectorAll("details>summary")
106
- .forEach((/** @type {HTMLElement} */ el) =>
107
- el.setAttribute("style", "width: 100%"),
108
- );
109
- /** @type {any} */
110
- (eoxItemFilter.value)?.shadowRoot
111
- .querySelectorAll("details>div li")
112
- .forEach((/** @type {HTMLElement} */ res) => {
113
- let compareButton = document.createElement("button");
114
- compareButton.className = "compareMapButton";
115
- compareButton.dataset.id = res.children[0].id;
116
-
117
- compareButton.onclick = async (
118
- /** {Event & { currentTarget: HTMLElement }} */ evt,
119
- ) => {
120
- // reset the style of all compare buttons
121
- eoxItemFilter.value?.shadowRoot
122
- ?.querySelectorAll(".compareMapButton")
123
- .forEach((res) => {
124
- res.setAttribute("style", defaultStyle);
125
- });
126
- const currentTarget = /** @type {HTMLElement}*/ (evt.currentTarget);
127
- currentTarget?.setAttribute("style", highlightStyle);
128
- const selected = eoxItemFilter.value?.items.find(
129
- (/** @type {HTMLElement} */ it) =>
130
- it.id === currentTarget?.dataset.id,
131
- );
132
- if (selected) {
133
- await store.loadSelectedCompareSTAC(selected.href);
134
- }
135
- };
136
- compareButton.setAttribute("style", defaultStyle);
137
- const svgIcon = document.createElementNS(
138
- "http://www.w3.org/2000/svg",
139
- "svg",
140
- );
141
- const iconPath = document.createElementNS(
142
- "http://www.w3.org/2000/svg",
143
- "path",
144
- );
145
- svgIcon.setAttribute("width", "15");
146
- svgIcon.setAttribute("height", "15");
147
- svgIcon.setAttribute("viewBox", "0 0 24 24");
148
- iconPath.setAttribute(
149
- "d",
150
- "M19,3H14V5H19V18L14,12V21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3M10,18H5L10,12M10,3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H10V23H12V1H10V3Z",
151
- );
152
- svgIcon.appendChild(iconPath);
153
- compareButton.appendChild(svgIcon);
154
- res.append(compareButton);
155
- });
156
- }, 100);
157
- };
158
-
159
- onMounted(() => {
160
- const style = document.createElement("style");
161
- style.innerHTML = `
162
- section {
163
- margin: 0 !important;
164
- }
165
- section button#filter-reset {
166
- padding: 0 8px;
167
- top: 8px;
168
- right: 8px;
169
- }
170
- `;
171
- eoxItemFilter.value?.shadowRoot?.appendChild(style);
172
-
173
- // Only list child elements in list
174
- const items = store.stac?.filter((item) => item.rel === "child");
175
- /** @type {any} */
176
- (eoxItemFilter.value).items = items;
177
- if (props.enableCompare) {
178
- injectCompareButtons();
179
- }
180
- });
181
136
  </script>
@@ -2,24 +2,26 @@
2
2
  <span class="d-flex flex-column fill-height overflow-auto">
3
3
  <eox-layercontrol
4
4
  v-if="showControls"
5
+ v-bind="config"
5
6
  :for="mapElement"
6
- .tools="['datetime', 'info', 'config', 'legend', 'opacity']"
7
7
  @datetime:updated="debouncedHandleDateTime"
8
8
  class="fill-height"
9
9
  toolsAsList="true"
10
+ style="--eox-background-color: transparent"
10
11
  ref="eoxLayercontrol"
11
12
  />
12
13
  </span>
13
14
  </template>
14
15
  <script setup>
15
16
  import "@eox/layercontrol";
17
+
16
18
  import "@eox/jsonform";
17
19
  import "@eox/timecontrol";
18
20
  import "color-legend-element";
19
21
 
20
22
  import { computed, ref } from "vue";
21
- import { mapEl, mapCompareEl } from "@/store/States";
22
- import { getColFromLayer } from "@/utils/helpers";
23
+ import { mapEl, mapCompareEl } from "@/store/states";
24
+ import { getColFromLayer } from "@/eodashSTAC/helpers";
23
25
  import { eodashCollections, eodashCompareCollections } from "@/utils/states";
24
26
  import { storeToRefs } from "pinia";
25
27
  import { useSTAcStore } from "@/store/stac";
@@ -29,10 +31,21 @@ const props = defineProps({
29
31
  type: String,
30
32
  default: "first",
31
33
  },
34
+ tools: {
35
+ type: Array,
36
+ default: () => ["datetime", "info", "config", "legend", "opacity"],
37
+ },
38
+ cssVars: {
39
+ type: Object,
40
+ },
32
41
  });
33
42
 
34
- const { selectedCompareStac, selectedStac } = storeToRefs(useSTAcStore());
43
+ const config = {
44
+ tools: props.tools,
45
+ style: props.cssVars,
46
+ };
35
47
 
48
+ const { selectedCompareStac, selectedStac } = storeToRefs(useSTAcStore());
36
49
  const showControls = computed(() => {
37
50
  if (props.map === "second") {
38
51
  return mapCompareEl.value !== null && selectedCompareStac.value !== null;