@wise/dynamic-flow-client 2.8.3 → 2.8.5

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.
Files changed (32) hide show
  1. package/build/i18n/de.json +4 -0
  2. package/build/i18n/es.json +4 -0
  3. package/build/i18n/fr.json +4 -0
  4. package/build/i18n/hu.json +4 -0
  5. package/build/i18n/id.json +4 -0
  6. package/build/i18n/it.json +4 -0
  7. package/build/i18n/ja.json +4 -0
  8. package/build/i18n/pl.json +4 -0
  9. package/build/i18n/pt.json +4 -0
  10. package/build/i18n/ro.json +4 -0
  11. package/build/i18n/ru.json +4 -0
  12. package/build/i18n/th.json +4 -0
  13. package/build/i18n/tr.json +4 -0
  14. package/build/i18n/zh_CN.json +4 -0
  15. package/build/i18n/zh_HK.json +4 -0
  16. package/build/main.js +81 -18
  17. package/build/main.min.js +1 -1
  18. package/build/types/common/helpMessages/help.messages.d.ts +8 -0
  19. package/build/types/revamp/domain/components/ContainerComponent.d.ts +11 -0
  20. package/build/types/revamp/domain/components/IntegerInputComponent.d.ts +1 -1
  21. package/build/types/revamp/domain/components/NumberInputComponent.d.ts +1 -1
  22. package/build/types/revamp/domain/components/ObjectComponent.d.ts +2 -0
  23. package/build/types/revamp/domain/components/TextInputComponent.d.ts +1 -1
  24. package/build/types/revamp/domain/types.d.ts +4 -2
  25. package/build/types/revamp/renderers/CoreContainerRenderer.d.ts +7 -0
  26. package/build/types/revamp/renderers/mappers/containerComponentToProps.d.ts +3 -0
  27. package/build/types/revamp/renderers/mappers/objectComponentToProps.d.ts +1 -1
  28. package/build/types/revamp/renderers/types.d.ts +2 -0
  29. package/build/types/revamp/utils/type-utils.d.ts +2 -2
  30. package/build/types/revamp/wise/renderers/utils/Label.d.ts +5 -0
  31. package/package.json +2 -2
  32. package/build/types/legacy/jsonSchemaForm/help/Help.messages.d.ts +0 -8
@@ -0,0 +1,8 @@
1
+ declare const _default: {
2
+ helpAria: {
3
+ id: string;
4
+ defaultMessage: string;
5
+ description: string;
6
+ };
7
+ };
8
+ export default _default;
@@ -0,0 +1,11 @@
1
+ import type { Model } from '@wise/dynamic-flow-types';
2
+ import type { BaseComponent, StepComponent } from '../types';
3
+ export type ContainerComponent = BaseComponent<Model> & {
4
+ type: 'container';
5
+ components: StepComponent[];
6
+ getChildren: () => StepComponent[];
7
+ };
8
+ export declare const createContainerComponent: (containerProps: {
9
+ uid: string;
10
+ components: StepComponent[];
11
+ }) => ContainerComponent;
@@ -3,6 +3,6 @@ import type { IsInvalidCheck } from '../validation/value-checks';
3
3
  export type IntegerInputComponent = InputComponent<number> & {
4
4
  type: 'integer';
5
5
  };
