@bigbinary/neeto-integrations-frontend 4.2.6 → 4.2.8

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 (83) hide show
  1. package/app/javascript/src/translations/ar.json +12 -0
  2. package/app/javascript/src/translations/bg.json +12 -0
  3. package/app/javascript/src/translations/ca.json +12 -0
  4. package/app/javascript/src/translations/cs.json +12 -0
  5. package/app/javascript/src/translations/da.json +12 -0
  6. package/app/javascript/src/translations/de.json +12 -0
  7. package/app/javascript/src/translations/es-MX.json +12 -0
  8. package/app/javascript/src/translations/es.json +12 -0
  9. package/app/javascript/src/translations/et.json +12 -0
  10. package/app/javascript/src/translations/fi.json +12 -0
  11. package/app/javascript/src/translations/fil.json +12 -0
  12. package/app/javascript/src/translations/fr.json +12 -0
  13. package/app/javascript/src/translations/he.json +12 -0
  14. package/app/javascript/src/translations/hi.json +12 -0
  15. package/app/javascript/src/translations/hr.json +12 -0
  16. package/app/javascript/src/translations/hu.json +12 -0
  17. package/app/javascript/src/translations/id.json +12 -0
  18. package/app/javascript/src/translations/it.json +12 -0
  19. package/app/javascript/src/translations/ja.json +12 -0
  20. package/app/javascript/src/translations/ko.json +12 -0
  21. package/app/javascript/src/translations/lv.json +12 -0
  22. package/app/javascript/src/translations/nl.json +12 -0
  23. package/app/javascript/src/translations/pl.json +12 -0
  24. package/app/javascript/src/translations/pt-BR.json +12 -0
  25. package/app/javascript/src/translations/pt.json +12 -0
  26. package/app/javascript/src/translations/ro.json +12 -0
  27. package/app/javascript/src/translations/ru.json +12 -0
  28. package/app/javascript/src/translations/sk.json +12 -0
  29. package/app/javascript/src/translations/sl.json +12 -0
  30. package/app/javascript/src/translations/sv.json +12 -0
  31. package/app/javascript/src/translations/th.json +12 -0
  32. package/app/javascript/src/translations/tr.json +12 -0
  33. package/app/javascript/src/translations/uk.json +12 -0
  34. package/app/javascript/src/translations/vi.json +12 -0
  35. package/app/javascript/src/translations/zh-CN.json +12 -0
  36. package/app/javascript/src/translations/zh-TW.json +12 -0
  37. package/dist/.ready +1 -1
  38. package/dist/Daily.js +2 -2
  39. package/dist/DailyForm.js +2 -2
  40. package/dist/Telnyx.js +2 -2
  41. package/dist/Twilio.js +2 -2
  42. package/dist/Zoom.js +2 -2
  43. package/dist/cjs/v2/GoogleMapsForm.js +125 -0
  44. package/dist/cjs/v2/GoogleMapsForm.js.map +1 -0
  45. package/dist/cjs/v2/GoogleMapsIcon.js +37 -0
  46. package/dist/cjs/v2/GoogleMapsIcon.js.map +1 -0
  47. package/dist/cjs/v2/GoogleMapsManage.js +106 -0
  48. package/dist/cjs/v2/GoogleMapsManage.js.map +1 -0
  49. package/dist/cjs/v2/index.js +26 -273
  50. package/dist/cjs/v2/index.js.map +1 -1
  51. package/dist/index.js +6 -6
  52. package/dist/{query-dZxWLxGc.js → query-CyER0UTx.js} +2 -2
  53. package/dist/{query-dZxWLxGc.js.map → query-CyER0UTx.js.map} +1 -1
  54. package/dist/{useDailiesApi-dbPtabvs.js → useDailiesApi-CMyuK99l.js} +2 -2
  55. package/dist/{useDailiesApi-dbPtabvs.js.map → useDailiesApi-CMyuK99l.js.map} +1 -1
  56. package/dist/{useDisconnectionAlertsApi-CKKd-vBU.js → useDisconnectionAlertsApi-BW25EN1l.js} +2 -2
  57. package/dist/{useDisconnectionAlertsApi-CKKd-vBU.js.map → useDisconnectionAlertsApi-BW25EN1l.js.map} +1 -1
  58. package/dist/useGoogleMapsApi-BY5ZIbh1.js +52 -0
  59. package/dist/useGoogleMapsApi-BY5ZIbh1.js.map +1 -0
  60. package/dist/useGoogleMapsApi-DypGXFnl.js +48 -0
  61. package/dist/useGoogleMapsApi-DypGXFnl.js.map +1 -0
  62. package/dist/{useTelnyxApi-Bdc2eE8x.js → useTelnyxApi-WH39oUwB.js} +2 -2
  63. package/dist/{useTelnyxApi-Bdc2eE8x.js.map → useTelnyxApi-WH39oUwB.js.map} +1 -1
  64. package/dist/{useTwilioApi-CFdE3TY_.js → useTwilioApi-nN6VRQYc.js} +2 -2
  65. package/dist/{useTwilioApi-CFdE3TY_.js.map → useTwilioApi-nN6VRQYc.js.map} +1 -1
  66. package/dist/{useZoomApi-CcPofKkx.js → useZoomApi-i5CNstmT.js} +2 -2
  67. package/dist/{useZoomApi-CcPofKkx.js.map → useZoomApi-i5CNstmT.js.map} +1 -1
  68. package/dist/v2/Daily.js +2 -2
  69. package/dist/v2/DailyForm.js +2 -2
  70. package/dist/v2/DisconnectedIntegrationsRibbon.js +2 -2
  71. package/dist/v2/GoogleMapsForm.js +104 -0
  72. package/dist/v2/GoogleMapsForm.js.map +1 -0
  73. package/dist/v2/GoogleMapsIcon.js +35 -0
  74. package/dist/v2/GoogleMapsIcon.js.map +1 -0
  75. package/dist/v2/GoogleMapsManage.js +104 -0
  76. package/dist/v2/GoogleMapsManage.js.map +1 -0
  77. package/dist/v2/SmsLogs.js +1 -1
  78. package/dist/v2/Telnyx.js +2 -2
  79. package/dist/v2/Twilio.js +2 -2
  80. package/dist/v2/Zoom.js +2 -2
  81. package/dist/v2/index.js +30 -263
  82. package/dist/v2/index.js.map +1 -1
  83. package/package.json +1 -1
