@movvjs/svelte-schedule-view 0.2.7 → 0.2.8-beta-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/.svelte-kit/__package__/schedule-view/Layout.svelte +2 -1
- package/.svelte-kit/__package__/schedule-view/Layout.svelte.d.ts +3 -1
- package/.svelte-kit/__package__/schedule-view/Plan.svelte +6 -4
- package/.svelte-kit/__package__/schedule-view/Schedule.svelte +2 -1
- package/.svelte-kit/__package__/schedule-view/Schedule.svelte.d.ts +1 -0
- package/.svelte-kit/generated/server/internal.js +1 -1
- package/dist/schedule-view/Layout.svelte +2 -1
- package/dist/schedule-view/Layout.svelte.d.ts +3 -1
- package/dist/schedule-view/Plan.svelte +6 -4
- package/dist/schedule-view/Schedule.svelte +2 -1
- package/dist/schedule-view/Schedule.svelte.d.ts +1 -0
- package/package.json +1 -1
- package/src/lib/schedule-view/Layout.svelte +3 -1
- package/src/lib/schedule-view/Plan.svelte +6 -4
- package/src/lib/schedule-view/Schedule.svelte +3 -1
- package/src/routes/development/+page.svelte +1 -1
|
@@ -6,6 +6,7 @@ import { env } from "../store/env";
|
|
|
6
6
|
import { Alert, Confirm } from "./components/notifications";
|
|
7
7
|
import Loader from "./components/loader/Loader.svelte";
|
|
8
8
|
import { onMount } from "svelte";
|
|
9
|
+
export let googleMapsApiKey;
|
|
9
10
|
init({
|
|
10
11
|
fallbackLocale: "en",
|
|
11
12
|
initialLocale: "en"
|
|
@@ -35,7 +36,7 @@ onMount(() => {
|
|
|
35
36
|
}));
|
|
36
37
|
d[l] ? console.warn(p + " only loads once. Ignoring:", g) : d[l] = (f, ...n) => r.add(f) && u().then(() => d[l](f, ...n));
|
|
37
38
|
})({
|
|
38
|
-
key:
|
|
39
|
+
key: googleMapsApiKey,
|
|
39
40
|
v: "weekly",
|
|
40
41
|
region: "kr",
|
|
41
42
|
language: navigator?.language || "en"
|
|
@@ -34,10 +34,12 @@ onMount(() => {
|
|
|
34
34
|
animation: 200,
|
|
35
35
|
direction: "horizontal",
|
|
36
36
|
onUpdate({ newDraggableIndex, oldDraggableIndex }) {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
37
|
+
withPreserveAndPreview(() => {
|
|
38
|
+
const updateWaypoints = cloneDeep($copiedBookingPlans.waypoints);
|
|
39
|
+
const [target] = updateWaypoints.splice(oldDraggableIndex, 1);
|
|
40
|
+
updateWaypoints.splice(newDraggableIndex, 0, target);
|
|
41
|
+
$copiedBooking.wayPoints = [...updateWaypoints, ...$copiedBookingServiceZone.waypoints];
|
|
42
|
+
});
|
|
41
43
|
}
|
|
42
44
|
});
|
|
43
45
|
}
|
|
@@ -30,6 +30,7 @@ const {
|
|
|
30
30
|
fullName,
|
|
31
31
|
selectedPrice
|
|
32
32
|
} = copiedBooking;
|
|
33
|
+
export let googleMapsApiKey;
|
|
33
34
|
let on = false;
|
|
34
35
|
let resolver;
|
|
35
36
|
$:
|
|
@@ -160,7 +161,7 @@ async function save() {
|
|
|
160
161
|
</script>
|
|
161
162
|
|
|
162
163
|
<Toaster />
|
|
163
|
-
<Layout>
|
|
164
|
+
<Layout {googleMapsApiKey}>
|
|
164
165
|
<section class="indie_pop_wrap scroll" class:on>
|
|
165
166
|
{#if on}
|
|
166
167
|
<div class="pop_base full_2 indie_passengers_info_pop">
|
|
@@ -21,7 +21,7 @@ export const options = {
|
|
|
21
21
|
app: ({ head, body, assets, nonce, env }) => "<!DOCTYPE html>\n<html lang=\"en\">\n\t<head>\n\t\t<meta charset=\"utf-8\" />\n\t\t<link rel=\"icon\" href=\"" + assets + "/favicon.png\" />\n\t\t<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\n\t\t<meta name=\"referrer\" content=\"no-referrer\" />\n\t\t" + head + "\n\t</head>\n\t<body data-sveltekit-preload-data=\"hover\">\n\t\t<div>" + body + "</div>\n\t</body>\n</html>\n",
|
|
22
22
|
error: ({ status, message }) => "<!doctype html>\n<html lang=\"en\">\n\t<head>\n\t\t<meta charset=\"utf-8\" />\n\t\t<title>" + message + "</title>\n\n\t\t<style>\n\t\t\tbody {\n\t\t\t\t--bg: white;\n\t\t\t\t--fg: #222;\n\t\t\t\t--divider: #ccc;\n\t\t\t\tbackground: var(--bg);\n\t\t\t\tcolor: var(--fg);\n\t\t\t\tfont-family:\n\t\t\t\t\tsystem-ui,\n\t\t\t\t\t-apple-system,\n\t\t\t\t\tBlinkMacSystemFont,\n\t\t\t\t\t'Segoe UI',\n\t\t\t\t\tRoboto,\n\t\t\t\t\tOxygen,\n\t\t\t\t\tUbuntu,\n\t\t\t\t\tCantarell,\n\t\t\t\t\t'Open Sans',\n\t\t\t\t\t'Helvetica Neue',\n\t\t\t\t\tsans-serif;\n\t\t\t\tdisplay: flex;\n\t\t\t\talign-items: center;\n\t\t\t\tjustify-content: center;\n\t\t\t\theight: 100vh;\n\t\t\t\tmargin: 0;\n\t\t\t}\n\n\t\t\t.error {\n\t\t\t\tdisplay: flex;\n\t\t\t\talign-items: center;\n\t\t\t\tmax-width: 32rem;\n\t\t\t\tmargin: 0 1rem;\n\t\t\t}\n\n\t\t\t.status {\n\t\t\t\tfont-weight: 200;\n\t\t\t\tfont-size: 3rem;\n\t\t\t\tline-height: 1;\n\t\t\t\tposition: relative;\n\t\t\t\ttop: -0.05rem;\n\t\t\t}\n\n\t\t\t.message {\n\t\t\t\tborder-left: 1px solid var(--divider);\n\t\t\t\tpadding: 0 0 0 1rem;\n\t\t\t\tmargin: 0 0 0 1rem;\n\t\t\t\tmin-height: 2.5rem;\n\t\t\t\tdisplay: flex;\n\t\t\t\talign-items: center;\n\t\t\t}\n\n\t\t\t.message h1 {\n\t\t\t\tfont-weight: 400;\n\t\t\t\tfont-size: 1em;\n\t\t\t\tmargin: 0;\n\t\t\t}\n\n\t\t\t@media (prefers-color-scheme: dark) {\n\t\t\t\tbody {\n\t\t\t\t\t--bg: #222;\n\t\t\t\t\t--fg: #ddd;\n\t\t\t\t\t--divider: #666;\n\t\t\t\t}\n\t\t\t}\n\t\t</style>\n\t</head>\n\t<body>\n\t\t<div class=\"error\">\n\t\t\t<span class=\"status\">" + status + "</span>\n\t\t\t<div class=\"message\">\n\t\t\t\t<h1>" + message + "</h1>\n\t\t\t</div>\n\t\t</div>\n\t</body>\n</html>\n"
|
|
23
23
|
},
|
|
24
|
-
version_hash: "
|
|
24
|
+
version_hash: "42f2c3"
|
|
25
25
|
};
|
|
26
26
|
|
|
27
27
|
export async function get_hooks() {
|
|
@@ -6,6 +6,7 @@ import { env } from "../store/env";
|
|
|
6
6
|
import { Alert, Confirm } from "./components/notifications";
|
|
7
7
|
import Loader from "./components/loader/Loader.svelte";
|
|
8
8
|
import { onMount } from "svelte";
|
|
9
|
+
export let googleMapsApiKey;
|
|
9
10
|
init({
|
|
10
11
|
fallbackLocale: "en",
|
|
11
12
|
initialLocale: "en"
|
|
@@ -35,7 +36,7 @@ onMount(() => {
|
|
|
35
36
|
}));
|
|
36
37
|
d[l] ? console.warn(p + " only loads once. Ignoring:", g) : d[l] = (f, ...n) => r.add(f) && u().then(() => d[l](f, ...n));
|
|
37
38
|
})({
|
|
38
|
-
key:
|
|
39
|
+
key: googleMapsApiKey,
|
|
39
40
|
v: "weekly",
|
|
40
41
|
region: "kr",
|
|
41
42
|
language: navigator?.language || "en"
|
|
@@ -34,10 +34,12 @@ onMount(() => {
|
|
|
34
34
|
animation: 200,
|
|
35
35
|
direction: "horizontal",
|
|
36
36
|
onUpdate({ newDraggableIndex, oldDraggableIndex }) {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
37
|
+
withPreserveAndPreview(() => {
|
|
38
|
+
const updateWaypoints = cloneDeep($copiedBookingPlans.waypoints);
|
|
39
|
+
const [target] = updateWaypoints.splice(oldDraggableIndex, 1);
|
|
40
|
+
updateWaypoints.splice(newDraggableIndex, 0, target);
|
|
41
|
+
$copiedBooking.wayPoints = [...updateWaypoints, ...$copiedBookingServiceZone.waypoints];
|
|
42
|
+
});
|
|
41
43
|
}
|
|
42
44
|
});
|
|
43
45
|
}
|
|
@@ -30,6 +30,7 @@ const {
|
|
|
30
30
|
fullName,
|
|
31
31
|
selectedPrice
|
|
32
32
|
} = copiedBooking;
|
|
33
|
+
export let googleMapsApiKey;
|
|
33
34
|
let on = false;
|
|
34
35
|
let resolver;
|
|
35
36
|
$:
|
|
@@ -160,7 +161,7 @@ async function save() {
|
|
|
160
161
|
</script>
|
|
161
162
|
|
|
162
163
|
<Toaster />
|
|
163
|
-
<Layout>
|
|
164
|
+
<Layout {googleMapsApiKey}>
|
|
164
165
|
<section class="indie_pop_wrap scroll" class:on>
|
|
165
166
|
{#if on}
|
|
166
167
|
<div class="pop_base full_2 indie_passengers_info_pop">
|
package/package.json
CHANGED
|
@@ -12,6 +12,8 @@
|
|
|
12
12
|
import Loader from './components/loader/Loader.svelte'
|
|
13
13
|
import { onMount } from 'svelte'
|
|
14
14
|
|
|
15
|
+
export let googleMapsApiKey: string
|
|
16
|
+
|
|
15
17
|
init({
|
|
16
18
|
fallbackLocale: 'en',
|
|
17
19
|
initialLocale: 'en'
|
|
@@ -29,7 +31,7 @@
|
|
|
29
31
|
// https://developers.google.com/maps/documentation/javascript/load-maps-js-api?hl=ko#dynamic-library-import
|
|
30
32
|
// prettier-ignore
|
|
31
33
|
;(g=>{var h,a,k,p="The Google Maps JavaScript API",c="google",l="importLibrary",q="__ib__",m=document,b=window;b=b[c]||(b[c]={});var d=b.maps||(b.maps={}),r=new Set,e=new URLSearchParams,u=()=>h||(h=new Promise(async(f,n)=>{await (a=m.createElement("script"));e.set("libraries",[...r]+"");for(k in g)e.set(k.replace(/[A-Z]/g,t=>"_"+t[0].toLowerCase()),g[k]);e.set("callback",c+".maps."+q);a.src=`https://maps.${c}apis.com/maps/api/js?`+e;d[q]=f;a.onerror=()=>h=n(Error(p+" could not load."));a.nonce=m.querySelector("script[nonce]")?.nonce||"";m.head.append(a)}));d[l]?console.warn(p+" only loads once. Ignoring:",g):d[l]=(f,...n)=>r.add(f)&&u().then(()=>d[l](f,...n))})({
|
|
32
|
-
key:
|
|
34
|
+
key: googleMapsApiKey,
|
|
33
35
|
v: "weekly",
|
|
34
36
|
region: "kr",
|
|
35
37
|
language: navigator?.language || "en",
|
|
@@ -44,10 +44,12 @@
|
|
|
44
44
|
animation: 200,
|
|
45
45
|
direction: 'horizontal',
|
|
46
46
|
onUpdate({ newDraggableIndex, oldDraggableIndex }) {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
47
|
+
withPreserveAndPreview(() => {
|
|
48
|
+
const updateWaypoints = cloneDeep($copiedBookingPlans.waypoints)
|
|
49
|
+
const [target] = updateWaypoints.splice(oldDraggableIndex, 1) // 빼서
|
|
50
|
+
updateWaypoints.splice(newDraggableIndex, 0, target) // 넣고
|
|
51
|
+
$copiedBooking.wayPoints = [...updateWaypoints, ...$copiedBookingServiceZone.waypoints]
|
|
52
|
+
})
|
|
51
53
|
}
|
|
52
54
|
})
|
|
53
55
|
}
|
|
@@ -49,6 +49,8 @@
|
|
|
49
49
|
selectedPrice
|
|
50
50
|
} = copiedBooking
|
|
51
51
|
|
|
52
|
+
export let googleMapsApiKey: string
|
|
53
|
+
|
|
52
54
|
let on = false
|
|
53
55
|
let resolver: (value: Awaited<ReturnType<typeof open>>) => void
|
|
54
56
|
|
|
@@ -214,7 +216,7 @@
|
|
|
214
216
|
</script>
|
|
215
217
|
|
|
216
218
|
<Toaster />
|
|
217
|
-
<Layout>
|
|
219
|
+
<Layout {googleMapsApiKey}>
|
|
218
220
|
<section class="indie_pop_wrap scroll" class:on>
|
|
219
221
|
{#if on}
|
|
220
222
|
<div class="pop_base full_2 indie_passengers_info_pop">
|