@dexteel/mesf-core 4.16.8 → 4.18.1

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.
Files changed (80) hide show
  1. package/.github/workflows/publish-to-npm.yaml +10 -6
  2. package/.husky/pre-commit +14 -0
  3. package/.release-please-manifest.json +1 -1
  4. package/CHANGELOG.md +47 -0
  5. package/biome.json +11 -0
  6. package/dist/MESFMain.d.ts +1 -1
  7. package/dist/components/modals/modal.mesf.d.ts +1 -1
  8. package/dist/components/shared/buttons/button-with-loading.d.ts +1 -2
  9. package/dist/configuration/pages/asset/components/AssetConfiguration/CustomDragPreview.d.ts +1 -1
  10. package/dist/configuration/pages/asset/components/AssetConfiguration/CustomNode.d.ts +1 -1
  11. package/dist/configuration/pages/asset/components/AssetConfiguration/MultipleDragPreview.d.ts +1 -1
  12. package/dist/configuration/pages/asset/components/hooks/useAssetActions.d.ts +1 -1
  13. package/dist/configuration/pages/asset/context/ConfigurationAssetContext.d.ts +1 -1
  14. package/dist/configuration/pages/job/components/JobsTable/TableJobs.d.ts +6 -1
  15. package/dist/configuration/pages/job/components/JobsTable/customHooks/useJobsOptionsFunctions.d.ts +10 -0
  16. package/dist/configuration/pages/job/components/JobsTable/customHooks/useJobsTableData.d.ts +3 -3
  17. package/dist/configuration/pages/job/context/JobsContext.d.ts +1 -1
  18. package/dist/configuration/pages/log/components/LogsTable/customHooks/useLogsOptionsFunctions.d.ts +11 -0
  19. package/dist/configuration/pages/log/context/LogsContext.d.ts +1 -1
  20. package/dist/configuration/pages/profiles/components/Delete/DeleteProfile.d.ts +2 -2
  21. package/dist/configuration/pages/profiles/components/ProfilesTable/customHooks/useProfilesOptionsFunctions.d.ts +12 -0
  22. package/dist/configuration/pages/profiles/components/ProfilesTable/customHooks/useTableData.d.ts +4 -4
  23. package/dist/configuration/pages/profiles/context/ProfileContext.d.ts +1 -1
  24. package/dist/configuration/pages/profiles/index.d.ts +2 -2
  25. package/dist/configuration/pages/shifCrew/components/customHooks/useShiftsOptionsFunctions.d.ts +11 -0
  26. package/dist/configuration/pages/shifCrew/components/customHooks/useTableShift.d.ts +2 -1
  27. package/dist/configuration/pages/shifCrew/context/ShiftsCrewsContext.d.ts +1 -1
  28. package/dist/configuration/pages/users/components/Delete/DeleteUser.d.ts +2 -2
  29. package/dist/configuration/pages/users/components/EditUser/EditUser.d.ts +2 -2
  30. package/dist/configuration/pages/users/components/UsersDataTable/customHooks/useTableData.d.ts +3 -4
  31. package/dist/configuration/pages/users/components/UsersDataTable/customHooks/useUsersOptionsFunctions.d.ts +13 -0
  32. package/dist/configuration/pages/users/components/common/AuthTypeSelector.d.ts +2 -1
  33. package/dist/configuration/pages/users/components/common/ProfilesPicker.d.ts +2 -1
  34. package/dist/configuration/pages/users/context/UsersContext.d.ts +1 -1
  35. package/dist/context/UTLSettingContext.d.ts +1 -1
  36. package/dist/context/assetContext.d.ts +1 -1
  37. package/dist/context/userContext.d.ts +1 -1
  38. package/dist/controls/alert.d.ts +1 -1
  39. package/dist/controls/charts/genericChart.d.ts +1 -1
  40. package/dist/controls/contextMenu/ContextMenu.d.ts +2 -0
  41. package/dist/controls/contextMenu/index.d.ts +4 -0
  42. package/dist/controls/contextMenu/models/MenuOptionType.d.ts +10 -0
  43. package/dist/controls/contextMenu/styles/ContextMenuStyles.d.ts +1 -0
  44. package/dist/controls/contextMenu/useContextMenuMESF.d.ts +22 -0
  45. package/dist/controls/index.d.ts +2 -1
  46. package/dist/controls/panels.d.ts +1 -1
  47. package/dist/controls/shift-navigator/component/shift-navigator.control.d.ts +1 -0
  48. package/dist/controls/shift-navigator/context/ShiftNavigatorProvider.d.ts +1 -1
  49. package/dist/controls/shift-navigator/hook/useShiftNavigator.d.ts +1 -1
  50. package/dist/controls/shift-navigator/index.d.ts +5 -5
  51. package/dist/controls/tables/dataGrid.d.ts +1 -1
  52. package/dist/hooks/useSearchUTLSetting.d.ts +1 -1
  53. package/dist/index.d.ts +3 -3
  54. package/dist/index.esm.js +3382 -2871
  55. package/dist/index.esm.js.map +1 -1
  56. package/dist/pages/trendings/components/chart/TableComponent.d.ts +4 -4
  57. package/dist/pages/trendings/components/chart/components/CellComponent.d.ts +3 -3
  58. package/dist/pages/trendings/components/chart/components/ColorPicker.d.ts +1 -1
  59. package/dist/pages/trendings/components/chart/components/DraggableLineControl.d.ts +2 -2
  60. package/dist/pages/trendings/components/chart/components/modals/deleteViewModal/DeleteViewModal.d.ts +2 -2
  61. package/dist/pages/trendings/components/chart/components/modals/editViewModal/EditViewModal.d.ts +2 -2
  62. package/dist/pages/trendings/components/chart/components/modals/loadView/LoadViewModal.d.ts +1 -1
  63. package/dist/pages/trendings/components/chart/components/modals/saveAsView/SaveAsViewModal.d.ts +1 -1
  64. package/dist/pages/trendings/components/chart/components/modals/saveView/SaveViewModal.d.ts +1 -1
  65. package/dist/pages/trendings/components/chart/components/modals/tagsTreeModal/ContextMenu/ContextMenu.d.ts +4 -4
  66. package/dist/pages/trendings/components/chart/components/modals/tagsTreeModal/ContextMenu/NewFolder/NewFolder.d.ts +4 -4
  67. package/dist/pages/trendings/components/chart/components/modals/tagsTreeModal/ContextMenu/RemoveFolder/RemoveFolder.d.ts +4 -4
  68. package/dist/pages/trendings/components/chart/components/modals/tagsTreeModal/TagFolderCustomNode.d.ts +3 -3
  69. package/dist/pages/trendings/components/chart/components/modals/tagsTreeModal/TagSelectionModal.d.ts +1 -1
  70. package/dist/pages/trendings/components/chart/components/modals/tagsTreeModal/TagsTreeModal.d.ts +2 -2
  71. package/dist/pages/trendings/components/chart/context/TrendingContext.d.ts +1 -1
  72. package/dist/pages/trendings/components/chart/hooks/useGetVerticalLinePlugin.d.ts +1 -1
  73. package/dist/pages/trendings/components/chart/hooks/useTagsDataTable.d.ts +1 -1
  74. package/dist/pages/trendings/components/chart/hooks/useUpdateCursorData.d.ts +1 -1
  75. package/dist/pages/trendings/components/chart/hooks/useXAxisDatePlugin.d.ts +1 -1
  76. package/dist/pages/trendings/components/chart/sections/header.d.ts +1 -1
  77. package/dist/pages/trendings/components/chart/sections/trending-chart.d.ts +1 -1
  78. package/dist/pages/trendings/index.d.ts +1 -1
  79. package/dist/services/index.d.ts +1 -1
  80. package/package.json +5 -3
