@nylas/web-elements 0.0.0-canary-20241017103834 → 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 (31) hide show
  1. package/dist/cdn/nylas-additional-participants/nylas-additional-participants.es.js +7 -7
  2. package/dist/cdn/nylas-editor-tabs/nylas-editor-tabs.es.js +4552 -4544
  3. package/dist/cdn/nylas-reminder-emails/nylas-reminder-emails.es.js +2289 -2281
  4. package/dist/cdn/nylas-reminder-time/nylas-reminder-time.es.js +2253 -2245
  5. package/dist/cdn/nylas-scheduler-editor/nylas-scheduler-editor.es.js +97 -89
  6. package/dist/cjs/calendar-agenda-fill-icon_54.cjs.entry.js +32 -37
  7. package/dist/cjs/calendar-agenda-fill-icon_54.cjs.entry.js.map +1 -1
  8. package/dist/cjs/loader.cjs.js +1 -1
  9. package/dist/cjs/nylas-web-elements.cjs.js +1 -1
  10. package/dist/collection/components/scheduler-editor/nylas-additional-participants/nylas-additional-participants.js +9 -9
  11. package/dist/collection/components/scheduler-editor/nylas-additional-participants/nylas-additional-participants.js.map +1 -1
  12. package/dist/collection/components/scheduler-editor/nylas-reminder-time/nylas-reminder-time.js +23 -30
  13. package/dist/collection/components/scheduler-editor/nylas-reminder-time/nylas-reminder-time.js.map +1 -1
  14. package/dist/collection/components/scheduler-editor/nylas-reminder-time/test/nylas-reminder-time.spec.js +37 -0
  15. package/dist/collection/components/scheduler-editor/nylas-reminder-time/test/nylas-reminder-time.spec.js.map +1 -0
  16. package/dist/components/nylas-additional-participants2.js +9 -9
  17. package/dist/components/nylas-additional-participants2.js.map +1 -1
  18. package/dist/components/nylas-reminder-time2.js +23 -29
  19. package/dist/components/nylas-reminder-time2.js.map +1 -1
  20. package/dist/esm/calendar-agenda-fill-icon_54.entry.js +32 -37
  21. package/dist/esm/calendar-agenda-fill-icon_54.entry.js.map +1 -1
  22. package/dist/esm/loader.js +1 -1
  23. package/dist/esm/nylas-web-elements.js +1 -1
  24. package/dist/nylas-web-elements/nylas-web-elements.esm.js +1 -1
  25. package/dist/nylas-web-elements/nylas-web-elements.esm.js.map +1 -1
  26. package/dist/nylas-web-elements/{p-df131a08.entry.js → p-1ce8b1c3.entry.js} +3 -3
  27. package/dist/nylas-web-elements/p-1ce8b1c3.entry.js.map +1 -0
  28. package/dist/types/components/scheduler-editor/nylas-additional-participants/nylas-additional-participants.d.ts +1 -1
  29. package/dist/types/components/scheduler-editor/nylas-reminder-time/nylas-reminder-time.d.ts +1 -1
  30. package/package.json +1 -1
  31. package/dist/nylas-web-elements/p-df131a08.entry.js.map +0 -1
@@ -1583,7 +1583,7 @@ var dayjs_min = { exports: {} };
1583
1583
  return ki ? qi : qi.endOf(ni);
1584
1584
  }, Ii = function(Fi, Ni) {
1585
1585
  return wi.w(gi.toDate()[Fi].apply(gi.toDate("s"), (ki ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(Ni)), gi);
1586
- }, Di = this.$W, Mi = this.$M, Oi = this.$D, Ri = "set" + (this.$u ? "UTC" : "");
1586
+ }, Di = this.$W, Mi = this.$M, Ri = this.$D, Oi = "set" + (this.$u ? "UTC" : "");
1587
1587
  switch (Ti) {
1588
1588
  case oi:
1589
1589
  return ki ? Ai(1, 0) : Ai(31, 11);
@@ -1591,16 +1591,16 @@ var dayjs_min = { exports: {} };
1591
1591
  return ki ? Ai(1, Mi) : Ai(0, Mi + 1);
1592
1592
  case ri:
1593
1593
  var Ui = this.$locale().weekStart || 0, ji = (Di < Ui ? Di + 7 : Di) - Ui;
1594
- return Ai(ki ? Oi - ji : Oi + (6 - ji), Mi);
1594
+ return Ai(ki ? Ri - ji : Ri + (6 - ji), Mi);
1595
1595
  case ni:
1596
1596
  case si:
1597
- return Ii(Ri + "Hours", 0);
1597
+ return Ii(Oi + "Hours", 0);
1598
1598
  case ti:
1599
- return Ii(Ri + "Minutes", 1);
1599
+ return Ii(Oi + "Minutes", 1);
1600
1600
  case ei:
1601
- return Ii(Ri + "Seconds", 2);
1601
+ return Ii(Oi + "Seconds", 2);
1602
1602
  case ln:
1603
- return Ii(Ri + "Milliseconds", 3);
1603
+ return Ii(Oi + "Milliseconds", 3);
1604
1604
  default:
1605
1605
  return this.clone();
1606
1606
  }
@@ -1621,8 +1621,8 @@ var dayjs_min = { exports: {} };
1621
1621
  var gi, ki = this;
1622
1622
  fi = Number(fi);
1623
1623
  var Ti = wi.p(Ei), Ai = function(Mi) {
1624
- var Oi = mi(ki);
1625
- return wi.w(Oi.date(Oi.date() + Math.round(Mi * fi)), ki);
1624
+ var Ri = mi(ki);
1625
+ return wi.w(Ri.date(Ri.date() + Math.round(Mi * fi)), ki);
1626
1626
  };
1627
1627
  if (Ti === ii) return this.set(ii, this.$M + fi);
1628
1628
  if (Ti === oi) return this.set(oi, this.$y + fi);
