@bigbinary/neeto-integrations-frontend 2.12.8 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app/javascript/src/translations/en.json +1 -1
- package/dist/Daily.cjs.js +43 -85
- package/dist/Daily.cjs.js.map +1 -1
- package/dist/Daily.js +38 -81
- package/dist/Daily.js.map +1 -1
- package/dist/GoogleCalender.cjs.js +46 -86
- package/dist/GoogleCalender.cjs.js.map +1 -1
- package/dist/GoogleCalender.js +41 -84
- package/dist/GoogleCalender.js.map +1 -1
- package/dist/Twilio.cjs.js +15 -11
- package/dist/Twilio.cjs.js.map +1 -1
- package/dist/Twilio.js +15 -11
- package/dist/Twilio.js.map +1 -1
- package/dist/ZapierForm.cjs.js +1 -1
- package/dist/ZapierForm.cjs.js.map +1 -1
- package/dist/ZapierForm.js +1 -1
- package/dist/ZapierForm.js.map +1 -1
- package/dist/Zoom.cjs.js +44 -83
- package/dist/Zoom.cjs.js.map +1 -1
- package/dist/Zoom.js +41 -82
- package/dist/Zoom.js.map +1 -1
- package/dist/index.cjs.js +70 -103
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.js +63 -100
- package/dist/index.js.map +1 -1
- package/package.json +18 -16
package/dist/Zoom.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import
|
|
2
|
+
import { useState } from 'react';
|
|
3
3
|
import { isPresent, noop, humanize, isNotEmpty } from '@bigbinary/neeto-cist';
|
|
4
|
-
import
|
|
4
|
+
import ZoomIcon from '@bigbinary/neeto-icons/misc/Zoom';
|
|
5
5
|
import PageLoader from '@bigbinary/neeto-molecules/PageLoader';
|
|
6
6
|
import { useTranslation, Trans } from 'react-i18next';
|
|
7
7
|
import classnames from 'classnames';
|
|
8
8
|
import { useMutationWithInvalidation, withTitle, useQueryParams, withT } from '@bigbinary/neeto-commons-frontend/react-utils';
|
|
9
|
-
import
|
|
9
|
+
import Check from '@bigbinary/neeto-icons/Check';
|
|
10
10
|
import Button from '@bigbinary/neetoui/Button';
|
|
11
11
|
import Tooltip from '@bigbinary/neetoui/Tooltip';
|
|
12
12
|
import Typography from '@bigbinary/neetoui/Typography';
|
|
@@ -14,8 +14,8 @@ import '@bigbinary/neeto-molecules/IntegrationCard';
|
|
|
14
14
|
import DisconnectAlert from '@bigbinary/neeto-molecules/IntegrationDisconnectAlert';
|
|
15
15
|
import WalkthroughModal from '@bigbinary/neeto-molecules/IntegrationWalkthroughModal';
|
|
16
16
|
import i18next, { t as t$1 } from 'i18next';
|
|
17
|
+
import { useQuery } from '@tanstack/react-query';
|
|
17
18
|
import { DEFAULT_STALE_TIME } from '@bigbinary/neeto-commons-frontend/constants';
|
|
18
|
-
import { useQuery } from 'react-query';
|
|
19
19
|
import axios from 'axios';
|
|
20
20
|
import Container from '@bigbinary/neeto-molecules/Container';
|
|
21
21
|
import Header from '@bigbinary/neeto-molecules/Header';
|
|
@@ -24,13 +24,16 @@ import Input from '@bigbinary/neetoui/formik/Input';
|
|
|
24
24
|
import FormikForm from '@bigbinary/neetoui/formik/Form';
|
|
25
25
|
import ActionBlock from '@bigbinary/neetoui/formik/ActionBlock';
|
|
26
26
|
import { useHistory } from 'react-router-dom';
|
|
27
|
-
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
28
27
|
import { buildUrl } from '@bigbinary/neeto-commons-frontend/utils';
|
|
28
|
+
import '@bigbinary/neeto-icons/misc/GoogleCalendar';
|
|
29
|
+
import '@bigbinary/neeto-icons/misc/Google';
|
|
29
30
|
import '@bigbinary/neetoui/Callout';
|
|
31
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
30
32
|
import 'ramda';
|
|
31
33
|
import '@bigbinary/neetoui/formik/Select';
|
|
32
34
|
import * as yup from 'yup';
|
|
33
35
|
import '@bigbinary/neetoui/Modal';
|
|
36
|
+
import DailyIcon from '@bigbinary/neeto-icons/misc/Daily';
|
|
34
37
|
import CopyToClipboardButton from '@bigbinary/neeto-molecules/CopyToClipboardButton';
|
|
35
38
|
|
|
36
39
|
function _arrayWithHoles(arr) {
|
|
@@ -158,73 +161,29 @@ var QUERY_KEYS = {
|
|
|
158
161
|
ZOOM_DETAILS: "zoom-details"
|
|
159
162
|
};
|
|
160
163
|
|
|
161
|
-
function ownKeys$
|
|
162
|
-
function _objectSpread$
|
|
164
|
+
function ownKeys$3(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
165
|
+
function _objectSpread$3(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$3(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$3(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
163
166
|
var useCreateDaily = function useCreateDaily() {
|
|
164
167
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
165
|
-
return useMutationWithInvalidation(dailiesApi.create, _objectSpread$
|
|
166
|
-
keysToInvalidate: [QUERY_KEYS.DAILY_CO_DETAILS]
|
|
168
|
+
return useMutationWithInvalidation(dailiesApi.create, _objectSpread$3({
|
|
169
|
+
keysToInvalidate: [[QUERY_KEYS.DAILY_CO_DETAILS]]
|
|
167
170
|
}, options));
|
|
168
171
|
};
|
|
169
172
|
var useFetchDaily = function useFetchDaily() {
|
|
170
|
-
return useQuery(
|
|
173
|
+
return useQuery({
|
|
174
|
+
queryKey: [QUERY_KEYS.DAILY_CO_DETAILS],
|
|
175
|
+
queryFn: dailiesApi.show,
|
|
171
176
|
staleTime: DEFAULT_STALE_TIME
|
|
172
177
|
});
|
|
173
178
|
};
|
|
174
179
|
var useDestroyDaily = function useDestroyDaily(_ref) {
|
|
175
180
|
var onSuccess = _ref.onSuccess;
|
|
176
181
|
return useMutationWithInvalidation(dailiesApi.destroy, {
|
|
177
|
-
keysToInvalidate: [QUERY_KEYS.DAILY_CO_DETAILS],
|
|
182
|
+
keysToInvalidate: [[QUERY_KEYS.DAILY_CO_DETAILS]],
|
|
178
183
|
onSuccess: onSuccess
|
|
179
184
|
});
|
|
180
185
|
};
|
|
181
186
|
|
|
182
|
-
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
183
|
-
if (source == null) return {};
|
|
184
|
-
var target = {};
|
|
185
|
-
var sourceKeys = Object.keys(source);
|
|
186
|
-
var key, i;
|
|
187
|
-
for (i = 0; i < sourceKeys.length; i++) {
|
|
188
|
-
key = sourceKeys[i];
|
|
189
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
190
|
-
target[key] = source[key];
|
|
191
|
-
}
|
|
192
|
-
return target;
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
function _objectWithoutProperties(source, excluded) {
|
|
196
|
-
if (source == null) return {};
|
|
197
|
-
var target = _objectWithoutPropertiesLoose(source, excluded);
|
|
198
|
-
var key, i;
|
|
199
|
-
if (Object.getOwnPropertySymbols) {
|
|
200
|
-
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
201
|
-
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
|
202
|
-
key = sourceSymbolKeys[i];
|
|
203
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
204
|
-
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
205
|
-
target[key] = source[key];
|
|
206
|
-
}
|
|
207
|
-
}
|
|
208
|
-
return target;
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
var _excluded = ["className", "children"];
|
|
212
|
-
function ownKeys$3(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
213
|
-
function _objectSpread$3(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$3(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$3(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
214
|
-
var ExternalLink = function ExternalLink(_ref) {
|
|
215
|
-
var _ref$className = _ref.className,
|
|
216
|
-
className = _ref$className === void 0 ? "" : _ref$className,
|
|
217
|
-
_ref$children = _ref.children,
|
|
218
|
-
children = _ref$children === void 0 ? null : _ref$children,
|
|
219
|
-
props = _objectWithoutProperties(_ref, _excluded);
|
|
220
|
-
return /*#__PURE__*/jsx("a", _objectSpread$3(_objectSpread$3({
|
|
221
|
-
className: classnames(["neeto-ui-text-primary-800 hover:neeto-ui-text-primary-800 visited:neeto-ui-text-primary-600 font-medium", className])
|
|
222
|
-
}, props), {}, {
|
|
223
|
-
children: children
|
|
224
|
-
}));
|
|
225
|
-
};
|
|
226
|
-
var ExternalLink$1 = /*#__PURE__*/React__default.memo(ExternalLink);
|
|
227
|
-
|
|
228
187
|
var MANAGE_DAILY_CO_FORM_INITIAL_VALUES = {
|
|
229
188
|
apiKey: ""
|
|
230
189
|
};
|
|
@@ -252,7 +211,7 @@ var Form = function Form(_ref) {
|
|
|
252
211
|
}
|
|
253
212
|
}),
|
|
254
213
|
createDaily = _useCreateDaily.mutate,
|
|
255
|
-
isConnecting = _useCreateDaily.
|
|
214
|
+
isConnecting = _useCreateDaily.isPending;
|
|
256
215
|
var handleSubmit = function handleSubmit(payload) {
|
|
257
216
|
return createDaily(payload);
|
|
258
217
|
};
|
|
@@ -267,26 +226,24 @@ var Form = function Form(_ref) {
|
|
|
267
226
|
className: "flex items-center gap-2",
|
|
268
227
|
children: [t("neetoIntegrations.daily.connect.title"), /*#__PURE__*/jsx(HelpPopover, {
|
|
269
228
|
title: t("neetoIntegrations.daily.connect.title"),
|
|
270
|
-
description: /*#__PURE__*/jsx(
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
label: /*#__PURE__*/jsx(Button, {
|
|
283
|
-
className: "mt-8",
|
|
284
|
-
label: t("neetoIntegrations.daily.walkthroughText"),
|
|
285
|
-
style: "link",
|
|
286
|
-
onClick: function onClick() {
|
|
287
|
-
return setIsDemoModalOpen(true);
|
|
229
|
+
description: /*#__PURE__*/jsx(Typography, {
|
|
230
|
+
lineHeight: "normal",
|
|
231
|
+
style: "body2",
|
|
232
|
+
children: /*#__PURE__*/jsx(Trans, {
|
|
233
|
+
i18nKey: "neetoIntegrations.daily.helpDoc",
|
|
234
|
+
components: {
|
|
235
|
+
videoLink: /*#__PURE__*/jsx(Button, {
|
|
236
|
+
style: "link",
|
|
237
|
+
onClick: function onClick() {
|
|
238
|
+
return setIsDemoModalOpen(true);
|
|
239
|
+
}
|
|
240
|
+
})
|
|
288
241
|
}
|
|
289
242
|
})
|
|
243
|
+
}),
|
|
244
|
+
helpLinkProps: {
|
|
245
|
+
href: helpDocUrl,
|
|
246
|
+
"data-cy": "api-key-help-doc-link"
|
|
290
247
|
}
|
|
291
248
|
})]
|
|
292
249
|
})
|
|
@@ -357,7 +314,7 @@ var Manage$1 = function Manage$1(_ref) {
|
|
|
357
314
|
}
|
|
358
315
|
}),
|
|
359
316
|
destroyIntegration = _useDestroyDaily.mutate,
|
|
360
|
-
isDisconnecting = _useDestroyDaily.
|
|
317
|
+
isDisconnecting = _useDestroyDaily.isPending;
|
|
361
318
|
var isConnected = isPresent(apiKey);
|
|
362
319
|
var handleDisconnect = function handleDisconnect() {
|
|
363
320
|
return destroyIntegration("daily");
|
|
@@ -368,7 +325,7 @@ var Manage$1 = function Manage$1(_ref) {
|
|
|
368
325
|
isDisconnectAlertOpen: isDisconnectAlertOpen,
|
|
369
326
|
isDisconnecting: isDisconnecting,
|
|
370
327
|
setIsDisconnectAlertOpen: setIsDisconnectAlertOpen,
|
|
371
|
-
Icon:
|
|
328
|
+
Icon: DailyIcon,
|
|
372
329
|
connectPath: buildUrl(window.location.pathname, {
|
|
373
330
|
connect: true
|
|
374
331
|
}),
|
|
@@ -912,14 +869,16 @@ var zoomApi = {
|
|
|
912
869
|
};
|
|
913
870
|
|
|
914
871
|
var useShowZoom = function useShowZoom() {
|
|
915
|
-
return useQuery(
|
|
872
|
+
return useQuery({
|
|
873
|
+
queryKey: [QUERY_KEYS.ZOOM_DETAILS],
|
|
874
|
+
queryFn: zoomApi.show,
|
|
916
875
|
staleTime: DEFAULT_STALE_TIME
|
|
917
876
|
});
|
|
918
877
|
};
|
|
919
878
|
var useDestroyZoom = function useDestroyZoom(_ref) {
|
|
920
879
|
var _onSuccess = _ref.onSuccess;
|
|
921
880
|
return useMutationWithInvalidation(zoomApi.destroy, {
|
|
922
|
-
keysToInvalidate: [QUERY_KEYS.ZOOM_DETAILS],
|
|
881
|
+
keysToInvalidate: [[QUERY_KEYS.ZOOM_DETAILS]],
|
|
923
882
|
onSuccess: function onSuccess() {
|
|
924
883
|
return _onSuccess === null || _onSuccess === void 0 ? void 0 : _onSuccess();
|
|
925
884
|
}
|
|
@@ -954,7 +913,7 @@ var Zoom = function Zoom(_ref) {
|
|
|
954
913
|
}
|
|
955
914
|
}),
|
|
956
915
|
destroyIntegration = _useDestroyZoom.mutate,
|
|
957
|
-
isDisconnecting = _useDestroyZoom.
|
|
916
|
+
isDisconnecting = _useDestroyZoom.isPending;
|
|
958
917
|
var isConnected = isPresent(email);
|
|
959
918
|
var handleDisconnect = function handleDisconnect() {
|
|
960
919
|
return destroyIntegration("zoom");
|
|
@@ -966,7 +925,7 @@ var Zoom = function Zoom(_ref) {
|
|
|
966
925
|
isDisconnectAlertOpen: isDisconnectAlertOpen,
|
|
967
926
|
isDisconnecting: isDisconnecting,
|
|
968
927
|
setIsDisconnectAlertOpen: setIsDisconnectAlertOpen,
|
|
969
|
-
Icon:
|
|
928
|
+
Icon: ZoomIcon,
|
|
970
929
|
integration: "zoom",
|
|
971
930
|
description: isConnected ? /*#__PURE__*/jsx(Trans, {
|
|
972
931
|
components: {
|