@micromerce/formbuilder-react 1.0.654 → 1.0.658
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/assets/icons/error/Error.d.ts +2 -0
- package/dist/components/Checkbox/Checkbox.d.ts +10 -0
- package/dist/components/Checkbox/index.d.ts +1 -0
- package/dist/components/ControlWrapper/ControlWrapper.d.ts +11 -0
- package/dist/components/ControlWrapper/index.d.ts +1 -0
- package/dist/components/DateRangeGroup/DateRangeGroup.d.ts +10 -0
- package/dist/components/DateRangeGroup/DateRangeGroup.styles.d.ts +3 -0
- package/dist/components/DateRangeGroup/components/CalendarModal.d.ts +14 -0
- package/dist/components/DateRangeGroup/index.d.ts +1 -0
- package/dist/components/ErrorBoundary/ErrorBoundary.d.ts +14 -0
- package/dist/components/FileUploader/FileUploader.d.ts +9 -0
- package/dist/components/FileUploader/index.d.ts +1 -0
- package/dist/components/FormBuilder/FormBuilder.d.ts +25 -0
- package/dist/components/FormBuilder/index.d.ts +1 -0
- package/dist/components/FormBuilder/utils/extractFormControlValues/extractFormControlValues.d.ts +6 -0
- package/dist/components/FormBuilder/utils/extractFormControlValues/index.d.ts +1 -0
- package/dist/components/FormBuilder/utils/jsonToUrlEncoded/index.d.ts +1 -0
- package/dist/components/FormBuilder/utils/jsonToUrlEncoded/jsonToUrlEncoded.d.ts +5 -0
- package/dist/components/FormFooter/FormFooter.d.ts +15 -0
- package/dist/components/FormFooter/components/Switch.d.ts +1 -0
- package/dist/components/FormFooter/index.d.ts +1 -0
- package/dist/components/FormGroup/FormGroup.d.ts +15 -0
- package/dist/components/FormGroup/index.d.ts +1 -0
- package/dist/components/FormList/FormList.d.ts +11 -0
- package/dist/components/FormList/index.d.ts +1 -0
- package/dist/components/GeneralFormGroup/GeneralFormGroup.d.ts +5 -0
- package/dist/components/GeneralFormGroup/index.d.ts +1 -0
- package/dist/components/Group/Group.d.ts +12 -0
- package/dist/components/Group/index.d.ts +1 -0
- package/dist/components/Input/Input.d.ts +14 -0
- package/dist/components/Input/index.d.ts +1 -0
- package/dist/components/Input/input.styles.d.ts +9 -0
- package/dist/components/InputFreeSolo/InputFreeSolo.d.ts +10 -0
- package/dist/components/InputFreeSolo/index.d.ts +1 -0
- package/dist/components/MrnInput/MrnInput.d.ts +11 -0
- package/dist/components/MrnInput/hooks/useMrn.d.ts +21 -0
- package/dist/components/MrnInput/index.d.ts +1 -0
- package/dist/components/MrnInput/services/fetchMrn.d.ts +3 -0
- package/dist/components/MrnInput/ui-helper/Link/Link.d.ts +3 -0
- package/dist/components/MrnInput/utils/mrnUtils/mrnUtils.d.ts +8 -0
- package/dist/components/MrnInput/utils/resolveMrnLinks/resolveMrnLink.d.ts +2 -0
- package/dist/components/MrnInput/utils/resolveNestedQueryLink/resolveNestedQueryLink.d.ts +2 -0
- package/dist/components/MrnInput/utils/urlSearchParam/urlSearchParam.d.ts +1 -0
- package/dist/components/MultiSelect/MultiSelect.d.ts +17 -0
- package/dist/components/MultiSelect/index.d.ts +1 -0
- package/dist/components/MultiSelect/utils/extractSelectedOptionValues/extractSelectedOptionValues.d.ts +24 -0
- package/dist/components/MultiSelect/utils/extractSelectedOptionValues/index.d.ts +1 -0
- package/dist/components/PasswordInput/PasswordInput.d.ts +12 -0
- package/dist/components/PasswordInput/index.d.ts +1 -0
- package/dist/components/QueryControl/QueryControl.d.ts +13 -0
- package/dist/components/QueryControl/data/defaultControls.d.ts +9 -0
- package/dist/components/QueryControl/index.d.ts +1 -0
- package/dist/components/QueryControl/ui-helper/Wrapper/QueryControlWrapper.d.ts +8 -0
- package/dist/components/QueryControl/ui-helper/Wrapper/QueryControlWrapper.styles.d.ts +6 -0
- package/dist/components/QueryControl/ui-helper/Wrapper/index.d.ts +1 -0
- package/dist/components/QueryControl/utils/allControlsHidden/allControlsHidden.d.ts +3 -0
- package/dist/components/QueryControl/utils/allControlsHidden/index.d.ts +1 -0
- package/dist/components/QueryControl/utils/getMatchingControls.d.ts +9 -0
- package/dist/components/QueryControl/utils/hasExpertControl/hasExpertControl.d.ts +3 -0
- package/dist/components/QueryControl/utils/hasExpertControl/index.d.ts +1 -0
- package/dist/components/QueryControl/utils/hideGroup/hideGroup.d.ts +3 -0
- package/dist/components/QueryControl/utils/hideGroup/index.d.ts +1 -0
- package/dist/components/Select/Select.d.ts +12 -0
- package/dist/components/Select/index.d.ts +1 -0
- package/dist/components/Select/utils/getSelectedOption.d.ts +3 -0
- package/dist/components/Textarea/Textarea.d.ts +10 -0
- package/dist/components/Textarea/Textarea.types.d.ts +12 -0
- package/dist/components/Textarea/aiWrapper/aiAction.d.ts +12 -0
- package/dist/components/Textarea/aiWrapper/aiLayout.d.ts +10 -0
- package/dist/components/Textarea/aiWrapper/index.d.ts +11 -0
- package/dist/components/Textarea/aiWrapper/useAi.d.ts +21 -0
- package/dist/components/Textarea/editors/Default.d.ts +13 -0
- package/dist/components/Textarea/editors/Html.d.ts +10 -0
- package/dist/components/Textarea/editors/Json.d.ts +10 -0
- package/dist/components/Textarea/editors/Markdown.d.ts +10 -0
- package/dist/components/Textarea/editors/Richtext.d.ts +12 -0
- package/dist/components/Textarea/index.d.ts +1 -0
- package/dist/components/addressGroup/AddressGroup.d.ts +12 -0
- package/dist/components/addressGroup/index.d.ts +1 -0
- package/dist/components/addressGroup/utils/Countries.d.ts +3 -0
- package/dist/components/states/error/index.d.ts +5 -0
- package/dist/context/FormData.d.ts +33 -0
- package/dist/hooks/useDependent/enhanced/useInputDependent/useInputDependent.d.ts +12 -0
- package/dist/hooks/useDependent/enhanced/useOptionsGenerator/useOptionsGenerator.d.ts +15 -0
- package/dist/hooks/useDependent/useDependent.d.ts +11 -0
- package/dist/hooks/useValueGenerator/useValueGenerator.d.ts +18 -0
- package/dist/index.d.ts +17 -0
- package/dist/styles/Hidden.styles.d.ts +7 -0
- package/dist/styles/Skeleton.d.ts +7 -0
- package/dist/styles/Textfield.styles.d.ts +5 -0
- package/dist/testutils.d.ts +14 -0
- package/dist/types/controlProps.d.ts +70 -0
- package/dist/types/index.d.ts +166 -0
- package/dist/ui/menu/hooks/useMenu.d.ts +13 -0
- package/dist/ui/menu/index.d.ts +13 -0
- package/dist/ui/menu/test/createControl.d.ts +15 -0
- package/dist/ui/menu/utils/detemineSubmenuTabs/index.d.ts +14 -0
- package/dist/ui-helper/HeaderCollapseButton/index.d.ts +7 -0
- package/dist/ui-helper/notifications/Error.d.ts +6 -0
- package/dist/ui-helper/notifications/images/background.d.ts +2 -0
- package/dist/ui-helper/notifications/images/spinner.d.ts +2 -0
- package/dist/ui-helper/notifications/images/under-improvement.d.ts +2 -0
- package/dist/utils/findFormControlError/index.d.ts +4 -0
- package/dist/utils/hasGroupRequiredFieldsWithValues/index.d.ts +6 -0
- package/package.json +6 -2
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { DetailedHTMLProps, InputHTMLAttributes } from "react";
|
|
2
|
+
import { CheckboxFormControl, OnChangeValueType } from "../../types";
|
|
3
|
+
export interface IProps extends DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement> {
|
|
4
|
+
control: CheckboxFormControl;
|
|
5
|
+
id: string;
|
|
6
|
+
objectPathId?: string;
|
|
7
|
+
onChangeValue: (newProperties: OnChangeValueType) => void;
|
|
8
|
+
}
|
|
9
|
+
declare const EnhancedCheckbox: ({ onChangeValue, ...props }: IProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export default EnhancedCheckbox;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./Checkbox";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { controlProps } from "../../types/controlProps";
|
|
3
|
+
interface IWrapperProps {
|
|
4
|
+
Control: React.FC<any>;
|
|
5
|
+
hideLabel?: boolean;
|
|
6
|
+
isExpert?: boolean;
|
|
7
|
+
config: any;
|
|
8
|
+
controlProps?: controlProps;
|
|
9
|
+
}
|
|
10
|
+
declare const Wrapper: ({ Control, config, isExpert, hideLabel, controlProps, }: IWrapperProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export default Wrapper;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./ControlWrapper";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { controlProps } from "../../types/controlProps";
|
|
2
|
+
import { GroupFormControl } from "../../types/index";
|
|
3
|
+
export interface IProps {
|
|
4
|
+
id: string;
|
|
5
|
+
control: GroupFormControl;
|
|
6
|
+
objectPathId?: string;
|
|
7
|
+
controlProps?: controlProps;
|
|
8
|
+
}
|
|
9
|
+
declare const DateRangeGroup: ({ controlProps, ...props }: IProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export default DateRangeGroup;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export declare const StyledDateRangeGroupContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
2
|
+
export declare const Styledlabel: import("styled-components").StyledComponent<"label", any, {}, never>;
|
|
3
|
+
export declare const StyledInput: import("styled-components").StyledComponent<({ onChangeValue, hasClearButton, onClearCallback, controlProps, ...props }: import("../Input/Input").IProps) => import("react/jsx-runtime").JSX.Element, any, {}, never>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import "react-date-range/dist/styles.css";
|
|
2
|
+
import "react-date-range/dist/theme/default.css";
|
|
3
|
+
export interface CalendarModalInterface {
|
|
4
|
+
startDate?: Date;
|
|
5
|
+
endDate?: Date;
|
|
6
|
+
key?: string;
|
|
7
|
+
}
|
|
8
|
+
interface ICalendarModal {
|
|
9
|
+
handleDateChange: (date: CalendarModalInterface, keepModalState?: boolean) => void;
|
|
10
|
+
from: string;
|
|
11
|
+
to: string;
|
|
12
|
+
}
|
|
13
|
+
declare const CalendarModal: ({ handleDateChange, from, to }: ICalendarModal) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export default CalendarModal;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./DateRangeGroup";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React, { Component, ErrorInfo, ReactNode } from "react";
|
|
2
|
+
interface Props {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
}
|
|
5
|
+
interface State {
|
|
6
|
+
hasError: boolean;
|
|
7
|
+
}
|
|
8
|
+
declare class ErrorBoundary extends Component<Props, State> {
|
|
9
|
+
state: State;
|
|
10
|
+
static getDerivedStateFromError(_: Error): State;
|
|
11
|
+
componentDidCatch(error: Error, errorInfo: ErrorInfo): void;
|
|
12
|
+
render(): string | number | boolean | Iterable<React.ReactNode> | import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
}
|
|
14
|
+
export default ErrorBoundary;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { InputFormControl, OnChangeValueType } from "../../types";
|
|
2
|
+
export interface IProps {
|
|
3
|
+
control: InputFormControl;
|
|
4
|
+
id: string;
|
|
5
|
+
objectPathId?: string;
|
|
6
|
+
onChangeValue: (newProperties: OnChangeValueType) => void;
|
|
7
|
+
}
|
|
8
|
+
declare const FileUploader: ({ ...props }: IProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export default FileUploader;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./FileUploader";
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { PostMessageProps, PostMessageResponse } from "../../types";
|
|
3
|
+
import { FileUploaderConfig, FormBuilderConfig, resolveUrl } from "../../types";
|
|
4
|
+
import type { controlProps } from "../../types/controlProps";
|
|
5
|
+
export type FormState = "processing" | "success" | "error";
|
|
6
|
+
export interface IProps {
|
|
7
|
+
config: FormBuilderConfig;
|
|
8
|
+
controlProps?: controlProps;
|
|
9
|
+
fileUploaderConfig?: FileUploaderConfig;
|
|
10
|
+
iconType?: string;
|
|
11
|
+
state?: FormState | "";
|
|
12
|
+
resolveUrl?: resolveUrl;
|
|
13
|
+
onSubmit?: (urlEncodedFormValues: string, formValues: any) => Promise<any>;
|
|
14
|
+
postGenAiMessage?: ({ message, profile, }: PostMessageProps) => Promise<PostMessageResponse>;
|
|
15
|
+
}
|
|
16
|
+
declare const FormBuilder: ({ config, controlProps, fileUploaderConfig, iconType, state, resolveUrl, onSubmit, postGenAiMessage, }: IProps) => import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
interface FormProps {
|
|
18
|
+
method: string;
|
|
19
|
+
formSubmitted: boolean;
|
|
20
|
+
state?: FormState | "";
|
|
21
|
+
error?: string;
|
|
22
|
+
controlProps?: controlProps;
|
|
23
|
+
}
|
|
24
|
+
export declare const Form: React.ForwardRefExoticComponent<FormProps & React.RefAttributes<HTMLFormElement>>;
|
|
25
|
+
export default FormBuilder;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default, Form } from "./FormBuilder";
|
package/dist/components/FormBuilder/utils/extractFormControlValues/extractFormControlValues.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { FormControls } from "../../../../types";
|
|
2
|
+
export interface IFormState {
|
|
3
|
+
[key: string]: string | string[] | IFormState | IFormState[];
|
|
4
|
+
}
|
|
5
|
+
declare const extractFormControlValues: (controls: FormControls) => IFormState;
|
|
6
|
+
export default extractFormControlValues;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./extractFormControlValues";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./jsonToUrlEncoded";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { FormControls } from "../../types";
|
|
3
|
+
import { controlProps } from "../../types/controlProps";
|
|
4
|
+
export interface IProps {
|
|
5
|
+
controlProps?: controlProps;
|
|
6
|
+
error?: string;
|
|
7
|
+
iconType: string;
|
|
8
|
+
loading: boolean;
|
|
9
|
+
onSubmit: (formControls: FormControls) => void;
|
|
10
|
+
}
|
|
11
|
+
export interface IIcon {
|
|
12
|
+
[key: string]: React.ReactNode;
|
|
13
|
+
}
|
|
14
|
+
declare const FormFooter: ({ controlProps, error, iconType, loading, onSubmit, }: IProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export default FormFooter;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const CustomSwitch: import("@emotion/styled").StyledComponent<import("@mui/material").SwitchProps & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./FormFooter";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { controlProps } from "../../types/controlProps";
|
|
3
|
+
interface IProps {
|
|
4
|
+
id: string;
|
|
5
|
+
objectPathId?: string;
|
|
6
|
+
error?: string;
|
|
7
|
+
required?: boolean;
|
|
8
|
+
displayName: string;
|
|
9
|
+
hideLabel?: boolean;
|
|
10
|
+
isExpert?: boolean;
|
|
11
|
+
children: React.ReactNode;
|
|
12
|
+
controlProps?: controlProps;
|
|
13
|
+
}
|
|
14
|
+
declare const FormGroup: ({ controlProps, ...props }: IProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export default FormGroup;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./FormGroup";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ListFormControl } from "../../types";
|
|
2
|
+
import type { controlProps } from "../../types/controlProps";
|
|
3
|
+
export interface IProps {
|
|
4
|
+
id: string;
|
|
5
|
+
control: ListFormControl;
|
|
6
|
+
objectPathId?: string;
|
|
7
|
+
groupIsRequired?: boolean;
|
|
8
|
+
controlProps?: controlProps;
|
|
9
|
+
}
|
|
10
|
+
declare const FormList: ({ ...props }: IProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export default FormList;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./FormList";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./GeneralFormGroup";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { controlProps } from "../../types/controlProps";
|
|
2
|
+
import { GroupFormControl } from "../../types/index";
|
|
3
|
+
export interface IProps {
|
|
4
|
+
id: string;
|
|
5
|
+
control: GroupFormControl;
|
|
6
|
+
objectPathId?: string;
|
|
7
|
+
groupIsRequired?: boolean;
|
|
8
|
+
isInGroup?: boolean;
|
|
9
|
+
controlProps?: controlProps;
|
|
10
|
+
}
|
|
11
|
+
declare const Group: ({ ...props }: IProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export default Group;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./Group";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { DetailedHTMLProps, InputHTMLAttributes } from "react";
|
|
2
|
+
import { InputFormControl, OnChangeValueType } from "../../types";
|
|
3
|
+
import type { controlProps } from "../../types/controlProps";
|
|
4
|
+
export interface IProps extends DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement> {
|
|
5
|
+
id: string;
|
|
6
|
+
control: InputFormControl;
|
|
7
|
+
controlProps?: controlProps;
|
|
8
|
+
objectPathId?: string;
|
|
9
|
+
hasClearButton?: boolean;
|
|
10
|
+
onClearCallback?: () => void;
|
|
11
|
+
onChangeValue: (newProperties: OnChangeValueType) => void;
|
|
12
|
+
}
|
|
13
|
+
declare const Input: ({ onChangeValue, hasClearButton, onClearCallback, controlProps, ...props }: IProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export default Input;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./Input";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const StyledInputWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
2
|
+
interface StyledClearButtonWrapperInterface {
|
|
3
|
+
inputValue: string;
|
|
4
|
+
}
|
|
5
|
+
export declare const StyledClearButtonWrapper: import("styled-components").StyledComponent<"div", any, StyledClearButtonWrapperInterface, never>;
|
|
6
|
+
export declare const StyledClearButton: import("styled-components").StyledComponent<import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material").SvgIconTypeMap<{}, "svg">> & {
|
|
7
|
+
muiName: string;
|
|
8
|
+
}, any, {}, never>;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { DetailedHTMLProps, InputHTMLAttributes } from "react";
|
|
2
|
+
import { InputFormControl, OnChangeValueType } from "../../types";
|
|
3
|
+
export interface IProps extends DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement> {
|
|
4
|
+
id: string;
|
|
5
|
+
control: InputFormControl;
|
|
6
|
+
objectPathId?: string;
|
|
7
|
+
onChangeValue: (newProperties: OnChangeValueType) => void;
|
|
8
|
+
}
|
|
9
|
+
declare const InputFreeSolo: ({ ...props }: IProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export default InputFreeSolo;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./InputFreeSolo";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { InputFormControl, OnChangeValueType } from "../../types";
|
|
2
|
+
import type { controlProps } from "../../types/controlProps";
|
|
3
|
+
export interface IProps {
|
|
4
|
+
id: string;
|
|
5
|
+
control: InputFormControl;
|
|
6
|
+
controlProps?: controlProps;
|
|
7
|
+
objectPathId?: any;
|
|
8
|
+
onChangeValue: (newProperties: OnChangeValueType, customizer?: (...args: any) => any) => void;
|
|
9
|
+
}
|
|
10
|
+
declare const MrnInput: ({ onChangeValue, controlProps, objectPathId, ...props }: IProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export default MrnInput;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { CustomAttributes, OnChangeValueType } from "../../../types";
|
|
2
|
+
interface IUseMrnProps {
|
|
3
|
+
value: string;
|
|
4
|
+
customAttributes: CustomAttributes;
|
|
5
|
+
objectPathId: string;
|
|
6
|
+
onChangeValue: (newProperties: OnChangeValueType) => void;
|
|
7
|
+
}
|
|
8
|
+
declare const useMrn: ({ value, customAttributes, objectPathId, onChangeValue, }: IUseMrnProps) => {
|
|
9
|
+
isLoading: boolean;
|
|
10
|
+
isOpen: boolean;
|
|
11
|
+
isDisabled: boolean;
|
|
12
|
+
mrnOptions: any[];
|
|
13
|
+
selectedOption: any;
|
|
14
|
+
setSelectedOption: import("react").Dispatch<any>;
|
|
15
|
+
setSearchText: import("react").Dispatch<import("react").SetStateAction<string>>;
|
|
16
|
+
setIsOpen: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
17
|
+
currentMrnOption: CustomAttributes | import("../../../types").MrnInputMultipleServices;
|
|
18
|
+
onChangeCurrentMrnOption: (newSource: any) => void;
|
|
19
|
+
dependentControls: string[];
|
|
20
|
+
};
|
|
21
|
+
export default useMrn;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./MrnInput";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const determineUrlSearchParams: (params?: string, searchParams?: string) => string;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { DetailedHTMLProps, SelectHTMLAttributes } from "react";
|
|
2
|
+
import { MultiSelectFormControl, OnChangeValueType } from "../../types";
|
|
3
|
+
import type { controlProps } from "../../types/controlProps";
|
|
4
|
+
export interface MultiSelectOption {
|
|
5
|
+
value: string;
|
|
6
|
+
label: string;
|
|
7
|
+
selected?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export interface IProps extends DetailedHTMLProps<SelectHTMLAttributes<HTMLSelectElement>, HTMLSelectElement> {
|
|
10
|
+
id: string;
|
|
11
|
+
control: MultiSelectFormControl;
|
|
12
|
+
objectPathId?: string;
|
|
13
|
+
onChangeValue: (newProperties: OnChangeValueType, customizer?: (...args: any) => any) => void;
|
|
14
|
+
controlProps?: controlProps;
|
|
15
|
+
}
|
|
16
|
+
declare const MultiSelect: ({ onChangeValue, controlProps, id, control }: IProps) => import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export default MultiSelect;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default, type MultiSelectOption } from "./MultiSelect";
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { MultiSelectOption } from "../../MultiSelect";
|
|
2
|
+
import { SelectFormControlOption } from "../../../../types";
|
|
3
|
+
declare const extractSelectedOptionValues: (options: SelectFormControlOption[], selectedOptions: MultiSelectOption[]) => {
|
|
4
|
+
optionValues: string | string[];
|
|
5
|
+
updatedOptions: {
|
|
6
|
+
selected: boolean;
|
|
7
|
+
value: string;
|
|
8
|
+
text: string;
|
|
9
|
+
phone?: string;
|
|
10
|
+
key?: string;
|
|
11
|
+
mrnEntries?: {
|
|
12
|
+
[key: string]: any;
|
|
13
|
+
};
|
|
14
|
+
hasChanged?: boolean;
|
|
15
|
+
error?: {
|
|
16
|
+
message: string;
|
|
17
|
+
};
|
|
18
|
+
required?: boolean;
|
|
19
|
+
placeholder?: string;
|
|
20
|
+
hasEdited?: "edited" | "not-edited" | undefined;
|
|
21
|
+
"custom-attributes"?: import("../../../../types").CustomAttributes;
|
|
22
|
+
}[];
|
|
23
|
+
};
|
|
24
|
+
export default extractSelectedOptionValues;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./extractSelectedOptionValues";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { DetailedHTMLProps, InputHTMLAttributes } from "react";
|
|
2
|
+
import type { controlProps } from "../../types/controlProps";
|
|
3
|
+
import { InputFormControl, OnChangeValueType } from "../../types";
|
|
4
|
+
export interface IProps extends DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement> {
|
|
5
|
+
id: string;
|
|
6
|
+
control: InputFormControl;
|
|
7
|
+
controlProps?: controlProps;
|
|
8
|
+
objectPathId?: string;
|
|
9
|
+
onChangeValue: (newProperties: OnChangeValueType) => void;
|
|
10
|
+
}
|
|
11
|
+
declare const Password: ({ onChangeValue, controlProps, ...props }: IProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export default Password;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./PasswordInput";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { FormControl } from "../../types";
|
|
2
|
+
import type { controlProps } from "../../types/controlProps";
|
|
3
|
+
interface IQueryControl {
|
|
4
|
+
formControl: FormControl;
|
|
5
|
+
hideLabel?: boolean;
|
|
6
|
+
id: string;
|
|
7
|
+
objectPathId?: string;
|
|
8
|
+
groupIsRequired?: boolean;
|
|
9
|
+
isInGroup?: boolean;
|
|
10
|
+
controlProps?: controlProps;
|
|
11
|
+
}
|
|
12
|
+
declare const QueryControl: ({ formControl, id, objectPathId, hideLabel, groupIsRequired, isInGroup, controlProps, }: IQueryControl) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export default QueryControl;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { FormControl } from "../../../types";
|
|
3
|
+
export type queryControl = {
|
|
4
|
+
control: React.FC<any>;
|
|
5
|
+
query: (config: FormControl, id: string) => boolean;
|
|
6
|
+
matchCount: number;
|
|
7
|
+
};
|
|
8
|
+
declare const defaultControls: queryControl[];
|
|
9
|
+
export default defaultControls;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./QueryControl";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
interface IProps {
|
|
3
|
+
isExpert?: boolean;
|
|
4
|
+
isHidden: boolean;
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
}
|
|
7
|
+
declare const ControlLayoutWrapper: ({ isExpert, isHidden, children }: IProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export default ControlLayoutWrapper;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./QueryControlWrapper";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./allControlsHidden";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const getMatchingControls: (formControl: any, customControls: any, defaultControls: any, id: string) => any[];
|
|
2
|
+
declare const getHighestMatchingControl: (formControl: any, customControls: any, defaultControls: any, id: string) => {
|
|
3
|
+
control: any;
|
|
4
|
+
error?: undefined;
|
|
5
|
+
} | {
|
|
6
|
+
control: ({ onChangeValue, hasClearButton, onClearCallback, controlProps, ...props }: import("../../Input/Input").IProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
error: string;
|
|
8
|
+
};
|
|
9
|
+
export default getHighestMatchingControl;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./hasExpertControl";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./hideGroup";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { DetailedHTMLProps, SelectHTMLAttributes } from "react";
|
|
2
|
+
import { OnChangeValueType, SelectFormControl } from "../../types";
|
|
3
|
+
import type { controlProps } from "../../types/controlProps";
|
|
4
|
+
export interface IProps extends DetailedHTMLProps<SelectHTMLAttributes<HTMLSelectElement>, HTMLSelectElement> {
|
|
5
|
+
id: string;
|
|
6
|
+
control: SelectFormControl;
|
|
7
|
+
controlProps?: controlProps;
|
|
8
|
+
objectPathId?: string;
|
|
9
|
+
onChangeValue: (newProperties: OnChangeValueType) => void;
|
|
10
|
+
}
|
|
11
|
+
declare const Select: ({ onChangeValue, controlProps, ...props }: IProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export default Select;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./Select";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { DetailedHTMLProps, TextareaHTMLAttributes } from "react";
|
|
2
|
+
import { OnChangeValueType, TextareaFormControl } from "../../types";
|
|
3
|
+
export interface IProps extends DetailedHTMLProps<TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement> {
|
|
4
|
+
control: TextareaFormControl;
|
|
5
|
+
id: string;
|
|
6
|
+
objectPathId?: string;
|
|
7
|
+
onChangeValue: (newProperties: OnChangeValueType) => void;
|
|
8
|
+
}
|
|
9
|
+
declare const Textarea: ({ onChangeValue, ...props }: IProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export default Textarea;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
type Type = "plain" | "html" | "json";
|
|
2
|
+
type EditorType = "richtext" | "markdown" | "code";
|
|
3
|
+
type ViewerType = "html" | "markdown";
|
|
4
|
+
export interface ITextareaProps {
|
|
5
|
+
control: "textarea";
|
|
6
|
+
type: Type;
|
|
7
|
+
"custom-attributes": {
|
|
8
|
+
editor: EditorType;
|
|
9
|
+
viewer: ViewerType;
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { GenAiPrompt } from "../../../types";
|
|
2
|
+
import "./global-ai-wrapper.css";
|
|
3
|
+
interface AiActionProps {
|
|
4
|
+
action: GenAiPrompt;
|
|
5
|
+
objectPathId: string | null;
|
|
6
|
+
isLoading: boolean;
|
|
7
|
+
isDisabled: boolean;
|
|
8
|
+
index: number;
|
|
9
|
+
onClick: (prompt: string, profile: string, index: number) => void;
|
|
10
|
+
}
|
|
11
|
+
declare const AiAction: ({ action, objectPathId, isLoading, isDisabled, index, onClick, }: AiActionProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export default AiAction;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { AiWrapperProps } from ".";
|
|
2
|
+
import type { useAiProps } from "./useAi";
|
|
3
|
+
import "./global-ai-wrapper.css";
|
|
4
|
+
import useAi from "./useAi";
|
|
5
|
+
interface AiLayoutProps extends ReturnType<typeof useAi>, Omit<AiWrapperProps, keyof useAiProps> {
|
|
6
|
+
modalOpen: boolean;
|
|
7
|
+
onModalToggle: () => void;
|
|
8
|
+
}
|
|
9
|
+
declare const AiLayout: ({ AiResponseControl, aiActions, inputControl, objectPathId, aiResponse, isError, isLoading, loadingActionIndex, modalOpen, onModalToggle, handleAccept, handleAiActionClick, handleDiscard, handleBack, handleRetry, }: AiLayoutProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export default AiLayout;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { GenAiPrompts, OnChangeValueType } from "../../../types";
|
|
2
|
+
import React from "react";
|
|
3
|
+
export interface AiWrapperProps {
|
|
4
|
+
aiActions: GenAiPrompts;
|
|
5
|
+
inputControl: React.ReactNode;
|
|
6
|
+
AiResponseControl: React.FC<any>;
|
|
7
|
+
objectPathId: string | null;
|
|
8
|
+
onAcceptAiResponse: (newProperties: OnChangeValueType) => void;
|
|
9
|
+
}
|
|
10
|
+
declare const AiWrapper: ({ ...props }: AiWrapperProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export default AiWrapper;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { OnChangeValueType, PostMessageResponse } from "../../../types";
|
|
2
|
+
export interface useAiProps {
|
|
3
|
+
onAcceptAiResponse: (newProperties: OnChangeValueType) => void;
|
|
4
|
+
}
|
|
5
|
+
declare const useAi: ({ onAcceptAiResponse }: useAiProps) => {
|
|
6
|
+
aiResponse: PostMessageResponse;
|
|
7
|
+
isLoading: boolean;
|
|
8
|
+
isError: {
|
|
9
|
+
state: boolean;
|
|
10
|
+
message: string;
|
|
11
|
+
prompt: string;
|
|
12
|
+
profile: string;
|
|
13
|
+
};
|
|
14
|
+
loadingActionIndex: number;
|
|
15
|
+
handleAiActionClick: (prompt: string, profile: string, index: number) => Promise<void>;
|
|
16
|
+
handleAccept: () => void;
|
|
17
|
+
handleDiscard: () => void;
|
|
18
|
+
handleBack: () => void;
|
|
19
|
+
handleRetry: () => Promise<void>;
|
|
20
|
+
};
|
|
21
|
+
export default useAi;
|