@conboai/app.db.query 0.7.25 → 0.8.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.
@@ -2,7 +2,7 @@ import { GridColDef } from '@mui/x-data-grid-pro';
2
2
  import { CustomDataGridProps } from '@conboai/storybook.components/dist/components/CustomDataGrid/CustomDataGrid';
3
3
  import { FrameDetailUICmp } from './AppContent';
4
4
 
5
- type InputProps = {
5
+ export type InputProps = {
6
6
  gridProps: {
7
7
  columns: GridColDef[];
8
8
  rows: FrameDetailUICmp[];
@@ -22,4 +22,3 @@ export declare const getContentTabs: () => {
22
22
  value: string;
23
23
  disabled: boolean;
24
24
  }[];
25
- export {};
@@ -1,12 +1,5 @@
1
1
  import { GridColDef } from '@mui/x-data-grid-pro';
2
2
 
3
- type ColumnDefsProps = {
4
- selectedItemsCount?: number | null;
5
- totalItems?: number | null;
6
- handleSelectRow?: (value: boolean, id: number) => void;
7
- handleSelectAllRows?: (value: boolean) => void;
8
- };
9
- export declare const useColumnDefs: (args: ColumnDefsProps) => {
3
+ export declare const useColumnDefs: () => {
10
4
  columns: GridColDef[];
11
5
  };
12
- export {};
@@ -1,11 +1,17 @@
1
1
  import { GridColDef } from '@mui/x-data-grid-pro';
2
2
  import { CustomDataGridProps } from '@conboai/storybook.components/dist/components/CustomDataGrid/CustomDataGrid';
3
- import { MatchItemType } from '../../types';
4
3
 
5
- type InputProps = {
4
+ export type InputProps = {
6
5
  columns: GridColDef[];
7
6
  selectedRowId?: number;
8
- rows?: MatchItemType[];
7
+ rows?: {
8
+ id: number;
9
+ assigned_feed_id: number | null;
10
+ startTime: string;
11
+ endTime: string;
12
+ conbo_key: string;
13
+ confidence: number | null;
14
+ }[];
9
15
  loading?: boolean;
10
16
  handleCellClick?: CustomDataGridProps["onCellClick"];
11
17
  };
@@ -18,4 +24,3 @@ export declare const getContentTabs: () => {
18
24
  value: string;
19
25
  disabled: boolean;
20
26
  }[];
21
- export {};
@@ -1,16 +1,45 @@
1
1
  type GetDetailsContentProps = {
2
2
  topOne?: {
3
- [x: string]: unknown;
3
+ conbo_key: string;
4
+ tagId: number;
5
+ kitId: number;
6
+ value: number;
7
+ count: number;
8
+ avgConf: number;
9
+ elementSerialNumber: number;
4
10
  }[];
5
11
  classifiersFrameInfo?: {
6
- [x: string]: unknown;
12
+ conbo_key: string;
13
+ tag_id: number;
14
+ value: number;
15
+ confidence: number;
16
+ element_serial_number: number;
17
+ kit_id: number;
18
+ kit_version: number;
19
+ assigned_feed_id: number;
20
+ track_id: number;
21
+ start_time: string;
22
+ end_time: string;
7
23
  }[];
8
- classifierSummary: {
9
- [x: string]: unknown;
24
+ classifierSummary?: {
25
+ conbo_key: string;
26
+ tag_id: number;
27
+ value: number;
28
+ kit_id: number;
29
+ kit_version: number;
30
+ average_confidence: number;
31
+ median_confidence: number;
32
+ element_serial_number: number;
33
+ count: number;
10
34
  }[];
11
35
  kitsElements?: {
36
+ kit_id: number;
12
37
  tag_id: number;
38
+ type: string;
39
+ category: string;
40
+ serial_number: number;
13
41
  name: string;
42
+ primary: boolean;
14
43
  labels: {
15
44
  id: number;
16
45
  name: string;
@@ -4,5 +4,5 @@ type InputProps = {
4
4
  isAdmin?: boolean;
5
5
  onHomeClick?: () => void;
6
6
  };
7
- export declare const ConboMatchRoot: (props: InputProps) => import("react/jsx-runtime").JSX.Element;
7
+ export declare const ConboMatchRoot: (props: InputProps) => import("react/jsx-runtime").JSX.Element | null;
8
8
  export {};
@@ -0,0 +1,40 @@
1
+ import { z } from 'zod';
2
+
3
+ export declare const MATCH_FORM_FIELD: {
4
+ readonly conboKey: "conboKey";
5
+ readonly keyExclusive: "keyExclusive";
6
+ readonly isUtc: "isUtc";
7
+ };
8
+ export declare const inputConfig: {
9
+ isUtc: {
10
+ label: string;
11
+ };
12
+ conboKey: {
13
+ label: string;
14
+ placeholder: string;
15
+ required: string;
16
+ };
17
+ keyExclusive: {
18
+ label: string;
19
+ };
20
+ };
21
+ export declare const filterFormConfig: {
22
+ shape: {
23
+ conboKey: string;
24
+ keyExclusive: boolean;
25
+ isUtc: boolean;
26
+ };
27
+ schema: () => z.ZodObject<{
28
+ conboKey: z.ZodString;
29
+ keyExclusive: z.ZodBoolean;
30
+ isUtc: z.ZodBoolean;
31
+ }, "strip", z.ZodTypeAny, {
32
+ conboKey: string;
33
+ isUtc: boolean;
34
+ keyExclusive: boolean;
35
+ }, {
36
+ conboKey: string;
37
+ isUtc: boolean;
38
+ keyExclusive: boolean;
39
+ }>;
40
+ };
@@ -0,0 +1 @@
1
+ export * from './sidebar-left-filter';
@@ -0,0 +1,13 @@
1
+ import { FormSubmitFn } from '../../../../helpers/utils/forms';
2
+
3
+ export type MatchFilterFormType = {
4
+ conboKey?: string;
5
+ keyExclusive?: boolean;
6
+ isUtc?: boolean;
7
+ };
8
+ type SidebarLeftFilteInput = {
9
+ loadingFetch?: boolean;
10
+ onSubmit?: FormSubmitFn<MatchFilterFormType>;
11
+ };
12
+ export declare const SidebarLeftFilter: (props: SidebarLeftFilteInput) => import("react/jsx-runtime").JSX.Element;
13
+ export {};
@@ -1,7 +1,6 @@
1
1
  import { SxProps } from '@mui/material';
2
2
 
3
3
  export declare const toggleSx: SxProps;
4
- export declare const boxSx: SxProps;
5
4
  export declare const mainBoxSx: SxProps;
6
5
  export declare const dividerSx: SxProps;
7
6
  export declare const buttonContainerSx: SxProps;
@@ -0,0 +1,3 @@
1
+ import { MatchTabItem } from './store';
2
+
3
+ export declare const initialTab: MatchTabItem;
@@ -0,0 +1 @@
1
+ export declare const useTabSelected: () => import('../store').MatchTabItem | null;
@@ -0,0 +1,3 @@
1
+ import { ConboMatchStore, MatchTabItem } from './store';
2
+
3
+ export declare const selectCurrentTab: (state: ConboMatchStore) => MatchTabItem | null;
@@ -0,0 +1,119 @@
1
+ import { FormSubmitParams } from '../../helpers/utils/forms';
2
+
3
+ export type MatchTabItem = {
4
+ id: string;
5
+ title: string;
6
+ selected: boolean;
7
+ conboKey: string;
8
+ isLeftPanelShown: boolean;
9
+ isRightPanelShown: boolean;
10
+ timezone: string;
11
+ color: string;
12
+ matchList: {
13
+ id: number;
14
+ assigned_feed_id: number | null;
15
+ startTime: string;
16
+ endTime: string;
17
+ conbo_key: string;
18
+ confidence: number | null;
19
+ }[];
20
+ matchListFeatchAt: Date | null;
21
+ kitsElements: {
22
+ kit_id: number;
23
+ tag_id: number;
24
+ type: string;
25
+ category: string;
26
+ serial_number: number;
27
+ name: string;
28
+ primary: boolean;
29
+ labels: {
30
+ id: number;
31
+ name: string;
32
+ }[];
33
+ }[];
34
+ topOneList: {
35
+ conbo_key: string;
36
+ tagId: number;
37
+ kitId: number;
38
+ value: number;
39
+ count: number;
40
+ avgConf: number;
41
+ elementSerialNumber: number;
42
+ }[];
43
+ croppedList: {
44
+ conbo_key: number;
45
+ id: string;
46
+ captureTime: string;
47
+ feedId: string;
48
+ type: string;
49
+ }[];
50
+ snapshotsList: {
51
+ id: string;
52
+ captureTime: string;
53
+ assignedFeedId: number;
54
+ }[];
55
+ classifiersFrameInfoList: {
56
+ conbo_key: string;
57
+ tag_id: number;
58
+ value: number;
59
+ confidence: number;
60
+ element_serial_number: number;
61
+ kit_id: number;
62
+ kit_version: number;
63
+ assigned_feed_id: number;
64
+ track_id: number;
65
+ start_time: string;
66
+ end_time: string;
67
+ }[];
68
+ classifierSummaryList: {
69
+ conbo_key: string;
70
+ tag_id: number;
71
+ value: number;
72
+ kit_id: number;
73
+ kit_version: number;
74
+ average_confidence: number;
75
+ median_confidence: number;
76
+ element_serial_number: number;
77
+ count: number;
78
+ }[];
79
+ geo: {
80
+ type: string;
81
+ geometry: {
82
+ type: string;
83
+ coordinates: [number, number][];
84
+ } | null;
85
+ properties: Record<string, any>;
86
+ } | null;
87
+ pixelGeo: {
88
+ type: string;
89
+ geometry: {
90
+ type: string;
91
+ coordinates: [number, number][];
92
+ } | null;
93
+ properties: Record<string, any>;
94
+ } | null;
95
+ };
96
+ export type ConboMatchStore = {
97
+ tabs: MatchTabItem[];
98
+ clearStore: () => void;
99
+ onAddTab: () => void;
100
+ onDeleteTab: (id: string) => void;
101
+ onSelectActiveTab: (id: string) => void;
102
+ onUpdateTab: (tabId: string, payload: Partial<Omit<MatchTabItem, "id">>) => void;
103
+ onFetchAllTabs: () => Promise<void>;
104
+ onFetchAllMatchList: (payload?: FormSubmitParams<{
105
+ conboKey?: string;
106
+ keyExclusive?: boolean;
107
+ isUtc?: boolean;
108
+ }>) => Promise<void>;
109
+ onFetchKitsElements: (payload?: {
110
+ siteId?: string;
111
+ }) => Promise<void>;
112
+ onFetchMetadataById: (payload?: {
113
+ conboKey?: string;
114
+ startTime?: string;
115
+ endTime?: string;
116
+ assignedFeedId?: number;
117
+ }) => Promise<void>;
118
+ };
119
+ export declare const useConboMatchStore: import('zustand').UseBoundStore<import('zustand').StoreApi<ConboMatchStore>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@conboai/app.db.query",
3
- "version": "0.7.25",
3
+ "version": "0.8.1",
4
4
  "type": "module",
5
5
  "main": "dist/app.db.query.js",
6
6
  "types": "dist/build/index.d.ts",
@@ -30,7 +30,7 @@
30
30
  "generate-top-one": "openapi --input https://dev.test.portsight.ai/api/top1/docs-yaml --output ./src/api/topOne",
31
31
  "generate-cropped": "openapi --input https://dev.test.portsight.ai/api/cropped/docs-yaml --output ./src/api/cropped",
32
32
  "generate-poc": "openapi --input https://dev.gateway.dev.portsight.ai/api/poc/api-yaml --output ./src/api/poc",
33
- "generate-search": "openapi --input https://dev.test.portsight.ai/api/search/docs-yaml --output ./src/api/search",
33
+ "generate-search": "openapi --input https://dev.portsight.ai/api/search/docs-yaml --output ./src/api/search",
34
34
  "generate-query-info": "openapi --input https://dev.test.portsight.ai/api/info/docs-yaml --output ./src/api/queryInfo",
35
35
  "generate-api": "yarn generate-classifiers && yarn generate-cargo && yarn generate-snapshots && yarn generate-detections-pixels && yarn generate-detections-geo && yarn generate-tag-family-labels && yarn generate-top-one && yarn generate-cropped && yarn generate-poc && yarn generate-search && yarn generate-query-info",
36
36
  "lint": "eslint . --ext ts,tsx --report-unused-disable-directives",
@@ -39,20 +39,28 @@
39
39
  "format": "prettier --write \"src/**/*.{ts,tsx,json}\" --color"
40
40
  },
41
41
  "dependencies": {
42
- "@conboai/storybook.components": "^0.5.2",
42
+ "@conboai/storybook.components": "^0.5.6",
43
43
  "@emotion/react": "^11.11.4",
44
44
  "@emotion/styled": "^11.11.5",
45
- "@mui/icons-material": "^5.16.6",
46
- "@mui/material": "^5.15.17",
47
- "@mui/x-data-grid-pro": "^7.9.0",
45
+ "@hookform/resolvers": "^3.9.1",
46
+ "@mui/icons-material": "^6.1.7",
47
+ "@mui/material": "^6.1.7",
48
+ "@mui/system": "^6.1.7",
49
+ "@mui/x-data-grid": "^7.22.2",
50
+ "@mui/x-data-grid-pro": "^7.22.2",
51
+ "@mui/x-date-pickers": "^7.22.2",
48
52
  "@react-google-maps/api": "^2.19.3",
49
53
  "ajv": "^8.17.1",
54
+ "await-to-js": "^3.0.0",
50
55
  "dayjs": "^1.11.13",
51
56
  "lodash": "^4.17.21",
52
57
  "react": "^18.2.0",
53
58
  "react-dom": "^18.2.0",
59
+ "react-hook-form": "^7.53.2",
54
60
  "uuid": "^9.0.1",
55
61
  "vite-plugin-css-injected-by-js": "^3.5.2",
62
+ "vite-plugin-svgr": "^4.3.0",
63
+ "zod": "^3.23.8",
56
64
  "zustand": "^4.5.2"
57
65
  },
58
66
  "devDependencies": {
@@ -1,4 +0,0 @@
1
- import { SxProps } from '@mui/material';
2
-
3
- export declare const checkBoxSx: SxProps;
4
- export declare const formControlLabelSx: SxProps;
@@ -1 +0,0 @@
1
- export declare const AppContentWrapper: () => import("react/jsx-runtime").JSX.Element;
@@ -1 +0,0 @@
1
- export * from './app-content-wrapper';
@@ -1,47 +0,0 @@
1
- export declare const pixelGeoGeometryCoordinatesMock: [number, number][];
2
- export declare const geoGeometryCoordinatesMock: [number, number][];
3
- export declare const top1Mock: {
4
- conbo_key: string;
5
- tagId: number;
6
- value: number;
7
- avgConf: number;
8
- elementSerialNumber: number;
9
- kitId: number;
10
- count: number;
11
- }[];
12
- export declare const classifiersFrameInfoMock: {
13
- conbo_key: string;
14
- tag_id: number;
15
- start_time: string;
16
- end_time: string;
17
- value: number;
18
- confidence: number;
19
- element_serial_number: number;
20
- assigned_feed_id: number;
21
- kit_id: number;
22
- kit_version: number;
23
- track_id: number;
24
- }[];
25
- export declare const classifierSummaryRightMock: {
26
- value: number;
27
- count: number;
28
- average_confidence: number;
29
- tag_id: number;
30
- conbo_key: string;
31
- element_serial_number: number;
32
- kit_id: number;
33
- kit_version: number;
34
- median_confidence: number;
35
- }[];
36
- export declare const croppedMock: {
37
- id: string;
38
- conbo_key: string;
39
- captureTime: string;
40
- feedId: number;
41
- type: string;
42
- }[];
43
- export declare const snapshotsMock: {
44
- id: string;
45
- captureTime: string;
46
- assignedFeedId: number;
47
- }[];
@@ -1,10 +0,0 @@
1
- import { MatchItemType } from './types';
2
- import { FrameResponseDto } from '../../api/detectionPixel';
3
-
4
- export declare const DetectionsPixelsServiceMock: {
5
- detectionsControllerGetFrameDetails: () => {
6
- items: MatchItemType[];
7
- details: FrameResponseDto["details"];
8
- time_info: any;
9
- };
10
- };