@eodash/eodash 5.0.0-alpha.2.3 → 5.0.0-alpha.2.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 (78) hide show
  1. package/README.md +2 -3
  2. package/core/{SuspensedDashboard.ce.vue → client/SuspensedDashboard.ce.vue} +33 -15
  3. package/core/{plugins → client/plugins}/vuetify.js +1 -1
  4. package/core/{types.d.ts → client/types.d.ts} +2 -2
  5. package/core/{views → client/views}/Dashboard.vue +22 -4
  6. package/dist/{DashboardLayout-lzEvtalW.js → client/DashboardLayout-ZaSRMD1M.js} +19 -18
  7. package/dist/{DynamicWebComponent-CgDh2csQ.js → client/DynamicWebComponent-C4Hotc4H.js} +1 -1
  8. package/dist/{EodashDatePicker-bIyNUYaG.js → client/EodashDatePicker-C4kKjxKy.js} +3 -3
  9. package/dist/{EodashItemFilter-CpgyrJRX.js → client/EodashItemFilter-cBHC0YEM.js} +2 -2
  10. package/dist/{EodashMap-CyR-Ldpk.js → client/EodashMap-CGrQjZ1P.js} +2490 -2496
  11. package/dist/{Footer-C2sIHSym.js → client/Footer-pS636dEP.js} +1 -1
  12. package/dist/{Header-DFz2BUnp.js → client/Header-DQuaLdjl.js} +16 -16
  13. package/dist/{IframeWrapper-Csep3rMg.js → client/IframeWrapper-Cg3GMmfW.js} +1 -1
  14. package/dist/{MobileLayout-CXNJL_q6.js → client/MobileLayout-BLXFBWI_.js} +97 -94
  15. package/dist/{VMain-COrg6UtF.js → client/VMain-BHYlmRic.js} +2 -2
  16. package/dist/{WidgetsContainer-XA6_dKOm.js → client/WidgetsContainer-dje9QSk0.js} +8 -8
  17. package/dist/{asWebComponent-fqvymeM-.js → client/asWebComponent-Bvb3xkxI.js} +5358 -5139
  18. package/dist/{decoder-kAoyGIq9-DjQanfeo.js → client/decoder-HRvnjnEI-BQ2rajuJ.js} +1 -1
  19. package/dist/client/eo-dash.js +6 -0
  20. package/dist/{eox-map-BJ9SIixs.js → client/eox-map-C3DL31fp.js} +1882 -1809
  21. package/dist/client/eox-stacinfo-l7ALSV90.js +13969 -0
  22. package/dist/{index-Cskxla5D.js → client/index-CaDDfJYE.js} +1 -1
  23. package/dist/{index-Zv5eTiB6.js → client/index-DlNICb3T.js} +10 -10
  24. package/dist/{lerc-C9VL9kri-O4muG-MO.js → client/lerc-_E46UbWQ-Beu35ovS.js} +1 -1
  25. package/dist/{ssrBoot-DCCAW5xY.js → client/ssrBoot-Dd7m-btU.js} +1 -1
  26. package/dist/{style.css → client/style.css} +1 -1
  27. package/dist/node/cli.js +20 -0
  28. package/dist/node/main.js +2 -0
  29. package/{bin → dist/node}/types.d.ts +2 -2
  30. package/package.json +20 -18
  31. package/widgets/EodashItemFilter.vue +1 -1
  32. package/bin/app.js +0 -22
  33. package/bin/cli.js +0 -62
  34. package/bin/main.js +0 -9
  35. package/bin/serverConfig.js +0 -165
  36. package/bin/utils.js +0 -103
  37. package/dist/eo-dash.js +0 -6
  38. package/dist/eox-stacinfo-B-YrT7Ug.js +0 -13698
  39. /package/core/{App.vue → client/App.vue} +0 -0
  40. /package/core/{asWebComponent.d.ts → client/asWebComponent.d.ts} +0 -0
  41. /package/core/{asWebComponent.js → client/asWebComponent.js} +0 -0
  42. /package/core/{components → client/components}/DashboardLayout.vue +0 -0
  43. /package/core/{components → client/components}/DynamicWebComponent.vue +0 -0
  44. /package/core/{components → client/components}/ErrorAlert.vue +0 -0
  45. /package/core/{components → client/components}/Footer.vue +0 -0
  46. /package/core/{components → client/components}/Header.vue +0 -0
  47. /package/core/{components → client/components}/IframeWrapper.vue +0 -0
  48. /package/core/{components → client/components}/Loading.vue +0 -0
  49. /package/core/{components → client/components}/MobileLayout.vue +0 -0
  50. /package/core/{composables → client/composables}/DefineEodash.js +0 -0
  51. /package/core/{composables → client/composables}/DefineWidgets.js +0 -0
  52. /package/core/{composables → client/composables}/index.js +0 -0
  53. /package/core/{eodash.js → client/eodash.js} +0 -0
  54. /package/core/{main.js → client/main.js} +0 -0
  55. /package/core/{plugins → client/plugins}/index.js +0 -0
  56. /package/core/{render.js → client/render.js} +0 -0
  57. /package/core/{store → client/store}/Actions.js +0 -0
  58. /package/core/{store → client/store}/States.js +0 -0
  59. /package/core/{store → client/store}/index.js +0 -0
  60. /package/core/{store → client/store}/stac.js +0 -0
  61. /package/core/{utils → client/utils}/eodashSTAC.js +0 -0
  62. /package/core/{utils → client/utils}/helpers.js +0 -0
  63. /package/core/{utils → client/utils}/index.js +0 -0
  64. /package/core/{utils → client/utils}/keys.js +0 -0
  65. /package/core/{vite-env.d.ts → client/vite-env.d.ts} +0 -0
  66. /package/dist/{.gitkeep → client/.gitkeep} +0 -0
  67. /package/dist/{_commonjsHelpers-DaMA6jEr.js → client/_commonjsHelpers-DaMA6jEr.js} +0 -0
  68. /package/dist/{basedecoder-Qm25PwVp-CHo5Pomv.js → client/basedecoder-Qm25PwVp-CHo5Pomv.js} +0 -0
  69. /package/dist/{deflate-Be2Arps5-hDqMz3RA.js → client/deflate-Be2Arps5-hDqMz3RA.js} +0 -0
  70. /package/dist/{eox-itemfilter-DcQkRD2l.js → client/eox-itemfilter-DcQkRD2l.js} +0 -0
  71. /package/dist/{forwardRefs-Bxeu9Obx.js → client/forwardRefs-Bxeu9Obx.js} +0 -0
  72. /package/dist/{jpeg-DNfUpLwy-Fjan-04T.js → client/jpeg-DNfUpLwy-Fjan-04T.js} +0 -0
  73. /package/dist/{lzw-BOMhmEDy-Dboc93VO.js → client/lzw-BOMhmEDy-Dboc93VO.js} +0 -0
  74. /package/dist/{packbits-DaUD6MLm-Bu1PoTGa.js → client/packbits-DaUD6MLm-Bu1PoTGa.js} +0 -0
  75. /package/dist/{pako.esm-C3kYPGGQ-BMki8cQY.js → client/pako.esm-C3kYPGGQ-BMki8cQY.js} +0 -0
  76. /package/dist/{raw-CcGKjn8q-DFOt-i8n.js → client/raw-CcGKjn8q-DFOt-i8n.js} +0 -0
  77. /package/dist/{webfontloader-CyOFAuFB.js → client/webfontloader-CyOFAuFB.js} +0 -0
  78. /package/dist/{webimage-D2c098k3-DLj1LQxB.js → client/webimage-D2c098k3-DLj1LQxB.js} +0 -0
