@abcagency/hc-ui-components 1.3.21 → 1.3.22
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/{bundle.js → bundleDist/bundle.js} +30 -19
- package/bundleDist/bundle.js.map +1 -0
- package/bundleDist/dist/styles/index.css +3 -0
- package/bundleDist/dist/types/apis/hcApi.d.ts +5 -0
- package/bundleDist/dist/types/clientToken.d.ts +2 -0
- package/bundleDist/dist/types/components/containers/accordions/map-accordion-item-container.d.ts +12 -0
- package/bundleDist/dist/types/components/containers/jobListing/listing-details-container.d.ts +6 -0
- package/bundleDist/dist/types/components/containers/list/item-list-container.d.ts +9 -0
- package/bundleDist/dist/types/components/containers/list/list-item/list-item-container.d.ts +14 -0
- package/bundleDist/dist/types/components/modules/accordions/MapAccordionItem.d.ts +10 -0
- package/bundleDist/dist/types/components/modules/accordions/default.d.ts +19 -0
- package/bundleDist/dist/types/components/modules/buttons/button-group-apply.d.ts +24 -0
- package/bundleDist/dist/types/components/modules/buttons/commute-pill.d.ts +5 -0
- package/bundleDist/dist/types/components/modules/buttons/default.d.ts +48 -0
- package/bundleDist/dist/types/components/modules/buttons/pill-wrapper.d.ts +3 -0
- package/bundleDist/dist/types/components/modules/dialogs/apply-dialog.d.ts +8 -0
- package/bundleDist/dist/types/components/modules/filter/sort.d.ts +8 -0
- package/bundleDist/dist/types/components/modules/grid.d.ts +8 -0
- package/bundleDist/dist/types/components/modules/icon.d.ts +10 -0
- package/bundleDist/dist/types/components/modules/jobListing/listing-details.d.ts +18 -0
- package/bundleDist/dist/types/components/modules/list/field-mapper.d.ts +10 -0
- package/bundleDist/dist/types/components/modules/list/header-item.d.ts +11 -0
- package/bundleDist/dist/types/components/modules/list/header.d.ts +11 -0
- package/bundleDist/dist/types/components/modules/list/item-expand-card/index.d.ts +7 -0
- package/bundleDist/dist/types/components/modules/list/item-expand-card/recruiter-contact-nav.d.ts +17 -0
- package/bundleDist/dist/types/components/modules/list/item-expand-card/recruiter-details.d.ts +21 -0
- package/bundleDist/dist/types/components/modules/list/item-expand-card/recruiter-headshot.d.ts +8 -0
- package/bundleDist/dist/types/components/modules/list/item-list.d.ts +20 -0
- package/bundleDist/dist/types/components/modules/list/list-item/list-item.d.ts +3 -0
- package/bundleDist/dist/types/constants/eventTypes.d.ts +13 -0
- package/bundleDist/dist/types/contexts/mapContext.d.ts +29 -0
- package/bundleDist/dist/types/contexts/mapListContext.d.ts +59 -0
- package/bundleDist/dist/types/contexts/trackEventContext.d.ts +6 -0
- package/bundleDist/dist/types/enums/SectionType.d.ts +9 -0
- package/bundleDist/dist/types/hooks/useList.d.ts +13 -0
- package/bundleDist/dist/types/services/configService.d.ts +6 -0
- package/bundleDist/dist/types/services/googlePlacesNearbyService.d.ts +5 -0
- package/bundleDist/dist/types/services/listingAggregatorService.d.ts +12 -0
- package/bundleDist/dist/types/services/listingEntityService.d.ts +6 -0
- package/bundleDist/dist/types/services/listingService.d.ts +9 -0
- package/bundleDist/dist/types/services/recruiterService.d.ts +6 -0
- package/bundleDist/dist/types/types/Address.d.ts +7 -0
- package/bundleDist/dist/types/types/ContentSection.d.ts +8 -0
- package/bundleDist/dist/types/types/GetListingParams.d.ts +8 -0
- package/bundleDist/dist/types/types/LatLng.d.ts +4 -0
- package/bundleDist/dist/types/types/ListingEntity.d.ts +10 -0
- package/bundleDist/dist/types/types/ListingFields.d.ts +25 -0
- package/bundleDist/dist/types/types/Listings.d.ts +31 -0
- package/bundleDist/dist/types/types/Recruiter.d.ts +9 -0
- package/bundleDist/dist/types/types/SimilarListing.d.ts +24 -0
- package/bundleDist/dist/types/types/config/Colors.d.ts +8 -0
- package/bundleDist/dist/types/types/config/MapConfig.d.ts +30 -0
- package/bundleDist/dist/types/types/config/PointsOfInterestConfig.d.ts +13 -0
- package/bundleDist/dist/types/types/config/SearchConfig.d.ts +4 -0
- package/bundleDist/dist/types/util/filterUtil.d.ts +28 -0
- package/bundleDist/dist/types/util/loading.d.ts +3 -0
- package/bundleDist/dist/types/util/localStorageUtil.d.ts +3 -0
- package/bundleDist/dist/types/util/mapUtil.d.ts +15 -0
- package/bundleDist/dist/types/util/sortUtil.d.ts +1 -0
- package/bundleDist/dist/types/util/stringUtils.d.ts +1 -0
- package/bundleDist/dist/types/util/urlFilterUtil.d.ts +8 -0
- package/bundleDist/styles/index.css +3 -0
- package/dist/components/containers/accordions/filter-container.js +4 -2
- package/dist/components/containers/accordions/filter-container.js.map +1 -1
- package/dist/components/containers/accordions/filter-item-container.js +6 -1
- package/dist/components/containers/accordions/filter-item-container.js.map +1 -1
- package/dist/components/containers/accordions/map-accordion-item-container.js +4 -2
- package/dist/components/containers/accordions/map-accordion-item-container.js.map +1 -1
- package/dist/components/containers/jobListing/listing-details-container.js +2 -2
- package/dist/components/containers/jobListing/listing-details-container.js.map +1 -1
- package/dist/components/containers/list/item-list-container.js +2 -2
- package/dist/components/containers/list/item-list-container.js.map +1 -1
- package/dist/components/modules/accordions/MapAccordionItem.js +2 -1
- package/dist/components/modules/accordions/MapAccordionItem.js.map +1 -1
- package/dist/components/modules/dialogs/apply-dialog.js +1 -1
- package/dist/components/modules/dialogs/apply-dialog.js.map +1 -1
- package/dist/components/modules/filter/search.js +1 -1
- package/dist/components/modules/filter/search.js.map +1 -1
- package/dist/components/modules/jobListing/listing-details.js +5 -4
- package/dist/components/modules/jobListing/listing-details.js.map +1 -1
- package/dist/components/modules/list/field-mapper.js +1 -1
- package/dist/components/modules/list/field-mapper.js.map +1 -1
- package/dist/components/modules/list/item-list.js.map +1 -1
- package/dist/contexts/mapListContext.js.map +1 -1
- package/dist/services/listingAggregatorService.js.map +1 -1
- package/dist/styles/index.css +3 -1
- package/dist/types/components/containers/jobListing/listing-details-container.d.ts +2 -2
- package/dist/types/components/modules/accordions/MapAccordionItem.d.ts +2 -1
- package/dist/types/components/modules/jobListing/listing-details.d.ts +2 -2
- package/dist/types/components/modules/list/item-list.d.ts +0 -1
- package/dist/types/types/ListingFields.d.ts +5 -0
- package/dist/types/types/config/MapConfig.d.ts +1 -0
- package/dist/util/filterUtil.js +2 -2
- package/dist/util/filterUtil.js.map +1 -1
- package/package.json +1 -1
- package/postcss.config.js +5 -4
- package/rollup.config.mjs +1 -1
- package/src/components/containers/accordions/filter-container.js +2 -1
- package/src/components/containers/accordions/filter-item-container.js +66 -62
- package/src/components/containers/accordions/map-accordion-item-container.js +70 -70
- package/src/components/containers/jobListing/listing-details-container.js +2 -2
- package/src/components/containers/list/item-list-container.tsx +2 -3
- package/src/components/modules/accordions/MapAccordionItem.js +30 -29
- package/src/components/modules/dialogs/apply-dialog.js +48 -48
- package/src/components/modules/filter/search.js +1 -1
- package/src/components/modules/jobListing/listing-details.js +5 -5
- package/src/components/modules/list/field-mapper.js +1 -1
- package/src/components/modules/list/item-list.tsx +0 -1
- package/src/contexts/mapListContext.tsx +311 -311
- package/src/services/listingAggregatorService.ts +76 -76
- package/src/styles/index.css +14 -115
- package/src/types/ListingFields.ts +5 -0
- package/src/types/config/MapConfig.ts +1 -0
- package/src/util/filterUtil.js +239 -239
- package/stats.html +1 -1
- package/tailwind.config.js +4 -4
- package/bundle.js.map +0 -1
- package/dist/node_modules/@babel/runtime/helpers/esm/extends.js +0 -12
- package/dist/node_modules/@babel/runtime/helpers/esm/extends.js.map +0 -1
- package/styles/index.css +0 -1
|
@@ -1,76 +1,76 @@
|
|
|
1
|
-
import { getListings } from '~/services/listingService';
|
|
2
|
-
import { getRecruiters } from '~/services/recruiterService';
|
|
3
|
-
import { getListingEntities } from '~/services/listingEntityService';
|
|
4
|
-
|
|
5
|
-
import { getDistinctItemsByProximity } from '~/util/mapUtil';
|
|
6
|
-
import { Listing } from '~/types/Listings';
|
|
7
|
-
import { Recruiter } from '~/types/Recruiter';
|
|
8
|
-
import { ListingEntity } from '~/types/ListingEntity';
|
|
9
|
-
import { MapConfig } from '~/types/config/MapConfig';
|
|
10
|
-
//import { ICommuteLocation } from '~/interfaces/ICommute';
|
|
11
|
-
|
|
12
|
-
interface SiteConfig {
|
|
13
|
-
companyId: number;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
interface FetchListingsResult {
|
|
17
|
-
listingsResult: Listing[];
|
|
18
|
-
fetchedRecruiters: Recruiter[];
|
|
19
|
-
fetchedEntities: Record<number, ListingEntity>;
|
|
20
|
-
distinctItems: any; // Update this type based on the return type of getDistinctItemsByProximity
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
const fetchListings = async (
|
|
24
|
-
query: string,
|
|
25
|
-
siteConfig: MapConfig,
|
|
26
|
-
commuteLocation: any | null = null
|
|
27
|
-
): Promise<FetchListingsResult> => {
|
|
28
|
-
try {
|
|
29
|
-
const listingsResult = await getListings(
|
|
30
|
-
|
|
31
|
-
);
|
|
32
|
-
|
|
33
|
-
const recruiterIds: number[] = [
|
|
34
|
-
...new Set(listingsResult.map(listing => listing.recruiterId))
|
|
35
|
-
] as number[];
|
|
36
|
-
|
|
37
|
-
const fetchedRecruiters = await getRecruiters(recruiterIds);
|
|
38
|
-
|
|
39
|
-
const distinctEntityIds: number[] = [
|
|
40
|
-
...new Set(listingsResult.map(listing => listing.entityId))
|
|
41
|
-
] as number[];
|
|
42
|
-
|
|
43
|
-
const fetchedEntities = !commuteLocation
|
|
44
|
-
? await getListingEntities(distinctEntityIds)
|
|
45
|
-
: await getListingEntities(
|
|
46
|
-
distinctEntityIds,
|
|
47
|
-
`${commuteLocation.lat}, ${commuteLocation.lng}`
|
|
48
|
-
);
|
|
49
|
-
for (let i = 0; i < listingsResult.length; i++) {
|
|
50
|
-
const listing = listingsResult[i];
|
|
51
|
-
if (listing.entityId && listing.entityId !== -1 && listing.fields) {
|
|
52
|
-
const entity = fetchedEntities[listing.entityId];
|
|
53
|
-
if (entity) {
|
|
54
|
-
listing.fields.travelTime = entity.travelTime;
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
const distinctItems = getDistinctItemsByProximity(
|
|
60
|
-
listingsResult,
|
|
61
|
-
fetchedEntities
|
|
62
|
-
);
|
|
63
|
-
|
|
64
|
-
return {
|
|
65
|
-
listingsResult,
|
|
66
|
-
fetchedRecruiters,
|
|
67
|
-
fetchedEntities,
|
|
68
|
-
distinctItems
|
|
69
|
-
};
|
|
70
|
-
} catch (error) {
|
|
71
|
-
console.error("Error fetching listings:", error);
|
|
72
|
-
throw error;
|
|
73
|
-
}
|
|
74
|
-
};
|
|
75
|
-
|
|
76
|
-
export default fetchListings;
|
|
1
|
+
import { getListings } from '~/services/listingService';
|
|
2
|
+
import { getRecruiters } from '~/services/recruiterService';
|
|
3
|
+
import { getListingEntities } from '~/services/listingEntityService';
|
|
4
|
+
|
|
5
|
+
import { getDistinctItemsByProximity } from '~/util/mapUtil';
|
|
6
|
+
import { Listing } from '~/types/Listings';
|
|
7
|
+
import { Recruiter } from '~/types/Recruiter';
|
|
8
|
+
import { ListingEntity } from '~/types/ListingEntity';
|
|
9
|
+
import { MapConfig } from '~/types/config/MapConfig';
|
|
10
|
+
//import { ICommuteLocation } from '~/interfaces/ICommute';
|
|
11
|
+
|
|
12
|
+
interface SiteConfig {
|
|
13
|
+
companyId: number;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
interface FetchListingsResult {
|
|
17
|
+
listingsResult: Listing[];
|
|
18
|
+
fetchedRecruiters: Recruiter[];
|
|
19
|
+
fetchedEntities: Record<number, ListingEntity>;
|
|
20
|
+
distinctItems: any; // Update this type based on the return type of getDistinctItemsByProximity
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
const fetchListings = async (
|
|
24
|
+
query: string,
|
|
25
|
+
siteConfig: MapConfig,
|
|
26
|
+
commuteLocation: any | null = null
|
|
27
|
+
): Promise<FetchListingsResult> => {
|
|
28
|
+
try {
|
|
29
|
+
const listingsResult = await getListings(
|
|
30
|
+
|
|
31
|
+
);
|
|
32
|
+
|
|
33
|
+
const recruiterIds: number[] = [
|
|
34
|
+
...new Set(listingsResult.map(listing => listing.recruiterId))
|
|
35
|
+
] as number[];
|
|
36
|
+
|
|
37
|
+
const fetchedRecruiters = await getRecruiters(recruiterIds);
|
|
38
|
+
|
|
39
|
+
const distinctEntityIds: number[] = [
|
|
40
|
+
...new Set(listingsResult.map(listing => listing.entityId))
|
|
41
|
+
] as number[];
|
|
42
|
+
|
|
43
|
+
const fetchedEntities = !commuteLocation
|
|
44
|
+
? await getListingEntities(distinctEntityIds)
|
|
45
|
+
: await getListingEntities(
|
|
46
|
+
distinctEntityIds,
|
|
47
|
+
`${commuteLocation.lat}, ${commuteLocation.lng}`
|
|
48
|
+
);
|
|
49
|
+
for (let i = 0; i < listingsResult.length; i++) {
|
|
50
|
+
const listing = listingsResult[i];
|
|
51
|
+
if (listing.entityId && listing.entityId !== -1 && listing.fields) {
|
|
52
|
+
const entity = fetchedEntities[listing.entityId];
|
|
53
|
+
if (entity) {
|
|
54
|
+
listing.fields.travelTime = entity.travelTime;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
const distinctItems = getDistinctItemsByProximity(
|
|
60
|
+
listingsResult,
|
|
61
|
+
fetchedEntities
|
|
62
|
+
);
|
|
63
|
+
|
|
64
|
+
return {
|
|
65
|
+
listingsResult,
|
|
66
|
+
fetchedRecruiters,
|
|
67
|
+
fetchedEntities,
|
|
68
|
+
distinctItems
|
|
69
|
+
};
|
|
70
|
+
} catch (error) {
|
|
71
|
+
console.error("Error fetching listings:", error);
|
|
72
|
+
throw error;
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
export default fetchListings;
|
package/src/styles/index.css
CHANGED
|
@@ -1,125 +1,24 @@
|
|
|
1
|
+
@config "../../tailwind.config.js";
|
|
1
2
|
@tailwind base;
|
|
2
3
|
@tailwind components;
|
|
3
4
|
@tailwind utilities;
|
|
4
5
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
@layer base {
|
|
7
|
+
html {
|
|
8
|
+
@apply hc-text-400 hc-text-uiText [scroll-behavior:smooth];
|
|
9
|
+
}
|
|
8
10
|
}
|
|
9
11
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
.hc-bundle :host, html, .hc-bundle h4, .hc-bundle h3, .hc-bundle h2, .hc-bundle h1 {
|
|
15
|
-
-webkit-text-size-adjust: 100%;
|
|
16
|
-
font-feature-settings: normal;
|
|
17
|
-
-webkit-tap-highlight-color: transparent;
|
|
18
|
-
font-family: var(--font-roboto-flex),ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";
|
|
19
|
-
font-variation-settings: normal;
|
|
20
|
-
line-height: 1.5;
|
|
21
|
-
-moz-tab-size: 4;
|
|
22
|
-
-o-tab-size: 4;
|
|
23
|
-
tab-size: 4
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
.hc-bundle {
|
|
27
|
-
line-height: inherit;
|
|
28
|
-
margin: 0
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.gmnoprint button > div > img:nth-child(1){
|
|
32
|
-
height:unset;
|
|
33
|
-
position: initial !important;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
.hc-bundle hr {
|
|
37
|
-
border-top-width: 1px;
|
|
38
|
-
color: inherit;
|
|
39
|
-
height: 0
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
.hc-bundle abbr:where([title]) {
|
|
43
|
-
-webkit-text-decoration: underline dotted;
|
|
44
|
-
text-decoration: underline dotted
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
.hc-bundle h1,.hc-bundle h2,.hc-bundle h3,.hc-bundle h4,.hc-bundle h5,.hc-bundle h6 {
|
|
48
|
-
font-size: inherit;
|
|
49
|
-
font-weight: inherit
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
a {
|
|
53
|
-
text-decoration: inherit
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
.hc-bundle b, .hc-bundle strong {
|
|
57
|
-
font-weight: bolder
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
button, input:where([type=button]), input:where([type=reset]), input:where([type=submit]) {
|
|
61
|
-
-webkit-appearance: button;
|
|
62
|
-
background-color: transparent;
|
|
63
|
-
background-image: none
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
progress {
|
|
67
|
-
vertical-align: baseline
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
::-webkit-inner-spin-button, ::-webkit-outer-spin-button {
|
|
71
|
-
height: auto
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
[type=search] {
|
|
75
|
-
-webkit-appearance: textfield;
|
|
76
|
-
outline-offset: -2px
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
::-webkit-search-decoration {
|
|
80
|
-
-webkit-appearance: none
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
::-webkit-file-upload-button {
|
|
84
|
-
-webkit-appearance: button;
|
|
85
|
-
font: inherit
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
summary {
|
|
89
|
-
display: list-item
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
.hc-bundle blockquote,.hc-bundle dd,.hc-bundle dl, .hc-bundle figure,.hc-bundle h1,.hc-bundle h2, h3,.hc-bundle h4,.hc-bundle h5,.hc-bundle h6,.hc-bundle hr, .hc-bundle p,.hc-bundle {
|
|
93
|
-
margin: 0
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
input::-moz-placeholder, textarea::-moz-placeholder {
|
|
98
|
-
color: #9ca3af
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
input::placeholder, textarea::placeholder {
|
|
102
|
-
color: #9ca3af
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
[role=button], button {
|
|
106
|
-
cursor: pointer
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
:disabled {
|
|
110
|
-
cursor: default
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
.hc-bundle audio,.hc-bundle canvas,.hc-bundle embed,.hc-bundle iframe, .hc-bundle img,.hc-bundle object,.hc-bundle svg, .hc-bundle video {
|
|
114
|
-
display: block;
|
|
115
|
-
vertical-align: middle
|
|
116
|
-
}
|
|
12
|
+
@layer components {
|
|
13
|
+
.track * {
|
|
14
|
+
@apply hc-pointer-events-none;
|
|
15
|
+
}
|
|
117
16
|
|
|
118
|
-
.
|
|
119
|
-
|
|
120
|
-
|
|
17
|
+
.stretched-link::after {
|
|
18
|
+
@apply hc-content-[''] hc-absolute hc-inset-0 hc-z-[1] hc-pointer-events-auto hc-bg-transparent;
|
|
19
|
+
}
|
|
121
20
|
}
|
|
122
21
|
|
|
123
|
-
.
|
|
124
|
-
|
|
22
|
+
.fit-content{
|
|
23
|
+
height:fit-content;
|
|
125
24
|
}
|