@bigbinary/neeto-integrations-frontend 4.2.5 → 4.2.6

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.
Files changed (61) hide show
  1. package/app/javascript/src/translations/en.json +12 -0
  2. package/dist/.ready +1 -1
  3. package/dist/Daily.js +2 -2
  4. package/dist/DailyForm.js +2 -2
  5. package/dist/Telnyx.js +2 -2
  6. package/dist/Twilio.js +2 -2
  7. package/dist/Zoom.js +2 -2
  8. package/dist/cjs/Daily.js +2 -2
  9. package/dist/cjs/DailyForm.js +2 -2
  10. package/dist/cjs/Telnyx.js +2 -2
  11. package/dist/cjs/Twilio.js +2 -2
  12. package/dist/cjs/Zoom.js +2 -2
  13. package/dist/cjs/index.js +6 -6
  14. package/dist/cjs/v2/Daily.js +2 -2
  15. package/dist/cjs/v2/DailyForm.js +2 -2
  16. package/dist/cjs/v2/DisconnectedIntegrationsRibbon.js +2 -2
  17. package/dist/cjs/v2/SmsLogs.js +1 -1
  18. package/dist/cjs/v2/Telnyx.js +2 -2
  19. package/dist/cjs/v2/Twilio.js +2 -2
  20. package/dist/cjs/v2/Zoom.js +2 -2
  21. package/dist/cjs/v2/index.js +280 -25
  22. package/dist/cjs/v2/index.js.map +1 -1
  23. package/dist/index.js +6 -6
  24. package/dist/{query-DJngL7gT.js → query-DFg4la-L.js} +6 -1
  25. package/dist/query-DFg4la-L.js.map +1 -0
  26. package/dist/{query-Dy_oZzH0.js → query-dZxWLxGc.js} +5 -2
  27. package/dist/query-dZxWLxGc.js.map +1 -0
  28. package/dist/{useDailiesApi-BqGt8Lap.js → useDailiesApi-BmI2LDF7.js} +2 -2
  29. package/dist/{useDailiesApi-BqGt8Lap.js.map → useDailiesApi-BmI2LDF7.js.map} +1 -1
  30. package/dist/{useDailiesApi-CiaD7Sm9.js → useDailiesApi-dbPtabvs.js} +2 -2
  31. package/dist/{useDailiesApi-CiaD7Sm9.js.map → useDailiesApi-dbPtabvs.js.map} +1 -1
  32. package/dist/{useDisconnectionAlertsApi-DEZp8XAE.js → useDisconnectionAlertsApi-BGaBOO_4.js} +2 -2
  33. package/dist/{useDisconnectionAlertsApi-DEZp8XAE.js.map → useDisconnectionAlertsApi-BGaBOO_4.js.map} +1 -1
  34. package/dist/{useDisconnectionAlertsApi-BtVaHyF9.js → useDisconnectionAlertsApi-CKKd-vBU.js} +2 -2
  35. package/dist/{useDisconnectionAlertsApi-BtVaHyF9.js.map → useDisconnectionAlertsApi-CKKd-vBU.js.map} +1 -1
  36. package/dist/{useTelnyxApi-DUL4eIKW.js → useTelnyxApi-Bdc2eE8x.js} +2 -2
  37. package/dist/{useTelnyxApi-DUL4eIKW.js.map → useTelnyxApi-Bdc2eE8x.js.map} +1 -1
  38. package/dist/{useTelnyxApi-BZHgKq_v.js → useTelnyxApi-DH5XaYIo.js} +2 -2
  39. package/dist/{useTelnyxApi-BZHgKq_v.js.map → useTelnyxApi-DH5XaYIo.js.map} +1 -1
  40. package/dist/{useTwilioApi-c-f8LcO6.js → useTwilioApi-CFdE3TY_.js} +2 -2
  41. package/dist/{useTwilioApi-c-f8LcO6.js.map → useTwilioApi-CFdE3TY_.js.map} +1 -1
  42. package/dist/{useTwilioApi-00tz9iTn.js → useTwilioApi-CYF8UIPN.js} +2 -2
  43. package/dist/{useTwilioApi-00tz9iTn.js.map → useTwilioApi-CYF8UIPN.js.map} +1 -1
  44. package/dist/{useZoomApi-DEqrcL4c.js → useZoomApi-Be2unav5.js} +2 -2
  45. package/dist/{useZoomApi-DEqrcL4c.js.map → useZoomApi-Be2unav5.js.map} +1 -1
  46. package/dist/{useZoomApi-fSvs1Qpv.js → useZoomApi-CcPofKkx.js} +2 -2
  47. package/dist/{useZoomApi-fSvs1Qpv.js.map → useZoomApi-CcPofKkx.js.map} +1 -1
  48. package/dist/v2/Daily.js +2 -2
  49. package/dist/v2/DailyForm.js +2 -2
  50. package/dist/v2/DisconnectedIntegrationsRibbon.js +2 -2
  51. package/dist/v2/SmsLogs.js +1 -1
  52. package/dist/v2/Telnyx.js +2 -2
  53. package/dist/v2/Twilio.js +2 -2
  54. package/dist/v2/Zoom.js +2 -2
  55. package/dist/v2/index.js +263 -26
  56. package/dist/v2/index.js.map +1 -1
  57. package/package.json +29 -29
  58. package/typeTemplates-v2/index.d.ts +16 -0
  59. package/types.d.ts +16 -0
  60. package/dist/query-DJngL7gT.js.map +0 -1
  61. package/dist/query-Dy_oZzH0.js.map +0 -1
package/dist/v2/index.js CHANGED
@@ -1,10 +1,30 @@
1
- export { d as disconnectionAlertsQueryKey } from '../query-Dy_oZzH0.js';
2
- export { default as Manage } from './Manage.js';
1
+ import { I as INTEGRATIONS_ENGINE_GOOGLE_MAPS_URL, g as googleMapsQueryKey } from '../query-dZxWLxGc.js';
2
+ export { d as disconnectionAlertsQueryKey } from '../query-dZxWLxGc.js';
3
+ import Manage$1 from './Manage.js';
3
4
  export { default as DisconnectAlert } from './DisconnectAlert.js';
4
5
  export { default as DisconnectedIntegrationsRibbon } from './DisconnectedIntegrationsRibbon.js';
5
6
  export { default as Daily } from './Daily.js';
6
7
  export { default as DailyForm } from './DailyForm.js';
7
8
  export { default as GoogleCalendar } from './GoogleCalendar.js';
