@eodash/eodash 5.0.0-alpha.2.9 → 5.0.0-rc

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 (113) hide show
  1. package/README.md +1 -1
  2. package/core/client/App.vue +13 -1
  3. package/core/client/asWebComponent.js +13 -4
  4. package/core/client/components/DashboardLayout.vue +36 -14
  5. package/core/client/components/Loading.vue +6 -9
  6. package/core/client/components/MobileLayout.vue +16 -14
  7. package/core/client/composables/DefineEodash.js +14 -4
  8. package/core/client/composables/DefineTemplate.js +67 -0
  9. package/core/client/composables/DefineWidgets.js +3 -2
  10. package/core/client/composables/EodashMap.js +360 -0
  11. package/core/client/composables/EodashProcess.js +574 -0
  12. package/core/client/composables/index.js +136 -28
  13. package/core/client/eodash.js +395 -80
  14. package/core/client/eodashSTAC/EodashCollection.js +432 -0
  15. package/core/client/eodashSTAC/createLayers.js +315 -0
  16. package/core/client/eodashSTAC/helpers.js +375 -0
  17. package/core/client/eodashSTAC/triggers.js +43 -0
  18. package/core/client/plugins/axios.js +8 -0
  19. package/core/client/plugins/index.js +2 -1
  20. package/core/client/plugins/vuetify.js +2 -1
  21. package/core/client/store/actions.js +79 -0
  22. package/core/client/store/index.js +4 -18
  23. package/core/client/store/stac.js +99 -9
  24. package/core/client/store/states.js +37 -0
  25. package/core/client/{types.d.ts → types.ts} +66 -20
  26. package/core/client/utils/keys.js +2 -0
  27. package/core/client/utils/states.js +22 -0
  28. package/core/client/views/Dashboard.vue +22 -49
  29. package/core/client/vite-env.d.ts +2 -10
  30. package/dist/client/DashboardLayout-232tRmjz.js +84 -0
  31. package/dist/client/DynamicWebComponent-Cl4LqHU6.js +88 -0
  32. package/dist/client/EodashDatePicker-Pok6bZwU.js +306 -0
  33. package/dist/client/EodashItemFilter-16eMMjTV.js +151 -0
  34. package/dist/client/EodashLayerControl-De7IlCm_.js +120 -0
  35. package/dist/client/EodashLayoutSwitcher-C-3-jjn5.js +52 -0
  36. package/dist/client/EodashMap-CMvbfI6-.js +549 -0
  37. package/dist/client/EodashMapBtns-BeknGDtc.js +107 -0
  38. package/dist/client/EodashProcess-BwKAa9Ee.js +1476 -0
  39. package/dist/client/EodashStacInfo-_BfonNUG.js +85 -0
  40. package/dist/client/EodashTools-PD3XPYuR.js +103 -0
  41. package/dist/client/ExportState-DOrT7M15.js +644 -0
  42. package/dist/client/Footer-CCigxYBo.js +141 -0
  43. package/dist/client/Header-C2cdx4gb.js +437 -0
  44. package/dist/client/IframeWrapper-BgM9aU8f.js +28 -0
  45. package/dist/client/MobileLayout-BdiFjHg7.js +1207 -0
  46. package/dist/client/PopUp--_xn1Cms.js +410 -0
  47. package/dist/client/VImg-9xu2l99m.js +384 -0
  48. package/dist/client/VMain-BUs3kDTd.js +43 -0
  49. package/dist/client/VOverlay-D89omJis.js +1453 -0
  50. package/dist/client/VTooltip-CDu3bErh.js +86 -0
  51. package/dist/client/WidgetsContainer-aFG9yFT6.js +83 -0
  52. package/dist/client/asWebComponent-BRGyP_j5.js +11943 -0
  53. package/dist/client/{style.css → eo-dash.css} +2 -2
  54. package/dist/client/eo-dash.js +2 -6
  55. package/dist/client/forwardRefs-CYrR6bMw.js +245 -0
  56. package/dist/client/index-BZwk0V42.js +199 -0
  57. package/dist/client/ssrBoot-BP7SYRyC.js +22 -0
  58. package/dist/client/transition-DG9nRSW4.js +37 -0
  59. package/dist/node/cli.js +4 -4
  60. package/dist/node/types.d.ts +2 -0
  61. package/package.json +73 -38
  62. package/widgets/EodashDatePicker.vue +176 -134
  63. package/widgets/EodashItemFilter.vue +79 -38
  64. package/widgets/EodashLayerControl.vue +111 -0
  65. package/widgets/EodashLayoutSwitcher.vue +36 -0
  66. package/widgets/EodashMap.vue +108 -133
  67. package/widgets/EodashMapBtns.vue +62 -8
  68. package/widgets/EodashProcess.vue +143 -0
  69. package/widgets/EodashStacInfo.vue +82 -0
  70. package/widgets/EodashTools.vue +83 -0
  71. package/widgets/ExportState.vue +17 -13
  72. package/widgets/PopUp.vue +24 -2
  73. package/core/client/SuspensedDashboard.ce.vue +0 -105
  74. package/core/client/asWebComponent.d.ts +0 -23
  75. package/core/client/store/Actions.js +0 -14
  76. package/core/client/store/States.js +0 -16
  77. package/core/client/utils/eodashSTAC.js +0 -249
  78. package/core/client/utils/helpers.js +0 -38
  79. package/dist/client/DashboardLayout-D0ZF6V2S.js +0 -156
  80. package/dist/client/DynamicWebComponent-CPsMSBHi.js +0 -57
  81. package/dist/client/EodashDatePicker-CBQP7u2X.js +0 -252
  82. package/dist/client/EodashItemFilter-DL2ScI-5.js +0 -7671
  83. package/dist/client/EodashMap-CkKoQlmR.js +0 -86917
  84. package/dist/client/EodashMapBtns-yuO2QmiR.js +0 -36
  85. package/dist/client/ExportState-CCzOhppU.js +0 -558
  86. package/dist/client/Footer-BPAND0yG.js +0 -115
  87. package/dist/client/Header-DLhebNvG.js +0 -350
  88. package/dist/client/IframeWrapper-1GEMHlsW.js +0 -19
  89. package/dist/client/MobileLayout-mGkOYRhu.js +0 -945
  90. package/dist/client/PopUp-1d2bBFjw.js +0 -300
  91. package/dist/client/VImg-DxHcztfM.js +0 -291
  92. package/dist/client/VMain-BLX5vRRn.js +0 -39
  93. package/dist/client/VOverlay-CvrYEmLu.js +0 -967
  94. package/dist/client/WidgetsContainer-CmYjvGm7.js +0 -129
  95. package/dist/client/_commonjsHelpers-DaMA6jEr.js +0 -8
  96. package/dist/client/asWebComponent-B91uK0U7.js +0 -20361
  97. package/dist/client/basedecoder-DHcBySSe-BmCFNFnw.js +0 -88
  98. package/dist/client/decoder-CP4lv0Kb-B6yqkcfC.js +0 -10
  99. package/dist/client/deflate-BXt-9JA_-CWfClgpK.js +0 -10
  100. package/dist/client/eodashSTAC-DBjqe_Ho.js +0 -2788
  101. package/dist/client/eox-stacinfo-l7ALSV90.js +0 -13969
  102. package/dist/client/forwardRefs-BJJiadQP.js +0 -185
  103. package/dist/client/index-Q-bHLjxx.js +0 -153
  104. package/dist/client/jpeg-BAgeD1d3-oeHbFPUL.js +0 -514
  105. package/dist/client/lerc-DzVumYtB-P-KXC0TO.js +0 -1027
  106. package/dist/client/lzw-LAGDNbSC-DkP96qO9.js +0 -84
  107. package/dist/client/packbits-BlDR4Kj5-C66n1-zr.js +0 -24
  108. package/dist/client/pako.esm-CB1uQYY0-DB0PYm1P.js +0 -1081
  109. package/dist/client/raw-CMGvRjfu-BRi6E4i1.js +0 -9
  110. package/dist/client/ssrBoot-yo11mybw.js +0 -17
  111. package/dist/client/transition-CSJhuYGK.js +0 -34
  112. package/dist/client/webfontloader-qotgY98I.js +0 -435
  113. package/dist/client/webimage-BM_pbLN3-L2cGWK5l.js +0 -19
