@rededor/site-front-end-lib 4.0.0-alpha.5 → 17.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -9
- package/esm2022/lib/components/algolia-dropdown/algolia-dropdown.component.mjs +126 -0
- package/esm2022/lib/components/avatar/avatar.component.mjs +66 -0
- package/esm2022/lib/components/banner/content-banner/content-banner.component.mjs +41 -0
- package/esm2022/lib/components/breadcrumbs/breadcrumbs.component.mjs +133 -0
- package/esm2022/lib/components/cards/card-unidade-planos-convenios/card-unidade-planos-convenios.component.mjs +65 -0
- package/esm2022/lib/components/cards/expandable-card/expandable-card.component.mjs +69 -0
- package/esm2022/lib/components/cards/testimonial-card/testimonial-card.component.mjs +63 -0
- package/esm2022/lib/components/carousels/testimonials-carousel/testimonials-carousel.component.mjs +64 -0
- package/esm2022/lib/components/cta-wrapper/cta-wrapper.component.mjs +84 -0
- package/esm2022/lib/components/dropdown-search/dropdown-search-category.component.mjs +24 -0
- package/esm2022/lib/components/dropdown-search/dropdown-search-not-found.component.mjs +24 -0
- package/esm2022/lib/components/dropdown-search/dropdown-search-option.component.mjs +65 -0
- package/esm2022/lib/components/dropdown-search/dropdown-search.component.mjs +292 -0
- package/esm2022/lib/components/error/error-service/error.service.mjs +17 -0
- package/esm2022/lib/components/error/error.component.mjs +183 -0
- package/esm2022/lib/components/filter-letter-and-terms/filter-letter-and-terms.component.mjs +103 -0
- package/esm2022/lib/components/filters/filter-generic/filter-generic.component.mjs +235 -0
- package/esm2022/lib/components/filters/filter-planos-convenios/filter-planos-convenios.component.mjs +150 -0
- package/esm2022/lib/components/footer/footer.component.mjs +125 -0
- package/esm2022/lib/components/footer/helpers/footerTheme.func.mjs +70 -0
- package/esm2022/lib/components/footer/models/FooterTheme.model.mjs +2 -0
- package/esm2022/lib/components/header/components/header-action-menu/header-action-menu.component.mjs +36 -0
- package/esm2022/lib/components/header/components/header-aux-menu/header-aux-menu.component.mjs +12 -0
- package/esm2022/lib/components/header/components/header-aux-menu-container/header-aux-menu-container.component.mjs +17 -0
- package/esm2022/lib/components/header/components/header-aux-menu-item/header-aux-menu-item.component.mjs +51 -0
- package/esm2022/lib/components/header/components/header-aux-menu-item-dropdown/header-aux-menu-item-dropdown.component.mjs +23 -0
- package/esm2022/lib/components/header/components/header-logo/header-logo.component.mjs +32 -0
- package/esm2022/lib/components/header/components/header-main-menu/header-main-menu.component.mjs +11 -0
- package/esm2022/lib/components/header/components/header-main-menu-item/header-main-menu-item.component.mjs +77 -0
- package/esm2022/lib/components/header/components/header-main-menu-item-dropdown/header-main-menu-item-dropdown.component.mjs +99 -0
- package/esm2022/lib/components/header/components/header-side-menu/header-side-menu.component.mjs +26 -0
- package/esm2022/lib/components/header/components/header-side-menu-item/header-side-menu-item.component.mjs +54 -0
- package/esm2022/lib/components/header/header.component.mjs +104 -0
- package/esm2022/lib/components/header/helpers/headerTheme.func.mjs +136 -0
- package/esm2022/lib/components/header/models/HeaderTheme.model.mjs +2 -0
- package/esm2022/lib/components/header/services/header.service.mjs +43 -0
- package/esm2022/lib/components/image/image.component.mjs +61 -0
- package/esm2022/lib/components/index.mjs +52 -0
- package/esm2022/lib/components/input-file/input-file.component.mjs +304 -0
- package/esm2022/lib/components/load-screen/load-screen.component.mjs +23 -0
- package/esm2022/lib/components/overlay/overlay.component.mjs +19 -0
- package/esm2022/lib/components/page-header/page-header.component.mjs +47 -0
- package/esm2022/lib/components/page-template-fullcontent/page-template-fullcontent.component.mjs +30 -0
- package/esm2022/lib/components/page-template-sidebar/page-template-sidebar.component.mjs +39 -0
- package/esm2022/lib/components/pagination/pagination.component.mjs +64 -0
- package/esm2022/lib/components/post-header/post-header.component.mjs +56 -0
- package/esm2022/lib/components/search/search.component.mjs +147 -0
- package/esm2022/lib/components/section-navigation/section-navigation.component.mjs +149 -0
- package/esm2022/lib/components/side-ctas/components/side-ctas-bottom/side-ctas-bottom.component.mjs +43 -0
- package/esm2022/lib/components/side-ctas/components/side-ctas-right-bottom/side-ctas-right-bottom.component.mjs +43 -0
- package/esm2022/lib/components/side-ctas/components/side-ctas-right-middle/side-ctas-right-middle.component.mjs +42 -0
- package/esm2022/lib/components/side-ctas/components/side-ctas-right-top/side-ctas-right-top.component.mjs +11 -0
- package/esm2022/lib/components/side-ctas/models/SideCta.model.mjs +2 -0
- package/esm2022/lib/components/side-ctas/side-ctas.component.mjs +23 -0
- package/esm2022/lib/components/sidebar-navigation/sidebar-navigation.component.mjs +119 -0
- package/esm2022/lib/components/sticky-navigation/sticky-navigation.component.mjs +132 -0
- package/esm2022/lib/components/whatsapp/whatsapp.component.mjs +60 -0
- package/esm2022/lib/directives/index.mjs +4 -0
- package/esm2022/lib/directives/rdsite-click-outside/rdsite-click-outside.directive.mjs +29 -0
- package/esm2022/lib/directives/rdsite-link/rdsite-link.directive.mjs +197 -0
- package/esm2022/lib/directives/rdsite-phone-modal/rdsite-phone-modal.directive.mjs +52 -0
- package/esm2022/lib/enums/EnumDoencaTaxonomy.enum.mjs +11 -0
- package/esm2022/lib/enums/EnumError.enum.mjs +6 -0
- package/esm2022/lib/enums/EnumThemes.enum.mjs +9 -0
- package/esm2022/lib/enums/Estados.enum.mjs +31 -0
- package/esm2022/lib/enums/Filter.enum.mjs +9 -0
- package/esm2022/lib/enums/IconCuraDefaultType.enum.mjs +121 -0
- package/esm2022/lib/enums/ImageMimeType.enum.mjs +7 -0
- package/esm2022/lib/enums/RdsiteModalComponentStyle.enum.mjs +16 -0
- package/esm2022/lib/enums/RdsiteModalDrawerComponentStyle.enum.mjs +9 -0
- package/esm2022/lib/enums/UnidadeCoverageType.enum.mjs +7 -0
- package/esm2022/lib/enums/index.mjs +11 -0
- package/esm2022/lib/helpers/check-safari-agent.func.mjs +7 -0
- package/esm2022/lib/helpers/formatPhone.func.mjs +29 -0
- package/esm2022/lib/helpers/getCircularReplacer.func.mjs +38 -0
- package/esm2022/lib/helpers/getSiteUrl.func.mjs +11 -0
- package/esm2022/lib/helpers/index.mjs +9 -0
- package/esm2022/lib/helpers/mediaQueries.mjs +11 -0
- package/esm2022/lib/helpers/removeDuplicateObjectsFromArray.func.mjs +5 -0
- package/esm2022/lib/helpers/removeDuplicateValuesFromArray.func.mjs +5 -0
- package/esm2022/lib/helpers/removeHtmlTags.func.mjs +6 -0
- package/esm2022/lib/helpers/toQueryParams.func.mjs +8 -0
- package/esm2022/lib/interceptors/error.interceptor.mjs +36 -0
- package/esm2022/lib/interceptors/index.mjs +3 -0
- package/esm2022/lib/interceptors/log.interceptor.mjs +35 -0
- package/esm2022/lib/middlewares/index.mjs +5 -0
- package/esm2022/lib/middlewares/ssr-initialization.middleware.mjs +8 -0
- package/esm2022/lib/middlewares/url-validation-default-logo.mjs +38 -0
- package/esm2022/lib/middlewares/url-validation-error-page.mjs +209 -0
- package/esm2022/lib/middlewares/url-validation.middleware.mjs +41 -0
- package/esm2022/lib/models/algolia-search-api.model.mjs +2 -0
- package/esm2022/lib/models/breadcrumbs/breadcrumbs-items.model.mjs +2 -0
- package/esm2022/lib/models/breadcrumbs/breadcrumbs-json-item.model.mjs +2 -0
- package/esm2022/lib/models/centro-estudos-backend.model.mjs +2 -0
- package/esm2022/lib/models/centro-medico.model.mjs +2 -0
- package/esm2022/lib/models/content-banner.model.mjs +2 -0
- package/esm2022/lib/models/cta-wrapper.model.mjs +2 -0
- package/esm2022/lib/models/doenca-backend.model.mjs +2 -0
- package/esm2022/lib/models/doenca-taxonomy.model.mjs +2 -0
- package/esm2022/lib/models/especialidade-backend.model.mjs +2 -0
- package/esm2022/lib/models/exame-backend.model.mjs +2 -0
- package/esm2022/lib/models/filters/filter-planos-convenios.model.mjs +2 -0
- package/esm2022/lib/models/filters/filter-section.type.mjs +2 -0
- package/esm2022/lib/models/filters/filter-sections.model.mjs +2 -0
- package/esm2022/lib/models/images/rdsite-image.model.mjs +2 -0
- package/esm2022/lib/models/medico-cv.model.mjs +2 -0
- package/esm2022/lib/models/medico.model.mjs +2 -0
- package/esm2022/lib/models/menu-de-unidade.model.mjs +2 -0
- package/esm2022/lib/models/menu-item.model.mjs +2 -0
- package/esm2022/lib/models/privacy-tools/privacy-tools.model.mjs +2 -0
- package/esm2022/lib/models/rdsl-cobertura.model.mjs +2 -0
- package/esm2022/lib/models/rdsl-convenio.model.mjs +2 -0
- package/esm2022/lib/models/rdsl-especialidade.model.mjs +2 -0
- package/esm2022/lib/models/rdsl-planos.model.mjs +2 -0
- package/esm2022/lib/models/rdsl-post-category.model.mjs +2 -0
- package/esm2022/lib/models/rdsl-unidade.model.mjs +2 -0
- package/esm2022/lib/models/section-navigation.model.mjs +2 -0
- package/esm2022/lib/models/seo/seo-data.model.mjs +2 -0
- package/esm2022/lib/models/seo/seo-unidade.model.mjs +2 -0
- package/esm2022/lib/models/social-meta-properties.model.mjs +2 -0
- package/esm2022/lib/models/wordpress/WpResponse.model.mjs +2 -0
- package/esm2022/lib/models/wordpress/category/wpCategory.model.mjs +2 -0
- package/esm2022/lib/models/wordpress/general/content.model.mjs +2 -0
- package/esm2022/lib/models/wordpress/general/excerpt.model.mjs +2 -0
- package/esm2022/lib/models/wordpress/general/featuredMedia.model.mjs +2 -0
- package/esm2022/lib/models/wordpress/general/guid.model.mjs +2 -0
- package/esm2022/lib/models/wordpress/general/index.mjs +11 -0
- package/esm2022/lib/models/wordpress/general/links.model.mjs +2 -0
- package/esm2022/lib/models/wordpress/general/meta.model.mjs +2 -0
- package/esm2022/lib/models/wordpress/general/title.model.mjs +2 -0
- package/esm2022/lib/models/wordpress/general/yoastData.model.mjs +2 -0
- package/esm2022/lib/models/wordpress/general/yoastHeadJson.model.mjs +2 -0
- package/esm2022/lib/models/wordpress/general/yoastMeta.model.mjs +2 -0
- package/esm2022/lib/models/wordpress/page/page.model.mjs +2 -0
- package/esm2022/lib/models/wordpress/post/post.model.mjs +2 -0
- package/esm2022/lib/models/wordpress/unidade/wp-unidade-onco.model.mjs +2 -0
- package/esm2022/lib/models/wordpress/unidade/wp-unidade-site-detalhe.model.mjs +2 -0
- package/esm2022/lib/models/wordpress/unidade/wp-unidade-site.model.mjs +2 -0
- package/esm2022/lib/pipes/index.mjs +2 -0
- package/esm2022/lib/pipes/phone/phone.pipe.mjs +18 -0
- package/esm2022/lib/services/algolia/algolia.service.mjs +37 -0
- package/esm2022/lib/services/algolia-search-api/algolia-search-api.service.mjs +71 -0
- package/esm2022/lib/services/geoloc/geoloc.service.mjs +202 -0
- package/esm2022/lib/services/http-client/http-client.service.mjs +55 -0
- package/esm2022/lib/services/index.mjs +19 -0
- package/esm2022/lib/services/log/log.service.mjs +46 -0
- package/esm2022/lib/services/mapbox/mapbox.service.mjs +69 -0
- package/esm2022/lib/services/modal/modal.service.mjs +56 -0
- package/esm2022/lib/services/modal-drawer/modal-drawer.service.mjs +42 -0
- package/esm2022/lib/services/ngu-carousel/ngu-carousel.service.mjs +81 -0
- package/esm2022/lib/services/phone/phone.service.mjs +28 -0
- package/esm2022/lib/services/privacy-tools/privacy-tools.service.mjs +92 -0
- package/esm2022/lib/services/seo/seo.service.mjs +489 -0
- package/esm2022/lib/services/server-response/server-response.service.mjs +92 -0
- package/esm2022/lib/services/site-back-end/site-back-end.service.mjs +197 -0
- package/esm2022/lib/services/ssr-loading/ssr-loading.service.mjs +48 -0
- package/esm2022/lib/services/transfer-state/transfer-state.service.mjs +33 -0
- package/esm2022/lib/services/youtube/youtube.service.mjs +39 -0
- package/esm2022/lib/tokens/LibConfig.mjs +4 -0
- package/esm2022/lib/tokens/express.tokens.mjs +4 -0
- package/esm2022/public-api.mjs +23 -0
- package/esm2022/rededor-site-front-end-lib.mjs +5 -0
- package/fesm2022/rededor-site-front-end-lib.mjs +6408 -2
- package/fesm2022/rededor-site-front-end-lib.mjs.map +1 -1
- package/index.d.ts +5 -3
- package/lib/components/algolia-dropdown/algolia-dropdown.component.d.ts +38 -0
- package/lib/components/avatar/avatar.component.d.ts +26 -0
- package/lib/components/banner/content-banner/content-banner.component.d.ts +20 -0
- package/lib/components/breadcrumbs/breadcrumbs.component.d.ts +36 -0
- package/lib/components/cards/card-unidade-planos-convenios/card-unidade-planos-convenios.component.d.ts +41 -0
- package/lib/components/cards/expandable-card/expandable-card.component.d.ts +29 -0
- package/lib/components/cards/testimonial-card/testimonial-card.component.d.ts +31 -0
- package/lib/components/carousels/testimonials-carousel/testimonials-carousel.component.d.ts +28 -0
- package/lib/components/cta-wrapper/cta-wrapper.component.d.ts +33 -0
- package/lib/components/dropdown-search/dropdown-search-category.component.d.ts +9 -0
- package/lib/components/dropdown-search/dropdown-search-not-found.component.d.ts +9 -0
- package/lib/components/dropdown-search/dropdown-search-option.component.d.ts +26 -0
- package/lib/components/dropdown-search/dropdown-search.component.d.ts +71 -0
- package/lib/components/error/error-service/error.service.d.ts +8 -0
- package/lib/components/error/error.component.d.ts +48 -0
- package/lib/components/filter-letter-and-terms/filter-letter-and-terms.component.d.ts +36 -0
- package/lib/components/filters/filter-generic/filter-generic.component.d.ts +77 -0
- package/lib/components/filters/filter-planos-convenios/filter-planos-convenios.component.d.ts +45 -0
- package/lib/components/footer/footer.component.d.ts +49 -0
- package/lib/components/footer/helpers/footerTheme.func.d.ts +3 -0
- package/lib/components/footer/models/FooterTheme.model.d.ts +7 -0
- package/lib/components/header/components/header-action-menu/header-action-menu.component.d.ts +16 -0
- package/lib/components/header/components/header-aux-menu/header-aux-menu.component.d.ts +5 -0
- package/lib/components/header/components/header-aux-menu-container/header-aux-menu-container.component.d.ts +6 -0
- package/lib/components/header/components/header-aux-menu-item/header-aux-menu-item.component.d.ts +21 -0
- package/lib/components/header/components/header-aux-menu-item-dropdown/header-aux-menu-item-dropdown.component.d.ts +10 -0
- package/lib/components/header/components/header-logo/header-logo.component.d.ts +12 -0
- package/lib/components/header/components/header-main-menu/header-main-menu.component.d.ts +5 -0
- package/lib/components/header/components/header-main-menu-item/header-main-menu-item.component.d.ts +29 -0
- package/lib/components/header/components/header-main-menu-item-dropdown/header-main-menu-item-dropdown.component.d.ts +41 -0
- package/lib/components/header/components/header-side-menu/header-side-menu.component.d.ts +11 -0
- package/lib/components/header/components/header-side-menu-item/header-side-menu-item.component.d.ts +22 -0
- package/lib/components/header/header.component.d.ts +36 -0
- package/lib/components/header/helpers/headerTheme.func.d.ts +3 -0
- package/lib/components/header/models/HeaderTheme.model.d.ts +8 -0
- package/lib/components/header/services/header.service.d.ts +11 -0
- package/lib/components/image/image.component.d.ts +22 -0
- package/lib/components/index.d.ts +50 -0
- package/lib/components/input-file/input-file.component.d.ts +88 -0
- package/{components/load-screen/index.d.ts → lib/components/load-screen/load-screen.component.d.ts} +5 -6
- package/{components/overlay/index.d.ts → lib/components/overlay/overlay.component.d.ts} +4 -6
- package/lib/components/page-header/page-header.component.d.ts +20 -0
- package/lib/components/page-template-fullcontent/page-template-fullcontent.component.d.ts +14 -0
- package/lib/components/page-template-sidebar/page-template-sidebar.component.d.ts +17 -0
- package/lib/components/pagination/pagination.component.d.ts +30 -0
- package/lib/components/post-header/post-header.component.d.ts +31 -0
- package/lib/components/search/search.component.d.ts +48 -0
- package/lib/components/section-navigation/section-navigation.component.d.ts +44 -0
- package/lib/components/side-ctas/components/side-ctas-bottom/side-ctas-bottom.component.d.ts +23 -0
- package/lib/components/side-ctas/components/side-ctas-right-bottom/side-ctas-right-bottom.component.d.ts +15 -0
- package/lib/components/side-ctas/components/side-ctas-right-middle/side-ctas-right-middle.component.d.ts +22 -0
- package/lib/components/side-ctas/components/side-ctas-right-top/side-ctas-right-top.component.d.ts +5 -0
- package/lib/components/side-ctas/models/SideCta.model.d.ts +5 -0
- package/lib/components/side-ctas/side-ctas.component.d.ts +11 -0
- package/lib/components/sidebar-navigation/sidebar-navigation.component.d.ts +39 -0
- package/lib/components/sticky-navigation/sticky-navigation.component.d.ts +43 -0
- package/lib/components/whatsapp/whatsapp.component.d.ts +29 -0
- package/lib/directives/index.d.ts +3 -0
- package/lib/directives/rdsite-click-outside/rdsite-click-outside.directive.d.ts +10 -0
- package/lib/directives/rdsite-link/rdsite-link.directive.d.ts +40 -0
- package/lib/directives/rdsite-phone-modal/rdsite-phone-modal.directive.d.ts +17 -0
- package/lib/enums/EnumDoencaTaxonomy.enum.d.ts +8 -0
- package/lib/enums/EnumError.enum.d.ts +4 -0
- package/lib/enums/EnumThemes.enum.d.ts +7 -0
- package/lib/enums/Estados.enum.d.ts +29 -0
- package/lib/enums/Filter.enum.d.ts +7 -0
- package/{enums/index.d.ts → lib/enums/IconCuraDefaultType.enum.d.ts} +1 -58
- package/lib/enums/ImageMimeType.enum.d.ts +5 -0
- package/lib/enums/RdsiteModalComponentStyle.enum.d.ts +14 -0
- package/lib/enums/RdsiteModalDrawerComponentStyle.enum.d.ts +7 -0
- package/lib/enums/UnidadeCoverageType.enum.d.ts +5 -0
- package/lib/enums/index.d.ts +10 -0
- package/lib/helpers/check-safari-agent.func.d.ts +2 -0
- package/lib/helpers/formatPhone.func.d.ts +1 -0
- package/lib/helpers/getCircularReplacer.func.d.ts +7 -0
- package/lib/helpers/getSiteUrl.func.d.ts +2 -0
- package/lib/helpers/index.d.ts +8 -0
- package/lib/helpers/mediaQueries.d.ts +6 -0
- package/lib/helpers/removeDuplicateObjectsFromArray.func.d.ts +2 -0
- package/lib/helpers/removeDuplicateValuesFromArray.func.d.ts +2 -0
- package/lib/helpers/removeHtmlTags.func.d.ts +2 -0
- package/lib/helpers/toQueryParams.func.d.ts +5 -0
- package/lib/interceptors/error.interceptor.d.ts +13 -0
- package/lib/interceptors/index.d.ts +2 -0
- package/lib/interceptors/log.interceptor.d.ts +11 -0
- package/lib/middlewares/index.d.ts +4 -0
- package/lib/middlewares/ssr-initialization.middleware.d.ts +2 -0
- package/lib/middlewares/url-validation-default-logo.d.ts +1 -0
- package/lib/middlewares/url-validation-error-page.d.ts +22 -0
- package/lib/middlewares/url-validation.middleware.d.ts +13 -0
- package/lib/models/algolia-search-api.model.d.ts +179 -0
- package/lib/models/breadcrumbs/breadcrumbs-items.model.d.ts +10 -0
- package/lib/models/breadcrumbs/breadcrumbs-json-item.model.d.ts +8 -0
- package/lib/models/centro-estudos-backend.model.d.ts +8 -0
- package/lib/models/centro-medico.model.d.ts +33 -0
- package/lib/models/content-banner.model.d.ts +15 -0
- package/lib/models/cta-wrapper.model.d.ts +9 -0
- package/lib/models/doenca-backend.model.d.ts +25 -0
- package/lib/models/doenca-taxonomy.model.d.ts +11 -0
- package/lib/models/especialidade-backend.model.d.ts +24 -0
- package/lib/models/exame-backend.model.d.ts +25 -0
- package/lib/models/filters/filter-planos-convenios.model.d.ts +28 -0
- package/lib/models/filters/filter-section.type.d.ts +13 -0
- package/lib/models/filters/filter-sections.model.d.ts +52 -0
- package/lib/models/images/rdsite-image.model.d.ts +5 -0
- package/lib/models/medico-cv.model.d.ts +10 -0
- package/lib/models/medico.model.d.ts +68 -0
- package/lib/models/menu-de-unidade.model.d.ts +14 -0
- package/lib/models/menu-item.model.d.ts +67 -0
- package/lib/models/privacy-tools/privacy-tools.model.d.ts +8 -0
- package/lib/models/rdsl-cobertura.model.d.ts +71 -0
- package/lib/models/rdsl-convenio.model.d.ts +17 -0
- package/lib/models/rdsl-especialidade.model.d.ts +33 -0
- package/lib/models/rdsl-planos.model.d.ts +13 -0
- package/lib/models/rdsl-post-category.model.d.ts +8 -0
- package/lib/models/rdsl-unidade.model.d.ts +50 -0
- package/lib/models/section-navigation.model.d.ts +9 -0
- package/lib/models/seo/seo-data.model.d.ts +11 -0
- package/lib/models/seo/seo-unidade.model.d.ts +6 -0
- package/lib/models/social-meta-properties.model.d.ts +9 -0
- package/lib/models/wordpress/WpResponse.model.d.ts +31 -0
- package/lib/models/wordpress/category/wpCategory.model.d.ts +14 -0
- package/lib/models/wordpress/general/content.model.d.ts +4 -0
- package/lib/models/wordpress/general/excerpt.model.d.ts +4 -0
- package/lib/models/wordpress/general/featuredMedia.model.d.ts +26 -0
- package/lib/models/wordpress/general/guid.model.d.ts +3 -0
- package/lib/models/wordpress/general/index.d.ts +10 -0
- package/lib/models/wordpress/general/links.model.d.ts +47 -0
- package/lib/models/wordpress/general/meta.model.d.ts +3 -0
- package/lib/models/wordpress/general/title.model.d.ts +3 -0
- package/lib/models/wordpress/general/yoastData.model.d.ts +4 -0
- package/lib/models/wordpress/general/yoastHeadJson.model.d.ts +56 -0
- package/lib/models/wordpress/general/yoastMeta.model.d.ts +5 -0
- package/lib/models/wordpress/page/page.model.d.ts +10 -0
- package/lib/models/wordpress/post/post.model.d.ts +33 -0
- package/lib/models/wordpress/unidade/wp-unidade-onco.model.d.ts +56 -0
- package/lib/models/wordpress/unidade/wp-unidade-site-detalhe.model.d.ts +166 -0
- package/lib/models/wordpress/unidade/wp-unidade-site.model.d.ts +45 -0
- package/lib/pipes/index.d.ts +1 -0
- package/lib/pipes/phone/phone.pipe.d.ts +7 -0
- package/{services/algolia/index.d.ts → lib/services/algolia/algolia.service.d.ts} +4 -6
- package/{services/algolia-search-api/index.d.ts → lib/services/algolia-search-api/algolia-search-api.service.d.ts} +7 -6
- package/lib/services/geoloc/geoloc.service.d.ts +49 -0
- package/lib/services/http-client/http-client.service.d.ts +19 -0
- package/lib/services/index.d.ts +18 -0
- package/lib/services/log/log.service.d.ts +16 -0
- package/lib/services/mapbox/mapbox.service.d.ts +55 -0
- package/lib/services/modal/modal.service.d.ts +31 -0
- package/lib/services/modal-drawer/modal-drawer.service.d.ts +37 -0
- package/{services/ngu-carousel/index.d.ts → lib/services/ngu-carousel/ngu-carousel.service.d.ts} +3 -6
- package/lib/services/phone/phone.service.d.ts +11 -0
- package/lib/services/privacy-tools/privacy-tools.service.d.ts +20 -0
- package/lib/services/seo/seo.service.d.ts +142 -0
- package/lib/services/server-response/server-response.service.d.ts +39 -0
- package/lib/services/site-back-end/site-back-end.service.d.ts +87 -0
- package/{services/ssr-loading/index.d.ts → lib/services/ssr-loading/ssr-loading.service.d.ts} +4 -5
- package/lib/services/transfer-state/transfer-state.service.d.ts +12 -0
- package/{services/youtube/index.d.ts → lib/services/youtube/youtube.service.d.ts} +3 -5
- package/lib/tokens/LibConfig.d.ts +38 -0
- package/lib/tokens/express.tokens.d.ts +4 -0
- package/package.json +13 -283
- package/public-api.d.ts +10 -0
- package/components/algolia-dropdown/index.d.ts +0 -38
- package/components/algolia-search/index.d.ts +0 -292
- package/components/banner/index.d.ts +0 -20
- package/components/breadcrumbs/index.d.ts +0 -41
- package/components/cards/index.d.ts +0 -96
- package/components/carousels/index.d.ts +0 -28
- package/components/cta-wrapper/index.d.ts +0 -31
- package/components/error/index.d.ts +0 -46
- package/components/filter-letter-and-terms/index.d.ts +0 -36
- package/components/filters/filter-generic/index.d.ts +0 -68
- package/components/filters/filter-planos-convenios/index.d.ts +0 -41
- package/components/footer/index.d.ts +0 -38
- package/components/header/components/action/index.d.ts +0 -17
- package/components/header/components/auxiliar/index.d.ts +0 -29
- package/components/header/components/main/index.d.ts +0 -70
- package/components/header/components/side/index.d.ts +0 -33
- package/components/header/index.d.ts +0 -60
- package/components/header/services/index.d.ts +0 -14
- package/components/image/index.d.ts +0 -23
- package/components/modal/index.d.ts +0 -29
- package/components/modal-drawer/index.d.ts +0 -49
- package/components/page-header/index.d.ts +0 -20
- package/components/page-template-sidebar/index.d.ts +0 -20
- package/components/pagination/index.d.ts +0 -30
- package/components/search/index.d.ts +0 -45
- package/components/section-navigation/index.d.ts +0 -41
- package/components/side-ctas/index.d.ts +0 -70
- package/components/whatsapp/index.d.ts +0 -27
- package/core/index.d.ts +0 -1984
- package/cura/accordion/index.d.ts +0 -120
- package/cura/api/index.d.ts +0 -359
- package/cura/badges/cura-badge-counter/index.d.ts +0 -38
- package/cura/badges/cura-badge-distance/index.d.ts +0 -21
- package/cura/badges/cura-badge-dot/index.d.ts +0 -29
- package/cura/badges/cura-badge-pill/index.d.ts +0 -47
- package/cura/badges/index.d.ts +0 -5
- package/cura/buttons/cura-button/index.d.ts +0 -85
- package/cura/buttons/cura-button-outline/index.d.ts +0 -85
- package/cura/buttons/cura-button-select/index.d.ts +0 -34
- package/cura/buttons/cura-button-transparent/index.d.ts +0 -82
- package/cura/buttons/index.d.ts +0 -15
- package/cura/cards/cura-card/index.d.ts +0 -54
- package/cura/feedback/cura-alert/index.d.ts +0 -55
- package/cura/feedback/cura-modal/index.d.ts +0 -97
- package/cura/forms/cura-checkbox/index.d.ts +0 -152
- package/cura/forms/cura-input-text/index.d.ts +0 -234
- package/cura/forms/cura-label/index.d.ts +0 -51
- package/cura/forms/cura-radio/index.d.ts +0 -143
- package/cura/forms/cura-select/index.d.ts +0 -151
- package/cura/forms/cura-select-option/index.d.ts +0 -49
- package/cura/forms/cura-switch/index.d.ts +0 -113
- package/cura/forms/index.d.ts +0 -20
- package/cura/icons/cura-icon/index.d.ts +0 -46
- package/cura/loaders/cura-loader-bar/index.d.ts +0 -22
- package/cura/loaders/cura-loader-circle/index.d.ts +0 -24
- package/cura/texts/cura-display/index.d.ts +0 -54
- package/cura/texts/cura-heading/index.d.ts +0 -65
- package/cura/texts/cura-paragraph/index.d.ts +0 -54
- package/cura/texts/index.d.ts +0 -7
- package/fesm2022/rededor-site-front-end-lib-components-algolia-dropdown.mjs +0 -108
- package/fesm2022/rededor-site-front-end-lib-components-algolia-dropdown.mjs.map +0 -1
- package/fesm2022/rededor-site-front-end-lib-components-algolia-search.mjs +0 -583
- package/fesm2022/rededor-site-front-end-lib-components-algolia-search.mjs.map +0 -1
- package/fesm2022/rededor-site-front-end-lib-components-banner.mjs +0 -44
- package/fesm2022/rededor-site-front-end-lib-components-banner.mjs.map +0 -1
- package/fesm2022/rededor-site-front-end-lib-components-breadcrumbs.mjs +0 -119
- package/fesm2022/rededor-site-front-end-lib-components-breadcrumbs.mjs.map +0 -1
- package/fesm2022/rededor-site-front-end-lib-components-cards.mjs +0 -152
- package/fesm2022/rededor-site-front-end-lib-components-cards.mjs.map +0 -1
- package/fesm2022/rededor-site-front-end-lib-components-carousels.mjs +0 -75
- package/fesm2022/rededor-site-front-end-lib-components-carousels.mjs.map +0 -1
- package/fesm2022/rededor-site-front-end-lib-components-cta-wrapper.mjs +0 -74
- package/fesm2022/rededor-site-front-end-lib-components-cta-wrapper.mjs.map +0 -1
- package/fesm2022/rededor-site-front-end-lib-components-error.mjs +0 -173
- package/fesm2022/rededor-site-front-end-lib-components-error.mjs.map +0 -1
- package/fesm2022/rededor-site-front-end-lib-components-filter-letter-and-terms.mjs +0 -91
- package/fesm2022/rededor-site-front-end-lib-components-filter-letter-and-terms.mjs.map +0 -1
- package/fesm2022/rededor-site-front-end-lib-components-filters-filter-generic.mjs +0 -243
- package/fesm2022/rededor-site-front-end-lib-components-filters-filter-generic.mjs.map +0 -1
- package/fesm2022/rededor-site-front-end-lib-components-filters-filter-planos-convenios.mjs +0 -139
- package/fesm2022/rededor-site-front-end-lib-components-filters-filter-planos-convenios.mjs.map +0 -1
- package/fesm2022/rededor-site-front-end-lib-components-footer.mjs +0 -150
- package/fesm2022/rededor-site-front-end-lib-components-footer.mjs.map +0 -1
- package/fesm2022/rededor-site-front-end-lib-components-header-components-action.mjs +0 -31
- package/fesm2022/rededor-site-front-end-lib-components-header-components-action.mjs.map +0 -1
- package/fesm2022/rededor-site-front-end-lib-components-header-components-auxiliar.mjs +0 -59
- package/fesm2022/rededor-site-front-end-lib-components-header-components-auxiliar.mjs.map +0 -1
- package/fesm2022/rededor-site-front-end-lib-components-header-components-main.mjs +0 -164
- package/fesm2022/rededor-site-front-end-lib-components-header-components-main.mjs.map +0 -1
- package/fesm2022/rededor-site-front-end-lib-components-header-components-side.mjs +0 -68
- package/fesm2022/rededor-site-front-end-lib-components-header-components-side.mjs.map +0 -1
- package/fesm2022/rededor-site-front-end-lib-components-header-services.mjs +0 -50
- package/fesm2022/rededor-site-front-end-lib-components-header-services.mjs.map +0 -1
- package/fesm2022/rededor-site-front-end-lib-components-header.mjs +0 -259
- package/fesm2022/rededor-site-front-end-lib-components-header.mjs.map +0 -1
- package/fesm2022/rededor-site-front-end-lib-components-image.mjs +0 -48
- package/fesm2022/rededor-site-front-end-lib-components-image.mjs.map +0 -1
- package/fesm2022/rededor-site-front-end-lib-components-load-screen.mjs +0 -30
- package/fesm2022/rededor-site-front-end-lib-components-load-screen.mjs.map +0 -1
- package/fesm2022/rededor-site-front-end-lib-components-modal-drawer.mjs +0 -162
- package/fesm2022/rededor-site-front-end-lib-components-modal-drawer.mjs.map +0 -1
- package/fesm2022/rededor-site-front-end-lib-components-modal.mjs +0 -82
- package/fesm2022/rededor-site-front-end-lib-components-modal.mjs.map +0 -1
- package/fesm2022/rededor-site-front-end-lib-components-overlay.mjs +0 -24
- package/fesm2022/rededor-site-front-end-lib-components-overlay.mjs.map +0 -1
- package/fesm2022/rededor-site-front-end-lib-components-page-header.mjs +0 -41
- package/fesm2022/rededor-site-front-end-lib-components-page-header.mjs.map +0 -1
- package/fesm2022/rededor-site-front-end-lib-components-page-template-sidebar.mjs +0 -30
- package/fesm2022/rededor-site-front-end-lib-components-page-template-sidebar.mjs.map +0 -1
- package/fesm2022/rededor-site-front-end-lib-components-pagination.mjs +0 -55
- package/fesm2022/rededor-site-front-end-lib-components-pagination.mjs.map +0 -1
- package/fesm2022/rededor-site-front-end-lib-components-search.mjs +0 -119
- package/fesm2022/rededor-site-front-end-lib-components-search.mjs.map +0 -1
- package/fesm2022/rededor-site-front-end-lib-components-section-navigation.mjs +0 -134
- package/fesm2022/rededor-site-front-end-lib-components-section-navigation.mjs.map +0 -1
- package/fesm2022/rededor-site-front-end-lib-components-side-ctas.mjs +0 -118
- package/fesm2022/rededor-site-front-end-lib-components-side-ctas.mjs.map +0 -1
- package/fesm2022/rededor-site-front-end-lib-components-whatsapp.mjs +0 -49
- package/fesm2022/rededor-site-front-end-lib-components-whatsapp.mjs.map +0 -1
- package/fesm2022/rededor-site-front-end-lib-core.mjs +0 -1600
- package/fesm2022/rededor-site-front-end-lib-core.mjs.map +0 -1
- package/fesm2022/rededor-site-front-end-lib-cura-accordion.mjs +0 -252
- package/fesm2022/rededor-site-front-end-lib-cura-accordion.mjs.map +0 -1
- package/fesm2022/rededor-site-front-end-lib-cura-api.mjs +0 -541
- package/fesm2022/rededor-site-front-end-lib-cura-api.mjs.map +0 -1
- package/fesm2022/rededor-site-front-end-lib-cura-badges-cura-badge-counter.mjs +0 -90
- package/fesm2022/rededor-site-front-end-lib-cura-badges-cura-badge-counter.mjs.map +0 -1
- package/fesm2022/rededor-site-front-end-lib-cura-badges-cura-badge-distance.mjs +0 -55
- package/fesm2022/rededor-site-front-end-lib-cura-badges-cura-badge-distance.mjs.map +0 -1
- package/fesm2022/rededor-site-front-end-lib-cura-badges-cura-badge-dot.mjs +0 -66
- package/fesm2022/rededor-site-front-end-lib-cura-badges-cura-badge-dot.mjs.map +0 -1
- package/fesm2022/rededor-site-front-end-lib-cura-badges-cura-badge-pill.mjs +0 -96
- package/fesm2022/rededor-site-front-end-lib-cura-badges-cura-badge-pill.mjs.map +0 -1
- package/fesm2022/rededor-site-front-end-lib-cura-badges.mjs +0 -4
- package/fesm2022/rededor-site-front-end-lib-cura-badges.mjs.map +0 -1
- package/fesm2022/rededor-site-front-end-lib-cura-buttons-cura-button-outline.mjs +0 -165
- package/fesm2022/rededor-site-front-end-lib-cura-buttons-cura-button-outline.mjs.map +0 -1
- package/fesm2022/rededor-site-front-end-lib-cura-buttons-cura-button-select.mjs +0 -130
- package/fesm2022/rededor-site-front-end-lib-cura-buttons-cura-button-select.mjs.map +0 -1
- package/fesm2022/rededor-site-front-end-lib-cura-buttons-cura-button-transparent.mjs +0 -156
- package/fesm2022/rededor-site-front-end-lib-cura-buttons-cura-button-transparent.mjs.map +0 -1
- package/fesm2022/rededor-site-front-end-lib-cura-buttons-cura-button.mjs +0 -165
- package/fesm2022/rededor-site-front-end-lib-cura-buttons-cura-button.mjs.map +0 -1
- package/fesm2022/rededor-site-front-end-lib-cura-buttons.mjs +0 -13
- package/fesm2022/rededor-site-front-end-lib-cura-buttons.mjs.map +0 -1
- package/fesm2022/rededor-site-front-end-lib-cura-cards-cura-card.mjs +0 -96
- package/fesm2022/rededor-site-front-end-lib-cura-cards-cura-card.mjs.map +0 -1
- package/fesm2022/rededor-site-front-end-lib-cura-feedback-cura-alert.mjs +0 -90
- package/fesm2022/rededor-site-front-end-lib-cura-feedback-cura-alert.mjs.map +0 -1
- package/fesm2022/rededor-site-front-end-lib-cura-feedback-cura-modal.mjs +0 -105
- package/fesm2022/rededor-site-front-end-lib-cura-feedback-cura-modal.mjs.map +0 -1
- package/fesm2022/rededor-site-front-end-lib-cura-forms-cura-checkbox.mjs +0 -253
- package/fesm2022/rededor-site-front-end-lib-cura-forms-cura-checkbox.mjs.map +0 -1
- package/fesm2022/rededor-site-front-end-lib-cura-forms-cura-input-text.mjs +0 -547
- package/fesm2022/rededor-site-front-end-lib-cura-forms-cura-input-text.mjs.map +0 -1
- package/fesm2022/rededor-site-front-end-lib-cura-forms-cura-label.mjs +0 -88
- package/fesm2022/rededor-site-front-end-lib-cura-forms-cura-label.mjs.map +0 -1
- package/fesm2022/rededor-site-front-end-lib-cura-forms-cura-radio.mjs +0 -237
- package/fesm2022/rededor-site-front-end-lib-cura-forms-cura-radio.mjs.map +0 -1
- package/fesm2022/rededor-site-front-end-lib-cura-forms-cura-select-option.mjs +0 -82
- package/fesm2022/rededor-site-front-end-lib-cura-forms-cura-select-option.mjs.map +0 -1
- package/fesm2022/rededor-site-front-end-lib-cura-forms-cura-select.mjs +0 -377
- package/fesm2022/rededor-site-front-end-lib-cura-forms-cura-select.mjs.map +0 -1
- package/fesm2022/rededor-site-front-end-lib-cura-forms-cura-switch.mjs +0 -182
- package/fesm2022/rededor-site-front-end-lib-cura-forms-cura-switch.mjs.map +0 -1
- package/fesm2022/rededor-site-front-end-lib-cura-forms.mjs +0 -21
- package/fesm2022/rededor-site-front-end-lib-cura-forms.mjs.map +0 -1
- package/fesm2022/rededor-site-front-end-lib-cura-icons-cura-icon.mjs +0 -88
- package/fesm2022/rededor-site-front-end-lib-cura-icons-cura-icon.mjs.map +0 -1
- package/fesm2022/rededor-site-front-end-lib-cura-loaders-cura-loader-bar.mjs +0 -44
- package/fesm2022/rededor-site-front-end-lib-cura-loaders-cura-loader-bar.mjs.map +0 -1
- package/fesm2022/rededor-site-front-end-lib-cura-loaders-cura-loader-circle.mjs +0 -49
- package/fesm2022/rededor-site-front-end-lib-cura-loaders-cura-loader-circle.mjs.map +0 -1
- package/fesm2022/rededor-site-front-end-lib-cura-texts-cura-display.mjs +0 -84
- package/fesm2022/rededor-site-front-end-lib-cura-texts-cura-display.mjs.map +0 -1
- package/fesm2022/rededor-site-front-end-lib-cura-texts-cura-heading.mjs +0 -104
- package/fesm2022/rededor-site-front-end-lib-cura-texts-cura-heading.mjs.map +0 -1
- package/fesm2022/rededor-site-front-end-lib-cura-texts-cura-paragraph.mjs +0 -89
- package/fesm2022/rededor-site-front-end-lib-cura-texts-cura-paragraph.mjs.map +0 -1
- package/fesm2022/rededor-site-front-end-lib-cura-texts.mjs +0 -4
- package/fesm2022/rededor-site-front-end-lib-cura-texts.mjs.map +0 -1
- package/fesm2022/rededor-site-front-end-lib-enums.mjs +0 -187
- package/fesm2022/rededor-site-front-end-lib-enums.mjs.map +0 -1
- package/fesm2022/rededor-site-front-end-lib-services-algolia-search-api.mjs +0 -74
- package/fesm2022/rededor-site-front-end-lib-services-algolia-search-api.mjs.map +0 -1
- package/fesm2022/rededor-site-front-end-lib-services-algolia.mjs +0 -41
- package/fesm2022/rededor-site-front-end-lib-services-algolia.mjs.map +0 -1
- package/fesm2022/rededor-site-front-end-lib-services-ngu-carousel.mjs +0 -88
- package/fesm2022/rededor-site-front-end-lib-services-ngu-carousel.mjs.map +0 -1
- package/fesm2022/rededor-site-front-end-lib-services-ssr-loading.mjs +0 -52
- package/fesm2022/rededor-site-front-end-lib-services-ssr-loading.mjs.map +0 -1
- package/fesm2022/rededor-site-front-end-lib-services-youtube.mjs +0 -40
- package/fesm2022/rededor-site-front-end-lib-services-youtube.mjs.map +0 -1
- package/fesm2022/rededor-site-front-end-lib-shared.mjs +0 -110
- package/fesm2022/rededor-site-front-end-lib-shared.mjs.map +0 -1
- package/shared/index.d.ts +0 -40
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
import * as i1 from '@angular/common';
|
|
2
|
-
import { isPlatformBrowser, CommonModule } from '@angular/common';
|
|
3
|
-
import * as i0 from '@angular/core';
|
|
4
|
-
import { inject, PLATFORM_ID, input, output, viewChild, effect, HostBinding, Component } from '@angular/core';
|
|
5
|
-
import * as i2 from '@angular/forms';
|
|
6
|
-
import { UntypedFormControl, ReactiveFormsModule } from '@angular/forms';
|
|
7
|
-
import { DeviceDetectorService } from 'ngx-device-detector';
|
|
8
|
-
import { debounceTime } from 'rxjs';
|
|
9
|
-
import { CuraApiService } from '@rededor/site-front-end-lib/cura/api';
|
|
10
|
-
import { CuraIconComponent } from '@rededor/site-front-end-lib/cura/icons/cura-icon';
|
|
11
|
-
import { CuraLoaderCircleComponent } from '@rededor/site-front-end-lib/cura/loaders/cura-loader-circle';
|
|
12
|
-
|
|
13
|
-
class SearchComponent {
|
|
14
|
-
constructor() {
|
|
15
|
-
this.deviceService = inject(DeviceDetectorService);
|
|
16
|
-
this.curaApiService = inject(CuraApiService);
|
|
17
|
-
this.platformId = inject(PLATFORM_ID);
|
|
18
|
-
this.searchControl = input(new UntypedFormControl(''), ...(ngDevMode ? [{ debugName: "searchControl" }] : []));
|
|
19
|
-
this.showSearchButtonMobile = input(true, ...(ngDevMode ? [{ debugName: "showSearchButtonMobile" }] : []));
|
|
20
|
-
this.debounceTime = input(300, ...(ngDevMode ? [{ debugName: "debounceTime" }] : []));
|
|
21
|
-
this.label = input('', ...(ngDevMode ? [{ debugName: "label" }] : []));
|
|
22
|
-
this.canClean = input(false, ...(ngDevMode ? [{ debugName: "canClean" }] : []));
|
|
23
|
-
this.controlBlur = output();
|
|
24
|
-
this.controlFocus = output();
|
|
25
|
-
this.controlReset = output();
|
|
26
|
-
this.termChange = output();
|
|
27
|
-
this.enterPress = output();
|
|
28
|
-
this.enable = input(true, ...(ngDevMode ? [{ debugName: "enable" }] : []));
|
|
29
|
-
this.loading = input(false, ...(ngDevMode ? [{ debugName: "loading" }] : []));
|
|
30
|
-
this.setFocus = input(false, ...(ngDevMode ? [{ debugName: "setFocus" }] : []));
|
|
31
|
-
this.focus = false;
|
|
32
|
-
this.controlSubscription = null;
|
|
33
|
-
this.searchInput = viewChild('searchInput', ...(ngDevMode ? [{ debugName: "searchInput" }] : []));
|
|
34
|
-
this.style = {
|
|
35
|
-
'--color': this.curaApiService.theme.colors.getColor('neutral-black'),
|
|
36
|
-
};
|
|
37
|
-
effect(() => {
|
|
38
|
-
this.setControlState();
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
ngAfterViewInit() {
|
|
42
|
-
if (this.setFocus())
|
|
43
|
-
this.setInitialFocus();
|
|
44
|
-
}
|
|
45
|
-
ngOnInit() {
|
|
46
|
-
this.controlSubscription = this.searchControl()
|
|
47
|
-
.valueChanges.pipe(debounceTime(this.debounceTime()))
|
|
48
|
-
.subscribe((term) => this.onChange(term));
|
|
49
|
-
}
|
|
50
|
-
setInitialFocus() {
|
|
51
|
-
if (isPlatformBrowser(this.platformId)) {
|
|
52
|
-
// Usar setTimeout para evitar mudanças de expressão após verificação
|
|
53
|
-
setTimeout(() => {
|
|
54
|
-
this.searchInput()?.nativeElement?.focus();
|
|
55
|
-
this.onFocus();
|
|
56
|
-
}, 10);
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
onChange(term) {
|
|
60
|
-
this.termChange.emit(term);
|
|
61
|
-
}
|
|
62
|
-
onFocus() {
|
|
63
|
-
this.focus = true;
|
|
64
|
-
this.controlFocus.emit();
|
|
65
|
-
}
|
|
66
|
-
onBlur() {
|
|
67
|
-
this.focus = false;
|
|
68
|
-
this.controlBlur.emit();
|
|
69
|
-
}
|
|
70
|
-
onSubmit($event) {
|
|
71
|
-
if (this.searchControl().value) {
|
|
72
|
-
this.enterPress.emit($event.target.value);
|
|
73
|
-
if (this.deviceService.isMobile() && this.showSearchButtonMobile()) {
|
|
74
|
-
this.focus = false;
|
|
75
|
-
$event.target.blur();
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
onSubmitByClick() {
|
|
80
|
-
const searchControl = this.searchControl();
|
|
81
|
-
if (searchControl.value) {
|
|
82
|
-
this.enterPress.emit(searchControl.value);
|
|
83
|
-
if (this.deviceService.isMobile() && this.showSearchButtonMobile()) {
|
|
84
|
-
this.focus = false;
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
setControlState() {
|
|
89
|
-
if (this.enable()) {
|
|
90
|
-
this.searchControl().enable();
|
|
91
|
-
}
|
|
92
|
-
else {
|
|
93
|
-
this.searchControl().disable();
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
clean() {
|
|
97
|
-
this.searchControl().setValue('');
|
|
98
|
-
this.controlReset.emit();
|
|
99
|
-
}
|
|
100
|
-
ngOnDestroy() {
|
|
101
|
-
this.controlSubscription?.unsubscribe();
|
|
102
|
-
}
|
|
103
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.2", ngImport: i0, type: SearchComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
104
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.2", type: SearchComponent, isStandalone: true, selector: "rdsite-search", inputs: { searchControl: { classPropertyName: "searchControl", publicName: "searchControl", isSignal: true, isRequired: false, transformFunction: null }, showSearchButtonMobile: { classPropertyName: "showSearchButtonMobile", publicName: "showSearchButtonMobile", isSignal: true, isRequired: false, transformFunction: null }, debounceTime: { classPropertyName: "debounceTime", publicName: "debounceTime", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, canClean: { classPropertyName: "canClean", publicName: "canClean", isSignal: true, isRequired: false, transformFunction: null }, enable: { classPropertyName: "enable", publicName: "enable", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, setFocus: { classPropertyName: "setFocus", publicName: "setFocus", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { controlBlur: "controlBlur", controlFocus: "controlFocus", controlReset: "controlReset", termChange: "termChange", enterPress: "enterPress" }, host: { properties: { "style": "this.style" } }, viewQueries: [{ propertyName: "searchInput", first: true, predicate: ["searchInput"], descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"rdsite-search-control\" [ngClass]=\"{ disabled: !enable || !searchControl().enabled, focus: focus }\">\r\n <label class=\"label-hidden\">{{ label() }}</label>\r\n <input\r\n #searchInput\r\n class=\"rdsite-search-control-input\"\r\n [type]=\"'text'\"\r\n name=\"term\"\r\n autocomplete=\"off\"\r\n [placeholder]=\"label()\"\r\n [formControl]=\"searchControl()\"\r\n (focus)=\"onFocus()\"\r\n (blur)=\"onBlur()\"\r\n (keyup.enter)=\"onSubmit($event)\"\r\n enterkeyhint=\"search\"\r\n (search)=\"onSubmit($event)\"\r\n />\r\n\r\n <div class=\"rdsite-search-control-icon\">\r\n <cura-icon\r\n name=\"closeCircle\"\r\n size=\"20\"\r\n color=\"primary-base\"\r\n (click)=\"clean()\"\r\n class=\"close\"\r\n [ngClass]=\"{ active: (searchControl().value || canClean()) && !loading() }\"\r\n ></cura-icon>\r\n <cura-icon name=\"search\" size=\"20\" color=\"primary-base\" (click)=\"onSubmitByClick()\" class=\"search\" [ngClass]=\"{ active: !loading() }\"></cura-icon>\r\n @if (loading()) {\r\n <cura-loader-circle color=\"primary\" size=\"small\"></cura-loader-circle>\r\n }\r\n </div>\r\n</div>\r\n", styles: [":host{background-color:#fff;box-shadow:0 4px 8px #26262629;height:100%;width:100%;max-width:100vw}:host .rdsite-search-control{display:flex;align-items:center;width:100%;height:100%;padding:0 20px}:host .rdsite-search-control-input{flex-grow:1;padding:0 8px 0 0;color:var(--color);font-size:16px!important;font-weight:500;line-height:20px}:host .rdsite-search-control-icon{display:flex;align-items:center;justify-content:center;gap:20px}:host .rdsite-search-control-icon cura-icon{cursor:pointer;visibility:hidden}:host .rdsite-search-control-icon cura-icon.active{visibility:unset}@media only screen and (min-width: 1024px){:host .rdsite-search-control{padding:0 40px 0 20px}}.label-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: CuraIconComponent, selector: "cura-icon", inputs: ["name", "color", "size", "iconset", "disabled"] }, { kind: "component", type: CuraLoaderCircleComponent, selector: "cura-loader-circle", inputs: ["size", "color"] }] }); }
|
|
105
|
-
}
|
|
106
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.2", ngImport: i0, type: SearchComponent, decorators: [{
|
|
107
|
-
type: Component,
|
|
108
|
-
args: [{ selector: 'rdsite-search', imports: [CommonModule, ReactiveFormsModule, CuraIconComponent, CuraLoaderCircleComponent], template: "<div class=\"rdsite-search-control\" [ngClass]=\"{ disabled: !enable || !searchControl().enabled, focus: focus }\">\r\n <label class=\"label-hidden\">{{ label() }}</label>\r\n <input\r\n #searchInput\r\n class=\"rdsite-search-control-input\"\r\n [type]=\"'text'\"\r\n name=\"term\"\r\n autocomplete=\"off\"\r\n [placeholder]=\"label()\"\r\n [formControl]=\"searchControl()\"\r\n (focus)=\"onFocus()\"\r\n (blur)=\"onBlur()\"\r\n (keyup.enter)=\"onSubmit($event)\"\r\n enterkeyhint=\"search\"\r\n (search)=\"onSubmit($event)\"\r\n />\r\n\r\n <div class=\"rdsite-search-control-icon\">\r\n <cura-icon\r\n name=\"closeCircle\"\r\n size=\"20\"\r\n color=\"primary-base\"\r\n (click)=\"clean()\"\r\n class=\"close\"\r\n [ngClass]=\"{ active: (searchControl().value || canClean()) && !loading() }\"\r\n ></cura-icon>\r\n <cura-icon name=\"search\" size=\"20\" color=\"primary-base\" (click)=\"onSubmitByClick()\" class=\"search\" [ngClass]=\"{ active: !loading() }\"></cura-icon>\r\n @if (loading()) {\r\n <cura-loader-circle color=\"primary\" size=\"small\"></cura-loader-circle>\r\n }\r\n </div>\r\n</div>\r\n", styles: [":host{background-color:#fff;box-shadow:0 4px 8px #26262629;height:100%;width:100%;max-width:100vw}:host .rdsite-search-control{display:flex;align-items:center;width:100%;height:100%;padding:0 20px}:host .rdsite-search-control-input{flex-grow:1;padding:0 8px 0 0;color:var(--color);font-size:16px!important;font-weight:500;line-height:20px}:host .rdsite-search-control-icon{display:flex;align-items:center;justify-content:center;gap:20px}:host .rdsite-search-control-icon cura-icon{cursor:pointer;visibility:hidden}:host .rdsite-search-control-icon cura-icon.active{visibility:unset}@media only screen and (min-width: 1024px){:host .rdsite-search-control{padding:0 40px 0 20px}}.label-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}\n"] }]
|
|
109
|
-
}], ctorParameters: () => [], propDecorators: { style: [{
|
|
110
|
-
type: HostBinding,
|
|
111
|
-
args: ['style']
|
|
112
|
-
}] } });
|
|
113
|
-
|
|
114
|
-
/**
|
|
115
|
-
* Generated bundle index. Do not edit.
|
|
116
|
-
*/
|
|
117
|
-
|
|
118
|
-
export { SearchComponent };
|
|
119
|
-
//# sourceMappingURL=rededor-site-front-end-lib-components-search.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"rededor-site-front-end-lib-components-search.mjs","sources":["../../../projects/site-front-end-lib/components/search/search.component.ts","../../../projects/site-front-end-lib/components/search/search.component.html","../../../projects/site-front-end-lib/components/search/rededor-site-front-end-lib-components-search.ts"],"sourcesContent":["import { CommonModule, isPlatformBrowser } from '@angular/common';\r\nimport { AfterViewInit, Component, ElementRef, HostBinding, OnDestroy, OnInit, PLATFORM_ID, input, output, viewChild, inject, effect } from '@angular/core';\r\nimport { ReactiveFormsModule, UntypedFormControl } from '@angular/forms';\r\nimport { DeviceDetectorService } from 'ngx-device-detector';\r\nimport { debounceTime, Subscription } from 'rxjs';\r\nimport { CuraApiService } from '@rededor/site-front-end-lib/cura/api';\r\nimport { CuraIconComponent } from '@rededor/site-front-end-lib/cura/icons/cura-icon';\r\nimport { CuraLoaderCircleComponent } from '@rededor/site-front-end-lib/cura/loaders/cura-loader-circle';\r\n\r\n@Component({\r\n selector: 'rdsite-search',\r\n imports: [CommonModule, ReactiveFormsModule, CuraIconComponent, CuraLoaderCircleComponent],\r\n templateUrl: './search.component.html',\r\n styleUrl: './search.component.scss',\r\n})\r\nexport class SearchComponent implements OnInit, OnDestroy, AfterViewInit {\r\n private deviceService = inject(DeviceDetectorService);\r\n private curaApiService = inject(CuraApiService);\r\n private platformId = inject(PLATFORM_ID);\r\n\r\n readonly searchControl = input(new UntypedFormControl(''));\r\n readonly showSearchButtonMobile = input(true);\r\n readonly debounceTime = input(300);\r\n readonly label = input<string>('');\r\n readonly canClean = input(false);\r\n readonly controlBlur = output();\r\n readonly controlFocus = output();\r\n readonly controlReset = output();\r\n readonly termChange = output<string>();\r\n readonly enterPress = output<string>();\r\n\r\n readonly enable = input(true);\r\n readonly loading = input(false);\r\n\r\n readonly setFocus = input(false);\r\n focus = false;\r\n\r\n controlSubscription: Subscription | null = null;\r\n\r\n readonly searchInput = viewChild<ElementRef<HTMLInputElement>>('searchInput');\r\n\r\n @HostBinding('style') style = {\r\n '--color': this.curaApiService.theme.colors.getColor('neutral-black'),\r\n };\r\n\r\n constructor() {\r\n effect(() => {\r\n this.setControlState();\r\n });\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n if (this.setFocus()) this.setInitialFocus();\r\n }\r\n\r\n ngOnInit() {\r\n this.controlSubscription = this.searchControl()\r\n .valueChanges.pipe(debounceTime(this.debounceTime()))\r\n .subscribe((term) => this.onChange(term));\r\n }\r\n\r\n setInitialFocus() {\r\n if (isPlatformBrowser(this.platformId)) {\r\n // Usar setTimeout para evitar mudanças de expressão após verificação\r\n setTimeout(() => {\r\n this.searchInput()?.nativeElement?.focus();\r\n this.onFocus();\r\n }, 10);\r\n }\r\n }\r\n\r\n onChange(term: string) {\r\n this.termChange.emit(term);\r\n }\r\n\r\n onFocus() {\r\n this.focus = true;\r\n this.controlFocus.emit();\r\n }\r\n\r\n onBlur() {\r\n this.focus = false;\r\n this.controlBlur.emit();\r\n }\r\n\r\n onSubmit($event: any) {\r\n if (this.searchControl().value) {\r\n this.enterPress.emit($event.target.value);\r\n if (this.deviceService.isMobile() && this.showSearchButtonMobile()) {\r\n this.focus = false;\r\n $event.target.blur();\r\n }\r\n }\r\n }\r\n\r\n onSubmitByClick() {\r\n const searchControl = this.searchControl();\r\n if (searchControl.value) {\r\n this.enterPress.emit(searchControl.value);\r\n if (this.deviceService.isMobile() && this.showSearchButtonMobile()) {\r\n this.focus = false;\r\n }\r\n }\r\n }\r\n\r\n setControlState() {\r\n if (this.enable()) {\r\n this.searchControl().enable();\r\n } else {\r\n this.searchControl().disable();\r\n }\r\n }\r\n\r\n clean() {\r\n this.searchControl().setValue('');\r\n this.controlReset.emit();\r\n }\r\n\r\n ngOnDestroy() {\r\n this.controlSubscription?.unsubscribe();\r\n }\r\n}\r\n","<div class=\"rdsite-search-control\" [ngClass]=\"{ disabled: !enable || !searchControl().enabled, focus: focus }\">\r\n <label class=\"label-hidden\">{{ label() }}</label>\r\n <input\r\n #searchInput\r\n class=\"rdsite-search-control-input\"\r\n [type]=\"'text'\"\r\n name=\"term\"\r\n autocomplete=\"off\"\r\n [placeholder]=\"label()\"\r\n [formControl]=\"searchControl()\"\r\n (focus)=\"onFocus()\"\r\n (blur)=\"onBlur()\"\r\n (keyup.enter)=\"onSubmit($event)\"\r\n enterkeyhint=\"search\"\r\n (search)=\"onSubmit($event)\"\r\n />\r\n\r\n <div class=\"rdsite-search-control-icon\">\r\n <cura-icon\r\n name=\"closeCircle\"\r\n size=\"20\"\r\n color=\"primary-base\"\r\n (click)=\"clean()\"\r\n class=\"close\"\r\n [ngClass]=\"{ active: (searchControl().value || canClean()) && !loading() }\"\r\n ></cura-icon>\r\n <cura-icon name=\"search\" size=\"20\" color=\"primary-base\" (click)=\"onSubmitByClick()\" class=\"search\" [ngClass]=\"{ active: !loading() }\"></cura-icon>\r\n @if (loading()) {\r\n <cura-loader-circle color=\"primary\" size=\"small\"></cura-loader-circle>\r\n }\r\n </div>\r\n</div>\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;MAea,eAAe,CAAA;AA8B1B,IAAA,WAAA,GAAA;AA7BQ,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,qBAAqB,CAAC;AAC7C,QAAA,IAAA,CAAA,cAAc,GAAG,MAAM,CAAC,cAAc,CAAC;AACvC,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,WAAW,CAAC;QAE/B,IAAA,CAAA,aAAa,GAAG,KAAK,CAAC,IAAI,kBAAkB,CAAC,EAAE,CAAC,EAAA,IAAA,SAAA,GAAA,CAAA,EAAA,SAAA,EAAA,eAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAC;AACjD,QAAA,IAAA,CAAA,sBAAsB,GAAG,KAAK,CAAC,IAAI,kEAAC;AACpC,QAAA,IAAA,CAAA,YAAY,GAAG,KAAK,CAAC,GAAG,wDAAC;AACzB,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK,CAAS,EAAE,iDAAC;AACzB,QAAA,IAAA,CAAA,QAAQ,GAAG,K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,2CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,oBAAA,EAAA,QAAA,EAAA,eAAA,EAAA,MAAA,EAAA,CAAA,aAAA,EAAA,UAAA,EAAA,SAAA,CAAA,EAAA,OAAA,EAAA,CAAA,eAAA,CAAA,EAAA,QAAA,EAAA,CAAA,QAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,iBAAiB,EAAA,QAAA,EAAA,WAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,OAAA,EAAA,MAAA,EAAA,SAAA,EAAA,UAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,yBAAyB,EAAA,QAAA,EAAA,oBAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,OAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA;;2FAI9E,eAAe,EAAA,UAAA,EAAA,CAAA;kBAN3B,SAAS;+BACE,eAAe,EAAA,OAAA,EAChB,CAAC,YAAY,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,yBAAyB,CAAC,EAAA,QAAA,EAAA,8qCAAA,EAAA,MAAA,EAAA,CAAA,gyBAAA,CAAA,EAAA;wDA8BpE,KAAK,EAAA,CAAA;sBAA1B,WAAW;uBAAC,OAAO;;;AEzCtB;;AAEG;;;;"}
|
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, signal, viewChild, viewChildren, input, output, effect, HostBinding, Input, HostListener, Component } from '@angular/core';
|
|
3
|
-
import * as i1 from '@angular/common';
|
|
4
|
-
import { CommonModule } from '@angular/common';
|
|
5
|
-
import { RdsiteLinkDirective } from '@rededor/site-front-end-lib/core';
|
|
6
|
-
import { CuraApiService } from '@rededor/site-front-end-lib/cura/api';
|
|
7
|
-
import { BehaviorSubject, debounceTime } from 'rxjs';
|
|
8
|
-
|
|
9
|
-
class SectionNavigationComponent {
|
|
10
|
-
onWindowResize() {
|
|
11
|
-
this.isMobile = window.innerWidth < 768;
|
|
12
|
-
}
|
|
13
|
-
onWindowScroll() {
|
|
14
|
-
this.windowScroll();
|
|
15
|
-
}
|
|
16
|
-
set navigationSections(value) {
|
|
17
|
-
if (!value?.length) {
|
|
18
|
-
throw new Error('O SectionNavigationComponent requer pelo menos uma seção.');
|
|
19
|
-
}
|
|
20
|
-
this.sections.set(value);
|
|
21
|
-
if (!this.activeSection()) {
|
|
22
|
-
this.activeSection.set(value[0].id);
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
set navigationConfig(value) {
|
|
26
|
-
this.config.set(value);
|
|
27
|
-
}
|
|
28
|
-
constructor() {
|
|
29
|
-
this.curaApiService = inject(CuraApiService);
|
|
30
|
-
this.sections = signal([], ...(ngDevMode ? [{ debugName: "sections" }] : []));
|
|
31
|
-
this.config = signal(undefined, ...(ngDevMode ? [{ debugName: "config" }] : []));
|
|
32
|
-
this.activeSection = signal('', ...(ngDevMode ? [{ debugName: "activeSection" }] : []));
|
|
33
|
-
this.isMobile = window.innerWidth < 768;
|
|
34
|
-
this.scrollToMenuAnchorSubscription = null;
|
|
35
|
-
this.scrollToMenuAnchorSubject = new BehaviorSubject('');
|
|
36
|
-
this.containerEl = viewChild.required('containerEl');
|
|
37
|
-
this.anchorsEl = viewChildren('anchorEl', ...(ngDevMode ? [{ debugName: "anchorsEl" }] : []));
|
|
38
|
-
this.ariaLabel = input('Navegação da página', ...(ngDevMode ? [{ debugName: "ariaLabel" }] : []));
|
|
39
|
-
this.anchorAdjustment = input(0, ...(ngDevMode ? [{ debugName: "anchorAdjustment" }] : []));
|
|
40
|
-
this.sectionChange = output();
|
|
41
|
-
this.styleBinding = {
|
|
42
|
-
'--neutral-purewhite': this.curaApiService.theme.colors.getColor('neutral-purewhite'),
|
|
43
|
-
'--neutral-dark': this.curaApiService.theme.colors.getColor('neutral-dark'),
|
|
44
|
-
'--neutral-black': this.curaApiService.theme.colors.getColor('neutral-black', 0.16),
|
|
45
|
-
'--color-base': this.curaApiService.theme.colors.getColor('primary-base'),
|
|
46
|
-
'--font-size': this.curaApiService.theme.fonts.getSize(),
|
|
47
|
-
'--font-family': this.curaApiService.theme.fonts.getFamily(''),
|
|
48
|
-
};
|
|
49
|
-
this.navigationMenu = viewChild.required('navigationMenu');
|
|
50
|
-
effect(() => {
|
|
51
|
-
const sections = this.sections();
|
|
52
|
-
if (sections.length && !this.activeSection()) {
|
|
53
|
-
this.activeSection.set(sections[0].id);
|
|
54
|
-
}
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
|
-
ngOnInit() {
|
|
58
|
-
const sections = this.sections();
|
|
59
|
-
if (!sections.length) {
|
|
60
|
-
throw new Error('O SectionNavigationComponent requer pelo menos uma seção.');
|
|
61
|
-
}
|
|
62
|
-
if (!this.activeSection()) {
|
|
63
|
-
this.activeSection.set(sections[0].id);
|
|
64
|
-
}
|
|
65
|
-
// Usado para evitar multiplos calculos desnecessários enquanto scrolla
|
|
66
|
-
const TIME_TO_AVOID_UNECESSARY_CALCULATIONS = 50;
|
|
67
|
-
this.scrollToMenuAnchorSubscription = this.scrollToMenuAnchorSubject.pipe(debounceTime(TIME_TO_AVOID_UNECESSARY_CALCULATIONS)).subscribe((anchorId) => {
|
|
68
|
-
this.scrollToMenuAnchor(anchorId);
|
|
69
|
-
});
|
|
70
|
-
}
|
|
71
|
-
windowScroll() {
|
|
72
|
-
const navHeight = document.querySelector('.rdsite-section-navigation')?.getBoundingClientRect().top || 0;
|
|
73
|
-
const pageHeaderHeight = document.querySelector('.page-header')?.getBoundingClientRect().top || 0;
|
|
74
|
-
let selectedIndex = -1;
|
|
75
|
-
this.sections()?.forEach((section, index) => {
|
|
76
|
-
const menuTop = document.querySelector(`#${section.id}`)?.getBoundingClientRect().top || 0;
|
|
77
|
-
if (menuTop) {
|
|
78
|
-
const calc = window.scrollY - menuTop + navHeight + pageHeaderHeight;
|
|
79
|
-
if (calc >= 0) {
|
|
80
|
-
selectedIndex = index;
|
|
81
|
-
if (this.sections()?.[selectedIndex]) {
|
|
82
|
-
this.activeSection.set(this.sections()?.[selectedIndex]?.id);
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
});
|
|
87
|
-
if (this.sections()?.[selectedIndex]) {
|
|
88
|
-
this.scrollToMenuAnchorSubject.next(this.sections()?.[selectedIndex]?.id);
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
scrollToMenuAnchor(anchorId) {
|
|
92
|
-
const anchor = this.anchorsEl().find((anchor) => anchor.nativeElement.id == `anchor-${anchorId}`);
|
|
93
|
-
if (!anchor)
|
|
94
|
-
return;
|
|
95
|
-
const distanceFromTheCenterOfTheAnchor = (anchor.nativeElement.offsetLeft + anchor.nativeElement.offsetLeft + anchor?.nativeElement.offsetWidth) / 2;
|
|
96
|
-
const containerEl = this.containerEl();
|
|
97
|
-
const centerOfContainerEl = containerEl?.nativeElement.clientWidth / 2;
|
|
98
|
-
const left = distanceFromTheCenterOfTheAnchor - centerOfContainerEl;
|
|
99
|
-
containerEl.nativeElement.scrollTo({
|
|
100
|
-
left: left,
|
|
101
|
-
behavior: 'smooth',
|
|
102
|
-
});
|
|
103
|
-
}
|
|
104
|
-
ngOnDestroy() {
|
|
105
|
-
this.scrollToMenuAnchorSubscription?.unsubscribe();
|
|
106
|
-
}
|
|
107
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.2", ngImport: i0, type: SectionNavigationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
108
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.2", type: SectionNavigationComponent, isStandalone: true, selector: "nav[rdsite-section-navigation]", inputs: { navigationSections: { classPropertyName: "navigationSections", publicName: "navigationSections", isSignal: false, isRequired: true, transformFunction: null }, navigationConfig: { classPropertyName: "navigationConfig", publicName: "navigationConfig", isSignal: false, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, anchorAdjustment: { classPropertyName: "anchorAdjustment", publicName: "anchorAdjustment", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { sectionChange: "sectionChange" }, host: { listeners: { "window:resize": "onWindowResize()", "window:scroll": "onWindowScroll()" }, properties: { "style": "this.styleBinding" } }, viewQueries: [{ propertyName: "containerEl", first: true, predicate: ["containerEl"], descendants: true, isSignal: true }, { propertyName: "anchorsEl", predicate: ["anchorEl"], descendants: true, isSignal: true }, { propertyName: "navigationMenu", first: true, predicate: ["navigationMenu"], descendants: true, isSignal: true }], ngImport: i0, template: "<nav class=\"rdsite-section-navigation\" [attr.aria-label]=\"ariaLabel()\" [style.top.px]=\"config()?.offsetTop || 0\">\r\n <ul #containerEl class=\"rdsite-section-navigation-menu\" role=\"menubar\">\r\n @for (section of sections(); track section.id) {\r\n @if (section.title) {\r\n <li role=\"none\">\r\n <a\r\n #anchorEl\r\n id=\"anchor-{{ section.id }}\"\r\n role=\"menuitem\"\r\n [href]=\"'#' + section.id\"\r\n rdsitelink\r\n [anchorAdjustment]=\"anchorAdjustment()\"\r\n [attr.aria-current]=\"activeSection() === section.id ? 'page' : null\"\r\n [attr.aria-label]=\"'Navegar para ' + section.title\"\r\n [ngClass]=\"{ active: activeSection() === section.id }\"\r\n >\r\n {{ section.title }}\r\n </a>\r\n </li>\r\n }\r\n }\r\n </ul>\r\n</nav>\r\n", styles: [".rdsite-section-navigation{width:100%;position:sticky;left:0;z-index:1000;background-color:var(--neutral-purewhite);border-bottom:1px solid #b7b7b7;box-shadow:0 4px 8px 0 var(--neutral-black);padding-top:10px}.rdsite-section-navigation *{font-family:var(--font-family)}.rdsite-section-navigation-menu{box-sizing:border-box;width:90%;position:relative;max-width:1366px;margin-left:auto;margin-right:auto;display:flex}.rdsite-section-navigation-menu.full-container{width:100%;max-width:100%}@media only screen and (max-width: 1366px){.rdsite-section-navigation-menu{overflow-x:auto;white-space:nowrap}}.rdsite-section-navigation-menu li>a{text-decoration:none;padding:12px 8px;font-size:12px;font-weight:500;color:var(--neutral-dark);display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:158px}@media only screen and (max-width: 1366px){.rdsite-section-navigation-menu li>a{max-width:135px}}.rdsite-section-navigation-menu li>a.active{border-radius:4px 4px 0 0!important;background-color:var(--color-base);color:var(--neutral-purewhite)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: RdsiteLinkDirective, selector: "[rdsitelink]", inputs: ["anchorAdjustment", "anchorExtraAdjustment", "phonemodal"] }] }); }
|
|
109
|
-
}
|
|
110
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.2", ngImport: i0, type: SectionNavigationComponent, decorators: [{
|
|
111
|
-
type: Component,
|
|
112
|
-
args: [{ selector: 'nav[rdsite-section-navigation]', imports: [CommonModule, RdsiteLinkDirective], template: "<nav class=\"rdsite-section-navigation\" [attr.aria-label]=\"ariaLabel()\" [style.top.px]=\"config()?.offsetTop || 0\">\r\n <ul #containerEl class=\"rdsite-section-navigation-menu\" role=\"menubar\">\r\n @for (section of sections(); track section.id) {\r\n @if (section.title) {\r\n <li role=\"none\">\r\n <a\r\n #anchorEl\r\n id=\"anchor-{{ section.id }}\"\r\n role=\"menuitem\"\r\n [href]=\"'#' + section.id\"\r\n rdsitelink\r\n [anchorAdjustment]=\"anchorAdjustment()\"\r\n [attr.aria-current]=\"activeSection() === section.id ? 'page' : null\"\r\n [attr.aria-label]=\"'Navegar para ' + section.title\"\r\n [ngClass]=\"{ active: activeSection() === section.id }\"\r\n >\r\n {{ section.title }}\r\n </a>\r\n </li>\r\n }\r\n }\r\n </ul>\r\n</nav>\r\n", styles: [".rdsite-section-navigation{width:100%;position:sticky;left:0;z-index:1000;background-color:var(--neutral-purewhite);border-bottom:1px solid #b7b7b7;box-shadow:0 4px 8px 0 var(--neutral-black);padding-top:10px}.rdsite-section-navigation *{font-family:var(--font-family)}.rdsite-section-navigation-menu{box-sizing:border-box;width:90%;position:relative;max-width:1366px;margin-left:auto;margin-right:auto;display:flex}.rdsite-section-navigation-menu.full-container{width:100%;max-width:100%}@media only screen and (max-width: 1366px){.rdsite-section-navigation-menu{overflow-x:auto;white-space:nowrap}}.rdsite-section-navigation-menu li>a{text-decoration:none;padding:12px 8px;font-size:12px;font-weight:500;color:var(--neutral-dark);display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:158px}@media only screen and (max-width: 1366px){.rdsite-section-navigation-menu li>a{max-width:135px}}.rdsite-section-navigation-menu li>a.active{border-radius:4px 4px 0 0!important;background-color:var(--color-base);color:var(--neutral-purewhite)}\n"] }]
|
|
113
|
-
}], ctorParameters: () => [], propDecorators: { onWindowResize: [{
|
|
114
|
-
type: HostListener,
|
|
115
|
-
args: ['window:resize']
|
|
116
|
-
}], onWindowScroll: [{
|
|
117
|
-
type: HostListener,
|
|
118
|
-
args: ['window:scroll']
|
|
119
|
-
}], navigationSections: [{
|
|
120
|
-
type: Input,
|
|
121
|
-
args: [{ required: true }]
|
|
122
|
-
}], navigationConfig: [{
|
|
123
|
-
type: Input
|
|
124
|
-
}], styleBinding: [{
|
|
125
|
-
type: HostBinding,
|
|
126
|
-
args: ['style']
|
|
127
|
-
}] } });
|
|
128
|
-
|
|
129
|
-
/**
|
|
130
|
-
* Generated bundle index. Do not edit.
|
|
131
|
-
*/
|
|
132
|
-
|
|
133
|
-
export { SectionNavigationComponent };
|
|
134
|
-
//# sourceMappingURL=rededor-site-front-end-lib-components-section-navigation.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"rededor-site-front-end-lib-components-section-navigation.mjs","sources":["../../../projects/site-front-end-lib/components/section-navigation/section-navigation.component.ts","../../../projects/site-front-end-lib/components/section-navigation/section-navigation.component.html","../../../projects/site-front-end-lib/components/section-navigation/rededor-site-front-end-lib-components-section-navigation.ts"],"sourcesContent":["import {\r\n Component,\r\n Input,\r\n signal,\r\n effect,\r\n OnInit,\r\n ElementRef,\r\n HostBinding,\r\n HostListener,\r\n OnDestroy,\r\n input,\r\n output,\r\n viewChild,\r\n viewChildren,\r\n inject,\r\n} from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { RdsiteLinkDirective, SectionNavigationData, SectionNavigationConfig } from '@rededor/site-front-end-lib/core';\r\nimport { CuraApiService } from '@rededor/site-front-end-lib/cura/api';\r\nimport { BehaviorSubject, debounceTime, Subscription } from 'rxjs';\r\n\r\n@Component({\r\n // eslint-disable-next-line @angular-eslint/component-selector\r\n selector: 'nav[rdsite-section-navigation]',\r\n imports: [CommonModule, RdsiteLinkDirective],\r\n templateUrl: './section-navigation.component.html',\r\n styleUrls: ['./section-navigation.component.scss'],\r\n})\r\nexport class SectionNavigationComponent implements OnInit, OnDestroy {\r\n private curaApiService = inject(CuraApiService);\r\n\r\n readonly sections = signal<SectionNavigationData[]>([]);\r\n readonly config = signal<SectionNavigationConfig | undefined>(undefined);\r\n readonly activeSection = signal<string>('');\r\n\r\n isMobile: boolean = window.innerWidth < 768;\r\n\r\n scrollToMenuAnchorSubscription: Subscription | null = null;\r\n scrollToMenuAnchorSubject: BehaviorSubject<string> = new BehaviorSubject('');\r\n\r\n readonly containerEl = viewChild.required<ElementRef<HTMLDivElement>>('containerEl');\r\n readonly anchorsEl = viewChildren<ElementRef<HTMLAnchorElement>>('anchorEl');\r\n\r\n @HostListener('window:resize')\r\n onWindowResize(): void {\r\n this.isMobile = window.innerWidth < 768;\r\n }\r\n\r\n @HostListener('window:scroll')\r\n onWindowScroll(): void {\r\n this.windowScroll();\r\n }\r\n\r\n @Input({ required: true })\r\n set navigationSections(value: SectionNavigationData[]) {\r\n if (!value?.length) {\r\n throw new Error('O SectionNavigationComponent requer pelo menos uma seção.');\r\n }\r\n this.sections.set(value);\r\n\r\n if (!this.activeSection()) {\r\n this.activeSection.set(value[0].id);\r\n }\r\n }\r\n\r\n @Input()\r\n set navigationConfig(value: SectionNavigationConfig) {\r\n this.config.set(value);\r\n }\r\n\r\n readonly ariaLabel = input('Navegação da página');\r\n readonly anchorAdjustment = input(0);\r\n\r\n readonly sectionChange = output<SectionNavigationData>();\r\n\r\n @HostBinding('style') styleBinding = {\r\n '--neutral-purewhite': this.curaApiService.theme.colors.getColor('neutral-purewhite'),\r\n '--neutral-dark': this.curaApiService.theme.colors.getColor('neutral-dark'),\r\n '--neutral-black': this.curaApiService.theme.colors.getColor('neutral-black', 0.16),\r\n '--color-base': this.curaApiService.theme.colors.getColor('primary-base'),\r\n '--font-size': this.curaApiService.theme.fonts.getSize(),\r\n '--font-family': this.curaApiService.theme.fonts.getFamily(''),\r\n };\r\n\r\n readonly navigationMenu = viewChild.required<ElementRef<HTMLUListElement>>('navigationMenu');\r\n\r\n constructor() {\r\n effect(() => {\r\n const sections = this.sections();\r\n if (sections.length && !this.activeSection()) {\r\n this.activeSection.set(sections[0].id);\r\n }\r\n });\r\n }\r\n\r\n ngOnInit(): void {\r\n const sections = this.sections();\r\n if (!sections.length) {\r\n throw new Error('O SectionNavigationComponent requer pelo menos uma seção.');\r\n }\r\n\r\n if (!this.activeSection()) {\r\n this.activeSection.set(sections[0].id);\r\n }\r\n\r\n // Usado para evitar multiplos calculos desnecessários enquanto scrolla\r\n const TIME_TO_AVOID_UNECESSARY_CALCULATIONS = 50;\r\n this.scrollToMenuAnchorSubscription = this.scrollToMenuAnchorSubject.pipe(debounceTime(TIME_TO_AVOID_UNECESSARY_CALCULATIONS)).subscribe((anchorId) => {\r\n this.scrollToMenuAnchor(anchorId);\r\n });\r\n }\r\n\r\n private windowScroll(): void {\r\n const navHeight = document.querySelector<HTMLElement>('.rdsite-section-navigation')?.getBoundingClientRect().top || 0;\r\n const pageHeaderHeight = document.querySelector<HTMLElement>('.page-header')?.getBoundingClientRect().top || 0;\r\n let selectedIndex = -1;\r\n this.sections()?.forEach((section, index) => {\r\n const menuTop = document.querySelector<HTMLElement>(`#${section.id}`)?.getBoundingClientRect().top || 0;\r\n if (menuTop) {\r\n const calc = window.scrollY - menuTop + navHeight + pageHeaderHeight;\r\n if (calc >= 0) {\r\n selectedIndex = index;\r\n if (this.sections()?.[selectedIndex]) {\r\n this.activeSection.set(this.sections()?.[selectedIndex]?.id);\r\n }\r\n }\r\n }\r\n });\r\n\r\n if (this.sections()?.[selectedIndex]) {\r\n this.scrollToMenuAnchorSubject.next(this.sections()?.[selectedIndex]?.id);\r\n }\r\n }\r\n\r\n scrollToMenuAnchor(anchorId: string): void {\r\n const anchor = this.anchorsEl().find((anchor) => anchor.nativeElement.id == `anchor-${anchorId}`);\r\n if (!anchor) return;\r\n const distanceFromTheCenterOfTheAnchor = (anchor.nativeElement.offsetLeft + anchor.nativeElement.offsetLeft + anchor?.nativeElement.offsetWidth) / 2;\r\n const containerEl = this.containerEl();\r\n const centerOfContainerEl = containerEl?.nativeElement.clientWidth / 2;\r\n const left = distanceFromTheCenterOfTheAnchor - centerOfContainerEl;\r\n containerEl.nativeElement.scrollTo({\r\n left: left,\r\n behavior: 'smooth',\r\n });\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this.scrollToMenuAnchorSubscription?.unsubscribe();\r\n }\r\n}\r\n","<nav class=\"rdsite-section-navigation\" [attr.aria-label]=\"ariaLabel()\" [style.top.px]=\"config()?.offsetTop || 0\">\r\n <ul #containerEl class=\"rdsite-section-navigation-menu\" role=\"menubar\">\r\n @for (section of sections(); track section.id) {\r\n @if (section.title) {\r\n <li role=\"none\">\r\n <a\r\n #anchorEl\r\n id=\"anchor-{{ section.id }}\"\r\n role=\"menuitem\"\r\n [href]=\"'#' + section.id\"\r\n rdsitelink\r\n [anchorAdjustment]=\"anchorAdjustment()\"\r\n [attr.aria-current]=\"activeSection() === section.id ? 'page' : null\"\r\n [attr.aria-label]=\"'Navegar para ' + section.title\"\r\n [ngClass]=\"{ active: activeSection() === section.id }\"\r\n >\r\n {{ section.title }}\r\n </a>\r\n </li>\r\n }\r\n }\r\n </ul>\r\n</nav>\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;MA4Ba,0BAA0B,CAAA;IAgBrC,cAAc,GAAA;QACZ,IAAI,CAAC,QAAQ,GAAG,MAAM,CAAC,UAAU,GAAG,GAAG;IACzC;IAGA,cAAc,GAAA;QACZ,IAAI,CAAC,YAAY,EAAE;IACrB;IAEA,IACI,kBAAkB,CAAC,KAA8B,EAAA;AACnD,QAAA,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE;AAClB,YAAA,MAAM,IAAI,KAAK,CAAC,2DAA2D,CAAC;QAC9E;AACA,QAAA,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC;AAExB,QAAA,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,EAAE;AACzB,YAAA,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QACrC;IACF;IAEA,IACI,gBAAgB,CAAC,KAA8B,EAAA;AACjD,QAAA,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC;IACxB;AAkBA,IAAA,WAAA,GAAA;AAzDQ,QAAA,IAAA,CAAA,cAAc,GAAG,MAAM,CAAC,cAAc,CAAC;AAEtC,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAA0B,EAAE,oDAAC;AAC9C,QAAA,IAAA,CAAA,MAAM,GAAG,MAAM,CAAsC,SAAS,kDAAC;AAC/D,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAS,EAAE,yDAAC;AAE3C,QAAA,IAAA,CAAA,QAAQ,GAAY,MAAM,CAAC,UAAU,GAAG,GAAG;QAE3C,IAAA,CAAA,8BAA8B,GAAwB,IAAI;AAC1D,QAAA,IAAA,CAAA,yBAAyB,GAA4B,IAA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
|
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, HostBinding, Component, input, output } from '@angular/core';
|
|
3
|
-
import * as i1 from '@angular/common';
|
|
4
|
-
import { CommonModule } from '@angular/common';
|
|
5
|
-
import { CuraApiService } from '@rededor/site-front-end-lib/cura/api';
|
|
6
|
-
import { RdsiteLinkDirective } from '@rededor/site-front-end-lib/core';
|
|
7
|
-
import { CuraIconComponent } from '@rededor/site-front-end-lib/cura/icons/cura-icon';
|
|
8
|
-
import { WhatsappComponent } from '@rededor/site-front-end-lib/components/whatsapp';
|
|
9
|
-
|
|
10
|
-
class SideCtasComponent {
|
|
11
|
-
constructor() {
|
|
12
|
-
this.curaApiService = inject(CuraApiService);
|
|
13
|
-
this.style = {
|
|
14
|
-
'--color-right': this.curaApiService.theme.colors.getColor('primary-darker'),
|
|
15
|
-
};
|
|
16
|
-
}
|
|
17
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.2", ngImport: i0, type: SideCtasComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
18
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.2", type: SideCtasComponent, isStandalone: true, selector: "rdsite-side-ctas", host: { properties: { "style": "this.style" } }, ngImport: i0, template: "<div\r\n class=\"rdsite-side-ctas-right\"\r\n [ngStyle]=\"{\r\n display: rightTop?.children?.length || rightMiddle?.children?.length || rightBottom?.children?.length ? 'flex' : 'none',\r\n }\"\r\n>\r\n <div #rightTop class=\"rdsite-side-ctas-right-top\">\r\n <ng-content select=\"rdsite-side-ctas-right-top\"></ng-content>\r\n </div>\r\n <div #rightMiddle class=\"rdsite-side-ctas-right-middle\">\r\n <ng-content select=\"rdsite-side-ctas-right-middle\"></ng-content>\r\n </div>\r\n <div #rightBottom class=\"rdsite-side-ctas-right-bottom\">\r\n <ng-content select=\"rdsite-side-ctas-right-bottom\"></ng-content>\r\n </div>\r\n</div>\r\n\r\n<div\r\n class=\"rdsite-side-ctas-bottom\"\r\n [ngStyle]=\"{\r\n display: bottom?.children?.length ? 'flex' : 'none',\r\n paddingRight: rightTop?.children?.length || rightMiddle?.children?.length || rightBottom?.children?.length ? '88px' : '0px',\r\n }\"\r\n>\r\n <div #bottom class=\"rdsite-side-ctas-bottom-container\">\r\n <ng-content select=\"rdsite-side-ctas-bottom\"></ng-content>\r\n </div>\r\n</div>\r\n", styles: [":host{position:sticky;bottom:0;right:0;display:block;z-index:3003;pointer-events:none}@media only screen and (min-width: 1024px){:host{margin-top:-88px}}.rdsite-side-ctas-right{position:absolute;bottom:0;right:0;height:min-content;width:88px;background-color:var(--color-right);display:flex;flex-direction:column;justify-content:space-between;align-items:center;pointer-events:auto}.rdsite-side-ctas-right-middle{display:flex;flex-grow:1;align-items:center}.rdsite-side-ctas-bottom{display:flex;justify-content:flex-end;padding-right:88px;background-color:transparent;height:88px}.rdsite-side-ctas-bottom-container{pointer-events:auto;width:100%}@media only screen and (min-width: 1024px){.rdsite-side-ctas-right{height:calc(100vh - 80px)}.rdsite-side-ctas-bottom-container{width:fit-content;gap:10px}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] }); }
|
|
19
|
-
}
|
|
20
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.2", ngImport: i0, type: SideCtasComponent, decorators: [{
|
|
21
|
-
type: Component,
|
|
22
|
-
args: [{ selector: 'rdsite-side-ctas', imports: [CommonModule], template: "<div\r\n class=\"rdsite-side-ctas-right\"\r\n [ngStyle]=\"{\r\n display: rightTop?.children?.length || rightMiddle?.children?.length || rightBottom?.children?.length ? 'flex' : 'none',\r\n }\"\r\n>\r\n <div #rightTop class=\"rdsite-side-ctas-right-top\">\r\n <ng-content select=\"rdsite-side-ctas-right-top\"></ng-content>\r\n </div>\r\n <div #rightMiddle class=\"rdsite-side-ctas-right-middle\">\r\n <ng-content select=\"rdsite-side-ctas-right-middle\"></ng-content>\r\n </div>\r\n <div #rightBottom class=\"rdsite-side-ctas-right-bottom\">\r\n <ng-content select=\"rdsite-side-ctas-right-bottom\"></ng-content>\r\n </div>\r\n</div>\r\n\r\n<div\r\n class=\"rdsite-side-ctas-bottom\"\r\n [ngStyle]=\"{\r\n display: bottom?.children?.length ? 'flex' : 'none',\r\n paddingRight: rightTop?.children?.length || rightMiddle?.children?.length || rightBottom?.children?.length ? '88px' : '0px',\r\n }\"\r\n>\r\n <div #bottom class=\"rdsite-side-ctas-bottom-container\">\r\n <ng-content select=\"rdsite-side-ctas-bottom\"></ng-content>\r\n </div>\r\n</div>\r\n", styles: [":host{position:sticky;bottom:0;right:0;display:block;z-index:3003;pointer-events:none}@media only screen and (min-width: 1024px){:host{margin-top:-88px}}.rdsite-side-ctas-right{position:absolute;bottom:0;right:0;height:min-content;width:88px;background-color:var(--color-right);display:flex;flex-direction:column;justify-content:space-between;align-items:center;pointer-events:auto}.rdsite-side-ctas-right-middle{display:flex;flex-grow:1;align-items:center}.rdsite-side-ctas-bottom{display:flex;justify-content:flex-end;padding-right:88px;background-color:transparent;height:88px}.rdsite-side-ctas-bottom-container{pointer-events:auto;width:100%}@media only screen and (min-width: 1024px){.rdsite-side-ctas-right{height:calc(100vh - 80px)}.rdsite-side-ctas-bottom-container{width:fit-content;gap:10px}}\n"] }]
|
|
23
|
-
}], propDecorators: { style: [{
|
|
24
|
-
type: HostBinding,
|
|
25
|
-
args: ['style']
|
|
26
|
-
}] } });
|
|
27
|
-
|
|
28
|
-
class SideCtasBottomComponent {
|
|
29
|
-
constructor() {
|
|
30
|
-
this.curaApiService = inject(CuraApiService);
|
|
31
|
-
this.ctas = input([], ...(ngDevMode ? [{ debugName: "ctas" }] : []));
|
|
32
|
-
this.sideCtaBottomItemClick = output();
|
|
33
|
-
this.style = {
|
|
34
|
-
'--font-family': this.curaApiService.theme.fonts.getFamily(''),
|
|
35
|
-
'--font-color': this.curaApiService.theme.colors.getColor('neutral-black'),
|
|
36
|
-
'--bg-color': this.curaApiService.theme.colors.getColor('primary-dark'),
|
|
37
|
-
'--bg-cta-color': this.curaApiService.theme.colors.getColor('accent-base'),
|
|
38
|
-
'--bg-cta-hover-color': this.curaApiService.theme.colors.getColor('accent-dark'),
|
|
39
|
-
'--bg-cta-active-color': this.curaApiService.theme.colors.getColor('accent-darker'),
|
|
40
|
-
};
|
|
41
|
-
}
|
|
42
|
-
sideCtaBottomItemClicked(event) {
|
|
43
|
-
this.sideCtaBottomItemClick.emit(event);
|
|
44
|
-
}
|
|
45
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.2", ngImport: i0, type: SideCtasBottomComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
46
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.2", type: SideCtasBottomComponent, isStandalone: true, selector: "rdsite-side-ctas-bottom", inputs: { ctas: { classPropertyName: "ctas", publicName: "ctas", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { sideCtaBottomItemClick: "sideCtaBottomItemClick" }, host: { properties: { "style": "this.style" } }, ngImport: i0, template: "@if (ctas().length) {\r\n @for (cta of ctas(); track cta.text) {\r\n <a [href]=\"cta.url\" rdsitelink (click)=\"sideCtaBottomItemClicked($event)\">\r\n <cura-icon [name]=\"cta.icon\" size=\"20\" color=\"neutral-black\"></cura-icon>\r\n <span>{{ cta.text }}</span>\r\n </a>\r\n }\r\n}\r\n", styles: [":host{display:flex;width:100%;height:100%;gap:2px;background-color:var(--bg-color)}:host *{font-family:var(--font-family)}:host a{display:flex;align-items:center;justify-content:center;flex:1 1 0;gap:12px;padding:0 10px;background-color:var(--bg-cta-color);color:var(--font-color);transition:background-color .25s linear!important;text-decoration:none;font-weight:500}:host a span{color:var(--font-color)}:host a cura-icon{--color: var(--font-color) !important}:host a:hover{background-color:var(--bg-cta-hover-color);color:var(--font-color)!important}:host a:active{background-color:var(--bg-cta-active-color);color:var(--font-color)!important}@media only screen and (min-width: 1024px){:host{width:448px}:host a{gap:16px;padding:0 16px}}\n"], dependencies: [{ kind: "directive", type: RdsiteLinkDirective, selector: "[rdsitelink]", inputs: ["anchorAdjustment", "anchorExtraAdjustment", "phonemodal"] }, { kind: "component", type: CuraIconComponent, selector: "cura-icon", inputs: ["name", "color", "size", "iconset", "disabled"] }] }); }
|
|
47
|
-
}
|
|
48
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.2", ngImport: i0, type: SideCtasBottomComponent, decorators: [{
|
|
49
|
-
type: Component,
|
|
50
|
-
args: [{ selector: 'rdsite-side-ctas-bottom', imports: [RdsiteLinkDirective, CuraIconComponent], template: "@if (ctas().length) {\r\n @for (cta of ctas(); track cta.text) {\r\n <a [href]=\"cta.url\" rdsitelink (click)=\"sideCtaBottomItemClicked($event)\">\r\n <cura-icon [name]=\"cta.icon\" size=\"20\" color=\"neutral-black\"></cura-icon>\r\n <span>{{ cta.text }}</span>\r\n </a>\r\n }\r\n}\r\n", styles: [":host{display:flex;width:100%;height:100%;gap:2px;background-color:var(--bg-color)}:host *{font-family:var(--font-family)}:host a{display:flex;align-items:center;justify-content:center;flex:1 1 0;gap:12px;padding:0 10px;background-color:var(--bg-cta-color);color:var(--font-color);transition:background-color .25s linear!important;text-decoration:none;font-weight:500}:host a span{color:var(--font-color)}:host a cura-icon{--color: var(--font-color) !important}:host a:hover{background-color:var(--bg-cta-hover-color);color:var(--font-color)!important}:host a:active{background-color:var(--bg-cta-active-color);color:var(--font-color)!important}@media only screen and (min-width: 1024px){:host{width:448px}:host a{gap:16px;padding:0 16px}}\n"] }]
|
|
51
|
-
}], propDecorators: { style: [{
|
|
52
|
-
type: HostBinding,
|
|
53
|
-
args: ['style']
|
|
54
|
-
}] } });
|
|
55
|
-
|
|
56
|
-
class SideCtasRightBottomComponent {
|
|
57
|
-
constructor() {
|
|
58
|
-
this.link = input('', ...(ngDevMode ? [{ debugName: "link" }] : []));
|
|
59
|
-
this.imgUrl = input('', ...(ngDevMode ? [{ debugName: "imgUrl" }] : []));
|
|
60
|
-
this.text = input('', ...(ngDevMode ? [{ debugName: "text" }] : []));
|
|
61
|
-
this.bgColor = input('#1DCD52', ...(ngDevMode ? [{ debugName: "bgColor" }] : []));
|
|
62
|
-
this.bgHover = input('#016720', ...(ngDevMode ? [{ debugName: "bgHover" }] : []));
|
|
63
|
-
this.borderTop = input(false, ...(ngDevMode ? [{ debugName: "borderTop" }] : []));
|
|
64
|
-
this.sideCtaRightBottomItemClick = output();
|
|
65
|
-
}
|
|
66
|
-
whatsappClicked(event) {
|
|
67
|
-
this.sideCtaRightBottomItemClick.emit(event);
|
|
68
|
-
}
|
|
69
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.2", ngImport: i0, type: SideCtasRightBottomComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
70
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.2", type: SideCtasRightBottomComponent, isStandalone: true, selector: "rdsite-side-ctas-right-bottom", inputs: { link: { classPropertyName: "link", publicName: "link", isSignal: true, isRequired: false, transformFunction: null }, imgUrl: { classPropertyName: "imgUrl", publicName: "imgUrl", isSignal: true, isRequired: false, transformFunction: null }, text: { classPropertyName: "text", publicName: "text", isSignal: true, isRequired: false, transformFunction: null }, bgColor: { classPropertyName: "bgColor", publicName: "bgColor", isSignal: true, isRequired: false, transformFunction: null }, bgHover: { classPropertyName: "bgHover", publicName: "bgHover", isSignal: true, isRequired: false, transformFunction: null }, borderTop: { classPropertyName: "borderTop", publicName: "borderTop", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { sideCtaRightBottomItemClick: "sideCtaRightBottomItemClick" }, ngImport: i0, template: "@if (link() && imgUrl()) {\r\n <rdsite-whatsapp\r\n [link]=\"link()\"\r\n [imgUrl]=\"imgUrl()\"\r\n [text]=\"text()\"\r\n [bgColor]=\"bgColor()\"\r\n [bgHover]=\"bgHover()\"\r\n [borderTop]=\"borderTop()\"\r\n (whatsappClick)=\"whatsappClicked($event)\"\r\n ></rdsite-whatsapp>\r\n}\r\n", styles: [""], dependencies: [{ kind: "component", type: WhatsappComponent, selector: "rdsite-whatsapp", inputs: ["link", "imgUrl", "text", "bgColor", "bgHover", "borderTop"], outputs: ["whatsappClick"] }] }); }
|
|
71
|
-
}
|
|
72
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.2", ngImport: i0, type: SideCtasRightBottomComponent, decorators: [{
|
|
73
|
-
type: Component,
|
|
74
|
-
args: [{ selector: 'rdsite-side-ctas-right-bottom', imports: [WhatsappComponent], template: "@if (link() && imgUrl()) {\r\n <rdsite-whatsapp\r\n [link]=\"link()\"\r\n [imgUrl]=\"imgUrl()\"\r\n [text]=\"text()\"\r\n [bgColor]=\"bgColor()\"\r\n [bgHover]=\"bgHover()\"\r\n [borderTop]=\"borderTop()\"\r\n (whatsappClick)=\"whatsappClicked($event)\"\r\n ></rdsite-whatsapp>\r\n}\r\n" }]
|
|
75
|
-
}] });
|
|
76
|
-
|
|
77
|
-
class SideCtasRightMiddleComponent {
|
|
78
|
-
constructor() {
|
|
79
|
-
this.curaApiService = inject(CuraApiService);
|
|
80
|
-
this.ctas = input([], ...(ngDevMode ? [{ debugName: "ctas" }] : []));
|
|
81
|
-
this.sideCtaRightMiddleItemClick = output();
|
|
82
|
-
this.style = {
|
|
83
|
-
'--font-family': this.curaApiService.theme.fonts.getFamily(''),
|
|
84
|
-
'--icon-bg-color': this.curaApiService.theme.colors.getColor('primary-base'),
|
|
85
|
-
'--font-color': this.curaApiService.theme.colors.getColor('primary-lighter'),
|
|
86
|
-
'--font-hover': this.curaApiService.theme.colors.getColor('neutral-white'),
|
|
87
|
-
'--font-active': this.curaApiService.theme.colors.getColor('primary-light'),
|
|
88
|
-
};
|
|
89
|
-
}
|
|
90
|
-
sideCtaRightMiddleItemClicked(event) {
|
|
91
|
-
this.sideCtaRightMiddleItemClick.emit(event);
|
|
92
|
-
}
|
|
93
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.2", ngImport: i0, type: SideCtasRightMiddleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
94
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.2", type: SideCtasRightMiddleComponent, isStandalone: true, selector: "rdsite-side-ctas-right-middle", inputs: { ctas: { classPropertyName: "ctas", publicName: "ctas", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { sideCtaRightMiddleItemClick: "sideCtaRightMiddleItemClick" }, host: { properties: { "style": "this.style" } }, ngImport: i0, template: "@if (ctas().length) {\r\n @for (cta of ctas(); track cta.text) {\r\n <a class=\"right-middle-cta\" [href]=\"cta.url\" rdsitelink (click)=\"sideCtaRightMiddleItemClicked($event)\">\r\n <div class=\"right-middle-cta-icon\">\r\n <cura-icon [name]=\"cta.icon\" size=\"24\" color=\"neutral-purewhite\"></cura-icon>\r\n </div>\r\n <span>{{ cta.text }}</span>\r\n </a>\r\n }\r\n}\r\n", styles: [":host{display:none;gap:16px;padding:0 8px}:host *{font-family:var(--font-family)}:host .right-middle-cta{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;text-decoration:none;font-weight:500}:host .right-middle-cta-icon{width:36px;height:36px;background-color:var(--icon-bg-color);border-radius:50%;display:flex;align-items:center;justify-content:center}:host .right-middle-cta span{text-align:center;color:var(--font-color);font-size:12px;line-height:135%;letter-spacing:.72px}:host .right-middle-cta:hover span{color:var(--font-hover)!important}:host .right-middle-cta:active span{color:var(--font-active)!important}@media only screen and (min-width: 1024px){:host{display:flex;flex-direction:column}}\n"], dependencies: [{ kind: "directive", type: RdsiteLinkDirective, selector: "[rdsitelink]", inputs: ["anchorAdjustment", "anchorExtraAdjustment", "phonemodal"] }, { kind: "component", type: CuraIconComponent, selector: "cura-icon", inputs: ["name", "color", "size", "iconset", "disabled"] }] }); }
|
|
95
|
-
}
|
|
96
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.2", ngImport: i0, type: SideCtasRightMiddleComponent, decorators: [{
|
|
97
|
-
type: Component,
|
|
98
|
-
args: [{ selector: 'rdsite-side-ctas-right-middle', imports: [RdsiteLinkDirective, CuraIconComponent], template: "@if (ctas().length) {\r\n @for (cta of ctas(); track cta.text) {\r\n <a class=\"right-middle-cta\" [href]=\"cta.url\" rdsitelink (click)=\"sideCtaRightMiddleItemClicked($event)\">\r\n <div class=\"right-middle-cta-icon\">\r\n <cura-icon [name]=\"cta.icon\" size=\"24\" color=\"neutral-purewhite\"></cura-icon>\r\n </div>\r\n <span>{{ cta.text }}</span>\r\n </a>\r\n }\r\n}\r\n", styles: [":host{display:none;gap:16px;padding:0 8px}:host *{font-family:var(--font-family)}:host .right-middle-cta{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;text-decoration:none;font-weight:500}:host .right-middle-cta-icon{width:36px;height:36px;background-color:var(--icon-bg-color);border-radius:50%;display:flex;align-items:center;justify-content:center}:host .right-middle-cta span{text-align:center;color:var(--font-color);font-size:12px;line-height:135%;letter-spacing:.72px}:host .right-middle-cta:hover span{color:var(--font-hover)!important}:host .right-middle-cta:active span{color:var(--font-active)!important}@media only screen and (min-width: 1024px){:host{display:flex;flex-direction:column}}\n"] }]
|
|
99
|
-
}], propDecorators: { style: [{
|
|
100
|
-
type: HostBinding,
|
|
101
|
-
args: ['style']
|
|
102
|
-
}] } });
|
|
103
|
-
|
|
104
|
-
class SideCtasRightTopComponent {
|
|
105
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.2", ngImport: i0, type: SideCtasRightTopComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
106
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.2", type: SideCtasRightTopComponent, isStandalone: true, selector: "rdsite-side-ctas-right-top", ngImport: i0, template: "<ng-content></ng-content>\r\n", styles: [":host{display:none}@media only screen and (min-width: 1024px){:host{display:block}}\n"] }); }
|
|
107
|
-
}
|
|
108
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.2", ngImport: i0, type: SideCtasRightTopComponent, decorators: [{
|
|
109
|
-
type: Component,
|
|
110
|
-
args: [{ selector: 'rdsite-side-ctas-right-top', imports: [], template: "<ng-content></ng-content>\r\n", styles: [":host{display:none}@media only screen and (min-width: 1024px){:host{display:block}}\n"] }]
|
|
111
|
-
}] });
|
|
112
|
-
|
|
113
|
-
/**
|
|
114
|
-
* Generated bundle index. Do not edit.
|
|
115
|
-
*/
|
|
116
|
-
|
|
117
|
-
export { SideCtasBottomComponent, SideCtasComponent, SideCtasRightBottomComponent, SideCtasRightMiddleComponent, SideCtasRightTopComponent };
|
|
118
|
-
//# sourceMappingURL=rededor-site-front-end-lib-components-side-ctas.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"rededor-site-front-end-lib-components-side-ctas.mjs","sources":["../../../projects/site-front-end-lib/components/side-ctas/side-ctas.component.ts","../../../projects/site-front-end-lib/components/side-ctas/side-ctas.component.html","../../../projects/site-front-end-lib/components/side-ctas/components/side-ctas-bottom/side-ctas-bottom.component.ts","../../../projects/site-front-end-lib/components/side-ctas/components/side-ctas-bottom/side-ctas-bottom.component.html","../../../projects/site-front-end-lib/components/side-ctas/components/side-ctas-right-bottom/side-ctas-right-bottom.component.ts","../../../projects/site-front-end-lib/components/side-ctas/components/side-ctas-right-bottom/side-ctas-right-bottom.component.html","../../../projects/site-front-end-lib/components/side-ctas/components/side-ctas-right-middle/side-ctas-right-middle.component.ts","../../../projects/site-front-end-lib/components/side-ctas/components/side-ctas-right-middle/side-ctas-right-middle.component.html","../../../projects/site-front-end-lib/components/side-ctas/components/side-ctas-right-top/side-ctas-right-top.component.ts","../../../projects/site-front-end-lib/components/side-ctas/components/side-ctas-right-top/side-ctas-right-top.component.html","../../../projects/site-front-end-lib/components/side-ctas/rededor-site-front-end-lib-components-side-ctas.ts"],"sourcesContent":["import { Component, HostBinding, inject } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { CuraApiService } from '@rededor/site-front-end-lib/cura/api';\r\n\r\n@Component({\r\n selector: 'rdsite-side-ctas',\r\n imports: [CommonModule],\r\n templateUrl: './side-ctas.component.html',\r\n styleUrl: './side-ctas.component.scss',\r\n})\r\nexport class SideCtasComponent {\r\n private curaApiService = inject(CuraApiService);\r\n\r\n @HostBinding('style') style = {\r\n '--color-right': this.curaApiService.theme.colors.getColor('primary-darker'),\r\n };\r\n}\r\n","<div\r\n class=\"rdsite-side-ctas-right\"\r\n [ngStyle]=\"{\r\n display: rightTop?.children?.length || rightMiddle?.children?.length || rightBottom?.children?.length ? 'flex' : 'none',\r\n }\"\r\n>\r\n <div #rightTop class=\"rdsite-side-ctas-right-top\">\r\n <ng-content select=\"rdsite-side-ctas-right-top\"></ng-content>\r\n </div>\r\n <div #rightMiddle class=\"rdsite-side-ctas-right-middle\">\r\n <ng-content select=\"rdsite-side-ctas-right-middle\"></ng-content>\r\n </div>\r\n <div #rightBottom class=\"rdsite-side-ctas-right-bottom\">\r\n <ng-content select=\"rdsite-side-ctas-right-bottom\"></ng-content>\r\n </div>\r\n</div>\r\n\r\n<div\r\n class=\"rdsite-side-ctas-bottom\"\r\n [ngStyle]=\"{\r\n display: bottom?.children?.length ? 'flex' : 'none',\r\n paddingRight: rightTop?.children?.length || rightMiddle?.children?.length || rightBottom?.children?.length ? '88px' : '0px',\r\n }\"\r\n>\r\n <div #bottom class=\"rdsite-side-ctas-bottom-container\">\r\n <ng-content select=\"rdsite-side-ctas-bottom\"></ng-content>\r\n </div>\r\n</div>\r\n","import { Component, HostBinding, output, inject, input } from '@angular/core';\r\nimport { RdsiteLinkDirective } from '@rededor/site-front-end-lib/core';\r\nimport { CuraApiService } from '@rededor/site-front-end-lib/cura/api';\r\nimport { SideCta } from '../../models/SideCta.model';\r\nimport { CuraIconComponent } from '@rededor/site-front-end-lib/cura/icons/cura-icon';\r\n\r\n@Component({\r\n selector: 'rdsite-side-ctas-bottom',\r\n imports: [RdsiteLinkDirective, CuraIconComponent],\r\n templateUrl: './side-ctas-bottom.component.html',\r\n styleUrl: './side-ctas-bottom.component.scss',\r\n})\r\nexport class SideCtasBottomComponent {\r\n private curaApiService = inject(CuraApiService);\r\n\r\n readonly ctas = input<SideCta[]>([]);\r\n readonly sideCtaBottomItemClick = output<Event>();\r\n\r\n @HostBinding('style') style = {\r\n '--font-family': this.curaApiService.theme.fonts.getFamily(''),\r\n '--font-color': this.curaApiService.theme.colors.getColor('neutral-black'),\r\n '--bg-color': this.curaApiService.theme.colors.getColor('primary-dark'),\r\n '--bg-cta-color': this.curaApiService.theme.colors.getColor('accent-base'),\r\n '--bg-cta-hover-color': this.curaApiService.theme.colors.getColor('accent-dark'),\r\n '--bg-cta-active-color': this.curaApiService.theme.colors.getColor('accent-darker'),\r\n };\r\n\r\n sideCtaBottomItemClicked(event: Event) {\r\n this.sideCtaBottomItemClick.emit(event);\r\n }\r\n}\r\n","@if (ctas().length) {\r\n @for (cta of ctas(); track cta.text) {\r\n <a [href]=\"cta.url\" rdsitelink (click)=\"sideCtaBottomItemClicked($event)\">\r\n <cura-icon [name]=\"cta.icon\" size=\"20\" color=\"neutral-black\"></cura-icon>\r\n <span>{{ cta.text }}</span>\r\n </a>\r\n }\r\n}\r\n","import { Component, input, output } from '@angular/core';\r\nimport { WhatsappComponent } from '@rededor/site-front-end-lib/components/whatsapp';\r\n\r\n@Component({\r\n selector: 'rdsite-side-ctas-right-bottom',\r\n imports: [WhatsappComponent],\r\n templateUrl: './side-ctas-right-bottom.component.html',\r\n styleUrl: './side-ctas-right-bottom.component.scss',\r\n})\r\nexport class SideCtasRightBottomComponent {\r\n readonly link = input<string>('');\r\n readonly imgUrl = input<string>('');\r\n readonly text = input<string>('');\r\n readonly bgColor = input<string>('#1DCD52');\r\n readonly bgHover = input<string>('#016720');\r\n readonly borderTop = input<boolean>(false);\r\n\r\n readonly sideCtaRightBottomItemClick = output<Event>();\r\n\r\n whatsappClicked(event: Event) {\r\n this.sideCtaRightBottomItemClick.emit(event);\r\n }\r\n}\r\n","@if (link() && imgUrl()) {\r\n <rdsite-whatsapp\r\n [link]=\"link()\"\r\n [imgUrl]=\"imgUrl()\"\r\n [text]=\"text()\"\r\n [bgColor]=\"bgColor()\"\r\n [bgHover]=\"bgHover()\"\r\n [borderTop]=\"borderTop()\"\r\n (whatsappClick)=\"whatsappClicked($event)\"\r\n ></rdsite-whatsapp>\r\n}\r\n","import { Component, HostBinding, output, inject, input } from '@angular/core';\r\nimport { RdsiteLinkDirective } from '@rededor/site-front-end-lib/core';\r\nimport { CuraApiService } from '@rededor/site-front-end-lib/cura/api';\r\nimport { SideCta } from '../../models/SideCta.model';\r\nimport { CuraIconComponent } from '@rededor/site-front-end-lib/cura/icons/cura-icon';\r\n\r\n@Component({\r\n selector: 'rdsite-side-ctas-right-middle',\r\n imports: [RdsiteLinkDirective, CuraIconComponent],\r\n templateUrl: './side-ctas-right-middle.component.html',\r\n styleUrl: './side-ctas-right-middle.component.scss',\r\n})\r\nexport class SideCtasRightMiddleComponent {\r\n private curaApiService = inject(CuraApiService);\r\n\r\n readonly ctas = input<SideCta[]>([]);\r\n readonly sideCtaRightMiddleItemClick = output<Event>();\r\n\r\n @HostBinding('style') style = {\r\n '--font-family': this.curaApiService.theme.fonts.getFamily(''),\r\n '--icon-bg-color': this.curaApiService.theme.colors.getColor('primary-base'),\r\n '--font-color': this.curaApiService.theme.colors.getColor('primary-lighter'),\r\n '--font-hover': this.curaApiService.theme.colors.getColor('neutral-white'),\r\n '--font-active': this.curaApiService.theme.colors.getColor('primary-light'),\r\n };\r\n\r\n sideCtaRightMiddleItemClicked(event: Event) {\r\n this.sideCtaRightMiddleItemClick.emit(event);\r\n }\r\n}\r\n","@if (ctas().length) {\r\n @for (cta of ctas(); track cta.text) {\r\n <a class=\"right-middle-cta\" [href]=\"cta.url\" rdsitelink (click)=\"sideCtaRightMiddleItemClicked($event)\">\r\n <div class=\"right-middle-cta-icon\">\r\n <cura-icon [name]=\"cta.icon\" size=\"24\" color=\"neutral-purewhite\"></cura-icon>\r\n </div>\r\n <span>{{ cta.text }}</span>\r\n </a>\r\n }\r\n}\r\n","import { Component } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'rdsite-side-ctas-right-top',\r\n imports: [],\r\n templateUrl: './side-ctas-right-top.component.html',\r\n styleUrl: './side-ctas-right-top.component.scss',\r\n})\r\nexport class SideCtasRightTopComponent {}\r\n","<ng-content></ng-content>\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;MAUa,iBAAiB,CAAA;AAN9B,IAAA,WAAA,GAAA;AAOU,QAAA,IAAA,CAAA,cAAc,GAAG,MAAM,CAAC,cAAc,CAAC;AAEzB,QAAA,IAAA,CAAA,KAAK,GAAG;AAC5B,YAAA,eAAe,EAAE,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,gBAAgB,CAAC;SAC7E;AACF,IAAA;8GANY,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;kGAAjB,iBAAiB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,kBAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,OAAA,EAAA,YAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECV9B,ikCA4BA,EAAA,MAAA,EAAA,CAAA,syBAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,I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EJb;;AAEG;;;;"}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, input, output, HostBinding, Component } from '@angular/core';
|
|
3
|
-
import * as i1 from '@angular/common';
|
|
4
|
-
import { CommonModule } from '@angular/common';
|
|
5
|
-
import { RdsiteLinkDirective } from '@rededor/site-front-end-lib/core';
|
|
6
|
-
import { CuraApiService } from '@rededor/site-front-end-lib/cura/api';
|
|
7
|
-
import { CuraIconComponent } from '@rededor/site-front-end-lib/cura/icons/cura-icon';
|
|
8
|
-
|
|
9
|
-
class WhatsappComponent {
|
|
10
|
-
constructor() {
|
|
11
|
-
this.curaApiService = inject(CuraApiService);
|
|
12
|
-
this.link = input('', ...(ngDevMode ? [{ debugName: "link" }] : []));
|
|
13
|
-
this.imgUrl = input('', ...(ngDevMode ? [{ debugName: "imgUrl" }] : []));
|
|
14
|
-
this.text = input('Agende por Whatsapp', ...(ngDevMode ? [{ debugName: "text" }] : []));
|
|
15
|
-
this.bgColor = input('#1DCD52', ...(ngDevMode ? [{ debugName: "bgColor" }] : []));
|
|
16
|
-
this.bgHover = input('#016720', ...(ngDevMode ? [{ debugName: "bgHover" }] : []));
|
|
17
|
-
this.borderTop = input(false, ...(ngDevMode ? [{ debugName: "borderTop" }] : []));
|
|
18
|
-
this.whatsappClick = output();
|
|
19
|
-
this.active = false;
|
|
20
|
-
this.style = {
|
|
21
|
-
'--font-family': this.curaApiService.theme.fonts.getFamily(''),
|
|
22
|
-
'--border-top-color': this.curaApiService.theme.colors.getColor('primary-light'),
|
|
23
|
-
'--bg-color': this.curaApiService.theme.colors.getColor('primary-darker'),
|
|
24
|
-
'--bg-button': this.bgColor(),
|
|
25
|
-
'--bg-button-hover': this.bgHover(),
|
|
26
|
-
'--color-button': this.curaApiService.theme.colors.getColor('neutral-black'),
|
|
27
|
-
'--color-button-hover': this.curaApiService.theme.colors.getColor('neutral-white'),
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
whatsappClicked(event) {
|
|
31
|
-
this.whatsappClick.emit(event);
|
|
32
|
-
}
|
|
33
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.2", ngImport: i0, type: WhatsappComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
34
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.2", type: WhatsappComponent, isStandalone: true, selector: "rdsite-whatsapp", inputs: { link: { classPropertyName: "link", publicName: "link", isSignal: true, isRequired: false, transformFunction: null }, imgUrl: { classPropertyName: "imgUrl", publicName: "imgUrl", isSignal: true, isRequired: false, transformFunction: null }, text: { classPropertyName: "text", publicName: "text", isSignal: true, isRequired: false, transformFunction: null }, bgColor: { classPropertyName: "bgColor", publicName: "bgColor", isSignal: true, isRequired: false, transformFunction: null }, bgHover: { classPropertyName: "bgHover", publicName: "bgHover", isSignal: true, isRequired: false, transformFunction: null }, borderTop: { classPropertyName: "borderTop", publicName: "borderTop", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { whatsappClick: "whatsappClick" }, host: { properties: { "style": "this.style" } }, ngImport: i0, template: "@if (link()) {\r\n <a\r\n class=\"rdsite-whatsapp\"\r\n [ngClass]=\"{ 'border-top': borderTop() }\"\r\n [href]=\"link()\"\r\n rdsitelink\r\n (mouseenter)=\"active = true\"\r\n (mouseleave)=\"active = false\"\r\n (click)=\"whatsappClicked($event)\"\r\n >\r\n @if (imgUrl()) {\r\n <div class=\"image\" [ngStyle]=\"{ 'background-image': imgUrl() }\"></div>\r\n }\r\n <div class=\"icon\" [ngClass]=\"{ active: active }\">\r\n <cura-icon name=\"whatsapp\" size=\"16\" color=\"neutral-purewhite\"></cura-icon>\r\n </div>\r\n\r\n <div class=\"rdsite-whatsapp-animation\" [ngClass]=\"{ active: active }\">\r\n <cura-icon name=\"whatsapp\" size=\"16\" color=\"neutral-purewhite\"></cura-icon>\r\n <span>{{ text() }}</span>\r\n </div>\r\n </a>\r\n}\r\n", styles: [":host{display:flex;justify-content:flex-end;width:536px;position:absolute;bottom:0;right:0;pointer-events:none}:host *{font-family:var(--font-family)}:host a.rdsite-whatsapp{box-sizing:content-box;display:block;position:relative;width:88px;height:88px;transition:background-color .25s linear!important;pointer-events:all;background-color:var(--bg-color)}:host a.rdsite-whatsapp .image{position:absolute;right:0;bottom:0;width:88px;height:88px;background-size:cover;background-position:50%}:host a.rdsite-whatsapp .icon{width:24px;height:24px;background-color:var(--bg-button);border-radius:50%;display:flex;align-items:center;justify-content:center;position:absolute;bottom:8px;right:8px}:host a.rdsite-whatsapp .icon.active{display:none}:host .rdsite-whatsapp-animation{background-color:var(--bg-button);width:0px;height:88px;position:absolute;bottom:0;right:88px;transition:width .5s ease-out,background-color .25s linear;overflow:hidden;display:flex;align-items:center;justify-content:center;gap:16px;color:var(--color-button)}:host .rdsite-whatsapp-animation cura-icon{--color: var(--color-button) !important}:host .rdsite-whatsapp-animation span{text-wrap:nowrap}:host .rdsite-whatsapp-animation.active{width:calc(100vw - 88px);pointer-events:all}:host .rdsite-whatsapp-animation:hover{background-color:var(--bg-button-hover);color:var(--color-button-hover)}:host .rdsite-whatsapp-animation:hover cura-icon{--color: var(--color-button-hover) !important}@media only screen and (min-width: 1024px){:host a.rdsite-whatsapp.border-top{border-top:4px solid var(--border-top-color)}:host a.rdsite-whatsapp .rdsite-whatsapp-animation.active{width:448px}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: RdsiteLinkDirective, selector: "[rdsitelink]", inputs: ["anchorAdjustment", "anchorExtraAdjustment", "phonemodal"] }, { kind: "component", type: CuraIconComponent, selector: "cura-icon", inputs: ["name", "color", "size", "iconset", "disabled"] }] }); }
|
|
35
|
-
}
|
|
36
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.2", ngImport: i0, type: WhatsappComponent, decorators: [{
|
|
37
|
-
type: Component,
|
|
38
|
-
args: [{ selector: 'rdsite-whatsapp', imports: [CommonModule, RdsiteLinkDirective, CuraIconComponent], template: "@if (link()) {\r\n <a\r\n class=\"rdsite-whatsapp\"\r\n [ngClass]=\"{ 'border-top': borderTop() }\"\r\n [href]=\"link()\"\r\n rdsitelink\r\n (mouseenter)=\"active = true\"\r\n (mouseleave)=\"active = false\"\r\n (click)=\"whatsappClicked($event)\"\r\n >\r\n @if (imgUrl()) {\r\n <div class=\"image\" [ngStyle]=\"{ 'background-image': imgUrl() }\"></div>\r\n }\r\n <div class=\"icon\" [ngClass]=\"{ active: active }\">\r\n <cura-icon name=\"whatsapp\" size=\"16\" color=\"neutral-purewhite\"></cura-icon>\r\n </div>\r\n\r\n <div class=\"rdsite-whatsapp-animation\" [ngClass]=\"{ active: active }\">\r\n <cura-icon name=\"whatsapp\" size=\"16\" color=\"neutral-purewhite\"></cura-icon>\r\n <span>{{ text() }}</span>\r\n </div>\r\n </a>\r\n}\r\n", styles: [":host{display:flex;justify-content:flex-end;width:536px;position:absolute;bottom:0;right:0;pointer-events:none}:host *{font-family:var(--font-family)}:host a.rdsite-whatsapp{box-sizing:content-box;display:block;position:relative;width:88px;height:88px;transition:background-color .25s linear!important;pointer-events:all;background-color:var(--bg-color)}:host a.rdsite-whatsapp .image{position:absolute;right:0;bottom:0;width:88px;height:88px;background-size:cover;background-position:50%}:host a.rdsite-whatsapp .icon{width:24px;height:24px;background-color:var(--bg-button);border-radius:50%;display:flex;align-items:center;justify-content:center;position:absolute;bottom:8px;right:8px}:host a.rdsite-whatsapp .icon.active{display:none}:host .rdsite-whatsapp-animation{background-color:var(--bg-button);width:0px;height:88px;position:absolute;bottom:0;right:88px;transition:width .5s ease-out,background-color .25s linear;overflow:hidden;display:flex;align-items:center;justify-content:center;gap:16px;color:var(--color-button)}:host .rdsite-whatsapp-animation cura-icon{--color: var(--color-button) !important}:host .rdsite-whatsapp-animation span{text-wrap:nowrap}:host .rdsite-whatsapp-animation.active{width:calc(100vw - 88px);pointer-events:all}:host .rdsite-whatsapp-animation:hover{background-color:var(--bg-button-hover);color:var(--color-button-hover)}:host .rdsite-whatsapp-animation:hover cura-icon{--color: var(--color-button-hover) !important}@media only screen and (min-width: 1024px){:host a.rdsite-whatsapp.border-top{border-top:4px solid var(--border-top-color)}:host a.rdsite-whatsapp .rdsite-whatsapp-animation.active{width:448px}}\n"] }]
|
|
39
|
-
}], propDecorators: { style: [{
|
|
40
|
-
type: HostBinding,
|
|
41
|
-
args: ['style']
|
|
42
|
-
}] } });
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* Generated bundle index. Do not edit.
|
|
46
|
-
*/
|
|
47
|
-
|
|
48
|
-
export { WhatsappComponent };
|
|
49
|
-
//# sourceMappingURL=rededor-site-front-end-lib-components-whatsapp.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"rededor-site-front-end-lib-components-whatsapp.mjs","sources":["../../../projects/site-front-end-lib/components/whatsapp/whatsapp.component.ts","../../../projects/site-front-end-lib/components/whatsapp/whatsapp.component.html","../../../projects/site-front-end-lib/components/whatsapp/rededor-site-front-end-lib-components-whatsapp.ts"],"sourcesContent":["import { Component, HostBinding, input, output, inject } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { RdsiteLinkDirective } from '@rededor/site-front-end-lib/core';\r\nimport { CuraApiService } from '@rededor/site-front-end-lib/cura/api';\r\nimport { CuraIconComponent } from '@rededor/site-front-end-lib/cura/icons/cura-icon';\r\n\r\n@Component({\r\n selector: 'rdsite-whatsapp',\r\n imports: [CommonModule, RdsiteLinkDirective, CuraIconComponent],\r\n templateUrl: './whatsapp.component.html',\r\n styleUrl: './whatsapp.component.scss',\r\n})\r\nexport class WhatsappComponent {\r\n private curaApiService = inject(CuraApiService);\r\n\r\n readonly link = input<string>('');\r\n readonly imgUrl = input<string>('');\r\n readonly text = input<string>('Agende por Whatsapp');\r\n readonly bgColor = input<string>('#1DCD52');\r\n readonly bgHover = input<string>('#016720');\r\n readonly borderTop = input<boolean>(false);\r\n\r\n readonly whatsappClick = output<Event>();\r\n\r\n active: boolean = false;\r\n\r\n @HostBinding('style') style = {\r\n '--font-family': this.curaApiService.theme.fonts.getFamily(''),\r\n '--border-top-color': this.curaApiService.theme.colors.getColor('primary-light'),\r\n '--bg-color': this.curaApiService.theme.colors.getColor('primary-darker'),\r\n '--bg-button': this.bgColor(),\r\n '--bg-button-hover': this.bgHover(),\r\n '--color-button': this.curaApiService.theme.colors.getColor('neutral-black'),\r\n '--color-button-hover': this.curaApiService.theme.colors.getColor('neutral-white'),\r\n };\r\n\r\n whatsappClicked(event: Event) {\r\n this.whatsappClick.emit(event);\r\n }\r\n}\r\n","@if (link()) {\r\n <a\r\n class=\"rdsite-whatsapp\"\r\n [ngClass]=\"{ 'border-top': borderTop() }\"\r\n [href]=\"link()\"\r\n rdsitelink\r\n (mouseenter)=\"active = true\"\r\n (mouseleave)=\"active = false\"\r\n (click)=\"whatsappClicked($event)\"\r\n >\r\n @if (imgUrl()) {\r\n <div class=\"image\" [ngStyle]=\"{ 'background-image': imgUrl() }\"></div>\r\n }\r\n <div class=\"icon\" [ngClass]=\"{ active: active }\">\r\n <cura-icon name=\"whatsapp\" size=\"16\" color=\"neutral-purewhite\"></cura-icon>\r\n </div>\r\n\r\n <div class=\"rdsite-whatsapp-animation\" [ngClass]=\"{ active: active }\">\r\n <cura-icon name=\"whatsapp\" size=\"16\" color=\"neutral-purewhite\"></cura-icon>\r\n <span>{{ text() }}</span>\r\n </div>\r\n </a>\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;MAYa,iBAAiB,CAAA;AAN9B,IAAA,WAAA,GAAA;AAOU,QAAA,IAAA,CAAA,cAAc,GAAG,MAAM,CAAC,cAAc,CAAC;AAEtC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