@bpd-library/utilities 1.3.2-beta.8 → 1.3.2-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 (301) hide show
  1. package/dist/hooks/use-partition.d.ts +1 -0
  2. package/dist/hooks/use-partition.js +11 -0
  3. package/dist/hooks/use-partition.js.map +1 -0
  4. package/package.json +3 -3
  5. package/dist/api-utilities/compose-exclude-string.d.ts +0 -3
  6. package/dist/api-utilities/compose-exclude-string.js +0 -5
  7. package/dist/api-utilities/compose-exclude-string.js.map +0 -1
  8. package/dist/esm/api/http.js +0 -120
  9. package/dist/esm/api/http.js.map +0 -1
  10. package/dist/esm/api/index.js +0 -11
  11. package/dist/esm/api/index.js.map +0 -1
  12. package/dist/esm/api-utilities/compose-exclude-string.js +0 -6
  13. package/dist/esm/api-utilities/compose-exclude-string.js.map +0 -1
  14. package/dist/esm/api-utilities/decimal-range/merge-decimal-range.js +0 -13
  15. package/dist/esm/api-utilities/decimal-range/merge-decimal-range.js.map +0 -1
  16. package/dist/esm/api-utilities/decimal-range/merge-specification-range.js +0 -29
  17. package/dist/esm/api-utilities/decimal-range/merge-specification-range.js.map +0 -1
  18. package/dist/esm/api-utilities/district-status.js +0 -14
  19. package/dist/esm/api-utilities/district-status.js.map +0 -1
  20. package/dist/esm/api-utilities/find-filter.js +0 -41
  21. package/dist/esm/api-utilities/find-filter.js.map +0 -1
  22. package/dist/esm/api-utilities/get/coordinates.js +0 -31
  23. package/dist/esm/api-utilities/get/coordinates.js.map +0 -1
  24. package/dist/esm/api-utilities/get/layer-raster.js +0 -4
  25. package/dist/esm/api-utilities/get/layer-raster.js.map +0 -1
  26. package/dist/esm/api-utilities/show-mortgage-price.js +0 -11
  27. package/dist/esm/api-utilities/show-mortgage-price.js.map +0 -1
  28. package/dist/esm/api-utilities/show-price.js +0 -13
  29. package/dist/esm/api-utilities/show-price.js.map +0 -1
  30. package/dist/esm/constants/index.js +0 -7
  31. package/dist/esm/constants/index.js.map +0 -1
  32. package/dist/esm/date.js +0 -11
  33. package/dist/esm/date.js.map +0 -1
  34. package/dist/esm/debounce.js +0 -25
  35. package/dist/esm/debounce.js.map +0 -1
  36. package/dist/esm/dom/dom.js +0 -9
  37. package/dist/esm/dom/dom.js.map +0 -1
  38. package/dist/esm/environment.js +0 -27
  39. package/dist/esm/environment.js.map +0 -1
  40. package/dist/esm/extended-api-models/excluded-properties.js +0 -36
  41. package/dist/esm/extended-api-models/excluded-properties.js.map +0 -1
  42. package/dist/esm/extended-api-models/extended-area-projects.js +0 -12
  43. package/dist/esm/extended-api-models/extended-area-projects.js.map +0 -1
  44. package/dist/esm/extended-api-models/extended-area.js +0 -182
  45. package/dist/esm/extended-api-models/extended-area.js.map +0 -1
  46. package/dist/esm/extended-api-models/status/apartment-building-status.js +0 -60
  47. package/dist/esm/extended-api-models/status/apartment-building-status.js.map +0 -1
  48. package/dist/esm/extended-api-models/status/construction-number-status.js +0 -20
  49. package/dist/esm/extended-api-models/status/construction-number-status.js.map +0 -1
  50. package/dist/esm/extended-api-models/status/property-type-status.js +0 -60
  51. package/dist/esm/extended-api-models/status/property-type-status.js.map +0 -1
  52. package/dist/esm/extended-api-models/utilities/apartment-building-view.js +0 -5
  53. package/dist/esm/extended-api-models/utilities/apartment-building-view.js.map +0 -1
  54. package/dist/esm/extended-api-models/utilities/extended-model-price-range.js +0 -37
  55. package/dist/esm/extended-api-models/utilities/extended-model-price-range.js.map +0 -1
  56. package/dist/esm/extended-api-models/utilities/find-extended-object.js +0 -23
  57. package/dist/esm/extended-api-models/utilities/find-extended-object.js.map +0 -1
  58. package/dist/esm/extended-api-models/utilities/is-apartment.js +0 -14
  59. package/dist/esm/extended-api-models/utilities/is-apartment.js.map +0 -1
  60. package/dist/esm/function-is-true.js +0 -13
  61. package/dist/esm/function-is-true.js.map +0 -1
  62. package/dist/esm/generated/bpd-client.js +0 -53
  63. package/dist/esm/generated/bpd-client.js.map +0 -1
  64. package/dist/esm/geometry/country-bounding-box.js +0 -14
  65. package/dist/esm/geometry/country-bounding-box.js.map +0 -1
  66. package/dist/esm/geometry/geometry.js +0 -65
  67. package/dist/esm/geometry/geometry.js.map +0 -1
  68. package/dist/esm/hooks/use-click-outside.js +0 -34
  69. package/dist/esm/hooks/use-click-outside.js.map +0 -1
  70. package/dist/esm/hooks/use-form-changes.js +0 -30
  71. package/dist/esm/hooks/use-form-changes.js.map +0 -1
  72. package/dist/esm/hooks/use-history.js +0 -15
  73. package/dist/esm/hooks/use-history.js.map +0 -1
  74. package/dist/esm/hooks/use-keyboard-focus.js +0 -14
  75. package/dist/esm/hooks/use-keyboard-focus.js.map +0 -1
  76. package/dist/esm/hooks/use-lazy.js +0 -47
  77. package/dist/esm/hooks/use-lazy.js.map +0 -1
  78. package/dist/esm/hooks/use-map-storage.js +0 -16
  79. package/dist/esm/hooks/use-map-storage.js.map +0 -1
  80. package/dist/esm/hooks/use-scroll-position.js +0 -23
  81. package/dist/esm/hooks/use-scroll-position.js.map +0 -1
  82. package/dist/esm/hooks/use-scroll-to.js +0 -66
  83. package/dist/esm/hooks/use-scroll-to.js.map +0 -1
  84. package/dist/esm/hooks/use-stylesheet.js +0 -8
  85. package/dist/esm/hooks/use-stylesheet.js.map +0 -1
  86. package/dist/esm/hooks/use-url-params.js +0 -31
  87. package/dist/esm/hooks/use-url-params.js.map +0 -1
  88. package/dist/esm/index.js +0 -40
  89. package/dist/esm/index.js.map +0 -1
  90. package/dist/esm/is-touch.js +0 -32
  91. package/dist/esm/is-touch.js.map +0 -1
  92. package/dist/esm/media-query/breakpoints.js +0 -29
  93. package/dist/esm/media-query/breakpoints.js.map +0 -1
  94. package/dist/esm/media-query/media-query.js +0 -39
  95. package/dist/esm/media-query/media-query.js.map +0 -1
  96. package/dist/esm/media-query/utils/index.js +0 -35
  97. package/dist/esm/media-query/utils/index.js.map +0 -1
  98. package/dist/esm/raf-throttle.js +0 -24
  99. package/dist/esm/raf-throttle.js.map +0 -1
  100. package/dist/esm/throttle.js +0 -23
  101. package/dist/esm/throttle.js.map +0 -1
  102. package/dist/esm/to-currency.js +0 -26
  103. package/dist/esm/to-currency.js.map +0 -1
  104. package/dist/extended-api-models/excluded-properties.d.ts +0 -5
  105. package/dist/extended-api-models/excluded-properties.js +0 -35
  106. package/dist/extended-api-models/excluded-properties.js.map +0 -1
  107. package/dist/hooks/use-form-changes.d.ts +0 -12
  108. package/dist/hooks/use-form-changes.js +0 -27
  109. package/dist/hooks/use-form-changes.js.map +0 -1
  110. package/dist/hooks/use-stylesheet.d.ts +0 -1
  111. package/dist/hooks/use-stylesheet.js +0 -5
  112. package/dist/hooks/use-stylesheet.js.map +0 -1
  113. package/dist/lib/api/http.js +0 -117
  114. package/dist/lib/api/http.js.map +0 -1
  115. package/dist/lib/api/index.js +0 -8
  116. package/dist/lib/api/index.js.map +0 -1
  117. package/dist/lib/api-utilities/api-utilities.js +0 -9
  118. package/dist/lib/api-utilities/api-utilities.js.map +0 -1
  119. package/dist/lib/api-utilities/api-utilities.test.js +0 -122
  120. package/dist/lib/api-utilities/api-utilities.test.js.map +0 -1
  121. package/dist/lib/api-utilities/api-utilities.types.js +0 -1
  122. package/dist/lib/api-utilities/api-utilities.types.js.map +0 -1
  123. package/dist/lib/api-utilities/compose-exclude-string.js +0 -5
  124. package/dist/lib/api-utilities/compose-exclude-string.js.map +0 -1
  125. package/dist/lib/api-utilities/decimal-range/merge-decimal-range.js +0 -12
  126. package/dist/lib/api-utilities/decimal-range/merge-decimal-range.js.map +0 -1
  127. package/dist/lib/api-utilities/decimal-range/merge-specification-range.js +0 -27
  128. package/dist/lib/api-utilities/decimal-range/merge-specification-range.js.map +0 -1
  129. package/dist/lib/api-utilities/district-status.js +0 -13
  130. package/dist/lib/api-utilities/district-status.js.map +0 -1
  131. package/dist/lib/api-utilities/find-filter.js +0 -40
  132. package/dist/lib/api-utilities/find-filter.js.map +0 -1
  133. package/dist/lib/api-utilities/get/coordinates.js +0 -29
  134. package/dist/lib/api-utilities/get/coordinates.js.map +0 -1
  135. package/dist/lib/api-utilities/get/layer-raster.js +0 -3
  136. package/dist/lib/api-utilities/get/layer-raster.js.map +0 -1
  137. package/dist/lib/api-utilities/index.js +0 -2
  138. package/dist/lib/api-utilities/index.js.map +0 -1
  139. package/dist/lib/api-utilities/show-mortgage-price.js +0 -10
  140. package/dist/lib/api-utilities/show-mortgage-price.js.map +0 -1
  141. package/dist/lib/api-utilities/show-price.js +0 -12
  142. package/dist/lib/api-utilities/show-price.js.map +0 -1
  143. package/dist/lib/constants/index.js +0 -5
  144. package/dist/lib/constants/index.js.map +0 -1
  145. package/dist/lib/date.js +0 -10
  146. package/dist/lib/date.js.map +0 -1
  147. package/dist/lib/debounce.js +0 -23
  148. package/dist/lib/debounce.js.map +0 -1
  149. package/dist/lib/dom/dom.js +0 -7
  150. package/dist/lib/dom/dom.js.map +0 -1
  151. package/dist/lib/dom/index.js +0 -2
  152. package/dist/lib/dom/index.js.map +0 -1
  153. package/dist/lib/environment.js +0 -25
  154. package/dist/lib/environment.js.map +0 -1
  155. package/dist/lib/extended-api-models/excluded-properties.js +0 -35
  156. package/dist/lib/extended-api-models/excluded-properties.js.map +0 -1
  157. package/dist/lib/extended-api-models/extended-area-projects.js +0 -10
  158. package/dist/lib/extended-api-models/extended-area-projects.js.map +0 -1
  159. package/dist/lib/extended-api-models/extended-area.js +0 -179
  160. package/dist/lib/extended-api-models/extended-area.js.map +0 -1
  161. package/dist/lib/extended-api-models/index.js +0 -7
  162. package/dist/lib/extended-api-models/index.js.map +0 -1
  163. package/dist/lib/extended-api-models/status/apartment-building-status.js +0 -58
  164. package/dist/lib/extended-api-models/status/apartment-building-status.js.map +0 -1
  165. package/dist/lib/extended-api-models/status/construction-number-status.js +0 -19
  166. package/dist/lib/extended-api-models/status/construction-number-status.js.map +0 -1
  167. package/dist/lib/extended-api-models/status/property-type-status.js +0 -58
  168. package/dist/lib/extended-api-models/status/property-type-status.js.map +0 -1
  169. package/dist/lib/extended-api-models/utilities/apartment-building-view.js +0 -4
  170. package/dist/lib/extended-api-models/utilities/apartment-building-view.js.map +0 -1
  171. package/dist/lib/extended-api-models/utilities/extended-model-price-range.js +0 -35
  172. package/dist/lib/extended-api-models/utilities/extended-model-price-range.js.map +0 -1
  173. package/dist/lib/extended-api-models/utilities/find-extended-object.js +0 -21
  174. package/dist/lib/extended-api-models/utilities/find-extended-object.js.map +0 -1
  175. package/dist/lib/extended-api-models/utilities/is-apartment.js +0 -13
  176. package/dist/lib/extended-api-models/utilities/is-apartment.js.map +0 -1
  177. package/dist/lib/function-is-true.js +0 -11
  178. package/dist/lib/function-is-true.js.map +0 -1
  179. package/dist/lib/generated/bpd-client.js +0 -50
  180. package/dist/lib/generated/bpd-client.js.map +0 -1
  181. package/dist/lib/generated/index.js +0 -2
  182. package/dist/lib/generated/index.js.map +0 -1
  183. package/dist/lib/geometry/country-bounding-box.js +0 -12
  184. package/dist/lib/geometry/country-bounding-box.js.map +0 -1
  185. package/dist/lib/geometry/geometry.js +0 -64
  186. package/dist/lib/geometry/geometry.js.map +0 -1
  187. package/dist/lib/geometry/geometry.test.js +0 -87
  188. package/dist/lib/geometry/geometry.test.js.map +0 -1
  189. package/dist/lib/geometry/index.js +0 -3
  190. package/dist/lib/geometry/index.js.map +0 -1
  191. package/dist/lib/hooks/index.js +0 -11
  192. package/dist/lib/hooks/index.js.map +0 -1
  193. package/dist/lib/hooks/use-click-outside.js +0 -32
  194. package/dist/lib/hooks/use-click-outside.js.map +0 -1
  195. package/dist/lib/hooks/use-delegate-listen.js +0 -10
  196. package/dist/lib/hooks/use-delegate-listen.js.map +0 -1
  197. package/dist/lib/hooks/use-form-changes.js +0 -27
  198. package/dist/lib/hooks/use-form-changes.js.map +0 -1
  199. package/dist/lib/hooks/use-history.js +0 -13
  200. package/dist/lib/hooks/use-history.js.map +0 -1
  201. package/dist/lib/hooks/use-input.js +0 -28
  202. package/dist/lib/hooks/use-input.js.map +0 -1
  203. package/dist/lib/hooks/use-keyboard-focus.js +0 -11
  204. package/dist/lib/hooks/use-keyboard-focus.js.map +0 -1
  205. package/dist/lib/hooks/use-lazy.js +0 -44
  206. package/dist/lib/hooks/use-lazy.js.map +0 -1
  207. package/dist/lib/hooks/use-map-storage.js +0 -14
  208. package/dist/lib/hooks/use-map-storage.js.map +0 -1
  209. package/dist/lib/hooks/use-scroll-position.js +0 -20
  210. package/dist/lib/hooks/use-scroll-position.js.map +0 -1
  211. package/dist/lib/hooks/use-scroll-to.js +0 -64
  212. package/dist/lib/hooks/use-scroll-to.js.map +0 -1
  213. package/dist/lib/hooks/use-stylesheet.js +0 -5
  214. package/dist/lib/hooks/use-stylesheet.js.map +0 -1
  215. package/dist/lib/hooks/use-text.js +0 -16
  216. package/dist/lib/hooks/use-text.js.map +0 -1
  217. package/dist/lib/hooks/use-url-params.js +0 -28
  218. package/dist/lib/hooks/use-url-params.js.map +0 -1
  219. package/dist/lib/index.js +0 -18
  220. package/dist/lib/index.js.map +0 -1
  221. package/dist/lib/is-touch.js +0 -30
  222. package/dist/lib/is-touch.js.map +0 -1
  223. package/dist/lib/media-query/breakpoints.js +0 -27
  224. package/dist/lib/media-query/breakpoints.js.map +0 -1
  225. package/dist/lib/media-query/index.js +0 -2
  226. package/dist/lib/media-query/index.js.map +0 -1
  227. package/dist/lib/media-query/media-query.js +0 -36
  228. package/dist/lib/media-query/media-query.js.map +0 -1
  229. package/dist/lib/media-query/media-query.types.js +0 -1
  230. package/dist/lib/media-query/media-query.types.js.map +0 -1
  231. package/dist/lib/media-query/utils/index.js +0 -32
  232. package/dist/lib/media-query/utils/index.js.map +0 -1
  233. package/dist/lib/raf-throttle.js +0 -22
  234. package/dist/lib/raf-throttle.js.map +0 -1
  235. package/dist/lib/throttle.js +0 -22
  236. package/dist/lib/throttle.js.map +0 -1
  237. package/dist/lib/to-currency.js +0 -24
  238. package/dist/lib/to-currency.js.map +0 -1
  239. package/dist/types/api/http.d.ts +0 -47
  240. package/dist/types/api/index.d.ts +0 -2
  241. package/dist/types/api-utilities/api-utilities.d.ts +0 -8
  242. package/dist/types/api-utilities/api-utilities.test.d.ts +0 -1
  243. package/dist/types/api-utilities/api-utilities.types.d.ts +0 -46
  244. package/dist/types/api-utilities/compose-exclude-string.d.ts +0 -3
  245. package/dist/types/api-utilities/decimal-range/merge-decimal-range.d.ts +0 -3
  246. package/dist/types/api-utilities/decimal-range/merge-specification-range.d.ts +0 -13
  247. package/dist/types/api-utilities/district-status.d.ts +0 -3
  248. package/dist/types/api-utilities/find-filter.d.ts +0 -32
  249. package/dist/types/api-utilities/get/coordinates.d.ts +0 -6
  250. package/dist/types/api-utilities/get/layer-raster.d.ts +0 -3
  251. package/dist/types/api-utilities/index.d.ts +0 -1
  252. package/dist/types/api-utilities/show-mortgage-price.d.ts +0 -3
  253. package/dist/types/api-utilities/show-price.d.ts +0 -7
  254. package/dist/types/constants/index.d.ts +0 -4
  255. package/dist/types/date.d.ts +0 -3
  256. package/dist/types/debounce.d.ts +0 -5
  257. package/dist/types/dom/dom.d.ts +0 -6
  258. package/dist/types/dom/index.d.ts +0 -1
  259. package/dist/types/environment.d.ts +0 -9
  260. package/dist/types/extended-api-models/excluded-properties.d.ts +0 -5
  261. package/dist/types/extended-api-models/extended-area-projects.d.ts +0 -3
  262. package/dist/types/extended-api-models/extended-area.d.ts +0 -13
  263. package/dist/types/extended-api-models/index.d.ts +0 -6
  264. package/dist/types/extended-api-models/status/apartment-building-status.d.ts +0 -3
  265. package/dist/types/extended-api-models/status/construction-number-status.d.ts +0 -3
  266. package/dist/types/extended-api-models/status/property-type-status.d.ts +0 -4
  267. package/dist/types/extended-api-models/utilities/apartment-building-view.d.ts +0 -4
  268. package/dist/types/extended-api-models/utilities/extended-model-price-range.d.ts +0 -4
  269. package/dist/types/extended-api-models/utilities/find-extended-object.d.ts +0 -4
  270. package/dist/types/extended-api-models/utilities/is-apartment.d.ts +0 -11
  271. package/dist/types/function-is-true.d.ts +0 -1
  272. package/dist/types/generated/bpd-client.d.ts +0 -808
  273. package/dist/types/generated/index.d.ts +0 -1
  274. package/dist/types/geometry/country-bounding-box.d.ts +0 -6
  275. package/dist/types/geometry/geometry.d.ts +0 -11
  276. package/dist/types/geometry/geometry.test.d.ts +0 -8
  277. package/dist/types/geometry/index.d.ts +0 -2
  278. package/dist/types/hooks/index.d.ts +0 -10
  279. package/dist/types/hooks/use-click-outside.d.ts +0 -6
  280. package/dist/types/hooks/use-delegate-listen.d.ts +0 -6
  281. package/dist/types/hooks/use-form-changes.d.ts +0 -12
  282. package/dist/types/hooks/use-history.d.ts +0 -4
  283. package/dist/types/hooks/use-input.d.ts +0 -41
  284. package/dist/types/hooks/use-keyboard-focus.d.ts +0 -6
  285. package/dist/types/hooks/use-lazy.d.ts +0 -21
  286. package/dist/types/hooks/use-map-storage.d.ts +0 -6
  287. package/dist/types/hooks/use-scroll-position.d.ts +0 -10
  288. package/dist/types/hooks/use-scroll-to.d.ts +0 -8
  289. package/dist/types/hooks/use-stylesheet.d.ts +0 -1
  290. package/dist/types/hooks/use-text.d.ts +0 -1
  291. package/dist/types/hooks/use-url-params.d.ts +0 -5
  292. package/dist/types/index.d.ts +0 -17
  293. package/dist/types/is-touch.d.ts +0 -8
  294. package/dist/types/media-query/breakpoints.d.ts +0 -26
  295. package/dist/types/media-query/index.d.ts +0 -1
  296. package/dist/types/media-query/media-query.d.ts +0 -13
  297. package/dist/types/media-query/media-query.types.d.ts +0 -14
  298. package/dist/types/media-query/utils/index.d.ts +0 -3
  299. package/dist/types/raf-throttle.d.ts +0 -4
  300. package/dist/types/throttle.d.ts +0 -2
  301. package/dist/types/to-currency.d.ts +0 -3
