@oneblink/apps-react 2.8.0-beta.3 → 2.8.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.
Files changed (88) hide show
  1. package/dist/OneBlinkAutoSaveForm.d.ts +1 -1
  2. package/dist/OneBlinkForm.d.ts +1 -1
  3. package/dist/OneBlinkFormBase.d.ts +3 -3
  4. package/dist/OneBlinkReadOnlyForm.d.ts +1 -1
  5. package/dist/components/CopyToClipboardIconButton.d.ts +1 -1
  6. package/dist/components/Lists.d.ts +2 -2
  7. package/dist/components/LoadingWithMessage.d.ts +1 -1
  8. package/dist/components/formStore/OneBlinkFormStoreProvider.d.ts +1 -1
  9. package/dist/components/formStore/table/ColumnFilters.d.ts +1 -1
  10. package/dist/components/formStore/table/FormElementTableCell.d.ts +1 -1
  11. package/dist/components/formStore/table/RepeatableSetCell.d.ts +1 -1
  12. package/dist/components/formStore/table/RepeatableSetCellAccordion.d.ts +1 -1
  13. package/dist/components/formStore/useFormStoreTableContext.d.ts +1 -1
  14. package/dist/components/messages/ErrorMessage.d.ts +1 -1
  15. package/dist/components/messages/LargeIconMessage.d.ts +2 -2
  16. package/dist/components/messages/NoResourcesYet.d.ts +1 -1
  17. package/dist/components/pickers/V4CompatibleDatePicker.d.ts +4 -4
  18. package/dist/components/pickers/V4CompatibleDateTimePicker.d.ts +4 -4
  19. package/dist/components/pickers/V4CompatibleTimePicker.d.ts +4 -4
  20. package/dist/components/receipts/Receipt.d.ts +1 -1
  21. package/dist/components/receipts/ReceiptButton.d.ts +1 -1
  22. package/dist/components/receipts/ReceiptList.d.ts +1 -1
  23. package/dist/components/receipts/ReceiptListItem.d.ts +1 -1
  24. package/dist/components/renderer/AutocompleteDropdown.d.ts +2 -2
  25. package/dist/components/renderer/CopyToClipboardButton.d.ts +1 -1
  26. package/dist/components/renderer/CustomisableButtonInner.d.ts +1 -1
  27. package/dist/components/renderer/FormElementOptions.d.ts +1 -1
  28. package/dist/components/renderer/LookupButton.d.ts +1 -1
  29. package/dist/components/renderer/LookupNotification.d.ts +1 -1
  30. package/dist/components/renderer/Modal.d.ts +1 -1
  31. package/dist/components/renderer/OnLoading.d.ts +1 -1
  32. package/dist/components/renderer/OneBlinkAppsErrorOriginalMessage.d.ts +1 -1
  33. package/dist/components/renderer/OneBlinkFormElements.d.ts +1 -1
  34. package/dist/components/renderer/PageFormElements.d.ts +1 -1
  35. package/dist/components/renderer/attachments/FileCard.d.ts +1 -1
  36. package/dist/form-elements/FormElementABN.d.ts +1 -1
  37. package/dist/form-elements/FormElementABN.js +3 -1
  38. package/dist/form-elements/FormElementABN.js.map +1 -1
  39. package/dist/form-elements/FormElementAutocomplete.d.ts +3 -3
  40. package/dist/form-elements/FormElementBSB.d.ts +1 -1
  41. package/dist/form-elements/FormElementBSB.js +3 -1
  42. package/dist/form-elements/FormElementBSB.js.map +1 -1
  43. package/dist/form-elements/FormElementBarcodeScanner.d.ts +1 -1
  44. package/dist/form-elements/FormElementBoolean.d.ts +1 -1
  45. package/dist/form-elements/FormElementCalculation.d.ts +1 -1
  46. package/dist/form-elements/FormElementCamera.d.ts +1 -1
  47. package/dist/form-elements/FormElementCaptcha.d.ts +1 -1
  48. package/dist/form-elements/FormElementCheckBoxes.d.ts +1 -1
  49. package/dist/form-elements/FormElementCivicaStreetName.d.ts +1 -1
  50. package/dist/form-elements/FormElementDate.d.ts +1 -1
  51. package/dist/form-elements/FormElementDateTime.d.ts +1 -1
  52. package/dist/form-elements/FormElementEmail.d.ts +1 -1
  53. package/dist/form-elements/FormElementFile.d.ts +1 -1
  54. package/dist/form-elements/FormElementForm.d.ts +1 -1
  55. package/dist/form-elements/FormElementGeoscapeAddress.d.ts +1 -1
  56. package/dist/form-elements/FormElementHTML.d.ts +1 -1
  57. package/dist/form-elements/FormElementHeading.d.ts +1 -1
  58. package/dist/form-elements/FormElementImage.d.ts +1 -1
  59. package/dist/form-elements/FormElementLocation.d.ts +2 -2
  60. package/dist/form-elements/FormElementNumber.d.ts +1 -1
  61. package/dist/form-elements/FormElementPointAddress.d.ts +1 -1
  62. package/dist/form-elements/FormElementRadio.d.ts +1 -1
  63. package/dist/form-elements/FormElementRepeatableSet.d.ts +1 -1
  64. package/dist/form-elements/FormElementSelect.d.ts +1 -1
  65. package/dist/form-elements/FormElementSignature.d.ts +1 -1
  66. package/dist/form-elements/FormElementSummary.d.ts +1 -1
  67. package/dist/form-elements/FormElementTelephone.d.ts +1 -1
  68. package/dist/form-elements/FormElementText.d.ts +1 -1
  69. package/dist/form-elements/FormElementTextarea.d.ts +1 -1
  70. package/dist/form-elements/FormElementTime.d.ts +1 -1
  71. package/dist/form-elements/OptionButton.d.ts +1 -1
  72. package/dist/hooks/attachments/useAttachment.d.ts +1 -1
  73. package/dist/hooks/attachments/useAttachmentBlobs.d.ts +4 -4
  74. package/dist/hooks/useAuth.d.ts +1 -1
  75. package/dist/hooks/useBooleanState.d.ts +3 -3
  76. package/dist/hooks/useExecutedLookupCallback.d.ts +2 -2
  77. package/dist/hooks/useFlatpickrGuid.d.ts +1 -1
  78. package/dist/hooks/useFormSubmissionModelContext.d.ts +1 -1
  79. package/dist/hooks/useInfiniteScrollDataLoad.d.ts +3 -3
  80. package/dist/hooks/useInjectPages.d.ts +1 -1
  81. package/dist/hooks/useIsPageVisible.d.ts +2 -2
  82. package/dist/hooks/useLoadDataState.d.ts +1 -1
  83. package/dist/hooks/useLookupNotification.d.ts +1 -1
  84. package/dist/services/form-validation.d.ts +1 -1
  85. package/dist/styles.css +437 -437
  86. package/dist/types/attachments.d.ts +1 -1
  87. package/dist/types/form.d.ts +11 -11
  88. package/package.json +2 -2
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { FormTypes } from '@oneblink/types';
3
3
  import { FormElementValueChangeHandler, FormElementConditionallyShownElement } from '../types/form';
