@flowselections/google-maps-api-installatie-techniek 1.0.2
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-lib/_core-safelist.d.ts +2 -0
- package/dist-lib/_core-safelist.d.ts.map +1 -0
- package/dist-lib/_core-safelist.js +15 -0
- package/dist-lib/components/MapsBeheerPage.d.ts +2 -0
- package/dist-lib/components/MapsBeheerPage.d.ts.map +1 -0
- package/dist-lib/components/MapsBeheerPage.js +68 -0
- package/dist-lib/components/MapsInstallatieLogo.d.ts +6 -0
- package/dist-lib/components/MapsInstallatieLogo.d.ts.map +1 -0
- package/dist-lib/components/MapsInstallatieLogo.js +4 -0
- package/dist-lib/components/maps/MapsDiagnosticsPanel.d.ts +2 -0
- package/dist-lib/components/maps/MapsDiagnosticsPanel.d.ts.map +1 -0
- package/dist-lib/components/maps/MapsDiagnosticsPanel.js +81 -0
- package/dist-lib/components/maps/MapsStatusPanel.d.ts +5 -0
- package/dist-lib/components/maps/MapsStatusPanel.d.ts.map +1 -0
- package/dist-lib/components/maps/MapsStatusPanel.js +74 -0
- package/dist-lib/components/settings/MapsSettingsCard.d.ts +2 -0
- package/dist-lib/components/settings/MapsSettingsCard.d.ts.map +1 -0
- package/dist-lib/components/settings/MapsSettingsCard.js +15 -0
- package/dist-lib/index.d.ts +7 -0
- package/dist-lib/index.d.ts.map +1 -0
- package/dist-lib/index.js +20 -0
- package/dist-lib/integrations/supabase/auth-attacher.d.ts +2 -0
- package/dist-lib/integrations/supabase/auth-attacher.d.ts.map +1 -0
- package/dist-lib/integrations/supabase/auth-attacher.js +12 -0
- package/dist-lib/integrations/supabase/auth-middleware.d.ts +23365 -0
- package/dist-lib/integrations/supabase/auth-middleware.d.ts.map +1 -0
- package/dist-lib/integrations/supabase/auth-middleware.js +52 -0
- package/dist-lib/integrations/supabase/client.d.ts +23361 -0
- package/dist-lib/integrations/supabase/client.d.ts.map +1 -0
- package/dist-lib/integrations/supabase/client.js +29 -0
- package/dist-lib/integrations/supabase/client.server.d.ts +23361 -0
- package/dist-lib/integrations/supabase/client.server.d.ts.map +1 -0
- package/dist-lib/integrations/supabase/client.server.js +30 -0
- package/dist-lib/integrations/supabase/previewAuthStorage.d.ts +6 -0
- package/dist-lib/integrations/supabase/previewAuthStorage.d.ts.map +1 -0
- package/dist-lib/integrations/supabase/previewAuthStorage.js +92 -0
- package/dist-lib/integrations/supabase/types.d.ts +23990 -0
- package/dist-lib/integrations/supabase/types.d.ts.map +1 -0
- package/dist-lib/integrations/supabase/types.js +92 -0
- package/dist-lib/lib/central-auth.server.d.ts +60 -0
- package/dist-lib/lib/central-auth.server.d.ts.map +1 -0
- package/dist-lib/lib/central-auth.server.js +439 -0
- package/dist-lib/lib/google-maps.server.d.ts +22 -0
- package/dist-lib/lib/google-maps.server.d.ts.map +1 -0
- package/dist-lib/lib/google-maps.server.js +65 -0
- package/dist-lib/lib/maps-admin.server.d.ts +17 -0
- package/dist-lib/lib/maps-admin.server.d.ts.map +1 -0
- package/dist-lib/lib/maps-admin.server.js +121 -0
- package/dist-lib/lib/maps-diagnostics.server.d.ts +4 -0
- package/dist-lib/lib/maps-diagnostics.server.d.ts.map +1 -0
- package/dist-lib/lib/maps-diagnostics.server.js +137 -0
- package/dist-lib/lib/maps-processor.server.d.ts +16 -0
- package/dist-lib/lib/maps-processor.server.d.ts.map +1 -0
- package/dist-lib/lib/maps-processor.server.js +315 -0
- package/dist-lib/lib/maps.functions.d.ts +186950 -0
- package/dist-lib/lib/maps.functions.d.ts.map +1 -0
- package/dist-lib/lib/maps.functions.js +63 -0
- package/dist-lib/lib/utils.d.ts +3 -0
- package/dist-lib/lib/utils.d.ts.map +1 -0
- package/dist-lib/lib/utils.js +5 -0
- package/dist-lib/lib/validationSchemas.d.ts +15 -0
- package/dist-lib/lib/validationSchemas.d.ts.map +1 -0
- package/dist-lib/lib/validationSchemas.js +25 -0
- package/dist-lib/styles.css +1 -0
- package/package.json +87 -0
- package/public/logo.png +0 -0
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { createServerFn } from "@tanstack/react-start";
|
|
2
|
+
import { requireSupabaseAuth } from "../integrations/supabase/auth-middleware";
|
|
3
|
+
export const getMapsOverview = createServerFn({ method: "GET" })
|
|
4
|
+
.middleware([requireSupabaseAuth])
|
|
5
|
+
.handler(async () => {
|
|
6
|
+
const { getMapsOverviewData } = await import("./maps-admin.server");
|
|
7
|
+
return getMapsOverviewData();
|
|
8
|
+
});
|
|
9
|
+
export const processMapsQueue = createServerFn({ method: "POST" })
|
|
10
|
+
.middleware([requireSupabaseAuth])
|
|
11
|
+
.handler(async () => {
|
|
12
|
+
const { processMapsQueueBatch } = await import("./maps-processor.server");
|
|
13
|
+
return processMapsQueueBatch();
|
|
14
|
+
});
|
|
15
|
+
export const updateMapsSettings = createServerFn({ method: "POST" })
|
|
16
|
+
.middleware([requireSupabaseAuth])
|
|
17
|
+
.inputValidator((input) => {
|
|
18
|
+
const ttl = Math.min(365, Math.max(1, Math.round(Number(input.cacheTtlDays))));
|
|
19
|
+
const limit = Math.min(100000, Math.max(0, Math.round(Number(input.dailyCallLimit))));
|
|
20
|
+
if (!Number.isFinite(ttl) || !Number.isFinite(limit)) {
|
|
21
|
+
throw new Error("Ongeldige instellingen");
|
|
22
|
+
}
|
|
23
|
+
return {
|
|
24
|
+
cacheTtlDays: ttl,
|
|
25
|
+
dailyCallLimit: limit,
|
|
26
|
+
allowEstimateFallback: Boolean(input.allowEstimateFallback),
|
|
27
|
+
provider: input.provider === "google" ? "google" : "free",
|
|
28
|
+
};
|
|
29
|
+
})
|
|
30
|
+
.handler(async ({ data }) => {
|
|
31
|
+
const { saveMapsSettings } = await import("./maps-admin.server");
|
|
32
|
+
return saveMapsSettings(data);
|
|
33
|
+
});
|
|
34
|
+
export const clearMapsCache = createServerFn({ method: "POST" })
|
|
35
|
+
.middleware([requireSupabaseAuth])
|
|
36
|
+
.handler(async () => {
|
|
37
|
+
const { clearCache } = await import("./maps-admin.server");
|
|
38
|
+
return clearCache();
|
|
39
|
+
});
|
|
40
|
+
export const purgeExpiredTravelTimes = createServerFn({ method: "POST" })
|
|
41
|
+
.middleware([requireSupabaseAuth])
|
|
42
|
+
.handler(async () => {
|
|
43
|
+
const { purgeExpired } = await import("./maps-admin.server");
|
|
44
|
+
return purgeExpired();
|
|
45
|
+
});
|
|
46
|
+
export const getMapsStatus = createServerFn({ method: "GET" })
|
|
47
|
+
.middleware([requireSupabaseAuth])
|
|
48
|
+
.handler(async () => {
|
|
49
|
+
const { getMapsConnectionStatus } = await import("./central-auth.server");
|
|
50
|
+
return getMapsConnectionStatus();
|
|
51
|
+
});
|
|
52
|
+
export const testMapsConnection = createServerFn({ method: "POST" })
|
|
53
|
+
.middleware([requireSupabaseAuth])
|
|
54
|
+
.handler(async () => {
|
|
55
|
+
const { testGoogleConnectionLive } = await import("./central-auth.server");
|
|
56
|
+
return testGoogleConnectionLive();
|
|
57
|
+
});
|
|
58
|
+
export const getMapsDiagnostics = createServerFn({ method: "POST" })
|
|
59
|
+
.middleware([requireSupabaseAuth])
|
|
60
|
+
.handler(async () => {
|
|
61
|
+
const { runMapsDiagnostics } = await import("./maps-diagnostics.server");
|
|
62
|
+
return runMapsDiagnostics();
|
|
63
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/lib/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,UAAU,EAAE,MAAM,MAAM,CAAA;AAG5C,wBAAgB,EAAE,CAAC,GAAG,MAAM,EAAE,UAAU,EAAE,UAEzC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const loginSchema: z.ZodObject<{
|
|
3
|
+
email: z.ZodString;
|
|
4
|
+
password: z.ZodString;
|
|
5
|
+
}, z.core.$strip>;
|
|
6
|
+
export declare const bugReportSchema: z.ZodObject<{
|
|
7
|
+
title: z.ZodString;
|
|
8
|
+
description: z.ZodString;
|
|
9
|
+
}, z.core.$strip>;
|
|
10
|
+
export declare const ALLOWED_FILE_TYPES: string[];
|
|
11
|
+
export declare function validateFileUpload(file: File): {
|
|
12
|
+
valid: boolean;
|
|
13
|
+
error?: string;
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=validationSchemas.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validationSchemas.d.ts","sourceRoot":"","sources":["../../src/lib/validationSchemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,WAAW;;;iBAGtB,CAAC;AAEH,eAAO,MAAM,eAAe;;;iBAG1B,CAAC;AAEH,eAAO,MAAM,kBAAkB,UAK9B,CAAC;AAIF,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,IAAI,GAAG;IAAE,KAAK,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAQjF"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export const loginSchema = z.object({
|
|
3
|
+
email: z.string().email("Ongeldig e-mailadres"),
|
|
4
|
+
password: z.string().min(6, "Wachtwoord moet minimaal 6 tekens bevatten"),
|
|
5
|
+
});
|
|
6
|
+
export const bugReportSchema = z.object({
|
|
7
|
+
title: z.string().min(1, "Titel is verplicht").max(200),
|
|
8
|
+
description: z.string().min(1, "Beschrijving is verplicht").max(5000),
|
|
9
|
+
});
|
|
10
|
+
export const ALLOWED_FILE_TYPES = [
|
|
11
|
+
"image/png",
|
|
12
|
+
"image/jpeg",
|
|
13
|
+
"image/gif",
|
|
14
|
+
"application/pdf",
|
|
15
|
+
];
|
|
16
|
+
const MAX_FILE_SIZE = 10 * 1024 * 1024; // 10MB
|
|
17
|
+
export function validateFileUpload(file) {
|
|
18
|
+
if (!ALLOWED_FILE_TYPES.includes(file.type)) {
|
|
19
|
+
return { valid: false, error: "Bestandstype niet toegestaan" };
|
|
20
|
+
}
|
|
21
|
+
if (file.size > MAX_FILE_SIZE) {
|
|
22
|
+
return { valid: false, error: "Bestand is te groot (max 10MB)" };
|
|
23
|
+
}
|
|
24
|
+
return { valid: true };
|
|
25
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@source "./";
|
package/package.json
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@flowselections/google-maps-api-installatie-techniek",
|
|
3
|
+
"version": "1.0.2",
|
|
4
|
+
"flowselections": {
|
|
5
|
+
"moduleId": "maps-installatie",
|
|
6
|
+
"pages": [
|
|
7
|
+
{
|
|
8
|
+
"export": "MapsBeheerPage",
|
|
9
|
+
"route": "maps-installatie",
|
|
10
|
+
"title": "Kaarten"
|
|
11
|
+
}
|
|
12
|
+
]
|
|
13
|
+
},
|
|
14
|
+
"private": false,
|
|
15
|
+
"sideEffects": false,
|
|
16
|
+
"type": "module",
|
|
17
|
+
"main": "./dist-lib/index.js",
|
|
18
|
+
"types": "./dist-lib/index.d.ts",
|
|
19
|
+
"exports": {
|
|
20
|
+
".": {
|
|
21
|
+
"types": "./dist-lib/index.d.ts",
|
|
22
|
+
"default": "./dist-lib/index.js"
|
|
23
|
+
},
|
|
24
|
+
"./styles": "./dist-lib/styles.css"
|
|
25
|
+
},
|
|
26
|
+
"files": [
|
|
27
|
+
"dist-lib",
|
|
28
|
+
"public"
|
|
29
|
+
],
|
|
30
|
+
"publishConfig": {
|
|
31
|
+
"access": "public"
|
|
32
|
+
},
|
|
33
|
+
"scripts": {
|
|
34
|
+
"dev": "vite dev",
|
|
35
|
+
"build": "vite build",
|
|
36
|
+
"build:lib": "tsc -p tsconfig.build.json && tsc-alias -p tsconfig.build.json && node -e \"require('fs').writeFileSync('dist-lib/styles.css', '@source \\\"./\\\";\\n')\"",
|
|
37
|
+
"build:lib:watch": "tsc -p tsconfig.build.json --watch",
|
|
38
|
+
"build:dev": "vite build --mode development",
|
|
39
|
+
"preview": "vite preview",
|
|
40
|
+
"lint": "eslint ."
|
|
41
|
+
},
|
|
42
|
+
"peerDependencies": {
|
|
43
|
+
"@flowselections/core": "*",
|
|
44
|
+
"@tanstack/react-query": "^5.0.0",
|
|
45
|
+
"@tanstack/react-router": "^1.0.0",
|
|
46
|
+
"@tanstack/react-start": "^1.0.0",
|
|
47
|
+
"lucide-react": "^0.400.0",
|
|
48
|
+
"react": "^18 || ^19",
|
|
49
|
+
"react-dom": "^18 || ^19",
|
|
50
|
+
"sonner": "^2.0.0"
|
|
51
|
+
},
|
|
52
|
+
"dependencies": {
|
|
53
|
+
"@supabase/supabase-js": "^2.105.3"
|
|
54
|
+
},
|
|
55
|
+
"devDependencies": {
|
|
56
|
+
"@cloudflare/vite-plugin": "^1.25.5",
|
|
57
|
+
"@eslint/js": "^9.32.0",
|
|
58
|
+
"@flowselections/core": "1.0.18",
|
|
59
|
+
"@lovable.dev/vite-tanstack-config": "2.13.1",
|
|
60
|
+
"@rsbuild/core": "^1.0.0",
|
|
61
|
+
"@tailwindcss/vite": "^4.2.1",
|
|
62
|
+
"@tanstack/react-query": "^5.83.0",
|
|
63
|
+
"@tanstack/react-router": "^1.168.0",
|
|
64
|
+
"@tanstack/react-start": "^1.167.14",
|
|
65
|
+
"@tanstack/router-plugin": "^1.167.10",
|
|
66
|
+
"@types/node": "^22.16.5",
|
|
67
|
+
"@types/react": "^19.2.0",
|
|
68
|
+
"@types/react-dom": "^19.2.0",
|
|
69
|
+
"@vitejs/plugin-react": "^5.0.4",
|
|
70
|
+
"eslint": "^9.32.0",
|
|
71
|
+
"eslint-plugin-react-hooks": "^5.2.0",
|
|
72
|
+
"eslint-plugin-react-refresh": "^0.4.20",
|
|
73
|
+
"globals": "^15.15.0",
|
|
74
|
+
"lucide-react": "^0.575.0",
|
|
75
|
+
"react": "^19.2.0",
|
|
76
|
+
"react-dom": "^19.2.0",
|
|
77
|
+
"sonner": "^2.0.7",
|
|
78
|
+
"tailwindcss": "^4.2.1",
|
|
79
|
+
"tw-animate-css": "^1.3.4",
|
|
80
|
+
"typescript": "^5.8.3",
|
|
81
|
+
"tsc-alias": "^1.8.10",
|
|
82
|
+
"typescript-eslint": "^8.56.1",
|
|
83
|
+
"vite": "^7.3.1",
|
|
84
|
+
"vite-tsconfig-paths": "^6.0.2",
|
|
85
|
+
"nitro": "3.0.260603-beta"
|
|
86
|
+
}
|
|
87
|
+
}
|
package/public/logo.png
ADDED
|
Binary file
|