Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@debtcollective/dc-header-component

Package Overview
Dependencies
Maintainers
6
Versions
71
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@debtcollective/dc-header-component - npm Package Compare versions

Comparing version 3.3.0 to 3.3.1

dist/header/p-25026cc6.entry.js

11

CHANGELOG.md

@@ -6,2 +6,13 @@ # Change Log

## [3.3.1](https://github.com/debtcollective/packages/compare/@debtcollective/dc-header-component@3.3.0...@debtcollective/dc-header-component@3.3.1) (2021-06-15)
### Bug Fixes
* **header:** sanitise sso url to allow request point right url ([ca6586a](https://github.com/debtcollective/packages/commit/ca6586a))
# [3.3.0](https://github.com/debtcollective/packages/compare/@debtcollective/dc-header-component@3.2.1...@debtcollective/dc-header-component@3.3.0) (2021-06-15)

@@ -8,0 +19,0 @@

12

dist/cjs/dc-header_4.cjs.entry.js

@@ -405,4 +405,14 @@ 'use strict';

};
const syncCurrentUser = async (discourseEndpoint) => {
const sanitiseSSOUrl = (ssoUrl) => {
if (ssoUrl === "/") {
return window.location.host;
}
if (ssoUrl.charAt(ssoUrl.length - 1) === "/") {
return ssoUrl.slice(0, -1);
}
return ssoUrl;
};
const syncCurrentUser = async (community) => {
let currentUser;
let discourseEndpoint = sanitiseSSOUrl(community);
try {

@@ -409,0 +419,0 @@ const csrfToken = await getCSRFToken(discourseEndpoint);

@@ -33,4 +33,14 @@ // https://stackoverflow.com/a/33829607/1422380

};
export const syncCurrentUser = async (discourseEndpoint) => {
const sanitiseSSOUrl = (ssoUrl) => {
if (ssoUrl === "/") {
return window.location.host;
}
if (ssoUrl.charAt(ssoUrl.length - 1) === "/") {
return ssoUrl.slice(0, -1);
}
return ssoUrl;
};
export const syncCurrentUser = async (community) => {
let currentUser;
let discourseEndpoint = sanitiseSSOUrl(community);
try {

@@ -37,0 +47,0 @@ const csrfToken = await getCSRFToken(discourseEndpoint);

@@ -401,4 +401,14 @@ import { r as registerInstance, c as createEvent, h, H as Host, g as getAssetPath } from './index-8956c047.js';

};
const syncCurrentUser = async (discourseEndpoint) => {
const sanitiseSSOUrl = (ssoUrl) => {
if (ssoUrl === "/") {
return window.location.host;
}
if (ssoUrl.charAt(ssoUrl.length - 1) === "/") {
return ssoUrl.slice(0, -1);
}
return ssoUrl;
};
const syncCurrentUser = async (community) => {
let currentUser;
let discourseEndpoint = sanitiseSSOUrl(community);
try {

@@ -405,0 +415,0 @@ const csrfToken = await getCSRFToken(discourseEndpoint);

2

dist/header/header.esm.js

@@ -1,1 +0,1 @@

import{p as e,b as l}from"./p-1822b0d8.js";(()=>{const l=import.meta.url,n={};return""!==l&&(n.resourcesUrl=new URL(".",l).href),e(n)})().then((e=>l([["p-b3bac66e",[[1,"dc-header",{homepage:[1],community:[1],returnurl:[1],user:[32],isShrink:[32],scrollTop:[32],isMenuOpen:[32],isProfileMenuOpen:[32]},[[9,"scroll","handleScroll"],[0,"toggleMenu","toggleMenuHandler"],[0,"toggleProfileMenu","toggleProfileMenuHandler"],[0,"closeAll","closeAll"]]],[1,"dc-menu",{open:[4],community:[1],homepage:[1],host:[1],user:[16]},[[4,"keydown","handleEscapeKey"]]],[1,"dc-profile",{shrank:[4],expanded:[4],community:[1],homepage:[1],host:[1],user:[16]},[[4,"keydown","handleEscapeKey"]]],[4,"dc-link",{to:[1],target:[1],namespace:[1]},[[2,"click","handleClick"]]]]]],e)));
import{p as e,b as l}from"./p-1822b0d8.js";(()=>{const l=import.meta.url,n={};return""!==l&&(n.resourcesUrl=new URL(".",l).href),e(n)})().then((e=>l([["p-25026cc6",[[1,"dc-header",{homepage:[1],community:[1],returnurl:[1],user:[32],isShrink:[32],scrollTop:[32],isMenuOpen:[32],isProfileMenuOpen:[32]},[[9,"scroll","handleScroll"],[0,"toggleMenu","toggleMenuHandler"],[0,"toggleProfileMenu","toggleProfileMenuHandler"],[0,"closeAll","closeAll"]]],[1,"dc-menu",{open:[4],community:[1],homepage:[1],host:[1],user:[16]},[[4,"keydown","handleEscapeKey"]]],[1,"dc-profile",{shrank:[4],expanded:[4],community:[1],homepage:[1],host:[1],user:[16]},[[4,"keydown","handleEscapeKey"]]],[4,"dc-link",{to:[1],target:[1],namespace:[1]},[[2,"click","handleClick"]]]]]],e)));

@@ -1,2 +0,2 @@

export declare const syncCurrentUser: (discourseEndpoint: any) => Promise<any>;
export declare const syncCurrentUser: (community: any) => Promise<any>;
export declare const logout: (discourseEndpoint: any, username: any) => Promise<void>;
{
"name": "@debtcollective/dc-header-component",
"version": "3.3.0",
"version": "3.3.1",
"description": "Stencil header component for debtcollective web apps",

@@ -42,3 +42,3 @@ "main": "dist/index.cjs.js",

"license": "BSD-3-Clause",
"gitHead": "c286aee47982f311dd9f0caea95a5f1f09f2cb61"
"gitHead": "c8c0d215e58f423fc0beb75e0ecb2fd166edac77"
}

@@ -38,2 +38,9 @@ ![Built With Stencil](https://img.shields.io/badge/-Built%20With%20Stencil-16161d.svg?logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDE5LjIuMSwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHZpZXdCb3g9IjAgMCA1MTIgNTEyIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCA1MTIgNTEyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI%2BCjxzdHlsZSB0eXBlPSJ0ZXh0L2NzcyI%2BCgkuc3Qwe2ZpbGw6I0ZGRkZGRjt9Cjwvc3R5bGU%2BCjxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik00MjQuNywzNzMuOWMwLDM3LjYtNTUuMSw2OC42LTkyLjcsNjguNkgxODAuNGMtMzcuOSwwLTkyLjctMzAuNy05Mi43LTY4LjZ2LTMuNmgzMzYuOVYzNzMuOXoiLz4KPHBhdGggY2xhc3M9InN0MCIgZD0iTTQyNC43LDI5Mi4xSDE4MC40Yy0zNy42LDAtOTIuNy0zMS05Mi43LTY4LjZ2LTMuNkgzMzJjMzcuNiwwLDkyLjcsMzEsOTIuNyw2OC42VjI5Mi4xeiIvPgo8cGF0aCBjbGFzcz0ic3QwIiBkPSJNNDI0LjcsMTQxLjdIODcuN3YtMy42YzAtMzcuNiw1NC44LTY4LjYsOTIuNy02OC42SDMzMmMzNy45LDAsOTIuNywzMC43LDkyLjcsNjguNlYxNDEuN3oiLz4KPC9zdmc%2BCg%3D%3D&colorA=16161d&style=flat-square)

## Contributing
- Take a branch out from `development`
- Create a PR pointing to `development`
- Once the PR is merged, **manually merge to master to trigger a new release**
- The new version will be calculated atomatically by lerna
## For Firefox users

@@ -53,14 +60,4 @@

```html
<dc-header
id="dc-header"
homepage="http://lvh.me:3333"
union="/debt-union"
host="http://lvh.me:3333"
community="http://lvh.me:3000"
></dc-header>
```
Check the `index.html` file to see the up-to-date way to work with the component
> NOTE: be aware of not adding the latest "/" on the url props such as host and community
### Script tag

@@ -75,3 +72,3 @@

- Run `npm install @debtcollective/dc-header-component --save`
- Put a script tag similar to this `<script src='node_modules/dc-header-component/dist/dropdown.js'></script>` in the head of your index.html
- Put a script tag similar to this `<script src='node_modules/dc-header-component/dist/header/header.esm.js'></script>` in the head of your index.html
- Then you can use the element anywhere in your template, JSX, html etc

@@ -78,0 +75,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc