@nylas/react 1.0.1-prealpha1 → 1.0.2-canary.0
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.
- package/dist/add-circle-icon_13.entry-6dccb5e5.cjs +1 -0
- package/dist/add-circle-icon_13.entry-ab84be80.js +1050 -0
- package/dist/{archive-icon_7.entry-baecb43c.cjs → archive-icon_7.entry-0deb31c2.cjs} +1 -1
- package/dist/{archive-icon_7.entry-9f3eca2c.js → archive-icon_7.entry-187a3484.js} +20 -20
- package/dist/arrow-icon.entry-b782e05a.js +15 -0
- package/dist/{arrow-icon.entry-9ab0c414.cjs → arrow-icon.entry-fb0ebc89.cjs} +1 -1
- package/dist/auth-store-764d3768-3e9c24a0.js +66 -0
- package/dist/auth-store-764d3768-ce84fc6a.cjs +1 -0
- package/dist/{bold-icon_3.entry-50406bc7.cjs → bold-icon_3.entry-49e5a1d0.cjs} +1 -1
- package/dist/{bold-icon_3.entry-b0d81839.js → bold-icon_3.entry-8aebbbdb.js} +4 -4
- package/dist/{calendar-cancel-icon.entry-0d07e33c.js → calendar-cancel-icon.entry-305c099c.js} +2 -2
- package/dist/{calendar-cancel-icon.entry-8f498984.cjs → calendar-cancel-icon.entry-3f4d6cf2.cjs} +1 -1
- package/dist/calendar-check-icon_2.entry-1bf4163c.js +25 -0
- package/dist/calendar-check-icon_2.entry-fa7c033a.cjs +1 -0
- package/dist/{calendar-icon.entry-219efd7a.cjs → calendar-icon.entry-78433555.cjs} +1 -1
- package/dist/{calendar-icon.entry-e5f20598.js → calendar-icon.entry-b5678535.js} +7 -7
- package/dist/chevron-icon.entry-49b0d3e7.cjs +1 -0
- package/dist/{chevron-icon.entry-f5d5d1b1.js → chevron-icon.entry-f484c9a3.js} +5 -5
- package/dist/close-icon.entry-24d5c268.js +15 -0
- package/dist/close-icon.entry-37965d55.cjs +1 -0
- package/dist/{nylas-booked-event-card_10.entry-f2481a57.js → constants-d93cf397-dd67263d.js} +1636 -2376
- package/dist/{nylas-booked-event-card_10.entry-27efa654.cjs → constants-d93cf397-e3587f5c.cjs} +6 -6
- package/dist/document-refresh-icon.entry-0e8935fa.cjs +1 -0
- package/dist/{document-refresh-icon.entry-89ad42fa.js → document-refresh-icon.entry-8791ab16.js} +5 -5
- package/dist/elements/index.d.ts +16 -0
- package/dist/{forward-icon_6.entry-ce725f05.cjs → forward-icon_6.entry-903ccd33.cjs} +3 -3
- package/dist/{forward-icon_6.entry-0a6dff18.js → forward-icon_6.entry-cb605bfc.js} +82 -82
- package/dist/globe-icon_3.entry-71d83904.js +109 -0
- package/dist/globe-icon_3.entry-c6aefc52.cjs +1 -0
- package/dist/{index-b30d446a-e0eaccad.js → index-10914bc1-1a809477.js} +2 -2
- package/dist/{index-b30d446a-3d69a3cc.cjs → index-10914bc1-93ff6f46.cjs} +1 -1
- package/dist/index-cee193d2.cjs +30 -0
- package/dist/index-e834697b.js +1562 -0
- package/dist/index.d.ts +1 -1
- package/dist/info-icon.entry-3774a4e3.js +15 -0
- package/dist/info-icon.entry-85bf3fbc.cjs +1 -0
- package/dist/loading-icon.entry-8941102c.js +15 -0
- package/dist/{loading-icon.entry-d2680046.cjs → loading-icon.entry-ae6c7b74.cjs} +1 -1
- package/dist/mailbox-store-6b9425dc-a0366cf2.cjs +1 -0
- package/dist/{mailbox-store-19f0c6c9-23a4e72f.js → mailbox-store-6b9425dc-c249fa99.js} +59 -121
- package/dist/nylas-booked-event-card_10.entry-a166d51d.js +739 -0
- package/dist/nylas-booked-event-card_10.entry-b181a874.cjs +1 -0
- package/dist/nylas-form-card.entry-7173dd4a.js +56 -0
- package/dist/nylas-form-card.entry-8fdbefa6.cjs +1 -0
- package/dist/nylas-if-state_3.entry-2093c593.cjs +1 -0
- package/dist/{nylas-if-state_3.entry-d805d4c6.js → nylas-if-state_3.entry-e7b615a1.js} +12 -10
- package/dist/{nylas-list-folders.entry-472bd255.js → nylas-list-folders.entry-744293ae.js} +9 -8
- package/dist/nylas-list-folders.entry-dff7a835.cjs +1 -0
- package/dist/{nylas-list-threads.entry-f3266bf7.js → nylas-list-threads.entry-85ad1b74.js} +5 -4
- package/dist/nylas-list-threads.entry-edb1d265.cjs +1 -0
- package/dist/{nylas-mailbox-pagination.entry-bd0d3bda.js → nylas-mailbox-pagination.entry-55ef4b8c.js} +4 -3
- package/dist/nylas-mailbox-pagination.entry-5b888a0e.cjs +1 -0
- package/dist/nylas-mailbox-toolbar-button.entry-bb42156a.cjs +1 -0
- package/dist/{nylas-mailbox-toolbar-button.entry-9641b5cd.js → nylas-mailbox-toolbar-button.entry-bdcf7d17.js} +9 -8
- package/dist/nylas-open-hours-picker.entry-0f4f34f6.cjs +1 -0
- package/dist/{nylas-open-hours-picker.entry-42942946.js → nylas-open-hours-picker.entry-7e7060fe.js} +59 -58
- package/dist/nylas-provider.entry-1dc58829.js +155 -0
- package/dist/nylas-provider.entry-cb1ef04e.cjs +1 -0
- package/dist/nylas-scheduler-config.entry-2382ac1b.js +114 -0
- package/dist/nylas-scheduler-config.entry-477d2171.cjs +1 -0
- package/dist/nylas-scheduler-editor.entry-1a95d313.cjs +1 -0
- package/dist/nylas-scheduler-editor.entry-c0479087.js +140 -0
- package/dist/nylas-scheduler.entry-69ecc3ae.cjs +1 -0
- package/dist/{nylas-scheduler.entry-3b7cb841.js → nylas-scheduler.entry-7084c148.js} +20 -19
- package/dist/nylas-threads-refresh.entry-b35f1b68.cjs +1 -0
- package/dist/{nylas-threads-refresh.entry-7d567ed1.js → nylas-threads-refresh.entry-ef5d6dfd.js} +13 -12
- package/dist/nylas-threads-search.entry-2dda7524.cjs +1 -0
- package/dist/{nylas-threads-search.entry-c881d54b.js → nylas-threads-search.entry-e570bf8e.js} +13 -12
- package/dist/nylas-view-thread.entry-1ee0680f.cjs +1 -0
- package/dist/{nylas-view-thread.entry-d8de6c83.js → nylas-view-thread.entry-3939c913.js} +5 -4
- package/dist/people-icon.entry-4a88822e.cjs +1 -0
- package/dist/people-icon.entry-69465395.js +15 -0
- package/dist/{play-icon_2.entry-cae94826.js → play-icon_2.entry-bc24fda7.js} +6 -6
- package/dist/play-icon_2.entry-bd9f650e.cjs +1 -0
- package/dist/react.cjs +1 -1
- package/dist/react.js +74 -58
- package/dist/{refresh-icon.entry-3e0aef26.cjs → refresh-icon.entry-678f92e7.cjs} +1 -1
- package/dist/{refresh-icon.entry-9563850b.js → refresh-icon.entry-bd2bf7ce.js} +4 -4
- package/dist/{register-component-152c6ad2-418db864.js → register-component-486ea571-1f151779.js} +2 -2
- package/dist/{register-component-152c6ad2-b0d34c36.cjs → register-component-486ea571-cdfe1ef9.cjs} +1 -1
- package/dist/scheduler-config-store-a059f30b-06c1aa21.cjs +1 -0
- package/dist/scheduler-config-store-a059f30b-ff3efc00.js +33 -0
- package/dist/{scheduler-store-7d48e682-39104219.js → scheduler-store-81058220-263a5f44.js} +53 -45
- package/dist/scheduler-store-81058220-a20698af.cjs +1 -0
- package/dist/translate-icon.entry-0c0dbba6.cjs +1 -0
- package/dist/translate-icon.entry-c1fcd2f8.js +15 -0
- package/dist/utils-df5c1963-1c47e21c.cjs +8 -0
- package/dist/utils-df5c1963-d9833bcb.js +2114 -0
- package/dist/warning-icon.entry-9631cd2e.js +15 -0
- package/dist/warning-icon.entry-dbd44cdb.cjs +1 -0
- package/package.json +6 -3
- package/dist/add-circle-icon.entry-4b8debfa.js +0 -15
- package/dist/add-circle-icon.entry-c5fdaa6f.cjs +0 -1
- package/dist/arrow-icon.entry-a3b36218.js +0 -15
- package/dist/calendar-check-icon_3.entry-5415e916.cjs +0 -1
- package/dist/calendar-check-icon_3.entry-cfb612c6.js +0 -35
- package/dist/chevron-icon.entry-3c709061.cjs +0 -1
- package/dist/close-icon_2.entry-eca351c4.js +0 -25
- package/dist/close-icon_2.entry-fa4f6d3e.cjs +0 -1
- package/dist/document-refresh-icon.entry-3a29a6e6.cjs +0 -1
- package/dist/globe-icon.entry-71414bc6.js +0 -15
- package/dist/globe-icon.entry-a0c9599a.cjs +0 -1
- package/dist/index-586a4206.cjs +0 -30
- package/dist/index-98d3a4da.js +0 -1498
- package/dist/loading-icon.entry-15debb7d.js +0 -15
- package/dist/mailbox-store-19f0c6c9-9a3ef58a.cjs +0 -1
- package/dist/nylas-if-state_3.entry-6c0bf8eb.cjs +0 -1
- package/dist/nylas-list-folders.entry-cc04a07e.cjs +0 -1
- package/dist/nylas-list-threads.entry-795c5a2b.cjs +0 -1
- package/dist/nylas-mailbox-pagination.entry-f701fd83.cjs +0 -1
- package/dist/nylas-mailbox-toolbar-button.entry-b9d6a3c8.cjs +0 -1
- package/dist/nylas-open-hours-picker.entry-aa103daf.cjs +0 -1
- package/dist/nylas-provider.entry-5bb55b2d.cjs +0 -1
- package/dist/nylas-provider.entry-b94198a1.js +0 -134
- package/dist/nylas-scheduler.entry-ea6fb146.cjs +0 -1
- package/dist/nylas-threads-refresh.entry-4002608b.cjs +0 -1
- package/dist/nylas-threads-search.entry-556f1219.cjs +0 -1
- package/dist/nylas-view-thread.entry-6faf1b51.cjs +0 -1
- package/dist/play-icon_2.entry-2e21b8b9.cjs +0 -1
- package/dist/scheduler-store-7d48e682-449277d4.cjs +0 -1
- package/dist/search-icon_3.entry-9b027cfc.cjs +0 -1
- package/dist/search-icon_3.entry-e36548ec.js +0 -101
- package/dist/utils-5074a070-ce33ee6b.js +0 -119
- 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;
|