@@ -7,25 +7,9 @@ var v2_DisconnectedIntegrationsRibbon = require('./DisconnectedIntegrationsRibbo
7
7
  var v2_Daily = require('./Daily.js');
8
8
  var v2_DailyForm = require('./DailyForm.js');
9
9
  var v2_GoogleCalendar = require('./GoogleCalendar.js');
10
- var neetoAtoms = require('@bigbinary/neeto-atoms');
11
- var formik = require('@bigbinary/neeto-atoms/formik');
12
- var neetoCist = require('@bigbinary/neeto-cist');
13
- var CardLayout = require('@bigbinary/neeto-molecules/v2/CardLayout');
14
- var Container = require('@bigbinary/neeto-molecules/v2/Container');
15
- var Header = require('@bigbinary/neeto-molecules/v2/Header');
16
- var reactI18next = require('react-i18next');
17
- var reactRouterDom = require('react-router-dom');
18
- var _defineProperty = require('@babel/runtime/helpers/defineProperty');
19
- var reactQuery = require('@tanstack/react-query');
20
- var constants = require('@bigbinary/neeto-commons-frontend/constants');
21
- var reactUtils = require('@bigbinary/neeto-commons-frontend/react-utils');
22
- var axios = require('axios');
23
- var i18next = require('i18next');
24
- var yup = require('yup');
25
- var jsxRuntime = require('react/jsx-runtime');
26
- var _slicedToArray = require('@babel/runtime/helpers/slicedToArray');
27
- var React = require('react');
28
- var CopyToClipboardButton = require('@bigbinary/neeto-molecules/v2/CopyToClipboardButton');
10
+ var v2_GoogleMapsForm = require('./GoogleMapsForm.js');
11
+ var v2_GoogleMapsIcon = require('./GoogleMapsIcon.js');
12
+ var v2_GoogleMapsManage = require('./GoogleMapsManage.js');
29
13
  var v2_Telnyx = require('./Telnyx.js');
30
14
  var v2_Twilio = require('./Twilio.js');
31
15
  var v2_Zoom = require('./Zoom.js');
@@ -35,18 +19,38 @@ var v2_Connect = require('./Connect.js');
35
19
  var v2_Demo = require('./Demo.js');
36
20
  var v2_Finish = require('./Finish.js');
37
21
  var v2_WalkthroughModal = require('./WalkthroughModal.js');
22
+ require('@babel/runtime/helpers/defineProperty');
23
+ require('@bigbinary/neeto-atoms');
24
+ require('@bigbinary/neeto-cist');
38
25
  require('@bigbinary/neeto-commons-frontend/v2/react-utils');
26
+ require('react/jsx-runtime');
39
27
  require('@babel/runtime/helpers/objectWithoutProperties');
40
28
  require('@bigbinary/neeto-commons-frontend/v2/react-utils/withT');
29
+ require('@babel/runtime/helpers/slicedToArray');
30
+ require('react');
41
31
  require('@bigbinary/neeto-molecules/v2/StickyRibbon');
42
32
  require('ramda');
33
+ require('react-i18next');
34
+ require('react-router-dom');
43
35
  require('../../useDisconnectionAlertsApi-BGaBOO_4.js');
36
+ require('@tanstack/react-query');
37
+ require('@bigbinary/neeto-commons-frontend/constants');
38
+ require('@bigbinary/neeto-commons-frontend/react-utils');
39
+ require('axios');
40
+ require('i18next');
44
41
  require('../../useDailiesApi-BmI2LDF7.js');
45
42
  require('@bigbinary/neeto-commons-frontend/v2/utils');
46
43
  require('@bigbinary/neeto-icons/misc/Daily');
44
+ require('@bigbinary/neeto-molecules/v2/CopyToClipboardButton');
45
+ require('@bigbinary/neeto-atoms/formik');
46
+ require('@bigbinary/neeto-molecules/v2/CardLayout');
47
+ require('@bigbinary/neeto-molecules/v2/Container');
48
+ require('@bigbinary/neeto-molecules/v2/Header');
49
+ require('yup');
47
50
  require('@babel/runtime/helpers/toConsumableArray');
48
51
  require('@bigbinary/neeto-icons/misc/GoogleCalendar');
49
52
  require('@bigbinary/neeto-icons/misc/Google');
53
+ require('../../useGoogleMapsApi-BY5ZIbh1.js');
50
54
  require('../../useTelnyxApi-DH5XaYIo.js');
51
55
  require('@babel/runtime/helpers/asyncToGenerator');
52
56
  require('../../useTwilioApi-CYF8UIPN.js');
@@ -61,258 +65,7 @@ require('@bigbinary/neeto-molecules/v2/SubHeader');
61
65
  require('../../index-dxk7jTL7.js');
62
66
  require('../../success-CsNvTPBG.js');
63
67
 
64
- function _interopNamespaceDefault(e) {
65
- var n = Object.create(null);
66
- if (e) {
67
- Object.keys(e).forEach(function (k) {
68
- if (k !== 'default') {
69
- var d = Object.getOwnPropertyDescriptor(e, k);
70
- Object.defineProperty(n, k, d.get ? d : {
71
- enumerable: true,
72
- get: function () { return e[k]; }
73
- });
74
- }
75
- });
76
- }
77
- n.default = e;
78
- return Object.freeze(n);
79
- }
80
68
 
81
- var yup__namespace = /*#__PURE__*/_interopNamespaceDefault(yup);
82
-
83
- var create = function create(payload) {
84
- return axios.post(query.INTEGRATIONS_ENGINE_GOOGLE_MAPS_URL, {
85
- googleMaps: payload
86
- });
87
- };
88
- var show = function show() {
89
- return axios.get(query.INTEGRATIONS_ENGINE_GOOGLE_MAPS_URL);
90
- };
91
- var destroy = function destroy() {
92
- return axios["delete"](query.INTEGRATIONS_ENGINE_GOOGLE_MAPS_URL);
93
- };
94
- var googleMapsApi = {
95
- create: create,
96
- show: show,
97
- destroy: destroy
98
- };
99
-
100
- 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; }
101
- 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; }
102
- var useFetchGoogleMaps = function useFetchGoogleMaps() {
103
- return reactQuery.useQuery({
104
- queryKey: query.googleMapsQueryKey,
105
- queryFn: googleMapsApi.show,
106
- staleTime: constants.DEFAULT_STALE_TIME
107
- });
108
- };
109
- var useCreateGoogleMaps = function useCreateGoogleMaps() {
110
- var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
111
- return reactUtils.useMutationWithInvalidation(googleMapsApi.create, _objectSpread({
112
- keysToInvalidate: [query.googleMapsQueryKey]
113
- }, options));
114
- };
115
- var useDestroyGoogleMaps = function useDestroyGoogleMaps() {
116
- var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
117
- return reactUtils.useMutationWithInvalidation(googleMapsApi.destroy, _objectSpread({
118
- keysToInvalidate: [query.googleMapsQueryKey]
119
- }, options));
120
- };
121
-
122
- var GOOGLE_MAPS_FORM_INITIAL_VALUES = {
123
- apiKey: ""
124
- };
125
- var GOOGLE_MAPS_VALIDATION_SCHEMA = yup__namespace.object().shape({
126
- apiKey: yup__namespace.string().trim().required(i18next.t("neetoIntegrations.errors.required", {
127
- entity: i18next.t("neetoIntegrations.googleMaps.apiKey")
128
- }))
129
- });
130
-
131
- var Form = function Form(_ref) {
132
- var _ref$helpDocUrl = _ref.helpDocUrl,
133
- helpDocUrl = _ref$helpDocUrl === void 0 ? "" : _ref$helpDocUrl,
134
- _ref$breadcrumbs = _ref.breadcrumbs,
135
- breadcrumbs = _ref$breadcrumbs === void 0 ? [] : _ref$breadcrumbs,
136
- _ref$onConnect = _ref.onConnect,
137
- onConnect = _ref$onConnect === void 0 ? neetoCist.noop : _ref$onConnect;
138
- var _useTranslation = reactI18next.useTranslation(),
139
- t = _useTranslation.t;
140
- var history = reactRouterDom.useHistory();
141
- var _useCreateGoogleMaps = useCreateGoogleMaps({
142
- onSuccess: function onSuccess() {
143
- return onConnect();
144
- }
145
- }),
146
- createGoogleMaps = _useCreateGoogleMaps.mutate,
147
- isConnecting = _useCreateGoogleMaps.isPending;
148
- var handleSubmit = function handleSubmit(_ref2) {
149
- var apiKey = _ref2.apiKey;
150
- return createGoogleMaps({
151
- apiKey: apiKey.trim()
152
- });
153
- };
154
- return /*#__PURE__*/jsxRuntime.jsxs(Container, {
155
- isHeaderFixed: true,
156
- children: [/*#__PURE__*/jsxRuntime.jsx(Header, {
157
- breadcrumbs: breadcrumbs,
158
- title: t("neetoIntegrations.common.connect")
159
- }), /*#__PURE__*/jsxRuntime.jsx("div", {
160
- className: "w-full",
161
- children: /*#__PURE__*/jsxRuntime.jsx(formik.Form, {
162
- formikProps: {
163
- initialValues: GOOGLE_MAPS_FORM_INITIAL_VALUES,
164
- validationSchema: GOOGLE_MAPS_VALIDATION_SCHEMA,
165
- onSubmit: handleSubmit
166
- },
167
- children: /*#__PURE__*/jsxRuntime.jsx(CardLayout, {
168
- actionBlock: /*#__PURE__*/jsxRuntime.jsx(formik.ActionBlock, {
169
- cancelButtonProps: {
170
- onClick: function onClick() {
171
- return history.goBack();
172
- }
173
- },
174
- isSubmitting: isConnecting,
175
- submitButtonProps: {
176
- label: t("neetoIntegrations.common.connect")
177
- }
178
- }),
179
- children: /*#__PURE__*/jsxRuntime.jsx(formik.Input, {
180
- autoFocus: true,
181
- required: true,
182
- autoComplete: "off",
183
- dataTestId: "google-maps-api-key",
184
- label: t("neetoIntegrations.googleMaps.apiKey"),
185
- name: "apiKey",
186
- helpText: /*#__PURE__*/jsxRuntime.jsx(reactI18next.Trans, {
187
- i18nKey: "neetoIntegrations.googleMaps.apiKeyHelpText",
188
- components: {
189
- helpLink: /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Button, {
190
- "data-testid": "google-maps-api-key-help-link",
191
- href: helpDocUrl,
192
- rel: "noreferrer",
193
- target: "_blank",
194
- variant: "link"
195
- })
196
- }
197
- })
198
- })
199
- })
200
- })
201
- })]
202
- });
203
- };
204
-
205
- var GoogleMapsIcon = function GoogleMapsIcon(_ref) {
206
- var _ref$size = _ref.size,
207
- size = _ref$size === void 0 ? 24 : _ref$size,
208
- _ref$className = _ref.className,
209
- className = _ref$className === void 0 ? "" : _ref$className;
210
- return /*#__PURE__*/jsxRuntime.jsxs("svg", {
211
- className: className,
212
- "aria-hidden": "true",
213
- height: size,
214
- viewBox: "0 0 92.3 132.3",
215
- width: size,
216
- xmlns: "http://www.w3.org/2000/svg",
217
- children: [/*#__PURE__*/jsxRuntime.jsx("path", {
218
- 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",
219
- fill: "#1a73e8"
220
- }), /*#__PURE__*/jsxRuntime.jsx("path", {
221
- 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",
222
- fill: "#ea4335"
223
- }), /*#__PURE__*/jsxRuntime.jsx("path", {
224
- 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",
225
- fill: "#4285f4"
226
- }), /*#__PURE__*/jsxRuntime.jsx("path", {
227
- 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",
228
- fill: "#fbbc04"
229
- }), /*#__PURE__*/jsxRuntime.jsx("path", {
230
- 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",
231
- fill: "#34a853"
232
- })]
233
- });
234
- };
235
-
236
- var Manage = function Manage(_ref) {
237
- var _ref$connectPath = _ref.connectPath,
238
- connectPath = _ref$connectPath === void 0 ? "" : _ref$connectPath,
239
- _ref$helpDocUrl = _ref.helpDocUrl,
240
- helpDocUrl = _ref$helpDocUrl === void 0 ? "" : _ref$helpDocUrl,
241
- _ref$onDisconnect = _ref.onDisconnect,
242
- onDisconnect = _ref$onDisconnect === void 0 ? neetoCist.noop : _ref$onDisconnect;
243
- var _useTranslation = reactI18next.useTranslation(),
244
- t = _useTranslation.t;
245
- var _useState = React.useState(false),
246
- _useState2 = _slicedToArray(_useState, 2),
247
- isDisconnectAlertOpen = _useState2[0],
248
- setIsDisconnectAlertOpen = _useState2[1];
249
- var _useFetchGoogleMaps = useFetchGoogleMaps(),
250
- _useFetchGoogleMaps$d = _useFetchGoogleMaps.data,
251
- _useFetchGoogleMaps$d2 = _useFetchGoogleMaps$d === void 0 ? {} : _useFetchGoogleMaps$d,
252
- _useFetchGoogleMaps$d3 = _useFetchGoogleMaps$d2.apiKey,
253
- apiKey = _useFetchGoogleMaps$d3 === void 0 ? null : _useFetchGoogleMaps$d3,
254
- isLoading = _useFetchGoogleMaps.isLoading;
255
- var _useDestroyGoogleMaps = useDestroyGoogleMaps({
256
- onSuccess: function onSuccess() {
257
- setIsDisconnectAlertOpen(false);
258
- onDisconnect();
259
- }
260
- }),
261
- destroyGoogleMaps = _useDestroyGoogleMaps.mutate,
262
- isDisconnecting = _useDestroyGoogleMaps.isPending;
263
- var isConnected = neetoCist.isPresent(apiKey);
264
- if (isLoading) {
265
- return /*#__PURE__*/jsxRuntime.jsx("div", {
266
- className: "flex h-full w-full items-center justify-center",
267
- children: /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Spinner, {})
268
- });
269
- }
270
- return /*#__PURE__*/jsxRuntime.jsx(v2_Manage, {
271
- connectPath: connectPath,
272
- helpDocUrl: helpDocUrl,
273
- isConnected: isConnected,
274
- isDisconnectAlertOpen: isDisconnectAlertOpen,
275
- isDisconnecting: isDisconnecting,
276
- setIsDisconnectAlertOpen: setIsDisconnectAlertOpen,
277
- Icon: GoogleMapsIcon,
278
- disconnectMessage: t("neetoIntegrations.googleMaps.disconnect.message"),
279
- disconnectTitle: t("neetoIntegrations.googleMaps.disconnect.title"),
280
- integration: "googleMaps",
281
- integrationName: t("neetoIntegrations.googleMaps.title"),
282
- description: isConnected ? /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Typography, {
283
- as: "span",
284
- variant: "body1",
285
- children: /*#__PURE__*/jsxRuntime.jsx(reactI18next.Trans, {
286
- i18nKey: "neetoIntegrations.googleMaps.connectedDescription",
287
- values: {
288
- apiKey: apiKey
289
- },
290
- components: {
291
- wrapper: /*#__PURE__*/jsxRuntime.jsx("div", {
292
- className: "mt-2 flex items-center justify-between gap-x-3 rounded-md border border-border px-3 py-2"
293
- }),
294
- span: /*#__PURE__*/jsxRuntime.jsx("span", {
295
- className: "break-all text-sm"
296
- }),
297
- copy: /*#__PURE__*/jsxRuntime.jsx(CopyToClipboardButton, {
298
- className: "shrink-0 self-start",
299
- value: apiKey,
300
- variant: "ghost"
301
- })
302
- }
303
- })
304
- }) : t("neetoIntegrations.googleMaps.description"),
305
- title: isConnected ? t("neetoIntegrations.googleMaps.connected") : t("neetoIntegrations.common.connectIntegration", {
306
- integration: t("neetoIntegrations.googleMaps.title")
307
- }),
308
- onClose: function onClose() {
309
- return setIsDisconnectAlertOpen(false);
310
- },
311
- onDisconnect: function onDisconnect() {
312
- return destroyGoogleMaps();
313
- }
314
- });
315
- };
316
69
 