6
- export declare const createIntegerInputComponent: (integerInputProps: Pick<IntegerInputComponent, "description" | "disabled" | "title" | "placeholder" | "control" | "id" | "errors" | "value" | "autoComplete" | "uid"> & {
6
+ export declare const createIntegerInputComponent: (integerInputProps: Pick<IntegerInputComponent, "description" | "disabled" | "help" | "title" | "placeholder" | "control" | "id" | "errors" | "value" | "autoComplete" | "uid"> & {
7
7
  checks: IsInvalidCheck<number | null>[];
8
8
  }, updateComponent: UpdateComponent) => IntegerInputComponent;
@@ -3,6 +3,6 @@ import type { IsInvalidCheck } from '../validation/value-checks';
3
3
  export type NumberInputComponent = InputComponent<number> & {
4
4
  type: 'number';
5
5
  };
6
- export declare const createNumberInputComponent: (numberInputProps: Pick<NumberInputComponent, "description" | "disabled" | "title" | "placeholder" | "control" | "id" | "errors" | "value" | "autoComplete" | "uid"> & {
6
+ export declare const createNumberInputComponent: (numberInputProps: Pick<NumberInputComponent, "description" | "disabled" | "help" | "title" | "placeholder" | "control" | "id" | "errors" | "value" | "autoComplete" | "uid"> & {
7
7
  checks: IsInvalidCheck<number | null>[];
8
8
  }, updateComponent: UpdateComponent) => NumberInputComponent;
@@ -5,6 +5,7 @@ export type ObjectComponent = Omit<BaseComponent<Record<string, Model>>, 'getVal
5
5
  title?: string;
6
6
  description?: string;
7
7
  componentMap: Record<string, StepComponent>;
8
+ help?: string;
8
9
  getChildren: () => StepComponent[];
9
10
  getValue: () => Record<string, Model>;
10
11
  };
@@ -14,4 +15,5 @@ export declare const createObjectComponent: (objectProps: {
14
15
  description?: string | undefined;
15
16
  displayOrder: string[];
16
17
  components: Record<string, StepComponent>;
18
+ help?: string | undefined;
17
19
  }) => ObjectComponent;
@@ -3,6 +3,6 @@ import type { IsInvalidCheck } from '../validation/value-checks';
3
3
  export type TextInputComponent = InputComponent<string> & {
4
4
  type: 'text';
5
5
  };
6
- export declare const createTextInputComponent: (textInputProps: Pick<TextInputComponent, "description" | "disabled" | "title" | "placeholder" | "control" | "id" | "errors" | "value" | "autoComplete" | "uid"> & {
6
+ export declare const createTextInputComponent: (textInputProps: Pick<TextInputComponent, "description" | "disabled" | "help" | "title" | "placeholder" | "control" | "id" | "errors" | "value" | "autoComplete" | "uid"> & {
7
7
  checks: IsInvalidCheck<string | null>[];
8
8
  }, updateComponent: UpdateComponent) => TextInputComponent;
@@ -9,8 +9,9 @@ import type { TextInputComponent } from './components/TextInputComponent';
9
9
  import type { ColumnsComponent } from './components/ColumnsComponent';
10
10
  import type { NumberInputComponent } from './components/NumberInputComponent';
11
11
  import type { IntegerInputComponent } from './components/IntegerInputComponent';
12
- export type StepComponent = AlertComponent | BoxComponent | ButtonComponent | ColumnsComponent | HeadingComponent | ObjectComponent | ParagraphComponent | TextInputComponent | NumberInputComponent | IntegerInputComponent;
13
- export type ContainerComponent = ObjectComponent | BoxComponent | ColumnsComponent;
12
+ import type { ContainerComponent } from './components/ContainerComponent';
13
+ export type StepComponent = AlertComponent | BoxComponent | ButtonComponent | ColumnsComponent | ContainerComponent | HeadingComponent | ObjectComponent | ParagraphComponent | TextInputComponent | NumberInputComponent | IntegerInputComponent;
14
+ export type HasChildren = ObjectComponent | BoxComponent | ColumnsComponent | ContainerComponent;
14
15
  export type BaseComponent<M extends Model> = {
15
16
  type: string;
16
17
  uid: string;
@@ -28,6 +29,7 @@ export type InputComponent<M extends Model> = BaseComponent<M> & {
28
29
  description?: string;
29
30
  disabled: boolean;
30
31
  errors: string[];
32
+ help?: string;
31
33
  placeholder?: string;
32
34
  title?: string;
33
35
  value: M | null;
@@ -0,0 +1,7 @@
1
+ import type { ReactNode } from 'react';
2
+ import type { Renderer, RendererProps } from './types';
3
+ export interface CoreContainerRendererProps extends RendererProps {
4
+ type: 'container';
5
+ children: ReactNode;
6
+ }
7
+ export declare const CoreContainerRenderer: Renderer<CoreContainerRendererProps>;
@@ -0,0 +1,3 @@
1
+ import type { ReactNode } from 'react';
2
+ import type { CoreContainerRendererProps } from '../CoreContainerRenderer';
3
+ export declare const containerComponentToProps: (children: ReactNode) => CoreContainerRendererProps;
@@ -1,4 +1,4 @@
1
1
  import type { ReactNode } from 'react';
2
2
  import type { ObjectComponent } from '../../domain/components/ObjectComponent';
3
3
  import type { ObjectRendererProps } from '../types';
4
- export declare const objectComponentToProps: ({ title, description }: ObjectComponent, children: ReactNode) => ObjectRendererProps;
4
+ export declare const objectComponentToProps: ({ title, description, help }: ObjectComponent, children: ReactNode) => ObjectRendererProps;
@@ -52,6 +52,7 @@ export interface ObjectRendererProps extends RendererProps {
52
52
  type: 'object';
53
53
  title?: string;
54
54
  description?: string;
55
+ help?: string;
55
56
  children: ReactNode;
56
57
  }
57
58
  interface BaseInputRendererProps<M extends string | number> extends RendererProps {
@@ -61,6 +62,7 @@ interface BaseInputRendererProps<M extends string | number> extends RendererProp
61
62
  description?: string;
62
63
  error?: string;
63
64
  format?: 'date';
65
+ help?: string;
64
66
  label?: string;
65
67
  name: string;
66
68
  placeholder?: string;
@@ -1,7 +1,7 @@
1
1
  import type { AllOfSchema, IntegerSchema, Model, NumberSchema, ObjectSchema, OneOfSchema, Schema, StringSchema } from '@wise/dynamic-flow-types/build/next';
2
- import type { ContainerComponent, StepComponent } from '../domain/types';
2
+ import type { HasChildren, StepComponent } from '../domain/types';
3
3
  import type { ColumnsComponent } from '../domain/components/ColumnsComponent';
4
- export declare const isContainerComponent: (component: StepComponent) => component is ContainerComponent;
4
+ export declare const hasChildren: (component: StepComponent) => component is HasChildren;
5
5
  export declare const isColumnsComponent: (component: StepComponent) => component is ColumnsComponent;
6
6
  export declare const isObjectModel: (model: Model) => model is Record<string, Model>;
7
7
  export declare const isAllOfSchema: (schema: Schema) => schema is AllOfSchema;
@@ -0,0 +1,5 @@
1
+ declare function Label({ text, help }: {
2
+ text?: string;
3
+ help?: string;
4
+ }): JSX.Element;
5
+ export default Label;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wise/dynamic-flow-client",
3
- "version": "2.8.3",
3
+ "version": "2.8.5",
4
4
  "description": "Dynamic Flow web client",
5
5
  "license": "Apache-2.0",
6
6
  "main": "./build/main.min.js",
@@ -91,7 +91,7 @@
91
91
  "classnames": "2.3.2",
92
92
  "react-webcam": "^7.2.0",
93
93
  "screenfull": "^5.2.0",
94
- "@wise/dynamic-flow-types": "2.4.0"
94
+ "@wise/dynamic-flow-types": "2.4.1"
95
95
  },
96
96
  "scripts": {
97
97
  "dev": "storybook dev -p 3003",
@@ -1,8 +0,0 @@
1
- declare namespace _default {
2
- namespace helpAria {
3
- const id: string;
4
- const defaultMessage: string;
5
- const description: string;
6
- }
7
- }
8
- export default _default;