@abcagency/hc-ui-components 1.2.8 → 1.2.9

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 (132) hide show
  1. package/dist/_virtual/_rollupPluginBabelHelpers.js +516 -516
  2. package/dist/apis/hcApi.js +189 -189
  3. package/dist/apis/hcApi.js.map +1 -1
  4. package/dist/clientToken.js +10 -10
  5. package/dist/clientToken.js.map +1 -1
  6. package/dist/components/HireControlMap.js +135 -135
  7. package/dist/components/HireControlMap.js.map +1 -1
  8. package/dist/components/modules/accordions/MapAccordionItem.js +76 -76
  9. package/dist/components/modules/accordions/MapAccordionItem.js.map +1 -1
  10. package/dist/components/modules/accordions/default.js +108 -108
  11. package/dist/components/modules/accordions/default.js.map +1 -1
  12. package/dist/components/modules/accordions/filterItem.js +50 -50
  13. package/dist/components/modules/accordions/filterItem.js.map +1 -1
  14. package/dist/components/modules/accordions/filters.js +46 -46
  15. package/dist/components/modules/accordions/filters.js.map +1 -1
  16. package/dist/components/modules/buttons/button-group-apply.js +87 -87
  17. package/dist/components/modules/buttons/button-group-apply.js.map +1 -1
  18. package/dist/components/modules/buttons/commute-pill.js +18 -18
  19. package/dist/components/modules/buttons/commute-pill.js.map +1 -1
  20. package/dist/components/modules/buttons/default.js +145 -145
  21. package/dist/components/modules/buttons/default.js.map +1 -1
  22. package/dist/components/modules/buttons/items-pill.js +23 -23
  23. package/dist/components/modules/buttons/items-pill.js.map +1 -1
  24. package/dist/components/modules/buttons/pill-wrapper.js +20 -20
  25. package/dist/components/modules/buttons/pill-wrapper.js.map +1 -1
  26. package/dist/components/modules/buttons/show-all-button.js +39 -39
  27. package/dist/components/modules/buttons/show-all-button.js.map +1 -1
  28. package/dist/components/modules/cards/default.js +102 -102
  29. package/dist/components/modules/cards/default.js.map +1 -1
  30. package/dist/components/modules/cards/filter.js +38 -38
  31. package/dist/components/modules/cards/filter.js.map +1 -1
  32. package/dist/components/modules/dialogs/apply-dialog.js +46 -46
  33. package/dist/components/modules/dialogs/apply-dialog.js.map +1 -1
  34. package/dist/components/modules/filter/commute.js +184 -184
  35. package/dist/components/modules/filter/commute.js.map +1 -1
  36. package/dist/components/modules/filter/index.js +79 -79
  37. package/dist/components/modules/filter/index.js.map +1 -1
  38. package/dist/components/modules/filter/item.js +71 -71
  39. package/dist/components/modules/filter/item.js.map +1 -1
  40. package/dist/components/modules/filter/location.js +68 -68
  41. package/dist/components/modules/filter/location.js.map +1 -1
  42. package/dist/components/modules/filter/points-of-interest.js +38 -38
  43. package/dist/components/modules/filter/points-of-interest.js.map +1 -1
  44. package/dist/components/modules/filter/radio-item.js +46 -46
  45. package/dist/components/modules/filter/radio-item.js.map +1 -1
  46. package/dist/components/modules/filter/search.js +83 -83
  47. package/dist/components/modules/filter/search.js.map +1 -1
  48. package/dist/components/modules/filter/sort.js +93 -93
  49. package/dist/components/modules/filter/sort.js.map +1 -1
  50. package/dist/components/modules/grid.js +39 -39
  51. package/dist/components/modules/grid.js.map +1 -1
  52. package/dist/components/modules/icon.js +23 -23
  53. package/dist/components/modules/icon.js.map +1 -1
  54. package/dist/components/modules/jobListing/listing-details.js +71 -71
  55. package/dist/components/modules/jobListing/listing-details.js.map +1 -1
  56. package/dist/components/modules/maps/info-window-card.js +14 -14
  57. package/dist/components/modules/maps/info-window-card.js.map +1 -1
  58. package/dist/components/modules/maps/info-window-content.js +49 -39
  59. package/dist/components/modules/maps/info-window-content.js.map +1 -1
  60. package/dist/components/modules/maps/list/field-mapper.js +88 -88
  61. package/dist/components/modules/maps/list/field-mapper.js.map +1 -1
  62. package/dist/components/modules/maps/list/header-item.js +59 -59
  63. package/dist/components/modules/maps/list/header-item.js.map +1 -1
  64. package/dist/components/modules/maps/list/header.js +37 -37
  65. package/dist/components/modules/maps/list/header.js.map +1 -1
  66. package/dist/components/modules/maps/list/index.js +93 -93
  67. package/dist/components/modules/maps/list/index.js.map +1 -1
  68. package/dist/components/modules/maps/list/item-expand-card/index.js +16 -16
  69. package/dist/components/modules/maps/list/item-expand-card/index.js.map +1 -1
  70. package/dist/components/modules/maps/list/item-expand-card/recruiter-contact-nav.js +38 -38
  71. package/dist/components/modules/maps/list/item-expand-card/recruiter-contact-nav.js.map +1 -1
  72. package/dist/components/modules/maps/list/item-expand-card/recruiter-details.js +40 -40
  73. package/dist/components/modules/maps/list/item-expand-card/recruiter-details.js.map +1 -1
  74. package/dist/components/modules/maps/list/item-expand-card/recruiter-headshot.js +20 -20
  75. package/dist/components/modules/maps/list/item-expand-card/recruiter-headshot.js.map +1 -1
  76. package/dist/components/modules/maps/list/list-item/index.js +98 -98
  77. package/dist/components/modules/maps/list/list-item/index.js.map +1 -1
  78. package/dist/components/modules/maps/map-list.js +57 -57
  79. package/dist/components/modules/maps/map-list.js.map +1 -1
  80. package/dist/components/modules/maps/map-marker.js +85 -85
  81. package/dist/components/modules/maps/map-marker.js.map +1 -1
  82. package/dist/components/modules/maps/map.js +201 -201
  83. package/dist/components/modules/maps/map.js.map +1 -1
  84. package/dist/components/modules/maps/place-marker.js +37 -37
  85. package/dist/components/modules/maps/place-marker.js.map +1 -1
  86. package/dist/components/modules/maps/tabs.js +84 -84
  87. package/dist/components/modules/maps/tabs.js.map +1 -1
  88. package/dist/constants/placeTypes.js +11 -11
  89. package/dist/constants/placeTypes.js.map +1 -1
  90. package/dist/contexts/mapContext.js +133 -133
  91. package/dist/contexts/mapContext.js.map +1 -1
  92. package/dist/contexts/mapListContext.js +280 -280
  93. package/dist/contexts/mapListContext.js.map +1 -1
  94. package/dist/contexts/placesContext.js +152 -152
  95. package/dist/contexts/placesContext.js.map +1 -1
  96. package/dist/hooks/useList.js +119 -119
  97. package/dist/hooks/useList.js.map +1 -1
  98. package/dist/index.js +2 -2
  99. package/dist/services/_virtual/_rollupPluginBabelHelpers.js +372 -372
  100. package/dist/services/apis/hcApi.js +189 -189
  101. package/dist/services/apis/hcApi.js.map +1 -1
  102. package/dist/services/clientToken.js +7 -7
  103. package/dist/services/clientToken.js.map +1 -1
  104. package/dist/services/configService.js +33 -33
  105. package/dist/services/configService.js.map +1 -1
  106. package/dist/services/googlePlacesNearbyService.js +61 -61
  107. package/dist/services/googlePlacesNearbyService.js.map +1 -1
  108. package/dist/services/listingAggregatorService.js +56 -56
  109. package/dist/services/listingAggregatorService.js.map +1 -1
  110. package/dist/services/listingEntityService.js +36 -36
  111. package/dist/services/listingEntityService.js.map +1 -1
  112. package/dist/services/listingService.js +64 -64
  113. package/dist/services/listingService.js.map +1 -1
  114. package/dist/services/recruiterService.js +36 -36
  115. package/dist/services/recruiterService.js.map +1 -1
  116. package/dist/services/styles/index.css +2 -2
  117. package/dist/styles/index.css +2 -2
  118. package/dist/util/filterUtil.js +213 -213
  119. package/dist/util/filterUtil.js.map +1 -1
  120. package/dist/util/loading.js +16 -16
  121. package/dist/util/loading.js.map +1 -1
  122. package/dist/util/localStorageUtil.js +32 -32
  123. package/dist/util/localStorageUtil.js.map +1 -1
  124. package/dist/util/mapIconUtil.js +73 -73
  125. package/dist/util/mapIconUtil.js.map +1 -1
  126. package/dist/util/mapUtil.js +76 -76
  127. package/dist/util/mapUtil.js.map +1 -1
  128. package/dist/util/sortUtil.js +33 -33
  129. package/dist/util/sortUtil.js.map +1 -1
  130. package/dist/util/stringUtils.js +9 -9
  131. package/dist/util/stringUtils.js.map +1 -1
  132. package/package.json +1 -1