@@ -1 +0,0 @@
1
- {"version":3,"file":"bpd-client.js","sources":["../../../src/generated/bpd-client.ts"],"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"],"names":[],"mappings":";;MAw3Ba,sBAAsB,GAAG,CAClC,MAA0C,EAC1C,MAAsB,KAEtB,SAAS,CAAC,GAAG,CAA2B,yBAAyB,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,IAAI,CACnF,CAAC,GAAG,KAAK,GAAI,EACf;MAEO,wCAAwC,GAAG,CACpD,MAAqB,EACrB,IAAkC,EAClC,MAAsB,KACrB,SAAS,CAAC,GAAG,CAAO,2BAA2B,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,KAAK,GAAI,EAAE;MAEnF,wCAAwC,GAAG,CACpD,MAAqB,EACrB,IAAS,EACT,MAAsB,KACrB,SAAS,CAAC,MAAM,CAAO,2BAA2B,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,KAAK,GAAI,EAAE;MAEtF,gCAAgC,GAAG,CAC5C,MAAqB,EACrB,MAAoD,EACpD,MAAsB,KAEtB,SAAS,CAAC,GAAG,CAAyB,2BAA2B,MAAM,EAAE,E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AAS,CAAC,GAAG,CAAgB,aAAa,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,KAAK,GAAI,EAAE;MAEvE,sBAAsB,GAAG,CAClC,OAAsB,EACtB,IAAyB,EACzB,MAAsB,KACrB,SAAS,CAAC,GAAG,CAAO,kBAAkB,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,KAAK,GAAI,EAAE;MAE3E,sBAAsB,GAAG,CAAC,OAAsB,EAAE,IAAS,EAAE,MAAsB,KAC5F,SAAS,CAAC,MAAM,CAAO,kBAAkB,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,KAAK,GAAI;;;;"}
@@ -1,14 +0,0 @@
1
- import { mergeBoundingBoxes } from './geometry.js';
2
-
3
- const COUNTRY_BBOX = {
4
- nl: [3.33390071158434, 50.7503661060614, 7.22749998189678, 53.6436329908026],
5
- de: [5.98865807458, 47.3024876979, 15.0169958839, 54.983104153],
6
- };
7
- const getCountryBoundingBox = (countryIsoCodes) => {
8
- const boundingBoxes = countryIsoCodes === null || countryIsoCodes === void 0 ? void 0 : countryIsoCodes.map((countryIsoCode) => COUNTRY_BBOX[countryIsoCode]).filter((bbox) => !!bbox);
9
- const mergedBoundingBox = mergeBoundingBoxes(boundingBoxes);
10
- return mergedBoundingBox;
11
- };
12
-
13
- export { COUNTRY_BBOX, getCountryBoundingBox };
14
- //# sourceMappingURL=country-bounding-box.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"country-bounding-box.js","sources":["../../../src/geometry/country-bounding-box.ts"],"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"],"names":[],"mappings":";;MAIM,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;EACjE;MAOI,qBAAqB,GAAG,CAAC,eAAgC;IAC3D,MAAM,aAAa,GAAG,eAAe,aAAf,eAAe,uBAAf,eAAe,CAC/B,GAAG,CAAC,CAAC,cAAc,KAAK,YAAY,CAAC,cAAc,CAAC,EACrD,MAAM,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC;IAE9B,MAAM,iBAAiB,GAAG,kBAAkB,CAAC,aAAa,CAAC,CAAC;IAE5D,OAAO,iBAAiB,CAAC;AAC7B;;;;"}
@@ -1,65 +0,0 @@
1
- const DEGREE_PER_KM = 0.0089;
2
- const calculateBoundingBox = (coordinates) => {
3
- let minX, minY, maxX, maxY;
4
- coordinates.flat(1).forEach(([x, y]) => {
5
- minX = !minX || x < minX ? x : minX;
6
- minY = !minY || y < minY ? y : minY;
7
- maxX = !maxX || x > maxX ? x : maxX;
8
- maxY = !maxY || y > maxY ? y : maxY;
9
- });
10
- return [minX || 0, minY || 0, maxX || 0, maxY || 0];
11
- };
12
- const concatMapDataCoordinates = (mapData) => mapData.reduce((coordinates, item) => coordinates.concat(item.coordinates), []);
13
- const calculateMapDataBoundingBox = (mapData) => {
14
- const coordinates = concatMapDataCoordinates(mapData);
15
- return calculateBoundingBox(coordinates);
16
- };
17
- const calculateMapDataCenter = (mapData) => {
18
- const coordinates = concatMapDataCoordinates(mapData);
19
- return calculateCenter(coordinates);
20
- };
21
- const calculateBoundingBoxCenter = ([minX, minY, maxX, maxY]) => {
22
- return [(minX + maxX) / 2, (minY + maxY) / 2];
23
- };
24
- const calculateCenter = (coordinates) => {
25
- return calculateBoundingBoxCenter(calculateBoundingBox(coordinates));
26
- };
27
- const mergeBoundingBoxes = (boundingBoxes) => {
28
- const mergedBoundingBox = boundingBoxes.reduce((merged, boundingBox) => {
29
- merged[0] = merged[0] < boundingBox[0] ? merged[0] : boundingBox[0];
30
- merged[1] = merged[1] < boundingBox[1] ? merged[1] : boundingBox[1];
31
- merged[2] = merged[2] > boundingBox[2] ? merged[2] : boundingBox[2];
32
- merged[3] = merged[3] > boundingBox[3] ? merged[3] : boundingBox[3];
33
- return merged;
34
- }, boundingBoxes[0]);
35
- return mergedBoundingBox;
36
- };
37
- const expandBoundingBox = ([minX, minY, maxX, maxY], km) => {
38
- const degreePadding = DEGREE_PER_KM * km;
39
- minX -= degreePadding;
40
- minY -= degreePadding;
41
- maxX += degreePadding;
42
- maxY += degreePadding;
43
- return [minX, minY, maxX, maxY];
44
- };
45
- const withinBoundingBox = (coordinates, boundingBox, kmPadding = 0) => {
46
- if (kmPadding) {
47
- boundingBox = expandBoundingBox(boundingBox, kmPadding);
48
- }
49
- const flatCoordinates = coordinates.flat(1);
50
- const [minX, minY, maxX, maxY] = boundingBox;
51
- for (let i = 0; i < flatCoordinates.length; i++) {
52
- const [x, y] = flatCoordinates[i];
53
- if (x < maxX && x > minX && y < maxY && y > minY)
54
- return true;
55
- }
56
- return false;
57
- };
58
- const calculateDistance = (pointA, pointB) => {
59
- const distanceX = (pointA[0] - pointB[0]) ** 2;
60
- const distanceY = (pointA[1] - pointB[1]) ** 2;
61
- return Math.sqrt(distanceX + distanceY);
62
- };
63
-
64
- export { calculateBoundingBox, calculateBoundingBoxCenter, calculateCenter, calculateDistance, calculateMapDataBoundingBox, calculateMapDataCenter, expandBoundingBox, mergeBoundingBoxes, withinBoundingBox };
65
- //# sourceMappingURL=geometry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"geometry.js","sources":["../../../src/geometry/geometry.ts"],"sourcesContent":["import { BoundingBox, 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): [number, number] => {\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): [number, number] => {\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: [number, number], pointB: [number, number]): 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"],"names":[],"mappings":"AAEA,MAAM,aAAa,GAAG,MAAM,CAAC;MAEvB,oBAAoB,GAAG,CAAC,WAAwB;IAClD,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;QAC/B,IAAI,GAAG,CAAC,IAAI,IAAI,CAAC,GAAG,IAAI,GAAG,CAA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AAC;IAErB,IAAI,SAAS,EAAE;QACX,WAAW,GAAG,iBAAiB,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC;KAC3D;IAED,MAAM,eAAe,GAAG,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAC5C,MAAM,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,GAAG,WAAW,CAAC;IAE7C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,eAAe,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QAC7C,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,eAAe,CAAC,CAAC,CAAC,CAAC;QAElC,IAAI,CAAC,GAAG,IAAI,IAAI,CAAC,GAAG,IAAI,IAAI,CAAC,GAAG,IAAI,IAAI,CAAC,GAAG,IAAI;YAAE,OAAO,IAAI,CAAC;KACjE;IAED,OAAO,KAAK,CAAC;AACjB,EAAE;MAEI,iBAAiB,GAAG,CAAC,MAAwB,EAAE,MAAwB;IACzE,MAAM,SAAS,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;IAC/C,MAAM,SAAS,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;IAE/C,OAAO,IAAI,CAAC,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC,CAAC;AAC5C;;;;"}
@@ -1,34 +0,0 @@
1
- const defaultOptions = {
2
- removeListener: false,
3
- };
4
- const isNodeList = (target) => NodeList.prototype.isPrototypeOf(target);
5
- const isHTMLElement = (target) => HTMLElement.prototype.isPrototypeOf(target);
6
- const isHTMLCollection = (target) => HTMLCollection.prototype.isPrototypeOf(target);
7
- function useClickOutside(selector, callback, options) {
8
- const theOptions = Object.assign(Object.assign({}, defaultOptions), options);
9
- const listener = (event) => {
10
- if (isNodeList(selector) || isHTMLCollection(selector)) {
11
- if (Array.from(selector).some(selection => selection.contains(event.target))) {
12
- return callback(false);
13
- }
14
- }
15
- else if (isHTMLElement(selector)) {
16
- if (selector.contains(event.target)) {
17
- return callback(false);
18
- }
19
- }
20
- else {
21
- console.warn('Undefined type of', selector);
22
- return callback(null);
23
- }
24
- if (theOptions.removeListener) {
25
- document.removeEventListener('click', listener);
26
- }
27
- return callback(true);
28
- };
29
- document.addEventListener('click', listener);
30
- return listener;
31
- }
32
-
33
- export { useClickOutside };
34
- //# sourceMappingURL=use-click-outside.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"use-click-outside.js","sources":["../../../src/hooks/use-click-outside.ts"],"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"],"names":[],"mappings":"AAMA,MAAM,cAAc,GAAY;IAC5B,cAAc,EAAE,KAAK;CACxB,CAAC;AAEF,MAAM,UAAU,GAAG,CAAC,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pB;;;;"}
@@ -1,30 +0,0 @@
1
- import { useListen } from '@atomify/hooks';
2
-
3
- let previousState = [];
4
- function setPreviousState(form) {
5
- previousState = [];
6
- if (form.current) {
7
- const entries = new FormData(form.current).entries();
8
- for (const [key, value] of entries) {
9
- previousState.push({ key, value });
10
- }
11
- }
12
- }
13
- function useFormChanges(form, callback) {
14
- useListen(form, 'change', () => {
15
- if (form.current) {
16
- const entries = new FormData(form.current).entries();
17
- const currentState = [];
18
- for (const [key, value] of entries) {
19
- currentState.push({ key, value });
20
- }
21
- const additions = currentState.filter((itemA) => !previousState.find((itemB) => itemB.key === itemA.key && itemB.value === itemA.value));
22
- const deletions = previousState.filter((itemA) => !currentState.find((itemB) => itemB.key === itemA.key && itemB.value === itemA.value));
23
- setPreviousState(form);
24
- callback({ additions, deletions });
25
- }
26
- });
27
- }
28
-
29
- export { useFormChanges };
30
- //# sourceMappingURL=use-form-changes.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"use-form-changes.js","sources":["../../../src/hooks/use-form-changes.ts"],"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"],"names":[],"mappings":";;AAYA,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;SAEe,cAAc,CAC1B,IAAyC,EACzC,QAAgE;IAEhE,SAAS,CAAC,IAAI,EAAE,QAAQ,EAAE;QACtB,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,KACF,CAAC,aAAa,CAAC,IAAI,CACf,CAAC,KAAK,KAAK,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,KACF,CAAC,YAAY,CAAC,IAAI,CACd,CAAC,KAAK,KAAK,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;KACJ,CAAC,CAAC;AACP;;;;"}
@@ -1,15 +0,0 @@
1
- const useHistory = () => {
2
- function pushHistory(url) {
3
- window.history.pushState({}, document.title, url);
4
- }
5
- function replaceHistory(url) {
6
- window.history.replaceState({}, document.title, url);
7
- }
8
- return {
9
- push: pushHistory,
10
- replace: replaceHistory,
11
- };
12
- };
13
-
14
- export { useHistory };
15
- //# sourceMappingURL=use-history.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"use-history.js","sources":["../../../src/hooks/use-history.ts"],"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"],"names":[],"mappings":"MAAa,UAAU,GAAG;IACtB,SAAS,WAAW,CAAC,GAAW;QAC5B,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,EAAE,QAAQ,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;KACrD;IAED,SAAS,cAAc,CAAC,GAAW;QAC/B,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE,EAAE,QAAQ,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;KACxD;IAED,OAAO;QACH,IAAI,EAAE,WAAW;QACjB,OAAO,EAAE,cAAc;KAC1B,CAAC;AACN;;;;"}
@@ -1,14 +0,0 @@
1
- import { useRef, useListen, useWatch } from '@atomify/hooks';
2
-
3
- const useUsingKeyboard = ({ defaultUsingKeyboard = false, className = 'using-keyboard', }) => {
4
- const usingKeyboard = useRef(defaultUsingKeyboard);
5
- useListen({ current: document.body }, 'mousedown', () => (usingKeyboard.current = false));
6
- useListen({ current: document.body }, 'keydown', () => (usingKeyboard.current = true));
7
- useWatch(() => {
8
- const action = usingKeyboard.current ? 'add' : 'remove';
9
- document.body.classList[action](className);
10
- });
11
- };
12
-
13
- export { useUsingKeyboard };
14
- //# sourceMappingURL=use-keyboard-focus.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"use-keyboard-focus.js","sources":["../../../src/hooks/use-keyboard-focus.ts"],"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"],"names":[],"mappings":";;MAMa,gBAAgB,GAAG,CAAC,EAC7B,oBAAoB,GAAG,KAAK,EAC5B,SAAS,GAAG,gBAAgB,GACX;IACjB,MAAM,aAAa,GAAG,MAAM,CAAC,oBAAoB,CAAC,CAAC;IAEnD,SAAS,CAAC,EAAE,OAAO,EAAE,QAAQ,CAAC,IAAI,EAAE,EAAE,WAAW,EAAE,OAAO,aAAa,CAAC,OAAO,GAAG,KAAK,CAAC,CAAC,CAAC;IAC1F,SAAS,CAAC,EAAE,OAAO,EAAE,QAAQ,CAAC,IAAI,EAAE,EAAE,SAAS,EAAE,OAAO,aAAa,CAAC,OAAO,GAAG,IAAI,CAAC,CAAC,CAAC;IAEvF,QAAQ,CAAC;QACL,MAAM,MAAM,GAAG,aAAa,CAAC,OAAO,GAAG,KAAK,GAAG,QAAQ,CAAC;QACxD,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,CAAC;KAC9C,CAAC,CAAC;AACP;;;;"}
@@ -1,47 +0,0 @@
1
- import { useRef, useElement } from '@atomify/hooks';
2
-
3
- const LAZY_HOOKS = {
4
- LAZY_LOADING_HOOK: 'data-lazy-loading',
5
- LAZY_ERROR_HOOK: 'data-lazy-error',
6
- LAZY_SUCCESS_HOOK: 'data-lazy-success',
7
- };
8
- const LAZY_STATES = {
9
- ERROR: 'error',
10
- LOADING: 'loading',
11
- SUCCESS: 'success',
12
- };
13
- const useLazy = ({ fetcher, loadingResult, errorResult, successResult, }) => {
14
- const LazyResult = useRef(loadingResult);
15
- const lazyLoadingResult = useElement(`[${LAZY_HOOKS.LAZY_LOADING_HOOK}]`);
16
- const lazyErrorResult = useElement(`${[LAZY_HOOKS.LAZY_ERROR_HOOK]}`);
17
- const lazySuccessResult = useElement(`${[LAZY_HOOKS.LAZY_SUCCESS_HOOK]}`);
18
- const response = useRef(null);
19
- const state = useRef(LAZY_STATES.LOADING);
20
- async function initFetcher() {
21
- const activeChild = lazyLoadingResult.current ||
22
- lazySuccessResult.current ||
23
- lazyErrorResult.current ||
24
- false;
25
- if (state.current !== LAZY_STATES.LOADING) {
26
- state.current = LAZY_STATES.LOADING;
27
- }
28
- try {
29
- const data = await fetcher();
30
- response.current = data;
31
- if (activeChild && activeChild.parentNode) {
32
- activeChild.parentNode.replaceChild(successResult(data), activeChild);
33
- }
34
- state.current = LAZY_STATES.SUCCESS;
35
- }
36
- catch (error) {
37
- if (activeChild && activeChild.parentNode) {
38
- activeChild.parentNode.replaceChild(errorResult(), activeChild);
39
- }
40
- state.current = LAZY_STATES.ERROR;
41
- }
42
- }
43
- return [LazyResult.current, initFetcher, response, state];
44
- };
45
-
46
- export { LAZY_HOOKS, LAZY_STATES, useLazy };
47
- //# sourceMappingURL=use-lazy.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"use-lazy.js","sources":["../../../src/hooks/use-lazy.ts"],"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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,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;KACJ;IAED,OAAO,CAAC,UAAU,CAAC,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAC;AAC9D;;;;"}
@@ -1,16 +0,0 @@
1
- const useMapStorage = () => {
2
- const mapStorage = new Map();
3
- const setItem = (key, value) => mapStorage.set(key, value);
4
- const getItem = (key) => mapStorage.get(key);
5
- const hasItem = (key) => mapStorage.has(key);
6
- const deleteItem = (key) => mapStorage.delete(key);
7
- return {
8
- setItem,
9
- getItem,
10
- hasItem,
11
- deleteItem,
12
- };
13
- };
14
-
15
- export { useMapStorage };
16
- //# sourceMappingURL=use-map-storage.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"use-map-storage.js","sources":["../../../src/hooks/use-map-storage.ts"],"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"],"names":[],"mappings":"MAAa,aAAa,GAAG;IACzB,MAAM,UAAU,GAAG,IAAI,GAAG,EAAQ,CAAC;IAEnC,MAAM,OAAO,GAAG,CAAC,GAAM,EAAE,KAAQ,KAAK,UAAU,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;IAEjE,MAAM,OAAO,GAAG,CAAC,GAAM,KAAK,UAAU,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAEhD,MAAM,OAAO,GAAG,CAAC,GAAM,KAAK,UAAU,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAEhD,MAAM,UAAU,GAAG,CAAC,GAAM,KAAK,UAAU,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IAEtD,OAAO;QACH,OAAO;QACP,OAAO;QACP,OAAO;QACP,UAAU;KACb,CAAC;AACN;;;;"}
@@ -1,23 +0,0 @@
1
- import { useRef, useListen } from '@atomify/hooks';
2
- import { rafThrottle } from '../raf-throttle.js';
3
-
4
- const useScrollPosition = (callback, useWindow) => {
5
- const position = useRef(getScrollPosition(useWindow));
6
- function setScrollPosition() {
7
- const currentPosition = getScrollPosition(useWindow);
8
- callback({ prevPosition: position.current, currentPosition });
9
- position.current = currentPosition;
10
- }
11
- const throttle = rafThrottle(setScrollPosition);
12
- useListen(window, 'scroll', throttle);
13
- };
14
- function getScrollPosition(useWindow) {
15
- const target = document.body;
16
- const position = target.getBoundingClientRect();
17
- return useWindow
18
- ? { x: window.scrollX, y: window.scrollY }
19
- : { x: position.left, y: position.top };
20
- }
21
-
22
- export { useScrollPosition };
23
- //# sourceMappingURL=use-scroll-position.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"use-scroll-position.js","sources":["../../../src/hooks/use-scroll-position.ts"],"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"],"names":[],"mappings":";;;MAsBa,iBAAiB,GAAG,CAC7B,QAAqE,EACrE,SAAmB;IAEnB,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;KACtC;IAED,MAAM,QAAQ,GAAG,WAAW,CAAC,iBAAiB,CAAC,CAAC;IAEhD,SAAS,CAAC,MAAM,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;AAC1C,EAAE;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;UACV,EAAE,CAAC,EAAE,MAAM,CAAC,OAAO,EAAE,CAAC,EAAE,MAAM,CAAC,OAAO,EAAE;UACxC,EAAE,CAAC,EAAE,QAAQ,CAAC,IAAI,EAAE,CAAC,EAAE,QAAQ,CAAC,GAAG,EAAE,CAAC;AAChD;;;;"}
@@ -1,66 +0,0 @@
1
- const ST_DURATION = 500;
2
- const ST_OFFSET = 50;
3
- const useScrollTo = (options = {}) => {
4
- function to(target) {
5
- const scrollConfig = {
6
- position: target.getBoundingClientRect(),
7
- offset: options.offset || ST_OFFSET,
8
- duration: options.duration || ST_DURATION,
9
- scrollElement: options.scrollElement || null,
10
- delay: options.delay || 0,
11
- };
12
- return scrollTo(scrollConfig);
13
- }
14
- return to;
15
- };
16
- function scrollTo({ position, offset, duration, scrollElement, delay, }) {
17
- return new Promise(resolve => {
18
- const scrollPosition = window.scrollY === undefined ? window.pageYOffset : window.scrollY;
19
- const to = parseInt((position.top + scrollPosition - offset).toFixed(0), 10);
20
- const start = scrollElement
21
- ? scrollElement.scrollTop
22
- : Math.max(document.body.scrollTop, document.documentElement.scrollTop);
23
- const change = to - start;
24
- let currentTime = 0;
25
- const increment = 10;
26
- const direction = to > start ? 1 : 0;
27
- let timeout;
28
- const animate = () => {
29
- currentTime += increment;
30
- const val = parseInt(easeInOutQuad(currentTime, start, change, duration).toFixed(0), 10);
31
- if (scrollElement) {
32
- scrollElement.scrollTop = val;
33
- }
34
- else {
35
- document.body.scrollTop = val;
36
- document.documentElement.scrollTop = val;
37
- }
38
- if ((val >= to && direction === 1) || (val <= to && direction === 0)) {
39
- resolve();
40
- }
41
- else {
42
- requestAnimationFrame(animate);
43
- }
44
- };
45
- if (delay > 0) {
46
- timeout = setTimeout(() => {
47
- animate();
48
- clearTimeout(timeout);
49
- }, delay);
50
- }
51
- else {
52
- animate();
53
- }
54
- });
55
- }
56
- function easeInOutQuad(t, b, c, d) {
57
- t /= d / 2;
58
- if (t < 1) {
59
- return (c / 2) * t * t + b;
60
- }
61
- t--;
62
- return (-c / 2) * (t * (t - 2) - 1) + b;
63
- }
64
-
65
- export { useScrollTo };
66
- //# sourceMappingURL=use-scroll-to.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"use-scroll-to.js","sources":["../../../src/hooks/use-scroll-to.ts"],"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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CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;AAC5C;;;;"}
@@ -1,8 +0,0 @@
1
- import { useStyles, unsafeCSS } from '@atomify/hooks';
2
-
3
- function useStylesheet(style) {
4
- useStyles(() => unsafeCSS(style));
5
- }
6
-
7
- export { useStylesheet };
8
- //# sourceMappingURL=use-stylesheet.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"use-stylesheet.js","sources":["../../../src/hooks/use-stylesheet.ts"],"sourcesContent":["import { unsafeCSS, useStyles } from '@atomify/hooks';\n/**\n * Add styling through imported css files (Webpack)\n * @export\n * @param {string} style\n */\nexport function useStylesheet(style: string) {\n useStyles(() => unsafeCSS(style));\n}\n"],"names":[],"mappings":";;SAMgB,aAAa,CAAC,KAAa;IACvC,SAAS,CAAC,MAAM,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC;AACtC;;;;"}
@@ -1,31 +0,0 @@
1
- import QueryString from 'query-string';
2
- import { useHistory } from './use-history.js';
3
-
4
- const useUrlParams = () => {
5
- function pushParams(param, value) {
6
- const { push } = useHistory();
7
- const url = window.location.href.split('?');
8
- const parsed = QueryString.parse(location.search);
9
- parsed[param] = value;
10
- const stringified = QueryString.stringify(parsed);
11
- const pageUrl = `${url[0]}?${stringified}`;
12
- push(pageUrl);
13
- }
14
- function getParams(param) {
15
- const parsed = QueryString.parse(location.search);
16
- return parsed[param];
17
- }
18
- function clearParams() {
19
- const { push } = useHistory();
20
- const url = window.location.href.split('?');
21
- push(url[0]);
22
- }
23
- return {
24
- push: pushParams,
25
- get: getParams,
26
- clear: clearParams,
27
- };
28
- };
29
-
30
- export { useUrlParams };
31
- //# sourceMappingURL=use-url-params.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"use-url-params.js","sources":["../../../src/hooks/use-url-params.ts"],"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"],"names":[],"mappings":";;;MAIa,YAAY,GAAG;IACxB,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;KACjB;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;KACxB;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;KAChB;IAED,OAAO;QACH,IAAI,EAAE,UAAU;QAChB,GAAG,EAAE,SAAS;QACd,KAAK,EAAE,WAAW;KACrB,CAAC;AACN;;;;"}