@arquimedes.co/eureka-forms 3.0.0-refactor → 3.0.2-refactor
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/@Types/@Types.d.ts +2 -0
- package/dist/@Types/AYFFormStep.d.ts +19 -0
- package/dist/@Types/Branding.d.ts +13 -0
- package/dist/@Types/CBRFormStep.d.ts +74 -0
- package/dist/@Types/Condition.d.ts +143 -0
- package/dist/@Types/Draft/Draft.d.ts +12 -0
- package/dist/@Types/Draft/DraftEntityData.d.ts +54 -0
- package/dist/@Types/Entity.d.ts +36 -0
- package/dist/@Types/Form.d.ts +75 -0
- package/dist/@Types/FormStep.d.ts +219 -0
- package/dist/@Types/GenericFormSteps.d.ts +84 -0
- package/dist/@Types/MapperElement.d.ts +8 -0
- package/dist/@Types/Organization.d.ts +11 -0
- package/dist/@Types/Time.d.ts +6 -0
- package/dist/@Types/index.d.ts +1 -0
- package/dist/App/App.d.ts +57 -0
- package/dist/App/AppFunctions.d.ts +23 -0
- package/dist/App/AppHooks.d.ts +10 -0
- package/dist/App/AppHooks.test.d.ts +1 -0
- package/dist/Contexts/CustomContext.d.ts +11 -0
- package/dist/Contexts/FormContext.d.ts +6 -0
- package/dist/Contexts/SectionContext.d.ts +2 -0
- package/dist/Form/ConfirmationDialog/ConfirmationDialog.d.ts +11 -0
- package/dist/Form/Form.d.ts +39 -0
- package/dist/Form/FormFunctions.d.ts +12 -0
- package/dist/Form/FormFunctions.test.d.ts +1 -0
- package/dist/Form/FormHooks.d.ts +2 -0
- package/dist/Form/FormTypes/ColumnForm/ColumnForm.d.ts +3 -0
- package/dist/Form/FormTypes/StepperForm/StepperForm.d.ts +3 -0
- package/dist/Form/Section/MaterialSection/MaterialSection.d.ts +3 -0
- package/dist/Form/Section/Section.d.ts +5 -0
- package/dist/Form/Terms/Term/MaterialTerm/MaterialTerm.d.ts +3 -0
- package/dist/Form/Terms/Term/Term.d.ts +7 -0
- package/dist/Form/Terms/Terms.d.ts +2 -0
- package/dist/FormSteps/@Construction/CBRElementStep/CBRElementStep.d.ts +7 -0
- package/dist/FormSteps/@Construction/CBRIncidentsStep/CBRIncidentsStep.d.ts +8 -0
- package/dist/FormSteps/@Construction/CBRIncidentsStep/MaterialCBRIncidentsStep/Incident/Incident.d.ts +7 -0
- package/dist/FormSteps/@Construction/CBRIncidentsStep/MaterialCBRIncidentsStep/MaterialCBRIncidentsStep.d.ts +10 -0
- package/dist/FormSteps/@Construction/CBRPropertyStep/CBRPropertyStep.d.ts +7 -0
- package/dist/FormSteps/AYFStepMapper.d.ts +11 -0
- package/dist/FormSteps/AYFStepMapper.js +2 -12
- package/dist/FormSteps/ApiSelectorStep/ApiSelectorStep.d.ts +14 -0
- package/dist/FormSteps/ApiSelectorStep/MaterialApiSelectorStep/MaterialApiSelectorStep.d.ts +3 -0
- package/dist/FormSteps/CBRStepMapper.d.ts +12 -0
- package/dist/FormSteps/CBRStepMapper.js +1 -7
- package/dist/FormSteps/CheckBoxStep/CheckBoxStep.d.ts +8 -0
- package/dist/FormSteps/CheckBoxStep/MaterialCheckBoxStep/MaterialCheckBoxStep.d.ts +3 -0
- package/dist/FormSteps/ClassifierSelectorStep/ClassifierSelectorStep.d.ts +8 -0
- package/dist/FormSteps/ClassifierSelectorStep/MaterialClassifierSelectorStep/MaterialClassifierSelectorStep.d.ts +3 -0
- package/dist/FormSteps/CollapsibleStep/CollapsibleStep.d.ts +8 -0
- package/dist/FormSteps/CollapsibleStep/MaterialTitleStep/MaterialCollapsibleStep.d.ts +3 -0
- package/dist/FormSteps/CustomStep.d.ts +26 -0
- package/dist/FormSteps/DatePickerStep/DatePickerStep.d.ts +10 -0
- package/dist/FormSteps/DatePickerStep/MaterialDatePickerStep/MaterialDatePickerStep.d.ts +3 -0
- package/dist/FormSteps/EntityValueStep/EntityValuePickerStep.d.ts +14 -0
- package/dist/FormSteps/EntityValueStep/MaterialEntityValuePickerStep/MaterialEntityValueDialog/MaterialEntityValueDialog.d.ts +11 -0
- package/dist/FormSteps/EntityValueStep/MaterialEntityValuePickerStep/MaterialEntityValuePickerStep.d.ts +3 -0
- package/dist/FormSteps/FileUploadStep/FileUploadStep.d.ts +8 -0
- package/dist/FormSteps/FileUploadStep/MaterialFileUploadStep/FileComponent/FileComponent.d.ts +13 -0
- package/dist/FormSteps/FileUploadStep/MaterialFileUploadStep/FileFunctions.d.ts +2 -0
- package/dist/FormSteps/FileUploadStep/MaterialFileUploadStep/MaterialFileUploadStep.d.ts +16 -0
- package/dist/FormSteps/MapperStep/MapperStep.d.ts +17 -0
- package/dist/FormSteps/MapperStep/MaterialMapperStep/Element/ListMapperElement/ListMapperElement.d.ts +4 -0
- package/dist/FormSteps/MapperStep/MaterialMapperStep/Element/MapperElementComponent.d.ts +15 -0
- package/dist/FormSteps/MapperStep/MaterialMapperStep/Element/PagedMapperElement/PagedMapperElement.d.ts +4 -0
- package/dist/FormSteps/MapperStep/MaterialMapperStep/Element/PillMapperElement/PillMapperElement.d.ts +4 -0
- package/dist/FormSteps/MapperStep/MaterialMapperStep/MaterialMapperStep.d.ts +20 -0
- package/dist/FormSteps/PhoneInputStep/MaterialTextInputStep/MaterialPhoneInputStep.d.ts +3 -0
- package/dist/FormSteps/PhoneInputStep/PhoneInputStep.d.ts +10 -0
- package/dist/FormSteps/RatingStep/MaterialRatingStep/MaterialRatingStep.d.ts +3 -0
- package/dist/FormSteps/RatingStep/RatingStep.d.ts +8 -0
- package/dist/FormSteps/SelectorStep/MaterialSelectorStep/MaterialSelectorStep.d.ts +3 -0
- package/dist/FormSteps/SelectorStep/SelectorStep.d.ts +8 -0
- package/dist/FormSteps/SeparatorStep/MaterialSeparatorStep/MaterialSeparatorStep.d.ts +3 -0
- package/dist/FormSteps/SeparatorStep/SeparatorStep.d.ts +8 -0
- package/dist/FormSteps/SmartSelectStep/MaterialSmartSelectStep/MaterialSmartSelectStep.d.ts +4 -0
- package/dist/FormSteps/SmartSelectStep/SmartSelectStep.d.ts +35 -0
- package/dist/FormSteps/Step.d.ts +7 -0
- package/dist/FormSteps/StepFunctions.d.ts +27 -0
- package/dist/FormSteps/StepFunctions.test.d.ts +1 -0
- package/dist/FormSteps/StepHooks.d.ts +109 -0
- package/dist/FormSteps/TextAreaStep/MaterialTextAreaStep/MaterialTextAreaEditorStep.d.ts +9 -0
- package/dist/FormSteps/TextAreaStep/MaterialTextAreaStep/MaterialTextAreaStep.d.ts +7 -0
- package/dist/FormSteps/TextAreaStep/TextAreaStep.d.ts +9 -0
- package/dist/FormSteps/TextInputStep/MaterialTextInputStep/MaterialTextInputStep.d.ts +3 -0
- package/dist/FormSteps/TextInputStep/TextInputStep.d.ts +16 -0
- package/dist/FormSteps/TimePickerStep/MaterialTimePickerStep/MaterialTimePickerStep.d.ts +3 -0
- package/dist/FormSteps/TimePickerStep/TimePickerStep.d.ts +11 -0
- package/dist/FormSteps/TitleStep/MaterialTitleStep/MaterialTitleStep.d.ts +3 -0
- package/dist/FormSteps/TitleStep/TitleStep.d.ts +8 -0
- package/dist/FormSteps/Utils/@StepFiller/StepFiller.d.ts +9 -0
- package/dist/FormSteps/Utils/MaterialInputContainer/MaterialInputContainer.d.ts +11 -0
- package/dist/Icons/@ErkIcon.d.ts +14 -0
- package/dist/Icons/@ErkIcon.js +10 -0
- package/dist/Icons/ArrowLeftIcon.d.ts +3 -0
- package/dist/Icons/ArrowLeftIcon.js +4 -3
- package/dist/Icons/ArrowRightIcon.d.ts +3 -0
- package/dist/Icons/ArrowRightIcon.js +4 -3
- package/dist/Icons/CalendarIcon.d.ts +3 -0
- package/dist/Icons/CalendarIcon.js +4 -3
- package/dist/Icons/CheckCircleIcon.d.ts +3 -0
- package/dist/Icons/CheckCircleIcon.js +4 -3
- package/dist/Icons/CheckboxCheckedIcon.d.ts +3 -0
- package/dist/Icons/CheckboxCheckedIcon.js +4 -3
- package/dist/Icons/CheckboxUncheckedIcon.d.ts +3 -0
- package/dist/Icons/CheckboxUncheckedIcon.js +4 -3
- package/dist/Icons/ClockIcon.d.ts +3 -0
- package/dist/Icons/ClockIcon.js +4 -3
- package/dist/Icons/CloseIcon.d.ts +3 -0
- package/dist/Icons/CloseIcon.js +4 -3
- package/dist/Icons/Construction/LeakIcon.d.ts +3 -0
- package/dist/Icons/Construction/LeakIcon.js +4 -3
- package/dist/Icons/Construction/ProjectIcon.d.ts +3 -0
- package/dist/Icons/Construction/ProjectIcon.js +4 -3
- package/dist/Icons/Construction/PropertyIcon.d.ts +3 -0
- package/dist/Icons/Construction/PropertyIcon.js +5 -4
- package/dist/Icons/Construction/SpaceIcon.d.ts +3 -0
- package/dist/Icons/Construction/SpaceIcon.js +4 -3
- package/dist/Icons/DeleteIcon.d.ts +3 -0
- package/dist/Icons/DeleteIcon.js +4 -3
- package/dist/Icons/DocumentIcon.d.ts +3 -0
- package/dist/Icons/DocumentIcon.js +4 -3
- package/dist/Icons/Entities/CheckListIcon.d.ts +3 -0
- package/dist/Icons/Entities/CheckListIcon.js +4 -3
- package/dist/Icons/Entities/GenericEntityIcon.d.ts +3 -0
- package/dist/Icons/Entities/GenericEntityIcon.js +4 -3
- package/dist/Icons/Entities/HandshakeIcon.d.ts +3 -0
- package/dist/Icons/Entities/HandshakeIcon.js +4 -3
- package/dist/Icons/Entities/SupplierIcon.d.ts +3 -0
- package/dist/Icons/Entities/SupplierIcon.js +4 -3
- package/dist/Icons/ErrorIcon.d.ts +3 -0
- package/dist/Icons/ErrorIcon.js +4 -3
- package/dist/Icons/ExpandLessIcon.d.ts +3 -0
- package/dist/Icons/ExpandLessIcon.js +4 -3
- package/dist/Icons/ExpandMoreIcon.d.ts +3 -0
- package/dist/Icons/ExpandMoreIcon.js +4 -3
- package/dist/Icons/FileIcon.d.ts +3 -0
- package/dist/Icons/FileIcon.js +4 -3
- package/dist/Icons/InfoIcon.d.ts +3 -0
- package/dist/Icons/InfoIcon.js +4 -3
- package/dist/Icons/LocationIcon.d.ts +3 -0
- package/dist/Icons/LocationIcon.js +4 -3
- package/dist/Icons/PersonIcon.d.ts +3 -0
- package/dist/Icons/PersonIcon.js +5 -4
- package/dist/Icons/Ratings/DislikeIcon.d.ts +3 -0
- package/dist/Icons/Ratings/DislikeIcon.js +4 -3
- package/dist/Icons/Ratings/DissatisfiedIcon.d.ts +3 -0
- package/dist/Icons/Ratings/DissatisfiedIcon.js +4 -3
- package/dist/Icons/Ratings/LikeIcon.d.ts +3 -0
- package/dist/Icons/Ratings/LikeIcon.js +4 -3
- package/dist/Icons/Ratings/SatisfiedIcon.d.ts +3 -0
- package/dist/Icons/Ratings/SatisfiedIcon.js +4 -3
- package/dist/Icons/Ratings/StarIcon.d.ts +3 -0
- package/dist/Icons/Ratings/StarIcon.js +4 -3
- package/dist/Icons/Ratings/VeryDissatisfiedIcon.d.ts +3 -0
- package/dist/Icons/Ratings/VeryDissatisfiedIcon.js +4 -3
- package/dist/Icons/Ratings/VerySatisfiedIcon.d.ts +3 -0
- package/dist/Icons/Ratings/VerySatisfiedIcon.js +4 -3
- package/dist/Icons/WarningIcon.d.ts +3 -0
- package/dist/Icons/WarningIcon.js +4 -3
- package/dist/Init.d.ts +1 -0
- package/dist/Services/FileService.d.ts +5 -0
- package/dist/Services/FormService.d.ts +5 -0
- package/dist/Services/OrganizationService.d.ts +2 -0
- package/dist/Shared/CustomBtn/CustomBtn.d.ts +17 -0
- package/dist/Shared/ErkButton/ErkButton.d.ts +31 -0
- package/dist/Shared/ErkButton/ErkButton.stories.d.ts +23 -0
- package/dist/Shared/ErkCheckbox/ErkCheckBox.d.ts +19 -0
- package/dist/Shared/ErkCheckbox/ErkCheckBox.stories.d.ts +16 -0
- package/dist/Shared/ErkDatePicker/ErkDatePicker.d.ts +16 -0
- package/dist/Shared/ErkDatePicker/ErkDatePicker.js +3 -9
- package/dist/Shared/ErkDatePicker/ErkDatePicker.stories.d.ts +23 -0
- package/dist/Shared/ErkPhoneInput/EkrPhoneInput.d.ts +16 -0
- package/dist/Shared/ErkSelect/ErkSelect.d.ts +39 -0
- package/dist/Shared/ErkSelect/ErkSelect.stories.d.ts +18 -0
- package/dist/Shared/ErkSmartSelect/ErkSmartSelect.d.ts +28 -0
- package/dist/Shared/ErkSmartSelect/ErkSmartSelect.stories.d.ts +26 -0
- package/dist/Shared/ErkTextField/ErkTextField.d.ts +26 -0
- package/dist/Shared/ErkTextField/ErkTextField.js +1 -0
- package/dist/Shared/ErkTextField/ErkTextField.stories.d.ts +24 -0
- package/dist/Shared/ErkTimePicker/ErkTimePicker.d.ts +31 -0
- package/dist/Shared/InputIcon/InputIcon.d.ts +7 -0
- package/dist/Shared/InputIcon/InputIcon.js +2 -10
- package/dist/Shared/Loader/Loader.d.ts +17 -0
- package/dist/Shared/Navbar/Navbar.d.ts +8 -0
- package/dist/Shared/Navbar/Navbar.stories.d.ts +13 -0
- package/dist/Shared/Rating/Rating.d.ts +13 -0
- package/dist/Shared/Rating/Rating.stories.d.ts +15 -0
- package/dist/Shared/Rating/Ratings/LikeRating.d.ts +3 -0
- package/dist/Shared/Rating/Ratings/SatisfactionRating.d.ts +3 -0
- package/dist/Shared/Rating/Ratings/ScaleRating.d.ts +3 -0
- package/dist/Shared/Toggle/Toggle.d.ts +8 -0
- package/dist/States/GlobalSlice.d.ts +46 -0
- package/dist/States/SiteSlice.d.ts +77 -0
- package/dist/States/WidthStatsSlice.d.ts +7 -0
- package/dist/Utils/AxiosAPI.d.ts +2 -0
- package/dist/Utils/AxiosWidget.d.ts +2 -0
- package/dist/Utils/CBRFunctions.d.ts +8 -0
- package/dist/Utils/DraftFunctions.d.ts +56 -0
- package/dist/Utils/FormStepFunctions.d.ts +15 -0
- package/dist/Utils/LocaleUtils.d.ts +2 -0
- package/dist/Utils/MaterialProviders.d.ts +24 -0
- package/dist/Utils/MaterialProviders.js +0 -1
- package/dist/Utils/MuiClassnameSetup.d.ts +1 -0
- package/dist/Utils/PhoneFunctions.d.ts +2 -0
- package/dist/Utils/TestUtils.d.ts +70 -0
- package/dist/Utils/store.d.ts +29 -0
- package/dist/Widget.d.ts +1 -0
- package/dist/Widget.js +1 -0
- package/dist/__tests__/setup.d.ts +1 -0
- package/dist/constants/AYFFormStepTypes.d.ts +9 -0
- package/dist/constants/CBRFormStepTypes.d.ts +21 -0
- package/dist/constants/ConditionTypes.d.ts +27 -0
- package/dist/constants/Draft/DraftEntityDataTypes.d.ts +11 -0
- package/dist/constants/Draft/DraftEntityTypes.d.ts +3 -0
- package/dist/constants/Draft/DraftStyleTypes.d.ts +7 -0
- package/dist/constants/EntityPropertyTypes.d.ts +10 -0
- package/dist/constants/Files/FileExtensions.d.ts +3 -0
- package/dist/constants/Files/FileMaxSize.d.ts +2 -0
- package/dist/constants/FormStepTypes.d.ts +64 -0
- package/dist/constants/IconTypes.d.ts +15 -0
- package/dist/constants/InternalFormStyle.d.ts +3 -0
- package/dist/constants/TicketPropertyTypes.d.ts +3 -0
- package/dist/hooks.d.ts +7 -0
- package/dist/index.lib.d.ts +7 -0
- package/dist/main.d.ts +3 -0
- package/dist/main.js +2 -1
- package/package.json +27 -27
- package/dist/{Icons/@IconTypes.js → App/AppFunctions.test.d.ts} +0 -0
- package/dist/Icons/{ErkIcon.module.css → @ErkIcon.css} +1 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
3
|
-
function WarningIcon(
|
|
4
|
-
|
|
2
|
+
import { useIconProps } from './@ErkIcon';
|
|
3
|
+
function WarningIcon(props) {
|
|
4
|
+
const iconProps = useIconProps(props);
|
|
5
|
+
return (_jsx("svg", { ...iconProps, version: "1.1", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: _jsx("path", { d: "M4.47 21h15.06c1.54 0 2.5-1.67 1.73-3L13.73 4.99c-.77-1.33-2.69-1.33-3.46 0L2.74 18c-.77 1.33.19 3 1.73 3zM12 14c-.55 0-1-.45-1-1v-2c0-.55.45-1 1-1s1 .45 1 1v2c0 .55-.45 1-1 1zm1 4h-2v-2h2v2z" }) }));
|
|
5
6
|
}
|
|
6
7
|
export default WarningIcon;
|
package/dist/Init.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
interface CustomBtnProps {
|
|
2
|
+
label?: string;
|
|
3
|
+
'data-testid'?: string;
|
|
4
|
+
onClick?: React.MouseEventHandler<HTMLButtonElement> | (() => Promise<void>);
|
|
5
|
+
backgroundColor?: string;
|
|
6
|
+
color?: string;
|
|
7
|
+
height?: string;
|
|
8
|
+
width?: string;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
loading?: boolean;
|
|
11
|
+
children?: React.ReactNode;
|
|
12
|
+
padding?: string;
|
|
13
|
+
borderRadius?: string;
|
|
14
|
+
contentMargin?: string;
|
|
15
|
+
}
|
|
16
|
+
declare function CustomBtn({ label, onClick, backgroundColor, color, loading, disabled, height, width, padding, borderRadius, contentMargin, children, ...others }: CustomBtnProps): JSX.Element;
|
|
17
|
+
export default CustomBtn;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ButtonProps as MuiButtonProps } from '@mui/material';
|
|
3
|
+
interface ButtonProps extends Omit<MuiButtonProps, 'color'> {
|
|
4
|
+
/** Button text */
|
|
5
|
+
text: string;
|
|
6
|
+
/** Background Color */
|
|
7
|
+
backgroundColor?: string;
|
|
8
|
+
/** Font Color */
|
|
9
|
+
color?: string;
|
|
10
|
+
/** Button Click Handle */
|
|
11
|
+
onClick?: React.MouseEventHandler<HTMLButtonElement>;
|
|
12
|
+
/** If button is disabled */
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
/** Text font size */
|
|
15
|
+
fontSize?: number | string;
|
|
16
|
+
/** Button padding '0 13px 0 13px' format */
|
|
17
|
+
padding?: string;
|
|
18
|
+
/** border radius */
|
|
19
|
+
borderRadius?: number;
|
|
20
|
+
/** Component height */
|
|
21
|
+
height?: number;
|
|
22
|
+
/** If text is bold */
|
|
23
|
+
bold?: boolean;
|
|
24
|
+
/** The width of the button */
|
|
25
|
+
width?: string;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Generic capta button
|
|
29
|
+
*/
|
|
30
|
+
declare function ErkButton({ text, color, ...props }: ButtonProps): JSX.Element;
|
|
31
|
+
export default ErkButton;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react';
|
|
2
|
+
import ErkButton from './ErkButton';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
component: typeof ErkButton;
|
|
5
|
+
tags: string[];
|
|
6
|
+
args: {
|
|
7
|
+
text: string;
|
|
8
|
+
backgroundColor: string;
|
|
9
|
+
color: string;
|
|
10
|
+
disabled: false;
|
|
11
|
+
fontSize: string;
|
|
12
|
+
padding: string;
|
|
13
|
+
borderRadius: number;
|
|
14
|
+
height: number;
|
|
15
|
+
bold: false;
|
|
16
|
+
width: string;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
export default meta;
|
|
20
|
+
type Story = StoryObj<typeof meta>;
|
|
21
|
+
export declare const Default: Story;
|
|
22
|
+
export declare const Disabled: Story;
|
|
23
|
+
export declare const DifferentColors: Story;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React, { CSSProperties } from 'react';
|
|
2
|
+
import { CheckboxProps as MuiCheckboxProps } from '@mui/material';
|
|
3
|
+
interface StyleProps {
|
|
4
|
+
size?: CSSProperties['fontSize'];
|
|
5
|
+
padding?: string;
|
|
6
|
+
error?: number;
|
|
7
|
+
}
|
|
8
|
+
interface ErkCheckboxProps extends Omit<StyleProps, 'error'>, Omit<MuiCheckboxProps, 'size' | 'onChange'> {
|
|
9
|
+
onChange?: (checked: boolean) => void;
|
|
10
|
+
checked: boolean;
|
|
11
|
+
error?: boolean;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Generic datepicker with apps designs. Is class due to the use in the react-hook-forms library
|
|
15
|
+
*/
|
|
16
|
+
declare class ErkCheckbox extends React.Component<ErkCheckboxProps> {
|
|
17
|
+
render(): JSX.Element;
|
|
18
|
+
}
|
|
19
|
+
export default ErkCheckbox;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react';
|
|
2
|
+
import ErkCheckBox from './ErkCheckBox';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
component: typeof ErkCheckBox;
|
|
5
|
+
tags: string[];
|
|
6
|
+
args: {
|
|
7
|
+
size: string;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
export default meta;
|
|
11
|
+
type Story = StoryObj<typeof meta>;
|
|
12
|
+
export declare const Uncheked: Story;
|
|
13
|
+
export declare const Checked: Story;
|
|
14
|
+
export declare const Error: Story;
|
|
15
|
+
export declare const Disabled: Story;
|
|
16
|
+
export declare const ErrorColor: Story;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { MobileDatePickerProps as MuiDatePickerProps, PickerValidDate } from '@mui/x-date-pickers';
|
|
3
|
+
import { ErkTextFieldProps } from '../ErkTextField/ErkTextField';
|
|
4
|
+
interface ErkDatePickerProps extends Omit<MuiDatePickerProps<PickerValidDate>, 'ref' | 'onChange'>, Pick<ErkTextFieldProps, 'error' | 'required' | 'helperText'> {
|
|
5
|
+
onChange?: (date: Date | null) => void;
|
|
6
|
+
/** If it should display the timePicker */
|
|
7
|
+
pickTime?: boolean;
|
|
8
|
+
inputRef?: React.Ref<HTMLInputElement>;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Generic datepicker with apps designs. Is class due to the use in the react-hook-forms library
|
|
12
|
+
*/
|
|
13
|
+
declare class ErkDatePicker extends React.Component<ErkDatePickerProps> {
|
|
14
|
+
render(): JSX.Element;
|
|
15
|
+
}
|
|
16
|
+
export default ErkDatePicker;
|
|
@@ -117,7 +117,7 @@ const StyledDay = styled(MuiPickerDay)(({ theme }) => ({
|
|
|
117
117
|
}));
|
|
118
118
|
function CustomDatePicker({ error, required, disabled, readOnly, helperText, pickTime = false, ...others }) {
|
|
119
119
|
if (pickTime) {
|
|
120
|
-
return (_jsx(StyledDateTimePicker, { ...others, disabled: disabled ?? readOnly, defaultValue: required ? new Date() : undefined, showDaysOutsideCurrentMonth: true, slotProps: {
|
|
120
|
+
return (_jsx(StyledDateTimePicker, { ampm: true, ...others, disabled: disabled ?? readOnly, defaultValue: required ? new Date() : undefined, showDaysOutsideCurrentMonth: true, slotProps: {
|
|
121
121
|
actionBar: {
|
|
122
122
|
actions: ['clear', 'accept'],
|
|
123
123
|
},
|
|
@@ -144,10 +144,7 @@ function CustomDatePicker({ error, required, disabled, readOnly, helperText, pic
|
|
|
144
144
|
placeholder: '',
|
|
145
145
|
InputProps: {
|
|
146
146
|
disabled: disabled ?? readOnly,
|
|
147
|
-
endAdornment:
|
|
148
|
-
width: 27,
|
|
149
|
-
height: 27,
|
|
150
|
-
} })),
|
|
147
|
+
endAdornment: _jsx(CalendarIcon, { fill: "#000000a0" }),
|
|
151
148
|
},
|
|
152
149
|
},
|
|
153
150
|
}, slots: {
|
|
@@ -185,10 +182,7 @@ function CustomDatePicker({ error, required, disabled, readOnly, helperText, pic
|
|
|
185
182
|
placeholder: '',
|
|
186
183
|
InputProps: {
|
|
187
184
|
disabled: disabled ?? readOnly,
|
|
188
|
-
endAdornment:
|
|
189
|
-
width: 27,
|
|
190
|
-
height: 27,
|
|
191
|
-
} })),
|
|
185
|
+
endAdornment: _jsx(CalendarIcon, { fill: "#000000a0" }),
|
|
192
186
|
},
|
|
193
187
|
},
|
|
194
188
|
}, localeText: {}, slots: {
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react';
|
|
2
|
+
import ErkDatePicker from './ErkDatePicker';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
component: typeof ErkDatePicker;
|
|
5
|
+
tags: string[];
|
|
6
|
+
args: {
|
|
7
|
+
readOnly: false;
|
|
8
|
+
};
|
|
9
|
+
parameters: {
|
|
10
|
+
date: Date;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
export default meta;
|
|
14
|
+
type Story = StoryObj<typeof meta>;
|
|
15
|
+
export declare const Empty: Story;
|
|
16
|
+
export declare const Default: Story;
|
|
17
|
+
export declare const ValueAndLabel: Story;
|
|
18
|
+
export declare const Full: Story;
|
|
19
|
+
export declare const FullDateTime: Story;
|
|
20
|
+
export declare const Error: Story;
|
|
21
|
+
export declare const Menu: Story;
|
|
22
|
+
export declare const DateTimeDateMenu: Story;
|
|
23
|
+
export declare const DateTimeTimeMenu: Story;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { TextFieldProps as MuiTextFieldProps } from '@mui/material';
|
|
3
|
+
interface ErkPhoneInputProps {
|
|
4
|
+
/** The value of the phoneinput */
|
|
5
|
+
value?: string;
|
|
6
|
+
onChange: (value: string) => void;
|
|
7
|
+
inputRef?: any;
|
|
8
|
+
readOnly?: boolean;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Generic phoneinput with apps designs. Is class due to the use in the react-hook-forms library
|
|
12
|
+
*/
|
|
13
|
+
declare class ErkPhoneInput extends React.Component<ErkPhoneInputProps & Omit<MuiTextFieldProps, 'onChange'>> {
|
|
14
|
+
render(): JSX.Element;
|
|
15
|
+
}
|
|
16
|
+
export default ErkPhoneInput;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { SelectProps as MuiSelectProps } from '@mui/material';
|
|
3
|
+
export interface SelectorStyleProps {
|
|
4
|
+
/** If input is readOnly */
|
|
5
|
+
readOnly?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare const StyledSelect: import("@emotion/styled").StyledComponent<MuiSelectProps<unknown> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
8
|
+
export declare const StyledInputLabel: import("@emotion/styled").StyledComponent<import("@mui/material").InputLabelOwnProps & Pick<import("@mui/material").FormLabelOwnProps, "color" | "filled"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<React.DetailedHTMLProps<React.LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, "ref"> & {
|
|
9
|
+
ref?: ((instance: HTMLLabelElement | null) => void | React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | React.RefObject<HTMLLabelElement> | null | undefined;
|
|
10
|
+
}, "required" | "size" | "color" | "children" | "className" | "style" | "classes" | "disabled" | "error" | "margin" | "sx" | "filled" | "variant" | "focused" | "disableAnimation" | "shrink"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
|
|
11
|
+
component?: React.ElementType;
|
|
12
|
+
} & {
|
|
13
|
+
open: boolean;
|
|
14
|
+
}, {}, {}>;
|
|
15
|
+
export declare const StyledHelperText: import("@emotion/styled").StyledComponent<import("@mui/material").FormHelperTextOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "ref"> & {
|
|
16
|
+
ref?: ((instance: HTMLParagraphElement | null) => void | React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | React.RefObject<HTMLParagraphElement> | null | undefined;
|
|
17
|
+
}, "required" | "children" | "className" | "style" | "classes" | "disabled" | "error" | "margin" | "sx" | "filled" | "variant" | "focused"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
|
|
18
|
+
component?: React.ElementType;
|
|
19
|
+
}, {}, {}>;
|
|
20
|
+
interface ErkSelectProps extends Omit<MuiSelectProps, 'color' | 'onChange'>, SelectorStyleProps {
|
|
21
|
+
/** children to display in the options */
|
|
22
|
+
children?: React.ReactNode;
|
|
23
|
+
/** Currently selected value */
|
|
24
|
+
value?: any;
|
|
25
|
+
onChange?: (value: any) => void;
|
|
26
|
+
/** String to place in the label */
|
|
27
|
+
label?: string;
|
|
28
|
+
/** The helper Text to display */
|
|
29
|
+
helperText?: string;
|
|
30
|
+
/** the components ref */
|
|
31
|
+
ref?: React.Ref<HTMLInputElement>;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Generic textfield with apps designs. Is class due to the use in the react-hook-forms library
|
|
35
|
+
*/
|
|
36
|
+
declare class ErkSelect extends React.Component<ErkSelectProps> {
|
|
37
|
+
render(): JSX.Element;
|
|
38
|
+
}
|
|
39
|
+
export default ErkSelect;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react';
|
|
2
|
+
import ErkSelect from './ErkSelect';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
component: typeof ErkSelect;
|
|
5
|
+
tags: string[];
|
|
6
|
+
args: {
|
|
7
|
+
readOnly: false;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
export default meta;
|
|
11
|
+
type Story = StoryObj<typeof meta>;
|
|
12
|
+
export declare const Empty: Story;
|
|
13
|
+
export declare const Default: Story;
|
|
14
|
+
export declare const ValueAndLabel: Story;
|
|
15
|
+
export declare const Full: Story;
|
|
16
|
+
export declare const Error: Story;
|
|
17
|
+
export declare const ErrorColor: Story;
|
|
18
|
+
export declare const DifferentColors: Story;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { SelectProps as MuiSelectProps } from '@mui/material';
|
|
3
|
+
export interface ErkSmartSelectProps extends Omit<MuiSelectProps, 'ref' | 'onInvalid'> {
|
|
4
|
+
/** Currently selected value */
|
|
5
|
+
value?: any;
|
|
6
|
+
/** The array of options to display */
|
|
7
|
+
options?: any[];
|
|
8
|
+
/** If the input is loading */
|
|
9
|
+
loading?: boolean;
|
|
10
|
+
/** function called when value changes */
|
|
11
|
+
onChange?: (value: any) => void;
|
|
12
|
+
/** Strig to place in the label */
|
|
13
|
+
label: string;
|
|
14
|
+
/** The helper Text to display */
|
|
15
|
+
helperText?: string;
|
|
16
|
+
/** The icon to display */
|
|
17
|
+
IconComponent?: React.ElementType;
|
|
18
|
+
/** If the options are searchable */
|
|
19
|
+
searchable?: boolean;
|
|
20
|
+
/** Function to determine the currently selected option */
|
|
21
|
+
getOptionSelected?: (option: any, value: any) => boolean;
|
|
22
|
+
/** Function to determine the current value in string format */
|
|
23
|
+
getValueString?: (value: any) => string;
|
|
24
|
+
/** If input is readOnly */
|
|
25
|
+
readOnly?: boolean;
|
|
26
|
+
onFocus?: React.FocusEventHandler;
|
|
27
|
+
}
|
|
28
|
+
export default function ErkSmartSelect({ options, value, onChange, label, getValueString, loading, getOptionSelected, IconComponent, disabled, readOnly, searchable, inputRef, ...others }: ErkSmartSelectProps): JSX.Element;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react';
|
|
2
|
+
import ErkSmartSelect from './ErkSmartSelect';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
component: typeof ErkSmartSelect;
|
|
5
|
+
tags: string[];
|
|
6
|
+
args: {
|
|
7
|
+
searchable: false;
|
|
8
|
+
readOnly: false;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
export default meta;
|
|
12
|
+
type Story = StoryObj<typeof meta>;
|
|
13
|
+
export declare const Empty: Story;
|
|
14
|
+
export declare const Default: Story;
|
|
15
|
+
export declare const Focused: Story;
|
|
16
|
+
export declare const FocusedSearchable: Story;
|
|
17
|
+
export declare const SearchableWithOptions: Story;
|
|
18
|
+
export declare const SearchableWithSearchAndOptions: Story;
|
|
19
|
+
export declare const Loading: Story;
|
|
20
|
+
export declare const LoadingOpened: Story;
|
|
21
|
+
export declare const SearchableLoadingOpened: Story;
|
|
22
|
+
export declare const WithValueandLabel: Story;
|
|
23
|
+
export declare const Full: Story;
|
|
24
|
+
export declare const Error: Story;
|
|
25
|
+
export declare const ErrorColor: Story;
|
|
26
|
+
export declare const DifferentColors: Story;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { OutlinedTextFieldProps as MuiTextFieldProps } from '@mui/material';
|
|
2
|
+
import React, { CSSProperties } from 'react';
|
|
3
|
+
interface StyleProps {
|
|
4
|
+
padding?: CSSProperties['padding'];
|
|
5
|
+
readOnly?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare const StyledTextField: import("@emotion/styled").StyledComponent<{
|
|
8
|
+
variant?: import("@mui/material").TextFieldVariants | undefined;
|
|
9
|
+
} & Omit<import("@mui/material").FilledTextFieldProps | MuiTextFieldProps | import("@mui/material").StandardTextFieldProps, "variant"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & Omit<ErkTextFieldProps, "onChange"> & StyleProps, {}, {}>;
|
|
10
|
+
export type ErkTextFieldSlotProps = Omit<ErkTextFieldProps, 'value' | 'onChange'>;
|
|
11
|
+
export interface ErkTextFieldProps extends Omit<MuiTextFieldProps, 'variant' | 'onChange'>, StyleProps {
|
|
12
|
+
/** The value of the textfield */
|
|
13
|
+
value?: string;
|
|
14
|
+
onChange?: (value: string) => void;
|
|
15
|
+
/** The icon to display */
|
|
16
|
+
IconComponent?: React.ElementType;
|
|
17
|
+
/** The max length of the string */
|
|
18
|
+
maxLength?: number;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Generic textfield with apps designs. Is class due to the use in the react-hook-forms library
|
|
22
|
+
*/
|
|
23
|
+
declare class ErkTextField extends React.Component<ErkTextFieldProps> {
|
|
24
|
+
render(): JSX.Element;
|
|
25
|
+
}
|
|
26
|
+
export default ErkTextField;
|
|
@@ -5,6 +5,7 @@ import { useAppSelector } from '../../hooks';
|
|
|
5
5
|
export const StyledTextField = styled(MuiTextField)(({ theme, padding = '6px 12px', ...props }) => ({
|
|
6
6
|
borderRadius: 10,
|
|
7
7
|
opacity: props.disabled ? 0.5 : 1,
|
|
8
|
+
backgroundColor: theme.palette.stepBackgroundColor.default,
|
|
8
9
|
'& input, textarea': {
|
|
9
10
|
cursor: props.disabled || props.readOnly ? 'default' : 'text',
|
|
10
11
|
padding,
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react';
|
|
2
|
+
import ErkTextField from './ErkTextField';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
component: typeof ErkTextField;
|
|
5
|
+
tags: string[];
|
|
6
|
+
args: {
|
|
7
|
+
disabled: false;
|
|
8
|
+
multiline: false;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
export default meta;
|
|
12
|
+
type Story = StoryObj<typeof meta>;
|
|
13
|
+
export declare const Empty: Story;
|
|
14
|
+
export declare const EmptyLabel: Story;
|
|
15
|
+
export declare const Default: Story;
|
|
16
|
+
export declare const Focused: Story;
|
|
17
|
+
export declare const FocusedNoLabel: Story;
|
|
18
|
+
export declare const WithValue: Story;
|
|
19
|
+
export declare const Multiline: Story;
|
|
20
|
+
export declare const WithHelperText: Story;
|
|
21
|
+
export declare const WithValueandLabel: Story;
|
|
22
|
+
export declare const WithMaxLength: Story;
|
|
23
|
+
export declare const Full: Story;
|
|
24
|
+
export declare const Error: Story;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { SelectorStyleProps } from '../ErkSelect/ErkSelect';
|
|
2
|
+
import { Time } from '../../@Types/Time';
|
|
3
|
+
import { SelectProps as MuiSelectProps } from '@mui/material';
|
|
4
|
+
import React from 'react';
|
|
5
|
+
interface ErkTimePickerProps extends Omit<MuiSelectProps, 'color' | 'onChange'>, SelectorStyleProps {
|
|
6
|
+
/** Currently selected value */
|
|
7
|
+
value: Time | undefined;
|
|
8
|
+
/** function called when value changes */
|
|
9
|
+
onChange?: (time: Time) => void;
|
|
10
|
+
/** Strig to place in the label */
|
|
11
|
+
label: string;
|
|
12
|
+
/** The helper Text to display */
|
|
13
|
+
helperText?: string | null;
|
|
14
|
+
pickDays?: boolean;
|
|
15
|
+
minDays?: number;
|
|
16
|
+
maxDays?: number;
|
|
17
|
+
pickHours?: boolean;
|
|
18
|
+
minHours?: number;
|
|
19
|
+
maxHours?: number;
|
|
20
|
+
pickMinutes?: boolean;
|
|
21
|
+
minMinutes?: number;
|
|
22
|
+
maxMinutes?: number;
|
|
23
|
+
working?: boolean;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Generic textfield with apps designs. Is class due to the use in the react-hook-forms library
|
|
27
|
+
*/
|
|
28
|
+
declare class ErkTimePicker extends React.Component<ErkTimePickerProps> {
|
|
29
|
+
render(): JSX.Element;
|
|
30
|
+
}
|
|
31
|
+
export default ErkTimePicker;
|
|
@@ -33,11 +33,7 @@ function InputIcon({ icon, fill, ...others }) {
|
|
|
33
33
|
width: 23,
|
|
34
34
|
}, fill: fill, ...others }));
|
|
35
35
|
case IconTypes.PERSON:
|
|
36
|
-
return
|
|
37
|
-
display: 'flex',
|
|
38
|
-
height: 23,
|
|
39
|
-
width: 23,
|
|
40
|
-
}, fill: fill, ...others }));
|
|
36
|
+
return _jsx(PersonIcon, { fill: fill, ...others });
|
|
41
37
|
case IconTypes.LEAK:
|
|
42
38
|
return (_jsx(LeakIcon, { style: {
|
|
43
39
|
display: 'flex',
|
|
@@ -70,11 +66,7 @@ function InputIcon({ icon, fill, ...others }) {
|
|
|
70
66
|
width: 24,
|
|
71
67
|
}, fill: fill, ...others }));
|
|
72
68
|
case IconTypes.CALENDAR:
|
|
73
|
-
return
|
|
74
|
-
display: 'flex',
|
|
75
|
-
height: 23,
|
|
76
|
-
width: 23,
|
|
77
|
-
}, fill: fill, ...others }));
|
|
69
|
+
return _jsx(CalendarIcon, { fill: fill, ...others });
|
|
78
70
|
case IconTypes.LOCATION:
|
|
79
71
|
return (_jsx(LocationIcon, { style: {
|
|
80
72
|
display: 'flex',
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
interface LoaderProps {
|
|
2
|
+
/** The color of the loader */
|
|
3
|
+
color?: string;
|
|
4
|
+
/** If the loader should show a curtain behind it */
|
|
5
|
+
curtain?: boolean;
|
|
6
|
+
/** The zIndex of the loader */
|
|
7
|
+
zIndex?: number;
|
|
8
|
+
/** The size of the loader */
|
|
9
|
+
size?: number;
|
|
10
|
+
/** The position of the loader */
|
|
11
|
+
position?: any;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Generic Loader Component with optional curtain.
|
|
15
|
+
*/
|
|
16
|
+
declare function Loader({ color, curtain, zIndex, size, position, }: LoaderProps): JSX.Element;
|
|
17
|
+
export default Loader;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react';
|
|
2
|
+
import Navbar from './Navbar';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
component: typeof Navbar;
|
|
5
|
+
tags: string[];
|
|
6
|
+
args: {
|
|
7
|
+
logo: string;
|
|
8
|
+
color: string;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
export default meta;
|
|
12
|
+
type Story = StoryObj<typeof meta>;
|
|
13
|
+
export declare const Default: Story;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { RefCallBack } from 'react-hook-form';
|
|
2
|
+
import { RatingTypes } from '../../constants/FormStepTypes';
|
|
3
|
+
export interface RatingProps {
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
isMobile?: boolean;
|
|
6
|
+
value?: number | null;
|
|
7
|
+
onChange: (value: number | null) => void;
|
|
8
|
+
inputRef?: React.RefObject<HTMLInputElement> | RefCallBack;
|
|
9
|
+
}
|
|
10
|
+
declare function Rating({ type, ...others }: RatingProps & {
|
|
11
|
+
type: RatingTypes;
|
|
12
|
+
}): JSX.Element;
|
|
13
|
+
export default Rating;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react';
|
|
2
|
+
import Rating from './Rating';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
component: typeof Rating;
|
|
5
|
+
tags: string[];
|
|
6
|
+
args: {};
|
|
7
|
+
};
|
|
8
|
+
export default meta;
|
|
9
|
+
type Story = StoryObj<typeof meta>;
|
|
10
|
+
export declare const ScaleRating: Story;
|
|
11
|
+
export declare const ScaleRatingWidthValue: Story;
|
|
12
|
+
export declare const LikeRating: Story;
|
|
13
|
+
export declare const LikeRatingWithValue: Story;
|
|
14
|
+
export declare const SatisfactionRating: Story;
|
|
15
|
+
export declare const SatisfactionRatingWidthValue: Story;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { FormStyle } from '../@Types/Form';
|
|
2
|
+
import type { PayloadAction } from '@reduxjs/toolkit';
|
|
3
|
+
import { SiteState } from './SiteSlice';
|
|
4
|
+
import { EurekaDraft } from '../@Types/Draft/Draft';
|
|
5
|
+
import { CountryCode } from 'libphonenumber-js';
|
|
6
|
+
export interface GlobalState {
|
|
7
|
+
idOrganization: string;
|
|
8
|
+
countryCode: CountryCode;
|
|
9
|
+
formStyle: FormStyle;
|
|
10
|
+
confirmation: {
|
|
11
|
+
confirmationMessage: EurekaDraft;
|
|
12
|
+
showLink: boolean;
|
|
13
|
+
};
|
|
14
|
+
/** If the formsteps can be edited (For internal) */
|
|
15
|
+
editable: boolean;
|
|
16
|
+
preview: boolean;
|
|
17
|
+
postview: boolean;
|
|
18
|
+
partial: boolean;
|
|
19
|
+
internal: boolean;
|
|
20
|
+
loaded: boolean;
|
|
21
|
+
}
|
|
22
|
+
export declare const GlobalSlice: import("@reduxjs/toolkit").Slice<GlobalState, {
|
|
23
|
+
reset: (state: import("immer").WritableDraft<GlobalState>, action: PayloadAction<Omit<GlobalState, "loaded"> & SiteState>) => {
|
|
24
|
+
loaded: true;
|
|
25
|
+
editable: boolean;
|
|
26
|
+
partial: boolean;
|
|
27
|
+
formStyle: FormStyle;
|
|
28
|
+
postview: boolean;
|
|
29
|
+
preview: boolean;
|
|
30
|
+
idOrganization: string;
|
|
31
|
+
countryCode: CountryCode;
|
|
32
|
+
confirmation: {
|
|
33
|
+
confirmationMessage: EurekaDraft;
|
|
34
|
+
showLink: boolean;
|
|
35
|
+
};
|
|
36
|
+
internal: boolean;
|
|
37
|
+
dependencies: import("../Form/Form").DependencyStore;
|
|
38
|
+
values: import("./SiteSlice").ValuesStore;
|
|
39
|
+
idCurrentSection: string | null;
|
|
40
|
+
previousSections: string[];
|
|
41
|
+
nextSections: string[];
|
|
42
|
+
focusStep?: string;
|
|
43
|
+
};
|
|
44
|
+
}, "global", "global", import("@reduxjs/toolkit").SliceSelectors<GlobalState>>;
|
|
45
|
+
export declare const reset: import("@reduxjs/toolkit").ActionCreatorWithPayload<Omit<GlobalState, "loaded"> & SiteState, "global/reset">;
|
|
46
|
+
export default GlobalSlice;
|