@bigbinary/neeto-integrations-frontend 4.0.15 → 4.0.17
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/dist/Daily.js +2 -1
- package/dist/Daily.js.map +1 -1
- package/dist/DailyForm.js +1 -1
- package/dist/Demo.js +1 -1
- package/dist/Demo.js.map +1 -1
- package/dist/{Form-DlSv5McM.js → Form-Dt4OkRZe.js} +2 -2
- package/dist/Form-Dt4OkRZe.js.map +1 -0
- package/dist/{Form-DKAK6ylB.js → Form-FUvpblX2.js} +2 -2
- package/dist/Form-FUvpblX2.js.map +1 -0
- package/dist/Manage.js +10 -6
- package/dist/Manage.js.map +1 -1
- package/dist/ZapierForm.js +1 -1
- package/dist/ZapierForm.js.map +1 -1
- package/dist/Zoom.js +1 -0
- package/dist/Zoom.js.map +1 -1
- package/dist/cjs/Daily.js +2 -1
- package/dist/cjs/Daily.js.map +1 -1
- package/dist/cjs/DailyForm.js +1 -1
- package/dist/cjs/Demo.js +1 -1
- package/dist/cjs/Demo.js.map +1 -1
- package/dist/cjs/Manage.js +9 -5
- package/dist/cjs/Manage.js.map +1 -1
- package/dist/cjs/ZapierForm.js +1 -1
- package/dist/cjs/ZapierForm.js.map +1 -1
- package/dist/cjs/Zoom.js +1 -0
- package/dist/cjs/Zoom.js.map +1 -1
- package/dist/cjs/index.js +2 -2
- package/dist/index.js +2 -2
- package/package.json +7 -7
- package/types.d.ts +2 -1
- package/dist/Form-DKAK6ylB.js.map +0 -1
- package/dist/Form-DlSv5McM.js.map +0 -1
package/dist/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/react-utils';
|
|
4
|
-
import { u as useFetchDaily, a as useDestroyDaily, F as Form } from './Form-
|
|
4
|
+
import { u as useFetchDaily, a as useDestroyDaily, F as Form } from './Form-FUvpblX2.js';
|
|
5
5
|
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
6
6
|
import { useState } from 'react';
|
|
7
7
|
import { buildUrl } from '@bigbinary/neeto-commons-frontend/utils';
|
|
@@ -30,6 +30,7 @@ import 'axios';
|
|
|
30
30
|
import './query-DWavsm0z.js';
|
|
31
31
|
import 'yup';
|
|
32
32
|
import '@bigbinary/neeto-icons/Check';
|
|
33
|
+
import '@bigbinary/neetoui/Callout';
|
|
33
34
|
import '@bigbinary/neetoui/Tooltip';
|
|
34
35
|
import './DisconnectAlert.js';
|
|
35
36
|
import '@babel/runtime/helpers/objectWithoutProperties';
|
package/dist/Daily.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Daily.js","sources":["../app/javascript/src/components/Integrations/Daily/Manage.jsx","../app/javascript/src/components/Integrations/Daily/index.jsx"],"sourcesContent":["import { useState } from \"react\";\n\nimport { isPresent } from \"neetocist\";\nimport { buildUrl } from \"neetocommons/utils\";\nimport { Daily as DailyIcon } from \"neetoicons/misc\";\nimport CopyToClipboardButton from \"neetomolecules/CopyToClipboardButton\";\nimport { Spinner } from \"neetoui\";\nimport { Trans, useTranslation } from \"react-i18next\";\n\nimport ManageIntegrations from \"components/commons/Manage\";\nimport { useDestroyDaily, useFetchDaily } from \"hooks/reactQuery/useDailiesApi\";\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=\"neeto-ui-rounded-md mt-2 flex items-center justify-between gap-x-3 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/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":["Manage","_ref","description","onDisconnect","_useState","useState","_useState2","_slicedToArray","isDisconnectAlertOpen","setIsDisconnectAlertOpen","_useFetchDaily","useFetchDaily","_useFetchDaily$data","data","_useFetchDaily$data2","_useFetchDaily$data2$","metadata","isFetching","_ref2","_ref2$apiKey","apiKey","_useTranslation","useTranslation","t","_useDestroyDaily","useDestroyDaily","onSuccess","destroyIntegration","mutate","isDisconnecting","isPending","isConnected","isPresent","handleDisconnect","_jsx","className","children","Spinner","ManageIntegrations","Icon","DailyIcon","connectPath","buildUrl","window","location","pathname","connect","integration","Trans","i18nKey","values","components","wrapper","span","copy","CopyToClipboardButton","style","value","title","onClose","Daily","_ref$isOnboarding","isOnboarding","_ref$helpDocUrl","helpDocUrl","_ref$videoUrl","videoUrl","_ref$description","_ref$onConnect","onConnect","noop","_ref$onDisconnect","_useQueryParams","useQueryParams","Form","withTitle","i18next"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Daily.js","sources":["../app/javascript/src/components/Integrations/Daily/Manage.jsx","../app/javascript/src/components/Integrations/Daily/index.jsx"],"sourcesContent":["import { useState } from \"react\";\n\nimport { isPresent } from \"neetocist\";\nimport { buildUrl } from \"neetocommons/utils\";\nimport { Daily as DailyIcon } from \"neetoicons/misc\";\nimport CopyToClipboardButton from \"neetomolecules/CopyToClipboardButton\";\nimport { Spinner } from \"neetoui\";\nimport { Trans, useTranslation } from \"react-i18next\";\n\nimport ManageIntegrations from \"components/commons/Manage\";\nimport { useDestroyDaily, useFetchDaily } from \"hooks/reactQuery/useDailiesApi\";\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=\"neeto-ui-rounded-md mt-2 flex items-center justify-between gap-x-3 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/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":["Manage","_ref","description","onDisconnect","_useState","useState","_useState2","_slicedToArray","isDisconnectAlertOpen","setIsDisconnectAlertOpen","_useFetchDaily","useFetchDaily","_useFetchDaily$data","data","_useFetchDaily$data2","_useFetchDaily$data2$","metadata","isFetching","_ref2","_ref2$apiKey","apiKey","_useTranslation","useTranslation","t","_useDestroyDaily","useDestroyDaily","onSuccess","destroyIntegration","mutate","isDisconnecting","isPending","isConnected","isPresent","handleDisconnect","_jsx","className","children","Spinner","ManageIntegrations","Icon","DailyIcon","connectPath","buildUrl","window","location","pathname","connect","integration","Trans","i18nKey","values","components","wrapper","span","copy","CopyToClipboardButton","style","value","title","onClose","Daily","_ref$isOnboarding","isOnboarding","_ref$helpDocUrl","helpDocUrl","_ref$videoUrl","videoUrl","_ref$description","_ref$onConnect","onConnect","noop","_ref$onDisconnect","_useQueryParams","useQueryParams","Form","withTitle","i18next"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAYA,IAAMA,MAAM,GAAG,SAATA,MAAMA,CAAAC,IAAA,EAAsC;AAAA,EAAA,IAAhCC,WAAW,GAAAD,IAAA,CAAXC,WAAW;IAAEC,YAAY,GAAAF,IAAA,CAAZE,YAAY;AACzC,EAAA,IAAAC,SAAA,GAA0DC,QAAQ,CAAC,KAAK,CAAC;IAAAC,UAAA,GAAAC,cAAA,CAAAH,SAAA,EAAA,CAAA,CAAA;AAAlEI,IAAAA,qBAAqB,GAAAF,UAAA,CAAA,CAAA,CAAA;AAAEG,IAAAA,wBAAwB,GAAAH,UAAA,CAAA,CAAA,CAAA;AAEtD,EAAA,IAAAI,cAAA,GAAqDC,aAAa,EAAE;IAAAC,mBAAA,GAAAF,cAAA,CAA5DG,IAAI;AAAAC,IAAAA,oBAAA,GAAAF,mBAAA,KAAA,KAAA,CAAA,GAAsB,EAAE,GAAAA,mBAAA;IAAAG,qBAAA,GAAAD,oBAAA,CAApBE,QAAQ;AAARA,IAAAA,QAAQ,GAAAD,qBAAA,KAAA,KAAA,CAAA,GAAG,EAAE,GAAAA,qBAAA;IAASE,UAAU,GAAAP,cAAA,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C;AACtD;EAEA,oBAAO+B,GAAA,CAACwC,IAAI,EAAA;AAAOV,IAAAA,UAAU,EAAVA,UAAU;AAAEK,IAAAA,SAAS,EAATA,SAAS;AAAEH,IAAAA,QAAQ,EAARA;AAAQ,GAAK,CAAC;AAC1D,CAAC;AAED,YAAeS,SAAS,CACtBf,KAAK,EACLgB,OAAO,CAACrD,CAAC,CAAC,sDAAsD,CAClE,CAAC;;;;"}
|
package/dist/DailyForm.js
CHANGED
|
@@ -14,7 +14,7 @@ import '@bigbinary/neetoui/formik/ActionBlock';
|
|
|
14
14
|
import 'react-i18next';
|
|
15
15
|
import 'react-router-dom';
|
|
16
16
|
import './WalkthroughModal.js';
|
|
17
|
-
export { F as default } from './Form-
|
|
17
|
+
export { F as default } from './Form-FUvpblX2.js';
|
|
18
18
|
import 'react/jsx-runtime';
|
|
19
19
|
import '@bigbinary/neeto-cist';
|
|
20
20
|
import '@bigbinary/neeto-commons-frontend/react-utils/withT';
|
package/dist/Demo.js
CHANGED
|
@@ -52,7 +52,7 @@ var Demo = function Demo(_ref) {
|
|
|
52
52
|
description: renderText(subtitle, t("neetoIntegrations.demo.subtitle")),
|
|
53
53
|
title: renderText(title, t("neetoIntegrations.demo.title")),
|
|
54
54
|
actionBlock: /*#__PURE__*/jsx(Button, {
|
|
55
|
-
"data-
|
|
55
|
+
"data-testid": "neeto-integrations-demo-finish-button",
|
|
56
56
|
label: t("neetoIntegrations.common.finish"),
|
|
57
57
|
onClick: onClose
|
|
58
58
|
}),
|
package/dist/Demo.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Demo.js","sources":["../app/javascript/src/components/Steps/utils.js","../app/javascript/src/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 { noop } from \"neetocist\";\nimport CardLayout from \"neetomolecules/CardLayout\";\nimport { Button } from \"neetoui\";\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=\"neeto-ui-rounded-xl aspect-video w-full max-w-3xl cursor-pointer\"\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-
|
|
1
|
+
{"version":3,"file":"Demo.js","sources":["../app/javascript/src/components/Steps/utils.js","../app/javascript/src/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 { noop } from \"neetocist\";\nimport CardLayout from \"neetomolecules/CardLayout\";\nimport { Button } from \"neetoui\";\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=\"neeto-ui-rounded-xl aspect-video w-full max-w-3xl cursor-pointer\"\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 /**\n * To specify whether the integration modal should be opened or closed.\n */\n onClose: PropTypes.func,\n /**\n * To specify the walkthrough video link\n */\n videoUrl: PropTypes.string,\n /**\n * To specify the title of the demo component\n */\n title: PropTypes.string,\n /**\n * To specify the subtitle of the demo component\n */\n subtitle: PropTypes.string,\n /**\n * To specify the title of the video in the iframe\n */\n iframeTitle: PropTypes.string,\n};\n\nexport default Demo;\n"],"names":["isYouTubeLink","videoUrl","youtubeRegex","test","renderText","text","fallbackTranslation","isEmpty","Demo","_ref","_ref$title","title","_ref$subtitle","subtitle","_ref$iframeTitle","iframeTitle","_ref$onClose","onClose","noop","_ref$videoUrl","children","_useTranslation","useTranslation","t","renderVideo","_jsx","allowFullScreen","className","frameBorder","id","src","type","autoPlay","controls","muted","_jsxs","CardLayout","description","actionBlock","Button","label","onClick","prototypes","PropTypes","func","string"],"mappings":";;;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B,OAAO,EAAE0B,SAAS,CAACC,IAAI;AACvB;AACF;AACA;EACE3C,QAAQ,EAAE0C,SAAS,CAACE,MAAM;AAC1B;AACF;AACA;EACElC,KAAK,EAAEgC,SAAS,CAACE,MAAM;AACvB;AACF;AACA;EACEhC,QAAQ,EAAE8B,SAAS,CAACE,MAAM;AAC1B;AACF;AACA;EACE9B,WAAW,EAAE4B,SAAS,CAACE;AACzB,CAAC;;;;"}
|
|
@@ -144,7 +144,7 @@ var Form = function Form(_ref) {
|
|
|
144
144
|
}),
|
|
145
145
|
helpLinkProps: {
|
|
146
146
|
href: helpDocUrl,
|
|
147
|
-
"data-
|
|
147
|
+
"data-testid": "api-key-help-doc-link"
|
|
148
148
|
}
|
|
149
149
|
}
|
|
150
150
|
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
@@ -189,4 +189,4 @@ var Form$1 = reactUtils.withTitle(Form, i18next.t("neetoIntegrations.browserTitl
|
|
|
189
189
|
exports.Form = Form$1;
|
|
190
190
|
exports.useDestroyDaily = useDestroyDaily;
|
|
191
191
|
exports.useFetchDaily = useFetchDaily;
|
|
192
|
-
//# sourceMappingURL=Form-
|
|
192
|
+
//# sourceMappingURL=Form-Dt4OkRZe.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Form-Dt4OkRZe.js","sources":["../app/javascript/src/apis/dailies.js","../app/javascript/src/hooks/reactQuery/useDailiesApi.js","../app/javascript/src/components/Integrations/Daily/constants.js","../app/javascript/src/components/Integrations/Daily/Form.jsx"],"sourcesContent":["import axios from \"axios\";\n\nimport { INTEGRATIONS_ENGINE_DAILY_URL } from \"src/constants/urls\";\n\nconst create = payload =>\n axios.post(INTEGRATIONS_ENGINE_DAILY_URL, { daily: payload });\n\nconst show = () => axios.get(INTEGRATIONS_ENGINE_DAILY_URL);\n\nconst destroy = () => axios.delete(INTEGRATIONS_ENGINE_DAILY_URL);\n\nconst dailiesApi = { create, show, destroy };\n\nexport default dailiesApi;\n","import { useQuery } from \"@tanstack/react-query\";\nimport { DEFAULT_STALE_TIME } from \"neetocommons/constants\";\nimport { useMutationWithInvalidation } from \"neetocommons/react-utils\";\n\nimport dailiesApi from \"apis/dailies\";\nimport { QUERY_KEYS } from \"src/constants/query\";\n\nexport const useCreateDaily = (options = {}) =>\n useMutationWithInvalidation(dailiesApi.create, {\n keysToInvalidate: [[QUERY_KEYS.DAILY_CO_DETAILS]],\n ...options,\n });\n\nexport const useFetchDaily = () =>\n useQuery({\n queryKey: [QUERY_KEYS.DAILY_CO_DETAILS],\n queryFn: dailiesApi.show,\n staleTime: DEFAULT_STALE_TIME,\n });\n\nexport const useDestroyDaily = ({ onSuccess }) =>\n useMutationWithInvalidation(dailiesApi.destroy, {\n keysToInvalidate: [[QUERY_KEYS.DAILY_CO_DETAILS]],\n onSuccess,\n });\n","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 { withTitle } from \"neetocommons/react-utils\";\nimport CardLayout from \"neetomolecules/CardLayout\";\nimport Container from \"neetomolecules/Container\";\nimport Header from \"neetomolecules/Header\";\nimport { Button, Spinner, Typography } from \"neetoui\";\nimport { Input, Form as FormikForm, ActionBlock } from \"neetoui/formik\";\nimport { Trans, useTranslation } from \"react-i18next\";\nimport { useHistory } from \"react-router-dom\";\n\nimport WalkthroughModal from \"components/WalkthroughModal\";\nimport { useCreateDaily } from \"hooks/reactQuery/useDailiesApi\";\n\nimport {\n MANAGE_DAILY_CO_FORM_INITIAL_VALUES,\n DAILY_CO_VALIDATION_SCHEMA,\n} from \"./constants\";\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 lineHeight=\"normal\" style=\"body2\">\n <Trans\n i18nKey=\"neetoIntegrations.daily.helpDoc\"\n components={{\n videoLink: (\n <Button\n style=\"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 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":["create","payload","axios","post","INTEGRATIONS_ENGINE_DAILY_URL","daily","show","get","destroy","dailiesApi","useCreateDaily","options","arguments","length","undefined","useMutationWithInvalidation","_objectSpread","keysToInvalidate","QUERY_KEYS","DAILY_CO_DETAILS","useFetchDaily","useQuery","queryKey","queryFn","staleTime","DEFAULT_STALE_TIME","useDestroyDaily","_ref","onSuccess","MANAGE_DAILY_CO_FORM_INITIAL_VALUES","apiKey","DAILY_CO_VALIDATION_SCHEMA","yup","object","shape","string","trim","required","t","entity","Form","helpDocUrl","videoUrl","onConnect","breadcrumbs","_useTranslation","useTranslation","history","useHistory","_useState","useState","_useState2","_slicedToArray","isDemoModalOpen","setIsDemoModalOpen","_useCreateDaily","createDaily","mutate","isConnecting","isPending","handleSubmit","_jsx","className","children","Spinner","_jsxs","Container","isHeaderFixed","Header","title","titleHelpPopoverProps","description","Typography","lineHeight","style","Trans","i18nKey","components","videoLink","Button","onClick","helpLinkProps","href","FormikForm","formikProps","initialValues","validationSchema","onSubmit","CardLayout","actionBlock","ActionBlock","cancelButtonProps","goBack","isSubmitting","submitButtonProps","label","Input","autoFocus","name","WalkthroughModal","isOpen","onClose","withTitle","i18next"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,IAAMA,MAAM,GAAG,SAATA,MAAMA,CAAGC,OAAO,EAAA;AAAA,EAAA,OACpBC,KAAK,CAACC,IAAI,CAACC,mCAA6B,EAAE;AAAEC,IAAAA,KAAK,EAAEJ;AAAQ,GAAC,CAAC;AAAA,CAAA;AAE/D,IAAMK,IAAI,GAAG,SAAPA,IAAIA,GAAA;AAAA,EAAA,OAASJ,KAAK,CAACK,GAAG,CAACH,mCAA6B,CAAC;AAAA,CAAA;AAE3D,IAAMI,OAAO,GAAG,SAAVA,OAAOA,GAAA;AAAA,EAAA,OAASN,KAAK,CAAA,QAAA,CAAO,CAACE,mCAA6B,CAAC;AAAA,CAAA;AAEjE,IAAMK,UAAU,GAAG;AAAET,EAAAA,MAAM,EAANA,MAAM;AAAEM,EAAAA,IAAI,EAAJA,IAAI;AAAEE,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GAAA;AAAA,gBAAA,OAAQjC,OAAO,CAAC6C,MAAM,EAAE;AAAA;aAAG;AACvDC,YAAAA,YAAY,EAAEnC,YAAa;AAC3BoC,YAAAA,iBAAiB,EAAE;cACjBC,KAAK,EAAEzD,CAAC,CAAC,kCAAkC;AAC7C;AAAE,WACH,CACF;UAAAyB,QAAA,eAEDF,cAAA,CAACmC,KAAK,EAAA;YACJC,SAAS,EAAA,IAAA;YACT5D,QAAQ,EAAA,IAAA;AACR0D,YAAAA,KAAK,EAAEzD,CAAC,CAAC,gCAAgC,CAAE;AAC3C4D,YAAAA,IAAI,EAAC;WACN;SACS;AAAC,OACH,CAAC,eACbrC,cAAA,CAACsC,gBAAgB,EAAA;AACTzD,QAAAA,QAAQ,EAARA,QAAQ;AACd0D,QAAAA,MAAM,EAAE/C,eAAgB;QACxBgD,OAAO,EAAE,SAATA,OAAOA,GAAA;UAAA,OAAQ/C,kBAAkB,CAAC,KAAK,CAAC;AAAA;AAAC,OAC1C,CAAC;AAAA,KACC,CAAC;AAAA,GACG,CAAC;AAEhB,CAAC;AACD,aAAegD,oBAAS,CACtB9D,IAAI,EACJ+D,OAAO,CAACjE,CAAC,CAAC,sDAAsD,CAClE,CAAC;;;;;;"}
|
|
@@ -123,7 +123,7 @@ var Form = function Form(_ref) {
|
|
|
123
123
|
}),
|
|
124
124
|
helpLinkProps: {
|
|
125
125
|
href: helpDocUrl,
|
|
126
|
-
"data-
|
|
126
|
+
"data-testid": "api-key-help-doc-link"
|
|
127
127
|
}
|
|
128
128
|
}
|
|
129
129
|
}), /*#__PURE__*/jsxs("div", {
|
|
@@ -166,4 +166,4 @@ var Form = function Form(_ref) {
|
|
|
166
166
|
var Form$1 = withTitle(Form, i18next.t("neetoIntegrations.browserTitles.integrations.dailyco"));
|
|
167
167
|
|
|
168
168
|
export { Form$1 as F, useDestroyDaily as a, useFetchDaily as u };
|
|
169
|
-
//# sourceMappingURL=Form-
|
|
169
|
+
//# sourceMappingURL=Form-FUvpblX2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Form-FUvpblX2.js","sources":["../app/javascript/src/apis/dailies.js","../app/javascript/src/hooks/reactQuery/useDailiesApi.js","../app/javascript/src/components/Integrations/Daily/constants.js","../app/javascript/src/components/Integrations/Daily/Form.jsx"],"sourcesContent":["import axios from \"axios\";\n\nimport { INTEGRATIONS_ENGINE_DAILY_URL } from \"src/constants/urls\";\n\nconst create = payload =>\n axios.post(INTEGRATIONS_ENGINE_DAILY_URL, { daily: payload });\n\nconst show = () => axios.get(INTEGRATIONS_ENGINE_DAILY_URL);\n\nconst destroy = () => axios.delete(INTEGRATIONS_ENGINE_DAILY_URL);\n\nconst dailiesApi = { create, show, destroy };\n\nexport default dailiesApi;\n","import { useQuery } from \"@tanstack/react-query\";\nimport { DEFAULT_STALE_TIME } from \"neetocommons/constants\";\nimport { useMutationWithInvalidation } from \"neetocommons/react-utils\";\n\nimport dailiesApi from \"apis/dailies\";\nimport { QUERY_KEYS } from \"src/constants/query\";\n\nexport const useCreateDaily = (options = {}) =>\n useMutationWithInvalidation(dailiesApi.create, {\n keysToInvalidate: [[QUERY_KEYS.DAILY_CO_DETAILS]],\n ...options,\n });\n\nexport const useFetchDaily = () =>\n useQuery({\n queryKey: [QUERY_KEYS.DAILY_CO_DETAILS],\n queryFn: dailiesApi.show,\n staleTime: DEFAULT_STALE_TIME,\n });\n\nexport const useDestroyDaily = ({ onSuccess }) =>\n useMutationWithInvalidation(dailiesApi.destroy, {\n keysToInvalidate: [[QUERY_KEYS.DAILY_CO_DETAILS]],\n onSuccess,\n });\n","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 { withTitle } from \"neetocommons/react-utils\";\nimport CardLayout from \"neetomolecules/CardLayout\";\nimport Container from \"neetomolecules/Container\";\nimport Header from \"neetomolecules/Header\";\nimport { Button, Spinner, Typography } from \"neetoui\";\nimport { Input, Form as FormikForm, ActionBlock } from \"neetoui/formik\";\nimport { Trans, useTranslation } from \"react-i18next\";\nimport { useHistory } from \"react-router-dom\";\n\nimport WalkthroughModal from \"components/WalkthroughModal\";\nimport { useCreateDaily } from \"hooks/reactQuery/useDailiesApi\";\n\nimport {\n MANAGE_DAILY_CO_FORM_INITIAL_VALUES,\n DAILY_CO_VALIDATION_SCHEMA,\n} from \"./constants\";\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 lineHeight=\"normal\" style=\"body2\">\n <Trans\n i18nKey=\"neetoIntegrations.daily.helpDoc\"\n components={{\n videoLink: (\n <Button\n style=\"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 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":["create","payload","axios","post","INTEGRATIONS_ENGINE_DAILY_URL","daily","show","get","destroy","dailiesApi","useCreateDaily","options","arguments","length","undefined","useMutationWithInvalidation","_objectSpread","keysToInvalidate","QUERY_KEYS","DAILY_CO_DETAILS","useFetchDaily","useQuery","queryKey","queryFn","staleTime","DEFAULT_STALE_TIME","useDestroyDaily","_ref","onSuccess","MANAGE_DAILY_CO_FORM_INITIAL_VALUES","apiKey","DAILY_CO_VALIDATION_SCHEMA","yup","object","shape","string","trim","required","t","entity","Form","helpDocUrl","videoUrl","onConnect","breadcrumbs","_useTranslation","useTranslation","history","useHistory","_useState","useState","_useState2","_slicedToArray","isDemoModalOpen","setIsDemoModalOpen","_useCreateDaily","createDaily","mutate","isConnecting","isPending","handleSubmit","_jsx","className","children","Spinner","_jsxs","Container","isHeaderFixed","Header","title","titleHelpPopoverProps","description","Typography","lineHeight","style","Trans","i18nKey","components","videoLink","Button","onClick","helpLinkProps","href","FormikForm","formikProps","initialValues","validationSchema","onSubmit","CardLayout","actionBlock","ActionBlock","cancelButtonProps","goBack","isSubmitting","submitButtonProps","label","Input","autoFocus","name","WalkthroughModal","isOpen","onClose","withTitle","i18next"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAIA,IAAMA,MAAM,GAAG,SAATA,MAAMA,CAAGC,OAAO,EAAA;AAAA,EA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+1,9 @@
|
|
|
1
1
|
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
2
|
-
import { humanize, noop } from '@bigbinary/neeto-cist';
|
|
2
|
+
import { humanize, isNotEmpty, noop } from '@bigbinary/neeto-cist';
|
|
3
3
|
import { withT } from '@bigbinary/neeto-commons-frontend/react-utils';
|
|
4
4
|
import Check from '@bigbinary/neeto-icons/Check';
|
|
5
5
|
import Button from '@bigbinary/neetoui/Button';
|
|
6
|
+
import Callout from '@bigbinary/neetoui/Callout';
|
|
6
7
|
import Tooltip from '@bigbinary/neetoui/Tooltip';
|
|
7
8
|
import Typography from '@bigbinary/neetoui/Typography';
|
|
8
9
|
import { Trans } from 'react-i18next';
|
|
@@ -86,7 +87,9 @@ var Manage = withT(function (_ref) {
|
|
|
86
87
|
_ref$buttonProps = _ref.buttonProps,
|
|
87
88
|
buttonProps = _ref$buttonProps === void 0 ? {} : _ref$buttonProps,
|
|
88
89
|
_ref$secondaryButtonP = _ref.secondaryButtonProps,
|
|
89
|
-
secondaryButtonProps = _ref$secondaryButtonP === void 0 ? {} : _ref$secondaryButtonP
|
|
90
|
+
secondaryButtonProps = _ref$secondaryButtonP === void 0 ? {} : _ref$secondaryButtonP,
|
|
91
|
+
_ref$calloutProps = _ref.calloutProps,
|
|
92
|
+
calloutProps = _ref$calloutProps === void 0 ? {} : _ref$calloutProps;
|
|
90
93
|
return /*#__PURE__*/jsxs(Fragment, {
|
|
91
94
|
children: [/*#__PURE__*/jsx("div", {
|
|
92
95
|
className: "mx-auto w-full max-w-3xl",
|
|
@@ -125,6 +128,7 @@ var Manage = withT(function (_ref) {
|
|
|
125
128
|
i18nKey: "neetoIntegrations.common.helpDocUrl",
|
|
126
129
|
components: {
|
|
127
130
|
helpLink: /*#__PURE__*/jsx(Button, {
|
|
131
|
+
"data-testid": "help-doc-link",
|
|
128
132
|
href: helpDocUrl,
|
|
129
133
|
style: "link",
|
|
130
134
|
target: "_blank"
|
|
@@ -134,12 +138,12 @@ var Manage = withT(function (_ref) {
|
|
|
134
138
|
integration: integrationName || humanize(integration)
|
|
135
139
|
}
|
|
136
140
|
})
|
|
137
|
-
})]
|
|
141
|
+
}), isNotEmpty(calloutProps) && /*#__PURE__*/jsx(Callout, _objectSpread({}, calloutProps))]
|
|
138
142
|
})]
|
|
139
143
|
}), isConnected ? /*#__PURE__*/jsxs("div", {
|
|
140
144
|
className: "neeto-ui-bg-gray-50 neeto-ui-rounded-lg sticky bottom-0 w-full space-y-2 rounded-t-none p-4 md:space-x-2",
|
|
141
145
|
children: [(managePath || manageUrl) && /*#__PURE__*/jsx(Button, _objectSpread({
|
|
142
|
-
"data-
|
|
146
|
+
"data-testid": "manage-button",
|
|
143
147
|
href: manageUrl,
|
|
144
148
|
target: manageUrl ? "_blank" : "_self",
|
|
145
149
|
to: managePath,
|
|
@@ -147,7 +151,7 @@ var Manage = withT(function (_ref) {
|
|
|
147
151
|
integration: integrationName || humanize(integration)
|
|
148
152
|
})
|
|
149
153
|
}, buttonProps)), onDisconnect && /*#__PURE__*/jsx(Button, _objectSpread({
|
|
150
|
-
"data-
|
|
154
|
+
"data-testid": "disconnect-button",
|
|
151
155
|
style: "secondary",
|
|
152
156
|
label: t("neetoIntegrations.common.disconnectIntegration", {
|
|
153
157
|
integration: integrationName || humanize(integration)
|
|
@@ -162,7 +166,7 @@ var Manage = withT(function (_ref) {
|
|
|
162
166
|
children: (connectPath || connectUrl || onConnect) && /*#__PURE__*/jsx("div", {
|
|
163
167
|
className: "neeto-ui-bg-gray-50 neeto-ui-rounded-lg sticky bottom-0 w-full rounded-t-none p-4",
|
|
164
168
|
children: /*#__PURE__*/jsx(Button, _objectSpread({
|
|
165
|
-
"data-
|
|
169
|
+
"data-testid": "connect-button",
|
|
166
170
|
disabled: isConnectDisabled,
|
|
167
171
|
href: connectUrl,
|
|
168
172
|
to: connectPath,
|
package/dist/Manage.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Manage.js","sources":["../node_modules/rollup-plugin-styles/dist/runtime/inject-css.js","../app/javascript/src/components/commons/Manage.jsx"],"sourcesContent":["var e=[],t=[];function n(n,r){if(n&&\"undefined\"!=typeof document){var a,s=!0===r.prepend?\"prepend\":\"append\",d=!0===r.singleTag,i=\"string\"==typeof r.container?document.querySelector(r.container):document.getElementsByTagName(\"head\")[0];if(d){var u=e.indexOf(i);-1===u&&(u=e.push(i)-1,t[u]={}),a=t[u]&&t[u][s]?t[u][s]:t[u][s]=c()}else a=c();65279===n.charCodeAt(0)&&(n=n.substring(1)),a.styleSheet?a.styleSheet.cssText+=n:a.appendChild(document.createTextNode(n))}function c(){var e=document.createElement(\"style\");if(e.setAttribute(\"type\",\"text/css\"),r.attributes)for(var t=Object.keys(r.attributes),n=0;n<t.length;n++)e.setAttribute(t[n],r.attributes[t[n]]);var a=\"prepend\"===s?\"afterbegin\":\"beforeend\";return i.insertAdjacentElement(a,e),e}}export{n as default};\n","import { humanize, noop } from \"neetocist\";\nimport { withT } from \"neetocommons/react-utils\";\nimport { Check } from \"neetoicons\";\nimport { Button, Tooltip, Typography } from \"neetoui\";\nimport { Trans } from \"react-i18next\";\n\nimport DisconnectAlert from \"components/DisconnectAlert\";\n// eslint-disable-next-line import/extensions\nimport \"src/stylesheets/main.css\";\n\nconst Manage = withT(\n ({\n t,\n title = \"\",\n description = \"\",\n integration = \"\",\n isDisconnectAlertOpen = false,\n setIsDisconnectAlertOpen = noop,\n isDisconnecting = false,\n onConnect = undefined,\n onDisconnect = undefined,\n onClose = noop,\n Icon = null,\n isConnected = false,\n connectPath = \"\",\n connectUrl = \"\",\n helpDocUrl = \"\",\n managePath = \"\",\n manageUrl = \"\",\n integrationName = \"\",\n disconnectMessage = \"\",\n disconnectTitle = \"\",\n isConnectDisabled = false,\n connectTooltipProps = null,\n buttonProps = {},\n secondaryButtonProps = {},\n }) => (\n <>\n <div className=\"mx-auto w-full max-w-3xl\">\n <div className=\"neeto-ui-border-gray-300 neeto-ui-rounded-lg neeto-integrations__manage my-6 w-full border\">\n <div className=\"space-y-4 p-4\">\n {Icon && <Icon className=\"neeto-ui-text-gray-600\" size={48} />}\n <div className=\"space-y-2\">\n <div className=\"flex items-center space-x-4\">\n <Typography\n className=\"neeto-ui-text-gray-800 mb-0.5\"\n style=\"h2\"\n weight=\"semibold\"\n >\n {title}\n </Typography>\n {isConnected && (\n <div className=\"neeto-ui-bg-success-500 neeto-ui-text-white neeto-ui-rounded-full flex items-center justify-center p-1\">\n <Check size={24} />\n </div>\n )}\n </div>\n <Typography\n className=\"neeto-ui-text-gray-800 wrap-break-word\"\n style=\"body1\"\n weight=\"normal\"\n >\n {description}\n </Typography>\n {helpDocUrl && (\n <Typography\n className=\"neeto-ui-text-gray-800\"\n style=\"body2\"\n weight=\"normal\"\n >\n <Trans\n i18nKey=\"neetoIntegrations.common.helpDocUrl\"\n components={{\n helpLink: (\n <Button\n href={helpDocUrl}\n style=\"link\"\n target=\"_blank\"\n />\n ),\n }}\n values={{\n integration: integrationName || humanize(integration),\n }}\n />\n </Typography>\n )}\n </div>\n </div>\n {isConnected ? (\n <div className=\"neeto-ui-bg-gray-50 neeto-ui-rounded-lg sticky bottom-0 w-full space-y-2 rounded-t-none p-4 md:space-x-2\">\n {(managePath || manageUrl) && (\n <Button\n data-cy=\"manage-button\"\n href={manageUrl}\n target={manageUrl ? \"_blank\" : \"_self\"}\n to={managePath}\n label={t(\"neetoIntegrations.common.manageIntegration\", {\n integration: integrationName || humanize(integration),\n })}\n {...buttonProps}\n />\n )}\n {onDisconnect && (\n <Button\n data-cy=\"disconnect-button\"\n style=\"secondary\"\n label={t(\"neetoIntegrations.common.disconnectIntegration\", {\n integration: integrationName || humanize(integration),\n })}\n onClick={() => setIsDisconnectAlertOpen(true)}\n {...secondaryButtonProps}\n />\n )}\n </div>\n ) : (\n <Tooltip disabled={!isConnectDisabled} {...connectTooltipProps}>\n {(connectPath || connectUrl || onConnect) && (\n <div className=\"neeto-ui-bg-gray-50 neeto-ui-rounded-lg sticky bottom-0 w-full rounded-t-none p-4\">\n <Button\n data-cy=\"connect-button\"\n disabled={isConnectDisabled}\n href={connectUrl}\n to={connectPath}\n label={t(\"neetoIntegrations.common.connectIntegration\", {\n integration: integrationName || humanize(integration),\n })}\n onClick={onConnect}\n {...buttonProps}\n />\n </div>\n )}\n </Tooltip>\n )}\n </div>\n </div>\n <DisconnectAlert\n {...{ isDisconnecting, onClose, onDisconnect }}\n isOpen={isDisconnectAlertOpen}\n message={\n disconnectMessage ||\n t(`adminPanel.integrations.${integration}.disconnect.message`)\n }\n title={\n disconnectTitle ||\n t(`adminPanel.integrations.${integration}.disconnect.title`)\n }\n />\n </>\n )\n);\n\nexport default Manage;\n"],"names":["e","t","n","r","document","a","s","prepend","d","singleTag","i","container","querySelector","getElementsByTagName","u","indexOf","push","c","charCodeAt","substring","styleSheet","cssText","appendChild","createTextNode","createElement","setAttribute","attributes","Object","keys","length","insertAdjacentElement","Manage","withT","_ref","_ref$title","title","_ref$description","description","_ref$integration","integration","_ref$isDisconnectAler","isDisconnectAlertOpen","_ref$setIsDisconnectA","setIsDisconnectAlertOpen","noop","_ref$isDisconnecting","isDisconnecting","_ref$onConnect","onConnect","undefined","_ref$onDisconnect","onDisconnect","_ref$onClose","onClose","_ref$Icon","Icon","_ref$isConnected","isConnected","_ref$connectPath","connectPath","_ref$connectUrl","connectUrl","_ref$helpDocUrl","helpDocUrl","_ref$managePath","managePath","_ref$manageUrl","manageUrl","_ref$integrationName","integrationName","_ref$disconnectMessag","disconnectMessage","_ref$disconnectTitle","disconnectTitle","_ref$isConnectDisable","isConnectDisabled","_ref$connectTooltipPr","connectTooltipProps","_ref$buttonProps","buttonProps","_ref$secondaryButtonP","secondaryButtonProps","_jsxs","_Fragment","children","_jsx","className","size","Typography","style","weight","Check","Trans","i18nKey","components","helpLink","Button","href","target","values","humanize","_objectSpread","to","label","onClick","Tooltip","disabled","DisconnectAlert","isOpen","message","concat"],"mappings":";;;;;;;;;;;;;;AAAA,IAAIA,CAA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AC;AAAA,GACF,CAAC;AAAA,CAEP;;;;","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"Manage.js","sources":["../node_modules/rollup-plugin-styles/dist/runtime/inject-css.js","../app/javascript/src/components/commons/Manage.jsx"],"sourcesContent":["var e=[],t=[];function n(n,r){if(n&&\"undefined\"!=typeof document){var a,s=!0===r.prepend?\"prepend\":\"append\",d=!0===r.singleTag,i=\"string\"==typeof r.container?document.querySelector(r.container):document.getElementsByTagName(\"head\")[0];if(d){var u=e.indexOf(i);-1===u&&(u=e.push(i)-1,t[u]={}),a=t[u]&&t[u][s]?t[u][s]:t[u][s]=c()}else a=c();65279===n.charCodeAt(0)&&(n=n.substring(1)),a.styleSheet?a.styleSheet.cssText+=n:a.appendChild(document.createTextNode(n))}function c(){var e=document.createElement(\"style\");if(e.setAttribute(\"type\",\"text/css\"),r.attributes)for(var t=Object.keys(r.attributes),n=0;n<t.length;n++)e.setAttribute(t[n],r.attributes[t[n]]);var a=\"prepend\"===s?\"afterbegin\":\"beforeend\";return i.insertAdjacentElement(a,e),e}}export{n as default};\n","import { humanize, isNotEmpty, noop } from \"neetocist\";\nimport { withT } from \"neetocommons/react-utils\";\nimport { Check } from \"neetoicons\";\nimport { Button, Callout, Tooltip, Typography } from \"neetoui\";\nimport { Trans } from \"react-i18next\";\n\nimport DisconnectAlert from \"components/DisconnectAlert\";\n// eslint-disable-next-line import/extensions\nimport \"src/stylesheets/main.css\";\n\nconst Manage = withT(\n ({\n t,\n title = \"\",\n description = \"\",\n integration = \"\",\n isDisconnectAlertOpen = false,\n setIsDisconnectAlertOpen = noop,\n isDisconnecting = false,\n onConnect = undefined,\n onDisconnect = undefined,\n onClose = noop,\n Icon = null,\n isConnected = false,\n connectPath = \"\",\n connectUrl = \"\",\n helpDocUrl = \"\",\n managePath = \"\",\n manageUrl = \"\",\n integrationName = \"\",\n disconnectMessage = \"\",\n disconnectTitle = \"\",\n isConnectDisabled = false,\n connectTooltipProps = null,\n buttonProps = {},\n secondaryButtonProps = {},\n calloutProps = {},\n }) => (\n <>\n <div className=\"mx-auto w-full max-w-3xl\">\n <div className=\"neeto-ui-border-gray-300 neeto-ui-rounded-lg neeto-integrations__manage my-6 w-full border\">\n <div className=\"space-y-4 p-4\">\n {Icon && <Icon className=\"neeto-ui-text-gray-600\" size={48} />}\n <div className=\"space-y-2\">\n <div className=\"flex items-center space-x-4\">\n <Typography\n className=\"neeto-ui-text-gray-800 mb-0.5\"\n style=\"h2\"\n weight=\"semibold\"\n >\n {title}\n </Typography>\n {isConnected && (\n <div className=\"neeto-ui-bg-success-500 neeto-ui-text-white neeto-ui-rounded-full flex items-center justify-center p-1\">\n <Check size={24} />\n </div>\n )}\n </div>\n <Typography\n className=\"neeto-ui-text-gray-800 wrap-break-word\"\n style=\"body1\"\n weight=\"normal\"\n >\n {description}\n </Typography>\n {helpDocUrl && (\n <Typography\n className=\"neeto-ui-text-gray-800\"\n style=\"body2\"\n weight=\"normal\"\n >\n <Trans\n i18nKey=\"neetoIntegrations.common.helpDocUrl\"\n components={{\n helpLink: (\n <Button\n data-testid=\"help-doc-link\"\n href={helpDocUrl}\n style=\"link\"\n target=\"_blank\"\n />\n ),\n }}\n values={{\n integration: integrationName || humanize(integration),\n }}\n />\n </Typography>\n )}\n {isNotEmpty(calloutProps) && <Callout {...calloutProps} />}\n </div>\n </div>\n {isConnected ? (\n <div className=\"neeto-ui-bg-gray-50 neeto-ui-rounded-lg sticky bottom-0 w-full space-y-2 rounded-t-none p-4 md:space-x-2\">\n {(managePath || manageUrl) && (\n <Button\n data-testid=\"manage-button\"\n href={manageUrl}\n target={manageUrl ? \"_blank\" : \"_self\"}\n to={managePath}\n label={t(\"neetoIntegrations.common.manageIntegration\", {\n integration: integrationName || humanize(integration),\n })}\n {...buttonProps}\n />\n )}\n {onDisconnect && (\n <Button\n data-testid=\"disconnect-button\"\n style=\"secondary\"\n label={t(\"neetoIntegrations.common.disconnectIntegration\", {\n integration: integrationName || humanize(integration),\n })}\n onClick={() => setIsDisconnectAlertOpen(true)}\n {...secondaryButtonProps}\n />\n )}\n </div>\n ) : (\n <Tooltip disabled={!isConnectDisabled} {...connectTooltipProps}>\n {(connectPath || connectUrl || onConnect) && (\n <div className=\"neeto-ui-bg-gray-50 neeto-ui-rounded-lg sticky bottom-0 w-full rounded-t-none p-4\">\n <Button\n data-testid=\"connect-button\"\n disabled={isConnectDisabled}\n href={connectUrl}\n to={connectPath}\n label={t(\"neetoIntegrations.common.connectIntegration\", {\n integration: integrationName || humanize(integration),\n })}\n onClick={onConnect}\n {...buttonProps}\n />\n </div>\n )}\n </Tooltip>\n )}\n </div>\n </div>\n <DisconnectAlert\n {...{ isDisconnecting, onClose, onDisconnect }}\n isOpen={isDisconnectAlertOpen}\n message={\n disconnectMessage ||\n t(`adminPanel.integrations.${integration}.disconnect.message`)\n }\n title={\n disconnectTitle ||\n t(`adminPanel.integrations.${integration}.disconnect.title`)\n }\n />\n </>\n )\n);\n\nexport default Manage;\n"],"names":["e","t","n","r","document","a","s","prepend","d","singleTag","i","container","querySelector","getElementsByTagName","u","indexOf","push","c","charCodeAt","substring","styleSheet","cssText","appendChild","createTextNode","createElement","setAttribute","attributes","Object","keys","length","insertAdjacentElement","Manage","withT","_ref","_ref$title","title","_ref$description","description","_ref$integration","integration","_ref$isDisconnectAler","isDisconnectAlertOpen","_ref$setIsDisconnectA","setIsDisconnectAlertOpen","noop","_ref$isDisconnecting","isDisconnecting","_ref$onConnect","onConnect","undefined","_ref$onDisconnect","onDisconnect","_ref$onClose","onClose","_ref$Icon","Icon","_ref$isConnected","isConnected","_ref$connectPath","connectPath","_ref$connectUrl","connectUrl","_ref$helpDocUrl","helpDocUrl","_ref$managePath","managePath","_ref$manageUrl","manageUrl","_ref$integrationName","integrationName","_ref$disconnectMessag","disconnectMessage","_ref$disconnectTitle","disconnectTitle","_ref$isConnectDisable","isConnectDisabled","_ref$connectTooltipPr","connectTooltipProps","_ref$buttonProps","buttonProps","_ref$secondaryButtonP","secondaryButtonProps","_ref$calloutProps","calloutProps","_jsxs","_Fragment","children","_jsx","className","size","Typography","style","weight","Check","Trans","i18nKey","components","helpLink","Button","href","target","values","humanize","isNotEmpty","Callout","_objectSpread","to","label","onClick","Tooltip","disabled","DisconnectAlert","isOpen","message","concat"],"mappings":";;;;;;;;;;;;;;;AAAA,IAAIA,CAAC,GAAC,EAAE;AAACC,EAAAA,CAAC,GAAC,EAAE;AAAC,SAASC,CAACA,CAACA,CAAC,EAACC,CAAC,EAAC;AAAC,EAAA,IAAGD,CAAC,IAAE,WAAW,IAAE,OAAOE,QAAQ,EAAC;AAAC,IAAA,IAAIC,CAAC;MAACC,CAAC,GAAC,CAAC,CAAC,KAAGH,CAAC,CAACI,OAAO,GAAC,SAAS,GAAC,QAAQ;AAACC,MAAAA,CAAC,GAAC,CAAC,CAAC,KAAGL,CAAC,CAACM,SAAS;MAACC,CAAC,GAAC,QAAQ,IAAE,OAAOP,CAAC,CAACQ,SAAS,GAACP,QAAQ,CAACQ,aAAa,CAACT,CAAC,CAACQ,SAAS,CAAC,GAACP,QAAQ,CAACS,oBAAoB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;AAAC,IAAA,IAAGL,CAAC,EAAC;AAAC,MAAA,IAAIM,CAAC,GAACd,CAAC,CAACe,OAAO,CAACL,CAAC,CAAC;MAAC,CAAC,CAAC,KAAGI,CAAC,KAAGA,CAAC,GAACd,CAAC,CAACgB,IAAI,CAACN,CAAC,CAAC,GAAC,CAAC,EAACT,CAAC,CAACa,CAAC,CAAC,GAAC,EAAE,CAAC,EAACT,CAAC,GAACJ,CAAC,CAACa,CAAC,CAAC,IAAEb,CAAC,CAACa,CAAC,CAAC,CAACR,CAAC,CAAC,GAACL,CAAC,CAACa,CAAC,CAAC,CAACR,CAAC,CAAC,GAACL,CAAC,CAACa,CAAC,CAAC,CAACR,CAAC,CAAC,GAACW,CAAC,EAAE;AAAA,KAAC,MAAKZ,CAAC,GAACY,CAAC,EAAE;AAAC,IAAA,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qE,cAAAA,OAAO,EAAE5D;AAAU,aAAA,EACf+B,WAAW,CAChB;WACE;AACN,SAAA,CACM,CACV;OACE;AAAC,KACH,CAAC,eACNQ,GAAA,CAACwB,eAAe,EAAA;AACRjE,MAAAA,eAAe,EAAfA,eAAe;AAAEO,MAAAA,OAAO,EAAPA,OAAO;AAAEF,MAAAA,YAAY,EAAZA,YAAY;AAC5C6D,MAAAA,MAAM,EAAEvE,qBAAsB;MAC9BwE,OAAO,EACL1C,iBAAiB,IACjBtE,CAAC,4BAAAiH,MAAA,CAA4B3E,WAAW,EAAA,qBAAA,CAAqB,CAC9D;MACDJ,KAAK,EACHsC,eAAe,IACfxE,CAAC,4BAAAiH,MAAA,CAA4B3E,WAAW,EAAmB,mBAAA,CAAA;AAC5D,KACF,CAAC;AAAA,GACF,CAAC;AAAA,CAEP;;;;","x_google_ignoreList":[0]}
|
package/dist/ZapierForm.js
CHANGED
|
@@ -45,7 +45,7 @@ var getMenuItems = function getMenuItems(_ref) {
|
|
|
45
45
|
setApiKeyToDelete = _ref.setApiKeyToDelete;
|
|
46
46
|
return [{
|
|
47
47
|
key: MENU_ITEMS.DELETE,
|
|
48
|
-
"data-
|
|
48
|
+
"data-testid": "delete-apikey-button",
|
|
49
49
|
label: t("neetoIntegrations.common.delete"),
|
|
50
50
|
onClick: function onClick() {
|
|
51
51
|
return setApiKeyToDelete(apiKey);
|
package/dist/ZapierForm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ZapierForm.js","sources":["../app/javascript/src/components/Integrations/ZapierForm/constants.js","../app/javascript/src/components/Integrations/ZapierForm/utils.jsx","../app/javascript/src/components/Integrations/ZapierForm/ApiKeysList.jsx","../app/javascript/src/components/Integrations/ZapierForm/GenerateKey.jsx","../app/javascript/src/components/Integrations/ZapierForm/NewApiKeyInfo.jsx","../app/javascript/src/components/Integrations/ZapierForm/index.jsx"],"sourcesContent":["import { t } from \"i18next\";\nimport * as Yup from \"yup\";\n\nconst GENERATE_API_KEY_VALIDATION = Yup.object({\n label: Yup.string()\n .trim(t(\"neetoIntegrations.zapier.label.noBlankSpaces\"))\n .required(t(\"neetoIntegrations.zapier.label.required\"))\n .strict(),\n});\n\nexport const GENERATE_API_KEY_FORMIK_PROPS = {\n initialValues: { label: \"\" },\n validationSchema: GENERATE_API_KEY_VALIDATION,\n validateOnBlur: false,\n};\n\nexport const MENU_ITEMS = { DELETE: \"delete\" };\n","import { t } from \"i18next\";\nimport { timeFormat } from \"neetocommons/utils\";\nimport MoreDropdown from \"neetomolecules/MoreDropdown\";\nimport { Typography } from \"neetoui\";\n\nimport { MENU_ITEMS } from \"./constants\";\n\nconst getMenuItems = ({ apiKey, setApiKeyToDelete }) => [\n {\n key: MENU_ITEMS.DELETE,\n \"data-cy\": \"delete-apikey-button\",\n label: t(\"neetoIntegrations.common.delete\"),\n onClick: () => setApiKeyToDelete(apiKey),\n },\n];\n\nexport const getApiKeysTableColumnData = () => [\n {\n title: t(\"neetoIntegrations.zapier.tableColumns.label\"),\n dataIndex: \"options\",\n key: \"options\",\n width: 272,\n render: (options, { actions }) => (\n <div className=\"flex items-center justify-between gap-x-3\">\n <Typography className=\"w-4/5\" style=\"body2\">\n {options?.label}\n </Typography>\n {actions}\n </div>\n ),\n },\n {\n title: t(\"neetoIntegrations.zapier.tableColumns.createdAt\"),\n dataIndex: \"createdAt\",\n key: \"createdAt\",\n width: 200,\n },\n];\n\nexport const getApiKeysTableRowData = ({ apiKeys, setApiKeyToDelete }) =>\n apiKeys.map(apiKey => ({\n ...apiKey,\n createdAt: timeFormat.fromNow(apiKey.createdAt),\n actions: (\n <MoreDropdown\n dropdownProps={{ strategy: \"fixed\" }}\n menuItems={getMenuItems({ apiKey, setApiKeyToDelete })}\n />\n ),\n }));\n","import { useState } from \"react\";\n\nimport { noop } from \"neetocist\";\nimport { DEFAULT_PAGE_SIZE, DEFAULT_PAGE_INDEX } from \"neetocommons/constants\";\nimport TableWrapper from \"neetomolecules/TableWrapper\";\nimport { Alert, Table, Typography } from \"neetoui\";\nimport { isNotNil, isEmpty } from \"ramda\";\nimport { Trans, useTranslation } from \"react-i18next\";\n\nimport { getApiKeysTableColumnData, getApiKeysTableRowData } from \"./utils\";\n\nconst ApiKeysList = ({\n apiKeys = [],\n deleteApiKey = noop,\n isDeleting = false,\n setNewlyCreatedApiKey = noop,\n}) => {\n const [apiKeyToDelete, setApiKeyToDelete] = useState(null);\n const [currentPageNumber, setCurrentPageNumber] =\n useState(DEFAULT_PAGE_INDEX);\n\n const { t } = useTranslation();\n\n const closeAlert = () => setApiKeyToDelete(null);\n\n const handleSubmit = () => {\n deleteApiKey(apiKeyToDelete?.id, {\n onSuccess: () => {\n closeAlert();\n setNewlyCreatedApiKey(\"\");\n },\n });\n };\n\n if (isEmpty(apiKeys)) return null;\n\n return (\n <>\n <Typography className=\"mb-3\" style=\"h3\">\n {t(\"neetoIntegrations.zapier.tableTitle\")}\n </Typography>\n <TableWrapper>\n <Table\n {...{ currentPageNumber }}\n fixedHeight\n allowRowClick={false}\n columnData={getApiKeysTableColumnData()}\n defaultPageSize={DEFAULT_PAGE_SIZE}\n handlePageChange={setCurrentPageNumber}\n rowData={getApiKeysTableRowData({ apiKeys, setApiKeyToDelete })}\n />\n </TableWrapper>\n <Alert\n backdropClassName=\"zapier-delete-alert\"\n isOpen={isNotNil(apiKeyToDelete)}\n isSubmitting={isDeleting}\n submitButtonLabel={t(\"neetoIntegrations.common.delete\")}\n title={t(\"neetoIntegrations.zapier.deleteApiKey.title\")}\n message={\n <Trans\n i18nKey=\"neetoIntegrations.zapier.deleteApiKey.message\"\n values={{ key: apiKeyToDelete?.options?.label }}\n />\n }\n onClose={closeAlert}\n onSubmit={handleSubmit}\n />\n </>\n );\n};\n\nexport default ApiKeysList;\n","import { useEffect, useRef } from \"react\";\n\nimport { isNotEmpty } from \"neetocist\";\nimport CardLayout from \"neetomolecules/CardLayout\";\nimport { Button } from \"neetoui\";\nimport { ActionBlock, Form, Input } from \"neetoui/formik\";\nimport { useTranslation } from \"react-i18next\";\nimport { useHistory } from \"react-router-dom\";\n\nimport { GENERATE_API_KEY_FORMIK_PROPS } from \"./constants\";\n\nconst GenerateKey = ({ handleSubmit, isLoading, helpDocUrl }) => {\n const { t } = useTranslation();\n const inputRef = useRef(null);\n const history = useHistory();\n\n useEffect(() => {\n if (!inputRef.current) return;\n inputRef.current.focus();\n }, []);\n\n return (\n <Form\n className=\"w-full\"\n formikProps={{\n ...GENERATE_API_KEY_FORMIK_PROPS,\n onSubmit: handleSubmit,\n }}\n >\n <CardLayout\n title={t(\"neetoIntegrations.zapier.apiKeys\")}\n actionBlock={\n <ActionBlock\n cancelButtonProps={{ onClick: () => history.goBack() }}\n isSubmitting={isLoading}\n submitButtonProps={{\n label: t(\"neetoIntegrations.zapier.generateApiKey\"),\n }}\n />\n }\n description={\n <>\n {t(\"neetoIntegrations.zapier.emptyText\")}{\" \"}\n {isNotEmpty(helpDocUrl) && (\n <Button\n href={helpDocUrl}\n label={t(\"neetoIntegrations.zapier.learnMore\")}\n style=\"link\"\n target=\"_blank\"\n />\n )}\n </>\n }\n >\n <Input\n name=\"label\"\n placeholder={t(\"neetoIntegrations.zapier.labelInputPlaceholder\")}\n ref={inputRef}\n />\n </CardLayout>\n </Form>\n );\n};\n\nexport default GenerateKey;\n","import { withT } from \"neetocommons/react-utils\";\nimport CopyToClipboardButton from \"neetomolecules/CopyToClipboardButton\";\nimport { Typography } from \"neetoui\";\n\nconst NewApiKeyInfo = withT(({ t, apiKey }) => (\n <div className=\"space-y-3\">\n <Typography style=\"body2\" weight=\"normal\">\n {t(\"neetoIntegrations.zapier.newApiKeyInstruction\")}\n </Typography>\n <div className=\"flex gap-2\">\n <Typography\n className=\"neeto-ui-bg-gray-50 neeto-ui-border-gray-300 neeto-ui-rounded min-w-96 border px-2 py-1\"\n style=\"body2\"\n weight=\"medium\"\n >\n {apiKey}\n </Typography>\n <CopyToClipboardButton value={apiKey} />\n </div>\n </div>\n));\n\nexport default NewApiKeyInfo;\n","import { isNotEmpty, noop } from \"neetocist\";\nimport { Button, Spinner } from \"neetoui\";\nimport { useTranslation } from \"react-i18next\";\n\nimport ApiKeysList from \"./ApiKeysList\";\nimport GenerateKey from \"./GenerateKey\";\nimport NewApiKeyInfo from \"./NewApiKeyInfo\";\n\nconst ZapierForm = ({\n newlyCreatedApiKey = \"\",\n videoUrl = \"\",\n helpDocUrl = \"\",\n apiKeys = [],\n isGenerating = false,\n isLoading = true,\n isDeleting = false,\n deleteApiKey = noop,\n handleGenerateApiKey = noop,\n setNewlyCreatedApiKey = noop,\n setIsDemoModalOpen = noop,\n}) => {\n const { t } = useTranslation();\n\n if (isLoading) {\n return (\n <div className=\"flex h-full w-full items-center justify-center\">\n <Spinner />\n </div>\n );\n }\n\n return (\n <div className=\"mx-auto flex w-full max-w-3xl flex-col items-start space-y-6\">\n <div className=\"w-full\">\n <GenerateKey\n {...{ helpDocUrl, videoUrl }}\n handleSubmit={handleGenerateApiKey}\n isLoading={isGenerating}\n />\n <div className=\"space-y-4\">\n {isNotEmpty(newlyCreatedApiKey) && (\n <NewApiKeyInfo apiKey={newlyCreatedApiKey} />\n )}\n {isNotEmpty(videoUrl) && (\n <Button\n label={t(\"neetoIntegrations.zapier.walkthroughText\")}\n style=\"link\"\n onClick={() => setIsDemoModalOpen(true)}\n />\n )}\n </div>\n </div>\n <ApiKeysList\n {...{ apiKeys, deleteApiKey, isDeleting, setNewlyCreatedApiKey }}\n />\n </div>\n );\n};\n\nexport default ZapierForm;\n"],"names":["GENERATE_API_KEY_VALIDATION","Yup","object","label","string","trim","t","required","strict","GENERATE_API_KEY_FORMIK_PROPS","initialValues","validationSchema","validateOnBlur","MENU_ITEMS","DELETE","getMenuItems","_ref","apiKey","setApiKeyToDelete","key","onClick","getApiKeysTableColumnData","title","dataIndex","width","render","options","_ref2","actions","_jsxs","className","children","_jsx","Typography","style","getApiKeysTableRowData","_ref3","apiKeys","map","_objectSpread","createdAt","timeFormat","fromNow","MoreDropdown","dropdownProps","strategy","menuItems","ApiKeysList","_apiKeyToDelete$optio","_ref$apiKeys","_ref$deleteApiKey","deleteApiKey","noop","_ref$isDeleting","isDeleting","_ref$setNewlyCreatedA","setNewlyCreatedApiKey","_useState","useState","_useState2","_slicedToArray","apiKeyToDelete","_useState3","DEFAULT_PAGE_INDEX","_useState4","currentPageNumber","setCurrentPageNumber","_useTranslation","useTranslation","closeAlert","handleSubmit","id","onSuccess","isEmpty","_Fragment","TableWrapper","Table","fixedHeight","allowRowClick","columnData","defaultPageSize","DEFAULT_PAGE_SIZE","handlePageChange","rowData","Alert","backdropClassName","isOpen","isNotNil","isSubmitting","submitButtonLabel","message","Trans","i18nKey","values","onClose","onSubmit","GenerateKey","isLoading","helpDocUrl","inputRef","useRef","history","useHistory","useEffect","current","focus","Form","formikProps","CardLayout","actionBlock","ActionBlock","cancelButtonProps","goBack","submitButtonProps","description","isNotEmpty","Button","href","target","Input","name","placeholder","ref","NewApiKeyInfo","withT","weight","CopyToClipboardButton","value","ZapierForm","_ref$newlyCreatedApiK","newlyCreatedApiKey","_ref$videoUrl","videoUrl","_ref$helpDocUrl","_ref$isGenerating","isGenerating","_ref$isLoading","_ref$handleGenerateAp","handleGenerateApiKey","_ref$setIsDemoModalOp","setIsDemoModalOpen","Spinner"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,IAAMA,2BAA2B,GAAGC,GAAG,CAACC,MAAM,CAAC;EAC7CC,KAAK,EAAEF,GAAG,CAACG,MAAM,EAAE,CAChBC,IAAI,CAACC,CAAC,CAAC,8CAA8C,CAAC,CAAC,CACvDC,QAAQ,CAACD,CAAC,CAAC,yCAAyC,CAAC,CAAC,CACtDE,MAAM;AACX,CAAC,CAAC;AAEK,IAAMC,6BAA6B,GAAG;AAC3CC,EAAAA,aAAa,EAAE;AAAEP,IAAAA,KAAK,EAAE;GAAI;AAC5BQ,EAAAA,gBAAgB,EAAEX,2BAA2B;AAC7CY,EAAAA,cAAc,EAAE;A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iB,QAAQ,CAAC,iBACnBpG,GAAA,CAACoF,MAAM,EAAA;AACLjH,UAAAA,KAAK,EAAEG,CAAC,CAAC,0CAA0C,CAAE;AACrD4B,UAAAA,KAAK,EAAC,MAAM;UACZd,OAAO,EAAE,SAATA,OAAOA,GAAA;YAAA,OAAQwH,kBAAkB,CAAC,IAAI,CAAC;AAAA;AAAC,SACzC,CACF;AAAA,OACE,CAAC;AAAA,KACH,CAAC,eACN5G,GAAA,CAACe,WAAW,EAAA;AACJV,MAAAA,OAAO,EAAPA,OAAO;AAAEc,MAAAA,YAAY,EAAZA,YAAY;AAAEG,MAAAA,UAAU,EAAVA,UAAU;AAAEE,MAAAA,qBAAqB,EAArBA;AAAqB,KAC/D,CAAC;AAAA,GACC,CAAC;AAEV;;;;"}
|
|
1
|
+
{"version":3,"file":"ZapierForm.js","sources":["../app/javascript/src/components/Integrations/ZapierForm/constants.js","../app/javascript/src/components/Integrations/ZapierForm/utils.jsx","../app/javascript/src/components/Integrations/ZapierForm/ApiKeysList.jsx","../app/javascript/src/components/Integrations/ZapierForm/GenerateKey.jsx","../app/javascript/src/components/Integrations/ZapierForm/NewApiKeyInfo.jsx","../app/javascript/src/components/Integrations/ZapierForm/index.jsx"],"sourcesContent":["import { t } from \"i18next\";\nimport * as Yup from \"yup\";\n\nconst GENERATE_API_KEY_VALIDATION = Yup.object({\n label: Yup.string()\n .trim(t(\"neetoIntegrations.zapier.label.noBlankSpaces\"))\n .required(t(\"neetoIntegrations.zapier.label.required\"))\n .strict(),\n});\n\nexport const GENERATE_API_KEY_FORMIK_PROPS = {\n initialValues: { label: \"\" },\n validationSchema: GENERATE_API_KEY_VALIDATION,\n validateOnBlur: false,\n};\n\nexport const MENU_ITEMS = { DELETE: \"delete\" };\n","import { t } from \"i18next\";\nimport { timeFormat } from \"neetocommons/utils\";\nimport MoreDropdown from \"neetomolecules/MoreDropdown\";\nimport { Typography } from \"neetoui\";\n\nimport { MENU_ITEMS } from \"./constants\";\n\nconst getMenuItems = ({ apiKey, setApiKeyToDelete }) => [\n {\n key: MENU_ITEMS.DELETE,\n \"data-testid\": \"delete-apikey-button\",\n label: t(\"neetoIntegrations.common.delete\"),\n onClick: () => setApiKeyToDelete(apiKey),\n },\n];\n\nexport const getApiKeysTableColumnData = () => [\n {\n title: t(\"neetoIntegrations.zapier.tableColumns.label\"),\n dataIndex: \"options\",\n key: \"options\",\n width: 272,\n render: (options, { actions }) => (\n <div className=\"flex items-center justify-between gap-x-3\">\n <Typography className=\"w-4/5\" style=\"body2\">\n {options?.label}\n </Typography>\n {actions}\n </div>\n ),\n },\n {\n title: t(\"neetoIntegrations.zapier.tableColumns.createdAt\"),\n dataIndex: \"createdAt\",\n key: \"createdAt\",\n width: 200,\n },\n];\n\nexport const getApiKeysTableRowData = ({ apiKeys, setApiKeyToDelete }) =>\n apiKeys.map(apiKey => ({\n ...apiKey,\n createdAt: timeFormat.fromNow(apiKey.createdAt),\n actions: (\n <MoreDropdown\n dropdownProps={{ strategy: \"fixed\" }}\n menuItems={getMenuItems({ apiKey, setApiKeyToDelete })}\n />\n ),\n }));\n","import { useState } from \"react\";\n\nimport { noop } from \"neetocist\";\nimport { DEFAULT_PAGE_SIZE, DEFAULT_PAGE_INDEX } from \"neetocommons/constants\";\nimport TableWrapper from \"neetomolecules/TableWrapper\";\nimport { Alert, Table, Typography } from \"neetoui\";\nimport { isNotNil, isEmpty } from \"ramda\";\nimport { Trans, useTranslation } from \"react-i18next\";\n\nimport { getApiKeysTableColumnData, getApiKeysTableRowData } from \"./utils\";\n\nconst ApiKeysList = ({\n apiKeys = [],\n deleteApiKey = noop,\n isDeleting = false,\n setNewlyCreatedApiKey = noop,\n}) => {\n const [apiKeyToDelete, setApiKeyToDelete] = useState(null);\n const [currentPageNumber, setCurrentPageNumber] =\n useState(DEFAULT_PAGE_INDEX);\n\n const { t } = useTranslation();\n\n const closeAlert = () => setApiKeyToDelete(null);\n\n const handleSubmit = () => {\n deleteApiKey(apiKeyToDelete?.id, {\n onSuccess: () => {\n closeAlert();\n setNewlyCreatedApiKey(\"\");\n },\n });\n };\n\n if (isEmpty(apiKeys)) return null;\n\n return (\n <>\n <Typography className=\"mb-3\" style=\"h3\">\n {t(\"neetoIntegrations.zapier.tableTitle\")}\n </Typography>\n <TableWrapper>\n <Table\n {...{ currentPageNumber }}\n fixedHeight\n allowRowClick={false}\n columnData={getApiKeysTableColumnData()}\n defaultPageSize={DEFAULT_PAGE_SIZE}\n handlePageChange={setCurrentPageNumber}\n rowData={getApiKeysTableRowData({ apiKeys, setApiKeyToDelete })}\n />\n </TableWrapper>\n <Alert\n backdropClassName=\"zapier-delete-alert\"\n isOpen={isNotNil(apiKeyToDelete)}\n isSubmitting={isDeleting}\n submitButtonLabel={t(\"neetoIntegrations.common.delete\")}\n title={t(\"neetoIntegrations.zapier.deleteApiKey.title\")}\n message={\n <Trans\n i18nKey=\"neetoIntegrations.zapier.deleteApiKey.message\"\n values={{ key: apiKeyToDelete?.options?.label }}\n />\n }\n onClose={closeAlert}\n onSubmit={handleSubmit}\n />\n </>\n );\n};\n\nexport default ApiKeysList;\n","import { useEffect, useRef } from \"react\";\n\nimport { isNotEmpty } from \"neetocist\";\nimport CardLayout from \"neetomolecules/CardLayout\";\nimport { Button } from \"neetoui\";\nimport { ActionBlock, Form, Input } from \"neetoui/formik\";\nimport { useTranslation } from \"react-i18next\";\nimport { useHistory } from \"react-router-dom\";\n\nimport { GENERATE_API_KEY_FORMIK_PROPS } from \"./constants\";\n\nconst GenerateKey = ({ handleSubmit, isLoading, helpDocUrl }) => {\n const { t } = useTranslation();\n const inputRef = useRef(null);\n const history = useHistory();\n\n useEffect(() => {\n if (!inputRef.current) return;\n inputRef.current.focus();\n }, []);\n\n return (\n <Form\n className=\"w-full\"\n formikProps={{\n ...GENERATE_API_KEY_FORMIK_PROPS,\n onSubmit: handleSubmit,\n }}\n >\n <CardLayout\n title={t(\"neetoIntegrations.zapier.apiKeys\")}\n actionBlock={\n <ActionBlock\n cancelButtonProps={{ onClick: () => history.goBack() }}\n isSubmitting={isLoading}\n submitButtonProps={{\n label: t(\"neetoIntegrations.zapier.generateApiKey\"),\n }}\n />\n }\n description={\n <>\n {t(\"neetoIntegrations.zapier.emptyText\")}{\" \"}\n {isNotEmpty(helpDocUrl) && (\n <Button\n href={helpDocUrl}\n label={t(\"neetoIntegrations.zapier.learnMore\")}\n style=\"link\"\n target=\"_blank\"\n />\n )}\n </>\n }\n >\n <Input\n name=\"label\"\n placeholder={t(\"neetoIntegrations.zapier.labelInputPlaceholder\")}\n ref={inputRef}\n />\n </CardLayout>\n </Form>\n );\n};\n\nexport default GenerateKey;\n","import { withT } from \"neetocommons/react-utils\";\nimport CopyToClipboardButton from \"neetomolecules/CopyToClipboardButton\";\nimport { Typography } from \"neetoui\";\n\nconst NewApiKeyInfo = withT(({ t, apiKey }) => (\n <div className=\"space-y-3\">\n <Typography style=\"body2\" weight=\"normal\">\n {t(\"neetoIntegrations.zapier.newApiKeyInstruction\")}\n </Typography>\n <div className=\"flex gap-2\">\n <Typography\n className=\"neeto-ui-bg-gray-50 neeto-ui-border-gray-300 neeto-ui-rounded min-w-96 border px-2 py-1\"\n style=\"body2\"\n weight=\"medium\"\n >\n {apiKey}\n </Typography>\n <CopyToClipboardButton value={apiKey} />\n </div>\n </div>\n));\n\nexport default NewApiKeyInfo;\n","import { isNotEmpty, noop } from \"neetocist\";\nimport { Button, Spinner } from \"neetoui\";\nimport { useTranslation } from \"react-i18next\";\n\nimport ApiKeysList from \"./ApiKeysList\";\nimport GenerateKey from \"./GenerateKey\";\nimport NewApiKeyInfo from \"./NewApiKeyInfo\";\n\nconst ZapierForm = ({\n newlyCreatedApiKey = \"\",\n videoUrl = \"\",\n helpDocUrl = \"\",\n apiKeys = [],\n isGenerating = false,\n isLoading = true,\n isDeleting = false,\n deleteApiKey = noop,\n handleGenerateApiKey = noop,\n setNewlyCreatedApiKey = noop,\n setIsDemoModalOpen = noop,\n}) => {\n const { t } = useTranslation();\n\n if (isLoading) {\n return (\n <div className=\"flex h-full w-full items-center justify-center\">\n <Spinner />\n </div>\n );\n }\n\n return (\n <div className=\"mx-auto flex w-full max-w-3xl flex-col items-start space-y-6\">\n <div className=\"w-full\">\n <GenerateKey\n {...{ helpDocUrl, videoUrl }}\n handleSubmit={handleGenerateApiKey}\n isLoading={isGenerating}\n />\n <div className=\"space-y-4\">\n {isNotEmpty(newlyCreatedApiKey) && (\n <NewApiKeyInfo apiKey={newlyCreatedApiKey} />\n )}\n {isNotEmpty(videoUrl) && (\n <Button\n label={t(\"neetoIntegrations.zapier.walkthroughText\")}\n style=\"link\"\n onClick={() => setIsDemoModalOpen(true)}\n />\n )}\n </div>\n </div>\n <ApiKeysList\n {...{ apiKeys, deleteApiKey, isDeleting, setNewlyCreatedApiKey }}\n />\n </div>\n );\n};\n\nexport default ZapierForm;\n"],"names":["GENERATE_API_KEY_VALIDATION","Yup","object","label","string","trim","t","required","strict","GENERATE_API_KEY_FORMIK_PROPS","initialValues","validationSchema","validateOnBlur","MENU_ITEMS","DELETE","getMenuItems","_ref","apiKey","setApiKeyToDelete","key","onClick","getApiKeysTableColumnData","title","dataIndex","width","render","options","_ref2","actions","_jsxs","className","children","_jsx","Typography","style","getApiKeysTableRowData","_ref3","apiKeys","map","_objectSpread","createdAt","timeFormat","fromNow","MoreDropdown","dropdownProps","strategy","menuItems","ApiKeysList","_apiKeyToDelete$optio","_ref$apiKeys","_ref$deleteApiKey","deleteApiKey","noop","_ref$isDeleting","isDeleting","_ref$setNewlyCreatedA","setNewlyCreatedApiKey","_useState","useState","_useState2","_slicedToArray","apiKeyToDelete","_useState3","DEFAULT_PAGE_INDEX","_useState4","currentPageNumber","setCurrentPageNumber","_useTranslation","useTranslation","closeAlert","handleSubmit","id","onSuccess","isEmpty","_Fragment","TableWrapper","Table","fixedHeight","allowRowClick","columnData","defaultPageSize","DEFAULT_PAGE_SIZE","handlePageChange","rowData","Alert","backdropClassName","isOpen","isNotNil","isSubmitting","submitButtonLabel","message","Trans","i18nKey","values","onClose","onSubmit","GenerateKey","isLoading","helpDocUrl","inputRef","useRef","history","useHistory","useEffect","current","focus","Form","formikProps","CardLayout","actionBlock","ActionBlock","cancelButtonProps","goBack","submitButtonProps","description","isNotEmpty","Button","href","target","Input","name","placeholder","ref","NewApiKeyInfo","withT","weight","CopyToClipboardButton","value","ZapierForm","_ref$newlyCreatedApiK","newlyCreatedApiKey","_ref$videoUrl","videoUrl","_ref$helpDocUrl","_ref$isGenerating","isGenerating","_ref$isLoading","_ref$handleGenerateAp","handleGenerateApiKey","_ref$setIsDemoModalOp","setIsDemoModalOpen","Spinner"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,IAAMA,2BAA2B,GAAGC,GAAG,CAACC,MAAM,CAAC;EAC7CC,KAAK,EAAEF,GAAG,CAACG,MAAM,EAAE,CAChBC,IAAI,CAACC,CAAC,CAAC,8CAA8C,CAAC,CAAC,CACvDC,QAAQ,CAACD,CAAC,CAAC,yCAAyC,CAAC,CAAC,CACtDE,MAAM;AACX,CAAC,CAAC;AAEK,IAAMC,6BAA6B,GAAG;AAC3CC,EAAAA,aAAa,EAAE;AAAEP,IAAAA,KAAK,EAAE;GAAI;AAC5BQ,EAAAA,gBAAgB,EAAEX,2BAA2B;AAC7CY,EAAAA,cAAc,EAAE;AAClB,CAAC;AAEM,IAAMC,UAAU,GAAG;AAAEC,EAAAA,MAAM,EAAE;AAAS,CAAC;;;;ACT9C,IAAMC,YAAY,GAAG,SAAfA,YAAYA,CAAAC,IAAA,EAAA;AAAA,EAAA,IAAMC,MAAM,GAAAD,IAAA,CAANC,MAAM;IAAEC,iBAAiB,GAAAF,IAAA,CAAjBE,iBAAiB;AAAA,EAAA,OAAO,CACtD;IACEC,GAAG,EAAEN,UAAU,CAACC,MAAM;AACtB,IAAA,aAAa,EAAE,sBAAsB;AACrCX,IAAAA,KAAK,EAAEG,CAAC,CAAC,iCAAiC,CAAC;IAC3Cc,OAAO,EAAE,SAATA,OAAOA,GAA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BAAqB,EAArBA;AAAqB,KAC/D,CAAC;AAAA,GACC,CAAC;AAEV;;;;"}
|
package/dist/Zoom.js
CHANGED
|
@@ -14,6 +14,7 @@ import { jsx } from 'react/jsx-runtime';
|
|
|
14
14
|
import '@babel/runtime/helpers/defineProperty';
|
|
15
15
|
import '@bigbinary/neeto-icons/Check';
|
|
16
16
|
import '@bigbinary/neetoui/Button';
|
|
17
|
+
import '@bigbinary/neetoui/Callout';
|
|
17
18
|
import '@bigbinary/neetoui/Tooltip';
|
|
18
19
|
import '@bigbinary/neetoui/Typography';
|
|
19
20
|
import './DisconnectAlert.js';
|
package/dist/Zoom.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Zoom.js","sources":["../app/javascript/src/apis/zoom.js","../app/javascript/src/hooks/reactQuery/useZoomApi.js","../app/javascript/src/components/Integrations/Zoom/index.jsx"],"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","import { useState } from \"react\";\n\nimport { isPresent, noop } from \"neetocist\";\nimport { Zoom as ZoomIcon } from \"neetoicons/misc\";\nimport { Spinner } from \"neetoui\";\nimport { Trans, useTranslation } from \"react-i18next\";\n\nimport ManageIntegrations from \"components/commons/Manage\";\nimport { useDestroyZoom, useShowZoom } from \"hooks/reactQuery/useZoomApi\";\n\nconst Zoom = ({ connectUrl = \"\", description = \"\", onDisconnect = noop }) => {\n const { t } = useTranslation();\n\n const [isDisconnectAlertOpen, setIsDisconnectAlertOpen] = useState(false);\n\n const { data: { metadata: { email = \"\" } = {} } = {}, isLoading } =\n useShowZoom();\n\n const { mutate: destroyIntegration, isPending: isDisconnecting } =\n useDestroyZoom({\n onSuccess: () => {\n setIsDisconnectAlertOpen(false);\n onDisconnect?.();\n },\n });\n\n const isConnected = isPresent(email);\n\n const handleDisconnect = () => destroyIntegration(\"zoom\");\n\n if (isLoading) {\n return (\n <div className=\"flex h-full w-full items-center justify-center\">\n <Spinner />\n </div>\n );\n }\n\n return (\n <ManageIntegrations\n {...{\n connectUrl,\n isConnected,\n isDisconnectAlertOpen,\n isDisconnecting,\n setIsDisconnectAlertOpen,\n }}\n Icon={ZoomIcon}\n integration=\"zoom\"\n description={\n isConnected ? (\n <Trans\n components={{ underline: <u className=\"font-medium\" /> }}\n i18nKey=\"neetoIntegrations.zoom.account\"\n values={{ email }}\n />\n ) : (\n description\n )\n }\n title={\n isConnected\n ? t(\"neetoIntegrations.zoom.connected\")\n : t(\"neetoIntegrations.zoom.connect\")\n }\n onClose={() => setIsDisconnectAlertOpen(false)}\n onDisconnect={() => handleDisconnect()}\n />\n );\n};\n\nexport default Zoom;\n"],"names":["show","axios","get","INTEGRATION_DETAILS_URL","params","serviceName","integrableType","destroy","concat","INTEGRATIONS_ENGINE_ZOOM_URL","zoomApi","useShowZoom","useQuery","queryKey","QUERY_KEYS","ZOOM_DETAILS","queryFn","staleTime","DEFAULT_STALE_TIME","useDestroyZoom","_ref","onSuccess","useMutationWithInvalidation","keysToInvalidate","Zoom","_ref$connectUrl","connectUrl","_ref$description","description","_ref$onDisconnect","onDisconnect","noop","_useTranslation","useTranslation","t","_useState","useState","_useState2","_slicedToArray","isDisconnectAlertOpen","setIsDisconnectAlertOpen","_useShowZoom","_useShowZoom$data","data","_useShowZoom$data2","_useShowZoom$data2$me","metadata","_useShowZoom$data2$me2","_useShowZoom$data2$me3","email","isLoading","_useDestroyZoom","destroyIntegration","mutate","isDisconnecting","isPending","isConnected","isPresent","handleDisconnect","_jsx","className","children","Spinner","ManageIntegrations","Icon","ZoomIcon","integration","Trans","components","underline","i18nKey","values","title","onClose"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Zoom.js","sources":["../app/javascript/src/apis/zoom.js","../app/javascript/src/hooks/reactQuery/useZoomApi.js","../app/javascript/src/components/Integrations/Zoom/index.jsx"],"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","import { useState } from \"react\";\n\nimport { isPresent, noop } from \"neetocist\";\nimport { Zoom as ZoomIcon } from \"neetoicons/misc\";\nimport { Spinner } from \"neetoui\";\nimport { Trans, useTranslation } from \"react-i18next\";\n\nimport ManageIntegrations from \"components/commons/Manage\";\nimport { useDestroyZoom, useShowZoom } from \"hooks/reactQuery/useZoomApi\";\n\nconst Zoom = ({ connectUrl = \"\", description = \"\", onDisconnect = noop }) => {\n const { t } = useTranslation();\n\n const [isDisconnectAlertOpen, setIsDisconnectAlertOpen] = useState(false);\n\n const { data: { metadata: { email = \"\" } = {} } = {}, isLoading } =\n useShowZoom();\n\n const { mutate: destroyIntegration, isPending: isDisconnecting } =\n useDestroyZoom({\n onSuccess: () => {\n setIsDisconnectAlertOpen(false);\n onDisconnect?.();\n },\n });\n\n const isConnected = isPresent(email);\n\n const handleDisconnect = () => destroyIntegration(\"zoom\");\n\n if (isLoading) {\n return (\n <div className=\"flex h-full w-full items-center justify-center\">\n <Spinner />\n </div>\n );\n }\n\n return (\n <ManageIntegrations\n {...{\n connectUrl,\n isConnected,\n isDisconnectAlertOpen,\n isDisconnecting,\n setIsDisconnectAlertOpen,\n }}\n Icon={ZoomIcon}\n integration=\"zoom\"\n description={\n isConnected ? (\n <Trans\n components={{ underline: <u className=\"font-medium\" /> }}\n i18nKey=\"neetoIntegrations.zoom.account\"\n values={{ email }}\n />\n ) : (\n description\n )\n }\n title={\n isConnected\n ? t(\"neetoIntegrations.zoom.connected\")\n : t(\"neetoIntegrations.zoom.connect\")\n }\n onClose={() => setIsDisconnectAlertOpen(false)}\n onDisconnect={() => handleDisconnect()}\n />\n );\n};\n\nexport default Zoom;\n"],"names":["show","axios","get","INTEGRATION_DETAILS_URL","params","serviceName","integrableType","destroy","concat","INTEGRATIONS_ENGINE_ZOOM_URL","zoomApi","useShowZoom","useQuery","queryKey","QUERY_KEYS","ZOOM_DETAILS","queryFn","staleTime","DEFAULT_STALE_TIME","useDestroyZoom","_ref","onSuccess","useMutationWithInvalidation","keysToInvalidate","Zoom","_ref$connectUrl","connectUrl","_ref$description","description","_ref$onDisconnect","onDisconnect","noop","_useTranslation","useTranslation","t","_useState","useState","_useState2","_slicedToArray","isDisconnectAlertOpen","setIsDisconnectAlertOpen","_useShowZoom","_useShowZoom$data","data","_useShowZoom$data2","_useShowZoom$data2$me","metadata","_useShowZoom$data2$me2","_useShowZoom$data2$me3","email","isLoading","_useDestroyZoom","destroyIntegration","mutate","isDisconnecting","isPending","isConnected","isPresent","handleDisconnect","_jsx","className","children","Spinner","ManageIntegrations","Icon","ZoomIcon","integration","Trans","components","underline","i18nKey","values","title","onClose"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAOA,IAAMA,IAAI,GAAG,SAAPA,IAAIA,GAAA;AAAA,EAAA,OACRC,KAAK,CAACC,GAAG,CAACC,uBAAuB,EAAE;AACjCC,IAAAA,MAAM,EAAE;AAAEC,MAAAA,WAAW,EAAE,MAAM;AAAEC,MAAAA,cAAc,EAAE;AAAO;AACxD,GAAC,CAAC;AAAA,CAAA;AAEJ,IAAMC,OAAO,GAAG,SAAVA,OAAOA,GAAA;AAAA,EAAA,OAASN,KAAK,CAAO,QAAA,CAAA,CAAA,EAAA,CAAAO,MAAA,CAAIC,4BAA4B,WAAQ,CAAC;AAAA,CAAA;AAE3E,IAAMC,OAAO,GAAG;AAAEV,EAAAA,IAAI,EAAJA,IAAI;AAAEO,EAAAA,OAAO,EAAPA;AAAQ,CAAC;;ACP1B,IAAMI,WAAW,GAAG,SAAdA,WAAWA,GAAA;AAAA,EAAA,OACtBC,QAAQ,CAAC;AACPC,IAAAA,QAAQ,EAAE,CAACC,UAAU,CAACC,YAAY,CAAC;IACnCC,OAAO,EAAEN,OAAO,CAACV,IAAI;AACrBiB,IAAAA,SAAS,EAAEC;AACb,GAAC,CAAC;AAAA,CAAA;AACG,IAAMC,cAAc,GAAG,SAAjBA,cAAcA,CAAAC,IAAA,EAAA;AAAA,EAAA,IAAMC,UAAS,GAA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EAAEC,QAAS;AACfC,IAAAA,WAAW,EAAC,MAAM;AAClBtC,IAAAA,WAAW,EACT4B,WAAW,gBACTG,GAAA,CAACQ,KAAK,EAAA;AACJC,MAAAA,UAAU,EAAE;AAAEC,QAAAA,SAAS,eAAEV,GAAA,CAAA,GAAA,EAAA;AAAGC,UAAAA,SAAS,EAAC;SAAe;OAAI;AACzDU,MAAAA,OAAO,EAAC,gCAAgC;AACxCC,MAAAA,MAAM,EAAE;AAAEtB,QAAAA,KAAK,EAALA;AAAM;KACjB,CAAC,GAEFrB,WAEH;IACD4C,KAAK,EACHhB,WAAW,GACPtB,CAAC,CAAC,kCAAkC,CAAC,GACrCA,CAAC,CAAC,gCAAgC,CACvC;IACDuC,OAAO,EAAE,SAATA,OAAOA,GAAA;MAAA,OAAQjC,wBAAwB,CAAC,KAAK,CAAC;KAAC;IAC/CV,YAAY,EAAE,SAAdA,YAAYA,GAAA;MAAA,OAAQ4B,gBAAgB,EAAE;AAAA;AAAC,GACxC,CAAC;AAEN;;;;"}
|
package/dist/cjs/Daily.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var i18next = require('i18next');
|
|
4
4
|
var neetoCist = require('@bigbinary/neeto-cist');
|
|
5
5
|
var reactUtils = require('@bigbinary/neeto-commons-frontend/react-utils');
|
|
6
|
-
var DailyForm = require('../Form-
|
|
6
|
+
var DailyForm = require('../Form-Dt4OkRZe.js');
|
|
7
7
|
var _slicedToArray = require('@babel/runtime/helpers/slicedToArray');
|
|
8
8
|
var React = require('react');
|
|
9
9
|
var utils = require('@bigbinary/neeto-commons-frontend/utils');
|
|
@@ -32,6 +32,7 @@ require('axios');
|
|
|
32
32
|
require('../query-tu4TNsM9.js');
|
|
33
33
|
require('yup');
|
|
34
34
|
require('@bigbinary/neeto-icons/Check');
|
|
35
|
+
require('@bigbinary/neetoui/Callout');
|
|
35
36
|
require('@bigbinary/neetoui/Tooltip');
|
|
36
37
|
require('./DisconnectAlert.js');
|
|
37
38
|
require('@babel/runtime/helpers/objectWithoutProperties');
|
package/dist/cjs/Daily.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Daily.js","sources":["../../app/javascript/src/components/Integrations/Daily/Manage.jsx","../../app/javascript/src/components/Integrations/Daily/index.jsx"],"sourcesContent":["import { useState } from \"react\";\n\nimport { isPresent } from \"neetocist\";\nimport { buildUrl } from \"neetocommons/utils\";\nimport { Daily as DailyIcon } from \"neetoicons/misc\";\nimport CopyToClipboardButton from \"neetomolecules/CopyToClipboardButton\";\nimport { Spinner } from \"neetoui\";\nimport { Trans, useTranslation } from \"react-i18next\";\n\nimport ManageIntegrations from \"components/commons/Manage\";\nimport { useDestroyDaily, useFetchDaily } from \"hooks/reactQuery/useDailiesApi\";\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=\"neeto-ui-rounded-md mt-2 flex items-center justify-between gap-x-3 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/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":["Manage","_ref","description","onDisconnect","_useState","useState","_useState2","_slicedToArray","isDisconnectAlertOpen","setIsDisconnectAlertOpen","_useFetchDaily","useFetchDaily","_useFetchDaily$data","data","_useFetchDaily$data2","_useFetchDaily$data2$","metadata","isFetching","_ref2","_ref2$apiKey","apiKey","_useTranslation","useTranslation","t","_useDestroyDaily","useDestroyDaily","onSuccess","destroyIntegration","mutate","isDisconnecting","isPending","isConnected","isPresent","handleDisconnect","_jsx","className","children","Spinner","ManageIntegrations","Icon","DailyIcon","connectPath","buildUrl","window","location","pathname","connect","integration","Trans","i18nKey","values","components","wrapper","span","copy","CopyToClipboardButton","style","value","title","onClose","Daily","_ref$isOnboarding","isOnboarding","_ref$helpDocUrl","helpDocUrl","_ref$videoUrl","videoUrl","_ref$description","_ref$onConnect","onConnect","noop","_ref$onDisconnect","_useQueryParams","useQueryParams","Form","withTitle","i18next"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Daily.js","sources":["../../app/javascript/src/components/Integrations/Daily/Manage.jsx","../../app/javascript/src/components/Integrations/Daily/index.jsx"],"sourcesContent":["import { useState } from \"react\";\n\nimport { isPresent } from \"neetocist\";\nimport { buildUrl } from \"neetocommons/utils\";\nimport { Daily as DailyIcon } from \"neetoicons/misc\";\nimport CopyToClipboardButton from \"neetomolecules/CopyToClipboardButton\";\nimport { Spinner } from \"neetoui\";\nimport { Trans, useTranslation } from \"react-i18next\";\n\nimport ManageIntegrations from \"components/commons/Manage\";\nimport { useDestroyDaily, useFetchDaily } from \"hooks/reactQuery/useDailiesApi\";\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=\"neeto-ui-rounded-md mt-2 flex items-center justify-between gap-x-3 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/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":["Manage","_ref","description","onDisconnect","_useState","useState","_useState2","_slicedToArray","isDisconnectAlertOpen","setIsDisconnectAlertOpen","_useFetchDaily","useFetchDaily","_useFetchDaily$data","data","_useFetchDaily$data2","_useFetchDaily$data2$","metadata","isFetching","_ref2","_ref2$apiKey","apiKey","_useTranslation","useTranslation","t","_useDestroyDaily","useDestroyDaily","onSuccess","destroyIntegration","mutate","isDisconnecting","isPending","isConnected","isPresent","handleDisconnect","_jsx","className","children","Spinner","ManageIntegrations","Icon","DailyIcon","connectPath","buildUrl","window","location","pathname","connect","integration","Trans","i18nKey","values","components","wrapper","span","copy","CopyToClipboardButton","style","value","title","onClose","Daily","_ref$isOnboarding","isOnboarding","_ref$helpDocUrl","helpDocUrl","_ref$videoUrl","videoUrl","_ref$description","_ref$onConnect","onConnect","noop","_ref$onDisconnect","_useQueryParams","useQueryParams","Form","withTitle","i18next"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAYA,IAAMA,MAAM,GAAG,SAATA,MAAMA,CAAAC,IAAA,EAAsC;AAAA,EAAA,IAAhCC,WAAW,GAAAD,IAAA,CAAXC,WAAW;IAAEC,YAAY,GAAAF,IAAA,CAAZE,YAAY;AACzC,EAAA,IAAAC,SAAA,GAA0DC,cAAQ,CAAC,KAAK,CAAC;IAAAC,UAAA,GAAAC,cAAA,CAAAH,SAAA,EAAA,CAAA,CAAA;AAAlEI,IAAAA,qBAAqB,GAAAF,UAAA,CAAA,CAAA,CAAA;AAAEG,IAAAA,wBAAwB,GAAAH,UAAA,CAAA,CAAA,CAAA;AAEtD,EAAA,IAAAI,cAAA,GAAqDC,uBAAa,EAAE;IAAAC,mBAAA,GAAAF,cAAA,CAA5DG,IAAI;AAAAC,IAAAA,oBAAA,GAAAF,mBAAA,KAAA,KAAA,CAAA,GAAsB,EAAE,GAAAA,mBAAA;IAAAG,qBAAA,GAAAD,oBAAA,CAApBE,QAAQ;AAARA,IAAAA,QAAQ,GAAAD,qBAAA,KAAA,KAAA,CAAA,GAAG,EAAE,GAAAA,qBAAA;IAASE,UAAU,GAAAP,cAAA,CAAVO,UAAU;AAChD,EAAA,IAAAC,KAAA,GAA0BF,QAAQ,IAAI,EAAE;IAAAG,YAAA,GAAAD,KAAA,CAAhCE,MAAM;AAANA,IAAAA,MAAM,GAAAD,YAAA,KAAG,KAAA,CAAA,GAAA,IAAI,GAAAA,YAAA;AAErB,EAAA,IAAAE,eAAA,GAAcC,2BAAc,EAAE;IAAtBC,CAAC,GAAAF,eAAA,CAADE,CAAC;EAET,IAAAC,gBAAA,GACEC,yBAAe,CAAC;AACdC,MAAAA,SAAS,EAAE,SAAXA,SAASA,GAAQ;QACfjB,wBAAwB,CAAC,KAAK,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next');
|
|
17
17
|
require('react-router-dom');
|
|
18
18
|
require('./WalkthroughModal.js');
|
|
19
|
-
var DailyForm = require('../Form-
|
|
19
|
+
var DailyForm = require('../Form-Dt4OkRZe.js');
|
|
20
20
|
require('react/jsx-runtime');
|
|
21
21
|
require('@bigbinary/neeto-cist');
|
|
22
22
|
require('@bigbinary/neeto-commons-frontend/react-utils/withT');
|
package/dist/cjs/Demo.js
CHANGED
|
@@ -54,7 +54,7 @@ var Demo = function Demo(_ref) {
|
|
|
54
54
|
description: renderText(subtitle, t("neetoIntegrations.demo.subtitle")),
|
|
55
55
|
title: renderText(title, t("neetoIntegrations.demo.title")),
|
|
56
56
|
actionBlock: /*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
57
|
-
"data-
|
|
57
|
+
"data-testid": "neeto-integrations-demo-finish-button",
|
|
58
58
|
label: t("neetoIntegrations.common.finish"),
|
|
59
59
|
onClick: onClose
|
|
60
60
|
}),
|
package/dist/cjs/Demo.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Demo.js","sources":["../../app/javascript/src/components/Steps/utils.js","../../app/javascript/src/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 { noop } from \"neetocist\";\nimport CardLayout from \"neetomolecules/CardLayout\";\nimport { Button } from \"neetoui\";\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=\"neeto-ui-rounded-xl aspect-video w-full max-w-3xl cursor-pointer\"\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-
|
|
1
|
+
{"version":3,"file":"Demo.js","sources":["../../app/javascript/src/components/Steps/utils.js","../../app/javascript/src/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 { noop } from \"neetocist\";\nimport CardLayout from \"neetomolecules/CardLayout\";\nimport { Button } from \"neetoui\";\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=\"neeto-ui-rounded-xl aspect-video w-full max-w-3xl cursor-pointer\"\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 /**\n * To specify whether the integration modal should be opened or closed.\n */\n onClose: PropTypes.func,\n /**\n * To specify the walkthrough video link\n */\n videoUrl: PropTypes.string,\n /**\n * To specify the title of the demo component\n */\n title: PropTypes.string,\n /**\n * To specify the subtitle of the demo component\n */\n subtitle: PropTypes.string,\n /**\n * To specify the title of the video in the iframe\n */\n iframeTitle: PropTypes.string,\n};\n\nexport default Demo;\n"],"names":["isYouTubeLink","videoUrl","youtubeRegex","test","renderText","text","fallbackTranslation","isEmpty","Demo","_ref","_ref$title","title","_ref$subtitle","subtitle","_ref$iframeTitle","iframeTitle","_ref$onClose","onClose","noop","_ref$videoUrl","children","_useTranslation","useTranslation","t","renderVideo","_jsx","allowFullScreen","className","frameBorder","id","src","type","autoPlay","controls","muted","_jsxs","CardLayout","description","actionBlock","Button","label","onClick","prototypes","PropTypes","func","string"],"mappings":";;;;;;;;;;AAEO,IAAMA,aAAa,GAAG,SAAhBA,aAAaA,CAAGC,QAAQ,EAAI;EACvC,IAAMC,YAAY,GAAG,mDAAmD;AAExE,EAAA,OAAOA,YAAY,CAACC,IAAI,CAACF,QAAQ,CAAC;AACpC,CAAC;AAEM,IAAMG,UAAU,GAAG,SAAbA,UAAUA,CAAIC,IAAI,EAAEC,mBAAmB,EAAA;AAAA,EAAA,OAClDC,aAAO,CAACF,IAAI,CAAC,GAAGC,mBAAmB,GAAGD,IAAI;AAAA,CAAA;;ACD5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@bigbinary/neeto-cist');
|
|
|
5
5
|
var reactUtils = require('@bigbinary/neeto-commons-frontend/react-utils');
|
|
6
6
|
var Check = require('@bigbinary/neeto-icons/Check');
|
|
7
7
|
var Button = require('@bigbinary/neetoui/Button');
|
|
8
|
+
var Callout = require('@bigbinary/neetoui/Callout');
|
|
8
9
|
var Tooltip = require('@bigbinary/neetoui/Tooltip');
|
|
9
10
|
var Typography = require('@bigbinary/neetoui/Typography');
|
|
10
11
|
var reactI18next = require('react-i18next');
|
|
@@ -88,7 +89,9 @@ var Manage = reactUtils.withT(function (_ref) {
|
|
|
88
89
|
_ref$buttonProps = _ref.buttonProps,
|
|
89
90
|
buttonProps = _ref$buttonProps === void 0 ? {} : _ref$buttonProps,
|
|
90
91
|
_ref$secondaryButtonP = _ref.secondaryButtonProps,
|
|
91
|
-
secondaryButtonProps = _ref$secondaryButtonP === void 0 ? {} : _ref$secondaryButtonP
|
|
92
|
+
secondaryButtonProps = _ref$secondaryButtonP === void 0 ? {} : _ref$secondaryButtonP,
|
|
93
|
+
_ref$calloutProps = _ref.calloutProps,
|
|
94
|
+
calloutProps = _ref$calloutProps === void 0 ? {} : _ref$calloutProps;
|
|
92
95
|
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
93
96
|
children: [/*#__PURE__*/jsxRuntime.jsx("div", {
|
|
94
97
|
className: "mx-auto w-full max-w-3xl",
|
|
@@ -127,6 +130,7 @@ var Manage = reactUtils.withT(function (_ref) {
|
|
|
127
130
|
i18nKey: "neetoIntegrations.common.helpDocUrl",
|
|
128
131
|
components: {
|
|
129
132
|
helpLink: /*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
133
|
+
"data-testid": "help-doc-link",
|
|
130
134
|
href: helpDocUrl,
|
|
131
135
|
style: "link",
|
|
132
136
|
target: "_blank"
|
|
@@ -136,12 +140,12 @@ var Manage = reactUtils.withT(function (_ref) {
|
|
|
136
140
|
integration: integrationName || neetoCist.humanize(integration)
|
|
137
141
|
}
|
|
138
142
|
})
|
|
139
|
-
})]
|
|
143
|
+
}), neetoCist.isNotEmpty(calloutProps) && /*#__PURE__*/jsxRuntime.jsx(Callout, _objectSpread({}, calloutProps))]
|
|
140
144
|
})]
|
|
141
145
|
}), isConnected ? /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
142
146
|
className: "neeto-ui-bg-gray-50 neeto-ui-rounded-lg sticky bottom-0 w-full space-y-2 rounded-t-none p-4 md:space-x-2",
|
|
143
147
|
children: [(managePath || manageUrl) && /*#__PURE__*/jsxRuntime.jsx(Button, _objectSpread({
|
|
144
|
-
"data-
|
|
148
|
+
"data-testid": "manage-button",
|
|
145
149
|
href: manageUrl,
|
|
146
150
|
target: manageUrl ? "_blank" : "_self",
|
|
147
151
|
to: managePath,
|
|
@@ -149,7 +153,7 @@ var Manage = reactUtils.withT(function (_ref) {
|
|
|
149
153
|
integration: integrationName || neetoCist.humanize(integration)
|
|
150
154
|
})
|
|
151
155
|
}, buttonProps)), onDisconnect && /*#__PURE__*/jsxRuntime.jsx(Button, _objectSpread({
|
|
152
|
-
"data-
|
|
156
|
+
"data-testid": "disconnect-button",
|
|
153
157
|
style: "secondary",
|
|
154
158
|
label: t("neetoIntegrations.common.disconnectIntegration", {
|
|
155
159
|
integration: integrationName || neetoCist.humanize(integration)
|
|
@@ -164,7 +168,7 @@ var Manage = reactUtils.withT(function (_ref) {
|
|
|
164
168
|
children: (connectPath || connectUrl || onConnect) && /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
165
169
|
className: "neeto-ui-bg-gray-50 neeto-ui-rounded-lg sticky bottom-0 w-full rounded-t-none p-4",
|
|
166
170
|
children: /*#__PURE__*/jsxRuntime.jsx(Button, _objectSpread({
|
|
167
|
-
"data-
|
|
171
|
+
"data-testid": "connect-button",
|
|
168
172
|
disabled: isConnectDisabled,
|
|
169
173
|
href: connectUrl,
|
|
170
174
|
to: connectPath,
|
package/dist/cjs/Manage.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Manage.js","sources":["../../node_modules/rollup-plugin-styles/dist/runtime/inject-css.js","../../app/javascript/src/components/commons/Manage.jsx"],"sourcesContent":["var e=[],t=[];function n(n,r){if(n&&\"undefined\"!=typeof document){var a,s=!0===r.prepend?\"prepend\":\"append\",d=!0===r.singleTag,i=\"string\"==typeof r.container?document.querySelector(r.container):document.getElementsByTagName(\"head\")[0];if(d){var u=e.indexOf(i);-1===u&&(u=e.push(i)-1,t[u]={}),a=t[u]&&t[u][s]?t[u][s]:t[u][s]=c()}else a=c();65279===n.charCodeAt(0)&&(n=n.substring(1)),a.styleSheet?a.styleSheet.cssText+=n:a.appendChild(document.createTextNode(n))}function c(){var e=document.createElement(\"style\");if(e.setAttribute(\"type\",\"text/css\"),r.attributes)for(var t=Object.keys(r.attributes),n=0;n<t.length;n++)e.setAttribute(t[n],r.attributes[t[n]]);var a=\"prepend\"===s?\"afterbegin\":\"beforeend\";return i.insertAdjacentElement(a,e),e}}export{n as default};\n","import { humanize, noop } from \"neetocist\";\nimport { withT } from \"neetocommons/react-utils\";\nimport { Check } from \"neetoicons\";\nimport { Button, Tooltip, Typography } from \"neetoui\";\nimport { Trans } from \"react-i18next\";\n\nimport DisconnectAlert from \"components/DisconnectAlert\";\n// eslint-disable-next-line import/extensions\nimport \"src/stylesheets/main.css\";\n\nconst Manage = withT(\n ({\n t,\n title = \"\",\n description = \"\",\n integration = \"\",\n isDisconnectAlertOpen = false,\n setIsDisconnectAlertOpen = noop,\n isDisconnecting = false,\n onConnect = undefined,\n onDisconnect = undefined,\n onClose = noop,\n Icon = null,\n isConnected = false,\n connectPath = \"\",\n connectUrl = \"\",\n helpDocUrl = \"\",\n managePath = \"\",\n manageUrl = \"\",\n integrationName = \"\",\n disconnectMessage = \"\",\n disconnectTitle = \"\",\n isConnectDisabled = false,\n connectTooltipProps = null,\n buttonProps = {},\n secondaryButtonProps = {},\n }) => (\n <>\n <div className=\"mx-auto w-full max-w-3xl\">\n <div className=\"neeto-ui-border-gray-300 neeto-ui-rounded-lg neeto-integrations__manage my-6 w-full border\">\n <div className=\"space-y-4 p-4\">\n {Icon && <Icon className=\"neeto-ui-text-gray-600\" size={48} />}\n <div className=\"space-y-2\">\n <div className=\"flex items-center space-x-4\">\n <Typography\n className=\"neeto-ui-text-gray-800 mb-0.5\"\n style=\"h2\"\n weight=\"semibold\"\n >\n {title}\n </Typography>\n {isConnected && (\n <div className=\"neeto-ui-bg-success-500 neeto-ui-text-white neeto-ui-rounded-full flex items-center justify-center p-1\">\n <Check size={24} />\n </div>\n )}\n </div>\n <Typography\n className=\"neeto-ui-text-gray-800 wrap-break-word\"\n style=\"body1\"\n weight=\"normal\"\n >\n {description}\n </Typography>\n {helpDocUrl && (\n <Typography\n className=\"neeto-ui-text-gray-800\"\n style=\"body2\"\n weight=\"normal\"\n >\n <Trans\n i18nKey=\"neetoIntegrations.common.helpDocUrl\"\n components={{\n helpLink: (\n <Button\n href={helpDocUrl}\n style=\"link\"\n target=\"_blank\"\n />\n ),\n }}\n values={{\n integration: integrationName || humanize(integration),\n }}\n />\n </Typography>\n )}\n </div>\n </div>\n {isConnected ? (\n <div className=\"neeto-ui-bg-gray-50 neeto-ui-rounded-lg sticky bottom-0 w-full space-y-2 rounded-t-none p-4 md:space-x-2\">\n {(managePath || manageUrl) && (\n <Button\n data-cy=\"manage-button\"\n href={manageUrl}\n target={manageUrl ? \"_blank\" : \"_self\"}\n to={managePath}\n label={t(\"neetoIntegrations.common.manageIntegration\", {\n integration: integrationName || humanize(integration),\n })}\n {...buttonProps}\n />\n )}\n {onDisconnect && (\n <Button\n data-cy=\"disconnect-button\"\n style=\"secondary\"\n label={t(\"neetoIntegrations.common.disconnectIntegration\", {\n integration: integrationName || humanize(integration),\n })}\n onClick={() => setIsDisconnectAlertOpen(true)}\n {...secondaryButtonProps}\n />\n )}\n </div>\n ) : (\n <Tooltip disabled={!isConnectDisabled} {...connectTooltipProps}>\n {(connectPath || connectUrl || onConnect) && (\n <div className=\"neeto-ui-bg-gray-50 neeto-ui-rounded-lg sticky bottom-0 w-full rounded-t-none p-4\">\n <Button\n data-cy=\"connect-button\"\n disabled={isConnectDisabled}\n href={connectUrl}\n to={connectPath}\n label={t(\"neetoIntegrations.common.connectIntegration\", {\n integration: integrationName || humanize(integration),\n })}\n onClick={onConnect}\n {...buttonProps}\n />\n </div>\n )}\n </Tooltip>\n )}\n </div>\n </div>\n <DisconnectAlert\n {...{ isDisconnecting, onClose, onDisconnect }}\n isOpen={isDisconnectAlertOpen}\n message={\n disconnectMessage ||\n t(`adminPanel.integrations.${integration}.disconnect.message`)\n }\n title={\n disconnectTitle ||\n t(`adminPanel.integrations.${integration}.disconnect.title`)\n }\n />\n </>\n )\n);\n\nexport default Manage;\n"],"names":["e","t","n","r","document","a","s","prepend","d","singleTag","i","container","querySelector","getElementsByTagName","u","indexOf","push","c","charCodeAt","substring","styleSheet","cssText","appendChild","createTextNode","createElement","setAttribute","attributes","Object","keys","length","insertAdjacentElement","Manage","withT","_ref","_ref$title","title","_ref$description","description","_ref$integration","integration","_ref$isDisconnectAler","isDisconnectAlertOpen","_ref$setIsDisconnectA","setIsDisconnectAlertOpen","noop","_ref$isDisconnecting","isDisconnecting","_ref$onConnect","onConnect","undefined","_ref$onDisconnect","onDisconnect","_ref$onClose","onClose","_ref$Icon","Icon","_ref$isConnected","isConnected","_ref$connectPath","connectPath","_ref$connectUrl","connectUrl","_ref$helpDocUrl","helpDocUrl","_ref$managePath","managePath","_ref$manageUrl","manageUrl","_ref$integrationName","integrationName","_ref$disconnectMessag","disconnectMessage","_ref$disconnectTitle","disconnectTitle","_ref$isConnectDisable","isConnectDisabled","_ref$connectTooltipPr","connectTooltipProps","_ref$buttonProps","buttonProps","_ref$secondaryButtonP","secondaryButtonProps","_jsxs","_Fragment","children","_jsx","className","size","Typography","style","weight","Check","Trans","i18nKey","components","helpLink","Button","href","target","values","humanize","_objectSpread","to","label","onClick","Tooltip","disabled","DisconnectAlert","isOpen","message","conc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AA,CAA4BvE,WAAW,EAAmB,mBAAA,CAAA;AAC5D,KACF,CAAC;AAAA,GACF,CAAC;AAAA,CAEP;;;;","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"Manage.js","sources":["../../node_modules/rollup-plugin-styles/dist/runtime/inject-css.js","../../app/javascript/src/components/commons/Manage.jsx"],"sourcesContent":["var e=[],t=[];function n(n,r){if(n&&\"undefined\"!=typeof document){var a,s=!0===r.prepend?\"prepend\":\"append\",d=!0===r.singleTag,i=\"string\"==typeof r.container?document.querySelector(r.container):document.getElementsByTagName(\"head\")[0];if(d){var u=e.indexOf(i);-1===u&&(u=e.push(i)-1,t[u]={}),a=t[u]&&t[u][s]?t[u][s]:t[u][s]=c()}else a=c();65279===n.charCodeAt(0)&&(n=n.substring(1)),a.styleSheet?a.styleSheet.cssText+=n:a.appendChild(document.createTextNode(n))}function c(){var e=document.createElement(\"style\");if(e.setAttribute(\"type\",\"text/css\"),r.attributes)for(var t=Object.keys(r.attributes),n=0;n<t.length;n++)e.setAttribute(t[n],r.attributes[t[n]]);var a=\"prepend\"===s?\"afterbegin\":\"beforeend\";return i.insertAdjacentElement(a,e),e}}export{n as default};\n","import { humanize, isNotEmpty, noop } from \"neetocist\";\nimport { withT } from \"neetocommons/react-utils\";\nimport { Check } from \"neetoicons\";\nimport { Button, Callout, Tooltip, Typography } from \"neetoui\";\nimport { Trans } from \"react-i18next\";\n\nimport DisconnectAlert from \"components/DisconnectAlert\";\n// eslint-disable-next-line import/extensions\nimport \"src/stylesheets/main.css\";\n\nconst Manage = withT(\n ({\n t,\n title = \"\",\n description = \"\",\n integration = \"\",\n isDisconnectAlertOpen = false,\n setIsDisconnectAlertOpen = noop,\n isDisconnecting = false,\n onConnect = undefined,\n onDisconnect = undefined,\n onClose = noop,\n Icon = null,\n isConnected = false,\n connectPath = \"\",\n connectUrl = \"\",\n helpDocUrl = \"\",\n managePath = \"\",\n manageUrl = \"\",\n integrationName = \"\",\n disconnectMessage = \"\",\n disconnectTitle = \"\",\n isConnectDisabled = false,\n connectTooltipProps = null,\n buttonProps = {},\n secondaryButtonProps = {},\n calloutProps = {},\n }) => (\n <>\n <div className=\"mx-auto w-full max-w-3xl\">\n <div className=\"neeto-ui-border-gray-300 neeto-ui-rounded-lg neeto-integrations__manage my-6 w-full border\">\n <div className=\"space-y-4 p-4\">\n {Icon && <Icon className=\"neeto-ui-text-gray-600\" size={48} />}\n <div className=\"space-y-2\">\n <div className=\"flex items-center space-x-4\">\n <Typography\n className=\"neeto-ui-text-gray-800 mb-0.5\"\n style=\"h2\"\n weight=\"semibold\"\n >\n {title}\n </Typography>\n {isConnected && (\n <div className=\"neeto-ui-bg-success-500 neeto-ui-text-white neeto-ui-rounded-full flex items-center justify-center p-1\">\n <Check size={24} />\n </div>\n )}\n </div>\n <Typography\n className=\"neeto-ui-text-gray-800 wrap-break-word\"\n style=\"body1\"\n weight=\"normal\"\n >\n {description}\n </Typography>\n {helpDocUrl && (\n <Typography\n className=\"neeto-ui-text-gray-800\"\n style=\"body2\"\n weight=\"normal\"\n >\n <Trans\n i18nKey=\"neetoIntegrations.common.helpDocUrl\"\n components={{\n helpLink: (\n <Button\n data-testid=\"help-doc-link\"\n href={helpDocUrl}\n style=\"link\"\n target=\"_blank\"\n />\n ),\n }}\n values={{\n integration: integrationName || humanize(integration),\n }}\n />\n </Typography>\n )}\n {isNotEmpty(calloutProps) && <Callout {...calloutProps} />}\n </div>\n </div>\n {isConnected ? (\n <div className=\"neeto-ui-bg-gray-50 neeto-ui-rounded-lg sticky bottom-0 w-full space-y-2 rounded-t-none p-4 md:space-x-2\">\n {(managePath || manageUrl) && (\n <Button\n data-testid=\"manage-button\"\n href={manageUrl}\n target={manageUrl ? \"_blank\" : \"_self\"}\n to={managePath}\n label={t(\"neetoIntegrations.common.manageIntegration\", {\n integration: integrationName || humanize(integration),\n })}\n {...buttonProps}\n />\n )}\n {onDisconnect && (\n <Button\n data-testid=\"disconnect-button\"\n style=\"secondary\"\n label={t(\"neetoIntegrations.common.disconnectIntegration\", {\n integration: integrationName || humanize(integration),\n })}\n onClick={() => setIsDisconnectAlertOpen(true)}\n {...secondaryButtonProps}\n />\n )}\n </div>\n ) : (\n <Tooltip disabled={!isConnectDisabled} {...connectTooltipProps}>\n {(connectPath || connectUrl || onConnect) && (\n <div className=\"neeto-ui-bg-gray-50 neeto-ui-rounded-lg sticky bottom-0 w-full rounded-t-none p-4\">\n <Button\n data-testid=\"connect-button\"\n disabled={isConnectDisabled}\n href={connectUrl}\n to={connectPath}\n label={t(\"neetoIntegrations.common.connectIntegration\", {\n integration: integrationName || humanize(integration),\n })}\n onClick={onConnect}\n {...buttonProps}\n />\n </div>\n )}\n </Tooltip>\n )}\n </div>\n </div>\n <DisconnectAlert\n {...{ isDisconnecting, onClose, onDisconnect }}\n isOpen={isDisconnectAlertOpen}\n message={\n disconnectMessage ||\n t(`adminPanel.integrations.${integration}.disconnect.message`)\n }\n title={\n disconnectTitle ||\n t(`adminPanel.integrations.${integration}.disconnect.title`)\n }\n />\n </>\n )\n);\n\nexport default Manage;\n"],"names":["e","t","n","r","document","a","s","prepend","d","singleTag","i","container","querySelector","getElementsByTagName","u","indexOf","push","c","charCodeAt","substring","styleSheet","cssText","appendChild","createTextNode","createElement","setAttribute","attributes","Object","keys","length","insertAdjacentElement","Manage","withT","_ref","_ref$title","title","_ref$description","description","_ref$integration","integration","_ref$isDisconnectAler","isDisconnectAlertOpen","_ref$setIsDisconnectA","setIsDisconnectAlertOpen","noop","_ref$isDisconnecting","isDisconnecting","_ref$onConnect","onConnect","undefined","_ref$onDisconnect","onDisconnect","_ref$onClose","onClose","_ref$Icon","Icon","_ref$isConnected","isConnected","_ref$connectPath","connectPath","_ref$connectUrl","connectUrl","_ref$helpDocUrl","helpDocUrl","_ref$managePath","managePath","_ref$manageUrl","manageUrl","_ref$integrationName","integrationName","_ref$disconnectMessag","disconnectMessage","_ref$disconnectTitle","disconnectTitle","_ref$isConnectDisable","isConnectDisabled","_ref$connectTooltipPr","connectTooltipProps","_ref$buttonProps","buttonProps","_ref$secondaryButtonP","secondaryButtonProps","_ref$calloutProps","calloutProps","_jsxs","_Fragment","children","_jsx","className","size","Typography","style","weight","Check","Trans","i18nKey","components","helpLink","Button","href","target","values","humanize","isNotEmpty","Callout","_objectSpread","to","label","onClick","Tooltip","disabled","DisconnectAlert","isOpen","message","concat"],"mappings":";;;;;;;;;;;;;;;;;AAAA,IAAIA,CAAC,GAAC,EAAE;AAACC,EAAAA,CAAC,GAAC,EAAE;AAAC,SAASC,CAACA,CAACA,CAAC,EAACC,CAAC,EAAC;AAAC,EAAA,IAAGD,CAAC,IAAE,WAAW,IAAE,OAAOE,QAAQ,EAAC;AAAC,IAAA,IAAIC,CAAC;MAACC,CAAC,GAAC,CAAC,CAAC,KAAGH,CAAC,CAACI,OAAO,GAAC,SAAS,GAAC,QAAQ;AAACC,MAAAA,CAAC,GAAC,CAAC,CAAC,KAAGL,CAAC,CAACM,SAAS;MAACC,CAAC,GAAC,QAAQ,IAAE,OAAOP,CAAC,CAACQ,SAAS,GAACP,QAAQ,CAACQ,aAAa,CAACT,CAAC,CAACQ,SAAS,CAAC,GAACP,QAAQ,CAACS,oBAAoB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;AAAC,IAAA,IAAGL,CAAC,EAAC;AAAC,MAAA,IAAIM,CAAC,GAACd,CAAC,CAACe,OAAO,CAACL,CAAC,CAAC;MAAC,CAAC,CAAC,KAAGI,CAAC,KAAGA,CAAC,GAACd,CAAC,CAACgB,IAAI,CAACN,CAAC,CAAC,GAAC,CAAC,EAACT,CAAC,CAACa,CAAC,CAAC,GAAC,EAAE,CAAC,EAACT,CAAC,GAACJ,CAAC,CAACa,CAAC,CAAC,IAAEb,CAAC,CAACa,CAAC,CAAC,CAACR,CAAC,CAAC,GAACL,CAAC,CAACa,CAAC,CAAC,CAACR,CAAC,CAAC,GAACL,CAAC,CAACa,CAAC,CAAC,CAACR,CAAC,CAAC,GAACW,CAAC,EAA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,EAAE8B,eAAe,IAAIiC,kBAAQ,CAAC/D,WAAW;AACtD,eAAC,CAAE;AACHqE,cAAAA,OAAO,EAAE5D;AAAU,aAAA,EACf+B,WAAW,CAChB;WACE;AACN,SAAA,CACM,CACV;OACE;AAAC,KACH,CAAC,eACNQ,cAAA,CAACwB,eAAe,EAAA;AACRjE,MAAAA,eAAe,EAAfA,eAAe;AAAEO,MAAAA,OAAO,EAAPA,OAAO;AAAEF,MAAAA,YAAY,EAAZA,YAAY;AAC5C6D,MAAAA,MAAM,EAAEvE,qBAAsB;MAC9BwE,OAAO,EACL1C,iBAAiB,IACjBtE,CAAC,4BAAAiH,MAAA,CAA4B3E,WAAW,EAAA,qBAAA,CAAqB,CAC9D;MACDJ,KAAK,EACHsC,eAAe,IACfxE,CAAC,4BAAAiH,MAAA,CAA4B3E,WAAW,EAAmB,mBAAA,CAAA;AAC5D,KACF,CAAC;AAAA,GACF,CAAC;AAAA,CAEP;;;;","x_google_ignoreList":[0]}
|
package/dist/cjs/ZapierForm.js
CHANGED
|
@@ -66,7 +66,7 @@ var getMenuItems = function getMenuItems(_ref) {
|
|
|
66
66
|
setApiKeyToDelete = _ref.setApiKeyToDelete;
|
|
67
67
|
return [{
|
|
68
68
|
key: MENU_ITEMS.DELETE,
|
|
69
|
-
"data-
|
|
69
|
+
"data-testid": "delete-apikey-button",
|
|
70
70
|
label: i18next.t("neetoIntegrations.common.delete"),
|
|
71
71
|
onClick: function onClick() {
|
|
72
72
|
return setApiKeyToDelete(apiKey);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ZapierForm.js","sources":["../../app/javascript/src/components/Integrations/ZapierForm/constants.js","../../app/javascript/src/components/Integrations/ZapierForm/utils.jsx","../../app/javascript/src/components/Integrations/ZapierForm/ApiKeysList.jsx","../../app/javascript/src/components/Integrations/ZapierForm/GenerateKey.jsx","../../app/javascript/src/components/Integrations/ZapierForm/NewApiKeyInfo.jsx","../../app/javascript/src/components/Integrations/ZapierForm/index.jsx"],"sourcesContent":["import { t } from \"i18next\";\nimport * as Yup from \"yup\";\n\nconst GENERATE_API_KEY_VALIDATION = Yup.object({\n label: Yup.string()\n .trim(t(\"neetoIntegrations.zapier.label.noBlankSpaces\"))\n .required(t(\"neetoIntegrations.zapier.label.required\"))\n .strict(),\n});\n\nexport const GENERATE_API_KEY_FORMIK_PROPS = {\n initialValues: { label: \"\" },\n validationSchema: GENERATE_API_KEY_VALIDATION,\n validateOnBlur: false,\n};\n\nexport const MENU_ITEMS = { DELETE: \"delete\" };\n","import { t } from \"i18next\";\nimport { timeFormat } from \"neetocommons/utils\";\nimport MoreDropdown from \"neetomolecules/MoreDropdown\";\nimport { Typography } from \"neetoui\";\n\nimport { MENU_ITEMS } from \"./constants\";\n\nconst getMenuItems = ({ apiKey, setApiKeyToDelete }) => [\n {\n key: MENU_ITEMS.DELETE,\n \"data-cy\": \"delete-apikey-button\",\n label: t(\"neetoIntegrations.common.delete\"),\n onClick: () => setApiKeyToDelete(apiKey),\n },\n];\n\nexport const getApiKeysTableColumnData = () => [\n {\n title: t(\"neetoIntegrations.zapier.tableColumns.label\"),\n dataIndex: \"options\",\n key: \"options\",\n width: 272,\n render: (options, { actions }) => (\n <div className=\"flex items-center justify-between gap-x-3\">\n <Typography className=\"w-4/5\" style=\"body2\">\n {options?.label}\n </Typography>\n {actions}\n </div>\n ),\n },\n {\n title: t(\"neetoIntegrations.zapier.tableColumns.createdAt\"),\n dataIndex: \"createdAt\",\n key: \"createdAt\",\n width: 200,\n },\n];\n\nexport const getApiKeysTableRowData = ({ apiKeys, setApiKeyToDelete }) =>\n apiKeys.map(apiKey => ({\n ...apiKey,\n createdAt: timeFormat.fromNow(apiKey.createdAt),\n actions: (\n <MoreDropdown\n dropdownProps={{ strategy: \"fixed\" }}\n menuItems={getMenuItems({ apiKey, setApiKeyToDelete })}\n />\n ),\n }));\n","import { useState } from \"react\";\n\nimport { noop } from \"neetocist\";\nimport { DEFAULT_PAGE_SIZE, DEFAULT_PAGE_INDEX } from \"neetocommons/constants\";\nimport TableWrapper from \"neetomolecules/TableWrapper\";\nimport { Alert, Table, Typography } from \"neetoui\";\nimport { isNotNil, isEmpty } from \"ramda\";\nimport { Trans, useTranslation } from \"react-i18next\";\n\nimport { getApiKeysTableColumnData, getApiKeysTableRowData } from \"./utils\";\n\nconst ApiKeysList = ({\n apiKeys = [],\n deleteApiKey = noop,\n isDeleting = false,\n setNewlyCreatedApiKey = noop,\n}) => {\n const [apiKeyToDelete, setApiKeyToDelete] = useState(null);\n const [currentPageNumber, setCurrentPageNumber] =\n useState(DEFAULT_PAGE_INDEX);\n\n const { t } = useTranslation();\n\n const closeAlert = () => setApiKeyToDelete(null);\n\n const handleSubmit = () => {\n deleteApiKey(apiKeyToDelete?.id, {\n onSuccess: () => {\n closeAlert();\n setNewlyCreatedApiKey(\"\");\n },\n });\n };\n\n if (isEmpty(apiKeys)) return null;\n\n return (\n <>\n <Typography className=\"mb-3\" style=\"h3\">\n {t(\"neetoIntegrations.zapier.tableTitle\")}\n </Typography>\n <TableWrapper>\n <Table\n {...{ currentPageNumber }}\n fixedHeight\n allowRowClick={false}\n columnData={getApiKeysTableColumnData()}\n defaultPageSize={DEFAULT_PAGE_SIZE}\n handlePageChange={setCurrentPageNumber}\n rowData={getApiKeysTableRowData({ apiKeys, setApiKeyToDelete })}\n />\n </TableWrapper>\n <Alert\n backdropClassName=\"zapier-delete-alert\"\n isOpen={isNotNil(apiKeyToDelete)}\n isSubmitting={isDeleting}\n submitButtonLabel={t(\"neetoIntegrations.common.delete\")}\n title={t(\"neetoIntegrations.zapier.deleteApiKey.title\")}\n message={\n <Trans\n i18nKey=\"neetoIntegrations.zapier.deleteApiKey.message\"\n values={{ key: apiKeyToDelete?.options?.label }}\n />\n }\n onClose={closeAlert}\n onSubmit={handleSubmit}\n />\n </>\n );\n};\n\nexport default ApiKeysList;\n","import { useEffect, useRef } from \"react\";\n\nimport { isNotEmpty } from \"neetocist\";\nimport CardLayout from \"neetomolecules/CardLayout\";\nimport { Button } from \"neetoui\";\nimport { ActionBlock, Form, Input } from \"neetoui/formik\";\nimport { useTranslation } from \"react-i18next\";\nimport { useHistory } from \"react-router-dom\";\n\nimport { GENERATE_API_KEY_FORMIK_PROPS } from \"./constants\";\n\nconst GenerateKey = ({ handleSubmit, isLoading, helpDocUrl }) => {\n const { t } = useTranslation();\n const inputRef = useRef(null);\n const history = useHistory();\n\n useEffect(() => {\n if (!inputRef.current) return;\n inputRef.current.focus();\n }, []);\n\n return (\n <Form\n className=\"w-full\"\n formikProps={{\n ...GENERATE_API_KEY_FORMIK_PROPS,\n onSubmit: handleSubmit,\n }}\n >\n <CardLayout\n title={t(\"neetoIntegrations.zapier.apiKeys\")}\n actionBlock={\n <ActionBlock\n cancelButtonProps={{ onClick: () => history.goBack() }}\n isSubmitting={isLoading}\n submitButtonProps={{\n label: t(\"neetoIntegrations.zapier.generateApiKey\"),\n }}\n />\n }\n description={\n <>\n {t(\"neetoIntegrations.zapier.emptyText\")}{\" \"}\n {isNotEmpty(helpDocUrl) && (\n <Button\n href={helpDocUrl}\n label={t(\"neetoIntegrations.zapier.learnMore\")}\n style=\"link\"\n target=\"_blank\"\n />\n )}\n </>\n }\n >\n <Input\n name=\"label\"\n placeholder={t(\"neetoIntegrations.zapier.labelInputPlaceholder\")}\n ref={inputRef}\n />\n </CardLayout>\n </Form>\n );\n};\n\nexport default GenerateKey;\n","import { withT } from \"neetocommons/react-utils\";\nimport CopyToClipboardButton from \"neetomolecules/CopyToClipboardButton\";\nimport { Typography } from \"neetoui\";\n\nconst NewApiKeyInfo = withT(({ t, apiKey }) => (\n <div className=\"space-y-3\">\n <Typography style=\"body2\" weight=\"normal\">\n {t(\"neetoIntegrations.zapier.newApiKeyInstruction\")}\n </Typography>\n <div className=\"flex gap-2\">\n <Typography\n className=\"neeto-ui-bg-gray-50 neeto-ui-border-gray-300 neeto-ui-rounded min-w-96 border px-2 py-1\"\n style=\"body2\"\n weight=\"medium\"\n >\n {apiKey}\n </Typography>\n <CopyToClipboardButton value={apiKey} />\n </div>\n </div>\n));\n\nexport default NewApiKeyInfo;\n","import { isNotEmpty, noop } from \"neetocist\";\nimport { Button, Spinner } from \"neetoui\";\nimport { useTranslation } from \"react-i18next\";\n\nimport ApiKeysList from \"./ApiKeysList\";\nimport GenerateKey from \"./GenerateKey\";\nimport NewApiKeyInfo from \"./NewApiKeyInfo\";\n\nconst ZapierForm = ({\n newlyCreatedApiKey = \"\",\n videoUrl = \"\",\n helpDocUrl = \"\",\n apiKeys = [],\n isGenerating = false,\n isLoading = true,\n isDeleting = false,\n deleteApiKey = noop,\n handleGenerateApiKey = noop,\n setNewlyCreatedApiKey = noop,\n setIsDemoModalOpen = noop,\n}) => {\n const { t } = useTranslation();\n\n if (isLoading) {\n return (\n <div className=\"flex h-full w-full items-center justify-center\">\n <Spinner />\n </div>\n );\n }\n\n return (\n <div className=\"mx-auto flex w-full max-w-3xl flex-col items-start space-y-6\">\n <div className=\"w-full\">\n <GenerateKey\n {...{ helpDocUrl, videoUrl }}\n handleSubmit={handleGenerateApiKey}\n isLoading={isGenerating}\n />\n <div className=\"space-y-4\">\n {isNotEmpty(newlyCreatedApiKey) && (\n <NewApiKeyInfo apiKey={newlyCreatedApiKey} />\n )}\n {isNotEmpty(videoUrl) && (\n <Button\n label={t(\"neetoIntegrations.zapier.walkthroughText\")}\n style=\"link\"\n onClick={() => setIsDemoModalOpen(true)}\n />\n )}\n </div>\n </div>\n <ApiKeysList\n {...{ apiKeys, deleteApiKey, isDeleting, setNewlyCreatedApiKey }}\n />\n </div>\n );\n};\n\nexport default ZapierForm;\n"],"names":["GENERATE_API_KEY_VALIDATION","Yup","object","label","string","trim","t","required","strict","GENERATE_API_KEY_FORMIK_PROPS","initialValues","validationSchema","validateOnBlur","MENU_ITEMS","DELETE","getMenuItems","_ref","apiKey","setApiKeyToDelete","key","onClick","getApiKeysTableColumnData","title","dataIndex","width","render","options","_ref2","actions","_jsxs","className","children","_jsx","Typography","style","getApiKeysTableRowData","_ref3","apiKeys","map","_objectSpread","createdAt","timeFormat","fromNow","MoreDropdown","dropdownProps","strategy","menuItems","ApiKeysList","_apiKeyToDelete$optio","_ref$apiKeys","_ref$deleteApiKey","deleteApiKey","noop","_ref$isDeleting","isDeleting","_ref$setNewlyCreatedA","setNewlyCreatedApiKey","_useState","useState","_useState2","_slicedToArray","apiKeyToDelete","_useState3","DEFAULT_PAGE_INDEX","_useState4","currentPageNumber","setCurrentPageNumber","_useTranslation","useTranslation","closeAlert","handleSubmit","id","onSuccess","isEmpty","_Fragment","TableWrapper","Table","fixedHeight","allowRowClick","columnData","defaultPageSize","DEFAULT_PAGE_SIZE","handlePageChange","rowData","Alert","backdropClassName","isOpen","isNotNil","isSubmitting","submitButtonLabel","message","Trans","i18nKey","values","onClose","onSubmit","GenerateKey","isLoading","helpDocUrl","inputRef","useRef","history","useHistory","useEffect","current","focus","Form","formikProps","CardLayout","actionBlock","ActionBlock","cancelButtonProps","goBack","submitButtonProps","description","isNotEmpty","Button","href","target","Input","name","placeholder","ref","NewApiKeyInfo","withT","weight","CopyToClipboardButton","value","ZapierForm","_ref$newlyCreatedApiK","newlyCreatedApiKey","_ref$videoUrl","videoUrl","_ref$helpDocUrl","_ref$isGenerating","isGenerating","_ref$isLoading","_ref$handleGenerateAp","handleGenerateApiKey","_ref$setIsDemoModalOp","setIsDemoModalOpen","Spinner"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,IAAMA,2BAA2B,GAAGC,cAAG,CAACC,MAAM,CAAC;EAC7CC,KAAK,EAAEF,cAAG,CAACG,MAAM,EAAE,CAChBC,IAAI,CAACC,SAAC,CAAC,8CAA8C,CAAC,CAAC,CACvDC,QAAQ,CAACD,SAAC,CAAC,yCAAyC,CAAC,CAAC,CACtDE,MAAM;AACX,CAAC,CAAC;AAEK,IAAMC,6BAA6B,GAAG;AAC3CC,EAAAA,aAAa,EAAE;AAAEP,IAAAA,KAA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iBAC7BlG,cAAA,CAAC2F,aAAa,EAAA;AAAC1G,UAAAA,MAAM,EAAEiH;SAAqB,CAC7C,EACAf,oBAAU,CAACiB,QAAQ,CAAC,iBACnBpG,cAAA,CAACoF,MAAM,EAAA;AACLjH,UAAAA,KAAK,EAAEG,CAAC,CAAC,0CAA0C,CAAE;AACrD4B,UAAAA,KAAK,EAAC,MAAM;UACZd,OAAO,EAAE,SAATA,OAAOA,GAAA;YAAA,OAAQwH,kBAAkB,CAAC,IAAI,CAAC;AAAA;AAAC,SACzC,CACF;AAAA,OACE,CAAC;AAAA,KACH,CAAC,eACN5G,cAAA,CAACe,WAAW,EAAA;AACJV,MAAAA,OAAO,EAAPA,OAAO;AAAEc,MAAAA,YAAY,EAAZA,YAAY;AAAEG,MAAAA,UAAU,EAAVA,UAAU;AAAEE,MAAAA,qBAAqB,EAArBA;AAAqB,KAC/D,CAAC;AAAA,GACC,CAAC;AAEV;;;;"}
|
|
1
|
+
{"version":3,"file":"ZapierForm.js","sources":["../../app/javascript/src/components/Integrations/ZapierForm/constants.js","../../app/javascript/src/components/Integrations/ZapierForm/utils.jsx","../../app/javascript/src/components/Integrations/ZapierForm/ApiKeysList.jsx","../../app/javascript/src/components/Integrations/ZapierForm/GenerateKey.jsx","../../app/javascript/src/components/Integrations/ZapierForm/NewApiKeyInfo.jsx","../../app/javascript/src/components/Integrations/ZapierForm/index.jsx"],"sourcesContent":["import { t } from \"i18next\";\nimport * as Yup from \"yup\";\n\nconst GENERATE_API_KEY_VALIDATION = Yup.object({\n label: Yup.string()\n .trim(t(\"neetoIntegrations.zapier.label.noBlankSpaces\"))\n .required(t(\"neetoIntegrations.zapier.label.required\"))\n .strict(),\n});\n\nexport const GENERATE_API_KEY_FORMIK_PROPS = {\n initialValues: { label: \"\" },\n validationSchema: GENERATE_API_KEY_VALIDATION,\n validateOnBlur: false,\n};\n\nexport const MENU_ITEMS = { DELETE: \"delete\" };\n","import { t } from \"i18next\";\nimport { timeFormat } from \"neetocommons/utils\";\nimport MoreDropdown from \"neetomolecules/MoreDropdown\";\nimport { Typography } from \"neetoui\";\n\nimport { MENU_ITEMS } from \"./constants\";\n\nconst getMenuItems = ({ apiKey, setApiKeyToDelete }) => [\n {\n key: MENU_ITEMS.DELETE,\n \"data-testid\": \"delete-apikey-button\",\n label: t(\"neetoIntegrations.common.delete\"),\n onClick: () => setApiKeyToDelete(apiKey),\n },\n];\n\nexport const getApiKeysTableColumnData = () => [\n {\n title: t(\"neetoIntegrations.zapier.tableColumns.label\"),\n dataIndex: \"options\",\n key: \"options\",\n width: 272,\n render: (options, { actions }) => (\n <div className=\"flex items-center justify-between gap-x-3\">\n <Typography className=\"w-4/5\" style=\"body2\">\n {options?.label}\n </Typography>\n {actions}\n </div>\n ),\n },\n {\n title: t(\"neetoIntegrations.zapier.tableColumns.createdAt\"),\n dataIndex: \"createdAt\",\n key: \"createdAt\",\n width: 200,\n },\n];\n\nexport const getApiKeysTableRowData = ({ apiKeys, setApiKeyToDelete }) =>\n apiKeys.map(apiKey => ({\n ...apiKey,\n createdAt: timeFormat.fromNow(apiKey.createdAt),\n actions: (\n <MoreDropdown\n dropdownProps={{ strategy: \"fixed\" }}\n menuItems={getMenuItems({ apiKey, setApiKeyToDelete })}\n />\n ),\n }));\n","import { useState } from \"react\";\n\nimport { noop } from \"neetocist\";\nimport { DEFAULT_PAGE_SIZE, DEFAULT_PAGE_INDEX } from \"neetocommons/constants\";\nimport TableWrapper from \"neetomolecules/TableWrapper\";\nimport { Alert, Table, Typography } from \"neetoui\";\nimport { isNotNil, isEmpty } from \"ramda\";\nimport { Trans, useTranslation } from \"react-i18next\";\n\nimport { getApiKeysTableColumnData, getApiKeysTableRowData } from \"./utils\";\n\nconst ApiKeysList = ({\n apiKeys = [],\n deleteApiKey = noop,\n isDeleting = false,\n setNewlyCreatedApiKey = noop,\n}) => {\n const [apiKeyToDelete, setApiKeyToDelete] = useState(null);\n const [currentPageNumber, setCurrentPageNumber] =\n useState(DEFAULT_PAGE_INDEX);\n\n const { t } = useTranslation();\n\n const closeAlert = () => setApiKeyToDelete(null);\n\n const handleSubmit = () => {\n deleteApiKey(apiKeyToDelete?.id, {\n onSuccess: () => {\n closeAlert();\n setNewlyCreatedApiKey(\"\");\n },\n });\n };\n\n if (isEmpty(apiKeys)) return null;\n\n return (\n <>\n <Typography className=\"mb-3\" style=\"h3\">\n {t(\"neetoIntegrations.zapier.tableTitle\")}\n </Typography>\n <TableWrapper>\n <Table\n {...{ currentPageNumber }}\n fixedHeight\n allowRowClick={false}\n columnData={getApiKeysTableColumnData()}\n defaultPageSize={DEFAULT_PAGE_SIZE}\n handlePageChange={setCurrentPageNumber}\n rowData={getApiKeysTableRowData({ apiKeys, setApiKeyToDelete })}\n />\n </TableWrapper>\n <Alert\n backdropClassName=\"zapier-delete-alert\"\n isOpen={isNotNil(apiKeyToDelete)}\n isSubmitting={isDeleting}\n submitButtonLabel={t(\"neetoIntegrations.common.delete\")}\n title={t(\"neetoIntegrations.zapier.deleteApiKey.title\")}\n message={\n <Trans\n i18nKey=\"neetoIntegrations.zapier.deleteApiKey.message\"\n values={{ key: apiKeyToDelete?.options?.label }}\n />\n }\n onClose={closeAlert}\n onSubmit={handleSubmit}\n />\n </>\n );\n};\n\nexport default ApiKeysList;\n","import { useEffect, useRef } from \"react\";\n\nimport { isNotEmpty } from \"neetocist\";\nimport CardLayout from \"neetomolecules/CardLayout\";\nimport { Button } from \"neetoui\";\nimport { ActionBlock, Form, Input } from \"neetoui/formik\";\nimport { useTranslation } from \"react-i18next\";\nimport { useHistory } from \"react-router-dom\";\n\nimport { GENERATE_API_KEY_FORMIK_PROPS } from \"./constants\";\n\nconst GenerateKey = ({ handleSubmit, isLoading, helpDocUrl }) => {\n const { t } = useTranslation();\n const inputRef = useRef(null);\n const history = useHistory();\n\n useEffect(() => {\n if (!inputRef.current) return;\n inputRef.current.focus();\n }, []);\n\n return (\n <Form\n className=\"w-full\"\n formikProps={{\n ...GENERATE_API_KEY_FORMIK_PROPS,\n onSubmit: handleSubmit,\n }}\n >\n <CardLayout\n title={t(\"neetoIntegrations.zapier.apiKeys\")}\n actionBlock={\n <ActionBlock\n cancelButtonProps={{ onClick: () => history.goBack() }}\n isSubmitting={isLoading}\n submitButtonProps={{\n label: t(\"neetoIntegrations.zapier.generateApiKey\"),\n }}\n />\n }\n description={\n <>\n {t(\"neetoIntegrations.zapier.emptyText\")}{\" \"}\n {isNotEmpty(helpDocUrl) && (\n <Button\n href={helpDocUrl}\n label={t(\"neetoIntegrations.zapier.learnMore\")}\n style=\"link\"\n target=\"_blank\"\n />\n )}\n </>\n }\n >\n <Input\n name=\"label\"\n placeholder={t(\"neetoIntegrations.zapier.labelInputPlaceholder\")}\n ref={inputRef}\n />\n </CardLayout>\n </Form>\n );\n};\n\nexport default GenerateKey;\n","import { withT } from \"neetocommons/react-utils\";\nimport CopyToClipboardButton from \"neetomolecules/CopyToClipboardButton\";\nimport { Typography } from \"neetoui\";\n\nconst NewApiKeyInfo = withT(({ t, apiKey }) => (\n <div className=\"space-y-3\">\n <Typography style=\"body2\" weight=\"normal\">\n {t(\"neetoIntegrations.zapier.newApiKeyInstruction\")}\n </Typography>\n <div className=\"flex gap-2\">\n <Typography\n className=\"neeto-ui-bg-gray-50 neeto-ui-border-gray-300 neeto-ui-rounded min-w-96 border px-2 py-1\"\n style=\"body2\"\n weight=\"medium\"\n >\n {apiKey}\n </Typography>\n <CopyToClipboardButton value={apiKey} />\n </div>\n </div>\n));\n\nexport default NewApiKeyInfo;\n","import { isNotEmpty, noop } from \"neetocist\";\nimport { Button, Spinner } from \"neetoui\";\nimport { useTranslation } from \"react-i18next\";\n\nimport ApiKeysList from \"./ApiKeysList\";\nimport GenerateKey from \"./GenerateKey\";\nimport NewApiKeyInfo from \"./NewApiKeyInfo\";\n\nconst ZapierForm = ({\n newlyCreatedApiKey = \"\",\n videoUrl = \"\",\n helpDocUrl = \"\",\n apiKeys = [],\n isGenerating = false,\n isLoading = true,\n isDeleting = false,\n deleteApiKey = noop,\n handleGenerateApiKey = noop,\n setNewlyCreatedApiKey = noop,\n setIsDemoModalOpen = noop,\n}) => {\n const { t } = useTranslation();\n\n if (isLoading) {\n return (\n <div className=\"flex h-full w-full items-center justify-center\">\n <Spinner />\n </div>\n );\n }\n\n return (\n <div className=\"mx-auto flex w-full max-w-3xl flex-col items-start space-y-6\">\n <div className=\"w-full\">\n <GenerateKey\n {...{ helpDocUrl, videoUrl }}\n handleSubmit={handleGenerateApiKey}\n isLoading={isGenerating}\n />\n <div className=\"space-y-4\">\n {isNotEmpty(newlyCreatedApiKey) && (\n <NewApiKeyInfo apiKey={newlyCreatedApiKey} />\n )}\n {isNotEmpty(videoUrl) && (\n <Button\n label={t(\"neetoIntegrations.zapier.walkthroughText\")}\n style=\"link\"\n onClick={() => setIsDemoModalOpen(true)}\n />\n )}\n </div>\n </div>\n <ApiKeysList\n {...{ apiKeys, deleteApiKey, isDeleting, setNewlyCreatedApiKey }}\n />\n </div>\n );\n};\n\nexport default ZapierForm;\n"],"names":["GENERATE_API_KEY_VALIDATION","Yup","object","label","string","trim","t","required","strict","GENERATE_API_KEY_FORMIK_PROPS","initialValues","validationSchema","validateOnBlur","MENU_ITEMS","DELETE","getMenuItems","_ref","apiKey","setApiKeyToDelete","key","onClick","getApiKeysTableColumnData","title","dataIndex","width","render","options","_ref2","actions","_jsxs","className","children","_jsx","Typography","style","getApiKeysTableRowData","_ref3","apiKeys","map","_objectSpread","createdAt","timeFormat","fromNow","MoreDropdown","dropdownProps","strategy","menuItems","ApiKeysList","_apiKeyToDelete$optio","_ref$apiKeys","_ref$deleteApiKey","deleteApiKey","noop","_ref$isDeleting","isDeleting","_ref$setNewlyCreatedA","setNewlyCreatedApiKey","_useState","useState","_useState2","_slicedToArray","apiKeyToDelete","_useState3","DEFAULT_PAGE_INDEX","_useState4","currentPageNumber","setCurrentPageNumber","_useTranslation","useTranslation","closeAlert","handleSubmit","id","onSuccess","isEmpty","_Fragment","TableWrapper","Table","fixedHeight","allowRowClick","columnData","defaultPageSize","DEFAULT_PAGE_SIZE","handlePageChange","rowData","Alert","backdropClassName","isOpen","isNotNil","isSubmitting","submitButtonLabel","message","Trans","i18nKey","values","onClose","onSubmit","GenerateKey","isLoading","helpDocUrl","inputRef","useRef","history","useHistory","useEffect","current","focus","Form","formikProps","CardLayout","actionBlock","ActionBlock","cancelButtonProps","goBack","submitButtonProps","description","isNotEmpty","Button","href","target","Input","name","placeholder","ref","NewApiKeyInfo","withT","weight","CopyToClipboardButton","value","ZapierForm","_ref$newlyCreatedApiK","newlyCreatedApiKey","_ref$videoUrl","videoUrl","_ref$helpDocUrl","_ref$isGenerating","isGenerating","_ref$isLoading","_ref$handleGenerateAp","handleGenerateApiKey","_ref$setIsDemoModalOp","setIsDemoModalOpen","Spinner"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,IAAMA,2BAA2B,GAAGC,cAAG,CAACC,MAAM,CAAC;EAC7CC,KAAK,EAAEF,cAAG,CAACG,MAAM,EAAE,CAChBC,IAAI,CAACC,SAAC,CAAC,8CAA8C,CAAC,CAAC,CACvDC,QAAQ,CAACD,SAAC,CAAC,yCAAyC,CAAC,CAAC,CACtDE,MAAM;AACX,CAAC,CAAC;AAEK,IAAMC,6BAA6B,GAAG;AAC3CC,EAAAA,aAAa,EAAE;AAAEP,IAAAA,KAAK,EAAE;GAAI;AAC5BQ,EAAAA,gBAAgB,EAAEX,2BAA2B;AAC7CY,EAAAA,cAAc,EAAE;AAClB,CAAC;AAEM,IAAMC,UAAU,GAAG;AAAEC,EAAAA,MAAM,EAAE;AAAS,CAAC;;;;ACT9C,IAAMC,YAAY,GAAG,SAAfA,YAAYA,CAAAC,IAAA,EAAA;AAAA,EAAA,IAAMC,MAAM,GAAAD,IAAA,CAANC,MAAM;IAAEC,iBAAiB,GAAAF,IAAA,CAAjBE,iBAAiB;AAAA,EAAA,OAAO,CACtD;IACEC,GAAG,EAAEN,UAAU,CAACC,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ACN5G,cAAA,CAACe,WAAW,EAAA;AACJV,MAAAA,OAAO,EAAPA,OAAO;AAAEc,MAAAA,YAAY,EAAZA,YAAY;AAAEG,MAAAA,UAAU,EAAVA,UAAU;AAAEE,MAAAA,qBAAqB,EAArBA;AAAqB,KAC/D,CAAC;AAAA,GACC,CAAC;AAEV;;;;"}
|
package/dist/cjs/Zoom.js
CHANGED
|
@@ -16,6 +16,7 @@ var jsxRuntime = require('react/jsx-runtime');
|
|
|
16
16
|
require('@babel/runtime/helpers/defineProperty');
|
|
17
17
|
require('@bigbinary/neeto-icons/Check');
|
|
18
18
|
require('@bigbinary/neetoui/Button');
|
|
19
|
+
require('@bigbinary/neetoui/Callout');
|
|
19
20
|
require('@bigbinary/neetoui/Tooltip');
|
|
20
21
|
require('@bigbinary/neetoui/Typography');
|
|
21
22
|
require('./DisconnectAlert.js');
|
package/dist/cjs/Zoom.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Zoom.js","sources":["../../app/javascript/src/apis/zoom.js","../../app/javascript/src/hooks/reactQuery/useZoomApi.js","../../app/javascript/src/components/Integrations/Zoom/index.jsx"],"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","import { useState } from \"react\";\n\nimport { isPresent, noop } from \"neetocist\";\nimport { Zoom as ZoomIcon } from \"neetoicons/misc\";\nimport { Spinner } from \"neetoui\";\nimport { Trans, useTranslation } from \"react-i18next\";\n\nimport ManageIntegrations from \"components/commons/Manage\";\nimport { useDestroyZoom, useShowZoom } from \"hooks/reactQuery/useZoomApi\";\n\nconst Zoom = ({ connectUrl = \"\", description = \"\", onDisconnect = noop }) => {\n const { t } = useTranslation();\n\n const [isDisconnectAlertOpen, setIsDisconnectAlertOpen] = useState(false);\n\n const { data: { metadata: { email = \"\" } = {} } = {}, isLoading } =\n useShowZoom();\n\n const { mutate: destroyIntegration, isPending: isDisconnecting } =\n useDestroyZoom({\n onSuccess: () => {\n setIsDisconnectAlertOpen(false);\n onDisconnect?.();\n },\n });\n\n const isConnected = isPresent(email);\n\n const handleDisconnect = () => destroyIntegration(\"zoom\");\n\n if (isLoading) {\n return (\n <div className=\"flex h-full w-full items-center justify-center\">\n <Spinner />\n </div>\n );\n }\n\n return (\n <ManageIntegrations\n {...{\n connectUrl,\n isConnected,\n isDisconnectAlertOpen,\n isDisconnecting,\n setIsDisconnectAlertOpen,\n }}\n Icon={ZoomIcon}\n integration=\"zoom\"\n description={\n isConnected ? (\n <Trans\n components={{ underline: <u className=\"font-medium\" /> }}\n i18nKey=\"neetoIntegrations.zoom.account\"\n values={{ email }}\n />\n ) : (\n description\n )\n }\n title={\n isConnected\n ? t(\"neetoIntegrations.zoom.connected\")\n : t(\"neetoIntegrations.zoom.connect\")\n }\n onClose={() => setIsDisconnectAlertOpen(false)}\n onDisconnect={() => handleDisconnect()}\n />\n );\n};\n\nexport default Zoom;\n"],"names":["show","axios","get","INTEGRATION_DETAILS_URL","params","serviceName","integrableType","destroy","concat","INTEGRATIONS_ENGINE_ZOOM_URL","zoomApi","useShowZoom","useQuery","queryKey","QUERY_KEYS","ZOOM_DETAILS","queryFn","staleTime","DEFAULT_STALE_TIME","useDestroyZoom","_ref","onSuccess","useMutationWithInvalidation","keysToInvalidate","Zoom","_ref$connectUrl","connectUrl","_ref$description","description","_ref$onDisconnect","onDisconnect","noop","_useTranslation","useTranslation","t","_useState","useState","_useState2","_slicedToArray","isDisconnectAlertOpen","setIsDisconnectAlertOpen","_useShowZoom","_useShowZoom$data","data","_useShowZoom$data2","_useShowZoom$data2$me","metadata","_useShowZoom$data2$me2","_useShowZoom$data2$me3","email","isLoading","_useDestroyZoom","destroyIntegration","mutate","isDisconnecting","isPending","isConnected","isPresent","handleDisconnect","_jsx","className","children","Spinner","ManageIntegrations","Icon","ZoomIcon","integration","Trans","components","underline","i18nKey","values","title","onClose"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Zoom.js","sources":["../../app/javascript/src/apis/zoom.js","../../app/javascript/src/hooks/reactQuery/useZoomApi.js","../../app/javascript/src/components/Integrations/Zoom/index.jsx"],"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","import { useState } from \"react\";\n\nimport { isPresent, noop } from \"neetocist\";\nimport { Zoom as ZoomIcon } from \"neetoicons/misc\";\nimport { Spinner } from \"neetoui\";\nimport { Trans, useTranslation } from \"react-i18next\";\n\nimport ManageIntegrations from \"components/commons/Manage\";\nimport { useDestroyZoom, useShowZoom } from \"hooks/reactQuery/useZoomApi\";\n\nconst Zoom = ({ connectUrl = \"\", description = \"\", onDisconnect = noop }) => {\n const { t } = useTranslation();\n\n const [isDisconnectAlertOpen, setIsDisconnectAlertOpen] = useState(false);\n\n const { data: { metadata: { email = \"\" } = {} } = {}, isLoading } =\n useShowZoom();\n\n const { mutate: destroyIntegration, isPending: isDisconnecting } =\n useDestroyZoom({\n onSuccess: () => {\n setIsDisconnectAlertOpen(false);\n onDisconnect?.();\n },\n });\n\n const isConnected = isPresent(email);\n\n const handleDisconnect = () => destroyIntegration(\"zoom\");\n\n if (isLoading) {\n return (\n <div className=\"flex h-full w-full items-center justify-center\">\n <Spinner />\n </div>\n );\n }\n\n return (\n <ManageIntegrations\n {...{\n connectUrl,\n isConnected,\n isDisconnectAlertOpen,\n isDisconnecting,\n setIsDisconnectAlertOpen,\n }}\n Icon={ZoomIcon}\n integration=\"zoom\"\n description={\n isConnected ? (\n <Trans\n components={{ underline: <u className=\"font-medium\" /> }}\n i18nKey=\"neetoIntegrations.zoom.account\"\n values={{ email }}\n />\n ) : (\n description\n )\n }\n title={\n isConnected\n ? t(\"neetoIntegrations.zoom.connected\")\n : t(\"neetoIntegrations.zoom.connect\")\n }\n onClose={() => setIsDisconnectAlertOpen(false)}\n onDisconnect={() => handleDisconnect()}\n />\n );\n};\n\nexport default Zoom;\n"],"names":["show","axios","get","INTEGRATION_DETAILS_URL","params","serviceName","integrableType","destroy","concat","INTEGRATIONS_ENGINE_ZOOM_URL","zoomApi","useShowZoom","useQuery","queryKey","QUERY_KEYS","ZOOM_DETAILS","queryFn","staleTime","DEFAULT_STALE_TIME","useDestroyZoom","_ref","onSuccess","useMutationWithInvalidation","keysToInvalidate","Zoom","_ref$connectUrl","connectUrl","_ref$description","description","_ref$onDisconnect","onDisconnect","noop","_useTranslation","useTranslation","t","_useState","useState","_useState2","_slicedToArray","isDisconnectAlertOpen","setIsDisconnectAlertOpen","_useShowZoom","_useShowZoom$data","data","_useShowZoom$data2","_useShowZoom$data2$me","metadata","_useShowZoom$data2$me2","_useShowZoom$data2$me3","email","isLoading","_useDestroyZoom","destroyIntegration","mutate","isDisconnecting","isPending","isConnected","isPresent","handleDisconnect","_jsx","className","children","Spinner","ManageIntegrations","Icon","ZoomIcon","integration","Trans","components","underline","i18nKey","values","title","onClose"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAOA,IAAMA,IAAI,GAAG,SAAPA,IAAIA,GAAA;AAAA,EAAA,OACRC,KAAK,CAACC,GAAG,CAACC,6BAAuB,EAAE;AACjCC,IAAAA,MAAM,EAAE;AAAEC,MAAAA,WAAW,EAAE,MAAM;AAAEC,MAAAA,cAAc,EAAE;AAAO;AACxD,GAAC,CAAC;AAAA,CAAA;AAEJ,IAAMC,OAAO,GAAG,SAAVA,OAAOA,GAAA;AAAA,EAAA,OAASN,KAAK,CAAO,QAAA,CAAA,CAAA,EAAA,CAAAO,MAAA,CAAIC,kCAA4B,WAAQ,CAAC;AAAA,CAAA;AAE3E,IAAMC,OAAO,GAAG;AAAEV,EAAAA,IAAI,EAAJA,IAAI;AAAEO,EAAAA,OAAO,EAAPA;AAAQ,CAAC;;ACP1B,IAAMI,WAAW,GAAG,SAAdA,WAAWA,GAAA;AAAA,EAAA,OACtBC,mBAAQ,CAAC;AACPC,IAAAA,QAAQ,EAAE,CAACC,gBAAU,CAACC,YAAY,CAAC;IACnCC,OAAO,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,UAAU;AACV8B,IAAAA,WAAW,EAAXA,WAAW;AACXjB,IAAAA,qBAAqB,EAArBA,qBAAqB;AACrBe,IAAAA,eAAe,EAAfA,eAAe;AACfd,IAAAA,wBAAwB,EAAxBA,wBAAwB;AAE1BwB,IAAAA,IAAI,EAAEC,QAAS;AACfC,IAAAA,WAAW,EAAC,MAAM;AAClBtC,IAAAA,WAAW,EACT4B,WAAW,gBACTG,cAAA,CAACQ,kBAAK,EAAA;AACJC,MAAAA,UAAU,EAAE;AAAEC,QAAAA,SAAS,eAAEV,cAAA,CAAA,GAAA,EAAA;AAAGC,UAAAA,SAAS,EAAC;SAAe;OAAI;AACzDU,MAAAA,OAAO,EAAC,gCAAgC;AACxCC,MAAAA,MAAM,EAAE;AAAEtB,QAAAA,KAAK,EAALA;AAAM;KACjB,CAAC,GAEFrB,WAEH;IACD4C,KAAK,EACHhB,WAAW,GACPtB,CAAC,CAAC,kCAAkC,CAAC,GACrCA,CAAC,CAAC,gCAAgC,CACvC;IACDuC,OAAO,EAAE,SAATA,OAAOA,GAAA;MAAA,OAAQjC,wBAAwB,CAAC,KAAK,CAAC;KAAC;IAC/CV,YAAY,EAAE,SAAdA,YAAYA,GAAA;MAAA,OAAQ4B,gBAAgB,EAAE;AAAA;AAAC,GACxC,CAAC;AAEN;;;;"}
|
package/dist/cjs/index.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var Manage = require('./Manage.js');
|
|
4
4
|
var DisconnectAlert = require('./DisconnectAlert.js');
|
|
5
5
|
var Daily = require('./Daily.js');
|
|
6
|
-
var DailyForm = require('../Form-
|
|
6
|
+
var DailyForm = require('../Form-Dt4OkRZe.js');
|
|
7
7
|
var GoogleCalendar = require('./GoogleCalendar.js');
|
|
8
8
|
var Telnyx = require('./Telnyx.js');
|
|
9
9
|
var Twilio = require('./Twilio.js');
|
|
@@ -18,6 +18,7 @@ require('@bigbinary/neeto-cist');
|
|
|
18
18
|
require('@bigbinary/neeto-commons-frontend/react-utils');
|
|
19
19
|
require('@bigbinary/neeto-icons/Check');
|
|
20
20
|
require('@bigbinary/neetoui/Button');
|
|
21
|
+
require('@bigbinary/neetoui/Callout');
|
|
21
22
|
require('@bigbinary/neetoui/Tooltip');
|
|
22
23
|
require('@bigbinary/neetoui/Typography');
|
|
23
24
|
require('react-i18next');
|
|
@@ -47,7 +48,6 @@ require('yup');
|
|
|
47
48
|
require('@babel/runtime/helpers/toConsumableArray');
|
|
48
49
|
require('@bigbinary/neeto-icons/misc/GoogleCalendar');
|
|
49
50
|
require('@bigbinary/neeto-icons/misc/Google');
|
|
50
|
-
require('@bigbinary/neetoui/Callout');
|
|
51
51
|
require('@bigbinary/neeto-molecules/PageLoader');
|
|
52
52
|
require('@bigbinary/neetoui/formik/Select');
|
|
53
53
|
require('ramda');
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { default as Manage } from './Manage.js';
|
|
2
2
|
export { default as DisconnectAlert } from './DisconnectAlert.js';
|
|
3
3
|
export { default as Daily } from './Daily.js';
|
|
4
|
-
export { F as DailyForm } from './Form-
|
|
4
|
+
export { F as DailyForm } from './Form-FUvpblX2.js';
|
|
5
5
|
export { default as GoogleCalendar } from './GoogleCalendar.js';
|
|
6
6
|
export { default as Telnyx } from './Telnyx.js';
|
|
7
7
|
export { default as Twilio } from './Twilio.js';
|
|
@@ -16,6 +16,7 @@ import '@bigbinary/neeto-cist';
|
|
|
16
16
|
import '@bigbinary/neeto-commons-frontend/react-utils';
|
|
17
17
|
import '@bigbinary/neeto-icons/Check';
|
|
18
18
|
import '@bigbinary/neetoui/Button';
|
|
19
|
+
import '@bigbinary/neetoui/Callout';
|
|
19
20
|
import '@bigbinary/neetoui/Tooltip';
|
|
20
21
|
import '@bigbinary/neetoui/Typography';
|
|
21
22
|
import 'react-i18next';
|
|
@@ -45,7 +46,6 @@ import 'yup';
|
|
|
45
46
|
import '@babel/runtime/helpers/toConsumableArray';
|
|
46
47
|
import '@bigbinary/neeto-icons/misc/GoogleCalendar';
|
|
47
48
|
import '@bigbinary/neeto-icons/misc/Google';
|
|
48
|
-
import '@bigbinary/neetoui/Callout';
|
|
49
49
|
import '@bigbinary/neeto-molecules/PageLoader';
|
|
50
50
|
import '@bigbinary/neetoui/formik/Select';
|
|
51
51
|
import 'ramda';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bigbinary/neeto-integrations-frontend",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.17",
|
|
4
4
|
"description": "UI for integrations in neeto products",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"homepage": "https://github.com/bigbinary/neeto-integrations-nano",
|
|
@@ -65,9 +65,9 @@
|
|
|
65
65
|
"@bigbinary/neeto-cist": "1.0.17",
|
|
66
66
|
"@bigbinary/neeto-commons-frontend": "4.13.91",
|
|
67
67
|
"@bigbinary/neeto-filters-frontend": "4.3.28",
|
|
68
|
-
"@bigbinary/neeto-icons": "1.20.
|
|
69
|
-
"@bigbinary/neeto-molecules": "4.0.
|
|
70
|
-
"@bigbinary/neetoui": "8.3.
|
|
68
|
+
"@bigbinary/neeto-icons": "1.20.71",
|
|
69
|
+
"@bigbinary/neeto-molecules": "4.0.127",
|
|
70
|
+
"@bigbinary/neetoui": "8.3.53",
|
|
71
71
|
"@emotion/is-prop-valid": "1.2.0",
|
|
72
72
|
"@faker-js/faker": "8.2.0",
|
|
73
73
|
"@honeybadger-io/js": "6.10.1",
|
|
@@ -178,9 +178,9 @@
|
|
|
178
178
|
"@bigbinary/neeto-cist": "1.0.17",
|
|
179
179
|
"@bigbinary/neeto-commons-frontend": "4.13.91",
|
|
180
180
|
"@bigbinary/neeto-filters-frontend": "4.3.28",
|
|
181
|
-
"@bigbinary/neeto-icons": "1.20.
|
|
182
|
-
"@bigbinary/neeto-molecules": "4.0.
|
|
183
|
-
"@bigbinary/neetoui": "8.3.
|
|
181
|
+
"@bigbinary/neeto-icons": "1.20.71",
|
|
182
|
+
"@bigbinary/neeto-molecules": "4.0.127",
|
|
183
|
+
"@bigbinary/neetoui": "8.3.53",
|
|
184
184
|
"@honeybadger-io/js": "6.10.1",
|
|
185
185
|
"@honeybadger-io/react": "6.1.25",
|
|
186
186
|
"@tailwindcss/container-queries": "^0.1.1",
|
package/types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IconProps } from "neetoicons";
|
|
2
|
-
import { ButtonProps, TooltipProps } from "neetoui";
|
|
2
|
+
import { ButtonProps, CalloutProps, TooltipProps } from "neetoui";
|
|
3
3
|
import React from "react";
|
|
4
4
|
|
|
5
5
|
declare global {
|
|
@@ -30,6 +30,7 @@ interface ManageProps {
|
|
|
30
30
|
connectTooltipProps?: Partial<TooltipProps>;
|
|
31
31
|
buttonProps?: Partial<ButtonProps>;
|
|
32
32
|
secondaryButtonProps?: Partial<ButtonProps>;
|
|
33
|
+
calloutProps?: Partial<CalloutProps>;
|
|
33
34
|
}
|
|
34
35
|
interface CardProps {
|
|
35
36
|
icon: React.FC<IconProps>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Form-DKAK6ylB.js","sources":["../app/javascript/src/apis/dailies.js","../app/javascript/src/hooks/reactQuery/useDailiesApi.js","../app/javascript/src/components/Integrations/Daily/constants.js","../app/javascript/src/components/Integrations/Daily/Form.jsx"],"sourcesContent":["import axios from \"axios\";\n\nimport { INTEGRATIONS_ENGINE_DAILY_URL } from \"src/constants/urls\";\n\nconst create = payload =>\n axios.post(INTEGRATIONS_ENGINE_DAILY_URL, { daily: payload });\n\nconst show = () => axios.get(INTEGRATIONS_ENGINE_DAILY_URL);\n\nconst destroy = () => axios.delete(INTEGRATIONS_ENGINE_DAILY_URL);\n\nconst dailiesApi = { create, show, destroy };\n\nexport default dailiesApi;\n","import { useQuery } from \"@tanstack/react-query\";\nimport { DEFAULT_STALE_TIME } from \"neetocommons/constants\";\nimport { useMutationWithInvalidation } from \"neetocommons/react-utils\";\n\nimport dailiesApi from \"apis/dailies\";\nimport { QUERY_KEYS } from \"src/constants/query\";\n\nexport const useCreateDaily = (options = {}) =>\n useMutationWithInvalidation(dailiesApi.create, {\n keysToInvalidate: [[QUERY_KEYS.DAILY_CO_DETAILS]],\n ...options,\n });\n\nexport const useFetchDaily = () =>\n useQuery({\n queryKey: [QUERY_KEYS.DAILY_CO_DETAILS],\n queryFn: dailiesApi.show,\n staleTime: DEFAULT_STALE_TIME,\n });\n\nexport const useDestroyDaily = ({ onSuccess }) =>\n useMutationWithInvalidation(dailiesApi.destroy, {\n keysToInvalidate: [[QUERY_KEYS.DAILY_CO_DETAILS]],\n onSuccess,\n });\n","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 { withTitle } from \"neetocommons/react-utils\";\nimport CardLayout from \"neetomolecules/CardLayout\";\nimport Container from \"neetomolecules/Container\";\nimport Header from \"neetomolecules/Header\";\nimport { Button, Spinner, Typography } from \"neetoui\";\nimport { Input, Form as FormikForm, ActionBlock } from \"neetoui/formik\";\nimport { Trans, useTranslation } from \"react-i18next\";\nimport { useHistory } from \"react-router-dom\";\n\nimport WalkthroughModal from \"components/WalkthroughModal\";\nimport { useCreateDaily } from \"hooks/reactQuery/useDailiesApi\";\n\nimport {\n MANAGE_DAILY_CO_FORM_INITIAL_VALUES,\n DAILY_CO_VALIDATION_SCHEMA,\n} from \"./constants\";\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 lineHeight=\"normal\" style=\"body2\">\n <Trans\n i18nKey=\"neetoIntegrations.daily.helpDoc\"\n components={{\n videoLink: (\n <Button\n style=\"link\"\n onClick={() => setIsDemoModalOpen(true)}\n />\n ),\n }}\n />\n </Typography>\n ),\n helpLinkProps: {\n href: helpDocUrl,\n \"data-cy\": \"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 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":["create","payload","axios","post","INTEGRATIONS_ENGINE_DAILY_URL","daily","show","get","destroy","dailiesApi","useCreateDaily","options","arguments","length","undefined","useMutationWithInvalidation","_objectSpread","keysToInvalidate","QUERY_KEYS","DAILY_CO_DETAILS","useFetchDaily","useQuery","queryKey","queryFn","staleTime","DEFAULT_STALE_TIME","useDestroyDaily","_ref","onSuccess","MANAGE_DAILY_CO_FORM_INITIAL_VALUES","apiKey","DAILY_CO_VALIDATION_SCHEMA","yup","object","shape","string","trim","required","t","entity","Form","helpDocUrl","videoUrl","onConnect","breadcrumbs","_useTranslation","useTranslation","history","useHistory","_useState","useState","_useState2","_slicedToArray","isDemoModalOpen","setIsDemoModalOpen","_useCreateDaily","createDaily","mutate","isConnecting","isPending","handleSubmit","_jsx","className","children","Spinner","_jsxs","Container","isHeaderFixed","Header","title","titleHelpPopoverProps","description","Typography","lineHeight","style","Trans","i18nKey","components","videoLink","Button","onClick","helpLinkProps","href","FormikForm","formikProps","initialValues","validationSchema","onSubmit","CardLayout","actionBlock","ActionBlock","cancelButtonProps","goBack","isSubmitting","submitButtonProps","label","Input","autoFocus","name","WalkthroughModal","isOpen","onClose","withTitle","i18next"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAIA,IAAMA,MAAM,GAAG,SAATA,MAAMA,CAAGC,OAAO,EAAA;AAAA,EAAA,OACpBC,KAAK,CAACC,IAAI,CAACC,6BAA6B,EAAE;AAAEC,IAAAA,KAAK,EAAEJ;AAAQ,GAAC,CAAC;AAAA,CAAA;AAE/D,IAAMK,IAAI,GAAG,SAAPA,IAAIA,GAAA;AAAA,EAAA,OAASJ,KAAK,CAACK,GAAG,CAACH,6BAA6B,CAAC;AAAA,CAAA;AAE3D,IAAMI,OAAO,GAAG,SAAVA,OAAOA,GAAA;AAAA,EAAA,OAASN,KAAK,CAAA,QAAA,CAAO,CAACE,6BAA6B,CAAC;AAAA,CAAA;AAEjE,IAAMK,UAAU,GAAG;AAAET,EAAAA,MAAM,EAANA,MAAM;AAAEM,EAAAA,IAAI,EAAJA,IAAI;AAAEE,EAAAA,OAAO,EAAPA;AAAQ,CAAC;;;;ACJrC,IAAME,cAAc,GAAG,SAAjBA,cAAcA,GAAA;AAAA,EAAA,IAAIC,OAAO,G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AAiB,EAAE;cACjBC,KAAK,EAAEzD,CAAC,CAAC,kCAAkC;AAC7C;AAAE,WACH,CACF;UAAAyB,QAAA,eAEDF,GAAA,CAACmC,KAAK,EAAA;YACJC,SAAS,EAAA,IAAA;YACT5D,QAAQ,EAAA,IAAA;AACR0D,YAAAA,KAAK,EAAEzD,CAAC,CAAC,gCAAgC,CAAE;AAC3C4D,YAAAA,IAAI,EAAC;WACN;SACS;AAAC,OACH,CAAC,eACbrC,GAAA,CAACsC,gBAAgB,EAAA;AACTzD,QAAAA,QAAQ,EAARA,QAAQ;AACd0D,QAAAA,MAAM,EAAE/C,eAAgB;QACxBgD,OAAO,EAAE,SAATA,OAAOA,GAAA;UAAA,OAAQ/C,kBAAkB,CAAC,KAAK,CAAC;AAAA;AAAC,OAC1C,CAAC;AAAA,KACC,CAAC;AAAA,GACG,CAAC;AAEhB,CAAC;AACD,aAAegD,SAAS,CACtB9D,IAAI,EACJ+D,OAAO,CAACjE,CAAC,CAAC,sDAAsD,CAClE,CAAC;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Form-DlSv5McM.js","sources":["../app/javascript/src/apis/dailies.js","../app/javascript/src/hooks/reactQuery/useDailiesApi.js","../app/javascript/src/components/Integrations/Daily/constants.js","../app/javascript/src/components/Integrations/Daily/Form.jsx"],"sourcesContent":["import axios from \"axios\";\n\nimport { INTEGRATIONS_ENGINE_DAILY_URL } from \"src/constants/urls\";\n\nconst create = payload =>\n axios.post(INTEGRATIONS_ENGINE_DAILY_URL, { daily: payload });\n\nconst show = () => axios.get(INTEGRATIONS_ENGINE_DAILY_URL);\n\nconst destroy = () => axios.delete(INTEGRATIONS_ENGINE_DAILY_URL);\n\nconst dailiesApi = { create, show, destroy };\n\nexport default dailiesApi;\n","import { useQuery } from \"@tanstack/react-query\";\nimport { DEFAULT_STALE_TIME } from \"neetocommons/constants\";\nimport { useMutationWithInvalidation } from \"neetocommons/react-utils\";\n\nimport dailiesApi from \"apis/dailies\";\nimport { QUERY_KEYS } from \"src/constants/query\";\n\nexport const useCreateDaily = (options = {}) =>\n useMutationWithInvalidation(dailiesApi.create, {\n keysToInvalidate: [[QUERY_KEYS.DAILY_CO_DETAILS]],\n ...options,\n });\n\nexport const useFetchDaily = () =>\n useQuery({\n queryKey: [QUERY_KEYS.DAILY_CO_DETAILS],\n queryFn: dailiesApi.show,\n staleTime: DEFAULT_STALE_TIME,\n });\n\nexport const useDestroyDaily = ({ onSuccess }) =>\n useMutationWithInvalidation(dailiesApi.destroy, {\n keysToInvalidate: [[QUERY_KEYS.DAILY_CO_DETAILS]],\n onSuccess,\n });\n","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 { withTitle } from \"neetocommons/react-utils\";\nimport CardLayout from \"neetomolecules/CardLayout\";\nimport Container from \"neetomolecules/Container\";\nimport Header from \"neetomolecules/Header\";\nimport { Button, Spinner, Typography } from \"neetoui\";\nimport { Input, Form as FormikForm, ActionBlock } from \"neetoui/formik\";\nimport { Trans, useTranslation } from \"react-i18next\";\nimport { useHistory } from \"react-router-dom\";\n\nimport WalkthroughModal from \"components/WalkthroughModal\";\nimport { useCreateDaily } from \"hooks/reactQuery/useDailiesApi\";\n\nimport {\n MANAGE_DAILY_CO_FORM_INITIAL_VALUES,\n DAILY_CO_VALIDATION_SCHEMA,\n} from \"./constants\";\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 lineHeight=\"normal\" style=\"body2\">\n <Trans\n i18nKey=\"neetoIntegrations.daily.helpDoc\"\n components={{\n videoLink: (\n <Button\n style=\"link\"\n onClick={() => setIsDemoModalOpen(true)}\n />\n ),\n }}\n />\n </Typography>\n ),\n helpLinkProps: {\n href: helpDocUrl,\n \"data-cy\": \"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 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":["create","payload","axios","post","INTEGRATIONS_ENGINE_DAILY_URL","daily","show","get","destroy","dailiesApi","useCreateDaily","options","arguments","length","undefined","useMutationWithInvalidation","_objectSpread","keysToInvalidate","QUERY_KEYS","DAILY_CO_DETAILS","useFetchDaily","useQuery","queryKey","queryFn","staleTime","DEFAULT_STALE_TIME","useDestroyDaily","_ref","onSuccess","MANAGE_DAILY_CO_FORM_INITIAL_VALUES","apiKey","DAILY_CO_VALIDATION_SCHEMA","yup","object","shape","string","trim","required","t","entity","Form","helpDocUrl","videoUrl","onConnect","breadcrumbs","_useTranslation","useTranslation","history","useHistory","_useState","useState","_useState2","_slicedToArray","isDemoModalOpen","setIsDemoModalOpen","_useCreateDaily","createDaily","mutate","isConnecting","isPending","handleSubmit","_jsx","className","children","Spinner","_jsxs","Container","isHeaderFixed","Header","title","titleHelpPopoverProps","description","Typography","lineHeight","style","Trans","i18nKey","components","videoLink","Button","onClick","helpLinkProps","href","FormikForm","formikProps","initialValues","validationSchema","onSubmit","CardLayout","actionBlock","ActionBlock","cancelButtonProps","goBack","isSubmitting","submitButtonProps","label","Input","autoFocus","name","WalkthroughModal","isOpen","onClose","withTitle","i18next"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,IAAMA,MAAM,GAAG,SAATA,MAAMA,CAAGC,OAAO,EAAA;AAAA,EAAA,OACpBC,KAAK,CAACC,IAAI,CAACC,mCAA6B,EAAE;AAAEC,IAAAA,KAAK,EAAEJ;AAAQ,GAAC,CAAC;AAAA,CAAA;AAE/D,IAAMK,IAAI,GAAG,SAAPA,IAAIA,GAAA;AAAA,EAAA,OAASJ,KAAK,CAACK,GAAG,CAACH,mCAA6B,CAAC;AAAA,CAAA;AAE3D,IAAMI,OAAO,GAAG,SAAVA,OAAOA,GAAA;AAAA,EAAA,OAASN,KAAK,CAAA,QAAA,CAAO,CAACE,mCAA6B,CAAC;AAAA,CAAA;AAEjE,IAAMK,UAAU,GAAG;AAAET,EAAAA,MAAM,EAANA,MAAM;AAAEM,EAAAA,IAAI,EAAJA,IAAI;AAAEE,EAAAA,OAAO,EAAPA;AAAQ,CAAC;;;;ACJrC,IAAME,cAAc,GAAG,SAAjBA,cAAcA,GAAA;AAAA,EAAA,IAAIC,OAAO,GAAAC,SAAA,CAA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