@debtcollective/dc-header-component
Advanced tools
Comparing version 2.2.0 to 2.3.0
@@ -6,2 +6,18 @@ # Change Log | ||
# [2.3.0](https://github.com/debtcollective/packages/compare/@debtcollective/dc-header-component@2.2.0...@debtcollective/dc-header-component@2.3.0) (2020-11-30) | ||
### Bug Fixes | ||
* **header:** use summary to display memberhub instead ([9f8640b](https://github.com/debtcollective/packages/commit/9f8640b)) | ||
### Features | ||
* **header-component:** include the member hub link in the user dropdown ([de7d53f](https://github.com/debtcollective/packages/commit/de7d53f)) | ||
# [2.2.0](https://github.com/debtcollective/packages/compare/@debtcollective/dc-header-component@2.1.5...@debtcollective/dc-header-component@2.2.0) (2020-11-20) | ||
@@ -8,0 +24,0 @@ |
@@ -1702,4 +1702,4 @@ 'use strict'; | ||
{ | ||
text: 'Summary', | ||
href: preffixCommunityURL(this.community, `u/${this.user.username}/summary`), | ||
text: 'Member hub', | ||
href: 'https://debtcollective.org/hub', | ||
icon: 'account_circle' | ||
@@ -1723,3 +1723,3 @@ }, | ||
]; | ||
return (index.h("div", { class: `user-dropdown-container` }, index.h("button", { class: "btn btn-transparent", onClick: this.togglePopup.bind(this), ref: (el) => this.popupTriggerElement = el }, index.h("img", { alt: "Profile picture", width: "32", height: "32", src: getAvatarURL(this.user, this.community), title: this.user.username, class: `avatar ${this.open ? 'avatar-open' : ''}` }), index.h("span", { class: "material-icons" }, this.open ? 'keyboard_arrow_up' : 'keyboard_arrow_down')), index.h("div", { class: `user-dropdown-items ${this.open ? "open " : "hidden"}`, onMouseLeave: this.closePopup.bind(this), ref: (el) => this.popupItems = el }, index.h("a", { href: preffixCommunityURL(this.community, `u/${this.user.username}`), class: "user-dropdown-item", target: "_blank" }, this.user.username, index.h("small", null, "View Your Profile")), items.map(item => (index.h("a", { href: item.href, class: "user-dropdown-item", target: "_blank" }, index.h("span", { class: "material-icons" }, item.icon), item.text))), index.h("button", { class: "btn btn-transparent user-dropdown-item", onClick: this.handleLogout.bind(this) }, index.h("span", { class: "material-icons" }, "exit_to_app"), "Logout")))); | ||
return (index.h("div", { class: `user-dropdown-container` }, index.h("button", { class: "btn btn-transparent", onClick: this.togglePopup.bind(this), ref: (el) => this.popupTriggerElement = el }, index.h("img", { alt: "Profile picture", width: "32", height: "32", src: getAvatarURL(this.user, this.community), title: this.user.username, class: `avatar ${this.open ? 'avatar-open' : ''}` }), index.h("span", { class: "material-icons" }, this.open ? 'keyboard_arrow_up' : 'keyboard_arrow_down')), index.h("div", { class: `user-dropdown-items ${this.open ? "open " : "hidden"}`, onMouseLeave: this.closePopup.bind(this), ref: (el) => this.popupItems = el }, index.h("a", { href: preffixCommunityURL(this.community, `u/${this.user.username}`), class: "user-dropdown-item", target: "_blank" }, this.user.username, index.h("small", null, "Community Profile")), items.map(item => (index.h("a", { href: item.href, class: "user-dropdown-item", target: "_blank" }, index.h("span", { class: "material-icons" }, item.icon), item.text))), index.h("button", { class: "btn btn-transparent user-dropdown-item", onClick: this.handleLogout.bind(this) }, index.h("span", { class: "material-icons" }, "exit_to_app"), "Logout")))); | ||
} | ||
@@ -1779,6 +1779,2 @@ static get assetsDirs() { return ["assets"]; } | ||
/** | ||
* URL to the member hub page | ||
*/ | ||
this.memberhuburl = "https://debtcollective.org/hub"; | ||
/** | ||
* Logo image | ||
@@ -1785,0 +1781,0 @@ */ |
@@ -18,3 +18,3 @@ 'use strict'; | ||
patchBrowser().then(options => { | ||
return index.bootstrapLazy([["dc-collapser_6.cjs",[[4,"dc-header",{"links":[1],"donateurl":[1],"community":[1],"memberhuburl":[1],"host":[1],"logo":[1],"logosmall":[1],"user":[32],"isMenuOpen":[32]},[[0,"toggleMenu","toggleMenuHandler"]]],[0,"dc-user-items",{"community":[1],"user":[16]}],[0,"dc-collapser",{"label":[1],"items":[1],"open":[32]}],[1,"dc-dropdown",{"label":[1],"items":[1],"open":[32]},[[4,"click","handleClickOutside"],[4,"keydown","handleEscapeKey"]]],[4,"dc-menu",{"open":[4],"logo":[1]}],[0,"dc-user-dropdown",{"community":[1],"user":[16],"open":[32]},[[4,"click","handleClickOutside"],[4,"keydown","handleEscapeKey"]]]]]], options); | ||
return index.bootstrapLazy([["dc-collapser_6.cjs",[[4,"dc-header",{"links":[1],"donateurl":[1],"community":[1],"host":[1],"logo":[1],"logosmall":[1],"user":[32],"isMenuOpen":[32]},[[0,"toggleMenu","toggleMenuHandler"]]],[0,"dc-user-items",{"community":[1],"user":[16]}],[0,"dc-collapser",{"label":[1],"items":[1],"open":[32]}],[1,"dc-dropdown",{"label":[1],"items":[1],"open":[32]},[[4,"click","handleClickOutside"],[4,"keydown","handleEscapeKey"]]],[4,"dc-menu",{"open":[4],"logo":[1]}],[0,"dc-user-dropdown",{"community":[1],"user":[16],"open":[32]},[[4,"click","handleClickOutside"],[4,"keydown","handleEscapeKey"]]]]]], options); | ||
}); |
@@ -17,3 +17,3 @@ 'use strict'; | ||
return patchEsm().then(() => { | ||
return index.bootstrapLazy([["dc-collapser_6.cjs",[[4,"dc-header",{"links":[1],"donateurl":[1],"community":[1],"memberhuburl":[1],"host":[1],"logo":[1],"logosmall":[1],"user":[32],"isMenuOpen":[32]},[[0,"toggleMenu","toggleMenuHandler"]]],[0,"dc-user-items",{"community":[1],"user":[16]}],[0,"dc-collapser",{"label":[1],"items":[1],"open":[32]}],[1,"dc-dropdown",{"label":[1],"items":[1],"open":[32]},[[4,"click","handleClickOutside"],[4,"keydown","handleEscapeKey"]]],[4,"dc-menu",{"open":[4],"logo":[1]}],[0,"dc-user-dropdown",{"community":[1],"user":[16],"open":[32]},[[4,"click","handleClickOutside"],[4,"keydown","handleEscapeKey"]]]]]], options); | ||
return index.bootstrapLazy([["dc-collapser_6.cjs",[[4,"dc-header",{"links":[1],"donateurl":[1],"community":[1],"host":[1],"logo":[1],"logosmall":[1],"user":[32],"isMenuOpen":[32]},[[0,"toggleMenu","toggleMenuHandler"]]],[0,"dc-user-items",{"community":[1],"user":[16]}],[0,"dc-collapser",{"label":[1],"items":[1],"open":[32]}],[1,"dc-dropdown",{"label":[1],"items":[1],"open":[32]},[[4,"click","handleClickOutside"],[4,"keydown","handleEscapeKey"]]],[4,"dc-menu",{"open":[4],"logo":[1]}],[0,"dc-user-dropdown",{"community":[1],"user":[16],"open":[32]},[[4,"click","handleClickOutside"],[4,"keydown","handleEscapeKey"]]]]]], options); | ||
}); | ||
@@ -20,0 +20,0 @@ }; |
@@ -41,6 +41,2 @@ import { Component, Prop, State, h, Watch, getAssetPath, Host, Listen, Event, } from "@stencil/core"; | ||
/** | ||
* URL to the member hub page | ||
*/ | ||
this.memberhuburl = "https://debtcollective.org/hub"; | ||
/** | ||
* Logo image | ||
@@ -166,20 +162,2 @@ */ | ||
}, | ||
"memberhuburl": { | ||
"type": "string", | ||
"mutable": false, | ||
"complexType": { | ||
"original": "string", | ||
"resolved": "string", | ||
"references": {} | ||
}, | ||
"required": false, | ||
"optional": true, | ||
"docs": { | ||
"tags": [], | ||
"text": "URL to the member hub page" | ||
}, | ||
"attribute": "memberhuburl", | ||
"reflect": false, | ||
"defaultValue": "\"https://debtcollective.org/hub\"" | ||
}, | ||
"host": { | ||
@@ -186,0 +164,0 @@ "type": "string", |
@@ -43,4 +43,4 @@ import { Component, h, State, Prop, Listen } from "@stencil/core"; | ||
{ | ||
text: 'Summary', | ||
href: preffixCommunityURL(this.community, `u/${this.user.username}/summary`), | ||
text: 'Member hub', | ||
href: 'https://debtcollective.org/hub', | ||
icon: 'account_circle' | ||
@@ -71,3 +71,3 @@ }, | ||
this.user.username, | ||
h("small", null, "View Your Profile")), | ||
h("small", null, "Community Profile")), | ||
items.map(item => (h("a", { href: item.href, class: "user-dropdown-item", target: "_blank" }, | ||
@@ -74,0 +74,0 @@ h("span", { class: "material-icons" }, item.icon), |
@@ -1698,4 +1698,4 @@ import { r as registerInstance, h, H as Host, c as createEvent, g as getAssetPath } from './index-6a040450.js'; | ||
{ | ||
text: 'Summary', | ||
href: preffixCommunityURL(this.community, `u/${this.user.username}/summary`), | ||
text: 'Member hub', | ||
href: 'https://debtcollective.org/hub', | ||
icon: 'account_circle' | ||
@@ -1719,3 +1719,3 @@ }, | ||
]; | ||
return (h("div", { class: `user-dropdown-container` }, h("button", { class: "btn btn-transparent", onClick: this.togglePopup.bind(this), ref: (el) => this.popupTriggerElement = el }, h("img", { alt: "Profile picture", width: "32", height: "32", src: getAvatarURL(this.user, this.community), title: this.user.username, class: `avatar ${this.open ? 'avatar-open' : ''}` }), h("span", { class: "material-icons" }, this.open ? 'keyboard_arrow_up' : 'keyboard_arrow_down')), h("div", { class: `user-dropdown-items ${this.open ? "open " : "hidden"}`, onMouseLeave: this.closePopup.bind(this), ref: (el) => this.popupItems = el }, h("a", { href: preffixCommunityURL(this.community, `u/${this.user.username}`), class: "user-dropdown-item", target: "_blank" }, this.user.username, h("small", null, "View Your Profile")), items.map(item => (h("a", { href: item.href, class: "user-dropdown-item", target: "_blank" }, h("span", { class: "material-icons" }, item.icon), item.text))), h("button", { class: "btn btn-transparent user-dropdown-item", onClick: this.handleLogout.bind(this) }, h("span", { class: "material-icons" }, "exit_to_app"), "Logout")))); | ||
return (h("div", { class: `user-dropdown-container` }, h("button", { class: "btn btn-transparent", onClick: this.togglePopup.bind(this), ref: (el) => this.popupTriggerElement = el }, h("img", { alt: "Profile picture", width: "32", height: "32", src: getAvatarURL(this.user, this.community), title: this.user.username, class: `avatar ${this.open ? 'avatar-open' : ''}` }), h("span", { class: "material-icons" }, this.open ? 'keyboard_arrow_up' : 'keyboard_arrow_down')), h("div", { class: `user-dropdown-items ${this.open ? "open " : "hidden"}`, onMouseLeave: this.closePopup.bind(this), ref: (el) => this.popupItems = el }, h("a", { href: preffixCommunityURL(this.community, `u/${this.user.username}`), class: "user-dropdown-item", target: "_blank" }, this.user.username, h("small", null, "Community Profile")), items.map(item => (h("a", { href: item.href, class: "user-dropdown-item", target: "_blank" }, h("span", { class: "material-icons" }, item.icon), item.text))), h("button", { class: "btn btn-transparent user-dropdown-item", onClick: this.handleLogout.bind(this) }, h("span", { class: "material-icons" }, "exit_to_app"), "Logout")))); | ||
} | ||
@@ -1775,6 +1775,2 @@ static get assetsDirs() { return ["assets"]; } | ||
/** | ||
* URL to the member hub page | ||
*/ | ||
this.memberhuburl = "https://debtcollective.org/hub"; | ||
/** | ||
* Logo image | ||
@@ -1781,0 +1777,0 @@ */ |
@@ -16,3 +16,3 @@ import { p as promiseResolve, b as bootstrapLazy } from './index-6a040450.js'; | ||
patchBrowser().then(options => { | ||
return bootstrapLazy([["dc-collapser_6",[[4,"dc-header",{"links":[1],"donateurl":[1],"community":[1],"memberhuburl":[1],"host":[1],"logo":[1],"logosmall":[1],"user":[32],"isMenuOpen":[32]},[[0,"toggleMenu","toggleMenuHandler"]]],[0,"dc-user-items",{"community":[1],"user":[16]}],[0,"dc-collapser",{"label":[1],"items":[1],"open":[32]}],[1,"dc-dropdown",{"label":[1],"items":[1],"open":[32]},[[4,"click","handleClickOutside"],[4,"keydown","handleEscapeKey"]]],[4,"dc-menu",{"open":[4],"logo":[1]}],[0,"dc-user-dropdown",{"community":[1],"user":[16],"open":[32]},[[4,"click","handleClickOutside"],[4,"keydown","handleEscapeKey"]]]]]], options); | ||
return bootstrapLazy([["dc-collapser_6",[[4,"dc-header",{"links":[1],"donateurl":[1],"community":[1],"host":[1],"logo":[1],"logosmall":[1],"user":[32],"isMenuOpen":[32]},[[0,"toggleMenu","toggleMenuHandler"]]],[0,"dc-user-items",{"community":[1],"user":[16]}],[0,"dc-collapser",{"label":[1],"items":[1],"open":[32]}],[1,"dc-dropdown",{"label":[1],"items":[1],"open":[32]},[[4,"click","handleClickOutside"],[4,"keydown","handleEscapeKey"]]],[4,"dc-menu",{"open":[4],"logo":[1]}],[0,"dc-user-dropdown",{"community":[1],"user":[16],"open":[32]},[[4,"click","handleClickOutside"],[4,"keydown","handleEscapeKey"]]]]]], options); | ||
}); |
@@ -13,3 +13,3 @@ import { p as promiseResolve, b as bootstrapLazy } from './index-6a040450.js'; | ||
return patchEsm().then(() => { | ||
return bootstrapLazy([["dc-collapser_6",[[4,"dc-header",{"links":[1],"donateurl":[1],"community":[1],"memberhuburl":[1],"host":[1],"logo":[1],"logosmall":[1],"user":[32],"isMenuOpen":[32]},[[0,"toggleMenu","toggleMenuHandler"]]],[0,"dc-user-items",{"community":[1],"user":[16]}],[0,"dc-collapser",{"label":[1],"items":[1],"open":[32]}],[1,"dc-dropdown",{"label":[1],"items":[1],"open":[32]},[[4,"click","handleClickOutside"],[4,"keydown","handleEscapeKey"]]],[4,"dc-menu",{"open":[4],"logo":[1]}],[0,"dc-user-dropdown",{"community":[1],"user":[16],"open":[32]},[[4,"click","handleClickOutside"],[4,"keydown","handleEscapeKey"]]]]]], options); | ||
return bootstrapLazy([["dc-collapser_6",[[4,"dc-header",{"links":[1],"donateurl":[1],"community":[1],"host":[1],"logo":[1],"logosmall":[1],"user":[32],"isMenuOpen":[32]},[[0,"toggleMenu","toggleMenuHandler"]]],[0,"dc-user-items",{"community":[1],"user":[16]}],[0,"dc-collapser",{"label":[1],"items":[1],"open":[32]}],[1,"dc-dropdown",{"label":[1],"items":[1],"open":[32]},[[4,"click","handleClickOutside"],[4,"keydown","handleEscapeKey"]]],[4,"dc-menu",{"open":[4],"logo":[1]}],[0,"dc-user-dropdown",{"community":[1],"user":[16],"open":[32]},[[4,"click","handleClickOutside"],[4,"keydown","handleEscapeKey"]]]]]], options); | ||
}); | ||
@@ -16,0 +16,0 @@ }; |
@@ -1,1 +0,1 @@ | ||
import{p as e,b as o}from"./p-3b6e3048.js";(()=>{const o=import.meta.url,n={};return""!==o&&(n.resourcesUrl=new URL(".",o).href),e(n)})().then((e=>o([["p-d1a4e36c",[[4,"dc-header",{links:[1],donateurl:[1],community:[1],memberhuburl:[1],host:[1],logo:[1],logosmall:[1],user:[32],isMenuOpen:[32]},[[0,"toggleMenu","toggleMenuHandler"]]],[0,"dc-user-items",{community:[1],user:[16]}],[0,"dc-collapser",{label:[1],items:[1],open:[32]}],[1,"dc-dropdown",{label:[1],items:[1],open:[32]},[[4,"click","handleClickOutside"],[4,"keydown","handleEscapeKey"]]],[4,"dc-menu",{open:[4],logo:[1]}],[0,"dc-user-dropdown",{community:[1],user:[16],open:[32]},[[4,"click","handleClickOutside"],[4,"keydown","handleEscapeKey"]]]]]],e))); | ||
import{p as e,b as o}from"./p-3b6e3048.js";(()=>{const o=import.meta.url,n={};return""!==o&&(n.resourcesUrl=new URL(".",o).href),e(n)})().then((e=>o([["p-c38f5cc4",[[4,"dc-header",{links:[1],donateurl:[1],community:[1],host:[1],logo:[1],logosmall:[1],user:[32],isMenuOpen:[32]},[[0,"toggleMenu","toggleMenuHandler"]]],[0,"dc-user-items",{community:[1],user:[16]}],[0,"dc-collapser",{label:[1],items:[1],open:[32]}],[1,"dc-dropdown",{label:[1],items:[1],open:[32]},[[4,"click","handleClickOutside"],[4,"keydown","handleEscapeKey"]]],[4,"dc-menu",{open:[4],logo:[1]}],[0,"dc-user-dropdown",{community:[1],user:[16],open:[32]},[[4,"click","handleClickOutside"],[4,"keydown","handleEscapeKey"]]]]]],e))); |
@@ -44,6 +44,2 @@ /* eslint-disable */ | ||
"logosmall": string; | ||
/** | ||
* URL to the member hub page | ||
*/ | ||
"memberhuburl"?: string; | ||
} | ||
@@ -171,6 +167,2 @@ interface DcMenu { | ||
/** | ||
* URL to the member hub page | ||
*/ | ||
"memberhuburl"?: string; | ||
/** | ||
* Emit event to exposed fetched user on host application TODO: Cannot find name User on EventEmitter<User> | ||
@@ -177,0 +169,0 @@ */ |
@@ -30,6 +30,2 @@ import { EventEmitter } from "../../stencil-public-runtime"; | ||
/** | ||
* URL to the member hub page | ||
*/ | ||
memberhuburl?: string; | ||
/** | ||
* URL to the component host | ||
@@ -36,0 +32,0 @@ * without the latest "/" |
{ | ||
"name": "@debtcollective/dc-header-component", | ||
"version": "2.2.0", | ||
"version": "2.3.0", | ||
"description": "Stencil header component for debtcollective web apps", | ||
@@ -45,3 +45,3 @@ "main": "dist/index.cjs.js", | ||
"license": "MIT", | ||
"gitHead": "b2c08a399279d6104379bfe8f733c5fc715cb48b" | ||
"gitHead": "9a03ed7c6d459f0f2c5f1938f592b4996f692f31" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
567123
10381