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

@bruit/component

Package Overview
Dependencies
Maintainers
3
Versions
162
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bruit/component - npm Package Compare versions

Comparing version 2.0.11-plop to 2.0.12-plop

2

dist/bruit/bruit.esm.js

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

import{p as o,b as r}from"./p-a032bc54.js";o().then(o=>r([["bruit-io_3",[[0,"bruit-modal",{config:[1,"brt-config"],modalOpened:[32],modalBrtField:[32],modalError:[32],_bruitIoConfig:[32],rererenderBool:[32],open:[64],sendFeedback:[64],sendError:[64]}],[4,"bruit-io",{config:[1025,"brt-config"],data:[1040],dataFn:[1040],_config:[32],setConfig:[64],setData:[64],setDataFn:[64]}],[0,"bruit-rating",{value:[1538],max:[1538],color:[1],offColor:[1,"off-color"],onBorderColor:[32]}]]]],{resourcesUrl:o}));
import{p as o,b as r}from"./p-a032bc54.js";o().then(o=>r([["bruit-io_3",[[0,"bruit-modal",{modalOpened:[32],modalBrtField:[32],modalError:[32],bruitIoConfig:[32],rererenderBool:[32],open:[64]}],[4,"bruit-io",{config:[1025,"brt-config"],data:[1040],dataFn:[1040],_config:[32]}],[0,"bruit-rating",{value:[1538],max:[1538],color:[1],offColor:[1,"off-color"],onBorderColor:[32]}]]]],{resourcesUrl:o}));

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

System.register(["./p-8e3d27d9.system.js"],function(){"use strict";var r,o;return{setters:[function(e){r=e.p;o=e.b}],execute:function(){r().then(function(r){return o([["bruit-io_3.system",[[0,"bruit-modal",{config:[1,"brt-config"],modalOpened:[32],modalBrtField:[32],modalError:[32],_bruitIoConfig:[32],rererenderBool:[32],open:[64],sendFeedback:[64],sendError:[64]}],[4,"bruit-io",{config:[1025,"brt-config"],data:[1040],dataFn:[1040],_config:[32],setConfig:[64],setData:[64],setDataFn:[64]}],[0,"bruit-rating",{value:[1538],max:[1538],color:[1],offColor:[1,"off-color"],onBorderColor:[32]}]]]],{resourcesUrl:r})})}}});
System.register(["./p-8e3d27d9.system.js"],function(){"use strict";var r,o;return{setters:[function(e){r=e.p;o=e.b}],execute:function(){r().then(function(r){return o([["bruit-io_3.system",[[0,"bruit-modal",{modalOpened:[32],modalBrtField:[32],modalError:[32],bruitIoConfig:[32],rererenderBool:[32],open:[64]}],[4,"bruit-io",{config:[1025,"brt-config"],data:[1040],dataFn:[1040],_config:[32]}],[0,"bruit-rating",{value:[1538],max:[1538],color:[1],offColor:[1,"off-color"],onBorderColor:[32]}]]]],{resourcesUrl:r})})}}});

@@ -6,3 +6,3 @@ 'use strict';

__chunk_1.patchBrowser().then(resourcesUrl => {
return __chunk_1.bootstrapLazy([["bruit-io_3.cjs",[[0,"bruit-modal",{"config":[1,"brt-config"],"modalOpened":[32],"modalBrtField":[32],"modalError":[32],"_bruitIoConfig":[32],"rererenderBool":[32],"open":[64],"sendFeedback":[64],"sendError":[64]}],[4,"bruit-io",{"config":[1025,"brt-config"],"data":[1040],"dataFn":[1040],"_config":[32],"setConfig":[64],"setData":[64],"setDataFn":[64]}],[0,"bruit-rating",{"value":[1538],"max":[1538],"color":[1],"offColor":[1,"off-color"],"onBorderColor":[32]}]]]], { resourcesUrl });
return __chunk_1.bootstrapLazy([["bruit-io_3.cjs",[[0,"bruit-modal",{"modalOpened":[32],"modalBrtField":[32],"modalError":[32],"bruitIoConfig":[32],"rererenderBool":[32],"open":[64]}],[4,"bruit-io",{"config":[1025,"brt-config"],"data":[1040],"dataFn":[1040],"_config":[32]}],[0,"bruit-rating",{"value":[1538],"max":[1538],"color":[1],"offColor":[1,"off-color"],"onBorderColor":[32]}]]]], { resourcesUrl });
});

