@dexteel/mesf-core 4.5.6 → 4.5.8

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 (21) hide show
  1. package/CHANGELOG.md +3 -0
  2. package/dist/index.esm.js +607 -254
  3. package/dist/pages/trendings/components/chart/TableComponent.d.ts +3 -1
  4. package/dist/pages/trendings/components/chart/Trending.d.ts +1 -24
  5. package/dist/pages/trendings/components/chart/components/CellComponent.d.ts +11 -0
  6. package/dist/pages/trendings/components/chart/components/DraggableLineControl.d.ts +10 -0
  7. package/dist/pages/trendings/components/chart/components/modals/addTagModal/AddTagModal.d.ts +9 -0
  8. package/dist/pages/trendings/components/chart/{TagSelectionModal.d.ts → components/modals/addTagModal/TagSelectionModal.d.ts} +1 -1
  9. package/dist/pages/trendings/components/chart/context/TrendingContext.d.ts +7 -1
  10. package/dist/pages/trendings/components/chart/customOptionsComponent.d.ts +1 -1
  11. package/dist/pages/trendings/components/chart/hooks/useGetVerticalLinePlugin.d.ts +2 -0
  12. package/dist/pages/trendings/components/chart/hooks/useTagsDataTable.d.ts +24 -0
  13. package/dist/pages/trendings/components/chart/hooks/useUpdateCursorData.d.ts +2 -0
  14. package/dist/pages/trendings/components/chart/models/TrendingModels.d.ts +33 -0
  15. package/dist/pages/trendings/components/chart/repository/TrendingRepository.d.ts +8 -0
  16. package/dist/pages/trendings/components/chart/styles/TagsTableStyles.d.ts +1 -1
  17. package/dist/pages/trendings/components/chart/utils/areRangeSimilar.d.ts +2 -0
  18. package/dist/pages/trendings/components/chart/utils/calculateScales.d.ts +4 -0
  19. package/dist/pages/trendings/components/chart/utils/timeDifference.d.ts +1 -0
  20. package/dist/pages/trendings/reducers/trendings.reducer.d.ts +7 -1
  21. package/package.json +1 -1
@@ -1,12 +1,14 @@
1
+ import { ChartData } from 'chart.js';
1
2
  import React from 'react';
2
3
  import './ContextMenu.css';
3
- import { CursorData, TagList } from './Trending';
4
+ import { CursorData, TagList } from './models/TrendingModels';
4
5
  interface TableComponentProps {
5
6
  tagList: TagList;
6
7
  setTagList: React.Dispatch<React.SetStateAction<TagList>>;
7
8
  cursorData: CursorData;
8
9
  onDeleteTag: (tagId: number) => void;
9
10
  onAddTag: (tagId: number) => void;
11
+ chartData: ChartData;
10
12
  }
11
13
  declare const TableComponent: React.FC<TableComponentProps>;
12
14
  export default TableComponent;
@@ -1,32 +1,9 @@
1
1
  import "chartjs-adapter-moment/dist/chartjs-adapter-moment.esm.js";
2
2
  import React from "react";
3
+ import { Tag } from "./models/TrendingModels";
3
4
  interface TrendingProps {
4
5
  title: string;
5
6
  tags: Tag[];
6
7
  }
7
- interface Sample {
8
- timestamp: number;
9
- value: number;
10
- }
11
- export type SampleArray = Sample[][];
12
- export interface Tag {
13
- tagId: number;
14
- tagName: string;
15
- tagType: string;
16
- color: string;
17
- autoScale: boolean;
18
- minScale: number;
19
- maxScale: number;
20
- visible: boolean;
21
- }
22
- export interface CursorData {
23
- x: Date;
24
- values: number[];
25
- }
26
- export interface CustomOptions {
27
- showGrid: boolean;
28
- stepped: boolean;
29
- }
30
- export type TagList = Tag[];
31
8
  declare const Trending: React.FC<TrendingProps>;
32
9
  export default Trending;
