@nylas/react 1.0.2-canary.2 → 1.1.0-canary.3

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 (129) hide show
  1. package/dist/add-circle-icon_22.entry-8d0ac489.cjs +1 -0
  2. package/dist/{add-circle-icon_18.entry-f86ae88d.js → add-circle-icon_22.entry-da31fa71.js} +627 -421
  3. package/dist/{archive-icon_7.entry-052ac074.cjs → archive-icon_7.entry-7aad8104.cjs} +1 -1
  4. package/dist/{archive-icon_7.entry-0e34d6e7.js → archive-icon_7.entry-bc2418f7.js} +20 -20
  5. package/dist/{arrow-icon.entry-93f21385.cjs → arrow-icon.entry-6eba68a9.cjs} +1 -1
  6. package/dist/arrow-icon.entry-9a932082.js +15 -0
  7. package/dist/{bold-icon_3.entry-88ce1d25.js → bold-icon_3.entry-5f7e3755.js} +8 -8
  8. package/dist/bold-icon_3.entry-db17d481.cjs +1 -0
  9. package/dist/{calendar-cancel-icon.entry-e9c692fa.js → calendar-cancel-icon.entry-1ff7845a.js} +5 -5
  10. package/dist/{calendar-cancel-icon.entry-574c8aa4.cjs → calendar-cancel-icon.entry-a5141f82.cjs} +1 -1
  11. package/dist/{calendar-check-icon_2.entry-b0476bca.cjs → calendar-check-icon_2.entry-c3add652.cjs} +1 -1
  12. package/dist/{calendar-check-icon_2.entry-d461c713.js → calendar-check-icon_2.entry-d7421059.js} +6 -6
  13. package/dist/{calendar-icon.entry-1ca202a4.js → calendar-icon.entry-4458997f.js} +5 -5
  14. package/dist/{calendar-icon.entry-98936e6d.cjs → calendar-icon.entry-445d624a.cjs} +1 -1
  15. package/dist/chevron-icon_3.entry-8961e6bb.cjs +1 -0
  16. package/dist/chevron-icon_3.entry-f7f3d487.js +117 -0
  17. package/dist/close-icon.entry-6dd5ff0a.js +15 -0
  18. package/dist/close-icon.entry-ebc527c5.cjs +1 -0
  19. package/dist/{constants-b6bf6671-49a0f1f2.js → constants-6ee60d6d-4cd16450.js} +1 -1
  20. package/dist/{constants-b6bf6671-27e2557d.cjs → constants-6ee60d6d-6c0540db.cjs} +1 -1
  21. package/dist/document-refresh-icon.entry-298b2133.cjs +1 -0
  22. package/dist/{document-refresh-icon.entry-faea08ce.js → document-refresh-icon.entry-bdc323b5.js} +5 -5
  23. package/dist/elements/index.d.ts +7 -0
  24. package/dist/{forward-icon_6.entry-c4b37cb1.cjs → forward-icon_6.entry-15208ea9.cjs} +2 -2
  25. package/dist/{forward-icon_6.entry-8da1f65d.js → forward-icon_6.entry-62759373.js} +63 -63
  26. package/dist/{globe-icon.entry-4720304b.js → globe-icon.entry-9e082178.js} +2 -2
  27. package/dist/{globe-icon.entry-90a0b9c9.cjs → globe-icon.entry-c8302bf5.cjs} +1 -1
  28. package/dist/google-logo-icon_3.entry-0c095209.js +258 -0
  29. package/dist/google-logo-icon_3.entry-f8433ff9.cjs +1 -0
  30. package/dist/index-0f3bd8df.js +1824 -0
  31. package/dist/index-7a55dc33.cjs +30 -0
  32. package/dist/index.d.ts +4 -2
  33. package/dist/index.es-2578c6a5-098d48d0.cjs +7 -0
  34. package/dist/{index-10914bc1-346f04fa.js → index.es-2578c6a5-71441142.js} +833 -933
  35. package/dist/{info-icon_2.entry-9307db18.js → info-icon_2.entry-73106882.js} +5 -5
  36. package/dist/{info-icon_2.entry-81e95048.cjs → info-icon_2.entry-ca224a3b.cjs} +1 -1
  37. package/dist/loading-icon.entry-012644b7.js +15 -0
  38. package/dist/loading-icon.entry-f9f5e66f.cjs +1 -0
  39. package/dist/mailbox-store-bb21512c-045c3ea0.cjs +1 -0
  40. package/dist/{mailbox-store-e721b17c-cf9a43dd.js → mailbox-store-bb21512c-615660ef.js} +125 -62
  41. package/dist/nylas-additional-participants.entry-a50ef8e2.cjs +1 -0
  42. package/dist/{nylas-additional-participants.entry-1653dec7.js → nylas-additional-participants.entry-db85836a.js} +13 -13
  43. package/dist/{nylas-booked-event-card_10.entry-aa971e8a.js → nylas-booked-event-card_10.entry-b49b2369.js} +26 -26
  44. package/dist/nylas-booked-event-card_10.entry-fccb783c.cjs +1 -0
  45. package/dist/nylas-form-card.entry-090a4d3b.js +56 -0
  46. package/dist/nylas-form-card.entry-f5230005.cjs +1 -0
  47. package/dist/nylas-if-state.entry-7924dde0.js +96 -0
  48. package/dist/nylas-if-state.entry-ff9c9a85.cjs +1 -0
  49. package/dist/{nylas-list-folders.entry-995fa819.js → nylas-list-folders.entry-9dd96530.js} +4 -4
  50. package/dist/{nylas-list-folders.entry-3b24d92d.cjs → nylas-list-folders.entry-dbfc2cf8.cjs} +1 -1
  51. package/dist/{nylas-list-threads.entry-fda42ded.cjs → nylas-list-threads.entry-6bcc0328.cjs} +1 -1
  52. package/dist/{nylas-list-threads.entry-21466eb3.js → nylas-list-threads.entry-b435eaae.js} +6 -6
  53. package/dist/nylas-login.entry-1623d309.cjs +1 -0
  54. package/dist/nylas-login.entry-97350c76.js +75 -0
  55. package/dist/{nylas-mailbox-pagination.entry-9dcd4901.cjs → nylas-mailbox-pagination.entry-1776eb16.cjs} +1 -1
  56. package/dist/{nylas-mailbox-pagination.entry-02d40186.js → nylas-mailbox-pagination.entry-ceef8be2.js} +3 -3
  57. package/dist/{nylas-mailbox-toolbar-button.entry-d1099fab.cjs → nylas-mailbox-toolbar-button.entry-7d3f79b9.cjs} +1 -1
  58. package/dist/{nylas-mailbox-toolbar-button.entry-dbad44b4.js → nylas-mailbox-toolbar-button.entry-e6b3d3a4.js} +10 -10
  59. package/dist/nylas-mailbox.entry-06d8014a.js +136 -0
  60. package/dist/nylas-mailbox.entry-ae8da6ff.cjs +1 -0
  61. package/dist/{nylas-provider.entry-bbee8c99.js → nylas-provider.entry-8b9c2b69.js} +50 -58
  62. package/dist/nylas-provider.entry-97c9e272.cjs +1 -0
  63. package/dist/nylas-scheduler-editor.entry-c3791787.js +2181 -0
  64. package/dist/nylas-scheduler-editor.entry-f6cf1cd9.cjs +7 -0
  65. package/dist/nylas-scheduling.entry-08ae840a.cjs +1 -0
  66. package/dist/{nylas-scheduling.entry-22b5ad07.js → nylas-scheduling.entry-6380509a.js} +39 -38
  67. package/dist/{nylas-threads-refresh.entry-05258b36.cjs → nylas-threads-refresh.entry-246e6d77.cjs} +1 -1
  68. package/dist/{nylas-threads-refresh.entry-414d8740.js → nylas-threads-refresh.entry-eaee86fb.js} +5 -5
  69. package/dist/nylas-threads-search.entry-42a2acb1.cjs +1 -0
  70. package/dist/{nylas-threads-search.entry-a19dc90f.js → nylas-threads-search.entry-7e12758e.js} +7 -7
  71. package/dist/{nylas-view-thread.entry-5da81e99.cjs → nylas-view-thread.entry-78e6927a.cjs} +1 -1
  72. package/dist/{nylas-view-thread.entry-38149162.js → nylas-view-thread.entry-b936e76a.js} +4 -4
  73. package/dist/{people-icon.entry-5c244c8d.js → people-icon.entry-5c8ee696.js} +5 -5
  74. package/dist/{people-icon.entry-4b682757.cjs → people-icon.entry-bcf848c0.cjs} +1 -1
  75. package/dist/play-icon_2.entry-356e63cc.js +25 -0
  76. package/dist/play-icon_2.entry-92e78f1b.cjs +1 -0
  77. package/dist/react.cjs +1 -1
  78. package/dist/react.js +84 -75
  79. package/dist/{refresh-icon.entry-63456c9a.js → refresh-icon.entry-77f0c377.js} +2 -2
  80. package/dist/{refresh-icon.entry-59fff3d4.cjs → refresh-icon.entry-bec053b6.cjs} +1 -1
  81. package/dist/{register-component-d056a880-f3003d6c.js → register-component-dc659dc3-0fdb18dc.js} +2 -2
  82. package/dist/{register-component-d056a880-2be11c56.cjs → register-component-dc659dc3-f58bf25b.cjs} +1 -1
  83. package/dist/scheduler-config-store-51ee4f42-ce3a9b0e.cjs +1 -0
  84. package/dist/scheduler-config-store-51ee4f42-e02895da.js +14 -0
  85. package/dist/{scheduler-store-0fbe642c-14466305.js → scheduler-store-72116723-3ba2480c.js} +3 -2
  86. package/dist/scheduler-store-72116723-db9d91f6.cjs +1 -0
  87. package/dist/time-period-selector.entry-decd251b.js +78 -0
  88. package/dist/time-period-selector.entry-f25fad77.cjs +1 -0
  89. package/dist/{translate-icon.entry-35999e70.js → translate-icon.entry-cac02c46.js} +2 -2
  90. package/dist/{translate-icon.entry-1784c18e.cjs → translate-icon.entry-dd5b707c.cjs} +1 -1
  91. package/dist/{warning-icon.entry-73de08c3.js → warning-icon.entry-370b9cf0.js} +4 -4
  92. package/dist/{warning-icon.entry-3a702d1d.cjs → warning-icon.entry-8af8a742.cjs} +1 -1
  93. package/package.json +3 -3
  94. package/dist/add-circle-icon_18.entry-b66b6343.cjs +0 -1
  95. package/dist/arrow-icon.entry-2afd9ea9.js +0 -15
  96. package/dist/auth-store-69ac49c7-5a0bbb90.cjs +0 -1
  97. package/dist/auth-store-69ac49c7-cbfda055.js +0 -66
  98. package/dist/bold-icon_3.entry-8f55a9e7.cjs +0 -1
  99. package/dist/chevron-icon_3.entry-830f52c2.js +0 -105
  100. package/dist/chevron-icon_3.entry-f7801467.cjs +0 -1
  101. package/dist/close-icon.entry-37e8361f.js +0 -15
  102. package/dist/close-icon.entry-8d6e9816.cjs +0 -1
  103. package/dist/document-refresh-icon.entry-fcb33921.cjs +0 -1
  104. package/dist/index-10914bc1-c8c3a2f3.cjs +0 -7
  105. package/dist/index-457dcf0b.cjs +0 -30
  106. package/dist/index-ce40ad47.js +0 -1570
  107. package/dist/loading-icon.entry-06d37ef0.cjs +0 -1
  108. package/dist/loading-icon.entry-dc518df4.js +0 -15
  109. package/dist/mailbox-store-e721b17c-4e97e07d.cjs +0 -1
  110. package/dist/nylas-additional-participants.entry-ff8bf378.cjs +0 -1
  111. package/dist/nylas-booked-event-card_10.entry-06bc3c51.cjs +0 -1
  112. package/dist/nylas-editor-tabs.entry-49b5a3ab.cjs +0 -1
  113. package/dist/nylas-editor-tabs.entry-9d0959bf.js +0 -181
  114. package/dist/nylas-form-card.entry-69d2095b.cjs +0 -1
  115. package/dist/nylas-form-card.entry-c4e78f88.js +0 -56
  116. package/dist/nylas-if-state_3.entry-2eb3f385.js +0 -293
  117. package/dist/nylas-if-state_3.entry-5baf6d6f.cjs +0 -1
  118. package/dist/nylas-provider.entry-78e2fa30.cjs +0 -1
  119. package/dist/nylas-scheduler-editor.entry-550d3c59.cjs +0 -1
  120. package/dist/nylas-scheduler-editor.entry-8f7ecf3b.js +0 -111
  121. package/dist/nylas-scheduling.entry-30a63738.cjs +0 -1
  122. package/dist/nylas-threads-search.entry-ff21fc65.cjs +0 -1
  123. package/dist/play-icon_2.entry-ccdc6b9c.cjs +0 -1
  124. package/dist/play-icon_2.entry-f36d6d55.js +0 -25
  125. package/dist/scheduler-config-store-4d035001-0256b40c.cjs +0 -1
  126. package/dist/scheduler-config-store-4d035001-db9dc78a.js +0 -33
  127. package/dist/scheduler-store-0fbe642c-410fdbf4.cjs +0 -1
  128. /package/dist/{utils-0cd66d04-89ab163d.js → utils-c00bdc3c-89ab163d.js} +0 -0
  129. /package/dist/{utils-0cd66d04-94b9c3b6.cjs → utils-c00bdc3c-94b9c3b6.cjs} +0 -0
