@wise/dynamic-flow-client 4.5.2 → 4.5.3

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 (43) hide show
  1. package/build/i18n/cs.json +12 -12
  2. package/build/main.js +1361 -1354
  3. package/build/main.mjs +1361 -1354
  4. package/build/types/revamp/domain/components/AlertComponent.d.ts +2 -2
  5. package/build/types/revamp/domain/components/AllOfComponent.d.ts +3 -2
  6. package/build/types/revamp/domain/components/BooleanInputComponent.d.ts +3 -3
  7. package/build/types/revamp/domain/components/BoxComponent.d.ts +2 -2
  8. package/build/types/revamp/domain/components/ButtonComponent.d.ts +2 -2
  9. package/build/types/revamp/domain/components/ColumnsComponent.d.ts +2 -2
  10. package/build/types/revamp/domain/components/DateInputComponent.d.ts +3 -3
  11. package/build/types/revamp/domain/components/DecisionComponent.d.ts +2 -2
  12. package/build/types/revamp/domain/components/DividerComponent.d.ts +2 -2
  13. package/build/types/revamp/domain/components/FormComponent.d.ts +2 -2
  14. package/build/types/revamp/domain/components/HeadingComponent.d.ts +2 -2
  15. package/build/types/revamp/domain/components/ImageComponent.d.ts +2 -2
  16. package/build/types/revamp/domain/components/InstructionsComponent.d.ts +2 -2
  17. package/build/types/revamp/domain/components/IntegerInputComponent.d.ts +3 -3
  18. package/build/types/revamp/domain/components/ListComponent.d.ts +2 -2
  19. package/build/types/revamp/domain/components/LoadingIndicatorComponent.d.ts +2 -2
  20. package/build/types/revamp/domain/components/MarkdownComponent.d.ts +2 -2
  21. package/build/types/revamp/domain/components/ModalComponent.d.ts +2 -2
  22. package/build/types/revamp/domain/components/MultiSelectInputComponent.d.ts +3 -3
  23. package/build/types/revamp/domain/components/MultiUploadInputComponent.d.ts +3 -3
  24. package/build/types/revamp/domain/components/NumberInputComponent.d.ts +3 -3
  25. package/build/types/revamp/domain/components/ObjectComponent.d.ts +3 -2
  26. package/build/types/revamp/domain/components/ParagraphComponent.d.ts +2 -2
  27. package/build/types/revamp/domain/components/RepeatableComponent.d.ts +3 -2
  28. package/build/types/revamp/domain/components/ReviewComponent.d.ts +2 -2
  29. package/build/types/revamp/domain/components/SelectInputComponent.d.ts +3 -3
  30. package/build/types/revamp/domain/components/StatusListComponent.d.ts +2 -2
  31. package/build/types/revamp/domain/components/TextInputComponent.d.ts +3 -3
  32. package/build/types/revamp/domain/components/TupleComponent.d.ts +3 -2
  33. package/build/types/revamp/domain/components/UploadInputComponent.d.ts +3 -3
  34. package/build/types/revamp/domain/components/searchComponent/SearchComponent.d.ts +2 -2
  35. package/build/types/revamp/domain/mappers/mapSchemaToComponent.d.ts +2 -2
  36. package/build/types/revamp/domain/mappers/schema/constSchemaToComponent.d.ts +1 -1
  37. package/build/types/revamp/domain/mappers/schema/oneOfSchemaToComponent/oneOfSchemaToComponent.d.ts +1 -1
  38. package/build/types/revamp/domain/mappers/schema/utils/mapCommonSchemaProps.d.ts +1 -0
  39. package/build/types/revamp/domain/mappers/utils/utils.d.ts +2 -1
  40. package/build/types/revamp/domain/types.d.ts +10 -7
  41. package/build/types/revamp/renderers/mappers/componentToRendererProps.d.ts +1 -1
  42. package/build/types/revamp/renderers/mappers/utils/inputComponentToProps.d.ts +2 -2
  43. package/package.json +18 -18