@@ -1,31 +1,35 @@
1
1
  name: NPM Publish
2
-
3
2
  on:
4
3
  pull_request:
5
4
  types: [closed]
6
5
  branches:
7
6
  - master
8
-
9
7
  jobs:
10
8
  publish:
11
9
  if: github.event.pull_request.merged == true && startsWith(github.event.pull_request.head.ref, 'release-please')
12
10
  runs-on: ubuntu-latest
13
11
  steps:
14
12
  - uses: actions/checkout@v4
15
-
16
13
  - name: Setup Node.js
17
14
  uses: actions/setup-node@v4
18
15
  with:
19
16
  node-version: 'lts/hydrogen' # Adjust this to your Node.js version
20
17
  registry-url: 'https://registry.npmjs.org'
21
-
22
18
  - name: Install dependencies
23
19
  run: npm install
24
-
25
20
  - name: Build
26
21
  run: npm run build
27
-
28
22
  - name: Publish to npm
29
23
  run: npm publish
30
24
  env:
31
25
  NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
26
+ - name: Read package.json version
27
+ id: package-version
28
+ run: echo "::set-output name=version::$(node -p "require('./package.json').version")"
29
+ - name: Push Notification to Google Workspace
30
+ run: |
31
+ curl -X POST "https://chat.googleapis.com/v1/spaces/AAAA4hvxkZc/messages?key=AIzaSyDdI0hCZtE6vySjMm-WEfRq3CPzqKqqsHI&token=_DSEU_3n-CC5ZDK2nKNfabm2X_M_IcIAqQxenkYgDZk" \
32
+ -H 'Content-Type: application/json' \
33
+ -d '{
34
+ "text": "@dexteel/mesf-core has been deployed :\n\nREPO: *${{ github.repository }}*\nCOMMIT: ${{ github.sha }}\nVERSION: ${{ steps.package-version.outputs.version }}\nJOB: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
35
+ }'
@@ -0,0 +1,14 @@
1
+ # Use Node.js to check if the directory exists and run the command
2
+ node -e "
3
+
4
+ const { execSync } = require('child_process');
5
+
6
+ try {
7
+ execSync('npx @biomejs/biome check --write ./src && git update-index --again', {
8
+ stdio: 'inherit'
9
+ });
10
+ } catch (error) {
11
+ console.error('Error running Biome:', error);
12
+ process.exit(1);
13
+ }
14
+ "
@@ -1,3 +1,3 @@
1
1
  {
2
- ".": "4.16.8"
2
+ ".": "4.18.1"
3
3
  }