@@ -9,3 +9,3 @@ 'use strict';

return __chunk_1.patchEsm().then(() => {
__chunk_1.bootstrapLazy([["bruit-io_3.cjs",[[0,"bruit-modal",{"config":[1,"brt-config"],"modalOpened":[32],"modalBrtField":[32],"modalError":[32],"_bruitIoConfig":[32],"rererenderBool":[32],"open":[64],"sendFeedback":[64],"sendError":[64]}],[4,"bruit-io",{"config":[1025,"brt-config"],"data":[1040],"dataFn":[1040],"_config":[32],"setConfig":[64],"setData":[64],"setDataFn":[64]}],[0,"bruit-rating",{"value":[1538],"max":[1538],"color":[1],"offColor":[1,"off-color"],"onBorderColor":[32]}]]]], options);
__chunk_1.bootstrapLazy([["bruit-io_3.cjs",[[0,"bruit-modal",{"modalOpened":[32],"modalBrtField":[32],"modalError":[32],"bruitIoConfig":[32],"rererenderBool":[32],"open":[64]}],[4,"bruit-io",{"config":[1025,"brt-config"],"data":[1040],"dataFn":[1040],"_config":[32]}],[0,"bruit-rating",{"value":[1538],"max":[1538],"color":[1],"offColor":[1,"off-color"],"onBorderColor":[32]}]]]], options);
});

@@ -12,0 +12,0 @@ };

