@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,384 @@
1
+ import { createVNode, computed, toRef, shallowRef, ref, watch, onBeforeMount, nextTick, onBeforeUnmount, withDirectives, mergeProps, Fragment, resolveDirective, vShow } from 'vue';
2
+ import { aw as SUPPORTS_INTERSECTION, p as propsFactory, b as makeComponentProps, J as makeDimensionProps, g as genericComponent, K as useDimension, a as useRender, N as makeRoundedProps, C as useBackgroundColor, Q as useRounded, ax as getCurrentInstance, q as convertToUnit } from './asWebComponent-6g8pz2_C.js';
3
+ import { m as makeTransitionProps, M as MaybeTransition } from './transition-CGVKXZbS.js';
4
+
5
+ // Utilities
6
+ function mounted(el, binding) {
7
+ if (!SUPPORTS_INTERSECTION) return;
8
+ const modifiers = binding.modifiers || {};
9
+ const value = binding.value;
10
+ const {
11
+ handler,
12
+ options
13
+ } = typeof value === 'object' ? value : {
14
+ handler: value,
15
+ options: {}
16
+ };
17
+ const observer = new IntersectionObserver(function () {
18
+ let entries = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
19
+ let observer = arguments.length > 1 ? arguments[1] : undefined;
20
+ const _observe = el._observe?.[binding.instance.$.uid];
21
+ if (!_observe) return; // Just in case, should never fire
22
+
23
+ const isIntersecting = entries.some(entry => entry.isIntersecting);
24
+
25
+ // If is not quiet or has already been
26
+ // initted, invoke the user callback
27
+ if (handler && (!modifiers.quiet || _observe.init) && (!modifiers.once || isIntersecting || _observe.init)) {
28
+ handler(isIntersecting, entries, observer);
29
+ }
30
+ if (isIntersecting && modifiers.once) unmounted(el, binding);else _observe.init = true;
31
+ }, options);
32
+ el._observe = Object(el._observe);
33
+ el._observe[binding.instance.$.uid] = {
34
+ init: false,
35
+ observer
36
+ };
37
+ observer.observe(el);
38
+ }
39
+ function unmounted(el, binding) {
40
+ const observe = el._observe?.[binding.instance.$.uid];
41
+ if (!observe) return;
42
+ observe.observer.unobserve(el);
43
+ delete el._observe[binding.instance.$.uid];
44
+ }
45
+ const Intersect = {
46
+ mounted,
47
+ unmounted
48
+ };
49
+
50
+ function useAspectStyles(props) {
51
+ return {
52
+ aspectStyles: computed(() => {
53
+ const ratio = Number(props.aspectRatio);
54
+ return ratio ? {
55
+ paddingBottom: String(1 / ratio * 100) + '%'
56
+ } : undefined;
57
+ })
58
+ };
59
+ }
60
+ const makeVResponsiveProps = propsFactory({
61
+ aspectRatio: [String, Number],
62
+ contentClass: null,
63
+ inline: Boolean,
64
+ ...makeComponentProps(),
65
+ ...makeDimensionProps()
66
+ }, 'VResponsive');
67
+ const VResponsive = genericComponent()({
68
+ name: 'VResponsive',
69
+ props: makeVResponsiveProps(),
70
+ setup(props, _ref) {
71
+ let {
72
+ slots
73
+ } = _ref;
74
+ const {
75
+ aspectStyles
76
+ } = useAspectStyles(props);
77
+ const {
78
+ dimensionStyles
79
+ } = useDimension(props);
80
+ useRender(() => createVNode("div", {
81
+ "class": ['v-responsive', {
82
+ 'v-responsive--inline': props.inline
83
+ }, props.class],
84
+ "style": [dimensionStyles.value, props.style]
85
+ }, [createVNode("div", {
86
+ "class": "v-responsive__sizer",
87
+ "style": aspectStyles.value
88
+ }, null), slots.additional?.(), slots.default && createVNode("div", {
89
+ "class": ['v-responsive__content', props.contentClass]
90
+ }, [slots.default()])]));
91
+ return {};
92
+ }
93
+ });
94
+
95
+ // not intended for public use, this is passed in by vuetify-loader
96
+ const makeVImgProps = propsFactory({
97
+ absolute: Boolean,
98
+ alt: String,
99
+ cover: Boolean,
100
+ color: String,
101
+ draggable: {
102
+ type: [Boolean, String],
103
+ default: undefined
104
+ },
105
+ eager: Boolean,
106
+ gradient: String,
107
+ lazySrc: String,
108
+ options: {
109
+ type: Object,
110
+ // For more information on types, navigate to:
111
+ // https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API
112
+ default: () => ({
113
+ root: undefined,
114
+ rootMargin: undefined,
115
+ threshold: undefined
116
+ })
117
+ },
118
+ sizes: String,
119
+ src: {
120
+ type: [String, Object],
121
+ default: ''
122
+ },
123
+ crossorigin: String,
124
+ referrerpolicy: String,
125
+ srcset: String,
126
+ position: String,
127
+ ...makeVResponsiveProps(),
128
+ ...makeComponentProps(),
129
+ ...makeRoundedProps(),
130
+ ...makeTransitionProps()
131
+ }, 'VImg');
132
+ const VImg = genericComponent()({
133
+ name: 'VImg',
134
+ directives: {
135
+ intersect: Intersect
136
+ },
137
+ props: makeVImgProps(),
138
+ emits: {
139
+ loadstart: value => true,
140
+ load: value => true,
141
+ error: value => true
142
+ },
143
+ setup(props, _ref) {
144
+ let {
145
+ emit,
146
+ slots
147
+ } = _ref;
148
+ const {
149
+ backgroundColorClasses,
150
+ backgroundColorStyles
151
+ } = useBackgroundColor(toRef(props, 'color'));
152
+ const {
153
+ roundedClasses
154
+ } = useRounded(props);
155
+ const vm = getCurrentInstance('VImg');
156
+ const currentSrc = shallowRef(''); // Set from srcset
157
+ const image = ref();
158
+ const state = shallowRef(props.eager ? 'loading' : 'idle');
159
+ const naturalWidth = shallowRef();
160
+ const naturalHeight = shallowRef();
161
+ const normalisedSrc = computed(() => {
162
+ return props.src && typeof props.src === 'object' ? {
163
+ src: props.src.src,
164
+ srcset: props.srcset || props.src.srcset,
165
+ lazySrc: props.lazySrc || props.src.lazySrc,
166
+ aspect: Number(props.aspectRatio || props.src.aspect || 0)
167
+ } : {
168
+ src: props.src,
169
+ srcset: props.srcset,
170
+ lazySrc: props.lazySrc,
171
+ aspect: Number(props.aspectRatio || 0)
172
+ };
173
+ });
174
+ const aspectRatio = computed(() => {
175
+ return normalisedSrc.value.aspect || naturalWidth.value / naturalHeight.value || 0;
176
+ });
177
+ watch(() => props.src, () => {
178
+ init(state.value !== 'idle');
179
+ });
180
+ watch(aspectRatio, (val, oldVal) => {
181
+ if (!val && oldVal && image.value) {
182
+ pollForSize(image.value);
183
+ }
184
+ });
185
+
186
+ // TODO: getSrc when window width changes
187
+
188
+ onBeforeMount(() => init());
189
+ function init(isIntersecting) {
190
+ if (props.eager && isIntersecting) return;
191
+ if (SUPPORTS_INTERSECTION && !isIntersecting && !props.eager) return;
192
+ state.value = 'loading';
193
+ if (normalisedSrc.value.lazySrc) {
194
+ const lazyImg = new Image();
195
+ lazyImg.src = normalisedSrc.value.lazySrc;
196
+ pollForSize(lazyImg, null);
197
+ }
198
+ if (!normalisedSrc.value.src) return;
199
+ nextTick(() => {
200
+ emit('loadstart', image.value?.currentSrc || normalisedSrc.value.src);
201
+ setTimeout(() => {
202
+ if (vm.isUnmounted) return;
203
+ if (image.value?.complete) {
204
+ if (!image.value.naturalWidth) {
205
+ onError();
206
+ }
207
+ if (state.value === 'error') return;
208
+ if (!aspectRatio.value) pollForSize(image.value, null);
209
+ if (state.value === 'loading') onLoad();
210
+ } else {
211
+ if (!aspectRatio.value) pollForSize(image.value);
212
+ getSrc();
213
+ }
214
+ });
215
+ });
216
+ }
217
+ function onLoad() {
218
+ if (vm.isUnmounted) return;
219
+ getSrc();
220
+ pollForSize(image.value);
221
+ state.value = 'loaded';
222
+ emit('load', image.value?.currentSrc || normalisedSrc.value.src);
223
+ }
224
+ function onError() {
225
+ if (vm.isUnmounted) return;
226
+ state.value = 'error';
227
+ emit('error', image.value?.currentSrc || normalisedSrc.value.src);
228
+ }
229
+ function getSrc() {
230
+ const img = image.value;
231
+ if (img) currentSrc.value = img.currentSrc || img.src;
232
+ }
233
+ let timer = -1;
234
+ onBeforeUnmount(() => {
235
+ clearTimeout(timer);
236
+ });
237
+ function pollForSize(img) {
238
+ let timeout = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 100;
239
+ const poll = () => {
240
+ clearTimeout(timer);
241
+ if (vm.isUnmounted) return;
242
+ const {
243
+ naturalHeight: imgHeight,
244
+ naturalWidth: imgWidth
245
+ } = img;
246
+ if (imgHeight || imgWidth) {
247
+ naturalWidth.value = imgWidth;
248
+ naturalHeight.value = imgHeight;
249
+ } else if (!img.complete && state.value === 'loading' && timeout != null) {
250
+ timer = window.setTimeout(poll, timeout);
251
+ } else if (img.currentSrc.endsWith('.svg') || img.currentSrc.startsWith('data:image/svg+xml')) {
252
+ naturalWidth.value = 1;
253
+ naturalHeight.value = 1;
254
+ }
255
+ };
256
+ poll();
257
+ }
258
+ const containClasses = computed(() => ({
259
+ 'v-img__img--cover': props.cover,
260
+ 'v-img__img--contain': !props.cover
261
+ }));
262
+ const __image = () => {
263
+ if (!normalisedSrc.value.src || state.value === 'idle') return null;
264
+ const img = createVNode("img", {
265
+ "class": ['v-img__img', containClasses.value],
266
+ "style": {
267
+ objectPosition: props.position
268
+ },
269
+ "src": normalisedSrc.value.src,
270
+ "srcset": normalisedSrc.value.srcset,
271
+ "alt": props.alt,
272
+ "crossorigin": props.crossorigin,
273
+ "referrerpolicy": props.referrerpolicy,
274
+ "draggable": props.draggable,
275
+ "sizes": props.sizes,
276
+ "ref": image,
277
+ "onLoad": onLoad,
278
+ "onError": onError
279
+ }, null);
280
+ const sources = slots.sources?.();
281
+ return createVNode(MaybeTransition, {
282
+ "transition": props.transition,
283
+ "appear": true
284
+ }, {
285
+ default: () => [withDirectives(sources ? createVNode("picture", {
286
+ "class": "v-img__picture"
287
+ }, [sources, img]) : img, [[vShow, state.value === 'loaded']])]
288
+ });
289
+ };
290
+ const __preloadImage = () => createVNode(MaybeTransition, {
291
+ "transition": props.transition
292
+ }, {
293
+ default: () => [normalisedSrc.value.lazySrc && state.value !== 'loaded' && createVNode("img", {
294
+ "class": ['v-img__img', 'v-img__img--preload', containClasses.value],
295
+ "style": {
296
+ objectPosition: props.position
297
+ },
298
+ "src": normalisedSrc.value.lazySrc,
299
+ "alt": props.alt,
300
+ "crossorigin": props.crossorigin,
301
+ "referrerpolicy": props.referrerpolicy,
302
+ "draggable": props.draggable
303
+ }, null)]
304
+ });
305
+ const __placeholder = () => {
306
+ if (!slots.placeholder) return null;
307
+ return createVNode(MaybeTransition, {
308
+ "transition": props.transition,
309
+ "appear": true
310
+ }, {
311
+ default: () => [(state.value === 'loading' || state.value === 'error' && !slots.error) && createVNode("div", {
312
+ "class": "v-img__placeholder"
313
+ }, [slots.placeholder()])]
314
+ });
315
+ };
316
+ const __error = () => {
317
+ if (!slots.error) return null;
318
+ return createVNode(MaybeTransition, {
319
+ "transition": props.transition,
320
+ "appear": true
321
+ }, {
322
+ default: () => [state.value === 'error' && createVNode("div", {
323
+ "class": "v-img__error"
324
+ }, [slots.error()])]
325
+ });
326
+ };
327
+ const __gradient = () => {
328
+ if (!props.gradient) return null;
329
+ return createVNode("div", {
330
+ "class": "v-img__gradient",
331
+ "style": {
332
+ backgroundImage: `linear-gradient(${props.gradient})`
333
+ }
334
+ }, null);
335
+ };
336
+ const isBooted = shallowRef(false);
337
+ {
338
+ const stop = watch(aspectRatio, val => {
339
+ if (val) {
340
+ // Doesn't work with nextTick, idk why
341
+ requestAnimationFrame(() => {
342
+ requestAnimationFrame(() => {
343
+ isBooted.value = true;
344
+ });
345
+ });
346
+ stop();
347
+ }
348
+ });
349
+ }
350
+ useRender(() => {
351
+ const responsiveProps = VResponsive.filterProps(props);
352
+ return withDirectives(createVNode(VResponsive, mergeProps({
353
+ "class": ['v-img', {
354
+ 'v-img--absolute': props.absolute,
355
+ 'v-img--booting': !isBooted.value
356
+ }, backgroundColorClasses.value, roundedClasses.value, props.class],
357
+ "style": [{
358
+ width: convertToUnit(props.width === 'auto' ? naturalWidth.value : props.width)
359
+ }, backgroundColorStyles.value, props.style]
360
+ }, responsiveProps, {
361
+ "aspectRatio": aspectRatio.value,
362
+ "aria-label": props.alt,
363
+ "role": props.alt ? 'img' : undefined
364
+ }), {
365
+ additional: () => createVNode(Fragment, null, [createVNode(__image, null, null), createVNode(__preloadImage, null, null), createVNode(__gradient, null, null), createVNode(__placeholder, null, null), createVNode(__error, null, null)]),
366
+ default: slots.default
367
+ }), [[resolveDirective("intersect"), {
368
+ handler: init,
369
+ options: props.options
370
+ }, null, {
371
+ once: true
372
+ }]]);
373
+ });
374
+ return {
375
+ currentSrc,
376
+ image,
377
+ state,
378
+ naturalWidth,
379
+ naturalHeight
380
+ };
381
+ }
382
+ });
383
+
384
+ export { VImg as V };
@@ -0,0 +1,43 @@
1
+ import { createVNode } from 'vue';
2
+ import { p as propsFactory, b as makeComponentProps, J as makeDimensionProps, c as makeTagProps, g as genericComponent, K as useDimension, H as useLayout, a as useRender } from './asWebComponent-6g8pz2_C.js';
3
+ import { u as useSsrBoot } from './ssrBoot-BP7SYRyC.js';
4
+
5
+ const makeVMainProps = propsFactory({
6
+ scrollable: Boolean,
7
+ ...makeComponentProps(),
8
+ ...makeDimensionProps(),
9
+ ...makeTagProps({
10
+ tag: 'main'
11
+ })
12
+ }, 'VMain');
13
+ const VMain = genericComponent()({
14
+ name: 'VMain',
15
+ props: makeVMainProps(),
16
+ setup(props, _ref) {
17
+ let {
18
+ slots
19
+ } = _ref;
20
+ const {
21
+ dimensionStyles
22
+ } = useDimension(props);
23
+ const {
24
+ mainStyles
25
+ } = useLayout();
26
+ const {
27
+ ssrBootStyles
28
+ } = useSsrBoot();
29
+ useRender(() => createVNode(props.tag, {
30
+ "class": ['v-main', {
31
+ 'v-main--scrollable': props.scrollable
32
+ }, props.class],
33
+ "style": [mainStyles.value, ssrBootStyles.value, dimensionStyles.value, props.style]
34
+ }, {
35
+ default: () => [props.scrollable ? createVNode("div", {
36
+ "class": "v-main__scroller"
37
+ }, [slots.default?.()]) : slots.default?.()]
38
+ }));
39
+ return {};
40
+ }
41
+ });
42
+
43
+ export { VMain as V };