package/CHANGELOG.md CHANGED
@@ -1,3 +1,50 @@
1
+ # Changelog
2
+
3
+ ## [4.18.1](https://github.com/dexteel/mesf-core-frontend/compare/@dexteel/mesf-core-v4.18.0...@dexteel/mesf-core-v4.18.1) (2024-08-01)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * wrong imports ([ab36b9f](https://github.com/dexteel/mesf-core-frontend/commit/ab36b9fbd6320888862e16de786aa793a36a637f))
9
+
10
+ ## [4.18.0] - 2024-08-01
11
+
12
+
13
+
14
+ # Changelog
15
+
16
+ ## [4.18.0](https://github.com/dexteel/mesf-core-frontend/compare/@dexteel/mesf-core-v4.17.0...@dexteel/mesf-core-v4.18.0) (2024-08-01)
17
+
18
+
19
+ ### Features
20
+
21
+ * **ContextMenu:** Implement one ContextMenu for whole project ([b96ce77](https://github.com/dexteel/mesf-core-frontend/commit/b96ce77a6bebac3bb7531d464bbf42145b3330b7))
22
+ * **devops:** Implement husky and biome ([470833d](https://github.com/dexteel/mesf-core-frontend/commit/470833d6825df4fb1f5c902ac5216336ea25f711))
23
+
24
+
25
+ ### Bug Fixes
26
+
27
+ * **Config Pages:** Implement new ContextMenuMESF ([0e8cb01](https://github.com/dexteel/mesf-core-frontend/commit/0e8cb01a37d4f7cca9283243dc406d4718b775c2))
28
+
29
+ ## [4.17.0] - 2024-07-31
30
+
31
+
32
+
33
+ # Changelog
34
+
35
+ ## [4.17.0](https://github.com/dexteel/mesf-core-frontend/compare/@dexteel/mesf-core-v4.16.8...@dexteel/mesf-core-v4.17.0) (2024-07-31)
36
+
37
+
38
+ ### Features
39
+
40
+ * **devops:** Add changelog to google message ([bff368b](https://github.com/dexteel/mesf-core-frontend/commit/bff368b6da69c79c31e389b0e5185cef32598034))
41
+ * **devops:** add version to message to google chat ([7490ae1](https://github.com/dexteel/mesf-core-frontend/commit/7490ae12bb70c4385f3660de2101fd758c755f25))
42
+ * **ShiftNavigator:** Add ability to prevent init automatically to ShiftNavigator ([4397857](https://github.com/dexteel/mesf-core-frontend/commit/43978570dc3132b6dab538a1b63d415579596538))
43
+
44
+ ## [4.16.8] - 2024-07-31
45
+
46
+
47
+
1
48
  # Changelog
2
49
 
3
50
  ## [4.16.8](https://github.com/dexteel/mesf-core-frontend/compare/@dexteel/mesf-core-v4.16.7...@dexteel/mesf-core-v4.16.8) (2024-07-31)
package/biome.json ADDED
@@ -0,0 +1,11 @@
1
+ {
2
+ "organizeImports": {
3
+ "enabled": true
4
+ },
5
+ "formatter": {
6
+ "enabled": true
7
+ },
8
+ "linter": {
9
+ "enabled": false
10
+ }
11
+ }
@@ -1,4 +1,4 @@
1
- import React, { ReactNode } from "react";
1
+ import React, { type ReactNode } from "react";
2
2
  import "./css/index.css";
3
3
  import { ConfigurationsType } from "./configurationMenu";
4
4
  interface Props {
@@ -1,5 +1,5 @@
1
+ import { type Theme, type WithStyles } from "@material-ui/core/styles";
1
2
  import React, { ReactNode } from "react";
2
- import { Theme, WithStyles } from "@material-ui/core/styles";
3
3
  declare const styles: (theme: Theme) => import("@material-ui/styles").StyleRules<{}, "root" | "closeButton">;
4
4
  export interface DialogTitleProps extends WithStyles<typeof styles> {
5
5
  id: string;
@@ -1,6 +1,5 @@
1
- import React from 'react';
2
1
  import { ButtonProps } from "@material-ui/core";
3
- import { ReactNode } from "react";
2
+ import React, { ReactNode } from "react";
4
3
  interface Props extends ButtonProps {
5
4
  children?: ReactNode;
6
5
  isLoading: boolean;
@@ -1,5 +1,5 @@
1
- import React from "react";
2
1
  import { DragLayerMonitorProps } from "@minoru/react-dnd-treeview";
2
+ import React from "react";
3
3
  import { FileProperties } from "../../models/FileProperties";
4
4
  type Props = {
5
5
  monitorProps: DragLayerMonitorProps<FileProperties>;
@@ -1,5 +1,5 @@
1
- import React from "react";
2
1
  import { NodeModel, RenderParams } from "@minoru/react-dnd-treeview";
2
+ import React from "react";
3
3
  import { FileProperties } from "../../models/FileProperties";
4
4
  type Props = RenderParams & {
5
5
  node: NodeModel<FileProperties>;
@@ -1,5 +1,5 @@
1
- import React from "react";
2
1
  import { NodeModel } from "@minoru/react-dnd-treeview";
2
+ import React from "react";
3
3
  import { FileProperties } from "../../models/FileProperties";
4
4
  type Props = {
5
5
  dragSources: NodeModel<FileProperties>[];
@@ -1,4 +1,4 @@
1
- import { DropOptions, NodeModel } from "@minoru/react-dnd-treeview";
1
+ import { type DropOptions, type NodeModel } from "@minoru/react-dnd-treeview";
2
2
  import { FileProperties } from "../../models/FileProperties";
3
3
  type Props = {
4
4
  asset: NodeModel<FileProperties>[];
@@ -1,4 +1,4 @@
1
- import { default as React, ReactNode } from "react";
1
+ import { default as React, type ReactNode } from "react";
2
2
  export declare const useConfigurationAssetContext: () => {
3
3
  state: {
4
4
  openAssets: {
@@ -1,2 +1,7 @@
1
1
  import * as React from "react";
2
- export declare const TableJobs: () => React.JSX.Element;
2
+ type Props = {
3
+ getJobsFromAPI: Function;
4
+ isLoading: boolean;
5
+ };
6
+ export declare const TableJobs: ({ getJobsFromAPI, isLoading }: Props) => React.JSX.Element;
7
+ export {};
@@ -0,0 +1,10 @@
1
+ import { MenuOptionType } from "../../../../../../controls";
2
+ import { Job } from "../../../models/Job";
3
+ type Props = {
4
+ getJobsFromAPI: Function;
5
+ setRowSelected: Function;
6
+ };
7
+ export declare const useJobsOptionsFunctions: ({ getJobsFromAPI, setRowSelected, }: Props) => {
8
+ getMenuOptions: (data: Job) => MenuOptionType[];
9
+ };
10
+ export {};
@@ -1,10 +1,10 @@
1
- import { Job } from "../../../models/Job";
2
1
  import { ColDef } from "ag-grid-community";
2
+ import { Job } from "../../../models/Job";
3
3
  type Props = {
4
- getJobsFromAPI: () => Promise<void>;
5
4
  setRowSelected: (job: Job | null) => void;
5
+ showContextMenu: Function;
6
6
  };
7
- export declare const useJobsTableData: ({ setRowSelected }: Props) => {
7
+ export declare const useJobsTableData: ({ setRowSelected, showContextMenu, }: Props) => {
8
8
  rows: {
9
9
  id: number;
10
10
  sProcedure: string;
@@ -1,4 +1,4 @@
1
- import { default as React, ReactNode } from "react";
1
+ import { default as React, type ReactNode } from "react";
2
2
  export declare const useJobsContext: () => {
3
3
  state: {
4
4
  jobsData: import("../models/Job").Job[];
@@ -0,0 +1,11 @@
1
+ import { MenuOptionType } from "../../../../../../controls";
2
+ import { Log } from "../../../models/Log";
3
+ type Props = {
4
+ setSelectedLog: Function;
5
+ setShowLogModal: Function;
6
+ handleResetButtonClick: Function;
7
+ };
8
+ export declare const useLogsOptionsFunctions: ({ setSelectedLog, setShowLogModal, handleResetButtonClick, }: Props) => {
9
+ getMenuOptions: (data: Log) => MenuOptionType[];
10
+ };
11
+ export {};
@@ -1,4 +1,4 @@
1
- import { default as React, ReactNode } from "react";
1
+ import { default as React, type ReactNode } from "react";
2
2
  export declare const useLogsContext: () => {
3
3
  state: {
4
4
  logs: import("../models/Log").Log[];
@@ -1,9 +1,9 @@
1
1
  import React from "react";
2
2
  import { Profile } from "../../models/Profile";
3
3
  type Props = {
4
- profileForDelete: Profile | null;
4
+ profile: Profile | null;
5
5
  show: boolean;
6
6
  onHide: (shouldUpdate: boolean) => void;
7
7
  };
8
- export declare const DeleteProfile: ({ profileForDelete, show, onHide }: Props) => React.JSX.Element;
8
+ export declare const DeleteProfile: ({ profile, show, onHide }: Props) => React.JSX.Element;
9
9
  export {};
@@ -0,0 +1,12 @@
1
+ import { MenuOptionType } from "../../../../../../controls";
2
+ import { Profile } from "../../../models/Profile";
3
+ type Props = {
4
+ setProfileId: Function;
5
+ setShowDeleteModal: Function;
6
+ setShowCreateModal: Function;
7
+ setModalProceduresProfile: Function;
8
+ };
9
+ export declare const useProfilesOptionsFunctions: ({ setProfileId, setShowDeleteModal, setShowCreateModal, setModalProceduresProfile, }: Props) => {
10
+ getMenuOptions: (data: Profile) => MenuOptionType[];
11
+ };
12
+ export {};
@@ -1,12 +1,12 @@
1
- import { Profile } from "../../../models/Profile";
2
1
  import { ColDef } from "ag-grid-community";
2
+ import { Profile } from "../../../models/Profile";
3
3
  type Props = {
4
- setProfileForEdit: (profile: Profile) => void;
4
+ setProfileId: (profile: Profile) => void;
5
5
  setModalProceduresProfile: (showModal: boolean) => void;
6
- setProfileForDelete: (profile: Profile) => void;
7
6
  setModalDeleteProfile: (showModal: boolean) => void;
7
+ showContextMenu: Function;
8
8
  };
9
- export declare const useTableData: ({ setProfileForEdit, setModalProceduresProfile, setProfileForDelete, setModalDeleteProfile, }: Props) => {
9
+ export declare const useTableData: ({ setProfileId, setModalProceduresProfile, setModalDeleteProfile, showContextMenu, }: Props) => {
10
10
  rows: {
11
11
  id: number | null;
12
12
  ProfileId: number | null;
@@ -1,4 +1,4 @@
1
- import { default as React, ReactNode } from "react";
1
+ import { default as React, type ReactNode } from "react";
2
2
  export declare const useProfilesContext: () => {
3
3
  state: {
4
4
  profiles: import("../models/Profile").Profile[];
@@ -1,4 +1,4 @@
1
1
  import * as React from "react";
2
2
  type Props = {};
3
- declare const UsersPage: (props: Props) => React.JSX.Element;
4
- export default UsersPage;
3
+ declare const ProfilesPage: (props: Props) => React.JSX.Element;
4
+ export default ProfilesPage;
@@ -0,0 +1,11 @@
1
+ import { MenuOptionType, ShiftInfo } from "../../../../../controls";
2
+ type Props = {
3
+ setShiftId: Function;
4
+ setShowDeleteModal: Function;
5
+ setShowCreateModal: Function;
6
+ setShowEditModal: Function;
7
+ };
8
+ export declare const useShiftsOptionsFunctions: ({ setShiftId, setShowDeleteModal, setShowCreateModal, setShowEditModal, }: Props) => {
9
+ getMenuOptions: (data: ShiftInfo) => MenuOptionType[];
10
+ };
11
+ export {};
@@ -2,8 +2,9 @@ import { ColDef } from "ag-grid-community";
2
2
  type Props = {
3
3
  setOpenModalEditShift: Function;
4
4
  setOpenModalDeleteShift: Function;
5
+ showContextMenu: Function;
5
6
  };
6
- export declare const useTableData: ({ setOpenModalEditShift, setOpenModalDeleteShift, }: Props) => {
7
+ export declare const useTableData: ({ setOpenModalEditShift, setOpenModalDeleteShift, showContextMenu, }: Props) => {
7
8
  rows: {
8
9
  id: string;
9
10
  PatternStart: Date;
@@ -1,4 +1,4 @@
1
- import { default as React, ReactNode } from "react";
1
+ import { default as React, type ReactNode } from "react";
2
2
  export declare const useShiftsCrewsContext: () => {
3
3
  state: {
4
4
  shifts: import("../models/ShiftParameters").ShiftParameters[];
@@ -1,8 +1,8 @@
1
1
  import React from "react";
2
2
  type Props = {
3
- userIdForDelete: number | null;
3
+ userId: number | null;
4
4
  show: boolean;
5
5
  onHide: (shouldUpdate: boolean) => void;
6
6
  };
7
- export declare const DeleteUser: ({ userIdForDelete, show, onHide }: Props) => React.JSX.Element;
7
+ export declare const DeleteUser: ({ userId, show, onHide }: Props) => React.JSX.Element;
8
8
  export {};
@@ -1,8 +1,8 @@
1
1
  import * as React from "react";
2
2
  type Props = {
3
- userIdForEdit: number | null;
3
+ userId: number | null;
4
4
  show: boolean;
5
5
  onHide: (shouldUpdate: boolean) => void;
6
6
  };
7
- export declare const EditUser: ({ userIdForEdit, show, onHide }: Props) => React.JSX.Element;
7
+ export declare const EditUser: ({ userId, show, onHide }: Props) => React.JSX.Element;
8
8
  export {};
@@ -1,13 +1,12 @@
1
1
  import { ColDef } from "ag-grid-community";
2
2
  type Props = {
3
+ setUserId: Function;
3
4
  setOpenModalEditDataUser: Function;
4
5
  setOpenModalDeleteUser: Function;
5
- setUserIdForEdit: Function;
6
- setUserIdForDelete: Function;
7
6
  setOpenModalChangePasswordd: Function;
8
- setUserForPasswordChange: Function;
7
+ showContextMenu: Function;
9
8
  };
10
- export declare const useTableData: ({ setUserIdForEdit, setOpenModalEditDataUser, setUserIdForDelete, setOpenModalDeleteUser, setOpenModalChangePasswordd, setUserForPasswordChange, }: Props) => {
9
+ export declare const useTableData: ({ setUserId, setOpenModalEditDataUser, setOpenModalDeleteUser, setOpenModalChangePasswordd, showContextMenu, }: Props) => {
11
10
  rows: {
12
11
  UserId: number | null;
13
12
  UserName: string;
@@ -0,0 +1,13 @@
1
+ import { MenuOptionType } from "../../../../../../controls";
2
+ import { User } from "../../../models/User";
3
+ type Props = {
4
+ setUserId: Function;
5
+ setShowEditModal: Function;
6
+ setShowDeleteModal: Function;
7
+ setShowCreateModal: Function;
8
+ setShowChangePasswordModal: Function;
9
+ };
10
+ export declare const useUsersOptionsFunctions: ({ setUserId, setShowEditModal, setShowDeleteModal, setShowCreateModal, setShowChangePasswordModal, }: Props) => {
11
+ getMenuOptions: (data: User) => MenuOptionType[];
12
+ };
13
+ export {};
@@ -2,6 +2,7 @@ import * as React from "react";
2
2
  type Props = {
3
3
  value: number | null;
4
4
  onChange: (val: number) => void;
5
+ disabled?: boolean;
5
6
  };
6
- export declare const AuthTypeSelector: ({ value, onChange }: Props) => React.JSX.Element;
7
+ export declare const AuthTypeSelector: ({ value, onChange, disabled }: Props) => React.JSX.Element;
7
8
  export {};
@@ -4,6 +4,7 @@ type Props = {
4
4
  onChange: Function;
5
5
  userIdForDelete: number | null;
6
6
  setprofileError: (err: string) => void;
7
+ disabled?: boolean;
7
8
  };
8
- export declare const ProfilesPicker: ({ value, onChange, userIdForDelete, setprofileError, }: Props) => React.JSX.Element;
9
+ export declare const ProfilesPicker: ({ value, onChange, userIdForDelete, setprofileError, disabled, }: Props) => React.JSX.Element;
9
10
  export {};
@@ -1,4 +1,4 @@
1
- import { default as React, ReactNode } from "react";
1
+ import { default as React, type ReactNode } from "react";
2
2
  export declare const useUsersContext: () => {
3
3
  state: {
4
4
  users: import("../models/User").User[];
@@ -1,4 +1,4 @@
1
- import { default as React, ReactNode } from "react";
1
+ import { default as React, type ReactNode } from "react";
2
2
  export declare const useUTLSettingsContext: () => {
3
3
  state: {
4
4
  serverTimeZone: string;
@@ -1,4 +1,4 @@
1
- import { default as React, ReactNode } from "react";
1
+ import { default as React, type ReactNode } from "react";
2
2
  export declare const useAssetContext: () => {
3
3
  state: {
4
4
  areasList: import("../models/Asset").Asset[];
@@ -1,4 +1,4 @@
1
- import { default as React, ReactNode } from "react";
1
+ import { default as React, type ReactNode } from "react";
2
2
  export declare const useUserContext: () => {
3
3
  state: {
4
4
  userLastName: string;
@@ -1,3 +1,3 @@
1
+ import { type AlertProps } from "@material-ui/lab/Alert";
1
2
  import React from "react";
2
- import { AlertProps } from "@material-ui/lab/Alert";
3
3
  export declare const Alert: (props: AlertProps) => React.JSX.Element;
@@ -1,5 +1,5 @@
1
- import React from "react";
2
1
  import PropTypes from "prop-types";
2
+ import React from "react";
3
3
  declare const BarChartControl: {
4
4
  (props: any): React.JSX.Element;
5
5
  propTypes: {
@@ -0,0 +1,2 @@
1
+ import * as React from "react";
2
+ export declare const ContextMenu: () => React.JSX.Element | null;
@@ -0,0 +1,4 @@
1
+ export * from "./ContextMenu";
2
+ export * from "./useContextMenuMESF";
3
+ export * from "./styles/ContextMenuStyles";
4
+ export * from "./models/MenuOptionType";
@@ -0,0 +1,10 @@
1
+ import * as React from "react";
2
+ import { CSSProperties, ReactNode } from "react";
3
+ export interface MenuOptionType {
4
+ name: string;
5
+ key: string;
6
+ onClick?: (event: React.MouseEvent<HTMLLIElement, MouseEvent>) => void;
7
+ style?: CSSProperties;
8
+ icon?: ReactNode;
9
+ disabled?: boolean;
10
+ }
@@ -0,0 +1 @@
1
+ export declare const useStyles: (props?: any) => import("@material-ui/styles").ClassNameMap<"contextMenu">;
@@ -0,0 +1,22 @@
1
+ import React, { type ReactNode } from "react";
2
+ import { MenuOptionType } from "./models/MenuOptionType";
3
+ type ContextMenuConfig = {
4
+ id: string;
5
+ getOptions: (data: any) => MenuOptionType[];
6
+ };
7
+ interface ContextMenuMESFContextType {
8
+ show: boolean;
9
+ position: {
10
+ x: number;
11
+ y: number;
12
+ };
13
+ options: MenuOptionType[];
14
+ showContextMenu: (e: React.MouseEvent, data: any, configId: string) => void;
15
+ registerConfig: (config: ContextMenuConfig) => void;
16
+ onClickOutside: () => void;
17
+ }
18
+ export declare const ContextMenuMESFProvider: ({ children, }: {
19
+ children: ReactNode;
20
+ }) => React.JSX.Element;
21
+ export declare const useContextMenuMESF: () => ContextMenuMESFContextType;
22
+ export {};
@@ -4,4 +4,5 @@ export * from "./filters/dialogFilter";
4
4
  export * from "./tables/GenericTable";
5
5
  export * from "./tables/dataGrid";
6
6
  export * from "./panels";
7
- export * from './shift-navigator';
7
+ export * from "./shift-navigator";
8
+ export * from "./contextMenu";
@@ -1,4 +1,4 @@
1
- import React, { Component, MouseEventHandler } from "react";
1
+ import React, { Component, type MouseEventHandler } from "react";
2
2
  type GenericPanelProps = {
3
3
  title: string;
4
4
  description?: string;
@@ -3,4 +3,5 @@ export type ShiftNavigatorDirection = "Previous" | "Next" | "Last";
3
3
  export declare const ShiftDayNavigatorControl: (props: {
4
4
  useRouter?: boolean | undefined;
5
5
  onShiftChange?: ((shiftId: number) => void) | undefined;
6
+ preventInit?: boolean | undefined;
6
7
  }) => React.JSX.Element;
@@ -1,4 +1,4 @@
1
1
  import React from "react";
2
- import { ShiftNavigatorManagerResult } from "../hook/useShiftNavigator";
2
+ import { type ShiftNavigatorManagerResult } from "../hook/useShiftNavigator";
3
3
  export declare const useShiftNavigator: () => ShiftNavigatorManagerResult;
4
4
  export declare const ShiftNavigatorProvider: ({ children }: any) => React.JSX.Element;
@@ -1,5 +1,5 @@
1
- import { ShiftInfo } from "../models/shift-navigator.model";
2
1
  import { ShiftNavigatorDirection } from "../component/shift-navigator.control";
2
+ import { ShiftInfo } from "../models/shift-navigator.model";
3
3
  export declare const useShiftNavigatorManager: () => {
4
4
  shiftInfo: ShiftInfo | null;
5
5
  moveShift: (direction: ShiftNavigatorDirection) => Promise<void>;
@@ -1,5 +1,5 @@
1
- export * from './component/shift-navigator.control';
2
- export * from './context/ShiftNavigatorProvider';
3
- export * from './hook/useShiftNavigator';
4
- export * from './models/shift-navigator.model';
5
- export * from './repositories/ShiftsRepository';
1
+ export * from "./component/shift-navigator.control";
2
+ export * from "./context/ShiftNavigatorProvider";
3
+ export * from "./hook/useShiftNavigator";
4
+ export * from "./models/shift-navigator.model";
5
+ export * from "./repositories/ShiftsRepository";
@@ -1,5 +1,5 @@
1
- import React from "react";
2
1
  import PropTypes from "prop-types";
2
+ import React from "react";
3
3
  declare const DataGridControl: {
4
4
  (props: any): React.JSX.Element;
5
5
  propTypes: {
@@ -1,4 +1,4 @@
1
- export declare const useSearchUTLSettings: ({ onError }: {
1
+ export declare const useSearchUTLSettings: ({ onError, }: {
2
2
  onError: (err: string) => void;
3
3
  }) => {
4
4
  searchUTLSettings: () => Promise<void>;
package/dist/index.d.ts CHANGED
@@ -12,6 +12,6 @@ export * from "./context/userContext";
12
12
  export * from "./controls";
13
13
  export * from "./services";
14
14
  export * from "./utils";
15
- export * from './components/shared/buttons/button-with-loading';
16
- export * from './configuration/pages/users/models/User';
17
- export * from './configuration/pages/users/repositories/UsersRepository';
15
+ export * from "./components/shared/buttons/button-with-loading";
16
+ export * from "./configuration/pages/users/models/User";
17
+ export * from "./configuration/pages/users/repositories/UsersRepository";