@@ -1,18 +1,18 @@
1
- import { r as e, h as o, g as n } from "./index-ce40ad47.js";
1
+ import { r as o, h as e, g as n } from "./index-0f3bd8df.js";
2
2
  import "react";
3
3
  import "react-dom";
4
4
  const a = ".sc-info-icon-h{display:flex}", i = a, s = class {
5
5
  constructor(t) {
6
- e(this, t), this.width = "14", this.height = "14";
6
+ o(this, t), this.width = "14", this.height = "14";
7
7
  }
8
8
  render() {
9
- return o("svg", { key: "f53c8bccce25f788d59548b73637616b8f680fd5", width: this.width, height: this.height, fill: "none", xmlns: "http://www.w3.org/2000/svg" }, o("path", { key: "6bdf7329b72807db1901acd6552b8779d0c05d14", fill: "currentColor", d: "M6.5 5.5C6.77614 5.5 7 5.72386 7 6V9C7 9.27614 6.77614 9.5 6.5 9.5C6.22386 9.5 6 9.27614 6 9V6C6 5.72386 6.22386 5.5 6.5 5.5ZM6.50001 4.74907C6.91369 4.74907 7.24905 4.41371 7.24905 4.00003C7.24905 3.58635 6.91369 3.251 6.50001 3.251C6.08633 3.251 5.75098 3.58635 5.75098 4.00003C5.75098 4.41371 6.08633 4.74907 6.50001 4.74907ZM0.5 6.5C0.5 3.18629 3.18629 0.5 6.5 0.5C9.81371 0.5 12.5 3.18629 12.5 6.5C12.5 9.81371 9.81371 12.5 6.5 12.5C3.18629 12.5 0.5 9.81371 0.5 6.5ZM6.5 1.5C3.73858 1.5 1.5 3.73858 1.5 6.5C1.5 9.26142 3.73858 11.5 6.5 11.5C9.26142 11.5 11.5 9.26142 11.5 6.5C11.5 3.73858 9.26142 1.5 6.5 1.5Z" }));
9
+ return e("svg", { key: "e1d319caa7a1d93ea2a59f99f2044a4bc30a3409", width: this.width, height: this.height, fill: "none", xmlns: "http://www.w3.org/2000/svg" }, e("path", { key: "d8c9ca0f1a714a817bd1c83e1cab99c6d92e83bb", fill: "currentColor", d: "M6.5 5.5C6.77614 5.5 7 5.72386 7 6V9C7 9.27614 6.77614 9.5 6.5 9.5C6.22386 9.5 6 9.27614 6 9V6C6 5.72386 6.22386 5.5 6.5 5.5ZM6.50001 4.74907C6.91369 4.74907 7.24905 4.41371 7.24905 4.00003C7.24905 3.58635 6.91369 3.251 6.50001 3.251C6.08633 3.251 5.75098 3.58635 5.75098 4.00003C5.75098 4.41371 6.08633 4.74907 6.50001 4.74907ZM0.5 6.5C0.5 3.18629 3.18629 0.5 6.5 0.5C9.81371 0.5 12.5 3.18629 12.5 6.5C12.5 9.81371 9.81371 12.5 6.5 12.5C3.18629 12.5 0.5 9.81371 0.5 6.5ZM6.5 1.5C3.73858 1.5 1.5 3.73858 1.5 6.5C1.5 9.26142 3.73858 11.5 6.5 11.5C9.26142 11.5 11.5 9.26142 11.5 6.5C11.5 3.73858 9.26142 1.5 6.5 1.5Z" }));
10
10
  }
11
11
  };
12
12
  s.style = i;
