@biggive/components 1.0.99 → 1.0.101
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-c835c921.entry.js +1 -0
- package/dist/cjs/biggive-back-to-top_23.cjs.entry.js +12 -16
- 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 +28 -40
- package/dist/collection/components/biggive-campaign-card-filter-grid/biggive-campaign-card-filter-grid.stories.js +5 -5
- package/dist/components/biggive-campaign-card-filter-grid.js +17 -21
- package/dist/esm/biggive-back-to-top_23.entry.js +12 -16
- 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 +6 -7
- package/dist/types/components.d.ts +12 -12
- package/hydrate/index.js +17 -21
- package/package.json +1 -1
- package/dist/biggive/p-899aafca.entry.js +0 -1
|
@@ -122,7 +122,7 @@ const BiggiveCampaignCardFilterGrid = class {
|
|
|
122
122
|
this.searchText = null;
|
|
123
123
|
this.sortBy = null;
|
|
124
124
|
this.filterCategory = null;
|
|
125
|
-
this.
|
|
125
|
+
this.filterBeneficiary = null;
|
|
126
126
|
this.filterLocation = null;
|
|
127
127
|
this.filterFunding = null;
|
|
128
128
|
this.spaceBelow = 0;
|
|
@@ -130,7 +130,7 @@ const BiggiveCampaignCardFilterGrid = class {
|
|
|
130
130
|
this.placeholderText = 'Search';
|
|
131
131
|
this.buttonText = 'Search';
|
|
132
132
|
this.categoryOptions = null;
|
|
133
|
-
this.
|
|
133
|
+
this.beneficiaryOptions = null;
|
|
134
134
|
this.locationOptions = null;
|
|
135
135
|
this.fundingOptions = null;
|
|
136
136
|
}
|
|
@@ -139,7 +139,7 @@ const BiggiveCampaignCardFilterGrid = class {
|
|
|
139
139
|
searchText: this.searchText,
|
|
140
140
|
sortBy: this.sortBy,
|
|
141
141
|
filterCategory: this.filterCategory,
|
|
142
|
-
|
|
142
|
+
filterBeneficiary: this.filterBeneficiary,
|
|
143
143
|
filterLocation: this.filterLocation,
|
|
144
144
|
filterFunding: this.filterFunding,
|
|
145
145
|
};
|
|
@@ -148,17 +148,13 @@ const BiggiveCampaignCardFilterGrid = class {
|
|
|
148
148
|
doOptionSelectCompletedHandler() {
|
|
149
149
|
this.sortBy = this.el.shadowRoot.getElementById('sort-by').selectedValue;
|
|
150
150
|
this.filterCategory = this.el.shadowRoot.getElementById('categories').selectedValue;
|
|
151
|
-
this.
|
|
151
|
+
this.filterBeneficiary = this.el.shadowRoot.getElementById('beneficiaries').selectedValue;
|
|
152
152
|
this.filterLocation = this.el.shadowRoot.getElementById('locations').selectedValue;
|
|
153
153
|
this.filterFunding = this.el.shadowRoot.getElementById('funding').selectedValue;
|
|
154
154
|
}
|
|
155
155
|
handleApplyFilterButtonClick() {
|
|
156
156
|
this.doSearchAndFilterUpdate.emit(this.getSearchAndFilterObject());
|
|
157
157
|
}
|
|
158
|
-
handleSearchTextChanged(event) {
|
|
159
|
-
this.searchText = event.target.value;
|
|
160
|
-
this.doSearchAndFilterUpdate.emit(this.getSearchAndFilterObject());
|
|
161
|
-
}
|
|
162
158
|
handleSearchButtonPressed() {
|
|
163
159
|
this.doSearchAndFilterUpdate.emit(this.getSearchAndFilterObject());
|
|
164
160
|
}
|
|
@@ -170,23 +166,23 @@ const BiggiveCampaignCardFilterGrid = class {
|
|
|
170
166
|
handleFilterButtonClick() {
|
|
171
167
|
this.el.shadowRoot.getElementById('filter-popup').open();
|
|
172
168
|
if (this.categoryOptions != null) {
|
|
173
|
-
var options =
|
|
169
|
+
var options = this.categoryOptions;
|
|
174
170
|
this.el.shadowRoot.getElementById('categories').innerHTML = '';
|
|
175
171
|
for (var prop in options) {
|
|
176
172
|
this.el.shadowRoot.getElementById('categories').innerHTML +=
|
|
177
173
|
'<biggive-form-field-select-option value="' + options[prop] + '" label="' + options[prop] + '"></biggive-form-field-select-option>';
|
|
178
174
|
}
|
|
179
175
|
}
|
|
180
|
-
if (this.
|
|
181
|
-
var options =
|
|
182
|
-
this.el.shadowRoot.getElementById('
|
|
176
|
+
if (this.beneficiaryOptions != null) {
|
|
177
|
+
var options = this.beneficiaryOptions;
|
|
178
|
+
this.el.shadowRoot.getElementById('beneficiaries').innerHTML = '';
|
|
183
179
|
for (var prop in options) {
|
|
184
|
-
this.el.shadowRoot.getElementById('
|
|
180
|
+
this.el.shadowRoot.getElementById('beneficiaries').innerHTML +=
|
|
185
181
|
'<biggive-form-field-select-option value="' + options[prop] + '" label="' + options[prop] + '"></biggive-form-field-select-option>';
|
|
186
182
|
}
|
|
187
183
|
}
|
|
188
184
|
if (this.locationOptions != null) {
|
|
189
|
-
var options =
|
|
185
|
+
var options = this.locationOptions;
|
|
190
186
|
this.el.shadowRoot.getElementById('locations').innerHTML = '';
|
|
191
187
|
for (var prop in options) {
|
|
192
188
|
this.el.shadowRoot.getElementById('locations').innerHTML +=
|
|
@@ -194,7 +190,7 @@ const BiggiveCampaignCardFilterGrid = class {
|
|
|
194
190
|
}
|
|
195
191
|
}
|
|
196
192
|
if (this.fundingOptions != null) {
|
|
197
|
-
var options =
|
|
193
|
+
var options = this.fundingOptions;
|
|
198
194
|
this.el.shadowRoot.getElementById('funding').innerHTML = '';
|
|
199
195
|
for (var prop in options) {
|
|
200
196
|
this.el.shadowRoot.getElementById('funding').innerHTML +=
|
|
@@ -203,7 +199,7 @@ const BiggiveCampaignCardFilterGrid = class {
|
|
|
203
199
|
}
|
|
204
200
|
}
|
|
205
201
|
render() {
|
|
206
|
-
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,
|
|
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, onKeyDown: event => this.handleEnterPressed(event) })), index.h("button", { onClick: () => this.handleSearchButtonPressed(), class: "button button-primary" }, this.buttonText))), index.h("div", { class: "sort-filter-wrap" }, index.h("div", { class: "sort-wrap" }, index.h("biggive-form-field-select", { placeholder: "Sort by", id: "sort-by" }, index.h("biggive-form-field-select-option", { value: "most-raised", label: "Most raised" }), index.h("biggive-form-field-select-option", { value: "matched-funds-remaining", label: "Match funds remaining" }))), index.h("div", { class: "filter-wrap" }, index.h("div", { class: "button button-primary filter", onClick: () => this.handleFilterButtonClick() }, index.h("span", { class: "filter-icon" }, index.h("svg", { width: "16", height: "15", viewBox: "0 0 16 15", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, index.h("path", { d: "M0.12042 0.76576C0.327224 0.298 0.766961 0 1.25014 0H14.7517C15.2361 0 15.6736 0.298 15.8799 0.76576C16.0893 1.23352 16.0237 1.787 15.6924 2.18745L10.0011 9.67328V13.929C10.0011 14.3341 9.7886 14.7058 9.44793 14.8866C9.1104 15.0674 8.7041 15.0306 8.40094 14.7862L6.40072 13.179C6.14756 12.9781 6.00067 12.66 6.00067 12.3218V9.67328L0.282594 2.18745C-0.023284 1.787 -0.0864161 1.23352 0.120451 0.76576H0.12042Z", fill: "white" }))), "Filters"), 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", id: "categories", "space-below": "2" }), index.h("biggive-form-field-select", { placeholder: "Beneficiary", id: "beneficiaries", "space-below": "2" }), index.h("biggive-form-field-select", { placeholder: "Location", id: "locations", "space-below": "2" }), index.h("biggive-form-field-select", { placeholder: "Funding", id: "funding", "space-below": "2" }), index.h("div", { class: "align-right" }, index.h("a", { href: "#", class: "button button-primary", onClick: () => this.handleApplyFilterButtonClick() }, "Apply filters"))))), index.h("div", { class: "campaign-grid" }, index.h("slot", { name: "campaign-grid" })))));
|
|
207
203
|
}
|
|
208
204
|
get el() { return index.getElement(this); }
|
|
209
205
|
};
|
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_23.cjs",[[1,"biggive-campaign-card-filter-grid",{"searchText":[1,"search-text"],"sortBy":[1,"sort-by"],"filterCategory":[1,"filter-category"],"
|
|
18
|
+
return index.bootstrapLazy([["biggive-back-to-top_23.cjs",[[1,"biggive-campaign-card-filter-grid",{"searchText":[1,"search-text"],"sortBy":[1,"sort-by"],"filterCategory":[1,"filter-category"],"filterBeneficiary":[1,"filter-beneficiary"],"filterLocation":[1,"filter-location"],"filterFunding":[1,"filter-funding"],"spaceBelow":[2,"space-below"],"intro":[1],"placeholderText":[1,"placeholder-text"],"buttonText":[1,"button-text"],"categoryOptions":[16],"beneficiaryOptions":[16],"locationOptions":[16],"fundingOptions":[16]},[[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"],"currencyCode":[1,"currency-code"],"primaryFigureLabel":[1,"primary-figure-label"],"primaryFigureAmount":[2,"primary-figure-amount"],"secondaryFigureLabel":[1,"secondary-figure-label"],"secondaryFigureAmount":[2,"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"],"currencyCode":[1,"currency-code"],"primaryFigureLabel":[1,"primary-figure-label"],"primaryFigureAmount":[2,"primary-figure-amount"],"secondaryFigureLabel":[1,"secondary-figure-label"],"secondaryFigureAmount":[2,"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"]}],[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-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"]}],[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"],"currencyCode":[1,"currency-code"],"includingGiftAid":[4,"including-gift-aid"],"totalMatchFunds":[2,"total-match-funds"],"totalRaised":[2,"total-raised"]}],[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",{"open":[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-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-branded-image.cjs",[[1,"biggive-branded-image",{"spaceBelow":[2,"space-below"],"imageUrl":[1,"image-url"],"logoUrl":[1,"logo-url"],"slug":[1]}]]],["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-quote.cjs",[[1,"biggive-quote",{"spaceBelow":[2,"space-below"],"defaultTextColour":[1,"default-text-colour"],"quote":[1],"attribution":[1]}]]],["biggive-search.cjs",[[1,"biggive-search",{"placeholderText":[1,"placeholder-text"],"buttonText":[1,"button-text"],"searchText":[32]}]]],["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_23.cjs",[[1,"biggive-campaign-card-filter-grid",{"searchText":[1,"search-text"],"sortBy":[1,"sort-by"],"filterCategory":[1,"filter-category"],"
|
|
17
|
+
return index.bootstrapLazy([["biggive-back-to-top_23.cjs",[[1,"biggive-campaign-card-filter-grid",{"searchText":[1,"search-text"],"sortBy":[1,"sort-by"],"filterCategory":[1,"filter-category"],"filterBeneficiary":[1,"filter-beneficiary"],"filterLocation":[1,"filter-location"],"filterFunding":[1,"filter-funding"],"spaceBelow":[2,"space-below"],"intro":[1],"placeholderText":[1,"placeholder-text"],"buttonText":[1,"button-text"],"categoryOptions":[16],"beneficiaryOptions":[16],"locationOptions":[16],"fundingOptions":[16]},[[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"],"currencyCode":[1,"currency-code"],"primaryFigureLabel":[1,"primary-figure-label"],"primaryFigureAmount":[2,"primary-figure-amount"],"secondaryFigureLabel":[1,"secondary-figure-label"],"secondaryFigureAmount":[2,"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"],"currencyCode":[1,"currency-code"],"primaryFigureLabel":[1,"primary-figure-label"],"primaryFigureAmount":[2,"primary-figure-amount"],"secondaryFigureLabel":[1,"secondary-figure-label"],"secondaryFigureAmount":[2,"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"]}],[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-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"]}],[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"],"currencyCode":[1,"currency-code"],"includingGiftAid":[4,"including-gift-aid"],"totalMatchFunds":[2,"total-match-funds"],"totalRaised":[2,"total-raised"]}],[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",{"open":[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-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-branded-image.cjs",[[1,"biggive-branded-image",{"spaceBelow":[2,"space-below"],"imageUrl":[1,"image-url"],"logoUrl":[1,"logo-url"],"slug":[1]}]]],["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-quote.cjs",[[1,"biggive-quote",{"spaceBelow":[2,"space-below"],"defaultTextColour":[1,"default-text-colour"],"quote":[1],"attribution":[1]}]]],["biggive-search.cjs",[[1,"biggive-search",{"placeholderText":[1,"placeholder-text"],"buttonText":[1,"button-text"],"searchText":[32]}]]],["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
|
|
|
@@ -5,7 +5,7 @@ export class BiggiveCampaignCardFilterGrid {
|
|
|
5
5
|
this.searchText = null;
|
|
6
6
|
this.sortBy = null;
|
|
7
7
|
this.filterCategory = null;
|
|
8
|
-
this.
|
|
8
|
+
this.filterBeneficiary = null;
|
|
9
9
|
this.filterLocation = null;
|
|
10
10
|
this.filterFunding = null;
|
|
11
11
|
this.spaceBelow = 0;
|
|
@@ -13,7 +13,7 @@ export class BiggiveCampaignCardFilterGrid {
|
|
|
13
13
|
this.placeholderText = 'Search';
|
|
14
14
|
this.buttonText = 'Search';
|
|
15
15
|
this.categoryOptions = null;
|
|
16
|
-
this.
|
|
16
|
+
this.beneficiaryOptions = null;
|
|
17
17
|
this.locationOptions = null;
|
|
18
18
|
this.fundingOptions = null;
|
|
19
19
|
}
|
|
@@ -22,7 +22,7 @@ export class BiggiveCampaignCardFilterGrid {
|
|
|
22
22
|
searchText: this.searchText,
|
|
23
23
|
sortBy: this.sortBy,
|
|
24
24
|
filterCategory: this.filterCategory,
|
|
25
|
-
|
|
25
|
+
filterBeneficiary: this.filterBeneficiary,
|
|
26
26
|
filterLocation: this.filterLocation,
|
|
27
27
|
filterFunding: this.filterFunding,
|
|
28
28
|
};
|
|
@@ -31,17 +31,13 @@ export class BiggiveCampaignCardFilterGrid {
|
|
|
31
31
|
doOptionSelectCompletedHandler() {
|
|
32
32
|
this.sortBy = this.el.shadowRoot.getElementById('sort-by').selectedValue;
|
|
33
33
|
this.filterCategory = this.el.shadowRoot.getElementById('categories').selectedValue;
|
|
34
|
-
this.
|
|
34
|
+
this.filterBeneficiary = this.el.shadowRoot.getElementById('beneficiaries').selectedValue;
|
|
35
35
|
this.filterLocation = this.el.shadowRoot.getElementById('locations').selectedValue;
|
|
36
36
|
this.filterFunding = this.el.shadowRoot.getElementById('funding').selectedValue;
|
|
37
37
|
}
|
|
38
38
|
handleApplyFilterButtonClick() {
|
|
39
39
|
this.doSearchAndFilterUpdate.emit(this.getSearchAndFilterObject());
|
|
40
40
|
}
|
|
41
|
-
handleSearchTextChanged(event) {
|
|
42
|
-
this.searchText = event.target.value;
|
|
43
|
-
this.doSearchAndFilterUpdate.emit(this.getSearchAndFilterObject());
|
|
44
|
-
}
|
|
45
41
|
handleSearchButtonPressed() {
|
|
46
42
|
this.doSearchAndFilterUpdate.emit(this.getSearchAndFilterObject());
|
|
47
43
|
}
|
|
@@ -53,23 +49,23 @@ export class BiggiveCampaignCardFilterGrid {
|
|
|
53
49
|
handleFilterButtonClick() {
|
|
54
50
|
this.el.shadowRoot.getElementById('filter-popup').open();
|
|
55
51
|
if (this.categoryOptions != null) {
|
|
56
|
-
var options =
|
|
52
|
+
var options = this.categoryOptions;
|
|
57
53
|
this.el.shadowRoot.getElementById('categories').innerHTML = '';
|
|
58
54
|
for (var prop in options) {
|
|
59
55
|
this.el.shadowRoot.getElementById('categories').innerHTML +=
|
|
60
56
|
'<biggive-form-field-select-option value="' + options[prop] + '" label="' + options[prop] + '"></biggive-form-field-select-option>';
|
|
61
57
|
}
|
|
62
58
|
}
|
|
63
|
-
if (this.
|
|
64
|
-
var options =
|
|
65
|
-
this.el.shadowRoot.getElementById('
|
|
59
|
+
if (this.beneficiaryOptions != null) {
|
|
60
|
+
var options = this.beneficiaryOptions;
|
|
61
|
+
this.el.shadowRoot.getElementById('beneficiaries').innerHTML = '';
|
|
66
62
|
for (var prop in options) {
|
|
67
|
-
this.el.shadowRoot.getElementById('
|
|
63
|
+
this.el.shadowRoot.getElementById('beneficiaries').innerHTML +=
|
|
68
64
|
'<biggive-form-field-select-option value="' + options[prop] + '" label="' + options[prop] + '"></biggive-form-field-select-option>';
|
|
69
65
|
}
|
|
70
66
|
}
|
|
71
67
|
if (this.locationOptions != null) {
|
|
72
|
-
var options =
|
|
68
|
+
var options = this.locationOptions;
|
|
73
69
|
this.el.shadowRoot.getElementById('locations').innerHTML = '';
|
|
74
70
|
for (var prop in options) {
|
|
75
71
|
this.el.shadowRoot.getElementById('locations').innerHTML +=
|
|
@@ -77,7 +73,7 @@ export class BiggiveCampaignCardFilterGrid {
|
|
|
77
73
|
}
|
|
78
74
|
}
|
|
79
75
|
if (this.fundingOptions != null) {
|
|
80
|
-
var options =
|
|
76
|
+
var options = this.fundingOptions;
|
|
81
77
|
this.el.shadowRoot.getElementById('funding').innerHTML = '';
|
|
82
78
|
for (var prop in options) {
|
|
83
79
|
this.el.shadowRoot.getElementById('funding').innerHTML +=
|
|
@@ -86,7 +82,7 @@ export class BiggiveCampaignCardFilterGrid {
|
|
|
86
82
|
}
|
|
87
83
|
}
|
|
88
84
|
render() {
|
|
89
|
-
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,
|
|
85
|
+
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, onKeyDown: event => this.handleEnterPressed(event) })), h("button", { onClick: () => this.handleSearchButtonPressed(), class: "button button-primary" }, this.buttonText))), h("div", { class: "sort-filter-wrap" }, h("div", { class: "sort-wrap" }, h("biggive-form-field-select", { placeholder: "Sort by", id: "sort-by" }, h("biggive-form-field-select-option", { value: "most-raised", label: "Most raised" }), h("biggive-form-field-select-option", { value: "matched-funds-remaining", label: "Match funds remaining" }))), h("div", { class: "filter-wrap" }, h("div", { class: "button button-primary filter", onClick: () => this.handleFilterButtonClick() }, h("span", { class: "filter-icon" }, h("svg", { width: "16", height: "15", viewBox: "0 0 16 15", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { d: "M0.12042 0.76576C0.327224 0.298 0.766961 0 1.25014 0H14.7517C15.2361 0 15.6736 0.298 15.8799 0.76576C16.0893 1.23352 16.0237 1.787 15.6924 2.18745L10.0011 9.67328V13.929C10.0011 14.3341 9.7886 14.7058 9.44793 14.8866C9.1104 15.0674 8.7041 15.0306 8.40094 14.7862L6.40072 13.179C6.14756 12.9781 6.00067 12.66 6.00067 12.3218V9.67328L0.282594 2.18745C-0.023284 1.787 -0.0864161 1.23352 0.120451 0.76576H0.12042Z", fill: "white" }))), "Filters"), 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", id: "categories", "space-below": "2" }), h("biggive-form-field-select", { placeholder: "Beneficiary", id: "beneficiaries", "space-below": "2" }), h("biggive-form-field-select", { placeholder: "Location", id: "locations", "space-below": "2" }), h("biggive-form-field-select", { placeholder: "Funding", id: "funding", "space-below": "2" }), h("div", { class: "align-right" }, h("a", { href: "#", class: "button button-primary", onClick: () => this.handleApplyFilterButtonClick() }, "Apply filters"))))), h("div", { class: "campaign-grid" }, h("slot", { name: "campaign-grid" })))));
|
|
90
86
|
}
|
|
91
87
|
static get is() { return "biggive-campaign-card-filter-grid"; }
|
|
92
88
|
static get encapsulation() { return "shadow"; }
|
|
@@ -156,7 +152,7 @@ export class BiggiveCampaignCardFilterGrid {
|
|
|
156
152
|
"reflect": false,
|
|
157
153
|
"defaultValue": "null"
|
|
158
154
|
},
|
|
159
|
-
"
|
|
155
|
+
"filterBeneficiary": {
|
|
160
156
|
"type": "string",
|
|
161
157
|
"mutable": false,
|
|
162
158
|
"complexType": {
|
|
@@ -170,7 +166,7 @@ export class BiggiveCampaignCardFilterGrid {
|
|
|
170
166
|
"tags": [],
|
|
171
167
|
"text": ""
|
|
172
168
|
},
|
|
173
|
-
"attribute": "filter-
|
|
169
|
+
"attribute": "filter-beneficiary",
|
|
174
170
|
"reflect": false,
|
|
175
171
|
"defaultValue": "null"
|
|
176
172
|
},
|
|
@@ -283,11 +279,11 @@ export class BiggiveCampaignCardFilterGrid {
|
|
|
283
279
|
"defaultValue": "'Search'"
|
|
284
280
|
},
|
|
285
281
|
"categoryOptions": {
|
|
286
|
-
"type": "
|
|
282
|
+
"type": "unknown",
|
|
287
283
|
"mutable": false,
|
|
288
284
|
"complexType": {
|
|
289
|
-
"original": "string",
|
|
290
|
-
"resolved": "string",
|
|
285
|
+
"original": "string[]",
|
|
286
|
+
"resolved": "string[]",
|
|
291
287
|
"references": {}
|
|
292
288
|
},
|
|
293
289
|
"required": false,
|
|
@@ -296,34 +292,30 @@ export class BiggiveCampaignCardFilterGrid {
|
|
|
296
292
|
"tags": [],
|
|
297
293
|
"text": "JSON array of category key/values"
|
|
298
294
|
},
|
|
299
|
-
"attribute": "category-options",
|
|
300
|
-
"reflect": false,
|
|
301
295
|
"defaultValue": "null"
|
|
302
296
|
},
|
|
303
|
-
"
|
|
304
|
-
"type": "
|
|
297
|
+
"beneficiaryOptions": {
|
|
298
|
+
"type": "unknown",
|
|
305
299
|
"mutable": false,
|
|
306
300
|
"complexType": {
|
|
307
|
-
"original": "string",
|
|
308
|
-
"resolved": "string",
|
|
301
|
+
"original": "string[]",
|
|
302
|
+
"resolved": "string[]",
|
|
309
303
|
"references": {}
|
|
310
304
|
},
|
|
311
305
|
"required": false,
|
|
312
306
|
"optional": false,
|
|
313
307
|
"docs": {
|
|
314
308
|
"tags": [],
|
|
315
|
-
"text": "JSON array of
|
|
309
|
+
"text": "JSON array of beneficiary key/values"
|
|
316
310
|
},
|
|
317
|
-
"attribute": "beneficary-options",
|
|
318
|
-
"reflect": false,
|
|
319
311
|
"defaultValue": "null"
|
|
320
312
|
},
|
|
321
313
|
"locationOptions": {
|
|
322
|
-
"type": "
|
|
314
|
+
"type": "unknown",
|
|
323
315
|
"mutable": false,
|
|
324
316
|
"complexType": {
|
|
325
|
-
"original": "string",
|
|
326
|
-
"resolved": "string",
|
|
317
|
+
"original": "string[]",
|
|
318
|
+
"resolved": "string[]",
|
|
327
319
|
"references": {}
|
|
328
320
|
},
|
|
329
321
|
"required": false,
|
|
@@ -332,16 +324,14 @@ export class BiggiveCampaignCardFilterGrid {
|
|
|
332
324
|
"tags": [],
|
|
333
325
|
"text": "JSON array of location key/values"
|
|
334
326
|
},
|
|
335
|
-
"attribute": "location-options",
|
|
336
|
-
"reflect": false,
|
|
337
327
|
"defaultValue": "null"
|
|
338
328
|
},
|
|
339
329
|
"fundingOptions": {
|
|
340
|
-
"type": "
|
|
330
|
+
"type": "unknown",
|
|
341
331
|
"mutable": false,
|
|
342
332
|
"complexType": {
|
|
343
|
-
"original": "string",
|
|
344
|
-
"resolved": "string",
|
|
333
|
+
"original": "string[]",
|
|
334
|
+
"resolved": "string[]",
|
|
345
335
|
"references": {}
|
|
346
336
|
},
|
|
347
337
|
"required": false,
|
|
@@ -350,8 +340,6 @@ export class BiggiveCampaignCardFilterGrid {
|
|
|
350
340
|
"tags": [],
|
|
351
341
|
"text": "JSON array of funding key/values"
|
|
352
342
|
},
|
|
353
|
-
"attribute": "funding-options",
|
|
354
|
-
"reflect": false,
|
|
355
343
|
"defaultValue": "null"
|
|
356
344
|
}
|
|
357
345
|
};
|
|
@@ -4,7 +4,7 @@ export default {
|
|
|
4
4
|
//subcomponents: {BiggiveCampaignCard}
|
|
5
5
|
};
|
|
6
6
|
const Template = args => `
|
|
7
|
-
<biggive-campaign-card-filter-grid category-options="${args.categoryOptions}" beneficiary-options="${args.
|
|
7
|
+
<biggive-campaign-card-filter-grid category-options="${args.categoryOptions}" beneficiary-options="${args.beneficiaryOptions}" location-options="${args.locationOptions}" funding-options="${args.fundingOptions}">
|
|
8
8
|
<biggive-grid slot="campaign-grid" column-count="3">
|
|
9
9
|
<biggive-campaign-card
|
|
10
10
|
campaign-type="Match Funded"
|
|
@@ -47,8 +47,8 @@ const Template = args => `
|
|
|
47
47
|
document.addEventListener('doSearchAndFilterUpdate', () => alert('doSearchAndFilterUpdate event emitted!'));
|
|
48
48
|
export const CampaignCardFilterGridComponent = Template.bind({});
|
|
49
49
|
CampaignCardFilterGridComponent.args = {
|
|
50
|
-
categoryOptions:
|
|
51
|
-
beneficiaryOptions:
|
|
52
|
-
locationOptions:
|
|
53
|
-
fundingOptions: '
|
|
50
|
+
categoryOptions: ['ABC', 'DEF'],
|
|
51
|
+
beneficiaryOptions: ['ABC', 'DEF'],
|
|
52
|
+
locationOptions: ['ABC', 'DEF'],
|
|
53
|
+
fundingOptions: ['ABC', 'DEF'],
|
|
54
54
|
};
|
|
@@ -15,7 +15,7 @@ const BiggiveCampaignCardFilterGrid$1 = /*@__PURE__*/ proxyCustomElement(class e
|
|
|
15
15
|
this.searchText = null;
|
|
16
16
|
this.sortBy = null;
|
|
17
17
|
this.filterCategory = null;
|
|
18
|
-
this.
|
|
18
|
+
this.filterBeneficiary = null;
|
|
19
19
|
this.filterLocation = null;
|
|
20
20
|
this.filterFunding = null;
|
|
21
21
|
this.spaceBelow = 0;
|
|
@@ -23,7 +23,7 @@ const BiggiveCampaignCardFilterGrid$1 = /*@__PURE__*/ proxyCustomElement(class e
|
|
|
23
23
|
this.placeholderText = 'Search';
|
|
24
24
|
this.buttonText = 'Search';
|
|
25
25
|
this.categoryOptions = null;
|
|
26
|
-
this.
|
|
26
|
+
this.beneficiaryOptions = null;
|
|
27
27
|
this.locationOptions = null;
|
|
28
28
|
this.fundingOptions = null;
|
|
29
29
|
}
|
|
@@ -32,7 +32,7 @@ const BiggiveCampaignCardFilterGrid$1 = /*@__PURE__*/ proxyCustomElement(class e
|
|
|
32
32
|
searchText: this.searchText,
|
|
33
33
|
sortBy: this.sortBy,
|
|
34
34
|
filterCategory: this.filterCategory,
|
|
35
|
-
|
|
35
|
+
filterBeneficiary: this.filterBeneficiary,
|
|
36
36
|
filterLocation: this.filterLocation,
|
|
37
37
|
filterFunding: this.filterFunding,
|
|
38
38
|
};
|
|
@@ -41,17 +41,13 @@ const BiggiveCampaignCardFilterGrid$1 = /*@__PURE__*/ proxyCustomElement(class e
|
|
|
41
41
|
doOptionSelectCompletedHandler() {
|
|
42
42
|
this.sortBy = this.el.shadowRoot.getElementById('sort-by').selectedValue;
|
|
43
43
|
this.filterCategory = this.el.shadowRoot.getElementById('categories').selectedValue;
|
|
44
|
-
this.
|
|
44
|
+
this.filterBeneficiary = this.el.shadowRoot.getElementById('beneficiaries').selectedValue;
|
|
45
45
|
this.filterLocation = this.el.shadowRoot.getElementById('locations').selectedValue;
|
|
46
46
|
this.filterFunding = this.el.shadowRoot.getElementById('funding').selectedValue;
|
|
47
47
|
}
|
|
48
48
|
handleApplyFilterButtonClick() {
|
|
49
49
|
this.doSearchAndFilterUpdate.emit(this.getSearchAndFilterObject());
|
|
50
50
|
}
|
|
51
|
-
handleSearchTextChanged(event) {
|
|
52
|
-
this.searchText = event.target.value;
|
|
53
|
-
this.doSearchAndFilterUpdate.emit(this.getSearchAndFilterObject());
|
|
54
|
-
}
|
|
55
51
|
handleSearchButtonPressed() {
|
|
56
52
|
this.doSearchAndFilterUpdate.emit(this.getSearchAndFilterObject());
|
|
57
53
|
}
|
|
@@ -63,23 +59,23 @@ const BiggiveCampaignCardFilterGrid$1 = /*@__PURE__*/ proxyCustomElement(class e
|
|
|
63
59
|
handleFilterButtonClick() {
|
|
64
60
|
this.el.shadowRoot.getElementById('filter-popup').open();
|
|
65
61
|
if (this.categoryOptions != null) {
|
|
66
|
-
var options =
|
|
62
|
+
var options = this.categoryOptions;
|
|
67
63
|
this.el.shadowRoot.getElementById('categories').innerHTML = '';
|
|
68
64
|
for (var prop in options) {
|
|
69
65
|
this.el.shadowRoot.getElementById('categories').innerHTML +=
|
|
70
66
|
'<biggive-form-field-select-option value="' + options[prop] + '" label="' + options[prop] + '"></biggive-form-field-select-option>';
|
|
71
67
|
}
|
|
72
68
|
}
|
|
73
|
-
if (this.
|
|
74
|
-
var options =
|
|
75
|
-
this.el.shadowRoot.getElementById('
|
|
69
|
+
if (this.beneficiaryOptions != null) {
|
|
70
|
+
var options = this.beneficiaryOptions;
|
|
71
|
+
this.el.shadowRoot.getElementById('beneficiaries').innerHTML = '';
|
|
76
72
|
for (var prop in options) {
|
|
77
|
-
this.el.shadowRoot.getElementById('
|
|
73
|
+
this.el.shadowRoot.getElementById('beneficiaries').innerHTML +=
|
|
78
74
|
'<biggive-form-field-select-option value="' + options[prop] + '" label="' + options[prop] + '"></biggive-form-field-select-option>';
|
|
79
75
|
}
|
|
80
76
|
}
|
|
81
77
|
if (this.locationOptions != null) {
|
|
82
|
-
var options =
|
|
78
|
+
var options = this.locationOptions;
|
|
83
79
|
this.el.shadowRoot.getElementById('locations').innerHTML = '';
|
|
84
80
|
for (var prop in options) {
|
|
85
81
|
this.el.shadowRoot.getElementById('locations').innerHTML +=
|
|
@@ -87,7 +83,7 @@ const BiggiveCampaignCardFilterGrid$1 = /*@__PURE__*/ proxyCustomElement(class e
|
|
|
87
83
|
}
|
|
88
84
|
}
|
|
89
85
|
if (this.fundingOptions != null) {
|
|
90
|
-
var options =
|
|
86
|
+
var options = this.fundingOptions;
|
|
91
87
|
this.el.shadowRoot.getElementById('funding').innerHTML = '';
|
|
92
88
|
for (var prop in options) {
|
|
93
89
|
this.el.shadowRoot.getElementById('funding').innerHTML +=
|
|
@@ -96,7 +92,7 @@ const BiggiveCampaignCardFilterGrid$1 = /*@__PURE__*/ proxyCustomElement(class e
|
|
|
96
92
|
}
|
|
97
93
|
}
|
|
98
94
|
render() {
|
|
99
|
-
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,
|
|
95
|
+
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, onKeyDown: event => this.handleEnterPressed(event) })), h("button", { onClick: () => this.handleSearchButtonPressed(), class: "button button-primary" }, this.buttonText))), h("div", { class: "sort-filter-wrap" }, h("div", { class: "sort-wrap" }, h("biggive-form-field-select", { placeholder: "Sort by", id: "sort-by" }, h("biggive-form-field-select-option", { value: "most-raised", label: "Most raised" }), h("biggive-form-field-select-option", { value: "matched-funds-remaining", label: "Match funds remaining" }))), h("div", { class: "filter-wrap" }, h("div", { class: "button button-primary filter", onClick: () => this.handleFilterButtonClick() }, h("span", { class: "filter-icon" }, h("svg", { width: "16", height: "15", viewBox: "0 0 16 15", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { d: "M0.12042 0.76576C0.327224 0.298 0.766961 0 1.25014 0H14.7517C15.2361 0 15.6736 0.298 15.8799 0.76576C16.0893 1.23352 16.0237 1.787 15.6924 2.18745L10.0011 9.67328V13.929C10.0011 14.3341 9.7886 14.7058 9.44793 14.8866C9.1104 15.0674 8.7041 15.0306 8.40094 14.7862L6.40072 13.179C6.14756 12.9781 6.00067 12.66 6.00067 12.3218V9.67328L0.282594 2.18745C-0.023284 1.787 -0.0864161 1.23352 0.120451 0.76576H0.12042Z", fill: "white" }))), "Filters"), 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", id: "categories", "space-below": "2" }), h("biggive-form-field-select", { placeholder: "Beneficiary", id: "beneficiaries", "space-below": "2" }), h("biggive-form-field-select", { placeholder: "Location", id: "locations", "space-below": "2" }), h("biggive-form-field-select", { placeholder: "Funding", id: "funding", "space-below": "2" }), h("div", { class: "align-right" }, h("a", { href: "#", class: "button button-primary", onClick: () => this.handleApplyFilterButtonClick() }, "Apply filters"))))), h("div", { class: "campaign-grid" }, h("slot", { name: "campaign-grid" })))));
|
|
100
96
|
}
|
|
101
97
|
get el() { return this; }
|
|
102
98
|
static get style() { return biggiveCampaignCardFilterGridCss; }
|
|
@@ -104,17 +100,17 @@ const BiggiveCampaignCardFilterGrid$1 = /*@__PURE__*/ proxyCustomElement(class e
|
|
|
104
100
|
"searchText": [1, "search-text"],
|
|
105
101
|
"sortBy": [1, "sort-by"],
|
|
106
102
|
"filterCategory": [1, "filter-category"],
|
|
107
|
-
"
|
|
103
|
+
"filterBeneficiary": [1, "filter-beneficiary"],
|
|
108
104
|
"filterLocation": [1, "filter-location"],
|
|
109
105
|
"filterFunding": [1, "filter-funding"],
|
|
110
106
|
"spaceBelow": [2, "space-below"],
|
|
111
107
|
"intro": [1],
|
|
112
108
|
"placeholderText": [1, "placeholder-text"],
|
|
113
109
|
"buttonText": [1, "button-text"],
|
|
114
|
-
"categoryOptions": [
|
|
115
|
-
"
|
|
116
|
-
"locationOptions": [
|
|
117
|
-
"fundingOptions": [
|
|
110
|
+
"categoryOptions": [16],
|
|
111
|
+
"beneficiaryOptions": [16],
|
|
112
|
+
"locationOptions": [16],
|
|
113
|
+
"fundingOptions": [16]
|
|
118
114
|
}, [[0, "doSelectChange", "doOptionSelectCompletedHandler"]]]);
|
|
119
115
|
function defineCustomElement$1() {
|
|
120
116
|
if (typeof customElements === "undefined") {
|