@abcagency/hc-ui-components 1.3.60 → 1.3.62

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.
Files changed (278) hide show
  1. package/dist/apis/hcApi.js +85 -85
  2. package/dist/apis/hcApi.js.map +1 -1
  3. package/dist/clientToken.js.map +1 -1
  4. package/dist/components/HireControlMap.js +14 -4
  5. package/dist/components/HireControlMap.js.map +1 -1
  6. package/dist/components/containers/accordions/filter-container.js +10 -3
  7. package/dist/components/containers/accordions/filter-container.js.map +1 -1
  8. package/dist/components/containers/accordions/filter-item-container.js.map +1 -1
  9. package/dist/components/containers/accordions/map-accordion-item-container.js.map +1 -1
  10. package/dist/components/containers/filter/commute-container.js +1 -1
  11. package/dist/components/containers/filter/commute-container.js.map +1 -1
  12. package/dist/components/containers/filter/filter-container.js.map +1 -1
  13. package/dist/components/containers/filter/filter-item-container.js.map +1 -1
  14. package/dist/components/containers/filter/location-container.js.map +1 -1
  15. package/dist/components/containers/filter/points-of-interest-container.js.map +1 -1
  16. package/dist/components/containers/filter/points-of-interest-radio-item-container.js.map +1 -1
  17. package/dist/components/containers/filter/search-container.js.map +1 -1
  18. package/dist/components/containers/jobListing/listing-details-container.js.map +1 -1
  19. package/dist/components/containers/list/item-list-container.js +21 -21
  20. package/dist/components/containers/list/item-list-container.js.map +1 -1
  21. package/dist/components/containers/list/list-item/list-item-container.js.map +1 -1
  22. package/dist/components/containers/maps/info-window-content-container.js.map +1 -1
  23. package/dist/components/containers/maps/map-container.js +1 -1
  24. package/dist/components/containers/maps/map-container.js.map +1 -1
  25. package/dist/components/containers/maps/map-list-container.js.map +1 -1
  26. package/dist/components/containers/maps/map-marker-container.js +1 -1
  27. package/dist/components/containers/maps/map-marker-container.js.map +1 -1
  28. package/dist/components/modules/accordions/MapAccordionItem.js.map +1 -1
  29. package/dist/components/modules/accordions/default.js +2 -2
  30. package/dist/components/modules/accordions/default.js.map +1 -1
  31. package/dist/components/modules/accordions/filterItem.js.map +1 -1
  32. package/dist/components/modules/accordions/filters.js.map +1 -1
  33. package/dist/components/modules/buttons/button-group-apply.js +5 -8
  34. package/dist/components/modules/buttons/button-group-apply.js.map +1 -1
  35. package/dist/components/modules/buttons/commute-pill.js.map +1 -1
  36. package/dist/components/modules/buttons/default.js +2 -2
  37. package/dist/components/modules/buttons/default.js.map +1 -1
  38. package/dist/components/modules/buttons/items-pill.js +5 -8
  39. package/dist/components/modules/buttons/items-pill.js.map +1 -1
  40. package/dist/components/modules/buttons/pill-wrapper.js.map +1 -1
  41. package/dist/components/modules/buttons/show-all-button.js.map +1 -1
  42. package/dist/components/modules/cards/default.js +2 -2
  43. package/dist/components/modules/cards/default.js.map +1 -1
  44. package/dist/components/modules/cards/filter.js.map +1 -1
  45. package/dist/components/modules/dialogs/apply-dialog.js +1 -1
  46. package/dist/components/modules/dialogs/apply-dialog.js.map +1 -1
  47. package/dist/components/modules/filter/commute.js +2 -2
  48. package/dist/components/modules/filter/commute.js.map +1 -1
  49. package/dist/components/modules/filter/index.js +1 -1
  50. package/dist/components/modules/filter/index.js.map +1 -1
  51. package/dist/components/modules/filter/item.js.map +1 -1
  52. package/dist/components/modules/filter/location.js.map +1 -1
  53. package/dist/components/modules/filter/radio-item.js.map +1 -1
  54. package/dist/components/modules/filter/search.js.map +1 -1
  55. package/dist/components/modules/filter/sort.js +2 -2
  56. package/dist/components/modules/filter/sort.js.map +1 -1
  57. package/dist/components/modules/grid.js +1 -1
  58. package/dist/components/modules/grid.js.map +1 -1
  59. package/dist/components/modules/icon.js +1 -1
  60. package/dist/components/modules/icon.js.map +1 -1
  61. package/dist/components/modules/jobListing/listing-details.js.map +1 -1
  62. package/dist/components/modules/list/field-mapper.js.map +1 -1
  63. package/dist/components/modules/list/header-item.js.map +1 -1
  64. package/dist/components/modules/list/header.js +1 -1
  65. package/dist/components/modules/list/header.js.map +1 -1
  66. package/dist/components/modules/list/item-expand-card/index.js +1 -1
  67. package/dist/components/modules/list/item-expand-card/index.js.map +1 -1
  68. package/dist/components/modules/list/item-expand-card/recruiter-contact-nav.js +38 -38
  69. package/dist/components/modules/list/item-expand-card/recruiter-details.js +40 -40
  70. package/dist/components/modules/list/item-expand-card/recruiter-headshot.js +20 -20
  71. package/dist/components/modules/list/item-list.js +43 -43
  72. package/dist/components/modules/list/item-list.js.map +1 -1
  73. package/dist/components/modules/list/list-item/list-item.js.map +1 -1
  74. package/dist/components/modules/maps/info-window-card.js.map +1 -1
  75. package/dist/components/modules/maps/info-window-content.js.map +1 -1
  76. package/dist/components/modules/maps/map-list.js.map +1 -1
  77. package/dist/components/modules/maps/map-marker.js +1 -1
  78. package/dist/components/modules/maps/map-marker.js.map +1 -1
  79. package/dist/components/modules/maps/map.js +1 -1
  80. package/dist/components/modules/maps/map.js.map +1 -1
  81. package/dist/components/modules/maps/place-marker.js +1 -1
  82. package/dist/components/modules/maps/place-marker.js.map +1 -1
  83. package/dist/components/modules/maps/tabs.js +1 -1
  84. package/dist/components/modules/maps/tabs.js.map +1 -1
  85. package/dist/constants/eventTypes.js.map +1 -1
  86. package/dist/constants/placeTypes.js.map +1 -1
  87. package/dist/contexts/mapContext.js +83 -83
  88. package/dist/contexts/mapContext.js.map +1 -1
  89. package/dist/contexts/mapListContext.js +211 -192
  90. package/dist/contexts/mapListContext.js.map +1 -1
  91. package/dist/contexts/placesContext.js.map +1 -1
  92. package/dist/contexts/themeContext.js.map +1 -1
  93. package/dist/contexts/trackEventContext.js.map +1 -1
  94. package/dist/hooks/useList.js.map +1 -1
  95. package/dist/services/configService.js +9 -9
  96. package/dist/services/configService.js.map +1 -1
  97. package/dist/services/googlePlacesNearbyService.js +32 -32
  98. package/dist/services/googlePlacesNearbyService.js.map +1 -1
  99. package/dist/services/listingAggregatorService.js +34 -34
  100. package/dist/services/listingAggregatorService.js.map +1 -1
  101. package/dist/services/listingEntityService.js +9 -9
  102. package/dist/services/listingEntityService.js.map +1 -1
  103. package/dist/services/listingService.js +24 -24
  104. package/dist/services/listingService.js.map +1 -1
  105. package/dist/services/recruiterService.js +10 -10
  106. package/dist/services/recruiterService.js.map +1 -1
  107. package/dist/styles/index.css +1 -1
  108. package/dist/types/apis/hcApi.d.ts +5 -5
  109. package/dist/types/clientToken.d.ts +2 -2
  110. package/dist/types/components/containers/accordions/map-accordion-item-container.d.ts +12 -12
  111. package/dist/types/components/containers/jobListing/listing-details-container.d.ts +6 -6
  112. package/dist/types/components/containers/list/item-list-container.d.ts +9 -9
  113. package/dist/types/components/containers/list/list-item/list-item-container.d.ts +14 -14
  114. package/dist/types/components/modules/accordions/MapAccordionItem.d.ts +10 -10
  115. package/dist/types/components/modules/accordions/default.d.ts +19 -19
  116. package/dist/types/components/modules/buttons/button-group-apply.d.ts +24 -24
  117. package/dist/types/components/modules/buttons/commute-pill.d.ts +5 -5
  118. package/dist/types/components/modules/buttons/default.d.ts +48 -48
  119. package/dist/types/components/modules/buttons/pill-wrapper.d.ts +3 -3
  120. package/dist/types/components/modules/dialogs/apply-dialog.d.ts +8 -8
  121. package/dist/types/components/modules/filter/sort.d.ts +8 -8
  122. package/dist/types/components/modules/grid.d.ts +8 -8
  123. package/dist/types/components/modules/icon.d.ts +10 -10
  124. package/dist/types/components/modules/jobListing/listing-details.d.ts +20 -20
  125. package/dist/types/components/modules/list/field-mapper.d.ts +10 -10
  126. package/dist/types/components/modules/list/header-item.d.ts +11 -11
  127. package/dist/types/components/modules/list/header.d.ts +12 -12
  128. package/dist/types/components/modules/list/item-expand-card/index.d.ts +7 -7
  129. package/dist/types/components/modules/list/item-expand-card/recruiter-contact-nav.d.ts +17 -17
  130. package/dist/types/components/modules/list/item-expand-card/recruiter-details.d.ts +21 -21
  131. package/dist/types/components/modules/list/item-expand-card/recruiter-headshot.d.ts +8 -8
  132. package/dist/types/components/modules/list/item-list.d.ts +20 -20
  133. package/dist/types/components/modules/list/list-item/list-item.d.ts +3 -3
  134. package/dist/types/constants/eventTypes.d.ts +15 -15
  135. package/dist/types/contexts/mapContext.d.ts +29 -29
  136. package/dist/types/contexts/mapListContext.d.ts +69 -65
  137. package/dist/types/contexts/trackEventContext.d.ts +6 -6
  138. package/dist/types/enums/SectionType.d.ts +9 -9
  139. package/dist/types/hooks/useList.d.ts +13 -13
  140. package/dist/types/services/configService.d.ts +6 -6
  141. package/dist/types/services/googlePlacesNearbyService.d.ts +5 -5
  142. package/dist/types/services/listingAggregatorService.d.ts +12 -12
  143. package/dist/types/services/listingEntityService.d.ts +6 -6
  144. package/dist/types/services/listingService.d.ts +9 -9
  145. package/dist/types/services/recruiterService.d.ts +6 -6
  146. package/dist/types/types/Address.d.ts +7 -7
  147. package/dist/types/types/ContentSection.d.ts +8 -8
  148. package/dist/types/types/GetListingParams.d.ts +8 -8
  149. package/dist/types/types/LatLng.d.ts +4 -4
  150. package/dist/types/types/ListingEntity.d.ts +10 -10
  151. package/dist/types/types/ListingFields.d.ts +25 -25
  152. package/dist/types/types/Listings.d.ts +31 -31
  153. package/dist/types/types/Recruiter.d.ts +9 -9
  154. package/dist/types/types/SimilarListing.d.ts +24 -24
  155. package/dist/types/types/config/Colors.d.ts +8 -8
  156. package/dist/types/types/config/MapConfig.d.ts +30 -30
  157. package/dist/types/types/config/PointsOfInterestConfig.d.ts +13 -13
  158. package/dist/types/types/config/SearchConfig.d.ts +4 -4
  159. package/dist/types/util/filterUtil.d.ts +28 -28
  160. package/dist/types/util/loading.d.ts +3 -3
  161. package/dist/types/util/localStorageUtil.d.ts +3 -3
  162. package/dist/types/util/mapUtil.d.ts +16 -16
  163. package/dist/types/util/sortUtil.d.ts +1 -1
  164. package/dist/types/util/stringUtils.d.ts +1 -1
  165. package/dist/types/util/urlFilterUtil.d.ts +8 -8
  166. package/dist/util/filterUtil.js +1 -1
  167. package/dist/util/filterUtil.js.map +1 -1
  168. package/dist/util/loading.js.map +1 -1
  169. package/dist/util/localStorageUtil.js +37 -37
  170. package/dist/util/localStorageUtil.js.map +1 -1
  171. package/dist/util/mapIconUtil.js.map +1 -1
  172. package/dist/util/mapUtil.js.map +1 -1
  173. package/dist/util/sortUtil.js.map +1 -1
  174. package/dist/util/stringUtils.js.map +1 -1
  175. package/dist/util/urlFilterUtil.js.map +1 -1
  176. package/package.json +90 -90
  177. package/src/.editorconfig +12 -12
  178. package/src/apis/hcApi.ts +109 -109
  179. package/src/bundleIndex.js +14 -14
  180. package/src/clientToken.js +9 -9
  181. package/src/components/HireControlMap.js +153 -148
  182. package/src/components/containers/accordions/filter-container.js +52 -48
  183. package/src/components/containers/accordions/filter-item-container.js +83 -83
  184. package/src/components/containers/accordions/map-accordion-item-container.js +70 -70
  185. package/src/components/containers/filter/commute-container.js +89 -89
  186. package/src/components/containers/filter/filter-container.js +76 -76
  187. package/src/components/containers/filter/filter-item-container.js +117 -117
  188. package/src/components/containers/filter/location-container.js +45 -45
  189. package/src/components/containers/filter/points-of-interest-container.js +33 -33
  190. package/src/components/containers/filter/points-of-interest-radio-item-container.js +35 -35
  191. package/src/components/containers/filter/search-container.js +61 -61
  192. package/src/components/containers/jobListing/listing-details-container.js +42 -42
  193. package/src/components/containers/list/item-list-container.tsx +81 -81
  194. package/src/components/containers/list/list-item/list-item-container.js +43 -43
  195. package/src/components/containers/maps/info-window-content-container.js +53 -53
  196. package/src/components/containers/maps/map-container.js +249 -249
  197. package/src/components/containers/maps/map-list-container.js +50 -50
  198. package/src/components/containers/maps/map-marker-container.js +78 -78
  199. package/src/components/modules/accordions/MapAccordionItem.js +30 -30
  200. package/src/components/modules/accordions/default.js +171 -171
  201. package/src/components/modules/accordions/filterItem.js +27 -27
  202. package/src/components/modules/accordions/filters.js +32 -32
  203. package/src/components/modules/buttons/button-group-apply.js +115 -115
  204. package/src/components/modules/buttons/commute-pill.js +22 -22
  205. package/src/components/modules/buttons/default.js +194 -194
  206. package/src/components/modules/buttons/items-pill.js +31 -35
  207. package/src/components/modules/buttons/pill-wrapper.js +27 -27
  208. package/src/components/modules/buttons/show-all-button.js +19 -19
  209. package/src/components/modules/cards/default.js +167 -167
  210. package/src/components/modules/cards/filter.js +56 -56
  211. package/src/components/modules/dialogs/apply-dialog.js +48 -48
  212. package/src/components/modules/filter/commute.js +108 -108
  213. package/src/components/modules/filter/index.js +55 -55
  214. package/src/components/modules/filter/item.js +69 -69
  215. package/src/components/modules/filter/location.js +51 -51
  216. package/src/components/modules/filter/radio-item.js +42 -42
  217. package/src/components/modules/filter/search.js +79 -79
  218. package/src/components/modules/filter/sort.js +83 -83
  219. package/src/components/modules/grid.js +54 -54
  220. package/src/components/modules/icon.js +33 -33
  221. package/src/components/modules/jobListing/listing-details.js +110 -110
  222. package/src/components/modules/list/field-mapper.js +130 -130
  223. package/src/components/modules/list/header-item.js +92 -92
  224. package/src/components/modules/list/header.js +51 -51
  225. package/src/components/modules/list/item-expand-card/index.js +22 -22
  226. package/src/components/modules/list/item-expand-card/recruiter-contact-nav.js +50 -50
  227. package/src/components/modules/list/item-expand-card/recruiter-details.js +68 -68
  228. package/src/components/modules/list/item-expand-card/recruiter-headshot.js +22 -22
  229. package/src/components/modules/list/item-list.tsx +117 -117
  230. package/src/components/modules/list/list-item/list-item.js +130 -130
  231. package/src/components/modules/maps/info-window-card.js +17 -17
  232. package/src/components/modules/maps/info-window-content.js +64 -64
  233. package/src/components/modules/maps/map-list.js +38 -38
  234. package/src/components/modules/maps/map-marker.js +29 -29
  235. package/src/components/modules/maps/map.js +64 -64
  236. package/src/components/modules/maps/place-marker.js +41 -41
  237. package/src/components/modules/maps/tabs.js +81 -81
  238. package/src/constants/eventTypes.js +15 -15
  239. package/src/constants/placeTypes.js +8 -8
  240. package/src/contexts/mapContext.tsx +129 -129
  241. package/src/contexts/mapListContext.tsx +351 -326
  242. package/src/contexts/placesContext.js +102 -102
  243. package/src/contexts/themeContext.js +40 -40
  244. package/src/contexts/trackEventContext.js +14 -14
  245. package/src/enums/SectionType.ts +9 -9
  246. package/src/hooks/useList.js +89 -89
  247. package/src/index.js +3 -3
  248. package/src/services/configService.ts +16 -16
  249. package/src/services/googlePlacesNearbyService.ts +42 -42
  250. package/src/services/listingAggregatorService.ts +76 -76
  251. package/src/services/listingEntityService.ts +16 -16
  252. package/src/services/listingService.ts +40 -40
  253. package/src/services/recruiterService.ts +18 -18
  254. package/src/styles/bundle.css +268 -268
  255. package/src/styles/index.css +33 -33
  256. package/src/types/Address.ts +7 -7
  257. package/src/types/ContentSection.ts +9 -9
  258. package/src/types/GetListingParams.ts +8 -8
  259. package/src/types/LatLng.ts +4 -4
  260. package/src/types/ListingEntity.ts +11 -11
  261. package/src/types/ListingFields.ts +25 -25
  262. package/src/types/Listings.ts +32 -32
  263. package/src/types/Recruiter.ts +9 -9
  264. package/src/types/SimilarListing.ts +24 -24
  265. package/src/types/config/Colors.ts +8 -8
  266. package/src/types/config/MapConfig.ts +31 -31
  267. package/src/types/config/PointsOfInterestConfig.ts +13 -13
  268. package/src/types/config/SearchConfig.ts +4 -4
  269. package/src/util/arrayUtil.js +3 -3
  270. package/src/util/fieldMapper.js +22 -22
  271. package/src/util/filterUtil.js +311 -311
  272. package/src/util/loading.js +17 -17
  273. package/src/util/localStorageUtil.ts +34 -34
  274. package/src/util/mapIconUtil.js +180 -180
  275. package/src/util/mapUtil.js +92 -92
  276. package/src/util/sortUtil.js +32 -32
  277. package/src/util/stringUtils.js +6 -6
  278. package/src/util/urlFilterUtil.js +85 -85
