@biggive/components 202311091230.0.0 → 202311201334.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.
@@ -813,22 +813,17 @@ export namespace Components {
813
813
  "teaserColour": string;
814
814
  }
815
815
  interface BiggiveMainMenu {
816
- "blogUrlPrefix": string | undefined;
816
+ "blogUrlPrefix": string;
817
817
  "closeMobileMenuFromOutside": () => Promise<void>;
818
818
  /**
819
819
  * E.g. "https://donate.thebiggive.org.uk" for production (currently)
820
820
  */
821
- "donateUrlPrefix": string | undefined;
822
- "experienceUrlPrefix": string | undefined;
821
+ "donateUrlPrefix": string;
822
+ "experienceUrlPrefix": string;
823
823
  /**
824
824
  * Whether the current user is logged in (i.e. is assumed to have a valid JWT). They get links to some extra content if they are.
825
825
  */
826
826
  "isLoggedIn": boolean;
827
- "logoUrl": string;
828
- /**
829
- * If true, content passed in via slots will be ignored, and this will just render a hard-coded menu that's the same everywhere. When BG2-2286 is done this will be permantly true and the prop will be deleted.
830
- */
831
- "usePresetMenuContent": boolean;
832
827
  }
833
828
  interface BiggiveMiscIcon {
834
829
  /**
@@ -2363,21 +2358,16 @@ declare namespace LocalJSX {
2363
2358
  "teaserColour"?: string;
2364
2359
  }
2365
2360
  interface BiggiveMainMenu {
2366
- "blogUrlPrefix"?: string | undefined;
2361
+ "blogUrlPrefix"?: string;
2367
2362
  /**
2368
2363
  * E.g. "https://donate.thebiggive.org.uk" for production (currently)
2369
2364
  */
2370
- "donateUrlPrefix"?: string | undefined;
2371
- "experienceUrlPrefix"?: string | undefined;
2365
+ "donateUrlPrefix"?: string;
2366
+ "experienceUrlPrefix"?: string;
2372
2367
  /**
2373
2368
  * Whether the current user is logged in (i.e. is assumed to have a valid JWT). They get links to some extra content if they are.
2374
2369
  */
2375
2370
  "isLoggedIn"?: boolean;
2376
- "logoUrl"?: string;
2377
- /**
2378
- * If true, content passed in via slots will be ignored, and this will just render a hard-coded menu that's the same everywhere. When BG2-2286 is done this will be permantly true and the prop will be deleted.
2379
- */
2380
- "usePresetMenuContent"?: boolean;
2381
2371
  }
2382
2372
  interface BiggiveMiscIcon {
2383
2373
  /**
package/hydrate/index.js CHANGED
@@ -8025,47 +8025,14 @@ class BiggiveMainMenu {
8025
8025
  this.donateUrlPrefix = undefined;
8026
8026
  this.experienceUrlPrefix = undefined;
8027
8027
  this.isLoggedIn = false;
8028
- this.logoUrl = '/';
8029
- this.usePresetMenuContent = false;
8030
8028
  }
8031
8029
  async closeMobileMenuFromOutside() {
8032
8030
  const mobileMenu = this.host.shadowRoot.querySelector('.nav-links');
8033
8031
  mobileMenu.style.left = '-100%';
8034
8032
  }
8035
- appendPrimaryNavigationLinks() {
8036
- // get the slotted 'nav-primary' node
8037
- const node = this.host.querySelector(`[slot="nav-primary"]`);
8038
- if (node !== null) {
8039
- // Slot the menu
8040
- this.host.shadowRoot.querySelector('#nav-primary').appendChild(node);
8041
- }
8042
- }
8043
8033
  noNav(event) {
8044
8034
  event.preventDefault();
8045
8035
  }
8046
- /**
8047
- * Slots the 'nav-secondary' slot into the top right corner of the blue nav bar.
8048
- * Also slots the 'nav-secondary' into the normal menu items when in mobile mode.
8049
- * This is because the blue bar disappears in mobile mode, so we need the items
8050
- * init to still be seen, hence they're auto-added to the menu.
8051
- */
8052
- appendNavSecondaryLinks() {
8053
- // get the slotted 'nav-secondary' node
8054
- const node = this.host.querySelector(`[slot="nav-secondary"]`);
8055
- if (node !== null) {
8056
- // add to blue bar
8057
- this.host.shadowRoot.querySelector('.nav-secondary').appendChild(node);
8058
- // we must make a deep clone of the node above, because each node is only
8059
- // injectable / slottable into one place, but we need to slot into two places.
8060
- const nodeClone = node.cloneNode(true);
8061
- // add to main menu links, but only viewable in mobile mode. The css class
8062
- // hides them in desktop!
8063
- nodeClone.querySelectorAll('li').forEach(child => {
8064
- child.classList.add('mobile-only');
8065
- this.host.shadowRoot.querySelector('.links').appendChild(child);
8066
- });
8067
- }
8068
- }
8069
8036
  setHeaderSize() {
8070
8037
  // Some resize edge cases lead Firefox, and maybe others, to go haywire and get a host offset
8071
8038
  // height of millions of pixels, presumably due to a layout logic loop. So for as long as we use
@@ -8106,18 +8073,23 @@ class BiggiveMainMenu {
8106
8073
  subSubMenuElement.classList.toggle('display-sub-menu');
8107
8074
  };
8108
8075
  });
