Page Menu
Home
Sealhub
Search
Configure Global Search
Log In
Files
F22421952
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Authored By
Unknown
Size
2 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/src/back/jdd-components/map-with-pins/map-with-pins.jdd.tsx b/src/back/jdd-components/map-with-pins/map-with-pins.jdd.tsx
index 5ae3507..c28d968 100644
--- a/src/back/jdd-components/map-with-pins/map-with-pins.jdd.tsx
+++ b/src/back/jdd-components/map-with-pins/map-with-pins.jdd.tsx
@@ -1,65 +1,67 @@
import type { FlatTemplatable } from "tempstream";
import { TempstreamJSX } from "tempstream";
import type { ExtractStructuredComponentArgumentsValues } from "@sealcode/jdd";
import { Component, ComponentArguments } from "@sealcode/jdd";
const coordinates = new ComponentArguments.ShortText();
coordinates.setExampleValues([
"52.39706859245613, 16.898251247012197",
"52.8, 16.6",
"52.5, 16.1",
"52.1, 16.35",
]);
const component_arguments = {
pins: new ComponentArguments.List(
new ComponentArguments.Structured({
title: new ComponentArguments.ShortText(),
address: new ComponentArguments.ShortText(),
coordinates,
button: new ComponentArguments.Structured({
text: new ComponentArguments.ShortText(),
link: new ComponentArguments.ShortText(),
}),
})
),
} as const;
export class MapWithPins extends Component<typeof component_arguments> {
getArguments() {
return component_arguments;
}
async getEarlyAssets() {
return [
{
type: "script" as const,
url: "https://unpkg.com/leaflet@1.9.4/dist/leaflet.js",
identity: "https://unpkg.com/leaflet@1.9.4/dist/leaflet.js",
- integrity: "sha256-20nQCchB9co0qIjJZRGuk2/Z9VM+kNiyxNV1lvTlZBo=",
+ integrity:
+ "sha512-BwHfrr4c9kmRkLw6iXFdzcdWV/PGkVgiIyIWLLlTSXzWQzxuSg4DiQUCpauz/EWjgk5TYQqX/kvn9pG1NpYfqg==",
},
{
type: "style" as const,
url: "https://unpkg.com/leaflet@1.9.4/dist/leaflet.css",
- integrity: "sha256-p4NxAoJBhIIN+hmNHrzRCf9tD/miZyoHS5obTRR9BMY=",
+ integrity:
+ "sha512-Zcn6bjR/8RZbLEpLIeOwNtzREBAJnUKESxces60Mpoj+2okopSAcSUIUOseddDm0cxnGQzxIR7vJgsLZbdLE3w==",
identity: "https://unpkg.com/leaflet@1.9.4/dist/leaflet.css",
},
];
}
toHTML({
pins,
}: ExtractStructuredComponentArgumentsValues<
typeof component_arguments
>): FlatTemplatable {
return (
<div
class="map-with-pins"
data-controller="map-with-pins"
data-map-with-pins-pins-value={JSON.stringify(pins)
.replaceAll("\n", "\\n")
.replaceAll('"', """)}
></div>
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Sat, Nov 28, 03:15 (20 h, 20 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1221472
Default Alt Text
(2 KB)
Attached To
Mode
rREWRITE Configurable rewriter
Attached
Detach File
Event Timeline