@nylas/web-elements 0.0.0-canary-20241015194719 → 0.0.0-canary-20241017202051

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.
Files changed (84) hide show
  1. package/dist/cdn/input-image-url/input-image-url.es.js +365 -365
  2. package/dist/cdn/nylas-additional-participants/nylas-additional-participants.es.js +46 -48
  3. package/dist/cdn/nylas-confirmation-email/nylas-confirmation-email.es.js +86 -82
  4. package/dist/cdn/nylas-custom-booking-flow/nylas-custom-booking-flow.es.js +1 -1
  5. package/dist/cdn/nylas-editor-tabs/nylas-editor-tabs.es.js +4710 -4700
  6. package/dist/cdn/nylas-event-duration/nylas-event-duration.es.js +228 -228
  7. package/dist/cdn/nylas-event-info/nylas-event-info.es.js +2 -2
  8. package/dist/cdn/nylas-event-limits/nylas-event-limits.es.js +2 -2
  9. package/dist/cdn/nylas-form-card/nylas-form-card.es.js +1 -1
  10. package/dist/cdn/nylas-reminder-emails/nylas-reminder-emails.es.js +2289 -2281
  11. package/dist/cdn/nylas-reminder-time/nylas-reminder-time.es.js +2253 -2245
  12. package/dist/cdn/nylas-scheduler-editor/nylas-scheduler-editor.es.js +53 -43
  13. package/dist/cdn/nylas-scheduling/nylas-scheduling.es.js +4 -3
  14. package/dist/cdn/nylas-timeslot-picker/nylas-timeslot-picker.es.js +4 -3
  15. package/dist/cjs/calendar-agenda-fill-icon_54.cjs.entry.js +60 -54
  16. package/dist/cjs/calendar-agenda-fill-icon_54.cjs.entry.js.map +1 -1
  17. package/dist/cjs/loader.cjs.js +1 -1
  18. package/dist/cjs/nylas-booked-event-card_12.cjs.entry.js +2 -2
  19. package/dist/cjs/nylas-booked-event-card_12.cjs.entry.js.map +1 -1
  20. package/dist/cjs/nylas-form-card.cjs.entry.js +1 -1
  21. package/dist/cjs/nylas-web-elements.cjs.js +1 -1
  22. package/dist/collection/collection-manifest.json +1 -1
  23. package/dist/collection/components/design-system/input-image-url/input-image-url.js +20 -2
  24. package/dist/collection/components/design-system/input-image-url/input-image-url.js.map +1 -1
  25. package/dist/collection/components/scheduler/nylas-timeslot-picker/nylas-timeslot-picker.js +2 -2
  26. package/dist/collection/components/scheduler/nylas-timeslot-picker/nylas-timeslot-picker.js.map +1 -1
  27. package/dist/collection/components/scheduler-editor/nylas-additional-participants/nylas-additional-participants.js +12 -16
  28. package/dist/collection/components/scheduler-editor/nylas-additional-participants/nylas-additional-participants.js.map +1 -1
  29. package/dist/collection/components/scheduler-editor/nylas-additional-participants/test/nylas-additional-participants.spec.js +106 -0
  30. package/dist/collection/components/scheduler-editor/nylas-additional-participants/test/nylas-additional-participants.spec.js.map +1 -0
  31. package/dist/collection/components/scheduler-editor/nylas-confirmation-email/nylas-confirmation-email.js +52 -28
  32. package/dist/collection/components/scheduler-editor/nylas-confirmation-email/nylas-confirmation-email.js.map +1 -1
  33. package/dist/collection/components/scheduler-editor/nylas-confirmation-email/test/nylas-confirmation-email.spec.js +33 -0
  34. package/dist/collection/components/scheduler-editor/nylas-confirmation-email/test/nylas-confirmation-email.spec.js.map +1 -0
  35. package/dist/collection/components/scheduler-editor/nylas-event-duration/nylas-event-duration.js +5 -3
  36. package/dist/collection/components/scheduler-editor/nylas-event-duration/nylas-event-duration.js.map +1 -1
  37. package/dist/collection/components/scheduler-editor/nylas-event-duration/test/nylas-event-duration.spec.js +55 -0
  38. package/dist/collection/components/scheduler-editor/nylas-event-duration/test/nylas-event-duration.spec.js.map +1 -0
  39. package/dist/collection/components/scheduler-editor/nylas-event-info/nylas-event-info.js +1 -1
  40. package/dist/collection/components/scheduler-editor/nylas-event-limits/nylas-event-limits.js +1 -1
  41. package/dist/collection/components/scheduler-editor/nylas-form-card/nylas-form-card.js +1 -1
  42. package/dist/collection/components/scheduler-editor/nylas-reminder-time/nylas-reminder-time.js +23 -30
  43. package/dist/collection/components/scheduler-editor/nylas-reminder-time/nylas-reminder-time.js.map +1 -1
  44. package/dist/collection/components/scheduler-editor/nylas-reminder-time/test/nylas-reminder-time.spec.js +37 -0
  45. package/dist/collection/components/scheduler-editor/nylas-reminder-time/test/nylas-reminder-time.spec.js.map +1 -0
  46. package/dist/components/input-image-url2.js +6 -2
  47. package/dist/components/input-image-url2.js.map +1 -1
  48. package/dist/components/nylas-additional-participants2.js +12 -16
  49. package/dist/components/nylas-additional-participants2.js.map +1 -1
  50. package/dist/components/nylas-confirmation-email2.js +14 -5
  51. package/dist/components/nylas-confirmation-email2.js.map +1 -1
  52. package/dist/components/nylas-event-duration2.js +5 -3
  53. package/dist/components/nylas-event-duration2.js.map +1 -1
  54. package/dist/components/nylas-event-info2.js +1 -1
  55. package/dist/components/nylas-event-limits2.js +1 -1
  56. package/dist/components/nylas-form-card2.js +1 -1
  57. package/dist/components/nylas-reminder-time2.js +23 -29
  58. package/dist/components/nylas-reminder-time2.js.map +1 -1
  59. package/dist/components/nylas-timeslot-picker2.js +2 -2
  60. package/dist/components/nylas-timeslot-picker2.js.map +1 -1
  61. package/dist/esm/calendar-agenda-fill-icon_54.entry.js +60 -54
  62. package/dist/esm/calendar-agenda-fill-icon_54.entry.js.map +1 -1
  63. package/dist/esm/loader.js +1 -1
  64. package/dist/esm/nylas-booked-event-card_12.entry.js +2 -2
  65. package/dist/esm/nylas-booked-event-card_12.entry.js.map +1 -1
  66. package/dist/esm/nylas-form-card.entry.js +1 -1
  67. package/dist/esm/nylas-web-elements.js +1 -1
  68. package/dist/nylas-web-elements/nylas-web-elements.esm.js +1 -1
  69. package/dist/nylas-web-elements/nylas-web-elements.esm.js.map +1 -1
  70. package/dist/nylas-web-elements/p-1ce8b1c3.entry.js +8 -0
  71. package/dist/nylas-web-elements/p-1ce8b1c3.entry.js.map +1 -0
  72. package/dist/nylas-web-elements/{p-698d229c.entry.js → p-7a1d51ab.entry.js} +2 -2
  73. package/dist/nylas-web-elements/{p-698d229c.entry.js.map → p-7a1d51ab.entry.js.map} +1 -1
  74. package/dist/nylas-web-elements/p-bbf86b8c.entry.js +2 -0
  75. package/dist/types/components/design-system/input-image-url/input-image-url.d.ts +4 -0
  76. package/dist/types/components/scheduler-editor/nylas-additional-participants/nylas-additional-participants.d.ts +1 -1
  77. package/dist/types/components/scheduler-editor/nylas-confirmation-email/nylas-confirmation-email.d.ts +5 -1
  78. package/dist/types/components/scheduler-editor/nylas-reminder-time/nylas-reminder-time.d.ts +1 -1
  79. package/dist/types/components.d.ts +18 -6
  80. package/package.json +3 -3
  81. package/dist/nylas-web-elements/p-b9a8d404.entry.js +0 -8
  82. package/dist/nylas-web-elements/p-b9a8d404.entry.js.map +0 -1
  83. package/dist/nylas-web-elements/p-f4334e3a.entry.js +0 -2
  84. /package/dist/nylas-web-elements/{p-f4334e3a.entry.js.map → p-bbf86b8c.entry.js.map} +0 -0
