tp-react-elements-dev 0.2.0 → 0.3.0

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.
@@ -0,0 +1,17 @@
1
+ import { FormSectionPropsItem } from "./FormRender";
2
+ import * as Yup from "yup";
3
+ export interface InitialValues {
4
+ [key: string]: string | number | null;
5
+ }
6
+ export interface ValidationShape {
7
+ [key: string]: Yup.Schema<any>;
8
+ }
9
+ declare const useFormValidatingContext: (formArray: FormSectionPropsItem[]) => {
10
+ validationSchema: Yup.ObjectSchema<{
11
+ [x: string]: any;
12
+ }, Yup.AnyObject, {
13
+ [x: string]: any;
14
+ }, "">;
15
+ initialValues: InitialValues;
16
+ };
17
+ export default useFormValidatingContext;
@@ -7,7 +7,7 @@ interface OptionsProps {
7
7
  export interface FormSectionPropsItem {
8
8
  name: string;
9
9
  label: string;
10
- inputType: 'text' | 'password' | 'number' | 'select' | 'datepicker' | 'multiselect' | 'select-v2' | 'register-number' | 'decimal' | 'alpha-numerical' | 'datepicker' | 'yearpicker' | 'dateRangePicker' | 'monthpicker' | 'multiselect' | 'file' | 'textarea';
10
+ inputType: "text" | "password" | "number" | "select" | "datepicker" | "multiselect" | "select-v2" | "register-number" | "decimal" | "alpha-numerical" | "datepicker" | "yearpicker" | "dateRangePicker" | "monthpicker" | "multiselect" | "file" | "textarea";
11
11
  options?: OptionsProps[];
12
12
  required?: boolean;
13
13
  errorMessage?: string;
@@ -30,5 +30,5 @@ export interface FormRenderProps {
30
30
  clearErrors: any;
31
31
  setValue: any;
32
32
  }
33
- declare const RenderForm: (props: FormRenderProps) => import("react/jsx-runtime").JSX.Element | undefined;
33
+ declare const RenderForm: (props: FormRenderProps) => import("react/jsx-runtime").JSX.Element;
34
34
  export default RenderForm;
@@ -1,9 +1,10 @@
1
1
  import { FormSectionPropsItem } from "./FormRender";
2
+ import { FieldValues, UseFormReturn } from "react-hook-form";
2
3
  export interface FormRenderWrapperProps {
3
4
  formArray: FormSectionPropsItem[];
4
5
  name: string;
5
- setFormFunctions: any;
6
6
  numberOfColumns?: number;
7
+ form: UseFormReturn<FieldValues, any, undefined>;
7
8
  }
8
- declare const FormRenderWrapper: ({ formArray, name, setFormFunctions, numberOfColumns }: FormRenderWrapperProps) => import("react/jsx-runtime").JSX.Element;
9
+ declare const FormRenderWrapper: ({ formArray, name, numberOfColumns, form, }: FormRenderWrapperProps) => import("react/jsx-runtime").JSX.Element;
9
10
  export default FormRenderWrapper;
@@ -1,2 +1,3 @@
1
1
  export { default as Button } from "../components/Button/Button";
2
2
  export { default as RenderForm } from "../components/Form/FormRenderWrapper";
3
+ export { default as useFormValidatingContext } from "../components/Form/FormConstants";
package/dist/index.css CHANGED
@@ -1 +1 @@
1
- .rs-picker-default .rs-picker-toggle.rs-btn{padding-bottom:7px;padding-top:7px;width:282px}.rs-picker-default .rs-picker-toggle{border:1px solid #e5e5ea;color:#575757;cursor:pointer;display:inline-block;outline:none;padding-left:44px;padding-right:67px;position:relative;z-index:5}.rs-picker-toggle-caret{color:#8e8e93;display:inline-block;font-weight:400;margin-right:240px;position:absolute;right:12px;top:8px}.rs-picker-toolbar-right-btn-ok{background-color:#3498ff;border:none;border-radius:30px;color:#fff;cursor:pointer;font-size:14px;outline:0;padding:8px 12px;text-align:center;width:100px}.rs-picker-menu .rs-calendar .rs-calendar-table-cell-content{border-radius:21px;display:inline-block;padding-left:0;padding-right:0}.css-1xisk3n{background:#ebf4f8!important}.css-xpa0r5-MuiButtonBase-root-MuiIconButton-root{border-radius:4px!important}.calender h6,.calender p{font-size:11px!important}.calender .css-1fre31j,.calender .css-1j13ek9-MuiGrid-root{padding:0}
1
+ .rs-picker-default .rs-picker-toggle.rs-btn{padding-bottom:7px;padding-top:7px;width:282px}.rs-picker-default .rs-picker-toggle{border:1px solid #e5e5ea;color:#575757;cursor:pointer;display:inline-block;outline:none;padding-left:44px;padding-right:67px;position:relative;z-index:5}.rs-picker-toggle-caret{color:#8e8e93;display:inline-block;font-weight:400;margin-right:240px;position:absolute;right:12px;top:8px}.rs-picker-toolbar-right-btn-ok{background-color:#3498ff;border:none;border-radius:30px;color:#fff;cursor:pointer;font-size:14px;outline:0;padding:8px 12px;text-align:center;width:100px}.rs-picker-menu .rs-calendar .rs-calendar-table-cell-content{border-radius:21px;display:inline-block;padding-left:0;padding-right:0}.css-1xisk3n{background:#ebf4f8!important}.css-xpa0r5-MuiButtonBase-root-MuiIconButton-root{border-radius:4px!important}.calender h6,.calender p{font-size:11px!important}@import "../assets/fonts/icon/flaticon_hvc.css";@font-face{font-display:swap;font-family:Roboto-Reg;src:url(../../assets/fonts/roboto-regular-webfont.woff) format("woff")}@font-face{font-display:swap;font-family:Roboto-Med;src:url(../../assets/fonts/roboto-medium-webfont.woff) format("woff")}@font-face{font-display:swap;font-family:Roboto;src:url(../../assets/fonts/roboto-bold-webfont.woff) format("woff")}*,.calender .css-1fre31j,.calender .css-1j13ek9-MuiGrid-root{padding:0}*{box-sizing:border-box;margin:0}html{background:#f8f8f8;height:100vh}body{background:#f8f8f8!important;font-family:Roboto;overflow-x:hidden}.MuiAccordionSummary-expandIconWrapper{color:#fff!important}.MuiAccordionSummary-root.Mui-expanded{min-height:40px!important}.MuiAccordionSummary-content.Mui-expanded{margin:0!important}.MuiAccordionSummary-content.Mui-expanded div{margin:12px 0!important}.action_icons{display:none}.list_action:hover .action_icons{background:#fff;border-radius:10px;box-shadow:0 0 10px #7f7f7f;-moz-column-count:2;column-count:2;display:block;left:60px;list-style-type:none;margin-top:-20px;padding:10px;position:absolute;top:auto 12px;z-index:110}.action_icons:hover{display:flex;flex-direction:column}.action_icons li{align-items:center;color:#0a8fdc;cursor:pointer;display:flex;line-height:1;padding:5px 0}.action_icons li:hover{color:#266c9a;text-decoration:underline}.action_icons li svg{font-size:16px;margin-right:10px}.product-table thead tr{background:#edf3f7}.product-table thead tr th:nth-child(4){width:120px}.product-table thead tr th:nth-child(7){width:50px}.product-table thead tr th:nth-child(6){width:100px}.product-table thead tr th:nth-child(2){width:60px}.product-table thead tr th:nth-child(3){width:100px}.product-table thead tr th:nth-child(5){width:125px}.product-table thead tr th:nth-child(10),.product-table thead tr th:nth-child(8),.product-table thead tr th:nth-child(9){width:100px}.product-table thead tr th:nth-child(11){width:90px}.product-table thead tr th:nth-child(12){width:80px}.product-table thead tr th:nth-child(13){width:100px}.product-table thead tr th:nth-child(14){width:50px}.product-table thead tr th:nth-child(16){width:120px}.product-table thead tr th:nth-child(15){width:60px}.product-table thead tr th:nth-child(17){width:130px}.product-table thead tr th:first-child{width:50px}.product-table thead tr th:last-child{width:60px}.MuiButton-root{box-shadow:none!important}.description-card{height:100%}.danger-badge{color:#dc3545}.danger-badge,.success-badge{border-radius:10px;display:inline-block;padding:2px 14px}.success-badge{color:#198754}.menu-wrapper p{color:#fff!important}.menu-item-wrapper:hover h6,.menu-item-wrapper:hover p,.menu-item-wrapper:hover svg,.menu-wrapper .second-level-wrapper p{color:#000!important}.css-12qr4rk-MuiTableCell-root{font-size:11px;padding:16px 0 16px 14px!important}@keyframes loader__wrapper{0%{transform:translate(-50%,-50%) rotate(0deg)}to{transform:translate(-50%,-50%) rotate(1turn)}}.loader__wrapper{backface-visibility:hidden;height:100%;position:relative;transform:translateZ(0) scale(.64);transform-origin:0 0;width:100%}.loader__wrapper div{animation:loader__wrapper 1s linear infinite;border:10px solid #00adff;border-radius:50%;border-top-color:#0000;box-sizing:initial;height:60px;left:50px;position:absolute;top:50px;width:60px}.loader{background:#0000;display:block;height:64px;margin:0 auto;overflow:hidden;width:64px}
@@ -1 +1 @@
1
- .rs-picker-default .rs-picker-toggle.rs-btn{padding-bottom:7px;padding-top:7px;width:282px}.rs-picker-default .rs-picker-toggle{border:1px solid #e5e5ea;color:#575757;cursor:pointer;display:inline-block;outline:none;padding-left:44px;padding-right:67px;position:relative;z-index:5}.rs-picker-toggle-caret{color:#8e8e93;display:inline-block;font-weight:400;margin-right:240px;position:absolute;right:12px;top:8px}.rs-picker-toolbar-right-btn-ok{background-color:#3498ff;border:none;border-radius:30px;color:#fff;cursor:pointer;font-size:14px;outline:0;padding:8px 12px;text-align:center;width:100px}.rs-picker-menu .rs-calendar .rs-calendar-table-cell-content{border-radius:21px;display:inline-block;padding-left:0;padding-right:0}.css-1xisk3n{background:#ebf4f8!important}.css-xpa0r5-MuiButtonBase-root-MuiIconButton-root{border-radius:4px!important}.calender h6,.calender p{font-size:11px!important}.calender .css-1fre31j,.calender .css-1j13ek9-MuiGrid-root{padding:0}
1
+ .rs-picker-default .rs-picker-toggle.rs-btn{padding-bottom:7px;padding-top:7px;width:282px}.rs-picker-default .rs-picker-toggle{border:1px solid #e5e5ea;color:#575757;cursor:pointer;display:inline-block;outline:none;padding-left:44px;padding-right:67px;position:relative;z-index:5}.rs-picker-toggle-caret{color:#8e8e93;display:inline-block;font-weight:400;margin-right:240px;position:absolute;right:12px;top:8px}.rs-picker-toolbar-right-btn-ok{background-color:#3498ff;border:none;border-radius:30px;color:#fff;cursor:pointer;font-size:14px;outline:0;padding:8px 12px;text-align:center;width:100px}.rs-picker-menu .rs-calendar .rs-calendar-table-cell-content{border-radius:21px;display:inline-block;padding-left:0;padding-right:0}.css-1xisk3n{background:#ebf4f8!important}.css-xpa0r5-MuiButtonBase-root-MuiIconButton-root{border-radius:4px!important}.calender h6,.calender p{font-size:11px!important}@import "../assets/fonts/icon/flaticon_hvc.css";@font-face{font-display:swap;font-family:Roboto-Reg;src:url(../../assets/fonts/roboto-regular-webfont.woff) format("woff")}@font-face{font-display:swap;font-family:Roboto-Med;src:url(../../assets/fonts/roboto-medium-webfont.woff) format("woff")}@font-face{font-display:swap;font-family:Roboto;src:url(../../assets/fonts/roboto-bold-webfont.woff) format("woff")}*,.calender .css-1fre31j,.calender .css-1j13ek9-MuiGrid-root{padding:0}*{box-sizing:border-box;margin:0}html{background:#f8f8f8;height:100vh}body{background:#f8f8f8!important;font-family:Roboto;overflow-x:hidden}.MuiAccordionSummary-expandIconWrapper{color:#fff!important}.MuiAccordionSummary-root.Mui-expanded{min-height:40px!important}.MuiAccordionSummary-content.Mui-expanded{margin:0!important}.MuiAccordionSummary-content.Mui-expanded div{margin:12px 0!important}.action_icons{display:none}.list_action:hover .action_icons{background:#fff;border-radius:10px;box-shadow:0 0 10px #7f7f7f;-moz-column-count:2;column-count:2;display:block;left:60px;list-style-type:none;margin-top:-20px;padding:10px;position:absolute;top:auto 12px;z-index:110}.action_icons:hover{display:flex;flex-direction:column}.action_icons li{align-items:center;color:#0a8fdc;cursor:pointer;display:flex;line-height:1;padding:5px 0}.action_icons li:hover{color:#266c9a;text-decoration:underline}.action_icons li svg{font-size:16px;margin-right:10px}.product-table thead tr{background:#edf3f7}.product-table thead tr th:nth-child(4){width:120px}.product-table thead tr th:nth-child(7){width:50px}.product-table thead tr th:nth-child(6){width:100px}.product-table thead tr th:nth-child(2){width:60px}.product-table thead tr th:nth-child(3){width:100px}.product-table thead tr th:nth-child(5){width:125px}.product-table thead tr th:nth-child(10),.product-table thead tr th:nth-child(8),.product-table thead tr th:nth-child(9){width:100px}.product-table thead tr th:nth-child(11){width:90px}.product-table thead tr th:nth-child(12){width:80px}.product-table thead tr th:nth-child(13){width:100px}.product-table thead tr th:nth-child(14){width:50px}.product-table thead tr th:nth-child(16){width:120px}.product-table thead tr th:nth-child(15){width:60px}.product-table thead tr th:nth-child(17){width:130px}.product-table thead tr th:first-child{width:50px}.product-table thead tr th:last-child{width:60px}.MuiButton-root{box-shadow:none!important}.description-card{height:100%}.danger-badge{color:#dc3545}.danger-badge,.success-badge{border-radius:10px;display:inline-block;padding:2px 14px}.success-badge{color:#198754}.menu-wrapper p{color:#fff!important}.menu-item-wrapper:hover h6,.menu-item-wrapper:hover p,.menu-item-wrapper:hover svg,.menu-wrapper .second-level-wrapper p{color:#000!important}.css-12qr4rk-MuiTableCell-root{font-size:11px;padding:16px 0 16px 14px!important}@keyframes loader__wrapper{0%{transform:translate(-50%,-50%) rotate(0deg)}to{transform:translate(-50%,-50%) rotate(1turn)}}.loader__wrapper{backface-visibility:hidden;height:100%;position:relative;transform:translateZ(0) scale(.64);transform-origin:0 0;width:100%}.loader__wrapper div{animation:loader__wrapper 1s linear infinite;border:10px solid #00adff;border-radius:50%;border-top-color:#0000;box-sizing:initial;height:60px;left:50px;position:absolute;top:50px;width:60px}.loader{background:#0000;display:block;height:64px;margin:0 auto;overflow:hidden;width:64px}