vviinn-widgets 2.1.0 → 2.2.2
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/dist/cjs/Handler-d1a8a86a.js +329 -0
- package/dist/{vviinn-widgets/app-globals-e0943e34.js → cjs/app-globals-30781f30.js} +15 -925
- package/{www/build/cropper-handler.entry.js → dist/cjs/cropper-handler.cjs.entry.js} +11 -7
- package/dist/{vviinn-widgets/customized-slots-f3449695.js → cjs/customized-slots-5d904d8e.js} +6 -3
- package/dist/cjs/highlight-box_22.cjs.entry.js +737 -0
- package/{www/build/imageSearch.store-407f49f0.js → dist/cjs/imageSearch.store-128957a4.js} +11573 -11902
- package/dist/cjs/index-741a970d.js +1354 -0
- package/dist/cjs/index-c493804d.js +41 -0
- package/dist/cjs/index.cjs.js +2 -0
- package/dist/cjs/loader.cjs.js +23 -0
- package/dist/cjs/vviinn-carousel_5.cjs.entry.js +1232 -0
- package/dist/{vviinn-widgets/vviinn-error.entry.js → cjs/vviinn-error.cjs.entry.js} +8 -4
- package/{www/build/vviinn-preloader.entry.js → dist/cjs/vviinn-preloader.cjs.entry.js} +11 -10
- package/dist/cjs/vviinn-vps-button.cjs.entry.js +43 -0
- package/{www/build/vviinn-vps-widget.entry.js → dist/cjs/vviinn-vps-widget.cjs.entry.js} +31 -30
- package/dist/cjs/vviinn-widgets.cjs.js +21 -0
- package/dist/collection/Image/error.js +14 -0
- package/dist/collection/Image/form.js +5 -0
- package/dist/collection/Image/fromFile.js +18 -0
- package/dist/collection/Image/imageToB64.js +9 -0
- package/dist/collection/Image/index.js +0 -0
- package/dist/collection/Image/renderPromise.js +6 -0
- package/dist/collection/Image/resizeImage.js +28 -0
- package/dist/collection/Image/sizing.js +39 -0
- package/dist/collection/Image/toFile.js +17 -0
- package/dist/collection/analytics/GAnalytics.js +32 -0
- package/dist/collection/analytics/GeneralAnalytics.js +9 -0
- package/dist/collection/analytics/GtagAnalytics.js +35 -0
- package/dist/collection/analytics/ProductAnalytics.js +1 -0
- package/dist/collection/campaign/Campaign.js +8 -0
- package/dist/collection/campaign/CampaignService.js +5 -0
- package/dist/collection/campaign/VCSCampaign.js +1 -0
- package/dist/collection/campaign/VCSCampaignResponse.js +1 -0
- package/dist/collection/campaign/VCSCampaignService.js +5 -0
- package/dist/collection/campaign/VPRCampaignResponse.js +1 -0
- package/dist/collection/campaign/VPRCampaignService.js +5 -0
- package/dist/collection/collection-manifest.json +43 -0
- package/dist/collection/components/customized-slots.js +47 -0
- package/dist/collection/components/image-search/image-view/highlight-box/highlight-box.css +71 -0
- package/dist/collection/components/image-search/image-view/highlight-box/highlight-box.js +25 -0
- package/dist/collection/components/image-search/image-view/image-cropper/cropper-handler/cropper-handler.css +49 -0
- package/dist/collection/components/image-search/image-view/image-cropper/cropper-handler/cropper-handler.js +64 -0
- package/dist/collection/components/image-search/image-view/image-cropper/image-cropper.css +33 -0
- package/dist/{vviinn-widgets/image-cropper.entry.js → collection/components/image-search/image-view/image-cropper/image-cropper.js} +54 -32
- package/dist/collection/components/image-search/search-filters/search-filters.css +120 -0
- package/dist/collection/components/image-search/search-filters/search-filters.js +102 -0
- package/dist/collection/components/vviinn-carousel/vviinn-carousel.css +138 -0
- package/{www/build/vviinn-carousel.entry.js → dist/collection/components/vviinn-carousel/vviinn-carousel.js} +115 -18
- package/dist/collection/components/vviinn-error/vviinn-empty-results/vviinn-empty-results.css +7 -0
- package/dist/collection/components/vviinn-error/vviinn-empty-results/vviinn-empty-results.js +36 -0
- package/dist/collection/components/vviinn-error/vviinn-error.css +38 -0
- package/dist/collection/components/vviinn-error/vviinn-error.js +18 -0
- package/dist/collection/components/vviinn-error/vviinn-server-error/vviinn-server-error.css +3 -0
- package/dist/collection/components/vviinn-error/vviinn-server-error/vviinn-server-error.js +34 -0
- package/dist/collection/components/vviinn-error/vviinn-wrong-format/vviinn-wrong-format.css +3 -0
- package/dist/collection/components/vviinn-error/vviinn-wrong-format/vviinn-wrong-format.js +34 -0
- package/dist/collection/components/vviinn-example-images/vviinn-example-image/vviinn-example-image.css +34 -0
- package/dist/collection/components/vviinn-example-images/vviinn-example-image/vviinn-example-image.js +129 -0
- package/dist/collection/components/vviinn-example-images/vviinn-example-images.css +19 -0
- package/dist/collection/components/vviinn-example-images/vviinn-example-images.js +80 -0
- package/dist/{vviinn-widgets/index-c9483145.js → collection/components/vviinn-icons/index.js} +13 -12
- package/dist/collection/components/vviinn-image-selector/vviinn-image-selector.css +25 -0
- package/dist/collection/components/vviinn-image-selector/vviinn-image-selector.js +64 -0
- package/dist/collection/components/vviinn-image-view/vviinn-detected-object/vviinn-detected-object.css +47 -0
- package/dist/collection/components/vviinn-image-view/vviinn-detected-object/vviinn-detected-object.js +83 -0
- package/dist/collection/components/vviinn-image-view/vviinn-image-view.css +31 -0
- package/dist/collection/components/vviinn-image-view/vviinn-image-view.js +61 -0
- package/dist/collection/components/vviinn-modal/vviinn-modal.css +105 -0
- package/dist/collection/components/vviinn-modal/vviinn-modal.js +98 -0
- package/dist/collection/components/vviinn-onboarding/onboarding-cards/onboarding-card.css +41 -0
- package/dist/collection/components/vviinn-onboarding/onboarding-cards/vviinn-onboarding-card-1/vviinn-onboarding-card-1.js +26 -0
- package/dist/collection/components/vviinn-onboarding/onboarding-cards/vviinn-onboarding-card-2/vviinn-onboarding-card-2.js +26 -0
- package/dist/collection/components/vviinn-onboarding/onboarding-cards/vviinn-onboarding-card-3/vviinn-onboarding-card-3.js +26 -0
- package/dist/collection/components/vviinn-onboarding/vviinn-onboarding.css +58 -0
- package/dist/collection/components/vviinn-onboarding/vviinn-onboarding.js +28 -0
- package/dist/collection/components/vviinn-overlay/vviinn-overlay.css +33 -0
- package/dist/collection/components/vviinn-overlay/vviinn-overlay.js +15 -0
- package/dist/collection/components/vviinn-overlayed-modal/vviinn-overlayed-modal.css +29 -0
- package/dist/collection/components/vviinn-overlayed-modal/vviinn-overlayed-modal.js +71 -0
- package/dist/collection/components/vviinn-preloader/vviinn-preloader.css +37 -0
- package/dist/collection/components/vviinn-preloader/vviinn-preloader.js +20 -0
- package/dist/collection/components/vviinn-privacy-badge/vviinn-privacy-badge.css +19 -0
- package/dist/collection/components/vviinn-privacy-badge/vviinn-privacy-badge.js +27 -0
- package/dist/collection/components/vviinn-product-card/render-helpers.js +32 -0
- package/dist/collection/components/vviinn-product-card/vviinn-product-card.css +95 -0
- package/dist/collection/components/vviinn-product-card/vviinn-product-card.js +425 -0
- package/dist/collection/components/vviinn-slider/arrow.js +11 -0
- package/dist/collection/components/vviinn-slider/vviinn-slide/vviinn-slide.css +4 -0
- package/dist/collection/components/vviinn-slider/vviinn-slide/vviinn-slide.js +15 -0
- package/dist/collection/components/vviinn-slider/vviinn-slider.css +109 -0
- package/dist/collection/components/vviinn-slider/vviinn-slider.js +181 -0
- package/dist/collection/components/vviinn-teaser/vviinn-teaser.css +14 -0
- package/dist/collection/components/vviinn-teaser/vviinn-teaser.js +29 -0
- package/dist/collection/components/vviinn-vpr-button/recommendations-sidebar/recommendations-sidebar.css +238 -0
- package/dist/collection/components/vviinn-vpr-button/recommendations-sidebar/recommendations-sidebar.js +200 -0
- package/dist/collection/components/vviinn-vpr-button/stories/kek.stories.js +18 -0
- package/dist/collection/components/vviinn-vpr-button/vviinn-vpr-button.css +35 -0
- package/dist/collection/components/vviinn-vpr-button/vviinn-vpr-button.js +149 -0
- package/dist/collection/components/vviinn-vpr-widget/GridMode.js +1 -0
- package/dist/collection/components/vviinn-vpr-widget/token-helpers.js +11 -0
- package/dist/collection/components/vviinn-vpr-widget/vviinn-vpr-vidget.js +441 -0
- package/dist/collection/components/vviinn-vpr-widget/vviinn-vpr-widget.css +74 -0
- package/dist/collection/components/vviinn-vps-button/vviinn-vps-button.css +0 -0
- package/dist/collection/components/vviinn-vps-button/vviinn-vps-button.js +177 -0
- package/dist/collection/components/vviinn-vps-widget/vviinn-vps-widget.css +350 -0
- package/dist/collection/components/vviinn-vps-widget/vviinn-vps-widget.js +247 -0
- package/dist/collection/cropper/Cropper.js +1 -0
- package/dist/collection/cropper/Handler.js +61 -0
- package/dist/collection/dom/index.js +3 -0
- package/dist/collection/error.js +14 -0
- package/dist/collection/file/index.js +4 -0
- package/dist/collection/geometry/Clip.js +14 -0
- package/dist/collection/geometry/Point.js +32 -0
- package/dist/collection/geometry/Rectangle.js +95 -0
- package/dist/collection/geometry/RectangleAlt.js +1 -0
- package/dist/collection/geometry/Sized.js +8 -0
- package/dist/collection/global.js +19 -0
- package/dist/collection/index.js +1 -0
- package/dist/collection/interfaces/generated.js +5 -0
- package/dist/collection/interfaces/recommendation.js +1 -0
- package/dist/collection/network/apiClient.js +9 -0
- package/dist/collection/network/ion/File.js +14 -0
- package/dist/collection/network/ion/Form.js +64 -0
- package/dist/collection/network/ion/Link.js +8 -0
- package/dist/collection/network/ion/ValueObject.js +23 -0
- package/dist/collection/network/request.js +19 -0
- package/dist/collection/network/utils.js +37 -0
- package/dist/collection/recommendation/recommendation.js +1 -0
- package/dist/collection/searchSession/searchSession.js +26 -0
- package/dist/collection/sentry.js +14 -0
- package/dist/collection/slider/GridMode.js +1 -0
- package/dist/collection/store/file-processing.js +13 -0
- package/dist/collection/store/imageSearch.store.js +138 -0
- package/dist/collection/store/store.js +11 -0
- package/dist/collection/stories/Button.js +21 -0
- package/dist/collection/stories/Button.stories.js +42 -0
- package/dist/collection/stories/Header.js +45 -0
- package/dist/collection/stories/Header.stories.js +15 -0
- package/dist/collection/stories/Page.js +61 -0
- package/dist/collection/stories/Page.stories.js +19 -0
- package/dist/collection/stories/assets/code-brackets.svg +1 -0
- package/dist/collection/stories/assets/colors.svg +1 -0
- package/dist/collection/stories/assets/comments.svg +1 -0
- package/dist/collection/stories/assets/direction.svg +1 -0
- package/dist/collection/stories/assets/flow.svg +1 -0
- package/dist/collection/stories/assets/plugin.svg +1 -0
- package/dist/collection/stories/assets/repo.svg +1 -0
- package/dist/collection/stories/assets/stackalt.svg +1 -0
- package/dist/collection/stories/image-selector.stories.js +6 -0
- package/dist/collection/stories/image-view.stories.js +6 -0
- package/dist/collection/stories/modal.stories.js +12 -0
- package/dist/collection/stories/onboarding.stories.js +11 -0
- package/dist/collection/stories/overlay.stories.js +5 -0
- package/dist/collection/stories/overlayedModal.stories.js +8 -0
- package/dist/collection/stories/privacy-badge.stories.js +11 -0
- package/dist/collection/stories/slider.stories.js +17 -0
- package/dist/collection/stories/teaser.stories.js +5 -0
- package/dist/collection/stories/vps-widget.stories.js +47 -0
- package/dist/collection/stories/vviinn-product.stories.js +19 -0
- package/dist/collection/utils/collections/collectionsUtils.js +5 -0
- package/dist/collection/utils/either.js +3 -0
- package/dist/collection/utils/enum/enumUtils.js +3 -0
- package/dist/collection/utils/event/Events.js +1 -0
- package/dist/collection/utils/number/index.js +4 -0
- package/dist/collection/utils/option/option.js +4 -0
- package/dist/collection/utils/semigroup/semigroupDiff.js +6 -0
- package/dist/collection/utils/token/tokenUtils.js +9 -0
- package/dist/esm/Handler-639a4cb3.js +308 -0
- package/{www/build/app-globals-e0943e34.js → dist/esm/app-globals-345e497d.js} +10 -922
- package/dist/{vviinn-widgets → esm}/cropper-handler.entry.js +2 -2
- package/{www/build/customized-slots-f3449695.js → dist/esm/customized-slots-a76a8d41.js} +1 -1
- package/dist/esm/highlight-box_22.entry.js +712 -0
- package/dist/{vviinn-widgets/imageSearch.store-407f49f0.js → esm/imageSearch.store-8eab0da1.js} +11510 -11872
- package/dist/esm/index-6fa21e24.js +1323 -0
- package/{www/build/index-c9483145.js → dist/esm/index-8cb063df.js} +6 -4
- package/dist/esm/index.js +1 -0
- package/dist/esm/loader.js +19 -0
- package/dist/esm/polyfills/core-js.js +11 -0
- package/dist/esm/polyfills/css-shim.js +1 -0
- package/dist/esm/polyfills/dom.js +79 -0
- package/dist/esm/polyfills/es5-html-element.js +1 -0
- package/dist/esm/polyfills/index.js +34 -0
- package/dist/esm/polyfills/system.js +6 -0
- package/dist/esm/vviinn-carousel_5.entry.js +1224 -0
- package/{www/build → dist/esm}/vviinn-error.entry.js +1 -1
- package/dist/{vviinn-widgets → esm}/vviinn-preloader.entry.js +3 -6
- package/dist/{vviinn-widgets → esm}/vviinn-vps-button.entry.js +3 -3
- package/dist/{vviinn-widgets → esm}/vviinn-vps-widget.entry.js +4 -7
- package/dist/esm/vviinn-widgets.js +19 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/loader/cdn.js +3 -0
- package/dist/loader/index.cjs.js +3 -0
- package/dist/loader/index.d.ts +12 -0
- package/dist/loader/index.es2017.js +3 -0
- package/dist/loader/index.js +4 -0
- package/dist/loader/package.json +10 -0
- package/dist/types/components/vviinn-carousel/vviinn-carousel.d.ts +1 -0
- package/dist/types/components/vviinn-icons/index.d.ts +2 -0
- package/dist/types/components/vviinn-product-card/render-helpers.d.ts +3 -2
- package/dist/types/components/vviinn-product-card/vviinn-product-card.d.ts +2 -0
- package/dist/types/components/vviinn-vpr-button/recommendations-sidebar/recommendations-sidebar.d.ts +25 -0
- package/dist/types/components/vviinn-vpr-button/stories/kek.stories.d.ts +7 -0
- package/dist/types/components/vviinn-vpr-button/vviinn-vpr-button.d.ts +14 -0
- package/dist/types/components/vviinn-vpr-widget/vviinn-vpr-vidget.d.ts +13 -3
- package/dist/types/components.d.ts +54 -0
- package/dist/vviinn-widgets/index.esm.js +0 -1
- package/dist/vviinn-widgets/p-04b06ea9.entry.js +1 -0
- package/dist/vviinn-widgets/p-400eb62f.entry.js +1 -0
- package/dist/vviinn-widgets/p-56fc949a.js +1 -0
- package/dist/vviinn-widgets/p-59edfbe2.js +1 -0
- package/dist/vviinn-widgets/p-78ccc9eb.js +15 -0
- package/dist/vviinn-widgets/p-9d24f51e.entry.js +1 -0
- package/dist/vviinn-widgets/p-d085199d.entry.js +1 -0
- package/dist/vviinn-widgets/p-e1ba8626.js +1 -0
- package/dist/vviinn-widgets/p-e38f4aa2.entry.js +1 -0
- package/dist/vviinn-widgets/p-e67cae57.js +1 -0
- package/dist/vviinn-widgets/p-f47e82b2.entry.js +1 -0
- package/dist/vviinn-widgets/p-f582db5c.js +1 -0
- package/dist/vviinn-widgets/p-fb14e3cc.entry.js +1 -0
- package/dist/vviinn-widgets/vviinn-widgets.css +1 -6
- package/dist/vviinn-widgets/vviinn-widgets.esm.js +1 -125
- package/package.json +3 -1
- package/www/build/index.esm.js +0 -1
- package/www/build/p-04b06ea9.entry.js +1 -0
- package/www/build/p-400eb62f.entry.js +1 -0
- package/www/build/p-56fc949a.js +1 -0
- package/www/build/p-59edfbe2.js +1 -0
- package/www/build/p-78ccc9eb.js +15 -0
- package/www/build/p-7e4978d5.js +1 -0
- package/www/build/p-9d24f51e.entry.js +1 -0
- package/www/build/p-a67898be.css +1 -0
- package/www/build/p-d085199d.entry.js +1 -0
- package/www/build/p-e1ba8626.js +1 -0
- package/www/build/p-e38f4aa2.entry.js +1 -0
- package/www/build/p-e67cae57.js +1 -0
- package/www/build/p-f47e82b2.entry.js +1 -0
- package/www/build/p-f582db5c.js +1 -0
- package/www/build/p-fb14e3cc.entry.js +1 -0
- package/www/build/vviinn-widgets.css +1 -6
- package/www/build/vviinn-widgets.esm.js +1 -125
- package/www/index.html +6 -13
- package/dist/vviinn-widgets/Array-4b9f84cf.js +0 -4295
- package/dist/vviinn-widgets/Handler-47db9890.js +0 -1428
- package/dist/vviinn-widgets/NonEmptyArray-6ef0d207.js +0 -4370
- package/dist/vviinn-widgets/css-shim-f0027935.js +0 -4
- package/dist/vviinn-widgets/dom-db0073f0.js +0 -73
- package/dist/vviinn-widgets/highlight-box.entry.js +0 -41
- package/dist/vviinn-widgets/index-b6d739a9.js +0 -3010
- package/dist/vviinn-widgets/number-98d54dd6.js +0 -1533
- package/dist/vviinn-widgets/search-filters.entry.js +0 -73
- package/dist/vviinn-widgets/shadow-css-c1fdfa9f.js +0 -389
- package/dist/vviinn-widgets/vviinn-carousel.entry.js +0 -205
- package/dist/vviinn-widgets/vviinn-detected-object.entry.js +0 -52
- package/dist/vviinn-widgets/vviinn-empty-results.entry.js +0 -16
- package/dist/vviinn-widgets/vviinn-example-image.entry.js +0 -38
- package/dist/vviinn-widgets/vviinn-example-images.entry.js +0 -28
- package/dist/vviinn-widgets/vviinn-image-selector.entry.js +0 -31
- package/dist/vviinn-widgets/vviinn-image-view.entry.js +0 -55
- package/dist/vviinn-widgets/vviinn-modal.entry.js +0 -30
- package/dist/vviinn-widgets/vviinn-onboarding-card-1.entry.js +0 -21
- package/dist/vviinn-widgets/vviinn-onboarding-card-2.entry.js +0 -21
- package/dist/vviinn-widgets/vviinn-onboarding-card-3.entry.js +0 -21
- package/dist/vviinn-widgets/vviinn-onboarding.entry.js +0 -20
- package/dist/vviinn-widgets/vviinn-overlay.entry.js +0 -15
- package/dist/vviinn-widgets/vviinn-overlayed-modal.entry.js +0 -18
- package/dist/vviinn-widgets/vviinn-privacy-badge.entry.js +0 -20
- package/dist/vviinn-widgets/vviinn-product-card.entry.js +0 -176
- package/dist/vviinn-widgets/vviinn-server-error.entry.js +0 -16
- package/dist/vviinn-widgets/vviinn-slide.entry.js +0 -15
- package/dist/vviinn-widgets/vviinn-slider.entry.js +0 -120
- package/dist/vviinn-widgets/vviinn-teaser.entry.js +0 -20
- package/dist/vviinn-widgets/vviinn-vpr-widget.entry.js +0 -128
- package/dist/vviinn-widgets/vviinn-wrong-format.entry.js +0 -16
- package/www/build/Array-4b9f84cf.js +0 -4295
- package/www/build/Handler-47db9890.js +0 -1428
- package/www/build/NonEmptyArray-6ef0d207.js +0 -4370
- package/www/build/css-shim-f0027935.js +0 -4
- package/www/build/dom-db0073f0.js +0 -73
- package/www/build/highlight-box.entry.js +0 -41
- package/www/build/image-cropper.entry.js +0 -113
- package/www/build/index-b6d739a9.js +0 -3010
- package/www/build/number-98d54dd6.js +0 -1533
- package/www/build/search-filters.entry.js +0 -73
- package/www/build/shadow-css-c1fdfa9f.js +0 -389
- package/www/build/vviinn-detected-object.entry.js +0 -52
- package/www/build/vviinn-empty-results.entry.js +0 -16
- package/www/build/vviinn-example-image.entry.js +0 -38
- package/www/build/vviinn-example-images.entry.js +0 -28
- package/www/build/vviinn-image-selector.entry.js +0 -31
- package/www/build/vviinn-image-view.entry.js +0 -55
- package/www/build/vviinn-modal.entry.js +0 -30
- package/www/build/vviinn-onboarding-card-1.entry.js +0 -21
- package/www/build/vviinn-onboarding-card-2.entry.js +0 -21
- package/www/build/vviinn-onboarding-card-3.entry.js +0 -21
- package/www/build/vviinn-onboarding.entry.js +0 -20
- package/www/build/vviinn-overlay.entry.js +0 -15
- package/www/build/vviinn-overlayed-modal.entry.js +0 -18
- package/www/build/vviinn-privacy-badge.entry.js +0 -20
- package/www/build/vviinn-product-card.entry.js +0 -176
- package/www/build/vviinn-server-error.entry.js +0 -16
- package/www/build/vviinn-slide.entry.js +0 -15
- package/www/build/vviinn-slider.entry.js +0 -120
- package/www/build/vviinn-teaser.entry.js +0 -20
- package/www/build/vviinn-vpr-widget.entry.js +0 -128
- package/www/build/vviinn-vps-button.entry.js +0 -39
- package/www/build/vviinn-wrong-format.entry.js +0 -16
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
display: grid;
|
|
3
|
+
position: absolute;
|
|
4
|
+
box-sizing: border-box;
|
|
5
|
+
border: none;
|
|
6
|
+
width: 100%;
|
|
7
|
+
height: 100%;
|
|
8
|
+
-webkit-user-select: none;
|
|
9
|
+
-moz-user-select: none;
|
|
10
|
+
-ms-user-select: none;
|
|
11
|
+
user-select: none;
|
|
12
|
+
|
|
13
|
+
--size: 10px;
|
|
14
|
+
--x-position: 0;
|
|
15
|
+
--y-position: 0;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
img {
|
|
19
|
+
-webkit-user-select: none;
|
|
20
|
+
-moz-user-select: none;
|
|
21
|
+
-ms-user-select: none;
|
|
22
|
+
user-select: none;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.pointer {
|
|
26
|
+
position: absolute;
|
|
27
|
+
width: var(--size);
|
|
28
|
+
height: var(--size);
|
|
29
|
+
background: black;
|
|
30
|
+
border-radius: 50%;
|
|
31
|
+
z-index: 2;
|
|
32
|
+
cursor: pointer;
|
|
33
|
+
transform: translate(var(--x-position), var(--y-position)) scale(0);
|
|
34
|
+
-webkit-animation: 0.25s linear fadein;
|
|
35
|
+
animation: 0.25s linear fadein;
|
|
36
|
+
-webkit-animation-fill-mode: forwards;
|
|
37
|
+
animation-fill-mode: forwards;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.pointer::after {
|
|
41
|
+
content: "";
|
|
42
|
+
cursor: pointer;
|
|
43
|
+
border: 5px solid black;
|
|
44
|
+
border-radius: 50%;
|
|
45
|
+
width: var(--size);
|
|
46
|
+
height: var(--size);
|
|
47
|
+
display: block;
|
|
48
|
+
transform: translate(calc(-50% + var(--size) * 0.5), calc(-50% + var(--size) * 0.5));
|
|
49
|
+
padding: calc(var(--size) * 0.5);
|
|
50
|
+
opacity: .75;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
@-webkit-keyframes fadein {
|
|
54
|
+
from {
|
|
55
|
+
transform: translate(var(--x-position), var(--y-position)) scale(0);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
to {
|
|
59
|
+
transform: translate(var(--x-position), var(--y-position)) scale(1);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
@keyframes fadein {
|
|
64
|
+
from {
|
|
65
|
+
transform: translate(var(--x-position), var(--y-position)) scale(0);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
to {
|
|
69
|
+
transform: translate(var(--x-position), var(--y-position)) scale(1);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Component, Host, h } from "@stencil/core";
|
|
2
|
+
import { getClipValue } from "../../../../geometry/Clip";
|
|
3
|
+
import * as O from "fp-ts/lib/Option";
|
|
4
|
+
import { pipe } from "fp-ts/function";
|
|
5
|
+
import { imageSearchState } from "../../../../store/imageSearch.store";
|
|
6
|
+
import { sequenceToOption } from "../../../../utils/option/option";
|
|
7
|
+
export class HighlightBox {
|
|
8
|
+
getInsetValue() {
|
|
9
|
+
return pipe(sequenceToOption(imageSearchState.searchArea, imageSearchState.imageBounds), O.map(([selection, image]) => getClipValue(selection, image)), O.getOrElse(() => ""));
|
|
10
|
+
}
|
|
11
|
+
renderImage() {
|
|
12
|
+
return pipe(sequenceToOption(imageSearchState.imageUrl, imageSearchState.imageBounds), O.map(([url, bounds]) => (h("img", { src: url, width: bounds.width, height: bounds.height, style: { "clip-path": `${this.getInsetValue()}` } }))), O.getOrElse(() => ""));
|
|
13
|
+
}
|
|
14
|
+
render() {
|
|
15
|
+
return h(Host, null, this.renderImage());
|
|
16
|
+
}
|
|
17
|
+
static get is() { return "highlight-box"; }
|
|
18
|
+
static get encapsulation() { return "shadow"; }
|
|
19
|
+
static get originalStyleUrls() { return {
|
|
20
|
+
"$": ["highlight-box.css"]
|
|
21
|
+
}; }
|
|
22
|
+
static get styleUrls() { return {
|
|
23
|
+
"$": ["highlight-box.css"]
|
|
24
|
+
}; }
|
|
25
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
--size: 20px;
|
|
3
|
+
|
|
4
|
+
background: transparent;
|
|
5
|
+
border: 4px solid white;
|
|
6
|
+
box-sizing: content-box;
|
|
7
|
+
display: block;
|
|
8
|
+
height: var(--size);
|
|
9
|
+
touch-action: none;
|
|
10
|
+
position: absolute;
|
|
11
|
+
width: var(--size);
|
|
12
|
+
z-index: 4;
|
|
13
|
+
-webkit-user-select: none;
|
|
14
|
+
-moz-user-select: none;
|
|
15
|
+
-ms-user-select: none;
|
|
16
|
+
user-select: none;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
:host(.disabled) {
|
|
20
|
+
opacity: 0.25;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
:host(.nw-resize) {
|
|
24
|
+
border-bottom: none;
|
|
25
|
+
border-right: none;
|
|
26
|
+
top: 0;
|
|
27
|
+
left: 0;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
:host(.ne-resize) {
|
|
31
|
+
border-left: none;
|
|
32
|
+
border-bottom: none;
|
|
33
|
+
right: 0;
|
|
34
|
+
top: 0;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
:host(.sw-resize) {
|
|
38
|
+
border-right: none;
|
|
39
|
+
border-top: none;
|
|
40
|
+
left: 0;
|
|
41
|
+
bottom: 0;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
:host(.se-resize) {
|
|
45
|
+
border-left: none;
|
|
46
|
+
border-top: none;
|
|
47
|
+
bottom: 0;
|
|
48
|
+
right: 0;
|
|
49
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { Component, Host, h, Prop } from "@stencil/core";
|
|
2
|
+
import { getCursorValue } from "../../../../../cropper/Handler";
|
|
3
|
+
export class CropperHandler {
|
|
4
|
+
constructor() {
|
|
5
|
+
this.disabled = false;
|
|
6
|
+
}
|
|
7
|
+
render() {
|
|
8
|
+
return (h(Host, { part: `handle ${getCursorValue(this.handler.direction)}`, class: {
|
|
9
|
+
disabled: this.disabled,
|
|
10
|
+
[getCursorValue(this.handler.direction)]: true,
|
|
11
|
+
}, style: {
|
|
12
|
+
"--size": "20px",
|
|
13
|
+
cursor: getCursorValue(this.handler.direction),
|
|
14
|
+
}, draggable: false }));
|
|
15
|
+
}
|
|
16
|
+
static get is() { return "cropper-handler"; }
|
|
17
|
+
static get encapsulation() { return "shadow"; }
|
|
18
|
+
static get originalStyleUrls() { return {
|
|
19
|
+
"$": ["cropper-handler.css"]
|
|
20
|
+
}; }
|
|
21
|
+
static get styleUrls() { return {
|
|
22
|
+
"$": ["cropper-handler.css"]
|
|
23
|
+
}; }
|
|
24
|
+
static get properties() { return {
|
|
25
|
+
"handler": {
|
|
26
|
+
"type": "unknown",
|
|
27
|
+
"mutable": false,
|
|
28
|
+
"complexType": {
|
|
29
|
+
"original": "Handler",
|
|
30
|
+
"resolved": "Handler",
|
|
31
|
+
"references": {
|
|
32
|
+
"Handler": {
|
|
33
|
+
"location": "import",
|
|
34
|
+
"path": "../../../../../cropper/Handler"
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"required": false,
|
|
39
|
+
"optional": false,
|
|
40
|
+
"docs": {
|
|
41
|
+
"tags": [],
|
|
42
|
+
"text": ""
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
"disabled": {
|
|
46
|
+
"type": "boolean",
|
|
47
|
+
"mutable": false,
|
|
48
|
+
"complexType": {
|
|
49
|
+
"original": "boolean",
|
|
50
|
+
"resolved": "boolean",
|
|
51
|
+
"references": {}
|
|
52
|
+
},
|
|
53
|
+
"required": false,
|
|
54
|
+
"optional": false,
|
|
55
|
+
"docs": {
|
|
56
|
+
"tags": [],
|
|
57
|
+
"text": ""
|
|
58
|
+
},
|
|
59
|
+
"attribute": "disabled",
|
|
60
|
+
"reflect": false,
|
|
61
|
+
"defaultValue": "false"
|
|
62
|
+
}
|
|
63
|
+
}; }
|
|
64
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
display: block;
|
|
3
|
+
height: 100%;
|
|
4
|
+
left: 0;
|
|
5
|
+
position: absolute;
|
|
6
|
+
top: 0;
|
|
7
|
+
width: 100%;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
:host(.hidden) {
|
|
11
|
+
visibility: hidden;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.crop-area {
|
|
15
|
+
border: 1px solid white;
|
|
16
|
+
box-sizing: border-box;
|
|
17
|
+
position: absolute;
|
|
18
|
+
touch-action: none;
|
|
19
|
+
transition-property: border-color, opacity;
|
|
20
|
+
transition-duration: .25s;
|
|
21
|
+
transition-timing-function: ease-in-out;
|
|
22
|
+
z-index: 2;
|
|
23
|
+
position: relative;
|
|
24
|
+
will-change: transform;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.crop-area.active {
|
|
28
|
+
border-color: whitesmoke;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.crop-area.disabled {
|
|
32
|
+
opacity: 0.25;
|
|
33
|
+
}
|
|
@@ -1,20 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
|
|
8
|
-
const findTarget = (ev) => {
|
|
9
|
-
return ev.target;
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
const imageCropperCss = ":host{display:block;height:100%;left:0;position:absolute;top:0;width:100%}:host(.hidden){visibility:hidden}.crop-area{border:1px solid white;box-sizing:border-box;position:absolute;touch-action:none;transition-property:border-color, opacity;transition-duration:.25s;transition-timing-function:ease-in-out;z-index:2;position:relative;will-change:transform}.crop-area.active{border-color:whitesmoke}.crop-area.disabled{opacity:0.25}";
|
|
13
|
-
|
|
1
|
+
import { Component, Host, h, State, Element, Prop } from "@stencil/core";
|
|
2
|
+
import { move, transform } from "../../../../geometry/Rectangle";
|
|
3
|
+
import { fromMouseEvent, pointDiffSemigroup, } from "../../../../geometry/Point";
|
|
4
|
+
import { imageSearchState, makeRectangularSearchRequest, } from "../../../../store/imageSearch.store";
|
|
5
|
+
import { pipe } from "fp-ts/lib/function";
|
|
6
|
+
import * as O from "fp-ts/lib/Option";
|
|
7
|
+
import { findTarget } from "../../../../dom";
|
|
14
8
|
const MIN_SEARCHAREA_SIZE = 40;
|
|
15
|
-
|
|
16
|
-
constructor(
|
|
17
|
-
registerInstance(this, hostRef);
|
|
9
|
+
export class ImageCropper {
|
|
10
|
+
constructor() {
|
|
18
11
|
this.disabled = false;
|
|
19
12
|
this.handleMove = false;
|
|
20
13
|
this.mouseStartPoint = undefined;
|
|
@@ -32,7 +25,7 @@ let ImageCropper = class {
|
|
|
32
25
|
position: distance,
|
|
33
26
|
direction: this.handlerMoveDirection,
|
|
34
27
|
};
|
|
35
|
-
|
|
28
|
+
pipe(imageSearchState.searchArea, O.map((area) => {
|
|
36
29
|
const newSearchArea = transform(area, transformedHandler);
|
|
37
30
|
if (newSearchArea.width < MIN_SEARCHAREA_SIZE ||
|
|
38
31
|
newSearchArea.height < MIN_SEARCHAREA_SIZE ||
|
|
@@ -41,7 +34,7 @@ let ImageCropper = class {
|
|
|
41
34
|
this.bounds.height - (newSearchArea.y + newSearchArea.height) < 0 ||
|
|
42
35
|
this.bounds.width - (newSearchArea.x + newSearchArea.width) < 0)
|
|
43
36
|
return;
|
|
44
|
-
imageSearchState.searchArea =
|
|
37
|
+
imageSearchState.searchArea = O.some(newSearchArea);
|
|
45
38
|
this.mouseStartPoint = destination;
|
|
46
39
|
imageSearchState.detectedObject = undefined;
|
|
47
40
|
}));
|
|
@@ -51,7 +44,7 @@ let ImageCropper = class {
|
|
|
51
44
|
ev.stopPropagation();
|
|
52
45
|
const destination = fromMouseEvent(ev);
|
|
53
46
|
const distance = pointDiffSemigroup.concat(destination, this.mouseStartPoint);
|
|
54
|
-
|
|
47
|
+
pipe(imageSearchState.searchArea, O.map((searchArea) => {
|
|
55
48
|
const newSearchArea = move(searchArea, distance);
|
|
56
49
|
if (newSearchArea.x < 0 ||
|
|
57
50
|
newSearchArea.y < 0 ||
|
|
@@ -59,7 +52,7 @@ let ImageCropper = class {
|
|
|
59
52
|
this.bounds.width - (newSearchArea.x + newSearchArea.width) < 0)
|
|
60
53
|
return;
|
|
61
54
|
imageSearchState.detectedObject = undefined;
|
|
62
|
-
imageSearchState.searchArea =
|
|
55
|
+
imageSearchState.searchArea = O.some(newSearchArea);
|
|
63
56
|
this.mouseStartPoint = destination;
|
|
64
57
|
}));
|
|
65
58
|
}
|
|
@@ -88,26 +81,55 @@ let ImageCropper = class {
|
|
|
88
81
|
makeRectangularSearchRequest();
|
|
89
82
|
}
|
|
90
83
|
getStyleMap() {
|
|
91
|
-
return
|
|
84
|
+
return pipe(imageSearchState.searchArea, O.map((rectangle) => {
|
|
92
85
|
return {
|
|
93
86
|
width: `${rectangle.width}px`,
|
|
94
87
|
height: `${rectangle.height}px`,
|
|
95
88
|
transform: `translate3d(${rectangle.x}px, ${rectangle.y}px, 0)`,
|
|
96
89
|
cursor: this.handleMove ? "move" : "default",
|
|
97
90
|
};
|
|
98
|
-
}),
|
|
91
|
+
}), O.getOrElse(() => {
|
|
99
92
|
return {};
|
|
100
93
|
}));
|
|
101
94
|
}
|
|
102
95
|
render() {
|
|
103
|
-
return (h(Host, { exportparts: "handle, e-resize, n-resize, ne-resize, nw-resize, s-resize, se-resize, sw-resize, w-resize" },
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
96
|
+
return (h(Host, { exportparts: "handle, e-resize, n-resize, ne-resize, nw-resize, s-resize, se-resize, sw-resize, w-resize" },
|
|
97
|
+
h("div", { class: {
|
|
98
|
+
"crop-area": true,
|
|
99
|
+
active: this.handleMove,
|
|
100
|
+
disabled: this.disabled,
|
|
101
|
+
}, draggable: false, style: this.getStyleMap(), onContextMenu: () => false, onPointerDown: (ev) => this.handlePointerDown(ev) }, imageSearchState.cropperHandlers.map((handler) => (h("cropper-handler", { disabled: this.disabled, handler: handler, onPointerDown: (ev) => this.handlePointerDown(ev) }))))));
|
|
108
102
|
}
|
|
109
|
-
get
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
103
|
+
static get is() { return "image-cropper"; }
|
|
104
|
+
static get encapsulation() { return "shadow"; }
|
|
105
|
+
static get originalStyleUrls() { return {
|
|
106
|
+
"$": ["image-cropper.css"]
|
|
107
|
+
}; }
|
|
108
|
+
static get styleUrls() { return {
|
|
109
|
+
"$": ["image-cropper.css"]
|
|
110
|
+
}; }
|
|
111
|
+
static get properties() { return {
|
|
112
|
+
"disabled": {
|
|
113
|
+
"type": "boolean",
|
|
114
|
+
"mutable": false,
|
|
115
|
+
"complexType": {
|
|
116
|
+
"original": "boolean",
|
|
117
|
+
"resolved": "boolean",
|
|
118
|
+
"references": {}
|
|
119
|
+
},
|
|
120
|
+
"required": false,
|
|
121
|
+
"optional": false,
|
|
122
|
+
"docs": {
|
|
123
|
+
"tags": [],
|
|
124
|
+
"text": ""
|
|
125
|
+
},
|
|
126
|
+
"attribute": "disabled",
|
|
127
|
+
"reflect": false,
|
|
128
|
+
"defaultValue": "false"
|
|
129
|
+
}
|
|
130
|
+
}; }
|
|
131
|
+
static get states() { return {
|
|
132
|
+
"handleMove": {}
|
|
133
|
+
}; }
|
|
134
|
+
static get elementRef() { return "el"; }
|
|
135
|
+
}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
display: grid;
|
|
3
|
+
grid-gap: 1rem;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.filters {
|
|
7
|
+
display: flex;
|
|
8
|
+
flex-direction: row;
|
|
9
|
+
flex-wrap: wrap;
|
|
10
|
+
gap: 0.5rem;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.filter {
|
|
14
|
+
align-items: center;
|
|
15
|
+
-webkit-animation-duration: 0.25s;
|
|
16
|
+
animation-duration: 0.25s;
|
|
17
|
+
-webkit-animation-fill-mode: forwards;
|
|
18
|
+
animation-fill-mode: forwards;
|
|
19
|
+
-webkit-animation-name: scalein;
|
|
20
|
+
animation-name: scalein;
|
|
21
|
+
border: 1px solid lightgray;
|
|
22
|
+
cursor: pointer;
|
|
23
|
+
display: flex;
|
|
24
|
+
flex-direction: row;
|
|
25
|
+
grid-gap: 8px;
|
|
26
|
+
height: -webkit-max-content;
|
|
27
|
+
height: -moz-max-content;
|
|
28
|
+
height: max-content;
|
|
29
|
+
min-width: -webkit-max-content;
|
|
30
|
+
min-width: -moz-max-content;
|
|
31
|
+
min-width: max-content;
|
|
32
|
+
padding: 0.1rem;
|
|
33
|
+
transform: scale(0);
|
|
34
|
+
transition-property: background;
|
|
35
|
+
transition-duration: 0.25s;
|
|
36
|
+
transition-timing-function: ease-in-out;
|
|
37
|
+
-webkit-user-select: none;
|
|
38
|
+
-moz-user-select: none;
|
|
39
|
+
-ms-user-select: none;
|
|
40
|
+
user-select: none;
|
|
41
|
+
padding: 6px 16px;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.filter.active {
|
|
45
|
+
border: 1px solid black;
|
|
46
|
+
padding: 6px 8px;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.filter:hover {
|
|
50
|
+
border: 1px solid gray;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.show-more {
|
|
54
|
+
display: flex;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.show-more.hidden {
|
|
58
|
+
display: none;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.show-more::after {
|
|
62
|
+
content: url("data:image/svg+xml,%3Csvg width='16' height='16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8 12.2l-6-6L3.2 5 8 9.8 12.8 5 14 6.2l-6 6z' fill='%23525252'/%3E%3C/svg%3E");
|
|
63
|
+
display: block;
|
|
64
|
+
height: 16px;
|
|
65
|
+
margin-top: 1px;
|
|
66
|
+
margin-left: 8px;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.show-more.active::after {
|
|
70
|
+
transform: rotateX(180deg);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
@-webkit-keyframes scalein {
|
|
74
|
+
from {
|
|
75
|
+
opacity: 0;
|
|
76
|
+
transform: scale(0.5);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
to {
|
|
80
|
+
opacity: 1;
|
|
81
|
+
transform: scale(1);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
@keyframes scalein {
|
|
86
|
+
from {
|
|
87
|
+
opacity: 0;
|
|
88
|
+
transform: scale(0.5);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
to {
|
|
92
|
+
opacity: 1;
|
|
93
|
+
transform: scale(1);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
@media (max-width: 415px) {
|
|
98
|
+
.show-more::after {
|
|
99
|
+
transform: rotate(-90deg);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.show-more.active::after {
|
|
103
|
+
transform: rotate(90deg);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
@media (max-width: 800px) {
|
|
108
|
+
.filters {
|
|
109
|
+
flex-wrap: nowrap;
|
|
110
|
+
overflow-x: scroll;
|
|
111
|
+
-ms-scroll-snap-type: x mandatory;
|
|
112
|
+
scroll-snap-type: x mandatory;
|
|
113
|
+
grid-gap: unset;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.filter {
|
|
117
|
+
scroll-snap-align: end;
|
|
118
|
+
margin-right: 0.5rem;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { Component, Host, h, Prop, State, Element } from "@stencil/core";
|
|
2
|
+
import { imageSearchState } from "../../../store/imageSearch.store";
|
|
3
|
+
import { CheckIcon } from "../../vviinn-icons";
|
|
4
|
+
const FILTERS_COUNT = 5;
|
|
5
|
+
const ACTIVE_FILTER_CLASSNAME = ".filter.active";
|
|
6
|
+
const getFilterId = (filter) => filter.href.split("/").reverse()[0];
|
|
7
|
+
export class SearchFilters {
|
|
8
|
+
constructor() {
|
|
9
|
+
this.filter = null;
|
|
10
|
+
this.selectedCategoryId = null;
|
|
11
|
+
this.hideFilters = true;
|
|
12
|
+
}
|
|
13
|
+
handleFilterSelection(filter) {
|
|
14
|
+
return this.isFilterSelected(filter)
|
|
15
|
+
? this.clearSelectedFilter()
|
|
16
|
+
: this.selectFilter(filter);
|
|
17
|
+
}
|
|
18
|
+
selectFilter(filter) {
|
|
19
|
+
this.selectedCategoryId = getFilterId(filter);
|
|
20
|
+
imageSearchState.activeIonLink = filter;
|
|
21
|
+
}
|
|
22
|
+
clearSelectedFilter() {
|
|
23
|
+
this.selectedCategoryId = null;
|
|
24
|
+
imageSearchState.activeIonLink = undefined;
|
|
25
|
+
this.findSelectedFilter().blur();
|
|
26
|
+
}
|
|
27
|
+
findSelectedFilter() {
|
|
28
|
+
return this.el.shadowRoot.querySelector(ACTIVE_FILTER_CLASSNAME);
|
|
29
|
+
}
|
|
30
|
+
toggleFilters() {
|
|
31
|
+
this.hideFilters = !this.hideFilters;
|
|
32
|
+
}
|
|
33
|
+
handleEnter(ev, f) {
|
|
34
|
+
if (ev.key !== "Enter")
|
|
35
|
+
return;
|
|
36
|
+
this.handleFilterSelection(f);
|
|
37
|
+
}
|
|
38
|
+
isFilterSelected(filterLink) {
|
|
39
|
+
return this.selectedCategoryId === getFilterId(filterLink);
|
|
40
|
+
}
|
|
41
|
+
render() {
|
|
42
|
+
return (h(Host, { exportparts: "filter, show-more-filters" },
|
|
43
|
+
h("div", { class: "filters" },
|
|
44
|
+
this.filter.filters
|
|
45
|
+
.filter((_, i) => (this.hideFilters ? i < FILTERS_COUNT : true))
|
|
46
|
+
.map((f, n) => (h("div", { role: "button", tabindex: "0", part: this.isFilterSelected(f) ? "filter active" : "filter", class: {
|
|
47
|
+
filter: true,
|
|
48
|
+
active: this.selectedCategoryId === getFilterId(f),
|
|
49
|
+
}, style: { "animation-delay": `${n * 10}ms` }, onPointerUp: (ev) => {
|
|
50
|
+
ev.stopPropagation();
|
|
51
|
+
this.handleFilterSelection(f);
|
|
52
|
+
}, onKeyPress: (ev) => this.handleEnter(ev, f) },
|
|
53
|
+
this.isFilterSelected(f) ? h(CheckIcon, null) : null,
|
|
54
|
+
f.name))),
|
|
55
|
+
h("div", { class: {
|
|
56
|
+
filter: true,
|
|
57
|
+
"show-more": true,
|
|
58
|
+
hidden: this.filter.filters.length <= FILTERS_COUNT,
|
|
59
|
+
active: !this.hideFilters,
|
|
60
|
+
}, role: "button", tabindex: "0", "aria-role": "button", onClick: () => this.toggleFilters(), onKeyPress: (ev) => {
|
|
61
|
+
if (ev.key === "Enter") {
|
|
62
|
+
this.toggleFilters();
|
|
63
|
+
}
|
|
64
|
+
}, part: "show-more-filters" }, this.hideFilters ? "Zeige mehr" : "Zeige weniger"))));
|
|
65
|
+
}
|
|
66
|
+
static get is() { return "search-filters"; }
|
|
67
|
+
static get encapsulation() { return "shadow"; }
|
|
68
|
+
static get originalStyleUrls() { return {
|
|
69
|
+
"$": ["search-filters.css"]
|
|
70
|
+
}; }
|
|
71
|
+
static get styleUrls() { return {
|
|
72
|
+
"$": ["search-filters.css"]
|
|
73
|
+
}; }
|
|
74
|
+
static get properties() { return {
|
|
75
|
+
"filter": {
|
|
76
|
+
"type": "unknown",
|
|
77
|
+
"mutable": false,
|
|
78
|
+
"complexType": {
|
|
79
|
+
"original": "SearchSessionFilter | null",
|
|
80
|
+
"resolved": "SearchSessionFilter",
|
|
81
|
+
"references": {
|
|
82
|
+
"SearchSessionFilter": {
|
|
83
|
+
"location": "import",
|
|
84
|
+
"path": "../../../searchSession/searchSession"
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
"required": false,
|
|
89
|
+
"optional": false,
|
|
90
|
+
"docs": {
|
|
91
|
+
"tags": [],
|
|
92
|
+
"text": ""
|
|
93
|
+
},
|
|
94
|
+
"defaultValue": "null"
|
|
95
|
+
}
|
|
96
|
+
}; }
|
|
97
|
+
static get states() { return {
|
|
98
|
+
"selectedCategoryId": {},
|
|
99
|
+
"hideFilters": {}
|
|
100
|
+
}; }
|
|
101
|
+
static get elementRef() { return "el"; }
|
|
102
|
+
}
|