@erpsquad/common 1.8.120 → 1.8.122
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/_virtual/index/index.esm10.js +3 -3
- package/dist/_virtual/index/index.esm2.js +3 -3
- package/dist/_virtual/index/index.esm3.js +3 -3
- package/dist/_virtual/index/index.esm4.js +3 -3
- package/dist/_virtual/index/index.esm5.js +3 -3
- package/dist/_virtual/index/index.esm6.js +3 -3
- package/dist/_virtual/index/index.esm7.js +3 -3
- package/dist/_virtual/index/index.esm8.js +3 -3
- package/dist/_virtual/index/index.esm9.js +3 -3
- package/dist/_virtual/index/index10.js +1 -1
- package/dist/_virtual/index/index2.js +1 -1
- package/dist/_virtual/index/index3.js +1 -1
- package/dist/_virtual/index/index4.js +1 -1
- package/dist/_virtual/index/index5.js +1 -1
- package/dist/_virtual/index/index6.js +1 -1
- package/dist/_virtual/index/index7.js +1 -1
- package/dist/_virtual/index/index8.js +1 -1
- package/dist/_virtual/index/index9.js +1 -1
- package/dist/components/accordion/accordion.d.ts +1 -1
- package/dist/components/action-bar/action-bar.d.ts +1 -1
- package/dist/components/checkbox/checkbox.d.ts +1 -1
- package/dist/components/date-picker/date-picker.d.ts +1 -1
- package/dist/components/footer/footer.d.ts +1 -1
- package/dist/components/form-control/form-builder/form-builder-element/media.d.ts +1 -1
- package/dist/components/form-control/form-builder/form-builder-element/phone.d.ts +1 -1
- package/dist/components/form-control/form-builder/form-builder-element/select.d.ts +1 -1
- package/dist/components/form-control/form-builder/form-builder-element/text.d.ts +1 -1
- package/dist/components/form-control/form-builder/form-builder-element/time.d.ts +1 -1
- package/dist/components/form-control/form-parser/form-parser/index.esm.js +11 -3
- package/dist/components/form-control/form-parser/form-parser/index.esm.js.map +1 -1
- package/dist/components/form-control/form-parser/form-parser/index.js +4 -4
- package/dist/components/form-control/form-parser/form-parser/index.js.map +1 -1
- package/dist/components/form-control/form-parser/form-parser.d.ts +0 -1
- package/dist/components/form-control/form-parser/form-switcher.d.ts +1 -1
- package/dist/components/icons/action-arrow.d.ts +3 -3
- package/dist/components/icons/add-circle.d.ts +3 -3
- package/dist/components/icons/arrow-bidirectional.d.ts +3 -3
- package/dist/components/icons/arrow-circle-down.d.ts +3 -3
- package/dist/components/icons/arrow-down-three.d.ts +3 -3
- package/dist/components/icons/arrow-down-two.d.ts +3 -3
- package/dist/components/icons/arrow-down.d.ts +3 -3
- package/dist/components/icons/arrow-up-down.d.ts +3 -3
- package/dist/components/icons/arrow-up-two.d.ts +3 -3
- package/dist/components/icons/assignments.d.ts +3 -3
- package/dist/components/icons/blank-circle.d.ts +3 -3
- package/dist/components/icons/block-filled.d.ts +3 -3
- package/dist/components/icons/calendar-add.d.ts +3 -3
- package/dist/components/icons/calendar.d.ts +3 -3
- package/dist/components/icons/checkbox-square.d.ts +3 -3
- package/dist/components/icons/circular-arrow-setting.d.ts +3 -3
- package/dist/components/icons/clock.d.ts +3 -3
- package/dist/components/icons/close.d.ts +3 -3
- package/dist/components/icons/coin-outline.d.ts +3 -3
- package/dist/components/icons/copy.d.ts +3 -3
- package/dist/components/icons/coupon.d.ts +3 -3
- package/dist/components/icons/cross-hire.d.ts +3 -3
- package/dist/components/icons/custom-styled-icon.d.ts +3 -3
- package/dist/components/icons/dashboard.d.ts +3 -3
- package/dist/components/icons/document-download.d.ts +3 -3
- package/dist/components/icons/document.d.ts +3 -3
- package/dist/components/icons/dollar-circle-filled.d.ts +3 -3
- package/dist/components/icons/dollar-circle.d.ts +3 -3
- package/dist/components/icons/edit.d.ts +3 -3
- package/dist/components/icons/email.d.ts +3 -3
- package/dist/components/icons/export.d.ts +3 -3
- package/dist/components/icons/eye-off.d.ts +3 -3
- package/dist/components/icons/eye-plus-circle.d.ts +3 -3
- package/dist/components/icons/eye.d.ts +3 -3
- package/dist/components/icons/filled-circle.d.ts +3 -3
- package/dist/components/icons/filter-remove.d.ts +3 -3
- package/dist/components/icons/filter.d.ts +3 -3
- package/dist/components/icons/folder-save.d.ts +3 -3
- package/dist/components/icons/grid.d.ts +3 -3
- package/dist/components/icons/hashtag.d.ts +3 -3
- package/dist/components/icons/image.d.ts +3 -3
- package/dist/components/icons/import.d.ts +3 -3
- package/dist/components/icons/info-circle.d.ts +3 -3
- package/dist/components/icons/info.d.ts +3 -3
- package/dist/components/icons/link-horizontal.d.ts +3 -3
- package/dist/components/icons/link.d.ts +3 -3
- package/dist/components/icons/location.d.ts +3 -3
- package/dist/components/icons/lowest-lead-time.d.ts +3 -3
- package/dist/components/icons/lowest-min-qty.d.ts +3 -3
- package/dist/components/icons/lowest-price.d.ts +3 -3
- package/dist/components/icons/more.d.ts +3 -3
- package/dist/components/icons/notification.d.ts +3 -3
- package/dist/components/icons/paper-clip.d.ts +3 -3
- package/dist/components/icons/paragraph.d.ts +3 -3
- package/dist/components/icons/payment-request.d.ts +3 -3
- package/dist/components/icons/phone.d.ts +3 -3
- package/dist/components/icons/printer.d.ts +3 -3
- package/dist/components/icons/process-calendar.d.ts +3 -3
- package/dist/components/icons/promotion.d.ts +3 -3
- package/dist/components/icons/radio-button.d.ts +3 -3
- package/dist/components/icons/receipt-filled.d.ts +3 -3
- package/dist/components/icons/receipt-outline.d.ts +3 -3
- package/dist/components/icons/receipt.d.ts +3 -3
- package/dist/components/icons/refresh-icon.d.ts +3 -3
- package/dist/components/icons/replace.d.ts +3 -3
- package/dist/components/icons/save.d.ts +3 -3
- package/dist/components/icons/search-status.d.ts +3 -3
- package/dist/components/icons/search.d.ts +3 -3
- package/dist/components/icons/settings-fallback.d.ts +3 -3
- package/dist/components/icons/sort-arrow-icon.d.ts +3 -3
- package/dist/components/icons/stacked-layer.d.ts +3 -3
- package/dist/components/icons/start-filled.d.ts +3 -3
- package/dist/components/icons/three-dot-icon.d.ts +3 -3
- package/dist/components/icons/tick-circle-filled.d.ts +3 -3
- package/dist/components/icons/tick-circle.d.ts +3 -3
- package/dist/components/icons/tick-octagon.d.ts +3 -3
- package/dist/components/icons/tick.d.ts +3 -3
- package/dist/components/icons/toggle-switch.d.ts +3 -3
- package/dist/components/icons/trash.d.ts +3 -3
- package/dist/components/icons/wave.d.ts +3 -3
- package/dist/components/icons/with-out-tick-octagon.d.ts +3 -3
- package/dist/components/icons/work-centre.d.ts +3 -3
- package/dist/components/index.esm.js +2 -2
- package/dist/components/index.js +1 -1
- package/dist/components/location-select.d.ts +1 -1
- package/dist/components/material-editable-table/material-editable-table.d.ts +1 -1
- package/dist/components/material-table/material-table.d.ts +1 -1
- package/dist/components/phone-input/phone-input.d.ts +1 -1
- package/dist/components/radio/radio.d.ts +1 -1
- package/dist/components/select/select.d.ts +1 -1
- package/dist/components/switches/android-12-switch.d.ts +3 -1
- package/dist/components/text-field/text-field.d.ts +1 -1
- package/dist/components/time-picker/time-picker.d.ts +1 -1
- package/dist/components/upload-media/upload-media.d.ts +1 -1
- package/dist/hooks/useUomFieldUpdater/index.esm.js +1 -1
- package/dist/hooks/useUomFieldUpdater/index.esm.js.map +1 -1
- package/dist/hooks/useUomFieldUpdater/index.js +1 -1
- package/dist/hooks/useUomFieldUpdater/index.js.map +1 -1
- package/dist/index.esm.js +75 -75
- package/dist/index.js +1 -1
- package/dist/node_modules/@mui/icons-material/utils/createSvgIcon/index.esm.js +1 -1
- package/dist/node_modules/@mui/icons-material/utils/createSvgIcon/index.js +1 -1
- package/dist/node_modules/@mui/icons-material/utils/createSvgIcon/index.js.map +1 -1
- package/dist/node_modules/@mui/system/colorManipulator/index.esm.js +2 -2
- package/dist/node_modules/@mui/system/colorManipulator/index.js +1 -1
- package/dist/node_modules/@mui/system/colorManipulator/index.js.map +1 -1
- package/dist/node_modules/@mui/system/createStyled/index.esm.js +6 -6
- package/dist/node_modules/@mui/system/createStyled/index.js +1 -1
- package/dist/node_modules/@mui/system/useThemeWithoutDefault/index.esm.js +1 -1
- package/dist/node_modules/@mui/system/useThemeWithoutDefault/index.js +1 -1
- package/dist/src/components/accordion/accordion.d.ts +1 -1
- package/dist/src/components/action-bar/action-bar.d.ts +1 -1
- package/dist/src/components/checkbox/checkbox.d.ts +1 -1
- package/dist/src/components/date-picker/date-picker.d.ts +1 -1
- package/dist/src/components/footer/footer.d.ts +1 -1
- package/dist/src/components/form-control/form-builder/form-builder-element/media.d.ts +1 -1
- package/dist/src/components/form-control/form-builder/form-builder-element/phone.d.ts +1 -1
- package/dist/src/components/form-control/form-builder/form-builder-element/select.d.ts +1 -1
- package/dist/src/components/form-control/form-builder/form-builder-element/text.d.ts +1 -1
- package/dist/src/components/form-control/form-builder/form-builder-element/time.d.ts +1 -1
- package/dist/src/components/form-control/form-parser/form-parser.d.ts +0 -1
- package/dist/src/components/form-control/form-parser/form-switcher.d.ts +1 -1
- package/dist/src/components/icons/action-arrow.d.ts +3 -3
- package/dist/src/components/icons/add-circle.d.ts +3 -3
- package/dist/src/components/icons/arrow-bidirectional.d.ts +3 -3
- package/dist/src/components/icons/arrow-circle-down.d.ts +3 -3
- package/dist/src/components/icons/arrow-down-three.d.ts +3 -3
- package/dist/src/components/icons/arrow-down-two.d.ts +3 -3
- package/dist/src/components/icons/arrow-down.d.ts +3 -3
- package/dist/src/components/icons/arrow-up-down.d.ts +3 -3
- package/dist/src/components/icons/arrow-up-two.d.ts +3 -3
- package/dist/src/components/icons/assignments.d.ts +3 -3
- package/dist/src/components/icons/blank-circle.d.ts +3 -3
- package/dist/src/components/icons/block-filled.d.ts +3 -3
- package/dist/src/components/icons/calendar-add.d.ts +3 -3
- package/dist/src/components/icons/calendar.d.ts +3 -3
- package/dist/src/components/icons/checkbox-square.d.ts +3 -3
- package/dist/src/components/icons/circular-arrow-setting.d.ts +3 -3
- package/dist/src/components/icons/clock.d.ts +3 -3
- package/dist/src/components/icons/close.d.ts +3 -3
- package/dist/src/components/icons/coin-outline.d.ts +3 -3
- package/dist/src/components/icons/copy.d.ts +3 -3
- package/dist/src/components/icons/coupon.d.ts +3 -3
- package/dist/src/components/icons/cross-hire.d.ts +3 -3
- package/dist/src/components/icons/custom-styled-icon.d.ts +3 -3
- package/dist/src/components/icons/dashboard.d.ts +3 -3
- package/dist/src/components/icons/document-download.d.ts +3 -3
- package/dist/src/components/icons/document.d.ts +3 -3
- package/dist/src/components/icons/dollar-circle-filled.d.ts +3 -3
- package/dist/src/components/icons/dollar-circle.d.ts +3 -3
- package/dist/src/components/icons/edit.d.ts +3 -3
- package/dist/src/components/icons/email.d.ts +3 -3
- package/dist/src/components/icons/export.d.ts +3 -3
- package/dist/src/components/icons/eye-off.d.ts +3 -3
- package/dist/src/components/icons/eye-plus-circle.d.ts +3 -3
- package/dist/src/components/icons/eye.d.ts +3 -3
- package/dist/src/components/icons/filled-circle.d.ts +3 -3
- package/dist/src/components/icons/filter-remove.d.ts +3 -3
- package/dist/src/components/icons/filter.d.ts +3 -3
- package/dist/src/components/icons/folder-save.d.ts +3 -3
- package/dist/src/components/icons/grid.d.ts +3 -3
- package/dist/src/components/icons/hashtag.d.ts +3 -3
- package/dist/src/components/icons/image.d.ts +3 -3
- package/dist/src/components/icons/import.d.ts +3 -3
- package/dist/src/components/icons/info-circle.d.ts +3 -3
- package/dist/src/components/icons/info.d.ts +3 -3
- package/dist/src/components/icons/link-horizontal.d.ts +3 -3
- package/dist/src/components/icons/link.d.ts +3 -3
- package/dist/src/components/icons/location.d.ts +3 -3
- package/dist/src/components/icons/lowest-lead-time.d.ts +3 -3
- package/dist/src/components/icons/lowest-min-qty.d.ts +3 -3
- package/dist/src/components/icons/lowest-price.d.ts +3 -3
- package/dist/src/components/icons/more.d.ts +3 -3
- package/dist/src/components/icons/notification.d.ts +3 -3
- package/dist/src/components/icons/paper-clip.d.ts +3 -3
- package/dist/src/components/icons/paragraph.d.ts +3 -3
- package/dist/src/components/icons/payment-request.d.ts +3 -3
- package/dist/src/components/icons/phone.d.ts +3 -3
- package/dist/src/components/icons/printer.d.ts +3 -3
- package/dist/src/components/icons/process-calendar.d.ts +3 -3
- package/dist/src/components/icons/promotion.d.ts +3 -3
- package/dist/src/components/icons/radio-button.d.ts +3 -3
- package/dist/src/components/icons/receipt-filled.d.ts +3 -3
- package/dist/src/components/icons/receipt-outline.d.ts +3 -3
- package/dist/src/components/icons/receipt.d.ts +3 -3
- package/dist/src/components/icons/refresh-icon.d.ts +3 -3
- package/dist/src/components/icons/replace.d.ts +3 -3
- package/dist/src/components/icons/save.d.ts +3 -3
- package/dist/src/components/icons/search-status.d.ts +3 -3
- package/dist/src/components/icons/search.d.ts +3 -3
- package/dist/src/components/icons/settings-fallback.d.ts +3 -3
- package/dist/src/components/icons/sort-arrow-icon.d.ts +3 -3
- package/dist/src/components/icons/stacked-layer.d.ts +3 -3
- package/dist/src/components/icons/start-filled.d.ts +3 -3
- package/dist/src/components/icons/three-dot-icon.d.ts +3 -3
- package/dist/src/components/icons/tick-circle-filled.d.ts +3 -3
- package/dist/src/components/icons/tick-circle.d.ts +3 -3
- package/dist/src/components/icons/tick-octagon.d.ts +3 -3
- package/dist/src/components/icons/tick.d.ts +3 -3
- package/dist/src/components/icons/toggle-switch.d.ts +3 -3
- package/dist/src/components/icons/trash.d.ts +3 -3
- package/dist/src/components/icons/wave.d.ts +3 -3
- package/dist/src/components/icons/with-out-tick-octagon.d.ts +3 -3
- package/dist/src/components/icons/work-centre.d.ts +3 -3
- package/dist/src/components/location-select.d.ts +1 -1
- package/dist/src/components/material-editable-table/material-editable-table.d.ts +1 -1
- package/dist/src/components/material-table/material-table.d.ts +1 -1
- package/dist/src/components/phone-input/phone-input.d.ts +1 -1
- package/dist/src/components/radio/radio.d.ts +1 -1
- package/dist/src/components/select/select.d.ts +1 -1
- package/dist/src/components/switches/android-12-switch.d.ts +3 -1
- package/dist/src/components/text-field/text-field.d.ts +1 -1
- package/dist/src/components/time-picker/time-picker.d.ts +1 -1
- package/dist/src/components/upload-media/upload-media.d.ts +1 -1
- package/dist/src/utils/api.d.ts +3 -9
- package/dist/src/utils/common-utility.d.ts +1 -1
- package/dist/src/utils/common.d.ts +4 -22
- package/dist/src/utils/form-builder-deconversion.d.ts +0 -43
- package/dist/style.css +72 -72
- package/dist/utils/api/index.esm.js +25 -22
- package/dist/utils/api/index.esm.js.map +1 -1
- package/dist/utils/api/index.js +1 -1
- package/dist/utils/api/index.js.map +1 -1
- package/dist/utils/api.d.ts +3 -9
- package/dist/utils/common-utility.d.ts +1 -1
- package/dist/utils/common.d.ts +4 -22
- package/dist/utils/constant/index.esm.js +1 -1
- package/dist/utils/constant/index.esm.js.map +1 -1
- package/dist/utils/constant/index.js +1 -1
- package/dist/utils/constant/index.js.map +1 -1
- package/dist/utils/form-builder-deconversion/index.esm.js +5 -4
- package/dist/utils/form-builder-deconversion/index.esm.js.map +1 -1
- package/dist/utils/form-builder-deconversion/index.js +1 -1
- package/dist/utils/form-builder-deconversion/index.js.map +1 -1
- package/dist/utils/form-builder-deconversion.d.ts +0 -43
- package/dist/utils/index.esm.js +4 -4
- package/dist/utils/index.js +1 -1
- package/dist/views/form-builder/custom-form/index.esm.js +1 -1
- package/dist/views/form-builder/custom-form/index.js +17 -17
- package/dist/views/form-builder/custom-form/index.js.map +1 -1
- package/dist/views/form-builder/utils/common/index.esm.js +1 -1
- package/dist/views/form-builder/utils/common/index.js +1 -1
- package/dist/views/form-builder/utils/common/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../src/components/form-control/form-parser/form-parser.tsx"],"sourcesContent":["import { FormProvider, useForm, useWatch } from \"react-hook-form\";\n// import { useLocation } from \"react-router-dom\";\nimport { Box } from \"@mui/material\";\n\n// import FullScreenLayout from \"../../../layout/fullScreen/fullScreen\";\n\nimport { useState, useEffect, useCallback } from \"react\";\nimport images from \"../../../assets/images\";\nimport \"./form-parser.scss\";\nimport TabBar from \"../../tabs/tabs\";\nimport formBuilderDeConversion from \"../../../utils/form-builder-deconversion\";\nimport { yupResolver } from \"@hookform/resolvers/yup\";\nimport * as yup from \"yup\";\nimport dayjs from \"dayjs\";\nimport { SECTION_TYPES } from '../../../utils/constant';\nimport { CountryData } from 'react-phone-input-2';\nimport Alert from '../../alert/alert';\nimport _ from \"lodash\";\nimport { useTranslation } from \"react-i18next\";\nimport FormSection from \"./form-section\";\nconst validationReducer = (validations: any, validation: any, field: any, translationFn: any) => {\n switch (validation.type) {\n case \"required\":\n return (field.field_properties?.is_multiselect ? validations.required(translationFn(validation.msg_en)).min(1, translationFn(validation.msg_en)) : validation.value\n ? validations.required(translationFn(validation.msg_en)).test('not-empty', translationFn(validation.msg_en), value => typeof value === 'string' ? value && value?.trim()?.length > 0 : true): validations.nullable());\n case \"min_length\":\n return validations.min(validation.value, translationFn(validation.msg_en));\n case \"max_length\":\n return validations.max(validation.value, translationFn(validation.msg_en));\n case \"min_val\":\n return validations.min(validation.value, translationFn(validation.msg_en));\n case \"max_val\":\n return validations.max(validation.value, translationFn(validation.msg_en));\n case \"postive_number\":\n return validations.test('is-positive-number', translationFn(validation.msg_en), (value) => value >= 0)\n case 'email':\n return validations.email(validation.msg_en);\n case \"no_special_char\":\n return validations.test(\n \"no-special-char\",\n translationFn(validation.msg_en),\n value =>\n typeof value === \"string\"\n ? /^[^.\\-\\W_]+$/u.test(value) // allow letters/digits only\n : true\n );\n case \"when\":\n return validations.when(validation.relation, {\n is: (val: any) => val === validation.values,\n then: () => validation?.thenValidations?.reduce(\n (validations: any, validation: any) => validationReducer(validations, validation, field, translationFn),\n validations\n ) || validations,\n otherwise: () => validation?.otherWiseValidations?.reduce(\n (validations: any, validation: any) => validationReducer(validations, validation, field, translationFn),\n validations\n ) || validations,\n });\n // Add more cases for other validation types as needed\n default:\n return validations;\n }\n}\n\nconst FormParser = ({\n data,\n defaultValues,\n handleFormSubmit,\n fieldArrayName,\n mode,\n displayAvtar = false,\n onTableAddClick,\n handleFormValues,\n getFormMethods,\n setFields,\n onSelectFooterClick,\n setActiveTabValue , \n activeTab = 0,\n recieveTabDataLenght,\n recieveIsValidForm,\n activeTabs,\n onTableCellChange,\n containerStyles = undefined,\n isButton = true,\n getSelectedData,\n refreshOptions=false,\n onBlur, \n }: any) => {\n\n const { t } = useTranslation();\n\n function convertToNestedObject(dotNotationString: string, field: any, existingObject: any = {}) {\n const keys = dotNotationString.split('.');\n let currentLevel = existingObject;\n\n keys.forEach((key, index) => {\n if (index === keys.length - 1) {\n if (!currentLevel[key]) {\n const fieldValidations = field.validation.reduce(\n (validations: any, validation: any) => {\n switch (validation.type) {\n case \"required\":\n return validation.value\n ? validations.required(t(validation.msg_en)).test('not-empty', t(validation.msg_en), value => typeof value === 'string' ? value && value?.trim()?.length > 0 : true)\n : (field.field_properties?.is_multiselect ? validations.min(1, t(validation.msg_en)) : validations.nullable());\n case \"min_length\":\n return validations.min(validation.value, t(validation.msg_en));\n case \"max_length\":\n return validations.max(validation.value, t(validation.msg_en));\n case \"min_val\":\n return validations.min(validation.value, t(validation.msg_en));\n case \"max_val\":\n return validations.max(validation.value, t(validation.msg_en));\n // Add more cases for other validation types as needed\n default:\n return validations;\n }\n },\n getValidationType(field)\n );\n currentLevel[key] = fieldValidations;\n } else if (typeof currentLevel[key] !== 'object' || Array.isArray(currentLevel[key])) {\n throw new Error(`Conflict: The key \"${key}\" already exists and is not an object.`);\n }\n } else {\n if (!currentLevel[key]) {\n currentLevel[key] = {};\n } else if (typeof currentLevel[key] !== 'object' || Array.isArray(currentLevel[key])) {\n throw new Error(`Conflict: The key \"${key}\" already exists and is not an object.`);\n }\n currentLevel = currentLevel[key];\n\n }\n });\n\n return existingObject;\n }\n\n const getValidationType = (field: any) => {\n switch (field.field_type) {\n case 'select':\n return field.field_properties?.is_multiselect\n ? yup.array()\n : yup.string()\n\n case 'number':\n case 'currency':\n return yup.number().transform((value, originalValue) => (originalValue === '' ? undefined : value)).typeError('Please enter valid number').nullable()\n case 'currency_with_amount':\n return yup.number()\n case 'url':\n return yup.string().matches(/^(https?:\\/\\/)?((([a-zA-Z0-9_-]+\\.)+[a-zA-Z]{2,})|localhost)(:\\d{2,5})?(\\/[a-zA-Z0-9#_-]+\\/?)*(\\?[a-zA-Z0-9&=_-]+)?(#\\S+)?$/, { excludeEmptyString: true, message: \"Please enter valid URL.\" })\n\n default:\n return yup.string()\n }\n }\n\n const convertNestedFieldSchemaObject = (nestedFields: any) => {\n const schema: any = {};\n\n for (const key in nestedFields) {\n if (typeof nestedFields[key] === 'object' && !Object.hasOwn(nestedFields[key], 'tests')) {\n schema[key] = yup.object().shape(convertNestedFieldSchemaObject(nestedFields[key]));\n } else {\n schema[key] = nestedFields[key]\n }\n }\n return schema;\n }\n\n\n const generateValidationSchema = (data: any[]) => {\n const yupSchemaObject: any = {};\n let nestedFielvalidations: any = {},\n nestedYupSchemaObj: any = {};\n\n data &&\n data?.forEach((field: any) => {\n let fieldValidations: any;\n if (field.validation && field.validation.length > 0) {\n if (field.name?.includes(\".\")) {\n nestedFielvalidations = convertToNestedObject(field.name, field, nestedFielvalidations);\n } else {\n fieldValidations = field.validation.reduce((validations: any, validation: any) => validationReducer(validations, validation, field, t),\n getValidationType(field)\n );\n yupSchemaObject[field.name] = fieldValidations;\n }\n\n nestedYupSchemaObj = convertNestedFieldSchemaObject(nestedFielvalidations)\n }\n\n });\n\n return yup.object().shape({\n [fieldArrayName]: yup.object().shape({ ...yupSchemaObject, ...nestedYupSchemaObj }),\n });\n };\n\n const {\n control,\n handleSubmit,\n formState: { errors },\n setValue,\n reset,\n getValues,\n watch,\n resetField,\n unregister,\n trigger,\n getFieldState,\n ...rest\n } = useForm({\n ...(defaultValues && typeof defaultValues === 'object' ? { defaultValues } : {}),\n resolver: yupResolver(generateValidationSchema(data)),\n mode: \"all\",\n });\n\n const watchedValues = useWatch({\n control,\n name: fieldArrayName,\n });\n\n // Local States\n const [schema, setSchema] = useState<[]>([]);\n const [tabsData, setTabsData] = useState<any[]>([]);\n const [errorAlert, setErrorAlert] = useState<boolean>(false);\n const [currencyOption, setCurrencyOptions] = useState<string>('');\n const [isTabFormValid, setTabFormValid] = useState<boolean>(false);\n const [validateRequiredFields, setValidRequiredFields] = useState<any[]>([]);\n\n // Local Functions\n const handleTableAddClick = (tableName?: string) => {\n onTableAddClick?.(tableName)\n }\n\n const getSectionData = useCallback((section: any) => {\n const sectionMembers = section?.members?.map((ele: any) => ele) || []\n const values = getValues(fieldArrayName)\n const isFormSwitcher = section.section_type === SECTION_TYPES.FORM_SWITCH_SECTION\n const formSwitcherName =\n section?.form_switcher_name ||\n section?.form_switcher_label?.toLowerCase().split(\" \").join(\"_\");\n const switchForms = section?.switcher_forms?.map((form: any) => ({\n ...form,\n formMembers: sectionMembers.filter(\n (member: any) => member.section_form_id === form.id,\n )\n }));\n const selectedSectionForm =\n values?.[formSwitcherName] ?\n switchForms.find((ele: any) =>\n ele.name === values?.[formSwitcherName]\n ) : {};\n const members = isFormSwitcher ? selectedSectionForm?.formMembers : section?.members\n\n return {\n isFormSwitcher,\n formSwitcherName,\n switchForms,\n selectedSectionForm,\n members,\n values\n }\n }, [fieldArrayName, getValues])\n\n const handleSetCountryCodeField = useCallback((country: CountryData, field: any, fieldArrayName: any, values: any) => {\n const oldVal = values?.[fieldArrayName]?.[field?.country_code_field_name]\n const newVal = `+${country.dialCode}`\n if (\n field?.is_country_code_separate &&\n field?.country_code_field_name &&\n oldVal !== newVal\n ) {\n setValue(\n `${fieldArrayName}.${field?.country_code_field_name}` as never,\n newVal as never\n )\n }\n }, [setValue])\n\n const handleFieldCleanUp = useCallback((switchForms: any) => {\n switchForms.forEach((form: any) => {\n form?.formMembers.forEach((member: any) => {\n const memberName = member?.name || member.label.toLowerCase().split(\" \").join(\"_\")\n const v = _.get(defaultValues, `${fieldArrayName}.${memberName}`, null)\n const newData = data.map((ele: any) => {\n if (member?.section_form_id === ele?.section_form_id) {\n delete ele.value\n }\n return ({\n ...ele,\n ...(v ? {value:v} : {}),\n })\n })\n if(!v) {\n resetField(`${fieldArrayName}.${memberName}` as never)\n unregister(`${fieldArrayName}.${memberName}` as never)\n }\n setFields?.(newData)\n })\n\n })\n }, [data, defaultValues, fieldArrayName, resetField, setFields, unregister])\n\n const createNestedObjectFromDot = useCallback((dotNotationString: string, field: any, existingObject: any = {}) => {\n const keys = dotNotationString.split('.');\n let currentLevel = existingObject;\n\n keys.forEach((key, index) => {\n if (index === keys.length - 1) {\n if (!currentLevel[key]) {\n let fieldValue = field.value\n if (fieldValue && (field.field_type !== 'image' || field.field_type !== 'file')) {\n if (field.field_type === 'date') {\n fieldValue = dayjs(fieldValue)\n } else if (field.field_type === 'time') {\n const [hours, minutes, seconds] = fieldValue.split(\":\").map(Number);\n fieldValue = dayjs().set('hour', hours).set('minute', minutes).set('second', seconds).set('millisecond', 0)\n } else if (field.name.includes('_id') && !Array.isArray(field?.value)) {\n fieldValue = Number(fieldValue)\n }\n }\n currentLevel[key] = fieldValue;\n } else if (typeof currentLevel[key] !== 'object' || Array.isArray(currentLevel[key])) {\n throw new Error(`Conflict: The key \"${key}\" already exists and is not an object.`);\n }\n } else {\n if (!currentLevel[key]) {\n currentLevel[key] = {};\n } else if (typeof currentLevel[key] !== 'object' || Array.isArray(currentLevel[key])) {\n throw new Error(`Conflict: The key \"${key}\" already exists and is not an object.`);\n }\n currentLevel = currentLevel[key];\n\n }\n });\n\n return existingObject;\n }, [])\n\n const removeMatchingKeyValuePairs = useCallback((obj1, obj2) => {\n _.forOwn(obj1, (value, key) => {\n if (_.has(obj2, key) && _.isEqual(value, obj2[key])) {\n delete obj1[key];\n }\n });\n return obj1;\n }, [])\n \n const validateRequiredSwitchFormData = useCallback((switchData: any) => {\n const requiredFields: string[] = [];\n if (switchData) {\n switchData && switchData[0]?.formMembers.forEach((member: any) => {\n if (member?.validation && Array.isArray(member?.validation)) {\n member?.validation.forEach((validation: any) => {\n if (validation?.thenValidations && Array.isArray(validation?.thenValidations)) {\n validation?.thenValidations.forEach((thenValidation: any) => {\n if (thenValidation?.type === \"required\" && thenValidation?.value === true) {\n if (member?.name) {\n requiredFields.push(member.name);\n }\n }\n });\n } else{\n const hasRequiredValidation = member.validation.some(\n (validation: any) => validation.type === 'required' && validation.value === true\n )\n if (hasRequiredValidation) {\n requiredFields.push(member.name);\n }\n }\n });\n }\n });\n\n }\n if(requiredFields){\n setValidRequiredFields(_.uniq(requiredFields))\n }\n \n }, [])\n\n const isEmpty = useCallback((value: any): boolean => {\n return (\n value === null ||\n value === undefined ||\n (Array.isArray(value) && value.length === 0) ||\n (typeof value === 'object' && Object.keys(value).length === 0)\n );\n }, [])\n \n const getMissingFields = useCallback((watchedFields: any, validationReqFields: string[]): string[] => {\n const missingFields: string[] = [];\n \n validationReqFields.forEach((fieldPath) => {\n const keys = fieldPath.split(\".\");\n let currentLevel = watchedFields;\n \n for (let i = 0; i < keys.length; i++) {\n const key = keys[i];\n \n if (!currentLevel?.[key] && currentLevel?.[key] !== 0) {\n // If any key in the path is missing, mark the field as missing\n missingFields.push(fieldPath);\n return;\n }\n \n // Move deeper into the object\n currentLevel = currentLevel[key];\n }\n \n // After navigating the full path, check if the final value is empty\n if (isEmpty(currentLevel)) {\n missingFields.push(fieldPath);\n }\n });\n\n \n return missingFields;\n }, [isEmpty])\n \n // Use Effects\n useEffect(() => {\n if (recieveTabDataLenght) {\n recieveTabDataLenght(tabsData.length)\n }\n }, [recieveTabDataLenght, tabsData])\n\n useEffect(() => {\n const handleMessage = (event: MessageEvent) => {\n if (event.origin !== window.origin) {\n return;\n }\n const { state } = event.data;\n\n if (state?.length) {\n const data: any = formBuilderDeConversion(state);\n\n if (data.tab) {\n setTabsData(data.tab);\n } else if (data.section) {\n setSchema(data.section);\n }\n }\n };\n\n window.addEventListener(\"message\", handleMessage);\n\n return () => {\n window.removeEventListener(\"message\", handleMessage);\n };\n }, []);\n\n useEffect(() => {\n if (data) {\n const formData = formBuilderDeConversion(data)\n if (formData?.tab) {\n // setSchema([])\n setTabsData(formData.tab);\n if (activeTab !== undefined) {\n setSchema(formData.tab[activeTab]?.data || []);\n }\n } else {\n setSchema(formData.section);\n // setTabsData([])\n }\n const dVals = _.get(defaultValues, fieldArrayName, {})\n const wVals = removeMatchingKeyValuePairs((watchedValues || {}), (dVals || {}))\n if (mode === 'edit' && !Object.keys(wVals)?.length) {\n let formValues: any = {};\n let nestedFormValues: any = {};\n data.forEach((field: any) => {\n const fieldValue = field.value\n if (field.name?.includes(\".\")) {\n nestedFormValues = createNestedObjectFromDot(field.name, field, nestedFormValues)\n } else {\n if (fieldValue && (field.field_type !== 'image' || field.field_type !== 'file')) {\n if (field?.is_section_field) {\n const fieldName = field?.form_switcher_name || field?.form_switcher_label;\n formValues = { ...formValues, [fieldName]: fieldValue }\n } else if (\n field?.name &&\n ['company_id', 'email_ids'].includes(field?.name) &&\n ['edit_customer', 'add_customer', 'edit_vendor', 'add_vendor'].includes(fieldArrayName)\n ) {\n formValues = { ...formValues, [field.name]: fieldValue }\n } else if (field.field_type === 'date') {\n formValues = { ...formValues, [field.name]: dayjs(fieldValue) }\n } else if (field.field_type === 'time') {\n const [hours, minutes, seconds] = fieldValue.split(\":\").map(Number);\n formValues = { ...formValues, [field.name]: dayjs().set('hour', hours).set('minute', minutes).set('second', seconds).set('millisecond', 0) }\n } else if (field.name.includes('_id') && !Array.isArray(field?.value)) {\n if (fieldArrayName === \"edit_user\" && field.name === \"role_id\") {\n formValues = { ...formValues, [field.name]: fieldValue }\n } else {\n formValues = { ...formValues, [field.name]: Number(fieldValue) }\n }\n } else {\n formValues = { ...formValues, [field.name]: fieldValue }\n }\n }\n }\n })\n const finalFormValues = { ...formValues, ...nestedFormValues }\n reset({ [fieldArrayName]: { ...finalFormValues } })\n }\n getFormMethods?.({ control, handleSubmit, setValue, reset, resetField, getValues, unregister, trigger, watch,getFieldState,errors, ...rest })\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [data])\n\n useEffect(() => {\n if (activeTab?.toString()) {\n if (tabsData && tabsData[activeTab]) {\n setSchema(tabsData[activeTab].data);\n }\n }\n }, [activeTab, tabsData]);\n\n useEffect(() => {\n if (watchedValues && handleFormValues) {\n handleFormValues?.(watchedValues);\n }\n }, [handleFormValues, watchedValues])\n\n useEffect(() => {\n if (errors?.[fieldArrayName]) {\n setErrorAlert(true)\n } else {\n setErrorAlert(false)\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [ fieldArrayName,JSON.stringify(errors)])\n\n useEffect(() => {\n const validatedFields: string[] = [];\n if (activeTab != undefined) {\n tabsData[activeTab]?.data.forEach((section: any) => {\n \n if (section.members && Array.isArray(section.members)) {\n \n section.members.forEach((member: any) => {\n if (member.validation && Array.isArray(member.validation)) {\n const hasRequiredValidation = member.validation.some(\n (validation: any) => validation.type === 'required' && validation.value === true\n )\n if (hasRequiredValidation) {\n // validatedFields.push(fieldArrayName + '.' + member.name);\n validatedFields.push(member.name);\n }\n } \n });\n }\n })\n setValidRequiredFields(validatedFields);\n }\n }, [tabsData, activeTab]);\n\n useEffect(() => {\n if(watchedValues?.account_type){\n\n const switchFormData: any[] = [];\n schema && schema.forEach((section : any)=>{\n const sectionMembers = schema && section?.members?.map((ele: any) => ele) || [];\n \n const switchForms = schema && section?.switcher_forms?.map((form: any) => ({\n ...form,\n formMembers: sectionMembers.filter(\n (member: any) => member.section_form_id === form.id,\n ),\n }));\n if(switchForms){\n switchFormData.push(switchForms)\n }\n })\n\n const selectValue = watchedValues?.account_type || \"Individual\";\n const switchData = switchFormData && Array.isArray(switchFormData[0])\n ? switchFormData[0].filter((form: any) => form.name === selectValue)\n : []; \n \n if(switchData){\n validateRequiredSwitchFormData(switchData)\n } \n \n }\n }, [watchedValues?.account_type, schema, validateRequiredSwitchFormData]);\n\n useEffect(() => {\n if(validateRequiredFields.length > 0) {\n const updatedRequiredFields = getMissingFields(watchedValues, validateRequiredFields)\n\n // const updatedRequiredFields = validateRequiredFields.filter((fieldPath) => {\n // const watchedValue = watchedFields[fieldPath] ;\n // return watchedValue === undefined || watchedValue === null || watchedValue === 0 ;\n // });\n\n updatedRequiredFields.length === 0 ? setTabFormValid(true) : setTabFormValid(false) ; \n } else {\n setTabFormValid(true)\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [validateRequiredFields , watchedValues , activeTab]) \n\n useEffect(() => {\n if (recieveIsValidForm) {\n recieveIsValidForm(isTabFormValid)\n }\n }, [recieveIsValidForm, isTabFormValid])\n\n \n return (\n // <FullScreenLayout>\n <Box sx={{ width: \"100%\", padding: \"2rem\", ...containerStyles }}>\n <FormProvider {...{ control, handleSubmit, setValue, reset, resetField, getValues, unregister, trigger, watch, errors, ...rest }}>\n <form id={fieldArrayName} name={fieldArrayName} onSubmit={handleSubmit(handleFormSubmit)}>\n {Boolean(tabsData?.length) && (\n <>\n {errorAlert &&\n <Alert severity='error' onClose={() => setErrorAlert(false)}>\n Please fill all the required fields.\n </Alert>\n }\n <TabBar\n tabs={tabsData}\n activeTabs={activeTabs}\n activeValue={activeTab}\n setActiveValue={setActiveTabValue}\n isFormTabValid = {isTabFormValid}\n />\n </>\n )}\n {schema &&\n schema.map((section: any, index: number) => {\n const {\n isFormSwitcher,\n formSwitcherName,\n switchForms,\n members,\n values,\n } = getSectionData(section)\n\n return (\n <FormSection\n section={section}\n index={index}\n members={members}\n switchForms={switchForms}\n isFormSwitcher={isFormSwitcher}\n control={control}\n fieldArrayName={fieldArrayName}\n formSwitcherName={formSwitcherName}\n displayAvtar={displayAvtar}\n isButton={isButton}\n currencyOption={currencyOption}\n values={values}\n onBlur={onBlur}\n setValue={setValue}\n onSelectFooterClick={onSelectFooterClick}\n getSelectedData={getSelectedData}\n setCurrencyOptions={setCurrencyOptions}\n refreshOptions={refreshOptions}\n handleFieldCleanUp={handleFieldCleanUp}\n handleSetCountryCodeField={handleSetCountryCodeField}\n handleTableAddClick={handleTableAddClick}\n onTableCellChange={onTableCellChange}\n // setDetailsData={setDetailsData}\n t={t}\n images={images}\n />\n );\n })}\n </form>\n </FormProvider>\n </Box>\n // </FullScreenLayout>\n );\n};\n\nexport { FormParser };\nexport default FormParser;"],"names":["validationReducer","validations","validation","field","translationFn","type","_a","field_properties","is_multiselect","required","msg_en","min","value","test","trim","length","nullable","max","email","when","relation","is","val","values","then","thenValidations","reduce","otherwise","otherWiseValidations","FormParser","data","defaultValues","handleFormSubmit","fieldArrayName","mode","displayAvtar","onTableAddClick","handleFormValues","getFormMethods","setFields","onSelectFooterClick","setActiveTabValue","activeTab","recieveTabDataLenght","recieveIsValidForm","activeTabs","onTableCellChange","containerStyles","isButton","getSelectedData","refreshOptions","onBlur","t","useTranslation","getValidationType","field_type","yup","array","string","number","transform","originalValue","typeError","matches","excludeEmptyString","message","convertNestedFieldSchemaObject","nestedFields","schema","key","Object","hasOwn","object","shape","control","handleSubmit","formState","errors","setValue","reset","getValues","watch","resetField","unregister","trigger","getFieldState","rest","useForm","resolver","yupResolver","yupSchemaObject","nestedFielvalidations","nestedYupSchemaObj","forEach","fieldValidations","name","includes","dotNotationString","existingObject","keys","split","currentLevel","index","Array","isArray","Error","convertToNestedObject","generateValidationSchema","watchedValues","useWatch","setSchema","useState","tabsData","setTabsData","errorAlert","setErrorAlert","currencyOption","setCurrencyOptions","isTabFormValid","setTabFormValid","validateRequiredFields","setValidRequiredFields","handleTableAddClick","tableName","getSectionData","useCallback","section","sectionMembers","members","map","ele","isFormSwitcher","section_type","SECTION_TYPES","FORM_SWITCH_SECTION","formSwitcherName","form_switcher_name","_b","form_switcher_label","toLowerCase","join","switchForms","_c","switcher_forms","form","formMembers","filter","member","section_form_id","id","selectedSectionForm","find","handleSetCountryCodeField","country","oldVal","country_code_field_name","newVal","dialCode","is_country_code_separate","handleFieldCleanUp","memberName","label","v","_","get","newData","createNestedObjectFromDot","fieldValue","dayjs","hours","minutes","seconds","Number","set","removeMatchingKeyValuePairs","obj1","obj2","forOwn","has","isEqual","validateRequiredSwitchFormData","switchData","requiredFields","thenValidation","push","some","uniq","isEmpty","getMissingFields","watchedFields","validationReqFields","missingFields","fieldPath","i","useEffect","handleMessage","event","origin","window","state","formBuilderDeConversion","tab","addEventListener","removeEventListener","formData","dVals","wVals","formValues","nestedFormValues","is_section_field","fieldName","finalFormValues","toString","JSON","stringify","validatedFields","account_type","switchFormData","selectValue","Box","sx","width","padding","children","jsx","FormProvider","jsxs","onSubmit","Boolean","Fragment","Alert","severity","onClose","TabBar","tabs","activeValue","setActiveValue","isFormTabValid","FormSection","images"],"mappings":"ioCAoBA,MAAMA,EAAoB,CAACC,EAAkBC,EAAiBC,EAAYC,WACxE,OAAQF,EAAWG,MACjB,IAAK,WACH,OAAQ,OAAAC,EAAAH,EAAMI,uBAAN,EAAAD,EAAwBE,gBAAiBP,EAAYQ,SAASL,EAAcF,EAAWQ,SAASC,IAAI,EAAGP,EAAcF,EAAWQ,SAAWR,EAAWU,MAC1JX,EAAYQ,SAASL,EAAcF,EAAWQ,SAASG,KAAK,YAAaT,EAAcF,EAAWQ,QAASE,UAAS,MAAiB,iBAAVA,GAAqBA,IAAS,OAAAN,QAAAM,WAAOE,aAAP,EAAAR,EAAeS,QAAS,IAAWd,EAAYe,WAC9M,IAAK,aAIL,IAAK,UACH,OAAOf,EAAYU,IAAIT,EAAWU,MAAOR,EAAcF,EAAWQ,SAHpE,IAAK,aAIL,IAAK,UACH,OAAOT,EAAYgB,IAAIf,EAAWU,MAAOR,EAAcF,EAAWQ,SACpE,IAAK,iBACH,OAAOT,EAAYY,KAAK,qBAAsBT,EAAcF,EAAWQ,QAAUE,GAAUA,GAAS,GACtG,IAAK,QACH,OAAOX,EAAYiB,MAAMhB,EAAWQ,QACrC,IAAK,kBACJ,OAAOT,EAAYY,KACjB,kBACAT,EAAcF,EAAWQ,WAEN,iBAAVE,GACH,gBAAgBC,KAAKD,IAG/B,IAAK,OACH,OAAOX,EAAYkB,KAAKjB,EAAWkB,SAAU,CAC3CC,GAAKC,GAAaA,IAAQpB,EAAWqB,OACrCC,KAAM,WAAM,OAAA,OAAAlB,EAAA,MAAAJ,OAAA,EAAAA,EAAYuB,sBAAZ,EAAAnB,EAA6BoB,OACvC,CAACzB,EAAkBC,IAAoBF,EAAkBC,EAAaC,EAAYC,EAAOC,GACzFH,KACGA,GACL0B,UAAW,WAAM,OAAA,OAAArB,EAAA,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zD,UACAzC,iBACAsG,mBACApG,eACAa,WACAoE,kBACA7F,SACA4B,SACA2B,WACAtC,sBACAS,kBACAoE,sBACAnE,iBACA6G,sBACAP,6BACA9B,uBACA5E,oBAEAM,IAAA2L,OACAA,EAAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../src/components/form-control/form-parser/form-parser.tsx"],"sourcesContent":["import { FormProvider, useForm, useWatch } from \"react-hook-form\";\n// import { useLocation } from \"react-router-dom\";\nimport { Box } from \"@mui/material\";\n\n// import FullScreenLayout from \"../../../layout/fullScreen/fullScreen\";\n\nimport { useState, useEffect, useCallback } from \"react\";\nimport images from \"../../../assets/images\";\nimport \"./form-parser.scss\";\nimport TabBar from \"../../tabs/tabs\";\nimport formBuilderDeConversion from \"../../../utils/form-builder-deconversion\";\nimport { yupResolver } from \"@hookform/resolvers/yup\";\nimport * as yup from \"yup\";\nimport dayjs from \"dayjs\";\nimport { SECTION_TYPES } from '../../../utils/constant';\nimport { CountryData } from 'react-phone-input-2';\nimport Alert from '../../alert/alert';\nimport _ from \"lodash\";\nimport { useTranslation } from \"react-i18next\";\nimport FormSection from \"./form-section\";\nconst validationReducer = (validations: any, validation: any, field: any, translationFn: any) => {\n switch (validation.type) {\n case \"required\":\n return (field.field_properties?.is_multiselect ? validations.required(translationFn(validation.msg_en)).min(1, translationFn(validation.msg_en)) : validation.value\n ? validations.required(translationFn(validation.msg_en)).test('not-empty', translationFn(validation.msg_en), value => typeof value === 'string' ? value && value?.trim()?.length > 0 : true) : validations.nullable());\n case \"min_length\":\n return validations.min(validation.value, translationFn(validation.msg_en));\n case \"max_length\":\n return validations.max(validation.value, translationFn(validation.msg_en));\n case \"min_val\":\n return validations.min(validation.value, translationFn(validation.msg_en));\n case \"max_val\":\n return validations.max(validation.value, translationFn(validation.msg_en));\n case \"postive_number\":\n return validations.test('is-positive-number', translationFn(validation.msg_en), (value) => value >= 0)\n case 'email':\n return validations.email(validation.msg_en);\n case \"no_special_char\":\n return validations.test(\n \"no-special-char\",\n translationFn(validation.msg_en),\n value =>\n typeof value === \"string\"\n ? /^[^.\\-\\W_]+$/u.test(value) // allow letters/digits only\n : true\n );\n case \"when\":\n return validations.when(validation.relation, {\n is: (val: any) => val === validation.values,\n then: () => validation?.thenValidations?.reduce(\n (validations: any, validation: any) => validationReducer(validations, validation, field, translationFn),\n validations\n ) || validations,\n otherwise: () => validation?.otherWiseValidations?.reduce(\n (validations: any, validation: any) => validationReducer(validations, validation, field, translationFn),\n validations\n ) || validations,\n });\n // Add more cases for other validation types as needed\n default:\n return validations;\n }\n}\n\nconst FormParser = ({\n data,\n defaultValues,\n handleFormSubmit,\n fieldArrayName,\n mode,\n displayAvtar = false,\n onTableAddClick,\n handleFormValues,\n getFormMethods,\n setFields,\n onSelectFooterClick,\n setActiveTabValue,\n activeTab = 0,\n recieveTabDataLenght,\n recieveIsValidForm,\n activeTabs,\n onTableCellChange,\n containerStyles = undefined,\n isButton = true,\n getSelectedData,\n refreshOptions = false,\n onBlur,\n}: any) => {\n\n const { t } = useTranslation();\n\n function convertToNestedObject(dotNotationString: string, field: any, existingObject: any = {}) {\n const keys = dotNotationString.split('.');\n let currentLevel = existingObject;\n\n keys.forEach((key, index) => {\n if (index === keys.length - 1) {\n if (!currentLevel[key]) {\n const fieldValidations = field.validation.reduce(\n (validations: any, validation: any) => {\n switch (validation.type) {\n case \"required\":\n return validation.value\n ? validations.required(t(validation.msg_en)).test('not-empty', t(validation.msg_en), value => typeof value === 'string' ? value && value?.trim()?.length > 0 : true)\n : (field.field_properties?.is_multiselect ? validations.min(1, t(validation.msg_en)) : validations.nullable());\n case \"min_length\":\n return validations.min(validation.value, t(validation.msg_en));\n case \"max_length\":\n return validations.max(validation.value, t(validation.msg_en));\n case \"min_val\":\n return validations.min(validation.value, t(validation.msg_en));\n case \"max_val\":\n return validations.max(validation.value, t(validation.msg_en));\n // Add more cases for other validation types as needed\n default:\n return validations;\n }\n },\n getValidationType(field)\n );\n currentLevel[key] = fieldValidations;\n } else if (typeof currentLevel[key] !== 'object' || Array.isArray(currentLevel[key])) {\n throw new Error(`Conflict: The key \"${key}\" already exists and is not an object.`);\n }\n } else {\n if (!currentLevel[key]) {\n currentLevel[key] = {};\n } else if (typeof currentLevel[key] !== 'object' || Array.isArray(currentLevel[key])) {\n throw new Error(`Conflict: The key \"${key}\" already exists and is not an object.`);\n }\n currentLevel = currentLevel[key];\n\n }\n });\n\n return existingObject;\n }\n\n const getValidationType = (field: any) => {\n switch (field.field_type) {\n case 'select':\n return field.field_properties?.is_multiselect\n ? yup.array()\n : yup.string()\n\n case 'number':\n case 'currency':\n return yup.number().transform((value, originalValue) => (originalValue === '' ? undefined : value)).typeError('Please enter valid number').nullable()\n case 'currency_with_amount':\n return yup.number()\n case 'url':\n return yup.string().matches(/^(https?:\\/\\/)?((([a-zA-Z0-9_-]+\\.)+[a-zA-Z]{2,})|localhost)(:\\d{2,5})?(\\/[a-zA-Z0-9#_-]+\\/?)*(\\?[a-zA-Z0-9&=_-]+)?(#\\S+)?$/, { excludeEmptyString: true, message: \"Please enter valid URL.\" })\n\n default:\n return yup.string()\n }\n }\n\n const convertNestedFieldSchemaObject = (nestedFields: any) => {\n const schema: any = {};\n\n for (const key in nestedFields) {\n if (typeof nestedFields[key] === 'object' && !Object.hasOwn(nestedFields[key], 'tests')) {\n schema[key] = yup.object().shape(convertNestedFieldSchemaObject(nestedFields[key]));\n } else {\n schema[key] = nestedFields[key]\n }\n }\n return schema;\n }\n\n\n const generateValidationSchema = (data: any[]) => {\n const yupSchemaObject: any = {};\n let nestedFielvalidations: any = {},\n nestedYupSchemaObj: any = {};\n\n data &&\n data?.forEach((field: any) => {\n let fieldValidations: any;\n if (field.validation && field.validation.length > 0) {\n if (field.name?.includes(\".\")) {\n nestedFielvalidations = convertToNestedObject(field.name, field, nestedFielvalidations);\n } else {\n fieldValidations = field.validation.reduce((validations: any, validation: any) => validationReducer(validations, validation, field, t),\n getValidationType(field)\n );\n yupSchemaObject[field.name] = fieldValidations;\n }\n\n nestedYupSchemaObj = convertNestedFieldSchemaObject(nestedFielvalidations)\n }\n\n });\n\n return yup.object().shape({\n [fieldArrayName]: yup.object().shape({ ...yupSchemaObject, ...nestedYupSchemaObj }),\n });\n };\n\n const {\n control,\n handleSubmit,\n formState: { errors },\n setValue,\n reset,\n getValues,\n watch,\n resetField,\n unregister,\n trigger,\n getFieldState,\n ...rest\n } = useForm({\n ...(defaultValues && typeof defaultValues === 'object' ? { defaultValues } : {}),\n resolver: yupResolver(generateValidationSchema(data)),\n mode: \"all\",\n });\n\n const watchedValues = useWatch({\n control,\n name: fieldArrayName,\n });\n\n // Local States\n const [schema, setSchema] = useState<[]>([]);\n const [tabsData, setTabsData] = useState<any[]>([]);\n const [errorAlert, setErrorAlert] = useState<boolean>(false);\n const [currencyOption, setCurrencyOptions] = useState<string>('');\n const [isTabFormValid, setTabFormValid] = useState<boolean>(false);\n const [validateRequiredFields, setValidRequiredFields] = useState<any[]>([]);\n\n // Local Functions\n const handleTableAddClick = (tableName?: string) => {\n onTableAddClick?.(tableName)\n }\n\n const getSectionData = useCallback((section: any) => {\n const sectionMembers = section?.members?.map((ele: any) => ele) || []\n const values = getValues(fieldArrayName)\n const isFormSwitcher = section.section_type === SECTION_TYPES.FORM_SWITCH_SECTION\n const formSwitcherName =\n section?.form_switcher_name ||\n section?.form_switcher_label?.toLowerCase().split(\" \").join(\"_\");\n const switchForms = section?.switcher_forms?.map((form: any) => ({\n ...form,\n formMembers: sectionMembers.filter(\n (member: any) => member.section_form_id === form.id,\n )\n }));\n const selectedSectionForm =\n values?.[formSwitcherName] ?\n switchForms.find((ele: any) =>\n ele.name === values?.[formSwitcherName]\n ) : {};\n\n // When form switcher is active, include:\n // 1. Common fields (fields without section_form_id or is_form_switcher_section)\n // 2. Form-specific fields (fields with section_form_id matching the selected form)\n let members;\n if (isFormSwitcher) {\n const commonFields = sectionMembers.filter(\n (member: any) => !member.section_form_id && !member.is_form_switcher_section\n );\n const formSpecificFields = selectedSectionForm?.formMembers || [];\n members = [...commonFields, ...formSpecificFields];\n } else {\n members = section?.members;\n }\n\n return {\n isFormSwitcher,\n formSwitcherName,\n switchForms,\n selectedSectionForm,\n members,\n values\n }\n }, [fieldArrayName, getValues])\n\n const handleSetCountryCodeField = useCallback((country: CountryData, field: any, fieldArrayName: any, values: any) => {\n const oldVal = values?.[fieldArrayName]?.[field?.country_code_field_name]\n const newVal = `+${country.dialCode}`\n if (\n field?.is_country_code_separate &&\n field?.country_code_field_name &&\n oldVal !== newVal\n ) {\n setValue(\n `${fieldArrayName}.${field?.country_code_field_name}` as never,\n newVal as never\n )\n }\n }, [setValue])\n\n const handleFieldCleanUp = useCallback((switchForms: any) => {\n switchForms.forEach((form: any) => {\n form?.formMembers.forEach((member: any) => {\n const memberName = member?.name || member.label.toLowerCase().split(\" \").join(\"_\")\n const v = _.get(defaultValues, `${fieldArrayName}.${memberName}`, null)\n const newData = data.map((ele: any) => {\n if (member?.section_form_id === ele?.section_form_id) {\n delete ele.value\n }\n return ({\n ...ele,\n ...(v ? { value: v } : {}),\n })\n })\n if (!v) {\n resetField(`${fieldArrayName}.${memberName}` as never)\n unregister(`${fieldArrayName}.${memberName}` as never)\n }\n setFields?.(newData)\n })\n\n })\n }, [data, defaultValues, fieldArrayName, resetField, setFields, unregister])\n\n const createNestedObjectFromDot = useCallback((dotNotationString: string, field: any, existingObject: any = {}) => {\n const keys = dotNotationString.split('.');\n let currentLevel = existingObject;\n\n keys.forEach((key, index) => {\n if (index === keys.length - 1) {\n if (!currentLevel[key]) {\n let fieldValue = field.value\n if (fieldValue && (field.field_type !== 'image' || field.field_type !== 'file')) {\n if (field.field_type === 'date') {\n fieldValue = dayjs(fieldValue)\n } else if (field.field_type === 'time') {\n const [hours, minutes, seconds] = fieldValue.split(\":\").map(Number);\n fieldValue = dayjs().set('hour', hours).set('minute', minutes).set('second', seconds).set('millisecond', 0)\n } else if (field.name.includes('_id') && !Array.isArray(field?.value)) {\n fieldValue = Number(fieldValue)\n }\n }\n currentLevel[key] = fieldValue;\n } else if (typeof currentLevel[key] !== 'object' || Array.isArray(currentLevel[key])) {\n throw new Error(`Conflict: The key \"${key}\" already exists and is not an object.`);\n }\n } else {\n if (!currentLevel[key]) {\n currentLevel[key] = {};\n } else if (typeof currentLevel[key] !== 'object' || Array.isArray(currentLevel[key])) {\n throw new Error(`Conflict: The key \"${key}\" already exists and is not an object.`);\n }\n currentLevel = currentLevel[key];\n\n }\n });\n\n return existingObject;\n }, [])\n\n const removeMatchingKeyValuePairs = useCallback((obj1, obj2) => {\n _.forOwn(obj1, (value, key) => {\n if (_.has(obj2, key) && _.isEqual(value, obj2[key])) {\n delete obj1[key];\n }\n });\n return obj1;\n }, [])\n\n const validateRequiredSwitchFormData = useCallback((switchData: any) => {\n const requiredFields: string[] = [];\n if (switchData) {\n switchData && switchData[0]?.formMembers.forEach((member: any) => {\n if (member?.validation && Array.isArray(member?.validation)) {\n member?.validation.forEach((validation: any) => {\n if (validation?.thenValidations && Array.isArray(validation?.thenValidations)) {\n validation?.thenValidations.forEach((thenValidation: any) => {\n if (thenValidation?.type === \"required\" && thenValidation?.value === true) {\n if (member?.name) {\n requiredFields.push(member.name);\n }\n }\n });\n } else {\n const hasRequiredValidation = member.validation.some(\n (validation: any) => validation.type === 'required' && validation.value === true\n )\n if (hasRequiredValidation) {\n requiredFields.push(member.name);\n }\n }\n });\n }\n });\n\n }\n if (requiredFields) {\n setValidRequiredFields(_.uniq(requiredFields))\n }\n\n }, [])\n\n const isEmpty = useCallback((value: any): boolean => {\n return (\n value === null ||\n value === undefined ||\n (Array.isArray(value) && value.length === 0) ||\n (typeof value === 'object' && Object.keys(value).length === 0)\n );\n }, [])\n\n const getMissingFields = useCallback((watchedFields: any, validationReqFields: string[]): string[] => {\n const missingFields: string[] = [];\n\n validationReqFields.forEach((fieldPath) => {\n const keys = fieldPath.split(\".\");\n let currentLevel = watchedFields;\n\n for (let i = 0; i < keys.length; i++) {\n const key = keys[i];\n\n if (!currentLevel?.[key] && currentLevel?.[key] !== 0) {\n // If any key in the path is missing, mark the field as missing\n missingFields.push(fieldPath);\n return;\n }\n\n // Move deeper into the object\n currentLevel = currentLevel[key];\n }\n\n // After navigating the full path, check if the final value is empty\n if (isEmpty(currentLevel)) {\n missingFields.push(fieldPath);\n }\n });\n\n\n return missingFields;\n }, [isEmpty])\n\n // Use Effects\n useEffect(() => {\n if (recieveTabDataLenght) {\n recieveTabDataLenght(tabsData.length)\n }\n }, [recieveTabDataLenght, tabsData])\n\n useEffect(() => {\n const handleMessage = (event: MessageEvent) => {\n if (event.origin !== window.origin) {\n return;\n }\n const { state } = event.data;\n\n if (state?.length) {\n const data: any = formBuilderDeConversion(state);\n\n if (data.tab) {\n setTabsData(data.tab);\n } else if (data.section) {\n setSchema(data.section);\n }\n }\n };\n\n window.addEventListener(\"message\", handleMessage);\n\n return () => {\n window.removeEventListener(\"message\", handleMessage);\n };\n }, []);\n\n useEffect(() => {\n if (data) {\n const formData = formBuilderDeConversion(data)\n if (formData?.tab) {\n // setSchema([])\n setTabsData(formData.tab);\n if (activeTab !== undefined) {\n setSchema(formData.tab[activeTab]?.data || []);\n }\n } else {\n setSchema(formData.section);\n // setTabsData([])\n }\n const dVals = _.get(defaultValues, fieldArrayName, {})\n const wVals = removeMatchingKeyValuePairs((watchedValues || {}), (dVals || {}))\n if (mode === 'edit' && !Object.keys(wVals)?.length) {\n let formValues: any = {};\n let nestedFormValues: any = {};\n data.forEach((field: any) => {\n const fieldValue = field.value\n if (field.name?.includes(\".\")) {\n nestedFormValues = createNestedObjectFromDot(field.name, field, nestedFormValues)\n } else {\n if (fieldValue && (field.field_type !== 'image' || field.field_type !== 'file')) {\n if (field?.is_section_field) {\n const fieldName = field?.form_switcher_name || field?.form_switcher_label;\n formValues = { ...formValues, [fieldName]: fieldValue }\n } else if (\n field?.name &&\n ['company_id', 'email_ids'].includes(field?.name) &&\n ['edit_customer', 'add_customer', 'edit_vendor', 'add_vendor'].includes(fieldArrayName)\n ) {\n formValues = { ...formValues, [field.name]: fieldValue }\n } else if (field.field_type === 'date') {\n formValues = { ...formValues, [field.name]: dayjs(fieldValue) }\n } else if (field.field_type === 'time') {\n const [hours, minutes, seconds] = fieldValue.split(\":\").map(Number);\n formValues = { ...formValues, [field.name]: dayjs().set('hour', hours).set('minute', minutes).set('second', seconds).set('millisecond', 0) }\n } else if (field.name.includes('_id') && !Array.isArray(field?.value)) {\n if (fieldArrayName === \"edit_user\" && field.name === \"role_id\") {\n formValues = { ...formValues, [field.name]: fieldValue }\n } else {\n formValues = { ...formValues, [field.name]: Number(fieldValue) }\n }\n } else {\n formValues = { ...formValues, [field.name]: fieldValue }\n }\n }\n }\n })\n const finalFormValues = { ...formValues, ...nestedFormValues }\n reset({ [fieldArrayName]: { ...finalFormValues } })\n }\n getFormMethods?.({ control, handleSubmit, setValue, reset, resetField, getValues, unregister, trigger, watch, getFieldState, errors, ...rest })\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [data])\n\n useEffect(() => {\n if (activeTab?.toString()) {\n if (tabsData && tabsData[activeTab]) {\n setSchema(tabsData[activeTab].data);\n }\n }\n }, [activeTab, tabsData]);\n\n useEffect(() => {\n if (watchedValues && handleFormValues) {\n handleFormValues?.(watchedValues);\n }\n }, [handleFormValues, watchedValues])\n\n useEffect(() => {\n if (errors?.[fieldArrayName]) {\n setErrorAlert(true)\n } else {\n setErrorAlert(false)\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [fieldArrayName, JSON.stringify(errors)])\n\n useEffect(() => {\n const validatedFields: string[] = [];\n if (activeTab != undefined) {\n tabsData[activeTab]?.data.forEach((section: any) => {\n\n if (section.members && Array.isArray(section.members)) {\n\n section.members.forEach((member: any) => {\n if (member.validation && Array.isArray(member.validation)) {\n const hasRequiredValidation = member.validation.some(\n (validation: any) => validation.type === 'required' && validation.value === true\n )\n if (hasRequiredValidation) {\n // validatedFields.push(fieldArrayName + '.' + member.name);\n validatedFields.push(member.name);\n }\n }\n });\n }\n })\n setValidRequiredFields(validatedFields);\n }\n }, [tabsData, activeTab]);\n\n useEffect(() => {\n if (watchedValues?.account_type) {\n\n const switchFormData: any[] = [];\n schema && schema.forEach((section: any) => {\n const sectionMembers = schema && section?.members?.map((ele: any) => ele) || [];\n\n const switchForms = schema && section?.switcher_forms?.map((form: any) => ({\n ...form,\n formMembers: sectionMembers.filter(\n (member: any) => member.section_form_id === form.id,\n ),\n }));\n if (switchForms) {\n switchFormData.push(switchForms)\n }\n })\n\n const selectValue = watchedValues?.account_type || \"Individual\";\n const switchData = switchFormData && Array.isArray(switchFormData[0])\n ? switchFormData[0].filter((form: any) => form.name === selectValue)\n : [];\n\n if (switchData) {\n validateRequiredSwitchFormData(switchData)\n }\n\n }\n }, [watchedValues?.account_type, schema, validateRequiredSwitchFormData]);\n\n useEffect(() => {\n if (validateRequiredFields.length > 0) {\n const updatedRequiredFields = getMissingFields(watchedValues, validateRequiredFields)\n\n // const updatedRequiredFields = validateRequiredFields.filter((fieldPath) => {\n // const watchedValue = watchedFields[fieldPath] ;\n // return watchedValue === undefined || watchedValue === null || watchedValue === 0 ;\n // });\n\n updatedRequiredFields.length === 0 ? setTabFormValid(true) : setTabFormValid(false);\n } else {\n setTabFormValid(true)\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [validateRequiredFields, watchedValues, activeTab])\n\n useEffect(() => {\n if (recieveIsValidForm) {\n recieveIsValidForm(isTabFormValid)\n }\n }, [recieveIsValidForm, isTabFormValid])\n\n\n return (\n // <FullScreenLayout>\n <Box sx={{ width: \"100%\", padding: \"2rem\", ...containerStyles }}>\n <FormProvider {...{ control, handleSubmit, setValue, reset, resetField, getValues, unregister, trigger, watch, errors, ...rest }}>\n <form id={fieldArrayName} name={fieldArrayName} onSubmit={handleSubmit(handleFormSubmit)}>\n {Boolean(tabsData?.length) && (\n <>\n {errorAlert &&\n <Alert severity='error' onClose={() => setErrorAlert(false)}>\n Please fill all the required fields.\n </Alert>\n }\n <TabBar\n tabs={tabsData}\n activeTabs={activeTabs}\n activeValue={activeTab}\n setActiveValue={setActiveTabValue}\n isFormTabValid={isTabFormValid}\n />\n </>\n )}\n {schema &&\n schema.map((section: any, index: number) => {\n const {\n isFormSwitcher,\n formSwitcherName,\n switchForms,\n members,\n values,\n } = getSectionData(section)\n\n return (\n <FormSection\n section={section}\n index={index}\n members={members}\n switchForms={switchForms}\n isFormSwitcher={isFormSwitcher}\n control={control}\n fieldArrayName={fieldArrayName}\n formSwitcherName={formSwitcherName}\n displayAvtar={displayAvtar}\n isButton={isButton}\n currencyOption={currencyOption}\n values={values}\n onBlur={onBlur}\n setValue={setValue}\n onSelectFooterClick={onSelectFooterClick}\n getSelectedData={getSelectedData}\n setCurrencyOptions={setCurrencyOptions}\n refreshOptions={refreshOptions}\n handleFieldCleanUp={handleFieldCleanUp}\n handleSetCountryCodeField={handleSetCountryCodeField}\n handleTableAddClick={handleTableAddClick}\n onTableCellChange={onTableCellChange}\n // setDetailsData={setDetailsData}\n t={t}\n images={images}\n />\n );\n })}\n </form>\n </FormProvider>\n </Box>\n // </FullScreenLayout>\n );\n};\n\nexport default FormParser;"],"names":["validationReducer","validations","validation","field","translationFn","type","_a","field_properties","is_multiselect","required","msg_en","min","value","test","trim","length","nullable","max","email","when","relation","is","val","values","then","thenValidations","reduce","otherwise","otherWiseValidations","data","defaultValues","handleFormSubmit","fieldArrayName","mode","displayAvtar","onTableAddClick","handleFormValues","getFormMethods","setFields","onSelectFooterClick","setActiveTabValue","activeTab","recieveTabDataLenght","recieveIsValidForm","activeTabs","onTableCellChange","containerStyles","isButton","getSelectedData","refreshOptions","onBlur","t","useTranslation","getValidationType","field_type","yup","array","string","number","transform","originalValue","typeError","matches","excludeEmptyString","message","convertNestedFieldSchemaObject","nestedFields","schema","key","Object","hasOwn","object","shape","control","handleSubmit","formState","errors","setValue","reset","getValues","watch","resetField","unregister","trigger","getFieldState","rest","useForm","resolver","yupResolver","yupSchemaObject","nestedFielvalidations","nestedYupSchemaObj","forEach","fieldValidations","name","includes","dotNotationString","existingObject","keys","split","currentLevel","index","Array","isArray","Error","convertToNestedObject","generateValidationSchema","watchedValues","useWatch","setSchema","useState","tabsData","setTabsData","errorAlert","setErrorAlert","currencyOption","setCurrencyOptions","isTabFormValid","setTabFormValid","validateRequiredFields","setValidRequiredFields","handleTableAddClick","tableName","getSectionData","useCallback","section","sectionMembers","members","map","ele","isFormSwitcher","section_type","SECTION_TYPES","FORM_SWITCH_SECTION","formSwitcherName","form_switcher_name","_b","form_switcher_label","toLowerCase","join","switchForms","_c","switcher_forms","form","formMembers","filter","member","section_form_id","id","selectedSectionForm","find","is_form_switcher_section","handleSetCountryCodeField","country","oldVal","country_code_field_name","newVal","dialCode","is_country_code_separate","handleFieldCleanUp","memberName","label","v","_","get","newData","createNestedObjectFromDot","fieldValue","dayjs","hours","minutes","seconds","Number","set","removeMatchingKeyValuePairs","obj1","obj2","forOwn","has","isEqual","validateRequiredSwitchFormData","switchData","requiredFields","thenValidation","push","some","uniq","isEmpty","getMissingFields","watchedFields","validationReqFields","missingFields","fieldPath","i","useEffect","handleMessage","event","origin","window","state","formBuilderDeConversion","tab","addEventListener","removeEventListener","formData","dVals","wVals","formValues","nestedFormValues","is_section_field","fieldName","finalFormValues","toString","JSON","stringify","validatedFields","account_type","switchFormData","selectValue","Box","sx","width","padding","children","jsx","FormProvider","jsxs","onSubmit","Boolean","Fragment","Alert","severity","onClose","TabBar","tabs","activeValue","setActiveValue","isFormTabValid","FormSection","images"],"mappings":"ioCAoBA,MAAMA,EAAoB,CAACC,EAAkBC,EAAiBC,EAAYC,WACxE,OAAQF,EAAWG,MACjB,IAAK,WACH,OAAQ,OAAAC,EAAAH,EAAMI,uBAAN,EAAAD,EAAwBE,gBAAiBP,EAAYQ,SAASL,EAAcF,EAAWQ,SAASC,IAAI,EAAGP,EAAcF,EAAWQ,SAAWR,EAAWU,MAC1JX,EAAYQ,SAASL,EAAcF,EAAWQ,SAASG,KAAK,YAAaT,EAAc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E7EA,IAAgB,IAGjB,CAACC,GAAwBZ,EAAelE,IAE3CyJ,EAAAA,UAAU,KACJvJ,GACFA,EAAmB0E,KAEpB,CAAC1E,EAAoB0E;qBAKrBsG,EAAAA,QAAA,CAAIC,GAAI,CAAEC,MAAO,OAAQC,QAAS,UAAWhL,GAC5CiL,wBAAAC,EAAAA,IAACC,EAAAA,aAAA,IAAiB,CAAExJ,UAASC,eAAcG,WAAUC,QAAOG,aAAYF,YAAWG,aAAYC,UAASH,QAAOJ,YAAWS,GACxH0I,wBAAAG,OAAC,OAAA,CAAK9E,GAAIpH,EAAgB8D,KAAM9D,EAAgBmM,SAAUzJ,EAAa3C,GACpEgM,SAAA,CAAAK,cAAQrH,aAAUhG,0BACjBmN,KAAAG,EAAAA,SAAA,CACGN,SAAA,CAAA9G,mBACC+G,EAAAA,IAACM,SAAMC,SAAS,QAAQC,QAAS,IAAMtH,IAAc,GAAQ6G,SAAA;eAI/DC,EAAAA,IAACS,EAAAA,OAAA,CACCC,KAAM3H,GACNnE,aACA+L,YAAalM,EACbmM,eAAgBpM,EAChBqM,eAAgBxH,QAIrBlD,IACCA,GAAO6D,IAAI,CAACH,EAAcxB,KACxB,MAAM6B,eACJA,EAAAI,iBACAA,EAAAM,YACAA,EAAAb,QACAA,EAAAxG,OACAA,GACEoG,GAAeE;AAEnB,OACEmG,EAAAA,IAACc,EAAAA,YAAA,CACCjH,UACAxB,QACA0B,UACAa,cACAV,iBACAzD,UACAzC,iBACAsG,mBACApG,eACAa,WACAoE,kBACA5F,SACA2B,SACA2B,WACAtC,sBACAS,kBACAoE,sBACAnE,iBACA8G,sBACAP,6BACA/B,uBACA5E,oBAEAM,IAAA4L,OACAA,EAAAA"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
|
|
2
2
|
declare const FormParser: ({ data, defaultValues, handleFormSubmit, fieldArrayName, mode, displayAvtar, onTableAddClick, handleFormValues, getFormMethods, setFields, onSelectFooterClick, setActiveTabValue, activeTab, recieveTabDataLenght, recieveIsValidForm, activeTabs, onTableCellChange, containerStyles, isButton, getSelectedData, refreshOptions, onBlur, }: any) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
-
export { FormParser };
|
|
4
3
|
export default FormParser;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
declare const FormSwitcher: import('react').
|
|
1
|
+
declare const FormSwitcher: import('react').NamedExoticComponent<any>;
|
|
2
2
|
export { FormSwitcher };
|
|
3
3
|
export default FormSwitcher;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const ActionArrow: import('@emotion/styled').StyledComponent<import('@mui/
|
|
2
|
-
ref?: import('react').Ref<
|
|
3
|
-
}
|
|
1
|
+
export declare const ActionArrow: import('@emotion/styled').StyledComponent<Pick<{}, never> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, {}, {
|
|
2
|
+
ref?: import('react').Ref<import('react').Component<{}, any, any>>;
|
|
3
|
+
}>;
|
|
4
4
|
export default ActionArrow;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const AddCircle: import('@emotion/styled').StyledComponent<import('@mui/
|
|
2
|
-
ref?: import('react').Ref<
|
|
3
|
-
}
|
|
1
|
+
export declare const AddCircle: import('@emotion/styled').StyledComponent<Pick<{}, never> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, {}, {
|
|
2
|
+
ref?: import('react').Ref<import('react').Component<{}, any, any>>;
|
|
3
|
+
}>;
|
|
4
4
|
export default AddCircle;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const ArrowBidirectional: import('@emotion/styled').StyledComponent<import('@mui/
|
|
2
|
-
ref?: import('react').Ref<
|
|
3
|
-
}
|
|
1
|
+
export declare const ArrowBidirectional: import('@emotion/styled').StyledComponent<Pick<{}, never> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, {}, {
|
|
2
|
+
ref?: import('react').Ref<import('react').Component<{}, any, any>>;
|
|
3
|
+
}>;
|
|
4
4
|
export default ArrowBidirectional;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const ArrowCircleDown: import('@emotion/styled').StyledComponent<import('@mui/
|
|
2
|
-
ref?: import('react').Ref<
|
|
3
|
-
}
|
|
1
|
+
export declare const ArrowCircleDown: import('@emotion/styled').StyledComponent<Pick<{}, never> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, {}, {
|
|
2
|
+
ref?: import('react').Ref<import('react').Component<{}, any, any>>;
|
|
3
|
+
}>;
|
|
4
4
|
export default ArrowCircleDown;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const ArrowDownThree: import('@emotion/styled').StyledComponent<import('@mui/
|
|
2
|
-
ref?: import('react').Ref<
|
|
3
|
-
}
|
|
1
|
+
export declare const ArrowDownThree: import('@emotion/styled').StyledComponent<Pick<{}, never> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, {}, {
|
|
2
|
+
ref?: import('react').Ref<import('react').Component<{}, any, any>>;
|
|
3
|
+
}>;
|
|
4
4
|
export default ArrowDownThree;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const ArrowDownTwo: import('@emotion/styled').StyledComponent<import('@mui/
|
|
2
|
-
ref?: import('react').Ref<
|
|
3
|
-
}
|
|
1
|
+
export declare const ArrowDownTwo: import('@emotion/styled').StyledComponent<Pick<{}, never> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, {}, {
|
|
2
|
+
ref?: import('react').Ref<import('react').Component<{}, any, any>>;
|
|
3
|
+
}>;
|
|
4
4
|
export default ArrowDownTwo;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const ArrowDown: import('@emotion/styled').StyledComponent<import('@mui/
|
|
2
|
-
ref?: import('react').Ref<
|
|
3
|
-
}
|
|
1
|
+
export declare const ArrowDown: import('@emotion/styled').StyledComponent<Pick<{}, never> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, {}, {
|
|
2
|
+
ref?: import('react').Ref<import('react').Component<{}, any, any>>;
|
|
3
|
+
}>;
|
|
4
4
|
export default ArrowDown;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const ArrowUpDown: import('@emotion/styled').StyledComponent<import('@mui/
|
|
2
|
-
ref?: import('react').Ref<
|
|
3
|
-
}
|
|
1
|
+
export declare const ArrowUpDown: import('@emotion/styled').StyledComponent<Pick<{}, never> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, {}, {
|
|
2
|
+
ref?: import('react').Ref<import('react').Component<{}, any, any>>;
|
|
3
|
+
}>;
|
|
4
4
|
export default ArrowUpDown;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const ArrowUpTwo: import('@emotion/styled').StyledComponent<import('@mui/
|
|
2
|
-
ref?: import('react').Ref<
|
|
3
|
-
}
|
|
1
|
+
export declare const ArrowUpTwo: import('@emotion/styled').StyledComponent<Pick<{}, never> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, {}, {
|
|
2
|
+
ref?: import('react').Ref<import('react').Component<{}, any, any>>;
|
|
3
|
+
}>;
|
|
4
4
|
export default ArrowUpTwo;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const Assignments: import('@emotion/styled').StyledComponent<import('@mui/
|
|
2
|
-
ref?: import('react').Ref<
|
|
3
|
-
}
|
|
1
|
+
export declare const Assignments: import('@emotion/styled').StyledComponent<Pick<{}, never> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, {}, {
|
|
2
|
+
ref?: import('react').Ref<import('react').Component<{}, any, any>>;
|
|
3
|
+
}>;
|
|
4
4
|
export default Assignments;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const BlankCircle: import('@emotion/styled').StyledComponent<import('@mui/
|
|
2
|
-
ref?: import('react').Ref<
|
|
3
|
-
}
|
|
1
|
+
export declare const BlankCircle: import('@emotion/styled').StyledComponent<Pick<{}, never> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, {}, {
|
|
2
|
+
ref?: import('react').Ref<import('react').Component<{}, any, any>>;
|
|
3
|
+
}>;
|
|
4
4
|
export default BlankCircle;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
|
|
3
|
-
export declare const BlockFiled: import('@emotion/styled').StyledComponent<import('@mui/
|
|
4
|
-
ref?: React.Ref<
|
|
5
|
-
}
|
|
3
|
+
export declare const BlockFiled: import('@emotion/styled').StyledComponent<Pick<{}, never> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, {}, {
|
|
4
|
+
ref?: React.Ref<React.Component<{}, any, any>>;
|
|
5
|
+
}>;
|
|
6
6
|
export default BlockFiled;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const CalendarAdd: import('@emotion/styled').StyledComponent<import('@mui/
|
|
2
|
-
ref?: import('react').Ref<
|
|
3
|
-
}
|
|
1
|
+
export declare const CalendarAdd: import('@emotion/styled').StyledComponent<Pick<{}, never> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, {}, {
|
|
2
|
+
ref?: import('react').Ref<import('react').Component<{}, any, any>>;
|
|
3
|
+
}>;
|
|
4
4
|
export default CalendarAdd;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const Calendar: import('@emotion/styled').StyledComponent<import('@mui/
|
|
2
|
-
ref?: import('react').Ref<
|
|
3
|
-
}
|
|
1
|
+
export declare const Calendar: import('@emotion/styled').StyledComponent<Pick<{}, never> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, {}, {
|
|
2
|
+
ref?: import('react').Ref<import('react').Component<{}, any, any>>;
|
|
3
|
+
}>;
|
|
4
4
|
export default Calendar;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const CheckboxSquare: import('@emotion/styled').StyledComponent<import('@mui/
|
|
2
|
-
ref?: import('react').Ref<
|
|
3
|
-
}
|
|
1
|
+
export declare const CheckboxSquare: import('@emotion/styled').StyledComponent<Pick<{}, never> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, {}, {
|
|
2
|
+
ref?: import('react').Ref<import('react').Component<{}, any, any>>;
|
|
3
|
+
}>;
|
|
4
4
|
export default CheckboxSquare;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
|
|
3
|
-
export declare const CircularArrowSetting: import('@emotion/styled').StyledComponent<import('@mui/
|
|
4
|
-
ref?: React.Ref<
|
|
5
|
-
}
|
|
3
|
+
export declare const CircularArrowSetting: import('@emotion/styled').StyledComponent<Pick<{}, never> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, {}, {
|
|
4
|
+
ref?: React.Ref<React.Component<{}, any, any>>;
|
|
5
|
+
}>;
|
|
6
6
|
export default CircularArrowSetting;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const Clock: import('@emotion/styled').StyledComponent<import('@mui/
|
|
2
|
-
ref?: import('react').Ref<
|
|
3
|
-
}
|
|
1
|
+
export declare const Clock: import('@emotion/styled').StyledComponent<Pick<{}, never> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, {}, {
|
|
2
|
+
ref?: import('react').Ref<import('react').Component<{}, any, any>>;
|
|
3
|
+
}>;
|
|
4
4
|
export default Clock;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
|
|
3
|
-
export declare const Close: import('@emotion/styled').StyledComponent<import('@mui/
|
|
4
|
-
ref?: React.Ref<
|
|
5
|
-
}
|
|
3
|
+
export declare const Close: import('@emotion/styled').StyledComponent<Pick<{}, never> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, {}, {
|
|
4
|
+
ref?: React.Ref<React.Component<{}, any, any>>;
|
|
5
|
+
}>;
|
|
6
6
|
export default Close;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const CoinOutline: import('@emotion/styled').StyledComponent<import('@mui/
|
|
2
|
-
ref?: import('react').Ref<
|
|
3
|
-
}
|
|
1
|
+
export declare const CoinOutline: import('@emotion/styled').StyledComponent<Pick<{}, never> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, {}, {
|
|
2
|
+
ref?: import('react').Ref<import('react').Component<{}, any, any>>;
|
|
3
|
+
}>;
|
|
4
4
|
export default CoinOutline;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const Copy: import('@emotion/styled').StyledComponent<import('@mui/
|
|
2
|
-
ref?: import('react').Ref<
|
|
3
|
-
}
|
|
1
|
+
export declare const Copy: import('@emotion/styled').StyledComponent<Pick<{}, never> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, {}, {
|
|
2
|
+
ref?: import('react').Ref<import('react').Component<{}, any, any>>;
|
|
3
|
+
}>;
|
|
4
4
|
export default Copy;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const Coupon: import('@emotion/styled').StyledComponent<import('@mui/
|
|
2
|
-
ref?: import('react').Ref<
|
|
3
|
-
}
|
|
1
|
+
export declare const Coupon: import('@emotion/styled').StyledComponent<Pick<{}, never> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, {}, {
|
|
2
|
+
ref?: import('react').Ref<import('react').Component<{}, any, any>>;
|
|
3
|
+
}>;
|
|
4
4
|
export default Coupon;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
|
|
3
|
-
export declare const CrossHire: import('@emotion/styled').StyledComponent<import('@mui/
|
|
4
|
-
ref?: React.Ref<
|
|
5
|
-
}
|
|
3
|
+
export declare const CrossHire: import('@emotion/styled').StyledComponent<Pick<{}, never> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, {}, {
|
|
4
|
+
ref?: React.Ref<React.Component<{}, any, any>>;
|
|
5
|
+
}>;
|
|
6
6
|
export default CrossHire;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SvgIcon } from '@mui/material';
|
|
2
2
|
|
|
3
|
-
declare const Styled: (Icon: typeof SvgIcon) => import('@emotion/styled').StyledComponent<import('@mui/
|
|
4
|
-
ref?: import('react').Ref<
|
|
5
|
-
}
|
|
3
|
+
declare const Styled: (Icon: typeof SvgIcon) => import('@emotion/styled').StyledComponent<Pick<{}, never> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, {}, {
|
|
4
|
+
ref?: import('react').Ref<import('react').Component<{}, any, any>>;
|
|
5
|
+
}>;
|
|
6
6
|
export { Styled };
|
|
7
7
|
export default Styled;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const Dashboard: import('@emotion/styled').StyledComponent<import('@mui/
|
|
2
|
-
ref?: import('react').Ref<
|
|
3
|
-
}
|
|
1
|
+
export declare const Dashboard: import('@emotion/styled').StyledComponent<Pick<{}, never> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, {}, {
|
|
2
|
+
ref?: import('react').Ref<import('react').Component<{}, any, any>>;
|
|
3
|
+
}>;
|
|
4
4
|
export default Dashboard;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const DocumentDownload: import('@emotion/styled').StyledComponent<import('@mui/
|
|
2
|
-
ref?: import('react').Ref<
|
|
3
|
-
}
|
|
1
|
+
export declare const DocumentDownload: import('@emotion/styled').StyledComponent<Pick<{}, never> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, {}, {
|
|
2
|
+
ref?: import('react').Ref<import('react').Component<{}, any, any>>;
|
|
3
|
+
}>;
|
|
4
4
|
export default DocumentDownload;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const Document: import('@emotion/styled').StyledComponent<import('@mui/
|
|
2
|
-
ref?: import('react').Ref<
|
|
3
|
-
}
|
|
1
|
+
export declare const Document: import('@emotion/styled').StyledComponent<Pick<{}, never> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, {}, {
|
|
2
|
+
ref?: import('react').Ref<import('react').Component<{}, any, any>>;
|
|
3
|
+
}>;
|
|
4
4
|
export default Document;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
|
|
3
|
-
export declare const DollarCircleFilled: import('@emotion/styled').StyledComponent<import('@mui/
|
|
4
|
-
ref?: React.Ref<
|
|
5
|
-
}
|
|
3
|
+
export declare const DollarCircleFilled: import('@emotion/styled').StyledComponent<Pick<{}, never> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, {}, {
|
|
4
|
+
ref?: React.Ref<React.Component<{}, any, any>>;
|
|
5
|
+
}>;
|
|
6
6
|
export default DollarCircleFilled;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const DollarCircle: import('@emotion/styled').StyledComponent<import('@mui/
|
|
2
|
-
ref?: import('react').Ref<
|
|
3
|
-
}
|
|
1
|
+
export declare const DollarCircle: import('@emotion/styled').StyledComponent<Pick<{}, never> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, {}, {
|
|
2
|
+
ref?: import('react').Ref<import('react').Component<{}, any, any>>;
|
|
3
|
+
}>;
|
|
4
4
|
export default DollarCircle;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const Edit: import('@emotion/styled').StyledComponent<import('@mui/
|
|
2
|
-
ref?: import('react').Ref<
|
|
3
|
-
}
|
|
1
|
+
export declare const Edit: import('@emotion/styled').StyledComponent<Pick<{}, never> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, {}, {
|
|
2
|
+
ref?: import('react').Ref<import('react').Component<{}, any, any>>;
|
|
3
|
+
}>;
|
|
4
4
|
export default Edit;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const Email: import('@emotion/styled').StyledComponent<import('@mui/
|
|
2
|
-
ref?: import('react').Ref<
|
|
3
|
-
}
|
|
1
|
+
export declare const Email: import('@emotion/styled').StyledComponent<Pick<{}, never> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, {}, {
|
|
2
|
+
ref?: import('react').Ref<import('react').Component<{}, any, any>>;
|
|
3
|
+
}>;
|
|
4
4
|
export default Email;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
|
|
3
|
-
export declare const Export: import('@emotion/styled').StyledComponent<import('@mui/
|
|
4
|
-
ref?: React.Ref<
|
|
5
|
-
}
|
|
3
|
+
export declare const Export: import('@emotion/styled').StyledComponent<Pick<{}, never> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, {}, {
|
|
4
|
+
ref?: React.Ref<React.Component<{}, any, any>>;
|
|
5
|
+
}>;
|
|
6
6
|
export default Export;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const EyeOff: import('@emotion/styled').StyledComponent<import('@mui/
|
|
2
|
-
ref?: import('react').Ref<
|
|
3
|
-
}
|
|
1
|
+
export declare const EyeOff: import('@emotion/styled').StyledComponent<Pick<{}, never> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, {}, {
|
|
2
|
+
ref?: import('react').Ref<import('react').Component<{}, any, any>>;
|
|
3
|
+
}>;
|
|
4
4
|
export default EyeOff;
|