@@ -1,115 +1,115 @@
1
- import React from 'react';
2
- import { twMerge } from 'tailwind-merge';
3
-
4
- import Button from '~/components/modules/buttons/default';
5
- import ApplyDialog from '../dialogs/apply-dialog';
6
-
7
- const ButtonGroupApply = ({
8
- useDetailsPostMessage,
9
- navigateToDetails,
10
- navigateToEasyApply,
11
- Link,
12
- linkFormat,
13
- easyApplyUrl,
14
- applyNowText = 'Apply Now',
15
- detailsUrl,
16
- detailsText = 'View Details',
17
- easyApplyText,
18
- className,
19
- buttonSize = 'sm',
20
- applyButtonVariant = 'primary',
21
- detailsButtonVariant = 'outline',
22
- includeDialog = false,
23
- internalApplyLink,
24
- item,
25
- companyName,
26
- trackEvent,
27
- eventTypes
28
- }) => {
29
- const href = linkFormat.replace('[slug]', item.slug ?? item.id);
30
-
31
- const trackApplyNow = () => {
32
- console.log('calling trackApplyNow');
33
- trackEvent(eventTypes.APPLY_NOW_CLICKED, { jobCategory: item.fields.category, jobCategoryClass: item.fields.categoryClass, jobEntity: item.entityName, jobListingId: item.id, jobSchedule: item.fields.schedule });
34
- };
35
- const trackEasyApply = () => {
36
- console.log('calling trackEasyApply');
37
- trackEvent(eventTypes.EASY_APPLY_CLICKED, { jobCategory: item.fields.category, jobCategoryClass: item.fields.categoryClass, jobEntity: item.entityName, jobListingId: item.id, jobSchedule: item.fields.schedule });
38
- };
39
- const trackViewDetails = () => {
40
- console.log('calling trackViewDetails');
41
- trackEvent(eventTypes.VIEW_DETAILS_CLICKED, { jobCategory: item.fields.category, jobCategoryClass: item.fields.categoryClass, jobEntity: item.entityName, jobListingId: item.id, jobSchedule: item.fields.schedule });
42
- };
43
- console.log(detailsUrl);
44
- console.log(useDetailsPostMessage);
45
- console.log(navigateToDetails);
46
- console.log(useDetailsPostMessage === true && !navigateToDetails, 'query result');
47
- return (
48
- <nav
49
- className={twMerge`
50
- hc-flex hc-flex-row hc-justify-between hc-gap-2 hc-w-full
51
- ${className ?? ''}
52
- `}
53
- >
54
- {Link ? (
55
- <Button.Link
56
- Link={Link}
57
- href={href}
58
- variant={detailsButtonVariant}
59
- size={buttonSize}
60
- className={"map-details-button"}
61
- sendEvent = {trackViewDetails}
62
- >
63
- {detailsText}
64
- </Button.Link>
65
- ) : detailsUrl ? (
66
- <Button.Anchor
67
- href={detailsUrl}
68
- variant={detailsButtonVariant}
69
- className={"map-details-button"}
70
- size={buttonSize}
71
- onClick={trackViewDetails}
72
- >
73
- {detailsText}
74
- </Button.Anchor>
75
- ) : null}
76
-
77
- {item.applyOnline == 1 && item.applyUrl && !includeDialog &&
78
- <Button.Anchor
79
- href={item.applyUrl}
80
- variant={applyButtonVariant}
81
- size={buttonSize}
82
- className={"map-apply-now-button"}
83
- onClick={trackApplyNow}
84
- >
85
- {applyNowText}
86
- </Button.Anchor>
87
- }
88
- {item.applyOnline == 1 && item.applyUrl && includeDialog &&
89
- <ApplyDialog applyUrl={item.applyUrl} internalApplyLink={internalApplyLink} companyName={companyName}>
90
- <Button.Anchor
91
- variant={applyButtonVariant}
92
- size={buttonSize}
93
- className={"map-apply-now-button"}
94
- onClick={trackApplyNow} // TODO: Move event to popup
95
- >
96
- {applyNowText}
97
- </Button.Anchor>
98
- </ApplyDialog>
99
- }
100
- {item.easyApply == 1 &&// TODO: remove after testing: easyApplyUrl &&
101
- <Button.Anchor
102
- href={`${easyApplyUrl}${item.id}`}
103
- variant={applyButtonVariant}
104
- size={buttonSize}
105
- className={"map-apply-now-button"}
106
- onClick={trackEasyApply}
107
- >
108
- {easyApplyText}
109
- </Button.Anchor>
110
- }
111
- </nav>
112
- );
113
- };
114
-
115
- export default ButtonGroupApply;
1
+ import React from 'react';
2
+ import { twMerge } from 'tailwind-merge';
3
+
4
+ import Button from '~/components/modules/buttons/default';
5
+ import ApplyDialog from '../dialogs/apply-dialog';
6
+
7
+ const ButtonGroupApply = ({
8
+ useDetailsPostMessage,
9
+ navigateToDetails,
10
+ navigateToEasyApply,
11
+ Link,
12
+ linkFormat,
13
+ easyApplyUrl,
14
+ applyNowText = 'Apply Now',
15
+ detailsUrl,
16
+ detailsText = 'View Details',
17
+ easyApplyText,
18
+ className,
19
+ buttonSize = 'sm',
20
+ applyButtonVariant = 'primary',
21
+ detailsButtonVariant = 'outline',
22
+ includeDialog = false,
23
+ internalApplyLink,
24
+ item,
25
+ companyName,
26
+ trackEvent,
27
+ eventTypes
28
+ }) => {
29
+ const href = linkFormat.replace('[slug]', item.slug ?? item.id);
30
+
31
+ const trackApplyNow = () => {
32
+ console.log('calling trackApplyNow');
33
+ trackEvent(eventTypes.APPLY_NOW_CLICKED, { jobCategory: item.fields.category, jobCategoryClass: item.fields.categoryClass, jobEntity: item.fields.entityName, jobListingId: item.id, jobSchedule: item.fields.schedule });
34
+ };
35
+ const trackEasyApply = () => {
36
+ console.log('calling trackEasyApply');
37
+ trackEvent(eventTypes.EASY_APPLY_CLICKED, { jobCategory: item.fields.category, jobCategoryClass: item.fields.categoryClass, jobEntity: item.fields.entityName, jobListingId: item.id, jobSchedule: item.fields.schedule });
38
+ };
39
+ const trackViewDetails = () => {
40
+ console.log('calling trackViewDetails');
41
+ trackEvent(eventTypes.VIEW_DETAILS_CLICKED, { jobCategory: item.fields.category, jobCategoryClass: item.fields.categoryClass, jobEntity: item.fields.entityName, jobListingId: item.id, jobSchedule: item.fields.schedule });
42
+ };
43
+ console.log(detailsUrl);
44
+ console.log(useDetailsPostMessage);
45
+ console.log(navigateToDetails);
46
+ console.log(useDetailsPostMessage === true && !navigateToDetails, 'query result');
47
+ return (
48
+ <nav
49
+ className={twMerge`
50
+ hc-flex hc-flex-row hc-justify-between hc-gap-2 hc-w-full
51
+ ${className ?? ''}
52
+ `}
53
+ >
54
+ {Link ? (
55
+ <Button.Link
56
+ Link={Link}
57
+ href={href}
58
+ variant={detailsButtonVariant}
59
+ size={buttonSize}
60
+ className={"map-details-button"}
61
+ sendEvent = {trackViewDetails}
62
+ >
63
+ {detailsText}
64
+ </Button.Link>
65
+ ) : detailsUrl ? (
66
+ <Button.Anchor
67
+ href={detailsUrl}
68
+ variant={detailsButtonVariant}
69
+ className={"map-details-button"}
70
+ size={buttonSize}
71
+ onClick={trackViewDetails}
72
+ >
73
+ {detailsText}
74
+ </Button.Anchor>
75
+ ) : null}
76
+
77
+ {item.applyOnline == 1 && item.applyUrl && !includeDialog &&
78
+ <Button.Anchor
79
+ href={item.applyUrl}
80
+ variant={applyButtonVariant}
81
+ size={buttonSize}
82
+ className={"map-apply-now-button"}
83
+ onClick={trackApplyNow}
84
+ >
85
+ {applyNowText}
86
+ </Button.Anchor>
87
+ }
88
+ {item.applyOnline == 1 && item.applyUrl && includeDialog &&
89
+ <ApplyDialog applyUrl={item.applyUrl} internalApplyLink={internalApplyLink} companyName={companyName}>
90
+ <Button.Anchor
91
+ variant={applyButtonVariant}
92
+ size={buttonSize}
93
+ className={"map-apply-now-button"}
94
+ onClick={trackApplyNow} // TODO: Move event to popup
95
+ >
96
+ {applyNowText}
97
+ </Button.Anchor>
98
+ </ApplyDialog>
99
+ }
100
+ {item.easyApply == 1 && easyApplyUrl &&
101
+ <Button.Anchor
102
+ href={`${easyApplyUrl}${item.id}`}
103
+ variant={applyButtonVariant}
104
+ size={buttonSize}
105
+ className={"map-apply-now-button"}
106
+ onClick={trackEasyApply}
107
+ >
108
+ {easyApplyText}
109
+ </Button.Anchor>
110
+ }
111
+ </nav>
112
+ );
113
+ };
114
+
115
+ export default ButtonGroupApply;
@@ -1,22 +1,22 @@
1
- import React from 'react';
2
-
3
- import Icon from '~/components/modules/icon';
4
- import PillWrapper from '~/components/modules/buttons/pill-wrapper';
5
-
6
- const CommutePill = ({ travelTime }) => {
7
- if (!travelTime) return;
8
- return (
9
- <div className="pt-2">
10
- <PillWrapper >
11
- <Icon
12
- icon="ri:pin-distance-fill"
13
- size="hc-size-5"
14
- className="hc-text-uiAccent/30"
15
- />
16
- commute time = {travelTime}
17
- </PillWrapper>
18
- </div>
19
- );
20
- };
21
-
22
- export default CommutePill;
1
+ import React from 'react';
2
+
3
+ import Icon from '~/components/modules/icon';
4
+ import PillWrapper from '~/components/modules/buttons/pill-wrapper';
5
+
6
+ const CommutePill = ({ travelTime }) => {
7
+ if (!travelTime) return;
8
+ return (
9
+ <div className="pt-2">
10
+ <PillWrapper >
11
+ <Icon
12
+ icon="ri:pin-distance-fill"
13
+ size="hc-size-5"
14
+ className="hc-text-uiAccent/30"
15
+ />
16
+ commute time = {travelTime}
17
+ </PillWrapper>
18
+ </div>
19
+ );
20
+ };
21
+
22
+ export default CommutePill;
@@ -1,194 +1,194 @@
1
- import React from 'react';
2
- import { forwardRef } from 'react';
3
- import { Link } from 'react-router-dom';
4
- import { twMerge } from 'tailwind-merge';
5
-
6
- import Icon from '~/components/modules/icon';
7
-
8
- const linkDefaultClasses = "hc-normal-case hc-text-inherit !hc-font-[inherit] hc-[font-weight:inherit] !hc-p-0 hc-rounded-none";
9
- const underlineClasses = "!underline decoration-1 underline-offset-2 hover:!no-underline focus:!no-underline";
10
-
11
- const ButtonVariant = {
12
- none: '',
13
- primary: 'hc-bg-primary hc-border hc-border-primary hc-text-white hover:hc-bg-opacity-70 focus:hc-bg-opacity-70',
14
- secondary: 'hc-bg-secondary hc-border hc-border-secondary hc-text-white hover:hc-bg-opacity-70 focus:hc-bg-opacity-70',
15
- outline: 'hc-bg-transparent hc-border hc-border-primary hc-text-primary hover:hc-bg-primaryDark hover:hc-border-primaryDark hover:hc-text-white focus:hc-bg-primaryDark focus:hc-border-primaryDark focus:hc-text-white',
16
- link: `${linkDefaultClasses} hc-text-primary hover:hc-text-uiText focus:hc-text-uiText`,
17
- icon: 'hc-opacity-100 hover:hc-opacity-70 focus:hc-opacity-70'
18
- };
19
-
20
- const ButtonSize = {
21
- none: '',
22
- default: 'hc-py-2 hc-px-6 hc-text-base',
23
- sq: 'hc-p-2.5',
24
- sqsm: 'hc-p-1',
25
- xs: 'hc-py-1.5 hc-px-3 hc-text-xs',
26
- sm: 'hc-py-1.5 hc-px-4 hc-text-sm',
27
- lg: 'hc-py-4 hc-px-10 hc-text-lg'
28
- };
29
-
30
- const ButtonDefaults = {
31
- style: 'hc-group hc-font-medium hc-uppercase hc-text-center hc-rounded hc-transition',
32
- size: ButtonSize.default,
33
- variant: ButtonVariant.primary,
34
- block: 'hc-block hc-w-full'
35
- };
36
-
37
- const linkVariants = variant => variant === 'link';
38
-
39
- const buttonClasses = (variant, size, isBlock, hasUnderline, className) => twMerge(
40
- isBlock ? ButtonDefaults.block : linkVariants(variant) ? 'hc-inline' : 'hc-inline-block',
41
- ButtonDefaults.style,
42
- variant ? ButtonVariant[variant] : ButtonDefaults.variant,
43
- size ? ButtonSize[size] : ButtonDefaults.size,
44
- hasUnderline ? underlineClasses : '',
45
- className ?? ''
46
- );
47
-
48
- const Button = ({
49
- children
50
- }) => {
51
- return (
52
- { children }
53
- );
54
- };
55
-
56
- export const Anchor = ({
57
- children,
58
- href,
59
- className,
60
- size,
61
- variant,
62
- isBlock,
63
- hasUnderline,
64
- target = '_blank',
65
- ...rest
66
- }) => {
67
- return (
68
- <a
69
- href={href}
70
- target={target}
71
- className={buttonClasses(variant, size, isBlock, hasUnderline, className)}
72
- onClick={href === '#' ? e => {
73
- e.preventDefault();
74
- } : null}
75
- {...rest}
76
- >
77
- {children}
78
- </a>
79
- );
80
- };
81
-
82
- export const AnchorLink = ({
83
- children,
84
- Link,
85
- href,
86
- className,
87
- size,
88
- variant,
89
- isBlock,
90
- hasUnderline,
91
- ...rest
92
- }) => {
93
- return (
94
- <Link
95
- href={href}
96
- className={`
97
- ${buttonClasses(variant, size, isBlock, hasUnderline, className)}
98
- `}
99
- {...rest}
100
- >
101
- {children}
102
- </Link>
103
- );
104
- };
105
-
106
- export const ScrollAnchor = forwardRef((props, ref) => {
107
- const {
108
- children,
109
- href,
110
- className,
111
- size,
112
- variant,
113
- isBlock,
114
- hasUnderline,
115
- ...rest
116
- } = props;
117
-
118
- return (
119
- <Link
120
- ref={ref}
121
- href={`#${href}`}
122
- scroll={false}
123
- className={buttonClasses(variant, size, isBlock, hasUnderline, className)}
124
- {...rest}
125
- >
126
- {children}
127
- </Link>
128
- );
129
- });
130
-
131
- export const Btn = forwardRef((props, ref) => {
132
- const {
133
- children,
134
- type = 'button',
135
- className,
136
- size,
137
- variant,
138
- isBlock,
139
- hasUnderline,
140
- ...rest
141
- } = props;
142
- return (
143
- <button
144
- ref={ref}
145
- type={type}
146
- className={buttonClasses(variant, size, isBlock, hasUnderline, className)}
147
- {...rest}
148
- >
149
- {children}
150
- </button>
151
- );
152
- });
153
-
154
- export const ButtonBody = ({
155
- children,
156
- className
157
- }) => {
158
- return (
159
- <span
160
- className={twMerge(
161
- 'hc-inline-flex hc-w-full hc-items-center hc-justify-between hc-gap-1.5',
162
- className ?? ''
163
- )}
164
- >
165
- {children}
166
- </span>
167
- );
168
- };
169
-
170
- export const ButtonIcon = ({
171
- icon,
172
- size = 'hc-size-4',
173
- className
174
- }) => {
175
- return (
176
- <Icon
177
-
178
- icon={icon}
179
- size={size}
180
- className={className ?? ''}
181
- />
182
- );
183
- };
184
-
185
- Button.Anchor = Anchor;
186
- Button.Link = AnchorLink;
187
- Button.Scroll = ScrollAnchor;
188
- Button.Btn = Btn;
189
- Button.Body = ButtonBody;
190
- Button.Icon = ButtonIcon;
191
-
192
- Btn.displayName = 'Button:Button';
193
- ScrollAnchor.displayName = 'Button:ScrollAnchor';
194
- export default Button;
1
+ import React from 'react';
2
+ import { forwardRef } from 'react';
3
+ import { Link } from 'react-router-dom';
4
+ import { twMerge } from 'tailwind-merge';
5
+
6
+ import Icon from '~/components/modules/icon';
7
+
8
+ const linkDefaultClasses = "hc-normal-case hc-text-inherit !hc-font-[inherit] hc-[font-weight:inherit] !hc-p-0 hc-rounded-none";
9
+ const underlineClasses = "!underline decoration-1 underline-offset-2 hover:!no-underline focus:!no-underline";
10
+
11
+ const ButtonVariant = {
12
+ none: '',
13
+ primary: 'hc-bg-primary hc-border hc-border-primary hc-text-white hover:hc-bg-opacity-70 focus:hc-bg-opacity-70',
14
+ secondary: 'hc-bg-secondary hc-border hc-border-secondary hc-text-white hover:hc-bg-opacity-70 focus:hc-bg-opacity-70',
15
+ outline: 'hc-bg-transparent hc-border hc-border-primary hc-text-primary hover:hc-bg-primaryDark hover:hc-border-primaryDark hover:hc-text-white focus:hc-bg-primaryDark focus:hc-border-primaryDark focus:hc-text-white',
16
+ link: `${linkDefaultClasses} hc-text-primary hover:hc-text-uiText focus:hc-text-uiText`,
17
+ icon: 'hc-opacity-100 hover:hc-opacity-70 focus:hc-opacity-70'
18
+ };
19
+
20
+ const ButtonSize = {
21
+ none: '',
22
+ default: 'hc-py-2 hc-px-6 hc-text-base',
23
+ sq: 'hc-p-2.5',
24
+ sqsm: 'hc-p-1',
25
+ xs: 'hc-py-1.5 hc-px-3 hc-text-xs',
26
+ sm: 'hc-py-1.5 hc-px-4 hc-text-sm',
27
+ lg: 'hc-py-4 hc-px-10 hc-text-lg'
28
+ };
29
+
30
+ const ButtonDefaults = {
31
+ style: 'hc-group hc-font-medium hc-uppercase hc-text-center hc-rounded hc-transition',
32
+ size: ButtonSize.default,
33
+ variant: ButtonVariant.primary,
34
+ block: 'hc-block hc-w-full'
35
+ };
36
+
37
+ const linkVariants = variant => variant === 'link';
38
+
39
+ const buttonClasses = (variant, size, isBlock, hasUnderline, className) => twMerge(
40
+ isBlock ? ButtonDefaults.block : linkVariants(variant) ? 'hc-inline' : 'hc-inline-block',
41
+ ButtonDefaults.style,
42
+ variant ? ButtonVariant[variant] : ButtonDefaults.variant,
43
+ size ? ButtonSize[size] : ButtonDefaults.size,
44
+ hasUnderline ? underlineClasses : '',
45
+ className ?? ''
46
+ );
47
+
48
+ const Button = ({
49
+ children
50
+ }) => {
51
+ return (
52
+ { children }
53
+ );
54
+ };
55
+
56
+ export const Anchor = ({
57
+ children,
58
+ href,
59
+ className,
60
+ size,
61
+ variant,
62
+ isBlock,
63
+ hasUnderline,
64
+ target = '_blank',
65
+ ...rest
66
+ }) => {
67
+ return (
68
+ <a
69
+ href={href}
70
+ target={target}
71
+ className={buttonClasses(variant, size, isBlock, hasUnderline, className)}
72
+ onClick={href === '#' ? e => {
73
+ e.preventDefault();
74
+ } : null}
75
+ {...rest}
76
+ >
77
+ {children}
78
+ </a>
79
+ );
80
+ };
81
+
82
+ export const AnchorLink = ({
83
+ children,
84
+ Link,
85
+ href,
86
+ className,
87
+ size,
88
+ variant,
89
+ isBlock,
90
+ hasUnderline,
91
+ ...rest
92
+ }) => {
93
+ return (
94
+ <Link
95
+ href={href}
96
+ className={`
97
+ ${buttonClasses(variant, size, isBlock, hasUnderline, className)}
98
+ `}
99
+ {...rest}
100
+ >
101
+ {children}
102
+ </Link>
103
+ );
104
+ };
105
+
106
+ export const ScrollAnchor = forwardRef((props, ref) => {
107
+ const {
108
+ children,
109
+ href,
110
+ className,
111
+ size,
112
+ variant,
113
+ isBlock,
114
+ hasUnderline,
115
+ ...rest
116
+ } = props;
117
+
118
+ return (
119
+ <Link
120
+ ref={ref}
121
+ href={`#${href}`}
122
+ scroll={false}
123
+ className={buttonClasses(variant, size, isBlock, hasUnderline, className)}
124
+ {...rest}
125
+ >
126
+ {children}
127
+ </Link>
128
+ );
129
+ });
130
+
131
+ export const Btn = forwardRef((props, ref) => {
132
+ const {
133
+ children,
134
+ type = 'button',
135
+ className,
136
+ size,
137
+ variant,
138
+ isBlock,
139
+ hasUnderline,
140
+ ...rest
141
+ } = props;
142
+ return (
143
+ <button
144
+ ref={ref}
145
+ type={type}
146
+ className={buttonClasses(variant, size, isBlock, hasUnderline, className)}
147
+ {...rest}
148
+ >
149
+ {children}
150
+ </button>
151
+ );
152
+ });
153
+
154
+ export const ButtonBody = ({
155
+ children,
156
+ className
157
+ }) => {
158
+ return (
159
+ <span
160
+ className={twMerge(
161
+ 'hc-inline-flex hc-w-full hc-items-center hc-justify-between hc-gap-1.5',
162
+ className ?? ''
163
+ )}
164
+ >
165
+ {children}
166
+ </span>
167
+ );
168
+ };
169
+
170
+ export const ButtonIcon = ({
171
+ icon,
172
+ size = 'hc-size-4',
173
+ className
174
+ }) => {
175
+ return (
176
+ <Icon
177
+
178
+ icon={icon}
179
+ size={size}
180
+ className={className ?? ''}
181
+ />
182
+ );
183
+ };
184
+
185
+ Button.Anchor = Anchor;
186
+ Button.Link = AnchorLink;
187
+ Button.Scroll = ScrollAnchor;
188
+ Button.Btn = Btn;
189
+ Button.Body = ButtonBody;
190
+ Button.Icon = ButtonIcon;
191
+
192
+ Btn.displayName = 'Button:Button';
193
+ ScrollAnchor.displayName = 'Button:ScrollAnchor';
194
+ export default Button;