@tmsoft/webphone 1.0.24 → 1.0.26

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