@@ -0,0 +1,11 @@
1
+ import { ChartData } from 'chart.js';
2
+ import React from 'react';
3
+ import { Tag } from '../models/TrendingModels';
4
+ interface Props {
5
+ tag: Tag;
6
+ chartData: ChartData;
7
+ index: number;
8
+ limitX: number;
9
+ }
10
+ export declare const CellComponent: ({ tag, chartData, index, limitX }: Props) => React.JSX.Element;
11
+ export {};
@@ -0,0 +1,10 @@
1
+ import { ChartArea } from 'chart.js';
2
+ import React from 'react';
3
+ interface DraggableLineControlProps {
4
+ chartArea: ChartArea;
5
+ initialLeft: number;
6
+ onUpdate: (newLeft: number) => void;
7
+ color: string;
8
+ }
9
+ declare const DraggableLineControl: React.FC<DraggableLineControlProps>;
10
+ export default DraggableLineControl;
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import { Tag } from '../../../models/TrendingModels';
3
+ interface Props {
4
+ open: boolean;
5
+ handleClose: () => void;
6
+ onTagSelect: (selected: Tag) => void;
7
+ }
8
+ export declare const AddTagModal: ({ open, handleClose, onTagSelect }: Props) => React.JSX.Element;
9
+ export {};
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import { Tag } from "./Trending";
2
+ import { Tag } from "../../../models/TrendingModels";
3
3
  interface TagSelectionModalProps {
4
4
  isOpen: boolean;
5
5
  onClose: () => void;
@@ -4,29 +4,35 @@ export declare const useTrendingContext: () => {
4
4
  timeScopeStart: Date;
5
5
  timeScopeEnd: Date;
6
6
  scope: import("../models/scopes.model").scopeType;
7
+ graphPan?: boolean | undefined;
7
8
  };
8
9
  actions: import("@reduxjs/toolkit").CaseReducerActions<{
9
10
  setTotalScope(state: import("immer/dist/internal").WritableDraft<{
10
11
  timeScopeStart: Date;
11
12
  timeScopeEnd: Date;
12
13
  scope: import("../models/scopes.model").scopeType;
14
+ graphPan?: boolean | undefined;
13
15
  }>, { payload, type, }: {
14
16
  payload: {
15
17
  scope: import("../models/scopes.model").scopeType;
16
18
  start?: Date | undefined;
17
19
  end?: Date | undefined;
20
+ graphPan?: boolean | undefined;
18
21
  } | {
19
22
  scope?: import("../models/scopes.model").scopeType | undefined;
20
23
  start: Date;
21
24
  end?: Date | undefined;
25
+ graphPan?: boolean | undefined;
22
26
  } | {
23
27
  scope?: import("../models/scopes.model").scopeType | undefined;
24
28
  start?: Date | undefined;
25
29
  end: Date;
30
+ graphPan?: boolean | undefined;
26
31
  } | {
27
- scope: import("../models/scopes.model").scopeType;
32
+ scope?: import("../models/scopes.model").scopeType | undefined;
28
33
  start: Date;
29
34
  end: Date;
35
+ graphPan: boolean;
30
36
  };
31
37
  type: string;
32
38
  }): void;
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import { CustomOptions } from "./Trending";
2
+ import { CustomOptions } from "./models/TrendingModels";
3
3
  interface CustomOptionsComponentProps {
4
4
  customOptions: CustomOptions;
5
5
  setCustomOptions: React.Dispatch<React.SetStateAction<CustomOptions>>;
@@ -0,0 +1,2 @@
1
+ import { Plugin } from 'chart.js';
2
+ export declare const useGetVerticalLinePlugin: (setChartArea: (param: any) => void, setCoords: any) => Plugin;
@@ -0,0 +1,24 @@
1
+ import { ChartData } from "chart.js";
2
+ import { CursorData, TagList } from "../models/TrendingModels";
3
+ interface Props {
4
+ cursorData: CursorData;
5
+ tagList: TagList;
6
+ chartData: ChartData;
7
+ }
8
+ interface TagsDataTable {
9
+ [tagName: string]: {
10
+ y1: number;
11
+ y2: number;
12
+ y2y1: number;
13
+ pmin: {
14
+ x: number | Date;
15
+ y: number;
16
+ };
17
+ pmax: {
18
+ x: number | Date;
19
+ y: number;
20
+ };
21
+ };
22
+ }
23
+ export declare const useTagsDataTable: ({ cursorData, tagList, chartData }: Props) => TagsDataTable;
24
+ export {};
@@ -0,0 +1,2 @@
1
+ import { CursorData } from '../models/TrendingModels';
2
+ export declare const updateCursorData: (chart: any, setCursorData: (cursorData: CursorData) => void) => void;
@@ -0,0 +1,33 @@
1
+ export interface TimeScope {
2
+ start: Date;
3
+ end: Date;
4
+ }
5
+ export interface Sample {
6
+ timestamp: number;
7
+ value: number;
8
+ }
9
+ export type SampleArray = Sample[][];
10
+ export interface Tag {
11
+ tagId: number;
12
+ tagName: string;
13
+ tagType: string;
14
+ color: string;
15
+ autoScale: boolean;
16
+ minScale: number;
17
+ maxScale: number;
18
+ visible: boolean;
19
+ }
20
+ export interface CursorData {
21
+ x1: Date;
22
+ x2: Date;
23
+ values: number[];
24
+ }
25
+ export interface LineCoords {
26
+ x1: number;
27
+ x2: number;
28
+ }
29
+ export interface CustomOptions {
30
+ showGrid: boolean;
31
+ stepped: boolean;
32
+ }
33
+ export type TagList = Tag[];
@@ -0,0 +1,8 @@
1
+ import { TagList } from "../models/TrendingModels";
2
+ export declare const fetchDataFunction: (tagList: TagList[], state: any, actions: any) => Promise<void>;
3
+ export declare const getTags: (NodeName: string | null) => Promise<import("../../../../../services").ResponseMESF>;
4
+ export declare const getSeriesData: (TagIds: string, Start: number | null, End: number | null, SampleCount: number) => Promise<import("../../../../../services").ResponseMESF>;
5
+ export declare const saveTagDefaults: (TagId: number, Alias: string, Color: string, MinScale: number, MaxScale: number, Unit: string) => Promise<import("../../../../../services").ResponseMESF>;
6
+ export declare const getViewTags: (ViewId: number | null) => Promise<import("../../../../../services").ResponseMESF>;
7
+ export declare const upsertView: (ViewId: number | null, ViewName: string, UserName: string, isPublic: boolean) => Promise<import("../../../../../services").ResponseMESF>;
8
+ export declare const upsertViewTag: (ViewId: number, TagId: number, Color: string, MinScale: number, MaxScale: number, IsVisible: boolean) => Promise<import("../../../../../services").ResponseMESF>;
@@ -1 +1 @@
1
- export declare const useTagsTableStyles: (props?: any) => import("@material-ui/styles").ClassNameMap<"checkbox">;
1
+ export declare const useTagsTableStyles: (props?: any) => import("@material-ui/styles").ClassNameMap<"checkbox" | "color" | "scale" | "visible" | "rowHover" | "topTitles" | "bottomTitlesRow" | "doubleInput" | "inputCol" | "autoScale" | "unit" | "xStats">;
@@ -0,0 +1,2 @@
1
+ import { Tag } from "../models/TrendingModels";
2
+ export declare const areRangesSimilar: (tag1: Tag, tag2: Tag) => boolean;
@@ -0,0 +1,4 @@
1
+ export declare const calculateScales: (min: any, max: any, sigDigits: any) => {
2
+ minScale: number;
3
+ maxScale: number;
4
+ };
@@ -0,0 +1 @@
1
+ export declare const timeDifference: (start: number, end: number) => string;
@@ -3,28 +3,34 @@ export declare const TrendingsReducer: import("@reduxjs/toolkit").Slice<{
3
3
  timeScopeStart: Date;
4
4
  timeScopeEnd: Date;
5
5
  scope: scopeType;
6
+ graphPan?: boolean | undefined;
6
7
  }, {
7
8
  setTotalScope(state: import("immer/dist/internal").WritableDraft<{
8
9
  timeScopeStart: Date;
9
10
  timeScopeEnd: Date;
10
11
  scope: scopeType;
12
+ graphPan?: boolean | undefined;
11
13
  }>, { payload, type, }: {
12
14
  payload: {
13
15
  scope: scopeType;
14
16
  start?: Date;
15
17
  end?: Date;
18
+ graphPan?: boolean;
16
19
  } | {
17
20
  scope?: scopeType;
18
21
  start: Date;
19
22
  end?: Date;
23
+ graphPan?: boolean;
20
24
  } | {
21
25
  scope?: scopeType;
22
26
  start?: Date;
23
27
  end: Date;
28
+ graphPan?: boolean;
24
29
  } | {
25
- scope: scopeType;
30
+ scope?: scopeType;
26
31
  start: Date;
27
32
  end: Date;
33
+ graphPan: boolean;
28
34
  };
29
35
  type: string;
30
36
  }): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dexteel/mesf-core",
3
- "version": "4.5.6",
3
+ "version": "4.5.8",
4
4
  "author": "Dexteel Team",
5
5
  "module": "dist/index.esm.js",
6
6
  "typings": "dist/index.d.ts",