317
70
  exports.disconnectionAlertsQueryKey = query.disconnectionAlertsQueryKey;
318
71
  exports.googleMapsQueryKey = query.googleMapsQueryKey;
@@ -322,6 +75,9 @@ exports.DisconnectedIntegrationsRibbon = v2_DisconnectedIntegrationsRibbon;
322
75
  exports.Daily = v2_Daily;
323
76
  exports.DailyForm = v2_DailyForm;
324
77
  exports.GoogleCalendar = v2_GoogleCalendar;
78
+ exports.GoogleMapsForm = v2_GoogleMapsForm;
79
+ exports.GoogleMapsIcon = v2_GoogleMapsIcon;
80
+ exports.GoogleMapsManage = v2_GoogleMapsManage;
325
81
  exports.Telnyx = v2_Telnyx;
326
82
  exports.Twilio = v2_Twilio;
327
83
  exports.Zoom = v2_Zoom;
@@ -331,7 +87,4 @@ exports.Connect = v2_Connect;
331
87
  exports.Demo = v2_Demo;
332
88
  exports.Finish = v2_Finish;
333
89
  exports.WalkthroughModal = v2_WalkthroughModal;
334
- exports.GoogleMapsForm = Form;
335
- exports.GoogleMapsIcon = GoogleMapsIcon;
336
- exports.GoogleMapsManage = Manage;
337
90
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
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,KAAK,CAACC,IAAI,CAACC,yCAAmC,EAAE;AAAEC,IAAAA,UAAU,EAAEJ;AAAQ,GAAC,CAAC;AAAA,CAAA;AAE1E,IAAMK,IAAI,GAAG,SAAPA,IAAIA,GAAA;AAAA,EAAA,OAASJ,KAAK,CAACK,GAAG,CAACH,yCAAmC,CAAC;AAAA,CAAA;AAEjE,IAAMI,OAAO,GAAG,SAAVA,OAAOA,GAAA;AAAA,EAAA,OAASN,KAAK,CAAA,QAAA,CAAO,CAACE,yCAAmC,CAAC;AAAA,CAAA;AAEvE,IAAMK,aAAa,GAAG;AAAET,EAAAA,MAAM,EAANA,MAAM;AAAEM,EAAAA,IAAI,EAAJA,IAAI;AAAEE,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0E,UAAAA,IAAI,eAAE7E,cAAA,CAAA,MAAA,EAAA;AAAMG,YAAAA,SAAS,EAAC;AAAmB,WAAE,CAAC;UAC5C2E,IAAI,eACF9E,cAAA,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;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/dist/index.js CHANGED
@@ -6,7 +6,7 @@ import Tag from '@bigbinary/neetoui/Tag';
6
6
  import { isEmpty } from 'ramda';
