@micromerce/formbuilder-react 1.0.955 → 1.0.959

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.
@@ -17,7 +17,7 @@ export interface IProps {
17
17
  onSubmit?: (urlEncodedFormValues: string, formValues: IFormState) => Promise<any>;
18
18
  onValidationFail?: () => void;
19
19
  postGenAiMessage?: ({ message, profile, }: PostMessageProps) => Promise<PostMessageResponse>;
20
- onChange?: (fieldId: string, value: string) => void;
20
+ onChange?: (fieldId: string, value: string | string[]) => void;
21
21
  }
22
22
  declare const FormBuilder: ({ config, controlProps, customControls, fileUploaderConfig, iconType, state, resolveUrl, onSubmit, onValidationFail, postGenAiMessage, onChange, }: IProps) => import("react/jsx-runtime").JSX.Element | undefined;
23
23
  interface FormProps {
@@ -1,3 +1,19 @@
1
1
  import { CustomAttributes, resolveUrl } from "../../../../types";
2
- declare const fetchMrn: (mrnRef: string, attributes?: CustomAttributes, params?: string | null, resolveUrl?: resolveUrl) => Promise<any>;
2
+ /**
3
+ * Loads the options of an MRN reference.
4
+ *
5
+ * A list page can come back SHORT with a next link although more matches exist: a `q=` search is
6
+ * a CONTAINS the entity service applies after reading, and once its read budget is spent it
7
+ * answers with what it has found so far. The match can sit on the page behind it (SUP-675). The
8
+ * next link is therefore followed until the `limit` of `params` is filled or there is no next
9
+ * page. Without a `limit` there is no page size to fill up to, and a single page is returned.
10
+ *
11
+ * `signal` stops the paging between two pages - each further page of a search costs a full read
12
+ * budget, so a superseded search must not keep reading.
13
+ */
14
+ declare const fetchMrn: (mrnRef: string, attributes?: CustomAttributes, params?: string | null, resolveUrl?: resolveUrl, signal?: AbortSignal) => Promise<{
15
+ key: any;
16
+ mrn: any;
17
+ mrnEntries: Record<string, unknown>;
18
+ }[]>;
3
19
  export default fetchMrn;
@@ -36,7 +36,7 @@ export interface ProviderProps {
36
36
  resolveUrl?: resolveUrl;
37
37
  validationTriggerRef?: React.MutableRefObject<(() => void) | null>;
38
38
  postGenAiMessage?: ({ message, profile, }: PostMessageProps) => Promise<PostMessageResponse>;
39
- onChange?: (fieldId: string, value: string) => void;
39
+ onChange?: (fieldId: string, value: string | string[]) => void;
40
40
  }
41
41
  export declare const getEnhancedControls: (controls: FormControls) => FormControls;
42
42
  export declare const FormDataProvider: FC<ProviderProps>;