@amp-labs/react 2.2.1 → 2.2.2
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/build/amp-react.cjs.js +10 -10
- package/build/amp-react.es.js +149 -126
- package/package.json +1 -1
package/build/amp-react.es.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { jsx as p, jsxs as
|
|
1
|
+
import { jsx as p, jsxs as X, Fragment as bt } from "react/jsx-runtime";
|
|
2
2
|
import * as V from "react";
|
|
3
|
-
import Ke, { createContext as Ot, useContext as Ct, useState as z, useCallback as ce, useMemo as Qe, useEffect as
|
|
3
|
+
import Ke, { createContext as Ot, useContext as Ct, useState as z, useCallback as ce, useMemo as Qe, useEffect as G, useRef as Ce, cloneElement as Yl, useLayoutEffect as Ua, useReducer as Zl, Component as Ql, useImperativeHandle as eu, forwardRef as Ba, createElement as Fr } from "react";
|
|
4
4
|
import "react-dom";
|
|
5
5
|
const qa = Ot(null), tu = qa.Provider, Je = () => {
|
|
6
6
|
const e = Ct(qa);
|
|
@@ -1852,7 +1852,7 @@ class ts {
|
|
|
1852
1852
|
this.connectionApi = new Cp(t), this.installationApi = new Np(t), this.integrationApi = new Ep(t), this.oAuthApi = new Sp(t), this.projectApi = new Tp(t), this.providerApi = new xp(t), this.providerAppApi = new Rp(t), this.revisionApi = new Ap(t);
|
|
1853
1853
|
}
|
|
1854
1854
|
}
|
|
1855
|
-
const ns = "2.2.
|
|
1855
|
+
const ns = "2.2.2", Pp = "v1", br = "https://api.withampersand.com";
|
|
1856
1856
|
function rs() {
|
|
1857
1857
|
try {
|
|
1858
1858
|
const e = process.env.REACT_APP_AMP_SERVER;
|
|
@@ -1925,7 +1925,7 @@ const et = async (e, t) => {
|
|
|
1925
1925
|
};
|
|
1926
1926
|
function $p({ projectIdOrName: e, children: t }) {
|
|
1927
1927
|
const n = Je(), { setError: r } = zt(), [i, o] = z(null), [a, s] = z(!0);
|
|
1928
|
-
|
|
1928
|
+
G(() => {
|
|
1929
1929
|
Pe().integrationApi.listIntegrations({ projectIdOrName: e }, {
|
|
1930
1930
|
headers: {
|
|
1931
1931
|
"X-Api-Key": n ?? ""
|
|
@@ -1956,7 +1956,7 @@ const as = Ot({
|
|
|
1956
1956
|
};
|
|
1957
1957
|
function Vp({ projectIdOrName: e, children: t }) {
|
|
1958
1958
|
const n = Kp(), { setError: r } = zt(), [i, o] = z(null), [a, s] = z(!0);
|
|
1959
|
-
|
|
1959
|
+
G(() => {
|
|
1960
1960
|
async function l() {
|
|
1961
1961
|
(await n()).projectApi.getProject({ projectIdOrName: e }).then((d) => {
|
|
1962
1962
|
s(!1), o(d);
|
|
@@ -1994,7 +1994,7 @@ function My() {
|
|
|
1994
1994
|
return e;
|
|
1995
1995
|
}
|
|
1996
1996
|
function Up() {
|
|
1997
|
-
return /* @__PURE__ */
|
|
1997
|
+
return /* @__PURE__ */ X("svg", { width: "48", height: "48", viewBox: "0 0 48 48", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
1998
1998
|
/* @__PURE__ */ p(
|
|
1999
1999
|
"path",
|
|
2000
2000
|
{
|
|
@@ -2034,7 +2034,7 @@ const Wp = "_errorBoxContainer_4sdb2_1", jp = "_errorBox_4sdb2_1", Jp = "_errorT
|
|
|
2034
2034
|
errorText: Jp
|
|
2035
2035
|
};
|
|
2036
2036
|
function ss({ message: e }) {
|
|
2037
|
-
return /* @__PURE__ */
|
|
2037
|
+
return /* @__PURE__ */ X(Hn, { className: fo.errorBoxContainer, children: [
|
|
2038
2038
|
/* @__PURE__ */ p(Up, {}),
|
|
2039
2039
|
/* @__PURE__ */ p(cn, { className: fo.errorBox, children: /* @__PURE__ */ p("p", { className: fo.errorText, children: e }) })
|
|
2040
2040
|
] });
|
|
@@ -2137,7 +2137,7 @@ function nf({
|
|
|
2137
2137
|
() => tf(t, m || []),
|
|
2138
2138
|
[t, m]
|
|
2139
2139
|
);
|
|
2140
|
-
|
|
2140
|
+
G(() => {
|
|
2141
2141
|
N === null && (m != null && m.length) && console.error(`Integration "${t}" not found in integration list`);
|
|
2142
2142
|
}, [t, N, m]);
|
|
2143
2143
|
const L = ce((J) => {
|
|
@@ -2160,7 +2160,7 @@ function nf({
|
|
|
2160
2160
|
},
|
|
2161
2161
|
[N, d, u, f, i]
|
|
2162
2162
|
), W = (N == null ? void 0 : N.id) || "";
|
|
2163
|
-
|
|
2163
|
+
G(() => {
|
|
2164
2164
|
T();
|
|
2165
2165
|
}, [T]);
|
|
2166
2166
|
const j = Qe(() => ({
|
|
@@ -2232,7 +2232,7 @@ function ps({
|
|
|
2232
2232
|
throw new Error(
|
|
2233
2233
|
"ConnectionsProvider must be given a provider prop or be used within InstallIntegrationProvider"
|
|
2234
2234
|
);
|
|
2235
|
-
|
|
2235
|
+
G(() => {
|
|
2236
2236
|
i && r && Pe().connectionApi.listConnections(
|
|
2237
2237
|
{ projectIdOrName: i, groupRef: t, provider: O },
|
|
2238
2238
|
{
|
|
@@ -3158,7 +3158,7 @@ function xf({
|
|
|
3158
3158
|
}) {
|
|
3159
3159
|
var O;
|
|
3160
3160
|
const { selectedConnection: n } = Tn(), { integrationId: r, integrationObj: i } = vt(), [o, a] = z(null), [s, c] = z(!0), { isError: l, removeError: u, setError: d } = zt(), m = Je(), f = n == null ? void 0 : n.id, v = (O = i == null ? void 0 : i.latestRevision) == null ? void 0 : O.id, y = (i == null ? void 0 : i.name) || r;
|
|
3161
|
-
|
|
3161
|
+
G(() => {
|
|
3162
3162
|
e && r && v && f && m && Pe().revisionApi.getHydratedRevision({
|
|
3163
3163
|
projectIdOrName: e,
|
|
3164
3164
|
integrationId: r,
|
|
@@ -4878,7 +4878,7 @@ function sm(e, t) {
|
|
|
4878
4878
|
}
|
|
4879
4879
|
var va = ni(function(e, t) {
|
|
4880
4880
|
Ms(e, t);
|
|
4881
|
-
}, 200), cm = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u" ? Ua :
|
|
4881
|
+
}, 200), cm = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u" ? Ua : G, lm = "useId" in Ke ? function(t) {
|
|
4882
4882
|
var n = t.id, r = t.labelId, i = t.menuId, o = t.getItemId, a = t.toggleButtonId, s = t.inputId, c = "downshift-" + Ke.useId();
|
|
4883
4883
|
n || (n = c);
|
|
4884
4884
|
var l = Ce({
|
|
@@ -4932,7 +4932,7 @@ function dm(e, t, n, r) {
|
|
|
4932
4932
|
props: u.current
|
|
4933
4933
|
}, f));
|
|
4934
4934
|
}, [u]), m = o.current;
|
|
4935
|
-
return
|
|
4935
|
+
return G(function() {
|
|
4936
4936
|
var f = Lr(i.current, m == null ? void 0 : m.props), v = m && i.current && !r(f, c);
|
|
4937
4937
|
v && im(m, f, c), i.current = c;
|
|
4938
4938
|
}, [c, m, r]), [c, d];
|
|
@@ -4987,7 +4987,7 @@ function fm(e, t, n) {
|
|
|
4987
4987
|
isTouchMove: !1,
|
|
4988
4988
|
isTouchEnd: !1
|
|
4989
4989
|
});
|
|
4990
|
-
return
|
|
4990
|
+
return G(function() {
|
|
4991
4991
|
if (!e)
|
|
4992
4992
|
return dt;
|
|
4993
4993
|
var i = n.map(function(u) {
|
|
@@ -5022,7 +5022,7 @@ process.env.NODE_ENV !== "production" && (Zs = function() {
|
|
|
5022
5022
|
var i = Ce(n.reduce(function(a, s) {
|
|
5023
5023
|
return a[s] = {}, a;
|
|
5024
5024
|
}, {}));
|
|
5025
|
-
|
|
5025
|
+
G(function() {
|
|
5026
5026
|
Object.keys(i.current).forEach(function(a) {
|
|
5027
5027
|
var s = i.current[a];
|
|
5028
5028
|
if (!Object.keys(s).length) {
|
|
@@ -5045,12 +5045,12 @@ process.env.NODE_ENV !== "production" && (Zs = function() {
|
|
|
5045
5045
|
function mm(e, t, n, r) {
|
|
5046
5046
|
r === void 0 && (r = {});
|
|
5047
5047
|
var i = r.document, o = Zr();
|
|
5048
|
-
|
|
5048
|
+
G(function() {
|
|
5049
5049
|
if (!(!e || o || !i)) {
|
|
5050
5050
|
var a = e(t);
|
|
5051
5051
|
va(a, i);
|
|
5052
5052
|
}
|
|
5053
|
-
}, n),
|
|
5053
|
+
}, n), G(function() {
|
|
5054
5054
|
return function() {
|
|
5055
5055
|
va.cancel(), Gf(i);
|
|
5056
5056
|
};
|
|
@@ -5065,7 +5065,7 @@ function hm(e) {
|
|
|
5065
5065
|
var Qs = dt;
|
|
5066
5066
|
process.env.NODE_ENV !== "production" && (Qs = function(t) {
|
|
5067
5067
|
var n = t.props, r = t.state, i = Ce(n), o = Zr();
|
|
5068
|
-
|
|
5068
|
+
G(function() {
|
|
5069
5069
|
o || (ri(r, i.current, n), i.current = n);
|
|
5070
5070
|
}, [r, n, o]);
|
|
5071
5071
|
});
|
|
@@ -5264,7 +5264,7 @@ var wm = pe({}, ec, {
|
|
|
5264
5264
|
});
|
|
5265
5265
|
function _m(e, t, n, r) {
|
|
5266
5266
|
var i = Ce(), o = dm(e, t, n, r), a = o[0], s = o[1], c = Zr();
|
|
5267
|
-
return
|
|
5267
|
+
return G(function() {
|
|
5268
5268
|
if (Kr(t, "selectedItem")) {
|
|
5269
5269
|
if (!c) {
|
|
5270
5270
|
var l = t.itemToKey(t.selectedItem) !== t.itemToKey(i.current);
|
|
@@ -5405,10 +5405,10 @@ function yi(e) {
|
|
|
5405
5405
|
Qs({
|
|
5406
5406
|
props: t,
|
|
5407
5407
|
state: s
|
|
5408
|
-
}),
|
|
5408
|
+
}), G(function() {
|
|
5409
5409
|
var M = Gn(t, "isOpen");
|
|
5410
5410
|
M && y.current && y.current.focus();
|
|
5411
|
-
}, []),
|
|
5411
|
+
}, []), G(function() {
|
|
5412
5412
|
O || (b.current = n.length);
|
|
5413
5413
|
});
|
|
5414
5414
|
var L = fm(i, ce(function() {
|
|
@@ -5419,9 +5419,9 @@ function yi(e) {
|
|
|
5419
5419
|
}, [c, _]), Qe(function() {
|
|
5420
5420
|
return [f, I, y];
|
|
5421
5421
|
}, [f.current, I.current, y.current])), T = Zs("getInputProps", "getMenuProps");
|
|
5422
|
-
|
|
5422
|
+
G(function() {
|
|
5423
5423
|
l || (v.current = {});
|
|
5424
|
-
}, [l]),
|
|
5424
|
+
}, [l]), G(function() {
|
|
5425
5425
|
var M;
|
|
5426
5426
|
!l || !(i != null && i.document) || !(y != null && (M = y.current) != null && M.focus) || i.document.activeElement !== y.current && y.current.focus();
|
|
5427
5427
|
}, [l, i]);
|
|
@@ -5654,7 +5654,7 @@ function $m({
|
|
|
5654
5654
|
disabled: i
|
|
5655
5655
|
}) {
|
|
5656
5656
|
const [o, a] = z(e), s = Ce(null);
|
|
5657
|
-
|
|
5657
|
+
G(() => a(e), [e]);
|
|
5658
5658
|
const c = (_) => {
|
|
5659
5659
|
a(e.filter(Km(_)));
|
|
5660
5660
|
}, {
|
|
@@ -5684,8 +5684,8 @@ function $m({
|
|
|
5684
5684
|
},
|
|
5685
5685
|
[e, t]
|
|
5686
5686
|
), b = () => y(g || "");
|
|
5687
|
-
return /* @__PURE__ */
|
|
5688
|
-
/* @__PURE__ */ p("div", { className: qt.comboboxContainer, children: /* @__PURE__ */
|
|
5687
|
+
return /* @__PURE__ */ X("div", { children: [
|
|
5688
|
+
/* @__PURE__ */ p("div", { className: qt.comboboxContainer, children: /* @__PURE__ */ X("div", { className: qt.inputContainer, children: [
|
|
5689
5689
|
/* @__PURE__ */ p(
|
|
5690
5690
|
"input",
|
|
5691
5691
|
{
|
|
@@ -6750,7 +6750,7 @@ const Ea = async ({ elementReference: e = null, tooltipReference: t = null, tool
|
|
|
6750
6750
|
t = t.parentElement;
|
|
6751
6751
|
}
|
|
6752
6752
|
return document.scrollingElement || document.documentElement;
|
|
6753
|
-
}, Ch = typeof window < "u" ? Ua :
|
|
6753
|
+
}, Ch = typeof window < "u" ? Ua : G, _t = (e) => {
|
|
6754
6754
|
e.current && (clearTimeout(e.current), e.current = null);
|
|
6755
6755
|
}, Nh = "DEFAULT_TOOLTIP_ID", Eh = { anchorRefs: /* @__PURE__ */ new Set(), activeAnchor: { current: null }, attach: () => {
|
|
6756
6756
|
}, detach: () => {
|
|
@@ -6775,7 +6775,7 @@ const Th = ({ forwardRef: e, id: t, className: n, classNameArrow: r, variant: i
|
|
|
6775
6775
|
xe.current && (E == null || E(H), me === void 0 && Le(H));
|
|
6776
6776
|
}, 10));
|
|
6777
6777
|
};
|
|
6778
|
-
|
|
6778
|
+
G(() => {
|
|
6779
6779
|
if (me === void 0) return () => null;
|
|
6780
6780
|
me && $e(!0);
|
|
6781
6781
|
const H = setTimeout(() => {
|
|
@@ -6784,7 +6784,7 @@ const Th = ({ forwardRef: e, id: t, className: n, classNameArrow: r, variant: i
|
|
|
6784
6784
|
return () => {
|
|
6785
6785
|
clearTimeout(H);
|
|
6786
6786
|
};
|
|
6787
|
-
}, [me]),
|
|
6787
|
+
}, [me]), G(() => {
|
|
6788
6788
|
if (be !== Xe.current) if (_t(R), Xe.current = be, be) ne == null || ne();
|
|
6789
6789
|
else {
|
|
6790
6790
|
const H = ((ae) => {
|
|
@@ -6842,7 +6842,7 @@ const Th = ({ forwardRef: e, id: t, className: n, classNameArrow: r, variant: i
|
|
|
6842
6842
|
xe.current && $t(Fe);
|
|
6843
6843
|
});
|
|
6844
6844
|
}, [be, A, oe, J, s, ve == null ? void 0 : ve.place, c, d, ee, ve == null ? void 0 : ve.position, I]);
|
|
6845
|
-
|
|
6845
|
+
G(() => {
|
|
6846
6846
|
var H, ae;
|
|
6847
6847
|
const se = new Set(Et);
|
|
6848
6848
|
qe.forEach((Oe) => {
|
|
@@ -6889,7 +6889,7 @@ const Th = ({ forwardRef: e, id: t, className: n, classNameArrow: r, variant: i
|
|
|
6889
6889
|
});
|
|
6890
6890
|
});
|
|
6891
6891
|
};
|
|
6892
|
-
}, [A, fe, ze, Et, qe, L, T, W, Tt, v, y]),
|
|
6892
|
+
}, [A, fe, ze, Et, qe, L, T, W, Tt, v, y]), G(() => {
|
|
6893
6893
|
var H, ae;
|
|
6894
6894
|
let se = (ae = (H = ve == null ? void 0 : ve.anchorSelect) !== null && H !== void 0 ? H : a) !== null && ae !== void 0 ? ae : "";
|
|
6895
6895
|
!se && t && (se = `[data-tooltip-id='${t.replace(/'/g, "\\'")}']`);
|
|
@@ -6919,9 +6919,9 @@ const Th = ({ forwardRef: e, id: t, className: n, classNameArrow: r, variant: i
|
|
|
6919
6919
|
return Fe.observe(document.body, { childList: !0, subtree: !0, attributes: !0, attributeFilter: ["data-tooltip-id"], attributeOldValue: !0 }), () => {
|
|
6920
6920
|
Fe.disconnect();
|
|
6921
6921
|
};
|
|
6922
|
-
}, [t, a, ve == null ? void 0 : ve.anchorSelect, A]),
|
|
6922
|
+
}, [t, a, ve == null ? void 0 : ve.anchorSelect, A]), G(() => {
|
|
6923
6923
|
fe();
|
|
6924
|
-
}, [fe]),
|
|
6924
|
+
}, [fe]), G(() => {
|
|
6925
6925
|
if (!(te != null && te.current)) return () => null;
|
|
6926
6926
|
const H = new ResizeObserver(() => {
|
|
6927
6927
|
setTimeout(() => fe());
|
|
@@ -6929,13 +6929,13 @@ const Th = ({ forwardRef: e, id: t, className: n, classNameArrow: r, variant: i
|
|
|
6929
6929
|
return H.observe(te.current), () => {
|
|
6930
6930
|
H.disconnect();
|
|
6931
6931
|
};
|
|
6932
|
-
}, [oe, te == null ? void 0 : te.current]),
|
|
6932
|
+
}, [oe, te == null ? void 0 : te.current]), G(() => {
|
|
6933
6933
|
var H;
|
|
6934
6934
|
const ae = document.querySelector(`[id='${o}']`), se = [...qe, ae];
|
|
6935
6935
|
A && se.includes(A) || M((H = qe[0]) !== null && H !== void 0 ? H : ae);
|
|
6936
|
-
}, [o, qe, A]),
|
|
6936
|
+
}, [o, qe, A]), G(() => (ge && Re(!0), () => {
|
|
6937
6937
|
_t(B), _t(ue);
|
|
6938
|
-
}), []),
|
|
6938
|
+
}), []), G(() => {
|
|
6939
6939
|
var H;
|
|
6940
6940
|
let ae = (H = ve == null ? void 0 : ve.anchorSelect) !== null && H !== void 0 ? H : a;
|
|
6941
6941
|
if (!ae && t && (ae = `[data-tooltip-id='${t.replace(/'/g, "\\'")}']`), ae) try {
|
|
@@ -6944,7 +6944,7 @@ const Th = ({ forwardRef: e, id: t, className: n, classNameArrow: r, variant: i
|
|
|
6944
6944
|
} catch {
|
|
6945
6945
|
Ve([]);
|
|
6946
6946
|
}
|
|
6947
|
-
}, [t, a, ve == null ? void 0 : ve.anchorSelect]),
|
|
6947
|
+
}, [t, a, ve == null ? void 0 : ve.anchorSelect]), G(() => {
|
|
6948
6948
|
B.current && (_t(B), Gt(v));
|
|
6949
6949
|
}, [v]);
|
|
6950
6950
|
const He = (Z = ve == null ? void 0 : ve.content) !== null && Z !== void 0 ? Z : oe, Ut = be && Object.keys(he.tooltipStyles).length > 0;
|
|
@@ -7002,31 +7002,31 @@ const Th = ({ forwardRef: e, id: t, className: n, classNameArrow: r, variant: i
|
|
|
7002
7002
|
(He = nt[re]) === null || He === void 0 || He.call(nt, fe);
|
|
7003
7003
|
});
|
|
7004
7004
|
};
|
|
7005
|
-
|
|
7005
|
+
G(() => {
|
|
7006
7006
|
Q(r);
|
|
7007
|
-
}, [r]),
|
|
7007
|
+
}, [r]), G(() => {
|
|
7008
7008
|
ue(i);
|
|
7009
|
-
}, [i]),
|
|
7009
|
+
}, [i]), G(() => {
|
|
7010
7010
|
he(l);
|
|
7011
|
-
}, [l]),
|
|
7011
|
+
}, [l]), G(() => {
|
|
7012
7012
|
be(c);
|
|
7013
|
-
}, [c]),
|
|
7013
|
+
}, [c]), G(() => {
|
|
7014
7014
|
ze(u);
|
|
7015
|
-
}, [u]),
|
|
7015
|
+
}, [u]), G(() => {
|
|
7016
7016
|
ve(O);
|
|
7017
|
-
}, [O]),
|
|
7017
|
+
}, [O]), G(() => {
|
|
7018
7018
|
Xe(g);
|
|
7019
|
-
}, [g]),
|
|
7019
|
+
}, [g]), G(() => {
|
|
7020
7020
|
Et(b);
|
|
7021
|
-
}, [b]),
|
|
7021
|
+
}, [b]), G(() => {
|
|
7022
7022
|
Ge(_);
|
|
7023
|
-
}, [_]),
|
|
7023
|
+
}, [_]), G(() => {
|
|
7024
7024
|
Kt(y);
|
|
7025
|
-
}, [y]),
|
|
7025
|
+
}, [y]), G(() => {
|
|
7026
7026
|
Gt.current !== me && console.warn("[react-tooltip] Do not change `disableStyleInjection` dynamically.");
|
|
7027
|
-
}, [me]),
|
|
7027
|
+
}, [me]), G(() => {
|
|
7028
7028
|
typeof window < "u" && window.dispatchEvent(new CustomEvent("react-tooltip-inject-styles", { detail: { disableCore: me === "core", disableBase: me } }));
|
|
7029
|
-
}, []),
|
|
7029
|
+
}, []), G(() => {
|
|
7030
7030
|
var Te;
|
|
7031
7031
|
const nt = new Set(Vt);
|
|
7032
7032
|
let re = n;
|
|
@@ -7054,7 +7054,7 @@ const Th = ({ forwardRef: e, id: t, className: n, classNameArrow: r, variant: i
|
|
|
7054
7054
|
return () => {
|
|
7055
7055
|
Ut.disconnect();
|
|
7056
7056
|
};
|
|
7057
|
-
}, [Vt, pn, Re, t, n]),
|
|
7057
|
+
}, [Vt, pn, Re, t, n]), G(() => {
|
|
7058
7058
|
U != null && U.border && console.warn("[react-tooltip] Do not set `style.border`. Use `border` prop instead."), ge && !Sa("border", `${ge}`) && console.warn(`[react-tooltip] "${ge}" is not a valid \`border\`.`), U != null && U.opacity && console.warn("[react-tooltip] Do not set `style.opacity`. Use `opacity` prop instead."), E && !Sa("opacity", `${E}`) && console.warn(`[react-tooltip] "${E}" is not a valid \`opacity\`.`);
|
|
7059
7059
|
}, []);
|
|
7060
7060
|
let Yt = m;
|
|
@@ -7072,8 +7072,8 @@ typeof window < "u" && window.addEventListener("react-tooltip-inject-styles", (e
|
|
|
7072
7072
|
.styles-module_tooltip__mnnfp{padding:8px 16px;border-radius:3px;font-size:90%;width:max-content}.styles-module_arrow__K0L3T{width:8px;height:8px}[class*='react-tooltip__place-top']>.styles-module_arrow__K0L3T{transform:rotate(45deg)}[class*='react-tooltip__place-right']>.styles-module_arrow__K0L3T{transform:rotate(135deg)}[class*='react-tooltip__place-bottom']>.styles-module_arrow__K0L3T{transform:rotate(225deg)}[class*='react-tooltip__place-left']>.styles-module_arrow__K0L3T{transform:rotate(315deg)}.styles-module_dark__xNqje{background:var(--rt-color-dark);color:var(--rt-color-white)}.styles-module_light__Z6W-X{background-color:var(--rt-color-white);color:var(--rt-color-dark)}.styles-module_success__A2AKt{background-color:var(--rt-color-success);color:var(--rt-color-white)}.styles-module_warning__SCK0X{background-color:var(--rt-color-warning);color:var(--rt-color-white)}.styles-module_error__JvumD{background-color:var(--rt-color-error);color:var(--rt-color-white)}.styles-module_info__BWdHW{background-color:var(--rt-color-info);color:var(--rt-color-white)}`, type: "base" });
|
|
7073
7073
|
});
|
|
7074
7074
|
function Ah() {
|
|
7075
|
-
return /* @__PURE__ */
|
|
7076
|
-
/* @__PURE__ */
|
|
7075
|
+
return /* @__PURE__ */ X("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "17", viewBox: "0 0 16 17", fill: "none", children: [
|
|
7076
|
+
/* @__PURE__ */ X("g", { clipPath: "url(#clip0_2896_16290)", children: [
|
|
7077
7077
|
/* @__PURE__ */ p("path", { d: "M8.00032 11.167L8.00032 7.83366M8.00032 1.83366C4.33366 1.83366 1.33366 4.83366 1.33366 8.50033C1.33366 12.167 4.33366 15.167 8.00033 15.167C11.667 15.167 14.667 12.167 14.667 8.50033C14.667 4.83366 11.667 1.83366 8.00032 1.83366Z", stroke: "#6B7280", strokeLinecap: "round", strokeLinejoin: "round" }),
|
|
7078
7078
|
/* @__PURE__ */ p("path", { d: "M8.00293 5.83301L7.99768 5.83301", stroke: "#6B7280", strokeLinecap: "round", strokeLinejoin: "round" })
|
|
7079
7079
|
] }),
|
|
@@ -7081,7 +7081,7 @@ function Ah() {
|
|
|
7081
7081
|
] });
|
|
7082
7082
|
}
|
|
7083
7083
|
function Ph({ id: e, tooltipText: t }) {
|
|
7084
|
-
return /* @__PURE__ */
|
|
7084
|
+
return /* @__PURE__ */ X(bt, { children: [
|
|
7085
7085
|
/* @__PURE__ */ p("span", { "data-tooltip-id": e, style: { maxWidth: "20rem" }, children: Ah() }),
|
|
7086
7086
|
/* @__PURE__ */ p(Rh, { id: e, place: "top", content: t, style: { maxWidth: "30rem" } })
|
|
7087
7087
|
] });
|
|
@@ -7577,7 +7577,7 @@ function jh({ children: e }) {
|
|
|
7577
7577
|
i,
|
|
7578
7578
|
o
|
|
7579
7579
|
] = z(Wh), a = t == null ? void 0 : t.config;
|
|
7580
|
-
|
|
7580
|
+
G(() => {
|
|
7581
7581
|
n != null && n.content && !r && a && !(Object.entries(i).length > 0) && gf(
|
|
7582
7582
|
n,
|
|
7583
7583
|
a,
|
|
@@ -7652,7 +7652,7 @@ function Si(e, t, n, r) {
|
|
|
7652
7652
|
function Pc({ field: e, onSelectChange: t, allFields: n }) {
|
|
7653
7653
|
var m;
|
|
7654
7654
|
const { configureState: r, selectedObjectName: i, setConfigureState: o } = un(), [a, s] = z(!0), c = (m = r == null ? void 0 : r.read) == null ? void 0 : m.selectedFieldMappings, l = c == null ? void 0 : c[e.mapToName];
|
|
7655
|
-
|
|
7655
|
+
G(() => {
|
|
7656
7656
|
e._default && !l && i && r && Si(i, o, e.mapToName, e._default), s(!1);
|
|
7657
7657
|
}, [e, o, i, l, r]);
|
|
7658
7658
|
const u = Qe(() => n.map((f) => ({
|
|
@@ -7676,8 +7676,8 @@ function Pc({ field: e, onSelectChange: t, allFields: n }) {
|
|
|
7676
7676
|
placeholder: "Please select one"
|
|
7677
7677
|
}
|
|
7678
7678
|
);
|
|
7679
|
-
return /* @__PURE__ */
|
|
7680
|
-
/* @__PURE__ */
|
|
7679
|
+
return /* @__PURE__ */ X("div", { style: { display: "flex", flexDirection: "column" }, children: [
|
|
7680
|
+
/* @__PURE__ */ X(
|
|
7681
7681
|
"div",
|
|
7682
7682
|
{
|
|
7683
7683
|
style: {
|
|
@@ -7713,7 +7713,7 @@ function Dc({
|
|
|
7713
7713
|
errorMessage: o,
|
|
7714
7714
|
children: a
|
|
7715
7715
|
}) {
|
|
7716
|
-
return /* @__PURE__ */
|
|
7716
|
+
return /* @__PURE__ */ X(
|
|
7717
7717
|
"div",
|
|
7718
7718
|
{
|
|
7719
7719
|
className: pt(yn.formControl, {
|
|
@@ -7754,7 +7754,7 @@ function Ti({ className: e, style: t }) {
|
|
|
7754
7754
|
);
|
|
7755
7755
|
}
|
|
7756
7756
|
function cr({ string: e }) {
|
|
7757
|
-
return /* @__PURE__ */
|
|
7757
|
+
return /* @__PURE__ */ X(
|
|
7758
7758
|
"div",
|
|
7759
7759
|
{
|
|
7760
7760
|
style: {
|
|
@@ -7792,7 +7792,7 @@ function ng() {
|
|
|
7792
7792
|
},
|
|
7793
7793
|
[t]
|
|
7794
7794
|
);
|
|
7795
|
-
return a != null && a.length ? /* @__PURE__ */
|
|
7795
|
+
return a != null && a.length ? /* @__PURE__ */ X(bt, { children: [
|
|
7796
7796
|
/* @__PURE__ */ p(cr, { string: "Map the following optional fields" }),
|
|
7797
7797
|
/* @__PURE__ */ p("div", { style: { display: "flex", gap: "1rem", flexDirection: "column" }, children: a.map((s) => {
|
|
7798
7798
|
var c;
|
|
@@ -7823,7 +7823,7 @@ function rg() {
|
|
|
7823
7823
|
const c = ((d = t == null ? void 0 : t.read) == null ? void 0 : d.requiredMapFields) || [], l = e && r ? Object.values(r[e] || {}).flat() : [];
|
|
7824
7824
|
return c.concat(l).reduce((m, f) => m.find((y) => y.mapToName === f.mapToName) ? m.map((y) => y.mapToName === f.mapToName ? f : y) : m.concat(f), new Array());
|
|
7825
7825
|
}, [t, r, e]);
|
|
7826
|
-
return s != null && s.length ? /* @__PURE__ */
|
|
7826
|
+
return s != null && s.length ? /* @__PURE__ */ X(bt, { children: [
|
|
7827
7827
|
/* @__PURE__ */ p(cr, { string: "Map the following fields" }),
|
|
7828
7828
|
/* @__PURE__ */ p("div", { style: { display: "flex", gap: "1rem", flexDirection: "column" }, children: s.map((c) => {
|
|
7829
7829
|
var l;
|
|
@@ -7860,7 +7860,7 @@ function ag() {
|
|
|
7860
7860
|
const { project: e } = ke(), { hydratedRevision: t } = Un(), { selectedObjectName: n } = un(), { provider: r } = vt(), i = e == null ? void 0 : e.appName, o = ln(r), a = (m = (d = (u = t == null ? void 0 : t.content) == null ? void 0 : u.read) == null ? void 0 : d.objects) == null ? void 0 : m.find(
|
|
7861
7861
|
(f) => f.objectName === n
|
|
7862
7862
|
), s = (a == null ? void 0 : a.displayName) || n && Qn(n), c = a == null ? void 0 : a.mapToName, l = (a == null ? void 0 : a.mapToDisplayName) || c && Qn(c);
|
|
7863
|
-
return l && i && o ? /* @__PURE__ */ p(ig, { style: { marginTop: "1rem" }, children: /* @__PURE__ */
|
|
7863
|
+
return l && i && o ? /* @__PURE__ */ p(ig, { style: { marginTop: "1rem" }, children: /* @__PURE__ */ X("p", { style: { margin: "1rem 0" }, children: [
|
|
7864
7864
|
/* @__PURE__ */ p("b", { children: l }),
|
|
7865
7865
|
" in ",
|
|
7866
7866
|
i,
|
|
@@ -8168,7 +8168,7 @@ var yg = [
|
|
|
8168
8168
|
const w = () => g(b.current);
|
|
8169
8169
|
return _.addEventListener("reset", w), () => _.removeEventListener("reset", w);
|
|
8170
8170
|
}
|
|
8171
|
-
}, [m, g]), /* @__PURE__ */
|
|
8171
|
+
}, [m, g]), /* @__PURE__ */ X(wg, { scope: n, state: O, disabled: s, children: [
|
|
8172
8172
|
/* @__PURE__ */ p(
|
|
8173
8173
|
dn.button,
|
|
8174
8174
|
{
|
|
@@ -8315,7 +8315,7 @@ function Bc({
|
|
|
8315
8315
|
label: n,
|
|
8316
8316
|
onCheckedChange: r
|
|
8317
8317
|
}) {
|
|
8318
|
-
return /* @__PURE__ */
|
|
8318
|
+
return /* @__PURE__ */ X("div", { className: Vn.fieldContainer, children: [
|
|
8319
8319
|
/* @__PURE__ */ p(
|
|
8320
8320
|
$c,
|
|
8321
8321
|
{
|
|
@@ -8336,14 +8336,14 @@ function qc({
|
|
|
8336
8336
|
onCheckedChange: r,
|
|
8337
8337
|
isIndeterminate: i
|
|
8338
8338
|
}) {
|
|
8339
|
-
return /* @__PURE__ */
|
|
8339
|
+
return /* @__PURE__ */ X("div", { className: Vn.selectAllContainer, children: [
|
|
8340
8340
|
/* @__PURE__ */ p(
|
|
8341
8341
|
$c,
|
|
8342
8342
|
{
|
|
8343
8343
|
className: Vn.checkbox,
|
|
8344
8344
|
id: e,
|
|
8345
8345
|
onCheckedChange: r,
|
|
8346
|
-
children: /* @__PURE__ */
|
|
8346
|
+
children: /* @__PURE__ */ X(Vc, { children: [
|
|
8347
8347
|
i && /* @__PURE__ */ p(Ng, {}),
|
|
8348
8348
|
t === !0 && /* @__PURE__ */ p(Uc, {})
|
|
8349
8349
|
] })
|
|
@@ -8387,9 +8387,9 @@ function Pg() {
|
|
|
8387
8387
|
on(v) || Ka(r, n, v.fieldName, f);
|
|
8388
8388
|
});
|
|
8389
8389
|
}, c = !!(a && a.length > 0), l = Object.keys(i || {}).length === (a == null ? void 0 : a.length), u = !l && Object.keys(i || {}).length > 0;
|
|
8390
|
-
return c && /* @__PURE__ */
|
|
8390
|
+
return c && /* @__PURE__ */ X(bt, { children: [
|
|
8391
8391
|
/* @__PURE__ */ p(cr, { string: `${e} reads the following optional fields` }),
|
|
8392
|
-
/* @__PURE__ */
|
|
8392
|
+
/* @__PURE__ */ X(Wc, { children: [
|
|
8393
8393
|
((a == null ? void 0 : a.length) || 0) >= 2 && /* @__PURE__ */ p(
|
|
8394
8394
|
qc,
|
|
8395
8395
|
{
|
|
@@ -8439,7 +8439,7 @@ function Mg({ children: e, style: t, ...n }) {
|
|
|
8439
8439
|
function kg() {
|
|
8440
8440
|
var r, i, o;
|
|
8441
8441
|
const { configureState: e, selectedObjectName: t } = un(), { appName: n } = ke();
|
|
8442
|
-
return /* @__PURE__ */
|
|
8442
|
+
return /* @__PURE__ */ X(bt, { children: [
|
|
8443
8443
|
/* @__PURE__ */ p(cr, { string: `${n} reads the following ${t} fields` }),
|
|
8444
8444
|
/* @__PURE__ */ p(
|
|
8445
8445
|
"div",
|
|
@@ -8456,7 +8456,7 @@ function kg() {
|
|
|
8456
8456
|
] });
|
|
8457
8457
|
}
|
|
8458
8458
|
function Lg() {
|
|
8459
|
-
return /* @__PURE__ */
|
|
8459
|
+
return /* @__PURE__ */ X(bt, { children: [
|
|
8460
8460
|
/* @__PURE__ */ p(ag, {}),
|
|
8461
8461
|
/* @__PURE__ */ p(kg, {}),
|
|
8462
8462
|
/* @__PURE__ */ p(rg, {}),
|
|
@@ -8497,9 +8497,9 @@ function $g() {
|
|
|
8497
8497
|
$a(t, r, g.objectName, y);
|
|
8498
8498
|
}));
|
|
8499
8499
|
}, c = !!o, l = Object.keys(i || {}).length === ((v = (f = n == null ? void 0 : n.write) == null ? void 0 : f.writeObjects) == null ? void 0 : v.length), u = !l && Object.keys(i || {}).length > 0;
|
|
8500
|
-
return c && /* @__PURE__ */
|
|
8500
|
+
return c && /* @__PURE__ */ X(bt, { children: [
|
|
8501
8501
|
/* @__PURE__ */ p(cr, { string: `Allow ${e} to write to these objects` }),
|
|
8502
|
-
/* @__PURE__ */
|
|
8502
|
+
/* @__PURE__ */ X(Wc, { children: [
|
|
8503
8503
|
((o == null ? void 0 : o.length) || 0) >= 2 && /* @__PURE__ */ p(
|
|
8504
8504
|
qc,
|
|
8505
8505
|
{
|
|
@@ -8575,8 +8575,8 @@ function Jc({
|
|
|
8575
8575
|
}
|
|
8576
8576
|
function Hg() {
|
|
8577
8577
|
const { appName: e } = ke(), { installation: t } = vt();
|
|
8578
|
-
return /* @__PURE__ */
|
|
8579
|
-
t != null && t.id ? /* @__PURE__ */
|
|
8578
|
+
return /* @__PURE__ */ X("div", { style: { display: "flex", flexDirection: "column", gap: "1rem" }, children: [
|
|
8579
|
+
t != null && t.id ? /* @__PURE__ */ X("p", { children: [
|
|
8580
8580
|
"Once you uninstall this integration, all your configuration will be lost, and",
|
|
8581
8581
|
" ",
|
|
8582
8582
|
/* @__PURE__ */ p("b", { children: e }),
|
|
@@ -8594,8 +8594,8 @@ function zc({
|
|
|
8594
8594
|
}) {
|
|
8595
8595
|
var N, L, T;
|
|
8596
8596
|
const { installation: o } = vt(), { hydratedRevision: a, loading: s } = Un(), { configureState: c, selectedObjectName: l } = un(), u = o == null ? void 0 : o.config, d = u && l && !!hs(u, l) || !1, m = ((N = c == null ? void 0 : c.read) == null ? void 0 : N.isOptionalFieldsModified) || ((L = c == null ? void 0 : c.read) == null ? void 0 : L.isRequiredMapFieldsModified), f = (T = c == null ? void 0 : c.write) == null ? void 0 : T.isWriteModified, O = s || n || !c || !l || !(m || f || r || l !== On && !d), g = l === On, b = l === kr;
|
|
8597
|
-
return n ? /* @__PURE__ */ p(Zn, {}) : /* @__PURE__ */
|
|
8598
|
-
/* @__PURE__ */
|
|
8597
|
+
return n ? /* @__PURE__ */ p(Zn, {}) : /* @__PURE__ */ X("form", { style: { width: "34rem" }, onSubmit: e, children: [
|
|
8598
|
+
/* @__PURE__ */ X(
|
|
8599
8599
|
"div",
|
|
8600
8600
|
{
|
|
8601
8601
|
style: {
|
|
@@ -8610,7 +8610,7 @@ function zc({
|
|
|
8610
8610
|
]
|
|
8611
8611
|
}
|
|
8612
8612
|
),
|
|
8613
|
-
/* @__PURE__ */
|
|
8613
|
+
/* @__PURE__ */ X(
|
|
8614
8614
|
cn,
|
|
8615
8615
|
{
|
|
8616
8616
|
style: {
|
|
@@ -8716,7 +8716,7 @@ function Bg() {
|
|
|
8716
8716
|
},
|
|
8717
8717
|
[u, i, o, a, y]
|
|
8718
8718
|
);
|
|
8719
|
-
|
|
8719
|
+
G(() => {
|
|
8720
8720
|
!g && (i != null && i.content) && !o && W();
|
|
8721
8721
|
}, [g, I, i, o, W]);
|
|
8722
8722
|
const j = () => {
|
|
@@ -8908,9 +8908,9 @@ function Xg({ installation: e, integrationObj: t }) {
|
|
|
8908
8908
|
},
|
|
8909
8909
|
[c, r, i, o, w, m]
|
|
8910
8910
|
);
|
|
8911
|
-
|
|
8911
|
+
G(() => {
|
|
8912
8912
|
v || N();
|
|
8913
|
-
}, [v, N]),
|
|
8913
|
+
}, [v, N]), G(() => {
|
|
8914
8914
|
e && N();
|
|
8915
8915
|
}, [e, N]);
|
|
8916
8916
|
const L = Qe(() => {
|
|
@@ -8985,7 +8985,7 @@ function Gg() {
|
|
|
8985
8985
|
) : /* @__PURE__ */ p(ss, { message: "We can't load the integration" });
|
|
8986
8986
|
}
|
|
8987
8987
|
function Yg() {
|
|
8988
|
-
return /* @__PURE__ */
|
|
8988
|
+
return /* @__PURE__ */ X("svg", { width: "48", height: "48", viewBox: "0 0 48 48", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
8989
8989
|
/* @__PURE__ */ p("circle", { cx: "24", cy: "24", r: "24", fill: "#BBF7D0" }),
|
|
8990
8990
|
/* @__PURE__ */ p(
|
|
8991
8991
|
"path",
|
|
@@ -9000,7 +9000,7 @@ function Yg() {
|
|
|
9000
9000
|
] });
|
|
9001
9001
|
}
|
|
9002
9002
|
function Di({ text: e, children: t }) {
|
|
9003
|
-
return /* @__PURE__ */ p(Hn, { children: /* @__PURE__ */
|
|
9003
|
+
return /* @__PURE__ */ p(Hn, { children: /* @__PURE__ */ X(
|
|
9004
9004
|
cn,
|
|
9005
9005
|
{
|
|
9006
9006
|
style: {
|
|
@@ -9086,7 +9086,7 @@ function nv({ children: e, resetComponent: t }) {
|
|
|
9086
9086
|
} = vt(), { selectedConnection: f } = Tn(), [v, y] = z(!1), I = o || v, O = (_ = i == null ? void 0 : i.content) == null ? void 0 : _.provider, g = tv(i), b = (w) => {
|
|
9087
9087
|
console.error("Error when creating proxy installation:", w);
|
|
9088
9088
|
};
|
|
9089
|
-
return
|
|
9089
|
+
return G(() => {
|
|
9090
9090
|
!I && i && g && !s && f && r && (a != null && a.id) && (y(!0), Qg({
|
|
9091
9091
|
apiKey: r,
|
|
9092
9092
|
projectId: n,
|
|
@@ -9133,7 +9133,7 @@ function nv({ children: e, resetComponent: t }) {
|
|
|
9133
9133
|
) : a ? I ? /* @__PURE__ */ p(Gr, {}) : g && O && s ? /* @__PURE__ */ p(ev, { provider: O }) : /* @__PURE__ */ p("div", { children: e }) : /* @__PURE__ */ p(Jt, { message: "We can't load the integration" });
|
|
9134
9134
|
}
|
|
9135
9135
|
function Gc() {
|
|
9136
|
-
return /* @__PURE__ */
|
|
9136
|
+
return /* @__PURE__ */ X(
|
|
9137
9137
|
"footer",
|
|
9138
9138
|
{
|
|
9139
9139
|
style: {
|
|
@@ -9156,7 +9156,30 @@ function Gc() {
|
|
|
9156
9156
|
target: "_blank",
|
|
9157
9157
|
"aria-label": "Go to Ampersand",
|
|
9158
9158
|
rel: "noreferrer noopener",
|
|
9159
|
-
children: /* @__PURE__ */
|
|
9159
|
+
children: /* @__PURE__ */ X("picture", { children: [
|
|
9160
|
+
/* @__PURE__ */ p(
|
|
9161
|
+
"source",
|
|
9162
|
+
{
|
|
9163
|
+
srcSet: "https://res.cloudinary.com/dycvts6vp/image/upload/v1723671980/ampersand-logo-black.svg",
|
|
9164
|
+
media: "(prefers-color-scheme: light)"
|
|
9165
|
+
}
|
|
9166
|
+
),
|
|
9167
|
+
/* @__PURE__ */ p(
|
|
9168
|
+
"source",
|
|
9169
|
+
{
|
|
9170
|
+
srcSet: "https://res.cloudinary.com/dycvts6vp/image/upload/v1735853540/ampersand_logo_white.svg",
|
|
9171
|
+
media: "(prefers-color-scheme: dark)"
|
|
9172
|
+
}
|
|
9173
|
+
),
|
|
9174
|
+
/* @__PURE__ */ p(
|
|
9175
|
+
"img",
|
|
9176
|
+
{
|
|
9177
|
+
style: { height: ".8em" },
|
|
9178
|
+
src: "https://res.cloudinary.com/dycvts6vp/image/upload/v1723671980/ampersand-logo-black.svg",
|
|
9179
|
+
alt: "Ampersand"
|
|
9180
|
+
}
|
|
9181
|
+
)
|
|
9182
|
+
] })
|
|
9160
9183
|
}
|
|
9161
9184
|
)
|
|
9162
9185
|
]
|
|
@@ -9164,7 +9187,7 @@ function Gc() {
|
|
|
9164
9187
|
);
|
|
9165
9188
|
}
|
|
9166
9189
|
function lr({ children: e }) {
|
|
9167
|
-
return /* @__PURE__ */ p(Hn, { children: /* @__PURE__ */
|
|
9190
|
+
return /* @__PURE__ */ p(Hn, { children: /* @__PURE__ */ X(cn, { children: [
|
|
9168
9191
|
/* @__PURE__ */ p("div", { style: { padding: "3rem 2rem" }, children: e }),
|
|
9169
9192
|
/* @__PURE__ */ p(Gc, {})
|
|
9170
9193
|
] }) });
|
|
@@ -9185,7 +9208,7 @@ function Fi({
|
|
|
9185
9208
|
}) {
|
|
9186
9209
|
if (!o && !r)
|
|
9187
9210
|
throw new Error("Either title or providerName is required");
|
|
9188
|
-
return /* @__PURE__ */
|
|
9211
|
+
return /* @__PURE__ */ X(lr, { children: [
|
|
9189
9212
|
/* @__PURE__ */ p(ur, { children: o || `Set up ${r} integration` }),
|
|
9190
9213
|
/* @__PURE__ */ p(dr, { error: t }),
|
|
9191
9214
|
i,
|
|
@@ -9226,7 +9249,7 @@ function Yc({
|
|
|
9226
9249
|
);
|
|
9227
9250
|
}
|
|
9228
9251
|
function Zc({ url: e, providerDisplayName: t, credentialName: n }) {
|
|
9229
|
-
return /* @__PURE__ */
|
|
9252
|
+
return /* @__PURE__ */ X("p", { style: { color: "var(--amp-colors-text-muted)" }, children: [
|
|
9230
9253
|
/* @__PURE__ */ p(Yc, { href: e, newTab: !0, children: /* @__PURE__ */ p("span", { style: { textDecoration: "underline" }, children: "Learn more" }) }),
|
|
9231
9254
|
" about where to find your ",
|
|
9232
9255
|
t,
|
|
@@ -9299,7 +9322,7 @@ function fv({
|
|
|
9299
9322
|
},
|
|
9300
9323
|
error: r,
|
|
9301
9324
|
isButtonDisabled: m,
|
|
9302
|
-
children: /* @__PURE__ */
|
|
9325
|
+
children: /* @__PURE__ */ X(
|
|
9303
9326
|
"div",
|
|
9304
9327
|
{
|
|
9305
9328
|
style: {
|
|
@@ -9317,7 +9340,7 @@ function fv({
|
|
|
9317
9340
|
credentialName: "API key"
|
|
9318
9341
|
}
|
|
9319
9342
|
),
|
|
9320
|
-
/* @__PURE__ */
|
|
9343
|
+
/* @__PURE__ */ X("div", { style: { display: "flex", gap: ".5rem" }, children: [
|
|
9321
9344
|
/* @__PURE__ */ p(
|
|
9322
9345
|
jt.Input,
|
|
9323
9346
|
{
|
|
@@ -9359,7 +9382,7 @@ function hv({
|
|
|
9359
9382
|
setSelectedConnection: c
|
|
9360
9383
|
}) {
|
|
9361
9384
|
const l = ke(), [u, d] = z(!1), [m, f] = z(null), v = Je();
|
|
9362
|
-
|
|
9385
|
+
G(() => {
|
|
9363
9386
|
if (e && Pe && u && m != null) {
|
|
9364
9387
|
const I = {
|
|
9365
9388
|
groupName: o,
|
|
@@ -9415,7 +9438,7 @@ function gv({
|
|
|
9415
9438
|
},
|
|
9416
9439
|
error: r,
|
|
9417
9440
|
isButtonDisabled: y,
|
|
9418
|
-
children: /* @__PURE__ */
|
|
9441
|
+
children: /* @__PURE__ */ X(
|
|
9419
9442
|
"div",
|
|
9420
9443
|
{
|
|
9421
9444
|
style: {
|
|
@@ -9443,7 +9466,7 @@ function gv({
|
|
|
9443
9466
|
onChange: (g) => I(g)
|
|
9444
9467
|
}
|
|
9445
9468
|
),
|
|
9446
|
-
/* @__PURE__ */
|
|
9469
|
+
/* @__PURE__ */ X("div", { style: { display: "flex", gap: ".5rem" }, children: [
|
|
9447
9470
|
/* @__PURE__ */ p(
|
|
9448
9471
|
jt.Input,
|
|
9449
9472
|
{
|
|
@@ -9485,7 +9508,7 @@ function yv({
|
|
|
9485
9508
|
setSelectedConnection: c
|
|
9486
9509
|
}) {
|
|
9487
9510
|
const l = ke(), [u, d] = z(!1), [m, f] = z(null), v = Je();
|
|
9488
|
-
|
|
9511
|
+
G(() => {
|
|
9489
9512
|
if (e && Pe && u && m != null) {
|
|
9490
9513
|
const I = {
|
|
9491
9514
|
groupName: o,
|
|
@@ -9547,7 +9570,7 @@ function wv({
|
|
|
9547
9570
|
providerName: c
|
|
9548
9571
|
}) {
|
|
9549
9572
|
const l = ke(), u = Je(), [d, m] = z(!1);
|
|
9550
|
-
|
|
9573
|
+
G(() => {
|
|
9551
9574
|
if (e && Pe && d) {
|
|
9552
9575
|
const v = {
|
|
9553
9576
|
groupName: i,
|
|
@@ -9638,15 +9661,15 @@ function el({
|
|
|
9638
9661
|
error: i
|
|
9639
9662
|
}) {
|
|
9640
9663
|
const o = Je(), { projectId: a } = ke(), [s, c] = z(null), [l, u] = z(null), { setSelectedConnection: d } = Tn(), m = xv(c, r), f = Tv(n, u, m, t), v = Sv(a, o, d);
|
|
9641
|
-
return
|
|
9664
|
+
return G(() => {
|
|
9642
9665
|
t && !l && f();
|
|
9643
|
-
}, [t, l, f, m, n]),
|
|
9666
|
+
}, [t, l, f, m, n]), G(() => {
|
|
9644
9667
|
s && v(s).then(() => {
|
|
9645
9668
|
l == null || l.close();
|
|
9646
9669
|
}).catch((y) => {
|
|
9647
9670
|
console.error("Error refreshing connection: ", y), r == null || r(y.message ?? "Unexpected error: not able to refresh connection");
|
|
9648
9671
|
});
|
|
9649
|
-
}, [s, o, d, v, l, r]),
|
|
9672
|
+
}, [s, o, d, v, l, r]), G(() => {
|
|
9650
9673
|
if (!l) return;
|
|
9651
9674
|
const y = setInterval(() => {
|
|
9652
9675
|
l.closed && (clearInterval(y), window.removeEventListener("message", m), u(null), !s && !i ? (console.error("OAuth failed. Please try again."), r == null || r("OAuth failed. Please try again.")) : s && (r == null || r(null)));
|
|
@@ -9662,7 +9685,7 @@ function Rv({
|
|
|
9662
9685
|
isButtonDisabled: n,
|
|
9663
9686
|
providerName: r
|
|
9664
9687
|
}) {
|
|
9665
|
-
return /* @__PURE__ */
|
|
9688
|
+
return /* @__PURE__ */ X(lr, { children: [
|
|
9666
9689
|
/* @__PURE__ */ p(ur, { children: `Set up ${r} integration` }),
|
|
9667
9690
|
/* @__PURE__ */ p(dr, { error: t }),
|
|
9668
9691
|
/* @__PURE__ */ p(
|
|
@@ -9722,11 +9745,11 @@ function Dv({
|
|
|
9722
9745
|
error: n,
|
|
9723
9746
|
isButtonDisabled: r
|
|
9724
9747
|
}) {
|
|
9725
|
-
return /* @__PURE__ */
|
|
9748
|
+
return /* @__PURE__ */ X(lr, { children: [
|
|
9726
9749
|
/* @__PURE__ */ p(ur, { children: "Enter your Salesforce subdomain" }),
|
|
9727
9750
|
/* @__PURE__ */ p(Yc, { href: Pv, newTab: !0, children: "What is my Salesforce subdomain?" }),
|
|
9728
9751
|
/* @__PURE__ */ p(dr, { error: n }),
|
|
9729
|
-
/* @__PURE__ */
|
|
9752
|
+
/* @__PURE__ */ X("div", { style: { display: "flex", marginTop: "1em", alignItems: "center" }, children: [
|
|
9730
9753
|
/* @__PURE__ */ p(
|
|
9731
9754
|
jt.Input,
|
|
9732
9755
|
{
|
|
@@ -9757,8 +9780,8 @@ function Fv({
|
|
|
9757
9780
|
isButtonDisabled: r,
|
|
9758
9781
|
providerName: i
|
|
9759
9782
|
}) {
|
|
9760
|
-
return /* @__PURE__ */
|
|
9761
|
-
/* @__PURE__ */
|
|
9783
|
+
return /* @__PURE__ */ X(lr, { children: [
|
|
9784
|
+
/* @__PURE__ */ X(ur, { children: [
|
|
9762
9785
|
"Enter your ",
|
|
9763
9786
|
i,
|
|
9764
9787
|
" workspace"
|
|
@@ -9880,11 +9903,11 @@ function Lv({
|
|
|
9880
9903
|
};
|
|
9881
9904
|
o && (w.workspace = v), i && y.length > 0 && (w.scopes = ef(y)), e(w);
|
|
9882
9905
|
};
|
|
9883
|
-
return /* @__PURE__ */
|
|
9906
|
+
return /* @__PURE__ */ X(lr, { children: [
|
|
9884
9907
|
/* @__PURE__ */ p(ur, { children: `Set up ${r} integration` }),
|
|
9885
9908
|
/* @__PURE__ */ p(dr, { error: t }),
|
|
9886
9909
|
/* @__PURE__ */ p("br", {}),
|
|
9887
|
-
/* @__PURE__ */
|
|
9910
|
+
/* @__PURE__ */ X("div", { style: { display: "flex", flexDirection: "column", gap: "1.2rem" }, children: [
|
|
9888
9911
|
o && /* @__PURE__ */ p(
|
|
9889
9912
|
jt.Input,
|
|
9890
9913
|
{
|
|
@@ -9905,7 +9928,7 @@ function Lv({
|
|
|
9905
9928
|
onChange: (w) => d(w)
|
|
9906
9929
|
}
|
|
9907
9930
|
),
|
|
9908
|
-
/* @__PURE__ */
|
|
9931
|
+
/* @__PURE__ */ X("div", { style: { display: "flex", gap: ".5rem" }, children: [
|
|
9909
9932
|
/* @__PURE__ */ p(
|
|
9910
9933
|
jt.Input,
|
|
9911
9934
|
{
|
|
@@ -10027,14 +10050,14 @@ function Bv({
|
|
|
10027
10050
|
selectedConnection: a,
|
|
10028
10051
|
setSelectedConnection: s
|
|
10029
10052
|
}
|
|
10030
|
-
) : c === "password" ? /* @__PURE__ */ p("em", { children: "Password flow not supported yet" }) : /* @__PURE__ */
|
|
10053
|
+
) : c === "password" ? /* @__PURE__ */ p("em", { children: "Password flow not supported yet" }) : /* @__PURE__ */ X("em", { children: [
|
|
10031
10054
|
"Unsupported grant type: ",
|
|
10032
10055
|
c
|
|
10033
10056
|
] });
|
|
10034
10057
|
}
|
|
10035
10058
|
function qv(e) {
|
|
10036
10059
|
const { selectedConnection: t } = Tn();
|
|
10037
|
-
|
|
10060
|
+
G(() => {
|
|
10038
10061
|
e && t && e(t);
|
|
10039
10062
|
}, [e, t]);
|
|
10040
10063
|
}
|
|
@@ -10062,7 +10085,7 @@ function tl({
|
|
|
10062
10085
|
const c = Je(), [l, u] = z(null), { provider: d } = vt(), { selectedConnection: m, setSelectedConnection: f, connections: v } = Tn();
|
|
10063
10086
|
Wv({ onSuccess: a });
|
|
10064
10087
|
const y = e || d, I = (l == null ? void 0 : l.displayName) ?? Qn(y);
|
|
10065
|
-
if (
|
|
10088
|
+
if (G(() => {
|
|
10066
10089
|
if (!m && v && v.length > 0) {
|
|
10067
10090
|
const [g] = v;
|
|
10068
10091
|
f(g);
|
|
@@ -10446,7 +10469,7 @@ function yl(e, t) {
|
|
|
10446
10469
|
return `${e}-content-${t}`;
|
|
10447
10470
|
}
|
|
10448
10471
|
var py = dl, fy = fl, Il = hl;
|
|
10449
|
-
const my = /* @__PURE__ */
|
|
10472
|
+
const my = /* @__PURE__ */ X("svg", { xmlns: "http://www.w3.org/2000/svg", width: "18", height: "18", viewBox: "0 0 18 18", fill: "none", children: [
|
|
10450
10473
|
/* @__PURE__ */ p("circle", { cx: "9", cy: "9", r: "9", fill: "#BBF7D0" }),
|
|
10451
10474
|
/* @__PURE__ */ p("path", { d: "M13 7L7.5 12L5 9.72727", stroke: "#16A34A", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" })
|
|
10452
10475
|
] });
|
|
@@ -10469,7 +10492,7 @@ function hy(e, t) {
|
|
|
10469
10492
|
) : e ? my : /* @__PURE__ */ p("svg", { xmlns: "http://www.w3.org/2000/svg", width: "18", height: "18", viewBox: "0 0 18 18", fill: "none", children: /* @__PURE__ */ p("circle", { cx: "9", cy: "9", r: "5", fill: "#BFDBFE" }) });
|
|
10470
10493
|
}
|
|
10471
10494
|
function gy() {
|
|
10472
|
-
return /* @__PURE__ */
|
|
10495
|
+
return /* @__PURE__ */ X("svg", { width: "18", height: "18", viewBox: "0 0 18 18", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
10473
10496
|
/* @__PURE__ */ p("path", { d: "M2.25 4.5H3.75H15.75", stroke: "#E73D3D", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }),
|
|
10474
10497
|
/* @__PURE__ */ p(
|
|
10475
10498
|
"path",
|
|
@@ -10497,7 +10520,7 @@ function wl({
|
|
|
10497
10520
|
pending: n,
|
|
10498
10521
|
displayName: r
|
|
10499
10522
|
}) {
|
|
10500
|
-
return /* @__PURE__ */ p(Il, { value: e, className: or.tabTrigger, children: /* @__PURE__ */
|
|
10523
|
+
return /* @__PURE__ */ p(Il, { value: e, className: or.tabTrigger, children: /* @__PURE__ */ X(
|
|
10501
10524
|
"div",
|
|
10502
10525
|
{
|
|
10503
10526
|
style: {
|
|
@@ -10508,7 +10531,7 @@ function wl({
|
|
|
10508
10531
|
},
|
|
10509
10532
|
children: [
|
|
10510
10533
|
hy(t, n),
|
|
10511
|
-
/* @__PURE__ */
|
|
10534
|
+
/* @__PURE__ */ X("div", { style: { display: "flex", flexDirection: "column" }, children: [
|
|
10512
10535
|
/* @__PURE__ */ p("span", { children: r || e }),
|
|
10513
10536
|
n && /* @__PURE__ */ p("span", { style: { fontSize: ".8rem", fontStyle: "italic" }, children: "pending" })
|
|
10514
10537
|
] })
|
|
@@ -10521,7 +10544,7 @@ function _y({
|
|
|
10521
10544
|
pending: t,
|
|
10522
10545
|
displayName: n
|
|
10523
10546
|
}) {
|
|
10524
|
-
return /* @__PURE__ */
|
|
10547
|
+
return /* @__PURE__ */ X(bt, { children: [
|
|
10525
10548
|
/* @__PURE__ */ p(Ti, { style: { margin: "1rem 0" } }),
|
|
10526
10549
|
/* @__PURE__ */ p(
|
|
10527
10550
|
wl,
|
|
@@ -10536,14 +10559,14 @@ function _y({
|
|
|
10536
10559
|
] });
|
|
10537
10560
|
}
|
|
10538
10561
|
function by() {
|
|
10539
|
-
return /* @__PURE__ */
|
|
10562
|
+
return /* @__PURE__ */ X(bt, { children: [
|
|
10540
10563
|
/* @__PURE__ */ p(Ti, { style: { margin: "3rem 0 1rem 0" } }),
|
|
10541
10564
|
/* @__PURE__ */ p(
|
|
10542
10565
|
Il,
|
|
10543
10566
|
{
|
|
10544
10567
|
value: kr,
|
|
10545
10568
|
className: pt(or.tabTrigger, or.danger),
|
|
10546
|
-
children: /* @__PURE__ */
|
|
10569
|
+
children: /* @__PURE__ */ X(
|
|
10547
10570
|
"div",
|
|
10548
10571
|
{
|
|
10549
10572
|
style: {
|
|
@@ -10571,7 +10594,7 @@ function Oy({
|
|
|
10571
10594
|
showUninstallButton: o
|
|
10572
10595
|
}) {
|
|
10573
10596
|
var a, s;
|
|
10574
|
-
return /* @__PURE__ */ p(py, { value: e, className: or.tabsRoot, onValueChange: n, children: /* @__PURE__ */
|
|
10597
|
+
return /* @__PURE__ */ p(py, { value: e, className: or.tabsRoot, onValueChange: n, children: /* @__PURE__ */ X(fy, { className: or.tabsList, children: [
|
|
10575
10598
|
t.map((c) => {
|
|
10576
10599
|
var l, u, d, m;
|
|
10577
10600
|
return /* @__PURE__ */ p(
|
|
@@ -10610,10 +10633,10 @@ function Ny({
|
|
|
10610
10633
|
const g = v.find((b) => y !== b && !b.completed);
|
|
10611
10634
|
g && s(g.name);
|
|
10612
10635
|
}, [v, y]);
|
|
10613
|
-
return
|
|
10636
|
+
return G(() => {
|
|
10614
10637
|
!a && v.length > 0 && s(v[0].name);
|
|
10615
|
-
}, [v, a, I]), /* @__PURE__ */ p(Cc.Provider, { value: I, children: /* @__PURE__ */ p(bc.Provider, { value: y == null ? void 0 : y.name, children: /* @__PURE__ */
|
|
10616
|
-
/* @__PURE__ */
|
|
10638
|
+
}, [v, a, I]), /* @__PURE__ */ p(Cc.Provider, { value: I, children: /* @__PURE__ */ p(bc.Provider, { value: y == null ? void 0 : y.name, children: /* @__PURE__ */ X(Hn, { style: { maxWidth: "55rem" }, children: [
|
|
10639
|
+
/* @__PURE__ */ X(
|
|
10617
10640
|
cn,
|
|
10618
10641
|
{
|
|
10619
10642
|
style: {
|
|
@@ -10623,8 +10646,8 @@ function Ny({
|
|
|
10623
10646
|
backgroundColor: "var(--amp-colors-bg-primary)"
|
|
10624
10647
|
},
|
|
10625
10648
|
children: [
|
|
10626
|
-
/* @__PURE__ */
|
|
10627
|
-
/* @__PURE__ */
|
|
10649
|
+
/* @__PURE__ */ X("div", { style: { width: "20rem" }, children: [
|
|
10650
|
+
/* @__PURE__ */ X("h1", { style: { fontSize: "small", fontWeight: "400" }, children: [
|
|
10628
10651
|
ln(r),
|
|
10629
10652
|
" integration"
|
|
10630
10653
|
] }),
|
|
@@ -10692,7 +10715,7 @@ function Ky({
|
|
|
10692
10715
|
) });
|
|
10693
10716
|
}
|
|
10694
10717
|
function Sy() {
|
|
10695
|
-
return /* @__PURE__ */
|
|
10718
|
+
return /* @__PURE__ */ X(
|
|
10696
10719
|
Hn,
|
|
10697
10720
|
{
|
|
10698
10721
|
style: {
|
|
@@ -10709,7 +10732,7 @@ function Sy() {
|
|
|
10709
10732
|
);
|
|
10710
10733
|
}
|
|
10711
10734
|
function Ty({ redirectURL: e, children: t }) {
|
|
10712
|
-
return
|
|
10735
|
+
return G(() => {
|
|
10713
10736
|
e && window.location.replace(e);
|
|
10714
10737
|
}, [e]), e ? /* @__PURE__ */ p(Sy, {}) : t;
|
|
10715
10738
|
}
|
|
@@ -10831,7 +10854,7 @@ const Vy = (e, t) => {
|
|
|
10831
10854
|
(m, f) => (f == null ? void 0 : f.name) === e ? f : m,
|
|
10832
10855
|
{}
|
|
10833
10856
|
), [o, e]);
|
|
10834
|
-
return
|
|
10857
|
+
return G(() => {
|
|
10835
10858
|
!d || i || Pe().installationApi.listInstallations({
|
|
10836
10859
|
projectIdOrName: r,
|
|
10837
10860
|
integrationId: d.id,
|