vviinn-widgets 2.7.2 → 2.8.0
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/components/Handler.js +270 -0
- package/dist/components/NonEmptyArray.js +5699 -0
- package/dist/components/cropper-handler.js +6 -0
- package/dist/components/cropper-handler2.js +39 -0
- package/dist/{cjs/customized-slots-06ca4007.js → components/customized-slots.js} +3 -6
- package/dist/components/highlight-box.js +6 -0
- package/dist/components/highlight-box2.js +52 -0
- package/dist/components/image-cropper.js +6 -0
- package/dist/components/image-cropper2.js +138 -0
- package/dist/components/imageSearch.store.js +10686 -0
- package/dist/components/index.js +1 -0
- package/dist/{esm/index-443468c7.js → components/index2.js} +2 -2
- package/dist/components/index3.js +130 -0
- package/dist/components/recommendations-sidebar.js +101 -0
- package/dist/components/resizer.worker.js +11 -0
- package/dist/components/search-filters.js +6 -0
- package/dist/components/search-filters2.js +89 -0
- package/dist/components/tracking.worker.js +11 -0
- package/dist/components/vviinn-carousel.js +6 -0
- package/dist/components/vviinn-carousel2.js +235 -0
- package/dist/components/vviinn-detected-object.js +6 -0
- package/dist/components/vviinn-detected-object2.js +67 -0
- package/dist/components/vviinn-empty-results.js +6 -0
- package/dist/components/vviinn-empty-results2.js +35 -0
- package/dist/components/vviinn-error.js +6 -0
- package/dist/components/vviinn-error2.js +28 -0
- package/dist/components/vviinn-example-image.js +6 -0
- package/dist/components/vviinn-example-image2.js +57 -0
- package/dist/components/vviinn-example-images.js +6 -0
- package/dist/components/vviinn-example-images2.js +53 -0
- package/dist/components/vviinn-image-selector.js +6 -0
- package/dist/components/vviinn-image-selector2.js +135 -0
- package/dist/components/vviinn-image-view.js +6 -0
- package/dist/components/vviinn-image-view2.js +95 -0
- package/dist/components/vviinn-modal.js +6 -0
- package/dist/components/vviinn-modal2.js +46 -0
- package/dist/components/vviinn-onboarding-card-1.js +6 -0
- package/dist/components/vviinn-onboarding-card-12.js +34 -0
- package/dist/components/vviinn-onboarding-card-2.js +6 -0
- package/dist/components/vviinn-onboarding-card-22.js +34 -0
- package/dist/components/vviinn-onboarding-card-3.js +6 -0
- package/dist/components/vviinn-onboarding-card-32.js +34 -0
- package/dist/components/vviinn-onboarding.js +6 -0
- package/dist/components/vviinn-onboarding2.js +63 -0
- package/dist/components/vviinn-overlay.js +6 -0
- package/dist/components/vviinn-overlay2.js +28 -0
- package/dist/components/vviinn-overlayed-modal.js +6 -0
- package/dist/components/vviinn-overlayed-modal2.js +45 -0
- package/dist/components/vviinn-preloader.js +6 -0
- package/dist/components/vviinn-preloader2.js +34 -0
- package/dist/components/vviinn-privacy-badge.js +6 -0
- package/dist/components/vviinn-privacy-badge2.js +33 -0
- package/dist/components/vviinn-product-card.js +6 -0
- package/dist/components/vviinn-product-card2.js +216 -0
- package/dist/components/vviinn-recommendations-sidebar.js +6 -0
- package/dist/components/vviinn-server-error.js +6 -0
- package/dist/components/vviinn-server-error2.js +35 -0
- package/dist/components/vviinn-slide.js +6 -0
- package/dist/components/vviinn-slide2.js +28 -0
- package/dist/components/vviinn-slider.js +6 -0
- package/dist/components/vviinn-slider2.js +159 -0
- package/dist/components/vviinn-teaser.js +6 -0
- package/dist/components/vviinn-teaser2.js +33 -0
- package/dist/components/vviinn-vpr-button.js +93 -0
- package/dist/components/vviinn-vpr-vidget.js +3360 -0
- package/dist/components/vviinn-vpr-widget.js +6 -0
- package/dist/components/vviinn-vps-button.js +224 -0
- package/dist/components/vviinn-vps-widget.js +6 -0
- package/dist/components/vviinn-vps-widget2.js +350 -0
- package/dist/components/vviinn-wrong-format.js +6 -0
- package/dist/components/vviinn-wrong-format2.js +35 -0
- package/dist/types/components/vviinn-product-card/vviinn-product-card.d.ts +1 -0
- package/dist/types/components/vviinn-vpr-button/stories/lol.d.ts +2 -0
- package/dist/types/components/vviinn-vpr-button/stories/vviinn-vpr-button.stories.d.ts +1 -1
- package/dist/vviinn-widgets/Array-bdfc75db.js +4870 -0
- package/dist/vviinn-widgets/Handler-edcb46f4.js +1422 -0
- package/dist/vviinn-widgets/NonEmptyArray-947ab7b3.js +4411 -0
- package/dist/{esm/app-globals-865bc7a7.js → vviinn-widgets/app-globals-c0aa8ec3.js} +922 -10
- package/dist/vviinn-widgets/cropper-handler.entry.js +23 -0
- package/dist/vviinn-widgets/css-shim-f0027935.js +4 -0
- package/dist/{esm/customized-slots-96902edf.js → vviinn-widgets/customized-slots-5c1c623a.js} +1 -1
- package/dist/vviinn-widgets/dom-db0073f0.js +73 -0
- package/dist/vviinn-widgets/highlight-box.entry.js +41 -0
- package/dist/{collection/components/image-search/image-view/image-cropper/image-cropper.js → vviinn-widgets/image-cropper.entry.js} +33 -70
- package/dist/{cjs/index-df6896e2.js → vviinn-widgets/imageSearch.store-0eed9a5c.js} +11598 -15320
- package/dist/{esm/index-2fdd499d.js → vviinn-widgets/imageSearch.store-b28bddb0.js} +11971 -15281
- package/dist/{collection/components/vviinn-icons/index.js → vviinn-widgets/index-44058ea2.js} +14 -11
- package/dist/vviinn-widgets/index-6c6de682.js +3857 -0
- package/dist/vviinn-widgets/index-de3e14da.js +3010 -0
- package/dist/vviinn-widgets/index.esm.js +1 -0
- package/dist/vviinn-widgets/number-171db649.js +1499 -0
- package/dist/vviinn-widgets/search-filters.entry.js +76 -0
- package/dist/vviinn-widgets/shadow-css-c1fdfa9f.js +389 -0
- package/dist/{collection/components/vviinn-carousel/vviinn-carousel.js → vviinn-widgets/vviinn-carousel.entry.js} +18 -113
- package/dist/vviinn-widgets/vviinn-detected-object.entry.js +54 -0
- package/dist/vviinn-widgets/vviinn-empty-results.entry.js +16 -0
- package/dist/vviinn-widgets/vviinn-error.entry.js +15 -0
- package/dist/vviinn-widgets/vviinn-example-image.entry.js +38 -0
- package/dist/vviinn-widgets/vviinn-example-images.entry.js +28 -0
- package/dist/vviinn-widgets/vviinn-image-selector.entry.js +31 -0
- package/dist/vviinn-widgets/vviinn-image-view.entry.js +55 -0
- package/dist/vviinn-widgets/vviinn-modal.entry.js +30 -0
- package/dist/vviinn-widgets/vviinn-onboarding-card-1.entry.js +21 -0
- package/dist/vviinn-widgets/vviinn-onboarding-card-2.entry.js +21 -0
- package/dist/vviinn-widgets/vviinn-onboarding-card-3.entry.js +21 -0
- package/dist/vviinn-widgets/vviinn-onboarding.entry.js +20 -0
- package/dist/vviinn-widgets/vviinn-overlay.entry.js +15 -0
- package/dist/vviinn-widgets/vviinn-overlayed-modal.entry.js +18 -0
- package/dist/vviinn-widgets/vviinn-preloader.entry.js +25 -0
- package/dist/vviinn-widgets/vviinn-privacy-badge.entry.js +20 -0
- package/dist/vviinn-widgets/vviinn-product-card.entry.js +188 -0
- package/dist/{esm → vviinn-widgets}/vviinn-recommendations-sidebar.entry.js +2 -2
- package/dist/vviinn-widgets/vviinn-server-error.entry.js +16 -0
- package/dist/vviinn-widgets/vviinn-slide.entry.js +15 -0
- package/dist/vviinn-widgets/vviinn-slider.entry.js +120 -0
- package/dist/vviinn-widgets/vviinn-teaser.entry.js +20 -0
- package/dist/{esm → vviinn-widgets}/vviinn-vpr-button.entry.js +2 -2
- package/dist/vviinn-widgets/vviinn-vpr-widget.entry.js +4588 -0
- package/dist/{esm → vviinn-widgets}/vviinn-vps-button.entry.js +3 -3
- package/dist/vviinn-widgets/vviinn-vps-widget.entry.js +170 -0
- package/dist/vviinn-widgets/vviinn-widgets.css +6 -1
- package/dist/vviinn-widgets/vviinn-widgets.esm.js +125 -1
- package/dist/vviinn-widgets/vviinn-wrong-format.entry.js +16 -0
- package/package.json +8 -2
- package/www/build/p-06c76b5e.js +1 -0
- package/www/build/p-07e16d04.js +15 -0
- package/{dist/vviinn-widgets/p-a6e0710f.entry.js → www/build/p-44bc50de.entry.js} +1 -1
- package/www/build/p-510922c6.js +1 -0
- package/www/build/p-57ce8de3.css +1 -0
- package/www/build/p-591cb193.entry.js +1 -0
- package/www/build/p-6b9d242e.js +1 -0
- package/www/build/p-880bccf1.js +1 -0
- package/www/build/p-b0ada114.entry.js +1 -0
- package/www/build/p-b7be7c70.entry.js +1 -0
- package/{dist/vviinn-widgets/p-166970f3.js → www/build/p-ea8dea5c.js} +1 -1
- package/www/build/vviinn-widgets.css +1 -1
- package/www/build/vviinn-widgets.esm.js +1 -1
- package/www/index.html +32261 -1
- package/www/sw.js +66 -0
- package/dist/cjs/app-globals-8db3bcbe.js +0 -6912
- package/dist/cjs/cropper-handler_27.cjs.entry.js +0 -1135
- package/dist/cjs/index-3c3ab815.js +0 -1354
- package/dist/cjs/index-f66cd8d1.js +0 -39
- package/dist/cjs/index.cjs.js +0 -2
- package/dist/cjs/loader.cjs.js +0 -23
- package/dist/cjs/vviinn-carousel_2.cjs.entry.js +0 -1001
- package/dist/cjs/vviinn-recommendations-sidebar.cjs.entry.js +0 -65
- package/dist/cjs/vviinn-vpr-button.cjs.entry.js +0 -49
- package/dist/cjs/vviinn-vps-button.cjs.entry.js +0 -43
- package/dist/cjs/vviinn-widgets.cjs.js +0 -21
- package/dist/collection/Image/error.js +0 -14
- package/dist/collection/Image/form.js +0 -5
- package/dist/collection/Image/fromFile.js +0 -18
- package/dist/collection/Image/imageToB64.js +0 -9
- package/dist/collection/Image/index.js +0 -0
- package/dist/collection/Image/renderPromise.js +0 -6
- package/dist/collection/Image/resizeImage.js +0 -28
- package/dist/collection/Image/sizing.js +0 -39
- package/dist/collection/Image/toFile.js +0 -17
- package/dist/collection/analytics/GAnalytics.js +0 -32
- package/dist/collection/analytics/GeneralAnalytics.js +0 -9
- package/dist/collection/analytics/GtagAnalytics.js +0 -35
- package/dist/collection/analytics/ProductAnalytics.js +0 -1
- package/dist/collection/campaign/Campaign.js +0 -8
- package/dist/collection/campaign/CampaignService.js +0 -5
- package/dist/collection/campaign/VCSCampaign.js +0 -1
- package/dist/collection/campaign/VCSCampaignResponse.js +0 -1
- package/dist/collection/campaign/VCSCampaignService.js +0 -7
- package/dist/collection/campaign/VPRCampaignResponse.js +0 -1
- package/dist/collection/campaign/VPRCampaignService.js +0 -7
- package/dist/collection/collection-manifest.json +0 -43
- package/dist/collection/components/customized-slots.js +0 -47
- package/dist/collection/components/image-search/image-view/highlight-box/highlight-box.css +0 -71
- package/dist/collection/components/image-search/image-view/highlight-box/highlight-box.js +0 -25
- package/dist/collection/components/image-search/image-view/image-cropper/cropper-handler/cropper-handler.css +0 -49
- package/dist/collection/components/image-search/image-view/image-cropper/cropper-handler/cropper-handler.js +0 -64
- package/dist/collection/components/image-search/image-view/image-cropper/image-cropper.css +0 -33
- package/dist/collection/components/image-search/search-filters/search-filters.css +0 -120
- package/dist/collection/components/image-search/search-filters/search-filters.js +0 -125
- package/dist/collection/components/vviinn-carousel/vviinn-carousel.css +0 -142
- package/dist/collection/components/vviinn-error/vviinn-empty-results/vviinn-empty-results.css +0 -7
- package/dist/collection/components/vviinn-error/vviinn-empty-results/vviinn-empty-results.js +0 -36
- package/dist/collection/components/vviinn-error/vviinn-error.css +0 -38
- package/dist/collection/components/vviinn-error/vviinn-error.js +0 -18
- package/dist/collection/components/vviinn-error/vviinn-server-error/vviinn-server-error.css +0 -3
- package/dist/collection/components/vviinn-error/vviinn-server-error/vviinn-server-error.js +0 -34
- package/dist/collection/components/vviinn-error/vviinn-wrong-format/vviinn-wrong-format.css +0 -3
- package/dist/collection/components/vviinn-error/vviinn-wrong-format/vviinn-wrong-format.js +0 -34
- package/dist/collection/components/vviinn-example-images/vviinn-example-image/vviinn-example-image.css +0 -34
- package/dist/collection/components/vviinn-example-images/vviinn-example-image/vviinn-example-image.js +0 -129
- package/dist/collection/components/vviinn-example-images/vviinn-example-images.css +0 -19
- package/dist/collection/components/vviinn-example-images/vviinn-example-images.js +0 -80
- package/dist/collection/components/vviinn-image-selector/vviinn-image-selector.css +0 -25
- package/dist/collection/components/vviinn-image-selector/vviinn-image-selector.js +0 -64
- package/dist/collection/components/vviinn-image-view/vviinn-detected-object/vviinn-detected-object.css +0 -47
- package/dist/collection/components/vviinn-image-view/vviinn-detected-object/vviinn-detected-object.js +0 -100
- package/dist/collection/components/vviinn-image-view/vviinn-image-view.css +0 -31
- package/dist/collection/components/vviinn-image-view/vviinn-image-view.js +0 -61
- package/dist/collection/components/vviinn-modal/vviinn-modal.css +0 -105
- package/dist/collection/components/vviinn-modal/vviinn-modal.js +0 -98
- package/dist/collection/components/vviinn-onboarding/onboarding-cards/onboarding-card.css +0 -41
- package/dist/collection/components/vviinn-onboarding/onboarding-cards/vviinn-onboarding-card-1/vviinn-onboarding-card-1.js +0 -26
- package/dist/collection/components/vviinn-onboarding/onboarding-cards/vviinn-onboarding-card-2/vviinn-onboarding-card-2.js +0 -26
- package/dist/collection/components/vviinn-onboarding/onboarding-cards/vviinn-onboarding-card-3/vviinn-onboarding-card-3.js +0 -26
- package/dist/collection/components/vviinn-onboarding/vviinn-onboarding.css +0 -58
- package/dist/collection/components/vviinn-onboarding/vviinn-onboarding.js +0 -28
- package/dist/collection/components/vviinn-overlay/vviinn-overlay.css +0 -33
- package/dist/collection/components/vviinn-overlay/vviinn-overlay.js +0 -15
- package/dist/collection/components/vviinn-overlayed-modal/vviinn-overlayed-modal.css +0 -29
- package/dist/collection/components/vviinn-overlayed-modal/vviinn-overlayed-modal.js +0 -71
- package/dist/collection/components/vviinn-preloader/vviinn-preloader.css +0 -37
- package/dist/collection/components/vviinn-preloader/vviinn-preloader.js +0 -20
- package/dist/collection/components/vviinn-privacy-badge/vviinn-privacy-badge.css +0 -19
- package/dist/collection/components/vviinn-privacy-badge/vviinn-privacy-badge.js +0 -27
- package/dist/collection/components/vviinn-product-card/render-helpers.js +0 -32
- package/dist/collection/components/vviinn-product-card/stories/args.js +0 -73
- package/dist/collection/components/vviinn-product-card/stories/decorators.js +0 -51
- package/dist/collection/components/vviinn-product-card/stories/vviinn-product-card.stories.js +0 -105
- package/dist/collection/components/vviinn-product-card/vviinn-product-card.css +0 -95
- package/dist/collection/components/vviinn-product-card/vviinn-product-card.js +0 -462
- package/dist/collection/components/vviinn-slider/arrow.js +0 -11
- package/dist/collection/components/vviinn-slider/vviinn-slide/vviinn-slide.css +0 -4
- package/dist/collection/components/vviinn-slider/vviinn-slide/vviinn-slide.js +0 -15
- package/dist/collection/components/vviinn-slider/vviinn-slider.css +0 -109
- package/dist/collection/components/vviinn-slider/vviinn-slider.js +0 -181
- package/dist/collection/components/vviinn-teaser/vviinn-teaser.css +0 -14
- package/dist/collection/components/vviinn-teaser/vviinn-teaser.js +0 -29
- package/dist/collection/components/vviinn-vpr-button/recommendations-sidebar/recommendations-sidebar.css +0 -238
- package/dist/collection/components/vviinn-vpr-button/recommendations-sidebar/recommendations-sidebar.js +0 -220
- package/dist/collection/components/vviinn-vpr-button/stories/args.js +0 -213
- package/dist/collection/components/vviinn-vpr-button/stories/vviinn-vpr-button.stories.js +0 -91
- package/dist/collection/components/vviinn-vpr-button/vviinn-vpr-button.css +0 -35
- package/dist/collection/components/vviinn-vpr-button/vviinn-vpr-button.js +0 -179
- package/dist/collection/components/vviinn-vpr-widget/stories/args.js +0 -197
- package/dist/collection/components/vviinn-vpr-widget/stories/decorators.js +0 -29
- package/dist/collection/components/vviinn-vpr-widget/stories/vviinn-vpr-widget.stories.js +0 -211
- package/dist/collection/components/vviinn-vpr-widget/token-helpers.js +0 -11
- package/dist/collection/components/vviinn-vpr-widget/vviinn-vpr-vidget.js +0 -510
- package/dist/collection/components/vviinn-vpr-widget/vviinn-vpr-widget.css +0 -79
- package/dist/collection/components/vviinn-vps-button/stories/vviinn-vps-button.stories.js +0 -35
- package/dist/collection/components/vviinn-vps-button/vviinn-vps-button.css +0 -3
- package/dist/collection/components/vviinn-vps-button/vviinn-vps-button.js +0 -195
- package/dist/collection/components/vviinn-vps-widget/stories/vviinn-vps-widget.stories.js +0 -37
- package/dist/collection/components/vviinn-vps-widget/vviinn-vps-widget.css +0 -350
- package/dist/collection/components/vviinn-vps-widget/vviinn-vps-widget.js +0 -375
- package/dist/collection/cropper/Cropper.js +0 -1
- package/dist/collection/cropper/Handler.js +0 -61
- package/dist/collection/dom/index.js +0 -3
- package/dist/collection/error.js +0 -14
- package/dist/collection/file/index.js +0 -4
- package/dist/collection/geometry/Clip.js +0 -14
- package/dist/collection/geometry/Point.js +0 -32
- package/dist/collection/geometry/Rectangle.js +0 -95
- package/dist/collection/geometry/RectangleAlt.js +0 -1
- package/dist/collection/geometry/Sized.js +0 -8
- package/dist/collection/global.js +0 -19
- package/dist/collection/index.js +0 -1
- package/dist/collection/interfaces/generated.js +0 -5
- package/dist/collection/interfaces/recommendation.js +0 -1
- package/dist/collection/network/apiClient.js +0 -9
- package/dist/collection/network/ion/File.js +0 -14
- package/dist/collection/network/ion/Form.js +0 -64
- package/dist/collection/network/ion/Link.js +0 -8
- package/dist/collection/network/ion/ValueObject.js +0 -23
- package/dist/collection/network/request.js +0 -19
- package/dist/collection/network/utils.js +0 -37
- package/dist/collection/openApi/index.js +0 -27
- package/dist/collection/recommendation/events.js +0 -1
- package/dist/collection/recommendation/recommendation.js +0 -1
- package/dist/collection/searchSession/searchSession.js +0 -31
- package/dist/collection/sentry.js +0 -14
- package/dist/collection/slider/GridMode.js +0 -1
- package/dist/collection/store/file-processing.js +0 -13
- package/dist/collection/store/imageSearch.store.js +0 -133
- package/dist/collection/store/store.js +0 -3
- package/dist/collection/store/tracking.store.js +0 -3
- package/dist/collection/stories/Button.js +0 -21
- package/dist/collection/stories/Button.stories.js +0 -42
- package/dist/collection/stories/Header.js +0 -45
- package/dist/collection/stories/Header.stories.js +0 -15
- package/dist/collection/stories/Page.js +0 -61
- package/dist/collection/stories/Page.stories.js +0 -19
- package/dist/collection/stories/assets/code-brackets.svg +0 -1
- package/dist/collection/stories/assets/colors.svg +0 -1
- package/dist/collection/stories/assets/comments.svg +0 -1
- package/dist/collection/stories/assets/direction.svg +0 -1
- package/dist/collection/stories/assets/flow.svg +0 -1
- package/dist/collection/stories/assets/plugin.svg +0 -1
- package/dist/collection/stories/assets/repo.svg +0 -1
- package/dist/collection/stories/assets/stackalt.svg +0 -1
- package/dist/collection/stories/image-selector.stories.js +0 -6
- package/dist/collection/stories/image-view.stories.js +0 -6
- package/dist/collection/stories/modal.stories.js +0 -12
- package/dist/collection/stories/onboarding.stories.js +0 -11
- package/dist/collection/stories/overlay.stories.js +0 -5
- package/dist/collection/stories/overlayedModal.stories.js +0 -8
- package/dist/collection/stories/privacy-badge.stories.js +0 -11
- package/dist/collection/stories/slider.stories.js +0 -17
- package/dist/collection/stories/teaser.stories.js +0 -5
- package/dist/collection/stories/vps-widget.stories.js +0 -47
- package/dist/collection/stories/vviinn-product.stories.js +0 -19
- package/dist/collection/tracking/event.js +0 -3
- package/dist/collection/tracking/filter.js +0 -5
- package/dist/collection/tracking/index.js +0 -13
- package/dist/collection/tracking/models.js +0 -6
- package/dist/collection/tracking/product.js +0 -18
- package/dist/collection/tracking/search.js +0 -5
- package/dist/collection/tracking/widget.js +0 -10
- package/dist/collection/utils/collections/collectionsUtils.js +0 -5
- package/dist/collection/utils/either.js +0 -3
- package/dist/collection/utils/enum/enumUtils.js +0 -3
- package/dist/collection/utils/event/Events.js +0 -1
- package/dist/collection/utils/number/index.js +0 -4
- package/dist/collection/utils/option/option.js +0 -4
- package/dist/collection/utils/semigroup/semigroupDiff.js +0 -6
- package/dist/collection/utils/token/tokenUtils.js +0 -9
- package/dist/esm/cropper-handler_27.entry.js +0 -1105
- package/dist/esm/index-51f71d18.js +0 -1323
- package/dist/esm/index.js +0 -1
- package/dist/esm/loader.js +0 -19
- package/dist/esm/polyfills/core-js.js +0 -11
- package/dist/esm/polyfills/css-shim.js +0 -1
- package/dist/esm/polyfills/dom.js +0 -79
- package/dist/esm/polyfills/es5-html-element.js +0 -1
- package/dist/esm/polyfills/index.js +0 -34
- package/dist/esm/polyfills/system.js +0 -6
- package/dist/esm/vviinn-carousel_2.entry.js +0 -996
- package/dist/esm/vviinn-widgets.js +0 -19
- package/dist/index.cjs.js +0 -1
- package/dist/index.js +0 -1
- package/dist/loader/cdn.js +0 -3
- package/dist/loader/index.cjs.js +0 -3
- package/dist/loader/index.d.ts +0 -12
- package/dist/loader/index.es2017.js +0 -3
- package/dist/loader/index.js +0 -4
- package/dist/loader/package.json +0 -10
- package/dist/vviinn-widgets/p-2dd35f19.entry.js +0 -1
- package/dist/vviinn-widgets/p-3469b71a.js +0 -1
- package/dist/vviinn-widgets/p-40bea5b5.entry.js +0 -1
- package/dist/vviinn-widgets/p-465d043d.js +0 -15
- package/dist/vviinn-widgets/p-59bd2a99.js +0 -1
- package/dist/vviinn-widgets/p-74ed36af.entry.js +0 -1
- package/dist/vviinn-widgets/p-9def6b8b.entry.js +0 -1
- package/dist/vviinn-widgets/p-cd995515.js +0 -1
- package/www/build/p-166970f3.js +0 -1
- package/www/build/p-2dd35f19.entry.js +0 -1
- package/www/build/p-3469b71a.js +0 -1
- package/www/build/p-40bea5b5.entry.js +0 -1
- package/www/build/p-465d043d.js +0 -15
- package/www/build/p-59bd2a99.js +0 -1
- package/www/build/p-61933b75.js +0 -1
- package/www/build/p-74ed36af.entry.js +0 -1
- package/www/build/p-9def6b8b.entry.js +0 -1
- package/www/build/p-a67898be.css +0 -1
- package/www/build/p-a6e0710f.entry.js +0 -1
- package/www/build/p-cd995515.js +0 -1
- package/www/favicon.ico +0 -0
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { r as registerInstance, f as createEvent, h, e as Host, g as getElement } from './index-de3e14da.js';
|
|
2
|
+
import { a as imageSearchState } from './imageSearch.store-b28bddb0.js';
|
|
3
|
+
import { b as CheckIcon } from './index-44058ea2.js';
|
|
4
|
+
import './number-171db649.js';
|
|
5
|
+
import './NonEmptyArray-947ab7b3.js';
|
|
6
|
+
import './Handler-edcb46f4.js';
|
|
7
|
+
import './Array-bdfc75db.js';
|
|
8
|
+
|
|
9
|
+
const searchFiltersCss = ":host{display:grid;grid-gap:1rem}.filters{display:flex;flex-direction:row;flex-wrap:wrap;gap:0.5rem}.filter{align-items:center;-webkit-animation-duration:0.25s;animation-duration:0.25s;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards;-webkit-animation-name:scalein;animation-name:scalein;border:1px solid lightgray;cursor:pointer;display:flex;flex-direction:row;grid-gap:8px;height:-webkit-max-content;height:-moz-max-content;height:max-content;min-width:-webkit-max-content;min-width:-moz-max-content;min-width:max-content;padding:0.1rem;transform:scale(0);transition-property:background;transition-duration:0.25s;transition-timing-function:ease-in-out;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;padding:6px 16px}.filter.active{border:1px solid black;padding:6px 8px}.filter:hover{border:1px solid gray}.show-more{display:flex}.show-more.hidden{display:none}.show-more::after{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\");display:block;height:16px;margin-top:1px;margin-left:8px}.show-more.active::after{transform:rotateX(180deg)}@-webkit-keyframes scalein{from{opacity:0;transform:scale(0.5)}to{opacity:1;transform:scale(1)}}@keyframes scalein{from{opacity:0;transform:scale(0.5)}to{opacity:1;transform:scale(1)}}@media (max-width: 415px){.show-more::after{transform:rotate(-90deg)}.show-more.active::after{transform:rotate(90deg)}}@media (max-width: 800px){.filters{flex-wrap:nowrap;overflow-x:scroll;-ms-scroll-snap-type:x mandatory;scroll-snap-type:x mandatory;grid-gap:unset}.filter{scroll-snap-align:end;margin-right:0.5rem}}";
|
|
10
|
+
|
|
11
|
+
const FILTERS_COUNT = 5;
|
|
12
|
+
const ACTIVE_FILTER_CLASSNAME = ".filter.active";
|
|
13
|
+
const getFilterId = (filter) => filter.href.split("/").reverse()[0];
|
|
14
|
+
let SearchFilters = class {
|
|
15
|
+
constructor(hostRef) {
|
|
16
|
+
registerInstance(this, hostRef);
|
|
17
|
+
this.filterSelected = createEvent(this, "filterSelected", 7);
|
|
18
|
+
this.filter = null;
|
|
19
|
+
this.selectedCategoryId = null;
|
|
20
|
+
this.hideFilters = true;
|
|
21
|
+
}
|
|
22
|
+
handleFilterSelection(filter) {
|
|
23
|
+
return this.isFilterSelected(filter)
|
|
24
|
+
? this.clearSelectedFilter()
|
|
25
|
+
: this.selectFilter(filter);
|
|
26
|
+
}
|
|
27
|
+
selectFilter(filter) {
|
|
28
|
+
this.selectedCategoryId = getFilterId(filter);
|
|
29
|
+
imageSearchState.activeIonLink = filter;
|
|
30
|
+
this.filterSelected.emit("select");
|
|
31
|
+
}
|
|
32
|
+
clearSelectedFilter() {
|
|
33
|
+
this.selectedCategoryId = null;
|
|
34
|
+
imageSearchState.activeIonLink = undefined;
|
|
35
|
+
this.findSelectedFilter().blur();
|
|
36
|
+
this.filterSelected.emit("deselect");
|
|
37
|
+
}
|
|
38
|
+
findSelectedFilter() {
|
|
39
|
+
return this.el.shadowRoot.querySelector(ACTIVE_FILTER_CLASSNAME);
|
|
40
|
+
}
|
|
41
|
+
toggleFilters() {
|
|
42
|
+
this.hideFilters = !this.hideFilters;
|
|
43
|
+
}
|
|
44
|
+
handleEnter(ev, f) {
|
|
45
|
+
if (ev.key !== "Enter")
|
|
46
|
+
return;
|
|
47
|
+
this.handleFilterSelection(f);
|
|
48
|
+
}
|
|
49
|
+
isFilterSelected(filterLink) {
|
|
50
|
+
return this.selectedCategoryId === getFilterId(filterLink);
|
|
51
|
+
}
|
|
52
|
+
render() {
|
|
53
|
+
return (h(Host, { exportparts: "filter, show-more-filters" }, h("div", { class: "filters" }, this.filter.filters
|
|
54
|
+
.filter((_, i) => (this.hideFilters ? i < FILTERS_COUNT : true))
|
|
55
|
+
.map((f, n) => (h("div", { role: "button", tabindex: "0", part: this.isFilterSelected(f) ? "filter active" : "filter", class: {
|
|
56
|
+
filter: true,
|
|
57
|
+
active: this.selectedCategoryId === getFilterId(f),
|
|
58
|
+
}, style: { "animation-delay": `${n * 10}ms` }, onPointerUp: (ev) => {
|
|
59
|
+
ev.stopPropagation();
|
|
60
|
+
this.handleFilterSelection(f);
|
|
61
|
+
}, onKeyPress: (ev) => this.handleEnter(ev, f) }, this.isFilterSelected(f) ? h(CheckIcon, null) : null, f.name))), h("div", { class: {
|
|
62
|
+
filter: true,
|
|
63
|
+
"show-more": true,
|
|
64
|
+
hidden: this.filter.filters.length <= FILTERS_COUNT,
|
|
65
|
+
active: !this.hideFilters,
|
|
66
|
+
}, role: "button", tabindex: "0", "aria-role": "button", onClick: () => this.toggleFilters(), onKeyPress: (ev) => {
|
|
67
|
+
if (ev.key === "Enter") {
|
|
68
|
+
this.toggleFilters();
|
|
69
|
+
}
|
|
70
|
+
}, part: "show-more-filters" }, this.hideFilters ? "Zeige mehr" : "Zeige weniger"))));
|
|
71
|
+
}
|
|
72
|
+
get el() { return getElement(this); }
|
|
73
|
+
};
|
|
74
|
+
SearchFilters.style = searchFiltersCss;
|
|
75
|
+
|
|
76
|
+
export { SearchFilters as search_filters };
|
|
@@ -0,0 +1,389 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Stencil Client Platform v2.9.0 | MIT Licensed | https://stenciljs.com
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* @license
|
|
6
|
+
* Copyright Google Inc. All Rights Reserved.
|
|
7
|
+
*
|
|
8
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
9
|
+
* found in the LICENSE file at https://angular.io/license
|
|
10
|
+
*
|
|
11
|
+
* This file is a port of shadowCSS from webcomponents.js to TypeScript.
|
|
12
|
+
* https://github.com/webcomponents/webcomponentsjs/blob/4efecd7e0e/src/ShadowCSS/ShadowCSS.js
|
|
13
|
+
* https://github.com/angular/angular/blob/master/packages/compiler/src/shadow_css.ts
|
|
14
|
+
*/
|
|
15
|
+
const safeSelector = (selector) => {
|
|
16
|
+
const placeholders = [];
|
|
17
|
+
let index = 0;
|
|
18
|
+
let content;
|
|
19
|
+
// Replaces attribute selectors with placeholders.
|
|
20
|
+
// The WS in [attr="va lue"] would otherwise be interpreted as a selector separator.
|
|
21
|
+
selector = selector.replace(/(\[[^\]]*\])/g, (_, keep) => {
|
|
22
|
+
const replaceBy = `__ph-${index}__`;
|
|
23
|
+
placeholders.push(keep);
|
|
24
|
+
index++;
|
|
25
|
+
return replaceBy;
|
|
26
|
+
});
|
|
27
|
+
// Replaces the expression in `:nth-child(2n + 1)` with a placeholder.
|
|
28
|
+
// WS and "+" would otherwise be interpreted as selector separators.
|
|
29
|
+
content = selector.replace(/(:nth-[-\w]+)(\([^)]+\))/g, (_, pseudo, exp) => {
|
|
30
|
+
const replaceBy = `__ph-${index}__`;
|
|
31
|
+
placeholders.push(exp);
|
|
32
|
+
index++;
|
|
33
|
+
return pseudo + replaceBy;
|
|
34
|
+
});
|
|
35
|
+
const ss = {
|
|
36
|
+
content,
|
|
37
|
+
placeholders,
|
|
38
|
+
};
|
|
39
|
+
return ss;
|
|
40
|
+
};
|
|
41
|
+
const restoreSafeSelector = (placeholders, content) => {
|
|
42
|
+
return content.replace(/__ph-(\d+)__/g, (_, index) => placeholders[+index]);
|
|
43
|
+
};
|
|
44
|
+
const _polyfillHost = '-shadowcsshost';
|
|
45
|
+
const _polyfillSlotted = '-shadowcssslotted';
|
|
46
|
+
// note: :host-context pre-processed to -shadowcsshostcontext.
|
|
47
|
+
const _polyfillHostContext = '-shadowcsscontext';
|
|
48
|
+
const _parenSuffix = ')(?:\\((' + '(?:\\([^)(]*\\)|[^)(]*)+?' + ')\\))?([^,{]*)';
|
|
49
|
+
const _cssColonHostRe = new RegExp('(' + _polyfillHost + _parenSuffix, 'gim');
|
|
50
|
+
const _cssColonHostContextRe = new RegExp('(' + _polyfillHostContext + _parenSuffix, 'gim');
|
|
51
|
+
const _cssColonSlottedRe = new RegExp('(' + _polyfillSlotted + _parenSuffix, 'gim');
|
|
52
|
+
const _polyfillHostNoCombinator = _polyfillHost + '-no-combinator';
|
|
53
|
+
const _polyfillHostNoCombinatorRe = /-shadowcsshost-no-combinator([^\s]*)/;
|
|
54
|
+
const _shadowDOMSelectorsRe = [/::shadow/g, /::content/g];
|
|
55
|
+
const _selectorReSuffix = '([>\\s~+[.,{:][\\s\\S]*)?$';
|
|
56
|
+
const _polyfillHostRe = /-shadowcsshost/gim;
|
|
57
|
+
const _colonHostRe = /:host/gim;
|
|
58
|
+
const _colonSlottedRe = /::slotted/gim;
|
|
59
|
+
const _colonHostContextRe = /:host-context/gim;
|
|
60
|
+
const _commentRe = /\/\*\s*[\s\S]*?\*\//g;
|
|
61
|
+
const stripComments = (input) => {
|
|
62
|
+
return input.replace(_commentRe, '');
|
|
63
|
+
};
|
|
64
|
+
const _commentWithHashRe = /\/\*\s*#\s*source(Mapping)?URL=[\s\S]+?\*\//g;
|
|
65
|
+
const extractCommentsWithHash = (input) => {
|
|
66
|
+
return input.match(_commentWithHashRe) || [];
|
|
67
|
+
};
|
|
68
|
+
const _ruleRe = /(\s*)([^;\{\}]+?)(\s*)((?:{%BLOCK%}?\s*;?)|(?:\s*;))/g;
|
|
69
|
+
const _curlyRe = /([{}])/g;
|
|
70
|
+
const OPEN_CURLY = '{';
|
|
71
|
+
const CLOSE_CURLY = '}';
|
|
72
|
+
const BLOCK_PLACEHOLDER = '%BLOCK%';
|
|
73
|
+
const processRules = (input, ruleCallback) => {
|
|
74
|
+
const inputWithEscapedBlocks = escapeBlocks(input);
|
|
75
|
+
let nextBlockIndex = 0;
|
|
76
|
+
return inputWithEscapedBlocks.escapedString.replace(_ruleRe, (...m) => {
|
|
77
|
+
const selector = m[2];
|
|
78
|
+
let content = '';
|
|
79
|
+
let suffix = m[4];
|
|
80
|
+
let contentPrefix = '';
|
|
81
|
+
if (suffix && suffix.startsWith('{' + BLOCK_PLACEHOLDER)) {
|
|
82
|
+
content = inputWithEscapedBlocks.blocks[nextBlockIndex++];
|
|
83
|
+
suffix = suffix.substring(BLOCK_PLACEHOLDER.length + 1);
|
|
84
|
+
contentPrefix = '{';
|
|
85
|
+
}
|
|
86
|
+
const cssRule = {
|
|
87
|
+
selector,
|
|
88
|
+
content,
|
|
89
|
+
};
|
|
90
|
+
const rule = ruleCallback(cssRule);
|
|
91
|
+
return `${m[1]}${rule.selector}${m[3]}${contentPrefix}${rule.content}${suffix}`;
|
|
92
|
+
});
|
|
93
|
+
};
|
|
94
|
+
const escapeBlocks = (input) => {
|
|
95
|
+
const inputParts = input.split(_curlyRe);
|
|
96
|
+
const resultParts = [];
|
|
97
|
+
const escapedBlocks = [];
|
|
98
|
+
let bracketCount = 0;
|
|
99
|
+
let currentBlockParts = [];
|
|
100
|
+
for (let partIndex = 0; partIndex < inputParts.length; partIndex++) {
|
|
101
|
+
const part = inputParts[partIndex];
|
|
102
|
+
if (part === CLOSE_CURLY) {
|
|
103
|
+
bracketCount--;
|
|
104
|
+
}
|
|
105
|
+
if (bracketCount > 0) {
|
|
106
|
+
currentBlockParts.push(part);
|
|
107
|
+
}
|
|
108
|
+
else {
|
|
109
|
+
if (currentBlockParts.length > 0) {
|
|
110
|
+
escapedBlocks.push(currentBlockParts.join(''));
|
|
111
|
+
resultParts.push(BLOCK_PLACEHOLDER);
|
|
112
|
+
currentBlockParts = [];
|
|
113
|
+
}
|
|
114
|
+
resultParts.push(part);
|
|
115
|
+
}
|
|
116
|
+
if (part === OPEN_CURLY) {
|
|
117
|
+
bracketCount++;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
if (currentBlockParts.length > 0) {
|
|
121
|
+
escapedBlocks.push(currentBlockParts.join(''));
|
|
122
|
+
resultParts.push(BLOCK_PLACEHOLDER);
|
|
123
|
+
}
|
|
124
|
+
const strEscapedBlocks = {
|
|
125
|
+
escapedString: resultParts.join(''),
|
|
126
|
+
blocks: escapedBlocks,
|
|
127
|
+
};
|
|
128
|
+
return strEscapedBlocks;
|
|
129
|
+
};
|
|
130
|
+
const insertPolyfillHostInCssText = (selector) => {
|
|
131
|
+
selector = selector
|
|
132
|
+
.replace(_colonHostContextRe, _polyfillHostContext)
|
|
133
|
+
.replace(_colonHostRe, _polyfillHost)
|
|
134
|
+
.replace(_colonSlottedRe, _polyfillSlotted);
|
|
135
|
+
return selector;
|
|
136
|
+
};
|
|
137
|
+
const convertColonRule = (cssText, regExp, partReplacer) => {
|
|
138
|
+
// m[1] = :host(-context), m[2] = contents of (), m[3] rest of rule
|
|
139
|
+
return cssText.replace(regExp, (...m) => {
|
|
140
|
+
if (m[2]) {
|
|
141
|
+
const parts = m[2].split(',');
|
|
142
|
+
const r = [];
|
|
143
|
+
for (let i = 0; i < parts.length; i++) {
|
|
144
|
+
const p = parts[i].trim();
|
|
145
|
+
if (!p)
|
|
146
|
+
break;
|
|
147
|
+
r.push(partReplacer(_polyfillHostNoCombinator, p, m[3]));
|
|
148
|
+
}
|
|
149
|
+
return r.join(',');
|
|
150
|
+
}
|
|
151
|
+
else {
|
|
152
|
+
return _polyfillHostNoCombinator + m[3];
|
|
153
|
+
}
|
|
154
|
+
});
|
|
155
|
+
};
|
|
156
|
+
const colonHostPartReplacer = (host, part, suffix) => {
|
|
157
|
+
return host + part.replace(_polyfillHost, '') + suffix;
|
|
158
|
+
};
|
|
159
|
+
const convertColonHost = (cssText) => {
|
|
160
|
+
return convertColonRule(cssText, _cssColonHostRe, colonHostPartReplacer);
|
|
161
|
+
};
|
|
162
|
+
const colonHostContextPartReplacer = (host, part, suffix) => {
|
|
163
|
+
if (part.indexOf(_polyfillHost) > -1) {
|
|
164
|
+
return colonHostPartReplacer(host, part, suffix);
|
|
165
|
+
}
|
|
166
|
+
else {
|
|
167
|
+
return host + part + suffix + ', ' + part + ' ' + host + suffix;
|
|
168
|
+
}
|
|
169
|
+
};
|
|
170
|
+
const convertColonSlotted = (cssText, slotScopeId) => {
|
|
171
|
+
const slotClass = '.' + slotScopeId + ' > ';
|
|
172
|
+
const selectors = [];
|
|
173
|
+
cssText = cssText.replace(_cssColonSlottedRe, (...m) => {
|
|
174
|
+
if (m[2]) {
|
|
175
|
+
const compound = m[2].trim();
|
|
176
|
+
const suffix = m[3];
|
|
177
|
+
const slottedSelector = slotClass + compound + suffix;
|
|
178
|
+
let prefixSelector = '';
|
|
179
|
+
for (let i = m[4] - 1; i >= 0; i--) {
|
|
180
|
+
const char = m[5][i];
|
|
181
|
+
if (char === '}' || char === ',') {
|
|
182
|
+
break;
|
|
183
|
+
}
|
|
184
|
+
prefixSelector = char + prefixSelector;
|
|
185
|
+
}
|
|
186
|
+
const orgSelector = prefixSelector + slottedSelector;
|
|
187
|
+
const addedSelector = `${prefixSelector.trimRight()}${slottedSelector.trim()}`;
|
|
188
|
+
if (orgSelector.trim() !== addedSelector.trim()) {
|
|
189
|
+
const updatedSelector = `${addedSelector}, ${orgSelector}`;
|
|
190
|
+
selectors.push({
|
|
191
|
+
orgSelector,
|
|
192
|
+
updatedSelector,
|
|
193
|
+
});
|
|
194
|
+
}
|
|
195
|
+
return slottedSelector;
|
|
196
|
+
}
|
|
197
|
+
else {
|
|
198
|
+
return _polyfillHostNoCombinator + m[3];
|
|
199
|
+
}
|
|
200
|
+
});
|
|
201
|
+
return {
|
|
202
|
+
selectors,
|
|
203
|
+
cssText,
|
|
204
|
+
};
|
|
205
|
+
};
|
|
206
|
+
const convertColonHostContext = (cssText) => {
|
|
207
|
+
return convertColonRule(cssText, _cssColonHostContextRe, colonHostContextPartReplacer);
|
|
208
|
+
};
|
|
209
|
+
const convertShadowDOMSelectors = (cssText) => {
|
|
210
|
+
return _shadowDOMSelectorsRe.reduce((result, pattern) => result.replace(pattern, ' '), cssText);
|
|
211
|
+
};
|
|
212
|
+
const makeScopeMatcher = (scopeSelector) => {
|
|
213
|
+
const lre = /\[/g;
|
|
214
|
+
const rre = /\]/g;
|
|
215
|
+
scopeSelector = scopeSelector.replace(lre, '\\[').replace(rre, '\\]');
|
|
216
|
+
return new RegExp('^(' + scopeSelector + ')' + _selectorReSuffix, 'm');
|
|
217
|
+
};
|
|
218
|
+
const selectorNeedsScoping = (selector, scopeSelector) => {
|
|
219
|
+
const re = makeScopeMatcher(scopeSelector);
|
|
220
|
+
return !re.test(selector);
|
|
221
|
+
};
|
|
222
|
+
const applySimpleSelectorScope = (selector, scopeSelector, hostSelector) => {
|
|
223
|
+
// In Android browser, the lastIndex is not reset when the regex is used in String.replace()
|
|
224
|
+
_polyfillHostRe.lastIndex = 0;
|
|
225
|
+
if (_polyfillHostRe.test(selector)) {
|
|
226
|
+
const replaceBy = `.${hostSelector}`;
|
|
227
|
+
return selector
|
|
228
|
+
.replace(_polyfillHostNoCombinatorRe, (_, selector) => {
|
|
229
|
+
return selector.replace(/([^:]*)(:*)(.*)/, (_, before, colon, after) => {
|
|
230
|
+
return before + replaceBy + colon + after;
|
|
231
|
+
});
|
|
232
|
+
})
|
|
233
|
+
.replace(_polyfillHostRe, replaceBy + ' ');
|
|
234
|
+
}
|
|
235
|
+
return scopeSelector + ' ' + selector;
|
|
236
|
+
};
|
|
237
|
+
const applyStrictSelectorScope = (selector, scopeSelector, hostSelector) => {
|
|
238
|
+
const isRe = /\[is=([^\]]*)\]/g;
|
|
239
|
+
scopeSelector = scopeSelector.replace(isRe, (_, ...parts) => parts[0]);
|
|
240
|
+
const className = '.' + scopeSelector;
|
|
241
|
+
const _scopeSelectorPart = (p) => {
|
|
242
|
+
let scopedP = p.trim();
|
|
243
|
+
if (!scopedP) {
|
|
244
|
+
return '';
|
|
245
|
+
}
|
|
246
|
+
if (p.indexOf(_polyfillHostNoCombinator) > -1) {
|
|
247
|
+
scopedP = applySimpleSelectorScope(p, scopeSelector, hostSelector);
|
|
248
|
+
}
|
|
249
|
+
else {
|
|
250
|
+
// remove :host since it should be unnecessary
|
|
251
|
+
const t = p.replace(_polyfillHostRe, '');
|
|
252
|
+
if (t.length > 0) {
|
|
253
|
+
const matches = t.match(/([^:]*)(:*)(.*)/);
|
|
254
|
+
if (matches) {
|
|
255
|
+
scopedP = matches[1] + className + matches[2] + matches[3];
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
return scopedP;
|
|
260
|
+
};
|
|
261
|
+
const safeContent = safeSelector(selector);
|
|
262
|
+
selector = safeContent.content;
|
|
263
|
+
let scopedSelector = '';
|
|
264
|
+
let startIndex = 0;
|
|
265
|
+
let res;
|
|
266
|
+
const sep = /( |>|\+|~(?!=))\s*/g;
|
|
267
|
+
// If a selector appears before :host it should not be shimmed as it
|
|
268
|
+
// matches on ancestor elements and not on elements in the host's shadow
|
|
269
|
+
// `:host-context(div)` is transformed to
|
|
270
|
+
// `-shadowcsshost-no-combinatordiv, div -shadowcsshost-no-combinator`
|
|
271
|
+
// the `div` is not part of the component in the 2nd selectors and should not be scoped.
|
|
272
|
+
// Historically `component-tag:host` was matching the component so we also want to preserve
|
|
273
|
+
// this behavior to avoid breaking legacy apps (it should not match).
|
|
274
|
+
// The behavior should be:
|
|
275
|
+
// - `tag:host` -> `tag[h]` (this is to avoid breaking legacy apps, should not match anything)
|
|
276
|
+
// - `tag :host` -> `tag [h]` (`tag` is not scoped because it's considered part of a
|
|
277
|
+
// `:host-context(tag)`)
|
|
278
|
+
const hasHost = selector.indexOf(_polyfillHostNoCombinator) > -1;
|
|
279
|
+
// Only scope parts after the first `-shadowcsshost-no-combinator` when it is present
|
|
280
|
+
let shouldScope = !hasHost;
|
|
281
|
+
while ((res = sep.exec(selector)) !== null) {
|
|
282
|
+
const separator = res[1];
|
|
283
|
+
const part = selector.slice(startIndex, res.index).trim();
|
|
284
|
+
shouldScope = shouldScope || part.indexOf(_polyfillHostNoCombinator) > -1;
|
|
285
|
+
const scopedPart = shouldScope ? _scopeSelectorPart(part) : part;
|
|
286
|
+
scopedSelector += `${scopedPart} ${separator} `;
|
|
287
|
+
startIndex = sep.lastIndex;
|
|
288
|
+
}
|
|
289
|
+
const part = selector.substring(startIndex);
|
|
290
|
+
shouldScope = shouldScope || part.indexOf(_polyfillHostNoCombinator) > -1;
|
|
291
|
+
scopedSelector += shouldScope ? _scopeSelectorPart(part) : part;
|
|
292
|
+
// replace the placeholders with their original values
|
|
293
|
+
return restoreSafeSelector(safeContent.placeholders, scopedSelector);
|
|
294
|
+
};
|
|
295
|
+
const scopeSelector = (selector, scopeSelectorText, hostSelector, slotSelector) => {
|
|
296
|
+
return selector
|
|
297
|
+
.split(',')
|
|
298
|
+
.map((shallowPart) => {
|
|
299
|
+
if (slotSelector && shallowPart.indexOf('.' + slotSelector) > -1) {
|
|
300
|
+
return shallowPart.trim();
|
|
301
|
+
}
|
|
302
|
+
if (selectorNeedsScoping(shallowPart, scopeSelectorText)) {
|
|
303
|
+
return applyStrictSelectorScope(shallowPart, scopeSelectorText, hostSelector).trim();
|
|
304
|
+
}
|
|
305
|
+
else {
|
|
306
|
+
return shallowPart.trim();
|
|
307
|
+
}
|
|
308
|
+
})
|
|
309
|
+
.join(', ');
|
|
310
|
+
};
|
|
311
|
+
const scopeSelectors = (cssText, scopeSelectorText, hostSelector, slotSelector, commentOriginalSelector) => {
|
|
312
|
+
return processRules(cssText, (rule) => {
|
|
313
|
+
let selector = rule.selector;
|
|
314
|
+
let content = rule.content;
|
|
315
|
+
if (rule.selector[0] !== '@') {
|
|
316
|
+
selector = scopeSelector(rule.selector, scopeSelectorText, hostSelector, slotSelector);
|
|
317
|
+
}
|
|
318
|
+
else if (rule.selector.startsWith('@media') ||
|
|
319
|
+
rule.selector.startsWith('@supports') ||
|
|
320
|
+
rule.selector.startsWith('@page') ||
|
|
321
|
+
rule.selector.startsWith('@document')) {
|
|
322
|
+
content = scopeSelectors(rule.content, scopeSelectorText, hostSelector, slotSelector);
|
|
323
|
+
}
|
|
324
|
+
const cssRule = {
|
|
325
|
+
selector: selector.replace(/\s{2,}/g, ' ').trim(),
|
|
326
|
+
content,
|
|
327
|
+
};
|
|
328
|
+
return cssRule;
|
|
329
|
+
});
|
|
330
|
+
};
|
|
331
|
+
const scopeCssText = (cssText, scopeId, hostScopeId, slotScopeId, commentOriginalSelector) => {
|
|
332
|
+
cssText = insertPolyfillHostInCssText(cssText);
|
|
333
|
+
cssText = convertColonHost(cssText);
|
|
334
|
+
cssText = convertColonHostContext(cssText);
|
|
335
|
+
const slotted = convertColonSlotted(cssText, slotScopeId);
|
|
336
|
+
cssText = slotted.cssText;
|
|
337
|
+
cssText = convertShadowDOMSelectors(cssText);
|
|
338
|
+
if (scopeId) {
|
|
339
|
+
cssText = scopeSelectors(cssText, scopeId, hostScopeId, slotScopeId);
|
|
340
|
+
}
|
|
341
|
+
cssText = cssText.replace(/-shadowcsshost-no-combinator/g, `.${hostScopeId}`);
|
|
342
|
+
cssText = cssText.replace(/>\s*\*\s+([^{, ]+)/gm, ' $1 ');
|
|
343
|
+
return {
|
|
344
|
+
cssText: cssText.trim(),
|
|
345
|
+
slottedSelectors: slotted.selectors,
|
|
346
|
+
};
|
|
347
|
+
};
|
|
348
|
+
const scopeCss = (cssText, scopeId, commentOriginalSelector) => {
|
|
349
|
+
const hostScopeId = scopeId + '-h';
|
|
350
|
+
const slotScopeId = scopeId + '-s';
|
|
351
|
+
const commentsWithHash = extractCommentsWithHash(cssText);
|
|
352
|
+
cssText = stripComments(cssText);
|
|
353
|
+
const orgSelectors = [];
|
|
354
|
+
if (commentOriginalSelector) {
|
|
355
|
+
const processCommentedSelector = (rule) => {
|
|
356
|
+
const placeholder = `/*!@___${orgSelectors.length}___*/`;
|
|
357
|
+
const comment = `/*!@${rule.selector}*/`;
|
|
358
|
+
orgSelectors.push({ placeholder, comment });
|
|
359
|
+
rule.selector = placeholder + rule.selector;
|
|
360
|
+
return rule;
|
|
361
|
+
};
|
|
362
|
+
cssText = processRules(cssText, (rule) => {
|
|
363
|
+
if (rule.selector[0] !== '@') {
|
|
364
|
+
return processCommentedSelector(rule);
|
|
365
|
+
}
|
|
366
|
+
else if (rule.selector.startsWith('@media') ||
|
|
367
|
+
rule.selector.startsWith('@supports') ||
|
|
368
|
+
rule.selector.startsWith('@page') ||
|
|
369
|
+
rule.selector.startsWith('@document')) {
|
|
370
|
+
rule.content = processRules(rule.content, processCommentedSelector);
|
|
371
|
+
return rule;
|
|
372
|
+
}
|
|
373
|
+
return rule;
|
|
374
|
+
});
|
|
375
|
+
}
|
|
376
|
+
const scoped = scopeCssText(cssText, scopeId, hostScopeId, slotScopeId);
|
|
377
|
+
cssText = [scoped.cssText, ...commentsWithHash].join('\n');
|
|
378
|
+
if (commentOriginalSelector) {
|
|
379
|
+
orgSelectors.forEach(({ placeholder, comment }) => {
|
|
380
|
+
cssText = cssText.replace(placeholder, comment);
|
|
381
|
+
});
|
|
382
|
+
}
|
|
383
|
+
scoped.slottedSelectors.forEach((slottedSelector) => {
|
|
384
|
+
cssText = cssText.replace(slottedSelector.orgSelector, slottedSelector.updatedSelector);
|
|
385
|
+
});
|
|
386
|
+
return cssText;
|
|
387
|
+
};
|
|
388
|
+
|
|
389
|
+
export { scopeCss };
|
|
@@ -1,15 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { ChevronIcon } from
|
|
1
|
+
import { r as registerInstance, h, e as Host, g as getElement } from './index-de3e14da.js';
|
|
2
|
+
import { _ as _Array } from './Array-bdfc75db.js';
|
|
3
|
+
import { c as ChevronIcon } from './index-44058ea2.js';
|
|
4
|
+
import './NonEmptyArray-947ab7b3.js';
|
|
5
|
+
|
|
6
|
+
const vviinnCarouselCss = ":host{--vviinn-progressbar-width:0;--vviinn-carousel-item-width:150px;--vviinn-carousel-columns-internal:var(--vviinn-carousel-columns, 4);--vviinn-carousel-image-width-system:140px}.body{display:flex;position:relative;width:var(--vviinn-carousel-content-width);flex-direction:column}.content-wrapper *{box-sizing:border-box}.content-wrapper{overflow-y:hidden;overflow-x:auto;flex-grow:1}.bullets{margin-top:16px;display:flex;flex-direction:row;grid-gap:24px;justify-content:center}.bullet{width:10px;height:10px;background:#E0E0E0;border-radius:50%;cursor:pointer}.bullet.active{background:#161616}.content:not(.show-scrollbar),.content.grid{scrollbar-color:#fff0 #fff0}.content:not(.show-scrollbar)::-webkit-scrollbar,.content.grid::-webkit-scrollbar{opacity:0}.content{display:flex;flex-direction:row;grid-gap:8px;-ms-scroll-snap-type:x mandatory;scroll-snap-type:x mandatory;overflow-y:hidden;overflow-x:auto;flex-grow:1;padding-bottom:16px}.content.left>*{scroll-snap-align:start}.content.right>*{scroll-snap-align:end}:host(.continuity) button{border-radius:2px}:host(.grid) button{border-radius:50%}button{align-items:center;background-color:white;border:none;box-shadow:0px 2px 6px rgba(0, 0, 0, 0.15);cursor:pointer;display:grid;height:40px;justify-items:center;position:absolute;top:calc(50% - 20px);width:40px;z-index:1;padding:0;margin:0}button{fill:#525252}button.prev svg{transform:rotate(180deg);margin-left:-5px}.prev{left:0}.next{right:0}.items-group{display:grid;grid-gap:16px;grid-template-columns:repeat(var(--vviinn-carousel-columns-internal), 1fr);min-width:100%}vviinn-product-card::part(price-container){text-align:center}:host(.classic) vviinn-product-card::part(title),:host(.classic) vviinn-product-card::part(brand),:host(.classic) vviinn-product-card::part(type){text-align:center}@media (max-width: 480px){:host(.modern) button{display:none}.items-group{grid-template-columns:repeat(2, 1fr)}}";
|
|
7
|
+
|
|
4
8
|
const COLUMNS_NUMBER_CSS_VAR = "--vviinn-carousel-columns-internal";
|
|
5
9
|
const CAROUSEL_WIDTH_CSS_VAR = "--vviinn-carousel-content-width";
|
|
6
10
|
const CAROUSEL_IMAGE_WIDTH_CSS_VAR = "--vviinn-carousel-image-width";
|
|
7
11
|
const CONTENT_GROUP_CSS_CLASS = "items-group";
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
export class VviinnCarousel {
|
|
12
|
-
constructor() {
|
|
12
|
+
let VviinnCarousel = class {
|
|
13
|
+
constructor(hostRef) {
|
|
14
|
+
registerInstance(this, hostRef);
|
|
13
15
|
this.moveDirection = "right";
|
|
14
16
|
this.contentGroups = [];
|
|
15
17
|
this.activeContentGroup = 0;
|
|
@@ -187,7 +189,7 @@ export class VviinnCarousel {
|
|
|
187
189
|
}
|
|
188
190
|
renderGrid() {
|
|
189
191
|
const recommendations = this.renderRecommendationsElements();
|
|
190
|
-
const grouppedContent = chunksOf(this.getColumnsNumber())(recommendations);
|
|
192
|
+
const grouppedContent = _Array.chunksOf(this.getColumnsNumber())(recommendations);
|
|
191
193
|
return this.renderRecommendationGroups(grouppedContent);
|
|
192
194
|
}
|
|
193
195
|
renderBullets() {
|
|
@@ -199,107 +201,10 @@ export class VviinnCarousel {
|
|
|
199
201
|
}, onClick: () => this.scroll(index) })));
|
|
200
202
|
}
|
|
201
203
|
render() {
|
|
202
|
-
return (h(Host, { class: this.getClassMap() },
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
this.showBullets() ? (h("div", { class: "bullets" }, this.renderBullets())) : ("")));
|
|
210
|
-
}
|
|
211
|
-
static get is() { return "vviinn-carousel"; }
|
|
212
|
-
static get originalStyleUrls() { return {
|
|
213
|
-
"$": ["vviinn-carousel.css"]
|
|
214
|
-
}; }
|
|
215
|
-
static get styleUrls() { return {
|
|
216
|
-
"$": ["vviinn-carousel.css"]
|
|
217
|
-
}; }
|
|
218
|
-
static get properties() { return {
|
|
219
|
-
"mode": {
|
|
220
|
-
"type": "string",
|
|
221
|
-
"mutable": false,
|
|
222
|
-
"complexType": {
|
|
223
|
-
"original": "CarouselMode",
|
|
224
|
-
"resolved": "\"continuity\" | \"grid\"",
|
|
225
|
-
"references": {
|
|
226
|
-
"CarouselMode": {
|
|
227
|
-
"location": "local"
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
},
|
|
231
|
-
"required": false,
|
|
232
|
-
"optional": false,
|
|
233
|
-
"docs": {
|
|
234
|
-
"tags": [],
|
|
235
|
-
"text": ""
|
|
236
|
-
},
|
|
237
|
-
"attribute": "mode",
|
|
238
|
-
"reflect": false,
|
|
239
|
-
"defaultValue": "\"continuity\""
|
|
240
|
-
},
|
|
241
|
-
"imageWidth": {
|
|
242
|
-
"type": "number",
|
|
243
|
-
"mutable": false,
|
|
244
|
-
"complexType": {
|
|
245
|
-
"original": "number",
|
|
246
|
-
"resolved": "number",
|
|
247
|
-
"references": {}
|
|
248
|
-
},
|
|
249
|
-
"required": false,
|
|
250
|
-
"optional": false,
|
|
251
|
-
"docs": {
|
|
252
|
-
"tags": [],
|
|
253
|
-
"text": ""
|
|
254
|
-
},
|
|
255
|
-
"attribute": "image-width",
|
|
256
|
-
"reflect": false,
|
|
257
|
-
"defaultValue": "140"
|
|
258
|
-
},
|
|
259
|
-
"showScroll": {
|
|
260
|
-
"type": "boolean",
|
|
261
|
-
"mutable": false,
|
|
262
|
-
"complexType": {
|
|
263
|
-
"original": "boolean",
|
|
264
|
-
"resolved": "boolean",
|
|
265
|
-
"references": {}
|
|
266
|
-
},
|
|
267
|
-
"required": false,
|
|
268
|
-
"optional": false,
|
|
269
|
-
"docs": {
|
|
270
|
-
"tags": [],
|
|
271
|
-
"text": ""
|
|
272
|
-
},
|
|
273
|
-
"attribute": "show-scroll",
|
|
274
|
-
"reflect": false,
|
|
275
|
-
"defaultValue": "true"
|
|
276
|
-
},
|
|
277
|
-
"recommendations": {
|
|
278
|
-
"type": "unknown",
|
|
279
|
-
"mutable": false,
|
|
280
|
-
"complexType": {
|
|
281
|
-
"original": "Recommendation[]",
|
|
282
|
-
"resolved": "{ groupId?: string; productId?: string; title?: string; deeplink?: string; brand?: string; productType?: string; image?: { original?: string; thumbnail?: string; }; price?: { actual?: number; sale?: number; }; }[]",
|
|
283
|
-
"references": {
|
|
284
|
-
"Recommendation": {
|
|
285
|
-
"location": "import",
|
|
286
|
-
"path": "../../recommendation/recommendation"
|
|
287
|
-
}
|
|
288
|
-
}
|
|
289
|
-
},
|
|
290
|
-
"required": false,
|
|
291
|
-
"optional": false,
|
|
292
|
-
"docs": {
|
|
293
|
-
"tags": [],
|
|
294
|
-
"text": ""
|
|
295
|
-
},
|
|
296
|
-
"defaultValue": "[]"
|
|
297
|
-
}
|
|
298
|
-
}; }
|
|
299
|
-
static get states() { return {
|
|
300
|
-
"moveDirection": {},
|
|
301
|
-
"contentGroups": {},
|
|
302
|
-
"activeContentGroup": {}
|
|
303
|
-
}; }
|
|
304
|
-
static get elementRef() { return "el"; }
|
|
305
|
-
}
|
|
204
|
+
return (h(Host, { class: this.getClassMap() }, h("div", { class: Object.assign({ body: true }, this.getClassMap()) }, h("button", { class: "prev", onClick: () => this.showPrev(), part: "carousel-button" }, h(ChevronIcon, null)), h("div", { class: this.getContentClassMap(), onScroll: () => this.processScrollbarWidth() }, this.renderRecommendations()), h("button", { class: "next", onClick: () => this.showNext(), part: "carousel-button" }, h(ChevronIcon, null))), this.showBullets() ? (h("div", { class: "bullets" }, this.renderBullets())) : ("")));
|
|
205
|
+
}
|
|
206
|
+
get el() { return getElement(this); }
|
|
207
|
+
};
|
|
208
|
+
VviinnCarousel.style = vviinnCarouselCss;
|
|
209
|
+
|
|
210
|
+
export { VviinnCarousel as vviinn_carousel };
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { r as registerInstance, f as createEvent, h, e as Host } from './index-de3e14da.js';
|
|
2
|
+
import { _ as _function } from './NonEmptyArray-947ab7b3.js';
|
|
3
|
+
import { O as Option } from './number-171db649.js';
|
|
4
|
+
import { a as imageSearchState, u as fromAlt, v as foldValueObject, w as scaleWithSized, x as center, r as makeRectangularSearchRequest, y as detectedObjectEq } from './imageSearch.store-b28bddb0.js';
|
|
5
|
+
import './Handler-edcb46f4.js';
|
|
6
|
+
import './Array-bdfc75db.js';
|
|
7
|
+
|
|
8
|
+
const vviinnDetectedObjectCss = ":host{--color-primary-system:#0F62FE;--color-primary-hover-system:#014CDA;--color-icons-system:#2F8EDF;--spacer:8px}:host{--size:32px;--x-position:0;--y-position:0;background:rgba(22, 22, 22, 0.5);border-radius:50%;border:none;cursor:pointer;display:block;height:var(--size);position:absolute;transition:opacity 0.25s;width:var(--size);z-index:2;transform:translate(calc(var(--x-position) - (var(--size) * 0.5)), calc(var(--y-position) - (var(--size) * 0.5)));transition:background 0.1 ease-in-out}:host(:hover){background:rgba(22, 22, 22, 0.75)}:host(.active){background:var(--color-primary, var(--color-primary-system))!important;border:2px solid white}:host::after{--size:32px;border-radius:50%;content:\"\";cursor:pointer;display:block;height:calc(var(--size) * 0.25);transform:translate(calc(-50% + var(--size) * 0.5), calc(-50% + var(--size) * 0.5));width:calc(var(--size) * 0.25);background:white}";
|
|
9
|
+
|
|
10
|
+
let VviinnDetectedObject = class {
|
|
11
|
+
constructor(hostRef) {
|
|
12
|
+
registerInstance(this, hostRef);
|
|
13
|
+
this.detectedObjectClicked = createEvent(this, "detectedObjectClicked", 7);
|
|
14
|
+
this.position = ["0", "0"];
|
|
15
|
+
}
|
|
16
|
+
getObjectPosition() {
|
|
17
|
+
return _function.pipe(imageSearchState.imageBounds, Option.map((bounds) => {
|
|
18
|
+
const objectRectangle = fromAlt(foldValueObject(this.detectedObject).rectangle);
|
|
19
|
+
const { x, y } = _function.pipe(objectRectangle, scaleWithSized(bounds), center);
|
|
20
|
+
return [`${x}px`, `${y}px`];
|
|
21
|
+
}), Option.getOrElse(() => ["0", "0"]));
|
|
22
|
+
}
|
|
23
|
+
selectDetectedObject() {
|
|
24
|
+
_function.pipe(imageSearchState.imageBounds, Option.map((bounds) => {
|
|
25
|
+
const rectangle = foldValueObject(this.detectedObject).rectangle;
|
|
26
|
+
const transformedRect = fromAlt(rectangle);
|
|
27
|
+
const scaledRect = scaleWithSized(bounds)(transformedRect);
|
|
28
|
+
imageSearchState.detectedObject = this.detectedObject;
|
|
29
|
+
imageSearchState.searchArea = Option.some(scaledRect);
|
|
30
|
+
}));
|
|
31
|
+
makeRectangularSearchRequest();
|
|
32
|
+
this.detectedObjectClicked.emit();
|
|
33
|
+
}
|
|
34
|
+
isActive() {
|
|
35
|
+
if (!this.detectedObject)
|
|
36
|
+
return false;
|
|
37
|
+
if (!imageSearchState.detectedObject)
|
|
38
|
+
return false;
|
|
39
|
+
const thisObject = foldValueObject(this.detectedObject);
|
|
40
|
+
const savedObject = foldValueObject(imageSearchState.detectedObject);
|
|
41
|
+
return detectedObjectEq.equals(thisObject, savedObject);
|
|
42
|
+
}
|
|
43
|
+
render() {
|
|
44
|
+
return (h(Host, { class: {
|
|
45
|
+
active: this.isActive(),
|
|
46
|
+
}, onClick: () => this.selectDetectedObject(), style: {
|
|
47
|
+
"--x-position": this.getObjectPosition()[0],
|
|
48
|
+
"--y-position": this.getObjectPosition()[1],
|
|
49
|
+
} }));
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
VviinnDetectedObject.style = vviinnDetectedObjectCss;
|
|
53
|
+
|
|
54
|
+
export { VviinnDetectedObject as vviinn_detected_object };
|