@@ -1570,11 +1570,11 @@ var ru = { exports: {} };
1570
1570
  }, w.valueOf = function() {
1571
1571
  return this.$d.getTime();
1572
1572
  }, w.startOf = function(p, v) {
1573
- var y = this, T = !!L.u(v) || v, O = L.p(p), _ = function(re, ue) {
1574
- var Ae = L.w(y.$u ? Date.UTC(y.$y, ue, re) : new Date(y.$y, ue, re), y);
1573
+ var y = this, T = !!L.u(v) || v, O = L.p(p), _ = function(ne, ue) {
1574
+ var Ae = L.w(y.$u ? Date.UTC(y.$y, ue, ne) : new Date(y.$y, ue, ne), y);
1575
1575
  return T ? Ae : Ae.endOf(l);
1576
- }, U = function(re, ue) {
1577
- return L.w(y.toDate()[re].apply(y.toDate("s"), (T ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(ue)), y);
1576
+ }, U = function(ne, ue) {
1577
+ return L.w(y.toDate()[ne].apply(y.toDate("s"), (T ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(ue)), y);
1578
1578
  }, F = this.$W, ee = this.$M, Y = this.$D, H = "set" + (this.$u ? "UTC" : "");
1579
1579
  switch (O) {
1580
1580
  case h:
@@ -1634,9 +1634,9 @@ var ru = { exports: {} };
1634
1634
  }, ce = y.meridiem || function(ue, Ae, jn) {
1635
1635
  var jt = ue < 12 ? "AM" : "PM";
1636
1636
  return jn ? jt.toLowerCase() : jt;
1637
- }, re = { YY: String(this.$y).slice(-2), YYYY: this.$y, M: F + 1, MM: L.s(F + 1, 2, "0"), MMM: H(y.monthsShort, F, Y, 3), MMMM: H(Y, F), D: this.$D, DD: L.s(this.$D, 2, "0"), d: String(this.$W), dd: H(y.weekdaysMin, this.$W, ee, 2), ddd: H(y.weekdaysShort, this.$W, ee, 3), dddd: ee[this.$W], H: String(_), HH: L.s(_, 2, "0"), h: ge(1), hh: ge(2), a: ce(_, U, !0), A: ce(_, U, !1), m: String(U), mm: L.s(U, 2, "0"), s: String(this.$s), ss: L.s(this.$s, 2, "0"), SSS: L.s(this.$ms, 3, "0"), Z: O };
1637
+ }, ne = { YY: String(this.$y).slice(-2), YYYY: this.$y, M: F + 1, MM: L.s(F + 1, 2, "0"), MMM: H(y.monthsShort, F, Y, 3), MMMM: H(Y, F), D: this.$D, DD: L.s(this.$D, 2, "0"), d: String(this.$W), dd: H(y.weekdaysMin, this.$W, ee, 2), ddd: H(y.weekdaysShort, this.$W, ee, 3), dddd: ee[this.$W], H: String(_), HH: L.s(_, 2, "0"), h: ge(1), hh: ge(2), a: ce(_, U, !0), A: ce(_, U, !1), m: String(U), mm: L.s(U, 2, "0"), s: String(this.$s), ss: L.s(this.$s, 2, "0"), SSS: L.s(this.$ms, 3, "0"), Z: O };
1638
1638
  return T.replace(S, function(ue, Ae) {
1639
- return Ae || re[ue] || O.replace(":", "");
1639
+ return Ae || ne[ue] || O.replace(":", "");
1640
1640
  });
1641
1641
  }, w.utcOffset = function() {
1642
1642
  return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
@@ -10652,10 +10652,10 @@ and ensure you are accounting for this risk.
10652
10652
  try {
10653
10653
  const H = L(U);
10654
10654
  if (e.allowedScriptHostnames || e.allowedScriptDomains) {
10655
- const ge = (e.allowedScriptHostnames || []).find(function(re) {
10656
- return re === H.url.hostname;
10657
- }), ce = (e.allowedScriptDomains || []).find(function(re) {
10658
- return H.url.hostname === re || H.url.hostname.endsWith(`.${re}`);
10655
+ const ge = (e.allowedScriptHostnames || []).find(function(ne) {
10656
+ return ne === H.url.hostname;
10657
+ }), ce = (e.allowedScriptDomains || []).find(function(ne) {
10658
+ return H.url.hostname === ne || H.url.hostname.endsWith(`.${ne}`);
10659
10659
  });
10660
10660
  Y = ge || ce;
10661
10661
  }
@@ -10674,10 +10674,10 @@ and ensure you are accounting for this risk.
10674
10674
  if (H.isRelativeUrl)
10675
10675
  Y = Ue(e, "allowIframeRelativeUrls") ? e.allowIframeRelativeUrls : !e.allowedIframeHostnames && !e.allowedIframeDomains;
10676
10676
  else if (e.allowedIframeHostnames || e.allowedIframeDomains) {
10677
- const ge = (e.allowedIframeHostnames || []).find(function(re) {
10678
- return re === H.url.hostname;
10679
- }), ce = (e.allowedIframeDomains || []).find(function(re) {
10680
- return H.url.hostname === re || H.url.hostname.endsWith(`.${re}`);
10677
+ const ge = (e.allowedIframeHostnames || []).find(function(ne) {
10678
+ return ne === H.url.hostname;
10679
+ }), ce = (e.allowedIframeDomains || []).find(function(ne) {
10680
+ return H.url.hostname === ne || H.url.hostname.endsWith(`.${ne}`);
10681
10681
  });
10682
10682
  Y = ge || ce;
10683
10683
  }
@@ -10709,9 +10709,9 @@ and ensure you are accounting for this risk.
10709
10709
  return;
10710
10710
  }
10711
10711
  if (F === "class") {
10712
- const Y = c[p], H = c["*"], ge = f[p], ce = d[p], re = f["*"], ue = [
10712
+ const Y = c[p], H = c["*"], ge = f[p], ce = d[p], ne = f["*"], ue = [
10713
10713
  ge,
10714
- re
10714
+ ne
10715
10715
  ].concat(ce).filter(function(Ae) {
10716
10716
  return Ae;
10717
10717
  });
@@ -11318,7 +11318,7 @@ const F6 = {
11318
11318
  function Zn(n) {
11319
11319
  return P6(n, F6);
11320
11320
  }
11321
- function ne(...n) {
11321
+ function re(...n) {
11322
11322
  window && window.localStorage && window.localStorage.getItem("debug") && (console.group(...n), console.trace(), console.groupEnd());
11323
11323
  }
11324
11324
  function en(...n) {
@@ -11348,7 +11348,7 @@ function q6(n, e, t = "unregisterComponent") {
11348
11348
  function hg(n) {
11349
11349
  return (e, t) => {
11350
11350
  const r = n.name;
11351
- ne(`[${r}] Registering component ${r} being called on ${t}`);
11351
+ re(`[${r}] Registering component ${r} being called on ${t}`);
11352
11352
  const i = e.componentWillLoad;
11353
11353
  if (!i) {
11354
11354
  en(`[${r}] componentWillLoad lifecycle method in ${r} missing. Required for RegisterComponent decorator.`);
@@ -11376,7 +11376,7 @@ function hg(n) {
11376
11376
  var l;
11377
11377
  a.set(o, (l = n.eventToProps) == null ? void 0 : l[o]);
11378
11378
  }), e.connectedCallback = function() {
11379
- ne(`[~${r}] connectedCallback called`);
11379
+ re(`[~${r}] connectedCallback called`);
11380
11380
  const o = s == null ? void 0 : s.call(this), l = tn(this);
11381
11381
  return l.dataset.nylasId || (Object.defineProperty(l, "registerNylasComponent", {
11382
11382
  get() {
@@ -11425,14 +11425,14 @@ function hg(n) {
11425
11425
  ...n,
11426
11426
  eventToProps: a
11427
11427
  }, f = j6(e, c, n.registrationEventName);
11428
- return l.dispatchEvent(f) && ne(`[${r}] Component ${r} successfully fired registration event`), o;
11428
+ return l.dispatchEvent(f) && re(`[${r}] Component ${r} successfully fired registration event`), o;
11429
11429
  }, e.disconnectedCallback = function() {
11430
11430
  const o = u == null ? void 0 : u.call(this), l = tn(this), c = {
11431
11431
  element: l,
11432
11432
  ...n,
11433
11433
  eventToProps: a
11434
11434
  }, f = q6(e, c, n.unregistrationEventName);
11435
- return l.dispatchEvent(f) && ne(`[${r}] Component ${r} successfully fired unregistration event`), o;
11435
+ return l.dispatchEvent(f) && re(`[${r}] Component ${r} successfully fired unregistration event`), o;
11436
11436
  });
11437
11437
  };
11438
11438
  }
@@ -11779,19 +11779,19 @@ const pg = Ze(class extends Je {
11779
11779
  super(), this.__registerHost(), this.__attachShadow(), this.internals = this.attachInternals();
11780
11780
  }
11781
11781
  connectedCallback() {
11782
- ne("nylas-event-card", "connectedCallback");
11782
+ re("nylas-event-card", "connectedCallback");
11783
11783
  }
11784
11784
  componentWillLoad() {
11785
- ne("nylas-event-card", "componentWillLoad");
11785
+ re("nylas-event-card", "componentWillLoad");
11786
11786
  }
11787
11787
  componentDidLoad() {
11788
- ne("nylas-event-card", "componentDidLoad");
11788
+ re("nylas-event-card", "componentDidLoad");
11789
11789
  }
11790
11790
  disconnectedCallback() {
11791
- ne("nylas-event-card", "disconnectedCallback"), U6(["header-title", "header-subtitle", "content"], this.host);
11791
+ re("nylas-event-card", "disconnectedCallback"), U6(["header-title", "header-subtitle", "content"], this.host);
11792
11792
  }
11793
11793
  render() {
11794
- return M(Ir, { key: "e79321333887319f48356c64cb2e04539edf1d79" }, M("div", { key: "9a33c42c38012c5277ecc0d60523211671866378", class: "nylas-form-card", part: "nfc" }, M("div", { key: "905eed6cd8c79bda19fb3c5ab49802ae697a0ab9", class: "nylas-form-card__header", part: "nfc__header" }, M("slot", { key: "db749b7eb575845c2b8d8e4a12ea0c3ffea4842a", name: "header-title" }), M("slot", { key: "5b9ac54446f1b1b49a9f0f2e2b45e3785acb9686", name: "header-subtitle" })), M("div", { key: "6893e68e48f990c6dfc3d3c3052dfba988b21807", class: "nylas-form-card__content" }, M("slot", { key: "fac98a2a1a6b162bc3f4aed735b584c4d5e509a3", name: "content" }))));
11794
+ return M(Ir, { key: "5ccd047d1a8bb515dea8aa7b9d7d39265afc31c9" }, M("div", { key: "c40f52eaa4d099d92d65b0df662cd2de1b5f35c7", class: "nylas-form-card", part: "nfc" }, M("div", { key: "545dabd81dce9b4f6f5f1d129071e1136f62e609", class: "nylas-form-card__header", part: "nfc__header" }, M("slot", { key: "2be9b24f91316235be7132a6466cd16b9dfe813c", name: "header-title" }), M("slot", { key: "3414a084465efc50a3856291dff61d8ef3b3c617", name: "header-subtitle" })), M("div", { key: "cc07650a55afd7fc5d2429ff3611168977775bc8", class: "nylas-form-card__content" }, M("slot", { key: "d50dd8dfbfea1ad84876495e72dd03102e2bc0dc", name: "content" }))));
11795
11795
  }
11796
11796
  static get formAssociated() {
11797
11797
  return !0;
@@ -11876,40 +11876,43 @@ const ui = Ze(class extends Je {
11876
11876
  super(), this.__registerHost(), this.__attachShadow(), this.valueChanged = kt(this, "valueChanged", 7), this.internals = this.attachInternals(), this.name = "participants", this.selectedConfiguration = void 0, this.currentUser = void 0, this.participantOptions = void 0, this.eventParticipants = void 0, this.participants = this.eventParticipants ?? [], this.participantErrors = {}, this.includeOrganizerAsParticipant = !0, this.isRoundRobinConfig = ((r = (t = (e = this.selectedConfiguration) == null ? void 0 : e.availability) == null ? void 0 : t.availability_rules) == null ? void 0 : r.availability_method) !== "collective", this.error = "";
11877
11877
  }
11878
11878
  elementNameChangedHandler(e) {
11879
- ne("nylas-additional-participants", "elementNameChangedHandler", e), this.host.setAttribute("name", e);
11879
+ re("nylas-additional-participants", "elementNameChangedHandler", e), this.host.setAttribute("name", e);
11880
11880
  }
11881
11881
  selectedConfigurationChangedHandler(e) {
11882
11882
  var t, r;
11883
- ne("nylas-additional-participants", "selectedConfigurationChangedHandler", e), this.isRoundRobinConfig = ((r = (t = e == null ? void 0 : e.availability) == null ? void 0 : t.availability_rules) == null ? void 0 : r.availability_method) !== "collective", this.participants = (e == null ? void 0 : e.participants) || [], this.updateOrganizerAsParticipant();
11883
+ re("nylas-additional-participants", "selectedConfigurationChangedHandler", e), this.isRoundRobinConfig = ((r = (t = e == null ? void 0 : e.availability) == null ? void 0 : t.availability_rules) == null ? void 0 : r.availability_method) !== "collective", this.participants = (e == null ? void 0 : e.participants) || [], this.updateOrganizerAsParticipant();
11884
11884
  }
11885
11885
  connectedCallback() {
11886
- ne("nylas-additional-participants", "connectedCallback");
11886
+ re("nylas-additional-participants", "connectedCallback");
11887
11887
  }
11888
11888
  componentWillLoad() {
11889
- ne("nylas-additional-participants", "componentWillLoad"), this.host.setAttribute("name", this.name);
11889
+ re("nylas-additional-participants", "componentWillLoad"), this.host.setAttribute("name", this.name);
11890
11890
  }
11891
11891
  componentDidLoad() {
11892
11892
  var e, t, r;
11893
- ne("nylas-additional-participants", "componentDidLoad"), this.isRoundRobinConfig = ((r = (t = (e = this.selectedConfiguration) == null ? void 0 : e.availability) == null ? void 0 : t.availability_rules) == null ? void 0 : r.availability_method) !== "collective", this.includeOrganizerAsParticipant = !!(this.isRoundRobinConfig && this.participants.find((i) => {
11893
+ re("nylas-additional-participants", "componentDidLoad"), this.isRoundRobinConfig = ((r = (t = (e = this.selectedConfiguration) == null ? void 0 : e.availability) == null ? void 0 : t.availability_rules) == null ? void 0 : r.availability_method) !== "collective", this.includeOrganizerAsParticipant = !!(this.isRoundRobinConfig && this.participants.find((i) => {
11894
11894
  var s;
11895
11895
  return i.email === ((s = this.currentUser) == null ? void 0 : s.email);
11896
11896
  })), this.selectedConfiguration ? this.selectedConfigurationChangedHandler(this.selectedConfiguration) : this.updateOrganizerAsParticipant();
11897
11897
  }
11898
11898
  disconnectedCallback() {
11899
- ne("nylas-additional-participants", "disconnectedCallback");
11899
+ re("nylas-additional-participants", "disconnectedCallback");
11900
+ }
11901
+ get isInternalsAvailable() {
11902
+ return this.internals !== void 0 && typeof this.internals.setFormValue == "function" && typeof this.internals.setValidity == "function";
11900
11903
  }
11901
11904
  onInputOptionChanged(e) {
11902
11905
  var s;
11903
- ne("nylas-additional-participants", "onInputOptionChanged");
11904
- const t = /^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/, r = e.detail.name, i = (s = this.participantOptions) == null ? void 0 : s.find((u) => u.email === e.detail.value);
11906
+ re("nylas-additional-participants", "onInputOptionChanged");
11907
+ const t = /^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/, r = e.detail.name, i = (s = this.participantOptions) == null ? void 0 : s.find((u) => u.email === e.detail.value);
11905
11908
  if (!i && this.isRoundRobinConfig) {
11906
- this.internals.setValidity({ customError: !0 }, "For round robin configuration, participant should be selected from the dropdown."), this.participantErrors[r] = "For round robin page, participant should be selected from the dropdown.", this.participants[r].is_valid = !1, this.participants = [...this.participants];
11909
+ this.isInternalsAvailable && this.internals.setValidity({ customError: !0 }, "For round robin configuration, participant should be selected from the dropdown."), this.participantErrors[r] = "For round robin page, participant should be selected from the dropdown.", this.participants[r].is_valid = !1, this.participants = [...this.participants];
11907
11910
  return;
11908
11911
  } else if (!i && !t.test(e.detail.value)) {
11909
- this.internals.setValidity({ customError: !0 }, "Please enter a valid email address"), this.participantErrors[r] = "Please enter a valid email address", this.participants[r].is_valid = !1, this.participants = [...this.participants];
11912
+ this.isInternalsAvailable && this.internals.setValidity({ customError: !0 }, "Please enter a valid email address"), this.participantErrors[r] = "Please enter a valid email address", this.participants[r].is_valid = !1, this.participants = [...this.participants];
11910
11913
  return;
11911
11914
  } else
11912
- this.participantErrors[r] = "", this.participants[r].is_valid = !0, this.internals.setValidity({});
11915
+ this.participantErrors[r] = "", this.participants[r].is_valid = !0, this.isInternalsAvailable && this.internals.setValidity({});
11913
11916
  this.participants[r].email = e.detail.value, this.participants[r].availability = i ? { calendar_ids: ["primary"] } : void 0, this.participants[r].booking = i && this.isRoundRobinConfig ? { calendar_id: "primary" } : void 0, this.participants[r].name = (i == null ? void 0 : i.name) || e.detail.value, this.participants = [...this.participants], this.updateFormValue();
11914
11917
  }
11915
11918
  updateOrganizerAsParticipant() {
@@ -11934,33 +11937,28 @@ const ui = Ze(class extends Je {
11934
11937
  ]), this.updateFormValue();
11935
11938
  }
11936
11939
  addParticipant() {
11937
- ne("nylas-additional-participants", "addParticipant"), this.participants = [...this.participants, { name: "", email: "", is_organizer: !1 }], this.updateFormValue();
11940
+ re("nylas-additional-participants", "addParticipant"), this.participants = [...this.participants, { name: "", email: "", is_organizer: !1 }], this.updateFormValue();
11938
11941
  }
11939
11942
  removeParticipant(e) {
11940
- ne("nylas-additional-participants", "removeParticipant"), this.participants = this.participants.filter((t, r) => r !== e), this.updateFormValue();
11941
- }
11942
- validate(e, t) {
11943
- ne("nylas-additional-participants", "validate");
11944
- const i = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(String(e).toLowerCase());
11945
- this.participants[t].is_valid = i, this.updateFormValue();
11943
+ re("nylas-additional-participants", "removeParticipant"), this.participants = this.participants.filter((t, r) => r !== e), this.updateFormValue();
11946
11944
  }
11947
11945
  updateFormValue() {
11948
- ne("nylas-additional-participants", "updateFormValue");
11946
+ re("nylas-additional-participants", "updateFormValue");
11949
11947
  const e = this.isRoundRobinConfig ? this.includeOrganizerAsParticipant ? this.participants : this.participants.filter((t) => !t.is_organizer) : this.participants;
11950
- e.length === 0 ? (this.internals.setValidity({ customError: !0 }, "Please add at least one participant"), this.error = "Please add at least one participant") : (this.internals.setValidity({}), this.error = "", this.internals.setFormValue(JSON.stringify(e), this.name), this.valueChanged.emit({ value: JSON.stringify(e), name: this.name }));
11948
+ e.length === 0 ? (this.isInternalsAvailable && this.internals.setValidity({ customError: !0 }, "Please add at least one participant"), this.error = "Please add at least one participant") : (this.isInternalsAvailable && this.internals.setValidity({}), this.error = "", this.isInternalsAvailable && this.internals.setFormValue(JSON.stringify(e), this.name), this.valueChanged.emit({ value: JSON.stringify(e), name: this.name }));
11951
11949
  }
11952
11950
  getArrayDifference(e, t) {
11953
11951
  return e.filter((i) => !t.some((s) => i.email === s.email)).map((i) => ({ value: i.email, label: i.email }));
11954
11952
  }
11955
11953
  render() {
11956
- return M(Ir, { key: "a090033dc7d7915ca65100fd1803d2430052b18a", part: "nap" }, M("nylas-form-card", { key: "19203e4c99690200b679943672f89e9d20bc62b5" }, M("h3", { key: "33fbde2341b42cb0529b95a06f80d6dea08ffc52", slot: "header-title", class: "nylas-additional-participants__title", part: "nap__title" }, "Participants"), M("p", { key: "a8c73ed714ab74309f1a417215b9e56da99a2731", slot: "header-subtitle", class: "nylas-additional-participants__subtitle", part: "nap__subtitle" }, "Add people in your team or organization to join the event."), M("div", { key: "bce67b77333c2db513463acaa952b51d933d43d9", slot: "content", class: "nylas-additional-participants__content" }, M("div", { key: "35e0bf36996f3daec1d41e1d8c74c636fb72307f" }, this.participants.map((e, t) => M("div", { class: "nylas-additional-participants__input_group", part: "nap__input_group" }, !e.is_organizer && M("label", null, `Participant ${t}`), M("div", { part: "nap__input_wrapper", class: {
11954
+ return M(Ir, { key: "16a28d7d8ee91b685a22472d8a90721a5074d798", part: "nap" }, M("nylas-form-card", { key: "9fde59eadfcdf05c3b4add30a5c35f9b21d00c30" }, M("h3", { key: "82e3c3ad537ef4c60d19695f11e481bac2ed31ae", slot: "header-title", class: "nylas-additional-participants__title", part: "nap__title" }, "Participants"), M("p", { key: "4df3d661d2c6801ba8e88d82853ae562ed3be8e8", slot: "header-subtitle", class: "nylas-additional-participants__subtitle", part: "nap__subtitle" }, "Add people in your team or organization to join the event."), M("div", { key: "3ccb34354c025b52760433683812acf37b480e77", slot: "content", class: "nylas-additional-participants__content" }, M("div", { key: "007cf8396921637cf230cc26d73de147169cd250" }, this.participants.map((e, t) => M("div", { class: "nylas-additional-participants__input_group", part: "nap__input_group" }, !e.is_organizer && M("label", null, `Participant ${t}`), M("div", { part: "nap__input_wrapper", class: {
11957
11955
  "nylas-additional-participants__input_wrapper": !0,
11958
11956
  "nylas-additional-participants__input_wrapper_organizer": (e == null ? void 0 : e.is_organizer) === !0,
11959
11957
  "nylas-additional-participants__input_wrapper_invalid": e.is_valid === !1,
11960
11958
  error: e.is_valid === !1
11961
11959
  } }, M("div", { class: { "nylas-additional-participants__input": !0, organizer: (e == null ? void 0 : e.is_organizer) === !0 }, part: "nap__input" }, e.is_organizer ? M("input-component", { class: "label-input", name: `${t}`, key: t, label: "Organizer", required: !1, readOnly: e.is_organizer, defaultValue: e.email }, this.isRoundRobinConfig && M("div", { class: "required-input", slot: "additional-input" }, M("input", { type: "checkbox", name: "organizer_participant", id: "organizer_participant", onClick: () => {
11962
11960
  this.includeOrganizerAsParticipant = !this.includeOrganizerAsParticipant, this.updateFormValue();
11963
- }, checked: this.includeOrganizerAsParticipant }), M("label", { htmlFor: "organizer_participant", "aria-label": "Include as participant" }, "Participant", M("tooltip-component", { id: "organizer_participant_tooltip" }, M("info-icon", { slot: "tooltip-icon" }), M("span", { slot: "tooltip-content" }, M("strong", null, "Include Organizer:"), " The organizer (you) will be included in the round-robin rotation. ", M("br", null), M("strong", null, "Exclude Organizer:"), " The organizer (you) will not be included in the round-robin rotation."))))) : M("input-dropdown", { id: `${t}`, name: `${t}`, filterable: !0, inputValue: e.email, options: this.getArrayDifference(this.participantOptions || [], this.participants) }), !e.is_organizer && M("button", { onClick: () => this.removeParticipant(t), part: "nap__remove-participant" }, M("close-icon", null)))), !e.is_valid && M("p", { class: "nylas-additional-participants__error", part: "nap__error" }, this.participantErrors[t]))), M("p", { key: "51f51ef0614cd93592fae8a32f501d0249b12c5a", class: "nylas-additional-participants__error", part: "nap__error" }, this.error)), M("button", { key: "93605c6ce8fb6b77451ea0f8c06fb23134727c3f", class: "nylas-additional-participants__add", part: "nap__add-participant", onClick: () => this.addParticipant() }, M("add-circle-icon", { key: "8e6ac25f43f06ad3ee24047a1a7469b13c5a56c7" }), " ", M("span", { key: "511068fb28c498edba86706bef49dcad6633d249" }, "Add ", this.participants.length > 1 ? "another" : "a", " participant")))));
11961
+ }, checked: this.includeOrganizerAsParticipant }), M("label", { htmlFor: "organizer_participant", "aria-label": "Include as participant" }, "Participant", M("tooltip-component", { id: "organizer_participant_tooltip" }, M("info-icon", { slot: "tooltip-icon" }), M("span", { slot: "tooltip-content" }, M("strong", null, "Include Organizer:"), " The organizer (you) will be included in the round-robin rotation. ", M("br", null), M("strong", null, "Exclude Organizer:"), " The organizer (you) will not be included in the round-robin rotation."))))) : M("input-dropdown", { id: `${t}`, name: `${t}`, filterable: !0, inputValue: e.email, options: this.getArrayDifference(this.participantOptions || [], this.participants) }), !e.is_organizer && M("button", { onClick: () => this.removeParticipant(t), part: "nap__remove-participant" }, M("close-icon", null)))), !e.is_valid && M("p", { class: "nylas-additional-participants__error", part: "nap__error" }, this.participantErrors[t]))), M("p", { key: "f1dd954c137093fa9e474f3886e4b5320aeb5e2e", class: "nylas-additional-participants__error", part: "nap__error" }, this.error)), M("button", { key: "859585010fc9fce314b856f5e7e07ac8b8c47b88", class: "nylas-additional-participants__add", part: "nap__add-participant", onClick: () => this.addParticipant() }, M("add-circle-icon", { key: "aec7eb5de30e66bca29b73962f356109471c2e9e" }), " ", M("span", { key: "f07ecfaa4db46f7954d734314c46f2d773158730" }, "Add ", this.participants.length > 1 ? "another" : "a", " participant")))));
11964
11962
  }
11965
11963
  static get formAssociated() {
11966
11964
  return !0;