@@ -1,46 +1,46 @@
1
- import React from 'react';
2
- import * as Dialog from '@radix-ui/react-dialog';
3
- import Button from '../buttons/default.js';
4
- import IconContained from '../icon.js';
5
-
6
- var ApplyDialog = function ApplyDialog(_ref) {
7
- var children = _ref.children,
8
- applyUrl = _ref.applyUrl,
9
- internalApplyLink = _ref.internalApplyLink,
10
- companyName = _ref.companyName;
11
- return /*#__PURE__*/React.createElement(Dialog.Root, null, /*#__PURE__*/React.createElement(Dialog.Trigger, {
12
- asChild: true
13
- }, children), /*#__PURE__*/React.createElement(Dialog.Portal, null, /*#__PURE__*/React.createElement(Dialog.Overlay, {
14
- className: "hc-bg-black/50 hc-fixed hc-inset-0 hc-animate-overlayShow"
15
- }), /*#__PURE__*/React.createElement(Dialog.Content, {
16
- className: "hc-fit-content hc-animate-contentShow hc-fixed hc-inset-0 hc-m-auto hc-max-h-[85vh] hc-w-[90vw] hc-max-w-[450px] hc-rounded-[6px] hc-bg-white hc-p-[25px] hc-shadow-lg focus:hc-outline-none hc-flex hc-flex-col hc-items-center hc-text-center"
17
- }, /*#__PURE__*/React.createElement(Dialog.Title, {
18
- className: "hc-text-[17px] hc-font-medium hc-w-full"
19
- }, "Career Opportunities"), /*#__PURE__*/React.createElement(Dialog.Description, {
20
- className: "hc-mt-4 hc-mb-5 hc-text-[15px] hc-leading-normal hc-w-full"
21
- }, "Are you currently a ", companyName, " employee?"), /*#__PURE__*/React.createElement("div", {
22
- className: "hc-flex hc-justify-center hc-space-x-4 hc-w-full"
23
- }, /*#__PURE__*/React.createElement(Dialog.Close, {
24
- asChild: true
25
- }, /*#__PURE__*/React.createElement(Button.Anchor, {
26
- variant: "outline",
27
- href: internalApplyLink
28
- }, "Yes")), /*#__PURE__*/React.createElement(Dialog.Close, {
29
- asChild: true
30
- }, /*#__PURE__*/React.createElement(Button.Anchor, {
31
- variant: "primary",
32
- href: applyUrl
33
- }, "No"))), /*#__PURE__*/React.createElement(Dialog.Close, {
34
- asChild: true
35
- }, /*#__PURE__*/React.createElement(Button.Anchor, {
36
- className: "hc-absolute hc-top-[10px] hc-right-[10px] hc-inline-flex hc-h-[25px] hc-w-[25px] hc-items-center hc-justify-center hc-rounded-full focus:hc-outline-none",
37
- variant: "ghost",
38
- "aria-label": "Close"
39
- }, /*#__PURE__*/React.createElement(IconContained, {
40
- icon: "mdi:times",
41
- className: "hc-cursor-pointer hc-text-black hover:hc-text-gray-500 hover:hc-opacity-75"
42
- }))))));
43
- };
44
-
45
- export { ApplyDialog as default };
46
- //# sourceMappingURL=apply-dialog.js.map
1
+ import React from 'react';
2
+ import * as Dialog from '@radix-ui/react-dialog';
3
+ import Button from '../buttons/default.js';
4
+ import IconContained from '../icon.js';
5
+
6
+ var ApplyDialog = function ApplyDialog(_ref) {
7
+ var children = _ref.children,
8
+ applyUrl = _ref.applyUrl,
9
+ internalApplyLink = _ref.internalApplyLink,
10
+ companyName = _ref.companyName;
11
+ return /*#__PURE__*/React.createElement(Dialog.Root, null, /*#__PURE__*/React.createElement(Dialog.Trigger, {
12
+ asChild: true
13
+ }, children), /*#__PURE__*/React.createElement(Dialog.Portal, null, /*#__PURE__*/React.createElement(Dialog.Overlay, {
14
+ className: "hc-bg-black/50 hc-fixed hc-inset-0 hc-animate-overlayShow"
15
+ }), /*#__PURE__*/React.createElement(Dialog.Content, {
16
+ className: "hc-fit-content hc-animate-contentShow hc-fixed hc-inset-0 hc-m-auto hc-max-h-[85vh] hc-w-[90vw] hc-max-w-[450px] hc-rounded-[6px] hc-bg-white hc-p-[25px] hc-shadow-lg focus:hc-outline-none hc-flex hc-flex-col hc-items-center hc-text-center"
17
+ }, /*#__PURE__*/React.createElement(Dialog.Title, {
18
+ className: "hc-text-[17px] hc-font-medium hc-w-full"
19
+ }, "Career Opportunities"), /*#__PURE__*/React.createElement(Dialog.Description, {
20
+ className: "hc-mt-4 hc-mb-5 hc-text-[15px] hc-leading-normal hc-w-full"
21
+ }, "Are you currently a ", companyName, " employee?"), /*#__PURE__*/React.createElement("div", {
22
+ className: "hc-flex hc-justify-center hc-space-x-4 hc-w-full"
23
+ }, /*#__PURE__*/React.createElement(Dialog.Close, {
24
+ asChild: true
25
+ }, /*#__PURE__*/React.createElement(Button.Anchor, {
26
+ variant: "outline",
27
+ href: internalApplyLink
28
+ }, "Yes")), /*#__PURE__*/React.createElement(Dialog.Close, {
29
+ asChild: true
30
+ }, /*#__PURE__*/React.createElement(Button.Anchor, {
31
+ variant: "primary",
32
+ href: applyUrl
33
+ }, "No"))), /*#__PURE__*/React.createElement(Dialog.Close, {
34
+ asChild: true
35
+ }, /*#__PURE__*/React.createElement(Button.Anchor, {
36
+ className: "hc-absolute hc-top-[10px] hc-right-[10px] hc-inline-flex hc-h-[25px] hc-w-[25px] hc-items-center hc-justify-center hc-rounded-full focus:hc-outline-none",
37
+ variant: "ghost",
38
+ "aria-label": "Close"
39
+ }, /*#__PURE__*/React.createElement(IconContained, {
40
+ icon: "mdi:times",
41
+ className: "hc-cursor-pointer hc-text-black hover:hc-text-gray-500 hover:hc-opacity-75"
42
+ }))))));
43
+ };
44
+
45
+ export { ApplyDialog as default };
46
+ //# sourceMappingURL=apply-dialog.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"apply-dialog.js","sources":["../../../../src/components/modules/dialogs/apply-dialog.js"],"sourcesContent":["import React from 'react';\nimport * as Dialog from '@radix-ui/react-dialog';\n\nimport Button from '~/components/modules/buttons/default';\nimport Icon from '~/components/modules/icon';\n\nconst ApplyDialog = ({ children, applyUrl, internalApplyLink, companyName }) => (\n\n\t<Dialog.Root >\n\t\t<Dialog.Trigger asChild>\n\t\t\t{children}\n\t\t</Dialog.Trigger>\n\t\t<Dialog.Portal>\n\t\t\t<Dialog.Overlay className=\"hc-bg-black/50 hc-fixed hc-inset-0 hc-animate-overlayShow\" />\n\t\t\t<Dialog.Content className=\"hc-fit-content hc-animate-contentShow hc-fixed hc-inset-0 hc-m-auto hc-max-h-[85vh] hc-w-[90vw] hc-max-w-[450px] hc-rounded-[6px] hc-bg-white hc-p-[25px] hc-shadow-lg focus:hc-outline-none hc-flex hc-flex-col hc-items-center hc-text-center\">\n\t\t\t\t<Dialog.Title className=\"hc-text-[17px] hc-font-medium hc-w-full\">\n\t\t\t\t\tCareer Opportunities\n\t\t\t\t</Dialog.Title>\n\t\t\t\t<Dialog.Description className=\"hc-mt-4 hc-mb-5 hc-text-[15px] hc-leading-normal hc-w-full\">\n\t\t\t\t\tAre you currently a {companyName} employee?\n\t\t\t\t</Dialog.Description>\n\t\t\t\t<div className=\"hc-flex hc-justify-center hc-space-x-4 hc-w-full\">\n\t\t\t\t\t<Dialog.Close asChild>\n\t\t\t\t\t\t<Button.Anchor variant=\"outline\" href={internalApplyLink}>\n\t\t\t\t\t\t\tYes\n\t\t\t\t\t\t</Button.Anchor>\n\t\t\t\t\t</Dialog.Close>\n\t\t\t\t\t<Dialog.Close asChild>\n\t\t\t\t\t\t<Button.Anchor variant=\"primary\" href={applyUrl}>\n\t\t\t\t\t\t\tNo\n\t\t\t\t\t\t</Button.Anchor>\n\t\t\t\t\t</Dialog.Close>\n\t\t\t\t</div>\n\t\t\t\t<Dialog.Close asChild>\n\t\t\t\t\t<Button.Anchor className=\"hc-absolute hc-top-[10px] hc-right-[10px] hc-inline-flex hc-h-[25px] hc-w-[25px] hc-items-center hc-justify-center hc-rounded-full focus:hc-outline-none\"\n\t\t\t\t\t\tvariant=\"ghost\" aria-label=\"Close\">\n\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\ticon=\"mdi:times\"\n\t\t\t\t\t\t\tclassName=\"hc-cursor-pointer hc-text-black hover:hc-text-gray-500 hover:hc-opacity-75\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t</Button.Anchor>\n\t\t\t\t</Dialog.Close>\n\t\t\t</Dialog.Content>\n\t\t</Dialog.Portal>\n\t</Dialog.Root>\n);\n\nexport default ApplyDialog;\n"],"names":["ApplyDialog","_ref","children","applyUrl","internalApplyLink","companyName","React","createElement","Dialog","Root","Trigger","asChild","Portal","Overlay","className","Content","Title","Description","Close","Button","Anchor","variant","href","Icon","icon"],"mappings":";;;;;AAMA,IAAMA,WAAW,GAAG,SAAdA,WAAWA,CAAAC,IAAA,EAAA;AAAA,EAAA,IAAMC,QAAQ,GAAAD,IAAA,CAARC,QAAQ;IAAEC,QAAQ,GAAAF,IAAA,CAARE,QAAQ;IAAEC,iBAAiB,GAAAH,IAAA,CAAjBG,iBAAiB;IAAEC,WAAW,GAAAJ,IAAA,CAAXI,WAAW,CAAA;AAAA,EAAA,oBAExEC,KAAA,CAAAC,aAAA,CAACC,MAAM,CAACC,IAAI,EACXH,IAAAA,eAAAA,KAAA,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AACU,KAAK,EAAA;IAACP,OAAO,EAAA,IAAA;AAAA,GAAA,eACpBL,KAAA,CAAAC,aAAA,CAACY,MAAM,CAACC,MAAM,EAAA;AAACN,IAAAA,SAAS,EAAC,0JAA0J;AAClLO,IAAAA,OAAO,EAAC,OAAO;IAAC,YAAW,EAAA,OAAA;AAAO,GAAA,eAClCf,KAAA,CAAAC,aAAA,CAACgB,aAAI,EAAA;AACJC,IAAAA,IAAI,EAAC,WAAW;AAChBV,IAAAA,SAAS,EAAC,4EAAA;AAA4E,GACtF,CACa,CACF,CACC,CACF,CACH,CAAC,CAAA;AAAA;;;;"}
1
+ {"version":3,"file":"apply-dialog.js","sources":["../../../../src/components/modules/dialogs/apply-dialog.js"],"sourcesContent":["import React from 'react';\r\nimport * as Dialog from '@radix-ui/react-dialog';\r\n\r\nimport Button from '~/components/modules/buttons/default';\r\nimport Icon from '~/components/modules/icon';\r\n\r\nconst ApplyDialog = ({ children, applyUrl, internalApplyLink, companyName }) => (\r\n\r\n\t<Dialog.Root >\r\n\t\t<Dialog.Trigger asChild>\r\n\t\t\t{children}\r\n\t\t</Dialog.Trigger>\r\n\t\t<Dialog.Portal>\r\n\t\t\t<Dialog.Overlay className=\"hc-bg-black/50 hc-fixed hc-inset-0 hc-animate-overlayShow\" />\r\n\t\t\t<Dialog.Content className=\"hc-fit-content hc-animate-contentShow hc-fixed hc-inset-0 hc-m-auto hc-max-h-[85vh] hc-w-[90vw] hc-max-w-[450px] hc-rounded-[6px] hc-bg-white hc-p-[25px] hc-shadow-lg focus:hc-outline-none hc-flex hc-flex-col hc-items-center hc-text-center\">\r\n\t\t\t\t<Dialog.Title className=\"hc-text-[17px] hc-font-medium hc-w-full\">\r\n\t\t\t\t\tCareer Opportunities\r\n\t\t\t\t</Dialog.Title>\r\n\t\t\t\t<Dialog.Description className=\"hc-mt-4 hc-mb-5 hc-text-[15px] hc-leading-normal hc-w-full\">\r\n\t\t\t\t\tAre you currently a {companyName} employee?\r\n\t\t\t\t</Dialog.Description>\r\n\t\t\t\t<div className=\"hc-flex hc-justify-center hc-space-x-4 hc-w-full\">\r\n\t\t\t\t\t<Dialog.Close asChild>\r\n\t\t\t\t\t\t<Button.Anchor variant=\"outline\" href={internalApplyLink}>\r\n\t\t\t\t\t\t\tYes\r\n\t\t\t\t\t\t</Button.Anchor>\r\n\t\t\t\t\t</Dialog.Close>\r\n\t\t\t\t\t<Dialog.Close asChild>\r\n\t\t\t\t\t\t<Button.Anchor variant=\"primary\" href={applyUrl}>\r\n\t\t\t\t\t\t\tNo\r\n\t\t\t\t\t\t</Button.Anchor>\r\n\t\t\t\t\t</Dialog.Close>\r\n\t\t\t\t</div>\r\n\t\t\t\t<Dialog.Close asChild>\r\n\t\t\t\t\t<Button.Anchor className=\"hc-absolute hc-top-[10px] hc-right-[10px] hc-inline-flex hc-h-[25px] hc-w-[25px] hc-items-center hc-justify-center hc-rounded-full focus:hc-outline-none\"\r\n\t\t\t\t\t\tvariant=\"ghost\" aria-label=\"Close\">\r\n\t\t\t\t\t\t<Icon\r\n\t\t\t\t\t\t\ticon=\"mdi:times\"\r\n\t\t\t\t\t\t\tclassName=\"hc-cursor-pointer hc-text-black hover:hc-text-gray-500 hover:hc-opacity-75\"\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t</Button.Anchor>\r\n\t\t\t\t</Dialog.Close>\r\n\t\t\t</Dialog.Content>\r\n\t\t</Dialog.Portal>\r\n\t</Dialog.Root>\r\n);\r\n\r\nexport default ApplyDialog;\r\n"],"names":["ApplyDialog","_ref","children","applyUrl","internalApplyLink","companyName","React","createElement","Dialog","Root","Trigger","asChild","Portal","Overlay","className","Content","Title","Description","Close","Button","Anchor","variant","href","Icon","icon"],"mappings":";;;;;AAMA,IAAMA,WAAW,GAAG,SAAdA,WAAWA,CAAAC,IAAA,EAAA;AAAA,EAAA,IAAMC,QAAQ,GAAAD,IAAA,CAARC,QAAQ;IAAEC,QAAQ,GAAAF,IAAA,CAARE,QAAQ;IAAEC,iBAA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A,CAACY,MAAM,CAACC,MAAM,EAAA;AAACC,IAAAA,OAAO,EAAC,SAAS;AAACC,IAAAA,IAAI,EAAEnB,QAAAA;GAAU,EAAA,IAElC,CACF,CACV,CAAC,eACNG,KAAA,CAAAC,aAAA,CAACC,MAAM,CAACU,KAAK,EAAA;IAACP,OAAO,EAAA,IAAA;AAAA,GAAA,eACpBL,KAAA,CAAAC,aAAA,CAACY,MAAM,CAACC,MAAM,EAAA;AAACN,IAAAA,SAAS,EAAC,0JAA0J;AAClLO,IAAAA,OAAO,EAAC,OAAO;IAAC,YAAW,EAAA,OAAA;AAAO,GAAA,eAClCf,KAAA,CAAAC,aAAA,CAACgB,aAAI,EAAA;AACJC,IAAAA,IAAI,EAAC,WAAW;AAChBV,IAAAA,SAAS,EAAC,4EAAA;AAA4E,GACtF,CACa,CACF,CACC,CACF,CACH,CAAC,CAAA;AAAA;;;;"}
@@ -1,184 +1,184 @@
1
- import { slicedToArray as _slicedToArray, asyncToGenerator as _asyncToGenerator, regeneratorRuntime as _regeneratorRuntime } from '../../../_virtual/_rollupPluginBabelHelpers.js';
2
- import React, { useState, useRef, useEffect, Fragment } from 'react';
3
- import { Combobox, Transition } from '@headlessui/react';
4
- import usePlacesAutocomplete, { getLatLng, getGeocode } from 'use-places-autocomplete';
5
- import Button from '../buttons/default.js';
6
- import IconContained from '../icon.js';
7
- import { useMapList } from '../../../contexts/mapListContext.js';
8
- import { getStorageItem } from '../../../util/localStorageUtil.js';
9
-
10
- var FilterCommute = function FilterCommute(_ref) {
11
- var className = _ref.className;
12
- var _usePlacesAutocomplet = usePlacesAutocomplete(),
13
- ready = _usePlacesAutocomplet.ready;
14
- _usePlacesAutocomplet.value;
15
- var _usePlacesAutocomplet2 = _usePlacesAutocomplet.suggestions,
16
- status = _usePlacesAutocomplet2.status,
17
- data = _usePlacesAutocomplet2.data,
18
- setValue = _usePlacesAutocomplet.setValue,
19
- clearSuggestions = _usePlacesAutocomplet.clearSuggestions;
20
- var _useState = useState(getStorageItem('selectedCommute', '')),
21
- _useState2 = _slicedToArray(_useState, 2),
22
- selected = _useState2[0],
23
- setSelected = _useState2[1];
24
- var inputRef = useRef(null);
25
- var _useMapList = useMapList(),
26
- setCommuteLocation = _useMapList.setCommuteLocation,
27
- commuteLocation = _useMapList.commuteLocation;
28
- var _useState3 = useState(getStorageItem('isCurrentLocation', false)),
29
- _useState4 = _slicedToArray(_useState3, 2),
30
- isCurrentLocation = _useState4[0],
31
- setIsCurrentLocation = _useState4[1];
32
- useEffect(function () {
33
- if (commuteLocation !== null && commuteLocation != '') return;
34
- setIsCurrentLocation(false);
35
- localStorage.removeItem('isCurrentLocation');
36
- localStorage.removeItem('selectedCommute');
37
- setSelected("");
38
- }, [commuteLocation]);
39
- var handleSelect = /*#__PURE__*/function () {
40
- var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(val) {
41
- var isCurrLocation,
42
- results,
43
- _yield$getLatLng,
44
- lat,
45
- lng,
46
- _args = arguments;
47
- return _regeneratorRuntime().wrap(function _callee$(_context) {
48
- while (1) switch (_context.prev = _context.next) {
49
- case 0:
50
- isCurrLocation = _args.length > 1 && _args[1] !== undefined ? _args[1] : false;
51
- setValue(val, false);
52
- setSelected(val);
53
- localStorage.setItem('selectedCommute', val);
54
- clearSuggestions();
55
- if (!isCurrLocation) {
56
- _context.next = 7;
57
- break;
58
- }
59
- return _context.abrupt("return");
60
- case 7:
61
- _context.prev = 7;
62
- _context.next = 10;
63
- return getGeocode({
64
- address: val
65
- });
66
- case 10:
67
- results = _context.sent;
68
- _context.next = 13;
69
- return getLatLng(results[0]);
70
- case 13:
71
- _yield$getLatLng = _context.sent;
72
- lat = _yield$getLatLng.lat;
73
- lng = _yield$getLatLng.lng;
74
- setCommuteLocation({
75
- lat: lat,
76
- lng: lng
77
- });
78
- _context.next = 21;
79
- break;
80
- case 19:
81
- _context.prev = 19;
82
- _context.t0 = _context["catch"](7);
83
- case 21:
84
- case "end":
85
- return _context.stop();
86
- }
87
- }, _callee, null, [[7, 19]]);
88
- }));
89
- return function handleSelect(_x) {
90
- return _ref2.apply(this, arguments);
91
- };
92
- }();
93
- var fetchLocation = function fetchLocation() {
94
- if (!navigator.geolocation) {
95
- console.error("Geolocation is not supported by this browser.");
96
- return;
97
- }
98
- navigator.geolocation.getCurrentPosition(function (position) {
99
- setCommuteLocation({
100
- lat: position.coords.latitude,
101
- lng: position.coords.longitude
102
- });
103
- handleSelect("Current Location");
104
- }, function (error) {
105
- console.error("Error fetching location", error);
106
- });
107
- };
108
- return /*#__PURE__*/React.createElement("div", {
109
- className: "relative ".concat(className !== null && className !== void 0 ? className : "")
110
- }, /*#__PURE__*/React.createElement("label", {
111
- htmlFor: "commute",
112
- className: "hc-flex hc-items-center hc-gap-2 hc-mb-2 hc-text-xs hc-uppercase hc-font-bold hc-text-uiText"
113
- }, /*#__PURE__*/React.createElement(IconContained, {
114
- icon: "ri:pin-distance-fill",
115
- size: "hc-size-5",
116
- className: "hc-text-uiAccent/30"
117
- }), /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement("span", {
118
- className: "md:hc-hidden lg:hc-inline"
119
- }, "Calculate your"), " commute")), /*#__PURE__*/React.createElement(Combobox, {
120
- value: selected,
121
- onChange: handleSelect
122
- }, /*#__PURE__*/React.createElement("div", {
123
- className: "hc-relative hc-mt-1"
124
- }, /*#__PURE__*/React.createElement("div", {
125
- className: "hc-relative hc-flex hc-items-center hc-w-full hc-pr-2 hc-cursor-default hc-overflow-hidden hc-rounded hc-bg-white hc-text-left hc-border hc-border-uiAccent/20 focus-within:hc-ring-1 focus-within:hc-ring-uiAccent focus:hc-outline-none"
126
- }, /*#__PURE__*/React.createElement(Combobox.Input, {
127
- className: "hc-w-full hc-border-none hc-py-2 hc-pl-4 hc-pr-1 hc-text-sm hc-leading-5 hc-text-gray-900 focus:hc-ring-0 placeholder:hc-text-gray-400",
128
- onChange: function onChange(e) {
129
- setValue(e.target.value);
130
- setSelected(e.target.value);
131
- },
132
- value: selected,
133
- disabled: !ready,
134
- placeholder: "Starting point",
135
- ref: inputRef
136
- }), /*#__PURE__*/React.createElement(Button.Btn, {
137
- variant: "icon",
138
- size: "sqsm",
139
- onClick: function onClick() {
140
- setIsCurrentLocation(!isCurrentLocation);
141
- localStorage.setItem('isCurrentLocation', !isCurrentLocation);
142
- if (isCurrentLocation || commuteLocation) {
143
- setCommuteLocation("");
144
- setSelected("");
145
- } else if (!commuteLocation) {
146
- fetchLocation();
147
- }
148
- },
149
- className: ""
150
- }, /*#__PURE__*/React.createElement("span", {
151
- className: "hc-sr-only"
152
- }, "Use your location"), commuteLocation ? /*#__PURE__*/React.createElement(IconContained, {
153
- icon: "mdi:times"
154
- }) : /*#__PURE__*/React.createElement(Button.Icon, {
155
- className: isCurrentLocation ? 'hc-text-blue-500' : 'hc-text-current',
156
- icon: "mdi:hc-my-location"
157
- }))), /*#__PURE__*/React.createElement(Transition, {
158
- as: Fragment,
159
- leave: "hc-transition hc-ease-in hc-duration-100",
160
- leaveFrom: "hc-opacity-100",
161
- leaveTo: "hc-opacity-0",
162
- afterLeave: clearSuggestions
163
- }, /*#__PURE__*/React.createElement(Combobox.Options, {
164
- className: "hc-absolute hc-z-20 hc-mt-1 hc-max-h-60 hc-w-full hc-overflow-auto hc-rounded hc-bg-white hc-py-1 hc-text-base hc-shadow hc-ring-1 hc-ring-uiAccent/10 focus:hc-outline-none sm:hc-text-sm"
165
- }, status === "OK" && data.map(function (data) {
166
- return /*#__PURE__*/React.createElement(Combobox.Option, {
167
- key: data.place_id,
168
- value: data.description,
169
- className: function className(_ref3) {
170
- var active = _ref3.active;
171
- return "hc-relative hc-cursor-default hc-select-none hc-px-4 hc-py-2 ".concat(active ? "hc-bg-primary hc-text-white" : "hc-text-uiText");
172
- }
173
- }, function (_ref4) {
174
- var selected = _ref4.selected;
175
- _ref4.active;
176
- return /*#__PURE__*/React.createElement("span", {
177
- className: "hc-block hc-truncate ".concat(selected ? "hc-font-bold" : "hc-font-medium")
178
- }, data.description);
179
- });
180
- }))))));
181
- };
182
-
183
- export { FilterCommute as default };
184
- //# sourceMappingURL=commute.js.map
1
+ import { slicedToArray as _slicedToArray, asyncToGenerator as _asyncToGenerator, regeneratorRuntime as _regeneratorRuntime } from '../../../_virtual/_rollupPluginBabelHelpers.js';
2
+ import React, { useState, useRef, useEffect, Fragment } from 'react';
3
+ import { Combobox, Transition } from '@headlessui/react';
4
+ import usePlacesAutocomplete, { getLatLng, getGeocode } from 'use-places-autocomplete';
5
+ import Button from '../buttons/default.js';
6
+ import IconContained from '../icon.js';
7
+ import { useMapList } from '../../../contexts/mapListContext.js';
8
+ import { getStorageItem } from '../../../util/localStorageUtil.js';
9
+
10
+ var FilterCommute = function FilterCommute(_ref) {
11
+ var className = _ref.className;
12
+ var _usePlacesAutocomplet = usePlacesAutocomplete(),
13
+ ready = _usePlacesAutocomplet.ready;
14
+ _usePlacesAutocomplet.value;
15
+ var _usePlacesAutocomplet2 = _usePlacesAutocomplet.suggestions,
16
+ status = _usePlacesAutocomplet2.status,
17
+ data = _usePlacesAutocomplet2.data,
18
+ setValue = _usePlacesAutocomplet.setValue,
19
+ clearSuggestions = _usePlacesAutocomplet.clearSuggestions;
20
+ var _useState = useState(getStorageItem('selectedCommute', '')),
21
+ _useState2 = _slicedToArray(_useState, 2),
22
+ selected = _useState2[0],
23
+ setSelected = _useState2[1];
24
+ var inputRef = useRef(null);
25
+ var _useMapList = useMapList(),
26
+ setCommuteLocation = _useMapList.setCommuteLocation,
27
+ commuteLocation = _useMapList.commuteLocation;
28
+ var _useState3 = useState(getStorageItem('isCurrentLocation', false)),
29
+ _useState4 = _slicedToArray(_useState3, 2),
30
+ isCurrentLocation = _useState4[0],
31
+ setIsCurrentLocation = _useState4[1];
32
+ useEffect(function () {
33
+ if (commuteLocation !== null && commuteLocation != '') return;
34
+ setIsCurrentLocation(false);
35
+ localStorage.removeItem('isCurrentLocation');
36
+ localStorage.removeItem('selectedCommute');
37
+ setSelected("");
38
+ }, [commuteLocation]);
39
+ var handleSelect = /*#__PURE__*/function () {
40
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(val) {
41
+ var isCurrLocation,
42
+ results,
43
+ _yield$getLatLng,
44
+ lat,
45
+ lng,
46
+ _args = arguments;
47
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
48
+ while (1) switch (_context.prev = _context.next) {
49
+ case 0:
50
+ isCurrLocation = _args.length > 1 && _args[1] !== undefined ? _args[1] : false;
51
+ setValue(val, false);
52
+ setSelected(val);
53
+ localStorage.setItem('selectedCommute', val);
54
+ clearSuggestions();
55
+ if (!isCurrLocation) {
56
+ _context.next = 7;
57
+ break;
58
+ }
59
+ return _context.abrupt("return");
60
+ case 7:
61
+ _context.prev = 7;
62
+ _context.next = 10;
63
+ return getGeocode({
64
+ address: val
65
+ });
66
+ case 10:
67
+ results = _context.sent;
68
+ _context.next = 13;
69
+ return getLatLng(results[0]);
70
+ case 13:
71
+ _yield$getLatLng = _context.sent;
72
+ lat = _yield$getLatLng.lat;
73
+ lng = _yield$getLatLng.lng;
74
+ setCommuteLocation({
75
+ lat: lat,
76
+ lng: lng
77
+ });
78
+ _context.next = 21;
79
+ break;
80
+ case 19:
81
+ _context.prev = 19;
82
+ _context.t0 = _context["catch"](7);
83
+ case 21:
84
+ case "end":
85
+ return _context.stop();
86
+ }
87
+ }, _callee, null, [[7, 19]]);
88
+ }));
89
+ return function handleSelect(_x) {
90
+ return _ref2.apply(this, arguments);
91
+ };
92
+ }();
93
+ var fetchLocation = function fetchLocation() {
94
+ if (!navigator.geolocation) {
95
+ console.error("Geolocation is not supported by this browser.");
96
+ return;
97
+ }
98
+ navigator.geolocation.getCurrentPosition(function (position) {
99
+ setCommuteLocation({
100
+ lat: position.coords.latitude,
101
+ lng: position.coords.longitude
102
+ });
103
+ handleSelect("Current Location");
104
+ }, function (error) {
105
+ console.error("Error fetching location", error);
106
+ });
107
+ };
108
+ return /*#__PURE__*/React.createElement("div", {
109
+ className: "relative ".concat(className !== null && className !== void 0 ? className : "")
110
+ }, /*#__PURE__*/React.createElement("label", {
111
+ htmlFor: "commute",
112
+ className: "hc-flex hc-items-center hc-gap-2 hc-mb-2 hc-text-xs hc-uppercase hc-font-bold hc-text-uiText"
113
+ }, /*#__PURE__*/React.createElement(IconContained, {
114
+ icon: "ri:pin-distance-fill",
115
+ size: "hc-size-5",
116
+ className: "hc-text-uiAccent/30"
117
+ }), /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement("span", {
118
+ className: "md:hc-hidden lg:hc-inline"
119
+ }, "Calculate your"), " commute")), /*#__PURE__*/React.createElement(Combobox, {
120
+ value: selected,
121
+ onChange: handleSelect
122
+ }, /*#__PURE__*/React.createElement("div", {
123
+ className: "hc-relative hc-mt-1"
124
+ }, /*#__PURE__*/React.createElement("div", {
125
+ className: "hc-relative hc-flex hc-items-center hc-w-full hc-pr-2 hc-cursor-default hc-overflow-hidden hc-rounded hc-bg-white hc-text-left hc-border hc-border-uiAccent/20 focus-within:hc-ring-1 focus-within:hc-ring-uiAccent focus:hc-outline-none"
126
+ }, /*#__PURE__*/React.createElement(Combobox.Input, {
127
+ className: "hc-w-full hc-border-none hc-py-2 hc-pl-4 hc-pr-1 hc-text-sm hc-leading-5 hc-text-gray-900 focus:hc-ring-0 placeholder:hc-text-gray-400",
128
+ onChange: function onChange(e) {
129
+ setValue(e.target.value);
130
+ setSelected(e.target.value);
131
+ },
132
+ value: selected,
133
+ disabled: !ready,
134
+ placeholder: "Starting point",
135
+ ref: inputRef
136
+ }), /*#__PURE__*/React.createElement(Button.Btn, {
137
+ variant: "icon",
138
+ size: "sqsm",
139
+ onClick: function onClick() {
140
+ setIsCurrentLocation(!isCurrentLocation);
141
+ localStorage.setItem('isCurrentLocation', !isCurrentLocation);
142
+ if (isCurrentLocation || commuteLocation) {
143
+ setCommuteLocation("");
144
+ setSelected("");
145
+ } else if (!commuteLocation) {
146
+ fetchLocation();
147
+ }
148
+ },
149
+ className: ""
150
+ }, /*#__PURE__*/React.createElement("span", {
151
+ className: "hc-sr-only"
152
+ }, "Use your location"), commuteLocation ? /*#__PURE__*/React.createElement(IconContained, {
153
+ icon: "mdi:times"
154
+ }) : /*#__PURE__*/React.createElement(Button.Icon, {
155
+ className: isCurrentLocation ? 'hc-text-blue-500' : 'hc-text-current',
156
+ icon: "mdi:hc-my-location"
157
+ }))), /*#__PURE__*/React.createElement(Transition, {
158
+ as: Fragment,
159
+ leave: "hc-transition hc-ease-in hc-duration-100",
160
+ leaveFrom: "hc-opacity-100",
161
+ leaveTo: "hc-opacity-0",
162
+ afterLeave: clearSuggestions
163
+ }, /*#__PURE__*/React.createElement(Combobox.Options, {
164
+ className: "hc-absolute hc-z-20 hc-mt-1 hc-max-h-60 hc-w-full hc-overflow-auto hc-rounded hc-bg-white hc-py-1 hc-text-base hc-shadow hc-ring-1 hc-ring-uiAccent/10 focus:hc-outline-none sm:hc-text-sm"
165
+ }, status === "OK" && data.map(function (data) {
166
+ return /*#__PURE__*/React.createElement(Combobox.Option, {
167
+ key: data.place_id,
168
+ value: data.description,
169
+ className: function className(_ref3) {
170
+ var active = _ref3.active;
171
+ return "hc-relative hc-cursor-default hc-select-none hc-px-4 hc-py-2 ".concat(active ? "hc-bg-primary hc-text-white" : "hc-text-uiText");
172
+ }
173
+ }, function (_ref4) {
174
+ var selected = _ref4.selected;
175
+ _ref4.active;
176
+ return /*#__PURE__*/React.createElement("span", {
177
+ className: "hc-block hc-truncate ".concat(selected ? "hc-font-bold" : "hc-font-medium")
178
+ }, data.description);
179
+ });
180
+ }))))));
181
+ };
182
+
183
+ export { FilterCommute as default };
184
+ //# sourceMappingURL=commute.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"commute.js","sources":["../../../../src/components/modules/filter/commute.js"],"sourcesContent":["import React, { Fragment, useRef, useState, useEffect } from 'react';\nimport { Combobox, Transition } from '@headlessui/react';\nimport usePlacesAutocomplete, { getGeocode, getLatLng } from 'use-places-autocomplete';\n\nimport Button from '~/components/modules/buttons/default';\nimport Icon from \"~/components/modules/icon\";\n\nimport { useMapList } from '~/contexts/mapListContext';\nimport { getStorageItem } from '~/util/localStorageUtil';\n\nconst FilterCommute = ({ className }) => {\n\tconst {\n\t\tready,\n\t\tvalue,\n\t\tsuggestions: { status, data },\n\t\tsetValue,\n\t\tclearSuggestions\n\t} = usePlacesAutocomplete();\n\n\tconst [selected, setSelected] = useState(getStorageItem('selectedCommute', ''));\n\tconst inputRef = useRef(null);\n\tconst { setCommuteLocation, commuteLocation } = useMapList();\n\tconst [isCurrentLocation, setIsCurrentLocation] = useState(getStorageItem('isCurrentLocation', false));\n\n\tuseEffect(() => {\n\t\tif (commuteLocation !== null && commuteLocation != '') return;\n\t\tsetIsCurrentLocation(false);\n\t\tlocalStorage.removeItem('isCurrentLocation');\n\t\tlocalStorage.removeItem('selectedCommute');\n\t\tsetSelected(\"\");\n\t}, [commuteLocation]);\n\n\tconst handleSelect = async (val, isCurrLocation = false) => {\n\t\tsetValue(val, false);\n\t\tsetSelected(val);\n\t\tlocalStorage.setItem('selectedCommute', val);\n\t\tclearSuggestions();\n\t\tif (isCurrLocation) return;\n\t\ttry {\n\t\t\tconst results = await getGeocode({ address: val });\n\t\t\tconst { lat, lng } = await getLatLng(results[0]);\n\t\t\tsetCommuteLocation({ lat, lng });\n\t\t} catch (error) { }\n\t};\n\n\tconst fetchLocation = () => {\n\t\tif (!navigator.geolocation) {\n\t\t\tconsole.error(\"Geolocation is not supported by this browser.\");\n\t\t\treturn;\n\t\t}\n\t\tnavigator.geolocation.getCurrentPosition(\n\t\t\tposition => {\n\t\t\t\tsetCommuteLocation({\n\t\t\t\t\tlat: position.coords.latitude,\n\t\t\t\t\tlng: position.coords.longitude\n\t\t\t\t});\n\t\t\t\thandleSelect(\"Current Location\");\n\t\t\t},\n\t\t\terror => {\n\t\t\t\tconsole.error(\"Error fetching location\", error);\n\t\t\t},\n\t\t);\n\t};\n\n\treturn (\n\t\t<div className={`relative ${className ?? \"\"}`}>\n\t\t\t<label\n\t\t\t\thtmlFor=\"commute\"\n\t\t\t\tclassName=\"hc-flex hc-items-center hc-gap-2 hc-mb-2 hc-text-xs hc-uppercase hc-font-bold hc-text-uiText\"\n\t\t\t>\n\t\t\t\t<Icon\n\t\t\t\t\ticon=\"ri:pin-distance-fill\"\n\t\t\t\t\tsize=\"hc-size-5\"\n\t\t\t\t\tclassName=\"hc-text-uiAccent/30\"\n\t\t\t\t/>\n\t\t\t\t<span>\n\t\t\t\t\t<span className=\"md:hc-hidden lg:hc-inline\">Calculate your</span> commute\n\t\t\t\t</span>\n\t\t\t</label>\n\n\t\t\t<Combobox value={selected} onChange={handleSelect}>\n\t\t\t\t<div className=\"hc-relative hc-mt-1\">\n\t\t\t\t\t<div className=\"hc-relative hc-flex hc-items-center hc-w-full hc-pr-2 hc-cursor-default hc-overflow-hidden hc-rounded hc-bg-white hc-text-left hc-border hc-border-uiAccent/20 focus-within:hc-ring-1 focus-within:hc-ring-uiAccent focus:hc-outline-none\">\n\t\t\t\t\t\t<Combobox.Input\n\t\t\t\t\t\t\tclassName=\"hc-w-full hc-border-none hc-py-2 hc-pl-4 hc-pr-1 hc-text-sm hc-leading-5 hc-text-gray-900 focus:hc-ring-0 placeholder:hc-text-gray-400\"\n\t\t\t\t\t\t\tonChange={e => {\n\t\t\t\t\t\t\t\tsetValue(e.target.value);\n\t\t\t\t\t\t\t\tsetSelected(e.target.value);\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tvalue={selected}\n\t\t\t\t\t\t\tdisabled={!ready}\n\t\t\t\t\t\t\tplaceholder=\"Starting point\"\n\t\t\t\t\t\t\tref={inputRef}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<Button.Btn\n\t\t\t\t\t\t\tvariant=\"icon\"\n\t\t\t\t\t\t\tsize=\"sqsm\"\n\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\tsetIsCurrentLocation(!isCurrentLocation);\n\t\t\t\t\t\t\t\tlocalStorage.setItem('isCurrentLocation', !isCurrentLocation);\n\t\t\t\t\t\t\t\tif (isCurrentLocation || commuteLocation) {\n\t\t\t\t\t\t\t\t\tsetCommuteLocation(\"\");\n\t\t\t\t\t\t\t\t\tsetSelected(\"\");\n\t\t\t\t\t\t\t\t} else if (!commuteLocation) { fetchLocation(); }\n\t\t\t\t\t\t\t}}\n\n\t\t\t\t\t\t\tclassName=\"\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<span className=\"hc-sr-only\">Use your location</span>\n\t\t\t\t\t\t\t{commuteLocation ? <Icon icon=\"mdi:times\"></Icon> : <Button.Icon className={isCurrentLocation ? 'hc-text-blue-500' : 'hc-text-current'} icon=\"mdi:hc-my-location\" />}\n\t\t\t\t\t\t</Button.Btn>\n\t\t\t\t\t</div>\n\t\t\t\t\t<Transition\n\t\t\t\t\t\tas={Fragment}\n\t\t\t\t\t\tleave=\"hc-transition hc-ease-in hc-duration-100\"\n\t\t\t\t\t\tleaveFrom=\"hc-opacity-100\"\n\t\t\t\t\t\tleaveTo=\"hc-opacity-0\"\n\t\t\t\t\t\tafterLeave={clearSuggestions}\n\t\t\t\t\t>\n\t\t\t\t\t\t<Combobox.Options className=\"hc-absolute hc-z-20 hc-mt-1 hc-max-h-60 hc-w-full hc-overflow-auto hc-rounded hc-bg-white hc-py-1 hc-text-base hc-shadow hc-ring-1 hc-ring-uiAccent/10 focus:hc-outline-none sm:hc-text-sm\">\n\t\t\t\t\t\t\t{status === \"OK\" &&\n\t\t\t\t\t\t\t\tdata.map(data => (\n\t\t\t\t\t\t\t\t\t<Combobox.Option\n\t\t\t\t\t\t\t\t\t\tkey={data.place_id}\n\t\t\t\t\t\t\t\t\t\tvalue={data.description}\n\t\t\t\t\t\t\t\t\t\tclassName={({ active }) =>\n\t\t\t\t\t\t\t\t\t\t\t`hc-relative hc-cursor-default hc-select-none hc-px-4 hc-py-2 ${active ? \"hc-bg-primary hc-text-white\" : \"hc-text-uiText\"\n\t\t\t\t\t\t\t\t\t\t\t}`\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{({ selected, active }) => (\n\t\t\t\t\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\t\t\t\t\tclassName={`hc-block hc-truncate ${selected ? \"hc-font-bold\" : \"hc-font-medium\"}`}\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t{data.description}\n\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t</Combobox.Option>\n\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t</Combobox.Options>\n\t\t\t\t\t</Transition>\n\t\t\t\t</div>\n\t\t\t</Combobox>\n\t\t</div>\n\t);\n};\n\nexport default FilterCommute;\n"],"names":["FilterCommute","_ref","className","_usePlacesAutocomplet","usePlacesAutocomplete","ready","value","_usePlacesAutocomplet2","suggestions","status","data","setValue","clearSuggestions","_useState","useState","getStorageItem","_useState2","_slicedToArray","selected","setSelected","inputRef","useRef","_useMapList","useMapList","setCommuteLocation","commuteLocation","_useState3","_useState4","isCurrentLocation","setIsCurrentLocation","useEffect","localStorage","removeItem","handleSelect","_ref2","_asyncToGenerator","_regeneratorRuntime","mark","_callee","val","isCurrLocation","results","_yield$getLatLng","lat","lng","_args","arguments","wrap","_callee$","_context","prev","next","length","undefined","setItem","abrupt","getGeocode","address","sent","getLatLng","t0","stop","_x","apply","fetchLocation","navigator","geolocation","console","error","getCurrentPosition","position","coords","latitude","longitude","React","createElement","concat","htmlFor","Icon","icon","size","Combobox","onChange","Input","e","target","disabled","placeholder","ref","Button","Btn","variant","onClick","Transition","as","Fragment","leave","leaveFrom","leaveTo","afterLeave","Options","map","Option","key","place_id","description","_ref3","active","_ref4"],"mappings":";;;;;;;;;AAUA,IAAMA,aAAa,GAAG,SAAhBA,aAAaA,CAAAC,IAAA,EAA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AA,EAAA;AAAA,QAAA,IAAGC,MAAM,GAAAD,KAAA,CAANC,MAAM,CAAA;AAAA,QAAA,OAAA,+DAAA,CAAA/B,MAAA,CAC6C+B,MAAM,GAAG,6BAA6B,GAAG,gBAAgB,CAAA,CAAA;AAAA,OAAA;AAEzH,KAAA,EAEA,UAAAC,KAAA,EAAA;AAAA,MAAA,IAAG1F,QAAQ,GAAA0F,KAAA,CAAR1F,QAAQ,CAAA;QAAQ0F,KAAA,CAAND,OAAM;MAAA,oBACnBjC,KAAA,CAAAC,aAAA,CAAA,MAAA,EAAA;AACCzE,QAAAA,SAAS,0BAAA0E,MAAA,CAA0B1D,QAAQ,GAAG,cAAc,GAAG,gBAAgB,CAAA;OAE9ER,EAAAA,IAAI,CAAC+F,WACD,CAAC,CAAA;AAAA,KAEQ,CAAC,CAAA;AAAA,GAClB,CACe,CACP,CACR,CACI,CACN,CAAC,CAAA;AAER;;;;"}
1
+ {"version":3,"file":"commute.js","sources":["../../../../src/components/modules/filter/commute.js"],"sourcesContent":["import React, { Fragment, useRef, useState, useEffect } from 'react';\r\nimport { Combobox, Transition } from '@headlessui/react';\r\nimport usePlacesAutocomplete, { getGeocode, getLatLng } from 'use-places-autocomplete';\r\n\r\nimport Button from '~/components/modules/buttons/default';\r\nimport Icon from \"~/components/modules/icon\";\r\n\r\nimport { useMapList } from '~/contexts/mapListContext';\r\nimport { getStorageItem } from '~/util/localStorageUtil';\r\n\r\nconst FilterCommute = ({ className }) => {\r\n\tconst {\r\n\t\tready,\r\n\t\tvalue,\r\n\t\tsuggestions: { status, data },\r\n\t\tsetValue,\r\n\t\tclearSuggestions\r\n\t} = usePlacesAutocomplete();\r\n\r\n\tconst [selected, setSelected] = useState(getStorageItem('selectedCommute', ''));\r\n\tconst inputRef = useRef(null);\r\n\tconst { setCommuteLocation, commuteLocation } = useMapList();\r\n\tconst [isCurrentLocation, setIsCurrentLocation] = useState(getStorageItem('isCurrentLocation', false));\r\n\r\n\tuseEffect(() => {\r\n\t\tif (commuteLocation !== null && commuteLocation != '') return;\r\n\t\tsetIsCurrentLocation(false);\r\n\t\tlocalStorage.removeItem('isCurrentLocation');\r\n\t\tlocalStorage.removeItem('selectedCommute');\r\n\t\tsetSelected(\"\");\r\n\t}, [commuteLocation]);\r\n\r\n\tconst handleSelect = async (val, isCurrLocation = false) => {\r\n\t\tsetValue(val, false);\r\n\t\tsetSelected(val);\r\n\t\tlocalStorage.setItem('selectedCommute', val);\r\n\t\tclearSuggestions();\r\n\t\tif (isCurrLocation) return;\r\n\t\ttry {\r\n\t\t\tconst results = await getGeocode({ address: val });\r\n\t\t\tconst { lat, lng } = await getLatLng(results[0]);\r\n\t\t\tsetCommuteLocation({ lat, lng });\r\n\t\t} catch (error) { }\r\n\t};\r\n\r\n\tconst fetchLocation = () => {\r\n\t\tif (!navigator.geolocation) {\r\n\t\t\tconsole.error(\"Geolocation is not supported by this browser.\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tnavigator.geolocation.getCurrentPosition(\r\n\t\t\tposition => {\r\n\t\t\t\tsetCommuteLocation({\r\n\t\t\t\t\tlat: position.coords.latitude,\r\n\t\t\t\t\tlng: position.coords.longitude\r\n\t\t\t\t});\r\n\t\t\t\thandleSelect(\"Current Location\");\r\n\t\t\t},\r\n\t\t\terror => {\r\n\t\t\t\tconsole.error(\"Error fetching location\", error);\r\n\t\t\t},\r\n\t\t);\r\n\t};\r\n\r\n\treturn (\r\n\t\t<div className={`relative ${className ?? \"\"}`}>\r\n\t\t\t<label\r\n\t\t\t\thtmlFor=\"commute\"\r\n\t\t\t\tclassName=\"hc-flex hc-items-center hc-gap-2 hc-mb-2 hc-text-xs hc-uppercase hc-font-bold hc-text-uiText\"\r\n\t\t\t>\r\n\t\t\t\t<Icon\r\n\t\t\t\t\ticon=\"ri:pin-distance-fill\"\r\n\t\t\t\t\tsize=\"hc-size-5\"\r\n\t\t\t\t\tclassName=\"hc-text-uiAccent/30\"\r\n\t\t\t\t/>\r\n\t\t\t\t<span>\r\n\t\t\t\t\t<span className=\"md:hc-hidden lg:hc-inline\">Calculate your</span> commute\r\n\t\t\t\t</span>\r\n\t\t\t</label>\r\n\r\n\t\t\t<Combobox value={selected} onChange={handleSelect}>\r\n\t\t\t\t<div className=\"hc-relative hc-mt-1\">\r\n\t\t\t\t\t<div className=\"hc-relative hc-flex hc-items-center hc-w-full hc-pr-2 hc-cursor-default hc-overflow-hidden hc-rounded hc-bg-white hc-text-left hc-border hc-border-uiAccent/20 focus-within:hc-ring-1 focus-within:hc-ring-uiAccent focus:hc-outline-none\">\r\n\t\t\t\t\t\t<Combobox.Input\r\n\t\t\t\t\t\t\tclassName=\"hc-w-full hc-border-none hc-py-2 hc-pl-4 hc-pr-1 hc-text-sm hc-leading-5 hc-text-gray-900 focus:hc-ring-0 placeholder:hc-text-gray-400\"\r\n\t\t\t\t\t\t\tonChange={e => {\r\n\t\t\t\t\t\t\t\tsetValue(e.target.value);\r\n\t\t\t\t\t\t\t\tsetSelected(e.target.value);\r\n\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t\tvalue={selected}\r\n\t\t\t\t\t\t\tdisabled={!ready}\r\n\t\t\t\t\t\t\tplaceholder=\"Starting point\"\r\n\t\t\t\t\t\t\tref={inputRef}\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t<Button.Btn\r\n\t\t\t\t\t\t\tvariant=\"icon\"\r\n\t\t\t\t\t\t\tsize=\"sqsm\"\r\n\t\t\t\t\t\t\tonClick={() => {\r\n\t\t\t\t\t\t\t\tsetIsCurrentLocation(!isCurrentLocation);\r\n\t\t\t\t\t\t\t\tlocalStorage.setItem('isCurrentLocation', !isCurrentLocation);\r\n\t\t\t\t\t\t\t\tif (isCurrentLocation || commuteLocation) {\r\n\t\t\t\t\t\t\t\t\tsetCommuteLocation(\"\");\r\n\t\t\t\t\t\t\t\t\tsetSelected(\"\");\r\n\t\t\t\t\t\t\t\t} else if (!commuteLocation) { fetchLocation(); }\r\n\t\t\t\t\t\t\t}}\r\n\r\n\t\t\t\t\t\t\tclassName=\"\"\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t<span className=\"hc-sr-only\">Use your location</span>\r\n\t\t\t\t\t\t\t{commuteLocation ? <Icon icon=\"mdi:times\"></Icon> : <Button.Icon className={isCurrentLocation ? 'hc-text-blue-500' : 'hc-text-current'} icon=\"mdi:hc-my-location\" />}\r\n\t\t\t\t\t\t</Button.Btn>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<Transition\r\n\t\t\t\t\t\tas={Fragment}\r\n\t\t\t\t\t\tleave=\"hc-transition hc-ease-in hc-duration-100\"\r\n\t\t\t\t\t\tleaveFrom=\"hc-opacity-100\"\r\n\t\t\t\t\t\tleaveTo=\"hc-opacity-0\"\r\n\t\t\t\t\t\tafterLeave={clearSuggestions}\r\n\t\t\t\t\t>\r\n\t\t\t\t\t\t<Combobox.Options className=\"hc-absolute hc-z-20 hc-mt-1 hc-max-h-60 hc-w-full hc-overflow-auto hc-rounded hc-bg-white hc-py-1 hc-text-base hc-shadow hc-ring-1 hc-ring-uiAccent/10 focus:hc-outline-none sm:hc-text-sm\">\r\n\t\t\t\t\t\t\t{status === \"OK\" &&\r\n\t\t\t\t\t\t\t\tdata.map(data => (\r\n\t\t\t\t\t\t\t\t\t<Combobox.Option\r\n\t\t\t\t\t\t\t\t\t\tkey={data.place_id}\r\n\t\t\t\t\t\t\t\t\t\tvalue={data.description}\r\n\t\t\t\t\t\t\t\t\t\tclassName={({ active }) =>\r\n\t\t\t\t\t\t\t\t\t\t\t`hc-relative hc-cursor-default hc-select-none hc-px-4 hc-py-2 ${active ? \"hc-bg-primary hc-text-white\" : \"hc-text-uiText\"\r\n\t\t\t\t\t\t\t\t\t\t\t}`\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\t\t\t{({ selected, active }) => (\r\n\t\t\t\t\t\t\t\t\t\t\t<span\r\n\t\t\t\t\t\t\t\t\t\t\t\tclassName={`hc-block hc-truncate ${selected ? \"hc-font-bold\" : \"hc-font-medium\"}`}\r\n\t\t\t\t\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\t\t\t\t\t{data.description}\r\n\t\t\t\t\t\t\t\t\t\t\t</span>\r\n\t\t\t\t\t\t\t\t\t\t)}\r\n\t\t\t\t\t\t\t\t\t</Combobox.Option>\r\n\t\t\t\t\t\t\t\t))}\r\n\t\t\t\t\t\t</Combobox.Options>\r\n\t\t\t\t\t</Transition>\r\n\t\t\t\t</div>\r\n\t\t\t</Combobox>\r\n\t\t</div>\r\n\t);\r\n};\r\n\r\nexport default FilterCommute;\r\n"],"names":["FilterCommute","_ref","className","_usePlacesAutocomplet","usePlacesAutocomplete","ready","value","_usePlacesAutocomplet2","suggestions","status","data","setValue","clearSuggestions","_useState","useState","getStorageItem","_useState2","_slicedToArray","selected","setSelected","inputRef","useRef","_useMapList","useMapList","setCommuteLocation","commuteLocation","_useState3","_useState4","isCurrentLocation","setIsCurrentLocation","useEffect","localStorage","removeItem","handleSelect","_ref2","_asyncToGenerator","_regeneratorRuntime","mark","_callee","val","isCurrLocation","results","_yield$getLatLng","lat","lng","_args","arguments","wrap","_callee$","_context","prev","next","length","undefined","setItem","abrupt","getGeocode","address","sent","getLatLng","t0","stop","_x","apply","fetchLocation","navigator","geolocation","console","error","getCurrentPosition","position","coords","latitude","longitude","React","createElement","concat","htmlFor","Icon","icon","size","Combobox","onChange","Input","e","target","disabled","placeholder","ref","Button","Btn","variant","onClick","Transition","as","Fragment","leave","leaveFrom","leaveTo","afterLeave","Options","map","Option","key","place_id","description","_ref3","active","_ref4"],"mappings":";;;;;;;;;AAUA,IAAMA,aAAa,GAAG,SAAhBA,aAAaA,CAAAC,IAAA,EAAsB;AAAA,EAAA,IAAhBC,SAAS,GAAAD,IAAA,CAATC,SAAS,CAAA;AACjC,EAAA,IAAAC,qBAAA,GAMIC,qBAAqB,EAAE,CAAA;IAL1BC,KAAK,GAA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