@bpd-library/utilities 1.3.2-beta.12 → 1.3.2-beta.13
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.
- package/package.json +3 -3
- package/dist/api-utilities/compose-exclude-string.d.ts +0 -3
- package/dist/api-utilities/compose-exclude-string.js +0 -5
- package/dist/api-utilities/compose-exclude-string.js.map +0 -1
- package/dist/esm/api/http.js +0 -120
- package/dist/esm/api/http.js.map +0 -1
- package/dist/esm/api/index.js +0 -11
- package/dist/esm/api/index.js.map +0 -1
- package/dist/esm/api-utilities/compose-exclude-string.js +0 -6
- package/dist/esm/api-utilities/compose-exclude-string.js.map +0 -1
- package/dist/esm/api-utilities/decimal-range/merge-decimal-range.js +0 -13
- package/dist/esm/api-utilities/decimal-range/merge-decimal-range.js.map +0 -1
- package/dist/esm/api-utilities/decimal-range/merge-specification-range.js +0 -29
- package/dist/esm/api-utilities/decimal-range/merge-specification-range.js.map +0 -1
- package/dist/esm/api-utilities/district-status.js +0 -14
- package/dist/esm/api-utilities/district-status.js.map +0 -1
- package/dist/esm/api-utilities/find-filter.js +0 -41
- package/dist/esm/api-utilities/find-filter.js.map +0 -1
- package/dist/esm/api-utilities/get/coordinates.js +0 -31
- package/dist/esm/api-utilities/get/coordinates.js.map +0 -1
- package/dist/esm/api-utilities/get/layer-raster.js +0 -4
- package/dist/esm/api-utilities/get/layer-raster.js.map +0 -1
- package/dist/esm/api-utilities/show-mortgage-price.js +0 -11
- package/dist/esm/api-utilities/show-mortgage-price.js.map +0 -1
- package/dist/esm/api-utilities/show-price.js +0 -13
- package/dist/esm/api-utilities/show-price.js.map +0 -1
- package/dist/esm/constants/index.js +0 -7
- package/dist/esm/constants/index.js.map +0 -1
- package/dist/esm/date.js +0 -11
- package/dist/esm/date.js.map +0 -1
- package/dist/esm/debounce.js +0 -25
- package/dist/esm/debounce.js.map +0 -1
- package/dist/esm/dom/dom.js +0 -9
- package/dist/esm/dom/dom.js.map +0 -1
- package/dist/esm/environment.js +0 -27
- package/dist/esm/environment.js.map +0 -1
- package/dist/esm/extended-api-models/excluded-properties.js +0 -36
- package/dist/esm/extended-api-models/excluded-properties.js.map +0 -1
- package/dist/esm/extended-api-models/extended-area-projects.js +0 -12
- package/dist/esm/extended-api-models/extended-area-projects.js.map +0 -1
- package/dist/esm/extended-api-models/extended-area.js +0 -182
- package/dist/esm/extended-api-models/extended-area.js.map +0 -1
- package/dist/esm/extended-api-models/status/apartment-building-status.js +0 -60
- package/dist/esm/extended-api-models/status/apartment-building-status.js.map +0 -1
- package/dist/esm/extended-api-models/status/construction-number-status.js +0 -20
- package/dist/esm/extended-api-models/status/construction-number-status.js.map +0 -1
- package/dist/esm/extended-api-models/status/property-type-status.js +0 -60
- package/dist/esm/extended-api-models/status/property-type-status.js.map +0 -1
- package/dist/esm/extended-api-models/utilities/apartment-building-view.js +0 -5
- package/dist/esm/extended-api-models/utilities/apartment-building-view.js.map +0 -1
- package/dist/esm/extended-api-models/utilities/extended-model-price-range.js +0 -37
- package/dist/esm/extended-api-models/utilities/extended-model-price-range.js.map +0 -1
- package/dist/esm/extended-api-models/utilities/find-extended-object.js +0 -23
- package/dist/esm/extended-api-models/utilities/find-extended-object.js.map +0 -1
- package/dist/esm/extended-api-models/utilities/is-apartment.js +0 -14
- package/dist/esm/extended-api-models/utilities/is-apartment.js.map +0 -1
- package/dist/esm/function-is-true.js +0 -13
- package/dist/esm/function-is-true.js.map +0 -1
- package/dist/esm/generated/bpd-client.js +0 -53
- package/dist/esm/generated/bpd-client.js.map +0 -1
- package/dist/esm/geometry/country-bounding-box.js +0 -14
- package/dist/esm/geometry/country-bounding-box.js.map +0 -1
- package/dist/esm/geometry/geometry.js +0 -65
- package/dist/esm/geometry/geometry.js.map +0 -1
- package/dist/esm/hooks/use-click-outside.js +0 -34
- package/dist/esm/hooks/use-click-outside.js.map +0 -1
- package/dist/esm/hooks/use-form-changes.js +0 -30
- package/dist/esm/hooks/use-form-changes.js.map +0 -1
- package/dist/esm/hooks/use-history.js +0 -15
- package/dist/esm/hooks/use-history.js.map +0 -1
- package/dist/esm/hooks/use-keyboard-focus.js +0 -14
- package/dist/esm/hooks/use-keyboard-focus.js.map +0 -1
- package/dist/esm/hooks/use-lazy.js +0 -47
- package/dist/esm/hooks/use-lazy.js.map +0 -1
- package/dist/esm/hooks/use-map-storage.js +0 -16
- package/dist/esm/hooks/use-map-storage.js.map +0 -1
- package/dist/esm/hooks/use-scroll-position.js +0 -23
- package/dist/esm/hooks/use-scroll-position.js.map +0 -1
- package/dist/esm/hooks/use-scroll-to.js +0 -66
- package/dist/esm/hooks/use-scroll-to.js.map +0 -1
- package/dist/esm/hooks/use-stylesheet.js +0 -8
- package/dist/esm/hooks/use-stylesheet.js.map +0 -1
- package/dist/esm/hooks/use-url-params.js +0 -31
- package/dist/esm/hooks/use-url-params.js.map +0 -1
- package/dist/esm/index.js +0 -40
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/is-touch.js +0 -32
- package/dist/esm/is-touch.js.map +0 -1
- package/dist/esm/media-query/breakpoints.js +0 -29
- package/dist/esm/media-query/breakpoints.js.map +0 -1
- package/dist/esm/media-query/media-query.js +0 -39
- package/dist/esm/media-query/media-query.js.map +0 -1
- package/dist/esm/media-query/utils/index.js +0 -35
- package/dist/esm/media-query/utils/index.js.map +0 -1
- package/dist/esm/raf-throttle.js +0 -24
- package/dist/esm/raf-throttle.js.map +0 -1
- package/dist/esm/throttle.js +0 -23
- package/dist/esm/throttle.js.map +0 -1
- package/dist/esm/to-currency.js +0 -26
- package/dist/esm/to-currency.js.map +0 -1
- package/dist/extended-api-models/excluded-properties.d.ts +0 -5
- package/dist/extended-api-models/excluded-properties.js +0 -35
- package/dist/extended-api-models/excluded-properties.js.map +0 -1
- package/dist/hooks/use-form-changes.d.ts +0 -12
- package/dist/hooks/use-form-changes.js +0 -27
- package/dist/hooks/use-form-changes.js.map +0 -1
- package/dist/hooks/use-stylesheet.d.ts +0 -1
- package/dist/hooks/use-stylesheet.js +0 -5
- package/dist/hooks/use-stylesheet.js.map +0 -1
- package/dist/lib/api/http.js +0 -117
- package/dist/lib/api/http.js.map +0 -1
- package/dist/lib/api/index.js +0 -8
- package/dist/lib/api/index.js.map +0 -1
- package/dist/lib/api-utilities/api-utilities.js +0 -9
- package/dist/lib/api-utilities/api-utilities.js.map +0 -1
- package/dist/lib/api-utilities/api-utilities.test.js +0 -122
- package/dist/lib/api-utilities/api-utilities.test.js.map +0 -1
- package/dist/lib/api-utilities/api-utilities.types.js +0 -1
- package/dist/lib/api-utilities/api-utilities.types.js.map +0 -1
- package/dist/lib/api-utilities/compose-exclude-string.js +0 -5
- package/dist/lib/api-utilities/compose-exclude-string.js.map +0 -1
- package/dist/lib/api-utilities/decimal-range/merge-decimal-range.js +0 -12
- package/dist/lib/api-utilities/decimal-range/merge-decimal-range.js.map +0 -1
- package/dist/lib/api-utilities/decimal-range/merge-specification-range.js +0 -27
- package/dist/lib/api-utilities/decimal-range/merge-specification-range.js.map +0 -1
- package/dist/lib/api-utilities/district-status.js +0 -13
- package/dist/lib/api-utilities/district-status.js.map +0 -1
- package/dist/lib/api-utilities/find-filter.js +0 -40
- package/dist/lib/api-utilities/find-filter.js.map +0 -1
- package/dist/lib/api-utilities/get/coordinates.js +0 -29
- package/dist/lib/api-utilities/get/coordinates.js.map +0 -1
- package/dist/lib/api-utilities/get/layer-raster.js +0 -3
- package/dist/lib/api-utilities/get/layer-raster.js.map +0 -1
- package/dist/lib/api-utilities/index.js +0 -2
- package/dist/lib/api-utilities/index.js.map +0 -1
- package/dist/lib/api-utilities/show-mortgage-price.js +0 -10
- package/dist/lib/api-utilities/show-mortgage-price.js.map +0 -1
- package/dist/lib/api-utilities/show-price.js +0 -12
- package/dist/lib/api-utilities/show-price.js.map +0 -1
- package/dist/lib/constants/index.js +0 -5
- package/dist/lib/constants/index.js.map +0 -1
- package/dist/lib/date.js +0 -10
- package/dist/lib/date.js.map +0 -1
- package/dist/lib/debounce.js +0 -23
- package/dist/lib/debounce.js.map +0 -1
- package/dist/lib/dom/dom.js +0 -7
- package/dist/lib/dom/dom.js.map +0 -1
- package/dist/lib/dom/index.js +0 -2
- package/dist/lib/dom/index.js.map +0 -1
- package/dist/lib/environment.js +0 -25
- package/dist/lib/environment.js.map +0 -1
- package/dist/lib/extended-api-models/excluded-properties.js +0 -35
- package/dist/lib/extended-api-models/excluded-properties.js.map +0 -1
- package/dist/lib/extended-api-models/extended-area-projects.js +0 -10
- package/dist/lib/extended-api-models/extended-area-projects.js.map +0 -1
- package/dist/lib/extended-api-models/extended-area.js +0 -179
- package/dist/lib/extended-api-models/extended-area.js.map +0 -1
- package/dist/lib/extended-api-models/index.js +0 -7
- package/dist/lib/extended-api-models/index.js.map +0 -1
- package/dist/lib/extended-api-models/status/apartment-building-status.js +0 -58
- package/dist/lib/extended-api-models/status/apartment-building-status.js.map +0 -1
- package/dist/lib/extended-api-models/status/construction-number-status.js +0 -19
- package/dist/lib/extended-api-models/status/construction-number-status.js.map +0 -1
- package/dist/lib/extended-api-models/status/property-type-status.js +0 -58
- package/dist/lib/extended-api-models/status/property-type-status.js.map +0 -1
- package/dist/lib/extended-api-models/utilities/apartment-building-view.js +0 -4
- package/dist/lib/extended-api-models/utilities/apartment-building-view.js.map +0 -1
- package/dist/lib/extended-api-models/utilities/extended-model-price-range.js +0 -35
- package/dist/lib/extended-api-models/utilities/extended-model-price-range.js.map +0 -1
- package/dist/lib/extended-api-models/utilities/find-extended-object.js +0 -21
- package/dist/lib/extended-api-models/utilities/find-extended-object.js.map +0 -1
- package/dist/lib/extended-api-models/utilities/is-apartment.js +0 -13
- package/dist/lib/extended-api-models/utilities/is-apartment.js.map +0 -1
- package/dist/lib/function-is-true.js +0 -11
- package/dist/lib/function-is-true.js.map +0 -1
- package/dist/lib/generated/bpd-client.js +0 -50
- package/dist/lib/generated/bpd-client.js.map +0 -1
- package/dist/lib/generated/index.js +0 -2
- package/dist/lib/generated/index.js.map +0 -1
- package/dist/lib/geometry/country-bounding-box.js +0 -12
- package/dist/lib/geometry/country-bounding-box.js.map +0 -1
- package/dist/lib/geometry/geometry.js +0 -64
- package/dist/lib/geometry/geometry.js.map +0 -1
- package/dist/lib/geometry/geometry.test.js +0 -87
- package/dist/lib/geometry/geometry.test.js.map +0 -1
- package/dist/lib/geometry/index.js +0 -3
- package/dist/lib/geometry/index.js.map +0 -1
- package/dist/lib/hooks/index.js +0 -11
- package/dist/lib/hooks/index.js.map +0 -1
- package/dist/lib/hooks/use-click-outside.js +0 -32
- package/dist/lib/hooks/use-click-outside.js.map +0 -1
- package/dist/lib/hooks/use-delegate-listen.js +0 -10
- package/dist/lib/hooks/use-delegate-listen.js.map +0 -1
- package/dist/lib/hooks/use-form-changes.js +0 -27
- package/dist/lib/hooks/use-form-changes.js.map +0 -1
- package/dist/lib/hooks/use-history.js +0 -13
- package/dist/lib/hooks/use-history.js.map +0 -1
- package/dist/lib/hooks/use-input.js +0 -28
- package/dist/lib/hooks/use-input.js.map +0 -1
- package/dist/lib/hooks/use-keyboard-focus.js +0 -11
- package/dist/lib/hooks/use-keyboard-focus.js.map +0 -1
- package/dist/lib/hooks/use-lazy.js +0 -44
- package/dist/lib/hooks/use-lazy.js.map +0 -1
- package/dist/lib/hooks/use-map-storage.js +0 -14
- package/dist/lib/hooks/use-map-storage.js.map +0 -1
- package/dist/lib/hooks/use-scroll-position.js +0 -20
- package/dist/lib/hooks/use-scroll-position.js.map +0 -1
- package/dist/lib/hooks/use-scroll-to.js +0 -64
- package/dist/lib/hooks/use-scroll-to.js.map +0 -1
- package/dist/lib/hooks/use-stylesheet.js +0 -5
- package/dist/lib/hooks/use-stylesheet.js.map +0 -1
- package/dist/lib/hooks/use-text.js +0 -16
- package/dist/lib/hooks/use-text.js.map +0 -1
- package/dist/lib/hooks/use-url-params.js +0 -28
- package/dist/lib/hooks/use-url-params.js.map +0 -1
- package/dist/lib/index.js +0 -18
- package/dist/lib/index.js.map +0 -1
- package/dist/lib/is-touch.js +0 -30
- package/dist/lib/is-touch.js.map +0 -1
- package/dist/lib/media-query/breakpoints.js +0 -27
- package/dist/lib/media-query/breakpoints.js.map +0 -1
- package/dist/lib/media-query/index.js +0 -2
- package/dist/lib/media-query/index.js.map +0 -1
- package/dist/lib/media-query/media-query.js +0 -36
- package/dist/lib/media-query/media-query.js.map +0 -1
- package/dist/lib/media-query/media-query.types.js +0 -1
- package/dist/lib/media-query/media-query.types.js.map +0 -1
- package/dist/lib/media-query/utils/index.js +0 -32
- package/dist/lib/media-query/utils/index.js.map +0 -1
- package/dist/lib/raf-throttle.js +0 -22
- package/dist/lib/raf-throttle.js.map +0 -1
- package/dist/lib/throttle.js +0 -22
- package/dist/lib/throttle.js.map +0 -1
- package/dist/lib/to-currency.js +0 -24
- package/dist/lib/to-currency.js.map +0 -1
- package/dist/types/api/http.d.ts +0 -47
- package/dist/types/api/index.d.ts +0 -2
- package/dist/types/api-utilities/api-utilities.d.ts +0 -8
- package/dist/types/api-utilities/api-utilities.test.d.ts +0 -1
- package/dist/types/api-utilities/api-utilities.types.d.ts +0 -46
- package/dist/types/api-utilities/compose-exclude-string.d.ts +0 -3
- package/dist/types/api-utilities/decimal-range/merge-decimal-range.d.ts +0 -3
- package/dist/types/api-utilities/decimal-range/merge-specification-range.d.ts +0 -13
- package/dist/types/api-utilities/district-status.d.ts +0 -3
- package/dist/types/api-utilities/find-filter.d.ts +0 -32
- package/dist/types/api-utilities/get/coordinates.d.ts +0 -6
- package/dist/types/api-utilities/get/layer-raster.d.ts +0 -3
- package/dist/types/api-utilities/index.d.ts +0 -1
- package/dist/types/api-utilities/show-mortgage-price.d.ts +0 -3
- package/dist/types/api-utilities/show-price.d.ts +0 -7
- package/dist/types/constants/index.d.ts +0 -4
- package/dist/types/date.d.ts +0 -3
- package/dist/types/debounce.d.ts +0 -5
- package/dist/types/dom/dom.d.ts +0 -6
- package/dist/types/dom/index.d.ts +0 -1
- package/dist/types/environment.d.ts +0 -9
- package/dist/types/extended-api-models/excluded-properties.d.ts +0 -5
- package/dist/types/extended-api-models/extended-area-projects.d.ts +0 -3
- package/dist/types/extended-api-models/extended-area.d.ts +0 -13
- package/dist/types/extended-api-models/index.d.ts +0 -6
- package/dist/types/extended-api-models/status/apartment-building-status.d.ts +0 -3
- package/dist/types/extended-api-models/status/construction-number-status.d.ts +0 -3
- package/dist/types/extended-api-models/status/property-type-status.d.ts +0 -4
- package/dist/types/extended-api-models/utilities/apartment-building-view.d.ts +0 -4
- package/dist/types/extended-api-models/utilities/extended-model-price-range.d.ts +0 -4
- package/dist/types/extended-api-models/utilities/find-extended-object.d.ts +0 -4
- package/dist/types/extended-api-models/utilities/is-apartment.d.ts +0 -11
- package/dist/types/function-is-true.d.ts +0 -1
- package/dist/types/generated/bpd-client.d.ts +0 -808
- package/dist/types/generated/index.d.ts +0 -1
- package/dist/types/geometry/country-bounding-box.d.ts +0 -6
- package/dist/types/geometry/geometry.d.ts +0 -11
- package/dist/types/geometry/geometry.test.d.ts +0 -8
- package/dist/types/geometry/index.d.ts +0 -2
- package/dist/types/hooks/index.d.ts +0 -10
- package/dist/types/hooks/use-click-outside.d.ts +0 -6
- package/dist/types/hooks/use-delegate-listen.d.ts +0 -6
- package/dist/types/hooks/use-form-changes.d.ts +0 -12
- package/dist/types/hooks/use-history.d.ts +0 -4
- package/dist/types/hooks/use-input.d.ts +0 -41
- package/dist/types/hooks/use-keyboard-focus.d.ts +0 -6
- package/dist/types/hooks/use-lazy.d.ts +0 -21
- package/dist/types/hooks/use-map-storage.d.ts +0 -6
- package/dist/types/hooks/use-scroll-position.d.ts +0 -10
- package/dist/types/hooks/use-scroll-to.d.ts +0 -8
- package/dist/types/hooks/use-stylesheet.d.ts +0 -1
- package/dist/types/hooks/use-text.d.ts +0 -1
- package/dist/types/hooks/use-url-params.d.ts +0 -5
- package/dist/types/index.d.ts +0 -17
- package/dist/types/is-touch.d.ts +0 -8
- package/dist/types/media-query/breakpoints.d.ts +0 -26
- package/dist/types/media-query/index.d.ts +0 -1
- package/dist/types/media-query/media-query.d.ts +0 -13
- package/dist/types/media-query/media-query.types.d.ts +0 -14
- package/dist/types/media-query/utils/index.d.ts +0 -3
- package/dist/types/raf-throttle.d.ts +0 -4
- package/dist/types/throttle.d.ts +0 -2
- package/dist/types/to-currency.d.ts +0 -3
|
@@ -1 +0,0 @@
|
|
|
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,IAAI,CAC3F,CAAC,GAAG,EAAE,E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M,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"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/generated/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC","sourcesContent":["export * from './bpd-client';\n"]}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { mergeBoundingBoxes } from './geometry';
|
|
2
|
-
const COUNTRY_BBOX = {
|
|
3
|
-
nl: [3.33390071158434, 50.7503661060614, 7.22749998189678, 53.6436329908026],
|
|
4
|
-
de: [5.98865807458, 47.3024876979, 15.0169958839, 54.983104153],
|
|
5
|
-
};
|
|
6
|
-
const getCountryBoundingBox = (countryIsoCodes) => {
|
|
7
|
-
const boundingBoxes = countryIsoCodes === null || countryIsoCodes === void 0 ? void 0 : countryIsoCodes.map((countryIsoCode) => COUNTRY_BBOX[countryIsoCode]).filter((bbox) => !!bbox);
|
|
8
|
-
const mergedBoundingBox = mergeBoundingBoxes(boundingBoxes);
|
|
9
|
-
return mergedBoundingBox;
|
|
10
|
-
};
|
|
11
|
-
export { COUNTRY_BBOX, getCountryBoundingBox };
|
|
12
|
-
//# sourceMappingURL=country-bounding-box.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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,64 +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
|
-
export { calculateBoundingBox, calculateBoundingBoxCenter, calculateCenter, calculateDistance, calculateMapDataBoundingBox, calculateMapDataCenter, withinBoundingBox, expandBoundingBox, mergeBoundingBoxes, };
|
|
64
|
-
//# sourceMappingURL=geometry.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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,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;IACxC,CAAC,CAAC,CAAC;IAEH,OAAO,CAAC,IAAI,IAAI,CAAC,EAAE,IAAI,IAAI,CAAC,EAAE,IAAI,IAAI,CAAC,EAAE,IAAI,IAAI,CAAC,CAAC,CAAC;AACxD,CAAC,CAAC;AAEF,MAAM,wBAAwB,GAAG,CAAC,OAAgB,EAAe,EAAE,CAC/D,OAAO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C,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,CAAC,CAAC;AAEF,MAAM,iBAAiB,GAAG,CAAC,MAAwB,EAAE,MAAwB,EAAU,EAAE;IACrF,MAAM,SAAS,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;IAC/C,MAAM,SAAS,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;IAE/C,OAAO,IAAI,CAAC,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC,CAAC;AAC5C,CAAC,CAAC;AAEF,OAAO,EACH,oBAAoB,EACpB,0BAA0B,EAC1B,eAAe,EACf,iBAAiB,EACjB,2BAA2B,EAC3B,sBAAsB,EACtB,iBAAiB,EACjB,iBAAiB,EACjB,kBAAkB,GACrB,CAAC","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"]}
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
import { calculateBoundingBox, calculateBoundingBoxCenter, calculateCenter, calculateDistance, calculateMapDataCenter, expandBoundingBox, withinBoundingBox, } from './geometry';
|
|
2
|
-
export const TEST_GEOMETRY = {
|
|
3
|
-
coordinates: [
|
|
4
|
-
[
|
|
5
|
-
[1, 2],
|
|
6
|
-
[3, 4],
|
|
7
|
-
[1.5, 2.5],
|
|
8
|
-
],
|
|
9
|
-
[
|
|
10
|
-
[1, 2],
|
|
11
|
-
[3, 4],
|
|
12
|
-
[1.5, 2.5],
|
|
13
|
-
],
|
|
14
|
-
],
|
|
15
|
-
boundingBox: [1, 2, 3, 4],
|
|
16
|
-
center: [2, 3],
|
|
17
|
-
apiGeometry: [
|
|
18
|
-
{
|
|
19
|
-
coordinates: [
|
|
20
|
-
[1, 2],
|
|
21
|
-
[3, 4],
|
|
22
|
-
[1.5, 2.5],
|
|
23
|
-
],
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
coordinates: [
|
|
27
|
-
[1, 2],
|
|
28
|
-
[3, 4],
|
|
29
|
-
[1.5, 2.5],
|
|
30
|
-
],
|
|
31
|
-
},
|
|
32
|
-
],
|
|
33
|
-
};
|
|
34
|
-
const MAP_DATA = [
|
|
35
|
-
{
|
|
36
|
-
id: '1',
|
|
37
|
-
coordinates: TEST_GEOMETRY.coordinates,
|
|
38
|
-
variant: 'default',
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
id: '2',
|
|
42
|
-
coordinates: [
|
|
43
|
-
[
|
|
44
|
-
[5, 6],
|
|
45
|
-
[5, 1],
|
|
46
|
-
],
|
|
47
|
-
[
|
|
48
|
-
[1, 2],
|
|
49
|
-
[8, 9],
|
|
50
|
-
],
|
|
51
|
-
],
|
|
52
|
-
variant: 'default',
|
|
53
|
-
},
|
|
54
|
-
];
|
|
55
|
-
describe('Geometry', function () {
|
|
56
|
-
it('Calculates the correct coordinates boundingBox', function () {
|
|
57
|
-
expect(calculateBoundingBox(TEST_GEOMETRY.coordinates)).toEqual(TEST_GEOMETRY.boundingBox);
|
|
58
|
-
});
|
|
59
|
-
it('Calculates the correct bounding box center', function () {
|
|
60
|
-
expect(calculateBoundingBoxCenter(calculateBoundingBox(TEST_GEOMETRY.coordinates))).toEqual(TEST_GEOMETRY.center);
|
|
61
|
-
});
|
|
62
|
-
it('Calculates the correct coordinate center', function () {
|
|
63
|
-
expect(calculateCenter(TEST_GEOMETRY.coordinates)).toEqual(TEST_GEOMETRY.center);
|
|
64
|
-
});
|
|
65
|
-
it('Expands bounding box with 1 km', function () {
|
|
66
|
-
const DEGREE_PER_KM = 0.0089;
|
|
67
|
-
const expandedBoundingBox = [
|
|
68
|
-
1 - DEGREE_PER_KM,
|
|
69
|
-
2 - DEGREE_PER_KM,
|
|
70
|
-
3 + DEGREE_PER_KM,
|
|
71
|
-
4 + DEGREE_PER_KM,
|
|
72
|
-
];
|
|
73
|
-
expect(expandBoundingBox(TEST_GEOMETRY.boundingBox, 1)).toEqual(expandedBoundingBox);
|
|
74
|
-
});
|
|
75
|
-
it('Boundingbox is within boundingbox', function () {
|
|
76
|
-
expect(withinBoundingBox(TEST_GEOMETRY.coordinates, [0.9, 1.9, 3.1, 4.1])).toBe(true);
|
|
77
|
-
});
|
|
78
|
-
it('Calculates the correct distance between vectors', function () {
|
|
79
|
-
const VECTOR_A = [1, 1];
|
|
80
|
-
const VECTOR_B = [2, 2];
|
|
81
|
-
expect(calculateDistance(VECTOR_A, VECTOR_B)).toEqual(1.4142135623730951);
|
|
82
|
-
});
|
|
83
|
-
it('Calculates correct mapData center', function () {
|
|
84
|
-
expect(calculateMapDataCenter(MAP_DATA)).toEqual([4.5, 5]);
|
|
85
|
-
});
|
|
86
|
-
});
|
|
87
|
-
//# sourceMappingURL=geometry.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"geometry.test.js","sourceRoot":"","sources":["../../../src/geometry/geometry.test.ts"],"names":[],"mappings":"AAGA,OAAO,EACH,oBAAoB,EACpB,0BAA0B,EAC1B,eAAe,EACf,iBAAiB,EACjB,sBAAsB,EACtB,iBAAiB,EACjB,iBAAiB,GACpB,MAAM,YAAY,CAAC;AAEpB,MAAM,CAAC,MAAM,aAAa,GAKtB;IACA,WAAW,EAAE;QACT;YACI,CAAC,CAAC,EAAE,CAAC,CAAC;YACN,CAAC,CAAC,EAAE,CAAC,CAAC;YACN,CAAC,GAAG,EAAE,GAAG,CAAC;SACb;QACD;YACI,CAAC,CAAC,EAAE,CAAC,CAAC;YACN,CAAC,CAAC,EAAE,CAAC,CAAC;YACN,CAAC,GAAG,EAAE,GAAG,CAAC;SACb;KACJ;IACD,WAAW,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;IACzB,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;IACd,WAAW,EAAE;QACT;YACI,WAAW,EAAE;gBACT,CAAC,CAAC,EAAE,CAAC,CAAC;gBACN,CAAC,CAAC,EAAE,CAAC,CAAC;gBACN,CAAC,GAAG,EAAE,GAAG,CAAC;aACb;SACJ;QACD;YACI,WAAW,EAAE;gBACT,CAAC,CAAC,EAAE,CAAC,CAAC;gBACN,CAAC,CAAC,EAAE,CAAC,CAAC;gBACN,CAAC,GAAG,EAAE,G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C,CAAC,CAAC,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC;IACzF,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,mCAAmC,EAAE;QACpC,MAAM,CAAC,iBAAiB,CAAC,aAAa,CAAC,WAAW,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC1F,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,iDAAiD,EAAE;QAClD,MAAM,QAAQ,GAAqB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QAC1C,MAAM,QAAQ,GAAqB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QAE1C,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, 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: [number, number];\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: [number, number] = [1, 1];\n const VECTOR_B: [number, number] = [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"]}
|
|
@@ -1 +0,0 @@
|
|
|
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"]}
|
package/dist/lib/hooks/index.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export * from './use-scroll-position';
|
|
2
|
-
export * from './use-stylesheet';
|
|
3
|
-
export * from './use-click-outside';
|
|
4
|
-
export * from './use-history';
|
|
5
|
-
export * from './use-scroll-to';
|
|
6
|
-
export * from './use-url-params';
|
|
7
|
-
export * from './use-map-storage';
|
|
8
|
-
export * from './use-lazy';
|
|
9
|
-
export * from './use-keyboard-focus';
|
|
10
|
-
export * from './use-form-changes';
|
|
11
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC;AACjC,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-stylesheet';\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"]}
|
|
@@ -1,32 +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
|
-
export 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
|
-
//# sourceMappingURL=use-click-outside.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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"]}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { delegate } from '@atomify/core';
|
|
2
|
-
export const useDelegateListen = (selector, type, callback, options = {}) => {
|
|
3
|
-
delegate({
|
|
4
|
-
target: options.target || document,
|
|
5
|
-
selector,
|
|
6
|
-
type,
|
|
7
|
-
callback,
|
|
8
|
-
});
|
|
9
|
-
};
|
|
10
|
-
//# sourceMappingURL=use-delegate-listen.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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"]}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { useListen } from '@atomify/hooks';
|
|
2
|
-
let previousState = [];
|
|
3
|
-
function setPreviousState(form) {
|
|
4
|
-
previousState = [];
|
|
5
|
-
if (form.current) {
|
|
6
|
-
const entries = new FormData(form.current).entries();
|
|
7
|
-
for (const [key, value] of entries) {
|
|
8
|
-
previousState.push({ key, value });
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
export function useFormChanges(form, callback) {
|
|
13
|
-
useListen(form, 'change', () => {
|
|
14
|
-
if (form.current) {
|
|
15
|
-
const entries = new FormData(form.current).entries();
|
|
16
|
-
const currentState = [];
|
|
17
|
-
for (const [key, value] of entries) {
|
|
18
|
-
currentState.push({ key, value });
|
|
19
|
-
}
|
|
20
|
-
const additions = currentState.filter((itemA) => !previousState.find((itemB) => itemB.key === itemA.key && itemB.value === itemA.value));
|
|
21
|
-
const deletions = previousState.filter((itemA) => !currentState.find((itemB) => itemB.key === itemA.key && itemB.value === itemA.value));
|
|
22
|
-
setPreviousState(form);
|
|
23
|
-
callback({ additions, deletions });
|
|
24
|
-
}
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
//# sourceMappingURL=use-form-changes.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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,CA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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"]}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export 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
|
-
//# sourceMappingURL=use-history.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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"]}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { useBindMethod, useElement, useElements, useEvent, useListen } from '@atomify/hooks';
|
|
2
|
-
export const useInput = ({ inputElements, errorTarget, inputLabelTarget = '', onInputChange = () => null, onInputFocus = () => null, onInputBlur = () => null, onInputInput = () => null, onInputFocusout = () => null, resetInput = () => null, onRebindValue = () => null, onValidate, }) => {
|
|
3
|
-
const inputs = useElements(inputElements);
|
|
4
|
-
const errorHolder = useElement(errorTarget);
|
|
5
|
-
const inputLabel = inputLabelTarget
|
|
6
|
-
? useElement(inputLabelTarget)
|
|
7
|
-
: { current: null };
|
|
8
|
-
const bindValueChanged = useEvent({ eventName: 'bindValueChanged' });
|
|
9
|
-
const inputValidate = useEvent({
|
|
10
|
-
eventName: 'input-validate',
|
|
11
|
-
});
|
|
12
|
-
useListen(inputs, 'change', onInputChange);
|
|
13
|
-
useListen(inputs, 'focus', onInputFocus);
|
|
14
|
-
useListen(inputs, 'blur', onInputBlur);
|
|
15
|
-
useListen(inputs, 'input', onInputInput);
|
|
16
|
-
useListen(inputs, 'focusout', onInputFocusout);
|
|
17
|
-
useBindMethod('resetInput', resetInput);
|
|
18
|
-
useBindMethod('rebindValue', onRebindValue);
|
|
19
|
-
useBindMethod('validate', onValidate);
|
|
20
|
-
return {
|
|
21
|
-
inputs,
|
|
22
|
-
errorHolder,
|
|
23
|
-
inputLabel,
|
|
24
|
-
bindValueChanged,
|
|
25
|
-
inputValidate,
|
|
26
|
-
};
|
|
27
|
-
};
|
|
28
|
-
//# sourceMappingURL=use-input.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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"]}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { useListen, useRef, useWatch } from '@atomify/hooks';
|
|
2
|
-
export const useUsingKeyboard = ({ defaultUsingKeyboard = false, className = 'using-keyboard', }) => {
|
|
3
|
-
const usingKeyboard = useRef(defaultUsingKeyboard);
|
|
4
|
-
useListen({ current: document.body }, 'mousedown', () => (usingKeyboard.current = false));
|
|
5
|
-
useListen({ current: document.body }, 'keydown', () => (usingKeyboard.current = true));
|
|
6
|
-
useWatch(() => {
|
|
7
|
-
const action = usingKeyboard.current ? 'add' : 'remove';
|
|
8
|
-
document.body.classList[action](className);
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
//# sourceMappingURL=use-keyboard-focus.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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"]}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { useElement, useRef } from '@atomify/hooks';
|
|
2
|
-
export const LAZY_HOOKS = {
|
|
3
|
-
LAZY_LOADING_HOOK: 'data-lazy-loading',
|
|
4
|
-
LAZY_ERROR_HOOK: 'data-lazy-error',
|
|
5
|
-
LAZY_SUCCESS_HOOK: 'data-lazy-success',
|
|
6
|
-
};
|
|
7
|
-
export const LAZY_STATES = {
|
|
8
|
-
ERROR: 'error',
|
|
9
|
-
LOADING: 'loading',
|
|
10
|
-
SUCCESS: 'success',
|
|
11
|
-
};
|
|
12
|
-
export const useLazy = ({ fetcher, loadingResult, errorResult, successResult, }) => {
|
|
13
|
-
const LazyResult = useRef(loadingResult);
|
|
14
|
-
const lazyLoadingResult = useElement(`[${LAZY_HOOKS.LAZY_LOADING_HOOK}]`);
|
|
15
|
-
const lazyErrorResult = useElement(`${[LAZY_HOOKS.LAZY_ERROR_HOOK]}`);
|
|
16
|
-
const lazySuccessResult = useElement(`${[LAZY_HOOKS.LAZY_SUCCESS_HOOK]}`);
|
|
17
|
-
const response = useRef(null);
|
|
18
|
-
const state = useRef(LAZY_STATES.LOADING);
|
|
19
|
-
async function initFetcher() {
|
|
20
|
-
const activeChild = lazyLoadingResult.current ||
|
|
21
|
-
lazySuccessResult.current ||
|
|
22
|
-
lazyErrorResult.current ||
|
|
23
|
-
false;
|
|
24
|
-
if (state.current !== LAZY_STATES.LOADING) {
|
|
25
|
-
state.current = LAZY_STATES.LOADING;
|
|
26
|
-
}
|
|
27
|
-
try {
|
|
28
|
-
const data = await fetcher();
|
|
29
|
-
response.current = data;
|
|
30
|
-
if (activeChild && activeChild.parentNode) {
|
|
31
|
-
activeChild.parentNode.replaceChild(successResult(data), activeChild);
|
|
32
|
-
}
|
|
33
|
-
state.current = LAZY_STATES.SUCCESS;
|
|
34
|
-
}
|
|
35
|
-
catch (error) {
|
|
36
|
-
if (activeChild && activeChild.parentNode) {
|
|
37
|
-
activeChild.parentNode.replaceChild(errorResult(), activeChild);
|
|
38
|
-
}
|
|
39
|
-
state.current = LAZY_STATES.ERROR;
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
return [LazyResult.current, initFetcher, response, state];
|
|
43
|
-
};
|
|
44
|
-
//# sourceMappingURL=use-lazy.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"use-lazy.js","sourceRoot":"","sources":["../../../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AC,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"]}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export 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
|
-
//# sourceMappingURL=use-map-storage.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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"]}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { useListen, useRef } from '@atomify/hooks';
|
|
2
|
-
import { rafThrottle } from '../raf-throttle';
|
|
3
|
-
export const useScrollPosition = (callback, useWindow) => {
|
|
4
|
-
const position = useRef(getScrollPosition(useWindow));
|
|
5
|
-
function setScrollPosition() {
|
|
6
|
-
const currentPosition = getScrollPosition(useWindow);
|
|
7
|
-
callback({ prevPosition: position.current, currentPosition });
|
|
8
|
-
position.current = currentPosition;
|
|
9
|
-
}
|
|
10
|
-
const throttle = rafThrottle(setScrollPosition);
|
|
11
|
-
useListen(window, 'scroll', throttle);
|
|
12
|
-
};
|
|
13
|
-
function getScrollPosition(useWindow) {
|
|
14
|
-
const target = document.body;
|
|
15
|
-
const position = target.getBoundingClientRect();
|
|
16
|
-
return useWindow
|
|
17
|
-
? { x: window.scrollX, y: window.scrollY }
|
|
18
|
-
: { x: position.left, y: position.top };
|
|
19
|
-
}
|
|
20
|
-
//# sourceMappingURL=use-scroll-position.js.map
|