@biggive/components 202606300841.0.0 → 202606301318.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/dist/biggive/biggive.esm.js +1 -1
- package/dist/biggive/p-12e780cb.entry.js +1 -0
- package/dist/cjs/biggive-campaign-card-filter-grid.cjs.entry.js +4 -4
- package/dist/collection/components/biggive-campaign-card-filter-grid/biggive-campaign-card-filter-grid.js +4 -4
- package/dist/components/biggive-campaign-card-filter-grid.js +1 -1
- package/dist/esm/biggive-campaign-card-filter-grid.entry.js +4 -4
- package/hydrate/index.js +4 -4
- package/hydrate/index.mjs +4 -4
- package/package.json +1 -1
- package/dist/biggive/p-8c4c51d6.entry.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,H as o,b as t}from"./p-bbqW3pni.js";export{s as setNonce}from"./p-bbqW3pni.js";import{g as l}from"./p-DQuL1Twl.js";var r=e=>{const o=e.cloneNode;e.cloneNode=function(e){if("TEMPLATE"===this.nodeName)return o.call(this,e);const t=o.call(this,!1),l=this.childNodes;if(e)for(let e=0;e<l.length;e++)2!==l[e].nodeType&&t.appendChild(l[e].cloneNode(!0));return t}};(()=>{r(o.prototype);const t=import.meta.url,l={};return""!==t&&(l.resourcesUrl=new URL(".",t).href),e(l)})().then((async e=>(await l(),t(JSON.parse('[["p-07bd58dd",[[1,"biggive-campaign-card",{"spaceBelow":[2,"space-below"],"campaignType":[1,"campaign-type"],"banner":[1],"campaignTitle":[1,"campaign-title"],"organisationName":[1,"organisation-name"],"primaryFigureLabel":[1,"primary-figure-label"],"primaryFigureAmount":[1,"primary-figure-amount"],"secondaryFigureLabel":[1,"secondary-figure-label"],"secondaryFigureAmount":[1,"secondary-figure-amount"],"progressBarCounter":[2,"progress-bar-counter"],"donateButtonLabel":[1,"donate-button-label"],"donateButtonUrl":[1,"donate-button-url"],"donateButtonColourScheme":[1,"donate-button-colour-scheme"],"moreInfoButtonLabel":[1,"more-info-button-label"],"moreInfoButtonUrl":[1,"more-info-button-url"],"moreInfoButtonColourScheme":[1,"more-info-button-colour-scheme"],"isFutureCampaign":[4,"is-future-campaign"],"isPastCampaign":[4,"is-past-campaign"],"datetime":[1]}]]],["p-8c4c51d6",[[257,"biggive-campaign-card-filter-grid",{"spaceBelow":[2,"space-below"],"intro":[1],"searchText":[1,"search-text"],"placeholderText":[1,"placeholder-text"],"buttonText":[1,"button-text"],"categoryOptions":[1,"category-options"],"beneficiaryOptions":[1,"beneficiary-options"],"locationOptions":[1,"location-options"],"selectedSortByOption":[1025,"selected-sort-by-option"],"selectedFilterCategory":[1025,"selected-filter-category"],"selectedFilterBeneficiary":[1025,"selected-filter-beneficiary"],"selectedFilterLocation":[1025,"selected-filter-location"],"enableSearchByLocation":[4,"enable-search-by-location"],"offerNearMeOption":[4,"offer-near-me-option"],"fetchingLocation":[4,"fetching-location"],"location":[16],"filtersApplied":[32],"unfocusInputs":[64]}]]],["p-79233862",[[1,"biggive-campaign-highlights",{"spaceBelow":[2,"space-below"],"banner":[1],"campaignTitle":[1,"campaign-title"],"primaryFigureLabel":[1,"primary-figure-label"],"primaryFigureAmount":[1,"primary-figure-amount"],"secondaryFigureLabel":[1,"secondary-figure-label"],"secondaryFigureAmount":[1,"secondary-figure-amount"],"progressBarCounter":[2,"progress-bar-counter"],"primaryStatIcon":[1,"primary-stat-icon"],"primaryStatText":[1,"primary-stat-text"],"secondaryStatIcon":[1,"secondary-stat-icon"],"secondaryStatText":[1,"secondary-stat-text"],"championName":[1,"champion-name"],"championUrl":[1,"champion-url"]}]]],["p-a987b466",[[1,"biggive-cookie-banner",{"autoOpenPreferences":[4,"auto-open-preferences"],"blogUriPrefix":[1,"blog-uri-prefix"],"previouslyAgreedCookiePreferences":[16]},null,{"autoOpenPreferences":[{"autoOpenPreferencesIfRequested":0}]}]]],["p-396992d5",[[257,"biggive-footer",{"headingLevel":[2,"heading-level"],"donateUrlPrefix":[1,"donate-url-prefix"],"blogUrlPrefix":[1,"blog-url-prefix"],"experienceUrlPrefix":[1,"experience-url-prefix"],"smallCharityWeekEnabled":[4,"small-charity-week-enabled"],"usePresetFooter":[4,"use-preset-footer"]}]]],["p-c50881e4",[[1,"biggive-main-menu",{"blogUrlPrefix":[1,"blog-url-prefix"],"donateUrlPrefix":[1,"donate-url-prefix"],"experienceUrlPrefix":[1,"experience-url-prefix"],"smallCharityWeekEnabled":[4,"small-charity-week-enabled"],"someCampaignHasHomePageRedirect":[4,"some-campaign-has-home-page-redirect"],"isLoggedIn":[4,"is-logged-in"],"closeMobileMenuFromOutside":[64]}]]],["p-53d2459c",[[1,"philco-main-menu",{"philcoUrlPrefix":[1,"philco-url-prefix"],"closeMobileMenuFromOutside":[64]}]]],["p-fb0a9e11",[[1,"biggive-article-card",{"spaceBelow":[2,"space-below"],"backgroundColour":[1,"background-colour"],"backgroundImageUrl":[1,"background-image-url"],"slug":[1],"slugColour":[1,"slug-colour"],"date":[1],"dateColour":[1,"date-colour"],"mainTitle":[1,"main-title"],"mainTitleColour":[1,"main-title-colour"],"mainImageUrl":[1,"main-image-url"],"mainImageAltText":[1,"main-image-alt-text"],"image1Url":[1,"image-1-url"],"image1AltText":[1,"image-1-alt-text"],"image2Url":[1,"image-2-url"],"image2AltText":[1,"image-2-alt-text"],"imageLabel":[1,"image-label"],"imageLabelColour":[1,"image-label-colour"],"buttonLabel":[1,"button-label"],"buttonUrl":[1,"button-url"],"buttonColour":[1,"button-colour"],"clipBottomLeftCorner":[4,"clip-bottom-left-corner"],"clipTopRightCorner":[4,"clip-top-right-corner"]}]]],["p-dddee0ad",[[1,"biggive-basic-card",{"spaceBelow":[2,"space-below"],"siteDesign":[1,"site-design"],"backgroundColour":[1,"background-colour"],"backgroundImageUrl":[1,"background-image-url"],"cardColour":[1,"card-colour"],"textColour":[1,"text-colour"],"mainImageUrl":[1,"main-image-url"],"mainImageAltText":[1,"main-image-alt-text"],"mainTitle":[1,"main-title"],"subtitle":[1],"author":[1],"date":[1],"teaser":[1],"icon":[4],"iconColour":[1,"icon-colour"],"buttonAlign":[1,"button-align"],"buttonStyle":[1,"button-style"],"buttonLabel":[1,"button-label"],"buttonUrl":[1,"button-url"],"buttonColourScheme":[1,"button-colour-scheme"],"clipBottomLeftCorner":[4,"clip-bottom-left-corner"],"clipTopRightCorner":[4,"clip-top-right-corner"],"headingLevel":[2,"heading-level"],"addAnimation":[4,"add-animation"]}]]],["p-ed92d2b0",[[1,"biggive-call-to-action",{"spaceAbove":[2,"space-above"],"spaceBelow":[2,"space-below"],"defaultTextColour":[1,"default-text-colour"],"slugSize":[2,"slug-size"],"slugColour":[1,"slug-colour"],"slug":[1],"mainTitleColour":[1,"main-title-colour"],"mainTitleSize":[2,"main-title-size"],"mainTitle":[1,"main-title"],"subtitleSize":[2,"subtitle-size"],"subtitleColour":[1,"subtitle-colour"],"subtitle":[1],"teaserColour":[1,"teaser-colour"],"teaser":[1],"primaryButtonUrl":[1,"primary-button-url"],"primaryButtonLabel":[1,"primary-button-label"],"primaryButtonColourScheme":[1,"primary-button-colour-scheme"],"secondaryButtonUrl":[1,"secondary-button-url"],"secondaryButtonLabel":[1,"secondary-button-label"],"secondaryButtonColourScheme":[1,"secondary-button-colour-scheme"]}]]],["p-ed7b04d2",[[1,"biggive-hero-image",{"spaceBelow":[2,"space-below"],"colourScheme":[1,"colour-scheme"],"slug":[1],"slugColour":[1,"slug-colour"],"logo":[1],"logoHeight":[2,"logo-height"],"logoAltText":[1,"logo-alt-text"],"mainImage":[1,"main-image"],"mainImageShape":[1,"main-image-shape"],"mainImageAlignHorizontal":[1,"main-image-align-horizontal"],"mainImageAlignVertical":[1,"main-image-align-vertical"],"mainTitle":[1,"main-title"],"mainTitleColour":[1,"main-title-colour"],"teaser":[1],"teaserColour":[1,"teaser-colour"],"buttonUrl":[1,"button-url"],"buttonLabel":[1,"button-label"],"buttonColourScheme":[1,"button-colour-scheme"]}]]],["p-167ac0d3",[[1,"biggive-icon-button",{"spaceBelow":[2,"space-below"],"backgroundColour":[1,"background-colour"],"backgroundPadding":[2,"background-padding"],"text":[1],"textColour":[1,"text-colour"],"icon":[1],"url":[1],"openInNewTab":[4,"open-in-new-tab"],"size":[1],"arrow":[4],"arrowColour":[1,"arrow-colour"],"circle":[4],"shadow":[4],"centered":[4],"rounded":[4],"buttonId":[1,"button-id"]}]]],["p-f04eaebb",[[1,"biggive-image-card",{"spaceBelow":[2,"space-below"],"backgroundColour":[1,"background-colour"],"mainImageUrl":[1,"main-image-url"],"mainImageAltText":[1,"main-image-alt-text"],"textAlign":[1,"text-align"],"teaser":[1],"teaserColour":[1,"teaser-colour"],"buttonAlign":[1,"button-align"],"buttonStyle":[1,"button-style"],"buttonLabel":[1,"button-label"],"buttonUrl":[1,"button-url"],"buttonColourScheme":[1,"button-colour-scheme"],"clipBottomLeftCorner":[4,"clip-bottom-left-corner"],"clipTopRightCorner":[4,"clip-top-right-corner"],"addAnimation":[4,"add-animation"]}]]],["p-d277fe34",[[1,"biggive-image-feature",{"spaceBelow":[2,"space-below"],"defaultTextColour":[1,"default-text-colour"],"imageUrl":[1,"image-url"],"imageAltText":[1,"image-alt-text"],"slug":[1],"slugColour":[1,"slug-colour"],"mainTitle":[1,"main-title"],"mainTitleColour":[1,"main-title-colour"],"teaser":[1],"teaserColour":[1,"teaser-colour"],"buttonUrl":[1,"button-url"],"buttonLabel":[1,"button-label"],"buttonColourScheme":[1,"button-colour-scheme"]}]]],["p-d2c312e0",[[1,"biggive-video-feature",{"spaceAbove":[2,"space-above"],"spaceBelow":[2,"space-below"],"defaultTextColour":[1,"default-text-colour"],"videoUrl":[1,"video-url"],"slug":[1],"slugColour":[1,"slug-colour"],"mainTitle":[1,"main-title"],"mainTitleColour":[1,"main-title-colour"],"teaser":[1],"teaserColour":[1,"teaser-colour"],"buttonUrl":[1,"button-url"],"buttonLabel":[1,"button-label"],"buttonColourScheme":[1,"button-colour-scheme"]}]]],["p-6f0ab7de",[[1,"biggive-accordion",{"spaceBelow":[2,"space-below"],"textColour":[1,"text-colour"],"headingColour":[1,"heading-colour"],"children":[32]}]]],["p-bc64b9af",[[1,"biggive-accordion-entry",{"heading":[1]}]]],["p-2f0e2375",[[1,"biggive-back-to-top"]]],["p-8a0061ce",[[1,"biggive-biography-card",{"spaceBelow":[2,"space-below"],"borderWidth":[2,"border-width"],"imageUrl":[1,"image-url"],"imageStyle":[1,"image-style"],"textColour":[1,"text-colour"],"backgroundColour":[1,"background-colour"],"fullName":[1,"full-name"],"jobTitle":[1,"job-title"],"textAlign":[1,"text-align"],"ratio":[1],"circle":[4],"circleColour":[1,"circle-colour"],"rounded":[4],"url":[1]}]]],["p-13840401",[[257,"biggive-boxed-content",{"spaceBelow":[2,"space-below"],"verticalPadding":[2,"vertical-padding"],"horizontalPadding":[2,"horizontal-padding"],"backgroundColour":[1,"background-colour"],"shadow":[4]}]]],["p-53efa890",[[1,"biggive-branded-image",{"spaceBelow":[2,"space-below"],"imageUrl":[1,"image-url"],"imageHeightPercent":[2,"image-height-percent"],"imageAlt":[1,"image-alt"],"logoUrl":[1,"logo-url"],"slug":[1],"charityName":[1,"charity-name"],"charityLocation":[1,"charity-location"],"charityUrl":[1,"charity-url"]}]]],["p-342e0587",[[257,"biggive-container-card",{"spaceBelow":[2,"space-below"],"backgroundColour":[1,"background-colour"],"backgroundImageUrl":[1,"background-image-url"],"cardColour":[1,"card-colour"],"textColour":[1,"text-colour"],"clipBottomLeftCorner":[4,"clip-bottom-left-corner"],"clipTopRightCorner":[4,"clip-top-right-corner"],"headingLevel":[2,"heading-level"]}]]],["p-d4462885",[[257,"biggive-form"]]],["p-b00c2ca8",[[257,"biggive-formatted-text",{"spaceBelow":[2,"space-below"],"defaultTextColour":[1,"default-text-colour"],"maxWidth":[2,"max-width"],"siteDesign":[1,"site-design"]}]]],["p-486b0443",[[257,"biggive-grid",{"spaceBelow":[2,"space-below"],"columnCount":[2,"column-count"],"spaceBetween":[4,"space-between"],"columnGap":[2,"column-gap"]}]]],["p-ebdf0f2a",[[1,"biggive-heading",{"spaceAbove":[2,"space-above"],"spaceBelow":[2,"space-below"],"colour":[1],"htmlElement":[1,"html-element"],"size":[2],"align":[1],"text":[1],"icon":[4],"iconColour":[1,"icon-colour"],"siteDesign":[1,"site-design"]}]]],["p-22f2e1e4",[[1,"biggive-heading-banner",{"targetUrl":[1,"target-url"],"logo":[1],"slug":[1],"mainTitle":[1,"main-title"],"mainImageUrl":[1,"main-image-url"],"focalPoint":[1,"focal-point"],"teaser":[1],"backgroundColour":[1,"background-colour"],"textBackgroundColour":[1,"text-background-colour"],"slugColour":[1,"slug-colour"],"mainTitleColour":[1,"main-title-colour"],"teaserColour":[1,"teaser-colour"],"height":[1]}]]],["p-7b142f0c",[[1,"biggive-image",{"spaceAbove":[2,"space-above"],"spaceBelow":[2,"space-below"],"imageUrl":[1,"image-url"],"imageAltText":[1,"image-alt-text"],"width":[2],"height":[2],"sizeUnit":[1,"size-unit"]}]]],["p-f2f9ce31",[[1,"biggive-image-button",{"spaceBelow":[2,"space-below"],"backgroundColour":[1,"background-colour"],"backgroundPadding":[2,"background-padding"],"text":[1],"textColour":[1,"text-colour"],"imageUrl":[1,"image-url"],"imageStyle":[1,"image-style"],"url":[1],"openInNewTab":[4,"open-in-new-tab"],"size":[1],"arrow":[4],"arrowColour":[1,"arrow-colour"],"circle":[4],"shadow":[4],"centered":[4],"rounded":[4],"buttonId":[1,"button-id"]}]]],["p-925b1eab",[[257,"biggive-nav-group",{"inline":[4]}]]],["p-ac53a19e",[[257,"biggive-nav-item",{"url":[1],"label":[1],"iconColour":[1,"icon-colour"]}]]],["p-b09d4083",[[257,"biggive-page-column"]]],["p-b5de3f93",[[257,"biggive-page-columns",{"spaceBelow":[2,"space-below"]}]]],["p-e8517ccd",[[257,"biggive-page-section",{"spaceBelow":[2,"space-below"],"sectionStyleTop":[1,"section-style-top"],"sectionStyleBottom":[1,"section-style-bottom"],"colourScheme":[1,"colour-scheme"],"maxWidth":[2,"max-width"],"primaryFullBleed":[4,"primary-full-bleed"]}]]],["p-08c0d7a0",[[1,"biggive-quote",{"spaceBelow":[2,"space-below"],"defaultTextColour":[1,"default-text-colour"],"quote":[1],"attribution":[1],"quoteIconColour":[1,"quote-icon-colour"],"siteDesign":[1,"site-design"]}]]],["p-7e9f3522",[[257,"biggive-sheet",{"sheetId":[1,"sheet-id"],"backgroundColour":[1,"background-colour"],"textColour":[1,"text-colour"]}]]],["p-63bbe726",[[257,"biggive-tab",{"tabTitle":[1,"tab-title"]}]]],["p-034bc308",[[257,"biggive-tabbed-content",{"spaceBelow":[2,"space-below"],"textColour":[1,"text-colour"],"selectedTextColour":[1,"selected-text-colour"],"navigationHighlightColour":[1,"navigation-highlight-colour"],"selectedNavigationHighlightColour":[1,"selected-navigation-highlight-colour"],"buttonBackgroundColour":[1,"button-background-colour"],"buttonIconColour":[1,"button-icon-colour"]}]]],["p-f2d44bb0",[[257,"biggive-table",{"spaceBelow":[2,"space-below"],"headerTextColour":[1,"header-text-colour"],"headerBackgroundColour":[1,"header-background-colour"],"bodyTextColour":[1,"body-text-colour"],"bodyBackgroundColour":[1,"body-background-colour"]}]]],["p-6db0805c",[[257,"biggive-text-input",{"currency":[1],"spaceBelow":[2,"space-below"],"selectStyle":[1,"select-style"],"siteDesign":[1,"site-design"]}]]],["p-074c95a5",[[1,"biggive-timeline",{"spaceBelow":[2,"space-below"],"textColour":[1,"text-colour"],"selectedTextColour":[1,"selected-text-colour"],"navigationHighlightColour":[1,"navigation-highlight-colour"],"selectedNavigationHighlightColour":[1,"selected-navigation-highlight-colour"],"buttonBackgroundColour":[1,"button-background-colour"],"buttonIconColour":[1,"button-icon-colour"],"entryBackgroundColour":[1,"entry-background-colour"],"entryHighlightColour":[1,"entry-highlight-colour"],"entryDateColour":[1,"entry-date-colour"],"entryTitleColour":[1,"entry-title-colour"],"entryTextColour":[1,"entry-text-colour"]}]]],["p-0e789e36",[[1,"biggive-timeline-entry",{"date":[1],"heading":[1]}]]],["p-d3112cb1",[[257,"biggive-totalizer",{"spaceBelow":[2,"space-below"],"primaryColour":[1,"primary-colour"],"primaryTextColour":[1,"primary-text-colour"],"secondaryColour":[1,"secondary-colour"],"secondaryTextColour":[1,"secondary-text-colour"],"mainMessage":[1,"main-message"]}]]],["p-b0d1c784",[[1,"biggive-totalizer-ticker-item",{"figure":[1],"label":[1]}]]],["p-60824941",[[1,"biggive-video",{"spaceAbove":[2,"space-above"],"spaceBelow":[2,"space-below"],"videoUrl":[1,"video-url"]}]]],["p-35742632",[[1,"philco-footer",{"headingLevel":[2,"heading-level"],"philcoUrlPrefix":[1,"philco-url-prefix"]}]]],["p-fd2f1a72",[[1,"biggive-form-field-select",{"selectionChanged":[16],"prompt":[1],"selectedValue":[1025,"selected-value"],"selectedLabel":[1025,"selected-label"],"options":[1],"selectStyle":[1,"select-style"],"backgroundColour":[1,"background-colour"],"selectedOptionColour":[1,"selected-option-colour"],"selectElementId":[1,"select-element-id"],"spaceBelow":[2,"space-below"],"placeholder":[1]}]]],["p-6ef8f1c8",[[257,"biggive-popup",{"modalClosedCallback":[16],"openFromOutside":[64],"closeFromOutside":[64]}]]],["p-4c8d3d7b",[[1,"biggive-progress-bar",{"spaceBelow":[2,"space-below"],"colourScheme":[1,"colour-scheme"],"counter":[2]}]]],["p-76d8edf3",[[1,"biggive-social-icon",{"service":[1],"labelPrefix":[1,"label-prefix"],"backgroundColour":[1,"background-colour"],"iconColour":[1,"icon-colour"],"wide":[4],"url":[1]}]]],["p-acc61e55",[[1,"biggive-misc-icon",{"backgroundColour":[1,"background-colour"],"iconColour":[1,"icon-colour"],"icon":[1],"url":[1]}]]],["p-c11a2f3b",[[1,"biggive-button",{"spaceBelow":[2,"space-below"],"colourScheme":[1,"colour-scheme"],"label":[1],"url":[1],"openInNewTab":[4,"open-in-new-tab"],"fullWidth":[4,"full-width"],"size":[1],"rounded":[4],"centered":[4],"buttonId":[1,"button-id"],"siteDesign":[1,"site-design"],"disabled":[4]}]]]]'),e))));
|
|
1
|
+
import{p as e,H as o,b as t}from"./p-bbqW3pni.js";export{s as setNonce}from"./p-bbqW3pni.js";import{g as l}from"./p-DQuL1Twl.js";var r=e=>{const o=e.cloneNode;e.cloneNode=function(e){if("TEMPLATE"===this.nodeName)return o.call(this,e);const t=o.call(this,!1),l=this.childNodes;if(e)for(let e=0;e<l.length;e++)2!==l[e].nodeType&&t.appendChild(l[e].cloneNode(!0));return t}};(()=>{r(o.prototype);const t=import.meta.url,l={};return""!==t&&(l.resourcesUrl=new URL(".",t).href),e(l)})().then((async e=>(await l(),t(JSON.parse('[["p-07bd58dd",[[1,"biggive-campaign-card",{"spaceBelow":[2,"space-below"],"campaignType":[1,"campaign-type"],"banner":[1],"campaignTitle":[1,"campaign-title"],"organisationName":[1,"organisation-name"],"primaryFigureLabel":[1,"primary-figure-label"],"primaryFigureAmount":[1,"primary-figure-amount"],"secondaryFigureLabel":[1,"secondary-figure-label"],"secondaryFigureAmount":[1,"secondary-figure-amount"],"progressBarCounter":[2,"progress-bar-counter"],"donateButtonLabel":[1,"donate-button-label"],"donateButtonUrl":[1,"donate-button-url"],"donateButtonColourScheme":[1,"donate-button-colour-scheme"],"moreInfoButtonLabel":[1,"more-info-button-label"],"moreInfoButtonUrl":[1,"more-info-button-url"],"moreInfoButtonColourScheme":[1,"more-info-button-colour-scheme"],"isFutureCampaign":[4,"is-future-campaign"],"isPastCampaign":[4,"is-past-campaign"],"datetime":[1]}]]],["p-12e780cb",[[257,"biggive-campaign-card-filter-grid",{"spaceBelow":[2,"space-below"],"intro":[1],"searchText":[1,"search-text"],"placeholderText":[1,"placeholder-text"],"buttonText":[1,"button-text"],"categoryOptions":[1,"category-options"],"beneficiaryOptions":[1,"beneficiary-options"],"locationOptions":[1,"location-options"],"selectedSortByOption":[1025,"selected-sort-by-option"],"selectedFilterCategory":[1025,"selected-filter-category"],"selectedFilterBeneficiary":[1025,"selected-filter-beneficiary"],"selectedFilterLocation":[1025,"selected-filter-location"],"enableSearchByLocation":[4,"enable-search-by-location"],"offerNearMeOption":[4,"offer-near-me-option"],"fetchingLocation":[4,"fetching-location"],"location":[16],"filtersApplied":[32],"unfocusInputs":[64]}]]],["p-79233862",[[1,"biggive-campaign-highlights",{"spaceBelow":[2,"space-below"],"banner":[1],"campaignTitle":[1,"campaign-title"],"primaryFigureLabel":[1,"primary-figure-label"],"primaryFigureAmount":[1,"primary-figure-amount"],"secondaryFigureLabel":[1,"secondary-figure-label"],"secondaryFigureAmount":[1,"secondary-figure-amount"],"progressBarCounter":[2,"progress-bar-counter"],"primaryStatIcon":[1,"primary-stat-icon"],"primaryStatText":[1,"primary-stat-text"],"secondaryStatIcon":[1,"secondary-stat-icon"],"secondaryStatText":[1,"secondary-stat-text"],"championName":[1,"champion-name"],"championUrl":[1,"champion-url"]}]]],["p-a987b466",[[1,"biggive-cookie-banner",{"autoOpenPreferences":[4,"auto-open-preferences"],"blogUriPrefix":[1,"blog-uri-prefix"],"previouslyAgreedCookiePreferences":[16]},null,{"autoOpenPreferences":[{"autoOpenPreferencesIfRequested":0}]}]]],["p-396992d5",[[257,"biggive-footer",{"headingLevel":[2,"heading-level"],"donateUrlPrefix":[1,"donate-url-prefix"],"blogUrlPrefix":[1,"blog-url-prefix"],"experienceUrlPrefix":[1,"experience-url-prefix"],"smallCharityWeekEnabled":[4,"small-charity-week-enabled"],"usePresetFooter":[4,"use-preset-footer"]}]]],["p-c50881e4",[[1,"biggive-main-menu",{"blogUrlPrefix":[1,"blog-url-prefix"],"donateUrlPrefix":[1,"donate-url-prefix"],"experienceUrlPrefix":[1,"experience-url-prefix"],"smallCharityWeekEnabled":[4,"small-charity-week-enabled"],"someCampaignHasHomePageRedirect":[4,"some-campaign-has-home-page-redirect"],"isLoggedIn":[4,"is-logged-in"],"closeMobileMenuFromOutside":[64]}]]],["p-53d2459c",[[1,"philco-main-menu",{"philcoUrlPrefix":[1,"philco-url-prefix"],"closeMobileMenuFromOutside":[64]}]]],["p-fb0a9e11",[[1,"biggive-article-card",{"spaceBelow":[2,"space-below"],"backgroundColour":[1,"background-colour"],"backgroundImageUrl":[1,"background-image-url"],"slug":[1],"slugColour":[1,"slug-colour"],"date":[1],"dateColour":[1,"date-colour"],"mainTitle":[1,"main-title"],"mainTitleColour":[1,"main-title-colour"],"mainImageUrl":[1,"main-image-url"],"mainImageAltText":[1,"main-image-alt-text"],"image1Url":[1,"image-1-url"],"image1AltText":[1,"image-1-alt-text"],"image2Url":[1,"image-2-url"],"image2AltText":[1,"image-2-alt-text"],"imageLabel":[1,"image-label"],"imageLabelColour":[1,"image-label-colour"],"buttonLabel":[1,"button-label"],"buttonUrl":[1,"button-url"],"buttonColour":[1,"button-colour"],"clipBottomLeftCorner":[4,"clip-bottom-left-corner"],"clipTopRightCorner":[4,"clip-top-right-corner"]}]]],["p-dddee0ad",[[1,"biggive-basic-card",{"spaceBelow":[2,"space-below"],"siteDesign":[1,"site-design"],"backgroundColour":[1,"background-colour"],"backgroundImageUrl":[1,"background-image-url"],"cardColour":[1,"card-colour"],"textColour":[1,"text-colour"],"mainImageUrl":[1,"main-image-url"],"mainImageAltText":[1,"main-image-alt-text"],"mainTitle":[1,"main-title"],"subtitle":[1],"author":[1],"date":[1],"teaser":[1],"icon":[4],"iconColour":[1,"icon-colour"],"buttonAlign":[1,"button-align"],"buttonStyle":[1,"button-style"],"buttonLabel":[1,"button-label"],"buttonUrl":[1,"button-url"],"buttonColourScheme":[1,"button-colour-scheme"],"clipBottomLeftCorner":[4,"clip-bottom-left-corner"],"clipTopRightCorner":[4,"clip-top-right-corner"],"headingLevel":[2,"heading-level"],"addAnimation":[4,"add-animation"]}]]],["p-ed92d2b0",[[1,"biggive-call-to-action",{"spaceAbove":[2,"space-above"],"spaceBelow":[2,"space-below"],"defaultTextColour":[1,"default-text-colour"],"slugSize":[2,"slug-size"],"slugColour":[1,"slug-colour"],"slug":[1],"mainTitleColour":[1,"main-title-colour"],"mainTitleSize":[2,"main-title-size"],"mainTitle":[1,"main-title"],"subtitleSize":[2,"subtitle-size"],"subtitleColour":[1,"subtitle-colour"],"subtitle":[1],"teaserColour":[1,"teaser-colour"],"teaser":[1],"primaryButtonUrl":[1,"primary-button-url"],"primaryButtonLabel":[1,"primary-button-label"],"primaryButtonColourScheme":[1,"primary-button-colour-scheme"],"secondaryButtonUrl":[1,"secondary-button-url"],"secondaryButtonLabel":[1,"secondary-button-label"],"secondaryButtonColourScheme":[1,"secondary-button-colour-scheme"]}]]],["p-ed7b04d2",[[1,"biggive-hero-image",{"spaceBelow":[2,"space-below"],"colourScheme":[1,"colour-scheme"],"slug":[1],"slugColour":[1,"slug-colour"],"logo":[1],"logoHeight":[2,"logo-height"],"logoAltText":[1,"logo-alt-text"],"mainImage":[1,"main-image"],"mainImageShape":[1,"main-image-shape"],"mainImageAlignHorizontal":[1,"main-image-align-horizontal"],"mainImageAlignVertical":[1,"main-image-align-vertical"],"mainTitle":[1,"main-title"],"mainTitleColour":[1,"main-title-colour"],"teaser":[1],"teaserColour":[1,"teaser-colour"],"buttonUrl":[1,"button-url"],"buttonLabel":[1,"button-label"],"buttonColourScheme":[1,"button-colour-scheme"]}]]],["p-167ac0d3",[[1,"biggive-icon-button",{"spaceBelow":[2,"space-below"],"backgroundColour":[1,"background-colour"],"backgroundPadding":[2,"background-padding"],"text":[1],"textColour":[1,"text-colour"],"icon":[1],"url":[1],"openInNewTab":[4,"open-in-new-tab"],"size":[1],"arrow":[4],"arrowColour":[1,"arrow-colour"],"circle":[4],"shadow":[4],"centered":[4],"rounded":[4],"buttonId":[1,"button-id"]}]]],["p-f04eaebb",[[1,"biggive-image-card",{"spaceBelow":[2,"space-below"],"backgroundColour":[1,"background-colour"],"mainImageUrl":[1,"main-image-url"],"mainImageAltText":[1,"main-image-alt-text"],"textAlign":[1,"text-align"],"teaser":[1],"teaserColour":[1,"teaser-colour"],"buttonAlign":[1,"button-align"],"buttonStyle":[1,"button-style"],"buttonLabel":[1,"button-label"],"buttonUrl":[1,"button-url"],"buttonColourScheme":[1,"button-colour-scheme"],"clipBottomLeftCorner":[4,"clip-bottom-left-corner"],"clipTopRightCorner":[4,"clip-top-right-corner"],"addAnimation":[4,"add-animation"]}]]],["p-d277fe34",[[1,"biggive-image-feature",{"spaceBelow":[2,"space-below"],"defaultTextColour":[1,"default-text-colour"],"imageUrl":[1,"image-url"],"imageAltText":[1,"image-alt-text"],"slug":[1],"slugColour":[1,"slug-colour"],"mainTitle":[1,"main-title"],"mainTitleColour":[1,"main-title-colour"],"teaser":[1],"teaserColour":[1,"teaser-colour"],"buttonUrl":[1,"button-url"],"buttonLabel":[1,"button-label"],"buttonColourScheme":[1,"button-colour-scheme"]}]]],["p-d2c312e0",[[1,"biggive-video-feature",{"spaceAbove":[2,"space-above"],"spaceBelow":[2,"space-below"],"defaultTextColour":[1,"default-text-colour"],"videoUrl":[1,"video-url"],"slug":[1],"slugColour":[1,"slug-colour"],"mainTitle":[1,"main-title"],"mainTitleColour":[1,"main-title-colour"],"teaser":[1],"teaserColour":[1,"teaser-colour"],"buttonUrl":[1,"button-url"],"buttonLabel":[1,"button-label"],"buttonColourScheme":[1,"button-colour-scheme"]}]]],["p-6f0ab7de",[[1,"biggive-accordion",{"spaceBelow":[2,"space-below"],"textColour":[1,"text-colour"],"headingColour":[1,"heading-colour"],"children":[32]}]]],["p-bc64b9af",[[1,"biggive-accordion-entry",{"heading":[1]}]]],["p-2f0e2375",[[1,"biggive-back-to-top"]]],["p-8a0061ce",[[1,"biggive-biography-card",{"spaceBelow":[2,"space-below"],"borderWidth":[2,"border-width"],"imageUrl":[1,"image-url"],"imageStyle":[1,"image-style"],"textColour":[1,"text-colour"],"backgroundColour":[1,"background-colour"],"fullName":[1,"full-name"],"jobTitle":[1,"job-title"],"textAlign":[1,"text-align"],"ratio":[1],"circle":[4],"circleColour":[1,"circle-colour"],"rounded":[4],"url":[1]}]]],["p-13840401",[[257,"biggive-boxed-content",{"spaceBelow":[2,"space-below"],"verticalPadding":[2,"vertical-padding"],"horizontalPadding":[2,"horizontal-padding"],"backgroundColour":[1,"background-colour"],"shadow":[4]}]]],["p-53efa890",[[1,"biggive-branded-image",{"spaceBelow":[2,"space-below"],"imageUrl":[1,"image-url"],"imageHeightPercent":[2,"image-height-percent"],"imageAlt":[1,"image-alt"],"logoUrl":[1,"logo-url"],"slug":[1],"charityName":[1,"charity-name"],"charityLocation":[1,"charity-location"],"charityUrl":[1,"charity-url"]}]]],["p-342e0587",[[257,"biggive-container-card",{"spaceBelow":[2,"space-below"],"backgroundColour":[1,"background-colour"],"backgroundImageUrl":[1,"background-image-url"],"cardColour":[1,"card-colour"],"textColour":[1,"text-colour"],"clipBottomLeftCorner":[4,"clip-bottom-left-corner"],"clipTopRightCorner":[4,"clip-top-right-corner"],"headingLevel":[2,"heading-level"]}]]],["p-d4462885",[[257,"biggive-form"]]],["p-b00c2ca8",[[257,"biggive-formatted-text",{"spaceBelow":[2,"space-below"],"defaultTextColour":[1,"default-text-colour"],"maxWidth":[2,"max-width"],"siteDesign":[1,"site-design"]}]]],["p-486b0443",[[257,"biggive-grid",{"spaceBelow":[2,"space-below"],"columnCount":[2,"column-count"],"spaceBetween":[4,"space-between"],"columnGap":[2,"column-gap"]}]]],["p-ebdf0f2a",[[1,"biggive-heading",{"spaceAbove":[2,"space-above"],"spaceBelow":[2,"space-below"],"colour":[1],"htmlElement":[1,"html-element"],"size":[2],"align":[1],"text":[1],"icon":[4],"iconColour":[1,"icon-colour"],"siteDesign":[1,"site-design"]}]]],["p-22f2e1e4",[[1,"biggive-heading-banner",{"targetUrl":[1,"target-url"],"logo":[1],"slug":[1],"mainTitle":[1,"main-title"],"mainImageUrl":[1,"main-image-url"],"focalPoint":[1,"focal-point"],"teaser":[1],"backgroundColour":[1,"background-colour"],"textBackgroundColour":[1,"text-background-colour"],"slugColour":[1,"slug-colour"],"mainTitleColour":[1,"main-title-colour"],"teaserColour":[1,"teaser-colour"],"height":[1]}]]],["p-7b142f0c",[[1,"biggive-image",{"spaceAbove":[2,"space-above"],"spaceBelow":[2,"space-below"],"imageUrl":[1,"image-url"],"imageAltText":[1,"image-alt-text"],"width":[2],"height":[2],"sizeUnit":[1,"size-unit"]}]]],["p-f2f9ce31",[[1,"biggive-image-button",{"spaceBelow":[2,"space-below"],"backgroundColour":[1,"background-colour"],"backgroundPadding":[2,"background-padding"],"text":[1],"textColour":[1,"text-colour"],"imageUrl":[1,"image-url"],"imageStyle":[1,"image-style"],"url":[1],"openInNewTab":[4,"open-in-new-tab"],"size":[1],"arrow":[4],"arrowColour":[1,"arrow-colour"],"circle":[4],"shadow":[4],"centered":[4],"rounded":[4],"buttonId":[1,"button-id"]}]]],["p-925b1eab",[[257,"biggive-nav-group",{"inline":[4]}]]],["p-ac53a19e",[[257,"biggive-nav-item",{"url":[1],"label":[1],"iconColour":[1,"icon-colour"]}]]],["p-b09d4083",[[257,"biggive-page-column"]]],["p-b5de3f93",[[257,"biggive-page-columns",{"spaceBelow":[2,"space-below"]}]]],["p-e8517ccd",[[257,"biggive-page-section",{"spaceBelow":[2,"space-below"],"sectionStyleTop":[1,"section-style-top"],"sectionStyleBottom":[1,"section-style-bottom"],"colourScheme":[1,"colour-scheme"],"maxWidth":[2,"max-width"],"primaryFullBleed":[4,"primary-full-bleed"]}]]],["p-08c0d7a0",[[1,"biggive-quote",{"spaceBelow":[2,"space-below"],"defaultTextColour":[1,"default-text-colour"],"quote":[1],"attribution":[1],"quoteIconColour":[1,"quote-icon-colour"],"siteDesign":[1,"site-design"]}]]],["p-7e9f3522",[[257,"biggive-sheet",{"sheetId":[1,"sheet-id"],"backgroundColour":[1,"background-colour"],"textColour":[1,"text-colour"]}]]],["p-63bbe726",[[257,"biggive-tab",{"tabTitle":[1,"tab-title"]}]]],["p-034bc308",[[257,"biggive-tabbed-content",{"spaceBelow":[2,"space-below"],"textColour":[1,"text-colour"],"selectedTextColour":[1,"selected-text-colour"],"navigationHighlightColour":[1,"navigation-highlight-colour"],"selectedNavigationHighlightColour":[1,"selected-navigation-highlight-colour"],"buttonBackgroundColour":[1,"button-background-colour"],"buttonIconColour":[1,"button-icon-colour"]}]]],["p-f2d44bb0",[[257,"biggive-table",{"spaceBelow":[2,"space-below"],"headerTextColour":[1,"header-text-colour"],"headerBackgroundColour":[1,"header-background-colour"],"bodyTextColour":[1,"body-text-colour"],"bodyBackgroundColour":[1,"body-background-colour"]}]]],["p-6db0805c",[[257,"biggive-text-input",{"currency":[1],"spaceBelow":[2,"space-below"],"selectStyle":[1,"select-style"],"siteDesign":[1,"site-design"]}]]],["p-074c95a5",[[1,"biggive-timeline",{"spaceBelow":[2,"space-below"],"textColour":[1,"text-colour"],"selectedTextColour":[1,"selected-text-colour"],"navigationHighlightColour":[1,"navigation-highlight-colour"],"selectedNavigationHighlightColour":[1,"selected-navigation-highlight-colour"],"buttonBackgroundColour":[1,"button-background-colour"],"buttonIconColour":[1,"button-icon-colour"],"entryBackgroundColour":[1,"entry-background-colour"],"entryHighlightColour":[1,"entry-highlight-colour"],"entryDateColour":[1,"entry-date-colour"],"entryTitleColour":[1,"entry-title-colour"],"entryTextColour":[1,"entry-text-colour"]}]]],["p-0e789e36",[[1,"biggive-timeline-entry",{"date":[1],"heading":[1]}]]],["p-d3112cb1",[[257,"biggive-totalizer",{"spaceBelow":[2,"space-below"],"primaryColour":[1,"primary-colour"],"primaryTextColour":[1,"primary-text-colour"],"secondaryColour":[1,"secondary-colour"],"secondaryTextColour":[1,"secondary-text-colour"],"mainMessage":[1,"main-message"]}]]],["p-b0d1c784",[[1,"biggive-totalizer-ticker-item",{"figure":[1],"label":[1]}]]],["p-60824941",[[1,"biggive-video",{"spaceAbove":[2,"space-above"],"spaceBelow":[2,"space-below"],"videoUrl":[1,"video-url"]}]]],["p-35742632",[[1,"philco-footer",{"headingLevel":[2,"heading-level"],"philcoUrlPrefix":[1,"philco-url-prefix"]}]]],["p-fd2f1a72",[[1,"biggive-form-field-select",{"selectionChanged":[16],"prompt":[1],"selectedValue":[1025,"selected-value"],"selectedLabel":[1025,"selected-label"],"options":[1],"selectStyle":[1,"select-style"],"backgroundColour":[1,"background-colour"],"selectedOptionColour":[1,"selected-option-colour"],"selectElementId":[1,"select-element-id"],"spaceBelow":[2,"space-below"],"placeholder":[1]}]]],["p-6ef8f1c8",[[257,"biggive-popup",{"modalClosedCallback":[16],"openFromOutside":[64],"closeFromOutside":[64]}]]],["p-4c8d3d7b",[[1,"biggive-progress-bar",{"spaceBelow":[2,"space-below"],"colourScheme":[1,"colour-scheme"],"counter":[2]}]]],["p-76d8edf3",[[1,"biggive-social-icon",{"service":[1],"labelPrefix":[1,"label-prefix"],"backgroundColour":[1,"background-colour"],"iconColour":[1,"icon-colour"],"wide":[4],"url":[1]}]]],["p-acc61e55",[[1,"biggive-misc-icon",{"backgroundColour":[1,"background-colour"],"iconColour":[1,"icon-colour"],"icon":[1],"url":[1]}]]],["p-c11a2f3b",[[1,"biggive-button",{"spaceBelow":[2,"space-below"],"colourScheme":[1,"colour-scheme"],"label":[1],"url":[1],"openInNewTab":[4,"open-in-new-tab"],"fullWidth":[4,"full-width"],"size":[1],"rounded":[4],"centered":[4],"buttonId":[1,"button-id"],"siteDesign":[1,"site-design"],"disabled":[4]}]]]]'),e))));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,c as t,h as i,g as a}from"./p-bbqW3pni.js";import{f as s}from"./p-CoGE2Wf-.js";const l={relevance:"Relevance",amountRaised:"Most raised",leastRaised:"Least raised",closeToTarget:"Nearest target",matchFundsRemaining:"Most funds remaining"},r=class{constructor(i){e(this,i),this.doSearchAndFilterUpdate=t(this,"doSearchAndFilterUpdate"),this.doGetLocationFromBrowser=t(this,"doGetLocationFromBrowser"),this.sortByPlaceholderText="Sort by",this.beneficiariesPlaceHolderText="Select beneficiary",this.categoriesPlaceHolderText="Select category",this.locationsPlaceHolderText="Select location",this.newSelectedFilterCategory=null,this.newSelectedFilterBeneficiary=null,this.newSelectedFilterLocation=null,this.spaceBelow=0,this.intro="Find a charity or project",this.searchText=null,this.placeholderText="Search",this.buttonText="Search",this.selectedFilterCategory=null,this.selectedFilterBeneficiary=null,this.selectedFilterLocation=null,this.enableSearchByLocation=!1,this.fetchingLocation=!1,this.location=void 0,this.categoryFilterSelectionChanged=e=>{this.newSelectedFilterCategory=e},this.beneficiarySelectionChanged=e=>{this.newSelectedFilterBeneficiary=e},this.locationSelectionChanged=e=>{this.newSelectedFilterLocation=e},this.sortBySelectionChanged=e=>{this.selectedSortByOption=e,this.doSearchAndFilterUpdate.emit(this.getSearchAndFilterObject())},this.handleApplyFilterButtonClick=()=>{var e,t,i,a;this.selectedFilterCategory=null!==(e=this.newSelectedFilterCategory)&&void 0!==e?e:this.selectedFilterCategory,this.selectedFilterBeneficiary=null!==(t=this.newSelectedFilterBeneficiary)&&void 0!==t?t:this.selectedFilterBeneficiary,this.selectedFilterLocation=null!==(i=this.newSelectedFilterLocation)&&void 0!==i?i:this.selectedFilterLocation;const s=this.getSearchAndFilterObject();this.doSearchAndFilterUpdate.emit(s);const l=null===(a=this.el.shadowRoot)||void 0===a?void 0:a.getElementById("filter-popup");l&&l.closeFromOutside(),this.filtersApplied="string"==typeof s.filterBeneficiary||"string"==typeof s.filterCategory||"string"==typeof s.filterLocation},this.handleSearchButtonPressed=()=>{this.unfocusTextInput(),this.doSearchAndFilterUpdate.emit(this.getSearchAndFilterObject()),this.hasSearchTerm()&&(this.selectedSortByOption="Relevance")},this.handleNearMeButtonPressed=()=>{this.unfocusTextInput(),this.doGetLocationFromBrowser.emit()},this.handleSearchTextChanged=e=>{this.searchText=e.target.value},this.handleEnterPressed=e=>{"Enter"===e.key&&(this.unfocusTextInput(),this.doSearchAndFilterUpdate.emit(this.getSearchAndFilterObject()))},this.handleFilterButtonClick=()=>{var e;this.newSelectedFilterBeneficiary=this.selectedFilterBeneficiary,this.newSelectedFilterCategory=this.selectedFilterCategory,this.newSelectedFilterLocation=this.selectedFilterLocation;const t=null===(e=this.el.shadowRoot)||void 0===e?void 0:e.getElementById("filter-popup");t&&t.openFromOutside()},this.handleClearAll=()=>{var e;this.unfocusTextInput(),this.filtersApplied=!1,this.searchText=null,this.selectedSortByOption=this.initialSortByOption,this.selectedFilterBeneficiary=null,this.selectedFilterCategory=null,this.selectedFilterLocation=null,["sort-by","categories","beneficiaries","locations","funding"].forEach((e=>{var t;const i=null===(t=this.el.shadowRoot)||void 0===t?void 0:t.getElementById(e);i&&(i.selectedValue=null,i.selectedLabel=null)}));const t=null===(e=this.el.shadowRoot)||void 0===e?void 0:e.querySelector(".selected-filters");t&&t.querySelectorAll(".button").forEach((e=>{e.remove()})),this.doSearchAndFilterUpdate.emit({searchText:null,sortBy:null,filterCategory:null,filterBeneficiary:null,filterLocation:null})}}async unfocusInputs(){this.unfocusTextInput()}getSearchAndFilterObject(){return{searchText:this.searchText,sortBy:this.selectedSortByOption,filterCategory:this.selectedFilterCategory,filterBeneficiary:this.selectedFilterBeneficiary,filterLocation:this.selectedFilterLocation}}removeFilter(e){var t;switch(e){case"beneficiaries":this.selectedFilterBeneficiary=null;break;case"categories":this.selectedFilterCategory=null;break;case"locations":this.selectedFilterLocation=null;break;default:console.error(e)}const i=null===(t=this.el.shadowRoot)||void 0===t?void 0:t.getElementById(e);i&&(i.selectedLabel=null,i.selectedValue=null,this.doSearchAndFilterUpdate.emit(this.getSearchAndFilterObject()))}unfocusTextInput(){var e;const t=null===(e=this.el.shadowRoot)||void 0===e?void 0:e.querySelector(".input-text");null==t||t.blur()}componentWillRender(){this.filtersApplied=null!==this.selectedFilterCategory||null!==this.selectedFilterBeneficiary||null!==this.selectedFilterLocation,this.initialSortByOption=this.selectedSortByOption}render(){var e;const t=this.getSortOptions();return i("div",{key:"ceb2f44c3c853bfdc3da18ad187de4cc5a085ffb",class:"container space-below-"+this.spaceBelow},i("div",{key:"8f6370902bfabe8a9df23e274d05298ca316b12b",class:"sleeve"},i("div",{key:"89fc861fdb61827ab5dbb5cee88a4dfdd0a8abcb",class:"search-wrap"},i("h4",{key:"04363e5852c2347036e52efd75c0acfd83df5901"},this.intro),i("div",{key:"dd18cb11be900192f0a5a26f027b0102453e50ad",class:"field-wrap"},i("div",{key:"a9798f3d6943cfb5494452bf23ea5ce03c288a45",class:"input-wrap"},i("svg",{key:"9296bccad620aaba713b252fb31c7f3efd4b1a96",xmlns:"http://www.w3.org/2000/svg",class:"icon",viewBox:"0 0 512 512"},i("path",{key:"718a7766577cf08ba55ebae64b60b312cfcf8edf",d:s.icon[4].toString()})),i("input",{key:"e89ff0c306417359e72597edf932166970e01702",type:"text",value:null!==(e=this.searchText)&&void 0!==e?e:"",class:"input-text",placeholder:this.placeholderText,onInput:this.handleSearchTextChanged,onKeyDown:this.handleEnterPressed})),i("biggive-button",{key:"7713463cc5c611be7e96290c91da7691c3bba5e4",onDoButtonClick:this.handleSearchButtonPressed,label:this.buttonText}))),i("div",{key:"eb4ac758e446eda26be72dad7239fd525c520c39",class:"sort-filter-wrap"},this.enableSearchByLocation&&this.offerNearMeOption&&i("biggive-button",{key:"6f571b4193453203cc11cb99c42a475e0360b69d",class:"filter",colourScheme:"primary",onDoButtonClick:this.handleNearMeButtonPressed,label:this.fetchingLocation?"Fetching location...":"Charities near me",disabled:this.fetchingLocation,fullWidth:!0,"space-below":"0"}),i("div",{key:"07fa78bea86edf2b60492b42e8e91ff9b44e9830",class:"filter-wrap"},i("biggive-button",{key:"0f6775e87d80f1b91dd57ef39260838932dd099d",class:"filter",colourScheme:"primary",onDoButtonClick:this.handleFilterButtonClick,label:"Filter",fullWidth:!0,"space-below":"0"}),i("biggive-popup",{key:"fe87d7b2fc75583f421855eee6dd22132ec77096",id:"filter-popup"},i("h4",{key:"50cc5ea69df122c34ff8bc615088f7a7e07d992e",class:"space-above-0 space-below-3 text-colour-primary"},"Filters"),i("div",{key:"c0354b38830bb635e19ad38dfd306e41b72aedff",class:"select-wrapper-1"},i("biggive-form-field-select",{key:"a1ce6c7b5c956e01958a74f98d6a1238486dd511",backgroundColour:"white",prompt:"Category",placeholder:this.categoriesPlaceHolderText,selectedLabel:this.selectedFilterCategory,selectedValue:this.selectedFilterCategory,options:this.optionsToArray(this.categoryOptions||[]),selectionChanged:this.categoryFilterSelectionChanged,id:"categories","space-below":"2"})),i("div",{key:"6cc0dbeb1c98470bdce24faf880210f64e0edd72",class:"select-wrapper-2"},i("biggive-form-field-select",{key:"5109c83967e666a5254814ddaf822cffbda2b6af",backgroundColour:"white",prompt:"Beneficiary",placeholder:this.beneficiariesPlaceHolderText,selectedLabel:this.selectedFilterBeneficiary,selectedValue:this.selectedFilterBeneficiary,options:this.optionsToArray(this.beneficiaryOptions||[]),selectionChanged:this.beneficiarySelectionChanged,id:"beneficiaries","space-below":"2"})),i("div",{key:"213fb6972e212a3ed593445701e55cd9c9df4e70",class:"select-wrapper-3"},i("biggive-form-field-select",{key:"c5f0c913deb5b3eb1cdde23cc4f59fd4d856bdc7",backgroundColour:"white",prompt:"Location",placeholder:this.locationsPlaceHolderText,selectedLabel:this.selectedFilterLocation,selectedValue:this.selectedFilterLocation,options:this.optionsToArray(this.locationOptions||[]),selectionChanged:this.locationSelectionChanged,id:"locations","space-below":"2"})),i("div",{key:"d5ebed141c6f2df713044838802e41d59a99c033",class:"align-right"},i("biggive-button",{key:"5fe81bf0b04ef44618264aa4dae4b31df44f74c2",label:"Apply filters",onDoButtonClick:this.handleApplyFilterButtonClick})))),i("div",{key:"36cbb004dc2c0b3d6435c853893f279f7cc2a0b4",class:"sort-wrap"},i("biggive-form-field-select",{key:"ce1b686a810d10452ef1c2fabf346117cd3990c4",options:t,prompt:null,"select-style":"underlined",placeholder:this.sortByPlaceholderText,selectedLabel:this.selectedSortByOption,selectedValue:this.getSelectedValue(),selectionChanged:this.sortBySelectionChanged,id:"sort-by"},i("biggive-form-field-select-option",{key:"eb016dccffc6b0c63de001ec5e7c15c0215f58f7",value:"amountRaised",label:"Most raised"}),i("biggive-form-field-select-option",{key:"4df7ba1f42d0bb2d1e53c2e40db788bc4862ffed",value:"leastRaised",label:"Least raised"}),i("biggive-form-field-select-option",{key:"6ee1373b12f664ffc9b2d86fbfae71c5ee89c808",value:"matchFundsRemaining",label:"Most funds remaining"}),i("biggive-form-field-select-option",{key:"e2cf6339701f3f03fd1a1a1ddd55a697db189b64",value:"closeToTarget",label:"Nearest target"}),(this.searchText||"").length>0?i("biggive-form-field-select-option",{value:"Relevance",label:"Relevance"}):null))),i("div",{key:"f6e3bf0f207f735c91b9053f43b1a75a6ec33b34",class:"selected-filter-wrap"},i("div",{key:"bfdbb504e478326031d977b1af88f2cc74d2f841",class:"selected-filters"},this.selectedFilterCategory&&i("span",{key:"bbb0ea75b53fed704a910faa8962bd9f70454b25",class:"button",onClick:()=>{this.removeFilter("categories")}},this.selectedFilterCategory),this.selectedFilterBeneficiary&&i("span",{key:"5d391afc2dfd66119892f7b77038125e5703728e",class:"button",onClick:()=>{this.removeFilter("beneficiaries")}},this.selectedFilterBeneficiary),this.selectedFilterLocation&&i("span",{key:"bc7b957d2d76cdfede96921c0a006da77690b3fc",class:"button",onClick:()=>{this.removeFilter("locations")}},this.selectedFilterLocation)),i("div",{key:"bf228470ec15507617fa98b20eda6b2584ca359d",class:"clear-all"},i("a",{key:"5e210df20d0dc4951b98888958d03ff0ed74cf0c",onClick:this.handleClearAll},"Clear all"))),i("div",{key:"155ef43b9888223f6a480130df3aa47bafd78741",class:"campaign-grid"},i("slot",{key:"ee3ff728b4ce9a11e33401236ccee3a581ef39a0",name:"campaign-grid"}))))}getSelectedValue(){const e=this.selectedSortByOption;if(void 0===e)return;const t=this.getSortOptions().filter((t=>t.label.toLowerCase()===e.toLowerCase()))[0];return null==t?void 0:t.value}getSortOptions(){return Object.getOwnPropertyNames(l).filter((e=>"relevance"!==e||this.hasSearchTerm())).map((e=>({value:e,label:l[e]})))}hasSearchTerm(){return"string"==typeof this.searchText&&this.searchText.length>0}optionsToArray(e){return"string"==typeof e&&(e=JSON.parse(e)),Array.isArray(e)?e.map((e=>({value:e,label:e}))):Object.entries(e).map((e=>({value:e[0],label:e[1]})))}get el(){return a(this)}};r.style='a{color:inherit;text-decoration:underline}a:hover{text-decoration:none}.space-above-0{margin-top:0}.space-above-1{margin-top:5px}.space-above-2{margin-top:10px}.space-above-3{margin-top:15px}.space-above-4{margin-top:30px}.space-above-5{margin-top:45px}.space-above-6{margin-top:60px}.space-below-0{margin-bottom:0}.space-below-1{margin-bottom:5px}.space-below-2{margin-bottom:10px}.space-below-3{margin-bottom:15px}.space-below-4{margin-bottom:30px}.space-below-5{margin-bottom:45px}.space-below-6{margin-bottom:60px}:host{display:content}.select-wrapper-1,.select-wrapper-2,.select-wrapper-3,.select-wrapper-4{position:relative;margin-top:1em}.select-wrapper-1{z-index:4}.select-wrapper-2{z-index:3}.select-wrapper-3{z-index:2}.select-wrapper-4{z-index:1}.container{font-family:"Euclid Triangle", sans-serif;font-size:17px;line-height:24px;position:relative}.container .search-wrap{background-color:#FFFFFF;padding:15px 30px;margin-bottom:15px}.container .search-wrap h4{margin-bottom:15px}.container .search-wrap .field-wrap{display:flex;justify-content:space-between}.container .search-wrap .field-wrap .input-wrap{display:flex;justify-content:space-between;padding-bottom:5px;border-bottom:1px solid #000000;margin-right:30px;flex-grow:1}.container .search-wrap .field-wrap .input-wrap input{border:0}.container .search-wrap .field-wrap button{padding:5px 30px}.selected-filter-wrap{display:flex;margin-bottom:23px;padding:0}.selected-filter-wrap .button{margin-bottom:7px;display:inline-block;cursor:pointer;border-radius:20px;padding:5px 50px 5px 20px;margin-right:15px;background-color:#FF7272;color:#000000;border:1px solid #FF7272;text-decoration:none;background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIGlkPSJMYXllcl8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiIHk9IjBweCIKCSB2aWV3Qm94PSIwIDAgMTguNCAxOC40IiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCAxOC40IDE4LjQ7IiB4bWw6c3BhY2U9InByZXNlcnZlIj4KPHN0eWxlIHR5cGU9InRleHQvY3NzIj4KCS5zdDB7c3Ryb2tlOiMwMDAwMDA7fQo8L3N0eWxlPgo8cGF0aCBjbGFzcz0ic3QwIiBkPSJNOS4yLDguNUwxNywwLjdsMC43LDAuN0w5LjksOS4ybDcuOCw3LjhMMTcsMTcuN0w5LjIsOS45bC03LjgsNy44TDAuNywxN2w3LjgtNy44TDAuNywxLjRsMC43LTAuN0w5LjIsOC41eiIvPgo8L3N2Zz4K);background-repeat:no-repeat;background-position:right 20px center;background-size:12px auto}.selected-filter-wrap .button:hover{background-color:#FFFFFF;color:#000000}.selected-filter-wrap .clear-all{margin-left:auto}.selected-filter-wrap .clear-all a{display:inline-block;cursor:pointer;border-radius:20px;padding:5px 20px;background-color:#2C089B;color:#FFFFFF;border:1px solid #2C089B;text-decoration:none}.selected-filter-wrap .clear-all a:hover{background-color:#FFFFFF;color:#2C089B}.sort-filter-wrap{display:flex;justify-content:flex-end;margin-bottom:30px;padding:0;text-align:right;display:flex}.sort-filter-wrap .clear-all{cursor:pointer;vertical-align:center;margin-top:auto;margin-bottom:auto}.sort-filter-wrap .sort-wrap{margin-left:15px}.sort-filter-wrap .filter-wrap{background-color:#F6F6F6;margin-left:15px}.sort-filter-wrap .filter-wrap .button.filter{padding-left:60px;padding-right:30px}.sort-filter-wrap .filter-wrap .button.filter .filter-icon{content:"";display:block;position:absolute;left:25px;top:17px;width:13px;height:13px}.sort-filter-wrap .filter-wrap .button.filter .filter-icon svg{width:100%;height:auto;vertical-align:top}.sort-filter-wrap .filter-wrap .button.filter .filter-icon svg:hover{fill:#2C089B}.icon{height:1rem;width:2rem;vertical-align:-0.125rem;margin:auto}.icon>path{fill:#2C089B}.icon-clear-all>path{fill:#000000}@media screen and (max-width: 450px){.sort-filter-wrap{flex-direction:column-reverse}.sort-filter-wrap .sort-wrap{margin-top:20px;margin-bottom:20px}}@media screen and (max-width: 350px){.sort-filter-wrap{justify-content:space-between}.sort-filter-wrap .sort-wrap{margin-left:0px}.sort-filter-wrap .filter-wrap{margin-left:3px}}.align-right{text-align:right}.input-text{font-family:"Euclid Triangle", sans-serif;font-size:17px;line-height:24px;color:#000000;padding:5px 10px;box-sizing:border-box;width:100%}.input-text:focus{outline:0}.input-text::placeholder{color:#4A4A4A}.text-colour-primary{color:#2C089B}';export{r as biggive_campaign_card_filter_grid}
|
|
@@ -228,13 +228,13 @@ const BiggiveCampaignCardFilterGrid = class {
|
|
|
228
228
|
render() {
|
|
229
229
|
var _a;
|
|
230
230
|
const sortOptions = this.getSortOptions();
|
|
231
|
-
return (index.h("div", { key: 'ceb2f44c3c853bfdc3da18ad187de4cc5a085ffb', class: 'container space-below-' + this.spaceBelow }, index.h("div", { key: '8f6370902bfabe8a9df23e274d05298ca316b12b', class: "sleeve" }, index.h("div", { key: '89fc861fdb61827ab5dbb5cee88a4dfdd0a8abcb', class: "search-wrap" }, index.h("h4", { key: '04363e5852c2347036e52efd75c0acfd83df5901' }, this.intro), index.h("div", { key: 'dd18cb11be900192f0a5a26f027b0102453e50ad', class: "field-wrap" }, index.h("div", { key: 'a9798f3d6943cfb5494452bf23ea5ce03c288a45', class: "input-wrap" }, index.h("svg", { key: '9296bccad620aaba713b252fb31c7f3efd4b1a96', xmlns: "http://www.w3.org/2000/svg", class: "icon", viewBox: "0 0 512 512" }, index.h("path", { key: '718a7766577cf08ba55ebae64b60b312cfcf8edf', d: index$1.faMagnifyingGlass.icon[4].toString() })), index.h("input", { key: 'e89ff0c306417359e72597edf932166970e01702', type: "text", value: (_a = this.searchText) !== null && _a !== void 0 ? _a : '', class: "input-text", placeholder: this.placeholderText, onInput: this.handleSearchTextChanged, onKeyDown: this.handleEnterPressed })), index.h("biggive-button", { key: '7713463cc5c611be7e96290c91da7691c3bba5e4', onDoButtonClick: this.handleSearchButtonPressed, label: this.buttonText }))), index.h("div", { key: 'eb4ac758e446eda26be72dad7239fd525c520c39', class: "sort-filter-wrap" }, this.enableSearchByLocation && this.offerNearMeOption && (index.h("biggive-button", { key: '
|
|
231
|
+
return (index.h("div", { key: 'ceb2f44c3c853bfdc3da18ad187de4cc5a085ffb', class: 'container space-below-' + this.spaceBelow }, index.h("div", { key: '8f6370902bfabe8a9df23e274d05298ca316b12b', class: "sleeve" }, index.h("div", { key: '89fc861fdb61827ab5dbb5cee88a4dfdd0a8abcb', class: "search-wrap" }, index.h("h4", { key: '04363e5852c2347036e52efd75c0acfd83df5901' }, this.intro), index.h("div", { key: 'dd18cb11be900192f0a5a26f027b0102453e50ad', class: "field-wrap" }, index.h("div", { key: 'a9798f3d6943cfb5494452bf23ea5ce03c288a45', class: "input-wrap" }, index.h("svg", { key: '9296bccad620aaba713b252fb31c7f3efd4b1a96', xmlns: "http://www.w3.org/2000/svg", class: "icon", viewBox: "0 0 512 512" }, index.h("path", { key: '718a7766577cf08ba55ebae64b60b312cfcf8edf', d: index$1.faMagnifyingGlass.icon[4].toString() })), index.h("input", { key: 'e89ff0c306417359e72597edf932166970e01702', type: "text", value: (_a = this.searchText) !== null && _a !== void 0 ? _a : '', class: "input-text", placeholder: this.placeholderText, onInput: this.handleSearchTextChanged, onKeyDown: this.handleEnterPressed })), index.h("biggive-button", { key: '7713463cc5c611be7e96290c91da7691c3bba5e4', onDoButtonClick: this.handleSearchButtonPressed, label: this.buttonText }))), index.h("div", { key: 'eb4ac758e446eda26be72dad7239fd525c520c39', class: "sort-filter-wrap" }, this.enableSearchByLocation && this.offerNearMeOption && (index.h("biggive-button", { key: '6f571b4193453203cc11cb99c42a475e0360b69d', class: "filter", colourScheme: "primary", onDoButtonClick: this.handleNearMeButtonPressed, label: this.fetchingLocation ? 'Fetching location...' : 'Charities near me', disabled: this.fetchingLocation, fullWidth: true, "space-below": "0" })), index.h("div", { key: '07fa78bea86edf2b60492b42e8e91ff9b44e9830', class: "filter-wrap" }, index.h("biggive-button", { key: '0f6775e87d80f1b91dd57ef39260838932dd099d', class: "filter", colourScheme: "primary", onDoButtonClick: this.handleFilterButtonClick, label: "Filter", fullWidth: true, "space-below": "0" }), index.h("biggive-popup", { key: 'fe87d7b2fc75583f421855eee6dd22132ec77096', id: "filter-popup" }, index.h("h4", { key: '50cc5ea69df122c34ff8bc615088f7a7e07d992e', class: "space-above-0 space-below-3 text-colour-primary" }, "Filters"), index.h("div", { key: 'c0354b38830bb635e19ad38dfd306e41b72aedff', class: "select-wrapper-1" }, index.h("biggive-form-field-select", { key: 'a1ce6c7b5c956e01958a74f98d6a1238486dd511', backgroundColour: "white", prompt: "Category", placeholder: this.categoriesPlaceHolderText, selectedLabel: this.selectedFilterCategory, selectedValue: this.selectedFilterCategory, options: this.optionsToArray(this.categoryOptions || []), selectionChanged: this.categoryFilterSelectionChanged, id: "categories", "space-below": "2" })), index.h("div", { key: '6cc0dbeb1c98470bdce24faf880210f64e0edd72', class: "select-wrapper-2" }, index.h("biggive-form-field-select", { key: '5109c83967e666a5254814ddaf822cffbda2b6af', backgroundColour: "white", prompt: "Beneficiary", placeholder: this.beneficiariesPlaceHolderText, selectedLabel: this.selectedFilterBeneficiary, selectedValue: this.selectedFilterBeneficiary, options: this.optionsToArray(this.beneficiaryOptions || []), selectionChanged: this.beneficiarySelectionChanged, id: "beneficiaries", "space-below": "2" })), index.h("div", { key: '213fb6972e212a3ed593445701e55cd9c9df4e70', class: "select-wrapper-3" }, index.h("biggive-form-field-select", { key: 'c5f0c913deb5b3eb1cdde23cc4f59fd4d856bdc7', backgroundColour: "white", prompt: "Location", placeholder: this.locationsPlaceHolderText, selectedLabel: this.selectedFilterLocation, selectedValue: this.selectedFilterLocation, options: this.optionsToArray(this.locationOptions || []), selectionChanged: this.locationSelectionChanged, id: "locations", "space-below": "2" })), index.h("div", { key: 'd5ebed141c6f2df713044838802e41d59a99c033', class: "align-right" }, index.h("biggive-button", { key: '5fe81bf0b04ef44618264aa4dae4b31df44f74c2', label: "Apply filters", onDoButtonClick: this.handleApplyFilterButtonClick })))), index.h("div", { key: '36cbb004dc2c0b3d6435c853893f279f7cc2a0b4', class: "sort-wrap" }, index.h("biggive-form-field-select", { key: 'ce1b686a810d10452ef1c2fabf346117cd3990c4', options: sortOptions, prompt: null, "select-style": "underlined", placeholder: this.sortByPlaceholderText, selectedLabel: this.selectedSortByOption, selectedValue: this.getSelectedValue(), selectionChanged: this.sortBySelectionChanged, id: "sort-by" }, index.h("biggive-form-field-select-option", { key: 'eb016dccffc6b0c63de001ec5e7c15c0215f58f7', value: "amountRaised", label: "Most raised" }), index.h("biggive-form-field-select-option", { key: '4df7ba1f42d0bb2d1e53c2e40db788bc4862ffed', value: "leastRaised", label: "Least raised" }), index.h("biggive-form-field-select-option", { key: '6ee1373b12f664ffc9b2d86fbfae71c5ee89c808', value: "matchFundsRemaining", label: "Most funds remaining" }), index.h("biggive-form-field-select-option", { key: 'e2cf6339701f3f03fd1a1a1ddd55a697db189b64', value: "closeToTarget", label: "Nearest target" }), (this.searchText || '').length > 0 ? index.h("biggive-form-field-select-option", { value: "Relevance", label: "Relevance" }) : null))), index.h("div", { key: 'f6e3bf0f207f735c91b9053f43b1a75a6ec33b34', class: "selected-filter-wrap" }, index.h("div", { key: 'bfdbb504e478326031d977b1af88f2cc74d2f841', class: "selected-filters" }, this.selectedFilterCategory && (index.h("span", { key: 'bbb0ea75b53fed704a910faa8962bd9f70454b25', class: "button", onClick: () => {
|
|
232
232
|
this.removeFilter('categories');
|
|
233
|
-
} }, this.selectedFilterCategory)), this.selectedFilterBeneficiary && (index.h("span", { key: '
|
|
233
|
+
} }, this.selectedFilterCategory)), this.selectedFilterBeneficiary && (index.h("span", { key: '5d391afc2dfd66119892f7b77038125e5703728e', class: "button", onClick: () => {
|
|
234
234
|
this.removeFilter('beneficiaries');
|
|
235
|
-
} }, this.selectedFilterBeneficiary)), this.selectedFilterLocation && (index.h("span", { key: '
|
|
235
|
+
} }, this.selectedFilterBeneficiary)), this.selectedFilterLocation && (index.h("span", { key: 'bc7b957d2d76cdfede96921c0a006da77690b3fc', class: "button", onClick: () => {
|
|
236
236
|
this.removeFilter('locations');
|
|
237
|
-
} }, this.selectedFilterLocation))), index.h("div", { key: '
|
|
237
|
+
} }, this.selectedFilterLocation))), index.h("div", { key: 'bf228470ec15507617fa98b20eda6b2584ca359d', class: "clear-all" }, index.h("a", { key: '5e210df20d0dc4951b98888958d03ff0ed74cf0c', onClick: this.handleClearAll }, "Clear all"))), index.h("div", { key: '155ef43b9888223f6a480130df3aa47bafd78741', class: "campaign-grid" }, index.h("slot", { key: 'ee3ff728b4ce9a11e33401236ccee3a581ef39a0', name: "campaign-grid" })))));
|
|
238
238
|
}
|
|
239
239
|
// I'm not sure if I understand the reasoning for own-methods-must-be-private. I made the method below public to unit
|
|
240
240
|
// test it. Maybe the idea is that we should move anything with enough logic to test outside the component class? I
|
|
@@ -220,13 +220,13 @@ export class BiggiveCampaignCardFilterGrid {
|
|
|
220
220
|
render() {
|
|
221
221
|
var _a;
|
|
222
222
|
const sortOptions = this.getSortOptions();
|
|
223
|
-
return (h("div", { key: 'ceb2f44c3c853bfdc3da18ad187de4cc5a085ffb', class: 'container space-below-' + this.spaceBelow }, h("div", { key: '8f6370902bfabe8a9df23e274d05298ca316b12b', class: "sleeve" }, h("div", { key: '89fc861fdb61827ab5dbb5cee88a4dfdd0a8abcb', class: "search-wrap" }, h("h4", { key: '04363e5852c2347036e52efd75c0acfd83df5901' }, this.intro), h("div", { key: 'dd18cb11be900192f0a5a26f027b0102453e50ad', class: "field-wrap" }, h("div", { key: 'a9798f3d6943cfb5494452bf23ea5ce03c288a45', class: "input-wrap" }, h("svg", { key: '9296bccad620aaba713b252fb31c7f3efd4b1a96', xmlns: "http://www.w3.org/2000/svg", class: "icon", viewBox: "0 0 512 512" }, h("path", { key: '718a7766577cf08ba55ebae64b60b312cfcf8edf', d: faMagnifyingGlass.icon[4].toString() })), h("input", { key: 'e89ff0c306417359e72597edf932166970e01702', type: "text", value: (_a = this.searchText) !== null && _a !== void 0 ? _a : '', class: "input-text", placeholder: this.placeholderText, onInput: this.handleSearchTextChanged, onKeyDown: this.handleEnterPressed })), h("biggive-button", { key: '7713463cc5c611be7e96290c91da7691c3bba5e4', onDoButtonClick: this.handleSearchButtonPressed, label: this.buttonText }))), h("div", { key: 'eb4ac758e446eda26be72dad7239fd525c520c39', class: "sort-filter-wrap" }, this.enableSearchByLocation && this.offerNearMeOption && (h("biggive-button", { key: '
|
|
223
|
+
return (h("div", { key: 'ceb2f44c3c853bfdc3da18ad187de4cc5a085ffb', class: 'container space-below-' + this.spaceBelow }, h("div", { key: '8f6370902bfabe8a9df23e274d05298ca316b12b', class: "sleeve" }, h("div", { key: '89fc861fdb61827ab5dbb5cee88a4dfdd0a8abcb', class: "search-wrap" }, h("h4", { key: '04363e5852c2347036e52efd75c0acfd83df5901' }, this.intro), h("div", { key: 'dd18cb11be900192f0a5a26f027b0102453e50ad', class: "field-wrap" }, h("div", { key: 'a9798f3d6943cfb5494452bf23ea5ce03c288a45', class: "input-wrap" }, h("svg", { key: '9296bccad620aaba713b252fb31c7f3efd4b1a96', xmlns: "http://www.w3.org/2000/svg", class: "icon", viewBox: "0 0 512 512" }, h("path", { key: '718a7766577cf08ba55ebae64b60b312cfcf8edf', d: faMagnifyingGlass.icon[4].toString() })), h("input", { key: 'e89ff0c306417359e72597edf932166970e01702', type: "text", value: (_a = this.searchText) !== null && _a !== void 0 ? _a : '', class: "input-text", placeholder: this.placeholderText, onInput: this.handleSearchTextChanged, onKeyDown: this.handleEnterPressed })), h("biggive-button", { key: '7713463cc5c611be7e96290c91da7691c3bba5e4', onDoButtonClick: this.handleSearchButtonPressed, label: this.buttonText }))), h("div", { key: 'eb4ac758e446eda26be72dad7239fd525c520c39', class: "sort-filter-wrap" }, this.enableSearchByLocation && this.offerNearMeOption && (h("biggive-button", { key: '6f571b4193453203cc11cb99c42a475e0360b69d', class: "filter", colourScheme: "primary", onDoButtonClick: this.handleNearMeButtonPressed, label: this.fetchingLocation ? 'Fetching location...' : 'Charities near me', disabled: this.fetchingLocation, fullWidth: true, "space-below": "0" })), h("div", { key: '07fa78bea86edf2b60492b42e8e91ff9b44e9830', class: "filter-wrap" }, h("biggive-button", { key: '0f6775e87d80f1b91dd57ef39260838932dd099d', class: "filter", colourScheme: "primary", onDoButtonClick: this.handleFilterButtonClick, label: "Filter", fullWidth: true, "space-below": "0" }), h("biggive-popup", { key: 'fe87d7b2fc75583f421855eee6dd22132ec77096', id: "filter-popup" }, h("h4", { key: '50cc5ea69df122c34ff8bc615088f7a7e07d992e', class: "space-above-0 space-below-3 text-colour-primary" }, "Filters"), h("div", { key: 'c0354b38830bb635e19ad38dfd306e41b72aedff', class: "select-wrapper-1" }, h("biggive-form-field-select", { key: 'a1ce6c7b5c956e01958a74f98d6a1238486dd511', backgroundColour: "white", prompt: "Category", placeholder: this.categoriesPlaceHolderText, selectedLabel: this.selectedFilterCategory, selectedValue: this.selectedFilterCategory, options: this.optionsToArray(this.categoryOptions || []), selectionChanged: this.categoryFilterSelectionChanged, id: "categories", "space-below": "2" })), h("div", { key: '6cc0dbeb1c98470bdce24faf880210f64e0edd72', class: "select-wrapper-2" }, h("biggive-form-field-select", { key: '5109c83967e666a5254814ddaf822cffbda2b6af', backgroundColour: "white", prompt: "Beneficiary", placeholder: this.beneficiariesPlaceHolderText, selectedLabel: this.selectedFilterBeneficiary, selectedValue: this.selectedFilterBeneficiary, options: this.optionsToArray(this.beneficiaryOptions || []), selectionChanged: this.beneficiarySelectionChanged, id: "beneficiaries", "space-below": "2" })), h("div", { key: '213fb6972e212a3ed593445701e55cd9c9df4e70', class: "select-wrapper-3" }, h("biggive-form-field-select", { key: 'c5f0c913deb5b3eb1cdde23cc4f59fd4d856bdc7', backgroundColour: "white", prompt: "Location", placeholder: this.locationsPlaceHolderText, selectedLabel: this.selectedFilterLocation, selectedValue: this.selectedFilterLocation, options: this.optionsToArray(this.locationOptions || []), selectionChanged: this.locationSelectionChanged, id: "locations", "space-below": "2" })), h("div", { key: 'd5ebed141c6f2df713044838802e41d59a99c033', class: "align-right" }, h("biggive-button", { key: '5fe81bf0b04ef44618264aa4dae4b31df44f74c2', label: "Apply filters", onDoButtonClick: this.handleApplyFilterButtonClick })))), h("div", { key: '36cbb004dc2c0b3d6435c853893f279f7cc2a0b4', class: "sort-wrap" }, h("biggive-form-field-select", { key: 'ce1b686a810d10452ef1c2fabf346117cd3990c4', options: sortOptions, prompt: null, "select-style": "underlined", placeholder: this.sortByPlaceholderText, selectedLabel: this.selectedSortByOption, selectedValue: this.getSelectedValue(), selectionChanged: this.sortBySelectionChanged, id: "sort-by" }, h("biggive-form-field-select-option", { key: 'eb016dccffc6b0c63de001ec5e7c15c0215f58f7', value: "amountRaised", label: "Most raised" }), h("biggive-form-field-select-option", { key: '4df7ba1f42d0bb2d1e53c2e40db788bc4862ffed', value: "leastRaised", label: "Least raised" }), h("biggive-form-field-select-option", { key: '6ee1373b12f664ffc9b2d86fbfae71c5ee89c808', value: "matchFundsRemaining", label: "Most funds remaining" }), h("biggive-form-field-select-option", { key: 'e2cf6339701f3f03fd1a1a1ddd55a697db189b64', value: "closeToTarget", label: "Nearest target" }), (this.searchText || '').length > 0 ? h("biggive-form-field-select-option", { value: "Relevance", label: "Relevance" }) : null))), h("div", { key: 'f6e3bf0f207f735c91b9053f43b1a75a6ec33b34', class: "selected-filter-wrap" }, h("div", { key: 'bfdbb504e478326031d977b1af88f2cc74d2f841', class: "selected-filters" }, this.selectedFilterCategory && (h("span", { key: 'bbb0ea75b53fed704a910faa8962bd9f70454b25', class: "button", onClick: () => {
|
|
224
224
|
this.removeFilter('categories');
|
|
225
|
-
} }, this.selectedFilterCategory)), this.selectedFilterBeneficiary && (h("span", { key: '
|
|
225
|
+
} }, this.selectedFilterCategory)), this.selectedFilterBeneficiary && (h("span", { key: '5d391afc2dfd66119892f7b77038125e5703728e', class: "button", onClick: () => {
|
|
226
226
|
this.removeFilter('beneficiaries');
|
|
227
|
-
} }, this.selectedFilterBeneficiary)), this.selectedFilterLocation && (h("span", { key: '
|
|
227
|
+
} }, this.selectedFilterBeneficiary)), this.selectedFilterLocation && (h("span", { key: 'bc7b957d2d76cdfede96921c0a006da77690b3fc', class: "button", onClick: () => {
|
|
228
228
|
this.removeFilter('locations');
|
|
229
|
-
} }, this.selectedFilterLocation))), h("div", { key: '
|
|
229
|
+
} }, this.selectedFilterLocation))), h("div", { key: 'bf228470ec15507617fa98b20eda6b2584ca359d', class: "clear-all" }, h("a", { key: '5e210df20d0dc4951b98888958d03ff0ed74cf0c', onClick: this.handleClearAll }, "Clear all"))), h("div", { key: '155ef43b9888223f6a480130df3aa47bafd78741', class: "campaign-grid" }, h("slot", { key: 'ee3ff728b4ce9a11e33401236ccee3a581ef39a0', name: "campaign-grid" })))));
|
|
230
230
|
}
|
|
231
231
|
// I'm not sure if I understand the reasoning for own-methods-must-be-private. I made the method below public to unit
|
|
232
232
|
// test it. Maybe the idea is that we should move anything with enough logic to test outside the component class? I
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{proxyCustomElement as e,HTMLElement as t,createEvent as i,h as a,transformTag as s}from"@stencil/core/internal/client";import{f as l}from"./index2.js";import{d as o}from"./biggive-button2.js";import{d as r}from"./biggive-form-field-select2.js";import{d as c}from"./biggive-popup2.js";const n={relevance:"Relevance",amountRaised:"Most raised",leastRaised:"Least raised",closeToTarget:"Nearest target",matchFundsRemaining:"Most funds remaining"},d=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.doSearchAndFilterUpdate=i(this,"doSearchAndFilterUpdate",7),this.doGetLocationFromBrowser=i(this,"doGetLocationFromBrowser",7),this.sortByPlaceholderText="Sort by",this.beneficiariesPlaceHolderText="Select beneficiary",this.categoriesPlaceHolderText="Select category",this.locationsPlaceHolderText="Select location",this.newSelectedFilterCategory=null,this.newSelectedFilterBeneficiary=null,this.newSelectedFilterLocation=null,this.spaceBelow=0,this.intro="Find a charity or project",this.searchText=null,this.placeholderText="Search",this.buttonText="Search",this.selectedFilterCategory=null,this.selectedFilterBeneficiary=null,this.selectedFilterLocation=null,this.enableSearchByLocation=!1,this.fetchingLocation=!1,this.location=void 0,this.categoryFilterSelectionChanged=e=>{this.newSelectedFilterCategory=e},this.beneficiarySelectionChanged=e=>{this.newSelectedFilterBeneficiary=e},this.locationSelectionChanged=e=>{this.newSelectedFilterLocation=e},this.sortBySelectionChanged=e=>{this.selectedSortByOption=e,this.doSearchAndFilterUpdate.emit(this.getSearchAndFilterObject())},this.handleApplyFilterButtonClick=()=>{var e,t,i,a;this.selectedFilterCategory=null!==(e=this.newSelectedFilterCategory)&&void 0!==e?e:this.selectedFilterCategory,this.selectedFilterBeneficiary=null!==(t=this.newSelectedFilterBeneficiary)&&void 0!==t?t:this.selectedFilterBeneficiary,this.selectedFilterLocation=null!==(i=this.newSelectedFilterLocation)&&void 0!==i?i:this.selectedFilterLocation;const s=this.getSearchAndFilterObject();this.doSearchAndFilterUpdate.emit(s);const l=null===(a=this.el.shadowRoot)||void 0===a?void 0:a.getElementById("filter-popup");l&&l.closeFromOutside(),this.filtersApplied="string"==typeof s.filterBeneficiary||"string"==typeof s.filterCategory||"string"==typeof s.filterLocation},this.handleSearchButtonPressed=()=>{this.unfocusTextInput(),this.doSearchAndFilterUpdate.emit(this.getSearchAndFilterObject()),this.hasSearchTerm()&&(this.selectedSortByOption="Relevance")},this.handleNearMeButtonPressed=()=>{this.unfocusTextInput(),this.doGetLocationFromBrowser.emit()},this.handleSearchTextChanged=e=>{this.searchText=e.target.value},this.handleEnterPressed=e=>{"Enter"===e.key&&(this.unfocusTextInput(),this.doSearchAndFilterUpdate.emit(this.getSearchAndFilterObject()))},this.handleFilterButtonClick=()=>{var e;this.newSelectedFilterBeneficiary=this.selectedFilterBeneficiary,this.newSelectedFilterCategory=this.selectedFilterCategory,this.newSelectedFilterLocation=this.selectedFilterLocation;const t=null===(e=this.el.shadowRoot)||void 0===e?void 0:e.getElementById("filter-popup");t&&t.openFromOutside()},this.handleClearAll=()=>{var e;this.unfocusTextInput(),this.filtersApplied=!1,this.searchText=null,this.selectedSortByOption=this.initialSortByOption,this.selectedFilterBeneficiary=null,this.selectedFilterCategory=null,this.selectedFilterLocation=null,["sort-by","categories","beneficiaries","locations","funding"].forEach((e=>{var t;const i=null===(t=this.el.shadowRoot)||void 0===t?void 0:t.getElementById(e);i&&(i.selectedValue=null,i.selectedLabel=null)}));const t=null===(e=this.el.shadowRoot)||void 0===e?void 0:e.querySelector(".selected-filters");t&&t.querySelectorAll(".button").forEach((e=>{e.remove()})),this.doSearchAndFilterUpdate.emit({searchText:null,sortBy:null,filterCategory:null,filterBeneficiary:null,filterLocation:null})}}async unfocusInputs(){this.unfocusTextInput()}getSearchAndFilterObject(){return{searchText:this.searchText,sortBy:this.selectedSortByOption,filterCategory:this.selectedFilterCategory,filterBeneficiary:this.selectedFilterBeneficiary,filterLocation:this.selectedFilterLocation}}removeFilter(e){var t;switch(e){case"beneficiaries":this.selectedFilterBeneficiary=null;break;case"categories":this.selectedFilterCategory=null;break;case"locations":this.selectedFilterLocation=null;break;default:console.error(e)}const i=null===(t=this.el.shadowRoot)||void 0===t?void 0:t.getElementById(e);i&&(i.selectedLabel=null,i.selectedValue=null,this.doSearchAndFilterUpdate.emit(this.getSearchAndFilterObject()))}unfocusTextInput(){var e;const t=null===(e=this.el.shadowRoot)||void 0===e?void 0:e.querySelector(".input-text");null==t||t.blur()}componentWillRender(){this.filtersApplied=null!==this.selectedFilterCategory||null!==this.selectedFilterBeneficiary||null!==this.selectedFilterLocation,this.initialSortByOption=this.selectedSortByOption}render(){var e;const t=this.getSortOptions();return a("div",{key:"ceb2f44c3c853bfdc3da18ad187de4cc5a085ffb",class:"container space-below-"+this.spaceBelow},a("div",{key:"8f6370902bfabe8a9df23e274d05298ca316b12b",class:"sleeve"},a("div",{key:"89fc861fdb61827ab5dbb5cee88a4dfdd0a8abcb",class:"search-wrap"},a("h4",{key:"04363e5852c2347036e52efd75c0acfd83df5901"},this.intro),a("div",{key:"dd18cb11be900192f0a5a26f027b0102453e50ad",class:"field-wrap"},a("div",{key:"a9798f3d6943cfb5494452bf23ea5ce03c288a45",class:"input-wrap"},a("svg",{key:"9296bccad620aaba713b252fb31c7f3efd4b1a96",xmlns:"http://www.w3.org/2000/svg",class:"icon",viewBox:"0 0 512 512"},a("path",{key:"718a7766577cf08ba55ebae64b60b312cfcf8edf",d:""+l.icon[4]})),a("input",{key:"e89ff0c306417359e72597edf932166970e01702",type:"text",value:null!==(e=this.searchText)&&void 0!==e?e:"",class:"input-text",placeholder:this.placeholderText,onInput:this.handleSearchTextChanged,onKeyDown:this.handleEnterPressed})),a("biggive-button",{key:"7713463cc5c611be7e96290c91da7691c3bba5e4",onDoButtonClick:this.handleSearchButtonPressed,label:this.buttonText}))),a("div",{key:"eb4ac758e446eda26be72dad7239fd525c520c39",class:"sort-filter-wrap"},this.enableSearchByLocation&&this.offerNearMeOption&&a("biggive-button",{key:"fe100d32987271001b584fbba653ab733e0d3037",class:"filter",colourScheme:"primary",onDoButtonClick:this.handleNearMeButtonPressed,label:this.fetchingLocation?"Fetching location...":"Charities near me",disabled:!this.fetchingLocation,fullWidth:!0,"space-below":"0"}),a("div",{key:"30a35a0db88c129c27dd9c20b75d7516a7316ba8",class:"filter-wrap"},a("biggive-button",{key:"f93528615753291fd194e9675ff79c53b0a45943",class:"filter",colourScheme:"primary",onDoButtonClick:this.handleFilterButtonClick,label:"Filter",fullWidth:!0,"space-below":"0"}),a("biggive-popup",{key:"ef7b9eedfade6cb4027fb2789226bf697f420c91",id:"filter-popup"},a("h4",{key:"5af7616eff806f4f455119f021e57a1d06fe8a0d",class:"space-above-0 space-below-3 text-colour-primary"},"Filters"),a("div",{key:"ee857c0d3ca4e3f9aa3c8ae339ac256b19c529e5",class:"select-wrapper-1"},a("biggive-form-field-select",{key:"8ce9507ba455de76430c16f95d5d38a42e17fed2",backgroundColour:"white",prompt:"Category",placeholder:this.categoriesPlaceHolderText,selectedLabel:this.selectedFilterCategory,selectedValue:this.selectedFilterCategory,options:this.optionsToArray(this.categoryOptions||[]),selectionChanged:this.categoryFilterSelectionChanged,id:"categories","space-below":"2"})),a("div",{key:"fede3134ddd0696cc7b181d53b1141b0baa6cc18",class:"select-wrapper-2"},a("biggive-form-field-select",{key:"b5a3fb4f023760c0909088ae0e3780268c0db855",backgroundColour:"white",prompt:"Beneficiary",placeholder:this.beneficiariesPlaceHolderText,selectedLabel:this.selectedFilterBeneficiary,selectedValue:this.selectedFilterBeneficiary,options:this.optionsToArray(this.beneficiaryOptions||[]),selectionChanged:this.beneficiarySelectionChanged,id:"beneficiaries","space-below":"2"})),a("div",{key:"2e39d963ca785aae5d4a50e9051e3b3f1ac42733",class:"select-wrapper-3"},a("biggive-form-field-select",{key:"6e873fb07978e97cfbe868f77d94b5e6a73d828a",backgroundColour:"white",prompt:"Location",placeholder:this.locationsPlaceHolderText,selectedLabel:this.selectedFilterLocation,selectedValue:this.selectedFilterLocation,options:this.optionsToArray(this.locationOptions||[]),selectionChanged:this.locationSelectionChanged,id:"locations","space-below":"2"})),a("div",{key:"2ff04e800f368fae58f05820fef385f08a5bb73d",class:"align-right"},a("biggive-button",{key:"437493a55113a5a95f85b07bc01825e55b195ecd",label:"Apply filters",onDoButtonClick:this.handleApplyFilterButtonClick})))),a("div",{key:"e5893df8c1348a3bbaa9389884eed09672616dd0",class:"sort-wrap"},a("biggive-form-field-select",{key:"cf5681ff7096d71fc8b27195853a1db44ddb3e8d",options:t,prompt:null,"select-style":"underlined",placeholder:this.sortByPlaceholderText,selectedLabel:this.selectedSortByOption,selectedValue:this.getSelectedValue(),selectionChanged:this.sortBySelectionChanged,id:"sort-by"},a("biggive-form-field-select-option",{key:"943113783bd5331a484ca1701d794112eb6a7bac",value:"amountRaised",label:"Most raised"}),a("biggive-form-field-select-option",{key:"a12bc8d837e29675ad85c3df4aedb459499dd0b6",value:"leastRaised",label:"Least raised"}),a("biggive-form-field-select-option",{key:"64d3287ee368c5d51c95b9af3588c28861b6a7de",value:"matchFundsRemaining",label:"Most funds remaining"}),a("biggive-form-field-select-option",{key:"2cb9a2a2115d2a3e042c964ad89091be3704214e",value:"closeToTarget",label:"Nearest target"}),(this.searchText||"").length>0?a("biggive-form-field-select-option",{value:"Relevance",label:"Relevance"}):null))),a("div",{key:"a772256d34001e35257a278f841c5b9fe886d12e",class:"selected-filter-wrap"},a("div",{key:"9d3947afa52842a11ef1338450789e9a5d389ee3",class:"selected-filters"},this.selectedFilterCategory&&a("span",{key:"2bd20241fe40a5acb5dc628b83a0e6c3f78cb5c0",class:"button",onClick:()=>{this.removeFilter("categories")}},this.selectedFilterCategory),this.selectedFilterBeneficiary&&a("span",{key:"ae76369709cd8540ebf4287b5e337943e3e1d8e9",class:"button",onClick:()=>{this.removeFilter("beneficiaries")}},this.selectedFilterBeneficiary),this.selectedFilterLocation&&a("span",{key:"73c489be03db7c92f517a2d1b63490cc1de6cff8",class:"button",onClick:()=>{this.removeFilter("locations")}},this.selectedFilterLocation)),a("div",{key:"f283d737e862792b7fa2cebe16ec8f3014ee9e1f",class:"clear-all"},a("a",{key:"7ef1c3ee2d4ac438fd21381d24ba9810530eb629",onClick:this.handleClearAll},"Clear all"))),a("div",{key:"07da3888322df14430a72752c49f65e93f741b1c",class:"campaign-grid"},a("slot",{key:"78a2bee33c15df96678182f8d6535ee49af43b58",name:"campaign-grid"}))))}getSelectedValue(){const e=this.selectedSortByOption;if(void 0===e)return;const t=this.getSortOptions().filter((t=>t.label.toLowerCase()===e.toLowerCase()))[0];return null==t?void 0:t.value}getSortOptions(){return Object.getOwnPropertyNames(n).filter((e=>"relevance"!==e||this.hasSearchTerm())).map((e=>({value:e,label:n[e]})))}hasSearchTerm(){return"string"==typeof this.searchText&&this.searchText.length>0}optionsToArray(e){return"string"==typeof e&&(e=JSON.parse(e)),Array.isArray(e)?e.map((e=>({value:e,label:e}))):Object.entries(e).map((e=>({value:e[0],label:e[1]})))}get el(){return this}static get style(){return'a{color:inherit;text-decoration:underline}a:hover{text-decoration:none}.space-above-0{margin-top:0}.space-above-1{margin-top:5px}.space-above-2{margin-top:10px}.space-above-3{margin-top:15px}.space-above-4{margin-top:30px}.space-above-5{margin-top:45px}.space-above-6{margin-top:60px}.space-below-0{margin-bottom:0}.space-below-1{margin-bottom:5px}.space-below-2{margin-bottom:10px}.space-below-3{margin-bottom:15px}.space-below-4{margin-bottom:30px}.space-below-5{margin-bottom:45px}.space-below-6{margin-bottom:60px}:host{display:content}.select-wrapper-1,.select-wrapper-2,.select-wrapper-3,.select-wrapper-4{position:relative;margin-top:1em}.select-wrapper-1{z-index:4}.select-wrapper-2{z-index:3}.select-wrapper-3{z-index:2}.select-wrapper-4{z-index:1}.container{font-family:"Euclid Triangle", sans-serif;font-size:17px;line-height:24px;position:relative}.container .search-wrap{background-color:#FFFFFF;padding:15px 30px;margin-bottom:15px}.container .search-wrap h4{margin-bottom:15px}.container .search-wrap .field-wrap{display:flex;justify-content:space-between}.container .search-wrap .field-wrap .input-wrap{display:flex;justify-content:space-between;padding-bottom:5px;border-bottom:1px solid #000000;margin-right:30px;flex-grow:1}.container .search-wrap .field-wrap .input-wrap input{border:0}.container .search-wrap .field-wrap button{padding:5px 30px}.selected-filter-wrap{display:flex;margin-bottom:23px;padding:0}.selected-filter-wrap .button{margin-bottom:7px;display:inline-block;cursor:pointer;border-radius:20px;padding:5px 50px 5px 20px;margin-right:15px;background-color:#FF7272;color:#000000;border:1px solid #FF7272;text-decoration:none;background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIGlkPSJMYXllcl8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiIHk9IjBweCIKCSB2aWV3Qm94PSIwIDAgMTguNCAxOC40IiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCAxOC40IDE4LjQ7IiB4bWw6c3BhY2U9InByZXNlcnZlIj4KPHN0eWxlIHR5cGU9InRleHQvY3NzIj4KCS5zdDB7c3Ryb2tlOiMwMDAwMDA7fQo8L3N0eWxlPgo8cGF0aCBjbGFzcz0ic3QwIiBkPSJNOS4yLDguNUwxNywwLjdsMC43LDAuN0w5LjksOS4ybDcuOCw3LjhMMTcsMTcuN0w5LjIsOS45bC03LjgsNy44TDAuNywxN2w3LjgtNy44TDAuNywxLjRsMC43LTAuN0w5LjIsOC41eiIvPgo8L3N2Zz4K);background-repeat:no-repeat;background-position:right 20px center;background-size:12px auto}.selected-filter-wrap .button:hover{background-color:#FFFFFF;color:#000000}.selected-filter-wrap .clear-all{margin-left:auto}.selected-filter-wrap .clear-all a{display:inline-block;cursor:pointer;border-radius:20px;padding:5px 20px;background-color:#2C089B;color:#FFFFFF;border:1px solid #2C089B;text-decoration:none}.selected-filter-wrap .clear-all a:hover{background-color:#FFFFFF;color:#2C089B}.sort-filter-wrap{display:flex;justify-content:flex-end;margin-bottom:30px;padding:0;text-align:right;display:flex}.sort-filter-wrap .clear-all{cursor:pointer;vertical-align:center;margin-top:auto;margin-bottom:auto}.sort-filter-wrap .sort-wrap{margin-left:15px}.sort-filter-wrap .filter-wrap{background-color:#F6F6F6;margin-left:15px}.sort-filter-wrap .filter-wrap .button.filter{padding-left:60px;padding-right:30px}.sort-filter-wrap .filter-wrap .button.filter .filter-icon{content:"";display:block;position:absolute;left:25px;top:17px;width:13px;height:13px}.sort-filter-wrap .filter-wrap .button.filter .filter-icon svg{width:100%;height:auto;vertical-align:top}.sort-filter-wrap .filter-wrap .button.filter .filter-icon svg:hover{fill:#2C089B}.icon{height:1rem;width:2rem;vertical-align:-0.125rem;margin:auto}.icon>path{fill:#2C089B}.icon-clear-all>path{fill:#000000}@media screen and (max-width: 450px){.sort-filter-wrap{flex-direction:column-reverse}.sort-filter-wrap .sort-wrap{margin-top:20px;margin-bottom:20px}}@media screen and (max-width: 350px){.sort-filter-wrap{justify-content:space-between}.sort-filter-wrap .sort-wrap{margin-left:0px}.sort-filter-wrap .filter-wrap{margin-left:3px}}.align-right{text-align:right}.input-text{font-family:"Euclid Triangle", sans-serif;font-size:17px;line-height:24px;color:#000000;padding:5px 10px;box-sizing:border-box;width:100%}.input-text:focus{outline:0}.input-text::placeholder{color:#4A4A4A}.text-colour-primary{color:#2C089B}'}},[257,"biggive-campaign-card-filter-grid",{spaceBelow:[2,"space-below"],intro:[1],searchText:[1,"search-text"],placeholderText:[1,"placeholder-text"],buttonText:[1,"button-text"],categoryOptions:[1,"category-options"],beneficiaryOptions:[1,"beneficiary-options"],locationOptions:[1,"location-options"],selectedSortByOption:[1025,"selected-sort-by-option"],selectedFilterCategory:[1025,"selected-filter-category"],selectedFilterBeneficiary:[1025,"selected-filter-beneficiary"],selectedFilterLocation:[1025,"selected-filter-location"],enableSearchByLocation:[4,"enable-search-by-location"],offerNearMeOption:[4,"offer-near-me-option"],fetchingLocation:[4,"fetching-location"],location:[16],filtersApplied:[32],unfocusInputs:[64]}]),p=d,b=function(){"undefined"!=typeof customElements&&["biggive-campaign-card-filter-grid","biggive-button","biggive-form-field-select","biggive-popup"].forEach((e=>{switch(e){case"biggive-campaign-card-filter-grid":customElements.get(s(e))||customElements.define(s(e),d);break;case"biggive-button":customElements.get(s(e))||o();break;case"biggive-form-field-select":customElements.get(s(e))||r();break;case"biggive-popup":customElements.get(s(e))||c()}}))};export{p as BiggiveCampaignCardFilterGrid,b as defineCustomElement}
|
|
1
|
+
import{proxyCustomElement as e,HTMLElement as t,createEvent as i,h as a,transformTag as s}from"@stencil/core/internal/client";import{f as l}from"./index2.js";import{d as o}from"./biggive-button2.js";import{d as r}from"./biggive-form-field-select2.js";import{d as c}from"./biggive-popup2.js";const n={relevance:"Relevance",amountRaised:"Most raised",leastRaised:"Least raised",closeToTarget:"Nearest target",matchFundsRemaining:"Most funds remaining"},d=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.doSearchAndFilterUpdate=i(this,"doSearchAndFilterUpdate",7),this.doGetLocationFromBrowser=i(this,"doGetLocationFromBrowser",7),this.sortByPlaceholderText="Sort by",this.beneficiariesPlaceHolderText="Select beneficiary",this.categoriesPlaceHolderText="Select category",this.locationsPlaceHolderText="Select location",this.newSelectedFilterCategory=null,this.newSelectedFilterBeneficiary=null,this.newSelectedFilterLocation=null,this.spaceBelow=0,this.intro="Find a charity or project",this.searchText=null,this.placeholderText="Search",this.buttonText="Search",this.selectedFilterCategory=null,this.selectedFilterBeneficiary=null,this.selectedFilterLocation=null,this.enableSearchByLocation=!1,this.fetchingLocation=!1,this.location=void 0,this.categoryFilterSelectionChanged=e=>{this.newSelectedFilterCategory=e},this.beneficiarySelectionChanged=e=>{this.newSelectedFilterBeneficiary=e},this.locationSelectionChanged=e=>{this.newSelectedFilterLocation=e},this.sortBySelectionChanged=e=>{this.selectedSortByOption=e,this.doSearchAndFilterUpdate.emit(this.getSearchAndFilterObject())},this.handleApplyFilterButtonClick=()=>{var e,t,i,a;this.selectedFilterCategory=null!==(e=this.newSelectedFilterCategory)&&void 0!==e?e:this.selectedFilterCategory,this.selectedFilterBeneficiary=null!==(t=this.newSelectedFilterBeneficiary)&&void 0!==t?t:this.selectedFilterBeneficiary,this.selectedFilterLocation=null!==(i=this.newSelectedFilterLocation)&&void 0!==i?i:this.selectedFilterLocation;const s=this.getSearchAndFilterObject();this.doSearchAndFilterUpdate.emit(s);const l=null===(a=this.el.shadowRoot)||void 0===a?void 0:a.getElementById("filter-popup");l&&l.closeFromOutside(),this.filtersApplied="string"==typeof s.filterBeneficiary||"string"==typeof s.filterCategory||"string"==typeof s.filterLocation},this.handleSearchButtonPressed=()=>{this.unfocusTextInput(),this.doSearchAndFilterUpdate.emit(this.getSearchAndFilterObject()),this.hasSearchTerm()&&(this.selectedSortByOption="Relevance")},this.handleNearMeButtonPressed=()=>{this.unfocusTextInput(),this.doGetLocationFromBrowser.emit()},this.handleSearchTextChanged=e=>{this.searchText=e.target.value},this.handleEnterPressed=e=>{"Enter"===e.key&&(this.unfocusTextInput(),this.doSearchAndFilterUpdate.emit(this.getSearchAndFilterObject()))},this.handleFilterButtonClick=()=>{var e;this.newSelectedFilterBeneficiary=this.selectedFilterBeneficiary,this.newSelectedFilterCategory=this.selectedFilterCategory,this.newSelectedFilterLocation=this.selectedFilterLocation;const t=null===(e=this.el.shadowRoot)||void 0===e?void 0:e.getElementById("filter-popup");t&&t.openFromOutside()},this.handleClearAll=()=>{var e;this.unfocusTextInput(),this.filtersApplied=!1,this.searchText=null,this.selectedSortByOption=this.initialSortByOption,this.selectedFilterBeneficiary=null,this.selectedFilterCategory=null,this.selectedFilterLocation=null,["sort-by","categories","beneficiaries","locations","funding"].forEach((e=>{var t;const i=null===(t=this.el.shadowRoot)||void 0===t?void 0:t.getElementById(e);i&&(i.selectedValue=null,i.selectedLabel=null)}));const t=null===(e=this.el.shadowRoot)||void 0===e?void 0:e.querySelector(".selected-filters");t&&t.querySelectorAll(".button").forEach((e=>{e.remove()})),this.doSearchAndFilterUpdate.emit({searchText:null,sortBy:null,filterCategory:null,filterBeneficiary:null,filterLocation:null})}}async unfocusInputs(){this.unfocusTextInput()}getSearchAndFilterObject(){return{searchText:this.searchText,sortBy:this.selectedSortByOption,filterCategory:this.selectedFilterCategory,filterBeneficiary:this.selectedFilterBeneficiary,filterLocation:this.selectedFilterLocation}}removeFilter(e){var t;switch(e){case"beneficiaries":this.selectedFilterBeneficiary=null;break;case"categories":this.selectedFilterCategory=null;break;case"locations":this.selectedFilterLocation=null;break;default:console.error(e)}const i=null===(t=this.el.shadowRoot)||void 0===t?void 0:t.getElementById(e);i&&(i.selectedLabel=null,i.selectedValue=null,this.doSearchAndFilterUpdate.emit(this.getSearchAndFilterObject()))}unfocusTextInput(){var e;const t=null===(e=this.el.shadowRoot)||void 0===e?void 0:e.querySelector(".input-text");null==t||t.blur()}componentWillRender(){this.filtersApplied=null!==this.selectedFilterCategory||null!==this.selectedFilterBeneficiary||null!==this.selectedFilterLocation,this.initialSortByOption=this.selectedSortByOption}render(){var e;const t=this.getSortOptions();return a("div",{key:"ceb2f44c3c853bfdc3da18ad187de4cc5a085ffb",class:"container space-below-"+this.spaceBelow},a("div",{key:"8f6370902bfabe8a9df23e274d05298ca316b12b",class:"sleeve"},a("div",{key:"89fc861fdb61827ab5dbb5cee88a4dfdd0a8abcb",class:"search-wrap"},a("h4",{key:"04363e5852c2347036e52efd75c0acfd83df5901"},this.intro),a("div",{key:"dd18cb11be900192f0a5a26f027b0102453e50ad",class:"field-wrap"},a("div",{key:"a9798f3d6943cfb5494452bf23ea5ce03c288a45",class:"input-wrap"},a("svg",{key:"9296bccad620aaba713b252fb31c7f3efd4b1a96",xmlns:"http://www.w3.org/2000/svg",class:"icon",viewBox:"0 0 512 512"},a("path",{key:"718a7766577cf08ba55ebae64b60b312cfcf8edf",d:""+l.icon[4]})),a("input",{key:"e89ff0c306417359e72597edf932166970e01702",type:"text",value:null!==(e=this.searchText)&&void 0!==e?e:"",class:"input-text",placeholder:this.placeholderText,onInput:this.handleSearchTextChanged,onKeyDown:this.handleEnterPressed})),a("biggive-button",{key:"7713463cc5c611be7e96290c91da7691c3bba5e4",onDoButtonClick:this.handleSearchButtonPressed,label:this.buttonText}))),a("div",{key:"eb4ac758e446eda26be72dad7239fd525c520c39",class:"sort-filter-wrap"},this.enableSearchByLocation&&this.offerNearMeOption&&a("biggive-button",{key:"6f571b4193453203cc11cb99c42a475e0360b69d",class:"filter",colourScheme:"primary",onDoButtonClick:this.handleNearMeButtonPressed,label:this.fetchingLocation?"Fetching location...":"Charities near me",disabled:this.fetchingLocation,fullWidth:!0,"space-below":"0"}),a("div",{key:"07fa78bea86edf2b60492b42e8e91ff9b44e9830",class:"filter-wrap"},a("biggive-button",{key:"0f6775e87d80f1b91dd57ef39260838932dd099d",class:"filter",colourScheme:"primary",onDoButtonClick:this.handleFilterButtonClick,label:"Filter",fullWidth:!0,"space-below":"0"}),a("biggive-popup",{key:"fe87d7b2fc75583f421855eee6dd22132ec77096",id:"filter-popup"},a("h4",{key:"50cc5ea69df122c34ff8bc615088f7a7e07d992e",class:"space-above-0 space-below-3 text-colour-primary"},"Filters"),a("div",{key:"c0354b38830bb635e19ad38dfd306e41b72aedff",class:"select-wrapper-1"},a("biggive-form-field-select",{key:"a1ce6c7b5c956e01958a74f98d6a1238486dd511",backgroundColour:"white",prompt:"Category",placeholder:this.categoriesPlaceHolderText,selectedLabel:this.selectedFilterCategory,selectedValue:this.selectedFilterCategory,options:this.optionsToArray(this.categoryOptions||[]),selectionChanged:this.categoryFilterSelectionChanged,id:"categories","space-below":"2"})),a("div",{key:"6cc0dbeb1c98470bdce24faf880210f64e0edd72",class:"select-wrapper-2"},a("biggive-form-field-select",{key:"5109c83967e666a5254814ddaf822cffbda2b6af",backgroundColour:"white",prompt:"Beneficiary",placeholder:this.beneficiariesPlaceHolderText,selectedLabel:this.selectedFilterBeneficiary,selectedValue:this.selectedFilterBeneficiary,options:this.optionsToArray(this.beneficiaryOptions||[]),selectionChanged:this.beneficiarySelectionChanged,id:"beneficiaries","space-below":"2"})),a("div",{key:"213fb6972e212a3ed593445701e55cd9c9df4e70",class:"select-wrapper-3"},a("biggive-form-field-select",{key:"c5f0c913deb5b3eb1cdde23cc4f59fd4d856bdc7",backgroundColour:"white",prompt:"Location",placeholder:this.locationsPlaceHolderText,selectedLabel:this.selectedFilterLocation,selectedValue:this.selectedFilterLocation,options:this.optionsToArray(this.locationOptions||[]),selectionChanged:this.locationSelectionChanged,id:"locations","space-below":"2"})),a("div",{key:"d5ebed141c6f2df713044838802e41d59a99c033",class:"align-right"},a("biggive-button",{key:"5fe81bf0b04ef44618264aa4dae4b31df44f74c2",label:"Apply filters",onDoButtonClick:this.handleApplyFilterButtonClick})))),a("div",{key:"36cbb004dc2c0b3d6435c853893f279f7cc2a0b4",class:"sort-wrap"},a("biggive-form-field-select",{key:"ce1b686a810d10452ef1c2fabf346117cd3990c4",options:t,prompt:null,"select-style":"underlined",placeholder:this.sortByPlaceholderText,selectedLabel:this.selectedSortByOption,selectedValue:this.getSelectedValue(),selectionChanged:this.sortBySelectionChanged,id:"sort-by"},a("biggive-form-field-select-option",{key:"eb016dccffc6b0c63de001ec5e7c15c0215f58f7",value:"amountRaised",label:"Most raised"}),a("biggive-form-field-select-option",{key:"4df7ba1f42d0bb2d1e53c2e40db788bc4862ffed",value:"leastRaised",label:"Least raised"}),a("biggive-form-field-select-option",{key:"6ee1373b12f664ffc9b2d86fbfae71c5ee89c808",value:"matchFundsRemaining",label:"Most funds remaining"}),a("biggive-form-field-select-option",{key:"e2cf6339701f3f03fd1a1a1ddd55a697db189b64",value:"closeToTarget",label:"Nearest target"}),(this.searchText||"").length>0?a("biggive-form-field-select-option",{value:"Relevance",label:"Relevance"}):null))),a("div",{key:"f6e3bf0f207f735c91b9053f43b1a75a6ec33b34",class:"selected-filter-wrap"},a("div",{key:"bfdbb504e478326031d977b1af88f2cc74d2f841",class:"selected-filters"},this.selectedFilterCategory&&a("span",{key:"bbb0ea75b53fed704a910faa8962bd9f70454b25",class:"button",onClick:()=>{this.removeFilter("categories")}},this.selectedFilterCategory),this.selectedFilterBeneficiary&&a("span",{key:"5d391afc2dfd66119892f7b77038125e5703728e",class:"button",onClick:()=>{this.removeFilter("beneficiaries")}},this.selectedFilterBeneficiary),this.selectedFilterLocation&&a("span",{key:"bc7b957d2d76cdfede96921c0a006da77690b3fc",class:"button",onClick:()=>{this.removeFilter("locations")}},this.selectedFilterLocation)),a("div",{key:"bf228470ec15507617fa98b20eda6b2584ca359d",class:"clear-all"},a("a",{key:"5e210df20d0dc4951b98888958d03ff0ed74cf0c",onClick:this.handleClearAll},"Clear all"))),a("div",{key:"155ef43b9888223f6a480130df3aa47bafd78741",class:"campaign-grid"},a("slot",{key:"ee3ff728b4ce9a11e33401236ccee3a581ef39a0",name:"campaign-grid"}))))}getSelectedValue(){const e=this.selectedSortByOption;if(void 0===e)return;const t=this.getSortOptions().filter((t=>t.label.toLowerCase()===e.toLowerCase()))[0];return null==t?void 0:t.value}getSortOptions(){return Object.getOwnPropertyNames(n).filter((e=>"relevance"!==e||this.hasSearchTerm())).map((e=>({value:e,label:n[e]})))}hasSearchTerm(){return"string"==typeof this.searchText&&this.searchText.length>0}optionsToArray(e){return"string"==typeof e&&(e=JSON.parse(e)),Array.isArray(e)?e.map((e=>({value:e,label:e}))):Object.entries(e).map((e=>({value:e[0],label:e[1]})))}get el(){return this}static get style(){return'a{color:inherit;text-decoration:underline}a:hover{text-decoration:none}.space-above-0{margin-top:0}.space-above-1{margin-top:5px}.space-above-2{margin-top:10px}.space-above-3{margin-top:15px}.space-above-4{margin-top:30px}.space-above-5{margin-top:45px}.space-above-6{margin-top:60px}.space-below-0{margin-bottom:0}.space-below-1{margin-bottom:5px}.space-below-2{margin-bottom:10px}.space-below-3{margin-bottom:15px}.space-below-4{margin-bottom:30px}.space-below-5{margin-bottom:45px}.space-below-6{margin-bottom:60px}:host{display:content}.select-wrapper-1,.select-wrapper-2,.select-wrapper-3,.select-wrapper-4{position:relative;margin-top:1em}.select-wrapper-1{z-index:4}.select-wrapper-2{z-index:3}.select-wrapper-3{z-index:2}.select-wrapper-4{z-index:1}.container{font-family:"Euclid Triangle", sans-serif;font-size:17px;line-height:24px;position:relative}.container .search-wrap{background-color:#FFFFFF;padding:15px 30px;margin-bottom:15px}.container .search-wrap h4{margin-bottom:15px}.container .search-wrap .field-wrap{display:flex;justify-content:space-between}.container .search-wrap .field-wrap .input-wrap{display:flex;justify-content:space-between;padding-bottom:5px;border-bottom:1px solid #000000;margin-right:30px;flex-grow:1}.container .search-wrap .field-wrap .input-wrap input{border:0}.container .search-wrap .field-wrap button{padding:5px 30px}.selected-filter-wrap{display:flex;margin-bottom:23px;padding:0}.selected-filter-wrap .button{margin-bottom:7px;display:inline-block;cursor:pointer;border-radius:20px;padding:5px 50px 5px 20px;margin-right:15px;background-color:#FF7272;color:#000000;border:1px solid #FF7272;text-decoration:none;background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIGlkPSJMYXllcl8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiIHk9IjBweCIKCSB2aWV3Qm94PSIwIDAgMTguNCAxOC40IiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCAxOC40IDE4LjQ7IiB4bWw6c3BhY2U9InByZXNlcnZlIj4KPHN0eWxlIHR5cGU9InRleHQvY3NzIj4KCS5zdDB7c3Ryb2tlOiMwMDAwMDA7fQo8L3N0eWxlPgo8cGF0aCBjbGFzcz0ic3QwIiBkPSJNOS4yLDguNUwxNywwLjdsMC43LDAuN0w5LjksOS4ybDcuOCw3LjhMMTcsMTcuN0w5LjIsOS45bC03LjgsNy44TDAuNywxN2w3LjgtNy44TDAuNywxLjRsMC43LTAuN0w5LjIsOC41eiIvPgo8L3N2Zz4K);background-repeat:no-repeat;background-position:right 20px center;background-size:12px auto}.selected-filter-wrap .button:hover{background-color:#FFFFFF;color:#000000}.selected-filter-wrap .clear-all{margin-left:auto}.selected-filter-wrap .clear-all a{display:inline-block;cursor:pointer;border-radius:20px;padding:5px 20px;background-color:#2C089B;color:#FFFFFF;border:1px solid #2C089B;text-decoration:none}.selected-filter-wrap .clear-all a:hover{background-color:#FFFFFF;color:#2C089B}.sort-filter-wrap{display:flex;justify-content:flex-end;margin-bottom:30px;padding:0;text-align:right;display:flex}.sort-filter-wrap .clear-all{cursor:pointer;vertical-align:center;margin-top:auto;margin-bottom:auto}.sort-filter-wrap .sort-wrap{margin-left:15px}.sort-filter-wrap .filter-wrap{background-color:#F6F6F6;margin-left:15px}.sort-filter-wrap .filter-wrap .button.filter{padding-left:60px;padding-right:30px}.sort-filter-wrap .filter-wrap .button.filter .filter-icon{content:"";display:block;position:absolute;left:25px;top:17px;width:13px;height:13px}.sort-filter-wrap .filter-wrap .button.filter .filter-icon svg{width:100%;height:auto;vertical-align:top}.sort-filter-wrap .filter-wrap .button.filter .filter-icon svg:hover{fill:#2C089B}.icon{height:1rem;width:2rem;vertical-align:-0.125rem;margin:auto}.icon>path{fill:#2C089B}.icon-clear-all>path{fill:#000000}@media screen and (max-width: 450px){.sort-filter-wrap{flex-direction:column-reverse}.sort-filter-wrap .sort-wrap{margin-top:20px;margin-bottom:20px}}@media screen and (max-width: 350px){.sort-filter-wrap{justify-content:space-between}.sort-filter-wrap .sort-wrap{margin-left:0px}.sort-filter-wrap .filter-wrap{margin-left:3px}}.align-right{text-align:right}.input-text{font-family:"Euclid Triangle", sans-serif;font-size:17px;line-height:24px;color:#000000;padding:5px 10px;box-sizing:border-box;width:100%}.input-text:focus{outline:0}.input-text::placeholder{color:#4A4A4A}.text-colour-primary{color:#2C089B}'}},[257,"biggive-campaign-card-filter-grid",{spaceBelow:[2,"space-below"],intro:[1],searchText:[1,"search-text"],placeholderText:[1,"placeholder-text"],buttonText:[1,"button-text"],categoryOptions:[1,"category-options"],beneficiaryOptions:[1,"beneficiary-options"],locationOptions:[1,"location-options"],selectedSortByOption:[1025,"selected-sort-by-option"],selectedFilterCategory:[1025,"selected-filter-category"],selectedFilterBeneficiary:[1025,"selected-filter-beneficiary"],selectedFilterLocation:[1025,"selected-filter-location"],enableSearchByLocation:[4,"enable-search-by-location"],offerNearMeOption:[4,"offer-near-me-option"],fetchingLocation:[4,"fetching-location"],location:[16],filtersApplied:[32],unfocusInputs:[64]}]),p=d,f=function(){"undefined"!=typeof customElements&&["biggive-campaign-card-filter-grid","biggive-button","biggive-form-field-select","biggive-popup"].forEach((e=>{switch(e){case"biggive-campaign-card-filter-grid":customElements.get(s(e))||customElements.define(s(e),d);break;case"biggive-button":customElements.get(s(e))||o();break;case"biggive-form-field-select":customElements.get(s(e))||r();break;case"biggive-popup":customElements.get(s(e))||c()}}))};export{p as BiggiveCampaignCardFilterGrid,f as defineCustomElement}
|
|
@@ -226,13 +226,13 @@ const BiggiveCampaignCardFilterGrid = class {
|
|
|
226
226
|
render() {
|
|
227
227
|
var _a;
|
|
228
228
|
const sortOptions = this.getSortOptions();
|
|
229
|
-
return (h("div", { key: 'ceb2f44c3c853bfdc3da18ad187de4cc5a085ffb', class: 'container space-below-' + this.spaceBelow }, h("div", { key: '8f6370902bfabe8a9df23e274d05298ca316b12b', class: "sleeve" }, h("div", { key: '89fc861fdb61827ab5dbb5cee88a4dfdd0a8abcb', class: "search-wrap" }, h("h4", { key: '04363e5852c2347036e52efd75c0acfd83df5901' }, this.intro), h("div", { key: 'dd18cb11be900192f0a5a26f027b0102453e50ad', class: "field-wrap" }, h("div", { key: 'a9798f3d6943cfb5494452bf23ea5ce03c288a45', class: "input-wrap" }, h("svg", { key: '9296bccad620aaba713b252fb31c7f3efd4b1a96', xmlns: "http://www.w3.org/2000/svg", class: "icon", viewBox: "0 0 512 512" }, h("path", { key: '718a7766577cf08ba55ebae64b60b312cfcf8edf', d: faMagnifyingGlass.icon[4].toString() })), h("input", { key: 'e89ff0c306417359e72597edf932166970e01702', type: "text", value: (_a = this.searchText) !== null && _a !== void 0 ? _a : '', class: "input-text", placeholder: this.placeholderText, onInput: this.handleSearchTextChanged, onKeyDown: this.handleEnterPressed })), h("biggive-button", { key: '7713463cc5c611be7e96290c91da7691c3bba5e4', onDoButtonClick: this.handleSearchButtonPressed, label: this.buttonText }))), h("div", { key: 'eb4ac758e446eda26be72dad7239fd525c520c39', class: "sort-filter-wrap" }, this.enableSearchByLocation && this.offerNearMeOption && (h("biggive-button", { key: '
|
|
229
|
+
return (h("div", { key: 'ceb2f44c3c853bfdc3da18ad187de4cc5a085ffb', class: 'container space-below-' + this.spaceBelow }, h("div", { key: '8f6370902bfabe8a9df23e274d05298ca316b12b', class: "sleeve" }, h("div", { key: '89fc861fdb61827ab5dbb5cee88a4dfdd0a8abcb', class: "search-wrap" }, h("h4", { key: '04363e5852c2347036e52efd75c0acfd83df5901' }, this.intro), h("div", { key: 'dd18cb11be900192f0a5a26f027b0102453e50ad', class: "field-wrap" }, h("div", { key: 'a9798f3d6943cfb5494452bf23ea5ce03c288a45', class: "input-wrap" }, h("svg", { key: '9296bccad620aaba713b252fb31c7f3efd4b1a96', xmlns: "http://www.w3.org/2000/svg", class: "icon", viewBox: "0 0 512 512" }, h("path", { key: '718a7766577cf08ba55ebae64b60b312cfcf8edf', d: faMagnifyingGlass.icon[4].toString() })), h("input", { key: 'e89ff0c306417359e72597edf932166970e01702', type: "text", value: (_a = this.searchText) !== null && _a !== void 0 ? _a : '', class: "input-text", placeholder: this.placeholderText, onInput: this.handleSearchTextChanged, onKeyDown: this.handleEnterPressed })), h("biggive-button", { key: '7713463cc5c611be7e96290c91da7691c3bba5e4', onDoButtonClick: this.handleSearchButtonPressed, label: this.buttonText }))), h("div", { key: 'eb4ac758e446eda26be72dad7239fd525c520c39', class: "sort-filter-wrap" }, this.enableSearchByLocation && this.offerNearMeOption && (h("biggive-button", { key: '6f571b4193453203cc11cb99c42a475e0360b69d', class: "filter", colourScheme: "primary", onDoButtonClick: this.handleNearMeButtonPressed, label: this.fetchingLocation ? 'Fetching location...' : 'Charities near me', disabled: this.fetchingLocation, fullWidth: true, "space-below": "0" })), h("div", { key: '07fa78bea86edf2b60492b42e8e91ff9b44e9830', class: "filter-wrap" }, h("biggive-button", { key: '0f6775e87d80f1b91dd57ef39260838932dd099d', class: "filter", colourScheme: "primary", onDoButtonClick: this.handleFilterButtonClick, label: "Filter", fullWidth: true, "space-below": "0" }), h("biggive-popup", { key: 'fe87d7b2fc75583f421855eee6dd22132ec77096', id: "filter-popup" }, h("h4", { key: '50cc5ea69df122c34ff8bc615088f7a7e07d992e', class: "space-above-0 space-below-3 text-colour-primary" }, "Filters"), h("div", { key: 'c0354b38830bb635e19ad38dfd306e41b72aedff', class: "select-wrapper-1" }, h("biggive-form-field-select", { key: 'a1ce6c7b5c956e01958a74f98d6a1238486dd511', backgroundColour: "white", prompt: "Category", placeholder: this.categoriesPlaceHolderText, selectedLabel: this.selectedFilterCategory, selectedValue: this.selectedFilterCategory, options: this.optionsToArray(this.categoryOptions || []), selectionChanged: this.categoryFilterSelectionChanged, id: "categories", "space-below": "2" })), h("div", { key: '6cc0dbeb1c98470bdce24faf880210f64e0edd72', class: "select-wrapper-2" }, h("biggive-form-field-select", { key: '5109c83967e666a5254814ddaf822cffbda2b6af', backgroundColour: "white", prompt: "Beneficiary", placeholder: this.beneficiariesPlaceHolderText, selectedLabel: this.selectedFilterBeneficiary, selectedValue: this.selectedFilterBeneficiary, options: this.optionsToArray(this.beneficiaryOptions || []), selectionChanged: this.beneficiarySelectionChanged, id: "beneficiaries", "space-below": "2" })), h("div", { key: '213fb6972e212a3ed593445701e55cd9c9df4e70', class: "select-wrapper-3" }, h("biggive-form-field-select", { key: 'c5f0c913deb5b3eb1cdde23cc4f59fd4d856bdc7', backgroundColour: "white", prompt: "Location", placeholder: this.locationsPlaceHolderText, selectedLabel: this.selectedFilterLocation, selectedValue: this.selectedFilterLocation, options: this.optionsToArray(this.locationOptions || []), selectionChanged: this.locationSelectionChanged, id: "locations", "space-below": "2" })), h("div", { key: 'd5ebed141c6f2df713044838802e41d59a99c033', class: "align-right" }, h("biggive-button", { key: '5fe81bf0b04ef44618264aa4dae4b31df44f74c2', label: "Apply filters", onDoButtonClick: this.handleApplyFilterButtonClick })))), h("div", { key: '36cbb004dc2c0b3d6435c853893f279f7cc2a0b4', class: "sort-wrap" }, h("biggive-form-field-select", { key: 'ce1b686a810d10452ef1c2fabf346117cd3990c4', options: sortOptions, prompt: null, "select-style": "underlined", placeholder: this.sortByPlaceholderText, selectedLabel: this.selectedSortByOption, selectedValue: this.getSelectedValue(), selectionChanged: this.sortBySelectionChanged, id: "sort-by" }, h("biggive-form-field-select-option", { key: 'eb016dccffc6b0c63de001ec5e7c15c0215f58f7', value: "amountRaised", label: "Most raised" }), h("biggive-form-field-select-option", { key: '4df7ba1f42d0bb2d1e53c2e40db788bc4862ffed', value: "leastRaised", label: "Least raised" }), h("biggive-form-field-select-option", { key: '6ee1373b12f664ffc9b2d86fbfae71c5ee89c808', value: "matchFundsRemaining", label: "Most funds remaining" }), h("biggive-form-field-select-option", { key: 'e2cf6339701f3f03fd1a1a1ddd55a697db189b64', value: "closeToTarget", label: "Nearest target" }), (this.searchText || '').length > 0 ? h("biggive-form-field-select-option", { value: "Relevance", label: "Relevance" }) : null))), h("div", { key: 'f6e3bf0f207f735c91b9053f43b1a75a6ec33b34', class: "selected-filter-wrap" }, h("div", { key: 'bfdbb504e478326031d977b1af88f2cc74d2f841', class: "selected-filters" }, this.selectedFilterCategory && (h("span", { key: 'bbb0ea75b53fed704a910faa8962bd9f70454b25', class: "button", onClick: () => {
|
|
230
230
|
this.removeFilter('categories');
|
|
231
|
-
} }, this.selectedFilterCategory)), this.selectedFilterBeneficiary && (h("span", { key: '
|
|
231
|
+
} }, this.selectedFilterCategory)), this.selectedFilterBeneficiary && (h("span", { key: '5d391afc2dfd66119892f7b77038125e5703728e', class: "button", onClick: () => {
|
|
232
232
|
this.removeFilter('beneficiaries');
|
|
233
|
-
} }, this.selectedFilterBeneficiary)), this.selectedFilterLocation && (h("span", { key: '
|
|
233
|
+
} }, this.selectedFilterBeneficiary)), this.selectedFilterLocation && (h("span", { key: 'bc7b957d2d76cdfede96921c0a006da77690b3fc', class: "button", onClick: () => {
|
|
234
234
|
this.removeFilter('locations');
|
|
235
|
-
} }, this.selectedFilterLocation))), h("div", { key: '
|
|
235
|
+
} }, this.selectedFilterLocation))), h("div", { key: 'bf228470ec15507617fa98b20eda6b2584ca359d', class: "clear-all" }, h("a", { key: '5e210df20d0dc4951b98888958d03ff0ed74cf0c', onClick: this.handleClearAll }, "Clear all"))), h("div", { key: '155ef43b9888223f6a480130df3aa47bafd78741', class: "campaign-grid" }, h("slot", { key: 'ee3ff728b4ce9a11e33401236ccee3a581ef39a0', name: "campaign-grid" })))));
|
|
236
236
|
}
|
|
237
237
|
// I'm not sure if I understand the reasoning for own-methods-must-be-private. I made the method below public to unit
|
|
238
238
|
// test it. Maybe the idea is that we should move anything with enough logic to test outside the component class? I
|
package/hydrate/index.js
CHANGED
|
@@ -6298,13 +6298,13 @@ class BiggiveCampaignCardFilterGrid {
|
|
|
6298
6298
|
render() {
|
|
6299
6299
|
var _a;
|
|
6300
6300
|
const sortOptions = this.getSortOptions();
|
|
6301
|
-
return (hAsync("div", { key: 'ceb2f44c3c853bfdc3da18ad187de4cc5a085ffb', class: 'container space-below-' + this.spaceBelow }, hAsync("div", { key: '8f6370902bfabe8a9df23e274d05298ca316b12b', class: "sleeve" }, hAsync("div", { key: '89fc861fdb61827ab5dbb5cee88a4dfdd0a8abcb', class: "search-wrap" }, hAsync("h4", { key: '04363e5852c2347036e52efd75c0acfd83df5901' }, this.intro), hAsync("div", { key: 'dd18cb11be900192f0a5a26f027b0102453e50ad', class: "field-wrap" }, hAsync("div", { key: 'a9798f3d6943cfb5494452bf23ea5ce03c288a45', class: "input-wrap" }, hAsync("svg", { key: '9296bccad620aaba713b252fb31c7f3efd4b1a96', xmlns: "http://www.w3.org/2000/svg", class: "icon", viewBox: "0 0 512 512" }, hAsync("path", { key: '718a7766577cf08ba55ebae64b60b312cfcf8edf', d: faMagnifyingGlass.icon[4].toString() })), hAsync("input", { key: 'e89ff0c306417359e72597edf932166970e01702', type: "text", value: (_a = this.searchText) !== null && _a !== void 0 ? _a : '', class: "input-text", placeholder: this.placeholderText, onInput: this.handleSearchTextChanged, onKeyDown: this.handleEnterPressed })), hAsync("biggive-button", { key: '7713463cc5c611be7e96290c91da7691c3bba5e4', onDoButtonClick: this.handleSearchButtonPressed, label: this.buttonText }))), hAsync("div", { key: 'eb4ac758e446eda26be72dad7239fd525c520c39', class: "sort-filter-wrap" }, this.enableSearchByLocation && this.offerNearMeOption && (hAsync("biggive-button", { key: '
|
|
6301
|
+
return (hAsync("div", { key: 'ceb2f44c3c853bfdc3da18ad187de4cc5a085ffb', class: 'container space-below-' + this.spaceBelow }, hAsync("div", { key: '8f6370902bfabe8a9df23e274d05298ca316b12b', class: "sleeve" }, hAsync("div", { key: '89fc861fdb61827ab5dbb5cee88a4dfdd0a8abcb', class: "search-wrap" }, hAsync("h4", { key: '04363e5852c2347036e52efd75c0acfd83df5901' }, this.intro), hAsync("div", { key: 'dd18cb11be900192f0a5a26f027b0102453e50ad', class: "field-wrap" }, hAsync("div", { key: 'a9798f3d6943cfb5494452bf23ea5ce03c288a45', class: "input-wrap" }, hAsync("svg", { key: '9296bccad620aaba713b252fb31c7f3efd4b1a96', xmlns: "http://www.w3.org/2000/svg", class: "icon", viewBox: "0 0 512 512" }, hAsync("path", { key: '718a7766577cf08ba55ebae64b60b312cfcf8edf', d: faMagnifyingGlass.icon[4].toString() })), hAsync("input", { key: 'e89ff0c306417359e72597edf932166970e01702', type: "text", value: (_a = this.searchText) !== null && _a !== void 0 ? _a : '', class: "input-text", placeholder: this.placeholderText, onInput: this.handleSearchTextChanged, onKeyDown: this.handleEnterPressed })), hAsync("biggive-button", { key: '7713463cc5c611be7e96290c91da7691c3bba5e4', onDoButtonClick: this.handleSearchButtonPressed, label: this.buttonText }))), hAsync("div", { key: 'eb4ac758e446eda26be72dad7239fd525c520c39', class: "sort-filter-wrap" }, this.enableSearchByLocation && this.offerNearMeOption && (hAsync("biggive-button", { key: '6f571b4193453203cc11cb99c42a475e0360b69d', class: "filter", colourScheme: "primary", onDoButtonClick: this.handleNearMeButtonPressed, label: this.fetchingLocation ? 'Fetching location...' : 'Charities near me', disabled: this.fetchingLocation, fullWidth: true, "space-below": "0" })), hAsync("div", { key: '07fa78bea86edf2b60492b42e8e91ff9b44e9830', class: "filter-wrap" }, hAsync("biggive-button", { key: '0f6775e87d80f1b91dd57ef39260838932dd099d', class: "filter", colourScheme: "primary", onDoButtonClick: this.handleFilterButtonClick, label: "Filter", fullWidth: true, "space-below": "0" }), hAsync("biggive-popup", { key: 'fe87d7b2fc75583f421855eee6dd22132ec77096', id: "filter-popup" }, hAsync("h4", { key: '50cc5ea69df122c34ff8bc615088f7a7e07d992e', class: "space-above-0 space-below-3 text-colour-primary" }, "Filters"), hAsync("div", { key: 'c0354b38830bb635e19ad38dfd306e41b72aedff', class: "select-wrapper-1" }, hAsync("biggive-form-field-select", { key: 'a1ce6c7b5c956e01958a74f98d6a1238486dd511', backgroundColour: "white", prompt: "Category", placeholder: this.categoriesPlaceHolderText, selectedLabel: this.selectedFilterCategory, selectedValue: this.selectedFilterCategory, options: this.optionsToArray(this.categoryOptions || []), selectionChanged: this.categoryFilterSelectionChanged, id: "categories", "space-below": "2" })), hAsync("div", { key: '6cc0dbeb1c98470bdce24faf880210f64e0edd72', class: "select-wrapper-2" }, hAsync("biggive-form-field-select", { key: '5109c83967e666a5254814ddaf822cffbda2b6af', backgroundColour: "white", prompt: "Beneficiary", placeholder: this.beneficiariesPlaceHolderText, selectedLabel: this.selectedFilterBeneficiary, selectedValue: this.selectedFilterBeneficiary, options: this.optionsToArray(this.beneficiaryOptions || []), selectionChanged: this.beneficiarySelectionChanged, id: "beneficiaries", "space-below": "2" })), hAsync("div", { key: '213fb6972e212a3ed593445701e55cd9c9df4e70', class: "select-wrapper-3" }, hAsync("biggive-form-field-select", { key: 'c5f0c913deb5b3eb1cdde23cc4f59fd4d856bdc7', backgroundColour: "white", prompt: "Location", placeholder: this.locationsPlaceHolderText, selectedLabel: this.selectedFilterLocation, selectedValue: this.selectedFilterLocation, options: this.optionsToArray(this.locationOptions || []), selectionChanged: this.locationSelectionChanged, id: "locations", "space-below": "2" })), hAsync("div", { key: 'd5ebed141c6f2df713044838802e41d59a99c033', class: "align-right" }, hAsync("biggive-button", { key: '5fe81bf0b04ef44618264aa4dae4b31df44f74c2', label: "Apply filters", onDoButtonClick: this.handleApplyFilterButtonClick })))), hAsync("div", { key: '36cbb004dc2c0b3d6435c853893f279f7cc2a0b4', class: "sort-wrap" }, hAsync("biggive-form-field-select", { key: 'ce1b686a810d10452ef1c2fabf346117cd3990c4', options: sortOptions, prompt: null, "select-style": "underlined", placeholder: this.sortByPlaceholderText, selectedLabel: this.selectedSortByOption, selectedValue: this.getSelectedValue(), selectionChanged: this.sortBySelectionChanged, id: "sort-by" }, hAsync("biggive-form-field-select-option", { key: 'eb016dccffc6b0c63de001ec5e7c15c0215f58f7', value: "amountRaised", label: "Most raised" }), hAsync("biggive-form-field-select-option", { key: '4df7ba1f42d0bb2d1e53c2e40db788bc4862ffed', value: "leastRaised", label: "Least raised" }), hAsync("biggive-form-field-select-option", { key: '6ee1373b12f664ffc9b2d86fbfae71c5ee89c808', value: "matchFundsRemaining", label: "Most funds remaining" }), hAsync("biggive-form-field-select-option", { key: 'e2cf6339701f3f03fd1a1a1ddd55a697db189b64', value: "closeToTarget", label: "Nearest target" }), (this.searchText || '').length > 0 ? hAsync("biggive-form-field-select-option", { value: "Relevance", label: "Relevance" }) : null))), hAsync("div", { key: 'f6e3bf0f207f735c91b9053f43b1a75a6ec33b34', class: "selected-filter-wrap" }, hAsync("div", { key: 'bfdbb504e478326031d977b1af88f2cc74d2f841', class: "selected-filters" }, this.selectedFilterCategory && (hAsync("span", { key: 'bbb0ea75b53fed704a910faa8962bd9f70454b25', class: "button", onClick: () => {
|
|
6302
6302
|
this.removeFilter('categories');
|
|
6303
|
-
} }, this.selectedFilterCategory)), this.selectedFilterBeneficiary && (hAsync("span", { key: '
|
|
6303
|
+
} }, this.selectedFilterCategory)), this.selectedFilterBeneficiary && (hAsync("span", { key: '5d391afc2dfd66119892f7b77038125e5703728e', class: "button", onClick: () => {
|
|
6304
6304
|
this.removeFilter('beneficiaries');
|
|
6305
|
-
} }, this.selectedFilterBeneficiary)), this.selectedFilterLocation && (hAsync("span", { key: '
|
|
6305
|
+
} }, this.selectedFilterBeneficiary)), this.selectedFilterLocation && (hAsync("span", { key: 'bc7b957d2d76cdfede96921c0a006da77690b3fc', class: "button", onClick: () => {
|
|
6306
6306
|
this.removeFilter('locations');
|
|
6307
|
-
} }, this.selectedFilterLocation))), hAsync("div", { key: '
|
|
6307
|
+
} }, this.selectedFilterLocation))), hAsync("div", { key: 'bf228470ec15507617fa98b20eda6b2584ca359d', class: "clear-all" }, hAsync("a", { key: '5e210df20d0dc4951b98888958d03ff0ed74cf0c', onClick: this.handleClearAll }, "Clear all"))), hAsync("div", { key: '155ef43b9888223f6a480130df3aa47bafd78741', class: "campaign-grid" }, hAsync("slot", { key: 'ee3ff728b4ce9a11e33401236ccee3a581ef39a0', name: "campaign-grid" })))));
|
|
6308
6308
|
}
|
|
6309
6309
|
// I'm not sure if I understand the reasoning for own-methods-must-be-private. I made the method below public to unit
|
|
6310
6310
|
// test it. Maybe the idea is that we should move anything with enough logic to test outside the component class? I
|
package/hydrate/index.mjs
CHANGED
|
@@ -6296,13 +6296,13 @@ class BiggiveCampaignCardFilterGrid {
|
|
|
6296
6296
|
render() {
|
|
6297
6297
|
var _a;
|
|
6298
6298
|
const sortOptions = this.getSortOptions();
|
|
6299
|
-
return (hAsync("div", { key: 'ceb2f44c3c853bfdc3da18ad187de4cc5a085ffb', class: 'container space-below-' + this.spaceBelow }, hAsync("div", { key: '8f6370902bfabe8a9df23e274d05298ca316b12b', class: "sleeve" }, hAsync("div", { key: '89fc861fdb61827ab5dbb5cee88a4dfdd0a8abcb', class: "search-wrap" }, hAsync("h4", { key: '04363e5852c2347036e52efd75c0acfd83df5901' }, this.intro), hAsync("div", { key: 'dd18cb11be900192f0a5a26f027b0102453e50ad', class: "field-wrap" }, hAsync("div", { key: 'a9798f3d6943cfb5494452bf23ea5ce03c288a45', class: "input-wrap" }, hAsync("svg", { key: '9296bccad620aaba713b252fb31c7f3efd4b1a96', xmlns: "http://www.w3.org/2000/svg", class: "icon", viewBox: "0 0 512 512" }, hAsync("path", { key: '718a7766577cf08ba55ebae64b60b312cfcf8edf', d: faMagnifyingGlass.icon[4].toString() })), hAsync("input", { key: 'e89ff0c306417359e72597edf932166970e01702', type: "text", value: (_a = this.searchText) !== null && _a !== void 0 ? _a : '', class: "input-text", placeholder: this.placeholderText, onInput: this.handleSearchTextChanged, onKeyDown: this.handleEnterPressed })), hAsync("biggive-button", { key: '7713463cc5c611be7e96290c91da7691c3bba5e4', onDoButtonClick: this.handleSearchButtonPressed, label: this.buttonText }))), hAsync("div", { key: 'eb4ac758e446eda26be72dad7239fd525c520c39', class: "sort-filter-wrap" }, this.enableSearchByLocation && this.offerNearMeOption && (hAsync("biggive-button", { key: '
|
|
6299
|
+
return (hAsync("div", { key: 'ceb2f44c3c853bfdc3da18ad187de4cc5a085ffb', class: 'container space-below-' + this.spaceBelow }, hAsync("div", { key: '8f6370902bfabe8a9df23e274d05298ca316b12b', class: "sleeve" }, hAsync("div", { key: '89fc861fdb61827ab5dbb5cee88a4dfdd0a8abcb', class: "search-wrap" }, hAsync("h4", { key: '04363e5852c2347036e52efd75c0acfd83df5901' }, this.intro), hAsync("div", { key: 'dd18cb11be900192f0a5a26f027b0102453e50ad', class: "field-wrap" }, hAsync("div", { key: 'a9798f3d6943cfb5494452bf23ea5ce03c288a45', class: "input-wrap" }, hAsync("svg", { key: '9296bccad620aaba713b252fb31c7f3efd4b1a96', xmlns: "http://www.w3.org/2000/svg", class: "icon", viewBox: "0 0 512 512" }, hAsync("path", { key: '718a7766577cf08ba55ebae64b60b312cfcf8edf', d: faMagnifyingGlass.icon[4].toString() })), hAsync("input", { key: 'e89ff0c306417359e72597edf932166970e01702', type: "text", value: (_a = this.searchText) !== null && _a !== void 0 ? _a : '', class: "input-text", placeholder: this.placeholderText, onInput: this.handleSearchTextChanged, onKeyDown: this.handleEnterPressed })), hAsync("biggive-button", { key: '7713463cc5c611be7e96290c91da7691c3bba5e4', onDoButtonClick: this.handleSearchButtonPressed, label: this.buttonText }))), hAsync("div", { key: 'eb4ac758e446eda26be72dad7239fd525c520c39', class: "sort-filter-wrap" }, this.enableSearchByLocation && this.offerNearMeOption && (hAsync("biggive-button", { key: '6f571b4193453203cc11cb99c42a475e0360b69d', class: "filter", colourScheme: "primary", onDoButtonClick: this.handleNearMeButtonPressed, label: this.fetchingLocation ? 'Fetching location...' : 'Charities near me', disabled: this.fetchingLocation, fullWidth: true, "space-below": "0" })), hAsync("div", { key: '07fa78bea86edf2b60492b42e8e91ff9b44e9830', class: "filter-wrap" }, hAsync("biggive-button", { key: '0f6775e87d80f1b91dd57ef39260838932dd099d', class: "filter", colourScheme: "primary", onDoButtonClick: this.handleFilterButtonClick, label: "Filter", fullWidth: true, "space-below": "0" }), hAsync("biggive-popup", { key: 'fe87d7b2fc75583f421855eee6dd22132ec77096', id: "filter-popup" }, hAsync("h4", { key: '50cc5ea69df122c34ff8bc615088f7a7e07d992e', class: "space-above-0 space-below-3 text-colour-primary" }, "Filters"), hAsync("div", { key: 'c0354b38830bb635e19ad38dfd306e41b72aedff', class: "select-wrapper-1" }, hAsync("biggive-form-field-select", { key: 'a1ce6c7b5c956e01958a74f98d6a1238486dd511', backgroundColour: "white", prompt: "Category", placeholder: this.categoriesPlaceHolderText, selectedLabel: this.selectedFilterCategory, selectedValue: this.selectedFilterCategory, options: this.optionsToArray(this.categoryOptions || []), selectionChanged: this.categoryFilterSelectionChanged, id: "categories", "space-below": "2" })), hAsync("div", { key: '6cc0dbeb1c98470bdce24faf880210f64e0edd72', class: "select-wrapper-2" }, hAsync("biggive-form-field-select", { key: '5109c83967e666a5254814ddaf822cffbda2b6af', backgroundColour: "white", prompt: "Beneficiary", placeholder: this.beneficiariesPlaceHolderText, selectedLabel: this.selectedFilterBeneficiary, selectedValue: this.selectedFilterBeneficiary, options: this.optionsToArray(this.beneficiaryOptions || []), selectionChanged: this.beneficiarySelectionChanged, id: "beneficiaries", "space-below": "2" })), hAsync("div", { key: '213fb6972e212a3ed593445701e55cd9c9df4e70', class: "select-wrapper-3" }, hAsync("biggive-form-field-select", { key: 'c5f0c913deb5b3eb1cdde23cc4f59fd4d856bdc7', backgroundColour: "white", prompt: "Location", placeholder: this.locationsPlaceHolderText, selectedLabel: this.selectedFilterLocation, selectedValue: this.selectedFilterLocation, options: this.optionsToArray(this.locationOptions || []), selectionChanged: this.locationSelectionChanged, id: "locations", "space-below": "2" })), hAsync("div", { key: 'd5ebed141c6f2df713044838802e41d59a99c033', class: "align-right" }, hAsync("biggive-button", { key: '5fe81bf0b04ef44618264aa4dae4b31df44f74c2', label: "Apply filters", onDoButtonClick: this.handleApplyFilterButtonClick })))), hAsync("div", { key: '36cbb004dc2c0b3d6435c853893f279f7cc2a0b4', class: "sort-wrap" }, hAsync("biggive-form-field-select", { key: 'ce1b686a810d10452ef1c2fabf346117cd3990c4', options: sortOptions, prompt: null, "select-style": "underlined", placeholder: this.sortByPlaceholderText, selectedLabel: this.selectedSortByOption, selectedValue: this.getSelectedValue(), selectionChanged: this.sortBySelectionChanged, id: "sort-by" }, hAsync("biggive-form-field-select-option", { key: 'eb016dccffc6b0c63de001ec5e7c15c0215f58f7', value: "amountRaised", label: "Most raised" }), hAsync("biggive-form-field-select-option", { key: '4df7ba1f42d0bb2d1e53c2e40db788bc4862ffed', value: "leastRaised", label: "Least raised" }), hAsync("biggive-form-field-select-option", { key: '6ee1373b12f664ffc9b2d86fbfae71c5ee89c808', value: "matchFundsRemaining", label: "Most funds remaining" }), hAsync("biggive-form-field-select-option", { key: 'e2cf6339701f3f03fd1a1a1ddd55a697db189b64', value: "closeToTarget", label: "Nearest target" }), (this.searchText || '').length > 0 ? hAsync("biggive-form-field-select-option", { value: "Relevance", label: "Relevance" }) : null))), hAsync("div", { key: 'f6e3bf0f207f735c91b9053f43b1a75a6ec33b34', class: "selected-filter-wrap" }, hAsync("div", { key: 'bfdbb504e478326031d977b1af88f2cc74d2f841', class: "selected-filters" }, this.selectedFilterCategory && (hAsync("span", { key: 'bbb0ea75b53fed704a910faa8962bd9f70454b25', class: "button", onClick: () => {
|
|
6300
6300
|
this.removeFilter('categories');
|
|
6301
|
-
} }, this.selectedFilterCategory)), this.selectedFilterBeneficiary && (hAsync("span", { key: '
|
|
6301
|
+
} }, this.selectedFilterCategory)), this.selectedFilterBeneficiary && (hAsync("span", { key: '5d391afc2dfd66119892f7b77038125e5703728e', class: "button", onClick: () => {
|
|
6302
6302
|
this.removeFilter('beneficiaries');
|
|
6303
|
-
} }, this.selectedFilterBeneficiary)), this.selectedFilterLocation && (hAsync("span", { key: '
|
|
6303
|
+
} }, this.selectedFilterBeneficiary)), this.selectedFilterLocation && (hAsync("span", { key: 'bc7b957d2d76cdfede96921c0a006da77690b3fc', class: "button", onClick: () => {
|
|
6304
6304
|
this.removeFilter('locations');
|
|
6305
|
-
} }, this.selectedFilterLocation))), hAsync("div", { key: '
|
|
6305
|
+
} }, this.selectedFilterLocation))), hAsync("div", { key: 'bf228470ec15507617fa98b20eda6b2584ca359d', class: "clear-all" }, hAsync("a", { key: '5e210df20d0dc4951b98888958d03ff0ed74cf0c', onClick: this.handleClearAll }, "Clear all"))), hAsync("div", { key: '155ef43b9888223f6a480130df3aa47bafd78741', class: "campaign-grid" }, hAsync("slot", { key: 'ee3ff728b4ce9a11e33401236ccee3a581ef39a0', name: "campaign-grid" })))));
|
|
6306
6306
|
}
|
|
6307
6307
|
// I'm not sure if I understand the reasoning for own-methods-must-be-private. I made the method below public to unit
|
|
6308
6308
|
// test it. Maybe the idea is that we should move anything with enough logic to test outside the component class? I
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@biggive/components",
|
|
3
3
|
"_comment": "Version number below is automatically replaced during CircleCI build.",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "202606301318.0.0",
|
|
5
5
|
"description": "Big Give Components",
|
|
6
6
|
"main": "dist/index.cjs.js",
|
|
7
7
|
"module": "dist/index.js",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e,c as t,h as i,g as a}from"./p-bbqW3pni.js";import{f as s}from"./p-CoGE2Wf-.js";const l={relevance:"Relevance",amountRaised:"Most raised",leastRaised:"Least raised",closeToTarget:"Nearest target",matchFundsRemaining:"Most funds remaining"},r=class{constructor(i){e(this,i),this.doSearchAndFilterUpdate=t(this,"doSearchAndFilterUpdate"),this.doGetLocationFromBrowser=t(this,"doGetLocationFromBrowser"),this.sortByPlaceholderText="Sort by",this.beneficiariesPlaceHolderText="Select beneficiary",this.categoriesPlaceHolderText="Select category",this.locationsPlaceHolderText="Select location",this.newSelectedFilterCategory=null,this.newSelectedFilterBeneficiary=null,this.newSelectedFilterLocation=null,this.spaceBelow=0,this.intro="Find a charity or project",this.searchText=null,this.placeholderText="Search",this.buttonText="Search",this.selectedFilterCategory=null,this.selectedFilterBeneficiary=null,this.selectedFilterLocation=null,this.enableSearchByLocation=!1,this.fetchingLocation=!1,this.location=void 0,this.categoryFilterSelectionChanged=e=>{this.newSelectedFilterCategory=e},this.beneficiarySelectionChanged=e=>{this.newSelectedFilterBeneficiary=e},this.locationSelectionChanged=e=>{this.newSelectedFilterLocation=e},this.sortBySelectionChanged=e=>{this.selectedSortByOption=e,this.doSearchAndFilterUpdate.emit(this.getSearchAndFilterObject())},this.handleApplyFilterButtonClick=()=>{var e,t,i,a;this.selectedFilterCategory=null!==(e=this.newSelectedFilterCategory)&&void 0!==e?e:this.selectedFilterCategory,this.selectedFilterBeneficiary=null!==(t=this.newSelectedFilterBeneficiary)&&void 0!==t?t:this.selectedFilterBeneficiary,this.selectedFilterLocation=null!==(i=this.newSelectedFilterLocation)&&void 0!==i?i:this.selectedFilterLocation;const s=this.getSearchAndFilterObject();this.doSearchAndFilterUpdate.emit(s);const l=null===(a=this.el.shadowRoot)||void 0===a?void 0:a.getElementById("filter-popup");l&&l.closeFromOutside(),this.filtersApplied="string"==typeof s.filterBeneficiary||"string"==typeof s.filterCategory||"string"==typeof s.filterLocation},this.handleSearchButtonPressed=()=>{this.unfocusTextInput(),this.doSearchAndFilterUpdate.emit(this.getSearchAndFilterObject()),this.hasSearchTerm()&&(this.selectedSortByOption="Relevance")},this.handleNearMeButtonPressed=()=>{this.unfocusTextInput(),this.doGetLocationFromBrowser.emit()},this.handleSearchTextChanged=e=>{this.searchText=e.target.value},this.handleEnterPressed=e=>{"Enter"===e.key&&(this.unfocusTextInput(),this.doSearchAndFilterUpdate.emit(this.getSearchAndFilterObject()))},this.handleFilterButtonClick=()=>{var e;this.newSelectedFilterBeneficiary=this.selectedFilterBeneficiary,this.newSelectedFilterCategory=this.selectedFilterCategory,this.newSelectedFilterLocation=this.selectedFilterLocation;const t=null===(e=this.el.shadowRoot)||void 0===e?void 0:e.getElementById("filter-popup");t&&t.openFromOutside()},this.handleClearAll=()=>{var e;this.unfocusTextInput(),this.filtersApplied=!1,this.searchText=null,this.selectedSortByOption=this.initialSortByOption,this.selectedFilterBeneficiary=null,this.selectedFilterCategory=null,this.selectedFilterLocation=null,["sort-by","categories","beneficiaries","locations","funding"].forEach((e=>{var t;const i=null===(t=this.el.shadowRoot)||void 0===t?void 0:t.getElementById(e);i&&(i.selectedValue=null,i.selectedLabel=null)}));const t=null===(e=this.el.shadowRoot)||void 0===e?void 0:e.querySelector(".selected-filters");t&&t.querySelectorAll(".button").forEach((e=>{e.remove()})),this.doSearchAndFilterUpdate.emit({searchText:null,sortBy:null,filterCategory:null,filterBeneficiary:null,filterLocation:null})}}async unfocusInputs(){this.unfocusTextInput()}getSearchAndFilterObject(){return{searchText:this.searchText,sortBy:this.selectedSortByOption,filterCategory:this.selectedFilterCategory,filterBeneficiary:this.selectedFilterBeneficiary,filterLocation:this.selectedFilterLocation}}removeFilter(e){var t;switch(e){case"beneficiaries":this.selectedFilterBeneficiary=null;break;case"categories":this.selectedFilterCategory=null;break;case"locations":this.selectedFilterLocation=null;break;default:console.error(e)}const i=null===(t=this.el.shadowRoot)||void 0===t?void 0:t.getElementById(e);i&&(i.selectedLabel=null,i.selectedValue=null,this.doSearchAndFilterUpdate.emit(this.getSearchAndFilterObject()))}unfocusTextInput(){var e;const t=null===(e=this.el.shadowRoot)||void 0===e?void 0:e.querySelector(".input-text");null==t||t.blur()}componentWillRender(){this.filtersApplied=null!==this.selectedFilterCategory||null!==this.selectedFilterBeneficiary||null!==this.selectedFilterLocation,this.initialSortByOption=this.selectedSortByOption}render(){var e;const t=this.getSortOptions();return i("div",{key:"ceb2f44c3c853bfdc3da18ad187de4cc5a085ffb",class:"container space-below-"+this.spaceBelow},i("div",{key:"8f6370902bfabe8a9df23e274d05298ca316b12b",class:"sleeve"},i("div",{key:"89fc861fdb61827ab5dbb5cee88a4dfdd0a8abcb",class:"search-wrap"},i("h4",{key:"04363e5852c2347036e52efd75c0acfd83df5901"},this.intro),i("div",{key:"dd18cb11be900192f0a5a26f027b0102453e50ad",class:"field-wrap"},i("div",{key:"a9798f3d6943cfb5494452bf23ea5ce03c288a45",class:"input-wrap"},i("svg",{key:"9296bccad620aaba713b252fb31c7f3efd4b1a96",xmlns:"http://www.w3.org/2000/svg",class:"icon",viewBox:"0 0 512 512"},i("path",{key:"718a7766577cf08ba55ebae64b60b312cfcf8edf",d:s.icon[4].toString()})),i("input",{key:"e89ff0c306417359e72597edf932166970e01702",type:"text",value:null!==(e=this.searchText)&&void 0!==e?e:"",class:"input-text",placeholder:this.placeholderText,onInput:this.handleSearchTextChanged,onKeyDown:this.handleEnterPressed})),i("biggive-button",{key:"7713463cc5c611be7e96290c91da7691c3bba5e4",onDoButtonClick:this.handleSearchButtonPressed,label:this.buttonText}))),i("div",{key:"eb4ac758e446eda26be72dad7239fd525c520c39",class:"sort-filter-wrap"},this.enableSearchByLocation&&this.offerNearMeOption&&i("biggive-button",{key:"fe100d32987271001b584fbba653ab733e0d3037",class:"filter",colourScheme:"primary",onDoButtonClick:this.handleNearMeButtonPressed,label:this.fetchingLocation?"Fetching location...":"Charities near me",disabled:!this.fetchingLocation,fullWidth:!0,"space-below":"0"}),i("div",{key:"30a35a0db88c129c27dd9c20b75d7516a7316ba8",class:"filter-wrap"},i("biggive-button",{key:"f93528615753291fd194e9675ff79c53b0a45943",class:"filter",colourScheme:"primary",onDoButtonClick:this.handleFilterButtonClick,label:"Filter",fullWidth:!0,"space-below":"0"}),i("biggive-popup",{key:"ef7b9eedfade6cb4027fb2789226bf697f420c91",id:"filter-popup"},i("h4",{key:"5af7616eff806f4f455119f021e57a1d06fe8a0d",class:"space-above-0 space-below-3 text-colour-primary"},"Filters"),i("div",{key:"ee857c0d3ca4e3f9aa3c8ae339ac256b19c529e5",class:"select-wrapper-1"},i("biggive-form-field-select",{key:"8ce9507ba455de76430c16f95d5d38a42e17fed2",backgroundColour:"white",prompt:"Category",placeholder:this.categoriesPlaceHolderText,selectedLabel:this.selectedFilterCategory,selectedValue:this.selectedFilterCategory,options:this.optionsToArray(this.categoryOptions||[]),selectionChanged:this.categoryFilterSelectionChanged,id:"categories","space-below":"2"})),i("div",{key:"fede3134ddd0696cc7b181d53b1141b0baa6cc18",class:"select-wrapper-2"},i("biggive-form-field-select",{key:"b5a3fb4f023760c0909088ae0e3780268c0db855",backgroundColour:"white",prompt:"Beneficiary",placeholder:this.beneficiariesPlaceHolderText,selectedLabel:this.selectedFilterBeneficiary,selectedValue:this.selectedFilterBeneficiary,options:this.optionsToArray(this.beneficiaryOptions||[]),selectionChanged:this.beneficiarySelectionChanged,id:"beneficiaries","space-below":"2"})),i("div",{key:"2e39d963ca785aae5d4a50e9051e3b3f1ac42733",class:"select-wrapper-3"},i("biggive-form-field-select",{key:"6e873fb07978e97cfbe868f77d94b5e6a73d828a",backgroundColour:"white",prompt:"Location",placeholder:this.locationsPlaceHolderText,selectedLabel:this.selectedFilterLocation,selectedValue:this.selectedFilterLocation,options:this.optionsToArray(this.locationOptions||[]),selectionChanged:this.locationSelectionChanged,id:"locations","space-below":"2"})),i("div",{key:"2ff04e800f368fae58f05820fef385f08a5bb73d",class:"align-right"},i("biggive-button",{key:"437493a55113a5a95f85b07bc01825e55b195ecd",label:"Apply filters",onDoButtonClick:this.handleApplyFilterButtonClick})))),i("div",{key:"e5893df8c1348a3bbaa9389884eed09672616dd0",class:"sort-wrap"},i("biggive-form-field-select",{key:"cf5681ff7096d71fc8b27195853a1db44ddb3e8d",options:t,prompt:null,"select-style":"underlined",placeholder:this.sortByPlaceholderText,selectedLabel:this.selectedSortByOption,selectedValue:this.getSelectedValue(),selectionChanged:this.sortBySelectionChanged,id:"sort-by"},i("biggive-form-field-select-option",{key:"943113783bd5331a484ca1701d794112eb6a7bac",value:"amountRaised",label:"Most raised"}),i("biggive-form-field-select-option",{key:"a12bc8d837e29675ad85c3df4aedb459499dd0b6",value:"leastRaised",label:"Least raised"}),i("biggive-form-field-select-option",{key:"64d3287ee368c5d51c95b9af3588c28861b6a7de",value:"matchFundsRemaining",label:"Most funds remaining"}),i("biggive-form-field-select-option",{key:"2cb9a2a2115d2a3e042c964ad89091be3704214e",value:"closeToTarget",label:"Nearest target"}),(this.searchText||"").length>0?i("biggive-form-field-select-option",{value:"Relevance",label:"Relevance"}):null))),i("div",{key:"a772256d34001e35257a278f841c5b9fe886d12e",class:"selected-filter-wrap"},i("div",{key:"9d3947afa52842a11ef1338450789e9a5d389ee3",class:"selected-filters"},this.selectedFilterCategory&&i("span",{key:"2bd20241fe40a5acb5dc628b83a0e6c3f78cb5c0",class:"button",onClick:()=>{this.removeFilter("categories")}},this.selectedFilterCategory),this.selectedFilterBeneficiary&&i("span",{key:"ae76369709cd8540ebf4287b5e337943e3e1d8e9",class:"button",onClick:()=>{this.removeFilter("beneficiaries")}},this.selectedFilterBeneficiary),this.selectedFilterLocation&&i("span",{key:"73c489be03db7c92f517a2d1b63490cc1de6cff8",class:"button",onClick:()=>{this.removeFilter("locations")}},this.selectedFilterLocation)),i("div",{key:"f283d737e862792b7fa2cebe16ec8f3014ee9e1f",class:"clear-all"},i("a",{key:"7ef1c3ee2d4ac438fd21381d24ba9810530eb629",onClick:this.handleClearAll},"Clear all"))),i("div",{key:"07da3888322df14430a72752c49f65e93f741b1c",class:"campaign-grid"},i("slot",{key:"78a2bee33c15df96678182f8d6535ee49af43b58",name:"campaign-grid"}))))}getSelectedValue(){const e=this.selectedSortByOption;if(void 0===e)return;const t=this.getSortOptions().filter((t=>t.label.toLowerCase()===e.toLowerCase()))[0];return null==t?void 0:t.value}getSortOptions(){return Object.getOwnPropertyNames(l).filter((e=>"relevance"!==e||this.hasSearchTerm())).map((e=>({value:e,label:l[e]})))}hasSearchTerm(){return"string"==typeof this.searchText&&this.searchText.length>0}optionsToArray(e){return"string"==typeof e&&(e=JSON.parse(e)),Array.isArray(e)?e.map((e=>({value:e,label:e}))):Object.entries(e).map((e=>({value:e[0],label:e[1]})))}get el(){return a(this)}};r.style='a{color:inherit;text-decoration:underline}a:hover{text-decoration:none}.space-above-0{margin-top:0}.space-above-1{margin-top:5px}.space-above-2{margin-top:10px}.space-above-3{margin-top:15px}.space-above-4{margin-top:30px}.space-above-5{margin-top:45px}.space-above-6{margin-top:60px}.space-below-0{margin-bottom:0}.space-below-1{margin-bottom:5px}.space-below-2{margin-bottom:10px}.space-below-3{margin-bottom:15px}.space-below-4{margin-bottom:30px}.space-below-5{margin-bottom:45px}.space-below-6{margin-bottom:60px}:host{display:content}.select-wrapper-1,.select-wrapper-2,.select-wrapper-3,.select-wrapper-4{position:relative;margin-top:1em}.select-wrapper-1{z-index:4}.select-wrapper-2{z-index:3}.select-wrapper-3{z-index:2}.select-wrapper-4{z-index:1}.container{font-family:"Euclid Triangle", sans-serif;font-size:17px;line-height:24px;position:relative}.container .search-wrap{background-color:#FFFFFF;padding:15px 30px;margin-bottom:15px}.container .search-wrap h4{margin-bottom:15px}.container .search-wrap .field-wrap{display:flex;justify-content:space-between}.container .search-wrap .field-wrap .input-wrap{display:flex;justify-content:space-between;padding-bottom:5px;border-bottom:1px solid #000000;margin-right:30px;flex-grow:1}.container .search-wrap .field-wrap .input-wrap input{border:0}.container .search-wrap .field-wrap button{padding:5px 30px}.selected-filter-wrap{display:flex;margin-bottom:23px;padding:0}.selected-filter-wrap .button{margin-bottom:7px;display:inline-block;cursor:pointer;border-radius:20px;padding:5px 50px 5px 20px;margin-right:15px;background-color:#FF7272;color:#000000;border:1px solid #FF7272;text-decoration:none;background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIGlkPSJMYXllcl8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiIHk9IjBweCIKCSB2aWV3Qm94PSIwIDAgMTguNCAxOC40IiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCAxOC40IDE4LjQ7IiB4bWw6c3BhY2U9InByZXNlcnZlIj4KPHN0eWxlIHR5cGU9InRleHQvY3NzIj4KCS5zdDB7c3Ryb2tlOiMwMDAwMDA7fQo8L3N0eWxlPgo8cGF0aCBjbGFzcz0ic3QwIiBkPSJNOS4yLDguNUwxNywwLjdsMC43LDAuN0w5LjksOS4ybDcuOCw3LjhMMTcsMTcuN0w5LjIsOS45bC03LjgsNy44TDAuNywxN2w3LjgtNy44TDAuNywxLjRsMC43LTAuN0w5LjIsOC41eiIvPgo8L3N2Zz4K);background-repeat:no-repeat;background-position:right 20px center;background-size:12px auto}.selected-filter-wrap .button:hover{background-color:#FFFFFF;color:#000000}.selected-filter-wrap .clear-all{margin-left:auto}.selected-filter-wrap .clear-all a{display:inline-block;cursor:pointer;border-radius:20px;padding:5px 20px;background-color:#2C089B;color:#FFFFFF;border:1px solid #2C089B;text-decoration:none}.selected-filter-wrap .clear-all a:hover{background-color:#FFFFFF;color:#2C089B}.sort-filter-wrap{display:flex;justify-content:flex-end;margin-bottom:30px;padding:0;text-align:right;display:flex}.sort-filter-wrap .clear-all{cursor:pointer;vertical-align:center;margin-top:auto;margin-bottom:auto}.sort-filter-wrap .sort-wrap{margin-left:15px}.sort-filter-wrap .filter-wrap{background-color:#F6F6F6;margin-left:15px}.sort-filter-wrap .filter-wrap .button.filter{padding-left:60px;padding-right:30px}.sort-filter-wrap .filter-wrap .button.filter .filter-icon{content:"";display:block;position:absolute;left:25px;top:17px;width:13px;height:13px}.sort-filter-wrap .filter-wrap .button.filter .filter-icon svg{width:100%;height:auto;vertical-align:top}.sort-filter-wrap .filter-wrap .button.filter .filter-icon svg:hover{fill:#2C089B}.icon{height:1rem;width:2rem;vertical-align:-0.125rem;margin:auto}.icon>path{fill:#2C089B}.icon-clear-all>path{fill:#000000}@media screen and (max-width: 450px){.sort-filter-wrap{flex-direction:column-reverse}.sort-filter-wrap .sort-wrap{margin-top:20px;margin-bottom:20px}}@media screen and (max-width: 350px){.sort-filter-wrap{justify-content:space-between}.sort-filter-wrap .sort-wrap{margin-left:0px}.sort-filter-wrap .filter-wrap{margin-left:3px}}.align-right{text-align:right}.input-text{font-family:"Euclid Triangle", sans-serif;font-size:17px;line-height:24px;color:#000000;padding:5px 10px;box-sizing:border-box;width:100%}.input-text:focus{outline:0}.input-text::placeholder{color:#4A4A4A}.text-colour-primary{color:#2C089B}';export{r as biggive_campaign_card_filter_grid}
|