@yoyomq/ije-react 0.1.1 → 0.1.2
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/dist/AggregateStat.d.ts +6 -0
- package/dist/AggregateStat.js +12 -0
- package/dist/BarChart.d.ts +7 -0
- package/dist/BarChart.js +12 -0
- package/dist/Chat.d.ts +7 -0
- package/dist/Chat.js +5 -0
- package/dist/MapTracker.d.ts +15 -0
- package/dist/MapTracker.js +5 -0
- package/dist/Provider.d.ts +7 -0
- package/dist/Provider.js +11 -0
- package/dist/TelemetryChart.d.ts +9 -0
- package/dist/TelemetryChart.js +5 -0
- package/dist/TelemetryStat.d.ts +8 -0
- package/dist/TelemetryStat.js +5 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.js +7 -1
- package/package.json +3 -3
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { useEffect, useRef } from 'react';
|
|
4
|
+
export function AggregateStat({ data, loading }) {
|
|
5
|
+
const ref = useRef(null);
|
|
6
|
+
useEffect(() => {
|
|
7
|
+
if (ref.current && data !== undefined) {
|
|
8
|
+
ref.current.data = data;
|
|
9
|
+
}
|
|
10
|
+
}, [data]);
|
|
11
|
+
return _jsx("ije-aggregate-stat", { ref: ref, loading: loading ? '' : undefined });
|
|
12
|
+
}
|
package/dist/BarChart.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { useEffect, useRef } from 'react';
|
|
4
|
+
export function BarChart({ data, loading, height }) {
|
|
5
|
+
const ref = useRef(null);
|
|
6
|
+
useEffect(() => {
|
|
7
|
+
if (ref.current && data !== undefined) {
|
|
8
|
+
ref.current.data = data;
|
|
9
|
+
}
|
|
10
|
+
}, [data]);
|
|
11
|
+
return _jsx("ije-bar-chart", { ref: ref, height: height, loading: loading ? '' : undefined });
|
|
12
|
+
}
|
package/dist/Chat.d.ts
ADDED
package/dist/Chat.js
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export interface MapTrackerProps {
|
|
2
|
+
deviceId: string;
|
|
3
|
+
numericDeviceId?: number;
|
|
4
|
+
title?: string;
|
|
5
|
+
helpMessage?: string;
|
|
6
|
+
width?: string;
|
|
7
|
+
height?: string;
|
|
8
|
+
/** Trip-picker mode: pass trigger-id + optional trigger-name to enable historical trip replay. */
|
|
9
|
+
tripPicker?: boolean;
|
|
10
|
+
triggerId?: number;
|
|
11
|
+
triggerName?: string;
|
|
12
|
+
startsAt?: number;
|
|
13
|
+
endsAt?: number;
|
|
14
|
+
}
|
|
15
|
+
export declare function MapTracker({ deviceId, numericDeviceId, title, helpMessage, width, height, tripPicker, triggerId, triggerName, startsAt, endsAt, }: MapTrackerProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
export function MapTracker({ deviceId, numericDeviceId, title, helpMessage, width, height, tripPicker, triggerId, triggerName, startsAt, endsAt, }) {
|
|
4
|
+
return (_jsx("ije-map-tracker", { "device-id": deviceId, "numeric-device-id": numericDeviceId != null ? String(numericDeviceId) : undefined, title: title, "help-message": helpMessage, width: width, height: height, "trip-picker": tripPicker ? '' : undefined, "trigger-id": triggerId != null ? String(triggerId) : undefined, "trigger-name": triggerName, "starts-at": startsAt != null ? String(startsAt) : undefined, "ends-at": endsAt != null ? String(endsAt) : undefined }));
|
|
5
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type SdkConfig } from '@yoyomq/ije-core';
|
|
2
|
+
import '@yoyomq/ije-ui';
|
|
3
|
+
export interface IjeProviderProps {
|
|
4
|
+
config: SdkConfig;
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
}
|
|
7
|
+
export declare function IjeProvider({ config, children }: IjeProviderProps): import("react").JSX.Element;
|
package/dist/Provider.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { useEffect } from 'react';
|
|
4
|
+
import { Ije } from '@yoyomq/ije-core';
|
|
5
|
+
import '@yoyomq/ije-ui';
|
|
6
|
+
export function IjeProvider({ config, children }) {
|
|
7
|
+
useEffect(() => {
|
|
8
|
+
Ije.init(config);
|
|
9
|
+
}, []);
|
|
10
|
+
return _jsx(_Fragment, { children: children });
|
|
11
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export interface TelemetryChartProps {
|
|
2
|
+
deviceId: string;
|
|
3
|
+
metric?: string;
|
|
4
|
+
title?: string;
|
|
5
|
+
helpMessage?: string;
|
|
6
|
+
width?: string;
|
|
7
|
+
height?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare function TelemetryChart({ deviceId, metric, title, helpMessage, width, height }: TelemetryChartProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
export function TelemetryChart({ deviceId, metric, title, helpMessage, width, height }) {
|
|
4
|
+
return (_jsx("ije-telemetry-chart", { "device-id": deviceId, metric: metric, title: title, "help-message": helpMessage, width: width, height: height }));
|
|
5
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export interface TelemetryStatProps {
|
|
2
|
+
deviceId: string;
|
|
3
|
+
metric: string;
|
|
4
|
+
title?: string;
|
|
5
|
+
unit?: string;
|
|
6
|
+
helpMessage?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare function TelemetryStat({ deviceId, metric, title, unit, helpMessage }: TelemetryStatProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
export function TelemetryStat({ deviceId, metric, title, unit, helpMessage }) {
|
|
4
|
+
return (_jsx("ije-telemetry-stat", { "device-id": deviceId, metric: metric, title: title, unit: unit, "help-message": helpMessage }));
|
|
5
|
+
}
|
package/dist/index.d.ts
CHANGED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export { IjeProvider } from './Provider';
|
|
2
|
+
export type { IjeProviderProps } from './Provider';
|
|
3
|
+
export { MapTracker } from './MapTracker';
|
|
4
|
+
export type { MapTrackerProps } from './MapTracker';
|
|
5
|
+
export { TelemetryStat } from './TelemetryStat';
|
|
6
|
+
export type { TelemetryStatProps } from './TelemetryStat';
|
|
7
|
+
export { TelemetryChart } from './TelemetryChart';
|
|
8
|
+
export type { TelemetryChartProps } from './TelemetryChart';
|
|
9
|
+
export { Chat } from './Chat';
|
|
10
|
+
export type { ChatProps } from './Chat';
|
|
11
|
+
export { AggregateStat } from './AggregateStat';
|
|
12
|
+
export type { AggregateStatProps } from './AggregateStat';
|
|
13
|
+
export { BarChart } from './BarChart';
|
|
14
|
+
export type { BarChartProps } from './BarChart';
|
|
15
|
+
export type { SdkConfig } from '@yoyomq/ije-core';
|
|
16
|
+
export type { AggregateData, AggregateMetric, BarChartData } from '@yoyomq/ije-ui';
|
package/dist/index.js
CHANGED
|
@@ -1 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
export { IjeProvider } from './Provider';
|
|
2
|
+
export { MapTracker } from './MapTracker';
|
|
3
|
+
export { TelemetryStat } from './TelemetryStat';
|
|
4
|
+
export { TelemetryChart } from './TelemetryChart';
|
|
5
|
+
export { Chat } from './Chat';
|
|
6
|
+
export { AggregateStat } from './AggregateStat';
|
|
7
|
+
export { BarChart } from './BarChart';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yoyomq/ije-react",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"source": "src/index.tsx",
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
"access": "public"
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@yoyomq/ije-core": "0.1.
|
|
16
|
-
"@yoyomq/ije-ui": "0.1.
|
|
15
|
+
"@yoyomq/ije-core": "0.1.2",
|
|
16
|
+
"@yoyomq/ije-ui": "0.1.2"
|
|
17
17
|
},
|
|
18
18
|
"peerDependencies": {
|
|
19
19
|
"react": ">=16.8.0",
|