@nylas/react 1.0.1-prealpha1 → 1.0.2-canary.1

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_18.entry-b66b6343.cjs +1 -0
  2. package/dist/add-circle-icon_18.entry-f86ae88d.js +1527 -0
  3. package/dist/{archive-icon_7.entry-baecb43c.cjs → archive-icon_7.entry-052ac074.cjs} +1 -1
  4. package/dist/{archive-icon_7.entry-9f3eca2c.js → archive-icon_7.entry-0e34d6e7.js} +15 -15
  5. package/dist/{arrow-icon.entry-a3b36218.js → arrow-icon.entry-2afd9ea9.js} +2 -2
  6. package/dist/{arrow-icon.entry-9ab0c414.cjs → arrow-icon.entry-93f21385.cjs} +1 -1
  7. package/dist/auth-store-69ac49c7-5a0bbb90.cjs +1 -0
  8. package/dist/auth-store-69ac49c7-cbfda055.js +66 -0
  9. package/dist/{bold-icon_3.entry-b0d81839.js → bold-icon_3.entry-88ce1d25.js} +8 -8
  10. package/dist/bold-icon_3.entry-8f55a9e7.cjs +1 -0
  11. package/dist/{calendar-cancel-icon.entry-8f498984.cjs → calendar-cancel-icon.entry-574c8aa4.cjs} +1 -1
  12. package/dist/{calendar-cancel-icon.entry-0d07e33c.js → calendar-cancel-icon.entry-e9c692fa.js} +5 -5
  13. package/dist/calendar-check-icon_2.entry-b0476bca.cjs +1 -0
  14. package/dist/calendar-check-icon_2.entry-d461c713.js +25 -0
  15. package/dist/{calendar-icon.entry-e5f20598.js → calendar-icon.entry-1ca202a4.js} +5 -5
  16. package/dist/{calendar-icon.entry-219efd7a.cjs → calendar-icon.entry-98936e6d.cjs} +1 -1
  17. package/dist/chevron-icon_3.entry-830f52c2.js +105 -0
  18. package/dist/chevron-icon_3.entry-f7801467.cjs +1 -0
  19. package/dist/close-icon.entry-37e8361f.js +15 -0
  20. package/dist/close-icon.entry-8d6e9816.cjs +1 -0
  21. package/dist/{nylas-booked-event-card_10.entry-27efa654.cjs → constants-b6bf6671-27e2557d.cjs} +6 -6
  22. package/dist/{nylas-booked-event-card_10.entry-f2481a57.js → constants-b6bf6671-49a0f1f2.js} +1656 -2374
  23. package/dist/{document-refresh-icon.entry-89ad42fa.js → document-refresh-icon.entry-faea08ce.js} +5 -5
  24. package/dist/document-refresh-icon.entry-fcb33921.cjs +1 -0
  25. package/dist/elements/index.d.ts +24 -2
  26. package/dist/{forward-icon_6.entry-0a6dff18.js → forward-icon_6.entry-8da1f65d.js} +82 -82
  27. package/dist/{forward-icon_6.entry-ce725f05.cjs → forward-icon_6.entry-c4b37cb1.cjs} +3 -3
  28. package/dist/{globe-icon.entry-71414bc6.js → globe-icon.entry-4720304b.js} +4 -4
  29. package/dist/{globe-icon.entry-a0c9599a.cjs → globe-icon.entry-90a0b9c9.cjs} +1 -1
  30. package/dist/{index-b30d446a-e0eaccad.js → index-10914bc1-346f04fa.js} +3 -3
  31. package/dist/{index-b30d446a-3d69a3cc.cjs → index-10914bc1-c8c3a2f3.cjs} +1 -1
  32. package/dist/index-457dcf0b.cjs +30 -0
  33. package/dist/index-ce40ad47.js +1570 -0
  34. package/dist/index.d.ts +1 -1
  35. package/dist/info-icon_2.entry-81e95048.cjs +1 -0
  36. package/dist/info-icon_2.entry-9307db18.js +34 -0
  37. package/dist/loading-icon.entry-06d37ef0.cjs +1 -0
  38. package/dist/loading-icon.entry-dc518df4.js +15 -0
  39. package/dist/mailbox-store-e721b17c-4e97e07d.cjs +1 -0
  40. package/dist/{mailbox-store-19f0c6c9-23a4e72f.js → mailbox-store-e721b17c-cf9a43dd.js} +59 -121
  41. package/dist/nylas-additional-participants.entry-1653dec7.js +83 -0
  42. package/dist/nylas-additional-participants.entry-ff8bf378.cjs +1 -0
  43. package/dist/nylas-booked-event-card_10.entry-06bc3c51.cjs +1 -0
  44. package/dist/nylas-booked-event-card_10.entry-aa971e8a.js +784 -0
  45. package/dist/nylas-editor-tabs.entry-49b5a3ab.cjs +1 -0
  46. package/dist/nylas-editor-tabs.entry-9d0959bf.js +181 -0
  47. package/dist/nylas-form-card.entry-69d2095b.cjs +1 -0
  48. package/dist/nylas-form-card.entry-c4e78f88.js +56 -0
  49. package/dist/{nylas-if-state_3.entry-d805d4c6.js → nylas-if-state_3.entry-2eb3f385.js} +12 -10
  50. package/dist/nylas-if-state_3.entry-5baf6d6f.cjs +1 -0
  51. package/dist/nylas-list-folders.entry-3b24d92d.cjs +1 -0
  52. package/dist/{nylas-list-folders.entry-472bd255.js → nylas-list-folders.entry-995fa819.js} +9 -8
  53. package/dist/{nylas-list-threads.entry-f3266bf7.js → nylas-list-threads.entry-21466eb3.js} +7 -6
  54. package/dist/nylas-list-threads.entry-fda42ded.cjs +1 -0
  55. package/dist/{nylas-mailbox-pagination.entry-bd0d3bda.js → nylas-mailbox-pagination.entry-02d40186.js} +4 -3
  56. package/dist/nylas-mailbox-pagination.entry-9dcd4901.cjs +1 -0
  57. package/dist/nylas-mailbox-toolbar-button.entry-d1099fab.cjs +1 -0
  58. package/dist/{nylas-mailbox-toolbar-button.entry-9641b5cd.js → nylas-mailbox-toolbar-button.entry-dbad44b4.js} +10 -9
  59. package/dist/nylas-provider.entry-78e2fa30.cjs +1 -0
  60. package/dist/nylas-provider.entry-bbee8c99.js +155 -0
  61. package/dist/nylas-scheduler-editor.entry-550d3c59.cjs +1 -0
  62. package/dist/nylas-scheduler-editor.entry-8f7ecf3b.js +111 -0
  63. package/dist/nylas-scheduling.entry-22b5ad07.js +236 -0
  64. package/dist/nylas-scheduling.entry-30a63738.cjs +1 -0
  65. package/dist/nylas-threads-refresh.entry-05258b36.cjs +1 -0
  66. package/dist/{nylas-threads-refresh.entry-7d567ed1.js → nylas-threads-refresh.entry-414d8740.js} +6 -5
  67. package/dist/{nylas-threads-search.entry-c881d54b.js → nylas-threads-search.entry-a19dc90f.js} +14 -13
  68. package/dist/nylas-threads-search.entry-ff21fc65.cjs +1 -0
  69. package/dist/{nylas-view-thread.entry-d8de6c83.js → nylas-view-thread.entry-38149162.js} +5 -4
  70. package/dist/nylas-view-thread.entry-5da81e99.cjs +1 -0
  71. package/dist/people-icon.entry-4b682757.cjs +1 -0
  72. package/dist/people-icon.entry-5c244c8d.js +15 -0
  73. package/dist/play-icon_2.entry-ccdc6b9c.cjs +1 -0
  74. package/dist/play-icon_2.entry-f36d6d55.js +25 -0
  75. package/dist/react.cjs +1 -1
  76. package/dist/react.js +79 -57
  77. package/dist/{refresh-icon.entry-3e0aef26.cjs → refresh-icon.entry-59fff3d4.cjs} +1 -1
  78. package/dist/{refresh-icon.entry-9563850b.js → refresh-icon.entry-63456c9a.js} +2 -2
  79. package/dist/{register-component-152c6ad2-b0d34c36.cjs → register-component-d056a880-2be11c56.cjs} +1 -1
  80. package/dist/{register-component-152c6ad2-418db864.js → register-component-d056a880-f3003d6c.js} +2 -2
  81. package/dist/scheduler-config-store-4d035001-0256b40c.cjs +1 -0
  82. package/dist/scheduler-config-store-4d035001-db9dc78a.js +33 -0
  83. package/dist/{scheduler-store-7d48e682-39104219.js → scheduler-store-0fbe642c-14466305.js} +99 -95
  84. package/dist/scheduler-store-0fbe642c-410fdbf4.cjs +1 -0
  85. package/dist/translate-icon.entry-1784c18e.cjs +1 -0
  86. package/dist/translate-icon.entry-35999e70.js +15 -0
  87. package/dist/utils-0cd66d04-89ab163d.js +2111 -0
  88. package/dist/utils-0cd66d04-94b9c3b6.cjs +8 -0
  89. package/dist/warning-icon.entry-3a702d1d.cjs +1 -0
  90. package/dist/warning-icon.entry-73de08c3.js +15 -0
  91. package/package.json +7 -4
  92. package/dist/add-circle-icon.entry-4b8debfa.js +0 -15
  93. package/dist/add-circle-icon.entry-c5fdaa6f.cjs +0 -1
  94. package/dist/bold-icon_3.entry-50406bc7.cjs +0 -1
  95. package/dist/calendar-check-icon_3.entry-5415e916.cjs +0 -1
  96. package/dist/calendar-check-icon_3.entry-cfb612c6.js +0 -35
  97. package/dist/chevron-icon.entry-3c709061.cjs +0 -1
  98. package/dist/chevron-icon.entry-f5d5d1b1.js +0 -15
  99. package/dist/close-icon_2.entry-eca351c4.js +0 -25
  100. package/dist/close-icon_2.entry-fa4f6d3e.cjs +0 -1
  101. package/dist/document-refresh-icon.entry-3a29a6e6.cjs +0 -1
  102. package/dist/duration-bddc4a13-05d3e3e2.cjs +0 -1
  103. package/dist/duration-bddc4a13-179ce826.js +0 -41
  104. package/dist/index-586a4206.cjs +0 -30
  105. package/dist/index-98d3a4da.js +0 -1498
  106. package/dist/loading-icon.entry-15debb7d.js +0 -15
  107. package/dist/loading-icon.entry-d2680046.cjs +0 -1
  108. package/dist/mailbox-store-19f0c6c9-9a3ef58a.cjs +0 -1
  109. package/dist/nylas-if-state_3.entry-6c0bf8eb.cjs +0 -1
  110. package/dist/nylas-list-folders.entry-cc04a07e.cjs +0 -1
  111. package/dist/nylas-list-threads.entry-795c5a2b.cjs +0 -1
  112. package/dist/nylas-mailbox-pagination.entry-f701fd83.cjs +0 -1
  113. package/dist/nylas-mailbox-toolbar-button.entry-b9d6a3c8.cjs +0 -1
  114. package/dist/nylas-open-hours-picker.entry-42942946.js +0 -186
  115. package/dist/nylas-open-hours-picker.entry-aa103daf.cjs +0 -1
  116. package/dist/nylas-provider.entry-5bb55b2d.cjs +0 -1
  117. package/dist/nylas-provider.entry-b94198a1.js +0 -134
  118. package/dist/nylas-scheduler.entry-3b7cb841.js +0 -230
  119. package/dist/nylas-scheduler.entry-ea6fb146.cjs +0 -1
  120. package/dist/nylas-threads-refresh.entry-4002608b.cjs +0 -1
  121. package/dist/nylas-threads-search.entry-556f1219.cjs +0 -1
  122. package/dist/nylas-view-thread.entry-6faf1b51.cjs +0 -1
  123. package/dist/play-icon_2.entry-2e21b8b9.cjs +0 -1
  124. package/dist/play-icon_2.entry-cae94826.js +0 -25
  125. package/dist/scheduler-store-7d48e682-449277d4.cjs +0 -1
  126. package/dist/search-icon_3.entry-9b027cfc.cjs +0 -1
  127. package/dist/search-icon_3.entry-e36548ec.js +0 -101
  128. package/dist/utils-5074a070-ce33ee6b.js +0 -119
  129. package/dist/utils-5074a070-d5ba6add.cjs +0 -2
