@next-degree/pickle-shared-js 0.4.31 → 0.6.43

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 (247) hide show
  1. package/dist/company_service_latest-Dwf4Fkjr.d.cts +2641 -0
  2. package/dist/company_service_latest-Dwf4Fkjr.d.ts +2641 -0
  3. package/dist/components/buttons/BackButton.cjs +161 -0
  4. package/dist/components/buttons/BackButton.cjs.map +1 -0
  5. package/dist/components/buttons/BackButton.d.cts +9 -0
  6. package/dist/components/buttons/BackButton.d.ts +9 -0
  7. package/dist/components/buttons/BackButton.js +137 -0
  8. package/dist/components/buttons/BackButton.js.map +1 -0
  9. package/dist/components/company/CompanyBenefits.cjs +38 -0
  10. package/dist/components/company/CompanyBenefits.cjs.map +1 -0
  11. package/dist/components/company/CompanyBenefits.d.cts +8 -0
  12. package/dist/components/company/CompanyBenefits.d.ts +8 -0
  13. package/dist/components/company/CompanyBenefits.js +13 -0
  14. package/dist/components/company/CompanyBenefits.js.map +1 -0
  15. package/dist/components/company/CompanyInformation.cjs +112 -0
  16. package/dist/components/company/CompanyInformation.cjs.map +1 -0
  17. package/dist/components/company/CompanyInformation.d.cts +12 -0
  18. package/dist/components/company/CompanyInformation.d.ts +12 -0
  19. package/dist/components/company/CompanyInformation.js +75 -0
  20. package/dist/components/company/CompanyInformation.js.map +1 -0
  21. package/dist/components/company/CompanyTake.cjs +140 -0
  22. package/dist/components/company/CompanyTake.cjs.map +1 -0
  23. package/dist/components/company/CompanyTake.d.cts +9 -0
  24. package/dist/components/company/CompanyTake.d.ts +9 -0
  25. package/dist/components/company/CompanyTake.js +104 -0
  26. package/dist/components/company/CompanyTake.js.map +1 -0
  27. package/dist/components/jobPost/JobDescription.cjs +205 -0
  28. package/dist/components/jobPost/JobDescription.cjs.map +1 -0
  29. package/dist/components/jobPost/JobDescription.d.cts +8 -0
  30. package/dist/components/jobPost/JobDescription.d.ts +8 -0
  31. package/dist/components/jobPost/JobDescription.js +168 -0
  32. package/dist/components/jobPost/JobDescription.js.map +1 -0
  33. package/dist/components/jobPost/JobHeader.cjs +436 -0
  34. package/dist/components/jobPost/JobHeader.cjs.map +1 -0
  35. package/dist/components/jobPost/JobHeader.d.cts +26 -0
  36. package/dist/components/jobPost/JobHeader.d.ts +26 -0
  37. package/dist/components/jobPost/JobHeader.js +423 -0
  38. package/dist/components/jobPost/JobHeader.js.map +1 -0
  39. package/dist/components/jobPost/JobPost.cjs +1349 -0
  40. package/dist/components/jobPost/JobPost.cjs.map +1 -0
  41. package/dist/components/jobPost/JobPost.d.cts +16 -0
  42. package/dist/components/jobPost/JobPost.d.ts +16 -0
  43. package/dist/components/jobPost/JobPost.js +1336 -0
  44. package/dist/components/jobPost/JobPost.js.map +1 -0
  45. package/dist/components/primitives/avatar.cjs +88 -0
  46. package/dist/components/primitives/avatar.cjs.map +1 -0
  47. package/dist/components/primitives/avatar.d.cts +13 -0
  48. package/dist/components/primitives/avatar.d.ts +13 -0
  49. package/dist/components/primitives/avatar.js +52 -0
  50. package/dist/components/primitives/avatar.js.map +1 -0
  51. package/dist/components/primitives/command.d.cts +3 -3
  52. package/dist/components/primitives/command.d.ts +3 -3
  53. package/dist/components/ui/Avatar.cjs +117 -0
  54. package/dist/components/ui/Avatar.cjs.map +1 -0
  55. package/dist/components/ui/Avatar.d.cts +16 -0
  56. package/dist/components/ui/Avatar.d.ts +16 -0
  57. package/dist/components/ui/Avatar.js +79 -0
  58. package/dist/components/ui/Avatar.js.map +1 -0
  59. package/dist/components/ui/Icon.cjs +114 -0
  60. package/dist/components/ui/Icon.cjs.map +1 -0
  61. package/dist/components/ui/Icon.d.cts +15 -0
  62. package/dist/components/ui/Icon.d.ts +15 -0
  63. package/dist/components/ui/Icon.js +89 -0
  64. package/dist/components/ui/Icon.js.map +1 -0
  65. package/dist/{app/layout.cjs → components/ui/LinkButton.cjs} +25 -35
  66. package/dist/components/ui/LinkButton.cjs.map +1 -0
  67. package/dist/components/ui/LinkButton.d.cts +29 -0
  68. package/dist/components/ui/LinkButton.d.ts +29 -0
  69. package/dist/components/ui/LinkButton.js +26 -0
  70. package/dist/components/ui/LinkButton.js.map +1 -0
  71. package/dist/components/ui/MapComponent.cjs +54 -0
  72. package/dist/components/ui/MapComponent.cjs.map +1 -0
  73. package/dist/components/ui/MapComponent.d.cts +15 -0
  74. package/dist/components/ui/MapComponent.d.ts +15 -0
  75. package/dist/components/ui/MapComponent.js +34 -0
  76. package/dist/components/ui/MapComponent.js.map +1 -0
  77. package/dist/components/ui/PlacesQueryInput.cjs.map +1 -1
  78. package/dist/components/ui/PlacesQueryInput.js.map +1 -1
  79. package/dist/components/ui/ReadMore.cjs +194 -0
  80. package/dist/components/ui/ReadMore.cjs.map +1 -0
  81. package/dist/components/ui/ReadMore.d.cts +9 -0
  82. package/dist/components/ui/ReadMore.d.ts +9 -0
  83. package/dist/components/ui/ReadMore.js +160 -0
  84. package/dist/components/ui/ReadMore.js.map +1 -0
  85. package/dist/contexts/WindowHistoryProvider.cjs +48 -0
  86. package/dist/contexts/WindowHistoryProvider.cjs.map +1 -0
  87. package/dist/contexts/WindowHistoryProvider.d.cts +11 -0
  88. package/dist/contexts/WindowHistoryProvider.d.ts +11 -0
  89. package/dist/contexts/WindowHistoryProvider.js +23 -0
  90. package/dist/contexts/WindowHistoryProvider.js.map +1 -0
  91. package/dist/displayText-C1qKqRYc.d.cts +48 -0
  92. package/dist/displayText-D-OzRlJf.d.ts +48 -0
  93. package/dist/hooks/useDisplayText.cjs +502 -0
  94. package/dist/hooks/useDisplayText.cjs.map +1 -0
  95. package/dist/hooks/useDisplayText.d.cts +8 -0
  96. package/dist/hooks/useDisplayText.d.ts +8 -0
  97. package/dist/hooks/useDisplayText.js +477 -0
  98. package/dist/hooks/useDisplayText.js.map +1 -0
  99. package/dist/hooks/useWindowHistory.cjs +46 -0
  100. package/dist/hooks/useWindowHistory.cjs.map +1 -0
  101. package/dist/hooks/useWindowHistory.d.cts +7 -0
  102. package/dist/hooks/useWindowHistory.d.ts +7 -0
  103. package/dist/hooks/useWindowHistory.js +21 -0
  104. package/dist/hooks/useWindowHistory.js.map +1 -0
  105. package/dist/index.cjs +1564 -72
  106. package/dist/index.cjs.map +1 -1
  107. package/dist/index.d.cts +23 -0
  108. package/dist/index.d.ts +23 -0
  109. package/dist/index.js +1557 -57
  110. package/dist/index.js.map +1 -1
  111. package/dist/job_posting_service_latest-D0AsiA4a.d.cts +2789 -0
  112. package/dist/job_posting_service_latest-D0AsiA4a.d.ts +2789 -0
  113. package/dist/lib/google.cjs +44 -2
  114. package/dist/lib/google.cjs.map +1 -1
  115. package/dist/lib/google.d.cts +22 -1
  116. package/dist/lib/google.d.ts +22 -1
  117. package/dist/lib/google.js +40 -1
  118. package/dist/lib/google.js.map +1 -1
  119. package/dist/lib/icons.cjs +53 -0
  120. package/dist/lib/icons.cjs.map +1 -0
  121. package/dist/lib/icons.d.cts +27 -0
  122. package/dist/lib/icons.d.ts +27 -0
  123. package/dist/lib/icons.js +49 -0
  124. package/dist/lib/icons.js.map +1 -0
  125. package/dist/lib/locations.cjs +45 -0
  126. package/dist/lib/locations.cjs.map +1 -0
  127. package/dist/lib/locations.d.cts +8 -0
  128. package/dist/lib/locations.d.ts +8 -0
  129. package/dist/lib/locations.js +19 -0
  130. package/dist/lib/locations.js.map +1 -0
  131. package/dist/lib/mappings.cjs +443 -0
  132. package/dist/lib/mappings.cjs.map +1 -0
  133. package/dist/lib/mappings.d.cts +4 -0
  134. package/dist/lib/mappings.d.ts +4 -0
  135. package/dist/lib/mappings.js +409 -0
  136. package/dist/lib/mappings.js.map +1 -0
  137. package/dist/lib/salaryRange.cjs +90 -0
  138. package/dist/lib/salaryRange.cjs.map +1 -0
  139. package/dist/lib/salaryRange.d.cts +6 -0
  140. package/dist/lib/salaryRange.d.ts +6 -0
  141. package/dist/lib/salaryRange.js +63 -0
  142. package/dist/lib/salaryRange.js.map +1 -0
  143. package/dist/services/displayText.cjs +470 -0
  144. package/dist/services/displayText.cjs.map +1 -0
  145. package/dist/services/displayText.d.cts +4 -0
  146. package/dist/services/displayText.d.ts +4 -0
  147. package/dist/services/displayText.js +443 -0
  148. package/dist/services/displayText.js.map +1 -0
  149. package/dist/shared_pickle_output_latest-DX6GQoVn.d.cts +194 -0
  150. package/dist/shared_pickle_output_latest-DX6GQoVn.d.ts +194 -0
  151. package/dist/styles/globals.css +829 -0
  152. package/dist/styles/globals.css.map +1 -1
  153. package/dist/types/data/company_service_latest.cjs +228 -0
  154. package/dist/types/data/company_service_latest.cjs.map +1 -0
  155. package/dist/types/data/company_service_latest.d.cts +2 -0
  156. package/dist/types/data/company_service_latest.d.ts +2 -0
  157. package/dist/types/data/company_service_latest.js +186 -0
  158. package/dist/types/data/company_service_latest.js.map +1 -0
  159. package/dist/types/data/job_posting_service_latest.cjs +266 -0
  160. package/dist/types/data/job_posting_service_latest.cjs.map +1 -0
  161. package/dist/types/data/job_posting_service_latest.d.cts +2 -0
  162. package/dist/types/data/job_posting_service_latest.d.ts +2 -0
  163. package/dist/types/data/job_posting_service_latest.js +230 -0
  164. package/dist/types/data/job_posting_service_latest.js.map +1 -0
  165. package/dist/types/data/shared_pickle_output_latest.cjs +82 -0
  166. package/dist/types/data/shared_pickle_output_latest.cjs.map +1 -0
  167. package/dist/types/data/shared_pickle_output_latest.d.cts +2 -0
  168. package/dist/types/data/shared_pickle_output_latest.d.ts +2 -0
  169. package/dist/types/data/shared_pickle_output_latest.js +50 -0
  170. package/dist/types/data/shared_pickle_output_latest.js.map +1 -0
  171. package/dist/types/displayText.errors.cjs +44 -0
  172. package/dist/types/displayText.errors.cjs.map +1 -0
  173. package/dist/types/displayText.errors.d.cts +8 -0
  174. package/dist/types/displayText.errors.d.ts +8 -0
  175. package/dist/types/displayText.errors.js +18 -0
  176. package/dist/types/displayText.errors.js.map +1 -0
  177. package/package.json +20 -7
  178. package/dist/AmbitBold-3SZZPYLH.otf +0 -0
  179. package/dist/AmbitBoldItalic-JSHFTN4A.otf +0 -0
  180. package/dist/AmbitRegular-MB5U7O3L.otf +0 -0
  181. package/dist/app/layout.cjs.map +0 -1
  182. package/dist/app/layout.css +0 -1411
  183. package/dist/app/layout.css.map +0 -1
  184. package/dist/app/layout.d.cts +0 -11
  185. package/dist/app/layout.d.ts +0 -11
  186. package/dist/app/layout.js +0 -36
  187. package/dist/app/layout.js.map +0 -1
  188. package/dist/app/page.cjs +0 -1517
  189. package/dist/app/page.cjs.map +0 -1
  190. package/dist/app/page.d.cts +0 -5
  191. package/dist/app/page.d.ts +0 -5
  192. package/dist/app/page.js +0 -1491
  193. package/dist/app/page.js.map +0 -1
  194. package/dist/assets/fonts/AmbitBold.cjs +0 -3
  195. package/dist/assets/fonts/AmbitBold.cjs.map +0 -1
  196. package/dist/assets/fonts/AmbitBold.d.cts +0 -2
  197. package/dist/assets/fonts/AmbitBold.d.ts +0 -2
  198. package/dist/assets/fonts/AmbitBold.js +0 -6
  199. package/dist/assets/fonts/AmbitBold.js.map +0 -1
  200. package/dist/assets/fonts/AmbitBoldItalic.cjs +0 -3
  201. package/dist/assets/fonts/AmbitBoldItalic.cjs.map +0 -1
  202. package/dist/assets/fonts/AmbitBoldItalic.d.cts +0 -2
  203. package/dist/assets/fonts/AmbitBoldItalic.d.ts +0 -2
  204. package/dist/assets/fonts/AmbitBoldItalic.js +0 -6
  205. package/dist/assets/fonts/AmbitBoldItalic.js.map +0 -1
  206. package/dist/assets/fonts/AmbitRegular.cjs +0 -3
  207. package/dist/assets/fonts/AmbitRegular.cjs.map +0 -1
  208. package/dist/assets/fonts/AmbitRegular.d.cts +0 -2
  209. package/dist/assets/fonts/AmbitRegular.d.ts +0 -2
  210. package/dist/assets/fonts/AmbitRegular.js +0 -6
  211. package/dist/assets/fonts/AmbitRegular.js.map +0 -1
  212. package/dist/components/demos/ComboboxDemo.cjs +0 -814
  213. package/dist/components/demos/ComboboxDemo.cjs.map +0 -1
  214. package/dist/components/demos/ComboboxDemo.d.cts +0 -5
  215. package/dist/components/demos/ComboboxDemo.d.ts +0 -5
  216. package/dist/components/demos/ComboboxDemo.js +0 -786
  217. package/dist/components/demos/ComboboxDemo.js.map +0 -1
  218. package/dist/components/demos/CounterDemo.cjs +0 -270
  219. package/dist/components/demos/CounterDemo.cjs.map +0 -1
  220. package/dist/components/demos/CounterDemo.d.cts +0 -5
  221. package/dist/components/demos/CounterDemo.d.ts +0 -5
  222. package/dist/components/demos/CounterDemo.js +0 -238
  223. package/dist/components/demos/CounterDemo.js.map +0 -1
  224. package/dist/components/demos/InputDemo.cjs +0 -225
  225. package/dist/components/demos/InputDemo.cjs.map +0 -1
  226. package/dist/components/demos/InputDemo.d.cts +0 -5
  227. package/dist/components/demos/InputDemo.d.ts +0 -5
  228. package/dist/components/demos/InputDemo.js +0 -192
  229. package/dist/components/demos/InputDemo.js.map +0 -1
  230. package/dist/components/demos/PlacesQueryInputDemo.cjs +0 -341
  231. package/dist/components/demos/PlacesQueryInputDemo.cjs.map +0 -1
  232. package/dist/components/demos/PlacesQueryInputDemo.d.cts +0 -5
  233. package/dist/components/demos/PlacesQueryInputDemo.d.ts +0 -5
  234. package/dist/components/demos/PlacesQueryInputDemo.js +0 -309
  235. package/dist/components/demos/PlacesQueryInputDemo.js.map +0 -1
  236. package/dist/components/demos/SelectDemo.cjs +0 -365
  237. package/dist/components/demos/SelectDemo.cjs.map +0 -1
  238. package/dist/components/demos/SelectDemo.d.cts +0 -5
  239. package/dist/components/demos/SelectDemo.d.ts +0 -5
  240. package/dist/components/demos/SelectDemo.js +0 -337
  241. package/dist/components/demos/SelectDemo.js.map +0 -1
  242. package/dist/components/demos/index.cjs +0 -1510
  243. package/dist/components/demos/index.cjs.map +0 -1
  244. package/dist/components/demos/index.d.cts +0 -5
  245. package/dist/components/demos/index.d.ts +0 -5
  246. package/dist/components/demos/index.js +0 -1484
  247. package/dist/components/demos/index.js.map +0 -1