@@ -1,165 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- import vue from '@vitejs/plugin-vue';
4
- import vuetify, { transformAssetUrls } from 'vite-plugin-vuetify';
5
- import { fileURLToPath, URL } from 'url';
6
- import {
7
- runtimeConfigPath,
8
- appPath, entryPath,
9
- cachePath, publicPath, userConfig,
10
- buildTargetPath,
11
- logger,
12
- rootPath,
13
- internalWidgetsPath
14
- } from "./utils.js";
15
- import { readFile } from "fs/promises";
16
- import { defineConfig, searchForWorkspaceRoot } from "vite"
17
- import { existsSync } from 'fs';
18
- import path from "path";
19
-
20
- export const indexHtml = `
21
- <!DOCTYPE html>
22
- <html lang="en">
23
-
24
- <head>
25
- <meta charset="UTF-8" />
26
- <link rel="icon" href="/favicon.ico" />
27
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
28
- <title>Welcome to Eodash v5</title>
29
- </head>
30
-
31
- <body>
32
- ${userConfig.lib ? `<eo-dash style="height:100dvh;"/>
33
- <script type="module" src="${path.resolve(`/@fs/${appPath}`, `core/asWebComponent.js`)}"></script>
34
- `: ` <div id="app"/>
35
- <script type="module" src="${path.resolve(`/@fs/${appPath}`, `core/render.js`)}"></script>
36
- `}
37
- </body>
38
- </html>`
39
-
40
- //@ts-expect-error
41
- export const serverConfig = /** @type {import('vite').UserConfigFnPromise}*/(defineConfig(async ({ mode, command }) => {
42
- return {
43
- base: userConfig.base ?? '',
44
- cacheDir: cachePath,
45
- plugins: [
46
- vue({
47
- customElement: userConfig.lib,
48
- template: {
49
- transformAssetUrls,
50
- compilerOptions: {
51
- isCustomElement: (tag) => !tag.includes('v-') && tag.includes('-')
52
- }
53
- },
54
- }),
55
- // https://github.com/vuetifyjs/vuetify-loader/tree/master/packages/vite-plugin#readme
56
- vuetify({
57
- autoImport: true,
58
- }),
59
- (mode === "development" && {
60
- name: "inject-html",
61
- configureServer
62
- })
63
- ],
64
- customLogger: logger,
65
- define: { 'process.env': {} },
66
- resolve: {
67
- alias: {
68
- '@': fileURLToPath(new URL('../core', import.meta.url)),
69
- '^': fileURLToPath(new URL('../widgets', import.meta.url)),
70
- "user:config": entryPath,
71
- "user:widgets": internalWidgetsPath
72
- },
73
- extensions: ['.js', '.json', '.jsx', '.mjs', '.ts', '.tsx', '.vue'],
74
- },
75
- server: {
76
- warmup: {
77
- clientFiles: [path.join(appPath, "core/**")]
78
- },
79
- port: userConfig.port ?? 3000,
80
- open: userConfig.open,
81
- fs: {
82
- allow: [searchForWorkspaceRoot(process.cwd())]
83
- },
84
- host: userConfig.host
85
- },
86
- root: fileURLToPath(new URL('..', import.meta.url)),
87
- optimizeDeps: mode === "development" ? {
88
- include: ["webfontloader", "vuetify", "vue", "pinia", "stac-js", "urijs"],
89
- noDiscovery: true,
90
- } : {},
91
- /** @type {string|false} */
92
- publicDir: userConfig.publicDir === false ? false : publicPath,
93
- build: {
94
- lib: (mode === 'lib' && command === 'build') && {
95
- entry: path.join(appPath, "core/asWebComponent.js"),
96
- fileName: "eo-dash",
97
- formats: ["es"],
98
- name: "@eodash/eodash"
99
- },
100
- outDir: buildTargetPath,
101
- emptyOutDir: true,
102
- rollupOptions: command == 'build' ? {
103
- input: fileURLToPath(new URL(mode === 'lib' ? '../core/asWebComponent.js' : '../index.html', import.meta.url)),
104
- } : undefined,
105
- target: "esnext"
106
- }
107
- }
108
- }));
109
-
110
-
111
-
112
- /**
113
- * @type {import("vite").ServerHook}
114
- */
115
- async function configureServer(server) {
116
- server.watcher.add([entryPath, runtimeConfigPath, path.join(internalWidgetsPath, "**/*.vue")])
117
-
118
- let updatedPath = ''
119
- const loggerInfo = logger.info
120
- logger.info = (msg, options) => {
121
- if (msg.includes('core')) {
122
- const removedPath = msg.split('/')[0].split(" ")
123
- removedPath.pop()
124
- const updatedMsg = removedPath.join(" ") + " " + updatedPath.replace(rootPath, "")
125
-
126
- return loggerInfo(updatedMsg, options)
127
- }
128
- return loggerInfo(msg, options)
129
- }
130
-
131
- server.watcher.on('change', async (path) => {
132
- updatedPath = path
133
- if (path === runtimeConfigPath) {
134
- server.hot.send({
135
- type: 'full-reload',
136
- path: path
137
- })
138
- }
139
- })
140
-
141
- return () => {
142
- server.middlewares.use(async (req, res, next) => {
143
- if (req.originalUrl === '/@fs/config.js') {
144
- res.statusCode = 200
145
- res.setHeader('Content-Type', 'text/javascript')
146
- if (existsSync(runtimeConfigPath)) {
147
- await readFile(runtimeConfigPath).then(runtimeConfig => {
148
- res.write(runtimeConfig)
149
- })
150
- }
151
- res.end()
152
- return
153
- }
154
-
155
- if (req.url?.endsWith('.html')) {
156
- res.statusCode = 200
157
- res.setHeader('Content-Type', 'text/html')
158
- const html = await server.transformIndexHtml(req.url, indexHtml, req.originalUrl)
159
- res.end(html)
160
- return
161
- }
162
- next()
163
- })
164
- }
165
- }
package/bin/utils.js DELETED
@@ -1,103 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- import { existsSync, readFileSync } from 'fs';
4
- import path from 'path';
5
- import { fileURLToPath } from 'url';
6
- import { searchForWorkspaceRoot, createLogger } from 'vite';
7
- import { Command } from 'commander';
8
-
9
- export const rootPath = searchForWorkspaceRoot(process.cwd());
10
- const cli = new Command('eodash')
11
-
12
- const pkg = JSON.parse(
13
- readFileSync(
14
- path.join(rootPath, 'package.json')
15
- , 'utf-8')
16
- );
17
-
18
- /**
19
- * CLI flags object
20
- * @typedef {Object} Options
21
- * @property {string | false} publicDir
22
- * @property {string} outDir
23
- * @property {string} entryPoint
24
- * @property {string} widgets
25
- * @property {string} cacheDir
26
- * @property {string} runtime
27
- * @property {string} base
28
- * @property {string | number} port
29
- * @property {boolean} open
30
- * @property {boolean | string} host
31
- * @property {string} config
32
- * @property {boolean} lib
33
- */
34
- cli.version(pkg.version, '-v, --version', 'output the current version')
35
- .option('--publicDir <path>', 'path to statically served assets folder')
36
- .option('--no-publicDir', 'stop serving static assets')
37
- .option('--outDir <path>', 'minified output folder')
38
- .option('-e, --entryPoint <path>', 'file exporting `createEodash`')
39
- .option('-w, --widgets <path>', 'folder that contains vue components as internal widgets')
40
- .option('--cacheDir <path>', 'cache folder')
41
- .option('-r, --runtime <path>', 'file exporting eodash client runtime config')
42
- .option('-b, --base <path>', 'base public path')
43
- .option('-p, --port <port>', 'serving port')
44
- .option('-o, --open', 'open default browser when the server starts')
45
- .option('-c, --config <path>', 'path to eodash server and build configuration file')
46
- .option('--host [IP address]', 'specify which IP addresses the server should listen on')
47
- .option('-l, --lib', 'builds eodash as a web component library')
48
- .option('--no-lib', 'builds eodash as an SPA')
49
- .option('--no-host', 'do not expose server to the network')
50
- .parse(process.argv)
51
-
52
-
53
- export const userConfig = await getUserConfig(cli.opts(), process.argv?.[2])
54
-
55
- export const appPath = fileURLToPath(new URL("..", import.meta.url)),
56
- publicPath = userConfig.publicDir ? path.resolve(rootPath, userConfig.publicDir) : path.join(rootPath, './public'),
57
- srcPath = path.join(rootPath, "/src"),
58
- runtimeConfigPath = userConfig.runtime ? path.resolve(rootPath, userConfig.runtime) : path.join(srcPath, "./runtime.js"),
59
- entryPath = userConfig.entryPoint ? path.resolve(rootPath, userConfig.entryPoint) : path.join(srcPath, "/main.js"),
60
- internalWidgetsPath = userConfig.widgets ? path.resolve(rootPath, userConfig.widgets) : path.join(srcPath, "widgets"),
61
- dotEodashPath = path.join(rootPath, "/.eodash"),
62
- buildTargetPath = userConfig.outDir ? path.resolve(rootPath, userConfig.outDir) : path.join(dotEodashPath, '/dist'),
63
- cachePath = userConfig.cacheDir ? path.resolve(rootPath, userConfig.cacheDir) : path.join(dotEodashPath, 'cache');
64
-
65
-
66
- export const logger = createLogger(undefined, { prefix: '[eodash]' })
67
-
68
- /**
69
- * @param {Options} options
70
- * @param {string | undefined} command
71
- */
72
- async function getUserConfig(options, command) {
73
- let eodashCLiConfigFile = options.config ? path.resolve(rootPath, options.config) : path.join(rootPath, 'eodash.config.js');
74
- /** @type {import("./types").EodashConfig} */
75
- let config = {};
76
- if (existsSync(eodashCLiConfigFile)) {
77
- config = await import(eodashCLiConfigFile).then(config => {
78
- if (config.default instanceof Function) {
79
- return config.default()
80
- } else {
81
- return config.default
82
- }
83
- }).catch(err => {
84
- console.error(err);
85
- })
86
- } else {
87
- eodashCLiConfigFile = null
88
- }
89
-
90
- return {
91
- base: options.base ?? config?.base,
92
- port: Number(options.port ?? config?.[command]?.port),
93
- host: options.host ?? config?.[/**@type {"dev"|"preview"} */(command)]?.host,
94
- open: options.open ?? config?.[/**@type {"dev"|"preview"} */(command)]?.open,
95
- cacheDir: options.cacheDir ?? config?.cacheDir,
96
- entryPoint: options.entryPoint ?? config?.entryPoint,
97
- outDir: options.outDir ?? config?.outDir,
98
- publicDir: options.publicDir ?? config?.publicDir,
99
- runtime: options.runtime ?? config?.runtime,
100
- widgets: options.widgets ?? config?.widgets,
101
- lib: options.lib ?? config?.lib
102
- }
103
- }
package/dist/eo-dash.js DELETED
@@ -1,6 +0,0 @@
1
- import { b1 as a, b2 as e, b3 as o } from "./asWebComponent-fqvymeM-.js";
2
- export {
3
- a as Eodash,
4
- e as register,
5
- o as store
6
- };