@@ -0,0 +1,644 @@
1
+ import { createVNode, Fragment, computed, withDirectives, mergeProps, resolveDirective, toRef, mergeModels, useModel, ref, openBlock, createBlock, withCtx, createElementVNode, createTextVNode, toDisplayString, unref, createElementBlock, createCommentVNode, renderList } from 'vue';
2
+ import { mdiClipboardCheckOutline, mdiContentCopy } from '@mdi/js';
3
+ import _sfc_main$1 from './PopUp--_xn1Cms.js';
4
+ import { am as createSimpleFunctional, g as genericComponent, b as makeComponentProps, D as provideDefaults, a as useRender, p as propsFactory, c as makeTagProps, I as IconValue, K as makeBorderProps, A as makeDensityProps, M as makeRoundedProps, an as makeSizeProps, d as makeThemeProps, ao as makeVariantProps, e as provideTheme, N as useBorder, ap as useVariant, B as useDensity, P as useRounded, aq as useSize, y as VIcon, Q as VDefaultsProvider, ar as genOverlays, H as makeDimensionProps, L as makeElevationProps, as as makeLoaderProps, at as makeLocationProps, au as makePositionProps, av as makeRouterProps, aw as Ripple, J as useDimension, O as useElevation, ax as useLoader, ay as useLocation, az as usePosition, aA as useLink, aB as LoaderSlot, u as useTextColor, q as convertToUnit, _ as _export_sfc, ag as getLayers, ad as mapPosition, aC as removeUnneededProperties, aD as VRow, aE as VCol, V as VBtn, aF as copyToClipBoard } from './asWebComponent-BRGyP_j5.js';
5
+ import { a as VExpandTransition } from './index-BZwk0V42.js';
6
+ import { V as VImg } from './VImg-9xu2l99m.js';
7
+
8
+ // Styles
9
+ const VSpacer = createSimpleFunctional('v-spacer', 'div', 'VSpacer');
10
+
11
+ const VCardActions = genericComponent()({
12
+ name: 'VCardActions',
13
+ props: makeComponentProps(),
14
+ setup(props, _ref) {
15
+ let {
16
+ slots
17
+ } = _ref;
18
+ provideDefaults({
19
+ VBtn: {
20
+ slim: true,
21
+ variant: 'text'
22
+ }
23
+ });
24
+ useRender(() => createVNode("div", {
25
+ "class": ['v-card-actions', props.class],
26
+ "style": props.style
27
+ }, [slots.default?.()]));
28
+ return {};
29
+ }
30
+ });
31
+
32
+ const makeVCardSubtitleProps = propsFactory({
33
+ opacity: [Number, String],
34
+ ...makeComponentProps(),
35
+ ...makeTagProps()
36
+ }, 'VCardSubtitle');
37
+ const VCardSubtitle = genericComponent()({
38
+ name: 'VCardSubtitle',
39
+ props: makeVCardSubtitleProps(),
40
+ setup(props, _ref) {
41
+ let {
42
+ slots
43
+ } = _ref;
44
+ useRender(() => createVNode(props.tag, {
45
+ "class": ['v-card-subtitle', props.class],
46
+ "style": [{
47
+ '--v-card-subtitle-opacity': props.opacity
48
+ }, props.style]
49
+ }, slots));
50
+ return {};
51
+ }
52
+ });
53
+
54
+ // Utilities
55
+ const VCardTitle = createSimpleFunctional('v-card-title');
56
+
57
+ const makeVAvatarProps = propsFactory({
58
+ start: Boolean,
59
+ end: Boolean,
60
+ icon: IconValue,
61
+ image: String,
62
+ text: String,
63
+ ...makeBorderProps(),
64
+ ...makeComponentProps(),
65
+ ...makeDensityProps(),
66
+ ...makeRoundedProps(),
67
+ ...makeSizeProps(),
68
+ ...makeTagProps(),
69
+ ...makeThemeProps(),
70
+ ...makeVariantProps({
71
+ variant: 'flat'
72
+ })
73
+ }, 'VAvatar');
74
+ const VAvatar = genericComponent()({
75
+ name: 'VAvatar',
76
+ props: makeVAvatarProps(),
77
+ setup(props, _ref) {
78
+ let {
79
+ slots
80
+ } = _ref;
81
+ const {
82
+ themeClasses
83
+ } = provideTheme(props);
84
+ const {
85
+ borderClasses
86
+ } = useBorder(props);
87
+ const {
88
+ colorClasses,
89
+ colorStyles,
90
+ variantClasses
91
+ } = useVariant(props);
92
+ const {
93
+ densityClasses
94
+ } = useDensity(props);
95
+ const {
96
+ roundedClasses
97
+ } = useRounded(props);
98
+ const {
99
+ sizeClasses,
100
+ sizeStyles
101
+ } = useSize(props);
102
+ useRender(() => createVNode(props.tag, {
103
+ "class": ['v-avatar', {
104
+ 'v-avatar--start': props.start,
105
+ 'v-avatar--end': props.end
106
+ }, themeClasses.value, borderClasses.value, colorClasses.value, densityClasses.value, roundedClasses.value, sizeClasses.value, variantClasses.value, props.class],
107
+ "style": [colorStyles.value, sizeStyles.value, props.style]
108
+ }, {
109
+ default: () => [!slots.default ? props.image ? createVNode(VImg, {
110
+ "key": "image",
111
+ "src": props.image,
112
+ "alt": "",
113
+ "cover": true
114
+ }, null) : props.icon ? createVNode(VIcon, {
115
+ "key": "icon",
116
+ "icon": props.icon
117
+ }, null) : props.text : createVNode(VDefaultsProvider, {
118
+ "key": "content-defaults",
119
+ "defaults": {
120
+ VImg: {
121
+ cover: true,
122
+ src: props.image
123
+ },
124
+ VIcon: {
125
+ icon: props.icon
126
+ }
127
+ }
128
+ }, {
129
+ default: () => [slots.default()]
130
+ }), genOverlays(false, 'v-avatar')]
131
+ }));
132
+ return {};
133
+ }
134
+ });
135
+
136
+ const makeCardItemProps = propsFactory({
137
+ appendAvatar: String,
138
+ appendIcon: IconValue,
139
+ prependAvatar: String,
140
+ prependIcon: IconValue,
141
+ subtitle: [String, Number],
142
+ title: [String, Number],
143
+ ...makeComponentProps(),
144
+ ...makeDensityProps()
145
+ }, 'VCardItem');
146
+ const VCardItem = genericComponent()({
147
+ name: 'VCardItem',
148
+ props: makeCardItemProps(),
149
+ setup(props, _ref) {
150
+ let {
151
+ slots
152
+ } = _ref;
153
+ useRender(() => {
154
+ const hasPrependMedia = !!(props.prependAvatar || props.prependIcon);
155
+ const hasPrepend = !!(hasPrependMedia || slots.prepend);
156
+ const hasAppendMedia = !!(props.appendAvatar || props.appendIcon);
157
+ const hasAppend = !!(hasAppendMedia || slots.append);
158
+ const hasTitle = !!(props.title != null || slots.title);
159
+ const hasSubtitle = !!(props.subtitle != null || slots.subtitle);
160
+ return createVNode("div", {
161
+ "class": ['v-card-item', props.class],
162
+ "style": props.style
163
+ }, [hasPrepend && createVNode("div", {
164
+ "key": "prepend",
165
+ "class": "v-card-item__prepend"
166
+ }, [!slots.prepend ? createVNode(Fragment, null, [props.prependAvatar && createVNode(VAvatar, {
167
+ "key": "prepend-avatar",
168
+ "density": props.density,
169
+ "image": props.prependAvatar
170
+ }, null), props.prependIcon && createVNode(VIcon, {
171
+ "key": "prepend-icon",
172
+ "density": props.density,
173
+ "icon": props.prependIcon
174
+ }, null)]) : createVNode(VDefaultsProvider, {
175
+ "key": "prepend-defaults",
176
+ "disabled": !hasPrependMedia,
177
+ "defaults": {
178
+ VAvatar: {
179
+ density: props.density,
180
+ image: props.prependAvatar
181
+ },
182
+ VIcon: {
183
+ density: props.density,
184
+ icon: props.prependIcon
185
+ }
186
+ }
187
+ }, slots.prepend)]), createVNode("div", {
188
+ "class": "v-card-item__content"
189
+ }, [hasTitle && createVNode(VCardTitle, {
190
+ "key": "title"
191
+ }, {
192
+ default: () => [slots.title?.() ?? props.title]
193
+ }), hasSubtitle && createVNode(VCardSubtitle, {
194
+ "key": "subtitle"
195
+ }, {
196
+ default: () => [slots.subtitle?.() ?? props.subtitle]
197
+ }), slots.default?.()]), hasAppend && createVNode("div", {
198
+ "key": "append",
199
+ "class": "v-card-item__append"
200
+ }, [!slots.append ? createVNode(Fragment, null, [props.appendIcon && createVNode(VIcon, {
201
+ "key": "append-icon",
202
+ "density": props.density,
203
+ "icon": props.appendIcon
204
+ }, null), props.appendAvatar && createVNode(VAvatar, {
205
+ "key": "append-avatar",
206
+ "density": props.density,
207
+ "image": props.appendAvatar
208
+ }, null)]) : createVNode(VDefaultsProvider, {
209
+ "key": "append-defaults",
210
+ "disabled": !hasAppendMedia,
211
+ "defaults": {
212
+ VAvatar: {
213
+ density: props.density,
214
+ image: props.appendAvatar
215
+ },
216
+ VIcon: {
217
+ density: props.density,
218
+ icon: props.appendIcon
219
+ }
220
+ }
221
+ }, slots.append)])]);
222
+ });
223
+ return {};
224
+ }
225
+ });
226
+
227
+ const makeVCardTextProps = propsFactory({
228
+ opacity: [Number, String],
229
+ ...makeComponentProps(),
230
+ ...makeTagProps()
231
+ }, 'VCardText');
232
+ const VCardText = genericComponent()({
233
+ name: 'VCardText',
234
+ props: makeVCardTextProps(),
235
+ setup(props, _ref) {
236
+ let {
237
+ slots
238
+ } = _ref;
239
+ useRender(() => createVNode(props.tag, {
240
+ "class": ['v-card-text', props.class],
241
+ "style": [{
242
+ '--v-card-text-opacity': props.opacity
243
+ }, props.style]
244
+ }, slots));
245
+ return {};
246
+ }
247
+ });
248
+
249
+ const makeVCardProps = propsFactory({
250
+ appendAvatar: String,
251
+ appendIcon: IconValue,
252
+ disabled: Boolean,
253
+ flat: Boolean,
254
+ hover: Boolean,
255
+ image: String,
256
+ link: {
257
+ type: Boolean,
258
+ default: undefined
259
+ },
260
+ prependAvatar: String,
261
+ prependIcon: IconValue,
262
+ ripple: {
263
+ type: [Boolean, Object],
264
+ default: true
265
+ },
266
+ subtitle: [String, Number],
267
+ text: [String, Number],
268
+ title: [String, Number],
269
+ ...makeBorderProps(),
270
+ ...makeComponentProps(),
271
+ ...makeDensityProps(),
272
+ ...makeDimensionProps(),
273
+ ...makeElevationProps(),
274
+ ...makeLoaderProps(),
275
+ ...makeLocationProps(),
276
+ ...makePositionProps(),
277
+ ...makeRoundedProps(),
278
+ ...makeRouterProps(),
279
+ ...makeTagProps(),
280
+ ...makeThemeProps(),
281
+ ...makeVariantProps({
282
+ variant: 'elevated'
283
+ })
284
+ }, 'VCard');
285
+ const VCard = genericComponent()({
286
+ name: 'VCard',
287
+ directives: {
288
+ Ripple
289
+ },
290
+ props: makeVCardProps(),
291
+ setup(props, _ref) {
292
+ let {
293
+ attrs,
294
+ slots
295
+ } = _ref;
296
+ const {
297
+ themeClasses
298
+ } = provideTheme(props);
299
+ const {
300
+ borderClasses
301
+ } = useBorder(props);
302
+ const {
303
+ colorClasses,
304
+ colorStyles,
305
+ variantClasses
306
+ } = useVariant(props);
307
+ const {
308
+ densityClasses
309
+ } = useDensity(props);
310
+ const {
311
+ dimensionStyles
312
+ } = useDimension(props);
313
+ const {
314
+ elevationClasses
315
+ } = useElevation(props);
316
+ const {
317
+ loaderClasses
318
+ } = useLoader(props);
319
+ const {
320
+ locationStyles
321
+ } = useLocation(props);
322
+ const {
323
+ positionClasses
324
+ } = usePosition(props);
325
+ const {
326
+ roundedClasses
327
+ } = useRounded(props);
328
+ const link = useLink(props, attrs);
329
+ const isLink = computed(() => props.link !== false && link.isLink.value);
330
+ const isClickable = computed(() => !props.disabled && props.link !== false && (props.link || link.isClickable.value));
331
+ useRender(() => {
332
+ const Tag = isLink.value ? 'a' : props.tag;
333
+ const hasTitle = !!(slots.title || props.title != null);
334
+ const hasSubtitle = !!(slots.subtitle || props.subtitle != null);
335
+ const hasHeader = hasTitle || hasSubtitle;
336
+ const hasAppend = !!(slots.append || props.appendAvatar || props.appendIcon);
337
+ const hasPrepend = !!(slots.prepend || props.prependAvatar || props.prependIcon);
338
+ const hasImage = !!(slots.image || props.image);
339
+ const hasCardItem = hasHeader || hasPrepend || hasAppend;
340
+ const hasText = !!(slots.text || props.text != null);
341
+ return withDirectives(createVNode(Tag, mergeProps({
342
+ "class": ['v-card', {
343
+ 'v-card--disabled': props.disabled,
344
+ 'v-card--flat': props.flat,
345
+ 'v-card--hover': props.hover && !(props.disabled || props.flat),
346
+ 'v-card--link': isClickable.value
347
+ }, themeClasses.value, borderClasses.value, colorClasses.value, densityClasses.value, elevationClasses.value, loaderClasses.value, positionClasses.value, roundedClasses.value, variantClasses.value, props.class],
348
+ "style": [colorStyles.value, dimensionStyles.value, locationStyles.value, props.style],
349
+ "onClick": isClickable.value && link.navigate,
350
+ "tabindex": props.disabled ? -1 : undefined
351
+ }, link.linkProps), {
352
+ default: () => [hasImage && createVNode("div", {
353
+ "key": "image",
354
+ "class": "v-card__image"
355
+ }, [!slots.image ? createVNode(VImg, {
356
+ "key": "image-img",
357
+ "cover": true,
358
+ "src": props.image
359
+ }, null) : createVNode(VDefaultsProvider, {
360
+ "key": "image-defaults",
361
+ "disabled": !props.image,
362
+ "defaults": {
363
+ VImg: {
364
+ cover: true,
365
+ src: props.image
366
+ }
367
+ }
368
+ }, slots.image)]), createVNode(LoaderSlot, {
369
+ "name": "v-card",
370
+ "active": !!props.loading,
371
+ "color": typeof props.loading === 'boolean' ? undefined : props.loading
372
+ }, {
373
+ default: slots.loader
374
+ }), hasCardItem && createVNode(VCardItem, {
375
+ "key": "item",
376
+ "prependAvatar": props.prependAvatar,
377
+ "prependIcon": props.prependIcon,
378
+ "title": props.title,
379
+ "subtitle": props.subtitle,
380
+ "appendAvatar": props.appendAvatar,
381
+ "appendIcon": props.appendIcon
382
+ }, {
383
+ default: slots.item,
384
+ prepend: slots.prepend,
385
+ title: slots.title,
386
+ subtitle: slots.subtitle,
387
+ append: slots.append
388
+ }), hasText && createVNode(VCardText, {
389
+ "key": "text"
390
+ }, {
391
+ default: () => [slots.text?.() ?? props.text]
392
+ }), slots.default?.(), slots.actions && createVNode(VCardActions, null, {
393
+ default: slots.actions
394
+ }), genOverlays(isClickable.value, 'v-card')]
395
+ }), [[resolveDirective("ripple"), isClickable.value && props.ripple]]);
396
+ });
397
+ return {};
398
+ }
399
+ });
400
+
401
+ const makeVDividerProps = propsFactory({
402
+ color: String,
403
+ inset: Boolean,
404
+ length: [Number, String],
405
+ opacity: [Number, String],
406
+ thickness: [Number, String],
407
+ vertical: Boolean,
408
+ ...makeComponentProps(),
409
+ ...makeThemeProps()
410
+ }, 'VDivider');
411
+ const VDivider = genericComponent()({
412
+ name: 'VDivider',
413
+ props: makeVDividerProps(),
414
+ setup(props, _ref) {
415
+ let {
416
+ attrs,
417
+ slots
418
+ } = _ref;
419
+ const {
420
+ themeClasses
421
+ } = provideTheme(props);
422
+ const {
423
+ textColorClasses,
424
+ textColorStyles
425
+ } = useTextColor(toRef(props, 'color'));
426
+ const dividerStyles = computed(() => {
427
+ const styles = {};
428
+ if (props.length) {
429
+ styles[props.vertical ? 'height' : 'width'] = convertToUnit(props.length);
430
+ }
431
+ if (props.thickness) {
432
+ styles[props.vertical ? 'borderRightWidth' : 'borderTopWidth'] = convertToUnit(props.thickness);
433
+ }
434
+ return styles;
435
+ });
436
+ useRender(() => {
437
+ const divider = createVNode("hr", {
438
+ "class": [{
439
+ 'v-divider': true,
440
+ 'v-divider--inset': props.inset,
441
+ 'v-divider--vertical': props.vertical
442
+ }, themeClasses.value, textColorClasses.value, props.class],
443
+ "style": [dividerStyles.value, textColorStyles.value, {
444
+ '--v-border-opacity': props.opacity
445
+ }, props.style],
446
+ "aria-orientation": !attrs.role || attrs.role === 'separator' ? props.vertical ? 'vertical' : 'horizontal' : undefined,
447
+ "role": `${attrs.role || 'separator'}`
448
+ }, null);
449
+ if (!slots.default) return divider;
450
+ return createVNode("div", {
451
+ "class": ['v-divider__wrapper', {
452
+ 'v-divider__wrapper--vertical': props.vertical,
453
+ 'v-divider__wrapper--inset': props.inset
454
+ }]
455
+ }, [divider, createVNode("div", {
456
+ "class": "v-divider__content"
457
+ }, [slots.default()]), divider]);
458
+ });
459
+ return {};
460
+ }
461
+ });
462
+
463
+ const _hoisted_1 = { class: "pa-3 code-block" };
464
+ const _hoisted_2 = { style: {"position":"absolute","bottom":"15px"} };
465
+ const _hoisted_3 = {
466
+ key: 0,
467
+ class: "text-success mr-3"
468
+ };
469
+
470
+
471
+ const _sfc_main = {
472
+ __name: 'ExportState',
473
+ props: /*@__PURE__*/mergeModels({
474
+ getLayers: {
475
+ type: Function,
476
+ default: getLayers,
477
+ },
478
+ }, {
479
+ "modelValue": { type: Boolean, required: true, default: false },
480
+ "modelModifiers": {},
481
+ }),
482
+ emits: ["update:modelValue"],
483
+ setup(__props) {
484
+
485
+ const dialog = useModel(__props, "modelValue");
486
+
487
+ const props = __props;
488
+
489
+ const copySuccess = ref(false);
490
+
491
+ const copyBtns = [
492
+ {
493
+ id: Symbol(),
494
+ copyFn: async () => await copyToClipBoard(mapEntryCode.value, copySuccess),
495
+ copyAs: "simple map",
496
+ },
497
+ {
498
+ id: Symbol(),
499
+ copyFn: async () =>
500
+ await copyToClipBoard(JSON.stringify(props.getLayers()), copySuccess),
501
+ copyAs: "layers configuration",
502
+ },
503
+ {
504
+ id: Symbol(),
505
+ copyFn: async () => await copyToClipBoard(mapStepCode.value, copySuccess),
506
+ copyAs: "map tour section",
507
+ },
508
+ ];
509
+
510
+ const mapStepCode = computed(() => {
511
+ const [x, y, z] = mapPosition.value;
512
+ const preTag = "### <!" + "--{ layers=";
513
+ const endTag = `zoom="${z}" center=[${[x, y]}] animationOptions={duration:500}}-->
514
+ #### Tour step title
515
+ Text describing the current step of the tour and why it is interesting what the map shows currently
516
+ `;
517
+ return `${preTag}'${JSON.stringify(removeUnneededProperties(props.getLayers()))}' ${endTag}`;
518
+ });
519
+ const mapEntryCode = computed(() => {
520
+ const [x, y, z] = mapPosition.value;
521
+ const preTag =
522
+ "## Map Example <!" +
523
+ '--{as="eox-map" style="width: 100%; height: 500px;" layers=';
524
+ const endTag = `zoom="${z}" center=[${[x, y]}] }-->`;
525
+ return `${preTag}'${JSON.stringify(removeUnneededProperties(props.getLayers()))}' ${endTag}`;
526
+ });
527
+
528
+ return (_ctx, _cache) => {
529
+
530
+
531
+
532
+
533
+
534
+
535
+
536
+
537
+
538
+
539
+
540
+
541
+ return (openBlock(), createBlock(_sfc_main$1, {
542
+ modelValue: dialog.value,
543
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = $event => ((dialog).value = $event))
544
+ }, {
545
+ default: withCtx(() => [
546
+ createVNode(VCard, { style: {"max-height":"498px"} }, {
547
+ default: withCtx(() => [
548
+ createVNode(VCardTitle, {
549
+ class: "bg-primary",
550
+ style: {"max-height":"49px"}
551
+ }, {
552
+ default: withCtx(() => _cache[2] || (_cache[2] = [
553
+ createElementVNode("h5", { class: "text-h5" }, "Storytelling map configuration", -1 /* HOISTED */)
554
+ ])),
555
+ _: 1 /* STABLE */
556
+ }),
557
+ createVNode(VCardText, {
558
+ class: "py-5 overflow-auto",
559
+ style: {"height":"400px"}
560
+ }, {
561
+ default: withCtx(() => [
562
+ _cache[4] || (_cache[4] = createElementVNode("p", { class: "text-body-2" }, [
563
+ createTextVNode(" Copy and paste this code into the map "),
564
+ createElementVNode("b", null, "layers field"),
565
+ createTextVNode(" of the storytelling editor: ")
566
+ ], -1 /* HOISTED */)),
567
+ createElementVNode("div", _hoisted_1, toDisplayString(unref(removeUnneededProperties)(__props.getLayers())), 1 /* TEXT */),
568
+ createElementVNode("div", _hoisted_2, [
569
+ createVNode(VExpandTransition, null, {
570
+ default: withCtx(() => [
571
+ (copySuccess.value)
572
+ ? (openBlock(), createElementBlock("div", _hoisted_3, [
573
+ createVNode(VIcon, {
574
+ color: "success",
575
+ left: "",
576
+ icon: [unref(mdiClipboardCheckOutline)]
577
+ }, null, 8 /* PROPS */, ["icon"]),
578
+ _cache[3] || (_cache[3] = createElementVNode("small", null, "copied!", -1 /* HOISTED */))
579
+ ]))
580
+ : createCommentVNode("v-if", true)
581
+ ]),
582
+ _: 1 /* STABLE */
583
+ })
584
+ ]),
585
+ createVNode(VRow, { class: "d-flex pt-3 justify-end" }, {
586
+ default: withCtx(() => [
587
+ createVNode(VCol, {
588
+ cols: "6",
589
+ class: "flex-column align-center text-end"
590
+ }, {
591
+ default: withCtx(() => [
592
+ (openBlock(), createElementBlock(Fragment, null, renderList(copyBtns, (btn) => {
593
+ return createVNode(VBtn, {
594
+ class: "text-body-2",
595
+ onClick: btn.copyFn,
596
+ key: btn.id,
597
+ small: "",
598
+ variant: "text",
599
+ "prepend-icon": [unref(mdiContentCopy)]
600
+ }, {
601
+ default: withCtx(() => [
602
+ createTextVNode(" copy as " + toDisplayString(btn.copyAs), 1 /* TEXT */)
603
+ ]),
604
+ _: 2 /* DYNAMIC */
605
+ }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["onClick", "prepend-icon"])
606
+ }), 64 /* STABLE_FRAGMENT */))
607
+ ]),
608
+ _: 1 /* STABLE */
609
+ })
610
+ ]),
611
+ _: 1 /* STABLE */
612
+ })
613
+ ]),
614
+ _: 1 /* STABLE */
615
+ }),
616
+ createVNode(VDivider),
617
+ createVNode(VCardActions, { style: {"max-height":"49px"} }, {
618
+ default: withCtx(() => [
619
+ createVNode(VSpacer),
620
+ createVNode(VBtn, {
621
+ variant: "text",
622
+ onClick: _cache[0] || (_cache[0] = $event => (dialog.value = !dialog.value))
623
+ }, {
624
+ default: withCtx(() => _cache[5] || (_cache[5] = [
625
+ createTextVNode(" Close ")
626
+ ])),
627
+ _: 1 /* STABLE */
628
+ })
629
+ ]),
630
+ _: 1 /* STABLE */
631
+ })
632
+ ]),
633
+ _: 1 /* STABLE */
634
+ })
635
+ ]),
636
+ _: 1 /* STABLE */
637
+ }, 8 /* PROPS */, ["modelValue"]))
638
+ }
639
+ }
640
+
641
+ };
642
+ const ExportState = /*#__PURE__*/_export_sfc(_sfc_main, [['__scopeId',"data-v-bfef967b"]]);
643
+
644
+ export { ExportState as default };