@bpd-library/utilities 1.1.1-beta.3 → 1.1.1-beta.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 (402) hide show
  1. package/dist/{types/api → api}/http.d.ts +0 -0
  2. package/dist/{lib/api → api}/http.js +0 -0
  3. package/dist/api/http.js.map +1 -0
  4. package/dist/{types/api → api}/index.d.ts +0 -0
  5. package/dist/{lib/api → api}/index.js +0 -0
  6. package/dist/api/index.js.map +1 -0
  7. package/dist/{types/api-utilities → api-utilities}/api-utilities.d.ts +0 -0
  8. package/dist/{lib/api-utilities → api-utilities}/api-utilities.js +0 -0
  9. package/dist/api-utilities/api-utilities.js.map +1 -0
  10. package/dist/{types/api-utilities → api-utilities}/api-utilities.test.d.ts +0 -0
  11. package/dist/{lib/api-utilities → api-utilities}/api-utilities.test.js +3 -0
  12. package/dist/api-utilities/api-utilities.test.js.map +1 -0
  13. package/dist/{types/api-utilities → api-utilities}/api-utilities.types.d.ts +0 -0
  14. package/dist/{lib/api-utilities → api-utilities}/api-utilities.types.js +0 -0
  15. package/dist/api-utilities/api-utilities.types.js.map +1 -0
  16. package/dist/{types/api-utilities → api-utilities}/compose-exclude-string.d.ts +0 -0
  17. package/dist/{lib/api-utilities → api-utilities}/compose-exclude-string.js +0 -0
  18. package/dist/api-utilities/compose-exclude-string.js.map +1 -0
  19. package/dist/{types/api-utilities → api-utilities}/decimal-range/merge-decimal-range.d.ts +0 -0
  20. package/dist/{lib/api-utilities → api-utilities}/decimal-range/merge-decimal-range.js +0 -0
  21. package/dist/api-utilities/decimal-range/merge-decimal-range.js.map +1 -0
  22. package/dist/{types/api-utilities → api-utilities}/decimal-range/merge-specification-range.d.ts +0 -0
  23. package/dist/{lib/api-utilities → api-utilities}/decimal-range/merge-specification-range.js +0 -0
  24. package/dist/api-utilities/decimal-range/merge-specification-range.js.map +1 -0
  25. package/dist/{types/api-utilities → api-utilities}/district-status.d.ts +0 -0
  26. package/dist/{lib/api-utilities → api-utilities}/district-status.js +0 -0
  27. package/dist/api-utilities/district-status.js.map +1 -0
  28. package/dist/{types/api-utilities → api-utilities}/find-filter.d.ts +0 -0
  29. package/dist/{lib/api-utilities → api-utilities}/find-filter.js +0 -0
  30. package/dist/api-utilities/find-filter.js.map +1 -0
  31. package/dist/api-utilities/get/coordinates.d.ts +12 -0
  32. package/dist/{lib/api-utilities → api-utilities}/get/coordinates.js +7 -3
  33. package/dist/api-utilities/get/coordinates.js.map +1 -0
  34. package/dist/{types/api-utilities → api-utilities}/get/layer-raster.d.ts +0 -0
  35. package/dist/{lib/api-utilities → api-utilities}/get/layer-raster.js +0 -0
  36. package/dist/api-utilities/get/layer-raster.js.map +1 -0
  37. package/dist/{types/api-utilities → api-utilities}/index.d.ts +0 -0
  38. package/dist/{lib/api-utilities → api-utilities}/index.js +0 -0
  39. package/dist/api-utilities/index.js.map +1 -0
  40. package/dist/{types/api-utilities → api-utilities}/show-price.d.ts +0 -0
  41. package/dist/{lib/api-utilities → api-utilities}/show-price.js +0 -0
  42. package/dist/api-utilities/show-price.js.map +1 -0
  43. package/dist/{types/constants → constants}/index.d.ts +0 -0
  44. package/dist/{lib/constants → constants}/index.js +0 -0
  45. package/dist/constants/index.js.map +1 -0
  46. package/dist/{types/date.d.ts → date.d.ts} +0 -0
  47. package/dist/{lib/date.js → date.js} +0 -0
  48. package/dist/date.js.map +1 -0
  49. package/dist/{types/debounce.d.ts → debounce.d.ts} +0 -0
  50. package/dist/{lib/debounce.js → debounce.js} +0 -0
  51. package/dist/debounce.js.map +1 -0
  52. package/dist/{types/dom → dom}/dom.d.ts +0 -0
  53. package/dist/{lib/dom → dom}/dom.js +0 -0
  54. package/dist/dom/dom.js.map +1 -0
  55. package/dist/{types/dom → dom}/index.d.ts +0 -0
  56. package/dist/{lib/dom → dom}/index.js +0 -0
  57. package/dist/dom/index.js.map +1 -0
  58. package/dist/{types/environment.d.ts → environment.d.ts} +0 -0
  59. package/dist/{lib/environment.js → environment.js} +0 -0
  60. package/dist/environment.js.map +1 -0
  61. package/dist/{types/extended-api-models → extended-api-models}/excluded-properties.d.ts +0 -0
  62. package/dist/{lib/extended-api-models → extended-api-models}/excluded-properties.js +0 -0
  63. package/dist/extended-api-models/excluded-properties.js.map +1 -0
  64. package/dist/{types/extended-api-models → extended-api-models}/extended-area-projects.d.ts +0 -0
  65. package/dist/{lib/extended-api-models → extended-api-models}/extended-area-projects.js +0 -0
  66. package/dist/extended-api-models/extended-area-projects.js.map +1 -0
  67. package/dist/{types/extended-api-models → extended-api-models}/extended-area.d.ts +0 -0
  68. package/dist/{lib/extended-api-models → extended-api-models}/extended-area.js +0 -0
  69. package/dist/extended-api-models/extended-area.js.map +1 -0
  70. package/dist/{types/extended-api-models → extended-api-models}/index.d.ts +0 -0
  71. package/dist/{lib/extended-api-models → extended-api-models}/index.js +0 -0
  72. package/dist/extended-api-models/index.js.map +1 -0
  73. package/dist/{types/extended-api-models → extended-api-models}/status/apartment-building-status.d.ts +0 -0
  74. package/dist/{lib/extended-api-models → extended-api-models}/status/apartment-building-status.js +0 -0
  75. package/dist/extended-api-models/status/apartment-building-status.js.map +1 -0
  76. package/dist/{types/extended-api-models → extended-api-models}/status/construction-number-status.d.ts +0 -0
  77. package/dist/{lib/extended-api-models → extended-api-models}/status/construction-number-status.js +0 -0
  78. package/dist/extended-api-models/status/construction-number-status.js.map +1 -0
  79. package/dist/{types/extended-api-models → extended-api-models}/status/property-type-status.d.ts +0 -0
  80. package/dist/{lib/extended-api-models → extended-api-models}/status/property-type-status.js +0 -0
  81. package/dist/extended-api-models/status/property-type-status.js.map +1 -0
  82. package/dist/{types/extended-api-models → extended-api-models}/utilities/apartment-building-view.d.ts +0 -0
  83. package/dist/{lib/extended-api-models → extended-api-models}/utilities/apartment-building-view.js +0 -0
  84. package/dist/extended-api-models/utilities/apartment-building-view.js.map +1 -0
  85. package/dist/{types/extended-api-models → extended-api-models}/utilities/extended-model-price-range.d.ts +0 -0
  86. package/dist/{lib/extended-api-models → extended-api-models}/utilities/extended-model-price-range.js +0 -0
  87. package/dist/extended-api-models/utilities/extended-model-price-range.js.map +1 -0
  88. package/dist/{types/extended-api-models → extended-api-models}/utilities/find-extended-object.d.ts +0 -0
  89. package/dist/{lib/extended-api-models → extended-api-models}/utilities/find-extended-object.js +0 -0
  90. package/dist/extended-api-models/utilities/find-extended-object.js.map +1 -0
  91. package/dist/{types/extended-api-models → extended-api-models}/utilities/is-apartment.d.ts +0 -0
  92. package/dist/{lib/extended-api-models → extended-api-models}/utilities/is-apartment.js +0 -0
  93. package/dist/extended-api-models/utilities/is-apartment.js.map +1 -0
  94. package/dist/{types/function-is-true.d.ts → function-is-true.d.ts} +0 -0
  95. package/dist/{lib/function-is-true.js → function-is-true.js} +0 -0
  96. package/dist/function-is-true.js.map +1 -0
  97. package/dist/{types/generated → generated}/bpd-client.d.ts +0 -0
  98. package/dist/{lib/generated → generated}/bpd-client.js +0 -0
  99. package/dist/generated/bpd-client.js.map +1 -0
  100. package/dist/{types/generated → generated}/index.d.ts +0 -0
  101. package/dist/{lib/generated → generated}/index.js +0 -0
  102. package/dist/generated/index.js.map +1 -0
  103. package/dist/{types/geometry → geometry}/country-bounding-box.d.ts +0 -0
  104. package/dist/{lib/geometry → geometry}/country-bounding-box.js +0 -0
  105. package/dist/geometry/country-bounding-box.js.map +1 -0
  106. package/dist/{types/geometry → geometry}/geometry.d.ts +4 -4
  107. package/dist/{lib/geometry → geometry}/geometry.js +0 -0
  108. package/dist/geometry/geometry.js.map +1 -0
  109. package/dist/{types/geometry → geometry}/geometry.test.d.ts +2 -2
  110. package/dist/{lib/geometry → geometry}/geometry.test.js +0 -0
  111. package/dist/geometry/geometry.test.js.map +1 -0
  112. package/dist/{types/geometry → geometry}/index.d.ts +0 -0
  113. package/dist/{lib/geometry → geometry}/index.js +0 -0
  114. package/dist/geometry/index.js.map +1 -0
  115. package/dist/{types/hooks → hooks}/index.d.ts +0 -1
  116. package/dist/{lib/hooks → hooks}/index.js +0 -1
  117. package/dist/hooks/index.js.map +1 -0
  118. package/dist/{types/hooks → hooks}/use-click-outside.d.ts +0 -0
  119. package/dist/{lib/hooks → hooks}/use-click-outside.js +0 -0
  120. package/dist/hooks/use-click-outside.js.map +1 -0
  121. package/dist/{types/hooks → hooks}/use-delegate-listen.d.ts +0 -0
  122. package/dist/{lib/hooks → hooks}/use-delegate-listen.js +0 -0
  123. package/dist/hooks/use-delegate-listen.js.map +1 -0
  124. package/dist/{types/hooks → hooks}/use-form-changes.d.ts +0 -0
  125. package/dist/{lib/hooks → hooks}/use-form-changes.js +0 -0
  126. package/dist/hooks/use-form-changes.js.map +1 -0
  127. package/dist/{types/hooks → hooks}/use-history.d.ts +0 -0
  128. package/dist/{lib/hooks → hooks}/use-history.js +0 -0
  129. package/dist/hooks/use-history.js.map +1 -0
  130. package/dist/{types/hooks → hooks}/use-input.d.ts +0 -0
  131. package/dist/{lib/hooks → hooks}/use-input.js +0 -0
  132. package/dist/hooks/use-input.js.map +1 -0
  133. package/dist/{types/hooks → hooks}/use-keyboard-focus.d.ts +0 -0
  134. package/dist/{lib/hooks → hooks}/use-keyboard-focus.js +0 -0
  135. package/dist/hooks/use-keyboard-focus.js.map +1 -0
  136. package/dist/{types/hooks → hooks}/use-lazy.d.ts +0 -0
  137. package/dist/{lib/hooks → hooks}/use-lazy.js +0 -0
  138. package/dist/hooks/use-lazy.js.map +1 -0
  139. package/dist/{types/hooks → hooks}/use-map-storage.d.ts +0 -0
  140. package/dist/{lib/hooks → hooks}/use-map-storage.js +0 -0
  141. package/dist/hooks/use-map-storage.js.map +1 -0
  142. package/dist/{types/hooks → hooks}/use-scroll-position.d.ts +0 -0
  143. package/dist/{lib/hooks → hooks}/use-scroll-position.js +0 -0
  144. package/dist/hooks/use-scroll-position.js.map +1 -0
  145. package/dist/{types/hooks → hooks}/use-scroll-to.d.ts +0 -0
  146. package/dist/{lib/hooks → hooks}/use-scroll-to.js +0 -0
  147. package/dist/hooks/use-scroll-to.js.map +1 -0
  148. package/dist/hooks/use-stylesheet.d.ts +15 -0
  149. package/dist/hooks/use-stylesheet.js +81 -0
  150. package/dist/hooks/use-stylesheet.js.map +1 -0
  151. package/dist/{types/hooks → hooks}/use-text.d.ts +0 -0
  152. package/dist/{lib/hooks → hooks}/use-text.js +0 -0
  153. package/dist/hooks/use-text.js.map +1 -0
  154. package/dist/{types/hooks → hooks}/use-url-params.d.ts +0 -0
  155. package/dist/{lib/hooks → hooks}/use-url-params.js +0 -0
  156. package/dist/hooks/use-url-params.js.map +1 -0
  157. package/dist/{types/index.d.ts → index.d.ts} +0 -0
  158. package/dist/{lib/index.js → index.js} +0 -0
  159. package/dist/index.js.map +1 -0
  160. package/dist/{types/is-touch.d.ts → is-touch.d.ts} +0 -0
  161. package/dist/{lib/is-touch.js → is-touch.js} +0 -0
  162. package/dist/is-touch.js.map +1 -0
  163. package/dist/{types/media-query → media-query}/breakpoints.d.ts +0 -0
  164. package/dist/{lib/media-query → media-query}/breakpoints.js +0 -0
  165. package/dist/media-query/breakpoints.js.map +1 -0
  166. package/dist/{types/media-query → media-query}/index.d.ts +0 -0
  167. package/dist/{lib/media-query → media-query}/index.js +0 -0
  168. package/dist/media-query/index.js.map +1 -0
  169. package/dist/{types/media-query → media-query}/media-query.d.ts +0 -0
  170. package/dist/{lib/media-query → media-query}/media-query.js +0 -0
  171. package/dist/media-query/media-query.js.map +1 -0
  172. package/dist/{types/media-query → media-query}/media-query.types.d.ts +0 -0
  173. package/dist/{lib/media-query → media-query}/media-query.types.js +0 -0
  174. package/dist/media-query/media-query.types.js.map +1 -0
  175. package/dist/{types/media-query → media-query}/utils/index.d.ts +0 -0
  176. package/dist/{lib/media-query → media-query}/utils/index.js +0 -0
  177. package/dist/media-query/utils/index.js.map +1 -0
  178. package/dist/{types/raf-throttle.d.ts → raf-throttle.d.ts} +0 -0
  179. package/dist/{lib/raf-throttle.js → raf-throttle.js} +0 -0
  180. package/dist/raf-throttle.js.map +1 -0
  181. package/dist/{types/throttle.d.ts → throttle.d.ts} +0 -0
  182. package/dist/{lib/throttle.js → throttle.js} +0 -0
  183. package/dist/throttle.js.map +1 -0
  184. package/dist/{types/to-currency.d.ts → to-currency.d.ts} +0 -0
  185. package/dist/{lib/to-currency.js → to-currency.js} +0 -0
  186. package/dist/to-currency.js.map +1 -0
  187. package/package.json +7 -11
  188. package/dist/esm/api/http.js +0 -120
  189. package/dist/esm/api/http.js.map +0 -1
  190. package/dist/esm/api/index.js +0 -11
  191. package/dist/esm/api/index.js.map +0 -1
  192. package/dist/esm/api-utilities/compose-exclude-string.js +0 -6
  193. package/dist/esm/api-utilities/compose-exclude-string.js.map +0 -1
  194. package/dist/esm/api-utilities/decimal-range/merge-decimal-range.js +0 -13
  195. package/dist/esm/api-utilities/decimal-range/merge-decimal-range.js.map +0 -1
  196. package/dist/esm/api-utilities/decimal-range/merge-specification-range.js +0 -29
  197. package/dist/esm/api-utilities/decimal-range/merge-specification-range.js.map +0 -1
  198. package/dist/esm/api-utilities/district-status.js +0 -14
  199. package/dist/esm/api-utilities/district-status.js.map +0 -1
  200. package/dist/esm/api-utilities/find-filter.js +0 -41
  201. package/dist/esm/api-utilities/find-filter.js.map +0 -1
  202. package/dist/esm/api-utilities/get/coordinates.js +0 -31
  203. package/dist/esm/api-utilities/get/coordinates.js.map +0 -1
  204. package/dist/esm/api-utilities/get/layer-raster.js +0 -4
  205. package/dist/esm/api-utilities/get/layer-raster.js.map +0 -1
  206. package/dist/esm/api-utilities/show-price.js +0 -7
  207. package/dist/esm/api-utilities/show-price.js.map +0 -1
  208. package/dist/esm/atomify.js +0 -14
  209. package/dist/esm/atomify.js.map +0 -1
  210. package/dist/esm/constants/index.js +0 -7
  211. package/dist/esm/constants/index.js.map +0 -1
  212. package/dist/esm/date.js +0 -11
  213. package/dist/esm/date.js.map +0 -1
  214. package/dist/esm/debounce.js +0 -25
  215. package/dist/esm/debounce.js.map +0 -1
  216. package/dist/esm/dom/dom.js +0 -9
  217. package/dist/esm/dom/dom.js.map +0 -1
  218. package/dist/esm/environment.js +0 -27
  219. package/dist/esm/environment.js.map +0 -1
  220. package/dist/esm/extended-api-models/excluded-properties.js +0 -36
  221. package/dist/esm/extended-api-models/excluded-properties.js.map +0 -1
  222. package/dist/esm/extended-api-models/extended-area-projects.js +0 -12
  223. package/dist/esm/extended-api-models/extended-area-projects.js.map +0 -1
  224. package/dist/esm/extended-api-models/extended-area.js +0 -182
  225. package/dist/esm/extended-api-models/extended-area.js.map +0 -1
  226. package/dist/esm/extended-api-models/status/apartment-building-status.js +0 -60
  227. package/dist/esm/extended-api-models/status/apartment-building-status.js.map +0 -1
  228. package/dist/esm/extended-api-models/status/construction-number-status.js +0 -20
  229. package/dist/esm/extended-api-models/status/construction-number-status.js.map +0 -1
  230. package/dist/esm/extended-api-models/status/property-type-status.js +0 -60
  231. package/dist/esm/extended-api-models/status/property-type-status.js.map +0 -1
  232. package/dist/esm/extended-api-models/utilities/apartment-building-view.js +0 -5
  233. package/dist/esm/extended-api-models/utilities/apartment-building-view.js.map +0 -1
  234. package/dist/esm/extended-api-models/utilities/extended-model-price-range.js +0 -37
  235. package/dist/esm/extended-api-models/utilities/extended-model-price-range.js.map +0 -1
  236. package/dist/esm/extended-api-models/utilities/find-extended-object.js +0 -23
  237. package/dist/esm/extended-api-models/utilities/find-extended-object.js.map +0 -1
  238. package/dist/esm/extended-api-models/utilities/is-apartment.js +0 -14
  239. package/dist/esm/extended-api-models/utilities/is-apartment.js.map +0 -1
  240. package/dist/esm/function-is-true.js +0 -13
  241. package/dist/esm/function-is-true.js.map +0 -1
  242. package/dist/esm/generated/bpd-client.js +0 -53
  243. package/dist/esm/generated/bpd-client.js.map +0 -1
  244. package/dist/esm/geometry/country-bounding-box.js +0 -14
  245. package/dist/esm/geometry/country-bounding-box.js.map +0 -1
  246. package/dist/esm/geometry/geometry.js +0 -65
  247. package/dist/esm/geometry/geometry.js.map +0 -1
  248. package/dist/esm/hooks/use-click-outside.js +0 -34
  249. package/dist/esm/hooks/use-click-outside.js.map +0 -1
  250. package/dist/esm/hooks/use-form-changes.js +0 -30
  251. package/dist/esm/hooks/use-form-changes.js.map +0 -1
  252. package/dist/esm/hooks/use-history.js +0 -15
  253. package/dist/esm/hooks/use-history.js.map +0 -1
  254. package/dist/esm/hooks/use-keyboard-focus.js +0 -14
  255. package/dist/esm/hooks/use-keyboard-focus.js.map +0 -1
  256. package/dist/esm/hooks/use-lazy.js +0 -47
  257. package/dist/esm/hooks/use-lazy.js.map +0 -1
  258. package/dist/esm/hooks/use-map-storage.js +0 -16
  259. package/dist/esm/hooks/use-map-storage.js.map +0 -1
  260. package/dist/esm/hooks/use-scroll-position.js +0 -23
  261. package/dist/esm/hooks/use-scroll-position.js.map +0 -1
  262. package/dist/esm/hooks/use-scroll-to.js +0 -66
  263. package/dist/esm/hooks/use-scroll-to.js.map +0 -1
  264. package/dist/esm/hooks/use-stylesheet.js +0 -8
  265. package/dist/esm/hooks/use-stylesheet.js.map +0 -1
  266. package/dist/esm/hooks/use-url-params.js +0 -31
  267. package/dist/esm/hooks/use-url-params.js.map +0 -1
  268. package/dist/esm/index.js +0 -40
  269. package/dist/esm/index.js.map +0 -1
  270. package/dist/esm/is-touch.js +0 -32
  271. package/dist/esm/is-touch.js.map +0 -1
  272. package/dist/esm/media-query/breakpoints.js +0 -29
  273. package/dist/esm/media-query/breakpoints.js.map +0 -1
  274. package/dist/esm/media-query/media-query.js +0 -39
  275. package/dist/esm/media-query/media-query.js.map +0 -1
  276. package/dist/esm/media-query/utils/index.js +0 -35
  277. package/dist/esm/media-query/utils/index.js.map +0 -1
  278. package/dist/esm/node_modules/@atomify/jsx/dist/core/apply-attributes.js +0 -87
  279. package/dist/esm/node_modules/@atomify/jsx/dist/core/apply-attributes.js.map +0 -1
  280. package/dist/esm/node_modules/@atomify/jsx/dist/core/create-element.js +0 -14
  281. package/dist/esm/node_modules/@atomify/jsx/dist/core/create-element.js.map +0 -1
  282. package/dist/esm/node_modules/@atomify/jsx/dist/core/create-fragment-from-children.js +0 -20
  283. package/dist/esm/node_modules/@atomify/jsx/dist/core/create-fragment-from-children.js.map +0 -1
  284. package/dist/esm/node_modules/@atomify/jsx/dist/index.js +0 -18
  285. package/dist/esm/node_modules/@atomify/jsx/dist/index.js.map +0 -1
  286. package/dist/esm/node_modules/@atomify/jsx/dist/utilities/class-names.js +0 -19
  287. package/dist/esm/node_modules/@atomify/jsx/dist/utilities/class-names.js.map +0 -1
  288. package/dist/esm/node_modules/@atomify/jsx/dist/utilities/index.js +0 -7
  289. package/dist/esm/node_modules/@atomify/jsx/dist/utilities/index.js.map +0 -1
  290. package/dist/esm/node_modules/@atomify/jsx/dist/utilities/is-boolean-attr.js +0 -29
  291. package/dist/esm/node_modules/@atomify/jsx/dist/utilities/is-boolean-attr.js.map +0 -1
  292. package/dist/esm/node_modules/@atomify/jsx/dist/utilities/is-custom-element.js +0 -6
  293. package/dist/esm/node_modules/@atomify/jsx/dist/utilities/is-custom-element.js.map +0 -1
  294. package/dist/esm/node_modules/@atomify/jsx/dist/utilities/is-svg.js +0 -101
  295. package/dist/esm/node_modules/@atomify/jsx/dist/utilities/is-svg.js.map +0 -1
  296. package/dist/esm/node_modules/@atomify/kit/dist/hooks/use-classname.js +0 -34
  297. package/dist/esm/node_modules/@atomify/kit/dist/hooks/use-classname.js.map +0 -1
  298. package/dist/esm/node_modules/@atomify/kit/dist/hooks/use-store.js +0 -13
  299. package/dist/esm/node_modules/@atomify/kit/dist/hooks/use-store.js.map +0 -1
  300. package/dist/esm/node_modules/@atomify/kit/dist/index.js +0 -8
  301. package/dist/esm/node_modules/@atomify/kit/dist/index.js.map +0 -1
  302. package/dist/esm/node_modules/@atomify/kit/dist/utilities/inview/inview.js +0 -66
  303. package/dist/esm/node_modules/@atomify/kit/dist/utilities/inview/inview.js.map +0 -1
  304. package/dist/esm/node_modules/@atomify/kit/dist/utilities/inview/utils/build-treshhold-list.js +0 -13
  305. package/dist/esm/node_modules/@atomify/kit/dist/utilities/inview/utils/build-treshhold-list.js.map +0 -1
  306. package/dist/esm/node_modules/@atomify/kit/dist/utilities/inview/utils/generate-unique-element-id.js +0 -20
  307. package/dist/esm/node_modules/@atomify/kit/dist/utilities/inview/utils/generate-unique-element-id.js.map +0 -1
  308. package/dist/esm/node_modules/@atomify/kit/dist/utilities/inview/utils/has-observer-items.js +0 -22
  309. package/dist/esm/node_modules/@atomify/kit/dist/utilities/inview/utils/has-observer-items.js.map +0 -1
  310. package/dist/esm/node_modules/@atomify/kit/dist/utilities/inview/utils/on-change.js +0 -21
  311. package/dist/esm/node_modules/@atomify/kit/dist/utilities/inview/utils/on-change.js.map +0 -1
  312. package/dist/esm/node_modules/@atomify/kit/dist/utilities/loadable/loadable.js +0 -79
  313. package/dist/esm/node_modules/@atomify/kit/dist/utilities/loadable/loadable.js.map +0 -1
  314. package/dist/esm/node_modules/@atomify/kit/dist/utilities/media-query/breakpoints.js +0 -29
  315. package/dist/esm/node_modules/@atomify/kit/dist/utilities/media-query/breakpoints.js.map +0 -1
  316. package/dist/esm/node_modules/@atomify/kit/dist/utilities/media-query/media-query.js +0 -34
  317. package/dist/esm/node_modules/@atomify/kit/dist/utilities/media-query/media-query.js.map +0 -1
  318. package/dist/esm/node_modules/@atomify/kit/dist/utilities/media-query/utils/index.js +0 -38
  319. package/dist/esm/node_modules/@atomify/kit/dist/utilities/media-query/utils/index.js.map +0 -1
  320. package/dist/esm/node_modules/@atomify/kit/dist/utilities/store/polyfill/index.js +0 -12
  321. package/dist/esm/node_modules/@atomify/kit/dist/utilities/store/polyfill/index.js.map +0 -1
  322. package/dist/esm/node_modules/@atomify/kit/dist/utilities/store/polyfill/proxy.js +0 -119
  323. package/dist/esm/node_modules/@atomify/kit/dist/utilities/store/polyfill/proxy.js.map +0 -1
  324. package/dist/esm/node_modules/@atomify/kit/dist/utilities/store/store.js +0 -53
  325. package/dist/esm/node_modules/@atomify/kit/dist/utilities/store/store.js.map +0 -1
  326. package/dist/esm/raf-throttle.js +0 -24
  327. package/dist/esm/raf-throttle.js.map +0 -1
  328. package/dist/esm/throttle.js +0 -23
  329. package/dist/esm/throttle.js.map +0 -1
  330. package/dist/esm/to-currency.js +0 -26
  331. package/dist/esm/to-currency.js.map +0 -1
  332. package/dist/lib/api/http.js.map +0 -1
  333. package/dist/lib/api/index.js.map +0 -1
  334. package/dist/lib/api-utilities/api-utilities.js.map +0 -1
  335. package/dist/lib/api-utilities/api-utilities.test.js.map +0 -1
  336. package/dist/lib/api-utilities/api-utilities.types.js.map +0 -1
  337. package/dist/lib/api-utilities/compose-exclude-string.js.map +0 -1
  338. package/dist/lib/api-utilities/decimal-range/merge-decimal-range.js.map +0 -1
  339. package/dist/lib/api-utilities/decimal-range/merge-specification-range.js.map +0 -1
  340. package/dist/lib/api-utilities/district-status.js.map +0 -1
  341. package/dist/lib/api-utilities/find-filter.js.map +0 -1
  342. package/dist/lib/api-utilities/get/coordinates.js.map +0 -1
  343. package/dist/lib/api-utilities/get/layer-raster.js.map +0 -1
  344. package/dist/lib/api-utilities/index.js.map +0 -1
  345. package/dist/lib/api-utilities/show-price.js.map +0 -1
  346. package/dist/lib/atomify/index.js +0 -6
  347. package/dist/lib/atomify/index.js.map +0 -1
  348. package/dist/lib/atomify.js +0 -11
  349. package/dist/lib/atomify.js.map +0 -1
  350. package/dist/lib/constants/index.js.map +0 -1
  351. package/dist/lib/date.js.map +0 -1
  352. package/dist/lib/debounce.js.map +0 -1
  353. package/dist/lib/dom/dom.js.map +0 -1
  354. package/dist/lib/dom/index.js.map +0 -1
  355. package/dist/lib/environment.js.map +0 -1
  356. package/dist/lib/extended-api-models/excluded-properties.js.map +0 -1
  357. package/dist/lib/extended-api-models/extended-area-projects.js.map +0 -1
  358. package/dist/lib/extended-api-models/extended-area.js.map +0 -1
  359. package/dist/lib/extended-api-models/index.js.map +0 -1
  360. package/dist/lib/extended-api-models/status/apartment-building-status.js.map +0 -1
  361. package/dist/lib/extended-api-models/status/construction-number-status.js.map +0 -1
  362. package/dist/lib/extended-api-models/status/property-type-status.js.map +0 -1
  363. package/dist/lib/extended-api-models/utilities/apartment-building-view.js.map +0 -1
  364. package/dist/lib/extended-api-models/utilities/extended-model-price-range.js.map +0 -1
  365. package/dist/lib/extended-api-models/utilities/find-extended-object.js.map +0 -1
  366. package/dist/lib/extended-api-models/utilities/is-apartment.js.map +0 -1
  367. package/dist/lib/function-is-true.js.map +0 -1
  368. package/dist/lib/generated/bpd-client.js.map +0 -1
  369. package/dist/lib/generated/index.js.map +0 -1
  370. package/dist/lib/geometry/country-bounding-box.js.map +0 -1
  371. package/dist/lib/geometry/geometry.js.map +0 -1
  372. package/dist/lib/geometry/geometry.test.js.map +0 -1
  373. package/dist/lib/geometry/index.js.map +0 -1
  374. package/dist/lib/hooks/index.js.map +0 -1
  375. package/dist/lib/hooks/use-click-outside.js.map +0 -1
  376. package/dist/lib/hooks/use-delegate-listen.js.map +0 -1
  377. package/dist/lib/hooks/use-form-changes.js.map +0 -1
  378. package/dist/lib/hooks/use-history.js.map +0 -1
  379. package/dist/lib/hooks/use-input.js.map +0 -1
  380. package/dist/lib/hooks/use-keyboard-focus.js.map +0 -1
  381. package/dist/lib/hooks/use-lazy.js.map +0 -1
  382. package/dist/lib/hooks/use-map-storage.js.map +0 -1
  383. package/dist/lib/hooks/use-scroll-position.js.map +0 -1
  384. package/dist/lib/hooks/use-scroll-to.js.map +0 -1
  385. package/dist/lib/hooks/use-stylesheet.js +0 -5
  386. package/dist/lib/hooks/use-stylesheet.js.map +0 -1
  387. package/dist/lib/hooks/use-text.js.map +0 -1
  388. package/dist/lib/hooks/use-url-params.js.map +0 -1
  389. package/dist/lib/index.js.map +0 -1
  390. package/dist/lib/is-touch.js.map +0 -1
  391. package/dist/lib/media-query/breakpoints.js.map +0 -1
  392. package/dist/lib/media-query/index.js.map +0 -1
  393. package/dist/lib/media-query/media-query.js.map +0 -1
  394. package/dist/lib/media-query/media-query.types.js.map +0 -1
  395. package/dist/lib/media-query/utils/index.js.map +0 -1
  396. package/dist/lib/raf-throttle.js.map +0 -1
  397. package/dist/lib/throttle.js.map +0 -1
  398. package/dist/lib/to-currency.js.map +0 -1
  399. package/dist/types/api-utilities/get/coordinates.d.ts +0 -6
  400. package/dist/types/atomify/index.d.ts +0 -5
  401. package/dist/types/atomify.d.ts +0 -10
  402. package/dist/types/hooks/use-stylesheet.d.ts +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bpd-client.js","sourceRoot":"","sources":["../../src/generated/bpd-client.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAq3BnC,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAClC,MAA0C,EAC1C,MAAsB,EACxB,EAAE,CACA,SAAS,CAAC,GAAG,CAA2B,yBAAyB,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,IAAI,CACnF,CAAC,GAAG,EAAE,EAAE,CAAC,GAAI,CAChB,CAAC;AAEN,MAAM,CAAC,MAAM,wCAAwC,GAAG,CACpD,MAAqB,EACrB,IAAkC,EAClC,MAAsB,EACxB,EAAE,CAAC,SAAS,CAAC,GAAG,CAAO,2BAA2B,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAI,CAAC,CAAC;AAEhG,MAAM,CAAC,MAAM,wCAAwC,GAAG,CACpD,MAAqB,EACrB,IAAS,EACT,MAAsB,EACxB,EAAE,CAAC,SAAS,CAAC,MAAM,CAAO,2BAA2B,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAI,CAAC,CAAC;AAEnG,MAAM,CAAC,MAAM,gCAAgC,GAAG,CAC5C,MAAqB,EACrB,MAAoD,EACpD,MAAsB,EACxB,EAAE,CACA,SAAS,CAAC,GAAG,CAAyB,2BAA2B,MAAM,EAAE,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,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AAO,EAAE,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAI,CAAC,CAAC","sourcesContent":["/* eslint-disable @typescript-eslint/interface-name-prefix */\n/* Generated by oats-generator */\n\nimport { APIClient } from '../api';\nimport { RequestConfig } from '../api/http';\n\nexport interface ResourceModel {\n title?: string | null;\n url?: string | null;\n resourceType?: string | null;\n contentType?: string | null;\n lastUpdatedUtc?: string;\n metadata?: {\n [key: string]: string;\n } | null;\n}\n\nexport interface PolygonModel {\n coordinates?: number[][] | null;\n}\n\nexport interface ApartmentBuildingViewPointer {\n type?: string | null;\n coordinates?: number[] | null;\n constructionNumberId?: string | null;\n linkToViewId?: string | null;\n label?: string | null;\n alignment?: string | null;\n compassDirection?: string | null;\n}\n\nexport interface ApartmentBuildingView {\n id?: string | null;\n imageUrl?: string | null;\n type?: string | null;\n sourceUrl?: string | null;\n label?: string | null;\n buttonLabel?: string | null;\n rotateLeftViewId?: string | null;\n rotateRightViewId?: string | null;\n pointers?: ApartmentBuildingViewPointer[] | null;\n}\n\nexport interface ApartmentBuildingModel {\n areaProjectId?: string | null;\n projectPhaseId?: string | null;\n projectPhaseName?: string | null;\n displayName?: string | null;\n alias?: string | null;\n nodeId?: string | null;\n propertyTypeIds?: string[] | null;\n constructionNumberIds?: string[] | null;\n image?: ResourceModel;\n geometry?: PolygonModel[] | null;\n views?: ApartmentBuildingView[] | null;\n id: string;\n}\n\nexport interface ResourceReference {\n ownerId?: string | null;\n ownerType?: string | null;\n isMainResource?: boolean | null;\n}\n\nexport interface UpdateResourceModel {\n title?: string | null;\n url?: string | null;\n resourceType?: string | null;\n contentType?: string | null;\n sortIndex?: number;\n references?: ResourceReference[] | null;\n metadata?: {\n [key: string]: string;\n } | null;\n}\n\nexport interface UpdateApartmentBuildingModel {\n districtId?: string | null;\n alias?: string | null;\n displayName?: string | null;\n description?: string | null;\n propertyTypeIds?: string[] | null;\n sortIndex?: number;\n views?: ApartmentBuildingView[] | null;\n image?: UpdateResourceModel;\n}\n\nexport interface ProblemDetails {\n type?: string | null;\n title?: string | null;\n status?: number | null;\n detail?: string | null;\n instance?: string | null;\n}\n\nexport type ProvisioningStatus =\n | 'ProvisionedUmbraco7'\n | 'NotProvisioned'\n | 'ProvisioningPending'\n | 'Provisioning'\n | 'ProvisionedUmbraco8';\n\nexport interface Time {\n hour?: number;\n minute?: number;\n}\n\nexport interface TimeRange {\n from?: Time;\n to?: Time;\n}\n\nexport interface WebsiteContact {\n enableWebchat?: boolean;\n webchatServer?: string | null;\n webchatUcc?: string | null;\n phoneNumber?: string | null;\n emailAddress?: string | null;\n facebookUrl?: string | null;\n pinterestUrl?: string | null;\n twitterUrl?: string | null;\n caseViaEmail?: boolean;\n openingHoursWeekdays?: TimeRange;\n openingHoursSaturday?: TimeRange;\n openingHoursSunday?: TimeRange;\n isClosedToday?: boolean;\n}\n\nexport interface Website {\n isActive?: boolean;\n provisioningStatus?: ProvisioningStatus;\n mapboxTilesetId?: string | null;\n mapboxDatasetId?: string | null;\n url?: string | null;\n isActiveDomain?: boolean;\n enableCustomerCommunity?: boolean;\n enableFavourites?: boolean;\n enableMortgageCalculator?: boolean;\n secondLevelNavigationButtonLabelSingular?: {\n [key: string]: string;\n } | null;\n secondLevelNavigationButtonLabelPlural?: {\n [key: string]: string;\n } | null;\n skinName?: string | null;\n contactDetails?: WebsiteContact;\n showOnCorporateSite?: boolean;\n}\n\nexport interface AreaProjectModel {\n name?: string | null;\n shortDescription?: string | null;\n regionId?: string | null;\n countryName?: string | null;\n municipalityName?: string | null;\n url?: string | null;\n isSingleProject?: boolean;\n isCompleted?: boolean;\n image?: ResourceModel;\n location?: number[] | null;\n geometry?: PolygonModel[] | null;\n sustainabilitySubjects?: string[] | null;\n sustainabilityInfoText?: string | null;\n mapboxDatasetId?: string | null;\n mapboxTilesetId?: string | null;\n caseViaEmail?: boolean;\n website?: Website;\n id: string;\n}\n\nexport interface SeoText {\n saleTitle?: string | null;\n saleText?: string | null;\n rentalTitle?: string | null;\n rentalText?: string | null;\n}\n\nexport interface CityModel {\n countryId?: string | null;\n countryIsoCode?: string | null;\n provinceId?: string | null;\n name?: string | null;\n municipalityName?: string | null;\n seoText?: SeoText;\n id: string;\n}\n\nexport type ConstructionNumberStatus = 'Available' | 'InOption' | 'Sold';\n\nexport interface GroundLease {\n priceWithCanonDecimal?: number | null;\n canonPercentageYearly?: number | null;\n canonAmountYearlyDecimal?: number | null;\n canonPercentage10Year?: number | null;\n canonAmount10YearDecimal?: number | null;\n canonPercentage25Year?: number | null;\n canonAmount25YearDecimal?: number | null;\n buyOffAmountDecimal?: number | null;\n priceWithBuyOffDecimal?: number | null;\n}\n\nexport interface DecimalRange {\n from?: number;\n to?: number | null;\n}\n\nexport interface ConstructionNumberSpecifications {\n nonLivingArea?: DecimalRange;\n buildingRelatedExternalSpace?: DecimalRange;\n externalStorage?: DecimalRange;\n characteristic?: string | null;\n sunDirection?: string | null;\n rooms?: DecimalRange;\n bedrooms?: DecimalRange;\n livingArea?: DecimalRange;\n livingRoomArea?: DecimalRange;\n plotArea?: DecimalRange;\n volume?: DecimalRange;\n}\n\nexport type PriceCondition = 'VrijOpNaam' | 'KostenKoper';\n\nexport type SaleSpecification = 'ExclusiefBouwrente' | 'BtwBelast' | 'InclusiefBtw';\n\nexport type PriceType =\n | 'ExactSum'\n | 'AskingPrice'\n | 'StartsFrom'\n | 'Indication'\n | 'Circa'\n | 'PriceOnRequest';\n\nexport interface PropertySalesPrice {\n condition?: PriceCondition;\n saleSpecification?: SaleSpecification;\n amount?: DecimalRange;\n priceType?: PriceType;\n priceTypeFunda?: string | null;\n monthlyServiceCosts?: number | null;\n}\n\nexport interface PropertyRentalPrice {\n deposit?: number | null;\n amount?: DecimalRange;\n priceType?: PriceType;\n priceTypeFunda?: string | null;\n monthlyServiceCosts?: number | null;\n}\n\nexport interface LandRegistrationDetails {\n name?: string | null;\n proportion?: string | null;\n purchaseOption?: boolean | null;\n dateOfRequest?: string | null;\n durationOfLeaseHold?: string | null;\n isPermanentlyBought?: boolean | null;\n leaseHoldProvider?: string | null;\n leaseHoldPerYear?: number | null;\n cityHall?: string | null;\n municipalityId?: string | null;\n municipalityCode?: string | null;\n number?: string | null;\n scope?: string | null;\n area?: number | null;\n section?: string | null;\n type?: string | null;\n fixedVariable?: string | null;\n propertyTypeType?: string | null;\n propertyType?: string | null;\n plot?: string | null;\n constructionNumberId?: string | null;\n id?: string | null;\n dbCreateTimestamp?: number | null;\n dbUpdateTimestamp?: number | null;\n}\n\nexport interface Vve {\n vveContribution?: number | null;\n hasMaintenanceForecast?: boolean | null;\n hasPeriodicContribution?: boolean | null;\n isRegisteredInKvK?: boolean | null;\n hasHomeInsurance?: boolean | null;\n hasReserveFunds?: boolean | null;\n hasMeetings?: boolean | null;\n}\n\nexport interface ExtraSpecifications {\n quality?: string | null;\n isPermanentResidence?: boolean | null;\n isRecreationalResidence?: boolean | null;\n isInPark?: boolean | null;\n isPractice?: boolean | null;\n hasExternalStorage?: boolean | null;\n hasVveChecklist?: boolean | null;\n hasOpenPorch?: boolean | null;\n location?: string[] | null;\n certifications?: string[] | null;\n hotWater?: string[] | null;\n facilities?: string[] | null;\n isolation?: string[] | null;\n heating?: string[] | null;\n cooling?: string[] | null;\n energyPerformance?: string[] | null;\n remarks?: string[] | null;\n roofMaterial?: string | null;\n roofType?: string | null;\n roofRemarks?: string | null;\n energyLabel?: string | null;\n maintenanceInside?: string | null;\n maintenanceOutside?: string | null;\n vve?: Vve;\n}\n\nexport interface Room {\n name?: string | null;\n type?: string | null;\n hasStairs?: boolean | null;\n length?: number | null;\n width?: number | null;\n height?: number | null;\n area?: number | null;\n volume?: number | null;\n renewedIn?: string | null;\n facilities?: string[] | null;\n}\n\nexport interface Floor {\n name?: string | null;\n type?: string | null;\n floorNumber?: string | null;\n totalNumberOfRooms?: number | null;\n totalNumberOfBedrooms?: number | null;\n rooms?: Room[] | null;\n id?: string | null;\n dbCreateTimestamp?: number | null;\n dbUpdateTimestamp?: number | null;\n}\n\nexport interface Garden {\n type?: string | null;\n position?: string | null;\n length?: number | null;\n width?: number | null;\n area?: number | null;\n hasBackEntrance?: boolean | null;\n isMain?: boolean;\n id?: string | null;\n dbCreateTimestamp?: number | null;\n dbUpdateTimestamp?: number | null;\n}\n\nexport interface OutsideSpace {\n type?: string | null;\n position?: string | null;\n length?: number | null;\n width?: number | null;\n area?: number | null;\n hasBackEntrance?: boolean | null;\n id?: string | null;\n dbCreateTimestamp?: number | null;\n dbUpdateTimestamp?: number | null;\n}\n\nexport type GeoJSONObjectType =\n | 'Point'\n | 'MultiPoint'\n | 'LineString'\n | 'MultiLineString'\n | 'Polygon'\n | 'MultiPolygon'\n | 'GeometryCollection'\n | 'Feature'\n | 'FeatureCollection';\n\nexport interface IGeometryObject {\n type?: GeoJSONObjectType;\n}\n\nexport type CRSType = 'unspecified' | 'name' | 'link';\n\nexport interface ICRSObject {\n type?: CRSType;\n}\n\nexport interface Feature {\n type?: GeoJSONObjectType;\n id?: string | null;\n geometry: IGeometryObject;\n properties: { [key: string]: any } | null;\n bbox?: number[] | null;\n crs?: ICRSObject;\n}\n\nexport interface FeatureCollection {\n type?: GeoJSONObjectType;\n features: Feature[];\n bbox?: number[] | null;\n crs?: ICRSObject;\n}\n\nexport interface Outbuilding {\n typeCode?: string | null;\n name?: string | null;\n geometry?: FeatureCollection;\n type?: string | null;\n outbuildingType?: string | null;\n length?: number | null;\n width?: number | null;\n area?: number | null;\n isolation?: string[] | null;\n facilities?: string[] | null;\n facilitiesRemarks?: string | null;\n situation?: string | null;\n capacity?: number | null;\n id?: string | null;\n dbCreateTimestamp?: number | null;\n dbUpdateTimestamp?: number | null;\n}\n\nexport interface ConstructionNumberModel {\n areaProjectId?: string | null;\n districtId?: string | null;\n projectPhaseId?: string | null;\n projectPhaseName?: string | null;\n propertyTypeId?: string | null;\n propertyTypeName?: string | null;\n apartmentBuildingId?: string | null;\n identifier?: string | null;\n serviceCostsPerMonth?: number;\n security?: number | null;\n wishlistItemCount?: number;\n numberOfReserveCandidates?: number;\n availabilityStatus?: ConstructionNumberStatus;\n shortDescription?: string | null;\n longDescription?: string | null;\n houseSubType?: string | null;\n deliveryDate?: string | null;\n geometry?: PolygonModel[] | null;\n resources?: ResourceModel[] | null;\n groundLease?: GroundLease;\n mainImage?: ResourceModel;\n specifications?: ConstructionNumberSpecifications;\n salesPrice?: PropertySalesPrice;\n rentalPrice?: PropertyRentalPrice;\n landRegistration?: LandRegistrationDetails;\n extraSpecifications?: ExtraSpecifications;\n floors?: Floor[] | null;\n gardens?: Garden[] | null;\n outsideSpace?: OutsideSpace[] | null;\n outbuildings?: Outbuilding[] | null;\n id: string;\n}\n\nexport interface CountryModel {\n isoCode?: string | null;\n name?: string | null;\n englishName?: string | null;\n seoText?: SeoText;\n id: string;\n}\n\nexport interface CountryQuery {\n [key: string]: any;\n}\n\nexport interface DistrictModel {\n areaProjectId?: string | null;\n name?: string | null;\n url?: string | null;\n location?: number[] | null;\n geometry?: PolygonModel[] | null;\n isSold?: boolean;\n enableWishlist?: boolean;\n descriptionTitle?: string | null;\n description?: string | null;\n image?: ResourceModel;\n id: string;\n}\n\nexport type Salutation = 'Undefined' | 'Mr' | 'Mrs' | 'Ms';\n\nexport interface LeadFormModel {\n city?: string | null;\n phone?: string | null;\n mobilePhone?: string | null;\n email?: string | null;\n countryId?: string | null;\n brochureId?: string | null;\n comment?: string | null;\n projectId?: string | null;\n propertyTypeId?: string | null;\n constructionNumberId?: string | null;\n areaProjectId?: string | null;\n districtId?: string | null;\n leadSource?: string | null;\n referringUrl?: string | null;\n salutation?: Salutation;\n initials?: string | null;\n firstName?: string | null;\n lastName?: string | null;\n lastNamePrefix?: string | null;\n street?: string | null;\n houseNumber?: string | null;\n houseNumberAddition?: string | null;\n postalCode?: string | null;\n}\n\nexport interface CaseFormModel {\n areaProjectId?: string | null;\n districtId?: string | null;\n projectId?: string | null;\n propertyTypeId?: string | null;\n regionId?: string | null;\n firstName?: string | null;\n lastName?: string | null;\n lastNamePrefix?: string | null;\n email: string;\n message: string;\n contactReason?: string | null;\n phoneNumber?: string | null;\n webcareSubject?: string | null;\n chatUrl?: string | null;\n mailTo?: string | null;\n referringUrl?: string | null;\n}\n\nexport interface DynamicFormModel {\n objectName?: string | null;\n mailTo?: string | null;\n fields?: {\n [key: string]: string;\n } | null;\n}\n\nexport interface APIProject {\n id?: string | null;\n name?: string | null;\n cityName?: string | null;\n fundaStatus?: string | null;\n fundaLastSyncDate?: string | null;\n fundaGatewayTransactionId?: number | null;\n fundaId?: number | null;\n connectionVersion?: string | null;\n userType?: string | null;\n gwnProjectVersion?: string | null;\n isAdmin?: boolean;\n}\n\nexport interface SerializedFeature {\n featureId?: string | null;\n featureJson?: string | null;\n}\n\nexport interface SerializedObjectFeatures {\n objectId?: string | null;\n features?: SerializedFeature[] | null;\n}\n\nexport interface SerializedFeatures {\n objectFeatures?: SerializedObjectFeatures[] | null;\n}\n\nexport type GrantStatus = 'NotActive' | 'ApplicationGranted';\n\nexport interface GrantModel {\n displayOnMap?: boolean;\n projectName?: string | null;\n cityName?: string | null;\n location?: number[] | null;\n status?: GrantStatus;\n id: string;\n}\n\nexport type ProjectPhaseStatus =\n | 'InPreparation'\n | 'OnSale'\n | 'Sold'\n | 'ForRent'\n | 'Rented'\n | 'NotActive';\n\nexport interface PropertySpecifications {\n rooms?: DecimalRange;\n bedrooms?: DecimalRange;\n livingArea?: DecimalRange;\n livingRoomArea?: DecimalRange;\n plotArea?: DecimalRange;\n volume?: DecimalRange;\n}\n\nexport interface ProjectPhaseModel {\n areaProjectId?: string | null;\n areaProjectName?: string | null;\n districtId?: string | null;\n name?: string | null;\n url?: string | null;\n districtUrl?: string | null;\n shortDescription?: string | null;\n longDescription?: string | null;\n status?: ProjectPhaseStatus;\n saleStartDate?: string | null;\n saleEndDate?: string | null;\n allocationDate?: string | null;\n cityName?: string | null;\n municipalityName?: string | null;\n provinceName?: string | null;\n sortIndex?: number | null;\n environmentTypes?: string[] | null;\n deliveryStartDate?: string | null;\n constructionStartDate?: string | null;\n isRental?: boolean;\n isDigitalBrochureEnabled?: boolean;\n indicationServiceCosts?: number | null;\n indicationSecurity?: number | null;\n location?: number[] | null;\n geometry?: PolygonModel[] | null;\n resources?: ResourceModel[] | null;\n mainImage?: ResourceModel;\n propertySpecifications?: PropertySpecifications;\n propertyPurchasePrice?: PropertySalesPrice;\n propertyRentalPrice?: PropertyRentalPrice;\n houseTypes?: string[] | null;\n id: string;\n}\n\nexport interface PropertyTypeModel {\n areaProjectId?: string | null;\n districtId?: string | null;\n projectPhaseId?: string | null;\n projectPhaseName?: string | null;\n name?: string | null;\n shortDescription?: string | null;\n longDescription?: string | null;\n houseType?: string | null;\n houseSubType?: string | null;\n sortIndex?: number | null;\n environmentTypes?: string[] | null;\n hasBalcony?: boolean;\n isRental?: boolean;\n groundLease?: GroundLease;\n geometry?: PolygonModel[] | null;\n resources?: ResourceModel[] | null;\n mainImage?: ResourceModel;\n deliveryStartDate?: string | null;\n constructionStartDate?: string | null;\n indicationServiceCosts?: number | null;\n indicationSecurity?: number | null;\n specifications?: PropertySpecifications;\n salesPrice?: PropertySalesPrice;\n rentalPrice?: PropertyRentalPrice;\n canShowPrice?: boolean;\n extraSpecifications?: ExtraSpecifications;\n floors?: Floor[] | null;\n gardens?: Garden[] | null;\n outsideSpace?: OutsideSpace[] | null;\n outbuildings?: Outbuilding[] | null;\n usp1Title?: string | null;\n usp1Text?: string | null;\n usp2Title?: string | null;\n usp2Text?: string | null;\n id: string;\n}\n\nexport interface ProvinceModel {\n countryId?: string | null;\n countryIsoCode?: string | null;\n name?: string | null;\n seoText?: SeoText;\n id: string;\n}\n\nexport interface RegionModel {\n name?: string | null;\n id: string;\n}\n\nexport interface ApartmentBuildingQueryQueryParams {\n AreaProjectId?: string | null;\n ProjectPhaseId?: string | null;\n exclude?: string | null;\n lang?: string | null;\n}\n\nexport interface ApartmentBuildingUpdateApartmentBuildingQueryParams {\n origin?: string | null;\n}\n\nexport interface ApartmentBuildingDeleteApartmentBuildingQueryParams {\n origin?: string | null;\n}\n\nexport interface ApartmentBuildingGetByExternalIdQueryParams {\n exclude?: string | null;\n lang?: string | null;\n}\n\nexport interface AreaProjectGetByIdQueryParams {\n exclude?: string | null;\n lang?: string | null;\n}\n\nexport interface AreaProjectQueryQueryParams {\n CountryIsoCode?: string | null;\n HasLocationData?: boolean | null;\n CorporateSite?: boolean | null;\n exclude?: string | null;\n lang?: string | null;\n}\n\nexport interface CityGetByNameQueryParams {\n exclude?: string | null;\n lang?: string | null;\n}\n\nexport interface CityGetByIdQueryParams {\n exclude?: string | null;\n lang?: string | null;\n}\n\nexport interface CityQueryQueryParams {\n CountryIsoCode?: string | null;\n exclude?: string | null;\n lang?: string | null;\n}\n\nexport interface ConstructionNumberGetByIdQueryParams {\n exclude?: string | null;\n lang?: string | null;\n}\n\nexport interface ConstructionNumberQueryQueryParams {\n AreaProjectId?: string | null;\n ProjectPhaseId?: string | null;\n PropertyTypeId?: string | null;\n MinPrice?: number | null;\n MaxPrice?: number | null;\n exclude?: string | null;\n lang?: string | null;\n}\n\nexport interface CountryGetByIsoCodeQueryParams {\n exclude?: string | null;\n lang?: string | null;\n}\n\nexport interface CountryGetByIdQueryParams {\n exclude?: string | null;\n lang?: string | null;\n}\n\nexport interface CountryQueryQueryParams {\n query?: CountryQuery;\n exclude?: string | null;\n lang?: string | null;\n}\n\nexport interface DistrictGetByIdQueryParams {\n exclude?: string | null;\n lang?: string | null;\n}\n\nexport interface DistrictQueryQueryParams {\n AreaProjectId?: string | null;\n exclude?: string | null;\n lang?: string | null;\n}\n\nexport interface FundaQueryQueryParams {\n regionId?: string | null;\n query?: string | null;\n userType?: string | null;\n isAdmin?: boolean;\n allowedRegionIds?: string | null;\n}\n\nexport interface FundaGetQueryParams {\n id?: string | null;\n isAdmin?: boolean;\n userType?: string | null;\n}\n\nexport interface FundaSubmitQueryParams {\n id?: string | null;\n incrementVersion?: boolean;\n}\n\nexport interface FundaValidateQueryParams {\n id?: string | null;\n}\n\nexport interface FundaShowLastSubmittedProjectQueryParams {\n projectCrmId?: string | null;\n}\n\nexport interface FundaShowConvertedFundaObjectQueryParams {\n projectCrmId?: string | null;\n}\n\nexport interface FundaCompareFundaObjectRevisionChangesQueryParams {\n projectCrmId?: string | null;\n gwnId?: number;\n}\n\nexport interface FundaShowFundaProjectLogsQueryParams {\n projectCrmId?: string | null;\n}\n\nexport interface FundaGetAllGwnVersionsByProjectIdQueryParams {\n projectCrmId?: string | null;\n}\n\nexport interface FundaRemoveVersionFromGwnQueryParams {\n projectId?: string | null;\n projectFundaId?: number;\n projectCode?: string | null;\n nvmId?: string | null;\n}\n\nexport interface GrantGetByIdQueryParams {\n exclude?: string | null;\n lang?: string | null;\n}\n\nexport interface GrantQueryQueryParams {\n ProjectName?: string | null;\n exclude?: string | null;\n lang?: string | null;\n}\n\nexport interface ProjectPhaseGetByIdQueryParams {\n exclude?: string | null;\n lang?: string | null;\n}\n\nexport interface ProjectPhaseQueryQueryParams {\n CountryIsoCode?: string | null;\n AreaProjectId?: string | null;\n exclude?: string | null;\n lang?: string | null;\n}\n\nexport interface PropertyTypeGetByIdQueryParams {\n exclude?: string | null;\n lang?: string | null;\n}\n\nexport interface PropertyTypeQueryQueryParams {\n AreaProjectId?: string | null;\n ProjectPhaseId?: string | null;\n exclude?: string | null;\n lang?: string | null;\n}\n\nexport interface ProvinceGetByNameQueryParams {\n exclude?: string | null;\n lang?: string | null;\n}\n\nexport interface ProvinceGetByIdQueryParams {\n exclude?: string | null;\n lang?: string | null;\n}\n\nexport interface ProvinceQueryQueryParams {\n CountryIsoCode?: string | null;\n exclude?: string | null;\n lang?: string | null;\n}\n\nexport interface RegionGetByIdQueryParams {\n exclude?: string | null;\n lang?: string | null;\n}\n\nexport interface RegionQueryQueryParams {\n AllowedRegionIds?: string | null;\n exclude?: string | null;\n lang?: string | null;\n}\n\nexport interface ResourceUpdateResourceQueryParams {\n projectId?: string | null;\n}\n\nexport interface ResourceDeleteResourceQueryParams {\n projectId?: string | null;\n}\n\nexport const apartmentBuildingQuery = (\n params?: ApartmentBuildingQueryQueryParams,\n config?: RequestConfig,\n) =>\n APIClient.get<ApartmentBuildingModel[]>(`/api/apartmentbuildings`, params, config).then(\n (res) => res!,\n );\n\nexport const apartmentBuildingUpdateApartmentBuilding = (\n nodeId: string | null,\n body: UpdateApartmentBuildingModel,\n config?: RequestConfig,\n) => APIClient.put<void>(`/api/apartmentbuildings/${nodeId}`, body, config).then((res) => res!);\n\nexport const apartmentBuildingDeleteApartmentBuilding = (\n nodeId: string | null,\n body: any,\n config?: RequestConfig,\n) => APIClient.delete<void>(`/api/apartmentbuildings/${nodeId}`, body, config).then((res) => res!);\n\nexport const apartmentBuildingGetByExternalId = (\n nodeId: string | null,\n params?: ApartmentBuildingGetByExternalIdQueryParams,\n config?: RequestConfig,\n) =>\n APIClient.get<ApartmentBuildingModel>(`/api/apartmentbuildings/${nodeId}`, params, config).then(\n (res) => res!,\n );\n\nexport const areaProjectGetById = (\n id: string | null,\n params?: AreaProjectGetByIdQueryParams,\n config?: RequestConfig,\n) => APIClient.get<AreaProjectModel>(`/api/areaprojects/${id}`, params, config).then((res) => res!);\n\nexport const areaProjectQuery = (params?: AreaProjectQueryQueryParams, config?: RequestConfig) =>\n APIClient.get<AreaProjectModel[]>(`/api/areaprojects`, params, config).then((res) => res!);\n\nexport const cityGetByName = (\n name: string | null,\n params?: CityGetByNameQueryParams,\n config?: RequestConfig,\n) => APIClient.get<CityModel>(`/api/cities/name/${name}`, params, config).then((res) => res!);\n\nexport const cityGetById = (\n id: string | null,\n params?: CityGetByIdQueryParams,\n config?: RequestConfig,\n) => APIClient.get<CityModel>(`/api/cities/${id}`, params, config).then((res) => res!);\n\nexport const cityQuery = (params?: CityQueryQueryParams, config?: RequestConfig) =>\n APIClient.get<CityModel[]>(`/api/cities`, params, config).then((res) => res!);\n\nexport const communityRedirectAsset = (\n objectType: string | null,\n id: string | null,\n params?: any,\n config?: RequestConfig,\n) =>\n APIClient.get<void>(`/api/community/asset/${objectType}/${id}`, params, config).then(\n (res) => res!,\n );\n\nexport const constructionNumberGetById = (\n id: string | null,\n params?: ConstructionNumberGetByIdQueryParams,\n config?: RequestConfig,\n) =>\n APIClient.get<ConstructionNumberModel>(`/api/constructionnumbers/${id}`, params, config).then(\n (res) => res!,\n );\n\nexport const constructionNumberQuery = (\n params?: ConstructionNumberQueryQueryParams,\n config?: RequestConfig,\n) =>\n APIClient.get<ConstructionNumberModel[]>(`/api/constructionnumbers`, params, config).then(\n (res) => res!,\n );\n\nexport const countryGetByIsoCode = (\n isoCode: string | null,\n params?: CountryGetByIsoCodeQueryParams,\n config?: RequestConfig,\n) =>\n APIClient.get<CountryModel>(`/api/countries/isoCode/${isoCode}`, params, config).then(\n (res) => res!,\n );\n\nexport const countryGetById = (\n id: string | null,\n params?: CountryGetByIdQueryParams,\n config?: RequestConfig,\n) => APIClient.get<CountryModel>(`/api/countries/${id}`, params, config).then((res) => res!);\n\nexport const countryQuery = (params?: CountryQueryQueryParams, config?: RequestConfig) =>\n APIClient.get<CountryModel[]>(`/api/countries`, params, config).then((res) => res!);\n\nexport const districtGetById = (\n id: string | null,\n params?: DistrictGetByIdQueryParams,\n config?: RequestConfig,\n) => APIClient.get<DistrictModel>(`/api/districts/${id}`, params, config).then((res) => res!);\n\nexport const districtQuery = (params?: DistrictQueryQueryParams, config?: RequestConfig) =>\n APIClient.get<DistrictModel[]>(`/api/districts`, params, config).then((res) => res!);\n\nexport const formLead = (body: LeadFormModel, config?: RequestConfig) =>\n APIClient.post<void>(`/api/forms/lead`, body, config).then((res) => res!);\n\nexport const formCase = (body: CaseFormModel, config?: RequestConfig) =>\n APIClient.post<void>(`/api/forms/case`, body, config).then((res) => res!);\n\nexport const formDynamic = (body: DynamicFormModel, config?: RequestConfig) =>\n APIClient.post<void>(`/api/forms/dynamic`, body, config).then((res) => res!);\n\nexport const fundaQuery = (params?: FundaQueryQueryParams, config?: RequestConfig) =>\n APIClient.get<APIProject[]>(`/api/Funda/query`, params, config).then((res) => res!);\n\nexport const fundaGet = (params?: FundaGetQueryParams, config?: RequestConfig) =>\n APIClient.get<void>(`/api/Funda`, params, config).then((res) => res!);\n\nexport const fundaSubmit = (body: any, config?: RequestConfig) =>\n APIClient.post<void>(`/api/Funda/submit`, body, config).then((res) => res!);\n\nexport const fundaValidate = (body: any, config?: RequestConfig) =>\n APIClient.post<void>(`/api/Funda/validate`, body, config).then((res) => res!);\n\nexport const fundaShowLastSubmittedProject = (\n params?: FundaShowLastSubmittedProjectQueryParams,\n config?: RequestConfig,\n) => APIClient.get<void>(`/api/Funda/ShowLastSubmittedProject`, params, config).then((res) => res!);\n\nexport const fundaShowConvertedFundaObject = (\n params?: FundaShowConvertedFundaObjectQueryParams,\n config?: RequestConfig,\n) => APIClient.get<void>(`/api/Funda/ShowConvertedFundaObject`, params, config).then((res) => res!);\n\nexport const fundaCompareFundaObjectRevisionChanges = (\n params?: FundaCompareFundaObjectRevisionChangesQueryParams,\n config?: RequestConfig,\n) =>\n APIClient.get<void>(`/api/Funda/CompareFundaObjectRevisionChanges`, params, config).then(\n (res) => res!,\n );\n\nexport const fundaShowFundaProjectLogs = (\n params?: FundaShowFundaProjectLogsQueryParams,\n config?: RequestConfig,\n) => APIClient.get<void>(`/api/Funda/ShowFundaProjectLogs`, params, config).then((res) => res!);\n\nexport const fundaExecuteFundaPublisher = (params?: any, config?: RequestConfig) =>\n APIClient.get<void>(`/api/Funda/ExecuteFundaPublisher`, params, config).then((res) => res!);\n\nexport const fundaGetAllGwnVersionsByProjectId = (\n params?: FundaGetAllGwnVersionsByProjectIdQueryParams,\n config?: RequestConfig,\n) =>\n APIClient.get<void>(`/api/Funda/GetAllGwnVersionsByProjectId`, params, config).then(\n (res) => res!,\n );\n\nexport const fundaRemoveVersionFromGwn = (\n params?: FundaRemoveVersionFromGwnQueryParams,\n config?: RequestConfig,\n) => APIClient.get<void>(`/api/Funda/RemoveVersionFromGwn`, params, config).then((res) => res!);\n\nexport const fundaGetActiveBrokersInGateway = (params?: any, config?: RequestConfig) =>\n APIClient.get<void>(`/api/Funda/GetActiveBrokersInGateway`, params, config).then((res) => res!);\n\nexport const geoFeatureUpsertGeoFeature = (\n areaId: string | null,\n objectId: string | null,\n body: SerializedFeature,\n config?: RequestConfig,\n) => APIClient.put<void>(`/api/geofeature/${areaId}/${objectId}`, body, config).then((res) => res!);\n\nexport const geoFeatureUpsertAreaFeatures = (\n areaId: string | null,\n body: SerializedFeatures,\n config?: RequestConfig,\n) => APIClient.put<void>(`/api/geofeature/${areaId}`, body, config).then((res) => res!);\n\nexport const geoFeatureDeleteGeoFeature = (\n areaId: string | null,\n objectId: string | null,\n featureId: string | null,\n body: any,\n config?: RequestConfig,\n) =>\n APIClient.delete<void>(`/api/geofeature/${areaId}/${objectId}/${featureId}`, body, config).then(\n (res) => res!,\n );\n\nexport const grantGetById = (\n id: string | null,\n params?: GrantGetByIdQueryParams,\n config?: RequestConfig,\n) => APIClient.get<GrantModel>(`/api/grants/${id}`, params, config).then((res) => res!);\n\nexport const grantQuery = (params?: GrantQueryQueryParams, config?: RequestConfig) =>\n APIClient.get<GrantModel[]>(`/api/grants`, params, config).then((res) => res!);\n\nexport const projectPhaseGetById = (\n id: string | null,\n params?: ProjectPhaseGetByIdQueryParams,\n config?: RequestConfig,\n) =>\n APIClient.get<ProjectPhaseModel>(`/api/projectphases/${id}`, params, config).then(\n (res) => res!,\n );\n\nexport const projectPhaseQuery = (params?: ProjectPhaseQueryQueryParams, config?: RequestConfig) =>\n APIClient.get<ProjectPhaseModel[]>(`/api/projectphases`, params, config).then((res) => res!);\n\nexport const propertyTypeGetById = (\n id: string | null,\n params?: PropertyTypeGetByIdQueryParams,\n config?: RequestConfig,\n) =>\n APIClient.get<PropertyTypeModel>(`/api/propertytypes/${id}`, params, config).then(\n (res) => res!,\n );\n\nexport const propertyTypeQuery = (params?: PropertyTypeQueryQueryParams, config?: RequestConfig) =>\n APIClient.get<PropertyTypeModel[]>(`/api/propertytypes`, params, config).then((res) => res!);\n\nexport const provinceGetByName = (\n name: string | null,\n params?: ProvinceGetByNameQueryParams,\n config?: RequestConfig,\n) =>\n APIClient.get<ProvinceModel>(`/api/provinces/name/${name}`, params, config).then((res) => res!);\n\nexport const provinceGetById = (\n id: string | null,\n params?: ProvinceGetByIdQueryParams,\n config?: RequestConfig,\n) => APIClient.get<ProvinceModel>(`/api/provinces/${id}`, params, config).then((res) => res!);\n\nexport const provinceQuery = (params?: ProvinceQueryQueryParams, config?: RequestConfig) =>\n APIClient.get<ProvinceModel[]>(`/api/provinces`, params, config).then((res) => res!);\n\nexport const regionGetById = (\n id: string | null,\n params?: RegionGetByIdQueryParams,\n config?: RequestConfig,\n) => APIClient.get<RegionModel>(`/api/region/${id}`, params, config).then((res) => res!);\n\nexport const regionQuery = (params?: RegionQueryQueryParams, config?: RequestConfig) =>\n APIClient.get<RegionModel[]>(`/api/region`, params, config).then((res) => res!);\n\nexport const resourceUpdateResource = (\n mediaId: string | null,\n body: UpdateResourceModel,\n config?: RequestConfig,\n) => APIClient.put<void>(`/api/resources/${mediaId}`, body, config).then((res) => res!);\n\nexport const resourceDeleteResource = (mediaId: string | null, body: any, config?: RequestConfig) =>\n APIClient.delete<void>(`/api/resources/${mediaId}`, body, config).then((res) => res!);\n"]}
