New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@feedget/widget

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@feedget/widget - npm Package Compare versions

Comparing version
1.0.7
to
1.0.8
+1
-1
package.json
{
"name": "@feedget/widget",
"version": "1.0.7",
"version": "1.0.8",
"description": "Widget de feedback integrado à API Feedget para coleta de feedback de usuários em aplicações web",

@@ -5,0 +5,0 @@ "type": "module",

+101
-143

@@ -14,3 +14,3 @@ # @feedget/widget

[Demo](https://demo.feedget.io) · [Documentação](https://docs.feedget.io) · [Reportar Bug](https://github.com/feedget/widget/issues) · [Solicitar Feature](https://github.com/feedget/widget/issues)
[Demo](https://feedget.io) · [Documentação](https://feedget.io/docs) · [Reportar Bug](hello@feedget.io) · [Solicitar Feature](hello@feedget.io)

@@ -75,4 +75,4 @@ </div>

```tsx
import { FeedgetWidget } from '@feedget/widget/react';
import '@feedget/widget/styles.css';
import { FeedgetWidget } from "@feedget/widget/react";
import "@feedget/widget/styles.css";

@@ -99,8 +99,11 @@ function App() {

// app.component.ts
import { Component, OnInit, OnDestroy } from '@angular/core';
import { createFeedgetWidget, FeedgetWidgetAngular } from '@feedget/widget/angular';
import '@feedget/widget/styles.css';
import { Component, OnInit, OnDestroy } from "@angular/core";
import {
createFeedgetWidget,
FeedgetWidgetAngular,
} from "@feedget/widget/angular";
import "@feedget/widget/styles.css";
@Component({
selector: 'app-root',
selector: "app-root",
template: '<div id="app">Minha Aplicação</div>',

@@ -113,4 +116,4 @@ })

this.widget = createFeedgetWidget({
apiKey: 'feedget_pk_live_abc123...',
apiUrl: 'https://api.feedget.io'
apiKey: "feedget_pk_live_abc123...",
apiUrl: "https://api.feedget.io",
});

@@ -130,8 +133,8 @@

```javascript
import { Feedget } from '@feedget/widget/vanilla';
import '@feedget/widget/styles.css';
import { Feedget } from "@feedget/widget/vanilla";
import "@feedget/widget/styles.css";
Feedget.init({
apiKey: 'feedget_pk_live_abc123...',
apiUrl: 'https://api.feedget.io'
apiKey: "feedget_pk_live_abc123...",
apiUrl: "https://api.feedget.io",
});

@@ -175,7 +178,7 @@ ```

| Propriedade | Tipo | Obrigatório | Descrição |
|-------------|------|-------------|-----------|
| `apiKey` | `string` | Sim | API Key obtida no dashboard Feedget |
| `apiUrl` | `string` | Não | URL da API (default: `https://api.feedget.io`) |
| `metadata` | `object` | Não | Metadata customizada para enviar com feedbacks |
| Propriedade | Tipo | Obrigatório | Descrição |
| ----------- | -------- | ----------- | ---------------------------------------------- |
| `apiKey` | `string` | Sim | API Key obtida no dashboard Feedget |
| `apiUrl` | `string` | Não | URL da API (default: `https://api.feedget.io`) |
| `metadata` | `object` | Não | Metadata customizada para enviar com feedbacks |

@@ -201,4 +204,4 @@ ### Exemplo com Todas as Opções

feature: "checkout",
sessionId: "sess_xyz789"
}
sessionId: "sess_xyz789",
},
}}

@@ -218,4 +221,4 @@ />

// src/App.tsx
import { FeedgetWidget } from '@feedget/widget/react';
import '@feedget/widget/styles.css';
import { FeedgetWidget } from "@feedget/widget/react";
import "@feedget/widget/styles.css";

