@biggive/components 1.0.175 → 1.0.176
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-116fa565.entry.js +1 -0
- package/dist/cjs/biggive-back-to-top_27.cjs.entry.js +33 -15
- 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 +62 -48
- package/dist/collection/components/biggive-campaign-card-filter-grid/biggive-campaign-card-filter-grid.stories.js +19 -27
- package/dist/components/biggive-campaign-card-filter-grid.js +39 -21
- package/dist/esm/biggive-back-to-top_27.entry.js +33 -15
- 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 +16 -9
- package/dist/types/components/biggive-campaign-card-filter-grid/biggive-campaign-card-filter-grid.stories.d.ts +0 -7
- package/dist/types/components.d.ts +16 -18
- package/hydrate/index.js +39 -21
- package/package.json +1 -1
- package/dist/biggive/p-9150c7c5.entry.js +0 -1
|
@@ -140,6 +140,10 @@ const BiggiveCampaignCardFilterGrid = class {
|
|
|
140
140
|
index.registerInstance(this, hostRef);
|
|
141
141
|
this.doSearchAndFilterUpdate = index.createEvent(this, "doSearchAndFilterUpdate", 7);
|
|
142
142
|
this.sortByPlaceholderText = 'Sort by';
|
|
143
|
+
this.beneficiariesPlaceHolderText = 'Beneficiary';
|
|
144
|
+
this.categoriesPlaceHolderText = 'Category';
|
|
145
|
+
this.locationsPlaceHolderText = 'Location';
|
|
146
|
+
this.fundingPlaceHolderText = 'Funding';
|
|
143
147
|
this.handleApplyFilterButtonClick = () => {
|
|
144
148
|
const searchAndFilterObj = this.getSearchAndFilterObject();
|
|
145
149
|
this.doSearchAndFilterUpdate.emit(searchAndFilterObj);
|
|
@@ -174,6 +178,11 @@ const BiggiveCampaignCardFilterGrid = class {
|
|
|
174
178
|
this.selectedFilterCategory = null;
|
|
175
179
|
this.selectedFilterFunding = null;
|
|
176
180
|
this.selectedFilterLocation = null;
|
|
181
|
+
// Clear <biggive-form-field-select> components' internal selectedValue and selectedLabel. DON-654.
|
|
182
|
+
['sort-by', 'categories', 'beneficiaries', 'locations', 'funding'].forEach(id => {
|
|
183
|
+
this.el.shadowRoot.getElementById(id).selectedValue = null;
|
|
184
|
+
this.el.shadowRoot.getElementById(id).selectedLabel = null;
|
|
185
|
+
});
|
|
177
186
|
// Emit the doSearchAndFilterUpdate event with null values. DON-654
|
|
178
187
|
this.doSearchAndFilterUpdate.emit({
|
|
179
188
|
searchText: null,
|
|
@@ -193,12 +202,12 @@ const BiggiveCampaignCardFilterGrid = class {
|
|
|
193
202
|
this.beneficiaryOptions = [];
|
|
194
203
|
this.locationOptions = [];
|
|
195
204
|
this.fundingOptions = [];
|
|
196
|
-
this.filtersApplied = undefined;
|
|
197
205
|
this.selectedSortByOption = null;
|
|
198
206
|
this.selectedFilterCategory = null;
|
|
199
207
|
this.selectedFilterBeneficiary = null;
|
|
200
208
|
this.selectedFilterLocation = null;
|
|
201
209
|
this.selectedFilterFunding = null;
|
|
210
|
+
this.filtersApplied = undefined;
|
|
202
211
|
}
|
|
203
212
|
getSearchAndFilterObject() {
|
|
204
213
|
const event = {
|
|
@@ -212,11 +221,7 @@ const BiggiveCampaignCardFilterGrid = class {
|
|
|
212
221
|
return event;
|
|
213
222
|
}
|
|
214
223
|
doOptionSelectCompletedHandler(event) {
|
|
215
|
-
|
|
216
|
-
this.selectedFilterCategory = this.el.shadowRoot.getElementById('categories').selectedValue;
|
|
217
|
-
this.selectedFilterBeneficiary = this.el.shadowRoot.getElementById('beneficiaries').selectedValue;
|
|
218
|
-
this.selectedFilterLocation = this.el.shadowRoot.getElementById('locations').selectedValue;
|
|
219
|
-
this.selectedFilterFunding = this.el.shadowRoot.getElementById('funding').selectedValue;
|
|
224
|
+
const nameOfUpdatedDropdown = event.detail.placeholder;
|
|
220
225
|
// If this method was trigerred by the selection of a 'Sort by' dropdown option, then
|
|
221
226
|
// emit an event to search, but do NOT emit an event for example when filter options
|
|
222
227
|
// are selected, until the 'Apply filters' button is pressed which is handled separately
|
|
@@ -225,10 +230,23 @@ const BiggiveCampaignCardFilterGrid = class {
|
|
|
225
230
|
// `<biggive-form-field-select placeholder="Sort by" id="sort-by" onDoSelectChange={this.someHandleMethod}>`
|
|
226
231
|
// but the problem with that is that `someHandleMethod` gets called first and then this
|
|
227
232
|
// method gets called, leading to two calls and more risk for error. DON-570.
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
233
|
+
switch (nameOfUpdatedDropdown) {
|
|
234
|
+
case this.sortByPlaceholderText:
|
|
235
|
+
this.selectedSortByOption = event.detail.value;
|
|
236
|
+
this.doSearchAndFilterUpdate.emit(this.getSearchAndFilterObject());
|
|
237
|
+
break;
|
|
238
|
+
case this.beneficiariesPlaceHolderText:
|
|
239
|
+
this.selectedFilterBeneficiary = event.detail.value;
|
|
240
|
+
break;
|
|
241
|
+
case this.categoriesPlaceHolderText:
|
|
242
|
+
this.selectedFilterCategory = event.detail.value;
|
|
243
|
+
break;
|
|
244
|
+
case this.fundingPlaceHolderText:
|
|
245
|
+
this.selectedFilterFunding = event.detail.value;
|
|
246
|
+
break;
|
|
247
|
+
case this.locationsPlaceHolderText:
|
|
248
|
+
this.selectedFilterLocation = event.detail.value;
|
|
249
|
+
break;
|
|
232
250
|
}
|
|
233
251
|
}
|
|
234
252
|
componentWillRender() {
|
|
@@ -236,15 +254,15 @@ const BiggiveCampaignCardFilterGrid = class {
|
|
|
236
254
|
this.selectedFilterCategory !== null || this.selectedFilterBeneficiary !== null || this.selectedFilterFunding !== null || this.selectedFilterLocation !== null;
|
|
237
255
|
}
|
|
238
256
|
render() {
|
|
239
|
-
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("div", { class: "clear-all" }, index.h("svg", { xmlns: "http://www.w3.org/2000/svg", class: "icon icon-clear-all", viewBox: "0 0 512 512" }, index.h("path", { d: index$1.faFilterSlash.icon[4].toString() })), index.h("a", { onClick: this.handleClearAll }, "Clear all")), index.h("div", { class: "sort-wrap" }, index.h("biggive-form-field-select", { placeholder:
|
|
257
|
+
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("div", { class: "clear-all" }, index.h("svg", { xmlns: "http://www.w3.org/2000/svg", class: "icon icon-clear-all", viewBox: "0 0 512 512" }, index.h("path", { d: index$1.faFilterSlash.icon[4].toString() })), index.h("a", { onClick: this.handleClearAll }, "Clear all")), index.h("div", { class: "sort-wrap" }, index.h("biggive-form-field-select", { placeholder: this.sortByPlaceholderText, 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", colourScheme: this.filtersApplied ? 'secondary' : 'primary', onClick: this.handleFilterButtonClick, label: "Filters", fullWidth: true, "space-below": "0" }), 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: this.categoriesPlaceHolderText, selectedLabel: this.selectedFilterCategory, id: "categories", "space-below": "2" }, this.categoryOptions.length === 0
|
|
240
258
|
? undefined
|
|
241
|
-
: this.categoryOptions.map(option => index.h("biggive-form-field-select-option", { value: option, label: option }))), index.h("biggive-form-field-select", { placeholder:
|
|
259
|
+
: (Array.isArray(this.categoryOptions) ? this.categoryOptions : JSON.parse(this.categoryOptions)).map(option => (index.h("biggive-form-field-select-option", { value: option, label: option })))), index.h("biggive-form-field-select", { placeholder: this.beneficiariesPlaceHolderText, selectedLabel: this.selectedFilterBeneficiary, id: "beneficiaries", "space-below": "2" }, this.beneficiaryOptions.length === 0
|
|
242
260
|
? undefined
|
|
243
|
-
: this.beneficiaryOptions.map(option => index.h("biggive-form-field-select-option", { value: option, label: option }))), index.h("biggive-form-field-select", { placeholder:
|
|
261
|
+
: (Array.isArray(this.beneficiaryOptions) ? this.beneficiaryOptions : JSON.parse(this.beneficiaryOptions)).map(option => (index.h("biggive-form-field-select-option", { value: option, label: option })))), index.h("biggive-form-field-select", { placeholder: this.locationsPlaceHolderText, selectedLabel: this.selectedFilterLocation, id: "locations", "space-below": "2" }, this.locationOptions.length === 0
|
|
244
262
|
? undefined
|
|
245
|
-
: this.locationOptions.map(option => index.h("biggive-form-field-select-option", { value: option, label: option }))), index.h("biggive-form-field-select", { placeholder:
|
|
263
|
+
: (Array.isArray(this.locationOptions) ? this.locationOptions : JSON.parse(this.locationOptions)).map(option => (index.h("biggive-form-field-select-option", { value: option, label: option })))), index.h("biggive-form-field-select", { placeholder: this.fundingPlaceHolderText, selectedLabel: this.selectedFilterFunding, id: "funding", "space-below": "2" }, this.fundingOptions.length === 0
|
|
246
264
|
? undefined
|
|
247
|
-
: 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" })))));
|
|
265
|
+
: (Array.isArray(this.fundingOptions) ? this.fundingOptions : JSON.parse(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" })))));
|
|
248
266
|
}
|
|
249
267
|
get el() { return index.getElement(this); }
|
|
250
268
|
};
|
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_27.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],"filtersApplied":[4,"filters-applied"],"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"],"isFutureCampaign":[4,"is-future-campaign"],"isPastCampaign":[4,"is-past-campaign"],"datetime":[1]}],[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-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-footer"],[1,"biggive-hero-image",{"spaceBelow":[2,"space-below"],"colourScheme":[1,"colour-scheme"],"slug":[1],"slugColour":[1,"slug-colour"],"logo":[1],"logoAltText":[1,"logo-alt-text"],"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"],"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"]}],[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"],"spaceBetween":[4,"space-between"]}],[1,"biggive-header",{"spaceBelow":[2,"space-below"],"logoUrl":[1,"logo-url"],"closeMenuFromOutside":[64]}],[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"]}],[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"]}],[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"],"maxWidth":[2,"max-width"]}],[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]}],[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],"openInNewTab":[4,"open-in-new-tab"],"fullWidth":[4,"full-width"],"size":[1],"rounded":[4],"centered":[4],"isFutureCampaign":[4,"is-future-campaign"],"isPastCampaign":[4,"is-past-campaign"],"datetime":[1]}],[0,"biggive-misc-icon",{"backgroundColour":[1,"background-colour"],"iconColour":[1,"icon-colour"],"icon":[1],"url":[1]}]]],["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"],"imageAltText":[1,"image-alt-text"],"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],"teaser":[1],"icon":[4],"iconColour":[1,"icon-colour"],"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"]}]]],["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-biography-card.cjs",[[1,"biggive-biography-card",{"spaceBelow":[2,"space-below"],"imageUrl":[1,"image-url"],"fullName":[1,"full-name"],"jobTitle":[1,"job-title"]}]]],["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"],"maxWidth":[2,"max-width"]}]]],["biggive-icon-group.cjs",[[1,"biggive-icon-group",{"spaceBelow":[2,"space-below"],"label":[1]}]]],["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
|
+
return index.bootstrapLazy([["biggive-back-to-top_27.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":[1,"category-options"],"beneficiaryOptions":[1,"beneficiary-options"],"locationOptions":[1,"location-options"],"fundingOptions":[1,"funding-options"],"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"],"filtersApplied":[32]},[[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"],"isFutureCampaign":[4,"is-future-campaign"],"isPastCampaign":[4,"is-past-campaign"],"datetime":[1]}],[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-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-footer"],[1,"biggive-hero-image",{"spaceBelow":[2,"space-below"],"colourScheme":[1,"colour-scheme"],"slug":[1],"slugColour":[1,"slug-colour"],"logo":[1],"logoAltText":[1,"logo-alt-text"],"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"],"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"]}],[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"],"spaceBetween":[4,"space-between"]}],[1,"biggive-header",{"spaceBelow":[2,"space-below"],"logoUrl":[1,"logo-url"],"closeMenuFromOutside":[64]}],[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"]}],[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"]}],[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"],"maxWidth":[2,"max-width"]}],[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]}],[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],"openInNewTab":[4,"open-in-new-tab"],"fullWidth":[4,"full-width"],"size":[1],"rounded":[4],"centered":[4],"isFutureCampaign":[4,"is-future-campaign"],"isPastCampaign":[4,"is-past-campaign"],"datetime":[1]}],[0,"biggive-misc-icon",{"backgroundColour":[1,"background-colour"],"iconColour":[1,"icon-colour"],"icon":[1],"url":[1]}]]],["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"],"imageAltText":[1,"image-alt-text"],"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],"teaser":[1],"icon":[4],"iconColour":[1,"icon-colour"],"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"]}]]],["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-biography-card.cjs",[[1,"biggive-biography-card",{"spaceBelow":[2,"space-below"],"imageUrl":[1,"image-url"],"fullName":[1,"full-name"],"jobTitle":[1,"job-title"]}]]],["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"],"maxWidth":[2,"max-width"]}]]],["biggive-icon-group.cjs",[[1,"biggive-icon-group",{"spaceBelow":[2,"space-below"],"label":[1]}]]],["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_27.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],"filtersApplied":[4,"filters-applied"],"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"],"isFutureCampaign":[4,"is-future-campaign"],"isPastCampaign":[4,"is-past-campaign"],"datetime":[1]}],[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-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-footer"],[1,"biggive-hero-image",{"spaceBelow":[2,"space-below"],"colourScheme":[1,"colour-scheme"],"slug":[1],"slugColour":[1,"slug-colour"],"logo":[1],"logoAltText":[1,"logo-alt-text"],"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"],"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"]}],[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"],"spaceBetween":[4,"space-between"]}],[1,"biggive-header",{"spaceBelow":[2,"space-below"],"logoUrl":[1,"logo-url"],"closeMenuFromOutside":[64]}],[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"]}],[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"]}],[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"],"maxWidth":[2,"max-width"]}],[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]}],[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],"openInNewTab":[4,"open-in-new-tab"],"fullWidth":[4,"full-width"],"size":[1],"rounded":[4],"centered":[4],"isFutureCampaign":[4,"is-future-campaign"],"isPastCampaign":[4,"is-past-campaign"],"datetime":[1]}],[0,"biggive-misc-icon",{"backgroundColour":[1,"background-colour"],"iconColour":[1,"icon-colour"],"icon":[1],"url":[1]}]]],["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"],"imageAltText":[1,"image-alt-text"],"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],"teaser":[1],"icon":[4],"iconColour":[1,"icon-colour"],"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"]}]]],["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-biography-card.cjs",[[1,"biggive-biography-card",{"spaceBelow":[2,"space-below"],"imageUrl":[1,"image-url"],"fullName":[1,"full-name"],"jobTitle":[1,"job-title"]}]]],["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"],"maxWidth":[2,"max-width"]}]]],["biggive-icon-group.cjs",[[1,"biggive-icon-group",{"spaceBelow":[2,"space-below"],"label":[1]}]]],["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);
|
|
17
|
+
return index.bootstrapLazy([["biggive-back-to-top_27.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":[1,"category-options"],"beneficiaryOptions":[1,"beneficiary-options"],"locationOptions":[1,"location-options"],"fundingOptions":[1,"funding-options"],"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"],"filtersApplied":[32]},[[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"],"isFutureCampaign":[4,"is-future-campaign"],"isPastCampaign":[4,"is-past-campaign"],"datetime":[1]}],[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-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-footer"],[1,"biggive-hero-image",{"spaceBelow":[2,"space-below"],"colourScheme":[1,"colour-scheme"],"slug":[1],"slugColour":[1,"slug-colour"],"logo":[1],"logoAltText":[1,"logo-alt-text"],"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"],"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"]}],[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"],"spaceBetween":[4,"space-between"]}],[1,"biggive-header",{"spaceBelow":[2,"space-below"],"logoUrl":[1,"logo-url"],"closeMenuFromOutside":[64]}],[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"]}],[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"]}],[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"],"maxWidth":[2,"max-width"]}],[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]}],[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],"openInNewTab":[4,"open-in-new-tab"],"fullWidth":[4,"full-width"],"size":[1],"rounded":[4],"centered":[4],"isFutureCampaign":[4,"is-future-campaign"],"isPastCampaign":[4,"is-past-campaign"],"datetime":[1]}],[0,"biggive-misc-icon",{"backgroundColour":[1,"background-colour"],"iconColour":[1,"icon-colour"],"icon":[1],"url":[1]}]]],["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"],"imageAltText":[1,"image-alt-text"],"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],"teaser":[1],"icon":[4],"iconColour":[1,"icon-colour"],"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"]}]]],["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-biography-card.cjs",[[1,"biggive-biography-card",{"spaceBelow":[2,"space-below"],"imageUrl":[1,"image-url"],"fullName":[1,"full-name"],"jobTitle":[1,"job-title"]}]]],["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"],"maxWidth":[2,"max-width"]}]]],["biggive-icon-group.cjs",[[1,"biggive-icon-group",{"spaceBelow":[2,"space-below"],"label":[1]}]]],["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
|
|
|
@@ -3,6 +3,10 @@ import { faFilterSlash, faMagnifyingGlass } from '@fortawesome/pro-solid-svg-ico
|
|
|
3
3
|
export class BiggiveCampaignCardFilterGrid {
|
|
4
4
|
constructor() {
|
|
5
5
|
this.sortByPlaceholderText = 'Sort by';
|
|
6
|
+
this.beneficiariesPlaceHolderText = 'Beneficiary';
|
|
7
|
+
this.categoriesPlaceHolderText = 'Category';
|
|
8
|
+
this.locationsPlaceHolderText = 'Location';
|
|
9
|
+
this.fundingPlaceHolderText = 'Funding';
|
|
6
10
|
this.handleApplyFilterButtonClick = () => {
|
|
7
11
|
const searchAndFilterObj = this.getSearchAndFilterObject();
|
|
8
12
|
this.doSearchAndFilterUpdate.emit(searchAndFilterObj);
|
|
@@ -37,6 +41,11 @@ export class BiggiveCampaignCardFilterGrid {
|
|
|
37
41
|
this.selectedFilterCategory = null;
|
|
38
42
|
this.selectedFilterFunding = null;
|
|
39
43
|
this.selectedFilterLocation = null;
|
|
44
|
+
// Clear <biggive-form-field-select> components' internal selectedValue and selectedLabel. DON-654.
|
|
45
|
+
['sort-by', 'categories', 'beneficiaries', 'locations', 'funding'].forEach(id => {
|
|
46
|
+
this.el.shadowRoot.getElementById(id).selectedValue = null;
|
|
47
|
+
this.el.shadowRoot.getElementById(id).selectedLabel = null;
|
|
48
|
+
});
|
|
40
49
|
// Emit the doSearchAndFilterUpdate event with null values. DON-654
|
|
41
50
|
this.doSearchAndFilterUpdate.emit({
|
|
42
51
|
searchText: null,
|
|
@@ -56,12 +65,12 @@ export class BiggiveCampaignCardFilterGrid {
|
|
|
56
65
|
this.beneficiaryOptions = [];
|
|
57
66
|
this.locationOptions = [];
|
|
58
67
|
this.fundingOptions = [];
|
|
59
|
-
this.filtersApplied = undefined;
|
|
60
68
|
this.selectedSortByOption = null;
|
|
61
69
|
this.selectedFilterCategory = null;
|
|
62
70
|
this.selectedFilterBeneficiary = null;
|
|
63
71
|
this.selectedFilterLocation = null;
|
|
64
72
|
this.selectedFilterFunding = null;
|
|
73
|
+
this.filtersApplied = undefined;
|
|
65
74
|
}
|
|
66
75
|
getSearchAndFilterObject() {
|
|
67
76
|
const event = {
|
|
@@ -75,11 +84,7 @@ export class BiggiveCampaignCardFilterGrid {
|
|
|
75
84
|
return event;
|
|
76
85
|
}
|
|
77
86
|
doOptionSelectCompletedHandler(event) {
|
|
78
|
-
|
|
79
|
-
this.selectedFilterCategory = this.el.shadowRoot.getElementById('categories').selectedValue;
|
|
80
|
-
this.selectedFilterBeneficiary = this.el.shadowRoot.getElementById('beneficiaries').selectedValue;
|
|
81
|
-
this.selectedFilterLocation = this.el.shadowRoot.getElementById('locations').selectedValue;
|
|
82
|
-
this.selectedFilterFunding = this.el.shadowRoot.getElementById('funding').selectedValue;
|
|
87
|
+
const nameOfUpdatedDropdown = event.detail.placeholder;
|
|
83
88
|
// If this method was trigerred by the selection of a 'Sort by' dropdown option, then
|
|
84
89
|
// emit an event to search, but do NOT emit an event for example when filter options
|
|
85
90
|
// are selected, until the 'Apply filters' button is pressed which is handled separately
|
|
@@ -88,10 +93,23 @@ export class BiggiveCampaignCardFilterGrid {
|
|
|
88
93
|
// `<biggive-form-field-select placeholder="Sort by" id="sort-by" onDoSelectChange={this.someHandleMethod}>`
|
|
89
94
|
// but the problem with that is that `someHandleMethod` gets called first and then this
|
|
90
95
|
// method gets called, leading to two calls and more risk for error. DON-570.
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
96
|
+
switch (nameOfUpdatedDropdown) {
|
|
97
|
+
case this.sortByPlaceholderText:
|
|
98
|
+
this.selectedSortByOption = event.detail.value;
|
|
99
|
+
this.doSearchAndFilterUpdate.emit(this.getSearchAndFilterObject());
|
|
100
|
+
break;
|
|
101
|
+
case this.beneficiariesPlaceHolderText:
|
|
102
|
+
this.selectedFilterBeneficiary = event.detail.value;
|
|
103
|
+
break;
|
|
104
|
+
case this.categoriesPlaceHolderText:
|
|
105
|
+
this.selectedFilterCategory = event.detail.value;
|
|
106
|
+
break;
|
|
107
|
+
case this.fundingPlaceHolderText:
|
|
108
|
+
this.selectedFilterFunding = event.detail.value;
|
|
109
|
+
break;
|
|
110
|
+
case this.locationsPlaceHolderText:
|
|
111
|
+
this.selectedFilterLocation = event.detail.value;
|
|
112
|
+
break;
|
|
95
113
|
}
|
|
96
114
|
}
|
|
97
115
|
componentWillRender() {
|
|
@@ -99,15 +117,15 @@ export class BiggiveCampaignCardFilterGrid {
|
|
|
99
117
|
this.selectedFilterCategory !== null || this.selectedFilterBeneficiary !== null || this.selectedFilterFunding !== null || this.selectedFilterLocation !== null;
|
|
100
118
|
}
|
|
101
119
|
render() {
|
|
102
|
-
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("div", { class: "clear-all" }, h("svg", { xmlns: "http://www.w3.org/2000/svg", class: "icon icon-clear-all", viewBox: "0 0 512 512" }, h("path", { d: faFilterSlash.icon[4].toString() })), h("a", { onClick: this.handleClearAll }, "Clear all")), h("div", { class: "sort-wrap" }, h("biggive-form-field-select", { placeholder:
|
|
120
|
+
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("div", { class: "clear-all" }, h("svg", { xmlns: "http://www.w3.org/2000/svg", class: "icon icon-clear-all", viewBox: "0 0 512 512" }, h("path", { d: faFilterSlash.icon[4].toString() })), h("a", { onClick: this.handleClearAll }, "Clear all")), h("div", { class: "sort-wrap" }, h("biggive-form-field-select", { placeholder: this.sortByPlaceholderText, 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", colourScheme: this.filtersApplied ? 'secondary' : 'primary', onClick: this.handleFilterButtonClick, label: "Filters", fullWidth: true, "space-below": "0" }), h("biggive-popup", { id: "filter-popup" }, h("h4", { class: "space-above-0 space-below-3 colour-primary" }, "Filters"), h("biggive-form-field-select", { placeholder: this.categoriesPlaceHolderText, selectedLabel: this.selectedFilterCategory, id: "categories", "space-below": "2" }, this.categoryOptions.length === 0
|
|
103
121
|
? undefined
|
|
104
|
-
: this.categoryOptions.map(option => h("biggive-form-field-select-option", { value: option, label: option }))), h("biggive-form-field-select", { placeholder:
|
|
122
|
+
: (Array.isArray(this.categoryOptions) ? this.categoryOptions : JSON.parse(this.categoryOptions)).map(option => (h("biggive-form-field-select-option", { value: option, label: option })))), h("biggive-form-field-select", { placeholder: this.beneficiariesPlaceHolderText, selectedLabel: this.selectedFilterBeneficiary, id: "beneficiaries", "space-below": "2" }, this.beneficiaryOptions.length === 0
|
|
105
123
|
? undefined
|
|
106
|
-
: this.beneficiaryOptions.map(option => h("biggive-form-field-select-option", { value: option, label: option }))), h("biggive-form-field-select", { placeholder:
|
|
124
|
+
: (Array.isArray(this.beneficiaryOptions) ? this.beneficiaryOptions : JSON.parse(this.beneficiaryOptions)).map(option => (h("biggive-form-field-select-option", { value: option, label: option })))), h("biggive-form-field-select", { placeholder: this.locationsPlaceHolderText, selectedLabel: this.selectedFilterLocation, id: "locations", "space-below": "2" }, this.locationOptions.length === 0
|
|
107
125
|
? undefined
|
|
108
|
-
: this.locationOptions.map(option => h("biggive-form-field-select-option", { value: option, label: option }))), h("biggive-form-field-select", { placeholder:
|
|
126
|
+
: (Array.isArray(this.locationOptions) ? this.locationOptions : JSON.parse(this.locationOptions)).map(option => (h("biggive-form-field-select-option", { value: option, label: option })))), h("biggive-form-field-select", { placeholder: this.fundingPlaceHolderText, selectedLabel: this.selectedFilterFunding, id: "funding", "space-below": "2" }, this.fundingOptions.length === 0
|
|
109
127
|
? undefined
|
|
110
|
-
: 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" })))));
|
|
128
|
+
: (Array.isArray(this.fundingOptions) ? this.fundingOptions : JSON.parse(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" })))));
|
|
111
129
|
}
|
|
112
130
|
static get is() { return "biggive-campaign-card-filter-grid"; }
|
|
113
131
|
static get encapsulation() { return "shadow"; }
|
|
@@ -214,86 +232,77 @@ export class BiggiveCampaignCardFilterGrid {
|
|
|
214
232
|
"defaultValue": "'Search'"
|
|
215
233
|
},
|
|
216
234
|
"categoryOptions": {
|
|
217
|
-
"type": "
|
|
235
|
+
"type": "string",
|
|
218
236
|
"mutable": false,
|
|
219
237
|
"complexType": {
|
|
220
|
-
"original": "string[]",
|
|
221
|
-
"resolved": "string[]",
|
|
238
|
+
"original": "string | string[]",
|
|
239
|
+
"resolved": "string | string[]",
|
|
222
240
|
"references": {}
|
|
223
241
|
},
|
|
224
242
|
"required": false,
|
|
225
243
|
"optional": false,
|
|
226
244
|
"docs": {
|
|
227
245
|
"tags": [],
|
|
228
|
-
"text": "JSON array of category key/values"
|
|
246
|
+
"text": "JSON array of category key/values, or takes a stringified equiavalent (for Storybook)"
|
|
229
247
|
},
|
|
248
|
+
"attribute": "category-options",
|
|
249
|
+
"reflect": false,
|
|
230
250
|
"defaultValue": "[]"
|
|
231
251
|
},
|
|
232
252
|
"beneficiaryOptions": {
|
|
233
|
-
"type": "
|
|
253
|
+
"type": "string",
|
|
234
254
|
"mutable": false,
|
|
235
255
|
"complexType": {
|
|
236
|
-
"original": "string[]",
|
|
237
|
-
"resolved": "string[]",
|
|
256
|
+
"original": "string | string[]",
|
|
257
|
+
"resolved": "string | string[]",
|
|
238
258
|
"references": {}
|
|
239
259
|
},
|
|
240
260
|
"required": false,
|
|
241
261
|
"optional": false,
|
|
242
262
|
"docs": {
|
|
243
263
|
"tags": [],
|
|
244
|
-
"text": "JSON array of beneficiary key/values"
|
|
264
|
+
"text": "JSON array of beneficiary key/values, or takes a stringified equiavalent (for Storybook)"
|
|
245
265
|
},
|
|
266
|
+
"attribute": "beneficiary-options",
|
|
267
|
+
"reflect": false,
|
|
246
268
|
"defaultValue": "[]"
|
|
247
269
|
},
|
|
248
270
|
"locationOptions": {
|
|
249
|
-
"type": "
|
|
271
|
+
"type": "string",
|
|
250
272
|
"mutable": false,
|
|
251
273
|
"complexType": {
|
|
252
|
-
"original": "string[]",
|
|
253
|
-
"resolved": "string[]",
|
|
274
|
+
"original": "string | string[]",
|
|
275
|
+
"resolved": "string | string[]",
|
|
254
276
|
"references": {}
|
|
255
277
|
},
|
|
256
278
|
"required": false,
|
|
257
279
|
"optional": false,
|
|
258
280
|
"docs": {
|
|
259
281
|
"tags": [],
|
|
260
|
-
"text": "JSON array of location key/values"
|
|
282
|
+
"text": "JSON array of location key/values, or takes a stringified equiavalent (for Storybook)"
|
|
261
283
|
},
|
|
284
|
+
"attribute": "location-options",
|
|
285
|
+
"reflect": false,
|
|
262
286
|
"defaultValue": "[]"
|
|
263
287
|
},
|
|
264
288
|
"fundingOptions": {
|
|
265
|
-
"type": "
|
|
289
|
+
"type": "string",
|
|
266
290
|
"mutable": false,
|
|
267
291
|
"complexType": {
|
|
268
|
-
"original": "string[]",
|
|
269
|
-
"resolved": "string[]",
|
|
292
|
+
"original": "string | string[]",
|
|
293
|
+
"resolved": "string | string[]",
|
|
270
294
|
"references": {}
|
|
271
295
|
},
|
|
272
296
|
"required": false,
|
|
273
297
|
"optional": false,
|
|
274
298
|
"docs": {
|
|
275
299
|
"tags": [],
|
|
276
|
-
"text": "JSON array of funding key/values"
|
|
300
|
+
"text": "JSON array of funding key/values, or takes a stringified equiavalent (for Storybook)"
|
|
277
301
|
},
|
|
302
|
+
"attribute": "funding-options",
|
|
303
|
+
"reflect": false,
|
|
278
304
|
"defaultValue": "[]"
|
|
279
305
|
},
|
|
280
|
-
"filtersApplied": {
|
|
281
|
-
"type": "boolean",
|
|
282
|
-
"mutable": false,
|
|
283
|
-
"complexType": {
|
|
284
|
-
"original": "boolean",
|
|
285
|
-
"resolved": "boolean",
|
|
286
|
-
"references": {}
|
|
287
|
-
},
|
|
288
|
-
"required": false,
|
|
289
|
-
"optional": false,
|
|
290
|
-
"docs": {
|
|
291
|
-
"tags": [],
|
|
292
|
-
"text": ""
|
|
293
|
-
},
|
|
294
|
-
"attribute": "filters-applied",
|
|
295
|
-
"reflect": false
|
|
296
|
-
},
|
|
297
306
|
"selectedSortByOption": {
|
|
298
307
|
"type": "string",
|
|
299
308
|
"mutable": false,
|
|
@@ -386,6 +395,11 @@ export class BiggiveCampaignCardFilterGrid {
|
|
|
386
395
|
}
|
|
387
396
|
};
|
|
388
397
|
}
|
|
398
|
+
static get states() {
|
|
399
|
+
return {
|
|
400
|
+
"filtersApplied": {}
|
|
401
|
+
};
|
|
402
|
+
}
|
|
389
403
|
static get events() {
|
|
390
404
|
return [{
|
|
391
405
|
"method": "doSearchAndFilterUpdate",
|
|
@@ -51,28 +51,21 @@ export default {
|
|
|
51
51
|
type: 'select',
|
|
52
52
|
},
|
|
53
53
|
},
|
|
54
|
-
filtersApplied: {
|
|
55
|
-
name: 'Filters applied',
|
|
56
|
-
options: [true, false],
|
|
57
|
-
control: {
|
|
58
|
-
type: 'select',
|
|
59
|
-
},
|
|
60
|
-
},
|
|
61
54
|
},
|
|
62
55
|
};
|
|
63
56
|
const Template = args => `
|
|
64
57
|
<biggive-campaign-card-filter-grid
|
|
65
|
-
category-options=
|
|
66
|
-
beneficiary-options=
|
|
67
|
-
location-options=
|
|
68
|
-
funding-options=
|
|
58
|
+
category-options='${args.categoryOptions}'
|
|
59
|
+
beneficiary-options='${args.beneficiaryOptions}'
|
|
60
|
+
location-options='${args.locationOptions}'
|
|
61
|
+
funding-options='${args.fundingOptions}'
|
|
69
62
|
search-text="${args.searchText}"
|
|
70
63
|
filters-applied="${args.filtersApplied}",
|
|
71
|
-
selected-sort-by-option=
|
|
72
|
-
selected-filter-
|
|
73
|
-
selected-filter-beneficiary=
|
|
74
|
-
selected-filter-location=
|
|
75
|
-
selected-filter-funding=
|
|
64
|
+
${args.selectedSortByOption ? 'selected-sort-by-option=' + args.selectedSortByOption : ''}
|
|
65
|
+
${args.selectedFilterCategory ? 'selected-filter-category=' + args.selectedFilterCategory : ''}
|
|
66
|
+
${args.selectedFilterBeneficiary ? 'selected-filter-beneficiary=' + args.selectedFilterBeneficiary : ''}
|
|
67
|
+
${args.selectedFilterLocation ? 'selected-filter-location=' + args.selectedFilterLocation : ''}
|
|
68
|
+
${args.selectedFilterFunding ? 'selected-filter-funding=' + args.selectedFilterFunding : ''}
|
|
76
69
|
>
|
|
77
70
|
<biggive-grid slot="campaign-grid" column-count="3">
|
|
78
71
|
<biggive-campaign-card
|
|
@@ -113,18 +106,17 @@ const Template = args => `
|
|
|
113
106
|
</biggive-grid>
|
|
114
107
|
</biggive-campaign-card-filter-grid>
|
|
115
108
|
`;
|
|
116
|
-
document.addEventListener('doSearchAndFilterUpdate', $event => console.log($event));
|
|
109
|
+
document.addEventListener('doSearchAndFilterUpdate', ($event) => console.log($event.detail));
|
|
117
110
|
export const CampaignCardFilterGridComponent = Template.bind({});
|
|
118
111
|
CampaignCardFilterGridComponent.args = {
|
|
119
|
-
categoryOptions: ['ABC', 'DEF'],
|
|
120
|
-
beneficiaryOptions: ['ABC', 'DEF'],
|
|
121
|
-
locationOptions: ['ABC', 'DEF'],
|
|
122
|
-
fundingOptions: ['ABC', 'DEF'],
|
|
112
|
+
categoryOptions: JSON.stringify(['ABC', 'DEF']),
|
|
113
|
+
beneficiaryOptions: JSON.stringify(['ABC', 'DEF']),
|
|
114
|
+
locationOptions: JSON.stringify(['ABC', 'DEF']),
|
|
115
|
+
fundingOptions: JSON.stringify(['ABC', 'DEF']),
|
|
123
116
|
searchText: '',
|
|
124
|
-
selectedSortByOption:
|
|
125
|
-
selectedFilterCategory:
|
|
126
|
-
selectedFilterBeneficiary:
|
|
127
|
-
selectedFilterLocation:
|
|
128
|
-
selectedFilterFunding:
|
|
129
|
-
filtersApplied: false,
|
|
117
|
+
selectedSortByOption: null,
|
|
118
|
+
selectedFilterCategory: null,
|
|
119
|
+
selectedFilterBeneficiary: null,
|
|
120
|
+
selectedFilterLocation: null,
|
|
121
|
+
selectedFilterFunding: null,
|
|
130
122
|
};
|