@wix/form-public 0.25.0 → 0.27.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_tsup-dts-rollup.d.cts +34 -6
- package/dist/_tsup-dts-rollup.d.ts +34 -6
- package/dist/index.cjs +349 -204
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +0 -4
- package/dist/index.css.map +1 -1
- package/dist/index.js +250 -105
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
|
@@ -814,7 +814,7 @@ declare interface FixedPaymentProps {
|
|
|
814
814
|
export { FixedPaymentProps }
|
|
815
815
|
export { FixedPaymentProps as FixedPaymentProps_alias_1 }
|
|
816
816
|
|
|
817
|
-
declare const Form: ({ form: unformattedForm, fields, values, onChange, errors, onValidate, }: FormProps) => JSX_2.Element;
|
|
817
|
+
declare const Form: ({ form: unformattedForm, fields, values, onChange, errors, onValidate, submitForm, }: FormProps) => JSX_2.Element;
|
|
818
818
|
export { Form }
|
|
819
819
|
export { Form as Form_alias_1 }
|
|
820
820
|
|
|
@@ -865,6 +865,7 @@ declare type FormProps = {
|
|
|
865
865
|
errors: FormError[];
|
|
866
866
|
onValidate: (errors: FormError[]) => void;
|
|
867
867
|
fields: FormFields;
|
|
868
|
+
submitForm: () => void;
|
|
868
869
|
};
|
|
869
870
|
export { FormProps }
|
|
870
871
|
export { FormProps as FormProps_alias_1 }
|
|
@@ -1536,25 +1537,52 @@ export declare const SubmitButtonMapper: PropsMapper;
|
|
|
1536
1537
|
|
|
1537
1538
|
/**
|
|
1538
1539
|
* Props for submit button field.
|
|
1539
|
-
* The field is used to render
|
|
1540
|
+
* The field is used to render navigation and submit buttons for the form.
|
|
1540
1541
|
* Used with fieldMap key: SUBMIT_BUTTON
|
|
1541
1542
|
*
|
|
1542
1543
|
* @interface SubmitButtonProps
|
|
1543
1544
|
*
|
|
1544
|
-
* @property {string} id - The unique identifier for the submit button
|
|
1545
|
-
* @property {string}
|
|
1545
|
+
* @property {string} id - The unique identifier for the submit button field
|
|
1546
|
+
* @property {string} submitText - The text to display on the submit button
|
|
1547
|
+
* @property {string} previousText - The text to display on the previous button
|
|
1548
|
+
* @property {string} nextText - The text to display on the next button
|
|
1549
|
+
* @property {boolean} showPreviousButton - Whether to show the previous button
|
|
1550
|
+
* @property {boolean} showNextButton - Whether to show the next button
|
|
1551
|
+
* @property {boolean} showSubmitButton - Whether to show the submit button
|
|
1552
|
+
* @property {function} onSubmitClick - The function to call when the submit button is clicked
|
|
1553
|
+
* @property {boolean} isSubmitInProgress - Whether the form submission is currently in progress
|
|
1554
|
+
* @property {function} onPreviousClick - The function to call when the previous button is clicked
|
|
1555
|
+
* @property {function} onNextClick - The function to call when the next button is clicked
|
|
1546
1556
|
*
|
|
1547
1557
|
* @example
|
|
1548
1558
|
* ```tsx
|
|
1549
1559
|
* const submitButton: SubmitButtonProps = {
|
|
1550
1560
|
* id: 'submit',
|
|
1551
|
-
*
|
|
1561
|
+
* submitText: 'Submit Form',
|
|
1562
|
+
* previousText: 'Previous',
|
|
1563
|
+
* nextText: 'Next',
|
|
1564
|
+
* showPreviousButton: true,
|
|
1565
|
+
* showNextButton: false,
|
|
1566
|
+
* showSubmitButton: true,
|
|
1567
|
+
* onSubmitClick: handleSubmit,
|
|
1568
|
+
* isSubmitInProgress: false,
|
|
1569
|
+
* onPreviousClick: handlePrevious,
|
|
1570
|
+
* onNextClick: handleNext,
|
|
1552
1571
|
* };
|
|
1553
1572
|
* ```
|
|
1554
1573
|
*/
|
|
1555
1574
|
declare interface SubmitButtonProps {
|
|
1556
1575
|
id: string;
|
|
1557
|
-
|
|
1576
|
+
submitText: string;
|
|
1577
|
+
previousText: string;
|
|
1578
|
+
nextText: string;
|
|
1579
|
+
showPreviousButton: boolean;
|
|
1580
|
+
showNextButton: boolean;
|
|
1581
|
+
showSubmitButton: boolean;
|
|
1582
|
+
onSubmitClick: () => void;
|
|
1583
|
+
isSubmitInProgress: boolean;
|
|
1584
|
+
onPreviousClick: () => void;
|
|
1585
|
+
onNextClick: () => void;
|
|
1558
1586
|
}
|
|
1559
1587
|
export { SubmitButtonProps }
|
|
1560
1588
|
export { SubmitButtonProps as SubmitButtonProps_alias_1 }
|
|
@@ -814,7 +814,7 @@ declare interface FixedPaymentProps {
|
|
|
814
814
|
export { FixedPaymentProps }
|
|
815
815
|
export { FixedPaymentProps as FixedPaymentProps_alias_1 }
|
|
816
816
|
|
|
817
|
-
declare const Form: ({ form: unformattedForm, fields, values, onChange, errors, onValidate, }: FormProps) => JSX_2.Element;
|
|
817
|
+
declare const Form: ({ form: unformattedForm, fields, values, onChange, errors, onValidate, submitForm, }: FormProps) => JSX_2.Element;
|
|
818
818
|
export { Form }
|
|
819
819
|
export { Form as Form_alias_1 }
|
|
820
820
|
|
|
@@ -865,6 +865,7 @@ declare type FormProps = {
|
|
|
865
865
|
errors: FormError[];
|
|
866
866
|
onValidate: (errors: FormError[]) => void;
|
|
867
867
|
fields: FormFields;
|
|
868
|
+
submitForm: () => void;
|
|
868
869
|
};
|
|
869
870
|
export { FormProps }
|
|
870
871
|
export { FormProps as FormProps_alias_1 }
|
|
@@ -1536,25 +1537,52 @@ export declare const SubmitButtonMapper: PropsMapper;
|
|
|
1536
1537
|
|
|
1537
1538
|
/**
|
|
1538
1539
|
* Props for submit button field.
|
|
1539
|
-
* The field is used to render
|
|
1540
|
+
* The field is used to render navigation and submit buttons for the form.
|
|
1540
1541
|
* Used with fieldMap key: SUBMIT_BUTTON
|
|
1541
1542
|
*
|
|
1542
1543
|
* @interface SubmitButtonProps
|
|
1543
1544
|
*
|
|
1544
|
-
* @property {string} id - The unique identifier for the submit button
|
|
1545
|
-
* @property {string}
|
|
1545
|
+
* @property {string} id - The unique identifier for the submit button field
|
|
1546
|
+
* @property {string} submitText - The text to display on the submit button
|
|
1547
|
+
* @property {string} previousText - The text to display on the previous button
|
|
1548
|
+
* @property {string} nextText - The text to display on the next button
|
|
1549
|
+
* @property {boolean} showPreviousButton - Whether to show the previous button
|
|
1550
|
+
* @property {boolean} showNextButton - Whether to show the next button
|
|
1551
|
+
* @property {boolean} showSubmitButton - Whether to show the submit button
|
|
1552
|
+
* @property {function} onSubmitClick - The function to call when the submit button is clicked
|
|
1553
|
+
* @property {boolean} isSubmitInProgress - Whether the form submission is currently in progress
|
|
1554
|
+
* @property {function} onPreviousClick - The function to call when the previous button is clicked
|
|
1555
|
+
* @property {function} onNextClick - The function to call when the next button is clicked
|
|
1546
1556
|
*
|
|
1547
1557
|
* @example
|
|
1548
1558
|
* ```tsx
|
|
1549
1559
|
* const submitButton: SubmitButtonProps = {
|
|
1550
1560
|
* id: 'submit',
|
|
1551
|
-
*
|
|
1561
|
+
* submitText: 'Submit Form',
|
|
1562
|
+
* previousText: 'Previous',
|
|
1563
|
+
* nextText: 'Next',
|
|
1564
|
+
* showPreviousButton: true,
|
|
1565
|
+
* showNextButton: false,
|
|
1566
|
+
* showSubmitButton: true,
|
|
1567
|
+
* onSubmitClick: handleSubmit,
|
|
1568
|
+
* isSubmitInProgress: false,
|
|
1569
|
+
* onPreviousClick: handlePrevious,
|
|
1570
|
+
* onNextClick: handleNext,
|
|
1552
1571
|
* };
|
|
1553
1572
|
* ```
|
|
1554
1573
|
*/
|
|
1555
1574
|
declare interface SubmitButtonProps {
|
|
1556
1575
|
id: string;
|
|
1557
|
-
|
|
1576
|
+
submitText: string;
|
|
1577
|
+
previousText: string;
|
|
1578
|
+
nextText: string;
|
|
1579
|
+
showPreviousButton: boolean;
|
|
1580
|
+
showNextButton: boolean;
|
|
1581
|
+
showSubmitButton: boolean;
|
|
1582
|
+
onSubmitClick: () => void;
|
|
1583
|
+
isSubmitInProgress: boolean;
|
|
1584
|
+
onPreviousClick: () => void;
|
|
1585
|
+
onNextClick: () => void;
|
|
1558
1586
|
}
|
|
1559
1587
|
export { SubmitButtonProps }
|
|
1560
1588
|
export { SubmitButtonProps as SubmitButtonProps_alias_1 }
|