@@ -239,6 +242,6 @@ function App() {

// app/layout.tsx
'use client';
"use client";
import { FeedgetWidget } from '@feedget/widget/react';
import '@feedget/widget/styles.css';
import { FeedgetWidget } from "@feedget/widget/react";
import "@feedget/widget/styles.css";

@@ -268,5 +271,5 @@ export default function RootLayout({

// pages/_app.tsx
import type { AppProps } from 'next/app';
import { FeedgetWidget } from '@feedget/widget/react';
import '@feedget/widget/styles.css';
import type { AppProps } from "next/app";
import { FeedgetWidget } from "@feedget/widget/react";
import "@feedget/widget/styles.css";

@@ -290,8 +293,8 @@ export default function App({ Component, pageProps }: AppProps) {

// src/main.tsx
import React from 'react';
import ReactDOM from 'react-dom/client';
import App from './App';
import '@feedget/widget/styles.css';
import React from "react";
import ReactDOM from "react-dom/client";
import App from "./App";
import "@feedget/widget/styles.css";
ReactDOM.createRoot(document.getElementById('root')!).render(
ReactDOM.createRoot(document.getElementById("root")!).render(
<React.StrictMode>

@@ -305,3 +308,3 @@ <App />

// src/App.tsx
import { FeedgetWidget } from '@feedget/widget/react';
import { FeedgetWidget } from "@feedget/widget/react";

@@ -327,5 +330,5 @@ function App() {

// app.module.ts
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { AppComponent } from './app.component';
import { NgModule } from "@angular/core";
import { BrowserModule } from "@angular/platform-browser";
import { AppComponent } from "./app.component";

@@ -336,3 +339,3 @@ @NgModule({

providers: [],
bootstrap: [AppComponent]
bootstrap: [AppComponent],
})

@@ -346,11 +349,11 @@ export class AppModule {}

// app.component.ts
import { Component, OnInit, OnDestroy } from '@angular/core';
import { Component, OnInit, OnDestroy } from "@angular/core";
import {
createFeedgetWidget,
FeedgetWidgetAngular,
FeedgetConfig
} from '@feedget/widget/angular';
FeedgetConfig,
} from "@feedget/widget/angular";
@Component({
selector: 'app-root',
selector: "app-root",
template: `

@@ -361,3 +364,3 @@ <div id="app">

`,
styleUrls: ['./app.component.scss']
styleUrls: ["./app.component.scss"],
})

@@ -369,8 +372,8 @@ export class AppComponent implements OnInit, OnDestroy {

const config: FeedgetConfig = {
apiKey: 'feedget_pk_live_abc123...',
apiUrl: 'https://api.feedget.io',
apiKey: "feedget_pk_live_abc123...",
apiUrl: "https://api.feedget.io",
metadata: {
userId: 'user-123',
version: '1.0.0'
}
userId: "user-123",
version: "1.0.0",
},
};

@@ -394,3 +397,3 @@

// styles.scss
@import '@feedget/widget/styles.css';
@import "@feedget/widget/styles.css";
```

@@ -404,14 +407,14 @@

// main.js
import { Feedget } from '@feedget/widget/vanilla';
import '@feedget/widget/styles.css';
import { Feedget } from "@feedget/widget/vanilla";
import "@feedget/widget/styles.css";
// Inicializar quando o DOM estiver pronto
document.addEventListener('DOMContentLoaded', () => {
document.addEventListener("DOMContentLoaded", () => {
Feedget.init({
apiKey: 'feedget_pk_live_abc123...',
apiUrl: 'https://api.feedget.io',
apiKey: "feedget_pk_live_abc123...",
apiUrl: "https://api.feedget.io",
metadata: {
userId: getUserId(), // Função customizada
version: '1.0.0'
}
version: "1.0.0",
},
});

@@ -421,3 +424,3 @@ });

// Para destruir o widget (cleanup)
window.addEventListener('beforeunload', () => {
window.addEventListener("beforeunload", () => {
Feedget.destroy();

@@ -432,23 +435,26 @@ });

<html lang="pt-BR">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Meu Site</title>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Meu Site</title>
<!-- Estilos do Widget -->
<link rel="stylesheet" href="https://unpkg.com/@feedget/widget@latest/dist/style.css">
</head>
<body>
<h1>Meu Site</h1>
<!-- Estilos do Widget -->
<link
rel="stylesheet"
href="https://unpkg.com/@feedget/widget@latest/dist/style.css"
/>
</head>
<body>
<h1>Meu Site</h1>
<!-- Widget Script -->
<script type="module">
import { Feedget } from 'https://unpkg.com/@feedget/widget@latest/dist/vanilla.js';
<!-- Widget Script -->
<script type="module">
import { Feedget } from "https://unpkg.com/@feedget/widget@latest/dist/vanilla.js";
Feedget.init({
apiKey: 'feedget_pk_live_abc123...',
apiUrl: 'https://api.feedget.io'
});
</script>
</body>
Feedget.init({
apiKey: "feedget_pk_live_abc123...",
apiUrl: "https://api.feedget.io",
});
</script>
</body>
</html>

@@ -516,2 +522,3 @@ ```

**Headers:**
```

@@ -523,2 +530,3 @@ X-API-Key: feedget_pk_live_abc123...

**Payload:**
```json

@@ -546,10 +554,10 @@ {

| Código | Descrição |
|--------|-----------|
| `200` | Feedback enviado com sucesso |
| `400` | Dados inválidos (comentário muito curto/longo) |
| `401` | API key inválida ou expirada |
| `403` | Assinatura necessária ou inativa |
| `429` | Rate limit excedido (100 req/min) |
| `500` | Erro interno do servidor |
| Código | Descrição |
| ------ | ---------------------------------------------- |
| `200` | Feedback enviado com sucesso |
| `400` | Dados inválidos (comentário muito curto/longo) |
| `401` | API key inválida ou expirada |
| `403` | Assinatura necessária ou inativa |
| `429` | Rate limit excedido (100 req/min) |
| `500` | Erro interno do servidor |

@@ -605,60 +613,2 @@ ---

## Desenvolvimento Local
### Pré-requisitos
- Node.js >= 18.x
- pnpm >= 8.x
### Setup
```bash
# Clone o repositório
git clone https://github.com/feedget/widget.git
cd widget
# Instale dependências
pnpm install
# Configure variáveis de ambiente
cp .env.example .env
# Edite .env com suas credenciais
nano .env
```
### Comandos
```bash
# Desenvolvimento
pnpm dev
# Build
pnpm build
# Lint
pnpm lint
# Preview
pnpm preview
```
### Estrutura de Build
```bash
dist/
├── index.js # ESM build principal
├── index.cjs # CommonJS build principal
├── react.js # React ESM
├── react.cjs # React CommonJS
├── angular.js # Angular ESM
├── angular.cjs # Angular CommonJS
├── vanilla.js # Vanilla JS ESM
├── vanilla.cjs # Vanilla JS CommonJS
├── style.css # Estilos compilados
└── *.d.ts # TypeScript definitions
```
---
## Troubleshooting

@@ -671,10 +621,13 @@

**Soluções:**
1. Certifique-se de importar o CSS:
```tsx
import '@feedget/widget/styles.css';
import "@feedget/widget/styles.css";
```
2. Verifique se a API Key está configurada:
```tsx
apiKey="feedget_pk_live_..." // não vazio
apiKey = "feedget_pk_live_..."; // não vazio
```

@@ -691,2 +644,3 @@

**Soluções:**
1. Gere uma nova API key no dashboard Feedget

@@ -702,2 +656,3 @@ 2. Verifique se a key começa com `feedget_pk_`

**Soluções:**
1. Verifique status da assinatura no dashboard

@@ -713,2 +668,3 @@ 2. Confirme método de pagamento

**Soluções:**
1. Aguarde 1 minuto antes de tentar novamente

@@ -724,2 +680,3 @@ 2. Implemente debounce no lado do cliente

**Soluções:**
1. Verifique CORS das imagens externas

@@ -780,2 +737,3 @@ 2. Confirme que html2canvas foi instalado:

Sim, o widget é compatível com:
- Chrome/Edge (últimas 2 versões)

@@ -782,0 +740,0 @@ - Firefox (últimas 2 versões)