4
- type Props = {
4
+ declare type Props = {
5
5
  id: string;
6
6
  element: FormTypes.CheckboxElement;
7
7
  value: unknown;
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { FormTypes, CivicaTypes } from '@oneblink/types';
3
3
  import { FormElementValueChangeHandler } from '../types/form';
4
- type Props = {
4
+ declare type Props = {
5
5
  formId: number;
6
6
  id: string;
7
7
  element: FormTypes.CivicaStreetNameElement;
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { FormTypes } from '@oneblink/types';
3
3
  import { FormElementValueChangeHandler } from '../types/form';
4
- type Props = {
4
+ declare type Props = {
5
5
  id: string;
6
6
  element: FormTypes.DateElement;
7
7
  value: unknown | undefined;
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { FormTypes } from '@oneblink/types';
3
3
  import { FormElementValueChangeHandler } from '../types/form';
4
- type Props = {
4
+ declare type Props = {
5
5
  id: string;
6
6
  element: FormTypes.DateTimeElement;
7
7
  value: unknown | undefined;
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { FormTypes } from '@oneblink/types';
3
3
  import { FormElementValueChangeHandler } from '../types/form';
4
- type Props = {
4
+ declare type Props = {
5
5
  id: string;
6
6
  element: FormTypes.EmailElement;
7
7
  value: unknown;
@@ -2,7 +2,7 @@ import * as React from 'react';
2
2
  import { FormTypes } from '@oneblink/types';
3
3
  import { OnChange } from '../hooks/attachments/useAttachment';
4
4
  import { attachmentsService } from '@oneblink/apps';
5
- type Props = {
5
+ declare type Props = {
6
6
  element: FormTypes.FilesElement;
7
7
  onRemove: (id: string) => void;
8
8
  file: attachmentsService.Attachment;
@@ -1,7 +1,7 @@
1
1
  import { FormTypes } from '@oneblink/types';
2
2
  import * as React from 'react';
3
3
  import { FormElementConditionallyShown, FormElementLookupHandler, FormElementValidation, FormElementValueChangeHandler, FormSubmissionModel } from '../types/form';
4
- export type Props = {
4
+ export declare type Props = {
5
5
  formId: number;
6
6
  id: string;
7
7
  element: FormTypes.FormFormElement;
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { FormTypes, GeoscapeTypes } from '@oneblink/types';
3
3
  import { FormElementValueChangeHandler } from '../types/form';
4
- type Props = {
4
+ declare type Props = {
5
5
  formId: number;
6
6
  id: string;
7
7
  element: FormTypes.GeoscapeAddressElement;
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { FormTypes } from '@oneblink/types';
3
- type Props = {
3
+ declare type Props = {
4
4
  element: FormTypes.HtmlElement;
5
5
  };
6
6
  declare function FormElementHTML({ element }: Props): JSX.Element;
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { FormTypes } from '@oneblink/types';
3
- type Props = {
3
+ declare type Props = {
4
4
  element: FormTypes.HeadingElement;
5
5
  };
6
6
  declare function FormElementHeading({ element }: Props): JSX.Element;
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { FormTypes } from '@oneblink/types';
3
- type Props = {
3
+ declare type Props = {
4
4
  element: FormTypes.ImageElement;
5
5
  };
6
6
  declare function FormElementImage({ element }: Props): JSX.Element;
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { FormTypes } from '@oneblink/types';
3
3
  import { FormElementValueChangeHandler } from '../types/form';
4
- type Props = {
4
+ declare type Props = {
5
5
  id: string;
6
6
  element: FormTypes.LocationElement;
7
7
  value: unknown | undefined;
@@ -9,7 +9,7 @@ type Props = {
9
9
  displayValidationMessage: boolean;
10
10
  validationMessage: string | undefined;
11
11
  };
12
- type Coords = {
12
+ declare type Coords = {
13
13
  latitude: number;
14
14
  longitude: number;
15
15
  zoom?: number;
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { FormTypes } from '@oneblink/types';
3
3
  import { FormElementValueChangeHandler } from '../types/form';
4
- type Props = {
4
+ declare type Props = {
5
5
  id: string;
6
6
  element: FormTypes.NumberElement;
7
7
  value: unknown;
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { FormTypes, PointTypes } from '@oneblink/types';
3
3
  import { FormElementValueChangeHandler } from '../types/form';
4
- type Props = {
4
+ declare type Props = {
5
5
  formId: number;
6
6
  id: string;
7
7
  element: FormTypes.PointAddressElement;
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { FormTypes } from '@oneblink/types';
3
3
  import { FormElementValueChangeHandler, FormElementConditionallyShownElement } from '../types/form';
4
- type Props = {
4
+ declare type Props = {
5
5
  id: string;
6
6
  element: FormTypes.RadioButtonElement;
7
7
  value: unknown;
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { FormTypes } from '@oneblink/types';
3
3
  import { FormElementConditionallyShown, FormElementLookupHandler, FormElementValidation, FormElementValueChangeHandler, FormSubmissionModel } from '../types/form';
4
- type Props = {
4
+ declare type Props = {
5
5
  formId: number;
6
6
  id: string;
7
7
  isEven: boolean;
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { FormTypes } from '@oneblink/types';
3
3
  import { FormElementValueChangeHandler, FormElementConditionallyShownElement } from '../types/form';
4
- type Props = {
4
+ declare type Props = {
5
5
  id: string;
6
6
  element: FormTypes.SelectElement;
7
7
  value: unknown | undefined;
@@ -2,7 +2,7 @@ import * as React from 'react';
2
2
  import { FormTypes } from '@oneblink/types';
3
3
  import { FormElementBinaryStorageValue } from '../types/attachments';
4
4
  import { FormElementValueChangeHandler } from '../types/form';
5
- type Props = {
5
+ declare type Props = {
6
6
  id: string;
7
7
  element: FormTypes.DrawElement;
8
8
  value: FormElementBinaryStorageValue;
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { FormTypes } from '@oneblink/types';
3
3
  import { FormElementValueChangeHandler } from '../types/form';
4
- type Props = {
4
+ declare type Props = {
5
5
  element: FormTypes.SummaryElement;
6
6
  onChange: FormElementValueChangeHandler;
7
7
  value: unknown;
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { FormTypes } from '@oneblink/types';
3
3
  import { FormElementValueChangeHandler } from '../types/form';
4
- type Props = {
4
+ declare type Props = {
5
5
  id: string;
6
6
  element: FormTypes.TelephoneElement;
7
7
  value: unknown;
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { FormTypes } from '@oneblink/types';
3
3
  import { FormElementValueChangeHandler } from '../types/form';
4
- type Props = {
4
+ declare type Props = {
5
5
  id: string;
6
6
  element: FormTypes.TextElement;
7
7
  value: unknown;
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { FormTypes } from '@oneblink/types';
3
3
  import { FormElementValueChangeHandler } from '../types/form';
4
- type Props = {
4
+ declare type Props = {
5
5
  id: string;
6
6
  element: FormTypes.TextareaElement;
7
7
  value: unknown;
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { FormTypes } from '@oneblink/types';
3
3
  import { FormElementValueChangeHandler } from '../types/form';
4
- type Props = {
4
+ declare type Props = {
5
5
  id: string;
6
6
  element: FormTypes.TimeElement;
7
7
  value: unknown | undefined;
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { FormTypes } from '@oneblink/types';
3
- type Props = {
3
+ declare type Props = {
4
4
  element: FormTypes.RadioButtonElement | FormTypes.CheckboxElement | FormTypes.ComplianceElement;
5
5
  option: FormTypes.ChoiceElementOption;
6
6
  isSelected: boolean;
@@ -1,7 +1,7 @@
1
1
  import { attachmentsService } from '@oneblink/apps';
2
2
  import { FormTypes } from '@oneblink/types';
3
3
  import { FormElementBinaryStorageValue } from '../../types/attachments';
4
- export type OnChange = (id: string, attachment: attachmentsService.Attachment) => void;
4
+ export declare type OnChange = (id: string, attachment: attachmentsService.Attachment) => void;
5
5
  export default function useAttachment(value: FormElementBinaryStorageValue, element: FormTypes.FormElementBinaryStorage, onChange: OnChange, disableUpload?: boolean): {
6
6
  canDownload: boolean;
7
7
  progress: number | undefined;
@@ -1,17 +1,17 @@
1
1
  import * as React from 'react';
2
- type AttachmentObjectBlob = {
2
+ declare type AttachmentObjectBlob = {
3
3
  attachmentId: string;
4
4
  blob: Blob;
5
5
  };
6
- type RegisterAttachmentParam = {
6
+ declare type RegisterAttachmentParam = {
7
7
  blob: Blob;
8
8
  attachmentId: string;
9
9
  };
10
- type AttachmentBlobsContextValue = {
10
+ declare type AttachmentBlobsContextValue = {
11
11
  storeAttachmentBlobLocally: (options: RegisterAttachmentParam) => void;
12
12
  getAttachmentBlobLocally: (attachmentId: string) => AttachmentObjectBlob | undefined;
13
13
  };
14
- type Props = {
14
+ declare type Props = {
15
15
  children: React.ReactNode;
16
16
  };
17
17
  export declare const AttachmentBlobsProvider: ({ children }: Props) => JSX.Element;
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { authService } from '@oneblink/apps';
3
- type AuthContextValue = {
3
+ declare type AuthContextValue = {
4
4
  isLoggedIn: ReturnType<typeof authService.isLoggedIn>;
5
5
  userProfile: ReturnType<typeof authService.getUserProfile>;
6
6
  userFriendlyName: ReturnType<typeof authService.getUserFriendlyName>;
@@ -1,5 +1,5 @@
1
- type setTrue = () => void;
2
- type setFalse = () => void;
3
- type toggle = () => void;
1
+ declare type setTrue = () => void;
2
+ declare type setFalse = () => void;
3
+ declare type toggle = () => void;
4
4
  export default function useBooleanState(defaultValue: boolean): [boolean, setTrue, setFalse, toggle];
5
5
  export {};
@@ -1,10 +1,10 @@
1
1
  import { FormTypes } from '@oneblink/types';
2
2
  import * as React from 'react';
3
- type ExecutedLookupContextValue = {
3
+ declare type ExecutedLookupContextValue = {
4
4
  executedLookup: (lookupFormElement: FormTypes.LookupFormElement) => void;
5
5
  executeLookupFailed: (lookupFormElement: FormTypes.LookupFormElement) => void;
6
6
  };
7
- type Props = ExecutedLookupContextValue & {
7
+ declare type Props = ExecutedLookupContextValue & {
8
8
  children: React.ReactNode;
9
9
  };
10
10
  export declare const ExecutedLookupProvider: React.NamedExoticComponent<Props>;
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- type Props = {
2
+ declare type Props = {
3
3
  children: React.ReactNode;
4
4
  };
5
5
  export declare const FlatpickrGuidProvider: ({ children }: Props) => JSX.Element;
@@ -2,7 +2,7 @@ import { FormTypes } from '@oneblink/types';
2
2
  import { FormElement } from '@oneblink/types/typescript/forms';
3
3
  import * as React from 'react';
4
4
  import { FormElementsConditionallyShown, FormSubmissionModel } from '../types/form';
5
- export type FormSubmissionModelContextValue = {
5
+ export declare type FormSubmissionModelContextValue = {
6
6
  formSubmissionModel: FormSubmissionModel;
7
7
  parent?: FormSubmissionModelContextValue;
8
8
  elements: FormElement[];
@@ -1,7 +1,7 @@
1
1
  import useQuery from './useQuery';
2
- export type ChangeHandler<T> = (filters: T) => T;
3
- export type OnChangeFilters<T> = (changeHandler: ChangeHandler<T>, shouldDebounce: boolean) => void;
4
- export type LoadingType = 'INITIAL' | 'MORE' | null;
2
+ export declare type ChangeHandler<T> = (filters: T) => T;
3
+ export declare type OnChangeFilters<T> = (changeHandler: ChangeHandler<T>, shouldDebounce: boolean) => void;
4
+ export declare type LoadingType = 'INITIAL' | 'MORE' | null;
5
5
  export default function useInfiniteScrollDataLoad<Filters, T>({ limit, isManual, debounceSearchMs, onDefaultFilters, onSearch, onValidateFilters, }: {
6
6
  limit: number;
7
7
  isManual?: boolean;
@@ -1,7 +1,7 @@
1
1
  import { FormTypes } from '@oneblink/types';
2
2
  import * as React from 'react';
3
3
  import { FormSubmissionModel } from '../types/form';
4
- type InjectPagesContextValue = (lookupFormElement: FormTypes.LookupFormElement, pageElements: FormTypes.PageElement[], data?: FormSubmissionModel) => void;
4
+ declare type InjectPagesContextValue = (lookupFormElement: FormTypes.LookupFormElement, pageElements: FormTypes.PageElement[], data?: FormSubmissionModel) => void;
5
5
  export declare const InjectPagesContext: React.Context<InjectPagesContextValue>;
6
6
  export default function useInjectPages(): InjectPagesContextValue;
7
7
  export {};
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
- type IsPageVisibleContextValue = boolean;
3
- type Props = {
2
+ declare type IsPageVisibleContextValue = boolean;
3
+ declare type Props = {
4
4
  isPageVisible: IsPageVisibleContextValue;
5
5
  children: React.ReactNode;
6
6
  };
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- export type LoadDataState<T> = {
2
+ export declare type LoadDataState<T> = {
3
3
  status: 'SUCCESS';
4
4
  result: T;
5
5
  } | {
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- type LookupNotificationContextValue = {
2
+ declare type LookupNotificationContextValue = {
3
3
  isLookup: boolean;
4
4
  isDisabled: boolean;
5
5
  onLookup: (value: unknown) => Promise<void>;
@@ -1,7 +1,7 @@
1
1
  import { FormTypes } from '@oneblink/types';
2
2
  import { FormElementsConditionallyShown, FormElementsValidation, FormSubmissionModel } from '../types/form';
3
3
  export declare const lookupValidationMessage = "Lookup is required";
4
- type ValidateJSSchema = Record<string, unknown>;
4
+ declare type ValidateJSSchema = Record<string, unknown>;
5
5
  export declare function validateSubmission(schema: ValidateJSSchema, submission: FormSubmissionModel, formElementsConditionallyShown: FormElementsConditionallyShown): FormElementsValidation | undefined;
6
6
  export declare function generateValidationSchema(elements: FormTypes.FormElement[], elementIdsWithLookupsExecuted: string[]): ValidateJSSchema;
7
7
  export declare function checkFileNameIsValid(formElement: FormTypes.FilesElement, fileName: string): boolean;