@biggive/components 202606301318.0.0 → 202607280537.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.
- package/dist/biggive/biggive.esm.js +1 -1
- package/dist/biggive/{p-13840401.entry.js → p-002b7f68.entry.js} +1 -1
- package/dist/biggive/{p-6ef8f1c8.entry.js → p-02fa1d66.entry.js} +1 -1
- package/dist/biggive/{p-d2c312e0.entry.js → p-08cdb01c.entry.js} +1 -1
- package/dist/biggive/{p-63bbe726.entry.js → p-15793312.entry.js} +1 -1
- package/dist/biggive/{p-6f0ab7de.entry.js → p-16033fc3.entry.js} +1 -1
- package/dist/biggive/{p-486b0443.entry.js → p-22e9942a.entry.js} +1 -1
- package/dist/biggive/{p-f04eaebb.entry.js → p-2b027e38.entry.js} +1 -1
- package/dist/biggive/{p-ebdf0f2a.entry.js → p-2ff1777d.entry.js} +1 -1
- package/dist/biggive/p-3186f00e.entry.js +1 -0
- package/dist/biggive/{p-60824941.entry.js → p-3540af90.entry.js} +1 -1
- package/dist/biggive/p-3b86a567.entry.js +1 -0
- package/dist/biggive/{p-7b142f0c.entry.js → p-3c07ea70.entry.js} +1 -1
- package/dist/biggive/{p-c11a2f3b.entry.js → p-3c90182e.entry.js} +1 -1
- package/dist/biggive/{p-7e9f3522.entry.js → p-3f907770.entry.js} +1 -1
- package/dist/biggive/{p-b5de3f93.entry.js → p-453ae6b6.entry.js} +1 -1
- package/dist/biggive/{p-ac53a19e.entry.js → p-46c29f1d.entry.js} +1 -1
- package/dist/biggive/{p-d3112cb1.entry.js → p-4dacf3ba.entry.js} +1 -1
- package/dist/biggive/p-513424e1.entry.js +1 -0
- package/dist/biggive/{p-79233862.entry.js → p-5731cd02.entry.js} +1 -1
- package/dist/biggive/{p-c50881e4.entry.js → p-6719cc4a.entry.js} +1 -1
- package/dist/biggive/{p-ed92d2b0.entry.js → p-6a07a53d.entry.js} +1 -1
- package/dist/biggive/{p-a987b466.entry.js → p-6b31dab2.entry.js} +1 -1
- package/dist/biggive/{p-08c0d7a0.entry.js → p-6b7955cd.entry.js} +1 -1
- package/dist/biggive/p-6c07ff8b.entry.js +1 -0
- package/dist/biggive/{p-f2d44bb0.entry.js → p-73edd20f.entry.js} +1 -1
- package/dist/biggive/{p-167ac0d3.entry.js → p-7eeaa6d0.entry.js} +1 -1
- package/dist/biggive/{p-f2f9ce31.entry.js → p-8087b693.entry.js} +1 -1
- package/dist/biggive/{p-dddee0ad.entry.js → p-84f66cf9.entry.js} +1 -1
- package/dist/biggive/{p-07bd58dd.entry.js → p-85daef9b.entry.js} +1 -1
- package/dist/biggive/{p-6db0805c.entry.js → p-8c1216af.entry.js} +1 -1
- package/dist/biggive/{p-342e0587.entry.js → p-9a438692.entry.js} +1 -1
- package/dist/biggive/{p-925b1eab.entry.js → p-9c166e66.entry.js} +1 -1
- package/dist/biggive/{p-53efa890.entry.js → p-9cb3ff5d.entry.js} +1 -1
- package/dist/biggive/{p-ed7b04d2.entry.js → p-9e56d7d7.entry.js} +1 -1
- package/dist/biggive/p-CmetY_lh.js +6 -0
- package/dist/biggive/p-a02082d9.entry.js +1 -0
- package/dist/biggive/{p-074c95a5.entry.js → p-a15eb5e1.entry.js} +1 -1
- package/dist/biggive/p-a7abbcfc.entry.js +1 -0
- package/dist/biggive/{p-53d2459c.entry.js → p-b721b109.entry.js} +1 -1
- package/dist/biggive/p-bb837c55.entry.js +1 -0
- package/dist/biggive/{p-d277fe34.entry.js → p-bc61d781.entry.js} +1 -1
- package/dist/biggive/{p-22f2e1e4.entry.js → p-cef4e22b.entry.js} +1 -1
- package/dist/biggive/{p-034bc308.entry.js → p-d5cc82ee.entry.js} +1 -1
- package/dist/biggive/p-d69684b2.entry.js +1 -0
- package/dist/biggive/{p-fd2f1a72.entry.js → p-e69861b1.entry.js} +1 -1
- package/dist/biggive/{p-fb0a9e11.entry.js → p-f3028dff.entry.js} +1 -1
- package/dist/biggive/{p-b00c2ca8.entry.js → p-f862ef18.entry.js} +1 -1
- package/dist/biggive/{p-e8517ccd.entry.js → p-faf4b3a1.entry.js} +1 -1
- package/dist/cjs/biggive-accordion.cjs.entry.js +1 -1
- package/dist/cjs/biggive-article-card.cjs.entry.js +2 -2
- package/dist/cjs/biggive-back-to-top.cjs.entry.js +1 -1
- package/dist/cjs/biggive-basic-card.cjs.entry.js +2 -2
- package/dist/cjs/biggive-boxed-content.cjs.entry.js +2 -2
- package/dist/cjs/biggive-branded-image.cjs.entry.js +1 -1
- package/dist/cjs/biggive-button.cjs.entry.js +1 -1
- package/dist/cjs/biggive-call-to-action.cjs.entry.js +1 -1
- package/dist/cjs/biggive-campaign-card.cjs.entry.js +2 -2
- package/dist/cjs/biggive-campaign-highlights.cjs.entry.js +1 -1
- package/dist/cjs/biggive-container-card.cjs.entry.js +1 -1
- package/dist/cjs/biggive-cookie-banner.cjs.entry.js +1 -1
- package/dist/cjs/biggive-form-field-select.cjs.entry.js +2 -2
- package/dist/cjs/biggive-form.cjs.entry.js +1 -1
- package/dist/cjs/biggive-formatted-text.cjs.entry.js +1 -1
- package/dist/cjs/biggive-grid.cjs.entry.js +1 -1
- package/dist/cjs/biggive-heading-banner.cjs.entry.js +2 -2
- package/dist/cjs/biggive-heading.cjs.entry.js +1 -1
- package/dist/cjs/biggive-hero-image.cjs.entry.js +2 -2
- package/dist/cjs/biggive-icon-button.cjs.entry.js +2 -2
- package/dist/cjs/biggive-image-button.cjs.entry.js +2 -2
- package/dist/cjs/biggive-image-card.cjs.entry.js +2 -2
- package/dist/cjs/biggive-image-feature.cjs.entry.js +1 -1
- package/dist/cjs/biggive-image.cjs.entry.js +1 -1
- package/dist/cjs/biggive-main-menu.cjs.entry.js +1 -1
- package/dist/cjs/biggive-misc-icon.cjs.entry.js +2 -3
- package/dist/cjs/biggive-nav-group.cjs.entry.js +1 -1
- package/dist/cjs/biggive-nav-item.cjs.entry.js +1 -1
- package/dist/cjs/biggive-page-column.cjs.entry.js +1 -1
- package/dist/cjs/biggive-page-columns.cjs.entry.js +1 -1
- package/dist/cjs/biggive-page-section.cjs.entry.js +2 -2
- package/dist/cjs/biggive-popup.cjs.entry.js +1 -1
- package/dist/cjs/biggive-progress-bar.cjs.entry.js +1 -1
- package/dist/cjs/biggive-quote.cjs.entry.js +3 -3
- package/dist/cjs/biggive-sheet.cjs.entry.js +1 -1
- package/dist/cjs/biggive-social-icon.cjs.entry.js +2 -3
- package/dist/cjs/biggive-tab.cjs.entry.js +1 -1
- package/dist/cjs/biggive-tabbed-content.cjs.entry.js +2 -2
- package/dist/cjs/biggive-table.cjs.entry.js +2 -2
- package/dist/cjs/biggive-text-input.cjs.entry.js +1 -1
- package/dist/cjs/biggive-timeline.cjs.entry.js +2 -2
- package/dist/cjs/biggive-totalizer-ticker-item.cjs.entry.js +1 -1
- package/dist/cjs/biggive-totalizer.cjs.entry.js +1 -1
- package/dist/cjs/biggive-video-feature.cjs.entry.js +1 -1
- package/dist/cjs/biggive-video.cjs.entry.js +1 -1
- package/dist/cjs/biggive.cjs.js +1 -1
- package/dist/cjs/{fontawesome-icons-C4PSe07b.js → fontawesome-icons-DKTJ2bTV.js} +55 -11
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/philco-footer.cjs.entry.js +1 -1
- package/dist/cjs/philco-main-menu.cjs.entry.js +1 -1
- package/dist/collection/collection-manifest.json +0 -1
- package/dist/collection/components/biggive-accordion/biggive-accordion.js +1 -1
- package/dist/collection/components/biggive-article-card/biggive-article-card.js +2 -2
- package/dist/collection/components/biggive-back-to-top/biggive-back-to-top.js +1 -1
- package/dist/collection/components/biggive-basic-card/biggive-basic-card.js +2 -2
- package/dist/collection/components/biggive-boxed-content/biggive-boxed-content.js +2 -2
- package/dist/collection/components/biggive-branded-image/biggive-branded-image.js +1 -1
- package/dist/collection/components/biggive-button/biggive-button.js +1 -1
- package/dist/collection/components/biggive-call-to-action/biggive-call-to-action.js +1 -1
- package/dist/collection/components/biggive-campaign-card/biggive-campaign-card.js +2 -2
- package/dist/collection/components/biggive-campaign-highlights/biggive-campaign-highlights.js +1 -1
- package/dist/collection/components/biggive-container-card/biggive-container-card.js +1 -1
- package/dist/collection/components/biggive-cookie-banner/biggive-cookie-banner.js +1 -1
- package/dist/collection/components/biggive-form/biggive-form.js +1 -1
- package/dist/collection/components/biggive-form-field-select/biggive-form-field-select.js +2 -2
- package/dist/collection/components/biggive-formatted-text/biggive-formatted-text.js +1 -1
- package/dist/collection/components/biggive-grid/biggive-grid.js +1 -1
- package/dist/collection/components/biggive-heading/biggive-heading.js +1 -1
- package/dist/collection/components/biggive-heading-banner/biggive-heading-banner.js +2 -2
- package/dist/collection/components/biggive-hero-image/biggive-hero-image.js +2 -2
- package/dist/collection/components/biggive-icon-button/biggive-icon-button.js +2 -2
- package/dist/collection/components/biggive-image/biggive-image.js +1 -1
- package/dist/collection/components/biggive-image-button/biggive-image-button.js +2 -2
- package/dist/collection/components/biggive-image-card/biggive-image-card.js +2 -2
- package/dist/collection/components/biggive-image-feature/biggive-image-feature.js +1 -1
- package/dist/collection/components/biggive-main-menu/biggive-main-menu.js +1 -1
- package/dist/collection/components/biggive-misc-icon/biggive-misc-icon.js +1 -1
- package/dist/collection/components/biggive-nav-group/biggive-nav-group.js +1 -1
- package/dist/collection/components/biggive-nav-item/biggive-nav-item.js +1 -1
- package/dist/collection/components/biggive-page-column/biggive-page-column.js +1 -1
- package/dist/collection/components/biggive-page-columns/biggive-page-columns.js +1 -1
- package/dist/collection/components/biggive-page-section/biggive-page-section.js +2 -2
- package/dist/collection/components/biggive-popup/biggive-popup.js +1 -1
- package/dist/collection/components/biggive-progress-bar/biggive-progress-bar.js +1 -1
- package/dist/collection/components/biggive-quote/biggive-quote.js +3 -3
- package/dist/collection/components/biggive-sheet/biggive-sheet.js +1 -1
- package/dist/collection/components/biggive-social-icon/biggive-social-icon.js +1 -1
- package/dist/collection/components/biggive-tab/biggive-tab.js +1 -1
- package/dist/collection/components/biggive-tabbed-content/biggive-tabbed-content.js +2 -2
- package/dist/collection/components/biggive-table/biggive-table.js +2 -2
- package/dist/collection/components/biggive-text-input/biggive-text-input.js +1 -1
- package/dist/collection/components/biggive-timeline/biggive-timeline.js +2 -2
- package/dist/collection/components/biggive-totalizer/biggive-totalizer.js +1 -1
- package/dist/collection/components/biggive-totalizer-ticker-item/biggive-totalizer-ticker-item.js +1 -1
- package/dist/collection/components/biggive-video/biggive-video.js +1 -1
- package/dist/collection/components/biggive-video-feature/biggive-video-feature.js +1 -1
- package/dist/collection/components/philco-footer/philco-footer.js +1 -1
- package/dist/collection/components/philco-main-menu/philco-main-menu.js +1 -1
- package/dist/components/biggive-accordion.js +1 -1
- package/dist/components/biggive-article-card.js +1 -1
- package/dist/components/biggive-back-to-top.js +1 -1
- package/dist/components/biggive-basic-card.js +1 -1
- package/dist/components/biggive-boxed-content.js +1 -1
- package/dist/components/biggive-branded-image.js +1 -1
- package/dist/components/biggive-button2.js +1 -1
- package/dist/components/biggive-call-to-action.js +1 -1
- package/dist/components/biggive-campaign-card.js +1 -1
- package/dist/components/biggive-campaign-highlights.js +1 -1
- package/dist/components/biggive-container-card.js +1 -1
- package/dist/components/biggive-cookie-banner.js +1 -1
- package/dist/components/biggive-form-field-select.js +1 -1
- package/dist/components/biggive-form.js +1 -1
- package/dist/components/biggive-formatted-text.js +1 -1
- package/dist/components/biggive-grid.js +1 -1
- package/dist/components/biggive-heading-banner.js +1 -1
- package/dist/components/biggive-heading.js +1 -1
- package/dist/components/biggive-hero-image.js +1 -1
- package/dist/components/biggive-icon-button.js +1 -1
- package/dist/components/biggive-image-button.js +1 -1
- package/dist/components/biggive-image-card.js +1 -1
- package/dist/components/biggive-image-feature.js +1 -1
- package/dist/components/biggive-image.js +1 -1
- package/dist/components/biggive-main-menu.js +1 -1
- package/dist/components/biggive-misc-icon2.js +1 -1
- package/dist/components/biggive-nav-group.js +1 -1
- package/dist/components/biggive-nav-item.js +1 -1
- package/dist/components/biggive-page-column.js +1 -1
- package/dist/components/biggive-page-columns.js +1 -1
- package/dist/components/biggive-page-section.js +1 -1
- package/dist/components/biggive-popup2.js +1 -1
- package/dist/components/biggive-progress-bar2.js +1 -1
- package/dist/components/biggive-quote.js +1 -1
- package/dist/components/biggive-sheet.js +1 -1
- package/dist/components/biggive-social-icon2.js +1 -1
- package/dist/components/biggive-tab.js +1 -1
- package/dist/components/biggive-tabbed-content.js +1 -1
- package/dist/components/biggive-table.js +1 -1
- package/dist/components/biggive-text-input.js +1 -1
- package/dist/components/biggive-timeline.js +1 -1
- package/dist/components/biggive-totalizer-ticker-item.js +1 -1
- package/dist/components/biggive-totalizer.js +1 -1
- package/dist/components/biggive-video-feature.js +1 -1
- package/dist/components/biggive-video.js +1 -1
- package/dist/components/fontawesome-icons.js +2 -2
- package/dist/components/index.d.ts +0 -2
- package/dist/components/index.js +1 -1
- package/dist/components/philco-footer.js +1 -1
- package/dist/components/philco-main-menu.js +1 -1
- package/dist/esm/biggive-accordion.entry.js +1 -1
- package/dist/esm/biggive-article-card.entry.js +2 -2
- package/dist/esm/biggive-back-to-top.entry.js +1 -1
- package/dist/esm/biggive-basic-card.entry.js +2 -2
- package/dist/esm/biggive-boxed-content.entry.js +2 -2
- package/dist/esm/biggive-branded-image.entry.js +1 -1
- package/dist/esm/biggive-button.entry.js +1 -1
- package/dist/esm/biggive-call-to-action.entry.js +1 -1
- package/dist/esm/biggive-campaign-card.entry.js +2 -2
- package/dist/esm/biggive-campaign-highlights.entry.js +1 -1
- package/dist/esm/biggive-container-card.entry.js +1 -1
- package/dist/esm/biggive-cookie-banner.entry.js +1 -1
- package/dist/esm/biggive-form-field-select.entry.js +2 -2
- package/dist/esm/biggive-form.entry.js +1 -1
- package/dist/esm/biggive-formatted-text.entry.js +1 -1
- package/dist/esm/biggive-grid.entry.js +1 -1
- package/dist/esm/biggive-heading-banner.entry.js +2 -2
- package/dist/esm/biggive-heading.entry.js +1 -1
- package/dist/esm/biggive-hero-image.entry.js +2 -2
- package/dist/esm/biggive-icon-button.entry.js +2 -2
- package/dist/esm/biggive-image-button.entry.js +2 -2
- package/dist/esm/biggive-image-card.entry.js +2 -2
- package/dist/esm/biggive-image-feature.entry.js +1 -1
- package/dist/esm/biggive-image.entry.js +1 -1
- package/dist/esm/biggive-main-menu.entry.js +1 -1
- package/dist/esm/biggive-misc-icon.entry.js +2 -3
- package/dist/esm/biggive-nav-group.entry.js +1 -1
- package/dist/esm/biggive-nav-item.entry.js +1 -1
- package/dist/esm/biggive-page-column.entry.js +1 -1
- package/dist/esm/biggive-page-columns.entry.js +1 -1
- package/dist/esm/biggive-page-section.entry.js +2 -2
- package/dist/esm/biggive-popup.entry.js +1 -1
- package/dist/esm/biggive-progress-bar.entry.js +1 -1
- package/dist/esm/biggive-quote.entry.js +3 -3
- package/dist/esm/biggive-sheet.entry.js +1 -1
- package/dist/esm/biggive-social-icon.entry.js +2 -3
- package/dist/esm/biggive-tab.entry.js +1 -1
- package/dist/esm/biggive-tabbed-content.entry.js +2 -2
- package/dist/esm/biggive-table.entry.js +2 -2
- package/dist/esm/biggive-text-input.entry.js +1 -1
- package/dist/esm/biggive-timeline.entry.js +2 -2
- package/dist/esm/biggive-totalizer-ticker-item.entry.js +1 -1
- package/dist/esm/biggive-totalizer.entry.js +1 -1
- package/dist/esm/biggive-video-feature.entry.js +1 -1
- package/dist/esm/biggive-video.entry.js +1 -1
- package/dist/esm/biggive.js +1 -1
- package/dist/esm/{fontawesome-icons-BeVCdTM9.js → fontawesome-icons-CmetY_lh.js} +46 -2
- package/dist/esm/loader.js +1 -1
- package/dist/esm/philco-footer.entry.js +1 -1
- package/dist/esm/philco-main-menu.entry.js +1 -1
- package/dist/types/components.d.ts +0 -222
- package/hydrate/index.js +109 -411
- package/hydrate/index.mjs +109 -411
- package/package.json +1 -1
- package/dist/biggive/p-12e780cb.entry.js +0 -1
- package/dist/biggive/p-2f0e2375.entry.js +0 -1
- package/dist/biggive/p-35742632.entry.js +0 -1
- package/dist/biggive/p-4c8d3d7b.entry.js +0 -1
- package/dist/biggive/p-76d8edf3.entry.js +0 -1
- package/dist/biggive/p-CoGE2Wf-.js +0 -6
- package/dist/biggive/p-DHmSSfst.js +0 -6
- package/dist/biggive/p-acc61e55.entry.js +0 -1
- package/dist/biggive/p-b09d4083.entry.js +0 -1
- package/dist/biggive/p-b0d1c784.entry.js +0 -1
- package/dist/biggive/p-d4462885.entry.js +0 -1
- package/dist/cjs/biggive-campaign-card-filter-grid.cjs.entry.js +0 -277
- package/dist/cjs/index-CsWZ2Pa-.js +0 -60
- package/dist/collection/components/biggive-campaign-card-filter-grid/biggive-campaign-card-filter-grid.css +0 -270
- package/dist/collection/components/biggive-campaign-card-filter-grid/biggive-campaign-card-filter-grid.js +0 -680
- package/dist/collection/components/biggive-campaign-card-filter-grid/biggive-campaign-card-filter-grid.stories.js +0 -109
- package/dist/components/biggive-campaign-card-filter-grid.d.ts +0 -11
- package/dist/components/biggive-campaign-card-filter-grid.js +0 -1
- package/dist/components/biggive-form-field-select2.js +0 -1
- package/dist/components/index2.js +0 -6
- package/dist/esm/biggive-campaign-card-filter-grid.entry.js +0 -275
- package/dist/esm/index-CoGE2Wf-.js +0 -50
- package/dist/types/components/biggive-campaign-card-filter-grid/biggive-campaign-card-filter-grid.d.ts +0 -147
- package/dist/types/components/biggive-campaign-card-filter-grid/biggive-campaign-card-filter-grid.stories.d.ts +0 -59
|
@@ -1,680 +0,0 @@
|
|
|
1
|
-
import { h } from "@stencil/core";
|
|
2
|
-
import { faMagnifyingGlass } from "@fortawesome/pro-solid-svg-icons";
|
|
3
|
-
const sortOptionLabels = {
|
|
4
|
-
relevance: 'Relevance',
|
|
5
|
-
amountRaised: 'Most raised',
|
|
6
|
-
leastRaised: 'Least raised',
|
|
7
|
-
closeToTarget: 'Nearest target',
|
|
8
|
-
matchFundsRemaining: 'Most funds remaining',
|
|
9
|
-
};
|
|
10
|
-
export class BiggiveCampaignCardFilterGrid {
|
|
11
|
-
constructor() {
|
|
12
|
-
this.sortByPlaceholderText = 'Sort by';
|
|
13
|
-
this.beneficiariesPlaceHolderText = 'Select beneficiary';
|
|
14
|
-
this.categoriesPlaceHolderText = 'Select category';
|
|
15
|
-
this.locationsPlaceHolderText = 'Select location';
|
|
16
|
-
/**
|
|
17
|
-
* This and similar properties represent selections made in the popup but not yet applied.
|
|
18
|
-
*/
|
|
19
|
-
this.newSelectedFilterCategory = null;
|
|
20
|
-
this.newSelectedFilterBeneficiary = null;
|
|
21
|
-
this.newSelectedFilterLocation = null;
|
|
22
|
-
/**
|
|
23
|
-
* Space below component
|
|
24
|
-
*/
|
|
25
|
-
this.spaceBelow = 0;
|
|
26
|
-
/**
|
|
27
|
-
* Intro
|
|
28
|
-
*/
|
|
29
|
-
this.intro = 'Find a charity or project';
|
|
30
|
-
/**
|
|
31
|
-
* Optional search text prop. Useful for pre-populating the search field
|
|
32
|
-
* when the page is loaded with a search term already existing in the URL.
|
|
33
|
-
* This can happen when sharing links, or if a donor goes to a campaign page
|
|
34
|
-
* after searching, and then returns to the search results. In such a case,
|
|
35
|
-
* the search box text will clear, unless we use this prop to populate it on
|
|
36
|
-
* rendering. DON-652.
|
|
37
|
-
*/
|
|
38
|
-
this.searchText = null;
|
|
39
|
-
/**
|
|
40
|
-
* Defines the text displayed as the placeholder in the input field
|
|
41
|
-
* before the user types anything
|
|
42
|
-
*/
|
|
43
|
-
this.placeholderText = 'Search';
|
|
44
|
-
/**
|
|
45
|
-
* Defines the text on the search button
|
|
46
|
-
*/
|
|
47
|
-
this.buttonText = 'Search';
|
|
48
|
-
/**
|
|
49
|
-
* For injecting the chosen category to filter by, as per the comment above for `selectedSortByOption`.
|
|
50
|
-
*/
|
|
51
|
-
this.selectedFilterCategory = null;
|
|
52
|
-
/**
|
|
53
|
-
* For injecting the chosen beneficiary to filter by, as per the comment above for `selectedSortByOption`.
|
|
54
|
-
*/
|
|
55
|
-
this.selectedFilterBeneficiary = null;
|
|
56
|
-
/**
|
|
57
|
-
* For injecting the chosen location to filter by, as per the comment above for `selectedSortByOption`.
|
|
58
|
-
*/
|
|
59
|
-
this.selectedFilterLocation = null;
|
|
60
|
-
/**
|
|
61
|
-
* Allow donors to select campaigns near to themselves.
|
|
62
|
-
*/
|
|
63
|
-
this.enableSearchByLocation = false;
|
|
64
|
-
/**
|
|
65
|
-
* Incidates that the component is currently fetching the browser location
|
|
66
|
-
*/
|
|
67
|
-
this.fetchingLocation = false;
|
|
68
|
-
/**
|
|
69
|
-
* Selected location around which donor is looking for campaigns
|
|
70
|
-
*/
|
|
71
|
-
this.location = undefined;
|
|
72
|
-
this.categoryFilterSelectionChanged = (value) => {
|
|
73
|
-
this.newSelectedFilterCategory = value;
|
|
74
|
-
};
|
|
75
|
-
this.beneficiarySelectionChanged = (value) => {
|
|
76
|
-
this.newSelectedFilterBeneficiary = value;
|
|
77
|
-
};
|
|
78
|
-
this.locationSelectionChanged = (value) => {
|
|
79
|
-
this.newSelectedFilterLocation = value;
|
|
80
|
-
};
|
|
81
|
-
this.sortBySelectionChanged = (value) => {
|
|
82
|
-
this.selectedSortByOption = value;
|
|
83
|
-
this.doSearchAndFilterUpdate.emit(this.getSearchAndFilterObject());
|
|
84
|
-
};
|
|
85
|
-
this.handleApplyFilterButtonClick = () => {
|
|
86
|
-
var _a, _b, _c, _d;
|
|
87
|
-
this.selectedFilterCategory = (_a = this.newSelectedFilterCategory) !== null && _a !== void 0 ? _a : this.selectedFilterCategory;
|
|
88
|
-
this.selectedFilterBeneficiary = (_b = this.newSelectedFilterBeneficiary) !== null && _b !== void 0 ? _b : this.selectedFilterBeneficiary;
|
|
89
|
-
this.selectedFilterLocation = (_c = this.newSelectedFilterLocation) !== null && _c !== void 0 ? _c : this.selectedFilterLocation;
|
|
90
|
-
const searchAndFilterObj = this.getSearchAndFilterObject();
|
|
91
|
-
this.doSearchAndFilterUpdate.emit(searchAndFilterObj);
|
|
92
|
-
const filterPopup = (_d = this.el.shadowRoot) === null || _d === void 0 ? void 0 : _d.getElementById('filter-popup');
|
|
93
|
-
if (filterPopup) {
|
|
94
|
-
filterPopup.closeFromOutside();
|
|
95
|
-
}
|
|
96
|
-
this.filtersApplied =
|
|
97
|
-
typeof searchAndFilterObj.filterBeneficiary === 'string' || typeof searchAndFilterObj.filterCategory === 'string' || typeof searchAndFilterObj.filterLocation === 'string';
|
|
98
|
-
};
|
|
99
|
-
this.handleSearchButtonPressed = () => {
|
|
100
|
-
this.unfocusTextInput();
|
|
101
|
-
this.doSearchAndFilterUpdate.emit(this.getSearchAndFilterObject());
|
|
102
|
-
if (this.hasSearchTerm()) {
|
|
103
|
-
this.selectedSortByOption = 'Relevance';
|
|
104
|
-
}
|
|
105
|
-
};
|
|
106
|
-
this.handleNearMeButtonPressed = () => {
|
|
107
|
-
this.unfocusTextInput();
|
|
108
|
-
this.doGetLocationFromBrowser.emit();
|
|
109
|
-
};
|
|
110
|
-
this.handleSearchTextChanged = (event) => {
|
|
111
|
-
this.searchText = event.target.value;
|
|
112
|
-
};
|
|
113
|
-
this.handleEnterPressed = (ev) => {
|
|
114
|
-
if (ev.key === 'Enter') {
|
|
115
|
-
this.unfocusTextInput();
|
|
116
|
-
this.doSearchAndFilterUpdate.emit(this.getSearchAndFilterObject());
|
|
117
|
-
}
|
|
118
|
-
};
|
|
119
|
-
this.handleFilterButtonClick = () => {
|
|
120
|
-
var _a;
|
|
121
|
-
this.newSelectedFilterBeneficiary = this.selectedFilterBeneficiary;
|
|
122
|
-
this.newSelectedFilterCategory = this.selectedFilterCategory;
|
|
123
|
-
this.newSelectedFilterLocation = this.selectedFilterLocation;
|
|
124
|
-
const filterPopup = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.getElementById('filter-popup');
|
|
125
|
-
if (filterPopup) {
|
|
126
|
-
filterPopup.openFromOutside();
|
|
127
|
-
}
|
|
128
|
-
};
|
|
129
|
-
this.handleClearAll = () => {
|
|
130
|
-
var _a;
|
|
131
|
-
this.unfocusTextInput();
|
|
132
|
-
// Set the 'Filters' button back to the primary background colour
|
|
133
|
-
this.filtersApplied = false;
|
|
134
|
-
// Clear all
|
|
135
|
-
this.searchText = null;
|
|
136
|
-
this.selectedSortByOption = this.initialSortByOption;
|
|
137
|
-
this.selectedFilterBeneficiary = null;
|
|
138
|
-
this.selectedFilterCategory = null;
|
|
139
|
-
this.selectedFilterLocation = null;
|
|
140
|
-
// Clear <biggive-form-field-select> components' internal selectedValue and selectedLabel. DON-654.
|
|
141
|
-
['sort-by', 'categories', 'beneficiaries', 'locations', 'funding'].forEach(id => {
|
|
142
|
-
var _a;
|
|
143
|
-
const theEl = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.getElementById(id);
|
|
144
|
-
if (!theEl) {
|
|
145
|
-
return;
|
|
146
|
-
}
|
|
147
|
-
theEl.selectedValue = null;
|
|
148
|
-
theEl.selectedLabel = null;
|
|
149
|
-
});
|
|
150
|
-
const selectedFilters = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('.selected-filters');
|
|
151
|
-
if (selectedFilters) {
|
|
152
|
-
selectedFilters.querySelectorAll('.button').forEach(button => {
|
|
153
|
-
button.remove();
|
|
154
|
-
});
|
|
155
|
-
}
|
|
156
|
-
// Emit the doSearchAndFilterUpdate event with null values. DON-654
|
|
157
|
-
this.doSearchAndFilterUpdate.emit({
|
|
158
|
-
searchText: null,
|
|
159
|
-
sortBy: null,
|
|
160
|
-
filterCategory: null,
|
|
161
|
-
filterBeneficiary: null,
|
|
162
|
-
filterLocation: null,
|
|
163
|
-
});
|
|
164
|
-
};
|
|
165
|
-
}
|
|
166
|
-
/**
|
|
167
|
-
* Typically on non-negligible scroll away from the search area.
|
|
168
|
-
*/
|
|
169
|
-
async unfocusInputs() {
|
|
170
|
-
this.unfocusTextInput();
|
|
171
|
-
}
|
|
172
|
-
getSearchAndFilterObject() {
|
|
173
|
-
return {
|
|
174
|
-
searchText: this.searchText,
|
|
175
|
-
sortBy: this.selectedSortByOption,
|
|
176
|
-
filterCategory: this.selectedFilterCategory,
|
|
177
|
-
filterBeneficiary: this.selectedFilterBeneficiary,
|
|
178
|
-
filterLocation: this.selectedFilterLocation,
|
|
179
|
-
};
|
|
180
|
-
}
|
|
181
|
-
removeFilter(filterKey) {
|
|
182
|
-
var _a;
|
|
183
|
-
switch (filterKey) {
|
|
184
|
-
case 'beneficiaries':
|
|
185
|
-
this.selectedFilterBeneficiary = null;
|
|
186
|
-
break;
|
|
187
|
-
case 'categories':
|
|
188
|
-
this.selectedFilterCategory = null;
|
|
189
|
-
break;
|
|
190
|
-
case 'locations':
|
|
191
|
-
this.selectedFilterLocation = null;
|
|
192
|
-
break;
|
|
193
|
-
default:
|
|
194
|
-
// This asks the compiler to check that we are in dead code, i.e. we covered all the possible filter keys
|
|
195
|
-
// above. If we missed one we would get a compile error trying to assign a string to a never.
|
|
196
|
-
const exhaustiveSwitch = filterKey;
|
|
197
|
-
console.error(exhaustiveSwitch);
|
|
198
|
-
}
|
|
199
|
-
const selectEl = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.getElementById(filterKey);
|
|
200
|
-
if (!selectEl) {
|
|
201
|
-
return;
|
|
202
|
-
}
|
|
203
|
-
selectEl.selectedLabel = null;
|
|
204
|
-
selectEl.selectedValue = null;
|
|
205
|
-
this.doSearchAndFilterUpdate.emit(this.getSearchAndFilterObject());
|
|
206
|
-
}
|
|
207
|
-
/**
|
|
208
|
-
* We've seen desktop Safari jump to this input when it's focused at times when that's
|
|
209
|
-
* unhelpful, so on a few occasions we proactively blur it.
|
|
210
|
-
*/
|
|
211
|
-
unfocusTextInput() {
|
|
212
|
-
var _a;
|
|
213
|
-
const input = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('.input-text');
|
|
214
|
-
input === null || input === void 0 ? void 0 : input.blur();
|
|
215
|
-
}
|
|
216
|
-
componentWillRender() {
|
|
217
|
-
this.filtersApplied = this.selectedFilterCategory !== null || this.selectedFilterBeneficiary !== null || this.selectedFilterLocation !== null;
|
|
218
|
-
this.initialSortByOption = this.selectedSortByOption;
|
|
219
|
-
}
|
|
220
|
-
render() {
|
|
221
|
-
var _a;
|
|
222
|
-
const sortOptions = this.getSortOptions();
|
|
223
|
-
return (h("div", { key: 'ceb2f44c3c853bfdc3da18ad187de4cc5a085ffb', class: 'container space-below-' + this.spaceBelow }, h("div", { key: '8f6370902bfabe8a9df23e274d05298ca316b12b', class: "sleeve" }, h("div", { key: '89fc861fdb61827ab5dbb5cee88a4dfdd0a8abcb', class: "search-wrap" }, h("h4", { key: '04363e5852c2347036e52efd75c0acfd83df5901' }, this.intro), h("div", { key: 'dd18cb11be900192f0a5a26f027b0102453e50ad', class: "field-wrap" }, h("div", { key: 'a9798f3d6943cfb5494452bf23ea5ce03c288a45', class: "input-wrap" }, h("svg", { key: '9296bccad620aaba713b252fb31c7f3efd4b1a96', xmlns: "http://www.w3.org/2000/svg", class: "icon", viewBox: "0 0 512 512" }, h("path", { key: '718a7766577cf08ba55ebae64b60b312cfcf8edf', d: faMagnifyingGlass.icon[4].toString() })), h("input", { key: 'e89ff0c306417359e72597edf932166970e01702', type: "text", value: (_a = this.searchText) !== null && _a !== void 0 ? _a : '', class: "input-text", placeholder: this.placeholderText, onInput: this.handleSearchTextChanged, onKeyDown: this.handleEnterPressed })), h("biggive-button", { key: '7713463cc5c611be7e96290c91da7691c3bba5e4', onDoButtonClick: this.handleSearchButtonPressed, label: this.buttonText }))), h("div", { key: 'eb4ac758e446eda26be72dad7239fd525c520c39', class: "sort-filter-wrap" }, this.enableSearchByLocation && this.offerNearMeOption && (h("biggive-button", { key: '6f571b4193453203cc11cb99c42a475e0360b69d', class: "filter", colourScheme: "primary", onDoButtonClick: this.handleNearMeButtonPressed, label: this.fetchingLocation ? 'Fetching location...' : 'Charities near me', disabled: this.fetchingLocation, fullWidth: true, "space-below": "0" })), h("div", { key: '07fa78bea86edf2b60492b42e8e91ff9b44e9830', class: "filter-wrap" }, h("biggive-button", { key: '0f6775e87d80f1b91dd57ef39260838932dd099d', class: "filter", colourScheme: "primary", onDoButtonClick: this.handleFilterButtonClick, label: "Filter", fullWidth: true, "space-below": "0" }), h("biggive-popup", { key: 'fe87d7b2fc75583f421855eee6dd22132ec77096', id: "filter-popup" }, h("h4", { key: '50cc5ea69df122c34ff8bc615088f7a7e07d992e', class: "space-above-0 space-below-3 text-colour-primary" }, "Filters"), h("div", { key: 'c0354b38830bb635e19ad38dfd306e41b72aedff', class: "select-wrapper-1" }, h("biggive-form-field-select", { key: 'a1ce6c7b5c956e01958a74f98d6a1238486dd511', backgroundColour: "white", prompt: "Category", placeholder: this.categoriesPlaceHolderText, selectedLabel: this.selectedFilterCategory, selectedValue: this.selectedFilterCategory, options: this.optionsToArray(this.categoryOptions || []), selectionChanged: this.categoryFilterSelectionChanged, id: "categories", "space-below": "2" })), h("div", { key: '6cc0dbeb1c98470bdce24faf880210f64e0edd72', class: "select-wrapper-2" }, h("biggive-form-field-select", { key: '5109c83967e666a5254814ddaf822cffbda2b6af', backgroundColour: "white", prompt: "Beneficiary", placeholder: this.beneficiariesPlaceHolderText, selectedLabel: this.selectedFilterBeneficiary, selectedValue: this.selectedFilterBeneficiary, options: this.optionsToArray(this.beneficiaryOptions || []), selectionChanged: this.beneficiarySelectionChanged, id: "beneficiaries", "space-below": "2" })), h("div", { key: '213fb6972e212a3ed593445701e55cd9c9df4e70', class: "select-wrapper-3" }, h("biggive-form-field-select", { key: 'c5f0c913deb5b3eb1cdde23cc4f59fd4d856bdc7', backgroundColour: "white", prompt: "Location", placeholder: this.locationsPlaceHolderText, selectedLabel: this.selectedFilterLocation, selectedValue: this.selectedFilterLocation, options: this.optionsToArray(this.locationOptions || []), selectionChanged: this.locationSelectionChanged, id: "locations", "space-below": "2" })), h("div", { key: 'd5ebed141c6f2df713044838802e41d59a99c033', class: "align-right" }, h("biggive-button", { key: '5fe81bf0b04ef44618264aa4dae4b31df44f74c2', label: "Apply filters", onDoButtonClick: this.handleApplyFilterButtonClick })))), h("div", { key: '36cbb004dc2c0b3d6435c853893f279f7cc2a0b4', class: "sort-wrap" }, h("biggive-form-field-select", { key: 'ce1b686a810d10452ef1c2fabf346117cd3990c4', options: sortOptions, prompt: null, "select-style": "underlined", placeholder: this.sortByPlaceholderText, selectedLabel: this.selectedSortByOption, selectedValue: this.getSelectedValue(), selectionChanged: this.sortBySelectionChanged, id: "sort-by" }, h("biggive-form-field-select-option", { key: 'eb016dccffc6b0c63de001ec5e7c15c0215f58f7', value: "amountRaised", label: "Most raised" }), h("biggive-form-field-select-option", { key: '4df7ba1f42d0bb2d1e53c2e40db788bc4862ffed', value: "leastRaised", label: "Least raised" }), h("biggive-form-field-select-option", { key: '6ee1373b12f664ffc9b2d86fbfae71c5ee89c808', value: "matchFundsRemaining", label: "Most funds remaining" }), h("biggive-form-field-select-option", { key: 'e2cf6339701f3f03fd1a1a1ddd55a697db189b64', value: "closeToTarget", label: "Nearest target" }), (this.searchText || '').length > 0 ? h("biggive-form-field-select-option", { value: "Relevance", label: "Relevance" }) : null))), h("div", { key: 'f6e3bf0f207f735c91b9053f43b1a75a6ec33b34', class: "selected-filter-wrap" }, h("div", { key: 'bfdbb504e478326031d977b1af88f2cc74d2f841', class: "selected-filters" }, this.selectedFilterCategory && (h("span", { key: 'bbb0ea75b53fed704a910faa8962bd9f70454b25', class: "button", onClick: () => {
|
|
224
|
-
this.removeFilter('categories');
|
|
225
|
-
} }, this.selectedFilterCategory)), this.selectedFilterBeneficiary && (h("span", { key: '5d391afc2dfd66119892f7b77038125e5703728e', class: "button", onClick: () => {
|
|
226
|
-
this.removeFilter('beneficiaries');
|
|
227
|
-
} }, this.selectedFilterBeneficiary)), this.selectedFilterLocation && (h("span", { key: 'bc7b957d2d76cdfede96921c0a006da77690b3fc', class: "button", onClick: () => {
|
|
228
|
-
this.removeFilter('locations');
|
|
229
|
-
} }, this.selectedFilterLocation))), h("div", { key: 'bf228470ec15507617fa98b20eda6b2584ca359d', class: "clear-all" }, h("a", { key: '5e210df20d0dc4951b98888958d03ff0ed74cf0c', onClick: this.handleClearAll }, "Clear all"))), h("div", { key: '155ef43b9888223f6a480130df3aa47bafd78741', class: "campaign-grid" }, h("slot", { key: 'ee3ff728b4ce9a11e33401236ccee3a581ef39a0', name: "campaign-grid" })))));
|
|
230
|
-
}
|
|
231
|
-
// I'm not sure if I understand the reasoning for own-methods-must-be-private. I made the method below public to unit
|
|
232
|
-
// test it. Maybe the idea is that we should move anything with enough logic to test outside the component class? I
|
|
233
|
-
// can do that if people think it's better.
|
|
234
|
-
//
|
|
235
|
-
// eslint-disable-next-line @stencil-community/own-methods-must-be-private
|
|
236
|
-
getSelectedValue() {
|
|
237
|
-
const sortByOption = this.selectedSortByOption;
|
|
238
|
-
if (sortByOption === undefined) {
|
|
239
|
-
return undefined;
|
|
240
|
-
}
|
|
241
|
-
const sortOptions = this.getSortOptions();
|
|
242
|
-
const selected = sortOptions.filter(option => {
|
|
243
|
-
return option.label.toLowerCase() === sortByOption.toLowerCase();
|
|
244
|
-
})[0];
|
|
245
|
-
return selected === null || selected === void 0 ? void 0 : selected.value;
|
|
246
|
-
}
|
|
247
|
-
getSortOptions() {
|
|
248
|
-
// @ts-ignore - see https://github.com/microsoft/TypeScript/pull/12253#issuecomment-263132208
|
|
249
|
-
const sortOptionKeys = Object.getOwnPropertyNames(sortOptionLabels);
|
|
250
|
-
const relevantOptionKeys = sortOptionKeys.filter(key => key !== 'relevance' || this.hasSearchTerm());
|
|
251
|
-
return relevantOptionKeys.map((key) => ({ value: key, label: sortOptionLabels[key] }));
|
|
252
|
-
}
|
|
253
|
-
hasSearchTerm() {
|
|
254
|
-
return typeof this.searchText === 'string' && this.searchText.length > 0;
|
|
255
|
-
}
|
|
256
|
-
optionsToArray(options) {
|
|
257
|
-
if (typeof options === 'string') {
|
|
258
|
-
options = JSON.parse(options);
|
|
259
|
-
}
|
|
260
|
-
if (Array.isArray(options)) {
|
|
261
|
-
return options.map((option) => ({ value: option, label: option }));
|
|
262
|
-
}
|
|
263
|
-
return Object.entries(options).map(entry => ({ value: entry[0], label: entry[1] }));
|
|
264
|
-
}
|
|
265
|
-
static get is() { return "biggive-campaign-card-filter-grid"; }
|
|
266
|
-
static get encapsulation() { return "shadow"; }
|
|
267
|
-
static get originalStyleUrls() {
|
|
268
|
-
return {
|
|
269
|
-
"$": ["biggive-campaign-card-filter-grid.scss"]
|
|
270
|
-
};
|
|
271
|
-
}
|
|
272
|
-
static get styleUrls() {
|
|
273
|
-
return {
|
|
274
|
-
"$": ["biggive-campaign-card-filter-grid.css"]
|
|
275
|
-
};
|
|
276
|
-
}
|
|
277
|
-
static get properties() {
|
|
278
|
-
return {
|
|
279
|
-
"spaceBelow": {
|
|
280
|
-
"type": "number",
|
|
281
|
-
"mutable": false,
|
|
282
|
-
"complexType": {
|
|
283
|
-
"original": "number",
|
|
284
|
-
"resolved": "number",
|
|
285
|
-
"references": {}
|
|
286
|
-
},
|
|
287
|
-
"required": false,
|
|
288
|
-
"optional": false,
|
|
289
|
-
"docs": {
|
|
290
|
-
"tags": [],
|
|
291
|
-
"text": "Space below component"
|
|
292
|
-
},
|
|
293
|
-
"getter": false,
|
|
294
|
-
"setter": false,
|
|
295
|
-
"reflect": false,
|
|
296
|
-
"attribute": "space-below",
|
|
297
|
-
"defaultValue": "0"
|
|
298
|
-
},
|
|
299
|
-
"intro": {
|
|
300
|
-
"type": "string",
|
|
301
|
-
"mutable": false,
|
|
302
|
-
"complexType": {
|
|
303
|
-
"original": "string",
|
|
304
|
-
"resolved": "string",
|
|
305
|
-
"references": {}
|
|
306
|
-
},
|
|
307
|
-
"required": false,
|
|
308
|
-
"optional": false,
|
|
309
|
-
"docs": {
|
|
310
|
-
"tags": [],
|
|
311
|
-
"text": "Intro"
|
|
312
|
-
},
|
|
313
|
-
"getter": false,
|
|
314
|
-
"setter": false,
|
|
315
|
-
"reflect": false,
|
|
316
|
-
"attribute": "intro",
|
|
317
|
-
"defaultValue": "'Find a charity or project'"
|
|
318
|
-
},
|
|
319
|
-
"searchText": {
|
|
320
|
-
"type": "string",
|
|
321
|
-
"mutable": false,
|
|
322
|
-
"complexType": {
|
|
323
|
-
"original": "string | null",
|
|
324
|
-
"resolved": "null | string",
|
|
325
|
-
"references": {}
|
|
326
|
-
},
|
|
327
|
-
"required": false,
|
|
328
|
-
"optional": false,
|
|
329
|
-
"docs": {
|
|
330
|
-
"tags": [],
|
|
331
|
-
"text": "Optional search text prop. Useful for pre-populating the search field\nwhen the page is loaded with a search term already existing in the URL.\nThis can happen when sharing links, or if a donor goes to a campaign page\nafter searching, and then returns to the search results. In such a case,\nthe search box text will clear, unless we use this prop to populate it on\nrendering. DON-652."
|
|
332
|
-
},
|
|
333
|
-
"getter": false,
|
|
334
|
-
"setter": false,
|
|
335
|
-
"reflect": false,
|
|
336
|
-
"attribute": "search-text",
|
|
337
|
-
"defaultValue": "null"
|
|
338
|
-
},
|
|
339
|
-
"placeholderText": {
|
|
340
|
-
"type": "string",
|
|
341
|
-
"mutable": false,
|
|
342
|
-
"complexType": {
|
|
343
|
-
"original": "string",
|
|
344
|
-
"resolved": "string",
|
|
345
|
-
"references": {}
|
|
346
|
-
},
|
|
347
|
-
"required": false,
|
|
348
|
-
"optional": false,
|
|
349
|
-
"docs": {
|
|
350
|
-
"tags": [],
|
|
351
|
-
"text": "Defines the text displayed as the placeholder in the input field\nbefore the user types anything"
|
|
352
|
-
},
|
|
353
|
-
"getter": false,
|
|
354
|
-
"setter": false,
|
|
355
|
-
"reflect": false,
|
|
356
|
-
"attribute": "placeholder-text",
|
|
357
|
-
"defaultValue": "'Search'"
|
|
358
|
-
},
|
|
359
|
-
"buttonText": {
|
|
360
|
-
"type": "string",
|
|
361
|
-
"mutable": false,
|
|
362
|
-
"complexType": {
|
|
363
|
-
"original": "string",
|
|
364
|
-
"resolved": "string",
|
|
365
|
-
"references": {}
|
|
366
|
-
},
|
|
367
|
-
"required": false,
|
|
368
|
-
"optional": false,
|
|
369
|
-
"docs": {
|
|
370
|
-
"tags": [],
|
|
371
|
-
"text": "Defines the text on the search button"
|
|
372
|
-
},
|
|
373
|
-
"getter": false,
|
|
374
|
-
"setter": false,
|
|
375
|
-
"reflect": false,
|
|
376
|
-
"attribute": "button-text",
|
|
377
|
-
"defaultValue": "'Search'"
|
|
378
|
-
},
|
|
379
|
-
"categoryOptions": {
|
|
380
|
-
"type": "string",
|
|
381
|
-
"mutable": false,
|
|
382
|
-
"complexType": {
|
|
383
|
-
"original": "string | Record<string, string> | string[]",
|
|
384
|
-
"resolved": "string | string[]",
|
|
385
|
-
"references": {
|
|
386
|
-
"Record": {
|
|
387
|
-
"location": "global",
|
|
388
|
-
"id": "global::Record"
|
|
389
|
-
}
|
|
390
|
-
}
|
|
391
|
-
},
|
|
392
|
-
"required": false,
|
|
393
|
-
"optional": false,
|
|
394
|
-
"docs": {
|
|
395
|
-
"tags": [],
|
|
396
|
-
"text": "JSON array of category key/values, or takes a stringified equiavalent (for Storybook)"
|
|
397
|
-
},
|
|
398
|
-
"getter": false,
|
|
399
|
-
"setter": false,
|
|
400
|
-
"reflect": false,
|
|
401
|
-
"attribute": "category-options"
|
|
402
|
-
},
|
|
403
|
-
"beneficiaryOptions": {
|
|
404
|
-
"type": "string",
|
|
405
|
-
"mutable": false,
|
|
406
|
-
"complexType": {
|
|
407
|
-
"original": "string | Record<string, string> | string[]",
|
|
408
|
-
"resolved": "string | string[]",
|
|
409
|
-
"references": {
|
|
410
|
-
"Record": {
|
|
411
|
-
"location": "global",
|
|
412
|
-
"id": "global::Record"
|
|
413
|
-
}
|
|
414
|
-
}
|
|
415
|
-
},
|
|
416
|
-
"required": false,
|
|
417
|
-
"optional": false,
|
|
418
|
-
"docs": {
|
|
419
|
-
"tags": [],
|
|
420
|
-
"text": "JSON array of beneficiary key/values, or takes a stringified equiavalent (for Storybook)"
|
|
421
|
-
},
|
|
422
|
-
"getter": false,
|
|
423
|
-
"setter": false,
|
|
424
|
-
"reflect": false,
|
|
425
|
-
"attribute": "beneficiary-options"
|
|
426
|
-
},
|
|
427
|
-
"locationOptions": {
|
|
428
|
-
"type": "string",
|
|
429
|
-
"mutable": false,
|
|
430
|
-
"complexType": {
|
|
431
|
-
"original": "string | Record<string, string> | string[]",
|
|
432
|
-
"resolved": "string | string[]",
|
|
433
|
-
"references": {
|
|
434
|
-
"Record": {
|
|
435
|
-
"location": "global",
|
|
436
|
-
"id": "global::Record"
|
|
437
|
-
}
|
|
438
|
-
}
|
|
439
|
-
},
|
|
440
|
-
"required": false,
|
|
441
|
-
"optional": false,
|
|
442
|
-
"docs": {
|
|
443
|
-
"tags": [],
|
|
444
|
-
"text": "JSON array of location key/values, or takes a stringified equiavalent (for Storybook)"
|
|
445
|
-
},
|
|
446
|
-
"getter": false,
|
|
447
|
-
"setter": false,
|
|
448
|
-
"reflect": false,
|
|
449
|
-
"attribute": "location-options"
|
|
450
|
-
},
|
|
451
|
-
"selectedSortByOption": {
|
|
452
|
-
"type": "string",
|
|
453
|
-
"mutable": true,
|
|
454
|
-
"complexType": {
|
|
455
|
-
"original": "sortOptionLabel",
|
|
456
|
-
"resolved": "\"Least raised\" | \"Most funds remaining\" | \"Most raised\" | \"Nearest target\" | \"Relevance\"",
|
|
457
|
-
"references": {
|
|
458
|
-
"sortOptionLabel": {
|
|
459
|
-
"location": "local",
|
|
460
|
-
"path": "/home/circleci/components/src/components/biggive-campaign-card-filter-grid/biggive-campaign-card-filter-grid.tsx",
|
|
461
|
-
"id": "src/components/biggive-campaign-card-filter-grid/biggive-campaign-card-filter-grid.tsx::sortOptionLabel"
|
|
462
|
-
}
|
|
463
|
-
}
|
|
464
|
-
},
|
|
465
|
-
"required": false,
|
|
466
|
-
"optional": false,
|
|
467
|
-
"docs": {
|
|
468
|
-
"tags": [],
|
|
469
|
-
"text": "This helps us inject a pre-selected dropdown value from outside of this component.\nThis is especially helpful for the Meta campaign and Explore pages, where searching\nby text wipes out previous sort options and re-uses Relevance, or where one of those\ntwo pages is loaded directly with URL parameters - in such a scenario the dropdown\nshows that it's pre-selected. DON-558."
|
|
470
|
-
},
|
|
471
|
-
"getter": false,
|
|
472
|
-
"setter": false,
|
|
473
|
-
"reflect": false,
|
|
474
|
-
"attribute": "selected-sort-by-option"
|
|
475
|
-
},
|
|
476
|
-
"selectedFilterCategory": {
|
|
477
|
-
"type": "string",
|
|
478
|
-
"mutable": true,
|
|
479
|
-
"complexType": {
|
|
480
|
-
"original": "string | null",
|
|
481
|
-
"resolved": "null | string",
|
|
482
|
-
"references": {}
|
|
483
|
-
},
|
|
484
|
-
"required": false,
|
|
485
|
-
"optional": false,
|
|
486
|
-
"docs": {
|
|
487
|
-
"tags": [],
|
|
488
|
-
"text": "For injecting the chosen category to filter by, as per the comment above for `selectedSortByOption`."
|
|
489
|
-
},
|
|
490
|
-
"getter": false,
|
|
491
|
-
"setter": false,
|
|
492
|
-
"reflect": false,
|
|
493
|
-
"attribute": "selected-filter-category",
|
|
494
|
-
"defaultValue": "null"
|
|
495
|
-
},
|
|
496
|
-
"selectedFilterBeneficiary": {
|
|
497
|
-
"type": "string",
|
|
498
|
-
"mutable": true,
|
|
499
|
-
"complexType": {
|
|
500
|
-
"original": "string | null",
|
|
501
|
-
"resolved": "null | string",
|
|
502
|
-
"references": {}
|
|
503
|
-
},
|
|
504
|
-
"required": false,
|
|
505
|
-
"optional": false,
|
|
506
|
-
"docs": {
|
|
507
|
-
"tags": [],
|
|
508
|
-
"text": "For injecting the chosen beneficiary to filter by, as per the comment above for `selectedSortByOption`."
|
|
509
|
-
},
|
|
510
|
-
"getter": false,
|
|
511
|
-
"setter": false,
|
|
512
|
-
"reflect": false,
|
|
513
|
-
"attribute": "selected-filter-beneficiary",
|
|
514
|
-
"defaultValue": "null"
|
|
515
|
-
},
|
|
516
|
-
"selectedFilterLocation": {
|
|
517
|
-
"type": "string",
|
|
518
|
-
"mutable": true,
|
|
519
|
-
"complexType": {
|
|
520
|
-
"original": "string | null",
|
|
521
|
-
"resolved": "null | string",
|
|
522
|
-
"references": {}
|
|
523
|
-
},
|
|
524
|
-
"required": false,
|
|
525
|
-
"optional": false,
|
|
526
|
-
"docs": {
|
|
527
|
-
"tags": [],
|
|
528
|
-
"text": "For injecting the chosen location to filter by, as per the comment above for `selectedSortByOption`."
|
|
529
|
-
},
|
|
530
|
-
"getter": false,
|
|
531
|
-
"setter": false,
|
|
532
|
-
"reflect": false,
|
|
533
|
-
"attribute": "selected-filter-location",
|
|
534
|
-
"defaultValue": "null"
|
|
535
|
-
},
|
|
536
|
-
"enableSearchByLocation": {
|
|
537
|
-
"type": "boolean",
|
|
538
|
-
"mutable": false,
|
|
539
|
-
"complexType": {
|
|
540
|
-
"original": "boolean",
|
|
541
|
-
"resolved": "boolean",
|
|
542
|
-
"references": {}
|
|
543
|
-
},
|
|
544
|
-
"required": false,
|
|
545
|
-
"optional": false,
|
|
546
|
-
"docs": {
|
|
547
|
-
"tags": [],
|
|
548
|
-
"text": "Allow donors to select campaigns near to themselves."
|
|
549
|
-
},
|
|
550
|
-
"getter": false,
|
|
551
|
-
"setter": false,
|
|
552
|
-
"reflect": false,
|
|
553
|
-
"attribute": "enable-search-by-location",
|
|
554
|
-
"defaultValue": "false"
|
|
555
|
-
},
|
|
556
|
-
"offerNearMeOption": {
|
|
557
|
-
"type": "boolean",
|
|
558
|
-
"mutable": false,
|
|
559
|
-
"complexType": {
|
|
560
|
-
"original": "boolean",
|
|
561
|
-
"resolved": "boolean",
|
|
562
|
-
"references": {}
|
|
563
|
-
},
|
|
564
|
-
"required": false,
|
|
565
|
-
"optional": false,
|
|
566
|
-
"docs": {
|
|
567
|
-
"tags": [],
|
|
568
|
-
"text": "Allow donors to select campaigns/charities near to themselves."
|
|
569
|
-
},
|
|
570
|
-
"getter": false,
|
|
571
|
-
"setter": false,
|
|
572
|
-
"reflect": false,
|
|
573
|
-
"attribute": "offer-near-me-option"
|
|
574
|
-
},
|
|
575
|
-
"fetchingLocation": {
|
|
576
|
-
"type": "boolean",
|
|
577
|
-
"mutable": false,
|
|
578
|
-
"complexType": {
|
|
579
|
-
"original": "boolean",
|
|
580
|
-
"resolved": "boolean",
|
|
581
|
-
"references": {}
|
|
582
|
-
},
|
|
583
|
-
"required": false,
|
|
584
|
-
"optional": false,
|
|
585
|
-
"docs": {
|
|
586
|
-
"tags": [],
|
|
587
|
-
"text": "Incidates that the component is currently fetching the browser location"
|
|
588
|
-
},
|
|
589
|
-
"getter": false,
|
|
590
|
-
"setter": false,
|
|
591
|
-
"reflect": false,
|
|
592
|
-
"attribute": "fetching-location",
|
|
593
|
-
"defaultValue": "false"
|
|
594
|
-
},
|
|
595
|
-
"location": {
|
|
596
|
-
"type": "unknown",
|
|
597
|
-
"mutable": false,
|
|
598
|
-
"complexType": {
|
|
599
|
-
"original": "GeolocationPosition | undefined",
|
|
600
|
-
"resolved": "GeolocationPosition | undefined",
|
|
601
|
-
"references": {
|
|
602
|
-
"GeolocationPosition": {
|
|
603
|
-
"location": "global",
|
|
604
|
-
"id": "global::GeolocationPosition"
|
|
605
|
-
}
|
|
606
|
-
}
|
|
607
|
-
},
|
|
608
|
-
"required": false,
|
|
609
|
-
"optional": false,
|
|
610
|
-
"docs": {
|
|
611
|
-
"tags": [],
|
|
612
|
-
"text": "Selected location around which donor is looking for campaigns"
|
|
613
|
-
},
|
|
614
|
-
"getter": false,
|
|
615
|
-
"setter": false,
|
|
616
|
-
"defaultValue": "undefined"
|
|
617
|
-
}
|
|
618
|
-
};
|
|
619
|
-
}
|
|
620
|
-
static get states() {
|
|
621
|
-
return {
|
|
622
|
-
"filtersApplied": {}
|
|
623
|
-
};
|
|
624
|
-
}
|
|
625
|
-
static get events() {
|
|
626
|
-
return [{
|
|
627
|
-
"method": "doSearchAndFilterUpdate",
|
|
628
|
-
"name": "doSearchAndFilterUpdate",
|
|
629
|
-
"bubbles": true,
|
|
630
|
-
"cancelable": true,
|
|
631
|
-
"composed": true,
|
|
632
|
-
"docs": {
|
|
633
|
-
"tags": [],
|
|
634
|
-
"text": "This event `doSearchAndFilterUpdate` event is emitted and propogates to the parent\ncomponent which handles it"
|
|
635
|
-
},
|
|
636
|
-
"complexType": {
|
|
637
|
-
"original": "{\n searchText: string | null;\n sortBy: string | null;\n filterCategory: string | null;\n filterBeneficiary: string | null;\n filterLocation: string | null;\n }",
|
|
638
|
-
"resolved": "{ searchText: string | null; sortBy: string | null; filterCategory: string | null; filterBeneficiary: string | null; filterLocation: string | null; }",
|
|
639
|
-
"references": {}
|
|
640
|
-
}
|
|
641
|
-
}, {
|
|
642
|
-
"method": "doGetLocationFromBrowser",
|
|
643
|
-
"name": "doGetLocationFromBrowser",
|
|
644
|
-
"bubbles": true,
|
|
645
|
-
"cancelable": true,
|
|
646
|
-
"composed": true,
|
|
647
|
-
"docs": {
|
|
648
|
-
"tags": [],
|
|
649
|
-
"text": "This event `doSearchAndFilterUpdate` event is emitted and propogates to the parent\ncomponent which handles it"
|
|
650
|
-
},
|
|
651
|
-
"complexType": {
|
|
652
|
-
"original": "void",
|
|
653
|
-
"resolved": "void",
|
|
654
|
-
"references": {}
|
|
655
|
-
}
|
|
656
|
-
}];
|
|
657
|
-
}
|
|
658
|
-
static get methods() {
|
|
659
|
-
return {
|
|
660
|
-
"unfocusInputs": {
|
|
661
|
-
"complexType": {
|
|
662
|
-
"signature": "() => Promise<void>",
|
|
663
|
-
"parameters": [],
|
|
664
|
-
"references": {
|
|
665
|
-
"Promise": {
|
|
666
|
-
"location": "global",
|
|
667
|
-
"id": "global::Promise"
|
|
668
|
-
}
|
|
669
|
-
},
|
|
670
|
-
"return": "Promise<void>"
|
|
671
|
-
},
|
|
672
|
-
"docs": {
|
|
673
|
-
"text": "Typically on non-negligible scroll away from the search area.",
|
|
674
|
-
"tags": []
|
|
675
|
-
}
|
|
676
|
-
}
|
|
677
|
-
};
|
|
678
|
-
}
|
|
679
|
-
static get elementRef() { return "el"; }
|
|
680
|
-
}
|