Registry / productivity / teko-text2sql-chatbot-widget

teko-text2sql-chatbot-widget

JSON →
library0.0.14jsnpmunverified

React component library providing a floating chatbot widget that translates natural language into SQL queries, designed for Superset integration. Current stable version is 0.0.14, released about a year ago with no recent updates. Key differentiator: relies on a Chatbot Widget BFF (backend-for-frontend) for authentication, threading, and streaming; does not include client-side permission filtering. Works with React 16.13.1+, includes TypeScript types, and communicates via CustomEvent API.

npm install teko-text2sql-chatbot-widget
INSTALL
IMPORT
SIG · TEKO-TEXT2SQL-CHAT
T
teko-text2sql-chatbot-widget
productivityjavascriptv0.0.14
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

ChatbotWidget
import { ChatbotWidget } from 'teko-text2sql-chatbot-widget'
import ChatbotWidget from 'teko-text2sql-chatbot-widget'
Named export, not default. Must import CSS separately.
CSS
import 'teko-text2sql-chatbot-widget/dist/index.css'
import styles from 'teko-text2sql-chatbot-widget/dist/index.css'
CSS is a side-effect import, not a module. Required for widget styling.
ChatbotWidgetConfig
import { ChatbotWidgetConfig } from 'teko-text2sql-chatbot-widget'
import { ChatbotWidgetConfig } from 'teko-text2sql-chatbot-widget/dist/types'
Config type is exported from main entry. Only available with TypeScript.

Minimal integration example showing component import, CSS import, and usage with required env prop.

import React from 'react'; import { ChatbotWidget } from 'teko-text2sql-chatbot-widget'; import 'teko-text2sql-chatbot-widget/dist/index.css'; function App() { return ( <div> <ChatbotWidget env="prod" position="bottom-right" /> </div> ); }
Debug
Known issues
gotchaCSS must be imported separately. Without the CSS import, the chatbot button and chat interface will be completely unstyled.
fix
Add `import 'teko-text2sql-chatbot-widget/dist/index.css';` to your entry file.
affects: >=0.0.1
gotchaThe widget does not include a built-in authentication mechanism; it relies on same-origin POST /api/v1/tokens with session cookies. A standalone Chatbot Widget BFF must be deployed and configured.
fix
Deploy the Chatbot Widget backend and ensure your app shares the same origin or uses proper CORS/session handling.
affects: >=0.0.1
gotchaThe env prop is required and only accepts 'dev', 'stag', or 'prod'. Passing an invalid or misspelled value will cause the widget to default to an unknown API endpoint.
fix
Use one of the three valid strings: 'dev', 'stag', or 'prod'.
affects: >=0.0.1
gotchaCustomEvent listeners must be attached to the window object. They will not work if attached to a specific DOM element.
fix
Use `window.addEventListener('chatbot:insert-query', handler)`.
affects: >=0.0.1
gotchaThe widget does not support client-side permission filtering; all database/table access decisions must be enforced server-side by the BFF.
fix
Configure permissions in the Chatbot Widget BFF, not in the frontend.
affects: >=0.0.1
Errors
Common errors & fixes
Cannot find module 'teko-text2sql-chatbot-widget/dist/index.css'
Missing or incorrect path to CSS file after npm install.
fix
Ensure the package is installed and the import path matches exactly: `import 'teko-text2sql-chatbot-widget/dist/index.css';`
Attempted import error: 'ChatbotWidget' is not exported from 'teko-text2sql-chatbot-widget' (imported as 'ChatbotWidget').
Using default import syntax instead of named import.
fix
Change import to: `import { ChatbotWidget } from 'teko-text2sql-chatbot-widget';`
TypeError: Cannot read properties of undefined (reading 'chatbot:insert-query')
Trying to add event listener on a non-window object or misspelling the event name.
fix
Use correct syntax: `window.addEventListener('chatbot:insert-query', (e) => { ... });`
Upgrade
Version history
0.0.14latest on npm
Audit
Dependencies
reactrequiredPeer dependency for React component rendering
react-domrequiredPeer dependency for React DOM rendering
Agent activity
26 hits · last 30 days
node
24
Amazon
1
OpenAI (training)
1
Resources
teko-text2sql-chatbot-widget — npm install teko-text2sql-chatbot-widget · libregistry