@abcagency/hc-ui-components 1.3.58 → 1.3.59
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/apis/hcApi.js +85 -85
- package/dist/apis/hcApi.js.map +1 -1
- package/dist/clientToken.js.map +1 -1
- package/dist/components/containers/accordions/filter-container.js.map +1 -1
- package/dist/components/containers/accordions/map-accordion-item-container.js.map +1 -1
- package/dist/components/containers/jobListing/listing-details-container.js.map +1 -1
- package/dist/components/containers/list/item-list-container.js +21 -21
- package/dist/components/containers/list/list-item/list-item-container.js.map +1 -1
- package/dist/components/containers/maps/map-container.js.map +1 -1
- package/dist/components/modules/accordions/MapAccordionItem.js.map +1 -1
- package/dist/components/modules/accordions/default.js.map +1 -1
- package/dist/components/modules/buttons/commute-pill.js.map +1 -1
- package/dist/components/modules/buttons/default.js.map +1 -1
- package/dist/components/modules/buttons/items-pill.js.map +1 -1
- package/dist/components/modules/buttons/pill-wrapper.js.map +1 -1
- package/dist/components/modules/buttons/show-all-button.js.map +1 -1
- package/dist/components/modules/cards/default.js.map +1 -1
- package/dist/components/modules/cards/filter.js.map +1 -1
- package/dist/components/modules/filter/item.js.map +1 -1
- package/dist/components/modules/filter/sort.js.map +1 -1
- package/dist/components/modules/grid.js.map +1 -1
- package/dist/components/modules/icon.js.map +1 -1
- package/dist/components/modules/list/header.js.map +1 -1
- package/dist/components/modules/list/item-list.js +40 -40
- package/dist/components/modules/maps/info-window-card.js.map +1 -1
- package/dist/components/modules/maps/map.js.map +1 -1
- package/dist/components/modules/maps/place-marker.js.map +1 -1
- package/dist/components/modules/maps/tabs.js.map +1 -1
- package/dist/constants/placeTypes.js.map +1 -1
- package/dist/contexts/mapContext.js +83 -83
- package/dist/contexts/mapListContext.js +190 -190
- package/dist/contexts/trackEventContext.js.map +1 -1
- package/dist/hooks/useList.js.map +1 -1
- package/dist/services/configService.js +9 -9
- package/dist/services/googlePlacesNearbyService.js +32 -32
- package/dist/services/googlePlacesNearbyService.js.map +1 -1
- package/dist/services/listingAggregatorService.js +34 -34
- package/dist/services/listingAggregatorService.js.map +1 -1
- package/dist/services/listingEntityService.js +9 -9
- package/dist/services/listingService.js +24 -24
- package/dist/services/recruiterService.js +10 -10
- package/dist/types/apis/hcApi.d.ts +5 -5
- package/dist/types/clientToken.d.ts +2 -2
- package/dist/types/components/containers/accordions/map-accordion-item-container.d.ts +12 -12
- package/dist/types/components/containers/jobListing/listing-details-container.d.ts +6 -6
- package/dist/types/components/containers/list/item-list-container.d.ts +9 -9
- package/dist/types/components/containers/list/list-item/list-item-container.d.ts +14 -14
- package/dist/types/components/modules/accordions/MapAccordionItem.d.ts +10 -10
- package/dist/types/components/modules/accordions/default.d.ts +19 -19
- package/dist/types/components/modules/buttons/button-group-apply.d.ts +24 -24
- package/dist/types/components/modules/buttons/commute-pill.d.ts +5 -5
- package/dist/types/components/modules/buttons/default.d.ts +48 -48
- package/dist/types/components/modules/buttons/pill-wrapper.d.ts +3 -3
- package/dist/types/components/modules/dialogs/apply-dialog.d.ts +8 -8
- package/dist/types/components/modules/filter/sort.d.ts +8 -8
- package/dist/types/components/modules/grid.d.ts +8 -8
- package/dist/types/components/modules/icon.d.ts +10 -10
- package/dist/types/components/modules/jobListing/listing-details.d.ts +18 -18
- package/dist/types/components/modules/list/field-mapper.d.ts +10 -10
- package/dist/types/components/modules/list/header-item.d.ts +11 -11
- package/dist/types/components/modules/list/header.d.ts +12 -12
- package/dist/types/components/modules/list/item-expand-card/index.d.ts +7 -7
- package/dist/types/components/modules/list/item-expand-card/recruiter-contact-nav.d.ts +17 -17
- package/dist/types/components/modules/list/item-expand-card/recruiter-details.d.ts +21 -21
- package/dist/types/components/modules/list/item-expand-card/recruiter-headshot.d.ts +8 -8
- package/dist/types/components/modules/list/item-list.d.ts +20 -20
- package/dist/types/components/modules/list/list-item/list-item.d.ts +3 -3
- package/dist/types/constants/eventTypes.d.ts +14 -14
- package/dist/types/contexts/mapContext.d.ts +29 -29
- package/dist/types/contexts/mapListContext.d.ts +61 -61
- package/dist/types/contexts/trackEventContext.d.ts +6 -6
- package/dist/types/enums/SectionType.d.ts +9 -9
- package/dist/types/hooks/useList.d.ts +13 -13
- package/dist/types/services/configService.d.ts +6 -6
- package/dist/types/services/googlePlacesNearbyService.d.ts +5 -5
- package/dist/types/services/listingAggregatorService.d.ts +12 -12
- package/dist/types/services/listingEntityService.d.ts +6 -6
- package/dist/types/services/listingService.d.ts +9 -9
- package/dist/types/services/recruiterService.d.ts +6 -6
- package/dist/types/types/Address.d.ts +7 -7
- package/dist/types/types/ContentSection.d.ts +8 -8
- package/dist/types/types/GetListingParams.d.ts +8 -8
- package/dist/types/types/LatLng.d.ts +4 -4
- package/dist/types/types/ListingEntity.d.ts +10 -10
- package/dist/types/types/ListingFields.d.ts +25 -25
- package/dist/types/types/Listings.d.ts +31 -31
- package/dist/types/types/Recruiter.d.ts +9 -9
- package/dist/types/types/SimilarListing.d.ts +24 -24
- package/dist/types/types/config/Colors.d.ts +8 -8
- package/dist/types/types/config/MapConfig.d.ts +30 -30
- package/dist/types/types/config/PointsOfInterestConfig.d.ts +13 -13
- package/dist/types/types/config/SearchConfig.d.ts +4 -4
- package/dist/types/util/filterUtil.d.ts +28 -28
- package/dist/types/util/loading.d.ts +3 -3
- package/dist/types/util/localStorageUtil.d.ts +3 -3
- package/dist/types/util/mapUtil.d.ts +16 -16
- package/dist/types/util/sortUtil.d.ts +1 -1
- package/dist/types/util/stringUtils.d.ts +1 -1
- package/dist/types/util/urlFilterUtil.d.ts +8 -8
- package/dist/util/filterUtil.js +2 -2
- package/dist/util/filterUtil.js.map +1 -1
- package/dist/util/loading.js.map +1 -1
- package/dist/util/localStorageUtil.js +37 -37
- package/dist/util/localStorageUtil.js.map +1 -1
- package/dist/util/sortUtil.js.map +1 -1
- package/dist/util/stringUtils.js.map +1 -1
- package/dist/util/urlFilterUtil.js.map +1 -1
- package/package.json +1 -1
- package/src/apis/hcApi.ts +109 -109
- package/src/clientToken.js +9 -9
- package/src/components/containers/accordions/filter-container.js +48 -48
- package/src/components/containers/accordions/map-accordion-item-container.js +70 -70
- package/src/components/containers/jobListing/listing-details-container.js +40 -40
- package/src/components/containers/list/list-item/list-item-container.js +43 -43
- package/src/components/containers/maps/map-container.js +249 -249
- package/src/components/modules/accordions/MapAccordionItem.js +30 -30
- package/src/components/modules/accordions/default.js +171 -171
- package/src/components/modules/buttons/commute-pill.js +22 -22
- package/src/components/modules/buttons/default.js +194 -194
- package/src/components/modules/buttons/items-pill.js +35 -35
- package/src/components/modules/buttons/pill-wrapper.js +27 -27
- package/src/components/modules/buttons/show-all-button.js +19 -19
- package/src/components/modules/cards/default.js +167 -167
- package/src/components/modules/cards/filter.js +56 -56
- package/src/components/modules/filter/item.js +69 -69
- package/src/components/modules/filter/sort.js +83 -83
- package/src/components/modules/grid.js +54 -54
- package/src/components/modules/icon.js +33 -33
- package/src/components/modules/list/header.js +51 -51
- package/src/components/modules/list/item-expand-card/recruiter-contact-nav.js +50 -50
- package/src/components/modules/list/item-expand-card/recruiter-details.js +68 -68
- package/src/components/modules/list/item-expand-card/recruiter-headshot.js +22 -22
- package/src/components/modules/maps/info-window-card.js +17 -17
- package/src/components/modules/maps/map.js +64 -64
- package/src/components/modules/maps/place-marker.js +41 -41
- package/src/components/modules/maps/tabs.js +81 -81
- package/src/constants/placeTypes.js +8 -8
- package/src/contexts/trackEventContext.js +14 -14
- package/src/enums/SectionType.ts +9 -9
- package/src/hooks/useList.js +89 -89
- package/src/index.js +3 -3
- package/src/services/googlePlacesNearbyService.ts +42 -42
- package/src/services/listingAggregatorService.ts +76 -76
- package/src/util/arrayUtil.js +3 -3
- package/src/util/fieldMapper.js +22 -22
- package/src/util/filterUtil.js +311 -310
- package/src/util/loading.js +17 -17
- package/src/util/localStorageUtil.ts +34 -34
- package/src/util/sortUtil.js +32 -32
- package/src/util/stringUtils.js +6 -6
- package/src/util/urlFilterUtil.js +85 -85
- package/dist/types/contexts/themeContext.d.ts +0 -11
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
|
-
const RecruiterHeadshot = ({
|
|
4
|
-
image,
|
|
5
|
-
alt,
|
|
6
|
-
className,
|
|
7
|
-
imageClassName
|
|
8
|
-
}) => {
|
|
9
|
-
return (
|
|
10
|
-
<div className={className ?? ''}>
|
|
11
|
-
<img
|
|
12
|
-
src={image}
|
|
13
|
-
width="96"
|
|
14
|
-
height="96"
|
|
15
|
-
alt={alt}
|
|
16
|
-
className={imageClassName ?? ''}
|
|
17
|
-
/>
|
|
18
|
-
</div>
|
|
19
|
-
);
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
export default RecruiterHeadshot;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
const RecruiterHeadshot = ({
|
|
4
|
+
image,
|
|
5
|
+
alt,
|
|
6
|
+
className,
|
|
7
|
+
imageClassName
|
|
8
|
+
}) => {
|
|
9
|
+
return (
|
|
10
|
+
<div className={className ?? ''}>
|
|
11
|
+
<img
|
|
12
|
+
src={image}
|
|
13
|
+
width="96"
|
|
14
|
+
height="96"
|
|
15
|
+
alt={alt}
|
|
16
|
+
className={imageClassName ?? ''}
|
|
17
|
+
/>
|
|
18
|
+
</div>
|
|
19
|
+
);
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export default RecruiterHeadshot;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
|
-
const CardInfoWindow = ({ className, content, id }) => {
|
|
4
|
-
return (
|
|
5
|
-
<div
|
|
6
|
-
id={id}
|
|
7
|
-
className={`
|
|
8
|
-
hc-relative hc-flex hc-flex-col hc-break-words hc-bg-clip-border
|
|
9
|
-
${className ?? ""}
|
|
10
|
-
`}
|
|
11
|
-
>
|
|
12
|
-
{content}
|
|
13
|
-
</div>
|
|
14
|
-
);
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
export default CardInfoWindow;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
const CardInfoWindow = ({ className, content, id }) => {
|
|
4
|
+
return (
|
|
5
|
+
<div
|
|
6
|
+
id={id}
|
|
7
|
+
className={`
|
|
8
|
+
hc-relative hc-flex hc-flex-col hc-break-words hc-bg-clip-border
|
|
9
|
+
${className ?? ""}
|
|
10
|
+
`}
|
|
11
|
+
>
|
|
12
|
+
{content}
|
|
13
|
+
</div>
|
|
14
|
+
);
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export default CardInfoWindow;
|
|
@@ -1,64 +1,64 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { GoogleMap } from "@react-google-maps/api";
|
|
3
|
-
import ShowAllButton from "~/components/modules/buttons/show-all-button";
|
|
4
|
-
|
|
5
|
-
const Map = ({
|
|
6
|
-
zoom,
|
|
7
|
-
center,
|
|
8
|
-
mapContainerRef,
|
|
9
|
-
onLoad,
|
|
10
|
-
onIdle,
|
|
11
|
-
mapInteracted,
|
|
12
|
-
pinIconUrl,
|
|
13
|
-
setMapInteracted,
|
|
14
|
-
fitBounds,
|
|
15
|
-
mapRef,
|
|
16
|
-
setQuery,
|
|
17
|
-
filteredListingsLength,
|
|
18
|
-
setSelectedFilters,
|
|
19
|
-
children
|
|
20
|
-
}) => {
|
|
21
|
-
return (
|
|
22
|
-
<>
|
|
23
|
-
{zoom && center && (
|
|
24
|
-
<div ref={mapContainerRef} className="hc-h-full hc-relative">
|
|
25
|
-
<GoogleMap
|
|
26
|
-
zoom={zoom}
|
|
27
|
-
onLoad={onLoad}
|
|
28
|
-
onIdle={onIdle}
|
|
29
|
-
center={center}
|
|
30
|
-
mapContainerStyle={{
|
|
31
|
-
width: "100%",
|
|
32
|
-
height: "100%"
|
|
33
|
-
}}
|
|
34
|
-
options={{
|
|
35
|
-
styles: [
|
|
36
|
-
{
|
|
37
|
-
featureType: "poi",
|
|
38
|
-
elementType: "labels",
|
|
39
|
-
stylers: [{ visibility: "off" }]
|
|
40
|
-
}
|
|
41
|
-
]
|
|
42
|
-
}}
|
|
43
|
-
>
|
|
44
|
-
{children}
|
|
45
|
-
</GoogleMap>
|
|
46
|
-
{mapInteracted && (
|
|
47
|
-
<ShowAllButton
|
|
48
|
-
mapInteracted={mapInteracted}
|
|
49
|
-
setMapInteracted={setMapInteracted}
|
|
50
|
-
fitBounds={fitBounds}
|
|
51
|
-
mapRef={mapRef}
|
|
52
|
-
pinIconUrl={pinIconUrl}
|
|
53
|
-
setQuery={setQuery}
|
|
54
|
-
listingCount={filteredListingsLength}
|
|
55
|
-
setSelectedFilters={setSelectedFilters}
|
|
56
|
-
/>
|
|
57
|
-
)}
|
|
58
|
-
</div>
|
|
59
|
-
)}
|
|
60
|
-
</>
|
|
61
|
-
);
|
|
62
|
-
};
|
|
63
|
-
|
|
64
|
-
export default Map;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { GoogleMap } from "@react-google-maps/api";
|
|
3
|
+
import ShowAllButton from "~/components/modules/buttons/show-all-button";
|
|
4
|
+
|
|
5
|
+
const Map = ({
|
|
6
|
+
zoom,
|
|
7
|
+
center,
|
|
8
|
+
mapContainerRef,
|
|
9
|
+
onLoad,
|
|
10
|
+
onIdle,
|
|
11
|
+
mapInteracted,
|
|
12
|
+
pinIconUrl,
|
|
13
|
+
setMapInteracted,
|
|
14
|
+
fitBounds,
|
|
15
|
+
mapRef,
|
|
16
|
+
setQuery,
|
|
17
|
+
filteredListingsLength,
|
|
18
|
+
setSelectedFilters,
|
|
19
|
+
children
|
|
20
|
+
}) => {
|
|
21
|
+
return (
|
|
22
|
+
<>
|
|
23
|
+
{zoom && center && (
|
|
24
|
+
<div ref={mapContainerRef} className="hc-h-full hc-relative">
|
|
25
|
+
<GoogleMap
|
|
26
|
+
zoom={zoom}
|
|
27
|
+
onLoad={onLoad}
|
|
28
|
+
onIdle={onIdle}
|
|
29
|
+
center={center}
|
|
30
|
+
mapContainerStyle={{
|
|
31
|
+
width: "100%",
|
|
32
|
+
height: "100%"
|
|
33
|
+
}}
|
|
34
|
+
options={{
|
|
35
|
+
styles: [
|
|
36
|
+
{
|
|
37
|
+
featureType: "poi",
|
|
38
|
+
elementType: "labels",
|
|
39
|
+
stylers: [{ visibility: "off" }]
|
|
40
|
+
}
|
|
41
|
+
]
|
|
42
|
+
}}
|
|
43
|
+
>
|
|
44
|
+
{children}
|
|
45
|
+
</GoogleMap>
|
|
46
|
+
{mapInteracted && (
|
|
47
|
+
<ShowAllButton
|
|
48
|
+
mapInteracted={mapInteracted}
|
|
49
|
+
setMapInteracted={setMapInteracted}
|
|
50
|
+
fitBounds={fitBounds}
|
|
51
|
+
mapRef={mapRef}
|
|
52
|
+
pinIconUrl={pinIconUrl}
|
|
53
|
+
setQuery={setQuery}
|
|
54
|
+
listingCount={filteredListingsLength}
|
|
55
|
+
setSelectedFilters={setSelectedFilters}
|
|
56
|
+
/>
|
|
57
|
+
)}
|
|
58
|
+
</div>
|
|
59
|
+
)}
|
|
60
|
+
</>
|
|
61
|
+
);
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
export default Map;
|
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Marker, InfoWindowF } from '@react-google-maps/api';
|
|
3
|
-
|
|
4
|
-
const PlaceMarker = ({
|
|
5
|
-
marker,
|
|
6
|
-
index,
|
|
7
|
-
selectedPlaceMarker,
|
|
8
|
-
setSelectedPlaceMarker,
|
|
9
|
-
placesWindow,
|
|
10
|
-
setPlacesWindow
|
|
11
|
-
}) => {
|
|
12
|
-
const markerKey = `marker-${marker.title}-${index}`;
|
|
13
|
-
|
|
14
|
-
const placeMarkerClickHandler = () => {
|
|
15
|
-
setSelectedPlaceMarker(markerKey);
|
|
16
|
-
setPlacesWindow(true);
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
return (
|
|
20
|
-
<Marker
|
|
21
|
-
key={markerKey}
|
|
22
|
-
position={marker.position}
|
|
23
|
-
title={marker.title}
|
|
24
|
-
icon={marker.icon}
|
|
25
|
-
options={{ optimized: false }}
|
|
26
|
-
onClick={placeMarkerClickHandler}
|
|
27
|
-
>
|
|
28
|
-
{selectedPlaceMarker === markerKey && placesWindow && marker && (
|
|
29
|
-
<InfoWindowF
|
|
30
|
-
position={marker.position}
|
|
31
|
-
onCloseClick={() => setPlacesWindow(false)}
|
|
32
|
-
options={{ maxWidth: 400 }}
|
|
33
|
-
>
|
|
34
|
-
<div>{marker.title}</div>
|
|
35
|
-
</InfoWindowF>
|
|
36
|
-
)}
|
|
37
|
-
</Marker>
|
|
38
|
-
);
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
export default PlaceMarker;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Marker, InfoWindowF } from '@react-google-maps/api';
|
|
3
|
+
|
|
4
|
+
const PlaceMarker = ({
|
|
5
|
+
marker,
|
|
6
|
+
index,
|
|
7
|
+
selectedPlaceMarker,
|
|
8
|
+
setSelectedPlaceMarker,
|
|
9
|
+
placesWindow,
|
|
10
|
+
setPlacesWindow
|
|
11
|
+
}) => {
|
|
12
|
+
const markerKey = `marker-${marker.title}-${index}`;
|
|
13
|
+
|
|
14
|
+
const placeMarkerClickHandler = () => {
|
|
15
|
+
setSelectedPlaceMarker(markerKey);
|
|
16
|
+
setPlacesWindow(true);
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
return (
|
|
20
|
+
<Marker
|
|
21
|
+
key={markerKey}
|
|
22
|
+
position={marker.position}
|
|
23
|
+
title={marker.title}
|
|
24
|
+
icon={marker.icon}
|
|
25
|
+
options={{ optimized: false }}
|
|
26
|
+
onClick={placeMarkerClickHandler}
|
|
27
|
+
>
|
|
28
|
+
{selectedPlaceMarker === markerKey && placesWindow && marker && (
|
|
29
|
+
<InfoWindowF
|
|
30
|
+
position={marker.position}
|
|
31
|
+
onCloseClick={() => setPlacesWindow(false)}
|
|
32
|
+
options={{ maxWidth: 400 }}
|
|
33
|
+
>
|
|
34
|
+
<div>{marker.title}</div>
|
|
35
|
+
</InfoWindowF>
|
|
36
|
+
)}
|
|
37
|
+
</Marker>
|
|
38
|
+
);
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
export default PlaceMarker;
|
|
@@ -1,81 +1,81 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import * as Tabs from '@radix-ui/react-tabs';
|
|
3
|
-
|
|
4
|
-
import Button from '~/components/modules/buttons/default';
|
|
5
|
-
|
|
6
|
-
import { useMapList } from '~/contexts/mapListContext';
|
|
7
|
-
|
|
8
|
-
const MapTabs = ({
|
|
9
|
-
map,
|
|
10
|
-
list,
|
|
11
|
-
filter,
|
|
12
|
-
className,
|
|
13
|
-
showMap
|
|
14
|
-
}) => {
|
|
15
|
-
const tabButtonClasses =
|
|
16
|
-
"hc-flex hc-items-center hc-gap-2 hc-rounded-none hc-border-x-0 data-[state=active]:hc-bg-primary data-[state=active]:hc-text-white";
|
|
17
|
-
const { mobileTab, setMobileTab } = useMapList();
|
|
18
|
-
return (
|
|
19
|
-
<div
|
|
20
|
-
className={`
|
|
21
|
-
hc-relative hc-overflow-hidden
|
|
22
|
-
${className ?? ""}
|
|
23
|
-
`}
|
|
24
|
-
>
|
|
25
|
-
<Tabs.Root
|
|
26
|
-
className="hc-flex hc-flex-col hc-h-screen hc-min-h-screen"
|
|
27
|
-
//defaultValue="listTab"
|
|
28
|
-
value={mobileTab}
|
|
29
|
-
>
|
|
30
|
-
<Tabs.List
|
|
31
|
-
className="hc-w-full hc-shrink-0 hc-flex hc-divide-x hc-divide-primary"
|
|
32
|
-
aria-label="Review positions"
|
|
33
|
-
>
|
|
34
|
-
<Tabs.Trigger value="listTab" asChild onClick={() => setMobileTab("listTab")}>
|
|
35
|
-
<Button.Btn variant="outline" isBlock className={tabButtonClasses}>
|
|
36
|
-
<Button.Body className="hc-justify-center">
|
|
37
|
-
<Button.Icon icon="mdi:view-list" size="hc-size-5" />
|
|
38
|
-
List
|
|
39
|
-
</Button.Body>
|
|
40
|
-
</Button.Btn>
|
|
41
|
-
</Tabs.Trigger>
|
|
42
|
-
{showMap && (
|
|
43
|
-
<Tabs.Trigger value="mapTab" asChild onClick={() => setMobileTab("mapTab")}>
|
|
44
|
-
<Button.Btn
|
|
45
|
-
variant="outline"
|
|
46
|
-
isBlock
|
|
47
|
-
className={tabButtonClasses}
|
|
48
|
-
>
|
|
49
|
-
<Button.Body className="hc-justify-center">
|
|
50
|
-
<Button.Icon icon="mdi:map" size="hc-size-5" />
|
|
51
|
-
Map
|
|
52
|
-
</Button.Body>
|
|
53
|
-
</Button.Btn>
|
|
54
|
-
</Tabs.Trigger>
|
|
55
|
-
)}
|
|
56
|
-
<Tabs.Trigger value="filterTab" asChild onClick={() => setMobileTab("filterTab")}>
|
|
57
|
-
<Button.Btn variant="outline" isBlock className={tabButtonClasses}>
|
|
58
|
-
<Button.Body className="hc-justify-center">
|
|
59
|
-
<Button.Icon icon="fluent:search-12-filled" size="hc-size-5" />
|
|
60
|
-
Filter
|
|
61
|
-
</Button.Body>
|
|
62
|
-
</Button.Btn>
|
|
63
|
-
</Tabs.Trigger>
|
|
64
|
-
</Tabs.List>
|
|
65
|
-
<Tabs.Content className="hc-grow hc-bg-white hc-outline-none" value="listTab">
|
|
66
|
-
{list}
|
|
67
|
-
</Tabs.Content>
|
|
68
|
-
{showMap && (
|
|
69
|
-
<Tabs.Content className="hc-grow hc-bg-white hc-outline-none" value="mapTab">
|
|
70
|
-
{map}
|
|
71
|
-
</Tabs.Content>
|
|
72
|
-
)}
|
|
73
|
-
<Tabs.Content className="hc-grow hc-bg-white hc-outline-none hc-p-2" value="filterTab">
|
|
74
|
-
{filter}
|
|
75
|
-
</Tabs.Content>
|
|
76
|
-
</Tabs.Root>
|
|
77
|
-
</div>
|
|
78
|
-
);
|
|
79
|
-
};
|
|
80
|
-
|
|
81
|
-
export default MapTabs;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import * as Tabs from '@radix-ui/react-tabs';
|
|
3
|
+
|
|
4
|
+
import Button from '~/components/modules/buttons/default';
|
|
5
|
+
|
|
6
|
+
import { useMapList } from '~/contexts/mapListContext';
|
|
7
|
+
|
|
8
|
+
const MapTabs = ({
|
|
9
|
+
map,
|
|
10
|
+
list,
|
|
11
|
+
filter,
|
|
12
|
+
className,
|
|
13
|
+
showMap
|
|
14
|
+
}) => {
|
|
15
|
+
const tabButtonClasses =
|
|
16
|
+
"hc-flex hc-items-center hc-gap-2 hc-rounded-none hc-border-x-0 data-[state=active]:hc-bg-primary data-[state=active]:hc-text-white";
|
|
17
|
+
const { mobileTab, setMobileTab } = useMapList();
|
|
18
|
+
return (
|
|
19
|
+
<div
|
|
20
|
+
className={`
|
|
21
|
+
hc-relative hc-overflow-hidden
|
|
22
|
+
${className ?? ""}
|
|
23
|
+
`}
|
|
24
|
+
>
|
|
25
|
+
<Tabs.Root
|
|
26
|
+
className="hc-flex hc-flex-col hc-h-screen hc-min-h-screen"
|
|
27
|
+
//defaultValue="listTab"
|
|
28
|
+
value={mobileTab}
|
|
29
|
+
>
|
|
30
|
+
<Tabs.List
|
|
31
|
+
className="hc-w-full hc-shrink-0 hc-flex hc-divide-x hc-divide-primary"
|
|
32
|
+
aria-label="Review positions"
|
|
33
|
+
>
|
|
34
|
+
<Tabs.Trigger value="listTab" asChild onClick={() => setMobileTab("listTab")}>
|
|
35
|
+
<Button.Btn variant="outline" isBlock className={tabButtonClasses}>
|
|
36
|
+
<Button.Body className="hc-justify-center">
|
|
37
|
+
<Button.Icon icon="mdi:view-list" size="hc-size-5" />
|
|
38
|
+
List
|
|
39
|
+
</Button.Body>
|
|
40
|
+
</Button.Btn>
|
|
41
|
+
</Tabs.Trigger>
|
|
42
|
+
{showMap && (
|
|
43
|
+
<Tabs.Trigger value="mapTab" asChild onClick={() => setMobileTab("mapTab")}>
|
|
44
|
+
<Button.Btn
|
|
45
|
+
variant="outline"
|
|
46
|
+
isBlock
|
|
47
|
+
className={tabButtonClasses}
|
|
48
|
+
>
|
|
49
|
+
<Button.Body className="hc-justify-center">
|
|
50
|
+
<Button.Icon icon="mdi:map" size="hc-size-5" />
|
|
51
|
+
Map
|
|
52
|
+
</Button.Body>
|
|
53
|
+
</Button.Btn>
|
|
54
|
+
</Tabs.Trigger>
|
|
55
|
+
)}
|
|
56
|
+
<Tabs.Trigger value="filterTab" asChild onClick={() => setMobileTab("filterTab")}>
|
|
57
|
+
<Button.Btn variant="outline" isBlock className={tabButtonClasses}>
|
|
58
|
+
<Button.Body className="hc-justify-center">
|
|
59
|
+
<Button.Icon icon="fluent:search-12-filled" size="hc-size-5" />
|
|
60
|
+
Filter
|
|
61
|
+
</Button.Body>
|
|
62
|
+
</Button.Btn>
|
|
63
|
+
</Tabs.Trigger>
|
|
64
|
+
</Tabs.List>
|
|
65
|
+
<Tabs.Content className="hc-grow hc-bg-white hc-outline-none" value="listTab">
|
|
66
|
+
{list}
|
|
67
|
+
</Tabs.Content>
|
|
68
|
+
{showMap && (
|
|
69
|
+
<Tabs.Content className="hc-grow hc-bg-white hc-outline-none" value="mapTab">
|
|
70
|
+
{map}
|
|
71
|
+
</Tabs.Content>
|
|
72
|
+
)}
|
|
73
|
+
<Tabs.Content className="hc-grow hc-bg-white hc-outline-none hc-p-2" value="filterTab">
|
|
74
|
+
{filter}
|
|
75
|
+
</Tabs.Content>
|
|
76
|
+
</Tabs.Root>
|
|
77
|
+
</div>
|
|
78
|
+
);
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
export default MapTabs;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export const placeTypes = {
|
|
2
|
-
FOOD: "food",
|
|
3
|
-
STORE: "shopping",
|
|
4
|
-
TOURIST_ATTRACTION: "attractions",
|
|
5
|
-
TRANSIT_STATION: "transit",
|
|
6
|
-
SCHOOL: "schools",
|
|
7
|
-
PLACE_OF_WORSHIP: "worship"
|
|
8
|
-
};
|
|
1
|
+
export const placeTypes = {
|
|
2
|
+
FOOD: "food",
|
|
3
|
+
STORE: "shopping",
|
|
4
|
+
TOURIST_ATTRACTION: "attractions",
|
|
5
|
+
TRANSIT_STATION: "transit",
|
|
6
|
+
SCHOOL: "schools",
|
|
7
|
+
PLACE_OF_WORSHIP: "worship"
|
|
8
|
+
};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import React, { createContext, useContext } from 'react';
|
|
2
|
-
import { eventTypes } from '~/constants/eventTypes';
|
|
3
|
-
|
|
4
|
-
const TrackEventContext = createContext();
|
|
5
|
-
|
|
6
|
-
export const useTrackEvent = () => useContext(TrackEventContext);
|
|
7
|
-
|
|
8
|
-
export const TrackEventProvider = ({ children, trackEvent }) => {
|
|
9
|
-
return (
|
|
10
|
-
<TrackEventContext.Provider value={{ trackEvent, eventTypes }}>
|
|
11
|
-
{children}
|
|
12
|
-
</TrackEventContext.Provider>
|
|
13
|
-
);
|
|
14
|
-
};
|
|
1
|
+
import React, { createContext, useContext } from 'react';
|
|
2
|
+
import { eventTypes } from '~/constants/eventTypes';
|
|
3
|
+
|
|
4
|
+
const TrackEventContext = createContext();
|
|
5
|
+
|
|
6
|
+
export const useTrackEvent = () => useContext(TrackEventContext);
|
|
7
|
+
|
|
8
|
+
export const TrackEventProvider = ({ children, trackEvent }) => {
|
|
9
|
+
return (
|
|
10
|
+
<TrackEventContext.Provider value={{ trackEvent, eventTypes }}>
|
|
11
|
+
{children}
|
|
12
|
+
</TrackEventContext.Provider>
|
|
13
|
+
);
|
|
14
|
+
};
|
package/src/enums/SectionType.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export enum SectionType {
|
|
2
|
-
Default = -1,
|
|
3
|
-
Company = 1,
|
|
4
|
-
Category = 2,
|
|
5
|
-
CategoryClass = 3,
|
|
6
|
-
Entity = 4,
|
|
7
|
-
CustomVar = 5,
|
|
8
|
-
REGION = 7
|
|
9
|
-
}
|
|
1
|
+
export enum SectionType {
|
|
2
|
+
Default = -1,
|
|
3
|
+
Company = 1,
|
|
4
|
+
Category = 2,
|
|
5
|
+
CategoryClass = 3,
|
|
6
|
+
Entity = 4,
|
|
7
|
+
CustomVar = 5,
|
|
8
|
+
REGION = 7
|
|
9
|
+
}
|