@eodash/eodash 5.0.0-alpha.2.19 → 5.0.0-alpha.2.20
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.
- package/core/client/App.vue +11 -1
- package/core/client/asWebComponent.js +9 -2
- package/core/client/views/Dashboard.vue +17 -46
- package/dist/client/DashboardLayout-CPIA_V5h.js +86 -0
- package/dist/client/DynamicWebComponent-Bm2S0izi.js +88 -0
- package/dist/client/EodashDatePicker-Tdk5Xx9F.js +393 -0
- package/dist/client/EodashItemFilter-BUyqlf5G.js +194 -0
- package/dist/client/EodashLayerControl-DRYy-Air.js +111 -0
- package/dist/client/EodashMap-B_F51bLD.js +472 -0
- package/dist/client/EodashMapBtns-COBF3RhH.js +66 -0
- package/dist/client/ExportState-DkDHsbWL.js +644 -0
- package/dist/client/Footer-D8rQVlJH.js +141 -0
- package/dist/client/Header-CasZzQOl.js +437 -0
- package/dist/client/IframeWrapper-BgM9aU8f.js +28 -0
- package/dist/client/MobileLayout-CukFMuL9.js +1210 -0
- package/dist/client/PopUp-BXrxWSQ4.js +382 -0
- package/dist/client/VImg-DB_1xaqP.js +384 -0
- package/dist/client/VMain-nLmJhfgS.js +43 -0
- package/dist/client/VOverlay-naLhQSyZ.js +1453 -0
- package/dist/client/WidgetsContainer-CQY2xBg1.js +83 -0
- package/dist/client/asWebComponent-CIm1IGNl.js +11556 -0
- package/dist/client/eo-dash.js +2 -6
- package/dist/client/forwardRefs-q4ZkKtOv.js +245 -0
- package/dist/client/index-D-kMSCQA.js +199 -0
- package/dist/client/ssrBoot-BP7SYRyC.js +22 -0
- package/dist/client/style.css +2 -2
- package/dist/client/transition-DKGepKqs.js +37 -0
- package/dist/node/cli.js +5 -5
- package/dist/node/types.d.ts +2 -0
- package/package.json +21 -19
- package/widgets/EodashDatePicker.vue +20 -9
- package/core/client/SuspensedDashboard.ce.vue +0 -105
- package/dist/client/DashboardLayout-CU4js3lr.js +0 -156
- package/dist/client/DynamicWebComponent-BsYZdIEB.js +0 -57
- package/dist/client/EodashDatePicker-DZoH_gRX.js +0 -276
- package/dist/client/EodashItemFilter-CHBfsFSm.js +0 -7666
- package/dist/client/EodashLayerControl-CuY-cAx8.js +0 -24665
- package/dist/client/EodashMap-Ch43fWNv.js +0 -88369
- package/dist/client/EodashMapBtns-CFA2uti4.js +0 -50
- package/dist/client/ExportState-C6raDjTt.js +0 -570
- package/dist/client/Footer-D8T5ROhF.js +0 -117
- package/dist/client/Header-B8B4Z5R9.js +0 -350
- package/dist/client/IframeWrapper-BK2JxzSJ.js +0 -19
- package/dist/client/MobileLayout-aZaYvF8V.js +0 -947
- package/dist/client/PopUp-DdHXoNOP.js +0 -300
- package/dist/client/VImg-yb8O1cb8.js +0 -293
- package/dist/client/VMain-Dknnyxts.js +0 -38
- package/dist/client/VOverlay-BCOn3hd6.js +0 -973
- package/dist/client/WidgetsContainer-BixUyr1e.js +0 -129
- package/dist/client/asWebComponent-CHqY8A1z.js +0 -24636
- package/dist/client/basedecoder-DHcBySSe-BmCFNFnw.js +0 -88
- package/dist/client/decoder-DJlmx386-DJlmx386.js +0 -8
- package/dist/client/deflate-BXt-9JA_-CWfClgpK.js +0 -10
- package/dist/client/eox-stacinfo-l7ALSV90.js +0 -13969
- package/dist/client/forwardRefs-dcYA2XVU.js +0 -185
- package/dist/client/index-BVuSHaVu.js +0 -153
- package/dist/client/jpeg-BAgeD1d3-oeHbFPUL.js +0 -514
- package/dist/client/lerc-BPVtQnt3-08GHszVp.js +0 -1027
- package/dist/client/lzw-LAGDNbSC-DkP96qO9.js +0 -84
- package/dist/client/packbits-BlDR4Kj5-C66n1-zr.js +0 -24
- package/dist/client/pako.esm-CB1uQYY0-DB0PYm1P.js +0 -1081
- package/dist/client/raw-CMGvRjfu-BRi6E4i1.js +0 -9
- package/dist/client/ssrBoot-DU2S_nLc.js +0 -17
- package/dist/client/transition-C_fi1aa6.js +0 -34
- package/dist/client/webfontloader-Ofarvipf.js +0 -435
- package/dist/client/webimage-BM_pbLN3-L2cGWK5l.js +0 -19
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import { ref, toRef, shallowRef, computed, createVNode, watchEffect, inject, openBlock, createBlock, unref, withCtx, createElementVNode, toDisplayString, createTextVNode } from 'vue';
|
|
2
|
+
import { p as propsFactory, L as makeBorderProps, b as makeComponentProps, M as makeElevationProps, U as makeLayoutItemProps, N as makeRoundedProps, c as makeTagProps, d as makeThemeProps, g as genericComponent, e as provideTheme, C as useBackgroundColor, O as useBorder, P as useElevation, Q as useRounded, v as useResizeObserver, W as useToggleScope, a as useRender, q as convertToUnit, X as useLayoutItem, _ as _export_sfc, F as eodashKey, t as useDisplay } from './asWebComponent-CIm1IGNl.js';
|
|
3
|
+
|
|
4
|
+
const makeVFooterProps = propsFactory({
|
|
5
|
+
app: Boolean,
|
|
6
|
+
color: String,
|
|
7
|
+
height: {
|
|
8
|
+
type: [Number, String],
|
|
9
|
+
default: 'auto'
|
|
10
|
+
},
|
|
11
|
+
...makeBorderProps(),
|
|
12
|
+
...makeComponentProps(),
|
|
13
|
+
...makeElevationProps(),
|
|
14
|
+
...makeLayoutItemProps(),
|
|
15
|
+
...makeRoundedProps(),
|
|
16
|
+
...makeTagProps({
|
|
17
|
+
tag: 'footer'
|
|
18
|
+
}),
|
|
19
|
+
...makeThemeProps()
|
|
20
|
+
}, 'VFooter');
|
|
21
|
+
const VFooter = genericComponent()({
|
|
22
|
+
name: 'VFooter',
|
|
23
|
+
props: makeVFooterProps(),
|
|
24
|
+
setup(props, _ref) {
|
|
25
|
+
let {
|
|
26
|
+
slots
|
|
27
|
+
} = _ref;
|
|
28
|
+
const layoutItemStyles = ref();
|
|
29
|
+
const {
|
|
30
|
+
themeClasses
|
|
31
|
+
} = provideTheme(props);
|
|
32
|
+
const {
|
|
33
|
+
backgroundColorClasses,
|
|
34
|
+
backgroundColorStyles
|
|
35
|
+
} = useBackgroundColor(toRef(props, 'color'));
|
|
36
|
+
const {
|
|
37
|
+
borderClasses
|
|
38
|
+
} = useBorder(props);
|
|
39
|
+
const {
|
|
40
|
+
elevationClasses
|
|
41
|
+
} = useElevation(props);
|
|
42
|
+
const {
|
|
43
|
+
roundedClasses
|
|
44
|
+
} = useRounded(props);
|
|
45
|
+
const autoHeight = shallowRef(32);
|
|
46
|
+
const {
|
|
47
|
+
resizeRef
|
|
48
|
+
} = useResizeObserver(entries => {
|
|
49
|
+
if (!entries.length) return;
|
|
50
|
+
autoHeight.value = entries[0].target.clientHeight;
|
|
51
|
+
});
|
|
52
|
+
const height = computed(() => props.height === 'auto' ? autoHeight.value : parseInt(props.height, 10));
|
|
53
|
+
useToggleScope(() => props.app, () => {
|
|
54
|
+
const layout = useLayoutItem({
|
|
55
|
+
id: props.name,
|
|
56
|
+
order: computed(() => parseInt(props.order, 10)),
|
|
57
|
+
position: computed(() => 'bottom'),
|
|
58
|
+
layoutSize: height,
|
|
59
|
+
elementSize: computed(() => props.height === 'auto' ? undefined : height.value),
|
|
60
|
+
active: computed(() => props.app),
|
|
61
|
+
absolute: toRef(props, 'absolute')
|
|
62
|
+
});
|
|
63
|
+
watchEffect(() => {
|
|
64
|
+
layoutItemStyles.value = layout.layoutItemStyles.value;
|
|
65
|
+
});
|
|
66
|
+
});
|
|
67
|
+
useRender(() => createVNode(props.tag, {
|
|
68
|
+
"ref": resizeRef,
|
|
69
|
+
"class": ['v-footer', themeClasses.value, backgroundColorClasses.value, borderClasses.value, elevationClasses.value, roundedClasses.value, props.class],
|
|
70
|
+
"style": [backgroundColorStyles.value, props.app ? layoutItemStyles.value : {
|
|
71
|
+
height: convertToUnit(props.height)
|
|
72
|
+
}, props.style]
|
|
73
|
+
}, slots));
|
|
74
|
+
return {};
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
const _hoisted_1 = { class: "pt-0 footer-text" };
|
|
79
|
+
const _hoisted_2 = {
|
|
80
|
+
href: "https://eox.at",
|
|
81
|
+
target: "_blank",
|
|
82
|
+
class: "text-white"
|
|
83
|
+
};
|
|
84
|
+
const _hoisted_3 = ["src"];
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Footer template ref
|
|
88
|
+
*
|
|
89
|
+
* @type {import("vue").Ref<
|
|
90
|
+
* import("vuetify/lib/components/index.mjs").VFooter | null
|
|
91
|
+
* >}
|
|
92
|
+
*/
|
|
93
|
+
const eoxLogo = `<svg width="100%" height="100%" viewBox="0 0 355 85" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:1.41421;"><g id="ink_ext_XXXXXX"><path id="path5076" d="M152.986,40.52l-0.75,-0.019l-0.737,-0.056l-0.725,-0.093l-0.713,-0.127l-0.7,-0.162l-0.7,-0.196l-0.675,-0.228l-0.65,-0.261l-0.65,-0.292l-0.625,-0.319l-0.612,-0.352l-0.588,-0.377l-0.562,-0.407l-0.55,-0.431l-0.538,-0.457l-0.5,-0.481l-0.487,-0.505l-0.45,-0.528l-0.438,-0.55l-0.4,-0.57l-0.375,-0.59l-0.35,-0.609l-0.325,-0.627l-0.287,-0.645l-0.263,-0.66l-0.225,-0.676l-0.2,-0.69l-0.162,-0.704l-0.125,-0.717l-0.1,-0.728l-0.05,-0.739l-0.025,-0.748c0,-8.023 6.512,-14.532 14.537,-14.532c8.038,0 14.538,6.509 14.538,14.532c0,8.036 -6.5,14.544 -14.538,14.544Z" style="fill:none;"/><path id="path5078" d="M165.748,-0.002c-42.009,0 -76.06,18.985 -76.06,42.402c0,13.268 10.921,25.102 28.021,32.875c-8.081,-5.487 -13.403,-12.973 -14.584,-21.859c-2.685,-20.186 16.83,-40.82 45.148,-49.615c-14.687,6.665 -24.923,21.427 -24.923,38.599c0,23.218 18.648,42.046 41.773,42.383c-0.037,0.005 -0.087,0.015 -0.137,0.02c0.263,0 0.512,0.009 0.762,0.009c42.013,0 76.076,-18.984 76.076,-42.412c0,-13.261 -10.937,-25.097 -28.037,-32.871l0.75,0.522l0.736,0.531l0.713,0.543l0.7,0.555l0.687,0.566l0.664,0.578l0.649,0.588l0.625,0.6l0.613,0.609l0.588,0.621l0.574,0.631l0.562,0.643l0.538,0.652l0.513,0.662l0.5,0.672l0.475,0.684l0.449,0.693l0.438,0.703l0.425,0.713l0.387,0.723l0.375,0.73l0.352,0.74l0.336,0.75l0.3,0.76l0.287,0.77l0.264,0.777l0.25,0.787l0.211,0.795l0.188,0.805l0.175,0.812l0.151,0.82l0.125,0.831c2.675,20.19 -16.838,40.825 -45.151,49.619c14.688,-6.665 24.926,-21.426 24.926,-38.614c0,-23.202 -18.65,-42.026 -41.775,-42.367c0.05,-0.005 0.1,-0.015 0.15,-0.025c-0.262,0 -0.526,-0.01 -0.789,-0.01Zm-13.248,11.314c7.817,0 14.25,6.433 14.25,14.25c0,0.001 0,0.001 0,0.001c0,7.817 -6.433,14.249 -14.25,14.249c-7.817,0 -14.25,-6.432 -14.25,-14.249c0,-0.001 0,-0.001 0,-0.001c0,-7.817 6.433,-14.25 14.25,-14.25Z" style="fill:#fff;fill-rule:nonzero;"/><path id="path5080" d="M213.786,9.529l0.75,0.521l0.738,0.532l0.712,0.544l0.7,0.555l0.688,0.566l0.662,0.577l0.65,0.588l0.625,0.6l0.613,0.61l0.587,0.62l0.575,0.631l0.563,0.643l0.537,0.652l0.513,0.663l0.5,0.672l0.475,0.684l0.45,0.692l0.437,0.703l0.425,0.712l0.388,0.723l0.375,0.731l0.35,0.741l0.337,0.75l0.3,0.76l0.288,0.769l0.262,0.777l0.25,0.786l0.213,0.797l0.187,0.804l0.175,0.812l0.15,0.821l0.125,0.83c2.675,20.19 -16.837,40.825 -45.15,49.619c14.688,-6.665 24.925,-21.426 24.925,-38.614c0,-23.202 -18.65,-42.025 -41.775,-42.367c0.05,-0.005 0.1,-0.015 0.15,-0.025c-0.262,0 -0.525,-0.01 -0.787,-0.01c-42.01,0 -76.062,18.985 -76.062,42.402c0,13.268 10.922,25.103 28.022,32.876c-8.081,-5.487 -13.403,-12.973 -14.584,-21.859c-2.685,-20.187 16.831,-40.82 45.149,-49.615c-14.688,6.665 -24.925,21.426 -24.925,38.598c0,23.218 18.65,42.046 41.775,42.383c-0.038,0.005 -0.088,0.015 -0.138,0.02c0.263,0 0.513,0.01 0.763,0.01c42.012,-0.001 76.075,-18.985 76.075,-42.413c0,-13.261 -10.938,-25.097 -28.038,-32.871Z" style="fill:none;"/><path id="path5082" d="M354.323,82.586l-41.999,-42.002l38.524,-38.515l-29.913,0l-23.562,23.559l-23.563,-23.559l-29.924,0l38.525,38.515l-42,42.002l29.913,0l27.049,-27.046l27.05,27.046l29.9,0" style="fill:#fff;fill-rule:nonzero;"/><path id="path5084" d="M354.323,82.586l-41.999,-42.002l38.524,-38.515l-29.913,0l-23.562,23.559l-23.563,-23.559l-29.924,0l38.525,38.515l-42,42.002l29.913,0l27.049,-27.046l27.05,27.046l29.9,0Z" style="fill:none;"/><path id="path5086" d="M0,2.069l75.033,0l0,16.489l-51.629,0l0,14.931l40.258,0l0,16.495l-40.258,0l0,16.05l53.124,0l0,16.488l-76.528,0l0,-80.453" style="fill:#fff;fill-rule:nonzero;"/><path id="path5088" d="M0,2.069l75.033,0l0,16.489l-51.629,0l0,14.931l40.258,0l0,16.495l-40.258,0l0,16.05l53.124,0l0,16.488l-76.528,0l0,-80.453Z" style="fill:none;"/></g></svg>`;
|
|
94
|
+
|
|
95
|
+
const _sfc_main = {
|
|
96
|
+
__name: 'Footer',
|
|
97
|
+
setup(__props) {
|
|
98
|
+
|
|
99
|
+
const footer = ref(null);
|
|
100
|
+
const eodash = /** @type {import("@/types").Eodash} */ (inject(eodashKey));
|
|
101
|
+
|
|
102
|
+
const { mdAndDown } = useDisplay();
|
|
103
|
+
const base64Logo = window.btoa(eoxLogo);
|
|
104
|
+
|
|
105
|
+
return (_ctx, _cache) => {
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
return (openBlock(), createBlock(VFooter, {
|
|
109
|
+
ref_key: "footer",
|
|
110
|
+
ref: footer,
|
|
111
|
+
height: unref(mdAndDown) ? '48px' : 'auto',
|
|
112
|
+
color: "secondary",
|
|
113
|
+
app: "",
|
|
114
|
+
class: "d-flex justify-space-between"
|
|
115
|
+
}, {
|
|
116
|
+
default: withCtx(() => [
|
|
117
|
+
createElementVNode("p", _hoisted_1, toDisplayString(unref(eodash).brand.footerText ?? ""), 1 /* TEXT */),
|
|
118
|
+
createElementVNode("div", null, [
|
|
119
|
+
_cache[0] || (_cache[0] = createElementVNode("a", {
|
|
120
|
+
href: "https://github.com/eodash/eodash",
|
|
121
|
+
class: "text-white",
|
|
122
|
+
target: "_blank"
|
|
123
|
+
}, "eodash", -1 /* HOISTED */)),
|
|
124
|
+
_cache[1] || (_cache[1] = createTextVNode(" by ")),
|
|
125
|
+
createElementVNode("a", _hoisted_2, [
|
|
126
|
+
createElementVNode("img", {
|
|
127
|
+
src: `data:image/svg+xml;base64,${unref(base64Logo)}`,
|
|
128
|
+
height: "11px"
|
|
129
|
+
}, null, 8 /* PROPS */, _hoisted_3)
|
|
130
|
+
])
|
|
131
|
+
])
|
|
132
|
+
]),
|
|
133
|
+
_: 1 /* STABLE */
|
|
134
|
+
}, 8 /* PROPS */, ["height"]))
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
};
|
|
139
|
+
const Footer = /*#__PURE__*/_export_sfc(_sfc_main, [['__scopeId',"data-v-7ea19f1b"]]);
|
|
140
|
+
|
|
141
|
+
export { Footer as default };
|
|
@@ -0,0 +1,437 @@
|
|
|
1
|
+
import { createVNode, toRef, shallowRef, computed, ref, watch, onMounted, onBeforeUnmount, mergeProps, watchEffect, inject, openBlock, createBlock, withCtx, createTextVNode, toDisplayString, unref } from 'vue';
|
|
2
|
+
import { p as propsFactory, b as makeComponentProps, c as makeTagProps, g as genericComponent, a as useRender, L as makeBorderProps, M as makeElevationProps, N as makeRoundedProps, d as makeThemeProps, C as useBackgroundColor, O as useBorder, P as useElevation, Q as useRounded, e as provideTheme, f as useRtl, D as provideDefaults, R as VDefaultsProvider, q as convertToUnit, S as clamp, T as consoleWarn, U as makeLayoutItemProps, j as useProxiedModel, W as useToggleScope, X as useLayoutItem, _ as _export_sfc, F as eodashKey } from './asWebComponent-CIm1IGNl.js';
|
|
3
|
+
import { a as VExpandTransition } from './index-D-kMSCQA.js';
|
|
4
|
+
import { V as VImg } from './VImg-DB_1xaqP.js';
|
|
5
|
+
import { u as useSsrBoot } from './ssrBoot-BP7SYRyC.js';
|
|
6
|
+
|
|
7
|
+
const makeVToolbarTitleProps = propsFactory({
|
|
8
|
+
text: String,
|
|
9
|
+
...makeComponentProps(),
|
|
10
|
+
...makeTagProps()
|
|
11
|
+
}, 'VToolbarTitle');
|
|
12
|
+
const VToolbarTitle = genericComponent()({
|
|
13
|
+
name: 'VToolbarTitle',
|
|
14
|
+
props: makeVToolbarTitleProps(),
|
|
15
|
+
setup(props, _ref) {
|
|
16
|
+
let {
|
|
17
|
+
slots
|
|
18
|
+
} = _ref;
|
|
19
|
+
useRender(() => {
|
|
20
|
+
const hasText = !!(slots.default || slots.text || props.text);
|
|
21
|
+
return createVNode(props.tag, {
|
|
22
|
+
"class": ['v-toolbar-title', props.class],
|
|
23
|
+
"style": props.style
|
|
24
|
+
}, {
|
|
25
|
+
default: () => [hasText && createVNode("div", {
|
|
26
|
+
"class": "v-toolbar-title__placeholder"
|
|
27
|
+
}, [slots.text ? slots.text() : props.text, slots.default?.()])]
|
|
28
|
+
});
|
|
29
|
+
});
|
|
30
|
+
return {};
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
const allowedDensities = [null, 'prominent', 'default', 'comfortable', 'compact'];
|
|
35
|
+
const makeVToolbarProps = propsFactory({
|
|
36
|
+
absolute: Boolean,
|
|
37
|
+
collapse: Boolean,
|
|
38
|
+
color: String,
|
|
39
|
+
density: {
|
|
40
|
+
type: String,
|
|
41
|
+
default: 'default',
|
|
42
|
+
validator: v => allowedDensities.includes(v)
|
|
43
|
+
},
|
|
44
|
+
extended: Boolean,
|
|
45
|
+
extensionHeight: {
|
|
46
|
+
type: [Number, String],
|
|
47
|
+
default: 48
|
|
48
|
+
},
|
|
49
|
+
flat: Boolean,
|
|
50
|
+
floating: Boolean,
|
|
51
|
+
height: {
|
|
52
|
+
type: [Number, String],
|
|
53
|
+
default: 64
|
|
54
|
+
},
|
|
55
|
+
image: String,
|
|
56
|
+
title: String,
|
|
57
|
+
...makeBorderProps(),
|
|
58
|
+
...makeComponentProps(),
|
|
59
|
+
...makeElevationProps(),
|
|
60
|
+
...makeRoundedProps(),
|
|
61
|
+
...makeTagProps({
|
|
62
|
+
tag: 'header'
|
|
63
|
+
}),
|
|
64
|
+
...makeThemeProps()
|
|
65
|
+
}, 'VToolbar');
|
|
66
|
+
const VToolbar = genericComponent()({
|
|
67
|
+
name: 'VToolbar',
|
|
68
|
+
props: makeVToolbarProps(),
|
|
69
|
+
setup(props, _ref) {
|
|
70
|
+
let {
|
|
71
|
+
slots
|
|
72
|
+
} = _ref;
|
|
73
|
+
const {
|
|
74
|
+
backgroundColorClasses,
|
|
75
|
+
backgroundColorStyles
|
|
76
|
+
} = useBackgroundColor(toRef(props, 'color'));
|
|
77
|
+
const {
|
|
78
|
+
borderClasses
|
|
79
|
+
} = useBorder(props);
|
|
80
|
+
const {
|
|
81
|
+
elevationClasses
|
|
82
|
+
} = useElevation(props);
|
|
83
|
+
const {
|
|
84
|
+
roundedClasses
|
|
85
|
+
} = useRounded(props);
|
|
86
|
+
const {
|
|
87
|
+
themeClasses
|
|
88
|
+
} = provideTheme(props);
|
|
89
|
+
const {
|
|
90
|
+
rtlClasses
|
|
91
|
+
} = useRtl();
|
|
92
|
+
const isExtended = shallowRef(!!(props.extended || slots.extension?.()));
|
|
93
|
+
const contentHeight = computed(() => parseInt(Number(props.height) + (props.density === 'prominent' ? Number(props.height) : 0) - (props.density === 'comfortable' ? 8 : 0) - (props.density === 'compact' ? 16 : 0), 10));
|
|
94
|
+
const extensionHeight = computed(() => isExtended.value ? parseInt(Number(props.extensionHeight) + (props.density === 'prominent' ? Number(props.extensionHeight) : 0) - (props.density === 'comfortable' ? 4 : 0) - (props.density === 'compact' ? 8 : 0), 10) : 0);
|
|
95
|
+
provideDefaults({
|
|
96
|
+
VBtn: {
|
|
97
|
+
variant: 'text'
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
|
+
useRender(() => {
|
|
101
|
+
const hasTitle = !!(props.title || slots.title);
|
|
102
|
+
const hasImage = !!(slots.image || props.image);
|
|
103
|
+
const extension = slots.extension?.();
|
|
104
|
+
isExtended.value = !!(props.extended || extension);
|
|
105
|
+
return createVNode(props.tag, {
|
|
106
|
+
"class": ['v-toolbar', {
|
|
107
|
+
'v-toolbar--absolute': props.absolute,
|
|
108
|
+
'v-toolbar--collapse': props.collapse,
|
|
109
|
+
'v-toolbar--flat': props.flat,
|
|
110
|
+
'v-toolbar--floating': props.floating,
|
|
111
|
+
[`v-toolbar--density-${props.density}`]: true
|
|
112
|
+
}, backgroundColorClasses.value, borderClasses.value, elevationClasses.value, roundedClasses.value, themeClasses.value, rtlClasses.value, props.class],
|
|
113
|
+
"style": [backgroundColorStyles.value, props.style]
|
|
114
|
+
}, {
|
|
115
|
+
default: () => [hasImage && createVNode("div", {
|
|
116
|
+
"key": "image",
|
|
117
|
+
"class": "v-toolbar__image"
|
|
118
|
+
}, [!slots.image ? createVNode(VImg, {
|
|
119
|
+
"key": "image-img",
|
|
120
|
+
"cover": true,
|
|
121
|
+
"src": props.image
|
|
122
|
+
}, null) : createVNode(VDefaultsProvider, {
|
|
123
|
+
"key": "image-defaults",
|
|
124
|
+
"disabled": !props.image,
|
|
125
|
+
"defaults": {
|
|
126
|
+
VImg: {
|
|
127
|
+
cover: true,
|
|
128
|
+
src: props.image
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}, slots.image)]), createVNode(VDefaultsProvider, {
|
|
132
|
+
"defaults": {
|
|
133
|
+
VTabs: {
|
|
134
|
+
height: convertToUnit(contentHeight.value)
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}, {
|
|
138
|
+
default: () => [createVNode("div", {
|
|
139
|
+
"class": "v-toolbar__content",
|
|
140
|
+
"style": {
|
|
141
|
+
height: convertToUnit(contentHeight.value)
|
|
142
|
+
}
|
|
143
|
+
}, [slots.prepend && createVNode("div", {
|
|
144
|
+
"class": "v-toolbar__prepend"
|
|
145
|
+
}, [slots.prepend?.()]), hasTitle && createVNode(VToolbarTitle, {
|
|
146
|
+
"key": "title",
|
|
147
|
+
"text": props.title
|
|
148
|
+
}, {
|
|
149
|
+
text: slots.title
|
|
150
|
+
}), slots.default?.(), slots.append && createVNode("div", {
|
|
151
|
+
"class": "v-toolbar__append"
|
|
152
|
+
}, [slots.append?.()])])]
|
|
153
|
+
}), createVNode(VDefaultsProvider, {
|
|
154
|
+
"defaults": {
|
|
155
|
+
VTabs: {
|
|
156
|
+
height: convertToUnit(extensionHeight.value)
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
}, {
|
|
160
|
+
default: () => [createVNode(VExpandTransition, null, {
|
|
161
|
+
default: () => [isExtended.value && createVNode("div", {
|
|
162
|
+
"class": "v-toolbar__extension",
|
|
163
|
+
"style": {
|
|
164
|
+
height: convertToUnit(extensionHeight.value)
|
|
165
|
+
}
|
|
166
|
+
}, [extension])]
|
|
167
|
+
})]
|
|
168
|
+
})]
|
|
169
|
+
});
|
|
170
|
+
});
|
|
171
|
+
return {
|
|
172
|
+
contentHeight,
|
|
173
|
+
extensionHeight
|
|
174
|
+
};
|
|
175
|
+
}
|
|
176
|
+
});
|
|
177
|
+
|
|
178
|
+
// Utilities
|
|
179
|
+
// Composables
|
|
180
|
+
const makeScrollProps = propsFactory({
|
|
181
|
+
scrollTarget: {
|
|
182
|
+
type: String
|
|
183
|
+
},
|
|
184
|
+
scrollThreshold: {
|
|
185
|
+
type: [String, Number],
|
|
186
|
+
default: 300
|
|
187
|
+
}
|
|
188
|
+
}, 'scroll');
|
|
189
|
+
function useScroll(props) {
|
|
190
|
+
let args = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
191
|
+
const {
|
|
192
|
+
canScroll
|
|
193
|
+
} = args;
|
|
194
|
+
let previousScroll = 0;
|
|
195
|
+
let previousScrollHeight = 0;
|
|
196
|
+
const target = ref(null);
|
|
197
|
+
const currentScroll = shallowRef(0);
|
|
198
|
+
const savedScroll = shallowRef(0);
|
|
199
|
+
const currentThreshold = shallowRef(0);
|
|
200
|
+
const isScrollActive = shallowRef(false);
|
|
201
|
+
const isScrollingUp = shallowRef(false);
|
|
202
|
+
const scrollThreshold = computed(() => {
|
|
203
|
+
return Number(props.scrollThreshold);
|
|
204
|
+
});
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* 1: at top
|
|
208
|
+
* 0: at threshold
|
|
209
|
+
*/
|
|
210
|
+
const scrollRatio = computed(() => {
|
|
211
|
+
return clamp((scrollThreshold.value - currentScroll.value) / scrollThreshold.value || 0);
|
|
212
|
+
});
|
|
213
|
+
const onScroll = () => {
|
|
214
|
+
const targetEl = target.value;
|
|
215
|
+
if (!targetEl || canScroll && !canScroll.value) return;
|
|
216
|
+
previousScroll = currentScroll.value;
|
|
217
|
+
currentScroll.value = 'window' in targetEl ? targetEl.pageYOffset : targetEl.scrollTop;
|
|
218
|
+
const currentScrollHeight = targetEl instanceof Window ? document.documentElement.scrollHeight : targetEl.scrollHeight;
|
|
219
|
+
if (previousScrollHeight !== currentScrollHeight) {
|
|
220
|
+
previousScrollHeight = currentScrollHeight;
|
|
221
|
+
return;
|
|
222
|
+
}
|
|
223
|
+
isScrollingUp.value = currentScroll.value < previousScroll;
|
|
224
|
+
currentThreshold.value = Math.abs(currentScroll.value - scrollThreshold.value);
|
|
225
|
+
};
|
|
226
|
+
watch(isScrollingUp, () => {
|
|
227
|
+
savedScroll.value = savedScroll.value || currentScroll.value;
|
|
228
|
+
});
|
|
229
|
+
watch(isScrollActive, () => {
|
|
230
|
+
savedScroll.value = 0;
|
|
231
|
+
});
|
|
232
|
+
onMounted(() => {
|
|
233
|
+
watch(() => props.scrollTarget, scrollTarget => {
|
|
234
|
+
const newTarget = scrollTarget ? document.querySelector(scrollTarget) : window;
|
|
235
|
+
if (!newTarget) {
|
|
236
|
+
consoleWarn(`Unable to locate element with identifier ${scrollTarget}`);
|
|
237
|
+
return;
|
|
238
|
+
}
|
|
239
|
+
if (newTarget === target.value) return;
|
|
240
|
+
target.value?.removeEventListener('scroll', onScroll);
|
|
241
|
+
target.value = newTarget;
|
|
242
|
+
target.value.addEventListener('scroll', onScroll, {
|
|
243
|
+
passive: true
|
|
244
|
+
});
|
|
245
|
+
}, {
|
|
246
|
+
immediate: true
|
|
247
|
+
});
|
|
248
|
+
});
|
|
249
|
+
onBeforeUnmount(() => {
|
|
250
|
+
target.value?.removeEventListener('scroll', onScroll);
|
|
251
|
+
});
|
|
252
|
+
|
|
253
|
+
// Do we need this? If yes - seems that
|
|
254
|
+
// there's no need to expose onScroll
|
|
255
|
+
canScroll && watch(canScroll, onScroll, {
|
|
256
|
+
immediate: true
|
|
257
|
+
});
|
|
258
|
+
return {
|
|
259
|
+
scrollThreshold,
|
|
260
|
+
currentScroll,
|
|
261
|
+
currentThreshold,
|
|
262
|
+
isScrollActive,
|
|
263
|
+
scrollRatio,
|
|
264
|
+
// required only for testing
|
|
265
|
+
// probably can be removed
|
|
266
|
+
// later (2 chars chlng)
|
|
267
|
+
isScrollingUp,
|
|
268
|
+
savedScroll
|
|
269
|
+
};
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
const makeVAppBarProps = propsFactory({
|
|
273
|
+
scrollBehavior: String,
|
|
274
|
+
modelValue: {
|
|
275
|
+
type: Boolean,
|
|
276
|
+
default: true
|
|
277
|
+
},
|
|
278
|
+
location: {
|
|
279
|
+
type: String,
|
|
280
|
+
default: 'top',
|
|
281
|
+
validator: value => ['top', 'bottom'].includes(value)
|
|
282
|
+
},
|
|
283
|
+
...makeVToolbarProps(),
|
|
284
|
+
...makeLayoutItemProps(),
|
|
285
|
+
...makeScrollProps(),
|
|
286
|
+
height: {
|
|
287
|
+
type: [Number, String],
|
|
288
|
+
default: 64
|
|
289
|
+
}
|
|
290
|
+
}, 'VAppBar');
|
|
291
|
+
const VAppBar = genericComponent()({
|
|
292
|
+
name: 'VAppBar',
|
|
293
|
+
props: makeVAppBarProps(),
|
|
294
|
+
emits: {
|
|
295
|
+
'update:modelValue': value => true
|
|
296
|
+
},
|
|
297
|
+
setup(props, _ref) {
|
|
298
|
+
let {
|
|
299
|
+
slots
|
|
300
|
+
} = _ref;
|
|
301
|
+
const vToolbarRef = ref();
|
|
302
|
+
const isActive = useProxiedModel(props, 'modelValue');
|
|
303
|
+
const scrollBehavior = computed(() => {
|
|
304
|
+
const behavior = new Set(props.scrollBehavior?.split(' ') ?? []);
|
|
305
|
+
return {
|
|
306
|
+
hide: behavior.has('hide'),
|
|
307
|
+
fullyHide: behavior.has('fully-hide'),
|
|
308
|
+
inverted: behavior.has('inverted'),
|
|
309
|
+
collapse: behavior.has('collapse'),
|
|
310
|
+
elevate: behavior.has('elevate'),
|
|
311
|
+
fadeImage: behavior.has('fade-image')
|
|
312
|
+
// shrink: behavior.has('shrink'),
|
|
313
|
+
};
|
|
314
|
+
});
|
|
315
|
+
const canScroll = computed(() => {
|
|
316
|
+
const behavior = scrollBehavior.value;
|
|
317
|
+
return behavior.hide || behavior.fullyHide || behavior.inverted || behavior.collapse || behavior.elevate || behavior.fadeImage ||
|
|
318
|
+
// behavior.shrink ||
|
|
319
|
+
!isActive.value;
|
|
320
|
+
});
|
|
321
|
+
const {
|
|
322
|
+
currentScroll,
|
|
323
|
+
scrollThreshold,
|
|
324
|
+
isScrollingUp,
|
|
325
|
+
scrollRatio
|
|
326
|
+
} = useScroll(props, {
|
|
327
|
+
canScroll
|
|
328
|
+
});
|
|
329
|
+
const canHide = computed(() => scrollBehavior.value.hide || scrollBehavior.value.fullyHide);
|
|
330
|
+
const isCollapsed = computed(() => props.collapse || scrollBehavior.value.collapse && (scrollBehavior.value.inverted ? scrollRatio.value > 0 : scrollRatio.value === 0));
|
|
331
|
+
const isFlat = computed(() => props.flat || scrollBehavior.value.fullyHide && !isActive.value || scrollBehavior.value.elevate && (scrollBehavior.value.inverted ? currentScroll.value > 0 : currentScroll.value === 0));
|
|
332
|
+
const opacity = computed(() => scrollBehavior.value.fadeImage ? scrollBehavior.value.inverted ? 1 - scrollRatio.value : scrollRatio.value : undefined);
|
|
333
|
+
const height = computed(() => {
|
|
334
|
+
if (scrollBehavior.value.hide && scrollBehavior.value.inverted) return 0;
|
|
335
|
+
const height = vToolbarRef.value?.contentHeight ?? 0;
|
|
336
|
+
const extensionHeight = vToolbarRef.value?.extensionHeight ?? 0;
|
|
337
|
+
if (!canHide.value) return height + extensionHeight;
|
|
338
|
+
return currentScroll.value < scrollThreshold.value || scrollBehavior.value.fullyHide ? height + extensionHeight : height;
|
|
339
|
+
});
|
|
340
|
+
useToggleScope(computed(() => !!props.scrollBehavior), () => {
|
|
341
|
+
watchEffect(() => {
|
|
342
|
+
if (canHide.value) {
|
|
343
|
+
if (scrollBehavior.value.inverted) {
|
|
344
|
+
isActive.value = currentScroll.value > scrollThreshold.value;
|
|
345
|
+
} else {
|
|
346
|
+
isActive.value = isScrollingUp.value || currentScroll.value < scrollThreshold.value;
|
|
347
|
+
}
|
|
348
|
+
} else {
|
|
349
|
+
isActive.value = true;
|
|
350
|
+
}
|
|
351
|
+
});
|
|
352
|
+
});
|
|
353
|
+
const {
|
|
354
|
+
ssrBootStyles
|
|
355
|
+
} = useSsrBoot();
|
|
356
|
+
const {
|
|
357
|
+
layoutItemStyles
|
|
358
|
+
} = useLayoutItem({
|
|
359
|
+
id: props.name,
|
|
360
|
+
order: computed(() => parseInt(props.order, 10)),
|
|
361
|
+
position: toRef(props, 'location'),
|
|
362
|
+
layoutSize: height,
|
|
363
|
+
elementSize: shallowRef(undefined),
|
|
364
|
+
active: isActive,
|
|
365
|
+
absolute: toRef(props, 'absolute')
|
|
366
|
+
});
|
|
367
|
+
useRender(() => {
|
|
368
|
+
const toolbarProps = VToolbar.filterProps(props);
|
|
369
|
+
return createVNode(VToolbar, mergeProps({
|
|
370
|
+
"ref": vToolbarRef,
|
|
371
|
+
"class": ['v-app-bar', {
|
|
372
|
+
'v-app-bar--bottom': props.location === 'bottom'
|
|
373
|
+
}, props.class],
|
|
374
|
+
"style": [{
|
|
375
|
+
...layoutItemStyles.value,
|
|
376
|
+
'--v-toolbar-image-opacity': opacity.value,
|
|
377
|
+
height: undefined,
|
|
378
|
+
...ssrBootStyles.value
|
|
379
|
+
}, props.style]
|
|
380
|
+
}, toolbarProps, {
|
|
381
|
+
"collapse": isCollapsed.value,
|
|
382
|
+
"flat": isFlat.value
|
|
383
|
+
}), slots);
|
|
384
|
+
});
|
|
385
|
+
return {};
|
|
386
|
+
}
|
|
387
|
+
});
|
|
388
|
+
|
|
389
|
+
const VAppBarTitle = genericComponent()({
|
|
390
|
+
name: 'VAppBarTitle',
|
|
391
|
+
props: makeVToolbarTitleProps(),
|
|
392
|
+
setup(props, _ref) {
|
|
393
|
+
let {
|
|
394
|
+
slots
|
|
395
|
+
} = _ref;
|
|
396
|
+
useRender(() => createVNode(VToolbarTitle, mergeProps(props, {
|
|
397
|
+
"class": "v-app-bar-title"
|
|
398
|
+
}), slots));
|
|
399
|
+
return {};
|
|
400
|
+
}
|
|
401
|
+
});
|
|
402
|
+
|
|
403
|
+
const _sfc_main = {
|
|
404
|
+
__name: 'Header',
|
|
405
|
+
setup(__props) {
|
|
406
|
+
|
|
407
|
+
const eodash = /** @type {import("@/types").Eodash} */ (inject(eodashKey));
|
|
408
|
+
|
|
409
|
+
const title = eodash.brand?.name;
|
|
410
|
+
|
|
411
|
+
return (_ctx, _cache) => {
|
|
412
|
+
|
|
413
|
+
|
|
414
|
+
|
|
415
|
+
|
|
416
|
+
return (openBlock(), createBlock(VAppBar, { color: "primary" }, {
|
|
417
|
+
default: withCtx(() => [
|
|
418
|
+
createVNode(VAppBarTitle, null, {
|
|
419
|
+
default: withCtx(() => [
|
|
420
|
+
createTextVNode(toDisplayString(unref(title)), 1 /* TEXT */)
|
|
421
|
+
]),
|
|
422
|
+
_: 1 /* STABLE */
|
|
423
|
+
}),
|
|
424
|
+
createVNode(VImg, {
|
|
425
|
+
class: "mx-12 logo",
|
|
426
|
+
src: unref(eodash).brand?.logo
|
|
427
|
+
}, null, 8 /* PROPS */, ["src"])
|
|
428
|
+
]),
|
|
429
|
+
_: 1 /* STABLE */
|
|
430
|
+
}))
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
};
|
|
435
|
+
const Header = /*#__PURE__*/_export_sfc(_sfc_main, [['__scopeId',"data-v-d3a5e05e"]]);
|
|
436
|
+
|
|
437
|
+
export { Header as default };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { openBlock, createElementBlock } from 'vue';
|
|
2
|
+
|
|
3
|
+
const _hoisted_1 = ["src"];
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
const _sfc_main = {
|
|
7
|
+
__name: 'IframeWrapper',
|
|
8
|
+
props: {
|
|
9
|
+
src: {
|
|
10
|
+
type: String,
|
|
11
|
+
required: true,
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
setup(__props) {
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
return (_ctx, _cache) => {
|
|
19
|
+
return (openBlock(), createElementBlock("iframe", {
|
|
20
|
+
src: __props.src,
|
|
21
|
+
class: "fill-height fill-width"
|
|
22
|
+
}, null, 8 /* PROPS */, _hoisted_1))
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export { _sfc_main as default };
|