@local-logic/sdks-app 1.0.0-beta.41 → 1.0.0-beta.44
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/assets/index.bffff470.js +715 -0
- package/dist/assets/{index.128006c6.js → index.e4acce0a.js} +163 -139
- package/dist/index.html +1 -1
- package/dist/types/context/stateManager/index.d.ts +3 -3
- package/dist/types/context/stateManager/index.d.ts.map +1 -1
- package/dist/types/context/stateManager/index.js +8 -7
- package/dist/types/context/stateManager/index.js.map +1 -1
- package/dist/types/features/scores/keyFactory.d.ts +1 -1
- package/dist/types/sdks/LocalContent/Map/Attribution/index.d.ts +4 -0
- package/dist/types/sdks/LocalContent/Map/Attribution/index.d.ts.map +1 -0
- package/dist/types/sdks/LocalContent/Map/Attribution/index.js +7 -0
- package/dist/types/sdks/LocalContent/Map/Attribution/index.js.map +1 -0
- package/dist/types/sdks/LocalContent/Map/Attribution/styles.d.ts +2 -0
- package/dist/types/sdks/LocalContent/Map/Attribution/styles.d.ts.map +1 -0
- package/dist/types/sdks/LocalContent/Map/Attribution/styles.js +9 -0
- package/dist/types/sdks/LocalContent/Map/Attribution/styles.js.map +1 -0
- package/dist/types/sdks/LocalContent/Map/DesktopScores/ScoreCategoryAccordion/ScoreCategory/Score/index.d.ts +11 -0
- package/dist/types/sdks/LocalContent/Map/DesktopScores/ScoreCategoryAccordion/ScoreCategory/Score/index.d.ts.map +1 -0
- package/dist/types/sdks/LocalContent/Map/{Scores → DesktopScores/ScoreCategoryAccordion}/ScoreCategory/Score/index.js +5 -4
- package/dist/types/sdks/LocalContent/Map/DesktopScores/ScoreCategoryAccordion/ScoreCategory/Score/index.js.map +1 -0
- package/dist/types/sdks/LocalContent/Map/{Scores → DesktopScores/ScoreCategoryAccordion}/ScoreCategory/Score/styles.d.ts +0 -0
- package/dist/types/sdks/LocalContent/Map/DesktopScores/ScoreCategoryAccordion/ScoreCategory/Score/styles.d.ts.map +1 -0
- package/dist/types/sdks/LocalContent/Map/{Scores → DesktopScores/ScoreCategoryAccordion}/ScoreCategory/Score/styles.js +0 -0
- package/dist/types/sdks/LocalContent/Map/DesktopScores/ScoreCategoryAccordion/ScoreCategory/Score/styles.js.map +1 -0
- package/dist/types/sdks/LocalContent/Map/DesktopScores/ScoreCategoryAccordion/ScoreCategory/index.d.ts +14 -0
- package/dist/types/sdks/LocalContent/Map/DesktopScores/ScoreCategoryAccordion/ScoreCategory/index.d.ts.map +1 -0
- package/dist/types/sdks/LocalContent/Map/DesktopScores/ScoreCategoryAccordion/ScoreCategory/index.js +27 -0
- package/dist/types/sdks/LocalContent/Map/DesktopScores/ScoreCategoryAccordion/ScoreCategory/index.js.map +1 -0
- package/dist/types/sdks/LocalContent/Map/{Scores → DesktopScores/ScoreCategoryAccordion}/ScoreCategory/styles.d.ts +0 -0
- package/dist/types/sdks/LocalContent/Map/DesktopScores/ScoreCategoryAccordion/ScoreCategory/styles.d.ts.map +1 -0
- package/dist/types/sdks/LocalContent/Map/{Scores → DesktopScores/ScoreCategoryAccordion}/ScoreCategory/styles.js +0 -0
- package/dist/types/sdks/LocalContent/Map/DesktopScores/ScoreCategoryAccordion/ScoreCategory/styles.js.map +1 -0
- package/dist/types/sdks/LocalContent/Map/DesktopScores/ScoreCategoryAccordion/index.d.ts +7 -0
- package/dist/types/sdks/LocalContent/Map/DesktopScores/ScoreCategoryAccordion/index.d.ts.map +1 -0
- package/dist/types/sdks/LocalContent/Map/DesktopScores/ScoreCategoryAccordion/index.js +18 -0
- package/dist/types/sdks/LocalContent/Map/DesktopScores/ScoreCategoryAccordion/index.js.map +1 -0
- package/dist/types/sdks/LocalContent/Map/DesktopScores/index.d.ts +4 -0
- package/dist/types/sdks/LocalContent/Map/DesktopScores/index.d.ts.map +1 -0
- package/dist/types/sdks/LocalContent/Map/DesktopScores/index.js +21 -0
- package/dist/types/sdks/LocalContent/Map/DesktopScores/index.js.map +1 -0
- package/dist/types/sdks/LocalContent/Map/DesktopScores/styles.d.ts +5 -0
- package/dist/types/sdks/LocalContent/Map/DesktopScores/styles.d.ts.map +1 -0
- package/dist/types/sdks/LocalContent/Map/DesktopScores/styles.js +31 -0
- package/dist/types/sdks/LocalContent/Map/DesktopScores/styles.js.map +1 -0
- package/dist/types/sdks/LocalContent/Map/{Cluster → Markers/Cluster}/index.d.ts +0 -0
- package/dist/types/sdks/LocalContent/Map/Markers/Cluster/index.d.ts.map +1 -0
- package/dist/types/sdks/LocalContent/Map/{Cluster → Markers/Cluster}/index.js +0 -0
- package/dist/types/sdks/LocalContent/Map/Markers/Cluster/index.js.map +1 -0
- package/dist/types/sdks/LocalContent/Map/{Cluster → Markers/Cluster}/styles.d.ts +0 -0
- package/dist/types/sdks/LocalContent/Map/Markers/Cluster/styles.d.ts.map +1 -0
- package/dist/types/sdks/LocalContent/Map/{Cluster → Markers/Cluster}/styles.js +0 -0
- package/dist/types/sdks/LocalContent/Map/Markers/Cluster/styles.js.map +1 -0
- package/dist/types/sdks/LocalContent/Map/Markers/index.d.ts +22 -0
- package/dist/types/sdks/LocalContent/Map/Markers/index.d.ts.map +1 -0
- package/dist/types/sdks/LocalContent/Map/Markers/index.js +69 -0
- package/dist/types/sdks/LocalContent/Map/Markers/index.js.map +1 -0
- package/dist/types/sdks/LocalContent/Map/MobileScores/ScoreCategory/index.d.ts +8 -0
- package/dist/types/sdks/LocalContent/Map/MobileScores/ScoreCategory/index.d.ts.map +1 -0
- package/dist/types/sdks/LocalContent/Map/MobileScores/ScoreCategory/index.js +46 -0
- package/dist/types/sdks/LocalContent/Map/MobileScores/ScoreCategory/index.js.map +1 -0
- package/dist/types/sdks/LocalContent/Map/MobileScores/ScoreCategory/styles.d.ts +5 -0
- package/dist/types/sdks/LocalContent/Map/MobileScores/ScoreCategory/styles.d.ts.map +1 -0
- package/dist/types/sdks/LocalContent/Map/MobileScores/ScoreCategory/styles.js +30 -0
- package/dist/types/sdks/LocalContent/Map/MobileScores/ScoreCategory/styles.js.map +1 -0
- package/dist/types/sdks/LocalContent/Map/MobileScores/ScoreInfo/index.d.ts +4 -0
- package/dist/types/sdks/LocalContent/Map/MobileScores/ScoreInfo/index.d.ts.map +1 -0
- package/dist/types/sdks/LocalContent/Map/MobileScores/ScoreInfo/index.js +37 -0
- package/dist/types/sdks/LocalContent/Map/MobileScores/ScoreInfo/index.js.map +1 -0
- package/dist/types/sdks/LocalContent/Map/MobileScores/ScoreInfo/styles.d.ts +4 -0
- package/dist/types/sdks/LocalContent/Map/MobileScores/ScoreInfo/styles.d.ts.map +1 -0
- package/dist/types/sdks/LocalContent/Map/MobileScores/ScoreInfo/styles.js +20 -0
- package/dist/types/sdks/LocalContent/Map/MobileScores/ScoreInfo/styles.js.map +1 -0
- package/dist/types/sdks/LocalContent/Map/MobileScores/index.d.ts +7 -0
- package/dist/types/sdks/LocalContent/Map/MobileScores/index.d.ts.map +1 -0
- package/dist/types/sdks/LocalContent/Map/MobileScores/index.js +11 -0
- package/dist/types/sdks/LocalContent/Map/MobileScores/index.js.map +1 -0
- package/dist/types/sdks/LocalContent/Map/MobileScores/styles.d.ts +5 -0
- package/dist/types/sdks/LocalContent/Map/MobileScores/styles.d.ts.map +1 -0
- package/dist/types/sdks/LocalContent/Map/MobileScores/styles.js +24 -0
- package/dist/types/sdks/LocalContent/Map/MobileScores/styles.js.map +1 -0
- package/dist/types/sdks/LocalContent/Map/{Scores/ScoreCategory/Score/POIs → POIs}/index.d.ts +0 -0
- package/dist/types/sdks/LocalContent/Map/POIs/index.d.ts.map +1 -0
- package/dist/types/sdks/LocalContent/Map/{Scores/ScoreCategory/Score/POIs → POIs}/index.js +8 -5
- package/dist/types/sdks/LocalContent/Map/POIs/index.js.map +1 -0
- package/dist/types/sdks/LocalContent/Map/Pin/index.d.ts +10 -0
- package/dist/types/sdks/LocalContent/Map/Pin/index.d.ts.map +1 -0
- package/dist/types/sdks/LocalContent/Map/Pin/index.js +10 -0
- package/dist/types/sdks/LocalContent/Map/Pin/index.js.map +1 -0
- package/dist/types/sdks/LocalContent/Map/{Scores/ScoreCategory/Score/Schools → Schools}/index.d.ts +0 -0
- package/dist/types/sdks/LocalContent/Map/Schools/index.d.ts.map +1 -0
- package/dist/types/sdks/LocalContent/Map/{Scores/ScoreCategory/Score/Schools → Schools}/index.js +9 -6
- package/dist/types/sdks/LocalContent/Map/Schools/index.js.map +1 -0
- package/dist/types/sdks/LocalContent/Map/index.d.ts.map +1 -1
- package/dist/types/sdks/LocalContent/Map/index.js +56 -86
- package/dist/types/sdks/LocalContent/Map/index.js.map +1 -1
- package/dist/types/sdks/LocalContent/Map/styles.d.ts +3 -0
- package/dist/types/sdks/LocalContent/Map/styles.d.ts.map +1 -0
- package/dist/types/sdks/LocalContent/Map/styles.js +17 -0
- package/dist/types/sdks/LocalContent/Map/styles.js.map +1 -0
- package/dist/types/sdks/LocalContent/context.d.ts +6 -4
- package/dist/types/sdks/LocalContent/context.d.ts.map +1 -1
- package/dist/types/sdks/LocalContent/context.js +45 -11
- package/dist/types/sdks/LocalContent/context.js.map +1 -1
- package/dist/types/sdks/LocalContent/features/usePois.d.ts +1 -1
- package/dist/types/sdks/LocalContent/features/usePois.d.ts.map +1 -1
- package/dist/types/sdks/LocalContent/features/usePois.js +4 -4
- package/dist/types/sdks/LocalContent/features/usePois.js.map +1 -1
- package/dist/types/sdks/LocalContent/features/useSchools.d.ts +1 -1
- package/dist/types/sdks/LocalContent/features/useSchools.d.ts.map +1 -1
- package/dist/types/sdks/LocalContent/features/useSchools.js +3 -3
- package/dist/types/sdks/LocalContent/features/useSchools.js.map +1 -1
- package/dist/types/sdks/LocalContent/features/useScores.d.ts +2 -2
- package/dist/types/sdks/LocalContent/features/useScores.d.ts.map +1 -1
- package/dist/types/sdks/LocalContent/features/useScores.js +3 -3
- package/dist/types/sdks/LocalContent/features/useScores.js.map +1 -1
- package/dist/types/services/isObject/index.d.ts +2 -0
- package/dist/types/services/isObject/index.d.ts.map +1 -0
- package/dist/types/services/isObject/index.js +2 -0
- package/dist/types/services/isObject/index.js.map +1 -0
- package/dist/types/services/mergeDeep/index.d.ts +2 -0
- package/dist/types/services/mergeDeep/index.d.ts.map +1 -0
- package/dist/types/services/mergeDeep/index.js +22 -0
- package/dist/types/services/mergeDeep/index.js.map +1 -0
- package/package.json +7 -7
- package/dist/assets/index.1ce1f547.js +0 -714
- package/dist/types/sdks/LocalContent/Map/Cluster/index.d.ts.map +0 -1
- package/dist/types/sdks/LocalContent/Map/Cluster/index.js.map +0 -1
- package/dist/types/sdks/LocalContent/Map/Cluster/styles.d.ts.map +0 -1
- package/dist/types/sdks/LocalContent/Map/Cluster/styles.js.map +0 -1
- package/dist/types/sdks/LocalContent/Map/Scores/ScoreCategory/Score/POIs/index.d.ts.map +0 -1
- package/dist/types/sdks/LocalContent/Map/Scores/ScoreCategory/Score/POIs/index.js.map +0 -1
- package/dist/types/sdks/LocalContent/Map/Scores/ScoreCategory/Score/Schools/index.d.ts.map +0 -1
- package/dist/types/sdks/LocalContent/Map/Scores/ScoreCategory/Score/Schools/index.js.map +0 -1
- package/dist/types/sdks/LocalContent/Map/Scores/ScoreCategory/Score/index.d.ts +0 -10
- package/dist/types/sdks/LocalContent/Map/Scores/ScoreCategory/Score/index.d.ts.map +0 -1
- package/dist/types/sdks/LocalContent/Map/Scores/ScoreCategory/Score/index.js.map +0 -1
- package/dist/types/sdks/LocalContent/Map/Scores/ScoreCategory/Score/styles.d.ts.map +0 -1
- package/dist/types/sdks/LocalContent/Map/Scores/ScoreCategory/Score/styles.js.map +0 -1
- package/dist/types/sdks/LocalContent/Map/Scores/ScoreCategory/index.d.ts +0 -7
- package/dist/types/sdks/LocalContent/Map/Scores/ScoreCategory/index.d.ts.map +0 -1
- package/dist/types/sdks/LocalContent/Map/Scores/ScoreCategory/index.js +0 -31
- package/dist/types/sdks/LocalContent/Map/Scores/ScoreCategory/index.js.map +0 -1
- package/dist/types/sdks/LocalContent/Map/Scores/ScoreCategory/styles.d.ts.map +0 -1
- package/dist/types/sdks/LocalContent/Map/Scores/ScoreCategory/styles.js.map +0 -1
- package/dist/types/sdks/LocalContent/Map/Scores/index.d.ts +0 -8
- package/dist/types/sdks/LocalContent/Map/Scores/index.d.ts.map +0 -1
- package/dist/types/sdks/LocalContent/Map/Scores/index.js +0 -69
- package/dist/types/sdks/LocalContent/Map/Scores/index.js.map +0 -1
- package/dist/types/sdks/LocalContent/Map/Scores/styles.d.ts +0 -18
- package/dist/types/sdks/LocalContent/Map/Scores/styles.d.ts.map +0 -1
- package/dist/types/sdks/LocalContent/Map/Scores/styles.js +0 -92
- package/dist/types/sdks/LocalContent/Map/Scores/styles.js.map +0 -1
package/dist/index.html
CHANGED
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
<link rel="manifest" href="data:application/manifest+json;base64,eyJuYW1lIjoiIiwic2hvcnRfbmFtZSI6IiIsImljb25zIjpbeyJzcmMiOiIvYW5kcm9pZC1jaHJvbWUtMTkyeDE5Mi5wbmciLCJzaXplcyI6IjE5MngxOTIiLCJ0eXBlIjoiaW1hZ2UvcG5nIn0seyJzcmMiOiIvYW5kcm9pZC1jaHJvbWUtNTEyeDUxMi5wbmciLCJzaXplcyI6IjUxMng1MTIiLCJ0eXBlIjoiaW1hZ2UvcG5nIn1dLCJ0aGVtZV9jb2xvciI6IiNmZmZmZmYiLCJiYWNrZ3JvdW5kX2NvbG9yIjoiI2ZmZmZmZiIsImRpc3BsYXkiOiJzdGFuZGFsb25lIn0=" />
|
|
24
24
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
25
25
|
<title>Local Logic</title>
|
|
26
|
-
<script type="module" crossorigin src="/sdks-app/v1/assets/index.
|
|
26
|
+
<script type="module" crossorigin src="/sdks-app/v1/assets/index.bffff470.js"></script>
|
|
27
27
|
</head>
|
|
28
28
|
<body style="overflow: hidden; margin: 0;">
|
|
29
29
|
<script src="http://localhost:8097"></script>
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { DefaultContext } from "
|
|
2
|
+
import { DefaultContext } from "~/types";
|
|
3
3
|
declare const useStateManagerContext: <T extends import("../../sdks/LocalContent/types").LocalContentProps>() => DefaultContext<T>;
|
|
4
|
-
declare const StateManagerProvider: <T extends import("../../sdks/LocalContent/types").LocalContentProps>({ children
|
|
4
|
+
declare const StateManagerProvider: React.MemoExoticComponent<(<T extends import("../../sdks/LocalContent/types").LocalContentProps>({ children }: {
|
|
5
5
|
children: React.ReactNode;
|
|
6
|
-
}) => JSX.Element | null
|
|
6
|
+
}) => JSX.Element | null)>;
|
|
7
7
|
export { useStateManagerContext, StateManagerProvider };
|
|
8
8
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/context/stateManager/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAY5D,OAAO,EAAY,cAAc,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/context/stateManager/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAY5D,OAAO,EAAY,cAAc,EAAE,MAAM,SAAS,CAAC;AAUnD,QAAA,MAAM,sBAAsB,8FAU3B,CAAC;AAEF,QAAA,MAAM,oBAAoB;cACuB,MAAM,SAAS;0BA6G/D,CAAC;AAIF,OAAO,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,CAAC"}
|
|
@@ -2,10 +2,10 @@ import React, { useEffect, useState, useMemo } from "react";
|
|
|
2
2
|
import { FollowerNode } from "@local-logic/channel";
|
|
3
3
|
import { useSearch, useNavigate, useLocation, } from "@tanstack/react-location";
|
|
4
4
|
import once from "lodash.once";
|
|
5
|
-
import
|
|
6
|
-
import useEffectOnce from "
|
|
7
|
-
import useDebounce from "
|
|
8
|
-
import { ChannelEvents } from "
|
|
5
|
+
import { mergeDeep } from "~/services/mergeDeep";
|
|
6
|
+
import useEffectOnce from "~/hooks/useEffectOnce";
|
|
7
|
+
import useDebounce from "~/hooks/useDebounce";
|
|
8
|
+
import { ChannelEvents } from "~/constants/channel-events";
|
|
9
9
|
import defaultState from "./defaultState";
|
|
10
10
|
// Using once to get around generic Context issue: https://stackoverflow.com/a/61020816/4282290
|
|
11
11
|
const createStateManagerContext = once(() => React.createContext({}));
|
|
@@ -16,7 +16,7 @@ const useStateManagerContext = () => {
|
|
|
16
16
|
}
|
|
17
17
|
return context;
|
|
18
18
|
};
|
|
19
|
-
const StateManagerProvider = ({ children
|
|
19
|
+
const StateManagerProvider = React.memo(({ children }) => {
|
|
20
20
|
const StateManagerContext = createStateManagerContext();
|
|
21
21
|
const search = useSearch();
|
|
22
22
|
const sdkStateRef = React.useRef(search);
|
|
@@ -56,7 +56,7 @@ const StateManagerProvider = ({ children, }) => {
|
|
|
56
56
|
followerNode === null || followerNode === void 0 ? void 0 : followerNode.onMessage(handleMessage);
|
|
57
57
|
followerNode === null || followerNode === void 0 ? void 0 : followerNode.connect().then((resp) => {
|
|
58
58
|
_setSdkState((prev) => {
|
|
59
|
-
const mergedState =
|
|
59
|
+
const mergedState = mergeDeep(prev, resp.data);
|
|
60
60
|
sdkStateRef.current = mergedState;
|
|
61
61
|
return mergedState;
|
|
62
62
|
});
|
|
@@ -86,6 +86,7 @@ const StateManagerProvider = ({ children, }) => {
|
|
|
86
86
|
return null;
|
|
87
87
|
}
|
|
88
88
|
return (React.createElement(StateManagerContext.Provider, { value: contextValue }, children));
|
|
89
|
-
};
|
|
89
|
+
});
|
|
90
|
+
StateManagerProvider.displayName = "StateManagerProvider";
|
|
90
91
|
export { useStateManagerContext, StateManagerProvider };
|
|
91
92
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/context/stateManager/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,OAAO,EAAE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O,EAAE,CAAC,CAAC;SACvD;IACH,CAAC,EAAE,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC;IAEvB,MAAM,YAAY,GAAG,OAAO,CAC1B,GAAG,EAAE,CAAC,CAAC;QACL,QAAQ;QACR,WAAW;QACX,QAAQ;KACT,CAAC,EACF,CAAC,QAAQ,EAAE,WAAW,EAAE,QAAQ,CAAC,CAClC,CAAC;IAEF,IAAI,CAAC,WAAW,EAAE;QAChB,OAAO,IAAI,CAAC;KACb;IAED,OAAO,CACL,oBAAC,mBAAmB,CAAC,QAAQ,IAAC,KAAK,EAAE,YAAY,IAC9C,QAAQ,CACoB,CAChC,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,oBAAoB,CAAC,WAAW,GAAG,sBAAsB,CAAC;AAE1D,OAAO,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,CAAC"}
|
|
@@ -4,10 +4,10 @@ export declare const scoresKeys: {
|
|
|
4
4
|
list: (filters: Partial<scoresResponse>) => readonly ["scores", Partial<{
|
|
5
5
|
lat?: number | undefined;
|
|
6
6
|
lng?: number | undefined;
|
|
7
|
+
include?: ("high_schools" | "primary_schools" | "transit_friendly" | "groceries" | "restaurants" | "pedestrian_friendly" | "greenery" | "historic" | "cycling_friendly" | "car_friendly" | "vibrant" | "shopping" | "nightlife" | "cafes" | "quiet" | "parks" | "daycares" | "wellness")[] | undefined;
|
|
7
8
|
geographyIds?: string[] | undefined;
|
|
8
9
|
geographyLevels?: ("10" | "20" | "30")[] | undefined;
|
|
9
10
|
locationScoresRounding?: boolean | undefined;
|
|
10
|
-
include?: ("high_schools" | "primary_schools" | "transit_friendly" | "groceries" | "restaurants" | "pedestrian_friendly" | "greenery" | "historic" | "cycling_friendly" | "car_friendly" | "vibrant" | "shopping" | "nightlife" | "cafes" | "quiet" | "parks" | "daycares" | "wellness")[] | undefined;
|
|
11
11
|
}>];
|
|
12
12
|
};
|
|
13
13
|
//# sourceMappingURL=keyFactory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/sdks/LocalContent/Map/Attribution/index.tsx"],"names":[],"mappings":";AAIA,QAAA,MAAM,WAAW,mBAIhB,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Attribution as A } from "@local-logic/elements-react";
|
|
3
|
+
import * as S from "./styles";
|
|
4
|
+
const Attribution = () => (React.createElement(S.AttributionContainer, null,
|
|
5
|
+
React.createElement(A.Root, null)));
|
|
6
|
+
export default Attribution;
|
|
7
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/sdks/LocalContent/Map/Attribution/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,WAAW,IAAI,CAAC,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,KAAK,CAAC,MAAM,UAAU,CAAC;AAE9B,MAAM,WAAW,GAAG,GAAG,EAAE,CAAC,CACxB,oBAAC,CAAC,CAAC,oBAAoB;IACrB,oBAAC,CAAC,CAAC,IAAI,OAAG,CACa,CAC1B,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../../../src/sdks/LocalContent/Map/Attribution/styles.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,oBAAoB,oEAKhC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { theme } from "@local-logic/ui";
|
|
2
|
+
import styled from "styled-components";
|
|
3
|
+
export const AttributionContainer = styled.div `
|
|
4
|
+
display: flex;
|
|
5
|
+
justify-content: center;
|
|
6
|
+
padding: ${theme["--ll-spacing-small"]};
|
|
7
|
+
background-color: ${theme["--ll-color-background"]};
|
|
8
|
+
`;
|
|
9
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../../../../src/sdks/LocalContent/Map/Attribution/styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACxC,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,MAAM,CAAC,MAAM,oBAAoB,GAAG,MAAM,CAAC,GAAG,CAAA;;;aAGjC,KAAK,CAAC,oBAAoB,CAAC;sBAClB,KAAK,CAAC,uBAAuB,CAAC;CACnD,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { UseQueryResult } from "@tanstack/react-query";
|
|
3
|
+
import { Scores as ScoresI } from "@local-logic/client";
|
|
4
|
+
interface ScoreProps {
|
|
5
|
+
score: Partial<keyof ScoresI["location"]>;
|
|
6
|
+
data: UseQueryResult<ScoresI, unknown>["data"];
|
|
7
|
+
isLoading: UseQueryResult<ScoresI, unknown>["isLoading"];
|
|
8
|
+
}
|
|
9
|
+
declare const Score: React.MemoExoticComponent<({ score, isLoading, data }: ScoreProps) => JSX.Element>;
|
|
10
|
+
export default Score;
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/sdks/LocalContent/Map/DesktopScores/ScoreCategoryAccordion/ScoreCategory/Score/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,MAAM,IAAI,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAUxD,UAAU,UAAU;IAClB,KAAK,EAAE,OAAO,CAAC,MAAM,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC;IAC1C,IAAI,EAAE,cAAc,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC;IAC/C,SAAS,EAAE,cAAc,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,WAAW,CAAC,CAAC;CAC1D;AAED,QAAA,MAAM,KAAK,yDAA2C,UAAU,iBAkD9D,CAAC;AAIH,eAAe,KAAK,CAAC"}
|
|
@@ -2,12 +2,12 @@ import React from "react";
|
|
|
2
2
|
import { LoadingItem, Spacer, SVG, theme } from "@local-logic/ui";
|
|
3
3
|
import { Score as ScoreE, ScorePOIs } from "@local-logic/elements-react";
|
|
4
4
|
import * as Accordion from "@radix-ui/react-accordion";
|
|
5
|
-
import ChevronRightSVG from "
|
|
6
|
-
import Schools from "
|
|
7
|
-
import POIs from "
|
|
5
|
+
import ChevronRightSVG from "~/assets/icons/chevron_right.svg";
|
|
6
|
+
import Schools from "../../../../Schools";
|
|
7
|
+
import POIs from "../../../../POIs";
|
|
8
8
|
import * as S from "./styles";
|
|
9
9
|
const { scorePois } = ScorePOIs.Constants;
|
|
10
|
-
const Score = React.memo(({ score,
|
|
10
|
+
const Score = React.memo(({ score, isLoading, data }) => {
|
|
11
11
|
if (isLoading) {
|
|
12
12
|
return (React.createElement(S.LoadingItemContainer, null,
|
|
13
13
|
React.createElement(LoadingItem, { height: "34px", width: "100%", key: score })));
|
|
@@ -30,6 +30,7 @@ const Score = React.memo(({ score, scoresResult: { isLoading, data } }) => {
|
|
|
30
30
|
React.createElement(S.Content, null,
|
|
31
31
|
React.createElement(S.InnerContent, null,
|
|
32
32
|
React.createElement(ScoreE.Description, null),
|
|
33
|
+
React.createElement(Spacer, { vertical: true, spacing: "--ll-spacing-small" }),
|
|
33
34
|
React.createElement(ScoreE.BarChart, null),
|
|
34
35
|
React.createElement(S.POIContainer, null, score === "high_schools" || score === "primary_schools" ? (React.createElement(Schools, { score: score })) : (React.createElement(POIs, { include: scorePois[score] }))))))));
|
|
35
36
|
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../../src/sdks/LocalContent/Map/DesktopScores/ScoreCategoryAccordion/ScoreCategory/Score/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAGlE,OAAO,EAAE,KAAK,IAAI,MAAM,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AACzE,OAAO,KAAK,SAAS,MAAM,2BAA2B,CAAC;AACvD,OAAO,eAAe,MAAM,kCAAkC,CAAC;AAC/D,OAAO,OAAO,MAAM,qBAAqB,CAAC;AAC1C,OAAO,IAAI,MAAM,kBAAkB,CAAC;AACpC,OAAO,KAAK,CAAC,MAAM,UAAU,CAAC;AAE9B,MAAM,EAAE,SAAS,EAAE,GAAG,SAAS,CAAC,SAAS,CAAC;AAQ1C,MAAM,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,EAAc,EAAE,EAAE;IAClE,IAAI,SAAS,EAAE;QACb,OAAO,CACL,oBAAC,CAAC,CAAC,oBAAoB;YACrB,oBAAC,WAAW,IAAC,MAAM,EAAC,MAAM,EAAC,KAAK,EAAC,MAAM,EAAC,GAAG,EAAE,KAAK,GAAI,CAC/B,CAC1B,CAAC;KACH;IAED,OAAO,CACL,oBAAC,SAAS,CAAC,IAAI,IAAC,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK;QACtC,oBAAC,MAAM,CAAC,IAAI,IACV,OAAO,EAAE;gBACP,KAAK;gBACL,IAAI;aACL;YAED,oBAAC,CAAC,CAAC,MAAM;gBACP,oBAAC,CAAC,CAAC,OAAO;oBACR,oBAAC,CAAC,CAAC,gBAAgB;wBACjB,oBAAC,GAAG,IACF,UAAU,EAAE,eAAsC,EAClD,IAAI,EAAE,KAAK,CAAC,mCAAmC,CAAC,GAChD,CACiB;oBACrB,oBAAC,MAAM,IAAC,OAAO,EAAC,oBAAoB,GAAG;oBACvC,oBAAC,MAAM,CAAC,IAAI,OAAG;oBACf,oBAAC,MAAM,IAAC,OAAO,EAAC,oBAAoB,GAAG;oBACvC,oBAAC,MAAM,CAAC,KAAK,OAAG;oBAChB,oBAAC,MAAM,OAAG;oBACV,oBAAC,MAAM,CAAC,KAAK,OAAG,CACN,CACH;YACX,oBAAC,CAAC,CAAC,OAAO;gBACR,oBAAC,CAAC,CAAC,YAAY;oBACb,oBAAC,MAAM,CAAC,WAAW,OAAG;oBACtB,oBAAC,MAAM,IAAC,QAAQ,QAAC,OAAO,EAAC,oBAAoB,GAAG;oBAChD,oBAAC,MAAM,CAAC,QAAQ,OAAG;oBACnB,oBAAC,CAAC,CAAC,YAAY,QACZ,KAAK,KAAK,cAAc,IAAI,KAAK,KAAK,iBAAiB,CAAC,CAAC,CAAC,CACzD,oBAAC,OAAO,IAAC,KAAK,EAAE,KAAK,GAAI,CAC1B,CAAC,CAAC,CAAC,CACF,oBAAC,IAAI,IAAC,OAAO,EAAE,SAAS,CAAC,KAAK,CAAC,GAAI,CACpC,CACc,CACF,CACP,CACA,CACC,CAClB,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,KAAK,CAAC,WAAW,GAAG,OAAO,CAAC;AAE5B,eAAe,KAAK,CAAC"}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/sdks/LocalContent/Map/DesktopScores/ScoreCategoryAccordion/ScoreCategory/Score/styles.ts"],"names":[],"mappings":";AACA,OAAO,KAAK,SAAS,MAAM,2BAA2B,CAAC;AAavD,eAAO,MAAM,MAAM,4LAElB,CAAC;AAEF,eAAO,MAAM,OAAO,4LAOnB,CAAC;AAEF,eAAO,MAAM,OAAO,yLAenB,CAAC;AAEF,eAAO,MAAM,YAAY,oEAExB,CAAC;AAEF,eAAO,MAAM,gBAAgB,qEAI5B,CAAC;AAEF,eAAO,MAAM,aAAa,oEAIzB,CAAC;AAEF,eAAO,MAAM,oBAAoB,oEAEhC,CAAC;AAEF,eAAO,MAAM,YAAY,oEAMxB,CAAC"}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../../../../../../../src/sdks/LocalContent/Map/DesktopScores/ScoreCategoryAccordion/ScoreCategory/Score/styles.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,EAAE,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,KAAK,SAAS,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAExC,MAAM,SAAS,GAAG,SAAS,CAAC;IAC1B,IAAI,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE;IACnB,EAAE,EAAE,EAAE,MAAM,EAAE,uCAAuC,EAAE;CACxD,CAAC,CAAC;AAEH,MAAM,OAAO,GAAG,SAAS,CAAC;IACxB,IAAI,EAAE,EAAE,MAAM,EAAE,uCAAuC,EAAE;IACzD,EAAE,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE;CAClB,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,MAAM,GAAG,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,CAAA;;CAE7C,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG,MAAM,CAAC,SAAS,CAAC,OAAO,CAAC,CAAA;;;;;;aAMnC,KAAK,CAAC,sBAAsB,CAAC;CACzC,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG,MAAM,CAAC,SAAS,CAAC,OAAO,CAAC,CAAA;sBAC1B,KAAK,CAAC,oBAAoB,CAAC;;;;2BAItB,KAAK,CAAC,qBAAqB,CAAC;4BAC3B,KAAK,CAAC,qBAAqB,CAAC;;;iBAGvC,SAAS;;;;iBAIT,OAAO;;CAEvB,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAAG,MAAM,CAAC,GAAG,CAAA;aACzB,KAAK,CAAC,qBAAqB,CAAC;CACxC,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAG,MAAM,CAAC,IAAI,CAAA;IACvC,OAAO;;;CAGV,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG,MAAM,CAAC,GAAG,CAAA;;;;CAItC,CAAC;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAAG,MAAM,CAAC,GAAG,CAAA;YAClC,KAAK,CAAC,oBAAoB,CAAC;CACtC,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAAG,MAAM,CAAC,GAAG,CAAA;gBACtB,KAAK,CAAC,oBAAoB,CAAC;;;;;CAK1C,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { scoreCategories } from "@local-logic/elements-react";
|
|
3
|
+
import { UseQueryResult } from "@tanstack/react-query";
|
|
4
|
+
import { Scores } from "@local-logic/client";
|
|
5
|
+
interface ScoreCategoryProps {
|
|
6
|
+
locale?: string;
|
|
7
|
+
data: UseQueryResult<Scores, unknown>["data"];
|
|
8
|
+
isLoading: UseQueryResult<Scores, unknown>["isLoading"];
|
|
9
|
+
isFetching: UseQueryResult<Scores, unknown>["isFetching"];
|
|
10
|
+
tabContent: typeof scoreCategories[number];
|
|
11
|
+
}
|
|
12
|
+
declare const ScoreCategory: React.MemoExoticComponent<({ locale, data, isLoading, isFetching, tabContent }: ScoreCategoryProps) => JSX.Element>;
|
|
13
|
+
export default ScoreCategory;
|
|
14
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../src/sdks/LocalContent/Map/DesktopScores/ScoreCategoryAccordion/ScoreCategory/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAEvC,OAAO,EAEL,eAAe,EAChB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAI7C,UAAU,kBAAkB;IAC1B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,cAAc,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC;IAC9C,SAAS,EAAE,cAAc,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,WAAW,CAAC,CAAC;IACxD,UAAU,EAAE,cAAc,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,YAAY,CAAC,CAAC;IAC1D,UAAU,EAAE,OAAO,eAAe,CAAC,MAAM,CAAC,CAAC;CAC5C;AAED,QAAA,MAAM,aAAa,kFACqC,kBAAkB,iBA+BzE,CAAC;AAIF,eAAe,aAAa,CAAC"}
|
package/dist/types/sdks/LocalContent/Map/DesktopScores/ScoreCategoryAccordion/ScoreCategory/index.js
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import React, { useMemo } from "react";
|
|
2
|
+
import { Spacer, LoadingSpinner, Text } from "@local-logic/ui";
|
|
3
|
+
import { ScoreCategoryTabs, } from "@local-logic/elements-react";
|
|
4
|
+
import Score from "./Score";
|
|
5
|
+
import * as S from "./styles";
|
|
6
|
+
const ScoreCategory = React.memo(({ locale, data, isLoading, isFetching, tabContent }) => {
|
|
7
|
+
const emptyText = useMemo(() => {
|
|
8
|
+
if (locale === "fr") {
|
|
9
|
+
return "Aucune donnée disponible pour cet emplacement.";
|
|
10
|
+
}
|
|
11
|
+
return "No data available for this location.";
|
|
12
|
+
}, [locale]);
|
|
13
|
+
return (React.createElement(S.ScoreCategory, null,
|
|
14
|
+
React.createElement(S.TitleContainer, null,
|
|
15
|
+
React.createElement(ScoreCategoryTabs.Title, { options: {
|
|
16
|
+
variant: "h4",
|
|
17
|
+
noMargin: true,
|
|
18
|
+
weight: "--ll-font-weight-medium",
|
|
19
|
+
} }),
|
|
20
|
+
isFetching && !isLoading && React.createElement(LoadingSpinner, { size: "small" })),
|
|
21
|
+
React.createElement(Spacer, { spacing: "--ll-spacing-small", vertical: true }),
|
|
22
|
+
!isFetching && !Object.keys((data === null || data === void 0 ? void 0 : data.location) || {}).length && (React.createElement(Text, { color: "--ll-color-on-background-variant1" }, emptyText)),
|
|
23
|
+
tabContent.scores.map((score) => (React.createElement(Score, { key: score, score: score, data: data, isLoading: isLoading })))));
|
|
24
|
+
});
|
|
25
|
+
ScoreCategory.displayName = "ScoreCategory";
|
|
26
|
+
export default ScoreCategory;
|
|
27
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../src/sdks/LocalContent/Map/DesktopScores/ScoreCategoryAccordion/ScoreCategory/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAC/D,OAAO,EACL,iBAAiB,GAElB,MAAM,6BAA6B,CAAC;AAGrC,OAAO,KAAK,MAAM,SAAS,CAAC;AAC5B,OAAO,KAAK,CAAC,MAAM,UAAU,CAAC;AAU9B,MAAM,aAAa,GAAG,KAAK,CAAC,IAAI,CAC9B,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,UAAU,EAAE,UAAU,EAAsB,EAAE,EAAE;IAC1E,MAAM,SAAS,GAAG,OAAO,CAAC,GAAG,EAAE;QAC7B,IAAI,MAAM,KAAK,IAAI,EAAE;YACnB,OAAO,gDAAgD,CAAC;SACzD;QAED,OAAO,sCAAsC,CAAC;IAChD,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC;IAEb,OAAO,CACL,oBAAC,CAAC,CAAC,aAAa;QACd,oBAAC,CAAC,CAAC,cAAc;YACf,oBAAC,iBAAiB,CAAC,KAAK,IACtB,OAAO,EAAE;oBACP,OAAO,EAAE,IAAI;oBACb,QAAQ,EAAE,IAAI;oBACd,MAAM,EAAE,yBAAyB;iBAClC,GACD;YACD,UAAU,IAAI,CAAC,SAAS,IAAI,oBAAC,cAAc,IAAC,IAAI,EAAC,OAAO,GAAG,CAC3C;QACnB,oBAAC,MAAM,IAAC,OAAO,EAAC,oBAAoB,EAAC,QAAQ,SAAG;QAC/C,CAAC,UAAU,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,QAAQ,KAAI,EAAE,CAAC,CAAC,MAAM,IAAI,CAC3D,oBAAC,IAAI,IAAC,KAAK,EAAC,mCAAmC,IAAE,SAAS,CAAQ,CACnE;QACA,UAAU,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAChC,oBAAC,KAAK,IAAC,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,SAAS,GAAI,CACtE,CAAC,CACc,CACnB,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,aAAa,CAAC,WAAW,GAAG,eAAe,CAAC;AAE5C,eAAe,aAAa,CAAC"}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../../../../../src/sdks/LocalContent/Map/DesktopScores/ScoreCategoryAccordion/ScoreCategory/styles.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,aAAa,oEAEzB,CAAC;AAEF,eAAO,MAAM,cAAc,oEAI1B,CAAC"}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../../../../../../src/sdks/LocalContent/Map/DesktopScores/ScoreCategoryAccordion/ScoreCategory/styles.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAExC,MAAM,CAAC,MAAM,aAAa,GAAG,MAAM,CAAC,GAAG,CAAA;aAC1B,KAAK,CAAC,oBAAoB,CAAC,IAAI,KAAK,CAAC,qBAAqB,CAAC;CACvE,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAG,MAAM,CAAC,GAAG,CAAA;;;;CAIvC,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { scoreCategories } from "@local-logic/elements-react";
|
|
3
|
+
declare const ScoreCategoryAccordion: React.MemoExoticComponent<({ tabContent }: {
|
|
4
|
+
tabContent: (typeof scoreCategories)[number];
|
|
5
|
+
}) => JSX.Element>;
|
|
6
|
+
export default ScoreCategoryAccordion;
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/sdks/LocalContent/Map/DesktopScores/ScoreCategoryAccordion/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,eAAe,EAAiB,MAAM,6BAA6B,CAAC;AAM7E,QAAA,MAAM,sBAAsB;gBACK,CAAA,sBAAsB,EAAC,MAAM,CAAC;kBAwB9D,CAAC;AAIF,eAAe,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { useLocalLogic } from "@local-logic/elements-react";
|
|
3
|
+
import * as Accordion from "@radix-ui/react-accordion";
|
|
4
|
+
import { useLocalContent } from "../../../context";
|
|
5
|
+
import { useScores } from "../../../features/useScores";
|
|
6
|
+
import ScoreCategory from "./ScoreCategory";
|
|
7
|
+
const ScoreCategoryAccordion = React.memo(({ tabContent }) => {
|
|
8
|
+
const { client } = useLocalLogic();
|
|
9
|
+
const { data, isLoading, isFetching } = useScores(tabContent.scores);
|
|
10
|
+
const { activeScore, setActiveScore } = useLocalContent();
|
|
11
|
+
return (React.createElement(Accordion.Root, { value: activeScore, onValueChange: (v) => {
|
|
12
|
+
setActiveScore(v);
|
|
13
|
+
}, type: "single", collapsible: true },
|
|
14
|
+
React.createElement(ScoreCategory, { data: data, isLoading: isLoading, isFetching: isFetching, tabContent: tabContent, locale: client.options.locale })));
|
|
15
|
+
});
|
|
16
|
+
ScoreCategoryAccordion.displayName = "ScoreCategoryAccordion";
|
|
17
|
+
export default ScoreCategoryAccordion;
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../src/sdks/LocalContent/Map/DesktopScores/ScoreCategoryAccordion/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAmB,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC7E,OAAO,KAAK,SAAS,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AACxD,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAE5C,MAAM,sBAAsB,GAAG,KAAK,CAAC,IAAI,CACvC,CAAC,EAAE,UAAU,EAAkD,EAAE,EAAE;IACjE,MAAM,EAAE,MAAM,EAAE,GAAG,aAAa,EAAE,CAAC;IACnC,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,UAAU,EAAE,GAAG,SAAS,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;IACrE,MAAM,EAAE,WAAW,EAAE,cAAc,EAAE,GAAG,eAAe,EAAE,CAAC;IAE1D,OAAO,CACL,oBAAC,SAAS,CAAC,IAAI,IACb,KAAK,EAAE,WAAW,EAClB,aAAa,EAAE,CAAC,CAAC,EAAE,EAAE;YACnB,cAAc,CAAC,CAA6B,CAAC,CAAC;QAChD,CAAC,EACD,IAAI,EAAC,QAAQ,EACb,WAAW;QAEX,oBAAC,aAAa,IACZ,IAAI,EAAE,IAAI,EACV,SAAS,EAAE,SAAS,EACpB,UAAU,EAAE,UAAU,EACtB,UAAU,EAAE,UAAU,EACtB,MAAM,EAAE,MAAM,CAAC,OAAO,CAAC,MAAM,GAC7B,CACa,CAClB,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,sBAAsB,CAAC,WAAW,GAAG,wBAAwB,CAAC;AAE9D,eAAe,sBAAsB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/sdks/LocalContent/Map/DesktopScores/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAU1B,QAAA,MAAM,aAAa,sEAgCjB,CAAC;AAIH,eAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ScoreCategoryTabs, scoreCategories, } from "@local-logic/elements-react";
|
|
3
|
+
import ScoreCategoryAccordion from "./ScoreCategoryAccordion";
|
|
4
|
+
import * as S from "./styles";
|
|
5
|
+
import { useLocalContent } from "../../context";
|
|
6
|
+
import Attribution from "../Attribution";
|
|
7
|
+
const DesktopScores = React.forwardRef((_, forwardedRef) => {
|
|
8
|
+
const { activeCategory, setActiveCategory, setShowMobileList } = useLocalContent();
|
|
9
|
+
return (React.createElement(ScoreCategoryTabs.Root, { options: { currentTab: activeCategory }, onChange: (e) => {
|
|
10
|
+
setActiveCategory(e.data);
|
|
11
|
+
} },
|
|
12
|
+
React.createElement(S.ScoresContainer, { ref: forwardedRef },
|
|
13
|
+
React.createElement(S.TabsContainer, null,
|
|
14
|
+
React.createElement(ScoreCategoryTabs.Tabs, null)),
|
|
15
|
+
React.createElement(S.ScrollContainer, null, scoreCategories.map((tabContent) => (React.createElement(ScoreCategoryTabs.Content, { key: tabContent.value, options: { value: tabContent.value } },
|
|
16
|
+
React.createElement(ScoreCategoryAccordion, { tabContent: tabContent, key: tabContent.value }))))),
|
|
17
|
+
React.createElement(Attribution, null))));
|
|
18
|
+
});
|
|
19
|
+
DesktopScores.displayName = "DesktopScores";
|
|
20
|
+
export default DesktopScores;
|
|
21
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/sdks/LocalContent/Map/DesktopScores/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EACL,iBAAiB,EACjB,eAAe,GAChB,MAAM,6BAA6B,CAAC;AACrC,OAAO,sBAAsB,MAAM,0BAA0B,CAAC;AAC9D,OAAO,KAAK,CAAC,MAAM,UAAU,CAAC;AAC9B,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,WAAW,MAAM,gBAAgB,CAAC;AAEzC,MAAM,aAAa,GAAG,KAAK,CAAC,UAAU,CAAiB,CAAC,CAAC,EAAE,YAAY,EAAE,EAAE;IACzE,MAAM,EAAE,cAAc,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,GAC5D,eAAe,EAAE,CAAC;IAEpB,OAAO,CACL,oBAAC,iBAAiB,CAAC,IAAI,IACrB,OAAO,EAAE,EAAE,UAAU,EAAE,cAAc,EAAE,EACvC,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE;YACd,iBAAiB,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;QAC5B,CAAC;QAED,oBAAC,CAAC,CAAC,eAAe,IAAC,GAAG,EAAE,YAAY;YAClC,oBAAC,CAAC,CAAC,aAAa;gBACd,oBAAC,iBAAiB,CAAC,IAAI,OAAG,CACV;YAClB,oBAAC,CAAC,CAAC,eAAe,QACf,eAAe,CAAC,GAAG,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,CACnC,oBAAC,iBAAiB,CAAC,OAAO,IACxB,GAAG,EAAE,UAAU,CAAC,KAAK,EACrB,OAAO,EAAE,EAAE,KAAK,EAAE,UAAU,CAAC,KAAK,EAAE;gBAEpC,oBAAC,sBAAsB,IACrB,UAAU,EAAE,UAAU,EACtB,GAAG,EAAE,UAAU,CAAC,KAAK,GACrB,CACwB,CAC7B,CAAC,CACgB;YACpB,oBAAC,WAAW,OAAG,CACG,CACG,CAC1B,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,aAAa,CAAC,WAAW,GAAG,eAAe,CAAC;AAE5C,eAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const ScrollContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
2
|
+
export declare const ScoresContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
3
|
+
export declare const AttributionContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
4
|
+
export declare const TabsContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
5
|
+
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../../../src/sdks/LocalContent/Map/DesktopScores/styles.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,eAAe,oEAE3B,CAAC;AAEF,eAAO,MAAM,eAAe,oEAe3B,CAAC;AAEF,eAAO,MAAM,oBAAoB,oEAIhC,CAAC;AAEF,eAAO,MAAM,aAAa,oEAGzB,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { theme } from "@local-logic/ui";
|
|
2
|
+
import styled from "styled-components";
|
|
3
|
+
export const ScrollContainer = styled.div `
|
|
4
|
+
overflow-y: auto;
|
|
5
|
+
`;
|
|
6
|
+
export const ScoresContainer = styled.div `
|
|
7
|
+
position: absolute;
|
|
8
|
+
top: ${theme["--ll-spacing-medium"]};
|
|
9
|
+
left: ${theme["--ll-spacing-medium"]};
|
|
10
|
+
width: 360px;
|
|
11
|
+
max-height: calc(100% - 2 * ${theme["--ll-spacing-medium"]});
|
|
12
|
+
z-index: 1;
|
|
13
|
+
border-radius: ${theme["--ll-border-radius-medium"]};
|
|
14
|
+
box-shadow: rgba(0, 0, 0, 0.15) 0px 3px 8px;
|
|
15
|
+
background-color: #fff;
|
|
16
|
+
overflow: hidden;
|
|
17
|
+
display: flex;
|
|
18
|
+
flex-direction: column;
|
|
19
|
+
background-color: ${theme["--ll-color-background"]};
|
|
20
|
+
border: 1px solid ${theme["--ll-color-border"]};
|
|
21
|
+
`;
|
|
22
|
+
export const AttributionContainer = styled.div `
|
|
23
|
+
display: flex;
|
|
24
|
+
justify-content: center;
|
|
25
|
+
padding: ${theme["--ll-spacing-small"]};
|
|
26
|
+
`;
|
|
27
|
+
export const TabsContainer = styled.div `
|
|
28
|
+
padding: ${theme["--ll-spacing-x-small"]};
|
|
29
|
+
border-bottom: 1px solid ${theme["--ll-color-border"]};
|
|
30
|
+
`;
|
|
31
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../../../../src/sdks/LocalContent/Map/DesktopScores/styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACxC,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,MAAM,CAAC,MAAM,eAAe,GAAG,MAAM,CAAC,GAAG,CAAA;;CAExC,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAAG,MAAM,CAAC,GAAG,CAAA;;SAEhC,KAAK,CAAC,qBAAqB,CAAC;UAC3B,KAAK,CAAC,qBAAqB,CAAC;;gCAEN,KAAK,CAAC,qBAAqB,CAAC;;mBAEzC,KAAK,CAAC,2BAA2B,CAAC;;;;;;sBAM/B,KAAK,CAAC,uBAAuB,CAAC;sBAC9B,KAAK,CAAC,mBAAmB,CAAC;CAC/C,CAAC;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAAG,MAAM,CAAC,GAAG,CAAA;;;aAGjC,KAAK,CAAC,oBAAoB,CAAC;CACvC,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG,MAAM,CAAC,GAAG,CAAA;aAC1B,KAAK,CAAC,sBAAsB,CAAC;6BACb,KAAK,CAAC,mBAAmB,CAAC;CACtD,CAAC"}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/sdks/LocalContent/Map/Markers/Cluster/index.tsx"],"names":[],"mappings":";AACA,OAAO,YAAY,MAAM,cAAc,CAAC;AAGxC,UAAU,YAAY;IACpB,OAAO,EAAE,YAAY,CAAC,YAAY,CAChC,YAAY,CAAC,iBAAiB,GAAG,YAAY,CAAC,QAAQ,CACvD,CAAC;IACF,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,CACR,OAAO,EAAE,YAAY,CAAC,YAAY,CAChC,YAAY,CAAC,iBAAiB,GAAG,YAAY,CAAC,QAAQ,CACvD,KACE,IAAI,CAAC;CACX;AAED,QAAA,MAAM,OAAO,sCAAuC,YAAY,gBAS/D,CAAC;AAEF,eAAe,OAAO,CAAC"}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../src/sdks/LocalContent/Map/Markers/Cluster/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,CAAC,MAAM,UAAU,CAAC;AAc9B,MAAM,OAAO,GAAG,CAAC,EAAE,OAAO,EAAE,WAAW,EAAE,OAAO,EAAgB,EAAE,EAAE;IAClE,MAAM,iBAAiB,GAAG,OAAO,CAAC,UAAU,CAAC,WAAW,CAAC;IACzD,MAAM,QAAQ,GAAG,EAAE,GAAG,CAAC,iBAAiB,GAAG,WAAW,CAAC,GAAG,EAAE,CAAC;IAE7D,OAAO,CACL,oBAAC,CAAC,CAAC,OAAO,IAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO,IAAI,OAAO,CAAC,OAAO,CAAC,IACtE,OAAO,CAAC,UAAU,CAAC,WAAW,CACrB,CACb,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,OAAO,CAAC"}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../../../../src/sdks/LocalContent/Map/Markers/Cluster/styles.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,OAAO;cAA0B,MAAM;SAmBnD,CAAC"}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../../../../../src/sdks/LocalContent/Map/Markers/Cluster/styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACxC,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,MAAM,CAAC,MAAM,OAAO,GAAG,MAAM,CAAC,GAAG,CAAsB;;;;MAIjD,KAAK,CAAC,6BAA6B,CAAC;MACpC,KAAK,CAAC,oBAAoB,CAAC;;WAEtB,KAAK,CAAC,uBAAuB,CAAC;YAC7B,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,QAAQ;WAC3B,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,QAAQ;;;;;iBAKpB,KAAK,CAAC,kBAAkB,CAAC;eAC3B,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,QAAQ,GAAG,GAAG;;gBAE/B,KAAK,CAAC,mBAAmB,CAAC;;CAEzC,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { MapRef } from "react-map-gl";
|
|
3
|
+
import { Feature, Point } from "@turf/turf";
|
|
4
|
+
import { School, POI } from "@local-logic/client";
|
|
5
|
+
import { UseMeasureRect } from "~/hooks/useMeasure";
|
|
6
|
+
interface MarkersProps {
|
|
7
|
+
mapRef: React.MutableRefObject<MapRef | undefined>;
|
|
8
|
+
points: Feature<Point, {
|
|
9
|
+
poi: POI | School;
|
|
10
|
+
type: string;
|
|
11
|
+
}>[];
|
|
12
|
+
zoom: number;
|
|
13
|
+
activePOI: POI | School | undefined;
|
|
14
|
+
hoveredPOI: POI | School | undefined;
|
|
15
|
+
isMapMoving: boolean;
|
|
16
|
+
isMobile: boolean;
|
|
17
|
+
rect: UseMeasureRect;
|
|
18
|
+
setActivePOI: (poi: POI | School | undefined) => void;
|
|
19
|
+
}
|
|
20
|
+
declare const Markers: React.MemoExoticComponent<({ rect, zoom, mapRef, points, isMobile, activePOI, hoveredPOI, isMapMoving, setActivePOI, }: MarkersProps) => JSX.Element>;
|
|
21
|
+
export default Markers;
|
|
22
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/sdks/LocalContent/Map/Markers/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,MAAM,EAAU,MAAM,cAAc,CAAC;AAG9C,OAAO,EAAQ,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAElD,OAAO,EAAiB,MAAM,EAAE,GAAG,EAAE,MAAM,qBAAqB,CAAC;AAEjE,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AASpD,UAAU,YAAY;IACpB,MAAM,EAAE,KAAK,CAAC,gBAAgB,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IACnD,MAAM,EAAE,OAAO,CACb,KAAK,EACL;QACE,GAAG,EAAE,GAAG,GAAG,MAAM,CAAC;QAClB,IAAI,EAAE,MAAM,CAAC;KACd,CACF,EAAE,CAAC;IACJ,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,GAAG,GAAG,MAAM,GAAG,SAAS,CAAC;IACpC,UAAU,EAAE,GAAG,GAAG,MAAM,GAAG,SAAS,CAAC;IACrC,WAAW,EAAE,OAAO,CAAC;IACrB,QAAQ,EAAE,OAAO,CAAC;IAClB,IAAI,EAAE,cAAc,CAAC;IACrB,YAAY,EAAE,CAAC,GAAG,EAAE,GAAG,GAAG,MAAM,GAAG,SAAS,KAAK,IAAI,CAAC;CACvD;AAMD,QAAA,MAAM,OAAO,0HAWR,YAAY,iBAgGhB,CAAC;AAIF,eAAe,OAAO,CAAC"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Marker } from "react-map-gl";
|
|
3
|
+
import useSupercluster from "use-supercluster";
|
|
4
|
+
import { gridUnit } from "@local-logic/ui";
|
|
5
|
+
import { POIMarker } from "@local-logic/elements-react";
|
|
6
|
+
import Cluster from "./Cluster";
|
|
7
|
+
function isCluster(cluster) {
|
|
8
|
+
return cluster.properties.cluster !== undefined;
|
|
9
|
+
}
|
|
10
|
+
const Markers = React.memo(({ rect, zoom, mapRef, points, isMobile, activePOI, hoveredPOI, isMapMoving, setActivePOI, }) => {
|
|
11
|
+
var _a;
|
|
12
|
+
const bounds = (_a = mapRef === null || mapRef === void 0 ? void 0 : mapRef.current) === null || _a === void 0 ? void 0 : _a.getMap().getBounds().toArray().flat();
|
|
13
|
+
const { clusters, supercluster } = useSupercluster({
|
|
14
|
+
points,
|
|
15
|
+
bounds,
|
|
16
|
+
zoom,
|
|
17
|
+
options: { radius: 50, maxZoom: 18 },
|
|
18
|
+
});
|
|
19
|
+
return (React.createElement(React.Fragment, null, clusters.map((cluster, i) => {
|
|
20
|
+
const [longitude, latitude] = cluster.geometry.coordinates;
|
|
21
|
+
if (isCluster(cluster)) {
|
|
22
|
+
return (React.createElement(Marker, { key: `cluster-${cluster.id}`, latitude: latitude, longitude: longitude },
|
|
23
|
+
React.createElement(Cluster, { cluster: cluster, pointsCount: points.length, onClick: () => {
|
|
24
|
+
var _a;
|
|
25
|
+
const expansionZoom = Math.min(supercluster.getClusterExpansionZoom(cluster.id), 20);
|
|
26
|
+
(_a = mapRef.current) === null || _a === void 0 ? void 0 : _a.flyTo({
|
|
27
|
+
zoom: expansionZoom,
|
|
28
|
+
center: [longitude, latitude],
|
|
29
|
+
duration: 1000,
|
|
30
|
+
});
|
|
31
|
+
} })));
|
|
32
|
+
}
|
|
33
|
+
const { poi, type } = cluster.properties;
|
|
34
|
+
const isOpen = activePOI === poi;
|
|
35
|
+
const isHovered = hoveredPOI === poi;
|
|
36
|
+
return (React.createElement(Marker, { latitude: poi.lat, longitude: poi.lng, key: `${poi.name}-${poi.lat}-${poi.lng}-${i}`, style: { zIndex: isOpen ? 1 : 0 } },
|
|
37
|
+
React.createElement(POIMarker.Root, { options: {
|
|
38
|
+
type: type,
|
|
39
|
+
poi,
|
|
40
|
+
isOpen: isMapMoving ? false : isOpen,
|
|
41
|
+
isHovered,
|
|
42
|
+
side: "top",
|
|
43
|
+
collisionPadding: isMobile
|
|
44
|
+
? {
|
|
45
|
+
top: rect.height + 32,
|
|
46
|
+
bottom: gridUnit * 2,
|
|
47
|
+
left: gridUnit * 2,
|
|
48
|
+
right: gridUnit * 2,
|
|
49
|
+
}
|
|
50
|
+
: {
|
|
51
|
+
left: rect.width + 32,
|
|
52
|
+
right: gridUnit * 2,
|
|
53
|
+
top: gridUnit * 2,
|
|
54
|
+
bottom: gridUnit * 2,
|
|
55
|
+
},
|
|
56
|
+
}, onChange: (e) => {
|
|
57
|
+
if (e.type === "open-change") {
|
|
58
|
+
if (e.data) {
|
|
59
|
+
setActivePOI(poi);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
} },
|
|
63
|
+
React.createElement(POIMarker.Marker, null),
|
|
64
|
+
React.createElement(POIMarker.Content, null))));
|
|
65
|
+
})));
|
|
66
|
+
});
|
|
67
|
+
Markers.displayName = "Markers";
|
|
68
|
+
export default Markers;
|
|
69
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/sdks/LocalContent/Map/Markers/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAU,MAAM,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,eAAe,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAE3C,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAIxD,OAAO,OAAO,MAAM,WAAW,CAAC;AA0BhC,SAAS,SAAS,CAAC,OAA+B;IAChD,OAAQ,OAAmB,CAAC,UAAU,CAAC,OAAO,KAAK,SAAS,CAAC;AAC/D,CAAC;AAED,MAAM,OAAO,GAAG,KAAK,CAAC,IAAI,CACxB,CAAC,EACC,IAAI,EACJ,IAAI,EACJ,MAAM,EACN,MAAM,EACN,QAAQ,EACR,SAAS,EACT,UAAU,EACV,WAAW,EACX,YAAY,GACC,EAAE,EAAE;;IACjB,MAAM,MAAM,GAAG,MAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,OAAO,0CAC1B,MAAM,GACP,SAAS,GACT,OAAO,GACP,IAAI,EAAU,CAAC;IAClB,MAAM,EAAE,QAAQ,EAAE,YAAY,EAAE,GAAG,eAAe,CAAC;QACjD,MAAM;QACN,MAAM;QACN,IAAI;QACJ,OAAO,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE;KACrC,CAAC,CAAC;IAEH,OAAO,CACL,0CACG,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,C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b,OAAO,EAAE;oBACP,IAAI,EAAE,IAAkC;oBACxC,GAAG;oBACH,MAAM,EAAE,WAAW,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM;oBACpC,SAAS;oBACT,IAAI,EAAE,KAAK;oBACX,gBAAgB,EAAE,QAAQ;wBACxB,CAAC,CAAC;4BACE,GAAG,EAAE,IAAI,CAAC,MAAM,GAAG,EAAE;4BACrB,MAAM,EAAE,QAAQ,GAAG,CAAC;4BACpB,IAAI,EAAE,QAAQ,GAAG,CAAC;4BAClB,KAAK,EAAE,QAAQ,GAAG,CAAC;yBACpB;wBACH,CAAC,CAAC;4BACE,IAAI,EAAE,IAAI,CAAC,KAAK,GAAG,EAAE;4BACrB,KAAK,EAAE,QAAQ,GAAG,CAAC;4BACnB,GAAG,EAAE,QAAQ,GAAG,CAAC;4BACjB,MAAM,EAAE,QAAQ,GAAG,CAAC;yBACrB;iBACN,EACD,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE;oBACd,IAAI,CAAC,CAAC,IAAI,KAAK,aAAa,EAAE;wBAC5B,IAAI,CAAC,CAAC,IAAI,EAAE;4BACV,YAAY,CAAC,GAAG,CAAC,CAAC;yBACnB;qBACF;gBACH,CAAC;gBAED,oBAAC,SAAS,CAAC,MAAM,OAAG;gBACpB,oBAAC,SAAS,CAAC,OAAO,OAAG,CACN,CACV,CACV,CAAC;IACJ,CAAC,CAAC,CACD,CACJ,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,OAAO,CAAC,WAAW,GAAG,SAAS,CAAC;AAEhC,eAAe,OAAO,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { scoreCategories } from "@local-logic/elements-react";
|
|
3
|
+
interface ScoreCategoryProps {
|
|
4
|
+
category: typeof scoreCategories[number];
|
|
5
|
+
}
|
|
6
|
+
declare const ScoreCategory: ({ category }: ScoreCategoryProps) => JSX.Element;
|
|
7
|
+
export default ScoreCategory;
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/sdks/LocalContent/Map/MobileScores/ScoreCategory/index.tsx"],"names":[],"mappings":";AACA,OAAO,EAGL,eAAe,EAChB,MAAM,6BAA6B,CAAC;AAMrC,UAAU,kBAAkB;IAC1B,QAAQ,EAAE,OAAO,eAAe,CAAC,MAAM,CAAC,CAAC;CAC1C;AAED,QAAA,MAAM,aAAa,iBAAkB,kBAAkB,gBA+DtD,CAAC;AAEF,eAAe,aAAa,CAAC"}
|