@feathery/react 1.0.454 → 1.0.457

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.
@@ -0,0 +1,78 @@
1
+ import React from 'react';
2
+ import TextElement from './basic/TextElement';
3
+ import ButtonElement from './basic/ButtonElement';
4
+ import ImageElement from './basic/ImageElement';
5
+ import ProgressBarElement from './basic/ProgressBarElement';
6
+ import VideoElement from './basic/VideoElement';
7
+ declare const Elements: {
8
+ AddressLine1: React.MemoExoticComponent<({ element, applyStyles, fieldLabel, elementProps, editable, onSelect, onBlur, setRef, value, inlineError, children, ...props }: {
9
+ [x: string]: any;
10
+ element: any;
11
+ applyStyles: any;
12
+ fieldLabel: any;
13
+ elementProps?: {} | undefined;
14
+ editable?: boolean | undefined;
15
+ onSelect?: (() => void) | undefined;
16
+ onBlur?: (() => void) | undefined;
17
+ setRef?: (() => void) | undefined;
18
+ value?: string | undefined;
19
+ inlineError: any;
20
+ children: any;
21
+ }) => import("@emotion/react/jsx-runtime").JSX.Element>;
22
+ ButtonGroupField: typeof import("./fields/ButtonGroupField").default;
23
+ CheckboxField: typeof import("./fields/CheckboxField").default;
24
+ CheckboxGroupField: typeof import("./fields/CheckboxGroupField").default;
25
+ ColorPickerField: typeof import("./fields/ColorPickerField").default;
26
+ DateSelectorField: React.MemoExoticComponent<({ element, applyStyles, fieldLabel, elementProps, required, editable, onChange, setRef, value, inlineError, children }: {
27
+ element: any;
28
+ applyStyles: any;
29
+ fieldLabel: any;
30
+ elementProps?: {} | undefined;
31
+ required?: boolean | undefined;
32
+ editable?: boolean | undefined;
33
+ onChange?: (() => void) | undefined;
34
+ setRef?: (() => void) | undefined;
35
+ value?: string | undefined;
36
+ inlineError: any;
37
+ children: any;
38
+ }) => import("@emotion/react/jsx-runtime").JSX.Element>;
39
+ DropdownField: typeof import("./fields/DropdownField").default;
40
+ FileUploadField: typeof import("./fields/FileUploadField").default;
41
+ PinInputField: typeof import("./fields/PinInputField").default;
42
+ RadioButtonGroupField: typeof import("./fields/RadioButtonGroupField").default;
43
+ SignatureField: typeof import("./fields/SignatureField").default;
44
+ TextField: React.MemoExoticComponent<({ element, applyStyles, fieldLabel, elementProps, required, editable, onAccept, onBlur, setRef, rawValue, inlineError, children }: {
45
+ element: any;
46
+ applyStyles: any;
47
+ fieldLabel: any;
48
+ elementProps?: {} | undefined;
49
+ required?: boolean | undefined;
50
+ editable?: boolean | undefined;
51
+ onAccept?: (() => void) | undefined;
52
+ onBlur?: (() => void) | undefined;
53
+ setRef?: (() => void) | undefined;
54
+ rawValue?: string | undefined;
55
+ inlineError: any;
56
+ children: any;
57
+ }) => import("@emotion/react/jsx-runtime").JSX.Element>;
58
+ TextArea: React.MemoExoticComponent<({ element, applyStyles, fieldLabel, elementProps, required, editable, onChange, setRef, rawValue, inlineError, children }: {
59
+ element: any;
60
+ applyStyles: any;
61
+ fieldLabel: any;
62
+ elementProps?: {} | undefined;
63
+ required?: boolean | undefined;
64
+ editable?: boolean | undefined;
65
+ onChange?: (() => void) | undefined;
66
+ setRef?: (() => void) | undefined;
67
+ rawValue?: string | undefined;
68
+ inlineError: any;
69
+ children: any;
70
+ }) => import("@emotion/react/jsx-runtime").JSX.Element>;
71
+ ImageElement: typeof ImageElement;
72
+ VideoElement: typeof VideoElement;
73
+ TextElement: typeof TextElement;
74
+ ButtonElement: typeof ButtonElement;
75
+ ProgressBarElement: typeof ProgressBarElement;
76
+ };
77
+ export default Elements;
78
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/elements/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwB,MAAM,OAAO,CAAC;AAI7C,OAAO,WAAW,MAAM,qBAAqB,CAAC;AAC9C,OAAO,aAAa,MAAM,uBAAuB,CAAC;AAClD,OAAO,YAAY,MAAM,sBAAsB,CAAC;AAChD,OAAO,kBAAkB,MAAM,4BAA4B,CAAC;AAC5D,OAAO,YAAY,MAAM,sBAAsB,CAAC;AAWhD,QAAA,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAA0B,CAAC;AAuGzC,eAAe,QAAQ,CAAC"}
@@ -0,0 +1,28 @@
1
+ import { FieldValues } from '../utils/init';
2
+ import { ContextOnChange, ContextOnLoad, Context, ContextOnSubmit, ContextOnSkip, ContextOnError, ContextOnCustomAction, ContextOnView, ElementProps } from '../types/Form';
3
+ export interface Props {
4
+ formName: string;
5
+ onChange?: null | ((context: ContextOnChange) => Promise<any> | void);
6
+ onLoad?: null | ((context: ContextOnLoad) => Promise<any> | void);
7
+ onFormComplete?: null | ((context: Context) => Promise<any> | void);
8
+ onSubmit?: null | ((context: ContextOnSubmit) => Promise<any> | void);
9
+ onSkip?: null | ((context: ContextOnSkip) => Promise<any> | void);
10
+ onError?: null | ((context: ContextOnError) => Promise<any> | void);
11
+ onCustomAction?: null | ((context: ContextOnCustomAction) => Promise<any> | void);
12
+ onView?: null | ((context: ContextOnView) => Promise<any> | void);
13
+ onViewElements?: string[];
14
+ initialValues?: FieldValues;
15
+ initialStepId?: string;
16
+ usePreviousUserData?: boolean;
17
+ elementProps?: ElementProps;
18
+ style?: {
19
+ [cssProperty: string]: string;
20
+ };
21
+ className?: string;
22
+ children?: JSX.Element;
23
+ }
24
+ export declare const fieldCounter: {
25
+ value: number;
26
+ };
27
+ export default function FormWithRouter(props: Props): JSX.Element;
28
+ //# sourceMappingURL=Form.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Form.d.ts","sourceRoot":"","sources":["../../src/form/Form.tsx"],"names":[],"mappings":"AAyBA,OAAO,EAML,WAAW,EACZ,MAAM,eAAe,CAAC;AA4BvB,OAAO,EACL,eAAe,EACf,aAAa,EACb,OAAO,EACP,eAAe,EACf,aAAa,EACb,cAAc,EACd,qBAAqB,EACrB,aAAa,EACb,YAAY,EAGb,MAAM,eAA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KAAK,CAAC,EAAE;QAAE,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;IAC1C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;CACxB;AAMD,eAAO,MAAM,YAAY;;CAAe,CAAC;AA+1CzC,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,KAAK,EAAE,KAAK,GAAG,GAAG,CAAC,OAAO,CAYhE"}
@@ -0,0 +1,96 @@
1
+ import React from 'react';
2
+ import Elements from './elements';
3
+ import Form, { Props as FormProps } from './form/Form';
4
+ import { init, updateUserKey, setValues, validateStep, setAuthClient, getAuthClient } from './utils/init';
5
+ declare function getAllValues(): {
6
+ [x: string]: import("./utils/init").FeatheryFieldTypes;
7
+ };
8
+ /**
9
+ * Utility function which renders a form with the provided props in the DOM element with the provided ID.
10
+ * @param {string} elementId The ID of the DOM element to hold the form
11
+ * @param {Object} props The props defined on the *Form* component
12
+ */
13
+ declare function renderAt(elementId: any, props: FormProps): void;
14
+ declare const Feathery: {
15
+ Form: typeof Form;
16
+ Elements: {
17
+ AddressLine1: React.MemoExoticComponent<({ element, applyStyles, fieldLabel, elementProps, editable, onSelect, onBlur, setRef, value, inlineError, children, ...props }: {
18
+ [x: string]: any;
19
+ element: any;
20
+ applyStyles: any;
21
+ fieldLabel: any;
22
+ elementProps?: {} | undefined;
23
+ editable?: boolean | undefined;
24
+ onSelect?: (() => void) | undefined;
25
+ onBlur?: (() => void) | undefined;
26
+ setRef?: (() => void) | undefined;
27
+ value?: string | undefined;
28
+ inlineError: any;
29
+ children: any;
30
+ }) => import("@emotion/react/jsx-runtime").JSX.Element>;
31
+ ButtonGroupField: typeof import("./elements/fields/ButtonGroupField").default;
32
+ CheckboxField: typeof import("./elements/fields/CheckboxField").default;
33
+ CheckboxGroupField: typeof import("./elements/fields/CheckboxGroupField").default;
34
+ ColorPickerField: typeof import("./elements/fields/ColorPickerField").default;
35
+ DateSelectorField: React.MemoExoticComponent<({ element, applyStyles, fieldLabel, elementProps, required, editable, onChange, setRef, value, inlineError, children }: {
36
+ element: any;
37
+ applyStyles: any;
38
+ fieldLabel: any;
39
+ elementProps?: {} | undefined;
40
+ required?: boolean | undefined;
41
+ editable?: boolean | undefined;
42
+ onChange?: (() => void) | undefined;
43
+ setRef?: (() => void) | undefined;
44
+ value?: string | undefined;
45
+ inlineError: any;
46
+ children: any;
47
+ }) => import("@emotion/react/jsx-runtime").JSX.Element>;
48
+ DropdownField: typeof import("./elements/fields/DropdownField").default;
49
+ FileUploadField: typeof import("./elements/fields/FileUploadField").default;
50
+ PinInputField: typeof import("./elements/fields/PinInputField").default;
51
+ RadioButtonGroupField: typeof import("./elements/fields/RadioButtonGroupField").default;
52
+ SignatureField: typeof import("./elements/fields/SignatureField").default;
53
+ TextField: React.MemoExoticComponent<({ element, applyStyles, fieldLabel, elementProps, required, editable, onAccept, onBlur, setRef, rawValue, inlineError, children }: {
54
+ element: any;
55
+ applyStyles: any;
56
+ fieldLabel: any;
57
+ elementProps?: {} | undefined;
58
+ required?: boolean | undefined;
59
+ editable?: boolean | undefined;
60
+ onAccept?: (() => void) | undefined;
61
+ onBlur?: (() => void) | undefined;
62
+ setRef?: (() => void) | undefined;
63
+ rawValue?: string | undefined;
64
+ inlineError: any;
65
+ children: any;
66
+ }) => import("@emotion/react/jsx-runtime").JSX.Element>;
67
+ TextArea: React.MemoExoticComponent<({ element, applyStyles, fieldLabel, elementProps, required, editable, onChange, setRef, rawValue, inlineError, children }: {
68
+ element: any;
69
+ applyStyles: any;
70
+ fieldLabel: any;
71
+ elementProps?: {} | undefined;
72
+ required?: boolean | undefined;
73
+ editable?: boolean | undefined;
74
+ onChange?: (() => void) | undefined;
75
+ setRef?: (() => void) | undefined;
76
+ rawValue?: string | undefined;
77
+ inlineError: any;
78
+ children: any;
79
+ }) => import("@emotion/react/jsx-runtime").JSX.Element>;
80
+ ImageElement: typeof import("./elements/basic/ImageElement").default;
81
+ VideoElement: typeof import("./elements/basic/VideoElement").default;
82
+ TextElement: typeof import("./elements/basic/TextElement").default;
83
+ ButtonElement: typeof import("./elements/basic/ButtonElement").default;
84
+ ProgressBarElement: typeof import("./elements/basic/ProgressBarElement").default;
85
+ };
86
+ init: typeof init;
87
+ updateUserKey: typeof updateUserKey;
88
+ validateStep: typeof validateStep;
89
+ setValues: typeof setValues;
90
+ getAllValues: typeof getAllValues;
91
+ setAuthClient: typeof setAuthClient;
92
+ getAuthClient: typeof getAuthClient;
93
+ renderAt: typeof renderAt;
94
+ };
95
+ export { Form, Elements, init, updateUserKey, validateStep, setValues, getAllValues, setAuthClient, getAuthClient, renderAt, Feathery };
96
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,IAAI,EAAE,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,EACL,IAAI,EACJ,aAAa,EACb,SAAS,EACT,YAAY,EAEZ,aAAa,EACb,aAAa,EACd,MAAM,cAAc,CAAC;AAEtB,iBAAS,YAAY;;EAGpB;AAED;;;;GAIG;AACH,iBAAS,QAAQ,CAAC,SAAS,EAAE,GAAG,EAAE,KAAK,EAAE,SAAS,QAIjD;AAGD,QAAA,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAWb,CAAC;AAEF,OAAO,EACL,IAAI,EACJ,QAAQ,EACR,IAAI,EACJ,aAAa,EACb,YAAY,EACZ,SAAS,EACT,YAAY,EACZ,aAAa,EACb,aAAa,EACb,QAAQ,EACR,QAAQ,EACT,CAAC"}