9
+ import { Button, Spinner, Typography } from '@bigbinary/neeto-atoms';
10
+ import { Form as Form$1, Input, ActionBlock } from '@bigbinary/neeto-atoms/formik';
11
+ import { noop, isPresent } from '@bigbinary/neeto-cist';
12
+ import CardLayout from '@bigbinary/neeto-molecules/v2/CardLayout';
13
+ import Container from '@bigbinary/neeto-molecules/v2/Container';
14
+ import Header from '@bigbinary/neeto-molecules/v2/Header';
15
+ import { useTranslation, Trans } from 'react-i18next';
16
+ import { useHistory } from 'react-router-dom';
17
+ import _defineProperty from '@babel/runtime/helpers/defineProperty';
18
+ import { useQuery } from '@tanstack/react-query';
19
+ import { DEFAULT_STALE_TIME } from '@bigbinary/neeto-commons-frontend/constants';
20
+ import { useMutationWithInvalidation } from '@bigbinary/neeto-commons-frontend/react-utils';
21
+ import axios from 'axios';
22
+ import { t } from 'i18next';
23
+ import * as yup from 'yup';
24
+ import { jsxs, jsx } from 'react/jsx-runtime';
25
+ import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
26
+ import { useState } from 'react';
27
+ import CopyToClipboardButton from '@bigbinary/neeto-molecules/v2/CopyToClipboardButton';
8
28
  export { default as Telnyx } from './Telnyx.js';
9
29
  export { default as Twilio } from './Twilio.js';
10
30
  export { default as Zoom } from './Zoom.js';
@@ -14,42 +34,23 @@ export { default as Connect } from './Connect.js';
14
34
  export { default as Demo } from './Demo.js';
15
35
  export { default as Finish } from './Finish.js';
16
36
  export { default as WalkthroughModal } from './WalkthroughModal.js';
17
- import '@babel/runtime/helpers/defineProperty';
18
- import '@bigbinary/neeto-atoms';
19
- import '@bigbinary/neeto-cist';
20
37
  import '@bigbinary/neeto-commons-frontend/v2/react-utils';
21
- import 'react/jsx-runtime';
22
38
  import '@babel/runtime/helpers/objectWithoutProperties';
23
39
  import '@bigbinary/neeto-commons-frontend/v2/react-utils/withT';
24
- import '@babel/runtime/helpers/slicedToArray';
25
- import 'react';
26
40
  import '@bigbinary/neeto-molecules/v2/StickyRibbon';
27
41
  import 'ramda';
28
- import 'react-i18next';
29
- import 'react-router-dom';
30
- import '../useDisconnectionAlertsApi-BtVaHyF9.js';
31
- import '@tanstack/react-query';
32
- import '@bigbinary/neeto-commons-frontend/constants';
33
- import '@bigbinary/neeto-commons-frontend/react-utils';
34
- import 'axios';
35
- import 'i18next';
36
- import '../useDailiesApi-CiaD7Sm9.js';
42
+ import '../useDisconnectionAlertsApi-CKKd-vBU.js';
43
+ import '../useDailiesApi-dbPtabvs.js';
37
44
  import '@bigbinary/neeto-commons-frontend/v2/utils';
38
45
  import '@bigbinary/neeto-icons/misc/Daily';
39
- import '@bigbinary/neeto-molecules/v2/CopyToClipboardButton';
40
- import '@bigbinary/neeto-atoms/formik';
41
- import '@bigbinary/neeto-molecules/v2/CardLayout';
42
- import '@bigbinary/neeto-molecules/v2/Container';
43
- import '@bigbinary/neeto-molecules/v2/Header';
44
- import 'yup';
45
46
  import '@babel/runtime/helpers/toConsumableArray';
46
47
  import '@bigbinary/neeto-icons/misc/GoogleCalendar';
47
48
  import '@bigbinary/neeto-icons/misc/Google';
48
- import '../useTelnyxApi-DUL4eIKW.js';
49
+ import '../useTelnyxApi-Bdc2eE8x.js';
49
50
  import '@babel/runtime/helpers/asyncToGenerator';
50
- import '../useTwilioApi-c-f8LcO6.js';
51
+ import '../useTwilioApi-CFdE3TY_.js';
51
52
  import '@bigbinary/neeto-icons/misc/Zoom';
52
- import '../useZoomApi-fSvs1Qpv.js';
53
+ import '../useZoomApi-CcPofKkx.js';
53
54
  import 'classnames';
54
55
  import 'lucide-react';
55
56
  import '@bigbinary/neeto-filters-frontend/v2/utils';
@@ -58,4 +59,240 @@ import '@bigbinary/neeto-filters-frontend/v2/Bar';
58
59
  import '@bigbinary/neeto-molecules/v2/SubHeader';
59
60
  import '../index-MS1ts-9f.js';
60
61
  import '../success-C6rQdhhF.js';
