@digigov/react-experimental 2.0.0-2445d5cb → 2.0.0-36b707c1

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 (119) hide show
  1. package/index.js +1 -1
  2. package/libs/ui/src/app/Loader/Loader.stories.d.ts +1 -0
  3. package/libs/ui/src/app/Loader/__stories__/FullPageLoader.d.ts +2 -0
  4. package/libs/ui/src/app/Modal/index.d.ts +2 -3
  5. package/libs/ui/src/app/OutdatedBrowserBanner/index.d.ts +0 -1
  6. package/libs/ui/src/content/Accordion/auto.d.ts +2 -2
  7. package/libs/ui/src/content/Accordion/index.d.ts +0 -1
  8. package/libs/ui/src/content/Markdown/Markdown.stories.d.ts +9 -0
  9. package/libs/ui/src/content/Markdown/index.d.ts +1 -1
  10. package/libs/ui/src/content/SafeHTML/SafeHTML.stories.d.ts +9 -0
  11. package/libs/ui/src/{patterns/FilteredResults → content/SafeHTML}/__stories__/Default.d.ts +1 -0
  12. package/libs/ui/src/content/StepNav/auto.d.ts +2 -2
  13. package/libs/ui/src/content/StepNav/index.d.ts +0 -1
  14. package/libs/ui/src/content/SummaryList/SummaryList.stories.d.ts +15 -9
  15. package/libs/ui/src/content/SummaryList/__stories__/SummaryListExample.d.ts +14 -0
  16. package/libs/ui/src/feedback/WarningText/index.d.ts +1 -0
  17. package/libs/ui/src/form/Checkbox/index.d.ts +1 -0
  18. package/libs/ui/src/index.d.ts +0 -1
  19. package/libs/ui/src/navigation/Drawer/index.d.ts +0 -1
  20. package/libs/ui/src/navigation/Pagination/auto.d.ts +2 -2
  21. package/libs/ui/src/navigation/Pagination/index.d.ts +0 -1
  22. package/libs/ui/src/navigation/Tabs/index.d.ts +0 -1
  23. package/libs/ui/src/registry.d.ts +5 -9
  24. package/libs/ui/src/typography/CodeBlock/index.d.ts +4 -4
  25. package/libs/ui/src/utils/Base/index.d.ts +1 -0
  26. package/libs/ui/src/utils/hooks/useDebounce.d.ts +1 -1
  27. package/libs/ui/src/utils/hooks/useKeypress.d.ts +1 -1
  28. package/libs-ui/react-core/src/Base/index.d.ts +2 -95
  29. package/libs-ui/react-core/src/Base/index.web.d.ts +104 -0
  30. package/libs-ui/react-core/src/Base/utils.d.ts +41 -0
  31. package/libs-ui/react-core/src/CheckboxItemInput/index.d.ts +2 -0
  32. package/libs-ui/react-core/src/CheckboxItemInput/index.web.d.ts +10 -0
  33. package/libs-ui/react-core/src/CodeBlockContainer/index.d.ts +1 -1
  34. package/libs-ui/react-core/src/CodeBlockContent/index.d.ts +1 -1
  35. package/libs-ui/react-core/src/CodeBlockHeader/index.d.ts +1 -1
  36. package/libs-ui/react-core/src/CopyToClipboardContainer/index.d.ts +2 -31
  37. package/libs-ui/react-core/src/CopyToClipboardContainer/index.web.d.ts +31 -0
  38. package/libs-ui/react-core/src/CopyToClipboardMessage/index.d.ts +2 -18
  39. package/libs-ui/react-core/src/CopyToClipboardMessage/index.web.d.ts +18 -0
  40. package/libs-ui/react-core/src/DateInputItem/index.d.ts +2 -26
  41. package/libs-ui/react-core/src/DateInputItem/index.web.d.ts +26 -0
  42. package/libs-ui/react-core/src/Details/index.d.ts +2 -10
  43. package/libs-ui/react-core/src/Details/index.web.d.ts +10 -0
  44. package/libs-ui/react-core/src/NavListItemActionContainer/index.d.ts +2 -10
  45. package/libs-ui/react-core/src/NavListItemActionContainer/index.web.d.ts +10 -0
  46. package/libs-ui/react-core/src/NotificationBannerLink/index.d.ts +2 -11
  47. package/libs-ui/react-core/src/NotificationBannerLink/index.web.d.ts +11 -0
  48. package/libs-ui/react-core/src/PhaseBannerTag/index.d.ts +2 -2
  49. package/libs-ui/react-core/src/Stack/index.d.ts +9 -1
  50. package/libs-ui/react-core/src/SummaryList/index.d.ts +1 -1
  51. package/libs-ui/react-core/src/SummaryListItemKey/index.d.ts +14 -0
  52. package/libs-ui/react-core/src/TextArea/index.d.ts +2 -24
  53. package/libs-ui/react-core/src/TextArea/index.web.d.ts +24 -0
  54. package/libs-ui/react-core/src/TextInput/index.d.ts +2 -46
  55. package/libs-ui/react-core/src/TextInput/index.web.d.ts +46 -0
  56. package/libs-ui/react-core/src/WarningTextAssistive/index.d.ts +15 -0
  57. package/package.json +5 -5
  58. package/libs/form/src/Field/FieldBase.d.ts +0 -3
  59. package/libs/form/src/Field/FieldBaseContainer.d.ts +0 -4
  60. package/libs/form/src/Field/FieldConditional.d.ts +0 -4
  61. package/libs/form/src/Field/index.d.ts +0 -4
  62. package/libs/form/src/Field/types.d.ts +0 -119
  63. package/libs/form/src/Field/utils/calculateField.d.ts +0 -2
  64. package/libs/form/src/Field/utils/evaluateFieldWithConditions.d.ts +0 -2
  65. package/libs/form/src/Field/utils/index.d.ts +0 -3
  66. package/libs/form/src/Field/utils/useField.d.ts +0 -2
  67. package/libs/form/src/FieldArray/index.d.ts +0 -11
  68. package/libs/form/src/FieldObject/index.d.ts +0 -23
  69. package/libs/form/src/Fieldset/index.d.ts +0 -8
  70. package/libs/form/src/Fieldset/types.d.ts +0 -10
  71. package/libs/form/src/FormBuilder/index.d.ts +0 -3
  72. package/libs/form/src/FormContext.d.ts +0 -3
  73. package/libs/form/src/MultiplicityField/add-objects.d.ts +0 -14
  74. package/libs/form/src/MultiplicityField/index.d.ts +0 -15
  75. package/libs/form/src/MultiplicityField/types.d.ts +0 -19
  76. package/libs/form/src/index.d.ts +0 -9
  77. package/libs/form/src/inputs/AutoCompleteInput/index.d.ts +0 -14
  78. package/libs/form/src/inputs/Checkboxes/index.d.ts +0 -13
  79. package/libs/form/src/inputs/DateInput/index.d.ts +0 -14
  80. package/libs/form/src/inputs/FileInput/index.d.ts +0 -14
  81. package/libs/form/src/inputs/ImageInput/index.d.ts +0 -25
  82. package/libs/form/src/inputs/Input/index.d.ts +0 -16
  83. package/libs/form/src/inputs/Label/index.d.ts +0 -21
  84. package/libs/form/src/inputs/OtpInput/index.d.ts +0 -16
  85. package/libs/form/src/inputs/Radio/index.d.ts +0 -13
  86. package/libs/form/src/inputs/Select/index.d.ts +0 -11
  87. package/libs/form/src/internal.d.ts +0 -5
  88. package/libs/form/src/types.d.ts +0 -55
  89. package/libs/form/src/utils.d.ts +0 -8
  90. package/libs/form/src/validators/index.d.ts +0 -9
  91. package/libs/form/src/validators/types.d.ts +0 -2
  92. package/libs/form/src/validators/utils/afm.d.ts +0 -6
  93. package/libs/form/src/validators/utils/file.d.ts +0 -3
  94. package/libs/form/src/validators/utils/iban.d.ts +0 -4
  95. package/libs/form/src/validators/utils/image.d.ts +0 -3
  96. package/libs/form/src/validators/utils/index.d.ts +0 -27
  97. package/libs/form/src/validators/utils/int.d.ts +0 -3
  98. package/libs/form/src/validators/utils/number.d.ts +0 -3
  99. package/libs/form/src/validators/utils/otp.d.ts +0 -4
  100. package/libs/form/src/validators/utils/phone.d.ts +0 -11
  101. package/libs/form/src/validators/utils/postal_code.d.ts +0 -4
  102. package/libs/form/src/validators/utils/text_limit.d.ts +0 -4
  103. package/libs/form/src/validators/utils/uuid4.d.ts +0 -6
  104. package/libs/ui/src/content/SummaryList/__stories__/RowVariations.d.ts +0 -3
  105. package/libs/ui/src/content/SummaryList/__stories__/WithActions.d.ts +0 -3
  106. package/libs/ui/src/content/SummaryList/__stories__/WithKeyAndAction.d.ts +0 -3
  107. package/libs/ui/src/content/SummaryList/__stories__/WithNoLastBorder.d.ts +0 -3
  108. package/libs/ui/src/content/SummaryList/__stories__/WithoutActions.d.ts +0 -3
  109. package/libs/ui/src/content/SummaryList/__stories__/WithoutBorders.d.ts +0 -3
  110. package/libs/ui/src/patterns/FilteredResults/DataTable.d.ts +0 -5
  111. package/libs/ui/src/patterns/FilteredResults/FilterChips.d.ts +0 -3
  112. package/libs/ui/src/patterns/FilteredResults/FilterFields.d.ts +0 -5
  113. package/libs/ui/src/patterns/FilteredResults/FilteredResults.stories.d.ts +0 -8
  114. package/libs/ui/src/patterns/FilteredResults/hooks.d.ts +0 -22
  115. package/libs/ui/src/patterns/FilteredResults/index.d.ts +0 -25
  116. package/libs/ui/src/patterns/index.d.ts +0 -1
  117. package/libs-ui/react-core/src/index.d.ts +0 -218
  118. /package/libs/ui/src/app/Modal/{Modal.d.ts → index.web.d.ts} +0 -0
  119. /package/libs/ui/src/content/{SummaryList → Markdown}/__stories__/Default.d.ts +0 -0
