@bigbinary/neeto-integrations-frontend 4.2.8 → 5.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app/javascript/src/translations/ar.json +6 -6
- package/app/javascript/src/translations/bg.json +5 -5
- package/app/javascript/src/translations/ca.json +8 -8
- package/app/javascript/src/translations/cs.json +5 -5
- package/app/javascript/src/translations/da.json +2 -2
- package/app/javascript/src/translations/de.json +2 -2
- package/app/javascript/src/translations/en.json +9 -9
- package/app/javascript/src/translations/es-MX.json +8 -8
- package/app/javascript/src/translations/es.json +3 -3
- package/app/javascript/src/translations/et.json +6 -6
- package/app/javascript/src/translations/fi.json +3 -3
- package/app/javascript/src/translations/fil.json +9 -9
- package/app/javascript/src/translations/fr.json +3 -3
- package/app/javascript/src/translations/he.json +4 -4
- package/app/javascript/src/translations/hi.json +5 -5
- package/app/javascript/src/translations/hr.json +5 -5
- package/app/javascript/src/translations/hu.json +2 -2
- package/app/javascript/src/translations/id.json +5 -5
- package/app/javascript/src/translations/it.json +5 -5
- package/app/javascript/src/translations/ja.json +9 -9
- package/app/javascript/src/translations/ko.json +5 -5
- package/app/javascript/src/translations/lv.json +3 -3
- package/app/javascript/src/translations/nl.json +2 -2
- package/app/javascript/src/translations/pl.json +2 -2
- package/app/javascript/src/translations/pt-BR.json +1 -1
- package/app/javascript/src/translations/pt.json +2 -2
- package/app/javascript/src/translations/ro.json +6 -6
- package/app/javascript/src/translations/ru.json +3 -3
- package/app/javascript/src/translations/sk.json +3 -3
- package/app/javascript/src/translations/sl.json +4 -4
- package/app/javascript/src/translations/sv.json +3 -3
- package/app/javascript/src/translations/th.json +4 -4
- package/app/javascript/src/translations/tr.json +9 -9
- package/app/javascript/src/translations/uk.json +4 -4
- package/app/javascript/src/translations/vi.json +9 -9
- package/app/javascript/src/translations/zh-CN.json +1 -1
- package/app/javascript/src/translations/zh-TW.json +2 -2
- package/dist/.ready +1 -1
- package/dist/Connect.js +1 -3
- package/dist/Connect.js.map +1 -1
- package/dist/Daily.js +2 -2
- package/dist/Daily.js.map +1 -1
- package/dist/DailyForm.js +2 -2
- package/dist/DailyForm.js.map +1 -1
- package/dist/Demo.js.map +1 -1
- package/dist/DisconnectAlert.js +1 -3
- package/dist/DisconnectAlert.js.map +1 -1
- package/dist/Finish.js +29 -6
- package/dist/Finish.js.map +1 -1
- package/dist/GoogleCalendar.js +1 -4
- package/dist/GoogleCalendar.js.map +1 -1
- package/dist/Manage.js +1 -3
- package/dist/Manage.js.map +1 -1
- package/dist/Modal.js.map +1 -1
- package/dist/Telnyx.js +8 -8
- package/dist/Telnyx.js.map +1 -1
- package/dist/Twilio.js +2 -4
- package/dist/Twilio.js.map +1 -1
- package/dist/WalkthroughModal.js.map +1 -1
- package/dist/ZapierForm.js +2 -6
- package/dist/ZapierForm.js.map +1 -1
- package/dist/Zoom.js +1 -1
- package/dist/Zoom.js.map +1 -1
- package/dist/cjs/Connect.js +1 -3
- package/dist/cjs/Connect.js.map +1 -1
- package/dist/cjs/Daily.js +2 -2
- package/dist/cjs/Daily.js.map +1 -1
- package/dist/cjs/DailyForm.js +2 -2
- package/dist/cjs/DailyForm.js.map +1 -1
- package/dist/cjs/Demo.js.map +1 -1
- package/dist/cjs/DisconnectAlert.js +1 -3
- package/dist/cjs/DisconnectAlert.js.map +1 -1
- package/dist/cjs/Finish.js +48 -6
- package/dist/cjs/Finish.js.map +1 -1
- package/dist/cjs/GoogleCalendar.js +1 -4
- package/dist/cjs/GoogleCalendar.js.map +1 -1
- package/dist/cjs/Manage.js +1 -3
- package/dist/cjs/Manage.js.map +1 -1
- package/dist/cjs/Modal.js.map +1 -1
- package/dist/cjs/Telnyx.js +8 -8
- package/dist/cjs/Telnyx.js.map +1 -1
- package/dist/cjs/Twilio.js +2 -4
- package/dist/cjs/Twilio.js.map +1 -1
- package/dist/cjs/WalkthroughModal.js.map +1 -1
- package/dist/cjs/ZapierForm.js +2 -6
- package/dist/cjs/ZapierForm.js.map +1 -1
- package/dist/cjs/Zoom.js +1 -1
- package/dist/cjs/Zoom.js.map +1 -1
- package/dist/cjs/index.js +5 -5
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/v2/Connect.js +48 -46
- package/dist/cjs/v2/Connect.js.map +1 -1
- package/dist/cjs/v2/Daily.js +5 -3
- package/dist/cjs/v2/Daily.js.map +1 -1
- package/dist/cjs/v2/DailyForm.js +2 -2
- package/dist/cjs/v2/DailyForm.js.map +1 -1
- package/dist/cjs/v2/Demo.js.map +1 -1
- package/dist/cjs/v2/DisconnectAlert.js +1 -3
- package/dist/cjs/v2/DisconnectAlert.js.map +1 -1
- package/dist/cjs/v2/DisconnectedIntegrationsRibbon.js +1 -3
- package/dist/cjs/v2/DisconnectedIntegrationsRibbon.js.map +1 -1
- package/dist/cjs/v2/Finish.js +4 -6
- package/dist/cjs/v2/Finish.js.map +1 -1
- package/dist/cjs/v2/GoogleCalendar.js +1 -4
- package/dist/cjs/v2/GoogleCalendar.js.map +1 -1
- package/dist/cjs/v2/GoogleMapsForm.js +2 -2
- package/dist/cjs/v2/GoogleMapsForm.js.map +1 -1
- package/dist/cjs/v2/GoogleMapsIcon.js.map +1 -1
- package/dist/cjs/v2/GoogleMapsManage.js +5 -3
- package/dist/cjs/v2/GoogleMapsManage.js.map +1 -1
- package/dist/cjs/v2/Manage.js +70 -91
- package/dist/cjs/v2/Manage.js.map +1 -1
- package/dist/cjs/v2/Modal.js +1 -1
- package/dist/cjs/v2/Modal.js.map +1 -1
- package/dist/cjs/v2/SmsLogs.js +3 -9
- package/dist/cjs/v2/SmsLogs.js.map +1 -1
- package/dist/cjs/v2/Telnyx.js +26 -43
- package/dist/cjs/v2/Telnyx.js.map +1 -1
- package/dist/cjs/v2/Twilio.js +20 -39
- package/dist/cjs/v2/Twilio.js.map +1 -1
- package/dist/cjs/v2/WalkthroughModal.js.map +1 -1
- package/dist/cjs/v2/ZapierForm.js +4 -7
- package/dist/cjs/v2/ZapierForm.js.map +1 -1
- package/dist/cjs/v2/Zoom.js +4 -2
- package/dist/cjs/v2/Zoom.js.map +1 -1
- package/dist/cjs/v2/index.js +11 -8
- package/dist/cjs/v2/index.js.map +1 -1
- package/dist/index-MS1ts-9f.js.map +1 -1
- package/dist/index-dxk7jTL7.js.map +1 -1
- package/dist/index.js +5 -5
- package/dist/index.js.map +1 -1
- package/dist/query-CyER0UTx.js.map +1 -1
- package/dist/query-DFg4la-L.js.map +1 -1
- package/dist/{useDailiesApi-CMyuK99l.js → useDailiesApi-BIZR1qiD.js} +2 -4
- package/dist/useDailiesApi-BIZR1qiD.js.map +1 -0
- package/dist/{useDailiesApi-BmI2LDF7.js → useDailiesApi-BS8aif9t.js} +2 -4
- package/dist/useDailiesApi-BS8aif9t.js.map +1 -0
- package/dist/useDisconnectionAlertsApi-BGaBOO_4.js.map +1 -1
- package/dist/useDisconnectionAlertsApi-BW25EN1l.js.map +1 -1
- package/dist/{useGoogleMapsApi-DypGXFnl.js → useGoogleMapsApi-DcJ5vTJZ.js} +2 -4
- package/dist/useGoogleMapsApi-DcJ5vTJZ.js.map +1 -0
- package/dist/{useGoogleMapsApi-BY5ZIbh1.js → useGoogleMapsApi-sMsxsnL9.js} +2 -4
- package/dist/useGoogleMapsApi-sMsxsnL9.js.map +1 -0
- package/dist/{useTelnyxApi-DH5XaYIo.js → useTelnyxApi-CqB3f44W.js} +2 -4
- package/dist/useTelnyxApi-CqB3f44W.js.map +1 -0
- package/dist/{useTelnyxApi-WH39oUwB.js → useTelnyxApi-fFpslv-E.js} +2 -4
- package/dist/useTelnyxApi-fFpslv-E.js.map +1 -0
- package/dist/{useTwilioApi-CYF8UIPN.js → useTwilioApi-BwkrNBtg.js} +2 -4
- package/dist/useTwilioApi-BwkrNBtg.js.map +1 -0
- package/dist/{useTwilioApi-nN6VRQYc.js → useTwilioApi-CEaEH5MG.js} +2 -4
- package/dist/useTwilioApi-CEaEH5MG.js.map +1 -0
- package/dist/useZoomApi-Be2unav5.js.map +1 -1
- package/dist/useZoomApi-i5CNstmT.js.map +1 -1
- package/dist/utils-fchHJTr3.js +44 -0
- package/dist/utils-fchHJTr3.js.map +1 -0
- package/dist/utils-jyxIYRHb.js +47 -0
- package/dist/utils-jyxIYRHb.js.map +1 -0
- package/dist/v2/Connect.js +48 -46
- package/dist/v2/Connect.js.map +1 -1
- package/dist/v2/Daily.js +5 -3
- package/dist/v2/Daily.js.map +1 -1
- package/dist/v2/DailyForm.js +2 -2
- package/dist/v2/DailyForm.js.map +1 -1
- package/dist/v2/Demo.js.map +1 -1
- package/dist/v2/DisconnectAlert.js +1 -3
- package/dist/v2/DisconnectAlert.js.map +1 -1
- package/dist/v2/DisconnectedIntegrationsRibbon.js +1 -3
- package/dist/v2/DisconnectedIntegrationsRibbon.js.map +1 -1
- package/dist/v2/Finish.js +6 -8
- package/dist/v2/Finish.js.map +1 -1
- package/dist/v2/GoogleCalendar.js +1 -4
- package/dist/v2/GoogleCalendar.js.map +1 -1
- package/dist/v2/GoogleMapsForm.js +2 -2
- package/dist/v2/GoogleMapsForm.js.map +1 -1
- package/dist/v2/GoogleMapsIcon.js.map +1 -1
- package/dist/v2/GoogleMapsManage.js +5 -3
- package/dist/v2/GoogleMapsManage.js.map +1 -1
- package/dist/v2/Manage.js +72 -93
- package/dist/v2/Manage.js.map +1 -1
- package/dist/v2/Modal.js +1 -1
- package/dist/v2/Modal.js.map +1 -1
- package/dist/v2/SmsLogs.js +3 -9
- package/dist/v2/SmsLogs.js.map +1 -1
- package/dist/v2/Telnyx.js +27 -44
- package/dist/v2/Telnyx.js.map +1 -1
- package/dist/v2/Twilio.js +21 -40
- package/dist/v2/Twilio.js.map +1 -1
- package/dist/v2/WalkthroughModal.js.map +1 -1
- package/dist/v2/ZapierForm.js +4 -7
- package/dist/v2/ZapierForm.js.map +1 -1
- package/dist/v2/Zoom.js +4 -2
- package/dist/v2/Zoom.js.map +1 -1
- package/dist/v2/index.js +11 -8
- package/dist/v2/index.js.map +1 -1
- package/package.json +19 -18
- package/dist/success-C6rQdhhF.js +0 -30
- package/dist/success-C6rQdhhF.js.map +0 -1
- package/dist/success-CsNvTPBG.js +0 -51
- package/dist/success-CsNvTPBG.js.map +0 -1
- package/dist/useDailiesApi-BmI2LDF7.js.map +0 -1
- package/dist/useDailiesApi-CMyuK99l.js.map +0 -1
- package/dist/useGoogleMapsApi-BY5ZIbh1.js.map +0 -1
- package/dist/useGoogleMapsApi-DypGXFnl.js.map +0 -1
- package/dist/useTelnyxApi-DH5XaYIo.js.map +0 -1
- package/dist/useTelnyxApi-WH39oUwB.js.map +0 -1
- package/dist/useTwilioApi-CYF8UIPN.js.map +0 -1
- package/dist/useTwilioApi-nN6VRQYc.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useTwilioApi-BwkrNBtg.js","sources":["../app/javascript/src/apis/twilio.js","../app/javascript/src/hooks/reactQuery/useTwilioApi.js"],"sourcesContent":["import axios from \"axios\";\n\nimport { TWILIO_CONFIGURATION_BASE_URL } from \"src/constants/urls\";\n\nconst fetchTwilioSmsConfiguration = integrable =>\n axios.get(TWILIO_CONFIGURATION_BASE_URL, { params: integrable });\n\nconst removeTwilioConfiguration = () =>\n axios.delete(TWILIO_CONFIGURATION_BASE_URL);\n\nconst getTwilioSenderOptions = data =>\n axios.get(`${TWILIO_CONFIGURATION_BASE_URL}/new`, { params: data });\n\nconst createTwilioConfiguration = (payload, integrable) =>\n axios.post(TWILIO_CONFIGURATION_BASE_URL, { ...payload, ...integrable });\n\nconst fetchMessagingServiceSenders = ({\n accountSid,\n authToken,\n messagingServiceId,\n}) =>\n axios.get(\n `/neeto_integrations/twilio/messaging_services/${messagingServiceId}/senders`,\n { params: { account_sid: accountSid, auth_token: authToken } }\n );\n\nconst twilioApi = {\n fetchTwilioSmsConfiguration,\n removeTwilioConfiguration,\n getTwilioSenderOptions,\n createTwilioConfiguration,\n fetchMessagingServiceSenders,\n};\n\nexport default twilioApi;\n","import { useQuery } from \"@tanstack/react-query\";\nimport { keysToSnakeCase } from \"neetocist\";\nimport { useMutationWithInvalidation } from \"neetocommons/react-utils\";\n\nimport twilioApi from \"apis/twilio\";\nimport { QUERY_KEYS } from \"src/constants/query\";\n\nconst useFetchTwilioSmsConfiguration = ({ integrable }) =>\n useQuery({\n queryKey: [\n QUERY_KEYS.TWILIO_SMS_CONFIGURATION,\n integrable?.integrableType,\n integrable?.integrableId,\n ],\n queryFn: () => twilioApi.fetchTwilioSmsConfiguration(integrable),\n select: response => {\n const smsConfiguration = response.smsConfiguration;\n\n return {\n twilioSid: smsConfiguration?.twilioSid ?? \"\",\n twilioAuthToken: smsConfiguration?.twilioAuthToken ?? \"\",\n connectionType: smsConfiguration?.connectionType ?? \"\",\n twilioPhoneNumber: smsConfiguration?.twilioPhoneNumber ?? \"\",\n twilioMessagingServiceSid:\n smsConfiguration?.twilioMessagingServiceSid ?? \"\",\n twilioMessagingServiceFriendlyName:\n smsConfiguration?.twilioMessagingServiceFriendlyName ?? \"\",\n };\n },\n });\n\nconst useFetchTwilioSenderOptions = ({ credentials }) =>\n useQuery({\n queryKey: [QUERY_KEYS.TWILIO_SENDER_OPTIONS, { credentials }],\n queryFn: () =>\n twilioApi.getTwilioSenderOptions(keysToSnakeCase(credentials)),\n enabled:\n !!credentials?.twilio_sid || !!credentials?.twilioSid,\n select: response => ({\n phoneNumbers: response.phoneNumbers ?? [],\n messagingServices: response.messagingServices ?? [],\n }),\n retry: false,\n });\n\nconst useCreateTwilioConfiguration = ({ integrable }) =>\n useMutationWithInvalidation(\n payload => twilioApi.createTwilioConfiguration(payload, integrable),\n {\n keysToInvalidate: [\n [\n QUERY_KEYS.TWILIO_SMS_CONFIGURATION,\n integrable?.integrableType,\n integrable?.integrableId,\n ],\n ],\n }\n );\n\nconst useFetchTwilioMessagingServiceSenders = ({\n accountSid,\n authToken,\n messagingServiceId,\n enabled,\n}) =>\n useQuery({\n queryKey: [\"twilioMessagingServiceSenders\", messagingServiceId],\n queryFn: () =>\n twilioApi.fetchMessagingServiceSenders({\n accountSid,\n authToken,\n messagingServiceId,\n }),\n enabled: !!enabled && !!accountSid && !!authToken && !!messagingServiceId,\n staleTime: 60_000,\n });\n\nexport {\n useCreateTwilioConfiguration,\n useFetchTwilioMessagingServiceSenders,\n useFetchTwilioSenderOptions,\n useFetchTwilioSmsConfiguration,\n};\n"],"names":["TWILIO_CONFIGURATION_BASE_URL","useQuery","QUERY_KEYS","keysToSnakeCase","useMutationWithInvalidation"],"mappings":";;;;;;;;;AAIA,IAAM,2BAA2B,GAAG,SAA9B,2BAA2B,CAAG,UAAU,EAAA;AAAA,EAAA,OAC5C,KAAK,CAAC,GAAG,CAACA,mCAA6B,EAAE;AAAE,IAAA,MAAM,EAAE;AAAW,GAAC,CAAC;AAAA,CAAA;AAElE,IAAM,yBAAyB,GAAG,SAA5B,yBAAyB,GAAA;AAAA,EAAA,OAC7B,KAAK,CAAA,QAAA,CAAO,CAACA,mCAA6B,CAAC;AAAA,CAAA;AAE7C,IAAM,sBAAsB,GAAG,SAAzB,sBAAsB,CAAG,IAAI,EAAA;AAAA,EAAA,OACjC,KAAK,CAAC,GAAG,CAAA,EAAA,CAAA,MAAA,CAAIA,mCAA6B,EAAA,MAAA,CAAA,EAAQ;AAAE,IAAA,MAAM,EAAE;AAAK,GAAC,CAAC;AAAA,CAAA;AAErE,IAAM,yBAAyB,GAAG,SAA5B,yBAAyB,CAAI,OAAO,EAAE,UAAU,EAAA;EAAA,OACpD,KAAK,CAAC,IAAI,CAACA,mCAA6B,kCAAO,OAAO,CAAA,EAAK,UAAU,CAAE,CAAC;AAAA,CAAA;AAE1E,IAAM,4BAA4B,GAAG,SAA/B,4BAA4B,CAAA,IAAA,EAAA;EAAA,IAChC,UAAU,QAAV,UAAU;AACV,IAAA,SAAS,QAAT,SAAS;AACT,IAAA,kBAAkB,QAAlB,kBAAkB;AAAA,EAAA,OAElB,KAAK,CAAC,GAAG,CAAA,gDAAA,CAAA,MAAA,CAC0C,kBAAkB,EAAA,UAAA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D,OAAO,EAAE,SAAT,OAAO,GAAA;MAAA,OACL,SAAS,CAAC,4BAA4B,CAAC;AACrC,QAAA,UAAU,EAAV,UAAU;AACV,QAAA,SAAS,EAAT,SAAS;AACT,QAAA,kBAAkB,EAAlB;AACF,OAAC,CAAC;AAAA,IAAA,CAAA;AACJ,IAAA,OAAO,EAAE,CAAC,CAAC,OAAO,IAAI,CAAC,CAAC,UAAU,IAAI,CAAC,CAAC,SAAS,IAAI,CAAC,CAAC,kBAAkB;AACzE,IAAA,SAAS,EAAE;AACb,GAAC,CAAC;AAAA;;;;;;;"}
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import { useQuery } from '@tanstack/react-query';
|
|
2
2
|
import { keysToSnakeCase } from '@bigbinary/neeto-cist';
|
|
3
3
|
import { useMutationWithInvalidation } from '@bigbinary/neeto-commons-frontend/react-utils';
|
|
4
|
-
import
|
|
4
|
+
import _objectSpread from '@babel/runtime/helpers/objectSpread2';
|
|
5
5
|
import axios from 'axios';
|
|
6
6
|
import { T as TWILIO_CONFIGURATION_BASE_URL, Q as QUERY_KEYS } from './query-CyER0UTx.js';
|
|
7
7
|
|
|
8
|
-
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; }
|
|
9
|
-
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; }
|
|
10
8
|
var fetchTwilioSmsConfiguration = function fetchTwilioSmsConfiguration(integrable) {
|
|
11
9
|
return axios.get(TWILIO_CONFIGURATION_BASE_URL, {
|
|
12
10
|
params: integrable
|
|
@@ -111,4 +109,4 @@ var useFetchTwilioMessagingServiceSenders = function useFetchTwilioMessagingServ
|
|
|
111
109
|
};
|
|
112
110
|
|
|
113
111
|
export { useFetchTwilioSmsConfiguration as a, useFetchTwilioSenderOptions as b, useCreateTwilioConfiguration as c, useFetchTwilioMessagingServiceSenders as u };
|
|
114
|
-
//# sourceMappingURL=useTwilioApi-
|
|
112
|
+
//# sourceMappingURL=useTwilioApi-CEaEH5MG.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useTwilioApi-CEaEH5MG.js","sources":["../app/javascript/src/apis/twilio.js","../app/javascript/src/hooks/reactQuery/useTwilioApi.js"],"sourcesContent":["import axios from \"axios\";\n\nimport { TWILIO_CONFIGURATION_BASE_URL } from \"src/constants/urls\";\n\nconst fetchTwilioSmsConfiguration = integrable =>\n axios.get(TWILIO_CONFIGURATION_BASE_URL, { params: integrable });\n\nconst removeTwilioConfiguration = () =>\n axios.delete(TWILIO_CONFIGURATION_BASE_URL);\n\nconst getTwilioSenderOptions = data =>\n axios.get(`${TWILIO_CONFIGURATION_BASE_URL}/new`, { params: data });\n\nconst createTwilioConfiguration = (payload, integrable) =>\n axios.post(TWILIO_CONFIGURATION_BASE_URL, { ...payload, ...integrable });\n\nconst fetchMessagingServiceSenders = ({\n accountSid,\n authToken,\n messagingServiceId,\n}) =>\n axios.get(\n `/neeto_integrations/twilio/messaging_services/${messagingServiceId}/senders`,\n { params: { account_sid: accountSid, auth_token: authToken } }\n );\n\nconst twilioApi = {\n fetchTwilioSmsConfiguration,\n removeTwilioConfiguration,\n getTwilioSenderOptions,\n createTwilioConfiguration,\n fetchMessagingServiceSenders,\n};\n\nexport default twilioApi;\n","import { useQuery } from \"@tanstack/react-query\";\nimport { keysToSnakeCase } from \"neetocist\";\nimport { useMutationWithInvalidation } from \"neetocommons/react-utils\";\n\nimport twilioApi from \"apis/twilio\";\nimport { QUERY_KEYS } from \"src/constants/query\";\n\nconst useFetchTwilioSmsConfiguration = ({ integrable }) =>\n useQuery({\n queryKey: [\n QUERY_KEYS.TWILIO_SMS_CONFIGURATION,\n integrable?.integrableType,\n integrable?.integrableId,\n ],\n queryFn: () => twilioApi.fetchTwilioSmsConfiguration(integrable),\n select: response => {\n const smsConfiguration = response.smsConfiguration;\n\n return {\n twilioSid: smsConfiguration?.twilioSid ?? \"\",\n twilioAuthToken: smsConfiguration?.twilioAuthToken ?? \"\",\n connectionType: smsConfiguration?.connectionType ?? \"\",\n twilioPhoneNumber: smsConfiguration?.twilioPhoneNumber ?? \"\",\n twilioMessagingServiceSid:\n smsConfiguration?.twilioMessagingServiceSid ?? \"\",\n twilioMessagingServiceFriendlyName:\n smsConfiguration?.twilioMessagingServiceFriendlyName ?? \"\",\n };\n },\n });\n\nconst useFetchTwilioSenderOptions = ({ credentials }) =>\n useQuery({\n queryKey: [QUERY_KEYS.TWILIO_SENDER_OPTIONS, { credentials }],\n queryFn: () =>\n twilioApi.getTwilioSenderOptions(keysToSnakeCase(credentials)),\n enabled:\n !!credentials?.twilio_sid || !!credentials?.twilioSid,\n select: response => ({\n phoneNumbers: response.phoneNumbers ?? [],\n messagingServices: response.messagingServices ?? [],\n }),\n retry: false,\n });\n\nconst useCreateTwilioConfiguration = ({ integrable }) =>\n useMutationWithInvalidation(\n payload => twilioApi.createTwilioConfiguration(payload, integrable),\n {\n keysToInvalidate: [\n [\n QUERY_KEYS.TWILIO_SMS_CONFIGURATION,\n integrable?.integrableType,\n integrable?.integrableId,\n ],\n ],\n }\n );\n\nconst useFetchTwilioMessagingServiceSenders = ({\n accountSid,\n authToken,\n messagingServiceId,\n enabled,\n}) =>\n useQuery({\n queryKey: [\"twilioMessagingServiceSenders\", messagingServiceId],\n queryFn: () =>\n twilioApi.fetchMessagingServiceSenders({\n accountSid,\n authToken,\n messagingServiceId,\n }),\n enabled: !!enabled && !!accountSid && !!authToken && !!messagingServiceId,\n staleTime: 60_000,\n });\n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AA,OAAO,EAAE,CAAC,CAAC,OAAO,IAAI,CAAC,CAAC,UAAU,IAAI,CAAC,CAAC,SAAS,IAAI,CAAC,CAAC,kBAAkB;AACzE,IAAA,SAAS,EAAE;AACb,GAAC,CAAC;AAAA;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useZoomApi-Be2unav5.js","sources":["../app/javascript/src/apis/zoom.js","../app/javascript/src/hooks/reactQuery/useZoomApi.js"],"sourcesContent":["import axios from \"axios\";\n\nimport {\n INTEGRATIONS_ENGINE_ZOOM_URL,\n INTEGRATION_DETAILS_URL,\n} from \"src/constants/urls\";\n\nconst show = () =>\n axios.get(INTEGRATION_DETAILS_URL, {\n params: { serviceName: \"Zoom\", integrableType: \"User\" },\n });\n\nconst destroy = () => axios.delete(`${INTEGRATIONS_ENGINE_ZOOM_URL}/oauth`);\n\nconst zoomApi = { show, destroy };\n\nexport default zoomApi;\n","import { useQuery } from \"@tanstack/react-query\";\nimport { DEFAULT_STALE_TIME } from \"neetocommons/constants\";\nimport { useMutationWithInvalidation } from \"neetocommons/react-utils\";\n\nimport zoomApi from \"apis/zoom\";\nimport { QUERY_KEYS } from \"src/constants/query\";\n\nexport const useShowZoom = () =>\n useQuery({\n queryKey: [QUERY_KEYS.ZOOM_DETAILS],\n queryFn: zoomApi.show,\n staleTime: DEFAULT_STALE_TIME,\n });\nexport const useDestroyZoom = ({ onSuccess }) =>\n useMutationWithInvalidation(zoomApi.destroy, {\n keysToInvalidate: [[QUERY_KEYS.ZOOM_DETAILS]],\n onSuccess: () => onSuccess?.(),\n });\n"],"names":["
|
|
1
|
+
{"version":3,"file":"useZoomApi-Be2unav5.js","sources":["../app/javascript/src/apis/zoom.js","../app/javascript/src/hooks/reactQuery/useZoomApi.js"],"sourcesContent":["import axios from \"axios\";\n\nimport {\n INTEGRATIONS_ENGINE_ZOOM_URL,\n INTEGRATION_DETAILS_URL,\n} from \"src/constants/urls\";\n\nconst show = () =>\n axios.get(INTEGRATION_DETAILS_URL, {\n params: { serviceName: \"Zoom\", integrableType: \"User\" },\n });\n\nconst destroy = () => axios.delete(`${INTEGRATIONS_ENGINE_ZOOM_URL}/oauth`);\n\nconst zoomApi = { show, destroy };\n\nexport default zoomApi;\n","import { useQuery } from \"@tanstack/react-query\";\nimport { DEFAULT_STALE_TIME } from \"neetocommons/constants\";\nimport { useMutationWithInvalidation } from \"neetocommons/react-utils\";\n\nimport zoomApi from \"apis/zoom\";\nimport { QUERY_KEYS } from \"src/constants/query\";\n\nexport const useShowZoom = () =>\n useQuery({\n queryKey: [QUERY_KEYS.ZOOM_DETAILS],\n queryFn: zoomApi.show,\n staleTime: DEFAULT_STALE_TIME,\n });\nexport const useDestroyZoom = ({ onSuccess }) =>\n useMutationWithInvalidation(zoomApi.destroy, {\n keysToInvalidate: [[QUERY_KEYS.ZOOM_DETAILS]],\n onSuccess: () => onSuccess?.(),\n });\n"],"names":["INTEGRATION_DETAILS_URL","INTEGRATIONS_ENGINE_ZOOM_URL","useQuery","QUERY_KEYS","DEFAULT_STALE_TIME","onSuccess","useMutationWithInvalidation"],"mappings":";;;;;;;;AAOA,IAAM,IAAI,GAAG,SAAP,IAAI,GAAA;AAAA,EAAA,OACR,KAAK,CAAC,GAAG,CAACA,6BAAuB,EAAE;AACjC,IAAA,MAAM,EAAE;AAAE,MAAA,WAAW,EAAE,MAAM;AAAE,MAAA,cAAc,EAAE;AAAO;AACxD,GAAC,CAAC;AAAA,CAAA;AAEJ,IAAM,OAAO,GAAG,SAAV,OAAO,GAAA;AAAA,EAAA,OAAS,KAAK,CAAA,QAAA,CAAO,CAAA,EAAA,CAAA,MAAA,CAAIC,kCAA4B,WAAQ,CAAC;AAAA,CAAA;AAE3E,IAAM,OAAO,GAAG;AAAE,EAAA,IAAI,EAAJ,IAAI;AAAE,EAAA,OAAO,EAAP;AAAQ,CAAC;;ACP1B,IAAM,WAAW,GAAG,SAAd,WAAW,GAAA;AAAA,EAAA,OACtBC,mBAAQ,CAAC;AACP,IAAA,QAAQ,EAAE,CAACC,gBAAU,CAAC,YAAY,CAAC;IACnC,OAAO,EAAE,OAAO,CAAC,IAAI;AACrB,IAAA,SAAS,EAAEC;AACb,GAAC,CAAC;AAAA;AACG,IAAM,cAAc,GAAG,SAAjB,cAAc,CAAA,IAAA,EAAA;EAAA,IAAMC,UAAS,QAAT,SAAS;AAAA,EAAA,OACxCC,sCAA2B,CAAC,OAAO,CAAC,OAAO,EAAE;AAC3C,IAAA,gBAAgB,EAAE,CAAC,CAACH,gBAAU,CAAC,YAAY,CAAC,CAAC;IAC7C,SAAS,EAAE,SAAX,SAAS,GAAA;AAAA,MAAA,OAAQE,UAAS,KAAA,IAAA,IAATA,UAAS,KAAA,MAAA,GAAA,MAAA,GAATA,UAAS,EAAI;AAAA,IAAA;AAChC,GAAC,CAAC;AAAA;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useZoomApi-i5CNstmT.js","sources":["../app/javascript/src/apis/zoom.js","../app/javascript/src/hooks/reactQuery/useZoomApi.js"],"sourcesContent":["import axios from \"axios\";\n\nimport {\n INTEGRATIONS_ENGINE_ZOOM_URL,\n INTEGRATION_DETAILS_URL,\n} from \"src/constants/urls\";\n\nconst show = () =>\n axios.get(INTEGRATION_DETAILS_URL, {\n params: { serviceName: \"Zoom\", integrableType: \"User\" },\n });\n\nconst destroy = () => axios.delete(`${INTEGRATIONS_ENGINE_ZOOM_URL}/oauth`);\n\nconst zoomApi = { show, destroy };\n\nexport default zoomApi;\n","import { useQuery } from \"@tanstack/react-query\";\nimport { DEFAULT_STALE_TIME } from \"neetocommons/constants\";\nimport { useMutationWithInvalidation } from \"neetocommons/react-utils\";\n\nimport zoomApi from \"apis/zoom\";\nimport { QUERY_KEYS } from \"src/constants/query\";\n\nexport const useShowZoom = () =>\n useQuery({\n queryKey: [QUERY_KEYS.ZOOM_DETAILS],\n queryFn: zoomApi.show,\n staleTime: DEFAULT_STALE_TIME,\n });\nexport const useDestroyZoom = ({ onSuccess }) =>\n useMutationWithInvalidation(zoomApi.destroy, {\n keysToInvalidate: [[QUERY_KEYS.ZOOM_DETAILS]],\n onSuccess: () => onSuccess?.(),\n });\n"],"names":["
|
|
1
|
+
{"version":3,"file":"useZoomApi-i5CNstmT.js","sources":["../app/javascript/src/apis/zoom.js","../app/javascript/src/hooks/reactQuery/useZoomApi.js"],"sourcesContent":["import axios from \"axios\";\n\nimport {\n INTEGRATIONS_ENGINE_ZOOM_URL,\n INTEGRATION_DETAILS_URL,\n} from \"src/constants/urls\";\n\nconst show = () =>\n axios.get(INTEGRATION_DETAILS_URL, {\n params: { serviceName: \"Zoom\", integrableType: \"User\" },\n });\n\nconst destroy = () => axios.delete(`${INTEGRATIONS_ENGINE_ZOOM_URL}/oauth`);\n\nconst zoomApi = { show, destroy };\n\nexport default zoomApi;\n","import { useQuery } from \"@tanstack/react-query\";\nimport { DEFAULT_STALE_TIME } from \"neetocommons/constants\";\nimport { useMutationWithInvalidation } from \"neetocommons/react-utils\";\n\nimport zoomApi from \"apis/zoom\";\nimport { QUERY_KEYS } from \"src/constants/query\";\n\nexport const useShowZoom = () =>\n useQuery({\n queryKey: [QUERY_KEYS.ZOOM_DETAILS],\n queryFn: zoomApi.show,\n staleTime: DEFAULT_STALE_TIME,\n });\nexport const useDestroyZoom = ({ onSuccess }) =>\n useMutationWithInvalidation(zoomApi.destroy, {\n keysToInvalidate: [[QUERY_KEYS.ZOOM_DETAILS]],\n onSuccess: () => onSuccess?.(),\n });\n"],"names":["onSuccess"],"mappings":";;;;;;AAOA,IAAM,IAAI,GAAG,SAAP,IAAI,GAAA;AAAA,EAAA,OACR,KAAK,CAAC,GAAG,CAAC,uBAAuB,EAAE;AACjC,IAAA,MAAM,EAAE;AAAE,MAAA,WAAW,EAAE,MAAM;AAAE,MAAA,cAAc,EAAE;AAAO;AACxD,GAAC,CAAC;AAAA,CAAA;AAEJ,IAAM,OAAO,GAAG,SAAV,OAAO,GAAA;AAAA,EAAA,OAAS,KAAK,CAAA,QAAA,CAAO,CAAA,EAAA,CAAA,MAAA,CAAI,4BAA4B,WAAQ,CAAC;AAAA,CAAA;AAE3E,IAAM,OAAO,GAAG;AAAE,EAAA,IAAI,EAAJ,IAAI;AAAE,EAAA,OAAO,EAAP;AAAQ,CAAC;;ACP1B,IAAM,WAAW,GAAG,SAAd,WAAW,GAAA;AAAA,EAAA,OACtB,QAAQ,CAAC;AACP,IAAA,QAAQ,EAAE,CAAC,UAAU,CAAC,YAAY,CAAC;IACnC,OAAO,EAAE,OAAO,CAAC,IAAI;AACrB,IAAA,SAAS,EAAE;AACb,GAAC,CAAC;AAAA;AACG,IAAM,cAAc,GAAG,SAAjB,cAAc,CAAA,IAAA,EAAA;EAAA,IAAMA,UAAS,QAAT,SAAS;AAAA,EAAA,OACxC,2BAA2B,CAAC,OAAO,CAAC,OAAO,EAAE;AAC3C,IAAA,gBAAgB,EAAE,CAAC,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC;IAC7C,SAAS,EAAE,SAAX,SAAS,GAAA;AAAA,MAAA,OAAQA,UAAS,KAAA,IAAA,IAATA,UAAS,KAAA,MAAA,GAAA,MAAA,GAATA,UAAS,EAAI;AAAA,IAAA;AAChC,GAAC,CAAC;AAAA;;;;"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import _objectSpread from '@babel/runtime/helpers/objectSpread2';
|
|
2
|
+
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
3
|
+
import { jsx } from 'react/jsx-runtime';
|
|
4
|
+
|
|
5
|
+
// Dark mode only: a light chip filling the logo tile, applied when the logo
|
|
6
|
+
// is drawn with fixed brand colours (a hex fill) rather than currentColor.
|
|
7
|
+
var BRAND_LOGO_CHIP_CLASSES = "inline-flex shrink-0 items-center justify-center dark:has-[[fill^='#']]:size-14 dark:has-[[fill^='#']]:rounded-2xl dark:has-[[fill^='#']]:bg-primary-foreground";
|
|
8
|
+
|
|
9
|
+
// Neeto product logos are drawn edge to edge, brand logos (Slack, Drive…) with
|
|
10
|
+
// built-in padding, so at the same size a Neeto logo reads bigger. Draw them a
|
|
11
|
+
// step smaller (as molecules' integration cards do) so the glyphs match.
|
|
12
|
+
var BRAND_LOGO_SIZE = 32;
|
|
13
|
+
var NEETO_LOGO_SIZE = 27;
|
|
14
|
+
var NEETO_INTEGRATION = /^neeto/i;
|
|
15
|
+
|
|
16
|
+
var _excluded = ["icon", "size"];
|
|
17
|
+
var BrandLogo = function BrandLogo(_ref) {
|
|
18
|
+
var Icon = _ref.icon,
|
|
19
|
+
size = _ref.size,
|
|
20
|
+
iconProps = _objectWithoutProperties(_ref, _excluded);
|
|
21
|
+
return /*#__PURE__*/jsx("span", {
|
|
22
|
+
className: BRAND_LOGO_CHIP_CLASSES,
|
|
23
|
+
"data-slot": "brand-logo",
|
|
24
|
+
children: /*#__PURE__*/jsx(Icon, _objectSpread(_objectSpread({}, _objectSpread({
|
|
25
|
+
size: size
|
|
26
|
+
}, iconProps)), {}, {
|
|
27
|
+
style: size ? {
|
|
28
|
+
width: size,
|
|
29
|
+
height: size
|
|
30
|
+
} : undefined
|
|
31
|
+
}))
|
|
32
|
+
});
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
var getBrandLogoSize = function getBrandLogoSize(_ref) {
|
|
36
|
+
var integration = _ref.integration,
|
|
37
|
+
integrationName = _ref.integrationName;
|
|
38
|
+
return [integration, integrationName].some(function (name) {
|
|
39
|
+
return NEETO_INTEGRATION.test(name !== null && name !== void 0 ? name : "");
|
|
40
|
+
}) ? NEETO_LOGO_SIZE : BRAND_LOGO_SIZE;
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
export { BrandLogo as B, getBrandLogoSize as g };
|
|
44
|
+
//# sourceMappingURL=utils-fchHJTr3.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils-fchHJTr3.js","sources":["../app/javascript/src/v2/components/commons/constants.js","../app/javascript/src/v2/components/commons/BrandLogo.jsx","../app/javascript/src/v2/components/commons/utils.js"],"sourcesContent":["// Dark mode only: a light chip filling the logo tile, applied when the logo\n// is drawn with fixed brand colours (a hex fill) rather than currentColor.\nexport const BRAND_LOGO_CHIP_CLASSES =\n \"inline-flex shrink-0 items-center justify-center dark:has-[[fill^='#']]:size-14 dark:has-[[fill^='#']]:rounded-2xl dark:has-[[fill^='#']]:bg-primary-foreground\";\n\n// Neeto product logos are drawn edge to edge, brand logos (Slack, Drive…) with\n// built-in padding, so at the same size a Neeto logo reads bigger. Draw them a\n// step smaller (as molecules' integration cards do) so the glyphs match.\nexport const BRAND_LOGO_SIZE = 32;\nexport const NEETO_LOGO_SIZE = 27;\nexport const NEETO_INTEGRATION = /^neeto/i;\n","import { BRAND_LOGO_CHIP_CLASSES } from \"./constants\";\n\n// v2 revamp: brand logos keep their own colours, and some have dark parts\n// (PayPal's navy, UPI's grey) that vanish on a dark logo tile. In dark mode a\n// logo drawn with fixed brand colours sits on a light chip that fills the\n// tile, the usual treatment for brand logos on dark surfaces. Single-colour\n// icons (drawn in currentColor) keep the plain tile. Light mode is unchanged:\n// the wrapper only lays the logo out the way the tile already does.\n// The size is also set inline: the molecules card tile sizes every svg to 32px\n// with a class, which would undo the smaller size of Neeto logos.\nconst BrandLogo = ({ icon: Icon, size, ...iconProps }) => (\n <span className={BRAND_LOGO_CHIP_CLASSES} data-slot=\"brand-logo\">\n <Icon\n {...{ size, ...iconProps }}\n style={size ? { width: size, height: size } : undefined}\n />\n </span>\n);\n\nexport default BrandLogo;\n","import {\n BRAND_LOGO_SIZE,\n NEETO_INTEGRATION,\n NEETO_LOGO_SIZE,\n} from \"./constants\";\n\nexport const getBrandLogoSize = ({ integration, integrationName }) =>\n [integration, integrationName].some(name =>\n NEETO_INTEGRATION.test(name ?? \"\")\n )\n ? NEETO_LOGO_SIZE\n : BRAND_LOGO_SIZE;\n"],"names":["_jsx"],"mappings":";;;;AAAA;AACA;AACO,IAAM,uBAAuB,GAClC,iKAAiK;;AAEnK;AACA;AACA;AACO,IAAM,eAAe,GAAG,EAAE;AAC1B,IAAM,eAAe,GAAG,EAAE;AAC1B,IAAM,iBAAiB,GAAG,SAAS;;;ACA1C,IAAM,SAAS,GAAG,SAAZ,SAAS,CAAA,IAAA,EAAA;EAAA,IAAY,IAAI,QAAV,IAAI;AAAQ,IAAA,IAAI,QAAJ,IAAI;IAAK,SAAS,GAAA,wBAAA,CAAA,IAAA,EAAA,SAAA,CAAA;EAAA,oBACjDA,GAAA,CAAA,MAAA,EAAA;AAAM,IAAA,SAAS,EAAE,uBAAwB;AAAC,IAAA,WAAA,EAAU,YAAY;AAAA,IAAA,QAAA,eAC9DA,IAAC,IAAI,EAAA,aAAA,CAAA,aAAA,CAAA,EAAA,EAAA,aAAA,CAAA;AACG,MAAA,IAAI,EAAJ;AAAI,KAAA,EAAK,SAAS,CAAA,CAAA,EAAA,EAAA,EAAA;MACxB,KAAK,EAAE,IAAI,GAAG;AAAE,QAAA,KAAK,EAAE,IAAI;AAAE,QAAA,MAAM,EAAE;AAAK,OAAC,GAAG;KAAU,CACzD;AAAC,GACE,CAAC;AAAA;;ACVF,IAAM,gBAAgB,GAAG,SAAnB,gBAAgB,CAAA,IAAA,EAAA;EAAA,IAAM,WAAW,QAAX,WAAW;AAAE,IAAA,eAAe,QAAf,eAAe;EAAA,OAC7D,CAAC,WAAW,EAAE,eAAe,CAAC,CAAC,IAAI,CAAC,UAAA,IAAI,EAAA;IAAA,OACtC,iBAAiB,CAAC,IAAI,CAAC,IAAI,KAAA,IAAA,IAAJ,IAAI,KAAA,MAAA,GAAJ,IAAI,GAAI,EAAE,CAAC;AAAA,EAAA,CACpC,CAAC,GACG,eAAe,GACf,eAAe;AAAA;;;;"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var _objectSpread = require('@babel/runtime/helpers/objectSpread2');
|
|
4
|
+
var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
|
|
5
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
6
|
+
|
|
7
|
+
// Dark mode only: a light chip filling the logo tile, applied when the logo
|
|
8
|
+
// is drawn with fixed brand colours (a hex fill) rather than currentColor.
|
|
9
|
+
var BRAND_LOGO_CHIP_CLASSES = "inline-flex shrink-0 items-center justify-center dark:has-[[fill^='#']]:size-14 dark:has-[[fill^='#']]:rounded-2xl dark:has-[[fill^='#']]:bg-primary-foreground";
|
|
10
|
+
|
|
11
|
+
// Neeto product logos are drawn edge to edge, brand logos (Slack, Drive…) with
|
|
12
|
+
// built-in padding, so at the same size a Neeto logo reads bigger. Draw them a
|
|
13
|
+
// step smaller (as molecules' integration cards do) so the glyphs match.
|
|
14
|
+
var BRAND_LOGO_SIZE = 32;
|
|
15
|
+
var NEETO_LOGO_SIZE = 27;
|
|
16
|
+
var NEETO_INTEGRATION = /^neeto/i;
|
|
17
|
+
|
|
18
|
+
var _excluded = ["icon", "size"];
|
|
19
|
+
var BrandLogo = function BrandLogo(_ref) {
|
|
20
|
+
var Icon = _ref.icon,
|
|
21
|
+
size = _ref.size,
|
|
22
|
+
iconProps = _objectWithoutProperties(_ref, _excluded);
|
|
23
|
+
return /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
24
|
+
className: BRAND_LOGO_CHIP_CLASSES,
|
|
25
|
+
"data-slot": "brand-logo",
|
|
26
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Icon, _objectSpread(_objectSpread({}, _objectSpread({
|
|
27
|
+
size: size
|
|
28
|
+
}, iconProps)), {}, {
|
|
29
|
+
style: size ? {
|
|
30
|
+
width: size,
|
|
31
|
+
height: size
|
|
32
|
+
} : undefined
|
|
33
|
+
}))
|
|
34
|
+
});
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
var getBrandLogoSize = function getBrandLogoSize(_ref) {
|
|
38
|
+
var integration = _ref.integration,
|
|
39
|
+
integrationName = _ref.integrationName;
|
|
40
|
+
return [integration, integrationName].some(function (name) {
|
|
41
|
+
return NEETO_INTEGRATION.test(name !== null && name !== void 0 ? name : "");
|
|
42
|
+
}) ? NEETO_LOGO_SIZE : BRAND_LOGO_SIZE;
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
exports.BrandLogo = BrandLogo;
|
|
46
|
+
exports.getBrandLogoSize = getBrandLogoSize;
|
|
47
|
+
//# sourceMappingURL=utils-jyxIYRHb.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils-jyxIYRHb.js","sources":["../app/javascript/src/v2/components/commons/constants.js","../app/javascript/src/v2/components/commons/BrandLogo.jsx","../app/javascript/src/v2/components/commons/utils.js"],"sourcesContent":["// Dark mode only: a light chip filling the logo tile, applied when the logo\n// is drawn with fixed brand colours (a hex fill) rather than currentColor.\nexport const BRAND_LOGO_CHIP_CLASSES =\n \"inline-flex shrink-0 items-center justify-center dark:has-[[fill^='#']]:size-14 dark:has-[[fill^='#']]:rounded-2xl dark:has-[[fill^='#']]:bg-primary-foreground\";\n\n// Neeto product logos are drawn edge to edge, brand logos (Slack, Drive…) with\n// built-in padding, so at the same size a Neeto logo reads bigger. Draw them a\n// step smaller (as molecules' integration cards do) so the glyphs match.\nexport const BRAND_LOGO_SIZE = 32;\nexport const NEETO_LOGO_SIZE = 27;\nexport const NEETO_INTEGRATION = /^neeto/i;\n","import { BRAND_LOGO_CHIP_CLASSES } from \"./constants\";\n\n// v2 revamp: brand logos keep their own colours, and some have dark parts\n// (PayPal's navy, UPI's grey) that vanish on a dark logo tile. In dark mode a\n// logo drawn with fixed brand colours sits on a light chip that fills the\n// tile, the usual treatment for brand logos on dark surfaces. Single-colour\n// icons (drawn in currentColor) keep the plain tile. Light mode is unchanged:\n// the wrapper only lays the logo out the way the tile already does.\n// The size is also set inline: the molecules card tile sizes every svg to 32px\n// with a class, which would undo the smaller size of Neeto logos.\nconst BrandLogo = ({ icon: Icon, size, ...iconProps }) => (\n <span className={BRAND_LOGO_CHIP_CLASSES} data-slot=\"brand-logo\">\n <Icon\n {...{ size, ...iconProps }}\n style={size ? { width: size, height: size } : undefined}\n />\n </span>\n);\n\nexport default BrandLogo;\n","import {\n BRAND_LOGO_SIZE,\n NEETO_INTEGRATION,\n NEETO_LOGO_SIZE,\n} from \"./constants\";\n\nexport const getBrandLogoSize = ({ integration, integrationName }) =>\n [integration, integrationName].some(name =>\n NEETO_INTEGRATION.test(name ?? \"\")\n )\n ? NEETO_LOGO_SIZE\n : BRAND_LOGO_SIZE;\n"],"names":["_jsx"],"mappings":";;;;;;AAAA;AACA;AACO,IAAM,uBAAuB,GAClC,iKAAiK;;AAEnK;AACA;AACA;AACO,IAAM,eAAe,GAAG,EAAE;AAC1B,IAAM,eAAe,GAAG,EAAE;AAC1B,IAAM,iBAAiB,GAAG,SAAS;;;ACA1C,IAAM,SAAS,GAAG,SAAZ,SAAS,CAAA,IAAA,EAAA;EAAA,IAAY,IAAI,QAAV,IAAI;AAAQ,IAAA,IAAI,QAAJ,IAAI;IAAK,SAAS,GAAA,wBAAA,CAAA,IAAA,EAAA,SAAA,CAAA;EAAA,oBACjDA,cAAA,CAAA,MAAA,EAAA;AAAM,IAAA,SAAS,EAAE,uBAAwB;AAAC,IAAA,WAAA,EAAU,YAAY;AAAA,IAAA,QAAA,eAC9DA,eAAC,IAAI,EAAA,aAAA,CAAA,aAAA,CAAA,EAAA,EAAA,aAAA,CAAA;AACG,MAAA,IAAI,EAAJ;AAAI,KAAA,EAAK,SAAS,CAAA,CAAA,EAAA,EAAA,EAAA;MACxB,KAAK,EAAE,IAAI,GAAG;AAAE,QAAA,KAAK,EAAE,IAAI;AAAE,QAAA,MAAM,EAAE;AAAK,OAAC,GAAG;KAAU,CACzD;AAAC,GACE,CAAC;AAAA;;ACVF,IAAM,gBAAgB,GAAG,SAAnB,gBAAgB,CAAA,IAAA,EAAA;EAAA,IAAM,WAAW,QAAX,WAAW;AAAE,IAAA,eAAe,QAAf,eAAe;EAAA,OAC7D,CAAC,WAAW,EAAE,eAAe,CAAC,CAAC,IAAI,CAAC,UAAA,IAAI,EAAA;IAAA,OACtC,iBAAiB,CAAC,IAAI,CAAC,IAAI,KAAA,IAAA,IAAJ,IAAI,KAAA,MAAA,GAAJ,IAAI,GAAI,EAAE,CAAC;AAAA,EAAA,CACpC,CAAC,GACG,eAAe,GACf,eAAe;AAAA;;;;;"}
|
package/dist/v2/Connect.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import
|
|
1
|
+
import _objectSpread from '@babel/runtime/helpers/objectSpread2';
|
|
2
2
|
import { Typography, Button } from '@bigbinary/neeto-atoms';
|
|
3
3
|
import { humanize, noop } from '@bigbinary/neeto-cist';
|
|
4
4
|
import { withT } from '@bigbinary/neeto-commons-frontend/v2/react-utils';
|
|
5
5
|
import CardLayout from '@bigbinary/neeto-molecules/v2/CardLayout';
|
|
6
6
|
import { P as PropTypes } from '../index-MS1ts-9f.js';
|
|
7
7
|
import { Trans } from 'react-i18next';
|
|
8
|
+
import { B as BrandLogo, g as getBrandLogoSize } from '../utils-fchHJTr3.js';
|
|
8
9
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
10
|
+
import '@babel/runtime/helpers/objectWithoutProperties';
|
|
9
11
|
|
|
10
|
-
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; }
|
|
11
|
-
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; }
|
|
12
12
|
var Connect = withT(function (_ref) {
|
|
13
13
|
var t = _ref.t,
|
|
14
14
|
Icon = _ref.Icon,
|
|
@@ -28,49 +28,51 @@ var Connect = withT(function (_ref) {
|
|
|
28
28
|
onConnect = _ref$onConnect === void 0 ? noop : _ref$onConnect,
|
|
29
29
|
children = _ref.children,
|
|
30
30
|
secondaryButtonProps = _ref.secondaryButtonProps;
|
|
31
|
-
return
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
31
|
+
return (
|
|
32
|
+
/*#__PURE__*/
|
|
33
|
+
// v2 card system: the molecules feature card, like Manage, so connect and
|
|
34
|
+
// manage screens share one layout (logo tile, title, muted description,
|
|
35
|
+
// extra content and actions in the text column).
|
|
36
|
+
jsxs(CardLayout, {
|
|
37
|
+
description: description,
|
|
38
|
+
title: title,
|
|
39
|
+
variant: "feature",
|
|
40
|
+
actionBlock: /*#__PURE__*/jsxs("div", {
|
|
41
|
+
className: "flex w-full flex-wrap items-center gap-2",
|
|
42
|
+
children: [/*#__PURE__*/jsx(Button, _objectSpread({
|
|
43
|
+
label: t("neetoIntegrations.common.connect"),
|
|
44
|
+
onClick: onConnect
|
|
45
|
+
}, buttonProps)), secondaryButtonProps && /*#__PURE__*/jsx(Button, _objectSpread({
|
|
46
|
+
variant: "secondary"
|
|
47
|
+
}, secondaryButtonProps))]
|
|
48
|
+
}),
|
|
49
|
+
icon: Icon && /*#__PURE__*/jsx(BrandLogo, {
|
|
50
|
+
icon: Icon,
|
|
51
|
+
size: getBrandLogoSize({
|
|
52
|
+
integration: integration,
|
|
53
|
+
integrationName: integrationName
|
|
54
|
+
})
|
|
55
|
+
}),
|
|
56
|
+
children: [helpDocUrl && /*#__PURE__*/jsx(Typography, {
|
|
57
|
+
className: "text-muted-foreground text-sm leading-relaxed",
|
|
58
|
+
variant: "body2",
|
|
59
|
+
children: /*#__PURE__*/jsx(Trans, {
|
|
60
|
+
i18nKey: "neetoIntegrations.common.helpDocUrl",
|
|
61
|
+
components: {
|
|
62
|
+
helpLink: /*#__PURE__*/jsx(Button, {
|
|
63
|
+
href: helpDocUrl,
|
|
64
|
+
rel: "noopener noreferrer",
|
|
65
|
+
target: "_blank",
|
|
66
|
+
variant: "link"
|
|
67
|
+
})
|
|
68
|
+
},
|
|
69
|
+
values: {
|
|
70
|
+
integration: integrationName || humanize(integration)
|
|
71
|
+
}
|
|
72
|
+
})
|
|
73
|
+
}), children]
|
|
74
|
+
})
|
|
75
|
+
);
|
|
74
76
|
});
|
|
75
77
|
Connect.prototypes = {
|
|
76
78
|
Icon: PropTypes.node,
|
package/dist/v2/Connect.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Connect.js","sources":["../../app/javascript/src/v2/components/Steps/Connect.jsx"],"sourcesContent":["import { Typography, Button } from \"
|
|
1
|
+
{"version":3,"file":"Connect.js","sources":["../../app/javascript/src/v2/components/Steps/Connect.jsx"],"sourcesContent":["import { Typography, Button } from \"neetoatoms\";\nimport { humanize, noop } from \"neetocist\";\nimport { withT } from \"neetocommons/v2/react-utils\";\nimport CardLayout from \"neetomolecules/v2/CardLayout\";\nimport PropTypes from \"prop-types\";\nimport { Trans } from \"react-i18next\";\n\nimport BrandLogo from \"../commons/BrandLogo\";\nimport { getBrandLogoSize } from \"../commons/utils\";\n\nconst Connect = withT(\n ({\n t,\n Icon,\n title = \"\",\n description = \"\",\n integration = \"\",\n integrationName = \"\",\n helpDocUrl = \"\",\n buttonProps = {},\n onConnect = noop,\n children,\n secondaryButtonProps,\n }) => (\n // v2 card system: the molecules feature card, like Manage, so connect and\n // manage screens share one layout (logo tile, title, muted description,\n // extra content and actions in the text column).\n <CardLayout\n {...{ description, title }}\n variant=\"feature\"\n actionBlock={\n <div className=\"flex w-full flex-wrap items-center gap-2\">\n <Button\n label={t(\"neetoIntegrations.common.connect\")}\n onClick={onConnect}\n {...buttonProps}\n />\n {secondaryButtonProps && (\n <Button variant=\"secondary\" {...secondaryButtonProps} />\n )}\n </div>\n }\n icon={\n Icon && (\n <BrandLogo\n icon={Icon}\n size={getBrandLogoSize({ integration, integrationName })}\n />\n )\n }\n >\n {helpDocUrl && (\n <Typography\n className=\"text-muted-foreground text-sm leading-relaxed\"\n variant=\"body2\"\n >\n <Trans\n i18nKey=\"neetoIntegrations.common.helpDocUrl\"\n components={{\n helpLink: (\n <Button\n href={helpDocUrl}\n rel=\"noopener noreferrer\"\n target=\"_blank\"\n variant=\"link\"\n />\n ),\n }}\n values={{\n integration: integrationName || humanize(integration),\n }}\n />\n </Typography>\n )}\n {children}\n </CardLayout>\n )\n);\n\nConnect.prototypes = {\n Icon: PropTypes.node,\n title: PropTypes.string,\n description: PropTypes.string,\n buttonProps: PropTypes.object,\n onConnect: PropTypes.func,\n};\n\nexport default Connect;\n"],"names":["_jsxs","_jsx"],"mappings":";;;;;;;;;;;AAUA,IAAM,OAAO,GAAG,KAAK,CACnB,UAAA,IAAA,EAAA;EAAA,IACE,CAAC,QAAD,CAAC;AACD,IAAA,IAAI,QAAJ,IAAI;AAAA,IAAA,UAAA,GAAA,IAAA,CACJ,KAAK;AAAL,IAAA,KAAK,2BAAG,EAAE,GAAA,UAAA;AAAA,IAAA,gBAAA,GAAA,IAAA,CACV,WAAW;AAAX,IAAA,WAAW,iCAAG,EAAE,GAAA,gBAAA;AAAA,IAAA,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D,CAEJ;MAAA,QAAA,EAAA,CAEA,UAAU,iBACTA,GAAA,CAAC,UAAU,EAAA;AACT,QAAA,SAAS,EAAC,+CAA+C;AACzD,QAAA,OAAO,EAAC,OAAO;AAAA,QAAA,QAAA,eAEfA,IAAC,KAAK,EAAA;AACJ,UAAA,OAAO,EAAC,qCAAqC;AAC7C,UAAA,UAAU,EAAE;YACV,QAAQ,eACNA,IAAC,MAAM,EAAA;AACL,cAAA,IAAI,EAAE,UAAW;AACjB,cAAA,GAAG,EAAC,qBAAqB;AACzB,cAAA,MAAM,EAAC,QAAQ;AACf,cAAA,OAAO,EAAC;aACT;WAEH;AACF,UAAA,MAAM,EAAE;AACN,YAAA,WAAW,EAAE,eAAe,IAAI,QAAQ,CAAC,WAAW;AACtD;SACD;OACS,CACb,EACA,QAAQ;KACC;AAAC;AAAA,CAEjB;AAEA,OAAO,CAAC,UAAU,GAAG;EACnB,IAAI,EAAE,SAAS,CAAC,IAAI;EACpB,KAAK,EAAE,SAAS,CAAC,MAAM;EACvB,WAAW,EAAE,SAAS,CAAC,MAAM;EAC7B,WAAW,EAAE,SAAS,CAAC,MAAM;EAC7B,SAAS,EAAE,SAAS,CAAC;AACvB,CAAC;;;;"}
|
package/dist/v2/Daily.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import i18next from 'i18next';
|
|
2
2
|
import { isPresent, noop } from '@bigbinary/neeto-cist';
|
|
3
3
|
import { withTitle, useQueryParams } from '@bigbinary/neeto-commons-frontend/v2/react-utils';
|
|
4
|
-
import { u as useFetchDaily, a as useDestroyDaily } from '../useDailiesApi-
|
|
4
|
+
import { u as useFetchDaily, a as useDestroyDaily } from '../useDailiesApi-BIZR1qiD.js';
|
|
5
5
|
import Form from './DailyForm.js';
|
|
6
6
|
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
7
7
|
import { useState } from 'react';
|
|
@@ -12,7 +12,7 @@ import CopyToClipboardButton from '@bigbinary/neeto-molecules/v2/CopyToClipboard
|
|
|
12
12
|
import { useTranslation, Trans } from 'react-i18next';
|
|
13
13
|
import Manage$1 from './Manage.js';
|
|
14
14
|
import { jsx } from 'react/jsx-runtime';
|
|
15
|
-
import '@babel/runtime/helpers/
|
|
15
|
+
import '@babel/runtime/helpers/objectSpread2';
|
|
16
16
|
import '@tanstack/react-query';
|
|
17
17
|
import '@bigbinary/neeto-commons-frontend/constants';
|
|
18
18
|
import '@bigbinary/neeto-commons-frontend/react-utils';
|
|
@@ -26,8 +26,9 @@ import 'react-router-dom';
|
|
|
26
26
|
import 'yup';
|
|
27
27
|
import './WalkthroughModal.js';
|
|
28
28
|
import '@bigbinary/neeto-commons-frontend/v2/react-utils/withT';
|
|
29
|
-
import '
|
|
29
|
+
import '../utils-fchHJTr3.js';
|
|
30
30
|
import '@babel/runtime/helpers/objectWithoutProperties';
|
|
31
|
+
import './DisconnectAlert.js';
|
|
31
32
|
|
|
32
33
|
var Manage = function Manage(_ref) {
|
|
33
34
|
var description = _ref.description,
|
|
@@ -75,6 +76,7 @@ var Manage = function Manage(_ref) {
|
|
|
75
76
|
connect: true
|
|
76
77
|
}),
|
|
77
78
|
integration: "daily",
|
|
79
|
+
integrationName: t("neetoIntegrations.daily.title"),
|
|
78
80
|
description: isConnected ? /*#__PURE__*/jsx(Trans, {
|
|
79
81
|
i18nKey: "neetoIntegrations.daily.yourApiKey",
|
|
80
82
|
values: {
|
package/dist/v2/Daily.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Daily.js","sources":["../../app/javascript/src/v2/components/Integrations/Daily/Manage.jsx","../../app/javascript/src/v2/components/Integrations/Daily/index.jsx"],"sourcesContent":["import { useState } from \"react\";\n\nimport { Spinner } from \"@bigbinary/neeto-atoms\";\nimport { isPresent } from \"neetocist\";\nimport { buildUrl } from \"neetocommons/v2/utils\";\nimport { Daily as DailyIcon } from \"neetoicons/misc\";\nimport CopyToClipboardButton from \"neetomolecules/v2/CopyToClipboardButton\";\nimport { Trans, useTranslation } from \"react-i18next\";\n\nimport { useDestroyDaily, useFetchDaily } from \"hooks/reactQuery/useDailiesApi\";\n\nimport ManageIntegrations from \"../../commons/Manage\";\n\nconst Manage = ({ description, onDisconnect }) => {\n const [isDisconnectAlertOpen, setIsDisconnectAlertOpen] = useState(false);\n\n const { data: { metadata = {} } = {}, isFetching } = useFetchDaily();\n const { apiKey = null } = metadata || {};\n\n const { t } = useTranslation();\n\n const { mutate: destroyIntegration, isPending: isDisconnecting } =\n useDestroyDaily({\n onSuccess: () => {\n setIsDisconnectAlertOpen(false);\n onDisconnect?.();\n },\n });\n\n const isConnected = isPresent(apiKey);\n\n const handleDisconnect = () => destroyIntegration(\"daily\");\n\n if (isFetching || isDisconnecting) {\n return (\n <div className=\"flex h-full w-full items-center justify-center\">\n <Spinner />\n </div>\n );\n }\n\n return (\n <ManageIntegrations\n {...{\n isConnected,\n isDisconnectAlertOpen,\n isDisconnecting,\n setIsDisconnectAlertOpen,\n }}\n Icon={DailyIcon}\n connectPath={buildUrl(window.location.pathname, { connect: true })}\n integration=\"daily\"\n description={\n isConnected ? (\n <Trans\n i18nKey=\"neetoIntegrations.daily.yourApiKey\"\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 style=\"text\"\n value={apiKey}\n />\n ),\n }}\n />\n ) : (\n description\n )\n }\n title={\n isConnected\n ? t(\"neetoIntegrations.daily.connected\")\n : t(\"neetoIntegrations.daily.connect.account\")\n }\n onClose={() => setIsDisconnectAlertOpen(false)}\n onDisconnect={handleDisconnect}\n />\n );\n};\n\nexport default Manage;\n","import i18next from \"i18next\";\nimport { isPresent, noop } from \"neetocist\";\nimport { useQueryParams, withTitle } from \"neetocommons/v2/react-utils\";\n\nimport { useFetchDaily } from \"hooks/reactQuery/useDailiesApi\";\n\nimport Form from \"./Form\";\nimport Manage from \"./Manage\";\n\nconst Daily = ({\n isOnboarding = false,\n helpDocUrl = \"\",\n videoUrl = \"\",\n description = \"\",\n onConnect = noop,\n onDisconnect = noop,\n}) => {\n const { connect } = useQueryParams();\n\n const { data: { metadata = {} } = {} } = useFetchDaily();\n const { apiKey = null } = metadata || {};\n\n if ((isPresent(apiKey) && !isOnboarding) || !connect) {\n return <Manage {...{ description, onDisconnect }} />;\n }\n\n return <Form {...{ helpDocUrl, onConnect, videoUrl }} />;\n};\n\nexport default withTitle(\n Daily,\n i18next.t(\"neetoIntegrations.browserTitles.integrations.dailyco\")\n);\n"],"names":["
|
|
1
|
+
{"version":3,"file":"Daily.js","sources":["../../app/javascript/src/v2/components/Integrations/Daily/Manage.jsx","../../app/javascript/src/v2/components/Integrations/Daily/index.jsx"],"sourcesContent":["import { useState } from \"react\";\n\nimport { Spinner } from \"@bigbinary/neeto-atoms\";\nimport { isPresent } from \"neetocist\";\nimport { buildUrl } from \"neetocommons/v2/utils\";\nimport { Daily as DailyIcon } from \"neetoicons/misc\";\nimport CopyToClipboardButton from \"neetomolecules/v2/CopyToClipboardButton\";\nimport { Trans, useTranslation } from \"react-i18next\";\n\nimport { useDestroyDaily, useFetchDaily } from \"hooks/reactQuery/useDailiesApi\";\n\nimport ManageIntegrations from \"../../commons/Manage\";\n\nconst Manage = ({ description, onDisconnect }) => {\n const [isDisconnectAlertOpen, setIsDisconnectAlertOpen] = useState(false);\n\n const { data: { metadata = {} } = {}, isFetching } = useFetchDaily();\n const { apiKey = null } = metadata || {};\n\n const { t } = useTranslation();\n\n const { mutate: destroyIntegration, isPending: isDisconnecting } =\n useDestroyDaily({\n onSuccess: () => {\n setIsDisconnectAlertOpen(false);\n onDisconnect?.();\n },\n });\n\n const isConnected = isPresent(apiKey);\n\n const handleDisconnect = () => destroyIntegration(\"daily\");\n\n if (isFetching || isDisconnecting) {\n return (\n <div className=\"flex h-full w-full items-center justify-center\">\n <Spinner />\n </div>\n );\n }\n\n return (\n <ManageIntegrations\n {...{\n isConnected,\n isDisconnectAlertOpen,\n isDisconnecting,\n setIsDisconnectAlertOpen,\n }}\n Icon={DailyIcon}\n connectPath={buildUrl(window.location.pathname, { connect: true })}\n integration=\"daily\"\n integrationName={t(\"neetoIntegrations.daily.title\")}\n description={\n isConnected ? (\n <Trans\n i18nKey=\"neetoIntegrations.daily.yourApiKey\"\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 style=\"text\"\n value={apiKey}\n />\n ),\n }}\n />\n ) : (\n description\n )\n }\n title={\n isConnected\n ? t(\"neetoIntegrations.daily.connected\")\n : t(\"neetoIntegrations.daily.connect.account\")\n }\n onClose={() => setIsDisconnectAlertOpen(false)}\n onDisconnect={handleDisconnect}\n />\n );\n};\n\nexport default Manage;\n","import i18next from \"i18next\";\nimport { isPresent, noop } from \"neetocist\";\nimport { useQueryParams, withTitle } from \"neetocommons/v2/react-utils\";\n\nimport { useFetchDaily } from \"hooks/reactQuery/useDailiesApi\";\n\nimport Form from \"./Form\";\nimport Manage from \"./Manage\";\n\nconst Daily = ({\n isOnboarding = false,\n helpDocUrl = \"\",\n videoUrl = \"\",\n description = \"\",\n onConnect = noop,\n onDisconnect = noop,\n}) => {\n const { connect } = useQueryParams();\n\n const { data: { metadata = {} } = {} } = useFetchDaily();\n const { apiKey = null } = metadata || {};\n\n if ((isPresent(apiKey) && !isOnboarding) || !connect) {\n return <Manage {...{ description, onDisconnect }} />;\n }\n\n return <Form {...{ helpDocUrl, onConnect, videoUrl }} />;\n};\n\nexport default withTitle(\n Daily,\n i18next.t(\"neetoIntegrations.browserTitles.integrations.dailyco\")\n);\n"],"names":["_jsx","ManageIntegrations"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAaA,IAAM,MAA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IAAA,oBAAOA,IAAC,MAAM,EAAA;AAAO,MAAA,WAAW,EAAX,WAAW;AAAE,MAAA,YAAY,EAAZ;AAAY,KAAK,CAAC;AACtD,EAAA;AAEA,EAAA,oBAAOA,IAAC,IAAI,EAAA;AAAO,IAAA,UAAU,EAAV,UAAU;AAAE,IAAA,SAAS,EAAT,SAAS;AAAE,IAAA,QAAQ,EAAR;AAAQ,GAAK,CAAC;AAC1D,CAAC;AAED,YAAe,SAAS,CACtB,KAAK,EACL,OAAO,CAAC,CAAC,CAAC,sDAAsD,CAClE,CAAC;;;;"}
|
package/dist/v2/DailyForm.js
CHANGED
|
@@ -9,11 +9,11 @@ import Container from '@bigbinary/neeto-molecules/v2/Container';
|
|
|
9
9
|
import Header from '@bigbinary/neeto-molecules/v2/Header';
|
|
10
10
|
import { useTranslation, Trans } from 'react-i18next';
|
|
11
11
|
import { useHistory } from 'react-router-dom';
|
|
12
|
-
import { b as useCreateDaily } from '../useDailiesApi-
|
|
12
|
+
import { b as useCreateDaily } from '../useDailiesApi-BIZR1qiD.js';
|
|
13
13
|
import * as yup from 'yup';
|
|
14
14
|
import WalkthroughModal from './WalkthroughModal.js';
|
|
15
15
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
16
|
-
import '@babel/runtime/helpers/
|
|
16
|
+
import '@babel/runtime/helpers/objectSpread2';
|
|
17
17
|
import '@tanstack/react-query';
|
|
18
18
|
import '@bigbinary/neeto-commons-frontend/constants';
|
|
19
19
|
import '@bigbinary/neeto-commons-frontend/react-utils';
|
package/dist/v2/DailyForm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DailyForm.js","sources":["../../app/javascript/src/v2/components/Integrations/Daily/constants.js","../../app/javascript/src/v2/components/Integrations/Daily/Form.jsx"],"sourcesContent":["import { t } from \"i18next\";\nimport * as yup from \"yup\";\n\nexport const MANAGE_DAILY_CO_FORM_INITIAL_VALUES = { apiKey: \"\" };\n\nexport const DAILY_CO_VALIDATION_SCHEMA = yup.object().shape({\n apiKey: yup\n .string()\n .trim()\n .required(\n t(\"neetoIntegrations.errors.required\", {\n entity: t(\"neetoIntegrations.daily.apiKey\"),\n })\n ),\n});\n","import { useState } from \"react\";\n\nimport i18next from \"i18next\";\nimport { Button, Spinner, Typography } from \"neetoatoms\";\nimport { Input, Form as FormikForm, ActionBlock } from \"neetoatoms/formik\";\nimport { withTitle } from \"neetocommons/v2/react-utils\";\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 { useCreateDaily } from \"hooks/reactQuery/useDailiesApi\";\n\nimport {\n MANAGE_DAILY_CO_FORM_INITIAL_VALUES,\n DAILY_CO_VALIDATION_SCHEMA,\n} from \"./constants\";\n\nimport WalkthroughModal from \"../../WalkthroughModal\";\n\nconst Form = ({ helpDocUrl, videoUrl, onConnect, breadcrumbs }) => {\n const { t } = useTranslation();\n const history = useHistory();\n\n const [isDemoModalOpen, setIsDemoModalOpen] = useState(false);\n\n const { mutate: createDaily, isPending: isConnecting } = useCreateDaily({\n onSuccess: () => onConnect?.(),\n });\n\n const handleSubmit = payload => createDaily(payload);\n\n if (isConnecting) {\n return (\n <div className=\"flex h-full w-full items-center justify-center\">\n <Spinner />\n </div>\n );\n }\n\n return (\n <Container isHeaderFixed>\n <Header\n {...{ breadcrumbs }}\n title={t(\"neetoIntegrations.daily.connect.title\")}\n titleHelpPopoverProps={{\n title: t(\"neetoIntegrations.daily.connect.title\"),\n description: (\n <Typography lineClamp=\"none\" variant=\"body2\">\n <Trans\n i18nKey=\"neetoIntegrations.daily.helpDoc\"\n components={{\n videoLink: (\n <Button\n variant=\"link\"\n onClick={() => setIsDemoModalOpen(true)}\n />\n ),\n }}\n />\n </Typography>\n ),\n helpLinkProps: {\n href: helpDocUrl,\n \"data-testid\": \"api-key-help-doc-link\",\n },\n }}\n />\n <div className=\"w-full\">\n <FormikForm\n formikProps={{\n initialValues: MANAGE_DAILY_CO_FORM_INITIAL_VALUES,\n validationSchema: DAILY_CO_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 dataTestId=\"api-key\"\n label={t(\"neetoIntegrations.daily.apiKey\")}\n name=\"apiKey\"\n />\n </CardLayout>\n </FormikForm>\n <WalkthroughModal\n {...{ videoUrl }}\n isOpen={isDemoModalOpen}\n onClose={() => setIsDemoModalOpen(false)}\n />\n </div>\n </Container>\n );\n};\nexport default withTitle(\n Form,\n i18next.t(\"neetoIntegrations.browserTitles.integrations.dailyco\")\n);\n"],"names":["
|
|
1
|
+
{"version":3,"file":"DailyForm.js","sources":["../../app/javascript/src/v2/components/Integrations/Daily/constants.js","../../app/javascript/src/v2/components/Integrations/Daily/Form.jsx"],"sourcesContent":["import { t } from \"i18next\";\nimport * as yup from \"yup\";\n\nexport const MANAGE_DAILY_CO_FORM_INITIAL_VALUES = { apiKey: \"\" };\n\nexport const DAILY_CO_VALIDATION_SCHEMA = yup.object().shape({\n apiKey: yup\n .string()\n .trim()\n .required(\n t(\"neetoIntegrations.errors.required\", {\n entity: t(\"neetoIntegrations.daily.apiKey\"),\n })\n ),\n});\n","import { useState } from \"react\";\n\nimport i18next from \"i18next\";\nimport { Button, Spinner, Typography } from \"neetoatoms\";\nimport { Input, Form as FormikForm, ActionBlock } from \"neetoatoms/formik\";\nimport { withTitle } from \"neetocommons/v2/react-utils\";\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 { useCreateDaily } from \"hooks/reactQuery/useDailiesApi\";\n\nimport {\n MANAGE_DAILY_CO_FORM_INITIAL_VALUES,\n DAILY_CO_VALIDATION_SCHEMA,\n} from \"./constants\";\n\nimport WalkthroughModal from \"../../WalkthroughModal\";\n\nconst Form = ({ helpDocUrl, videoUrl, onConnect, breadcrumbs }) => {\n const { t } = useTranslation();\n const history = useHistory();\n\n const [isDemoModalOpen, setIsDemoModalOpen] = useState(false);\n\n const { mutate: createDaily, isPending: isConnecting } = useCreateDaily({\n onSuccess: () => onConnect?.(),\n });\n\n const handleSubmit = payload => createDaily(payload);\n\n if (isConnecting) {\n return (\n <div className=\"flex h-full w-full items-center justify-center\">\n <Spinner />\n </div>\n );\n }\n\n return (\n <Container isHeaderFixed>\n <Header\n {...{ breadcrumbs }}\n title={t(\"neetoIntegrations.daily.connect.title\")}\n titleHelpPopoverProps={{\n title: t(\"neetoIntegrations.daily.connect.title\"),\n description: (\n <Typography lineClamp=\"none\" variant=\"body2\">\n <Trans\n i18nKey=\"neetoIntegrations.daily.helpDoc\"\n components={{\n videoLink: (\n <Button\n variant=\"link\"\n onClick={() => setIsDemoModalOpen(true)}\n />\n ),\n }}\n />\n </Typography>\n ),\n helpLinkProps: {\n href: helpDocUrl,\n \"data-testid\": \"api-key-help-doc-link\",\n },\n }}\n />\n <div className=\"w-full\">\n <FormikForm\n formikProps={{\n initialValues: MANAGE_DAILY_CO_FORM_INITIAL_VALUES,\n validationSchema: DAILY_CO_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 dataTestId=\"api-key\"\n label={t(\"neetoIntegrations.daily.apiKey\")}\n name=\"apiKey\"\n />\n </CardLayout>\n </FormikForm>\n <WalkthroughModal\n {...{ videoUrl }}\n isOpen={isDemoModalOpen}\n onClose={() => setIsDemoModalOpen(false)}\n />\n </div>\n </Container>\n );\n};\nexport default withTitle(\n Form,\n i18next.t(\"neetoIntegrations.browserTitles.integrations.dailyco\")\n);\n"],"names":["_jsx","_jsxs","FormikForm"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAGO,IAAM,mCAAmC,GAAG;AAAE,EAAA,MAAM,EAAE;AAAG,CAAC;AAE1D,IAAM,0BAA0B,GAAG,GAAG,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC;AAC3D,EAAA,MAAM,EAAE,GAAG,CACR,MAAM,EAAE,CACR,IAAI,EAAE,CACN,QAAQ,CACP,CAAC,CAAC,mCAAmC,EAAE;IACrC,MAAM,EAAE,CAAC,CAAC,gCAAgC;AAC5C,GAAC,CACH;AACJ,CAAC,CAAC;;ACOF,IAAM,IAAI,GAAG,SAAP,IAAI,CAAA,IAAA,EAAyD;EAAA,IAAnD,UAAU,QAAV,UAAU;AAAE,IAAA,QAAQ,QAAR,QAAQ;AAAE,IAAA,SAAS,QAAT,SAAS;AAAE,IAAA,WAAW,QAAX,WAAW;EAC1D,IAAA,eAAA,GAAc,cAAc,EAAE;AAAtB,IAAA,CAAC,mBAAD,CAAC;AACT,EAAA,IAAM,OAAO,GAAG,UAAU,EAAE;EAE5B,IAAA,SAAA,GAA8C,QAAQ,CAAC,KAAK,CAAC;AAAA,IAAA,UAAA,GAAA,cAAA,CAAA,SAAA,EAAA,CAAA,CAAA;IAAtD,eAAe,GAAA,UAAA,CAAA,CAAA,CAAA;IAAE,kBAAkB,GAAA,UAAA,CAAA,CAAA,CAAA;AAE1C,EAAA,IAAA,eAAA,GAAyD,cAAc,CAAC;MACtE,SAAS,EAAE,SAAX,SAAS,GAAA;AAAA,QAAA,OAAQ,SAAS,KAAA,IAAA,IAAT,SAAS,KAAA,MAAA,GAAA,MAAA,GAAT,SAAS,EAAI;AAAA,MAAA;AAChC,KAAC,CAAC;AAFc,IAAA,WAAW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E;AACX,UAAA,aAAa,EAAE,mCAAmC;AAClD,UAAA,gBAAgB,EAAE,0BAA0B;AAC5C,UAAA,QAAQ,EAAE;SACV;AAAA,QAAA,QAAA,eAEFF,IAAC,UAAU,EAAA;UACT,WAAW,eACTA,IAAC,WAAW,EAAA;AACV,YAAA,iBAAiB,EAAE;cAAE,OAAO,EAAE,SAAT,OAAO,GAAA;AAAA,gBAAA,OAAQ,OAAO,CAAC,MAAM,EAAE;AAAA,cAAA;aAAG;AACvD,YAAA,YAAY,EAAE,YAAa;AAC3B,YAAA,iBAAiB,EAAE;cACjB,KAAK,EAAE,CAAC,CAAC,kCAAkC;AAC7C;AAAE,WACH,CACF;AAAA,UAAA,QAAA,eAEDA,IAAC,KAAK,EAAA;YACJ,SAAS,EAAA,IAAA;YACT,QAAQ,EAAA,IAAA;AACR,YAAA,UAAU,EAAC,SAAS;AACpB,YAAA,KAAK,EAAE,CAAC,CAAC,gCAAgC,CAAE;AAC3C,YAAA,IAAI,EAAC;WACN;SACS;OACF,CAAC,eACbA,GAAA,CAAC,gBAAgB,EAAA;AACT,QAAA,QAAQ,EAAR,QAAQ;AACd,QAAA,MAAM,EAAE,eAAgB;QACxB,OAAO,EAAE,SAAT,OAAO,GAAA;UAAA,OAAQ,kBAAkB,CAAC,KAAK,CAAC;AAAA,QAAA;AAAC,OAC1C,CAAC;AAAA,KACC,CAAC;AAAA,GACG,CAAC;AAEhB,CAAC;AACD,aAAe,SAAS,CACtB,IAAI,EACJ,OAAO,CAAC,CAAC,CAAC,sDAAsD,CAClE,CAAC;;;;"}
|
package/dist/v2/Demo.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Demo.js","sources":["../../app/javascript/src/v2/components/Steps/utils.js","../../app/javascript/src/v2/components/Steps/Demo.jsx"],"sourcesContent":["import { isEmpty } from \"ramda\";\n\nexport const isYouTubeLink = videoUrl => {\n const youtubeRegex = /^(https?:\\/\\/)?(www\\.)?(youtube\\.com|youtu\\.be)\\//;\n\n return youtubeRegex.test(videoUrl);\n};\n\nexport const renderText = (text, fallbackTranslation) =>\n isEmpty(text) ? fallbackTranslation : text;\n","import { Button } from \"@bigbinary/neeto-atoms\";\nimport { noop } from \"neetocist\";\nimport CardLayout from \"neetomolecules/v2/CardLayout\";\nimport PropTypes from \"prop-types\";\nimport { useTranslation } from \"react-i18next\";\n\nimport { isYouTubeLink, renderText } from \"./utils\";\n\nconst Demo = ({\n title = \"\",\n subtitle = \"\",\n iframeTitle = \"\",\n onClose = noop,\n videoUrl = \"\",\n children,\n}) => {\n const { t } = useTranslation();\n\n const renderVideo = videoUrl =>\n isYouTubeLink(videoUrl) ? (\n <iframe\n allowFullScreen\n className=\"aspect-video w-full max-w-3xl border-none\"\n frameBorder=\"0\"\n id=\"ytplayer\"\n src={videoUrl}\n title={renderText(iframeTitle, t(\"neetoIntegrations.demo.iFrameTitle\"))}\n type=\"text/html\"\n />\n ) : (\n <video\n autoPlay\n controls\n muted\n className=\"aspect-video w-full max-w-3xl cursor-pointer rounded-xl\"\n id=\"walkthrough-video\"\n >\n <source src={videoUrl} />\n </video>\n );\n\n return (\n <CardLayout\n description={renderText(subtitle, t(\"neetoIntegrations.demo.subtitle\"))}\n title={renderText(title, t(\"neetoIntegrations.demo.title\"))}\n actionBlock={\n <Button\n data-testid=\"neeto-integrations-demo-finish-button\"\n label={t(\"neetoIntegrations.common.finish\")}\n onClick={onClose}\n />\n }\n >\n {children}\n {videoUrl && <div className=\"w-full\">{renderVideo(videoUrl)}</div>}\n </CardLayout>\n );\n};\n\nDemo.prototypes = {\n onClose: PropTypes.func,\n videoUrl: PropTypes.string,\n title: PropTypes.string,\n subtitle: PropTypes.string,\n iframeTitle: PropTypes.string,\n};\n\nexport default Demo;\n"],"names":["
|
|
1
|
+
{"version":3,"file":"Demo.js","sources":["../../app/javascript/src/v2/components/Steps/utils.js","../../app/javascript/src/v2/components/Steps/Demo.jsx"],"sourcesContent":["import { isEmpty } from \"ramda\";\n\nexport const isYouTubeLink = videoUrl => {\n const youtubeRegex = /^(https?:\\/\\/)?(www\\.)?(youtube\\.com|youtu\\.be)\\//;\n\n return youtubeRegex.test(videoUrl);\n};\n\nexport const renderText = (text, fallbackTranslation) =>\n isEmpty(text) ? fallbackTranslation : text;\n","import { Button } from \"@bigbinary/neeto-atoms\";\nimport { noop } from \"neetocist\";\nimport CardLayout from \"neetomolecules/v2/CardLayout\";\nimport PropTypes from \"prop-types\";\nimport { useTranslation } from \"react-i18next\";\n\nimport { isYouTubeLink, renderText } from \"./utils\";\n\nconst Demo = ({\n title = \"\",\n subtitle = \"\",\n iframeTitle = \"\",\n onClose = noop,\n videoUrl = \"\",\n children,\n}) => {\n const { t } = useTranslation();\n\n const renderVideo = videoUrl =>\n isYouTubeLink(videoUrl) ? (\n <iframe\n allowFullScreen\n className=\"aspect-video w-full max-w-3xl border-none\"\n frameBorder=\"0\"\n id=\"ytplayer\"\n src={videoUrl}\n title={renderText(iframeTitle, t(\"neetoIntegrations.demo.iFrameTitle\"))}\n type=\"text/html\"\n />\n ) : (\n <video\n autoPlay\n controls\n muted\n className=\"aspect-video w-full max-w-3xl cursor-pointer rounded-xl\"\n id=\"walkthrough-video\"\n >\n <source src={videoUrl} />\n </video>\n );\n\n return (\n <CardLayout\n description={renderText(subtitle, t(\"neetoIntegrations.demo.subtitle\"))}\n title={renderText(title, t(\"neetoIntegrations.demo.title\"))}\n actionBlock={\n <Button\n data-testid=\"neeto-integrations-demo-finish-button\"\n label={t(\"neetoIntegrations.common.finish\")}\n onClick={onClose}\n />\n }\n >\n {children}\n {videoUrl && <div className=\"w-full\">{renderVideo(videoUrl)}</div>}\n </CardLayout>\n );\n};\n\nDemo.prototypes = {\n onClose: PropTypes.func,\n videoUrl: PropTypes.string,\n title: PropTypes.string,\n subtitle: PropTypes.string,\n iframeTitle: PropTypes.string,\n};\n\nexport default Demo;\n"],"names":["_jsx","_jsxs"],"mappings":";;;;;;;;AAEO,IAAM,aAAa,GAAG,SAAhB,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IAAI,EAAC;AAAW,KACjB,CAAC,gBAEFA,GAAA,CAAA,OAAA,EAAA;MACE,QAAQ,EAAA,IAAA;MACR,QAAQ,EAAA,IAAA;MACR,KAAK,EAAA,IAAA;AACL,MAAA,SAAS,EAAC,yDAAyD;AACnE,MAAA,EAAE,EAAC,mBAAmB;MAAA,QAAA,eAEtBA,GAAA,CAAA,QAAA,EAAA;AAAQ,QAAA,GAAG,EAAE;OAAW;AAAC,KACpB,CACR;AAAA,EAAA,CAAA;AAEH,EAAA,oBACEC,KAAC,UAAU,EAAA;IACT,WAAW,EAAE,UAAU,CAAC,QAAQ,EAAE,CAAC,CAAC,iCAAiC,CAAC,CAAE;IACxE,KAAK,EAAE,UAAU,CAAC,KAAK,EAAE,CAAC,CAAC,8BAA8B,CAAC,CAAE;IAC5D,WAAW,eACTD,IAAC,MAAM,EAAA;AACL,MAAA,aAAA,EAAY,uCAAuC;AACnD,MAAA,KAAK,EAAE,CAAC,CAAC,iCAAiC,CAAE;AAC5C,MAAA,OAAO,EAAE;AAAQ,KAClB,CACF;IAAA,QAAA,EAAA,CAEA,QAAQ,EACR,QAAQ,iBAAIA,GAAA,CAAA,KAAA,EAAA;AAAK,MAAA,SAAS,EAAC,QAAQ;MAAA,QAAA,EAAE,WAAW,CAAC,QAAQ;AAAC,KAAM,CAAC;AAAA,GACxD,CAAC;AAEjB;AAEA,IAAI,CAAC,UAAU,GAAG;EAChB,OAAO,EAAE,SAAS,CAAC,IAAI;EACvB,QAAQ,EAAE,SAAS,CAAC,MAAM;EAC1B,KAAK,EAAE,SAAS,CAAC,MAAM;EACvB,QAAQ,EAAE,SAAS,CAAC,MAAM;EAC1B,WAAW,EAAE,SAAS,CAAC;AACzB,CAAC;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import _objectSpread from '@babel/runtime/helpers/objectSpread2';
|
|
2
2
|
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
3
3
|
import { Alert } from '@bigbinary/neeto-atoms';
|
|
4
4
|
import { noop } from '@bigbinary/neeto-cist';
|
|
@@ -6,8 +6,6 @@ import withT from '@bigbinary/neeto-commons-frontend/v2/react-utils/withT';
|
|
|
6
6
|
import { jsx } from 'react/jsx-runtime';
|
|
7
7
|
|
|
8
8
|
var _excluded = ["t", "isOpen", "isDisconnecting", "title", "message", "onClose", "onDisconnect"];
|
|
9
|
-
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; }
|
|
10
|
-
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; }
|
|
11
9
|
var DisconnectAlert = withT(function (_ref) {
|
|
12
10
|
var t = _ref.t,
|
|
13
11
|
_ref$isOpen = _ref.isOpen,
|