@bigbinary/neeto-integrations-frontend 4.2.8 → 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app/javascript/src/translations/en.json +9 -9
- 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
package/dist/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../app/javascript/src/components/DisconnectedIntegrationsRibbon/utils.js","../../app/javascript/src/components/DisconnectedIntegrationsRibbon/index.jsx"],"sourcesContent":["import { t } from \"i18next\";\n\nconst getHasOnlyUPIIntegration = alerts =>\n alerts.length === 1 && alerts[0].serviceName === \"eupi\";\n\nexport const getDisconnectionRibbonDefaultMessage = alerts =>\n getHasOnlyUPIIntegration(alerts)\n ? t(\"neetoIntegrations.disconnectionRibbon.non_permission_message\", {\n count: alerts.length,\n })\n : t(\"neetoIntegrations.disconnectionRibbon.message\", {\n count: alerts.length,\n });\n\nexport const getDisconnectionRibbonI18nKey = (alerts, integrationRouteMap) => {\n const hasOnlyUPIIntegration =\n getHasOnlyUPIIntegration(alerts) && integrationRouteMap.eupi;\n\n return hasOnlyUPIIntegration\n ? \"neetoIntegrations.disconnectionRibbon.non_permission_message\"\n : \"neetoIntegrations.disconnectionRibbon.message\";\n};\n","import { useState } from \"react\";\n\nimport { Tag } from \"neetoui\";\nimport { isEmpty } from \"ramda\";\nimport { Trans, useTranslation } from \"react-i18next\";\nimport { Link } from \"react-router-dom\";\n\nimport { useFetchDisconnectionAlerts } from \"hooks/reactQuery/useDisconnectionAlertsApi\";\n\nimport {\n getDisconnectionRibbonDefaultMessage,\n getDisconnectionRibbonI18nKey,\n} from \"./utils\";\n\nconst IntegrationLinks = ({ alerts, integrationRouteMap }) =>\n alerts.map((alert, index) => {\n const { label, path } = integrationRouteMap[alert.serviceName];\n const linkPath = alert.redirectPath || path;\n\n return (\n <span key={alert.id}>\n {index > 0 && \", \"}\n <Link className=\"font-semibold underline\" to={linkPath}>\n {label}\n </Link>\n </span>\n );\n });\n\nconst DisconnectedIntegrationsRibbon = ({ integrationRouteMap = {} }) => {\n const [isClosed, setIsClosed] = useState(false);\n\n useTranslation();\n\n const { data: { disconnectionAlerts: alerts = [] } = {} } =\n useFetchDisconnectionAlerts();\n\n const knownAlerts = alerts.filter(\n alert => integrationRouteMap[alert.serviceName]\n );\n\n if (isClosed || isEmpty(knownAlerts)) return null;\n\n const singleAlert = knownAlerts.length === 1 ? knownAlerts[0] : null;\n const connectPath = singleAlert\n ? singleAlert.redirectPath ||\n integrationRouteMap[singleAlert.serviceName].path\n : \"\";\n\n return (\n <Tag\n className=\"neeto-molecules-sticky-ribbon w-full p-2.5 text-center\"\n data-testid=\"disconnected-integrations-ribbon\"\n size=\"large\"\n style=\"warning\"\n onClose={() => setIsClosed(true)}\n >\n <span className=\"w-full\">\n <Trans\n count={knownAlerts.length}\n defaults={getDisconnectionRibbonDefaultMessage(knownAlerts)}\n components={{\n integrations: (\n <IntegrationLinks\n {...{ integrationRouteMap }}\n alerts={knownAlerts}\n />\n ),\n connectLink: (\n <Link className=\"font-semibold underline\" to={connectPath} />\n ),\n }}\n i18nKey={getDisconnectionRibbonI18nKey(\n knownAlerts,\n integrationRouteMap\n )}\n />\n </span>\n </Tag>\n );\n};\n\nexport default DisconnectedIntegrationsRibbon;\n"],"names":["
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../app/javascript/src/components/DisconnectedIntegrationsRibbon/utils.js","../../app/javascript/src/components/DisconnectedIntegrationsRibbon/index.jsx"],"sourcesContent":["import { t } from \"i18next\";\n\nconst getHasOnlyUPIIntegration = alerts =>\n alerts.length === 1 && alerts[0].serviceName === \"eupi\";\n\nexport const getDisconnectionRibbonDefaultMessage = alerts =>\n getHasOnlyUPIIntegration(alerts)\n ? t(\"neetoIntegrations.disconnectionRibbon.non_permission_message\", {\n count: alerts.length,\n })\n : t(\"neetoIntegrations.disconnectionRibbon.message\", {\n count: alerts.length,\n });\n\nexport const getDisconnectionRibbonI18nKey = (alerts, integrationRouteMap) => {\n const hasOnlyUPIIntegration =\n getHasOnlyUPIIntegration(alerts) && integrationRouteMap.eupi;\n\n return hasOnlyUPIIntegration\n ? \"neetoIntegrations.disconnectionRibbon.non_permission_message\"\n : \"neetoIntegrations.disconnectionRibbon.message\";\n};\n","import { useState } from \"react\";\n\nimport { Tag } from \"neetoui\";\nimport { isEmpty } from \"ramda\";\nimport { Trans, useTranslation } from \"react-i18next\";\nimport { Link } from \"react-router-dom\";\n\nimport { useFetchDisconnectionAlerts } from \"hooks/reactQuery/useDisconnectionAlertsApi\";\n\nimport {\n getDisconnectionRibbonDefaultMessage,\n getDisconnectionRibbonI18nKey,\n} from \"./utils\";\n\nconst IntegrationLinks = ({ alerts, integrationRouteMap }) =>\n alerts.map((alert, index) => {\n const { label, path } = integrationRouteMap[alert.serviceName];\n const linkPath = alert.redirectPath || path;\n\n return (\n <span key={alert.id}>\n {index > 0 && \", \"}\n <Link className=\"font-semibold underline\" to={linkPath}>\n {label}\n </Link>\n </span>\n );\n });\n\nconst DisconnectedIntegrationsRibbon = ({ integrationRouteMap = {} }) => {\n const [isClosed, setIsClosed] = useState(false);\n\n useTranslation();\n\n const { data: { disconnectionAlerts: alerts = [] } = {} } =\n useFetchDisconnectionAlerts();\n\n const knownAlerts = alerts.filter(\n alert => integrationRouteMap[alert.serviceName]\n );\n\n if (isClosed || isEmpty(knownAlerts)) return null;\n\n const singleAlert = knownAlerts.length === 1 ? knownAlerts[0] : null;\n const connectPath = singleAlert\n ? singleAlert.redirectPath ||\n integrationRouteMap[singleAlert.serviceName].path\n : \"\";\n\n return (\n <Tag\n className=\"neeto-molecules-sticky-ribbon w-full p-2.5 text-center\"\n data-testid=\"disconnected-integrations-ribbon\"\n size=\"large\"\n style=\"warning\"\n onClose={() => setIsClosed(true)}\n >\n <span className=\"w-full\">\n <Trans\n count={knownAlerts.length}\n defaults={getDisconnectionRibbonDefaultMessage(knownAlerts)}\n components={{\n integrations: (\n <IntegrationLinks\n {...{ integrationRouteMap }}\n alerts={knownAlerts}\n />\n ),\n connectLink: (\n <Link className=\"font-semibold underline\" to={connectPath} />\n ),\n }}\n i18nKey={getDisconnectionRibbonI18nKey(\n knownAlerts,\n integrationRouteMap\n )}\n />\n </span>\n </Tag>\n );\n};\n\nexport default DisconnectedIntegrationsRibbon;\n"],"names":["t","_jsxs","_jsx","Link","useState","useTranslation","useFetchDisconnectionAlerts","isEmpty","Trans"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,IAAM,wBAAwB,GAAG,SAA3B,wBAAwB,CAAG,MAAM,EAAA;AAAA,EAAA,OACrC,MAAM,CAAC,MAAM,KAAK,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,KAAK,MAAM;AAAA,CAAA;AAElD,IAAM,oCAAoC,GAAG,SAAvC,oCAAoC,CAAG,MAAM,EAAA;EAAA,OACxD,wBAAwB,CAAC,MAAM,CAAC,GAC5BA,SAAC,CAAC,8DAA8D,EAAE;IAChE,KAAK,EAAE,MAAM,CAAC;AAChB,GAAC,CAAC,GACFA,SAAC,CAAC,+CAA+C,EAAE;IACjD,KAAK,EAAE,MA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;AAC1B,QAAA,QAAQ,EAAE,oCAAoC,CAAC,WAAW,CAAE;AAC5D,QAAA,UAAU,EAAE;UACV,YAAY,eACVN,eAAC,gBAAgB,EAAA;AACT,YAAA,mBAAmB,EAAnB,mBAAmB;AACzB,YAAA,MAAM,EAAE;AAAY,WACrB,CACF;UACD,WAAW,eACTA,eAACC,mBAAI,EAAA;AAAC,YAAA,SAAS,EAAC,yBAAyB;AAAC,YAAA,EAAE,EAAE;WAAc;SAE9D;AACF,QAAA,OAAO,EAAE,6BAA6B,CACpC,WAAW,EACX,mBACF;OACD;KACG;AAAC,GACJ,CAAC;AAEV;;;;;;;;;;;;;;;;;;"}
|
package/dist/cjs/v2/Connect.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _objectSpread = require('@babel/runtime/helpers/objectSpread2');
|
|
4
4
|
var neetoAtoms = require('@bigbinary/neeto-atoms');
|
|
5
5
|
var neetoCist = require('@bigbinary/neeto-cist');
|
|
6
6
|
var reactUtils = require('@bigbinary/neeto-commons-frontend/v2/react-utils');
|
|
7
7
|
var CardLayout = require('@bigbinary/neeto-molecules/v2/CardLayout');
|
|
8
8
|
var index = require('../../index-dxk7jTL7.js');
|
|
9
9
|
var reactI18next = require('react-i18next');
|
|
10
|
+
var utils = require('../../utils-jyxIYRHb.js');
|
|
10
11
|
var jsxRuntime = require('react/jsx-runtime');
|
|
12
|
+
require('@babel/runtime/helpers/objectWithoutProperties');
|
|
11
13
|
|
|
12
|
-
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; }
|
|
13
|
-
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; }
|
|
14
14
|
var Connect = reactUtils.withT(function (_ref) {
|
|
15
15
|
var t = _ref.t,
|
|
16
16
|
Icon = _ref.Icon,
|
|
@@ -30,49 +30,51 @@ var Connect = reactUtils.withT(function (_ref) {
|
|
|
30
30
|
onConnect = _ref$onConnect === void 0 ? neetoCist.noop : _ref$onConnect,
|
|
31
31
|
children = _ref.children,
|
|
32
32
|
secondaryButtonProps = _ref.secondaryButtonProps;
|
|
33
|
-
return
|
|
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
|
-
|
|
74
|
-
|
|
75
|
-
|
|
33
|
+
return (
|
|
34
|
+
/*#__PURE__*/
|
|
35
|
+
// v2 card system: the molecules feature card, like Manage, so connect and
|
|
36
|
+
// manage screens share one layout (logo tile, title, muted description,
|
|
37
|
+
// extra content and actions in the text column).
|
|
38
|
+
jsxRuntime.jsxs(CardLayout, {
|
|
39
|
+
description: description,
|
|
40
|
+
title: title,
|
|
41
|
+
variant: "feature",
|
|
42
|
+
actionBlock: /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
43
|
+
className: "flex w-full flex-wrap items-center gap-2",
|
|
44
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Button, _objectSpread({
|
|
45
|
+
label: t("neetoIntegrations.common.connect"),
|
|
46
|
+
onClick: onConnect
|
|
47
|
+
}, buttonProps)), secondaryButtonProps && /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Button, _objectSpread({
|
|
48
|
+
variant: "secondary"
|
|
49
|
+
}, secondaryButtonProps))]
|
|
50
|
+
}),
|
|
51
|
+
icon: Icon && /*#__PURE__*/jsxRuntime.jsx(utils.BrandLogo, {
|
|
52
|
+
icon: Icon,
|
|
53
|
+
size: utils.getBrandLogoSize({
|
|
54
|
+
integration: integration,
|
|
55
|
+
integrationName: integrationName
|
|
56
|
+
})
|
|
57
|
+
}),
|
|
58
|
+
children: [helpDocUrl && /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Typography, {
|
|
59
|
+
className: "text-muted-foreground text-sm leading-relaxed",
|
|
60
|
+
variant: "body2",
|
|
61
|
+
children: /*#__PURE__*/jsxRuntime.jsx(reactI18next.Trans, {
|
|
62
|
+
i18nKey: "neetoIntegrations.common.helpDocUrl",
|
|
63
|
+
components: {
|
|
64
|
+
helpLink: /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Button, {
|
|
65
|
+
href: helpDocUrl,
|
|
66
|
+
rel: "noopener noreferrer",
|
|
67
|
+
target: "_blank",
|
|
68
|
+
variant: "link"
|
|
69
|
+
})
|
|
70
|
+
},
|
|
71
|
+
values: {
|
|
72
|
+
integration: integrationName || neetoCist.humanize(integration)
|
|
73
|
+
}
|
|
74
|
+
})
|
|
75
|
+
}), children]
|
|
76
|
+
})
|
|
77
|
+
);
|
|
76
78
|
});
|
|
77
79
|
Connect.prototypes = {
|
|
78
80
|
Icon: index.PropTypes.node,
|
|
@@ -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":["withT","noop","_jsxs","_jsx","Button","BrandLogo","getBrandLogoSize","Typography","Trans","humanize","PropTypes"],"mappings":";;;;;;;;;;;;;AAUA,IAAM,OAAO,GAAGA,gBAAK,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,gBAAA,GAAA,IAAA,CAChB,WAAW;AAAX,IAAA,WAAW,iCAAG,EAAE,GAAA,gBAAA;AAAA,IAAA,oBAAA,GAAA,IAAA,CAChB,eAAe;AAAf,IAAA,eAAe,qCAAG,EAAE,GAAA,oBAAA;AAAA,IAAA,eAAA,GAAA,IAAA,CACpB,UAAU;AAAV,IAAA,UAAU,gCAAG,EAAE,GAAA,eAAA;AAAA,IAAA,gBAAA,GAAA,IAAA,CACf,WAAW;IAAX,WAAW,GAAA,gBAAA,KAAA,MAAA,GAAG,EAAE,GAAA,gBAAA;AAAA,IAAA,cAAA,GAAA,IAAA,CAChB,SAAS;AAAT,IAAA,SAAS,+BAAGC,cAAI,GAAA,cAAA;AAChB,IAAA,QAAQ,QAAR,QAAQ;AACR,IAAA,oBAAoB,QAApB,oBAAoB;AAAA,EAAA;AAAA;AAEpB;AACA;AACA;AACA,IAAAC,eAAA,CAAC,UAAU,EAAA;AACH,MAAA,WAAW,EAAX,WAAW;AAAE,MAAA,KAAK,EAAL,KAAK;AACxB,MAAA,OAAO,EAAC,SAAS;AACjB,MAAA,WAAW,eACTA,eAAA,CAAA,KAAA,EAAA;AAAK,QAAA,SAAS,EAAC,0CAA0C;AAAA,QAAA,QAAA,EAAA,cACvDC,eAACC,iBAAM,EAAA,aAAA,CAAA;AACL,UAAA,KAAK,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|
|
|
3
3
|
var i18next = require('i18next');
|
|
4
4
|
var neetoCist = require('@bigbinary/neeto-cist');
|
|
5
5
|
var reactUtils = require('@bigbinary/neeto-commons-frontend/v2/react-utils');
|
|
6
|
-
var useDailiesApi = require('../../useDailiesApi-
|
|
6
|
+
var useDailiesApi = require('../../useDailiesApi-BS8aif9t.js');
|
|
7
7
|
var v2_DailyForm = require('./DailyForm.js');
|
|
8
8
|
var _slicedToArray = require('@babel/runtime/helpers/slicedToArray');
|
|
9
9
|
var React = require('react');
|
|
@@ -14,7 +14,7 @@ var CopyToClipboardButton = require('@bigbinary/neeto-molecules/v2/CopyToClipboa
|
|
|
14
14
|
var reactI18next = require('react-i18next');
|
|
15
15
|
var v2_Manage = require('./Manage.js');
|
|
16
16
|
var jsxRuntime = require('react/jsx-runtime');
|
|
17
|
-
require('@babel/runtime/helpers/
|
|
17
|
+
require('@babel/runtime/helpers/objectSpread2');
|
|
18
18
|
require('@tanstack/react-query');
|
|
19
19
|
require('@bigbinary/neeto-commons-frontend/constants');
|
|
20
20
|
require('@bigbinary/neeto-commons-frontend/react-utils');
|
|
@@ -28,8 +28,9 @@ require('react-router-dom');
|
|
|
28
28
|
require('yup');
|
|
29
29
|
require('./WalkthroughModal.js');
|
|
30
30
|
require('@bigbinary/neeto-commons-frontend/v2/react-utils/withT');
|
|
31
|
-
require('
|
|
31
|
+
require('../../utils-jyxIYRHb.js');
|
|
32
32
|
require('@babel/runtime/helpers/objectWithoutProperties');
|
|
33
|
+
require('./DisconnectAlert.js');
|
|
33
34
|
|
|
34
35
|
var Manage = function Manage(_ref) {
|
|
35
36
|
var description = _ref.description,
|
|
@@ -77,6 +78,7 @@ var Manage = function Manage(_ref) {
|
|
|
77
78
|
connect: true
|
|
78
79
|
}),
|
|
79
80
|
integration: "daily",
|
|
81
|
+
integrationName: t("neetoIntegrations.daily.title"),
|
|
80
82
|
description: isConnected ? /*#__PURE__*/jsxRuntime.jsx(reactI18next.Trans, {
|
|
81
83
|
i18nKey: "neetoIntegrations.daily.yourApiKey",
|
|
82
84
|
values: {
|
package/dist/cjs/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":["useState","useFetchDaily","useTranslation","useDestroyDaily","isPresent","_jsx","Spinner","ManageIntegrations","buildUrl","Trans","noop","useQueryParams","Form","withTitle"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAaA,IAAM,MAAM,GAAG,SAAT,MAAM,CAAA,IAAA,EAAsC;EAAA,IAAhC,WAAW,QAAX,WAAW;AAAE,IAAA,YAAY,QAAZ,YAAY;EACzC,IAAA,SAAA,GAA0DA,cAAQ,CAAC,KAAK,CAAC;AAAA,IAAA,UAAA,GAAA,cAAA,CAAA,SAAA,EAAA,CAAA,CAAA;IAAlE,qBAAqB,GAAA,UAAA,CAAA,CAAA,CAAA;IAAE,wBAAwB,GAAA,UAAA,CAAA,CAAA,CAAA;EAEtD,IAAA,cAAA,GAAqDC,2BAAa,EAAE;AAAA,IAAA,mBAAA,GAAA,cAAA,CAA5D,IAAI;AAAA,IAAA,oBAAA,GAAA,mBAAA,KAAA,MAAA,GAAsB,EAAE,GAAA,mBAAA;AAAA,IAAA,qBAAA,GAAA,oBAAA,CAApB,QAAQ;IAAR,QAAQ,GAAA,qBAAA,KAAA,MAAA,GAAG,EAAE,GAAA,qBAAA;AAAS,IAAA,UAAU,kBAAV,UAAU;EAChD,IAAA,KAAA,GAA0B,QAAQ,IAAI,EAAE;AAAA,IAAA,YAAA,GAAA,KAAA,CAAhC,MAAM;AAAN,IAAA,MAAM,6BAAG,IAAI,GAAA,YAAA;E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EAAE;AAA5B,IAAA,OAAO,mBAAP,OAAO;EAEf,IAAA,cAAA,GAAyCV,2BAAa,EAAE;AAAA,IAAA,mBAAA,GAAA,cAAA,CAAhD,IAAI;AAAA,IAAA,oBAAA,GAAA,mBAAA,KAAA,MAAA,GAAsB,EAAE,GAAA,mBAAA;AAAA,IAAA,qBAAA,GAAA,oBAAA,CAApB,QAAQ;IAAR,QAAQ,GAAA,qBAAA,KAAA,MAAA,GAAG,EAAE,GAAA,qBAAA;EAC7B,IAAA,KAAA,GAA0B,QAAQ,IAAI,EAAE;AAAA,IAAA,YAAA,GAAA,KAAA,CAAhC,MAAM;AAAN,IAAA,MAAM,6BAAG,IAAI,GAAA,YAAA;EAErB,IAAKG,mBAAS,CAAC,MAAM,CAAC,IAAI,CAAC,YAAY,IAAK,CAAC,OAAO,EAAE;AACpD,IAAA,oBAAOC,eAAC,MAAM,EAAA;AAAO,MAAA,WAAW,EAAX,WAAW;AAAE,MAAA,YAAY,EAAZ;AAAY,KAAK,CAAC;AACtD,EAAA;AAEA,EAAA,oBAAOA,eAACO,YAAI,EAAA;AAAO,IAAA,UAAU,EAAV,UAAU;AAAE,IAAA,SAAS,EAAT,SAAS;AAAE,IAAA,QAAQ,EAAR;AAAQ,GAAK,CAAC;AAC1D,CAAC;AAED,YAAeC,oBAAS,CACtB,KAAK,EACL,OAAO,CAAC,CAAC,CAAC,sDAAsD,CAClE,CAAC;;;;"}
|
package/dist/cjs/v2/DailyForm.js
CHANGED
|
@@ -11,11 +11,11 @@ var Container = require('@bigbinary/neeto-molecules/v2/Container');
|
|
|
11
11
|
var Header = require('@bigbinary/neeto-molecules/v2/Header');
|
|
12
12
|
var reactI18next = require('react-i18next');
|
|
13
13
|
var reactRouterDom = require('react-router-dom');
|
|
14
|
-
var useDailiesApi = require('../../useDailiesApi-
|
|
14
|
+
var useDailiesApi = require('../../useDailiesApi-BS8aif9t.js');
|
|
15
15
|
var yup = require('yup');
|
|
16
16
|
var v2_WalkthroughModal = require('./WalkthroughModal.js');
|
|
17
17
|
var jsxRuntime = require('react/jsx-runtime');
|
|
18
|
-
require('@babel/runtime/helpers/
|
|
18
|
+
require('@babel/runtime/helpers/objectSpread2');
|
|
19
19
|
require('@tanstack/react-query');
|
|
20
20
|
require('@bigbinary/neeto-commons-frontend/constants');
|
|
21
21
|
require('@bigbinary/neeto-commons-frontend/react-utils');
|
|
@@ -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":["yup","t","Form","useTranslation","useHistory","useState","useCreateDaily","_jsx","Spinner","_jsxs","Typography","Trans","Button","FormikForm","ActionBlock","Input","WalkthroughModal","withTitle"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGO,IAAM,mCAAmC,GAAG;AAAE,EAAA,MAAM,EAAE;AAAG,CAAC;AAE1D,IAAM,0BAA0B,GAAGA,cAAG,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC;AAC3D,EAAA,MAAM,EAAEA,cAAG,CACR,MAAM,EAAE,CACR,IAAI,EAAE,CACN,QAAQ,CACPC,SAAC,CAAC,mCAAmC,EAAE;IACrC,MAAM,EAAEA,SAAC,CAAC,gCAAgC;AAC5C,GAAC,CACH;AACJ,CAAC,CAAC;;ACOF,IAAMC,MAAI,GAAG,SAAP,IAAI,CAAA,IAAA,EAAyD;EAAA,IAAnD,UAAU,QAAV,UAAU;AAAE,IAAA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A,IAAI,EAAC;WACN;SACS;OACF,CAAC,eACbR,cAAA,CAACS,mBAAgB,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,WAAeC,oBAAS,CACtBf,MAAI,EACJ,OAAO,CAAC,CAAC,CAAC,sDAAsD,CAClE,CAAC;;;;"}
|
package/dist/cjs/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":["isEmpty","noop","useTranslation","_jsx","_jsxs","Button","PropTypes"],"mappings":";;;;;;;;;;AAEO,IAAM,aAAa,GAAG,SAAhB,aAAa,CAAG,QAAQ,EAAI;EACvC,IAAM,YAAY,GAAG,mDAAmD;AAExE,EAAA,OAAO,YAAY,CAAC,IAAI,CAAC,QAAQ,CAAC;AACpC,CAAC;AAEM,IAAM,UAAU,GAAG,SAAb,UAAU,CAAI,IAAI,EAAE,mBAAmB,EAAA;AAAA,EAAA,OAClDA,aAAO,CAAC,IAAI,CAAC,GAAG,mBAAmB,GAAG,IAAI;AAAA,CAAA;;ACD5C,IAAM,IAAI,GAAG,SAAP,IAAI,CAAA,IAAA,EAOJ;AAAA,EAAA,IAAA,UAAA,GAAA,IAAA,CANJ,KAAK;AAAL,IAAA,KAAK,2BAAG,EAAE,GAAA,UAAA;AAAA,IAAA,aAAA,GAAA,IAAA,CACV,QAAQ;AAAR,IAAA,QAAQ,8BAAG,EAAE,GAAA,aAAA;AAAA,IAAA,gBAAA,GAAA,IAAA,CACb,WAAW;AAAX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AY,uCAAuC;AACnD,MAAA,KAAK,EAAE,CAAC,CAAC,iCAAiC,CAAE;AAC5C,MAAA,OAAO,EAAE;AAAQ,KAClB,CACF;IAAA,QAAA,EAAA,CAEA,QAAQ,EACR,QAAQ,iBAAIF,cAAA,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,EAAEG,eAAS,CAAC,IAAI;EACvB,QAAQ,EAAEA,eAAS,CAAC,MAAM;EAC1B,KAAK,EAAEA,eAAS,CAAC,MAAM;EACvB,QAAQ,EAAEA,eAAS,CAAC,MAAM;EAC1B,WAAW,EAAEA,eAAS,CAAC;AACzB,CAAC;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _objectSpread = require('@babel/runtime/helpers/objectSpread2');
|
|
4
4
|
var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
|
|
5
5
|
var neetoAtoms = require('@bigbinary/neeto-atoms');
|
|
6
6
|
var neetoCist = require('@bigbinary/neeto-cist');
|
|
@@ -8,8 +8,6 @@ var withT = require('@bigbinary/neeto-commons-frontend/v2/react-utils/withT');
|
|
|
8
8
|
var jsxRuntime = require('react/jsx-runtime');
|
|
9
9
|
|
|
10
10
|
var _excluded = ["t", "isOpen", "isDisconnecting", "title", "message", "onClose", "onDisconnect"];
|
|
11
|
-
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; }
|
|
12
|
-
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; }
|
|
13
11
|
var DisconnectAlert = withT(function (_ref) {
|
|
14
12
|
var t = _ref.t,
|
|
15
13
|
_ref$isOpen = _ref.isOpen,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DisconnectAlert.js","sources":["../../../app/javascript/src/v2/components/DisconnectAlert/index.jsx"],"sourcesContent":["import { Alert } from \"@bigbinary/neeto-atoms\";\nimport { noop } from \"neetocist\";\nimport withT from \"neetocommons/v2/react-utils/withT\";\n\nconst DisconnectAlert = withT(\n ({\n t,\n isOpen = false,\n isDisconnecting = false,\n title = \"\",\n message = \"\",\n onClose = noop,\n onDisconnect = noop,\n ...otherProps\n }) => (\n <Alert\n {...{ isOpen, message, onClose, title }}\n isSubmitting={isDisconnecting}\n submitButtonLabel={t(\"neetoIntegrations.common.disconnect\")}\n onSubmit={onDisconnect}\n {...otherProps}\n />\n )\n);\n\nexport default DisconnectAlert;\n"],"names":["
|
|
1
|
+
{"version":3,"file":"DisconnectAlert.js","sources":["../../../app/javascript/src/v2/components/DisconnectAlert/index.jsx"],"sourcesContent":["import { Alert } from \"@bigbinary/neeto-atoms\";\nimport { noop } from \"neetocist\";\nimport withT from \"neetocommons/v2/react-utils/withT\";\n\nconst DisconnectAlert = withT(\n ({\n t,\n isOpen = false,\n isDisconnecting = false,\n title = \"\",\n message = \"\",\n onClose = noop,\n onDisconnect = noop,\n ...otherProps\n }) => (\n <Alert\n {...{ isOpen, message, onClose, title }}\n isSubmitting={isDisconnecting}\n submitButtonLabel={t(\"neetoIntegrations.common.disconnect\")}\n onSubmit={onDisconnect}\n {...otherProps}\n />\n )\n);\n\nexport default DisconnectAlert;\n"],"names":["noop","_jsx","Alert"],"mappings":";;;;;;;;;;AAIA,IAAM,eAAe,GAAG,KAAK,CAC3B,UAAA,IAAA,EAAA;EAAA,IACE,CAAC,QAAD,CAAC;AAAA,IAAA,WAAA,GAAA,IAAA,CACD,MAAM;AAAN,IAAA,MAAM,4BAAG,KAAK,GAAA,WAAA;AAAA,IAAA,oBAAA,GAAA,IAAA,CACd,eAAe;AAAf,IAAA,eAAe,qCAAG,KAAK,GAAA,oBAAA;AAAA,IAAA,UAAA,GAAA,IAAA,CACvB,KAAK;AAAL,IAAA,KAAK,2BAAG,EAAE,GAAA,UAAA;AAAA,IAAA,YAAA,GAAA,IAAA,CACV,OAAO;AAAP,IAAA,OAAO,6BAAG,EAAE,GAAA,YAAA;AAAA,IAAA,YAAA,GAAA,IAAA,CACZ,OAAO;AAAP,IAAA,OAAO,6BAAGA,cAAI,GAAA,YAAA;AAAA,IAAA,iBAAA,GAAA,IAAA,CACd,YAAY;AAAZ,IAAA,YAAY,kCAAGA,cAAI,GAAA,iBAAA;IAChB,UAAU,GAAA,wBAAA,CAAA,IAAA,EAAA,SAAA,CAAA;AAAA,EAAA,oBAEbC,eAACC,gBAAK,EAAA,aAAA,CAAA;AACE,IAAA,MAAM,EAAN,MAAM;AAAE,IAAA,OAAO,EAAP,OAAO;AAAE,IAAA,OAAO,EAAP,OAAO;AAAE,IAAA,KAAK,EAAL,KAAK;AACrC,IAAA,YAAY,EAAE,eAAgB;AAC9B,IAAA,iBAAiB,EAAE,CAAC,CAAC,qCAAqC,CAAE;AAC5D,IAAA,QAAQ,EAAE;GAAa,EACnB,UAAU,CACf,CAAC;AAAA,CAEN;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _objectSpread = require('@babel/runtime/helpers/objectSpread2');
|
|
4
4
|
var _slicedToArray = require('@babel/runtime/helpers/slicedToArray');
|
|
5
5
|
var React = require('react');
|
|
6
6
|
var StickyRibbon = require('@bigbinary/neeto-molecules/v2/StickyRibbon');
|
|
@@ -31,8 +31,6 @@ var getDisconnectionRibbonMessage = function getDisconnectionRibbonMessage(alert
|
|
|
31
31
|
};
|
|
32
32
|
};
|
|
33
33
|
|
|
34
|
-
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; }
|
|
35
|
-
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; }
|
|
36
34
|
var IntegrationLinks = function IntegrationLinks(_ref) {
|
|
37
35
|
var alerts = _ref.alerts,
|
|
38
36
|
integrationRouteMap = _ref.integrationRouteMap;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DisconnectedIntegrationsRibbon.js","sources":["../../../app/javascript/src/v2/components/DisconnectedIntegrationsRibbon/utils.js","../../../app/javascript/src/v2/components/DisconnectedIntegrationsRibbon/index.jsx"],"sourcesContent":["const getHasOnlyUPIIntegration = alerts =>\n alerts.length === 1 && alerts[0].serviceName === \"eupi\";\n\nexport const getDisconnectionRibbonMessage = alerts => {\n if (getHasOnlyUPIIntegration(alerts)) {\n return {\n i18nKey: \"neetoIntegrations.disconnectionRibbon.non_permission_message\",\n defaults:\n \"Your <integrations /> integration has been disconnected. <connectLink>Connect it now</connectLink>.\",\n };\n }\n\n return {\n i18nKey: \"neetoIntegrations.disconnectionRibbon.message\",\n defaults:\n alerts.length === 1\n ? \"Your <integrations /> integration has been disconnected due to a permission issue. <connectLink>Connect it now</connectLink>.\"\n : \"Your <integrations /> integrations have been disconnected due to a permission issue.\",\n };\n};\n","import { useState } from \"react\";\n\nimport StickyRibbon from \"neetomolecules/v2/StickyRibbon\";\nimport { isEmpty } from \"ramda\";\nimport { Trans, useTranslation } from \"react-i18next\";\nimport { Link } from \"react-router-dom\";\n\nimport { useFetchDisconnectionAlerts } from \"hooks/reactQuery/useDisconnectionAlertsApi\";\n\nimport { getDisconnectionRibbonMessage } from \"./utils\";\n\nconst IntegrationLinks = ({ alerts, integrationRouteMap }) =>\n alerts.map((alert, index) => {\n const { label, path } = integrationRouteMap[alert.serviceName];\n const linkPath = alert.redirectPath || path;\n\n return (\n <span key={alert.id}>\n {index > 0 && \", \"}\n <Link to={linkPath}>{label}</Link>\n </span>\n );\n });\n\nconst DisconnectedIntegrationsRibbon = ({ integrationRouteMap = {} }) => {\n const [isClosed, setIsClosed] = useState(false);\n\n useTranslation();\n\n const { data: { disconnectionAlerts: alerts = [] } = {} } =\n useFetchDisconnectionAlerts();\n\n const knownAlerts = alerts.filter(\n alert => integrationRouteMap[alert.serviceName]\n );\n\n if (isClosed || isEmpty(knownAlerts)) return null;\n\n const singleAlert = knownAlerts.length === 1 ? knownAlerts[0] : null;\n const connectPath = singleAlert\n ? singleAlert.redirectPath ||\n integrationRouteMap[singleAlert.serviceName].path\n : \"\";\n\n return (\n <StickyRibbon\n data-testid=\"disconnected-integrations-ribbon\"\n kind=\"warning\"\n onDismiss={() => setIsClosed(true)}\n >\n <Trans\n {...getDisconnectionRibbonMessage(knownAlerts)}\n count={knownAlerts.length}\n components={{\n integrations: (\n <IntegrationLinks\n {...{ integrationRouteMap }}\n alerts={knownAlerts}\n />\n ),\n connectLink: <Link to={connectPath} />,\n }}\n />\n </StickyRibbon>\n );\n};\n\nexport default DisconnectedIntegrationsRibbon;\n"],"names":["
|
|
1
|
+
{"version":3,"file":"DisconnectedIntegrationsRibbon.js","sources":["../../../app/javascript/src/v2/components/DisconnectedIntegrationsRibbon/utils.js","../../../app/javascript/src/v2/components/DisconnectedIntegrationsRibbon/index.jsx"],"sourcesContent":["const getHasOnlyUPIIntegration = alerts =>\n alerts.length === 1 && alerts[0].serviceName === \"eupi\";\n\nexport const getDisconnectionRibbonMessage = alerts => {\n if (getHasOnlyUPIIntegration(alerts)) {\n return {\n i18nKey: \"neetoIntegrations.disconnectionRibbon.non_permission_message\",\n defaults:\n \"Your <integrations /> integration has been disconnected. <connectLink>Connect it now</connectLink>.\",\n };\n }\n\n return {\n i18nKey: \"neetoIntegrations.disconnectionRibbon.message\",\n defaults:\n alerts.length === 1\n ? \"Your <integrations /> integration has been disconnected due to a permission issue. <connectLink>Connect it now</connectLink>.\"\n : \"Your <integrations /> integrations have been disconnected due to a permission issue.\",\n };\n};\n","import { useState } from \"react\";\n\nimport StickyRibbon from \"neetomolecules/v2/StickyRibbon\";\nimport { isEmpty } from \"ramda\";\nimport { Trans, useTranslation } from \"react-i18next\";\nimport { Link } from \"react-router-dom\";\n\nimport { useFetchDisconnectionAlerts } from \"hooks/reactQuery/useDisconnectionAlertsApi\";\n\nimport { getDisconnectionRibbonMessage } from \"./utils\";\n\nconst IntegrationLinks = ({ alerts, integrationRouteMap }) =>\n alerts.map((alert, index) => {\n const { label, path } = integrationRouteMap[alert.serviceName];\n const linkPath = alert.redirectPath || path;\n\n return (\n <span key={alert.id}>\n {index > 0 && \", \"}\n <Link to={linkPath}>{label}</Link>\n </span>\n );\n });\n\nconst DisconnectedIntegrationsRibbon = ({ integrationRouteMap = {} }) => {\n const [isClosed, setIsClosed] = useState(false);\n\n useTranslation();\n\n const { data: { disconnectionAlerts: alerts = [] } = {} } =\n useFetchDisconnectionAlerts();\n\n const knownAlerts = alerts.filter(\n alert => integrationRouteMap[alert.serviceName]\n );\n\n if (isClosed || isEmpty(knownAlerts)) return null;\n\n const singleAlert = knownAlerts.length === 1 ? knownAlerts[0] : null;\n const connectPath = singleAlert\n ? singleAlert.redirectPath ||\n integrationRouteMap[singleAlert.serviceName].path\n : \"\";\n\n return (\n <StickyRibbon\n data-testid=\"disconnected-integrations-ribbon\"\n kind=\"warning\"\n onDismiss={() => setIsClosed(true)}\n >\n <Trans\n {...getDisconnectionRibbonMessage(knownAlerts)}\n count={knownAlerts.length}\n components={{\n integrations: (\n <IntegrationLinks\n {...{ integrationRouteMap }}\n alerts={knownAlerts}\n />\n ),\n connectLink: <Link to={connectPath} />,\n }}\n />\n </StickyRibbon>\n );\n};\n\nexport default DisconnectedIntegrationsRibbon;\n"],"names":["_jsxs","_jsx","Link","useState","useTranslation","useFetchDisconnectionAlerts","isEmpty","Trans"],"mappings":";;;;;;;;;;;;;;;;;AAAA,IAAM,wBAAwB,GAAG,SAA3B,wBAAwB,CAAG,MAAM,EAAA;AAAA,EAAA,OACrC,MAAM,CAAC,MAAM,KAAK,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,KAAK,MAAM;AAAA,CAAA;AAElD,IAAM,6BAA6B,GAAG,SAAhC,6BAA6B,CAAG,MAAM,EAAI;AACrD,EAAA,IAAI,wBAAwB,CAAC,MAAM,CAAC,EAAE;IACpC,OAAO;AACL,MAAA,OAAO,EAAE,8DAA8D;AACvE,MAAA,QAAQ,EACN;KACH;AACH,EAAA;EAEA,OAAO;AACL,IAAA,OAAO,EAAE,+CAA+C;IACxD,QAAQ,EACN,MAAM,CAAC,MAAM,KAAK,CAAC,GACf,+HAA+H,GAC/H;GACP;AACH,CAAC;;ACRD,IAAM,gBAAgB,GAAG,SAAnB,gBAAgB,CAAA,IAAA,EAAA;EAAA,IAAM,MAAM,QAAN,MAAM;AAAE,IAAA,mBAAmB,QAAnB,mBAAmB;EAAA,OACrD,MAAM,CAAC,GAAG,CAAC,UAAC,KAAK,EAAE,KAAK,EAAK;AAC3B,IAAA,IAAA,qBAAA,GAAwB,mBAAmB,CAAC,KAAK,CAAC,WAAW,CAAC;AAAtD,MAAA,KAAK,yBAAL,KAAK;AAAE,MAAA,IAAI,yBAAJ,IAAI;AACnB,IAAA,IAAM,QAAQ,GAAG,KAAK,CAAC,YAAY,IAAI,IA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CAAC,GAAG,IAAI;AACpE,EAAA,IAAM,WAAW,GAAG,WAAW,GAC3B,WAAW,CAAC,YAAY,IACxB,mBAAmB,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC,IAAI,GACjD,EAAE;AAEN,EAAA,oBACEL,eAAC,YAAY,EAAA;AACX,IAAA,aAAA,EAAY,kCAAkC;AAC9C,IAAA,IAAI,EAAC,SAAS;IACd,SAAS,EAAE,SAAX,SAAS,GAAA;MAAA,OAAQ,WAAW,CAAC,IAAI,CAAC;IAAA,CAAC;AAAA,IAAA,QAAA,eAEnCA,eAACM,kBAAK,EAAA,aAAA,CAAA,aAAA,CAAA,EAAA,EACA,6BAA6B,CAAC,WAAW,CAAC,CAAA,EAAA,EAAA,EAAA;MAC9C,KAAK,EAAE,WAAW,CAAC,MAAO;AAC1B,MAAA,UAAU,EAAE;QACV,YAAY,eACVN,eAAC,gBAAgB,EAAA;AACT,UAAA,mBAAmB,EAAnB,mBAAmB;AACzB,UAAA,MAAM,EAAE;AAAY,SACrB,CACF;QACD,WAAW,eAAEA,eAACC,mBAAI,EAAA;AAAC,UAAA,EAAE,EAAE;SAAc;AACvC;KAAE,CACH;AAAC,GACU,CAAC;AAEnB;;;;"}
|
package/dist/cjs/v2/Finish.js
CHANGED
|
@@ -1,17 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _objectSpread = require('@babel/runtime/helpers/objectSpread2');
|
|
4
4
|
var neetoAtoms = require('@bigbinary/neeto-atoms');
|
|
5
5
|
var neetoCist = require('@bigbinary/neeto-cist');
|
|
6
6
|
var reactUtils = require('@bigbinary/neeto-commons-frontend/v2/react-utils');
|
|
7
7
|
var CardLayout = require('@bigbinary/neeto-molecules/v2/CardLayout');
|
|
8
8
|
var index = require('../../index-dxk7jTL7.js');
|
|
9
|
-
var success = require('../../success-CsNvTPBG.js');
|
|
10
9
|
var jsxRuntime = require('react/jsx-runtime');
|
|
11
|
-
require('react');
|
|
12
10
|
|
|
13
|
-
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; }
|
|
14
|
-
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; }
|
|
15
11
|
var Finish = reactUtils.withT(function (_ref) {
|
|
16
12
|
var t = _ref.t,
|
|
17
13
|
_ref$onClick = _ref.onClick,
|
|
@@ -33,7 +29,9 @@ var Finish = reactUtils.withT(function (_ref) {
|
|
|
33
29
|
variant: "secondary"
|
|
34
30
|
}, secondaryButtonProps))]
|
|
35
31
|
}),
|
|
36
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(
|
|
32
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Illustration, {
|
|
33
|
+
name: "success"
|
|
34
|
+
}), /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Typography, {
|
|
37
35
|
className: "mb-6 mt-4",
|
|
38
36
|
variant: "h4",
|
|
39
37
|
weight: "semibold",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Finish.js","sources":["../../../app/javascript/src/v2/components/Steps/Finish.jsx"],"sourcesContent":["import { Typography, Button } from \"@bigbinary/neeto-atoms\";\nimport { isNotEmpty, noop } from \"neetocist\";\nimport { withT } from \"neetocommons/v2/react-utils\";\nimport CardLayout from \"neetomolecules/v2/CardLayout\";\nimport PropTypes from \"prop-types\";\n\
|
|
1
|
+
{"version":3,"file":"Finish.js","sources":["../../../app/javascript/src/v2/components/Steps/Finish.jsx"],"sourcesContent":["import { Typography, Button, Illustration } from \"@bigbinary/neeto-atoms\";\nimport { isNotEmpty, noop } from \"neetocist\";\nimport { withT } from \"neetocommons/v2/react-utils\";\nimport CardLayout from \"neetomolecules/v2/CardLayout\";\nimport PropTypes from \"prop-types\";\n\nconst Finish = withT(\n ({\n t,\n onClick = noop,\n title = \"\",\n buttonProps = {},\n secondaryButtonProps = {},\n children,\n }) => (\n <CardLayout\n actionBlock={\n <div className=\"flex w-full flex-wrap items-center gap-2\">\n <Button\n {...{ onClick }}\n label={t(\"neetoIntegrations.common.continue\")}\n {...buttonProps}\n />\n {isNotEmpty(secondaryButtonProps) && (\n <Button variant=\"secondary\" {...secondaryButtonProps} />\n )}\n </div>\n }\n >\n <Illustration name=\"success\" />\n <Typography className=\"mb-6 mt-4\" variant=\"h4\" weight=\"semibold\">\n {title}\n </Typography>\n {children}\n </CardLayout>\n )\n);\n\nFinish.prototypes = {\n onClick: PropTypes.func,\n title: PropTypes.string,\n buttonProps: PropTypes.object,\n secondaryButtonProps: PropTypes.object,\n};\n\nexport default Finish;\n"],"names":["withT","noop","_jsxs","_jsx","Button","isNotEmpty","Illustration","Typography","PropTypes"],"mappings":";;;;;;;;;;AAMA,IAAM,MAAM,GAAGA,gBAAK,CAClB,UAAA,IAAA,EAAA;EAAA,IACE,CAAC,QAAD,CAAC;AAAA,IAAA,YAAA,GAAA,IAAA,CACD,OAAO;AAAP,IAAA,OAAO,6BAAGC,cAAI,GAAA,YAAA;AAAA,IAAA,UAAA,GAAA,IAAA,CACd,KAAK;AAAL,IAAA,KAAK,2BAAG,EAAE,GAAA,UAAA;AAAA,IAAA,gBAAA,GAAA,IAAA,CACV,WAAW;IAAX,WAAW,GAAA,gBAAA,KAAA,MAAA,GAAG,EAAE,GAAA,gBAAA;AAAA,IAAA,qBAAA,GAAA,IAAA,CAChB,oBAAoB;IAApB,oBAAoB,GAAA,qBAAA,KAAA,MAAA,GAAG,EAAE,GAAA,qBAAA;AACzB,IAAA,QAAQ,QAAR,QAAQ;AAAA,EAAA,oBAERC,gBAAC,UAAU,EAAA;AACT,IAAA,WAAW,eACTA,eAAA,CAAA,KAAA,EAAA;AAAK,MAAA,SAAS,EAAC,0CAA0C;AAAA,MAAA,QAAA,EAAA,cACvDC,eAACC,iBAAM,EAAA,aAAA,CAAA;AACC,QAAA,OAAO,EAAP,OAAO;QACb,KAAK,EAAE,CAAC,CAAC,mCAAmC;OAAE,EAC1C,WAAW,CAChB,CAAC,EACDC,oBAAU,CAAC,oBAAoB,CAAC,iBAC/BF,cAAA,CAACC,iBAAM,EAAA,aAAA,CAAA;AAAC,QAAA,OAAO,EAAC;OAAW,EAAK,oBAAoB,CAAG,CACxD;AAAA,KACE,CACN;AAAA,IAAA,QAAA,EAAA,cAEDD,eAACG,uBAAY,EAAA;AAAC,MAAA,IAAI,EAAC;KAAW,CAAC,eAC/BH,cAAA,CAACI,qBAAU,EAAA;AAAC,MAAA,SAAS,EAAC,WAAW;AAAC,MAAA,OAAO,EAAC,IAAI;AAAC,MAAA,MAAM,EAAC,UAAU;MAAA,QAAA,EAC7D;KACS,CAAC,EACZ,QAAQ;AAAA,GACC,CAAC;AAAA,CAEjB;AAEA,MAAM,CAAC,UAAU,GAAG;EAClB,OAAO,EAAEC,eAAS,CAAC,IAAI;EACvB,KAAK,EAAEA,eAAS,CAAC,MAAM;EACvB,WAAW,EAAEA,eAAS,CAAC,MAAM;EAC7B,oBAAoB,EAAEA,eAAS,CAAC;AAClC,CAAC;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _objectSpread = require('@babel/runtime/helpers/objectSpread2');
|
|
4
4
|
var _toConsumableArray = require('@babel/runtime/helpers/toConsumableArray');
|
|
5
5
|
var _slicedToArray = require('@babel/runtime/helpers/slicedToArray');
|
|
6
6
|
var React = require('react');
|
|
@@ -18,7 +18,6 @@ require('classnames');
|
|
|
18
18
|
require('@bigbinary/neeto-commons-frontend/v2/react-utils');
|
|
19
19
|
require('@bigbinary/neeto-molecules/v2/CardLayout');
|
|
20
20
|
require('../../index-dxk7jTL7.js');
|
|
21
|
-
require('../../success-CsNvTPBG.js');
|
|
22
21
|
|
|
23
22
|
var INTEGRATION_STEPS = [{
|
|
24
23
|
step: "1",
|
|
@@ -36,8 +35,6 @@ var STEPS = {
|
|
|
36
35
|
finish: i18next.t("neetoIntegrations.common.finish")
|
|
37
36
|
};
|
|
38
37
|
|
|
39
|
-
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; }
|
|
40
|
-
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; }
|
|
41
38
|
var GoogleCalendar = function GoogleCalendar(_ref) {
|
|
42
39
|
var permissionImage = _ref.permissionImage,
|
|
43
40
|
fetchAuthorizationUrl = _ref.fetchAuthorizationUrl,
|