@biggive/components 1.0.137 → 1.0.138
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-95fa09dc.entry.js +1 -0
- package/dist/cjs/biggive-back-to-top_26.cjs.entry.js +18 -13
- package/dist/collection/components/biggive-button/biggive-button.js +1 -22
- package/dist/collection/components/biggive-campaign-card-filter-grid/biggive-campaign-card-filter-grid.js +16 -6
- package/dist/collection/components/biggive-form-field-select/biggive-form-field-select.js +1 -2
- package/dist/components/biggive-button2.js +2 -6
- package/dist/components/biggive-campaign-card-filter-grid.js +16 -6
- package/dist/components/biggive-form-field-select2.js +1 -2
- package/dist/esm/biggive-back-to-top_26.entry.js +18 -13
- package/dist/types/components/biggive-button/biggive-button.d.ts +0 -3
- package/dist/types/components/biggive-campaign-card-filter-grid/biggive-campaign-card-filter-grid.d.ts +2 -2
- package/dist/types/components.d.ts +0 -5
- package/hydrate/index.js +18 -13
- package/package.json +1 -1
- package/dist/biggive/p-9bee4580.entry.js +0 -1
|
@@ -42,7 +42,6 @@ const biggiveButtonCss = "body{background-color:#D7D7D7}h1,h3,h4,h5,h6{margin-bo
|
|
|
42
42
|
const BiggiveButton = class {
|
|
43
43
|
constructor(hostRef) {
|
|
44
44
|
index.registerInstance(this, hostRef);
|
|
45
|
-
this.doButtonClick = index.createEvent(this, "doButtonClick", 7);
|
|
46
45
|
this.spaceBelow = 1;
|
|
47
46
|
this.colourScheme = 'primary';
|
|
48
47
|
this.label = 'Click me';
|
|
@@ -51,11 +50,8 @@ const BiggiveButton = class {
|
|
|
51
50
|
this.size = 'medium';
|
|
52
51
|
this.rounded = false;
|
|
53
52
|
}
|
|
54
|
-
handleButtonClick() {
|
|
55
|
-
this.doButtonClick.emit(this.url);
|
|
56
|
-
}
|
|
57
53
|
render() {
|
|
58
|
-
return (index.h("div", { class: 'container space-below-' + this.spaceBelow }, index.h("a", { href: this.url, class: 'button button-' + this.colourScheme + ' full-width-' + this.fullWidth.toString() + ' size-' + this.size + ' rounded-' + this.rounded.toString() },
|
|
54
|
+
return (index.h("div", { class: 'container space-below-' + this.spaceBelow }, index.h("a", { href: this.url, class: 'button button-' + this.colourScheme + ' full-width-' + this.fullWidth.toString() + ' size-' + this.size + ' rounded-' + this.rounded.toString() }, this.label)));
|
|
59
55
|
}
|
|
60
56
|
};
|
|
61
57
|
BiggiveButton.style = biggiveButtonCss;
|
|
@@ -132,10 +128,7 @@ const BiggiveCampaignCardFilterGrid = class {
|
|
|
132
128
|
this.filterBeneficiary = null;
|
|
133
129
|
this.filterLocation = null;
|
|
134
130
|
this.filterFunding = null;
|
|
135
|
-
this.
|
|
136
|
-
this.sortBy = event.target.value;
|
|
137
|
-
this.doSearchAndFilterUpdate.emit(this.getSearchAndFilterObject());
|
|
138
|
-
};
|
|
131
|
+
this.sortByPlaceholderText = 'Sort by';
|
|
139
132
|
this.handleApplyFilterButtonClick = () => {
|
|
140
133
|
this.doSearchAndFilterUpdate.emit(this.getSearchAndFilterObject());
|
|
141
134
|
};
|
|
@@ -173,15 +166,28 @@ const BiggiveCampaignCardFilterGrid = class {
|
|
|
173
166
|
};
|
|
174
167
|
return event;
|
|
175
168
|
}
|
|
176
|
-
doOptionSelectCompletedHandler() {
|
|
169
|
+
doOptionSelectCompletedHandler(event) {
|
|
177
170
|
this.sortBy = this.el.shadowRoot.getElementById('sort-by').selectedValue;
|
|
178
171
|
this.filterCategory = this.el.shadowRoot.getElementById('categories').selectedValue;
|
|
179
172
|
this.filterBeneficiary = this.el.shadowRoot.getElementById('beneficiaries').selectedValue;
|
|
180
173
|
this.filterLocation = this.el.shadowRoot.getElementById('locations').selectedValue;
|
|
181
174
|
this.filterFunding = this.el.shadowRoot.getElementById('funding').selectedValue;
|
|
175
|
+
// If this method was trigerred by the selection of a 'Sort by' dropdown option, then
|
|
176
|
+
// emit an event to search, but do NOT emit an event for example when filter options
|
|
177
|
+
// are selected, until the 'Apply filters' button is pressed which is handled separately
|
|
178
|
+
// by `handleApplyFilterButtonClick()`.
|
|
179
|
+
// Additional note -> we could, instead, do this:
|
|
180
|
+
// `<biggive-form-field-select placeholder="Sort by" id="sort-by" onDoSelectChange={this.someHandleMethod}>`
|
|
181
|
+
// but the problem with that is that `someHandleMethod` gets called first and then this
|
|
182
|
+
// method gets called, leading to two calls and more risk for error. DON-570.
|
|
183
|
+
if (event.detail.placeholder === this.sortByPlaceholderText) {
|
|
184
|
+
console.log('emitting event:');
|
|
185
|
+
console.log(this.getSearchAndFilterObject());
|
|
186
|
+
this.doSearchAndFilterUpdate.emit(this.getSearchAndFilterObject());
|
|
187
|
+
}
|
|
182
188
|
}
|
|
183
189
|
render() {
|
|
184
|
-
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: "sort-wrap" }, index.h("biggive-form-field-select", { placeholder: "Sort by", id: "sort-by"
|
|
190
|
+
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: "sort-wrap" }, index.h("biggive-form-field-select", { placeholder: "Sort by", 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("div", { class: "filter-wrap" }, index.h("biggive-button", { class: "filter", onClick: this.handleFilterButtonClick, label: "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" }, this.categoryOptions.length === 0
|
|
185
191
|
? undefined
|
|
186
192
|
: this.categoryOptions.map(option => index.h("biggive-form-field-select-option", { value: option, label: option }))), index.h("biggive-form-field-select", { placeholder: "Beneficiary", id: "beneficiaries", "space-below": "2" }, this.beneficiaryOptions.length === 0
|
|
187
193
|
? undefined
|
|
@@ -258,8 +264,7 @@ const BiggiveFormFieldSelect = class {
|
|
|
258
264
|
doOptionSelectCompletedHandler(event) {
|
|
259
265
|
this.selectedValue = event.detail.value;
|
|
260
266
|
this.selectedLabel = event.detail.label;
|
|
261
|
-
this.doSelectChange.emit({ value: this.selectedValue, label: this.selectedLabel });
|
|
262
|
-
console.log({ value: this.selectedValue, label: this.selectedLabel });
|
|
267
|
+
this.doSelectChange.emit({ value: this.selectedValue, label: this.selectedLabel, placeholder: this.placeholder });
|
|
263
268
|
if (this.el.shadowRoot !== null && this.el.shadowRoot !== undefined) {
|
|
264
269
|
const dropdown = this.el.shadowRoot.querySelector('.dropdown');
|
|
265
270
|
if (dropdown !== null && dropdown !== undefined) {
|
|
@@ -9,11 +9,8 @@ export class BiggiveButton {
|
|
|
9
9
|
this.size = 'medium';
|
|
10
10
|
this.rounded = false;
|
|
11
11
|
}
|
|
12
|
-
handleButtonClick() {
|
|
13
|
-
this.doButtonClick.emit(this.url);
|
|
14
|
-
}
|
|
15
12
|
render() {
|
|
16
|
-
return (h("div", { class: 'container space-below-' + this.spaceBelow }, h("a", { href: this.url, class: 'button button-' + this.colourScheme + ' full-width-' + this.fullWidth.toString() + ' size-' + this.size + ' rounded-' + this.rounded.toString() },
|
|
13
|
+
return (h("div", { class: 'container space-below-' + this.spaceBelow }, h("a", { href: this.url, class: 'button button-' + this.colourScheme + ' full-width-' + this.fullWidth.toString() + ' size-' + this.size + ' rounded-' + this.rounded.toString() }, this.label)));
|
|
17
14
|
}
|
|
18
15
|
static get is() { return "biggive-button"; }
|
|
19
16
|
static get encapsulation() { return "shadow"; }
|
|
@@ -157,22 +154,4 @@ export class BiggiveButton {
|
|
|
157
154
|
}
|
|
158
155
|
};
|
|
159
156
|
}
|
|
160
|
-
static get events() {
|
|
161
|
-
return [{
|
|
162
|
-
"method": "doButtonClick",
|
|
163
|
-
"name": "doButtonClick",
|
|
164
|
-
"bubbles": true,
|
|
165
|
-
"cancelable": true,
|
|
166
|
-
"composed": true,
|
|
167
|
-
"docs": {
|
|
168
|
-
"tags": [],
|
|
169
|
-
"text": ""
|
|
170
|
-
},
|
|
171
|
-
"complexType": {
|
|
172
|
-
"original": "string",
|
|
173
|
-
"resolved": "string",
|
|
174
|
-
"references": {}
|
|
175
|
-
}
|
|
176
|
-
}];
|
|
177
|
-
}
|
|
178
157
|
}
|
|
@@ -8,10 +8,7 @@ export class BiggiveCampaignCardFilterGrid {
|
|
|
8
8
|
this.filterBeneficiary = null;
|
|
9
9
|
this.filterLocation = null;
|
|
10
10
|
this.filterFunding = null;
|
|
11
|
-
this.
|
|
12
|
-
this.sortBy = event.target.value;
|
|
13
|
-
this.doSearchAndFilterUpdate.emit(this.getSearchAndFilterObject());
|
|
14
|
-
};
|
|
11
|
+
this.sortByPlaceholderText = 'Sort by';
|
|
15
12
|
this.handleApplyFilterButtonClick = () => {
|
|
16
13
|
this.doSearchAndFilterUpdate.emit(this.getSearchAndFilterObject());
|
|
17
14
|
};
|
|
@@ -49,15 +46,28 @@ export class BiggiveCampaignCardFilterGrid {
|
|
|
49
46
|
};
|
|
50
47
|
return event;
|
|
51
48
|
}
|
|
52
|
-
doOptionSelectCompletedHandler() {
|
|
49
|
+
doOptionSelectCompletedHandler(event) {
|
|
53
50
|
this.sortBy = this.el.shadowRoot.getElementById('sort-by').selectedValue;
|
|
54
51
|
this.filterCategory = this.el.shadowRoot.getElementById('categories').selectedValue;
|
|
55
52
|
this.filterBeneficiary = this.el.shadowRoot.getElementById('beneficiaries').selectedValue;
|
|
56
53
|
this.filterLocation = this.el.shadowRoot.getElementById('locations').selectedValue;
|
|
57
54
|
this.filterFunding = this.el.shadowRoot.getElementById('funding').selectedValue;
|
|
55
|
+
// If this method was trigerred by the selection of a 'Sort by' dropdown option, then
|
|
56
|
+
// emit an event to search, but do NOT emit an event for example when filter options
|
|
57
|
+
// are selected, until the 'Apply filters' button is pressed which is handled separately
|
|
58
|
+
// by `handleApplyFilterButtonClick()`.
|
|
59
|
+
// Additional note -> we could, instead, do this:
|
|
60
|
+
// `<biggive-form-field-select placeholder="Sort by" id="sort-by" onDoSelectChange={this.someHandleMethod}>`
|
|
61
|
+
// but the problem with that is that `someHandleMethod` gets called first and then this
|
|
62
|
+
// method gets called, leading to two calls and more risk for error. DON-570.
|
|
63
|
+
if (event.detail.placeholder === this.sortByPlaceholderText) {
|
|
64
|
+
console.log('emitting event:');
|
|
65
|
+
console.log(this.getSearchAndFilterObject());
|
|
66
|
+
this.doSearchAndFilterUpdate.emit(this.getSearchAndFilterObject());
|
|
67
|
+
}
|
|
58
68
|
}
|
|
59
69
|
render() {
|
|
60
|
-
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: "sort-wrap" }, h("biggive-form-field-select", { placeholder: "Sort by", id: "sort-by"
|
|
70
|
+
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: "sort-wrap" }, h("biggive-form-field-select", { placeholder: "Sort by", 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("div", { class: "filter-wrap" }, h("biggive-button", { class: "filter", onClick: this.handleFilterButtonClick, label: "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" }, this.categoryOptions.length === 0
|
|
61
71
|
? undefined
|
|
62
72
|
: this.categoryOptions.map(option => h("biggive-form-field-select-option", { value: option, label: option }))), h("biggive-form-field-select", { placeholder: "Beneficiary", id: "beneficiaries", "space-below": "2" }, this.beneficiaryOptions.length === 0
|
|
63
73
|
? undefined
|
|
@@ -9,8 +9,7 @@ export class BiggiveFormFieldSelect {
|
|
|
9
9
|
doOptionSelectCompletedHandler(event) {
|
|
10
10
|
this.selectedValue = event.detail.value;
|
|
11
11
|
this.selectedLabel = event.detail.label;
|
|
12
|
-
this.doSelectChange.emit({ value: this.selectedValue, label: this.selectedLabel });
|
|
13
|
-
console.log({ value: this.selectedValue, label: this.selectedLabel });
|
|
12
|
+
this.doSelectChange.emit({ value: this.selectedValue, label: this.selectedLabel, placeholder: this.placeholder });
|
|
14
13
|
if (this.el.shadowRoot !== null && this.el.shadowRoot !== undefined) {
|
|
15
14
|
const dropdown = this.el.shadowRoot.querySelector('.dropdown');
|
|
16
15
|
if (dropdown !== null && dropdown !== undefined) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { proxyCustomElement, HTMLElement,
|
|
1
|
+
import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
|
|
2
2
|
|
|
3
3
|
const biggiveButtonCss = "body{background-color:#D7D7D7}h1,h3,h4,h5,h6{margin-bottom:0}h1,.heading-1{font-size:47px;line-height:60px;font-weight:bold}h2,.heading-2{font-size:38px;line-height:45px;font-weight:bold}h3,.heading-3{font-size:25px;line-height:32px;font-weight:bold}h4,.heading-4{font-size:20px;line-height:24px;font-weight:bold}h5,.heading-5{font-size:17px;line-height:24px;font-weight:bold}a{color:inherit;text-decoration:underline}a:hover{text-decoration:none}.colour-primary{color:#2C089B}.colour-secondary{color:#2AF135}.colour-tertiary{color:#FF7272}.colour-white{color:#FFFFFF}.colour-black{color:#000000}.text-colour-hover-primary:hover,.text-colour-primary{color:#2C089B}.text-colour-hover-secondary:hover,.text-colour-secondary{color:#2AF135}.text-colour-hover-tertiary:hover,.text-colour-tertiary{color:#FF7272}.text-colour-hover-white:hover,.text-colour-white{color:#FFFFFF}.text-colour-hover-black:hover,.text-colour-black{color:#000000}.fill-primary{fill:#2C089B}.fill-secondary{fill:#2AF135}.fill-tertiary{fill:#FF7272}.fill-white{fill:#FFFFFF}.fill-black{fill:#000000}.fill-red{fill:red}.background-colour-hover-primary:hover,.background-colour-primary{background-color:#2C089B}.background-colour-hover-secondary:hover,.background-colour-secondary{background-color:#2AF135}.background-colour-hover-tertiary:hover,.background-colour-tertiary{background-color:#FF7272}.background-colour-hover-white:hover,.background-colour-white{background-color:#FFFFFF}.background-colour-hover-black:hover,.background-colour-black{background-color:#000000}.input-wrap{display:flex;justify-content:space-between}.input-text{font-family:\"Euclid Triangle\", sans-serif;font-size:17px;line-height:24px;color:#000000;padding:5px 10px;box-sizing:border-box;width:100%}.input-text:focus{outline:0}.input-text:placeholder{color:#4A4A4A}.button{font-size:17px;line-height:24px;padding:10px 30px;border-radius:5px;border:1px solid #000000;background-color:#000000;filter:drop-shadow(0px 8px 20px rgba(0, 0, 0, 0.22));color:#FFFFFF;display:inline-block;text-decoration:none;text-align:center;transition:all ease-in-out 0.5s;cursor:pointer}.button:hover{background-color:#FFFFFF;color:#000000}.button.size-small{font-size:13px;line-height:17px;padding:5px 15px}.button.button.rounded-true{border-radius:27.5px}.button.button.rounded-true.size-small{border-radius:20px}.button-primary{color:#FFFFFF;background-color:#2C089B;border-color:#2C089B}.button-primary:hover{color:#2C089B;background-color:#FFFFFF}.button-secondary{color:#2C089B;background-color:#2AF135;border-color:#2AF135}.button-secondary:hover{background-color:#FFFFFF}.button-tertiary{color:#FFFFFF;background-color:#FF7272;border-color:#FF7272}.button-tertiary:hover{background-color:#FFFFFF}.button-white{color:#2C089B;background-color:#FFFFFF;border-color:#FFFFFF}.button-white:hover{color:#FFFFFF;background-color:#2C089B}.button-black{color:#FFFFFF;background-color:#000000;border-color:#000000}.button-black:hover{color:#000000;background-color:#FFFFFF}.button-clear-primary{color:#2C089B;background-color:transparent;text-decoration:underline;box-shadow:none;border:0;padding-left:0;padding-right:0}.button-clear-primary:hover{text-decoration:none;background-color:transparent}.button-clear-secondary{color:#2AF135;background-color:transparent;text-decoration:underline;box-shadow:none;border:0;padding-left:0;padding-right:0}.button-clear-secondary:hover{text-decoration:none;background-color:transparent}.button-clear-tertiary{color:#FF7272;background-color:transparent;text-decoration:underline;box-shadow:none;border:0;padding-left:0;padding-right:0}.button-clear-tertiary:hover{text-decoration:none;background-color:transparent}.button-clear-white{color:#FFFFFF;background-color:transparent;text-decoration:underline;box-shadow:none;border:0;padding-left:0;padding-right:0}.button-clear-white:hover{color:#FFFFFF;text-decoration:none;background-color:transparent}.button-rounded{border-radius:27.5px}.button-rounded.size-small{border-radius:20px}.progress-bar{display:flex}.progress-bar .slider{margin:auto 15px auto 0;position:relative;flex-grow:1}.progress-bar .slider:before{content:\"\";position:absolute;display:block;top:0;left:0;bottom:0;right:0;background-color:#E8E8E8;border-radius:4px}.progress-bar .slider .progress{position:relative;border-radius:4px;background-color:#000000;height:8px}.progress-bar .counter{font-weight:700;color:#000000;font-size:14px;line-height:18px}.progress-bar-primary .slider .progress{background-color:#2C089B}.progress-bar-primary .counter{color:#2C089B}.progress-bar-secondary .slider .progress{background-color:#2AF135}.progress-bar-secondary .counter{color:#2AF135}.video-wrap{position:relative;padding-bottom:56.25%}.video-wrap iframe,.video-wrap video{position:absolute;border:0;display:block;left:0;right:0;top:0;bottom:0;width:100%;height:100%}.image-wrap img{width:100%;height:auto}.align-left{text-align:left}.align-right{text-align:right}.align-center{text-align:center}.align-justify{text-align:justify}.space-below-0{margin-bottom:0}.space-below-1{margin-bottom:5px}.space-below-2{margin-bottom:10px}.space-below-3{margin-bottom:15px}.space-below-4{margin-bottom:30px}.space-below-5{margin-bottom:45px}.space-below-6{margin-bottom:60px}.space-above-0{margin-top:0}.space-above-1{margin-top:5px}.space-above-2{margin-top:10px}.space-above-3{margin-top:15px}.space-above-4{margin-top:30px}.space-above-5{margin-top:45px}.space-above-6{margin-top:60px}.horizontal-padding-1{padding-left:5px;padding-right:5px}.horizontal-padding-2{padding-left:10px;padding-right:10px}.horizontal-padding-3{padding-left:15px;padding-right:15px}.horizontal-padding-4{padding-left:30px;padding-right:30px}.horizontal-padding-5{padding-left:45px;padding-right:45px}.horizontal-padding-6{padding-left:60px;padding-right:60px}.vertical-padding-1{padding-top:5px;padding-bottom:5px}.vertical-padding-2{padding-top:10px;padding-bottom:10px}.vertical-padding-3{padding-top:15px;padding-bottom:15px}.vertical-padding-4{padding-top:30px;padding-bottom:30px}.vertical-padding-5{padding-top:45px;padding-bottom:45px}.vertical-padding-6{padding-top:60px;padding-bottom:60px}:host{display:contents}.container{font-family:\"Euclid Triangle\", sans-serif;font-size:17px;line-height:24px}.container a{display:inline-block}.container a.full-width-true{display:block}";
|
|
4
4
|
|
|
@@ -7,7 +7,6 @@ const BiggiveButton = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
7
7
|
super();
|
|
8
8
|
this.__registerHost();
|
|
9
9
|
this.__attachShadow();
|
|
10
|
-
this.doButtonClick = createEvent(this, "doButtonClick", 7);
|
|
11
10
|
this.spaceBelow = 1;
|
|
12
11
|
this.colourScheme = 'primary';
|
|
13
12
|
this.label = 'Click me';
|
|
@@ -16,11 +15,8 @@ const BiggiveButton = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
16
15
|
this.size = 'medium';
|
|
17
16
|
this.rounded = false;
|
|
18
17
|
}
|
|
19
|
-
handleButtonClick() {
|
|
20
|
-
this.doButtonClick.emit(this.url);
|
|
21
|
-
}
|
|
22
18
|
render() {
|
|
23
|
-
return (h("div", { class: 'container space-below-' + this.spaceBelow }, h("a", { href: this.url, class: 'button button-' + this.colourScheme + ' full-width-' + this.fullWidth.toString() + ' size-' + this.size + ' rounded-' + this.rounded.toString() },
|
|
19
|
+
return (h("div", { class: 'container space-below-' + this.spaceBelow }, h("a", { href: this.url, class: 'button button-' + this.colourScheme + ' full-width-' + this.fullWidth.toString() + ' size-' + this.size + ' rounded-' + this.rounded.toString() }, this.label)));
|
|
24
20
|
}
|
|
25
21
|
static get style() { return biggiveButtonCss; }
|
|
26
22
|
}, [1, "biggive-button", {
|
|
@@ -19,10 +19,7 @@ const BiggiveCampaignCardFilterGrid$1 = /*@__PURE__*/ proxyCustomElement(class e
|
|
|
19
19
|
this.filterBeneficiary = null;
|
|
20
20
|
this.filterLocation = null;
|
|
21
21
|
this.filterFunding = null;
|
|
22
|
-
this.
|
|
23
|
-
this.sortBy = event.target.value;
|
|
24
|
-
this.doSearchAndFilterUpdate.emit(this.getSearchAndFilterObject());
|
|
25
|
-
};
|
|
22
|
+
this.sortByPlaceholderText = 'Sort by';
|
|
26
23
|
this.handleApplyFilterButtonClick = () => {
|
|
27
24
|
this.doSearchAndFilterUpdate.emit(this.getSearchAndFilterObject());
|
|
28
25
|
};
|
|
@@ -60,15 +57,28 @@ const BiggiveCampaignCardFilterGrid$1 = /*@__PURE__*/ proxyCustomElement(class e
|
|
|
60
57
|
};
|
|
61
58
|
return event;
|
|
62
59
|
}
|
|
63
|
-
doOptionSelectCompletedHandler() {
|
|
60
|
+
doOptionSelectCompletedHandler(event) {
|
|
64
61
|
this.sortBy = this.el.shadowRoot.getElementById('sort-by').selectedValue;
|
|
65
62
|
this.filterCategory = this.el.shadowRoot.getElementById('categories').selectedValue;
|
|
66
63
|
this.filterBeneficiary = this.el.shadowRoot.getElementById('beneficiaries').selectedValue;
|
|
67
64
|
this.filterLocation = this.el.shadowRoot.getElementById('locations').selectedValue;
|
|
68
65
|
this.filterFunding = this.el.shadowRoot.getElementById('funding').selectedValue;
|
|
66
|
+
// If this method was trigerred by the selection of a 'Sort by' dropdown option, then
|
|
67
|
+
// emit an event to search, but do NOT emit an event for example when filter options
|
|
68
|
+
// are selected, until the 'Apply filters' button is pressed which is handled separately
|
|
69
|
+
// by `handleApplyFilterButtonClick()`.
|
|
70
|
+
// Additional note -> we could, instead, do this:
|
|
71
|
+
// `<biggive-form-field-select placeholder="Sort by" id="sort-by" onDoSelectChange={this.someHandleMethod}>`
|
|
72
|
+
// but the problem with that is that `someHandleMethod` gets called first and then this
|
|
73
|
+
// method gets called, leading to two calls and more risk for error. DON-570.
|
|
74
|
+
if (event.detail.placeholder === this.sortByPlaceholderText) {
|
|
75
|
+
console.log('emitting event:');
|
|
76
|
+
console.log(this.getSearchAndFilterObject());
|
|
77
|
+
this.doSearchAndFilterUpdate.emit(this.getSearchAndFilterObject());
|
|
78
|
+
}
|
|
69
79
|
}
|
|
70
80
|
render() {
|
|
71
|
-
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: "sort-wrap" }, h("biggive-form-field-select", { placeholder: "Sort by", id: "sort-by"
|
|
81
|
+
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: "sort-wrap" }, h("biggive-form-field-select", { placeholder: "Sort by", 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("div", { class: "filter-wrap" }, h("biggive-button", { class: "filter", onClick: this.handleFilterButtonClick, label: "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" }, this.categoryOptions.length === 0
|
|
72
82
|
? undefined
|
|
73
83
|
: this.categoryOptions.map(option => h("biggive-form-field-select-option", { value: option, label: option }))), h("biggive-form-field-select", { placeholder: "Beneficiary", id: "beneficiaries", "space-below": "2" }, this.beneficiaryOptions.length === 0
|
|
74
84
|
? undefined
|
|
@@ -16,8 +16,7 @@ const BiggiveFormFieldSelect = /*@__PURE__*/ proxyCustomElement(class extends HT
|
|
|
16
16
|
doOptionSelectCompletedHandler(event) {
|
|
17
17
|
this.selectedValue = event.detail.value;
|
|
18
18
|
this.selectedLabel = event.detail.label;
|
|
19
|
-
this.doSelectChange.emit({ value: this.selectedValue, label: this.selectedLabel });
|
|
20
|
-
console.log({ value: this.selectedValue, label: this.selectedLabel });
|
|
19
|
+
this.doSelectChange.emit({ value: this.selectedValue, label: this.selectedLabel, placeholder: this.placeholder });
|
|
21
20
|
if (this.el.shadowRoot !== null && this.el.shadowRoot !== undefined) {
|
|
22
21
|
const dropdown = this.el.shadowRoot.querySelector('.dropdown');
|
|
23
22
|
if (dropdown !== null && dropdown !== undefined) {
|
|
@@ -38,7 +38,6 @@ const biggiveButtonCss = "body{background-color:#D7D7D7}h1,h3,h4,h5,h6{margin-bo
|
|
|
38
38
|
const BiggiveButton = class {
|
|
39
39
|
constructor(hostRef) {
|
|
40
40
|
registerInstance(this, hostRef);
|
|
41
|
-
this.doButtonClick = createEvent(this, "doButtonClick", 7);
|
|
42
41
|
this.spaceBelow = 1;
|
|
43
42
|
this.colourScheme = 'primary';
|
|
44
43
|
this.label = 'Click me';
|
|
@@ -47,11 +46,8 @@ const BiggiveButton = class {
|
|
|
47
46
|
this.size = 'medium';
|
|
48
47
|
this.rounded = false;
|
|
49
48
|
}
|
|
50
|
-
handleButtonClick() {
|
|
51
|
-
this.doButtonClick.emit(this.url);
|
|
52
|
-
}
|
|
53
49
|
render() {
|
|
54
|
-
return (h("div", { class: 'container space-below-' + this.spaceBelow }, h("a", { href: this.url, class: 'button button-' + this.colourScheme + ' full-width-' + this.fullWidth.toString() + ' size-' + this.size + ' rounded-' + this.rounded.toString() },
|
|
50
|
+
return (h("div", { class: 'container space-below-' + this.spaceBelow }, h("a", { href: this.url, class: 'button button-' + this.colourScheme + ' full-width-' + this.fullWidth.toString() + ' size-' + this.size + ' rounded-' + this.rounded.toString() }, this.label)));
|
|
55
51
|
}
|
|
56
52
|
};
|
|
57
53
|
BiggiveButton.style = biggiveButtonCss;
|
|
@@ -128,10 +124,7 @@ const BiggiveCampaignCardFilterGrid = class {
|
|
|
128
124
|
this.filterBeneficiary = null;
|
|
129
125
|
this.filterLocation = null;
|
|
130
126
|
this.filterFunding = null;
|
|
131
|
-
this.
|
|
132
|
-
this.sortBy = event.target.value;
|
|
133
|
-
this.doSearchAndFilterUpdate.emit(this.getSearchAndFilterObject());
|
|
134
|
-
};
|
|
127
|
+
this.sortByPlaceholderText = 'Sort by';
|
|
135
128
|
this.handleApplyFilterButtonClick = () => {
|
|
136
129
|
this.doSearchAndFilterUpdate.emit(this.getSearchAndFilterObject());
|
|
137
130
|
};
|
|
@@ -169,15 +162,28 @@ const BiggiveCampaignCardFilterGrid = class {
|
|
|
169
162
|
};
|
|
170
163
|
return event;
|
|
171
164
|
}
|
|
172
|
-
doOptionSelectCompletedHandler() {
|
|
165
|
+
doOptionSelectCompletedHandler(event) {
|
|
173
166
|
this.sortBy = this.el.shadowRoot.getElementById('sort-by').selectedValue;
|
|
174
167
|
this.filterCategory = this.el.shadowRoot.getElementById('categories').selectedValue;
|
|
175
168
|
this.filterBeneficiary = this.el.shadowRoot.getElementById('beneficiaries').selectedValue;
|
|
176
169
|
this.filterLocation = this.el.shadowRoot.getElementById('locations').selectedValue;
|
|
177
170
|
this.filterFunding = this.el.shadowRoot.getElementById('funding').selectedValue;
|
|
171
|
+
// If this method was trigerred by the selection of a 'Sort by' dropdown option, then
|
|
172
|
+
// emit an event to search, but do NOT emit an event for example when filter options
|
|
173
|
+
// are selected, until the 'Apply filters' button is pressed which is handled separately
|
|
174
|
+
// by `handleApplyFilterButtonClick()`.
|
|
175
|
+
// Additional note -> we could, instead, do this:
|
|
176
|
+
// `<biggive-form-field-select placeholder="Sort by" id="sort-by" onDoSelectChange={this.someHandleMethod}>`
|
|
177
|
+
// but the problem with that is that `someHandleMethod` gets called first and then this
|
|
178
|
+
// method gets called, leading to two calls and more risk for error. DON-570.
|
|
179
|
+
if (event.detail.placeholder === this.sortByPlaceholderText) {
|
|
180
|
+
console.log('emitting event:');
|
|
181
|
+
console.log(this.getSearchAndFilterObject());
|
|
182
|
+
this.doSearchAndFilterUpdate.emit(this.getSearchAndFilterObject());
|
|
183
|
+
}
|
|
178
184
|
}
|
|
179
185
|
render() {
|
|
180
|
-
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: "sort-wrap" }, h("biggive-form-field-select", { placeholder: "Sort by", id: "sort-by"
|
|
186
|
+
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: "sort-wrap" }, h("biggive-form-field-select", { placeholder: "Sort by", 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("div", { class: "filter-wrap" }, h("biggive-button", { class: "filter", onClick: this.handleFilterButtonClick, label: "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" }, this.categoryOptions.length === 0
|
|
181
187
|
? undefined
|
|
182
188
|
: this.categoryOptions.map(option => h("biggive-form-field-select-option", { value: option, label: option }))), h("biggive-form-field-select", { placeholder: "Beneficiary", id: "beneficiaries", "space-below": "2" }, this.beneficiaryOptions.length === 0
|
|
183
189
|
? undefined
|
|
@@ -254,8 +260,7 @@ const BiggiveFormFieldSelect = class {
|
|
|
254
260
|
doOptionSelectCompletedHandler(event) {
|
|
255
261
|
this.selectedValue = event.detail.value;
|
|
256
262
|
this.selectedLabel = event.detail.label;
|
|
257
|
-
this.doSelectChange.emit({ value: this.selectedValue, label: this.selectedLabel });
|
|
258
|
-
console.log({ value: this.selectedValue, label: this.selectedLabel });
|
|
263
|
+
this.doSelectChange.emit({ value: this.selectedValue, label: this.selectedLabel, placeholder: this.placeholder });
|
|
259
264
|
if (this.el.shadowRoot !== null && this.el.shadowRoot !== undefined) {
|
|
260
265
|
const dropdown = this.el.shadowRoot.querySelector('.dropdown');
|
|
261
266
|
if (dropdown !== null && dropdown !== undefined) {
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import { EventEmitter } from '../../stencil-public-runtime';
|
|
2
1
|
export declare class BiggiveButton {
|
|
3
|
-
doButtonClick: EventEmitter<string>;
|
|
4
2
|
/**
|
|
5
3
|
* Space below component
|
|
6
4
|
*/
|
|
@@ -29,6 +27,5 @@ export declare class BiggiveButton {
|
|
|
29
27
|
* Rounded corners
|
|
30
28
|
*/
|
|
31
29
|
rounded: boolean;
|
|
32
|
-
handleButtonClick(): void;
|
|
33
30
|
render(): any;
|
|
34
31
|
}
|
|
@@ -19,6 +19,7 @@ export declare class BiggiveCampaignCardFilterGrid {
|
|
|
19
19
|
filterBeneficiary: string;
|
|
20
20
|
filterLocation: string;
|
|
21
21
|
filterFunding: string;
|
|
22
|
+
sortByPlaceholderText: string;
|
|
22
23
|
/**
|
|
23
24
|
* Space below component
|
|
24
25
|
*/
|
|
@@ -53,8 +54,7 @@ export declare class BiggiveCampaignCardFilterGrid {
|
|
|
53
54
|
*/
|
|
54
55
|
fundingOptions: string[];
|
|
55
56
|
private getSearchAndFilterObject;
|
|
56
|
-
doOptionSelectCompletedHandler(): void;
|
|
57
|
-
private handleSortByChanged;
|
|
57
|
+
doOptionSelectCompletedHandler(event: any): void;
|
|
58
58
|
private handleApplyFilterButtonClick;
|
|
59
59
|
private handleSearchButtonPressed;
|
|
60
60
|
private handleSearchTextChanged;
|
|
@@ -944,10 +944,6 @@ export namespace Components {
|
|
|
944
944
|
"videoUrl": string;
|
|
945
945
|
}
|
|
946
946
|
}
|
|
947
|
-
export interface BiggiveButtonCustomEvent<T> extends CustomEvent<T> {
|
|
948
|
-
detail: T;
|
|
949
|
-
target: HTMLBiggiveButtonElement;
|
|
950
|
-
}
|
|
951
947
|
export interface BiggiveCampaignCardFilterGridCustomEvent<T> extends CustomEvent<T> {
|
|
952
948
|
detail: T;
|
|
953
949
|
target: HTMLBiggiveCampaignCardFilterGridElement;
|
|
@@ -1447,7 +1443,6 @@ declare namespace LocalJSX {
|
|
|
1447
1443
|
* Text
|
|
1448
1444
|
*/
|
|
1449
1445
|
"label"?: string;
|
|
1450
|
-
"onDoButtonClick"?: (event: BiggiveButtonCustomEvent<string>) => void;
|
|
1451
1446
|
/**
|
|
1452
1447
|
* Rounded corners
|
|
1453
1448
|
*/
|
package/hydrate/index.js
CHANGED
|
@@ -6380,7 +6380,6 @@ const biggiveButtonCss = "/*!@body*/body.sc-biggive-button{background-color:#D7D
|
|
|
6380
6380
|
class BiggiveButton {
|
|
6381
6381
|
constructor(hostRef) {
|
|
6382
6382
|
registerInstance(this, hostRef);
|
|
6383
|
-
this.doButtonClick = createEvent(this, "doButtonClick", 7);
|
|
6384
6383
|
this.spaceBelow = 1;
|
|
6385
6384
|
this.colourScheme = 'primary';
|
|
6386
6385
|
this.label = 'Click me';
|
|
@@ -6389,11 +6388,8 @@ class BiggiveButton {
|
|
|
6389
6388
|
this.size = 'medium';
|
|
6390
6389
|
this.rounded = false;
|
|
6391
6390
|
}
|
|
6392
|
-
handleButtonClick() {
|
|
6393
|
-
this.doButtonClick.emit(this.url);
|
|
6394
|
-
}
|
|
6395
6391
|
render() {
|
|
6396
|
-
return (hAsync("div", { class: 'container space-below-' + this.spaceBelow }, hAsync("a", { href: this.url, class: 'button button-' + this.colourScheme + ' full-width-' + this.fullWidth.toString() + ' size-' + this.size + ' rounded-' + this.rounded.toString() },
|
|
6392
|
+
return (hAsync("div", { class: 'container space-below-' + this.spaceBelow }, hAsync("a", { href: this.url, class: 'button button-' + this.colourScheme + ' full-width-' + this.fullWidth.toString() + ' size-' + this.size + ' rounded-' + this.rounded.toString() }, this.label)));
|
|
6397
6393
|
}
|
|
6398
6394
|
static get style() { return biggiveButtonCss; }
|
|
6399
6395
|
static get cmpMeta() { return {
|
|
@@ -6540,10 +6536,7 @@ class BiggiveCampaignCardFilterGrid {
|
|
|
6540
6536
|
this.filterBeneficiary = null;
|
|
6541
6537
|
this.filterLocation = null;
|
|
6542
6538
|
this.filterFunding = null;
|
|
6543
|
-
this.
|
|
6544
|
-
this.sortBy = event.target.value;
|
|
6545
|
-
this.doSearchAndFilterUpdate.emit(this.getSearchAndFilterObject());
|
|
6546
|
-
};
|
|
6539
|
+
this.sortByPlaceholderText = 'Sort by';
|
|
6547
6540
|
this.handleApplyFilterButtonClick = () => {
|
|
6548
6541
|
this.doSearchAndFilterUpdate.emit(this.getSearchAndFilterObject());
|
|
6549
6542
|
};
|
|
@@ -6581,15 +6574,28 @@ class BiggiveCampaignCardFilterGrid {
|
|
|
6581
6574
|
};
|
|
6582
6575
|
return event;
|
|
6583
6576
|
}
|
|
6584
|
-
doOptionSelectCompletedHandler() {
|
|
6577
|
+
doOptionSelectCompletedHandler(event) {
|
|
6585
6578
|
this.sortBy = this.el.shadowRoot.getElementById('sort-by').selectedValue;
|
|
6586
6579
|
this.filterCategory = this.el.shadowRoot.getElementById('categories').selectedValue;
|
|
6587
6580
|
this.filterBeneficiary = this.el.shadowRoot.getElementById('beneficiaries').selectedValue;
|
|
6588
6581
|
this.filterLocation = this.el.shadowRoot.getElementById('locations').selectedValue;
|
|
6589
6582
|
this.filterFunding = this.el.shadowRoot.getElementById('funding').selectedValue;
|
|
6583
|
+
// If this method was trigerred by the selection of a 'Sort by' dropdown option, then
|
|
6584
|
+
// emit an event to search, but do NOT emit an event for example when filter options
|
|
6585
|
+
// are selected, until the 'Apply filters' button is pressed which is handled separately
|
|
6586
|
+
// by `handleApplyFilterButtonClick()`.
|
|
6587
|
+
// Additional note -> we could, instead, do this:
|
|
6588
|
+
// `<biggive-form-field-select placeholder="Sort by" id="sort-by" onDoSelectChange={this.someHandleMethod}>`
|
|
6589
|
+
// but the problem with that is that `someHandleMethod` gets called first and then this
|
|
6590
|
+
// method gets called, leading to two calls and more risk for error. DON-570.
|
|
6591
|
+
if (event.detail.placeholder === this.sortByPlaceholderText) {
|
|
6592
|
+
console.log('emitting event:');
|
|
6593
|
+
console.log(this.getSearchAndFilterObject());
|
|
6594
|
+
this.doSearchAndFilterUpdate.emit(this.getSearchAndFilterObject());
|
|
6595
|
+
}
|
|
6590
6596
|
}
|
|
6591
6597
|
render() {
|
|
6592
|
-
return (hAsync("div", { class: 'container space-below-' + this.spaceBelow }, hAsync("div", { class: "sleeve" }, hAsync("div", { class: "search-wrap" }, hAsync("h4", null, this.intro), hAsync("div", { class: "field-wrap" }, hAsync("div", { class: "input-wrap" }, hAsync("svg", { xmlns: "http://www.w3.org/2000/svg", class: "icon", viewBox: "0 0 512 512" }, hAsync("path", { d: faMagnifyingGlass.icon[4].toString() })), hAsync("input", { type: "text", value: this.searchText, class: "input-text", placeholder: this.placeholderText, onInput: this.handleSearchTextChanged, onKeyDown: this.handleEnterPressed })), hAsync("biggive-button", { onClick: this.handleSearchButtonPressed, label: this.buttonText }))), hAsync("div", { class: "sort-filter-wrap" }, hAsync("div", { class: "sort-wrap" }, hAsync("biggive-form-field-select", { placeholder: "Sort by", id: "sort-by"
|
|
6598
|
+
return (hAsync("div", { class: 'container space-below-' + this.spaceBelow }, hAsync("div", { class: "sleeve" }, hAsync("div", { class: "search-wrap" }, hAsync("h4", null, this.intro), hAsync("div", { class: "field-wrap" }, hAsync("div", { class: "input-wrap" }, hAsync("svg", { xmlns: "http://www.w3.org/2000/svg", class: "icon", viewBox: "0 0 512 512" }, hAsync("path", { d: faMagnifyingGlass.icon[4].toString() })), hAsync("input", { type: "text", value: this.searchText, class: "input-text", placeholder: this.placeholderText, onInput: this.handleSearchTextChanged, onKeyDown: this.handleEnterPressed })), hAsync("biggive-button", { onClick: this.handleSearchButtonPressed, label: this.buttonText }))), hAsync("div", { class: "sort-filter-wrap" }, hAsync("div", { class: "sort-wrap" }, hAsync("biggive-form-field-select", { placeholder: "Sort by", id: "sort-by" }, hAsync("biggive-form-field-select-option", { value: "amountRaised", label: "Most raised" }), hAsync("biggive-form-field-select-option", { value: "matchFundsRemaining", label: "Match funds remaining" }))), hAsync("div", { class: "filter-wrap" }, hAsync("biggive-button", { class: "filter", onClick: this.handleFilterButtonClick, label: "Filters" }), hAsync("biggive-popup", { id: "filter-popup" }, hAsync("h4", { class: "space-above-0 space-below-3 colour-primary" }, "Filters"), hAsync("biggive-form-field-select", { placeholder: "Category", id: "categories", "space-below": "2" }, this.categoryOptions.length === 0
|
|
6593
6599
|
? undefined
|
|
6594
6600
|
: this.categoryOptions.map(option => hAsync("biggive-form-field-select-option", { value: option, label: option }))), hAsync("biggive-form-field-select", { placeholder: "Beneficiary", id: "beneficiaries", "space-below": "2" }, this.beneficiaryOptions.length === 0
|
|
6595
6601
|
? undefined
|
|
@@ -6767,8 +6773,7 @@ class BiggiveFormFieldSelect {
|
|
|
6767
6773
|
doOptionSelectCompletedHandler(event) {
|
|
6768
6774
|
this.selectedValue = event.detail.value;
|
|
6769
6775
|
this.selectedLabel = event.detail.label;
|
|
6770
|
-
this.doSelectChange.emit({ value: this.selectedValue, label: this.selectedLabel });
|
|
6771
|
-
console.log({ value: this.selectedValue, label: this.selectedLabel });
|
|
6776
|
+
this.doSelectChange.emit({ value: this.selectedValue, label: this.selectedLabel, placeholder: this.placeholder });
|
|
6772
6777
|
if (this.el.shadowRoot !== null && this.el.shadowRoot !== undefined) {
|
|
6773
6778
|
const dropdown = this.el.shadowRoot.querySelector('.dropdown');
|
|
6774
6779
|
if (dropdown !== null && dropdown !== undefined) {
|