7
7
  import { useTranslation, Trans } from 'react-i18next';
8
8
  import { Link } from 'react-router-dom';
9
- import { u as useFetchDisconnectionAlerts } from './useDisconnectionAlertsApi-CKKd-vBU.js';
9
+ import { u as useFetchDisconnectionAlerts } from './useDisconnectionAlertsApi-BW25EN1l.js';
10
10
  import { t } from 'i18next';
11
11
  import { jsx, jsxs } from 'react/jsx-runtime';
12
12
  export { default as Daily } from './Daily.js';
@@ -20,7 +20,7 @@ export { default as Connect } from './Connect.js';
20
20
  export { default as Demo } from './Demo.js';
21
21
  export { default as Finish } from './Finish.js';
22
22
  export { default as WalkthroughModal } from './WalkthroughModal.js';
23
- export { d as disconnectionAlertsQueryKey } from './query-dZxWLxGc.js';
23
+ export { d as disconnectionAlertsQueryKey } from './query-CyER0UTx.js';
24
24
  import '@babel/runtime/helpers/defineProperty';
25
25
  import '@bigbinary/neeto-cist';
26
26
  import '@bigbinary/neeto-commons-frontend/react-utils';
@@ -36,7 +36,7 @@ import '@bigbinary/neetoui/Alert';
36
36
  import '@tanstack/react-query';
37
37
  import '@bigbinary/neeto-commons-frontend/constants';
38
38
  import 'axios';
39
- import './useDailiesApi-dbPtabvs.js';
39
+ import './useDailiesApi-CMyuK99l.js';
40
40
  import '@bigbinary/neeto-commons-frontend/utils';
41
41
  import '@bigbinary/neeto-icons/misc/Daily';
42
42
  import '@bigbinary/neeto-molecules/CopyToClipboardButton';
@@ -52,11 +52,11 @@ import '@babel/runtime/helpers/toConsumableArray';
52
52
  import '@bigbinary/neeto-icons/misc/GoogleCalendar';
53
53
  import '@bigbinary/neeto-icons/misc/Google';
54
54
  import '@bigbinary/neetoui/formik/Select';
55
- import './useTelnyxApi-Bdc2eE8x.js';
55
+ import './useTelnyxApi-WH39oUwB.js';
56
56
  import '@babel/runtime/helpers/asyncToGenerator';
57
- import './useTwilioApi-CFdE3TY_.js';
57
+ import './useTwilioApi-nN6VRQYc.js';
58
58
  import '@bigbinary/neeto-icons/misc/Zoom';
59
- import './useZoomApi-CcPofKkx.js';
59
+ import './useZoomApi-i5CNstmT.js';
60
60
  import '@bigbinary/neetoui/Modal';
61
61
  import 'classnames';
62
62
  import './index-MS1ts-9f.js';