@@ -1,3 +0,0 @@
1
- import { FieldComponentRegistry } from '@digigov/form/Field/types';
2
- export declare const FIELD_COMPONENTS: FieldComponentRegistry;
3
- export declare const ALTERNATIVE_COMPONENTS: FieldComponentRegistry;
@@ -1,2 +0,0 @@
1
- import { FieldSpec, UseFieldProps } from '@digigov/form/Field/types';
2
- export declare const useField: (name: string, customField: FieldSpec | null) => UseFieldProps;
@@ -1,11 +0,0 @@
1
- import React from 'react';
2
- import { ErrorOption, UseFormReturn } from 'react-hook-form';
3
- import { FieldProps } from '@digigov/form/Field/types';
4
- export interface FieldArrayProps extends FieldProps {
5
- control: UseFormReturn['control'];
6
- register: UseFormReturn['register'];
7
- formState: UseFormReturn['formState'];
8
- error?: ErrorOption;
9
- }
10
- export declare const FieldArray: React.FC<FieldArrayProps>;
11
- export default FieldArray;
@@ -1,23 +0,0 @@
1
- import React from 'react';
2
- import { ErrorOption, UseFormReturn } from 'react-hook-form';
3
- import { FieldProps } from '@digigov/form/Field/types';
4
- import { FieldSpec } from '@digigov/form/types';
5
- export interface FieldObjectProps extends Omit<FieldProps, 'key'> {
6
- control: UseFormReturn['control'];
7
- register: UseFormReturn['register'];
8
- reset: UseFormReturn['reset'];
9
- formState: UseFormReturn['formState'];
10
- error?: ErrorOption;
11
- }
12
- export declare const FieldObject: React.FC<FieldObjectProps>;
13
- export interface FieldObjectItemProps {
14
- name: string;
15
- field: FieldSpec;
16
- control: UseFormReturn['control'];
17
- register: UseFormReturn['register'];
18
- reset: UseFormReturn['reset'];
19
- formState: UseFormReturn['formState'];
20
- error?: ErrorOption;
21
- children?: React.ReactNode;
22
- }
23
- export default FieldObject;
@@ -1,8 +0,0 @@
1
- import React from 'react';
2
- import { FieldsetLabelProps, FieldsetCaptionProps, FieldsetBodyProps } from '@digigov/form/Fieldset/types';
3
- import Fieldset from '@digigov/react-core/Fieldset';
4
- export declare const FieldsetLabel: React.FC<FieldsetLabelProps>;
5
- export declare const FieldsetCaption: React.FC<FieldsetCaptionProps>;
6
- export declare const FieldsetBody: React.FC<FieldsetBodyProps>;
7
- export { Fieldset };
8
- export default Fieldset;
@@ -1,10 +0,0 @@
1
- /// <reference types="react" />
2
- import { FieldsetLegendProps } from '@digigov/react-core/FieldsetLegend';
3
- import { HintProps } from '@digigov/react-core/Hint';
4
- export interface FieldsetLabelProps extends FieldsetLegendProps {
5
- }
6
- export interface FieldsetCaptionProps extends HintProps {
7
- }
8
- export interface FieldsetBodyProps {
9
- children?: React.ReactNode;
10
- }
@@ -1,3 +0,0 @@
1
- import { FormBuilder, useFormContext, useFormValues, FormBase } from '@digigov/form';
2
- export { useFormContext, useFormValues, FormBase };
3
- export default FormBuilder;
@@ -1,3 +0,0 @@
1
- import React from 'react';
2
- import { FormContextProps } from '@digigov/form/types';
3
- export declare const FormContext: React.Context<FormContextProps>;
@@ -1,14 +0,0 @@
1
- import React from 'react';
2
- import { ErrorOption, FieldArrayWithId, UseFieldArrayReturn } from 'react-hook-form';
3
- import type { MultiplicityProps, StashedObject } from '@digigov/form/MultiplicityField/types';
4
- export interface AddObjectsProps extends Omit<MultiplicityProps, 'key' | 'component'> {
5
- fields: FieldArrayWithId[];
6
- error?: ErrorOption;
7
- append: UseFieldArrayReturn['append'];
8
- remove: UseFieldArrayReturn['remove'];
9
- stashedObjects: StashedObject[];
10
- onStash: (arg0: StashedObject) => void;
11
- children?: React.ReactNode;
12
- }
13
- export declare const AddObjects: React.FC<AddObjectsProps>;
14
- export default AddObjects;
@@ -1,15 +0,0 @@
1
- import React from 'react';
2
- import { UseFormReturn } from 'react-hook-form';
3
- import { MultiplicityProps } from '@digigov/form/MultiplicityField/types';
4
- export declare const Multiplicity: React.FC<MultiplicityProps>;
5
- export default Multiplicity;
6
- export interface ListObjectProps {
7
- index: number;
8
- name: string;
9
- control: UseFormReturn['control'];
10
- register: UseFormReturn['register'];
11
- formState: UseFormReturn['formState'];
12
- onDelete: (index: number) => void;
13
- extra?: Record<string, any>;
14
- }
15
- export declare const ListObject: React.FC<ListObjectProps>;
@@ -1,19 +0,0 @@
1
- import { ErrorOption, UseFormReturn } from 'react-hook-form';
2
- import { FieldSpec } from '@digigov/form/Field/types';
3
- import { ControlledFieldProps } from '@digigov/form/Field/types';
4
- export interface MultiplicityProps extends Omit<ControlledFieldProps, 'value' | 'onChange' | 'error' | 'extra'> {
5
- name: string;
6
- control: UseFormReturn['control'];
7
- register: UseFormReturn['register'];
8
- trigger: UseFormReturn['trigger'];
9
- clearErrors: UseFormReturn['clearErrors'];
10
- formState: UseFormReturn['formState'];
11
- setValue: UseFormReturn['setValue'];
12
- getValues: UseFormReturn['getValues'];
13
- unregister: UseFormReturn['unregister'];
14
- error?: ErrorOption;
15
- extra?: Record<string, any>;
16
- label?: FieldSpec['label'];
17
- layout?: FieldSpec['layout'];
18
- }
19
- export type StashedObject = Record<string, any>;
@@ -1,9 +0,0 @@
1
- import React from 'react';
2
- import { FormBaseProps, FormBuilderProps } from '@digigov/form/types';
3
- declare const FormBase: React.ForwardRefExoticComponent<FormBaseProps & React.RefAttributes<HTMLFormElement>>;
4
- declare const useFormContext: () => import("@digigov/form/types").FormContextProps;
5
- declare const useFormValues: () => import("react-hook-form").FieldValues;
6
- declare const FormBuilder: React.ForwardRefExoticComponent<FormBuilderProps & React.RefAttributes<HTMLFormElement>>;
7
- export { FormBase, useFormContext, useFormValues, FormBuilder };
8
- export * from '@digigov/form/internal';
9
- export default FormBuilder;
@@ -1,14 +0,0 @@
1
- import React from 'react';
2
- import { ControlledFieldProps } from '@digigov/form/Field/types';
3
- import { FieldOptionProps } from '@digigov/form/inputs/Label';
4
- import { AutoCompleteProps as UIAutoCompleteProps } from '@digigov/ui/form/AutoComplete';
5
- export interface AutoCompleteInputExtra extends Omit<UIAutoCompleteProps, 'source' | 'id' | 'templates' | 'defaultValue' | 'onConfirm' | 'dropdownArrow'> {
6
- options: Array<FieldOptionProps>;
7
- }
8
- export interface AutoCompleteInputProps extends Omit<ControlledFieldProps, 'value' | 'onChange' | 'extra'> {
9
- extra: AutoCompleteInputExtra;
10
- value: string;
11
- onChange: (v: string | string[] | undefined) => void;
12
- }
13
- export declare const AutoCompleteInput: React.FC<AutoCompleteInputProps>;
14
- export default AutoCompleteInput;
@@ -1,13 +0,0 @@
1
- import React from 'react';
2
- import { ControlledFieldProps } from '@digigov/form/Field/types';
3
- import { FieldOptionProps } from '@digigov/form/inputs/Label';
4
- export interface CheckboxesProps extends Omit<ControlledFieldProps, 'extra' | 'value'> {
5
- value?: string[];
6
- extra: {
7
- className?: string;
8
- options: Array<FieldOptionProps>;
9
- };
10
- fieldComponent: React.FC<Omit<ControlledFieldProps, 'value' | 'onChange'>>;
11
- }
12
- export declare const Checkboxes: React.FC<CheckboxesProps>;
13
- export default Checkboxes;
@@ -1,14 +0,0 @@
1
- import React from 'react';
2
- import { UncontrolledFieldProps } from '@digigov/form/Field/types';
3
- export interface DateInputProps extends Omit<UncontrolledFieldProps, 'extra'> {
4
- extra?: {
5
- max?: string;
6
- min?: string;
7
- };
8
- }
9
- export declare const DateInput: ({ name, type, ...props }: {
10
- [x: string]: any;
11
- name: any;
12
- type: any;
13
- }) => React.JSX.Element;
14
- export default DateInput;
@@ -1,14 +0,0 @@
1
- import React from 'react';
2
- import { UncontrolledFieldProps } from '@digigov/form/Field/types';
3
- export interface FileInputProps extends Omit<UncontrolledFieldProps, 'extra'> {
4
- extra?: {
5
- className?: string;
6
- multiple?: boolean;
7
- accept?: string;
8
- limit: {
9
- maxSize?: number;
10
- };
11
- };
12
- }
13
- export declare const FileInput: React.FC<any>;
14
- export default FileInput;
@@ -1,25 +0,0 @@
1
- import React from 'react';
2
- import { UncontrolledFieldProps } from '@digigov/form/Field/types';
3
- export interface ImageProps {
4
- src?: any;
5
- }
6
- export interface Limit {
7
- maxSize?: number;
8
- maxWidth?: number;
9
- maxHeight?: number;
10
- minWidth?: number;
11
- minHeight?: number;
12
- }
13
- export declare const Image: React.FC<ImageProps>;
14
- export interface ImageInputProps extends Omit<UncontrolledFieldProps, 'extra'> {
15
- extra?: {
16
- className?: string;
17
- multiple?: boolean;
18
- accept?: string;
19
- limit?: Limit;
20
- };
21
- reset: (values?: any) => void;
22
- onChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
23
- }
24
- export declare const ImageInput: React.FC<ImageInputProps>;
25
- export default ImageInput;
@@ -1,16 +0,0 @@
1
- import React from 'react';
2
- import { UncontrolledFieldProps } from '@digigov/form/Field/types';
3
- export interface InputProps extends Omit<UncontrolledFieldProps, 'extra'> {
4
- extra?: {
5
- fullWidth?: boolean;
6
- multiline?: boolean;
7
- className?: string;
8
- rows?: any;
9
- limit: {
10
- min?: number;
11
- max?: number;
12
- };
13
- };
14
- }
15
- export declare const Input: React.ExoticComponent<InputProps>;
16
- export default Input;
@@ -1,21 +0,0 @@
1
- import React from 'react';
2
- import { FieldLabelProps } from '@digigov/form/types';
3
- export interface FieldOptionProps {
4
- label?: FieldLabelProps;
5
- value: string;
6
- show?: string[];
7
- disabled?: boolean;
8
- selected?: () => React.ReactNode;
9
- divider?: string;
10
- }
11
- export interface LabelProps {
12
- primary?: string;
13
- secondary?: string;
14
- }
15
- export interface LabelProps {
16
- className?: string;
17
- value?: string;
18
- label?: FieldLabelProps;
19
- }
20
- export declare const Label: React.FC<LabelProps>;
21
- export default Label;
@@ -1,16 +0,0 @@
1
- import React from 'react';
2
- export declare const RE_DIGIT: RegExp;
3
- export declare const REMOVE_SPACES: RegExp;
4
- export declare function useOtp(onChange: any, maxLength: any): {
5
- otpValues: string[];
6
- handleOtpChange: (e: React.ChangeEvent<HTMLInputElement>, idx: number) => void;
7
- handleKeyDown: (e: React.KeyboardEvent<HTMLInputElement>, idx: number) => void;
8
- handleFocus: (e: React.FocusEvent<HTMLInputElement>) => void;
9
- handlePaste: (e: React.ClipboardEvent<HTMLInputElement>) => void;
10
- };
11
- export declare const OtpInput: ({ name, maxLength, ...props }: {
12
- [x: string]: any;
13
- name: any;
14
- maxLength?: number | undefined;
15
- }) => React.JSX.Element;
16
- export default OtpInput;
@@ -1,13 +0,0 @@
1
- import React from 'react';
2
- import { UncontrolledFieldProps } from '@digigov/form/Field/types';
3
- import { FieldOptionProps } from '@digigov/form/inputs/Label';
4
- export interface RadioButtonsGroupProps extends Omit<UncontrolledFieldProps, 'extra'> {
5
- extra: {
6
- className?: string;
7
- options: Array<FieldOptionProps>;
8
- dense?: boolean;
9
- };
10
- fieldComponent?: React.FC<Omit<UncontrolledFieldProps, 'register'>>;
11
- }
12
- export declare const RadioButtonsGroup: React.FC<RadioButtonsGroupProps>;
13
- export default RadioButtonsGroup;
@@ -1,11 +0,0 @@
1
- import React from 'react';
2
- import { UncontrolledFieldProps } from '@digigov/form/Field/types';
3
- import { FieldOptionProps } from '@digigov/form/inputs/Label';
4
- export interface SelectProps extends Omit<UncontrolledFieldProps, 'extra'> {
5
- extra: {
6
- className?: string;
7
- options: Array<FieldOptionProps>;
8
- };
9
- }
10
- export declare const Select: React.ExoticComponent<SelectProps>;
11
- export default Select;
@@ -1,5 +0,0 @@
1
- export { Field } from '@digigov/form/Field';
2
- export { Fieldset } from '@digigov/form/Fieldset';
3
- export * from '@digigov/form/FormContext';
4
- export * from '@digigov/form/types';
5
- export * from '@digigov/form/validators';
@@ -1,55 +0,0 @@
1
- /// <reference types="react" />
2
- import { UseFormReturn, UseFormProps } from 'react-hook-form';
3
- import { FieldComponentRegistry, FieldLabelProps, FieldSpec, FormData } from '@digigov/form/Field/types';
4
- import { ValidatorSchema } from '@digigov/form/validators/types';
5
- export * from '@digigov/form/Field/types';
6
- export type FieldError = {
7
- message: string;
8
- };
9
- export interface FieldsetSpec {
10
- key: string;
11
- fields: string[];
12
- label?: FieldLabelProps;
13
- body?: React.ReactNode;
14
- }
15
- export interface FormContextProps {
16
- fieldsetsMap?: Record<string, FieldsetSpec>;
17
- fieldsMap: Record<string, FieldSpec>;
18
- control: UseFormReturn['control'];
19
- register: UseFormReturn['register'];
20
- trigger: UseFormReturn['trigger'];
21
- clearErrors: UseFormReturn['clearErrors'];
22
- watch: UseFormReturn['watch'];
23
- getFieldState: UseFormReturn['getFieldState'];
24
- setValue: UseFormReturn['setValue'];
25
- getValues: UseFormReturn['getValues'];
26
- unregister: UseFormReturn['unregister'];
27
- formState: UseFormReturn['formState'];
28
- reset: UseFormReturn['reset'];
29
- resetField: UseFormReturn['resetField'];
30
- registerField: (field: FieldSpec) => void;
31
- errors: UseFormReturn['formState']['errors'];
32
- componentRegistry?: FieldComponentRegistry;
33
- submit: () => Promise<void>;
34
- }
35
- export interface FormBuilderProps {
36
- fields?: FieldSpec[];
37
- fieldsets?: FieldsetSpec[];
38
- initial?: FormData;
39
- onSubmit?: (data: FormData) => void | null | FieldError[];
40
- mode?: UseFormProps['mode'];
41
- reValidateMode?: UseFormProps['reValidateMode'];
42
- criteriaMode?: UseFormProps['criteriaMode'];
43
- children?: React.ReactNode;
44
- shouldFocusError?: boolean;
45
- auto?: boolean;
46
- validatorRegistry?: Record<string, ValidatorSchema[]>;
47
- componentRegistry?: FieldComponentRegistry;
48
- grid?: boolean;
49
- }
50
- export interface FormBaseProps extends Omit<FormBuilderProps, 'fields' | 'fieldsets' | 'auto'> {
51
- fieldsetsMap?: Record<string, FieldsetSpec>;
52
- fieldsMap: Record<string, FieldSpec>;
53
- registerField: (field: FieldSpec) => void;
54
- resolver: any;
55
- }
@@ -1,8 +0,0 @@
1
- import { FieldError } from 'react-hook-form';
2
- export declare const yupResolver: (schema: any, schemaOptions?: any, resolverOptions?: any) => (values: any, context: any, options: any) => Promise<{
3
- values: any;
4
- errors: {};
5
- } | {
6
- values: {};
7
- errors: Record<string, FieldError>;
8
- }>;
@@ -1,9 +0,0 @@
1
- import { MutableRefObject } from 'react';
2
- import { AnyObjectSchema } from 'yup';
3
- import Lazy from 'yup/lib/Lazy';
4
- import { FieldSpec } from '@digigov/form/types';
5
- import { ValidatorSchema } from '@digigov/form/validators/types';
6
- export declare const getYUPTypeMap: () => Record<string, any>;
7
- export interface MutableRefObjectProps {
8
- }
9
- export declare function useValidationSchema(fields: FieldSpec[] | MutableRefObject<MutableRefObjectProps>, validatorRegistry?: Record<string, ValidatorSchema[]>): Lazy<any, unknown> | AnyObjectSchema | void;
@@ -1,2 +0,0 @@
1
- import * as yup from 'yup';
2
- export type ValidatorSchema = yup.TestConfig;
@@ -1,6 +0,0 @@
1
- export declare function validateAFM(afm: string): boolean;
2
- export declare const AFM_VALIDATOR: {
3
- name: string;
4
- message: string;
5
- test: (value: any) => boolean;
6
- };
@@ -1,3 +0,0 @@
1
- import { FieldSpec } from '@digigov/form/types';
2
- import { ValidatorSchema } from '@digigov/form/validators/types';
3
- export declare const FILE_MAX_SIZE_VALIDATOR: (field: FieldSpec) => ValidatorSchema;
@@ -1,4 +0,0 @@
1
- import { FieldSpec } from '@digigov/form/types';
2
- import { ValidatorSchema } from '@digigov/form/validators/types';
3
- export declare function validateIban(value: string, countryCode: string): boolean;
4
- export declare const IBAN_VALIDATOR: (field: FieldSpec) => ValidatorSchema;
@@ -1,3 +0,0 @@
1
- import { FieldSpec } from '@digigov/form/types';
2
- import { ValidatorSchema } from '@digigov/form/validators/types';
3
- export declare const IMAGE_DIMENSION_VALIDATOR: (field: FieldSpec) => ValidatorSchema;
@@ -1,27 +0,0 @@
1
- import * as yup from 'yup';
2
- import { FieldSpec } from '@digigov/form/types';
3
- import { ValidatorSchema } from '@digigov/form/validators/types';
4
- export * from '@digigov/form/validators/utils/afm';
5
- export * from '@digigov/form/validators/utils/file';
6
- export * from '@digigov/form/validators/utils/iban';
7
- export * from '@digigov/form/validators/utils/otp';
8
- export * from '@digigov/form/validators/utils/image';
9
- export * from '@digigov/form/validators/utils/phone';
10
- export * from '@digigov/form/validators/utils/postal_code';
11
- export * from '@digigov/form/validators/utils/uuid4';
12
- export * from '@digigov/form/validators/utils/text_limit';
13
- export declare function getYupField(field: FieldSpec, yupTypeMap: Record<string, any>): any;
14
- export declare function computeShape(fields: FieldSpec[], yupTypeMap: Record<string, ValidatorSchema>, validatorRegistry: Record<string, ValidatorSchema[]> | undefined): {};
15
- export declare function getYupObjectShape(fields: FieldSpec[] | any, yupTypeMap: Record<string, any>, validatorRegistry?: Record<string, ValidatorSchema[]>): yup.ObjectSchema<{
16
- [x: string]: yup.AnySchema | import("yup/lib/Reference").default<unknown> | import("yup/lib/Lazy").default<any, any>;
17
- }, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<{
18
- [x: string]: yup.AnySchema | import("yup/lib/Reference").default<unknown> | import("yup/lib/Lazy").default<any, any>;
19
- }>, import("yup/lib/object").AssertsShape<{
20
- [x: string]: yup.AnySchema | import("yup/lib/Reference").default<unknown> | import("yup/lib/Lazy").default<any, any>;
21
- }>> | import("yup/lib/Lazy").default<yup.ObjectSchema<{
22
- [x: string]: yup.AnySchema | import("yup/lib/Reference").default<unknown> | import("yup/lib/Lazy").default<any, any>;
23
- }, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<{
24
- [x: string]: yup.AnySchema | import("yup/lib/Reference").default<unknown> | import("yup/lib/Lazy").default<any, any>;
25
- }>, import("yup/lib/object").AssertsShape<{
26
- [x: string]: yup.AnySchema | import("yup/lib/Reference").default<unknown> | import("yup/lib/Lazy").default<any, any>;
27
- }>>, import("yup/lib/object").AnyObject>;
@@ -1,3 +0,0 @@
1
- import { ValidatorSchema } from '@digigov/form/validators/types';
2
- export declare function validateIntNumber(number: number): boolean;
3
- export declare const INT_VALIDATOR: () => ValidatorSchema;
@@ -1,3 +0,0 @@
1
- import { ValidatorSchema } from '@digigov/form/validators/types';
2
- export declare function validateNumber(number: number): boolean;
3
- export declare const NUMBER_VALIDATOR: () => ValidatorSchema;
@@ -1,4 +0,0 @@
1
- import { FieldSpec } from '@digigov/form/types';
2
- import { ValidatorSchema } from '@digigov/form/validators/types';
3
- export declare function validateOtp(value: string, maxLength: number): boolean;
4
- export declare const OTP_VALIDATOR: (field: FieldSpec) => ValidatorSchema;
@@ -1,11 +0,0 @@
1
- import { FieldSpec } from '@digigov/form/types';
2
- import { ValidatorSchema } from '@digigov/form/validators/types';
3
- export type PhoneNumberType = 'landline' | 'mobile' | null;
4
- export declare function discoverPhoneType(phoneNumber: string, config: any): string;
5
- export declare function validatePhoneNumber(phoneNumber: string, countries?: Array<string>, typeOfPhoneNumber?: PhoneNumberType): boolean;
6
- export declare const MOBILE_PHONE_VALIDATOR: {
7
- name: string;
8
- message: string;
9
- test: (value: any) => boolean;
10
- };
11
- export declare const PHONE_NUMBER_VALIDATOR: (field: FieldSpec) => ValidatorSchema;
@@ -1,4 +0,0 @@
1
- import { FieldSpec } from '@digigov/form/types';
2
- import { ValidatorSchema } from '@digigov/form/validators/types';
3
- export declare function validatePostalCode(number: string, countries: Array<string>): boolean;
4
- export declare const POSTALCODE_VALIDATOR: (field: FieldSpec) => ValidatorSchema;
@@ -1,4 +0,0 @@
1
- import { FieldSpec } from '@digigov/form/types';
2
- import { ValidatorSchema } from '@digigov/form/validators/types';
3
- export declare function validateText(value: string, min: number, max: number): boolean;
4
- export declare const TEXT_LIMIT_VALIDATOR: (field: FieldSpec) => ValidatorSchema;
@@ -1,6 +0,0 @@
1
- export declare function validateUUID4(uuid4: string): boolean;
2
- export declare const UUID4_VALIDATOR: {
3
- name: string;
4
- message: string;
5
- test: (value: any) => boolean;
6
- };
@@ -1,3 +0,0 @@
1
- import React from 'react';
2
- export declare const RowVariations: () => React.JSX.Element;
3
- export default RowVariations;
@@ -1,3 +0,0 @@
1
- import React from 'react';
2
- export declare const WithActions: () => React.JSX.Element;
3
- export default WithActions;
@@ -1,3 +0,0 @@
1
- import React from 'react';
2
- export declare const WithKeyAndAction: () => React.JSX.Element;
3
- export default WithKeyAndAction;
@@ -1,3 +0,0 @@
1
- import React from 'react';
2
- export declare const WithNoLastBorder: () => React.JSX.Element;
3
- export default WithNoLastBorder;
@@ -1,3 +0,0 @@
1
- import React from 'react';
2
- export declare const WithoutActions: () => React.JSX.Element;
3
- export default WithoutActions;
@@ -1,3 +0,0 @@
1
- import React from 'react';
2
- export declare const WithoutBorders: () => React.JSX.Element;
3
- export default WithoutBorders;
@@ -1,5 +0,0 @@
1
- import React from 'react';
2
- export declare function DataTable({ dataConfig, data }: {
3
- dataConfig: any;
4
- data: any;
5
- }): React.JSX.Element;
@@ -1,3 +0,0 @@
1
- import React from 'react';
2
- export declare const FilterChips: () => React.JSX.Element | null;
3
- export default FilterChips;
@@ -1,5 +0,0 @@
1
- import React from 'react';
2
- export declare const FilterFields: ({ fields, horizontal }: {
3
- fields: any;
4
- horizontal: any;
5
- }) => React.JSX.Element;
@@ -1,8 +0,0 @@
1
- declare namespace _default {
2
- export let title: string;
3
- export { FilteredResults as component };
4
- export let displayName: string;
5
- }
6
- export default _default;
7
- export { Default } from "@digigov/ui/patterns/FilteredResults/__stories__/Default";
8
- import FilteredResults from '@digigov/ui/patterns/FilteredResults';
@@ -1,22 +0,0 @@
1
- import { FieldSpec } from '@digigov/form/types';
2
- import { ScalarType } from '@digigov/ui/patterns/FilteredResults';
3
- export declare function isBooleanString(str: string): boolean;
4
- export declare function normalizeText(text: string): string;
5
- export declare const getOptionLabelForSelectValue: (field: any, value: any) => any;
6
- export declare const useURLParamsSearch: (searchFunc: any, { navigate, fields }: {
7
- navigate: any;
8
- fields: any;
9
- }) => {
10
- search: (params: any) => any;
11
- values: any;
12
- };
13
- interface UseStaticSearchProps<DT extends Record<string, ScalarType>, FT extends Record<string, ScalarType>> {
14
- fields: FieldSpec[];
15
- data: DT[];
16
- initialFilters: FT;
17
- }
18
- export declare function useStaticSearch<DT extends Record<string, ScalarType>, FT extends Record<string, ScalarType>>({ fields, data, initialFilters }: UseStaticSearchProps<DT, FT>): {
19
- search: (filters: FT) => void;
20
- results: DT[];
21
- };
22
- export {};
@@ -1,25 +0,0 @@
1
- import React from 'react';
2
- import { FieldSpec } from '@digigov/form/types';
3
- export type ScalarType = string | number | boolean | null | undefined;
4
- export interface DataConfigType {
5
- key: string;
6
- title: string;
7
- displayComponent?: (value: string | number | boolean) => React.ReactNode;
8
- }
9
- export interface FilteredResultsProps<DT extends Record<string, ScalarType>, FT extends Record<string, ScalarType>> {
10
- fields: FieldSpec[];
11
- data: DT[];
12
- variant?: 'drawer-left' | 'drawer-right' | 'block';
13
- defaultFilters?: FT;
14
- currentFilters?: FT;
15
- onSearch: (filters: unknown) => void;
16
- children?: React.ReactNode;
17
- }
18
- export declare const FormBuilderSyncValues: ({ values, autoSubmit }: {
19
- values: any;
20
- autoSubmit: any;
21
- }) => React.JSX.Element;
22
- export declare const DrawerFilteredResults: React.ForwardRefExoticComponent<React.RefAttributes<HTMLDivElement>>;
23
- export declare const BlockFilteredResults: React.ForwardRefExoticComponent<React.RefAttributes<HTMLDivElement>>;
24
- export declare const FilteredResults: React.ForwardRefExoticComponent<FilteredResultsProps<Record<string, ScalarType>, Record<string, ScalarType>> & React.RefAttributes<HTMLFormElement>>;
25
- export default FilteredResults;
@@ -1 +0,0 @@
1
- export * from '@digigov/ui/patterns/FilteredResults';