@qispace/vue3-player 0.0.5
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 +18 -0
- package/dist/components/apartmentChooser/QiApartmentChooser.vue.d.ts +4 -0
- package/dist/components/apartmentChooser/QiApartmentChooser.vue.d.ts.map +1 -0
- package/dist/components/apartmentChooser/QiApartmentChooserNavigation.vue.d.ts +4 -0
- package/dist/components/apartmentChooser/QiApartmentChooserNavigation.vue.d.ts.map +1 -0
- package/dist/components/apartmentChooser/QiApartmentChooserRaster.vue.d.ts +4 -0
- package/dist/components/apartmentChooser/QiApartmentChooserRaster.vue.d.ts.map +1 -0
- package/dist/components/apartmentChooser/QiApartmentChooserRotator.vue.d.ts +4 -0
- package/dist/components/apartmentChooser/QiApartmentChooserRotator.vue.d.ts.map +1 -0
- package/dist/components/apartmentChooser/QiApartmentChooserSvg.vue.d.ts +4 -0
- package/dist/components/apartmentChooser/QiApartmentChooserSvg.vue.d.ts.map +1 -0
- package/dist/components/buildingPicker/QiBuildingChooser.vue.d.ts +3 -0
- package/dist/components/buildingPicker/QiBuildingChooser.vue.d.ts.map +1 -0
- package/dist/components/buildingPicker/QiBuildingChooserRaster.vue.d.ts +4 -0
- package/dist/components/buildingPicker/QiBuildingChooserRaster.vue.d.ts.map +1 -0
- package/dist/components/buildingPicker/QiBuildingChooserRasterOverlay.vue.d.ts +4 -0
- package/dist/components/buildingPicker/QiBuildingChooserRasterOverlay.vue.d.ts.map +1 -0
- package/dist/components/buildingPicker/QiBuildingChooserSceneImageStack.vue.d.ts +4 -0
- package/dist/components/buildingPicker/QiBuildingChooserSceneImageStack.vue.d.ts.map +1 -0
- package/dist/components/buildingPicker/QiBuildingChooserSunSimControl.vue.d.ts +5 -0
- package/dist/components/buildingPicker/QiBuildingChooserSunSimControl.vue.d.ts.map +1 -0
- package/dist/components/buildingPicker/QiBuildingChooserSvg.vue.d.ts +4 -0
- package/dist/components/buildingPicker/QiBuildingChooserSvg.vue.d.ts.map +1 -0
- package/dist/components/index.d.ts +4 -0
- package/dist/components/shared/QiFloatingCard.vue.d.ts +4 -0
- package/dist/components/shared/QiFloatingCard.vue.d.ts.map +1 -0
- package/dist/components/shared/QiHoverProbe.vue.d.ts +4 -0
- package/dist/components/shared/QiHoverProbe.vue.d.ts.map +1 -0
- package/dist/components/shared/QiNorthDirection.vue.d.ts +3 -0
- package/dist/components/shared/QiNorthDirection.vue.d.ts.map +1 -0
- package/dist/components/shared/QiZoomBox.vue.d.ts +4 -0
- package/dist/components/shared/QiZoomBox.vue.d.ts.map +1 -0
- package/dist/components/virtualTourV2/Disclaimer.vue.d.ts +4 -0
- package/dist/components/virtualTourV2/Disclaimer.vue.d.ts.map +1 -0
- package/dist/components/virtualTourV2/FullScreenButton.vue.d.ts +3 -0
- package/dist/components/virtualTourV2/FullScreenButton.vue.d.ts.map +1 -0
- package/dist/components/virtualTourV2/ManualSlideShow.vue.d.ts +4 -0
- package/dist/components/virtualTourV2/ManualSlideShow.vue.d.ts.map +1 -0
- package/dist/components/virtualTourV2/ManualSlideShowPlayer.vue.d.ts +4 -0
- package/dist/components/virtualTourV2/ManualSlideShowPlayer.vue.d.ts.map +1 -0
- package/dist/components/virtualTourV2/SingleImage.vue.d.ts +4 -0
- package/dist/components/virtualTourV2/SingleImage.vue.d.ts.map +1 -0
- package/dist/components/virtualTourV2/SocialShare.vue.d.ts +4 -0
- package/dist/components/virtualTourV2/SocialShare.vue.d.ts.map +1 -0
- package/dist/components/virtualTourV2/WaypointCarousel.vue.d.ts +4 -0
- package/dist/components/virtualTourV2/WaypointCarousel.vue.d.ts.map +1 -0
- package/dist/lib/virtualTour__/ApartmentConfig.d.ts +27 -0
- package/dist/lib/virtualTour__/ApartmentFiles.d.ts +7 -0
- package/dist/lib/virtualTour__/MinimapConfig.d.ts +23 -0
- package/dist/lib/virtualTour__/impl/HttpApartmentFiles.d.ts +19 -0
- package/dist/vue3-player.cjs.js +2 -0
- package/dist/vue3-player.esm.js +2992 -0
- package/dist/vue3-player.iife.js +3 -0
- package/dist/vue3-player.umd.js +3 -0
- package/package.json +65 -0
- package/src/components/apartmentChooser/QiApartmentChooser.vue +319 -0
- package/src/components/apartmentChooser/QiApartmentChooserNavigation.vue +88 -0
- package/src/components/apartmentChooser/QiApartmentChooserRaster.vue +408 -0
- package/src/components/apartmentChooser/QiApartmentChooserRotator.vue +202 -0
- package/src/components/apartmentChooser/QiApartmentChooserSvg.vue +257 -0
- package/src/components/apartmentChooser/index.js +5 -0
- package/src/components/buildingPicker/QiBuildingChooser.vue +61 -0
- package/src/components/buildingPicker/QiBuildingChooserRaster.vue +312 -0
- package/src/components/buildingPicker/QiBuildingChooserRasterOverlay.vue +96 -0
- package/src/components/buildingPicker/QiBuildingChooserSceneImageStack.vue +89 -0
- package/src/components/buildingPicker/QiBuildingChooserSunSimControl.vue +257 -0
- package/src/components/buildingPicker/QiBuildingChooserSvg.vue +414 -0
- package/src/components/buildingPicker/index.js +6 -0
- package/src/components/index.ts +4 -0
- package/src/components/shared/QiFloatingCard.vue +76 -0
- package/src/components/shared/QiHoverProbe.vue +22 -0
- package/src/components/shared/QiNorthDirection.vue +27 -0
- package/src/components/shared/QiZoomBox.vue +322 -0
- package/src/components/shared/index.js +4 -0
- package/src/components/virtualTourV2/Compass.vue +37 -0
- package/src/components/virtualTourV2/Disclaimer.vue +41 -0
- package/src/components/virtualTourV2/FloorLevel.vue +73 -0
- package/src/components/virtualTourV2/FullScreenButton.vue +23 -0
- package/src/components/virtualTourV2/InteriorSelector.vue +90 -0
- package/src/components/virtualTourV2/ManualSlideShow.vue +198 -0
- package/src/components/virtualTourV2/ManualSlideShowPlayer.vue +159 -0
- package/src/components/virtualTourV2/PlayerV2.vue +300 -0
- package/src/components/virtualTourV2/ScrollHelper.vue +74 -0
- package/src/components/virtualTourV2/SettingsUI.vue +355 -0
- package/src/components/virtualTourV2/SingleImage.vue +36 -0
- package/src/components/virtualTourV2/SocialShare.vue +163 -0
- package/src/components/virtualTourV2/TimeOfDay.vue +50 -0
- package/src/components/virtualTourV2/Tutorial.vue +690 -0
- package/src/components/virtualTourV2/ViewModeToggle.vue +24 -0
- package/src/components/virtualTourV2/VirtualTourV2.vue +876 -0
- package/src/components/virtualTourV2/WaypointCarousel.vue +162 -0
- package/src/components/virtualTourV2/index.js +1 -0
- package/src/components/virtualTourV2/minimapv2/MiniMapMap.vue +262 -0
- package/src/components/virtualTourV2/minimapv2/MiniMapV2.vue +110 -0
- package/src/components/virtualTourV2/minimapv2/MinimapCompass.vue +39 -0
- package/src/components/virtualTourV2/minimapv2/Moveable.vue +208 -0
- package/src/components/virtualTourV2/minimapv2/RotationMarkerV2.vue +79 -0
- package/src/components/virtualTourV2/minimapv2/SunsimulationSlider.vue +203 -0
- package/src/components/virtualTourV2/minimapv2/index.js +1 -0
- package/src/entry.esm.js +17 -0
- package/src/entry.js +13 -0
- package/src/entry.ts_ +17 -0
- package/src/lib/apartmentChooser/BuildingViewerModel.js +60 -0
- package/src/lib/apartmentChooser/CircularSlideshow.js +66 -0
- package/src/lib/apartmentChooser/RotationStep.js +31 -0
- package/src/lib/apartmentChooser/SceneRotator.js +25 -0
- package/src/lib/apartmentChooser/index.js +3 -0
- package/src/lib/apartmentChooser/throttle.js +15 -0
- package/src/lib/buildingPicker/BuildingMap.js +24 -0
- package/src/lib/buildingPicker/BuildingPickerResourceProvider.js +97 -0
- package/src/lib/buildingPicker/CanvasRaster.js +29 -0
- package/src/lib/buildingPicker/DayOfYearSelector.js +36 -0
- package/src/lib/buildingPicker/SampleRaster.js +14 -0
- package/src/lib/buildingPicker/index.js +5 -0
- package/src/lib/index.js +4 -0
- package/src/lib/shared/BatchLoadTracker.js +52 -0
- package/src/lib/shared/I18N.js +65 -0
- package/src/lib/shared/ResourceLoader.js +33 -0
- package/src/lib/shared/index.js +3 -0
- package/src/lib/virtualTour/CameraSnapshot.js +42 -0
- package/src/lib/virtualTour/FullscreenModel.js +69 -0
- package/src/lib/virtualTour/textures/arrow.png +0 -0
- package/src/lib/virtualTour/textures/compass-bg.png +0 -0
- package/src/lib/virtualTour/textures/compass-needle.png +0 -0
- package/src/lib/virtualTour/textures/compass-north.png +0 -0
- package/src/lib/virtualTour/textures/floor-1.svg +4 -0
- package/src/lib/virtualTour/textures/floor-2.svg +4 -0
- package/src/lib/virtualTour/textures/marker.png +0 -0
- package/src/lib/virtualTour/textures/tod-sun.png +0 -0
- package/src/lib/virtualTour__/ApartmentConfig.ts +80 -0
- package/src/lib/virtualTour__/ApartmentFiles.ts +8 -0
- package/src/lib/virtualTour__/CameraNavigator.js_ +74 -0
- package/src/lib/virtualTour__/CameraSnapshot.js +42 -0
- package/src/lib/virtualTour__/CoordConversions.js +43 -0
- package/src/lib/virtualTour__/FullscreenModel.js +69 -0
- package/src/lib/virtualTour__/MinimapConfig.ts +46 -0
- package/src/lib/virtualTour__/PlayerViewModel.js +423 -0
- package/src/lib/virtualTour__/config/ApartmentConfig.js +92 -0
- package/src/lib/virtualTour__/config/CameraConfig.js +97 -0
- package/src/lib/virtualTour__/config/Interaction.js +393 -0
- package/src/lib/virtualTour__/config/Panorama.js +78 -0
- package/src/lib/virtualTour__/config/PlayerConfig.js +812 -0
- package/src/lib/virtualTour__/config/rawinflate.export.js +833 -0
- package/src/lib/virtualTour__/config/shaders.js +24 -0
- package/src/lib/virtualTour__/impl/HttpApartmentFiles.ts +57 -0
- package/src/lib/virtualTour__/index.js +1 -0
- package/src/lib/virtualTour__/textures/arrow.png +0 -0
- package/src/lib/virtualTour__/textures/compass-bg.png +0 -0
- package/src/lib/virtualTour__/textures/compass-needle.png +0 -0
- package/src/lib/virtualTour__/textures/compass-north.png +0 -0
- package/src/lib/virtualTour__/textures/floor-1.svg +4 -0
- package/src/lib/virtualTour__/textures/floor-2.svg +4 -0
- package/src/lib/virtualTour__/textures/marker.png +0 -0
- package/src/lib/virtualTour__/textures/tod-sun.png +0 -0
- package/src/main.ts_ +24 -0
- package/src/shims-png.d.ts +4 -0
- package/src/shims-tsx.d.ts +11 -0
- package/src/shims-vue.d.ts +4 -0
- package/src/style.css +0 -0
- package/src/vite-env.d.ts +5 -0
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<canvas ref="canvas" class="overlay" v-bind="dimensions" />
|
|
3
|
+
</template>
|
|
4
|
+
|
|
5
|
+
<script>
|
|
6
|
+
import { ResourceLoader } from '@/lib/shared/ResourceLoader'
|
|
7
|
+
|
|
8
|
+
export default {
|
|
9
|
+
name: 'QiBuildingChooserRasterOverlay',
|
|
10
|
+
props: {
|
|
11
|
+
imageUrl: { type: String, required: true },
|
|
12
|
+
dimensions: { type: Object, required: true },
|
|
13
|
+
color: {
|
|
14
|
+
type: Object,
|
|
15
|
+
default: () => ({ r: 108, g: 0, b: 108, a: 144, s: 2 }),
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
data() {
|
|
19
|
+
return {
|
|
20
|
+
isLoaded: false,
|
|
21
|
+
overlayImage: undefined,
|
|
22
|
+
resourceLoader: new ResourceLoader(),
|
|
23
|
+
context: undefined,
|
|
24
|
+
imageData: undefined,
|
|
25
|
+
imageDataIndices: [],
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
watch: {
|
|
29
|
+
color(oldValue, newValue) {
|
|
30
|
+
if (
|
|
31
|
+
oldValue.r !== newValue.r ||
|
|
32
|
+
oldValue.g !== newValue.g ||
|
|
33
|
+
oldValue.b !== newValue.b ||
|
|
34
|
+
oldValue.a !== newValue.a
|
|
35
|
+
) {
|
|
36
|
+
this.draw()
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
async mounted() {
|
|
41
|
+
this.overlayImage = await this.resourceLoader.loadImage(this.imageUrl)
|
|
42
|
+
this.setupDraw()
|
|
43
|
+
},
|
|
44
|
+
methods: {
|
|
45
|
+
setupDraw() {
|
|
46
|
+
if (!this.overlayImage || !this.$refs.canvas) {
|
|
47
|
+
return
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
const { width, height } = this.dimensions
|
|
51
|
+
if (width === 0 || height === 0) {
|
|
52
|
+
return
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
this.context = this.$refs.canvas.getContext('2d', {
|
|
56
|
+
willReadFrequently: true,
|
|
57
|
+
})
|
|
58
|
+
this.context.drawImage(this.overlayImage, 0, 0, width, height)
|
|
59
|
+
this.imageData = this.context.getImageData(0, 0, width, height)
|
|
60
|
+
for (let i = 3; i < this.imageData.data.length; i += 4) {
|
|
61
|
+
if (this.imageData.data[i] !== 0) {
|
|
62
|
+
this.imageDataIndices.push(i)
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
this.draw()
|
|
66
|
+
this.isLoaded = true
|
|
67
|
+
},
|
|
68
|
+
draw() {
|
|
69
|
+
if (this.context && this.imageData) {
|
|
70
|
+
this.applyColor()
|
|
71
|
+
this.context.putImageData(this.imageData, 0, 0)
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
applyColor() {
|
|
75
|
+
if (this.color) {
|
|
76
|
+
for (let i = 0; i < this.imageDataIndices.length; i++) {
|
|
77
|
+
this.imageData.data[this.imageDataIndices[i] - 3] = this.color.r
|
|
78
|
+
this.imageData.data[this.imageDataIndices[i] - 2] = this.color.g
|
|
79
|
+
this.imageData.data[this.imageDataIndices[i] - 1] = this.color.b
|
|
80
|
+
this.imageData.data[this.imageDataIndices[i]] = this.color.a
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
},
|
|
85
|
+
}
|
|
86
|
+
</script>
|
|
87
|
+
|
|
88
|
+
<style scoped>
|
|
89
|
+
.overlay {
|
|
90
|
+
z-index: 1 !important;
|
|
91
|
+
opacity: 1;
|
|
92
|
+
transition-property: opacity;
|
|
93
|
+
transition-duration: 250ms;
|
|
94
|
+
transition-timing-function: ease-in-out;
|
|
95
|
+
}
|
|
96
|
+
</style>
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<img
|
|
4
|
+
ref="baseImage"
|
|
5
|
+
class="image-instance zero"
|
|
6
|
+
:style="{ opacity: 1, borderRadius: 50 }"
|
|
7
|
+
@load="onPreloaded"
|
|
8
|
+
/>
|
|
9
|
+
<div
|
|
10
|
+
v-if="state === 'preloaded' || state === 'loaded'"
|
|
11
|
+
v-show="state === `loaded`"
|
|
12
|
+
>
|
|
13
|
+
<img
|
|
14
|
+
v-for="(url, index) in imageUrls"
|
|
15
|
+
:key="index"
|
|
16
|
+
:class="{ 'image-instance': true, active: index === activeIndex }"
|
|
17
|
+
:src="url"
|
|
18
|
+
@load="loadTracker.partLoaded()"
|
|
19
|
+
/>
|
|
20
|
+
Here
|
|
21
|
+
</div>
|
|
22
|
+
</div>
|
|
23
|
+
</template>
|
|
24
|
+
|
|
25
|
+
<script>
|
|
26
|
+
import { BatchLoadTracker } from "@/lib/shared/BatchLoadTracker";
|
|
27
|
+
import { defineComponent, ref } from "vue";
|
|
28
|
+
|
|
29
|
+
export default defineComponent({
|
|
30
|
+
setup() {},
|
|
31
|
+
name: "QiBuildingChooserSceneImageStack",
|
|
32
|
+
props: {
|
|
33
|
+
imageUrls: { type: Array, required: true },
|
|
34
|
+
activeIndex: { type: Number, required: true },
|
|
35
|
+
},
|
|
36
|
+
emits: ["resize", "ready", "preloaded", "reset"],
|
|
37
|
+
data() {
|
|
38
|
+
return {
|
|
39
|
+
state: "init",
|
|
40
|
+
activeStates: ["preloaded", "loaded"],
|
|
41
|
+
loadTracker: new BatchLoadTracker(0),
|
|
42
|
+
};
|
|
43
|
+
},
|
|
44
|
+
watch: {
|
|
45
|
+
imageUrls(newImages) {
|
|
46
|
+
this.$emit("reset");
|
|
47
|
+
this.loadImages(newImages);
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
mounted() {
|
|
51
|
+
this.loadImages(this.imageUrls);
|
|
52
|
+
new ResizeObserver((entries) => {
|
|
53
|
+
window.requestAnimationFrame(() => {
|
|
54
|
+
const width = entries[0].contentRect.width;
|
|
55
|
+
const height = entries[0].contentRect.height;
|
|
56
|
+
this.$emit("resize", { width, height });
|
|
57
|
+
});
|
|
58
|
+
}).observe(this.$refs.baseImage);
|
|
59
|
+
},
|
|
60
|
+
methods: {
|
|
61
|
+
onPreloaded() {
|
|
62
|
+
this.state = "preloaded";
|
|
63
|
+
this.$emit("preloaded");
|
|
64
|
+
},
|
|
65
|
+
loadImages(imageUrls) {
|
|
66
|
+
this.state = "init";
|
|
67
|
+
this.$refs.baseImage.src = imageUrls[0];
|
|
68
|
+
this.loadTracker = new BatchLoadTracker(imageUrls.length).onLoadFinished(
|
|
69
|
+
() => {
|
|
70
|
+
this.state = "loaded";
|
|
71
|
+
this.$emit("ready");
|
|
72
|
+
}
|
|
73
|
+
);
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
});
|
|
77
|
+
</script>
|
|
78
|
+
|
|
79
|
+
<style scoped>
|
|
80
|
+
.image-instance {
|
|
81
|
+
position: absolute;
|
|
82
|
+
width: 100%;
|
|
83
|
+
opacity: 0;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.image-instance.active {
|
|
87
|
+
opacity: 1;
|
|
88
|
+
}
|
|
89
|
+
</style>
|
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="sunsim-bar-wrapper">
|
|
3
|
+
<div class="sunsim-date d-flex align-center pl-5 pr-5">
|
|
4
|
+
<v-icon
|
|
5
|
+
color="black"
|
|
6
|
+
class="mr-2"
|
|
7
|
+
icon="mdi-calendar-blank-outline"
|
|
8
|
+
></v-icon>
|
|
9
|
+
<v-select
|
|
10
|
+
v-if="dateSelector.hasMultipleDates"
|
|
11
|
+
v-model="currentDate"
|
|
12
|
+
:items="dates"
|
|
13
|
+
density="compact"
|
|
14
|
+
variant="underlined"
|
|
15
|
+
hide-details
|
|
16
|
+
class="day-selector"
|
|
17
|
+
/>
|
|
18
|
+
<span v-else class="text-center text-body-1">{{ selectedDate }}</span>
|
|
19
|
+
</div>
|
|
20
|
+
<div class="sunsim-wrapper d-flex align-center px-3">
|
|
21
|
+
<span class="sunsim-time-label text-body-1 font-weight-normal ml-2">
|
|
22
|
+
{{ currentValueString }}
|
|
23
|
+
</span>
|
|
24
|
+
<v-icon medium class="ml-2 mr-2 icon">mdi-white-balance-sunny</v-icon>
|
|
25
|
+
<v-progress-linear
|
|
26
|
+
v-if="isLoading"
|
|
27
|
+
indeterminate
|
|
28
|
+
rounded
|
|
29
|
+
height="6"
|
|
30
|
+
color="grey lighten-1"
|
|
31
|
+
class="mr-2"
|
|
32
|
+
/>
|
|
33
|
+
<v-slider
|
|
34
|
+
v-else
|
|
35
|
+
v-model="currentValue"
|
|
36
|
+
:min="0"
|
|
37
|
+
:max="47"
|
|
38
|
+
:step="1"
|
|
39
|
+
:thumb-label="false"
|
|
40
|
+
:hide-details="true"
|
|
41
|
+
thumb-color="white"
|
|
42
|
+
thumb-size="25"
|
|
43
|
+
track-size="7"
|
|
44
|
+
track-fill-color="transparent"
|
|
45
|
+
class="sunsim-slider mr-1"
|
|
46
|
+
></v-slider>
|
|
47
|
+
</div>
|
|
48
|
+
</div>
|
|
49
|
+
</template>
|
|
50
|
+
|
|
51
|
+
<script>
|
|
52
|
+
import { defineComponent, ref } from "vue";
|
|
53
|
+
|
|
54
|
+
function formatDate(date) {
|
|
55
|
+
return date.toLocaleString("en-no", {
|
|
56
|
+
month: "short",
|
|
57
|
+
day: "numeric",
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export default defineComponent({
|
|
62
|
+
setup() {},
|
|
63
|
+
name: "QiBuildingChooserSunSimControl",
|
|
64
|
+
props: {
|
|
65
|
+
modelValue: { type: Number, required: true },
|
|
66
|
+
dateSelector: { type: Object, required: true },
|
|
67
|
+
isLoading: { type: Boolean, default: false },
|
|
68
|
+
},
|
|
69
|
+
emits: ["update:modelValue"],
|
|
70
|
+
data() {
|
|
71
|
+
return {
|
|
72
|
+
currentValue: this.modelValue,
|
|
73
|
+
currentDate: null,
|
|
74
|
+
};
|
|
75
|
+
},
|
|
76
|
+
computed: {
|
|
77
|
+
currentValueString() {
|
|
78
|
+
const hour = Math.floor(this.currentValue / 2)
|
|
79
|
+
.toString()
|
|
80
|
+
.padStart(2, "0");
|
|
81
|
+
const minutes = this.currentValue % 2 === 0 ? "00" : "30";
|
|
82
|
+
return `${hour}:${minutes}`;
|
|
83
|
+
},
|
|
84
|
+
dates() {
|
|
85
|
+
return this.dateSelector.dates.map(formatDate);
|
|
86
|
+
},
|
|
87
|
+
selectedDate: {
|
|
88
|
+
get() {
|
|
89
|
+
return formatDate(this.dateSelector.selectedDate);
|
|
90
|
+
},
|
|
91
|
+
set(value) {
|
|
92
|
+
this.dateSelector.selectIndex(this.dates.indexOf(value));
|
|
93
|
+
},
|
|
94
|
+
},
|
|
95
|
+
},
|
|
96
|
+
watch: {
|
|
97
|
+
currentValue(newValue) {
|
|
98
|
+
this.$emit("update:modelValue", newValue);
|
|
99
|
+
},
|
|
100
|
+
modelValue(newValue) {
|
|
101
|
+
this.currentValue = Math.floor(newValue);
|
|
102
|
+
},
|
|
103
|
+
dates: {
|
|
104
|
+
handler(newValue) {
|
|
105
|
+
this.currentDate = formatDate(this.dateSelector.selectedDate);
|
|
106
|
+
},
|
|
107
|
+
immediate: true,
|
|
108
|
+
},
|
|
109
|
+
currentDate(newValue) {
|
|
110
|
+
this.dateSelector.selectIndex(this.dates.indexOf(newValue));
|
|
111
|
+
},
|
|
112
|
+
},
|
|
113
|
+
methods: {},
|
|
114
|
+
});
|
|
115
|
+
</script>
|
|
116
|
+
|
|
117
|
+
<style scoped>
|
|
118
|
+
.sunsim-time-label {
|
|
119
|
+
color: #000;
|
|
120
|
+
vertical-align: top;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.sunsim-date {
|
|
124
|
+
background: #fff;
|
|
125
|
+
border-radius: 30px;
|
|
126
|
+
min-height: 36px;
|
|
127
|
+
min-width: 170px;
|
|
128
|
+
display: flex;
|
|
129
|
+
align-content: center;
|
|
130
|
+
white-space: nowrap;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.day-selector {
|
|
134
|
+
margin-top: 0px;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.day-selector :deep(.v-field__outline) {
|
|
138
|
+
display: none;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.day-selector :deep(.v-field__input) {
|
|
142
|
+
padding-top: 2px;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.day-selector :deep(.v-field__append-inner) {
|
|
146
|
+
padding-top: 5px !important;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.day-selector.v-text-field :deep(.v-input__control > .v-input__slot:before) {
|
|
150
|
+
border-style: none;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.day-selector.v-text-field :deep(.v-input__control > .v-input__slot:after) {
|
|
154
|
+
border-style: none;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.sunsim-slider :deep(.v-slider-track__background) {
|
|
158
|
+
background: linear-gradient(
|
|
159
|
+
270deg,
|
|
160
|
+
#8183c2 0%,
|
|
161
|
+
#ffb9b9 20.01%,
|
|
162
|
+
#b2dfff 40.1%,
|
|
163
|
+
#b2dfff 59.85%,
|
|
164
|
+
#ffba96 79.96%,
|
|
165
|
+
#8183c2 100%
|
|
166
|
+
) !important;
|
|
167
|
+
}
|
|
168
|
+
</style>
|
|
169
|
+
|
|
170
|
+
<style>
|
|
171
|
+
.sunsim-bar-wrapper {
|
|
172
|
+
display: flex;
|
|
173
|
+
position: absolute;
|
|
174
|
+
width: calc(60%);
|
|
175
|
+
min-width: 400px;
|
|
176
|
+
top: 12px;
|
|
177
|
+
left: 0px;
|
|
178
|
+
z-index: 3;
|
|
179
|
+
touch-action: none;
|
|
180
|
+
pointer-events: none;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
.sunsim-wrapper {
|
|
184
|
+
width: 100%;
|
|
185
|
+
background: #fff;
|
|
186
|
+
border-radius: 30px;
|
|
187
|
+
padding: 5px;
|
|
188
|
+
min-height: 16px;
|
|
189
|
+
z-index: 3;
|
|
190
|
+
}
|
|
191
|
+
.sunsim-bar-wrapper .sunsim-date {
|
|
192
|
+
margin-right: 12px;
|
|
193
|
+
margin-left: 12px;
|
|
194
|
+
}
|
|
195
|
+
.sunsim-wrapper,
|
|
196
|
+
.sunsim-date {
|
|
197
|
+
touch-action: auto;
|
|
198
|
+
pointer-events: all;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
.sunsim-wrapper .mdi-white-balance-sunny {
|
|
202
|
+
color: #ffab02;
|
|
203
|
+
vertical-align: baseline;
|
|
204
|
+
font-size: 20px;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
@media only screen and (max-width: 980px) and (min-width: 500px) {
|
|
208
|
+
.sunsim-bar-wrapper {
|
|
209
|
+
top: 101%;
|
|
210
|
+
width: 100%;
|
|
211
|
+
}
|
|
212
|
+
.sunsim-bar-wrapper .sunsim-date {
|
|
213
|
+
margin-left: 0;
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
@media only screen and (max-width: 980px) and (min-width: 500px) and (orientation: landscape) {
|
|
218
|
+
.sunsim-bar-wrapper {
|
|
219
|
+
top: calc(100% + 8px);
|
|
220
|
+
width: 100%;
|
|
221
|
+
}
|
|
222
|
+
.sunsim-bar-wrapper .sunsim-date {
|
|
223
|
+
margin-left: 0;
|
|
224
|
+
}
|
|
225
|
+
.sunsim-bar-wrapper .sunsim-date,
|
|
226
|
+
.sunsim-bar-wrapper .sunsim-wrapper {
|
|
227
|
+
box-shadow: 0px 0px 7px 1px #aaa;
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
@media only screen and (max-width: 500px) {
|
|
232
|
+
.sunsim-bar-wrapper {
|
|
233
|
+
height: calc(100% + 84px);
|
|
234
|
+
top: 0;
|
|
235
|
+
width: 100%;
|
|
236
|
+
flex-direction: column;
|
|
237
|
+
justify-content: space-between;
|
|
238
|
+
margin: -42px 0 0 0;
|
|
239
|
+
padding: 0;
|
|
240
|
+
left: 0;
|
|
241
|
+
z-index: 0;
|
|
242
|
+
min-width: 100%;
|
|
243
|
+
}
|
|
244
|
+
.sunsim-bar-wrapper .sunsim-date {
|
|
245
|
+
margin-right: 0;
|
|
246
|
+
margin-left: 0;
|
|
247
|
+
}
|
|
248
|
+
.sunsim-bar-wrapper .sunsim-date,
|
|
249
|
+
.sunsim-bar-wrapper .sunsim-wrapper {
|
|
250
|
+
width: 100%;
|
|
251
|
+
border-radius: 0;
|
|
252
|
+
left: 0;
|
|
253
|
+
margin-left: 0 !important;
|
|
254
|
+
box-shadow: 0px 0px 7px 1px #aaa;
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
</style>
|