@@ -23,5 +23,5 @@ var QUERY_KEYS = {
23
23
  var disconnectionAlertsQueryKey = [QUERY_KEYS.DISCONNECTION_ALERTS];
24
24
  var googleMapsQueryKey = [QUERY_KEYS.GOOGLE_MAPS_DETAILS];
25
25
 
26
- export { DISCONNECTION_ALERTS_URL as D, INTEGRATIONS_ENGINE_GOOGLE_MAPS_URL as I, QUERY_KEYS as Q, SMS_LOGS_URL as S, TWILIO_CONFIGURATION_BASE_URL as T, TELNYX_SMS_CONFIGURATION_URL as a, TELNYX_PHONE_NUMBERS_URL as b, INTEGRATIONS_ENGINE_DAILY_URL as c, disconnectionAlertsQueryKey as d, INTEGRATION_DETAILS_URL as e, INTEGRATIONS_ENGINE_ZOOM_URL as f, googleMapsQueryKey as g };
27
- //# sourceMappingURL=query-dZxWLxGc.js.map
26
+ export { DISCONNECTION_ALERTS_URL as D, INTEGRATIONS_ENGINE_DAILY_URL as I, QUERY_KEYS as Q, SMS_LOGS_URL as S, TWILIO_CONFIGURATION_BASE_URL as T, TELNYX_SMS_CONFIGURATION_URL as a, TELNYX_PHONE_NUMBERS_URL as b, INTEGRATION_DETAILS_URL as c, disconnectionAlertsQueryKey as d, INTEGRATIONS_ENGINE_ZOOM_URL as e, INTEGRATIONS_ENGINE_GOOGLE_MAPS_URL as f, googleMapsQueryKey as g };
27
+ //# sourceMappingURL=query-CyER0UTx.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"query-dZxWLxGc.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_GOOGLE_MAPS_URL = `${INTEGRATIONS_ENGINE_BASE_URL}/google_maps`;\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 GOOGLE_MAPS_DETAILS: \"google-maps-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\nexport const googleMapsQueryKey = [QUERY_KEYS.GOOGLE_MAPS_DETAILS];\n"],"names":["INTEGRATIONS_ENGINE_BASE_URL","TWILIO_CONFIGURATION_BASE_URL","concat","INTEGRATIONS_ENGINE_DAILY_URL","INTEGRATIONS_ENGINE_GOOGLE_MAPS_URL","INTEGRATIONS_ENGINE_ZOOM_URL","INTEGRATION_DETAILS_URL","TELNYX_PHONE_NUMBERS_URL","TELNYX_SMS_CONFIGURATION_URL","DISCONNECTION_ALERTS_URL","SMS_LOGS_URL","QUERY_KEYS","TWILIO_SMS_CONFIGURATION","TWILIO_SENDER_OPTIONS","TELNYX_SMS_CONFIGURATION","DAILY_CO_DETAILS","GOOGLE_MAPS_DETAILS","ZOOM_DETAILS","DISCONNECTION_ALERTS","SMS_LOGS","SMS_LOG","disconnectionAlertsQueryKey","googleMapsQueryKey"],"mappings":"AAAO,IAAMA,4BAA4B,GAAG,qBAAqB;IACpDC,6BAA6B,GAAA,EAAA,CAAAC,MAAA,CAAMF,4BAA4B,EAAA,4BAAA;IAC/DG,6BAA6B,GAAA,EAAA,CAAAD,MAAA,CAAMF,4BAA4B,EAAA,QAAA;IAC/DI,mCAAmC,GAAA,EAAA,CAAAF,MAAA,CAAMF,4BAA4B,EAAA,cAAA;IACrEK,4BAA4B,GAAA,EAAA,CAAAH,MAAA,CAAMF,4BAA4B,EAAA,OAAA;IAC9DM,uBAAuB,GAAA,EAAA,CAAAJ,MAAA,CAAMF,4BAA4B,EAAA,SAAA;IACzDO,wBAAwB,GAAA,EAAA,CAAAL,MAAA,CAAMF,4BAA4B,EAAA,uBAAA;IAC1DQ,4BAA4B,GAAA,EAAA,CAAAN,MAAA,CAAMF,4BAA4B,EAAA,4BAAA;IAC9DS,wBAAwB,GAAA,EAAA,CAAAP,MAAA,CAAMF,4BAA4B,EAAA,uBAAA;IAC1DU,YAAY,GAAA,EAAA,CAAAR,MAAA,CAAMF,4BAA4B,EAAA,WAAA;;ACTpD,IAAMW,UAAU,GAAG;AACxBC,EAAAA,wBAAwB,EAAE,0BAA0B;AACpDC,EAAAA,qBAAqB,EAAE,uBAAuB;AAC9CC,EAAAA,wBAAwB,EAAE,0BAA0B;AACpDC,EAAAA,gBAAgB,EAAE,kBAAkB;AACpCC,EAAAA,mBAAmB,EAAE,qBAAqB;AAC1CC,EAAAA,YAAY,EAAE,cAAc;AAC5BC,EAAAA,oBAAoB,EAAE,sBAAsB;AAC5CC,EAAAA,QAAQ,EAAE,UAAU;AACpBC,EAAAA,OAAO,EAAE;AACX;IAEaC,2BAA2B,GAAG,CAACV,UAAU,CAACO,oBAAoB;IAE9DI,kBAAkB,GAAG,CAACX,UAAU,CAACK,mBAAmB;;;;"}
1
+ {"version":3,"file":"query-CyER0UTx.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_GOOGLE_MAPS_URL = `${INTEGRATIONS_ENGINE_BASE_URL}/google_maps`;\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 GOOGLE_MAPS_DETAILS: \"google-maps-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\nexport const googleMapsQueryKey = [QUERY_KEYS.GOOGLE_MAPS_DETAILS];\n"],"names":["INTEGRATIONS_ENGINE_BASE_URL","TWILIO_CONFIGURATION_BASE_URL","concat","INTEGRATIONS_ENGINE_DAILY_URL","INTEGRATIONS_ENGINE_GOOGLE_MAPS_URL","INTEGRATIONS_ENGINE_ZOOM_URL","INTEGRATION_DETAILS_URL","TELNYX_PHONE_NUMBERS_URL","TELNYX_SMS_CONFIGURATION_URL","DISCONNECTION_ALERTS_URL","SMS_LOGS_URL","QUERY_KEYS","TWILIO_SMS_CONFIGURATION","TWILIO_SENDER_OPTIONS","TELNYX_SMS_CONFIGURATION","DAILY_CO_DETAILS","GOOGLE_MAPS_DETAILS","ZOOM_DETAILS","DISCONNECTION_ALERTS","SMS_LOGS","SMS_LOG","disconnectionAlertsQueryKey","googleMapsQueryKey"],"mappings":"AAAO,IAAMA,4BAA4B,GAAG,qBAAqB;IACpDC,6BAA6B,GAAA,EAAA,CAAAC,MAAA,CAAMF,4BAA4B,EAAA,4BAAA;IAC/DG,6BAA6B,GAAA,EAAA,CAAAD,MAAA,CAAMF,4BAA4B,EAAA,QAAA;IAC/DI,mCAAmC,GAAA,EAAA,CAAAF,MAAA,CAAMF,4BAA4B,EAAA,cAAA;IACrEK,4BAA4B,GAAA,EAAA,CAAAH,MAAA,CAAMF,4BAA4B,EAAA,OAAA;IAC9DM,uBAAuB,GAAA,EAAA,CAAAJ,MAAA,CAAMF,4BAA4B,EAAA,SAAA;IACzDO,wBAAwB,GAAA,EAAA,CAAAL,MAAA,CAAMF,4BAA4B,EAAA,uBAAA;IAC1DQ,4BAA4B,GAAA,EAAA,CAAAN,MAAA,CAAMF,4BAA4B,EAAA,4BAAA;IAC9DS,wBAAwB,GAAA,EAAA,CAAAP,MAAA,CAAMF,4BAA4B,EAAA,uBAAA;IAC1DU,YAAY,GAAA,EAAA,CAAAR,MAAA,CAAMF,4BAA4B,EAAA,WAAA;;ACTpD,IAAMW,UAAU,GAAG;AACxBC,EAAAA,wBAAwB,EAAE,0BAA0B;AACpDC,EAAAA,qBAAqB,EAAE,uBAAuB;AAC9CC,EAAAA,wBAAwB,EAAE,0BAA0B;AACpDC,EAAAA,gBAAgB,EAAE,kBAAkB;AACpCC,EAAAA,mBAAmB,EAAE,qBAAqB;AAC1CC,EAAAA,YAAY,EAAE,cAAc;AAC5BC,EAAAA,oBAAoB,EAAE,sBAAsB;AAC5CC,EAAAA,QAAQ,EAAE,UAAU;AACpBC,EAAAA,OAAO,EAAE;AACX;IAEaC,2BAA2B,GAAG,CAACV,UAAU,CAACO,oBAAoB;IAE9DI,kBAAkB,GAAG,CAACX,UAAU,CAACK,mBAAmB;;;;"}
@@ -3,7 +3,7 @@ import { useQuery } from '@tanstack/react-query';
3
3
  import { DEFAULT_STALE_TIME } from '@bigbinary/neeto-commons-frontend/constants';
4
4
  import { useMutationWithInvalidation } from '@bigbinary/neeto-commons-frontend/react-utils';
5
5
  import axios from 'axios';
6
- import { c as INTEGRATIONS_ENGINE_DAILY_URL, Q as QUERY_KEYS } from './query-dZxWLxGc.js';
6
+ import { I as INTEGRATIONS_ENGINE_DAILY_URL, Q as QUERY_KEYS } from './query-CyER0UTx.js';
7
7
 