{
"entries": [
"components/bruit-modal/bruit-modal.js",
"components/bruit-io/bruit-io.js",
"components/bruit-rating/bruit-rating.js"
"components/bruit-rating/bruit-rating.js",
"components/bruit-modal/bruit-modal.js"
],

@@ -7,0 +7,0 @@ "compiler": {

@@ -34,3 +34,3 @@ import { h } from '@stencil/core';

if (!configError) {
this._config = new BruitIoConfig(_newConfig);
this._config = _newConfig;
}

@@ -42,17 +42,2 @@ else {

}
//SETTER
async setConfig(conf) {
// console.log('setConfig ', conf);
// console.log('setConfig ', typeof conf);
// console.log('setConfig ', conf['__proto__'].constructor.name);
this.config = conf;
}
async setData(datap) {
// console.log('setData ', datap)
this.data = datap;
}
async setDataFn(fnp) {
// console.log('setDataFn ', fnp)
this.dataFn = fnp;
}
/**

@@ -74,8 +59,7 @@ * fired on component loading before render()

newFeedback() {
const modal = document.getElementsByTagName('bruit-modal')[0];
if (modal) {
modal.open(this._config, this.data, this.dataFn);
if (Bruit.bruitModalElement) {
Bruit.bruitModalElement.open(this._config, this.data, this.dataFn);
}
else {
//error
//error?
}

@@ -203,79 +187,2 @@ }

}]; }
static get methods() { return {
"setConfig": {
"complexType": {
"signature": "(conf: string | BrtConfig) => Promise<void>",
"parameters": [{
"tags": [],
"text": ""
}],
"references": {
"Promise": {
"location": "global"
},
"BrtConfig": {
"location": "import",
"path": "@bruit/types"
}
},
"return": "Promise<void>"
},
"docs": {
"text": "",
"tags": []
}
},
"setData": {
"complexType": {
"signature": "(datap: BrtData[]) => Promise<void>",
"parameters": [{
"tags": [],
"text": ""
}],
"references": {
"Promise": {
"location": "global"
},
"Array": {
"location": "global"
},
"BrtData": {
"location": "import",
"path": "@bruit/types"
}
},
"return": "Promise<void>"
},
"docs": {
"text": "",
"tags": []
}
},
"setDataFn": {
"complexType": {
"signature": "(fnp: () => BrtData[] | Promise<BrtData[]>) => Promise<void>",
"parameters": [{
"tags": [],
"text": ""
}],
"references": {
"Promise": {
"location": "global"
},
"Array": {
"location": "global"
},
"BrtData": {
"location": "import",
"path": "@bruit/types"
}
},
"return": "Promise<void>"
},
"docs": {
"text": "",
"tags": []
}
}
}; }
static get elementRef() { return "bruitIoElement"; }

@@ -282,0 +189,0 @@ static get watchers() { return [{

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

import { Bruit } from '@bruit/core/lib/core.esm';
import { BrtFieldType } from '@bruit/types/dist/enums/brt-field-type';
import { h } from '@stencil/core';
import { SubmitButtonState } from '../../enums/submitButtonState.enum';
import { BruitIoConfig } from '../../models/bruit-io-config.class';
export class BruitModal {

@@ -17,41 +17,2 @@ constructor() {

}
/**
* test validity of config and assign to internal config
* @param newConfig the new value of config
*/
initConfig(newConfig) {
console.log('initConfig! ', newConfig);
let _newConfig;
let configError;
if (newConfig) {
if (typeof newConfig === 'string') {
try {
_newConfig = JSON.parse(newConfig);
}
catch (_a) {
configError = {
code: 100,
text: 'bad config format (must be a json or stringified json)'
};
}
}
else {
_newConfig = newConfig;
}
}
if (!configError) {
try {
console.log('setBruit! ', Bruit);
Bruit.init(_newConfig);
}
catch (error) {
this.onError.emit(error);
console.error(error);
}
}
else {
this.onError.emit(configError);
console.error(configError);
}
}
rererender() {

@@ -65,4 +26,2 @@ this.rererenderBool = !!this.rererenderBool;

console.info('[BRUIT.IO] - bruit started ...');
// first init
this.initConfig(this.config);
}

@@ -87,73 +46,74 @@ hideVirtualKeyboard() {

/**
* called on click on component
* called on click on bruit-io
* init a feedback, wait user submit, send feedback
*/
open(bruitIoConfig, data, dataFn) {
this._bruitIoConfig = bruitIoConfig;
//if there's already a current feedback, we have a probleme!!! => destroy it
let preparePromise;
if (this._currentFeedback) {
preparePromise = this.destroyFeedback();
open(brtConfig = Bruit.modalConfig, data, dataFn) {
const error = BruitIoConfig.haveError(brtConfig);
if (error) {
return Promise.reject(error);
}
else {
preparePromise = Promise.resolve();
}
return preparePromise
.then(() => {
return this.openModal()
.then(() => this.waitOnSubmit())
.then(dataFromModal => {
//user submit with data dataFromModal
// if the configuration says that the modal must be closed directly
if (this._bruitIoConfig.closeModalOnSubmit) {
// close the modal and send feedback
this.closeModal();
return this.hideVirtualKeyboard().then(() => this.waitRendering().then(() => Bruit.sendFeedbackFromModal(dataFromModal, data, dataFn, this._bruitIoConfig.screenshot)));
}
else {
// else, we display de loader
this.setSubmitButtonState(SubmitButtonState.LOADING);
// send feedback
return this.hideVirtualKeyboard().then(() => this.waitRendering().then(() => Bruit.sendFeedbackFromModal(dataFromModal, data, dataFn, this._bruitIoConfig.screenshot).then(() => {
// we display the "validation" for <durationBeforeClosing> milliseconds
this.setSubmitButtonState(SubmitButtonState.CHECKED);
return new Promise(resolve => {
setTimeout(() => resolve(), this._bruitIoConfig.durationBeforeClosing);
});
})));
}
})
.then(() => {
// feedback is send !
return this.destroyFeedback();
// end
});
})
.catch(err => {
if (err === 'close') {
this.destroyFeedback();
// console.log('feedback canceled');
;
this.bruitIoConfig = new BruitIoConfig(brtConfig);
return this.waitRendering().then(() => {
//if there's already a current feedback, we have a probleme!!! => destroy it
let destroyFeedbackPromise;
if (this._currentFeedback) {
destroyFeedbackPromise = this.destroyFeedback();
}
else {
this.onError.emit(err);
if (err && err.text) {
this.modalError = err;
destroyFeedbackPromise = Promise.resolve();
}
return destroyFeedbackPromise
.then(() => {
return this.openModal()
.then(() => this.waitOnSubmit())
.then(dataFromModal => {
//user submit with data dataFromModal
// if the configuration says that the modal must be closed directly
if (this.bruitIoConfig.closeModalOnSubmit) {
// close the modal and send feedback
this.closeModal();
return this.hideVirtualKeyboard().then(() => this.waitRendering().then(() => Bruit.sendFeedbackFromModal(dataFromModal, data, dataFn, this.bruitIoConfig.screenshot)));
}
else {
// else, we display de loader
this.setSubmitButtonState(SubmitButtonState.LOADING);
// send feedback
return this.hideVirtualKeyboard().then(() => this.waitRendering().then(() => Bruit.sendFeedbackFromModal(dataFromModal, data, dataFn, this.bruitIoConfig.screenshot).then(() => {
// we display the "validation" for <durationBeforeClosing> milliseconds
this.setSubmitButtonState(SubmitButtonState.CHECKED);
return new Promise(resolve => {
setTimeout(() => resolve(), this.bruitIoConfig.durationBeforeClosing);
});
})));
}
})
.then(() => {
// feedback is send !
return this.destroyFeedback();
// end
});
})
.catch(err => {
if (err === 'close') {
this.destroyFeedback();
// console.log('feedback canceled');
}
else {
this.modalError = {
code: 0,
text: 'An Unexpected Error Occurred'
};
this.onError.emit(err);
if (err && err.text) {
this.modalError = err;
}
else {
this.modalError = {
code: 0,
text: 'An Unexpected Error Occurred'
};
}
console.error('BRUIT.IO error : ', err);
setTimeout(() => this.destroyFeedback(), 3000);
}
console.error('BRUIT.IO error : ', err);
setTimeout(() => this.destroyFeedback(), 3000);
}
});
});
}
async sendFeedback(data = [], dataFn, agreement = false, screenshotConfig) {
return Bruit.sendFeedback(data, dataFn, agreement, screenshotConfig);
}
async sendError(error) {
return Bruit.sendError(error);
}
/**

@@ -175,3 +135,3 @@ * close the modal and destroy the _currentFeedback

this.modalOpened = true;
this.modalBrtField = JSON.parse(JSON.stringify(this._bruitIoConfig.form));
this.modalBrtField = JSON.parse(JSON.stringify(this.bruitIoConfig.form));
return new Promise(resolve => {

@@ -274,3 +234,3 @@ setTimeout(() => {

render() {
if (this._bruitIoConfig) {
if (this.bruitIoConfig) {
return (h("span", null,

@@ -285,12 +245,12 @@ this.modal(),

modal() {
return (h("div", { id: "bruit-io-wrapper", class: this.modalOpened ? 'bruit-open' : 'bruit-close', style: { 'background-color': this._bruitIoConfig ? this._bruitIoConfig.colors.background : 'transparent' }, "data-html2canvas-ignore": true },
return (h("div", { id: "bruit-io-wrapper", class: this.modalOpened ? 'bruit-open' : 'bruit-close', style: { 'background-color': this.bruitIoConfig ? this.bruitIoConfig.colors.background : 'transparent' }, "data-html2canvas-ignore": true },
h("div", { class: "bruit-modal", onClick: event => {
event.stopPropagation();
} },
this._bruitIoConfig ? this.modalHeader() : undefined,
this._bruitIoConfig ? this.modalContent() : undefined)));
this.bruitIoConfig ? this.modalHeader() : undefined,
this.bruitIoConfig ? this.modalContent() : undefined)));
}
modalHeader() {
return (h("div", { class: "bruit-head", style: { 'background-color': this._bruitIoConfig.colors.header } },
h("h1", { class: "bruit-title" }, this._bruitIoConfig.labels.title),
return (h("div", { class: "bruit-head", style: { 'background-color': this.bruitIoConfig.colors.header } },
h("h1", { class: "bruit-title" }, this.bruitIoConfig.labels.title),
h("a", { id: "bruit-io-btn-close" },

@@ -301,5 +261,5 @@ h("svg", { width: "24", height: "24", xmlns: "http://www.w3.org/2000/svg", "fill-rule": "evenodd", "clip-rule": "evenodd", fill: "white" },

modalSubHeader() {
if (this._bruitIoConfig.labels.introduction) {
if (this.bruitIoConfig.labels.introduction) {
return (h("div", { class: "bruit-sub-head" },
h("p", null, this._bruitIoConfig.labels.introduction)));
h("p", null, this.bruitIoConfig.labels.introduction)));
}

@@ -311,3 +271,3 @@ else {

modalContent() {
return (h("div", { class: "bruit-content", style: { 'background-color': this._bruitIoConfig.colors.body } },
return (h("div", { class: "bruit-content", style: { 'background-color': this.bruitIoConfig.colors.body } },
this.modalSubHeader(),

@@ -321,6 +281,6 @@ h("form", { id: "bruit-io-form" },

if (!this.modalError) {
return (h("button", { type: "submit", id: "bruit-io-submit-button", style: { color: this._bruitIoConfig.colors.header, 'border-color': this._bruitIoConfig.colors.header } },
return (h("button", { type: "submit", id: "bruit-io-submit-button", style: { color: this.bruitIoConfig.colors.header, 'border-color': this.bruitIoConfig.colors.header } },
h("svg", { class: "bruit-svg-icon", viewBox: "0 0 20 20" },
h("path", { class: "bruit-no-color", fill: this._bruitIoConfig.colors.header, d: "M7.629,14.566c0.125,0.125,0.291,0.188,0.456,0.188c0.164,0,0.329-0.062,0.456-0.188l8.219-8.221c0.252-0.252,0.252-0.659,0-0.911c-0.252-0.252-0.659-0.252-0.911,0l-7.764,7.763L4.152,9.267c-0.252-0.251-0.66-0.251-0.911,0c-0.252,0.252-0.252,0.66,0,0.911L7.629,14.566z" })),
h("span", { id: "button-submit-label" }, this._bruitIoConfig.labels.button)));
h("path", { class: "bruit-no-color", fill: this.bruitIoConfig.colors.header, d: "M7.629,14.566c0.125,0.125,0.291,0.188,0.456,0.188c0.164,0,0.329-0.062,0.456-0.188l8.219-8.221c0.252-0.252,0.252-0.659,0-0.911c-0.252-0.252-0.659-0.252-0.911,0l-7.764,7.763L4.152,9.267c-0.252-0.251-0.66-0.251-0.911,0c-0.252,0.252-0.252,0.66,0,0.911L7.629,14.566z" })),
h("span", { id: "button-submit-label" }, this.bruitIoConfig.labels.button)));
}

@@ -401,3 +361,3 @@ else {

return (h("div", { class: "bruit-group bruit-without-bar" },
h("bruit-rating", { class: "bruit-has-value", id: field.id, color: this._bruitIoConfig.colors.focus, offColor: "#999", value: field.value, max: field.max, onValueChange: e => (field.value = e.detail) }),
h("bruit-rating", { class: "bruit-has-value", id: field.id, color: this.bruitIoConfig.colors.focus, offColor: "#999", value: field.value, max: field.max, onValueChange: e => (field.value = e.detail) }),
h("label", { htmlFor: field.id }, field.label)));

@@ -408,11 +368,11 @@ }

'background-color: ' +
this._bruitIoConfig.colors.focus +
this.bruitIoConfig.colors.focus +
'}' +
'bruit-modal .bruit-group input:not([type="checkbox"]):invalid ~.bruit-bar:before, bruit-modal .bruit-group input:not([type="checkbox"]):invalid ~.bruit-bar:after{' +
'background-color: ' +
this._bruitIoConfig.colors.errors +
this.bruitIoConfig.colors.errors +
'}' +
'bruit-modal button#bruit-io-submit-button:hover{' +
'background-color: ' +
this._bruitIoConfig.colors.header +
this.bruitIoConfig.colors.header +
'!important ;' +

@@ -424,23 +384,23 @@ 'color: white !important;' +

'border-left-color: ' +
this._bruitIoConfig.colors.header +
this.bruitIoConfig.colors.header +
'!important;}' +
'bruit-modal .bruit-group input[type="checkbox"]:checked+label, bruit-modal .bruit-group input[type="checkbox"]+label:after{' +
'border-color: ' +
this._bruitIoConfig.colors.focus +
this.bruitIoConfig.colors.focus +
'}' +
'bruit-modal .bruit-group input:not([type="checkbox"]).bruit-has-value:invalid~label, bruit-modal .bruit-group input:not([type="checkbox"]):focus:invalid~label{' +
'color: ' +
this._bruitIoConfig.colors.errors +
this.bruitIoConfig.colors.errors +
'}' +
'bruit-modal .bruit-group input:not([type="checkbox"]).bruit-has-value~label, bruit-modal .bruit-group input:not([type="checkbox"]):focus~label{' +
'color: ' +
this._bruitIoConfig.colors.focus +
this.bruitIoConfig.colors.focus +
'}' +
'bruit-modal .bruit-group textarea.bruit-has-value~label, bruit-modal .bruit-group textarea:focus~label{' +
'color: ' +
this._bruitIoConfig.colors.focus +
this.bruitIoConfig.colors.focus +
'}' +
'bruit-modal .bruit-group textarea.bruit-has-value:invalid~label{' +
'color: ' +
this._bruitIoConfig.colors.errors +
this.bruitIoConfig.colors.errors +
'}'));

@@ -455,26 +415,2 @@ }

}; }
static get properties() { return {
"config": {
"type": "string",
"mutable": false,
"complexType": {
"original": "BrtCoreConfig | string",
"resolved": "BrtCoreConfig | string",
"references": {
"BrtCoreConfig": {
"location": "import",
"path": "@bruit/types"
}
}
},
"required": false,
"optional": false,
"docs": {
"tags": [],
"text": ""
},
"attribute": "brt-config",
"reflect": false
}
}; }
static get states() { return {

@@ -484,3 +420,3 @@ "modalOpened": {},

"modalError": {},
"_bruitIoConfig": {},
"bruitIoConfig": {},
"rererenderBool": {}

@@ -507,3 +443,3 @@ }; }

"complexType": {
"signature": "(bruitIoConfig: BruitIoConfig, data?: BrtData[], dataFn?: () => BrtData[] | Promise<BrtData[]>) => Promise<void>",
"signature": "(brtConfig?: BrtConfig, data?: BrtData[], dataFn?: () => BrtData[] | Promise<BrtData[]>) => Promise<void>",
"parameters": [{

@@ -523,5 +459,5 @@ "tags": [],

},
"BruitIoConfig": {
"BrtConfig": {
"location": "import",
"path": "../../models/bruit-io-config.class"
"path": "@bruit/types"
},

@@ -539,67 +475,8 @@ "Array": {

"docs": {
"text": "called on click on component\ninit a feedback, wait user submit, send feedback",
"text": "called on click on bruit-io\ninit a feedback, wait user submit, send feedback",
"tags": []
}
},
"sendFeedback": {
"complexType": {
"signature": "(data?: BrtData[], dataFn?: () => BrtData[] | Promise<BrtData[]>, agreement?: boolean, screenshotConfig?: BrtScreenshot) => Promise<any>",
"parameters": [{
"tags": [],
"text": ""
}, {
"tags": [],
"text": ""
}, {
"tags": [],
"text": ""
}, {
"tags": [],
"text": ""
}],
"references": {
"Promise": {
"location": "global"
},
"BrtData": {
"location": "import",
"path": "@bruit/types"
},
"BrtScreenshot": {
"location": "import",
"path": "@bruit/types/dist/interfaces/brt-screenshot"
}
},
"return": "Promise<any>"
},
"docs": {
"text": "",
"tags": []
}
},
"sendError": {
"complexType": {
"signature": "(error: string) => Promise<any>",
"parameters": [{
"tags": [],
"text": ""
}],
"references": {
"Promise": {
"location": "global"
}
},
"return": "Promise<any>"
},
"docs": {
"text": "",
"tags": []
}
}
}; }
static get elementRef() { return "bruitCoreHtmlElement"; }
static get watchers() { return [{
"propName": "config",
"methodName": "initConfig"
}]; }
}

@@ -11,11 +11,4 @@ /* tslint:disable */

BrtConfig,
BrtCoreConfig,
BrtData,
} from '@bruit/types';
import {
BruitIoConfig,
} from './models/bruit-io-config.class';
import {
BrtScreenshot,
} from '@bruit/types/dist/interfaces/brt-screenshot';

@@ -33,14 +26,8 @@ export namespace Components {

'dataFn': () => Array<BrtData> | Promise<Array<BrtData>>;
'setConfig': (conf: string | BrtConfig) => Promise<void>;
'setData': (datap: BrtData[]) => Promise<void>;
'setDataFn': (fnp: () => BrtData[] | Promise<BrtData[]>) => Promise<void>;
}
interface BruitModal {
'config': BrtCoreConfig | string;
/**
* called on click on component init a feedback, wait user submit, send feedback
* called on click on bruit-io init a feedback, wait user submit, send feedback
*/
'open': (bruitIoConfig: BruitIoConfig, data?: BrtData[], dataFn?: () => BrtData[] | Promise<BrtData[]>) => Promise<void>;
'sendError': (error: string) => Promise<any>;
'sendFeedback': (data?: BrtData[], dataFn?: () => BrtData[] | Promise<BrtData[]>, agreement?: boolean, screenshotConfig?: BrtScreenshot) => Promise<any>;
'open': (brtConfig?: BrtConfig, data?: BrtData[], dataFn?: () => BrtData[] | Promise<BrtData[]>) => Promise<void>;
}

@@ -99,3 +86,2 @@ interface BruitRating {

interface BruitModal extends JSXBase.HTMLAttributes<HTMLBruitModalElement> {
'config'?: BrtCoreConfig | string;
/**

@@ -102,0 +88,0 @@ * emit bruit-error on internal error or config error ex : BruitIo.addEventListener('onError',error=>...)

import { BrtConfig, BrtData } from '@bruit/types';
import { EventEmitter } from '../../stencil.core';
import { BruitIoConfig } from '../../models/bruit-io-config.class';
export declare class BruitIo {

@@ -20,5 +19,2 @@ config: BrtConfig | string;

dataFn: () => Array<BrtData> | Promise<Array<BrtData>>;
setConfig(conf: BrtConfig | string): Promise<void>;
setData(datap: Array<BrtData>): Promise<void>;
setDataFn(fnp: () => Array<BrtData> | Promise<Array<BrtData>>): Promise<void>;
/**

@@ -32,3 +28,3 @@ * emit bruit-error on internal error or config error

*/
_config: BruitIoConfig;
_config: BrtConfig;
bruitIoElement: HTMLBruitIoElement;

@@ -35,0 +31,0 @@ private _haveInnerElement;

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

import { BrtCoreConfig, BrtData, BrtError, BrtField } from '@bruit/types';
import { BrtScreenshot } from '@bruit/types/dist/interfaces/brt-screenshot';
import { BrtConfig, BrtData, BrtError, BrtField } from '@bruit/types';
import { EventEmitter } from '../../stencil.core';

@@ -7,9 +6,3 @@ import { SubmitButtonState } from '../../enums/submitButtonState.enum';

export declare class BruitModal {
config: BrtCoreConfig | string;
/**
* test validity of config and assign to internal config
* @param newConfig the new value of config
*/
initConfig(newConfig: BrtCoreConfig | string): void;
/**
* emit bruit-error on internal error or config error

@@ -38,3 +31,3 @@ * ex : BruitIo.addEventListener('onError',error=>...)

*/
_bruitIoConfig: BruitIoConfig;
bruitIoConfig: BruitIoConfig;
bruitCoreHtmlElement: HTMLElement;

@@ -50,8 +43,6 @@ rererenderBool: boolean;

/**
* called on click on component
* called on click on bruit-io
* init a feedback, wait user submit, send feedback
*/
open(bruitIoConfig: BruitIoConfig, data?: Array<BrtData>, dataFn?: () => Array<BrtData> | Promise<Array<BrtData>>): Promise<void>;
sendFeedback(data?: BrtData[], dataFn?: () => BrtData[] | Promise<BrtData[]>, agreement?: boolean, screenshotConfig?: BrtScreenshot): Promise<any>;
sendError(error: string): Promise<any>;
open(brtConfig?: BrtConfig, data?: Array<BrtData>, dataFn?: () => Array<BrtData> | Promise<Array<BrtData>>): Promise<void>;
/**

@@ -58,0 +49,0 @@ * close the modal and destroy the _currentFeedback

{
"name": "@bruit/component",
"version": "2.0.11-plop",
"version": "2.0.12-plop",
"description": "send your feedbacks with bruit.io",

@@ -54,5 +54,4 @@ "keywords": [

"dependencies": {
"@bruit/core": "^2.0.9-plop",
"@bruit/types": "0.3.2-2"
}
}

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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