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