@xapp/form-widget 1.63.1 → 1.64.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/App.d.ts CHANGED
@@ -3,13 +3,13 @@ import { FormWidgetEnv } from "@xapp/stentor-form-widget-channel";
3
3
  export { default as React } from "react";
4
4
  declare global {
5
5
  interface Window {
6
- xasConfig?: FormWidgetEnv;
6
+ xafwConfig?: FormWidgetEnv;
7
7
  xaLogLevel?: "debug";
8
8
  webkitSpeechRecognition: any;
9
9
  }
10
10
  }
11
11
  export interface WindowWithConfig extends Window {
12
- readonly xasConfig?: FormWidgetEnv;
12
+ readonly xafwConfig?: FormWidgetEnv;
13
13
  }
14
14
  /**
15
15
  * An external script could have replaced the config on the window.
@@ -1,5 +1,5 @@
1
1
  import { ChannelActionRequest, IntentRequest, LaunchRequest, OptionSelectRequest, PermissionRequest, Response } from "stentor-models";
2
- import { StentorApiConfig } from "../config/search-config";
2
+ import { StentorApiConfig } from "../config";
3
3
  export declare type StentorRequest = IntentRequest | LaunchRequest | OptionSelectRequest | PermissionRequest | ChannelActionRequest;
4
4
  export declare class StentorApi {
5
5
  private readonly config;
@@ -0,0 +1,14 @@
1
+ import { FC } from "react";
2
+ import { FormWidgetConfig, FormWidgetTheme } from "../../config";
3
+ import "./Form.scss";
4
+ export interface FormProps {
5
+ readonly config: FormWidgetConfig;
6
+ readonly theme?: FormWidgetTheme;
7
+ /**
8
+ * Optional elements that will act as the button to enable the modal search.
9
+ */
10
+ readonly button?: JSX.Element | string;
11
+ readonly buttonElementLookup?: () => Promise<HTMLElement>;
12
+ }
13
+ export declare const FormContainer: FC<FormProps>;
14
+ export declare const Form: FC<FormProps>;
@@ -0,0 +1 @@
1
+ export { Form, FormProps, FormContainer } from "./Form";
@@ -0,0 +1,8 @@
1
+ import { FC } from "react";
2
+ import { FormWidgetConfig } from "../../config";
3
+ import "./FormWidget.scss";
4
+ export declare const AUDIO_WAIT_NOTHING = 0, AUDIO_WAIT_CLOSE = 1, AUDIO_WAIT_MINIMIZE = 2;
5
+ export interface FormWidgetProps {
6
+ readonly config: FormWidgetConfig;
7
+ }
8
+ export declare const FormWidget: FC<FormWidgetProps>;
@@ -0,0 +1 @@
1
+ export { FormWidget, FormWidgetProps } from "./FormWidget";
@@ -1,7 +1,7 @@
1
1
  import { FC } from "react";
2
- import { SearchWidgetTheme } from "../../config/theme";
2
+ import { FormWidgetTheme } from "../../config/theme";
3
3
  export interface WidgetStylesheetProps {
4
- readonly theme?: SearchWidgetTheme;
4
+ readonly theme?: FormWidgetTheme;
5
5
  }
6
- export declare function buildStyleContent(theme?: SearchWidgetTheme): string;
6
+ export declare function buildStyleContent(theme?: FormWidgetTheme): string;
7
7
  export declare const WidgetStylesheet: FC<WidgetStylesheetProps>;
@@ -1,2 +1,2 @@
1
- export { Search, SearchContainer, SearchProps } from "./Search";
2
- export { SearchWidget, SearchWidgetProps } from "./SearchWidget";
1
+ export { Form, FormContainer, FormProps } from "./Form";
2
+ export { FormWidget, FormWidgetProps } from "./FormWidget";
@@ -1,4 +1,4 @@
1
- export interface SearchWidgetConfig {
1
+ export interface FormWidgetConfig {
2
2
  readonly api: StentorApiConfig;
3
3
  readonly suggestionsUrl?: string;
4
4
  readonly isVoiceEnabled?: boolean;
@@ -1,2 +1,2 @@
1
- export { SearchWidgetConfig, StentorApiConfig } from "./search-config";
2
- export { SearchWidgetTheme } from "./theme";
1
+ export { FormWidgetConfig, StentorApiConfig } from "./form-widget-config";
2
+ export { FormWidgetTheme } from "./theme";
@@ -1,4 +1,4 @@
1
- export interface SearchWidgetTheme {
1
+ export interface FormWidgetTheme {
2
2
  readonly accentColor?: string;
3
3
  readonly border?: WidgetBorderTheme;
4
4
  readonly messages?: WidgetMessagesTheme;