@biggive/components 1.0.142 → 1.0.143
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-9fe50e13.entry.js +1 -0
- package/dist/cjs/biggive-back-to-top_26.cjs.entry.js +9 -5
- package/dist/cjs/biggive.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/biggive-campaign-card-filter-grid/biggive-campaign-card-filter-grid.js +83 -7
- package/dist/collection/components/biggive-campaign-card-filter-grid/biggive-campaign-card-filter-grid.stories.js +52 -1
- package/dist/components/biggive-campaign-card-filter-grid.js +14 -6
- package/dist/esm/biggive-back-to-top_26.entry.js +9 -5
- package/dist/esm/biggive.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/types/components/biggive-campaign-card-filter-grid/biggive-campaign-card-filter-grid.d.ts +17 -1
- package/dist/types/components/biggive-campaign-card-filter-grid/biggive-campaign-card-filter-grid.stories.d.ts +35 -0
- package/dist/types/components.d.ts +34 -2
- package/hydrate/index.js +14 -6
- package/package.json +1 -1
- package/dist/biggive/p-4e2b7b59.entry.js +0 -1
|
@@ -161,7 +161,11 @@ const BiggiveCampaignCardFilterGrid = class {
|
|
|
161
161
|
this.beneficiaryOptions = [];
|
|
162
162
|
this.locationOptions = [];
|
|
163
163
|
this.fundingOptions = [];
|
|
164
|
-
this.
|
|
164
|
+
this.selectedSortByOption = null;
|
|
165
|
+
this.selectedFilterCategory = null;
|
|
166
|
+
this.selectedFilterBeneficiary = null;
|
|
167
|
+
this.selectedFilterLocation = null;
|
|
168
|
+
this.selectedFilterFunding = null;
|
|
165
169
|
}
|
|
166
170
|
getSearchAndFilterObject() {
|
|
167
171
|
const event = {
|
|
@@ -195,13 +199,13 @@ const BiggiveCampaignCardFilterGrid = class {
|
|
|
195
199
|
}
|
|
196
200
|
}
|
|
197
201
|
render() {
|
|
198
|
-
return (index.h("div", { class: 'container space-below-' + this.spaceBelow }, index.h("div", { class: "sleeve" }, index.h("div", { class: "search-wrap" }, index.h("h4", null, this.intro), index.h("div", { class: "field-wrap" }, index.h("div", { class: "input-wrap" }, index.h("svg", { xmlns: "http://www.w3.org/2000/svg", class: "icon", viewBox: "0 0 512 512" }, index.h("path", { d: index$1.faMagnifyingGlass.icon[4].toString() })), index.h("input", { type: "text", value: this.searchText, class: "input-text", placeholder: this.placeholderText, onInput: this.handleSearchTextChanged, onKeyDown: this.handleEnterPressed })), index.h("biggive-button", { onClick: this.handleSearchButtonPressed, label: this.buttonText }))), index.h("div", { class: "sort-filter-wrap" }, index.h("a", { onClick: this.handleClearFiltersClicked, id: "clearFilters" }, "Clear Filters"), index.h("div", { class: "sort-wrap" }, index.h("biggive-form-field-select", { placeholder: "Sort by", selectedLabel: this.
|
|
202
|
+
return (index.h("div", { class: 'container space-below-' + this.spaceBelow }, index.h("div", { class: "sleeve" }, index.h("div", { class: "search-wrap" }, index.h("h4", null, this.intro), index.h("div", { class: "field-wrap" }, index.h("div", { class: "input-wrap" }, index.h("svg", { xmlns: "http://www.w3.org/2000/svg", class: "icon", viewBox: "0 0 512 512" }, index.h("path", { d: index$1.faMagnifyingGlass.icon[4].toString() })), index.h("input", { type: "text", value: this.searchText, class: "input-text", placeholder: this.placeholderText, onInput: this.handleSearchTextChanged, onKeyDown: this.handleEnterPressed })), index.h("biggive-button", { onClick: this.handleSearchButtonPressed, label: this.buttonText }))), index.h("div", { class: "sort-filter-wrap" }, index.h("a", { onClick: this.handleClearFiltersClicked, id: "clearFilters" }, "Clear Filters"), index.h("div", { class: "sort-wrap" }, index.h("biggive-form-field-select", { placeholder: "Sort by", selectedLabel: this.selectedSortByOption, id: "sort-by" }, index.h("biggive-form-field-select-option", { value: "amountRaised", label: "Most raised" }), index.h("biggive-form-field-select-option", { value: "matchFundsRemaining", label: "Match funds remaining" }), index.h("biggive-form-field-select-option", { value: "Relevance", label: "Relevance" }))), index.h("div", { class: "filter-wrap" }, index.h("biggive-button", { class: "filter", onClick: this.handleFilterButtonClick, label: "Filters", fullWidth: true }), index.h("biggive-popup", { id: "filter-popup" }, index.h("h4", { class: "space-above-0 space-below-3 colour-primary" }, "Filters"), index.h("biggive-form-field-select", { placeholder: "Category", selectedLabel: this.selectedFilterCategory, id: "categories", "space-below": "2" }, this.categoryOptions.length === 0
|
|
199
203
|
? undefined
|
|
200
|
-
: this.categoryOptions.map(option => index.h("biggive-form-field-select-option", { value: option, label: option }))), index.h("biggive-form-field-select", { placeholder: "Beneficiary", id: "beneficiaries", "space-below": "2" }, this.beneficiaryOptions.length === 0
|
|
204
|
+
: this.categoryOptions.map(option => index.h("biggive-form-field-select-option", { value: option, label: option }))), index.h("biggive-form-field-select", { placeholder: "Beneficiary", selectedLabel: this.selectedFilterBeneficiary, id: "beneficiaries", "space-below": "2" }, this.beneficiaryOptions.length === 0
|
|
201
205
|
? undefined
|
|
202
|
-
: this.beneficiaryOptions.map(option => index.h("biggive-form-field-select-option", { value: option, label: option }))), index.h("biggive-form-field-select", { placeholder: "Location", id: "locations", "space-below": "2" }, this.locationOptions.length === 0
|
|
206
|
+
: this.beneficiaryOptions.map(option => index.h("biggive-form-field-select-option", { value: option, label: option }))), index.h("biggive-form-field-select", { placeholder: "Location", selectedLabel: this.selectedFilterLocation, id: "locations", "space-below": "2" }, this.locationOptions.length === 0
|
|
203
207
|
? undefined
|
|
204
|
-
: this.locationOptions.map(option => index.h("biggive-form-field-select-option", { value: option, label: option }))), index.h("biggive-form-field-select", { placeholder: "Funding", id: "funding", "space-below": "2" }, this.fundingOptions.length === 0
|
|
208
|
+
: this.locationOptions.map(option => index.h("biggive-form-field-select-option", { value: option, label: option }))), index.h("biggive-form-field-select", { placeholder: "Funding", selectedLabel: this.selectedFilterFunding, id: "funding", "space-below": "2" }, this.fundingOptions.length === 0
|
|
205
209
|
? undefined
|
|
206
210
|
: this.fundingOptions.map(option => index.h("biggive-form-field-select-option", { value: option, label: option }))), index.h("div", { class: "align-right" }, index.h("biggive-button", { label: "Apply filters", onClick: this.handleApplyFilterButtonClick }))))), index.h("div", { class: "campaign-grid" }, index.h("slot", { name: "campaign-grid" })))));
|
|
207
211
|
}
|
package/dist/cjs/biggive.cjs.js
CHANGED
|
@@ -15,5 +15,5 @@ const patchBrowser = () => {
|
|
|
15
15
|
};
|
|
16
16
|
|
|
17
17
|
patchBrowser().then(options => {
|
|
18
|
-
return index.bootstrapLazy([["biggive-back-to-top_26.cjs",[[1,"biggive-campaign-card-filter-grid",{"spaceBelow":[2,"space-below"],"intro":[1],"searchText":[1,"search-text"],"placeholderText":[1,"placeholder-text"],"buttonText":[1,"button-text"],"categoryOptions":[16],"beneficiaryOptions":[16],"locationOptions":[16],"fundingOptions":[16],"
|
|
18
|
+
return index.bootstrapLazy([["biggive-back-to-top_26.cjs",[[1,"biggive-campaign-card-filter-grid",{"spaceBelow":[2,"space-below"],"intro":[1],"searchText":[1,"search-text"],"placeholderText":[1,"placeholder-text"],"buttonText":[1,"button-text"],"categoryOptions":[16],"beneficiaryOptions":[16],"locationOptions":[16],"fundingOptions":[16],"selectedSortByOption":[1,"selected-sort-by-option"],"selectedFilterCategory":[1,"selected-filter-category"],"selectedFilterBeneficiary":[1,"selected-filter-beneficiary"],"selectedFilterLocation":[1,"selected-filter-location"],"selectedFilterFunding":[1,"selected-filter-funding"]},[[0,"doSelectChange","doOptionSelectCompletedHandler"]]],[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"]}],[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"]}],[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"]}],[1,"biggive-footer"],[1,"biggive-hero-image",{"spaceBelow":[2,"space-below"],"colourScheme":[1,"colour-scheme"],"slug":[1],"slugColour":[1,"slug-colour"],"logo":[1],"mainImage":[1,"main-image"],"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"]}],[1,"biggive-image-feature",{"spaceBelow":[2,"space-below"],"defaultTextColour":[1,"default-text-colour"],"imageUrl":[1,"image-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"]}],[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"]}],[1,"biggive-back-to-top"],[1,"biggive-branded-image",{"spaceBelow":[2,"space-below"],"imageUrl":[1,"image-url"],"logoUrl":[1,"logo-url"],"slug":[1],"charityName":[1,"charity-name"],"charityLocation":[1,"charity-location"],"charityUrl":[1,"charity-url"]}],[1,"biggive-grid",{"spaceBelow":[2,"space-below"],"columnCount":[2,"column-count"],"columnGap":[2,"column-gap"]}],[1,"biggive-header",{"spaceBelow":[2,"space-below"],"logoUrl":[1,"logo-url"]}],[1,"biggive-heading",{"spaceAbove":[2,"space-above"],"spaceBelow":[2,"space-below"],"colour":[1],"htmlElement":[1,"html-element"],"size":[2],"align":[1],"text":[1]}],[1,"biggive-page-column"],[1,"biggive-page-columns",{"spaceBelow":[2,"space-below"]}],[1,"biggive-page-section",{"spaceBelow":[2,"space-below"],"sectionStyleTop":[1,"section-style-top"],"sectionStyleBottom":[1,"section-style-bottom"],"colourScheme":[1,"colour-scheme"]}],[1,"biggive-quote",{"spaceBelow":[2,"space-below"],"defaultTextColour":[1,"default-text-colour"],"quote":[1],"attribution":[1]}],[0,"biggive-social-icon",{"service":[1],"backgroundColour":[1,"background-colour"],"iconColour":[1,"icon-colour"],"url":[1]}],[1,"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"]}],[1,"biggive-totalizer-ticker-item",{"figure":[1],"label":[1]}],[1,"biggive-form-field-select",{"selectedValue":[1,"selected-value"],"selectedLabel":[1,"selected-label"],"spaceBelow":[2,"space-below"],"placeholder":[1]},[[0,"doOptionSelect","doOptionSelectCompletedHandler"]]],[1,"biggive-form-field-select-option",{"label":[1],"value":[1],"selectedValue":[32],"selectedLabel":[32]}],[0,"biggive-misc-icon",{"backgroundColour":[1,"background-colour"],"iconColour":[1,"icon-colour"],"icon":[1],"url":[1]}],[1,"biggive-popup",{"openFromOutside":[64],"closeFromOutside":[64]}],[1,"biggive-progress-bar",{"spaceBelow":[2,"space-below"],"colourScheme":[1,"colour-scheme"],"counter":[2]}],[1,"biggive-button",{"spaceBelow":[2,"space-below"],"colourScheme":[1,"colour-scheme"],"label":[1],"url":[1],"fullWidth":[4,"full-width"],"size":[1],"rounded":[4]}]]],["biggive-article-card.cjs",[[1,"biggive-article-card",{"spaceBelow":[2,"space-below"],"backgroundColour":[1,"background-colour"],"backgroundColourHover":[1,"background-colour-hover"],"textColour":[1,"text-colour"],"slug":[1],"date":[1],"mainTitle":[1,"main-title"],"imageUrl":[1,"image-url"],"imageLabel":[1,"image-label"],"buttonLabel":[1,"button-label"],"buttonUrl":[1,"button-url"]}]]],["biggive-basic-card.cjs",[[1,"biggive-basic-card",{"spaceBelow":[2,"space-below"],"backgroundColour":[1,"background-colour"],"backgroundImageUrl":[1,"background-image-url"],"cardColour":[1,"card-colour"],"textColour":[1,"text-colour"],"mainTitle":[1,"main-title"],"subtitle":[1],"iconColour":[1,"icon-colour"],"buttonLabel":[1,"button-label"],"buttonUrl":[1,"button-url"],"buttonColourScheme":[1,"button-colour-scheme"]}]]],["biggive-search.cjs",[[1,"biggive-search",{"searchText":[1,"search-text"],"placeholderText":[1,"placeholder-text"],"buttonText":[1,"button-text"]}]]],["biggive-beneficiary-icon.cjs",[[0,"biggive-beneficiary-icon",{"backgroundColour":[1,"background-colour"],"iconColour":[1,"icon-colour"],"icon":[1],"label":[1],"url":[1]}]]],["biggive-boxed-content.cjs",[[1,"biggive-boxed-content",{"spaceBelow":[2,"space-below"],"verticalPadding":[2,"vertical-padding"],"horizontalPadding":[2,"horizontal-padding"],"backgroundColour":[1,"background-colour"],"shadow":[4]}]]],["biggive-category-icon.cjs",[[0,"biggive-category-icon",{"backgroundColour":[1,"background-colour"],"iconColour":[1,"icon-colour"],"icon":[1],"label":[1],"url":[1]}]]],["biggive-form.cjs",[[1,"biggive-form"]]],["biggive-formatted-text.cjs",[[1,"biggive-formatted-text",{"spaceBelow":[2,"space-below"],"defaultTextColour":[1,"default-text-colour"]}]]],["biggive-icon-group.cjs",[[1,"biggive-icon-group",{"spaceBelow":[2,"space-below"],"label":[1]}]]],["biggive-image.cjs",[[1,"biggive-image",{"spaceAbove":[2,"space-above"],"spaceBelow":[2,"space-below"],"imageUrl":[1,"image-url"],"width":[2],"height":[2],"sizeUnit":[1,"size-unit"]}]]],["biggive-nav-group.cjs",[[1,"biggive-nav-group",{"inline":[4]}]]],["biggive-nav-item.cjs",[[1,"biggive-nav-item",{"url":[1],"label":[1],"iconColour":[1,"icon-colour"]}]]],["biggive-popup-standalone.cjs",[[1,"biggive-popup-standalone"]]],["biggive-tab.cjs",[[1,"biggive-tab",{"tabTitle":[1,"tab-title"]}]]],["biggive-tabbed-content.cjs",[[1,"biggive-tabbed-content",{"spaceBelow":[2,"space-below"],"defaultTextColour":[1,"default-text-colour"]}]]],["biggive-text-input.cjs",[[1,"biggive-text-input"]]],["biggive-video.cjs",[[1,"biggive-video",{"spaceAbove":[2,"space-above"],"spaceBelow":[2,"space-below"],"videoUrl":[1,"video-url"]}]]]], options);
|
|
19
19
|
});
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -14,7 +14,7 @@ const patchEsm = () => {
|
|
|
14
14
|
const defineCustomElements = (win, options) => {
|
|
15
15
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
16
16
|
return patchEsm().then(() => {
|
|
17
|
-
return index.bootstrapLazy([["biggive-back-to-top_26.cjs",[[1,"biggive-campaign-card-filter-grid",{"spaceBelow":[2,"space-below"],"intro":[1],"searchText":[1,"search-text"],"placeholderText":[1,"placeholder-text"],"buttonText":[1,"button-text"],"categoryOptions":[16],"beneficiaryOptions":[16],"locationOptions":[16],"fundingOptions":[16],"
|
|
17
|
+
return index.bootstrapLazy([["biggive-back-to-top_26.cjs",[[1,"biggive-campaign-card-filter-grid",{"spaceBelow":[2,"space-below"],"intro":[1],"searchText":[1,"search-text"],"placeholderText":[1,"placeholder-text"],"buttonText":[1,"button-text"],"categoryOptions":[16],"beneficiaryOptions":[16],"locationOptions":[16],"fundingOptions":[16],"selectedSortByOption":[1,"selected-sort-by-option"],"selectedFilterCategory":[1,"selected-filter-category"],"selectedFilterBeneficiary":[1,"selected-filter-beneficiary"],"selectedFilterLocation":[1,"selected-filter-location"],"selectedFilterFunding":[1,"selected-filter-funding"]},[[0,"doSelectChange","doOptionSelectCompletedHandler"]]],[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"]}],[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"]}],[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"]}],[1,"biggive-footer"],[1,"biggive-hero-image",{"spaceBelow":[2,"space-below"],"colourScheme":[1,"colour-scheme"],"slug":[1],"slugColour":[1,"slug-colour"],"logo":[1],"mainImage":[1,"main-image"],"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"]}],[1,"biggive-image-feature",{"spaceBelow":[2,"space-below"],"defaultTextColour":[1,"default-text-colour"],"imageUrl":[1,"image-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"]}],[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"]}],[1,"biggive-back-to-top"],[1,"biggive-branded-image",{"spaceBelow":[2,"space-below"],"imageUrl":[1,"image-url"],"logoUrl":[1,"logo-url"],"slug":[1],"charityName":[1,"charity-name"],"charityLocation":[1,"charity-location"],"charityUrl":[1,"charity-url"]}],[1,"biggive-grid",{"spaceBelow":[2,"space-below"],"columnCount":[2,"column-count"],"columnGap":[2,"column-gap"]}],[1,"biggive-header",{"spaceBelow":[2,"space-below"],"logoUrl":[1,"logo-url"]}],[1,"biggive-heading",{"spaceAbove":[2,"space-above"],"spaceBelow":[2,"space-below"],"colour":[1],"htmlElement":[1,"html-element"],"size":[2],"align":[1],"text":[1]}],[1,"biggive-page-column"],[1,"biggive-page-columns",{"spaceBelow":[2,"space-below"]}],[1,"biggive-page-section",{"spaceBelow":[2,"space-below"],"sectionStyleTop":[1,"section-style-top"],"sectionStyleBottom":[1,"section-style-bottom"],"colourScheme":[1,"colour-scheme"]}],[1,"biggive-quote",{"spaceBelow":[2,"space-below"],"defaultTextColour":[1,"default-text-colour"],"quote":[1],"attribution":[1]}],[0,"biggive-social-icon",{"service":[1],"backgroundColour":[1,"background-colour"],"iconColour":[1,"icon-colour"],"url":[1]}],[1,"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"]}],[1,"biggive-totalizer-ticker-item",{"figure":[1],"label":[1]}],[1,"biggive-form-field-select",{"selectedValue":[1,"selected-value"],"selectedLabel":[1,"selected-label"],"spaceBelow":[2,"space-below"],"placeholder":[1]},[[0,"doOptionSelect","doOptionSelectCompletedHandler"]]],[1,"biggive-form-field-select-option",{"label":[1],"value":[1],"selectedValue":[32],"selectedLabel":[32]}],[0,"biggive-misc-icon",{"backgroundColour":[1,"background-colour"],"iconColour":[1,"icon-colour"],"icon":[1],"url":[1]}],[1,"biggive-popup",{"openFromOutside":[64],"closeFromOutside":[64]}],[1,"biggive-progress-bar",{"spaceBelow":[2,"space-below"],"colourScheme":[1,"colour-scheme"],"counter":[2]}],[1,"biggive-button",{"spaceBelow":[2,"space-below"],"colourScheme":[1,"colour-scheme"],"label":[1],"url":[1],"fullWidth":[4,"full-width"],"size":[1],"rounded":[4]}]]],["biggive-article-card.cjs",[[1,"biggive-article-card",{"spaceBelow":[2,"space-below"],"backgroundColour":[1,"background-colour"],"backgroundColourHover":[1,"background-colour-hover"],"textColour":[1,"text-colour"],"slug":[1],"date":[1],"mainTitle":[1,"main-title"],"imageUrl":[1,"image-url"],"imageLabel":[1,"image-label"],"buttonLabel":[1,"button-label"],"buttonUrl":[1,"button-url"]}]]],["biggive-basic-card.cjs",[[1,"biggive-basic-card",{"spaceBelow":[2,"space-below"],"backgroundColour":[1,"background-colour"],"backgroundImageUrl":[1,"background-image-url"],"cardColour":[1,"card-colour"],"textColour":[1,"text-colour"],"mainTitle":[1,"main-title"],"subtitle":[1],"iconColour":[1,"icon-colour"],"buttonLabel":[1,"button-label"],"buttonUrl":[1,"button-url"],"buttonColourScheme":[1,"button-colour-scheme"]}]]],["biggive-search.cjs",[[1,"biggive-search",{"searchText":[1,"search-text"],"placeholderText":[1,"placeholder-text"],"buttonText":[1,"button-text"]}]]],["biggive-beneficiary-icon.cjs",[[0,"biggive-beneficiary-icon",{"backgroundColour":[1,"background-colour"],"iconColour":[1,"icon-colour"],"icon":[1],"label":[1],"url":[1]}]]],["biggive-boxed-content.cjs",[[1,"biggive-boxed-content",{"spaceBelow":[2,"space-below"],"verticalPadding":[2,"vertical-padding"],"horizontalPadding":[2,"horizontal-padding"],"backgroundColour":[1,"background-colour"],"shadow":[4]}]]],["biggive-category-icon.cjs",[[0,"biggive-category-icon",{"backgroundColour":[1,"background-colour"],"iconColour":[1,"icon-colour"],"icon":[1],"label":[1],"url":[1]}]]],["biggive-form.cjs",[[1,"biggive-form"]]],["biggive-formatted-text.cjs",[[1,"biggive-formatted-text",{"spaceBelow":[2,"space-below"],"defaultTextColour":[1,"default-text-colour"]}]]],["biggive-icon-group.cjs",[[1,"biggive-icon-group",{"spaceBelow":[2,"space-below"],"label":[1]}]]],["biggive-image.cjs",[[1,"biggive-image",{"spaceAbove":[2,"space-above"],"spaceBelow":[2,"space-below"],"imageUrl":[1,"image-url"],"width":[2],"height":[2],"sizeUnit":[1,"size-unit"]}]]],["biggive-nav-group.cjs",[[1,"biggive-nav-group",{"inline":[4]}]]],["biggive-nav-item.cjs",[[1,"biggive-nav-item",{"url":[1],"label":[1],"iconColour":[1,"icon-colour"]}]]],["biggive-popup-standalone.cjs",[[1,"biggive-popup-standalone"]]],["biggive-tab.cjs",[[1,"biggive-tab",{"tabTitle":[1,"tab-title"]}]]],["biggive-tabbed-content.cjs",[[1,"biggive-tabbed-content",{"spaceBelow":[2,"space-below"],"defaultTextColour":[1,"default-text-colour"]}]]],["biggive-text-input.cjs",[[1,"biggive-text-input"]]],["biggive-video.cjs",[[1,"biggive-video",{"spaceAbove":[2,"space-above"],"spaceBelow":[2,"space-below"],"videoUrl":[1,"video-url"]}]]]], options);
|
|
18
18
|
});
|
|
19
19
|
};
|
|
20
20
|
|
|
@@ -39,7 +39,11 @@ export class BiggiveCampaignCardFilterGrid {
|
|
|
39
39
|
this.beneficiaryOptions = [];
|
|
40
40
|
this.locationOptions = [];
|
|
41
41
|
this.fundingOptions = [];
|
|
42
|
-
this.
|
|
42
|
+
this.selectedSortByOption = null;
|
|
43
|
+
this.selectedFilterCategory = null;
|
|
44
|
+
this.selectedFilterBeneficiary = null;
|
|
45
|
+
this.selectedFilterLocation = null;
|
|
46
|
+
this.selectedFilterFunding = null;
|
|
43
47
|
}
|
|
44
48
|
getSearchAndFilterObject() {
|
|
45
49
|
const event = {
|
|
@@ -73,13 +77,13 @@ export class BiggiveCampaignCardFilterGrid {
|
|
|
73
77
|
}
|
|
74
78
|
}
|
|
75
79
|
render() {
|
|
76
|
-
return (h("div", { class: 'container space-below-' + this.spaceBelow }, h("div", { class: "sleeve" }, h("div", { class: "search-wrap" }, h("h4", null, this.intro), h("div", { class: "field-wrap" }, h("div", { class: "input-wrap" }, h("svg", { xmlns: "http://www.w3.org/2000/svg", class: "icon", viewBox: "0 0 512 512" }, h("path", { d: faMagnifyingGlass.icon[4].toString() })), h("input", { type: "text", value: this.searchText, class: "input-text", placeholder: this.placeholderText, onInput: this.handleSearchTextChanged, onKeyDown: this.handleEnterPressed })), h("biggive-button", { onClick: this.handleSearchButtonPressed, label: this.buttonText }))), h("div", { class: "sort-filter-wrap" }, h("a", { onClick: this.handleClearFiltersClicked, id: "clearFilters" }, "Clear Filters"), h("div", { class: "sort-wrap" }, h("biggive-form-field-select", { placeholder: "Sort by", selectedLabel: this.
|
|
80
|
+
return (h("div", { class: 'container space-below-' + this.spaceBelow }, h("div", { class: "sleeve" }, h("div", { class: "search-wrap" }, h("h4", null, this.intro), h("div", { class: "field-wrap" }, h("div", { class: "input-wrap" }, h("svg", { xmlns: "http://www.w3.org/2000/svg", class: "icon", viewBox: "0 0 512 512" }, h("path", { d: faMagnifyingGlass.icon[4].toString() })), h("input", { type: "text", value: this.searchText, class: "input-text", placeholder: this.placeholderText, onInput: this.handleSearchTextChanged, onKeyDown: this.handleEnterPressed })), h("biggive-button", { onClick: this.handleSearchButtonPressed, label: this.buttonText }))), h("div", { class: "sort-filter-wrap" }, h("a", { onClick: this.handleClearFiltersClicked, id: "clearFilters" }, "Clear Filters"), h("div", { class: "sort-wrap" }, h("biggive-form-field-select", { placeholder: "Sort by", selectedLabel: this.selectedSortByOption, id: "sort-by" }, h("biggive-form-field-select-option", { value: "amountRaised", label: "Most raised" }), h("biggive-form-field-select-option", { value: "matchFundsRemaining", label: "Match funds remaining" }), h("biggive-form-field-select-option", { value: "Relevance", label: "Relevance" }))), h("div", { class: "filter-wrap" }, h("biggive-button", { class: "filter", onClick: this.handleFilterButtonClick, label: "Filters", fullWidth: true }), h("biggive-popup", { id: "filter-popup" }, h("h4", { class: "space-above-0 space-below-3 colour-primary" }, "Filters"), h("biggive-form-field-select", { placeholder: "Category", selectedLabel: this.selectedFilterCategory, id: "categories", "space-below": "2" }, this.categoryOptions.length === 0
|
|
77
81
|
? undefined
|
|
78
|
-
: this.categoryOptions.map(option => h("biggive-form-field-select-option", { value: option, label: option }))), h("biggive-form-field-select", { placeholder: "Beneficiary", id: "beneficiaries", "space-below": "2" }, this.beneficiaryOptions.length === 0
|
|
82
|
+
: this.categoryOptions.map(option => h("biggive-form-field-select-option", { value: option, label: option }))), h("biggive-form-field-select", { placeholder: "Beneficiary", selectedLabel: this.selectedFilterBeneficiary, id: "beneficiaries", "space-below": "2" }, this.beneficiaryOptions.length === 0
|
|
79
83
|
? undefined
|
|
80
|
-
: this.beneficiaryOptions.map(option => h("biggive-form-field-select-option", { value: option, label: option }))), h("biggive-form-field-select", { placeholder: "Location", id: "locations", "space-below": "2" }, this.locationOptions.length === 0
|
|
84
|
+
: this.beneficiaryOptions.map(option => h("biggive-form-field-select-option", { value: option, label: option }))), h("biggive-form-field-select", { placeholder: "Location", selectedLabel: this.selectedFilterLocation, id: "locations", "space-below": "2" }, this.locationOptions.length === 0
|
|
81
85
|
? undefined
|
|
82
|
-
: this.locationOptions.map(option => h("biggive-form-field-select-option", { value: option, label: option }))), h("biggive-form-field-select", { placeholder: "Funding", id: "funding", "space-below": "2" }, this.fundingOptions.length === 0
|
|
86
|
+
: this.locationOptions.map(option => h("biggive-form-field-select-option", { value: option, label: option }))), h("biggive-form-field-select", { placeholder: "Funding", selectedLabel: this.selectedFilterFunding, id: "funding", "space-below": "2" }, this.fundingOptions.length === 0
|
|
83
87
|
? undefined
|
|
84
88
|
: this.fundingOptions.map(option => h("biggive-form-field-select-option", { value: option, label: option }))), h("div", { class: "align-right" }, h("biggive-button", { label: "Apply filters", onClick: this.handleApplyFilterButtonClick }))))), h("div", { class: "campaign-grid" }, h("slot", { name: "campaign-grid" })))));
|
|
85
89
|
}
|
|
@@ -251,7 +255,7 @@ export class BiggiveCampaignCardFilterGrid {
|
|
|
251
255
|
},
|
|
252
256
|
"defaultValue": "[]"
|
|
253
257
|
},
|
|
254
|
-
"
|
|
258
|
+
"selectedSortByOption": {
|
|
255
259
|
"type": "string",
|
|
256
260
|
"mutable": false,
|
|
257
261
|
"complexType": {
|
|
@@ -265,7 +269,79 @@ export class BiggiveCampaignCardFilterGrid {
|
|
|
265
269
|
"tags": [],
|
|
266
270
|
"text": "This helps us inject a pre-selected dropdown value from outside of this component.\nThis is especially helpful for the Meta campaign and Explore pages, where searching\nby text whipes out previous sort options and re-uses Relevance, or where one of those\ntwo pages is loaded directly with URL parameters - in such a scenario the dropdown\nshows that it's pre-selected. DON-558."
|
|
267
271
|
},
|
|
268
|
-
"attribute": "selected-
|
|
272
|
+
"attribute": "selected-sort-by-option",
|
|
273
|
+
"reflect": false,
|
|
274
|
+
"defaultValue": "null"
|
|
275
|
+
},
|
|
276
|
+
"selectedFilterCategory": {
|
|
277
|
+
"type": "string",
|
|
278
|
+
"mutable": false,
|
|
279
|
+
"complexType": {
|
|
280
|
+
"original": "string",
|
|
281
|
+
"resolved": "string",
|
|
282
|
+
"references": {}
|
|
283
|
+
},
|
|
284
|
+
"required": false,
|
|
285
|
+
"optional": false,
|
|
286
|
+
"docs": {
|
|
287
|
+
"tags": [],
|
|
288
|
+
"text": "For injecting the chosen category to filter by, as per the comment above for `selectedSortByOption`."
|
|
289
|
+
},
|
|
290
|
+
"attribute": "selected-filter-category",
|
|
291
|
+
"reflect": false,
|
|
292
|
+
"defaultValue": "null"
|
|
293
|
+
},
|
|
294
|
+
"selectedFilterBeneficiary": {
|
|
295
|
+
"type": "string",
|
|
296
|
+
"mutable": false,
|
|
297
|
+
"complexType": {
|
|
298
|
+
"original": "string",
|
|
299
|
+
"resolved": "string",
|
|
300
|
+
"references": {}
|
|
301
|
+
},
|
|
302
|
+
"required": false,
|
|
303
|
+
"optional": false,
|
|
304
|
+
"docs": {
|
|
305
|
+
"tags": [],
|
|
306
|
+
"text": "For injecting the chosen beneficiary to filter by, as per the comment above for `selectedSortByOption`."
|
|
307
|
+
},
|
|
308
|
+
"attribute": "selected-filter-beneficiary",
|
|
309
|
+
"reflect": false,
|
|
310
|
+
"defaultValue": "null"
|
|
311
|
+
},
|
|
312
|
+
"selectedFilterLocation": {
|
|
313
|
+
"type": "string",
|
|
314
|
+
"mutable": false,
|
|
315
|
+
"complexType": {
|
|
316
|
+
"original": "string",
|
|
317
|
+
"resolved": "string",
|
|
318
|
+
"references": {}
|
|
319
|
+
},
|
|
320
|
+
"required": false,
|
|
321
|
+
"optional": false,
|
|
322
|
+
"docs": {
|
|
323
|
+
"tags": [],
|
|
324
|
+
"text": "For injecting the chosen location to filter by, as per the comment above for `selectedSortByOption`."
|
|
325
|
+
},
|
|
326
|
+
"attribute": "selected-filter-location",
|
|
327
|
+
"reflect": false,
|
|
328
|
+
"defaultValue": "null"
|
|
329
|
+
},
|
|
330
|
+
"selectedFilterFunding": {
|
|
331
|
+
"type": "string",
|
|
332
|
+
"mutable": false,
|
|
333
|
+
"complexType": {
|
|
334
|
+
"original": "string",
|
|
335
|
+
"resolved": "string",
|
|
336
|
+
"references": {}
|
|
337
|
+
},
|
|
338
|
+
"required": false,
|
|
339
|
+
"optional": false,
|
|
340
|
+
"docs": {
|
|
341
|
+
"tags": [],
|
|
342
|
+
"text": "For injecting the chosen funding to filter by, as per the comment above for `selectedSortByOption`."
|
|
343
|
+
},
|
|
344
|
+
"attribute": "selected-filter-funding",
|
|
269
345
|
"reflect": false,
|
|
270
346
|
"defaultValue": "null"
|
|
271
347
|
}
|
|
@@ -16,10 +16,56 @@ export default {
|
|
|
16
16
|
searchText: {
|
|
17
17
|
name: 'Search Text',
|
|
18
18
|
},
|
|
19
|
+
selectedSortByOption: {
|
|
20
|
+
name: 'Selected Sort By Option',
|
|
21
|
+
options: ['Match funds remaining', 'Most raised', 'Relevance'],
|
|
22
|
+
control: {
|
|
23
|
+
type: 'select',
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
selectedFilterCategory: {
|
|
27
|
+
name: 'Selected Filter Category',
|
|
28
|
+
options: ['Health', 'Disaster Relief', 'Cancer'],
|
|
29
|
+
control: {
|
|
30
|
+
type: 'select',
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
selectedFilterBeneficiary: {
|
|
34
|
+
name: 'Selected Filter Beneficiary',
|
|
35
|
+
options: ['General Public', 'Animals', 'Veterans'],
|
|
36
|
+
control: {
|
|
37
|
+
type: 'select',
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
selectedFilterLocation: {
|
|
41
|
+
name: 'Selected Filter Location',
|
|
42
|
+
options: ['United Kingdom', 'Spain', 'France'],
|
|
43
|
+
control: {
|
|
44
|
+
type: 'select',
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
selectedFilterFunding: {
|
|
48
|
+
name: 'Selected Filter Funding',
|
|
49
|
+
options: ['Match funded'],
|
|
50
|
+
control: {
|
|
51
|
+
type: 'select',
|
|
52
|
+
},
|
|
53
|
+
},
|
|
19
54
|
},
|
|
20
55
|
};
|
|
21
56
|
const Template = args => `
|
|
22
|
-
<biggive-campaign-card-filter-grid
|
|
57
|
+
<biggive-campaign-card-filter-grid
|
|
58
|
+
category-options="${args.categoryOptions}"
|
|
59
|
+
beneficiary-options="${args.beneficiaryOptions}"
|
|
60
|
+
location-options="${args.locationOptions}"
|
|
61
|
+
funding-options="${args.fundingOptions}"
|
|
62
|
+
search-text="${args.searchText}"
|
|
63
|
+
selected-sort-by-option="${args.selectedSortByOption}"
|
|
64
|
+
selected-filter-categeory="${args.selectedFilterCategory}"
|
|
65
|
+
selected-filter-beneficiary="${args.selectedFilterBeneficiary}"
|
|
66
|
+
selected-filter-location="${args.selectedFilterLocation}"
|
|
67
|
+
selected-filter-funding="${args.selectedFilterFunding}"
|
|
68
|
+
>
|
|
23
69
|
<biggive-grid slot="campaign-grid" column-count="3">
|
|
24
70
|
<biggive-campaign-card
|
|
25
71
|
campaign-type="Match Funded"
|
|
@@ -68,4 +114,9 @@ CampaignCardFilterGridComponent.args = {
|
|
|
68
114
|
locationOptions: ['ABC', 'DEF'],
|
|
69
115
|
fundingOptions: ['ABC', 'DEF'],
|
|
70
116
|
searchText: '',
|
|
117
|
+
selectedSortByOption: 'Sort by',
|
|
118
|
+
selectedFilterCategory: 'Category',
|
|
119
|
+
selectedFilterBeneficiary: 'Beneficiary',
|
|
120
|
+
selectedFilterLocation: 'Location',
|
|
121
|
+
selectedFilterFunding: 'Funding', // use the placeholder as the defaulted option
|
|
71
122
|
};
|
|
@@ -51,7 +51,11 @@ const BiggiveCampaignCardFilterGrid$1 = /*@__PURE__*/ proxyCustomElement(class e
|
|
|
51
51
|
this.beneficiaryOptions = [];
|
|
52
52
|
this.locationOptions = [];
|
|
53
53
|
this.fundingOptions = [];
|
|
54
|
-
this.
|
|
54
|
+
this.selectedSortByOption = null;
|
|
55
|
+
this.selectedFilterCategory = null;
|
|
56
|
+
this.selectedFilterBeneficiary = null;
|
|
57
|
+
this.selectedFilterLocation = null;
|
|
58
|
+
this.selectedFilterFunding = null;
|
|
55
59
|
}
|
|
56
60
|
getSearchAndFilterObject() {
|
|
57
61
|
const event = {
|
|
@@ -85,13 +89,13 @@ const BiggiveCampaignCardFilterGrid$1 = /*@__PURE__*/ proxyCustomElement(class e
|
|
|
85
89
|
}
|
|
86
90
|
}
|
|
87
91
|
render() {
|
|
88
|
-
return (h("div", { class: 'container space-below-' + this.spaceBelow }, h("div", { class: "sleeve" }, h("div", { class: "search-wrap" }, h("h4", null, this.intro), h("div", { class: "field-wrap" }, h("div", { class: "input-wrap" }, h("svg", { xmlns: "http://www.w3.org/2000/svg", class: "icon", viewBox: "0 0 512 512" }, h("path", { d: faMagnifyingGlass.icon[4].toString() })), h("input", { type: "text", value: this.searchText, class: "input-text", placeholder: this.placeholderText, onInput: this.handleSearchTextChanged, onKeyDown: this.handleEnterPressed })), h("biggive-button", { onClick: this.handleSearchButtonPressed, label: this.buttonText }))), h("div", { class: "sort-filter-wrap" }, h("a", { onClick: this.handleClearFiltersClicked, id: "clearFilters" }, "Clear Filters"), h("div", { class: "sort-wrap" }, h("biggive-form-field-select", { placeholder: "Sort by", selectedLabel: this.
|
|
92
|
+
return (h("div", { class: 'container space-below-' + this.spaceBelow }, h("div", { class: "sleeve" }, h("div", { class: "search-wrap" }, h("h4", null, this.intro), h("div", { class: "field-wrap" }, h("div", { class: "input-wrap" }, h("svg", { xmlns: "http://www.w3.org/2000/svg", class: "icon", viewBox: "0 0 512 512" }, h("path", { d: faMagnifyingGlass.icon[4].toString() })), h("input", { type: "text", value: this.searchText, class: "input-text", placeholder: this.placeholderText, onInput: this.handleSearchTextChanged, onKeyDown: this.handleEnterPressed })), h("biggive-button", { onClick: this.handleSearchButtonPressed, label: this.buttonText }))), h("div", { class: "sort-filter-wrap" }, h("a", { onClick: this.handleClearFiltersClicked, id: "clearFilters" }, "Clear Filters"), h("div", { class: "sort-wrap" }, h("biggive-form-field-select", { placeholder: "Sort by", selectedLabel: this.selectedSortByOption, id: "sort-by" }, h("biggive-form-field-select-option", { value: "amountRaised", label: "Most raised" }), h("biggive-form-field-select-option", { value: "matchFundsRemaining", label: "Match funds remaining" }), h("biggive-form-field-select-option", { value: "Relevance", label: "Relevance" }))), h("div", { class: "filter-wrap" }, h("biggive-button", { class: "filter", onClick: this.handleFilterButtonClick, label: "Filters", fullWidth: true }), h("biggive-popup", { id: "filter-popup" }, h("h4", { class: "space-above-0 space-below-3 colour-primary" }, "Filters"), h("biggive-form-field-select", { placeholder: "Category", selectedLabel: this.selectedFilterCategory, id: "categories", "space-below": "2" }, this.categoryOptions.length === 0
|
|
89
93
|
? undefined
|
|
90
|
-
: this.categoryOptions.map(option => h("biggive-form-field-select-option", { value: option, label: option }))), h("biggive-form-field-select", { placeholder: "Beneficiary", id: "beneficiaries", "space-below": "2" }, this.beneficiaryOptions.length === 0
|
|
94
|
+
: this.categoryOptions.map(option => h("biggive-form-field-select-option", { value: option, label: option }))), h("biggive-form-field-select", { placeholder: "Beneficiary", selectedLabel: this.selectedFilterBeneficiary, id: "beneficiaries", "space-below": "2" }, this.beneficiaryOptions.length === 0
|
|
91
95
|
? undefined
|
|
92
|
-
: this.beneficiaryOptions.map(option => h("biggive-form-field-select-option", { value: option, label: option }))), h("biggive-form-field-select", { placeholder: "Location", id: "locations", "space-below": "2" }, this.locationOptions.length === 0
|
|
96
|
+
: this.beneficiaryOptions.map(option => h("biggive-form-field-select-option", { value: option, label: option }))), h("biggive-form-field-select", { placeholder: "Location", selectedLabel: this.selectedFilterLocation, id: "locations", "space-below": "2" }, this.locationOptions.length === 0
|
|
93
97
|
? undefined
|
|
94
|
-
: this.locationOptions.map(option => h("biggive-form-field-select-option", { value: option, label: option }))), h("biggive-form-field-select", { placeholder: "Funding", id: "funding", "space-below": "2" }, this.fundingOptions.length === 0
|
|
98
|
+
: this.locationOptions.map(option => h("biggive-form-field-select-option", { value: option, label: option }))), h("biggive-form-field-select", { placeholder: "Funding", selectedLabel: this.selectedFilterFunding, id: "funding", "space-below": "2" }, this.fundingOptions.length === 0
|
|
95
99
|
? undefined
|
|
96
100
|
: this.fundingOptions.map(option => h("biggive-form-field-select-option", { value: option, label: option }))), h("div", { class: "align-right" }, h("biggive-button", { label: "Apply filters", onClick: this.handleApplyFilterButtonClick }))))), h("div", { class: "campaign-grid" }, h("slot", { name: "campaign-grid" })))));
|
|
97
101
|
}
|
|
@@ -107,7 +111,11 @@ const BiggiveCampaignCardFilterGrid$1 = /*@__PURE__*/ proxyCustomElement(class e
|
|
|
107
111
|
"beneficiaryOptions": [16],
|
|
108
112
|
"locationOptions": [16],
|
|
109
113
|
"fundingOptions": [16],
|
|
110
|
-
"
|
|
114
|
+
"selectedSortByOption": [1, "selected-sort-by-option"],
|
|
115
|
+
"selectedFilterCategory": [1, "selected-filter-category"],
|
|
116
|
+
"selectedFilterBeneficiary": [1, "selected-filter-beneficiary"],
|
|
117
|
+
"selectedFilterLocation": [1, "selected-filter-location"],
|
|
118
|
+
"selectedFilterFunding": [1, "selected-filter-funding"]
|
|
111
119
|
}, [[0, "doSelectChange", "doOptionSelectCompletedHandler"]]]);
|
|
112
120
|
function defineCustomElement$1() {
|
|
113
121
|
if (typeof customElements === "undefined") {
|
|
@@ -157,7 +157,11 @@ const BiggiveCampaignCardFilterGrid = class {
|
|
|
157
157
|
this.beneficiaryOptions = [];
|
|
158
158
|
this.locationOptions = [];
|
|
159
159
|
this.fundingOptions = [];
|
|
160
|
-
this.
|
|
160
|
+
this.selectedSortByOption = null;
|
|
161
|
+
this.selectedFilterCategory = null;
|
|
162
|
+
this.selectedFilterBeneficiary = null;
|
|
163
|
+
this.selectedFilterLocation = null;
|
|
164
|
+
this.selectedFilterFunding = null;
|
|
161
165
|
}
|
|
162
166
|
getSearchAndFilterObject() {
|
|
163
167
|
const event = {
|
|
@@ -191,13 +195,13 @@ const BiggiveCampaignCardFilterGrid = class {
|
|
|
191
195
|
}
|
|
192
196
|
}
|
|
193
197
|
render() {
|
|
194
|
-
return (h("div", { class: 'container space-below-' + this.spaceBelow }, h("div", { class: "sleeve" }, h("div", { class: "search-wrap" }, h("h4", null, this.intro), h("div", { class: "field-wrap" }, h("div", { class: "input-wrap" }, h("svg", { xmlns: "http://www.w3.org/2000/svg", class: "icon", viewBox: "0 0 512 512" }, h("path", { d: faMagnifyingGlass.icon[4].toString() })), h("input", { type: "text", value: this.searchText, class: "input-text", placeholder: this.placeholderText, onInput: this.handleSearchTextChanged, onKeyDown: this.handleEnterPressed })), h("biggive-button", { onClick: this.handleSearchButtonPressed, label: this.buttonText }))), h("div", { class: "sort-filter-wrap" }, h("a", { onClick: this.handleClearFiltersClicked, id: "clearFilters" }, "Clear Filters"), h("div", { class: "sort-wrap" }, h("biggive-form-field-select", { placeholder: "Sort by", selectedLabel: this.
|
|
198
|
+
return (h("div", { class: 'container space-below-' + this.spaceBelow }, h("div", { class: "sleeve" }, h("div", { class: "search-wrap" }, h("h4", null, this.intro), h("div", { class: "field-wrap" }, h("div", { class: "input-wrap" }, h("svg", { xmlns: "http://www.w3.org/2000/svg", class: "icon", viewBox: "0 0 512 512" }, h("path", { d: faMagnifyingGlass.icon[4].toString() })), h("input", { type: "text", value: this.searchText, class: "input-text", placeholder: this.placeholderText, onInput: this.handleSearchTextChanged, onKeyDown: this.handleEnterPressed })), h("biggive-button", { onClick: this.handleSearchButtonPressed, label: this.buttonText }))), h("div", { class: "sort-filter-wrap" }, h("a", { onClick: this.handleClearFiltersClicked, id: "clearFilters" }, "Clear Filters"), h("div", { class: "sort-wrap" }, h("biggive-form-field-select", { placeholder: "Sort by", selectedLabel: this.selectedSortByOption, id: "sort-by" }, h("biggive-form-field-select-option", { value: "amountRaised", label: "Most raised" }), h("biggive-form-field-select-option", { value: "matchFundsRemaining", label: "Match funds remaining" }), h("biggive-form-field-select-option", { value: "Relevance", label: "Relevance" }))), h("div", { class: "filter-wrap" }, h("biggive-button", { class: "filter", onClick: this.handleFilterButtonClick, label: "Filters", fullWidth: true }), h("biggive-popup", { id: "filter-popup" }, h("h4", { class: "space-above-0 space-below-3 colour-primary" }, "Filters"), h("biggive-form-field-select", { placeholder: "Category", selectedLabel: this.selectedFilterCategory, id: "categories", "space-below": "2" }, this.categoryOptions.length === 0
|
|
195
199
|
? undefined
|
|
196
|
-
: this.categoryOptions.map(option => h("biggive-form-field-select-option", { value: option, label: option }))), h("biggive-form-field-select", { placeholder: "Beneficiary", id: "beneficiaries", "space-below": "2" }, this.beneficiaryOptions.length === 0
|
|
200
|
+
: this.categoryOptions.map(option => h("biggive-form-field-select-option", { value: option, label: option }))), h("biggive-form-field-select", { placeholder: "Beneficiary", selectedLabel: this.selectedFilterBeneficiary, id: "beneficiaries", "space-below": "2" }, this.beneficiaryOptions.length === 0
|
|
197
201
|
? undefined
|
|
198
|
-
: this.beneficiaryOptions.map(option => h("biggive-form-field-select-option", { value: option, label: option }))), h("biggive-form-field-select", { placeholder: "Location", id: "locations", "space-below": "2" }, this.locationOptions.length === 0
|
|
202
|
+
: this.beneficiaryOptions.map(option => h("biggive-form-field-select-option", { value: option, label: option }))), h("biggive-form-field-select", { placeholder: "Location", selectedLabel: this.selectedFilterLocation, id: "locations", "space-below": "2" }, this.locationOptions.length === 0
|
|
199
203
|
? undefined
|
|
200
|
-
: this.locationOptions.map(option => h("biggive-form-field-select-option", { value: option, label: option }))), h("biggive-form-field-select", { placeholder: "Funding", id: "funding", "space-below": "2" }, this.fundingOptions.length === 0
|
|
204
|
+
: this.locationOptions.map(option => h("biggive-form-field-select-option", { value: option, label: option }))), h("biggive-form-field-select", { placeholder: "Funding", selectedLabel: this.selectedFilterFunding, id: "funding", "space-below": "2" }, this.fundingOptions.length === 0
|
|
201
205
|
? undefined
|
|
202
206
|
: this.fundingOptions.map(option => h("biggive-form-field-select-option", { value: option, label: option }))), h("div", { class: "align-right" }, h("biggive-button", { label: "Apply filters", onClick: this.handleApplyFilterButtonClick }))))), h("div", { class: "campaign-grid" }, h("slot", { name: "campaign-grid" })))));
|
|
203
207
|
}
|
package/dist/esm/biggive.js
CHANGED
|
@@ -13,5 +13,5 @@ const patchBrowser = () => {
|
|
|
13
13
|
};
|
|
14
14
|
|
|
15
15
|
patchBrowser().then(options => {
|
|
16
|
-
return bootstrapLazy([["biggive-back-to-top_26",[[1,"biggive-campaign-card-filter-grid",{"spaceBelow":[2,"space-below"],"intro":[1],"searchText":[1,"search-text"],"placeholderText":[1,"placeholder-text"],"buttonText":[1,"button-text"],"categoryOptions":[16],"beneficiaryOptions":[16],"locationOptions":[16],"fundingOptions":[16],"
|
|
16
|
+
return bootstrapLazy([["biggive-back-to-top_26",[[1,"biggive-campaign-card-filter-grid",{"spaceBelow":[2,"space-below"],"intro":[1],"searchText":[1,"search-text"],"placeholderText":[1,"placeholder-text"],"buttonText":[1,"button-text"],"categoryOptions":[16],"beneficiaryOptions":[16],"locationOptions":[16],"fundingOptions":[16],"selectedSortByOption":[1,"selected-sort-by-option"],"selectedFilterCategory":[1,"selected-filter-category"],"selectedFilterBeneficiary":[1,"selected-filter-beneficiary"],"selectedFilterLocation":[1,"selected-filter-location"],"selectedFilterFunding":[1,"selected-filter-funding"]},[[0,"doSelectChange","doOptionSelectCompletedHandler"]]],[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"]}],[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"]}],[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"]}],[1,"biggive-footer"],[1,"biggive-hero-image",{"spaceBelow":[2,"space-below"],"colourScheme":[1,"colour-scheme"],"slug":[1],"slugColour":[1,"slug-colour"],"logo":[1],"mainImage":[1,"main-image"],"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"]}],[1,"biggive-image-feature",{"spaceBelow":[2,"space-below"],"defaultTextColour":[1,"default-text-colour"],"imageUrl":[1,"image-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"]}],[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"]}],[1,"biggive-back-to-top"],[1,"biggive-branded-image",{"spaceBelow":[2,"space-below"],"imageUrl":[1,"image-url"],"logoUrl":[1,"logo-url"],"slug":[1],"charityName":[1,"charity-name"],"charityLocation":[1,"charity-location"],"charityUrl":[1,"charity-url"]}],[1,"biggive-grid",{"spaceBelow":[2,"space-below"],"columnCount":[2,"column-count"],"columnGap":[2,"column-gap"]}],[1,"biggive-header",{"spaceBelow":[2,"space-below"],"logoUrl":[1,"logo-url"]}],[1,"biggive-heading",{"spaceAbove":[2,"space-above"],"spaceBelow":[2,"space-below"],"colour":[1],"htmlElement":[1,"html-element"],"size":[2],"align":[1],"text":[1]}],[1,"biggive-page-column"],[1,"biggive-page-columns",{"spaceBelow":[2,"space-below"]}],[1,"biggive-page-section",{"spaceBelow":[2,"space-below"],"sectionStyleTop":[1,"section-style-top"],"sectionStyleBottom":[1,"section-style-bottom"],"colourScheme":[1,"colour-scheme"]}],[1,"biggive-quote",{"spaceBelow":[2,"space-below"],"defaultTextColour":[1,"default-text-colour"],"quote":[1],"attribution":[1]}],[0,"biggive-social-icon",{"service":[1],"backgroundColour":[1,"background-colour"],"iconColour":[1,"icon-colour"],"url":[1]}],[1,"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"]}],[1,"biggive-totalizer-ticker-item",{"figure":[1],"label":[1]}],[1,"biggive-form-field-select",{"selectedValue":[1,"selected-value"],"selectedLabel":[1,"selected-label"],"spaceBelow":[2,"space-below"],"placeholder":[1]},[[0,"doOptionSelect","doOptionSelectCompletedHandler"]]],[1,"biggive-form-field-select-option",{"label":[1],"value":[1],"selectedValue":[32],"selectedLabel":[32]}],[0,"biggive-misc-icon",{"backgroundColour":[1,"background-colour"],"iconColour":[1,"icon-colour"],"icon":[1],"url":[1]}],[1,"biggive-popup",{"openFromOutside":[64],"closeFromOutside":[64]}],[1,"biggive-progress-bar",{"spaceBelow":[2,"space-below"],"colourScheme":[1,"colour-scheme"],"counter":[2]}],[1,"biggive-button",{"spaceBelow":[2,"space-below"],"colourScheme":[1,"colour-scheme"],"label":[1],"url":[1],"fullWidth":[4,"full-width"],"size":[1],"rounded":[4]}]]],["biggive-article-card",[[1,"biggive-article-card",{"spaceBelow":[2,"space-below"],"backgroundColour":[1,"background-colour"],"backgroundColourHover":[1,"background-colour-hover"],"textColour":[1,"text-colour"],"slug":[1],"date":[1],"mainTitle":[1,"main-title"],"imageUrl":[1,"image-url"],"imageLabel":[1,"image-label"],"buttonLabel":[1,"button-label"],"buttonUrl":[1,"button-url"]}]]],["biggive-basic-card",[[1,"biggive-basic-card",{"spaceBelow":[2,"space-below"],"backgroundColour":[1,"background-colour"],"backgroundImageUrl":[1,"background-image-url"],"cardColour":[1,"card-colour"],"textColour":[1,"text-colour"],"mainTitle":[1,"main-title"],"subtitle":[1],"iconColour":[1,"icon-colour"],"buttonLabel":[1,"button-label"],"buttonUrl":[1,"button-url"],"buttonColourScheme":[1,"button-colour-scheme"]}]]],["biggive-search",[[1,"biggive-search",{"searchText":[1,"search-text"],"placeholderText":[1,"placeholder-text"],"buttonText":[1,"button-text"]}]]],["biggive-beneficiary-icon",[[0,"biggive-beneficiary-icon",{"backgroundColour":[1,"background-colour"],"iconColour":[1,"icon-colour"],"icon":[1],"label":[1],"url":[1]}]]],["biggive-boxed-content",[[1,"biggive-boxed-content",{"spaceBelow":[2,"space-below"],"verticalPadding":[2,"vertical-padding"],"horizontalPadding":[2,"horizontal-padding"],"backgroundColour":[1,"background-colour"],"shadow":[4]}]]],["biggive-category-icon",[[0,"biggive-category-icon",{"backgroundColour":[1,"background-colour"],"iconColour":[1,"icon-colour"],"icon":[1],"label":[1],"url":[1]}]]],["biggive-form",[[1,"biggive-form"]]],["biggive-formatted-text",[[1,"biggive-formatted-text",{"spaceBelow":[2,"space-below"],"defaultTextColour":[1,"default-text-colour"]}]]],["biggive-icon-group",[[1,"biggive-icon-group",{"spaceBelow":[2,"space-below"],"label":[1]}]]],["biggive-image",[[1,"biggive-image",{"spaceAbove":[2,"space-above"],"spaceBelow":[2,"space-below"],"imageUrl":[1,"image-url"],"width":[2],"height":[2],"sizeUnit":[1,"size-unit"]}]]],["biggive-nav-group",[[1,"biggive-nav-group",{"inline":[4]}]]],["biggive-nav-item",[[1,"biggive-nav-item",{"url":[1],"label":[1],"iconColour":[1,"icon-colour"]}]]],["biggive-popup-standalone",[[1,"biggive-popup-standalone"]]],["biggive-tab",[[1,"biggive-tab",{"tabTitle":[1,"tab-title"]}]]],["biggive-tabbed-content",[[1,"biggive-tabbed-content",{"spaceBelow":[2,"space-below"],"defaultTextColour":[1,"default-text-colour"]}]]],["biggive-text-input",[[1,"biggive-text-input"]]],["biggive-video",[[1,"biggive-video",{"spaceAbove":[2,"space-above"],"spaceBelow":[2,"space-below"],"videoUrl":[1,"video-url"]}]]]], options);
|
|
17
17
|
});
|