@wise/dynamic-flow-client 1.7.0 → 1.8.0

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.
@@ -4,5 +4,5 @@ type Props = {
4
4
  component: DecisionLayout;
5
5
  onAction: OnAction;
6
6
  };
7
- declare const DynamicDecision: (props: Props) => JSX.Element;
7
+ declare const DynamicDecision: ({ component, onAction }: Props) => JSX.Element;
8
8
  export default DynamicDecision;
@@ -16,3 +16,4 @@ export { default as DynamicStatusList } from './list/DynamicStatusList';
16
16
  export { default as DynamicLoadingIndicator } from './loadingIndicator/DynamicLoadingIndicator';
17
17
  export { default as DynamicParagraph } from './paragraph/DynamicParagraph';
18
18
  export { default as DynamicReview } from './review/DynamicReview';
19
+ export { default as DynamicSearch } from './search/DynamicSearch';
@@ -0,0 +1,8 @@
1
+ import { SearchLayout } from '@wise/dynamic-flow-types';
2
+ import { OnAction } from '../../dynamicFlow/DynamicFlowTypes';
3
+ type DynamicSearchProps = {
4
+ component: SearchLayout;
5
+ onAction: OnAction;
6
+ };
7
+ declare const DynamicSearch: ({ component, onAction }: DynamicSearchProps) => JSX.Element;
8
+ export default DynamicSearch;
@@ -0,0 +1,7 @@
1
+ type SearchInputProps = {
2
+ title: string;
3
+ value: string;
4
+ onChange: (value: string) => void;
5
+ };
6
+ export declare const SearchInput: ({ title, value, onChange }: SearchInputProps) => JSX.Element;
7
+ export {};
@@ -0,0 +1,10 @@
1
+ import { SearchResult } from '@wise/dynamic-flow-types';
2
+ export type SearchResultsProps = {
3
+ results: SearchResult[];
4
+ emptyMessage: string;
5
+ onSelect: (result: SearchResult) => void;
6
+ };
7
+ export declare const SearchResults: ({ results, emptyMessage, onSelect }: SearchResultsProps) => JSX.Element;
8
+ export declare const ErrorResult: ({ onRetrySearch }: {
9
+ onRetrySearch: () => void;
10
+ }) => JSX.Element;
@@ -0,0 +1,6 @@
1
+ import { SearchConfig, SearchResult } from '@wise/dynamic-flow-types';
2
+ export declare const useSearch: (defaultSearchConfig: SearchConfig) => {
3
+ status: "loading" | "error" | "success" | "idle";
4
+ results: SearchResult[];
5
+ search: (query: string, { url, method, param }?: SearchConfig) => Promise<void>;
6
+ };
@@ -0,0 +1,5 @@
1
+ import { Icon, Image } from '@wise/dynamic-flow-types';
2
+ export declare const getNavigationOptionMedia: ({ icon, image }: {
3
+ icon?: Icon | undefined;
4
+ image?: Image | undefined;
5
+ }) => JSX.Element | null;
@@ -1,4 +1,5 @@
1
1
  import { Align, Size } from '@wise/dynamic-flow-types';
2
+ export { getNavigationOptionMedia } from './getNavigationOptionMedia';
2
3
  declare const getMarginBottom: (size: Size | undefined) => "" | "m-b-0" | "m-b-1" | "m-b-2" | "m-b-3" | "m-b-5";
3
4
  declare const getTextAlignmentAndMargin: (component: {
4
5
  align?: Align;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wise/dynamic-flow-client",
3
- "version": "1.7.0",
3
+ "version": "1.8.0",
4
4
  "description": "Dynamic Flow web client",
5
5
  "license": "Apache-2.0",
6
6
  "main": "./build/main.min.js",
@@ -92,7 +92,7 @@
92
92
  "classnames": "2.3.2",
93
93
  "react-webcam": "^7.0.1",
94
94
  "screenfull": "^5.0.2",
95
- "@wise/dynamic-flow-types": "1.3.0"
95
+ "@wise/dynamic-flow-types": "1.4.0"
96
96
  },
97
97
  "prettier": "@transferwise/eslint-config/.prettierrc.js",
98
98
  "scripts": {