Skip to content

Commit

Permalink
Update storybook
Browse files Browse the repository at this point in the history
  • Loading branch information
MicicFilip committed Jul 16, 2024
1 parent c49125c commit a84ab5d
Show file tree
Hide file tree
Showing 12 changed files with 41 additions and 48 deletions.
16 changes: 8 additions & 8 deletions examples/react/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion examples/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"preview": "vite preview"
},
"dependencies": {
"@vortexwest/chat-widget-react": "^0.1.4",
"@vortexwest/chat-widget-react": "^0.1.7",
"react": "^18.3.1",
"react-dom": "^18.3.1"
},
Expand Down
1 change: 0 additions & 1 deletion examples/react/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ function App() {
<img className="vortex-logo" src={logo} />
<RasaChatbotWidget
serverUrl="https://pro.vortexwe.com"
initialPayload="/session_start"
toggleFullScreen
onChatWidgetOpened={console.log}
/>
Expand Down
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions packages/react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vortexwest/chat-widget-react",
"version": "0.1.6",
"version": "0.1.7",
"publishConfig": {
"access": "restricted"
},
Expand All @@ -26,7 +26,7 @@
"tsc": "tsc -p . --outDir ./dist"
},
"dependencies": {
"@vortexwest/chat-widget-ui": "^0.1.5"
"@vortexwest/chat-widget-ui": "^0.1.6"
},
"devDependencies": {
"@types/react": "^18.3.3",
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vortexwest/chat-widget-ui",
"version": "0.1.4",
"version": "0.1.6",
"publishConfig": {
"access": "restricted"
},
Expand Down
10 changes: 1 addition & 9 deletions packages/ui/src/components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,6 @@ export namespace Components {
* Indicates time between message is received and printed.
*/
"messageDelay": number;
/**
* Format of the message timestamp
*/
"messageTimestamp": string;
/**
* If set to True, instead of the default WebSocket communication, the widget will use the HTTP protocol.
*/
Expand Down Expand Up @@ -889,10 +885,6 @@ declare namespace LocalJSX {
* Indicates time between message is received and printed.
*/
"messageDelay"?: number;
/**
* Format of the message timestamp
*/
"messageTimestamp"?: string;
/**
* Emitted when the Chat Widget is opened by the user
*/
Expand Down Expand Up @@ -936,7 +928,7 @@ declare namespace LocalJSX {
/**
* Url of the Rasa chatbot backend server (example: https://example.com)
*/
"serverUrl"?: string;
"serverUrl": string;
/**
* If set to True, bot messages will be received as stream (printing word by word).
*/
Expand Down
3 changes: 1 addition & 2 deletions packages/ui/src/rasa-chatbot-widget/rasa-chatbot-widget.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,7 @@ export class RasaChatbotWidget {
/**
* Url of the Rasa chatbot backend server (example: https://example.com)
*/
// @Prop() serverUrl!: string;
@Prop() serverUrl: string = 'https://pro.vortexwe.com';
@Prop() serverUrl!: string;

/**
* User authentication token
Expand Down
35 changes: 17 additions & 18 deletions packages/ui/src/rasa-chatbot-widget/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,23 @@

## Properties

| Property | Attribute | Description | Type | Default |
| ------------------------- | --------------------------- | ------------------------------------------------------------------------------------------------------ | --------- | ---------------------------- |
| `authenticationToken` | `authentication-token` | User authentication token | `string` | `''` |
| `autoOpen` | `auto-open` | If set to True, it will open the chat, triggering the 'initialPayload' immediately if set. | `boolean` | `false` |
| `botIcon` | `bot-icon` | Static icon for the chatbot | `string` | `''` |
| `displayTimestamp` | `display-timestamp` | Indicates if a message timestamp should be displayed | `boolean` | `false` |
| `errorMessage` | `error-message` | Message that should be displayed if an error occurs | `string` | `'Something bad happened'` |
| `initialPayload` | `initial-payload` | Data that should be sent on Chat Widget initialization | `string` | `''` |
| `inputMessagePlaceholder` | `input-message-placeholder` | Message placeholder for input | `string` | `'Type your message here'` |
| `messageDelay` | `message-delay` | Indicates time between message is received and printed. | `number` | `600` |
| `messageTimestamp` | `message-timestamp` | Format of the message timestamp | `string` | `''` |
| `restEnabled` | `rest-enabled` | If set to True, instead of the default WebSocket communication, the widget will use the HTTP protocol. | `boolean` | `false` |
| `senderId` | `sender-id` | ID of a user engaged with the Chat Widget | `string` | `''` |
| `serverUrl` | `server-url` | Url of the Rasa chatbot backend server (example: https://example.com) | `string` | `'https://pro.vortexwe.com'` |
| `streamMessages` | `stream-messages` | If set to True, bot messages will be received as stream (printing word by word). | `boolean` | `false` |
| `toggleFullScreen` | `toggle-full-screen` | Indicates whether the chat messenger can be toggled to full screen mode. | `boolean` | `false` |
| `widgetIcon` | `widget-icon` | Static icon for the widget | `string` | `''` |
| `widgetTitle` | `widget-title` | Title of the Chat Widget | `string` | `'Rasa Widget'` |
| Property | Attribute | Description | Type | Default |
| ------------------------- | --------------------------- | ------------------------------------------------------------------------------------------------------ | --------- | -------------------------- |
| `authenticationToken` | `authentication-token` | User authentication token | `string` | `''` |
| `autoOpen` | `auto-open` | If set to True, it will open the chat, triggering the 'initialPayload' immediately if set. | `boolean` | `false` |
| `botIcon` | `bot-icon` | Static icon for the chatbot | `string` | `''` |
| `displayTimestamp` | `display-timestamp` | Indicates if a message timestamp should be displayed | `boolean` | `false` |
| `errorMessage` | `error-message` | Message that should be displayed if an error occurs | `string` | `'Something bad happened'` |
| `initialPayload` | `initial-payload` | Data that should be sent on Chat Widget initialization | `string` | `''` |
| `inputMessagePlaceholder` | `input-message-placeholder` | Message placeholder for input | `string` | `'Type your message here'` |
| `messageDelay` | `message-delay` | Indicates time between message is received and printed. | `number` | `600` |
| `restEnabled` | `rest-enabled` | If set to True, instead of the default WebSocket communication, the widget will use the HTTP protocol. | `boolean` | `false` |
| `senderId` | `sender-id` | ID of a user engaged with the Chat Widget | `string` | `''` |
| `serverUrl` _(required)_ | `server-url` | Url of the Rasa chatbot backend server (example: https://example.com) | `string` | `undefined` |
| `streamMessages` | `stream-messages` | If set to True, bot messages will be received as stream (printing word by word). | `boolean` | `false` |
| `toggleFullScreen` | `toggle-full-screen` | Indicates whether the chat messenger can be toggled to full screen mode. | `boolean` | `false` |
| `widgetIcon` | `widget-icon` | Static icon for the widget | `string` | `''` |
| `widgetTitle` | `widget-title` | Title of the Chat Widget | `string` | `'Rasa Widget'` |


## Events
Expand Down
3 changes: 2 additions & 1 deletion storybook/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,5 @@ dist-ssr
*.sln
*.sw?

*storybook.log
*storybook.log
storybook-static/
2 changes: 1 addition & 1 deletion storybook/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"vite": "^5.2.0"
},
"dependencies": {
"@vortexwest/chat-widget-ui": "^0.1.0",
"@vortexwest/chat-widget-ui": "^0.1.6",
"storybook": "^8.1.10"
}
}
3 changes: 3 additions & 0 deletions storybook/stories/rasa-chat-widget.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ export default {
},
},
argTypes: styleTokens,
args: {
serverUrl: "https://pro.vortexwe.com"
},
render: renderWithAttributes("rasa-chatbot-widget"),
};

Expand Down

0 comments on commit a84ab5d

Please sign in to comment.