File without changes
File without changes
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/generated/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC","sourcesContent":["export * from './bpd-client';\n"]}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"country-bounding-box.js","sourceRoot":"","sources":["../../src/geometry/country-bounding-box.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAEhD,MAAM,YAAY,GAEd;IACA,EAAE,EAAE,CAAC,gBAAgB,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,gBAAgB,CAAC;IAC5E,EAAE,EAAE,CAAC,aAAa,EAAE,aAAa,EAAE,aAAa,EAAE,YAAY,CAAC;CAClE,CAAC;AAOF,MAAM,qBAAqB,GAAG,CAAC,eAAgC,EAAe,EAAE;IAC5E,MAAM,aAAa,GAAG,eAAe,aAAf,eAAe,uBAAf,eAAe,CAC/B,GAAG,CAAC,CAAC,cAAc,EAAE,EAAE,CAAC,YAAY,CAAC,cAAc,CAAC,EACrD,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;IAE9B,MAAM,iBAAiB,GAAG,kBAAkB,CAAC,aAAa,CAAC,CAAC;IAE5D,OAAO,iBAAiB,CAAC;AAC7B,CAAC,CAAC;AAEF,OAAO,EAAE,YAAY,EAAE,qBAAqB,EAAE,CAAC","sourcesContent":["import { BoundingBox } from '@bpd-library/types';\n\nimport { mergeBoundingBoxes } from './geometry';\n\nconst COUNTRY_BBOX: {\n [key: string]: BoundingBox;\n} = {\n nl: [3.33390071158434, 50.7503661060614, 7.22749998189678, 53.6436329908026],\n de: [5.98865807458, 47.3024876979, 15.0169958839, 54.983104153],\n};\n\n/**\n * @description Returns a merged bounding box for an array of countries\n * @param {(('de' | 'nl')[])} countryIsoCodes\n * @return {*} BoundingBox\n */\nconst getCountryBoundingBox = (countryIsoCodes: ('de' | 'nl')[]): BoundingBox => {\n const boundingBoxes = countryIsoCodes\n ?.map((countryIsoCode) => COUNTRY_BBOX[countryIsoCode])\n .filter((bbox) => !!bbox);\n\n const mergedBoundingBox = mergeBoundingBoxes(boundingBoxes);\n\n return mergedBoundingBox;\n};\n\nexport { COUNTRY_BBOX, getCountryBoundingBox };\n"]}
@@ -1,11 +1,11 @@
1
- import { BoundingBox, Coordinates, MapData } from '@bpd-library/types';
1
+ import { BoundingBox, Coordinate, Coordinates, MapData } from '@bpd-library/types';
2
2
  declare const calculateBoundingBox: (coordinates: Coordinates) => [number, number, number, number];
