@eodash/eodash 5.0.0-alpha.2.19 → 5.0.0-alpha.2.21

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 (67) hide show
  1. package/core/client/App.vue +11 -1
  2. package/core/client/asWebComponent.js +9 -2
  3. package/core/client/utils/createLayers.js +1 -0
  4. package/core/client/views/Dashboard.vue +17 -46
  5. package/dist/client/DashboardLayout-DEZe5rZn.js +86 -0
  6. package/dist/client/DynamicWebComponent-Cp_3d3nd.js +88 -0
  7. package/dist/client/EodashDatePicker-BwQ9Bw9-.js +393 -0
  8. package/dist/client/EodashItemFilter-BtihrBap.js +194 -0
  9. package/dist/client/EodashLayerControl-BuZgXYop.js +111 -0
  10. package/dist/client/EodashMap-C9hvsdhf.js +472 -0
  11. package/dist/client/EodashMapBtns-BTG6oYL5.js +66 -0
  12. package/dist/client/ExportState-GDJ8YxS9.js +644 -0
  13. package/dist/client/Footer-Cul4HvW4.js +141 -0
  14. package/dist/client/Header-BikVMROv.js +437 -0
  15. package/dist/client/IframeWrapper-BgM9aU8f.js +28 -0
  16. package/dist/client/MobileLayout-ByPGOgnO.js +1210 -0
  17. package/dist/client/PopUp-AJqPEHmR.js +382 -0
  18. package/dist/client/VImg-CY7ndzv2.js +384 -0
  19. package/dist/client/VMain-BlIaUbM6.js +43 -0
  20. package/dist/client/VOverlay-CiMWDe2b.js +1453 -0
  21. package/dist/client/WidgetsContainer-DG9sQaF0.js +83 -0
  22. package/dist/client/asWebComponent-6g8pz2_C.js +11557 -0
  23. package/dist/client/eo-dash.js +2 -6
  24. package/dist/client/forwardRefs-DnXzPqIo.js +245 -0
  25. package/dist/client/index-14PHPf-A.js +199 -0
  26. package/dist/client/ssrBoot-BP7SYRyC.js +22 -0
  27. package/dist/client/style.css +2 -2
  28. package/dist/client/transition-CGVKXZbS.js +37 -0
  29. package/dist/node/cli.js +5 -5
  30. package/dist/node/types.d.ts +2 -0
  31. package/package.json +21 -19
  32. package/widgets/EodashDatePicker.vue +20 -9
  33. package/core/client/SuspensedDashboard.ce.vue +0 -105
  34. package/dist/client/DashboardLayout-CU4js3lr.js +0 -156
  35. package/dist/client/DynamicWebComponent-BsYZdIEB.js +0 -57
  36. package/dist/client/EodashDatePicker-DZoH_gRX.js +0 -276
  37. package/dist/client/EodashItemFilter-CHBfsFSm.js +0 -7666
  38. package/dist/client/EodashLayerControl-CuY-cAx8.js +0 -24665
  39. package/dist/client/EodashMap-Ch43fWNv.js +0 -88369
  40. package/dist/client/EodashMapBtns-CFA2uti4.js +0 -50
  41. package/dist/client/ExportState-C6raDjTt.js +0 -570
  42. package/dist/client/Footer-D8T5ROhF.js +0 -117
  43. package/dist/client/Header-B8B4Z5R9.js +0 -350
  44. package/dist/client/IframeWrapper-BK2JxzSJ.js +0 -19
  45. package/dist/client/MobileLayout-aZaYvF8V.js +0 -947
  46. package/dist/client/PopUp-DdHXoNOP.js +0 -300
  47. package/dist/client/VImg-yb8O1cb8.js +0 -293
  48. package/dist/client/VMain-Dknnyxts.js +0 -38
  49. package/dist/client/VOverlay-BCOn3hd6.js +0 -973
  50. package/dist/client/WidgetsContainer-BixUyr1e.js +0 -129
  51. package/dist/client/asWebComponent-CHqY8A1z.js +0 -24636
  52. package/dist/client/basedecoder-DHcBySSe-BmCFNFnw.js +0 -88
  53. package/dist/client/decoder-DJlmx386-DJlmx386.js +0 -8
  54. package/dist/client/deflate-BXt-9JA_-CWfClgpK.js +0 -10
  55. package/dist/client/eox-stacinfo-l7ALSV90.js +0 -13969
  56. package/dist/client/forwardRefs-dcYA2XVU.js +0 -185
  57. package/dist/client/index-BVuSHaVu.js +0 -153
  58. package/dist/client/jpeg-BAgeD1d3-oeHbFPUL.js +0 -514
  59. package/dist/client/lerc-BPVtQnt3-08GHszVp.js +0 -1027
  60. package/dist/client/lzw-LAGDNbSC-DkP96qO9.js +0 -84
  61. package/dist/client/packbits-BlDR4Kj5-C66n1-zr.js +0 -24
  62. package/dist/client/pako.esm-CB1uQYY0-DB0PYm1P.js +0 -1081
  63. package/dist/client/raw-CMGvRjfu-BRi6E4i1.js +0 -9
  64. package/dist/client/ssrBoot-DU2S_nLc.js +0 -17
  65. package/dist/client/transition-C_fi1aa6.js +0 -34
  66. package/dist/client/webfontloader-Ofarvipf.js +0 -435
  67. package/dist/client/webimage-BM_pbLN3-L2cGWK5l.js +0 -19
