@ale-rainbow/rainbow-notification
Advanced tools
Comparing version 1.0.6 to 1.0.7
@@ -7,3 +7,4 @@ export declare class RainbowNotificationAction { | ||
choice: any[]; | ||
choiceCloselabel: string; | ||
choiceTitlelabel: string; | ||
choiceCloseLabel: string; | ||
choiceHandler: any; | ||
@@ -10,0 +11,0 @@ handler: any; |
@@ -5,2 +5,3 @@ "use strict"; | ||
constructor() { | ||
this.choiceTitlelabel = null; | ||
this.handler = null; | ||
@@ -24,3 +25,3 @@ this.focus = false; | ||
choiceElem.style.zIndex = this.choiceVisible ? 1 : -1; | ||
choiceActionElem.textContent = this.choiceVisible ? this.choiceCloselabel : this.label; | ||
choiceActionElem.textContent = this.choiceVisible ? this.choiceCloseLabel : this.label; | ||
} | ||
@@ -68,7 +69,8 @@ }; | ||
if (action.choice) { | ||
const choiceTitle = action.choiceTitlelabel ? `${action.choiceTitlelabel}` : ''; | ||
let choices = action.choice.reduce((buff, choice) => { | ||
return buff + `<div id='${choice.id}' class='extCallNotif__choice'>${choice.label}</div>`; | ||
}, ''); | ||
choices += `<section id='callNotif_choice_close_${this.id}_${action.name}' class='extCallNotif__choiceClose'>${action.choiceCloselabel}</section>`; | ||
buffer += `<div id='callNotif_choice_${this.id}_${action.name}' class='extCallNotif__choices'>${choices}</div>`; | ||
choices += `<section id='callNotif_choice_close_${this.id}_${action.name}' class='extCallNotif__choiceClose'>${action.choiceCloseLabel}</section>`; | ||
buffer += `<div id='callNotif_choice_${this.id}_${action.name}' class='extCallNotif__choices'>${choiceTitle}${choices}</div>`; | ||
} | ||
@@ -75,0 +77,0 @@ const icon = action.icon ? `<svg class='extCallNotif__icon' draggable='false'><use xlink:href='${this.iconPath}/sprite.svg#${action.icon}'></use></svg>` : ''; |
{ | ||
"name": "@ale-rainbow/rainbow-notification", | ||
"version": "v1.0.6", | ||
"version": "v1.0.7", | ||
"description": "Alcatel-Lucent Enterprise Rainbow Notification", | ||
@@ -5,0 +5,0 @@ "main": "./dist/rainbowNotification.js", |
@@ -54,3 +54,4 @@ | ||
public choice: any[]; // List of choices | ||
public choiceCloselabel: string; // Label for close choice action | ||
public choiceTitleLabel: string; // Title label choice action (optional) | ||
public choiceCloseLabel: string; // Label for close choice action | ||
public choiceHandler: any; // handler function for choice | ||
@@ -57,0 +58,0 @@ |
@@ -8,3 +8,4 @@ export class RainbowNotificationAction { | ||
public choice: any[]; | ||
public choiceCloselabel: string; | ||
public choiceTitlelabel: string = null; | ||
public choiceCloseLabel: string; | ||
public choiceHandler: any; | ||
@@ -30,3 +31,3 @@ public handler: any = null; | ||
choiceElem.style.zIndex = this.choiceVisible ? 1 : -1; | ||
choiceActionElem.textContent = this.choiceVisible ? this.choiceCloselabel : this.label; | ||
choiceActionElem.textContent = this.choiceVisible ? this.choiceCloseLabel : this.label; | ||
} | ||
@@ -76,7 +77,8 @@ }; | ||
if (action.choice) { | ||
const choiceTitle = action.choiceTitlelabel ? `${action.choiceTitlelabel}` : ''; | ||
let choices = action.choice.reduce((buff: string, choice: any) => { | ||
return buff + `<div id='${choice.id}' class='extCallNotif__choice'>${choice.label}</div>`; | ||
}, ''); | ||
choices += `<section id='callNotif_choice_close_${this.id}_${action.name}' class='extCallNotif__choiceClose'>${action.choiceCloselabel}</section>`; | ||
buffer += `<div id='callNotif_choice_${this.id}_${action.name}' class='extCallNotif__choices'>${choices}</div>`; | ||
choices += `<section id='callNotif_choice_close_${this.id}_${action.name}' class='extCallNotif__choiceClose'>${action.choiceCloseLabel}</section>`; | ||
buffer += `<div id='callNotif_choice_${this.id}_${action.name}' class='extCallNotif__choices'>${choiceTitle}${choices}</div>`; | ||
} | ||
@@ -83,0 +85,0 @@ const icon = action.icon ? `<svg class='extCallNotif__icon' draggable='false'><use xlink:href='${this.iconPath}/sprite.svg#${action.icon}'></use></svg>` : ''; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
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
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
20199
482
61