@@ -21,7 +21,10 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
21
21
  // src/lib/google.ts
22
22
  var google_exports = {};
23
23
  __export(google_exports, {
24
- autocomplete: () => autocomplete
24
+ autocomplete: () => autocomplete,
25
+ fetchLocation: () => fetchLocation,
26
+ geocode: () => geocode,
27
+ getPlaceDetails: () => getPlaceDetails
25
28
  });
26
29
  module.exports = __toCommonJS(google_exports);
27
30
  var import_google_maps_services_js = require("@googlemaps/google-maps-services-js");
@@ -36,8 +39,47 @@ var autocomplete = async (input, key) => {
36
39
  console.error(error);
37
40
  }
38
41
  };
42
+ var fetchLocation = async (place, key) => {
43
+ try {
44
+ if (place.place_id) {
45
+ const placeDetails = await getPlaceDetails(place.place_id, key);
46
+ if (placeDetails) return placeDetails;
47
+ }
48
+ if (place.address) {
49
+ const result = await geocode(place.address, key);
50
+ const firstAddress = result?.[0];
51
+ return firstAddress;
52
+ }
53
+ return void 0;
54
+ } catch (error) {
55
+ console.error("Error fetching location:", error);
56
+ }
57
+ };
58
+ var getPlaceDetails = async (place_id, key) => {
59
+ try {
60
+ const response = await client.placeDetails({
61
+ params: { place_id, key }
62
+ });
63
+ return response.data.result;
64
+ } catch (error) {
65
+ console.error(error);
66
+ }
67
+ };
68
+ var geocode = async (address, key) => {
69
+ try {
70
+ const response = await client.geocode({
71
+ params: { address, key }
72
+ });
73
+ return response.data.results;
74
+ } catch (error) {
75
+ console.error(error);
76
+ }
77
+ };
39
78
  // Annotate the CommonJS export names for ESM import in node:
40
79
  0 && (module.exports = {
41
- autocomplete
80
+ autocomplete,
81
+ fetchLocation,
82
+ geocode,
83
+ getPlaceDetails
42
84
  });
43
85
  //# sourceMappingURL=google.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/lib/google.ts"],"sourcesContent":["'use server'\n\nimport { Client, PlaceAutocompleteType } from '@googlemaps/google-maps-services-js'\n\nconst client = new Client()\nexport const autocomplete = async (input: string, key: string) => {\n try {\n const response = await client.placeAutocomplete({\n params: { input, key, types: PlaceAutocompleteType.address },\n })\n\n return response.data.predictions\n } catch (error) {\n console.error(error)\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,qCAA8C;AAE9C,IAAM,SAAS,IAAI,sCAAO;AACnB,IAAM,eAAe,OAAO,OAAe,QAAgB;AAChE,MAAI;AACF,UAAM,WAAW,MAAM,OAAO,kBAAkB;AAAA,MAC9C,QAAQ,EAAE,OAAO,KAAK,OAAO,qDAAsB,QAAQ;AAAA,IAC7D,CAAC;AAED,WAAO,SAAS,KAAK;AAAA,EACvB,SAAS,OAAO;AACd,YAAQ,MAAM,KAAK;AAAA,EACrB;AACF;","names":[]}
1
+ {"version":3,"sources":["../../src/lib/google.ts"],"sourcesContent":["'use server'\n\nimport { Client, PlaceAutocompleteType, PlaceData } from '@googlemaps/google-maps-services-js'\n\nconst client = new Client()\n\nexport const autocomplete = async (input: string, key: string) => {\n try {\n const response = await client.placeAutocomplete({\n params: { input, key, types: PlaceAutocompleteType.address },\n })\n\n return response.data.predictions\n } catch (error) {\n console.error(error)\n }\n}\n\ntype Place = {\n place_id?: string\n address?: string\n}\n/**\n * This is the exported function that calls the Google api to fetch the location based on the place_id or address.\n */\nexport const fetchLocation = async (\n place: Place,\n key: string\n): Promise<Partial<PlaceData> | undefined> => {\n try {\n if (place.place_id) {\n const placeDetails = await getPlaceDetails(place.place_id, key)\n if (placeDetails) return placeDetails\n }\n if (place.address) {\n const result = await geocode(place.address, key)\n const firstAddress = result?.[0]\n return firstAddress\n }\n\n return undefined\n } catch (error) {\n console.error('Error fetching location:', error)\n }\n}\n\n/**\n * If you have a place ID, you can use the placeDetails method to get more information about a place.\n * The advantage over an address is that there will be no ambiguity about the location.\n * @param place_id\n * @param key\n * @returns\n */\nexport const getPlaceDetails = async (place_id: string, key: string) => {\n try {\n const response = await client.placeDetails({\n params: { place_id, key },\n })\n\n return response.data.result\n } catch (error) {\n console.error(error)\n }\n}\n\n/**\n * The geocode method is used to convert an address into actual location(s) with lat/long.\n */\nexport const geocode = async (address: string, key: string) => {\n try {\n const response = await client.geocode({\n params: { address, key },\n })\n\n return response.data.results\n } catch (error) {\n console.error(error)\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,qCAAyD;AAEzD,IAAM,SAAS,IAAI,sCAAO;AAEnB,IAAM,eAAe,OAAO,OAAe,QAAgB;AAChE,MAAI;AACF,UAAM,WAAW,MAAM,OAAO,kBAAkB;AAAA,MAC9C,QAAQ,EAAE,OAAO,KAAK,OAAO,qDAAsB,QAAQ;AAAA,IAC7D,CAAC;AAED,WAAO,SAAS,KAAK;AAAA,EACvB,SAAS,OAAO;AACd,YAAQ,MAAM,KAAK;AAAA,EACrB;AACF;AASO,IAAM,gBAAgB,OAC3B,OACA,QAC4C;AAC5C,MAAI;AACF,QAAI,MAAM,UAAU;AAClB,YAAM,eAAe,MAAM,gBAAgB,MAAM,UAAU,GAAG;AAC9D,UAAI,aAAc,QAAO;AAAA,IAC3B;AACA,QAAI,MAAM,SAAS;AACjB,YAAM,SAAS,MAAM,QAAQ,MAAM,SAAS,GAAG;AAC/C,YAAM,eAAe,SAAS,CAAC;AAC/B,aAAO;AAAA,IACT;AAEA,WAAO;AAAA,EACT,SAAS,OAAO;AACd,YAAQ,MAAM,4BAA4B,KAAK;AAAA,EACjD;AACF;AASO,IAAM,kBAAkB,OAAO,UAAkB,QAAgB;AACtE,MAAI;AACF,UAAM,WAAW,MAAM,OAAO,aAAa;AAAA,MACzC,QAAQ,EAAE,UAAU,IAAI;AAAA,IAC1B,CAAC;AAED,WAAO,SAAS,KAAK;AAAA,EACvB,SAAS,OAAO;AACd,YAAQ,MAAM,KAAK;AAAA,EACrB;AACF;AAKO,IAAM,UAAU,OAAO,SAAiB,QAAgB;AAC7D,MAAI;AACF,UAAM,WAAW,MAAM,OAAO,QAAQ;AAAA,MACpC,QAAQ,EAAE,SAAS,IAAI;AAAA,IACzB,CAAC;AAED,WAAO,SAAS,KAAK;AAAA,EACvB,SAAS,OAAO;AACd,YAAQ,MAAM,KAAK;AAAA,EACrB;AACF;","names":[]}
@@ -1,5 +1,26 @@
1
1
  import * as _googlemaps_google_maps_services_js from '@googlemaps/google-maps-services-js';
2
+ import { PlaceData } from '@googlemaps/google-maps-services-js';
2
3
 
3
4
  declare const autocomplete: (input: string, key: string) => Promise<_googlemaps_google_maps_services_js.PlaceAutocompleteResult[] | undefined>;
5
+ type Place = {
6
+ place_id?: string;
7
+ address?: string;
8
+ };
9
+ /**
10
+ * This is the exported function that calls the Google api to fetch the location based on the place_id or address.
11
+ */
12
+ declare const fetchLocation: (place: Place, key: string) => Promise<Partial<PlaceData> | undefined>;
13
+ /**
14
+ * If you have a place ID, you can use the placeDetails method to get more information about a place.
15
+ * The advantage over an address is that there will be no ambiguity about the location.
16
+ * @param place_id
17
+ * @param key
18
+ * @returns
19
+ */
20
+ declare const getPlaceDetails: (place_id: string, key: string) => Promise<Partial<PlaceData> | undefined>;
21
+ /**
22
+ * The geocode method is used to convert an address into actual location(s) with lat/long.
23
+ */
24
+ declare const geocode: (address: string, key: string) => Promise<_googlemaps_google_maps_services_js.GeocodeResult[] | undefined>;
4
25
 
5
- export { autocomplete };
26
+ export { autocomplete, fetchLocation, geocode, getPlaceDetails };
@@ -1,5 +1,26 @@
1
1
  import * as _googlemaps_google_maps_services_js from '@googlemaps/google-maps-services-js';
2
+ import { PlaceData } from '@googlemaps/google-maps-services-js';
2
3
 
3
4
  declare const autocomplete: (input: string, key: string) => Promise<_googlemaps_google_maps_services_js.PlaceAutocompleteResult[] | undefined>;
5
+ type Place = {
6
+ place_id?: string;
7
+ address?: string;
8
+ };
9
+ /**
10
+ * This is the exported function that calls the Google api to fetch the location based on the place_id or address.
11
+ */
12
+ declare const fetchLocation: (place: Place, key: string) => Promise<Partial<PlaceData> | undefined>;
13
+ /**
14
+ * If you have a place ID, you can use the placeDetails method to get more information about a place.
15
+ * The advantage over an address is that there will be no ambiguity about the location.
16
+ * @param place_id
17
+ * @param key
18
+ * @returns
19
+ */
20
+ declare const getPlaceDetails: (place_id: string, key: string) => Promise<Partial<PlaceData> | undefined>;
21
+ /**
22
+ * The geocode method is used to convert an address into actual location(s) with lat/long.
23
+ */
24
+ declare const geocode: (address: string, key: string) => Promise<_googlemaps_google_maps_services_js.GeocodeResult[] | undefined>;
4
25
 
5
- export { autocomplete };
26
+ export { autocomplete, fetchLocation, geocode, getPlaceDetails };
@@ -13,7 +13,46 @@ var autocomplete = async (input, key) => {
13
13
  console.error(error);
14
14
  }
15
15
  };
