@tmsoft/webphone 1.0.26 → 1.0.27
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/index.d.ts +274 -0
- package/dist/webphone-standalone.cjs.js +1702 -0
- package/dist/webphone-standalone.es.js +24083 -0
- package/dist/webphone-standalone.iife.js +1702 -0
- package/dist/webphone-standalone.umd.js +1702 -0
- package/dist/webphone-web-component.cjs.js +2 -2
- package/dist/webphone-web-component.es.js +3 -3
- package/dist/webphone-web-component.umd.js +2 -2
- package/dist/webphone.cjs.js +1702 -0
- package/dist/webphone.es.js +24089 -0
- package/dist/webphone.umd.js +1702 -0
- package/package.json +2 -1
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
import { App } from 'vue';
|
|
2
|
+
import { AuraBaseDesignTokens } from '@primeuix/themes/aura/base';
|
|
3
|
+
import { ButtonProps } from 'primevue/button';
|
|
4
|
+
import { ButtonSlots } from 'primevue/button';
|
|
5
|
+
import { ComponentOptionsMixin } from 'vue';
|
|
6
|
+
import { ComponentProvideOptions } from 'vue';
|
|
7
|
+
import { ComputedRef } from 'vue';
|
|
8
|
+
import { DefineComponent } from 'vue';
|
|
9
|
+
import { DefineComponent as DefineComponent_2 } from '@primevue/core';
|
|
10
|
+
import { defineCustomElement } from 'vue';
|
|
11
|
+
import { DialogProps } from 'primevue/dialog';
|
|
12
|
+
import { DialogSlots } from 'primevue/dialog';
|
|
13
|
+
import { ExtractPropTypes } from 'vue';
|
|
14
|
+
import { FunctionalComponent } from 'vue';
|
|
15
|
+
import { InputTextProps } from 'primevue/inputtext';
|
|
16
|
+
import { InputTextSlots } from 'primevue/inputtext';
|
|
17
|
+
import { Preset } from '@primeuix/themes/types';
|
|
18
|
+
import { PropType } from 'vue';
|
|
19
|
+
import { PublicProps } from 'vue';
|
|
20
|
+
import { Ref } from 'vue';
|
|
21
|
+
import { SelectChangeEvent } from 'primevue/select';
|
|
22
|
+
import { SelectFilterEvent } from 'primevue/select';
|
|
23
|
+
import { SelectMethods } from 'primevue/select';
|
|
24
|
+
import { SelectProps } from 'primevue/select';
|
|
25
|
+
import { SelectSlots } from 'primevue/select';
|
|
26
|
+
import { SliderProps } from 'primevue/slider';
|
|
27
|
+
import { SliderSlideEndEvent } from 'primevue/slider';
|
|
28
|
+
import { SliderSlots } from 'primevue/slider';
|
|
29
|
+
import { SVGAttributes } from 'vue';
|
|
30
|
+
import { VueElementConstructor } from 'vue';
|
|
31
|
+
|
|
32
|
+
export declare function configurePrimeVue(app: App): void;
|
|
33
|
+
|
|
34
|
+
export declare function createWebphoneElement(): ReturnType<typeof defineCustomElement>;
|
|
35
|
+
|
|
36
|
+
export declare function install(app: App, options?: {
|
|
37
|
+
configurePrimeVue?: boolean;
|
|
38
|
+
}): void;
|
|
39
|
+
|
|
40
|
+
export declare const primeVueConfig: {
|
|
41
|
+
theme: {
|
|
42
|
+
unstyled: boolean;
|
|
43
|
+
preset: Preset<AuraBaseDesignTokens>;
|
|
44
|
+
options: {
|
|
45
|
+
prefix: string;
|
|
46
|
+
darkModeSelector: string;
|
|
47
|
+
cssLayer: boolean;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
export declare function registerCustomElement(): VueElementConstructor<unknown>;
|
|
53
|
+
|
|
54
|
+
export declare const WebPhone: DefineComponent<ExtractPropTypes< {
|
|
55
|
+
extension: {
|
|
56
|
+
type: StringConstructor;
|
|
57
|
+
required: true;
|
|
58
|
+
};
|
|
59
|
+
password: {
|
|
60
|
+
type: StringConstructor;
|
|
61
|
+
required: true;
|
|
62
|
+
};
|
|
63
|
+
domain: {
|
|
64
|
+
type: StringConstructor;
|
|
65
|
+
required: true;
|
|
66
|
+
};
|
|
67
|
+
mode: {
|
|
68
|
+
type: StringConstructor;
|
|
69
|
+
default: string;
|
|
70
|
+
validator: (value: string) => boolean;
|
|
71
|
+
};
|
|
72
|
+
image: {
|
|
73
|
+
type: StringConstructor;
|
|
74
|
+
required: false;
|
|
75
|
+
};
|
|
76
|
+
to: {
|
|
77
|
+
type: StringConstructor;
|
|
78
|
+
required: false;
|
|
79
|
+
};
|
|
80
|
+
callback: {
|
|
81
|
+
type: PropType<(event: MouseEvent) => void>;
|
|
82
|
+
required: false;
|
|
83
|
+
};
|
|
84
|
+
}>, {
|
|
85
|
+
setCallVolume: (value: number | number[]) => void;
|
|
86
|
+
validateKeydown: (event: KeyboardEvent) => void;
|
|
87
|
+
setNotificationVolume: (value: number | number[]) => void;
|
|
88
|
+
dtmfKeys: string[];
|
|
89
|
+
canCall: ComputedRef<boolean | "" | undefined>;
|
|
90
|
+
handleDTMF: (digit: string) => void;
|
|
91
|
+
statusClass: ComputedRef<"text-[#03ac7e]" | "text-blue-400" | "text-yellow-400" | "text-red-500">;
|
|
92
|
+
showNumpad: Ref<boolean, boolean>;
|
|
93
|
+
toggleNumpad: () => void;
|
|
94
|
+
audioVolumeRef: Ref<any, any>;
|
|
95
|
+
audioDevicesRef: Ref<any, any>;
|
|
96
|
+
toggleAudioVolume: (event: MouseEvent) => void;
|
|
97
|
+
toggleAudioDevices: (event: MouseEvent) => void;
|
|
98
|
+
deleteLastDigit: () => void;
|
|
99
|
+
isWebcall: ComputedRef<boolean>;
|
|
100
|
+
isCall: ComputedRef<boolean>;
|
|
101
|
+
isVideo: ComputedRef<boolean>;
|
|
102
|
+
finalPhoneNumber: ComputedRef<string | undefined>;
|
|
103
|
+
showSettings: Ref<boolean, boolean>;
|
|
104
|
+
microphonePermission: Ref<"granted" | "denied" | "prompt", "granted" | "denied" | "prompt">;
|
|
105
|
+
isRequestingPermission: Ref<boolean, boolean>;
|
|
106
|
+
requestMicrophonePermission: () => Promise<boolean>;
|
|
107
|
+
playerRef: Ref<HTMLAudioElement | null, HTMLAudioElement | null>;
|
|
108
|
+
ringerRef: Ref<HTMLAudioElement | null, HTMLAudioElement | null>;
|
|
109
|
+
backRingerRef: Ref<HTMLAudioElement | null, HTMLAudioElement | null>;
|
|
110
|
+
viewerRef: Ref<HTMLVideoElement | null, HTMLVideoElement | null>;
|
|
111
|
+
selfViewerRef: Ref<HTMLVideoElement | null, HTMLVideoElement | null>;
|
|
112
|
+
startSIP: () => void;
|
|
113
|
+
stopSIP: () => void;
|
|
114
|
+
makeCall: (to: string, hasVideo: boolean) => void;
|
|
115
|
+
answerCall: () => void | undefined;
|
|
116
|
+
endCall: () => void | undefined;
|
|
117
|
+
toggleMute: () => void;
|
|
118
|
+
microphones: Ref< {
|
|
119
|
+
readonly deviceId: string;
|
|
120
|
+
readonly groupId: string;
|
|
121
|
+
readonly kind: MediaDeviceKind;
|
|
122
|
+
readonly label: string;
|
|
123
|
+
toJSON: () => any;
|
|
124
|
+
}[], MediaDeviceInfo[] | {
|
|
125
|
+
readonly deviceId: string;
|
|
126
|
+
readonly groupId: string;
|
|
127
|
+
readonly kind: MediaDeviceKind;
|
|
128
|
+
readonly label: string;
|
|
129
|
+
toJSON: () => any;
|
|
130
|
+
}[]>;
|
|
131
|
+
speakers: Ref< {
|
|
132
|
+
readonly deviceId: string;
|
|
133
|
+
readonly groupId: string;
|
|
134
|
+
readonly kind: MediaDeviceKind;
|
|
135
|
+
readonly label: string;
|
|
136
|
+
toJSON: () => any;
|
|
137
|
+
}[], MediaDeviceInfo[] | {
|
|
138
|
+
readonly deviceId: string;
|
|
139
|
+
readonly groupId: string;
|
|
140
|
+
readonly kind: MediaDeviceKind;
|
|
141
|
+
readonly label: string;
|
|
142
|
+
toJSON: () => any;
|
|
143
|
+
}[]>;
|
|
144
|
+
selectedMicId: Ref<string | null, string | null>;
|
|
145
|
+
selectedSpeakerId: Ref<string | null, string | null>;
|
|
146
|
+
isMuted: Ref<boolean, boolean>;
|
|
147
|
+
activeCall: Ref<boolean, boolean>;
|
|
148
|
+
isSIPActive: Ref<boolean, boolean>;
|
|
149
|
+
canMute: ComputedRef<boolean>;
|
|
150
|
+
canAnswer: ComputedRef<boolean>;
|
|
151
|
+
canHangup: ComputedRef<boolean>;
|
|
152
|
+
canStartSIP: ComputedRef<boolean>;
|
|
153
|
+
canStopSIP: ComputedRef<boolean>;
|
|
154
|
+
changeMicrophone: (deviceId: string) => Promise<void>;
|
|
155
|
+
changeSpeaker: (deviceId: string) => Promise<void>;
|
|
156
|
+
callVolume: Ref<number, number>;
|
|
157
|
+
notificationVolume: Ref<number, number>;
|
|
158
|
+
setVolume: (type: "call" | "notification", volume: number) => void;
|
|
159
|
+
isIncomingCall: Ref<boolean, boolean>;
|
|
160
|
+
sendDTMF: (digit: string) => void;
|
|
161
|
+
resetStates: () => void;
|
|
162
|
+
phoneNumber: Ref<string, string>;
|
|
163
|
+
callerId: Ref<string | null, string | null>;
|
|
164
|
+
isRinging: Ref<boolean, boolean>;
|
|
165
|
+
statusMessage: ComputedRef<string>;
|
|
166
|
+
formattedCallDuration: ComputedRef<string>;
|
|
167
|
+
callDuration: Ref<number, number>;
|
|
168
|
+
isOutgoingCall: Ref<boolean, boolean>;
|
|
169
|
+
checkMicrophonePermission: () => Promise<"granted" | "denied" | "prompt">;
|
|
170
|
+
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes< {
|
|
171
|
+
extension: {
|
|
172
|
+
type: StringConstructor;
|
|
173
|
+
required: true;
|
|
174
|
+
};
|
|
175
|
+
password: {
|
|
176
|
+
type: StringConstructor;
|
|
177
|
+
required: true;
|
|
178
|
+
};
|
|
179
|
+
domain: {
|
|
180
|
+
type: StringConstructor;
|
|
181
|
+
required: true;
|
|
182
|
+
};
|
|
183
|
+
mode: {
|
|
184
|
+
type: StringConstructor;
|
|
185
|
+
default: string;
|
|
186
|
+
validator: (value: string) => boolean;
|
|
187
|
+
};
|
|
188
|
+
image: {
|
|
189
|
+
type: StringConstructor;
|
|
190
|
+
required: false;
|
|
191
|
+
};
|
|
192
|
+
to: {
|
|
193
|
+
type: StringConstructor;
|
|
194
|
+
required: false;
|
|
195
|
+
};
|
|
196
|
+
callback: {
|
|
197
|
+
type: PropType<(event: MouseEvent) => void>;
|
|
198
|
+
required: false;
|
|
199
|
+
};
|
|
200
|
+
}>> & Readonly<{}>, {
|
|
201
|
+
mode: string;
|
|
202
|
+
}, {}, {
|
|
203
|
+
PrimeButton: DefineComponent_2<ButtonProps, ButtonSlots, (e: string, ...args: any[]) => void>;
|
|
204
|
+
PrimeInputText: DefineComponent_2<InputTextProps, InputTextSlots, ((e: "update:modelValue", value: string | undefined) => void) & ((e: "value-change", value: string | undefined) => void)>;
|
|
205
|
+
WebphoneSettings: DefineComponent<ExtractPropTypes< {
|
|
206
|
+
callVolume: NumberConstructor;
|
|
207
|
+
notificationVolume: NumberConstructor;
|
|
208
|
+
selectedMicId: StringConstructor;
|
|
209
|
+
selectedSpeakerId: StringConstructor;
|
|
210
|
+
microphones: PropType<Array<{
|
|
211
|
+
label: string;
|
|
212
|
+
deviceId: string;
|
|
213
|
+
}>>;
|
|
214
|
+
speakers: PropType<Array<{
|
|
215
|
+
label: string;
|
|
216
|
+
deviceId: string;
|
|
217
|
+
}>>;
|
|
218
|
+
}>, {
|
|
219
|
+
showSettings: Ref<boolean, boolean>;
|
|
220
|
+
openDialog: () => void;
|
|
221
|
+
updateCallVolume: (value: number | number[]) => void;
|
|
222
|
+
updateNotificationVolume: (value: number | number[]) => void;
|
|
223
|
+
updateSelectedMic: (value: string) => void;
|
|
224
|
+
updateSelectedSpeaker: (value: string) => void;
|
|
225
|
+
selectedMic: ComputedRef< {
|
|
226
|
+
label: string;
|
|
227
|
+
deviceId: string;
|
|
228
|
+
} | null>;
|
|
229
|
+
selectedSpeaker: ComputedRef< {
|
|
230
|
+
label: string;
|
|
231
|
+
deviceId: string;
|
|
232
|
+
} | null>;
|
|
233
|
+
version: string;
|
|
234
|
+
packageName: string;
|
|
235
|
+
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, ("update:callVolume" | "update:notificationVolume" | "update:selectedMicId" | "update:selectedSpeakerId")[], "update:callVolume" | "update:notificationVolume" | "update:selectedMicId" | "update:selectedSpeakerId", PublicProps, Readonly<ExtractPropTypes< {
|
|
236
|
+
callVolume: NumberConstructor;
|
|
237
|
+
notificationVolume: NumberConstructor;
|
|
238
|
+
selectedMicId: StringConstructor;
|
|
239
|
+
selectedSpeakerId: StringConstructor;
|
|
240
|
+
microphones: PropType<Array<{
|
|
241
|
+
label: string;
|
|
242
|
+
deviceId: string;
|
|
243
|
+
}>>;
|
|
244
|
+
speakers: PropType<Array<{
|
|
245
|
+
label: string;
|
|
246
|
+
deviceId: string;
|
|
247
|
+
}>>;
|
|
248
|
+
}>> & Readonly<{
|
|
249
|
+
"onUpdate:callVolume"?: ((...args: any[]) => any) | undefined;
|
|
250
|
+
"onUpdate:notificationVolume"?: ((...args: any[]) => any) | undefined;
|
|
251
|
+
"onUpdate:selectedMicId"?: ((...args: any[]) => any) | undefined;
|
|
252
|
+
"onUpdate:selectedSpeakerId"?: ((...args: any[]) => any) | undefined;
|
|
253
|
+
}>, {}, {}, {
|
|
254
|
+
PrimeButton: DefineComponent_2<ButtonProps, ButtonSlots, (e: string, ...args: any[]) => void>;
|
|
255
|
+
PrimeDialog: DefineComponent_2<DialogProps, DialogSlots, ((e: "dragend", event: Event) => void) & ((e: "dragstart", event: Event) => void) & ((e: "update:visible", value: boolean) => void) & ((e: "hide") => void) & ((e: "after-hide") => void) & ((e: "show") => void) & ((e: "maximize", event: Event) => void) & ((e: "unmaximize", event: Event) => void)>;
|
|
256
|
+
PrimeSelect: DefineComponent_2<SelectProps, SelectSlots, ((e: "filter", event: SelectFilterEvent) => void) & ((e: "blur", event: Event) => void) & ((e: "change", event: SelectChangeEvent) => void) & ((e: "focus", event: Event) => void) & ((e: "hide") => void) & ((e: "show") => void) & ((e: "update:modelValue", value: any) => void) & ((e: "value-change", value: any) => void) & ((e: "before-show") => void) & ((e: "before-hide") => void), SelectMethods>;
|
|
257
|
+
Slider: DefineComponent_2<SliderProps, SliderSlots, ((e: "change", value: number) => void) & ((e: "update:modelValue", value: number | number[]) => void) & ((e: "value-change", value: number | number[]) => void) & ((e: "slideend", event: SliderSlideEndEvent) => void)>;
|
|
258
|
+
SettingsIcon: FunctionalComponent<SVGAttributes, {}, any, {}>;
|
|
259
|
+
}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
260
|
+
LogoIcon: FunctionalComponent<SVGAttributes, {}, any, {}>;
|
|
261
|
+
ExtensionIcon: FunctionalComponent<SVGAttributes, {}, any, {}>;
|
|
262
|
+
NumpadIcon: FunctionalComponent<SVGAttributes, {}, any, {}>;
|
|
263
|
+
CallIcon: FunctionalComponent<SVGAttributes, {}, any, {}>;
|
|
264
|
+
HangupIcon: FunctionalComponent<SVGAttributes, {}, any, {}>;
|
|
265
|
+
MicrophoneIcon: FunctionalComponent<SVGAttributes, {}, any, {}>;
|
|
266
|
+
NumpadOffIcon: FunctionalComponent<SVGAttributes, {}, any, {}>;
|
|
267
|
+
MicrophoneOffIcon: FunctionalComponent<SVGAttributes, {}, any, {}>;
|
|
268
|
+
KeyboardDeleteIcon: FunctionalComponent<SVGAttributes, {}, any, {}>;
|
|
269
|
+
NebulaIcon: FunctionalComponent<SVGAttributes, {}, any, {}>;
|
|
270
|
+
}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
271
|
+
|
|
272
|
+
export declare const WebphoneElement: ReturnType<typeof defineCustomElement>;
|
|
273
|
+
|
|
274
|
+
export { }
|