@amp-labs/react 1.16.1 → 1.17.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.
@@ -588,6 +588,8 @@ function sd(e) {
588
588
  if (e !== void 0)
589
589
  return e === null ? null : {
590
590
  objectName: e.objectName,
591
+ mapToName: e.mapToName,
592
+ mapToDisplayName: e.mapToDisplayName,
591
593
  schedule: e.schedule,
592
594
  destination: e.destination,
593
595
  selectedFields: e.selectedFields,
@@ -850,6 +852,8 @@ function Hd(e, t) {
850
852
  objectName: e.objectName,
851
853
  destination: e.destination,
852
854
  schedule: e.schedule,
855
+ mapToName: V(e, "mapToName") ? e.mapToName : void 0,
856
+ mapToDisplayName: V(e, "mapToDisplayName") ? e.mapToDisplayName : void 0,
853
857
  requiredFields: V(e, "requiredFields") ? e.requiredFields.map(ps) : void 0,
854
858
  optionalFields: V(e, "optionalFields") ? e.optionalFields.map(ps) : void 0,
855
859
  optionalFieldsAuto: V(e, "optionalFieldsAuto") ? Ia(e.optionalFieldsAuto) : void 0,
@@ -863,6 +867,8 @@ function Ud(e) {
863
867
  objectName: e.objectName,
864
868
  destination: e.destination,
865
869
  schedule: e.schedule,
870
+ mapToName: e.mapToName,
871
+ mapToDisplayName: e.mapToDisplayName,
866
872
  requiredFields: e.requiredFields === void 0 ? void 0 : e.requiredFields.map(fs),
867
873
  optionalFields: e.optionalFields === void 0 ? void 0 : e.optionalFields.map(fs),
868
874
  optionalFieldsAuto: e.optionalFieldsAuto,
@@ -2014,7 +2020,7 @@ class uf {
2014
2020
  this.connectionApi = new tf(t), this.installationApi = new nf(t), this.integrationApi = new rf(t), this.oAuthApi = new of(t), this.projectApi = new sf(t), this.providerApi = new af(t), this.providerAppApi = new cf(t), this.revisionApi = new lf(t);
2015
2021
  }
2016
2022
  }
2017
- const df = "1.16.1", pf = "v1", Pr = "https://api.withampersand.com";
2023
+ const df = "1.17.0", pf = "v1", Pr = "https://api.withampersand.com";
2018
2024
  function ba() {
2019
2025
  try {
2020
2026
  const e = process.env.REACT_APP_AMP_SERVER;
@@ -7873,12 +7879,11 @@ function Dg() {
7873
7879
  const { value: u, name: d } = c.target;
7874
7880
  u && (e && Uc(e, n, d, u), i(xe.MAPPING, d) && o(xe.MAPPING, d));
7875
7881
  }, a = et(() => {
7876
- var d;
7877
- if (!e || !r) return [];
7878
- const c = r ? Object.values(r[e] || {}).flat() : [];
7879
- return (((d = t == null ? void 0 : t.read) == null ? void 0 : d.requiredMapFields) || []).concat(c).reduce((f, m) => f.find((h) => h.mapToName === m.mapToName) ? f.map((h) => h.mapToName === m.mapToName ? m : h) : f.concat(m), new Array()).filter(Bt);
7882
+ var f;
7883
+ const c = ((f = t == null ? void 0 : t.read) == null ? void 0 : f.requiredMapFields) || [], u = e && r ? Object.values(r[e] || {}).flat() : [];
7884
+ return c.concat(u).reduce((m, p) => m.find((g) => g.mapToName === p.mapToName) ? m.map((g) => g.mapToName === p.mapToName ? p : g) : m.concat(p), new Array()).filter(Bt);
7880
7885
  }, [t, r, e]);
7881
- return a.length ? /* @__PURE__ */ A(st, { children: [
7886
+ return a != null && a.length ? /* @__PURE__ */ A(st, { children: [
7882
7887
  /* @__PURE__ */ l(nr, { string: "Map the following fields (required)" }),
7883
7888
  /* @__PURE__ */ l("div", { style: { display: "flex", gap: "1rem", flexDirection: "column" }, children: a.map((c) => {
7884
7889
  var u, d;
@@ -9882,7 +9887,7 @@ const il = async (e, t, n, r, i, o, s, a) => {
9882
9887
  provider: i
9883
9888
  }
9884
9889
  };
9885
- return await Te().oAuthApi.oauthConnect(p);
9890
+ return await Te().oAuthApi.oauthConnect(p, { credentials: "include" });
9886
9891
  }
9887
9892
  throw new Error(`Provider ${i} does not support an OAuth2 web flow.`);
9888
9893
  }, ta = 600, na = 600, sy = "AUTHORIZATION_SUCCEEDED", ay = "AUTHORIZATION_FAILED";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@amp-labs/react",
3
- "version": "1.16.1",
3
+ "version": "1.17.0",
4
4
  "description": "Ampersand React library.",
5
5
  "author": {
6
6
  "name": "Ampersand Labs",