@asaleh37/ui-base 25.8.1-1 → 25.8.1-11

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@asaleh37/ui-base",
3
- "version": "25.8.1-1",
3
+ "version": "25.8.1-11",
4
4
  "description": "",
5
5
  "license": "ISC",
6
6
  "author": "Ahmed Saleh Mohamed",
@@ -7,4 +7,3 @@ export { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
7
7
  export type { FontAwesomeIconProps } from "@fortawesome/react-fontawesome";
8
8
  export * from "./templates";
9
9
  export * from "@mui/x-tree-view/models";
10
- export { useParams } from "react-router-dom";
@@ -3,6 +3,7 @@ import { AdapterMoment } from "@mui/x-date-pickers/AdapterMoment";
3
3
  import moment from "moment";
4
4
  import { DATE_FORMAT } from "../../../../../util/constants";
5
5
  import { useTranslation } from "react-i18next";
6
+ import TemplateTextField from "./TemplateTextField";
6
7
 
7
8
  interface DatefieldProps {
8
9
  value: string | null;
@@ -44,7 +45,9 @@ const Datefield: React.FC<DatefieldProps> = (props) => {
44
45
  }}
45
46
  slotProps={{
46
47
  textField: {
47
- InputLabelProps: { shrink: true },
48
+ slotProps: {
49
+ inputLabel: { shrink: true },
50
+ },
48
51
  variant: "outlined",
49
52
  required: props.required,
50
53
  error:
@@ -56,6 +59,19 @@ const Datefield: React.FC<DatefieldProps> = (props) => {
56
59
  <></>
57
60
  ),
58
61
  },
62
+ // textField: {
63
+ // InputLabelProps: { shrink: true },
64
+ // variant: "outlined",
65
+ // required: props.required,
66
+ // error:
67
+ // props.errorMessage !== undefined && props.errorMessage != null,
68
+ // helperText:
69
+ // props.errorMessage !== undefined && props.errorMessage != null ? (
70
+ // <>{t(props.errorMessage)}</>
71
+ // ) : (
72
+ // <></>
73
+ // ),
74
+ // },
59
75
  }}
60
76
  />
61
77
  </LocalizationProvider>
@@ -44,6 +44,9 @@ const DatetimeField: React.FC<DatetimeFieldProps> = (props) => {
44
44
  }}
45
45
  slotProps={{
46
46
  textField: {
47
+ slotProps: {
48
+ inputLabel: { shrink: true },
49
+ },
47
50
  variant: "outlined",
48
51
  required: props.required,
49
52
  error:
@@ -140,7 +140,7 @@ const TemplateGrid: React.FC<TemplateGridProps> = (props) => {
140
140
  }
141
141
 
142
142
  const themeDirection = useSelector(
143
- (state: any) => state.AppLayout.appDirection
143
+ (state: any) => state.AppLayout.appDirection
144
144
  );
145
145
 
146
146
  const clearGridState = () => {
@@ -29,5 +29,7 @@ export { default as TemplatePieChart } from "./visuals/charts/TemplatePieChart";
29
29
  export { default as DashboardRouteView } from "./visuals/DashboardRouteView";
30
30
  export { default as DashboardViewer } from "./visuals/DashboardViewer";
31
31
 
32
+ export { default as FormElement } from "./DataEntryTemplates/TemplateDataForm/FormElementField";
33
+
32
34
  export type * from "./DataEntryTemplates/DataEntryTypes";
33
35
  export type { TransferListProps } from "./TransferList";
@@ -1,3 +1,8 @@
1
+ import { useForm } from "react-hook-form";
2
+ import { useParams } from "react-router-dom";
3
+ import { zodResolver } from "@hookform/resolvers/zod";
4
+ import * as z from "zod";
5
+ import { useDispatch, useSelector } from "react-redux";
1
6
  export { default as useAxios } from "./useAxios";
2
7
  export { useConfirmationWindow } from "./UseConfirmationWindow";
3
8
  export { default as useLoadingMask } from "./useLoadingMask";
@@ -5,3 +10,7 @@ export { useIsMobile } from "./UseMobile";
5
10
  export { default as useSession } from "./UseSession";
6
11
  export { useWindow } from "./UseWindow";
7
12
  export { default as useApiActions } from "./useApiActions";
13
+ export { useDispatch };
14
+ export { useSelector };
15
+ export { useParams };
16
+ export { useForm, zodResolver, z };
package/src/index.ts CHANGED
@@ -2,4 +2,3 @@ export * from "./components";
2
2
  export * from "./hooks";
3
3
  export * from "./util";
4
4
  export * from "./types";
5
-