62
+
63
+ var create = function create(payload) {
64
+ return axios.post(INTEGRATIONS_ENGINE_GOOGLE_MAPS_URL, {
65
+ googleMaps: payload
66
+ });
67
+ };
68
+ var show = function show() {
69
+ return axios.get(INTEGRATIONS_ENGINE_GOOGLE_MAPS_URL);
70
+ };
71
+ var destroy = function destroy() {
72
+ return axios["delete"](INTEGRATIONS_ENGINE_GOOGLE_MAPS_URL);
73
+ };
74
+ var googleMapsApi = {
75
+ create: create,
76
+ show: show,
77
+ destroy: destroy
78
+ };
79
+
80
+ function ownKeys(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; }
81
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
82
+ var useFetchGoogleMaps = function useFetchGoogleMaps() {
83
+ return useQuery({
84
+ queryKey: googleMapsQueryKey,
85
+ queryFn: googleMapsApi.show,
86
+ staleTime: DEFAULT_STALE_TIME
87
+ });
88
+ };
89
+ var useCreateGoogleMaps = function useCreateGoogleMaps() {
90
+ var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
91
+ return useMutationWithInvalidation(googleMapsApi.create, _objectSpread({
92
+ keysToInvalidate: [googleMapsQueryKey]
93
+ }, options));
94
+ };
95
+ var useDestroyGoogleMaps = function useDestroyGoogleMaps() {
96
+ var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
97
+ return useMutationWithInvalidation(googleMapsApi.destroy, _objectSpread({
98
+ keysToInvalidate: [googleMapsQueryKey]
99
+ }, options));
100
+ };
101
+
102
+ var GOOGLE_MAPS_FORM_INITIAL_VALUES = {
103
+ apiKey: ""
104
+ };
105
+ var GOOGLE_MAPS_VALIDATION_SCHEMA = yup.object().shape({
106
+ apiKey: yup.string().trim().required(t("neetoIntegrations.errors.required", {
107
+ entity: t("neetoIntegrations.googleMaps.apiKey")
108
+ }))
109
+ });
110
+
111
+ var Form = function Form(_ref) {
112
+ var _ref$helpDocUrl = _ref.helpDocUrl,
113
+ helpDocUrl = _ref$helpDocUrl === void 0 ? "" : _ref$helpDocUrl,
114
+ _ref$breadcrumbs = _ref.breadcrumbs,
115
+ breadcrumbs = _ref$breadcrumbs === void 0 ? [] : _ref$breadcrumbs,
116
+ _ref$onConnect = _ref.onConnect,
117
+ onConnect = _ref$onConnect === void 0 ? noop : _ref$onConnect;
118
+ var _useTranslation = useTranslation(),
119
+ t = _useTranslation.t;
120
+ var history = useHistory();
121
+ var _useCreateGoogleMaps = useCreateGoogleMaps({
122
+ onSuccess: function onSuccess() {
123
+ return onConnect();
124
+ }
125
+ }),
126
+ createGoogleMaps = _useCreateGoogleMaps.mutate,
127
+ isConnecting = _useCreateGoogleMaps.isPending;
128
+ var handleSubmit = function handleSubmit(_ref2) {
129
+ var apiKey = _ref2.apiKey;
130
+ return createGoogleMaps({
131
+ apiKey: apiKey.trim()
132
+ });
133
+ };
134
+ return /*#__PURE__*/jsxs(Container, {
135
+ isHeaderFixed: true,
136
+ children: [/*#__PURE__*/jsx(Header, {
137
+ breadcrumbs: breadcrumbs,
138
+ title: t("neetoIntegrations.common.connect")
139
+ }), /*#__PURE__*/jsx("div", {
140
+ className: "w-full",
141
+ children: /*#__PURE__*/jsx(Form$1, {
142
+ formikProps: {
143
+ initialValues: GOOGLE_MAPS_FORM_INITIAL_VALUES,
144
+ validationSchema: GOOGLE_MAPS_VALIDATION_SCHEMA,
145
+ onSubmit: handleSubmit
146
+ },
147
+ children: /*#__PURE__*/jsx(CardLayout, {
148
+ actionBlock: /*#__PURE__*/jsx(ActionBlock, {
149
+ cancelButtonProps: {
150
+ onClick: function onClick() {
151
+ return history.goBack();
152
+ }
153
+ },
154
+ isSubmitting: isConnecting,
155
+ submitButtonProps: {
156
+ label: t("neetoIntegrations.common.connect")
157
+ }
158
+ }),
159
+ children: /*#__PURE__*/jsx(Input, {
160
+ autoFocus: true,
161
+ required: true,
162
+ autoComplete: "off",
163
+ dataTestId: "google-maps-api-key",
164
+ label: t("neetoIntegrations.googleMaps.apiKey"),
165
+ name: "apiKey",
166
+ helpText: /*#__PURE__*/jsx(Trans, {
167
+ i18nKey: "neetoIntegrations.googleMaps.apiKeyHelpText",
168
+ components: {
169
+ helpLink: /*#__PURE__*/jsx(Button, {
170
+ "data-testid": "google-maps-api-key-help-link",
171
+ href: helpDocUrl,
172
+ rel: "noreferrer",
173
+ target: "_blank",
174
+ variant: "link"
175
+ })
176
+ }
177
+ })
178
+ })
179
+ })
180
+ })
181
+ })]
182
+ });
183
+ };
184
+
185
+ var GoogleMapsIcon = function GoogleMapsIcon(_ref) {
186
+ var _ref$size = _ref.size,
187
+ size = _ref$size === void 0 ? 24 : _ref$size,
188
+ _ref$className = _ref.className,
189
+ className = _ref$className === void 0 ? "" : _ref$className;
190
+ return /*#__PURE__*/jsxs("svg", {
191
+ className: className,
192
+ "aria-hidden": "true",
193
+ height: size,
194
+ viewBox: "0 0 92.3 132.3",
195
+ width: size,
196
+ xmlns: "http://www.w3.org/2000/svg",
197
+ children: [/*#__PURE__*/jsx("path", {
198
+ d: "M60.2 2.2C55.8.8 51 0 46.1 0 32 0 19.3 6.4 10.8 16.5l21.8 18.3L60.2 2.2z",
199
+ fill: "#1a73e8"
200
+ }), /*#__PURE__*/jsx("path", {
201
+ d: "M10.8 16.5C4.1 24.5 0 34.9 0 46.1c0 8.7 1.7 15.7 4.6 22l28-33.3-21.8-18.3z",
202
+ fill: "#ea4335"
203
+ }), /*#__PURE__*/jsx("path", {
204
+ d: "M46.2 28.5c9.8 0 17.7 7.9 17.7 17.7 0 4.3-1.6 8.3-4.2 11.4 0 0 13.9-16.6 27.5-32.7-5.6-10.8-15.3-19-27-22.7L32.6 34.8c3.3-3.8 8.1-6.3 13.6-6.3",
205
+ fill: "#4285f4"
206
+ }), /*#__PURE__*/jsx("path", {
207
+ d: "M46.2 63.8c-9.8 0-17.7-7.9-17.7-17.7 0-4.3 1.5-8.3 4.1-11.3l-28 33.3c4.8 10.6 12.8 19.2 21 29.9l34.1-40.5c-3.3 3.9-8.1 6.3-13.5 6.3",
208
+ fill: "#fbbc04"
209
+ }), /*#__PURE__*/jsx("path", {
210
+ d: "M59.1 109.2c15.4-24.1 33.3-35 33.3-63 0-7.7-1.9-14.9-5.2-21.3L25.6 98c2.6 3.4 5.3 7.3 7.9 11.3 9.4 14.5 6.8 23.1 12.8 23.1s3.4-8.7 12.8-23.2",
211
+ fill: "#34a853"
212
+ })]
213
+ });
214
+ };
215
+
216
+ var Manage = function Manage(_ref) {
217
+ var _ref$connectPath = _ref.connectPath,
218
+ connectPath = _ref$connectPath === void 0 ? "" : _ref$connectPath,
219
+ _ref$helpDocUrl = _ref.helpDocUrl,
220
+ helpDocUrl = _ref$helpDocUrl === void 0 ? "" : _ref$helpDocUrl,
221
+ _ref$onDisconnect = _ref.onDisconnect,
222
+ onDisconnect = _ref$onDisconnect === void 0 ? noop : _ref$onDisconnect;
223
+ var _useTranslation = useTranslation(),
224
+ t = _useTranslation.t;
225
+ var _useState = useState(false),
226
+ _useState2 = _slicedToArray(_useState, 2),
227
+ isDisconnectAlertOpen = _useState2[0],
228
+ setIsDisconnectAlertOpen = _useState2[1];
229
+ var _useFetchGoogleMaps = useFetchGoogleMaps(),
230
+ _useFetchGoogleMaps$d = _useFetchGoogleMaps.data,
231
+ _useFetchGoogleMaps$d2 = _useFetchGoogleMaps$d === void 0 ? {} : _useFetchGoogleMaps$d,
232
+ _useFetchGoogleMaps$d3 = _useFetchGoogleMaps$d2.apiKey,
233
+ apiKey = _useFetchGoogleMaps$d3 === void 0 ? null : _useFetchGoogleMaps$d3,
234
+ isLoading = _useFetchGoogleMaps.isLoading;
235
+ var _useDestroyGoogleMaps = useDestroyGoogleMaps({
236
+ onSuccess: function onSuccess() {
237
+ setIsDisconnectAlertOpen(false);
238
+ onDisconnect();
239
+ }
240
+ }),
241
+ destroyGoogleMaps = _useDestroyGoogleMaps.mutate,
242
+ isDisconnecting = _useDestroyGoogleMaps.isPending;
243
+ var isConnected = isPresent(apiKey);
244
+ if (isLoading) {
245
+ return /*#__PURE__*/jsx("div", {
246
+ className: "flex h-full w-full items-center justify-center",
247
+ children: /*#__PURE__*/jsx(Spinner, {})
248
+ });
249
+ }
250
+ return /*#__PURE__*/jsx(Manage$1, {
251
+ connectPath: connectPath,
252
+ helpDocUrl: helpDocUrl,
253
+ isConnected: isConnected,
254
+ isDisconnectAlertOpen: isDisconnectAlertOpen,
255
+ isDisconnecting: isDisconnecting,
256
+ setIsDisconnectAlertOpen: setIsDisconnectAlertOpen,
257
+ Icon: GoogleMapsIcon,
258
+ disconnectMessage: t("neetoIntegrations.googleMaps.disconnect.message"),
259
+ disconnectTitle: t("neetoIntegrations.googleMaps.disconnect.title"),
260
+ integration: "googleMaps",
261
+ integrationName: t("neetoIntegrations.googleMaps.title"),
262
+ description: isConnected ? /*#__PURE__*/jsx(Typography, {
263
+ as: "span",
264
+ variant: "body1",
265
+ children: /*#__PURE__*/jsx(Trans, {
266
+ i18nKey: "neetoIntegrations.googleMaps.connectedDescription",
267
+ values: {
268
+ apiKey: apiKey
269
+ },
270
+ components: {
271
+ wrapper: /*#__PURE__*/jsx("div", {
272
+ className: "mt-2 flex items-center justify-between gap-x-3 rounded-md border border-border px-3 py-2"
273
+ }),
274
+ span: /*#__PURE__*/jsx("span", {
275
+ className: "break-all text-sm"
276
+ }),
277
+ copy: /*#__PURE__*/jsx(CopyToClipboardButton, {
278
+ className: "shrink-0 self-start",
279
+ value: apiKey,
280
+ variant: "ghost"
281
+ })
282
+ }
283
+ })
284
+ }) : t("neetoIntegrations.googleMaps.description"),
285
+ title: isConnected ? t("neetoIntegrations.googleMaps.connected") : t("neetoIntegrations.common.connectIntegration", {
286
+ integration: t("neetoIntegrations.googleMaps.title")
287
+ }),
288
+ onClose: function onClose() {
289
+ return setIsDisconnectAlertOpen(false);
290
+ },
291
+ onDisconnect: function onDisconnect() {
292
+ return destroyGoogleMaps();
293
+ }
294
+ });
295
+ };
296
+
297
+ export { Form as GoogleMapsForm, GoogleMapsIcon, Manage as GoogleMapsManage, Manage$1 as Manage, googleMapsQueryKey };
61
298
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../app/javascript/src/apis/google_maps.js","../../app/javascript/src/hooks/reactQuery/useGoogleMapsApi.js","../../app/javascript/src/v2/components/Integrations/GoogleMaps/constants.js","../../app/javascript/src/v2/components/Integrations/GoogleMaps/Form.jsx","../../app/javascript/src/v2/components/Integrations/GoogleMaps/Icon.jsx","../../app/javascript/src/v2/components/Integrations/GoogleMaps/Manage.jsx"],"sourcesContent":["import axios from \"axios\";\n\nimport { INTEGRATIONS_ENGINE_GOOGLE_MAPS_URL } from \"src/constants/urls\";\n\nconst create = payload =>\n axios.post(INTEGRATIONS_ENGINE_GOOGLE_MAPS_URL, { googleMaps: payload });\n\nconst show = () => axios.get(INTEGRATIONS_ENGINE_GOOGLE_MAPS_URL);\n\nconst destroy = () => axios.delete(INTEGRATIONS_ENGINE_GOOGLE_MAPS_URL);\n\nconst googleMapsApi = { create, show, destroy };\n\nexport default googleMapsApi;\n","import { useQuery } from \"@tanstack/react-query\";\nimport { DEFAULT_STALE_TIME } from \"neetocommons/constants\";\nimport { useMutationWithInvalidation } from \"neetocommons/react-utils\";\n\nimport googleMapsApi from \"apis/google_maps\";\nimport { googleMapsQueryKey } from \"src/constants/query\";\n\nexport const useFetchGoogleMaps = () =>\n useQuery({\n queryKey: googleMapsQueryKey,\n queryFn: googleMapsApi.show,\n staleTime: DEFAULT_STALE_TIME,\n });\n\nexport const useCreateGoogleMaps = (options = {}) =>\n useMutationWithInvalidation(googleMapsApi.create, {\n keysToInvalidate: [googleMapsQueryKey],\n ...options,\n });\n\nexport const useDestroyGoogleMaps = (options = {}) =>\n useMutationWithInvalidation(googleMapsApi.destroy, {\n keysToInvalidate: [googleMapsQueryKey],\n ...options,\n });\n","import { t } from \"i18next\";\nimport * as yup from \"yup\";\n\nexport const GOOGLE_MAPS_FORM_INITIAL_VALUES = { apiKey: \"\" };\n\nexport const GOOGLE_MAPS_VALIDATION_SCHEMA = yup.object().shape({\n apiKey: yup\n .string()\n .trim()\n .required(\n t(\"neetoIntegrations.errors.required\", {\n entity: t(\"neetoIntegrations.googleMaps.apiKey\"),\n })\n ),\n});\n","import { Button } from \"neetoatoms\";\nimport { Input, Form as FormikForm, ActionBlock } from \"neetoatoms/formik\";\nimport { noop } from \"neetocist\";\nimport CardLayout from \"neetomolecules/v2/CardLayout\";\nimport Container from \"neetomolecules/v2/Container\";\nimport Header from \"neetomolecules/v2/Header\";\nimport { Trans, useTranslation } from \"react-i18next\";\nimport { useHistory } from \"react-router-dom\";\n\nimport { useCreateGoogleMaps } from \"hooks/reactQuery/useGoogleMapsApi\";\n\nimport {\n GOOGLE_MAPS_FORM_INITIAL_VALUES,\n GOOGLE_MAPS_VALIDATION_SCHEMA,\n} from \"./constants\";\n\nconst Form = ({ helpDocUrl = \"\", breadcrumbs = [], onConnect = noop }) => {\n const { t } = useTranslation();\n const history = useHistory();\n\n const { mutate: createGoogleMaps, isPending: isConnecting } =\n useCreateGoogleMaps({ onSuccess: () => onConnect() });\n\n const handleSubmit = ({ apiKey }) =>\n createGoogleMaps({ apiKey: apiKey.trim() });\n\n return (\n <Container isHeaderFixed>\n <Header\n {...{ breadcrumbs }}\n title={t(\"neetoIntegrations.common.connect\")}\n />\n <div className=\"w-full\">\n <FormikForm\n formikProps={{\n initialValues: GOOGLE_MAPS_FORM_INITIAL_VALUES,\n validationSchema: GOOGLE_MAPS_VALIDATION_SCHEMA,\n onSubmit: handleSubmit,\n }}\n >\n <CardLayout\n actionBlock={\n <ActionBlock\n cancelButtonProps={{ onClick: () => history.goBack() }}\n isSubmitting={isConnecting}\n submitButtonProps={{\n label: t(\"neetoIntegrations.common.connect\"),\n }}\n />\n }\n >\n <Input\n autoFocus\n required\n autoComplete=\"off\"\n dataTestId=\"google-maps-api-key\"\n label={t(\"neetoIntegrations.googleMaps.apiKey\")}\n name=\"apiKey\"\n helpText={\n <Trans\n i18nKey=\"neetoIntegrations.googleMaps.apiKeyHelpText\"\n components={{\n helpLink: (\n <Button\n data-testid=\"google-maps-api-key-help-link\"\n href={helpDocUrl}\n rel=\"noreferrer\"\n target=\"_blank\"\n variant=\"link\"\n />\n ),\n }}\n />\n }\n />\n </CardLayout>\n </FormikForm>\n </div>\n </Container>\n );\n};\n\nexport default Form;\n","const GoogleMapsIcon = ({ size = 24, className = \"\" }) => (\n <svg\n {...{ className }}\n aria-hidden=\"true\"\n height={size}\n viewBox=\"0 0 92.3 132.3\"\n width={size}\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M60.2 2.2C55.8.8 51 0 46.1 0 32 0 19.3 6.4 10.8 16.5l21.8 18.3L60.2 2.2z\"\n fill=\"#1a73e8\"\n />\n <path\n d=\"M10.8 16.5C4.1 24.5 0 34.9 0 46.1c0 8.7 1.7 15.7 4.6 22l28-33.3-21.8-18.3z\"\n fill=\"#ea4335\"\n />\n <path\n d=\"M46.2 28.5c9.8 0 17.7 7.9 17.7 17.7 0 4.3-1.6 8.3-4.2 11.4 0 0 13.9-16.6 27.5-32.7-5.6-10.8-15.3-19-27-22.7L32.6 34.8c3.3-3.8 8.1-6.3 13.6-6.3\"\n fill=\"#4285f4\"\n />\n <path\n d=\"M46.2 63.8c-9.8 0-17.7-7.9-17.7-17.7 0-4.3 1.5-8.3 4.1-11.3l-28 33.3c4.8 10.6 12.8 19.2 21 29.9l34.1-40.5c-3.3 3.9-8.1 6.3-13.5 6.3\"\n fill=\"#fbbc04\"\n />\n <path\n d=\"M59.1 109.2c15.4-24.1 33.3-35 33.3-63 0-7.7-1.9-14.9-5.2-21.3L25.6 98c2.6 3.4 5.3 7.3 7.9 11.3 9.4 14.5 6.8 23.1 12.8 23.1s3.4-8.7 12.8-23.2\"\n fill=\"#34a853\"\n />\n </svg>\n);\n\nexport default GoogleMapsIcon;\n","import { useState } from \"react\";\n\nimport { Spinner, Typography } from \"neetoatoms\";\nimport { isPresent, noop } from \"neetocist\";\nimport CopyToClipboardButton from \"neetomolecules/v2/CopyToClipboardButton\";\nimport { Trans, useTranslation } from \"react-i18next\";\n\nimport {\n useDestroyGoogleMaps,\n useFetchGoogleMaps,\n} from \"hooks/reactQuery/useGoogleMapsApi\";\n\nimport GoogleMapsIcon from \"./Icon\";\n\nimport ManageIntegration from \"../../commons/Manage\";\n\nconst Manage = ({ connectPath = \"\", helpDocUrl = \"\", onDisconnect = noop }) => {\n const { t } = useTranslation();\n const [isDisconnectAlertOpen, setIsDisconnectAlertOpen] = useState(false);\n\n const { data: { apiKey = null } = {}, isLoading } = useFetchGoogleMaps();\n const { mutate: destroyGoogleMaps, isPending: isDisconnecting } =\n useDestroyGoogleMaps({\n onSuccess: () => {\n setIsDisconnectAlertOpen(false);\n onDisconnect();\n },\n });\n\n const isConnected = isPresent(apiKey);\n\n if (isLoading) {\n return (\n <div className=\"flex h-full w-full items-center justify-center\">\n <Spinner />\n </div>\n );\n }\n\n return (\n <ManageIntegration\n {...{\n connectPath,\n helpDocUrl,\n isConnected,\n isDisconnectAlertOpen,\n isDisconnecting,\n setIsDisconnectAlertOpen,\n }}\n Icon={GoogleMapsIcon}\n disconnectMessage={t(\"neetoIntegrations.googleMaps.disconnect.message\")}\n disconnectTitle={t(\"neetoIntegrations.googleMaps.disconnect.title\")}\n integration=\"googleMaps\"\n integrationName={t(\"neetoIntegrations.googleMaps.title\")}\n description={\n isConnected ? (\n <Typography as=\"span\" variant=\"body1\">\n <Trans\n i18nKey=\"neetoIntegrations.googleMaps.connectedDescription\"\n values={{ apiKey }}\n components={{\n wrapper: (\n <div className=\"mt-2 flex items-center justify-between gap-x-3 rounded-md border border-border px-3 py-2\" />\n ),\n span: <span className=\"break-all text-sm\" />,\n copy: (\n <CopyToClipboardButton\n className=\"shrink-0 self-start\"\n value={apiKey}\n variant=\"ghost\"\n />\n ),\n }}\n />\n </Typography>\n ) : (\n t(\"neetoIntegrations.googleMaps.description\")\n )\n }\n title={\n isConnected\n ? t(\"neetoIntegrations.googleMaps.connected\")\n : t(\"neetoIntegrations.common.connectIntegration\", {\n integration: t(\"neetoIntegrations.googleMaps.title\"),\n })\n }\n onClose={() => setIsDisconnectAlertOpen(false)}\n onDisconnect={() => destroyGoogleMaps()}\n />\n );\n};\n\nexport default Manage;\n"],"names":["create","payload","axios","post","INTEGRATIONS_ENGINE_GOOGLE_MAPS_URL","googleMaps","show","get","destroy","googleMapsApi","useFetchGoogleMaps","useQuery","queryKey","googleMapsQueryKey","queryFn","staleTime","DEFAULT_STALE_TIME","useCreateGoogleMaps","options","arguments","length","undefined","useMutationWithInvalidation","_objectSpread","keysToInvalidate","useDestroyGoogleMaps","GOOGLE_MAPS_FORM_INITIAL_VALUES","apiKey","GOOGLE_MAPS_VALIDATION_SCHEMA","yup","object","shape","string","trim","required","t","entity","Form","_ref","_ref$helpDocUrl","helpDocUrl","_ref$breadcrumbs","breadcrumbs","_ref$onConnect","onConnect","noop","_useTranslation","useTranslation","history","useHistory","_useCreateGoogleMaps","onSuccess","createGoogleMaps","mutate","isConnecting","isPending","handleSubmit","_ref2","_jsxs","Container","isHeaderFixed","children","_jsx","Header","title","className","FormikForm","formikProps","initialValues","validationSchema","onSubmit","CardLayout","actionBlock","ActionBlock","cancelButtonProps","onClick","goBack","isSubmitting","submitButtonProps","label","Input","autoFocus","autoComplete","dataTestId","name","helpText","Trans","i18nKey","components","helpLink","Button","href","rel","target","variant","GoogleMapsIcon","_ref$size","size","_ref$className","height","viewBox","width","xmlns","d","fill","Manage","_ref$connectPath","connectPath","_ref$onDisconnect","onDisconnect","_useState","useState","_useState2","_slicedToArray","isDisconnectAlertOpen","setIsDisconnectAlertOpen","_useFetchGoogleMaps","_useFetchGoogleMaps$d","data","_useFetchGoogleMaps$d2","_useFetchGoogleMaps$d3","isLoading","_useDestroyGoogleMaps","destroyGoogleMaps","isDisconnecting","isConnected","isPresent","Spinner","ManageIntegration","Icon","disconnectMessage","disconnectTitle","integration","integrationName","description","Typography","as","values","wrapper","span","copy","CopyToClipboardButton","value","onClose"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,IAAMA,MAAM,GAAG,SAATA,MAAMA,CAAGC,OAAO,EAAA;AAAA,EAAA,OACpBC,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C,oCAAoC,CAAE;AACzDmG,IAAAA,WAAW,EACTT,WAAW,gBACT/D,GAAA,CAACyE,UAAU,EAAA;AAACC,MAAAA,EAAE,EAAC,MAAM;AAAC1C,MAAAA,OAAO,EAAC,OAAO;MAAAjC,QAAA,eACnCC,GAAA,CAACwB,KAAK,EAAA;AACJC,QAAAA,OAAO,EAAC,mDAAmD;AAC3DkD,QAAAA,MAAM,EAAE;AAAE9G,UAAAA,MAAM,EAANA;SAAS;AACnB6D,QAAAA,UAAU,EAAE;AACVkD,UAAAA,OAAO,eACL5E,GAAA,CAAA,KAAA,EAAA;AAAKG,YAAAA,SAAS,EAAC;AAA0F,WAAE,CAC5G;AACD0E,UAAAA,IAAI,eAAE7E,GAAA,CAAA,MAAA,EAAA;AAAMG,YAAAA,SAAS,EAAC;AAAmB,WAAE,CAAC;UAC5C2E,IAAI,eACF9E,GAAA,CAAC+E,qBAAqB,EAAA;AACpB5E,YAAAA,SAAS,EAAC,qBAAqB;AAC/B6E,YAAAA,KAAK,EAAEnH,MAAO;AACdmE,YAAAA,OAAO,EAAC;WACT;AAEL;OACD;AAAC,KACQ,CAAC,GAEb3D,CAAC,CAAC,0CAA0C,CAE/C;IACD6B,KAAK,EACH6D,WAAW,GACP1F,CAAC,CAAC,wCAAwC,CAAC,GAC3CA,CAAC,CAAC,6CAA6C,EAAE;MAC/CiG,WAAW,EAAEjG,CAAC,CAAC,oCAAoC;AACrD,KAAC,CACN;IACD4G,OAAO,EAAE,SAATA,OAAOA,GAAA;MAAA,OAAQ5B,wBAAwB,CAAC,KAAK,CAAC;IAAA,CAAC;IAC/CN,YAAY,EAAE,SAAdA,YAAYA,GAAA;MAAA,OAAQc,iBAAiB,EAAE;AAAA,IAAA;AAAC,GACzC,CAAC;AAEN;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bigbinary/neeto-integrations-frontend",
3
- "version": "4.2.5",
3
+ "version": "4.2.6",
4
4
  "description": "UI for integrations in neeto products",
5
5
  "license": "UNLICENSED",
6
6
  "homepage": "https://github.com/bigbinary/neeto-integrations-nano",
@@ -43,7 +43,7 @@
43
43
  "scripts": {
44
44
  "build": "NODE_ENV=production rollup --bundleConfigAsCjs -c --environment production",
45
45
  "build-preview": "NODE_ENV=production webpack",
46
- "prepare": "husky install",
46
+ "prepare": "husky",
47
47
  "release": "yarn build && yalc push --sig"
48
48
  },
49
49
  "lint-staged": {
@@ -73,12 +73,12 @@
73
73
  "@babel/runtime": "7.29.7",
74
74
  "@bigbinary/babel-preset-neeto": "^1.0.3",
75
75
  "@bigbinary/eslint-plugin-neeto": "1.9.1",
76
- "@bigbinary/neeto-atoms": "1.3.0",
76
+ "@bigbinary/neeto-atoms": "1.3.1",
77
77
  "@bigbinary/neeto-cist": "1.0.17",
78
- "@bigbinary/neeto-commons-frontend": "5.0.0",
79
- "@bigbinary/neeto-filters-frontend": "4.7.2",
78
+ "@bigbinary/neeto-commons-frontend": "5.0.9",
79
+ "@bigbinary/neeto-filters-frontend": "4.7.3",
80
80
  "@bigbinary/neeto-icons": "1.20.89",
81
- "@bigbinary/neeto-molecules": "5.13.4",
81
+ "@bigbinary/neeto-molecules": "5.13.15",
82
82
  "@bigbinary/neetoui": "8.8.3",
83
83
  "@emotion/is-prop-valid": "1.2.0",
84
84
  "@faker-js/faker": "8.2.0",
@@ -119,35 +119,35 @@
119
119
  "eslint-plugin-cypress": "^4.3.0",
120
120
  "eslint-plugin-import": "^2.31.0",
121
121
  "eslint-plugin-jam3": "^0.2.3",
122
- "eslint-plugin-json": "^4.0.1",
122
+ "eslint-plugin-json": "^5.0.0",
123
123
  "eslint-plugin-prettier": "^5.2.6",
124
- "eslint-plugin-promise": "^7.2.1",
124
+ "eslint-plugin-promise": "^7.3.0",
125
125
  "eslint-plugin-react": "^7.37.5",
126
- "eslint-plugin-react-hooks": "^5.2.0",
127
- "eslint-plugin-security": "^3.0.1",
128
- "eslint-plugin-sonarjs": "^4.0.2",
129
- "eslint-plugin-unused-imports": "^4.1.4",
126
+ "eslint-plugin-react-hooks": "^7.1.1",
127
+ "eslint-plugin-security": "^4.2.1",
128
+ "eslint-plugin-sonarjs": "^4.2.2",
129
+ "eslint-plugin-unused-imports": "^4.4.1",
130
130
  "eslint-plugin-xss": "^0.1.12",
131
131
  "formik": "2.4.6",
132
- "globals": "16.0.0",
132
+ "globals": "17.14.0",
133
133
  "globby": "^14.1.0",
134
134
  "html-webpack-plugin": "5.5.3",
135
135
  "https-browserify": "1.0.0",
136
- "husky": "7.0.4",
136
+ "husky": "9.1.7",
137
137
  "i18next": "22.5.1",
138
138
  "i18next-browser-languagedetector": "7.0.1",
139
139
  "js-logger": "1.6.1",
140
- "lint-staged": "12.4.1",
140
+ "lint-staged": "17.6.1",
141
141
  "lucide-react": "^0.577.0",
142
142
  "mini-css-extract-plugin": "2.7.6",
143
143
  "mixpanel-browser": "2.47.0",
144
144
  "os-browserify": "0.3.0",
145
145
  "path-browserify": "^1.0.1",
146
146
  "postcss": "8.5.29",
147
- "postcss-import": "^15.0.0",
147
+ "postcss-import": "^17.0.1",
148
148
  "postcss-loader": "^7.0.1",
149
- "postcss-preset-env": "7.8.2",
150
- "prettier": "3",
149
+ "postcss-preset-env": "11.6.3",
150
+ "prettier": "^3.10.1",
151
151
  "prettier-plugin-tailwindcss": "^0.7.1",
152
152
  "process": "0.11.10",
153
153
  "qs": "6.16.2",
@@ -187,12 +187,12 @@
187
187
  },
188
188
  "peerDependencies": {
189
189
  "@babel/runtime": "7.29.7",
190
- "@bigbinary/neeto-atoms": "1.3.0",
190
+ "@bigbinary/neeto-atoms": "1.3.1",
191
191
  "@bigbinary/neeto-cist": "1.0.17",
192
- "@bigbinary/neeto-commons-frontend": "5.0.0",
193
- "@bigbinary/neeto-filters-frontend": "4.7.2",
192
+ "@bigbinary/neeto-commons-frontend": "5.0.9",
193
+ "@bigbinary/neeto-filters-frontend": "4.7.3",
194
194
  "@bigbinary/neeto-icons": "1.20.89",
195
- "@bigbinary/neeto-molecules": "5.13.4",
195
+ "@bigbinary/neeto-molecules": "5.13.15",
196
196
  "@bigbinary/neetoui": "8.8.3",
197
197
  "@honeybadger-io/js": "6.10.1",
198
198
  "@honeybadger-io/react": "6.1.25",
@@ -207,7 +207,7 @@
207
207
  "dompurify": "3.4.17",
208
208
  "formik": "2.4.6",
209
209
  "https-browserify": "1.0.0",
210
- "i18next": "22.5.1",
210
+ "i18next": "^22.5.1 || ^26.0.0",
211
211
  "js-logger": "1.6.1",
212
212
  "lucide-react": "^0.577.0",
213
213
  "mixpanel-browser": "^2.45.0",
@@ -215,13 +215,13 @@
215
215
  "path-browserify": "^1.0.1",
216
216
  "qs": "6.16.2",
217
217
  "ramda": "0.29.0",
218
- "react": "18.3.1",
219
- "react-dom": "18.3.1",
218
+ "react": "^18.3.1 || ^19.0.0",
219
+ "react-dom": "^18.3.1 || ^19.0.0",
220
220
  "react-helmet": "^6.1.0",
221
- "react-i18next": "12.3.1",
221
+ "react-i18next": "^12.3.1 || ^17.0.0",
222
222
  "react-query": "^3.39.3",
223
223
  "react-router-dom": "5.3.3",
224
- "react-toastify": "8.0.2",
224
+ "react-toastify": "^8.0.2 || ^11.0.0",
225
225
  "source-map-loader": "4.0.1",
226
226
  "stream-browserify": "^3.0.0",
227
227
  "stream-http": "3.2.0",
@@ -230,8 +230,8 @@
230
230
  "url": "0.11.4",
231
231
  "util": "^0.12.5",
232
232
  "vm-browserify": "1.1.2",
233
- "yup": "0.32.11",
234
- "zustand": "4.4.2"
233
+ "yup": "^0.32.11 || ^1.0.0",
234
+ "zustand": "^4.4.2 || ^5.0.0"
235
235
  },
236
236
  "resolutions": {
237
237
  "postcss": "8.5.29",
@@ -133,6 +133,18 @@ interface DailyFormProps {
133
133
  initialValues?: any;
134
134
  }
135
135
 
136
+ interface GoogleMapsFormProps {
137
+ helpDocUrl?: string;
138
+ breadcrumbs?: any[];
139
+ onConnect?: (...args: any[]) => any;
140
+ }
141
+
142
+ interface GoogleMapsManageProps {
143
+ connectPath?: string;
144
+ helpDocUrl?: string;
145
+ onDisconnect?: (...args: any[]) => any;
146
+ }
147
+
136
148
  interface ZoomProps {
137
149
  connectUrl?: string;
138
150
  description?: string;
@@ -177,6 +189,10 @@ export const Twilio: React.FC<TwilioProps>;
177
189
  export const Telnyx: React.FC<TelnyxProps>;
178
190
  export const Daily: React.FC<DailyProps>;
179
191
  export const DailyForm: React.FC<DailyFormProps>;
192
+ export const GoogleMapsForm: React.FC<GoogleMapsFormProps>;
193
+ export const GoogleMapsManage: React.FC<GoogleMapsManageProps>;
194
+ export const GoogleMapsIcon: React.FC<{ size?: number; className?: string }>;
195
+ export const googleMapsQueryKey: string[];
180
196
  export const Zoom: React.FC<ZoomProps>;
181
197
  export const GoogleCalendar: React.FC<GoogleCalendarProps>;
182
198
  export const ZapierForm: React.FC<ZapierFormProps>;
package/types.d.ts CHANGED
@@ -145,6 +145,18 @@ interface DailyFormProps {
145
145
  initialValues?: any;
146
146
  }
147
147
 
148
+ interface GoogleMapsFormProps {
149
+ helpDocUrl?: string;
150
+ breadcrumbs?: any[];
151
+ onConnect?: (...args: any[]) => any;
152
+ }
153
+
154
+ interface GoogleMapsManageProps {
155
+ connectPath?: string;
156
+ helpDocUrl?: string;
157
+ onDisconnect?: (...args: any[]) => any;
158
+ }
159
+
148
160
  interface ZoomProps {
149
161
  connectUrl?: string;
150
162
  description?: string;
@@ -211,6 +223,10 @@ export const Twilio: React.FC<TwilioProps>;
211
223
  export const Telnyx: React.FC<TelnyxProps>;
212
224
  export const Daily: React.FC<DailyProps>;
213
225
  export const DailyForm: React.FC<DailyFormProps>;
226
+ export const GoogleMapsForm: React.FC<GoogleMapsFormProps>;
227
+ export const GoogleMapsManage: React.FC<GoogleMapsManageProps>;
228
+ export const GoogleMapsIcon: React.FC<{ size?: number; className?: string }>;
229
+ export const googleMapsQueryKey: string[];
214
230
  export const Zoom: React.FC<ZoomProps>;
215
231
  export const GoogleCalendar: React.FC<GoogleCalendarProps>;
216
232
  export const ZapierForm: React.FC<ZapierFormProps>;
@@ -1 +0,0 @@
1
- {"version":3,"file":"query-DJngL7gT.js","sources":["../app/javascript/src/constants/urls.js","../app/javascript/src/constants/query.js"],"sourcesContent":["export const INTEGRATIONS_ENGINE_BASE_URL = \"/neeto_integrations\";\nexport const TWILIO_CONFIGURATION_BASE_URL = `${INTEGRATIONS_ENGINE_BASE_URL}/twilio/sms_configurations`;\nexport const INTEGRATIONS_ENGINE_DAILY_URL = `${INTEGRATIONS_ENGINE_BASE_URL}/daily`;\nexport const INTEGRATIONS_ENGINE_ZOOM_URL = `${INTEGRATIONS_ENGINE_BASE_URL}/zoom`;\nexport const INTEGRATION_DETAILS_URL = `${INTEGRATIONS_ENGINE_BASE_URL}/status`;\nexport const TELNYX_PHONE_NUMBERS_URL = `${INTEGRATIONS_ENGINE_BASE_URL}/telnyx/phone_numbers`;\nexport const TELNYX_SMS_CONFIGURATION_URL = `${INTEGRATIONS_ENGINE_BASE_URL}/telnyx/sms_configurations`;\nexport const DISCONNECTION_ALERTS_URL = `${INTEGRATIONS_ENGINE_BASE_URL}/disconnection_alerts`;\nexport const SMS_LOGS_URL = `${INTEGRATIONS_ENGINE_BASE_URL}/sms_logs`;\n","export const QUERY_KEYS = {\n TWILIO_SMS_CONFIGURATION: \"twilio-sms-configuration\",\n TWILIO_SENDER_OPTIONS: \"twilio-sender-options\",\n TELNYX_SMS_CONFIGURATION: \"telnyx-sms-configuration\",\n DAILY_CO_DETAILS: \"daily-co-details\",\n ZOOM_DETAILS: \"zoom-details\",\n DISCONNECTION_ALERTS: \"disconnection-alerts\",\n SMS_LOGS: \"sms-logs\",\n SMS_LOG: \"sms-log\",\n};\n\nexport const disconnectionAlertsQueryKey = [QUERY_KEYS.DISCONNECTION_ALERTS];\n"],"names":["INTEGRATIONS_ENGINE_BASE_URL","TWILIO_CONFIGURATION_BASE_URL","concat","INTEGRATIONS_ENGINE_DAILY_URL","INTEGRATIONS_ENGINE_ZOOM_URL","INTEGRATION_DETAILS_URL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;;;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"query-Dy_oZzH0.js","sources":["../app/javascript/src/constants/urls.js","../app/javascript/src/constants/query.js"],"sourcesContent":["export const INTEGRATIONS_ENGINE_BASE_URL = \"/neeto_integrations\";\nexport const TWILIO_CONFIGURATION_BASE_URL = `${INTEGRATIONS_ENGINE_BASE_URL}/twilio/sms_configurations`;\nexport const INTEGRATIONS_ENGINE_DAILY_URL = `${INTEGRATIONS_ENGINE_BASE_URL}/daily`;\nexport const INTEGRATIONS_ENGINE_ZOOM_URL = `${INTEGRATIONS_ENGINE_BASE_URL}/zoom`;\nexport const INTEGRATION_DETAILS_URL = `${INTEGRATIONS_ENGINE_BASE_URL}/status`;\nexport const TELNYX_PHONE_NUMBERS_URL = `${INTEGRATIONS_ENGINE_BASE_URL}/telnyx/phone_numbers`;\nexport const TELNYX_SMS_CONFIGURATION_URL = `${INTEGRATIONS_ENGINE_BASE_URL}/telnyx/sms_configurations`;\nexport const DISCONNECTION_ALERTS_URL = `${INTEGRATIONS_ENGINE_BASE_URL}/disconnection_alerts`;\nexport const SMS_LOGS_URL = `${INTEGRATIONS_ENGINE_BASE_URL}/sms_logs`;\n","export const QUERY_KEYS = {\n TWILIO_SMS_CONFIGURATION: \"twilio-sms-configuration\",\n TWILIO_SENDER_OPTIONS: \"twilio-sender-options\",\n TELNYX_SMS_CONFIGURATION: \"telnyx-sms-configuration\",\n DAILY_CO_DETAILS: \"daily-co-details\",\n ZOOM_DETAILS: \"zoom-details\",\n DISCONNECTION_ALERTS: \"disconnection-alerts\",\n SMS_LOGS: \"sms-logs\",\n SMS_LOG: \"sms-log\",\n};\n\nexport const disconnectionAlertsQueryKey = [QUERY_KEYS.DISCONNECTION_ALERTS];\n"],"names":["INTEGRATIONS_ENGINE_BASE_URL","TWILIO_CONFIGURATION_BASE_URL","concat","INTEGRATIONS_ENGINE_DAILY_URL","INTEGRATIONS_ENGINE_ZOOM_URL","INTEGRATION_DETAILS_URL","TELNYX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