@@ -1635,14 +1635,14 @@ var dayjs_min = { exports: {} };
1635
1635
  }, vi.format = function(fi) {
1636
1636
  var Ei = this, gi = this.$locale();
1637
1637
  if (!this.isValid()) return gi.invalidDate || li;
1638
- var ki = fi || "YYYY-MM-DDTHH:mm:ssZ", Ti = wi.z(this), Ai = this.$H, Ii = this.$m, Di = this.$M, Mi = gi.weekdays, Oi = gi.months, Ri = function(Ni, qi, Gi, Bi) {
1638
+ var ki = fi || "YYYY-MM-DDTHH:mm:ssZ", Ti = wi.z(this), Ai = this.$H, Ii = this.$m, Di = this.$M, Mi = gi.weekdays, Ri = gi.months, Oi = function(Ni, qi, Gi, Bi) {
1639
1639
  return Ni && (Ni[qi] || Ni(Ei, ki)) || Gi[qi].slice(0, Bi);
1640
1640
  }, Ui = function(Ni) {
1641
1641
  return wi.s(Ai % 12 || 12, Ni, "0");
1642
1642
  }, ji = gi.meridiem || function(Ni, qi, Gi) {
1643
1643
  var Bi = Ni < 12 ? "AM" : "PM";
1644
1644
  return Gi ? Bi.toLowerCase() : Bi;
1645
- }, Fi = { YY: String(this.$y).slice(-2), YYYY: this.$y, M: Di + 1, MM: wi.s(Di + 1, 2, "0"), MMM: Ri(gi.monthsShort, Di, Oi, 3), MMMM: Ri(Oi, Di), D: this.$D, DD: wi.s(this.$D, 2, "0"), d: String(this.$W), dd: Ri(gi.weekdaysMin, this.$W, Mi, 2), ddd: Ri(gi.weekdaysShort, this.$W, Mi, 3), dddd: Mi[this.$W], H: String(Ai), HH: wi.s(Ai, 2, "0"), h: Ui(1), hh: Ui(2), a: ji(Ai, Ii, !0), A: ji(Ai, Ii, !1), m: String(Ii), mm: wi.s(Ii, 2, "0"), s: String(this.$s), ss: wi.s(this.$s, 2, "0"), SSS: wi.s(this.$ms, 3, "0"), Z: Ti };
1645
+ }, Fi = { YY: String(this.$y).slice(-2), YYYY: this.$y, M: Di + 1, MM: wi.s(Di + 1, 2, "0"), MMM: Oi(gi.monthsShort, Di, Ri, 3), MMMM: Oi(Ri, Di), D: this.$D, DD: wi.s(this.$D, 2, "0"), d: String(this.$W), dd: Oi(gi.weekdaysMin, this.$W, Mi, 2), ddd: Oi(gi.weekdaysShort, this.$W, Mi, 3), dddd: Mi[this.$W], H: String(Ai), HH: wi.s(Ai, 2, "0"), h: Ui(1), hh: Ui(2), a: ji(Ai, Ii, !0), A: ji(Ai, Ii, !1), m: String(Ii), mm: wi.s(Ii, 2, "0"), s: String(this.$s), ss: wi.s(this.$s, 2, "0"), SSS: wi.s(this.$ms, 3, "0"), Z: Ti };
1646
1646
  return ki.replace(ui, function(Ni, qi) {
1647
1647
  return qi || Fi[Ni] || Ti.replace(":", "");
1648
1648
  });
@@ -10639,16 +10639,16 @@ and ensure you are accounting for this risk.
10639
10639
  if (!ti || has(ti, fi) && ti[fi].indexOf(Di) !== -1 || ti["*"] && ti["*"].indexOf(Di) !== -1 || has(ni, fi) && ni[fi].test(Di) || ni["*"] && ni["*"].test(Di))
10640
10640
  Mi = !0;
10641
10641
  else if (ti && ti[fi]) {
10642
- for (const Oi of ti[fi])
10643
- if (isPlainObject$3(Oi) && Oi.name && Oi.name === Di) {
10642
+ for (const Ri of ti[fi])
10643
+ if (isPlainObject$3(Ri) && Ri.name && Ri.name === Di) {
10644
10644
  Mi = !0;
10645
- let Ri = "";
10646
- if (Oi.multiple === !0) {
10645
+ let Oi = "";
10646
+ if (Ri.multiple === !0) {
10647
10647
  const Ui = Ii.split(" ");
10648
10648
  for (const ji of Ui)
10649
- Oi.values.indexOf(ji) !== -1 && (Ri === "" ? Ri = ji : Ri += " " + ji);
10650
- } else Oi.values.indexOf(Ii) >= 0 && (Ri = Ii);
10651
- Ii = Ri;
10649
+ Ri.values.indexOf(ji) !== -1 && (Oi === "" ? Oi = ji : Oi += " " + ji);
10650
+ } else Ri.values.indexOf(Ii) >= 0 && (Oi = Ii);
10651
+ Ii = Oi;
10652
10652
  }
10653
10653
  }
10654
10654
  if (Mi) {
@@ -10657,57 +10657,57 @@ and ensure you are accounting for this risk.
10657
10657
  return;
10658
10658
  }
10659
10659
  if (fi === "script" && Di === "src") {
10660
- let Oi = !0;
10660
+ let Ri = !0;
10661
10661
  try {
10662
- const Ri = wi(Ii);
10662
+ const Oi = wi(Ii);
10663
10663
  if (ue.allowedScriptHostnames || ue.allowedScriptDomains) {
10664
10664
  const Ui = (ue.allowedScriptHostnames || []).find(function(Fi) {
10665
- return Fi === Ri.url.hostname;
10665
+ return Fi === Oi.url.hostname;
10666
10666
  }), ji = (ue.allowedScriptDomains || []).find(function(Fi) {
10667
- return Ri.url.hostname === Fi || Ri.url.hostname.endsWith(`.${Fi}`);
10667
+ return Oi.url.hostname === Fi || Oi.url.hostname.endsWith(`.${Fi}`);
10668
10668
  });
10669
- Oi = Ui || ji;
10669
+ Ri = Ui || ji;
10670
10670
  }
10671
10671
  } catch {
10672
- Oi = !1;
10672
+ Ri = !1;
10673
10673
  }
10674
- if (!Oi) {
10674
+ if (!Ri) {
10675
10675
  delete gi.attribs[Di];
10676
10676
  return;
10677
10677
  }
10678
10678
  }
10679
10679
  if (fi === "iframe" && Di === "src") {
10680
- let Oi = !0;
10680
+ let Ri = !0;
10681
10681
  try {
10682
- const Ri = wi(Ii);
10683
- if (Ri.isRelativeUrl)
10684
- Oi = has(ue, "allowIframeRelativeUrls") ? ue.allowIframeRelativeUrls : !ue.allowedIframeHostnames && !ue.allowedIframeDomains;
10682
+ const Oi = wi(Ii);
10683
+ if (Oi.isRelativeUrl)
10684
+ Ri = has(ue, "allowIframeRelativeUrls") ? ue.allowIframeRelativeUrls : !ue.allowedIframeHostnames && !ue.allowedIframeDomains;
10685
10685
  else if (ue.allowedIframeHostnames || ue.allowedIframeDomains) {
10686
10686
  const Ui = (ue.allowedIframeHostnames || []).find(function(Fi) {
10687
- return Fi === Ri.url.hostname;
10687
+ return Fi === Oi.url.hostname;
10688
10688
  }), ji = (ue.allowedIframeDomains || []).find(function(Fi) {
10689
- return Ri.url.hostname === Fi || Ri.url.hostname.endsWith(`.${Fi}`);
10689
+ return Oi.url.hostname === Fi || Oi.url.hostname.endsWith(`.${Fi}`);
10690
10690
  });
10691
- Oi = Ui || ji;
10691
+ Ri = Ui || ji;
10692
10692
  }
10693
10693
  } catch {
10694
- Oi = !1;
10694
+ Ri = !1;
10695
10695
  }
10696
- if (!Oi) {
10696
+ if (!Ri) {
10697
10697
  delete gi.attribs[Di];
10698
10698
  return;
10699
10699
  }
10700
10700
  }
10701
10701
  if (Di === "srcset")
10702
10702
  try {
10703
- let Oi = parseSrcset(Ii);
10704
- if (Oi.forEach(function(Ri) {
10705
- mi("srcset", Ri.url) && (Ri.evil = !0);
10706
- }), Oi = filter(Oi, function(Ri) {
10707
- return !Ri.evil;
10708
- }), Oi.length)
10709
- Ii = stringifySrcset(filter(Oi, function(Ri) {
10710
- return !Ri.evil;
10703
+ let Ri = parseSrcset(Ii);
10704
+ if (Ri.forEach(function(Oi) {
10705
+ mi("srcset", Oi.url) && (Oi.evil = !0);
10706
+ }), Ri = filter(Ri, function(Oi) {
10707
+ return !Oi.evil;
10708
+ }), Ri.length)
10709
+ Ii = stringifySrcset(filter(Ri, function(Oi) {
10710
+ return !Oi.evil;
10711
10711
  })), gi.attribs[Di] = Ii;
10712
10712
  else {
10713
10713
  delete gi.attribs[Di];
@@ -10718,13 +10718,13 @@ and ensure you are accounting for this risk.
10718
10718
  return;
10719
10719
  }
10720
10720
  if (Di === "class") {
10721
- const Oi = ri[fi], Ri = ri["*"], Ui = ii[fi], ji = ai[fi], Fi = ii["*"], Ni = [
10721
+ const Ri = ri[fi], Oi = ri["*"], Ui = ii[fi], ji = ai[fi], Fi = ii["*"], Ni = [
10722
10722
  Ui,
10723
10723
  Fi
10724
10724
  ].concat(ji).filter(function(qi) {
10725
10725
  return qi;
10726
10726
  });
10727
- if (Oi && Ri ? Ii = vi(Ii, deepmerge(Oi, Ri), Ni) : Ii = vi(Ii, Oi || Ri, Ni), !Ii.length) {
10727
+ if (Ri && Oi ? Ii = vi(Ii, deepmerge(Ri, Oi), Ni) : Ii = vi(Ii, Ri || Oi, Ni), !Ii.length) {
10728
10728
  delete gi.attribs[Di];
10729
10729
  return;
10730
10730
  }
@@ -10732,8 +10732,8 @@ and ensure you are accounting for this risk.
10732
10732
  if (Di === "style") {
10733
10733
  if (ue.parseStyleAttributes)
10734
10734
  try {
10735
- const Oi = postcssParse(fi + " {" + Ii + "}", { map: !1 }), Ri = hi(Oi, ue.allowedStyles);
10736
- if (Ii = xi(Ri), Ii.length === 0) {
10735
+ const Ri = postcssParse(fi + " {" + Ii + "}", { map: !1 }), Oi = hi(Ri, ue.allowedStyles);
10736
+ if (Ii = xi(Oi), Ii.length === 0) {
10737
10737
  delete gi.attribs[Di];
10738
10738
  return;
10739
10739
  }
@@ -16025,7 +16025,7 @@ const NylasAdditionalParticipants = proxyCustomElement(class extends H$2 {
16025
16025
  disconnectedCallback() {
16026
16026
  debug("nylas-additional-participants", "disconnectedCallback");
16027
16027
  }
16028
- isInternalsAvailable() {
16028
+ get isInternalsAvailable() {
16029
16029
  return this.internals !== void 0 && typeof this.internals.setFormValue == "function" && typeof this.internals.setValidity == "function";
16030
16030
  }
16031
16031
  onInputOptionChanged(ue) {
@@ -16033,13 +16033,13 @@ const NylasAdditionalParticipants = proxyCustomElement(class extends H$2 {
16033
16033
  debug("nylas-additional-participants", "onInputOptionChanged");
16034
16034
  const ge = /^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/, Oe = ue.detail.name, Ke = (vt = this.participantOptions) == null ? void 0 : vt.find((ln) => ln.email === ue.detail.value);
16035
16035
  if (!Ke && this.isRoundRobinConfig) {
16036
- this.isInternalsAvailable() && this.internals.setValidity({ customError: !0 }, "For round robin configuration, participant should be selected from the dropdown."), this.participantErrors[Oe] = "For round robin page, participant should be selected from the dropdown.", this.participants[Oe].is_valid = !1, this.participants = [...this.participants];
16036
+ this.isInternalsAvailable && this.internals.setValidity({ customError: !0 }, "For round robin configuration, participant should be selected from the dropdown."), this.participantErrors[Oe] = "For round robin page, participant should be selected from the dropdown.", this.participants[Oe].is_valid = !1, this.participants = [...this.participants];
16037
16037
  return;
16038
16038
  } else if (!Ke && !ge.test(ue.detail.value)) {
16039
- this.isInternalsAvailable() && this.internals.setValidity({ customError: !0 }, "Please enter a valid email address"), this.participantErrors[Oe] = "Please enter a valid email address", this.participants[Oe].is_valid = !1, this.participants = [...this.participants];
16039
+ this.isInternalsAvailable && this.internals.setValidity({ customError: !0 }, "Please enter a valid email address"), this.participantErrors[Oe] = "Please enter a valid email address", this.participants[Oe].is_valid = !1, this.participants = [...this.participants];
16040
16040
  return;
16041
16041
  } else
16042
- this.participantErrors[Oe] = "", this.participants[Oe].is_valid = !0, this.isInternalsAvailable() && this.internals.setValidity({});
16042
+ this.participantErrors[Oe] = "", this.participants[Oe].is_valid = !0, this.isInternalsAvailable && this.internals.setValidity({});
16043
16043
  this.participants[Oe].email = ue.detail.value, this.participants[Oe].availability = Ke ? { calendar_ids: ["primary"] } : void 0, this.participants[Oe].booking = Ke && this.isRoundRobinConfig ? { calendar_id: "primary" } : void 0, this.participants[Oe].name = (Ke == null ? void 0 : Ke.name) || ue.detail.value, this.participants = [...this.participants], this.updateFormValue();
16044
16044
  }
16045
16045
  updateOrganizerAsParticipant() {
@@ -16072,20 +16072,20 @@ const NylasAdditionalParticipants = proxyCustomElement(class extends H$2 {
16072
16072
  updateFormValue() {
16073
16073
  debug("nylas-additional-participants", "updateFormValue");
16074
16074
  const ue = this.isRoundRobinConfig ? this.includeOrganizerAsParticipant ? this.participants : this.participants.filter((ge) => !ge.is_organizer) : this.participants;
16075
- ue.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(ue), this.name), this.valueChanged.emit({ value: JSON.stringify(ue), name: this.name }));
16075
+ ue.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(ue), this.name), this.valueChanged.emit({ value: JSON.stringify(ue), name: this.name }));
16076
16076
  }
16077
16077
  getArrayDifference(ue, ge) {
16078
16078
  return ue.filter((Ke) => !ge.some((vt) => Ke.email === vt.email)).map((Ke) => ({ value: Ke.email, label: Ke.email }));
16079
16079
  }
16080
16080
  render() {
16081
- return h$2(Host, { key: "b17facebc66435c9e405b442500163b47836914e", part: "nap" }, h$2("nylas-form-card", { key: "bce92f93c9f0ec0c04c000582505ea1adb1a3e22" }, h$2("h3", { key: "07cd5fd66a38dadfd67f67607fe81fb235cbb1f3", slot: "header-title", class: "nylas-additional-participants__title", part: "nap__title" }, "Participants"), h$2("p", { key: "3e9f5348444a81731228d4ce5f355b3cd6ead03f", slot: "header-subtitle", class: "nylas-additional-participants__subtitle", part: "nap__subtitle" }, "Add people in your team or organization to join the event."), h$2("div", { key: "b6921a32886aaedbf9ecaa942912c2991881b380", slot: "content", class: "nylas-additional-participants__content" }, h$2("div", { key: "780531379643ee4764122906f144d302e0bc32e5" }, this.participants.map((ue, ge) => h$2("div", { class: "nylas-additional-participants__input_group", part: "nap__input_group" }, !ue.is_organizer && h$2("label", null, `Participant ${ge}`), h$2("div", { part: "nap__input_wrapper", class: {
16081
+ return h$2(Host, { key: "16a28d7d8ee91b685a22472d8a90721a5074d798", part: "nap" }, h$2("nylas-form-card", { key: "9fde59eadfcdf05c3b4add30a5c35f9b21d00c30" }, h$2("h3", { key: "82e3c3ad537ef4c60d19695f11e481bac2ed31ae", slot: "header-title", class: "nylas-additional-participants__title", part: "nap__title" }, "Participants"), h$2("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."), h$2("div", { key: "3ccb34354c025b52760433683812acf37b480e77", slot: "content", class: "nylas-additional-participants__content" }, h$2("div", { key: "007cf8396921637cf230cc26d73de147169cd250" }, this.participants.map((ue, ge) => h$2("div", { class: "nylas-additional-participants__input_group", part: "nap__input_group" }, !ue.is_organizer && h$2("label", null, `Participant ${ge}`), h$2("div", { part: "nap__input_wrapper", class: {
16082
16082
  "nylas-additional-participants__input_wrapper": !0,
16083
16083
  "nylas-additional-participants__input_wrapper_organizer": (ue == null ? void 0 : ue.is_organizer) === !0,
16084
16084
  "nylas-additional-participants__input_wrapper_invalid": ue.is_valid === !1,
16085
16085
  error: ue.is_valid === !1
16086
16086
  } }, h$2("div", { class: { "nylas-additional-participants__input": !0, organizer: (ue == null ? void 0 : ue.is_organizer) === !0 }, part: "nap__input" }, ue.is_organizer ? h$2("input-component", { class: "label-input", name: `${ge}`, key: ge, label: "Organizer", required: !1, readOnly: ue.is_organizer, defaultValue: ue.email }, this.isRoundRobinConfig && h$2("div", { class: "required-input", slot: "additional-input" }, h$2("input", { type: "checkbox", name: "organizer_participant", id: "organizer_participant", onClick: () => {
16087
16087
  this.includeOrganizerAsParticipant = !this.includeOrganizerAsParticipant, this.updateFormValue();
16088
- }, checked: this.includeOrganizerAsParticipant }), h$2("label", { htmlFor: "organizer_participant", "aria-label": "Include as participant" }, "Participant", h$2("tooltip-component", { id: "organizer_participant_tooltip" }, h$2("info-icon", { slot: "tooltip-icon" }), h$2("span", { slot: "tooltip-content" }, h$2("strong", null, "Include Organizer:"), " The organizer (you) will be included in the round-robin rotation. ", h$2("br", null), h$2("strong", null, "Exclude Organizer:"), " The organizer (you) will not be included in the round-robin rotation."))))) : h$2("input-dropdown", { id: `${ge}`, name: `${ge}`, filterable: !0, inputValue: ue.email, options: this.getArrayDifference(this.participantOptions || [], this.participants) }), !ue.is_organizer && h$2("button", { onClick: () => this.removeParticipant(ge), part: "nap__remove-participant" }, h$2("close-icon", null)))), !ue.is_valid && h$2("p", { class: "nylas-additional-participants__error", part: "nap__error" }, this.participantErrors[ge]))), h$2("p", { key: "9921cf9eb77303da37e64bb4b2555fe662bcb299", class: "nylas-additional-participants__error", part: "nap__error" }, this.error)), h$2("button", { key: "0fdc9f4d4ee5b221aaaa01de39e0fe5ad29675f1", class: "nylas-additional-participants__add", part: "nap__add-participant", onClick: () => this.addParticipant() }, h$2("add-circle-icon", { key: "c1c405144661b246731d48907246b3bc9e252410" }), " ", h$2("span", { key: "2ccd09a3a9c148dd4e895f7c3b2ac52cce86b76b" }, "Add ", this.participants.length > 1 ? "another" : "a", " participant")))));
16088
+ }, checked: this.includeOrganizerAsParticipant }), h$2("label", { htmlFor: "organizer_participant", "aria-label": "Include as participant" }, "Participant", h$2("tooltip-component", { id: "organizer_participant_tooltip" }, h$2("info-icon", { slot: "tooltip-icon" }), h$2("span", { slot: "tooltip-content" }, h$2("strong", null, "Include Organizer:"), " The organizer (you) will be included in the round-robin rotation. ", h$2("br", null), h$2("strong", null, "Exclude Organizer:"), " The organizer (you) will not be included in the round-robin rotation."))))) : h$2("input-dropdown", { id: `${ge}`, name: `${ge}`, filterable: !0, inputValue: ue.email, options: this.getArrayDifference(this.participantOptions || [], this.participants) }), !ue.is_organizer && h$2("button", { onClick: () => this.removeParticipant(ge), part: "nap__remove-participant" }, h$2("close-icon", null)))), !ue.is_valid && h$2("p", { class: "nylas-additional-participants__error", part: "nap__error" }, this.participantErrors[ge]))), h$2("p", { key: "f1dd954c137093fa9e474f3886e4b5320aeb5e2e", class: "nylas-additional-participants__error", part: "nap__error" }, this.error)), h$2("button", { key: "859585010fc9fce314b856f5e7e07ac8b8c47b88", class: "nylas-additional-participants__add", part: "nap__add-participant", onClick: () => this.addParticipant() }, h$2("add-circle-icon", { key: "aec7eb5de30e66bca29b73962f356109471c2e9e" }), " ", h$2("span", { key: "f07ecfaa4db46f7954d734314c46f2d773158730" }, "Add ", this.participants.length > 1 ? "another" : "a", " participant")))));
16089
16089
  }
16090
16090
  static get formAssociated() {
16091
16091
  return !0;
@@ -16991,9 +16991,9 @@ var customParseFormat$1 = { exports: {} };
16991
16991
  wi && (xi = $i[2]), ei = this.$locale(), !mi && xi && (ei = ui.Ls[xi]), this.$d = function(Ei, gi, ki) {
16992
16992
  try {
16993
16993
  if (["x", "X"].indexOf(gi) > -1) return new Date((gi === "X" ? 1e3 : 1) * Ei);
16994
- var Ti = si(gi)(Ei), Ai = Ti.year, Ii = Ti.month, Di = Ti.day, Mi = Ti.hours, Oi = Ti.minutes, Ri = Ti.seconds, Ui = Ti.milliseconds, ji = Ti.zone, Fi = /* @__PURE__ */ new Date(), Ni = Di || (Ai || Ii ? 1 : Fi.getDate()), qi = Ai || Fi.getFullYear(), Gi = 0;
16994
+ var Ti = si(gi)(Ei), Ai = Ti.year, Ii = Ti.month, Di = Ti.day, Mi = Ti.hours, Ri = Ti.minutes, Oi = Ti.seconds, Ui = Ti.milliseconds, ji = Ti.zone, Fi = /* @__PURE__ */ new Date(), Ni = Di || (Ai || Ii ? 1 : Fi.getDate()), qi = Ai || Fi.getFullYear(), Gi = 0;
16995
16995
  Ai && !Ii || (Gi = Ii > 0 ? Ii - 1 : Fi.getMonth());
16996
- var Bi = Mi || 0, Li = Oi || 0, Wi = Ri || 0, Hi = Ui || 0;
16996
+ var Bi = Mi || 0, Li = Ri || 0, Wi = Oi || 0, Hi = Ui || 0;
16997
16997
  return ji ? new Date(Date.UTC(qi, Gi, Ni, Bi, Li, Wi, Hi + 60 * ji.offset * 1e3)) : ki ? new Date(Date.UTC(qi, Gi, Ni, Bi, Li, Wi, Hi)) : new Date(qi, Gi, Ni, Bi, Li, Wi, Hi);
16998
16998
  } catch {
16999
16999
  return /* @__PURE__ */ new Date("");
@@ -23375,11 +23375,26 @@ var __decorate$5 = function(ve, ue, ge, Oe) {
23375
23375
  if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
23376
23376
  return Reflect.metadata(ve, ue);
23377
23377
  };
23378
+ const reminderTimeOptions = [
23379
+ { value: 60 * 24, label: "day" },
23380
+ { value: 60, label: "hour" },
23381
+ { value: 1, label: "minute" }
23382
+ ];
23378
23383
  function getInitialTimeValue(ve) {
23379
- return ve ? ve >= 60 * 24 ? ve / (60 * 24) : ve >= 90 || ve === 60 ? ve / 60 : ve : 30;
23384
+ if (!ve)
23385
+ return 30;
23386
+ for (const ue of reminderTimeOptions)
23387
+ if (ve % ue.value === 0)
23388
+ return ve / ue.value;
23389
+ return ve;
23380
23390
  }
23381
23391
  function getInitialTimeIncrement(ve) {
23382
- return ve ? ve >= 60 * 24 ? 60 * 24 : ve >= 90 || ve === 60 ? 60 : 1 : 30;
23392
+ if (!ve)
23393
+ return 1;
23394
+ for (const ue of reminderTimeOptions)
23395
+ if (ve % ue.value === 0)
23396
+ return ue.value;
23397
+ return 1;
23383
23398
  }
23384
23399
  const NylasReminderTime = proxyCustomElement(class extends H$2 {
23385
23400
  constructor() {
@@ -23388,9 +23403,6 @@ const NylasReminderTime = proxyCustomElement(class extends H$2 {
23388
23403
  elementNameChangedHandler(ue) {
23389
23404
  debug("nylas-reminder-time", "elementNameChangedHandler", ue), this.host.setAttribute("name", ue);
23390
23405
  }
23391
- eventReminderTimeMinutesChangedHandler(ue, ge) {
23392
- debug("nylas-reminder-time", "eventReminderTimeMinutesChangedHandler", ue), ue !== ge && (this.reminderTime = getInitialTimeValue(ue), this.reminderTimeincrement = getInitialTimeIncrement(ue), this.reminderTimeMinutes = ue);
23393
- }
23394
23406
  reminderTimeMinutesChangedHandler(ue, ge) {
23395
23407
  debug("nylas-reminder-time", "reminderTimeMinutesChangedHandler", ue), ue !== ge && this.valueChanged.emit({ value: ue.toString(), name: this.name });
23396
23408
  }
@@ -23398,34 +23410,32 @@ const NylasReminderTime = proxyCustomElement(class extends H$2 {
23398
23410
  debug("nylas-reminder-time", "connectedCallback");
23399
23411
  }
23400
23412
  componentWillLoad() {
23401
- debug("nylas-reminder-time", "componentWillLoad"), this.host.setAttribute("name", this.name), this.setReminderTimeMinuteOptions();
23413
+ debug("nylas-reminder-time", "componentWillLoad"), this.host.setAttribute("name", this.name);
23402
23414
  }
23403
23415
  componentDidLoad() {
23404
- debug("nylas-reminder-time", "componentDidLoad");
23416
+ debug("nylas-reminder-time", "componentDidLoad"), this.setReminderTimeMinuteOptions();
23405
23417
  }
23406
23418
  disconnectedCallback() {
23407
23419
  debug("nylas-reminder-time", "disconnectedCallback");
23408
23420
  }
23421
+ get isInternalsAvailable() {
23422
+ return this.internals !== void 0 && typeof this.internals.setFormValue == "function";
23423
+ }
23409
23424
  setReminderTimeMinuteOptions() {
23410
23425
  return this.reminderTimeincrement === 1 ? this.reminderTimeMinutesOptions = REMINDER_MINUTE_OPTIONS : this.reminderTimeincrement === 60 ? this.reminderTimeMinutesOptions = REMINDER_HOUR_OPTIONS : this.reminderTimeMinutesOptions = REMINDER_DAY_OPTIONS, this.reminderTimeMinutesOptions;
23411
23426
  }
23412
23427
  nylasFormDropdownChangedHandler(ue) {
23413
23428
  debug("nylas-calendar-picker", "nylasFormDropdownChangedHandler", ue.detail);
23414
23429
  const { value: ge } = ue.detail;
23415
- this.reminderTimeincrement = parseInt(ge), this.reminderTimeincrement === 1 ? this.reminderTime = 60 : this.reminderTime = 1, this.setReminderTimeMinuteOptions(), this.reminderTimeMinutes = this.reminderTime * this.reminderTimeincrement, this.internals.setFormValue(this.reminderTimeMinutes.toString(), this.name);
23430
+ this.reminderTimeincrement = parseInt(ge), this.reminderTimeincrement === 1 ? this.reminderTime = 60 : this.reminderTime = 1, this.setReminderTimeMinuteOptions(), this.reminderTimeMinutes = this.reminderTime * this.reminderTimeincrement, this.isInternalsAvailable && this.internals.setFormValue(this.reminderTimeMinutes.toString(), this.name);
23416
23431
  }
23417
23432
  inputOptionChangedHandler(ue) {
23418
23433
  debug("nylas-calendar-picker", "inputOptionChangedHandler", ue.detail);
23419
23434
  const { value: ge } = ue.detail;
23420
- this.reminderTime = ge, this.reminderTimeMinutes = this.reminderTime * this.reminderTimeincrement, this.internals.setFormValue(this.reminderTimeMinutes.toString(), this.name);
23435
+ this.reminderTime = ge, this.reminderTimeMinutes = this.reminderTime * this.reminderTimeincrement, this.isInternalsAvailable && this.internals.setFormValue(this.reminderTimeMinutes.toString(), this.name);
23421
23436
  }
23422
23437
  render() {
23423
- const ue = [
23424
- { value: 1, label: "minute" },
23425
- { value: 60, label: "hour" },
23426
- { value: 1440, label: "day" }
23427
- ];
23428
- return h$2(Host, { key: "d5f118391bdd7e4779f6eca15335285047fdb350" }, h$2("div", { key: "2dd8d3ba52d4f95480c9cf1fdaf5d0f1f7c1e523", class: "nylas-reminder-time", part: "nrt" }, h$2("div", { key: "3799c4b266f4078e22ad78b86225ef9abdc5fa49", class: "nylas-reminder-time__wrapper" }, h$2("input-dropdown", { key: "004b6336c041660e1424ac44f16e82c8a5a2ca53", name: "reminder-time", options: this.reminderTimeMinutesOptions, inputValue: this.reminderTime.toString(), exportparts: "id_dropdown: nrt__input_dropdown, id_dropdown-input: nrt__input_dropdown-input, id_dropdown-content: nrt__input_dropdown-content", defaultInputOption: this.reminderTimeMinutesOptions.find((ge) => ge.value == this.reminderTime) ?? ue[0] }), h$2("select-dropdown", { key: "6a42c7f4633d89dd9a94d3c2f119e151613667ec", name: "reminder-time-unit", options: ue, pluralizedLabel: this.reminderTime > 1 ? "s" : "", exportparts: "sd_dropdown: nrt__dropdown, sd_dropdown-button: nrt__dropdown-button, sd_dropdown-content: nrt__dropdown-content", defaultSelectedOption: ue.find((ge) => ge.value == this.reminderTimeincrement) ?? ue[0], withSearch: !1 }))));
23438
+ return h$2(Host, { key: "b089eb10d76d001112d867a61889a685b8908355" }, h$2("div", { key: "13b8479fb822135c00ff8f97974c8269731b2a84", class: "nylas-reminder-time", part: "nrt" }, h$2("div", { key: "728e90c61077b1037aa285329f11a09a296b33b4", class: "nylas-reminder-time__wrapper" }, h$2("input-dropdown", { key: "40a22b75424d4b3b552a2dc1b60e79a8cb595032", name: "reminder-time", options: this.reminderTimeMinutesOptions, inputValue: this.reminderTime.toString(), exportparts: "id_dropdown: nrt__input_dropdown, id_dropdown-input: nrt__input_dropdown-input, id_dropdown-content: nrt__input_dropdown-content", defaultInputOption: this.reminderTimeMinutesOptions.find((ue) => ue.value == this.reminderTime) ?? reminderTimeOptions[0] }), h$2("select-dropdown", { key: "6128bb953b883be5341ba005438ab353b0016c48", name: "reminder-time-unit", options: [...reminderTimeOptions].sort((ue, ge) => ue.value - ge.value), pluralizedLabel: this.reminderTime > 1 ? "s" : "", exportparts: "sd_dropdown: nrt__dropdown, sd_dropdown-button: nrt__dropdown-button, sd_dropdown-content: nrt__dropdown-content", defaultSelectedOption: reminderTimeOptions.find((ue) => ue.value == this.reminderTimeincrement) ?? reminderTimeOptions[0], withSearch: !1 }))));
23429
23439
  }
23430
23440
  static get formAssociated() {
23431
23441
  return !0;
@@ -23436,7 +23446,6 @@ const NylasReminderTime = proxyCustomElement(class extends H$2 {
23436
23446
  static get watchers() {
23437
23447
  return {
23438
23448
  name: ["elementNameChangedHandler"],
23439
- eventReminderTimeMinutes: ["eventReminderTimeMinutesChangedHandler"],
23440
23449
  reminderTimeMinutes: ["reminderTimeMinutesChangedHandler"]
23441
23450
  };
23442
23451
  }
@@ -23452,7 +23461,6 @@ const NylasReminderTime = proxyCustomElement(class extends H$2 {
23452
23461
  reminderTimeMinutesOptions: [32]
23453
23462
  }, [[0, "nylasFormDropdownChanged", "nylasFormDropdownChangedHandler"], [0, "inputOptionChanged", "inputOptionChangedHandler"]], {
23454
23463
  name: ["elementNameChangedHandler"],
23455
- eventReminderTimeMinutes: ["eventReminderTimeMinutesChangedHandler"],
23456
23464
  reminderTimeMinutes: ["reminderTimeMinutesChangedHandler"]
23457
23465
  }]);
23458
23466
  __decorate$5([
@@ -28470,7 +28478,7 @@ const buildFeedbackIntegration = ({
28470
28478
  onSubmitError: Di,
28471
28479
  onFormSubmitted: Mi
28472
28480
  } = {}) => {
28473
- const Oi = {
28481
+ const Ri = {
28474
28482
  id: Ke,
28475
28483
  autoInject: vt,
28476
28484
  showBranding: ln,
@@ -28508,13 +28516,13 @@ const buildFeedbackIntegration = ({
28508
28516
  onSubmitSuccess: Ii,
28509
28517
  onFormSubmitted: Mi
28510
28518
  };
28511
- let Ri = null, Ui = [];
28519
+ let Oi = null, Ui = [];
28512
28520
  const ji = (Bi) => {
28513
- if (!Ri) {
28521
+ if (!Oi) {
28514
28522
  const Li = DOCUMENT.createElement("div");
28515
- Li.id = String(Bi.id), DOCUMENT.body.appendChild(Li), Ri = Li.attachShadow({ mode: "open" }), Ri.appendChild(createMainStyles(Bi));
28523
+ Li.id = String(Bi.id), DOCUMENT.body.appendChild(Li), Oi = Li.attachShadow({ mode: "open" }), Oi.appendChild(createMainStyles(Bi));
28516
28524
  }
28517
- return Ri;
28525
+ return Oi;
28518
28526
  }, Fi = async (Bi, Li, Wi) => {
28519
28527
  const Hi = getClient(), zi = Hi && Hi.getIntegrationByName(Bi);
28520
28528
  if (zi)
@@ -28551,7 +28559,7 @@ const buildFeedbackIntegration = ({
28551
28559
  });
28552
28560
  return zi;
28553
28561
  }, qi = (Bi, Li = {}) => {
28554
- const Wi = mergeOptions(Oi, Li), Hi = typeof Bi == "string" ? DOCUMENT.querySelector(Bi) : typeof Bi.addEventListener == "function" ? Bi : null;
28562
+ const Wi = mergeOptions(Ri, Li), Hi = typeof Bi == "string" ? DOCUMENT.querySelector(Bi) : typeof Bi.addEventListener == "function" ? Bi : null;
28555
28563
  if (!Hi)
28556
28564
  throw DEBUG_BUILD && logger.error("[Feedback] Unable to attach to target element"), new Error("Unable to attach to target element");
28557
28565
  let zi = null;
@@ -28569,7 +28577,7 @@ const buildFeedbackIntegration = ({
28569
28577
  };
28570
28578
  return Ui.push(Ki), Ki;
28571
28579
  }, Gi = (Bi = {}) => {
28572
- const Li = mergeOptions(Oi, Bi), Wi = ji(Li), Hi = Actor({
28580
+ const Li = mergeOptions(Ri, Bi), Wi = ji(Li), Hi = Actor({
28573
28581
  triggerLabel: Li.triggerLabel,
28574
28582
  triggerAriaLabel: Li.triggerAriaLabel,
28575
28583
  shadow: Wi,
@@ -28591,7 +28599,7 @@ const buildFeedbackIntegration = ({
28591
28599
  return {
28592
28600
  name: "Feedback",
28593
28601
  setupOnce() {
28594
- !isBrowser() || !Oi.autoInject || (DOCUMENT.readyState === "loading" ? DOCUMENT.addEventListener("DOMContentLoaded", () => Gi().appendToDom()) : Gi().appendToDom());
28602
+ !isBrowser() || !Ri.autoInject || (DOCUMENT.readyState === "loading" ? DOCUMENT.addEventListener("DOMContentLoaded", () => Gi().appendToDom()) : Gi().appendToDom());
28595
28603
  },
28596
28604
  /**
28597
28605
  * Adds click listener to the element to open a feedback dialog
@@ -28604,7 +28612,7 @@ const buildFeedbackIntegration = ({
28604
28612
  * Accepts partial options to override any options passed to constructor.
28605
28613
  */
28606
28614
  createWidget(Bi = {}) {
28607
- const Li = Gi(mergeOptions(Oi, Bi));
28615
+ const Li = Gi(mergeOptions(Ri, Bi));
28608
28616
  return Li.appendToDom(), Li;
28609
28617
  },
28610
28618
  /**
@@ -28612,13 +28620,13 @@ const buildFeedbackIntegration = ({
28612
28620
  * Accepts partial options to override any options passed to constructor.
28613
28621
  */
28614
28622
  async createForm(Bi = {}) {
28615
- return Ni(mergeOptions(Oi, Bi));
28623
+ return Ni(mergeOptions(Ri, Bi));
28616
28624
  },
28617
28625
  /**
28618
28626
  * Removes the Feedback integration (including host, shadow DOM, and all widgets)
28619
28627
  */
28620
28628
  remove() {
28621
- Ri && (Ri.parentElement && Ri.parentElement.remove(), Ri = null), Ui.forEach((Bi) => Bi()), Ui = [];
28629
+ Oi && (Oi.parentElement && Oi.parentElement.remove(), Oi = null), Ui.forEach((Bi) => Bi()), Ui = [];
28622
28630
  }
28623
28631
  };
28624
28632
  };
@@ -30312,17 +30320,17 @@ const NylasEditorTabs = proxyCustomElement(class extends H$2 {
30312
30320
  confirmation_redirect_url: _i
30313
30321
  },
30314
30322
  appearance: Ei
30315
- }, Oi = mergeDeep(Mi, this.selectedConfiguration || {}), Ri = this.action === "create" ? Oi : Mi;
30316
- this.isConfigRoundRobin(Ri) && (Ri.participants = Ri.participants.map((Pi) => ({ ...Pi, is_organizer: void 0 })));
30323
+ }, Ri = mergeDeep(Mi, this.selectedConfiguration || {}), Oi = this.action === "create" ? Ri : Mi;
30324
+ this.isConfigRoundRobin(Oi) && (Oi.participants = Oi.participants.map((Pi) => ({ ...Pi, is_organizer: void 0 })));
30317
30325
  const Ui = (Pi) => {
30318
30326
  this.isLoading = !1, this.changesSaved = !0, setTimeout(() => {
30319
30327
  this.changesSaved = !1;
30320
30328
  }, 5e3);
30321
- }, ji = this.checkForBookingFormErrors(Ri), Fi = ((Yr = this.configurations) == null ? void 0 : Yr.find((Pi) => {
30329
+ }, ji = this.checkForBookingFormErrors(Oi), Fi = ((Yr = this.configurations) == null ? void 0 : Yr.find((Pi) => {
30322
30330
  var Zi;
30323
30331
  return Pi.id === ((Zi = this.selectedConfiguration) == null ? void 0 : Zi.id);
30324
- })) || {}, Ni = this.checkForOrganizerConfirmationError(mergeDeep(Ri, Fi));
30325
- ji || Ni || this.schedulerConfigChanged.emit({ config: Ri, resetLoadingState: Ui, setError: this.setError, action: this.action });
30332
+ })) || {}, Ni = this.checkForOrganizerConfirmationError(mergeDeep(Oi, Fi));
30333
+ ji || Ni || this.schedulerConfigChanged.emit({ config: Oi, resetLoadingState: Ui, setError: this.setError, action: this.action });
30326
30334
  }, this.isConfigRoundRobin = (ue) => {
30327
30335
  var ge, Oe, Ke, vt;
30328
30336
  return ((Oe = (ge = ue == null ? void 0 : ue.availability) == null ? void 0 : ge.availability_rules) == null ? void 0 : Oe.availability_method) === "max-availability" || ((vt = (Ke = ue.availability) == null ? void 0 : Ke.availability_rules) == null ? void 0 : vt.availability_method) === "max-fairness";
@@ -30453,8 +30461,8 @@ const NylasEditorTabs = proxyCustomElement(class extends H$2 {
30453
30461
  hideCancellationOptions: ((vi = ue == null ? void 0 : ue.scheduler) == null ? void 0 : vi.hide_cancellation_options) ?? !1,
30454
30462
  hideReschedulingOptions: ((fi = ue == null ? void 0 : ue.scheduler) == null ? void 0 : fi.hide_rescheduling_options) ?? !1,
30455
30463
  participantBookingCalendars: ((Ei = ue == null ? void 0 : ue.participants) == null ? void 0 : Ei.reduce((Ii, Di) => {
30456
- var Mi, Oi;
30457
- return (Mi = Di.booking) != null && Mi.calendar_id && (Ii[Di.email] = (Oi = Di.booking) == null ? void 0 : Oi.calendar_id), Ii;
30464
+ var Mi, Ri;
30465
+ return (Mi = Di.booking) != null && Mi.calendar_id && (Ii[Di.email] = (Ri = Di.booking) == null ? void 0 : Ri.calendar_id), Ii;
30458
30466
  })) ?? {},
30459
30467
  participantCalendars: ((gi = ue == null ? void 0 : ue.participants) == null ? void 0 : gi.reduce((Ii, Di) => {
30460
30468
  var Mi;