@oneblink/apps-react 8.6.0-beta.2 → 8.6.0-beta.4
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/OneBlinkAutoSaveForm.js +2 -2
- package/dist/OneBlinkAutoSaveForm.js.map +1 -1
- package/dist/OneBlinkForm.js +2 -2
- package/dist/OneBlinkForm.js.map +1 -1
- package/dist/OneBlinkFormBase.d.ts +3 -3
- package/dist/OneBlinkFormBase.js +26 -7
- package/dist/OneBlinkFormBase.js.map +1 -1
- package/dist/OneBlinkReadOnlyForm.js +1 -1
- package/dist/OneBlinkReadOnlyForm.js.map +1 -1
- package/dist/components/renderer/OneBlinkFormElements.d.ts +3 -3
- package/dist/components/renderer/OneBlinkFormElements.js +2 -2
- package/dist/components/renderer/OneBlinkFormElements.js.map +1 -1
- package/dist/components/renderer/PageFormElements.d.ts +3 -3
- package/dist/components/renderer/PageFormElements.js +5 -5
- package/dist/components/renderer/PageFormElements.js.map +1 -1
- package/dist/form-elements/FormElementForm.js +2 -2
- package/dist/form-elements/FormElementForm.js.map +1 -1
- package/dist/form-elements/FormElementRepeatableSet.js +1 -1
- package/dist/form-elements/FormElementRepeatableSet.js.map +1 -1
- package/dist/form-elements/FormElementSection.d.ts +3 -2
- package/dist/form-elements/FormElementSection.js +14 -5
- package/dist/form-elements/FormElementSection.js.map +1 -1
- package/dist/hooks/useFormSubmissionAutoSaveState.d.ts +8 -4
- package/dist/hooks/useFormSubmissionAutoSaveState.js +16 -16
- package/dist/hooks/useFormSubmissionAutoSaveState.js.map +1 -1
- package/dist/hooks/useFormSubmissionState.d.ts +3 -3
- package/dist/hooks/useFormSubmissionState.js +1 -1
- package/dist/hooks/useFormSubmissionState.js.map +1 -1
- package/dist/hooks/useLookups.js +1 -1
- package/dist/hooks/useLookups.js.map +1 -1
- package/dist/types/form.d.ts +4 -2
- package/dist/types/form.js.map +1 -1
- package/package.json +1 -1
package/dist/types/form.d.ts
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
import { FormTypes, SubmissionTypes, IntegrationTypes } from '@oneblink/types';
|
2
|
+
import { NewS3SubmissionData } from '@oneblink/types/typescript/submissions';
|
2
3
|
export { FormElementConditionallyShownElement, FormElementConditionallyShown, FormElementsConditionallyShown, } from '@oneblink/sdk-core/dist/conditionalLogicService';
|
3
4
|
export type FormElementKey = string;
|
4
5
|
export type RepeatableSetEntryIndex = string;
|
@@ -23,12 +24,13 @@ export type NestedFormElementValueChangeHandler<T = unknown> = ValueChangeHandle
|
|
23
24
|
value?: T | ((existingValue?: T) => T | undefined);
|
24
25
|
executedLookups: ExecutedLookupValue | ((currentExecutedLookups: ExecutedLookupValue) => ExecutedLookupValue);
|
25
26
|
}>;
|
27
|
+
export type SectionState = NewS3SubmissionData['sectionState'];
|
26
28
|
export type FormElementLookupHandler = (setter: (data: {
|
27
29
|
submission: SubmissionTypes.S3SubmissionData['submission'];
|
28
30
|
elements: FormTypes.FormElement[];
|
29
31
|
lastElementUpdated: FormTypes.FormElement | undefined;
|
30
32
|
executedLookups: ExecutedLookups;
|
31
|
-
|
33
|
+
sectionState: SectionState | undefined;
|
32
34
|
}) => {
|
33
35
|
submission: SubmissionTypes.S3SubmissionData['submission'];
|
34
36
|
elements: FormTypes.FormElement[];
|
@@ -40,7 +42,7 @@ export type SetFormSubmission = React.Dispatch<React.SetStateAction<{
|
|
40
42
|
submission: SubmissionTypes.S3SubmissionData['submission'];
|
41
43
|
lastElementUpdated: FormTypes.FormElement | undefined;
|
42
44
|
executedLookups: ExecutedLookups;
|
43
|
-
|
45
|
+
sectionState: SectionState | undefined;
|
44
46
|
}>>;
|
45
47
|
export type IsDirtyProps = {
|
46
48
|
isDirty: boolean;
|
package/dist/types/form.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"form.js","sourceRoot":"","sources":["../../src/types/form.ts"],"names":[],"mappings":"","sourcesContent":["import { FormTypes, SubmissionTypes, IntegrationTypes } from '@oneblink/types'\n\nexport {\n FormElementConditionallyShownElement,\n FormElementConditionallyShown,\n FormElementsConditionallyShown,\n} from '@oneblink/sdk-core/dist/conditionalLogicService'\n\nexport type FormElementKey = string\nexport type RepeatableSetEntryIndex = string\n\nexport type FormElementsValidation = Record<\n FormElementKey,\n FormElementValidation\n>\n\nexport type FormElementValidation =\n | undefined\n | string\n | {\n type: 'formElements'\n formElements: FormElementsValidation | undefined\n }\n | {\n type: 'repeatableSet'\n set: string | undefined\n entries: Record<\n RepeatableSetEntryIndex,\n FormElementsValidation | undefined\n >\n }\n\nexport type ExecutedLookups =\n | {\n [elementName: string]:\n | boolean\n | ExecutedLookups\n | ExecutedLookups[]\n | undefined\n }\n | undefined\n\nexport type ExecutedLookupValue = NonNullable<ExecutedLookups>[string]\n\ntype ValueChangeHandler<U extends Record<string, unknown>> = (\n element: FormTypes.FormElement,\n opts: U,\n) => void\n\nexport type FormElementValueChangeHandler<T = unknown> = ValueChangeHandler<{\n value?: T | ((existingValue?: T) => T | undefined)\n}>\n\nexport type NestedFormElementValueChangeHandler<T = unknown> =\n ValueChangeHandler<{\n value?: T | ((existingValue?: T) => T | undefined)\n executedLookups:\n | ExecutedLookupValue\n | ((currentExecutedLookups: ExecutedLookupValue) => ExecutedLookupValue)\n }>\n\nexport type FormElementLookupHandler = (\n setter: (data: {\n submission: SubmissionTypes.S3SubmissionData['submission']\n elements: FormTypes.FormElement[]\n lastElementUpdated: FormTypes.FormElement | undefined\n executedLookups: ExecutedLookups\n
|
1
|
+
{"version":3,"file":"form.js","sourceRoot":"","sources":["../../src/types/form.ts"],"names":[],"mappings":"","sourcesContent":["import { FormTypes, SubmissionTypes, IntegrationTypes } from '@oneblink/types'\nimport { NewS3SubmissionData } from '@oneblink/types/typescript/submissions'\n\nexport {\n FormElementConditionallyShownElement,\n FormElementConditionallyShown,\n FormElementsConditionallyShown,\n} from '@oneblink/sdk-core/dist/conditionalLogicService'\n\nexport type FormElementKey = string\nexport type RepeatableSetEntryIndex = string\n\nexport type FormElementsValidation = Record<\n FormElementKey,\n FormElementValidation\n>\n\nexport type FormElementValidation =\n | undefined\n | string\n | {\n type: 'formElements'\n formElements: FormElementsValidation | undefined\n }\n | {\n type: 'repeatableSet'\n set: string | undefined\n entries: Record<\n RepeatableSetEntryIndex,\n FormElementsValidation | undefined\n >\n }\n\nexport type ExecutedLookups =\n | {\n [elementName: string]:\n | boolean\n | ExecutedLookups\n | ExecutedLookups[]\n | undefined\n }\n | undefined\n\nexport type ExecutedLookupValue = NonNullable<ExecutedLookups>[string]\n\ntype ValueChangeHandler<U extends Record<string, unknown>> = (\n element: FormTypes.FormElement,\n opts: U,\n) => void\n\nexport type FormElementValueChangeHandler<T = unknown> = ValueChangeHandler<{\n value?: T | ((existingValue?: T) => T | undefined)\n}>\n\nexport type NestedFormElementValueChangeHandler<T = unknown> =\n ValueChangeHandler<{\n value?: T | ((existingValue?: T) => T | undefined)\n executedLookups:\n | ExecutedLookupValue\n | ((currentExecutedLookups: ExecutedLookupValue) => ExecutedLookupValue)\n }>\n\nexport type SectionState = NewS3SubmissionData['sectionState']\n\nexport type FormElementLookupHandler = (\n setter: (data: {\n submission: SubmissionTypes.S3SubmissionData['submission']\n elements: FormTypes.FormElement[]\n lastElementUpdated: FormTypes.FormElement | undefined\n executedLookups: ExecutedLookups\n sectionState: SectionState | undefined\n }) => {\n submission: SubmissionTypes.S3SubmissionData['submission']\n elements: FormTypes.FormElement[]\n executedLookups: ExecutedLookups\n },\n) => void\n\nexport type UpdateFormElementsHandler = (\n setter: (element: FormTypes.FormElement[]) => FormTypes.FormElement[],\n) => void\n\nexport type SetFormSubmission = React.Dispatch<\n React.SetStateAction<{\n definition: FormTypes.Form\n submission: SubmissionTypes.S3SubmissionData['submission']\n lastElementUpdated: FormTypes.FormElement | undefined\n executedLookups: ExecutedLookups\n sectionState: SectionState | undefined\n }>\n>\n\nexport type IsDirtyProps = {\n isDirty: boolean\n setIsDirty: () => void\n}\n\nexport type CaptchaType = NonNullable<\n IntegrationTypes.IntegrationRecaptcha['configuration']['domains'][number]['type']\n>\n"]}
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@oneblink/apps-react",
|
3
3
|
"description": "Helper functions for OneBlink apps in ReactJS.",
|
4
|
-
"version": "8.6.0-beta.
|
4
|
+
"version": "8.6.0-beta.4",
|
5
5
|
"author": "OneBlink <developers@oneblink.io> (https://oneblink.io)",
|
6
6
|
"bugs": {
|
7
7
|
"url": "https://github.com/oneblink/apps-react/issues"
|