@hiver/connector-agent 1.2.0 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/ui/modal/index.d.ts +10 -0
- package/components/ui/modal/index.d.ts.map +1 -0
- package/constants/global-constants.d.ts +1 -1
- package/constants/global-constants.d.ts.map +1 -1
- package/context/index.d.ts +2 -2
- package/context/index.d.ts.map +1 -1
- package/context/main-app-provider/index.d.ts +2 -2
- package/context/main-app-provider/index.d.ts.map +1 -1
- package/features/connector-cards/api/index.d.ts +2 -2
- package/features/connector-cards/api/index.d.ts.map +1 -1
- package/features/connector-cards/store/slice.d.ts +1 -1
- package/features/connector-cards/store/slice.d.ts.map +1 -1
- package/index.es.js +15 -16
- package/index.umd.js +4 -4
- package/package.json +1 -1
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { default as React, ReactNode } from 'react';
|
|
2
|
+
interface IModalProps {
|
|
3
|
+
shown: boolean;
|
|
4
|
+
setShown: (value: boolean) => void;
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
showCloseButton?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare const Modal: React.FC<IModalProps>;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/modal/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIzC,UAAU,WAAW;IACnB,KAAK,EAAE,OAAO,CAAC;IACf,QAAQ,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IACnC,QAAQ,EAAE,SAAS,CAAC;IACpB,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED,eAAO,MAAM,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CA4BvC,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ITrackingData } from '../context';
|
|
2
2
|
export interface IExtraParams {
|
|
3
3
|
isAdmin?: boolean;
|
|
4
|
-
|
|
4
|
+
currentSmIds?: string[];
|
|
5
5
|
sendTrackingEvent?: (event: string, data?: ITrackingData) => void;
|
|
6
6
|
}
|
|
7
7
|
//# sourceMappingURL=global-constants.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"global-constants.d.ts","sourceRoot":"","sources":["../../src/constants/global-constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAE1C,MAAM,WAAW,YAAY;IAC3B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,
|
|
1
|
+
{"version":3,"file":"global-constants.d.ts","sourceRoot":"","sources":["../../src/constants/global-constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAE1C,MAAM,WAAW,YAAY;IAC3B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,iBAAiB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,aAAa,KAAK,IAAI,CAAC;CACnE"}
|
package/context/index.d.ts
CHANGED
|
@@ -18,13 +18,13 @@ export interface ITrackingData {
|
|
|
18
18
|
export interface IMainAppContext {
|
|
19
19
|
email: string | null;
|
|
20
20
|
baseUrls: IBaseUrls;
|
|
21
|
-
|
|
21
|
+
currentSmIds: string[];
|
|
22
22
|
sendTrackingEvent: (event: string, data?: ITrackingData) => void;
|
|
23
23
|
}
|
|
24
24
|
export declare const defaultMainAppvalues: {
|
|
25
25
|
email: string;
|
|
26
26
|
baseUrls: {};
|
|
27
|
-
|
|
27
|
+
currentSmIds: never[];
|
|
28
28
|
sendTrackingEvent: () => void;
|
|
29
29
|
};
|
|
30
30
|
export declare const MainAppContext: import('react').Context<IMainAppContext>;
|
package/context/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/context/index.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,SAAS;IACxB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,aAAa;IAC5B,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,MAAM,WAAW,cAAc;IAC7B,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,QAAQ,CAAC;CAClC;AAED,MAAM,WAAW,aAAa;IAE5B,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB;AAED,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,QAAQ,EAAE,SAAS,CAAC;IACpB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/context/index.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,SAAS;IACxB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,aAAa;IAC5B,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,MAAM,WAAW,cAAc;IAC7B,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,QAAQ,CAAC;CAClC;AAED,MAAM,WAAW,aAAa;IAE5B,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB;AAED,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,QAAQ,EAAE,SAAS,CAAC;IACpB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,iBAAiB,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,aAAa,KAAK,IAAI,CAAC;CAClE;AAED,eAAO,MAAM,oBAAoB;;;;;CAKhC,CAAC;AAEF,eAAO,MAAM,cAAc,0CAAuD,CAAC"}
|
|
@@ -5,8 +5,8 @@ interface IProps {
|
|
|
5
5
|
sendTrackingEvent?: (event: string, data?: ITrackingData | undefined) => void;
|
|
6
6
|
senderEmail?: string | null;
|
|
7
7
|
baseUrls?: IBaseUrls;
|
|
8
|
-
|
|
8
|
+
currentSmIds?: string[];
|
|
9
9
|
}
|
|
10
|
-
declare const MainAppProvider: ({ children, sendTrackingEvent, senderEmail, baseUrls,
|
|
10
|
+
declare const MainAppProvider: ({ children, sendTrackingEvent, senderEmail, baseUrls, currentSmIds }: IProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
11
|
export default MainAppProvider;
|
|
12
12
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/context/main-app-provider/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAW,MAAM,OAAO,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,aAAa,EAAkB,MAAM,aAAa,CAAC;AAEvE,UAAU,MAAM;IACd,QAAQ,EAAE,SAAS,CAAC;IACpB,iBAAiB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,aAAa,GAAG,SAAS,KAAK,IAAI,CAAC;IAC9E,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/context/main-app-provider/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAW,MAAM,OAAO,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,aAAa,EAAkB,MAAM,aAAa,CAAC;AAEvE,UAAU,MAAM;IACd,QAAQ,EAAE,SAAS,CAAC;IACpB,iBAAiB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,aAAa,GAAG,SAAS,KAAK,IAAI,CAAC;IAC9E,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;CACzB;AAED,QAAA,MAAM,eAAe,yEAMlB,MAAM,4CAYR,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export declare const getConnectorData: ({
|
|
2
|
-
|
|
1
|
+
export declare const getConnectorData: ({ inboxIds, channelType }: {
|
|
2
|
+
inboxIds: string[];
|
|
3
3
|
channelType?: string;
|
|
4
4
|
}) => Promise<import('axios').AxiosResponse<any, any> | undefined>;
|
|
5
5
|
export declare const getSpecificConnectorData: (id: string, email: string) => Promise<import('axios').AxiosResponse<any, any> | undefined>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/features/connector-cards/api/index.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,gBAAgB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/features/connector-cards/api/index.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,gBAAgB,8BAAyC;IAAE,QAAQ,EAAE,MAAM,EAAE,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAA;CAAE,iEASjH,CAAC;AAEF,eAAO,MAAM,wBAAwB,OAAQ,MAAM,SAAS,MAAM,iEAKjE,CAAC"}
|
|
@@ -10,7 +10,7 @@ export declare const connectorCardLibrary: import('@reduxjs/toolkit').Slice<impo
|
|
|
10
10
|
declare const fetchAllCardsData: import('@reduxjs/toolkit').AsyncThunk<{
|
|
11
11
|
cards: ICard[];
|
|
12
12
|
}, {
|
|
13
|
-
|
|
13
|
+
inboxIds: string[];
|
|
14
14
|
channelType?: string;
|
|
15
15
|
}, {
|
|
16
16
|
state?: unknown;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slice.d.ts","sourceRoot":"","sources":["../../../../src/features/connector-cards/store/slice.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,eAAe,EAAE,MAAM,4CAA4C,CAAC;AAC7E,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAIrD,eAAO,MAAM,oBAAoB;;;;;;uKAsD/B,CAAC;AAIH,QAAA,MAAM,iBAAiB;;;
|
|
1
|
+
{"version":3,"file":"slice.d.ts","sourceRoot":"","sources":["../../../../src/features/connector-cards/store/slice.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,eAAe,EAAE,MAAM,4CAA4C,CAAC;AAC7E,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAIrD,eAAO,MAAM,oBAAoB;;;;;;uKAsD/B,CAAC;AAIH,QAAA,MAAM,iBAAiB;;;cAEyB,MAAM,EAAE;kBAAgB,MAAM;;;;;;;;;;EAU7E,CAAC;AAEF,QAAA,MAAM,qBAAqB;;;;;QAEc,MAAM;WAAS,MAAM;gBAAc,OAAO;;;;;;;;;;EAuBlF,CAAC;;AAEF,wBAA4C;AAC5C,eAAO,MAAM,OAAO;;;;;;0BAA+B,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,CAAC"}
|
package/index.es.js
CHANGED
|
@@ -23794,7 +23794,7 @@ function G7({ theme: e, dark: t, darkAuto: n, children: r, custom: o, ...A }) {
|
|
|
23794
23794
|
const X7 = ({ cache: e, theme: t, children: n, ...r }) => b.createElement(z7, e, b.createElement(G7, gr({ theme: t }, r), n)), ZC = { AccountCircle: W1, Add: nh, ArchiveOutlined: rh, ArrowBack: oh, ArrowBackIos: Ah, ArrowDropDown: ih, ArrowDropUp: ah, ArrowForward: sh, ArrowOutward: lh, CalendarTodayOutlinedIcon: q1, Cancel: ch, CancelOutlined: uh, CheckCircle: gh, ChevronRightOutlined: fh, Close: dh, CodeSharp: Ch, DeleteOutline: Eh, DownloadOutlined: ph, DragIndicator: Bh, EditOutlined: Ih, Error: Qh, ErrorOutline: hh, GroupsOutlined: mh, InfoOutlined: yh, LabelOutlined: vh, Link: bh, LockOutlined: wh, MailOutlined: xh, MicNone: Th, MoreVert: Fh, NotificationsOutlined: Oh, OpenInNew: kh, Pause: Rh, PersonOutline: Sh, PersonOutlined: Mh, Phone: Uh, PlayArrow: Dh, Public: Ph, Search: Lh, Settings: Nh, SettingsOutlined: jh, StickyNote2Outlined: Hh, ThumbDownAlt: Vh, ThumbDownOffAlt: zh, ThumbUpAlt: Yh, ThumbUpOffAlt: Wh, TimerOutlined: Kh, TrackChanges: qh, UnarchiveOutlined: Jh, Voicemail: Gh, Warning: Xh, WarningAmber: Zh }, _C = S7, Z7 = {
|
|
23795
23795
|
email: "",
|
|
23796
23796
|
baseUrls: {},
|
|
23797
|
-
|
|
23797
|
+
currentSmIds: [],
|
|
23798
23798
|
sendTrackingEvent: () => {
|
|
23799
23799
|
}
|
|
23800
23800
|
}, Ms = Ep(Z7), _7 = ({
|
|
@@ -23802,13 +23802,13 @@ const X7 = ({ cache: e, theme: t, children: n, ...r }) => b.createElement(z7, e,
|
|
|
23802
23802
|
sendTrackingEvent: t,
|
|
23803
23803
|
senderEmail: n = "",
|
|
23804
23804
|
baseUrls: r = {},
|
|
23805
|
-
|
|
23805
|
+
currentSmIds: o = []
|
|
23806
23806
|
}) => {
|
|
23807
23807
|
const A = pp(
|
|
23808
23808
|
() => ({
|
|
23809
23809
|
email: n,
|
|
23810
23810
|
baseUrls: r,
|
|
23811
|
-
|
|
23811
|
+
currentSmIds: o,
|
|
23812
23812
|
sendTrackingEvent: t || (() => {
|
|
23813
23813
|
})
|
|
23814
23814
|
}),
|
|
@@ -29152,14 +29152,13 @@ const OF = new hE.Bifrost(), kF = ({ configHiver: e, withCredentials: t }) => as
|
|
|
29152
29152
|
isHiverApiDomain: !0
|
|
29153
29153
|
},
|
|
29154
29154
|
withCredentials: !0
|
|
29155
|
-
}), rp = "/v1/api", RF = `${rp}/connectors/cards`, SF = `${rp}/connectors/cards/:id/data?senderEmail={{email}}`, MF = ({
|
|
29156
|
-
|
|
29157
|
-
|
|
29158
|
-
|
|
29159
|
-
|
|
29160
|
-
|
|
29161
|
-
|
|
29162
|
-
}), UF = (e, t) => np({
|
|
29155
|
+
}), rp = "/v1/api", RF = `${rp}/connectors/cards`, SF = `${rp}/connectors/cards/:id/data?senderEmail={{email}}`, MF = ({ inboxIds: e, channelType: t = "email" }) => {
|
|
29156
|
+
const n = new URLSearchParams();
|
|
29157
|
+
return e.forEach((r) => n.append("inbox_ids", r)), n.append("channel_type", t), np({
|
|
29158
|
+
url: `${RF}?${n.toString()}`,
|
|
29159
|
+
method: QE.GET
|
|
29160
|
+
});
|
|
29161
|
+
}, UF = (e, t) => np({
|
|
29163
29162
|
url: SF.replace(":id", e).replace("{{email}}", t),
|
|
29164
29163
|
method: QE.GET
|
|
29165
29164
|
}), DF = (e) => e.cardList.connectorCards, PF = (e) => e.cardList.connectorApiStatus, LF = (e) => e.cardList.cardSpecificData, NF = (e) => e.cardList.specificConnectorApiStatus, jF = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='15'%20height='15'%20viewBox='0%200%2015%2015'%3e%3cpath%20fill='%23ffffff'%20fill-rule='nonzero'%20d='M8.821%207.496L14.716%201.6A.937.937%200%201%200%2013.391.275L7.496%206.17%201.6.275A.937.937%200%201%200%20.275%201.601L6.17%207.496.275%2013.39A.937.937%200%201%200%201.6%2014.716L7.496%208.82l5.895%205.895a.935.935%200%200%200%201.325%200%20.937.937%200%200%200%200-1.326L8.821%207.496z'%20opacity='.8'/%3e%3c/svg%3e", HF = K(Gn)`
|
|
@@ -29276,9 +29275,9 @@ const qF = "success", JF = "error", GF = "Some error occured. Please contact sup
|
|
|
29276
29275
|
}
|
|
29277
29276
|
}), ua = IE(
|
|
29278
29277
|
"connectorCardLibrary/fetchAllCard",
|
|
29279
|
-
async ({
|
|
29278
|
+
async ({ inboxIds: e, channelType: t }) => {
|
|
29280
29279
|
var o;
|
|
29281
|
-
const n = await MF({
|
|
29280
|
+
const n = await MF({ inboxIds: e, channelType: t });
|
|
29282
29281
|
return Array.isArray((o = n == null ? void 0 : n.data) == null ? void 0 : o.cards) ? { cards: n.data.cards.sort((A, a) => (a == null ? void 0 : a.priority) - (A == null ? void 0 : A.priority)) } : {
|
|
29283
29282
|
cards: []
|
|
29284
29283
|
};
|
|
@@ -29310,7 +29309,7 @@ const qF = "success", JF = "error", GF = "Some error occured. Please contact sup
|
|
|
29310
29309
|
{
|
|
29311
29310
|
sendTrackingEvent: t == null ? void 0 : t.sendTrackingEvent,
|
|
29312
29311
|
senderEmail: n,
|
|
29313
|
-
|
|
29312
|
+
currentSmIds: t == null ? void 0 : t.currentSmIds,
|
|
29314
29313
|
baseUrls: r,
|
|
29315
29314
|
children: /* @__PURE__ */ F.jsx(Bp, { fallback: /* @__PURE__ */ F.jsx(F.Fragment, {}), children: e })
|
|
29316
29315
|
}
|
|
@@ -29628,8 +29627,8 @@ const qF = "success", JF = "error", GF = "Some error occured. Please contact sup
|
|
|
29628
29627
|
/* @__PURE__ */ F.jsx(jo, { variant: "rounded", width: "253px", height: "46px", animation: "wave" })
|
|
29629
29628
|
] })
|
|
29630
29629
|
] }), LO = ({ isAdmin: e = !1 }) => {
|
|
29631
|
-
const { email: t,
|
|
29632
|
-
return Ho(() => (t && n && r(ua({
|
|
29630
|
+
const { email: t, currentSmIds: n } = za(Ms), r = Ap(), o = qi(DF), A = qi(LF), a = qi(NF), s = qi(PF);
|
|
29631
|
+
return Ho(() => (t && n.length && r(ua({ inboxIds: n })), () => {
|
|
29633
29632
|
r(_F.clearConnectorList());
|
|
29634
29633
|
}), [r, t, n]), s === Nn.LOADING ? /* @__PURE__ */ F.jsx(PO, {}) : /* @__PURE__ */ F.jsxs(sp, { "data-testid": Array.isArray(o) ? "connector-agent" : "loading", children: [
|
|
29635
29634
|
o != null && o.length ? /* @__PURE__ */ F.jsxs(An, { direction: "row", sx: { marginBottom: "20px" }, children: [
|