16
+ var fetchLocation = async (place, key) => {
17
+ try {
18
+ if (place.place_id) {
19
+ const placeDetails = await getPlaceDetails(place.place_id, key);
20
+ if (placeDetails) return placeDetails;
21
+ }
22
+ if (place.address) {
23
+ const result = await geocode(place.address, key);
24
+ const firstAddress = result?.[0];
25
+ return firstAddress;
26
+ }
27
+ return void 0;
28
+ } catch (error) {
29
+ console.error("Error fetching location:", error);
30
+ }
31
+ };
32
+ var getPlaceDetails = async (place_id, key) => {
33
+ try {
34
+ const response = await client.placeDetails({
35
+ params: { place_id, key }
36
+ });
37
+ return response.data.result;
38
+ } catch (error) {
39
+ console.error(error);
40
+ }
41
+ };
42
+ var geocode = async (address, key) => {
43
+ try {
44
+ const response = await client.geocode({
45
+ params: { address, key }
46
+ });
47
+ return response.data.results;
48
+ } catch (error) {
49
+ console.error(error);
50
+ }
51
+ };
16
52
  export {
17
- autocomplete
53
+ autocomplete,
54
+ fetchLocation,
55
+ geocode,
56
+ getPlaceDetails
18
57
  };
19
58
  //# sourceMappingURL=google.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/lib/google.ts"],"sourcesContent":["'use server'\n\nimport { Client, PlaceAutocompleteType } from '@googlemaps/google-maps-services-js'\n\nconst client = new Client()\nexport const autocomplete = async (input: string, key: string) => {\n try {\n const response = await client.placeAutocomplete({\n params: { input, key, types: PlaceAutocompleteType.address },\n })\n\n return response.data.predictions\n } catch (error) {\n console.error(error)\n }\n}\n"],"mappings":";;;AAEA,SAAS,QAAQ,6BAA6B;AAE9C,IAAM,SAAS,IAAI,OAAO;AACnB,IAAM,eAAe,OAAO,OAAe,QAAgB;AAChE,MAAI;AACF,UAAM,WAAW,MAAM,OAAO,kBAAkB;AAAA,MAC9C,QAAQ,EAAE,OAAO,KAAK,OAAO,sBAAsB,QAAQ;AAAA,IAC7D,CAAC;AAED,WAAO,SAAS,KAAK;AAAA,EACvB,SAAS,OAAO;AACd,YAAQ,MAAM,KAAK;AAAA,EACrB;AACF;","names":[]}