@@ -0,0 +1,382 @@
1
+ import { createVNode, Transition, mergeProps, ref, watch, nextTick, toRef, mergeModels, useModel, openBlock, createElementBlock, withCtx, createBlock, resolveDynamicComponent, unref, createCommentVNode, renderSlot } from 'vue';
2
+ import { g as genericComponent, p as propsFactory, j as useProxiedModel, x as IN_BROWSER, a as useRender, z as focusableChildren, R as VDefaultsProvider, L as makeBorderProps, b as makeComponentProps, J as makeDimensionProps, M as makeElevationProps, aj as makeLocationProps, ak as makePositionProps, N as makeRoundedProps, c as makeTagProps, d as makeThemeProps, e as provideTheme, C as useBackgroundColor, O as useBorder, K as useDimension, P as useElevation, ao as useLocation, ap as usePosition, Q as useRounded, G as useDefineWidgets } from './asWebComponent-6g8pz2_C.js';
3
+ import { m as makeVOverlayProps, V as VOverlay } from './VOverlay-CiMWDe2b.js';
4
+ import { a as animate, d as deceleratedEasing, s as standardEasing, c as acceleratedEasing, g as getTargetBox, n as nullifyTransforms, b as useScopeId, f as forwardRefs } from './forwardRefs-DnXzPqIo.js';
5
+
6
+ const makeVDialogTransitionProps = propsFactory({
7
+ target: [Object, Array]
8
+ }, 'v-dialog-transition');
9
+ const VDialogTransition = genericComponent()({
10
+ name: 'VDialogTransition',
11
+ props: makeVDialogTransitionProps(),
12
+ setup(props, _ref) {
13
+ let {
14
+ slots
15
+ } = _ref;
16
+ const functions = {
17
+ onBeforeEnter(el) {
18
+ el.style.pointerEvents = 'none';
19
+ el.style.visibility = 'hidden';
20
+ },
21
+ async onEnter(el, done) {
22
+ await new Promise(resolve => requestAnimationFrame(resolve));
23
+ await new Promise(resolve => requestAnimationFrame(resolve));
24
+ el.style.visibility = '';
25
+ const {
26
+ x,
27
+ y,
28
+ sx,
29
+ sy,
30
+ speed
31
+ } = getDimensions(props.target, el);
32
+ const animation = animate(el, [{
33
+ transform: `translate(${x}px, ${y}px) scale(${sx}, ${sy})`,
34
+ opacity: 0
35
+ }, {}], {
36
+ duration: 225 * speed,
37
+ easing: deceleratedEasing
38
+ });
39
+ getChildren(el)?.forEach(el => {
40
+ animate(el, [{
41
+ opacity: 0
42
+ }, {
43
+ opacity: 0,
44
+ offset: 0.33
45
+ }, {}], {
46
+ duration: 225 * 2 * speed,
47
+ easing: standardEasing
48
+ });
49
+ });
50
+ animation.finished.then(() => done());
51
+ },
52
+ onAfterEnter(el) {
53
+ el.style.removeProperty('pointer-events');
54
+ },
55
+ onBeforeLeave(el) {
56
+ el.style.pointerEvents = 'none';
57
+ },
58
+ async onLeave(el, done) {
59
+ await new Promise(resolve => requestAnimationFrame(resolve));
60
+ const {
61
+ x,
62
+ y,
63
+ sx,
64
+ sy,
65
+ speed
66
+ } = getDimensions(props.target, el);
67
+ const animation = animate(el, [{}, {
68
+ transform: `translate(${x}px, ${y}px) scale(${sx}, ${sy})`,
69
+ opacity: 0
70
+ }], {
71
+ duration: 125 * speed,
72
+ easing: acceleratedEasing
73
+ });
74
+ animation.finished.then(() => done());
75
+ getChildren(el)?.forEach(el => {
76
+ animate(el, [{}, {
77
+ opacity: 0,
78
+ offset: 0.2
79
+ }, {
80
+ opacity: 0
81
+ }], {
82
+ duration: 125 * 2 * speed,
83
+ easing: standardEasing
84
+ });
85
+ });
86
+ },
87
+ onAfterLeave(el) {
88
+ el.style.removeProperty('pointer-events');
89
+ }
90
+ };
91
+ return () => {
92
+ return props.target ? createVNode(Transition, mergeProps({
93
+ "name": "dialog-transition"
94
+ }, functions, {
95
+ "css": false
96
+ }), slots) : createVNode(Transition, {
97
+ "name": "dialog-transition"
98
+ }, slots);
99
+ };
100
+ }
101
+ });
102
+
103
+ /** Animatable children (card, sheet, list) */
104
+ function getChildren(el) {
105
+ const els = el.querySelector(':scope > .v-card, :scope > .v-sheet, :scope > .v-list')?.children;
106
+ return els && [...els];
107
+ }
108
+ function getDimensions(target, el) {
109
+ const targetBox = getTargetBox(target);
110
+ const elBox = nullifyTransforms(el);
111
+ const [originX, originY] = getComputedStyle(el).transformOrigin.split(' ').map(v => parseFloat(v));
112
+ const [anchorSide, anchorOffset] = getComputedStyle(el).getPropertyValue('--v-overlay-anchor-origin').split(' ');
113
+ let offsetX = targetBox.left + targetBox.width / 2;
114
+ if (anchorSide === 'left' || anchorOffset === 'left') {
115
+ offsetX -= targetBox.width / 2;
116
+ } else if (anchorSide === 'right' || anchorOffset === 'right') {
117
+ offsetX += targetBox.width / 2;
118
+ }
119
+ let offsetY = targetBox.top + targetBox.height / 2;
120
+ if (anchorSide === 'top' || anchorOffset === 'top') {
121
+ offsetY -= targetBox.height / 2;
122
+ } else if (anchorSide === 'bottom' || anchorOffset === 'bottom') {
123
+ offsetY += targetBox.height / 2;
124
+ }
125
+ const tsx = targetBox.width / elBox.width;
126
+ const tsy = targetBox.height / elBox.height;
127
+ const maxs = Math.max(1, tsx, tsy);
128
+ const sx = tsx / maxs || 0;
129
+ const sy = tsy / maxs || 0;
130
+
131
+ // Animate elements larger than 12% of the screen area up to 1.5x slower
132
+ const asa = elBox.width * elBox.height / (window.innerWidth * window.innerHeight);
133
+ const speed = asa > 0.12 ? Math.min(1.5, (asa - 0.12) * 10 + 1) : 1;
134
+ return {
135
+ x: offsetX - (originX + elBox.left),
136
+ y: offsetY - (originY + elBox.top),
137
+ sx,
138
+ sy,
139
+ speed
140
+ };
141
+ }
142
+
143
+ const makeVDialogProps = propsFactory({
144
+ fullscreen: Boolean,
145
+ retainFocus: {
146
+ type: Boolean,
147
+ default: true
148
+ },
149
+ scrollable: Boolean,
150
+ ...makeVOverlayProps({
151
+ origin: 'center center',
152
+ scrollStrategy: 'block',
153
+ transition: {
154
+ component: VDialogTransition
155
+ },
156
+ zIndex: 2400
157
+ })
158
+ }, 'VDialog');
159
+ const VDialog = genericComponent()({
160
+ name: 'VDialog',
161
+ props: makeVDialogProps(),
162
+ emits: {
163
+ 'update:modelValue': value => true,
164
+ afterEnter: () => true,
165
+ afterLeave: () => true
166
+ },
167
+ setup(props, _ref) {
168
+ let {
169
+ emit,
170
+ slots
171
+ } = _ref;
172
+ const isActive = useProxiedModel(props, 'modelValue');
173
+ const {
174
+ scopeId
175
+ } = useScopeId();
176
+ const overlay = ref();
177
+ function onFocusin(e) {
178
+ const before = e.relatedTarget;
179
+ const after = e.target;
180
+ if (before !== after && overlay.value?.contentEl &&
181
+ // We're the topmost dialog
182
+ overlay.value?.globalTop &&
183
+ // It isn't the document or the dialog body
184
+ ![document, overlay.value.contentEl].includes(after) &&
185
+ // It isn't inside the dialog body
186
+ !overlay.value.contentEl.contains(after)) {
187
+ const focusable = focusableChildren(overlay.value.contentEl);
188
+ if (!focusable.length) return;
189
+ const firstElement = focusable[0];
190
+ const lastElement = focusable[focusable.length - 1];
191
+ if (before === firstElement) {
192
+ lastElement.focus();
193
+ } else {
194
+ firstElement.focus();
195
+ }
196
+ }
197
+ }
198
+ if (IN_BROWSER) {
199
+ watch(() => isActive.value && props.retainFocus, val => {
200
+ val ? document.addEventListener('focusin', onFocusin) : document.removeEventListener('focusin', onFocusin);
201
+ }, {
202
+ immediate: true
203
+ });
204
+ }
205
+ function onAfterEnter() {
206
+ emit('afterEnter');
207
+ if (overlay.value?.contentEl && !overlay.value.contentEl.contains(document.activeElement)) {
208
+ overlay.value.contentEl.focus({
209
+ preventScroll: true
210
+ });
211
+ }
212
+ }
213
+ function onAfterLeave() {
214
+ emit('afterLeave');
215
+ }
216
+ watch(isActive, async val => {
217
+ if (!val) {
218
+ await nextTick();
219
+ overlay.value.activatorEl?.focus({
220
+ preventScroll: true
221
+ });
222
+ }
223
+ });
224
+ useRender(() => {
225
+ const overlayProps = VOverlay.filterProps(props);
226
+ const activatorProps = mergeProps({
227
+ 'aria-haspopup': 'dialog'
228
+ }, props.activatorProps);
229
+ const contentProps = mergeProps({
230
+ tabindex: -1
231
+ }, props.contentProps);
232
+ return createVNode(VOverlay, mergeProps({
233
+ "ref": overlay,
234
+ "class": ['v-dialog', {
235
+ 'v-dialog--fullscreen': props.fullscreen,
236
+ 'v-dialog--scrollable': props.scrollable
237
+ }, props.class],
238
+ "style": props.style
239
+ }, overlayProps, {
240
+ "modelValue": isActive.value,
241
+ "onUpdate:modelValue": $event => isActive.value = $event,
242
+ "aria-modal": "true",
243
+ "activatorProps": activatorProps,
244
+ "contentProps": contentProps,
245
+ "role": "dialog",
246
+ "onAfterEnter": onAfterEnter,
247
+ "onAfterLeave": onAfterLeave
248
+ }, scopeId), {
249
+ activator: slots.activator,
250
+ default: function () {
251
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
252
+ args[_key] = arguments[_key];
253
+ }
254
+ return createVNode(VDefaultsProvider, {
255
+ "root": "VDialog"
256
+ }, {
257
+ default: () => [slots.default?.(...args)]
258
+ });
259
+ }
260
+ });
261
+ });
262
+ return forwardRefs({}, overlay);
263
+ }
264
+ });
265
+
266
+ const makeVSheetProps = propsFactory({
267
+ color: String,
268
+ ...makeBorderProps(),
269
+ ...makeComponentProps(),
270
+ ...makeDimensionProps(),
271
+ ...makeElevationProps(),
272
+ ...makeLocationProps(),
273
+ ...makePositionProps(),
274
+ ...makeRoundedProps(),
275
+ ...makeTagProps(),
276
+ ...makeThemeProps()
277
+ }, 'VSheet');
278
+ const VSheet = genericComponent()({
279
+ name: 'VSheet',
280
+ props: makeVSheetProps(),
281
+ setup(props, _ref) {
282
+ let {
283
+ slots
284
+ } = _ref;
285
+ const {
286
+ themeClasses
287
+ } = provideTheme(props);
288
+ const {
289
+ backgroundColorClasses,
290
+ backgroundColorStyles
291
+ } = useBackgroundColor(toRef(props, 'color'));
292
+ const {
293
+ borderClasses
294
+ } = useBorder(props);
295
+ const {
296
+ dimensionStyles
297
+ } = useDimension(props);
298
+ const {
299
+ elevationClasses
300
+ } = useElevation(props);
301
+ const {
302
+ locationStyles
303
+ } = useLocation(props);
304
+ const {
305
+ positionClasses
306
+ } = usePosition(props);
307
+ const {
308
+ roundedClasses
309
+ } = useRounded(props);
310
+ useRender(() => createVNode(props.tag, {
311
+ "class": ['v-sheet', themeClasses.value, backgroundColorClasses.value, borderClasses.value, elevationClasses.value, positionClasses.value, roundedClasses.value, props.class],
312
+ "style": [backgroundColorStyles.value, dimensionStyles.value, locationStyles.value, props.style]
313
+ }, slots));
314
+ return {};
315
+ }
316
+ });
317
+
318
+ const _hoisted_1 = { key: 1 };
319
+
320
+
321
+ const _sfc_main = {
322
+ __name: 'PopUp',
323
+ props: /*@__PURE__*/mergeModels({
324
+ widget: {
325
+ /** @type {import("vue").PropType<import("@/types").Widget>} */
326
+ type: Object,
327
+ default: undefined,
328
+ },
329
+ }, {
330
+ "modelValue": { type: Boolean, required: true, default: false },
331
+ "modelModifiers": {},
332
+ }),
333
+ emits: ["update:modelValue"],
334
+ setup(__props) {
335
+
336
+ const dialog = useModel(__props, "modelValue");
337
+
338
+ const props = __props;
339
+
340
+ const [definedWidget] = useDefineWidgets([props?.widget]);
341
+
342
+ return (_ctx, _cache) => {
343
+
344
+
345
+
346
+ return (openBlock(), createElementBlock("span", null, [
347
+ createVNode(VDialog, {
348
+ "max-width": "500px",
349
+ "max-height": "500px",
350
+ absolute: "",
351
+ scrollable: "",
352
+ "scroll-strategy": "block",
353
+ "close-on-back": "",
354
+ modelValue: dialog.value,
355
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = $event => ((dialog).value = $event))
356
+ }, {
357
+ default: withCtx(() => [
358
+ createVNode(VSheet, null, {
359
+ default: withCtx(() => [
360
+ (__props.widget)
361
+ ? (openBlock(), createBlock(resolveDynamicComponent(unref(definedWidget).component), mergeProps({
362
+ key: unref(definedWidget).id
363
+ }, unref(definedWidget).props), null, 16 /* FULL_PROPS */))
364
+ : createCommentVNode("v-if", true),
365
+ (_ctx.$slots.default)
366
+ ? (openBlock(), createElementBlock("span", _hoisted_1, [
367
+ renderSlot(_ctx.$slots, "default")
368
+ ]))
369
+ : createCommentVNode("v-if", true)
370
+ ]),
371
+ _: 3 /* FORWARDED */
372
+ })
373
+ ]),
374
+ _: 3 /* FORWARDED */
375
+ }, 8 /* PROPS */, ["modelValue"])
376
+ ]))
377
+ }
378
+ }
379
+
380
+ };
381
+
382
+ export { _sfc_main as default };