@blaze-cms/react-page-builder 0.123.0-alpha.21 → 0.123.0-alpha.24
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/CHANGELOG.md +39 -867
- package/lib/components/Card/Card.js +9 -4
- package/lib/components/Card/Card.js.map +1 -1
- package/lib/components/DataSummary/helpers/get-link-based-on-value.js +4 -0
- package/lib/components/DataSummary/helpers/get-link-based-on-value.js.map +1 -1
- package/lib/components/SearchFilter/SearchFilter/FiltersList.js +16 -11
- package/lib/components/SearchFilter/SearchFilter/FiltersList.js.map +1 -1
- package/lib/components/SearchFilter/components/Select.js +22 -10
- package/lib/components/SearchFilter/components/Select.js.map +1 -1
- package/lib/constants/index.js +5 -2
- package/lib/constants/index.js.map +1 -1
- package/lib-es/components/Card/Card.js +9 -4
- package/lib-es/components/Card/Card.js.map +1 -1
- package/lib-es/components/DataSummary/helpers/get-link-based-on-value.js +5 -1
- package/lib-es/components/DataSummary/helpers/get-link-based-on-value.js.map +1 -1
- package/lib-es/components/SearchFilter/SearchFilter/FiltersList.js +20 -16
- package/lib-es/components/SearchFilter/SearchFilter/FiltersList.js.map +1 -1
- package/lib-es/components/SearchFilter/components/Select.js +22 -6
- package/lib-es/components/SearchFilter/components/Select.js.map +1 -1
- package/lib-es/constants/index.js +3 -1
- package/lib-es/constants/index.js.map +1 -1
- package/package.json +3 -3
- package/src/components/Card/Card.js +9 -3
- package/src/components/DataSummary/helpers/get-link-based-on-value.js +9 -1
- package/src/components/SearchFilter/SearchFilter/FiltersList.js +5 -2
- package/src/components/SearchFilter/components/Select.js +29 -6
- package/src/constants/index.js +3 -1
- package/tests/unit/src/components/Card/__snapshots__/Card.test.js.snap +10 -10
- package/tests/unit/src/components/Card/__snapshots__/CardContainer.test.js.snap +4 -4
- package/tests/unit/src/components/Card/__snapshots__/CardRender.test.js.snap +1 -1
- package/tests/unit/src/components/DataSummary/helpers/get-link-based-on-value.test.js +29 -0
- package/tests/unit/src/components/List/components/Cards/__snapshots__/CardsRender.test.js.snap +12 -12
- package/tests/unit/src/components/SearchFilter/components/Select.test.js +58 -4
- package/tests/unit/src/components/SearchFilter/components/__snapshots__/Select.test.js.snap +28 -5
- package/coverage/clover.xml +0 -3149
- package/coverage/coverage-final.json +0 -257
- package/coverage/lcov-report/HOC/index.html +0 -141
- package/coverage/lcov-report/HOC/index.js.html +0 -89
- package/coverage/lcov-report/HOC/withInfiniteScroll.js.html +0 -311
- package/coverage/lcov-report/HOC/withTitle.js.html +0 -185
- package/coverage/lcov-report/PBContext/index.html +0 -111
- package/coverage/lcov-report/PBContext/index.js.html +0 -95
- package/coverage/lcov-report/application/query/index.html +0 -111
- package/coverage/lcov-report/application/query/index.js.html +0 -482
- package/coverage/lcov-report/base.css +0 -224
- package/coverage/lcov-report/block-navigation.js +0 -79
- package/coverage/lcov-report/components/Banner/Banner.js.html +0 -260
- package/coverage/lcov-report/components/Banner/BannerRender.js.html +0 -464
- package/coverage/lcov-report/components/Banner/helpers.js.html +0 -515
- package/coverage/lcov-report/components/Banner/index.html +0 -156
- package/coverage/lcov-report/components/Banner/index.js.html +0 -89
- package/coverage/lcov-report/components/BlazeLink.js.html +0 -197
- package/coverage/lcov-report/components/Button.js.html +0 -353
- package/coverage/lcov-report/components/Card/Card.js.html +0 -548
- package/coverage/lcov-report/components/Card/CardContainer.js.html +0 -407
- package/coverage/lcov-report/components/Card/CardFactory.js.html +0 -218
- package/coverage/lcov-report/components/Card/CardRender.js.html +0 -806
- package/coverage/lcov-report/components/Card/constants.js.html +0 -89
- package/coverage/lcov-report/components/Card/helpers/get-dynamic-grid-classes.js.html +0 -137
- package/coverage/lcov-report/components/Card/helpers/get-published-listing-url.js.html +0 -92
- package/coverage/lcov-report/components/Card/helpers/index.html +0 -156
- package/coverage/lcov-report/components/Card/helpers/index.js.html +0 -89
- package/coverage/lcov-report/components/Card/helpers/use-dynamic-size-key.js.html +0 -98
- package/coverage/lcov-report/components/Card/index.html +0 -186
- package/coverage/lcov-report/components/Card/index.js.html +0 -89
- package/coverage/lcov-report/components/Carousel/Carousel.js.html +0 -185
- package/coverage/lcov-report/components/Carousel/CarouselImage/CarouselImage.js.html +0 -224
- package/coverage/lcov-report/components/Carousel/CarouselImage/index.html +0 -126
- package/coverage/lcov-report/components/Carousel/CarouselImage/index.js.html +0 -89
- package/coverage/lcov-report/components/Carousel/CarouselRender/CarouselRender.js.html +0 -335
- package/coverage/lcov-report/components/Carousel/CarouselRender/index.html +0 -126
- package/coverage/lcov-report/components/Carousel/CarouselRender/index.js.html +0 -89
- package/coverage/lcov-report/components/Carousel/index.html +0 -126
- package/coverage/lcov-report/components/Carousel/index.js.html +0 -89
- package/coverage/lcov-report/components/ClickWrapper.js.html +0 -191
- package/coverage/lcov-report/components/Code.js.html +0 -155
- package/coverage/lcov-report/components/DataSummary/DataSummaryFactory.js.html +0 -293
- package/coverage/lcov-report/components/DataSummary/DataSummaryRender.js.html +0 -272
- package/coverage/lcov-report/components/DataSummary/DataSummaryTypes/HeadingLargeSummary/HeadingLargeSummary.js.html +0 -149
- package/coverage/lcov-report/components/DataSummary/DataSummaryTypes/HeadingLargeSummary/HeadingLargeSummaryContent.js.html +0 -134
- package/coverage/lcov-report/components/DataSummary/DataSummaryTypes/HeadingLargeSummary/index.html +0 -141
- package/coverage/lcov-report/components/DataSummary/DataSummaryTypes/HeadingLargeSummary/index.js.html +0 -89
- package/coverage/lcov-report/components/DataSummary/DataSummaryTypes/ItemDetailsSummary/ItemDetailsSummary.js.html +0 -140
- package/coverage/lcov-report/components/DataSummary/DataSummaryTypes/ItemDetailsSummary/ItemDetailsSummaryContent.js.html +0 -161
- package/coverage/lcov-report/components/DataSummary/DataSummaryTypes/ItemDetailsSummary/index.html +0 -141
- package/coverage/lcov-report/components/DataSummary/DataSummaryTypes/ItemDetailsSummary/index.js.html +0 -89
- package/coverage/lcov-report/components/DataSummary/DataSummaryTypes/LargeSummary/LargeSummary.js.html +0 -140
- package/coverage/lcov-report/components/DataSummary/DataSummaryTypes/LargeSummary/LargeSummaryContent.js.html +0 -188
- package/coverage/lcov-report/components/DataSummary/DataSummaryTypes/LargeSummary/index.html +0 -141
- package/coverage/lcov-report/components/DataSummary/DataSummaryTypes/LargeSummary/index.js.html +0 -89
- package/coverage/lcov-report/components/DataSummary/DataSummaryTypes/ListSummary/ListSummary.js.html +0 -140
- package/coverage/lcov-report/components/DataSummary/DataSummaryTypes/ListSummary/ListSummaryContent.js.html +0 -185
- package/coverage/lcov-report/components/DataSummary/DataSummaryTypes/ListSummary/index.html +0 -141
- package/coverage/lcov-report/components/DataSummary/DataSummaryTypes/ListSummary/index.js.html +0 -89
- package/coverage/lcov-report/components/DataSummary/DataSummaryTypes/TextSummary/TextSummary.js.html +0 -140
- package/coverage/lcov-report/components/DataSummary/DataSummaryTypes/TextSummary/TextSummaryContent.js.html +0 -182
- package/coverage/lcov-report/components/DataSummary/DataSummaryTypes/TextSummary/index.html +0 -141
- package/coverage/lcov-report/components/DataSummary/DataSummaryTypes/TextSummary/index.js.html +0 -89
- package/coverage/lcov-report/components/DataSummary/DataSummaryTypes/index.html +0 -111
- package/coverage/lcov-report/components/DataSummary/DataSummaryTypes/index.js.html +0 -137
- package/coverage/lcov-report/components/DataSummary/helpers/build-props-to-display-with-content.js.html +0 -188
- package/coverage/lcov-report/components/DataSummary/helpers/get-data-summary-query.js.html +0 -131
- package/coverage/lcov-report/components/DataSummary/helpers/get-link-to-published-content.js.html +0 -110
- package/coverage/lcov-report/components/DataSummary/helpers/get-prop-value.js.html +0 -152
- package/coverage/lcov-report/components/DataSummary/helpers/get-value-from-array.js.html +0 -131
- package/coverage/lcov-report/components/DataSummary/helpers/index.html +0 -201
- package/coverage/lcov-report/components/DataSummary/helpers/index.js.html +0 -113
- package/coverage/lcov-report/components/DataSummary/helpers/strip-summary-props-content.js.html +0 -137
- package/coverage/lcov-report/components/DataSummary/index.html +0 -141
- package/coverage/lcov-report/components/DataSummary/index.js.html +0 -89
- package/coverage/lcov-report/components/Image/GlobalLightbox/GlobalLightbox.js.html +0 -674
- package/coverage/lcov-report/components/Image/GlobalLightbox/NavButton.js.html +0 -158
- package/coverage/lcov-report/components/Image/GlobalLightbox/index.html +0 -141
- package/coverage/lcov-report/components/Image/GlobalLightbox/index.js.html +0 -95
- package/coverage/lcov-report/components/Image/Image.js.html +0 -542
- package/coverage/lcov-report/components/Image/ImageDetails.js.html +0 -149
- package/coverage/lcov-report/components/Image/ImageFactory.js.html +0 -260
- package/coverage/lcov-report/components/Image/ImageRender.js.html +0 -299
- package/coverage/lcov-report/components/Image/Lightbox/Lightbox.js.html +0 -311
- package/coverage/lcov-report/components/Image/Lightbox/index.html +0 -126
- package/coverage/lcov-report/components/Image/Lightbox/index.js.html +0 -89
- package/coverage/lcov-report/components/Image/index.html +0 -171
- package/coverage/lcov-report/components/Image/index.js.html +0 -89
- package/coverage/lcov-report/components/Layout/Layout.js.html +0 -227
- package/coverage/lcov-report/components/Layout/constants.js.html +0 -98
- package/coverage/lcov-report/components/Layout/helpers/check-if-row-has-columns.js.html +0 -143
- package/coverage/lcov-report/components/Layout/helpers/get-styles-to-update.js.html +0 -107
- package/coverage/lcov-report/components/Layout/helpers/index.html +0 -141
- package/coverage/lcov-report/components/Layout/helpers/index.js.html +0 -92
- package/coverage/lcov-report/components/Layout/index.html +0 -141
- package/coverage/lcov-report/components/Layout/index.js.html +0 -89
- package/coverage/lcov-report/components/LazyImage/LazyImage.js.html +0 -161
- package/coverage/lcov-report/components/LazyImage/index.html +0 -126
- package/coverage/lcov-report/components/LazyImage/index.js.html +0 -89
- package/coverage/lcov-report/components/List/ListBuilder.js.html +0 -551
- package/coverage/lcov-report/components/List/ListFactory.js.html +0 -569
- package/coverage/lcov-report/components/List/ListRender.js.html +0 -356
- package/coverage/lcov-report/components/List/components/Cards/CardsRender.js.html +0 -305
- package/coverage/lcov-report/components/List/components/Cards/CardsRenderItem.js.html +0 -389
- package/coverage/lcov-report/components/List/components/Cards/CardsRenderWrapper.js.html +0 -173
- package/coverage/lcov-report/components/List/components/Cards/index.html +0 -156
- package/coverage/lcov-report/components/List/components/Cards/index.js.html +0 -89
- package/coverage/lcov-report/components/List/components/Full/FullRender.js.html +0 -242
- package/coverage/lcov-report/components/List/components/Full/FullRenderItem.js.html +0 -344
- package/coverage/lcov-report/components/List/components/Full/index.html +0 -141
- package/coverage/lcov-report/components/List/components/Full/index.js.html +0 -89
- package/coverage/lcov-report/components/List/components/Pagination/Classic.js.html +0 -206
- package/coverage/lcov-report/components/List/components/Pagination/ListPagination.js.html +0 -266
- package/coverage/lcov-report/components/List/components/Pagination/LoadMore.js.html +0 -182
- package/coverage/lcov-report/components/List/components/Pagination/index.html +0 -156
- package/coverage/lcov-report/components/List/components/Pagination/index.js.html +0 -89
- package/coverage/lcov-report/components/List/components/helpers/check-if-should-render-banner.js.html +0 -116
- package/coverage/lcov-report/components/List/components/helpers/check-if-should-render-gtm.js.html +0 -125
- package/coverage/lcov-report/components/List/components/helpers/index.html +0 -141
- package/coverage/lcov-report/components/List/components/helpers/index.js.html +0 -86
- package/coverage/lcov-report/components/List/components/index.html +0 -111
- package/coverage/lcov-report/components/List/components/index.js.html +0 -92
- package/coverage/lcov-report/components/List/constants.js.html +0 -95
- package/coverage/lcov-report/components/List/helpers/build-pagination-items.js.html +0 -182
- package/coverage/lcov-report/components/List/helpers/build-pagination-url.js.html +0 -113
- package/coverage/lcov-report/components/List/helpers/index.html +0 -141
- package/coverage/lcov-report/components/List/helpers/index.js.html +0 -83
- package/coverage/lcov-report/components/List/index.html +0 -171
- package/coverage/lcov-report/components/List/index.js.html +0 -89
- package/coverage/lcov-report/components/Login/Login.js.html +0 -359
- package/coverage/lcov-report/components/Login/index.html +0 -141
- package/coverage/lcov-report/components/Login/index.js.html +0 -89
- package/coverage/lcov-report/components/Login/loginMutation.js.html +0 -113
- package/coverage/lcov-report/components/Modal/Modal.js.html +0 -167
- package/coverage/lcov-report/components/Modal/index.html +0 -126
- package/coverage/lcov-report/components/Modal/index.js.html +0 -89
- package/coverage/lcov-report/components/SearchFilter/SearchFilter/FiltersList.js.html +0 -371
- package/coverage/lcov-report/components/SearchFilter/SearchFilter/MobileBottom.js.html +0 -218
- package/coverage/lcov-report/components/SearchFilter/SearchFilter/MobileTop.js.html +0 -146
- package/coverage/lcov-report/components/SearchFilter/SearchFilter/SearchFilter.js.html +0 -455
- package/coverage/lcov-report/components/SearchFilter/SearchFilter/index.html +0 -171
- package/coverage/lcov-report/components/SearchFilter/SearchFilter/index.js.html +0 -89
- package/coverage/lcov-report/components/SearchFilter/SearchFilterContainer.js.html +0 -398
- package/coverage/lcov-report/components/SearchFilter/components/Checkbox.js.html +0 -368
- package/coverage/lcov-report/components/SearchFilter/components/Range.js.html +0 -401
- package/coverage/lcov-report/components/SearchFilter/components/Select.js.html +0 -245
- package/coverage/lcov-report/components/SearchFilter/components/TextSearch.js.html +0 -206
- package/coverage/lcov-report/components/SearchFilter/components/index.html +0 -171
- package/coverage/lcov-report/components/SearchFilter/components/index.js.html +0 -98
- package/coverage/lcov-report/components/SearchFilter/constants.js.html +0 -239
- package/coverage/lcov-report/components/SearchFilter/helpers/build-new-query.js.html +0 -98
- package/coverage/lcov-report/components/SearchFilter/helpers/build-query-params.js.html +0 -155
- package/coverage/lcov-report/components/SearchFilter/helpers/build-raw-query-stringified.js.html +0 -221
- package/coverage/lcov-report/components/SearchFilter/helpers/calculate-min-max.js.html +0 -119
- package/coverage/lcov-report/components/SearchFilter/helpers/calculate-step.js.html +0 -92
- package/coverage/lcov-report/components/SearchFilter/helpers/check-if-range-updated.js.html +0 -104
- package/coverage/lcov-report/components/SearchFilter/helpers/decode-encode.js.html +0 -95
- package/coverage/lcov-report/components/SearchFilter/helpers/get-display-value.js.html +0 -98
- package/coverage/lcov-report/components/SearchFilter/helpers/get-intersected-prop.js.html +0 -98
- package/coverage/lcov-report/components/SearchFilter/helpers/get-range-value.js.html +0 -155
- package/coverage/lcov-report/components/SearchFilter/helpers/get-search-values.js.html +0 -308
- package/coverage/lcov-report/components/SearchFilter/helpers/get-select-options.js.html +0 -134
- package/coverage/lcov-report/components/SearchFilter/helpers/get-updated-ranges.js.html +0 -101
- package/coverage/lcov-report/components/SearchFilter/helpers/index.html +0 -381
- package/coverage/lcov-report/components/SearchFilter/helpers/index.js.html +0 -200
- package/coverage/lcov-report/components/SearchFilter/helpers/is-device-desktop.js.html +0 -95
- package/coverage/lcov-report/components/SearchFilter/helpers/remove-props-from-updated-ranges.js.html +0 -116
- package/coverage/lcov-report/components/SearchFilter/helpers/remove-updated-ranges.js.html +0 -98
- package/coverage/lcov-report/components/SearchFilter/helpers/set-updated-ranges-in-storage.js.html +0 -113
- package/coverage/lcov-report/components/SearchFilter/helpers/set-updated-ranges.js.html +0 -116
- package/coverage/lcov-report/components/SearchFilter/index.html +0 -141
- package/coverage/lcov-report/components/SearchFilter/index.js.html +0 -89
- package/coverage/lcov-report/components/SearchFilterSort/SearchFilterSort.js.html +0 -233
- package/coverage/lcov-report/components/SearchFilterSort/constants.js.html +0 -98
- package/coverage/lcov-report/components/SearchFilterSort/helpers/handle-sort-update.js.html +0 -158
- package/coverage/lcov-report/components/SearchFilterSort/helpers/index.html +0 -141
- package/coverage/lcov-report/components/SearchFilterSort/helpers/index.js.html +0 -86
- package/coverage/lcov-report/components/SearchFilterSort/helpers/update-sort.js.html +0 -110
- package/coverage/lcov-report/components/SearchFilterSort/index.html +0 -141
- package/coverage/lcov-report/components/SearchFilterSort/index.js.html +0 -89
- package/coverage/lcov-report/components/SocialFollow/SFItem.js.html +0 -152
- package/coverage/lcov-report/components/SocialFollow/SocialFollow.js.html +0 -179
- package/coverage/lcov-report/components/SocialFollow/SocialFollowRender.js.html +0 -182
- package/coverage/lcov-report/components/SocialFollow/index.html +0 -171
- package/coverage/lcov-report/components/SocialFollow/index.js.html +0 -89
- package/coverage/lcov-report/components/SocialFollow/sf.config.js.html +0 -206
- package/coverage/lcov-report/components/TextBlock/TextBlockRender.js.html +0 -113
- package/coverage/lcov-report/components/TextBlock/index.html +0 -126
- package/coverage/lcov-report/components/TextBlock/index.js.html +0 -188
- package/coverage/lcov-report/components/Video/Video.js.html +0 -266
- package/coverage/lcov-report/components/Video/VideoRender.js.html +0 -137
- package/coverage/lcov-report/components/Video/index.html +0 -141
- package/coverage/lcov-report/components/Video/index.js.html +0 -89
- package/coverage/lcov-report/components/Video/providers/Default.js.html +0 -149
- package/coverage/lcov-report/components/Video/providers/JWPlayer/JWPlayerController.js.html +0 -212
- package/coverage/lcov-report/components/Video/providers/JWPlayer/JWPlayerProvider.js.html +0 -311
- package/coverage/lcov-report/components/Video/providers/JWPlayer/index.html +0 -126
- package/coverage/lcov-report/components/Video/providers/YouTube/YouTubeProvider.js.html +0 -179
- package/coverage/lcov-report/components/Video/providers/YouTube/helpers/index.html +0 -111
- package/coverage/lcov-report/components/Video/providers/YouTube/helpers/index.js.html +0 -116
- package/coverage/lcov-report/components/Video/providers/YouTube/index.html +0 -111
- package/coverage/lcov-report/components/Video/providers/get-provider.js.html +0 -131
- package/coverage/lcov-report/components/Video/providers/index.html +0 -141
- package/coverage/lcov-report/components/Video/providers/index.js.html +0 -89
- package/coverage/lcov-report/components/Wrapper.js.html +0 -161
- package/coverage/lcov-report/components/index.html +0 -186
- package/coverage/lcov-report/components/index.js.html +0 -167
- package/coverage/lcov-report/constants/componentsDefaultValues.js.html +0 -143
- package/coverage/lcov-report/constants/index.html +0 -126
- package/coverage/lcov-report/constants/index.js.html +0 -671
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/helpers/build-image-properties.js.html +0 -137
- package/coverage/lcov-report/helpers/build-inherited-filters.js.html +0 -350
- package/coverage/lcov-report/helpers/build-link-extra-props.js.html +0 -119
- package/coverage/lcov-report/helpers/build-props-query.js.html +0 -263
- package/coverage/lcov-report/helpers/build-query-fields.js.html +0 -119
- package/coverage/lcov-report/helpers/build-raw-query-base.js.html +0 -353
- package/coverage/lcov-report/helpers/build-raw-query.js.html +0 -323
- package/coverage/lcov-report/helpers/build-search-values-checkbox-select.js.html +0 -278
- package/coverage/lcov-report/helpers/build-search-values-text.js.html +0 -125
- package/coverage/lcov-report/helpers/build-set-filters.js.html +0 -197
- package/coverage/lcov-report/helpers/check-for-error.js.html +0 -110
- package/coverage/lcov-report/helpers/check-props-to-use.js.html +0 -110
- package/coverage/lcov-report/helpers/check-sort-by.js.html +0 -92
- package/coverage/lcov-report/helpers/entities/constants.js.html +0 -116
- package/coverage/lcov-report/helpers/entities/index.html +0 -111
- package/coverage/lcov-report/helpers/get-banner-data.js.html +0 -92
- package/coverage/lcov-report/helpers/get-click-wrapper-options.js.html +0 -170
- package/coverage/lcov-report/helpers/get-current-offset.js.html +0 -101
- package/coverage/lcov-report/helpers/get-dictionary-match.js.html +0 -116
- package/coverage/lcov-report/helpers/get-display-count-data.js.html +0 -119
- package/coverage/lcov-report/helpers/get-elasticsearch-operator.js.html +0 -95
- package/coverage/lcov-report/helpers/get-entities-with-banner.js.html +0 -107
- package/coverage/lcov-report/helpers/get-entity-data.js.html +0 -113
- package/coverage/lcov-report/helpers/get-entity-render-props.js.html +0 -128
- package/coverage/lcov-report/helpers/get-filter-props.js.html +0 -242
- package/coverage/lcov-report/helpers/get-filter-relation-keys.js.html +0 -107
- package/coverage/lcov-report/helpers/get-generic-props.js.html +0 -113
- package/coverage/lcov-report/helpers/get-generic-render-variables.js.html +0 -200
- package/coverage/lcov-report/helpers/get-image-ids.js.html +0 -185
- package/coverage/lcov-report/helpers/get-inherited-filters.js.html +0 -122
- package/coverage/lcov-report/helpers/get-items-to-display-ids.js.html +0 -110
- package/coverage/lcov-report/helpers/get-modifiers.js.html +0 -137
- package/coverage/lcov-report/helpers/get-not-equal-query.js.html +0 -107
- package/coverage/lcov-report/helpers/get-pagination-index.js.html +0 -107
- package/coverage/lcov-report/helpers/get-parsed-prop-values.js.html +0 -197
- package/coverage/lcov-report/helpers/get-parsed-summary-value.js.html +0 -128
- package/coverage/lcov-report/helpers/get-prop-values.js.html +0 -143
- package/coverage/lcov-report/helpers/get-query-filters.js.html +0 -149
- package/coverage/lcov-report/helpers/get-query-props.js.html +0 -182
- package/coverage/lcov-report/helpers/get-required-schemas.js.html +0 -164
- package/coverage/lcov-report/helpers/get-sanitized-prop-values.js.html +0 -92
- package/coverage/lcov-report/helpers/get-search-filter-type.js.html +0 -101
- package/coverage/lcov-report/helpers/get-sort-by-field-name.js.html +0 -146
- package/coverage/lcov-report/helpers/get-unpublished-entity-name.js.html +0 -113
- package/coverage/lcov-report/helpers/get-updated-filter-by.js.html +0 -158
- package/coverage/lcov-report/helpers/get-wrapped-value-with-link.js.html +0 -155
- package/coverage/lcov-report/helpers/group-entities.js.html +0 -113
- package/coverage/lcov-report/helpers/has-children.js.html +0 -125
- package/coverage/lcov-report/helpers/index.html +0 -1041
- package/coverage/lcov-report/helpers/index.js.html +0 -233
- package/coverage/lcov-report/helpers/inject-banner.js.html +0 -125
- package/coverage/lcov-report/helpers/inject-banners-to-entities.js.html +0 -128
- package/coverage/lcov-report/helpers/inject-multiple-banners/get-banners-for-entities/get-banners-for-entities.js.html +0 -128
- package/coverage/lcov-report/helpers/inject-multiple-banners/get-banners-for-entities/index.html +0 -126
- package/coverage/lcov-report/helpers/inject-multiple-banners/get-banners-for-entities/index.js.html +0 -89
- package/coverage/lcov-report/helpers/inject-multiple-banners/get-banners-for-nodes/get-banners-for-nodes.js.html +0 -131
- package/coverage/lcov-report/helpers/inject-multiple-banners/get-banners-for-nodes/helpers/group-node-entities.js.html +0 -179
- package/coverage/lcov-report/helpers/inject-multiple-banners/get-banners-for-nodes/helpers/index.html +0 -126
- package/coverage/lcov-report/helpers/inject-multiple-banners/get-banners-for-nodes/helpers/index.js.html +0 -89
- package/coverage/lcov-report/helpers/inject-multiple-banners/get-banners-for-nodes/index.html +0 -126
- package/coverage/lcov-report/helpers/inject-multiple-banners/get-banners-for-nodes/index.js.html +0 -89
- package/coverage/lcov-report/helpers/inject-multiple-banners/index.html +0 -126
- package/coverage/lcov-report/helpers/inject-multiple-banners/index.js.html +0 -89
- package/coverage/lcov-report/helpers/inject-multiple-banners/inject-multiple-banners.js.html +0 -119
- package/coverage/lcov-report/helpers/is-browser.js.html +0 -89
- package/coverage/lcov-report/helpers/is-filter-entitys-id.js.html +0 -122
- package/coverage/lcov-report/helpers/is-object.js.html +0 -89
- package/coverage/lcov-report/helpers/is-using-relation-image.js.html +0 -92
- package/coverage/lcov-report/helpers/parse-interval.js.html +0 -89
- package/coverage/lcov-report/helpers/parse-props-to-display.js.html +0 -194
- package/coverage/lcov-report/helpers/remove-extra-items.js.html +0 -119
- package/coverage/lcov-report/helpers/remove-unwanted-characters.js.html +0 -140
- package/coverage/lcov-report/helpers/render-children.js.html +0 -152
- package/coverage/lcov-report/helpers/should-render-waypoint.js.html +0 -92
- package/coverage/lcov-report/helpers/should-show-property.js.html +0 -89
- package/coverage/lcov-report/helpers/sort-response-data.js.html +0 -107
- package/coverage/lcov-report/helpers/split-children.js.html +0 -233
- package/coverage/lcov-report/helpers/update-childrens-parent.js.html +0 -140
- package/coverage/lcov-report/hooks/helpers/RenderList.js.html +0 -233
- package/coverage/lcov-report/hooks/helpers/StoreImages.js.html +0 -215
- package/coverage/lcov-report/hooks/helpers/append-gtm-classname.js.html +0 -188
- package/coverage/lcov-report/hooks/helpers/buildPBComponents.js.html +0 -329
- package/coverage/lcov-report/hooks/helpers/check-banner-insertion-set.js.html +0 -125
- package/coverage/lcov-report/hooks/helpers/constants.js.html +0 -98
- package/coverage/lcov-report/hooks/helpers/get-banner-index.js.html +0 -92
- package/coverage/lcov-report/hooks/helpers/get-lightbox-images.js.html +0 -242
- package/coverage/lcov-report/hooks/helpers/getComponent.js.html +0 -95
- package/coverage/lcov-report/hooks/helpers/index.html +0 -261
- package/coverage/lcov-report/hooks/helpers/index.js.html +0 -89
- package/coverage/lcov-report/hooks/helpers/insert-banners.js.html +0 -362
- package/coverage/lcov-report/hooks/index.html +0 -201
- package/coverage/lcov-report/hooks/index.js.html +0 -98
- package/coverage/lcov-report/hooks/use-get-entity-schema.js.html +0 -167
- package/coverage/lcov-report/hooks/use-get-entity-schemas-as-obj.js.html +0 -113
- package/coverage/lcov-report/hooks/use-get-image-id-from-relation.js.html +0 -143
- package/coverage/lcov-report/hooks/use-get-images.js.html +0 -143
- package/coverage/lcov-report/hooks/use-get-single-entity-schema.js.html +0 -125
- package/coverage/lcov-report/hooks/use-page-builder.js.html +0 -155
- package/coverage/lcov-report/index.html +0 -936
- package/coverage/lcov-report/prettify.css +0 -1
- package/coverage/lcov-report/prettify.js +0 -2
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +0 -170
- package/coverage/lcov-report/utils/component-map.js.html +0 -182
- package/coverage/lcov-report/utils/get-class-modifiers.js.html +0 -287
- package/coverage/lcov-report/utils/get-image-data.js.html +0 -137
- package/coverage/lcov-report/utils/get-props-to-display-modifiers.js.html +0 -92
- package/coverage/lcov-report/utils/index.html +0 -186
- package/coverage/lcov-report/utils/index.js.html +0 -101
- package/coverage/lcov-report/utils/is-object-empty.js.html +0 -89
- package/coverage/lcov.info +0 -7222
|
@@ -47,7 +47,7 @@ var _helpers2 = require("./helpers");
|
|
|
47
47
|
|
|
48
48
|
var _constants = require("./constants");
|
|
49
49
|
|
|
50
|
-
var _excluded = ["id", "image", "name", "url", "entity", "entityProps", "alternativePreHeader", "alternativeHeadline", "category", "modifier", "propsToDisplay", "propsToDisplayModifiers", "gtmId", "style", "priority", "cardChildren", "gtmChildren", "displayCategory", "displayThumbnail", "displayTitle", "enableOverlay", "overlayModifier", "gridModifier"];
|
|
50
|
+
var _excluded = ["id", "image", "name", "url", "entity", "entityProps", "alternativePreHeader", "alternativeHeadline", "category", "modifier", "propsToDisplay", "propsToDisplayModifiers", "gtmId", "style", "priority", "cardChildren", "gtmChildren", "displayCategory", "displayThumbnail", "displayTitle", "enableOverlay", "titleOverlayModifier", "overlayModifier", "gridModifier"];
|
|
51
51
|
|
|
52
52
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
53
53
|
|
|
@@ -75,6 +75,7 @@ var Card = function Card(_ref) {
|
|
|
75
75
|
displayThumbnail = _ref.displayThumbnail,
|
|
76
76
|
displayTitle = _ref.displayTitle,
|
|
77
77
|
enableOverlay = _ref.enableOverlay,
|
|
78
|
+
titleOverlayModifier = _ref.titleOverlayModifier,
|
|
78
79
|
overlayModifier = _ref.overlayModifier,
|
|
79
80
|
gridModifier = _ref.gridModifier,
|
|
80
81
|
otherProps = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
|
|
@@ -121,6 +122,7 @@ var Card = function Card(_ref) {
|
|
|
121
122
|
var Wrapper = shouldUseClickWrapper ? _ClickWrapper["default"] : _react.Fragment;
|
|
122
123
|
var classNameWithModifiers = (0, _helpers.getModifiers)(_constants.CARD_STRING, modifiers);
|
|
123
124
|
var contentWrapperModifier = "".concat((0, _helpers.getModifiers)('card__content-wrapper', modifiers), " ").concat(enableOverlay ? overlayModifier : '');
|
|
125
|
+
var titleWrapperModifier = "".concat((0, _helpers.getModifiers)('card__title', modifiers), " ").concat(titleOverlayModifier);
|
|
124
126
|
return /*#__PURE__*/_react["default"].createElement(Wrapper, wrapperProps, /*#__PURE__*/_react["default"].createElement("div", {
|
|
125
127
|
className: classNameWithModifiers
|
|
126
128
|
}, shouldDisplayThumbnail && /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -147,7 +149,7 @@ var Card = function Card(_ref) {
|
|
|
147
149
|
}, preHeader.name) : /*#__PURE__*/_react["default"].createElement("div", {
|
|
148
150
|
className: "badge badge--label"
|
|
149
151
|
}, label)), displayTitle && /*#__PURE__*/_react["default"].createElement("h2", {
|
|
150
|
-
className:
|
|
152
|
+
className: titleWrapperModifier
|
|
151
153
|
}, /*#__PURE__*/_react["default"].createElement(_BlazeLink["default"], {
|
|
152
154
|
title: linkTitle,
|
|
153
155
|
gtmId: gtmId,
|
|
@@ -196,8 +198,9 @@ Card.propTypes = {
|
|
|
196
198
|
displayCategory: _propTypes["default"].bool.isRequired,
|
|
197
199
|
displayThumbnail: _propTypes["default"].bool.isRequired,
|
|
198
200
|
displayTitle: _propTypes["default"].bool.isRequired,
|
|
199
|
-
enableOverlay: _propTypes["default"].bool
|
|
201
|
+
enableOverlay: _propTypes["default"].bool,
|
|
200
202
|
overlayModifier: _propTypes["default"].string,
|
|
203
|
+
titleOverlayModifier: _propTypes["default"].string,
|
|
201
204
|
cardChildren: _propTypes["default"].oneOfType([_propTypes["default"].arrayOf(_propTypes["default"].node), _propTypes["default"].node]),
|
|
202
205
|
gtmChildren: _propTypes["default"].oneOfType([_propTypes["default"].arrayOf(_propTypes["default"].node), _propTypes["default"].node]),
|
|
203
206
|
gridModifier: _propTypes["default"].string,
|
|
@@ -222,7 +225,9 @@ Card.defaultProps = {
|
|
|
222
225
|
gtmChildren: [],
|
|
223
226
|
gridModifier: '',
|
|
224
227
|
priority: false,
|
|
225
|
-
overlayModifier: ''
|
|
228
|
+
overlayModifier: 'card__content--overlay',
|
|
229
|
+
titleOverlayModifier: 'card__content--overlay__title',
|
|
230
|
+
enableOverlay: true
|
|
226
231
|
};
|
|
227
232
|
|
|
228
233
|
var getCategoryDefinedProps = function getCategoryDefinedProps(_ref2) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/Card/Card.js"],"names":["Card","id","image","name","url","entity","entityProps","alternativePreHeader","alternativeHeadline","category","modifier","propsToDisplay","propsToDisplayModifiers","gtmId","style","priority","cardChildren","gtmChildren","displayCategory","displayThumbnail","displayTitle","enableOverlay","overlayModifier","gridModifier","otherProps","getImageDefinedProps","imageSrc","shouldDisplayThumbnail","altText","modifiers","getInitialModifiers","getCategoryDefinedProps","publishedListingPage","preHeader","label","headline","linkTitle","dynamicSizeKey","CARD_STRING","shouldUseClickWrapper","wrapperProps","Wrapper","ClickWrapper","Fragment","classNameWithModifiers","contentWrapperModifier","length","map","prop","i","dynamicKey","propModifier","propTypes","PropTypes","string","isRequired","shape","data","object","array","bool","oneOfType","arrayOf","node","defaultProps","hasAlternativePreHeader","sponsored","featured","push"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AAMA;;AACA;;AACA;;;;;;;;AAEA,IAAMA,IAAI,GAAG,SAAPA,IAAO,OAyBP;AAAA,MAxBJC,EAwBI,QAxBJA,EAwBI;AAAA,MAvBJC,KAuBI,QAvBJA,KAuBI;AAAA,MAtBJC,IAsBI,QAtBJA,IAsBI;AAAA,MArBJC,GAqBI,QArBJA,GAqBI;AAAA,MApBJC,MAoBI,QApBJA,MAoBI;AAAA,MAnBJC,WAmBI,QAnBJA,WAmBI;AAAA,MAlBJC,oBAkBI,QAlBJA,oBAkBI;AAAA,MAjBJC,mBAiBI,QAjBJA,mBAiBI;AAAA,MAhBJC,QAgBI,QAhBJA,QAgBI;AAAA,MAfJC,QAeI,QAfJA,QAeI;AAAA,MAdJC,cAcI,QAdJA,cAcI;AAAA,MAbJC,uBAaI,QAbJA,uBAaI;AAAA,MAZJC,KAYI,QAZJA,KAYI;AAAA,MAXJC,KAWI,QAXJA,KAWI;AAAA,MAVJC,QAUI,QAVJA,QAUI;AAAA,MATJC,YASI,QATJA,YASI;AAAA,MARJC,WAQI,QARJA,WAQI;AAAA,MAPJC,eAOI,QAPJA,eAOI;AAAA,MANJC,gBAMI,QANJA,gBAMI;AAAA,MALJC,YAKI,QALJA,YAKI;AAAA,MAJJC,aAII,QAJJA,aAII;AAAA,MAHJC,eAGI,QAHJA,eAGI;AAAA,MAFJC,YAEI,QAFJA,YAEI;AAAA,MADDC,UACC;AACJ,sCAAsBR,YAAtB,EAAoCf,EAApC,EAAwCI,MAAxC;;AACA,8BAAsDoB,oBA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,IAAAA,SAAS,EAATA,SAAxB;AAAmCC,IAAAA,KAAK,EAALA,KAAnC;AAA0CC,IAAAA,QAAQ,EAARA;AAA1C,GAAP;AACD,CAhBD;;AAkBA,IAAMV,oBAAoB,GAAG,SAAvBA,oBAAuB,QAAiC;AAAA,MAA9BvB,KAA8B,SAA9BA,KAA8B;AAAA,MAAvBiB,gBAAuB,SAAvBA,gBAAuB;;AAC5D,cAAgCjB,KAAK,IAAI,EAAzC;AAAA,MAAawB,QAAb,SAAQtB,GAAR;AAAA,MAAuBqD,IAAvB,SAAuBA,IAAvB;;AACA,MAAM9B,sBAAsB,GAAGR,gBAAgB,IAAIO,QAAnD;AACA,MAAME,OAAO,GAAI6B,IAAI,IAAIA,IAAI,CAAC7B,OAAd,IAA0B,EAA1C;AACA,SAAO;AAAEF,IAAAA,QAAQ,EAARA,QAAF;AAAYC,IAAAA,sBAAsB,EAAtBA,sBAAZ;AAAoCC,IAAAA,OAAO,EAAPA;AAApC,GAAP;AACD,CALD;;AAOA,IAAME,mBAAmB,GAAG,SAAtBA,mBAAsB,QAAqC;AAAA,MAAlCpB,QAAkC,SAAlCA,QAAkC;AAAA,MAAxBI,KAAwB,SAAxBA,KAAwB;AAAA,MAAjBU,UAAiB,SAAjBA,UAAiB;AAC/D,MAAMK,SAAS,GAAG,CAACnB,QAAD,EAAWI,KAAX,CAAlB;AACA,MAAQoD,SAAR,GAAgC1C,UAAhC,CAAQ0C,SAAR;AAAA,MAAmBC,QAAnB,GAAgC3C,UAAhC,CAAmB2C,QAAnB;AACA,MAAID,SAAJ,EAAerC,SAAS,CAACuC,IAAV,CAAe,WAAf;AACf,MAAID,QAAJ,EAActC,SAAS,CAACuC,IAAV,CAAe,UAAf;AAEd,SAAOvC,SAAP;AACD,CAPD;;eASe7B,I","sourcesContent":["import React, { Fragment } from 'react';\nimport PropTypes from 'prop-types';\nimport BlazeLink from '../BlazeLink';\nimport ClickWrapper from '../ClickWrapper';\nimport {\n getModifiers,\n renderChildren,\n updateChildrensParent,\n getClickWrapperOptions\n} from '../../helpers';\nimport LazyImage from '../LazyImage';\nimport { getPublishedListingUrl, useDynamicSizeKey } from './helpers';\nimport { CARD_STRING } from './constants';\n\nconst Card = ({\n id,\n image,\n name,\n url,\n entity,\n entityProps,\n alternativePreHeader,\n alternativeHeadline,\n category,\n modifier,\n propsToDisplay,\n propsToDisplayModifiers,\n gtmId,\n style,\n priority,\n cardChildren,\n gtmChildren,\n displayCategory,\n displayThumbnail,\n displayTitle,\n enableOverlay,\n overlayModifier,\n gridModifier,\n ...otherProps\n}) => {\n updateChildrensParent(cardChildren, id, entity);\n const { imageSrc, shouldDisplayThumbnail, altText } = getImageDefinedProps({\n image,\n displayThumbnail\n });\n\n const modifiers = getInitialModifiers({ modifier, style, otherProps });\n\n const { publishedListingPage, preHeader, label, headline } = getCategoryDefinedProps({\n alternativePreHeader,\n category,\n entity,\n alternativeHeadline,\n displayCategory,\n name\n });\n const linkTitle = name;\n const dynamicSizeKey = useDynamicSizeKey(CARD_STRING, { style, gridModifier, modifier });\n const { shouldUseClickWrapper, wrapperProps } = getClickWrapperOptions(\n gtmChildren,\n entityProps,\n id\n );\n const Wrapper = shouldUseClickWrapper ? ClickWrapper : Fragment;\n const classNameWithModifiers = getModifiers(CARD_STRING, modifiers);\n\n const contentWrapperModifier = `${getModifiers('card__content-wrapper', modifiers)} ${\n enableOverlay ? overlayModifier : ''\n }`;\n\n return (\n <Wrapper {...wrapperProps}>\n <div className={classNameWithModifiers}>\n {shouldDisplayThumbnail && (\n <div className={getModifiers('card__image', modifiers)}>\n <BlazeLink gtmId={gtmId} href={url} className=\"card__image-link\" scroll>\n <LazyImage\n src={imageSrc}\n alt={altText}\n sizeKey={dynamicSizeKey}\n priority={priority}\n />\n </BlazeLink>\n </div>\n )}\n <div className={contentWrapperModifier}>\n <div className={getModifiers('card__content', modifiers)}>\n {displayCategory &&\n (publishedListingPage ? (\n <BlazeLink\n gtmId={gtmId}\n href={publishedListingPage}\n className=\"badge badge--label\"\n scroll>\n {preHeader.name}\n </BlazeLink>\n ) : (\n <div className=\"badge badge--label\">{label}</div>\n ))}\n {displayTitle && (\n <h2 className={getModifiers('card__title', modifiers)}>\n <BlazeLink title={linkTitle} gtmId={gtmId} href={url} scroll>\n {headline}\n </BlazeLink>\n </h2>\n )}\n {!!propsToDisplay.length && (\n <div className={getModifiers('card__details', modifiers)}>\n {propsToDisplay.map((prop, i) => {\n if (!prop) return null;\n const dynamicKey = `${id}${i}`;\n const propModifier = propsToDisplayModifiers[i] || '';\n\n return (\n <span key={dynamicKey} className={propModifier}>\n {prop}\n </span>\n );\n })}\n </div>\n )}\n </div>\n {!!cardChildren && (\n <div className=\"card__child-content\">{renderChildren(cardChildren)}</div>\n )}\n </div>\n </div>\n </Wrapper>\n );\n};\n\nCard.propTypes = {\n id: PropTypes.string.isRequired,\n image: PropTypes.shape({\n url: PropTypes.string,\n data: PropTypes.object\n }),\n style: PropTypes.string,\n propsToDisplay: PropTypes.array,\n propsToDisplayModifiers: PropTypes.array,\n url: PropTypes.string,\n name: PropTypes.string.isRequired,\n entity: PropTypes.string.isRequired,\n entityProps: PropTypes.object,\n gtmId: PropTypes.string,\n alternativePreHeader: PropTypes.shape({\n name: PropTypes.string\n }),\n alternativeHeadline: PropTypes.string,\n category: PropTypes.shape({\n name: PropTypes.string,\n publishedListingPage: PropTypes.shape({\n url: PropTypes.string\n })\n }),\n modifier: PropTypes.string,\n displayCategory: PropTypes.bool.isRequired,\n displayThumbnail: PropTypes.bool.isRequired,\n displayTitle: PropTypes.bool.isRequired,\n enableOverlay: PropTypes.bool.isRequired,\n overlayModifier: PropTypes.string,\n cardChildren: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]),\n gtmChildren: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]),\n gridModifier: PropTypes.string,\n priority: PropTypes.bool\n};\n\nCard.defaultProps = {\n entityProps: {},\n image: {\n url: null,\n data: {}\n },\n gtmId: '',\n style: 'portrait',\n propsToDisplay: [],\n propsToDisplayModifiers: [],\n url: '',\n alternativePreHeader: null,\n alternativeHeadline: '',\n category: null,\n modifier: '',\n cardChildren: [],\n gtmChildren: [],\n gridModifier: '',\n priority: false,\n overlayModifier: ''\n};\n\nconst getCategoryDefinedProps = ({\n alternativePreHeader,\n category,\n entity,\n alternativeHeadline,\n displayCategory,\n name\n}) => {\n const hasAlternativePreHeader = alternativePreHeader && alternativePreHeader.name;\n const preHeader =\n alternativeHeadline && hasAlternativePreHeader ? alternativePreHeader : category;\n const publishedListingPage = getPublishedListingUrl(preHeader);\n const label = preHeader ? preHeader.name : entity;\n const headline =\n !displayCategory || !hasAlternativePreHeader ? name : alternativeHeadline || name;\n return { publishedListingPage, preHeader, label, headline };\n};\n\nconst getImageDefinedProps = ({ image, displayThumbnail }) => {\n const { url: imageSrc, data } = image || {};\n const shouldDisplayThumbnail = displayThumbnail && imageSrc;\n const altText = (data && data.altText) || '';\n return { imageSrc, shouldDisplayThumbnail, altText };\n};\n\nconst getInitialModifiers = ({ modifier, style, otherProps }) => {\n const modifiers = [modifier, style];\n const { sponsored, featured } = otherProps;\n if (sponsored) modifiers.push('sponsored');\n if (featured) modifiers.push('featured');\n\n return modifiers;\n};\n\nexport default Card;\n"],"file":"Card.js"}
|
|
1
|
+
{"version":3,"sources":["../../../src/components/Card/Card.js"],"names":["Card","id","image","name","url","entity","entityProps","alternativePreHeader","alternativeHeadline","category","modifier","propsToDisplay","propsToDisplayModifiers","gtmId","style","priority","cardChildren","gtmChildren","displayCategory","displayThumbnail","displayTitle","enableOverlay","titleOverlayModifier","overlayModifier","gridModifier","otherProps","getImageDefinedProps","imageSrc","shouldDisplayThumbnail","altText","modifiers","getInitialModifiers","getCategoryDefinedProps","publishedListingPage","preHeader","label","headline","linkTitle","dynamicSizeKey","CARD_STRING","shouldUseClickWrapper","wrapperProps","Wrapper","ClickWrapper","Fragment","classNameWithModifiers","contentWrapperModifier","titleWrapperModifier","length","map","prop","i","dynamicKey","propModifier","propTypes","PropTypes","string","isRequired","shape","data","object","array","bool","oneOfType","arrayOf","node","defaultProps","hasAlternativePreHeader","sponsored","featured","push"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AAMA;;AACA;;AACA;;;;;;;;AAEA,IAAMA,IAAI,GAAG,SAAPA,IAAO,OA0BP;AAAA,MAzBJC,EAyBI,QAzBJA,EAyBI;AAAA,MAxBJC,KAwBI,QAxBJA,KAwBI;AAAA,MAvBJC,IAuBI,QAvBJA,IAuBI;AAAA,MAtBJC,GAsBI,QAtBJA,GAsBI;AAAA,MArBJC,MAqBI,QArBJA,MAqBI;AAAA,MApBJC,WAoBI,QApBJA,WAoBI;AAAA,MAnBJC,oBAmBI,QAnBJA,oBAmBI;AAAA,MAlBJC,mBAkBI,QAlBJA,mBAkBI;AAAA,MAjBJC,QAiBI,QAjBJA,QAiBI;AAAA,MAhBJC,QAgBI,QAhBJA,QAgBI;AAAA,MAfJC,cAeI,QAfJA,cAeI;AAAA,MAdJC,uBAcI,QAdJA,uBAcI;AAAA,MAbJC,KAaI,QAbJA,KAaI;AAAA,MAZJC,KAYI,QAZJA,KAYI;AAAA,MAXJC,QAWI,QAXJA,QAWI;AAAA,MAVJC,YAUI,QAVJA,YAUI;AAAA,MATJC,WASI,QATJA,WASI;AAAA,MARJC,eAQI,QARJA,eAQI;AAAA,MAPJC,gBAOI,QAPJA,gBAOI;AAAA,MANJC,YAMI,QANJA,YAMI;AAAA,MALJC,aAKI,QALJA,aAKI;AAAA,MAJJC,oBAII,QAJJA,oBAII;AAAA,MAHJC,eAGI,QAHJA,eAGI;AAAA,MAFJC,YAEI,QAFJA,YAEI;AAAA,MADDC,UACC;AACJ,sCAAsBT,YAAtB,EAAoCf,EAApC,EAAwCI,MAAxC;;AACA,8BAAsDqB,oBAAoB,CAAC;AACzExB,IAAAA,KAAK,EAALA,KADyE;AAEzEiB,IAAAA,gBAAg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Fragment } from 'react';\nimport PropTypes from 'prop-types';\nimport BlazeLink from '../BlazeLink';\nimport ClickWrapper from '../ClickWrapper';\nimport {\n getModifiers,\n renderChildren,\n updateChildrensParent,\n getClickWrapperOptions\n} from '../../helpers';\nimport LazyImage from '../LazyImage';\nimport { getPublishedListingUrl, useDynamicSizeKey } from './helpers';\nimport { CARD_STRING } from './constants';\n\nconst Card = ({\n id,\n image,\n name,\n url,\n entity,\n entityProps,\n alternativePreHeader,\n alternativeHeadline,\n category,\n modifier,\n propsToDisplay,\n propsToDisplayModifiers,\n gtmId,\n style,\n priority,\n cardChildren,\n gtmChildren,\n displayCategory,\n displayThumbnail,\n displayTitle,\n enableOverlay,\n titleOverlayModifier,\n overlayModifier,\n gridModifier,\n ...otherProps\n}) => {\n updateChildrensParent(cardChildren, id, entity);\n const { imageSrc, shouldDisplayThumbnail, altText } = getImageDefinedProps({\n image,\n displayThumbnail\n });\n\n const modifiers = getInitialModifiers({ modifier, style, otherProps });\n\n const { publishedListingPage, preHeader, label, headline } = getCategoryDefinedProps({\n alternativePreHeader,\n category,\n entity,\n alternativeHeadline,\n displayCategory,\n name\n });\n const linkTitle = name;\n const dynamicSizeKey = useDynamicSizeKey(CARD_STRING, { style, gridModifier, modifier });\n const { shouldUseClickWrapper, wrapperProps } = getClickWrapperOptions(\n gtmChildren,\n entityProps,\n id\n );\n const Wrapper = shouldUseClickWrapper ? ClickWrapper : Fragment;\n const classNameWithModifiers = getModifiers(CARD_STRING, modifiers);\n\n const contentWrapperModifier = `${getModifiers('card__content-wrapper', modifiers)} ${\n enableOverlay ? overlayModifier : ''\n }`;\n\n const titleWrapperModifier = `${getModifiers('card__title', modifiers)} ${titleOverlayModifier}`;\n\n return (\n <Wrapper {...wrapperProps}>\n <div className={classNameWithModifiers}>\n {shouldDisplayThumbnail && (\n <div className={getModifiers('card__image', modifiers)}>\n <BlazeLink gtmId={gtmId} href={url} className=\"card__image-link\" scroll>\n <LazyImage\n src={imageSrc}\n alt={altText}\n sizeKey={dynamicSizeKey}\n priority={priority}\n />\n </BlazeLink>\n </div>\n )}\n <div className={contentWrapperModifier}>\n <div className={getModifiers('card__content', modifiers)}>\n {displayCategory &&\n (publishedListingPage ? (\n <BlazeLink\n gtmId={gtmId}\n href={publishedListingPage}\n className=\"badge badge--label\"\n scroll>\n {preHeader.name}\n </BlazeLink>\n ) : (\n <div className=\"badge badge--label\">{label}</div>\n ))}\n {displayTitle && (\n <h2 className={titleWrapperModifier}>\n <BlazeLink title={linkTitle} gtmId={gtmId} href={url} scroll>\n {headline}\n </BlazeLink>\n </h2>\n )}\n {!!propsToDisplay.length && (\n <div className={getModifiers('card__details', modifiers)}>\n {propsToDisplay.map((prop, i) => {\n if (!prop) return null;\n const dynamicKey = `${id}${i}`;\n const propModifier = propsToDisplayModifiers[i] || '';\n\n return (\n <span key={dynamicKey} className={propModifier}>\n {prop}\n </span>\n );\n })}\n </div>\n )}\n </div>\n {!!cardChildren && (\n <div className=\"card__child-content\">{renderChildren(cardChildren)}</div>\n )}\n </div>\n </div>\n </Wrapper>\n );\n};\n\nCard.propTypes = {\n id: PropTypes.string.isRequired,\n image: PropTypes.shape({\n url: PropTypes.string,\n data: PropTypes.object\n }),\n style: PropTypes.string,\n propsToDisplay: PropTypes.array,\n propsToDisplayModifiers: PropTypes.array,\n url: PropTypes.string,\n name: PropTypes.string.isRequired,\n entity: PropTypes.string.isRequired,\n entityProps: PropTypes.object,\n gtmId: PropTypes.string,\n alternativePreHeader: PropTypes.shape({\n name: PropTypes.string\n }),\n alternativeHeadline: PropTypes.string,\n category: PropTypes.shape({\n name: PropTypes.string,\n publishedListingPage: PropTypes.shape({\n url: PropTypes.string\n })\n }),\n modifier: PropTypes.string,\n displayCategory: PropTypes.bool.isRequired,\n displayThumbnail: PropTypes.bool.isRequired,\n displayTitle: PropTypes.bool.isRequired,\n enableOverlay: PropTypes.bool,\n overlayModifier: PropTypes.string,\n titleOverlayModifier: PropTypes.string,\n cardChildren: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]),\n gtmChildren: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]),\n gridModifier: PropTypes.string,\n priority: PropTypes.bool\n};\n\nCard.defaultProps = {\n entityProps: {},\n image: {\n url: null,\n data: {}\n },\n gtmId: '',\n style: 'portrait',\n propsToDisplay: [],\n propsToDisplayModifiers: [],\n url: '',\n alternativePreHeader: null,\n alternativeHeadline: '',\n category: null,\n modifier: '',\n cardChildren: [],\n gtmChildren: [],\n gridModifier: '',\n priority: false,\n overlayModifier: 'card__content--overlay',\n titleOverlayModifier: 'card__content--overlay__title',\n enableOverlay: true\n};\n\nconst getCategoryDefinedProps = ({\n alternativePreHeader,\n category,\n entity,\n alternativeHeadline,\n displayCategory,\n name\n}) => {\n const hasAlternativePreHeader = alternativePreHeader && alternativePreHeader.name;\n const preHeader =\n alternativeHeadline && hasAlternativePreHeader ? alternativePreHeader : category;\n const publishedListingPage = getPublishedListingUrl(preHeader);\n const label = preHeader ? preHeader.name : entity;\n const headline =\n !displayCategory || !hasAlternativePreHeader ? name : alternativeHeadline || name;\n return { publishedListingPage, preHeader, label, headline };\n};\n\nconst getImageDefinedProps = ({ image, displayThumbnail }) => {\n const { url: imageSrc, data } = image || {};\n const shouldDisplayThumbnail = displayThumbnail && imageSrc;\n const altText = (data && data.altText) || '';\n return { imageSrc, shouldDisplayThumbnail, altText };\n};\n\nconst getInitialModifiers = ({ modifier, style, otherProps }) => {\n const modifiers = [modifier, style];\n const { sponsored, featured } = otherProps;\n if (sponsored) modifiers.push('sponsored');\n if (featured) modifiers.push('featured');\n\n return modifiers;\n};\n\nexport default Card;\n"],"file":"Card.js"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/DataSummary/helpers/get-link-based-on-value.js"],"names":["getLinkBasedOnValue","value","DATA_SUMMARY_EMAIL_REGEX","test","DATA_SUMMARY_URL_REGEX"],"mappings":";;;;;;;;;;;AAAA;;
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/DataSummary/helpers/get-link-based-on-value.js"],"names":["getLinkBasedOnValue","value","DATA_SUMMARY_EMAIL_REGEX","test","DATA_SUMMARY_URL_REGEX","DATA_SUMMARY_TEL_REGEX"],"mappings":";;;;;;;;;;;AAAA;;AAMA,SAASA,mBAAT,CAA6BC,KAA7B,EAAoC;AAClC,MAAIC,oCAAyBC,IAAzB,CAA8BF,KAA9B,CAAJ,EAA0C;AACxC,4BAAiBA,KAAjB;AACD;;AACD,MAAIG,kCAAuBD,IAAvB,CAA4BF,KAA5B,CAAJ,EAAwC;AACtC,WAAOA,KAAP;AACD;;AAED,MAAII,kCAAuBF,IAAvB,CAA4BF,KAA5B,CAAJ,EAAwC;AACtC,yBAAcA,KAAd;AACD;;AAED,SAAO,EAAP;AACD;;eAEcD,mB","sourcesContent":["import {\n DATA_SUMMARY_EMAIL_REGEX,\n DATA_SUMMARY_URL_REGEX,\n DATA_SUMMARY_TEL_REGEX\n} from '../../../constants';\n\nfunction getLinkBasedOnValue(value) {\n if (DATA_SUMMARY_EMAIL_REGEX.test(value)) {\n return `mailto:${value}`;\n }\n if (DATA_SUMMARY_URL_REGEX.test(value)) {\n return value;\n }\n\n if (DATA_SUMMARY_TEL_REGEX.test(value)) {\n return `tel:${value}`;\n }\n\n return '';\n}\n\nexport default getLinkBasedOnValue;\n"],"file":"get-link-based-on-value.js"}
|
|
@@ -23,6 +23,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
23
23
|
});
|
|
24
24
|
exports["default"] = void 0;
|
|
25
25
|
|
|
26
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
27
|
+
|
|
28
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
29
|
+
|
|
26
30
|
require("core-js/modules/es.array.map.js");
|
|
27
31
|
|
|
28
32
|
require("core-js/modules/es.array.join.js");
|
|
@@ -39,6 +43,8 @@ var _components = require("../components");
|
|
|
39
43
|
|
|
40
44
|
var _constants = require("../constants");
|
|
41
45
|
|
|
46
|
+
var _excluded = ["type", "label", "propsToDisplay", "elementTitle"];
|
|
47
|
+
|
|
42
48
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
43
49
|
|
|
44
50
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -59,8 +65,8 @@ var FiltersList = function FiltersList(_ref) {
|
|
|
59
65
|
var type = _ref2.type,
|
|
60
66
|
label = _ref2.label,
|
|
61
67
|
propsToDisplay = _ref2.propsToDisplay,
|
|
62
|
-
|
|
63
|
-
|
|
68
|
+
elementTitle = _ref2.elementTitle,
|
|
69
|
+
otherProps = (0, _objectWithoutProperties2["default"])(_ref2, _excluded);
|
|
64
70
|
if (!propsToDisplay && !propsToDisplay.length) return null;
|
|
65
71
|
var dynamicKey = [itemId, index].join('-');
|
|
66
72
|
var isDataAvailable = !!data && Object.keys(data).length;
|
|
@@ -74,19 +80,19 @@ var FiltersList = function FiltersList(_ref) {
|
|
|
74
80
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
75
81
|
key: dynamicKey,
|
|
76
82
|
className: "filter__section filter__section--search-refine filter__section--search"
|
|
77
|
-
}, /*#__PURE__*/_react["default"].createElement(_components.TextSearch, {
|
|
83
|
+
}, /*#__PURE__*/_react["default"].createElement(_components.TextSearch, (0, _extends2["default"])({}, otherProps, {
|
|
78
84
|
label: label,
|
|
79
85
|
elementTitle: elementTitle,
|
|
80
86
|
searchValue: filterValues[_constants.SEARCH_TERM],
|
|
81
87
|
updateFilterValues: updateFilterValues,
|
|
82
88
|
filterValues: filterValues
|
|
83
|
-
}));
|
|
89
|
+
})));
|
|
84
90
|
|
|
85
91
|
case _constants.CHECKBOX:
|
|
86
92
|
return !!shouldDisplayFilter && /*#__PURE__*/_react["default"].createElement("div", {
|
|
87
93
|
key: dynamicKey,
|
|
88
94
|
className: "filter__section filter__section--search-refine filter__section--checkboxes"
|
|
89
|
-
}, /*#__PURE__*/_react["default"].createElement(_components.Checkbox, {
|
|
95
|
+
}, /*#__PURE__*/_react["default"].createElement(_components.Checkbox, (0, _extends2["default"])({}, otherProps, {
|
|
90
96
|
data: data,
|
|
91
97
|
prop: propsToDisplay[0],
|
|
92
98
|
label: label,
|
|
@@ -95,13 +101,13 @@ var FiltersList = function FiltersList(_ref) {
|
|
|
95
101
|
filterValues: filterValues,
|
|
96
102
|
updateFilterValues: updateFilterValues,
|
|
97
103
|
shouldSearch: shouldSearch
|
|
98
|
-
}));
|
|
104
|
+
})));
|
|
99
105
|
|
|
100
106
|
case _constants.SELECT:
|
|
101
107
|
return !!shouldDisplayFilter && /*#__PURE__*/_react["default"].createElement("div", {
|
|
102
108
|
key: dynamicKey,
|
|
103
109
|
className: "filter__section filter__section--search-refine filter__section--selects"
|
|
104
|
-
}, /*#__PURE__*/_react["default"].createElement(_components.SelectFilter, {
|
|
110
|
+
}, /*#__PURE__*/_react["default"].createElement(_components.SelectFilter, (0, _extends2["default"])({}, otherProps, {
|
|
105
111
|
data: data,
|
|
106
112
|
prop: propsToDisplay[0],
|
|
107
113
|
label: label,
|
|
@@ -110,23 +116,22 @@ var FiltersList = function FiltersList(_ref) {
|
|
|
110
116
|
filterValues: filterValues,
|
|
111
117
|
updateFilterValues: updateFilterValues,
|
|
112
118
|
shouldSearch: shouldSearch
|
|
113
|
-
}));
|
|
119
|
+
})));
|
|
114
120
|
|
|
115
121
|
case _constants.RANGE:
|
|
116
122
|
return !!areAggregationsAvailable && /*#__PURE__*/_react["default"].createElement("div", {
|
|
117
123
|
key: dynamicKey,
|
|
118
124
|
className: "range-slider__wrapper"
|
|
119
|
-
}, /*#__PURE__*/_react["default"].createElement(_components.Range, {
|
|
125
|
+
}, /*#__PURE__*/_react["default"].createElement(_components.Range, (0, _extends2["default"])({}, otherProps, {
|
|
120
126
|
dataAggregations: dataAggregations,
|
|
121
127
|
propsToDisplay: propsToDisplay,
|
|
122
|
-
rangeInterval: rangeInterval,
|
|
123
128
|
label: label,
|
|
124
129
|
elementTitle: elementTitle,
|
|
125
130
|
entity: entity,
|
|
126
131
|
filterValues: filterValues,
|
|
127
132
|
updateFilterValues: updateFilterValues,
|
|
128
133
|
shouldSearch: shouldSearch
|
|
129
|
-
}));
|
|
134
|
+
})));
|
|
130
135
|
|
|
131
136
|
default:
|
|
132
137
|
return null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/SearchFilter/SearchFilter/FiltersList.js"],"names":["FiltersList","data","filters","hasUrl","entity","filterValues","updateFilterValues","shouldSearch","MainContext","itemId","map","index","type","label","propsToDisplay","
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/SearchFilter/SearchFilter/FiltersList.js"],"names":["FiltersList","data","filters","hasUrl","entity","filterValues","updateFilterValues","shouldSearch","MainContext","itemId","map","index","type","label","propsToDisplay","elementTitle","otherProps","length","dynamicKey","join","isDataAvailable","Object","keys","dataAggregations","areAggregationsAvailable","results","shouldDisplayFilter","buckets","TEXT_SEARCH","SEARCH_TERM","CHECKBOX","SELECT","RAN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C;AAThB,WAHF,CAFJ;;AAmBF,WAAKyB,gBAAL;AACE,eACE,CAAC,CAACR,wBAAF,iBACE;AAAK,UAAA,GAAG,EAAEN,UAAV;AAAsB,UAAA,SAAS,EAAC;AAAhC,wBACE,gCAAC,iBAAD,gCACMF,UADN;AAEE,UAAA,gBAAgB,EAAEO,gBAFpB;AAGE,UAAA,cAAc,EAAET,cAHlB;AAIE,UAAA,KAAK,EAAED,KAJT;AAKE,UAAA,YAAY,EAAEE,YALhB;AAME,UAAA,MAAM,EAAEX,MANV;AAOE,UAAA,YAAY,EAAEC,YAPhB;AAQE,UAAA,kBAAkB,EAAEC,kBARtB;AASE,UAAA,YAAY,EAAEC;AAThB,WADF,CAFJ;;AAiBF;AACE,eAAO,IAAP;AA3EJ;AA6ED,GAvFM,CAAP;AAwFD,CAnGD;;AAqGAP,WAAW,CAACiC,SAAZ,GAAwB;AACtB9B,EAAAA,MAAM,EAAE+B,sBAAUC,IAAV,CAAeC,UADD;AAEtBhC,EAAAA,MAAM,EAAE8B,sBAAUG,MAAV,CAAiBD,UAFH;AAGtB/B,EAAAA,YAAY,EAAE6B,sBAAUI,MAAV,CAAiBF,UAHT;AAItB9B,EAAAA,kBAAkB,EAAE4B,sBAAUK,IAAV,CAAeH,UAJb;AAKtBnC,EAAAA,IAAI,EAAEiC,sBAAUI,MALM;AAMtBpC,EAAAA,OAAO,EAAEgC,sBAAUM,KANG;AAOtBjC,EAAAA,YAAY,EAAE2B,sBAAUC;AAPF,CAAxB;AAUAnC,WAAW,CAACyC,YAAZ,GAA2B;AACzBlC,EAAAA,YAAY,EAAE,KADW;AAEzBN,EAAAA,IAAI,EAAE,EAFmB;AAGzBC,EAAAA,OAAO,EAAE;AAHgB,CAA3B;eAMeF,W","sourcesContent":["import React, { useContext } from 'react';\nimport PropTypes from 'prop-types';\nimport { MainContext } from '@blaze-cms/nextjs-components';\nimport { TextSearch, Checkbox, SelectFilter, Range } from '../components';\nimport { CHECKBOX, SELECT, TEXT_SEARCH, RANGE, SEARCH_TERM } from '../constants';\n\nconst FiltersList = ({\n data,\n filters,\n hasUrl,\n entity,\n filterValues,\n updateFilterValues,\n shouldSearch\n}) => {\n const { itemId } = useContext(MainContext);\n\n return filters.map(({ type, label, propsToDisplay, elementTitle, ...otherProps }, index) => {\n if (!propsToDisplay && !propsToDisplay.length) return null;\n\n const dynamicKey = [itemId, index].join('-');\n const isDataAvailable = !!data && Object.keys(data).length;\n const dataAggregations = isDataAvailable ? data : null;\n const areAggregationsAvailable = isDataAvailable && !!dataAggregations;\n const results = areAggregationsAvailable && dataAggregations[propsToDisplay[0]];\n const shouldDisplayFilter = results && results.buckets && results.buckets.length;\n\n switch (type) {\n case TEXT_SEARCH:\n return (\n <div\n key={dynamicKey}\n className=\"filter__section filter__section--search-refine filter__section--search\">\n <TextSearch\n {...otherProps}\n label={label}\n elementTitle={elementTitle}\n searchValue={filterValues[SEARCH_TERM]}\n updateFilterValues={updateFilterValues}\n filterValues={filterValues}\n />\n </div>\n );\n case CHECKBOX:\n return (\n !!shouldDisplayFilter && (\n <div\n key={dynamicKey}\n className=\"filter__section filter__section--search-refine filter__section--checkboxes\">\n <Checkbox\n {...otherProps}\n data={data}\n prop={propsToDisplay[0]}\n label={label}\n elementTitle={elementTitle}\n hasUrl={hasUrl}\n filterValues={filterValues}\n updateFilterValues={updateFilterValues}\n shouldSearch={shouldSearch}\n />\n </div>\n )\n );\n case SELECT:\n return (\n !!shouldDisplayFilter && (\n <div\n key={dynamicKey}\n className=\"filter__section filter__section--search-refine filter__section--selects\">\n <SelectFilter\n {...otherProps}\n data={data}\n prop={propsToDisplay[0]}\n label={label}\n elementTitle={elementTitle}\n hasUrl={hasUrl}\n filterValues={filterValues}\n updateFilterValues={updateFilterValues}\n shouldSearch={shouldSearch}\n />\n </div>\n )\n );\n case RANGE:\n return (\n !!areAggregationsAvailable && (\n <div key={dynamicKey} className=\"range-slider__wrapper\">\n <Range\n {...otherProps}\n dataAggregations={dataAggregations}\n propsToDisplay={propsToDisplay}\n label={label}\n elementTitle={elementTitle}\n entity={entity}\n filterValues={filterValues}\n updateFilterValues={updateFilterValues}\n shouldSearch={shouldSearch}\n />\n </div>\n )\n );\n default:\n return null;\n }\n });\n};\n\nFiltersList.propTypes = {\n hasUrl: PropTypes.bool.isRequired,\n entity: PropTypes.string.isRequired,\n filterValues: PropTypes.object.isRequired,\n updateFilterValues: PropTypes.func.isRequired,\n data: PropTypes.object,\n filters: PropTypes.array,\n shouldSearch: PropTypes.bool\n};\n\nFiltersList.defaultProps = {\n shouldSearch: false,\n data: {},\n filters: []\n};\n\nexport default FiltersList;\n"],"file":"FiltersList.js"}
|
|
@@ -11,8 +11,6 @@ exports["default"] = void 0;
|
|
|
11
11
|
|
|
12
12
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
13
13
|
|
|
14
|
-
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
15
|
-
|
|
16
14
|
require("core-js/modules/es.array.sort.js");
|
|
17
15
|
|
|
18
16
|
require("core-js/modules/es.array.filter.js");
|
|
@@ -21,8 +19,6 @@ require("core-js/modules/es.object.to-string.js");
|
|
|
21
19
|
|
|
22
20
|
require("core-js/modules/es.array.map.js");
|
|
23
21
|
|
|
24
|
-
require("core-js/modules/es.array.concat.js");
|
|
25
|
-
|
|
26
22
|
var _react = _interopRequireDefault(require("react"));
|
|
27
23
|
|
|
28
24
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
@@ -39,20 +35,34 @@ var SelectFilter = function SelectFilter(_ref) {
|
|
|
39
35
|
prop = _ref.prop,
|
|
40
36
|
updateFilterValues = _ref.updateFilterValues,
|
|
41
37
|
filterValues = _ref.filterValues,
|
|
42
|
-
shouldSearch = _ref.shouldSearch
|
|
38
|
+
shouldSearch = _ref.shouldSearch,
|
|
39
|
+
displayLabelAsPlaceholder = _ref.displayLabelAsPlaceholder;
|
|
43
40
|
var filterValue = filterValues[prop] || '';
|
|
44
41
|
var options = data[prop].buckets.map(function (bucket) {
|
|
45
42
|
return bucket.key;
|
|
46
43
|
}).filter(Boolean).sort();
|
|
47
|
-
var optionsJoined =
|
|
44
|
+
var optionsJoined = options;
|
|
45
|
+
var labelText = label || prop;
|
|
46
|
+
var labelToUse = labelText;
|
|
47
|
+
var defaultTextValue = _constants.DEFAULT_OPTION;
|
|
48
|
+
|
|
49
|
+
if (displayLabelAsPlaceholder) {
|
|
50
|
+
defaultTextValue = labelToUse;
|
|
51
|
+
labelToUse = null;
|
|
52
|
+
}
|
|
53
|
+
|
|
48
54
|
return /*#__PURE__*/_react["default"].createElement(_select["default"], {
|
|
49
|
-
label:
|
|
55
|
+
label: labelToUse,
|
|
50
56
|
value: filterValue,
|
|
51
57
|
id: prop,
|
|
58
|
+
"data-testid": "filter-".concat(prop),
|
|
52
59
|
options: optionsJoined,
|
|
60
|
+
defaultTextValue: defaultTextValue,
|
|
53
61
|
onChange: function onChange(_ref2) {
|
|
54
62
|
var value = _ref2.value;
|
|
55
|
-
|
|
63
|
+
var valueToUse = value;
|
|
64
|
+
if (value === defaultTextValue) valueToUse = '';
|
|
65
|
+
updateFilterValues((0, _defineProperty2["default"])({}, prop, valueToUse), shouldSearch);
|
|
56
66
|
}
|
|
57
67
|
});
|
|
58
68
|
};
|
|
@@ -63,11 +73,13 @@ SelectFilter.propTypes = {
|
|
|
63
73
|
filterValues: _propTypes["default"].object.isRequired,
|
|
64
74
|
updateFilterValues: _propTypes["default"].func.isRequired,
|
|
65
75
|
shouldSearch: _propTypes["default"].bool,
|
|
66
|
-
label: _propTypes["default"].string
|
|
76
|
+
label: _propTypes["default"].string,
|
|
77
|
+
displayLabelAsPlaceholder: _propTypes["default"].bool
|
|
67
78
|
};
|
|
68
79
|
SelectFilter.defaultProps = {
|
|
69
80
|
shouldSearch: false,
|
|
70
|
-
label: ''
|
|
81
|
+
label: '',
|
|
82
|
+
displayLabelAsPlaceholder: false
|
|
71
83
|
};
|
|
72
84
|
|
|
73
85
|
var _default = (0, _HOC.withTitle)(SelectFilter);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/SearchFilter/components/Select.js"],"names":["SelectFilter","data","label","prop","updateFilterValues","filterValues","shouldSearch","filterValue","options","buckets","map","bucket","key","filter","Boolean","sort","optionsJoined","DEFAULT_OPTION","value","propTypes","PropTypes","object","isRequired","string","func","bool","defaultProps"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/SearchFilter/components/Select.js"],"names":["SelectFilter","data","label","prop","updateFilterValues","filterValues","shouldSearch","displayLabelAsPlaceholder","filterValue","options","buckets","map","bucket","key","filter","Boolean","sort","optionsJoined","labelText","labelToUse","defaultTextValue","DEFAULT_OPTION","value","valueToUse","propTypes","PropTypes","object","isRequired","string","func","bool","defaultProps"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AAEA,IAAMA,YAAY,GAAG,SAAfA,YAAe,OAQf;AAAA,MAPJC,IAOI,QAPJA,IAOI;AAAA,MANJC,KAMI,QANJA,KAMI;AAAA,MALJC,IAKI,QALJA,IAKI;AAAA,MAJJC,kBAII,QAJJA,kBAII;AAAA,MAHJC,YAGI,QAHJA,YAGI;AAAA,MAFJC,YAEI,QAFJA,YAEI;AAAA,MADJC,yBACI,QADJA,yBACI;AACJ,MAAMC,WAAW,GAAGH,YAAY,CAACF,IAAD,CAAZ,IAAsB,EAA1C;AAEA,MAAMM,OAAO,GAAGR,IAAI,CAACE,IAAD,CAAJ,CAAWO,OAAX,CACbC,GADa,CACT,UAAAC,MAAM;AAAA,WAAIA,MAAM,CAACC,GAAX;AAAA,GADG,EAEbC,MAFa,CAENC,OAFM,EAGbC,IAHa,EAAhB;AAKA,MAAMC,aAAa,GAAGR,OAAtB;AAEA,MAAMS,SAAS,GAAGhB,KAAK,IAAIC,IAA3B;AACA,MAAIgB,UAAU,GAAGD,SAAjB;AACA,MAAIE,gBAAgB,G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Select from '@blaze-react/select';\nimport { withTitle } from '../../../HOC';\nimport { DEFAULT_OPTION } from '../constants';\n\nconst SelectFilter = ({\n data,\n label,\n prop,\n updateFilterValues,\n filterValues,\n shouldSearch,\n displayLabelAsPlaceholder\n}) => {\n const filterValue = filterValues[prop] || '';\n\n const options = data[prop].buckets\n .map(bucket => bucket.key)\n .filter(Boolean)\n .sort();\n\n const optionsJoined = options;\n\n const labelText = label || prop;\n let labelToUse = labelText;\n let defaultTextValue = DEFAULT_OPTION;\n if (displayLabelAsPlaceholder) {\n defaultTextValue = labelToUse;\n labelToUse = null;\n }\n\n return (\n <Select\n label={labelToUse}\n value={filterValue}\n id={prop}\n data-testid={`filter-${prop}`}\n options={optionsJoined}\n defaultTextValue={defaultTextValue}\n onChange={({ value }) => {\n let valueToUse = value;\n if (value === defaultTextValue) valueToUse = '';\n\n updateFilterValues({ [prop]: valueToUse }, shouldSearch);\n }}\n />\n );\n};\n\nSelectFilter.propTypes = {\n data: PropTypes.object.isRequired,\n prop: PropTypes.string.isRequired,\n filterValues: PropTypes.object.isRequired,\n updateFilterValues: PropTypes.func.isRequired,\n shouldSearch: PropTypes.bool,\n label: PropTypes.string,\n displayLabelAsPlaceholder: PropTypes.bool\n};\n\nSelectFilter.defaultProps = {\n shouldSearch: false,\n label: '',\n displayLabelAsPlaceholder: false\n};\n\nexport default withTitle(SelectFilter);\n"],"file":"Select.js"}
|
package/lib/constants/index.js
CHANGED
|
@@ -5,8 +5,8 @@ require("core-js/modules/es.object.define-property.js");
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.
|
|
9
|
-
exports.WITH_BANNER = exports.WIDE = exports.WAYPOINT_BOTTOM_OFFSET = exports.VISIBLE = exports.VIDEO_WRAPPER_CLASS_NAME = exports.TEXT_SEARCH = exports.TARGET_BLANK = exports.TABLET = exports.STRING = exports.SPONSORED = exports.SHOW = exports.SELECT = exports.SEARCH_TERM = exports.SEARCH_PUBLISHED_CONTENT = exports.SEARCH = exports.SCROLL_OFFSET = exports.ROW = exports.RANGE = exports.PUBLISHED = exports.PROPS_TO_CHECK = exports.PREVIOUS_STRING = exports.PREHEADER_PROP = exports.PB_QUERY_CONST = exports.PASSWORD_VALIDATION_MESSAGE = exports.PASSWORD_REGEX = exports.PASSWORD_CONFIRM_MESSAGE = exports.PASSWORD = exports.PAGINATION_QUERY_CONST = exports.PAGINATION_DISPLAY_LIMIT = exports.PAGINATION_DIFFERENCE = exports.OR_OPERATOR = exports.OR = exports.ON_CLICK = exports.OBJECT = exports.NEXT_STRING = exports.MOUSE_LEAVE = exports.MOUSE_ENTER = exports.MOBILE_WIDTH = exports.MOBILE = exports.MIN_BANNER_HEIGHT = exports.MENU_ITEM = exports.MAX_BANNER_HEIGHT = exports.LOGOUT = exports.LOGIN_FORM = exports.LOAD_MORE_STRING = exports.LOAD_MORE = exports.LINK = exports.KEYWORD = exports.JW_PLAYER_TYPE_FILE = exports.IN_VIEW_CONFIG = exports.INVISIBLE = exports.INFINITE = exports.IMAGE_WRAPPER = exports.IMAGES = exports.IMAGE = exports.ID = exports.ICON_BUTTON = exports.HOVER = exports.HIDE = exports.HIDDEN = exports.HERO_WRAPPER = exports.HERO = exports.HEADLINE_PROP = exports.HALF = exports.GTM_DATA_ID_ATTR = exports.GTM = exports.GRAPH_QL_ERROR = exports.GET_FILE_FALLBACK = exports.GET_BANNER = exports.FULL = exports.FEATURED = exports.END_ADUNIT = exports.EMAIL = exports.ELEMENT = exports.DESK = exports.DEFAULT_OFFSET = exports.DEFAULT_LIMIT = exports.DATE = exports.DATA_SUMMARY_URL_REGEX = exports.DATA_SUMMARY_EMAIL_REGEX = exports.COUNT_CONTENT_HIERARCHIES = exports.COLUMN = exports.CODE = exports.CLICK = exports.CLASS_MODIFIERS = exports.CLASSIC = exports.CHILD_PROPS_TO_USE = exports.CHECKBOX = exports.CENTER = exports.CATEGORY_ID = exports.CAROUSEL = exports.BUTTON_ICON = exports.BUTTON = exports.BREAKPOINT_SIZES = exports.BOLD_TAG = exports.BLANK_SPACE_UNICODE_STRING = exports.BANNER_QUERY_PROPS = exports.BANNER_LOADING = exports.BANNER_LOADED = exports.BANNER_EMPTY = exports.AZ_QUERY_CONST = exports.AZ_AGGS = exports.AZ = exports.AND_OPERATOR = exports.AND = exports.ANCHOR_TAG = exports.ALL_AZ_SORT = exports.ALLOWED_BLOCK_TYPES = exports.ALL = exports.ALIGNMENT = void 0;
|
|
8
|
+
exports.SELECT = exports.SEARCH_TERM = exports.SEARCH_PUBLISHED_CONTENT = exports.SEARCH = exports.SCROLL_OFFSET = exports.ROW = exports.RANGE = exports.PUBLISHED = exports.PROPS_TO_CHECK = exports.PREVIOUS_STRING = exports.PREHEADER_PROP = exports.PB_QUERY_CONST = exports.PASSWORD_VALIDATION_MESSAGE = exports.PASSWORD_REGEX = exports.PASSWORD_CONFIRM_MESSAGE = exports.PASSWORD = exports.PAGINATION_QUERY_CONST = exports.PAGINATION_DISPLAY_LIMIT = exports.PAGINATION_DIFFERENCE = exports.OR_OPERATOR = exports.OR = exports.ON_CLICK = exports.OBJECT = exports.NEXT_STRING = exports.MOUSE_LEAVE = exports.MOUSE_ENTER = exports.MOBILE_WIDTH = exports.MOBILE = exports.MIN_BANNER_HEIGHT = exports.MENU_ITEM = exports.MAX_BANNER_HEIGHT = exports.LOGOUT = exports.LOGIN_FORM = exports.LOAD_MORE_STRING = exports.LOAD_MORE = exports.LINK = exports.KEYWORD = exports.JW_PLAYER_TYPE_FILE = exports.IN_VIEW_CONFIG = exports.INVISIBLE = exports.INFINITE = exports.IMAGE_WRAPPER = exports.IMAGES = exports.IMAGE = exports.ID = exports.ICON_BUTTON = exports.HOVER = exports.HIDE = exports.HIDDEN = exports.HERO_WRAPPER = exports.HERO = exports.HEADLINE_PROP = exports.HALF = exports.GTM_DATA_ID_ATTR = exports.GTM = exports.GRAPH_QL_ERROR = exports.GET_FILE_FALLBACK = exports.GET_BANNER = exports.FULL = exports.FEATURED = exports.END_ADUNIT = exports.EMAIL = exports.ELEMENT = exports.DESK = exports.DEFAULT_OFFSET = exports.DEFAULT_LIMIT = exports.DATE = exports.DATA_SUMMARY_URL_REGEX = exports.DATA_SUMMARY_TEL_REGEX = exports.DATA_SUMMARY_EMAIL_REGEX = exports.COUNT_CONTENT_HIERARCHIES = exports.COLUMN = exports.CODE = exports.CLICK = exports.CLASS_MODIFIERS = exports.CLASSIC = exports.CHILD_PROPS_TO_USE = exports.CHECKBOX = exports.CENTER = exports.CATEGORY_ID = exports.CAROUSEL = exports.BUTTON_ICON = exports.BUTTON = exports.BREAKPOINT_SIZES = exports.BOLD_TAG = exports.BLANK_SPACE_UNICODE_STRING = exports.BANNER_QUERY_PROPS = exports.BANNER_LOADING = exports.BANNER_LOADED = exports.BANNER_EMPTY = exports.AZ_QUERY_CONST = exports.AZ_AGGS = exports.AZ = exports.AND_OPERATOR = exports.AND = exports.ANCHOR_TAG = exports.ALL_AZ_SORT = exports.ALLOWED_BLOCK_TYPES = exports.ALL = exports.ALIGNMENT = void 0;
|
|
9
|
+
exports.WITH_BANNER = exports.WIDE = exports.WAYPOINT_BOTTOM_OFFSET = exports.VISIBLE = exports.VIDEO_WRAPPER_CLASS_NAME = exports.TEXT_SEARCH = exports.TARGET_BLANK = exports.TABLET = exports.STRING = exports.SPONSORED = exports.SHOW = exports.SELECT = exports.SEARCH_TERM = exports.SEARCH_PUBLISHED_CONTENT = exports.SEARCH = exports.SCROLL_OFFSET = exports.ROW = exports.RANGE = exports.PUBLISHED = exports.PROPS_TO_CHECK = exports.PREVIOUS_STRING = exports.PREHEADER_PROP = exports.PB_QUERY_CONST = exports.PASSWORD_VALIDATION_MESSAGE = exports.PASSWORD_REGEX = exports.PASSWORD_CONFIRM_MESSAGE = exports.PASSWORD = exports.PAGINATION_QUERY_CONST = exports.PAGINATION_DISPLAY_LIMIT = exports.PAGINATION_DIFFERENCE = exports.OR_OPERATOR = exports.OR = exports.ON_CLICK = exports.OBJECT = exports.NEXT_STRING = exports.MOUSE_LEAVE = exports.MOUSE_ENTER = exports.MOBILE_WIDTH = exports.MOBILE = exports.MIN_BANNER_HEIGHT = exports.MENU_ITEM = exports.MAX_BANNER_HEIGHT = exports.LOGOUT = exports.LOGIN_FORM = exports.LOAD_MORE_STRING = exports.LOAD_MORE = exports.LINK = exports.KEYWORD = exports.JW_PLAYER_TYPE_FILE = exports.IN_VIEW_CONFIG = exports.INVISIBLE = exports.INFINITE = exports.IMAGE_WRAPPER = exports.IMAGES = exports.IMAGE = exports.ID = exports.ICON_BUTTON = exports.HOVER = exports.HIDE = exports.HIDDEN = exports.HERO_WRAPPER = exports.HERO = exports.HEADLINE_PROP = exports.HALF = exports.GTM_DATA_ID_ATTR = exports.GTM = exports.GRAPH_QL_ERROR = exports.GET_FILE_FALLBACK = exports.GET_BANNER = exports.FULL = exports.FEATURED = exports.END_ADUNIT = exports.EMAIL = exports.ELEMENT = exports.DESK = exports.DEFAULT_OFFSET = exports.DEFAULT_LIMIT = exports.DATE = exports.DATA_SUMMARY_URL_REGEX = exports.DATA_SUMMARY_TEL_REGEX = exports.DATA_SUMMARY_EMAIL_REGEX = exports.COUNT_CONTENT_HIERARCHIES = exports.COLUMN = exports.CODE = exports.CLICK = exports.CLASS_MODIFIERS = exports.CLASSIC = exports.CHILD_PROPS_TO_USE = exports.CHECKBOX = exports.CENTER = exports.CATEGORY_ID = exports.CAROUSEL = exports.BUTTON_ICON = exports.BUTTON = exports.BREAKPOINT_SIZES = exports.BOLD_TAG = exports.BLANK_SPACE_UNICODE_STRING = exports.BANNER_QUERY_PROPS = exports.BANNER_LOADING = exports.BANNER_LOADED = exports.BANNER_EMPTY = exports.AZ_QUERY_CONST = exports.AZ_AGGS = exports.AZ = exports.AND_OPERATOR = exports.AND = exports.ANCHOR_TAG = exports.ALL_AZ_SORT = exports.ALLOWED_BLOCK_TYPES = exports.ALL = exports.ALIGNMENT = void 0;
|
|
10
10
|
var BOLD_TAG = 'b';
|
|
11
11
|
exports.BOLD_TAG = BOLD_TAG;
|
|
12
12
|
var BUTTON = 'button';
|
|
@@ -286,4 +286,7 @@ var DATA_SUMMARY_EMAIL_REGEX = /^([a-z0-9_\.\+-]+)@([\da-z\.-]+)\.([a-z\.]{2,6})
|
|
|
286
286
|
exports.DATA_SUMMARY_EMAIL_REGEX = DATA_SUMMARY_EMAIL_REGEX;
|
|
287
287
|
var DATA_SUMMARY_URL_REGEX = /(https?:\/\/)?(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/;
|
|
288
288
|
exports.DATA_SUMMARY_URL_REGEX = DATA_SUMMARY_URL_REGEX;
|
|
289
|
+
var DATA_SUMMARY_TEL_REGEX = /^\+{0,1}[0-9\(\)\.\- \/]{7,}$/; // note: very loose phone number match not for validation
|
|
290
|
+
|
|
291
|
+
exports.DATA_SUMMARY_TEL_REGEX = DATA_SUMMARY_TEL_REGEX;
|
|
289
292
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/constants/index.js"],"names":["BOLD_TAG","BUTTON","CODE","BUTTON_ICON","ICON_BUTTON","AND","OR","AND_OPERATOR","OR_OPERATOR","TEXT_SEARCH","INFINITE","CLASSIC","SEARCH_PUBLISHED_CONTENT","SEARCH","SEARCH_TERM","RANGE","CHECKBOX","ELEMENT","MENU_ITEM","SELECT","ON_CLICK","KEYWORD","DEFAULT_LIMIT","DEFAULT_OFFSET","MOBILE_WIDTH","FEATURED","SPONSORED","STRING","OBJECT","DATE","FULL","CHILD_PROPS_TO_USE","CATEGORY_ID","PUBLISHED","ID","LINK","EMAIL","PASSWORD","LOGOUT","LOGIN_FORM","GRAPH_QL_ERROR","HOVER","MOUSE_ENTER","MOUSE_LEAVE","CLICK","HIDE","SHOW","VISIBLE","INVISIBLE","HIDDEN","CLASS_MODIFIERS","MODIFIER","GTM_CLASS_NAME","DESKTOP","DEFAULT","TABLET","MOBILE","SIZE","BUTTON_TYPE","ICON","STYLE","WIDTH","STICKY","ALIGNMENT","CAROUSEL","IMAGE","IMAGES","IMAGE_WRAPPER","END_ADUNIT","COUNT_CONTENT_HIERARCHIES","GET_BANNER","WIDTH_HEIGHT","BANNER_QUERY_PROPS","WAYPOINT_BOTTOM_OFFSET","IN_VIEW_CONFIG","once","offset","bottomOffset","HERO","HERO_WRAPPER","GET_FILE_FALLBACK","getFile","url","data","WITH_BANNER","BLANK_SPACE_UNICODE_STRING","ALL","COLUMN","ROW","GTM","GTM_DATA_ID_ATTR","CENTER","HALF","WIDE","DESK","PAGINATION_QUERY_CONST","AZ_QUERY_CONST","PB_QUERY_CONST","NEXT_STRING","PREVIOUS_STRING","LOAD_MORE_STRING","LOAD_MORE","PAGINATION_DISPLAY_LIMIT","PAGINATION_DIFFERENCE","PROPS_TO_CHECK","JW_PLAYER_TYPE_FILE","VIDEO_WRAPPER_CLASS_NAME","BREAKPOINT_SIZES","sm","md","lg","xl","xxl","MAX_BANNER_HEIGHT","MIN_BANNER_HEIGHT","PASSWORD_REGEX","PASSWORD_VALIDATION_MESSAGE","PASSWORD_CONFIRM_MESSAGE","ALLOWED_BLOCK_TYPES","PREHEADER_PROP","HEADLINE_PROP","AZ","AZ_AGGS","aggs","azCount","terms","script","size","sort","ALL_AZ_SORT","_script","type","lang","source","params","letters","order","SCROLL_OFFSET","process","env","BLAZE_SCROLL_OFFSET","BANNER_LOADING","BANNER_EMPTY","BANNER_LOADED","ANCHOR_TAG","TARGET_BLANK","DATA_SUMMARY_EMAIL_REGEX","DATA_SUMMARY_URL_REGEX"],"mappings":";;;;;;;;;AAAA,IAAMA,QAAQ,GAAG,GAAjB;;AACA,IAAMC,MAAM,GAAG,QAAf;;AACA,IAAMC,IAAI,GAAG,MAAb;;AACA,IAAMC,WAAW,GAAG,cAApB;;AACA,IAAMC,WAAW,GAAG,aAApB;;AACA,IAAMC,GAAG,GAAG,KAAZ;;AACA,IA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AENC,QAAAA,MAAM,EACJ,4HAHI;AAINC,QAAAA,MAAM,EAAE;AACNC,UAAAA,OAAO,EAAEd;AADH;AAJF,OAFD;AAUPe,MAAAA,KAAK,EAAE;AAVA;AADX,GADI,EAeJ;AAAE,oBAAgB;AAAlB,GAfI;AADY,CAApB;;AAoBA,IAAMC,aAAa,GAAGC,OAAO,CAACC,GAAR,CAAYC,mBAAZ,IAAmC,EAAzD;;AAEA,IAAMC,cAAc,GAAG,SAAvB;;AACA,IAAMC,YAAY,GAAG,OAArB;;AACA,IAAMC,aAAa,GAAG,QAAtB;;AACA,IAAMC,UAAU,GAAG,GAAnB;;AACA,IAAMC,YAAY,GAAG,QAArB;;AAEA,IAAMC,wBAAwB,GAAG,mDAAjC;;AACA,IAAMC,sBAAsB,GAAG,gGAA/B","sourcesContent":["const BOLD_TAG = 'b';\nconst BUTTON = 'button';\nconst CODE = 'code';\nconst BUTTON_ICON = 'button--icon';\nconst ICON_BUTTON = 'icon-button';\nconst AND = 'AND';\nconst OR = 'OR';\nconst AND_OPERATOR = 'must';\nconst OR_OPERATOR = 'should';\nconst TEXT_SEARCH = 'text-search';\nconst INFINITE = 'infinite';\nconst CLASSIC = 'classic';\nconst SEARCH_PUBLISHED_CONTENT = 'searchPublishedContent';\nconst SEARCH = 'search';\nconst SEARCH_TERM = 'search_term';\nconst RANGE = 'range';\nconst CHECKBOX = 'checkbox';\nconst ELEMENT = 'element';\nconst MENU_ITEM = 'menuitem';\nconst SELECT = 'select';\nconst ON_CLICK = 'onClick';\nconst KEYWORD = 'keyword';\nconst DEFAULT_LIMIT = 50;\nconst DEFAULT_OFFSET = 0;\nconst MOBILE_WIDTH = 768;\nconst FEATURED = 'featured';\nconst SPONSORED = 'sponsored';\nconst STRING = 'string';\nconst OBJECT = 'object';\nconst DATE = 'date';\nconst FULL = 'full';\nconst CHILD_PROPS_TO_USE = ['width'];\nconst CATEGORY_ID = 'categoryId';\nconst PUBLISHED = 'published';\nconst ID = 'id';\nconst LINK = 'link';\nconst EMAIL = 'email';\nconst PASSWORD = 'password';\nconst LOGOUT = 'logout';\nconst LOGIN_FORM = 'loginForm';\nconst GRAPH_QL_ERROR = 'GraphQL error: ';\nconst HOVER = 'hover';\nconst MOUSE_ENTER = 'mouseenter';\nconst MOUSE_LEAVE = 'mouseleave';\nconst CLICK = 'click';\nconst HIDE = 'hide';\nconst SHOW = 'show';\nconst VISIBLE = 'visible';\nconst INVISIBLE = 'invisible';\nconst HIDDEN = 'hidden';\nconst CLASS_MODIFIERS = {\n MODIFIER: 'modifier',\n GTM_CLASS_NAME: 'gtmClassName',\n HIDE: 'hide',\n DESKTOP: 'desktop',\n DEFAULT: 'default',\n TABLET: 'tablet',\n MOBILE: 'mobile',\n SIZE: 'size',\n BUTTON_TYPE: 'buttonType',\n ICON: 'icon',\n STYLE: 'style',\n WIDTH: 'width',\n STICKY: 'sticky',\n ALIGNMENT: 'alignment'\n};\nconst CAROUSEL = 'carousel';\nconst IMAGE = 'image';\nconst IMAGES = `${IMAGE}s`;\nconst IMAGE_WRAPPER = 'image__wrapper';\nconst END_ADUNIT = 'root';\nconst COUNT_CONTENT_HIERARCHIES = 'countContentHierarchies';\nconst GET_BANNER = 'getBanner';\nconst WIDTH_HEIGHT = 'width height';\nconst BANNER_QUERY_PROPS = `sizes { ${WIDTH_HEIGHT} viewports { ${WIDTH_HEIGHT} } }`;\nconst WAYPOINT_BOTTOM_OFFSET = '-200px';\nconst IN_VIEW_CONFIG = {\n once: true,\n offset: '200px',\n bottomOffset: '-200px'\n};\nconst HERO = 'hero';\nconst HERO_WRAPPER = 'hero__wrapper';\n\nconst GET_FILE_FALLBACK = {\n getFile: { url: '', data: {} }\n};\n\nconst WITH_BANNER = ' with-banner';\nconst BLANK_SPACE_UNICODE_STRING = '\\u00A0';\nconst ALL = 'ALL';\nconst COLUMN = 'column';\nconst ROW = 'row';\nconst GTM = 'gtm';\nconst GTM_DATA_ID_ATTR = 'data-gtm-id';\nconst CENTER = 'center';\nconst HALF = 'half';\nconst WIDE = 'wide';\nconst DESK = 'desk';\nconst TABLET = 'tablet';\nconst MOBILE = 'mobile';\nconst ALIGNMENT = 'alignment';\nconst PAGINATION_QUERY_CONST = '[page]';\nconst AZ_QUERY_CONST = '[aZ]';\nconst PB_QUERY_CONST = 'pb';\nconst NEXT_STRING = 'Next';\nconst PREVIOUS_STRING = 'Previous';\nconst LOAD_MORE_STRING = 'Load More';\nconst LOAD_MORE = 'loadMore';\nconst PAGINATION_DISPLAY_LIMIT = 10;\nconst PAGINATION_DIFFERENCE = 5;\n\nconst PROPS_TO_CHECK = [\n ['altText', 'alt'],\n ['caption', 'caption'],\n ['hrefUrl', 'hrefUrl'],\n ['credits', 'credits']\n];\n\nconst JW_PLAYER_TYPE_FILE = 'file';\nconst VIDEO_WRAPPER_CLASS_NAME = 'video__wrapper';\nconst BREAKPOINT_SIZES = {\n sm: 'sm',\n md: 'md',\n lg: 'lg',\n xl: 'xl',\n xxl: '2xl'\n};\n\nconst MAX_BANNER_HEIGHT = 250;\nconst MIN_BANNER_HEIGHT = 90;\nconst PASSWORD_REGEX = /^(?=.*\\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[^a-zA-Z0-9])(?!.*\\s).{8,}$/;\nconst PASSWORD_VALIDATION_MESSAGE =\n 'Must contain 8 or more characters with a mix of upper & lower case letters, numbers & symbols and no spaces';\nconst PASSWORD_CONFIRM_MESSAGE = 'Passwords must match';\nconst ALLOWED_BLOCK_TYPES = ['p', 'ul', 'ol'];\n\nconst PREHEADER_PROP = 'alternativePreHeader';\nconst HEADLINE_PROP = 'alternativeHeadline';\nconst AZ = [\n 'A',\n 'B',\n 'C',\n 'D',\n 'E',\n 'F',\n 'G',\n 'H',\n 'I',\n 'J',\n 'K',\n 'L',\n 'M',\n 'N',\n 'O',\n 'P',\n 'Q',\n 'R',\n 'S',\n 'T',\n 'U',\n 'V',\n 'W',\n 'X',\n 'Y',\n 'Z'\n];\n\nconst AZ_AGGS = {\n aggs: {\n azCount: {\n terms: {\n script: \"doc['name.keyword'].getValue().substring(0,1).toUpperCase()\",\n size: 500\n }\n }\n },\n sort: [{ 'name.keyword': 'asc' }]\n};\nconst ALL_AZ_SORT = {\n sort: [\n {\n _script: {\n type: 'number',\n script: {\n lang: 'painless',\n source:\n \"int charPos = params.letters.indexOf(doc['name.keyword'].value.substring(0,1).toUpperCase()); charPos > -1 ? charPos : 100\",\n params: {\n letters: AZ\n }\n },\n order: 'asc'\n }\n },\n { 'name.keyword': 'asc' }\n ]\n};\n\nconst SCROLL_OFFSET = process.env.BLAZE_SCROLL_OFFSET || 50;\n\nconst BANNER_LOADING = 'loading';\nconst BANNER_EMPTY = 'empty';\nconst BANNER_LOADED = 'loaded';\nconst ANCHOR_TAG = 'a';\nconst TARGET_BLANK = '_blank';\n\nconst DATA_SUMMARY_EMAIL_REGEX = /^([a-z0-9_\\.\\+-]+)@([\\da-z\\.-]+)\\.([a-z\\.]{2,6})$/;\nconst DATA_SUMMARY_URL_REGEX = /(https?:\\/\\/)?(www\\.)?[-a-zA-Z0-9@:%._\\+~#=]{2,256}\\.[a-z]{2,6}\\b([-a-zA-Z0-9@:%_\\+.~#?&//=]*)/;\n\nexport {\n BANNER_LOADING,\n BANNER_EMPTY,\n BANNER_LOADED,\n BLANK_SPACE_UNICODE_STRING,\n BOLD_TAG,\n BUTTON,\n BUTTON_ICON,\n ICON_BUTTON,\n AND,\n AND_OPERATOR,\n OR_OPERATOR,\n TEXT_SEARCH,\n SEARCH_PUBLISHED_CONTENT,\n SEARCH,\n SEARCH_TERM,\n RANGE,\n CHECKBOX,\n SELECT,\n KEYWORD,\n OR,\n DEFAULT_LIMIT,\n DEFAULT_OFFSET,\n FEATURED,\n SPONSORED,\n STRING,\n DATE,\n FULL,\n CHILD_PROPS_TO_USE,\n CATEGORY_ID,\n PUBLISHED,\n ID,\n LINK,\n CLASS_MODIFIERS,\n END_ADUNIT,\n COUNT_CONTENT_HIERARCHIES,\n GET_BANNER,\n BANNER_QUERY_PROPS,\n CAROUSEL,\n IMAGE,\n IMAGES,\n IMAGE_WRAPPER,\n IN_VIEW_CONFIG,\n GET_FILE_FALLBACK,\n HERO,\n HERO_WRAPPER,\n WITH_BANNER,\n ALL,\n COLUMN,\n ROW,\n GTM,\n GTM_DATA_ID_ATTR,\n PROPS_TO_CHECK,\n CENTER,\n HALF,\n WIDE,\n DESK,\n TABLET,\n MOBILE,\n ALIGNMENT,\n OBJECT,\n ON_CLICK,\n WAYPOINT_BOTTOM_OFFSET,\n JW_PLAYER_TYPE_FILE,\n CODE,\n VIDEO_WRAPPER_CLASS_NAME,\n PAGINATION_QUERY_CONST,\n PB_QUERY_CONST,\n INFINITE,\n NEXT_STRING,\n PREVIOUS_STRING,\n PAGINATION_DISPLAY_LIMIT,\n PAGINATION_DIFFERENCE,\n LOAD_MORE_STRING,\n LOAD_MORE,\n CLASSIC,\n BREAKPOINT_SIZES,\n EMAIL,\n PASSWORD,\n LOGOUT,\n MIN_BANNER_HEIGHT,\n MAX_BANNER_HEIGHT,\n GRAPH_QL_ERROR,\n HOVER,\n MOUSE_ENTER,\n MOUSE_LEAVE,\n CLICK,\n SHOW,\n HIDE,\n VISIBLE,\n INVISIBLE,\n MOBILE_WIDTH,\n HIDDEN,\n MENU_ITEM,\n LOGIN_FORM,\n PASSWORD_REGEX,\n PASSWORD_VALIDATION_MESSAGE,\n PASSWORD_CONFIRM_MESSAGE,\n ELEMENT,\n ALLOWED_BLOCK_TYPES,\n PREHEADER_PROP,\n HEADLINE_PROP,\n AZ_QUERY_CONST,\n AZ_AGGS,\n ALL_AZ_SORT,\n AZ,\n SCROLL_OFFSET,\n ANCHOR_TAG,\n TARGET_BLANK,\n DATA_SUMMARY_EMAIL_REGEX,\n DATA_SUMMARY_URL_REGEX\n};\n"],"file":"index.js"}
|
|
1
|
+
{"version":3,"sources":["../../src/constants/index.js"],"names":["BOLD_TAG","BUTTON","CODE","BUTTON_ICON","ICON_BUTTON","AND","OR","AND_OPERATOR","OR_OPERATOR","TEXT_SEARCH","INFINITE","CLASSIC","SEARCH_PUBLISHED_CONTENT","SEARCH","SEARCH_TERM","RANGE","CHECKBOX","ELEMENT","MENU_ITEM","SELECT","ON_CLICK","KEYWORD","DEFAULT_LIMIT","DEFAULT_OFFSET","MOBILE_WIDTH","FEATURED","SPONSORED","STRING","OBJECT","DATE","FULL","CHILD_PROPS_TO_USE","CATEGORY_ID","PUBLISHED","ID","LINK","EMAIL","PASSWORD","LOGOUT","LOGIN_FORM","GRAPH_QL_ERROR","HOVER","MOUSE_ENTER","MOUSE_LEAVE","CLICK","HIDE","SHOW","VISIBLE","INVISIBLE","HIDDEN","CLASS_MODIFIERS","MODIFIER","GTM_CLASS_NAME","DESKTOP","DEFAULT","TABLET","MOBILE","SIZE","BUTTON_TYPE","ICON","STYLE","WIDTH","STICKY","ALIGNMENT","CAROUSEL","IMAGE","IMAGES","IMAGE_WRAPPER","END_ADUNIT","COUNT_CONTENT_HIERARCHIES","GET_BANNER","WIDTH_HEIGHT","BANNER_QUERY_PROPS","WAYPOINT_BOTTOM_OFFSET","IN_VIEW_CONFIG","once","offset","bottomOffset","HERO","HERO_WRAPPER","GET_FILE_FALLBACK","getFile","url","data","WITH_BANNER","BLANK_SPACE_UNICODE_STRING","ALL","COLUMN","ROW","GTM","GTM_DATA_ID_ATTR","CENTER","HALF","WIDE","DESK","PAGINATION_QUERY_CONST","AZ_QUERY_CONST","PB_QUERY_CONST","NEXT_STRING","PREVIOUS_STRING","LOAD_MORE_STRING","LOAD_MORE","PAGINATION_DISPLAY_LIMIT","PAGINATION_DIFFERENCE","PROPS_TO_CHECK","JW_PLAYER_TYPE_FILE","VIDEO_WRAPPER_CLASS_NAME","BREAKPOINT_SIZES","sm","md","lg","xl","xxl","MAX_BANNER_HEIGHT","MIN_BANNER_HEIGHT","PASSWORD_REGEX","PASSWORD_VALIDATION_MESSAGE","PASSWORD_CONFIRM_MESSAGE","ALLOWED_BLOCK_TYPES","PREHEADER_PROP","HEADLINE_PROP","AZ","AZ_AGGS","aggs","azCount","terms","script","size","sort","ALL_AZ_SORT","_script","type","lang","source","params","letters","order","SCROLL_OFFSET","process","env","BLAZE_SCROLL_OFFSET","BANNER_LOADING","BANNER_EMPTY","BANNER_LOADED","ANCHOR_TAG","TARGET_BLANK","DATA_SUMMARY_EMAIL_REGEX","DATA_SUMMARY_URL_REGEX","DATA_SUMMARY_TEL_REGEX"],"mappings":";;;;;;;;;AAAA,IAAMA,QAAQ,GAAG,GAAjB;;AACA,IAAMC,MAAM,GAAG,QAAf;;AACA,IAAMC,IAAI,GAAG,MAAb;;AACA,IAAMC,WAAW,GAAG,cAApB;;AACA,IAAMC,WAAW,GAAG,aAApB;;AACA,IAAMC,GAAG,GAAG,KAAZ;;AACA,IAAMC,EAAE,GAAG,IAAX;;AACA,IAAMC,YAAY,GAAG,MAArB;;AACA,IAAMC,WAAW,GAAG,QAApB;;AACA,IAAMC,WAAW,GAAG,aAApB;;AACA,IAAMC,QAAQ,GAAG,UAAjB;;AACA,IAAMC,OAAO,GAAG,SAAhB;;AACA,IAAMC,wBAAwB,GAAG,wBAAjC;;AACA,IAAMC,MAAM,GAAG,QAAf;;AACA,IAAMC,WAAW,GAAG,aAApB;;AACA,IAAMC,KAAK,GAAG,OAAd;;AACA,IAAMC,QAAQ,GAAG,UAAjB;;AACA,IAAMC,OAAO,GAAG,SAAhB;;AACA,IAAMC,SAAS,GAAG,UAAlB;;AACA,IAAMC,MAAM,GAAG,QAAf;;AACA,IAAMC,QAAQ,GAAG,SAAjB;;AACA,IAAMC,OAAO,GAAG,SAAhB;;AACA,IAAMC,aAAa,GAAG,EAAtB;;AACA,IAAMC,cAAc,GAAG,CAAvB;;AACA,IAAMC,YAAY,GAAG,GAArB;;AACA,IAAMC,QAAQ,GAAG,UAAjB;;AACA,IAAMC,SAAS,GAAG,WAAlB;;AACA,IAAMC,MAAM,GAAG,QAAf;;AACA,IAAMC,MAAM,GAAG,QAAf;;AACA,IAAMC,IAAI,GAAG,MAAb;;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xBS,EAyBT,GAzBS,EA0BT,GA1BS,CAAX;;AA6BA,IAAMC,OAAO,GAAG;AACdC,EAAAA,IAAI,EAAE;AACJC,IAAAA,OAAO,EAAE;AACPC,MAAAA,KAAK,EAAE;AACLC,QAAAA,MAAM,EAAE,6DADH;AAELC,QAAAA,IAAI,EAAE;AAFD;AADA;AADL,GADQ;AASdC,EAAAA,IAAI,EAAE,CAAC;AAAE,oBAAgB;AAAlB,GAAD;AATQ,CAAhB;;AAWA,IAAMC,WAAW,GAAG;AAClBD,EAAAA,IAAI,EAAE,CACJ;AACEE,IAAAA,OAAO,EAAE;AACPC,MAAAA,IAAI,EAAE,QADC;AAEPL,MAAAA,MAAM,EAAE;AACNM,QAAAA,IAAI,EAAE,UADA;AAENC,QAAAA,MAAM,EACJ,4HAHI;AAINC,QAAAA,MAAM,EAAE;AACNC,UAAAA,OAAO,EAAEd;AADH;AAJF,OAFD;AAUPe,MAAAA,KAAK,EAAE;AAVA;AADX,GADI,EAeJ;AAAE,oBAAgB;AAAlB,GAfI;AADY,CAApB;;AAoBA,IAAMC,aAAa,GAAGC,OAAO,CAACC,GAAR,CAAYC,mBAAZ,IAAmC,EAAzD;;AAEA,IAAMC,cAAc,GAAG,SAAvB;;AACA,IAAMC,YAAY,GAAG,OAArB;;AACA,IAAMC,aAAa,GAAG,QAAtB;;AACA,IAAMC,UAAU,GAAG,GAAnB;;AACA,IAAMC,YAAY,GAAG,QAArB;;AAEA,IAAMC,wBAAwB,GAAG,mDAAjC;;AACA,IAAMC,sBAAsB,GAAG,gGAA/B;;AACA,IAAMC,sBAAsB,GAAG,+BAA/B,C,CAAgE","sourcesContent":["const BOLD_TAG = 'b';\nconst BUTTON = 'button';\nconst CODE = 'code';\nconst BUTTON_ICON = 'button--icon';\nconst ICON_BUTTON = 'icon-button';\nconst AND = 'AND';\nconst OR = 'OR';\nconst AND_OPERATOR = 'must';\nconst OR_OPERATOR = 'should';\nconst TEXT_SEARCH = 'text-search';\nconst INFINITE = 'infinite';\nconst CLASSIC = 'classic';\nconst SEARCH_PUBLISHED_CONTENT = 'searchPublishedContent';\nconst SEARCH = 'search';\nconst SEARCH_TERM = 'search_term';\nconst RANGE = 'range';\nconst CHECKBOX = 'checkbox';\nconst ELEMENT = 'element';\nconst MENU_ITEM = 'menuitem';\nconst SELECT = 'select';\nconst ON_CLICK = 'onClick';\nconst KEYWORD = 'keyword';\nconst DEFAULT_LIMIT = 50;\nconst DEFAULT_OFFSET = 0;\nconst MOBILE_WIDTH = 768;\nconst FEATURED = 'featured';\nconst SPONSORED = 'sponsored';\nconst STRING = 'string';\nconst OBJECT = 'object';\nconst DATE = 'date';\nconst FULL = 'full';\nconst CHILD_PROPS_TO_USE = ['width'];\nconst CATEGORY_ID = 'categoryId';\nconst PUBLISHED = 'published';\nconst ID = 'id';\nconst LINK = 'link';\nconst EMAIL = 'email';\nconst PASSWORD = 'password';\nconst LOGOUT = 'logout';\nconst LOGIN_FORM = 'loginForm';\nconst GRAPH_QL_ERROR = 'GraphQL error: ';\nconst HOVER = 'hover';\nconst MOUSE_ENTER = 'mouseenter';\nconst MOUSE_LEAVE = 'mouseleave';\nconst CLICK = 'click';\nconst HIDE = 'hide';\nconst SHOW = 'show';\nconst VISIBLE = 'visible';\nconst INVISIBLE = 'invisible';\nconst HIDDEN = 'hidden';\nconst CLASS_MODIFIERS = {\n MODIFIER: 'modifier',\n GTM_CLASS_NAME: 'gtmClassName',\n HIDE: 'hide',\n DESKTOP: 'desktop',\n DEFAULT: 'default',\n TABLET: 'tablet',\n MOBILE: 'mobile',\n SIZE: 'size',\n BUTTON_TYPE: 'buttonType',\n ICON: 'icon',\n STYLE: 'style',\n WIDTH: 'width',\n STICKY: 'sticky',\n ALIGNMENT: 'alignment'\n};\nconst CAROUSEL = 'carousel';\nconst IMAGE = 'image';\nconst IMAGES = `${IMAGE}s`;\nconst IMAGE_WRAPPER = 'image__wrapper';\nconst END_ADUNIT = 'root';\nconst COUNT_CONTENT_HIERARCHIES = 'countContentHierarchies';\nconst GET_BANNER = 'getBanner';\nconst WIDTH_HEIGHT = 'width height';\nconst BANNER_QUERY_PROPS = `sizes { ${WIDTH_HEIGHT} viewports { ${WIDTH_HEIGHT} } }`;\nconst WAYPOINT_BOTTOM_OFFSET = '-200px';\nconst IN_VIEW_CONFIG = {\n once: true,\n offset: '200px',\n bottomOffset: '-200px'\n};\nconst HERO = 'hero';\nconst HERO_WRAPPER = 'hero__wrapper';\n\nconst GET_FILE_FALLBACK = {\n getFile: { url: '', data: {} }\n};\n\nconst WITH_BANNER = ' with-banner';\nconst BLANK_SPACE_UNICODE_STRING = '\\u00A0';\nconst ALL = 'ALL';\nconst COLUMN = 'column';\nconst ROW = 'row';\nconst GTM = 'gtm';\nconst GTM_DATA_ID_ATTR = 'data-gtm-id';\nconst CENTER = 'center';\nconst HALF = 'half';\nconst WIDE = 'wide';\nconst DESK = 'desk';\nconst TABLET = 'tablet';\nconst MOBILE = 'mobile';\nconst ALIGNMENT = 'alignment';\nconst PAGINATION_QUERY_CONST = '[page]';\nconst AZ_QUERY_CONST = '[aZ]';\nconst PB_QUERY_CONST = 'pb';\nconst NEXT_STRING = 'Next';\nconst PREVIOUS_STRING = 'Previous';\nconst LOAD_MORE_STRING = 'Load More';\nconst LOAD_MORE = 'loadMore';\nconst PAGINATION_DISPLAY_LIMIT = 10;\nconst PAGINATION_DIFFERENCE = 5;\n\nconst PROPS_TO_CHECK = [\n ['altText', 'alt'],\n ['caption', 'caption'],\n ['hrefUrl', 'hrefUrl'],\n ['credits', 'credits']\n];\n\nconst JW_PLAYER_TYPE_FILE = 'file';\nconst VIDEO_WRAPPER_CLASS_NAME = 'video__wrapper';\nconst BREAKPOINT_SIZES = {\n sm: 'sm',\n md: 'md',\n lg: 'lg',\n xl: 'xl',\n xxl: '2xl'\n};\n\nconst MAX_BANNER_HEIGHT = 250;\nconst MIN_BANNER_HEIGHT = 90;\nconst PASSWORD_REGEX = /^(?=.*\\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[^a-zA-Z0-9])(?!.*\\s).{8,}$/;\nconst PASSWORD_VALIDATION_MESSAGE =\n 'Must contain 8 or more characters with a mix of upper & lower case letters, numbers & symbols and no spaces';\nconst PASSWORD_CONFIRM_MESSAGE = 'Passwords must match';\nconst ALLOWED_BLOCK_TYPES = ['p', 'ul', 'ol'];\n\nconst PREHEADER_PROP = 'alternativePreHeader';\nconst HEADLINE_PROP = 'alternativeHeadline';\nconst AZ = [\n 'A',\n 'B',\n 'C',\n 'D',\n 'E',\n 'F',\n 'G',\n 'H',\n 'I',\n 'J',\n 'K',\n 'L',\n 'M',\n 'N',\n 'O',\n 'P',\n 'Q',\n 'R',\n 'S',\n 'T',\n 'U',\n 'V',\n 'W',\n 'X',\n 'Y',\n 'Z'\n];\n\nconst AZ_AGGS = {\n aggs: {\n azCount: {\n terms: {\n script: \"doc['name.keyword'].getValue().substring(0,1).toUpperCase()\",\n size: 500\n }\n }\n },\n sort: [{ 'name.keyword': 'asc' }]\n};\nconst ALL_AZ_SORT = {\n sort: [\n {\n _script: {\n type: 'number',\n script: {\n lang: 'painless',\n source:\n \"int charPos = params.letters.indexOf(doc['name.keyword'].value.substring(0,1).toUpperCase()); charPos > -1 ? charPos : 100\",\n params: {\n letters: AZ\n }\n },\n order: 'asc'\n }\n },\n { 'name.keyword': 'asc' }\n ]\n};\n\nconst SCROLL_OFFSET = process.env.BLAZE_SCROLL_OFFSET || 50;\n\nconst BANNER_LOADING = 'loading';\nconst BANNER_EMPTY = 'empty';\nconst BANNER_LOADED = 'loaded';\nconst ANCHOR_TAG = 'a';\nconst TARGET_BLANK = '_blank';\n\nconst DATA_SUMMARY_EMAIL_REGEX = /^([a-z0-9_\\.\\+-]+)@([\\da-z\\.-]+)\\.([a-z\\.]{2,6})$/;\nconst DATA_SUMMARY_URL_REGEX = /(https?:\\/\\/)?(www\\.)?[-a-zA-Z0-9@:%._\\+~#=]{2,256}\\.[a-z]{2,6}\\b([-a-zA-Z0-9@:%_\\+.~#?&//=]*)/;\nconst DATA_SUMMARY_TEL_REGEX = /^\\+{0,1}[0-9\\(\\)\\.\\- \\/]{7,}$/; // note: very loose phone number match not for validation\n\nexport {\n BANNER_LOADING,\n BANNER_EMPTY,\n BANNER_LOADED,\n BLANK_SPACE_UNICODE_STRING,\n BOLD_TAG,\n BUTTON,\n BUTTON_ICON,\n ICON_BUTTON,\n AND,\n AND_OPERATOR,\n OR_OPERATOR,\n TEXT_SEARCH,\n SEARCH_PUBLISHED_CONTENT,\n SEARCH,\n SEARCH_TERM,\n RANGE,\n CHECKBOX,\n SELECT,\n KEYWORD,\n OR,\n DEFAULT_LIMIT,\n DEFAULT_OFFSET,\n FEATURED,\n SPONSORED,\n STRING,\n DATE,\n FULL,\n CHILD_PROPS_TO_USE,\n CATEGORY_ID,\n PUBLISHED,\n ID,\n LINK,\n CLASS_MODIFIERS,\n END_ADUNIT,\n COUNT_CONTENT_HIERARCHIES,\n GET_BANNER,\n BANNER_QUERY_PROPS,\n CAROUSEL,\n IMAGE,\n IMAGES,\n IMAGE_WRAPPER,\n IN_VIEW_CONFIG,\n GET_FILE_FALLBACK,\n HERO,\n HERO_WRAPPER,\n WITH_BANNER,\n ALL,\n COLUMN,\n ROW,\n GTM,\n GTM_DATA_ID_ATTR,\n PROPS_TO_CHECK,\n CENTER,\n HALF,\n WIDE,\n DESK,\n TABLET,\n MOBILE,\n ALIGNMENT,\n OBJECT,\n ON_CLICK,\n WAYPOINT_BOTTOM_OFFSET,\n JW_PLAYER_TYPE_FILE,\n CODE,\n VIDEO_WRAPPER_CLASS_NAME,\n PAGINATION_QUERY_CONST,\n PB_QUERY_CONST,\n INFINITE,\n NEXT_STRING,\n PREVIOUS_STRING,\n PAGINATION_DISPLAY_LIMIT,\n PAGINATION_DIFFERENCE,\n LOAD_MORE_STRING,\n LOAD_MORE,\n CLASSIC,\n BREAKPOINT_SIZES,\n EMAIL,\n PASSWORD,\n LOGOUT,\n MIN_BANNER_HEIGHT,\n MAX_BANNER_HEIGHT,\n GRAPH_QL_ERROR,\n HOVER,\n MOUSE_ENTER,\n MOUSE_LEAVE,\n CLICK,\n SHOW,\n HIDE,\n VISIBLE,\n INVISIBLE,\n MOBILE_WIDTH,\n HIDDEN,\n MENU_ITEM,\n LOGIN_FORM,\n PASSWORD_REGEX,\n PASSWORD_VALIDATION_MESSAGE,\n PASSWORD_CONFIRM_MESSAGE,\n ELEMENT,\n ALLOWED_BLOCK_TYPES,\n PREHEADER_PROP,\n HEADLINE_PROP,\n AZ_QUERY_CONST,\n AZ_AGGS,\n ALL_AZ_SORT,\n AZ,\n SCROLL_OFFSET,\n ANCHOR_TAG,\n TARGET_BLANK,\n DATA_SUMMARY_EMAIL_REGEX,\n DATA_SUMMARY_URL_REGEX,\n DATA_SUMMARY_TEL_REGEX\n};\n"],"file":"index.js"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
2
|
-
const _excluded = ["id", "image", "name", "url", "entity", "entityProps", "alternativePreHeader", "alternativeHeadline", "category", "modifier", "propsToDisplay", "propsToDisplayModifiers", "gtmId", "style", "priority", "cardChildren", "gtmChildren", "displayCategory", "displayThumbnail", "displayTitle", "enableOverlay", "overlayModifier", "gridModifier"];
|
|
2
|
+
const _excluded = ["id", "image", "name", "url", "entity", "entityProps", "alternativePreHeader", "alternativeHeadline", "category", "modifier", "propsToDisplay", "propsToDisplayModifiers", "gtmId", "style", "priority", "cardChildren", "gtmChildren", "displayCategory", "displayThumbnail", "displayTitle", "enableOverlay", "titleOverlayModifier", "overlayModifier", "gridModifier"];
|
|
3
3
|
import React, { Fragment } from 'react';
|
|
4
4
|
import PropTypes from 'prop-types';
|
|
5
5
|
import BlazeLink from '../BlazeLink';
|
|
@@ -32,6 +32,7 @@ const Card = _ref => {
|
|
|
32
32
|
displayThumbnail,
|
|
33
33
|
displayTitle,
|
|
34
34
|
enableOverlay,
|
|
35
|
+
titleOverlayModifier,
|
|
35
36
|
overlayModifier,
|
|
36
37
|
gridModifier
|
|
37
38
|
} = _ref,
|
|
@@ -77,6 +78,7 @@ const Card = _ref => {
|
|
|
77
78
|
const Wrapper = shouldUseClickWrapper ? ClickWrapper : Fragment;
|
|
78
79
|
const classNameWithModifiers = getModifiers(CARD_STRING, modifiers);
|
|
79
80
|
const contentWrapperModifier = `${getModifiers('card__content-wrapper', modifiers)} ${enableOverlay ? overlayModifier : ''}`;
|
|
81
|
+
const titleWrapperModifier = `${getModifiers('card__title', modifiers)} ${titleOverlayModifier}`;
|
|
80
82
|
return /*#__PURE__*/React.createElement(Wrapper, wrapperProps, /*#__PURE__*/React.createElement("div", {
|
|
81
83
|
className: classNameWithModifiers
|
|
82
84
|
}, shouldDisplayThumbnail && /*#__PURE__*/React.createElement("div", {
|
|
@@ -103,7 +105,7 @@ const Card = _ref => {
|
|
|
103
105
|
}, preHeader.name) : /*#__PURE__*/React.createElement("div", {
|
|
104
106
|
className: "badge badge--label"
|
|
105
107
|
}, label)), displayTitle && /*#__PURE__*/React.createElement("h2", {
|
|
106
|
-
className:
|
|
108
|
+
className: titleWrapperModifier
|
|
107
109
|
}, /*#__PURE__*/React.createElement(BlazeLink, {
|
|
108
110
|
title: linkTitle,
|
|
109
111
|
gtmId: gtmId,
|
|
@@ -152,8 +154,9 @@ Card.propTypes = {
|
|
|
152
154
|
displayCategory: PropTypes.bool.isRequired,
|
|
153
155
|
displayThumbnail: PropTypes.bool.isRequired,
|
|
154
156
|
displayTitle: PropTypes.bool.isRequired,
|
|
155
|
-
enableOverlay: PropTypes.bool
|
|
157
|
+
enableOverlay: PropTypes.bool,
|
|
156
158
|
overlayModifier: PropTypes.string,
|
|
159
|
+
titleOverlayModifier: PropTypes.string,
|
|
157
160
|
cardChildren: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]),
|
|
158
161
|
gtmChildren: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]),
|
|
159
162
|
gridModifier: PropTypes.string,
|
|
@@ -178,7 +181,9 @@ Card.defaultProps = {
|
|
|
178
181
|
gtmChildren: [],
|
|
179
182
|
gridModifier: '',
|
|
180
183
|
priority: false,
|
|
181
|
-
overlayModifier: ''
|
|
184
|
+
overlayModifier: 'card__content--overlay',
|
|
185
|
+
titleOverlayModifier: 'card__content--overlay__title',
|
|
186
|
+
enableOverlay: true
|
|
182
187
|
};
|
|
183
188
|
|
|
184
189
|
const getCategoryDefinedProps = ({
|