@eodash/eodash 5.0.0-alpha.2.6 → 5.0.0-alpha.2.7

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 (38) hide show
  1. package/core/client/composables/DefineWidgets.js +1 -1
  2. package/core/client/composables/index.js +11 -0
  3. package/core/client/eodash.js +15 -2
  4. package/core/client/store/Actions.js +8 -0
  5. package/core/client/types.d.ts +6 -1
  6. package/core/client/utils/index.js +12 -0
  7. package/dist/client/{DashboardLayout-BuDcv6LM.js → DashboardLayout-Cbci3g7o.js} +2 -2
  8. package/dist/client/{DynamicWebComponent-BEP4rVce.js → DynamicWebComponent-DzmQ3Fr3.js} +2 -2
  9. package/dist/client/EodashDatePicker-SP5bYISd.js +252 -0
  10. package/dist/client/{EodashItemFilter-BElmgrST.js → EodashItemFilter-B9Tf2TBw.js} +2 -2
  11. package/dist/client/{EodashMap-DXyOgcEd.js → EodashMap-D_znzmX7.js} +5 -5
  12. package/dist/client/EodashMapBtns-BOKugQ88.js +37 -0
  13. package/dist/client/ExportState-D7m9s4T8.js +558 -0
  14. package/dist/client/{Footer-CoPx6UXQ.js → Footer-C2uV1-zu.js} +11 -11
  15. package/dist/client/Header-C2ROtxo_.js +350 -0
  16. package/dist/client/{IframeWrapper-2w2ye0zM.js → IframeWrapper-Wwou4pwf.js} +1 -1
  17. package/dist/client/{MobileLayout-C9OVcP12.js → MobileLayout-DR27Ctiz.js} +6 -6
  18. package/dist/client/PopUp-bPGAY43o.js +300 -0
  19. package/dist/client/VImg-swqiqth2.js +291 -0
  20. package/dist/client/{VMain-Dm43jd43.js → VMain-Bu1bPjvK.js} +2 -2
  21. package/dist/client/VOverlay-D_MKJ4vQ.js +967 -0
  22. package/dist/client/{WidgetsContainer-BS87sLqk.js → WidgetsContainer-CpxYT8YI.js} +1 -1
  23. package/dist/client/{asWebComponent-CpQUVi2N.js → asWebComponent-DeaU3QoK.js} +5939 -5713
  24. package/dist/client/{decoder-CP4lv0Kb-BHrv68IA.js → decoder-CP4lv0Kb-nokx54iM.js} +1 -1
  25. package/dist/client/eo-dash.js +4 -4
  26. package/dist/client/{eodashSTAC-Q7kbX1Gy.js → eodashSTAC-CFQuZ_cI.js} +1 -1
  27. package/dist/client/{forwardRefs-BVFQ82G4.js → forwardRefs-D0a135Tc.js} +35 -33
  28. package/dist/client/{index-dOzyv_xR.js → index-CoqcWt6E.js} +4 -4
  29. package/dist/client/{lerc-DzVumYtB-rm1Xco54.js → lerc-DzVumYtB-B3rx9xzz.js} +1 -1
  30. package/dist/client/{ssrBoot-L9KejErM.js → ssrBoot-C-inWOiD.js} +1 -1
  31. package/dist/client/style.css +2 -2
  32. package/dist/client/{transition-DCePIwYR.js → transition-C8le0YwQ.js} +3 -3
  33. package/package.json +2 -2
  34. package/widgets/EodashMapBtns.vue +34 -0
  35. package/widgets/ExportState.vue +112 -0
  36. package/widgets/PopUp.vue +40 -0
  37. package/dist/client/EodashDatePicker-oFb1zt5E.js +0 -1211
  38. package/dist/client/Header-C-zX31Ys.js +0 -635