@@ -1,119 +0,0 @@
1
- function f(...t) {
2
- window && window.localStorage && window.localStorage.getItem("debug") && console.debug(...t);
3
- }
4
- function g(...t) {
5
- console.error(...t);
6
- }
7
- function h() {
8
- return Math.random().toString(36).substr(2, 9);
9
- }
10
- function p(t) {
11
- return t.toString().replace(/^on/, "");
12
- }
13
- function d(t) {
14
- const e = new Date(t * 1e3), a = /* @__PURE__ */ new Date(), n = new Date(a.getFullYear(), a.getMonth(), a.getDate());
15
- return e >= n ? new Intl.DateTimeFormat("default", {
16
- hour: "numeric",
17
- minute: "numeric",
18
- hour12: !0
19
- }).format(e) : new Intl.DateTimeFormat("default", {
20
- month: "short",
21
- day: "numeric"
22
- }).format(e);
23
- }
24
- function w(t) {
25
- return t.name ? `${t.name} - ${t.email}` : t.email;
26
- }
27
- function T(t, e = "", a = 1, n = 3) {
28
- const r = t.find((i) => {
29
- var m;
30
- return ((m = i.email) == null ? void 0 : m.toLowerCase()) === e.toLowerCase();
31
- }), o = t.filter((i) => {
32
- var m;
33
- return ((m = i.email) == null ? void 0 : m.toLowerCase()) !== e.toLowerCase();
34
- }), s = o.length, u = o.slice(0, n).map((i) => i.name || i.email).join(", ");
35
- return s === 0 ? r ? "me" : "" : s === 1 ? r && a > 1 ? `me, ${u}` : u : s === 2 ? r ? `me, ${u}` : `${u}` : r ? `me, ${u}, +${s - n}` : `${u}, +${s - n}`;
36
- }
37
- const l = [
38
- { amount: 60, name: "seconds" },
39
- { amount: 60, name: "minutes" },
40
- { amount: 24, name: "hours" },
41
- { amount: 7, name: "days" },
42
- { amount: 4.34524, name: "weeks" },
43
- { amount: 12, name: "months" },
44
- { amount: Number.POSITIVE_INFINITY, name: "years" }
45
- ], D = (t) => {
46
- const e = new Intl.RelativeTimeFormat(void 0, {
47
- numeric: "auto"
48
- }), a = /* @__PURE__ */ new Date();
49
- let n = (t.getTime() - a.getTime()) / 1e3;
50
- for (let r = 0; r <= l.length; r++) {
51
- const o = l[r];
52
- if (Math.abs(n) < o.amount)
53
- return e.format(Math.round(n), o.name);
54
- n /= o.amount;
55
- }
56
- };
57
- function M(t) {
58
- return new Date(t.getFullYear(), t.getMonth() + 1, 0);
59
- }
60
- function I(t) {
61
- return new Date(t.getFullYear(), t.getMonth(), 1);
62
- }
63
- function S(t, e) {
64
- return t.getFullYear() === e.getFullYear() && t.getMonth() === e.getMonth() && t.getDate() === e.getDate();
65
- }
66
- function F(t, e) {
67
- return t.getFullYear() === e.getFullYear() && t.getMonth() === e.getMonth();
68
- }
69
- function $(t) {
70
- return t.replace(/\w\S*/g, (e) => e.charAt(0).toUpperCase() + e.substr(1).toLowerCase());
71
- }
72
- function y(t) {
73
- return t.replace("CATEGORY_", "").replace(/_/g, " ");
74
- }
75
- function c(t) {
76
- return /<[^>]*>/g.test(t) ? "html" : "plain";
77
- }
78
- function b(t) {
79
- var r, o;
80
- const e = t.headers, a = e && ((r = e.find((s) => s.name === "Content-Type")) == null ? void 0 : r.value) || "", n = e && ((o = e.find((s) => s.name === "Content-Disposition")) == null ? void 0 : o.value) || "";
81
- return !!(a.includes("text/html") || n.includes("inline") || t.body && c(t.body) === "html");
82
- }
83
- function C(t) {
84
- let n = t.split(`
85
- `).filter((o) => o.trim().length > 0).map((o) => `<p>${o}</p>`).join("");
86
- const r = /((?:https?|ftp):\/\/[^\s]+)/g;
87
- return n = n.replace(r, '<a href="$1">$1</a>'), n;
88
- }
89
- function L(t) {
90
- return new DOMParser().parseFromString(t, "text/html").body.textContent || "";
91
- }
92
- function Y(t) {
93
- return `${t.getHours().toString().padStart(2, "0")}:${t.getMinutes().toString().padStart(2, "0")}`;
94
- }
95
- function O() {
96
- return Intl.DateTimeFormat().resolvedOptions().timeZone;
97
- }
98
- export {
99
- T as a,
100
- d as b,
101
- O as c,
102
- f as d,
103
- p as e,
104
- y as f,
105
- Y as g,
106
- D as h,
107
- w as i,
108
- b as j,
109
- c as k,
110
- L as l,
111
- M as m,
112
- I as n,
113
- S as o,
114
- C as p,
115
- F as q,
116
- g as r,
117
- $ as t,
118
- h as u
119
- };
@@ -1,2 +0,0 @@
1
- "use strict";function f(...t){window&&window.localStorage&&window.localStorage.getItem("debug")&&console.debug(...t)}function g(...t){console.error(...t)}function h(){return Math.random().toString(36).substr(2,9)}function T(t){return t.toString().replace(/^on/,"")}function d(t){const e=new Date(t*1e3),a=new Date,n=new Date(a.getFullYear(),a.getMonth(),a.getDate());return e>=n?new Intl.DateTimeFormat("default",{hour:"numeric",minute:"numeric",hour12:!0}).format(e):new Intl.DateTimeFormat("default",{month:"short",day:"numeric"}).format(e)}function p(t){return t.name?`${t.name} - ${t.email}`:t.email}function w(t,e="",a=1,n=3){const r=t.find(s=>{var m;return((m=s.email)==null?void 0:m.toLowerCase())===e.toLowerCase()}),o=t.filter(s=>{var m;return((m=s.email)==null?void 0:m.toLowerCase())!==e.toLowerCase()}),i=o.length,u=o.slice(0,n).map(s=>s.name||s.email).join(", ");return i===0?r?"me":"":i===1?r&&a>1?`me, ${u}`:u:i===2?r?`me, ${u}`:`${u}`:r?`me, ${u}, +${i-n}`:`${u}, +${i-n}`}const l=[{amount:60,name:"seconds"},{amount:60,name:"minutes"},{amount:24,name:"hours"},{amount:7,name:"days"},{amount:4.34524,name:"weeks"},{amount:12,name:"months"},{amount:Number.POSITIVE_INFINITY,name:"years"}],D=t=>{const e=new Intl.RelativeTimeFormat(void 0,{numeric:"auto"}),a=new Date;let n=(t.getTime()-a.getTime())/1e3;for(let r=0;r<=l.length;r++){const o=l[r];if(Math.abs(n)<o.amount)return e.format(Math.round(n),o.name);n/=o.amount}};function M(t){return new Date(t.getFullYear(),t.getMonth()+1,0)}function I(t){return new Date(t.getFullYear(),t.getMonth(),1)}function S(t,e){return t.getFullYear()===e.getFullYear()&&t.getMonth()===e.getMonth()&&t.getDate()===e.getDate()}function F(t,e){return t.getFullYear()===e.getFullYear()&&t.getMonth()===e.getMonth()}function y(t){return t.replace(/\w\S*/g,e=>e.charAt(0).toUpperCase()+e.substr(1).toLowerCase())}function $(t){return t.replace("CATEGORY_","").replace(/_/g," ")}function c(t){return/<[^>]*>/g.test(t)?"html":"plain"}function C(t){var r,o;const e=t.headers,a=e&&((r=e.find(i=>i.name==="Content-Type"))==null?void 0:r.value)||"",n=e&&((o=e.find(i=>i.name==="Content-Disposition"))==null?void 0:o.value)||"";return!!(a.includes("text/html")||n.includes("inline")||t.body&&c(t.body)==="html")}function L(t){let n=t.split(`
2
- `).filter(o=>o.trim().length>0).map(o=>`<p>${o}</p>`).join("");const r=/((?:https?|ftp):\/\/[^\s]+)/g;return n=n.replace(r,'<a href="$1">$1</a>'),n}function b(t){return new DOMParser().parseFromString(t,"text/html").body.textContent||""}function P(t){return`${t.getHours().toString().padStart(2,"0")}:${t.getMinutes().toString().padStart(2,"0")}`}function O(){return Intl.DateTimeFormat().resolvedOptions().timeZone}exports.debug=f;exports.detectHTMLOrPlainText=c;exports.detectIfMessageIsHTML=C;exports.error=g;exports.formatDateTime=d;exports.formatEventName=T;exports.formatFolderName=$;exports.formatParticipants=w;exports.formatRecipient=p;exports.formatTimeAgo=D;exports.get24HourTime=P;exports.getFirstDayOfMonth=I;exports.getLastDayOfMonth=M;exports.getUserTimezone=O;exports.htmlToPlainText=b;exports.isSameDay=S;exports.isSameMonth=F;exports.parsePlainTextToHTML=L;exports.toTitleCase=y;exports.uniqueID=h;