@bigbinary/neeto-integrations-frontend 4.2.8 → 5.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app/javascript/src/translations/ar.json +6 -6
- package/app/javascript/src/translations/bg.json +5 -5
- package/app/javascript/src/translations/ca.json +8 -8
- package/app/javascript/src/translations/cs.json +5 -5
- package/app/javascript/src/translations/da.json +2 -2
- package/app/javascript/src/translations/de.json +2 -2
- package/app/javascript/src/translations/en.json +9 -9
- package/app/javascript/src/translations/es-MX.json +8 -8
- package/app/javascript/src/translations/es.json +3 -3
- package/app/javascript/src/translations/et.json +6 -6
- package/app/javascript/src/translations/fi.json +3 -3
- package/app/javascript/src/translations/fil.json +9 -9
- package/app/javascript/src/translations/fr.json +3 -3
- package/app/javascript/src/translations/he.json +4 -4
- package/app/javascript/src/translations/hi.json +5 -5
- package/app/javascript/src/translations/hr.json +5 -5
- package/app/javascript/src/translations/hu.json +2 -2
- package/app/javascript/src/translations/id.json +5 -5
- package/app/javascript/src/translations/it.json +5 -5
- package/app/javascript/src/translations/ja.json +9 -9
- package/app/javascript/src/translations/ko.json +5 -5
- package/app/javascript/src/translations/lv.json +3 -3
- package/app/javascript/src/translations/nl.json +2 -2
- package/app/javascript/src/translations/pl.json +2 -2
- package/app/javascript/src/translations/pt-BR.json +1 -1
- package/app/javascript/src/translations/pt.json +2 -2
- package/app/javascript/src/translations/ro.json +6 -6
- package/app/javascript/src/translations/ru.json +3 -3
- package/app/javascript/src/translations/sk.json +3 -3
- package/app/javascript/src/translations/sl.json +4 -4
- package/app/javascript/src/translations/sv.json +3 -3
- package/app/javascript/src/translations/th.json +4 -4
- package/app/javascript/src/translations/tr.json +9 -9
- package/app/javascript/src/translations/uk.json +4 -4
- package/app/javascript/src/translations/vi.json +9 -9
- package/app/javascript/src/translations/zh-CN.json +1 -1
- package/app/javascript/src/translations/zh-TW.json +2 -2
- package/dist/.ready +1 -1
- package/dist/Connect.js +1 -3
- package/dist/Connect.js.map +1 -1
- package/dist/Daily.js +2 -2
- package/dist/Daily.js.map +1 -1
- package/dist/DailyForm.js +2 -2
- package/dist/DailyForm.js.map +1 -1
- package/dist/Demo.js.map +1 -1
- package/dist/DisconnectAlert.js +1 -3
- package/dist/DisconnectAlert.js.map +1 -1
- package/dist/Finish.js +29 -6
- package/dist/Finish.js.map +1 -1
- package/dist/GoogleCalendar.js +1 -4
- package/dist/GoogleCalendar.js.map +1 -1
- package/dist/Manage.js +1 -3
- package/dist/Manage.js.map +1 -1
- package/dist/Modal.js.map +1 -1
- package/dist/Telnyx.js +8 -8
- package/dist/Telnyx.js.map +1 -1
- package/dist/Twilio.js +2 -4
- package/dist/Twilio.js.map +1 -1
- package/dist/WalkthroughModal.js.map +1 -1
- package/dist/ZapierForm.js +2 -6
- package/dist/ZapierForm.js.map +1 -1
- package/dist/Zoom.js +1 -1
- package/dist/Zoom.js.map +1 -1
- package/dist/cjs/Connect.js +1 -3
- package/dist/cjs/Connect.js.map +1 -1
- package/dist/cjs/Daily.js +2 -2
- package/dist/cjs/Daily.js.map +1 -1
- package/dist/cjs/DailyForm.js +2 -2
- package/dist/cjs/DailyForm.js.map +1 -1
- package/dist/cjs/Demo.js.map +1 -1
- package/dist/cjs/DisconnectAlert.js +1 -3
- package/dist/cjs/DisconnectAlert.js.map +1 -1
- package/dist/cjs/Finish.js +48 -6
- package/dist/cjs/Finish.js.map +1 -1
- package/dist/cjs/GoogleCalendar.js +1 -4
- package/dist/cjs/GoogleCalendar.js.map +1 -1
- package/dist/cjs/Manage.js +1 -3
- package/dist/cjs/Manage.js.map +1 -1
- package/dist/cjs/Modal.js.map +1 -1
- package/dist/cjs/Telnyx.js +8 -8
- package/dist/cjs/Telnyx.js.map +1 -1
- package/dist/cjs/Twilio.js +2 -4
- package/dist/cjs/Twilio.js.map +1 -1
- package/dist/cjs/WalkthroughModal.js.map +1 -1
- package/dist/cjs/ZapierForm.js +2 -6
- package/dist/cjs/ZapierForm.js.map +1 -1
- package/dist/cjs/Zoom.js +1 -1
- package/dist/cjs/Zoom.js.map +1 -1
- package/dist/cjs/index.js +5 -5
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/v2/Connect.js +48 -46
- package/dist/cjs/v2/Connect.js.map +1 -1
- package/dist/cjs/v2/Daily.js +5 -3
- package/dist/cjs/v2/Daily.js.map +1 -1
- package/dist/cjs/v2/DailyForm.js +2 -2
- package/dist/cjs/v2/DailyForm.js.map +1 -1
- package/dist/cjs/v2/Demo.js.map +1 -1
- package/dist/cjs/v2/DisconnectAlert.js +1 -3
- package/dist/cjs/v2/DisconnectAlert.js.map +1 -1
- package/dist/cjs/v2/DisconnectedIntegrationsRibbon.js +1 -3
- package/dist/cjs/v2/DisconnectedIntegrationsRibbon.js.map +1 -1
- package/dist/cjs/v2/Finish.js +4 -6
- package/dist/cjs/v2/Finish.js.map +1 -1
- package/dist/cjs/v2/GoogleCalendar.js +1 -4
- package/dist/cjs/v2/GoogleCalendar.js.map +1 -1
- package/dist/cjs/v2/GoogleMapsForm.js +2 -2
- package/dist/cjs/v2/GoogleMapsForm.js.map +1 -1
- package/dist/cjs/v2/GoogleMapsIcon.js.map +1 -1
- package/dist/cjs/v2/GoogleMapsManage.js +5 -3
- package/dist/cjs/v2/GoogleMapsManage.js.map +1 -1
- package/dist/cjs/v2/Manage.js +70 -91
- package/dist/cjs/v2/Manage.js.map +1 -1
- package/dist/cjs/v2/Modal.js +1 -1
- package/dist/cjs/v2/Modal.js.map +1 -1
- package/dist/cjs/v2/SmsLogs.js +3 -9
- package/dist/cjs/v2/SmsLogs.js.map +1 -1
- package/dist/cjs/v2/Telnyx.js +26 -43
- package/dist/cjs/v2/Telnyx.js.map +1 -1
- package/dist/cjs/v2/Twilio.js +20 -39
- package/dist/cjs/v2/Twilio.js.map +1 -1
- package/dist/cjs/v2/WalkthroughModal.js.map +1 -1
- package/dist/cjs/v2/ZapierForm.js +4 -7
- package/dist/cjs/v2/ZapierForm.js.map +1 -1
- package/dist/cjs/v2/Zoom.js +4 -2
- package/dist/cjs/v2/Zoom.js.map +1 -1
- package/dist/cjs/v2/index.js +11 -8
- package/dist/cjs/v2/index.js.map +1 -1
- package/dist/index-MS1ts-9f.js.map +1 -1
- package/dist/index-dxk7jTL7.js.map +1 -1
- package/dist/index.js +5 -5
- package/dist/index.js.map +1 -1
- package/dist/query-CyER0UTx.js.map +1 -1
- package/dist/query-DFg4la-L.js.map +1 -1
- package/dist/{useDailiesApi-CMyuK99l.js → useDailiesApi-BIZR1qiD.js} +2 -4
- package/dist/useDailiesApi-BIZR1qiD.js.map +1 -0
- package/dist/{useDailiesApi-BmI2LDF7.js → useDailiesApi-BS8aif9t.js} +2 -4
- package/dist/useDailiesApi-BS8aif9t.js.map +1 -0
- package/dist/useDisconnectionAlertsApi-BGaBOO_4.js.map +1 -1
- package/dist/useDisconnectionAlertsApi-BW25EN1l.js.map +1 -1
- package/dist/{useGoogleMapsApi-DypGXFnl.js → useGoogleMapsApi-DcJ5vTJZ.js} +2 -4
- package/dist/useGoogleMapsApi-DcJ5vTJZ.js.map +1 -0
- package/dist/{useGoogleMapsApi-BY5ZIbh1.js → useGoogleMapsApi-sMsxsnL9.js} +2 -4
- package/dist/useGoogleMapsApi-sMsxsnL9.js.map +1 -0
- package/dist/{useTelnyxApi-DH5XaYIo.js → useTelnyxApi-CqB3f44W.js} +2 -4
- package/dist/useTelnyxApi-CqB3f44W.js.map +1 -0
- package/dist/{useTelnyxApi-WH39oUwB.js → useTelnyxApi-fFpslv-E.js} +2 -4
- package/dist/useTelnyxApi-fFpslv-E.js.map +1 -0
- package/dist/{useTwilioApi-CYF8UIPN.js → useTwilioApi-BwkrNBtg.js} +2 -4
- package/dist/useTwilioApi-BwkrNBtg.js.map +1 -0
- package/dist/{useTwilioApi-nN6VRQYc.js → useTwilioApi-CEaEH5MG.js} +2 -4
- package/dist/useTwilioApi-CEaEH5MG.js.map +1 -0
- package/dist/useZoomApi-Be2unav5.js.map +1 -1
- package/dist/useZoomApi-i5CNstmT.js.map +1 -1
- package/dist/utils-fchHJTr3.js +44 -0
- package/dist/utils-fchHJTr3.js.map +1 -0
- package/dist/utils-jyxIYRHb.js +47 -0
- package/dist/utils-jyxIYRHb.js.map +1 -0
- package/dist/v2/Connect.js +48 -46
- package/dist/v2/Connect.js.map +1 -1
- package/dist/v2/Daily.js +5 -3
- package/dist/v2/Daily.js.map +1 -1
- package/dist/v2/DailyForm.js +2 -2
- package/dist/v2/DailyForm.js.map +1 -1
- package/dist/v2/Demo.js.map +1 -1
- package/dist/v2/DisconnectAlert.js +1 -3
- package/dist/v2/DisconnectAlert.js.map +1 -1
- package/dist/v2/DisconnectedIntegrationsRibbon.js +1 -3
- package/dist/v2/DisconnectedIntegrationsRibbon.js.map +1 -1
- package/dist/v2/Finish.js +6 -8
- package/dist/v2/Finish.js.map +1 -1
- package/dist/v2/GoogleCalendar.js +1 -4
- package/dist/v2/GoogleCalendar.js.map +1 -1
- package/dist/v2/GoogleMapsForm.js +2 -2
- package/dist/v2/GoogleMapsForm.js.map +1 -1
- package/dist/v2/GoogleMapsIcon.js.map +1 -1
- package/dist/v2/GoogleMapsManage.js +5 -3
- package/dist/v2/GoogleMapsManage.js.map +1 -1
- package/dist/v2/Manage.js +72 -93
- package/dist/v2/Manage.js.map +1 -1
- package/dist/v2/Modal.js +1 -1
- package/dist/v2/Modal.js.map +1 -1
- package/dist/v2/SmsLogs.js +3 -9
- package/dist/v2/SmsLogs.js.map +1 -1
- package/dist/v2/Telnyx.js +27 -44
- package/dist/v2/Telnyx.js.map +1 -1
- package/dist/v2/Twilio.js +21 -40
- package/dist/v2/Twilio.js.map +1 -1
- package/dist/v2/WalkthroughModal.js.map +1 -1
- package/dist/v2/ZapierForm.js +4 -7
- package/dist/v2/ZapierForm.js.map +1 -1
- package/dist/v2/Zoom.js +4 -2
- package/dist/v2/Zoom.js.map +1 -1
- package/dist/v2/index.js +11 -8
- package/dist/v2/index.js.map +1 -1
- package/package.json +19 -18
- package/dist/success-C6rQdhhF.js +0 -30
- package/dist/success-C6rQdhhF.js.map +0 -1
- package/dist/success-CsNvTPBG.js +0 -51
- package/dist/success-CsNvTPBG.js.map +0 -1
- package/dist/useDailiesApi-BmI2LDF7.js.map +0 -1
- package/dist/useDailiesApi-CMyuK99l.js.map +0 -1
- package/dist/useGoogleMapsApi-BY5ZIbh1.js.map +0 -1
- package/dist/useGoogleMapsApi-DypGXFnl.js.map +0 -1
- package/dist/useTelnyxApi-DH5XaYIo.js.map +0 -1
- package/dist/useTelnyxApi-WH39oUwB.js.map +0 -1
- package/dist/useTwilioApi-CYF8UIPN.js.map +0 -1
- package/dist/useTwilioApi-nN6VRQYc.js.map +0 -1
|
@@ -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-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,MAAM;AACtB,IAAA,aAAa,EAAE,sBAAsB;AACrCX,IAAAA,KAAK,EAAEG,SAAC,CAAC,iCAAiC,CAAC;IAC3Cc,OAAO,EAAE,SAATA,OAAOA,GAAA;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|
|
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":["Yup","t","_jsxs","_jsx","timeFormat","noop","useState","DEFAULT_PAGE_INDEX","useTranslation","isEmpty","_Fragment","DEFAULT_PAGE_SIZE","isNotNil","Trans","useRef","useHistory","useEffect","Form","isNotEmpty","withT"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,IAAM,2BAA2B,GAAGA,cAAG,CAAC,MAAM,CAAC;EAC7C,KAAK,EAAEA,cAAG,CAAC,MAAM,EAAE,CAChB,IAAI,CAACC,SAAC,CAAC,8CAA8C,CAAC,CAAC,CACvD,QAAQ,CAACA,SAAC,CAAC,yCAAyC,CAAC,CAAC,CACtD,MAAM;AACX,CAAC,CAAC;AAEK,IAAM,6BAA6B,GAAG;AAC3C,EAAA,aAAa,EAAE;AAAE,IAAA,KAAK,EAAE;GAAI;AAC5B,EAAA,gBAAgB,EAAE,2BAA2B;AAC7C,EAAA,cAAc,EAAE;AAClB,CAAC;AAEM,IAAM,UAAU,GAAG;AAAE,EAAA,MAAM,EAAE;AAAS,CAAC;;ACT9C,IAAM,YAAY,GAAG,SAAf,YAAY,CAAA,IAAA,EAAA;EAAA,IAAM,MAAM,QAAN,MAAM;AAAE,IAAA,iBAAiB,QAAjB,iBAAiB;AAAA,EAAA,OAAO,CACtD;IACE,GAAG,EAAE,UAAU,CAAC,MAAM;AACtB,IAAA,aAAa,EAAE,sBAAsB;AACrC,IAAA,KAAK,EAAEA,SAAC,CAAC,iCAAiC,CAAC;IAC3C,OAAO,EAAE,SAAT,OAAO,GAAA;MAAA,OAAQ,iBAAiB,CAAC,MAAM,CAAC;AAAA,IAAA;AAC1C,GAAC,CACF;AAAA,CAAA;AAEM,IAAM,yBAAyB,GAAG,SAA5B,yBAAyB,GAAA;AAAA,EAAA,OAAS,CAC7C;AACE,IAAA,KAAK,EAAEA,SAAC,CAAC,6CAA6C,CAAC;AACvD,IAAA,SAAS,EAAE,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S,EAAC,8DAA8D;IAAA,QAAA,EAAA,cAC3EA,eAAA,CAAA,KAAA,EAAA;AAAK,MAAA,SAAS,EAAC,QAAQ;AAAA,MAAA,QAAA,EAAA,cACrBC,eAAC,WAAW,EAAA;AACJ,QAAA,UAAU,EAAV,UAAU;AAAE,QAAA,QAAQ,EAAR,QAAQ;AAC1B,QAAA,YAAY,EAAE,oBAAqB;AACnC,QAAA,SAAS,EAAE;AAAa,OACzB,CAAC,eACFD,eAAA,CAAA,KAAA,EAAA;AAAK,QAAA,SAAS,EAAC,WAAW;AAAA,QAAA,QAAA,EAAA,CACvBgB,oBAAU,CAAC,kBAAkB,CAAC,iBAC7Bf,eAAC,aAAa,EAAA;AAAC,UAAA,MAAM,EAAE;SAAqB,CAC7C,EACAe,oBAAU,CAAC,QAAQ,CAAC,iBACnBf,eAAC,MAAM,EAAA;AACL,UAAA,KAAK,EAAE,CAAC,CAAC,0CAA0C,CAAE;AACrD,UAAA,KAAK,EAAC,MAAM;UACZ,OAAO,EAAE,SAAT,OAAO,GAAA;YAAA,OAAQ,kBAAkB,CAAC,IAAI,CAAC;AAAA,UAAA;AAAC,SACzC,CACF;AAAA,OACE,CAAC;KACH,CAAC,eACNA,cAAA,CAAC,WAAW,EAAA;AACJ,MAAA,OAAO,EAAP,OAAO;AAAE,MAAA,YAAY,EAAZ,YAAY;AAAE,MAAA,UAAU,EAAV,UAAU;AAAE,MAAA,qBAAqB,EAArB;AAAqB,KAC/D,CAAC;AAAA,GACC,CAAC;AAEV;;;;"}
|
package/dist/cjs/Zoom.js
CHANGED
|
@@ -10,7 +10,7 @@ var reactI18next = require('react-i18next');
|
|
|
10
10
|
var Manage = require('./Manage.js');
|
|
11
11
|
var useZoomApi = require('../useZoomApi-Be2unav5.js');
|
|
12
12
|
var jsxRuntime = require('react/jsx-runtime');
|
|
13
|
-
require('@babel/runtime/helpers/
|
|
13
|
+
require('@babel/runtime/helpers/objectSpread2');
|
|
14
14
|
require('@bigbinary/neeto-commons-frontend/react-utils');
|
|
15
15
|
require('@bigbinary/neeto-icons/Check');
|
|
16
16
|
require('@bigbinary/neeto-icons/ExternalLink');
|
package/dist/cjs/Zoom.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Zoom.js","sources":["../../app/javascript/src/components/Integrations/Zoom/index.jsx"],"sourcesContent":["import { useState } from \"react\";\n\nimport { isPresent, noop } from \"neetocist\";\nimport { Zoom as ZoomIcon } from \"neetoicons/misc\";\nimport { Spinner, Typography } 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 = ({\n connectUrl = \"\",\n description = \"\",\n onDisconnect = noop,\n calloutProps = {},\n}) => {\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 calloutProps,\n connectUrl,\n isConnected,\n isDisconnectAlertOpen,\n isDisconnecting,\n setIsDisconnectAlertOpen,\n }}\n Icon={ZoomIcon}\n integration=\"zoom\"\n description={\n isConnected ? (\n <Typography style=\"body1\">\n <Trans\n components={{ underline: <u className=\"font-medium\" /> }}\n i18nKey=\"neetoIntegrations.zoom.account\"\n values={{ email }}\n />\n </Typography>\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":["
|
|
1
|
+
{"version":3,"file":"Zoom.js","sources":["../../app/javascript/src/components/Integrations/Zoom/index.jsx"],"sourcesContent":["import { useState } from \"react\";\n\nimport { isPresent, noop } from \"neetocist\";\nimport { Zoom as ZoomIcon } from \"neetoicons/misc\";\nimport { Spinner, Typography } 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 = ({\n connectUrl = \"\",\n description = \"\",\n onDisconnect = noop,\n calloutProps = {},\n}) => {\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 calloutProps,\n connectUrl,\n isConnected,\n isDisconnectAlertOpen,\n isDisconnecting,\n setIsDisconnectAlertOpen,\n }}\n Icon={ZoomIcon}\n integration=\"zoom\"\n description={\n isConnected ? (\n <Typography style=\"body1\">\n <Trans\n components={{ underline: <u className=\"font-medium\" /> }}\n i18nKey=\"neetoIntegrations.zoom.account\"\n values={{ email }}\n />\n </Typography>\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 );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L;AAAM;OACjB;KACS,CAAC,GAEb,WAEH;IACD,KAAK,EACH,WAAW,GACP,CAAC,CAAC,kCAAkC,CAAC,GACrC,CAAC,CAAC,gCAAgC,CACvC;IACD,OAAO,EAAE,SAAT,OAAO,GAAA;MAAA,OAAQ,wBAAwB,CAAC,KAAK,CAAC;IAAA,CAAC;IAC/C,YAAY,EAAE,SAAd,YAAY,GAAA;MAAA,OAAQ,gBAAgB,EAAE;AAAA,IAAA;AAAC,GACxC,CAAC;AAEN;;;;"}
|
package/dist/cjs/index.js
CHANGED
|
@@ -23,7 +23,7 @@ var Demo = require('./Demo.js');
|
|
|
23
23
|
var Finish = require('./Finish.js');
|
|
24
24
|
var WalkthroughModal = require('./WalkthroughModal.js');
|
|
25
25
|
var query = require('../query-DFg4la-L.js');
|
|
26
|
-
require('@babel/runtime/helpers/
|
|
26
|
+
require('@babel/runtime/helpers/objectSpread2');
|
|
27
27
|
require('@bigbinary/neeto-cist');
|
|
28
28
|
require('@bigbinary/neeto-commons-frontend/react-utils');
|
|
29
29
|
require('@bigbinary/neeto-icons/Check');
|
|
@@ -38,7 +38,7 @@ require('@bigbinary/neetoui/Alert');
|
|
|
38
38
|
require('@tanstack/react-query');
|
|
39
39
|
require('@bigbinary/neeto-commons-frontend/constants');
|
|
40
40
|
require('axios');
|
|
41
|
-
require('../useDailiesApi-
|
|
41
|
+
require('../useDailiesApi-BS8aif9t.js');
|
|
42
42
|
require('@bigbinary/neeto-commons-frontend/utils');
|
|
43
43
|
require('@bigbinary/neeto-icons/misc/Daily');
|
|
44
44
|
require('@bigbinary/neeto-molecules/CopyToClipboardButton');
|
|
@@ -54,15 +54,15 @@ require('@babel/runtime/helpers/toConsumableArray');
|
|
|
54
54
|
require('@bigbinary/neeto-icons/misc/GoogleCalendar');
|
|
55
55
|
require('@bigbinary/neeto-icons/misc/Google');
|
|
56
56
|
require('@bigbinary/neetoui/formik/Select');
|
|
57
|
-
require('../useTelnyxApi-
|
|
57
|
+
require('../useTelnyxApi-CqB3f44W.js');
|
|
58
|
+
require('@babel/runtime/helpers/regenerator');
|
|
58
59
|
require('@babel/runtime/helpers/asyncToGenerator');
|
|
59
|
-
require('../useTwilioApi-
|
|
60
|
+
require('../useTwilioApi-BwkrNBtg.js');
|
|
60
61
|
require('@bigbinary/neeto-icons/misc/Zoom');
|
|
61
62
|
require('../useZoomApi-Be2unav5.js');
|
|
62
63
|
require('@bigbinary/neetoui/Modal');
|
|
63
64
|
require('classnames');
|
|
64
65
|
require('../index-dxk7jTL7.js');
|
|
65
|
-
require('../success-CsNvTPBG.js');
|
|
66
66
|
|
|
67
67
|
var getHasOnlyUPIIntegration = function getHasOnlyUPIIntegration(alerts) {
|
|
68
68
|
return alerts.length === 1 && alerts[0].serviceName === "eupi";
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../app/javascript/src/components/DisconnectedIntegrationsRibbon/utils.js","../../app/javascript/src/components/DisconnectedIntegrationsRibbon/index.jsx"],"sourcesContent":["import { t } from \"i18next\";\n\nconst getHasOnlyUPIIntegration = alerts =>\n alerts.length === 1 && alerts[0].serviceName === \"eupi\";\n\nexport const getDisconnectionRibbonDefaultMessage = alerts =>\n getHasOnlyUPIIntegration(alerts)\n ? t(\"neetoIntegrations.disconnectionRibbon.non_permission_message\", {\n count: alerts.length,\n })\n : t(\"neetoIntegrations.disconnectionRibbon.message\", {\n count: alerts.length,\n });\n\nexport const getDisconnectionRibbonI18nKey = (alerts, integrationRouteMap) => {\n const hasOnlyUPIIntegration =\n getHasOnlyUPIIntegration(alerts) && integrationRouteMap.eupi;\n\n return hasOnlyUPIIntegration\n ? \"neetoIntegrations.disconnectionRibbon.non_permission_message\"\n : \"neetoIntegrations.disconnectionRibbon.message\";\n};\n","import { useState } from \"react\";\n\nimport { Tag } from \"neetoui\";\nimport { isEmpty } from \"ramda\";\nimport { Trans, useTranslation } from \"react-i18next\";\nimport { Link } from \"react-router-dom\";\n\nimport { useFetchDisconnectionAlerts } from \"hooks/reactQuery/useDisconnectionAlertsApi\";\n\nimport {\n getDisconnectionRibbonDefaultMessage,\n getDisconnectionRibbonI18nKey,\n} from \"./utils\";\n\nconst IntegrationLinks = ({ alerts, integrationRouteMap }) =>\n alerts.map((alert, index) => {\n const { label, path } = integrationRouteMap[alert.serviceName];\n const linkPath = alert.redirectPath || path;\n\n return (\n <span key={alert.id}>\n {index > 0 && \", \"}\n <Link className=\"font-semibold underline\" to={linkPath}>\n {label}\n </Link>\n </span>\n );\n });\n\nconst DisconnectedIntegrationsRibbon = ({ integrationRouteMap = {} }) => {\n const [isClosed, setIsClosed] = useState(false);\n\n useTranslation();\n\n const { data: { disconnectionAlerts: alerts = [] } = {} } =\n useFetchDisconnectionAlerts();\n\n const knownAlerts = alerts.filter(\n alert => integrationRouteMap[alert.serviceName]\n );\n\n if (isClosed || isEmpty(knownAlerts)) return null;\n\n const singleAlert = knownAlerts.length === 1 ? knownAlerts[0] : null;\n const connectPath = singleAlert\n ? singleAlert.redirectPath ||\n integrationRouteMap[singleAlert.serviceName].path\n : \"\";\n\n return (\n <Tag\n className=\"neeto-molecules-sticky-ribbon w-full p-2.5 text-center\"\n data-testid=\"disconnected-integrations-ribbon\"\n size=\"large\"\n style=\"warning\"\n onClose={() => setIsClosed(true)}\n >\n <span className=\"w-full\">\n <Trans\n count={knownAlerts.length}\n defaults={getDisconnectionRibbonDefaultMessage(knownAlerts)}\n components={{\n integrations: (\n <IntegrationLinks\n {...{ integrationRouteMap }}\n alerts={knownAlerts}\n />\n ),\n connectLink: (\n <Link className=\"font-semibold underline\" to={connectPath} />\n ),\n }}\n i18nKey={getDisconnectionRibbonI18nKey(\n knownAlerts,\n integrationRouteMap\n )}\n />\n </span>\n </Tag>\n );\n};\n\nexport default DisconnectedIntegrationsRibbon;\n"],"names":["
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../app/javascript/src/components/DisconnectedIntegrationsRibbon/utils.js","../../app/javascript/src/components/DisconnectedIntegrationsRibbon/index.jsx"],"sourcesContent":["import { t } from \"i18next\";\n\nconst getHasOnlyUPIIntegration = alerts =>\n alerts.length === 1 && alerts[0].serviceName === \"eupi\";\n\nexport const getDisconnectionRibbonDefaultMessage = alerts =>\n getHasOnlyUPIIntegration(alerts)\n ? t(\"neetoIntegrations.disconnectionRibbon.non_permission_message\", {\n count: alerts.length,\n })\n : t(\"neetoIntegrations.disconnectionRibbon.message\", {\n count: alerts.length,\n });\n\nexport const getDisconnectionRibbonI18nKey = (alerts, integrationRouteMap) => {\n const hasOnlyUPIIntegration =\n getHasOnlyUPIIntegration(alerts) && integrationRouteMap.eupi;\n\n return hasOnlyUPIIntegration\n ? \"neetoIntegrations.disconnectionRibbon.non_permission_message\"\n : \"neetoIntegrations.disconnectionRibbon.message\";\n};\n","import { useState } from \"react\";\n\nimport { Tag } from \"neetoui\";\nimport { isEmpty } from \"ramda\";\nimport { Trans, useTranslation } from \"react-i18next\";\nimport { Link } from \"react-router-dom\";\n\nimport { useFetchDisconnectionAlerts } from \"hooks/reactQuery/useDisconnectionAlertsApi\";\n\nimport {\n getDisconnectionRibbonDefaultMessage,\n getDisconnectionRibbonI18nKey,\n} from \"./utils\";\n\nconst IntegrationLinks = ({ alerts, integrationRouteMap }) =>\n alerts.map((alert, index) => {\n const { label, path } = integrationRouteMap[alert.serviceName];\n const linkPath = alert.redirectPath || path;\n\n return (\n <span key={alert.id}>\n {index > 0 && \", \"}\n <Link className=\"font-semibold underline\" to={linkPath}>\n {label}\n </Link>\n </span>\n );\n });\n\nconst DisconnectedIntegrationsRibbon = ({ integrationRouteMap = {} }) => {\n const [isClosed, setIsClosed] = useState(false);\n\n useTranslation();\n\n const { data: { disconnectionAlerts: alerts = [] } = {} } =\n useFetchDisconnectionAlerts();\n\n const knownAlerts = alerts.filter(\n alert => integrationRouteMap[alert.serviceName]\n );\n\n if (isClosed || isEmpty(knownAlerts)) return null;\n\n const singleAlert = knownAlerts.length === 1 ? knownAlerts[0] : null;\n const connectPath = singleAlert\n ? singleAlert.redirectPath ||\n integrationRouteMap[singleAlert.serviceName].path\n : \"\";\n\n return (\n <Tag\n className=\"neeto-molecules-sticky-ribbon w-full p-2.5 text-center\"\n data-testid=\"disconnected-integrations-ribbon\"\n size=\"large\"\n style=\"warning\"\n onClose={() => setIsClosed(true)}\n >\n <span className=\"w-full\">\n <Trans\n count={knownAlerts.length}\n defaults={getDisconnectionRibbonDefaultMessage(knownAlerts)}\n components={{\n integrations: (\n <IntegrationLinks\n {...{ integrationRouteMap }}\n alerts={knownAlerts}\n />\n ),\n connectLink: (\n <Link className=\"font-semibold underline\" to={connectPath} />\n ),\n }}\n i18nKey={getDisconnectionRibbonI18nKey(\n knownAlerts,\n integrationRouteMap\n )}\n />\n </span>\n </Tag>\n );\n};\n\nexport default DisconnectedIntegrationsRibbon;\n"],"names":["t","_jsxs","_jsx","Link","useState","useTranslation","useFetchDisconnectionAlerts","isEmpty","Trans"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,IAAM,wBAAwB,GAAG,SAA3B,wBAAwB,CAAG,MAAM,EAAA;AAAA,EAAA,OACrC,MAAM,CAAC,MAAM,KAAK,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,KAAK,MAAM;AAAA,CAAA;AAElD,IAAM,oCAAoC,GAAG,SAAvC,oCAAoC,CAAG,MAAM,EAAA;EAAA,OACxD,wBAAwB,CAAC,MAAM,CAAC,GAC5BA,SAAC,CAAC,8DAA8D,EAAE;IAChE,KAAK,EAAE,MAAM,CAAC;AAChB,GAAC,CAAC,GACFA,SAAC,CAAC,+CAA+C,EAAE;IACjD,KAAK,EAAE,MAAM,CAAC;AAChB,GAAC,CAAC;AAAA,CAAA;AAED,IAAM,6BAA6B,GAAG,SAAhC,6BAA6B,CAAI,MAAM,EAAE,mBAAmB,EAAK;EAC5E,IAAM,qBAAqB,GACzB,wBA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BAAmB;AACzB,YAAA,MAAM,EAAE;AAAY,WACrB,CACF;UACD,WAAW,eACTA,eAACC,mBAAI,EAAA;AAAC,YAAA,SAAS,EAAC,yBAAyB;AAAC,YAAA,EAAE,EAAE;WAAc;SAE9D;AACF,QAAA,OAAO,EAAE,6BAA6B,CACpC,WAAW,EACX,mBACF;OACD;KACG;AAAC,GACJ,CAAC;AAEV;;;;;;;;;;;;;;;;;;"}
|
package/dist/cjs/v2/Connect.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _objectSpread = require('@babel/runtime/helpers/objectSpread2');
|
|
4
4
|
var neetoAtoms = require('@bigbinary/neeto-atoms');
|
|
5
5
|
var neetoCist = require('@bigbinary/neeto-cist');
|
|
6
6
|
var reactUtils = require('@bigbinary/neeto-commons-frontend/v2/react-utils');
|
|
7
7
|
var CardLayout = require('@bigbinary/neeto-molecules/v2/CardLayout');
|
|
8
8
|
var index = require('../../index-dxk7jTL7.js');
|
|
9
9
|
var reactI18next = require('react-i18next');
|
|
10
|
+
var utils = require('../../utils-jyxIYRHb.js');
|
|
10
11
|
var jsxRuntime = require('react/jsx-runtime');
|
|
12
|
+
require('@babel/runtime/helpers/objectWithoutProperties');
|
|
11
13
|
|
|
12
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
13
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
14
14
|
var Connect = reactUtils.withT(function (_ref) {
|
|
15
15
|
var t = _ref.t,
|
|
16
16
|
Icon = _ref.Icon,
|
|
@@ -30,49 +30,51 @@ var Connect = reactUtils.withT(function (_ref) {
|
|
|
30
30
|
onConnect = _ref$onConnect === void 0 ? neetoCist.noop : _ref$onConnect,
|
|
31
31
|
children = _ref.children,
|
|
32
32
|
secondaryButtonProps = _ref.secondaryButtonProps;
|
|
33
|
-
return
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
33
|
+
return (
|
|
34
|
+
/*#__PURE__*/
|
|
35
|
+
// v2 card system: the molecules feature card, like Manage, so connect and
|
|
36
|
+
// manage screens share one layout (logo tile, title, muted description,
|
|
37
|
+
// extra content and actions in the text column).
|
|
38
|
+
jsxRuntime.jsxs(CardLayout, {
|
|
39
|
+
description: description,
|
|
40
|
+
title: title,
|
|
41
|
+
variant: "feature",
|
|
42
|
+
actionBlock: /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
43
|
+
className: "flex w-full flex-wrap items-center gap-2",
|
|
44
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Button, _objectSpread({
|
|
45
|
+
label: t("neetoIntegrations.common.connect"),
|
|
46
|
+
onClick: onConnect
|
|
47
|
+
}, buttonProps)), secondaryButtonProps && /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Button, _objectSpread({
|
|
48
|
+
variant: "secondary"
|
|
49
|
+
}, secondaryButtonProps))]
|
|
50
|
+
}),
|
|
51
|
+
icon: Icon && /*#__PURE__*/jsxRuntime.jsx(utils.BrandLogo, {
|
|
52
|
+
icon: Icon,
|
|
53
|
+
size: utils.getBrandLogoSize({
|
|
54
|
+
integration: integration,
|
|
55
|
+
integrationName: integrationName
|
|
56
|
+
})
|
|
57
|
+
}),
|
|
58
|
+
children: [helpDocUrl && /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Typography, {
|
|
59
|
+
className: "text-muted-foreground text-sm leading-relaxed",
|
|
60
|
+
variant: "body2",
|
|
61
|
+
children: /*#__PURE__*/jsxRuntime.jsx(reactI18next.Trans, {
|
|
62
|
+
i18nKey: "neetoIntegrations.common.helpDocUrl",
|
|
63
|
+
components: {
|
|
64
|
+
helpLink: /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Button, {
|
|
65
|
+
href: helpDocUrl,
|
|
66
|
+
rel: "noopener noreferrer",
|
|
67
|
+
target: "_blank",
|
|
68
|
+
variant: "link"
|
|
69
|
+
})
|
|
70
|
+
},
|
|
71
|
+
values: {
|
|
72
|
+
integration: integrationName || neetoCist.humanize(integration)
|
|
73
|
+
}
|
|
74
|
+
})
|
|
75
|
+
}), children]
|
|
76
|
+
})
|
|
77
|
+
);
|
|
76
78
|
});
|
|
77
79
|
Connect.prototypes = {
|
|
78
80
|
Icon: index.PropTypes.node,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Connect.js","sources":["../../../app/javascript/src/v2/components/Steps/Connect.jsx"],"sourcesContent":["import { Typography, Button } from \"
|
|
1
|
+
{"version":3,"file":"Connect.js","sources":["../../../app/javascript/src/v2/components/Steps/Connect.jsx"],"sourcesContent":["import { Typography, Button } from \"neetoatoms\";\nimport { humanize, noop } from \"neetocist\";\nimport { withT } from \"neetocommons/v2/react-utils\";\nimport CardLayout from \"neetomolecules/v2/CardLayout\";\nimport PropTypes from \"prop-types\";\nimport { Trans } from \"react-i18next\";\n\nimport BrandLogo from \"../commons/BrandLogo\";\nimport { getBrandLogoSize } from \"../commons/utils\";\n\nconst Connect = withT(\n ({\n t,\n Icon,\n title = \"\",\n description = \"\",\n integration = \"\",\n integrationName = \"\",\n helpDocUrl = \"\",\n buttonProps = {},\n onConnect = noop,\n children,\n secondaryButtonProps,\n }) => (\n // v2 card system: the molecules feature card, like Manage, so connect and\n // manage screens share one layout (logo tile, title, muted description,\n // extra content and actions in the text column).\n <CardLayout\n {...{ description, title }}\n variant=\"feature\"\n actionBlock={\n <div className=\"flex w-full flex-wrap items-center gap-2\">\n <Button\n label={t(\"neetoIntegrations.common.connect\")}\n onClick={onConnect}\n {...buttonProps}\n />\n {secondaryButtonProps && (\n <Button variant=\"secondary\" {...secondaryButtonProps} />\n )}\n </div>\n }\n icon={\n Icon && (\n <BrandLogo\n icon={Icon}\n size={getBrandLogoSize({ integration, integrationName })}\n />\n )\n }\n >\n {helpDocUrl && (\n <Typography\n className=\"text-muted-foreground text-sm leading-relaxed\"\n variant=\"body2\"\n >\n <Trans\n i18nKey=\"neetoIntegrations.common.helpDocUrl\"\n components={{\n helpLink: (\n <Button\n href={helpDocUrl}\n rel=\"noopener noreferrer\"\n target=\"_blank\"\n variant=\"link\"\n />\n ),\n }}\n values={{\n integration: integrationName || humanize(integration),\n }}\n />\n </Typography>\n )}\n {children}\n </CardLayout>\n )\n);\n\nConnect.prototypes = {\n Icon: PropTypes.node,\n title: PropTypes.string,\n description: PropTypes.string,\n buttonProps: PropTypes.object,\n onConnect: PropTypes.func,\n};\n\nexport default Connect;\n"],"names":["withT","noop","_jsxs","_jsx","Button","BrandLogo","getBrandLogoSize","Typography","Trans","humanize","PropTypes"],"mappings":";;;;;;;;;;;;;AAUA,IAAM,OAAO,GAAGA,gBAAK,CACnB,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;AAAC,UAAA,OAAO,EAAC;SAAW,EAAK,oBAAoB,CAAG,CACxD;AAAA,OACE,CACN;AACD,MAAA,IAAI,EACF,IAAI,iBACFD,cAAA,CAACE,eAAS,EAAA;AACR,QAAA,IAAI,EAAE,IAAK;QACX,IAAI,EAAEC,sBAAgB,CAAC;AAAE,UAAA,WAAW,EAAX,WAAW;AAAE,UAAA,eAAe,EAAf;SAAiB;AAAE,OAC1D,CAEJ;MAAA,QAAA,EAAA,CAEA,UAAU,iBACTH,cAAA,CAACI,qBAAU,EAAA;AACT,QAAA,SAAS,EAAC,+CAA+C;AACzD,QAAA,OAAO,EAAC,OAAO;AAAA,QAAA,QAAA,eAEfJ,eAACK,kBAAK,EAAA;AACJ,UAAA,OAAO,EAAC,qCAAqC;AAC7C,UAAA,UAAU,EAAE;YACV,QAAQ,eACNL,eAACC,iBAAM,EAAA;AACL,cAAA,IAAI,EAAE,UAAW;AACjB,cAAA,GAAG,EAAC,qBAAqB;AACzB,cAAA,MAAM,EAAC,QAAQ;AACf,cAAA,OAAO,EAAC;aACT;WAEH;AACF,UAAA,MAAM,EAAE;AACN,YAAA,WAAW,EAAE,eAAe,IAAIK,kBAAQ,CAAC,WAAW;AACtD;SACD;OACS,CACb,EACA,QAAQ;KACC;AAAC;AAAA,CAEjB;AAEA,OAAO,CAAC,UAAU,GAAG;EACnB,IAAI,EAAEC,eAAS,CAAC,IAAI;EACpB,KAAK,EAAEA,eAAS,CAAC,MAAM;EACvB,WAAW,EAAEA,eAAS,CAAC,MAAM;EAC7B,WAAW,EAAEA,eAAS,CAAC,MAAM;EAC7B,SAAS,EAAEA,eAAS,CAAC;AACvB,CAAC;;;;"}
|
package/dist/cjs/v2/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/v2/react-utils');
|
|
6
|
-
var useDailiesApi = require('../../useDailiesApi-
|
|
6
|
+
var useDailiesApi = require('../../useDailiesApi-BS8aif9t.js');
|
|
7
7
|
var v2_DailyForm = require('./DailyForm.js');
|
|
8
8
|
var _slicedToArray = require('@babel/runtime/helpers/slicedToArray');
|
|
9
9
|
var React = require('react');
|
|
@@ -14,7 +14,7 @@ var CopyToClipboardButton = require('@bigbinary/neeto-molecules/v2/CopyToClipboa
|
|
|
14
14
|
var reactI18next = require('react-i18next');
|
|
15
15
|
var v2_Manage = require('./Manage.js');
|
|
16
16
|
var jsxRuntime = require('react/jsx-runtime');
|
|
17
|
-
require('@babel/runtime/helpers/
|
|
17
|
+
require('@babel/runtime/helpers/objectSpread2');
|
|
18
18
|
require('@tanstack/react-query');
|
|
19
19
|
require('@bigbinary/neeto-commons-frontend/constants');
|
|
20
20
|
require('@bigbinary/neeto-commons-frontend/react-utils');
|
|
@@ -28,8 +28,9 @@ require('react-router-dom');
|
|
|
28
28
|
require('yup');
|
|
29
29
|
require('./WalkthroughModal.js');
|
|
30
30
|
require('@bigbinary/neeto-commons-frontend/v2/react-utils/withT');
|
|
31
|
-
require('
|
|
31
|
+
require('../../utils-jyxIYRHb.js');
|
|
32
32
|
require('@babel/runtime/helpers/objectWithoutProperties');
|
|
33
|
+
require('./DisconnectAlert.js');
|
|
33
34
|
|
|
34
35
|
var Manage = function Manage(_ref) {
|
|
35
36
|
var description = _ref.description,
|
|
@@ -77,6 +78,7 @@ var Manage = function Manage(_ref) {
|
|
|
77
78
|
connect: true
|
|
78
79
|
}),
|
|
79
80
|
integration: "daily",
|
|
81
|
+
integrationName: t("neetoIntegrations.daily.title"),
|
|
80
82
|
description: isConnected ? /*#__PURE__*/jsxRuntime.jsx(reactI18next.Trans, {
|
|
81
83
|
i18nKey: "neetoIntegrations.daily.yourApiKey",
|
|
82
84
|
values: {
|
package/dist/cjs/v2/Daily.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Daily.js","sources":["../../../app/javascript/src/v2/components/Integrations/Daily/Manage.jsx","../../../app/javascript/src/v2/components/Integrations/Daily/index.jsx"],"sourcesContent":["import { useState } from \"react\";\n\nimport { Spinner } from \"@bigbinary/neeto-atoms\";\nimport { isPresent } from \"neetocist\";\nimport { buildUrl } from \"neetocommons/v2/utils\";\nimport { Daily as DailyIcon } from \"neetoicons/misc\";\nimport CopyToClipboardButton from \"neetomolecules/v2/CopyToClipboardButton\";\nimport { Trans, useTranslation } from \"react-i18next\";\n\nimport { useDestroyDaily, useFetchDaily } from \"hooks/reactQuery/useDailiesApi\";\n\nimport ManageIntegrations from \"../../commons/Manage\";\n\nconst Manage = ({ description, onDisconnect }) => {\n const [isDisconnectAlertOpen, setIsDisconnectAlertOpen] = useState(false);\n\n const { data: { metadata = {} } = {}, isFetching } = useFetchDaily();\n const { apiKey = null } = metadata || {};\n\n const { t } = useTranslation();\n\n const { mutate: destroyIntegration, isPending: isDisconnecting } =\n useDestroyDaily({\n onSuccess: () => {\n setIsDisconnectAlertOpen(false);\n onDisconnect?.();\n },\n });\n\n const isConnected = isPresent(apiKey);\n\n const handleDisconnect = () => destroyIntegration(\"daily\");\n\n if (isFetching || isDisconnecting) {\n return (\n <div className=\"flex h-full w-full items-center justify-center\">\n <Spinner />\n </div>\n );\n }\n\n return (\n <ManageIntegrations\n {...{\n isConnected,\n isDisconnectAlertOpen,\n isDisconnecting,\n setIsDisconnectAlertOpen,\n }}\n Icon={DailyIcon}\n connectPath={buildUrl(window.location.pathname, { connect: true })}\n integration=\"daily\"\n description={\n isConnected ? (\n <Trans\n i18nKey=\"neetoIntegrations.daily.yourApiKey\"\n values={{ apiKey }}\n components={{\n wrapper: (\n <div className=\"mt-2 flex items-center justify-between gap-x-3 rounded-md border border-border px-3 py-2\" />\n ),\n span: <span className=\"break-all text-sm\" />,\n copy: (\n <CopyToClipboardButton\n className=\"shrink-0 self-start\"\n style=\"text\"\n value={apiKey}\n />\n ),\n }}\n />\n ) : (\n description\n )\n }\n title={\n isConnected\n ? t(\"neetoIntegrations.daily.connected\")\n : t(\"neetoIntegrations.daily.connect.account\")\n }\n onClose={() => setIsDisconnectAlertOpen(false)}\n onDisconnect={handleDisconnect}\n />\n );\n};\n\nexport default Manage;\n","import i18next from \"i18next\";\nimport { isPresent, noop } from \"neetocist\";\nimport { useQueryParams, withTitle } from \"neetocommons/v2/react-utils\";\n\nimport { useFetchDaily } from \"hooks/reactQuery/useDailiesApi\";\n\nimport Form from \"./Form\";\nimport Manage from \"./Manage\";\n\nconst Daily = ({\n isOnboarding = false,\n helpDocUrl = \"\",\n videoUrl = \"\",\n description = \"\",\n onConnect = noop,\n onDisconnect = noop,\n}) => {\n const { connect } = useQueryParams();\n\n const { data: { metadata = {} } = {} } = useFetchDaily();\n const { apiKey = null } = metadata || {};\n\n if ((isPresent(apiKey) && !isOnboarding) || !connect) {\n return <Manage {...{ description, onDisconnect }} />;\n }\n\n return <Form {...{ helpDocUrl, onConnect, videoUrl }} />;\n};\n\nexport default withTitle(\n Daily,\n i18next.t(\"neetoIntegrations.browserTitles.integrations.dailyco\")\n);\n"],"names":["
|
|
1
|
+
{"version":3,"file":"Daily.js","sources":["../../../app/javascript/src/v2/components/Integrations/Daily/Manage.jsx","../../../app/javascript/src/v2/components/Integrations/Daily/index.jsx"],"sourcesContent":["import { useState } from \"react\";\n\nimport { Spinner } from \"@bigbinary/neeto-atoms\";\nimport { isPresent } from \"neetocist\";\nimport { buildUrl } from \"neetocommons/v2/utils\";\nimport { Daily as DailyIcon } from \"neetoicons/misc\";\nimport CopyToClipboardButton from \"neetomolecules/v2/CopyToClipboardButton\";\nimport { Trans, useTranslation } from \"react-i18next\";\n\nimport { useDestroyDaily, useFetchDaily } from \"hooks/reactQuery/useDailiesApi\";\n\nimport ManageIntegrations from \"../../commons/Manage\";\n\nconst Manage = ({ description, onDisconnect }) => {\n const [isDisconnectAlertOpen, setIsDisconnectAlertOpen] = useState(false);\n\n const { data: { metadata = {} } = {}, isFetching } = useFetchDaily();\n const { apiKey = null } = metadata || {};\n\n const { t } = useTranslation();\n\n const { mutate: destroyIntegration, isPending: isDisconnecting } =\n useDestroyDaily({\n onSuccess: () => {\n setIsDisconnectAlertOpen(false);\n onDisconnect?.();\n },\n });\n\n const isConnected = isPresent(apiKey);\n\n const handleDisconnect = () => destroyIntegration(\"daily\");\n\n if (isFetching || isDisconnecting) {\n return (\n <div className=\"flex h-full w-full items-center justify-center\">\n <Spinner />\n </div>\n );\n }\n\n return (\n <ManageIntegrations\n {...{\n isConnected,\n isDisconnectAlertOpen,\n isDisconnecting,\n setIsDisconnectAlertOpen,\n }}\n Icon={DailyIcon}\n connectPath={buildUrl(window.location.pathname, { connect: true })}\n integration=\"daily\"\n integrationName={t(\"neetoIntegrations.daily.title\")}\n description={\n isConnected ? (\n <Trans\n i18nKey=\"neetoIntegrations.daily.yourApiKey\"\n values={{ apiKey }}\n components={{\n wrapper: (\n <div className=\"mt-2 flex items-center justify-between gap-x-3 rounded-md border border-border px-3 py-2\" />\n ),\n span: <span className=\"break-all text-sm\" />,\n copy: (\n <CopyToClipboardButton\n className=\"shrink-0 self-start\"\n style=\"text\"\n value={apiKey}\n />\n ),\n }}\n />\n ) : (\n description\n )\n }\n title={\n isConnected\n ? t(\"neetoIntegrations.daily.connected\")\n : t(\"neetoIntegrations.daily.connect.account\")\n }\n onClose={() => setIsDisconnectAlertOpen(false)}\n onDisconnect={handleDisconnect}\n />\n );\n};\n\nexport default Manage;\n","import i18next from \"i18next\";\nimport { isPresent, noop } from \"neetocist\";\nimport { useQueryParams, withTitle } from \"neetocommons/v2/react-utils\";\n\nimport { useFetchDaily } from \"hooks/reactQuery/useDailiesApi\";\n\nimport Form from \"./Form\";\nimport Manage from \"./Manage\";\n\nconst Daily = ({\n isOnboarding = false,\n helpDocUrl = \"\",\n videoUrl = \"\",\n description = \"\",\n onConnect = noop,\n onDisconnect = noop,\n}) => {\n const { connect } = useQueryParams();\n\n const { data: { metadata = {} } = {} } = useFetchDaily();\n const { apiKey = null } = metadata || {};\n\n if ((isPresent(apiKey) && !isOnboarding) || !connect) {\n return <Manage {...{ description, onDisconnect }} />;\n }\n\n return <Form {...{ helpDocUrl, onConnect, videoUrl }} />;\n};\n\nexport default withTitle(\n Daily,\n i18next.t(\"neetoIntegrations.browserTitles.integrations.dailyco\")\n);\n"],"names":["useState","useFetchDaily","useTranslation","useDestroyDaily","isPresent","_jsx","Spinner","ManageIntegrations","buildUrl","Trans","noop","useQueryParams","Form","withTitle"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAaA,IAAM,MAAM,GAAG,SAAT,MAAM,CAAA,IAAA,EAAsC;EAAA,IAAhC,WAAW,QAAX,WAAW;AAAE,IAAA,YAAY,QAAZ,YAAY;EACzC,IAAA,SAAA,GAA0DA,cAAQ,CAAC,KAAK,CAAC;AAAA,IAAA,UAAA,GAAA,cAAA,CAAA,SAAA,EAAA,CAAA,CAAA;IAAlE,qBAAqB,GAAA,UAAA,CAAA,CAAA,CAAA;IAAE,wBAAwB,GAAA,UAAA,CAAA,CAAA,CAAA;EAEtD,IAAA,cAAA,GAAqDC,2BAAa,EAAE;AAAA,IAAA,mBAAA,GAAA,cAAA,CAA5D,IAAI;AAAA,IAAA,oBAAA,GAAA,mBAAA,KAAA,MAAA,GAAsB,EAAE,GAAA,mBAAA;AAAA,IAAA,qBAAA,GAAA,oBAAA,CAApB,QAAQ;IAAR,QAAQ,GAAA,qBAAA,KAAA,MAAA,GAAG,EAAE,GAAA,qBAAA;AAAS,IAAA,UAAU,kBAAV,UAAU;EAChD,IAAA,KAAA,GAA0B,QAAQ,IAAI,EAAE;AAAA,IAAA,YAAA,GAAA,KAAA,CAAhC,MAAM;AAAN,IAAA,MAAM,6BAAG,IAAI,GAAA,YAAA;EAErB,IAAA,eAAA,GAAcC,2BAAc,EAAE;AAAtB,IAAA,CAAC,mBAAD,CAAC;AAET,EAAA,IAAA,gBAAA,GACEC,6BAAe,CAAC;MACd,SAAS,EAAE,SAAX,SAAS,GA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AA,mBAAA,KAAA,MAAA,GAAsB,EAAE,GAAA,mBAAA;AAAA,IAAA,qBAAA,GAAA,oBAAA,CAApB,QAAQ;IAAR,QAAQ,GAAA,qBAAA,KAAA,MAAA,GAAG,EAAE,GAAA,qBAAA;EAC7B,IAAA,KAAA,GAA0B,QAAQ,IAAI,EAAE;AAAA,IAAA,YAAA,GAAA,KAAA,CAAhC,MAAM;AAAN,IAAA,MAAM,6BAAG,IAAI,GAAA,YAAA;EAErB,IAAKG,mBAAS,CAAC,MAAM,CAAC,IAAI,CAAC,YAAY,IAAK,CAAC,OAAO,EAAE;AACpD,IAAA,oBAAOC,eAAC,MAAM,EAAA;AAAO,MAAA,WAAW,EAAX,WAAW;AAAE,MAAA,YAAY,EAAZ;AAAY,KAAK,CAAC;AACtD,EAAA;AAEA,EAAA,oBAAOA,eAACO,YAAI,EAAA;AAAO,IAAA,UAAU,EAAV,UAAU;AAAE,IAAA,SAAS,EAAT,SAAS;AAAE,IAAA,QAAQ,EAAR;AAAQ,GAAK,CAAC;AAC1D,CAAC;AAED,YAAeC,oBAAS,CACtB,KAAK,EACL,OAAO,CAAC,CAAC,CAAC,sDAAsD,CAClE,CAAC;;;;"}
|
package/dist/cjs/v2/DailyForm.js
CHANGED
|
@@ -11,11 +11,11 @@ var Container = require('@bigbinary/neeto-molecules/v2/Container');
|
|
|
11
11
|
var Header = require('@bigbinary/neeto-molecules/v2/Header');
|
|
12
12
|
var reactI18next = require('react-i18next');
|
|
13
13
|
var reactRouterDom = require('react-router-dom');
|
|
14
|
-
var useDailiesApi = require('../../useDailiesApi-
|
|
14
|
+
var useDailiesApi = require('../../useDailiesApi-BS8aif9t.js');
|
|
15
15
|
var yup = require('yup');
|
|
16
16
|
var v2_WalkthroughModal = require('./WalkthroughModal.js');
|
|
17
17
|
var jsxRuntime = require('react/jsx-runtime');
|
|
18
|
-
require('@babel/runtime/helpers/
|
|
18
|
+
require('@babel/runtime/helpers/objectSpread2');
|
|
19
19
|
require('@tanstack/react-query');
|
|
20
20
|
require('@bigbinary/neeto-commons-frontend/constants');
|
|
21
21
|
require('@bigbinary/neeto-commons-frontend/react-utils');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DailyForm.js","sources":["../../../app/javascript/src/v2/components/Integrations/Daily/constants.js","../../../app/javascript/src/v2/components/Integrations/Daily/Form.jsx"],"sourcesContent":["import { t } from \"i18next\";\nimport * as yup from \"yup\";\n\nexport const MANAGE_DAILY_CO_FORM_INITIAL_VALUES = { apiKey: \"\" };\n\nexport const DAILY_CO_VALIDATION_SCHEMA = yup.object().shape({\n apiKey: yup\n .string()\n .trim()\n .required(\n t(\"neetoIntegrations.errors.required\", {\n entity: t(\"neetoIntegrations.daily.apiKey\"),\n })\n ),\n});\n","import { useState } from \"react\";\n\nimport i18next from \"i18next\";\nimport { Button, Spinner, Typography } from \"neetoatoms\";\nimport { Input, Form as FormikForm, ActionBlock } from \"neetoatoms/formik\";\nimport { withTitle } from \"neetocommons/v2/react-utils\";\nimport CardLayout from \"neetomolecules/v2/CardLayout\";\nimport Container from \"neetomolecules/v2/Container\";\nimport Header from \"neetomolecules/v2/Header\";\nimport { Trans, useTranslation } from \"react-i18next\";\nimport { useHistory } from \"react-router-dom\";\n\nimport { useCreateDaily } from \"hooks/reactQuery/useDailiesApi\";\n\nimport {\n MANAGE_DAILY_CO_FORM_INITIAL_VALUES,\n DAILY_CO_VALIDATION_SCHEMA,\n} from \"./constants\";\n\nimport WalkthroughModal from \"../../WalkthroughModal\";\n\nconst Form = ({ helpDocUrl, videoUrl, onConnect, breadcrumbs }) => {\n const { t } = useTranslation();\n const history = useHistory();\n\n const [isDemoModalOpen, setIsDemoModalOpen] = useState(false);\n\n const { mutate: createDaily, isPending: isConnecting } = useCreateDaily({\n onSuccess: () => onConnect?.(),\n });\n\n const handleSubmit = payload => createDaily(payload);\n\n if (isConnecting) {\n return (\n <div className=\"flex h-full w-full items-center justify-center\">\n <Spinner />\n </div>\n );\n }\n\n return (\n <Container isHeaderFixed>\n <Header\n {...{ breadcrumbs }}\n title={t(\"neetoIntegrations.daily.connect.title\")}\n titleHelpPopoverProps={{\n title: t(\"neetoIntegrations.daily.connect.title\"),\n description: (\n <Typography lineClamp=\"none\" variant=\"body2\">\n <Trans\n i18nKey=\"neetoIntegrations.daily.helpDoc\"\n components={{\n videoLink: (\n <Button\n variant=\"link\"\n onClick={() => setIsDemoModalOpen(true)}\n />\n ),\n }}\n />\n </Typography>\n ),\n helpLinkProps: {\n href: helpDocUrl,\n \"data-testid\": \"api-key-help-doc-link\",\n },\n }}\n />\n <div className=\"w-full\">\n <FormikForm\n formikProps={{\n initialValues: MANAGE_DAILY_CO_FORM_INITIAL_VALUES,\n validationSchema: DAILY_CO_VALIDATION_SCHEMA,\n onSubmit: handleSubmit,\n }}\n >\n <CardLayout\n actionBlock={\n <ActionBlock\n cancelButtonProps={{ onClick: () => history.goBack() }}\n isSubmitting={isConnecting}\n submitButtonProps={{\n label: t(\"neetoIntegrations.common.connect\"),\n }}\n />\n }\n >\n <Input\n autoFocus\n required\n dataTestId=\"api-key\"\n label={t(\"neetoIntegrations.daily.apiKey\")}\n name=\"apiKey\"\n />\n </CardLayout>\n </FormikForm>\n <WalkthroughModal\n {...{ videoUrl }}\n isOpen={isDemoModalOpen}\n onClose={() => setIsDemoModalOpen(false)}\n />\n </div>\n </Container>\n );\n};\nexport default withTitle(\n Form,\n i18next.t(\"neetoIntegrations.browserTitles.integrations.dailyco\")\n);\n"],"names":["
|
|
1
|
+
{"version":3,"file":"DailyForm.js","sources":["../../../app/javascript/src/v2/components/Integrations/Daily/constants.js","../../../app/javascript/src/v2/components/Integrations/Daily/Form.jsx"],"sourcesContent":["import { t } from \"i18next\";\nimport * as yup from \"yup\";\n\nexport const MANAGE_DAILY_CO_FORM_INITIAL_VALUES = { apiKey: \"\" };\n\nexport const DAILY_CO_VALIDATION_SCHEMA = yup.object().shape({\n apiKey: yup\n .string()\n .trim()\n .required(\n t(\"neetoIntegrations.errors.required\", {\n entity: t(\"neetoIntegrations.daily.apiKey\"),\n })\n ),\n});\n","import { useState } from \"react\";\n\nimport i18next from \"i18next\";\nimport { Button, Spinner, Typography } from \"neetoatoms\";\nimport { Input, Form as FormikForm, ActionBlock } from \"neetoatoms/formik\";\nimport { withTitle } from \"neetocommons/v2/react-utils\";\nimport CardLayout from \"neetomolecules/v2/CardLayout\";\nimport Container from \"neetomolecules/v2/Container\";\nimport Header from \"neetomolecules/v2/Header\";\nimport { Trans, useTranslation } from \"react-i18next\";\nimport { useHistory } from \"react-router-dom\";\n\nimport { useCreateDaily } from \"hooks/reactQuery/useDailiesApi\";\n\nimport {\n MANAGE_DAILY_CO_FORM_INITIAL_VALUES,\n DAILY_CO_VALIDATION_SCHEMA,\n} from \"./constants\";\n\nimport WalkthroughModal from \"../../WalkthroughModal\";\n\nconst Form = ({ helpDocUrl, videoUrl, onConnect, breadcrumbs }) => {\n const { t } = useTranslation();\n const history = useHistory();\n\n const [isDemoModalOpen, setIsDemoModalOpen] = useState(false);\n\n const { mutate: createDaily, isPending: isConnecting } = useCreateDaily({\n onSuccess: () => onConnect?.(),\n });\n\n const handleSubmit = payload => createDaily(payload);\n\n if (isConnecting) {\n return (\n <div className=\"flex h-full w-full items-center justify-center\">\n <Spinner />\n </div>\n );\n }\n\n return (\n <Container isHeaderFixed>\n <Header\n {...{ breadcrumbs }}\n title={t(\"neetoIntegrations.daily.connect.title\")}\n titleHelpPopoverProps={{\n title: t(\"neetoIntegrations.daily.connect.title\"),\n description: (\n <Typography lineClamp=\"none\" variant=\"body2\">\n <Trans\n i18nKey=\"neetoIntegrations.daily.helpDoc\"\n components={{\n videoLink: (\n <Button\n variant=\"link\"\n onClick={() => setIsDemoModalOpen(true)}\n />\n ),\n }}\n />\n </Typography>\n ),\n helpLinkProps: {\n href: helpDocUrl,\n \"data-testid\": \"api-key-help-doc-link\",\n },\n }}\n />\n <div className=\"w-full\">\n <FormikForm\n formikProps={{\n initialValues: MANAGE_DAILY_CO_FORM_INITIAL_VALUES,\n validationSchema: DAILY_CO_VALIDATION_SCHEMA,\n onSubmit: handleSubmit,\n }}\n >\n <CardLayout\n actionBlock={\n <ActionBlock\n cancelButtonProps={{ onClick: () => history.goBack() }}\n isSubmitting={isConnecting}\n submitButtonProps={{\n label: t(\"neetoIntegrations.common.connect\"),\n }}\n />\n }\n >\n <Input\n autoFocus\n required\n dataTestId=\"api-key\"\n label={t(\"neetoIntegrations.daily.apiKey\")}\n name=\"apiKey\"\n />\n </CardLayout>\n </FormikForm>\n <WalkthroughModal\n {...{ videoUrl }}\n isOpen={isDemoModalOpen}\n onClose={() => setIsDemoModalOpen(false)}\n />\n </div>\n </Container>\n );\n};\nexport default withTitle(\n Form,\n i18next.t(\"neetoIntegrations.browserTitles.integrations.dailyco\")\n);\n"],"names":["yup","t","Form","useTranslation","useHistory","useState","useCreateDaily","_jsx","Spinner","_jsxs","Typography","Trans","Button","FormikForm","ActionBlock","Input","WalkthroughModal","withTitle"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGO,IAAM,mCAAmC,GAAG;AAAE,EAAA,MAAM,EAAE;AAAG,CAAC;AAE1D,IAAM,0BAA0B,GAAGA,cAAG,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC;AAC3D,EAAA,MAAM,EAAEA,cAAG,CACR,MAAM,EAAE,CACR,IAAI,EAAE,CACN,QAAQ,CACPC,SAAC,CAAC,mCAAmC,EAAE;IACrC,MAAM,EAAEA,SAAC,CAAC,gCAAgC;AAC5C,GAAC,CACH;AACJ,CAAC,CAAC;;ACOF,IAAMC,MAAI,GAAG,SAAP,IAAI,CAAA,IAAA,EAAyD;EAAA,IAAnD,UAAU,QAAV,UAAU;AAAE,IAAA,QAAQ,QAAR,QAAQ;AAAE,IAAA,SAAS,QAAT,SAAS;AAAE,IAAA,WAAW,QAAX,WAAW;EAC1D,IAAA,eAAA,GAAcC,2BAAc,EAAE;AAAtB,IAAA,CAAC,mBA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E,SAAT,OAAO,GAAA;UAAA,OAAQ,kBAAkB,CAAC,KAAK,CAAC;AAAA,QAAA;AAAC,OAC1C,CAAC;AAAA,KACC,CAAC;AAAA,GACG,CAAC;AAEhB,CAAC;AACD,WAAeC,oBAAS,CACtBf,MAAI,EACJ,OAAO,CAAC,CAAC,CAAC,sDAAsD,CAClE,CAAC;;;;"}
|
package/dist/cjs/v2/Demo.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Demo.js","sources":["../../../app/javascript/src/v2/components/Steps/utils.js","../../../app/javascript/src/v2/components/Steps/Demo.jsx"],"sourcesContent":["import { isEmpty } from \"ramda\";\n\nexport const isYouTubeLink = videoUrl => {\n const youtubeRegex = /^(https?:\\/\\/)?(www\\.)?(youtube\\.com|youtu\\.be)\\//;\n\n return youtubeRegex.test(videoUrl);\n};\n\nexport const renderText = (text, fallbackTranslation) =>\n isEmpty(text) ? fallbackTranslation : text;\n","import { Button } from \"@bigbinary/neeto-atoms\";\nimport { noop } from \"neetocist\";\nimport CardLayout from \"neetomolecules/v2/CardLayout\";\nimport PropTypes from \"prop-types\";\nimport { useTranslation } from \"react-i18next\";\n\nimport { isYouTubeLink, renderText } from \"./utils\";\n\nconst Demo = ({\n title = \"\",\n subtitle = \"\",\n iframeTitle = \"\",\n onClose = noop,\n videoUrl = \"\",\n children,\n}) => {\n const { t } = useTranslation();\n\n const renderVideo = videoUrl =>\n isYouTubeLink(videoUrl) ? (\n <iframe\n allowFullScreen\n className=\"aspect-video w-full max-w-3xl border-none\"\n frameBorder=\"0\"\n id=\"ytplayer\"\n src={videoUrl}\n title={renderText(iframeTitle, t(\"neetoIntegrations.demo.iFrameTitle\"))}\n type=\"text/html\"\n />\n ) : (\n <video\n autoPlay\n controls\n muted\n className=\"aspect-video w-full max-w-3xl cursor-pointer rounded-xl\"\n id=\"walkthrough-video\"\n >\n <source src={videoUrl} />\n </video>\n );\n\n return (\n <CardLayout\n description={renderText(subtitle, t(\"neetoIntegrations.demo.subtitle\"))}\n title={renderText(title, t(\"neetoIntegrations.demo.title\"))}\n actionBlock={\n <Button\n data-testid=\"neeto-integrations-demo-finish-button\"\n label={t(\"neetoIntegrations.common.finish\")}\n onClick={onClose}\n />\n }\n >\n {children}\n {videoUrl && <div className=\"w-full\">{renderVideo(videoUrl)}</div>}\n </CardLayout>\n );\n};\n\nDemo.prototypes = {\n onClose: PropTypes.func,\n videoUrl: PropTypes.string,\n title: PropTypes.string,\n subtitle: PropTypes.string,\n iframeTitle: PropTypes.string,\n};\n\nexport default Demo;\n"],"names":["
|
|
1
|
+
{"version":3,"file":"Demo.js","sources":["../../../app/javascript/src/v2/components/Steps/utils.js","../../../app/javascript/src/v2/components/Steps/Demo.jsx"],"sourcesContent":["import { isEmpty } from \"ramda\";\n\nexport const isYouTubeLink = videoUrl => {\n const youtubeRegex = /^(https?:\\/\\/)?(www\\.)?(youtube\\.com|youtu\\.be)\\//;\n\n return youtubeRegex.test(videoUrl);\n};\n\nexport const renderText = (text, fallbackTranslation) =>\n isEmpty(text) ? fallbackTranslation : text;\n","import { Button } from \"@bigbinary/neeto-atoms\";\nimport { noop } from \"neetocist\";\nimport CardLayout from \"neetomolecules/v2/CardLayout\";\nimport PropTypes from \"prop-types\";\nimport { useTranslation } from \"react-i18next\";\n\nimport { isYouTubeLink, renderText } from \"./utils\";\n\nconst Demo = ({\n title = \"\",\n subtitle = \"\",\n iframeTitle = \"\",\n onClose = noop,\n videoUrl = \"\",\n children,\n}) => {\n const { t } = useTranslation();\n\n const renderVideo = videoUrl =>\n isYouTubeLink(videoUrl) ? (\n <iframe\n allowFullScreen\n className=\"aspect-video w-full max-w-3xl border-none\"\n frameBorder=\"0\"\n id=\"ytplayer\"\n src={videoUrl}\n title={renderText(iframeTitle, t(\"neetoIntegrations.demo.iFrameTitle\"))}\n type=\"text/html\"\n />\n ) : (\n <video\n autoPlay\n controls\n muted\n className=\"aspect-video w-full max-w-3xl cursor-pointer rounded-xl\"\n id=\"walkthrough-video\"\n >\n <source src={videoUrl} />\n </video>\n );\n\n return (\n <CardLayout\n description={renderText(subtitle, t(\"neetoIntegrations.demo.subtitle\"))}\n title={renderText(title, t(\"neetoIntegrations.demo.title\"))}\n actionBlock={\n <Button\n data-testid=\"neeto-integrations-demo-finish-button\"\n label={t(\"neetoIntegrations.common.finish\")}\n onClick={onClose}\n />\n }\n >\n {children}\n {videoUrl && <div className=\"w-full\">{renderVideo(videoUrl)}</div>}\n </CardLayout>\n );\n};\n\nDemo.prototypes = {\n onClose: PropTypes.func,\n videoUrl: PropTypes.string,\n title: PropTypes.string,\n subtitle: PropTypes.string,\n iframeTitle: PropTypes.string,\n};\n\nexport default Demo;\n"],"names":["isEmpty","noop","useTranslation","_jsx","_jsxs","Button","PropTypes"],"mappings":";;;;;;;;;;AAEO,IAAM,aAAa,GAAG,SAAhB,aAAa,CAAG,QAAQ,EAAI;EACvC,IAAM,YAAY,GAAG,mDAAmD;AAExE,EAAA,OAAO,YAAY,CAAC,IAAI,CAAC,QAAQ,CAAC;AACpC,CAAC;AAEM,IAAM,UAAU,GAAG,SAAb,UAAU,CAAI,IAAI,EAAE,mBAAmB,EAAA;AAAA,EAAA,OAClDA,aAAO,CAAC,IAAI,CAAC,GAAG,mBAAmB,GAAG,IAAI;AAAA,CAAA;;ACD5C,IAAM,IAAI,GAAG,SAAP,IAAI,CAAA,IAAA,EAOJ;AAAA,EAAA,IAAA,UAAA,GAAA,IAAA,CANJ,KAAK;AAAL,IAAA,KAAK,2BAAG,EAAE,GAAA,UAAA;AAAA,IAAA,aAAA,GAAA,IAAA,CACV,QAAQ;AAAR,IAAA,QAAQ,8BAAG,EAAE,GAAA,aAAA;AAAA,IAAA,gBAAA,GAAA,IAAA,CACb,WAAW;AAAX,IAAA,WAAW,iCAAG,EAAE,GAAA,gBAAA;AAAA,IAAA,YAAA,GAAA,IAAA,CAChB,OAAO;AAAP,IAAA,OAAO,6BAAGC,cAAI,GAAA,YAAA;AAAA,IAAA,aAAA,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