@3deye-toolkit/react-event-list 0.0.4 → 0.0.5

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,6 @@ import { BehaviorSubject } from 'rxjs';
2
2
  import crossfilter from 'crossfilter2';
3
3
  import type { IReactionDisposer } from 'mobx';
4
4
  import { Observable } from 'rxjs';
5
- import { default as React_2 } from 'react';
6
5
  import { Subject } from 'rxjs';
7
6
  import { Subscription } from 'rxjs';
8
7
 
@@ -33,13 +32,13 @@ declare class AllEventsLoaderFilters implements EventsLoaderFilters {
33
32
  }
34
33
 
35
34
  export declare class AllEventsStore extends ApiStore {
36
- api: ExtendedApi;
37
- cameraFilters: Camera[];
35
+ cameraFilters: CameraOption[];
38
36
  objectFilters: DetectedObjectOption[];
39
37
  eventTypeFilters: EventTypeOption[];
40
38
  date: Date | null;
41
- setDate: (date: Date) => Date;
39
+ setDate: (date: Date | null) => void;
42
40
  clearDate: () => void;
41
+ resetDate: () => void;
43
42
  sortDirection: 'ASC' | 'DESC';
44
43
  probabilityThreshold: number;
45
44
  colors: Set<string>;
@@ -188,7 +187,7 @@ declare class Camera {
188
187
  get supportsWebRTC(): boolean;
189
188
  constructor(raw: RawCamera);
190
189
  update: (raw: RawCamera) => void;
191
- can: (permission: CameraPermissions) => number;
190
+ can: (permission: CameraPermissions) => boolean;
192
191
  }
193
192
 
194
193
  declare interface CameraAddress {
@@ -219,6 +218,12 @@ declare class CameraEvent {
219
218
  constructor(raw: RawSensorEvent);
220
219
  }
221
220
 
221
+ declare interface CameraOption {
222
+ type: 'camera';
223
+ value: number;
224
+ label: string;
225
+ }
226
+
222
227
  declare const enum CameraPermissions {
223
228
  View = 1,
224
229
  SaveClip = 2,
@@ -311,14 +316,14 @@ declare type DetectedObject = Car | LicensePlate | {
311
316
  };
312
317
 
313
318
  declare interface DetectedObjectOption {
314
- id: string;
315
- name: string;
319
+ value: string;
320
+ label: string;
316
321
  color: string;
317
322
  highlightColor: string;
318
323
  type: 'detectedObject';
319
324
  }
320
325
 
321
- declare const EventList: React_2.FC<Props>;
326
+ declare const EventList: React.FC<Props>;
322
327
  export default EventList;
323
328
 
324
329
  declare const events: {
@@ -358,7 +363,7 @@ declare class EventsLoader extends ApiStore {
358
363
  objectIdx: number;
359
364
  }[]);
360
365
  flushUpdates: () => void;
361
- setLiveUpdateMode: (mode: 'manual' | 'auto' | 'disabled') => void;
366
+ setLiveUpdateMode: (mode: "manual" | "auto" | "disabled") => void;
362
367
  load: () => void;
363
368
  reload: () => void;
364
369
  loadMore: () => void;
@@ -477,17 +482,11 @@ declare class EventsStore extends ApiStore {
477
482
  declare type EventType = 'Motion' | 'Tampering' | 'PanTiltZoom' | 'CrossLine' | 'Intrusion' | 'LicensePlate' | 'FaceDetection' | 'Audio' | 'Analytic' | 'SpeedDetection' | 'PeopleCounter' | 'Temperature' | 'PoS' | 'GPS' | 'DigitalInput' | 'Normal' | 'Suspicious' | 'Loitering' | 'Vandalism' | 'Trespass' | 'Emergency' | 'LifeInDanger' | 'ErroneousAlert' | 'Misidentification' | 'Fire' | 'MedicalDuress' | 'HoldUp' | 'CheckIn' | 'CheckOut' | 'ClockIn' | 'ClockOut' | 'ParkingStart' | 'ParkingEnd' | 'ParkingViolation' | 'GateAccess' | 'DoorAccess' | 'TemperatureCheck' | 'IDCheck' | 'PPECheck' | 'WelfareCheck' | 'VehicleBreakIn' | 'DrugTrafficking' | 'Assault' | 'PackageDelivery' | 'Uncategorized';
478
483
 
479
484
  declare interface EventTypeOption {
480
- id: SensorEventType;
481
- name: string;
485
+ value: SensorEventType;
486
+ label: string;
482
487
  type: 'eventType';
483
488
  }
484
489
 
485
- declare type ExtendedApi = Api<IApi> & IApi & {
486
- archives: {
487
- GetLongLastingTimeLaps: (cameraId: number) => Observable<ApiResult<RawClip>>;
488
- };
489
- };
490
-
491
490
  declare type ExtractHubs<T, K> = {
492
491
  [P in keyof ExtractMethods<T, K>]: ExtractMethods<T[P], K[P]>;
493
492
  };
@@ -568,7 +567,7 @@ declare interface IApi {
568
567
  UpdateCamgroup: (params: any) => Observable<ApiResult<RawCamgroup>>;
569
568
  };
570
569
  sound: {
571
- GetPushSoundServiceUrl: (id: number) => Observable<any>;
570
+ GetPushSoundServiceUrl: (id: number) => Observable<ApiResult<string>>;
572
571
  };
573
572
  thumbnails: {
574
573
  GetThumbnailsInfo: (params: {
@@ -615,7 +614,7 @@ declare enum LOG_LEVEL {
615
614
  ERROR = 2
616
615
  }
617
616
 
618
- declare type OptionType = Camera | EventTypeOption | DetectedObjectOption;
617
+ declare type OptionType = CameraOption | EventTypeOption | DetectedObjectOption;
619
618
 
620
619
  declare interface PageInfo {
621
620
  isDescending: boolean;
@@ -634,7 +633,7 @@ declare interface PendingRequest {
634
633
  request: Observable<any>;
635
634
  }
636
635
 
637
- declare interface Props extends React_2.HTMLAttributes<HTMLDivElement> {
636
+ declare interface Props extends React.HTMLAttributes<HTMLDivElement> {
638
637
  onEventClick: (event: CameraEvent) => void;
639
638
  }
640
639