13
13
  const r = '.tooltip-container{position:relative;display:flex;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif}.tooltip-content{visibility:hidden;background-color:var(--nylas-base-800);color:var(--nylas-base-0);text-align:left;border-radius:6px;padding:5px 0;position:absolute;z-index:1;opacity:0;transition:opacity 0.3s;padding:0.5rem 1rem;max-width:200px;width:max-content}.tooltip-content.top{bottom:0;left:0;margin-bottom:1.25rem;transform:translateX(-50%)}.tooltip-content.right{top:50%;left:0%;margin-left:1.25rem;transform:translateY(-50%)}.tooltip-content.bottom{top:0;left:0;margin-top:1.25rem;transform:translateX(-50%)}.tooltip-content.left{top:50%;right:0%;margin-right:1.25rem;transform:translateY(-50%)}.tooltip-container:hover .tooltip-content,.tooltip-container:focus-within .tooltip-content{visibility:visible;opacity:1}.tooltip-content::after{content:"";position:absolute;top:-0.75rem;left:50%;transform:rotate(180deg);border-width:6px;border-style:solid;border-color:black transparent transparent transparent}.tooltip-content.top::after{top:100%;left:50%;transform:rotate(0deg)}.tooltip-content.bottom::after{top:-0.75rem;left:50%;transform:rotate(180deg)}.tooltip-content.left::after{top:47.5%;left:100%;transform:rotate(270deg)}.tooltip-content.right::after{top:47.5%;left:-0.75rem;transform:rotate(90deg)}', l = r, c = class {
14
14
  constructor(t) {
15
- e(this, t), this.position = "bottom";
15
+ o(this, t), this.position = "bottom";
16
16
  }
17
17
  showTooltip(t) {
18
18
  t.target.nextElementSibling.style.visibility = "visible", t.target.nextElementSibling.style.opacity = "1";
@@ -21,7 +21,7 @@ const r = '.tooltip-container{position:relative;display:flex;--nylas-primary:#25
21
21
  t.target.nextElementSibling.style.visibility = "hidden", t.target.nextElementSibling.style.opacity = "0";
22
22
  }
23
23
  render() {
24
- return o("div", { key: "46a9b12ea82e91115247b73a9a9533e5c0e147f6", class: "tooltip-container" }, o("span", { key: "dbc4f00337ac428733b2f16b853aab46df850a5a", class: "info-icon", tabindex: "0", onFocus: this.showTooltip.bind(this), onBlur: this.hideTooltip.bind(this) }, o("slot", { key: "599c7a8691a185424981d79c10af3d16b643c4ca", name: "tooltip-icon" }, "i")), o("span", { key: "0ddd2b67fbb31b934a1b114c439fa71297653a25", class: `tooltip-content ${this.position}` }, o("slot", { key: "35057ecec77ae5bf60ab64c661d442ec759b7c00", name: "tooltip-content" }, "This is a help text.")));
24
+ return e("div", { key: "1ba151bd1d0f2c80cc641832c986bab321accade", class: "tooltip-container" }, e("span", { key: "7d432bbaa90b5e9aee4f1d8cae36e97bad47bc9e", class: "info-icon", tabindex: "0", onFocus: this.showTooltip.bind(this), onBlur: this.hideTooltip.bind(this) }, e("slot", { key: "4f5014e68d07d5e70a873b389ef84b290017a8cd", name: "tooltip-icon" }, "i")), e("span", { key: "8c903af137f14d51297e1ba212d6343d1ba0f2e5", class: `tooltip-content ${this.position}` }, e("slot", { key: "aa87ef75acc364a667d3a5139e9683f404646e51", name: "tooltip-content" }, "This is a help text.")));
25
25
  }
26
26
  get el() {
27
27
  return n(this);
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index-457dcf0b.cjs");require("react");require("react-dom");const i=".sc-info-icon-h{display:flex}",a=i,o=class{constructor(e){t.registerInstance(this,e),this.width="14",this.height="14"}render(){return t.h("svg",{key:"f53c8bccce25f788d59548b73637616b8f680fd5",width:this.width,height:this.height,fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.h("path",{key:"6bdf7329b72807db1901acd6552b8779d0c05d14",fill:"currentColor",d:"M6.5 5.5C6.77614 5.5 7 5.72386 7 6V9C7 9.27614 6.77614 9.5 6.5 9.5C6.22386 9.5 6 9.27614 6 9V6C6 5.72386 6.22386 5.5 6.5 5.5ZM6.50001 4.74907C6.91369 4.74907 7.24905 4.41371 7.24905 4.00003C7.24905 3.58635 6.91369 3.251 6.50001 3.251C6.08633 3.251 5.75098 3.58635 5.75098 4.00003C5.75098 4.41371 6.08633 4.74907 6.50001 4.74907ZM0.5 6.5C0.5 3.18629 3.18629 0.5 6.5 0.5C9.81371 0.5 12.5 3.18629 12.5 6.5C12.5 9.81371 9.81371 12.5 6.5 12.5C3.18629 12.5 0.5 9.81371 0.5 6.5ZM6.5 1.5C3.73858 1.5 1.5 3.73858 1.5 6.5C1.5 9.26142 3.73858 11.5 6.5 11.5C9.26142 11.5 11.5 9.26142 11.5 6.5C11.5 3.73858 9.26142 1.5 6.5 1.5Z"}))}};o.style=a;const s='.tooltip-container{position:relative;display:flex;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif}.tooltip-content{visibility:hidden;background-color:var(--nylas-base-800);color:var(--nylas-base-0);text-align:left;border-radius:6px;padding:5px 0;position:absolute;z-index:1;opacity:0;transition:opacity 0.3s;padding:0.5rem 1rem;max-width:200px;width:max-content}.tooltip-content.top{bottom:0;left:0;margin-bottom:1.25rem;transform:translateX(-50%)}.tooltip-content.right{top:50%;left:0%;margin-left:1.25rem;transform:translateY(-50%)}.tooltip-content.bottom{top:0;left:0;margin-top:1.25rem;transform:translateX(-50%)}.tooltip-content.left{top:50%;right:0%;margin-right:1.25rem;transform:translateY(-50%)}.tooltip-container:hover .tooltip-content,.tooltip-container:focus-within .tooltip-content{visibility:visible;opacity:1}.tooltip-content::after{content:"";position:absolute;top:-0.75rem;left:50%;transform:rotate(180deg);border-width:6px;border-style:solid;border-color:black transparent transparent transparent}.tooltip-content.top::after{top:100%;left:50%;transform:rotate(0deg)}.tooltip-content.bottom::after{top:-0.75rem;left:50%;transform:rotate(180deg)}.tooltip-content.left::after{top:47.5%;left:100%;transform:rotate(270deg)}.tooltip-content.right::after{top:47.5%;left:-0.75rem;transform:rotate(90deg)}',r=s,n=class{constructor(e){t.registerInstance(this,e),this.position="bottom"}showTooltip(e){e.target.nextElementSibling.style.visibility="visible",e.target.nextElementSibling.style.opacity="1"}hideTooltip(e){e.target.nextElementSibling.style.visibility="hidden",e.target.nextElementSibling.style.opacity="0"}render(){return t.h("div",{key:"46a9b12ea82e91115247b73a9a9533e5c0e147f6",class:"tooltip-container"},t.h("span",{key:"dbc4f00337ac428733b2f16b853aab46df850a5a",class:"info-icon",tabindex:"0",onFocus:this.showTooltip.bind(this),onBlur:this.hideTooltip.bind(this)},t.h("slot",{key:"599c7a8691a185424981d79c10af3d16b643c4ca",name:"tooltip-icon"},"i")),t.h("span",{key:"0ddd2b67fbb31b934a1b114c439fa71297653a25",class:`tooltip-content ${this.position}`},t.h("slot",{key:"35057ecec77ae5bf60ab64c661d442ec759b7c00",name:"tooltip-content"},"This is a help text.")))}get el(){return t.getElement(this)}};n.style=r;exports.info_icon=o;exports.tooltip_component=n;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index-7a55dc33.cjs");require("react");require("react-dom");const a=".sc-info-icon-h{display:flex}",i=a,o=class{constructor(e){t.registerInstance(this,e),this.width="14",this.height="14"}render(){return t.h("svg",{key:"e1d319caa7a1d93ea2a59f99f2044a4bc30a3409",width:this.width,height:this.height,fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.h("path",{key:"d8c9ca0f1a714a817bd1c83e1cab99c6d92e83bb",fill:"currentColor",d:"M6.5 5.5C6.77614 5.5 7 5.72386 7 6V9C7 9.27614 6.77614 9.5 6.5 9.5C6.22386 9.5 6 9.27614 6 9V6C6 5.72386 6.22386 5.5 6.5 5.5ZM6.50001 4.74907C6.91369 4.74907 7.24905 4.41371 7.24905 4.00003C7.24905 3.58635 6.91369 3.251 6.50001 3.251C6.08633 3.251 5.75098 3.58635 5.75098 4.00003C5.75098 4.41371 6.08633 4.74907 6.50001 4.74907ZM0.5 6.5C0.5 3.18629 3.18629 0.5 6.5 0.5C9.81371 0.5 12.5 3.18629 12.5 6.5C12.5 9.81371 9.81371 12.5 6.5 12.5C3.18629 12.5 0.5 9.81371 0.5 6.5ZM6.5 1.5C3.73858 1.5 1.5 3.73858 1.5 6.5C1.5 9.26142 3.73858 11.5 6.5 11.5C9.26142 11.5 11.5 9.26142 11.5 6.5C11.5 3.73858 9.26142 1.5 6.5 1.5Z"}))}};o.style=i;const s='.tooltip-container{position:relative;display:flex;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif}.tooltip-content{visibility:hidden;background-color:var(--nylas-base-800);color:var(--nylas-base-0);text-align:left;border-radius:6px;padding:5px 0;position:absolute;z-index:1;opacity:0;transition:opacity 0.3s;padding:0.5rem 1rem;max-width:200px;width:max-content}.tooltip-content.top{bottom:0;left:0;margin-bottom:1.25rem;transform:translateX(-50%)}.tooltip-content.right{top:50%;left:0%;margin-left:1.25rem;transform:translateY(-50%)}.tooltip-content.bottom{top:0;left:0;margin-top:1.25rem;transform:translateX(-50%)}.tooltip-content.left{top:50%;right:0%;margin-right:1.25rem;transform:translateY(-50%)}.tooltip-container:hover .tooltip-content,.tooltip-container:focus-within .tooltip-content{visibility:visible;opacity:1}.tooltip-content::after{content:"";position:absolute;top:-0.75rem;left:50%;transform:rotate(180deg);border-width:6px;border-style:solid;border-color:black transparent transparent transparent}.tooltip-content.top::after{top:100%;left:50%;transform:rotate(0deg)}.tooltip-content.bottom::after{top:-0.75rem;left:50%;transform:rotate(180deg)}.tooltip-content.left::after{top:47.5%;left:100%;transform:rotate(270deg)}.tooltip-content.right::after{top:47.5%;left:-0.75rem;transform:rotate(90deg)}',r=s,n=class{constructor(e){t.registerInstance(this,e),this.position="bottom"}showTooltip(e){e.target.nextElementSibling.style.visibility="visible",e.target.nextElementSibling.style.opacity="1"}hideTooltip(e){e.target.nextElementSibling.style.visibility="hidden",e.target.nextElementSibling.style.opacity="0"}render(){return t.h("div",{key:"1ba151bd1d0f2c80cc641832c986bab321accade",class:"tooltip-container"},t.h("span",{key:"7d432bbaa90b5e9aee4f1d8cae36e97bad47bc9e",class:"info-icon",tabindex:"0",onFocus:this.showTooltip.bind(this),onBlur:this.hideTooltip.bind(this)},t.h("slot",{key:"4f5014e68d07d5e70a873b389ef84b290017a8cd",name:"tooltip-icon"},"i")),t.h("span",{key:"8c903af137f14d51297e1ba212d6343d1ba0f2e5",class:`tooltip-content ${this.position}`},t.h("slot",{key:"aa87ef75acc364a667d3a5139e9683f404646e51",name:"tooltip-content"},"This is a help text.")))}get el(){return t.getElement(this)}};n.style=r;exports.info_icon=o;exports.tooltip_component=n;
@@ -0,0 +1,15 @@
1
+ import { r as a, h as e } from "./index-0f3bd8df.js";
2
+ import "react";
3
+ import "react-dom";
4
+ const i = ".wave{display:flex;align-items:center;justify-content:center}.dot{width:4px;height:4px;background-color:var(--dot-color, white);border-radius:50%;margin:0 2px;animation:wave 1.5s infinite ease-in-out}.dot:nth-child(2){animation-delay:0.2s}.dot:nth-child(3){animation-delay:0.4s}@keyframes wave{0%,60%,100%{transform:translateY(0)}30%{transform:translateY(-4px)}}", n = i, o = class {
5
+ constructor(t) {
6
+ a(this, t), this.width = "15", this.height = "15";
7
+ }
8
+ render() {
9
+ return e("div", { key: "527c232e2da580a89745cd8e3b51466eeeee2470", class: "wave" }, e("div", { key: "a0299e733c420254c9ad8de27f63d83ded38424b", class: "dot" }), e("div", { key: "7b2cb22812150eab1f41c53808e5c927b91dc918", class: "dot" }), e("div", { key: "e8b2baa7ab5c445bc6e91b06b0193727d797a343", class: "dot" }));
10
+ }
11
+ };
12
+ o.style = n;
13
+ export {
14
+ o as loading_icon
15
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-7a55dc33.cjs");require("react");require("react-dom");const i=".wave{display:flex;align-items:center;justify-content:center}.dot{width:4px;height:4px;background-color:var(--dot-color, white);border-radius:50%;margin:0 2px;animation:wave 1.5s infinite ease-in-out}.dot:nth-child(2){animation-delay:0.2s}.dot:nth-child(3){animation-delay:0.4s}@keyframes wave{0%,60%,100%{transform:translateY(0)}30%{transform:translateY(-4px)}}",n=i,t=class{constructor(a){e.registerInstance(this,a),this.width="15",this.height="15"}render(){return e.h("div",{key:"527c232e2da580a89745cd8e3b51466eeeee2470",class:"wave"},e.h("div",{key:"a0299e733c420254c9ad8de27f63d83ded38424b",class:"dot"}),e.h("div",{key:"7b2cb22812150eab1f41c53808e5c927b91dc918",class:"dot"}),e.h("div",{key:"e8b2baa7ab5c445bc6e91b06b0193727d797a343",class:"dot"}))}};t.style=n;exports.loading_icon=t;
@@ -0,0 +1 @@
1
+ "use strict";const o=require("./utils-c00bdc3c-94b9c3b6.cjs"),i=require("./index.es-2578c6a5-098d48d0.cjs"),g=require("./index-7a55dc33.cjs");class f{constructor(t,e){this.nylasAuth=t,this.nylasAuthStore=e}async validateSession(){const t=await this.isAccessTokenValid();if(!t)this.logout();else{let e=await this.nylasAuth.getTokenInfo();if(e){const a=Math.floor(Date.now()/1e3);if(e.expires_in&&e.expires_in-a<3e5&&(o.debug("[NylasAuthConnectorMixin] Refreshing access token"),e=await this.nylasAuth.refreshAccessToken(),!e)){o.debug("[NylasAuthConnectorMixin] Token is expired and could not be refreshed. Logging out."),this.logout();return}this.nylasAuthStore.state.tokenInfo=e}}this.nylasAuthStore.state.isAuthenticated=t}async isAuthenticated(){return this.nylasAuth.isAuthenticated()}async getTokenInfo(){return this.nylasAuth.getTokenInfo()}async isAccessTokenValid(){return this.nylasAuth.isAccessTokenValid()}async logout(){await this.nylasAuth.logout()}async getHostedAuthRedirectURL(t,e,s){return this.nylasAuth.getHostedAuthRedirectURL(t,e,s)}async manageHostedAuthCodeExchange(t){const s=new URL(t).searchParams.get("code");if(s){const a=await this.nylasAuth.exchangeAuthCodeForTokenInfo(s);if(a)return this.nylasAuthStore.state.tokenInfo=a,this.nylasAuthStore.state.isAuthenticated=!0,a}return null}}class w{constructor(t,e,s){this.nylasAuth=t,this.nylasAuthStore=e,this.nylasMailboxStore=s}async getMessages(){var n;if(!this.nylasAuthStore.state.isAuthenticated)throw new Error("Not authenticated");if(!this.nylasAuth.hasScopeByType("email",["read-only","modify"]))throw new Error("Missing message:read-only scope");this.nylasMailboxStore.state.state="loading";const t=this.nylasMailboxStore.state.messgeQueryParams,e=new URLSearchParams;for(const h in t){const u=(n=t[h])==null?void 0:n.toString();u&&e.append(h,u)}const s=`/v3/grants/me/messages?${e.toString()}`,a=await this.nylasAuth.nylasAPIRequest(s);if(i.Xr(a))throw new i.Zr(a.error);const r=a.data;return this.nylasMailboxStore.state.messages=r,this.nylasMailboxStore.state.state="ready",r}async getThreadMessages(t){if(!this.nylasAuthStore.state.isAuthenticated)throw new Error("Not authenticated");if(!this.nylasAuth.hasScopeByType("email",["read-only","modify"]))throw new Error("Missing message:read-only scope");const e=await this.nylasAuth.nylasAPIRequest(`/v3/grants/me/messages?thread_id=${t}&fields=include_headers`);if(i.Xr(e))throw new i.Zr(e.error);const s=e.data;return this.nylasMailboxStore.state.messages=s,s}downloadMessageAttachments(t){if(!this.nylasAuthStore.state.isAuthenticated)throw new Error("Not authenticated");if(!this.nylasAuth.hasScopeByType("email",["read-only","modify"]))throw new Error("Missing message:read-only scope");const e=[],s=t.attachments||[];for(const a of s){const r=this.nylasAuth.nylasDownloadFileRequest(`/v3/grants/me/attachments/${a.id}?message_id=${t.id}`);e.push(r)}return e}async summarizeText(t){if(!this.nylasAuthStore.state.isAuthenticated)throw new Error("Not authenticated");if(!this.nylasAuth.hasScopeByType("email",["read-only","modify"]))throw new Error("Missing message:read-only scope");const e=await this.nylasAuth.nylasAPIRequest("/v3/grants/me/mailbox/summarize","POST",{message:{body:t}},!0,this.nylasAuth.config.elementsApiUri);if(i.Xr(e))throw new i.Zr(e.error);return e.data.summary}async textToSpeech(t,e){if(!this.nylasAuthStore.state.isAuthenticated)throw new Error("Not authenticated");if(!this.nylasAuth.hasScopeByType("email",["read-only","modify"]))throw new Error("Missing message:read-only scope");return this.nylasAuth.nylasAPIRequest("/v3/grants/me/mailbox/tts","POST",{text:t},!1,this.nylasAuth.config.elementsApiUri,{...e?{signal:e==null?void 0:e.signal}:{}})}}class m{constructor(t,e,s,a){this.nylasAuth=t,this.nylasAuthStore=e,this.nylasMailboxStore=s,this.router=a}async getThreads(t,e="overwrite",s=!0){var c;if(!this.nylasAuthStore.state.isAuthenticated)throw new Error("Not authenticated");if(!this.nylasAuth.hasScopeByType("email",["read-only","modify"]))throw new Error("Missing thread:read-only scope");s&&(this.nylasMailboxStore.state.state="loading");const a=t||this.nylasMailboxStore.state.threadsQueryParams,r=new URLSearchParams;for(const y in a){const d=(c=a[y])==null?void 0:c.toString();typeof d<"u"&&d!==null&&r.append(y,d)}a.search_query_native?this.router.navigate(`/?query=${a.search_query_native}`,!0):this.nylasMailboxStore.state.threadsQueryParams.search_query_native&&!a.search_query_native&&this.router.navigate("/",!0),a.page_token||(this.nylasMailboxStore.state.previousThreadPageTokens=[]),this.nylasMailboxStore.state.threadsQueryParams=a;const n=`/v3/grants/me/threads?${r.toString()}`,h=await this.nylasAuth.nylasAPIRequest(n);if(i.Xr(h))throw new i.Zr(h.error);const u=h.data;switch(e){case"prepend":this.nylasMailboxStore.state.threads=[...u,...this.nylasMailboxStore.state.threads];break;case"append":this.nylasMailboxStore.state.threads=[...this.nylasMailboxStore.state.threads,...u];break;case"overwrite":default:this.nylasMailboxStore.state.threads=u;break}return h.next_cursor?this.nylasMailboxStore.state.nextThreadPageToken=h.next_cursor:this.nylasMailboxStore.state.nextThreadPageToken=null,s&&(this.nylasMailboxStore.state.state="ready"),u}async getThread(t){if(!this.nylasAuthStore.state.isAuthenticated)throw new Error("Not authenticated");if(!this.nylasAuth.hasScopeByType("email",["read-only","modify"]))throw new Error("Missing thread:read-only scope");const e=this.nylasMailboxStore.state.threads.find(n=>n.id===t);if(e)return e;this.nylasMailboxStore.state.state="loading";const s=`/v3/grants/me/threads/${t}`,a=await this.nylasAuth.nylasAPIRequest(s);if(i.Xr(a))throw new i.Zr(a.error);const r=a.data;return this.nylasMailboxStore.state.threads=this.nylasMailboxStore.state.threads.map(n=>n.id===r.id?r:n),this.nylasMailboxStore.state.state="ready",r}async nextThreadPage(t="overwrite",e=!0){if(!this.nylasMailboxStore.state.nextThreadPageToken)throw new Error("No next page token");this.nylasMailboxStore.state.previousThreadPageTokens=Array.from(new Set([...this.nylasMailboxStore.state.previousThreadPageTokens,this.nylasMailboxStore.state.threadsQueryParams.page_token??null]));const s=this.nylasMailboxStore.state.nextThreadPageToken;return this.getThreads({...this.nylasMailboxStore.state.threadsQueryParams,page_token:s},t,e)}async previousThreadPage(t="overwrite",e=!0){if(!this.nylasMailboxStore.state.previousThreadPageTokens.length)throw new Error("No previous page token");const s=[...this.nylasMailboxStore.state.previousThreadPageTokens],a=s.pop();return this.nylasMailboxStore.state.previousThreadPageTokens=s,this.getThreads({...this.nylasMailboxStore.state.threadsQueryParams,page_token:a??void 0},t,e)}updateThreadQueryParams(t){this.nylasMailboxStore.state.threadsQueryParams={...this.nylasMailboxStore.state.threadsQueryParams,...t}}back(){this.router.navigate("/",!0),this.nylasMailboxStore.state.selectedThread=null}unSelectThread(){this.nylasMailboxStore.state.selectedThread=null}async selectThread(t){this.router.navigate(`/thread/${t.id}`,!0),this.nylasMailboxStore.state.selectedThread=t,t.unread&&this.markThreadAsRead(t).catch(e=>{o.debug("Error marking thread as read",e)})}async markThreadAsRead(t){return this.updateThread(t,{unread:!1})}async updateThread(t,e){if(!this.nylasAuthStore.state.isAuthenticated)throw new Error("Not authenticated");if(!this.nylasAuth.hasScopeByType("email","modify"))throw new Error("Missing thread:modify scope");const s=`/v3/grants/me/threads/${t.id}`,a=await this.nylasAuth.nylasAPIRequest(s,"PUT",e);if(i.Xr(a))throw new i.Zr(a.error);const r=a.data;return this.nylasMailboxStore.state.threads=this.nylasMailboxStore.state.threads.map(n=>n.id===r.id?r:n),this.nylasMailboxStore.state.selectedThread=r,r}}class p{constructor(t,e,s){this.nylasAuth=t,this.nylasAuthStore=e,this.nylasMailboxStore=s}async getFolders(){if(!this.nylasAuthStore.state.isAuthenticated)throw new Error("Not authenticated");if(!this.nylasAuth.hasScopeByType("email",["read-only","modify"]))throw new Error("Missing thread:read-only scope");this.nylasMailboxStore.state.state="loading";const t="/v3/grants/me/folders",e=await this.nylasAuth.nylasAPIRequest(t);if(i.Xr(e))throw new i.Zr(e.error);const s=e.data;return this.nylasMailboxStore.state.folders=s,this.nylasMailboxStore.state.state="ready",s}async selectFolder(t){this.nylasMailboxStore.state.threadsQueryParams={in:t.id,...this.nylasMailboxStore.state.threadsQueryParams||{}}}}class S extends Event{constructor(t,e){super(t,e),this.oldURL=e.oldURL,this.newURL=e.newURL}}class A{constructor(){this.routeChangeListeners=[],o.debug("HashRouter constructor")}destroy(){o.debug("HashRouter destroy"),window.removeEventListener("hashchange",this.onRouteChange.bind(this))}init(){if(o.debug("HashRouter init"),window.addEventListener("hashchange",this.onRouteChange.bind(this)),typeof HashChangeEvent<"u"){const t=new HashChangeEvent("hashchange",{oldURL:"",newURL:window.location.href});this.onRouteChange(t)}else{const t=new S("hashchange",{oldURL:"",newURL:window.location.href});this.onRouteChange(t)}}addRouteChangeListener(t,e){o.debug("HashRouter addRouteChangeListener"),this.routeChangeListeners.push([t,e])}navigate(t,e){if(o.debug("HashRouter navigate"),e)return window.history.pushState(null,"",`#${t}`);window.location.hash=t}setRoute(t){o.debug("HashRouter setRoute"),window.location.hash=t}matchRoute(t,e){const s=t.split("/"),a=e.split("/");if(o.debug(`HashRouter matchRoute route=${t} path=${e}`,{routeParts:s,pathParts:a}),s[1]===""&&a[0]==="")return!0;if(s.length!==a.length)return!1;for(let r=0;r<s.length;r++){const n=s[r],h=a[r];if(!n.startsWith(":")&&n!==h)return!1}return!0}getRouteParams(t){o.debug("HashRouter getRouteParams");const e={},s=t.split("/"),a=window.location.hash.split("/");return s.forEach((r,n)=>{if(r.startsWith(":")){const h=r.substring(1);e[h]=a[n]}}),e}getRouteWithParams(t,e){o.debug("HashRouter getRouteWithParams");let s=t;return Object.keys(e).forEach(a=>{s=s.replace(`:${a}`,e[a])}),s}getRoute(){return o.debug("HashRouter getRoute"),window.location.hash}onRouteChange(t){this.routeChangeListeners.forEach(async([e,s])=>{const a=t.newURL.indexOf("#")===-1?"":t.newURL.substring(t.newURL.indexOf("#")+1);if(o.debug(`HashRouter onRouteChange route=${e} path=${a}`,{event:t}),!this.matchRoute(e,a)){o.debug(`HashRouter onRouteChange route=${e} path=${a} does not match`);return}const r=this.getRouteParams(e);await s(e,a,r)})}getBasePath(){return o.debug("HashRouter getBasePath"),""}}function x(l={}){const t={isAuthenticated:!1,tokenInfo:null,state:"ready",...l},e=g.createStore(t);return e.reset=()=>{for(const s in t){const a=t[s];e.set(s,a)}},e}function T(l={}){const t={state:"ready",messages:[],threads:[],folders:[],selectedThread:null,nextThreadPageToken:null,previousThreadPageTokens:[],searchQuery:"",hasNextThreadPage:!1,hasPreviousThreadPage:!1,selectedFolder:"inbox",threadsQueryParams:{in:"inbox"},messgeQueryParams:{fields:"include_headers"},...l},e=g.createStore({...t});return e.onChange("nextThreadPageToken",s=>{e.set("hasNextThreadPage",s!==null)}),e.onChange("previousThreadPageTokens",s=>{e.set("hasPreviousThreadPage",s.length>0)}),e.onChange("threadsQueryParams",s=>{e.set("selectedFolder",s.in||"inbox"),e.set("searchQuery",s.search_query_native||"")}),e.reset=()=>{for(const s in t){const a=t[s];e.set(s,a)}},e}exports.CreateNylasAuthStore=x;exports.CreateNylasMailboxStore=T;exports.HashRouter=A;exports.NylasAuthConnector=f;exports.NylasFoldersConnector=p;exports.NylasMessagesConnector=w;exports.NylasThreadsConnector=m;
@@ -1,11 +1,58 @@
1
- import { c as m, X as l, Z as u } from "./index-10914bc1-346f04fa.js";
2
- import { d as n } from "./utils-0cd66d04-89ab163d.js";
3
- class S {
1
+ import { d as o } from "./utils-c00bdc3c-89ab163d.js";
2
+ import { X as u, Z as d } from "./index.es-2578c6a5-71441142.js";
3
+ import { a as f } from "./index-0f3bd8df.js";
4
+ class A {
5
+ constructor(t, e) {
6
+ this.nylasAuth = t, this.nylasAuthStore = e;
7
+ }
8
+ async validateSession() {
9
+ const t = await this.isAccessTokenValid();
10
+ if (!t)
11
+ this.logout();
12
+ else {
13
+ let e = await this.nylasAuth.getTokenInfo();
14
+ if (e) {
15
+ const a = Math.floor(Date.now() / 1e3);
16
+ if (e.expires_in && e.expires_in - a < 3e5 && (o("[NylasAuthConnectorMixin] Refreshing access token"), e = await this.nylasAuth.refreshAccessToken(), !e)) {
17
+ o("[NylasAuthConnectorMixin] Token is expired and could not be refreshed. Logging out."), this.logout();
18
+ return;
19
+ }
20
+ this.nylasAuthStore.state.tokenInfo = e;
21
+ }
22
+ }
23
+ this.nylasAuthStore.state.isAuthenticated = t;
24
+ }
25
+ async isAuthenticated() {
26
+ return this.nylasAuth.isAuthenticated();
27
+ }
28
+ async getTokenInfo() {
29
+ return this.nylasAuth.getTokenInfo();
30
+ }
31
+ async isAccessTokenValid() {
32
+ return this.nylasAuth.isAccessTokenValid();
33
+ }
34
+ async logout() {
35
+ await this.nylasAuth.logout();
36
+ }
37
+ async getHostedAuthRedirectURL(t, e, s) {
38
+ return this.nylasAuth.getHostedAuthRedirectURL(t, e, s);
39
+ }
40
+ async manageHostedAuthCodeExchange(t) {
41
+ const s = new URL(t).searchParams.get("code");
42
+ if (s) {
43
+ const a = await this.nylasAuth.exchangeAuthCodeForTokenInfo(s);
44
+ if (a)
45
+ return this.nylasAuthStore.state.tokenInfo = a, this.nylasAuthStore.state.isAuthenticated = !0, a;
46
+ }
47
+ return null;
48
+ }
49
+ }
50
+ class T {
4
51
  constructor(t, e, s) {
5
52
  this.nylasAuth = t, this.nylasAuthStore = e, this.nylasMailboxStore = s;
6
53
  }
7
54
  async getMessages() {
8
- var o;
55
+ var n;
9
56
  if (!this.nylasAuthStore.state.isAuthenticated)
10
57
  throw new Error("Not authenticated");
11
58
  if (!this.nylasAuth.hasScopeByType("email", ["read-only", "modify"]))
@@ -13,12 +60,12 @@ class S {
13
60
  this.nylasMailboxStore.state.state = "loading";
14
61
  const t = this.nylasMailboxStore.state.messgeQueryParams, e = new URLSearchParams();
15
62
  for (const i in t) {
16
- const h = (o = t[i]) == null ? void 0 : o.toString();
17
- h && e.append(i, h);
63
+ const l = (n = t[i]) == null ? void 0 : n.toString();
64
+ l && e.append(i, l);
18
65
  }
19
66
  const s = `/v3/grants/me/messages?${e.toString()}`, a = await this.nylasAuth.nylasAPIRequest(s);
20
- if (l(a))
21
- throw new u(a.error);
67
+ if (u(a))
68
+ throw new d(a.error);
22
69
  const r = a.data;
23
70
  return this.nylasMailboxStore.state.messages = r, this.nylasMailboxStore.state.state = "ready", r;
24
71
  }
@@ -28,8 +75,8 @@ class S {
28
75
  if (!this.nylasAuth.hasScopeByType("email", ["read-only", "modify"]))
29
76
  throw new Error("Missing message:read-only scope");
30
77
  const e = await this.nylasAuth.nylasAPIRequest(`/v3/grants/me/messages?thread_id=${t}&fields=include_headers`);
31
- if (l(e))
32
- throw new u(e.error);
78
+ if (u(e))
79
+ throw new d(e.error);
33
80
  const s = e.data;
34
81
  return this.nylasMailboxStore.state.messages = s, s;
35
82
  }
@@ -55,8 +102,8 @@ class S {
55
102
  body: t
56
103
  }
57
104
  }, !0, this.nylasAuth.config.elementsApiUri);
58
- if (l(e))
59
- throw new u(e.error);
105
+ if (u(e))
106
+ throw new d(e.error);
60
107
  return e.data.summary;
61
108
  }
62
109
  async textToSpeech(t, e) {
@@ -76,7 +123,7 @@ class x {
76
123
  this.nylasAuth = t, this.nylasAuthStore = e, this.nylasMailboxStore = s, this.router = a;
77
124
  }
78
125
  async getThreads(t, e = "overwrite", s = !0) {
79
- var c;
126
+ var y;
80
127
  if (!this.nylasAuthStore.state.isAuthenticated)
81
128
  throw new Error("Not authenticated");
82
129
  if (!this.nylasAuth.hasScopeByType("email", ["read-only", "modify"]))
@@ -84,42 +131,42 @@ class x {
84
131
  s && (this.nylasMailboxStore.state.state = "loading");
85
132
  const a = t || this.nylasMailboxStore.state.threadsQueryParams, r = new URLSearchParams();
86
133
  for (const g in a) {
87
- const y = (c = a[g]) == null ? void 0 : c.toString();
88
- typeof y < "u" && y !== null && r.append(g, y);
134
+ const c = (y = a[g]) == null ? void 0 : y.toString();
135
+ typeof c < "u" && c !== null && r.append(g, c);
89
136
  }
90
137
  a.search_query_native ? this.router.navigate(`/?query=${a.search_query_native}`, !0) : this.nylasMailboxStore.state.threadsQueryParams.search_query_native && !a.search_query_native && this.router.navigate("/", !0), a.page_token || (this.nylasMailboxStore.state.previousThreadPageTokens = []), this.nylasMailboxStore.state.threadsQueryParams = a;
91
- const o = `/v3/grants/me/threads?${r.toString()}`, i = await this.nylasAuth.nylasAPIRequest(o);
92
- if (l(i))
93
- throw new u(i.error);
94
- const h = i.data;
138
+ const n = `/v3/grants/me/threads?${r.toString()}`, i = await this.nylasAuth.nylasAPIRequest(n);
139
+ if (u(i))
140
+ throw new d(i.error);
141
+ const l = i.data;
95
142
  switch (e) {
96
143
  case "prepend":
97
- this.nylasMailboxStore.state.threads = [...h, ...this.nylasMailboxStore.state.threads];
144
+ this.nylasMailboxStore.state.threads = [...l, ...this.nylasMailboxStore.state.threads];
98
145
  break;
99
146
  case "append":
100
- this.nylasMailboxStore.state.threads = [...this.nylasMailboxStore.state.threads, ...h];
147
+ this.nylasMailboxStore.state.threads = [...this.nylasMailboxStore.state.threads, ...l];
101
148
  break;
102
149
  case "overwrite":
103
150
  default:
104
- this.nylasMailboxStore.state.threads = h;
151
+ this.nylasMailboxStore.state.threads = l;
105
152
  break;
106
153
  }
107
- return i.next_cursor ? this.nylasMailboxStore.state.nextThreadPageToken = i.next_cursor : this.nylasMailboxStore.state.nextThreadPageToken = null, s && (this.nylasMailboxStore.state.state = "ready"), h;
154
+ return i.next_cursor ? this.nylasMailboxStore.state.nextThreadPageToken = i.next_cursor : this.nylasMailboxStore.state.nextThreadPageToken = null, s && (this.nylasMailboxStore.state.state = "ready"), l;
108
155
  }
109
156
  async getThread(t) {
110
157
  if (!this.nylasAuthStore.state.isAuthenticated)
111
158
  throw new Error("Not authenticated");
112
159
  if (!this.nylasAuth.hasScopeByType("email", ["read-only", "modify"]))
113
160
  throw new Error("Missing thread:read-only scope");
114
- const e = this.nylasMailboxStore.state.threads.find((o) => o.id === t);
161
+ const e = this.nylasMailboxStore.state.threads.find((n) => n.id === t);
115
162
  if (e)
116
163
  return e;
117
164
  this.nylasMailboxStore.state.state = "loading";
118
165
  const s = `/v3/grants/me/threads/${t}`, a = await this.nylasAuth.nylasAPIRequest(s);
119
- if (l(a))
120
- throw new u(a.error);
166
+ if (u(a))
167
+ throw new d(a.error);
121
168
  const r = a.data;
122
- return this.nylasMailboxStore.state.threads = this.nylasMailboxStore.state.threads.map((o) => o.id === r.id ? r : o), this.nylasMailboxStore.state.state = "ready", r;
169
+ return this.nylasMailboxStore.state.threads = this.nylasMailboxStore.state.threads.map((n) => n.id === r.id ? r : n), this.nylasMailboxStore.state.state = "ready", r;
123
170
  }
124
171
  async nextThreadPage(t = "overwrite", e = !0) {
125
172
  if (!this.nylasMailboxStore.state.nextThreadPageToken)
@@ -154,7 +201,7 @@ class x {
154
201
  }
155
202
  async selectThread(t) {
156
203
  this.router.navigate(`/thread/${t.id}`, !0), this.nylasMailboxStore.state.selectedThread = t, t.unread && this.markThreadAsRead(t).catch((e) => {
157
- n("Error marking thread as read", e);
204
+ o("Error marking thread as read", e);
158
205
  });
159
206
  }
160
207
  async markThreadAsRead(t) {
@@ -166,13 +213,13 @@ class x {
166
213
  if (!this.nylasAuth.hasScopeByType("email", "modify"))
167
214
  throw new Error("Missing thread:modify scope");
168
215
  const s = `/v3/grants/me/threads/${t.id}`, a = await this.nylasAuth.nylasAPIRequest(s, "PUT", e);
169
- if (l(a))
170
- throw new u(a.error);
216
+ if (u(a))
217
+ throw new d(a.error);
171
218
  const r = a.data;
172
- return this.nylasMailboxStore.state.threads = this.nylasMailboxStore.state.threads.map((o) => o.id === r.id ? r : o), this.nylasMailboxStore.state.selectedThread = r, r;
219
+ return this.nylasMailboxStore.state.threads = this.nylasMailboxStore.state.threads.map((n) => n.id === r.id ? r : n), this.nylasMailboxStore.state.selectedThread = r, r;
173
220
  }
174
221
  }
175
- class T {
222
+ class P {
176
223
  constructor(t, e, s) {
177
224
  this.nylasAuth = t, this.nylasAuthStore = e, this.nylasMailboxStore = s;
178
225
  }
@@ -183,8 +230,8 @@ class T {
183
230
  throw new Error("Missing thread:read-only scope");
184
231
  this.nylasMailboxStore.state.state = "loading";
185
232
  const t = "/v3/grants/me/folders", e = await this.nylasAuth.nylasAPIRequest(t);
186
- if (l(e))
187
- throw new u(e.error);
233
+ if (u(e))
234
+ throw new d(e.error);
188
235
  const s = e.data;
189
236
  return this.nylasMailboxStore.state.folders = s, this.nylasMailboxStore.state.state = "ready", s;
190
237
  }
@@ -195,76 +242,76 @@ class T {
195
242
  };
196
243
  }
197
244
  }
198
- class w extends Event {
245
+ class m extends Event {
199
246
  constructor(t, e) {
200
247
  super(t, e), this.oldURL = e.oldURL, this.newURL = e.newURL;
201
248
  }
202
249
  }
203
- class P {
250
+ class b {
204
251
  constructor() {
205
- this.routeChangeListeners = [], n("HashRouter constructor");
252
+ this.routeChangeListeners = [], o("HashRouter constructor");
206
253
  }
207
254
  destroy() {
208
- n("HashRouter destroy"), window.removeEventListener("hashchange", this.onRouteChange.bind(this));
255
+ o("HashRouter destroy"), window.removeEventListener("hashchange", this.onRouteChange.bind(this));
209
256
  }
210
257
  init() {
211
- if (n("HashRouter init"), window.addEventListener("hashchange", this.onRouteChange.bind(this)), typeof HashChangeEvent < "u") {
258
+ if (o("HashRouter init"), window.addEventListener("hashchange", this.onRouteChange.bind(this)), typeof HashChangeEvent < "u") {
212
259
  const t = new HashChangeEvent("hashchange", { oldURL: "", newURL: window.location.href });
213
260
  this.onRouteChange(t);
214
261
  } else {
215
- const t = new w("hashchange", { oldURL: "", newURL: window.location.href });
262
+ const t = new m("hashchange", { oldURL: "", newURL: window.location.href });
216
263
  this.onRouteChange(t);
217
264
  }
218
265
  }
219
266
  addRouteChangeListener(t, e) {
220
- n("HashRouter addRouteChangeListener"), this.routeChangeListeners.push([t, e]);
267
+ o("HashRouter addRouteChangeListener"), this.routeChangeListeners.push([t, e]);
221
268
  }
222
269
  navigate(t, e) {
223
- if (n("HashRouter navigate"), e)
270
+ if (o("HashRouter navigate"), e)
224
271
  return window.history.pushState(null, "", `#${t}`);
225
272
  window.location.hash = t;
226
273
  }
227
274
  setRoute(t) {
228
- n("HashRouter setRoute"), window.location.hash = t;
275
+ o("HashRouter setRoute"), window.location.hash = t;
229
276
  }
230
277
  matchRoute(t, e) {
231
278
  const s = t.split("/"), a = e.split("/");
232
- if (n(`HashRouter matchRoute route=${t} path=${e}`, { routeParts: s, pathParts: a }), s[1] === "" && a[0] === "")
279
+ if (o(`HashRouter matchRoute route=${t} path=${e}`, { routeParts: s, pathParts: a }), s[1] === "" && a[0] === "")
233
280
  return !0;
234
281
  if (s.length !== a.length)
235
282
  return !1;
236
283
  for (let r = 0; r < s.length; r++) {
237
- const o = s[r], i = a[r];
238
- if (!o.startsWith(":") && o !== i)
284
+ const n = s[r], i = a[r];
285
+ if (!n.startsWith(":") && n !== i)
239
286
  return !1;
240
287
  }
241
288
  return !0;
242
289
  }
243
290
  getRouteParams(t) {
244
- n("HashRouter getRouteParams");
291
+ o("HashRouter getRouteParams");
245
292
  const e = {}, s = t.split("/"), a = window.location.hash.split("/");
246
- return s.forEach((r, o) => {
293
+ return s.forEach((r, n) => {
247
294
  if (r.startsWith(":")) {
248
295
  const i = r.substring(1);
249
- e[i] = a[o];
296
+ e[i] = a[n];
250
297
  }
251
298
  }), e;
252
299
  }
253
300
  getRouteWithParams(t, e) {
254
- n("HashRouter getRouteWithParams");
301
+ o("HashRouter getRouteWithParams");
255
302
  let s = t;
256
303
  return Object.keys(e).forEach((a) => {
257
304
  s = s.replace(`:${a}`, e[a]);
258
305
  }), s;
259
306
  }
260
307
  getRoute() {
261
- return n("HashRouter getRoute"), window.location.hash;
308
+ return o("HashRouter getRoute"), window.location.hash;
262
309
  }
263
310
  onRouteChange(t) {
264
311
  this.routeChangeListeners.forEach(async ([e, s]) => {
265
312
  const a = t.newURL.indexOf("#") === -1 ? "" : t.newURL.substring(t.newURL.indexOf("#") + 1);
266
- if (n(`HashRouter onRouteChange route=${e} path=${a}`, { event: t }), !this.matchRoute(e, a)) {
267
- n(`HashRouter onRouteChange route=${e} path=${a} does not match`);
313
+ if (o(`HashRouter onRouteChange route=${e} path=${a}`, { event: t }), !this.matchRoute(e, a)) {
314
+ o(`HashRouter onRouteChange route=${e} path=${a} does not match`);
268
315
  return;
269
316
  }
270
317
  const r = this.getRouteParams(e);
@@ -272,10 +319,24 @@ class P {
272
319
  });
273
320
  }
274
321
  getBasePath() {
275
- return n("HashRouter getBasePath"), "";
322
+ return o("HashRouter getBasePath"), "";
276
323
  }
277
324
  }
278
- function b(d = {}) {
325
+ function M(h = {}) {
326
+ const t = {
327
+ isAuthenticated: !1,
328
+ tokenInfo: null,
329
+ state: "ready",
330
+ ...h
331
+ }, e = f(t);
332
+ return e.reset = () => {
333
+ for (const s in t) {
334
+ const a = t[s];
335
+ e.set(s, a);
336
+ }
337
+ }, e;
338
+ }
339
+ function R(h = {}) {
279
340
  const t = {
280
341
  state: "ready",
281
342
  messages: [],
@@ -294,8 +355,8 @@ function b(d = {}) {
294
355
  messgeQueryParams: {
295
356
  fields: "include_headers"
296
357
  },
297
- ...d
298
- }, e = m({ ...t });
358
+ ...h
359
+ }, e = f({ ...t });
299
360
  return e.onChange("nextThreadPageToken", (s) => {
300
361
  e.set("hasNextThreadPage", s !== null);
301
362
  }), e.onChange("previousThreadPageTokens", (s) => {
@@ -310,9 +371,11 @@ function b(d = {}) {
310
371
  }, e;
311
372
  }
312
373
  export {
313
- b as C,
314
- P as H,
315
- x as N,
316
- S as a,
317
- T as b
374
+ M as C,
375
+ b as H,
376
+ A as N,
377
+ R as a,
378
+ x as b,
379
+ T as c,
380
+ P as d
318
381
  };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index-7a55dc33.cjs"),y=require("./register-component-dc659dc3-f58bf25b.cjs"),n=require("./utils-c00bdc3c-94b9c3b6.cjs");require("react");require("react-dom");require("./_commonjsHelpers-57e89916-4a3ae7d8.cjs");const u=':host{display:block;margin:1rem;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif}.nylas-additional-participants__title{color:var(--nylas-base-nylas-base-900-aaa, #101323);font-size:16px;font-style:normal;font-weight:600;line-height:20px;margin:0;text-align:left}.nylas-additional-participants__subtitle{color:var(--nylas-base-600);font-size:14px;font-style:normal;font-weight:400;line-height:20px;margin:0.25rem 0px 0px;text-align:left}.nylas-additional-participants__content{padding:1rem;display:flex;flex-direction:column;gap:1rem}.nylas-additional-participants__input_group{padding-top:8px;display:flex;flex-direction:column;gap:4px}.nylas-additional-participants__input_group label{display:flex;align-items:center;color:var(--nylas-base-800);font-size:14px;font-style:normal;font-weight:400;line-height:150%}.nylas-additional-participants__input_wrapper{display:flex;border-width:1;border-radius:8px;border:1px solid var(--nylas-base-300)}.nylas-additional-participants__input_wrapper button{padding:12px;border:none;background:none;cursor:pointer}.nylas-additional-participants__input_wrapper button:hover,.nylas-additional-participants__input_wrapper button:active{color:var(--nylas-primary)}.nylas-additional-participants__input_wrapper_organizer{background:var(--nylas-base-50)}.nylas-additional-participants__input{flex:1;padding:12px 16px;border-right:1px solid var(--nylas-base-300)}.nylas-additional-participants__input input{border:none;outline:none;background:none;width:100%}.nylas-additional-participants__add{padding:12px;display:flex;align-items:center;border:none;background:none;cursor:pointer}.nylas-additional-participants__add span{padding:0 8px;font-size:16px;font-style:normal;font-weight:500}.nylas-additional-participants__add:hover,.nylas-additional-participants__add:active{color:var(--nylas-primary)}',b=u;var _=function(a,t,e,r){var l=arguments.length,s=l<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(a,t,e,r);else for(var d=a.length-1;d>=0;d--)(p=a[d])&&(s=(l<3?p(s):l>3?p(t,e,s):p(t,e))||s);return l>3&&s&&Object.defineProperty(t,e,s),s},o=function(a,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(a,t)};const c=class{constructor(a){i.registerInstance(this,a),a.$hostElement$["s-ei"]?this.internals=a.$hostElement$["s-ei"]:(this.internals=a.$hostElement$.attachInternals(),a.$hostElement$["s-ei"]=this.internals),this.name="participants",this.eventParticipants=void 0,this.participants=this.eventParticipants??[],this.participantsValid=!0}elementNameChangedHandler(a){n.debug("nylas-additional-participants","elementNameChangedHandler",a),this.host.setAttribute("name",a)}connectedCallback(){n.debug("nylas-additional-participants","connectedCallback")}componentWillLoad(){n.debug("nylas-additional-participants","componentWillLoad"),this.host.setAttribute("name",this.name)}componentDidLoad(){n.debug("nylas-additional-participants","componentDidLoad"),this.internals.setFormValue(JSON.stringify(this.participants),"participants")}disconnectedCallback(){n.debug("nylas-additional-participants","disconnectedCallback")}onParticipantChange(a,t){n.debug("nylas-additional-participants","onParticipantChange"),this.participants[t].email=a.target.value,this.internals.setFormValue(JSON.stringify(this.participants),"participants")}addParticipant(){n.debug("nylas-additional-participants","addParticipant"),this.participants=[...this.participants,{email:"",is_organizer:!1,availability:{calendar_ids:["primary"]}}],this.internals.setFormValue(JSON.stringify(this.participants),"participants")}removeParticipant(a){n.debug("nylas-additional-participants","addParticipant"),this.participants=this.participants.filter(t=>t.email!==a),this.internals.setFormValue(JSON.stringify(this.participants),"participants")}validate(a,t){n.debug("nylas-additional-participants","validate");const r=/^(([^<>()\[\]\\.,;:\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(a).toLowerCase());this.participants[t].is_valid=r,this.internals.setFormValue(JSON.stringify(this.participants),"participants")}render(){return i.h(i.Host,{key:"cc6d22c88c41ea406313ab95ec7f90a38704fc5b"},i.h("nylas-form-card",{key:"033b0b3497b62ee3a17ee8f480a332d6103f143e"},i.h("h3",{key:"e88c9a1e05adda093bb0b1a1a85f7c3f36d69684",slot:"header-title",class:"nylas-additional-participants__title",part:"nap__title"},"Additional participants"),i.h("p",{key:"aab3da584eecd3437e7d93fc726d1e8718bd066c",slot:"header-subtitle",class:"nylas-additional-participants__subtitle",part:"nap__subtitle"},"Add anyone else who would be joining for this event."),i.h("div",{key:"0a4d920d8ea788eca41e2fb46b532df4614925b6",slot:"content",class:"nylas-additional-participants__content"},i.h("div",{key:"9aa1c1e851de4e73b97c022f7eed52c91b8c826f"},this.participants.map((a,t)=>i.h("div",{class:"nylas-additional-participants__input_group",part:"nap__input_group"},i.h("label",null,a.is_organizer?"Organizer":`Participant ${t}`),i.h("div",{part:"nap__input_wrapper",class:`nylas-additional-participants__input_wrapper ${a.is_organizer&&"nylas-additional-participants__input_wrapper_organizer"} ${a.is_valid===!1&&"nylas-additional-participants__input_wrapper_invalid"}`},i.h("div",{class:"nylas-additional-participants__input",part:"nap__input"},i.h("input",{type:"text",value:a.email,onInput:e=>{this.onParticipantChange(e,t)},readOnly:a.is_organizer,onBlur:()=>this.validate(a.email,t)})),!a.is_organizer&&i.h("button",{onClick:()=>this.removeParticipant(a.email),part:"nap__remove-participant"},i.h("close-icon",null)))))))))}static get formAssociated(){return!0}get host(){return i.getElement(this)}static get watchers(){return{name:["elementNameChangedHandler"]}}};_([y.RegisterComponent({name:"nylas-additional-participants",eventToProps:{},fireRegisterEvent:!0}),o("design:type",Function),o("design:paramtypes",[]),o("design:returntype",void 0)],c.prototype,"render",null);c.style=b;exports.nylas_additional_participants=c;
@@ -1,19 +1,19 @@
1
- import { r as y, h as i, H as b, g as f } from "./index-ce40ad47.js";
2
- import { R as _ } from "./register-component-d056a880-f3003d6c.js";
3
- import { d as n } from "./utils-0cd66d04-89ab163d.js";
1
+ import { r as y, h as i, H as _, g as f } from "./index-0f3bd8df.js";
2
+ import { R as b } from "./register-component-dc659dc3-0fdb18dc.js";
3
+ import { d as n } from "./utils-c00bdc3c-89ab163d.js";
4
4
  import "react";
5
5
  import "react-dom";
6
6
  import "./_commonjsHelpers-57e89916-af061c86.js";
7
- const u = ':host{display:block;margin:1rem;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif}.nylas-additional-participants__title{color:var(--nylas-base-nylas-base-900-aaa, #101323);font-size:16px;font-style:normal;font-weight:600;line-height:20px;margin:0;text-align:left}.nylas-additional-participants__subtitle{color:var(--nylas-base-nylas-base-600-aaa, #3e4784);font-size:14px;font-style:normal;font-weight:400;line-height:20px;margin:0.25rem 0px 0px;text-align:left}.nylas-additional-participants__content{padding:1rem;display:flex;flex-direction:column;gap:1rem}.nylas-additional-participants__block{display:flex;justify-content:space-between;gap:0.5rem}.nylas-additional-participants__input_group{padding-top:8px;display:flex;flex-direction:column;gap:4px}.nylas-additional-participants__input_group label{display:flex;align-items:center;color:var(--nylas-base-nylas-base-800);font-size:14px;font-style:normal;font-weight:400;line-height:150%}.nylas-additional-participants__input_wrapper{display:flex;border-width:1;border-radius:8px;border:1px solid var(--Nylas-base-Nylas-base-300, #b3b8d8)}.nylas-additional-participants__input_wrapper button{padding:12px;border:none;background:none;cursor:pointer}.nylas-additional-participants__input_wrapper button:hover,.nylas-additional-participants__input_wrapper button:active{color:var(--nylas-primary)}.nylas-additional-participants__input_wrapper_organizer{background:var(--Nylas-base-Nylas-base-50, #f8f9fc)}.nylas-additional-participants__input{flex:1;padding:12px 16px;border-right:1px solid var(--Nylas-base-Nylas-base-300, #b3b8d8)}.nylas-additional-participants__input input{border:none;outline:none;background:none;width:100%}.nylas-additional-participants__input_wrapper_invalid{border:1px solid var(--nylas-error, #cc4841);color:var(--Nylas-base-Nylas-base-400, #717bbc)}.nylas-additional-participants__add{padding:12px;display:flex;align-items:center;border:none;background:none;cursor:pointer}.nylas-additional-participants__add span{padding:0 8px;font-size:16px;font-style:normal;font-weight:500}.nylas-additional-participants__add:hover,.nylas-additional-participants__add:active{color:var(--nylas-primary)}', m = u;
7
+ const u = ':host{display:block;margin:1rem;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif}.nylas-additional-participants__title{color:var(--nylas-base-nylas-base-900-aaa, #101323);font-size:16px;font-style:normal;font-weight:600;line-height:20px;margin:0;text-align:left}.nylas-additional-participants__subtitle{color:var(--nylas-base-600);font-size:14px;font-style:normal;font-weight:400;line-height:20px;margin:0.25rem 0px 0px;text-align:left}.nylas-additional-participants__content{padding:1rem;display:flex;flex-direction:column;gap:1rem}.nylas-additional-participants__input_group{padding-top:8px;display:flex;flex-direction:column;gap:4px}.nylas-additional-participants__input_group label{display:flex;align-items:center;color:var(--nylas-base-800);font-size:14px;font-style:normal;font-weight:400;line-height:150%}.nylas-additional-participants__input_wrapper{display:flex;border-width:1;border-radius:8px;border:1px solid var(--nylas-base-300)}.nylas-additional-participants__input_wrapper button{padding:12px;border:none;background:none;cursor:pointer}.nylas-additional-participants__input_wrapper button:hover,.nylas-additional-participants__input_wrapper button:active{color:var(--nylas-primary)}.nylas-additional-participants__input_wrapper_organizer{background:var(--nylas-base-50)}.nylas-additional-participants__input{flex:1;padding:12px 16px;border-right:1px solid var(--nylas-base-300)}.nylas-additional-participants__input input{border:none;outline:none;background:none;width:100%}.nylas-additional-participants__add{padding:12px;display:flex;align-items:center;border:none;background:none;cursor:pointer}.nylas-additional-participants__add span{padding:0 8px;font-size:16px;font-style:normal;font-weight:500}.nylas-additional-participants__add:hover,.nylas-additional-participants__add:active{color:var(--nylas-primary)}', m = u;
8
8
  var h = function(a, t, e, r) {
9
9
  var l = arguments.length, s = l < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, e) : r, p;
10
10
  if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
11
11
  s = Reflect.decorate(a, t, e, r);
12
12
  else
13
- for (var d = a.length - 1; d >= 0; d--)
14
- (p = a[d]) && (s = (l < 3 ? p(s) : l > 3 ? p(t, e, s) : p(t, e)) || s);
13
+ for (var o = a.length - 1; o >= 0; o--)
14
+ (p = a[o]) && (s = (l < 3 ? p(s) : l > 3 ? p(t, e, s) : p(t, e)) || s);
15
15
  return l > 3 && s && Object.defineProperty(t, e, s), s;
16
- }, o = function(a, t) {
16
+ }, d = function(a, t) {
17
17
  if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
18
18
  return Reflect.metadata(a, t);
19
19
  };
@@ -51,9 +51,9 @@ const c = class {
51
51
  this.participants[t].is_valid = r, this.internals.setFormValue(JSON.stringify(this.participants), "participants");
52
52
  }
53
53
  render() {
54
- return i(b, { key: "f7e9e11d09521eaaca5a7c0f617bb89d2d63b1c4" }, i("nylas-form-card", { key: "58e42cf68f3e5dc8d76a5c29be28332506c4ac02" }, i("h3", { key: "df04fd60229abedc20d18611012b3b4d119ec17a", slot: "header-title", class: "nylas-additional-participants__title" }, "Additional participants"), i("p", { key: "794d5d650ee886a3d985f87b3ea46527dcae8e6a", slot: "header-subtitle", class: "nylas-additional-participants__subtitle" }, "Add anyone else who would be joining for this event."), i("div", { key: "acf2f231f0c18f8389c7618e7b301d94aa819c2e", slot: "content", class: "nylas-additional-participants__content" }, i("div", { key: "ed87166cfc0f33f515c780412a71a6b7dccbd61b" }, this.participants.map((a, t) => i("div", { class: "nylas-additional-participants__input_group" }, i("label", null, a.is_organizer ? "Organizer" : `Participant ${t}`), i("div", { class: `nylas-additional-participants__input_wrapper ${a.is_organizer && "nylas-additional-participants__input_wrapper_organizer"} ${a.is_valid === !1 && "nylas-additional-participants__input_wrapper_invalid"}` }, i("div", { class: "nylas-additional-participants__input" }, i("input", { type: "text", value: a.email, onInput: (e) => {
54
+ return i(_, { key: "cc6d22c88c41ea406313ab95ec7f90a38704fc5b" }, i("nylas-form-card", { key: "033b0b3497b62ee3a17ee8f480a332d6103f143e" }, i("h3", { key: "e88c9a1e05adda093bb0b1a1a85f7c3f36d69684", slot: "header-title", class: "nylas-additional-participants__title", part: "nap__title" }, "Additional participants"), i("p", { key: "aab3da584eecd3437e7d93fc726d1e8718bd066c", slot: "header-subtitle", class: "nylas-additional-participants__subtitle", part: "nap__subtitle" }, "Add anyone else who would be joining for this event."), i("div", { key: "0a4d920d8ea788eca41e2fb46b532df4614925b6", slot: "content", class: "nylas-additional-participants__content" }, i("div", { key: "9aa1c1e851de4e73b97c022f7eed52c91b8c826f" }, this.participants.map((a, t) => i("div", { class: "nylas-additional-participants__input_group", part: "nap__input_group" }, i("label", null, a.is_organizer ? "Organizer" : `Participant ${t}`), i("div", { part: "nap__input_wrapper", class: `nylas-additional-participants__input_wrapper ${a.is_organizer && "nylas-additional-participants__input_wrapper_organizer"} ${a.is_valid === !1 && "nylas-additional-participants__input_wrapper_invalid"}` }, i("div", { class: "nylas-additional-participants__input", part: "nap__input" }, i("input", { type: "text", value: a.email, onInput: (e) => {
55
55
  this.onParticipantChange(e, t);
56
- }, readOnly: a.is_organizer, onBlur: () => this.validate(a.email, t) })), !a.is_organizer && i("button", { onClick: () => this.removeParticipant(a.email) }, i("close-icon", null)))))))));
56
+ }, readOnly: a.is_organizer, onBlur: () => this.validate(a.email, t) })), !a.is_organizer && i("button", { onClick: () => this.removeParticipant(a.email), part: "nap__remove-participant" }, i("close-icon", null)))))))));
57
57
  }
58
58
  static get formAssociated() {
59
59
  return !0;
@@ -68,14 +68,14 @@ const c = class {
68
68
  }
69
69
  };
70
70
  h([
71
- _({
71
+ b({
72
72
  name: "nylas-additional-participants",
73
73
  eventToProps: {},
74
74
  fireRegisterEvent: !0
75
75
  }),
76
- o("design:type", Function),
77
- o("design:paramtypes", []),
78
- o("design:returntype", void 0)
76
+ d("design:type", Function),
77
+ d("design:paramtypes", []),
78
+ d("design:returntype", void 0)
79
79
  ], c.prototype, "render", null);
80
80
  c.style = m;
81
81
  export {