Skip to content

Commit

Permalink
Add generated content after npm run build
Browse files Browse the repository at this point in the history
  • Loading branch information
relja-rasa committed Jan 29, 2025
1 parent 82bb745 commit be76e73
Show file tree
Hide file tree
Showing 6 changed files with 121 additions and 0 deletions.
13 changes: 13 additions & 0 deletions packages/react/dist/RasaRating.js

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

1 change: 1 addition & 0 deletions packages/react/dist/RasaRating.js.map

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

9 changes: 9 additions & 0 deletions packages/react/dist/types/RasaRating.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { RasaRating as RasaRatingElement } from "@rasahq/chat-widget-ui/dist/components/rasa-rating.js";
import type { EventName, StencilReactComponent } from '@stencil/react-output-target/runtime';
type RasaRatingEvents = {
onRatingSelected: EventName<CustomEvent<{
value: string;
}>>;
};
declare const RasaRating: StencilReactComponent<RasaRatingElement, RasaRatingEvents>;
export default RasaRating;
25 changes: 25 additions & 0 deletions packages/react/lib/components/stencil-generated/RasaRating.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
'use client';

/**
* This file was automatically generated by the Stencil React Output Target.
* Changes to this file may cause incorrect behavior and will be lost if the code is regenerated.
*/

/* eslint-disable */

import { RasaRating as RasaRatingElement, defineCustomElement as defineRasaRating } from "@rasahq/chat-widget-ui/dist/components/rasa-rating.js";
import type { EventName, StencilReactComponent } from '@stencil/react-output-target/runtime';
import { createComponent } from '@stencil/react-output-target/runtime';
import React from 'react';

type RasaRatingEvents = { onRatingSelected: EventName<CustomEvent<{ value: string }>> };

const RasaRating: StencilReactComponent<RasaRatingElement, RasaRatingEvents> = /*@__PURE__*/ createComponent<RasaRatingElement, RasaRatingEvents>({
tagName: 'rasa-rating',
elementClass: RasaRatingElement,
react: React,
events: { onRatingSelected: 'ratingSelected' } as RasaRatingEvents,
defineCustomElement: defineRasaRating
});

export default RasaRating;
48 changes: 48 additions & 0 deletions packages/ui/src/components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,16 @@ export namespace Components {
*/
"quickReplyId": string;
}
interface RasaRating {
/**
* List of rating options, each containing a value, icon, and label.
*/
"options": { value: string; icon: string; label: string }[];
/**
* Instructional text displayed above the rating options.
*/
"text": string;
}
interface RasaSessionDivider {
/**
* Session start datetime
Expand Down Expand Up @@ -509,6 +519,10 @@ export interface RasaQuickReplyCustomEvent<T> extends CustomEvent<T> {
detail: T;
target: HTMLRasaQuickReplyElement;
}
export interface RasaRatingCustomEvent<T> extends CustomEvent<T> {
detail: T;
target: HTMLRasaRatingElement;
}
export interface RasaTextCustomEvent<T> extends CustomEvent<T> {
detail: T;
target: HTMLRasaTextElement;
Expand Down Expand Up @@ -722,6 +736,23 @@ declare global {
prototype: HTMLRasaQuickReplyElement;
new (): HTMLRasaQuickReplyElement;
};
interface HTMLRasaRatingElementEventMap {
"ratingSelected": { value: string };
}
interface HTMLRasaRatingElement extends Components.RasaRating, HTMLStencilElement {
addEventListener<K extends keyof HTMLRasaRatingElementEventMap>(type: K, listener: (this: HTMLRasaRatingElement, ev: RasaRatingCustomEvent<HTMLRasaRatingElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
removeEventListener<K extends keyof HTMLRasaRatingElementEventMap>(type: K, listener: (this: HTMLRasaRatingElement, ev: RasaRatingCustomEvent<HTMLRasaRatingElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
}
var HTMLRasaRatingElement: {
prototype: HTMLRasaRatingElement;
new (): HTMLRasaRatingElement;
};
interface HTMLRasaSessionDividerElement extends Components.RasaSessionDivider, HTMLStencilElement {
}
var HTMLRasaSessionDividerElement: {
Expand Down Expand Up @@ -787,6 +818,7 @@ declare global {
"rasa-image": HTMLRasaImageElement;
"rasa-image-message": HTMLRasaImageMessageElement;
"rasa-quick-reply": HTMLRasaQuickReplyElement;
"rasa-rating": HTMLRasaRatingElement;
"rasa-session-divider": HTMLRasaSessionDividerElement;
"rasa-text": HTMLRasaTextElement;
"rasa-text-message": HTMLRasaTextMessageElement;
Expand Down Expand Up @@ -1262,6 +1294,20 @@ declare namespace LocalJSX {
*/
"quickReplyId"?: string;
}
interface RasaRating {
/**
* Event emitted when a rating option is selected.
*/
"onRatingSelected"?: (event: RasaRatingCustomEvent<{ value: string }>) => void;
/**
* List of rating options, each containing a value, icon, and label.
*/
"options"?: { value: string; icon: string; label: string }[];
/**
* Instructional text displayed above the rating options.
*/
"text"?: string;
}
interface RasaSessionDivider {
/**
* Session start datetime
Expand Down Expand Up @@ -1355,6 +1401,7 @@ declare namespace LocalJSX {
"rasa-image": RasaImage;
"rasa-image-message": RasaImageMessage;
"rasa-quick-reply": RasaQuickReply;
"rasa-rating": RasaRating;
"rasa-session-divider": RasaSessionDivider;
"rasa-text": RasaText;
"rasa-text-message": RasaTextMessage;
Expand Down Expand Up @@ -1388,6 +1435,7 @@ declare module "@stencil/core" {
"rasa-image": LocalJSX.RasaImage & JSXBase.HTMLAttributes<HTMLRasaImageElement>;
"rasa-image-message": LocalJSX.RasaImageMessage & JSXBase.HTMLAttributes<HTMLRasaImageMessageElement>;
"rasa-quick-reply": LocalJSX.RasaQuickReply & JSXBase.HTMLAttributes<HTMLRasaQuickReplyElement>;
"rasa-rating": LocalJSX.RasaRating & JSXBase.HTMLAttributes<HTMLRasaRatingElement>;
"rasa-session-divider": LocalJSX.RasaSessionDivider & JSXBase.HTMLAttributes<HTMLRasaSessionDividerElement>;
"rasa-text": LocalJSX.RasaText & JSXBase.HTMLAttributes<HTMLRasaTextElement>;
"rasa-text-message": LocalJSX.RasaTextMessage & JSXBase.HTMLAttributes<HTMLRasaTextMessageElement>;
Expand Down
25 changes: 25 additions & 0 deletions packages/ui/src/components/rating/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# rasa-rating



<!-- Auto Generated Below -->


## Properties

| Property | Attribute | Description | Type | Default |
| --------- | --------- | ----------------------------------------------------------------- | --------------------------------------------------- | ----------- |
| `options` | -- | List of rating options, each containing a value, icon, and label. | `{ value: string; icon: string; label: string; }[]` | `undefined` |
| `text` | `text` | Instructional text displayed above the rating options. | `string` | `undefined` |


## Events

| Event | Description | Type |
| ---------------- | ----------------------------------------------- | --------------------------------- |
| `ratingSelected` | Event emitted when a rating option is selected. | `CustomEvent<{ value: string; }>` |


----------------------------------------------

*Built with [StencilJS](https://stenciljs.com/)*

0 comments on commit be76e73

Please sign in to comment.