3
3
  declare const calculateMapDataBoundingBox: (mapData: MapData) => BoundingBox;
4
- declare const calculateMapDataCenter: (mapData: MapData) => [number, number];
4
+ declare const calculateMapDataCenter: (mapData: MapData) => Coordinate;
5
5
  declare const calculateBoundingBoxCenter: ([minX, minY, maxX, maxY]: [number, number, number, number]) => [number, number];
6
- declare const calculateCenter: (coordinates: Coordinates) => [number, number];
6
+ declare const calculateCenter: (coordinates: Coordinates) => Coordinate;
7
7
  declare const mergeBoundingBoxes: (boundingBoxes: BoundingBox[]) => BoundingBox;
8
8
  declare const expandBoundingBox: ([minX, minY, maxX, maxY]: BoundingBox, km: number) => BoundingBox;
9
9
  declare const withinBoundingBox: (coordinates: Coordinates, boundingBox: BoundingBox, kmPadding?: number) => boolean;
10
- declare const calculateDistance: (pointA: [number, number], pointB: [number, number]) => number;
10
+ declare const calculateDistance: (pointA: Coordinate, pointB: Coordinate) => number;
11
11
  export { calculateBoundingBox, calculateBoundingBoxCenter, calculateCenter, calculateDistance, calculateMapDataBoundingBox, calculateMapDataCenter, withinBoundingBox, expandBoundingBox, mergeBoundingBoxes, };