8109
- if (!this.usePresetMenuContent) {
8110
- this.appendPrimaryNavigationLinks();
8111
- this.appendNavSecondaryLinks();
8112
- }
8076
+ }
8077
+ getSecondaryNavLinks() {
8078
+ return (hAsync("ul", null, this.isLoggedIn && (hAsync("li", null, hAsync("a", { href: makeURL('Donate', this.donateUrlPrefix, 'my-account') }, "My Account"))), hAsync("li", null, hAsync("a", { href: makeURL('Experience', this.experienceUrlPrefix, 's/contact-us') }, "Contact Us")), hAsync("li", null, hAsync("a", { href: makeURL('Experience', this.experienceUrlPrefix, 'charities/s/login') }, "Charity Login"))));
8113
8079
  }
8114
8080
  render() {
8115
- const slotBasedMenu = () => (hAsync(Host, null, hAsync("div", { class: "row row-top" }, hAsync("div", { class: "social-icon-wrap" }, hAsync("slot", { name: "social-icons" })), hAsync("div", { class: "nav-secondary" })), hAsync("nav", { role: "navigation", "aria-label": "Main Menu" }, hAsync("div", { class: "navbar" }, hAsync("div", { class: "logo" }, hAsync("a", { href: this.logoUrl, "aria-label": "Home" }, hAsync("svg", { version: "1.1", x: "0px", y: "0px", viewBox: "0 0 140.9 30" }, hAsync("path", { d: "M51.9,6.1c-1.7,0-3.1-1.4-3.1-3s1.4-3,3.1-3C53.6,0,55,1.4,55,3S53.6,6.1,51.9,6.1z M49.3,23.8h5V7.7h-5V23.8z M68.5,7.7v1 c-0.8-0.7-2.3-1.4-4.1-1.4c-4.5,0-8.2,3.2-8.2,7.9c0,4.7,3.7,7.9,8.2,7.9c1.8,0,3.4-0.5,4.1-1.4v0.9c0,2.1-1.9,3.1-4.4,3.1 c-2.2,0-4-0.5-5.8-1.4V29c2.1,0.7,4.4,1,6,1c5,0,9.2-2,9.2-7.3v-15L68.5,7.7L68.5,7.7z M68.5,17.2c-0.7,1-1.9,1.4-3.2,1.4 c-2.1,0-3.8-1.2-3.8-3.4c0-2.2,1.7-3.4,3.8-3.4c1.3,0,2.5,0.6,3.2,1.5V17.2z M88.1,24.2c4,0,6.4-0.7,8.5-2V10h-11v4.7h5.8v4.1 c-0.8,0.2-1.8,0.4-3.2,0.4c-4.9,0-7.3-3.2-7.3-6.8c0-3.7,2.8-6.8,8-6.8c2.2,0,4.3,0.6,5.8,1.4V1.7c-1.5-0.6-3.4-1.1-6.1-1.1 c-7.6,0-13,5.3-13,11.8C75.5,19.1,80.4,24.2,88.1,24.2z M101.4,6.1c-1.7,0-3.1-1.4-3.1-3s1.4-3,3.1-3c1.8,0,3.2,1.4,3.2,3 S103.1,6.1,101.4,6.1z M98.8,23.8h5V7.7h-5V23.8z M115.1,15l-4.3-7.2H105l10.1,16.4l10.1-16.4h-5.8L115.1,15z M129.3,16.9h11.6 c0.1-7-4.2-9.5-8.4-9.5c-4.5,0-8.5,2.6-8.6,8.4c0,5.6,4.1,8.4,9.1,8.4c2.2,0,4.4-0.3,6.4-1.3v-4.4c-2.5,1.4-4.1,1.4-5.6,1.4 C131.7,19.8,129.5,19.2,129.3,16.9z M132.5,11.1c1.5,0,2.8,0.7,3,2.7h-6.2C129.6,11.9,131,11.1,132.5,11.1z M43.5,11.4 c1.2-1,1.8-2.4,1.8-4c0-3.1-3-6.3-7.3-6.3h-8v22.8h10.4c4.1,0,7.2-3,7.2-6.8C47.5,14.8,46.5,12.3,43.5,11.4z M35.2,5.7h2.4 C39,5.7,40,6.8,40,8c0,1.2-1,2.2-2.5,2.2h-2.4V5.7z M39.9,19.2h-4.7v-4.6h4.7c1.4,0,2.5,1,2.5,2.3C42.4,18.1,41.3,19.2,39.9,19.2z" }), hAsync("path", { d: "M13.5,1l13.5,23H0L13.5,1z" })))), hAsync("biggive-misc-icon", { class: "bx bx-menu", "background-colour": "white", "icon-colour": "black", icon: "MenuOpen", onClick: this.openMobileMenu }), hAsync("div", { class: "nav-links" }, hAsync("div", { class: "sidebar-logo" }, hAsync("a", { href: this.logoUrl, "aria-label": "Home" }, hAsync("svg", { version: "1.1", x: "0px", y: "0px", viewBox: "0 0 140.9 30", id: "mobileLogo" }, hAsync("path", { d: "M51.9,6.1c-1.7,0-3.1-1.4-3.1-3s1.4-3,3.1-3C53.6,0,55,1.4,55,3S53.6,6.1,51.9,6.1z M49.3,23.8h5V7.7h-5V23.8z M68.5,7.7v1 c-0.8-0.7-2.3-1.4-4.1-1.4c-4.5,0-8.2,3.2-8.2,7.9c0,4.7,3.7,7.9,8.2,7.9c1.8,0,3.4-0.5,4.1-1.4v0.9c0,2.1-1.9,3.1-4.4,3.1 c-2.2,0-4-0.5-5.8-1.4V29c2.1,0.7,4.4,1,6,1c5,0,9.2-2,9.2-7.3v-15L68.5,7.7L68.5,7.7z M68.5,17.2c-0.7,1-1.9,1.4-3.2,1.4 c-2.1,0-3.8-1.2-3.8-3.4c0-2.2,1.7-3.4,3.8-3.4c1.3,0,2.5,0.6,3.2,1.5V17.2z M88.1,24.2c4,0,6.4-0.7,8.5-2V10h-11v4.7h5.8v4.1 c-0.8,0.2-1.8,0.4-3.2,0.4c-4.9,0-7.3-3.2-7.3-6.8c0-3.7,2.8-6.8,8-6.8c2.2,0,4.3,0.6,5.8,1.4V1.7c-1.5-0.6-3.4-1.1-6.1-1.1 c-7.6,0-13,5.3-13,11.8C75.5,19.1,80.4,24.2,88.1,24.2z M101.4,6.1c-1.7,0-3.1-1.4-3.1-3s1.4-3,3.1-3c1.8,0,3.2,1.4,3.2,3 S103.1,6.1,101.4,6.1z M98.8,23.8h5V7.7h-5V23.8z M115.1,15l-4.3-7.2H105l10.1,16.4l10.1-16.4h-5.8L115.1,15z M129.3,16.9h11.6 c0.1-7-4.2-9.5-8.4-9.5c-4.5,0-8.5,2.6-8.6,8.4c0,5.6,4.1,8.4,9.1,8.4c2.2,0,4.4-0.3,6.4-1.3v-4.4c-2.5,1.4-4.1,1.4-5.6,1.4 C131.7,19.8,129.5,19.2,129.3,16.9z M132.5,11.1c1.5,0,2.8,0.7,3,2.7h-6.2C129.6,11.9,131,11.1,132.5,11.1z M43.5,11.4 c1.2-1,1.8-2.4,1.8-4c0-3.1-3-6.3-7.3-6.3h-8v22.8h10.4c4.1,0,7.2-3,7.2-6.8C47.5,14.8,46.5,12.3,43.5,11.4z M35.2,5.7h2.4 C39,5.7,40,6.8,40,8c0,1.2-1,2.2-2.5,2.2h-2.4V5.7z M39.9,19.2h-4.7v-4.6h4.7c1.4,0,2.5,1,2.5,2.3C42.4,18.1,41.3,19.2,39.9,19.2z" }), hAsync("path", { d: "M13.5,1l13.5,23H0L13.5,1z" }))), hAsync("biggive-misc-icon", { class: "bx bx-x", "background-colour": "transparent", "icon-colour": "black", icon: "MenuClose", onClick: this.closeMobileMenu })), hAsync("div", { id: "nav-primary" }), hAsync("div", { class: "mobile-social-icon-wrap mobile-only" }, hAsync("slot", { name: "mobile-social-icons" })))))));
8116
- const presetContentMenu = () => {
8117
- const secondaryNavLinks = (hAsync("ul", null, this.isLoggedIn && (hAsync("li", null, hAsync("a", { href: makeURL('Donate', this.donateUrlPrefix, 'my-account') }, "My Account"))), hAsync("li", null, hAsync("a", { href: makeURL('Experience', this.experienceUrlPrefix, 's/contact-us') }, "Contact Us")), hAsync("li", null, hAsync("a", { href: makeURL('Experience', this.experienceUrlPrefix, 'charities/s/login') }, "Charity Login"))));
8118
- return (hAsync(Host, null, hAsync("div", { class: "row row-top" }, hAsync("div", { class: "social-icon-wrap" }, hAsync("biggive-social-icon", { service: "Facebook", url: "https://www.facebook.com/BigGive.org", "background-colour": "tertiary", "icon-colour": "black" }), hAsync("biggive-social-icon", { service: "Twitter", url: "https://twitter.com/BigGive", "background-colour": "tertiary", "icon-colour": "black" }), hAsync("biggive-social-icon", { service: "LinkedIn", url: "https://uk.linkedin.com/company/big-give", "background-colour": "tertiary", "icon-colour": "black" }), hAsync("biggive-social-icon", { service: "YouTube", url: "https://www.youtube.com/channel/UC9_wH1aaTuZurJ-F9R8GDcA", "background-colour": "tertiary", "icon-colour": "black" }), hAsync("biggive-social-icon", { service: "Instagram", url: "https://www.instagram.com/biggiveorg", "background-colour": "tertiary", "icon-colour": "black" })), hAsync("div", { class: "nav-secondary" }, secondaryNavLinks)), hAsync("nav", { role: "navigation", "aria-label": "Main Menu" }, hAsync("div", { class: "navbar" }, hAsync("div", { class: "logo" }, hAsync("a", { href: this.donateUrlPrefix, "aria-label": "Home" }, hAsync("svg", { version: "1.1", x: "0px", y: "0px", viewBox: "0 0 140.9 30" }, hAsync("path", { d: "M51.9,6.1c-1.7,0-3.1-1.4-3.1-3s1.4-3,3.1-3C53.6,0,55,1.4,55,3S53.6,6.1,51.9,6.1z M49.3,23.8h5V7.7h-5V23.8z M68.5,7.7v1 c-0.8-0.7-2.3-1.4-4.1-1.4c-4.5,0-8.2,3.2-8.2,7.9c0,4.7,3.7,7.9,8.2,7.9c1.8,0,3.4-0.5,4.1-1.4v0.9c0,2.1-1.9,3.1-4.4,3.1 c-2.2,0-4-0.5-5.8-1.4V29c2.1,0.7,4.4,1,6,1c5,0,9.2-2,9.2-7.3v-15L68.5,7.7L68.5,7.7z M68.5,17.2c-0.7,1-1.9,1.4-3.2,1.4 c-2.1,0-3.8-1.2-3.8-3.4c0-2.2,1.7-3.4,3.8-3.4c1.3,0,2.5,0.6,3.2,1.5V17.2z M88.1,24.2c4,0,6.4-0.7,8.5-2V10h-11v4.7h5.8v4.1 c-0.8,0.2-1.8,0.4-3.2,0.4c-4.9,0-7.3-3.2-7.3-6.8c0-3.7,2.8-6.8,8-6.8c2.2,0,4.3,0.6,5.8,1.4V1.7c-1.5-0.6-3.4-1.1-6.1-1.1 c-7.6,0-13,5.3-13,11.8C75.5,19.1,80.4,24.2,88.1,24.2z M101.4,6.1c-1.7,0-3.1-1.4-3.1-3s1.4-3,3.1-3c1.8,0,3.2,1.4,3.2,3 S103.1,6.1,101.4,6.1z M98.8,23.8h5V7.7h-5V23.8z M115.1,15l-4.3-7.2H105l10.1,16.4l10.1-16.4h-5.8L115.1,15z M129.3,16.9h11.6 c0.1-7-4.2-9.5-8.4-9.5c-4.5,0-8.5,2.6-8.6,8.4c0,5.6,4.1,8.4,9.1,8.4c2.2,0,4.4-0.3,6.4-1.3v-4.4c-2.5,1.4-4.1,1.4-5.6,1.4 C131.7,19.8,129.5,19.2,129.3,16.9z M132.5,11.1c1.5,0,2.8,0.7,3,2.7h-6.2C129.6,11.9,131,11.1,132.5,11.1z M43.5,11.4 c1.2-1,1.8-2.4,1.8-4c0-3.1-3-6.3-7.3-6.3h-8v22.8h10.4c4.1,0,7.2-3,7.2-6.8C47.5,14.8,46.5,12.3,43.5,11.4z M35.2,5.7h2.4 C39,5.7,40,6.8,40,8c0,1.2-1,2.2-2.5,2.2h-2.4V5.7z M39.9,19.2h-4.7v-4.6h4.7c1.4,0,2.5,1,2.5,2.3C42.4,18.1,41.3,19.2,39.9,19.2z" }), hAsync("path", { d: "M13.5,1l13.5,23H0L13.5,1z" })))), hAsync("biggive-misc-icon", { class: "bx bx-menu", "background-colour": "white", "icon-colour": "black", icon: "MenuOpen", onClick: this.openMobileMenu }), hAsync("div", { class: "nav-links" }, hAsync("div", { class: "sidebar-logo" }, hAsync("a", { href: this.donateUrlPrefix, "aria-label": "Home" }, hAsync("svg", { version: "1.1", x: "0px", y: "0px", viewBox: "0 0 140.9 30", id: "mobileLogo" }, hAsync("path", { d: "M51.9,6.1c-1.7,0-3.1-1.4-3.1-3s1.4-3,3.1-3C53.6,0,55,1.4,55,3S53.6,6.1,51.9,6.1z M49.3,23.8h5V7.7h-5V23.8z M68.5,7.7v1 c-0.8-0.7-2.3-1.4-4.1-1.4c-4.5,0-8.2,3.2-8.2,7.9c0,4.7,3.7,7.9,8.2,7.9c1.8,0,3.4-0.5,4.1-1.4v0.9c0,2.1-1.9,3.1-4.4,3.1 c-2.2,0-4-0.5-5.8-1.4V29c2.1,0.7,4.4,1,6,1c5,0,9.2-2,9.2-7.3v-15L68.5,7.7L68.5,7.7z M68.5,17.2c-0.7,1-1.9,1.4-3.2,1.4 c-2.1,0-3.8-1.2-3.8-3.4c0-2.2,1.7-3.4,3.8-3.4c1.3,0,2.5,0.6,3.2,1.5V17.2z M88.1,24.2c4,0,6.4-0.7,8.5-2V10h-11v4.7h5.8v4.1 c-0.8,0.2-1.8,0.4-3.2,0.4c-4.9,0-7.3-3.2-7.3-6.8c0-3.7,2.8-6.8,8-6.8c2.2,0,4.3,0.6,5.8,1.4V1.7c-1.5-0.6-3.4-1.1-6.1-1.1 c-7.6,0-13,5.3-13,11.8C75.5,19.1,80.4,24.2,88.1,24.2z M101.4,6.1c-1.7,0-3.1-1.4-3.1-3s1.4-3,3.1-3c1.8,0,3.2,1.4,3.2,3 S103.1,6.1,101.4,6.1z M98.8,23.8h5V7.7h-5V23.8z M115.1,15l-4.3-7.2H105l10.1,16.4l10.1-16.4h-5.8L115.1,15z M129.3,16.9h11.6 c0.1-7-4.2-9.5-8.4-9.5c-4.5,0-8.5,2.6-8.6,8.4c0,5.6,4.1,8.4,9.1,8.4c2.2,0,4.4-0.3,6.4-1.3v-4.4c-2.5,1.4-4.1,1.4-5.6,1.4 C131.7,19.8,129.5,19.2,129.3,16.9z M132.5,11.1c1.5,0,2.8,0.7,3,2.7h-6.2C129.6,11.9,131,11.1,132.5,11.1z M43.5,11.4 c1.2-1,1.8-2.4,1.8-4c0-3.1-3-6.3-7.3-6.3h-8v22.8h10.4c4.1,0,7.2-3,7.2-6.8C47.5,14.8,46.5,12.3,43.5,11.4z M35.2,5.7h2.4 C39,5.7,40,6.8,40,8c0,1.2-1,2.2-2.5,2.2h-2.4V5.7z M39.9,19.2h-4.7v-4.6h4.7c1.4,0,2.5,1,2.5,2.3C42.4,18.1,41.3,19.2,39.9,19.2z" }), hAsync("path", { d: "M13.5,1l13.5,23H0L13.5,1z" }))), hAsync("biggive-misc-icon", { class: "bx bx-x", "background-colour": "transparent", "icon-colour": "black", icon: "MenuClose", onClick: this.closeMobileMenu })), hAsync("div", { id: "nav-primary" }, hAsync("ul", { class: "links", slot: "nav-primary" }, hAsync("li", null, hAsync("a", { href: makeURL('Donate', this.donateUrlPrefix, 'explore') }, "Explore Campaigns")), hAsync("li", null, hAsync("a", { href: makeURL('Blog', this.blogUrlPrefix, 'charities') }, "For Charities")), hAsync("li", null, hAsync("a", { href: makeURL('Blog', this.blogUrlPrefix, 'funders') }, "For Funders")), hAsync("li", null, hAsync("a", { onClick: this.noNav }, "Match Funding", hAsync("biggive-misc-icon", { class: "bx bxs-chevron-down sub-menu-arrow arrow", "background-colour": "white", "icon-colour": "black", icon: "CaretRight" })), hAsync("ul", { class: "sub-menu" }, hAsync("li", null, hAsync("a", { href: makeURL('Blog', this.blogUrlPrefix, 'match-funding-explained') }, "Match Funding Explained")), hAsync("li", null, hAsync("a", { href: makeURL('Blog', this.blogUrlPrefix, 'impact') }, "Match Funding Impact")), hAsync("li", { class: "more" }, hAsync("a", { onClick: this.noNav }, "Match Funding Opportunities", hAsync("biggive-misc-icon", { class: "bx bxs-chevron-down sub-sub-menu-arrow arrow", "background-colour": "white", "icon-colour": "black", icon: "CaretRight" })), hAsync("ul", { class: "sub-sub-menu" }, hAsync("li", null, hAsync("a", { href: makeURL('Blog', this.blogUrlPrefix, 'christmas-challenge'), class: "icon-christmas" }, "Christmas Challenge")), hAsync("li", null, hAsync("a", { href: makeURL('Blog', this.blogUrlPrefix, 'champions-for-children'), class: "icon-children" }, "Champions for Children")), hAsync("li", null, hAsync("a", { href: makeURL('Blog', this.blogUrlPrefix, 'green-match-fund'), class: "icon-green-match" }, "Green Match Fund")), hAsync("li", null, hAsync("a", { href: makeURL('Blog', this.blogUrlPrefix, 'women-girls-match-fund'), class: "icon-women-girls" }, "Women & Girls Match Fund")), hAsync("li", null, hAsync("a", { href: makeURL('Blog', this.blogUrlPrefix, 'kind2mind/'), class: "icon-mental-health" }, "Kind\u00B2Mind")), hAsync("li", null, hAsync("a", { href: makeURL('Blog', this.blogUrlPrefix, 'artsforimpact/'), class: "icon-arts-impact" }, "Arts for Impact")), hAsync("li", null, hAsync("a", { href: makeURL('Blog', this.blogUrlPrefix, 'anchor-match-fund/'), class: "icon-anchor-match" }, "Anchor Match Fund")), hAsync("li", null, hAsync("a", { href: makeURL('Blog', this.blogUrlPrefix, 'emergency-campaigns/'), class: "icon-emergency" }, "Emergency Match Fund")))), hAsync("li", null, hAsync("a", { href: makeURL('Blog', this.blogUrlPrefix, 'run-your-own-campaign/)') }, "Run your match funding campaign")))), hAsync("li", null, hAsync("a", { onClick: this.noNav }, "About Us", hAsync("biggive-misc-icon", { class: "bx bxs-chevron-down sub-menu-arrow arrow", "background-colour": "white", "icon-colour": "black", icon: "CaretRight" })), hAsync("ul", { class: "sub-menu" }, hAsync("li", null, hAsync("a", { href: makeURL('Blog', this.blogUrlPrefix, 'our-people') }, "Our People")), hAsync("li", null, hAsync("a", { href: makeURL('Blog', this.blogUrlPrefix, 'our-story') }, "Our Story")), hAsync("li", null, hAsync("a", { href: makeURL('Blog', this.blogUrlPrefix, 'donation-funds') }, "Donate by Bank Transfer")), hAsync("li", null, hAsync("a", { href: makeURL('Blog', this.blogUrlPrefix, 'our-fees') }, "Our Fees")), hAsync("li", null, hAsync("a", { href: makeURL('Blog', this.blogUrlPrefix, 'faqs') }, "FAQs")))), hAsync("li", null, hAsync("a", { onClick: this.noNav }, "Resources", hAsync("biggive-misc-icon", { class: "bx bxs-chevron-down sub-menu-arrow arrow", "background-colour": "white", "icon-colour": "black", icon: "CaretRight" })), hAsync("ul", { class: "sub-menu" }, hAsync("li", null, hAsync("a", { href: makeURL('Blog', this.blogUrlPrefix, 'case-studies') }, "Case Studies")), hAsync("li", null, hAsync("a", { href: makeURL('Blog', this.blogUrlPrefix, 'blog') }, "Blog")), hAsync("li", null, hAsync("a", { href: makeURL('Blog', this.blogUrlPrefix, 'reports-insights') }, "Reports & Insights")), hAsync("li", null, hAsync("a", { href: makeURL('Blog', this.blogUrlPrefix, 'press') }, "Press"))))), hAsync("div", { class: "mobile-only" }, secondaryNavLinks)), hAsync("div", { class: "mobile-social-icon-wrap mobile-only" }, hAsync("biggive-social-icon", { service: "Facebook", url: "https://www.facebook.com/BigGive.org", "background-colour": "tertiary", "icon-colour": "black" }), hAsync("biggive-social-icon", { service: "Twitter", url: "https://twitter.com/BigGive", "background-colour": "tertiary", "icon-colour": "black" }), hAsync("biggive-social-icon", { service: "LinkedIn", url: "https://uk.linkedin.com/company/big-give", "background-colour": "tertiary", "icon-colour": "black" }), hAsync("biggive-social-icon", { service: "YouTube", url: "https://www.youtube.com/channel/UC9_wH1aaTuZurJ-F9R8GDcA", "background-colour": "tertiary", "icon-colour": "black" }), hAsync("biggive-social-icon", { service: "Instagram", url: "https://www.instagram.com/biggiveorg", "background-colour": "tertiary", "icon-colour": "black" })))))));
8119
- };
8120
- return this.usePresetMenuContent ? presetContentMenu() : slotBasedMenu();
8081
+ /** ten minutes in advance to account for a *very* slow browser following the link and/or clock skew.
8082
+ * There's not really any harm in doing this early unless its soo early that people start sharing the noredirect link more than we'd like.
8083
+ */
8084
+ const CCOpenDate = new Date('2023-11-27T23:50:00+00:00');
8085
+ /**
8086
+ * Ten minutes late. Again doing this late doesn't hurt.
8087
+ */
8088
+ const CCCloseDate = new Date('2023-12-05T12:10:00+00:00');
8089
+ const now = new Date();
8090
+ const ccIsOpenNowIsh = now > CCOpenDate && now < CCCloseDate;
8091
+ const homePageLink = ccIsOpenNowIsh ? '/?noredirect' : '/';
8092
+ return (hAsync(Host, null, hAsync("div", { class: "row row-top" }, hAsync("div", { class: "social-icon-wrap" }, hAsync("biggive-social-icon", { service: "Facebook", url: "https://www.facebook.com/BigGive.org", "background-colour": "tertiary", "icon-colour": "black" }), hAsync("biggive-social-icon", { service: "Twitter", url: "https://twitter.com/BigGive", "background-colour": "tertiary", "icon-colour": "black" }), hAsync("biggive-social-icon", { service: "LinkedIn", url: "https://uk.linkedin.com/company/big-give", "background-colour": "tertiary", "icon-colour": "black" }), hAsync("biggive-social-icon", { service: "YouTube", url: "https://www.youtube.com/channel/UC9_wH1aaTuZurJ-F9R8GDcA", "background-colour": "tertiary", "icon-colour": "black" }), hAsync("biggive-social-icon", { service: "Instagram", url: "https://www.instagram.com/biggiveorg", "background-colour": "tertiary", "icon-colour": "black" })), hAsync("div", { class: "nav-secondary" }, this.getSecondaryNavLinks())), hAsync("nav", { role: "navigation", "aria-label": "Main Menu" }, hAsync("div", { class: "navbar" }, hAsync("div", { class: "logo" }, hAsync("a", { href: this.donateUrlPrefix + homePageLink, "aria-label": "Home" }, hAsync("svg", { version: "1.1", x: "0px", y: "0px", viewBox: "0 0 140.9 30" }, hAsync("path", { d: "M51.9,6.1c-1.7,0-3.1-1.4-3.1-3s1.4-3,3.1-3C53.6,0,55,1.4,55,3S53.6,6.1,51.9,6.1z M49.3,23.8h5V7.7h-5V23.8z M68.5,7.7v1 c-0.8-0.7-2.3-1.4-4.1-1.4c-4.5,0-8.2,3.2-8.2,7.9c0,4.7,3.7,7.9,8.2,7.9c1.8,0,3.4-0.5,4.1-1.4v0.9c0,2.1-1.9,3.1-4.4,3.1 c-2.2,0-4-0.5-5.8-1.4V29c2.1,0.7,4.4,1,6,1c5,0,9.2-2,9.2-7.3v-15L68.5,7.7L68.5,7.7z M68.5,17.2c-0.7,1-1.9,1.4-3.2,1.4 c-2.1,0-3.8-1.2-3.8-3.4c0-2.2,1.7-3.4,3.8-3.4c1.3,0,2.5,0.6,3.2,1.5V17.2z M88.1,24.2c4,0,6.4-0.7,8.5-2V10h-11v4.7h5.8v4.1 c-0.8,0.2-1.8,0.4-3.2,0.4c-4.9,0-7.3-3.2-7.3-6.8c0-3.7,2.8-6.8,8-6.8c2.2,0,4.3,0.6,5.8,1.4V1.7c-1.5-0.6-3.4-1.1-6.1-1.1 c-7.6,0-13,5.3-13,11.8C75.5,19.1,80.4,24.2,88.1,24.2z M101.4,6.1c-1.7,0-3.1-1.4-3.1-3s1.4-3,3.1-3c1.8,0,3.2,1.4,3.2,3 S103.1,6.1,101.4,6.1z M98.8,23.8h5V7.7h-5V23.8z M115.1,15l-4.3-7.2H105l10.1,16.4l10.1-16.4h-5.8L115.1,15z M129.3,16.9h11.6 c0.1-7-4.2-9.5-8.4-9.5c-4.5,0-8.5,2.6-8.6,8.4c0,5.6,4.1,8.4,9.1,8.4c2.2,0,4.4-0.3,6.4-1.3v-4.4c-2.5,1.4-4.1,1.4-5.6,1.4 C131.7,19.8,129.5,19.2,129.3,16.9z M132.5,11.1c1.5,0,2.8,0.7,3,2.7h-6.2C129.6,11.9,131,11.1,132.5,11.1z M43.5,11.4 c1.2-1,1.8-2.4,1.8-4c0-3.1-3-6.3-7.3-6.3h-8v22.8h10.4c4.1,0,7.2-3,7.2-6.8C47.5,14.8,46.5,12.3,43.5,11.4z M35.2,5.7h2.4 C39,5.7,40,6.8,40,8c0,1.2-1,2.2-2.5,2.2h-2.4V5.7z M39.9,19.2h-4.7v-4.6h4.7c1.4,0,2.5,1,2.5,2.3C42.4,18.1,41.3,19.2,39.9,19.2z" }), hAsync("path", { d: "M13.5,1l13.5,23H0L13.5,1z" })))), hAsync("biggive-misc-icon", { class: "bx bx-menu", "background-colour": "white", "icon-colour": "black", icon: "MenuOpen", onClick: this.openMobileMenu }), hAsync("div", { class: "nav-links" }, hAsync("div", { class: "sidebar-logo" }, hAsync("a", { href: this.donateUrlPrefix + homePageLink, "aria-label": "Home" }, hAsync("svg", { version: "1.1", x: "0px", y: "0px", viewBox: "0 0 140.9 30", id: "mobileLogo" }, hAsync("path", { d: "M51.9,6.1c-1.7,0-3.1-1.4-3.1-3s1.4-3,3.1-3C53.6,0,55,1.4,55,3S53.6,6.1,51.9,6.1z M49.3,23.8h5V7.7h-5V23.8z M68.5,7.7v1 c-0.8-0.7-2.3-1.4-4.1-1.4c-4.5,0-8.2,3.2-8.2,7.9c0,4.7,3.7,7.9,8.2,7.9c1.8,0,3.4-0.5,4.1-1.4v0.9c0,2.1-1.9,3.1-4.4,3.1 c-2.2,0-4-0.5-5.8-1.4V29c2.1,0.7,4.4,1,6,1c5,0,9.2-2,9.2-7.3v-15L68.5,7.7L68.5,7.7z M68.5,17.2c-0.7,1-1.9,1.4-3.2,1.4 c-2.1,0-3.8-1.2-3.8-3.4c0-2.2,1.7-3.4,3.8-3.4c1.3,0,2.5,0.6,3.2,1.5V17.2z M88.1,24.2c4,0,6.4-0.7,8.5-2V10h-11v4.7h5.8v4.1 c-0.8,0.2-1.8,0.4-3.2,0.4c-4.9,0-7.3-3.2-7.3-6.8c0-3.7,2.8-6.8,8-6.8c2.2,0,4.3,0.6,5.8,1.4V1.7c-1.5-0.6-3.4-1.1-6.1-1.1 c-7.6,0-13,5.3-13,11.8C75.5,19.1,80.4,24.2,88.1,24.2z M101.4,6.1c-1.7,0-3.1-1.4-3.1-3s1.4-3,3.1-3c1.8,0,3.2,1.4,3.2,3 S103.1,6.1,101.4,6.1z M98.8,23.8h5V7.7h-5V23.8z M115.1,15l-4.3-7.2H105l10.1,16.4l10.1-16.4h-5.8L115.1,15z M129.3,16.9h11.6 c0.1-7-4.2-9.5-8.4-9.5c-4.5,0-8.5,2.6-8.6,8.4c0,5.6,4.1,8.4,9.1,8.4c2.2,0,4.4-0.3,6.4-1.3v-4.4c-2.5,1.4-4.1,1.4-5.6,1.4 C131.7,19.8,129.5,19.2,129.3,16.9z M132.5,11.1c1.5,0,2.8,0.7,3,2.7h-6.2C129.6,11.9,131,11.1,132.5,11.1z M43.5,11.4 c1.2-1,1.8-2.4,1.8-4c0-3.1-3-6.3-7.3-6.3h-8v22.8h10.4c4.1,0,7.2-3,7.2-6.8C47.5,14.8,46.5,12.3,43.5,11.4z M35.2,5.7h2.4 C39,5.7,40,6.8,40,8c0,1.2-1,2.2-2.5,2.2h-2.4V5.7z M39.9,19.2h-4.7v-4.6h4.7c1.4,0,2.5,1,2.5,2.3C42.4,18.1,41.3,19.2,39.9,19.2z" }), hAsync("path", { d: "M13.5,1l13.5,23H0L13.5,1z" }))), hAsync("biggive-misc-icon", { class: "bx bx-x", "background-colour": "transparent", "icon-colour": "black", icon: "MenuClose", onClick: this.closeMobileMenu })), hAsync("div", { id: "nav-primary" }, hAsync("ul", { class: "links", slot: "nav-primary" }, hAsync("li", null, hAsync("a", { href: makeURL('Donate', this.donateUrlPrefix, 'explore') }, "Explore Campaigns")), hAsync("li", null, hAsync("a", { href: makeURL('Blog', this.blogUrlPrefix, 'charities') }, "For Charities")), hAsync("li", null, hAsync("a", { href: makeURL('Blog', this.blogUrlPrefix, 'funders') }, "For Funders")), hAsync("li", null, hAsync("a", { onClick: this.noNav }, "Match Funding", hAsync("biggive-misc-icon", { class: "bx bxs-chevron-down sub-menu-arrow arrow", "background-colour": "white", "icon-colour": "black", icon: "CaretRight" })), hAsync("ul", { class: "sub-menu" }, hAsync("li", null, hAsync("a", { href: makeURL('Blog', this.blogUrlPrefix, 'match-funding-explained') }, "Match Funding Explained")), hAsync("li", null, hAsync("a", { href: makeURL('Blog', this.blogUrlPrefix, 'impact') }, "Match Funding Impact")), hAsync("li", { class: "more" }, hAsync("a", { onClick: this.noNav }, "Match Funding Opportunities", hAsync("biggive-misc-icon", { class: "bx bxs-chevron-down sub-sub-menu-arrow arrow", "background-colour": "white", "icon-colour": "black", icon: "CaretRight" })), hAsync("ul", { class: "sub-sub-menu" }, hAsync("li", null, hAsync("a", { href: makeURL('Blog', this.blogUrlPrefix, 'christmas-challenge'), class: "icon-christmas" }, "Christmas Challenge")), hAsync("li", null, hAsync("a", { href: makeURL('Blog', this.blogUrlPrefix, 'champions-for-children'), class: "icon-children" }, "Champions for Children")), hAsync("li", null, hAsync("a", { href: makeURL('Blog', this.blogUrlPrefix, 'green-match-fund'), class: "icon-green-match" }, "Green Match Fund")), hAsync("li", null, hAsync("a", { href: makeURL('Blog', this.blogUrlPrefix, 'women-girls-match-fund'), class: "icon-women-girls" }, "Women & Girls Match Fund")), hAsync("li", null, hAsync("a", { href: makeURL('Blog', this.blogUrlPrefix, 'kind2mind/'), class: "icon-mental-health" }, "Kind\u00B2Mind")), hAsync("li", null, hAsync("a", { href: makeURL('Blog', this.blogUrlPrefix, 'artsforimpact/'), class: "icon-arts-impact" }, "Arts for Impact")), hAsync("li", null, hAsync("a", { href: makeURL('Blog', this.blogUrlPrefix, 'anchor-match-fund/'), class: "icon-anchor-match" }, "Anchor Match Fund")), hAsync("li", null, hAsync("a", { href: makeURL('Blog', this.blogUrlPrefix, 'emergency-campaigns/'), class: "icon-emergency" }, "Emergency Match Fund")))), hAsync("li", null, hAsync("a", { href: makeURL('Blog', this.blogUrlPrefix, 'run-your-own-campaign/)') }, "Run your match funding campaign")))), hAsync("li", null, hAsync("a", { onClick: this.noNav }, "About Us", hAsync("biggive-misc-icon", { class: "bx bxs-chevron-down sub-menu-arrow arrow", "background-colour": "white", "icon-colour": "black", icon: "CaretRight" })), hAsync("ul", { class: "sub-menu" }, hAsync("li", null, hAsync("a", { href: makeURL('Blog', this.blogUrlPrefix, 'our-people') }, "Our People")), hAsync("li", null, hAsync("a", { href: makeURL('Blog', this.blogUrlPrefix, 'our-story') }, "Our Story")), hAsync("li", null, hAsync("a", { href: makeURL('Blog', this.blogUrlPrefix, 'donation-funds') }, "Donate by Bank Transfer")), hAsync("li", null, hAsync("a", { href: makeURL('Blog', this.blogUrlPrefix, 'our-fees') }, "Our Fees")), hAsync("li", null, hAsync("a", { href: makeURL('Blog', this.blogUrlPrefix, 'faqs') }, "FAQs")))), hAsync("li", null, hAsync("a", { onClick: this.noNav }, "Resources", hAsync("biggive-misc-icon", { class: "bx bxs-chevron-down sub-menu-arrow arrow", "background-colour": "white", "icon-colour": "black", icon: "CaretRight" })), hAsync("ul", { class: "sub-menu" }, hAsync("li", null, hAsync("a", { href: makeURL('Blog', this.blogUrlPrefix, 'case-studies') }, "Case Studies")), hAsync("li", null, hAsync("a", { href: makeURL('Blog', this.blogUrlPrefix, 'blog') }, "Blog")), hAsync("li", null, hAsync("a", { href: makeURL('Blog', this.blogUrlPrefix, 'reports-insights') }, "Reports & Insights")), hAsync("li", null, hAsync("a", { href: makeURL('Blog', this.blogUrlPrefix, 'press') }, "Press"))))), hAsync("div", { class: "mobile-only" }, this.getSecondaryNavLinks())), hAsync("div", { class: "mobile-social-icon-wrap mobile-only" }, hAsync("biggive-social-icon", { service: "Facebook", url: "https://www.facebook.com/BigGive.org", "background-colour": "tertiary", "icon-colour": "black" }), hAsync("biggive-social-icon", { service: "Twitter", url: "https://twitter.com/BigGive", "background-colour": "tertiary", "icon-colour": "black" }), hAsync("biggive-social-icon", { service: "LinkedIn", url: "https://uk.linkedin.com/company/big-give", "background-colour": "tertiary", "icon-colour": "black" }), hAsync("biggive-social-icon", { service: "YouTube", url: "https://www.youtube.com/channel/UC9_wH1aaTuZurJ-F9R8GDcA", "background-colour": "tertiary", "icon-colour": "black" }), hAsync("biggive-social-icon", { service: "Instagram", url: "https://www.instagram.com/biggiveorg", "background-colour": "tertiary", "icon-colour": "black" })))))));
8121
8093
  }
8122
8094
  get host() { return getElement(this); }
8123
8095
  static get style() { return biggiveMainMenuCss; }
@@ -8129,8 +8101,6 @@ class BiggiveMainMenu {
8129
8101
  "donateUrlPrefix": [1, "donate-url-prefix"],
8130
8102
  "experienceUrlPrefix": [1, "experience-url-prefix"],
8131
8103
  "isLoggedIn": [4, "is-logged-in"],
8132
- "logoUrl": [1, "logo-url"],
8133
- "usePresetMenuContent": [4, "use-preset-menu-content"],
8134
8104
  "closeMobileMenuFromOutside": [64]
8135
8105
  },
8136
8106
  "$listeners$": undefined,
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": "202311091230.0.0",
4
+ "version": "202311201334.0.0",
5
5
  "description": "Big Give Components",
6
6
  "main": "dist/index.cjs.js",
7
7
  "module": "dist/index.js",