@@ -1,5 +1,5 @@
1
- import type { CallToAction, Context, LayoutComponent } from '../types';
2
- export type AlertComponent = LayoutComponent & {
1
+ import type { CallToAction, Context, BaseLayoutComponent } from '../types';
2
+ export type AlertComponent = BaseLayoutComponent & {
3
3
  type: 'alert';
4
4
  markdown: string;
5
5
  context: Context;
@@ -1,12 +1,13 @@
1
1
  import type { Model } from '@wise/dynamic-flow-types/build/next';
2
- import type { LocalValue, RepeatableSummary, DomainComponent, ComponentWithTitle } from '../types';
2
+ import type { ComponentWithTitle, DomainComponent, InlineAlert, LocalValue, RepeatableSummary } from '../types';
3
3
  export type AllOfComponent = ComponentWithTitle & {
4
4
  type: 'all-of';
5
5
  components: DomainComponent[];
6
+ alert?: InlineAlert;
6
7
  getChildren: () => DomainComponent[];
7
8
  getLocalValue: () => LocalValue;
8
9
  };
9
- export declare const createAllOfComponent: (allOfProps: Pick<AllOfComponent, "control" | "description" | "components" | "help" | "hidden" | "icon" | "image" | "title"> & {
10
+ export declare const createAllOfComponent: (allOfProps: Pick<AllOfComponent, "alert" | "control" | "description" | "components" | "help" | "hidden" | "icon" | "image" | "title"> & {
10
11
  uid: string;
11
12
  analyticsId?: string;
12
13
  summariser: (value: Model | null) => RepeatableSummary;
@@ -1,14 +1,14 @@
1
1
  import type { PerformPersistAsync } from '../features/persistAsync/getPerformPersistAsync';
2
2
  import type { PerformRefresh } from '../features/refresh/getPerformRefresh';
3
3
  import type { PerformValidationAsync } from '../features/validationAsync/getPerformValidationAsync';
4
- import type { InputComponent, OnValueChange, PersistedState, RepeatableSummary, UpdateComponent, ValidationAsyncState } from '../types';
5
- export type BooleanInputComponent = InputComponent<boolean> & {
4
+ import type { BaseInputComponent, OnValueChange, PersistedState, RepeatableSummary, UpdateComponent, ValidationAsyncState } from '../types';
5
+ export type BooleanInputComponent = BaseInputComponent<boolean> & {
6
6
  type: 'boolean';
7
7
  persistedState: PersistedState;
8
8
  validationAsyncState: ValidationAsyncState;
9
9
  onChange: (value: boolean) => void;
10
10
  };
11
- export declare const createBooleanInputComponent: (booleanInputProps: Pick<BooleanInputComponent, "uid" | "id" | "analyticsId" | "control" | "description" | "disabled" | "errors" | "help" | "hidden" | "icon" | "image" | "persistedState" | "required" | "title" | "value" | "validationAsyncState"> & {
11
+ export declare const createBooleanInputComponent: (booleanInputProps: Pick<BooleanInputComponent, "uid" | "id" | "analyticsId" | "alert" | "control" | "description" | "disabled" | "errors" | "help" | "hidden" | "icon" | "image" | "persistedState" | "required" | "title" | "value" | "validationAsyncState"> & {
12
12
  performPersistAsync: PerformPersistAsync | undefined;
13
13
  performRefresh: PerformRefresh | undefined;
14
14
  performValidationAsync: PerformValidationAsync | undefined;
@@ -1,6 +1,6 @@
1
1
  import type { Size } from '@wise/dynamic-flow-types/build/next';
2
- import type { LayoutComponent, DomainComponent } from '../types';
3
- export type BoxComponent = LayoutComponent & {
2
+ import type { BaseLayoutComponent, DomainComponent } from '../types';
3
+ export type BoxComponent = BaseLayoutComponent & {
4
4
  type: 'box';
5
5
  border: boolean;
6
6
  width: Size;
@@ -1,6 +1,6 @@
1
1
  import type { Size } from '@wise/dynamic-flow-types/build/next';
2
- import type { LayoutComponent, Context } from '../types';
3
- export type ButtonComponent = LayoutComponent & {
2
+ import type { BaseLayoutComponent, Context } from '../types';
3
+ export type ButtonComponent = BaseLayoutComponent & {
4
4
  type: 'button';
5
5
  context: Context;
6
6
  disabled: boolean;
@@ -1,5 +1,5 @@
1
- import type { Bias, LayoutComponent, DomainComponent } from '../types';
2
- export type ColumnsComponent = LayoutComponent & {
1
+ import type { Bias, BaseLayoutComponent, DomainComponent } from '../types';
2
+ export type ColumnsComponent = BaseLayoutComponent & {
3
3
  type: 'columns';
4
4
  bias: Bias;
5
5
  startComponents: DomainComponent[];
@@ -2,8 +2,8 @@ import type { PerformPersistAsync } from '../features/persistAsync/getPerformPer
2
2
  import type { PerformRefresh } from '../features/refresh/getPerformRefresh';
3
3
  import type { IsInvalidCheck } from '../features/validation/value-checks';
4
4
  import type { PerformValidationAsync } from '../features/validationAsync/getPerformValidationAsync';
5
- import type { InputComponent, OnValueChange, PersistedState, RepeatableSummary, Suggestions, UpdateComponent, ValidationAsyncState } from '../types';
6
- export type DateInputComponent = InputComponent<string | null> & {
5
+ import type { BaseInputComponent, OnValueChange, PersistedState, RepeatableSummary, Suggestions, UpdateComponent, ValidationAsyncState } from '../types';
6
+ export type DateInputComponent = BaseInputComponent<string | null> & {
7
7
  type: 'date';
8
8
  minimumDate?: string;
9
9
  maximumDate?: string;
@@ -12,7 +12,7 @@ export type DateInputComponent = InputComponent<string | null> & {
12
12
  validationAsyncState: ValidationAsyncState;
13
13
  onChange: (value: string | null) => void;
14
14
  };
15
- export declare const createDateInputComponent: (textInputProps: Pick<DateInputComponent, "uid" | "id" | "analyticsId" | "autoComplete" | "control" | "errors" | "description" | "disabled" | "help" | "hidden" | "icon" | "image" | "minimumDate" | "maximumDate" | "persistedState" | "placeholder" | "required" | "suggestions" | "title" | "value" | "validationAsyncState"> & {
15
+ export declare const createDateInputComponent: (textInputProps: Pick<DateInputComponent, "uid" | "id" | "analyticsId" | "alert" | "autoComplete" | "control" | "errors" | "description" | "disabled" | "help" | "hidden" | "icon" | "image" | "minimumDate" | "maximumDate" | "persistedState" | "placeholder" | "required" | "suggestions" | "title" | "value" | "validationAsyncState"> & {
16
16
  checks: IsInvalidCheck<string | null>[];
17
17
  performPersistAsync: PerformPersistAsync | undefined;
18
18
  performRefresh: PerformRefresh | undefined;
@@ -1,6 +1,6 @@
1
1
  import type { Icon } from '@wise/dynamic-flow-types/build/next';
2
- import type { Image, InlineAlert, LayoutComponent, SupportingValues } from '../types';
3
- export type DecisionComponent = LayoutComponent & {
2
+ import type { Image, InlineAlert, BaseLayoutComponent, SupportingValues } from '../types';
3
+ export type DecisionComponent = BaseLayoutComponent & {
4
4
  type: 'decision';
5
5
  options: DecisionOption[];
6
6
  title?: string;
@@ -1,5 +1,5 @@
1
- import type { LayoutComponent } from '../types';
2
- export type DividerComponent = LayoutComponent & {
1
+ import type { BaseLayoutComponent } from '../types';
2
+ export type DividerComponent = BaseLayoutComponent & {
3
3
  type: 'divider';
4
4
  };
5
5
  export declare const createDividerComponent: (props: Pick<DividerComponent, "uid" | "control" | "margin">) => DividerComponent;
@@ -1,5 +1,5 @@
1
- import type { LayoutComponent, DomainComponent } from '../types';
2
- export type FormComponent = LayoutComponent & {
1
+ import type { BaseLayoutComponent, DomainComponent } from '../types';
2
+ export type FormComponent = BaseLayoutComponent & {
3
3
  type: 'form';
4
4
  components: DomainComponent[];
5
5
  getChildren: () => DomainComponent[];
@@ -1,6 +1,6 @@
1
1
  import type { Size } from '@wise/dynamic-flow-types/build/next';
2
- import type { LayoutComponent, Align } from '../types';
3
- export type HeadingComponent = LayoutComponent & {
2
+ import type { BaseLayoutComponent, Align } from '../types';
3
+ export type HeadingComponent = BaseLayoutComponent & {
4
4
  type: 'heading';
5
5
  text: string;
6
6
  align: Align;
@@ -1,6 +1,6 @@
1
1
  import type { Size } from '@wise/dynamic-flow-types/build/next';
2
- import type { Align, LayoutComponent } from '../types';
3
- export type ImageComponent = LayoutComponent & {
2
+ import type { Align, BaseLayoutComponent } from '../types';
3
+ export type ImageComponent = BaseLayoutComponent & {
4
4
  type: 'image';
5
5
  align: Align;
6
6
  content: ImageContent;
@@ -1,5 +1,5 @@
1
- import type { Context, LayoutComponent } from '../types';
2
- export type InstructionsComponent = LayoutComponent & {
1
+ import type { Context, BaseLayoutComponent } from '../types';
2
+ export type InstructionsComponent = BaseLayoutComponent & {
3
3
  type: 'instructions';
4
4
  items: InstructionItem[];
5
5
  title?: string;
@@ -2,8 +2,8 @@ import type { PerformPersistAsync } from '../features/persistAsync/getPerformPer
2
2
  import { type PerformRefresh } from '../features/refresh/getPerformRefresh';
3
3
  import type { IsInvalidCheck } from '../features/validation/value-checks';
4
4
  import type { PerformValidationAsync } from '../features/validationAsync/getPerformValidationAsync';
5
- import type { InputComponent, OnValueChange, PersistedState, RepeatableSummary, UpdateComponent, ValidationAsyncState } from '../types';
6
- export type IntegerInputComponent = InputComponent<number | null> & {
5
+ import type { BaseInputComponent, OnValueChange, PersistedState, RepeatableSummary, UpdateComponent, ValidationAsyncState } from '../types';
6
+ export type IntegerInputComponent = BaseInputComponent<number | null> & {
7
7
  type: 'integer';
8
8
  maximum?: number;
9
9
  minimum?: number;
@@ -11,7 +11,7 @@ export type IntegerInputComponent = InputComponent<number | null> & {
11
11
  validationAsyncState: ValidationAsyncState;
12
12
  onChange: (value: number | null) => void;
13
13
  };
14
- export declare const createIntegerInputComponent: (integerInputProps: Pick<IntegerInputComponent, "uid" | "id" | "analyticsId" | "autoComplete" | "control" | "description" | "disabled" | "errors" | "help" | "hidden" | "icon" | "image" | "maximum" | "minimum" | "persistedState" | "placeholder" | "required" | "title" | "value" | "validationAsyncState"> & {
14
+ export declare const createIntegerInputComponent: (integerInputProps: Pick<IntegerInputComponent, "uid" | "id" | "analyticsId" | "autoComplete" | "alert" | "control" | "description" | "disabled" | "errors" | "help" | "hidden" | "icon" | "image" | "maximum" | "minimum" | "persistedState" | "placeholder" | "required" | "title" | "value" | "validationAsyncState"> & {
15
15
  checks: IsInvalidCheck<number | null>[];
16
16
  performPersistAsync: PerformPersistAsync | undefined;
17
17
  performRefresh: PerformRefresh | undefined;
@@ -1,6 +1,6 @@
1
1
  import { Icon } from '@wise/dynamic-flow-types/build/next';
2
- import { AdditionalInfo, CallToAction, Image, InlineAlert, LayoutComponent, SupportingValues } from '../types';
3
- export type ListComponent = LayoutComponent & {
2
+ import { AdditionalInfo, CallToAction, Image, InlineAlert, BaseLayoutComponent, SupportingValues } from '../types';
3
+ export type ListComponent = BaseLayoutComponent & {
4
4
  type: 'list';
5
5
  items: ListItem[];
6
6
  title?: string;
@@ -1,6 +1,6 @@
1
1
  import type { Size } from '@wise/dynamic-flow-types/build/next';
2
- import type { LayoutComponent } from '../types';
3
- export type LoadingIndicatorComponent = LayoutComponent & {
2
+ import type { BaseLayoutComponent } from '../types';
3
+ export type LoadingIndicatorComponent = BaseLayoutComponent & {
4
4
  type: 'loading-indicator';
5
5
  control?: string;
6
6
  size: Size;
@@ -1,5 +1,5 @@
1
- import type { LayoutComponent, Align } from '../types';
2
- export type MarkdownComponent = LayoutComponent & {
1
+ import type { BaseLayoutComponent, Align } from '../types';
2
+ export type MarkdownComponent = BaseLayoutComponent & {
3
3
  type: 'markdown';
4
4
  align: Align;
5
5
  content: string;
@@ -1,6 +1,6 @@
1
1
  import type { ModalLayoutTrigger } from '@wise/dynamic-flow-types/build/next/layout/ModalLayoutTrigger';
2
- import type { LayoutComponent, DomainComponent } from '../types';
3
- export type ModalComponent = LayoutComponent & {
2
+ import type { BaseLayoutComponent, DomainComponent } from '../types';
3
+ export type ModalComponent = BaseLayoutComponent & {
4
4
  type: 'modal';
5
5
  content: ModalContent;
6
6
  trigger: ModalLayoutTrigger;
@@ -1,9 +1,9 @@
1
1
  import type { PerformRefresh } from '../features/refresh/getPerformRefresh';
2
2
  import type { IsInvalidCheck } from '../features/validation/value-checks';
3
3
  import type { PerformValidationAsync } from '../features/validationAsync/getPerformValidationAsync';
4
- import type { DomainComponent, InputComponent, LocalValue, LocalValueArray, OnValueChange, UpdateComponent, ValidationAsyncState } from '../types';
4
+ import type { DomainComponent, BaseInputComponent, LocalValue, LocalValueArray, OnValueChange, UpdateComponent, ValidationAsyncState } from '../types';
5
5
  import type { SelectInputOption } from './SelectInputComponent';
6
- export type MultiSelectComponent = InputComponent<LocalValueArray | null> & {
6
+ export type MultiSelectComponent = BaseInputComponent<LocalValueArray | null> & {
7
7
  type: 'multi-select';
8
8
  children: DomainComponent[];
9
9
  maxItems?: number;
@@ -15,7 +15,7 @@ export type MultiSelectComponent = InputComponent<LocalValueArray | null> & {
15
15
  getSelectedChildren: () => DomainComponent[] | null;
16
16
  onSelect: (indices: number[]) => void;
17
17
  };
18
- export declare const createMultiSelectComponent: (multiSelectProps: Pick<MultiSelectComponent, "uid" | "id" | "analyticsId" | "autoComplete" | "control" | "description" | "disabled" | "errors" | "hidden" | "icon" | "image" | "maxItems" | "minItems" | "required" | "title" | "validationAsyncState"> & {
18
+ export declare const createMultiSelectComponent: (multiSelectProps: Pick<MultiSelectComponent, "uid" | "id" | "analyticsId" | "autoComplete" | "alert" | "control" | "description" | "disabled" | "errors" | "hidden" | "icon" | "image" | "maxItems" | "minItems" | "required" | "title" | "validationAsyncState"> & {
19
19
  checks: IsInvalidCheck<LocalValueArray | null>[];
20
20
  initialValue: LocalValue;
21
21
  options: (SelectInputOption & {
@@ -1,8 +1,8 @@
1
1
  import { JsonElement } from '@wise/dynamic-flow-types/build/next';
2
2
  import type { PerformPersistAsync } from '../features/persistAsync/getPerformPersistAsync';
3
3
  import type { IsInvalidCheck } from '../features/validation/value-checks';
4
- import type { InputComponent, OnValueChange, PersistedState, RepeatableSummary, UpdateComponent, UploadSource } from '../types';
5
- export type MultiUploadInputComponent = InputComponent<File[]> & {
4
+ import type { BaseInputComponent, OnValueChange, PersistedState, RepeatableSummary, UpdateComponent, UploadSource } from '../types';
5
+ export type MultiUploadInputComponent = BaseInputComponent<File[]> & {
6
6
  type: 'multi-upload';
7
7
  accepts?: string[];
8
8
  cameraConfig?: JsonElement;
@@ -22,7 +22,7 @@ export type MultiUploadInputComponent = InputComponent<File[]> & {
22
22
  onRemoveFile: (index: number) => Promise<void>;
23
23
  onInsertFile: (index: number, file: File) => Promise<string>;
24
24
  };
25
- export declare const createMultiUploadInputComponent: (uploadInputProps: Pick<MultiUploadInputComponent, "uid" | "id" | "accepts" | "analyticsId" | "autoComplete" | "cameraConfig" | "control" | "errors" | "description" | "disabled" | "format" | "help" | "hidden" | "icon" | "image" | "maxSize" | "minItems" | "maxItems" | "persistedState" | "placeholder" | "required" | "source" | "title" | "uploadLabel" | "value"> & {
25
+ export declare const createMultiUploadInputComponent: (uploadInputProps: Pick<MultiUploadInputComponent, "uid" | "id" | "accepts" | "analyticsId" | "alert" | "autoComplete" | "cameraConfig" | "control" | "errors" | "description" | "disabled" | "format" | "help" | "hidden" | "icon" | "image" | "maxSize" | "minItems" | "maxItems" | "persistedState" | "placeholder" | "required" | "source" | "title" | "uploadLabel" | "value"> & {
26
26
  checks: IsInvalidCheck<File[]>[];
27
27
  fileChecks: IsInvalidCheck<File>[];
28
28
  performPersistAsync: PerformPersistAsync | undefined;
@@ -2,8 +2,8 @@ import type { PerformPersistAsync } from '../features/persistAsync/getPerformPer
2
2
  import { type PerformRefresh } from '../features/refresh/getPerformRefresh';
3
3
  import type { IsInvalidCheck } from '../features/validation/value-checks';
4
4
  import type { PerformValidationAsync } from '../features/validationAsync/getPerformValidationAsync';
5
- import type { InputComponent, OnValueChange, PersistedState, RepeatableSummary, UpdateComponent, ValidationAsyncState } from '../types';
6
- export type NumberInputComponent = InputComponent<number | null> & {
5
+ import type { BaseInputComponent, OnValueChange, PersistedState, RepeatableSummary, UpdateComponent, ValidationAsyncState } from '../types';
6
+ export type NumberInputComponent = BaseInputComponent<number | null> & {
7
7
  type: 'number';
8
8
  maximum?: number;
9
9
  minimum?: number;
@@ -11,7 +11,7 @@ export type NumberInputComponent = InputComponent<number | null> & {
11
11
  validationAsyncState: ValidationAsyncState;
12
12
  onChange: (value: number | null) => void;
13
13
  };
14
- export declare const createNumberInputComponent: (numberInputProps: Pick<NumberInputComponent, "uid" | "id" | "analyticsId" | "autoComplete" | "control" | "description" | "disabled" | "errors" | "help" | "hidden" | "icon" | "image" | "maximum" | "minimum" | "persistedState" | "placeholder" | "required" | "title" | "value" | "validationAsyncState"> & {
14
+ export declare const createNumberInputComponent: (numberInputProps: Pick<NumberInputComponent, "uid" | "id" | "analyticsId" | "alert" | "autoComplete" | "control" | "description" | "disabled" | "errors" | "help" | "hidden" | "icon" | "image" | "maximum" | "minimum" | "persistedState" | "placeholder" | "required" | "title" | "value" | "validationAsyncState"> & {
15
15
  checks: IsInvalidCheck<number | null>[];
16
16
  performPersistAsync: PerformPersistAsync | undefined;
17
17
  performRefresh: PerformRefresh | undefined;
@@ -1,11 +1,12 @@
1
- import type { ComponentWithTitle, LocalValue, LocalValueObject, RepeatableSummary, DomainComponent } from '../types';
1
+ import type { ComponentWithTitle, DomainComponent, InlineAlert, LocalValue, LocalValueObject, RepeatableSummary } from '../types';
2
2
  export type ObjectComponent = ComponentWithTitle & {
3
3
  type: 'object';
4
4
  componentMap: Record<string, DomainComponent>;
5
+ alert?: InlineAlert;
5
6
  getChildren: () => DomainComponent[];
6
7
  getLocalValue: () => LocalValueObject;
7
8
  };
8
- export declare const createObjectComponent: (objectProps: Pick<ObjectComponent, "control" | "description" | "componentMap" | "help" | "hidden" | "icon" | "image" | "title"> & {
9
+ export declare const createObjectComponent: (objectProps: Pick<ObjectComponent, "alert" | "control" | "description" | "componentMap" | "help" | "hidden" | "icon" | "image" | "title"> & {
9
10
  uid: string;
10
11
  analyticsId?: string;
11
12
  displayOrder: string[];
@@ -1,5 +1,5 @@
1
- import type { Align, LayoutComponent } from '../types';
2
- export type ParagraphComponent = LayoutComponent & {
1
+ import type { Align, BaseLayoutComponent } from '../types';
2
+ export type ParagraphComponent = BaseLayoutComponent & {
3
3
  type: 'paragraph';
4
4
  align: Align;
5
5
  text: string;
@@ -1,11 +1,12 @@
1
1
  import { Icon } from '@wise/dynamic-flow-types/build/next';
2
2
  import type { IsInvalidCheck } from '../features/validation/value-checks';
3
- import type { ComponentWithTitle, DomainComponent, Image, LocalValue, LocalValueArray, OnValueChange, RepeatableSummary, UpdateComponent } from '../types';
3
+ import type { ComponentWithTitle, DomainComponent, Image, InlineAlert, LocalValue, LocalValueArray, OnValueChange, RepeatableSummary, UpdateComponent } from '../types';
4
4
  export type RepeatableComponent = ComponentWithTitle & {
5
5
  type: 'repeatable';
6
6
  id?: string;
7
7
  components: DomainComponent[];
8
8
  addItemTitle: string;
9
+ alert?: InlineAlert;
9
10
  editableComponent: DomainComponent | null;
10
11
  editableIndex: number | null;
11
12
  editItemTitle: string;
@@ -30,7 +31,7 @@ type Summary = {
30
31
  providesIcon?: boolean;
31
32
  providesImage?: boolean;
32
33
  };
33
- export declare const createRepeatableComponent: (repeatableProps: Pick<RepeatableComponent, "uid" | "id" | "addItemTitle" | "components" | "control" | "description" | "editItemTitle" | "errors" | "hidden" | "icon" | "image" | "maxItems" | "minItems" | "title"> & {
34
+ export declare const createRepeatableComponent: (repeatableProps: Pick<RepeatableComponent, "uid" | "id" | "addItemTitle" | "alert" | "components" | "control" | "description" | "editItemTitle" | "errors" | "hidden" | "icon" | "image" | "maxItems" | "minItems" | "title"> & {
34
35
  analyticsId?: string;
35
36
  checks: IsInvalidCheck<LocalValueArray | null>[];
36
37
  summary?: Summary;
@@ -1,6 +1,6 @@
1
1
  import { Icon } from '@wise/dynamic-flow-types/build/next';
2
- import type { AdditionalInfo, CallToAction, Image, InlineAlert, LayoutComponent } from '../types';
3
- export type ReviewComponent = LayoutComponent & {
2
+ import type { AdditionalInfo, CallToAction, Image, InlineAlert, BaseLayoutComponent } from '../types';
3
+ export type ReviewComponent = BaseLayoutComponent & {
4
4
  type: 'review';
5
5
  fields: ReviewField[];
6
6
  title?: string;
@@ -2,8 +2,8 @@ import type { Icon, Model } from '@wise/dynamic-flow-types/build/next';
2
2
  import type { AnalyticsEventDispatcher } from '../features/events';
3
3
  import type { PerformRefresh } from '../features/refresh/getPerformRefresh';
4
4
  import type { IsInvalidCheck } from '../features/validation/value-checks';
5
- import type { DomainComponent, Image, InputComponent, LocalValue, OnValueChange, RepeatableSummary, UpdateComponent } from '../types';
6
- export type SelectInputComponent = InputComponent<LocalValue | null> & {
5
+ import type { DomainComponent, Image, BaseInputComponent, LocalValue, OnValueChange, RepeatableSummary, UpdateComponent } from '../types';
6
+ export type SelectInputComponent = BaseInputComponent<LocalValue | null> & {
7
7
  type: 'select';
8
8
  selectedIndex: number | null;
9
9
  options: SelectInputOption[];
@@ -21,7 +21,7 @@ export type SelectInputOption = {
21
21
  keywords: string[];
22
22
  disabled: boolean;
23
23
  };
24
- export declare const createSelectInputComponent: (selectProps: Pick<SelectInputComponent, "uid" | "id" | "analyticsId" | "autoComplete" | "control" | "errors" | "description" | "disabled" | "help" | "hidden" | "icon" | "image" | "placeholder" | "required" | "title"> & {
24
+ export declare const createSelectInputComponent: (selectProps: Pick<SelectInputComponent, "uid" | "id" | "analyticsId" | "alert" | "autoComplete" | "control" | "errors" | "description" | "disabled" | "help" | "hidden" | "icon" | "image" | "placeholder" | "required" | "title"> & {
25
25
  initialModel: Model;
26
26
  options: (SelectInputOption & {
27
27
  component: DomainComponent;
@@ -1,5 +1,5 @@
1
- import type { LayoutComponent } from '../types';
2
- export type StatusListComponent = LayoutComponent & {
1
+ import type { BaseLayoutComponent } from '../types';
2
+ export type StatusListComponent = BaseLayoutComponent & {
3
3
  type: 'status-list';
4
4
  items: StatusListItem[];
5
5
  title?: string;
@@ -2,8 +2,8 @@ import type { PerformPersistAsync } from '../features/persistAsync/getPerformPer
2
2
  import { type PerformRefresh } from '../features/refresh/getPerformRefresh';
3
3
  import type { IsInvalidCheck } from '../features/validation/value-checks';
4
4
  import type { PerformValidationAsync } from '../features/validationAsync/getPerformValidationAsync';
5
- import type { Autocapitalization, InputComponent, OnValueChange, PersistedState, RepeatableSummary, Suggestions, UpdateComponent, ValidationAsyncState } from '../types';
6
- export type TextInputComponent = InputComponent<string | null> & {
5
+ import type { Autocapitalization, BaseInputComponent, OnValueChange, PersistedState, RepeatableSummary, Suggestions, UpdateComponent, ValidationAsyncState } from '../types';
6
+ export type TextInputComponent = BaseInputComponent<string | null> & {
7
7
  type: 'text';
8
8
  autocapitalization?: Autocapitalization;
9
9
  displayFormat?: string;
@@ -14,7 +14,7 @@ export type TextInputComponent = InputComponent<string | null> & {
14
14
  validationAsyncState: ValidationAsyncState;
15
15
  onChange: (value: string | null) => void;
16
16
  };
17
- export declare const createTextInputComponent: (textInputProps: Pick<TextInputComponent, "uid" | "id" | "analyticsId" | "autocapitalization" | "autoComplete" | "control" | "errors" | "description" | "disabled" | "displayFormat" | "help" | "hidden" | "icon" | "image" | "maxLength" | "minLength" | "persistedState" | "placeholder" | "required" | "suggestions" | "title" | "value" | "validationAsyncState"> & {
17
+ export declare const createTextInputComponent: (textInputProps: Pick<TextInputComponent, "uid" | "id" | "analyticsId" | "alert" | "autocapitalization" | "autoComplete" | "control" | "errors" | "description" | "disabled" | "displayFormat" | "help" | "hidden" | "icon" | "image" | "maxLength" | "minLength" | "persistedState" | "placeholder" | "required" | "suggestions" | "title" | "value" | "validationAsyncState"> & {
18
18
  checks: IsInvalidCheck<string | null>[];
19
19
  performPersistAsync: PerformPersistAsync | undefined;
20
20
  performValidationAsync: PerformValidationAsync | undefined;
@@ -1,11 +1,12 @@
1
- import { ComponentWithTitle, DomainComponent, LocalValue, LocalValueArray, RepeatableSummary } from '../types';
1
+ import { ComponentWithTitle, DomainComponent, InlineAlert, LocalValue, LocalValueArray, RepeatableSummary } from '../types';
2
2
  export type TupleComponent = ComponentWithTitle & {
3
3
  type: 'tuple';
4
4
  components: DomainComponent[];
5
+ alert?: InlineAlert;
5
6
  getChildren: () => DomainComponent[];
6
7
  getLocalValue: () => LocalValueArray;
7
8
  };
8
- export declare const createTupleComponent: (tupleProps: Pick<TupleComponent, "control" | "description" | "components" | "help" | "hidden" | "icon" | "image" | "title"> & {
9
+ export declare const createTupleComponent: (tupleProps: Pick<TupleComponent, "alert" | "control" | "description" | "components" | "help" | "hidden" | "icon" | "image" | "title"> & {
9
10
  uid: string;
10
11
  analyticsId?: string;
11
12
  summariser: (value: LocalValue | null) => RepeatableSummary;
@@ -2,8 +2,8 @@ import { JsonElement } from '@wise/dynamic-flow-types/build/next';
2
2
  import type { PerformPersistAsync } from '../features/persistAsync/getPerformPersistAsync';
3
3
  import type { PerformRefresh } from '../features/refresh/getPerformRefresh';
4
4
  import type { IsInvalidCheck } from '../features/validation/value-checks';
5
- import type { InputComponent, OnValueChange, PersistedState, RepeatableSummary, UpdateComponent, UploadSource } from '../types';
6
- export type UploadInputComponent = InputComponent<File | null> & {
5
+ import type { BaseInputComponent, OnValueChange, PersistedState, RepeatableSummary, UpdateComponent, UploadSource } from '../types';
6
+ export type UploadInputComponent = BaseInputComponent<File | null> & {
7
7
  type: 'upload';
8
8
  format: 'blob' | 'base64';
9
9
  cameraConfig?: JsonElement;
@@ -14,7 +14,7 @@ export type UploadInputComponent = InputComponent<File | null> & {
14
14
  validationAsyncState?: undefined;
15
15
  onUpload: (value: File | null) => Promise<void>;
16
16
  };
17
- export declare const createUploadInputComponent: (uploadInputProps: Pick<UploadInputComponent, "uid" | "id" | "accepts" | "analyticsId" | "autoComplete" | "cameraConfig" | "control" | "errors" | "description" | "disabled" | "format" | "help" | "hidden" | "icon" | "image" | "maxSize" | "persistedState" | "placeholder" | "required" | "source" | "title" | "value"> & {
17
+ export declare const createUploadInputComponent: (uploadInputProps: Pick<UploadInputComponent, "uid" | "id" | "accepts" | "analyticsId" | "alert" | "autoComplete" | "cameraConfig" | "control" | "errors" | "description" | "disabled" | "format" | "help" | "hidden" | "icon" | "image" | "maxSize" | "persistedState" | "placeholder" | "required" | "source" | "title" | "value"> & {
18
18
  checks: IsInvalidCheck<File | null>[];
19
19
  performPersistAsync: PerformPersistAsync | undefined;
20
20
  performRefresh?: PerformRefresh | undefined;
@@ -1,5 +1,5 @@
1
1
  import type { SearchResult } from '@wise/dynamic-flow-types/build/next';
2
- import type { LayoutComponent, OnBehavior, UpdateComponent } from '../../types';
2
+ import type { BaseLayoutComponent, OnBehavior, UpdateComponent } from '../../types';
3
3
  export type SearchConfig = {
4
4
  method: string;
5
5
  param: string;
@@ -11,7 +11,7 @@ export type SearchProps = {
11
11
  signal: AbortSignal;
12
12
  };
13
13
  export type PerformSearch = (props: SearchProps) => Promise<SearchResult[]>;
14
- export type SearchComponent = LayoutComponent & {
14
+ export type SearchComponent = BaseLayoutComponent & {
15
15
  type: 'search';
16
16
  emptyMessage: string;
17
17
  isLoading: boolean;
@@ -1,3 +1,3 @@
1
- import type { DomainComponent } from '../types';
1
+ import type { InputComponent } from '../types';
2
2
  import type { MapperProps, SchemaMapperProps } from './schema/types';
3
- export declare const mapSchemaToComponent: (schemaMapperProps: SchemaMapperProps, mapperProps: MapperProps) => DomainComponent;
3
+ export declare const mapSchemaToComponent: (schemaMapperProps: SchemaMapperProps, mapperProps: MapperProps) => InputComponent;
@@ -1,5 +1,5 @@
1
- import type { SchemaMapperProps } from './types';
2
1
  import type { ConstSchema } from '@wise/dynamic-flow-types/build/next';
2
+ import type { SchemaMapperProps } from './types';
3
3
  export declare const constSchemaToComponent: (uid: string, schemaMapperProps: SchemaMapperProps & {
4
4
  schema: ConstSchema;
5
5
  }) => import("../../components/ConstComponent").ConstComponent;
@@ -2,4 +2,4 @@ import type { OneOfSchema } from '@wise/dynamic-flow-types/build/next';
2
2
  import type { MapperProps, SchemaMapperProps } from '../types';
3
3
  export declare const oneOfSchemaToComponent: (schemaMapperProps: SchemaMapperProps & {
4
4
  schema: OneOfSchema;
5
- }, mapperProps: MapperProps) => import("../../../types").DomainComponent;
5
+ }, mapperProps: MapperProps) => import("../../../types").InputComponent;
@@ -1,5 +1,6 @@
1
1
  import type { SchemaMapperProps } from '../types';
2
2
  export declare const mapCommonSchemaProps: (schemaMapperProps: SchemaMapperProps) => {
3
+ alert?: import("../../../types").InlineAlert | undefined;
3
4
  placeholder?: string | undefined;
4
5
  help?: string | undefined;
5
6
  uid: string;
@@ -1,4 +1,5 @@
1
- import type { AdditionalInfo as SpecAdditionalInfo, InlineAlert as SpecInlineAlert } from '@wise/dynamic-flow-types/build/next';
1
+ import type { AlertLayout, AdditionalInfo as SpecAdditionalInfo, InlineAlert as SpecInlineAlert } from '@wise/dynamic-flow-types/build/next';
2
2
  import { AdditionalInfo, InlineAlert, OnBehavior } from '../../types';
3
3
  export declare const mapInlineAlert: (alert: SpecInlineAlert | undefined) => InlineAlert | undefined;
4
4
  export declare const mapAdditionalInfo: (info: SpecAdditionalInfo | undefined, onBehavior: OnBehavior) => AdditionalInfo | undefined;
5
+ export declare const mapSchemaAlert: (alert: AlertLayout | undefined) => InlineAlert | undefined;
@@ -1,4 +1,4 @@
1
- import type { Action, Icon, JsonElement, Margin, Model, ActionBehavior, LinkBehavior, DismissBehavior, ModalBehavior } from '@wise/dynamic-flow-types/build/next';
1
+ import type { Action, ActionBehavior, DismissBehavior, Icon, JsonElement, LinkBehavior, Margin, ModalBehavior, Model } from '@wise/dynamic-flow-types/build/next';
2
2
  import type { AlertComponent } from './components/AlertComponent';
3
3
  import type { AllOfComponent } from './components/AllOfComponent';
4
4
  import type { BooleanInputComponent } from './components/BooleanInputComponent';
@@ -19,6 +19,7 @@ import type { ListComponent } from './components/ListComponent';
19
19
  import type { LoadingIndicatorComponent } from './components/LoadingIndicatorComponent';
20
20
  import type { MarkdownComponent } from './components/MarkdownComponent';
21
21
  import type { ModalComponent } from './components/ModalComponent';
22
+ import type { ModalContentComponent } from './components/ModalContentComponent';
22
23
  import type { MultiSelectComponent } from './components/MultiSelectInputComponent';
23
24
  import type { MultiUploadInputComponent } from './components/MultiUploadInputComponent';
24
25
  import type { NumberInputComponent } from './components/NumberInputComponent';
@@ -30,13 +31,14 @@ import type { RootDomainComponent } from './components/RootDomainComponent';
30
31
  import type { SearchComponent } from './components/searchComponent/SearchComponent';
31
32
  import type { SelectInputComponent } from './components/SelectInputComponent';
32
33
  import type { StatusListComponent } from './components/StatusListComponent';
34
+ import type { ExternalConfirmationComponent } from './components/step/ExternalConfirmationComponent';
33
35
  import type { StepDomainComponent } from './components/step/StepDomainComponent';
34
36
  import type { TextInputComponent } from './components/TextInputComponent';
35
37
  import type { TupleComponent } from './components/TupleComponent';
36
38
  import type { UploadInputComponent } from './components/UploadInputComponent';
37
- import { ModalContentComponent } from './components/ModalContentComponent';
38
- import { ExternalConfirmationComponent } from './components/step/ExternalConfirmationComponent';
39
- export type DomainComponent = RootDomainComponent | StepDomainComponent | AlertComponent | AllOfComponent | BooleanInputComponent | BoxComponent | ButtonComponent | ColumnsComponent | ConstComponent | ContainerComponent | DateInputComponent | DecisionComponent | DividerComponent | ExternalConfirmationComponent | FormComponent | HeadingComponent | ImageComponent | InstructionsComponent | IntegerInputComponent | ListComponent | LoadingIndicatorComponent | MarkdownComponent | ModalComponent | ModalContentComponent | MultiSelectComponent | MultiUploadInputComponent | NumberInputComponent | ObjectComponent | ParagraphComponent | RepeatableComponent | ReviewComponent | SearchComponent | SelectInputComponent | StatusListComponent | TextInputComponent | TupleComponent | UploadInputComponent;
39
+ export type DomainComponent = InputComponent | LayoutComponent;
40
+ export type InputComponent = AllOfComponent | BooleanInputComponent | ConstComponent | DateInputComponent | IntegerInputComponent | MultiSelectComponent | MultiUploadInputComponent | NumberInputComponent | ObjectComponent | RepeatableComponent | SelectInputComponent | TextInputComponent | TupleComponent | UploadInputComponent;
41
+ export type LayoutComponent = RootDomainComponent | StepDomainComponent | AlertComponent | BoxComponent | ButtonComponent | ColumnsComponent | ContainerComponent | DecisionComponent | DividerComponent | ExternalConfirmationComponent | FormComponent | HeadingComponent | ImageComponent | InstructionsComponent | ListComponent | LoadingIndicatorComponent | MarkdownComponent | ModalComponent | ModalContentComponent | ParagraphComponent | ReviewComponent | SearchComponent | StatusListComponent;
40
42
  export type LocalValue = LocalValuePrimitive | LocalValueObject | LocalValueArray;
41
43
  export type LocalValuePrimitive = string | number | boolean | File | null;
42
44
  export interface LocalValueObject extends Record<string, LocalValuePrimitive | LocalValueObject | LocalValueArray> {
@@ -69,7 +71,7 @@ export type BaseComponent = {
69
71
  getSummary: () => RepeatableSummary;
70
72
  validate: () => boolean;
71
73
  };
72
- export type LayoutComponent = BaseComponent & {
74
+ export type BaseLayoutComponent = BaseComponent & {
73
75
  control?: string;
74
76
  margin: Margin;
75
77
  getLocalValue: () => LocalValue;
@@ -87,7 +89,7 @@ export type ComponentWithTitle = BaseComponent & {
87
89
  image?: Image;
88
90
  title?: string;
89
91
  };
90
- export type InputComponent<V extends LocalValue> = ComponentWithTitle & {
92
+ export type BaseInputComponent<V extends LocalValue> = ComponentWithTitle & {
91
93
  id: string;
92
94
  autoComplete: string;
93
95
  disabled: boolean;
@@ -96,6 +98,7 @@ export type InputComponent<V extends LocalValue> = ComponentWithTitle & {
96
98
  required: boolean;
97
99
  validationAsyncState?: ValidationAsyncState;
98
100
  value: V;
101
+ alert?: InlineAlert;
99
102
  onBlur: () => void;
100
103
  onFocus: () => void;
101
104
  getLocalValue: () => V;
@@ -151,7 +154,7 @@ export type AdditionalInfo = {
151
154
  };
152
155
  export type InlineAlert = {
153
156
  content: string;
154
- context?: Context;
157
+ context: Context;
155
158
  };
156
159
  export type SupportingValues = {
157
160
  value?: string;
@@ -1,5 +1,5 @@
1
- import type { DomainComponent, LoadingState } from '../../domain/types';
2
1
  import type { RendererProps, RenderFunction } from '@wise/dynamic-flow-types/build/renderers';
2
+ import type { DomainComponent, LoadingState } from '../../domain/types';
3
3
  import { AnalyticsEventDispatcher } from '../../domain/features/events';
4
4
  import { HttpClient } from '../../types';
5
5
  export type RendererMapperProps = {
@@ -1,6 +1,6 @@
1
1
  import { ValidationResult } from '@wise/dynamic-flow-types/build/renderers';
2
- import type { InputComponent, LocalValue } from '../../../domain/types';
3
- export declare const inputComponentToProps: <T extends string, V extends LocalValue>(component: InputComponent<V>, type: T) => {
2
+ import type { BaseInputComponent, LocalValue } from '../../../domain/types';
3
+ export declare const inputComponentToProps: <T extends string, V extends LocalValue>(component: BaseInputComponent<V>, type: T) => {
4
4
  uid: string;
5
5
  type: T;
6
6
  control: string | undefined;