File without changes
@@ -0,0 +1 @@
1
+ {"version":3,"file":"geometry.js","sourceRoot":"","sources":["../../src/geometry/geometry.ts"],"names":[],"mappings":"AAEA,MAAM,aAAa,GAAG,MAAM,CAAC;AAE7B,MAAM,oBAAoB,GAAG,CAAC,WAAwB,EAAoC,EAAE;IACxF,IAAI,IAAwB,EACxB,IAAwB,EACxB,IAAwB,EACxB,IAAwB,CAAC;IAE7B,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE;QACnC,IAAI,GAAG,CAAC,IAAI,IAAI,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;QACpC,IAAI,GAAG,CAAC,IAAI,IAAI,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;QACpC,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AAO,EACH,oBAAoB,EACpB,0BAA0B,EAC1B,eAAe,EACf,iBAAiB,EACjB,2BAA2B,EAC3B,sBAAsB,EACtB,iBAAiB,EACjB,iBAAiB,EACjB,kBAAkB,GACrB,CAAC","sourcesContent":["import { BoundingBox, Coordinate, Coordinates, MapData } from '@bpd-library/types';\n\nconst DEGREE_PER_KM = 0.0089;\n\nconst calculateBoundingBox = (coordinates: Coordinates): [number, number, number, number] => {\n let minX: number | undefined,\n minY: number | undefined,\n maxX: number | undefined,\n maxY: number | undefined;\n\n coordinates.flat(1).forEach(([x, y]) => {\n minX = !minX || x < minX ? x : minX;\n minY = !minY || y < minY ? y : minY;\n maxX = !maxX || x > maxX ? x : maxX;\n maxY = !maxY || y > maxY ? y : maxY;\n });\n\n return [minX || 0, minY || 0, maxX || 0, maxY || 0];\n};\n\nconst concatMapDataCoordinates = (mapData: MapData): Coordinates =>\n mapData.reduce<Coordinates>((coordinates, item) => coordinates.concat(item.coordinates), []);\n\nconst calculateMapDataBoundingBox = (mapData: MapData): BoundingBox => {\n const coordinates = concatMapDataCoordinates(mapData);\n\n return calculateBoundingBox(coordinates);\n};\n\nconst calculateMapDataCenter = (mapData: MapData): Coordinate => {\n const coordinates = concatMapDataCoordinates(mapData);\n\n return calculateCenter(coordinates);\n};\n\nconst calculateBoundingBoxCenter = ([minX, minY, maxX, maxY]: [number, number, number, number]): [\n number,\n number,\n] => {\n return [(minX + maxX) / 2, (minY + maxY) / 2];\n};\n\nconst calculateCenter = (coordinates: Coordinates): Coordinate => {\n return calculateBoundingBoxCenter(calculateBoundingBox(coordinates));\n};\n\nconst mergeBoundingBoxes = (boundingBoxes: BoundingBox[]) => {\n const mergedBoundingBox = boundingBoxes.reduce<BoundingBox>((merged, boundingBox) => {\n merged[0] = merged[0] < boundingBox[0] ? merged[0] : boundingBox[0];\n merged[1] = merged[1] < boundingBox[1] ? merged[1] : boundingBox[1];\n merged[2] = merged[2] > boundingBox[2] ? merged[2] : boundingBox[2];\n merged[3] = merged[3] > boundingBox[3] ? merged[3] : boundingBox[3];\n\n return merged;\n }, boundingBoxes[0]);\n\n return mergedBoundingBox;\n};\n\nconst expandBoundingBox = ([minX, minY, maxX, maxY]: BoundingBox, km: number): BoundingBox => {\n const degreePadding = DEGREE_PER_KM * km;\n\n minX -= degreePadding;\n minY -= degreePadding;\n maxX += degreePadding;\n maxY += degreePadding;\n\n return [minX, minY, maxX, maxY];\n};\n\nconst withinBoundingBox = (\n coordinates: Coordinates,\n boundingBox: BoundingBox,\n kmPadding: number = 0,\n): boolean => {\n if (kmPadding) {\n boundingBox = expandBoundingBox(boundingBox, kmPadding);\n }\n\n const flatCoordinates = coordinates.flat(1);\n const [minX, minY, maxX, maxY] = boundingBox;\n\n for (let i = 0; i < flatCoordinates.length; i++) {\n const [x, y] = flatCoordinates[i];\n\n if (x < maxX && x > minX && y < maxY && y > minY) return true;\n }\n\n return false;\n};\n\nconst calculateDistance = (pointA: Coordinate, pointB: Coordinate): number => {\n const distanceX = (pointA[0] - pointB[0]) ** 2;\n const distanceY = (pointA[1] - pointB[1]) ** 2;\n\n return Math.sqrt(distanceX + distanceY);\n};\n\nexport {\n calculateBoundingBox,\n calculateBoundingBoxCenter,\n calculateCenter,\n calculateDistance,\n calculateMapDataBoundingBox,\n calculateMapDataCenter,\n withinBoundingBox,\n expandBoundingBox,\n mergeBoundingBoxes,\n};\n"]}
@@ -1,8 +1,8 @@
1
- import { BoundingBox, Coordinates } from '@bpd-library/types';
1
+ import { BoundingBox, Coordinate, Coordinates } from '@bpd-library/types';
2
2
  import { PolygonModel } from '../generated';
