videomail-client 10.2.4 → 10.2.6

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.
@@ -13597,12 +13597,13 @@ var __webpack_exports__ = {};
13597
13597
  }
13598
13598
  Despot_define_property(Despot, "EMITTER", createNanoEvents());
13599
13599
  const util_Despot = Despot;
13600
- const REGEX = /^[\s,]+|[\s,]+$/gu;
13600
+ const REGEX = /[ ,]+/u;
13601
13601
  function trimEmail(email) {
13602
13602
  return email.replace(REGEX, "");
13603
13603
  }
13604
13604
  function trimEmails(emails) {
13605
- return emails.split(REGEX).map((email)=>trimEmail(email));
13605
+ const uniqueAddresses = emails.split(REGEX).map((item)=>item.trim()).filter(Boolean);
13606
+ return new Set(uniqueAddresses);
13606
13607
  }
13607
13608
  function isNotButton(element) {
13608
13609
  return "BUTTON" !== element.tagName && "submit" !== element.getAttribute("type");
@@ -13672,7 +13673,10 @@ var __webpack_exports__ = {};
13672
13673
  case "INPUT":
13673
13674
  {
13674
13675
  const inputControl = formControl;
13675
- if (Array.isArray(value)) inputControl.value = value.join(", ");
13676
+ if (value instanceof Set) inputControl.value = [
13677
+ ...value
13678
+ ].join(", ");
13679
+ else if (Array.isArray(value)) inputControl.value = value.join(", ");
13676
13680
  else inputControl.value = value;
13677
13681
  break;
13678
13682
  }
@@ -13870,7 +13874,7 @@ var __webpack_exports__ = {};
13870
13874
  }
13871
13875
  const wrappers_form = Form;
13872
13876
  var package_namespaceObject = {
13873
- i8: "10.2.4"
13877
+ i8: "10.2.6"
13874
13878
  };
