@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.
- package/build/main.js +1079 -930
- package/build/main.min.js +1 -1
- package/build/types/layout/decision/DynamicDecision.d.ts +1 -1
- package/build/types/layout/index.d.ts +1 -0
- package/build/types/layout/search/DynamicSearch.d.ts +8 -0
- package/build/types/layout/search/SearchInput.d.ts +7 -0
- package/build/types/layout/search/SearchResults.d.ts +10 -0
- package/build/types/layout/search/useSearch.d.ts +6 -0
- package/build/types/layout/utils/getNavigationOptionMedia.d.ts +5 -0
- package/build/types/layout/{utils.d.ts → utils/index.d.ts} +1 -0
- package/package.json +2 -2
|
@@ -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,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
|
+
};
|
|
@@ -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.
|
|
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.
|
|
95
|
+
"@wise/dynamic-flow-types": "1.4.0"
|
|
96
96
|
},
|
|
97
97
|
"prettier": "@transferwise/eslint-config/.prettierrc.js",
|
|
98
98
|
"scripts": {
|