8
8
  var create = function create(payload) {
9
9
  return axios.post(INTEGRATIONS_ENGINE_DAILY_URL, {
@@ -46,4 +46,4 @@ var useDestroyDaily = function useDestroyDaily(_ref) {
46
46
  };
47
47
 
48
48
  export { useDestroyDaily as a, useCreateDaily as b, useFetchDaily as u };
49
- //# sourceMappingURL=useDailiesApi-dbPtabvs.js.map
49
+ //# sourceMappingURL=useDailiesApi-CMyuK99l.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useDailiesApi-dbPtabvs.js","sources":["../app/javascript/src/apis/dailies.js","../app/javascript/src/hooks/reactQuery/useDailiesApi.js"],"sourcesContent":["import axios from \"axios\";\n\nimport { INTEGRATIONS_ENGINE_DAILY_URL } from \"src/constants/urls\";\n\nconst create = payload =>\n axios.post(INTEGRATIONS_ENGINE_DAILY_URL, { daily: payload });\n\nconst show = () => axios.get(INTEGRATIONS_ENGINE_DAILY_URL);\n\nconst destroy = () => axios.delete(INTEGRATIONS_ENGINE_DAILY_URL);\n\nconst dailiesApi = { create, show, destroy };\n\nexport default dailiesApi;\n","import { useQuery } from \"@tanstack/react-query\";\nimport { DEFAULT_STALE_TIME } from \"neetocommons/constants\";\nimport { useMutationWithInvalidation } from \"neetocommons/react-utils\";\n\nimport dailiesApi from \"apis/dailies\";\nimport { QUERY_KEYS } from \"src/constants/query\";\n\nexport const useCreateDaily = (options = {}) =>\n useMutationWithInvalidation(dailiesApi.create, {\n keysToInvalidate: [[QUERY_KEYS.DAILY_CO_DETAILS]],\n ...options,\n });\n\nexport const useFetchDaily = () =>\n useQuery({\n queryKey: [QUERY_KEYS.DAILY_CO_DETAILS],\n queryFn: dailiesApi.show,\n staleTime: DEFAULT_STALE_TIME,\n });\n\nexport const useDestroyDaily = ({ onSuccess }) =>\n useMutationWithInvalidation(dailiesApi.destroy, {\n keysToInvalidate: [[QUERY_KEYS.DAILY_CO_DETAILS]],\n onSuccess,\n });\n"],"names":["create","payload","axios","post","INTEGRATIONS_ENGINE_DAILY_URL","daily","show","get","destroy","dailiesApi","useCreateDaily","options","arguments","length","undefined","useMutationWithInvalidation","_objectSpread","keysToInvalidate","QUERY_KEYS","DAILY_CO_DETAILS","useFetchDaily","useQuery","queryKey","queryFn","staleTime","DEFAULT_STALE_TIME","useDestroyDaily","_ref","onSuccess"],"mappings":";;;;;;;AAIA,IAAMA,MAAM,GAAG,SAATA,MAAMA,CAAGC,OAAO,EAAA;AAAA,EAAA,OACpBC,KAAK,CAACC,IAAI,CAACC,6BAA6B,EAAE;AAAEC,IAAAA,KAAK,EAAEJ;AAAQ,GAAC,CAAC;AAAA,CAAA;AAE/D,IAAMK,IAAI,GAAG,SAAPA,IAAIA,GAAA;AAAA,EAAA,OAASJ,KAAK,CAACK,GAAG,CAACH,6BAA6B,CAAC;AAAA,CAAA;AAE3D,IAAMI,OAAO,GAAG,SAAVA,OAAOA,GAAA;AAAA,EAAA,OAASN,KAAK,CAAA,QAAA,CAAO,CAACE,6BAA6B,CAAC;AAAA,CAAA;AAEjE,IAAMK,UAAU,GAAG;AAAET,EAAAA,MAAM,EAANA,MAAM;AAAEM,EAAAA,IAAI,EAAJA,IAAI;AAAEE,EAAAA,OAAO,EAAPA;AAAQ,CAAC;;;;ACJrC,IAAME,cAAc,GAAG,SAAjBA,cAAcA,GAAA;AAAA,EAAA,IAAIC,OAAO,GAAAC,SAAA,CAAAC,MAAA,GAAA,CAAA,IAAAD,SAAA,CAAA,CAAA,CAAA,KAAAE,SAAA,GAAAF,SAAA,CAAA,CAAA,CAAA,GAAG,EAAE;AAAA,EAAA,OACzCG,2BAA2B,CAACN,UAAU,CAACT,MAAM,EAAAgB,aAAA,CAAA;AAC3CC,IAAAA,gBAAgB,EAAE,CAAC,CAACC,UAAU,CAACC,gBAAgB,CAAC;GAAC,EAC9CR,OAAO,CACX,CAAC;AAAA;AAEG,IAAMS,aAAa,GAAG,SAAhBA,aAAaA,GAAA;AAAA,EAAA,OACxBC,QAAQ,CAAC;AACPC,IAAAA,QAAQ,EAAE,CAACJ,UAAU,CAACC,gBAAgB,CAAC;IACvCI,OAAO,EAAEd,UAAU,CAACH,IAAI;AACxBkB,IAAAA,SAAS,EAAEC;AACb,GAAC,CAAC;AAAA;IAESC,eAAe,GAAG,SAAlBA,eAAeA,CAAAC,IAAA,EAAA;AAAA,EAAA,IAAMC,SAAS,GAAAD,IAAA,CAATC,SAAS;AAAA,EAAA,OACzCb,2BAA2B,CAACN,UAAU,CAACD,OAAO,EAAE;AAC9CS,IAAAA,gBAAgB,EAAE,CAAC,CAACC,UAAU,CAACC,gBAAgB,CAAC,CAAC;AACjDS,IAAAA,SAAS,EAATA;AACF,GAAC,CAAC;AAAA;;;;"}
1
+ {"version":3,"file":"useDailiesApi-CMyuK99l.js","sources":["../app/javascript/src/apis/dailies.js","../app/javascript/src/hooks/reactQuery/useDailiesApi.js"],"sourcesContent":["import axios from \"axios\";\n\nimport { INTEGRATIONS_ENGINE_DAILY_URL } from \"src/constants/urls\";\n\nconst create = payload =>\n axios.post(INTEGRATIONS_ENGINE_DAILY_URL, { daily: payload });\n\nconst show = () => axios.get(INTEGRATIONS_ENGINE_DAILY_URL);\n\nconst destroy = () => axios.delete(INTEGRATIONS_ENGINE_DAILY_URL);\n\nconst dailiesApi = { create, show, destroy };\n\nexport default dailiesApi;\n","import { useQuery } from \"@tanstack/react-query\";\nimport { DEFAULT_STALE_TIME } from \"neetocommons/constants\";\nimport { useMutationWithInvalidation } from \"neetocommons/react-utils\";\n\nimport dailiesApi from \"apis/dailies\";\nimport { QUERY_KEYS } from \"src/constants/query\";\n\nexport const useCreateDaily = (options = {}) =>\n useMutationWithInvalidation(dailiesApi.create, {\n keysToInvalidate: [[QUERY_KEYS.DAILY_CO_DETAILS]],\n ...options,\n });\n\nexport const useFetchDaily = () =>\n useQuery({\n queryKey: [QUERY_KEYS.DAILY_CO_DETAILS],\n queryFn: dailiesApi.show,\n staleTime: DEFAULT_STALE_TIME,\n });\n\nexport const useDestroyDaily = ({ onSuccess }) =>\n useMutationWithInvalidation(dailiesApi.destroy, {\n keysToInvalidate: [[QUERY_KEYS.DAILY_CO_DETAILS]],\n onSuccess,\n });\n"],"names":["create","payload","axios","post","INTEGRATIONS_ENGINE_DAILY_URL","daily","show","get","destroy","dailiesApi","useCreateDaily","options","arguments","length","undefined","useMutationWithInvalidation","_objectSpread","keysToInvalidate","QUERY_KEYS","DAILY_CO_DETAILS","useFetchDaily","useQuery","queryKey","queryFn","staleTime","DEFAULT_STALE_TIME","useDestroyDaily","_ref","onSuccess"],"mappings":";;;;;;;AAIA,IAAMA,MAAM,GAAG,SAATA,MAAMA,CAAGC,OAAO,EAAA;AAAA,EAAA,OACpBC,KAAK,CAACC,IAAI,CAACC,6BAA6B,EAAE;AAAEC,IAAAA,KAAK,EAAEJ;AAAQ,GAAC,CAAC;AAAA,CAAA;AAE/D,IAAMK,IAAI,GAAG,SAAPA,IAAIA,GAAA;AAAA,EAAA,OAASJ,KAAK,CAACK,GAAG,CAACH,6BAA6B,CAAC;AAAA,CAAA;AAE3D,IAAMI,OAAO,GAAG,SAAVA,OAAOA,GAAA;AAAA,EAAA,OAASN,KAAK,CAAA,QAAA,CAAO,CAACE,6BAA6B,CAAC;AAAA,CAAA;AAEjE,IAAMK,UAAU,GAAG;AAAET,EAAAA,MAAM,EAANA,MAAM;AAAEM,EAAAA,IAAI,EAAJA,IAAI;AAAEE,EAAAA,OAAO,EAAPA;AAAQ,CAAC;;;;ACJrC,IAAME,cAAc,GAAG,SAAjBA,cAAcA,GAAA;AAAA,EAAA,IAAIC,OAAO,GAAAC,SAAA,CAAAC,MAAA,GAAA,CAAA,IAAAD,SAAA,CAAA,CAAA,CAAA,KAAAE,SAAA,GAAAF,SAAA,CAAA,CAAA,CAAA,GAAG,EAAE;AAAA,EAAA,OACzCG,2BAA2B,CAACN,UAAU,CAACT,MAAM,EAAAgB,aAAA,CAAA;AAC3CC,IAAAA,gBAAgB,EAAE,CAAC,CAACC,UAAU,CAACC,gBAAgB,CAAC;GAAC,EAC9CR,OAAO,CACX,CAAC;AAAA;AAEG,IAAMS,aAAa,GAAG,SAAhBA,aAAaA,GAAA;AAAA,EAAA,OACxBC,QAAQ,CAAC;AACPC,IAAAA,QAAQ,EAAE,CAACJ,UAAU,CAACC,gBAAgB,CAAC;IACvCI,OAAO,EAAEd,UAAU,CAACH,IAAI;AACxBkB,IAAAA,SAAS,EAAEC;AACb,GAAC,CAAC;AAAA;IAESC,eAAe,GAAG,SAAlBA,eAAeA,CAAAC,IAAA,EAAA;AAAA,EAAA,IAAMC,SAAS,GAAAD,IAAA,CAATC,SAAS;AAAA,EAAA,OACzCb,2BAA2B,CAACN,UAAU,CAACD,OAAO,EAAE;AAC9CS,IAAAA,gBAAgB,EAAE,CAAC,CAACC,UAAU,CAACC,gBAAgB,CAAC,CAAC;AACjDS,IAAAA,SAAS,EAATA;AACF,GAAC,CAAC;AAAA;;;;"}
@@ -2,7 +2,7 @@ import { useQuery } from '@tanstack/react-query';
2
2
  import { DEFAULT_STALE_TIME } from '@bigbinary/neeto-commons-frontend/constants';
3
3
  import '@bigbinary/neeto-commons-frontend/react-utils';
4
4
  import axios from 'axios';
5
- import { D as DISCONNECTION_ALERTS_URL, d as disconnectionAlertsQueryKey } from './query-dZxWLxGc.js';
5
+ import { D as DISCONNECTION_ALERTS_URL, d as disconnectionAlertsQueryKey } from './query-CyER0UTx.js';
6
6
 
7
7
  var fetch = function fetch() {
8
8
  return axios.get(DISCONNECTION_ALERTS_URL);
@@ -20,4 +20,4 @@ var useFetchDisconnectionAlerts = function useFetchDisconnectionAlerts() {
20
20
  };
21
21
 
22
22
  export { useFetchDisconnectionAlerts as u };
23
- //# sourceMappingURL=useDisconnectionAlertsApi-CKKd-vBU.js.map
23
+ //# sourceMappingURL=useDisconnectionAlertsApi-BW25EN1l.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useDisconnectionAlertsApi-CKKd-vBU.js","sources":["../app/javascript/src/apis/disconnection_alerts.js","../app/javascript/src/hooks/reactQuery/useDisconnectionAlertsApi.js"],"sourcesContent":["import axios from \"axios\";\n\nimport { DISCONNECTION_ALERTS_URL } from \"src/constants/urls\";\n\nconst fetch = () => axios.get(DISCONNECTION_ALERTS_URL);\n\nconst destroyAll = ids =>\n axios.delete(`${DISCONNECTION_ALERTS_URL}/destroy_all`, { params: { ids } });\n\nconst disconnectionAlertsApi = { fetch, destroyAll };\n\nexport default disconnectionAlertsApi;\n","import { useQuery } from \"@tanstack/react-query\";\nimport { DEFAULT_STALE_TIME } from \"neetocommons/constants\";\nimport { useMutationWithInvalidation } from \"neetocommons/react-utils\";\n\nimport disconnectionAlertsApi from \"apis/disconnection_alerts\";\nimport { disconnectionAlertsQueryKey } from \"src/constants/query\";\n\nexport const useFetchDisconnectionAlerts = () =>\n useQuery({\n queryKey: disconnectionAlertsQueryKey,\n queryFn: disconnectionAlertsApi.fetch,\n staleTime: DEFAULT_STALE_TIME,\n refetchOnWindowFocus: \"always\",\n });\n\nexport const useDismissDisconnectionAlerts = ({ onSuccess } = {}) =>\n useMutationWithInvalidation(disconnectionAlertsApi.destroyAll, {\n keysToInvalidate: [disconnectionAlertsQueryKey],\n onSuccess: () => onSuccess?.(),\n });\n"],"names":["fetch","axios","get","DISCONNECTION_ALERTS_URL","disconnectionAlertsApi","useFetchDisconnectionAlerts","useQuery","queryKey","disconnectionAlertsQueryKey","queryFn","staleTime","DEFAULT_STALE_TIME","refetchOnWindowFocus"],"mappings":";;;;;;AAIA,IAAMA,KAAK,GAAG,SAARA,KAAKA,GAAA;AAAA,EAAA,OAASC,KAAK,CAACC,GAAG,CAACC,wBAAwB,CAAC;AAAA,CAAA;AAKvD,IAAMC,sBAAsB,GAAG;AAAEJ,EAAAA,KAAK,EAALA,KAAkB,CAAC;;ACF7C,IAAMK,2BAA2B,GAAG,SAA9BA,2BAA2BA,GAAA;AAAA,EAAA,OACtCC,QAAQ,CAAC;AACPC,IAAAA,QAAQ,EAAEC,2BAA2B;IACrCC,OAAO,EAAEL,sBAAsB,CAACJ,KAAK;AACrCU,IAAAA,SAAS,EAAEC,kBAAkB;AAC7BC,IAAAA,oBAAoB,EAAE;AACxB,GAAC,CAAC;AAAA;;;;"}
1
+ {"version":3,"file":"useDisconnectionAlertsApi-BW25EN1l.js","sources":["../app/javascript/src/apis/disconnection_alerts.js","../app/javascript/src/hooks/reactQuery/useDisconnectionAlertsApi.js"],"sourcesContent":["import axios from \"axios\";\n\nimport { DISCONNECTION_ALERTS_URL } from \"src/constants/urls\";\n\nconst fetch = () => axios.get(DISCONNECTION_ALERTS_URL);\n\nconst destroyAll = ids =>\n axios.delete(`${DISCONNECTION_ALERTS_URL}/destroy_all`, { params: { ids } });\n\nconst disconnectionAlertsApi = { fetch, destroyAll };\n\nexport default disconnectionAlertsApi;\n","import { useQuery } from \"@tanstack/react-query\";\nimport { DEFAULT_STALE_TIME } from \"neetocommons/constants\";\nimport { useMutationWithInvalidation } from \"neetocommons/react-utils\";\n\nimport disconnectionAlertsApi from \"apis/disconnection_alerts\";\nimport { disconnectionAlertsQueryKey } from \"src/constants/query\";\n\nexport const useFetchDisconnectionAlerts = () =>\n useQuery({\n queryKey: disconnectionAlertsQueryKey,\n queryFn: disconnectionAlertsApi.fetch,\n staleTime: DEFAULT_STALE_TIME,\n refetchOnWindowFocus: \"always\",\n });\n\nexport const useDismissDisconnectionAlerts = ({ onSuccess } = {}) =>\n useMutationWithInvalidation(disconnectionAlertsApi.destroyAll, {\n keysToInvalidate: [disconnectionAlertsQueryKey],\n onSuccess: () => onSuccess?.(),\n });\n"],"names":["fetch","axios","get","DISCONNECTION_ALERTS_URL","disconnectionAlertsApi","useFetchDisconnectionAlerts","useQuery","queryKey","disconnectionAlertsQueryKey","queryFn","staleTime","DEFAULT_STALE_TIME","refetchOnWindowFocus"],"mappings":";;;;;;AAIA,IAAMA,KAAK,GAAG,SAARA,KAAKA,GAAA;AAAA,EAAA,OAASC,KAAK,CAACC,GAAG,CAACC,wBAAwB,CAAC;AAAA,CAAA;AAKvD,IAAMC,sBAAsB,GAAG;AAAEJ,EAAAA,KAAK,EAALA,KAAkB,CAAC;;ACF7C,IAAMK,2BAA2B,GAAG,SAA9BA,2BAA2BA,GAAA;AAAA,EAAA,OACtCC,QAAQ,CAAC;AACPC,IAAAA,QAAQ,EAAEC,2BAA2B;IACrCC,OAAO,EAAEL,sBAAsB,CAACJ,KAAK;AACrCU,IAAAA,SAAS,EAAEC,kBAAkB;AAC7BC,IAAAA,oBAAoB,EAAE;AACxB,GAAC,CAAC;AAAA;;;;"}
@@ -0,0 +1,52 @@
1
+ 'use strict';
2
+
3
+ var _defineProperty = require('@babel/runtime/helpers/defineProperty');
4
+ var reactQuery = require('@tanstack/react-query');
5
+ var constants = require('@bigbinary/neeto-commons-frontend/constants');
6
+ var reactUtils = require('@bigbinary/neeto-commons-frontend/react-utils');
7
+ var axios = require('axios');
8
+ var query = require('./query-DFg4la-L.js');
9
+
10
+ var create = function create(payload) {
11
+ return axios.post(query.INTEGRATIONS_ENGINE_GOOGLE_MAPS_URL, {
12
+ googleMaps: payload
13
+ });
14
+ };
15
+ var show = function show() {
16
+ return axios.get(query.INTEGRATIONS_ENGINE_GOOGLE_MAPS_URL);
17
+ };
18
+ var destroy = function destroy() {
19
+ return axios["delete"](query.INTEGRATIONS_ENGINE_GOOGLE_MAPS_URL);
20
+ };
21
+ var googleMapsApi = {
22
+ create: create,
23
+ show: show,
24
+ destroy: destroy
25
+ };
26
+
27
+ 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; }
28
+ 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; }
29
+ var useFetchGoogleMaps = function useFetchGoogleMaps() {
30
+ return reactQuery.useQuery({
31
+ queryKey: query.googleMapsQueryKey,
32
+ queryFn: googleMapsApi.show,
33
+ staleTime: constants.DEFAULT_STALE_TIME
34
+ });
35
+ };
36
+ var useCreateGoogleMaps = function useCreateGoogleMaps() {
37
+ var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
38
+ return reactUtils.useMutationWithInvalidation(googleMapsApi.create, _objectSpread({
39
+ keysToInvalidate: [query.googleMapsQueryKey]
40
+ }, options));
41
+ };
42
+ var useDestroyGoogleMaps = function useDestroyGoogleMaps() {
43
+ var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
44
+ return reactUtils.useMutationWithInvalidation(googleMapsApi.destroy, _objectSpread({
45
+ keysToInvalidate: [query.googleMapsQueryKey]
46
+ }, options));
47
+ };
48
+
49
+ exports.useCreateGoogleMaps = useCreateGoogleMaps;
50
+ exports.useDestroyGoogleMaps = useDestroyGoogleMaps;
51
+ exports.useFetchGoogleMaps = useFetchGoogleMaps;
52
+ //# sourceMappingURL=useGoogleMapsApi-BY5ZIbh1.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useGoogleMapsApi-BY5ZIbh1.js","sources":["../app/javascript/src/apis/google_maps.js","../app/javascript/src/hooks/reactQuery/useGoogleMapsApi.js"],"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"],"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"],"mappings":";;;;;;;;;AAIA,IAAMA,MAAM,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A,CAAA,KAAAE,SAAA,GAAAF,SAAA,CAAA,CAAA,CAAA,GAAG,EAAE;AAAA,EAAA,OAC/CG,sCAA2B,CAACb,aAAa,CAACD,OAAO,EAAAe,aAAA,CAAA;IAC/CC,gBAAgB,EAAE,CAACX,wBAAkB;GAAC,EACnCK,OAAO,CACX,CAAC;AAAA;;;;;;"}
@@ -0,0 +1,48 @@
1
+ import _defineProperty from '@babel/runtime/helpers/defineProperty';
2
+ import { useQuery } from '@tanstack/react-query';
3
+ import { DEFAULT_STALE_TIME } from '@bigbinary/neeto-commons-frontend/constants';
4
+ import { useMutationWithInvalidation } from '@bigbinary/neeto-commons-frontend/react-utils';
5
+ import axios from 'axios';
6
+ import { f as INTEGRATIONS_ENGINE_GOOGLE_MAPS_URL, g as googleMapsQueryKey } from './query-CyER0UTx.js';
7
+
8
+ var create = function create(payload) {
9
+ return axios.post(INTEGRATIONS_ENGINE_GOOGLE_MAPS_URL, {
10
+ googleMaps: payload
11
+ });
12
+ };
13
+ var show = function show() {
14
+ return axios.get(INTEGRATIONS_ENGINE_GOOGLE_MAPS_URL);
15
+ };
16
+ var destroy = function destroy() {
17
+ return axios["delete"](INTEGRATIONS_ENGINE_GOOGLE_MAPS_URL);
18
+ };
19
+ var googleMapsApi = {
20
+ create: create,
21
+ show: show,
22
+ destroy: destroy
23
+ };
24
+
25
+ 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; }
26
+ 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; }
27
+ var useFetchGoogleMaps = function useFetchGoogleMaps() {
28
+ return useQuery({
29
+ queryKey: googleMapsQueryKey,
30
+ queryFn: googleMapsApi.show,
31
+ staleTime: DEFAULT_STALE_TIME
32
+ });
33
+ };
34
+ var useCreateGoogleMaps = function useCreateGoogleMaps() {
35
+ var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
36
+ return useMutationWithInvalidation(googleMapsApi.create, _objectSpread({
37
+ keysToInvalidate: [googleMapsQueryKey]
38
+ }, options));
39
+ };
40
+ var useDestroyGoogleMaps = function useDestroyGoogleMaps() {
41
+ var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
42
+ return useMutationWithInvalidation(googleMapsApi.destroy, _objectSpread({
43
+ keysToInvalidate: [googleMapsQueryKey]
44
+ }, options));
45
+ };
46
+
47
+ export { useDestroyGoogleMaps as a, useCreateGoogleMaps as b, useFetchGoogleMaps as u };
48
+ //# sourceMappingURL=useGoogleMapsApi-DypGXFnl.js.map