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