13875
13879
  function resource_define_property(obj, key, value) {
13876
13880
  if (key in obj) Object.defineProperty(obj, key, {
@@ -17783,9 +17787,9 @@ var __webpack_exports__ = {};
17783
17787
  const toIsConfigured = "to" in recipients;
17784
17788
  const ccIsConfigured = "cc" in recipients;
17785
17789
  const bccIsConfigured = "bcc" in recipients;
17786
- const hasTo = recipients.to && recipients.to.length > 0;
17787
- const hasCc = recipients.cc && recipients.cc.length > 0;
17788
- const hasBcc = recipients.bcc && recipients.bcc.length > 0;
17790
+ const hasTo = recipients.to && recipients.to.size > 0;
17791
+ const hasCc = recipients.cc && recipients.cc.size > 0;
17792
+ const hasBcc = recipients.bcc && recipients.bcc.size > 0;
17789
17793
  if (toIsConfigured) {
17790
17794
  if (!hasTo) {
17791
17795
  if (ccIsConfigured && bccIsConfigured) {
package/dist/esm/index.js CHANGED
@@ -3702,12 +3702,13 @@ class Despot_Despot {
3702
3702
  }
3703
3703
  }
3704
3704
  const Despot = Despot_Despot;
3705
- const REGEX = /^[\s,]+|[\s,]+$/gu;
3705
+ const REGEX = /[ ,]+/u;
3706
3706
  function trimEmail(email) {
3707
3707
  return email.replace(REGEX, "");
3708
3708
  }
3709
3709
  function trimEmails(emails) {
3710
- return emails.split(REGEX).map((email)=>trimEmail(email));
3710
+ const uniqueAddresses = emails.split(REGEX).map((item)=>item.trim()).filter(Boolean);
3711
+ return new Set(uniqueAddresses);
3711
3712
  }
3712
3713
  function isNotButton(element) {
3713
3714
  return "BUTTON" !== element.tagName && "submit" !== element.getAttribute("type");
@@ -3787,7 +3788,10 @@ class Form extends Despot {
3787
3788
  case "INPUT":
3788
3789
  {
3789
3790
  const inputControl = formControl;
3790
- if (Array.isArray(value)) inputControl.value = value.join(", ");
3791
+ if (value instanceof Set) inputControl.value = [
3792
+ ...value
3793
+ ].join(", ");
3794
+ else if (Array.isArray(value)) inputControl.value = value.join(", ");
3791
3795
  else inputControl.value = value;
3792
3796
  break;
3793
3797
  }
@@ -3966,7 +3970,7 @@ class Form extends Despot {
3966
3970
  }
3967
3971
  const wrappers_form = Form;
3968
3972
  var package_namespaceObject = {
3969
- i8: "10.2.4"
3973
+ i8: "10.2.6"
3970
3974
  };
3971
3975
  function findOriginalExc(exc) {
3972
3976
  if (exc instanceof Error && "response" in exc) {
@@ -7614,9 +7618,9 @@ class Container extends Despot {
7614
7618
  const toIsConfigured = "to" in recipients;
7615
7619
  const ccIsConfigured = "cc" in recipients;
7616
7620
  const bccIsConfigured = "bcc" in recipients;
7617
- const hasTo = recipients.to && recipients.to.length > 0;
7618
- const hasCc = recipients.cc && recipients.cc.length > 0;
7619
- const hasBcc = recipients.bcc && recipients.bcc.length > 0;
7621
+ const hasTo = recipients.to && recipients.to.size > 0;
7622
+ const hasCc = recipients.cc && recipients.cc.size > 0;
7623
+ const hasBcc = recipients.bcc && recipients.bcc.size > 0;
7620
7624
  if (toIsConfigured) {
7621
7625
  if (!hasTo) {
7622
7626
  if (ccIsConfigured && bccIsConfigured) {
@@ -3,9 +3,9 @@ import RecordingStats from "./RecordingStats";
3
3
  import VideoFormat from "./VideoFormat";
4
4
  interface Videomail {
5
5
  alias: string;
6
- bcc?: string[] | undefined;
6
+ bcc?: Set<string> | undefined;
7
7
  body?: string;
8
- cc?: string[] | undefined;
8
+ cc?: Set<string> | undefined;
9
9
  connection?: Record<string, number | string>;
10
10
  correctUrl: string;
11
11
  dateCreated: number;
@@ -24,24 +24,24 @@ interface Videomail {
24
24
  parentKey?: string;
25
25
  poster: string;
26
26
  recordingStats?: RecordingStats | undefined;
27
- rejectedBcc?: string[];
28
- rejectedCc?: string[];
29
- rejectedTo?: string[];
30
- accepted?: string[];
27
+ rejectedBcc?: Set<string>;
28
+ rejectedCc?: Set<string>;
29
+ rejectedTo?: Set<string>;
30
+ accepted?: Set<string>;
31
31
  replyAllUrl?: string;
32
32
  replyUrl: string;
33
33
  sending: boolean;
34
34
  sent?: boolean;
35
- sentBcc?: string[];
36
- sentCc?: string[];
35
+ sentBcc?: Set<string>;
36
+ sentCc?: Set<string>;
37
37
  sentDate?: number;
38
38
  sentDateIso?: string;
39
39
  sentDatePretty?: string;
40
- sentTo?: string[];
40
+ sentTo?: Set<string>;
41
41
  siteName: string;
42
42
  siteTitle?: string;
43
43
  subject?: string;
44
- to?: string[] | undefined;
44
+ to?: Set<string> | undefined;
45
45
  url: string;
46
46
  versions: {
47
47
  ninjaFormPlugin?: string;
@@ -1,3 +1,3 @@
1
1
  declare function trimEmail(email: string): string;
2
- declare function trimEmails(emails: string): string[];
2
+ declare function trimEmails(emails: string): Set<string>;
3
3
  export { trimEmail, trimEmails };
@@ -9,8 +9,8 @@ export declare enum FormMethod {
9
9
  GET = "get"
10
10
  }
11
11
  declare class Form extends Despot {
12
- private container;
13
- private formElement;
12
+ private readonly container;
13
+ private readonly formElement;
14
14
  private keyInput?;
15
15
  private readonly FORM_FIELDS;
16
16
  constructor(container: Container, formElement: HTMLFormElement, options: VideomailClientOptions);
package/dist/umd/index.js CHANGED
@@ -13574,12 +13574,13 @@
13574
13574
  }
13575
13575
  }
13576
13576
  const Despot = Despot_Despot;
13577
- const REGEX = /^[\s,]+|[\s,]+$/gu;
13577
+ const REGEX = /[ ,]+/u;
13578
13578
  function trimEmail(email) {
13579
13579
  return email.replace(REGEX, "");
13580
13580
  }
13581
13581
  function trimEmails(emails) {
13582
- return emails.split(REGEX).map((email)=>trimEmail(email));
13582
+ const uniqueAddresses = emails.split(REGEX).map((item)=>item.trim()).filter(Boolean);
13583
+ return new Set(uniqueAddresses);
13583
13584
  }
13584
13585
  function isNotButton(element) {
13585
13586
  return "BUTTON" !== element.tagName && "submit" !== element.getAttribute("type");
@@ -13659,7 +13660,10 @@
13659
13660
  case "INPUT":
13660
13661
  {
13661
13662
  const inputControl = formControl;
13662
- if (Array.isArray(value)) inputControl.value = value.join(", ");
13663
+ if (value instanceof Set) inputControl.value = [
13664
+ ...value
13665
+ ].join(", ");
13666
+ else if (Array.isArray(value)) inputControl.value = value.join(", ");
13663
13667
  else inputControl.value = value;
13664
13668
  break;
13665
13669
  }
@@ -13838,7 +13842,7 @@
13838
13842
  }
13839
13843
  const wrappers_form = Form;
13840
13844
  var package_namespaceObject = {
13841
- i8: "10.2.4"
13845
+ i8: "10.2.6"
13842
13846
  };
13843
13847
  function findOriginalExc(exc) {
13844
13848
  if (exc instanceof Error && "response" in exc) {
@@ -17564,9 +17568,9 @@
17564
17568
  const toIsConfigured = "to" in recipients;
17565
17569
  const ccIsConfigured = "cc" in recipients;
17566
17570
  const bccIsConfigured = "bcc" in recipients;
17567
- const hasTo = recipients.to && recipients.to.length > 0;
17568
- const hasCc = recipients.cc && recipients.cc.length > 0;
17569
- const hasBcc = recipients.bcc && recipients.bcc.length > 0;
17571
+ const hasTo = recipients.to && recipients.to.size > 0;
17572
+ const hasCc = recipients.cc && recipients.cc.size > 0;
17573
+ const hasBcc = recipients.bcc && recipients.bcc.size > 0;
17570
17574
  if (toIsConfigured) {
17571
17575
  if (!hasTo) {
17572
17576
  if (ccIsConfigured && bccIsConfigured) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "videomail-client",
3
- "version": "10.2.4",
3
+ "version": "10.2.6",
4
4
  "description": "A wicked npm package to record videos directly in the browser, wohooo!",
5
5
  "keywords": [
6
6
  "webcam",