@debtcollective/dc-header-component
Advanced tools
Comparing version 4.0.0 to 4.1.0
@@ -6,2 +6,13 @@ # Change Log | ||
# [4.1.0](https://github.com/debtcollective/packages/compare/@debtcollective/dc-header-component@4.0.0...@debtcollective/dc-header-component@4.1.0) (2021-11-11) | ||
### Features | ||
* add check for authenticated links ([5ca4311](https://github.com/debtcollective/packages/commit/5ca4311)) | ||
# [4.0.0](https://github.com/debtcollective/packages/compare/@debtcollective/dc-header-component@3.6.3...@debtcollective/dc-header-component@4.0.0) (2021-11-11) | ||
@@ -8,0 +19,0 @@ |
@@ -242,6 +242,14 @@ 'use strict'; | ||
item.child_items.forEach(child => { | ||
let authenticated; | ||
if (child.acf.visibility == "authenticated") { | ||
authenticated = true; | ||
} | ||
else if (child.acf.visibility == "unauthenticated") { | ||
authenticated = false; | ||
} | ||
var childItem = { | ||
"type": "LINK", | ||
"text": child.title, | ||
"url": child.url | ||
"url": child.url, | ||
"authenticated": authenticated | ||
}; | ||
@@ -253,5 +261,13 @@ row["items"].push(childItem); | ||
else { | ||
let authenticated; | ||
if (item.acf.visibility == "authenticated") { | ||
authenticated = true; | ||
} | ||
else if (item.acf.visibility == "unauthenticated") { | ||
authenticated = false; | ||
} | ||
row["type"] = "MENU_ITEM_LINK"; | ||
row["text"] = item.title; | ||
row["url"] = item.url; | ||
row["authenticated"] = authenticated; | ||
wordpressNavConfig.push(row); | ||
@@ -258,0 +274,0 @@ } |
@@ -42,6 +42,14 @@ var __rest = (this && this.__rest) || function (s, e) { | ||
item.child_items.forEach(child => { | ||
let authenticated; | ||
if (child.acf.visibility == "authenticated") { | ||
authenticated = true; | ||
} | ||
else if (child.acf.visibility == "unauthenticated") { | ||
authenticated = false; | ||
} | ||
var childItem = { | ||
"type": "LINK", | ||
"text": child.title, | ||
"url": child.url | ||
"url": child.url, | ||
"authenticated": authenticated | ||
}; | ||
@@ -53,5 +61,13 @@ row["items"].push(childItem); | ||
else { | ||
let authenticated; | ||
if (item.acf.visibility == "authenticated") { | ||
authenticated = true; | ||
} | ||
else if (item.acf.visibility == "unauthenticated") { | ||
authenticated = false; | ||
} | ||
row["type"] = "MENU_ITEM_LINK"; | ||
row["text"] = item.title; | ||
row["url"] = item.url; | ||
row["authenticated"] = authenticated; | ||
wordpressNavConfig.push(row); | ||
@@ -58,0 +74,0 @@ } |
@@ -238,6 +238,14 @@ import { r as registerInstance, c as createEvent, h, H as Host, g as getAssetPath } from './index-8956c047.js'; | ||
item.child_items.forEach(child => { | ||
let authenticated; | ||
if (child.acf.visibility == "authenticated") { | ||
authenticated = true; | ||
} | ||
else if (child.acf.visibility == "unauthenticated") { | ||
authenticated = false; | ||
} | ||
var childItem = { | ||
"type": "LINK", | ||
"text": child.title, | ||
"url": child.url | ||
"url": child.url, | ||
"authenticated": authenticated | ||
}; | ||
@@ -249,5 +257,13 @@ row["items"].push(childItem); | ||
else { | ||
let authenticated; | ||
if (item.acf.visibility == "authenticated") { | ||
authenticated = true; | ||
} | ||
else if (item.acf.visibility == "unauthenticated") { | ||
authenticated = false; | ||
} | ||
row["type"] = "MENU_ITEM_LINK"; | ||
row["text"] = item.title; | ||
row["url"] = item.url; | ||
row["authenticated"] = authenticated; | ||
wordpressNavConfig.push(row); | ||
@@ -254,0 +270,0 @@ } |
@@ -1,1 +0,1 @@ | ||
import{p as e,b as o}from"./p-1822b0d8.js";(()=>{const o=import.meta.url,l={};return""!==o&&(l.resourcesUrl=new URL(".",o).href),e(l)})().then((e=>o([["p-d87bd6e3",[[1,"dc-header",{homepage:[1],community:[1],wordpress:[1],returnurl:[1],logo:[8],logosmall:[8],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],wordpress:[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 o}from"./p-1822b0d8.js";(()=>{const o=import.meta.url,l={};return""!==o&&(l.resourcesUrl=new URL(".",o).href),e(l)})().then((e=>o([["p-4d401442",[[1,"dc-header",{homepage:[1],community:[1],wordpress:[1],returnurl:[1],logo:[8],logosmall:[8],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],wordpress:[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))); |
{ | ||
"name": "@debtcollective/dc-header-component", | ||
"version": "4.0.0", | ||
"version": "4.1.0", | ||
"description": "Stencil header component for debtcollective web apps", | ||
@@ -42,3 +42,3 @@ "main": "dist/index.cjs.js", | ||
"license": "BSD-3-Clause", | ||
"gitHead": "a6915620ad4f9bd310559c5e7819fd70680dc365" | ||
"gitHead": "a04ad3edc5e51796cca0d3168d825b0c0db4fdf4" | ||
} |
613580
9924