@qispace/vue3-player 0.0.16 → 0.1.1
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/dist/vue-components/config/vite.config.d.ts +2 -0
- package/dist/vue-components/config/vite.config.dev.d.ts +2 -0
- package/dist/vue-components/config/vite.config.web-components.d.ts +2 -0
- package/dist/vue-components/src/components/apartmentChooser/VApartmentChooser.vue.d.ts +129 -0
- package/dist/vue-components/src/components/apartmentChooser/VApartmentChooserNavigation.vue.d.ts +46 -0
- package/dist/vue-components/src/components/apartmentChooser/VApartmentChooserRaster.vue.d.ts +77 -0
- package/dist/vue-components/src/components/apartmentChooser/VApartmentChooserRotator.vue.d.ts +43 -0
- package/dist/vue-components/src/components/apartmentChooser/VApartmentChooserSvg.vue.d.ts +77 -0
- package/dist/vue-components/src/components/apartmentChooser/index.d.ts +5 -0
- package/dist/vue-components/src/components/apartmentChooser/types.d.ts +13 -0
- package/dist/vue-components/src/components/buildingPicker/VBuildingChooser.vue.d.ts +93 -0
- package/dist/vue-components/src/components/buildingPicker/VBuildingChooserRaster.vue.d.ts +97 -0
- package/dist/vue-components/src/components/buildingPicker/VBuildingChooserRasterOverlay.vue.d.ts +46 -0
- package/dist/vue-components/src/components/buildingPicker/VBuildingChooserSceneImageStack.vue.d.ts +27 -0
- package/dist/vue-components/src/components/buildingPicker/VBuildingChooserSunSimControl.vue.d.ts +37 -0
- package/dist/vue-components/src/components/buildingPicker/VBuildingChooserSvg.vue.d.ts +102 -0
- package/dist/vue-components/src/components/buildingPicker/index.d.ts +6 -0
- package/dist/vue-components/src/components/buildingPicker/types.d.ts +11 -0
- package/dist/{components → vue-components/src/components}/index.d.ts +1 -1
- package/dist/vue-components/src/components/shared/VFloatingCard.vue.d.ts +30 -0
- package/dist/vue-components/src/components/shared/VHoverProbe.vue.d.ts +4 -0
- package/dist/vue-components/src/components/shared/VNorthDirection.vue.d.ts +15 -0
- package/dist/vue-components/src/components/shared/VZoomBox.vue.d.ts +60 -0
- package/dist/vue-components/src/components/shared/index.d.ts +4 -0
- package/dist/vue-components/src/components/virtualTour/VCompass.vue.d.ts +15 -0
- package/dist/vue-components/src/components/virtualTour/VDisclaimer.vue.d.ts +2 -0
- package/dist/vue-components/src/components/virtualTour/VFloorLevel.vue.d.ts +38 -0
- package/dist/vue-components/src/components/virtualTour/VFullScreenButton.vue.d.ts +19 -0
- package/dist/vue-components/src/components/virtualTour/VInteriorSelector.vue.d.ts +21 -0
- package/dist/vue-components/src/components/virtualTour/VPlayer.vue.d.ts +74 -0
- package/dist/vue-components/src/components/virtualTour/VSettingsUI.vue.d.ts +23 -0
- package/dist/vue-components/src/components/virtualTour/VSingleImage.vue.d.ts +31 -0
- package/dist/vue-components/src/components/virtualTour/VSocialShare.vue.d.ts +2 -0
- package/dist/vue-components/src/components/virtualTour/VTimeOfDay.vue.d.ts +34 -0
- package/dist/vue-components/src/components/virtualTour/VTutorial.vue.d.ts +19 -0
- package/dist/vue-components/src/components/virtualTour/VViewModeToggle.vue.d.ts +19 -0
- package/dist/vue-components/src/components/virtualTour/VVirtualTour.vue.d.ts +156 -0
- package/dist/vue-components/src/components/virtualTour/VWaypointCarousel.vue.d.ts +25 -0
- package/dist/vue-components/src/components/virtualTour/index.d.ts +1 -0
- package/dist/vue-components/src/components/virtualTour/minimap/VMiniMap.vue.d.ts +35 -0
- package/dist/vue-components/src/components/virtualTour/minimap/VMiniMapMap.vue.d.ts +25 -0
- package/dist/vue-components/src/components/virtualTour/minimap/VMinimapCompass.vue.d.ts +19 -0
- package/dist/vue-components/src/components/virtualTour/minimap/VMoveable.vue.d.ts +18 -0
- package/dist/vue-components/src/components/virtualTour/minimap/VRotationMarker.vue.d.ts +15 -0
- package/dist/vue-components/src/components/virtualTour/minimap/VSunSimulationSlider.vue.d.ts +23 -0
- package/dist/vue-components/src/components/virtualTour/minimap/index.d.ts +1 -0
- package/dist/vue-components/src/lib/apartmentChooser/BuildingViewerModel.d.ts +18 -0
- package/dist/vue-components/src/lib/apartmentChooser/RotationStep.d.ts +10 -0
- package/dist/vue-components/src/lib/apartmentChooser/SceneRotator.d.ts +10 -0
- package/dist/vue-components/src/lib/apartmentChooser/index.d.ts +3 -0
- package/dist/vue-components/src/lib/buildingPicker/BuildingMap.d.ts +7 -0
- package/dist/vue-components/src/lib/buildingPicker/BuildingPickerResourceProvider.d.ts +27 -0
- package/dist/vue-components/src/lib/buildingPicker/CanvasRaster.d.ts +8 -0
- package/dist/vue-components/src/lib/buildingPicker/DayOfYearSelector.d.ts +12 -0
- package/dist/vue-components/src/lib/buildingPicker/SampleRaster.d.ts +5 -0
- package/dist/vue-components/src/lib/buildingPicker/index.d.ts +5 -0
- package/dist/vue-components/src/lib/shared/BatchLoadTracker.d.ts +17 -0
- package/dist/vue-components/src/lib/shared/I18N.d.ts +7 -0
- package/dist/vue-components/src/lib/shared/ResourceLoader.d.ts +5 -0
- package/dist/vue-components/src/lib/shared/index.d.ts +3 -0
- package/dist/vue-components/src/lib/virtualTour/CameraSnapshot.d.ts +5 -0
- package/dist/vue-components/src/lib/virtualTour/FullscreenModel.d.ts +13 -0
- package/dist/vue-components/src/vue-components.d.ts +2 -0
- package/dist/vue-components/src/vue-components.esm.d.ts +4 -0
- package/dist/vue-components/src/web-components.d.ts +11 -0
- package/dist/vue-components/style.css +1 -0
- package/dist/vue-components/vue3-player.js +4744 -0
- package/dist/vue-components/vue3-player.umd.cjs +1 -0
- package/package.json +24 -14
- package/dist/components/apartmentChooser/QiApartmentChooser.vue.d.ts +0 -2
- package/dist/components/apartmentChooser/QiApartmentChooserNavigation.vue.d.ts +0 -51
- package/dist/components/apartmentChooser/QiApartmentChooserRaster.vue.d.ts +0 -2
- package/dist/components/apartmentChooser/QiApartmentChooserRotator.vue.d.ts +0 -65
- package/dist/components/apartmentChooser/QiApartmentChooserSvg.vue.d.ts +0 -2
- package/dist/components/buildingPicker/QiBuildingChooser.vue.d.ts +0 -121
- package/dist/components/buildingPicker/QiBuildingChooserRaster.vue.d.ts +0 -2
- package/dist/components/buildingPicker/QiBuildingChooserRasterOverlay.vue.d.ts +0 -53
- package/dist/components/buildingPicker/QiBuildingChooserSceneImageStack.vue.d.ts +0 -32
- package/dist/components/buildingPicker/QiBuildingChooserSunSimControl.vue.d.ts +0 -42
- package/dist/components/buildingPicker/QiBuildingChooserSvg.vue.d.ts +0 -2
- package/dist/components/shared/QiFloatingCard.vue.d.ts +0 -18
- package/dist/components/shared/QiHoverProbe.vue.d.ts +0 -4
- package/dist/components/shared/QiNorthDirection.vue.d.ts +0 -21
- package/dist/components/shared/QiZoomBox.vue.d.ts +0 -83
- package/dist/components/virtualTourV2/Compass.vue.d.ts +0 -22
- package/dist/components/virtualTourV2/Disclaimer.vue.d.ts +0 -4
- package/dist/components/virtualTourV2/FloorLevel.vue.d.ts +0 -27
- package/dist/components/virtualTourV2/FullScreenButton.vue.d.ts +0 -14
- package/dist/components/virtualTourV2/InteriorSelector.vue.d.ts +0 -24
- package/dist/components/virtualTourV2/Player.vue.d.ts +0 -82
- package/dist/components/virtualTourV2/SettingsUI.vue.d.ts +0 -105
- package/dist/components/virtualTourV2/SingleImage.vue.d.ts +0 -26
- package/dist/components/virtualTourV2/SocialShare.vue.d.ts +0 -10
- package/dist/components/virtualTourV2/TimeOfDay.vue.d.ts +0 -27
- package/dist/components/virtualTourV2/Tutorial.vue.d.ts +0 -23
- package/dist/components/virtualTourV2/ViewModeToggle.vue.d.ts +0 -16
- package/dist/components/virtualTourV2/VirtualTourV2.vue.d.ts +0 -322
- package/dist/components/virtualTourV2/WaypointCarousel.vue.d.ts +0 -31
- package/dist/components/virtualTourV2/index.d.ts +0 -1
- package/dist/components/virtualTourV2/minimapv2/MiniMapMap.vue.d.ts +0 -82
- package/dist/components/virtualTourV2/minimapv2/MiniMapV2.vue.d.ts +0 -78
- package/dist/components/virtualTourV2/minimapv2/MinimapCompass.vue.d.ts +0 -30
- package/dist/components/virtualTourV2/minimapv2/Moveable.vue.d.ts +0 -8
- package/dist/components/virtualTourV2/minimapv2/RotationMarkerV2.vue.d.ts +0 -12
- package/dist/components/virtualTourV2/minimapv2/SunsimulationSlider.vue.d.ts +0 -48
- package/dist/components/virtualTourV2/minimapv2/index.d.ts +0 -1
- package/dist/style.css +0 -1
- package/dist/vue3-player.js +0 -5414
- package/dist/vue3-player.umd.cjs +0 -1
- package/src/components/apartmentChooser/QiApartmentChooser.vue +0 -319
- package/src/components/apartmentChooser/QiApartmentChooserNavigation.vue +0 -88
- package/src/components/apartmentChooser/QiApartmentChooserRaster.vue +0 -408
- package/src/components/apartmentChooser/QiApartmentChooserRotator.vue +0 -202
- package/src/components/apartmentChooser/QiApartmentChooserSvg.vue +0 -257
- package/src/components/apartmentChooser/index.js +0 -5
- package/src/components/buildingPicker/QiBuildingChooser.vue +0 -61
- package/src/components/buildingPicker/QiBuildingChooserRaster.vue +0 -312
- package/src/components/buildingPicker/QiBuildingChooserRasterOverlay.vue +0 -96
- package/src/components/buildingPicker/QiBuildingChooserSceneImageStack.vue +0 -89
- package/src/components/buildingPicker/QiBuildingChooserSunSimControl.vue +0 -257
- package/src/components/buildingPicker/QiBuildingChooserSvg.vue +0 -414
- package/src/components/buildingPicker/index.js +0 -6
- package/src/components/index.ts +0 -4
- package/src/components/shared/QiFloatingCard.vue +0 -76
- package/src/components/shared/QiHoverProbe.vue +0 -22
- package/src/components/shared/QiNorthDirection.vue +0 -27
- package/src/components/shared/QiZoomBox.vue +0 -322
- package/src/components/shared/index.js +0 -4
- package/src/components/virtualTourV2/Compass.vue +0 -37
- package/src/components/virtualTourV2/Disclaimer.vue +0 -41
- package/src/components/virtualTourV2/FloorLevel.vue +0 -73
- package/src/components/virtualTourV2/FullScreenButton.vue +0 -23
- package/src/components/virtualTourV2/InteriorSelector.vue +0 -90
- package/src/components/virtualTourV2/ManualSlideShow.vue +0 -198
- package/src/components/virtualTourV2/ManualSlideShowPlayer.vue +0 -159
- package/src/components/virtualTourV2/Player.vue +0 -300
- package/src/components/virtualTourV2/ScrollHelper.vue +0 -74
- package/src/components/virtualTourV2/SettingsUI.vue +0 -355
- package/src/components/virtualTourV2/SingleImage.vue +0 -36
- package/src/components/virtualTourV2/SocialShare.vue +0 -163
- package/src/components/virtualTourV2/TimeOfDay.vue +0 -50
- package/src/components/virtualTourV2/Tutorial.vue +0 -690
- package/src/components/virtualTourV2/ViewModeToggle.vue +0 -24
- package/src/components/virtualTourV2/VirtualTourV2.vue +0 -875
- package/src/components/virtualTourV2/WaypointCarousel.vue +0 -162
- package/src/components/virtualTourV2/index.ts +0 -20
- package/src/components/virtualTourV2/minimapv2/MiniMapMap.vue +0 -262
- package/src/components/virtualTourV2/minimapv2/MiniMapV2.vue +0 -110
- package/src/components/virtualTourV2/minimapv2/MinimapCompass.vue +0 -39
- package/src/components/virtualTourV2/minimapv2/Moveable.vue +0 -208
- package/src/components/virtualTourV2/minimapv2/RotationMarkerV2.vue +0 -79
- package/src/components/virtualTourV2/minimapv2/SunsimulationSlider.vue +0 -203
- package/src/components/virtualTourV2/minimapv2/index.ts +0 -1
- /package/dist/{lib → vue-components/src/lib}/index.d.ts +0 -0
|
@@ -1,96 +0,0 @@
|
|
|
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>
|
|
@@ -1,89 +0,0 @@
|
|
|
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>
|
|
@@ -1,257 +0,0 @@
|
|
|
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>
|