@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.
- package/README.md +1 -1
- package/core/client/App.vue +13 -1
- package/core/client/asWebComponent.js +13 -4
- package/core/client/components/DashboardLayout.vue +36 -14
- package/core/client/components/Loading.vue +6 -9
- package/core/client/components/MobileLayout.vue +16 -14
- package/core/client/composables/DefineEodash.js +14 -4
- package/core/client/composables/DefineTemplate.js +67 -0
- package/core/client/composables/DefineWidgets.js +3 -2
- package/core/client/composables/EodashMap.js +360 -0
- package/core/client/composables/EodashProcess.js +574 -0
- package/core/client/composables/index.js +136 -28
- package/core/client/eodash.js +395 -80
- package/core/client/eodashSTAC/EodashCollection.js +432 -0
- package/core/client/eodashSTAC/createLayers.js +315 -0
- package/core/client/eodashSTAC/helpers.js +375 -0
- package/core/client/eodashSTAC/triggers.js +43 -0
- package/core/client/plugins/axios.js +8 -0
- package/core/client/plugins/index.js +2 -1
- package/core/client/plugins/vuetify.js +2 -1
- package/core/client/store/actions.js +79 -0
- package/core/client/store/index.js +4 -18
- package/core/client/store/stac.js +99 -9
- package/core/client/store/states.js +37 -0
- package/core/client/{types.d.ts → types.ts} +66 -20
- package/core/client/utils/keys.js +2 -0
- package/core/client/utils/states.js +22 -0
- package/core/client/views/Dashboard.vue +22 -49
- package/core/client/vite-env.d.ts +2 -10
- package/dist/client/DashboardLayout-232tRmjz.js +84 -0
- package/dist/client/DynamicWebComponent-Cl4LqHU6.js +88 -0
- package/dist/client/EodashDatePicker-Pok6bZwU.js +306 -0
- package/dist/client/EodashItemFilter-16eMMjTV.js +151 -0
- package/dist/client/EodashLayerControl-De7IlCm_.js +120 -0
- package/dist/client/EodashLayoutSwitcher-C-3-jjn5.js +52 -0
- package/dist/client/EodashMap-CMvbfI6-.js +549 -0
- package/dist/client/EodashMapBtns-BeknGDtc.js +107 -0
- package/dist/client/EodashProcess-BwKAa9Ee.js +1476 -0
- package/dist/client/EodashStacInfo-_BfonNUG.js +85 -0
- package/dist/client/EodashTools-PD3XPYuR.js +103 -0
- package/dist/client/ExportState-DOrT7M15.js +644 -0
- package/dist/client/Footer-CCigxYBo.js +141 -0
- package/dist/client/Header-C2cdx4gb.js +437 -0
- package/dist/client/IframeWrapper-BgM9aU8f.js +28 -0
- package/dist/client/MobileLayout-BdiFjHg7.js +1207 -0
- package/dist/client/PopUp--_xn1Cms.js +410 -0
- package/dist/client/VImg-9xu2l99m.js +384 -0
- package/dist/client/VMain-BUs3kDTd.js +43 -0
- package/dist/client/VOverlay-D89omJis.js +1453 -0
- package/dist/client/VTooltip-CDu3bErh.js +86 -0
- package/dist/client/WidgetsContainer-aFG9yFT6.js +83 -0
- package/dist/client/asWebComponent-BRGyP_j5.js +11943 -0
- package/dist/client/{style.css → eo-dash.css} +2 -2
- package/dist/client/eo-dash.js +2 -6
- package/dist/client/forwardRefs-CYrR6bMw.js +245 -0
- package/dist/client/index-BZwk0V42.js +199 -0
- package/dist/client/ssrBoot-BP7SYRyC.js +22 -0
- package/dist/client/transition-DG9nRSW4.js +37 -0
- package/dist/node/cli.js +4 -4
- package/dist/node/types.d.ts +2 -0
- package/package.json +73 -38
- package/widgets/EodashDatePicker.vue +176 -134
- package/widgets/EodashItemFilter.vue +79 -38
- package/widgets/EodashLayerControl.vue +111 -0
- package/widgets/EodashLayoutSwitcher.vue +36 -0
- package/widgets/EodashMap.vue +108 -133
- package/widgets/EodashMapBtns.vue +62 -8
- package/widgets/EodashProcess.vue +143 -0
- package/widgets/EodashStacInfo.vue +82 -0
- package/widgets/EodashTools.vue +83 -0
- package/widgets/ExportState.vue +17 -13
- package/widgets/PopUp.vue +24 -2
- package/core/client/SuspensedDashboard.ce.vue +0 -105
- package/core/client/asWebComponent.d.ts +0 -23
- package/core/client/store/Actions.js +0 -14
- package/core/client/store/States.js +0 -16
- package/core/client/utils/eodashSTAC.js +0 -249
- package/core/client/utils/helpers.js +0 -38
- package/dist/client/DashboardLayout-D0ZF6V2S.js +0 -156
- package/dist/client/DynamicWebComponent-CPsMSBHi.js +0 -57
- package/dist/client/EodashDatePicker-CBQP7u2X.js +0 -252
- package/dist/client/EodashItemFilter-DL2ScI-5.js +0 -7671
- package/dist/client/EodashMap-CkKoQlmR.js +0 -86917
- package/dist/client/EodashMapBtns-yuO2QmiR.js +0 -36
- package/dist/client/ExportState-CCzOhppU.js +0 -558
- package/dist/client/Footer-BPAND0yG.js +0 -115
- package/dist/client/Header-DLhebNvG.js +0 -350
- package/dist/client/IframeWrapper-1GEMHlsW.js +0 -19
- package/dist/client/MobileLayout-mGkOYRhu.js +0 -945
- package/dist/client/PopUp-1d2bBFjw.js +0 -300
- package/dist/client/VImg-DxHcztfM.js +0 -291
- package/dist/client/VMain-BLX5vRRn.js +0 -39
- package/dist/client/VOverlay-CvrYEmLu.js +0 -967
- package/dist/client/WidgetsContainer-CmYjvGm7.js +0 -129
- package/dist/client/_commonjsHelpers-DaMA6jEr.js +0 -8
- package/dist/client/asWebComponent-B91uK0U7.js +0 -20361
- package/dist/client/basedecoder-DHcBySSe-BmCFNFnw.js +0 -88
- package/dist/client/decoder-CP4lv0Kb-B6yqkcfC.js +0 -10
- package/dist/client/deflate-BXt-9JA_-CWfClgpK.js +0 -10
- package/dist/client/eodashSTAC-DBjqe_Ho.js +0 -2788
- package/dist/client/eox-stacinfo-l7ALSV90.js +0 -13969
- package/dist/client/forwardRefs-BJJiadQP.js +0 -185
- package/dist/client/index-Q-bHLjxx.js +0 -153
- package/dist/client/jpeg-BAgeD1d3-oeHbFPUL.js +0 -514
- package/dist/client/lerc-DzVumYtB-P-KXC0TO.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-yo11mybw.js +0 -17
- package/dist/client/transition-CSJhuYGK.js +0 -34
- package/dist/client/webfontloader-qotgY98I.js +0 -435
- package/dist/client/webimage-BM_pbLN3-L2cGWK5l.js +0 -19
|
@@ -0,0 +1,410 @@
|
|
|
1
|
+
import { createVNode, Transition, mergeProps, ref, onBeforeUnmount, 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, Q as VDefaultsProvider, K as makeBorderProps, b as makeComponentProps, H as makeDimensionProps, L as makeElevationProps, at as makeLocationProps, au as makePositionProps, M as makeRoundedProps, c as makeTagProps, d as makeThemeProps, e as provideTheme, C as useBackgroundColor, N as useBorder, J as useDimension, O as useElevation, ay as useLocation, az as usePosition, P as useRounded, aI as useDefineWidgets } from './asWebComponent-BRGyP_j5.js';
|
|
3
|
+
import { m as makeVOverlayProps, V as VOverlay } from './VOverlay-D89omJis.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-CYrR6bMw.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
|
+
onBeforeUnmount(() => {
|
|
199
|
+
document.removeEventListener('focusin', onFocusin);
|
|
200
|
+
});
|
|
201
|
+
if (IN_BROWSER) {
|
|
202
|
+
watch(() => isActive.value && props.retainFocus, val => {
|
|
203
|
+
val ? document.addEventListener('focusin', onFocusin) : document.removeEventListener('focusin', onFocusin);
|
|
204
|
+
}, {
|
|
205
|
+
immediate: true
|
|
206
|
+
});
|
|
207
|
+
}
|
|
208
|
+
function onAfterEnter() {
|
|
209
|
+
emit('afterEnter');
|
|
210
|
+
if (overlay.value?.contentEl && !overlay.value.contentEl.contains(document.activeElement)) {
|
|
211
|
+
overlay.value.contentEl.focus({
|
|
212
|
+
preventScroll: true
|
|
213
|
+
});
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
function onAfterLeave() {
|
|
217
|
+
emit('afterLeave');
|
|
218
|
+
}
|
|
219
|
+
watch(isActive, async val => {
|
|
220
|
+
if (!val) {
|
|
221
|
+
await nextTick();
|
|
222
|
+
overlay.value.activatorEl?.focus({
|
|
223
|
+
preventScroll: true
|
|
224
|
+
});
|
|
225
|
+
}
|
|
226
|
+
});
|
|
227
|
+
useRender(() => {
|
|
228
|
+
const overlayProps = VOverlay.filterProps(props);
|
|
229
|
+
const activatorProps = mergeProps({
|
|
230
|
+
'aria-haspopup': 'dialog'
|
|
231
|
+
}, props.activatorProps);
|
|
232
|
+
const contentProps = mergeProps({
|
|
233
|
+
tabindex: -1
|
|
234
|
+
}, props.contentProps);
|
|
235
|
+
return createVNode(VOverlay, mergeProps({
|
|
236
|
+
"ref": overlay,
|
|
237
|
+
"class": ['v-dialog', {
|
|
238
|
+
'v-dialog--fullscreen': props.fullscreen,
|
|
239
|
+
'v-dialog--scrollable': props.scrollable
|
|
240
|
+
}, props.class],
|
|
241
|
+
"style": props.style
|
|
242
|
+
}, overlayProps, {
|
|
243
|
+
"modelValue": isActive.value,
|
|
244
|
+
"onUpdate:modelValue": $event => isActive.value = $event,
|
|
245
|
+
"aria-modal": "true",
|
|
246
|
+
"activatorProps": activatorProps,
|
|
247
|
+
"contentProps": contentProps,
|
|
248
|
+
"height": !props.fullscreen ? props.height : undefined,
|
|
249
|
+
"width": !props.fullscreen ? props.width : undefined,
|
|
250
|
+
"maxHeight": !props.fullscreen ? props.maxHeight : undefined,
|
|
251
|
+
"maxWidth": !props.fullscreen ? props.maxWidth : undefined,
|
|
252
|
+
"role": "dialog",
|
|
253
|
+
"onAfterEnter": onAfterEnter,
|
|
254
|
+
"onAfterLeave": onAfterLeave
|
|
255
|
+
}, scopeId), {
|
|
256
|
+
activator: slots.activator,
|
|
257
|
+
default: function () {
|
|
258
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
259
|
+
args[_key] = arguments[_key];
|
|
260
|
+
}
|
|
261
|
+
return createVNode(VDefaultsProvider, {
|
|
262
|
+
"root": "VDialog"
|
|
263
|
+
}, {
|
|
264
|
+
default: () => [slots.default?.(...args)]
|
|
265
|
+
});
|
|
266
|
+
}
|
|
267
|
+
});
|
|
268
|
+
});
|
|
269
|
+
return forwardRefs({}, overlay);
|
|
270
|
+
}
|
|
271
|
+
});
|
|
272
|
+
|
|
273
|
+
const makeVSheetProps = propsFactory({
|
|
274
|
+
color: String,
|
|
275
|
+
...makeBorderProps(),
|
|
276
|
+
...makeComponentProps(),
|
|
277
|
+
...makeDimensionProps(),
|
|
278
|
+
...makeElevationProps(),
|
|
279
|
+
...makeLocationProps(),
|
|
280
|
+
...makePositionProps(),
|
|
281
|
+
...makeRoundedProps(),
|
|
282
|
+
...makeTagProps(),
|
|
283
|
+
...makeThemeProps()
|
|
284
|
+
}, 'VSheet');
|
|
285
|
+
const VSheet = genericComponent()({
|
|
286
|
+
name: 'VSheet',
|
|
287
|
+
props: makeVSheetProps(),
|
|
288
|
+
setup(props, _ref) {
|
|
289
|
+
let {
|
|
290
|
+
slots
|
|
291
|
+
} = _ref;
|
|
292
|
+
const {
|
|
293
|
+
themeClasses
|
|
294
|
+
} = provideTheme(props);
|
|
295
|
+
const {
|
|
296
|
+
backgroundColorClasses,
|
|
297
|
+
backgroundColorStyles
|
|
298
|
+
} = useBackgroundColor(toRef(props, 'color'));
|
|
299
|
+
const {
|
|
300
|
+
borderClasses
|
|
301
|
+
} = useBorder(props);
|
|
302
|
+
const {
|
|
303
|
+
dimensionStyles
|
|
304
|
+
} = useDimension(props);
|
|
305
|
+
const {
|
|
306
|
+
elevationClasses
|
|
307
|
+
} = useElevation(props);
|
|
308
|
+
const {
|
|
309
|
+
locationStyles
|
|
310
|
+
} = useLocation(props);
|
|
311
|
+
const {
|
|
312
|
+
positionClasses
|
|
313
|
+
} = usePosition(props);
|
|
314
|
+
const {
|
|
315
|
+
roundedClasses
|
|
316
|
+
} = useRounded(props);
|
|
317
|
+
useRender(() => createVNode(props.tag, {
|
|
318
|
+
"class": ['v-sheet', themeClasses.value, backgroundColorClasses.value, borderClasses.value, elevationClasses.value, positionClasses.value, roundedClasses.value, props.class],
|
|
319
|
+
"style": [backgroundColorStyles.value, dimensionStyles.value, locationStyles.value, props.style]
|
|
320
|
+
}, slots));
|
|
321
|
+
return {};
|
|
322
|
+
}
|
|
323
|
+
});
|
|
324
|
+
|
|
325
|
+
const _hoisted_1 = { key: 1 };
|
|
326
|
+
|
|
327
|
+
|
|
328
|
+
const _sfc_main = {
|
|
329
|
+
__name: 'PopUp',
|
|
330
|
+
props: /*@__PURE__*/mergeModels({
|
|
331
|
+
widget: {
|
|
332
|
+
/** @type {import("vue").PropType<import("@/types").Widget>} */
|
|
333
|
+
type: Object,
|
|
334
|
+
default: undefined,
|
|
335
|
+
},
|
|
336
|
+
maxWidth: {
|
|
337
|
+
type: String,
|
|
338
|
+
default: "500px",
|
|
339
|
+
},
|
|
340
|
+
maxHeight: {
|
|
341
|
+
type: String,
|
|
342
|
+
default: "500px",
|
|
343
|
+
},
|
|
344
|
+
width: {
|
|
345
|
+
type: String,
|
|
346
|
+
default: "500px",
|
|
347
|
+
},
|
|
348
|
+
height: {
|
|
349
|
+
type: String,
|
|
350
|
+
default: "500px",
|
|
351
|
+
},
|
|
352
|
+
}, {
|
|
353
|
+
"modelValue": { type: Boolean, required: true, default: false },
|
|
354
|
+
"modelModifiers": {},
|
|
355
|
+
}),
|
|
356
|
+
emits: ["update:modelValue"],
|
|
357
|
+
setup(__props) {
|
|
358
|
+
|
|
359
|
+
const dialog = useModel(__props, "modelValue");
|
|
360
|
+
|
|
361
|
+
const props = __props;
|
|
362
|
+
|
|
363
|
+
const config = {
|
|
364
|
+
maxWidth: props.maxWidth,
|
|
365
|
+
maxHeight: props.maxHeight,
|
|
366
|
+
width: props.width,
|
|
367
|
+
height: props.height,
|
|
368
|
+
};
|
|
369
|
+
|
|
370
|
+
const [definedWidget] = useDefineWidgets([props?.widget]);
|
|
371
|
+
|
|
372
|
+
return (_ctx, _cache) => {
|
|
373
|
+
|
|
374
|
+
|
|
375
|
+
|
|
376
|
+
return (openBlock(), createElementBlock("span", null, [
|
|
377
|
+
createVNode(VDialog, mergeProps(config, {
|
|
378
|
+
absolute: "",
|
|
379
|
+
scrollable: "",
|
|
380
|
+
"scroll-strategy": "block",
|
|
381
|
+
"close-on-back": "",
|
|
382
|
+
modelValue: dialog.value,
|
|
383
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = $event => ((dialog).value = $event))
|
|
384
|
+
}), {
|
|
385
|
+
default: withCtx(() => [
|
|
386
|
+
createVNode(VSheet, null, {
|
|
387
|
+
default: withCtx(() => [
|
|
388
|
+
(__props.widget)
|
|
389
|
+
? (openBlock(), createBlock(resolveDynamicComponent(unref(definedWidget).component), mergeProps({
|
|
390
|
+
key: unref(definedWidget).id
|
|
391
|
+
}, unref(definedWidget).props), null, 16 /* FULL_PROPS */))
|
|
392
|
+
: createCommentVNode("v-if", true),
|
|
393
|
+
(_ctx.$slots.default)
|
|
394
|
+
? (openBlock(), createElementBlock("span", _hoisted_1, [
|
|
395
|
+
renderSlot(_ctx.$slots, "default")
|
|
396
|
+
]))
|
|
397
|
+
: createCommentVNode("v-if", true)
|
|
398
|
+
]),
|
|
399
|
+
_: 3 /* FORWARDED */
|
|
400
|
+
})
|
|
401
|
+
]),
|
|
402
|
+
_: 3 /* FORWARDED */
|
|
403
|
+
}, 16 /* FULL_PROPS */, ["modelValue"])
|
|
404
|
+
]))
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
};
|
|
409
|
+
|
|
410
|
+
export { _sfc_main as default };
|