3
3
  export declare const TEST_GEOMETRY: {
4
4
  coordinates: Coordinates;
5
5
  boundingBox: BoundingBox;
6
- center: [number, number];
6
+ center: Coordinate;
7
7
  apiGeometry: PolygonModel[];
8
8
  };
File without changes
@@ -0,0 +1 @@
1
+ {"version":3,"file":"geometry.test.js","sourceRoot":"","sources":["../../src/geometry/geometry.test.ts"],"names":[],"mappings":"AAGA,OAAO,EACH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E,CAAC,CAAC,CAAC;QAEpC,MAAM,CAAC,iBAAiB,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,kBAAkB,CAAC,CAAC;IAC9E,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,mCAAmC,EAAE;QACpC,MAAM,CAAC,sBAAsB,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC;IAC/D,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC","sourcesContent":["import { BoundingBox, Coordinate, Coordinates, MapData } from '@bpd-library/types';\n\nimport { PolygonModel } from '../generated';\nimport {\n calculateBoundingBox,\n calculateBoundingBoxCenter,\n calculateCenter,\n calculateDistance,\n calculateMapDataCenter,\n expandBoundingBox,\n withinBoundingBox,\n} from './geometry';\n\nexport const TEST_GEOMETRY: {\n coordinates: Coordinates;\n boundingBox: BoundingBox;\n center: Coordinate;\n apiGeometry: PolygonModel[];\n} = {\n coordinates: [\n [\n [1, 2],\n [3, 4],\n [1.5, 2.5],\n ],\n [\n [1, 2],\n [3, 4],\n [1.5, 2.5],\n ],\n ],\n boundingBox: [1, 2, 3, 4],\n center: [2, 3],\n apiGeometry: [\n {\n coordinates: [\n [1, 2],\n [3, 4],\n [1.5, 2.5],\n ],\n },\n {\n coordinates: [\n [1, 2],\n [3, 4],\n [1.5, 2.5],\n ],\n },\n ],\n};\n\nconst MAP_DATA: MapData = [\n {\n id: '1',\n coordinates: TEST_GEOMETRY.coordinates,\n variant: 'default',\n },\n {\n id: '2',\n coordinates: [\n [\n [5, 6],\n [5, 1],\n ],\n [\n [1, 2],\n [8, 9],\n ],\n ],\n variant: 'default',\n },\n];\n\ndescribe('Geometry', function () {\n it('Calculates the correct coordinates boundingBox', function () {\n expect(calculateBoundingBox(TEST_GEOMETRY.coordinates)).toEqual(TEST_GEOMETRY.boundingBox);\n });\n\n it('Calculates the correct bounding box center', function () {\n expect(calculateBoundingBoxCenter(calculateBoundingBox(TEST_GEOMETRY.coordinates))).toEqual(\n TEST_GEOMETRY.center,\n );\n });\n\n it('Calculates the correct coordinate center', function () {\n expect(calculateCenter(TEST_GEOMETRY.coordinates)).toEqual(TEST_GEOMETRY.center);\n });\n\n it('Expands bounding box with 1 km', function () {\n const DEGREE_PER_KM = 0.0089;\n const expandedBoundingBox = [\n 1 - DEGREE_PER_KM,\n 2 - DEGREE_PER_KM,\n 3 + DEGREE_PER_KM,\n 4 + DEGREE_PER_KM,\n ];\n\n expect(expandBoundingBox(TEST_GEOMETRY.boundingBox, 1)).toEqual(expandedBoundingBox);\n });\n\n it('Boundingbox is within boundingbox', function () {\n expect(withinBoundingBox(TEST_GEOMETRY.coordinates, [0.9, 1.9, 3.1, 4.1])).toBe(true);\n });\n\n it('Calculates the correct distance between vectors', function () {\n const VECTOR_A: Coordinate = [1, 1];\n const VECTOR_B: Coordinate = [2, 2];\n\n expect(calculateDistance(VECTOR_A, VECTOR_B)).toEqual(1.4142135623730951);\n });\n\n it('Calculates correct mapData center', function () {\n expect(calculateMapDataCenter(MAP_DATA)).toEqual([4.5, 5]);\n });\n});\n"]}
File without changes
File without changes
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/geometry/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,wBAAwB,CAAC","sourcesContent":["export * from './geometry';\nexport * from './country-bounding-box';\n"]}
@@ -1,5 +1,4 @@
1
1
  export * from './use-scroll-position';
2
- export * from './use-stylesheet';
3
2
  export * from './use-click-outside';
4
3
  export * from './use-history';
5
4
  export * from './use-scroll-to';
@@ -1,5 +1,4 @@
1
1
  export * from './use-scroll-position';
2
- export * from './use-stylesheet';
3
2
  export * from './use-click-outside';
4
3
  export * from './use-history';
