@eodash/eodash 5.0.0-alpha.2.3 → 5.0.0-alpha.2.5

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 (91) hide show
  1. package/README.md +14 -5
  2. package/core/{SuspensedDashboard.ce.vue → client/SuspensedDashboard.ce.vue} +30 -16
  3. package/core/client/components/DashboardLayout.vue +59 -0
  4. package/core/{components → client/components}/ErrorAlert.vue +6 -1
  5. package/core/{components → client/components}/Footer.vue +6 -1
  6. package/core/{components → client/components}/Header.vue +6 -1
  7. package/core/{components → client/components}/IframeWrapper.vue +1 -1
  8. package/core/{components → client/components}/MobileLayout.vue +41 -10
  9. package/core/{composables → client/composables}/DefineEodash.js +2 -1
  10. package/core/{composables → client/composables}/DefineWidgets.js +14 -8
  11. package/core/{composables → client/composables}/index.js +18 -119
  12. package/core/{eodash.js → client/eodash.js} +38 -36
  13. package/core/{plugins → client/plugins}/index.js +3 -0
  14. package/core/{plugins → client/plugins}/vuetify.js +1 -1
  15. package/core/{types.d.ts → client/types.d.ts} +42 -85
  16. package/core/{utils → client/utils}/eodashSTAC.js +29 -25
  17. package/core/client/utils/index.js +32 -0
  18. package/core/{views → client/views}/Dashboard.vue +39 -10
  19. package/dist/client/DashboardLayout-BYROtP-7.js +156 -0
  20. package/dist/{DynamicWebComponent-CgDh2csQ.js → client/DynamicWebComponent-BQhxFPM0.js} +6 -6
  21. package/dist/client/EodashDatePicker-CFltnt5d.js +1194 -0
  22. package/dist/client/EodashItemFilter-DIBDAHcc.js +65 -0
  23. package/dist/{EodashMap-CyR-Ldpk.js → client/EodashMap-C6jJ2Lb_.js} +14337 -15676
  24. package/dist/client/Footer-BVIZms1S.js +115 -0
  25. package/dist/client/Header-TsTL1d2R.js +633 -0
  26. package/dist/{IframeWrapper-Csep3rMg.js → client/IframeWrapper-XKChM78a.js} +4 -4
  27. package/dist/client/MobileLayout-BlGcMQra.js +957 -0
  28. package/dist/{VMain-COrg6UtF.js → client/VMain-C9XV5Lyg.js} +8 -8
  29. package/dist/{WidgetsContainer-XA6_dKOm.js → client/WidgetsContainer-BQXHnZpa.js} +8 -8
  30. package/dist/client/asWebComponent-CbdGxelK.js +20188 -0
  31. package/dist/{decoder-kAoyGIq9-DjQanfeo.js → client/decoder-HRvnjnEI-CHAYOWhz.js} +1 -1
  32. package/dist/client/eo-dash.js +6 -0
  33. package/dist/{eox-map-BJ9SIixs.js → client/eox-map-C3DL31fp.js} +1882 -1809
  34. package/dist/client/eox-stacinfo-l7ALSV90.js +13969 -0
  35. package/dist/client/forwardRefs-CyCJOFsz.js +192 -0
  36. package/dist/client/http-ZWiLaAeR.js +1337 -0
  37. package/dist/{index-Cskxla5D.js → client/index-CabQjjQg.js} +43 -74
  38. package/dist/{lerc-C9VL9kri-O4muG-MO.js → client/lerc-_E46UbWQ-TxBH4OeK.js} +1 -1
  39. package/dist/{ssrBoot-DCCAW5xY.js → client/ssrBoot-DWJ-z4I-.js} +3 -3
  40. package/dist/{style.css → client/style.css} +2 -2
  41. package/dist/client/transition-BlLt41wg.js +34 -0
  42. package/dist/node/cli.js +20 -0
  43. package/dist/node/main.js +2 -0
  44. package/{bin → dist/node}/types.d.ts +2 -2
  45. package/package.json +22 -21
  46. package/widgets/EodashDatePicker.vue +89 -36
  47. package/widgets/EodashItemFilter.vue +30 -14
  48. package/bin/app.js +0 -22
  49. package/bin/cli.js +0 -62
  50. package/bin/main.js +0 -9
  51. package/bin/serverConfig.js +0 -165
  52. package/bin/utils.js +0 -103
  53. package/core/components/DashboardLayout.vue +0 -36
  54. package/core/utils/index.js +0 -28
  55. package/dist/DashboardLayout-lzEvtalW.js +0 -148
  56. package/dist/EodashDatePicker-bIyNUYaG.js +0 -1653
  57. package/dist/EodashItemFilter-CpgyrJRX.js +0 -51
  58. package/dist/Footer-C2sIHSym.js +0 -118
  59. package/dist/Header-DFz2BUnp.js +0 -605
  60. package/dist/MobileLayout-CXNJL_q6.js +0 -984
  61. package/dist/asWebComponent-fqvymeM-.js +0 -13092
  62. package/dist/eo-dash.js +0 -6
  63. package/dist/eox-stacinfo-B-YrT7Ug.js +0 -13698
  64. package/dist/forwardRefs-Bxeu9Obx.js +0 -142
  65. package/dist/index-Zv5eTiB6.js +0 -34
  66. /package/core/{App.vue → client/App.vue} +0 -0
  67. /package/core/{asWebComponent.d.ts → client/asWebComponent.d.ts} +0 -0
  68. /package/core/{asWebComponent.js → client/asWebComponent.js} +0 -0
  69. /package/core/{components → client/components}/DynamicWebComponent.vue +0 -0
  70. /package/core/{components → client/components}/Loading.vue +0 -0
  71. /package/core/{main.js → client/main.js} +0 -0
  72. /package/core/{render.js → client/render.js} +0 -0
  73. /package/core/{store → client/store}/Actions.js +0 -0
  74. /package/core/{store → client/store}/States.js +0 -0
  75. /package/core/{store → client/store}/index.js +0 -0
  76. /package/core/{store → client/store}/stac.js +0 -0
  77. /package/core/{utils → client/utils}/helpers.js +0 -0
  78. /package/core/{utils → client/utils}/keys.js +0 -0
  79. /package/core/{vite-env.d.ts → client/vite-env.d.ts} +0 -0
  80. /package/dist/{.gitkeep → client/.gitkeep} +0 -0
  81. /package/dist/{_commonjsHelpers-DaMA6jEr.js → client/_commonjsHelpers-DaMA6jEr.js} +0 -0
  82. /package/dist/{basedecoder-Qm25PwVp-CHo5Pomv.js → client/basedecoder-Qm25PwVp-CHo5Pomv.js} +0 -0
  83. /package/dist/{deflate-Be2Arps5-hDqMz3RA.js → client/deflate-Be2Arps5-hDqMz3RA.js} +0 -0
  84. /package/dist/{eox-itemfilter-DcQkRD2l.js → client/eox-itemfilter-DcQkRD2l.js} +0 -0
  85. /package/dist/{jpeg-DNfUpLwy-Fjan-04T.js → client/jpeg-DNfUpLwy-Fjan-04T.js} +0 -0
  86. /package/dist/{lzw-BOMhmEDy-Dboc93VO.js → client/lzw-BOMhmEDy-Dboc93VO.js} +0 -0
  87. /package/dist/{packbits-DaUD6MLm-Bu1PoTGa.js → client/packbits-DaUD6MLm-Bu1PoTGa.js} +0 -0
  88. /package/dist/{pako.esm-C3kYPGGQ-BMki8cQY.js → client/pako.esm-C3kYPGGQ-BMki8cQY.js} +0 -0
  89. /package/dist/{raw-CcGKjn8q-DFOt-i8n.js → client/raw-CcGKjn8q-DFOt-i8n.js} +0 -0
  90. /package/dist/{webfontloader-CyOFAuFB.js → client/webfontloader-CyOFAuFB.js} +0 -0
  91. /package/dist/{webimage-D2c098k3-DLj1LQxB.js → client/webimage-D2c098k3-DLj1LQxB.js} +0 -0
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
- }
@@ -1,36 +0,0 @@
1
- <template>
2
- <v-main>
3
- <eox-layout :gap="eodash.template.gap ?? 2">
4
- <eox-layout-item v-if="bgWidget.component" style="z-index: 0;" x="0" y="0" h="12" w="12">
5
- <Suspense suspensible>
6
- <component id="bg-widget" :is="bgWidget.component" v-bind="bgWidget.props" />
7
- </Suspense>
8
- </eox-layout-item>
9
- <template v-for="(config, idx) in widgetsConfig" :key="idx">
10
- <eox-layout-item v-if="importedWidgets[idx].value.component"
11
- style="position: relative; overflow: visible; z-index: 1; border-radius: 0px; background: rgb(var(--v-theme-surface))"
12
- :x="config.layout.x" :y="config.layout.y" :h="config.layout.h" :w="config.layout.w">
13
-
14
- <Suspense suspensible>
15
- <component :key="importedWidgets[idx].value.id" :is="importedWidgets[idx].value.component"
16
- v-bind="importedWidgets[idx].value.props" />
17
- </Suspense>
18
- </eox-layout-item>
19
- </template>
20
- </eox-layout>
21
- </v-main>
22
- </template>
23
- <script setup>
24
- import { eodashKey } from '@/utils/keys';
25
- import { inject } from 'vue';
26
- import { useDefineWidgets } from '@/composables/DefineWidgets'
27
- import '@eox/layout'
28
-
29
- const eodash = /** @type {import("@/types").Eodash} */ (inject(eodashKey))
30
-
31
- const [bgWidget] = useDefineWidgets([eodash.template?.background])
32
-
33
- const widgetsConfig = eodash.template?.widgets
34
-
35
- const importedWidgets = useDefineWidgets(widgetsConfig)
36
- </script>
@@ -1,28 +0,0 @@
1
- /**
2
- * loads font in the app using `webfontloader`
3
- * @param {string} [family="Roboto"]
4
- * @param {string} [link]
5
- * @returns {Promise<string>} - font family name
6
- * @see {@link "https://github.com/typekit/webfontloader "}
7
- */
8
- export const loadFont = async (family = "Roboto", link) => {
9
- const WebFontLoader = (await import('webfontloader')).default;
10
- if (link) {
11
- WebFontLoader.load({
12
- custom: {
13
- // Use FVD notation to include families https://github.com/typekit/fvd
14
- families: [family],
15
- // Path to stylesheet that defines font-face
16
- urls: [link],
17
- },
18
- });
19
- }
20
- else {
21
- WebFontLoader.load({
22
- google: {
23
- families: [family]
24
- }
25
- });
26
- }
27
- return family;
28
- };
@@ -1,148 +0,0 @@
1
- import { x, W as w, X as h, _ as e, $ as n, a0 as u, a9 as _, a2 as t, a5 as d, a1 as c, a3 as g, d as m, a4 as y, F as b, a6 as f } from "./asWebComponent-fqvymeM-.js";
2
- import { V as v } from "./VMain-COrg6UtF.js";
3
- class k extends HTMLElement {
4
- static get observedAttributes() {
5
- return ["gap"];
6
- }
7
- constructor() {
8
- super(), this.attachShadow({ mode: "open" }), this.render();
9
- }
10
- render() {
11
- this.shadowRoot.innerHTML = `
12
- <style>
13
- :host {
14
- display: grid;
15
- padding: ${this.getAttribute("gap") || 0}px;
16
- height: 100%;
17
- box-sizing: border-box;
18
- gap: ${this.getAttribute("gap") || "0"}px;
19
- grid-template-columns: repeat(12, 1fr);
20
- grid-template-rows: repeat(12, 1fr);
21
- }
22
- </style>
23
- <slot></slot>
24
- `;
25
- }
26
- attributeChangedCallback(a, o, s) {
27
- o !== s && (this[a] = s), this.render();
28
- }
29
- }
30
- class A extends HTMLElement {
31
- static get observedAttributes() {
32
- return ["x", "y", "w", "h"];
33
- }
34
- constructor() {
35
- super(), this.attachShadow({ mode: "open" }), this.render();
36
- }
37
- render() {
38
- this.shadowRoot.innerHTML = `
39
- <style>
40
- :host {
41
- background: lightgrey;
42
- border: 1px solid darkgrey;
43
- border-radius: 4px;
44
- padding: 4px 8px;
45
- overflow: hidden;
46
-
47
-
48
- grid-column: ${parseInt(this.getAttribute("x")) + 1} / span ${this.getAttribute("w")};
49
- grid-row: ${parseInt(this.getAttribute("y")) + 1} / span ${this.getAttribute("h")};
50
- }
51
- </style>
52
- <slot></slot>
53
- `;
54
- }
55
- attributeChangedCallback(a, o, s) {
56
- o !== s && (this[a] = s), this.render();
57
- }
58
- }
59
- customElements.define("eox-layout", k);
60
- customElements.define("eox-layout-item", A);
61
- const C = ["gap"], $ = {
62
- key: 0,
63
- style: { "z-index": "0" },
64
- x: "0",
65
- y: "0",
66
- h: "12",
67
- w: "12"
68
- }, L = ["x", "y", "h", "w"], T = {
69
- __name: "DashboardLayout",
70
- setup(p) {
71
- const a = (
72
- /** @type {import("@/types").Eodash} */
73
- x(w)
74
- ), [o] = h([a.template?.background]), s = a.template?.widgets, i = h(s);
75
- return (E, M) => (e(), n(v, null, {
76
- default: u(() => [
77
- _("eox-layout", {
78
- gap: t(a).template.gap ?? 2
79
- }, [
80
- t(o).component ? (e(), d("eox-layout-item", $, [
81
- (e(), n(c, { suspensible: "" }, {
82
- default: u(() => [
83
- (e(), n(
84
- g(t(o).component),
85
- m({ id: "bg-widget" }, t(o).props),
86
- null,
87
- 16
88
- /* FULL_PROPS */
89
- ))
90
- ]),
91
- _: 1
92
- /* STABLE */
93
- }))
94
- ])) : y("v-if", !0),
95
- (e(!0), d(
96
- b,
97
- null,
98
- f(t(s), (l, r) => (e(), d(
99
- b,
100
- { key: r },
101
- [
102
- t(i)[r].value.component ? (e(), d("eox-layout-item", {
103
- key: 0,
104
- style: { position: "relative", overflow: "visible", "z-index": "1", "border-radius": "0px", background: "rgb(var(--v-theme-surface))" },
105
- x: l.layout.x,
106
- y: l.layout.y,
107
- h: l.layout.h,
108
- w: l.layout.w
109
- }, [
110
- (e(), n(
111
- c,
112
- { suspensible: "" },
113
- {
114
- default: u(() => [
115
- (e(), n(
116
- g(t(i)[r].value.component),
117
- m({
118
- key: t(i)[r].value.id
119
- }, t(i)[r].value.props),
120
- null,
121
- 16
122
- /* FULL_PROPS */
123
- ))
124
- ]),
125
- _: 2
126
- /* DYNAMIC */
127
- },
128
- 1024
129
- /* DYNAMIC_SLOTS */
130
- ))
131
- ], 8, L)) : y("v-if", !0)
132
- ],
133
- 64
134
- /* STABLE_FRAGMENT */
135
- ))),
136
- 128
137
- /* KEYED_FRAGMENT */
138
- ))
139
- ], 8, C)
140
- ]),
141
- _: 1
142
- /* STABLE */
143
- }));
144
- }
145
- };
146
- export {
147
- T as default
148
- };