@@ -1,4 +1,4 @@
1
- import { p as m, aw as d, d as l, av as u, ab as b } from "./asWebComponent-CpQUVi2N.js";
1
+ import { p as m, ay as b, d, b9 as l, ab as u } from "./asWebComponent-DeaU3QoK.js";
2
2
  const j = m({
3
3
  transition: {
4
4
  type: [Boolean, String, Object],
@@ -15,10 +15,10 @@ const j = m({
15
15
  group: r,
16
16
  ...a
17
17
  } = o, {
18
- component: i = r ? u : b,
18
+ component: i = r ? l : u,
19
19
  ...p
20
20
  } = typeof t == "object" ? t : {};
21
- return d(i, l(typeof t == "string" ? {
21
+ return b(i, d(typeof t == "string" ? {
22
22
  name: n ? "" : t
23
23
  } : p, typeof t == "string" ? {} : Object.fromEntries(Object.entries({
24
24
  disabled: n,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eodash/eodash",
3
- "version": "5.0.0-alpha.2.6",
3
+ "version": "5.0.0-alpha.2.7",
4
4
  "type": "module",
5
5
  "types": "./core/client/types.d.ts",
6
6
  "files": [
@@ -74,7 +74,7 @@
74
74
  "@types/node": "latest",
75
75
  "@types/openlayers": "^4.6.23",
76
76
  "@types/webfontloader": "^1.6.38",
77
- "cypress": "^13.6.6",
77
+ "cypress": "^13.13.0",
78
78
  "eslint": "^9.4.0",
79
79
  "eslint-plugin-vue": "^9.26.0",
80
80
  "prettier": "^3.3.2",
@@ -0,0 +1,34 @@
1
+ <template>
2
+ <div ref="rootRef" class="d-flex align-end justify-end my-3 pa-2">
3
+ <v-btn
4
+ class="map-btn"
5
+ color="primary"
6
+ :icon="[mdiMapPlus]"
7
+ @click="showMapState = !showMapState"
8
+ />
9
+ <ExportState :header="header" :code="code" v-model="showMapState" />
10
+ </div>
11
+ </template>
12
+ <script setup>
13
+ import { makePanelTransparent } from "@/composables";
14
+ import { mdiMapPlus } from "@mdi/js";
15
+ import ExportState from "^/ExportState.vue";
16
+ import { ref } from "vue";
17
+ const header = "Export Map";
18
+ const code = `<h2>
19
+ code example
20
+ </h2>`;
21
+
22
+ const showMapState = ref(false);
23
+
24
+ /** @type {import("vue").Ref<HTMLDivElement|null>} */
25
+ const rootRef = ref(null);
26
+ makePanelTransparent(rootRef);
27
+ </script>
28
+ <style scoped>
29
+ .map-btn {
30
+ width: 36px;
31
+ height: 36px;
32
+ border-radius: 25%;
33
+ }
34
+ </style>
@@ -0,0 +1,112 @@
1
+ <template>
2
+ <PopUp v-model="dialog">
3
+ <v-card>
4
+ <v-card-title class="bg-primary">
5
+ <h5 class="text-h5">Storytelling map configuration</h5>
6
+ </v-card-title>
7
+
8
+ <v-card-text class="py-5">
9
+ <p class="text-body-2">
10
+ Copy and paste this code into the map layers field of the storytelling
11
+ editor:
12
+ </p>
13
+ <div class="pa-3 code-block">
14
+ {{ getLayers(props.for) }}
15
+ </div>
16
+
17
+ <div style="position: absolute; bottom: 15px">
18
+ <v-expand-transition>
19
+ <div v-if="copySuccess" class="text-success mr-3">
20
+ <v-icon color="success" left :icon="[mdiClipboardCheckOutline]" />
21
+ <small>copied!</small>
22
+ </div>
23
+ </v-expand-transition>
24
+ </div>
25
+ <v-row class="d-flex pt-3 justify-end">
26
+ <v-col cols="6" class="flex-column align-center text-end">
27
+ <v-btn
28
+ v-for="btn in copyBtns"
29
+ class="text-body-2"
30
+ @click="btn.copyFn"
31
+ :key="btn.id"
32
+ small
33
+ variant="text"
34
+ :prepend-icon="[mdiContentCopy]"
35
+ >
36
+ copy as {{ btn.copyAs }}
37
+ </v-btn>
38
+ </v-col>
39
+ </v-row>
40
+ </v-card-text>
41
+
42
+ <v-divider></v-divider>
43
+
44
+ <v-card-actions>
45
+ <v-spacer></v-spacer>
46
+ <v-btn variant="text" @click="dialog = !dialog"> Close </v-btn>
47
+ </v-card-actions>
48
+ </v-card>
49
+ </PopUp>
50
+ </template>
51
+ <script setup>
52
+ import { mdiClipboardCheckOutline, mdiContentCopy } from "@mdi/js";
53
+ import PopUp from "./PopUp.vue";
54
+ import { copyToClipBoard } from "@/utils";
55
+ import { computed, ref } from "vue";
56
+ import { getLayers } from "@/store/Actions";
57
+ import { mapPosition } from "@/store/States";
58
+
59
+ const dialog = defineModel({ type: Boolean, required: true, default: false });
60
+
61
+ const props = defineProps({
62
+ for: {
63
+ type: String,
64
+ default: "eox-map",
65
+ },
66
+ });
67
+
68
+ const copySuccess = ref(false);
69
+
70
+ const copyBtns = [
71
+ {
72
+ id: Symbol(),
73
+ copyFn: async () => await copyToClipBoard(mapEntryCode.value, copySuccess),
74
+ copyAs: "simple map",
75
+ },
76
+ {
77
+ id: Symbol(),
78
+ copyFn: async () =>
79
+ await copyToClipBoard(JSON.stringify(getLayers(props?.for)), copySuccess),
80
+ copyAs: "layers configuration",
81
+ },
82
+ {
83
+ id: Symbol(),
84
+ copyFn: async () => await copyToClipBoard(mapStepCode.value, copySuccess),
85
+ copyAs: "map tour section",
86
+ },
87
+ ];
88
+
89
+ const mapStepCode = computed(() => {
90
+ const [x, y, z] = mapPosition.value;
91
+ const preTag = "### <!--{ layers=";
92
+ const endTag = `zoom="${z}" center=[${[x, y]}] animationOptions={duration:500}}-->
93
+ #### Tour step title
94
+ Text describing the current step of the tour and why it is interesting what the map shows currently
95
+ `;
96
+ return `${preTag}'${JSON.stringify(getLayers(props?.for))}' ${endTag}`;
97
+ });
98
+ const mapEntryCode = computed(() => {
99
+ const [x, y, z] = mapPosition.value;
100
+ const preTag =
101
+ '## Map Example <!--{as="eox-map" style="width: 100%; height: 500px;" layers=';
102
+ const endTag = `zoom="${z}" center=[${[x, y]}] }-->`;
103
+ return `${preTag}'${JSON.stringify(getLayers(props?.for))}' ${endTag}`;
104
+ });
105
+ </script>
106
+ <style scoped>
107
+ .code-block {
108
+ background-color: #ddd;
109
+ font-family: monospace;
110
+ font-size: small;
111
+ }
112
+ </style>
@@ -0,0 +1,40 @@
1
+ <template>
2
+ <span>
3
+ <v-dialog
4
+ max-width="500px"
5
+ max-height="500px"
6
+ absolute
7
+ scrollable
8
+ scroll-strategy="block"
9
+ close-on-back
10
+ v-model="dialog"
11
+ >
12
+ <v-sheet>
13
+ <component
14
+ v-if="widget"
15
+ :is="definedWidget.component"
16
+ :key="definedWidget.id"
17
+ v-bind="definedWidget.props"
18
+ />
19
+ <span v-if="$slots.default">
20
+ <slot />
21
+ </span>
22
+ </v-sheet>
23
+ </v-dialog>
24
+ </span>
25
+ </template>
26
+ <script setup>
27
+ import { useDefineWidgets } from "@/composables/DefineWidgets";
28
+
29
+ const dialog = defineModel({ type: Boolean, required: true, default: false });
30
+
31
+ const props = defineProps({
32
+ widget: {
33
+ /** @type {import("vue").PropType<import("@/types").Widget>} */
34
+ type: Object,
35
+ default: undefined,
36
+ },
37
+ });
38
+
39
+ const [definedWidget] = useDefineWidgets([props?.widget]);
40
+ </script>