@viasoftbr/shared-ui 0.0.1 → 0.0.3

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 (96) hide show
  1. package/README.md +89 -106
  2. package/dist/components/RemoteModule.d.ts +8 -0
  3. package/dist/components/display/Accordion.d.ts +8 -0
  4. package/dist/components/display/Section.d.ts +19 -0
  5. package/dist/components/display/Skeleton.d.ts +21 -0
  6. package/dist/components/display/index.d.ts +4 -0
  7. package/dist/components/encoder/DvB.d.ts +53 -0
  8. package/dist/components/encoder/Livecast.d.ts +37 -0
  9. package/dist/components/encoder/ViewLog.d.ts +5 -0
  10. package/dist/components/encoder/index.d.ts +4 -0
  11. package/dist/components/general/Copy2Clipboard.d.ts +4 -0
  12. package/dist/components/general/GridSelectionModal.d.ts +24 -0
  13. package/dist/components/general/Modal.d.ts +17 -0
  14. package/dist/components/general/Validation.d.ts +6 -0
  15. package/dist/components/general/index.d.ts +5 -0
  16. package/dist/components/groups/AudioGroup.d.ts +26 -0
  17. package/dist/components/groups/FilterGroup.d.ts +3 -0
  18. package/dist/components/groups/Middleware/Auth.d.ts +14 -0
  19. package/dist/components/groups/Middleware/Channels.d.ts +26 -0
  20. package/dist/components/groups/Middleware/MOS.d.ts +24 -0
  21. package/dist/components/groups/Middleware/Service.d.ts +16 -0
  22. package/dist/components/groups/Middleware/index.d.ts +5 -0
  23. package/dist/components/groups/PreviewGroup.d.ts +3 -0
  24. package/dist/components/groups/ProtocolGroup.d.ts +10 -0
  25. package/dist/components/groups/VideoGroup.d.ts +3 -0
  26. package/dist/components/groups/index.d.ts +7 -0
  27. package/dist/components/index.d.ts +11 -0
  28. package/dist/components/input/CheckboxField.d.ts +9 -0
  29. package/dist/components/input/ColorField.d.ts +9 -0
  30. package/dist/components/input/DatePicker.d.ts +12 -0
  31. package/dist/components/input/EditInPlaceField.d.ts +7 -0
  32. package/dist/components/input/InputField.d.ts +15 -0
  33. package/dist/components/input/Protocol.d.ts +10 -0
  34. package/dist/components/input/RangeField.d.ts +13 -0
  35. package/dist/components/input/SelectField.d.ts +13 -0
  36. package/dist/components/input/SliderField.d.ts +15 -0
  37. package/dist/components/input/SwitchField.d.ts +11 -0
  38. package/dist/components/input/index.d.ts +11 -0
  39. package/dist/components/main/Footer.d.ts +2 -0
  40. package/dist/components/main/Header.d.ts +7 -0
  41. package/dist/components/main/PageHeader.d.ts +14 -0
  42. package/dist/components/main/SaveDiscard.d.ts +13 -0
  43. package/dist/components/main/Sidebar.d.ts +10 -0
  44. package/dist/components/main/index.d.ts +6 -0
  45. package/dist/components/network/AddNetwork.d.ts +6 -0
  46. package/dist/components/network/InterfacesTable.d.ts +19 -0
  47. package/dist/components/network/InterfacesTimeseries.d.ts +21 -0
  48. package/dist/components/network/index.d.ts +4 -0
  49. package/dist/components/network/validators.d.ts +7 -0
  50. package/dist/components/system/RequireAuth.d.ts +8 -0
  51. package/dist/components/system/Wizard.d.ts +6 -0
  52. package/dist/components/system/index.d.ts +3 -0
  53. package/dist/components/xcoder/Fflog.d.ts +5 -0
  54. package/dist/components/xcoder/LiveLog.d.ts +5 -0
  55. package/dist/components/xcoder/Metrics.d.ts +8 -0
  56. package/dist/components/xcoder/Panel.d.ts +6 -0
  57. package/dist/components/xcoder/Preview.d.ts +11 -0
  58. package/dist/components/xcoder/StreamControl.d.ts +5 -0
  59. package/dist/components/xcoder/VUMeter.d.ts +8 -0
  60. package/dist/components/xcoder/VideoPlayer.d.ts +13 -0
  61. package/dist/components/xcoder/index.d.ts +8 -0
  62. package/dist/components.js +182 -118
  63. package/dist/context/AuthContext.d.ts +17 -0
  64. package/dist/context/ThemeContext.d.ts +11 -0
  65. package/dist/context/index.d.ts +3 -0
  66. package/dist/context.js +25 -9
  67. package/dist/hooks/index.d.ts +3 -0
  68. package/dist/hooks/useApi.d.ts +1 -0
  69. package/dist/hooks/useAvailableSubservices.d.ts +13 -0
  70. package/dist/hooks/useSettings.d.ts +45 -0
  71. package/dist/hooks.js +25 -9
  72. package/dist/i18n.d.ts +2 -0
  73. package/dist/index.d.ts +6 -0
  74. package/dist/index.js +55895 -0
  75. package/dist/package.json +111 -0
  76. package/dist/services/api.d.ts +22 -0
  77. package/dist/services/auth.d.ts +15 -0
  78. package/dist/services/discovery.d.ts +12 -0
  79. package/dist/services/hostConfig.d.ts +20 -0
  80. package/dist/services/index.d.ts +9 -0
  81. package/dist/services/loadRemoteModule.d.ts +9 -0
  82. package/dist/services/metadataLoader.d.ts +9 -0
  83. package/dist/services/registry.d.ts +42 -0
  84. package/dist/services/users.d.ts +18 -0
  85. package/dist/services/wizard.d.ts +3 -0
  86. package/dist/services.js +61 -28
  87. package/dist/types/alarm.d.ts +21 -0
  88. package/dist/types/auth.d.ts +18 -0
  89. package/dist/types/group.d.ts +32 -0
  90. package/dist/types/index.d.ts +6 -0
  91. package/dist/types/module.d.ts +13 -0
  92. package/dist/types/plugin.types.d.ts +30 -0
  93. package/dist/types/protocol.d.ts +12 -0
  94. package/dist/types/websocket.d.ts +27 -0
  95. package/dist/types/wizard.d.ts +12 -0
  96. package/package.json +35 -4
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ declare const ColorField: React.FC<{
3
+ label: string;
4
+ value: string;
5
+ onChange: (value: string) => "";
6
+ placeholder: string;
7
+ readonly: boolean;
8
+ }>;
9
+ export default ColorField;
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ interface DatePickerProps {
3
+ value?: Date;
4
+ onChange?: (date: Date) => void;
5
+ minDate?: Date;
6
+ maxDate?: Date;
7
+ placeholder?: string;
8
+ justIcon?: boolean;
9
+ localDisplayemnt?: boolean;
10
+ }
11
+ declare const DatePicker: React.FC<DatePickerProps>;
12
+ export default DatePicker;
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ interface EditProps {
3
+ initialValue: string;
4
+ onSave: (newValue: string) => void;
5
+ }
6
+ declare const EditInPlaceField: React.FC<EditProps>;
7
+ export default EditInPlaceField;
@@ -0,0 +1,15 @@
1
+ import React, { JSX } from 'react';
2
+ interface InputFieldProps {
3
+ label?: string | JSX.Element;
4
+ type: 'text' | 'number' | 'password' | 'ip' | 'dns';
5
+ value: string;
6
+ onChange: (value: string) => void;
7
+ placeholder?: string;
8
+ readonly?: boolean;
9
+ isValid?: boolean;
10
+ errorMessage?: string;
11
+ min?: string;
12
+ max?: string;
13
+ }
14
+ declare const InputField: React.FC<InputFieldProps>;
15
+ export default InputField;
@@ -0,0 +1,10 @@
1
+ import React from "react";
2
+ import { ProtocolSettings } from "../../types/protocol";
3
+ interface ProtocolProps {
4
+ settings: ProtocolSettings;
5
+ setSettings: (value: any) => void;
6
+ availableOptions?: string[];
7
+ type?: 'input' | 'output';
8
+ }
9
+ declare const Protocol: React.FC<ProtocolProps>;
10
+ export default Protocol;
@@ -0,0 +1,13 @@
1
+ import React from "react";
2
+ interface RangeProps {
3
+ value: [number, number];
4
+ setValue: (newRange: [number, number]) => void;
5
+ label: string;
6
+ min: number;
7
+ max: number;
8
+ step?: number;
9
+ displayBg?: boolean;
10
+ disabled?: boolean;
11
+ }
12
+ declare const RangeField: React.FC<RangeProps>;
13
+ export default RangeField;
@@ -0,0 +1,13 @@
1
+ interface Option {
2
+ value: string;
3
+ label: string;
4
+ }
5
+ interface SelectFieldProps {
6
+ label?: string;
7
+ value: string;
8
+ onChange: (value: string) => void;
9
+ options: Option[];
10
+ disabled?: boolean;
11
+ }
12
+ declare const SelectField: React.FC<SelectFieldProps>;
13
+ export default SelectField;
@@ -0,0 +1,15 @@
1
+ import React from "react";
2
+ interface SliderProps {
3
+ value: number;
4
+ setValue: (value: number) => void;
5
+ label: string;
6
+ min: number;
7
+ max: number;
8
+ step?: number;
9
+ hideButtons?: boolean;
10
+ displayBg?: boolean;
11
+ content?: any[];
12
+ disabled?: boolean;
13
+ }
14
+ declare const SliderField: React.FC<SliderProps>;
15
+ export default SliderField;
@@ -0,0 +1,11 @@
1
+ import React from "react";
2
+ interface SwitchFieldProps {
3
+ label?: string;
4
+ checked: boolean;
5
+ onChange: (checked: boolean) => void;
6
+ content: string[];
7
+ width?: string;
8
+ disabled?: boolean;
9
+ }
10
+ declare const SwitchField: React.FC<SwitchFieldProps>;
11
+ export default SwitchField;
@@ -0,0 +1,11 @@
1
+ import CheckboxField from './CheckboxField';
2
+ import ColorField from './ColorField';
3
+ import DatePicker from './DatePicker';
4
+ import EditInPlaceField from './EditInPlaceField';
5
+ import InputField from './InputField';
6
+ import Protocol from './Protocol';
7
+ import RangeField from './RangeField';
8
+ import SelectField from './SelectField';
9
+ import SliderField from './SliderField';
10
+ import SwitchField from './SwitchField';
11
+ export { CheckboxField, ColorField, DatePicker, EditInPlaceField, InputField, Protocol, RangeField, SelectField, SliderField, SwitchField, };
@@ -0,0 +1,2 @@
1
+ declare const Footer: React.FC;
2
+ export default Footer;
@@ -0,0 +1,7 @@
1
+ import React from "react";
2
+ interface HeaderProps {
3
+ isSidebarOpen: boolean;
4
+ setSidebarOpen: (state: boolean) => void;
5
+ }
6
+ declare const Header: React.FC<HeaderProps>;
7
+ export default Header;
@@ -0,0 +1,14 @@
1
+ import React from "react";
2
+ interface PageHeaderProps {
3
+ icon: React.ReactNode;
4
+ title: string;
5
+ select?: [value: string, setValue: (value: string) => void, options: {
6
+ value: string;
7
+ label: string;
8
+ }[]];
9
+ state?: 'start' | 'stop';
10
+ hasStates?: boolean;
11
+ children?: React.ReactNode;
12
+ }
13
+ declare const PageHeader: React.FC<PageHeaderProps>;
14
+ export default PageHeader;
@@ -0,0 +1,13 @@
1
+ import React from 'react';
2
+ interface Props {
3
+ isDirty: boolean;
4
+ saving?: boolean;
5
+ canSave?: boolean;
6
+ onDiscard: () => void;
7
+ onSave: () => Promise<void> | void;
8
+ saveLabel?: string;
9
+ discardLabel?: string;
10
+ children?: React.ReactNode;
11
+ }
12
+ declare const SaveDiscard: React.FC<Props>;
13
+ export default SaveDiscard;
@@ -0,0 +1,10 @@
1
+ import type { PageMetadata } from '../../types/plugin.types';
2
+ import type { ModuleDefinition } from '../../types/module';
3
+ interface SidebarProps {
4
+ pages?: PageMetadata[];
5
+ modules?: ModuleDefinition[];
6
+ isOpen: boolean;
7
+ setIsOpen?: (value: boolean) => void;
8
+ }
9
+ declare const Sidebar: React.FC<SidebarProps>;
10
+ export default Sidebar;
@@ -0,0 +1,6 @@
1
+ import Footer from "./Footer";
2
+ import Header from "./Header";
3
+ import PageHeader from "./PageHeader";
4
+ import SaveDiscard from "./SaveDiscard";
5
+ import Sidebar from "./Sidebar";
6
+ export { Footer, Header, PageHeader, SaveDiscard, Sidebar, };
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ interface Props {
3
+ onAdd: (name: string) => void;
4
+ }
5
+ declare const AddNetwork: React.FC<Props>;
6
+ export default AddNetwork;
@@ -0,0 +1,19 @@
1
+ import React from 'react';
2
+ export interface NetworkInterface {
3
+ interface_name: string;
4
+ ip: string;
5
+ rx_rate: number;
6
+ tx_rate: number;
7
+ mac?: string;
8
+ operstate?: string;
9
+ speed?: string;
10
+ duplex?: string;
11
+ }
12
+ interface Props {
13
+ snapshot: NetworkInterface[];
14
+ isOverlay?: boolean;
15
+ onClose?: () => void;
16
+ height?: string;
17
+ }
18
+ declare const InterfacesTable: React.FC<Props>;
19
+ export default InterfacesTable;
@@ -0,0 +1,21 @@
1
+ import React from 'react';
2
+ export interface NetworkInterface {
3
+ interface_name: string;
4
+ ip: string;
5
+ rx_rate: number;
6
+ tx_rate: number;
7
+ mac?: string;
8
+ operstate?: string;
9
+ speed?: string;
10
+ duplex?: string;
11
+ }
12
+ interface Props {
13
+ snapshot: NetworkInterface[];
14
+ bufferSeconds?: number;
15
+ height?: number;
16
+ mode?: 'download' | 'upload' | 'split';
17
+ minBurnInSnapshots?: number;
18
+ hideOptions?: boolean[];
19
+ }
20
+ declare const InterfacesTimeseries: React.FC<Props>;
21
+ export default InterfacesTimeseries;
@@ -0,0 +1,4 @@
1
+ import AddNetwork from "./AddNetwork.tsx";
2
+ import InterfacesTable from "./InterfacesTable.tsx";
3
+ import InterfacesTimeseries from "./InterfacesTimeseries.tsx";
4
+ export { AddNetwork, InterfacesTable, InterfacesTimeseries, };
@@ -0,0 +1,7 @@
1
+ export declare const isValidIPv4: (ip: string) => boolean;
2
+ export declare const isValidIPv6: (ip: string) => boolean;
3
+ declare const _default: {
4
+ isValidIPv4: (ip: string) => boolean;
5
+ isValidIPv6: (ip: string) => boolean;
6
+ };
7
+ export default _default;
@@ -0,0 +1,8 @@
1
+ import React, { JSX } from 'react';
2
+ import { Role } from '../../types/auth';
3
+ interface RequireAuthProps {
4
+ level?: Role;
5
+ children: JSX.Element;
6
+ }
7
+ declare const RequireAuth: React.FC<RequireAuthProps>;
8
+ export default RequireAuth;
@@ -0,0 +1,6 @@
1
+ export type ConfigWizardProps = {
2
+ basePath?: string;
3
+ onComplete?: () => void;
4
+ };
5
+ declare const ConfigWizard: React.FC<ConfigWizardProps>;
6
+ export default ConfigWizard;
@@ -0,0 +1,3 @@
1
+ import RequireAuth from "./RequireAuth";
2
+ import ConfigWizard from "./Wizard";
3
+ export { ConfigWizard, RequireAuth, };
@@ -0,0 +1,5 @@
1
+ import React from "react";
2
+ declare const Fflog: React.FC<{
3
+ index: number;
4
+ }>;
5
+ export default Fflog;
@@ -0,0 +1,5 @@
1
+ import React from "react";
2
+ declare const LiveLog: React.FC<{
3
+ encoder: string;
4
+ }>;
5
+ export default LiveLog;
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ declare const MetricBar: React.FC<{
3
+ label: string;
4
+ value: number;
5
+ suffix: string;
6
+ color: 'blue' | 'purple' | 'green' | 'cyan' | 'pink';
7
+ }>;
8
+ export default MetricBar;
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ interface PanelProps {
3
+ index: number;
4
+ }
5
+ declare const EncoderDecoderPanel: React.FC<PanelProps>;
6
+ export default EncoderDecoderPanel;
@@ -0,0 +1,11 @@
1
+ import React from "react";
2
+ interface PreviewProps {
3
+ index: number;
4
+ setVuPts: (value: number) => void;
5
+ showDlog?: boolean;
6
+ showFflog?: boolean;
7
+ showStreamControl?: boolean;
8
+ orientation?: 'horizontal' | 'vertical';
9
+ }
10
+ declare const Preview: React.FC<PreviewProps>;
11
+ export default Preview;
@@ -0,0 +1,5 @@
1
+ import React from "react";
2
+ declare const StreamControl: React.FC<{
3
+ index: number;
4
+ }>;
5
+ export default StreamControl;
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ declare const VUBar: React.FC<{
3
+ index: number;
4
+ volume: any[];
5
+ width?: string;
6
+ displayMarks?: boolean;
7
+ }>;
8
+ export default VUBar;
@@ -0,0 +1,13 @@
1
+ import React from 'react';
2
+ interface VUChannel {
3
+ left: number;
4
+ right: number;
5
+ }
6
+ interface VideoPlayerProps {
7
+ pgmIndex: number;
8
+ vuChannels: number;
9
+ setVuPts: (value: number) => void;
10
+ setVuChannels: (value: VUChannel[]) => void;
11
+ }
12
+ declare const VideoPlayer: React.FC<VideoPlayerProps>;
13
+ export default VideoPlayer;
@@ -0,0 +1,8 @@
1
+ import Fflog from "./Fflog";
2
+ import MetricBar from "./Metrics";
3
+ import Panel from "./Panel";
4
+ import Preview from "./Preview";
5
+ import StreamControl from "./StreamControl";
6
+ import VideoPlayer from "./VideoPlayer";
7
+ import VUBar from "./VUMeter";
8
+ export { Fflog, MetricBar, Panel, Preview, StreamControl, VideoPlayer, VUBar };