@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.
- package/README.md +89 -106
- package/dist/components/RemoteModule.d.ts +8 -0
- package/dist/components/display/Accordion.d.ts +8 -0
- package/dist/components/display/Section.d.ts +19 -0
- package/dist/components/display/Skeleton.d.ts +21 -0
- package/dist/components/display/index.d.ts +4 -0
- package/dist/components/encoder/DvB.d.ts +53 -0
- package/dist/components/encoder/Livecast.d.ts +37 -0
- package/dist/components/encoder/ViewLog.d.ts +5 -0
- package/dist/components/encoder/index.d.ts +4 -0
- package/dist/components/general/Copy2Clipboard.d.ts +4 -0
- package/dist/components/general/GridSelectionModal.d.ts +24 -0
- package/dist/components/general/Modal.d.ts +17 -0
- package/dist/components/general/Validation.d.ts +6 -0
- package/dist/components/general/index.d.ts +5 -0
- package/dist/components/groups/AudioGroup.d.ts +26 -0
- package/dist/components/groups/FilterGroup.d.ts +3 -0
- package/dist/components/groups/Middleware/Auth.d.ts +14 -0
- package/dist/components/groups/Middleware/Channels.d.ts +26 -0
- package/dist/components/groups/Middleware/MOS.d.ts +24 -0
- package/dist/components/groups/Middleware/Service.d.ts +16 -0
- package/dist/components/groups/Middleware/index.d.ts +5 -0
- package/dist/components/groups/PreviewGroup.d.ts +3 -0
- package/dist/components/groups/ProtocolGroup.d.ts +10 -0
- package/dist/components/groups/VideoGroup.d.ts +3 -0
- package/dist/components/groups/index.d.ts +7 -0
- package/dist/components/index.d.ts +11 -0
- package/dist/components/input/CheckboxField.d.ts +9 -0
- package/dist/components/input/ColorField.d.ts +9 -0
- package/dist/components/input/DatePicker.d.ts +12 -0
- package/dist/components/input/EditInPlaceField.d.ts +7 -0
- package/dist/components/input/InputField.d.ts +15 -0
- package/dist/components/input/Protocol.d.ts +10 -0
- package/dist/components/input/RangeField.d.ts +13 -0
- package/dist/components/input/SelectField.d.ts +13 -0
- package/dist/components/input/SliderField.d.ts +15 -0
- package/dist/components/input/SwitchField.d.ts +11 -0
- package/dist/components/input/index.d.ts +11 -0
- package/dist/components/main/Footer.d.ts +2 -0
- package/dist/components/main/Header.d.ts +7 -0
- package/dist/components/main/PageHeader.d.ts +14 -0
- package/dist/components/main/SaveDiscard.d.ts +13 -0
- package/dist/components/main/Sidebar.d.ts +10 -0
- package/dist/components/main/index.d.ts +6 -0
- package/dist/components/network/AddNetwork.d.ts +6 -0
- package/dist/components/network/InterfacesTable.d.ts +19 -0
- package/dist/components/network/InterfacesTimeseries.d.ts +21 -0
- package/dist/components/network/index.d.ts +4 -0
- package/dist/components/network/validators.d.ts +7 -0
- package/dist/components/system/RequireAuth.d.ts +8 -0
- package/dist/components/system/Wizard.d.ts +6 -0
- package/dist/components/system/index.d.ts +3 -0
- package/dist/components/xcoder/Fflog.d.ts +5 -0
- package/dist/components/xcoder/LiveLog.d.ts +5 -0
- package/dist/components/xcoder/Metrics.d.ts +8 -0
- package/dist/components/xcoder/Panel.d.ts +6 -0
- package/dist/components/xcoder/Preview.d.ts +11 -0
- package/dist/components/xcoder/StreamControl.d.ts +5 -0
- package/dist/components/xcoder/VUMeter.d.ts +8 -0
- package/dist/components/xcoder/VideoPlayer.d.ts +13 -0
- package/dist/components/xcoder/index.d.ts +8 -0
- package/dist/components.js +182 -118
- package/dist/context/AuthContext.d.ts +17 -0
- package/dist/context/ThemeContext.d.ts +11 -0
- package/dist/context/index.d.ts +3 -0
- package/dist/context.js +25 -9
- package/dist/hooks/index.d.ts +3 -0
- package/dist/hooks/useApi.d.ts +1 -0
- package/dist/hooks/useAvailableSubservices.d.ts +13 -0
- package/dist/hooks/useSettings.d.ts +45 -0
- package/dist/hooks.js +25 -9
- package/dist/i18n.d.ts +2 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +55895 -0
- package/dist/package.json +111 -0
- package/dist/services/api.d.ts +22 -0
- package/dist/services/auth.d.ts +15 -0
- package/dist/services/discovery.d.ts +12 -0
- package/dist/services/hostConfig.d.ts +20 -0
- package/dist/services/index.d.ts +9 -0
- package/dist/services/loadRemoteModule.d.ts +9 -0
- package/dist/services/metadataLoader.d.ts +9 -0
- package/dist/services/registry.d.ts +42 -0
- package/dist/services/users.d.ts +18 -0
- package/dist/services/wizard.d.ts +3 -0
- package/dist/services.js +61 -28
- package/dist/types/alarm.d.ts +21 -0
- package/dist/types/auth.d.ts +18 -0
- package/dist/types/group.d.ts +32 -0
- package/dist/types/index.d.ts +6 -0
- package/dist/types/module.d.ts +13 -0
- package/dist/types/plugin.types.d.ts +30 -0
- package/dist/types/protocol.d.ts +12 -0
- package/dist/types/websocket.d.ts +27 -0
- package/dist/types/wizard.d.ts +12 -0
- package/package.json +35 -4
package/README.md
CHANGED
|
@@ -2,149 +2,132 @@
|
|
|
2
2
|
|
|
3
3
|
Biblioteca de componentes, hooks e serviços compartilhados para plugins XCOS.
|
|
4
4
|
|
|
5
|
+
Este repositório empacota um conjunto de componentes React, hooks, serviços e recursos de i18n em `dist/` para consumo por outros pacotes (monorepo) ou via npm.
|
|
6
|
+
|
|
7
|
+
**Versão do pacote:** `@viasoftbr/shared-ui` (veja `package.json` para a versão atual).
|
|
8
|
+
|
|
5
9
|
## 📦 Instalação
|
|
6
10
|
|
|
7
|
-
|
|
11
|
+
Instalação via npm (registro público):
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
# npm
|
|
15
|
+
npm install @viasoftbr/shared-ui
|
|
16
|
+
|
|
17
|
+
# pnpm
|
|
18
|
+
pnpm add @viasoftbr/shared-ui
|
|
19
|
+
|
|
20
|
+
# yarn
|
|
21
|
+
yarn add @viasoftbr/shared-ui
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Instalação no monorepo (workspace pnpm):
|
|
8
25
|
|
|
9
26
|
```bash
|
|
10
|
-
#
|
|
27
|
+
# a partir do diretório do seu pacote consumidor
|
|
11
28
|
pnpm add @viasoftbr/shared-ui --workspace
|
|
12
29
|
```
|
|
13
30
|
|
|
14
|
-
|
|
31
|
+
Instalação local (desenvolvimento):
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
# criar pacote .tgz e instalar no projeto consumidor
|
|
35
|
+
npm run build
|
|
36
|
+
npm pack
|
|
37
|
+
# no projeto consumidor
|
|
38
|
+
npm install ../path/to/viasoftbr-shared-ui-0.0.2.tgz
|
|
39
|
+
|
|
40
|
+
# ou usar link para desenvolvimento iterativo
|
|
41
|
+
# no shared-ui
|
|
42
|
+
npm run build
|
|
43
|
+
npm link
|
|
44
|
+
# no projeto consumidor
|
|
45
|
+
npm link @viasoftbr/shared-ui
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Instalação direta do GitHub (não recomendado sem `dist/` commitado):
|
|
15
49
|
|
|
16
50
|
```json
|
|
17
51
|
{
|
|
18
52
|
"dependencies": {
|
|
19
|
-
"@viasoftbr/shared-
|
|
53
|
+
"@viasoftbr/shared-ui": "git+https://github.com/viasoftbr/shared-ui.git"
|
|
20
54
|
}
|
|
21
55
|
}
|
|
22
56
|
```
|
|
23
57
|
|
|
24
|
-
|
|
58
|
+
> Observação: se instalar diretamente do Git, prefira ter a pasta `dist/` com os artefatos comitados OU adicionar um script `prepare` que execute o build na instalação.
|
|
25
59
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
```typescript
|
|
29
|
-
import {
|
|
30
|
-
// Components
|
|
31
|
-
InputField,
|
|
32
|
-
SelectField,
|
|
33
|
-
SwitchField,
|
|
34
|
-
Section,
|
|
35
|
-
Alert,
|
|
36
|
-
Button,
|
|
37
|
-
PageHeader,
|
|
38
|
-
ActionBar,
|
|
39
|
-
Loading,
|
|
40
|
-
|
|
41
|
-
// Hooks
|
|
42
|
-
useSettings,
|
|
43
|
-
useExpandedSections,
|
|
44
|
-
useDebounce,
|
|
45
|
-
|
|
46
|
-
# @viasoftbr/shared-ui
|
|
47
|
-
|
|
48
|
-
Biblioteca compartilhada de componentes React, hooks, utilitários e i18n usada por plugins e micro-frontends Viasoft.
|
|
49
|
-
|
|
50
|
-
Este repositório fornece um pacote ESM (TypeScript) empacotado em `dist/` e pensado para consumo por outros pacotes dentro do monorepo ou publicamente.
|
|
51
|
-
|
|
52
|
-
## 📦 Instalação
|
|
53
|
-
|
|
54
|
-
Recomendado (monorepo pnpm):
|
|
55
|
-
|
|
56
|
-
```bash
|
|
57
|
-
# do diretório do seu plugin ou pacote que consome esta lib
|
|
58
|
-
pnpm add @viasoftbr/shared-ui --workspace
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
Ou, em um `package.json` local dentro do monorepo:
|
|
62
|
-
|
|
63
|
-
```json
|
|
64
|
-
{
|
|
65
|
-
"dependencies": {
|
|
66
|
-
"@viasoftbr/shared-ui": "workspace:*"
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
> Observação: o pacote é publicado como `@viasoftbr/shared-ui` (veja `package.json`).
|
|
72
|
-
|
|
73
|
-
## 🚀 Uso
|
|
74
|
-
|
|
75
|
-
Importação direta de componentes / hooks / utilitários:
|
|
76
|
-
|
|
77
|
-
```ts
|
|
78
|
-
import { InputField, SelectField, useSettings } from '@viasoftbr/shared-ui';
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
Exportações adicionais (deep imports) estão disponíveis conforme declarado em `package.json`:
|
|
82
|
-
|
|
83
|
-
```ts
|
|
84
|
-
import i18n from '@viasoftbr/shared-ui/i18n';
|
|
85
|
-
import jsmpegBundle from '@viasoftbr/shared-ui/jsmpeg';
|
|
86
|
-
import locale from '@viasoftbr/shared-ui/locales/pt/translation.json';
|
|
87
|
-
```
|
|
60
|
+
## 🚀 Uso
|
|
88
61
|
|
|
89
|
-
|
|
62
|
+
Importação principal:
|
|
90
63
|
|
|
91
|
-
|
|
92
|
-
|
|
64
|
+
```ts
|
|
65
|
+
import { InputField, SelectField, useSettings } from '@viasoftbr/shared-ui';
|
|
66
|
+
```
|
|
93
67
|
|
|
94
|
-
|
|
95
|
-
label="Opção"
|
|
96
|
-
value={selected}
|
|
97
|
-
onChange={setSelected}
|
|
98
|
-
options={[{ value: 'a', label: 'A' }, { value: 'b', label: 'B' }]}
|
|
99
|
-
/>
|
|
100
|
-
```
|
|
68
|
+
Deep imports (subpaths) disponíveis conforme `exports` no `package.json`:
|
|
101
69
|
|
|
102
|
-
|
|
70
|
+
```ts
|
|
71
|
+
import i18n from '@viasoftbr/shared-ui/i18n';
|
|
72
|
+
import jsmpegBundle from '@viasoftbr/shared-ui/jsmpeg';
|
|
73
|
+
import localePt from '@viasoftbr/shared-ui/locales/pt/translation.json';
|
|
74
|
+
```
|
|
103
75
|
|
|
104
|
-
|
|
76
|
+
Exemplo (React):
|
|
105
77
|
|
|
106
|
-
|
|
78
|
+
```tsx
|
|
79
|
+
import React from 'react';
|
|
80
|
+
import { InputField } from '@viasoftbr/shared-ui';
|
|
107
81
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
82
|
+
export function Example() {
|
|
83
|
+
const [value, setValue] = React.useState('');
|
|
84
|
+
return <InputField label="Nome" value={value} onChange={setValue} />;
|
|
85
|
+
}
|
|
86
|
+
```
|
|
111
87
|
|
|
112
|
-
|
|
88
|
+
## 📦 Publicação no npm
|
|
113
89
|
|
|
114
|
-
|
|
90
|
+
Passos básicos para publicar (usuário com permissão no escopo `@viasoftbr`):
|
|
115
91
|
|
|
116
|
-
|
|
92
|
+
```bash
|
|
93
|
+
# instalar dependências
|
|
94
|
+
pnpm install
|
|
117
95
|
|
|
118
|
-
|
|
96
|
+
# gerar build e declarações
|
|
97
|
+
pnpm run build
|
|
119
98
|
|
|
120
|
-
|
|
99
|
+
# atualizar versão (opcional)
|
|
100
|
+
npm version patch
|
|
121
101
|
|
|
122
|
-
|
|
102
|
+
# publicar
|
|
103
|
+
npm publish --access public
|
|
104
|
+
```
|
|
123
105
|
|
|
124
|
-
|
|
106
|
+
Recomendações:
|
|
107
|
+
- Garanta que `dist/` e os `.d.ts` foram gerados antes de publicar.
|
|
108
|
+
- Atualize a versão no `package.json` antes do `npm publish`.
|
|
125
109
|
|
|
126
|
-
|
|
127
|
-
2. Rode o build em modo watch: `pnpm run dev`
|
|
128
|
-
3. Edite os arquivos em `src/` e verifique o output em `dist/`.
|
|
129
|
-
4. Para checar tipos: `pnpm run typecheck`.
|
|
110
|
+
## ⚠️ Peer dependencies
|
|
130
111
|
|
|
131
|
-
|
|
112
|
+
Este pacote declara `react` como peer dependency (`^19.0.0`). O projeto consumidor deve fornecer uma versão compatível do React.
|
|
132
113
|
|
|
133
|
-
|
|
114
|
+
## 🛠 Scripts de desenvolvimento
|
|
134
115
|
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
116
|
+
- `pnpm run build` — Empacota a lib em `dist/` (usa `scripts/build.js`).
|
|
117
|
+
- `pnpm run dev` — Mesma build em modo watch.
|
|
118
|
+
- `pnpm run typecheck` — Roda `tsc --noEmit` para validação de tipos.
|
|
138
119
|
|
|
139
|
-
|
|
120
|
+
## 💡 i18n e assets
|
|
140
121
|
|
|
141
|
-
|
|
122
|
+
O pacote inclui traduções em `locales/` e expõe um helper `i18n` em `@viasoftbr/shared-ui/i18n`. O bundle do player `jsmpeg.vu.min.js` é exposto em `@viasoftbr/shared-ui/jsmpeg`.
|
|
142
123
|
|
|
143
|
-
|
|
124
|
+
## Desenvolvimento
|
|
144
125
|
|
|
145
|
-
|
|
146
|
-
|
|
126
|
+
1. Instale dependências: `pnpm install`
|
|
127
|
+
2. Rode o build em modo watch: `pnpm run dev`
|
|
128
|
+
3. Edite arquivos em `src/` e verifique o output em `dist/`.
|
|
129
|
+
4. Para checar tipos: `pnpm run typecheck`.
|
|
147
130
|
|
|
148
|
-
|
|
131
|
+
---
|
|
149
132
|
|
|
150
|
-
|
|
133
|
+
Se quiser, adapto este README com exemplos reais retirados dos componentes presentes em `src/components/` ou adiciono um `prepare` script para facilitar instalação direta do Git.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
interface RemoteModuleProps {
|
|
2
|
+
scope: string;
|
|
3
|
+
url: string;
|
|
4
|
+
module: string;
|
|
5
|
+
fallback?: React.ReactNode;
|
|
6
|
+
}
|
|
7
|
+
export declare function RemoteModule({ scope, url, module, fallback }: RemoteModuleProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export default RemoteModule;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export type SectionId = string;
|
|
3
|
+
interface SectionProps {
|
|
4
|
+
id: SectionId;
|
|
5
|
+
title: string;
|
|
6
|
+
icon: React.ReactNode;
|
|
7
|
+
expanded: boolean;
|
|
8
|
+
onToggle: (section: SectionId) => void;
|
|
9
|
+
children: React.ReactNode;
|
|
10
|
+
readonly?: boolean;
|
|
11
|
+
loading?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export interface SectionContextType {
|
|
14
|
+
readonly: boolean;
|
|
15
|
+
}
|
|
16
|
+
export declare const SectionContext: React.Context<SectionContextType | undefined>;
|
|
17
|
+
export declare function useSection(): SectionContextType;
|
|
18
|
+
declare const Section: React.FC<SectionProps>;
|
|
19
|
+
export default Section;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface SkeletonProps {
|
|
3
|
+
count?: number;
|
|
4
|
+
height?: string;
|
|
5
|
+
className?: string;
|
|
6
|
+
circle?: boolean;
|
|
7
|
+
fullWidth?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare const SkeletonLine: React.FC<SkeletonProps>;
|
|
10
|
+
interface SkeletonBlockProps {
|
|
11
|
+
lines?: number;
|
|
12
|
+
className?: string;
|
|
13
|
+
}
|
|
14
|
+
export declare const SkeletonBlock: React.FC<SkeletonBlockProps>;
|
|
15
|
+
interface SkeletonTableProps {
|
|
16
|
+
rows?: number;
|
|
17
|
+
columns?: number;
|
|
18
|
+
className?: string;
|
|
19
|
+
}
|
|
20
|
+
export declare const SkeletonTable: React.FC<SkeletonTableProps>;
|
|
21
|
+
export default SkeletonBlock;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { ProtocolSettings } from '../../types/protocol';
|
|
2
|
+
import { AudioSettings } from '../../components/groups/AudioGroup';
|
|
3
|
+
export interface EncoderDvBSettings extends AudioSettings {
|
|
4
|
+
engine: 'cpu' | 'gpu';
|
|
5
|
+
low_latency: boolean;
|
|
6
|
+
video_connection: string;
|
|
7
|
+
video_format: string;
|
|
8
|
+
audio_connection: string;
|
|
9
|
+
video_codec: 'mpeg2' | 'h264' | 'hevc';
|
|
10
|
+
resize: string;
|
|
11
|
+
deinterlace: string;
|
|
12
|
+
clk_src_audio: string;
|
|
13
|
+
clk_src_video: string;
|
|
14
|
+
fec_columns?: string;
|
|
15
|
+
fec_rows?: string;
|
|
16
|
+
srt_stream_id?: string;
|
|
17
|
+
srt_latency?: string;
|
|
18
|
+
ts_bitrate: string;
|
|
19
|
+
video_bitrate: string;
|
|
20
|
+
video_buffer_size: string;
|
|
21
|
+
video_nr: string;
|
|
22
|
+
video_profile: string;
|
|
23
|
+
video_level: string;
|
|
24
|
+
video_preset: string;
|
|
25
|
+
gop_size: string;
|
|
26
|
+
bframes: string;
|
|
27
|
+
refs: string;
|
|
28
|
+
b_pyramid: boolean;
|
|
29
|
+
weightp: boolean;
|
|
30
|
+
cabac: boolean;
|
|
31
|
+
video_pid: string;
|
|
32
|
+
audio1_pid: string;
|
|
33
|
+
audio1_pair: string;
|
|
34
|
+
audio1_gain: string;
|
|
35
|
+
cc_pid: string;
|
|
36
|
+
ts_id: string;
|
|
37
|
+
program_num: string;
|
|
38
|
+
pmt_pid: string;
|
|
39
|
+
pcr_pid: string;
|
|
40
|
+
pcr_interval: string;
|
|
41
|
+
service_name: string;
|
|
42
|
+
provider_name: string;
|
|
43
|
+
protocol: ProtocolSettings;
|
|
44
|
+
}
|
|
45
|
+
export declare const defaultDvBSettings: EncoderDvBSettings;
|
|
46
|
+
declare const DvB: import("react").ForwardRefExoticComponent<{
|
|
47
|
+
settings?: EncoderDvBSettings;
|
|
48
|
+
setSettings?: (s: EncoderDvBSettings) => void;
|
|
49
|
+
encoderId?: number;
|
|
50
|
+
isLoading?: boolean;
|
|
51
|
+
setIsLoading?: (loading: boolean) => void;
|
|
52
|
+
} & import("react").RefAttributes<unknown>>;
|
|
53
|
+
export default DvB;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { AudioSettings } from '../../components/groups/AudioGroup';
|
|
2
|
+
import { ProtocolSettings } from '../../types/protocol';
|
|
3
|
+
export interface EncoderLivecastSettings extends AudioSettings {
|
|
4
|
+
service_label: string;
|
|
5
|
+
video_connection: string;
|
|
6
|
+
video_connection_auto: boolean;
|
|
7
|
+
no_locked_mode: 'black' | 'colorbar';
|
|
8
|
+
video_format: string;
|
|
9
|
+
video_format_auto: boolean;
|
|
10
|
+
input_video_filter: string;
|
|
11
|
+
resize_video: string;
|
|
12
|
+
video_fps: string;
|
|
13
|
+
enable_preview_web: boolean;
|
|
14
|
+
enable_preview_lcd: boolean;
|
|
15
|
+
enable_preview_hdmi: boolean;
|
|
16
|
+
video_codec: 'mpeg2' | 'h264' | 'hevc' | 'hevc_qsv';
|
|
17
|
+
video_bitrate: string;
|
|
18
|
+
enable_abr: boolean;
|
|
19
|
+
video_keyint: string;
|
|
20
|
+
input_audio_filter: string;
|
|
21
|
+
rec_stream: boolean;
|
|
22
|
+
rec_profile: string;
|
|
23
|
+
send_stream: boolean;
|
|
24
|
+
send_protocol: 'mhv2' | 'mhv1' | 'rtmp';
|
|
25
|
+
send_ip: string;
|
|
26
|
+
send_port: number;
|
|
27
|
+
protocol: ProtocolSettings;
|
|
28
|
+
}
|
|
29
|
+
export declare const defaultLivecastSettings: EncoderLivecastSettings;
|
|
30
|
+
declare const Livecast: import("react").ForwardRefExoticComponent<{
|
|
31
|
+
settings?: EncoderLivecastSettings;
|
|
32
|
+
setSettings?: (s: EncoderLivecastSettings) => void;
|
|
33
|
+
encoderId?: number;
|
|
34
|
+
isLoading?: boolean;
|
|
35
|
+
setIsLoading?: (loading: boolean) => void;
|
|
36
|
+
} & import("react").RefAttributes<unknown>>;
|
|
37
|
+
export default Livecast;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export type GridSize = 'full' | '2x2' | '3x3';
|
|
3
|
+
export type CellFull = 'cropped' | 'top';
|
|
4
|
+
export type Cell2x2 = '1' | '2' | '3' | '4';
|
|
5
|
+
export type Cell3x3 = 'main' | '3' | '6' | '7' | '8' | '9';
|
|
6
|
+
export type CellType = CellFull | Cell2x2 | Cell3x3;
|
|
7
|
+
export interface GridSettings {
|
|
8
|
+
gridSize: GridSize;
|
|
9
|
+
selectedCell: CellType;
|
|
10
|
+
}
|
|
11
|
+
export type GridMode = 'lcd' | 'hdmi';
|
|
12
|
+
export declare const valueToGridSettings: Record<string, GridSettings>;
|
|
13
|
+
export declare const gridSettingsToValue: (settings: GridSettings) => string;
|
|
14
|
+
export declare const getGridLabel: (value: string) => string;
|
|
15
|
+
interface GridSelectionModalProps {
|
|
16
|
+
open: boolean;
|
|
17
|
+
onClose: () => void;
|
|
18
|
+
value: string;
|
|
19
|
+
onSave: (value: string) => void;
|
|
20
|
+
mode?: GridMode;
|
|
21
|
+
title?: string;
|
|
22
|
+
}
|
|
23
|
+
declare const GridSelectionModal: React.FC<GridSelectionModalProps>;
|
|
24
|
+
export default GridSelectionModal;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { JSX } from 'react';
|
|
2
|
+
interface ModalProps {
|
|
3
|
+
open: boolean;
|
|
4
|
+
setOpen: (value: boolean) => void;
|
|
5
|
+
title: string;
|
|
6
|
+
message?: string;
|
|
7
|
+
icon?: JSX.Element;
|
|
8
|
+
actionColor?: string;
|
|
9
|
+
element?: JSX.Element;
|
|
10
|
+
positiveLabel?: string;
|
|
11
|
+
negativeLabel?: string;
|
|
12
|
+
positiveCommand?: () => void;
|
|
13
|
+
negativeCommand?: () => void;
|
|
14
|
+
enableToClose?: boolean;
|
|
15
|
+
}
|
|
16
|
+
declare const Modal: React.FC<ModalProps>;
|
|
17
|
+
export default Modal;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import Copy2Clipboard from "./Copy2Clipboard";
|
|
2
|
+
import GridSelectionModal, { getGridLabel } from "./GridSelectionModal";
|
|
3
|
+
import Modal from "./Modal";
|
|
4
|
+
import ValidationItem from "./Validation";
|
|
5
|
+
export { Copy2Clipboard, getGridLabel, GridSelectionModal, Modal, ValidationItem, };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface AudioSettings {
|
|
3
|
+
audioSource?: string;
|
|
4
|
+
audioCodec?: string;
|
|
5
|
+
audioBitrate?: string;
|
|
6
|
+
audioSampleRate?: string;
|
|
7
|
+
audioChannels?: string;
|
|
8
|
+
bitrate?: string;
|
|
9
|
+
channels?: string;
|
|
10
|
+
codec?: string;
|
|
11
|
+
samplerate?: string;
|
|
12
|
+
volume?: number;
|
|
13
|
+
pid?: string;
|
|
14
|
+
enablePreview?: boolean;
|
|
15
|
+
selectedInput?: string;
|
|
16
|
+
}
|
|
17
|
+
interface AudioGroupProps {
|
|
18
|
+
expanded: boolean;
|
|
19
|
+
onToggle: (id: string) => void;
|
|
20
|
+
settings: any;
|
|
21
|
+
setSettings: (settings: any) => void;
|
|
22
|
+
loading?: boolean;
|
|
23
|
+
children?: React.ReactNode;
|
|
24
|
+
}
|
|
25
|
+
declare const AudioGroup: React.FC<AudioGroupProps>;
|
|
26
|
+
export default AudioGroup;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
interface AuthSettings {
|
|
3
|
+
authEnabled: boolean;
|
|
4
|
+
operatorLogin: string;
|
|
5
|
+
operatorPassword: string;
|
|
6
|
+
journalistLogin: string;
|
|
7
|
+
journalistPassword: string;
|
|
8
|
+
}
|
|
9
|
+
interface MiddlewareAuthGroupProps extends GroupProps {
|
|
10
|
+
settings: AuthSettings;
|
|
11
|
+
onChange: (key: keyof AuthSettings, value: any) => void;
|
|
12
|
+
}
|
|
13
|
+
declare const MiddlewareAuthGroup: React.FC<MiddlewareAuthGroupProps>;
|
|
14
|
+
export default MiddlewareAuthGroup;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
interface ChannelMirror {
|
|
3
|
+
enable: boolean;
|
|
4
|
+
host: string;
|
|
5
|
+
port: string;
|
|
6
|
+
remoteChannel: string;
|
|
7
|
+
}
|
|
8
|
+
interface Channel {
|
|
9
|
+
key: number;
|
|
10
|
+
label: string;
|
|
11
|
+
enabled: boolean;
|
|
12
|
+
filesPath: string;
|
|
13
|
+
pgmPath: string;
|
|
14
|
+
pgmPort: string;
|
|
15
|
+
host: string;
|
|
16
|
+
port: string;
|
|
17
|
+
fsWatcherPort: string;
|
|
18
|
+
mirror: ChannelMirror;
|
|
19
|
+
}
|
|
20
|
+
interface MiddlewareChannelsGroupProps extends GroupProps {
|
|
21
|
+
channels: Channel[];
|
|
22
|
+
onChannelChange: (index: number, field: keyof Channel, value: any) => void;
|
|
23
|
+
onMirrorChange: (index: number, field: keyof ChannelMirror, value: any) => void;
|
|
24
|
+
}
|
|
25
|
+
declare const MiddlewareChannelsGroup: React.FC<MiddlewareChannelsGroupProps>;
|
|
26
|
+
export default MiddlewareChannelsGroup;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
interface FolderMapping {
|
|
3
|
+
key: number;
|
|
4
|
+
folderId: string;
|
|
5
|
+
channelToPlace: string;
|
|
6
|
+
}
|
|
7
|
+
interface MOSSettings {
|
|
8
|
+
mosEnabled: boolean;
|
|
9
|
+
mosDebug: boolean;
|
|
10
|
+
mosID: string;
|
|
11
|
+
mosHost: string;
|
|
12
|
+
ncsID: string;
|
|
13
|
+
defaultClipName: string;
|
|
14
|
+
defaultClipExtension: string;
|
|
15
|
+
defaultImageDuration: string;
|
|
16
|
+
folderMappings: FolderMapping[];
|
|
17
|
+
}
|
|
18
|
+
interface MiddlewareMOSGroupProps extends GroupProps {
|
|
19
|
+
settings: MOSSettings;
|
|
20
|
+
onChange: (key: keyof MOSSettings, value: any) => void;
|
|
21
|
+
onFolderMappingChange: (index: number, field: 'folderId' | 'channelToPlace', value: string) => void;
|
|
22
|
+
}
|
|
23
|
+
declare const MiddlewareMOSGroup: React.FC<MiddlewareMOSGroupProps>;
|
|
24
|
+
export default MiddlewareMOSGroup;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
interface ServiceSettings {
|
|
3
|
+
serviceLabelText: string;
|
|
4
|
+
serviceLabelColor: string;
|
|
5
|
+
wsPort: string;
|
|
6
|
+
autoRollEnabled: boolean;
|
|
7
|
+
autoRollInterval: number;
|
|
8
|
+
autoReinsertModified: boolean;
|
|
9
|
+
maxClipsPerCommand: string;
|
|
10
|
+
}
|
|
11
|
+
interface MiddlewareServiceGroupProps extends GroupProps {
|
|
12
|
+
settings: ServiceSettings;
|
|
13
|
+
onChange: (key: keyof ServiceSettings, value: any) => void;
|
|
14
|
+
}
|
|
15
|
+
declare const MiddlewareServiceGroup: React.FC<MiddlewareServiceGroupProps>;
|
|
16
|
+
export default MiddlewareServiceGroup;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import MiddlewareAuthGroup from "./Auth";
|
|
2
|
+
import MiddlewareChannelsGroup from "./Channels";
|
|
3
|
+
import MiddlewareMOSGroup from "./MOS";
|
|
4
|
+
import MiddlewareServiceGroup from "./Service";
|
|
5
|
+
export { MiddlewareAuthGroup, MiddlewareChannelsGroup, MiddlewareMOSGroup, MiddlewareServiceGroup, };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ProtocolSettings } from "../../types/protocol";
|
|
3
|
+
interface ProtocolGroupProps extends GroupProps {
|
|
4
|
+
ffurl?: string;
|
|
5
|
+
settings?: ProtocolSettings;
|
|
6
|
+
setSettings?: (s: ProtocolSettings) => void;
|
|
7
|
+
}
|
|
8
|
+
export declare const defaultProtocolSettings: ProtocolSettings;
|
|
9
|
+
declare const ProtocolGroup: React.FC<ProtocolGroupProps>;
|
|
10
|
+
export default ProtocolGroup;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import AudioGroup from "./AudioGroup";
|
|
2
|
+
import FilterGroup from "./FilterGroup";
|
|
3
|
+
import PreviewGroup from "./PreviewGroup";
|
|
4
|
+
import ProtocolGroup from "./ProtocolGroup";
|
|
5
|
+
import VideoGroup from "./VideoGroup";
|
|
6
|
+
import { MiddlewareAuthGroup, MiddlewareChannelsGroup, MiddlewareMOSGroup, MiddlewareServiceGroup } from './Middleware';
|
|
7
|
+
export { AudioGroup, FilterGroup, MiddlewareAuthGroup, MiddlewareChannelsGroup, MiddlewareMOSGroup, MiddlewareServiceGroup, PreviewGroup, ProtocolGroup, VideoGroup, };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Accordion, Section } from './display';
|
|
2
|
+
import { Copy2Clipboard, getGridLabel, GridSelectionModal, Modal, ValidationItem } from './general';
|
|
3
|
+
import { AudioGroup, FilterGroup, MiddlewareAuthGroup, MiddlewareChannelsGroup, MiddlewareMOSGroup, MiddlewareServiceGroup, PreviewGroup, ProtocolGroup, VideoGroup } from './groups';
|
|
4
|
+
import { DvB, Livecast, ViewLog } from './encoder';
|
|
5
|
+
import { CheckboxField, ColorField, DatePicker, EditInPlaceField, InputField, Protocol, RangeField, SelectField, SliderField, SwitchField } from './input';
|
|
6
|
+
import { Footer, Header, PageHeader, SaveDiscard, Sidebar } from './main';
|
|
7
|
+
import { AddNetwork, InterfacesTable, InterfacesTimeseries } from './network';
|
|
8
|
+
import { ConfigWizard, RequireAuth } from './system';
|
|
9
|
+
import { RemoteModule } from './RemoteModule';
|
|
10
|
+
import { Fflog, MetricBar, Panel, Preview, StreamControl, VideoPlayer, VUBar } from './xcoder';
|
|
11
|
+
export { Accordion, AddNetwork, AudioGroup, CheckboxField, ConfigWizard, Copy2Clipboard, ColorField, getGridLabel, GridSelectionModal, DatePicker, DvB, EditInPlaceField, Fflog, FilterGroup, Footer, Header, InputField, InterfacesTable, InterfacesTimeseries, SwitchField, Livecast, MetricBar, MiddlewareAuthGroup, MiddlewareChannelsGroup, MiddlewareMOSGroup, MiddlewareServiceGroup, Modal, PageHeader, Panel, Preview, PreviewGroup, ProtocolGroup, Protocol, RangeField, RemoteModule, RequireAuth, SaveDiscard, Section, SelectField, Sidebar, SliderField, StreamControl, ValidationItem, VideoGroup, VideoPlayer, ViewLog, VUBar };
|