5
4
  export * from './use-scroll-to';
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,YAAY,CAAC;AAC3B,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC","sourcesContent":["export * from './use-scroll-position';\nexport * from './use-click-outside';\nexport * from './use-history';\nexport * from './use-scroll-to';\nexport * from './use-url-params';\nexport * from './use-map-storage';\nexport * from './use-lazy';\nexport * from './use-keyboard-focus';\nexport * from './use-form-changes';\n"]}
File without changes
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-click-outside.js","sourceRoot":"","sources":["../../src/hooks/use-click-outside.ts"],"names":[],"mappings":"AAMA,MAAM,cAAc,GAAY;IAC5B,cAAc,EAAE,KAAK;CACxB,CAAC;AAEF,MAAM,UAAU,GAAG,CAAC,MAAW,EAAW,EAAE,CAAC,QAAQ,CAAC,SAAS,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;AACtF,MAAM,aAAa,GAAG,CAAC,MAAW,EAAW,EAAE,CAAC,WAAW,CAAC,SAAS,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;AAC5F,MAAM,gBAAgB,GAAG,CAAC,MAAW,EAAW,EAAE,CAAC,cAAc,CAAC,SAAS,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;AAElG,MAAM,UAAU,eAAe,CAC3B,QAAkB,EAClB,QAAkB,EAClB,OAAiB;IAEjB,MAAM,UAAU,mCAAQ,cAAc,GAAK,OAAO,CAAE,CAAC;IAErD,MAAM,QAAQ,GAAG,CAAC,KAAY,EAAE,EAAE;QAC9B,IAAI,UAAU,CAAC,QAAQ,CAAC,IAAI,gBAAgB,CAAC,QAAQ,CAAC,EAAE;YACpD,IACI,KAAK,CAAC,IAAI,CAAC,QAAqC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,CAC/D,SAAS,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAc,CAAC,CAC3C,EACH;gBACE,OAAO,QAAQ,CAAC,KAAK,CAAC,CAAC;aAC1B;SACJ;aAAM,IAAI,aAAa,CAAC,QAAQ,CAAC,EAAE;YAChC,IAAK,QAAwB,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAc,CAAC,EAAE;gBAC1D,OAAO,QAAQ,CAAC,KAAK,CAAC,CAAC;aAC1B;SACJ;aAAM;YACH,OAAO,CAAC,IAAI,CAAC,mBAAmB,EAAE,QAAQ,CAAC,CAAC;YAC5C,OAAO,QAAQ,CAAC,IAAI,CAAC,CAAC;SACzB;QAED,IAAI,UAAU,CAAC,cAAc,EAAE;YAC3B,QAAQ,CAAC,mBAAmB,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;SACnD;QAED,OAAO,QAAQ,CAAC,IAAI,CAAC,CAAC;IAC1B,CAAC,CAAC;IAEF,QAAQ,CAAC,gBAAgB,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;IAE7C,OAAO,QAAQ,CAAC;AACpB,CAAC","sourcesContent":["export type Selector = HTMLElement | HTMLCollection | NodeList | HTMLInputElement;\nexport type Options = {\n removeListener: boolean;\n};\nexport type Callback = (state: boolean | null) => void;\n\nconst defaultOptions: Options = {\n removeListener: false,\n};\n\nconst isNodeList = (target: any): boolean => NodeList.prototype.isPrototypeOf(target);\nconst isHTMLElement = (target: any): boolean => HTMLElement.prototype.isPrototypeOf(target);\nconst isHTMLCollection = (target: any): boolean => HTMLCollection.prototype.isPrototypeOf(target);\n\nexport function useClickOutside(\n selector: Selector,\n callback: Callback,\n options?: Options,\n): EventListener {\n const theOptions = { ...defaultOptions, ...options };\n\n const listener = (event: Event) => {\n if (isNodeList(selector) || isHTMLCollection(selector)) {\n if (\n Array.from(selector as HTMLCollection | NodeList).some(selection =>\n selection.contains(event.target as Node),\n )\n ) {\n return callback(false);\n }\n } else if (isHTMLElement(selector)) {\n if ((selector as HTMLElement).contains(event.target as Node)) {\n return callback(false);\n }\n } else {\n console.warn('Undefined type of', selector);\n return callback(null);\n }\n\n if (theOptions.removeListener) {\n document.removeEventListener('click', listener);\n }\n\n return callback(true);\n };\n\n document.addEventListener('click', listener);\n\n return listener;\n}\n"]}
File without changes
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-delegate-listen.js","sourceRoot":"","sources":["../../src/hooks/use-delegate-listen.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAKzC,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAC7B,QAAgB,EAChB,IAAY,EACZ,QAA4B,EAC5B,UAA2B,EAAE,EAC/B,EAAE;IACA,QAAQ,CAAC;QACL,MAAM,EAAE,OAAO,CAAC,MAAM,IAAI,QAAQ;QAClC,QAAQ;QACR,IAAI;QACJ,QAAQ;KACX,CAAC,CAAC;AACP,CAAC,CAAC","sourcesContent":["import { delegate } from '@atomify/core';\ninterface DelegateOptions {\n target?: EventTarget;\n useCapture?: boolean;\n}\nexport const useDelegateListen = (\n selector: string,\n type: string,\n callback: (e: Event) => void,\n options: DelegateOptions = {},\n) => {\n delegate({\n target: options.target || document,\n selector,\n type,\n callback,\n });\n};\n"]}
File without changes
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-form-changes.js","sourceRoot":"","sources":["../../src/hooks/use-form-changes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAY3C,IAAI,aAAa,GAAe,EAAE,CAAC;AAEnC,SAAS,gBAAgB,CAAC,IAAyC;IAC/D,aAAa,GAAG,EAAE,CAAC;IACnB,IAAI,IAAI,CAAC,OAAO,EAAE;QACd,MAAM,OAAO,GAAG,IAAI,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,CAAC;QACrD,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,OAAO,EAAE;YAChC,aAAa,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC,CAAC;SACtC;KACJ;AACL,CAAC;AAED,MAAM,UAAU,cAAc,CAC1B,IAAyC,EACzC,QAAgE;IAEhE,SAAS,CAAC,IAAI,EAAE,QAAQ,EAAE,GAAG,EAAE;QAC3B,IAAI,IAAI,CAAC,OAAO,EAAE;YACd,MAAM,OAAO,GAAG,IAAI,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,CAAC;YACrD,MAAM,YAAY,GAAe,EAAE,CAAC;YAEpC,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,OAAO,EAAE;gBAChC,YAAY,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC,CAAC;aACrC;YAED,MAAM,SAAS,GAAG,YAAY,CAAC,MAAM,CACjC,CAAC,KAAK,EAAE,EAAE,CACN,CAAC,aAAa,CAAC,IAAI,CACf,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,GAAG,KAAK,KAAK,CAAC,GAAG,IAAI,KAAK,CAAC,KAAK,KAAK,KAAK,CAAC,KAAK,CACpE,CACR,CAAC;YAEF,MAAM,SAAS,GAAG,aAAa,CAAC,MAAM,CAClC,CAAC,KAAK,EAAE,EAAE,CACN,CAAC,YAAY,CAAC,IAAI,CACd,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,GAAG,KAAK,KAAK,CAAC,GAAG,IAAI,KAAK,CAAC,KAAK,KAAK,KAAK,CAAC,KAAK,CACpE,CACR,CAAC;YAEF,gBAAgB,CAAC,IAAI,CAAC,CAAC;YAEvB,QAAQ,CAAC,EAAE,SAAS,EAAE,SAAS,EAAE,CAAC,CAAC;SACtC;IACL,CAAC,CAAC,CAAC;AACP,CAAC","sourcesContent":["import { useListen } from '@atomify/hooks';\n\ntype FormItem = {\n key: string;\n value: FormDataEntryValue;\n};\n\ntype FormChangeCallback = {\n additions: FormItem[];\n deletions: FormItem[];\n};\n\nlet previousState: FormItem[] = [];\n\nfunction setPreviousState(form: { current: HTMLFormElement | null }) {\n previousState = [];\n if (form.current) {\n const entries = new FormData(form.current).entries();\n for (const [key, value] of entries) {\n previousState.push({ key, value });\n }\n }\n}\n\nexport function useFormChanges(\n form: { current: HTMLFormElement | null },\n callback: ({ additions, deletions }: FormChangeCallback) => void,\n) {\n useListen(form, 'change', () => {\n if (form.current) {\n const entries = new FormData(form.current).entries();\n const currentState: FormItem[] = [];\n\n for (const [key, value] of entries) {\n currentState.push({ key, value });\n }\n\n const additions = currentState.filter(\n (itemA) =>\n !previousState.find(\n (itemB) => itemB.key === itemA.key && itemB.value === itemA.value,\n ),\n );\n\n const deletions = previousState.filter(\n (itemA) =>\n !currentState.find(\n (itemB) => itemB.key === itemA.key && itemB.value === itemA.value,\n ),\n );\n\n setPreviousState(form);\n\n callback({ additions, deletions });\n }\n });\n}\n"]}
File without changes
File without changes
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-history.js","sourceRoot":"","sources":["../../src/hooks/use-history.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,EAAE;IAC3B,SAAS,WAAW,CAAC,GAAW;QAC5B,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,EAAE,QAAQ,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IACtD,CAAC;IAED,SAAS,cAAc,CAAC,GAAW;QAC/B,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE,EAAE,QAAQ,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IACzD,CAAC;IAED,OAAO;QACH,IAAI,EAAE,WAAW;QACjB,OAAO,EAAE,cAAc;KAC1B,CAAC;AACN,CAAC,CAAC","sourcesContent":["export const useHistory = () => {\n function pushHistory(url: string) {\n window.history.pushState({}, document.title, url);\n }\n\n function replaceHistory(url: string) {\n window.history.replaceState({}, document.title, url);\n }\n\n return {\n push: pushHistory,\n replace: replaceHistory,\n };\n};\n"]}
File without changes
File without changes
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-input.js","sourceRoot":"","sources":["../../src/hooks/use-input.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,WAAW,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAsB7F,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,EACrB,aAAa,EACb,WAAW,EACX,gBAAgB,GAAG,EAAE,EACrB,aAAa,GAAG,GAAG,EAAE,CAAC,IAAI,EAC1B,YAAY,GAAG,GAAG,EAAE,CAAC,IAAI,EACzB,WAAW,GAAG,GAAG,EAAE,CAAC,IAAI,EACxB,YAAY,GAAG,GAAG,EAAE,CAAC,IAAI,EACzB,eAAe,GAAG,GAAG,EAAE,CAAC,IAAI,EAC5B,UAAU,GAAG,GAAG,EAAE,CAAC,IAAI,EACvB,aAAa,GAAG,GAAG,EAAE,CAAC,IAAI,EAC1B,UAAU,GACH,EAAE,EAAE;IACX,MAAM,MAAM,GAAG,WAAW,CAAqB,aAAa,CAAC,CAAC;IAC9D,MAAM,WAAW,GAAG,UAAU,CAAc,WAAW,CAAC,CAAC;IACzD,MAAM,UAAU,GAAG,gBAAgB;QAC/B,CAAC,CAAC,UAAU,CAAmB,gBAAgB,CAAC;QAChD,CAAC,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;IAExB,MAAM,gBAAgB,GAAG,QAAQ,CAAM,EAAE,SAAS,EAAE,kBAAkB,EAAE,CAAC,CAAC;IAC1E,MAAM,aAAa,GAAG,QAAQ,CAK3B;QACC,SAAS,EAAE,gBAAgB;KAC9B,CAAC,CAAC;IAEH,SAAS,CAAC,MAAM,EAAE,QAAQ,EAAE,aAAa,CAAC,CAAC;IAC3C,SAAS,CAAC,MAAM,EAAE,OAAO,EAAE,YAAY,CAAC,CAAC;IACzC,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,WAAW,CAAC,CAAC;IACvC,SAAS,CAAC,MAAM,EAAE,OAAO,EAAE,YAAY,CAAC,CAAC;IACzC,SAAS,CAAC,MAAM,EAAE,UAAU,EAAE,eAAe,CAAC,CAAC;IAE/C,aAAa,CAAC,YAAY,EAAE,UAAU,CAAC,CAAC;IAKxC,aAAa,CAAC,aAAa,EAAE,aAAa,CAAC,CAAC;IAM5C,aAAa,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;IAEtC,OAAO;QACH,MAAM;QACN,WAAW;QACX,UAAU;QACV,gBAAgB;QAChB,aAAa;KAChB,CAAC;AACN,CAAC,CAAC","sourcesContent":["import { useBindMethod, useElement, useElements, useEvent, useListen } from '@atomify/hooks';\n\ninterface UseInput {\n inputElements: string;\n errorTarget: string;\n inputLabelTarget?: string;\n onRebindValue?: (value: any) => void;\n onValidate: () => void;\n onInputChange?: (e?: any) => void;\n onInputFocus?: (e?: any) => void;\n onInputBlur?: (e?: any) => void;\n onInputInput?: (e?: any) => void;\n onInputFocusout?: (e?: any) => void;\n resetInput?: () => void;\n}\n\nexport interface UseInputElement {\n rebindValue: (value: any) => void;\n validate: () => boolean;\n resetInput?: () => void;\n}\n\nexport const useInput = ({\n inputElements,\n errorTarget,\n inputLabelTarget = '',\n onInputChange = () => null,\n onInputFocus = () => null,\n onInputBlur = () => null,\n onInputInput = () => null,\n onInputFocusout = () => null,\n resetInput = () => null,\n onRebindValue = () => null,\n onValidate,\n}: UseInput) => {\n const inputs = useElements<HTMLInputElement[]>(inputElements);\n const errorHolder = useElement<HTMLElement>(errorTarget);\n const inputLabel = inputLabelTarget\n ? useElement<HTMLLabelElement>(inputLabelTarget)\n : { current: null };\n\n const bindValueChanged = useEvent<any>({ eventName: 'bindValueChanged' });\n const inputValidate = useEvent<{\n errorMessage: string;\n value: any;\n isValid: boolean;\n input: HTMLInputElement;\n }>({\n eventName: 'input-validate',\n });\n\n useListen(inputs, 'change', onInputChange);\n useListen(inputs, 'focus', onInputFocus);\n useListen(inputs, 'blur', onInputBlur);\n useListen(inputs, 'input', onInputInput);\n useListen(inputs, 'focusout', onInputFocusout);\n\n useBindMethod('resetInput', resetInput);\n\n /**\n * Adds a rebindValue function to the input component\n */\n useBindMethod('rebindValue', onRebindValue);\n\n /**\n * Adds a validate function to the input component\n * It validates the component based upon validation types and the value.\n */\n useBindMethod('validate', onValidate);\n\n return {\n inputs,\n errorHolder,\n inputLabel,\n bindValueChanged,\n inputValidate,\n };\n};\n"]}
File without changes
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-keyboard-focus.js","sourceRoot":"","sources":["../../src/hooks/use-keyboard-focus.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAM7D,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,EAC7B,oBAAoB,GAAG,KAAK,EAC5B,SAAS,GAAG,gBAAgB,GACX,EAAE,EAAE;IACrB,MAAM,aAAa,GAAG,MAAM,CAAC,oBAAoB,CAAC,CAAC;IAEnD,SAAS,CAAC,EAAE,OAAO,EAAE,QAAQ,CAAC,IAAI,EAAE,EAAE,WAAW,EAAE,GAAG,EAAE,CAAC,CAAC,aAAa,CAAC,OAAO,GAAG,KAAK,CAAC,CAAC,CAAC;IAC1F,SAAS,CAAC,EAAE,OAAO,EAAE,QAAQ,CAAC,IAAI,EAAE,EAAE,SAAS,EAAE,GAAG,EAAE,CAAC,CAAC,aAAa,CAAC,OAAO,GAAG,IAAI,CAAC,CAAC,CAAC;IAEvF,QAAQ,CAAC,GAAG,EAAE;QACV,MAAM,MAAM,GAAG,aAAa,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC;QACxD,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,CAAC;IAC/C,CAAC,CAAC,CAAC;AACP,CAAC,CAAC","sourcesContent":["import { useListen, useRef, useWatch } from '@atomify/hooks';\ninterface UsingKeyBoardProps {\n defaultUsingKeyboard?: boolean;\n className?: string;\n}\n\nexport const useUsingKeyboard = ({\n defaultUsingKeyboard = false,\n className = 'using-keyboard',\n}: UsingKeyBoardProps) => {\n const usingKeyboard = useRef(defaultUsingKeyboard);\n\n useListen({ current: document.body }, 'mousedown', () => (usingKeyboard.current = false));\n useListen({ current: document.body }, 'keydown', () => (usingKeyboard.current = true));\n\n useWatch(() => {\n const action = usingKeyboard.current ? 'add' : 'remove';\n document.body.classList[action](className);\n });\n};\n"]}
File without changes
File without changes
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-lazy.js","sourceRoot":"","sources":["../../src/hooks/use-lazy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAmBpD,MAAM,CAAC,MAAM,UAAU,GAAG;IACtB,iBAAiB,EAAE,mBAAmB;IACtC,eAAe,EAAE,iBAAiB;IAClC,iBAAiB,EAAE,mBAAmB;CACzC,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAG;IACvB,KAAK,EAAE,OAAO;IACd,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,SAAS;CACrB,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG,CAAU,EAC7B,OAAO,EACP,aAAa,EACb,WAAW,EACX,aAAa,GACC,EAAiB,EAAE;IACjC,MAAM,UAAU,GAAG,MAAM,CAAmB,aAAa,CAAC,CAAC;IAC3D,MAAM,iBAAiB,GAAG,UAAU,CAAc,IAAI,UAAU,CAAC,iBAAiB,GAAG,CAAC,CAAC;IACvF,MAAM,eAAe,GAAG,UAAU,CAAc,GAAG,CAAC,UAAU,CAAC,eAAe,CAAC,EAAE,CAAC,CAAC;IACnF,MAAM,iBAAiB,GAAG,UAAU,CAAc,GAAG,CAAC,UAAU,CAAC,iBAAiB,CAAC,EAAE,CAAC,CAAC;IACvF,MAAM,QAAQ,GAAG,MAAM,CAAW,IAAI,CAAC,CAAC;IACxC,MAAM,KAAK,GAAG,MAAM,CAAS,WAAW,CAAC,OAAO,CAAC,CAAC;IAElD,KAAK,UAAU,WAAW;QACtB,MAAM,WAAW,GACb,iBAAiB,CAAC,OAAO;YACzB,iBAAiB,CAAC,OAAO;YACzB,eAAe,CAAC,OAAO;YACvB,KAAK,CAAC;QAEV,IAAI,KAAK,CAAC,OAAO,KAAK,WAAW,CAAC,OAAO,EAAE;YACvC,KAAK,CAAC,OAAO,GAAG,WAAW,CAAC,OAAO,CAAC;SACvC;QAED,IAAI;YACA,MAAM,IAAI,GAAG,MAAM,OAAO,EAAE,CAAC;YAE7B,QAAQ,CAAC,OAAO,GAAG,IAAI,CAAC;YAExB,IAAI,WAAW,IAAI,WAAW,CAAC,UAAU,EAAE;gBACvC,WAAW,CAAC,UAAU,CAAC,YAAY,CAAC,aAAa,CAAC,IAAI,CAAC,EAAE,WAAW,CAAC,CAAC;aACzE;YAED,KAAK,CAAC,OAAO,GAAG,WAAW,CAAC,OAAO,CAAC;SACvC;QAAC,OAAO,KAAK,EAAE;YACZ,IAAI,WAAW,IAAI,WAAW,CAAC,UAAU,EAAE;gBACvC,WAAW,CAAC,UAAU,CAAC,YAAY,CAAC,WAAW,EAAE,EAAE,WAAW,CAAC,CAAC;aACnE;YAED,KAAK,CAAC,OAAO,GAAG,WAAW,CAAC,KAAK,CAAC;SACrC;IACL,CAAC;IAED,OAAO,CAAC,UAAU,CAAC,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAC;AAC9D,CAAC,CAAC","sourcesContent":["import { useElement, useRef } from '@atomify/hooks';\nimport { MutableRefObject } from '@atomify/hooks/dist/hooks';\n\ntype LazyResult = HTMLElement;\n\ninterface UseLazyProps<T> {\n fetcher: () => Promise<T>;\n loadingResult: () => LazyResult;\n errorResult: () => LazyResult;\n successResult: (data?: T) => LazyResult;\n}\n\ntype LazyReturn<T> = [\n () => LazyResult,\n () => Promise<void>,\n MutableRefObject<T | null>,\n MutableRefObject<string>,\n];\n\nexport const LAZY_HOOKS = {\n LAZY_LOADING_HOOK: 'data-lazy-loading',\n LAZY_ERROR_HOOK: 'data-lazy-error',\n LAZY_SUCCESS_HOOK: 'data-lazy-success',\n};\n\nexport const LAZY_STATES = {\n ERROR: 'error',\n LOADING: 'loading',\n SUCCESS: 'success',\n};\n\nexport const useLazy = <T = any>({\n fetcher,\n loadingResult,\n errorResult,\n successResult,\n}: UseLazyProps<T>): LazyReturn<T> => {\n const LazyResult = useRef<() => LazyResult>(loadingResult);\n const lazyLoadingResult = useElement<HTMLElement>(`[${LAZY_HOOKS.LAZY_LOADING_HOOK}]`);\n const lazyErrorResult = useElement<HTMLElement>(`${[LAZY_HOOKS.LAZY_ERROR_HOOK]}`);\n const lazySuccessResult = useElement<HTMLElement>(`${[LAZY_HOOKS.LAZY_SUCCESS_HOOK]}`);\n const response = useRef<T | null>(null);\n const state = useRef<string>(LAZY_STATES.LOADING);\n\n async function initFetcher() {\n const activeChild =\n lazyLoadingResult.current ||\n lazySuccessResult.current ||\n lazyErrorResult.current ||\n false;\n\n if (state.current !== LAZY_STATES.LOADING) {\n state.current = LAZY_STATES.LOADING;\n }\n\n try {\n const data = await fetcher();\n\n response.current = data;\n\n if (activeChild && activeChild.parentNode) {\n activeChild.parentNode.replaceChild(successResult(data), activeChild);\n }\n\n state.current = LAZY_STATES.SUCCESS;\n } catch (error) {\n if (activeChild && activeChild.parentNode) {\n activeChild.parentNode.replaceChild(errorResult(), activeChild);\n }\n\n state.current = LAZY_STATES.ERROR;\n }\n }\n\n return [LazyResult.current, initFetcher, response, state];\n};\n"]}
File without changes
File without changes
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-map-storage.js","sourceRoot":"","sources":["../../src/hooks/use-map-storage.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,aAAa,GAAG,GAAqB,EAAE;IAChD,MAAM,UAAU,GAAG,IAAI,GAAG,EAAQ,CAAC;IAEnC,MAAM,OAAO,GAAG,CAAC,GAAM,EAAE,KAAQ,EAAE,EAAE,CAAC,UAAU,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;IAEjE,MAAM,OAAO,GAAG,CAAC,GAAM,EAAE,EAAE,CAAC,UAAU,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAEhD,MAAM,OAAO,GAAG,CAAC,GAAM,EAAE,EAAE,CAAC,UAAU,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAEhD,MAAM,UAAU,GAAG,CAAC,GAAM,EAAE,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IAEtD,OAAO;QACH,OAAO;QACP,OAAO;QACP,OAAO;QACP,UAAU;KACb,CAAC;AACN,CAAC,CAAC","sourcesContent":["export const useMapStorage = <T = any, V = any>() => {\n const mapStorage = new Map<T, V>();\n\n const setItem = (key: T, value: V) => mapStorage.set(key, value);\n\n const getItem = (key: T) => mapStorage.get(key);\n\n const hasItem = (key: T) => mapStorage.has(key);\n\n const deleteItem = (key: T) => mapStorage.delete(key);\n\n return {\n setItem,\n getItem,\n hasItem,\n deleteItem,\n };\n};\n"]}
File without changes
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-scroll-position.js","sourceRoot":"","sources":["../../src/hooks/use-scroll-position.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAEnD,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAoB9C,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAC7B,QAAqE,EACrE,SAAmB,EACrB,EAAE;IACA,MAAM,QAAQ,GAAG,MAAM,CAAiB,iBAAiB,CAAC,SAAS,CAAC,CAAC,CAAC;IAEtE,SAAS,iBAAiB;QACtB,MAAM,eAAe,GAAG,iBAAiB,CAAC,SAAS,CAAC,CAAC;QACrD,QAAQ,CAAC,EAAE,YAAY,EAAE,QAAQ,CAAC,OAAO,EAAE,eAAe,EAAE,CAAC,CAAC;QAC9D,QAAQ,CAAC,OAAO,GAAG,eAAe,CAAC;IACvC,CAAC;IAED,MAAM,QAAQ,GAAG,WAAW,CAAC,iBAAiB,CAAC,CAAC;IAEhD,SAAS,CAAC,MAAM,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;AAC1C,CAAC,CAAC;AAOF,SAAS,iBAAiB,CAAC,SAA8B;IACrD,MAAM,MAAM,GAAG,QAAQ,CAAC,IAAI,CAAC;IAC7B,MAAM,QAAQ,GAAG,MAAM,CAAC,qBAAqB,EAAE,CAAC;IAEhD,OAAO,SAAS;QACZ,CAAC,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC,OAAO,EAAE,CAAC,EAAE,MAAM,CAAC,OAAO,EAAE;QAC1C,CAAC,CAAC,EAAE,CAAC,EAAE,QAAQ,CAAC,IAAI,EAAE,CAAC,EAAE,QAAQ,CAAC,GAAG,EAAE,CAAC;AAChD,CAAC","sourcesContent":["import { useListen, useRef } from '@atomify/hooks';\n\nimport { rafThrottle } from '../raf-throttle';\n\ntype ScrollPosition = { x: number; y: number };\nexport type ScrollCallback = {\n prevPosition: ScrollPosition;\n currentPosition: ScrollPosition;\n};\n\n/**\n * Hook that returns the browser viewport X and Y scroll position.\n * @param {({\n * currentPosition,\n * prevPosition,\n * }: {\n * prevPosition: ScrollPosition;\n * currentPosition: ScrollPosition;\n * }) => void} callback\n * @param {boolean} [useWindow]\n * @param {number} [wait]\n */\nexport const useScrollPosition = (\n callback: ({ currentPosition, prevPosition }: ScrollCallback) => void,\n useWindow?: boolean,\n) => {\n const position = useRef<ScrollPosition>(getScrollPosition(useWindow));\n\n function setScrollPosition() {\n const currentPosition = getScrollPosition(useWindow);\n callback({ prevPosition: position.current, currentPosition });\n position.current = currentPosition;\n }\n\n const throttle = rafThrottle(setScrollPosition);\n\n useListen(window, 'scroll', throttle);\n};\n\n/**\n * Returns the current scroll position\n * @param {(boolean | undefined)} useWindow\n * @returns\n */\nfunction getScrollPosition(useWindow: boolean | undefined) {\n const target = document.body;\n const position = target.getBoundingClientRect();\n\n return useWindow\n ? { x: window.scrollX, y: window.scrollY }\n : { x: position.left, y: position.top };\n}\n"]}
File without changes
File without changes
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-scroll-to.js","sourceRoot":"","sources":["../../src/hooks/use-scroll-to.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,GAAG,GAAG,CAAC;AACxB,MAAM,SAAS,GAAG,EAAE,CAAC;AASrB,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,UAAyB,EAAE,EAAE,EAAE;IACvD,SAAS,EAAE,CAAC,MAAmB;QAC3B,MAAM,YAAY,GAAG;YACjB,QAAQ,EAAE,MAAM,CAAC,qBAAqB,EAAE;YACxC,MAAM,EAAE,OAAO,CAAC,MAAM,IAAI,SAAS;YACnC,QAAQ,EAAE,OAAO,CAAC,QAAQ,IAAI,WAAW;YACzC,aAAa,EAAE,OAAO,CAAC,aAAa,IAAI,IAAI;YAC5C,KAAK,EAAE,OAAO,CAAC,KAAK,IAAI,CAAC;SAC5B,CAAC;QAEF,OAAO,QAAQ,CAAC,YAAY,CAAC,CAAC;IAClC,CAAC;IAED,OAAO,EAAE,CAAC;AACd,CAAC,CAAC;AAiBF,SAAS,QAAQ,CAAC,EACd,QAAQ,EACR,MAAM,EACN,QAAQ,EACR,aAAa,EACb,KAAK,GAOR;IACG,OAAO,IAAI,OAAO,CAAC,OAAO,CAAC,EAAE;QACzB,MAAM,cAAc,GAAG,MAAM,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC;QAC1F,MAAM,EAAE,GAAG,QAAQ,CAAC,CAAC,QAAQ,CAAC,GAAG,GAAG,cAAc,GAAG,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;QAC7E,MAAM,K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CAAC,CAAC;SACb;aAAM;YACH,OAAO,EAAE,CAAC;SACb;IACL,CAAC,CAAC,CAAC;AACP,CAAC;AAED,SAAS,aAAa,CAAC,CAAS,EAAE,CAAS,EAAE,CAAS,EAAE,CAAS;IAC7D,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACX,IAAI,CAAC,GAAG,CAAC,EAAE;QACP,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;KAC9B;IACD,CAAC,EAAE,CAAC;IACJ,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;AAC5C,CAAC","sourcesContent":["const ST_DURATION = 500;\nconst ST_OFFSET = 50;\n\ninterface ScrollOptions {\n offset?: number;\n duration?: number;\n scrollElement?: HTMLElement;\n delay?: number;\n}\n\nexport const useScrollTo = (options: ScrollOptions = {}) => {\n function to(target: HTMLElement) {\n const scrollConfig = {\n position: target.getBoundingClientRect(),\n offset: options.offset || ST_OFFSET,\n duration: options.duration || ST_DURATION,\n scrollElement: options.scrollElement || null,\n delay: options.delay || 0,\n };\n\n return scrollTo(scrollConfig);\n }\n\n return to;\n};\n\n/**\n * Scrolls to an element\n * @param {({\n * position: DOMRect;\n * offset: number;\n * duration: number;\n * scrollElement: HTMLElement | null;\n * })} {\n * position,\n * offset,\n * duration,\n * scrollElement,\n * }\n * @returns\n */\nfunction scrollTo({\n position,\n offset,\n duration,\n scrollElement,\n delay,\n}: {\n position: DOMRect;\n offset: number;\n duration: number;\n scrollElement: HTMLElement | null;\n delay: number;\n}) {\n return new Promise(resolve => {\n const scrollPosition = window.scrollY === undefined ? window.pageYOffset : window.scrollY;\n const to = parseInt((position.top + scrollPosition - offset).toFixed(0), 10);\n const start = scrollElement\n ? scrollElement.scrollTop\n : Math.max(document.body.scrollTop, document.documentElement.scrollTop);\n const change = to - start;\n let currentTime = 0;\n const increment = 10;\n const direction = to > start ? 1 : 0;\n\n let timeout: any;\n\n const animate = () => {\n currentTime += increment;\n const val = parseInt(\n easeInOutQuad(currentTime, start, change, duration).toFixed(0),\n 10,\n );\n\n if (scrollElement) {\n scrollElement.scrollTop = val;\n } else {\n document.body.scrollTop = val;\n document.documentElement.scrollTop = val;\n }\n\n if ((val >= to && direction === 1) || (val <= to && direction === 0)) {\n resolve();\n } else {\n requestAnimationFrame(animate);\n }\n };\n\n if (delay > 0) {\n timeout = setTimeout(() => {\n animate();\n clearTimeout(timeout);\n }, delay);\n } else {\n animate();\n }\n });\n}\n\nfunction easeInOutQuad(t: number, b: number, c: number, d: number) {\n t /= d / 2;\n if (t < 1) {\n return (c / 2) * t * t + b;\n }\n t--;\n return (-c / 2) * (t * (t - 2) - 1) + b;\n}\n"]}
@@ -0,0 +1,15 @@
1
+ declare global {
2
+ interface Window {
3
+ ShadyCSS: any;
4
+ }
5
+ interface ShadowRoot {
6
+ adoptedStyleSheets: CSSStyleSheet[];
7
+ }
8
+ interface Document {
9
+ adoptedStyleSheets: CSSStyleSheet[];
10
+ }
11
+ interface CSSStyleSheet {
12
+ replaceSync(cssText: string): void;
13
+ }
14
+ }
15
+ export declare const useStylesheet: (style: string) => void;
@@ -0,0 +1,81 @@
1
+ import { createHook } from '@atomify/hooks';
2
+ const supportShadyCSS = window.ShadyCSS && !window.ShadyCSS.nativeShadow;
3
+ const CSS_SAVE_TOKEN = Symbol('atomify.cssSaveToken');
4
+ const styleCache = new Map();
5
+ const APPLIED_STYLES = [];
6
+ const supportsAdoptingStyleSheets = () => 'adoptedStyleSheets' in Document.prototype && 'replace' in CSSStyleSheet.prototype;
7
+ function bindShadyRoot(target, template) {
8
+ window.ShadyCSS.prepareTemplate(template, target.$cmpMeta$.$tagName$);
9
+ window.ShadyCSS.styleElement(target);
10
+ }
11
+ const applyShadowdomStyles = (component, styles) => {
12
+ const container = component.container;
13
+ const componentName = component.$cmpMeta$.$tagName$;
14
+ let styleTmp;
15
+ if (!styleCache.has(componentName)) {
16
+ styleTmp = document.createElement('template');
17
+ styleTmp.innerHTML = `${component.hasShadowDom && !supportsAdoptingStyleSheets() && styles
18
+ ? `<style style-hook>${styles}</style>`
19
+ : ''}`;
20
+ }
21
+ else {
22
+ styleTmp = styleCache.get(componentName);
23
+ }
24
+ if (styleTmp) {
25
+ if (supportShadyCSS && component.hasShadowDom) {
26
+ bindShadyRoot(component, styleTmp);
27
+ }
28
+ container.appendChild(document.importNode(styleTmp.content, true));
29
+ }
30
+ };
31
+ const unsafeCSS = (cssString) => createCSSResult(String(cssString), CSS_SAVE_TOKEN);
32
+ const createCSSResult = (css, token) => {
33
+ if (token !== CSS_SAVE_TOKEN)
34
+ throw new Error(`${css} is not supported. Use 'unsafeCSS' if you want to use: ${css}`);
35
+ let styleSheet = null;
36
+ const cssText = css;
37
+ if (supportsAdoptingStyleSheets()) {
38
+ styleSheet = new CSSStyleSheet();
39
+ styleSheet.replaceSync(cssText);
40
+ }
41
+ return {
42
+ cssText,
43
+ styleSheet,
44
+ };
45
+ };
46
+ const adoptStyles = (root, styles) => {
47
+ const hasShadowDom = root.hasShadowDom;
48
+ const componentName = root.$cmpMeta$.$tagName$;
49
+ if (supportsAdoptingStyleSheets() && hasShadowDom) {
50
+ const CSSRoot = root.container;
51
+ if (!(CSSRoot instanceof HTMLElement))
52
+ CSSRoot.adoptedStyleSheets = styles.map((s) => {
53
+ return s instanceof StyleSheet ? s : s.styleSheet;
54
+ });
55
+ }
56
+ else if (APPLIED_STYLES.indexOf(componentName) === -1) {
57
+ const combinedStyleArray = styles
58
+ .map((style) => ('cssText' in style ? style.cssText : null))
59
+ .join('');
60
+ if (hasShadowDom) {
61
+ root.styles = combinedStyleArray;
62
+ applyShadowdomStyles(root, combinedStyleArray);
63
+ }
64
+ else {
65
+ const styleElement = document.createElement('style');
66
+ styleElement.textContent = combinedStyleArray;
67
+ styleElement.setAttribute('scope', componentName);
68
+ document.head.appendChild(styleElement);
69
+ APPLIED_STYLES.push(componentName);
70
+ }
71
+ }
72
+ };
73
+ export const useStylesheet = (style) => {
74
+ const css = unsafeCSS(style);
75
+ const styles = Array.isArray(css) ? [...css] : [css];
76
+ return createHook({
77
+ onDidLoad: (element) => adoptStyles(element, styles),
78
+ onUpdate: (element) => adoptStyles(element, styles),
79
+ });
80
+ };
81
+ //# sourceMappingURL=use-stylesheet.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-stylesheet.js","sourceRoot":"","sources":["../../src/hooks/use-stylesheet.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,UAAU,EAAE,MAAM,gBAAgB,CAAC;AA0BvD,MAAM,eAAe,GAAG,MAAM,CAAC,QAAQ,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,YAAY,CAAC;AACzE,MAAM,cAAc,GAAG,MAAM,CAAC,sBAAsB,CAAC,CAAC;AACtD,MAAM,UAAU,GAAG,IAAI,GAAG,EAA+B,CAAC;AAC1D,MAAM,cAAc,GAAa,EAAE,CAAC;AAKpC,MAAM,2BAA2B,GAAG,GAAG,EAAE,CACrC,oBAAoB,IAAI,QAAQ,CAAC,SAAS,IAAI,SAAS,IAAI,aAAa,CAAC,SAAS,CAAC;AAQvF,SAAS,aAAa,CAAC,MAAiB,EAAE,QAA6B;IACnE,MAAM,CAAC,QAAQ,CAAC,eAAe,CAAC,QAAQ,EAAE,MAAM,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;IACtE,MAAM,CAAC,QAAQ,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC;AACzC,CAAC;AAED,MAAM,oBAAoB,GAAG,CAAC,SAAoB,EAAE,MAAc,EAAE,EAAE;IAClE,MAAM,SAAS,GAAG,SAAS,CAAC,SAAS,CAAC;IACtC,MAAM,aAAa,GAAG,SAAS,CAAC,SAAS,CAAC,SAAS,CAAC;IACpD,IAAI,QAAyC,CAAC;IAE9C,IAAI,CAAC,UAAU,CAAC,GAAG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AAG,GAAG,SAAS,CAAC,KAAK,CAAC,CAAC;IAC7B,MAAM,MAAM,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;IAErD,OAAO,UAAU,CAAC;QACd,SAAS,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,WAAW,CAAC,OAAO,EAAE,MAAM,CAAC;QACpD,QAAQ,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,WAAW,CAAC,OAAO,EAAE,MAAM,CAAC;KACtD,CAAC,CAAC;AACP,CAAC,CAAC","sourcesContent":["import { Component, createHook } from '@atomify/hooks';\n\ndeclare global {\n interface Window {\n ShadyCSS: any;\n }\n interface ShadowRoot {\n adoptedStyleSheets: CSSStyleSheet[];\n }\n\n interface Document {\n adoptedStyleSheets: CSSStyleSheet[];\n }\n\n interface CSSStyleSheet {\n replaceSync(cssText: string): void;\n }\n}\n\ninterface CSSResult {\n cssText: string;\n styleSheet: CSSStyleSheet | null;\n}\n\ntype CSSResultOrNative = CSSResult | CSSStyleSheet;\n\nconst supportShadyCSS = window.ShadyCSS && !window.ShadyCSS.nativeShadow;\nconst CSS_SAVE_TOKEN = Symbol('atomify.cssSaveToken');\nconst styleCache = new Map<string, HTMLTemplateElement>();\nconst APPLIED_STYLES: string[] = [];\n\n/**\n * Checks if adopting stylesheet is supported.\n */\nconst supportsAdoptingStyleSheets = () =>\n 'adoptedStyleSheets' in Document.prototype && 'replace' in CSSStyleSheet.prototype;\n\n/**\n * Generates a template based necessary fallbacks needed for browsers that do not support Custom elements or ShadowDom\n * Reference: https://github.com/webcomponents/webcomponentsjs\n * @param {Component} target\n * @param {HTMLTemplateElement} template\n */\nfunction bindShadyRoot(target: Component, template: HTMLTemplateElement) {\n window.ShadyCSS.prepareTemplate(template, target.$cmpMeta$.$tagName$);\n window.ShadyCSS.styleElement(target);\n}\n\nconst applyShadowdomStyles = (component: Component, styles: string) => {\n const container = component.container;\n const componentName = component.$cmpMeta$.$tagName$;\n let styleTmp: HTMLTemplateElement | undefined;\n\n if (!styleCache.has(componentName)) {\n styleTmp = document.createElement('template');\n\n styleTmp.innerHTML = `${\n component.hasShadowDom && !supportsAdoptingStyleSheets() && styles\n ? `<style style-hook>${styles}</style>`\n : ''\n }`;\n } else {\n styleTmp = styleCache.get(componentName);\n }\n\n if (styleTmp) {\n // Apply polyfill when shady polyfill is available and the component has shadowdom\n if (supportShadyCSS && component.hasShadowDom) {\n bindShadyRoot(component, styleTmp);\n }\n\n container.appendChild(document.importNode(styleTmp.content, true));\n }\n};\n\n/**\n * This is unsafe because untrusted CSS text can be used to phone home\n * or exfiltrate data to an attacker controlled site. Take care to only use\n * this with trusted input.\n * @param {string} css\n * @returns {StyleObject}\n */\nconst unsafeCSS = (cssString: unknown): CSSResult =>\n createCSSResult(String(cssString), CSS_SAVE_TOKEN);\n\n/**\n * @param {string} css\n * @param {symbol} token\n * @returns {({ cssText: string; styleSheet: CSSStyleSheet | null })}\n */\nconst createCSSResult = (\n css: string,\n token: symbol,\n): { cssText: string; styleSheet: CSSStyleSheet | null } => {\n if (token !== CSS_SAVE_TOKEN)\n throw new Error(`${css} is not supported. Use 'unsafeCSS' if you want to use: ${css}`);\n\n let styleSheet: CSSStyleSheet | null = null;\n const cssText = css;\n\n if (supportsAdoptingStyleSheets()) {\n styleSheet = new CSSStyleSheet();\n styleSheet.replaceSync(cssText);\n }\n\n return {\n cssText,\n styleSheet,\n };\n};\n\n/**\n * Applies adoptedStyleSheets to the Atomify component.\n * @param { Component } root\n * @param { StyleObject } css\n */\nconst adoptStyles = (root: Component, styles: Array<CSSResultOrNative>) => {\n const hasShadowDom = root.hasShadowDom;\n const componentName = root.$cmpMeta$.$tagName$;\n\n // Add addopted stylesheets when it is supported\n if (supportsAdoptingStyleSheets() && hasShadowDom) {\n const CSSRoot = root.container;\n if (!(CSSRoot instanceof HTMLElement))\n CSSRoot.adoptedStyleSheets = styles.map((s) => {\n return s instanceof StyleSheet ? s : s.styleSheet!;\n });\n } else if (APPLIED_STYLES.indexOf(componentName) === -1) {\n const combinedStyleArray = styles\n .map((style) => ('cssText' in style ? style.cssText : null))\n .join('');\n\n // When adopted stylesheet is not supported but shadowdom is apply it to the shadowroot.\n // Else it is being applied to the head.\n if (hasShadowDom) {\n // Cache the styles so it can be reused instead of creating a style tag again.\n root.styles = combinedStyleArray;\n applyShadowdomStyles(root, combinedStyleArray);\n } else {\n const styleElement = document.createElement('style');\n styleElement.textContent = combinedStyleArray;\n styleElement.setAttribute('scope', componentName);\n\n document.head.appendChild(styleElement);\n APPLIED_STYLES.push(componentName);\n }\n }\n};\n\nexport const useStylesheet = (style: string) => {\n const css = unsafeCSS(style);\n const styles = Array.isArray(css) ? [...css] : [css];\n\n return createHook({\n onDidLoad: (element) => adoptStyles(element, styles),\n onUpdate: (element) => adoptStyles(element, styles),\n });\n};\n"]}
File without changes
File without changes
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-text.js","sourceRoot":"","sources":["../../src/hooks/use-text.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,OAAO,CAAC,YAAqB;IACzC,MAAM,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;IACxB,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,UAAU,EAAE;QACpC,KAAK;YACD,OAAO,IAAI,CAAC,WAAW,CAAC;QAC5B,CAAC;KACJ,CAAC,CAAC;IACH,SAAS,OAAO,CAAC,KAAa;QAC1B,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC;IAC7B,CAAC;IACD,IAAI,YAAY,IAAI,IAAI,EAAE;QACtB,OAAO,CAAC,YAAY,CAAC,CAAC;KACzB;IACD,OAAO,CAAC,IAAI,EAAE,OAAO,CAAU,CAAC;AACpC,CAAC","sourcesContent":["export function useText(initialValue?: string) {\n const text = new Text();\n Object.defineProperty(text, 'toString', {\n value() {\n return this.textContent;\n },\n });\n function setText(value: string) {\n text.textContent = value;\n }\n if (initialValue != null) {\n setText(initialValue);\n }\n return [text, setText] as const;\n}\n"]}
File without changes
File without changes
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-url-params.js","sourceRoot":"","sources":["../../src/hooks/use-url-params.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,cAAc,CAAC;AAEvC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,MAAM,CAAC,MAAM,YAAY,GAAG,GAAG,EAAE;IAC7B,SAAS,UAAU,CAAC,KAAa,EAAE,KAAa;QAC5C,MAAM,EAAE,IAAI,EAAE,GAAG,UAAU,EAAE,CAAC;QAC9B,MAAM,GAAG,GAAG,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAE5C,MAAM,MAAM,GAAG,WAAW,CAAC,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;QAElD,MAAM,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC;QAEtB,MAAM,WAAW,GAAG,WAAW,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;QAClD,MAAM,OAAO,GAAG,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,WAAW,EAAE,CAAC;QAE3C,IAAI,CAAC,OAAO,CAAC,CAAC;IAClB,CAAC;IAED,SAAS,SAAS,CAAC,KAAa;QAC5B,MAAM,MAAM,GAAG,WAAW,CAAC,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;QAElD,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC;IACzB,CAAC;IAED,SAAS,WAAW;QAChB,MAAM,EAAE,IAAI,EAAE,GAAG,UAAU,EAAE,CAAC;QAC9B,MAAM,GAAG,GAAG,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAE5C,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IACjB,CAAC;IAED,OAAO;QACH,IAAI,EAAE,UAAU;QAChB,GAAG,EAAE,SAAS;QACd,KAAK,EAAE,WAAW;KACrB,CAAC;AACN,CAAC,CAAC","sourcesContent":["import QueryString from 'query-string';\n\nimport { useHistory } from './use-history';\n\nexport const useUrlParams = () => {\n function pushParams(param: string, value: string) {\n const { push } = useHistory();\n const url = window.location.href.split('?');\n\n const parsed = QueryString.parse(location.search);\n\n parsed[param] = value;\n\n const stringified = QueryString.stringify(parsed);\n const pageUrl = `${url[0]}?${stringified}`;\n\n push(pageUrl);\n }\n\n function getParams(param: string) {\n const parsed = QueryString.parse(location.search);\n\n return parsed[param];\n }\n\n function clearParams() {\n const { push } = useHistory();\n const url = window.location.href.split('?');\n\n push(url[0]);\n }\n\n return {\n push: pushParams,\n get: getParams,\n clear: clearParams,\n };\n};\n"]}
File without changes
File without changes
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,OAAO,CAAC;AACtB,cAAc,aAAa,CAAC;AAC5B,cAAc,OAAO,CAAC;AACtB,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,eAAe,CAAC;AAC9B,cAAc,uBAAuB,CAAC;AACtC,cAAc,YAAY,CAAC","sourcesContent":["// Export all utilties\nexport * from './api';\nexport * from './generated';\nexport * from './dom';\nexport * from './hooks';\nexport * from './constants';\nexport * from './debounce';\nexport * from './is-touch';\nexport * from './environment';\nexport * from './raf-throttle';\nexport * from './media-query';\nexport * from './function-is-true';\nexport * from './api-utilities';\nexport * from './geometry';\nexport * from './date';\nexport * from './to-currency';\nexport * from './extended-api-models';\nexport * from './throttle';\n"]}
File without changes
File without changes
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is-touch.js","sourceRoot":"","sources":["../src/is-touch.ts"],"names":[],"mappings":"AAAA,MAAM,QAAQ,GAAG,UAAU,CAAC;AAC5B,MAAM,UAAU,GAAG,GAAG,QAAQ,cAAc,CAAC;AAC7C,MAAM,IAAI,GAAG,QAAQ,CAAC,eAAe,CAAC;AAEtC,MAAM,OAAO,WAAW;IAQpB;QACI,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;QACtB,IAAI,CAAC,KAAK;YACN,cAAc,IAAI,IAAI;gBACtB,SAAS,CAAC,cAAc,GAAG,CAAC;gBAC5B,SAAS,CAAC,gBAAgB,GAAG,CAAC,CAAC;QAEnC,IAAI,CAAC,gBAAgB,CAAC,YAAY,EAAE,GAAG,EAAE;YACrC,IAAI,CAAC,mBAAmB,CAAC,WAAW,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,gBAAgB,EAAE,CAAC,CAAC;QACzE,CAAC,CAAC,CAAC;QAEH,IAAI,CAAC,gBAAgB,CAAC,WAAW,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,gBAAgB,EAAE,CAAC,CAAC;QAElE,IAAI,IAAI,CAAC,KAAK,EAAE;YACZ,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;SAChC;IACL,CAAC;IApBD,IAAI,aAAa;QACb,OAAO,IAAI,CAAC,KAAK,CAAC;IACtB,CAAC;IAoBD,gBAAgB;QACZ,IAAI,CAAC,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE;YACrD,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;YAC/B,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;SACxB;IACL,CAAC;CACJ;AAED,MAAM,CAAC,MAAM,WAAW,GAAG,IAAI,WAAW,EAAE,CAAC","sourcesContent":["const IS_TOUCH = 'is-touch';\nconst WITH_MOUSE = `${IS_TOUCH}--with-mouse`;\nconst html = document.documentElement;\n\nexport class DetectTouch {\n touch: boolean;\n hasMouse: boolean;\n\n get isTouchDevice() {\n return this.touch;\n }\n\n constructor() {\n this.hasMouse = false;\n this.touch =\n 'ontouchstart' in html ||\n navigator.maxTouchPoints > 0 ||\n navigator.msMaxTouchPoints > 0;\n\n html.addEventListener('touchstart', () => {\n html.removeEventListener('mousemove', () => this.handleMouseEvent());\n });\n\n html.addEventListener('mousemove', () => this.handleMouseEvent());\n\n if (this.touch) {\n html.classList.add(IS_TOUCH);\n }\n }\n\n handleMouseEvent() {\n if (!this.hasMouse && html.classList.contains(IS_TOUCH)) {\n html.classList.add(WITH_MOUSE);\n this.hasMouse = true;\n }\n }\n}\n\nexport const detectTouch = new DetectTouch();\n"]}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"breakpoints.js","sourceRoot":"","sources":["../../src/media-query/breakpoints.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,WAAW,GAAG;IACvB,MAAM,EAAE;QACJ,IAAI,EAAE,GAAG;QACT,MAAM,EAAE,KAAK;KAChB;IACD,UAAU,EAAE;QACR,IAAI,EAAE,GAAG;QACT,MAAM,EAAE,KAAK;KAChB;IACD,cAAc,EAAE;QACZ,IAAI,EAAE,GAAG;QACT,MAAM,EAAE,KAAK;KAChB;IACD,eAAe,EAAE;QACb,IAAI,EAAE,IAAI;QACV,MAAM,EAAE,KAAK;KAChB;IACD,MAAM,EAAE;QACJ,IAAI,EAAE,IAAI;QACV,MAAM,EAAE,KAAK;KAChB;IACD,OAAO,EAAE;QACL,IAAI,EAAE,IAAI;QACV,MAAM,EAAE,KAAK;KAChB;CACJ,CAAC","sourcesContent":["export const breakpoints = {\n mobile: {\n size: 320,\n active: false,\n },\n mobilePlus: {\n size: 480,\n active: false,\n },\n tabletPortrait: {\n size: 768,\n active: false,\n },\n tabletLandscape: {\n size: 1024,\n active: false,\n },\n laptop: {\n size: 1260,\n active: false,\n },\n desktop: {\n size: 1600,\n active: false,\n },\n};\n"]}
File without changes
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/media-query/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC","sourcesContent":["export * from './media-query';\n"]}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"media-query.js","sourceRoot":"","sources":["../../src/media-query/media-query.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAEjE,MAAM,GAAG,GAAuB,CAAC,UAAU,EAAE,EAAE,CAC3C,eAAe,qBAAqB,CAAC,UAAU,CAAC,KAAK,CAAC;AAE1D,MAAM,GAAG,GAAuB,CAAC,UAAU,EAAE,EAAE,CAC3C,eAAe,qBAAqB,CAAC,UAAU,CAAC,KAAK,CAAC;AAM1D,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,UAAkB,EAAE,EAAE,CAAC,MAAM,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC,OAAO,CAAC;AAE1F,MAAM,CAAC,MAAM,WAAW,GAAG;IACvB,sBAAsB,EAAE,YAAY,CAAC,GAAG,GAAG,CAAC,QAAQ,CAAC,QAAQ,GAAG,CAAC,YAAY,CAAC,EAAE,CAAC;IACjF,0BAA0B,EAAE,YAAY,CAAC,GAAG,GAAG,CAAC,QAAQ,CAAC,QAAQ,GAAG,CAAC,gBAAgB,CAAC,EAAE,CAAC;CAC5F,CAAC;AAWF,MAAM,YAAY,GAAG,CACjB,UAAkB,EAClB,qBAA2D,EAC7D,EAAE;IACA,MAAM,kBAAkB,GAAG,MAAM,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;IACzD,kBAAkB,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,qBA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AQ,CAAC,WAAW,CAAC,CAAC;IAC1B,CAAC;IAED,QAAQ,CAAC,WAAW,CAAC,CAAC;AAC1B,CAAC,CAAC;AAEF,OAAO,EAAE,WAAW,EAAE,GAAG,EAAE,GAAG,EAAE,QAAQ,EAAE,YAAY,EAAE,oBAAoB,EAAe,CAAC","sourcesContent":["import { breakpoints } from './breakpoints';\nimport { BreakpointFunction, Breakpoints, UseMediaFunction } from './media-query.types';\nimport { getMediaQueries, getSizeFromBreakpoint } from './utils';\n\nconst max: BreakpointFunction = (breakpoint) =>\n `(max-width: ${getSizeFromBreakpoint(breakpoint)}px)`;\n\nconst min: BreakpointFunction = (breakpoint) =>\n `(min-width: ${getSizeFromBreakpoint(breakpoint)}px)`;\n\n/**\n * Check if the given breakpoint is a match\n * @param breakpoint { string }\n */\nexport const mediaIsMatch = (breakpoint: string) => window.matchMedia(breakpoint).matches;\n\nexport const deviceWidth = {\n isMobilePlusAndSmaller: mediaIsMatch(`${min('mobile')} and ${max('mobilePlus')}`),\n isTabletPortraitAndSmaller: mediaIsMatch(`${min('mobile')} and ${max('tabletPortrait')}`),\n};\n\n/**\n * Method that calls a callback everytime a media-query matches\n * mediaWatcher(`(min-width: 600px)`, (matches) => {\n * console.log(matches);\n * });\n * @function mediaWatcher\n * @param mediaQuery { string }\n * @param layoutChangedCallback { callback }\n */\nconst mediaWatcher = (\n mediaQuery: string,\n layoutChangedCallback: (mediaQueryMatches: boolean) => void,\n) => {\n const mediaQueryListener = window.matchMedia(mediaQuery);\n mediaQueryListener.addListener((e) => layoutChangedCallback(e.matches));\n layoutChangedCallback(mediaQueryListener.matches);\n};\n\n/**\n * Returns current active breakpoint\n * @function getCurrentBreakpoint\n */\nconst getCurrentBreakpoint = () =>\n getMediaQueries().reduce(\n (previous, current) =>\n window.matchMedia(current.query()).matches ? current.breakpoint : (previous as any),\n undefined,\n );\n\n/**\n * Returns the breakpoints object in the given callback\n * @function useMedia\n * @param callback returns @type Breakpoints\n */\nconst useMedia = (callback: UseMediaFunction) => {\n const breakpointObject = getMediaQueries();\n\n breakpointObject\n .map((breakpoint) => {\n return {\n listener: window.matchMedia(breakpoint.query()),\n breakpoint: breakpoint.breakpoint,\n };\n })\n .forEach((breakpoint) =>\n breakpoint.listener.addListener((e) => handleMediaListeners(e, breakpoint.breakpoint)),\n );\n\n function handleMediaListeners(event: { matches: boolean; media: string }, key: Breakpoints) {\n if (!event.matches) return;\n\n Object.keys(breakpoints).forEach(\n (item: any) =>\n (breakpoints[item as Breakpoints].active =\n item === key ? event.matches : !event.matches),\n );\n\n callback(breakpoints);\n }\n\n callback(breakpoints);\n};\n\nexport { breakpoints, min, max, useMedia, mediaWatcher, getCurrentBreakpoint, Breakpoints };\n"]}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"media-query.types.js","sourceRoot":"","sources":["../../src/media-query/media-query.types.ts"],"names":[],"mappings":"","sourcesContent":["import { breakpoints } from './breakpoints';\n\nexport type Breakpoints = keyof typeof breakpoints;\nexport type BreakpointFunction = (breakpoint: Breakpoints) => string;\n\nexport type UseMediaFunction = (\n breakpoints: {\n [key in Breakpoints]: Breakpoint;\n },\n) => void;\n\nexport type MediaQuery = {\n breakpoint: Breakpoints;\n query: () => string;\n};\nexport interface Breakpoint {\n size: number;\n active: boolean;\n}\n"]}