@wise/dynamic-flow-client 1.0.2 → 1.1.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/i18n/pl.json +2 -2
- package/build/i18n/zh.json +5 -5
- package/build/main.js +519 -424
- package/build/main.min.js +3 -3
- package/build/types/fixtures/components/decision-flags.d.ts +3 -0
- package/build/types/fixtures/components/decision-icons.d.ts +3 -0
- package/build/types/fixtures/components/index.d.ts +2 -0
- package/build/types/fixtures/index.d.ts +2 -0
- package/build/types/jsonSchemaForm/schemaFormControl/utils/mapping-utils.d.ts +10 -14
- package/build/types/layout/icon/DynamicIcon.d.ts +2 -2
- package/build/types/layout/icon/FlagIcon.d.ts +7 -0
- package/build/types/layout/icon/NamedIcon.d.ts +6 -0
- package/package.json +2 -2
- package/build/types/jsonSchemaForm/schemaFormControl/utils/currency-utils.d.ts +0 -3
|
@@ -4,6 +4,8 @@ export { default as button } from './button';
|
|
|
4
4
|
export { default as columns } from './columns';
|
|
5
5
|
export { default as copyable } from './copyable';
|
|
6
6
|
export { default as decision } from './decision';
|
|
7
|
+
export { default as decisionFlags } from './decision-flags';
|
|
8
|
+
export { default as decisionIcons } from './decision-icons';
|
|
7
9
|
export { default as heading } from './heading';
|
|
8
10
|
export { default as image } from './image';
|
|
9
11
|
export { default as info } from './info';
|
|
@@ -26,6 +26,8 @@ export declare const fixtures: {
|
|
|
26
26
|
columns: import("../types").FormStep;
|
|
27
27
|
copyable: import("../types").FormStep;
|
|
28
28
|
decision: import("../types").FormStep;
|
|
29
|
+
decisionFlags: import("../types").FormStep;
|
|
30
|
+
decisionIcons: import("../types").FormStep;
|
|
29
31
|
heading: import("../types").FormStep;
|
|
30
32
|
image: import("../types").FormStep;
|
|
31
33
|
info: import("../types").FormStep;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { Icon, Image, Schema } from '../../../types';
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
declare const mapConstSchemaToOption: <ControlType extends string>(schema: Schema, controlType?: ControlType | undefined) => ControlType extends "select" ? SelectOption : RadioOption;
|
|
3
|
+
type RadioOption = {
|
|
4
4
|
disabled?: boolean | undefined;
|
|
5
5
|
avatar?: JSX.Element | undefined;
|
|
6
6
|
currency?: string | undefined;
|
|
7
7
|
label: string;
|
|
8
8
|
value: string;
|
|
9
9
|
};
|
|
10
|
-
|
|
10
|
+
type SelectOption = {
|
|
11
11
|
searchStrings?: string[];
|
|
12
12
|
disabled?: boolean | undefined;
|
|
13
13
|
icon?: JSX.Element | undefined;
|
|
@@ -15,20 +15,16 @@ export type SelectOption = {
|
|
|
15
15
|
label: string;
|
|
16
16
|
value: string;
|
|
17
17
|
};
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
icon: JSX.Element;
|
|
23
|
-
} | null;
|
|
24
|
-
export declare const mapIconToAvatar: (icon?: Icon) => {
|
|
25
|
-
avatar: JSX.Element;
|
|
26
|
-
} | null;
|
|
27
|
-
export declare const mapAvatar: (image?: Image) => {
|
|
18
|
+
declare const getAvatarPropertyForRadioOption: ({ image, icon }: {
|
|
19
|
+
image?: Image | undefined;
|
|
20
|
+
icon?: Icon | undefined;
|
|
21
|
+
}) => {
|
|
28
22
|
avatar: JSX.Element;
|
|
29
23
|
} | null;
|
|
30
|
-
|
|
24
|
+
declare const mapSchemaToUploadOptions: ({ accepts }: {
|
|
31
25
|
accepts?: string[] | undefined;
|
|
32
26
|
}) => {
|
|
33
27
|
usAccept?: string | undefined;
|
|
34
28
|
};
|
|
29
|
+
export { mapConstSchemaToOption, getAvatarPropertyForRadioOption, mapSchemaToUploadOptions };
|
|
30
|
+
export type { RadioOption, SelectOption };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
type Props = {
|
|
1
|
+
export type Props = {
|
|
2
2
|
type: string;
|
|
3
3
|
};
|
|
4
|
-
declare const DynamicIcon: ({ type }: Props) => JSX.Element;
|
|
4
|
+
declare const DynamicIcon: ({ type }: Props) => JSX.Element | null;
|
|
5
5
|
export declare function isValidIconName(name: string): boolean;
|
|
6
6
|
export default DynamicIcon;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wise/dynamic-flow-client",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "Dynamic Flow web client",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "./build/main.min.js",
|
|
@@ -102,7 +102,7 @@
|
|
|
102
102
|
"build:messages-source": "formatjs extract 'src/**/*.messages.{js,ts}' --out-file src/i18n/en.json --format simple && prettier --find-config-path --write src/i18n/*.json",
|
|
103
103
|
"build:compiled-messages": "mkdir -p build/i18n && cp src/i18n/*.json build/i18n",
|
|
104
104
|
"test": "npm-run-all test:once test:tz",
|
|
105
|
-
"test:once": "jest --config jest.config.js --env=jsdom",
|
|
105
|
+
"test:once": "jest --config jest.config.js --env=jsdom -w 2",
|
|
106
106
|
"test:coverage": "jest --config jest.config.js --env=jsdom --coverage",
|
|
107
107
|
"test:tz": "TZ=US/Pacific jest ./src/jsonSchemaForm/basicTypeSchema/BasicTypeSchema.errors.spec.js ./src/formControl/FormControl.spec.js",
|
|
108
108
|
"test:watch": "pnpm test:once --watch",
|