1
+ {"version":3,"sources":["../../src/lib/google.ts"],"sourcesContent":["'use server'\n\nimport { Client, PlaceAutocompleteType, PlaceData } from '@googlemaps/google-maps-services-js'\n\nconst client = new Client()\n\nexport const autocomplete = async (input: string, key: string) => {\n try {\n const response = await client.placeAutocomplete({\n params: { input, key, types: PlaceAutocompleteType.address },\n })\n\n return response.data.predictions\n } catch (error) {\n console.error(error)\n }\n}\n\ntype Place = {\n place_id?: string\n address?: string\n}\n/**\n * This is the exported function that calls the Google api to fetch the location based on the place_id or address.\n */\nexport const fetchLocation = async (\n place: Place,\n key: string\n): Promise<Partial<PlaceData> | undefined> => {\n try {\n if (place.place_id) {\n const placeDetails = await getPlaceDetails(place.place_id, key)\n if (placeDetails) return placeDetails\n }\n if (place.address) {\n const result = await geocode(place.address, key)\n const firstAddress = result?.[0]\n return firstAddress\n }\n\n return undefined\n } catch (error) {\n console.error('Error fetching location:', error)\n }\n}\n\n/**\n * If you have a place ID, you can use the placeDetails method to get more information about a place.\n * The advantage over an address is that there will be no ambiguity about the location.\n * @param place_id\n * @param key\n * @returns\n */\nexport const getPlaceDetails = async (place_id: string, key: string) => {\n try {\n const response = await client.placeDetails({\n params: { place_id, key },\n })\n\n return response.data.result\n } catch (error) {\n console.error(error)\n }\n}\n\n/**\n * The geocode method is used to convert an address into actual location(s) with lat/long.\n */\nexport const geocode = async (address: string, key: string) => {\n try {\n const response = await client.geocode({\n params: { address, key },\n })\n\n return response.data.results\n } catch (error) {\n console.error(error)\n }\n}\n"],"mappings":";;;AAEA,SAAS,QAAQ,6BAAwC;AAEzD,IAAM,SAAS,IAAI,OAAO;AAEnB,IAAM,eAAe,OAAO,OAAe,QAAgB;AAChE,MAAI;AACF,UAAM,WAAW,MAAM,OAAO,kBAAkB;AAAA,MAC9C,QAAQ,EAAE,OAAO,KAAK,OAAO,sBAAsB,QAAQ;AAAA,IAC7D,CAAC;AAED,WAAO,SAAS,KAAK;AAAA,EACvB,SAAS,OAAO;AACd,YAAQ,MAAM,KAAK;AAAA,EACrB;AACF;AASO,IAAM,gBAAgB,OAC3B,OACA,QAC4C;AAC5C,MAAI;AACF,QAAI,MAAM,UAAU;AAClB,YAAM,eAAe,MAAM,gBAAgB,MAAM,UAAU,GAAG;AAC9D,UAAI,aAAc,QAAO;AAAA,IAC3B;AACA,QAAI,MAAM,SAAS;AACjB,YAAM,SAAS,MAAM,QAAQ,MAAM,SAAS,GAAG;AAC/C,YAAM,eAAe,SAAS,CAAC;AAC/B,aAAO;AAAA,IACT;AAEA,WAAO;AAAA,EACT,SAAS,OAAO;AACd,YAAQ,MAAM,4BAA4B,KAAK;AAAA,EACjD;AACF;AASO,IAAM,kBAAkB,OAAO,UAAkB,QAAgB;AACtE,MAAI;AACF,UAAM,WAAW,MAAM,OAAO,aAAa;AAAA,MACzC,QAAQ,EAAE,UAAU,IAAI;AAAA,IAC1B,CAAC;AAED,WAAO,SAAS,KAAK;AAAA,EACvB,SAAS,OAAO;AACd,YAAQ,MAAM,KAAK;AAAA,EACrB;AACF;AAKO,IAAM,UAAU,OAAO,SAAiB,QAAgB;AAC7D,MAAI;AACF,UAAM,WAAW,MAAM,OAAO,QAAQ;AAAA,MACpC,QAAQ,EAAE,SAAS,IAAI;AAAA,IACzB,CAAC;AAED,WAAO,SAAS,KAAK;AAAA,EACvB,SAAS,OAAO;AACd,YAAQ,MAAM,KAAK;AAAA,EACrB;AACF;","names":[]}
@@ -0,0 +1,53 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/lib/icons.ts
21
+ var icons_exports = {};
22
+ __export(icons_exports, {
23
+ iconMap: () => iconMap
24
+ });
25
+ module.exports = __toCommonJS(icons_exports);
26
+ var import_lucide_react = require("lucide-react");
27
+ var iconMap = {
28
+ house: import_lucide_react.Home,
29
+ layers: import_lucide_react.Layers,
30
+ users: import_lucide_react.Users,
31
+ settings: import_lucide_react.Settings,
32
+ building: import_lucide_react.Building,
33
+ bell: import_lucide_react.Bell,
34
+ wallet: import_lucide_react.Wallet,
35
+ contact: import_lucide_react.Contact,
36
+ banknote: import_lucide_react.Banknote,
37
+ "message-square-dot": import_lucide_react.MessageSquareDot,
38
+ "life-buoy": import_lucide_react.LifeBuoy,
39
+ "building-2": import_lucide_react.Building2,
40
+ "gallery-vertical-end": import_lucide_react.GalleryVerticalEnd,
41
+ "square-kanban": import_lucide_react.SquareKanban,
42
+ "briefcase-business": import_lucide_react.BriefcaseBusiness,
43
+ "circle-user": import_lucide_react.CircleUser,
44
+ "key-round": import_lucide_react.KeyRound,
45
+ "clock-2": import_lucide_react.Clock2,
46
+ "circle-user-round": import_lucide_react.CircleUserRound,
47
+ "map-pin": import_lucide_react.MapPin
48
+ };
49
+ // Annotate the CommonJS export names for ESM import in node:
50
+ 0 && (module.exports = {
51
+ iconMap
52
+ });
53
+ //# sourceMappingURL=icons.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/lib/icons.ts"],"sourcesContent":["import {\n Banknote,\n Bell,\n BriefcaseBusiness,\n Building,\n Building2,\n CircleUser,\n CircleUserRound,\n Clock2,\n Contact,\n GalleryVerticalEnd,\n Home,\n KeyRound,\n Layers,\n LifeBuoy,\n MapPin,\n MessageSquareDot,\n Settings,\n SquareKanban,\n Users,\n Wallet,\n} from 'lucide-react'\n\nexport const iconMap = {\n house: Home,\n layers: Layers,\n users: Users,\n settings: Settings,\n building: Building,\n bell: Bell,\n wallet: Wallet,\n contact: Contact,\n banknote: Banknote,\n 'message-square-dot': MessageSquareDot,\n 'life-buoy': LifeBuoy,\n 'building-2': Building2,\n 'gallery-vertical-end': GalleryVerticalEnd,\n 'square-kanban': SquareKanban,\n 'briefcase-business': BriefcaseBusiness,\n 'circle-user': CircleUser,\n 'key-round': KeyRound,\n 'clock-2': Clock2,\n 'circle-user-round': CircleUserRound,\n 'map-pin': MapPin,\n} as const\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0BAqBO;AAEA,IAAM,UAAU;AAAA,EACrB,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,UAAU;AAAA,EACV,UAAU;AAAA,EACV,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,UAAU;AAAA,EACV,sBAAsB;AAAA,EACtB,aAAa;AAAA,EACb,cAAc;AAAA,EACd,wBAAwB;AAAA,EACxB,iBAAiB;AAAA,EACjB,sBAAsB;AAAA,EACtB,eAAe;AAAA,EACf,aAAa;AAAA,EACb,WAAW;AAAA,EACX,qBAAqB;AAAA,EACrB,WAAW;AACb;","names":[]}
@@ -0,0 +1,27 @@
1
+ import * as React from 'react';
2
+ import * as lucide_react from 'lucide-react';
3
+
4
+ declare const iconMap: {
5
+ readonly house: React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
6
+ readonly layers: React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
7
+ readonly users: React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
8
+ readonly settings: React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
9
+ readonly building: React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
10
+ readonly bell: React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
11
+ readonly wallet: React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
12
+ readonly contact: React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
13
+ readonly banknote: React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
14
+ readonly 'message-square-dot': React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
15
+ readonly 'life-buoy': React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
16
+ readonly 'building-2': React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
17
+ readonly 'gallery-vertical-end': React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
18
+ readonly 'square-kanban': React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
19
+ readonly 'briefcase-business': React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
20
+ readonly 'circle-user': React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
21
+ readonly 'key-round': React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
22
+ readonly 'clock-2': React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
23
+ readonly 'circle-user-round': React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
24
+ readonly 'map-pin': React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
25
+ };
26
+
27
+ export { iconMap };
@@ -0,0 +1,27 @@
1
+ import * as React from 'react';
2
+ import * as lucide_react from 'lucide-react';
3
+
4
+ declare const iconMap: {
5
+ readonly house: React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
6
+ readonly layers: React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
7
+ readonly users: React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
8
+ readonly settings: React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
9
+ readonly building: React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
10
+ readonly bell: React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
11
+ readonly wallet: React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
12
+ readonly contact: React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
13
+ readonly banknote: React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
14
+ readonly 'message-square-dot': React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
15
+ readonly 'life-buoy': React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
16
+ readonly 'building-2': React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
17
+ readonly 'gallery-vertical-end': React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
18
+ readonly 'square-kanban': React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
19
+ readonly 'briefcase-business': React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
20
+ readonly 'circle-user': React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
21
+ readonly 'key-round': React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
22
+ readonly 'clock-2': React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
23
+ readonly 'circle-user-round': React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
24
+ readonly 'map-pin': React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
25
+ };
26
+
27
+ export { iconMap };
@@ -0,0 +1,49 @@
1
+ // src/lib/icons.ts
2
+ import {
3
+ Banknote,
4
+ Bell,
5
+ BriefcaseBusiness,
6
+ Building,
7
+ Building2,
8
+ CircleUser,
9
+ CircleUserRound,
10
+ Clock2,
11
+ Contact,
12
+ GalleryVerticalEnd,
13
+ Home,
14
+ KeyRound,
15
+ Layers,
16
+ LifeBuoy,
17
+ MapPin,
18
+ MessageSquareDot,
19
+ Settings,
20
+ SquareKanban,
21
+ Users,
22
+ Wallet
23
+ } from "lucide-react";
24
+ var iconMap = {
25
+ house: Home,
26
+ layers: Layers,
27
+ users: Users,
28
+ settings: Settings,
29
+ building: Building,
30
+ bell: Bell,
31
+ wallet: Wallet,
32
+ contact: Contact,
33
+ banknote: Banknote,
34
+ "message-square-dot": MessageSquareDot,
35
+ "life-buoy": LifeBuoy,
36
+ "building-2": Building2,
37
+ "gallery-vertical-end": GalleryVerticalEnd,
38
+ "square-kanban": SquareKanban,
39
+ "briefcase-business": BriefcaseBusiness,
40
+ "circle-user": CircleUser,
41
+ "key-round": KeyRound,
42
+ "clock-2": Clock2,
43
+ "circle-user-round": CircleUserRound,
44
+ "map-pin": MapPin
45
+ };
46
+ export {
47
+ iconMap
48
+ };
49
+ //# sourceMappingURL=icons.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/lib/icons.ts"],"sourcesContent":["import {\n Banknote,\n Bell,\n BriefcaseBusiness,\n Building,\n Building2,\n CircleUser,\n CircleUserRound,\n Clock2,\n Contact,\n GalleryVerticalEnd,\n Home,\n KeyRound,\n Layers,\n LifeBuoy,\n MapPin,\n MessageSquareDot,\n Settings,\n SquareKanban,\n Users,\n Wallet,\n} from 'lucide-react'\n\nexport const iconMap = {\n house: Home,\n layers: Layers,\n users: Users,\n settings: Settings,\n building: Building,\n bell: Bell,\n wallet: Wallet,\n contact: Contact,\n banknote: Banknote,\n 'message-square-dot': MessageSquareDot,\n 'life-buoy': LifeBuoy,\n 'building-2': Building2,\n 'gallery-vertical-end': GalleryVerticalEnd,\n 'square-kanban': SquareKanban,\n 'briefcase-business': BriefcaseBusiness,\n 'circle-user': CircleUser,\n 'key-round': KeyRound,\n 'clock-2': Clock2,\n 'circle-user-round': CircleUserRound,\n 'map-pin': MapPin,\n} as const\n"],"mappings":";AAAA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEA,IAAM,UAAU;AAAA,EACrB,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,UAAU;AAAA,EACV,UAAU;AAAA,EACV,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,UAAU;AAAA,EACV,sBAAsB;AAAA,EACtB,aAAa;AAAA,EACb,cAAc;AAAA,EACd,wBAAwB;AAAA,EACxB,iBAAiB;AAAA,EACjB,sBAAsB;AAAA,EACtB,eAAe;AAAA,EACf,aAAa;AAAA,EACb,WAAW;AAAA,EACX,qBAAqB;AAAA,EACrB,WAAW;AACb;","names":[]}
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/lib/locations.ts
21
+ var locations_exports = {};
22
+ __export(locations_exports, {
23
+ formattedAddress: () => formattedAddress,
24
+ formattedJobLocation: () => formattedJobLocation
25
+ });
26
+ module.exports = __toCommonJS(locations_exports);
27
+ function formattedAddress(address) {
28
+ const { addressLocality, addressRegion, addressCountry } = address;
29
+ if (addressLocality && addressRegion) return `${addressLocality}, ${addressRegion}`;
30
+ if (addressRegion && addressCountry) return `${addressRegion}, ${addressCountry}`;
31
+ if (addressRegion) return addressRegion;
32
+ if (addressCountry) return addressCountry;
33
+ return null;
34
+ }
35
+ function formattedJobLocation(job) {
36
+ const address = job.jobLocation && formattedAddress(job.jobLocation);
37
+ const remote = job.isRemote ? "Remote" : "";
38
+ return [address, remote].filter(Boolean).join(" | ");
39
+ }
40
+ // Annotate the CommonJS export names for ESM import in node:
41
+ 0 && (module.exports = {
42
+ formattedAddress,
43
+ formattedJobLocation
44
+ });
45
+ //# sourceMappingURL=locations.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/lib/locations.ts"],"sourcesContent":["import { JobPostModel } from '@/types/data/job_posting_service_latest'\nimport { PostalAddressModel } from '@/types/data/shared_pickle_output_latest'\n\nexport function formattedAddress(address: PostalAddressModel): string | null {\n const { addressLocality, addressRegion, addressCountry } = address\n if (addressLocality && addressRegion) return `${addressLocality}, ${addressRegion}`\n if (addressRegion && addressCountry) return `${addressRegion}, ${addressCountry}`\n if (addressRegion) return addressRegion\n if (addressCountry) return addressCountry\n return null\n}\n\nexport function formattedJobLocation(job: JobPostModel) {\n const address = job.jobLocation && formattedAddress(job.jobLocation)\n const remote = job.isRemote ? 'Remote' : ''\n\n return [address, remote].filter(Boolean).join(' | ')\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGO,SAAS,iBAAiB,SAA4C;AAC3E,QAAM,EAAE,iBAAiB,eAAe,eAAe,IAAI;AAC3D,MAAI,mBAAmB,cAAe,QAAO,GAAG,eAAe,KAAK,aAAa;AACjF,MAAI,iBAAiB,eAAgB,QAAO,GAAG,aAAa,KAAK,cAAc;AAC/E,MAAI,cAAe,QAAO;AAC1B,MAAI,eAAgB,QAAO;AAC3B,SAAO;AACT;AAEO,SAAS,qBAAqB,KAAmB;AACtD,QAAM,UAAU,IAAI,eAAe,iBAAiB,IAAI,WAAW;AACnE,QAAM,SAAS,IAAI,WAAW,WAAW;AAEzC,SAAO,CAAC,SAAS,MAAM,EAAE,OAAO,OAAO,EAAE,KAAK,KAAK;AACrD;","names":[]}
@@ -0,0 +1,8 @@
1
+ import { J as JobPostModel } from '../job_posting_service_latest-D0AsiA4a.cjs';
2
+ import { P as PostalAddressModel } from '../shared_pickle_output_latest-DX6GQoVn.cjs';
3
+ import 'zod';
4
+
5
+ declare function formattedAddress(address: PostalAddressModel): string | null;
6
+ declare function formattedJobLocation(job: JobPostModel): string;
7
+
8
+ export { formattedAddress, formattedJobLocation };
@@ -0,0 +1,8 @@
1
+ import { J as JobPostModel } from '../job_posting_service_latest-D0AsiA4a.js';
2
+ import { P as PostalAddressModel } from '../shared_pickle_output_latest-DX6GQoVn.js';
3
+ import 'zod';
4
+
5
+ declare function formattedAddress(address: PostalAddressModel): string | null;
6
+ declare function formattedJobLocation(job: JobPostModel): string;
7
+
8
+ export { formattedAddress, formattedJobLocation };
@@ -0,0 +1,19 @@
1
+ // src/lib/locations.ts
2
+ function formattedAddress(address) {
3
+ const { addressLocality, addressRegion, addressCountry } = address;
4
+ if (addressLocality && addressRegion) return `${addressLocality}, ${addressRegion}`;
5
+ if (addressRegion && addressCountry) return `${addressRegion}, ${addressCountry}`;
6
+ if (addressRegion) return addressRegion;
7
+ if (addressCountry) return addressCountry;
8
+ return null;
9
+ }
10
+ function formattedJobLocation(job) {
11
+ const address = job.jobLocation && formattedAddress(job.jobLocation);
12
+ const remote = job.isRemote ? "Remote" : "";
13
+ return [address, remote].filter(Boolean).join(" | ");
14
+ }
15
+ export {
16
+ formattedAddress,
17
+ formattedJobLocation
18
+ };
19
+ //# sourceMappingURL=locations.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/lib/locations.ts"],"sourcesContent":["import { JobPostModel } from '@/types/data/job_posting_service_latest'\nimport { PostalAddressModel } from '@/types/data/shared_pickle_output_latest'\n\nexport function formattedAddress(address: PostalAddressModel): string | null {\n const { addressLocality, addressRegion, addressCountry } = address\n if (addressLocality && addressRegion) return `${addressLocality}, ${addressRegion}`\n if (addressRegion && addressCountry) return `${addressRegion}, ${addressCountry}`\n if (addressRegion) return addressRegion\n if (addressCountry) return addressCountry\n return null\n}\n\nexport function formattedJobLocation(job: JobPostModel) {\n const address = job.jobLocation && formattedAddress(job.jobLocation)\n const remote = job.isRemote ? 'Remote' : ''\n\n return [address, remote].filter(Boolean).join(' | ')\n}\n"],"mappings":";AAGO,SAAS,iBAAiB,SAA4C;AAC3E,QAAM,EAAE,iBAAiB,eAAe,eAAe,IAAI;AAC3D,MAAI,mBAAmB,cAAe,QAAO,GAAG,eAAe,KAAK,aAAa;AACjF,MAAI,iBAAiB,eAAgB,QAAO,GAAG,aAAa,KAAK,cAAc;AAC/E,MAAI,cAAe,QAAO;AAC1B,MAAI,eAAgB,QAAO;AAC3B,SAAO;AACT;AAEO,SAAS,qBAAqB,KAAmB;AACtD,QAAM,UAAU,IAAI,eAAe,iBAAiB,IAAI,WAAW;AACnE,QAAM,SAAS,IAAI,WAAW,WAAW;AAEzC,SAAO,CAAC,SAAS,MAAM,EAAE,OAAO,OAAO,EAAE,KAAK,KAAK;AACrD;","names":[]}