@biggive/components 202311211130.0.0 → 202311211301.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -293,35 +293,33 @@ const BiggiveCampaignCardFilterGrid = class {
293
293
  this.locationsPlaceHolderText = 'Select location';
294
294
  this.fundingPlaceHolderText = 'Select funding';
295
295
  this.categoryFilterSelectionChanged = (value) => {
296
- this.selectedFilterCategory = value;
296
+ this.newSelectedFilterCategory = value;
297
297
  };
298
298
  this.beneficiarySelectionChanged = (value) => {
299
- this.selectedFilterBeneficiary = value;
299
+ this.newSelectedFilterBeneficiary = value;
300
300
  };
301
301
  this.locationSelectionChanged = (value) => {
302
- this.selectedFilterLocation = value;
302
+ this.newSelectedFilterLocation = value;
303
303
  };
304
304
  this.fundingSelectionChanged = (value) => {
305
- this.selectedFilterFunding = value;
305
+ this.newSelectedFilterFunding = value;
306
306
  };
307
307
  this.sortBySelectionChanged = (value) => {
308
308
  this.selectedSortByOption = value;
309
309
  this.doSearchAndFilterUpdate.emit(this.getSearchAndFilterObject());
310
310
  };
311
311
  this.handleApplyFilterButtonClick = () => {
312
- var _a, _b;
312
+ var _a, _b, _c, _d, _e;
313
+ this.selectedFilterCategory = (_a = this.newSelectedFilterCategory) !== null && _a !== void 0 ? _a : this.selectedFilterCategory;
314
+ this.selectedFilterBeneficiary = (_b = this.newSelectedFilterBeneficiary) !== null && _b !== void 0 ? _b : this.selectedFilterBeneficiary;
315
+ this.selectedFilterLocation = (_c = this.newSelectedFilterLocation) !== null && _c !== void 0 ? _c : this.selectedFilterLocation;
316
+ this.selectedFilterFunding = (_d = this.newSelectedFilterFunding) !== null && _d !== void 0 ? _d : this.selectedFilterFunding;
313
317
  const searchAndFilterObj = this.getSearchAndFilterObject();
314
318
  this.doSearchAndFilterUpdate.emit(searchAndFilterObj);
315
- const filterPopup = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.getElementById('filter-popup');
319
+ const filterPopup = (_e = this.el.shadowRoot) === null || _e === void 0 ? void 0 : _e.getElementById('filter-popup');
316
320
  if (filterPopup) {
317
321
  filterPopup.closeFromOutside();
318
322
  }
319
- const selectedFilters = (_b = this.el.shadowRoot) === null || _b === void 0 ? void 0 : _b.querySelector('.selected-filters');
320
- if (selectedFilters) {
321
- selectedFilters.querySelectorAll('.button').forEach(button => {
322
- button.remove();
323
- });
324
- }
325
323
  this.filtersApplied =
326
324
  typeof searchAndFilterObj.filterBeneficiary === 'string' ||
327
325
  typeof searchAndFilterObj.filterCategory === 'string' ||
@@ -8,35 +8,33 @@ export class BiggiveCampaignCardFilterGrid {
8
8
  this.locationsPlaceHolderText = 'Select location';
9
9
  this.fundingPlaceHolderText = 'Select funding';
10
10
  this.categoryFilterSelectionChanged = (value) => {
11
- this.selectedFilterCategory = value;
11
+ this.newSelectedFilterCategory = value;
12
12
  };
13
13
  this.beneficiarySelectionChanged = (value) => {
14
- this.selectedFilterBeneficiary = value;
14
+ this.newSelectedFilterBeneficiary = value;
15
15
  };
16
16
  this.locationSelectionChanged = (value) => {
17
- this.selectedFilterLocation = value;
17
+ this.newSelectedFilterLocation = value;
18
18
  };
19
19
  this.fundingSelectionChanged = (value) => {
20
- this.selectedFilterFunding = value;
20
+ this.newSelectedFilterFunding = value;
21
21
  };
22
22
  this.sortBySelectionChanged = (value) => {
23
23
  this.selectedSortByOption = value;
24
24
  this.doSearchAndFilterUpdate.emit(this.getSearchAndFilterObject());
25
25
  };
26
26
  this.handleApplyFilterButtonClick = () => {
27
- var _a, _b;
27
+ var _a, _b, _c, _d, _e;
28
+ this.selectedFilterCategory = (_a = this.newSelectedFilterCategory) !== null && _a !== void 0 ? _a : this.selectedFilterCategory;
29
+ this.selectedFilterBeneficiary = (_b = this.newSelectedFilterBeneficiary) !== null && _b !== void 0 ? _b : this.selectedFilterBeneficiary;
30
+ this.selectedFilterLocation = (_c = this.newSelectedFilterLocation) !== null && _c !== void 0 ? _c : this.selectedFilterLocation;
31
+ this.selectedFilterFunding = (_d = this.newSelectedFilterFunding) !== null && _d !== void 0 ? _d : this.selectedFilterFunding;
28
32
  const searchAndFilterObj = this.getSearchAndFilterObject();
29
33
  this.doSearchAndFilterUpdate.emit(searchAndFilterObj);
30
- const filterPopup = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.getElementById('filter-popup');
34
+ const filterPopup = (_e = this.el.shadowRoot) === null || _e === void 0 ? void 0 : _e.getElementById('filter-popup');
31
35
  if (filterPopup) {
32
36
  filterPopup.closeFromOutside();
33
37
  }
34
- const selectedFilters = (_b = this.el.shadowRoot) === null || _b === void 0 ? void 0 : _b.querySelector('.selected-filters');
35
- if (selectedFilters) {
36
- selectedFilters.querySelectorAll('.button').forEach(button => {
37
- button.remove();
38
- });
39
- }
40
38
  this.filtersApplied =
41
39
  typeof searchAndFilterObj.filterBeneficiary === 'string' ||
42
40
  typeof searchAndFilterObj.filterCategory === 'string' ||
@@ -18,35 +18,33 @@ const BiggiveCampaignCardFilterGrid$1 = /*@__PURE__*/ proxyCustomElement(class e
18
18
  this.locationsPlaceHolderText = 'Select location';
19
19
  this.fundingPlaceHolderText = 'Select funding';
20
20
  this.categoryFilterSelectionChanged = (value) => {
21
- this.selectedFilterCategory = value;
21
+ this.newSelectedFilterCategory = value;
22
22
  };
23
23
  this.beneficiarySelectionChanged = (value) => {
24
- this.selectedFilterBeneficiary = value;
24
+ this.newSelectedFilterBeneficiary = value;
25
25
  };
26
26
  this.locationSelectionChanged = (value) => {
27
- this.selectedFilterLocation = value;
27
+ this.newSelectedFilterLocation = value;
28
28
  };
29
29
  this.fundingSelectionChanged = (value) => {
30
- this.selectedFilterFunding = value;
30
+ this.newSelectedFilterFunding = value;
31
31
  };
32
32
  this.sortBySelectionChanged = (value) => {
33
33
  this.selectedSortByOption = value;
34
34
  this.doSearchAndFilterUpdate.emit(this.getSearchAndFilterObject());
35
35
  };
36
36
  this.handleApplyFilterButtonClick = () => {
37
- var _a, _b;
37
+ var _a, _b, _c, _d, _e;
38
+ this.selectedFilterCategory = (_a = this.newSelectedFilterCategory) !== null && _a !== void 0 ? _a : this.selectedFilterCategory;
39
+ this.selectedFilterBeneficiary = (_b = this.newSelectedFilterBeneficiary) !== null && _b !== void 0 ? _b : this.selectedFilterBeneficiary;
40
+ this.selectedFilterLocation = (_c = this.newSelectedFilterLocation) !== null && _c !== void 0 ? _c : this.selectedFilterLocation;
41
+ this.selectedFilterFunding = (_d = this.newSelectedFilterFunding) !== null && _d !== void 0 ? _d : this.selectedFilterFunding;
38
42
  const searchAndFilterObj = this.getSearchAndFilterObject();
39
43
  this.doSearchAndFilterUpdate.emit(searchAndFilterObj);
40
- const filterPopup = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.getElementById('filter-popup');
44
+ const filterPopup = (_e = this.el.shadowRoot) === null || _e === void 0 ? void 0 : _e.getElementById('filter-popup');
41
45
  if (filterPopup) {
42
46
  filterPopup.closeFromOutside();
43
47
  }
44
- const selectedFilters = (_b = this.el.shadowRoot) === null || _b === void 0 ? void 0 : _b.querySelector('.selected-filters');
45
- if (selectedFilters) {
46
- selectedFilters.querySelectorAll('.button').forEach(button => {
47
- button.remove();
48
- });
49
- }
50
48
  this.filtersApplied =
51
49
  typeof searchAndFilterObj.filterBeneficiary === 'string' ||
52
50
  typeof searchAndFilterObj.filterCategory === 'string' ||
@@ -289,35 +289,33 @@ const BiggiveCampaignCardFilterGrid = class {
289
289
  this.locationsPlaceHolderText = 'Select location';
290
290
  this.fundingPlaceHolderText = 'Select funding';
291
291
  this.categoryFilterSelectionChanged = (value) => {
292
- this.selectedFilterCategory = value;
292
+ this.newSelectedFilterCategory = value;
293
293
  };
294
294
  this.beneficiarySelectionChanged = (value) => {
295
- this.selectedFilterBeneficiary = value;
295
+ this.newSelectedFilterBeneficiary = value;
296
296
  };
297
297
  this.locationSelectionChanged = (value) => {
298
- this.selectedFilterLocation = value;
298
+ this.newSelectedFilterLocation = value;
299
299
  };
300
300
  this.fundingSelectionChanged = (value) => {
301
- this.selectedFilterFunding = value;
301
+ this.newSelectedFilterFunding = value;
302
302
  };
303
303
  this.sortBySelectionChanged = (value) => {
304
304
  this.selectedSortByOption = value;
305
305
  this.doSearchAndFilterUpdate.emit(this.getSearchAndFilterObject());
306
306
  };
307
307
  this.handleApplyFilterButtonClick = () => {
308
- var _a, _b;
308
+ var _a, _b, _c, _d, _e;
309
+ this.selectedFilterCategory = (_a = this.newSelectedFilterCategory) !== null && _a !== void 0 ? _a : this.selectedFilterCategory;
310
+ this.selectedFilterBeneficiary = (_b = this.newSelectedFilterBeneficiary) !== null && _b !== void 0 ? _b : this.selectedFilterBeneficiary;
311
+ this.selectedFilterLocation = (_c = this.newSelectedFilterLocation) !== null && _c !== void 0 ? _c : this.selectedFilterLocation;
312
+ this.selectedFilterFunding = (_d = this.newSelectedFilterFunding) !== null && _d !== void 0 ? _d : this.selectedFilterFunding;
309
313
  const searchAndFilterObj = this.getSearchAndFilterObject();
310
314
  this.doSearchAndFilterUpdate.emit(searchAndFilterObj);
311
- const filterPopup = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.getElementById('filter-popup');
315
+ const filterPopup = (_e = this.el.shadowRoot) === null || _e === void 0 ? void 0 : _e.getElementById('filter-popup');
312
316
  if (filterPopup) {
313
317
  filterPopup.closeFromOutside();
314
318
  }
315
- const selectedFilters = (_b = this.el.shadowRoot) === null || _b === void 0 ? void 0 : _b.querySelector('.selected-filters');
316
- if (selectedFilters) {
317
- selectedFilters.querySelectorAll('.button').forEach(button => {
318
- button.remove();
319
- });
320
- }
321
319
  this.filtersApplied =
322
320
  typeof searchAndFilterObj.filterBeneficiary === 'string' ||
323
321
  typeof searchAndFilterObj.filterCategory === 'string' ||
@@ -89,6 +89,13 @@ export declare class BiggiveCampaignCardFilterGrid {
89
89
  */
90
90
  filtersApplied: boolean;
91
91
  private initialSortByOption;
92
+ /**
93
+ * This and similar properties represent selections made in the popup but not yet applied.
94
+ */
95
+ private newSelectedFilterCategory;
96
+ private newSelectedFilterBeneficiary;
97
+ private newSelectedFilterLocation;
98
+ private newSelectedFilterFunding;
92
99
  private categoryFilterSelectionChanged;
93
100
  private beneficiarySelectionChanged;
94
101
  private locationSelectionChanged;
package/hydrate/index.js CHANGED
@@ -6792,35 +6792,33 @@ class BiggiveCampaignCardFilterGrid {
6792
6792
  this.locationsPlaceHolderText = 'Select location';
6793
6793
  this.fundingPlaceHolderText = 'Select funding';
6794
6794
  this.categoryFilterSelectionChanged = (value) => {
6795
- this.selectedFilterCategory = value;
6795
+ this.newSelectedFilterCategory = value;
6796
6796
  };
6797
6797
  this.beneficiarySelectionChanged = (value) => {
6798
- this.selectedFilterBeneficiary = value;
6798
+ this.newSelectedFilterBeneficiary = value;
6799
6799
  };
6800
6800
  this.locationSelectionChanged = (value) => {
6801
- this.selectedFilterLocation = value;
6801
+ this.newSelectedFilterLocation = value;
6802
6802
  };
6803
6803
  this.fundingSelectionChanged = (value) => {
6804
- this.selectedFilterFunding = value;
6804
+ this.newSelectedFilterFunding = value;
6805
6805
  };
6806
6806
  this.sortBySelectionChanged = (value) => {
6807
6807
  this.selectedSortByOption = value;
6808
6808
  this.doSearchAndFilterUpdate.emit(this.getSearchAndFilterObject());
6809
6809
  };
6810
6810
  this.handleApplyFilterButtonClick = () => {
6811
- var _a, _b;
6811
+ var _a, _b, _c, _d, _e;
6812
+ this.selectedFilterCategory = (_a = this.newSelectedFilterCategory) !== null && _a !== void 0 ? _a : this.selectedFilterCategory;
6813
+ this.selectedFilterBeneficiary = (_b = this.newSelectedFilterBeneficiary) !== null && _b !== void 0 ? _b : this.selectedFilterBeneficiary;
6814
+ this.selectedFilterLocation = (_c = this.newSelectedFilterLocation) !== null && _c !== void 0 ? _c : this.selectedFilterLocation;
6815
+ this.selectedFilterFunding = (_d = this.newSelectedFilterFunding) !== null && _d !== void 0 ? _d : this.selectedFilterFunding;
6812
6816
  const searchAndFilterObj = this.getSearchAndFilterObject();
6813
6817
  this.doSearchAndFilterUpdate.emit(searchAndFilterObj);
6814
- const filterPopup = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.getElementById('filter-popup');
6818
+ const filterPopup = (_e = this.el.shadowRoot) === null || _e === void 0 ? void 0 : _e.getElementById('filter-popup');
6815
6819
  if (filterPopup) {
6816
6820
  filterPopup.closeFromOutside();
6817
6821
  }
6818
- const selectedFilters = (_b = this.el.shadowRoot) === null || _b === void 0 ? void 0 : _b.querySelector('.selected-filters');
6819
- if (selectedFilters) {
6820
- selectedFilters.querySelectorAll('.button').forEach(button => {
6821
- button.remove();
6822
- });
6823
- }
6824
6822
  this.filtersApplied =
6825
6823
  typeof searchAndFilterObj.filterBeneficiary === 'string' ||
6826
6824
  typeof searchAndFilterObj.filterCategory === 'string' ||
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@biggive/components",
3
3
  "_comment": "Version number below is automatically replaced during CircleCI build.",
4
- "version": "202311211130.0.0",
4
+ "version": "202311211301.0.0",
5
5
  "description": "Big Give Components",
6
6
  "main": "dist/index.cjs.js",
7
7
  "module": "dist/index.js",