@geops/rvf-mobility-web-component 0.1.45 → 0.1.47-beta.0
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/.prettierrc.js +3 -1
- package/CHANGELOG.md +7 -0
- package/README.md +1 -1
- package/doc/package.json +4 -3
- package/doc/postcss.config.mjs +1 -1
- package/doc/src/app/components/GeopsMobilityDoc.tsx +13 -224
- package/doc/src/app/components/GeopsMobilitySearchDoc.tsx +11 -107
- package/doc/src/app/components/WebComponentDoc.tsx +45 -56
- package/doc/src/app/geops-mobility/page.tsx +7 -2
- package/doc/src/app/geops-mobility-search/page.tsx +6 -2
- package/doc/src/app/globals.css +47 -27
- package/doc/src/app/layout.tsx +4 -2
- package/docutils.js +33 -17
- package/eslint.config.mjs +28 -34
- package/iframe.html +5624 -201
- package/index.html +108 -88
- package/index.js +2229 -1976
- package/input.css +21 -3
- package/package.json +37 -40
- package/scripts/build.mjs +2 -2
- package/scripts/dev.mjs +3 -3
- package/search.html +70 -23
- package/src/BaseLayer/BaseLayer.tsx +2 -1
- package/src/Copyright/Copyright.tsx +4 -2
- package/src/DebugDeparture/DebugDeparture.tsx +16 -12
- package/src/DebugStop/DebugStop.tsx +2 -2
- package/src/Departure/Departure.tsx +2 -3
- package/src/EmbedNavigation/DragPanWarning.ts +125 -0
- package/src/EmbedNavigation/EmbedNavigation.tsx +52 -0
- package/src/EmbedNavigation/index.js +1 -0
- package/src/EmbedNavigation/index.tsx +1 -0
- package/src/GeolocationButton/GeolocationButton.tsx +11 -35
- package/src/GeolocationButton/index.tsx +1 -1
- package/src/Map/Map.tsx +5 -3
- package/src/MapDispatchEvents/MapDispatchEvents.tsx +78 -0
- package/src/MapDispatchEvents/index.tsx +1 -0
- package/src/MobilityMap/MobilityMap.tsx +117 -162
- package/src/MobilityMap/MobilityMapAttributes.test.ts +21 -0
- package/src/MobilityMap/MobilityMapAttributes.ts +243 -0
- package/src/MobilityMap/index.tsx +1 -0
- package/src/MobilitySearch/MobilitySearch.tsx +35 -0
- package/src/MobilitySearch/MobilitySearchAttributes.test.ts +21 -0
- package/src/MobilitySearch/MobilitySearchAttributes.ts +68 -0
- package/src/MobilitySearch/index.ts +2 -0
- package/src/NotificationLayer/NotificationLayer.tsx +27 -4
- package/src/Overlay/Overlay.tsx +24 -11
- package/src/Permalink/Permalink.tsx +77 -0
- package/src/Permalink/index.tsx +1 -0
- package/src/RealtimeLayer/RealtimeLayer.tsx +72 -33
- package/src/RouteDestination/RouteDestination.tsx +3 -3
- package/src/RouteIcon/RouteIcon.tsx +33 -25
- package/src/RouteIcon/index.tsx +1 -1
- package/src/RouteIdentifier/RouteIdentifer.tsx +6 -5
- package/src/RouteInfos/RouteInfos.tsx +7 -3
- package/src/RouteSchedule/RouteSchedule.tsx +3 -3
- package/src/RouteScheduleFooter/RouteScheduleFooter.tsx +1 -1
- package/src/RouteScheduleHeader/RouteScheduleHeader.tsx +7 -29
- package/src/RouteStop/RouteStop.tsx +8 -11
- package/src/RouteStopDelay/RouteStopDelay.tsx +2 -1
- package/src/RouteStopName/RouteStopName.tsx +2 -2
- package/src/RouteStopPlatform/RouteStopPlatform.tsx +2 -2
- package/src/RouteStopProgress/RouteStopProgress.tsx +2 -1
- package/src/RouteStopServices/RouteStopServices.tsx +2 -2
- package/src/RouteStopStation/RouteStopStation.tsx +8 -2
- package/src/RouteStopTime/RouteStopTime.tsx +2 -1
- package/src/RvfButton/RvfButton.tsx +14 -5
- package/src/RvfCheckbox/RvfCheckbox.tsx +8 -8
- package/src/RvfEmbedNavigation/DragPanWarning.ts +5 -5
- package/src/RvfEmbedNavigation/RvfEmbedNavigation.tsx +1 -0
- package/src/RvfExportMenu/RvfExportMenu.tsx +14 -12
- package/src/RvfExportMenuButton/RvfExportMenuButton.tsx +6 -7
- package/src/RvfFeatureDetails/RvfFeatureDetails.tsx +5 -5
- package/src/RvfFeatureDetails/RvfLineNetworkDetails/RvfLineNetworkDetails.tsx +164 -138
- package/src/RvfFeatureDetails/RvfNotificationDetails/RvfNotificationDetails.tsx +151 -109
- package/src/RvfFeatureDetails/RvfSellingPointDetails/RvfSellingPointDetails.tsx +2 -2
- package/src/RvfFeatureDetails/RvfSharedMobilityDetail/FloatingVehiclesDetails/FloatingVehiclesDetails.tsx +3 -3
- package/src/RvfFeatureDetails/RvfSharedMobilityDetail/RvfSharedMobilityDetails.tsx +8 -6
- package/src/RvfFeatureDetails/RvfSharedMobilityDetail/StationDetails/StationDetails.tsx +5 -4
- package/src/RvfFeatureDetailsTitle/RvfFeatureDetailsTitle.tsx +81 -0
- package/src/RvfFeatureDetailsTitle/index.tsx +1 -0
- package/src/RvfFloatingMenu/RvfFloatingMenu.tsx +4 -4
- package/src/RvfGeolocationButton/GeolocationButton.tsx +98 -0
- package/src/RvfGeolocationButton/index.tsx +1 -0
- package/src/RvfIconButton/RvfIconButton.tsx +20 -9
- package/src/RvfInputCopy/RvfInputCopy.tsx +8 -8
- package/src/RvfLayerTree/RvfLayerTree.tsx +5 -2
- package/src/RvfLayerTree/TreeItem/TreeItem.tsx +13 -16
- package/src/RvfLayerTree/layersTreeReducer.ts +23 -18
- package/src/RvfLayerTreeButton/RvfLayerTreeButton.tsx +6 -6
- package/src/RvfLineNetworkPlanLayer/RvfLineNetworkPlanLayer.tsx +2 -1
- package/src/RvfLink/RvfLink.tsx +4 -3
- package/src/RvfMobilityMap/RvfMobilityMap.tsx +314 -322
- package/src/RvfModal/RvfModal.tsx +4 -3
- package/src/RvfOverlayContent/RvfOverlayContent.tsx +126 -0
- package/src/RvfOverlayContent/index.ts +0 -0
- package/src/RvfOverlayHeader/RvfOverlayHeader.tsx +13 -10
- package/src/RvfPermalink/RvfPermalink.tsx +2 -2
- package/src/RvfPoisLayer/RvfPoisLayer.tsx +2 -1
- package/src/RvfRadioButton/RvfRadioButton.tsx +1 -1
- package/src/RvfRouteIcon/RvfRouteIcon.tsx +10 -0
- package/src/RvfRouteIcon/index.tsx +1 -0
- package/src/RvfSearch/RvfSearch.tsx +4 -1
- package/src/RvfSearchButton/RvfSearchButton.tsx +27 -0
- package/src/RvfSearchButton/index.tsx +1 -0
- package/src/RvfSelect/RvfSelect.tsx +7 -5
- package/src/RvfSelectedFeatureHighlightLayer/RvfSelectedFeatureHighlightLayer.tsx +1 -2
- package/src/RvfSellingPointsLayer/RvfSellingPointsLayer.tsx +2 -1
- package/src/RvfShare/RvfPermalinkButton/RvfPermalinkButton.tsx +13 -12
- package/src/RvfShare/RvfShare.tsx +11 -10
- package/src/RvfShareMenuButton/RvfShareMenuButton.tsx +5 -5
- package/src/RvfSharedMobilityLayerGroup/RvfSharedMobilityLayerGroup.tsx +25 -22
- package/src/RvfSingleClickListener/RvfSingleClickListener.tsx +46 -31
- package/src/RvfTarifZonenLayer/RvfTarifZonenLayer.tsx +2 -1
- package/src/RvfTopics/RvfTopics.tsx +6 -5
- package/src/RvfZoomButtons/RvfZoomButtons.tsx +3 -3
- package/src/ScaleLine/ScaleLine.tsx +5 -4
- package/src/ScrollableHandler/ScrollableHandler.tsx +2 -1
- package/src/ScrollableHandler/index.tsx +1 -1
- package/src/SingleClickListener/SingleClickListener.tsx +47 -4
- package/src/Station/Station.tsx +5 -5
- package/src/StationName/StationName.tsx +3 -3
- package/src/StationServices/StationServices.tsx +3 -3
- package/src/StationsLayer/StationsLayer.tsx +5 -4
- package/src/StopsSearch/StopsSearch.tsx +115 -84
- package/src/WindowMessageListener/WindowMessageListener.tsx +67 -0
- package/src/WindowMessageListener/index.tsx +1 -0
- package/src/icons/Airport/Airport.tsx +4 -4
- package/src/icons/ArrowDown/ArrowDown.tsx +1 -1
- package/src/icons/ArrowUp/ArrowUp.tsx +1 -1
- package/src/icons/ArrowUpRight/ArrowUpRight.tsx +1 -1
- package/src/icons/BarAndRestaurants/BarAndRestaurants.tsx +2 -2
- package/src/icons/Bathroom/Bathroom.tsx +1 -1
- package/src/icons/Copy/Copy.tsx +1 -1
- package/src/icons/Doc/Doc.tsx +1 -1
- package/src/icons/Email/Email.tsx +1 -1
- package/src/icons/FilePdf/FilePdf.tsx +1 -1
- package/src/icons/Geolocation/Geolocation.tsx +3 -5
- package/src/icons/Image/Image.tsx +1 -1
- package/src/icons/Menu/Menu.tsx +1 -1
- package/src/icons/Minus/Minus.tsx +1 -1
- package/src/icons/NoRealtime/NoRealtime.tsx +1 -1
- package/src/icons/Plus/Plus.tsx +1 -1
- package/src/icons/Police/Police.tsx +3 -3
- package/src/icons/Share/Share.tsx +1 -1
- package/src/icons/Stack/Stack.tsx +1 -1
- package/src/icons/Tracking/Tracking.tsx +29 -0
- package/src/icons/Tracking/airport-14-svgrepo-com.svg +41 -0
- package/src/icons/Tracking/index.tsx +1 -0
- package/src/icons/WaitingAreas/WaitingAreas.tsx +1 -1
- package/src/icons/WheelChair/WheelChair.tsx +1 -1
- package/src/index.tsx +8 -46
- package/src/indexDoc.ts +13 -0
- package/src/ui/Button/Button.tsx +57 -0
- package/src/ui/Button/index.tsx +1 -0
- package/src/ui/IconButton/IconButton.tsx +44 -0
- package/src/ui/IconButton/index.tsx +1 -0
- package/src/utils/MobilityEvent.ts +4 -3
- package/src/utils/applyInitialLayerVisibility.ts +3 -3
- package/src/utils/centerOnStation.ts +3 -2
- package/src/utils/centerOnVehicle.ts +5 -4
- package/src/utils/constants.ts +17 -3
- package/src/utils/exportPdf.ts +26 -20
- package/src/utils/fullTrajectoryStyle.ts +2 -2
- package/src/utils/getAllLayers.ts +4 -3
- package/src/utils/getDelayColor.test.ts +1 -0
- package/src/utils/getDelayColorForVehicle.test.ts +2 -0
- package/src/utils/getDelayString.test.ts +3 -0
- package/src/utils/getDelayTextForVehicle.test.ts +4 -0
- package/src/utils/getFullTrajectoryAndFit.ts +4 -3
- package/src/utils/getHoursAndMinutes.test.ts +1 -0
- package/src/utils/getLayersAsFlatArray.ts +2 -2
- package/src/utils/getLinkByDevice.ts +1 -1
- package/src/utils/getMainColorForVehicle.ts +3 -3
- package/src/utils/getPermalinkParameters.ts +2 -2
- package/src/utils/getStopStatus.test.ts +2 -1
- package/src/utils/getStopStatus.ts +1 -1
- package/src/utils/getTextForVehicle.ts +1 -1
- package/src/utils/hooks/useDeparture.tsx +6 -5
- package/src/utils/hooks/useI18n.tsx +6 -4
- package/src/utils/hooks/useInitialLayersVisiblity.tsx +2 -1
- package/src/utils/hooks/useLayerConfig.tsx +39 -0
- package/src/utils/hooks/useMapContext.tsx +30 -18
- package/src/utils/hooks/useRouteStop.tsx +3 -2
- package/src/utils/hooks/useRvfContext.tsx +11 -3
- package/src/utils/hooks/useStation.tsx +2 -1
- package/src/utils/hooks/useUpdatePermalink.tsx +25 -24
- package/src/utils/hooks/useZoom.tsx +4 -4
- package/src/utils/realtimeRVFStyle.ts +5 -4
- package/src/utils/sharingGraphqlUtils.ts +3 -2
- package/src/utils/sharingStylesUtils.ts +7 -7
- package/src/utils/sharingWFSUtils.ts +9 -15
- package/tailwind.config.mjs +1 -0
- package/tsconfig.json +1 -1
- package/doc/tailwind.config.ts +0 -20
- package/src/utils/getFeatureInformationTitle.tsx +0 -54
package/doc/src/app/globals.css
CHANGED
|
@@ -1,38 +1,58 @@
|
|
|
1
|
-
@
|
|
2
|
-
@tailwind components;
|
|
3
|
-
@tailwind utilities;
|
|
1
|
+
@import 'tailwindcss';
|
|
4
2
|
|
|
5
|
-
|
|
6
|
-
--
|
|
7
|
-
--
|
|
3
|
+
@theme {
|
|
4
|
+
--font-sans: Lato, sans-serif;
|
|
5
|
+
--font-serif: Merriweather, serif;
|
|
8
6
|
}
|
|
9
7
|
|
|
10
|
-
|
|
11
|
-
color
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
margin: 0;
|
|
15
|
-
font-family: Lato, Arial, sans-serif;
|
|
16
|
-
color: #353535;
|
|
17
|
-
position: relative;
|
|
18
|
-
min-height: 100%;
|
|
19
|
-
overflow-y: scroll;
|
|
20
|
-
font-size: 18px;
|
|
21
|
-
}
|
|
8
|
+
/*
|
|
9
|
+
The default border color has changed to `currentColor` in Tailwind CSS v4,
|
|
10
|
+
so we've added these compatibility styles to make sure everything still
|
|
11
|
+
looks the same as it did with Tailwind CSS v3.
|
|
22
12
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
13
|
+
If we ever want to remove these styles, we need to add an explicit border
|
|
14
|
+
color utility to any element that depends on these defaults.
|
|
15
|
+
*/
|
|
16
|
+
@layer base {
|
|
17
|
+
*,
|
|
18
|
+
::after,
|
|
19
|
+
::before,
|
|
20
|
+
::backdrop,
|
|
21
|
+
::file-selector-button {
|
|
22
|
+
border-color: var(--color-gray-200, currentColor);
|
|
23
|
+
}
|
|
26
24
|
}
|
|
27
25
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
outline-offset: 2px;
|
|
26
|
+
@utility text-balance {
|
|
27
|
+
text-wrap: balance;
|
|
31
28
|
}
|
|
32
29
|
|
|
33
|
-
|
|
34
30
|
@layer utilities {
|
|
35
|
-
|
|
36
|
-
|
|
31
|
+
:root {
|
|
32
|
+
--background: #ffffff;
|
|
33
|
+
--foreground: #171717;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
body {
|
|
37
|
+
color: var(--foreground);
|
|
38
|
+
background: var(--background);
|
|
39
|
+
font-family: Arial, Helvetica, sans-serif;
|
|
40
|
+
margin: 0;
|
|
41
|
+
font-family: Lato, Arial, sans-serif;
|
|
42
|
+
color: #353535;
|
|
43
|
+
position: relative;
|
|
44
|
+
min-height: 100%;
|
|
45
|
+
overflow-y: scroll;
|
|
46
|
+
font-size: 18px;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
a {
|
|
50
|
+
text-decoration: none;
|
|
51
|
+
color: #76b833;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
a:focus-visible {
|
|
55
|
+
outline: 2px solid black;
|
|
56
|
+
outline-offset: 2px;
|
|
37
57
|
}
|
|
38
58
|
}
|
package/doc/src/app/layout.tsx
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import type { Metadata } from "next";
|
|
2
|
-
|
|
3
1
|
import { Container } from "@mui/material";
|
|
4
2
|
import { AppRouterCacheProvider } from "@mui/material-nextjs/v14-appRouter";
|
|
5
3
|
import { ThemeProvider } from "@mui/material/styles";
|
|
@@ -7,8 +5,11 @@ import Script from "next/script";
|
|
|
7
5
|
import { Suspense } from "react";
|
|
8
6
|
|
|
9
7
|
import { Footer, geopsTheme, Header } from "../geops-ui";
|
|
8
|
+
|
|
10
9
|
import "./globals.css";
|
|
11
10
|
|
|
11
|
+
import type { Metadata } from "next";
|
|
12
|
+
|
|
12
13
|
const tabs = [
|
|
13
14
|
{
|
|
14
15
|
component: "a",
|
|
@@ -45,6 +46,7 @@ export default function RootLayout({
|
|
|
45
46
|
</ThemeProvider>
|
|
46
47
|
</AppRouterCacheProvider>
|
|
47
48
|
<Script src="index.js" />
|
|
49
|
+
<Script src="indexDoc.js" />
|
|
48
50
|
</body>
|
|
49
51
|
</html>
|
|
50
52
|
);
|
package/docutils.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/* eslint-disable no-undef */
|
|
2
1
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
3
2
|
function applyPermalinkParameters(wc) {
|
|
4
3
|
const params = new URLSearchParams(window.location.search);
|
|
@@ -7,14 +6,15 @@ function applyPermalinkParameters(wc) {
|
|
|
7
6
|
if (params.get("fullscreen") === "true") {
|
|
8
7
|
wc.parentElement.removeChild(wc);
|
|
9
8
|
wc.className = "absolute w-full h-full inset-0";
|
|
10
|
-
document.body.className = "absolute w-full h-full inset-0 p-0";
|
|
11
9
|
document.body.appendChild(wc);
|
|
10
|
+
document.body.style = "padding:0;";
|
|
12
11
|
} else {
|
|
13
12
|
const doc = document.querySelectorAll("#doc");
|
|
14
13
|
doc.forEach((d) => {
|
|
15
14
|
return (d.style.display = "block");
|
|
16
15
|
});
|
|
17
16
|
}
|
|
17
|
+
|
|
18
18
|
// Apply x,y,z
|
|
19
19
|
if (
|
|
20
20
|
params.get("permalink") === "true" &&
|
|
@@ -46,15 +46,15 @@ function applyPermalinkParameters(wc) {
|
|
|
46
46
|
|
|
47
47
|
// Get an apikey if there is none defined
|
|
48
48
|
if (!wc.getAttribute("apikey")) {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
49
|
+
fetch("https://backend.developer.geops.io/publickey")
|
|
50
|
+
.then((response) => {
|
|
51
|
+
return response.json();
|
|
52
|
+
})
|
|
53
|
+
.then((data) => {
|
|
54
|
+
if (data && data.success) {
|
|
55
|
+
wc.setAttribute("apikey", data.key);
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
60
|
|
|
@@ -65,6 +65,7 @@ function generateAttributesTable(
|
|
|
65
65
|
booleanAttrs = [],
|
|
66
66
|
booleanTrueByDefault = [],
|
|
67
67
|
descriptionByAttr = {},
|
|
68
|
+
defaultValueByAttr = {},
|
|
68
69
|
) {
|
|
69
70
|
let innerHMTL = `<table class="table-auto w-full" >
|
|
70
71
|
<thead>
|
|
@@ -78,6 +79,7 @@ function generateAttributesTable(
|
|
|
78
79
|
<tbody>`;
|
|
79
80
|
innerHMTL += attrs
|
|
80
81
|
.sort()
|
|
82
|
+
.filter((key) => descriptionByAttr[key])
|
|
81
83
|
.map((key) => {
|
|
82
84
|
const isBoolean = booleanAttrs.includes(key);
|
|
83
85
|
const defaultChecked = booleanTrueByDefault.includes(key)
|
|
@@ -110,6 +112,7 @@ function generateAttributesTable(
|
|
|
110
112
|
class="border"
|
|
111
113
|
name="${key}"
|
|
112
114
|
value="${wc.getAttribute(key) || ""}"
|
|
115
|
+
placeholder="${defaultValueByAttr[key] || ""}"
|
|
113
116
|
/>
|
|
114
117
|
<button class="border p-2 bg-black hover:bg-gray-700 text-white" onclick="document.querySelector('${wc.localName}').setAttribute('${key}', this.previousElementSibling.value);onAttributeUpdate(document.querySelector('${wc.localName}'),this.previousElementSibling.name, this.previousElementSibling.value);">Update</button>`
|
|
115
118
|
}
|
|
@@ -135,12 +138,19 @@ function generateCodeText(
|
|
|
135
138
|
let codeText = "";
|
|
136
139
|
codeText = `<script\n\ttype="module"\n\tsrc="${pkgSrc}">
|
|
137
140
|
</script>
|
|
138
|
-
<${wc.localName}
|
|
141
|
+
<${wc.localName}\n\tid="map"\n\tstyle="display:block;width:100%;height:500px;border:1px solid #e5e7eb;border-radius:16px;"`;
|
|
139
142
|
|
|
140
143
|
attrs.forEach((key) => {
|
|
141
144
|
const attributeValue = wc.getAttribute(key);
|
|
142
|
-
const
|
|
143
|
-
|
|
145
|
+
const input = document.querySelector(`[name=${key}]`);
|
|
146
|
+
const inputValue =
|
|
147
|
+
input?.type === "checkbox" ? input.checked : input?.value;
|
|
148
|
+
if (
|
|
149
|
+
attributeValue !== null &&
|
|
150
|
+
(attributeValue === inputValue ||
|
|
151
|
+
(attributeValue === "true" && inputValue === true) ||
|
|
152
|
+
(attributeValue === "false" && inputValue === false))
|
|
153
|
+
) {
|
|
144
154
|
codeText += `\n\t${[key, '"' + wc.getAttribute(key) + '"'].join("=")}`;
|
|
145
155
|
}
|
|
146
156
|
});
|
|
@@ -149,7 +159,7 @@ function generateCodeText(
|
|
|
149
159
|
}
|
|
150
160
|
|
|
151
161
|
// Generates a HTML table with all events of a web component
|
|
152
|
-
function generateEventsTable(wc, events) {
|
|
162
|
+
function generateEventsTable(wc, events, descriptionByEvent = {}) {
|
|
153
163
|
let innerHMTL = `<table class="table-auto w-full" >
|
|
154
164
|
<thead>
|
|
155
165
|
<tr>
|
|
@@ -184,10 +194,16 @@ function generateEventsTable(wc, events) {
|
|
|
184
194
|
<tr>
|
|
185
195
|
<td class="border px-4 py-2">${key}</td>
|
|
186
196
|
<td class="border px-4 py-2">
|
|
187
|
-
<div class="flex gap-4">
|
|
197
|
+
<div class="flex flex-col gap-4">
|
|
198
|
+
<p>
|
|
199
|
+
${descriptionByEvent[key] || ""}
|
|
200
|
+
</p>
|
|
201
|
+
<p>
|
|
202
|
+
Last event received:
|
|
203
|
+
</p>
|
|
188
204
|
<textarea
|
|
189
205
|
type="text"
|
|
190
|
-
class="border w-full
|
|
206
|
+
class="border h-300 w-full"
|
|
191
207
|
style="height:300px;"
|
|
192
208
|
name="${key}"
|
|
193
209
|
></textarea>
|
package/eslint.config.mjs
CHANGED
|
@@ -1,40 +1,34 @@
|
|
|
1
|
-
import
|
|
2
|
-
import eslint from "@eslint/js";
|
|
3
|
-
import jsxA11y from "eslint-plugin-jsx-a11y";
|
|
4
|
-
import perfectionist from "eslint-plugin-perfectionist";
|
|
5
|
-
import prettier from "eslint-plugin-prettier/recommended";
|
|
6
|
-
import react from "eslint-plugin-react";
|
|
7
|
-
import tailwind from "eslint-plugin-tailwindcss";
|
|
8
|
-
import ts from "typescript-eslint";
|
|
1
|
+
import flat from "@geops/eslint-config-react/flat";
|
|
9
2
|
|
|
10
|
-
//
|
|
11
|
-
|
|
3
|
+
// tailwind@4 only supported in beta channel
|
|
4
|
+
// import tailwind from "eslint-plugin-tailwindcss";
|
|
12
5
|
|
|
13
6
|
export default [
|
|
7
|
+
...flat,
|
|
8
|
+
// tailwind@4 only supported in beta channel
|
|
9
|
+
// ...tailwind.configs["flat/recommended"],
|
|
10
|
+
// {
|
|
11
|
+
// settings: {
|
|
12
|
+
// react: {
|
|
13
|
+
// version: "18.3.1",
|
|
14
|
+
// },
|
|
15
|
+
// },
|
|
16
|
+
// },
|
|
14
17
|
{
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
jsxA11y.flatConfigs.recommended,
|
|
30
|
-
perfectionist.configs["recommended-alphabetical"],
|
|
31
|
-
prettier,
|
|
32
|
-
...tailwind.configs["flat/recommended"],
|
|
33
|
-
{
|
|
34
|
-
rules: {
|
|
35
|
-
"arrow-body-style": ["error", "always"],
|
|
36
|
-
curly: "error",
|
|
37
|
-
},
|
|
18
|
+
rules: {
|
|
19
|
+
"@typescript-eslint/no-empty-function": "off",
|
|
20
|
+
"@typescript-eslint/no-unsafe-call": "off",
|
|
21
|
+
"@typescript-eslint/no-unsafe-member-access": "off",
|
|
22
|
+
"@typescript-eslint/no-unsafe-assignment": "off",
|
|
23
|
+
"@typescript-eslint/no-unsafe-return": "off",
|
|
24
|
+
"@typescript-eslint/unbound-method": "off",
|
|
25
|
+
"@typescript-eslint/no-unsafe-argument": "off",
|
|
26
|
+
"mocha/no-setup-in-describe": "off",
|
|
27
|
+
"mocha/consistent-spacing-between-blocks": "off",
|
|
28
|
+
"@typescript-eslint/no-redundant-type-constituents": "off",
|
|
29
|
+
"mocha/no-pending-tests": "off",
|
|
30
|
+
"@typescript-eslint/prefer-nullish-coalescing": "off",
|
|
31
|
+
"react-compiler/react-compiler": "off",
|
|
38
32
|
},
|
|
39
|
-
|
|
33
|
+
},
|
|
40
34
|
];
|